Файловый менеджер - Редактировать - /home/beautybuzzbeyond/public_html/wp-content/plugins/coblocks/dist/js/coblocks-events.js
Назад
(()=>{var e={9334:function(e){e.exports=function(){"use strict";function e(){return(e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,i=arguments[t];for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}function t(e,t){void 0===t&&(t=[]),Array.isArray(t)||(t=[t]),t.forEach((function(t){return!e.classList.contains(t)&&e.classList.add(t)}))}function n(e,t,n,i){e.addEventListener(t,n,i)}function i(e,t,n){e.removeEventListener(t,n)}function r(e,t,n){return void 0===n&&(n=""),e.setAttribute(t,n),e}function o(e,t,n){return Object.keys(t).forEach((function(n){e.style[n]=t[n]})),n&&getComputedStyle(e),e}var a={direction:"horizontal",touchRatio:1,touchAngle:45,longSwipesRatio:.5,initialSlide:0,loop:!1,freeMode:!1,passiveListeners:!0,resistance:!0,resistanceRatio:.85,speed:300,longSwipesMs:300,spaceBetween:0,slidesPerView:1,centeredSlides:!1,slidePrevClass:"swiper-slide-prev",slideNextClass:"swiper-slide-next",slideActiveClass:"swiper-slide-active",slideClass:"swiper-slide",wrapperClass:"swiper-wrapper",touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchMoveStopPropagation:!1,excludeElements:[],injections:{translate:function(e,t,n,i){o(t.element.$wrapper,{transition:e.isStart?"none":"transform ease "+i+"ms",transform:n.isHorizontal?"translate3d("+e.transforms+"px, 0, 0)":"translate3d(0, "+e.transforms+"px, 0)"})}}};var s=180/Math.PI;function l(){var t=[];return{getDuration:function(){var e=t[0],n=t[t.length-1];return e?n.time-e.time:0},getOffset:function(){var e=t[0],n=t[t.length-1];return e?{x:n.x-e.x,y:n.y-e.y}:{x:0,y:0}},getLogs:function(){return t},vector:function(){return i=(n=t).length-1,r=n[i],n=n[i-1]||r,i={x:r.x-n.x,y:r.y-n.y},r=r.time-n.time,n=i.x/r||0,r=i.y/r||0,e({},i,{angle:Math.atan2(Math.abs(i.y),Math.abs(i.x))*s,velocityX:n,velocityY:r});var n,i,r},clear:function(){t=[]},push:function(n){t.push(e({time:Date.now()},n))}}}function c(){return(performance||Date).now()}var u=requestAnimationFrame||webkitRequestAnimationFrame||setTimeout,d=cancelAnimationFrame||webkitCancelAnimationFrame||clearTimeout;function p(){var e=function(){var e,t;return{run:function(n){e=void 0===e?c():e,t=u((function(){var t=c(),i=t-e;e=t,n(i)}))},stop:function(){e=void 0,d(t)}}}();return{run:function t(n){e.run((function(e){t(n),n(e)}))},stop:function(){e.stop()}}}function f(e,t){e=e.tracker,t=t.initStatus,e.clear(),t()}function m(e,t,n,i){var r=i.initLayout,o=i.initStatus,a=i.render,s=i.scrollPixel,l=i.slideTo,c=i.getOffsetSteps,u=p();return{preheat:function(e,t){var i=n.tracker;u.stop(),i.clear(),i.push(e),r(t),o(t),n.isStart=!0,a()},move:function(t){var i,r=n.tracker,o=e.touchRatio,l=e.touchAngle,c=e.isHorizontal;n.isStart&&!n.isScrolling&&(r.push(t),i=r.vector(),((t=r.getOffset()).x||t.y)&&(c&&i.angle<l||!c&&90-i.angle<l||n.isTouching?(o=i[c?"x":"y"]*o,n.isTouching=!0,s(o),a()):(n.isScrolling=!0,r.clear())))},stop:function(){var r,o,d,p=n.index,m=n.tracker,v=t.measure;n.isStart&&(n.isStart=!1,e.freeMode?(r=m.vector()[e.isHorizontal?"velocityX":"velocityY"],u.run((function(e){e*=r,r*=.98,Math.abs(e)<.01?(u.stop(),f(n,i)):(s(e),a(0))}))):(o=m.getDuration(),d=m.getOffset()[e.isHorizontal?"x":"y"],m=Math.ceil(Math.abs(d)/v.boxSize),v=c(d),o>e.longSwipesMs?l(p+v*(0<d?-1:1)):l(0<d?p-m:p+m),f(n,i)))}}}function v(e,t){var n={};return(n.update=function(e){var i,r=function(e,t,n){var i=e.$list,r=t.viewSize,o=t.slideSize,a=t.boxSize,s=-(t=(e=(s=n).loop?Math.ceil(s.slidesPerView):0)*a)+(n.centeredSlides?(r-o)/2:0);return{max:s,min:n.spaceBetween+(n.loop?o:r)+s-a*i.length,base:s,expand:e,buffer:t,minIndex:0,maxIndex:i.length-(n.centeredSlides||n.loop?1:Math.ceil(n.slidesPerView))}}(e,(i=t,o=(r=e).$el,i={boxSize:(o=((r=i.isHorizontal?o.offsetWidth:o.offsetHeight)-Math.ceil(i.slidesPerView-1)*i.spaceBetween)/i.slidesPerView)+i.spaceBetween,viewSize:r,slideSize:o}),t),o=Boolean("ontouchstart"in window||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||window.DocumentTouch&&document instanceof DocumentTouch);Object.assign(n,{touchable:o,element:e,measure:i,limitation:r})})(e),n}var x="data-shallow-slider",h="data-slider";function g(e,n){function i(){e.element.$wrapper.querySelectorAll("["+x+"]").forEach((function(t){return e.element.$wrapper.removeChild(t)}))}function a(){var t=e.element,i=e.measure,r=t.$wrapper,a={display:"flex",willChange:"transform",flexDirection:n.isHorizontal?"row":"column"},s=((t={})[n.isHorizontal?"width":"height"]=i.slideSize+"px",t[n.isHorizontal?"margin-right":"margin-bottom"]=n.spaceBetween+"px",t);o(r,a),r.querySelectorAll("["+h+"]").forEach((function(e){return o(e,s)}))}return{init:function(){(function(){var t,o,a,s,l,c;e.element.$list.forEach((function(e,t){return r(e,h,t)})),i(),n.loop&&(t=e.element,s=e.limitation,o=t.$list,a=t.$wrapper,s=s.expand,l=o.slice(-s).map((function(e){return e.cloneNode(!0)})),c=o.slice(0,s).map((function(e){return e.cloneNode(!0)})),l.forEach((function(e,t){a.appendChild(r(c[t],x)),a.insertBefore(r(l[t],x),o[0])})))})(),a()},render:function(i,r,o,a){var s=e.element.$wrapper;r=void 0===r?n.speed:r,n.injections.translate(i,e,n,r),i.isStart||function(i){var r=e.element.$wrapper,o=i.index;r.querySelectorAll("["+h+"]").forEach((function(e){var i,r,a=~~e.getAttribute(h);i=e,void 0===(r=[n.slidePrevClass,n.slideNextClass,n.slideActiveClass])&&(r=[]),Array.isArray(r)||(r=[r]),r.forEach((function(e){return i.classList.contains(e)&&i.classList.remove(e)})),a===o&&t(e,n.slideActiveClass),a==o-1&&t(e,n.slidePrevClass),a===o+1&&t(e,n.slideNextClass)}))}(i),a&&getComputedStyle(s).transform,o&&setTimeout(o,r)},destroy:function(){var t=e.element,r=t.$list,o=t.$wrapper,a=n.isHorizontal?"margin-right":"margin-bottom";["display","will-change","flex-direction"].forEach((function(e){o.style.removeProperty(e)})),r.forEach((function(e){return e.style.removeProperty(a)})),i()},updateSize:a}}function b(e,t){var n=e-t.max;return t=e-t.min,0<n?n:t<0?t:0}function w(t,n,i,r,o){function a(e){var n=t.measure;return Math.ceil(Math.abs(e)/n.boxSize-i.longSwipesRatio)}function s(e,t,i){r.render(n,e,t,i)}function l(r){var a,s,l=(s=t.limitation).min,c=s.max;l=(s=c-l+(i.loop?t.measure.boxSize:0))+1,n.transforms=r,i.loop?(a=(c-r)%l/s,n.progress=a<0?1+a:1<a?a-1:a):(a=(c-r)/s,n.progress=a<0?0:1<a?1:a),o.emit("scroll",e({},n))}function c(e,r){var c,u,d,p,f,m=t.measure,v=t.limitation,x=v.maxIndex-v.minIndex+1,h=i.loop?(e%x+x)%x:e>v.maxIndex?v.maxIndex:e<v.minIndex?v.minIndex:e,g=-h*m.boxSize+v.base;0!==a(g-n.transforms)&&i.loop&&(c=b(n.transforms,v),u=h-n.index,d=n.index,p=h,f=u,e=(x=v).maxIndex,d=(0<f?1:-1)*(x.minIndex-e-1)+p-d,(f=Math.abs(f)>Math.abs(d)?d:f)===u||c?n.index===h&&l(0<c?v.min-m.boxSize+c:v.max+m.boxSize+c):l(f<0?v.min-m.boxSize:v.max+m.boxSize),s(0,void 0,!0)),o.emit("before-slide",n.index,n,h),n.index=h,l(g),s(r,(function(){o.emit("after-slide",h,n)}))}return{update:function(){c(n.index,0),r.updateSize()},render:s,transform:l,slideTo:c,scrollPixel:function(e){var r,o=n.transforms,a=t.measure,s=t.limitation,c=(r=Number(e.toExponential().split("e")[1]))<=0?Math.pow(10,-(r-1)):1,u=o;i.resistance&&!i.loop&&(0<e&&o>=s.max?e-=Math.pow(e*c,i.resistanceRatio)/c:e<0&&o<=s.min&&(e+=Math.pow(-e*c,i.resistanceRatio)/c)),u+=e,i.loop&&(r=n.tracker.vector(),c=i.isHorizontal?r.velocityX:r.velocityY,(e=b(o,s))&&(r=o,o=s,0<c&&r>o.max||c<0&&r<o.min)&&(u=0<e?s.min-a.boxSize+e:s.max+a.boxSize+e)),l(u)},initStatus:function(e){void 0===e&&(e=0),n.startTransform=e,n.isStart=!1,n.isScrolling=!1,n.isTouching=!1},initLayout:function(e){l(e)},getOffsetSteps:a}}function y(e,t){var n="string"==typeof e?document.body.querySelector(e):e;return e=n.querySelector("."+t.wrapperClass),t=[].slice.call(n.getElementsByClassName(t.slideClass)),{$el:n,$wrapper:e,$list:t=t.filter((function(e){return null===e.getAttribute("data-shallow-slider")}))}}function S(t,r){var o=(d=e({},a,d=r),e({},d,{isHorizontal:"horizontal"===d.direction})),s=function(){var e={};return{on:function(t,n){e[t]?e[t].push(n):e[t]=[n]},off:function(t,n){!e[t]||-1<(n=e[t].indexOf(n))&&e[t].splice(n,1)},emit:function(t){for(var n=arguments.length,i=new Array(1<n?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];e[t]&&e[t].forEach((function(e){return e.apply(void 0,i)}))},clear:function(){e={}}}}(),c=v(y(t,o),o),u={tracker:l(),index:0,startTransform:0,isStart:!1,isScrolling:!1,isTouching:!1,transforms:0,progress:0},d=(r=s.on,s.off),p=s.emit,f={on:r,off:d,env:c,state:u,options:o};(o.plugins||S.plugins||[]).forEach((function(e){return e(f,o)})),p("before-init",f);var x=g(c,o),h=w(c,u,o,x,s),b=function(e,t,r,o){var a=e.touchable,s=["INPUT","SELECT","OPTION","TEXTAREA","BUTTON","VIDEO"],l=(o=m(r,e,t,o)).preheat,c=o.move,u=o.stop;function d(e){return{x:(e=a?e.changedTouches[0]:e).pageX,y:e.pageY}}function p(t){for(var n=0;n<r.excludeElements.length;n++)if(r.excludeElements[n].contains(t.target))return;var i,o=e.element.$wrapper,c=r.touchStartPreventDefault&&-1===s.indexOf(t.target.nodeName)||r.touchStartForcePreventDefault;!a&&c&&t.preventDefault(),l(d(t),(i=o,c=r.isHorizontal,o=getComputedStyle(i).transform.replace(/[a-z]|\(|\)|\s/g,"").split(",").map(parseFloat),i=[],16===o.length?i=o.slice(12,14):6===o.length&&(i=o.slice(4,6)),i[c?0:1]||0))}function f(e){r.touchMoveStopPropagation&&e.stopPropagation(),c(d(e)),t.isTouching&&!1!==e.cancelable&&e.preventDefault()}function v(){u()}return{attach:function(){var t=e.element.$el;a?(n(t,"touchstart",p,{passive:r.passiveListeners,capture:!1}),n(t,"touchmove",f),n(t,"touchend",v),n(t,"touchcancel",v)):(n(t,"mousedown",p),n(document,"mousemove",f),n(document,"mouseup",v))},detach:function(){var t=e.element.$el;i(t,"touchstart",p),i(t,"touchmove",f),i(t,"touchend",v),i(t,"touchcancel",v),i(t,"mousedown",p),i(document,"mousemove",f),i(document,"mouseup",v)}}}(c,u,o,h);return u=h.slideTo,Object.assign(f,{update:function(){x.destroy(),c.update(y(t,o)),x.init(),h.update()},destroy:function(){p("before-destroy",f),b.detach(),x.destroy(),p("after-destroy",f),s.clear()},slideTo:u,updateSize:function(){c.update(y(t,o)),h.update()}}),x.init(),b.attach(),u(o.initialSlide,0),p("after-init",f),f}return S.use=function(e){S.plugins=e},S}()},8608:function(e){e.exports=function(){"use strict";function e(e,t,n,i){e.addEventListener(t,n,i)}function t(e,t,n){e.removeEventListener(t,n)}return function(n,i){function r(e){c(e.target,"next")}function o(e){c(e.target,"prev")}var a=Boolean(i.navigation),s={nextEl:null,prevEl:null},l=Object.assign({disabledClass:"swiper-button-disabled"},i.navigation),c=function(e,t){u(e)&&!n.options.loop||(e=n.state.index,"next"===t&&n.slideTo(e+1),"prev"===t&&n.slideTo(e-1))},u=function(e){return e.classList.contains(l.disabledClass)};n.on("before-slide",(function(e,t,i){var r,o;n.options.loop||(r=i,i=(o=n.env.limitation).minIndex,o=o.maxIndex,s&&s.prevEl&&s.nextEl&&(s.nextEl.classList.contains(l.disabledClass)&&i<=r&&s.nextEl.classList.remove(l.disabledClass),s.prevEl.classList.contains(l.disabledClass)&&r<=o&&s.prevEl.classList.remove(l.disabledClass),r===i&&s.prevEl.classList.add(l.disabledClass),r===o&&s.nextEl.classList.add(l.disabledClass)))})),n.on("after-init",(function(){var t,i,c;a&&(s.nextEl="string"==typeof l.nextEl?document.body.querySelector(l.nextEl):l.nextEl,s.prevEl="string"==typeof l.prevEl?document.body.querySelector(l.prevEl):l.prevEl,n.options.loop||(t=n.state.index,i=n.env.element.$list,t===(c=n.env.limitation.minIndex)&&s.prevEl&&s.prevEl.classList.add(l.disabledClass),i.length===c&&s.nextEl&&s.nextEl.classList.add(l.disabledClass)),e(s.nextEl,"click",r),e(s.prevEl,"click",o))})),n.on("after-destroy",(function(){s&&s.prevEl&&s.nextEl&&(t(s.nextEl,"click",r),t(s.prevEl,"click",o),delete s.nextEl,delete s.prevEl)}))}}()}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=n(9334),t=n.n(e),i=n(8608),r=n.n(i);document.addEventListener("DOMContentLoaded",(function(){setTimeout((()=>{(()=>{const e=document.querySelectorAll(".page .wp-block-coblocks-front-events-swiper-container");for(let n=0;n<e.length;n++){const i=e[n];if(!i)return;const o=i.querySelector(".swiper-wrapper-loading"),a=i.querySelectorAll(".swiper-slide"),s=i.parentNode.querySelector("#wp-coblocks-event-swiper-prev"),l=i.parentNode.querySelector("#wp-coblocks-event-swiper-next");s.setAttribute("aria-label",coblocksEvents.carouselPrevButtonAriaLabel),l.setAttribute("aria-label",coblocksEvents.carouselNextButtonAriaLabel),a.length>1&&o&&(o.classList.remove("swiper-wrapper-loading"),o.classList.add("swiper-wrapper"),s.style.visibility="visible",l.style.visibility="visible",new(t())(i,{navigation:{nextEl:l,prevEl:s},plugins:[r()],spaceBetween:10,touchable:!1}))}})(),(()=>{const e=document.querySelectorAll(".wp-block-coblocks-events__time-formatted");for(let t=0;t<e.length;t++){const n=e[t],i=n.getAttribute("data-start-time"),r=n.getAttribute("data-end-time");n.innerHTML=`\n\t\t\t${new Date(i).toLocaleTimeString()}\n\t\t\t-\n\t\t\t${new Date(r).toLocaleTimeString()}\n\t`}})()}),500)}),!1)})()})();
| ver. 1.4 |
Github
|
.
| PHP 8.0.30 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка