"use strict";function Dt(t,e){t.indexOf(e)===-1&&t.push(e)}function It(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const pt=(t,e,n)=>Math.min(Math.max(n,t),e),L={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},q=t=>typeof t=="number",R=t=>Array.isArray(t)&&!q(t[0]),_t=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t};function gt(t,e){return R(t)?t[_t(0,t.length,e)]:t}const tt=(t,e,n)=>-n*t+n*e+t,yt=()=>{},_=t=>t,K=(t,e,n)=>e-t===0?1:(n-t)/(e-t);function et(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=K(0,e,i);t.push(tt(n,1,s))}}function vt(t){const e=[0];return et(e,t-1),e}function Ct(t,e=vt(t.length),n=_){const i=t.length,s=i-e.length;return s>0&&et(e,s),c=>{let a=0;for(;aArray.isArray(t)&&q(t[0]),U=t=>typeof t=="object"&&!!t.createAnimation,z=t=>typeof t=="function",Et=t=>typeof t=="string",F={ms:t=>t*1e3,s:t=>t/1e3},St=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,$t=1e-7,Rt=12;function zt(t,e,n,i,s){let c,a,u=0;do a=e+(n-e)/2,c=St(a,i,s)-t,c>0?n=a:e=a;while(Math.abs(c)>$t&&++uzt(c,0,1,t,n);return c=>c===0||c===1?c:St(s(c),e,i)}const jt=(t,e="end")=>n=>{n=e==="end"?Math.min(n,.999):Math.max(n,.001);const i=n*t,s=e==="end"?Math.floor(i):Math.ceil(i);return pt(0,1,s/t)},rt={ease:j(.25,.1,.25,1),"ease-in":j(.42,0,1,1),"ease-in-out":j(.42,0,.58,1),"ease-out":j(0,0,.58,1)},Ft=/\((.*?)\)/;function at(t){if(z(t))return t;if(wt(t))return j(...t);if(rt[t])return rt[t];if(t.startsWith("steps")){const e=Ft.exec(t);if(e){const n=e[1].split(",");return jt(parseFloat(n[0]),n[1].trim())}}return _}class nt{constructor(e,n=[0,1],{easing:i,duration:s=L.duration,delay:c=L.delay,endDelay:a=L.endDelay,repeat:u=L.repeat,offset:d,direction:g="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=_,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((h,r)=>{this.resolve=h,this.reject=r}),i=i||L.easing,U(i)){const h=i.createAnimation(n);i=h.easing,n=h.keyframes||n,s=h.duration||s}this.repeat=u,this.easing=R(i)?_:at(i),this.updateDuration(s);const b=Ct(n,d,R(i)?i.map(at):_);this.tick=h=>{var r;c=c;let v=0;this.pauseTime!==void 0?v=this.pauseTime:v=(h-this.startTime)*this.rate,this.t=v,v/=1e3,v=Math.max(v-c,0),this.playState==="finished"&&this.pauseTime===void 0&&(v=this.totalDuration);const x=v/this.duration;let w=Math.floor(x),l=x%1;!l&&x>=1&&(l=1),l===1&&w--;const E=w%2;(g==="reverse"||g==="alternate"&&E||g==="alternate-reverse"&&!E)&&(l=1-l);const A=v>=this.totalDuration?1:Math.min(l,1),T=b(this.easing(A));e(T),this.pauseTime===void 0&&(this.playState==="finished"||v>=this.totalDuration+a)?(this.playState="finished",(r=this.resolve)===null||r===void 0||r.call(this,T)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},this.play()}play(){const e=performance.now();this.playState="running",this.pauseTime!==void 0?this.startTime=e-this.pauseTime:this.startTime||(this.startTime=e),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var e;this.playState="idle",this.frameRequestId!==void 0&&cancelAnimationFrame(this.frameRequestId),(e=this.reject)===null||e===void 0||e.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(e){this.duration=e,this.totalDuration=e*(this.repeat+1)}get currentTime(){return this.t}set currentTime(e){this.pauseTime!==void 0||this.rate===0?this.pauseTime=e:this.startTime=performance.now()-e/this.rate}get playbackRate(){return this.rate}set playbackRate(e){this.rate=e}}var B=function(){};process.env.NODE_ENV!=="production"&&(B=function(t,e){if(!t)throw new Error(e)});class qt{setAnimation(e){this.animation=e,e==null||e.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}const X=new WeakMap;function bt(t){return X.has(t)||X.set(t,{transforms:[],values:new Map}),X.get(t)}function Vt(t,e){return t.has(e)||t.set(e,new qt),t.get(e)}const kt=["","X","Y","Z"],Ut=["translate","scale","rotate","skew"],H={x:"translateX",y:"translateY",z:"translateZ"},ct={syntax:"",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},Bt={translate:{syntax:"",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:ct,scale:{syntax:"",initialValue:1,toDefaultUnit:_},skew:ct},V=new Map,it=t=>`--motion-${t}`,N=["x","y","z"];Ut.forEach(t=>{kt.forEach(e=>{N.push(t+e),V.set(it(t+e),Bt[t])})});const Ht=(t,e)=>N.indexOf(t)-N.indexOf(e),Nt=new Set(N),xt=t=>Nt.has(t),Kt=(t,e)=>{H[e]&&(e=H[e]);const{transforms:n}=bt(t);Dt(n,e),t.style.transform=Wt(n)},Wt=t=>t.sort(Ht).reduce(Xt,"").trim(),Xt=(t,e)=>`${t} ${e}(var(${it(e)}))`,J=t=>t.startsWith("--"),lt=new Set;function Yt(t){if(!lt.has(t)){lt.add(t);try{const{syntax:e,initialValue:n}=V.has(t)?V.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:n})}catch{}}}const Y=(t,e)=>document.createElement("div").animate(t,e),ut={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{Y({opacity:[1]})}catch{return!1}return!0},finished:()=>!!Y({opacity:[0,1]},{duration:.001}).finished,linearEasing:()=>{try{Y({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}},Z={},$={};for(const t in ut)$[t]=()=>(Z[t]===void 0&&(Z[t]=ut[t]()),Z[t]);const Zt=.015,Gt=(t,e)=>{let n="";const i=Math.round(e/Zt);for(let s=0;sz(t)?$.linearEasing()?`linear(${Gt(t,e)})`:L.easing:wt(t)?Jt(t):t,Jt=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`;function Qt(t,e){for(let n=0;nArray.isArray(t)?t:[t];function Q(t){return H[t]&&(t=H[t]),xt(t)?it(t):t}const k={get:(t,e)=>{e=Q(e);let n=J(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!n&&n!==0){const i=V.get(e);i&&(n=i.initialValue)}return n},set:(t,e,n)=>{e=Q(e),J(e)?t.style.setProperty(e,n):t.style[e]=n}};function At(t,e=!0){if(!(!t||t.playState==="finished"))try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch{}}function te(t,e){var n;let i=(e==null?void 0:e.toDefaultUnit)||_;const s=t[t.length-1];if(Et(s)){const c=((n=s.match(/(-?[\d.]+)([a-z%]*)/))===null||n===void 0?void 0:n[2])||"";c&&(i=a=>a+c)}return i}function ee(){return window.__MOTION_DEV_TOOLS_RECORD}function Ot(t,e,n,i={},s){const c=ee(),a=i.record!==!1&&c;let u,{duration:d=L.duration,delay:g=L.delay,endDelay:b=L.endDelay,repeat:h=L.repeat,easing:r=L.easing,persist:v=!1,direction:x,offset:w,allowWebkitAcceleration:l=!1}=i;const E=bt(t),A=xt(e);let T=$.waapi();A&&Kt(t,e);const S=Q(e),O=Vt(E.values,S),y=V.get(S);return At(O.animation,!(U(r)&&O.generator)&&i.record!==!1),()=>{const M=()=>{var p,o;return(o=(p=k.get(t,S))!==null&&p!==void 0?p:y==null?void 0:y.initialValue)!==null&&o!==void 0?o:0};let f=Qt(Tt(n),M);const D=te(f,y);if(U(r)){const p=r.createAnimation(f,e!=="opacity",M,S,O);r=p.easing,f=p.keyframes||f,d=p.duration||d}if(J(S)&&($.cssRegisterProperty()?Yt(S):T=!1),A&&!$.linearEasing()&&(z(r)||R(r)&&r.some(z))&&(T=!1),T){y&&(f=f.map(m=>q(m)?y.toDefaultUnit(m):m)),f.length===1&&(!$.partialKeyframes()||a)&&f.unshift(M());const p={delay:F.ms(g),duration:F.ms(d),endDelay:F.ms(b),easing:R(r)?void 0:ft(r,d),direction:x,iterations:h+1,fill:"both"};u=t.animate({[S]:f,offset:w,easing:R(r)?r.map(m=>ft(m,d)):void 0},p),u.finished||(u.finished=new Promise((m,P)=>{u.onfinish=m,u.oncancel=P}));const o=f[f.length-1];u.finished.then(()=>{v||(k.set(t,S,o),u.cancel())}).catch(yt),l||(u.playbackRate=1.000001)}else if(s&&A)f=f.map(p=>typeof p=="string"?parseFloat(p):p),f.length===1&&f.unshift(parseFloat(M())),u=new s(p=>{k.set(t,S,D?D(p):p)},f,Object.assign(Object.assign({},i),{duration:d,easing:r}));else{const p=f[f.length-1];k.set(t,S,y&&q(p)?y.toDefaultUnit(p):p)}return a&&c(t,e,f,{duration:d,delay:g,easing:r,repeat:h,offset:w},"motion-one"),O.setAnimation(u),u}}const Mt=(t,e)=>t[e]?Object.assign(Object.assign({},t),t[e]):Object.assign({},t);function Pt(t,e){var n;return typeof t=="string"?e?((n=e[t])!==null&&n!==void 0||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}const ne=t=>t(),st=(t,e,n=L.duration)=>new Proxy({animations:t.map(ne).filter(Boolean),duration:n,options:e},se),ie=t=>t.animations[0],se={get:(t,e)=>{const n=ie(t);switch(e){case"duration":return t.duration;case"currentTime":return F.s((n==null?void 0:n[e])||0);case"playbackRate":case"playState":return n==null?void 0:n[e];case"finished":return t.finished||(t.finished=Promise.all(t.animations.map(oe)).catch(yt)),t.finished;case"stop":return()=>{t.animations.forEach(i=>At(i))};case"forEachNative":return i=>{t.animations.forEach(s=>i(s,t))};default:return typeof(n==null?void 0:n[e])>"u"?void 0:()=>t.animations.forEach(i=>i[e]())}},set:(t,e,n)=>{switch(e){case"currentTime":n=F.ms(n);case"currentTime":case"playbackRate":for(let i=0;it.finished;function Lt(t,e,n){return z(t)?t(e,n):t}function re(t){return function(n,i,s={}){n=Pt(n);const c=n.length;B(!!c,"No valid element provided."),B(!!i,"No keyframes defined.");const a=[];for(let u=0;ue&&s.atOt(...c,nt)).filter(Boolean);return st(s,e,(n=i[0])===null||n===void 0?void 0:n[3].duration)}function de(t,e={}){var{defaultOptions:n={}}=e,i=ce(e,["defaultOptions"]);const s=[],c=new Map,a={},u=new Map;let d=0,g=0,b=0;for(let h=0;h1,"spring must be provided 2 keyframes within timeline()");const W=o.createAnimation(f,y!=="opacity",()=>0,y);o=W.easing,f=W.keyframes||f,p=W.duration||p}const m=Lt(w.delay,T,A)||0,P=g+m,I=P+p;let{offset:C=vt(f.length)}=D;C.length===1&&C[0]===0&&(C[1]=1);const ot=C.length-f.length;ot>0&&et(C,ot),f.length===1&&f.unshift(null),ue(M,f,o,C,P,I),l=Math.max(m+p,l),b=Math.max(I,b)}}d=g,g+=l}return c.forEach((h,r)=>{for(const v in h){const x=h[v];x.sort(fe);const w=[],l=[],E=[];for(let A=0;A{const n=new nt(t,[0,1],e);return n.finished.catch(()=>{}),n}],e,e.duration)}function ge(t,e,n){return(z(t)?pe:ae)(t,e,n)}function ye(){const t=document.querySelectorAll(".indicator__item"),e=document.querySelector(".indicator__cursor"),n=document.querySelector(".indicator"),i=document.querySelector(".pagination"),s=document.querySelector(".pagination__current"),c=document.querySelector(".pagination__total");let a=0;const u=[],d=t.length,g={horizontalClass:"pagination--horizontal"},b=l=>{const E=l.target,A=parseInt(E.dataset.index,10);h(A),r.call(null,u[0])};x(),n.addEventListener("click",b);function h(l){const E=t[0],A=E.clientHeight*1.5,T=E.clientHeight+E.clientHeight/1.8,S=Math.abs(a-l)+1,O=l-a,y=i.classList.contains(g.horizontalClass),M=T*S;a!==l&&(O>0?ht([[e,{[y?"width":"height"]:`${M}px`,borderRadius:`${M/2}px`},{duration:.2}],[e,{[y?"x":"y"]:l*T,[y?"width":"height"]:`${A}px`},{duration:.2}]]):ht([[e,{[y?"x":"y"]:l*T,[y?"width":"height"]:`${M}px`,borderRadius:`${M/2}px`},{duration:.2}],[e,{[y?"x":"y"]:l*T,[y?"width":"height"]:`${A}px`},{duration:.2}]]),a=l,x())}function r(l){if(u)for(const E of u)E(a);u.includes(l)||u.push(l)}function v(l){if(l==="vertical"){i.classList.remove(g.horizontalClass);return}i.classList.add(g.horizontalClass)}function x(){s.innerHTML=(a+1).toString(),c.innerHTML=d.toString()}function w(){n.removeEventListener("click",b)}return{paginate:h,onPaginate:r,changePosition:v,destroy:w}}function mt(t,e){let n=0;return function(...i){clearTimeout(n),n=window.setTimeout(()=>t.apply(this,i),e)}}function ve(t,e){let n=!1;return(...i)=>{n||(t(...i),n=!0,setTimeout(()=>{n=!1},e))}}function G(t,e,n){return Math.max(e,Math.min(t,n))}const we={animated:!0,triggerDistance:30,fixMobileBare:!0};function Ee(t={}){const e={...we,...t},{onPaginate:n,paginate:i,destroy:s}=ye(),c=document.querySelector(".fullslide"),a=Array.from(document.querySelectorAll(".fullslide__page"));let u=!1,d=0;const g=a.length-1,b={x:0,y:0},h={x:0,y:0},r={interact:[],start:[],stop:[],change:[]},v=o=>{const[m,P]=o instanceof MouseEvent?[o.clientX,o.clientY]:[o.touches[0].clientX,o.touches[0].clientY],I={x:m,y:P};b.x=I.x,b.y=I.y,h.x=I.x,h.y=I.y,M.call(null,r.start[0])},x=ve(o=>{if(o instanceof MouseEvent&&o.buttons!==1)return;const[m,P]=o instanceof MouseEvent?[o.clientX,o.clientY]:[o.touches[0].clientX,o.touches[0].clientY];A({x:m,y:P})},10),w=()=>{u=!1,O(d),f.call(null,r.stop[0])},l=mt(o=>{M.call(null,r.start[0]);const m={ArrowUp:-1,ArrowDown:1},P=o instanceof WheelEvent?Math.sign(o.deltaY):m[o.key]??0;o instanceof KeyboardEvent&&P===0||(O(P,!0),f.call(0,r.stop[0]))},50),E=mt(()=>{c.style.height=`${window.innerHeight}px`,c.style.width=`${window.innerWidth}px`,O(d)},100);window.addEventListener("touchend",w),window.addEventListener("touchmove",x),window.addEventListener("touchstart",v),window.addEventListener("mousedown",v),window.addEventListener("mouseup",w),window.addEventListener("mousemove",x),window.addEventListener("resize",E),document.addEventListener("wheel",l),document.addEventListener("keydown",l),E(),T();function A(o){if(u)return;const m=o.y-b.y;for(const P of a)P.style.transform=`translate(0, ${m+-(window.innerHeight*d)}px)`;Math.round(Math.abs(m)/window.innerHeight*100)>=e.triggerDistance&&(O(m>0?-1:1,!0),u=!0),D.call(null,r.interact[0]),h.x=o.x,h.y=o.y}function T(){e.fixMobileBare&&(document.body.classList.add("fullslide-body"),document.querySelector("html").classList.add("fullslide-html"))}function S(){const o=Math.sign(h.y-b.y);return{pages:a,current:a[d],next:a[G(d-o,0,g)],page:d,distance:h.y-b.y,percentage:Math.round(Math.abs(h.y)/window.innerHeight*100)}}n(o=>{O(o)});function O(o,m=!1){const P=d===o;m?d=G(d+o,0,g):d=G(o,0,g),e.animated&&ge(a,{transform:`translate(0, -${window.innerHeight*d}px)`},{easing:"ease",duration:.3}),P||p.call(0,r.change[0]),i(d)}function y(){window.removeEventListener("touchend",w),window.removeEventListener("touchmove",x),window.removeEventListener("touchstart",v),window.removeEventListener("mousedown",v),window.removeEventListener("mouseup",w),window.removeEventListener("mousemove",x),window.removeEventListener("resize",E),document.removeEventListener("wheel",l),document.removeEventListener("keydown",l),s()}function M(o){if(r.start)for(const m of r.start)m(S());o&&!r.start.includes(o)&&r.start.push(o)}function f(o){if(r.stop)for(const m of r.stop)m(S());o&&!r.stop.includes(o)&&r.stop.push(o)}function D(o){if(r.interact)for(const m of r.interact)m(S());o&&!r.interact.includes(o)&&r.interact.push(o)}function p(o){if(r.change)for(const m of r.change)m(S());o&&!r.change.includes(o)&&r.change.push(o)}return{changePage:O,destroy:y,onPaginate:n,onInteractionStart:M,onInteractionStop:f,onInteract:D,onPageChanged:p}}module.exports=Ee;