vevet
Version:
Vevet is a JavaScript library for creative development that simplifies crafting rich interactions like split text animations, carousels, marquees, preloading, and more.
96 lines (78 loc) • 128 kB
JavaScript
"use strict";var Vevet=(()=>{var Ur=Object.create;var Mt=Object.defineProperty;var Xr=Object.getOwnPropertyDescriptor;var Yr=Object.getOwnPropertyNames;var qr=Object.getPrototypeOf,Qr=Object.prototype.hasOwnProperty;var lt=(s,t)=>()=>(t||s((t={exports:{}}).exports,t),t.exports),Kr=(s,t)=>{for(var e in t)Mt(s,e,{get:t[e],enumerable:!0})},xi=(s,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Yr(t))!Qr.call(s,r)&&r!==e&&Mt(s,r,{get:()=>t[r],enumerable:!(i=Xr(t,r))||i.enumerable});return s};var Si=(s,t,e)=>(e=s!=null?Ur(qr(s)):{},xi(t||!s||!s.__esModule?Mt(e,"default",{value:s,enumerable:!0}):e,s)),Gr=s=>xi(Mt({},"__esModule",{value:!0}),s);var Ji=lt((ha,Gi)=>{var Xi=!1,rt,ye,xe,jt,zt,Yi,Lt,Se,Ee,Pe,qi,Oe,Te,Qi,Ki;function N(){if(!Xi){Xi=!0;var s=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(s),e=/(Mac OS X)|(Windows)|(Linux)/.exec(s);if(Oe=/\b(iPhone|iP[ao]d)/.exec(s),Te=/\b(iP[ao]d)/.exec(s),Pe=/Android/i.exec(s),Qi=/FBAN\/\w+;/i.exec(s),Ki=/Mobile/i.exec(s),qi=!!/Win64/.exec(s),t){rt=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,rt&&document&&document.documentMode&&(rt=document.documentMode);var i=/(?:Trident\/(\d+.\d+))/.exec(s);Yi=i?parseFloat(i[1])+4:rt,ye=t[2]?parseFloat(t[2]):NaN,xe=t[3]?parseFloat(t[3]):NaN,jt=t[4]?parseFloat(t[4]):NaN,jt?(t=/(?:Chrome\/(\d+\.\d+))/.exec(s),zt=t&&t[1]?parseFloat(t[1]):NaN):zt=NaN}else rt=ye=xe=zt=jt=NaN;if(e){if(e[1]){var r=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(s);Lt=r?parseFloat(r[1].replace("_",".")):!0}else Lt=!1;Se=!!e[2],Ee=!!e[3]}else Lt=Se=Ee=!1}}var Me={ie:function(){return N()||rt},ieCompatibilityMode:function(){return N()||Yi>rt},ie64:function(){return Me.ie()&&qi},firefox:function(){return N()||ye},opera:function(){return N()||xe},webkit:function(){return N()||jt},safari:function(){return Me.webkit()},chrome:function(){return N()||zt},windows:function(){return N()||Se},osx:function(){return N()||Lt},linux:function(){return N()||Ee},iphone:function(){return N()||Oe},mobile:function(){return N()||Oe||Te||Pe||Ki},nativeApp:function(){return N()||Qi},android:function(){return N()||Pe},ipad:function(){return N()||Te}};Gi.exports=Me});var ts=lt((pa,Zi)=>{"use strict";var Bt=!!(typeof window!="undefined"&&window.document&&window.document.createElement),An={canUseDOM:Bt,canUseWorkers:typeof Worker!="undefined",canUseEventListeners:Bt&&!!(window.addEventListener||window.attachEvent),canUseViewport:Bt&&!!window.screen,isInWorker:!Bt};Zi.exports=An});var rs=lt((da,ss)=>{"use strict";var es=ts(),is;es.canUseDOM&&(is=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function Cn(s,t){if(!es.canUseDOM||t&&!("addEventListener"in document))return!1;var e="on"+s,i=e in document;if(!i){var r=document.createElement("div");r.setAttribute(e,"return;"),i=typeof r[e]=="function"}return!i&&is&&s==="wheel"&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}ss.exports=Cn});var hs=lt((ua,cs)=>{"use strict";var Rn=Ji(),kn=rs(),ns=10,os=40,as=800;function ls(s){var t=0,e=0,i=0,r=0;return"detail"in s&&(e=s.detail),"wheelDelta"in s&&(e=-s.wheelDelta/120),"wheelDeltaY"in s&&(e=-s.wheelDeltaY/120),"wheelDeltaX"in s&&(t=-s.wheelDeltaX/120),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(t=e,e=0),i=t*ns,r=e*ns,"deltaY"in s&&(r=s.deltaY),"deltaX"in s&&(i=s.deltaX),(i||r)&&s.deltaMode&&(s.deltaMode==1?(i*=os,r*=os):(i*=as,r*=as)),i&&!t&&(t=i<1?-1:1),r&&!e&&(e=r<1?-1:1),{spinX:t,spinY:e,pixelX:i,pixelY:r}}ls.getEventType=function(){return Rn.firefox()?"DOMMouseScroll":kn("wheel")?"wheel":"mousewheel"};cs.exports=ls});var ds=lt((fa,ps)=>{ps.exports=hs()});var Dr=lt((Tt,vt)=>{var Kn=1/0,wr=9007199254740991,Gn=4294967295,Jn="[object Function]",Zn="[object GeneratorFunction]",to="[object RegExp]",eo="[object Symbol]",io=/^(?:0|[1-9]\d*)$/,bi="\\ud800-\\udfff",yr="\\u0300-\\u036f\\ufe20-\\ufe23",xr="\\u20d0-\\u20f0",Sr="\\ufe0e\\ufe0f",so="["+bi+"]",gi="["+yr+xr+"]",vi="\\ud83c[\\udffb-\\udfff]",ro="(?:"+gi+"|"+vi+")",Er="[^"+bi+"]",Pr="(?:\\ud83c[\\udde6-\\uddff]){2}",Or="[\\ud800-\\udbff][\\udc00-\\udfff]",Tr="\\u200d",Mr=ro+"?",Ir="["+Sr+"]?",no="(?:"+Tr+"(?:"+[Er,Pr,Or].join("|")+")"+Ir+Mr+")*",oo=Ir+Mr+no,ao="(?:"+[Er+gi+"?",gi,Pr,Or,so].join("|")+")",lo=RegExp(vi+"(?="+vi+")|"+ao+oo,"g"),co=RegExp("["+Tr+bi+yr+xr+Sr+"]"),Ar=typeof global=="object"&&global&&global.Object===Object&&global,ho=typeof self=="object"&&self&&self.Object===Object&&self,po=Ar||ho||Function("return this")(),Cr=typeof Tt=="object"&&Tt&&!Tt.nodeType&&Tt,ur=Cr&&typeof vt=="object"&&vt&&!vt.nodeType&&vt,uo=ur&&ur.exports===Cr,fr=uo&&Ar.process,mr=function(){try{return fr&&fr.binding("util")}catch(s){}}(),_r=mr&&mr.isRegExp;function fo(s){return s.split("")}function mo(s){return function(t){return s(t)}}function Rr(s){return co.test(s)}function _o(s){return Rr(s)?go(s):fo(s)}function go(s){return s.match(lo)||[]}var vo=Object.prototype,wi=vo.toString,gr=po.Symbol,vr=gr?gr.prototype:void 0,br=vr?vr.toString:void 0;function bo(s){return yi(s)&&wi.call(s)==to}function wo(s,t,e){var i=-1,r=s.length;t<0&&(t=-t>r?0:r+t),e=e>r?r:e,e<0&&(e+=r),r=t>e?0:e-t>>>0,t>>>=0;for(var n=Array(r);++i<r;)n[i]=s[i+t];return n}function kr(s){if(typeof s=="string")return s;if(Ao(s))return br?br.call(s):"";var t=s+"";return t=="0"&&1/s==-Kn?"-0":t}function yo(s,t,e){var i=s.length;return e=e===void 0?i:e,!t&&e>=i?s:wo(s,t,e)}function xo(s,t){return t=t==null?wr:t,!!t&&(typeof s=="number"||io.test(s))&&s>-1&&s%1==0&&s<t}function So(s,t,e){if(!yi(e))return!1;var i=typeof t;return(i=="number"?Po(e)&&xo(t,e.length):i=="string"&&t in e)?Eo(e[t],s):!1}function Eo(s,t){return s===t||s!==s&&t!==t}function Po(s){return s!=null&&To(s.length)&&!Oo(s)}function Oo(s){var t=yi(s)?wi.call(s):"";return t==Jn||t==Zn}function To(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=wr}function yi(s){var t=typeof s;return!!s&&(t=="object"||t=="function")}function Mo(s){return!!s&&typeof s=="object"}var Io=_r?mo(_r):bo;function Ao(s){return typeof s=="symbol"||Mo(s)&&wi.call(s)==eo}function Co(s){return s==null?"":kr(s)}function Ro(s,t,e){return e&&typeof e!="number"&&So(s,t,e)&&(t=e=void 0),e=e===void 0?Gn:e>>>0,e?(s=Co(s),s&&(typeof t=="string"||t!=null&&!Io(t))&&(t=kr(t),!t&&Rr(s))?yo(_o(s),0,e):s.split(t,e)):[]}vt.exports=Ro});var zo={};Kr(zo,{Callbacks:()=>B,Canvas:()=>it,CanvasMedia:()=>wt,Cursor:()=>dt,EaseInBack:()=>Ce,EaseInBounce:()=>Re,EaseInCirc:()=>ke,EaseInCubic:()=>De,EaseInElastic:()=>je,EaseInExpo:()=>ze,EaseInOutBack:()=>Le,EaseInOutBounce:()=>Be,EaseInOutCirc:()=>Ne,EaseInOutCubic:()=>$e,EaseInOutElastic:()=>We,EaseInOutExpo:()=>Fe,EaseInOutQuad:()=>Ve,EaseInOutQuart:()=>He,EaseInOutQuint:()=>Ue,EaseInOutSine:()=>Xe,EaseInQuad:()=>Ye,EaseInQuart:()=>qe,EaseInQuint:()=>Qe,EaseInSine:()=>Ke,EaseOutBack:()=>Ge,EaseOutBounce:()=>et,EaseOutCirc:()=>Je,EaseOutCubic:()=>nt,EaseOutElastic:()=>Ze,EaseOutExpo:()=>ti,EaseOutQuad:()=>ei,EaseOutQuart:()=>ii,EaseOutQuint:()=>si,EaseOutSine:()=>ri,InView:()=>xt,Marquee:()=>St,Module:()=>x,Pointers:()=>Et,Preloader:()=>Pt,ProgressPreloader:()=>Ot,Raf:()=>X,Responsive:()=>Wt,ScrollProgress:()=>se,Scrollbar:()=>ie,Snap:()=>gt,SnapSlide:()=>mt,SplitText:()=>me,Swipe:()=>at,Timeline:()=>L,addEventListener:()=>y,app:()=>jo,clamp:()=>w,clampScope:()=>Nt,closest:()=>Dt,damp:()=>Ae,easing:()=>ni,inRange:()=>oi,initVevet:()=>b,lerp:()=>C,loop:()=>$,normalizeWheel:()=>Ie,onResize:()=>U,presetCssVars:()=>gs,scoped:()=>J,toPixels:()=>M,uid:()=>we,vevet:()=>Vr});var Ei=function(s,t,e){if(e||arguments.length===2)for(var i=0,r=t.length,n;i<r;i++)(n||!(i in t))&&(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return s.concat(n||Array.prototype.slice.call(t))},Jr=function(){function s(t,e,i){this.name=t,this.version=e,this.os=i,this.type="browser"}return s}();var Zr=function(){function s(t){this.version=t,this.type="node",this.name="node",this.os=process.platform}return s}();var tn=function(){function s(t,e,i,r){this.name=t,this.version=e,this.os=i,this.bot=r,this.type="bot-device"}return s}();var en=function(){function s(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return s}();var sn=function(){function s(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return s}();var rn=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,nn=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,Pi=3,on=[["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",rn]],Oi=[["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 Mi(s){return s?Ti(s):typeof document=="undefined"&&typeof navigator!="undefined"&&navigator.product==="ReactNative"?new sn:typeof navigator!="undefined"?Ti(navigator.userAgent):cn()}function an(s){return s!==""&&on.reduce(function(t,e){var i=e[0],r=e[1];if(t)return t;var n=r.exec(s);return!!n&&[i,n]},!1)}function Ti(s){var t=an(s);if(!t)return null;var e=t[0],i=t[1];if(e==="searchbot")return new en;var r=i[1]&&i[1].split(".").join("_").split("_").slice(0,3);r?r.length<Pi&&(r=Ei(Ei([],r,!0),hn(Pi-r.length),!0)):r=[];var n=r.join("."),o=ln(s),a=nn.exec(s);return a&&a[1]?new tn(e,n,o,a[1]):new Jr(e,n,o)}function ln(s){for(var t=0,e=Oi.length;t<e;t++){var i=Oi[t],r=i[0],n=i[1],o=n.exec(s);if(o)return r}return null}function cn(){var s=typeof process!="undefined"&&process.version;return s?new Zr(process.version.slice(1)):null}function hn(s){for(var t=[],e=0;e<s;e++)t.push("0");return t}var pn=Object.defineProperty,dn=Object.defineProperties,un=Object.getOwnPropertyDescriptors,Ii=Object.getOwnPropertySymbols,fn=Object.prototype.hasOwnProperty,mn=Object.prototype.propertyIsEnumerable,Ai=(s,t,e)=>t in s?pn(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,It=(s,t)=>{for(var e in t||(t={}))fn.call(t,e)&&Ai(s,e,t[e]);if(Ii)for(var e of Ii(t))mn.call(t,e)&&Ai(s,e,t[e]);return s},At=(s,t)=>dn(s,un(t));var _n="Window is not available and no user agent was provided.",gn=()=>{var s,t;if(typeof window!="undefined"){let e=((s=window==null?void 0:window.navigator)==null?void 0:s.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.vendor)||(window==null?void 0:window.opera);if(e)return e}return console.error(_n),""},Ct={isInApp:!1,appKey:void 0,appName:void 0,skipped:!1},vn=s=>s.match(/(iPhone|iPad|iPod|Macintosh)/)!==null,bn=({skip:s,appKey:t,ua:e})=>{if(!s||s.length===0)return!1;let i=vn(e);return s.some(({appKey:r,platform:n})=>t===r&&(!n||i&&n==="apple"||!i&&n==="android"))},No=new RegExp(/Mozilla\/5\.0 \([^\)]+\) AppleWebKit\/[^\s]+ \(KHTML, like Gecko\) Version\/[^\s]+ (Mobile\/[^\s]+ )?Safari\/[^\s]+$/);var wn=()=>"TelegramWebview"in window||"TelegramWebviewProxy"in window||"TelegramWebviewProxyProto"in window,Ci={telegram:{name:"Telegram"}},yn=()=>{if(typeof window!="undefined"&&wn())return"telegram"},$o=Object.keys(Ci),_e={messenger:{regex:/(\bFB[\w_]+\/(Messenger))|(^(?!.*\buseragents)(?!.*\bIABMV).*(FB_IAB|FBAN).*)/i,name:"Facebook Messenger"},instagram:{regex:/\bInstagram/i,name:"Instagram"},facebook:{regex:/\bFB[\w_]+\/|\bFacebook/i,name:"Facebook"},twitter:{regex:/\bTwitter/i,name:"Twitter"},line:{regex:/\bLine\//i,name:"Line"},wechat:{regex:/\bMicroMessenger\//i,name:"WeChat"},threads:{regex:/\bBarcelona/i,name:"Threads"},tiktok:{regex:/musical_ly|Bytedance/i,name:"TikTok"},snapchat:{regex:/Snapchat/i,name:"Snapchat"},linkedin:{regex:/LinkedInApp/i,name:"LinkedIn"},gsa:{regex:/GSA/i,name:"Google Search App"},whatsapp:{regex:/\b(WAiOS|WA4A)\//i,name:"WhatsApp"}},xn=Object.keys(_e),Sn=s=>xn.find(t=>_e[t].regex.test(s)),En=["WebView","(iPhone|iPod|iPad)(?!.*Safari/)","Android.*wv\\)"],Pn=new RegExp(`${En.map(s=>`(${s})`).join("|")}`,"i");var On=(s={})=>{var t,e;let{skip:i,ua:r=""}=s,n=r||gn();if(!n)return At(It({},Ct),{ua:n});let o=l=>bn({skip:i,appKey:l,ua:n}),a=Sn(n);if(a||n.match(Pn)!==null)return o(a)?At(It({},Ct),{ua:n,skipped:!0}):{isInApp:!0,appKey:a,appName:a?_e[a].name:void 0,ua:n,skipped:!1};let c=yn();return c?o(c)?At(It({},Ct),{ua:n,skipped:!0}):{isInApp:!0,appKey:c,appName:(e=(t=Ci)==null?void 0:t[c])==null?void 0:e.name,ua:n,skipped:!1}:At(It({},Ct),{ua:n})};var Ri=On;var ge=/iPhone/i,ki=/iPod/i,Di=/iPad/i,ji=/\biOS-universal(?:.+)Mac\b/i,ve=/\bAndroid(?:.+)Mobile\b/i,zi=/Android/i,ct=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Rt=/Silk/i,G=/Windows Phone/i,Li=/\bWindows(?:.+)ARM\b/i,Bi=/BlackBerry/i,Ni=/BB10/i,$i=/Opera Mini/i,Wi=/\b(CriOS|Chrome)(?:.+)Mobile/i,Fi=/Mobile(?:.+)Firefox\b/i,Vi=function(s){return typeof s!="undefined"&&s.platform==="MacIntel"&&typeof s.maxTouchPoints=="number"&&s.maxTouchPoints>1&&typeof MSStream=="undefined"};function Tn(s){return function(t){return t.test(s)}}function kt(s){var t={userAgent:"",platform:"",maxTouchPoints:0};!s&&typeof navigator!="undefined"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof s=="string"?t.userAgent=s:s&&s.userAgent&&(t={userAgent:s.userAgent,platform:s.platform,maxTouchPoints:s.maxTouchPoints||0});var e=t.userAgent,i=e.split("[FBAN");typeof i[1]!="undefined"&&(e=i[0]),i=e.split("Twitter"),typeof i[1]!="undefined"&&(e=i[0]);var r=Tn(e),n={apple:{phone:r(ge)&&!r(G),ipod:r(ki),tablet:!r(ge)&&(r(Di)||Vi(t))&&!r(G),universal:r(ji),device:(r(ge)||r(ki)||r(Di)||r(ji)||Vi(t))&&!r(G)},amazon:{phone:r(ct),tablet:!r(ct)&&r(Rt),device:r(ct)||r(Rt)},android:{phone:!r(G)&&r(ct)||!r(G)&&r(ve),tablet:!r(G)&&!r(ct)&&!r(ve)&&(r(Rt)||r(zi)),device:!r(G)&&(r(ct)||r(Rt)||r(ve)||r(zi))||r(/\bokhttp\b/i)},windows:{phone:r(G),tablet:r(Li),device:r(G)||r(Li)},other:{blackberry:r(Bi),blackberry10:r(Ni),opera:r($i),firefox:r(Fi),chrome:r(Wi),device:r(Bi)||r(Ni)||r($i)||r(Fi)||r(Wi)},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}function S(s,t){s.classList.add(t)}function Q(s,t){t&&s.classList.remove(t)}function D(s,t,e){t&&s.classList.toggle(t,e)}function tt(s,t){return s.classList.contains(t)}var R=typeof window!="undefined",g=R?document:void 0,I=R?g.documentElement:void 0,k=R?g.body:void 0;var Hi={version:"5.9.1"};function _(s,t,e){let i=e.value;e.value=function(...n){if(!this._isDestroyed)return i.apply(this,n)}}function be(s){try{s()}catch(t){console.error(t)}}function Dt(s,t){return!Array.isArray(t)||t.length===0?s:t.reduce((e,i)=>Math.abs(i-s)<Math.abs(e-s)?i:e)}function j(s){return typeof s=="number"}function M(s){if(!R)return 0;let t=b();if(window.vevet5_toPixelsCache||(window.vevet5_toPixelsCache=new Map,t.onResize("any",()=>{window.vevet5_toPixelsCache.clear()},{name:"toPixels"})),window.vevet5_toPixelsCache.has(s))return window.vevet5_toPixelsCache.get(s);let e=0,i=parseFloat(`${s}`);return j(s)?e=s:Number.isNaN(i)?e=0:s.includes("rem")?e=i*t.rem:s.includes("vw")?e=i*t.vw:s.includes("vh")?e=i*t.vh:s.includes("svh")?e=i*t.svh:s.includes("px")&&(e=i),window.vevet5_toPixelsCache.set(s,e),e}var Ui=0;function we(s="id"){return Ui+=1,`${s}_${Ui}`}var bt=function(s,t,e,i){var r=arguments.length,n=r<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(s,t,e,i);else for(var a=s.length-1;a>=0;a--)(o=s[a])&&(n=(r<3?o(n):r>3?o(t,e,n):o(t,e))||n);return r>3&&n&&Object.defineProperty(t,e,n),n},In=function(s,t){var e={};for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&t.indexOf(i)<0&&(e[i]=s[i]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(s);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(s,i[r])&&(e[i[r]]=s[i[r]]);return e},B=class{constructor(t={}){this._props=t,this._isDestroyed=!1,this._list=[]}get list(){return this._list}add(t,e,i={}){let r=we("callback");return this._list.push(Object.assign(Object.assign({},i),{id:r,target:t,action:e})),{id:r,remove:()=>this.remove(r)}}on(t,e,i={}){let r=this.add(t,e,i);return()=>{r.remove()}}remove(t){return this._remove(t)}_remove(t,e=!1){return this._list=this._list.filter(r=>!!(r.id!==t||r.protected&&!e)),!this._list.some(({id:r})=>r===t)}_removeAll(){for(;this._list.length>0;)this._remove(this._list[0].id,!0)}_callAction(t,e){var{id:i,timeout:r,action:n}=t,o=In(t,["id","timeout","action"]);let{ctx:a}=this._props;r?setTimeout(()=>be(()=>n(e,a)),r):be(()=>n(e,a)),o.once&&this._remove(i,!0)}emit(t,e){this._list.forEach(i=>{i.target===t&&this._callAction(i,e)})}destroy(){this._removeAll(),this._isDestroyed=!0}};bt([_],B.prototype,"add",null);bt([_],B.prototype,"on",null);bt([_],B.prototype,"remove",null);bt([_],B.prototype,"emit",null);bt([_],B.prototype,"destroy",null);function y(s,t,e,i){return s.addEventListener(t,e,i),()=>{s.removeEventListener(t,e,i)}}var us=Si(ds());function Ie(s){return(0,us.default)(s)}function U({callback:s,element:t,viewportTarget:e="width",resizeDebounce:i=0,name:r}){let n=b(),o,a,c,l=h=>{o&&(clearTimeout(o),o=void 0),o=setTimeout(()=>s(),h!=null?h:i)};return t&&(a=new ResizeObserver(()=>{l(n.props.resizeDebounce+i)}),(Array.isArray(t)?t:[t]).forEach(h=>{a==null||a.observe(h)})),e&&(c=n.onResize(e,()=>l(),{name:r})),{remove:()=>{o&&clearTimeout(o),a==null||a.disconnect(),c==null||c()},resize:()=>s(),debounceResize:()=>l()}}function fs({prefix:s,applyClassNames:t}){let e=new B,i=!1;g.readyState==="complete"?setTimeout(()=>r(),0):y(window,"load",()=>r());function r(){let{body:o}=document;i=!0,t&&(Q(I,`${s}loading`),Q(o,`${s}loading`),S(I,`${s}loaded`)),e.emit("loaded",void 0)}function n(o){return i?(o(),()=>{}):e.on("loaded",()=>o())}return{onLoad:n,getIsLoaded:()=>i}}function A(s){return j(s)&&!Number.isNaN(s)&&Number.isFinite(s)}function ms({prefix:s,props:t,isMobile:e,isInApp:i,browserName:r}){let n=g.getElementById("vevet_css_preset");n||(n=g.createElement("style"),n.id="vevet_css_preset",k.appendChild(n));let o=g.createElement("div"),{style:a}=o;o.id="vevet_svh_helper",a.position="fixed",a.top="-100svh",a.left="-100px",a.width="1px",a.height="100svh",k.appendChild(o);let c=new B,l={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};f(),d(),m();let h;function p(){h&&(clearTimeout(h),h=void 0),t.resizeDebounce?h=setTimeout(()=>v(),t.resizeDebounce):v()}y(window,"resize",()=>p());let u=new ResizeObserver(()=>p());u.observe(I),u.observe(k);function v(){let{width:E,height:P}=l;f(),d(),m();let{width:T,height:O}=l;c.emit("trigger",void 0),(T!==E||O!==P)&&c.emit("any",void 0),T!==E&&O===P&&c.emit("onlyWidth",void 0),O!==P&&T===E&&c.emit("onlyHeight",void 0),T!==E&&O!==P&&c.emit("both",void 0),T!==E&&c.emit("width",void 0),O!==P&&c.emit("height",void 0)}function f(){let{width:E}=l,P=window.innerWidth,T=window.innerHeight;l.width=P,l.height=T,l.scrollbarWidth=P-I.clientWidth,l.vw=l.width/100,l.vh=l.height/100;let O=getComputedStyle(I),Y=parseFloat(O.fontSize);if(l.rem=A(Y)?Y:16,l.landscape=l.width>l.height,l.portrait=l.width<l.height,l.dpr=window.devicePixelRatio,l.lowerDpr=e?Math.min(l.dpr,2):1,e&&(i||r.includes("fxios"))){let V=I.clientHeight;(E!==l.width||!l.sHeight||E===l.width&&V<l.sHeight)&&(l.sHeight=V,l.svh=l.sHeight/100)}else l.svh=o.clientHeight/100||I.clientHeight/100,l.sHeight=l.svh*100}function d(){t.applyClassNames&&(D(I,`${s}landscape`,l.landscape),D(I,`${s}portrait`,l.portrait))}function m(){n.innerHTML=`
html {
--vw: ${l.vw}px;
--vh: ${l.vh}px;
--svh: ${l.svh}px;
--scrollbar-width: ${l.scrollbarWidth}px;
}
`}return{data:l,callbacks:c}}function _s(s){var t;let i=Object.assign(Object.assign({},{resizeDebounce:0,easing:[.25,.1,.25,1],applyClassNames:!1}),s),r="v-",n=Mi(),o=kt(),a=(t=(n==null?void 0:n.os)||"")===null||t===void 0?void 0:t.split(" ")[0].toLowerCase(),c=((n==null?void 0:n.name)||"").toLowerCase(),h=o.phone||o.tablet;h||window.matchMedia("(pointer: fine)").matches||(h=!0);let{isInApp:p,appName:u}=Ri(),v=p?(u||"unknown").toLowerCase():!1,f=fs({prefix:r,applyClassNames:i.applyClassNames}),d=ms({prefix:r,props:i,isMobile:h,isInApp:p,browserName:c}),m=Object.assign(Object.assign({},d.data),{viewportCallbacks:d.callbacks,version:Hi.version,props:i,prefix:r,phone:o.phone,tablet:o.tablet,mobile:h,osName:a,browserName:c,inAppBrowser:v,doc:g,html:I,body:k,loaded:!1,onLoad:f.onLoad,onResize:(...E)=>d.callbacks.on(...E)});return f.onLoad(()=>{m.loaded=!0}),d.callbacks.add("trigger",()=>{Object.keys(d.data).forEach(P=>{m[P]=d.data[P]})},{protected:!0,name:"vevet core"}),function(){i.applyClassNames&&(S(I,`${r}os-${a}`),S(I,`${r}browser-${c}`),D(I,`${r}phone`,m.phone),D(I,`${r}tablet`,m.tablet),D(I,`${r}mobile`,m.mobile))}(),m}function b(){var s;if(!R)return;if(window.vevet5)return window.vevet5;let t=(s=window.VEVET_PROPS)!==null&&s!==void 0?s:{},e=_s(t);return window.vevet5=e,window.vevet5}R&&(window.vevet5=b());var gs=`var presetVevetCss = function update() {
if (window.vevet5) {
return;
}
var doc = document.documentElement;
var styles = document.getElementById('vevet_css_preset');
if (!styles) {
styles = document.createElement('style');
styles.id = 'vevet_css_preset';
document.body.appendChild(styles);
}
var w = window.innerWidth;
var h = window.innerHeight;
var sh = doc.clientHeight;
var scrollbarWidth = window.innerWidth - doc.clientWidth;
styles.innerHTML = 'html { --vw: ' + w / 100 + 'px; --vh: ' + h / 100 + 'px; --svh: ' + sh / 100 + 'px; --scrollbar-width: ' + scrollbarWidth + 'px; }';
};
window.addEventListener('resize', presetVevetCss);
var presetVevetCssObserver = new ResizeObserver(presetVevetCss);
presetVevetCssObserver.observe(document.documentElement);
presetVevetCssObserver.observe(document.body);
presetVevetCss();`;function w(s,t=0,e=1){let i=Math.min(t,e),r=Math.max(t,e);return Math.max(i,Math.min(s,r))}function J(s,t=0,e=1){return(s-t)/(e-t)}function Nt(s,t=[0,1],e=[0,1]){let i=J(s,t[0],t[1]);return w(i,e[0],e[1])}function C(s,t,e,i=0){let r=s+(t-s)*e;return Math.abs(t-r)<=i?t:r}function Ae(s,t,e,i,r=0){return C(s,t,1-Math.exp(-e*60*(i/1e3)),r)}var Ce=s=>2.70158*s*s*s-1.70158*s*s;var et=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 Re=s=>1-et(1-s);var ke=s=>1-Math.sqrt(1-Math.pow(s,2));var De=s=>Math.pow(s,3);var je=s=>{let t=2*Math.PI/3;return s===0?0:s===1?1:-Math.pow(2,10*s-10)*Math.sin((s*10-10.75)*t)};var ze=s=>s===0?0:Math.pow(2,10*s-10);var Le=s=>{let e=2.5949095;return s<.5?Math.pow(2*s,2)*((e+1)*2*s-e)/2:(Math.pow(2*s-2,2)*((e+1)*(s*2-2)+e)+2)/2};var Be=s=>s<.5?(1-et(1-2*s))/2:(1+et(2*s-1))/2;var Ne=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 $e=s=>s<.5?4*s*s*s:1-Math.pow(-2*s+2,3)/2;var We=s=>{let t=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)*t))/2:Math.pow(2,-20*s+10)*Math.sin((20*s-11.125)*t)/2+1};var Fe=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 Ve=s=>s<.5?2*s*s:1-Math.pow(-2*s+2,2)/2;var He=s=>s<.5?8*s*s*s*s:1-Math.pow(-2*s+2,4)/2;var Ue=s=>s<.5?16*s*s*s*s*s:1-Math.pow(-2*s+2,5)/2;var Xe=s=>-(Math.cos(Math.PI*s)-1)/2;var Ye=s=>Math.pow(s,2);var qe=s=>Math.pow(s,4);var Qe=s=>Math.pow(s,5);var Ke=s=>1-Math.cos(s*Math.PI/2);var Ge=s=>1+2.70158*Math.pow(s-1,3)+1.70158*Math.pow(s-1,2);var Je=s=>Math.sqrt(1-Math.pow(s-1,2));var nt=s=>1-Math.pow(1-s,3);var Ze=s=>{let t=2*Math.PI/3;return s===0?0:s===1?1:Math.pow(2,-10*s)*Math.sin((s*10-.75)*t)+1};var ti=s=>s===1?1:1-Math.pow(2,-10*s);var ei=s=>1-Math.pow(1-s,2);var ii=s=>1-Math.pow(1-s,4);var si=s=>1-Math.pow(1-s,5);var ri=s=>Math.sin(s*Math.PI/2);function vs(s,t){let[e,i,r,n]=t;if(e===i&&r===n)return s;let o=[];for(let a=0;a<11;++a)o[a]=$t(a*.1,e,r);return s===0?0:s===1?1:$t(Dn(t,s,o),i,n)}function $t(s,t,e){return((bs(t,e)*s+ws(t,e))*s+ys(t))*s}function bs(s,t){return 1-3*t+3*s}function ws(s,t){return 3*t-6*s}function ys(s){return 3*s}function Dn(s,t,e){let i=s[0],r=s[2],n=0,o=1;for(;o!==10&&e[o]<=t;++o)n+=.1;--o;let a=(t-e[o])/(e[o+1]-e[o]),c=n+a*.1,l=xs(c,i,r);return l>=.001?jn(t,c,i,r):l===0?c:zn(t,n,n+.1,i,r)}function xs(s,t,e){return 3*bs(t,e)*s*s+2*ws(t,e)*s+ys(t)}function jn(s,t,e,i){for(let r=0;r<4;++r){let n=xs(t,e,i);if(n===0)return t;let o=$t(t,e,i)-s;t-=o/n}return t}function zn(s,t,e,i,r){let n,o,a=0;do o=t+(e-t)/2,n=$t(o,i,r)-s,n>0?e=o:t=o;while(Math.abs(n)>1e-7&&++a<10);return o}function Ss(s,t=!1){return Array.isArray(t)?vs(s,t):typeof t=="function"?t(s):s}var ni=(s,t)=>{var e;return t===void 0&&(t=(e=b().props.easing)!==null&&e!==void 0?e:!1),Ss(s,t)};function oi(s,t=0,e=1){let i=Math.min(t,e),r=Math.max(t,e);return s>=i&&s<=r}function $(s,t,e){let i=e-t;return((s-t)%i+i)%i+t}function Es(s,t){let r=Object.keys(t).filter(n=>t[n]!==void 0).reduce((n,o)=>(n[o]=t[o],n),{});return Object.assign(Object.assign({},s),r)}var ai=function(s,t,e,i){var r=arguments.length,n=r<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(s,t,e,i);else for(var a=s.length-1;a>=0;a--)(o=s[a])&&(n=(r<3?o(n):r>3?o(t,e,n):o(t,e))||n);return r>3&&n&&Object.defineProperty(t,e,n),n},x=class{_getStatic(){return{__staticProp:!0}}_getMutable(){return{__mutableProp:!0}}get props(){return this._props}get prefix(){return b().prefix}get name(){return this.constructor.name}get isDestroyed(){return this._isDestroyed}get callbacks(){return this._callbacks}constructor(t,e){this._isDestroyed=!1,this._destroyable=[],this._callbacks=new B({ctx:this}),this._props=Es(Object.assign(Object.assign({},this._getStatic()),this._getMutable()),Object.assign({},t));let i=Object.assign(Object.assign({},t),e);i&&Object.keys(i).filter(n=>n.startsWith("on")&&typeof i[n]=="function").forEach(n=>{let o=n.slice(2);o=o.charAt(0).toLowerCase()+o.slice(1),this._callbacks.on(o,i[n])})}_handleProps(t){this.callbacks.emit("props",t)}updateProps(t){let e=Object.assign({},this._props),i=Object.keys(this.props);this._props=Object.assign(Object.assign({},this._props),t);let r={};i.forEach(n=>{let o=e[n],a=this._props[n];o!==a&&(r[n]=a)}),this._handleProps(r)}onDestroy(t){if(this.isDestroyed){t();return}this._destroyable.push(t)}on(t,e,i={}){return this.callbacks.on(t,e,i)}_cn(...t){return t.map(e=>`${this.prefix}${e}`).join(" ")}_addTempClassName(t,e){tt(t,e)||(S(t,e),this.onDestroy(()=>Q(t,e)))}destroy(){this._destroy()}_destroy(){this._callbacks.emit("destroy",void 0),this._callbacks.destroy(),this._destroyable.forEach(t=>t()),this._isDestroyed=!0}};ai([_],x.prototype,"updateProps",null);ai([_],x.prototype,"on",null);ai([_],x.prototype,"destroy",null);var Ln=function(s,t,e,i){var r=arguments.length,n=r<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(s,t,e,i);else for(var a=s.length-1;a>=0;a--)(o=s[a])&&(n=(r<3?o(n):r>3?o(t,e,n):o(t,e))||n);return r>3&&n&&Object.defineProperty(t,e,n),n},Wt=class{get props(){return this._props}constructor(t,e,i){this._source=t,this._rules=e,this._onChange=i,this._isDestroyed=!1,this._destructors=[],this._prevBreakpoints="[]";let r=t,n=b(),o=r instanceof x?r.name:"Object";if(this._fetchInitProps(),this._props=Object.assign({},this._initProps),r instanceof x){r.on("destroy",()=>this.destroy(),{name:this.constructor.name,protected:!0});let a=r.updateProps.bind(r);r.updateProps=c=>{a(c),this._initProps=Object.assign(Object.assign({},this._initProps),c)},Object.defineProperty(r,"_$_responseProps",{value:c=>{a(c)}})}this._handleUpdate(),this._destructors.push(n.onResize("any",()=>this._handleUpdate(),{name:`${this.constructor.name} / ${o}`}))}_fetchInitProps(){let t=this._source;if(t instanceof x){this._initProps={},Object.keys(t._getMutable()).forEach(i=>{this._initProps[i]=t.props[i]});return}this._initProps=this._source}_getActiveRules(){let t=b();return this._rules.filter(({at:i})=>i==="tablet"&&t.tablet||i==="phone"&&t.phone||i==="mobile"&&t.mobile||i==="non_mobile"&&!t.mobile||i==="portrait"&&t.portrait||i==="landscape"&&t.landscape?!0:i.startsWith("@media")?window.matchMedia(i.replace("@media","")).matches:!1)}_getResponsiveProps(){let t=this._getActiveRules(),e={};return t.forEach(({props:i})=>{e=Object.assign(Object.assign({},e),i)}),e}_handleUpdate(){var t;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 x&&this._source._$_responseProps(this._props),(t=this._onChange)===null||t===void 0||t.call(this,this.props))}destroy(){this._isDestroyed=!0,this._destructors.forEach(t=>t())}};Ln([_],Wt.prototype,"destroy",null);var Ft={__staticProp:!0,container:null,append:!0,resizeOnInit:!0,resizeOnRuntime:!1,viewportTarget:"any",resizeDebounce:0},Vt={__mutableProp:!0,width:"auto",height:"auto",dpr:"auto"};var Ps=function(s,t,e,i){var r=arguments.length,n=r<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(s,t,e,i);else for(var a=s.length-1;a>=0;a--)(o=s[a])&&(n=(r<3?o(n):r>3?o(t,e,n):o(t,e))||n);return r>3&&n&&Object.defineProperty(t,e,n),n},it=class extends x{_getStatic(){return Object.assign(Object.assign({},super._getStatic()),Ft)}_getMutable(){return Object.assign(Object.assign({},super._getMutable()),Vt)}constructor(t,e){super(t,e),this._width=0,this._height=0,this._dpr=1;let{container:i}=this.props;this._canvas=g.createElement("canvas");let{style:r}=this._canvas;r.position="absolute",r.top="0",r.left="0",r.width="100%",r.height="100%",this.props.append&&i instanceof HTMLElement&&i.append(this._canvas),this._ctx=this._canvas.getContext("2d"),this._setEvents()}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}_handleProps(t){super._handleProps(t),this.resize()}_setEvents(){let{props:t}=this,{viewportTarget:e,resizeDebounce:i}=t;if(t.resizeOnInit&&this.resize(),!t.resizeOnRuntime)return;let r=U({callback:()=>this.resize(),element:this.props.container,viewportTarget:e,resizeDebounce:i,name:this.name});this.onDestroy(()=>r.remove())}resize(){let t=b(),{props:e,canvas:i}=this,{container:r}=this.props;this._dpr=j(e.dpr)?e.dpr:t.dpr;let n=0,o=0;e.width==="auto"?n=(r==null?void 0:r.offsetWidth)||t.width:n=e.width,e.height==="auto"?o=(r==null?void 0:r.offsetHeight)||t.height:o=e.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(t){this.canRender&&t({ctx:this.ctx,width:this.width,height:this.height,dpr:this.dpr,offsetWidth:this.offsetWidth,offsetHeight:this.offsetHeight,canvas:this.canvas})}_destroy(){super._destroy(),this.canvas.remove()}};Ps([_],it.prototype,"resize",null);Ps([_],it.prototype,"render",null);function Ht(s){let t=Nn(s),e=Bn(s),i;return s.rule==="cover"?i=$n(s,t,e):s.rule==="contain"?i=Wn(s,t,e):s.rule==="top-left"?i=Fn(s,e):s.rule==="top-right"?i=Vn(s,t,e):s.rule==="bottom-left"?i=Hn(s,t,e):s.rule==="bottom-right"?i=Un(s,t,e):s.rule==="center"&&(i=Xn(s,t,e)),Object.assign(i,{sourceWidth:e.width,sourceHeight:e.height})}function z(s){return typeof s.scale!="undefined"?s.scale:1}function Bn(s){let{source:t}=s;return s.sourceWidth&&s.sourceHeight?{width:s.sourceWidth,height:s.sourceHeight}:t instanceof HTMLVideoElement?{width:t.videoWidth,height:t.videoHeight}:t instanceof HTMLImageElement?{width:t.naturalWidth,height:t.naturalHeight}:{width:t.width,height:t.height}}function Nn(s){return"container"in s?{width:s.container.clientWidth,height:s.container.clientHeight}:{width:s.width,height:s.height}}function $n(s,t,e){let i=t.width*z(s),r=e.height*i/e.width;r/z(s)<t.height&&(r=t.height*z(s),i=e.width*r/e.height);let n=(t.width-i)/2,o=(t.height-r)/2;return{width:i,height:r,x:n,y:o}}function Wn(s,t,e){let i=0,r=0,n=e.width/e.height;t.width>t.height?(r=t.height,i=r*n,i>t.width&&(i=t.width,r=i/n)):t.height>=t.width&&(i=t.width,r=i/n,r>t.height&&(r=t.height,i=r*n)),i*=z(s),r*=z(s);let o=(t.width-i)/2,a=(t.height-r)/2;return{width:i,height:r,x:o,y:a}}function Fn(s,t){let e=t.width*z(s),i=t.height*z(s);return{width:e,height:i,x:0,y:0}}function Vn(s,t,e){let i=e.width*z(s),r=e.height*z(s),n=t.width-e.width;return{width:i,height:r,x:n,y:0}}function Hn(s,t,e){let i=e.width*z(s),r=e.height*z(s),n=t.height-e.height;return{width:i,height:r,x:0,y:n}}function Un(s,t,e){let i=e.width*z(s),r=e.height*z(s),n=t.width-e.width,o=t.height-e.height;return{width:i,height:r,x:n,y:o}}function Xn(s,t,e){let i=e.width*z(s),r=e.height*z(s),n=(t.width-e.width)/2,o=(t.height-e.height)/2;return{width:i,height:r,x:n,y:o}}var Os=Object.assign(Object.assign({},Ft),{media:null,autoRenderVideo:!0}),Ts=Object.assign(Object.assign({},Vt),{rule:"cover"});var Ms=function(s,t,e,i){var r=arguments.length,n=r<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(s,t,e,i);else for(var a=s.length-1;a>=0;a--)(o=s[a])&&(n=(r<3?o(n):r>3?o(t,e,n):o(t,e))||n);return r>3&&n&&Object.defineProperty(t,e,n),n},wt=class extends it{_getStatic(){return Object.assign(Object.assign({},super._getStatic()),Os)}_getMutable(){return Object.assign(Object.assign({},super._getMutable()),Ts)}constructor(t,e){super(t,e),this._setMediaEvents()}get hasRequestVideoFrameCallback(){return"requestVideoFrameCallback"in this.props.media}_setMediaEvents(){let{autoRenderVideo:t,media:e}=this.props;if(!t||!(e instanceof HTMLVideoElement))return;if(this.hasRequestVideoFrameCallback){this._requestVideoFrame();return}let i=y(e,"timeupdate",()=>{this.render()});this.onDestroy(()=>i())}resize(){super.resize(),this.render()}_requestVideoFrame(){if(this.isDestroyed)return;this.render();let{media:t}=this.props;t instanceof HTMLVideoElement&&t.requestVideoFrameCallback(()=>this._requestVideoFrame())}render(){super.render(t=>this._prerender(t))}_prerender({width:t,height:e,ctx:i}){let{media:r,rule:n}=this.props,o,a,c;r instanceof it?(o=r.canvas,a=r.width,c=r.height):o=r;let l=Ht({source:o,sourceWidth:a,sourceHeight:c,rule:n,scale:1,width:t,height:e});i.clearRect(0,0,t,e),i.drawImage(o,l.x,l.y,l.width,l.height),this.callbacks.emit("render",void 0)}};Ms([_],wt.prototype,"resize",null);Ms([_],wt.prototype,"render",null);function st(s){return window.getComputedStyle(s).direction}var Is={__staticProp:!0},As={__mutableProp:!0,fps:"auto",enabled:!1,fpsRecalcFrames:10};var Cs=function(s,t,e,i){var r=arguments.length,n=r<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(s,t,e,i);else for(var a=s.length-1;a>=0;a--)(o=s[a])&&(n=(r<3?o(n):r>3?o(t,e,n):o(t,e))||n);return r>3&&n&&Object.defineProperty(t,e,n),n},X=class extends x{_getStatic(){return Object.assign(Object.assign({},super._getStatic()),Is)}_getMutable(){return Object.assign(Object.assign({},super._getMutable()),As)}constructor(t,e){super(t,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()}get isPlaying(){return this._isPlaying}get timestamp(){var t;return(t=this._timestamp)!==null&&t!==void 0?t:0}get index(){return this._index}get fps(){return this._fps}get duration(){return this._duration}get fpsFactor(){return 60/this.fps}_handleProps(t){super._handleProps(t),this._lastTimestamp=null,this.props.enabled?this._play():this._pause()}play(){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 t,e;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(),(t=this._lastTimestamp)!==null&&t!==void 0||(this._lastTimestamp=this._timestamp);let r=this._timestamp-((e=this._lastTimestamp)!==null&&e!==void 0?e: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(t){return 1-Math.exp(-t*60*(this.duration/1e3))}_computeFPS(){let{duration:t,index:e,props:i}=this;if(e>10&&e%i.fpsRecalcFrames!==0||t<=0||t>250)return;let o=1e3/60/t;this._fps=Math.round(60*o)||1}_destroy(){this.pause(),super._destroy()}};Cs([_],X.prototype,"play",null);Cs([_],X.prototype,"pause",null);function ht(s){return typeof s=="string"}var Ut=class{constructor(t,e,i){this._data=t,this._onEnter=e,this._onLeave=i,this._debounce=null,this._isHovered=!1,this._parallaxX={current:0,target:0,prevTarget:null},this._parallaxY={current:0,target:0,prevTarget:null};let{emitter:r}=this;r.matches(":hover")&&this._handleElementEnter(),this._mouseEnter=y(r,"mouseenter",()=>{var n;this._debounce=setTimeout(()=>this._handleElementEnter(),(n=t.hoverDebounce)!==null&&n!==void 0?n:16)}),this._mouseLeave=y(r,"mouseleave",()=>{this._debounce&&clearTimeout(this._debounce),this._handleElementLeave()}),this._mouseMove=y(r,"mousemove",n=>{this._handleElementMove(n)})}get element(){return this._data.element}get emitter(){var t;return(t=this._data.emitter)!==null&&t!==void 0?t:this._data.element}get type(){return this._data.type}get snap(){var t;return(t=this._data.snap)!==null&&t!==void 0?t:!1}get width(){return this._data.width==="auto"?"auto":this._data.width?M(this._data.width):null}get height(){return this._data.height==="auto"?"auto":this._data.height?M(this._data.height):null}get padding(){return this._data.padding?M(this._data.padding):0}get sticky(){var t;return(t=this._data.sticky)!==null&&t!==void 0?t:!1}get stickyLerp(){var t;return(t=this._data.stickyLerp)!==null&&t!==void 0?t:void 0}get stickyFriction(){var t;return(t=this._data.stickyFriction)!==null&&t!==void 0?t:0}get hasStickyFriction(){return A(this.stickyFriction)&&this.stickyFriction>0}getDimensions(){let t,e,i,r,n=0,o=this.element.getBoundingClientRect();return this.snap&&(t=o.left+o.width/2,e=o.top+o.height/2),this.width==="auto"?i=o.width:j(this.width)&&(i=this.width),this.height==="auto"?r=o.height:j(this.height)&&(r=this.height),n=this.padding,{x:t,y:e,width:i,height:r,padding:n}}destroy(){this._mouseEnter(),this._mouseMove(),this._mouseLeave(),this._debounce&&clearTimeout(this._debounce)}_handleElementEnter(){this._isHovered=!0,this._onEnter(this)}_handleElementLeave(){this._isHovered=!1,this._parallaxX.target=0,this._parallaxX.prevTarget=null,this._parallaxY.target=0,this._parallaxY.prevTarget=null,this._onLeave(this)}_handleElementMove(t){if(!this.sticky||!this._isHovered)return;let{element:e,_parallaxX:i,_parallaxY:r}=this,{clientX:n,clientY:o}=t,a=e.getBoundingClientRect(),c=getComputedStyle(e).transform,l=c==="none"?new DOMMatrix:new DOMMatrix(c),{width:h,height:p}=a,u=l.e,v=l.f,f=a.left-u,d=a.top-v,m=f+h/2,E=d+p/2,P=n-m,T=o-E,O=this._getStickyAmplitude(),Y=O.x==="auto"?h:Math.abs(O.x),V=O.y==="auto"?p:Math.abs(O.y),K=w(P,-Y,Y),H=w(T,-V,V);if(i.prevTarget===null&&(i.prevTarget=K),r.prevTarget===null&&(r.prevTarget=H),this.hasStickyFriction){let q=K-i.prevTarget,Hr=H-r.prevTarget;i.target+=q,r.target+=Hr}else i.target=K,r.target=H;i.prevTarget=K,r.prevTarget=H}_getStickyAmplitude(){let{stickyAmplitude:t}=this._data,e="auto",i="auto";return t?(j(t)||ht(t)?(e=this._getStickyAmplitudeAxis(t),i=this._getStickyAmplitudeAxis(t)):("x"in t&&(e=this._getStickyAmplitudeAxis(t.x)),"y"in t&&(i=this._getStickyAmplitudeAxis(t.y))),{x:e,y:i}):{x:e,y:i}}_getStickyAmplitudeAxis(t){return j(t)?t:!t||t==="auto"?"auto":M(t)}get isInterpolated(){return this._parallaxX.current===this._parallaxX.target&&this._parallaxY.current===this._parallaxY.target}render(t){let{_parallaxX:e,_parallaxY:i}=this,r=this.element;if(!this.sticky||this.isInterpolated)return;if(this.hasStickyFriction){let o=t(this.stickyFriction);e.target=C(e.target,0,o,1e-4),i.target=C(i.target,0,o,1e-4)}let n=t(this.stickyLerp);e.current=C(e.current,e.target,n,1e-4),i.current=C(i.current,i.target,n,1e-4),r.style.transform=`translate3d(${e.current}px, ${i.current}px, 0)`}};var li=s=>{let t=`M${s[0].x},${s[0].y}`;for(let e=0;e<s.length-1;e+=1){let i=(s[e].x+s[e+1].x)/2,r=(s[e].y+s[e+1].y)/2;t+=`Q ${s[e].x}, ${s[e].y}, ${i}, ${r}`}return t+=`L ${s[s.length-1].x}, ${s[s.length-1].y}`,t};var Xt=class{get path(){return this._path}constructor(t){this._isEnabled=t,this._points=[],this._line={current:0,target:0},this._path=document.createElementNS("http://www.w3.org/2000/svg","path");let e=this._path;e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.setAttribute("fill","transparent"),e.setAttribute("stroke","#f00")}addPoint(t,e=!1){if(!this._isEnabled)return;let i=this._points,r=this._path,n=this._line,o={x:t.x,y:t.y,length:0};i.push(o),r.setAttribute("d",li(i));let a=r.getTotalLength();o.length=a,n.target=a,e&&(n.current=n.target)}minimize(){if(!this._isEnabled)return;let t=this._points,e=this._line;if(t.length<3)return;let i=0,r=0;for(let n=1;n<t.length;n+=1){let o=t[n].x-t[n-1].x,a=t[n].y-t[n-1].y,c=Math.hypot(o,a);if(i+c<e.current)i+=c,r+=1;else break}if(A(r)&&r>0){let n=0;for(let o=1;o<=r;o+=1){let a=t[o].x-t[o-1].x,c=t[o].y-t[o-1].y;n+=Math.hypot(a,c)}t.splice(0,r),e.current=Math.max(0,e.current-n),e.target=Math.max(0,e.target-n),this._path.setAttribute("d",li(t))}}get isInterpolated(){return this._line.current===this._line.target}lerp(t){let e=this._line;e.current=C(e.current,e.target,t,1e-4)}get coord(){return this._path.getPointAtLength(this._line.current)}};var Rs={__staticProp:!0,container:R?window:null,hideNative:!1,append:!0,behavior:"default",transformModifier:({x:s,y:t})=>`translate(${s}px, ${t}px)`},ks={__mutableProp:!0,enabled:!0,width:50,height:50,lerp:.2,autoStop:!0};function Yt(s){var t;let e=document.querySelector('link[rel="stylesheet"], style');e?(t=e.parentNode)===null||t===void 0||t.insertBefore(s,e):document.head.appendChild(s)}var pt=null;function Ds(s){return pt||(pt=g.createElement("style"),Yt(pt),pt.innerHTML=`
.${s}-container.${s}-hide-default,
.${s}-container.${s}-hide-default * {
cursor: none;
}
.${s} {
position: absolute;
top: 0;
left: 0;
width: 0;
height: 0;
z-index: 999;
pointer-events: none;
transition: opacity 0.25s;
opacity: 0;
--cursor-w: 50px;
--cursor-h: 50px;
}
.${s}-in-window {
position: fixed;
}
.${s}-visible {
opacity: 1;
}
.${s}-disabled {
opacity: 0;
}
.${s}__inner {
position: relative;
width: var(--cursor-w);
height: var(--cursor-h);
margin-left: calc(var(--cursor-w) / -2);
margin-top: calc(var(--cursor-h) / -2);
background-color: rgba(0, 0, 0, 0.25);
}
.${s}_rtl .${s}__inner {
margin-right: calc(var(--cursor-w) / -2);
}
.${s}__inner > * {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
opacity: 0;
transition: opacity 0.25s linear;
}
.${s}__inner > *.active {
opacity: 1;
}
`,pt)}var ci=function(s,t,e,i){var r=arguments.length,n=r<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(s,t,e,i);else for(var a=s.length-1;a>=0;a--)(o=s[a])&&(n=(r<3?o(n):r>3?o(t,e,n):o(t,e))||n);return r>3&&n&&Object.defineProperty(t,e,n),n},dt=class extends x{_getStatic(){return Object.assign(Object.assign({},super._getStatic()),Rs)}_getMutable(){return Object.assign(Object.assign({},super._getMutable()),ks)}constructor(t,e){super(t,e),this._elements=[],this._activeElements=[],this._isFirstMove=!0;let{enabled:i}=this.props,{initialWidth:r,initialHeight:n}=this;this._coords={x:0,y:0,width:r,height:n,angle:0,velocity:0},this._rawTarget=Object.assign({},this._coords),this._types=[],this._activeTypes=[],this._path=new Xt(this.hasPath),Ds(this.prefix),this._setClassNames(),this._createElements(),this._setEvents(),this._toggle(i)}get prefix(){return`${b().prefix}cursor`}get container(){return this.props.container}get domContainer(){return this.container instanceof Window?k:this.container}get outer(){return this._outer}get inner(){return this._inner}get initialWidth(){return M(this.props.width)}get initialHeight(){return M(this.props.height)}get coords(){return this._coords}get hoveredElement(){let t=this._activeElements;return t[t.length-1]}get targetCoords(){var t,e,i,r;let{hoveredElement:n,initialWidth:o,initialHeight:a}=this,{x:c,y:l}=this._rawTarget,{angle:h,velocity:p}=this._rawTarget,u=o,v=a,f=0;if(n){let d=n.getDimensions();u=(t=d.width)!==null&&t!==void 0?t:o,v=(e=d.height)!==null&&e!==void 0?e:a,c=(i=d.x)!==null&&i!==void 0?i:c,l=(r=d.y)!==null&&r!==void 0?r:l,f=d.padding}return u+=f*2,v+=f*2,{x:c,y:l,width:u,height:v,angle:h,velocity:p}}get path(){return this._path.path}get hasPath(){return this.props.behavior==="path"}_handleProps(t){super._handleProps(t),this._toggle(this.props.enabled)}_setClassNames(){let{domContainer:t}=this;this.props.hideNative&&(t.style.cursor="none",this._addTempClassName(t,this._cn("-hide-default"))),this._addTempClassName(t,this._cn("-container")),t!==k&&(t.style.position="relative"),this.onDestroy(()=>{t.style.cursor=""})}_createElements(){let{container:t,domContainer:e,props:i}=this,r=t instanceof Window,n=this._cn.bind(this),o=g.createElement("div");S(o,n("")),S(o,n(r?"-in-window":"-in-element")),S(o,n("-disabled")),i.append&&e.append(o);let a=st(o);S(o,n(`_${a}`));let c=g.createElement("div");o.append(c),S(c,n("__inner")),S(c,n("-disabled")),o.append(c),this._outer=o,this._inner=c,this.onDestroy(()=>{c.remove(),o.remove()})}_setEvents(){let{domContainer:t}=this;this._raf=new X({enabled:!1}),this._raf.on("frame",()=>this.render());let e=y(t,"mouseenter",this._handleMouseEnter.bind(this)),i=y(t,"mouseleave",this._handleMouseLeave.bind(this)),r=y(t,"mousemove",this._handleMouseMove.bind(this)),n=y(t,"mousedown",this._handleMouseDown.bind(this)),o=y(t,"mouseup",this._handleMouseUp.bind(this)),a=y(window,"blur",this._handleWindowBlur.bind(this));this.onDestroy(()=>{var c;(c=this._raf)===null||c===void 0||c.destroy(),e(),i(),r(),n(),o(),a()})}_toggle(t){var e;let i=this._cn("-disabled");D(this.outer,i,!t),D(this.inner,i,!t),(e=this._raf)===null||e===void 0||e.updateProps({enabled:t})}_handleMouseEnter(t){if(!this.props.enabled)return;let{clientX:e,clientY:i}=t,r=this._rawTarget;this._coords.x=e,this._coords.y=i,r.x=e,r.y=i,this._path.addPoint(r,!0),S(this.outer,this._cn("-visible"))}_handleMouseLeave(){Q(this.outer,this._cn("-visible"))}_handleMouseMove(t){var e;if(!this.props.enab