vevet 5.0.1 → 5.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -11
- package/lib/cdn/vevet.iife.min.js +183 -0
- package/lib/cjs/components/Preloader/index.js +1 -2
- package/lib/cjs/components/Preloader/index.js.map +1 -1
- package/lib/cjs/components/ProgressPreloader/index.js +1 -4
- package/lib/cjs/components/ProgressPreloader/index.js.map +1 -1
- package/lib/cjs/components/Snap/Slide/index.js +47 -7
- package/lib/cjs/components/Snap/Slide/index.js.map +1 -1
- package/lib/cjs/components/Snap/Swipe/index.js +14 -3
- package/lib/cjs/components/Snap/Swipe/index.js.map +1 -1
- package/lib/cjs/components/Snap/Track/index.js +13 -5
- package/lib/cjs/components/Snap/Track/index.js.map +1 -1
- package/lib/cjs/components/Snap/index.js +68 -76
- package/lib/cjs/components/Snap/index.js.map +1 -1
- package/lib/cjs/components/Timeline/index.js +2 -1
- package/lib/cjs/components/Timeline/index.js.map +1 -1
- package/lib/cjs/core/handlers/createViewport/index.js +21 -7
- package/lib/cjs/core/handlers/createViewport/index.js.map +1 -1
- package/lib/cjs/core/index.js +4 -3
- package/lib/cjs/core/index.js.map +1 -1
- package/lib/cjs/core/scripts/presetCssVars.js +1 -1
- package/lib/cjs/core/scripts/presetCssVars.js.map +1 -1
- package/lib/cjs/index.js +2 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/utils/math/easing.js +3 -0
- package/lib/cjs/utils/math/easing.js.map +1 -1
- package/lib/cjs/version.js +1 -1
- package/lib/esm/components/Preloader/index.js +1 -2
- package/lib/esm/components/Preloader/index.js.map +1 -1
- package/lib/esm/components/ProgressPreloader/index.js +2 -5
- package/lib/esm/components/ProgressPreloader/index.js.map +1 -1
- package/lib/esm/components/Snap/Slide/index.js +44 -8
- package/lib/esm/components/Snap/Slide/index.js.map +1 -1
- package/lib/esm/components/Snap/Swipe/index.js +14 -3
- package/lib/esm/components/Snap/Swipe/index.js.map +1 -1
- package/lib/esm/components/Snap/Track/index.js +9 -5
- package/lib/esm/components/Snap/Track/index.js.map +1 -1
- package/lib/esm/components/Snap/index.js +55 -72
- package/lib/esm/components/Snap/index.js.map +1 -1
- package/lib/esm/components/Timeline/index.js +2 -1
- package/lib/esm/components/Timeline/index.js.map +1 -1
- package/lib/esm/core/handlers/createViewport/index.js +21 -6
- package/lib/esm/core/handlers/createViewport/index.js.map +1 -1
- package/lib/esm/core/index.js +4 -3
- package/lib/esm/core/index.js.map +1 -1
- package/lib/esm/core/scripts/presetCssVars.js +6 -1
- package/lib/esm/core/scripts/presetCssVars.js.map +1 -1
- package/lib/esm/index.js +1 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/utils/math/easing.js +2 -1
- package/lib/esm/utils/math/easing.js.map +1 -1
- package/lib/esm/version.js +1 -1
- package/lib/styles/index.scss +1 -1
- package/lib/types/components/Preloader/index.d.ts.map +1 -1
- package/lib/types/components/ProgressPreloader/index.d.ts.map +1 -1
- package/lib/types/components/Snap/Slide/index.d.ts +11 -7
- package/lib/types/components/Snap/Slide/index.d.ts.map +1 -1
- package/lib/types/components/Snap/Slide/types.d.ts +1 -1
- package/lib/types/components/Snap/Swipe/index.d.ts.map +1 -1
- package/lib/types/components/Snap/Track/index.d.ts +2 -0
- package/lib/types/components/Snap/Track/index.d.ts.map +1 -1
- package/lib/types/components/Snap/index.d.ts +7 -3
- package/lib/types/components/Snap/index.d.ts.map +1 -1
- package/lib/types/components/Snap/types.d.ts +4 -6
- package/lib/types/components/Snap/types.d.ts.map +1 -1
- package/lib/types/components/Timeline/index.d.ts.map +1 -1
- package/lib/types/core/global.d.ts +9 -7
- package/lib/types/core/global.d.ts.map +1 -1
- package/lib/types/core/handlers/createViewport/index.d.ts.map +1 -1
- package/lib/types/core/handlers/createViewport/types.d.ts +16 -8
- package/lib/types/core/handlers/createViewport/types.d.ts.map +1 -1
- package/lib/types/core/index.d.ts.map +1 -1
- package/lib/types/core/scripts/presetCssVars.d.ts +1 -1
- package/lib/types/core/scripts/presetCssVars.d.ts.map +1 -1
- package/lib/types/core/types.d.ts +8 -2
- package/lib/types/core/types.d.ts.map +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/utils/math/easing.d.ts.map +1 -1
- package/lib/types/version.d.ts +1 -1
- package/package.json +6 -2
- package/src/components/Preloader/index.ts +1 -2
- package/src/components/ProgressPreloader/index.ts +2 -5
- package/src/components/Snap/Slide/index.ts +58 -16
- package/src/components/Snap/Slide/types.ts +1 -1
- package/src/components/Snap/Swipe/index.ts +14 -5
- package/src/components/Snap/Track/index.ts +12 -6
- package/src/components/Snap/index.ts +75 -87
- package/src/components/Snap/types.ts +4 -6
- package/src/components/Timeline/index.ts +2 -1
- package/src/core/global.ts +14 -12
- package/src/core/handlers/createViewport/index.ts +23 -6
- package/src/core/handlers/createViewport/types.ts +18 -8
- package/src/core/index.ts +4 -3
- package/src/core/scripts/presetCssVars.ts +6 -1
- package/src/core/types.ts +10 -2
- package/src/index.ts +2 -0
- package/src/styles/index.scss +1 -1
- package/src/utils/math/easing.ts +5 -2
- package/src/version.ts +1 -1
package/README.md
CHANGED
|
@@ -2,21 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
The primary goal of Vevet is to simplify the creation of interactive components from scratch — be it text animations, carousels, or other interactive elements.
|
|
4
4
|
|
|
5
|
-
 
|
|
6
|
-
|
|
7
5
|
### [Documentation ↗](https://antonbobrov.github.io/vevet/)
|
|
8
6
|
|
|
9
|
-
##
|
|
7
|
+
## NPM Usage
|
|
10
8
|
|
|
11
9
|
```bash
|
|
12
10
|
npm install vevet
|
|
13
11
|
```
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
### JavaScript Usage
|
|
18
|
-
|
|
19
|
-
Explore more in the **[documentation](https://antonbobrov.github.io/vevet/docs/vevet/features)**.
|
|
13
|
+
JavaScript:
|
|
20
14
|
|
|
21
15
|
```ts
|
|
22
16
|
import { vevet } from 'vevet';
|
|
@@ -24,14 +18,24 @@ import { vevet } from 'vevet';
|
|
|
24
18
|
console.log(vevet.version); // => 5.0.0
|
|
25
19
|
```
|
|
26
20
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
Find additional details in the **[documentation](https://antonbobrov.github.io/vevet/docs/vevet/scss)**.
|
|
21
|
+
SCSS:
|
|
30
22
|
|
|
31
23
|
```scss
|
|
32
24
|
@import '~vevet/lib/styles/index';
|
|
33
25
|
```
|
|
34
26
|
|
|
27
|
+
## CDN Usage
|
|
28
|
+
|
|
29
|
+
```html
|
|
30
|
+
<script src="
|
|
31
|
+
https://cdn.jsdelivr.net/npm/vevet@5/lib/cdn/vevet.iife.min.js
|
|
32
|
+
"></script>
|
|
33
|
+
|
|
34
|
+
<script>
|
|
35
|
+
console.log(Vevet.app.version); // => 5.0.0
|
|
36
|
+
</script>
|
|
37
|
+
```
|
|
38
|
+
|
|
35
39
|
## Components
|
|
36
40
|
|
|
37
41
|
- **[Canvas](https://antonbobrov.github.io/vevet/docs/components/Canvas/)** simplifies working with an HTML5 Canvas element and its 2D rendering context.
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
"use strict";var Vevet=(()=>{var Ks=Object.create;var Z=Object.defineProperty;var Js=Object.getOwnPropertyDescriptor;var Zs=Object.getOwnPropertyNames;var ei=Object.getPrototypeOf,ti=Object.prototype.hasOwnProperty;var W=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports),si=(s,e)=>{for(var t in e)Z(s,t,{get:e[t],enumerable:!0})},_t=(s,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Zs(e))!ti.call(s,r)&&r!==t&&Z(s,r,{get:()=>e[r],enumerable:!(i=Js(e,r))||i.enumerable});return s};var gt=(s,e,t)=>(t=s!=null?Ks(ei(s)):{},_t(e||!s||!s.__esModule?Z(t,"default",{value:s,enumerable:!0}):t,s)),ii=s=>_t(Z({},"__esModule",{value:!0}),s);var $t=W((Ar,Vt)=>{var Rt=!1,N,me,_e,se,ie,Bt,re,ge,be,ve,Dt,we,ye,jt,Wt;function x(){if(!Rt){Rt=!0;var s=navigator.userAgent,e=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(s),t=/(Mac OS X)|(Windows)|(Linux)/.exec(s);if(we=/\b(iPhone|iP[ao]d)/.exec(s),ye=/\b(iP[ao]d)/.exec(s),ve=/Android/i.exec(s),jt=/FBAN\/\w+;/i.exec(s),Wt=/Mobile/i.exec(s),Dt=!!/Win64/.exec(s),e){N=e[1]?parseFloat(e[1]):e[5]?parseFloat(e[5]):NaN,N&&document&&document.documentMode&&(N=document.documentMode);var i=/(?:Trident\/(\d+.\d+))/.exec(s);Bt=i?parseFloat(i[1])+4:N,me=e[2]?parseFloat(e[2]):NaN,_e=e[3]?parseFloat(e[3]):NaN,se=e[4]?parseFloat(e[4]):NaN,se?(e=/(?:Chrome\/(\d+\.\d+))/.exec(s),ie=e&&e[1]?parseFloat(e[1]):NaN):ie=NaN}else N=me=_e=ie=se=NaN;if(t){if(t[1]){var r=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(s);re=r?parseFloat(r[1].replace("_",".")):!0}else re=!1;ge=!!t[2],be=!!t[3]}else re=ge=be=!1}}var xe={ie:function(){return x()||N},ieCompatibilityMode:function(){return x()||Bt>N},ie64:function(){return xe.ie()&&Dt},firefox:function(){return x()||me},opera:function(){return x()||_e},webkit:function(){return x()||se},safari:function(){return xe.webkit()},chrome:function(){return x()||ie},windows:function(){return x()||ge},osx:function(){return x()||re},linux:function(){return x()||be},iphone:function(){return x()||we},mobile:function(){return x()||we||ye||ve||Wt},nativeApp:function(){return x()||jt},android:function(){return x()||ve},ipad:function(){return x()||ye}};Vt.exports=xe});var Ht=W((Nr,Ft)=>{"use strict";var ne=!!(typeof window!="undefined"&&window.document&&window.document.createElement),wi={canUseDOM:ne,canUseWorkers:typeof Worker!="undefined",canUseEventListeners:ne&&!!(window.addEventListener||window.attachEvent),canUseViewport:ne&&!!window.screen,isInWorker:!ne};Ft.exports=wi});var qt=W((Rr,Qt)=>{"use strict";var Xt=Ht(),Ut;Xt.canUseDOM&&(Ut=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function yi(s,e){if(!Xt.canUseDOM||e&&!("addEventListener"in document))return!1;var t="on"+s,i=t in document;if(!i){var r=document.createElement("div");r.setAttribute(t,"return;"),i=typeof r[t]=="function"}return!i&&Ut&&s==="wheel"&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}Qt.exports=yi});var es=W((Br,Zt)=>{"use strict";var xi=$t(),Ei=qt(),Yt=10,Gt=40,Kt=800;function Jt(s){var e=0,t=0,i=0,r=0;return"detail"in s&&(t=s.detail),"wheelDelta"in s&&(t=-s.wheelDelta/120),"wheelDeltaY"in s&&(t=-s.wheelDeltaY/120),"wheelDeltaX"in s&&(e=-s.wheelDeltaX/120),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(e=t,t=0),i=e*Yt,r=t*Yt,"deltaY"in s&&(r=s.deltaY),"deltaX"in s&&(i=s.deltaX),(i||r)&&s.deltaMode&&(s.deltaMode==1?(i*=Gt,r*=Gt):(i*=Kt,r*=Kt)),i&&!e&&(e=i<1?-1:1),r&&!t&&(t=r<1?-1:1),{spinX:e,spinY:t,pixelX:i,pixelY:r}}Jt.getEventType=function(){return xi.firefox()?"DOMMouseScroll":Ei("wheel")?"wheel":"mousewheel"};Zt.exports=Jt});var ss=W((Dr,ts)=>{ts.exports=es()});var Vs=W((J,Q)=>{var Ri=1/0,Is=9007199254740991,Bi=4294967295,Di="[object Function]",ji="[object GeneratorFunction]",Wi="[object RegExp]",Vi="[object Symbol]",$i=/^(?:0|[1-9]\d*)$/,pt="\\ud800-\\udfff",Cs="\\u0300-\\u036f\\ufe20-\\ufe23",Ts="\\u20d0-\\u20f0",Ps="\\ufe0e\\ufe0f",Fi="["+pt+"]",lt="["+Cs+Ts+"]",dt="\\ud83c[\\udffb-\\udfff]",Hi="(?:"+lt+"|"+dt+")",ks="[^"+pt+"]",zs="(?:\\ud83c[\\udde6-\\uddff]){2}",Ls="[\\ud800-\\udbff][\\udc00-\\udfff]",As="\\u200d",Ns=Hi+"?",Rs="["+Ps+"]?",Xi="(?:"+As+"(?:"+[ks,zs,Ls].join("|")+")"+Rs+Ns+")*",Ui=Rs+Ns+Xi,Qi="(?:"+[ks+lt+"?",lt,zs,Ls,Fi].join("|")+")",qi=RegExp(dt+"(?="+dt+")|"+Qi+Ui,"g"),Yi=RegExp("["+As+pt+Cs+Ts+Ps+"]"),Bs=typeof global=="object"&&global&&global.Object===Object&&global,Gi=typeof self=="object"&&self&&self.Object===Object&&self,Ki=Bs||Gi||Function("return this")(),Ds=typeof J=="object"&&J&&!J.nodeType&&J,ws=Ds&&typeof Q=="object"&&Q&&!Q.nodeType&&Q,Ji=ws&&ws.exports===Ds,ys=Ji&&Bs.process,xs=function(){try{return ys&&ys.binding("util")}catch(s){}}(),Es=xs&&xs.isRegExp;function Zi(s){return s.split("")}function er(s){return function(e){return s(e)}}function js(s){return Yi.test(s)}function tr(s){return js(s)?sr(s):Zi(s)}function sr(s){return s.match(qi)||[]}var ir=Object.prototype,ut=ir.toString,Ss=Ki.Symbol,Ms=Ss?Ss.prototype:void 0,Os=Ms?Ms.toString:void 0;function rr(s){return ft(s)&&ut.call(s)==Wi}function nr(s,e,t){var i=-1,r=s.length;e<0&&(e=-e>r?0:r+e),t=t>r?r:t,t<0&&(t+=r),r=e>t?0:t-e>>>0,e>>>=0;for(var n=Array(r);++i<r;)n[i]=s[i+e];return n}function Ws(s){if(typeof s=="string")return s;if(mr(s))return Os?Os.call(s):"";var e=s+"";return e=="0"&&1/s==-Ri?"-0":e}function or(s,e,t){var i=s.length;return t=t===void 0?i:t,!e&&t>=i?s:nr(s,e,t)}function ar(s,e){return e=e==null?Is:e,!!e&&(typeof s=="number"||$i.test(s))&&s>-1&&s%1==0&&s<e}function hr(s,e,t){if(!ft(t))return!1;var i=typeof e;return(i=="number"?lr(t)&&ar(e,t.length):i=="string"&&e in t)?cr(t[e],s):!1}function cr(s,e){return s===e||s!==s&&e!==e}function lr(s){return s!=null&&pr(s.length)&&!dr(s)}function dr(s){var e=ft(s)?ut.call(s):"";return e==Di||e==ji}function pr(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=Is}function ft(s){var e=typeof s;return!!s&&(e=="object"||e=="function")}function ur(s){return!!s&&typeof s=="object"}var fr=Es?er(Es):rr;function mr(s){return typeof s=="symbol"||ur(s)&&ut.call(s)==Vi}function _r(s){return s==null?"":Ws(s)}function gr(s,e,t){return t&&typeof t!="number"&&hr(s,e,t)&&(e=t=void 0),t=t===void 0?Bi:t>>>0,t?(s=_r(s),s&&(typeof e=="string"||e!=null&&!fr(e))&&(e=Ws(e),!e&&js(s))?or(tr(s),0,t):s.split(e,t)):[]}Q.exports=gr});var vr={};si(vr,{Callbacks:()=>k,Canvas:()=>$,CanvasMedia:()=>st,Cursor:()=>it,EaseInBack:()=>Me,EaseInBounce:()=>Oe,EaseInCirc:()=>Ie,EaseInCubic:()=>Ce,EaseInElastic:()=>Te,EaseInExpo:()=>Pe,EaseInOutBack:()=>ke,EaseInOutBounce:()=>ze,EaseInOutCirc:()=>Le,EaseInOutCubic:()=>Ae,EaseInOutElastic:()=>Ne,EaseInOutExpo:()=>Re,EaseInOutQuad:()=>Be,EaseInOutQuart:()=>De,EaseInOutQuint:()=>je,EaseInOutSine:()=>We,EaseInQuad:()=>Ve,EaseInQuart:()=>$e,EaseInQuint:()=>Fe,EaseInSine:()=>He,EaseOutBack:()=>Xe,EaseOutBounce:()=>L,EaseOutCirc:()=>Ue,EaseOutCubic:()=>R,EaseOutElastic:()=>Qe,EaseOutExpo:()=>qe,EaseOutQuad:()=>Ye,EaseOutQuart:()=>Ge,EaseOutQuint:()=>Ke,EaseOutSine:()=>Je,InView:()=>rt,Marquee:()=>nt,Module:()=>m,Pointers:()=>G,Preloader:()=>K,ProgressPreloader:()=>ot,Raf:()=>I,Responsive:()=>tt,ScrollProgress:()=>ht,Scrollbar:()=>at,Snap:()=>ct,SnapSlide:()=>U,SplitText:()=>mt,Swipe:()=>D,Timeline:()=>C,addEventListener:()=>f,app:()=>br,clamp:()=>b,clampScope:()=>oe,damp:()=>Se,easing:()=>Ze,inRange:()=>et,initVevet:()=>d,lerp:()=>M,loop:()=>O,normalizeWheel:()=>Ee,onResize:()=>S,presetCssVars:()=>as,scoped:()=>z,toPixels:()=>E,uid:()=>Y,vevet:()=>Gs});var bt=function(s,e,t){if(t||arguments.length===2)for(var i=0,r=e.length,n;i<r;i++)(n||!(i in e))&&(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return s.concat(n||Array.prototype.slice.call(e))},ri=function(){function s(e,t,i){this.name=e,this.version=t,this.os=i,this.type="browser"}return s}();var ni=function(){function s(e){this.version=e,this.type="node",this.name="node",this.os=process.platform}return s}();var oi=function(){function s(e,t,i,r){this.name=e,this.version=t,this.os=i,this.bot=r,this.type="bot-device"}return s}();var ai=function(){function s(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return s}();var hi=function(){function s(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return s}();var ci=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,li=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,vt=3,di=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",ci]],wt=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function xt(s){return s?yt(s):typeof document=="undefined"&&typeof navigator!="undefined"&&navigator.product==="ReactNative"?new hi:typeof navigator!="undefined"?yt(navigator.userAgent):fi()}function pi(s){return s!==""&&di.reduce(function(e,t){var i=t[0],r=t[1];if(e)return e;var n=r.exec(s);return!!n&&[i,n]},!1)}function yt(s){var e=pi(s);if(!e)return null;var t=e[0],i=e[1];if(t==="searchbot")return new ai;var r=i[1]&&i[1].split(".").join("_").split("_").slice(0,3);r?r.length<vt&&(r=bt(bt([],r,!0),mi(vt-r.length),!0)):r=[];var n=r.join("."),o=ui(s),h=li.exec(s);return h&&h[1]?new oi(t,n,o,h[1]):new ri(t,n,o)}function ui(s){for(var e=0,t=wt.length;e<t;e++){var i=wt[e],r=i[0],n=i[1],o=n.exec(s);if(o)return r}return null}function fi(){var s=typeof process!="undefined"&&process.version;return s?new ni(process.version.slice(1)):null}function mi(s){for(var e=[],t=0;t<s;t++)e.push("0");return e}var ue=/iPhone/i,Et=/iPod/i,St=/iPad/i,Mt=/\biOS-universal(?:.+)Mac\b/i,fe=/\bAndroid(?:.+)Mobile\b/i,Ot=/Android/i,V=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,ee=/Silk/i,P=/Windows Phone/i,It=/\bWindows(?:.+)ARM\b/i,Ct=/BlackBerry/i,Tt=/BB10/i,Pt=/Opera Mini/i,kt=/\b(CriOS|Chrome)(?:.+)Mobile/i,zt=/Mobile(?:.+)Firefox\b/i,Lt=function(s){return typeof s!="undefined"&&s.platform==="MacIntel"&&typeof s.maxTouchPoints=="number"&&s.maxTouchPoints>1&&typeof MSStream=="undefined"};function _i(s){return function(e){return e.test(s)}}function te(s){var e={userAgent:"",platform:"",maxTouchPoints:0};!s&&typeof navigator!="undefined"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof s=="string"?e.userAgent=s:s&&s.userAgent&&(e={userAgent:s.userAgent,platform:s.platform,maxTouchPoints:s.maxTouchPoints||0});var t=e.userAgent,i=t.split("[FBAN");typeof i[1]!="undefined"&&(t=i[0]),i=t.split("Twitter"),typeof i[1]!="undefined"&&(t=i[0]);var r=_i(t),n={apple:{phone:r(ue)&&!r(P),ipod:r(Et),tablet:!r(ue)&&(r(St)||Lt(e))&&!r(P),universal:r(Mt),device:(r(ue)||r(Et)||r(St)||r(Mt)||Lt(e))&&!r(P)},amazon:{phone:r(V),tablet:!r(V)&&r(ee),device:r(V)||r(ee)},android:{phone:!r(P)&&r(V)||!r(P)&&r(fe),tablet:!r(P)&&!r(V)&&!r(fe)&&(r(ee)||r(Ot)),device:!r(P)&&(r(V)||r(ee)||r(fe)||r(Ot))||r(/\bokhttp\b/i)},windows:{phone:r(P),tablet:r(It),device:r(P)||r(It)},other:{blackberry:r(Ct),blackberry10:r(Tt),opera:r(Pt),firefox:r(zt),chrome:r(kt),device:r(Ct)||r(Tt)||r(Pt)||r(zt)||r(kt)},any:!1,phone:!1,tablet:!1};return n.any=n.apple.device||n.android.device||n.windows.device||n.other.device,n.phone=n.apple.phone||n.android.phone||n.windows.phone,n.tablet=n.apple.tablet||n.android.tablet||n.windows.tablet,n}var gi="5.0.2",At=gi;var Nt=0;function Y(s="id"){return Nt+=1,`${s}_${Nt}`}var bi=typeof window!="undefined";function E(s){if(!bi)return 0;let e=d();if(window.vevet5_toPixelsCache||(window.vevet5_toPixelsCache=new Map,e.onViewport("any",()=>{window.vevet5_toPixelsCache.clear()},{name:"toPixels"})),window.vevet5_toPixelsCache.has(s))return window.vevet5_toPixelsCache.get(s);let t=0,i=parseFloat(`${s}`);return typeof s=="number"?t=s:Number.isNaN(i)?t=0:s.includes("rem")?t=i*e.rem:s.includes("vw")?t=i*e.vw:s.includes("vh")?t=i*e.vh:s.includes("svh")&&(t=i*e.svh),window.vevet5_toPixelsCache.set(s,t),t}var vi=function(s,e){var t={};for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&e.indexOf(i)<0&&(t[i]=s[i]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(s);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(s,i[r])&&(t[i[r]]=s[i[r]]);return t},k=class{constructor(){this._list=[]}get list(){return this._list}add(e,t,i={}){let r=Y("callback");return this._list.push(Object.assign(Object.assign({},i),{id:r,target:e,action:t})),{id:r,remove:()=>this.remove(r)}}on(e,t,i={}){let r=this.add(e,t,i);return()=>{r.remove()}}remove(e){return this._remove(e)}_remove(e,t=!1){return this._list=this._list.filter(r=>!!(r.id!==e||r.protected&&!t)),!this._list.some(({id:r})=>r===e)}_removeAll(){for(;this._list.length>0;)this._remove(this._list[0].id,!0)}_callAction(e,t){var{id:i,timeout:r,action:n}=e,o=vi(e,["id","timeout","action"]);r?setTimeout(()=>n(t),r):n(t),o.once&&this._remove(i,!0)}emit(e,t){this._list.forEach(i=>{i.target===e&&this._callAction(i,t)})}destroy(){this._removeAll()}};function f(s,e,t,i){return s.addEventListener(e,t,i),()=>{s.removeEventListener(e,t,i)}}var is=gt(ss());function Ee(s){return(0,is.default)(s)}function S({callback:s,element:e,viewportTarget:t,resizeDebounce:i=0,name:r}){let n=d(),o,h,c=!0,a,u=l=>{o&&(clearTimeout(o),o=void 0),o=setTimeout(()=>s(),l!=null?l:i)};return e&&(h=new ResizeObserver(()=>{if(c){c=!1;return}u(n.props.resizeDebounce+i)}),(Array.isArray(e)?e:[e]).forEach(l=>{h==null||h.observe(l)})),t&&(a=n.onViewport(t,()=>u(),{name:r})),{remove:()=>{o&&clearTimeout(o),h==null||h.disconnect(),a==null||a()},resize:()=>s(),debounceResize:()=>u()}}function rs({prefix:s,applyClassNames:e}){let t=new k,i=!1;document.readyState==="complete"?setTimeout(()=>r(),0):f(window,"load",()=>r());function r(){let o=document.documentElement,{body:h}=document;i=!0,e&&(o.classList.remove(`${s}loading`),h.classList.remove(`${s}loading`),o.classList.add(`${s}loaded`)),t.emit("loaded",void 0)}function n(o){return i?(o(),()=>{}):t.on("loaded",()=>o())}return{onLoad:n,getIsLoaded:()=>i}}function ns({prefix:s,props:e,isMobile:t}){let i=document.documentElement,r=document.getElementById("vevet_css_preset");r||(r=document.createElement("style"),r.id="vevet_css_preset",document.body.appendChild(r));let n=window.matchMedia(`(min-width: ${e.md+.001}px)`),o=window.matchMedia(`(min-width: ${e.sm+.001}px) and (max-width: ${e.md}px)`),h=window.matchMedia(`(max-width: ${e.sm}px)`),c=new k,a={width:0,height:0,sHeight:0,vw:0,vh:0,svh:0,scrollbarWidth:0,rem:16,landscape:!1,portrait:!1,dpr:window.devicePixelRatio,lowerDpr:window.devicePixelRatio,sm:!0,md:!1,lg:!1};_(),T(),j();let u;function l(){u&&(clearTimeout(u),u=void 0),e.resizeDebounce?u=setTimeout(()=>g(),e.resizeDebounce):g()}f(window,"resize",()=>l());let p=new ResizeObserver(()=>l());p.observe(document.documentElement),p.observe(document.body);function g(){let{width:y,height:v}=a;_(),T(),j();let{width:A,height:q}=a;c.emit("trigger",void 0),(A!==y||q!==v)&&c.emit("any",void 0),A!==y&&q===v&&c.emit("widthOnly",void 0),q!==v&&A===y&&c.emit("heightOnly",void 0),A!==y&&q!==v&&c.emit("both",void 0),A!==y&&c.emit("width",void 0),q!==v&&c.emit("height",void 0)}function _(){let{width:y}=a,v=document.documentElement,A=getComputedStyle(v);a.width=window.innerWidth,a.height=window.innerHeight,a.scrollbarWidth=window.innerWidth-v.clientWidth,a.vw=a.width/100,a.vh=a.height/100,a.rem=parseFloat(A.fontSize),a.landscape=a.width>a.height,a.portrait=a.width<a.height,a.dpr=window.devicePixelRatio,a.lowerDpr=t?Math.min(a.dpr,2):1,a.sm=!1,a.md=!1,a.lg=!1,h.matches?a.sm=!0:o.matches?a.md=!0:n.matches&&(a.lg=!0),(y!==a.width||!a.sHeight||!t)&&(a.sHeight=v.clientHeight,a.svh=a.sHeight/100)}function T(){e.applyClassNames&&(i.classList.toggle(`${s}lg`,a.lg),i.classList.toggle(`${s}md`,a.md),i.classList.toggle(`${s}sm`,a.sm),i.classList.toggle(`${s}landscape`,a.landscape),i.classList.toggle(`${s}portrait`,a.portrait))}function j(){r.innerHTML=`
|
|
2
|
+
html {
|
|
3
|
+
--vw: ${a.vw}px;
|
|
4
|
+
--vh: ${a.vh}px;
|
|
5
|
+
--svh: ${a.svh}px;
|
|
6
|
+
--scrollbar-width: ${a.scrollbarWidth}px;
|
|
7
|
+
}
|
|
8
|
+
`}return{data:a,callbacks:c}}function os(s){var e;let i=Object.assign(Object.assign({},{md:1199,sm:999,resizeDebounce:0,easing:[.25,.1,.25,1],applyClassNames:!1}),s),r="v-",n=xt(),o=te(),h=(e=(n==null?void 0:n.os)||"")===null||e===void 0?void 0:e.split(" ")[0].toLowerCase(),c=((n==null?void 0:n.name)||"").toLowerCase(),a=o.phone||o.tablet,u=rs({prefix:r,applyClassNames:i.applyClassNames}),l=ns({prefix:r,props:i,isMobile:a}),p=Object.assign(Object.assign({},l.data),{viewportCallbacks:l.callbacks,version:At,props:i,prefix:r,phone:o.phone,tablet:o.tablet,mobile:a,osName:h,browserName:c,doc:document,html:document.documentElement,body:document.body,loaded:!1,onLoad:u.onLoad,onViewport:(...g)=>l.callbacks.on(...g)});return u.onLoad(()=>{p.loaded=!0}),l.callbacks.add("trigger",()=>{Object.keys(l.data).forEach(_=>{p[_]=l.data[_]})},{protected:!0,name:"vevet core"}),function(){if(!i.applyClassNames)return;let{html:_}=p;_.classList.add(`${r}os-${h}`),_.classList.add(`${r}browser-${c}`),_.classList.toggle(`${r}phone`,p.phone),_.classList.toggle(`${r}tablet`,p.tablet),_.classList.toggle(`${r}mobile`,p.mobile)}(),p}function d(){var s;if(window.vevet5)return window.vevet5;let e=(s=window.VEVET_PROPS)!==null&&s!==void 0?s:{},t=os(e);return window.vevet5=t,window.vevet5}typeof window!="undefined"&&(window.vevet5=d());var as=`var presetVevetCss = function update() {
|
|
9
|
+
if (window.vevet5) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
var doc = document.documentElement;
|
|
14
|
+
|
|
15
|
+
var styles = document.createElement('style');
|
|
16
|
+
styles.id = 'vevet_css_preset';
|
|
17
|
+
document.body.appendChild(styles);
|
|
18
|
+
|
|
19
|
+
var w = window.innerWidth;
|
|
20
|
+
var h = window.innerHeight;
|
|
21
|
+
var sh = doc.clientHeight;
|
|
22
|
+
var scrollbarWidth = window.innerWidth - doc.clientWidth;
|
|
23
|
+
|
|
24
|
+
styles.innerHTML = 'html { --vw: ' + w / 100 + 'px; --vh: ' + h / 100 + 'px; --svh: ' + sh / 100 + 'px; --scrollbar-width: ' + scrollbarWidth + 'px; }';
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
window.addEventListener('resize', presetVevetCss);
|
|
28
|
+
|
|
29
|
+
var presetVevetCssObserver = new ResizeObserver(presetVevetCss);
|
|
30
|
+
presetVevetCssObserver.observe(document.documentElement);
|
|
31
|
+
presetVevetCssObserver.observe(document.body);
|
|
32
|
+
|
|
33
|
+
presetVevetCss();`;function b(s,e=0,t=1){return Math.max(e,Math.min(s,t))}function z(s,e=0,t=1){return(s-e)/(t-e)}function oe(s,e=[0,1],t=[0,1]){let i=z(s,e[0],e[1]);return b(i,t[0],t[1])}function M(s,e,t,i=0){let r=s+(e-s)*t;return Math.abs(e-r)<=i?e:r}function Se(s,e,t,i,r=0){return M(s,e,1-Math.exp(-t*60*(i/1e3)),r)}var Me=s=>2.70158*s*s*s-1.70158*s*s;var L=s=>s<.36363636363636365?7.5625*s*s:s<.7272727272727273?7.5625*(s-=.5454545454545454)*s+.75:s<.9090909090909091?7.5625*(s-=.8181818181818182)*s+.9375:7.5625*(s-=.9545454545454546)*s+.984375;var Oe=s=>1-L(1-s);var Ie=s=>1-Math.sqrt(1-Math.pow(s,2));var Ce=s=>Math.pow(s,3);var Te=s=>{let e=2*Math.PI/3;return s===0?0:s===1?1:-Math.pow(2,10*s-10)*Math.sin((s*10-10.75)*e)};var Pe=s=>s===0?0:Math.pow(2,10*s-10);var ke=s=>{let t=2.5949095;return s<.5?Math.pow(2*s,2)*((t+1)*2*s-t)/2:(Math.pow(2*s-2,2)*((t+1)*(s*2-2)+t)+2)/2};var ze=s=>s<.5?(1-L(1-2*s))/2:(1+L(2*s-1))/2;var Le=s=>s<.5?(1-Math.sqrt(1-Math.pow(2*s,2)))/2:(Math.sqrt(1-Math.pow(-2*s+2,2))+1)/2;var Ae=s=>s<.5?4*s*s*s:1-Math.pow(-2*s+2,3)/2;var Ne=s=>{let e=2*Math.PI/4.5;return s===0?0:s===1?1:s<.5?-(Math.pow(2,20*s-10)*Math.sin((20*s-11.125)*e))/2:Math.pow(2,-20*s+10)*Math.sin((20*s-11.125)*e)/2+1};var Re=s=>s===0?0:s===1?1:s<.5?Math.pow(2,20*s-10)/2:(2-Math.pow(2,-20*s+10))/2;var Be=s=>s<.5?2*s*s:1-Math.pow(-2*s+2,2)/2;var De=s=>s<.5?8*s*s*s*s:1-Math.pow(-2*s+2,4)/2;var je=s=>s<.5?16*s*s*s*s*s:1-Math.pow(-2*s+2,5)/2;var We=s=>-(Math.cos(Math.PI*s)-1)/2;var Ve=s=>Math.pow(s,2);var $e=s=>Math.pow(s,4);var Fe=s=>Math.pow(s,5);var He=s=>1-Math.cos(s*Math.PI/2);var Xe=s=>1+2.70158*Math.pow(s-1,3)+1.70158*Math.pow(s-1,2);var Ue=s=>Math.sqrt(1-Math.pow(s-1,2));var R=s=>1-Math.pow(1-s,3);var Qe=s=>{let e=2*Math.PI/3;return s===0?0:s===1?1:Math.pow(2,-10*s)*Math.sin((s*10-.75)*e)+1};var qe=s=>s===1?1:1-Math.pow(2,-10*s);var Ye=s=>1-Math.pow(1-s,2);var Ge=s=>1-Math.pow(1-s,4);var Ke=s=>1-Math.pow(1-s,5);var Je=s=>Math.sin(s*Math.PI/2);function hs(s,e){let[t,i,r,n]=e;if(t===i&&r===n)return s;let o=[];for(let h=0;h<11;++h)o[h]=ae(h*.1,t,r);return s===0?0:s===1?1:ae(Si(e,s,o),i,n)}function ae(s,e,t){return((cs(e,t)*s+ls(e,t))*s+ds(e))*s}function cs(s,e){return 1-3*e+3*s}function ls(s,e){return 3*e-6*s}function ds(s){return 3*s}function Si(s,e,t){let i=s[0],r=s[2],n=0,o=1;for(;o!==10&&t[o]<=e;++o)n+=.1;--o;let h=(e-t[o])/(t[o+1]-t[o]),c=n+h*.1,a=ps(c,i,r);return a>=.001?Mi(e,c,i,r):a===0?c:Oi(e,n,n+.1,i,r)}function ps(s,e,t){return 3*cs(e,t)*s*s+2*ls(e,t)*s+ds(e)}function Mi(s,e,t,i){for(let r=0;r<4;++r){let n=ps(e,t,i);if(n===0)return e;let o=ae(e,t,i)-s;e-=o/n}return e}function Oi(s,e,t,i,r){let n,o,h=0;do o=e+(t-e)/2,n=ae(o,i,r)-s,n>0?t=o:e=o;while(Math.abs(n)>1e-7&&++h<10);return o}function us(s,e=!1){return Array.isArray(e)?hs(s,e):typeof e=="function"?e(s):s}var Ze=(s,e)=>{var t;return e===void 0&&(e=(t=d().props.easing)!==null&&t!==void 0?t:!1),us(s,e)};function et(s,e=0,t=1){let i=Math.min(e,t),r=Math.max(e,t);return s>=i&&s<=r}function O(s,e,t){let i=t-e;return((s-e)%i+i)%i+e}var m=class{_getStatic(){return{__staticProp:null}}_getMutable(){return{__mutableProp:null}}get props(){return this._props}get prefix(){return""}get name(){return this.constructor.name}get isDestroyed(){return this._isDestroyed}get callbacks(){return this._callbacks}constructor(e){this._isDestroyed=!1,this._destroyable=[],this._callbacks=new k,this._props=Object.assign(Object.assign(Object.assign({},this._getStatic()),this._getMutable()),e)}_handleProps(){this.callbacks.emit("props",void 0)}updateProps(e){this._props=Object.assign(Object.assign({},this._props),e),this._handleProps()}onDestroy(e){this._destroyable.push(e)}on(e,t,i={}){return this.callbacks.on(e,t,i)}_cn(...e){return e.map(t=>`${this.prefix}${t}`).join(" ")}_addTempClassName(e,t){e.classList.contains(t)||(e.classList.add(t),this.onDestroy(()=>e.classList.remove(t)))}destroy(){this.isDestroyed||this._destroy()}_destroy(){this._callbacks.emit("destroy",void 0),this._callbacks.destroy(),this._destroyable.forEach(e=>e()),this._isDestroyed=!0}};var tt=class{get props(){return this._props}constructor(e,t,i){this._source=e,this._rules=t,this._onChange=i,this._isDestroyed=!1,this._destructors=[],this._prevBreakpoints="[]";let r=e,n=d(),o=r instanceof m?r.name:"Object";if(this._fetchInitProps(),this._props=Object.assign({},this._initProps),r instanceof m){r.on("destroy",()=>this.destroy(),{name:this.constructor.name,protected:!0});let h=r.updateProps.bind(r);r.updateProps=c=>{h(c),this._initProps=Object.assign(Object.assign({},this._initProps),c)},Object.defineProperty(r,"_$_responseProps",{value:c=>{h(c)}})}this._handleUpdate(),this._destructors.push(n.onViewport("any",()=>this._handleUpdate(),{name:`${this.constructor.name} / ${o}`}))}_fetchInitProps(){let e=this._source;if(e instanceof m){this._initProps={},Object.keys(e._getMutable()).forEach(i=>{this._initProps[i]=e.props[i]});return}this._initProps=this._source}_getActiveRules(){let e=d();return this._rules.filter(({at:i})=>i==="tablet "&&e.tablet||i==="phone"&&e.phone||i==="mobile"&&e.mobile||i==="non_mobile"&&!e.mobile||i==="lg"&&e.lg||i==="md"&&e.md||i==="sm"&&e.sm||i==="portrait"&&e.portrait||i==="landscape"&&e.landscape?!0:i.startsWith("@media")?window.matchMedia(i.replace("@media","")).matches:!1)}_getResponsiveProps(){let e=this._getActiveRules(),t={};return e.forEach(({props:i})=>{t=Object.assign(Object.assign({},t),i)}),t}_handleUpdate(){var e;let i=this._getActiveRules().map(({at:n})=>n),r=JSON.stringify(i);this._prevBreakpoints!==r&&(this._prevBreakpoints=r,this._props=Object.assign(Object.assign({},this._initProps),this._getResponsiveProps()),this._source instanceof m&&this._source._$_responseProps(this._props),(e=this._onChange)===null||e===void 0||e.call(this,this.props))}destroy(){this._isDestroyed||(this._isDestroyed=!0,this._destructors.forEach(e=>e()))}};var $=class extends m{_getStatic(){return Object.assign(Object.assign({},super._getStatic()),{container:null,append:!0,resizeOnInit:!0,resizeOnRuntime:!1,viewportTarget:"any",resizeDebounce:0})}_getMutable(){return Object.assign(Object.assign({},super._getMutable()),{width:"auto",height:"auto",dpr:"auto"})}get canvas(){return this._canvas}get ctx(){return this._ctx}get width(){return this._width}get offsetWidth(){return this.width/this.dpr}get height(){return this._height}get offsetHeight(){return this.height/this.dpr}get dpr(){return this._dpr}get canRender(){return this.width>0&&this.height>0}constructor(e){super(e);let{append:t,container:i,resizeOnInit:r,resizeOnRuntime:n,viewportTarget:o,resizeDebounce:h}=this.props;this._width=0,this._height=0,this._dpr=1,this._canvas=document.createElement("canvas");let{style:c}=this._canvas;if(c.position="absolute",c.top="0",c.left="0",c.width="100%",c.height="100%",t&&i instanceof HTMLElement&&(i.append(this._canvas),this.onDestroy(()=>this.canvas.remove())),this._ctx=this._canvas.getContext("2d"),r&&this.resize(),n){let a=S({callback:()=>this.resize(),element:this.props.container,viewportTarget:o,resizeDebounce:h,name:this.name});this.onDestroy(()=>a.remove())}}_handleProps(){super._handleProps(),this.resize()}resize(){let e=d(),{props:t,canvas:i}=this,{container:r}=this.props;this._dpr=typeof t.dpr=="number"?t.dpr:e.dpr;let n=0,o=0;t.width==="auto"?n=(r==null?void 0:r.offsetWidth)||e.width:n=t.width,t.height==="auto"?o=(r==null?void 0:r.offsetHeight)||e.height:o=t.height,n*=this._dpr,o*=this._dpr,this._width=n,this._height=o,i.width=n,i.height=o,this.callbacks.emit("resize",void 0)}render(e){this.canRender&&e({ctx:this.ctx,width:this.width,height:this.height,dpr:this.dpr,offsetWidth:this.offsetWidth,offsetHeight:this.offsetHeight,canvas:this.canvas})}};function he(s){let e=Ci(s),t=Ii(s),i;return s.rule==="cover"?i=Ti(s,e,t):s.rule==="contain"?i=Pi(s,e,t):s.rule==="top-left"?i=ki(s,t):s.rule==="top-right"?i=zi(s,e,t):s.rule==="bottom-left"?i=Li(s,e,t):s.rule==="bottom-right"?i=Ai(s,e,t):s.rule==="center"&&(i=Ni(s,e,t)),Object.assign(i,{sourceWidth:t.width,sourceHeight:t.height})}function w(s){return typeof s.scale!="undefined"?s.scale:1}function Ii(s){let{source:e}=s;return s.sourceWidth&&s.sourceHeight?{width:s.sourceWidth,height:s.sourceHeight}:e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e instanceof HTMLImageElement?{width:e.naturalWidth,height:e.naturalHeight}:{width:e.width,height:e.height}}function Ci(s){return"container"in s?{width:s.container.clientWidth,height:s.container.clientHeight}:{width:s.width,height:s.height}}function Ti(s,e,t){let i=e.width*w(s),r=t.height*i/t.width;r/w(s)<e.height&&(r=e.height*w(s),i=t.width*r/t.height);let n=(e.width-i)/2,o=(e.height-r)/2;return{width:i,height:r,x:n,y:o}}function Pi(s,e,t){let i=0,r=0,n=t.width/t.height;e.width>e.height?(r=e.height,i=r*n,i>e.width&&(i=e.width,r=i/n)):e.height>=e.width&&(i=e.width,r=i/n,r>e.height&&(r=e.height,i=r*n)),i*=w(s),r*=w(s);let o=(e.width-i)/2,h=(e.height-r)/2;return{width:i,height:r,x:o,y:h}}function ki(s,e){let t=e.width*w(s),i=e.height*w(s);return{width:t,height:i,x:0,y:0}}function zi(s,e,t){let i=t.width*w(s),r=t.height*w(s),n=e.width-t.width;return{width:i,height:r,x:n,y:0}}function Li(s,e,t){let i=t.width*w(s),r=t.height*w(s),n=e.height-t.height;return{width:i,height:r,x:0,y:n}}function Ai(s,e,t){let i=t.width*w(s),r=t.height*w(s),n=e.width-t.width,o=e.height-t.height;return{width:i,height:r,x:n,y:o}}function Ni(s,e,t){let i=t.width*w(s),r=t.height*w(s),n=(e.width-t.width)/2,o=(e.height-t.height)/2;return{width:i,height:r,x:n,y:o}}var st=class extends ${_getStatic(){return Object.assign(Object.assign({},super._getStatic()),{autoRenderVideo:!0})}_getMutable(){return Object.assign(Object.assign({},super._getMutable()),{rule:"cover"})}constructor(e){super(e),this._setMediaEvents()}get hasRequestVideoFrameCallback(){return"requestVideoFrameCallback"in this.props.media}_setMediaEvents(){let{autoRenderVideo:e,media:t}=this.props;if(!e||!(t instanceof HTMLVideoElement))return;if(this.hasRequestVideoFrameCallback){this._requestVideoFrame();return}let i=f(t,"timeupdate",()=>{this.render()});this.onDestroy(()=>i())}resize(){super.resize(),this.render()}_requestVideoFrame(){if(this.isDestroyed)return;this.render();let{media:e}=this.props;e instanceof HTMLVideoElement&&e.requestVideoFrameCallback(()=>this._requestVideoFrame())}render(){super.render(e=>this._prerender(e))}_prerender({width:e,height:t,ctx:i}){let{media:r,rule:n}=this.props,o,h,c;r instanceof $?(o=r.canvas,h=r.width,c=r.height):o=r;let a=he({source:o,sourceWidth:h,sourceHeight:c,rule:n,scale:1,width:e,height:t});i.clearRect(0,0,e,t),i.drawImage(o,a.x,a.y,a.width,a.height),this.callbacks.emit("render",void 0)}};var I=class extends m{_getStatic(){return Object.assign({},super._getStatic())}_getMutable(){return Object.assign(Object.assign({},super._getMutable()),{fps:"auto",enabled:!1,fpsRecalcFrames:10})}get isPlaying(){return this._isPlaying}get timestamp(){var e;return(e=this._timestamp)!==null&&e!==void 0?e:0}get index(){return this._index}get fps(){return this._fps}get duration(){return this._duration}get fpsFactor(){return 60/this.fps}constructor(e){super(e),this._isPlaying=!1,this._raf=null,this._lastTimestamp=null,this._timestamp=null,this._index=0,this._fps=60,this._duration=0,this._fps=this.props.fps==="auto"?this._fps:this.props.fps,this.props.enabled&&this._play()}_handleProps(){super._handleProps(),this._lastTimestamp=null,this.props.enabled?this._play():this._pause()}play(){this.isDestroyed||this.props.enabled||this.updateProps({enabled:!0})}_play(){this.isPlaying||(this._isPlaying=!0,this.callbacks.emit("play",void 0),this.callbacks.emit("toggle",void 0),this._raf=window.requestAnimationFrame(this._animate.bind(this)))}pause(){this.props.enabled&&this.updateProps({enabled:!1})}_pause(){this.isPlaying&&(this._raf&&(window.cancelAnimationFrame(this._raf),this._raf=null),this._isPlaying=!1,this.callbacks.emit("pause",void 0),this.callbacks.emit("toggle",void 0))}_animate(){var e,t;if(!this._isPlaying)return;this._raf=window.requestAnimationFrame(this._animate.bind(this));let i=this.props.fps==="auto"?1:1e3/this.props.fps;this._timestamp=performance.now(),(e=this._lastTimestamp)!==null&&e!==void 0||(this._lastTimestamp=this._timestamp);let r=this._timestamp-((t=this._lastTimestamp)!==null&&t!==void 0?t:this._timestamp);r<i||(this._duration=r,this._lastTimestamp=this._timestamp,this._index+=1,this._computeFPS(),this.callbacks.emit("frame",{fps:this.fps,fpsFactor:this.fpsFactor,duration:this.duration,lerpFactor:this.lerpFactor.bind(this)}))}lerpFactor(e){return 1-Math.exp(-e*60*(this.duration/1e3))}_computeFPS(){let{duration:e,index:t,props:i}=this;if(t>10&&t%i.fpsRecalcFrames!==0||e<=0||e>250)return;let o=1e3/60/e;this._fps=Math.round(60*o)||1}_destroy(){this.pause(),super._destroy()}};var F=null;function fs(s){return F||(F=document.createElement("style"),document.body.appendChild(F),F.innerHTML=`
|
|
34
|
+
.${s}-container.${s}-hide-default,
|
|
35
|
+
.${s}-container.${s}-hide-default * {
|
|
36
|
+
cursor: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.${s} {
|
|
40
|
+
position: absolute;
|
|
41
|
+
top: 0;
|
|
42
|
+
left: 0;
|
|
43
|
+
width: 0;
|
|
44
|
+
height: 0;
|
|
45
|
+
z-index: 999;
|
|
46
|
+
pointer-events: none;
|
|
47
|
+
|
|
48
|
+
transition: opacity 0.25s;
|
|
49
|
+
opacity: 0;
|
|
50
|
+
|
|
51
|
+
--cursor-w: 50px;
|
|
52
|
+
--cursor-h: 50px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.${s}-in-window {
|
|
56
|
+
position: fixed;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.${s}-visible {
|
|
60
|
+
opacity: 1;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.${s}-disabled {
|
|
64
|
+
opacity: 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.${s}__inner {
|
|
68
|
+
position: relative;
|
|
69
|
+
width: var(--cursor-w);
|
|
70
|
+
height: var(--cursor-h);
|
|
71
|
+
margin-left: calc(var(--cursor-w) / -2);
|
|
72
|
+
margin-top: calc(var(--cursor-h) / -2);
|
|
73
|
+
|
|
74
|
+
background-color: rgba(0, 0, 0, 0.25);
|
|
75
|
+
|
|
76
|
+
transition: transform 0.25s;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.${s}__inner > * {
|
|
80
|
+
position: absolute;
|
|
81
|
+
top: 50%;
|
|
82
|
+
left: 50%;
|
|
83
|
+
transform: scale(0.75) translate(-62.5%, -62.5%);
|
|
84
|
+
opacity: 0;
|
|
85
|
+
transition: opacity 0.25s linear, transform 0.25s linear;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.${s}__inner > *.active {
|
|
89
|
+
opacity: 1;
|
|
90
|
+
transform: scale(1) translate(-50%, -50%);
|
|
91
|
+
}
|
|
92
|
+
`,F)}var it=class extends m{_getStatic(){return Object.assign(Object.assign({},super._getStatic()),{container:window,hideNative:!1})}_getMutable(){return Object.assign(Object.assign({},super._getMutable()),{enabled:!0,width:50,height:50,lerp:.2,autoStop:!0})}get prefix(){return`${d().prefix}cursor`}get container(){return this.props.container}get domContainer(){return this.container instanceof Window?d().body:this.container}get outer(){return this._outer}get inner(){return this._inner}get hoveredElement(){return this._hoveredElement}set hoveredElement(e){this._hoveredElement=e}get coords(){return this._coords}get targetCoords(){var e;let{hoveredElement:t,props:i}=this,{x:r,y:n}=this._targetCoords,{width:o,height:h}=i,c=0;if(t){let a=t.element.getBoundingClientRect();t.sticky&&(r=a.left+a.width/2,n=a.top+a.height/2),t.width==="auto"?o=a.width:typeof t.width=="number"&&(o=t.width),t.height==="auto"?h=a.height:typeof t.height=="number"&&(h=t.height),c=(e=t.padding)!==null&&e!==void 0?e:0}return o+=c*2,h+=c*2,{x:r,y:n,width:o,height:h}}constructor(e){super(e),this._isFirstMove=!0;let{width:t,height:i,enabled:r}=this.props;this._coords={x:0,y:0,width:t,height:i},this._targetCoords={x:0,y:0,width:t,height:i},this._types=[],this._activeTypes=[],fs(this.prefix),this._createElements(),this._setEvents(),this._toggle(r)}_createElements(){let{container:e,domContainer:t}=this,i=this._cn.bind(this);this.props.hideNative&&(t.style.cursor="none",this._addTempClassName(t,i("-hide-default"))),this._addTempClassName(t,i("-container")),t!==d().body&&(t.style.position="relative");let r=document.createElement("div");t.append(r),r.classList.add(i("")),r.classList.add(i(e instanceof Window?"-in-window":"-in-element")),r.classList.add(i("-disabled"));let n=document.createElement("div");r.append(n),n.classList.add(i("__inner")),n.classList.add(i("-disabled")),r.append(n),this._outer=r,this._inner=n,this.onDestroy(()=>{t.style.cursor="",n.remove(),r.remove()})}_setEvents(){let{domContainer:e}=this;this._raf=new I({enabled:!1}),this._raf.on("frame",()=>this.render());let t=f(e,"mouseenter",this._handleMouseEnter.bind(this)),i=f(e,"mouseleave",this._handleMouseLeave.bind(this)),r=f(e,"mousemove",this._handleMouseMove.bind(this)),n=f(e,"mousedown",this._handleMouseDown.bind(this)),o=f(e,"mouseup",this._handleMouseUp.bind(this)),h=f(window,"blur",this._handleWindowBlur.bind(this));this.onDestroy(()=>{this._raf.destroy(),t(),i(),r(),n(),o(),h()})}_handleProps(){super._handleProps(),this._toggle(this.props.enabled)}_toggle(e){let t=this._cn("-disabled");this.outer.classList.toggle(t,!e),this.inner.classList.toggle(t,!e),this._raf.updateProps({enabled:e})}_handleMouseEnter(e){this._coords.x=e.clientX,this._coords.y=e.clientY,this._targetCoords.x=e.clientX,this._targetCoords.y=e.clientY,this.outer.classList.add(this._cn("-visible"))}_handleMouseLeave(){this.outer.classList.remove(this._cn("-visible"))}_handleMouseMove(e){this._targetCoords.x=e.clientX,this._targetCoords.y=e.clientY,this._isFirstMove&&(this._coords.x=e.clientX,this._coords.y=e.clientY,this._isFirstMove=!1),this.outer.classList.add(this._cn("-visible")),this.props.enabled&&this._raf.play()}_handleMouseDown(e){let t=this._cn("-click");e.which===1&&(this.outer.classList.add(t),this.inner.classList.add(t))}_handleMouseUp(){let e=this._cn("-click");this.outer.classList.remove(e),this.inner.classList.remove(e)}_handleWindowBlur(){this._handleMouseUp()}attachElement(e,t=100){let i=Object.assign({width:null,height:null},e),{element:r}=i,n,o=f(r,"mouseenter",()=>{n=setTimeout(()=>{this.hoveredElement=Object.assign({},i),i.type&&this._toggleType(i.type,!0)},t)}),h=f(r,"mouseleave",()=>{n&&clearTimeout(n),this.hoveredElement=void 0,i.type&&this._toggleType(i.type,!1)}),c=()=>{var a;((a=this.hoveredElement)===null||a===void 0?void 0:a.element)===r&&(this.hoveredElement=void 0),o(),h(),n&&clearTimeout(n)};return this.onDestroy(()=>c()),()=>c()}attachCursor({element:e,type:t}){this._types.push({element:e,type:t}),this._inner.append(e)}_toggleType(e,t){t?this._activeTypes.push(e):this._activeTypes=this._activeTypes.filter(r=>e!==r);let i=this._activeTypes.length>0?this._activeTypes[this._activeTypes.length-1]:null;this._types.forEach(r=>{r.element.classList.toggle("active",r.type===i)})}get isInterpolated(){let{coords:e,targetCoords:t}=this;return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}render(){this._calculate(),this._renderElements(),this.props.autoStop&&this.isInterpolated&&this._raf.pause(),this.callbacks.emit("render",void 0)}_calculate(){let{targetCoords:e,_coords:t}=this;t.x=this._lerp(t.x,e.x),t.y=this._lerp(t.y,e.y),t.width=this._lerp(t.width,e.width),t.height=this._lerp(t.height,e.height)}_lerp(e,t){return M(e,t,this._raf.lerpFactor(this.props.lerp),1e-4)}_renderElements(){let{container:e,domContainer:t,outer:i}=this,{x:r,y:n}=this.coords,{width:o,height:h}=this.coords;if(!(e instanceof Window)){let c=t.getBoundingClientRect();r-=c.left,n-=c.top}i.style.transform=`translate(${r}px, ${n}px)`,i.style.setProperty("--cursor-w",`${o}px`),i.style.setProperty("--cursor-h",`${h}px`)}};var rt=class extends m{_getStatic(){return Object.assign(Object.assign({},super._getStatic()),{hasOut:!0,maxInitialDelay:1e3,scrollDirection:"vertical"})}_getMutable(){return Object.assign(Object.assign({},super._getMutable()),{enabled:!0,rootMargin:"0% 0% -5% 0%"})}get isInitialStart(){return this._isInitialStart}get elements(){return this._elements}constructor(e){super(e),this._isInitialStart=!0,this._elements=[],this._setup()}_handleProps(){super._handleProps(),this._setup()}_setup(){this._removeViewEvents(),this.props.enabled&&this._setViewEvents()}_removeViewEvents(){var e,t;(e=this._observerIn)===null||e===void 0||e.disconnect(),this._observerIn=void 0,(t=this._observerOut)===null||t===void 0||t.disconnect(),this._observerOut=void 0}_setViewEvents(){let{isInitialStart:e,props:t}=this,i=e?"0% 0% 0% 0%":t.rootMargin;this._observerIn=new IntersectionObserver(r=>this._handleIn(r),{root:null,threshold:0,rootMargin:i}),this.elements.forEach(r=>{var n;return(n=this._observerIn)===null||n===void 0?void 0:n.observe(r)}),t.hasOut&&(this._observerOut=new IntersectionObserver(r=>this._handleOut(r),{root:null,threshold:0,rootMargin:"0px 0px 0px 0px"}),this.elements.forEach(r=>{var n;return(n=this._observerOut)===null||n===void 0?void 0:n.observe(r)}))}_handleIn(e){e.forEach(t=>{let i=t.target;!t.isIntersecting||i.$vevetInViewBool||(i.$vevetInViewBool=!0,i.$vevetInViewTimeout&&clearTimeout(i.$vevetInViewTimeout),i.$vevetInViewTimeout=setTimeout(()=>this._handleInOut(i,!0),this._getElementDelay(i)),this.props.hasOut||this.removeElement(i))}),this._isInitialStart&&(this._isInitialStart=!1,this._setup())}_handleOut(e){e.forEach(t=>{let i=t.target;t.isIntersecting||!i.$vevetInViewBool||(i.$vevetInViewBool=!1,i.$vevetInViewTimeout&&clearTimeout(i.$vevetInViewTimeout),i.$vevetInViewTimeout=setTimeout(()=>{this._handleInOut(i,!1)},0))})}_handleInOut(e,t){let i=e.getAttribute("data-in-view-class");i&&e.classList.toggle(i,t),this.callbacks.emit(t?"in":"out",{element:e})}_getElementDelay(e){let{props:t}=this,i=d();if(!this.isInitialStart||t.maxInitialDelay<=0)return 0;let r=e.getBoundingClientRect(),n={top:0,left:0,width:i.width,height:i.height};return b(t.scrollDirection==="horizontal"?(r.left-n.left)/n.width:(r.top-n.top)/n.height,0,1)*t.maxInitialDelay}addElement(e){var t,i;let r=e;return r.$vevetInViewBool=void 0,this._elements.push(r),(t=this._observerIn)===null||t===void 0||t.observe(r),(i=this._observerOut)===null||i===void 0||i.observe(r),()=>this.removeElement(r)}removeElement(e){var t,i;let r=e;(t=this._observerIn)===null||t===void 0||t.unobserve(r),(i=this._observerOut)===null||i===void 0||i.unobserve(r),this._elements=this._elements.filter(n=>n!==e),r.$vevetInViewBool=void 0}_destroy(){super._destroy(),this._removeViewEvents()}};var nt=class extends m{_getStatic(){return Object.assign(Object.assign({},super._getStatic()),{resizeDebounce:0,hasWillChange:!0,cloneNodes:!0})}_getMutable(){return Object.assign(Object.assign({},super._getMutable()),{speed:1,gap:0,enabled:!0,pauseOnHover:!1,centered:!1,adjustSpeed:!0,pauseOnOut:!0})}get totalWidth(){return this._totalWidth}get x(){return this._x}set x(e){this._x=e,this.render(0)}constructor(e){super(e),this._width=0,this._initialNodes=[],this._elements=[],this._widths=[],this._totalWidth=0,this._x=0;let{container:t}=this.props;if(!t)throw new Error("Marquee container is not defined");t.style.position="relative",t.style.display="flex",t.style.flexDirection="row",t.style.alignItems="center",t.style.justifyContent="flex-start",t.style.width="100%",t.style.overflow="hidden",this._setup(),this._raf=new I({enabled:this.props.enabled,fpsRecalcFrames:1}),this._raf.on("frame",()=>{let n=this.props.adjustSpeed?this._raf.fpsFactor:1,o=E(this.props.speed);this._render(o*n)});let i=f(t,"mouseenter",()=>{this.props.pauseOnHover&&this._raf.pause()});this.onDestroy(()=>i());let r=f(t,"mouseleave",()=>{this.props.enabled&&this._raf.play()});this.onDestroy(()=>r()),this._intersection=new IntersectionObserver(this._handleIntersection.bind(this),{root:null}),this._intersection.observe(t)}_handleProps(){super._handleProps(),this.props.enabled?this._raf.play():this._raf.pause(),this.resize(),this.render(0)}_setup(){var e;if((e=this._lastSetup)===null||e===void 0||e.call(this),this.isDestroyed)return;let{container:t,resizeDebounce:i}=this.props;this._initialNodes=[...Array.from(t.childNodes)],this._wrapTextNode(),this._elements=Array.from(t.children),this.resize();let r=d().onLoad(()=>this.resize()),n=S({callback:()=>this.resize(),element:[t,...this._elements],viewportTarget:"width",resizeDebounce:i,name:this.name});this._elements.forEach((o,h)=>this._applyNodeStyles(o,h!==0)),this._lastSetup=()=>{r(),n.remove()}}_wrapTextNode(){let{container:e}=this.props,t=e.childNodes.length===1,i=e.childNodes[0];if(!i||i.nodeType!==3||!t)return;let r=document.createElement("span");r.style.position="relative",r.style.display="block",r.style.width="max-content",r.style.whiteSpace="nowrap",r.appendChild(i),e.appendChild(r)}_applyNodeStyles(e,t){let i=e;i.style.position=t?"absolute":"relative",i.style.top=t?"50%":"0",i.style.left="0",i.style.width=e.style.width||"max-content",i.style.willChange=this.props.hasWillChange?"transform":""}resize(){if(this.isDestroyed)return;let{props:e}=this,{container:t}=e,i=E(e.gap);this._width=t.offsetWidth,this._widths=this._elements.map(o=>o.offsetWidth+i),this._totalWidth=this._widths.reduce((o,h)=>o+h,0);let r=Math.max(...this._widths),n=Math.ceil((this._width+r)/this._totalWidth);if(this._totalWidth=Math.max(this._totalWidth,this._width+r),e.cloneNodes&&n>1){for(let o=1;o<n;o+=1)this._elements.forEach(h=>{let c=h.cloneNode(!0);this._applyNodeStyles(c,!0),t.appendChild(c)});this._elements=Array.from(t.children),this.resize()}this.callbacks.emit("resize",void 0),setTimeout(()=>this.render(0),0)}render(e){this._render(e)}_render(e=this.props.speed){if(this.isDestroyed)return;this._x-=E(e);let t=this._width*.5,i=this._x+(this.props.centered?t:0),r=0;for(let n=0;n<this._elements.length;n+=1){let o=this._elements[n],h=this._widths[n],c=O(i+r,-h,this._totalWidth-h),a=o.style.position==="relative"?"0":"-50%";o.style.transform=`translate(${c}px, ${a})`,r+=h}this.callbacks.emit("render",void 0)}_handleIntersection(e){this.props.pauseOnOut&&e.forEach(t=>{t.isIntersecting&&this.props.enabled?this._raf.play():this._raf.pause()})}_destroy(){var e,t;let{container:i}=this.props;for(super._destroy(),this._raf.destroy(),(e=this._intersection)===null||e===void 0||e.disconnect(),(t=this._lastSetup)===null||t===void 0||t.call(this);i.firstChild;)i.removeChild(i.firstChild);this._initialNodes.forEach(r=>i.appendChild(r))}};var B=typeof window!="undefined"?document.createElement("style"):null;B&&(B.innerHTML="* { user-select: none !important; }");var G=class extends m{_getStatic(){return Object.assign(Object.assign({},super._getStatic()),{buttons:[0],relative:!1,minPointers:1,maxPointers:5,disableUserSelect:!0})}_getMutable(){return Object.assign(Object.assign({},super._getMutable()),{enabled:!0})}get isStarted(){return this._isStarted}get pointersMap(){return this._pointersMap}get container(){return this.props.container}get minPointers(){return b(this.props.minPointers,1,1/0)}get maxPointers(){return b(this.props.maxPointers,this.props.minPointers,1/0)}constructor(e){super(e),this._listeners=[],this._isStarted=!1,this._pointersMap=new Map,this._setBaseEvents()}_setBaseEvents(){let{container:e}=this,t=f(e,"pointerdown",o=>this._handlePointerDown(o)),i=f(e,"dragstart",o=>o.preventDefault(),{passive:!1}),r=f(e,"mousedown",o=>{this.props.buttons.includes(1)&&o.preventDefault()},{passive:!1}),n=f(e,"contextmenu",o=>{this.props.buttons.includes(2)&&o.preventDefault()},{passive:!1});this.onDestroy(()=>{t(),i(),r(),n()})}_setRuntimeEvents(){if(this._listeners.length>0)return;let t=f(window,"pointermove",o=>this._handlePointerMove(o),{passive:!1}),i=f(window,"pointerup",o=>this._handlePointerUp(o),{passive:!1}),r=f(window,"pointercancel",()=>this._handleCancel(),{passive:!1}),n=f(window,"blur",()=>this._handleCancel());this._listeners=[t,i,r,n]}_handlePointerDown(e){let{props:t}=this,{x:i,y:r}=this._decodeCoords(e);if(!t.enabled||!t.buttons.includes(e.button)||this.pointersMap.get(e.pointerId)||this.pointersMap.size>=this.maxPointers)return;let o={id:e.pointerId,index:this.pointersMap.size,start:{x:i,y:r},prev:{x:i,y:r},current:{x:i,y:r},diff:{x:0,y:0},step:{x:0,y:0},accum:{x:0,y:0}};this.pointersMap.set(e.pointerId,o);let h=0;this.pointersMap.forEach(c=>{c.index=h,h+=1}),this.pointersMap.size===this.minPointers&&(this._isStarted=!0,this.callbacks.emit("start",void 0)),this._setRuntimeEvents(),t.disableUserSelect&&d().body.append(B),this.callbacks.emit("pointerdown",{event:e,pointer:o})}_handlePointerMove(e){let t=this.pointersMap.get(e.pointerId);if(!t)return;let{x:i,y:r}=this._decodeCoords(e);t.prev=Object.assign({},t.current),t.current={x:i,y:r},t.step.x=t.current.x-t.prev.x,t.step.y=t.current.y-t.prev.y,t.accum.x+=Math.abs(t.step.x),t.accum.y+=Math.abs(t.step.y),this.callbacks.emit("pointermove",{event:e,pointer:t})}_handlePointerUp(e){let t=this.pointersMap.get(e.pointerId);t&&(this.callbacks.emit("pointerup",{pointer:t}),this.pointersMap.delete(e.pointerId),this.pointersMap.size<this.minPointers&&this._isStarted&&(this._isStarted=!1,this.callbacks.emit("end",void 0)),this.pointersMap.size===0&&this._cleanup())}_handleCancel(){this.callbacks.emit("end",void 0),this.pointersMap.forEach(e=>{this.callbacks.emit("pointerup",{pointer:e})}),this._cleanup()}_resetSelection(){var e,t;(e=window.getSelection())===null||e===void 0||e.empty(),(t=window.getSelection())===null||t===void 0||t.removeAllRanges()}_decodeCoords(e){let{container:t,props:i}=this;if(!i.relative)return{x:e.clientX,y:e.clientY};let r=t.getBoundingClientRect(),n=e.clientX-r.left,o=e.clientY-r.top;return{x:n,y:o}}_cleanup(){this._listeners.forEach(e=>e()),this._listeners=[],this._isStarted=!1,this.pointersMap.clear(),this.props.disableUserSelect&&(this._resetSelection(),B===null||B===void 0||B.remove())}_destroy(){this._cleanup(),super._destroy()}};var C=class extends m{_getStatic(){return Object.assign({},super._getStatic())}_getMutable(){return Object.assign(Object.assign({},super._getMutable()),{easing:d().props.easing,duration:1e3})}get progress(){return this._progress}set progress(e){this._progress=b(e),this._onUpdate()}get eased(){return this._eased}get isPlaying(){return typeof this._raf!="undefined"}get isReversed(){return this._isReversed}get isPaused(){return this._isPaused}get duration(){return Math.max(this.props.duration,0)}constructor(e){super(e),this._progress=0,this._eased=0,this._raf=void 0,this._time=0,this._isReversed=!1,this._isPaused=!1}play(){this.isDestroyed||this.progress===1||(this._isReversed=!1,this._isPaused=!1,this.isPlaying||(this._time=Date.now(),this._animate()))}reverse(){this.isDestroyed||this.progress===0||(this._isReversed=!0,this._isPaused=!1,this.isPlaying||(this._time=Date.now(),this._animate()))}pause(){this.isDestroyed||(this._isPaused=!0,this._raf&&window.cancelAnimationFrame(this._raf),this._raf=void 0)}reset(){this.isDestroyed||(this.pause(),this.progress=0)}_animate(){if(this.isPaused)return;let{isReversed:e,duration:t}=this;if(t<=0){this.progress=e?1:0,this.progress=e?0:1;return}let i=Date.now(),r=Math.abs(this._time-i);this._time=i;let n=r/t/(e?-1:1),o=this.progress+n;if(this.progress=o,this.progress===1&&!e||this.progress===0&&e){this._isReversed=!1,this._isPaused=!1,this._raf=void 0;return}this._raf=window.requestAnimationFrame(()=>this._animate())}_onUpdate(){if(this._eased=Ze(this._progress,this.props.easing),this.callbacks.emit("update",{progress:this._progress,eased:this._eased}),this.progress===0){this.callbacks.emit("start",void 0);return}this.progress===1&&this.callbacks.emit("end",void 0)}_destroy(){this.pause(),super._destroy()}};var K=class extends m{_getStatic(){return Object.assign(Object.assign({},super._getStatic()),{hide:250})}_getMutable(){return Object.assign({},super._getMutable())}get isHidden(){return this._isHidden}constructor(e){super(e),this._shouldHide=!1,this._isHidden=!1,this._isLoaded=!1;let t=setTimeout(()=>{this._onLoaded(()=>this._handleLoaded())},0);this.onDestroy(()=>clearTimeout(t))}_onLoaded(e){d().onLoad(e)}_handleLoaded(){this.isDestroyed||(this._isLoaded=!0,this.callbacks.emit("loaded",void 0),typeof this.props.hide=="number"&&this.hide(this.props.hide))}hide(e,t){if(!this._isLoaded||this._shouldHide)return;let i=!1;return this._shouldHide=!0,this.callbacks.emit("hide",void 0),this._hideContainer(()=>{this._onHidden(),i||t==null||t()},e),()=>{i=!0}}_hideContainer(e,t){let{container:i}=this.props;if(!i){e();return}let r=new C({duration:t});this.onDestroy(()=>r.destroy()),r.on("update",({progress:n})=>{i.style.opacity=String(1-n),i.style.display=n===1?"none":"flex"}),r.on("end",()=>e()),r.play()}_onHidden(){this._isHidden=!0,this.callbacks.emit("hidden",void 0)}onHide(e){return this._shouldHide?(e(),()=>{}):this.on("hide",()=>e())}onHidden(e){return this._isHidden?(e(),()=>{}):this.on("hidden",()=>e())}};function ms(s,e){if(s.complete){e();return}let t=new Image;t.addEventListener("load",()=>e()),t.addEventListener("error",()=>e()),t.crossOrigin="anonymous",t.src=s.currentSrc||s.src}function _s(s,e){if(s.readyState>0){e();return}if(s.preload==="none"){e();return}s.addEventListener("error",()=>e()),s.addEventListener("loadedmetadata",()=>e())}function gs(s){let e=parseInt(s.getAttribute("data-loaded")||"0",10);return e=Number.isNaN(e)?0:b(e,0,1/0),e}function bs({id:s,weight:e},t){if(!(s instanceof Element))return;if(gs(s)>=e){t(e);return}let i=new MutationObserver(()=>{let r=gs(s);t(r),r>=e&&i.disconnect()});i.observe(s,{attributes:!0,attributeFilter:["data-loaded"]})}var ot=class extends K{_getStatic(){return Object.assign(Object.assign({},super._getStatic()),{preloadImages:!0,preloadVideos:!1,customSelector:".js-preload",ignoreClassName:"js-preload-ignore",lerp:.1,endDuration:500})}_getMutable(){return Object.assign({},super._getMutable())}get resources(){return this._resources}get totalWeight(){return this.resources.reduce((e,{weight:t})=>e+t,0)}get loadedWeight(){return this.resources.reduce((e,{loaded:t})=>e+t,0)}get loadProgress(){return this.loadedWeight/this.totalWeight}get progress(){return this._progress}constructor(e){super(e),this._resources=[{id:"page",weight:1,loaded:0}],this._progress=0,this._raf=new I,this._raf.on("frame",({lerpFactor:t})=>{this._handleUpdate(M(this._progress,this.loadProgress,t(this.props.lerp)))}),this._raf.play(),this._fetchImages(),this._fetchVideos(),this._fetchResources(),d().onLoad(()=>this.resolveResource("page"))}_fetchImages(){if(!this.props.preloadImages)return;let e=Array.from(document.querySelectorAll("img"));e=e.filter(t=>!t.classList.contains(this.props.ignoreClassName)&&t.loading!=="lazy"),this._resources.push(...e.map(t=>({id:t,weight:1,loaded:0}))),e.forEach(t=>{ms(t,()=>this.resolveResource(t))})}_fetchVideos(){if(!this.props.preloadVideos)return;let e=Array.from(document.querySelectorAll("video"));e=e.filter(t=>!t.classList.contains(this.props.ignoreClassName)),this._resources.push(...e.map(t=>({id:t,weight:1,loaded:0}))),e.forEach(t=>{_s(t,()=>this.resolveResource(t))})}_fetchResources(){let e=Array.from(document.querySelectorAll(this.props.customSelector));e=e.filter(t=>!t.classList.contains(this.props.ignoreClassName)),e.forEach(t=>{let i=parseInt(t.getAttribute("data-weight")||"1",10);i=Number.isNaN(i)?1:b(i,1,1/0);let r={id:t,weight:i,loaded:0};this._resources.push(r),bs(r,()=>this.resolveResource(t))})}addResource(e,t=1){if(this.isDestroyed)return;if(this.resources.some(r=>r.id===e))throw new Error("Resource already exists");this._resources.push({id:e,weight:t,loaded:0})}resolveResource(e,t){if(this.isDestroyed)return;let i=this.resources.find(r=>r.id===e);i&&(i.loaded=t!=null?t:i.weight,this.callbacks.emit("resource",i))}_handleUpdate(e){var t;if(this._progress=e,this.callbacks.emit("progress",void 0),this.loadProgress<1)return;(t=this._raf)===null||t===void 0||t.destroy();let i=this.progress;if(i>=1)return;let r=new C({duration:this.props.endDuration});this.onDestroy(()=>r.destroy()),r.on("update",({progress:n})=>{let o=1-i;this._progress=i+o*n,this.callbacks.emit("progress",void 0)}),r.play()}_onLoaded(e){let t=!1;this.callbacks.on("progress",()=>{this.progress>=1&&!t&&(t=!0,e())},{protected:!0,name:this.name})}_destroy(){super._destroy(),this._raf.destroy()}};var H=null;function vs(s){return H||(H=document.createElement("style"),document.body.appendChild(H),H.innerHTML=`
|
|
93
|
+
.${s}-scrollable {
|
|
94
|
+
-ms-overflow-style: none;
|
|
95
|
+
scrollbar-width: none;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.${s}-scrollable::-webkit-scrollbar {
|
|
99
|
+
display: none;
|
|
100
|
+
appearance: none;
|
|
101
|
+
width: 0;
|
|
102
|
+
height: 0;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.${s} {
|
|
106
|
+
position: absolute;
|
|
107
|
+
z-index: 1;
|
|
108
|
+
display: flex;
|
|
109
|
+
flex-direction: column;
|
|
110
|
+
align-items: center;
|
|
111
|
+
justify-content: center;
|
|
112
|
+
box-sizing: border-box;
|
|
113
|
+
transition: opacity 0.25s linear, visibility 0.25s linear;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.${s}.${s}_in-window {
|
|
117
|
+
position: fixed;
|
|
118
|
+
z-index: 9;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.${s}.${s}_empty {
|
|
122
|
+
opacity: 0;
|
|
123
|
+
visibility: hidden;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.${s}.${s}_auto-hide {
|
|
127
|
+
opacity: 0;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.${s}.${s}_auto-hide:hover,
|
|
131
|
+
.${s}.${s}_auto-hide:active,
|
|
132
|
+
.${s}.${s}_in-action {
|
|
133
|
+
opacity: 1;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.${s}_y {
|
|
137
|
+
top: 0;
|
|
138
|
+
right: 0;
|
|
139
|
+
width: 10px;
|
|
140
|
+
height: 100%;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.${s}_x {
|
|
144
|
+
bottom: 0;
|
|
145
|
+
left: 0;
|
|
146
|
+
width: 100%;
|
|
147
|
+
height: 10px;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.${s}__track {
|
|
151
|
+
position: relative;
|
|
152
|
+
width: 100%;
|
|
153
|
+
height: 100%;
|
|
154
|
+
background: #ccc;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.${s}__thumb {
|
|
158
|
+
position: absolute;
|
|
159
|
+
top: 0;
|
|
160
|
+
left: 0;
|
|
161
|
+
width: 100%;
|
|
162
|
+
height: 100%;
|
|
163
|
+
background: #333;
|
|
164
|
+
}
|
|
165
|
+
`,H)}var X=typeof window!="undefined"?document.createElement("style"):null;X&&(X.innerHTML="* { cursor: grabbing !important; }");var D=class extends m{_getStatic(){return Object.assign(Object.assign({},super._getStatic()),{buttons:[0],pointers:1,disableUserSelect:!0})}_getMutable(){return Object.assign(Object.assign({},super._getMutable()),{enabled:!0,relative:!1,axis:null,grabCursor:!1,willAbort:()=>!1,threshold:5,minTime:0,directionThreshold:50,preventEdgeSwipe:!0,edgeSwipeThreshold:20,preventTouchMove:!0,requireCtrlKey:!1,inertia:!1,inertiaDuration:e=>b(e,350,1e3),inertiaEasing:R,inertiaRatio:.5})}get isSwiping(){return this._isSwiping}get coords(){return this._coords}get container(){return this.props.container}get hasInertia(){return!!this._inertia}constructor(e){super(e),this._isSwiping=!1,this._isAborted=!1;let{container:t,buttons:i,pointers:r}=this.props;this._coords={timestamp:0,start:{x:0,y:0,angle:0},prev:{x:0,y:0,angle:0},current:{x:0,y:0,angle:0},diff:{x:0,y:0,angle:0},step:{x:0,y:0,angle:0},accum:{x:0,y:0}},this._velocities=[],this._cursorStyles=X===null||X===void 0?void 0:X.cloneNode(!0),this._pointers=new G({container:t,buttons:i,minPointers:r,maxPointers:r,enabled:this.props.enabled,disableUserSelect:this.props.disableUserSelect}),this._pointers.on("start",()=>this._handlePointersStart());let n=f(t,"touchstart",o=>this._handleTouchStart(o),{passive:!1});this.onDestroy(()=>n()),this._setInlineStyles()}_handleProps(){super._handleProps(),this._pointers.updateProps({enabled:this.props.enabled}),this._setInlineStyles()}_setInlineStyles(){let{container:e,axis:t}=this.props,i=this.props.grabCursor?"grab":"",r="none";t==="x"?r="pan-y":t==="y"&&(r="pan-x"),e.style.cursor=i,e.style.touchAction=r}_handleTouchStart(e){this.props.enabled&&(this.callbacks.emit("touchstart",e),this._preventEdgeSwipe(e))}_preventEdgeSwipe(e){if(!this.props.preventEdgeSwipe)return;let t=this.props.edgeSwipeThreshold,i=e.targetTouches[0].pageX;e.cancelable&&(i<=t||i>=d().width-t)&&(e.preventDefault(),this.callbacks.emit("preventEdgeSwipe",void 0))}_handlePointersStart(){let e=f(window,"touchmove",this._handleTouchMove.bind(this),{passive:!1}),t=f(window,"mousemove",this._handleMouseMove.bind(this)),i=this._pointers.on("end",()=>{this._handleEnd(),i(),e(),t()});this.onDestroy(()=>{i(),e(),t()})}_handleTouchMove(e){this.callbacks.emit("touchmove",e),this._isSwiping&&this.props.preventTouchMove&&e.cancelable&&e.preventDefault(),this._handleMove(this._decodeCoords(e),"touch")}_handleMouseMove(e){this.props.requireCtrlKey&&!e.ctrlKey||(this.callbacks.emit("mousemove",e),this._handleMove(this._decodeCoords(e),"mouse"))}_decodeCoords(e){let{props:t}=this,i="touches"in e?e.touches[0].clientX:e.clientX,r="touches"in e?e.touches[0].clientY:e.clientY,n=i,o=r,h=d().width/2,c=d().height/2;if(t.relative){let l=t.container.getBoundingClientRect();n=i-l.left,o=r-l.top,h=l.left+l.width/2,c=l.top+l.height/2}let u=Math.atan2(r-c,i-h)*180/Math.PI;return{x:n,y:o,angle:u}}_handleMove(e,t){let i=this._coords;if(!this._isAborted){if(this._startCoord||(this._startCoord=Object.assign({},e)),this._startTime||(this._startTime=+Date.now()),!this._isSwiping){let{threshold:r,minTime:n,axis:o,willAbort:h}=this.props,c={x:e.x-this._startCoord.x,y:e.y-this._startCoord.y};if(Math.sqrt(Math.pow(c.x,2)+Math.pow(c.y,2))<r||+new Date-this._startTime<n)return;if(o){let a=Math.atan2(Math.abs(c.y),Math.abs(c.x))*180/Math.PI;if((o==="x"?a:90-a)>45){this._reset(),this._isAborted=!0,this.callbacks.emit("abort",void 0);return}}if(h({type:t,matrix:e,start:this._startCoord,diff:c})){this._reset(),this._isAborted=!0,this.callbacks.emit("abort",void 0);return}}this._isSwiping||(this.cancelInertia(),this._isSwiping=!0,this._startCoord=Object.assign({},e),i.timestamp=performance.now(),i.start=Object.assign(Object.assign({},this._startCoord),{angle:e.angle}),i.prev=Object.assign(Object.assign({},this._startCoord),{angle:e.angle}),i.current=Object.assign(Object.assign({},this._startCoord),{angle:e.angle}),i.diff={x:0,y:0,angle:0},i.step={x:0,y:0,angle:0},i.accum={x:0,y:0},this.callbacks.emit("start",this._coords),this.props.grabCursor&&this._cursorStyles&&d().body.append(this._cursorStyles)),this._move(e)}}_move({x:e,y:t,angle:i}){let r=this._coords,n=Object.assign({},r.start),o=Object.assign({},r.current),h={x:e,y:t,angle:i};r.timestamp=performance.now(),r.prev=o,r.current=h;let c=r.current.angle-r.prev.angle;c>180?c-=360:c<-180&&(c+=360),r.step={x:h.x-o.x,y:h.y-o.y,angle:c},r.diff={x:h.x-n.x,y:h.y-n.y,angle:r.diff.angle+r.step.angle},r.accum={x:r.accum.x+Math.abs(r.step.x),y:r.accum.y+Math.abs(r.step.y)},this._velocities.push(Object.assign(Object.assign({},r.current),{timestamp:r.timestamp})),this.callbacks.emit("move",this._coords)}_handleEnd(){if(this._startTime=void 0,this._isAborted=!1,!this.isSwiping)return;this._reset(),this.props.inertia&&this._endWithInertia(),this._cursorStyles.remove();let{x:e,y:t}=this._coords.diff,i=Math.abs(e),r=Math.abs(t),{directionThreshold:n}=this.props,o=i>r?"x":"y";o==="x"&&i>n&&(e>0?this.callbacks.emit("toRight",void 0):e<0&&this.callbacks.emit("toLeft",void 0)),o==="y"&&r>n&&(t>0?this.callbacks.emit("toBottom",void 0):t<0&&this.callbacks.emit("toTop",void 0)),this.callbacks.emit("end",this._coords)}_reset(){this._startCoord=void 0,this._isSwiping=!1}_endWithInertia(){let{velocity:e}=this;if(!e)return;let{inertiaDuration:t,inertiaEasing:i}=this.props,{x:r,y:n,angle:o}=e,h=Math.max(Math.abs(r),Math.abs(n)),c=t(h),a=Object.assign({},this.coords.current);this._inertia=new C({duration:c,easing:i}),this._inertia.on("start",()=>{this.callbacks.emit("inertiaStart",void 0)}),this._inertia.on("update",({eased:u})=>{this._move({x:a.x+r*u,y:a.y+n*u,angle:a.angle+o*u}),this.callbacks.emit("inertia",void 0)}),this._inertia.on("end",()=>{this.cancelInertia(),this.callbacks.emit("inertiaEnd",void 0)}),setTimeout(()=>{var u;(u=this._inertia)===null||u===void 0||u.play()},0)}cancelInertia(){var e;(e=this._inertia)===null||e===void 0||e.destroy(),this._inertia=void 0}get velocity(){if(this._velocities.length<2)return;let e=1e3*this.props.inertiaRatio,t=.02,i=this._velocities.pop(),r=this._velocities.pop(),n=performance.now(),o=i.timestamp-r.timestamp,h=(i.x-r.x)/o/2,c=(i.y-r.y)/o/2,a=(i.angle-r.angle)/o/2,u=Math.abs(h)>t,l=Math.abs(c)>t,p=Math.abs(a)>t,g=o<150&&n-i.timestamp<300;if((u||l||p)&&g)return{x:u?h*e:0,y:l?c*e:0,angle:p?a*e:0}}get start(){return this._coords.start}get prev(){return this._coords.prev}get current(){return this._coords.current}get diff(){return this._coords.diff}get step(){return this._coords.step}get accum(){return this._coords.accum}_destroy(){var e;super._destroy(),this._pointers.destroy(),(e=this._inertia)===null||e===void 0||e.destroy(),this._cursorStyles.remove()}};var at=class extends m{_getStatic(){return Object.assign(Object.assign({},super._getStatic()),{container:window,parent:!1,class:!1,axis:"y",draggable:!0,autoHide:!0,resizeDebounce:0})}_getMutable(){return Object.assign(Object.assign({},super._getMutable()),{minSize:50,autoSize:!0})}get prefix(){return`${d().prefix}scrollbar`}get container(){return this._props.container}get outer(){return this._outer}get track(){return this._track}get thumb(){return this._thumb}constructor(e){super(e),this._valueOnSwipeStart=0,this._prevScrollValue=0,vs(this.prefix),this._create(),this._setResize(),this._setOnscroll(),this._setSwipe()}_handleProps(){super._handleProps(),this.resize()}get axis(){return this.props.axis}get parent(){let{parent:e,container:t}=this.props;return e||(t instanceof Window?d().body:t)}get scrollElement(){return this.container instanceof Window?d().html:this.container}get scrollSize(){let{scrollElement:e}=this;return this.axis==="x"?e.scrollWidth:e.scrollHeight}get scrollableSize(){let{scrollElement:e}=this;return this.axis==="x"?this.scrollSize-e.clientWidth:this.scrollSize-e.clientHeight}get scrollValue(){let{axis:e}=this;return this.container instanceof Window?e==="x"?window.scrollX:window.scrollY:e==="x"?this.container.scrollLeft:this.container.scrollTop}get trackSize(){return this.axis==="x"?this._track.offsetWidth:this._track.offsetHeight}get thumbSize(){return this.axis==="x"?this._thumb.offsetWidth:this._thumb.offsetHeight}_create(){let e=d(),{parent:t,scrollElement:i}=this,r=this.container instanceof Window;this._outer=this._createOuter(),t.appendChild(this._outer),this._track=this._createTrack(),this._outer.appendChild(this._track),this._thumb=this._createThumb(),this._track.appendChild(this._thumb),r?(this._addTempClassName(e.html,this._cn("-scrollable")),this._addTempClassName(e.body,this._cn("-scrollable"))):this._addTempClassName(i,this._cn("-scrollable")),this.onDestroy(()=>this._outer.remove())}_createOuter(){let e=this._cn.bind(this),{props:t,axis:i}=this,r=document.createElement("div");return r.classList.add(e("")),r.classList.add(e(`_${i}`)),t.class&&r.classList.add(t.class),this.container instanceof Window&&this._addTempClassName(r,this._cn("_in-window")),t.autoHide&&this._addTempClassName(r,this._cn("_auto-hide")),r}_createTrack(){let e=this._cn.bind(this),{axis:t}=this,i=document.createElement("div");return i.classList.add(e("__track")),i.classList.add(e(`__track_${t}`)),i}_createThumb(){let e=this._cn.bind(this),t=document.createElement("div");return t.classList.add(e("__thumb")),t.classList.add(e(`__thumb_${this.axis}`)),t}_setResize(){let e=S({element:[this.track,this.parent,this.scrollElement],resizeDebounce:this.props.resizeDebounce,callback:()=>this.resize()});e.resize(),this.onDestroy(()=>e.remove())}_setOnscroll(){let e=f(this.container,"scroll",()=>this._onScroll(),{passive:!0});this.onDestroy(()=>e())}_setSwipe(){if(!this.props.draggable)return;let e=new D({container:this.thumb,grabCursor:!0});e.on("start",t=>{this._valueOnSwipeStart=this.scrollValue,this.callbacks.emit("swipeStart",t)}),e.on("move",t=>{this._onSwipeMove(t),this.callbacks.emit("swipe",t)}),e.on("end",t=>{this.callbacks.emit("swipeEnd",t)}),e.on("touchmove",t=>{t.stopPropagation(),t.stopImmediatePropagation()}),e.on("mousemove",t=>{t.stopPropagation(),t.stopImmediatePropagation()}),this.onDestroy(()=>e.destroy())}resize(){let{scrollableSize:e,scrollSize:t,outer:i,track:r,thumb:n,props:o,axis:h}=this,{autoSize:c}=o,a=h==="x";i.classList.toggle(this._cn("_empty"),e===0);let u=a?r.offsetWidth:r.offsetHeight,l=E(o.minSize),p=l;c&&(p=b(u/(t/u),l,1/0)),a?n.style.width=`${p}px`:n.style.height=`${p}px`,this._addInActionTimeout&&clearTimeout(this._addInActionTimeout),this._render(),this.callbacks.emit("resize",void 0)}_render(){let{scrollValue:e,scrollableSize:t,axis:i,thumbSize:r,trackSize:n}=this,o=b(e/t),h=(n-r)*o,c=i==="x"?h:0,a=i==="y"?h:0;this._thumb.style.transform=`translate(${c}px, ${a}px)`,this.callbacks.emit("update",void 0)}_onScroll(){let{scrollValue:e,outer:t}=this,i=this._cn("_in-action");e!==this._prevScrollValue?this._addInActionTimeout=setTimeout(()=>{t.classList.contains(i)||(t.classList.add(i),this.callbacks.emit("show",void 0))},50):this._prevScrollValue=e,this._render(),this._removeInActionTimeout&&clearTimeout(this._removeInActionTimeout),this._removeInActionTimeout=setTimeout(()=>{t.classList.remove(i),this.callbacks.emit("hide",void 0)},500)}_onSwipeMove({diff:e}){let{scrollElement:t,axis:i,trackSize:r,thumbSize:n,scrollableSize:o}=this,c=(i==="x"?e.x:e.y)/(r-n)*o,a=this._valueOnSwipeStart+c;t.scrollTo({top:i==="y"?a:void 0,left:i==="x"?a:void 0,behavior:"instant"})}_destroy(){super._destroy(),this._addInActionTimeout&&clearTimeout(this._addInActionTimeout),this._removeInActionTimeout&&clearTimeout(this._removeInActionTimeout)}};var ht=class extends m{_getStatic(){return Object.assign(Object.assign({},super._getStatic()),{root:null,optimized:!0,useSvh:!1})}_getMutable(){return Object.assign({},super._getMutable())}get section(){return this.props.section}get isVisible(){return this._isVisible}get rootBounds(){return this._rootBounds}get sectionBounds(){return this._sectionBounds}constructor(e){super(e),this._isVisible=!1,this._rootBounds={top:0,left:0,width:1,height:1},this._sectionBounds={top:0,left:0,width:1,height:1},this._isVisible=!this.props.optimized,this._setup()}_setup(){this._setupObserver(),this._setupScroll()}_setupObserver(){if(!this.props.optimized)return;let{section:e}=this.props,t=new IntersectionObserver(i=>{i.forEach(r=>{r.target===e&&(this._isVisible=r.isIntersecting,this.update())})});t.observe(e),this.onDestroy(()=>t.disconnect())}_setupScroll(){let e=this.props.root||window,t=f(e,"scroll",()=>{this._isVisible&&this.update()},{passive:!1});this.onDestroy(t)}update(){let{section:e,props:t}=this,i=t.root,r=d(),n=e.getBoundingClientRect(),o={top:0,left:0,width:r.width,height:t.useSvh?r.sHeight:r.height};this._rootBounds=i?i.getBoundingClientRect():o,this._sectionBounds={top:n.top-this._rootBounds.top,left:n.left-this._rootBounds.left,width:n.width,height:n.height},this.callbacks.emit("update",void 0)}getProgress(e,t,i,r){let n=oe(this._sectionBounds.top,[e,i]),o=oe(this._sectionBounds.left,[r,t]);return{x:Number.isNaN(o)?0:o,y:Number.isNaN(n)?0:n}}get inProgress(){let{rootBounds:e,sectionBounds:t}=this,i=this.rootBounds.height,r=t.width>e.width?0:e.width-t.width,n=t.height>e.height?0:e.height-t.height,o=this.rootBounds.width;return this.getProgress(i,r,n,o)}get outProgress(){let{rootBounds:e,sectionBounds:t}=this,i=Math.min(e.height-t.height,0),r=-t.width,n=-t.height,o=Math.min(e.width-t.width,0);return this.getProgress(i,r,n,o)}get moveProgress(){let{rootBounds:e,sectionBounds:t}=this,i=t.height>e.height?0:e.height-t.height,r=t.width>e.width?-(t.width-e.width):0,n=t.height>e.height?-(t.height-e.height):0,o=t.width>e.width?0:e.width-t.width;return this.getProgress(i,r,n,o)}get progress(){let{sectionBounds:e,rootBounds:t}=this,i=t.height,r=-e.width,n=-e.height,o=t.width;return this.getProgress(i,r,n,o)}};var U=class{constructor(e,t={}){this._element=e,this._coord=0,this._isAppended=!1,this._isVisible=!1,this._staticCoord=0,this._progress=0,this._id=Y("snap-slide"),this._index=0;let i={size:"auto",virtual:!1};if(this._props=Object.assign(Object.assign({},i),t),this.props.virtual&&(!t.size||t.size==="auto"))throw new Error("Virtual slide must have a size")}get element(){return this._element}get props(){return this._props}get id(){return this._id}get index(){return this._index}get snap(){return this._snap}get coord(){return this._coord}setCoord(e){var t,i;this._coord=e,this._isVisible=this.size>0&&this.coord>-this.size&&this.coord<((i=(t=this.snap)===null||t===void 0?void 0:t.domSize)!==null&&i!==void 0?i:0)}get staticCoord(){return this._staticCoord}setStaticCoord(e){this._staticCoord=e}get progress(){return this._progress}setProgress(e){this._progress=e}get size(){var e,t,i;return this.props.size==="auto"?(i=(e=this._domSize)!==null&&e!==void 0?e:(t=this.snap)===null||t===void 0?void 0:t.domSize)!==null&&i!==void 0?i:0:E(this.props.size)}get isVisible(){return this._isVisible}resize(e=!1){let{element:t,snap:i}=this;if(i){if(t){let{direction:r}=i.props;this._domSize=r==="horizontal"?t.offsetWidth:t.offsetHeight}i.resize(e)}}attach(e,t){this.detach(),this._snap=e,this._index=t,this.element&&this.props.size==="auto"&&(this._onResize=S({element:this.element,callback:()=>this.resize(),name:"Snap Slide"})),this.resize()}detach(){var e;this._snap=void 0,(e=this._onResize)===null||e===void 0||e.remove()}render(){this._toggleAppend()}_toggleAppend(){if(!this.props.virtual||!this.element||!this.snap)return;let{element:e}=this,{container:t}=this.snap;this.isVisible&&!this._isAppended?(this._isAppended=!0,t.appendChild(e)):!this.isVisible&&this._isAppended&&(this._isAppended=!1,t.removeChild(e))}get magnets(){if(!this.snap)return[];let{snap:e,staticCoord:t,size:i,index:r}=this,{domSize:n,track:o,firstSlideSize:h}=e,c=[];if(r===0&&e.props.loop&&c.push(o.max),e.props.centered){let a=t+i/2-h/2;i>n?(c.push(a+(n-i)/2),c.push(a-(n-i)/2)):c.push(a)}else c.push(t),i>n&&c.push(t+(i-n));return!o.canLoop&&!e.props.centered&&(c=c.map(a=>b(a,0,o.max))),c}};var ce=class{constructor(e){this._snap=e,this._hasStarted=!1,this._accum=0,e.on("destroy",()=>this._destroy(),{protected:!0}),this._destructor=f(e.container,"wheel",t=>this._handleWheel(t))}get snap(){return this._snap}_handleWheel(e){let{snap:t}=this;if(!t.props.wheel)return;e.preventDefault();let{wheelAxis:i}=t.props;this._hasStarted||(this._hasStarted=!0,t.callbacks.emit("wheelStart",void 0)),t.callbacks.emit("wheel",e);let r=i==="auto"?t.axis:i,n=Ee(e),h=(r==="x"?n.pixelX:n.pixelY)*t.props.wheelSpeed;t.props.followWheel?this._handleFollow(h):this._handleNotFollow(h),this._debounceEnd&&clearTimeout(this._debounceEnd),this._debounceEnd=setTimeout(()=>this._handleEnd(),100)}_handleFollow(e){let{snap:t}=this;t.cancelTransition(),t.track.iterateTarget(e),t.track.clampTarget()}_handleNotFollow(e){if(this.snap.isTransitioning||Math.abs(e)<10)return;this._accum+=Math.abs(e)/2;let t=Math.sign(e);Math.abs(this._accum)<100||(t===1?this.snap.next():this.snap.prev(),this._accum=0)}_handleEnd(){let{snap:e}=this,{freemode:t,followWheel:i}=e.props;this._hasStarted=!1,this._accum=0,!t&&i&&e.stick(),e.callbacks.emit("wheelEnd",void 0)}_destroy(){this._destructor(),this._debounceEnd&&clearTimeout(this._debounceEnd)}};var le=class{constructor(e){this.snap=e,e.on("destroy",()=>this._destroy(),{protected:!0}),this._startIndex=e.activeIndex,this._startTime=0,this._swipe=new D({container:e.container,enabled:e.props.swipe,grabCursor:e.props.grabCursor,minTime:e.props.swipeMinTime,threshold:e.props.swipeThreshold,axis:this.axis,inertia:e.props.freemode}),this._swipe.on("start",t=>this._handleSwipeStart(t)),this._swipe.on("move",t=>this._handleSwipeMove(t)),this._swipe.on("end",t=>this._handleSwipeEnd(t)),e.on("props",()=>{this._swipe.updateProps({enabled:e.props.swipe,grabCursor:e.props.grabCursor,minTime:e.props.swipeMinTime,threshold:e.props.swipeThreshold,axis:this.axis,inertia:e.props.freemode})},{protected:!0})}get axis(){let{snap:e}=this;return e.props.swipeAxis==="auto"?e.axis:e.props.swipeAxis}get isSwiping(){return this._swipe.isSwiping}get isShort(){let{props:e}=this.snap;return e.shortSwipes?+new Date-this._startTime<=e.shortSwipesDuration:!1}get allowFriction(){return!this.isShort&&this.snap.props.swipeFriction}get diff(){return this.axis==="x"?this._swipe.diff.x:this._swipe.diff.y}_handleSwipeStart(e){let{snap:t}=this;this._startIndex=t.activeIndex,this._startTime=+new Date,t.container.style.pointerEvents="none",t.props.followSwipe&&t.cancelTransition(),t.callbacks.emit("swipeStart",e)}_handleSwipeMove(e){let{snap:t}=this,{swipeSpeed:i,followSwipe:r}=t.props;if(!r)return;let o=(this.axis==="x"?e.step.x:e.step.y)*-i;t.track.iterateTarget(o),this._swipe.hasInertia&&t.track.clampTarget(),t.callbacks.emit("swipe",e)}_handleSwipeEnd(e){this._end(),this.snap.container.style.pointerEvents="",this.snap.callbacks.emit("swipeEnd",e)}_end(){let{snap:e,_swipe:t}=this,{props:i,track:r}=e;if(!i.followSwipe){this._endNoFollow();return}if(i.freemode){!r.canLoop&&(r.target<r.min||r.target>r.max)&&(t.cancelInertia(),e.stick());return}e.track.isSlideScrolling||(this.isShort?this._endShort():e.stick())}_endShort(){let{diff:e,snap:t}=this,{props:i,activeSlide:r}=t;if(Math.abs(e)<i.shortSwipesThreshold){t.stick();return}if(this._startIndex!==t.activeIndex){Math.sign(e)<0&&r.progress>0?t.next():Math.sign(e)>0&&r.progress<0?t.prev():t.stick();return}Math.sign(e)<0?t.next():t.prev()}_endNoFollow(){let{diff:e,snap:t}=this;if(Math.abs(e)<20){t.stick();return}e<0?t.next():t.prev()}_destroy(){this._swipe.destroy()}};var de=class{constructor(e){this.snap=e,this._current=0,this._target=0}get current(){return this._current}set current(e){this._current=e}get target(){return this._target}set target(e){this._target=e}set(e){this.current=e,this.target=e}get canLoop(){return this.snap.props.loop&&this.snap.slides.length>1}get loopedCurrent(){return this.canLoop?O(this.current,this.min,this.max):this.current}lerp(e){let{target:t}=this,{snap:i,min:r,max:n}=this;if(!i.props.loop){let{domSize:o,props:h}=i,c=(1-h.edgeFriction)*o;if(t<r){let a=1-z(t,-o,r);t=r-a*c}else if(t>n){let a=z(t,n,n+o);t=n+a*c}t=b(t,r-c,n+c)}this.current=M(this.current,t,e,1e-6)}get isInterpolated(){return this.current===this.target}get min(){let{snap:e}=this;if(this.canLoop||e.isEmpty)return 0;if(e.props.centered){let t=e.slides[0];if(t.size>e.domSize)return e.domSize/2-t.size/2}return 0}get max(){let{domSize:e,slides:t,isEmpty:i,props:r}=this.snap,{canLoop:n}=this;if(i)return 0;let o=t[0],h=t[t.length-1],c=h.staticCoord+h.size,a=n?c+E(r.gap):c-e;return n||(r.centered&&(a+=e/2-o.size/2,h.size<e&&(a+=e/2-h.size/2)),r.centered||(a=Math.max(a,0))),a}get progress(){return this.current/this.max}iterateTarget(e){let{snap:t}=this;this.target+=e,t._raf.play()}clampTarget(){let{snap:e}=this;this.canLoop||(this.target=b(this.target,this.min,this.max)),e._raf.play()}get isStart(){return Math.floor(this.target)<=Math.floor(this.min)}get isEnd(){return Math.floor(this.target)>=Math.floor(this.max)}get isSlideScrolling(){let{snap:e}=this,{domSize:t}=e;return e.scrollableSlides.some(({size:i,coord:r})=>et(r,t-i,0))}};var pe=class{constructor(e){this._snap=e,this._destructors=[],e.on("destroy",()=>this._destroy(),{protected:!0}),this._destructors.push(f(e.container,"scroll",()=>this._handleScroll()))}get snap(){return this._snap}_handleScroll(){this.snap.container.scrollTo({top:0,left:0,behavior:"instant"})}_destroy(){this._destructors.forEach(e=>e())}};var ct=class extends m{_getStatic(){return Object.assign(Object.assign({},super._getStatic()),{activeIndex:0})}_getMutable(){return Object.assign(Object.assign({},super._getMutable()),{slides:!1,direction:"horizontal",centered:!1,loop:!1,gap:0,lerp:.2,freemode:!1,stickOnResize:!0,friction:.15,edgeFriction:.85,duration:500,easing:R,swipe:!0,grabCursor:!1,swipeSpeed:1,swipeAxis:"auto",followSwipe:!0,shortSwipes:!0,shortSwipesDuration:300,shortSwipesThreshold:30,swipeFriction:!1,swipeLerp:d().mobile?1:.6,swipeThreshold:5,swipeMinTime:0,wheel:!1,wheelSpeed:1,wheelAxis:"auto",followWheel:!0})}constructor(e){super(e),this._domSize=0,this._slides=[],this._scrollableSlides=[];let{container:t,activeIndex:i}=this.props;this._activeIndex=i,this._resizeHandler=S({element:t,callback:()=>this._handleResize(),name:this.name}),this._resizeHandler.debounceResize(),this._raf=new I,this._raf.on("frame",()=>this._handleRaf()),this._raf.on("play",()=>this._callbacks.emit("rafPlay",void 0)),this._raf.on("pause",()=>this._callbacks.emit("rafPause",void 0)),this._fetchSlides(),this._wheel=new ce(this),this._swipe=new le(this),this._track=new de(this),this._keyboard=new pe(this)}_handleProps(){this._fetchSlides(),this._resizeHandler.resize(),super._handleProps()}_fetchSlides(){this._slides.forEach(t=>t.detach());let e=this.props.slides?this.props.slides:Array.from(this.props.container.children);this._slides=e.map(t=>t instanceof U?t:new U(t)),this._slides.forEach((t,i)=>t.attach(this,i))}resize(e=!1){e?this._resizeHandler.resize():this._resizeHandler.debounceResize()}_handleResize(){let{direction:e,container:t}=this.props;this.cancelTransition(),this._domSize=e==="horizontal"?t.offsetWidth:t.offsetHeight,this._reflow(),this.callbacks.emit("resize",void 0)}get container(){return this.props.container}get domSize(){return this._domSize}get slides(){return this._slides}get scrollableSlides(){return this._scrollableSlides}get activeIndex(){return this._activeIndex}get activeSlide(){return this.slides[this._activeIndex]}get isEmpty(){return this.slides.length===0}get axis(){return this.props.direction==="horizontal"?"x":"y"}get track(){return this._track}get isTransitioning(){return!!this._timeline}_reflow(){let{slides:e,props:t}=this;if(e.length===0)return;this._scrollableSlides=[],e.reduce((r,n)=>(n.setStaticCoord(r),n.size>this.domSize&&this._scrollableSlides.push(n),r+n.size+E(t.gap)),0);let i=e.find(({index:r})=>r===this.activeIndex);t.stickOnResize&&i&&(this.track.clampTarget(),this.track.set(i.staticCoord)),this.callbacks.emit("reflow",void 0),this._render()}_handleRaf(){if(this.isTransitioning)return;let{track:e,props:t,_swipe:i}=this,r=i.isSwiping&&t.swipeLerp?t.swipeLerp:t.lerp;e.lerp(this._raf.lerpFactor(r)),e.isInterpolated&&this._raf.pause(),this._render(this._raf.duration)}_render(e=0){if(this.isEmpty)return;let{track:t,props:i}=this;this._updateSlidesCoords(),this._updateSlidesProgress();let{magnet:r,_swipe:n}=this;r&&r.slide.index!==this._activeIndex&&(this._activeIndex=r.slide.index,this.callbacks.emit("activeSlide",this.activeSlide));let o=n.isSwiping&&n.allowFriction||!n.isSwiping;r&&o&&e>0&&i.friction>=0&&!t.isSlideScrolling&&!i.freemode&&(t.target=Se(t.target,t.current+r.diff,i.friction*i.lerp,e,1e-6)),this.slides.forEach(h=>h.render()),this.callbacks.emit("update",void 0)}_updateSlidesCoords(){let{slides:e,track:t}=this,{centered:i}=this.props,r=i?this._domSize/2-this.firstSlideSize/2:0;e.forEach(n=>{let{staticCoord:o,size:h}=n;if(!t.canLoop){n.setCoord(o+r-t.current);return}if(i){n.setCoord(O(o+r-t.current,-t.max/2+r,t.max/2+r));return}n.setCoord(O(o-t.current,-h,t.max-h))})}get firstSlideSize(){return this.slides[0].size}_updateSlidesProgress(){let{slides:e,domSize:t}=this;e.forEach(i=>{let{coord:r,size:n}=i;if(this.props.centered){let o=t/2-n/2;i.setProgress(z(r,o,o-n));return}i.setProgress(z(r,0,-n))})}get magnet(){let e=this.track.loopedCurrent,t=this.slides.flatMap(r=>r.magnets.map(n=>({slide:r,magnet:n,index:r.index})));if(t.length===0)return;let i=t.reduce((r,n)=>Math.abs(n.magnet-e)<Math.abs(r.magnet-e)?n:r);return Object.assign(Object.assign({},i),{diff:i.magnet-e})}cancelTransition(){var e;(e=this._timeline)===null||e===void 0||e.destroy(),this._timeline=void 0}stick(){let{magnet:e}=this;this.track.isSlideScrolling||!e||this.toCoord(this.track.current+e.diff)}toCoord(e,t=this.props.duration){if(this.isEmpty)return;this.cancelTransition();let{track:i,props:r,callbacks:n}=this,o=i.current,h=e,c=Math.abs(h-o),a=new C({duration:typeof t=="number"?t:t(c),easing:r.easing});this._timeline=a,a.on("start",()=>n.emit("timelineStart",void 0)),a.on("update",u=>{i.current=M(o,h,u.eased),i.target=i.current,this._render(),n.emit("timelineUpdate",u)}),a.on("end",()=>{a.destroy(),n.emit("timelineEnd",void 0),this._timeline=void 0}),a.play()}toSlide(e,t=this.props.duration){let{isEmpty:i,activeIndex:r,slides:n,track:o}=this;if(i)return;let h=O(e,0,this.slides.length);if(h===r){this.stick();return}let c=n[h].magnets,a=o.loopedCurrent,u=c.reduce((l,p)=>Math.abs(p-a)<Math.abs(l-a)?p:l);this.toCoord(this.track.current+(u-o.loopedCurrent),t)}next(e=this.props.duration){let{props:t,slides:i,activeIndex:r}=this,n=t.loop?O(r+1,0,i.length):Math.min(r+1,i.length-1);this.toSlide(n,e)}prev(e=this.props.duration){let{props:t,slides:i,activeIndex:r}=this,n=t.loop?O(r-1,0,i.length):Math.max(r-1,0);this.toSlide(n,e)}_destroy(){super._destroy(),this._resizeHandler.remove(),this.cancelTransition(),this._raf.destroy(),this._slides.forEach(e=>e.detach())}};var $s=gt(Vs());function Fs({wordsMeta:s,classname:e,tagName:t}){let i=[];return s.forEach(r=>{let n=r.element.childNodes[0];if(!n)return;let o=n.textContent;if(!o)return;(0,$s.default)(o,"").forEach(c=>{let a=document.createElement(t);a.style.display="inline-block",a.classList.add(e),a.appendChild(document.createTextNode(c)),r.element.append(a);let u={element:a};r.letters.push(u),i.push(u)}),n.remove()}),{lettersMeta:i}}function Hs({container:s,classname:e,tagName:t}){let i=" ",r=[];function n(o){var h,c;if(o instanceof HTMLElement||o instanceof DocumentFragment){"tagName"in o&&o.tagName!=="BR"&&(o.style.display="inline-block"),[...Array.from(o.childNodes)].forEach(u=>n(u));return}if(o.nodeType===3){let a=(h=o.parentElement)!==null&&h!==void 0?h:s,u=(c=o.nodeValue)!==null&&c!==void 0?c:"",l=u.split(i);if(u===i){a==null||a.insertBefore(document.createTextNode(i),o),o.remove();return}l.forEach((p,g)=>{if(p){let _=document.createElement(t);_.style.display="inline-block",_.classList.add(e),_.appendChild(document.createTextNode(p)),r.push({element:_,letters:[]}),a==null||a.insertBefore(_,o)}g<l.length-1&&(a==null||a.insertBefore(document.createTextNode(i),o))}),o.remove()}}return n(s),r}function Xs({container:s,letterClassName:e,wordClassName:t,hasLetters:i,letterTag:r,wordTag:n}){let o=document.createDocumentFragment();for(;s.childNodes[0];)o.appendChild(s.childNodes[0]);let h=Hs({container:o,classname:t,tagName:n}),c=[];if(i){let a=Fs({wordsMeta:h,classname:e,tagName:r});c.push(...a.lettersMeta)}return s.appendChild(o),{wordsMeta:h,lettersMeta:c}}function Us(s,e){var t;return(s==null?void 0:s.parentElement)===e?s:Us((t=s==null?void 0:s.parentElement)!==null&&t!==void 0?t:null,e)}function Qs(s,e){return s===e?!0:s!==null?Qs(s.parentNode,e):!1}function qs({container:s,hasLinesWrapper:e,wordsMeta:t,lineClassName:i,lineWrapperClassName:r,tagName:n}){let o=[],h=-1,c=1/0;t.forEach(l=>{var p;let g=Math.round(l.element.offsetTop),_=Us(l.element,s);if(g!==c){c=g,h+=1;let y=document.createElement(n);y.style.display="block",y.classList.add(i);let v;e&&(v=document.createElement(n),v.style.display="block",v.classList.add(r),v.appendChild(y)),o[h]={element:y,wrapper:v,nodes:[],words:[]}}let T=o[h];!!o.find(({nodes:y})=>y.includes(_))||(T.nodes.push(_),((p=_.nextSibling)===null||p===void 0?void 0:p.nodeType)===3&&T.nodes.push(_.nextSibling))}),o.forEach(l=>{var p;s.insertBefore((p=l.wrapper)!==null&&p!==void 0?p:l.element,l.nodes[0]);let g=document.createDocumentFragment();g.append(...l.nodes),l.element.append(g)});let a=[];return o.forEach(l=>{var p;let g=((p=l.wrapper)!==null&&p!==void 0?p:l.element).nextElementSibling;g instanceof HTMLBRElement&&(g.style.display="none",a.push(g))}),o.forEach(l=>{l.words.push(...t.filter(p=>Qs(p.element,l.element)))}),{linesMeta:o,destroy:()=>{let l=!0;return a.forEach(p=>{p.style.display=""}),o.forEach(p=>{var g;p.nodes.forEach(_=>{var T;let j=(T=p.wrapper)!==null&&T!==void 0?T:p.element;j.parentElement?s.insertBefore(_,j):l=!1}),p.element.remove(),(g=p.wrapper)===null||g===void 0||g.remove()}),l}}}function Ys(s){let e=[];function t(i){e.push({node:i,parent:i.parentNode}),i.childNodes.forEach(r=>t(r))}return s.childNodes.forEach(i=>t(i)),{restore:()=>{let i=document.createDocumentFragment();for(e.forEach(r=>{for(;r.node.childNodes[0];)r.node.childNodes[0].remove();r.parent&&(r.parent===s?i:r.parent).appendChild(r.node)});s.childNodes[0];)s.childNodes[0].remove();s.appendChild(i)}}}var mt=class extends m{_getStatic(){return Object.assign(Object.assign({},super._getStatic()),{letters:!1,lines:!1,linesWrapper:!1,letterTag:"span",wordTag:"span",lineTag:"span",resizeDebounce:0})}_getMutable(){return Object.assign({},super._getMutable())}get prefix(){return`${d().prefix}split-text`}get lettersMeta(){return this._lettersMeta}get letters(){return this._lettersMeta.map(e=>e.element)}get wordsMeta(){return this._wordsMeta}get words(){return this._wordsMeta.map(e=>e.element)}get linesMeta(){return this._linesMeta}get lines(){return this._linesMeta.map(e=>e.element)}constructor(e){super(e),this._isBaseSplit=!1,this._lettersMeta=[],this._wordsMeta=[],this._linesMeta=[];let{container:t}=this.props;t.style.fontKerning="none",this._addTempClassName(t,this._cn("")),t.translate=!1,this._savedNodes=Ys(t),this._setup()}_setup(){let{container:e,resizeDebounce:t}=this.props;if(!this.props.lines){this.split();return}let i=S({callback:()=>this.split(),element:e,viewportTarget:"width",resizeDebounce:t,name:this.name});i.resize(),this.onDestroy(()=>i.remove())}split(){this.callbacks.emit("beforeSplit",void 0),this._splitBase(),this.props.lines&&this._splitLines(),this.callbacks.emit("split",void 0)}_splitBase(){if(this._isBaseSplit)return;let{container:e,letterTag:t,wordTag:i}=this.props;this._isBaseSplit=!0;let{wordsMeta:r,lettersMeta:n}=Xs({container:e,letterClassName:this._cn("__letter"),wordClassName:this._cn("__word"),hasLetters:this.props.letters,letterTag:t,wordTag:i});this._wordsMeta=r,this._lettersMeta=n}_splitLines(){var e;let{wordsMeta:t}=this,{container:i,lineTag:r}=this.props;i.offsetParent!==null&&((e=this._lineSplitWrapper)===null||e===void 0||e.destroy(),this._lineSplitWrapper=qs({container:i,hasLinesWrapper:this.props.linesWrapper,wordsMeta:t,lineClassName:this._cn("__line"),lineWrapperClassName:this._cn("__line-wrapper"),tagName:r}),this._linesMeta=this._lineSplitWrapper.linesMeta)}_destroy(){var e;super._destroy();let t=(e=this._lineSplitWrapper)===null||e===void 0?void 0:e.destroy();this._lineSplitWrapper=void 0,t&&this._savedNodes.restore()}};var Gs=typeof window!="undefined"?d():void 0,br=Gs;return ii(vr);})();
|
|
166
|
+
/*! Bundled license information:
|
|
167
|
+
|
|
168
|
+
normalize-wheel/src/isEventSupported.js:
|
|
169
|
+
(**
|
|
170
|
+
* Checks if an event is supported in the current execution environment.
|
|
171
|
+
*
|
|
172
|
+
* NOTE: This will not work correctly for non-generic events such as `change`,
|
|
173
|
+
* `reset`, `load`, `error`, and `select`.
|
|
174
|
+
*
|
|
175
|
+
* Borrows from Modernizr.
|
|
176
|
+
*
|
|
177
|
+
* @param {string} eventNameSuffix Event name, e.g. "click".
|
|
178
|
+
* @param {?boolean} capture Check if the capture phase is supported.
|
|
179
|
+
* @return {boolean} True if the event is supported.
|
|
180
|
+
* @internal
|
|
181
|
+
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
|
182
|
+
*)
|
|
183
|
+
*/
|
|
@@ -44,7 +44,6 @@ exports.Preloader = void 0;
|
|
|
44
44
|
var Module_1 = require("../../base/Module");
|
|
45
45
|
var Timeline_1 = require("../Timeline");
|
|
46
46
|
var initVevet_1 = require("../../global/initVevet");
|
|
47
|
-
var easing_1 = require("../../utils/math/easing");
|
|
48
47
|
__exportStar(require("./types"), exports);
|
|
49
48
|
/**
|
|
50
49
|
* Page preloader component that manages the visibility and lifecycle of a loading screen.
|
|
@@ -147,7 +146,7 @@ var Preloader = /** @class */ (function (_super) {
|
|
|
147
146
|
onHidden();
|
|
148
147
|
return;
|
|
149
148
|
}
|
|
150
|
-
var tm = new Timeline_1.Timeline({ duration: duration
|
|
149
|
+
var tm = new Timeline_1.Timeline({ duration: duration });
|
|
151
150
|
this.onDestroy(function () { return tm.destroy(); });
|
|
152
151
|
tm.on('update', function (_a) {
|
|
153
152
|
var progress = _a.progress;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Preloader/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,wCAAuC;AACvC,wCAAuC;AACvC,gDAA+C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Preloader/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,wCAAuC;AACvC,wCAAuC;AACvC,gDAA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
|
262
|
-
var endTimeline = new Timeline_1.Timeline({
|
|
263
|
-
duration: this.props.endDuration,
|
|
264
|
-
easing: math_1.EaseInOutSine,
|
|
265
|
-
});
|
|
262
|
+
var endTimeline = new Timeline_1.Timeline({ duration: this.props.endDuration });
|
|
266
263
|
this.onDestroy(function () { return endTimeline.destroy(); });
|
|
267
264
|
endTimeline.on('update', function (_a) {
|
|
268
265
|
var progress = _a.progress;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/ProgressPreloader/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,wCAAuC;AACvC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/ProgressPreloader/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,wCAAuC;AACvC,qCAA2C;AAC3C,qDAAoD;AACpD,qDAAoD;AACpD,qEAAoE;AAOpE,0CAAyC;AACzC,8BAA6B;AAC7B,gDAA+C;AAE/C,0CAAwB;AAExB;;;;;;;GAOG;AACH;IAOU,qCAAkD;IAyE1D,2BAAY,KAAkC;QAC5C,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;QAnDf;;WAEG;QACO,gBAAU,GAAiC;YACnD,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;SACrC,CAAC;QA8BF;;WAEG;QACO,eAAS,GAAG,CAAC,CAAC;QAetB,yDAAyD;QACzD,KAAI,CAAC,IAAI,GAAG,IAAI,SAAG,EAAE,CAAC;QACtB,KAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,UAAC,EAAc;gBAAZ,UAAU,gBAAA;YACjC,KAAI,CAAC,aAAa,CAChB,IAAA,WAAI,EAAC,KAAI,CAAC,SAAS,EAAE,KAAI,CAAC,YA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C,IAAI,EAAE,CAAC;IACrB,CAAC;IAED;;OAEG;IACO,qCAAS,GAAnB,UAAoB,QAAoB;QAAxC,iBAaC;QAZC,IAAI,QAAQ,GAAG,KAAK,CAAC;QAErB,IAAI,CAAC,SAAS,CAAC,EAAE,CACf,UAAU,EACV,CAAC;YACC,IAAI,KAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACpC,QAAQ,GAAG,IAAI,CAAC;gBAChB,QAAQ,EAAE,CAAC;YACb,CAAC;QACH,CAAC,CAAQ,EACT,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CACrC,CAAC;IACJ,CAAC;IAED;;OAEG;IACO,oCAAQ,GAAlB;QACE,gBAAK,CAAC,QAAQ,WAAE,CAAC;QAEjB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;IACtB,CAAC;IACH,wBAAC;AAAD,CAAC,AAhRD,CAOU,qBAAS,GAyQlB;AAhRY,8CAAiB"}
|
|
@@ -17,10 +17,12 @@ var SnapSlide = /** @class */ (function () {
|
|
|
17
17
|
function SnapSlide(_element, initProps) {
|
|
18
18
|
if (initProps === void 0) { initProps = {}; }
|
|
19
19
|
this._element = _element;
|
|
20
|
-
/** If the slide is appended */
|
|
21
|
-
this._isAppended = false;
|
|
22
20
|
/** Current coordinate */
|
|
23
21
|
this._coord = 0;
|
|
22
|
+
/** If the slide is appended */
|
|
23
|
+
this._isAppended = false;
|
|
24
|
+
/** If the slide is visible */
|
|
25
|
+
this._isVisible = false;
|
|
24
26
|
/** Static coordinate (as if the slide was never moved) */
|
|
25
27
|
this._staticCoord = 0;
|
|
26
28
|
/** Current progress of slide movement: from -1 to 1 */
|
|
@@ -86,7 +88,12 @@ var SnapSlide = /** @class */ (function () {
|
|
|
86
88
|
});
|
|
87
89
|
/** Current coordinate. Do not update it manually! */
|
|
88
90
|
SnapSlide.prototype.setCoord = function (value) {
|
|
91
|
+
var _a, _b;
|
|
89
92
|
this._coord = value;
|
|
93
|
+
this._isVisible =
|
|
94
|
+
this.size > 0 &&
|
|
95
|
+
this.coord > -this.size &&
|
|
96
|
+
this.coord < ((_b = (_a = this.snap) === null || _a === void 0 ? void 0 : _a.domSize) !== null && _b !== void 0 ? _b : 0);
|
|
90
97
|
};
|
|
91
98
|
Object.defineProperty(SnapSlide.prototype, "staticCoord", {
|
|
92
99
|
/** Static coordinate (as if the slide was never moved) */
|
|
@@ -96,7 +103,7 @@ var SnapSlide = /** @class */ (function () {
|
|
|
96
103
|
enumerable: false,
|
|
97
104
|
configurable: true
|
|
98
105
|
});
|
|
99
|
-
/** Static coordinate (as if the slide was never moved). Do not update it manually! */
|
|
106
|
+
/** Static coordinate (as if the slide was never moved). Do not update it manually! Alignment: start */
|
|
100
107
|
SnapSlide.prototype.setStaticCoord = function (value) {
|
|
101
108
|
this._staticCoord = value;
|
|
102
109
|
};
|
|
@@ -127,10 +134,7 @@ var SnapSlide = /** @class */ (function () {
|
|
|
127
134
|
Object.defineProperty(SnapSlide.prototype, "isVisible", {
|
|
128
135
|
/** Check if the slide is visible */
|
|
129
136
|
get: function () {
|
|
130
|
-
|
|
131
|
-
return (this.size > 0 &&
|
|
132
|
-
this.coord > -this.size &&
|
|
133
|
-
this.coord < ((_b = (_a = this.snap) === null || _a === void 0 ? void 0 : _a.domSize) !== null && _b !== void 0 ? _b : 0));
|
|
137
|
+
return this._isVisible;
|
|
134
138
|
},
|
|
135
139
|
enumerable: false,
|
|
136
140
|
configurable: true
|
|
@@ -192,6 +196,42 @@ var SnapSlide = /** @class */ (function () {
|
|
|
192
196
|
container.removeChild(element);
|
|
193
197
|
}
|
|
194
198
|
};
|
|
199
|
+
Object.defineProperty(SnapSlide.prototype, "magnets", {
|
|
200
|
+
/** Get magnets with static coordinates but dynamic alignment */
|
|
201
|
+
get: function () {
|
|
202
|
+
if (!this.snap) {
|
|
203
|
+
return [];
|
|
204
|
+
}
|
|
205
|
+
var _a = this, snap = _a.snap, staticCoord = _a.staticCoord, size = _a.size, index = _a.index;
|
|
206
|
+
var domSize = snap.domSize, track = snap.track, firstSlideSize = snap.firstSlideSize;
|
|
207
|
+
var points = [];
|
|
208
|
+
if (index === 0 && snap.props.loop) {
|
|
209
|
+
points.push(track.max);
|
|
210
|
+
}
|
|
211
|
+
if (snap.props.centered) {
|
|
212
|
+
var point = staticCoord + size / 2 - firstSlideSize / 2;
|
|
213
|
+
if (size > domSize) {
|
|
214
|
+
points.push(point + (domSize - size) / 2);
|
|
215
|
+
points.push(point - (domSize - size) / 2);
|
|
216
|
+
}
|
|
217
|
+
else {
|
|
218
|
+
points.push(point);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
points.push(staticCoord);
|
|
223
|
+
if (size > domSize) {
|
|
224
|
+
points.push(staticCoord + (size - domSize));
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
if (!track.canLoop && !snap.props.centered) {
|
|
228
|
+
points = points.map(function (point) { return (0, utils_1.clamp)(point, 0, track.max); });
|
|
229
|
+
}
|
|
230
|
+
return points;
|
|
231
|
+
},
|
|
232
|
+
enumerable: false,
|
|
233
|
+
configurable: true
|
|
234
|
+
});
|
|
195
235
|
return SnapSlide;
|
|
196
236
|
}());
|
|
197
237
|
exports.SnapSlide = SnapSlide;
|