PageSourceSearch

https://www.twik.io/wp-content/themes/twik_website_v2/assets/embla…/embla-carousel-auto-scroll.umd.js?v=8.1.3

js twik.io collected 2026-09-25 02:41:00 UTC 2,429 bytes, 1 lines download raw bytes

1!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t="undefined"!=typeof globalThis?globalThis:t||self).EmblaCarouselAutoScroll=n()}(this,(function(){"use strict";const t={direction:"forward",speed:2,startDelay:1e3,active:!0,breakpoints:{},playOnInit:!0,stopOnFocusIn:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,rootNode:null};function n(o={}){let e,i,r,s,c,l=!1,a=!0,u=0;function d(){if(r||l)return;if(!a)return;i.emit("autoScroll:play");const t=i.internalEngine(),{ownerWindow:n}=t;u=n.setTimeout((()=>{t.scrollBody=function(t){const{location:n,target:o,scrollTarget:r,index:s,indexPrevious:c,limit:{reachedMin:l,reachedMax:a,constrain:u},options:{loop:d}}=t,p="forward"===e.direction?-1:1,g=()=>S;let y=0,m=0,O=n.get(),w=0,b=!1;function I(){let t=0;y=p*e.speed,O+=y,n.add(y),o.set(n),t=O-w,m=Math.sign(t),w=O;const g=r.byDistance(0,!1).index;s.get()!==g&&(c.set(s.get()),s.set(g),i.emit("select"));const I="forward"===e.direction?l(n.get()):a(n.get());if(!d&&I){b=!0;const t=u(n.get());n.set(t),o.set(n),f()}return S}const S={direction:()=>m,duration:()=>-1,velocity:()=>y,settled:()=>b,seek:I,useBaseFriction:g,useBaseDuration:g,useFriction:g,useDuration:g};return S}(t),t.animation.start()}),s),l=!0}function f(){if(r||!l)return;i.emit("autoScroll:stop");const t=i.internalEngine(),{ownerWindow:n}=t;t.scrollBody=c,n.clearTimeout(u),u=0,l=!1}function p(){a&&d(),i.off("settle",p)}function g(){i.on("settle",p)}return{name:"autoScroll",options:o,init:function(l,u){i=l;const{mergeOptions:p,optionsAtMedia:y}=u,m=p(t,n.globalOptions),O=p(m,o);if(e=y(O),i.scrollSnapList().length<=1)return;s=e.startDelay,r=!1,c=i.internalEngine().scrollBody;const{eventStore:w}=i.internalEngine(),b=i.rootNode(),I=e.rootNode&&e.rootNode(b)||b,S=i.containerNode();i.on("pointerDown",f),e.stopOnInteraction||i.on("pointerUp",g),e.stopOnMouseEnter&&(w.add(I,"mouseenter",(()=>{a=!1,f()})),e.stopOnInteraction||w.add(I,"mouseleave",(()=>{a=!0,d()}))),e.stopOnFocusIn&&(w.add(S,"focusin",(()=>{f(),i.scrollTo(i.selectedScrollSnap(),!0)})),e.stopOnInteraction||w.add(S,"focusout",d)),e.playOnInit&&d()},destroy:function(){i.off("pointerDown",f).off("pointerUp",g).off("settle",p),f(),r=!0,l=!1},play:function(t){void 0!==t&&(s=t),a=!0,d()},stop:function(){l&&f()},reset:function(){l&&(f(),g())},isPlaying:function(){return l}}}return n.globalOptions=void 0,n}));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.