Файловый менеджер - Редактировать - /home/beautybuzzbeyond/public_html/wp-content/plugins/coblocks/dist/js/coblocks-counter.js
Назад
(()=>{"use strict";var t={};function e(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}t.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},t.d=(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},t.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);const n=t=>{clearTimeout(t.countUpTimeout),t._countUpOrigInnerHTML&&(t.innerHTML=t._countUpOrigInnerHTML,t._countUpOrigInnerHTML=void 0),t.style.visibility=""},i=(t,e={})=>{const{duration:n=1e3,delay:i=16}=e,o=n/i,r=t.toString().split(/(<[^>]+>|[0-9.][,.0-9]*[0-9]*)/),c=[];for(let t=0;t<o;t++)c.push("");for(let t=0;t<r.length;t++)if(/([0-9.][,.0-9]*[0-9]*)/.test(r[t])&&!/<[^>]+>/.test(r[t])){let e=r[t];const n=[...e.matchAll(/[.,]/g)].map((t=>({char:t[0],i:e.length-t.index-1}))).sort(((t,e)=>t.i-e.i));e=e.replace(/[.,]/g,"");let i=c.length-1;for(let t=o;t>=1;t--){let r=parseInt(e/o*t,10);r=n.reduce(((t,{char:e,i:n})=>t.length<=n?t:t.slice(0,-n)+e+t.slice(-n)),r.toString()),c[i--]+=r}}else for(let e=0;e<o;e++)c[e]+=r[t];return c[c.length]=t.toString(),c},o=window.wp.domReady;var r=t.n(o);const c="coblocks-counter-active";window.coblocksCounter=new class{constructor(){e(this,"callback",(t=>{t.forEach((t=>{const e=t.target,o=1e3*parseInt((null==e?void 0:e.getAttribute("data-counter-speed"))||1);!e.classList.contains(c)&&t.isIntersecting&&setTimeout((()=>{((t,e={})=>{const{action:o="start",duration:r=1e3,delay:c=16}=e;if("stop"===o)return void n(t);if(n(t),!/[0-9]/.test(t.innerHTML))return;const s=i(t.innerHTML,{duration:r||t.getAttribute("data-duration"),delay:c||t.getAttribute("data-delay")});t._countUpOrigInnerHTML=t.innerHTML,t.innerHTML=s[0]||" ",t.style.visibility="visible";const a=function(){t.innerHTML=s.shift()||" ",s.length?(clearTimeout(t.countUpTimeout),t.countUpTimeout=setTimeout(a,c)):t._countUpOrigInnerHTML=void 0};t.countUpTimeout=setTimeout(a,c)})(e,{duration:o}),e.classList.add(c)}),200)}))})),e(this,"init",(()=>{const t=document.querySelectorAll(".wp-block-coblocks-counter"),e=window.matchMedia("(prefers-reduced-motion: reduce)").matches;"IntersectionObserver"in window&&!e?(this.io&&this.io.disconnect(),this.io=new IntersectionObserver(this.callback,{threshold:.25}),t.forEach((t=>{this.io.observe(t)}))):t.forEach((t=>{t.classList.add(c)}))}))}},r()(window.coblocksCounter.init)})();
| ver. 1.4 |
Github
|
.
| PHP 8.0.30 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка