Файловый менеджер - Редактировать - /home/beautybuzzbeyond/public_html/wp-content/plugins/coblocks/dist/js/coblocks-events-script.js
Назад
(()=>{var e={7152: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)"})}}},s="before-slide",l="scroll",c="after-slide";var u=180/Math.PI;function d(){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))*u,velocityX:n,velocityY:r});var n,i,r},clear:function(){t=[]},push:function(n){t.push(e({time:Date.now()},n))}}}function p(){return(performance||Date).now()}var f=requestAnimationFrame||webkitRequestAnimationFrame||setTimeout,m=cancelAnimationFrame||webkitCancelAnimationFrame||clearTimeout;function v(){var e=function(){var e,t;return{run:function(n){e=void 0===e?p():e,t=f((function(){var t=p(),i=t-e;e=t,n(i)}))},stop:function(){e=void 0,m(t)}}}();return{run:function t(n){e.run((function(e){t(n),n(e)}))},stop:function(){e.stop()}}}function x(e,t){e=e.tracker,t=t.initStatus,e.clear(),t()}function h(e,t,n,i){var r=i.initLayout,o=i.initStatus,a=i.render,s=i.scrollPixel,l=i.slideTo,c=i.getOffsetSteps,u=v();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,f=n.tracker,m=t.measure;n.isStart&&(n.isStart=!1,e.freeMode?(r=f.vector()[e.isHorizontal?"velocityX":"velocityY"],u.run((function(e){e*=r,r*=.98,Math.abs(e)<.01?(u.stop(),x(n,i)):(s(e),a(0))}))):(o=f.getDuration(),d=f.getOffset()[e.isHorizontal?"x":"y"],f=Math.ceil(Math.abs(d)/m.boxSize),m=c(d),o>e.longSwipesMs?l(p+m*(0<d?-1:1)):l(0<d?p-f:p+f),x(n,i)))}}}function g(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 b="data-shallow-slider",w="data-slider";function y(e,n){function i(){e.element.$wrapper.querySelectorAll("["+b+"]").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("["+w+"]").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,w,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],b)),a.insertBefore(r(l[t],b),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("["+w+"]").forEach((function(e){var i,r,a=~~e.getAttribute(w);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 S(e,t){var n=e-t.max;return t=e-t.min,0<n?n:t<0?t:0}function E(t,n,i,r,o){function a(e){var n=t.measure;return Math.ceil(Math.abs(e)/n.boxSize-i.longSwipesRatio)}function u(e,t,i){r.render(n,e,t,i)}function d(r){var a,s,c=(s=t.limitation).min,u=s.max;c=(s=u-c+(i.loop?t.measure.boxSize:0))+1,n.transforms=r,i.loop?(a=(u-r)%c/s,n.progress=a<0?1+a:1<a?a-1:a):(a=(u-r)/s,n.progress=a<0?0:1<a?1:a),o.emit(l,e({},n))}function p(e,r){var l,p,f,m,v,x=t.measure,h=t.limitation,g=h.maxIndex-h.minIndex+1,b=i.loop?(e%g+g)%g:e>h.maxIndex?h.maxIndex:e<h.minIndex?h.minIndex:e,w=-b*x.boxSize+h.base;0!==a(w-n.transforms)&&i.loop&&(l=S(n.transforms,h),p=b-n.index,f=n.index,m=b,v=p,e=(g=h).maxIndex,f=(0<v?1:-1)*(g.minIndex-e-1)+m-f,(v=Math.abs(v)>Math.abs(f)?f:v)===p||l?n.index===b&&d(0<l?h.min-x.boxSize+l:h.max+x.boxSize+l):d(v<0?h.min-x.boxSize:h.max+x.boxSize),u(0,void 0,!0)),o.emit(s,n.index,n,b),n.index=b,d(w),u(r,(function(){o.emit(c,b,n)}))}return{update:function(){p(n.index,0),r.updateSize()},render:u,transform:d,slideTo:p,scrollPixel:function(e){var r,o=n.transforms,a=t.measure,s=t.limitation,l=(r=Number(e.toExponential().split("e")[1]))<=0?Math.pow(10,-(r-1)):1,c=o;i.resistance&&!i.loop&&(0<e&&o>=s.max?e-=Math.pow(e*l,i.resistanceRatio)/l:e<0&&o<=s.min&&(e+=Math.pow(-e*l,i.resistanceRatio)/l)),c+=e,i.loop&&(r=n.tracker.vector(),l=i.isHorizontal?r.velocityX:r.velocityY,(e=S(o,s))&&(r=o,o=s,0<l&&r>o.max||l<0&&r<o.min)&&(c=0<e?s.min-a.boxSize+e:s.max+a.boxSize+e)),d(c)},initStatus:function(e){void 0===e&&(e=0),n.startTransform=e,n.isStart=!1,n.isScrolling=!1,n.isTouching=!1},initLayout:function(e){d(e)},getOffsetSteps:a}}function z(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 C(t,r){var o=(u=e({},a,u=r),e({},u,{isHorizontal:"horizontal"===u.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={}}}}(),l=g(z(t,o),o),c={tracker:d(),index:0,startTransform:0,isStart:!1,isScrolling:!1,isTouching:!1,transforms:0,progress:0},u=(r=s.on,s.off),p=s.emit,f={on:r,off:u,env:l,state:c,options:o};(o.plugins||C.plugins||[]).forEach((function(e){return e(f,o)})),p("before-init",f);var m=y(l,o),v=E(l,c,o,m,s),x=function(e,t,r,o){var a=e.touchable,s=["INPUT","SELECT","OPTION","TEXTAREA","BUTTON","VIDEO"],l=(o=h(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 m(){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",m),n(t,"touchcancel",m)):(n(t,"mousedown",p),n(document,"mousemove",f),n(document,"mouseup",m))},detach:function(){var t=e.element.$el;i(t,"touchstart",p),i(t,"touchmove",f),i(t,"touchend",m),i(t,"touchcancel",m),i(t,"mousedown",p),i(document,"mousemove",f),i(document,"mouseup",m)}}}(l,c,o,v);return c=v.slideTo,Object.assign(f,{update:function(){m.destroy(),l.update(z(t,o)),m.init(),v.update()},destroy:function(){p("before-destroy",f),x.detach(),m.destroy(),p("after-destroy",f),s.clear()},slideTo:c,updateSize:function(){l.update(z(t,o)),v.update()}}),m.init(),x.attach(),c(o.initialSlide,0),p("after-init",f),f}return C.use=function(e){C.plugins=e},C}()},3266: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(7152),t=n.n(e),i=n(3266),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
|
Настройка