@samoramachel/netuniverse 1.2.1 → 1.3.1
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 +14 -8
- package/dist/GraphScene.d.ts +2 -1
- package/dist/GraphScene.d.ts.map +1 -1
- package/dist/components/GalaxyGraph.d.ts +2 -1
- package/dist/components/GalaxyGraph.d.ts.map +1 -1
- package/dist/index.es.js +2192 -2184
- package/dist/index.umd.js +15 -15
- package/dist/types.d.ts +48 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(ut,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react/jsx-runtime"),require("react"),require("@react-three/fiber"),require("@react-three/drei"),require("three")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","@react-three/fiber","@react-three/drei","three"],E):(ut=typeof globalThis<"u"?globalThis:ut||self,E(ut.NebulaGraphExplorer={},ut["react/jsx-runtime"],ut.React,ut.fiber,ut.drei,ut.THREE))})(this,(function(ut,E,A,Bn,Ai,Cc){"use strict";var Sc;function zr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const jn=zr(A),Xt=zr(Cc);function Ht(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Br(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}/*!
|
|
2
2
|
* GSAP 3.14.2
|
|
3
3
|
* https://gsap.com
|
|
4
4
|
*
|
|
5
5
|
* @license Copyright 2008-2025, GreenSock. All rights reserved.
|
|
6
6
|
* Subject to the terms at https://gsap.com/standard-license
|
|
7
7
|
* @author: Jack Doyle, jack@greensock.com
|
|
8
|
-
*/var At={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},Ne={duration:.5,overwrite:!1,delay:0},Mi,ot,G,Ot=1e8,B=1/Ot,Ci=Math.PI*2,Mc=Ci/4,Cc=0,Br=Math.sqrt,Dc=Math.cos,Ec=Math.sin,st=function(t){return typeof t=="string"},Q=function(t){return typeof t=="function"},Zt=function(t){return typeof t=="number"},Di=function(t){return typeof t>"u"},$t=function(t){return typeof t=="object"},xt=function(t){return t!==!1},Ei=function(){return typeof window<"u"},$n=function(t){return Q(t)||st(t)},jr=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},ht=Array.isArray,kc=/random\([^)]+\)/g,Vc=/,\s*/g,$r=/(?:-?\.?\d|\.)+/gi,Ur=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Ie=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,ki=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,Wr=/[+-]=-?[.\d]+/,Oc=/[^,'"\[\]\s]+/gi,Nc=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,K,Ut,Vi,Oi,Mt={},Un={},Gr,qr=function(t){return(Un=Fe(t,Mt))&&bt},Ni=function(t,n){return console.warn("Invalid property",t,"set to",n,"Missing plugin? gsap.registerPlugin()")},rn=function(t,n){return!n&&console.warn(t)},Kr=function(t,n){return t&&(Mt[t]=n)&&Un&&(Un[t]=n)||Mt},on=function(){return 0},Ic={suppressEvents:!0,isStart:!0,kill:!1},Wn={suppressEvents:!0,kill:!1},Lc={suppressEvents:!0},Ii={},se=[],Li={},Yr,Ct={},Fi={},Xr=30,Gn=[],Ri="",zi=function(t){var n=t[0],i,s;if($t(n)||Q(n)||(t=[t]),!(i=(n._gsap||{}).harness)){for(s=Gn.length;s--&&!Gn[s].targetTest(n););i=Gn[s]}for(s=t.length;s--;)t[s]&&(t[s]._gsap||(t[s]._gsap=new Po(t[s],i)))||t.splice(s,1);return t},ve=function(t){return t._gsap||zi(It(t))[0]._gsap},Hr=function(t,n,i){return(i=t[n])&&Q(i)?t[n]():Di(i)&&t.getAttribute&&t.getAttribute(n)||i},wt=function(t,n){return(t=t.split(",")).forEach(n)||t},tt=function(t){return Math.round(t*1e5)/1e5||0},Y=function(t){return Math.round(t*1e7)/1e7||0},Le=function(t,n){var i=n.charAt(0),s=parseFloat(n.substr(2));return t=parseFloat(t),i==="+"?t+s:i==="-"?t-s:i==="*"?t*s:t/s},Fc=function(t,n){for(var i=n.length,s=0;t.indexOf(n[s])<0&&++s<i;);return s<i},qn=function(){var t=se.length,n=se.slice(0),i,s;for(Li={},se.length=0,i=0;i<t;i++)s=n[i],s&&s._lazy&&(s.render(s._lazy[0],s._lazy[1],!0)._lazy=0)},Bi=function(t){return!!(t._initted||t._startAt||t.add)},Zr=function(t,n,i,s){se.length&&!ot&&qn(),t.render(n,i,!!(ot&&n<0&&Bi(t))),se.length&&!ot&&qn()},Qr=function(t){var n=parseFloat(t);return(n||n===0)&&(t+"").match(Oc).length<2?n:st(t)?t.trim():t},Jr=function(t){return t},Dt=function(t,n){for(var i in n)i in t||(t[i]=n[i]);return t},Rc=function(t){return function(n,i){for(var s in i)s in n||s==="duration"&&t||s==="ease"||(n[s]=i[s])}},Fe=function(t,n){for(var i in n)t[i]=n[i];return t},to=function e(t,n){for(var i in n)i!=="__proto__"&&i!=="constructor"&&i!=="prototype"&&(t[i]=$t(n[i])?e(t[i]||(t[i]={}),n[i]):n[i]);return t},Kn=function(t,n){var i={},s;for(s in t)s in n||(i[s]=t[s]);return i},an=function(t){var n=t.parent||K,i=t.keyframes?Rc(ht(t.keyframes)):Dt;if(xt(t.inherit))for(;n;)i(t,n.vars.defaults),n=n.parent||n._dp;return t},zc=function(t,n){for(var i=t.length,s=i===n.length;s&&i--&&t[i]===n[i];);return i<0},eo=function(t,n,i,s,r){var o=t[s],a;if(r)for(a=n[r];o&&o[r]>a;)o=o._prev;return o?(n._next=o._next,o._next=n):(n._next=t[i],t[i]=n),n._next?n._next._prev=n:t[s]=n,n._prev=o,n.parent=n._dp=t,n},Yn=function(t,n,i,s){i===void 0&&(i="_first"),s===void 0&&(s="_last");var r=n._prev,o=n._next;r?r._next=o:t[i]===n&&(t[i]=o),o?o._prev=r:t[s]===n&&(t[s]=r),n._next=n._prev=n.parent=null},re=function(t,n){t.parent&&(!n||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0},xe=function(t,n){if(t&&(!n||n._end>t._dur||n._start<0))for(var i=t;i;)i._dirty=1,i=i.parent;return t},Bc=function(t){for(var n=t.parent;n&&n.parent;)n._dirty=1,n.totalDuration(),n=n.parent;return t},ji=function(t,n,i,s){return t._startAt&&(ot?t._startAt.revert(Wn):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(n,!0,s))},jc=function e(t){return!t||t._ts&&e(t.parent)},no=function(t){return t._repeat?Re(t._tTime,t=t.duration()+t._rDelay)*t:0},Re=function(t,n){var i=Math.floor(t=Y(t/n));return t&&i===t?i-1:i},Xn=function(t,n){return(t-n._start)*n._ts+(n._ts>=0?0:n._dirty?n.totalDuration():n._tDur)},Hn=function(t){return t._end=Y(t._start+(t._tDur/Math.abs(t._ts||t._rts||B)||0))},Zn=function(t,n){var i=t._dp;return i&&i.smoothChildTiming&&t._ts&&(t._start=Y(i._time-(t._ts>0?n/t._ts:((t._dirty?t.totalDuration():t._tDur)-n)/-t._ts)),Hn(t),i._dirty||xe(i,t)),t},io=function(t,n){var i;if((n._time||!n._dur&&n._initted||n._start<t._time&&(n._dur||!n.add))&&(i=Xn(t.rawTime(),n),(!n._dur||un(0,n.totalDuration(),i)-n._tTime>B)&&n.render(i,!0)),xe(t,n)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(i=t;i._dp;)i.rawTime()>=0&&i.totalTime(i._tTime),i=i._dp;t._zTime=-B}},Wt=function(t,n,i,s){return n.parent&&re(n),n._start=Y((Zt(i)?i:i||t!==K?Nt(t,i,n):t._time)+n._delay),n._end=Y(n._start+(n.totalDuration()/Math.abs(n.timeScale())||0)),eo(t,n,"_first","_last",t._sort?"_start":0),$i(n)||(t._recent=n),s||io(t,n),t._ts<0&&Zn(t,t._tTime),t},so=function(t,n){return(Mt.ScrollTrigger||Ni("scrollTrigger",n))&&Mt.ScrollTrigger.create(n,t)},ro=function(t,n,i,s,r){if(Zi(t,n,r),!t._initted)return 1;if(!i&&t._pt&&!ot&&(t._dur&&t.vars.lazy!==!1||!t._dur&&t.vars.lazy)&&Yr!==kt.frame)return se.push(t),t._lazy=[r,s],1},$c=function e(t){var n=t.parent;return n&&n._ts&&n._initted&&!n._lock&&(n.rawTime()<0||e(n))},$i=function(t){var n=t.data;return n==="isFromStart"||n==="isStart"},Uc=function(t,n,i,s){var r=t.ratio,o=n<0||!n&&(!t._start&&$c(t)&&!(!t._initted&&$i(t))||(t._ts<0||t._dp._ts<0)&&!$i(t))?0:1,a=t._rDelay,l=0,u,c,h;if(a&&t._repeat&&(l=un(0,t._tDur,n),c=Re(l,a),t._yoyo&&c&1&&(o=1-o),c!==Re(t._tTime,a)&&(r=1-o,t.vars.repeatRefresh&&t._initted&&t.invalidate())),o!==r||ot||s||t._zTime===B||!n&&t._zTime){if(!t._initted&&ro(t,n,s,i,l))return;for(h=t._zTime,t._zTime=n||(i?B:0),i||(i=n&&!h),t.ratio=o,t._from&&(o=1-o),t._time=0,t._tTime=l,u=t._pt;u;)u.r(o,u.d),u=u._next;n<0&&ji(t,n,i,!0),t._onUpdate&&!i&&Et(t,"onUpdate"),l&&t._repeat&&!i&&t.parent&&Et(t,"onRepeat"),(n>=t._tDur||n<0)&&t.ratio===o&&(o&&re(t,1),!i&&!ot&&(Et(t,o?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=n)},Wc=function(t,n,i){var s;if(i>n)for(s=t._first;s&&s._start<=i;){if(s.data==="isPause"&&s._start>n)return s;s=s._next}else for(s=t._last;s&&s._start>=i;){if(s.data==="isPause"&&s._start<n)return s;s=s._prev}},ze=function(t,n,i,s){var r=t._repeat,o=Y(n)||0,a=t._tTime/t._tDur;return a&&!s&&(t._time*=o/t._dur),t._dur=o,t._tDur=r?r<0?1e10:Y(o*(r+1)+t._rDelay*r):o,a>0&&!s&&Zn(t,t._tTime=t._tDur*a),t.parent&&Hn(t),i||xe(t.parent,t),t},oo=function(t){return t instanceof mt?xe(t):ze(t,t._dur)},Gc={_start:0,endTime:on,totalDuration:on},Nt=function e(t,n,i){var s=t.labels,r=t._recent||Gc,o=t.duration()>=Ot?r.endTime(!1):t._dur,a,l,u;return st(n)&&(isNaN(n)||n in s)?(l=n.charAt(0),u=n.substr(-1)==="%",a=n.indexOf("="),l==="<"||l===">"?(a>=0&&(n=n.replace(/=/,"")),(l==="<"?r._start:r.endTime(r._repeat>=0))+(parseFloat(n.substr(1))||0)*(u?(a<0?r:i).totalDuration()/100:1)):a<0?(n in s||(s[n]=o),s[n]):(l=parseFloat(n.charAt(a-1)+n.substr(a+1)),u&&i&&(l=l/100*(ht(i)?i[0]:i).totalDuration()),a>1?e(t,n.substr(0,a-1),i)+l:o+l)):n==null?o:+n},ln=function(t,n,i){var s=Zt(n[1]),r=(s?2:1)+(t<2?0:1),o=n[r],a,l;if(s&&(o.duration=n[1]),o.parent=i,t){for(a=o,l=i;l&&!("immediateRender"in a);)a=l.vars.defaults||{},l=xt(l.vars.inherit)&&l.parent;o.immediateRender=xt(a.immediateRender),t<2?o.runBackwards=1:o.startAt=n[r-1]}return new et(n[0],o,n[r+1])},oe=function(t,n){return t||t===0?n(t):n},un=function(t,n,i){return i<t?t:i>n?n:i},ft=function(t,n){return!st(t)||!(n=Nc.exec(t))?"":n[1]},qc=function(t,n,i){return oe(i,function(s){return un(t,n,s)})},Ui=[].slice,ao=function(t,n){return t&&$t(t)&&"length"in t&&(!n&&!t.length||t.length-1 in t&&$t(t[0]))&&!t.nodeType&&t!==Ut},Kc=function(t,n,i){return i===void 0&&(i=[]),t.forEach(function(s){var r;return st(s)&&!n||ao(s,1)?(r=i).push.apply(r,It(s)):i.push(s)})||i},It=function(t,n,i){return G&&!n&&G.selector?G.selector(t):st(t)&&!i&&(Vi||!je())?Ui.call((n||Oi).querySelectorAll(t),0):ht(t)?Kc(t,i):ao(t)?Ui.call(t,0):t?[t]:[]},Wi=function(t){return t=It(t)[0]||rn("Invalid scope")||{},function(n){var i=t.current||t.nativeElement||t;return It(n,i.querySelectorAll?i:i===t?rn("Invalid scope")||Oi.createElement("div"):t)}},lo=function(t){return t.sort(function(){return .5-Math.random()})},uo=function(t){if(Q(t))return t;var n=$t(t)?t:{each:t},i=we(n.ease),s=n.from||0,r=parseFloat(n.base)||0,o={},a=s>0&&s<1,l=isNaN(s)||a,u=n.axis,c=s,h=s;return st(s)?c=h={center:.5,edges:.5,end:1}[s]||0:!a&&l&&(c=s[0],h=s[1]),function(f,d,m){var p=(m||n).length,y=o[p],g,x,v,w,_,T,S,b,P;if(!y){if(P=n.grid==="auto"?0:(n.grid||[1,Ot])[1],!P){for(S=-Ot;S<(S=m[P++].getBoundingClientRect().left)&&P<p;);P<p&&P--}for(y=o[p]=[],g=l?Math.min(P,p)*c-.5:s%P,x=P===Ot?0:l?p*h/P-.5:s/P|0,S=0,b=Ot,T=0;T<p;T++)v=T%P-g,w=x-(T/P|0),y[T]=_=u?Math.abs(u==="y"?w:v):Br(v*v+w*w),_>S&&(S=_),_<b&&(b=_);s==="random"&&lo(y),y.max=S-b,y.min=b,y.v=p=(parseFloat(n.amount)||parseFloat(n.each)*(P>p?p-1:u?u==="y"?p/P:P:Math.max(P,p/P))||0)*(s==="edges"?-1:1),y.b=p<0?r-p:r,y.u=ft(n.amount||n.each)||0,i=i&&p<0?To(i):i}return p=(y[f]-y.min)/y.max||0,Y(y.b+(i?i(p):p)*y.v)+y.u}},Gi=function(t){var n=Math.pow(10,((t+"").split(".")[1]||"").length);return function(i){var s=Y(Math.round(parseFloat(i)/t)*t*n);return(s-s%1)/n+(Zt(i)?0:ft(i))}},co=function(t,n){var i=ht(t),s,r;return!i&&$t(t)&&(s=i=t.radius||Ot,t.values?(t=It(t.values),(r=!Zt(t[0]))&&(s*=s)):t=Gi(t.increment)),oe(n,i?Q(t)?function(o){return r=t(o),Math.abs(r-o)<=s?r:o}:function(o){for(var a=parseFloat(r?o.x:o),l=parseFloat(r?o.y:0),u=Ot,c=0,h=t.length,f,d;h--;)r?(f=t[h].x-a,d=t[h].y-l,f=f*f+d*d):f=Math.abs(t[h]-a),f<u&&(u=f,c=h);return c=!s||u<=s?t[c]:o,r||c===o||Zt(o)?c:c+ft(o)}:Gi(t))},ho=function(t,n,i,s){return oe(ht(t)?!n:i===!0?!!(i=0):!s,function(){return ht(t)?t[~~(Math.random()*t.length)]:(i=i||1e-5)&&(s=i<1?Math.pow(10,(i+"").length-2):1)&&Math.floor(Math.round((t-i/2+Math.random()*(n-t+i*.99))/i)*i*s)/s})},Yc=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return function(s){return n.reduce(function(r,o){return o(r)},s)}},Xc=function(t,n){return function(i){return t(parseFloat(i))+(n||ft(i))}},Hc=function(t,n,i){return po(t,n,0,1,i)},fo=function(t,n,i){return oe(i,function(s){return t[~~n(s)]})},Zc=function e(t,n,i){var s=n-t;return ht(t)?fo(t,e(0,t.length),n):oe(i,function(r){return(s+(r-t)%s)%s+t})},Qc=function e(t,n,i){var s=n-t,r=s*2;return ht(t)?fo(t,e(0,t.length-1),n):oe(i,function(o){return o=(r+(o-t)%r)%r||0,t+(o>s?r-o:o)})},cn=function(t){return t.replace(kc,function(n){var i=n.indexOf("[")+1,s=n.substring(i||7,i?n.indexOf("]"):n.length-1).split(Vc);return ho(i?s:+s[0],i?0:+s[1],+s[2]||1e-5)})},po=function(t,n,i,s,r){var o=n-t,a=s-i;return oe(r,function(l){return i+((l-t)/o*a||0)})},Jc=function e(t,n,i,s){var r=isNaN(t+n)?0:function(d){return(1-d)*t+d*n};if(!r){var o=st(t),a={},l,u,c,h,f;if(i===!0&&(s=1)&&(i=null),o)t={p:t},n={p:n};else if(ht(t)&&!ht(n)){for(c=[],h=t.length,f=h-2,u=1;u<h;u++)c.push(e(t[u-1],t[u]));h--,r=function(m){m*=h;var p=Math.min(f,~~m);return c[p](m-p)},i=n}else s||(t=Fe(ht(t)?[]:{},t));if(!c){for(l in n)Xi.call(a,t,l,"get",n[l]);r=function(m){return ts(m,a)||(o?t.p:t)}}}return oe(i,r)},mo=function(t,n,i){var s=t.labels,r=Ot,o,a,l;for(o in s)a=s[o]-n,a<0==!!i&&a&&r>(a=Math.abs(a))&&(l=o,r=a);return l},Et=function(t,n,i){var s=t.vars,r=s[n],o=G,a=t._ctx,l,u,c;if(r)return l=s[n+"Params"],u=s.callbackScope||t,i&&se.length&&qn(),a&&(G=a),c=l?r.apply(u,l):r.call(u),G=o,c},hn=function(t){return re(t),t.scrollTrigger&&t.scrollTrigger.kill(!!ot),t.progress()<1&&Et(t,"onInterrupt"),t},Be,go=[],yo=function(t){if(t)if(t=!t.name&&t.default||t,Ei()||t.headless){var n=t.name,i=Q(t),s=n&&!i&&t.init?function(){this._props=[]}:t,r={init:on,render:ts,add:Xi,kill:mh,modifier:ph,rawVars:0},o={targetTest:0,get:0,getSetter:Ji,aliases:{},register:0};if(je(),t!==s){if(Ct[n])return;Dt(s,Dt(Kn(t,r),o)),Fe(s.prototype,Fe(r,Kn(t,o))),Ct[s.prop=n]=s,t.targetTest&&(Gn.push(s),Ii[n]=1),n=(n==="css"?"CSS":n.charAt(0).toUpperCase()+n.substr(1))+"Plugin"}Kr(n,s),t.register&&t.register(bt,s,Tt)}else go.push(t)},j=255,fn={aqua:[0,j,j],lime:[0,j,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,j],navy:[0,0,128],white:[j,j,j],olive:[128,128,0],yellow:[j,j,0],orange:[j,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[j,0,0],pink:[j,192,203],cyan:[0,j,j],transparent:[j,j,j,0]},qi=function(t,n,i){return t+=t<0?1:t>1?-1:0,(t*6<1?n+(i-n)*t*6:t<.5?i:t*3<2?n+(i-n)*(2/3-t)*6:n)*j+.5|0},_o=function(t,n,i){var s=t?Zt(t)?[t>>16,t>>8&j,t&j]:0:fn.black,r,o,a,l,u,c,h,f,d,m;if(!s){if(t.substr(-1)===","&&(t=t.substr(0,t.length-1)),fn[t])s=fn[t];else if(t.charAt(0)==="#"){if(t.length<6&&(r=t.charAt(1),o=t.charAt(2),a=t.charAt(3),t="#"+r+r+o+o+a+a+(t.length===5?t.charAt(4)+t.charAt(4):"")),t.length===9)return s=parseInt(t.substr(1,6),16),[s>>16,s>>8&j,s&j,parseInt(t.substr(7),16)/255];t=parseInt(t.substr(1),16),s=[t>>16,t>>8&j,t&j]}else if(t.substr(0,3)==="hsl"){if(s=m=t.match($r),!n)l=+s[0]%360/360,u=+s[1]/100,c=+s[2]/100,o=c<=.5?c*(u+1):c+u-c*u,r=c*2-o,s.length>3&&(s[3]*=1),s[0]=qi(l+1/3,r,o),s[1]=qi(l,r,o),s[2]=qi(l-1/3,r,o);else if(~t.indexOf("="))return s=t.match(Ur),i&&s.length<4&&(s[3]=1),s}else s=t.match($r)||fn.transparent;s=s.map(Number)}return n&&!m&&(r=s[0]/j,o=s[1]/j,a=s[2]/j,h=Math.max(r,o,a),f=Math.min(r,o,a),c=(h+f)/2,h===f?l=u=0:(d=h-f,u=c>.5?d/(2-h-f):d/(h+f),l=h===r?(o-a)/d+(o<a?6:0):h===o?(a-r)/d+2:(r-o)/d+4,l*=60),s[0]=~~(l+.5),s[1]=~~(u*100+.5),s[2]=~~(c*100+.5)),i&&s.length<4&&(s[3]=1),s},vo=function(t){var n=[],i=[],s=-1;return t.split(ae).forEach(function(r){var o=r.match(Ie)||[];n.push.apply(n,o),i.push(s+=o.length+1)}),n.c=i,n},xo=function(t,n,i){var s="",r=(t+s).match(ae),o=n?"hsla(":"rgba(",a=0,l,u,c,h;if(!r)return t;if(r=r.map(function(f){return(f=_o(f,n,1))&&o+(n?f[0]+","+f[1]+"%,"+f[2]+"%,"+f[3]:f.join(","))+")"}),i&&(c=vo(t),l=i.c,l.join(s)!==c.c.join(s)))for(u=t.replace(ae,"1").split(Ie),h=u.length-1;a<h;a++)s+=u[a]+(~l.indexOf(a)?r.shift()||o+"0,0,0,0)":(c.length?c:r.length?r:i).shift());if(!u)for(u=t.split(ae),h=u.length-1;a<h;a++)s+=u[a]+r[a];return s+u[h]},ae=(function(){var e="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",t;for(t in fn)e+="|"+t+"\\b";return new RegExp(e+")","gi")})(),th=/hsl[a]?\(/,wo=function(t){var n=t.join(" "),i;if(ae.lastIndex=0,ae.test(n))return i=th.test(n),t[1]=xo(t[1],i),t[0]=xo(t[0],i,vo(t[1])),!0},dn,kt=(function(){var e=Date.now,t=500,n=33,i=e(),s=i,r=1e3/240,o=r,a=[],l,u,c,h,f,d,m=function p(y){var g=e()-s,x=y===!0,v,w,_,T;if((g>t||g<0)&&(i+=g-n),s+=g,_=s-i,v=_-o,(v>0||x)&&(T=++h.frame,f=_-h.time*1e3,h.time=_=_/1e3,o+=v+(v>=r?4:r-v),w=1),x||(l=u(p)),w)for(d=0;d<a.length;d++)a[d](_,f,T,y)};return h={time:0,frame:0,tick:function(){m(!0)},deltaRatio:function(y){return f/(1e3/(y||60))},wake:function(){Gr&&(!Vi&&Ei()&&(Ut=Vi=window,Oi=Ut.document||{},Mt.gsap=bt,(Ut.gsapVersions||(Ut.gsapVersions=[])).push(bt.version),qr(Un||Ut.GreenSockGlobals||!Ut.gsap&&Ut||{}),go.forEach(yo)),c=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&h.sleep(),u=c||function(y){return setTimeout(y,o-h.time*1e3+1|0)},dn=1,m(2))},sleep:function(){(c?cancelAnimationFrame:clearTimeout)(l),dn=0,u=on},lagSmoothing:function(y,g){t=y||1/0,n=Math.min(g||33,t)},fps:function(y){r=1e3/(y||240),o=h.time*1e3+r},add:function(y,g,x){var v=g?function(w,_,T,S){y(w,_,T,S),h.remove(v)}:y;return h.remove(y),a[x?"unshift":"push"](v),je(),v},remove:function(y,g){~(g=a.indexOf(y))&&a.splice(g,1)&&d>=g&&d--},_listeners:a},h})(),je=function(){return!dn&&kt.wake()},R={},eh=/^[\d.\-M][\d.\-,\s]/,nh=/["']/g,ih=function(t){for(var n={},i=t.substr(1,t.length-3).split(":"),s=i[0],r=1,o=i.length,a,l,u;r<o;r++)l=i[r],a=r!==o-1?l.lastIndexOf(","):l.length,u=l.substr(0,a),n[s]=isNaN(u)?u.replace(nh,"").trim():+u,s=l.substr(a+1).trim();return n},sh=function(t){var n=t.indexOf("(")+1,i=t.indexOf(")"),s=t.indexOf("(",n);return t.substring(n,~s&&s<i?t.indexOf(")",i+1):i)},rh=function(t){var n=(t+"").split("("),i=R[n[0]];return i&&n.length>1&&i.config?i.config.apply(null,~t.indexOf("{")?[ih(n[1])]:sh(t).split(",").map(Qr)):R._CE&&eh.test(t)?R._CE("",t):i},To=function(t){return function(n){return 1-t(1-n)}},bo=function e(t,n){for(var i=t._first,s;i;)i instanceof mt?e(i,n):i.vars.yoyoEase&&(!i._yoyo||!i._repeat)&&i._yoyo!==n&&(i.timeline?e(i.timeline,n):(s=i._ease,i._ease=i._yEase,i._yEase=s,i._yoyo=n)),i=i._next},we=function(t,n){return t&&(Q(t)?t:R[t]||rh(t))||n},Te=function(t,n,i,s){i===void 0&&(i=function(l){return 1-n(1-l)}),s===void 0&&(s=function(l){return l<.5?n(l*2)/2:1-n((1-l)*2)/2});var r={easeIn:n,easeOut:i,easeInOut:s},o;return wt(t,function(a){R[a]=Mt[a]=r,R[o=a.toLowerCase()]=i;for(var l in r)R[o+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=R[a+"."+l]=r[l]}),r},So=function(t){return function(n){return n<.5?(1-t(1-n*2))/2:.5+t((n-.5)*2)/2}},Ki=function e(t,n,i){var s=n>=1?n:1,r=(i||(t?.3:.45))/(n<1?n:1),o=r/Ci*(Math.asin(1/s)||0),a=function(c){return c===1?1:s*Math.pow(2,-10*c)*Ec((c-o)*r)+1},l=t==="out"?a:t==="in"?function(u){return 1-a(1-u)}:So(a);return r=Ci/r,l.config=function(u,c){return e(t,u,c)},l},Yi=function e(t,n){n===void 0&&(n=1.70158);var i=function(o){return o?--o*o*((n+1)*o+n)+1:0},s=t==="out"?i:t==="in"?function(r){return 1-i(1-r)}:So(i);return s.config=function(r){return e(t,r)},s};wt("Linear,Quad,Cubic,Quart,Quint,Strong",function(e,t){var n=t<5?t+1:t;Te(e+",Power"+(n-1),t?function(i){return Math.pow(i,n)}:function(i){return i},function(i){return 1-Math.pow(1-i,n)},function(i){return i<.5?Math.pow(i*2,n)/2:1-Math.pow((1-i)*2,n)/2})}),R.Linear.easeNone=R.none=R.Linear.easeIn,Te("Elastic",Ki("in"),Ki("out"),Ki()),(function(e,t){var n=1/t,i=2*n,s=2.5*n,r=function(a){return a<n?e*a*a:a<i?e*Math.pow(a-1.5/t,2)+.75:a<s?e*(a-=2.25/t)*a+.9375:e*Math.pow(a-2.625/t,2)+.984375};Te("Bounce",function(o){return 1-r(1-o)},r)})(7.5625,2.75),Te("Expo",function(e){return Math.pow(2,10*(e-1))*e+e*e*e*e*e*e*(1-e)}),Te("Circ",function(e){return-(Br(1-e*e)-1)}),Te("Sine",function(e){return e===1?1:-Dc(e*Mc)+1}),Te("Back",Yi("in"),Yi("out"),Yi()),R.SteppedEase=R.steps=Mt.SteppedEase={config:function(t,n){t===void 0&&(t=1);var i=1/t,s=t+(n?0:1),r=n?1:0,o=1-B;return function(a){return((s*un(0,o,a)|0)+r)*i}}},Ne.ease=R["quad.out"],wt("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(e){return Ri+=e+","+e+"Params,"});var Po=function(t,n){this.id=Cc++,t._gsap=this,this.target=t,this.harness=n,this.get=n?n.get:Hr,this.set=n?n.getSetter:Ji},pn=(function(){function e(n){this.vars=n,this._delay=+n.delay||0,(this._repeat=n.repeat===1/0?-2:n.repeat||0)&&(this._rDelay=n.repeatDelay||0,this._yoyo=!!n.yoyo||!!n.yoyoEase),this._ts=1,ze(this,+n.duration,1,1),this.data=n.data,G&&(this._ctx=G,G.data.push(this)),dn||kt.wake()}var t=e.prototype;return t.delay=function(i){return i||i===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+i-this._delay),this._delay=i,this):this._delay},t.duration=function(i){return arguments.length?this.totalDuration(this._repeat>0?i+(i+this._rDelay)*this._repeat:i):this.totalDuration()&&this._dur},t.totalDuration=function(i){return arguments.length?(this._dirty=0,ze(this,this._repeat<0?i:(i-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},t.totalTime=function(i,s){if(je(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){for(Zn(this,i),!r._dp||r.parent||io(r,this);r&&r.parent;)r.parent._time!==r._start+(r._ts>=0?r._tTime/r._ts:(r.totalDuration()-r._tTime)/-r._ts)&&r.totalTime(r._tTime,!0),r=r.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&i<this._tDur||this._ts<0&&i>0||!this._tDur&&!i)&&Wt(this._dp,this,this._start-this._delay)}return(this._tTime!==i||!this._dur&&!s||this._initted&&Math.abs(this._zTime)===B||!this._initted&&this._dur&&i||!i&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=i),Zr(this,i,s)),this},t.time=function(i,s){return arguments.length?this.totalTime(Math.min(this.totalDuration(),i+no(this))%(this._dur+this._rDelay)||(i?this._dur:0),s):this._time},t.totalProgress=function(i,s){return arguments.length?this.totalTime(this.totalDuration()*i,s):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},t.progress=function(i,s){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-i:i)+no(this),s):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},t.iteration=function(i,s){var r=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(i-1)*r,s):this._repeat?Re(this._tTime,r)+1:1},t.timeScale=function(i,s){if(!arguments.length)return this._rts===-B?0:this._rts;if(this._rts===i)return this;var r=this.parent&&this._ts?Xn(this.parent._time,this):this._tTime;return this._rts=+i||0,this._ts=this._ps||i===-B?0:this._rts,this.totalTime(un(-Math.abs(this._delay),this.totalDuration(),r),s!==!1),Hn(this),Bc(this)},t.paused=function(i){return arguments.length?(this._ps!==i&&(this._ps=i,i?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(je(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==B&&(this._tTime-=B)))),this):this._ps},t.startTime=function(i){if(arguments.length){this._start=Y(i);var s=this.parent||this._dp;return s&&(s._sort||!this.parent)&&Wt(s,this,this._start-this._delay),this}return this._start},t.endTime=function(i){return this._start+(xt(i)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},t.rawTime=function(i){var s=this.parent||this._dp;return s?i&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Xn(s.rawTime(i),this):this._tTime:this._tTime},t.revert=function(i){i===void 0&&(i=Lc);var s=ot;return ot=i,Bi(this)&&(this.timeline&&this.timeline.revert(i),this.totalTime(-.01,i.suppressEvents)),this.data!=="nested"&&i.kill!==!1&&this.kill(),ot=s,this},t.globalTime=function(i){for(var s=this,r=arguments.length?i:s.rawTime();s;)r=s._start+r/(Math.abs(s._ts)||1),s=s._dp;return!this.parent&&this._sat?this._sat.globalTime(i):r},t.repeat=function(i){return arguments.length?(this._repeat=i===1/0?-2:i,oo(this)):this._repeat===-2?1/0:this._repeat},t.repeatDelay=function(i){if(arguments.length){var s=this._time;return this._rDelay=i,oo(this),s?this.time(s):this}return this._rDelay},t.yoyo=function(i){return arguments.length?(this._yoyo=i,this):this._yoyo},t.seek=function(i,s){return this.totalTime(Nt(this,i),xt(s))},t.restart=function(i,s){return this.play().totalTime(i?-this._delay:0,xt(s)),this._dur||(this._zTime=-B),this},t.play=function(i,s){return i!=null&&this.seek(i,s),this.reversed(!1).paused(!1)},t.reverse=function(i,s){return i!=null&&this.seek(i||this.totalDuration(),s),this.reversed(!0).paused(!1)},t.pause=function(i,s){return i!=null&&this.seek(i,s),this.paused(!0)},t.resume=function(){return this.paused(!1)},t.reversed=function(i){return arguments.length?(!!i!==this.reversed()&&this.timeScale(-this._rts||(i?-B:0)),this):this._rts<0},t.invalidate=function(){return this._initted=this._act=0,this._zTime=-B,this},t.isActive=function(){var i=this.parent||this._dp,s=this._start,r;return!!(!i||this._ts&&this._initted&&i.isActive()&&(r=i.rawTime(!0))>=s&&r<this.endTime(!0)-B)},t.eventCallback=function(i,s,r){var o=this.vars;return arguments.length>1?(s?(o[i]=s,r&&(o[i+"Params"]=r),i==="onUpdate"&&(this._onUpdate=s)):delete o[i],this):o[i]},t.then=function(i){var s=this,r=s._prom;return new Promise(function(o){var a=Q(i)?i:Jr,l=function(){var c=s.then;s.then=null,r&&r(),Q(a)&&(a=a(s))&&(a.then||a===s)&&(s.then=c),o(a),s.then=c};s._initted&&s.totalProgress()===1&&s._ts>=0||!s._tTime&&s._ts<0?l():s._prom=l})},t.kill=function(){hn(this)},e})();Dt(pn.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-B,_prom:0,_ps:!1,_rts:1});var mt=(function(e){zr(t,e);function t(i,s){var r;return i===void 0&&(i={}),r=e.call(this,i)||this,r.labels={},r.smoothChildTiming=!!i.smoothChildTiming,r.autoRemoveChildren=!!i.autoRemoveChildren,r._sort=xt(i.sortChildren),K&&Wt(i.parent||K,Ht(r),s),i.reversed&&r.reverse(),i.paused&&r.paused(!0),i.scrollTrigger&&so(Ht(r),i.scrollTrigger),r}var n=t.prototype;return n.to=function(s,r,o){return ln(0,arguments,this),this},n.from=function(s,r,o){return ln(1,arguments,this),this},n.fromTo=function(s,r,o,a){return ln(2,arguments,this),this},n.set=function(s,r,o){return r.duration=0,r.parent=this,an(r).repeatDelay||(r.repeat=0),r.immediateRender=!!r.immediateRender,new et(s,r,Nt(this,o),1),this},n.call=function(s,r,o){return Wt(this,et.delayedCall(0,s,r),o)},n.staggerTo=function(s,r,o,a,l,u,c){return o.duration=r,o.stagger=o.stagger||a,o.onComplete=u,o.onCompleteParams=c,o.parent=this,new et(s,o,Nt(this,l)),this},n.staggerFrom=function(s,r,o,a,l,u,c){return o.runBackwards=1,an(o).immediateRender=xt(o.immediateRender),this.staggerTo(s,r,o,a,l,u,c)},n.staggerFromTo=function(s,r,o,a,l,u,c,h){return a.startAt=o,an(a).immediateRender=xt(a.immediateRender),this.staggerTo(s,r,a,l,u,c,h)},n.render=function(s,r,o){var a=this._time,l=this._dirty?this.totalDuration():this._tDur,u=this._dur,c=s<=0?0:Y(s),h=this._zTime<0!=s<0&&(this._initted||!u),f,d,m,p,y,g,x,v,w,_,T,S;if(this!==K&&c>l&&s>=0&&(c=l),c!==this._tTime||o||h){if(a!==this._time&&u&&(c+=this._time-a,s+=this._time-a),f=c,w=this._start,v=this._ts,g=!v,h&&(u||(a=this._zTime),(s||!r)&&(this._zTime=s)),this._repeat){if(T=this._yoyo,y=u+this._rDelay,this._repeat<-1&&s<0)return this.totalTime(y*100+s,r,o);if(f=Y(c%y),c===l?(p=this._repeat,f=u):(_=Y(c/y),p=~~_,p&&p===_&&(f=u,p--),f>u&&(f=u)),_=Re(this._tTime,y),!a&&this._tTime&&_!==p&&this._tTime-_*y-this._dur<=0&&(_=p),T&&p&1&&(f=u-f,S=1),p!==_&&!this._lock){var b=T&&_&1,P=b===(T&&p&1);if(p<_&&(b=!b),a=b?0:c%u?u:c,this._lock=1,this.render(a||(S?0:Y(p*y)),r,!u)._lock=0,this._tTime=c,!r&&this.parent&&Et(this,"onRepeat"),this.vars.repeatRefresh&&!S&&(this.invalidate()._lock=1,_=p),a&&a!==this._time||g!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(u=this._dur,l=this._tDur,P&&(this._lock=2,a=b?u:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!S&&this.invalidate()),this._lock=0,!this._ts&&!g)return this;bo(this,S)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(x=Wc(this,Y(a),Y(f)),x&&(c-=f-(f=x._start))),this._tTime=c,this._time=f,this._act=!v,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=s,a=0),!a&&c&&u&&!r&&!_&&(Et(this,"onStart"),this._tTime!==c))return this;if(f>=a&&s>=0)for(d=this._first;d;){if(m=d._next,(d._act||f>=d._start)&&d._ts&&x!==d){if(d.parent!==this)return this.render(s,r,o);if(d.render(d._ts>0?(f-d._start)*d._ts:(d._dirty?d.totalDuration():d._tDur)+(f-d._start)*d._ts,r,o),f!==this._time||!this._ts&&!g){x=0,m&&(c+=this._zTime=-B);break}}d=m}else{d=this._last;for(var D=s<0?s:f;d;){if(m=d._prev,(d._act||D<=d._end)&&d._ts&&x!==d){if(d.parent!==this)return this.render(s,r,o);if(d.render(d._ts>0?(D-d._start)*d._ts:(d._dirty?d.totalDuration():d._tDur)+(D-d._start)*d._ts,r,o||ot&&Bi(d)),f!==this._time||!this._ts&&!g){x=0,m&&(c+=this._zTime=D?-B:B);break}}d=m}}if(x&&!r&&(this.pause(),x.render(f>=a?0:-B)._zTime=f>=a?1:-1,this._ts))return this._start=w,Hn(this),this.render(s,r,o);this._onUpdate&&!r&&Et(this,"onUpdate",!0),(c===l&&this._tTime>=this.totalDuration()||!c&&a)&&(w===this._start||Math.abs(v)!==Math.abs(this._ts))&&(this._lock||((s||!u)&&(c===l&&this._ts>0||!c&&this._ts<0)&&re(this,1),!r&&!(s<0&&!a)&&(c||a||!l)&&(Et(this,c===l&&s>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(c<l&&this.timeScale()>0)&&this._prom())))}return this},n.add=function(s,r){var o=this;if(Zt(r)||(r=Nt(this,r,s)),!(s instanceof pn)){if(ht(s))return s.forEach(function(a){return o.add(a,r)}),this;if(st(s))return this.addLabel(s,r);if(Q(s))s=et.delayedCall(0,s);else return this}return this!==s?Wt(this,s,r):this},n.getChildren=function(s,r,o,a){s===void 0&&(s=!0),r===void 0&&(r=!0),o===void 0&&(o=!0),a===void 0&&(a=-Ot);for(var l=[],u=this._first;u;)u._start>=a&&(u instanceof et?r&&l.push(u):(o&&l.push(u),s&&l.push.apply(l,u.getChildren(!0,r,o)))),u=u._next;return l},n.getById=function(s){for(var r=this.getChildren(1,1,1),o=r.length;o--;)if(r[o].vars.id===s)return r[o]},n.remove=function(s){return st(s)?this.removeLabel(s):Q(s)?this.killTweensOf(s):(s.parent===this&&Yn(this,s),s===this._recent&&(this._recent=this._last),xe(this))},n.totalTime=function(s,r){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Y(kt.time-(this._ts>0?s/this._ts:(this.totalDuration()-s)/-this._ts))),e.prototype.totalTime.call(this,s,r),this._forcing=0,this):this._tTime},n.addLabel=function(s,r){return this.labels[s]=Nt(this,r),this},n.removeLabel=function(s){return delete this.labels[s],this},n.addPause=function(s,r,o){var a=et.delayedCall(0,r||on,o);return a.data="isPause",this._hasPause=1,Wt(this,a,Nt(this,s))},n.removePause=function(s){var r=this._first;for(s=Nt(this,s);r;)r._start===s&&r.data==="isPause"&&re(r),r=r._next},n.killTweensOf=function(s,r,o){for(var a=this.getTweensOf(s,o),l=a.length;l--;)le!==a[l]&&a[l].kill(s,r);return this},n.getTweensOf=function(s,r){for(var o=[],a=It(s),l=this._first,u=Zt(r),c;l;)l instanceof et?Fc(l._targets,a)&&(u?(!le||l._initted&&l._ts)&&l.globalTime(0)<=r&&l.globalTime(l.totalDuration())>r:!r||l.isActive())&&o.push(l):(c=l.getTweensOf(a,r)).length&&o.push.apply(o,c),l=l._next;return o},n.tweenTo=function(s,r){r=r||{};var o=this,a=Nt(o,s),l=r,u=l.startAt,c=l.onStart,h=l.onStartParams,f=l.immediateRender,d,m=et.to(o,Dt({ease:r.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:r.duration||Math.abs((a-(u&&"time"in u?u.time:o._time))/o.timeScale())||B,onStart:function(){if(o.pause(),!d){var y=r.duration||Math.abs((a-(u&&"time"in u?u.time:o._time))/o.timeScale());m._dur!==y&&ze(m,y,0,1).render(m._time,!0,!0),d=1}c&&c.apply(m,h||[])}},r));return f?m.render(0):m},n.tweenFromTo=function(s,r,o){return this.tweenTo(r,Dt({startAt:{time:Nt(this,s)}},o))},n.recent=function(){return this._recent},n.nextLabel=function(s){return s===void 0&&(s=this._time),mo(this,Nt(this,s))},n.previousLabel=function(s){return s===void 0&&(s=this._time),mo(this,Nt(this,s),1)},n.currentLabel=function(s){return arguments.length?this.seek(s,!0):this.previousLabel(this._time+B)},n.shiftChildren=function(s,r,o){o===void 0&&(o=0);var a=this._first,l=this.labels,u;for(s=Y(s);a;)a._start>=o&&(a._start+=s,a._end+=s),a=a._next;if(r)for(u in l)l[u]>=o&&(l[u]+=s);return xe(this)},n.invalidate=function(s){var r=this._first;for(this._lock=0;r;)r.invalidate(s),r=r._next;return e.prototype.invalidate.call(this,s)},n.clear=function(s){s===void 0&&(s=!0);for(var r=this._first,o;r;)o=r._next,this.remove(r),r=o;return this._dp&&(this._time=this._tTime=this._pTime=0),s&&(this.labels={}),xe(this)},n.totalDuration=function(s){var r=0,o=this,a=o._last,l=Ot,u,c,h;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-s:s));if(o._dirty){for(h=o.parent;a;)u=a._prev,a._dirty&&a.totalDuration(),c=a._start,c>l&&o._sort&&a._ts&&!o._lock?(o._lock=1,Wt(o,a,c-a._delay,1)._lock=0):l=c,c<0&&a._ts&&(r-=c,(!h&&!o._dp||h&&h.smoothChildTiming)&&(o._start+=Y(c/o._ts),o._time-=c,o._tTime-=c),o.shiftChildren(-c,!1,-1/0),l=0),a._end>r&&a._ts&&(r=a._end),a=u;ze(o,o===K&&o._time>r?o._time:r,1,1),o._dirty=0}return o._tDur},t.updateRoot=function(s){if(K._ts&&(Zr(K,Xn(s,K)),Yr=kt.frame),kt.frame>=Xr){Xr+=At.autoSleep||120;var r=K._first;if((!r||!r._ts)&&At.autoSleep&&kt._listeners.length<2){for(;r&&!r._ts;)r=r._next;r||kt.sleep()}}},t})(pn);Dt(mt.prototype,{_lock:0,_hasPause:0,_forcing:0});var oh=function(t,n,i,s,r,o,a){var l=new Tt(this._pt,t,n,0,1,ko,null,r),u=0,c=0,h,f,d,m,p,y,g,x;for(l.b=i,l.e=s,i+="",s+="",(g=~s.indexOf("random("))&&(s=cn(s)),o&&(x=[i,s],o(x,t,n),i=x[0],s=x[1]),f=i.match(ki)||[];h=ki.exec(s);)m=h[0],p=s.substring(u,h.index),d?d=(d+1)%5:p.substr(-5)==="rgba("&&(d=1),m!==f[c++]&&(y=parseFloat(f[c-1])||0,l._pt={_next:l._pt,p:p||c===1?p:",",s:y,c:m.charAt(1)==="="?Le(y,m)-y:parseFloat(m)-y,m:d&&d<4?Math.round:0},u=ki.lastIndex);return l.c=u<s.length?s.substring(u,s.length):"",l.fp=a,(Wr.test(s)||g)&&(l.e=0),this._pt=l,l},Xi=function(t,n,i,s,r,o,a,l,u,c){Q(s)&&(s=s(r||0,t,o));var h=t[n],f=i!=="get"?i:Q(h)?u?t[n.indexOf("set")||!Q(t["get"+n.substr(3)])?n:"get"+n.substr(3)](u):t[n]():h,d=Q(h)?u?hh:Do:Qi,m;if(st(s)&&(~s.indexOf("random(")&&(s=cn(s)),s.charAt(1)==="="&&(m=Le(f,s)+(ft(f)||0),(m||m===0)&&(s=m))),!c||f!==s||Hi)return!isNaN(f*s)&&s!==""?(m=new Tt(this._pt,t,n,+f||0,s-(f||0),typeof h=="boolean"?dh:Eo,0,d),u&&(m.fp=u),a&&m.modifier(a,this,t),this._pt=m):(!h&&!(n in t)&&Ni(n,s),oh.call(this,t,n,f,s,d,l||At.stringFilter,u))},ah=function(t,n,i,s,r){if(Q(t)&&(t=mn(t,r,n,i,s)),!$t(t)||t.style&&t.nodeType||ht(t)||jr(t))return st(t)?mn(t,r,n,i,s):t;var o={},a;for(a in t)o[a]=mn(t[a],r,n,i,s);return o},Ao=function(t,n,i,s,r,o){var a,l,u,c;if(Ct[t]&&(a=new Ct[t]).init(r,a.rawVars?n[t]:ah(n[t],s,r,o,i),i,s,o)!==!1&&(i._pt=l=new Tt(i._pt,r,t,0,1,a.render,a,0,a.priority),i!==Be))for(u=i._ptLookup[i._targets.indexOf(r)],c=a._props.length;c--;)u[a._props[c]]=l;return a},le,Hi,Zi=function e(t,n,i){var s=t.vars,r=s.ease,o=s.startAt,a=s.immediateRender,l=s.lazy,u=s.onUpdate,c=s.runBackwards,h=s.yoyoEase,f=s.keyframes,d=s.autoRevert,m=t._dur,p=t._startAt,y=t._targets,g=t.parent,x=g&&g.data==="nested"?g.vars.targets:y,v=t._overwrite==="auto"&&!Mi,w=t.timeline,_,T,S,b,P,D,O,A,C,I,V,L,N;if(w&&(!f||!r)&&(r="none"),t._ease=we(r,Ne.ease),t._yEase=h?To(we(h===!0?r:h,Ne.ease)):0,h&&t._yoyo&&!t._repeat&&(h=t._yEase,t._yEase=t._ease,t._ease=h),t._from=!w&&!!s.runBackwards,!w||f&&!s.stagger){if(A=y[0]?ve(y[0]).harness:0,L=A&&s[A.prop],_=Kn(s,Ii),p&&(p._zTime<0&&p.progress(1),n<0&&c&&a&&!d?p.render(-1,!0):p.revert(c&&m?Wn:Ic),p._lazy=0),o){if(re(t._startAt=et.set(y,Dt({data:"isStart",overwrite:!1,parent:g,immediateRender:!0,lazy:!p&&xt(l),startAt:null,delay:0,onUpdate:u&&function(){return Et(t,"onUpdate")},stagger:0},o))),t._startAt._dp=0,t._startAt._sat=t,n<0&&(ot||!a&&!d)&&t._startAt.revert(Wn),a&&m&&n<=0&&i<=0){n&&(t._zTime=n);return}}else if(c&&m&&!p){if(n&&(a=!1),S=Dt({overwrite:!1,data:"isFromStart",lazy:a&&!p&&xt(l),immediateRender:a,stagger:0,parent:g},_),L&&(S[A.prop]=L),re(t._startAt=et.set(y,S)),t._startAt._dp=0,t._startAt._sat=t,n<0&&(ot?t._startAt.revert(Wn):t._startAt.render(-1,!0)),t._zTime=n,!a)e(t._startAt,B,B);else if(!n)return}for(t._pt=t._ptCache=0,l=m&&xt(l)||l&&!m,T=0;T<y.length;T++){if(P=y[T],O=P._gsap||zi(y)[T]._gsap,t._ptLookup[T]=I={},Li[O.id]&&se.length&&qn(),V=x===y?T:x.indexOf(P),A&&(C=new A).init(P,L||_,t,V,x)!==!1&&(t._pt=b=new Tt(t._pt,P,C.name,0,1,C.render,C,0,C.priority),C._props.forEach(function(F){I[F]=b}),C.priority&&(D=1)),!A||L)for(S in _)Ct[S]&&(C=Ao(S,_,t,V,P,x))?C.priority&&(D=1):I[S]=b=Xi.call(t,P,S,"get",_[S],V,x,0,s.stringFilter);t._op&&t._op[T]&&t.kill(P,t._op[T]),v&&t._pt&&(le=t,K.killTweensOf(P,I,t.globalTime(n)),N=!t.parent,le=0),t._pt&&l&&(Li[O.id]=1)}D&&Vo(t),t._onInit&&t._onInit(t)}t._onUpdate=u,t._initted=(!t._op||t._pt)&&!N,f&&n<=0&&w.render(Ot,!0,!0)},lh=function(t,n,i,s,r,o,a,l){var u=(t._pt&&t._ptCache||(t._ptCache={}))[n],c,h,f,d;if(!u)for(u=t._ptCache[n]=[],f=t._ptLookup,d=t._targets.length;d--;){if(c=f[d][n],c&&c.d&&c.d._pt)for(c=c.d._pt;c&&c.p!==n&&c.fp!==n;)c=c._next;if(!c)return Hi=1,t.vars[n]="+=0",Zi(t,a),Hi=0,l?rn(n+" not eligible for reset"):1;u.push(c)}for(d=u.length;d--;)h=u[d],c=h._pt||h,c.s=(s||s===0)&&!r?s:c.s+(s||0)+o*c.c,c.c=i-c.s,h.e&&(h.e=tt(i)+ft(h.e)),h.b&&(h.b=c.s+ft(h.b))},uh=function(t,n){var i=t[0]?ve(t[0]).harness:0,s=i&&i.aliases,r,o,a,l;if(!s)return n;r=Fe({},n);for(o in s)if(o in r)for(l=s[o].split(","),a=l.length;a--;)r[l[a]]=r[o];return r},ch=function(t,n,i,s){var r=n.ease||s||"power1.inOut",o,a;if(ht(n))a=i[t]||(i[t]=[]),n.forEach(function(l,u){return a.push({t:u/(n.length-1)*100,v:l,e:r})});else for(o in n)a=i[o]||(i[o]=[]),o==="ease"||a.push({t:parseFloat(t),v:n[o],e:r})},mn=function(t,n,i,s,r){return Q(t)?t.call(n,i,s,r):st(t)&&~t.indexOf("random(")?cn(t):t},Mo=Ri+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",Co={};wt(Mo+",id,stagger,delay,duration,paused,scrollTrigger",function(e){return Co[e]=1});var et=(function(e){zr(t,e);function t(i,s,r,o){var a;typeof s=="number"&&(r.duration=s,s=r,r=null),a=e.call(this,o?s:an(s))||this;var l=a.vars,u=l.duration,c=l.delay,h=l.immediateRender,f=l.stagger,d=l.overwrite,m=l.keyframes,p=l.defaults,y=l.scrollTrigger,g=l.yoyoEase,x=s.parent||K,v=(ht(i)||jr(i)?Zt(i[0]):"length"in s)?[i]:It(i),w,_,T,S,b,P,D,O;if(a._targets=v.length?zi(v):rn("GSAP target "+i+" not found. https://gsap.com",!At.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=d,m||f||$n(u)||$n(c)){if(s=a.vars,w=a.timeline=new mt({data:"nested",defaults:p||{},targets:x&&x.data==="nested"?x.vars.targets:v}),w.kill(),w.parent=w._dp=Ht(a),w._start=0,f||$n(u)||$n(c)){if(S=v.length,D=f&&uo(f),$t(f))for(b in f)~Mo.indexOf(b)&&(O||(O={}),O[b]=f[b]);for(_=0;_<S;_++)T=Kn(s,Co),T.stagger=0,g&&(T.yoyoEase=g),O&&Fe(T,O),P=v[_],T.duration=+mn(u,Ht(a),_,P,v),T.delay=(+mn(c,Ht(a),_,P,v)||0)-a._delay,!f&&S===1&&T.delay&&(a._delay=c=T.delay,a._start+=c,T.delay=0),w.to(P,T,D?D(_,P,v):0),w._ease=R.none;w.duration()?u=c=0:a.timeline=0}else if(m){an(Dt(w.vars.defaults,{ease:"none"})),w._ease=we(m.ease||s.ease||"none");var A=0,C,I,V;if(ht(m))m.forEach(function(L){return w.to(v,L,">")}),w.duration();else{T={};for(b in m)b==="ease"||b==="easeEach"||ch(b,m[b],T,m.easeEach);for(b in T)for(C=T[b].sort(function(L,N){return L.t-N.t}),A=0,_=0;_<C.length;_++)I=C[_],V={ease:I.e,duration:(I.t-(_?C[_-1].t:0))/100*u},V[b]=I.v,w.to(v,V,A),A+=V.duration;w.duration()<u&&w.to({},{duration:u-w.duration()})}}u||a.duration(u=w.duration())}else a.timeline=0;return d===!0&&!Mi&&(le=Ht(a),K.killTweensOf(v),le=0),Wt(x,Ht(a),r),s.reversed&&a.reverse(),s.paused&&a.paused(!0),(h||!u&&!m&&a._start===Y(x._time)&&xt(h)&&jc(Ht(a))&&x.data!=="nested")&&(a._tTime=-B,a.render(Math.max(0,-c)||0)),y&&so(Ht(a),y),a}var n=t.prototype;return n.render=function(s,r,o){var a=this._time,l=this._tDur,u=this._dur,c=s<0,h=s>l-B&&!c?l:s<B?0:s,f,d,m,p,y,g,x,v,w;if(!u)Uc(this,s,r,o);else if(h!==this._tTime||!s||o||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==c||this._lazy){if(f=h,v=this.timeline,this._repeat){if(p=u+this._rDelay,this._repeat<-1&&c)return this.totalTime(p*100+s,r,o);if(f=Y(h%p),h===l?(m=this._repeat,f=u):(y=Y(h/p),m=~~y,m&&m===y?(f=u,m--):f>u&&(f=u)),g=this._yoyo&&m&1,g&&(w=this._yEase,f=u-f),y=Re(this._tTime,p),f===a&&!o&&this._initted&&m===y)return this._tTime=h,this;m!==y&&(v&&this._yEase&&bo(v,g),this.vars.repeatRefresh&&!g&&!this._lock&&f!==p&&this._initted&&(this._lock=o=1,this.render(Y(p*m),!0).invalidate()._lock=0))}if(!this._initted){if(ro(this,c?s:f,o,r,h))return this._tTime=0,this;if(a!==this._time&&!(o&&this.vars.repeatRefresh&&m!==y))return this;if(u!==this._dur)return this.render(s,r,o)}if(this._tTime=h,this._time=f,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=x=(w||this._ease)(f/u),this._from&&(this.ratio=x=1-x),!a&&h&&!r&&!y&&(Et(this,"onStart"),this._tTime!==h))return this;for(d=this._pt;d;)d.r(x,d.d),d=d._next;v&&v.render(s<0?s:v._dur*v._ease(f/this._dur),r,o)||this._startAt&&(this._zTime=s),this._onUpdate&&!r&&(c&&ji(this,s,r,o),Et(this,"onUpdate")),this._repeat&&m!==y&&this.vars.onRepeat&&!r&&this.parent&&Et(this,"onRepeat"),(h===this._tDur||!h)&&this._tTime===h&&(c&&!this._onUpdate&&ji(this,s,!0,!0),(s||!u)&&(h===this._tDur&&this._ts>0||!h&&this._ts<0)&&re(this,1),!r&&!(c&&!a)&&(h||a||g)&&(Et(this,h===l?"onComplete":"onReverseComplete",!0),this._prom&&!(h<l&&this.timeScale()>0)&&this._prom()))}return this},n.targets=function(){return this._targets},n.invalidate=function(s){return(!s||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(s),e.prototype.invalidate.call(this,s)},n.resetTo=function(s,r,o,a,l){dn||kt.wake(),this._ts||this.play();var u=Math.min(this._dur,(this._dp._time-this._start)*this._ts),c;return this._initted||Zi(this,u),c=this._ease(u/this._dur),lh(this,s,r,o,a,c,u,l)?this.resetTo(s,r,o,a,1):(Zn(this,0),this.parent||eo(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},n.kill=function(s,r){if(r===void 0&&(r="all"),!s&&(!r||r==="all"))return this._lazy=this._pt=0,this.parent?hn(this):this.scrollTrigger&&this.scrollTrigger.kill(!!ot),this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(s,r,le&&le.vars.overwrite!==!0)._first||hn(this),this.parent&&o!==this.timeline.totalDuration()&&ze(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,l=s?It(s):a,u=this._ptLookup,c=this._pt,h,f,d,m,p,y,g;if((!r||r==="all")&&zc(a,l))return r==="all"&&(this._pt=0),hn(this);for(h=this._op=this._op||[],r!=="all"&&(st(r)&&(p={},wt(r,function(x){return p[x]=1}),r=p),r=uh(a,r)),g=a.length;g--;)if(~l.indexOf(a[g])){f=u[g],r==="all"?(h[g]=r,m=f,d={}):(d=h[g]=h[g]||{},m=r);for(p in m)y=f&&f[p],y&&((!("kill"in y.d)||y.d.kill(p)===!0)&&Yn(this,y,"_pt"),delete f[p]),d!=="all"&&(d[p]=1)}return this._initted&&!this._pt&&c&&hn(this),this},t.to=function(s,r){return new t(s,r,arguments[2])},t.from=function(s,r){return ln(1,arguments)},t.delayedCall=function(s,r,o,a){return new t(r,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:s,onComplete:r,onReverseComplete:r,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:a})},t.fromTo=function(s,r,o){return ln(2,arguments)},t.set=function(s,r){return r.duration=0,r.repeatDelay||(r.repeat=0),new t(s,r)},t.killTweensOf=function(s,r,o){return K.killTweensOf(s,r,o)},t})(pn);Dt(et.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),wt("staggerTo,staggerFrom,staggerFromTo",function(e){et[e]=function(){var t=new mt,n=Ui.call(arguments,0);return n.splice(e==="staggerFromTo"?5:4,0,0),t[e].apply(t,n)}});var Qi=function(t,n,i){return t[n]=i},Do=function(t,n,i){return t[n](i)},hh=function(t,n,i,s){return t[n](s.fp,i)},fh=function(t,n,i){return t.setAttribute(n,i)},Ji=function(t,n){return Q(t[n])?Do:Di(t[n])&&t.setAttribute?fh:Qi},Eo=function(t,n){return n.set(n.t,n.p,Math.round((n.s+n.c*t)*1e6)/1e6,n)},dh=function(t,n){return n.set(n.t,n.p,!!(n.s+n.c*t),n)},ko=function(t,n){var i=n._pt,s="";if(!t&&n.b)s=n.b;else if(t===1&&n.e)s=n.e;else{for(;i;)s=i.p+(i.m?i.m(i.s+i.c*t):Math.round((i.s+i.c*t)*1e4)/1e4)+s,i=i._next;s+=n.c}n.set(n.t,n.p,s,n)},ts=function(t,n){for(var i=n._pt;i;)i.r(t,i.d),i=i._next},ph=function(t,n,i,s){for(var r=this._pt,o;r;)o=r._next,r.p===s&&r.modifier(t,n,i),r=o},mh=function(t){for(var n=this._pt,i,s;n;)s=n._next,n.p===t&&!n.op||n.op===t?Yn(this,n,"_pt"):n.dep||(i=1),n=s;return!i},gh=function(t,n,i,s){s.mSet(t,n,s.m.call(s.tween,i,s.mt),s)},Vo=function(t){for(var n=t._pt,i,s,r,o;n;){for(i=n._next,s=r;s&&s.pr>n.pr;)s=s._next;(n._prev=s?s._prev:o)?n._prev._next=n:r=n,(n._next=s)?s._prev=n:o=n,n=i}t._pt=r},Tt=(function(){function e(n,i,s,r,o,a,l,u,c){this.t=i,this.s=r,this.c=o,this.p=s,this.r=a||Eo,this.d=l||this,this.set=u||Qi,this.pr=c||0,this._next=n,n&&(n._prev=this)}var t=e.prototype;return t.modifier=function(i,s,r){this.mSet=this.mSet||this.set,this.set=gh,this.m=i,this.mt=r,this.tween=s},e})();wt(Ri+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(e){return Ii[e]=1}),Mt.TweenMax=Mt.TweenLite=et,Mt.TimelineLite=Mt.TimelineMax=mt,K=new mt({sortChildren:!1,defaults:Ne,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),At.stringFilter=wo;var be=[],Qn={},yh=[],Oo=0,_h=0,es=function(t){return(Qn[t]||yh).map(function(n){return n()})},ns=function(){var t=Date.now(),n=[];t-Oo>2&&(es("matchMediaInit"),be.forEach(function(i){var s=i.queries,r=i.conditions,o,a,l,u;for(a in s)o=Ut.matchMedia(s[a]).matches,o&&(l=1),o!==r[a]&&(r[a]=o,u=1);u&&(i.revert(),l&&n.push(i))}),es("matchMediaRevert"),n.forEach(function(i){return i.onMatch(i,function(s){return i.add(null,s)})}),Oo=t,es("matchMedia"))},No=(function(){function e(n,i){this.selector=i&&Wi(i),this.data=[],this._r=[],this.isReverted=!1,this.id=_h++,n&&this.add(n)}var t=e.prototype;return t.add=function(i,s,r){Q(i)&&(r=s,s=i,i=Q);var o=this,a=function(){var u=G,c=o.selector,h;return u&&u!==o&&u.data.push(o),r&&(o.selector=Wi(r)),G=o,h=s.apply(o,arguments),Q(h)&&o._r.push(h),G=u,o.selector=c,o.isReverted=!1,h};return o.last=a,i===Q?a(o,function(l){return o.add(null,l)}):i?o[i]=a:a},t.ignore=function(i){var s=G;G=null,i(this),G=s},t.getTweens=function(){var i=[];return this.data.forEach(function(s){return s instanceof e?i.push.apply(i,s.getTweens()):s instanceof et&&!(s.parent&&s.parent.data==="nested")&&i.push(s)}),i},t.clear=function(){this._r.length=this.data.length=0},t.kill=function(i,s){var r=this;if(i?(function(){for(var a=r.getTweens(),l=r.data.length,u;l--;)u=r.data[l],u.data==="isFlip"&&(u.revert(),u.getChildren(!0,!0,!1).forEach(function(c){return a.splice(a.indexOf(c),1)}));for(a.map(function(c){return{g:c._dur||c._delay||c._sat&&!c._sat.vars.immediateRender?c.globalTime(0):-1/0,t:c}}).sort(function(c,h){return h.g-c.g||-1/0}).forEach(function(c){return c.t.revert(i)}),l=r.data.length;l--;)u=r.data[l],u instanceof mt?u.data!=="nested"&&(u.scrollTrigger&&u.scrollTrigger.revert(),u.kill()):!(u instanceof et)&&u.revert&&u.revert(i);r._r.forEach(function(c){return c(i,r)}),r.isReverted=!0})():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),s)for(var o=be.length;o--;)be[o].id===this.id&&be.splice(o,1)},t.revert=function(i){this.kill(i||{})},e})(),vh=(function(){function e(n){this.contexts=[],this.scope=n,G&&G.data.push(this)}var t=e.prototype;return t.add=function(i,s,r){$t(i)||(i={matches:i});var o=new No(0,r||this.scope),a=o.conditions={},l,u,c;G&&!o.selector&&(o.selector=G.selector),this.contexts.push(o),s=o.add("onMatch",s),o.queries=i;for(u in i)u==="all"?c=1:(l=Ut.matchMedia(i[u]),l&&(be.indexOf(o)<0&&be.push(o),(a[u]=l.matches)&&(c=1),l.addListener?l.addListener(ns):l.addEventListener("change",ns)));return c&&s(o,function(h){return o.add(null,h)}),this},t.revert=function(i){this.kill(i||{})},t.kill=function(i){this.contexts.forEach(function(s){return s.kill(i,!0)})},e})(),Jn={registerPlugin:function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];n.forEach(function(s){return yo(s)})},timeline:function(t){return new mt(t)},getTweensOf:function(t,n){return K.getTweensOf(t,n)},getProperty:function(t,n,i,s){st(t)&&(t=It(t)[0]);var r=ve(t||{}).get,o=i?Jr:Qr;return i==="native"&&(i=""),t&&(n?o((Ct[n]&&Ct[n].get||r)(t,n,i,s)):function(a,l,u){return o((Ct[a]&&Ct[a].get||r)(t,a,l,u))})},quickSetter:function(t,n,i){if(t=It(t),t.length>1){var s=t.map(function(c){return bt.quickSetter(c,n,i)}),r=s.length;return function(c){for(var h=r;h--;)s[h](c)}}t=t[0]||{};var o=Ct[n],a=ve(t),l=a.harness&&(a.harness.aliases||{})[n]||n,u=o?function(c){var h=new o;Be._pt=0,h.init(t,i?c+i:c,Be,0,[t]),h.render(1,h),Be._pt&&ts(1,Be)}:a.set(t,l);return o?u:function(c){return u(t,l,i?c+i:c,a,1)}},quickTo:function(t,n,i){var s,r=bt.to(t,Dt((s={},s[n]="+=0.1",s.paused=!0,s.stagger=0,s),i||{})),o=function(l,u,c){return r.resetTo(n,l,u,c)};return o.tween=r,o},isTweening:function(t){return K.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=we(t.ease,Ne.ease)),to(Ne,t||{})},config:function(t){return to(At,t||{})},registerEffect:function(t){var n=t.name,i=t.effect,s=t.plugins,r=t.defaults,o=t.extendTimeline;(s||"").split(",").forEach(function(a){return a&&!Ct[a]&&!Mt[a]&&rn(n+" effect requires "+a+" plugin.")}),Fi[n]=function(a,l,u){return i(It(a),Dt(l||{},r),u)},o&&(mt.prototype[n]=function(a,l,u){return this.add(Fi[n](a,$t(l)?l:(u=l)&&{},this),u)})},registerEase:function(t,n){R[t]=we(n)},parseEase:function(t,n){return arguments.length?we(t,n):R},getById:function(t){return K.getById(t)},exportRoot:function(t,n){t===void 0&&(t={});var i=new mt(t),s,r;for(i.smoothChildTiming=xt(t.smoothChildTiming),K.remove(i),i._dp=0,i._time=i._tTime=K._time,s=K._first;s;)r=s._next,(n||!(!s._dur&&s instanceof et&&s.vars.onComplete===s._targets[0]))&&Wt(i,s,s._start-s._delay),s=r;return Wt(K,i,0),i},context:function(t,n){return t?new No(t,n):G},matchMedia:function(t){return new vh(t)},matchMediaRefresh:function(){return be.forEach(function(t){var n=t.conditions,i,s;for(s in n)n[s]&&(n[s]=!1,i=1);i&&t.revert()})||ns()},addEventListener:function(t,n){var i=Qn[t]||(Qn[t]=[]);~i.indexOf(n)||i.push(n)},removeEventListener:function(t,n){var i=Qn[t],s=i&&i.indexOf(n);s>=0&&i.splice(s,1)},utils:{wrap:Zc,wrapYoyo:Qc,distribute:uo,random:ho,snap:co,normalize:Hc,getUnit:ft,clamp:qc,splitColor:_o,toArray:It,selector:Wi,mapRange:po,pipe:Yc,unitize:Xc,interpolate:Jc,shuffle:lo},install:qr,effects:Fi,ticker:kt,updateRoot:mt.updateRoot,plugins:Ct,globalTimeline:K,core:{PropTween:Tt,globals:Kr,Tween:et,Timeline:mt,Animation:pn,getCache:ve,_removeLinkedListItem:Yn,reverting:function(){return ot},context:function(t){return t&&G&&(G.data.push(t),t._ctx=G),G},suppressOverwrites:function(t){return Mi=t}}};wt("to,from,fromTo,delayedCall,set,killTweensOf",function(e){return Jn[e]=et[e]}),kt.add(mt.updateRoot),Be=Jn.to({},{duration:0});var xh=function(t,n){for(var i=t._pt;i&&i.p!==n&&i.op!==n&&i.fp!==n;)i=i._next;return i},wh=function(t,n){var i=t._targets,s,r,o;for(s in n)for(r=i.length;r--;)o=t._ptLookup[r][s],o&&(o=o.d)&&(o._pt&&(o=xh(o,s)),o&&o.modifier&&o.modifier(n[s],t,i[r],s))},is=function(t,n){return{name:t,headless:1,rawVars:1,init:function(s,r,o){o._onInit=function(a){var l,u;if(st(r)&&(l={},wt(r,function(c){return l[c]=1}),r=l),n){l={};for(u in r)l[u]=n(r[u]);r=l}wh(a,r)}}}},bt=Jn.registerPlugin({name:"attr",init:function(t,n,i,s,r){var o,a,l;this.tween=i;for(o in n)l=t.getAttribute(o)||"",a=this.add(t,"setAttribute",(l||0)+"",n[o],s,r,0,0,o),a.op=o,a.b=l,this._props.push(o)},render:function(t,n){for(var i=n._pt;i;)ot?i.set(i.t,i.p,i.b,i):i.r(t,i.d),i=i._next}},{name:"endArray",headless:1,init:function(t,n){for(var i=n.length;i--;)this.add(t,i,t[i]||0,n[i],0,0,0,0,0,1)}},is("roundProps",Gi),is("modifiers"),is("snap",co))||Jn;et.version=mt.version=bt.version="3.14.2",Gr=1,Ei()&&je(),R.Power0,R.Power1,R.Power2,R.Power3,R.Power4,R.Linear,R.Quad,R.Cubic,R.Quart,R.Quint,R.Strong,R.Elastic,R.Back,R.SteppedEase,R.Bounce,R.Sine,R.Expo,R.Circ;/*!
|
|
8
|
+
*/var Pt={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},Oe={duration:.5,overwrite:!1,delay:0},Mi,ot,G,Vt=1e8,z=1/Vt,Ci=Math.PI*2,Dc=Ci/4,Ec=0,jr=Math.sqrt,kc=Math.cos,Vc=Math.sin,st=function(t){return typeof t=="string"},Q=function(t){return typeof t=="function"},Zt=function(t){return typeof t=="number"},Di=function(t){return typeof t>"u"},$t=function(t){return typeof t=="object"},vt=function(t){return t!==!1},Ei=function(){return typeof window<"u"},$n=function(t){return Q(t)||st(t)},$r=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},ct=Array.isArray,Oc=/random\([^)]+\)/g,Nc=/,\s*/g,Ur=/(?:-?\.?\d|\.)+/gi,Wr=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Ne=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,ki=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,Gr=/[+-]=-?[.\d]+/,Ic=/[^,'"\[\]\s]+/gi,Lc=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,K,Ut,Vi,Oi,At={},Un={},qr,Kr=function(t){return(Un=Le(t,At))&&Tt},Ni=function(t,n){return console.warn("Invalid property",t,"set to",n,"Missing plugin? gsap.registerPlugin()")},rn=function(t,n){return!n&&console.warn(t)},Yr=function(t,n){return t&&(At[t]=n)&&Un&&(Un[t]=n)||At},on=function(){return 0},Fc={suppressEvents:!0,isStart:!0,kill:!1},Wn={suppressEvents:!0,kill:!1},Rc={suppressEvents:!0},Ii={},se=[],Li={},Xr,Mt={},Fi={},Hr=30,Gn=[],Ri="",zi=function(t){var n=t[0],i,s;if($t(n)||Q(n)||(t=[t]),!(i=(n._gsap||{}).harness)){for(s=Gn.length;s--&&!Gn[s].targetTest(n););i=Gn[s]}for(s=t.length;s--;)t[s]&&(t[s]._gsap||(t[s]._gsap=new Ao(t[s],i)))||t.splice(s,1);return t},_e=function(t){return t._gsap||zi(Nt(t))[0]._gsap},Zr=function(t,n,i){return(i=t[n])&&Q(i)?t[n]():Di(i)&&t.getAttribute&&t.getAttribute(n)||i},xt=function(t,n){return(t=t.split(",")).forEach(n)||t},tt=function(t){return Math.round(t*1e5)/1e5||0},Y=function(t){return Math.round(t*1e7)/1e7||0},Ie=function(t,n){var i=n.charAt(0),s=parseFloat(n.substr(2));return t=parseFloat(t),i==="+"?t+s:i==="-"?t-s:i==="*"?t*s:t/s},zc=function(t,n){for(var i=n.length,s=0;t.indexOf(n[s])<0&&++s<i;);return s<i},qn=function(){var t=se.length,n=se.slice(0),i,s;for(Li={},se.length=0,i=0;i<t;i++)s=n[i],s&&s._lazy&&(s.render(s._lazy[0],s._lazy[1],!0)._lazy=0)},Bi=function(t){return!!(t._initted||t._startAt||t.add)},Qr=function(t,n,i,s){se.length&&!ot&&qn(),t.render(n,i,!!(ot&&n<0&&Bi(t))),se.length&&!ot&&qn()},Jr=function(t){var n=parseFloat(t);return(n||n===0)&&(t+"").match(Ic).length<2?n:st(t)?t.trim():t},to=function(t){return t},Ct=function(t,n){for(var i in n)i in t||(t[i]=n[i]);return t},Bc=function(t){return function(n,i){for(var s in i)s in n||s==="duration"&&t||s==="ease"||(n[s]=i[s])}},Le=function(t,n){for(var i in n)t[i]=n[i];return t},eo=function e(t,n){for(var i in n)i!=="__proto__"&&i!=="constructor"&&i!=="prototype"&&(t[i]=$t(n[i])?e(t[i]||(t[i]={}),n[i]):n[i]);return t},Kn=function(t,n){var i={},s;for(s in t)s in n||(i[s]=t[s]);return i},an=function(t){var n=t.parent||K,i=t.keyframes?Bc(ct(t.keyframes)):Ct;if(vt(t.inherit))for(;n;)i(t,n.vars.defaults),n=n.parent||n._dp;return t},jc=function(t,n){for(var i=t.length,s=i===n.length;s&&i--&&t[i]===n[i];);return i<0},no=function(t,n,i,s,r){var o=t[s],a;if(r)for(a=n[r];o&&o[r]>a;)o=o._prev;return o?(n._next=o._next,o._next=n):(n._next=t[i],t[i]=n),n._next?n._next._prev=n:t[s]=n,n._prev=o,n.parent=n._dp=t,n},Yn=function(t,n,i,s){i===void 0&&(i="_first"),s===void 0&&(s="_last");var r=n._prev,o=n._next;r?r._next=o:t[i]===n&&(t[i]=o),o?o._prev=r:t[s]===n&&(t[s]=r),n._next=n._prev=n.parent=null},re=function(t,n){t.parent&&(!n||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0},ve=function(t,n){if(t&&(!n||n._end>t._dur||n._start<0))for(var i=t;i;)i._dirty=1,i=i.parent;return t},$c=function(t){for(var n=t.parent;n&&n.parent;)n._dirty=1,n.totalDuration(),n=n.parent;return t},ji=function(t,n,i,s){return t._startAt&&(ot?t._startAt.revert(Wn):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(n,!0,s))},Uc=function e(t){return!t||t._ts&&e(t.parent)},io=function(t){return t._repeat?Fe(t._tTime,t=t.duration()+t._rDelay)*t:0},Fe=function(t,n){var i=Math.floor(t=Y(t/n));return t&&i===t?i-1:i},Xn=function(t,n){return(t-n._start)*n._ts+(n._ts>=0?0:n._dirty?n.totalDuration():n._tDur)},Hn=function(t){return t._end=Y(t._start+(t._tDur/Math.abs(t._ts||t._rts||z)||0))},Zn=function(t,n){var i=t._dp;return i&&i.smoothChildTiming&&t._ts&&(t._start=Y(i._time-(t._ts>0?n/t._ts:((t._dirty?t.totalDuration():t._tDur)-n)/-t._ts)),Hn(t),i._dirty||ve(i,t)),t},so=function(t,n){var i;if((n._time||!n._dur&&n._initted||n._start<t._time&&(n._dur||!n.add))&&(i=Xn(t.rawTime(),n),(!n._dur||un(0,n.totalDuration(),i)-n._tTime>z)&&n.render(i,!0)),ve(t,n)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(i=t;i._dp;)i.rawTime()>=0&&i.totalTime(i._tTime),i=i._dp;t._zTime=-z}},Wt=function(t,n,i,s){return n.parent&&re(n),n._start=Y((Zt(i)?i:i||t!==K?Ot(t,i,n):t._time)+n._delay),n._end=Y(n._start+(n.totalDuration()/Math.abs(n.timeScale())||0)),no(t,n,"_first","_last",t._sort?"_start":0),$i(n)||(t._recent=n),s||so(t,n),t._ts<0&&Zn(t,t._tTime),t},ro=function(t,n){return(At.ScrollTrigger||Ni("scrollTrigger",n))&&At.ScrollTrigger.create(n,t)},oo=function(t,n,i,s,r){if(Zi(t,n,r),!t._initted)return 1;if(!i&&t._pt&&!ot&&(t._dur&&t.vars.lazy!==!1||!t._dur&&t.vars.lazy)&&Xr!==Et.frame)return se.push(t),t._lazy=[r,s],1},Wc=function e(t){var n=t.parent;return n&&n._ts&&n._initted&&!n._lock&&(n.rawTime()<0||e(n))},$i=function(t){var n=t.data;return n==="isFromStart"||n==="isStart"},Gc=function(t,n,i,s){var r=t.ratio,o=n<0||!n&&(!t._start&&Wc(t)&&!(!t._initted&&$i(t))||(t._ts<0||t._dp._ts<0)&&!$i(t))?0:1,a=t._rDelay,l=0,u,c,h;if(a&&t._repeat&&(l=un(0,t._tDur,n),c=Fe(l,a),t._yoyo&&c&1&&(o=1-o),c!==Fe(t._tTime,a)&&(r=1-o,t.vars.repeatRefresh&&t._initted&&t.invalidate())),o!==r||ot||s||t._zTime===z||!n&&t._zTime){if(!t._initted&&oo(t,n,s,i,l))return;for(h=t._zTime,t._zTime=n||(i?z:0),i||(i=n&&!h),t.ratio=o,t._from&&(o=1-o),t._time=0,t._tTime=l,u=t._pt;u;)u.r(o,u.d),u=u._next;n<0&&ji(t,n,i,!0),t._onUpdate&&!i&&Dt(t,"onUpdate"),l&&t._repeat&&!i&&t.parent&&Dt(t,"onRepeat"),(n>=t._tDur||n<0)&&t.ratio===o&&(o&&re(t,1),!i&&!ot&&(Dt(t,o?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=n)},qc=function(t,n,i){var s;if(i>n)for(s=t._first;s&&s._start<=i;){if(s.data==="isPause"&&s._start>n)return s;s=s._next}else for(s=t._last;s&&s._start>=i;){if(s.data==="isPause"&&s._start<n)return s;s=s._prev}},Re=function(t,n,i,s){var r=t._repeat,o=Y(n)||0,a=t._tTime/t._tDur;return a&&!s&&(t._time*=o/t._dur),t._dur=o,t._tDur=r?r<0?1e10:Y(o*(r+1)+t._rDelay*r):o,a>0&&!s&&Zn(t,t._tTime=t._tDur*a),t.parent&&Hn(t),i||ve(t.parent,t),t},ao=function(t){return t instanceof pt?ve(t):Re(t,t._dur)},Kc={_start:0,endTime:on,totalDuration:on},Ot=function e(t,n,i){var s=t.labels,r=t._recent||Kc,o=t.duration()>=Vt?r.endTime(!1):t._dur,a,l,u;return st(n)&&(isNaN(n)||n in s)?(l=n.charAt(0),u=n.substr(-1)==="%",a=n.indexOf("="),l==="<"||l===">"?(a>=0&&(n=n.replace(/=/,"")),(l==="<"?r._start:r.endTime(r._repeat>=0))+(parseFloat(n.substr(1))||0)*(u?(a<0?r:i).totalDuration()/100:1)):a<0?(n in s||(s[n]=o),s[n]):(l=parseFloat(n.charAt(a-1)+n.substr(a+1)),u&&i&&(l=l/100*(ct(i)?i[0]:i).totalDuration()),a>1?e(t,n.substr(0,a-1),i)+l:o+l)):n==null?o:+n},ln=function(t,n,i){var s=Zt(n[1]),r=(s?2:1)+(t<2?0:1),o=n[r],a,l;if(s&&(o.duration=n[1]),o.parent=i,t){for(a=o,l=i;l&&!("immediateRender"in a);)a=l.vars.defaults||{},l=vt(l.vars.inherit)&&l.parent;o.immediateRender=vt(a.immediateRender),t<2?o.runBackwards=1:o.startAt=n[r-1]}return new et(n[0],o,n[r+1])},oe=function(t,n){return t||t===0?n(t):n},un=function(t,n,i){return i<t?t:i>n?n:i},ht=function(t,n){return!st(t)||!(n=Lc.exec(t))?"":n[1]},Yc=function(t,n,i){return oe(i,function(s){return un(t,n,s)})},Ui=[].slice,lo=function(t,n){return t&&$t(t)&&"length"in t&&(!n&&!t.length||t.length-1 in t&&$t(t[0]))&&!t.nodeType&&t!==Ut},Xc=function(t,n,i){return i===void 0&&(i=[]),t.forEach(function(s){var r;return st(s)&&!n||lo(s,1)?(r=i).push.apply(r,Nt(s)):i.push(s)})||i},Nt=function(t,n,i){return G&&!n&&G.selector?G.selector(t):st(t)&&!i&&(Vi||!Be())?Ui.call((n||Oi).querySelectorAll(t),0):ct(t)?Xc(t,i):lo(t)?Ui.call(t,0):t?[t]:[]},Wi=function(t){return t=Nt(t)[0]||rn("Invalid scope")||{},function(n){var i=t.current||t.nativeElement||t;return Nt(n,i.querySelectorAll?i:i===t?rn("Invalid scope")||Oi.createElement("div"):t)}},uo=function(t){return t.sort(function(){return .5-Math.random()})},co=function(t){if(Q(t))return t;var n=$t(t)?t:{each:t},i=xe(n.ease),s=n.from||0,r=parseFloat(n.base)||0,o={},a=s>0&&s<1,l=isNaN(s)||a,u=n.axis,c=s,h=s;return st(s)?c=h={center:.5,edges:.5,end:1}[s]||0:!a&&l&&(c=s[0],h=s[1]),function(f,d,m){var p=(m||n).length,y=o[p],g,x,v,w,_,T,S,b,P;if(!y){if(P=n.grid==="auto"?0:(n.grid||[1,Vt])[1],!P){for(S=-Vt;S<(S=m[P++].getBoundingClientRect().left)&&P<p;);P<p&&P--}for(y=o[p]=[],g=l?Math.min(P,p)*c-.5:s%P,x=P===Vt?0:l?p*h/P-.5:s/P|0,S=0,b=Vt,T=0;T<p;T++)v=T%P-g,w=x-(T/P|0),y[T]=_=u?Math.abs(u==="y"?w:v):jr(v*v+w*w),_>S&&(S=_),_<b&&(b=_);s==="random"&&uo(y),y.max=S-b,y.min=b,y.v=p=(parseFloat(n.amount)||parseFloat(n.each)*(P>p?p-1:u?u==="y"?p/P:P:Math.max(P,p/P))||0)*(s==="edges"?-1:1),y.b=p<0?r-p:r,y.u=ht(n.amount||n.each)||0,i=i&&p<0?bo(i):i}return p=(y[f]-y.min)/y.max||0,Y(y.b+(i?i(p):p)*y.v)+y.u}},Gi=function(t){var n=Math.pow(10,((t+"").split(".")[1]||"").length);return function(i){var s=Y(Math.round(parseFloat(i)/t)*t*n);return(s-s%1)/n+(Zt(i)?0:ht(i))}},ho=function(t,n){var i=ct(t),s,r;return!i&&$t(t)&&(s=i=t.radius||Vt,t.values?(t=Nt(t.values),(r=!Zt(t[0]))&&(s*=s)):t=Gi(t.increment)),oe(n,i?Q(t)?function(o){return r=t(o),Math.abs(r-o)<=s?r:o}:function(o){for(var a=parseFloat(r?o.x:o),l=parseFloat(r?o.y:0),u=Vt,c=0,h=t.length,f,d;h--;)r?(f=t[h].x-a,d=t[h].y-l,f=f*f+d*d):f=Math.abs(t[h]-a),f<u&&(u=f,c=h);return c=!s||u<=s?t[c]:o,r||c===o||Zt(o)?c:c+ht(o)}:Gi(t))},fo=function(t,n,i,s){return oe(ct(t)?!n:i===!0?!!(i=0):!s,function(){return ct(t)?t[~~(Math.random()*t.length)]:(i=i||1e-5)&&(s=i<1?Math.pow(10,(i+"").length-2):1)&&Math.floor(Math.round((t-i/2+Math.random()*(n-t+i*.99))/i)*i*s)/s})},Hc=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return function(s){return n.reduce(function(r,o){return o(r)},s)}},Zc=function(t,n){return function(i){return t(parseFloat(i))+(n||ht(i))}},Qc=function(t,n,i){return mo(t,n,0,1,i)},po=function(t,n,i){return oe(i,function(s){return t[~~n(s)]})},Jc=function e(t,n,i){var s=n-t;return ct(t)?po(t,e(0,t.length),n):oe(i,function(r){return(s+(r-t)%s)%s+t})},th=function e(t,n,i){var s=n-t,r=s*2;return ct(t)?po(t,e(0,t.length-1),n):oe(i,function(o){return o=(r+(o-t)%r)%r||0,t+(o>s?r-o:o)})},cn=function(t){return t.replace(Oc,function(n){var i=n.indexOf("[")+1,s=n.substring(i||7,i?n.indexOf("]"):n.length-1).split(Nc);return fo(i?s:+s[0],i?0:+s[1],+s[2]||1e-5)})},mo=function(t,n,i,s,r){var o=n-t,a=s-i;return oe(r,function(l){return i+((l-t)/o*a||0)})},eh=function e(t,n,i,s){var r=isNaN(t+n)?0:function(d){return(1-d)*t+d*n};if(!r){var o=st(t),a={},l,u,c,h,f;if(i===!0&&(s=1)&&(i=null),o)t={p:t},n={p:n};else if(ct(t)&&!ct(n)){for(c=[],h=t.length,f=h-2,u=1;u<h;u++)c.push(e(t[u-1],t[u]));h--,r=function(m){m*=h;var p=Math.min(f,~~m);return c[p](m-p)},i=n}else s||(t=Le(ct(t)?[]:{},t));if(!c){for(l in n)Xi.call(a,t,l,"get",n[l]);r=function(m){return ts(m,a)||(o?t.p:t)}}}return oe(i,r)},go=function(t,n,i){var s=t.labels,r=Vt,o,a,l;for(o in s)a=s[o]-n,a<0==!!i&&a&&r>(a=Math.abs(a))&&(l=o,r=a);return l},Dt=function(t,n,i){var s=t.vars,r=s[n],o=G,a=t._ctx,l,u,c;if(r)return l=s[n+"Params"],u=s.callbackScope||t,i&&se.length&&qn(),a&&(G=a),c=l?r.apply(u,l):r.call(u),G=o,c},hn=function(t){return re(t),t.scrollTrigger&&t.scrollTrigger.kill(!!ot),t.progress()<1&&Dt(t,"onInterrupt"),t},ze,yo=[],_o=function(t){if(t)if(t=!t.name&&t.default||t,Ei()||t.headless){var n=t.name,i=Q(t),s=n&&!i&&t.init?function(){this._props=[]}:t,r={init:on,render:ts,add:Xi,kill:yh,modifier:gh,rawVars:0},o={targetTest:0,get:0,getSetter:Ji,aliases:{},register:0};if(Be(),t!==s){if(Mt[n])return;Ct(s,Ct(Kn(t,r),o)),Le(s.prototype,Le(r,Kn(t,o))),Mt[s.prop=n]=s,t.targetTest&&(Gn.push(s),Ii[n]=1),n=(n==="css"?"CSS":n.charAt(0).toUpperCase()+n.substr(1))+"Plugin"}Yr(n,s),t.register&&t.register(Tt,s,wt)}else yo.push(t)},B=255,fn={aqua:[0,B,B],lime:[0,B,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,B],navy:[0,0,128],white:[B,B,B],olive:[128,128,0],yellow:[B,B,0],orange:[B,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[B,0,0],pink:[B,192,203],cyan:[0,B,B],transparent:[B,B,B,0]},qi=function(t,n,i){return t+=t<0?1:t>1?-1:0,(t*6<1?n+(i-n)*t*6:t<.5?i:t*3<2?n+(i-n)*(2/3-t)*6:n)*B+.5|0},vo=function(t,n,i){var s=t?Zt(t)?[t>>16,t>>8&B,t&B]:0:fn.black,r,o,a,l,u,c,h,f,d,m;if(!s){if(t.substr(-1)===","&&(t=t.substr(0,t.length-1)),fn[t])s=fn[t];else if(t.charAt(0)==="#"){if(t.length<6&&(r=t.charAt(1),o=t.charAt(2),a=t.charAt(3),t="#"+r+r+o+o+a+a+(t.length===5?t.charAt(4)+t.charAt(4):"")),t.length===9)return s=parseInt(t.substr(1,6),16),[s>>16,s>>8&B,s&B,parseInt(t.substr(7),16)/255];t=parseInt(t.substr(1),16),s=[t>>16,t>>8&B,t&B]}else if(t.substr(0,3)==="hsl"){if(s=m=t.match(Ur),!n)l=+s[0]%360/360,u=+s[1]/100,c=+s[2]/100,o=c<=.5?c*(u+1):c+u-c*u,r=c*2-o,s.length>3&&(s[3]*=1),s[0]=qi(l+1/3,r,o),s[1]=qi(l,r,o),s[2]=qi(l-1/3,r,o);else if(~t.indexOf("="))return s=t.match(Wr),i&&s.length<4&&(s[3]=1),s}else s=t.match(Ur)||fn.transparent;s=s.map(Number)}return n&&!m&&(r=s[0]/B,o=s[1]/B,a=s[2]/B,h=Math.max(r,o,a),f=Math.min(r,o,a),c=(h+f)/2,h===f?l=u=0:(d=h-f,u=c>.5?d/(2-h-f):d/(h+f),l=h===r?(o-a)/d+(o<a?6:0):h===o?(a-r)/d+2:(r-o)/d+4,l*=60),s[0]=~~(l+.5),s[1]=~~(u*100+.5),s[2]=~~(c*100+.5)),i&&s.length<4&&(s[3]=1),s},xo=function(t){var n=[],i=[],s=-1;return t.split(ae).forEach(function(r){var o=r.match(Ne)||[];n.push.apply(n,o),i.push(s+=o.length+1)}),n.c=i,n},wo=function(t,n,i){var s="",r=(t+s).match(ae),o=n?"hsla(":"rgba(",a=0,l,u,c,h;if(!r)return t;if(r=r.map(function(f){return(f=vo(f,n,1))&&o+(n?f[0]+","+f[1]+"%,"+f[2]+"%,"+f[3]:f.join(","))+")"}),i&&(c=xo(t),l=i.c,l.join(s)!==c.c.join(s)))for(u=t.replace(ae,"1").split(Ne),h=u.length-1;a<h;a++)s+=u[a]+(~l.indexOf(a)?r.shift()||o+"0,0,0,0)":(c.length?c:r.length?r:i).shift());if(!u)for(u=t.split(ae),h=u.length-1;a<h;a++)s+=u[a]+r[a];return s+u[h]},ae=(function(){var e="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",t;for(t in fn)e+="|"+t+"\\b";return new RegExp(e+")","gi")})(),nh=/hsl[a]?\(/,To=function(t){var n=t.join(" "),i;if(ae.lastIndex=0,ae.test(n))return i=nh.test(n),t[1]=wo(t[1],i),t[0]=wo(t[0],i,xo(t[1])),!0},dn,Et=(function(){var e=Date.now,t=500,n=33,i=e(),s=i,r=1e3/240,o=r,a=[],l,u,c,h,f,d,m=function p(y){var g=e()-s,x=y===!0,v,w,_,T;if((g>t||g<0)&&(i+=g-n),s+=g,_=s-i,v=_-o,(v>0||x)&&(T=++h.frame,f=_-h.time*1e3,h.time=_=_/1e3,o+=v+(v>=r?4:r-v),w=1),x||(l=u(p)),w)for(d=0;d<a.length;d++)a[d](_,f,T,y)};return h={time:0,frame:0,tick:function(){m(!0)},deltaRatio:function(y){return f/(1e3/(y||60))},wake:function(){qr&&(!Vi&&Ei()&&(Ut=Vi=window,Oi=Ut.document||{},At.gsap=Tt,(Ut.gsapVersions||(Ut.gsapVersions=[])).push(Tt.version),Kr(Un||Ut.GreenSockGlobals||!Ut.gsap&&Ut||{}),yo.forEach(_o)),c=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&h.sleep(),u=c||function(y){return setTimeout(y,o-h.time*1e3+1|0)},dn=1,m(2))},sleep:function(){(c?cancelAnimationFrame:clearTimeout)(l),dn=0,u=on},lagSmoothing:function(y,g){t=y||1/0,n=Math.min(g||33,t)},fps:function(y){r=1e3/(y||240),o=h.time*1e3+r},add:function(y,g,x){var v=g?function(w,_,T,S){y(w,_,T,S),h.remove(v)}:y;return h.remove(y),a[x?"unshift":"push"](v),Be(),v},remove:function(y,g){~(g=a.indexOf(y))&&a.splice(g,1)&&d>=g&&d--},_listeners:a},h})(),Be=function(){return!dn&&Et.wake()},R={},ih=/^[\d.\-M][\d.\-,\s]/,sh=/["']/g,rh=function(t){for(var n={},i=t.substr(1,t.length-3).split(":"),s=i[0],r=1,o=i.length,a,l,u;r<o;r++)l=i[r],a=r!==o-1?l.lastIndexOf(","):l.length,u=l.substr(0,a),n[s]=isNaN(u)?u.replace(sh,"").trim():+u,s=l.substr(a+1).trim();return n},oh=function(t){var n=t.indexOf("(")+1,i=t.indexOf(")"),s=t.indexOf("(",n);return t.substring(n,~s&&s<i?t.indexOf(")",i+1):i)},ah=function(t){var n=(t+"").split("("),i=R[n[0]];return i&&n.length>1&&i.config?i.config.apply(null,~t.indexOf("{")?[rh(n[1])]:oh(t).split(",").map(Jr)):R._CE&&ih.test(t)?R._CE("",t):i},bo=function(t){return function(n){return 1-t(1-n)}},So=function e(t,n){for(var i=t._first,s;i;)i instanceof pt?e(i,n):i.vars.yoyoEase&&(!i._yoyo||!i._repeat)&&i._yoyo!==n&&(i.timeline?e(i.timeline,n):(s=i._ease,i._ease=i._yEase,i._yEase=s,i._yoyo=n)),i=i._next},xe=function(t,n){return t&&(Q(t)?t:R[t]||ah(t))||n},we=function(t,n,i,s){i===void 0&&(i=function(l){return 1-n(1-l)}),s===void 0&&(s=function(l){return l<.5?n(l*2)/2:1-n((1-l)*2)/2});var r={easeIn:n,easeOut:i,easeInOut:s},o;return xt(t,function(a){R[a]=At[a]=r,R[o=a.toLowerCase()]=i;for(var l in r)R[o+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=R[a+"."+l]=r[l]}),r},Po=function(t){return function(n){return n<.5?(1-t(1-n*2))/2:.5+t((n-.5)*2)/2}},Ki=function e(t,n,i){var s=n>=1?n:1,r=(i||(t?.3:.45))/(n<1?n:1),o=r/Ci*(Math.asin(1/s)||0),a=function(c){return c===1?1:s*Math.pow(2,-10*c)*Vc((c-o)*r)+1},l=t==="out"?a:t==="in"?function(u){return 1-a(1-u)}:Po(a);return r=Ci/r,l.config=function(u,c){return e(t,u,c)},l},Yi=function e(t,n){n===void 0&&(n=1.70158);var i=function(o){return o?--o*o*((n+1)*o+n)+1:0},s=t==="out"?i:t==="in"?function(r){return 1-i(1-r)}:Po(i);return s.config=function(r){return e(t,r)},s};xt("Linear,Quad,Cubic,Quart,Quint,Strong",function(e,t){var n=t<5?t+1:t;we(e+",Power"+(n-1),t?function(i){return Math.pow(i,n)}:function(i){return i},function(i){return 1-Math.pow(1-i,n)},function(i){return i<.5?Math.pow(i*2,n)/2:1-Math.pow((1-i)*2,n)/2})}),R.Linear.easeNone=R.none=R.Linear.easeIn,we("Elastic",Ki("in"),Ki("out"),Ki()),(function(e,t){var n=1/t,i=2*n,s=2.5*n,r=function(a){return a<n?e*a*a:a<i?e*Math.pow(a-1.5/t,2)+.75:a<s?e*(a-=2.25/t)*a+.9375:e*Math.pow(a-2.625/t,2)+.984375};we("Bounce",function(o){return 1-r(1-o)},r)})(7.5625,2.75),we("Expo",function(e){return Math.pow(2,10*(e-1))*e+e*e*e*e*e*e*(1-e)}),we("Circ",function(e){return-(jr(1-e*e)-1)}),we("Sine",function(e){return e===1?1:-kc(e*Dc)+1}),we("Back",Yi("in"),Yi("out"),Yi()),R.SteppedEase=R.steps=At.SteppedEase={config:function(t,n){t===void 0&&(t=1);var i=1/t,s=t+(n?0:1),r=n?1:0,o=1-z;return function(a){return((s*un(0,o,a)|0)+r)*i}}},Oe.ease=R["quad.out"],xt("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(e){return Ri+=e+","+e+"Params,"});var Ao=function(t,n){this.id=Ec++,t._gsap=this,this.target=t,this.harness=n,this.get=n?n.get:Zr,this.set=n?n.getSetter:Ji},pn=(function(){function e(n){this.vars=n,this._delay=+n.delay||0,(this._repeat=n.repeat===1/0?-2:n.repeat||0)&&(this._rDelay=n.repeatDelay||0,this._yoyo=!!n.yoyo||!!n.yoyoEase),this._ts=1,Re(this,+n.duration,1,1),this.data=n.data,G&&(this._ctx=G,G.data.push(this)),dn||Et.wake()}var t=e.prototype;return t.delay=function(i){return i||i===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+i-this._delay),this._delay=i,this):this._delay},t.duration=function(i){return arguments.length?this.totalDuration(this._repeat>0?i+(i+this._rDelay)*this._repeat:i):this.totalDuration()&&this._dur},t.totalDuration=function(i){return arguments.length?(this._dirty=0,Re(this,this._repeat<0?i:(i-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},t.totalTime=function(i,s){if(Be(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){for(Zn(this,i),!r._dp||r.parent||so(r,this);r&&r.parent;)r.parent._time!==r._start+(r._ts>=0?r._tTime/r._ts:(r.totalDuration()-r._tTime)/-r._ts)&&r.totalTime(r._tTime,!0),r=r.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&i<this._tDur||this._ts<0&&i>0||!this._tDur&&!i)&&Wt(this._dp,this,this._start-this._delay)}return(this._tTime!==i||!this._dur&&!s||this._initted&&Math.abs(this._zTime)===z||!this._initted&&this._dur&&i||!i&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=i),Qr(this,i,s)),this},t.time=function(i,s){return arguments.length?this.totalTime(Math.min(this.totalDuration(),i+io(this))%(this._dur+this._rDelay)||(i?this._dur:0),s):this._time},t.totalProgress=function(i,s){return arguments.length?this.totalTime(this.totalDuration()*i,s):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},t.progress=function(i,s){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-i:i)+io(this),s):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},t.iteration=function(i,s){var r=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(i-1)*r,s):this._repeat?Fe(this._tTime,r)+1:1},t.timeScale=function(i,s){if(!arguments.length)return this._rts===-z?0:this._rts;if(this._rts===i)return this;var r=this.parent&&this._ts?Xn(this.parent._time,this):this._tTime;return this._rts=+i||0,this._ts=this._ps||i===-z?0:this._rts,this.totalTime(un(-Math.abs(this._delay),this.totalDuration(),r),s!==!1),Hn(this),$c(this)},t.paused=function(i){return arguments.length?(this._ps!==i&&(this._ps=i,i?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Be(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==z&&(this._tTime-=z)))),this):this._ps},t.startTime=function(i){if(arguments.length){this._start=Y(i);var s=this.parent||this._dp;return s&&(s._sort||!this.parent)&&Wt(s,this,this._start-this._delay),this}return this._start},t.endTime=function(i){return this._start+(vt(i)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},t.rawTime=function(i){var s=this.parent||this._dp;return s?i&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Xn(s.rawTime(i),this):this._tTime:this._tTime},t.revert=function(i){i===void 0&&(i=Rc);var s=ot;return ot=i,Bi(this)&&(this.timeline&&this.timeline.revert(i),this.totalTime(-.01,i.suppressEvents)),this.data!=="nested"&&i.kill!==!1&&this.kill(),ot=s,this},t.globalTime=function(i){for(var s=this,r=arguments.length?i:s.rawTime();s;)r=s._start+r/(Math.abs(s._ts)||1),s=s._dp;return!this.parent&&this._sat?this._sat.globalTime(i):r},t.repeat=function(i){return arguments.length?(this._repeat=i===1/0?-2:i,ao(this)):this._repeat===-2?1/0:this._repeat},t.repeatDelay=function(i){if(arguments.length){var s=this._time;return this._rDelay=i,ao(this),s?this.time(s):this}return this._rDelay},t.yoyo=function(i){return arguments.length?(this._yoyo=i,this):this._yoyo},t.seek=function(i,s){return this.totalTime(Ot(this,i),vt(s))},t.restart=function(i,s){return this.play().totalTime(i?-this._delay:0,vt(s)),this._dur||(this._zTime=-z),this},t.play=function(i,s){return i!=null&&this.seek(i,s),this.reversed(!1).paused(!1)},t.reverse=function(i,s){return i!=null&&this.seek(i||this.totalDuration(),s),this.reversed(!0).paused(!1)},t.pause=function(i,s){return i!=null&&this.seek(i,s),this.paused(!0)},t.resume=function(){return this.paused(!1)},t.reversed=function(i){return arguments.length?(!!i!==this.reversed()&&this.timeScale(-this._rts||(i?-z:0)),this):this._rts<0},t.invalidate=function(){return this._initted=this._act=0,this._zTime=-z,this},t.isActive=function(){var i=this.parent||this._dp,s=this._start,r;return!!(!i||this._ts&&this._initted&&i.isActive()&&(r=i.rawTime(!0))>=s&&r<this.endTime(!0)-z)},t.eventCallback=function(i,s,r){var o=this.vars;return arguments.length>1?(s?(o[i]=s,r&&(o[i+"Params"]=r),i==="onUpdate"&&(this._onUpdate=s)):delete o[i],this):o[i]},t.then=function(i){var s=this,r=s._prom;return new Promise(function(o){var a=Q(i)?i:to,l=function(){var c=s.then;s.then=null,r&&r(),Q(a)&&(a=a(s))&&(a.then||a===s)&&(s.then=c),o(a),s.then=c};s._initted&&s.totalProgress()===1&&s._ts>=0||!s._tTime&&s._ts<0?l():s._prom=l})},t.kill=function(){hn(this)},e})();Ct(pn.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-z,_prom:0,_ps:!1,_rts:1});var pt=(function(e){Br(t,e);function t(i,s){var r;return i===void 0&&(i={}),r=e.call(this,i)||this,r.labels={},r.smoothChildTiming=!!i.smoothChildTiming,r.autoRemoveChildren=!!i.autoRemoveChildren,r._sort=vt(i.sortChildren),K&&Wt(i.parent||K,Ht(r),s),i.reversed&&r.reverse(),i.paused&&r.paused(!0),i.scrollTrigger&&ro(Ht(r),i.scrollTrigger),r}var n=t.prototype;return n.to=function(s,r,o){return ln(0,arguments,this),this},n.from=function(s,r,o){return ln(1,arguments,this),this},n.fromTo=function(s,r,o,a){return ln(2,arguments,this),this},n.set=function(s,r,o){return r.duration=0,r.parent=this,an(r).repeatDelay||(r.repeat=0),r.immediateRender=!!r.immediateRender,new et(s,r,Ot(this,o),1),this},n.call=function(s,r,o){return Wt(this,et.delayedCall(0,s,r),o)},n.staggerTo=function(s,r,o,a,l,u,c){return o.duration=r,o.stagger=o.stagger||a,o.onComplete=u,o.onCompleteParams=c,o.parent=this,new et(s,o,Ot(this,l)),this},n.staggerFrom=function(s,r,o,a,l,u,c){return o.runBackwards=1,an(o).immediateRender=vt(o.immediateRender),this.staggerTo(s,r,o,a,l,u,c)},n.staggerFromTo=function(s,r,o,a,l,u,c,h){return a.startAt=o,an(a).immediateRender=vt(a.immediateRender),this.staggerTo(s,r,a,l,u,c,h)},n.render=function(s,r,o){var a=this._time,l=this._dirty?this.totalDuration():this._tDur,u=this._dur,c=s<=0?0:Y(s),h=this._zTime<0!=s<0&&(this._initted||!u),f,d,m,p,y,g,x,v,w,_,T,S;if(this!==K&&c>l&&s>=0&&(c=l),c!==this._tTime||o||h){if(a!==this._time&&u&&(c+=this._time-a,s+=this._time-a),f=c,w=this._start,v=this._ts,g=!v,h&&(u||(a=this._zTime),(s||!r)&&(this._zTime=s)),this._repeat){if(T=this._yoyo,y=u+this._rDelay,this._repeat<-1&&s<0)return this.totalTime(y*100+s,r,o);if(f=Y(c%y),c===l?(p=this._repeat,f=u):(_=Y(c/y),p=~~_,p&&p===_&&(f=u,p--),f>u&&(f=u)),_=Fe(this._tTime,y),!a&&this._tTime&&_!==p&&this._tTime-_*y-this._dur<=0&&(_=p),T&&p&1&&(f=u-f,S=1),p!==_&&!this._lock){var b=T&&_&1,P=b===(T&&p&1);if(p<_&&(b=!b),a=b?0:c%u?u:c,this._lock=1,this.render(a||(S?0:Y(p*y)),r,!u)._lock=0,this._tTime=c,!r&&this.parent&&Dt(this,"onRepeat"),this.vars.repeatRefresh&&!S&&(this.invalidate()._lock=1,_=p),a&&a!==this._time||g!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(u=this._dur,l=this._tDur,P&&(this._lock=2,a=b?u:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!S&&this.invalidate()),this._lock=0,!this._ts&&!g)return this;So(this,S)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(x=qc(this,Y(a),Y(f)),x&&(c-=f-(f=x._start))),this._tTime=c,this._time=f,this._act=!v,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=s,a=0),!a&&c&&u&&!r&&!_&&(Dt(this,"onStart"),this._tTime!==c))return this;if(f>=a&&s>=0)for(d=this._first;d;){if(m=d._next,(d._act||f>=d._start)&&d._ts&&x!==d){if(d.parent!==this)return this.render(s,r,o);if(d.render(d._ts>0?(f-d._start)*d._ts:(d._dirty?d.totalDuration():d._tDur)+(f-d._start)*d._ts,r,o),f!==this._time||!this._ts&&!g){x=0,m&&(c+=this._zTime=-z);break}}d=m}else{d=this._last;for(var C=s<0?s:f;d;){if(m=d._prev,(d._act||C<=d._end)&&d._ts&&x!==d){if(d.parent!==this)return this.render(s,r,o);if(d.render(d._ts>0?(C-d._start)*d._ts:(d._dirty?d.totalDuration():d._tDur)+(C-d._start)*d._ts,r,o||ot&&Bi(d)),f!==this._time||!this._ts&&!g){x=0,m&&(c+=this._zTime=C?-z:z);break}}d=m}}if(x&&!r&&(this.pause(),x.render(f>=a?0:-z)._zTime=f>=a?1:-1,this._ts))return this._start=w,Hn(this),this.render(s,r,o);this._onUpdate&&!r&&Dt(this,"onUpdate",!0),(c===l&&this._tTime>=this.totalDuration()||!c&&a)&&(w===this._start||Math.abs(v)!==Math.abs(this._ts))&&(this._lock||((s||!u)&&(c===l&&this._ts>0||!c&&this._ts<0)&&re(this,1),!r&&!(s<0&&!a)&&(c||a||!l)&&(Dt(this,c===l&&s>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(c<l&&this.timeScale()>0)&&this._prom())))}return this},n.add=function(s,r){var o=this;if(Zt(r)||(r=Ot(this,r,s)),!(s instanceof pn)){if(ct(s))return s.forEach(function(a){return o.add(a,r)}),this;if(st(s))return this.addLabel(s,r);if(Q(s))s=et.delayedCall(0,s);else return this}return this!==s?Wt(this,s,r):this},n.getChildren=function(s,r,o,a){s===void 0&&(s=!0),r===void 0&&(r=!0),o===void 0&&(o=!0),a===void 0&&(a=-Vt);for(var l=[],u=this._first;u;)u._start>=a&&(u instanceof et?r&&l.push(u):(o&&l.push(u),s&&l.push.apply(l,u.getChildren(!0,r,o)))),u=u._next;return l},n.getById=function(s){for(var r=this.getChildren(1,1,1),o=r.length;o--;)if(r[o].vars.id===s)return r[o]},n.remove=function(s){return st(s)?this.removeLabel(s):Q(s)?this.killTweensOf(s):(s.parent===this&&Yn(this,s),s===this._recent&&(this._recent=this._last),ve(this))},n.totalTime=function(s,r){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Y(Et.time-(this._ts>0?s/this._ts:(this.totalDuration()-s)/-this._ts))),e.prototype.totalTime.call(this,s,r),this._forcing=0,this):this._tTime},n.addLabel=function(s,r){return this.labels[s]=Ot(this,r),this},n.removeLabel=function(s){return delete this.labels[s],this},n.addPause=function(s,r,o){var a=et.delayedCall(0,r||on,o);return a.data="isPause",this._hasPause=1,Wt(this,a,Ot(this,s))},n.removePause=function(s){var r=this._first;for(s=Ot(this,s);r;)r._start===s&&r.data==="isPause"&&re(r),r=r._next},n.killTweensOf=function(s,r,o){for(var a=this.getTweensOf(s,o),l=a.length;l--;)le!==a[l]&&a[l].kill(s,r);return this},n.getTweensOf=function(s,r){for(var o=[],a=Nt(s),l=this._first,u=Zt(r),c;l;)l instanceof et?zc(l._targets,a)&&(u?(!le||l._initted&&l._ts)&&l.globalTime(0)<=r&&l.globalTime(l.totalDuration())>r:!r||l.isActive())&&o.push(l):(c=l.getTweensOf(a,r)).length&&o.push.apply(o,c),l=l._next;return o},n.tweenTo=function(s,r){r=r||{};var o=this,a=Ot(o,s),l=r,u=l.startAt,c=l.onStart,h=l.onStartParams,f=l.immediateRender,d,m=et.to(o,Ct({ease:r.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:r.duration||Math.abs((a-(u&&"time"in u?u.time:o._time))/o.timeScale())||z,onStart:function(){if(o.pause(),!d){var y=r.duration||Math.abs((a-(u&&"time"in u?u.time:o._time))/o.timeScale());m._dur!==y&&Re(m,y,0,1).render(m._time,!0,!0),d=1}c&&c.apply(m,h||[])}},r));return f?m.render(0):m},n.tweenFromTo=function(s,r,o){return this.tweenTo(r,Ct({startAt:{time:Ot(this,s)}},o))},n.recent=function(){return this._recent},n.nextLabel=function(s){return s===void 0&&(s=this._time),go(this,Ot(this,s))},n.previousLabel=function(s){return s===void 0&&(s=this._time),go(this,Ot(this,s),1)},n.currentLabel=function(s){return arguments.length?this.seek(s,!0):this.previousLabel(this._time+z)},n.shiftChildren=function(s,r,o){o===void 0&&(o=0);var a=this._first,l=this.labels,u;for(s=Y(s);a;)a._start>=o&&(a._start+=s,a._end+=s),a=a._next;if(r)for(u in l)l[u]>=o&&(l[u]+=s);return ve(this)},n.invalidate=function(s){var r=this._first;for(this._lock=0;r;)r.invalidate(s),r=r._next;return e.prototype.invalidate.call(this,s)},n.clear=function(s){s===void 0&&(s=!0);for(var r=this._first,o;r;)o=r._next,this.remove(r),r=o;return this._dp&&(this._time=this._tTime=this._pTime=0),s&&(this.labels={}),ve(this)},n.totalDuration=function(s){var r=0,o=this,a=o._last,l=Vt,u,c,h;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-s:s));if(o._dirty){for(h=o.parent;a;)u=a._prev,a._dirty&&a.totalDuration(),c=a._start,c>l&&o._sort&&a._ts&&!o._lock?(o._lock=1,Wt(o,a,c-a._delay,1)._lock=0):l=c,c<0&&a._ts&&(r-=c,(!h&&!o._dp||h&&h.smoothChildTiming)&&(o._start+=Y(c/o._ts),o._time-=c,o._tTime-=c),o.shiftChildren(-c,!1,-1/0),l=0),a._end>r&&a._ts&&(r=a._end),a=u;Re(o,o===K&&o._time>r?o._time:r,1,1),o._dirty=0}return o._tDur},t.updateRoot=function(s){if(K._ts&&(Qr(K,Xn(s,K)),Xr=Et.frame),Et.frame>=Hr){Hr+=Pt.autoSleep||120;var r=K._first;if((!r||!r._ts)&&Pt.autoSleep&&Et._listeners.length<2){for(;r&&!r._ts;)r=r._next;r||Et.sleep()}}},t})(pn);Ct(pt.prototype,{_lock:0,_hasPause:0,_forcing:0});var lh=function(t,n,i,s,r,o,a){var l=new wt(this._pt,t,n,0,1,Vo,null,r),u=0,c=0,h,f,d,m,p,y,g,x;for(l.b=i,l.e=s,i+="",s+="",(g=~s.indexOf("random("))&&(s=cn(s)),o&&(x=[i,s],o(x,t,n),i=x[0],s=x[1]),f=i.match(ki)||[];h=ki.exec(s);)m=h[0],p=s.substring(u,h.index),d?d=(d+1)%5:p.substr(-5)==="rgba("&&(d=1),m!==f[c++]&&(y=parseFloat(f[c-1])||0,l._pt={_next:l._pt,p:p||c===1?p:",",s:y,c:m.charAt(1)==="="?Ie(y,m)-y:parseFloat(m)-y,m:d&&d<4?Math.round:0},u=ki.lastIndex);return l.c=u<s.length?s.substring(u,s.length):"",l.fp=a,(Gr.test(s)||g)&&(l.e=0),this._pt=l,l},Xi=function(t,n,i,s,r,o,a,l,u,c){Q(s)&&(s=s(r||0,t,o));var h=t[n],f=i!=="get"?i:Q(h)?u?t[n.indexOf("set")||!Q(t["get"+n.substr(3)])?n:"get"+n.substr(3)](u):t[n]():h,d=Q(h)?u?dh:Eo:Qi,m;if(st(s)&&(~s.indexOf("random(")&&(s=cn(s)),s.charAt(1)==="="&&(m=Ie(f,s)+(ht(f)||0),(m||m===0)&&(s=m))),!c||f!==s||Hi)return!isNaN(f*s)&&s!==""?(m=new wt(this._pt,t,n,+f||0,s-(f||0),typeof h=="boolean"?mh:ko,0,d),u&&(m.fp=u),a&&m.modifier(a,this,t),this._pt=m):(!h&&!(n in t)&&Ni(n,s),lh.call(this,t,n,f,s,d,l||Pt.stringFilter,u))},uh=function(t,n,i,s,r){if(Q(t)&&(t=mn(t,r,n,i,s)),!$t(t)||t.style&&t.nodeType||ct(t)||$r(t))return st(t)?mn(t,r,n,i,s):t;var o={},a;for(a in t)o[a]=mn(t[a],r,n,i,s);return o},Mo=function(t,n,i,s,r,o){var a,l,u,c;if(Mt[t]&&(a=new Mt[t]).init(r,a.rawVars?n[t]:uh(n[t],s,r,o,i),i,s,o)!==!1&&(i._pt=l=new wt(i._pt,r,t,0,1,a.render,a,0,a.priority),i!==ze))for(u=i._ptLookup[i._targets.indexOf(r)],c=a._props.length;c--;)u[a._props[c]]=l;return a},le,Hi,Zi=function e(t,n,i){var s=t.vars,r=s.ease,o=s.startAt,a=s.immediateRender,l=s.lazy,u=s.onUpdate,c=s.runBackwards,h=s.yoyoEase,f=s.keyframes,d=s.autoRevert,m=t._dur,p=t._startAt,y=t._targets,g=t.parent,x=g&&g.data==="nested"?g.vars.targets:y,v=t._overwrite==="auto"&&!Mi,w=t.timeline,_,T,S,b,P,C,I,O,M,k,L,N,V;if(w&&(!f||!r)&&(r="none"),t._ease=xe(r,Oe.ease),t._yEase=h?bo(xe(h===!0?r:h,Oe.ease)):0,h&&t._yoyo&&!t._repeat&&(h=t._yEase,t._yEase=t._ease,t._ease=h),t._from=!w&&!!s.runBackwards,!w||f&&!s.stagger){if(O=y[0]?_e(y[0]).harness:0,N=O&&s[O.prop],_=Kn(s,Ii),p&&(p._zTime<0&&p.progress(1),n<0&&c&&a&&!d?p.render(-1,!0):p.revert(c&&m?Wn:Fc),p._lazy=0),o){if(re(t._startAt=et.set(y,Ct({data:"isStart",overwrite:!1,parent:g,immediateRender:!0,lazy:!p&&vt(l),startAt:null,delay:0,onUpdate:u&&function(){return Dt(t,"onUpdate")},stagger:0},o))),t._startAt._dp=0,t._startAt._sat=t,n<0&&(ot||!a&&!d)&&t._startAt.revert(Wn),a&&m&&n<=0&&i<=0){n&&(t._zTime=n);return}}else if(c&&m&&!p){if(n&&(a=!1),S=Ct({overwrite:!1,data:"isFromStart",lazy:a&&!p&&vt(l),immediateRender:a,stagger:0,parent:g},_),N&&(S[O.prop]=N),re(t._startAt=et.set(y,S)),t._startAt._dp=0,t._startAt._sat=t,n<0&&(ot?t._startAt.revert(Wn):t._startAt.render(-1,!0)),t._zTime=n,!a)e(t._startAt,z,z);else if(!n)return}for(t._pt=t._ptCache=0,l=m&&vt(l)||l&&!m,T=0;T<y.length;T++){if(P=y[T],I=P._gsap||zi(y)[T]._gsap,t._ptLookup[T]=k={},Li[I.id]&&se.length&&qn(),L=x===y?T:x.indexOf(P),O&&(M=new O).init(P,N||_,t,L,x)!==!1&&(t._pt=b=new wt(t._pt,P,M.name,0,1,M.render,M,0,M.priority),M._props.forEach(function(F){k[F]=b}),M.priority&&(C=1)),!O||N)for(S in _)Mt[S]&&(M=Mo(S,_,t,L,P,x))?M.priority&&(C=1):k[S]=b=Xi.call(t,P,S,"get",_[S],L,x,0,s.stringFilter);t._op&&t._op[T]&&t.kill(P,t._op[T]),v&&t._pt&&(le=t,K.killTweensOf(P,k,t.globalTime(n)),V=!t.parent,le=0),t._pt&&l&&(Li[I.id]=1)}C&&Oo(t),t._onInit&&t._onInit(t)}t._onUpdate=u,t._initted=(!t._op||t._pt)&&!V,f&&n<=0&&w.render(Vt,!0,!0)},ch=function(t,n,i,s,r,o,a,l){var u=(t._pt&&t._ptCache||(t._ptCache={}))[n],c,h,f,d;if(!u)for(u=t._ptCache[n]=[],f=t._ptLookup,d=t._targets.length;d--;){if(c=f[d][n],c&&c.d&&c.d._pt)for(c=c.d._pt;c&&c.p!==n&&c.fp!==n;)c=c._next;if(!c)return Hi=1,t.vars[n]="+=0",Zi(t,a),Hi=0,l?rn(n+" not eligible for reset"):1;u.push(c)}for(d=u.length;d--;)h=u[d],c=h._pt||h,c.s=(s||s===0)&&!r?s:c.s+(s||0)+o*c.c,c.c=i-c.s,h.e&&(h.e=tt(i)+ht(h.e)),h.b&&(h.b=c.s+ht(h.b))},hh=function(t,n){var i=t[0]?_e(t[0]).harness:0,s=i&&i.aliases,r,o,a,l;if(!s)return n;r=Le({},n);for(o in s)if(o in r)for(l=s[o].split(","),a=l.length;a--;)r[l[a]]=r[o];return r},fh=function(t,n,i,s){var r=n.ease||s||"power1.inOut",o,a;if(ct(n))a=i[t]||(i[t]=[]),n.forEach(function(l,u){return a.push({t:u/(n.length-1)*100,v:l,e:r})});else for(o in n)a=i[o]||(i[o]=[]),o==="ease"||a.push({t:parseFloat(t),v:n[o],e:r})},mn=function(t,n,i,s,r){return Q(t)?t.call(n,i,s,r):st(t)&&~t.indexOf("random(")?cn(t):t},Co=Ri+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",Do={};xt(Co+",id,stagger,delay,duration,paused,scrollTrigger",function(e){return Do[e]=1});var et=(function(e){Br(t,e);function t(i,s,r,o){var a;typeof s=="number"&&(r.duration=s,s=r,r=null),a=e.call(this,o?s:an(s))||this;var l=a.vars,u=l.duration,c=l.delay,h=l.immediateRender,f=l.stagger,d=l.overwrite,m=l.keyframes,p=l.defaults,y=l.scrollTrigger,g=l.yoyoEase,x=s.parent||K,v=(ct(i)||$r(i)?Zt(i[0]):"length"in s)?[i]:Nt(i),w,_,T,S,b,P,C,I;if(a._targets=v.length?zi(v):rn("GSAP target "+i+" not found. https://gsap.com",!Pt.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=d,m||f||$n(u)||$n(c)){if(s=a.vars,w=a.timeline=new pt({data:"nested",defaults:p||{},targets:x&&x.data==="nested"?x.vars.targets:v}),w.kill(),w.parent=w._dp=Ht(a),w._start=0,f||$n(u)||$n(c)){if(S=v.length,C=f&&co(f),$t(f))for(b in f)~Co.indexOf(b)&&(I||(I={}),I[b]=f[b]);for(_=0;_<S;_++)T=Kn(s,Do),T.stagger=0,g&&(T.yoyoEase=g),I&&Le(T,I),P=v[_],T.duration=+mn(u,Ht(a),_,P,v),T.delay=(+mn(c,Ht(a),_,P,v)||0)-a._delay,!f&&S===1&&T.delay&&(a._delay=c=T.delay,a._start+=c,T.delay=0),w.to(P,T,C?C(_,P,v):0),w._ease=R.none;w.duration()?u=c=0:a.timeline=0}else if(m){an(Ct(w.vars.defaults,{ease:"none"})),w._ease=xe(m.ease||s.ease||"none");var O=0,M,k,L;if(ct(m))m.forEach(function(N){return w.to(v,N,">")}),w.duration();else{T={};for(b in m)b==="ease"||b==="easeEach"||fh(b,m[b],T,m.easeEach);for(b in T)for(M=T[b].sort(function(N,V){return N.t-V.t}),O=0,_=0;_<M.length;_++)k=M[_],L={ease:k.e,duration:(k.t-(_?M[_-1].t:0))/100*u},L[b]=k.v,w.to(v,L,O),O+=L.duration;w.duration()<u&&w.to({},{duration:u-w.duration()})}}u||a.duration(u=w.duration())}else a.timeline=0;return d===!0&&!Mi&&(le=Ht(a),K.killTweensOf(v),le=0),Wt(x,Ht(a),r),s.reversed&&a.reverse(),s.paused&&a.paused(!0),(h||!u&&!m&&a._start===Y(x._time)&&vt(h)&&Uc(Ht(a))&&x.data!=="nested")&&(a._tTime=-z,a.render(Math.max(0,-c)||0)),y&&ro(Ht(a),y),a}var n=t.prototype;return n.render=function(s,r,o){var a=this._time,l=this._tDur,u=this._dur,c=s<0,h=s>l-z&&!c?l:s<z?0:s,f,d,m,p,y,g,x,v,w;if(!u)Gc(this,s,r,o);else if(h!==this._tTime||!s||o||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==c||this._lazy){if(f=h,v=this.timeline,this._repeat){if(p=u+this._rDelay,this._repeat<-1&&c)return this.totalTime(p*100+s,r,o);if(f=Y(h%p),h===l?(m=this._repeat,f=u):(y=Y(h/p),m=~~y,m&&m===y?(f=u,m--):f>u&&(f=u)),g=this._yoyo&&m&1,g&&(w=this._yEase,f=u-f),y=Fe(this._tTime,p),f===a&&!o&&this._initted&&m===y)return this._tTime=h,this;m!==y&&(v&&this._yEase&&So(v,g),this.vars.repeatRefresh&&!g&&!this._lock&&f!==p&&this._initted&&(this._lock=o=1,this.render(Y(p*m),!0).invalidate()._lock=0))}if(!this._initted){if(oo(this,c?s:f,o,r,h))return this._tTime=0,this;if(a!==this._time&&!(o&&this.vars.repeatRefresh&&m!==y))return this;if(u!==this._dur)return this.render(s,r,o)}if(this._tTime=h,this._time=f,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=x=(w||this._ease)(f/u),this._from&&(this.ratio=x=1-x),!a&&h&&!r&&!y&&(Dt(this,"onStart"),this._tTime!==h))return this;for(d=this._pt;d;)d.r(x,d.d),d=d._next;v&&v.render(s<0?s:v._dur*v._ease(f/this._dur),r,o)||this._startAt&&(this._zTime=s),this._onUpdate&&!r&&(c&&ji(this,s,r,o),Dt(this,"onUpdate")),this._repeat&&m!==y&&this.vars.onRepeat&&!r&&this.parent&&Dt(this,"onRepeat"),(h===this._tDur||!h)&&this._tTime===h&&(c&&!this._onUpdate&&ji(this,s,!0,!0),(s||!u)&&(h===this._tDur&&this._ts>0||!h&&this._ts<0)&&re(this,1),!r&&!(c&&!a)&&(h||a||g)&&(Dt(this,h===l?"onComplete":"onReverseComplete",!0),this._prom&&!(h<l&&this.timeScale()>0)&&this._prom()))}return this},n.targets=function(){return this._targets},n.invalidate=function(s){return(!s||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(s),e.prototype.invalidate.call(this,s)},n.resetTo=function(s,r,o,a,l){dn||Et.wake(),this._ts||this.play();var u=Math.min(this._dur,(this._dp._time-this._start)*this._ts),c;return this._initted||Zi(this,u),c=this._ease(u/this._dur),ch(this,s,r,o,a,c,u,l)?this.resetTo(s,r,o,a,1):(Zn(this,0),this.parent||no(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},n.kill=function(s,r){if(r===void 0&&(r="all"),!s&&(!r||r==="all"))return this._lazy=this._pt=0,this.parent?hn(this):this.scrollTrigger&&this.scrollTrigger.kill(!!ot),this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(s,r,le&&le.vars.overwrite!==!0)._first||hn(this),this.parent&&o!==this.timeline.totalDuration()&&Re(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,l=s?Nt(s):a,u=this._ptLookup,c=this._pt,h,f,d,m,p,y,g;if((!r||r==="all")&&jc(a,l))return r==="all"&&(this._pt=0),hn(this);for(h=this._op=this._op||[],r!=="all"&&(st(r)&&(p={},xt(r,function(x){return p[x]=1}),r=p),r=hh(a,r)),g=a.length;g--;)if(~l.indexOf(a[g])){f=u[g],r==="all"?(h[g]=r,m=f,d={}):(d=h[g]=h[g]||{},m=r);for(p in m)y=f&&f[p],y&&((!("kill"in y.d)||y.d.kill(p)===!0)&&Yn(this,y,"_pt"),delete f[p]),d!=="all"&&(d[p]=1)}return this._initted&&!this._pt&&c&&hn(this),this},t.to=function(s,r){return new t(s,r,arguments[2])},t.from=function(s,r){return ln(1,arguments)},t.delayedCall=function(s,r,o,a){return new t(r,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:s,onComplete:r,onReverseComplete:r,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:a})},t.fromTo=function(s,r,o){return ln(2,arguments)},t.set=function(s,r){return r.duration=0,r.repeatDelay||(r.repeat=0),new t(s,r)},t.killTweensOf=function(s,r,o){return K.killTweensOf(s,r,o)},t})(pn);Ct(et.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),xt("staggerTo,staggerFrom,staggerFromTo",function(e){et[e]=function(){var t=new pt,n=Ui.call(arguments,0);return n.splice(e==="staggerFromTo"?5:4,0,0),t[e].apply(t,n)}});var Qi=function(t,n,i){return t[n]=i},Eo=function(t,n,i){return t[n](i)},dh=function(t,n,i,s){return t[n](s.fp,i)},ph=function(t,n,i){return t.setAttribute(n,i)},Ji=function(t,n){return Q(t[n])?Eo:Di(t[n])&&t.setAttribute?ph:Qi},ko=function(t,n){return n.set(n.t,n.p,Math.round((n.s+n.c*t)*1e6)/1e6,n)},mh=function(t,n){return n.set(n.t,n.p,!!(n.s+n.c*t),n)},Vo=function(t,n){var i=n._pt,s="";if(!t&&n.b)s=n.b;else if(t===1&&n.e)s=n.e;else{for(;i;)s=i.p+(i.m?i.m(i.s+i.c*t):Math.round((i.s+i.c*t)*1e4)/1e4)+s,i=i._next;s+=n.c}n.set(n.t,n.p,s,n)},ts=function(t,n){for(var i=n._pt;i;)i.r(t,i.d),i=i._next},gh=function(t,n,i,s){for(var r=this._pt,o;r;)o=r._next,r.p===s&&r.modifier(t,n,i),r=o},yh=function(t){for(var n=this._pt,i,s;n;)s=n._next,n.p===t&&!n.op||n.op===t?Yn(this,n,"_pt"):n.dep||(i=1),n=s;return!i},_h=function(t,n,i,s){s.mSet(t,n,s.m.call(s.tween,i,s.mt),s)},Oo=function(t){for(var n=t._pt,i,s,r,o;n;){for(i=n._next,s=r;s&&s.pr>n.pr;)s=s._next;(n._prev=s?s._prev:o)?n._prev._next=n:r=n,(n._next=s)?s._prev=n:o=n,n=i}t._pt=r},wt=(function(){function e(n,i,s,r,o,a,l,u,c){this.t=i,this.s=r,this.c=o,this.p=s,this.r=a||ko,this.d=l||this,this.set=u||Qi,this.pr=c||0,this._next=n,n&&(n._prev=this)}var t=e.prototype;return t.modifier=function(i,s,r){this.mSet=this.mSet||this.set,this.set=_h,this.m=i,this.mt=r,this.tween=s},e})();xt(Ri+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(e){return Ii[e]=1}),At.TweenMax=At.TweenLite=et,At.TimelineLite=At.TimelineMax=pt,K=new pt({sortChildren:!1,defaults:Oe,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),Pt.stringFilter=To;var Te=[],Qn={},vh=[],No=0,xh=0,es=function(t){return(Qn[t]||vh).map(function(n){return n()})},ns=function(){var t=Date.now(),n=[];t-No>2&&(es("matchMediaInit"),Te.forEach(function(i){var s=i.queries,r=i.conditions,o,a,l,u;for(a in s)o=Ut.matchMedia(s[a]).matches,o&&(l=1),o!==r[a]&&(r[a]=o,u=1);u&&(i.revert(),l&&n.push(i))}),es("matchMediaRevert"),n.forEach(function(i){return i.onMatch(i,function(s){return i.add(null,s)})}),No=t,es("matchMedia"))},Io=(function(){function e(n,i){this.selector=i&&Wi(i),this.data=[],this._r=[],this.isReverted=!1,this.id=xh++,n&&this.add(n)}var t=e.prototype;return t.add=function(i,s,r){Q(i)&&(r=s,s=i,i=Q);var o=this,a=function(){var u=G,c=o.selector,h;return u&&u!==o&&u.data.push(o),r&&(o.selector=Wi(r)),G=o,h=s.apply(o,arguments),Q(h)&&o._r.push(h),G=u,o.selector=c,o.isReverted=!1,h};return o.last=a,i===Q?a(o,function(l){return o.add(null,l)}):i?o[i]=a:a},t.ignore=function(i){var s=G;G=null,i(this),G=s},t.getTweens=function(){var i=[];return this.data.forEach(function(s){return s instanceof e?i.push.apply(i,s.getTweens()):s instanceof et&&!(s.parent&&s.parent.data==="nested")&&i.push(s)}),i},t.clear=function(){this._r.length=this.data.length=0},t.kill=function(i,s){var r=this;if(i?(function(){for(var a=r.getTweens(),l=r.data.length,u;l--;)u=r.data[l],u.data==="isFlip"&&(u.revert(),u.getChildren(!0,!0,!1).forEach(function(c){return a.splice(a.indexOf(c),1)}));for(a.map(function(c){return{g:c._dur||c._delay||c._sat&&!c._sat.vars.immediateRender?c.globalTime(0):-1/0,t:c}}).sort(function(c,h){return h.g-c.g||-1/0}).forEach(function(c){return c.t.revert(i)}),l=r.data.length;l--;)u=r.data[l],u instanceof pt?u.data!=="nested"&&(u.scrollTrigger&&u.scrollTrigger.revert(),u.kill()):!(u instanceof et)&&u.revert&&u.revert(i);r._r.forEach(function(c){return c(i,r)}),r.isReverted=!0})():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),s)for(var o=Te.length;o--;)Te[o].id===this.id&&Te.splice(o,1)},t.revert=function(i){this.kill(i||{})},e})(),wh=(function(){function e(n){this.contexts=[],this.scope=n,G&&G.data.push(this)}var t=e.prototype;return t.add=function(i,s,r){$t(i)||(i={matches:i});var o=new Io(0,r||this.scope),a=o.conditions={},l,u,c;G&&!o.selector&&(o.selector=G.selector),this.contexts.push(o),s=o.add("onMatch",s),o.queries=i;for(u in i)u==="all"?c=1:(l=Ut.matchMedia(i[u]),l&&(Te.indexOf(o)<0&&Te.push(o),(a[u]=l.matches)&&(c=1),l.addListener?l.addListener(ns):l.addEventListener("change",ns)));return c&&s(o,function(h){return o.add(null,h)}),this},t.revert=function(i){this.kill(i||{})},t.kill=function(i){this.contexts.forEach(function(s){return s.kill(i,!0)})},e})(),Jn={registerPlugin:function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];n.forEach(function(s){return _o(s)})},timeline:function(t){return new pt(t)},getTweensOf:function(t,n){return K.getTweensOf(t,n)},getProperty:function(t,n,i,s){st(t)&&(t=Nt(t)[0]);var r=_e(t||{}).get,o=i?to:Jr;return i==="native"&&(i=""),t&&(n?o((Mt[n]&&Mt[n].get||r)(t,n,i,s)):function(a,l,u){return o((Mt[a]&&Mt[a].get||r)(t,a,l,u))})},quickSetter:function(t,n,i){if(t=Nt(t),t.length>1){var s=t.map(function(c){return Tt.quickSetter(c,n,i)}),r=s.length;return function(c){for(var h=r;h--;)s[h](c)}}t=t[0]||{};var o=Mt[n],a=_e(t),l=a.harness&&(a.harness.aliases||{})[n]||n,u=o?function(c){var h=new o;ze._pt=0,h.init(t,i?c+i:c,ze,0,[t]),h.render(1,h),ze._pt&&ts(1,ze)}:a.set(t,l);return o?u:function(c){return u(t,l,i?c+i:c,a,1)}},quickTo:function(t,n,i){var s,r=Tt.to(t,Ct((s={},s[n]="+=0.1",s.paused=!0,s.stagger=0,s),i||{})),o=function(l,u,c){return r.resetTo(n,l,u,c)};return o.tween=r,o},isTweening:function(t){return K.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=xe(t.ease,Oe.ease)),eo(Oe,t||{})},config:function(t){return eo(Pt,t||{})},registerEffect:function(t){var n=t.name,i=t.effect,s=t.plugins,r=t.defaults,o=t.extendTimeline;(s||"").split(",").forEach(function(a){return a&&!Mt[a]&&!At[a]&&rn(n+" effect requires "+a+" plugin.")}),Fi[n]=function(a,l,u){return i(Nt(a),Ct(l||{},r),u)},o&&(pt.prototype[n]=function(a,l,u){return this.add(Fi[n](a,$t(l)?l:(u=l)&&{},this),u)})},registerEase:function(t,n){R[t]=xe(n)},parseEase:function(t,n){return arguments.length?xe(t,n):R},getById:function(t){return K.getById(t)},exportRoot:function(t,n){t===void 0&&(t={});var i=new pt(t),s,r;for(i.smoothChildTiming=vt(t.smoothChildTiming),K.remove(i),i._dp=0,i._time=i._tTime=K._time,s=K._first;s;)r=s._next,(n||!(!s._dur&&s instanceof et&&s.vars.onComplete===s._targets[0]))&&Wt(i,s,s._start-s._delay),s=r;return Wt(K,i,0),i},context:function(t,n){return t?new Io(t,n):G},matchMedia:function(t){return new wh(t)},matchMediaRefresh:function(){return Te.forEach(function(t){var n=t.conditions,i,s;for(s in n)n[s]&&(n[s]=!1,i=1);i&&t.revert()})||ns()},addEventListener:function(t,n){var i=Qn[t]||(Qn[t]=[]);~i.indexOf(n)||i.push(n)},removeEventListener:function(t,n){var i=Qn[t],s=i&&i.indexOf(n);s>=0&&i.splice(s,1)},utils:{wrap:Jc,wrapYoyo:th,distribute:co,random:fo,snap:ho,normalize:Qc,getUnit:ht,clamp:Yc,splitColor:vo,toArray:Nt,selector:Wi,mapRange:mo,pipe:Hc,unitize:Zc,interpolate:eh,shuffle:uo},install:Kr,effects:Fi,ticker:Et,updateRoot:pt.updateRoot,plugins:Mt,globalTimeline:K,core:{PropTween:wt,globals:Yr,Tween:et,Timeline:pt,Animation:pn,getCache:_e,_removeLinkedListItem:Yn,reverting:function(){return ot},context:function(t){return t&&G&&(G.data.push(t),t._ctx=G),G},suppressOverwrites:function(t){return Mi=t}}};xt("to,from,fromTo,delayedCall,set,killTweensOf",function(e){return Jn[e]=et[e]}),Et.add(pt.updateRoot),ze=Jn.to({},{duration:0});var Th=function(t,n){for(var i=t._pt;i&&i.p!==n&&i.op!==n&&i.fp!==n;)i=i._next;return i},bh=function(t,n){var i=t._targets,s,r,o;for(s in n)for(r=i.length;r--;)o=t._ptLookup[r][s],o&&(o=o.d)&&(o._pt&&(o=Th(o,s)),o&&o.modifier&&o.modifier(n[s],t,i[r],s))},is=function(t,n){return{name:t,headless:1,rawVars:1,init:function(s,r,o){o._onInit=function(a){var l,u;if(st(r)&&(l={},xt(r,function(c){return l[c]=1}),r=l),n){l={};for(u in r)l[u]=n(r[u]);r=l}bh(a,r)}}}},Tt=Jn.registerPlugin({name:"attr",init:function(t,n,i,s,r){var o,a,l;this.tween=i;for(o in n)l=t.getAttribute(o)||"",a=this.add(t,"setAttribute",(l||0)+"",n[o],s,r,0,0,o),a.op=o,a.b=l,this._props.push(o)},render:function(t,n){for(var i=n._pt;i;)ot?i.set(i.t,i.p,i.b,i):i.r(t,i.d),i=i._next}},{name:"endArray",headless:1,init:function(t,n){for(var i=n.length;i--;)this.add(t,i,t[i]||0,n[i],0,0,0,0,0,1)}},is("roundProps",Gi),is("modifiers"),is("snap",ho))||Jn;et.version=pt.version=Tt.version="3.14.2",qr=1,Ei()&&Be(),R.Power0,R.Power1,R.Power2,R.Power3,R.Power4,R.Linear,R.Quad,R.Cubic,R.Quart,R.Quint,R.Strong,R.Elastic,R.Back,R.SteppedEase,R.Bounce,R.Sine,R.Expo,R.Circ;/*!
|
|
9
9
|
* CSSPlugin 3.14.2
|
|
10
10
|
* https://gsap.com
|
|
11
11
|
*
|
|
12
12
|
* Copyright 2008-2025, GreenSock. All rights reserved.
|
|
13
13
|
* Subject to the terms at https://gsap.com/standard-license
|
|
14
14
|
* @author: Jack Doyle, jack@greensock.com
|
|
15
|
-
*/var Io,ue,$e,ss,Se,Lo,rs,Th=function(){return typeof window<"u"},Qt={},Pe=180/Math.PI,Ue=Math.PI/180,We=Math.atan2,Fo=1e8,os=/([A-Z])/g,bh=/(left|right|width|margin|padding|x)/i,Sh=/[\s,\(]\S/,Gt={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},as=function(t,n){return n.set(n.t,n.p,Math.round((n.s+n.c*t)*1e4)/1e4+n.u,n)},Ph=function(t,n){return n.set(n.t,n.p,t===1?n.e:Math.round((n.s+n.c*t)*1e4)/1e4+n.u,n)},Ah=function(t,n){return n.set(n.t,n.p,t?Math.round((n.s+n.c*t)*1e4)/1e4+n.u:n.b,n)},Mh=function(t,n){return n.set(n.t,n.p,t===1?n.e:t?Math.round((n.s+n.c*t)*1e4)/1e4+n.u:n.b,n)},Ch=function(t,n){var i=n.s+n.c*t;n.set(n.t,n.p,~~(i+(i<0?-.5:.5))+n.u,n)},Ro=function(t,n){return n.set(n.t,n.p,t?n.e:n.b,n)},zo=function(t,n){return n.set(n.t,n.p,t!==1?n.b:n.e,n)},Dh=function(t,n,i){return t.style[n]=i},Eh=function(t,n,i){return t.style.setProperty(n,i)},kh=function(t,n,i){return t._gsap[n]=i},Vh=function(t,n,i){return t._gsap.scaleX=t._gsap.scaleY=i},Oh=function(t,n,i,s,r){var o=t._gsap;o.scaleX=o.scaleY=i,o.renderTransform(r,o)},Nh=function(t,n,i,s,r){var o=t._gsap;o[n]=i,o.renderTransform(r,o)},X="transform",St=X+"Origin",Ih=function e(t,n){var i=this,s=this.target,r=s.style,o=s._gsap;if(t in Qt&&r){if(this.tfm=this.tfm||{},t!=="transform")t=Gt[t]||t,~t.indexOf(",")?t.split(",").forEach(function(a){return i.tfm[a]=Jt(s,a)}):this.tfm[t]=o.x?o[t]:Jt(s,t),t===St&&(this.tfm.zOrigin=o.zOrigin);else return Gt.transform.split(",").forEach(function(a){return e.call(i,a,n)});if(this.props.indexOf(X)>=0)return;o.svg&&(this.svgo=s.getAttribute("data-svg-origin"),this.props.push(St,n,"")),t=X}(r||n)&&this.props.push(t,n,r[t])},Bo=function(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))},Lh=function(){var t=this.props,n=this.target,i=n.style,s=n._gsap,r,o;for(r=0;r<t.length;r+=3)t[r+1]?t[r+1]===2?n[t[r]](t[r+2]):n[t[r]]=t[r+2]:t[r+2]?i[t[r]]=t[r+2]:i.removeProperty(t[r].substr(0,2)==="--"?t[r]:t[r].replace(os,"-$1").toLowerCase());if(this.tfm){for(o in this.tfm)s[o]=this.tfm[o];s.svg&&(s.renderTransform(),n.setAttribute("data-svg-origin",this.svgo||"")),r=rs(),(!r||!r.isStart)&&!i[X]&&(Bo(i),s.zOrigin&&i[St]&&(i[St]+=" "+s.zOrigin+"px",s.zOrigin=0,s.renderTransform()),s.uncache=1)}},jo=function(t,n){var i={target:t,props:[],revert:Lh,save:Ih};return t._gsap||bt.core.getCache(t),n&&t.style&&t.nodeType&&n.split(",").forEach(function(s){return i.save(s)}),i},$o,ls=function(t,n){var i=ue.createElementNS?ue.createElementNS((n||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):ue.createElement(t);return i&&i.style?i:ue.createElement(t)},Vt=function e(t,n,i){var s=getComputedStyle(t);return s[n]||s.getPropertyValue(n.replace(os,"-$1").toLowerCase())||s.getPropertyValue(n)||!i&&e(t,Ge(n)||n,1)||""},Uo="O,Moz,ms,Ms,Webkit".split(","),Ge=function(t,n,i){var s=n||Se,r=s.style,o=5;if(t in r&&!i)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);o--&&!(Uo[o]+t in r););return o<0?null:(o===3?"ms":o>=0?Uo[o]:"")+t},us=function(){Th()&&window.document&&(Io=window,ue=Io.document,$e=ue.documentElement,Se=ls("div")||{style:{}},ls("div"),X=Ge(X),St=X+"Origin",Se.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",$o=!!Ge("perspective"),rs=bt.core.reverting,ss=1)},Wo=function(t){var n=t.ownerSVGElement,i=ls("svg",n&&n.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),s=t.cloneNode(!0),r;s.style.display="block",i.appendChild(s),$e.appendChild(i);try{r=s.getBBox()}catch{}return i.removeChild(s),$e.removeChild(i),r},Go=function(t,n){for(var i=n.length;i--;)if(t.hasAttribute(n[i]))return t.getAttribute(n[i])},qo=function(t){var n,i;try{n=t.getBBox()}catch{n=Wo(t),i=1}return n&&(n.width||n.height)||i||(n=Wo(t)),n&&!n.width&&!n.x&&!n.y?{x:+Go(t,["x","cx","x1"])||0,y:+Go(t,["y","cy","y1"])||0,width:0,height:0}:n},Ko=function(t){return!!(t.getCTM&&(!t.parentNode||t.ownerSVGElement)&&qo(t))},ce=function(t,n){if(n){var i=t.style,s;n in Qt&&n!==St&&(n=X),i.removeProperty?(s=n.substr(0,2),(s==="ms"||n.substr(0,6)==="webkit")&&(n="-"+n),i.removeProperty(s==="--"?n:n.replace(os,"-$1").toLowerCase())):i.removeAttribute(n)}},he=function(t,n,i,s,r,o){var a=new Tt(t._pt,n,i,0,1,o?zo:Ro);return t._pt=a,a.b=s,a.e=r,t._props.push(i),a},Yo={deg:1,rad:1,turn:1},Fh={grid:1,flex:1},fe=function e(t,n,i,s){var r=parseFloat(i)||0,o=(i+"").trim().substr((r+"").length)||"px",a=Se.style,l=bh.test(n),u=t.tagName.toLowerCase()==="svg",c=(u?"client":"offset")+(l?"Width":"Height"),h=100,f=s==="px",d=s==="%",m,p,y,g;if(s===o||!r||Yo[s]||Yo[o])return r;if(o!=="px"&&!f&&(r=e(t,n,i,"px")),g=t.getCTM&&Ko(t),(d||o==="%")&&(Qt[n]||~n.indexOf("adius")))return m=g?t.getBBox()[l?"width":"height"]:t[c],tt(d?r/m*h:r/100*m);if(a[l?"width":"height"]=h+(f?o:s),p=s!=="rem"&&~n.indexOf("adius")||s==="em"&&t.appendChild&&!u?t:t.parentNode,g&&(p=(t.ownerSVGElement||{}).parentNode),(!p||p===ue||!p.appendChild)&&(p=ue.body),y=p._gsap,y&&d&&y.width&&l&&y.time===kt.time&&!y.uncache)return tt(r/y.width*h);if(d&&(n==="height"||n==="width")){var x=t.style[n];t.style[n]=h+s,m=t[c],x?t.style[n]=x:ce(t,n)}else(d||o==="%")&&!Fh[Vt(p,"display")]&&(a.position=Vt(t,"position")),p===t&&(a.position="static"),p.appendChild(Se),m=Se[c],p.removeChild(Se),a.position="absolute";return l&&d&&(y=ve(p),y.time=kt.time,y.width=p[c]),tt(f?m*r/h:m&&r?h/m*r:0)},Jt=function(t,n,i,s){var r;return ss||us(),n in Gt&&n!=="transform"&&(n=Gt[n],~n.indexOf(",")&&(n=n.split(",")[0])),Qt[n]&&n!=="transform"?(r=yn(t,s),r=n!=="transformOrigin"?r[n]:r.svg?r.origin:ei(Vt(t,St))+" "+r.zOrigin+"px"):(r=t.style[n],(!r||r==="auto"||s||~(r+"").indexOf("calc("))&&(r=ti[n]&&ti[n](t,n,i)||Vt(t,n)||Hr(t,n)||(n==="opacity"?1:0))),i&&!~(r+"").trim().indexOf(" ")?fe(t,n,r,i)+i:r},Rh=function(t,n,i,s){if(!i||i==="none"){var r=Ge(n,t,1),o=r&&Vt(t,r,1);o&&o!==i?(n=r,i=o):n==="borderColor"&&(i=Vt(t,"borderTopColor"))}var a=new Tt(this._pt,t.style,n,0,1,ko),l=0,u=0,c,h,f,d,m,p,y,g,x,v,w,_;if(a.b=i,a.e=s,i+="",s+="",s.substring(0,6)==="var(--"&&(s=Vt(t,s.substring(4,s.indexOf(")")))),s==="auto"&&(p=t.style[n],t.style[n]=s,s=Vt(t,n)||s,p?t.style[n]=p:ce(t,n)),c=[i,s],wo(c),i=c[0],s=c[1],f=i.match(Ie)||[],_=s.match(Ie)||[],_.length){for(;h=Ie.exec(s);)y=h[0],x=s.substring(l,h.index),m?m=(m+1)%5:(x.substr(-5)==="rgba("||x.substr(-5)==="hsla(")&&(m=1),y!==(p=f[u++]||"")&&(d=parseFloat(p)||0,w=p.substr((d+"").length),y.charAt(1)==="="&&(y=Le(d,y)+w),g=parseFloat(y),v=y.substr((g+"").length),l=Ie.lastIndex-v.length,v||(v=v||At.units[n]||w,l===s.length&&(s+=v,a.e+=v)),w!==v&&(d=fe(t,n,p,v)||0),a._pt={_next:a._pt,p:x||u===1?x:",",s:d,c:g-d,m:m&&m<4||n==="zIndex"?Math.round:0});a.c=l<s.length?s.substring(l,s.length):""}else a.r=n==="display"&&s==="none"?zo:Ro;return Wr.test(s)&&(a.e=0),this._pt=a,a},Xo={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},zh=function(t){var n=t.split(" "),i=n[0],s=n[1]||"50%";return(i==="top"||i==="bottom"||s==="left"||s==="right")&&(t=i,i=s,s=t),n[0]=Xo[i]||i,n[1]=Xo[s]||s,n.join(" ")},Bh=function(t,n){if(n.tween&&n.tween._time===n.tween._dur){var i=n.t,s=i.style,r=n.u,o=i._gsap,a,l,u;if(r==="all"||r===!0)s.cssText="",l=1;else for(r=r.split(","),u=r.length;--u>-1;)a=r[u],Qt[a]&&(l=1,a=a==="transformOrigin"?St:X),ce(i,a);l&&(ce(i,X),o&&(o.svg&&i.removeAttribute("transform"),s.scale=s.rotate=s.translate="none",yn(i,1),o.uncache=1,Bo(s)))}},ti={clearProps:function(t,n,i,s,r){if(r.data!=="isFromStart"){var o=t._pt=new Tt(t._pt,n,i,0,0,Bh);return o.u=s,o.pr=-10,o.tween=r,t._props.push(i),1}}},gn=[1,0,0,1,0,0],Ho={},Zo=function(t){return t==="matrix(1, 0, 0, 1, 0, 0)"||t==="none"||!t},Qo=function(t){var n=Vt(t,X);return Zo(n)?gn:n.substr(7).match(Ur).map(tt)},cs=function(t,n){var i=t._gsap||ve(t),s=t.style,r=Qo(t),o,a,l,u;return i.svg&&t.getAttribute("transform")?(l=t.transform.baseVal.consolidate().matrix,r=[l.a,l.b,l.c,l.d,l.e,l.f],r.join(",")==="1,0,0,1,0,0"?gn:r):(r===gn&&!t.offsetParent&&t!==$e&&!i.svg&&(l=s.display,s.display="block",o=t.parentNode,(!o||!t.offsetParent&&!t.getBoundingClientRect().width)&&(u=1,a=t.nextElementSibling,$e.appendChild(t)),r=Qo(t),l?s.display=l:ce(t,"display"),u&&(a?o.insertBefore(t,a):o?o.appendChild(t):$e.removeChild(t))),n&&r.length>6?[r[0],r[1],r[4],r[5],r[12],r[13]]:r)},hs=function(t,n,i,s,r,o){var a=t._gsap,l=r||cs(t,!0),u=a.xOrigin||0,c=a.yOrigin||0,h=a.xOffset||0,f=a.yOffset||0,d=l[0],m=l[1],p=l[2],y=l[3],g=l[4],x=l[5],v=n.split(" "),w=parseFloat(v[0])||0,_=parseFloat(v[1])||0,T,S,b,P;i?l!==gn&&(S=d*y-m*p)&&(b=w*(y/S)+_*(-p/S)+(p*x-y*g)/S,P=w*(-m/S)+_*(d/S)-(d*x-m*g)/S,w=b,_=P):(T=qo(t),w=T.x+(~v[0].indexOf("%")?w/100*T.width:w),_=T.y+(~(v[1]||v[0]).indexOf("%")?_/100*T.height:_)),s||s!==!1&&a.smooth?(g=w-u,x=_-c,a.xOffset=h+(g*d+x*p)-g,a.yOffset=f+(g*m+x*y)-x):a.xOffset=a.yOffset=0,a.xOrigin=w,a.yOrigin=_,a.smooth=!!s,a.origin=n,a.originIsAbsolute=!!i,t.style[St]="0px 0px",o&&(he(o,a,"xOrigin",u,w),he(o,a,"yOrigin",c,_),he(o,a,"xOffset",h,a.xOffset),he(o,a,"yOffset",f,a.yOffset)),t.setAttribute("data-svg-origin",w+" "+_)},yn=function(t,n){var i=t._gsap||new Po(t);if("x"in i&&!n&&!i.uncache)return i;var s=t.style,r=i.scaleX<0,o="px",a="deg",l=getComputedStyle(t),u=Vt(t,St)||"0",c,h,f,d,m,p,y,g,x,v,w,_,T,S,b,P,D,O,A,C,I,V,L,N,F,J,ut,W,pt,jt,rt,_e;return c=h=f=p=y=g=x=v=w=0,d=m=1,i.svg=!!(t.getCTM&&Ko(t)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(s[X]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[X]!=="none"?l[X]:"")),s.scale=s.rotate=s.translate="none"),S=cs(t,i.svg),i.svg&&(i.uncache?(F=t.getBBox(),u=i.xOrigin-F.x+"px "+(i.yOrigin-F.y)+"px",N=""):N=!n&&t.getAttribute("data-svg-origin"),hs(t,N||u,!!N||i.originIsAbsolute,i.smooth!==!1,S)),_=i.xOrigin||0,T=i.yOrigin||0,S!==gn&&(O=S[0],A=S[1],C=S[2],I=S[3],c=V=S[4],h=L=S[5],S.length===6?(d=Math.sqrt(O*O+A*A),m=Math.sqrt(I*I+C*C),p=O||A?We(A,O)*Pe:0,x=C||I?We(C,I)*Pe+p:0,x&&(m*=Math.abs(Math.cos(x*Ue))),i.svg&&(c-=_-(_*O+T*C),h-=T-(_*A+T*I))):(_e=S[6],jt=S[7],ut=S[8],W=S[9],pt=S[10],rt=S[11],c=S[12],h=S[13],f=S[14],b=We(_e,pt),y=b*Pe,b&&(P=Math.cos(-b),D=Math.sin(-b),N=V*P+ut*D,F=L*P+W*D,J=_e*P+pt*D,ut=V*-D+ut*P,W=L*-D+W*P,pt=_e*-D+pt*P,rt=jt*-D+rt*P,V=N,L=F,_e=J),b=We(-C,pt),g=b*Pe,b&&(P=Math.cos(-b),D=Math.sin(-b),N=O*P-ut*D,F=A*P-W*D,J=C*P-pt*D,rt=I*D+rt*P,O=N,A=F,C=J),b=We(A,O),p=b*Pe,b&&(P=Math.cos(b),D=Math.sin(b),N=O*P+A*D,F=V*P+L*D,A=A*P-O*D,L=L*P-V*D,O=N,V=F),y&&Math.abs(y)+Math.abs(p)>359.9&&(y=p=0,g=180-g),d=tt(Math.sqrt(O*O+A*A+C*C)),m=tt(Math.sqrt(L*L+_e*_e)),b=We(V,L),x=Math.abs(b)>2e-4?b*Pe:0,w=rt?1/(rt<0?-rt:rt):0),i.svg&&(N=t.getAttribute("transform"),i.forceCSS=t.setAttribute("transform","")||!Zo(Vt(t,X)),N&&t.setAttribute("transform",N))),Math.abs(x)>90&&Math.abs(x)<270&&(r?(d*=-1,x+=p<=0?180:-180,p+=p<=0?180:-180):(m*=-1,x+=x<=0?180:-180)),n=n||i.uncache,i.x=c-((i.xPercent=c&&(!n&&i.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-c)?-50:0)))?t.offsetWidth*i.xPercent/100:0)+o,i.y=h-((i.yPercent=h&&(!n&&i.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-h)?-50:0)))?t.offsetHeight*i.yPercent/100:0)+o,i.z=f+o,i.scaleX=tt(d),i.scaleY=tt(m),i.rotation=tt(p)+a,i.rotationX=tt(y)+a,i.rotationY=tt(g)+a,i.skewX=x+a,i.skewY=v+a,i.transformPerspective=w+o,(i.zOrigin=parseFloat(u.split(" ")[2])||!n&&i.zOrigin||0)&&(s[St]=ei(u)),i.xOffset=i.yOffset=0,i.force3D=At.force3D,i.renderTransform=i.svg?$h:$o?Jo:jh,i.uncache=0,i},ei=function(t){return(t=t.split(" "))[0]+" "+t[1]},fs=function(t,n,i){var s=ft(n);return tt(parseFloat(n)+parseFloat(fe(t,"x",i+"px",s)))+s},jh=function(t,n){n.z="0px",n.rotationY=n.rotationX="0deg",n.force3D=0,Jo(t,n)},Ae="0deg",_n="0px",Me=") ",Jo=function(t,n){var i=n||this,s=i.xPercent,r=i.yPercent,o=i.x,a=i.y,l=i.z,u=i.rotation,c=i.rotationY,h=i.rotationX,f=i.skewX,d=i.skewY,m=i.scaleX,p=i.scaleY,y=i.transformPerspective,g=i.force3D,x=i.target,v=i.zOrigin,w="",_=g==="auto"&&t&&t!==1||g===!0;if(v&&(h!==Ae||c!==Ae)){var T=parseFloat(c)*Ue,S=Math.sin(T),b=Math.cos(T),P;T=parseFloat(h)*Ue,P=Math.cos(T),o=fs(x,o,S*P*-v),a=fs(x,a,-Math.sin(T)*-v),l=fs(x,l,b*P*-v+v)}y!==_n&&(w+="perspective("+y+Me),(s||r)&&(w+="translate("+s+"%, "+r+"%) "),(_||o!==_n||a!==_n||l!==_n)&&(w+=l!==_n||_?"translate3d("+o+", "+a+", "+l+") ":"translate("+o+", "+a+Me),u!==Ae&&(w+="rotate("+u+Me),c!==Ae&&(w+="rotateY("+c+Me),h!==Ae&&(w+="rotateX("+h+Me),(f!==Ae||d!==Ae)&&(w+="skew("+f+", "+d+Me),(m!==1||p!==1)&&(w+="scale("+m+", "+p+Me),x.style[X]=w||"translate(0, 0)"},$h=function(t,n){var i=n||this,s=i.xPercent,r=i.yPercent,o=i.x,a=i.y,l=i.rotation,u=i.skewX,c=i.skewY,h=i.scaleX,f=i.scaleY,d=i.target,m=i.xOrigin,p=i.yOrigin,y=i.xOffset,g=i.yOffset,x=i.forceCSS,v=parseFloat(o),w=parseFloat(a),_,T,S,b,P;l=parseFloat(l),u=parseFloat(u),c=parseFloat(c),c&&(c=parseFloat(c),u+=c,l+=c),l||u?(l*=Ue,u*=Ue,_=Math.cos(l)*h,T=Math.sin(l)*h,S=Math.sin(l-u)*-f,b=Math.cos(l-u)*f,u&&(c*=Ue,P=Math.tan(u-c),P=Math.sqrt(1+P*P),S*=P,b*=P,c&&(P=Math.tan(c),P=Math.sqrt(1+P*P),_*=P,T*=P)),_=tt(_),T=tt(T),S=tt(S),b=tt(b)):(_=h,b=f,T=S=0),(v&&!~(o+"").indexOf("px")||w&&!~(a+"").indexOf("px"))&&(v=fe(d,"x",o,"px"),w=fe(d,"y",a,"px")),(m||p||y||g)&&(v=tt(v+m-(m*_+p*S)+y),w=tt(w+p-(m*T+p*b)+g)),(s||r)&&(P=d.getBBox(),v=tt(v+s/100*P.width),w=tt(w+r/100*P.height)),P="matrix("+_+","+T+","+S+","+b+","+v+","+w+")",d.setAttribute("transform",P),x&&(d.style[X]=P)},Uh=function(t,n,i,s,r){var o=360,a=st(r),l=parseFloat(r)*(a&&~r.indexOf("rad")?Pe:1),u=l-s,c=s+u+"deg",h,f;return a&&(h=r.split("_")[1],h==="short"&&(u%=o,u!==u%(o/2)&&(u+=u<0?o:-o)),h==="cw"&&u<0?u=(u+o*Fo)%o-~~(u/o)*o:h==="ccw"&&u>0&&(u=(u-o*Fo)%o-~~(u/o)*o)),t._pt=f=new Tt(t._pt,n,i,s,u,Ph),f.e=c,f.u="deg",t._props.push(i),f},ta=function(t,n){for(var i in n)t[i]=n[i];return t},Wh=function(t,n,i){var s=ta({},i._gsap),r="perspective,force3D,transformOrigin,svgOrigin",o=i.style,a,l,u,c,h,f,d,m;s.svg?(u=i.getAttribute("transform"),i.setAttribute("transform",""),o[X]=n,a=yn(i,1),ce(i,X),i.setAttribute("transform",u)):(u=getComputedStyle(i)[X],o[X]=n,a=yn(i,1),o[X]=u);for(l in Qt)u=s[l],c=a[l],u!==c&&r.indexOf(l)<0&&(d=ft(u),m=ft(c),h=d!==m?fe(i,l,u,m):parseFloat(u),f=parseFloat(c),t._pt=new Tt(t._pt,a,l,h,f-h,as),t._pt.u=m||0,t._props.push(l));ta(a,s)};wt("padding,margin,Width,Radius",function(e,t){var n="Top",i="Right",s="Bottom",r="Left",o=(t<3?[n,i,s,r]:[n+r,n+i,s+i,s+r]).map(function(a){return t<2?e+a:"border"+a+e});ti[t>1?"border"+e:e]=function(a,l,u,c,h){var f,d;if(arguments.length<4)return f=o.map(function(m){return Jt(a,m,u)}),d=f.join(" "),d.split(f[0]).length===5?f[0]:d;f=(c+"").split(" "),d={},o.forEach(function(m,p){return d[m]=f[p]=f[p]||f[(p-1)/2|0]}),a.init(l,d,h)}});var ea={name:"css",register:us,targetTest:function(t){return t.style&&t.nodeType},init:function(t,n,i,s,r){var o=this._props,a=t.style,l=i.vars.startAt,u,c,h,f,d,m,p,y,g,x,v,w,_,T,S,b,P;ss||us(),this.styles=this.styles||jo(t),b=this.styles.props,this.tween=i;for(p in n)if(p!=="autoRound"&&(c=n[p],!(Ct[p]&&Ao(p,n,i,s,t,r)))){if(d=typeof c,m=ti[p],d==="function"&&(c=c.call(i,s,t,r),d=typeof c),d==="string"&&~c.indexOf("random(")&&(c=cn(c)),m)m(this,t,p,c,i)&&(S=1);else if(p.substr(0,2)==="--")u=(getComputedStyle(t).getPropertyValue(p)+"").trim(),c+="",ae.lastIndex=0,ae.test(u)||(y=ft(u),g=ft(c),g?y!==g&&(u=fe(t,p,u,g)+g):y&&(c+=y)),this.add(a,"setProperty",u,c,s,r,0,0,p),o.push(p),b.push(p,0,a[p]);else if(d!=="undefined"){if(l&&p in l?(u=typeof l[p]=="function"?l[p].call(i,s,t,r):l[p],st(u)&&~u.indexOf("random(")&&(u=cn(u)),ft(u+"")||u==="auto"||(u+=At.units[p]||ft(Jt(t,p))||""),(u+"").charAt(1)==="="&&(u=Jt(t,p))):u=Jt(t,p),f=parseFloat(u),x=d==="string"&&c.charAt(1)==="="&&c.substr(0,2),x&&(c=c.substr(2)),h=parseFloat(c),p in Gt&&(p==="autoAlpha"&&(f===1&&Jt(t,"visibility")==="hidden"&&h&&(f=0),b.push("visibility",0,a.visibility),he(this,a,"visibility",f?"inherit":"hidden",h?"inherit":"hidden",!h)),p!=="scale"&&p!=="transform"&&(p=Gt[p],~p.indexOf(",")&&(p=p.split(",")[0]))),v=p in Qt,v){if(this.styles.save(p),P=c,d==="string"&&c.substring(0,6)==="var(--"){if(c=Vt(t,c.substring(4,c.indexOf(")"))),c.substring(0,5)==="calc("){var D=t.style.perspective;t.style.perspective=c,c=Vt(t,"perspective"),D?t.style.perspective=D:ce(t,"perspective")}h=parseFloat(c)}if(w||(_=t._gsap,_.renderTransform&&!n.parseTransform||yn(t,n.parseTransform),T=n.smoothOrigin!==!1&&_.smooth,w=this._pt=new Tt(this._pt,a,X,0,1,_.renderTransform,_,0,-1),w.dep=1),p==="scale")this._pt=new Tt(this._pt,_,"scaleY",_.scaleY,(x?Le(_.scaleY,x+h):h)-_.scaleY||0,as),this._pt.u=0,o.push("scaleY",p),p+="X";else if(p==="transformOrigin"){b.push(St,0,a[St]),c=zh(c),_.svg?hs(t,c,0,T,0,this):(g=parseFloat(c.split(" ")[2])||0,g!==_.zOrigin&&he(this,_,"zOrigin",_.zOrigin,g),he(this,a,p,ei(u),ei(c)));continue}else if(p==="svgOrigin"){hs(t,c,1,T,0,this);continue}else if(p in Ho){Uh(this,_,p,f,x?Le(f,x+c):c);continue}else if(p==="smoothOrigin"){he(this,_,"smooth",_.smooth,c);continue}else if(p==="force3D"){_[p]=c;continue}else if(p==="transform"){Wh(this,c,t);continue}}else p in a||(p=Ge(p)||p);if(v||(h||h===0)&&(f||f===0)&&!Sh.test(c)&&p in a)y=(u+"").substr((f+"").length),h||(h=0),g=ft(c)||(p in At.units?At.units[p]:y),y!==g&&(f=fe(t,p,u,g)),this._pt=new Tt(this._pt,v?_:a,p,f,(x?Le(f,x+h):h)-f,!v&&(g==="px"||p==="zIndex")&&n.autoRound!==!1?Ch:as),this._pt.u=g||0,v&&P!==c?(this._pt.b=u,this._pt.e=P,this._pt.r=Mh):y!==g&&g!=="%"&&(this._pt.b=u,this._pt.r=Ah);else if(p in a)Rh.call(this,t,p,u,x?x+c:c);else if(p in t)this.add(t,p,u||t[p],x?x+c:c,s,r);else if(p!=="parseTransform"){Ni(p,c);continue}v||(p in a?b.push(p,0,a[p]):typeof t[p]=="function"?b.push(p,2,t[p]()):b.push(p,1,u||t[p])),o.push(p)}}S&&Vo(this)},render:function(t,n){if(n.tween._time||!rs())for(var i=n._pt;i;)i.r(t,i.d),i=i._next;else n.styles.revert()},get:Jt,aliases:Gt,getSetter:function(t,n,i){var s=Gt[n];return s&&s.indexOf(",")<0&&(n=s),n in Qt&&n!==St&&(t._gsap.x||Jt(t,"x"))?i&&Lo===i?n==="scale"?Vh:kh:(Lo=i||{})&&(n==="scale"?Oh:Nh):t.style&&!Di(t.style[n])?Dh:~n.indexOf("-")?Eh:Ji(t,n)},core:{_removeProperty:ce,_getMatrix:cs}};bt.utils.checkPrefix=Ge,bt.core.getStyleSaver=jo,(function(e,t,n,i){var s=wt(e+","+t+","+n,function(r){Qt[r]=1});wt(t,function(r){At.units[r]="deg",Ho[r]=1}),Gt[s[13]]=e+","+t,wt(i,function(r){var o=r.split(":");Gt[o[1]]=s[o[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY"),wt("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(e){At.units[e]="px"}),bt.registerPlugin(ea);var vn=bt.registerPlugin(ea)||bt;vn.core.Tween;var q=(e=>(e.Core="CORE",e.Finance="FINANCE",e.Social="SOCIAL",e.Infrastructure="INFRA",e.Network="NETWORK",e))(q||{});const ni={[q.Core]:{id:q.Core,label:"Core Systems",color:"#2F80ED",center:[0,0,0]},[q.Finance]:{id:q.Finance,label:"DeFi Galaxy",color:"#D0021B",center:[150,50,-50]},[q.Social]:{id:q.Social,label:"Social Mesh",color:"#00A1E4",center:[-120,80,50]},[q.Infrastructure]:{id:q.Infrastructure,label:"Infra Cloud",color:"#9013FE",center:[50,-100,100]},[q.Network]:{id:q.Network,label:"Global Network",color:"#95A5A6",center:[0,0,0]}},Gh=[0,0,400],qh=40;function Kh(e,t,n){var i,s=1;e==null&&(e=0),t==null&&(t=0),n==null&&(n=0);function r(){var o,a=i.length,l,u=0,c=0,h=0;for(o=0;o<a;++o)l=i[o],u+=l.x||0,c+=l.y||0,h+=l.z||0;for(u=(u/a-e)*s,c=(c/a-t)*s,h=(h/a-n)*s,o=0;o<a;++o)l=i[o],u&&(l.x-=u),c&&(l.y-=c),h&&(l.z-=h)}return r.initialize=function(o){i=o},r.x=function(o){return arguments.length?(e=+o,r):e},r.y=function(o){return arguments.length?(t=+o,r):t},r.z=function(o){return arguments.length?(n=+o,r):n},r.strength=function(o){return arguments.length?(s=+o,r):s},r}function Yh(e){const t=+this._x.call(null,e);return na(this.cover(t),t,e)}function na(e,t,n){if(isNaN(t))return e;var i,s=e._root,r={data:n},o=e._x0,a=e._x1,l,u,c,h,f;if(!s)return e._root=r,e;for(;s.length;)if((c=t>=(l=(o+a)/2))?o=l:a=l,i=s,!(s=s[h=+c]))return i[h]=r,e;if(u=+e._x.call(null,s.data),t===u)return r.next=s,i?i[h]=r:e._root=r,e;do i=i?i[h]=new Array(2):e._root=new Array(2),(c=t>=(l=(o+a)/2))?o=l:a=l;while((h=+c)==(f=+(u>=l)));return i[f]=s,i[h]=r,e}function Xh(e){Array.isArray(e)||(e=Array.from(e));const t=e.length,n=new Float64Array(t);let i=1/0,s=-1/0;for(let r=0,o;r<t;++r)isNaN(o=+this._x.call(null,e[r]))||(n[r]=o,o<i&&(i=o),o>s&&(s=o));if(i>s)return this;this.cover(i).cover(s);for(let r=0;r<t;++r)na(this,n[r],e[r]);return this}function Hh(e){if(isNaN(e=+e))return this;var t=this._x0,n=this._x1;if(isNaN(t))n=(t=Math.floor(e))+1;else{for(var i=n-t||1,s=this._root,r,o;t>e||e>=n;)switch(o=+(e<t),r=new Array(2),r[o]=s,s=r,i*=2,o){case 0:n=t+i;break;case 1:t=n-i;break}this._root&&this._root.length&&(this._root=s)}return this._x0=t,this._x1=n,this}function Zh(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function Qh(e){return arguments.length?this.cover(+e[0][0]).cover(+e[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function te(e,t,n){this.node=e,this.x0=t,this.x1=n}function Jh(e,t){var n,i=this._x0,s,r,o=this._x1,a=[],l=this._root,u,c;for(l&&a.push(new te(l,i,o)),t==null?t=1/0:(i=e-t,o=e+t);u=a.pop();)if(!(!(l=u.node)||(s=u.x0)>o||(r=u.x1)<i))if(l.length){var h=(s+r)/2;a.push(new te(l[1],h,r),new te(l[0],s,h)),(c=+(e>=h))&&(u=a[a.length-1],a[a.length-1]=a[a.length-1-c],a[a.length-1-c]=u)}else{var f=Math.abs(e-+this._x.call(null,l.data));f<t&&(t=f,i=e-f,o=e+f,n=l.data)}return n}function tf(e){if(isNaN(l=+this._x.call(null,e)))return this;var t,n=this._root,i,s,r,o=this._x0,a=this._x1,l,u,c,h,f;if(!n)return this;if(n.length)for(;;){if((c=l>=(u=(o+a)/2))?o=u:a=u,t=n,!(n=n[h=+c]))return this;if(!n.length)break;t[h+1&1]&&(i=t,f=h)}for(;n.data!==e;)if(s=n,!(n=n.next))return this;return(r=n.next)&&delete n.next,s?(r?s.next=r:delete s.next,this):t?(r?t[h]=r:delete t[h],(n=t[0]||t[1])&&n===(t[1]||t[0])&&!n.length&&(i?i[f]=n:this._root=n),this):(this._root=r,this)}function ef(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function nf(){return this._root}function sf(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function rf(e){var t=[],n,i=this._root,s,r,o;for(i&&t.push(new te(i,this._x0,this._x1));n=t.pop();)if(!e(i=n.node,r=n.x0,o=n.x1)&&i.length){var a=(r+o)/2;(s=i[1])&&t.push(new te(s,a,o)),(s=i[0])&&t.push(new te(s,r,a))}return this}function of(e){var t=[],n=[],i;for(this._root&&t.push(new te(this._root,this._x0,this._x1));i=t.pop();){var s=i.node;if(s.length){var r,o=i.x0,a=i.x1,l=(o+a)/2;(r=s[0])&&t.push(new te(r,o,l)),(r=s[1])&&t.push(new te(r,l,a))}n.push(i)}for(;i=n.pop();)e(i.node,i.x0,i.x1);return this}function af(e){return e[0]}function lf(e){return arguments.length?(this._x=e,this):this._x}function ia(e,t){var n=new ds(t??af,NaN,NaN);return e==null?n:n.addAll(e)}function ds(e,t,n){this._x=e,this._x0=t,this._x1=n,this._root=void 0}function sa(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var Pt=ia.prototype=ds.prototype;Pt.copy=function(){var e=new ds(this._x,this._x0,this._x1),t=this._root,n,i;if(!t)return e;if(!t.length)return e._root=sa(t),e;for(n=[{source:t,target:e._root=new Array(2)}];t=n.pop();)for(var s=0;s<2;++s)(i=t.source[s])&&(i.length?n.push({source:i,target:t.target[s]=new Array(2)}):t.target[s]=sa(i));return e},Pt.add=Yh,Pt.addAll=Xh,Pt.cover=Hh,Pt.data=Zh,Pt.extent=Qh,Pt.find=Jh,Pt.remove=tf,Pt.removeAll=ef,Pt.root=nf,Pt.size=sf,Pt.visit=rf,Pt.visitAfter=of,Pt.x=lf;function uf(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return ra(this.cover(t,n),t,n,e)}function ra(e,t,n,i){if(isNaN(t)||isNaN(n))return e;var s,r=e._root,o={data:i},a=e._x0,l=e._y0,u=e._x1,c=e._y1,h,f,d,m,p,y,g,x;if(!r)return e._root=o,e;for(;r.length;)if((p=t>=(h=(a+u)/2))?a=h:u=h,(y=n>=(f=(l+c)/2))?l=f:c=f,s=r,!(r=r[g=y<<1|p]))return s[g]=o,e;if(d=+e._x.call(null,r.data),m=+e._y.call(null,r.data),t===d&&n===m)return o.next=r,s?s[g]=o:e._root=o,e;do s=s?s[g]=new Array(4):e._root=new Array(4),(p=t>=(h=(a+u)/2))?a=h:u=h,(y=n>=(f=(l+c)/2))?l=f:c=f;while((g=y<<1|p)===(x=(m>=f)<<1|d>=h));return s[x]=r,s[g]=o,e}function cf(e){var t,n,i=e.length,s,r,o=new Array(i),a=new Array(i),l=1/0,u=1/0,c=-1/0,h=-1/0;for(n=0;n<i;++n)isNaN(s=+this._x.call(null,t=e[n]))||isNaN(r=+this._y.call(null,t))||(o[n]=s,a[n]=r,s<l&&(l=s),s>c&&(c=s),r<u&&(u=r),r>h&&(h=r));if(l>c||u>h)return this;for(this.cover(l,u).cover(c,h),n=0;n<i;++n)ra(this,o[n],a[n],e[n]);return this}function hf(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,i=this._y0,s=this._x1,r=this._y1;if(isNaN(n))s=(n=Math.floor(e))+1,r=(i=Math.floor(t))+1;else{for(var o=s-n||1,a=this._root,l,u;n>e||e>=s||i>t||t>=r;)switch(u=(t<i)<<1|e<n,l=new Array(4),l[u]=a,a=l,o*=2,u){case 0:s=n+o,r=i+o;break;case 1:n=s-o,r=i+o;break;case 2:s=n+o,i=r-o;break;case 3:n=s-o,i=r-o;break}this._root&&this._root.length&&(this._root=a)}return this._x0=n,this._y0=i,this._x1=s,this._y1=r,this}function ff(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function df(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function gt(e,t,n,i,s){this.node=e,this.x0=t,this.y0=n,this.x1=i,this.y1=s}function pf(e,t,n){var i,s=this._x0,r=this._y0,o,a,l,u,c=this._x1,h=this._y1,f=[],d=this._root,m,p;for(d&&f.push(new gt(d,s,r,c,h)),n==null?n=1/0:(s=e-n,r=t-n,c=e+n,h=t+n,n*=n);m=f.pop();)if(!(!(d=m.node)||(o=m.x0)>c||(a=m.y0)>h||(l=m.x1)<s||(u=m.y1)<r))if(d.length){var y=(o+l)/2,g=(a+u)/2;f.push(new gt(d[3],y,g,l,u),new gt(d[2],o,g,y,u),new gt(d[1],y,a,l,g),new gt(d[0],o,a,y,g)),(p=(t>=g)<<1|e>=y)&&(m=f[f.length-1],f[f.length-1]=f[f.length-1-p],f[f.length-1-p]=m)}else{var x=e-+this._x.call(null,d.data),v=t-+this._y.call(null,d.data),w=x*x+v*v;if(w<n){var _=Math.sqrt(n=w);s=e-_,r=t-_,c=e+_,h=t+_,i=d.data}}return i}function mf(e){if(isNaN(c=+this._x.call(null,e))||isNaN(h=+this._y.call(null,e)))return this;var t,n=this._root,i,s,r,o=this._x0,a=this._y0,l=this._x1,u=this._y1,c,h,f,d,m,p,y,g;if(!n)return this;if(n.length)for(;;){if((m=c>=(f=(o+l)/2))?o=f:l=f,(p=h>=(d=(a+u)/2))?a=d:u=d,t=n,!(n=n[y=p<<1|m]))return this;if(!n.length)break;(t[y+1&3]||t[y+2&3]||t[y+3&3])&&(i=t,g=y)}for(;n.data!==e;)if(s=n,!(n=n.next))return this;return(r=n.next)&&delete n.next,s?(r?s.next=r:delete s.next,this):t?(r?t[y]=r:delete t[y],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(i?i[g]=n:this._root=n),this):(this._root=r,this)}function gf(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function yf(){return this._root}function _f(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function vf(e){var t=[],n,i=this._root,s,r,o,a,l;for(i&&t.push(new gt(i,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(i=n.node,r=n.x0,o=n.y0,a=n.x1,l=n.y1)&&i.length){var u=(r+a)/2,c=(o+l)/2;(s=i[3])&&t.push(new gt(s,u,c,a,l)),(s=i[2])&&t.push(new gt(s,r,c,u,l)),(s=i[1])&&t.push(new gt(s,u,o,a,c)),(s=i[0])&&t.push(new gt(s,r,o,u,c))}return this}function xf(e){var t=[],n=[],i;for(this._root&&t.push(new gt(this._root,this._x0,this._y0,this._x1,this._y1));i=t.pop();){var s=i.node;if(s.length){var r,o=i.x0,a=i.y0,l=i.x1,u=i.y1,c=(o+l)/2,h=(a+u)/2;(r=s[0])&&t.push(new gt(r,o,a,c,h)),(r=s[1])&&t.push(new gt(r,c,a,l,h)),(r=s[2])&&t.push(new gt(r,o,h,c,u)),(r=s[3])&&t.push(new gt(r,c,h,l,u))}n.push(i)}for(;i=n.pop();)e(i.node,i.x0,i.y0,i.x1,i.y1);return this}function wf(e){return e[0]}function Tf(e){return arguments.length?(this._x=e,this):this._x}function bf(e){return e[1]}function Sf(e){return arguments.length?(this._y=e,this):this._y}function oa(e,t,n){var i=new ps(t??wf,n??bf,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function ps(e,t,n,i,s,r){this._x=e,this._y=t,this._x0=n,this._y0=i,this._x1=s,this._y1=r,this._root=void 0}function aa(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var yt=oa.prototype=ps.prototype;yt.copy=function(){var e=new ps(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,i;if(!t)return e;if(!t.length)return e._root=aa(t),e;for(n=[{source:t,target:e._root=new Array(4)}];t=n.pop();)for(var s=0;s<4;++s)(i=t.source[s])&&(i.length?n.push({source:i,target:t.target[s]=new Array(4)}):t.target[s]=aa(i));return e},yt.add=uf,yt.addAll=cf,yt.cover=hf,yt.data=ff,yt.extent=df,yt.find=pf,yt.remove=mf,yt.removeAll=gf,yt.root=yf,yt.size=_f,yt.visit=vf,yt.visitAfter=xf,yt.x=Tf,yt.y=Sf;function Pf(e){const t=+this._x.call(null,e),n=+this._y.call(null,e),i=+this._z.call(null,e);return la(this.cover(t,n,i),t,n,i,e)}function la(e,t,n,i,s){if(isNaN(t)||isNaN(n)||isNaN(i))return e;var r,o=e._root,a={data:s},l=e._x0,u=e._y0,c=e._z0,h=e._x1,f=e._y1,d=e._z1,m,p,y,g,x,v,w,_,T,S,b;if(!o)return e._root=a,e;for(;o.length;)if((w=t>=(m=(l+h)/2))?l=m:h=m,(_=n>=(p=(u+f)/2))?u=p:f=p,(T=i>=(y=(c+d)/2))?c=y:d=y,r=o,!(o=o[S=T<<2|_<<1|w]))return r[S]=a,e;if(g=+e._x.call(null,o.data),x=+e._y.call(null,o.data),v=+e._z.call(null,o.data),t===g&&n===x&&i===v)return a.next=o,r?r[S]=a:e._root=a,e;do r=r?r[S]=new Array(8):e._root=new Array(8),(w=t>=(m=(l+h)/2))?l=m:h=m,(_=n>=(p=(u+f)/2))?u=p:f=p,(T=i>=(y=(c+d)/2))?c=y:d=y;while((S=T<<2|_<<1|w)===(b=(v>=y)<<2|(x>=p)<<1|g>=m));return r[b]=o,r[S]=a,e}function Af(e){Array.isArray(e)||(e=Array.from(e));const t=e.length,n=new Float64Array(t),i=new Float64Array(t),s=new Float64Array(t);let r=1/0,o=1/0,a=1/0,l=-1/0,u=-1/0,c=-1/0;for(let h=0,f,d,m,p;h<t;++h)isNaN(d=+this._x.call(null,f=e[h]))||isNaN(m=+this._y.call(null,f))||isNaN(p=+this._z.call(null,f))||(n[h]=d,i[h]=m,s[h]=p,d<r&&(r=d),d>l&&(l=d),m<o&&(o=m),m>u&&(u=m),p<a&&(a=p),p>c&&(c=p));if(r>l||o>u||a>c)return this;this.cover(r,o,a).cover(l,u,c);for(let h=0;h<t;++h)la(this,n[h],i[h],s[h],e[h]);return this}function Mf(e,t,n){if(isNaN(e=+e)||isNaN(t=+t)||isNaN(n=+n))return this;var i=this._x0,s=this._y0,r=this._z0,o=this._x1,a=this._y1,l=this._z1;if(isNaN(i))o=(i=Math.floor(e))+1,a=(s=Math.floor(t))+1,l=(r=Math.floor(n))+1;else{for(var u=o-i||1,c=this._root,h,f;i>e||e>=o||s>t||t>=a||r>n||n>=l;)switch(f=(n<r)<<2|(t<s)<<1|e<i,h=new Array(8),h[f]=c,c=h,u*=2,f){case 0:o=i+u,a=s+u,l=r+u;break;case 1:i=o-u,a=s+u,l=r+u;break;case 2:o=i+u,s=a-u,l=r+u;break;case 3:i=o-u,s=a-u,l=r+u;break;case 4:o=i+u,a=s+u,r=l-u;break;case 5:i=o-u,a=s+u,r=l-u;break;case 6:o=i+u,s=a-u,r=l-u;break;case 7:i=o-u,s=a-u,r=l-u;break}this._root&&this._root.length&&(this._root=c)}return this._x0=i,this._y0=s,this._z0=r,this._x1=o,this._y1=a,this._z1=l,this}function Cf(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function Df(e){return arguments.length?this.cover(+e[0][0],+e[0][1],+e[0][2]).cover(+e[1][0],+e[1][1],+e[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]}function $(e,t,n,i,s,r,o){this.node=e,this.x0=t,this.y0=n,this.z0=i,this.x1=s,this.y1=r,this.z1=o}function Ef(e,t,n,i){var s,r=this._x0,o=this._y0,a=this._z0,l,u,c,h,f,d,m=this._x1,p=this._y1,y=this._z1,g=[],x=this._root,v,w;for(x&&g.push(new $(x,r,o,a,m,p,y)),i==null?i=1/0:(r=e-i,o=t-i,a=n-i,m=e+i,p=t+i,y=n+i,i*=i);v=g.pop();)if(!(!(x=v.node)||(l=v.x0)>m||(u=v.y0)>p||(c=v.z0)>y||(h=v.x1)<r||(f=v.y1)<o||(d=v.z1)<a))if(x.length){var _=(l+h)/2,T=(u+f)/2,S=(c+d)/2;g.push(new $(x[7],_,T,S,h,f,d),new $(x[6],l,T,S,_,f,d),new $(x[5],_,u,S,h,T,d),new $(x[4],l,u,S,_,T,d),new $(x[3],_,T,c,h,f,S),new $(x[2],l,T,c,_,f,S),new $(x[1],_,u,c,h,T,S),new $(x[0],l,u,c,_,T,S)),(w=(n>=S)<<2|(t>=T)<<1|e>=_)&&(v=g[g.length-1],g[g.length-1]=g[g.length-1-w],g[g.length-1-w]=v)}else{var b=e-+this._x.call(null,x.data),P=t-+this._y.call(null,x.data),D=n-+this._z.call(null,x.data),O=b*b+P*P+D*D;if(O<i){var A=Math.sqrt(i=O);r=e-A,o=t-A,a=n-A,m=e+A,p=t+A,y=n+A,s=x.data}}return s}const kf=(e,t,n,i,s,r)=>Math.sqrt((e-i)**2+(t-s)**2+(n-r)**2);function Vf(e,t,n,i){const s=[],r=e-i,o=t-i,a=n-i,l=e+i,u=t+i,c=n+i;return this.visit((h,f,d,m,p,y,g)=>{if(!h.length)do{const x=h.data;kf(e,t,n,this._x(x),this._y(x),this._z(x))<=i&&s.push(x)}while(h=h.next);return f>l||d>u||m>c||p<r||y<o||g<a}),s}function Of(e){if(isNaN(f=+this._x.call(null,e))||isNaN(d=+this._y.call(null,e))||isNaN(m=+this._z.call(null,e)))return this;var t,n=this._root,i,s,r,o=this._x0,a=this._y0,l=this._z0,u=this._x1,c=this._y1,h=this._z1,f,d,m,p,y,g,x,v,w,_,T;if(!n)return this;if(n.length)for(;;){if((x=f>=(p=(o+u)/2))?o=p:u=p,(v=d>=(y=(a+c)/2))?a=y:c=y,(w=m>=(g=(l+h)/2))?l=g:h=g,t=n,!(n=n[_=w<<2|v<<1|x]))return this;if(!n.length)break;(t[_+1&7]||t[_+2&7]||t[_+3&7]||t[_+4&7]||t[_+5&7]||t[_+6&7]||t[_+7&7])&&(i=t,T=_)}for(;n.data!==e;)if(s=n,!(n=n.next))return this;return(r=n.next)&&delete n.next,s?(r?s.next=r:delete s.next,this):t?(r?t[_]=r:delete t[_],(n=t[0]||t[1]||t[2]||t[3]||t[4]||t[5]||t[6]||t[7])&&n===(t[7]||t[6]||t[5]||t[4]||t[3]||t[2]||t[1]||t[0])&&!n.length&&(i?i[T]=n:this._root=n),this):(this._root=r,this)}function Nf(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function If(){return this._root}function Lf(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function Ff(e){var t=[],n,i=this._root,s,r,o,a,l,u,c;for(i&&t.push(new $(i,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));n=t.pop();)if(!e(i=n.node,r=n.x0,o=n.y0,a=n.z0,l=n.x1,u=n.y1,c=n.z1)&&i.length){var h=(r+l)/2,f=(o+u)/2,d=(a+c)/2;(s=i[7])&&t.push(new $(s,h,f,d,l,u,c)),(s=i[6])&&t.push(new $(s,r,f,d,h,u,c)),(s=i[5])&&t.push(new $(s,h,o,d,l,f,c)),(s=i[4])&&t.push(new $(s,r,o,d,h,f,c)),(s=i[3])&&t.push(new $(s,h,f,a,l,u,d)),(s=i[2])&&t.push(new $(s,r,f,a,h,u,d)),(s=i[1])&&t.push(new $(s,h,o,a,l,f,d)),(s=i[0])&&t.push(new $(s,r,o,a,h,f,d))}return this}function Rf(e){var t=[],n=[],i;for(this._root&&t.push(new $(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));i=t.pop();){var s=i.node;if(s.length){var r,o=i.x0,a=i.y0,l=i.z0,u=i.x1,c=i.y1,h=i.z1,f=(o+u)/2,d=(a+c)/2,m=(l+h)/2;(r=s[0])&&t.push(new $(r,o,a,l,f,d,m)),(r=s[1])&&t.push(new $(r,f,a,l,u,d,m)),(r=s[2])&&t.push(new $(r,o,d,l,f,c,m)),(r=s[3])&&t.push(new $(r,f,d,l,u,c,m)),(r=s[4])&&t.push(new $(r,o,a,m,f,d,h)),(r=s[5])&&t.push(new $(r,f,a,m,u,d,h)),(r=s[6])&&t.push(new $(r,o,d,m,f,c,h)),(r=s[7])&&t.push(new $(r,f,d,m,u,c,h))}n.push(i)}for(;i=n.pop();)e(i.node,i.x0,i.y0,i.z0,i.x1,i.y1,i.z1);return this}function zf(e){return e[0]}function Bf(e){return arguments.length?(this._x=e,this):this._x}function jf(e){return e[1]}function $f(e){return arguments.length?(this._y=e,this):this._y}function Uf(e){return e[2]}function Wf(e){return arguments.length?(this._z=e,this):this._z}function ua(e,t,n,i){var s=new ms(t??zf,n??jf,i??Uf,NaN,NaN,NaN,NaN,NaN,NaN);return e==null?s:s.addAll(e)}function ms(e,t,n,i,s,r,o,a,l){this._x=e,this._y=t,this._z=n,this._x0=i,this._y0=s,this._z0=r,this._x1=o,this._y1=a,this._z1=l,this._root=void 0}function ca(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var at=ua.prototype=ms.prototype;at.copy=function(){var e=new ms(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),t=this._root,n,i;if(!t)return e;if(!t.length)return e._root=ca(t),e;for(n=[{source:t,target:e._root=new Array(8)}];t=n.pop();)for(var s=0;s<8;++s)(i=t.source[s])&&(i.length?n.push({source:i,target:t.target[s]=new Array(8)}):t.target[s]=ca(i));return e},at.add=Pf,at.addAll=Af,at.cover=Mf,at.data=Cf,at.extent=Df,at.find=Ef,at.findAllWithinRadius=Vf,at.remove=Of,at.removeAll=Nf,at.root=If,at.size=Lf,at.visit=Ff,at.visitAfter=Rf,at.x=Bf,at.y=$f,at.z=Wf;function xn(e){return function(){return e}}function ee(e){return(e()-.5)*1e-6}function Gf(e){return e.index}function ha(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function qf(e){var t=Gf,n=f,i,s=xn(30),r,o,a,l,u,c,h=1;e==null&&(e=[]);function f(g){return 1/Math.min(l[g.source.index],l[g.target.index])}function d(g){for(var x=0,v=e.length;x<h;++x)for(var w=0,_,T,S,b=0,P=0,D=0,O,A;w<v;++w)_=e[w],T=_.source,S=_.target,b=S.x+S.vx-T.x-T.vx||ee(c),a>1&&(P=S.y+S.vy-T.y-T.vy||ee(c)),a>2&&(D=S.z+S.vz-T.z-T.vz||ee(c)),O=Math.sqrt(b*b+P*P+D*D),O=(O-r[w])/O*g*i[w],b*=O,P*=O,D*=O,S.vx-=b*(A=u[w]),a>1&&(S.vy-=P*A),a>2&&(S.vz-=D*A),T.vx+=b*(A=1-A),a>1&&(T.vy+=P*A),a>2&&(T.vz+=D*A)}function m(){if(o){var g,x=o.length,v=e.length,w=new Map(o.map((T,S)=>[t(T,S,o),T])),_;for(g=0,l=new Array(x);g<v;++g)_=e[g],_.index=g,typeof _.source!="object"&&(_.source=ha(w,_.source)),typeof _.target!="object"&&(_.target=ha(w,_.target)),l[_.source.index]=(l[_.source.index]||0)+1,l[_.target.index]=(l[_.target.index]||0)+1;for(g=0,u=new Array(v);g<v;++g)_=e[g],u[g]=l[_.source.index]/(l[_.source.index]+l[_.target.index]);i=new Array(v),p(),r=new Array(v),y()}}function p(){if(o)for(var g=0,x=e.length;g<x;++g)i[g]=+n(e[g],g,e)}function y(){if(o)for(var g=0,x=e.length;g<x;++g)r[g]=+s(e[g],g,e)}return d.initialize=function(g,...x){o=g,c=x.find(v=>typeof v=="function")||Math.random,a=x.find(v=>[1,2,3].includes(v))||2,m()},d.links=function(g){return arguments.length?(e=g,m(),d):e},d.id=function(g){return arguments.length?(t=g,d):t},d.iterations=function(g){return arguments.length?(h=+g,d):h},d.strength=function(g){return arguments.length?(n=typeof g=="function"?g:xn(+g),p(),d):n},d.distance=function(g){return arguments.length?(s=typeof g=="function"?g:xn(+g),y(),d):s},d}var Kf={value:()=>{}};function fa(){for(var e=0,t=arguments.length,n={},i;e<t;++e){if(!(i=arguments[e]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new ii(n)}function ii(e){this._=e}function Yf(e,t){return e.trim().split(/^|\s+/).map(function(n){var i="",s=n.indexOf(".");if(s>=0&&(i=n.slice(s+1),n=n.slice(0,s)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}ii.prototype=fa.prototype={constructor:ii,on:function(e,t){var n=this._,i=Yf(e+"",n),s,r=-1,o=i.length;if(arguments.length<2){for(;++r<o;)if((s=(e=i[r]).type)&&(s=Xf(n[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++r<o;)if(s=(e=i[r]).type)n[s]=da(n[s],e.name,t);else if(t==null)for(s in n)n[s]=da(n[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new ii(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var n=new Array(s),i=0,s,r;i<s;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(r=this._[e],i=0,s=r.length;i<s;++i)r[i].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],s=0,r=i.length;s<r;++s)i[s].value.apply(t,n)}};function Xf(e,t){for(var n=0,i=e.length,s;n<i;++n)if((s=e[n]).name===t)return s.value}function da(e,t,n){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=Kf,e=e.slice(0,i).concat(e.slice(i+1));break}return n!=null&&e.push({name:t,value:n}),e}var qe=0,wn=0,Tn=0,pa=1e3,si,bn,ri=0,Ce=0,oi=0,Sn=typeof performance=="object"&&performance.now?performance:Date,ma=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function ga(){return Ce||(ma(Hf),Ce=Sn.now()+oi)}function Hf(){Ce=0}function gs(){this._call=this._time=this._next=null}gs.prototype=ya.prototype={constructor:gs,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?ga():+n)+(t==null?0:+t),!this._next&&bn!==this&&(bn?bn._next=this:si=this,bn=this),this._call=e,this._time=n,ys()},stop:function(){this._call&&(this._call=null,this._time=1/0,ys())}};function ya(e,t,n){var i=new gs;return i.restart(e,t,n),i}function Zf(){ga(),++qe;for(var e=si,t;e;)(t=Ce-e._time)>=0&&e._call.call(void 0,t),e=e._next;--qe}function _a(){Ce=(ri=Sn.now())+oi,qe=wn=0;try{Zf()}finally{qe=0,Jf(),Ce=0}}function Qf(){var e=Sn.now(),t=e-ri;t>pa&&(oi-=t,ri=e)}function Jf(){for(var e,t=si,n,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:si=n);bn=e,ys(i)}function ys(e){if(!qe){wn&&(wn=clearTimeout(wn));var t=e-Ce;t>24?(e<1/0&&(wn=setTimeout(_a,e-Sn.now()-oi)),Tn&&(Tn=clearInterval(Tn))):(Tn||(ri=Sn.now(),Tn=setInterval(Qf,pa)),qe=1,ma(_a))}}const td=1664525,ed=1013904223,va=4294967296;function nd(){let e=1;return()=>(e=(td*e+ed)%va)/va}var xa=3;function _s(e){return e.x}function wa(e){return e.y}function id(e){return e.z}var sd=10,rd=Math.PI*(3-Math.sqrt(5)),od=Math.PI*20/(9+Math.sqrt(221));function ad(e,t){t=t||2;var n=Math.min(xa,Math.max(1,Math.round(t))),i,s=1,r=.001,o=1-Math.pow(r,1/300),a=0,l=.6,u=new Map,c=ya(d),h=fa("tick","end"),f=nd();e==null&&(e=[]);function d(){m(),h.call("tick",i),s<r&&(c.stop(),h.call("end",i))}function m(g){var x,v=e.length,w;g===void 0&&(g=1);for(var _=0;_<g;++_)for(s+=(a-s)*o,u.forEach(function(T){T(s)}),x=0;x<v;++x)w=e[x],w.fx==null?w.x+=w.vx*=l:(w.x=w.fx,w.vx=0),n>1&&(w.fy==null?w.y+=w.vy*=l:(w.y=w.fy,w.vy=0)),n>2&&(w.fz==null?w.z+=w.vz*=l:(w.z=w.fz,w.vz=0));return i}function p(){for(var g=0,x=e.length,v;g<x;++g){if(v=e[g],v.index=g,v.fx!=null&&(v.x=v.fx),v.fy!=null&&(v.y=v.fy),v.fz!=null&&(v.z=v.fz),isNaN(v.x)||n>1&&isNaN(v.y)||n>2&&isNaN(v.z)){var w=sd*(n>2?Math.cbrt(.5+g):n>1?Math.sqrt(.5+g):g),_=g*rd,T=g*od;n===1?v.x=w:n===2?(v.x=w*Math.cos(_),v.y=w*Math.sin(_)):(v.x=w*Math.sin(_)*Math.cos(T),v.y=w*Math.cos(_),v.z=w*Math.sin(_)*Math.sin(T))}(isNaN(v.vx)||n>1&&isNaN(v.vy)||n>2&&isNaN(v.vz))&&(v.vx=0,n>1&&(v.vy=0),n>2&&(v.vz=0))}}function y(g){return g.initialize&&g.initialize(e,f,n),g}return p(),i={tick:m,restart:function(){return c.restart(d),i},stop:function(){return c.stop(),i},numDimensions:function(g){return arguments.length?(n=Math.min(xa,Math.max(1,Math.round(g))),u.forEach(y),i):n},nodes:function(g){return arguments.length?(e=g,p(),u.forEach(y),i):e},alpha:function(g){return arguments.length?(s=+g,i):s},alphaMin:function(g){return arguments.length?(r=+g,i):r},alphaDecay:function(g){return arguments.length?(o=+g,i):+o},alphaTarget:function(g){return arguments.length?(a=+g,i):a},velocityDecay:function(g){return arguments.length?(l=1-g,i):1-l},randomSource:function(g){return arguments.length?(f=g,u.forEach(y),i):f},force:function(g,x){return arguments.length>1?(x==null?u.delete(g):u.set(g,y(x)),i):u.get(g)},find:function(){var g=Array.prototype.slice.call(arguments),x=g.shift()||0,v=(n>1?g.shift():null)||0,w=(n>2?g.shift():null)||0,_=g.shift()||1/0,T=0,S=e.length,b,P,D,O,A,C;for(_*=_,T=0;T<S;++T)A=e[T],b=x-A.x,P=v-(A.y||0),D=w-(A.z||0),O=b*b+P*P+D*D,O<_&&(C=A,_=O);return C},on:function(g,x){return arguments.length>1?(h.on(g,x),i):h.on(g)}}}function ld(){var e,t,n,i,s,r=xn(-30),o,a=1,l=1/0,u=.81;function c(m){var p,y=e.length,g=(t===1?ia(e,_s):t===2?oa(e,_s,wa):t===3?ua(e,_s,wa,id):null).visitAfter(f);for(s=m,p=0;p<y;++p)n=e[p],g.visit(d)}function h(){if(e){var m,p=e.length,y;for(o=new Array(p),m=0;m<p;++m)y=e[m],o[y.index]=+r(y,m,e)}}function f(m){var p=0,y,g,x=0,v,w,_,T,S=m.length;if(S){for(v=w=_=T=0;T<S;++T)(y=m[T])&&(g=Math.abs(y.value))&&(p+=y.value,x+=g,v+=g*(y.x||0),w+=g*(y.y||0),_+=g*(y.z||0));p*=Math.sqrt(4/S),m.x=v/x,t>1&&(m.y=w/x),t>2&&(m.z=_/x)}else{y=m,y.x=y.data.x,t>1&&(y.y=y.data.y),t>2&&(y.z=y.data.z);do p+=o[y.data.index];while(y=y.next)}m.value=p}function d(m,p,y,g,x){if(!m.value)return!0;var v=[y,g,x][t-1],w=m.x-n.x,_=t>1?m.y-n.y:0,T=t>2?m.z-n.z:0,S=v-p,b=w*w+_*_+T*T;if(S*S/u<b)return b<l&&(w===0&&(w=ee(i),b+=w*w),t>1&&_===0&&(_=ee(i),b+=_*_),t>2&&T===0&&(T=ee(i),b+=T*T),b<a&&(b=Math.sqrt(a*b)),n.vx+=w*m.value*s/b,t>1&&(n.vy+=_*m.value*s/b),t>2&&(n.vz+=T*m.value*s/b)),!0;if(m.length||b>=l)return;(m.data!==n||m.next)&&(w===0&&(w=ee(i),b+=w*w),t>1&&_===0&&(_=ee(i),b+=_*_),t>2&&T===0&&(T=ee(i),b+=T*T),b<a&&(b=Math.sqrt(a*b)));do m.data!==n&&(S=o[m.data.index]*s/b,n.vx+=w*S,t>1&&(n.vy+=_*S),t>2&&(n.vz+=T*S));while(m=m.next)}return c.initialize=function(m,...p){e=m,i=p.find(y=>typeof y=="function")||Math.random,t=p.find(y=>[1,2,3].includes(y))||2,h()},c.strength=function(m){return arguments.length?(r=typeof m=="function"?m:xn(+m),h(),c):r},c.distanceMin=function(m){return arguments.length?(a=m*m,c):Math.sqrt(a)},c.distanceMax=function(m){return arguments.length?(l=m*m,c):Math.sqrt(l)},c.theta=function(m){return arguments.length?(u=m*m,c):Math.sqrt(u)},c}const ud=e=>{const{nodes:t,links:n}=e,i=M.useRef(null);return M.useEffect(()=>{const s=ad(t).numDimensions(3).force("charge",ld().strength(-250).distanceMax(300)).force("link",qf(n).id(r=>r.id).distance(40).strength(.5)).force("cluster",r=>{t.forEach(o=>{const a=ni[o.cluster];if(a){const[l,u,c]=a.center,h=r*.15;o.vx!==void 0&&(o.vx+=(l-(o.x||0))*h),o.vy!==void 0&&(o.vy+=(u-(o.y||0))*h),o.vz!==void 0&&(o.vz+=(c-(o.z||0))*h)}})}).force("center",Kh(0,0,0).strength(.01)).velocityDecay(.4);return i.current=s,()=>{s.stop()}},[t,n]),i},z={graph:{network_node_count:4e3,network_spread:1500,connection_distance:300,grab_distance:300,camera_max_distance:1200,initial_camera_position:[400,0,400],detail_view_distance:60,colors:{grab_line:"#012056",network_node:"#BDC3C7",network_line:"#BDC3C7",click_active:"#E47600",background:"#FFFBF4"},node_geometry:{shape:"polygon",polygon_sides:3}},animation:{bounce:{enabled:!0,boundary_radius:4e3,rebound_factor:-.01,dampening:.99},click:{camera_duration:1.5,camera_ease:"power3.inOut"},highlight:{scale_hover:1.5,scale_selected:1.5,transition_duration:.3}},controls:{enableZoom:!0,enablePan:!1,enableRotate:!0,minPolarAngle:0,maxPolarAngle:3.14159,minAzimuthAngle:"Infinity",maxAzimuthAngle:"Infinity"}},cd=e=>{if(e<3)return"none";const t=[];for(let n=0;n<e;n++){const i=Math.PI*2*n/e-Math.PI/2,s=50+50*Math.cos(i),r=50+50*Math.sin(i);t.push(`${s.toFixed(1)}% ${r.toFixed(1)}%`)}return`polygon(${t.join(", ")})`},Ta=({data:e,onNodeSelect:t,selectedNodeId:n})=>{const{nodes:i,links:s}=e,{camera:r,controls:o,mouse:a,raycaster:l}=Bn.useThree(),u=M.useMemo(()=>i.filter(A=>A.cluster!=="NETWORK"),[i]),c=M.useMemo(()=>i.filter(A=>A.cluster==="NETWORK"),[i]),{staticLinks:h,dynamicLinks:f}=M.useMemo(()=>{const A=[],C=[],I=new Map;i.forEach(V=>I.set(V.id,V.cluster));for(const V of s){let L=typeof V.source=="object"?V.source.id:V.source,N=typeof V.target=="object"?V.target.id:V.target;const F=I.get(L),J=I.get(N);F==="NETWORK"&&J==="NETWORK"?A.push({source:L,target:N}):C.push(V)}return{staticLinks:A,dynamicLinks:C}},[i,s]);ud({nodes:u,links:f.filter(A=>{const C=typeof A.source=="object"?A.source.id:A.source,I=typeof A.target=="object"?A.target.id:A.target;return u.find(V=>V.id===C)&&u.find(V=>V.id===I)})});const d=c.length,m=M.useMemo(()=>{const A=new Float32Array(d*3);return c.forEach((C,I)=>{A[I*3]=C.x||0,A[I*3+1]=C.y||0,A[I*3+2]=C.z||0}),A},[c,d]),p=M.useMemo(()=>{const A=new Float32Array(d*3);for(let C=0;C<d;C++)A[C*3]=(Math.random()-.5)*.5,A[C*3+1]=(Math.random()-.5)*.5,A[C*3+2]=(Math.random()-.5)*.5;return A},[d]),y=M.useMemo(()=>{const A=new Map;c.forEach((I,V)=>A.set(I.id,V));const C=[];return h.forEach(I=>{const V=A.get(I.source),L=A.get(I.target);V!==void 0&&L!==void 0&&C.push(V,L)}),C},[h,c]),g=M.useRef(null),x=M.useRef(null),v=M.useRef(null),w=M.useRef(null),_=M.useMemo(()=>new Xt.Object3D,[]),T=M.useRef(!1),S=M.useRef(0),b=M.useRef(null);M.useEffect(()=>{const A=()=>{T.current=!0},C=()=>{T.current=!1};return window.addEventListener("mousedown",A),window.addEventListener("mouseup",C),()=>{window.removeEventListener("mousedown",A),window.removeEventListener("mouseup",C)}},[]),Bn.useFrame(()=>{if(g.current){l.setFromCamera(a,r);const A=l.ray.origin,C=l.ray.direction,I=new Xt.Vector3().copy(A).add(C.clone().multiplyScalar(800)),V=z.graph.grab_distance*z.graph.grab_distance,L=[];for(let W=0;W<d;W++){let pt=m[W*3],jt=m[W*3+1],rt=m[W*3+2];pt+=p[W*3],jt+=p[W*3+1],rt+=p[W*3+2],pt*pt+jt*jt+rt*rt>4e3*4e3&&(p[W*3]+=pt*-.01*.001,p[W*3+1]+=jt*-.01*.001,p[W*3+2]+=rt*-.01*.001);const bc=pt-I.x,Sc=jt-I.y,Pc=rt-I.z;bc*bc+Sc*Sc+Pc*Pc<V&&(L.push(pt,jt,rt),L.push(I.x,I.y,I.z)),p[W*3]*=.99,p[W*3+1]*=.99,p[W*3+2]*=.99,m[W*3]=pt,m[W*3+1]=jt,m[W*3+2]=rt,_.position.set(pt,jt,rt),_.scale.set(2,2,2),_.updateMatrix(),g.current.setMatrixAt(W,_.matrix)}g.current.instanceMatrix.needsUpdate=!0,v.current&&(v.current.setAttribute("position",new Xt.Float32BufferAttribute(L,3)),v.current.setDrawRange(0,L.length/3));const N=T.current?1:0;S.current+=(N-S.current)*.1;const F=new Xt.Color(z.graph.colors.network_node),J=new Xt.Color(z.graph.colors.click_active),ut=F.clone().lerp(J,S.current);g.current.material&&g.current.material.color.copy(ut),b.current&&b.current.color.copy(ut)}if(x.current){const A=new Float32Array(y.length*3);let C=0;for(let I=0;I<y.length;I+=2){const V=y[I],L=y[I+1];A[C++]=m[V*3],A[C++]=m[V*3+1],A[C++]=m[V*3+2],A[C++]=m[L*3],A[C++]=m[L*3+1],A[C++]=m[L*3+2]}x.current.setAttribute("position",new Xt.Float32BufferAttribute(A,3))}if(w.current){const A=[],C=[];f.forEach(I=>{let V=I.source,L=I.target;typeof V=="object"&&(V=V.id),typeof L=="object"&&(L=L.id);const N=u.find(J=>J.id===V),F=u.find(J=>J.id===L);if(N&&F&&typeof N.x=="number"&&!isNaN(N.x)&&typeof N.y=="number"&&!isNaN(N.y)&&typeof F.x=="number"&&!isNaN(F.x)&&typeof F.y=="number"&&!isNaN(F.y)){const J=typeof N.z=="number"&&!isNaN(N.z)?N.z:0,ut=typeof F.z=="number"&&!isNaN(F.z)?F.z:0;A.push(N.x,N.y,J),A.push(F.x,F.y,ut),C.push(.4,.4,.4),C.push(.4,.4,.4)}}),w.current.setAttribute("position",new Xt.Float32BufferAttribute(A,3)),w.current.setAttribute("color",new Xt.Float32BufferAttribute(C,3)),w.current.attributes.position.needsUpdate=!0,w.current.attributes.color.needsUpdate=!0,w.current.setDrawRange(0,A.length/3)}});const[P,D]=M.useState(null),O=M.useCallback(A=>{if(t(A),A.x!==void 0){const C=new Xt.Vector3(A.x,A.y,A.z),V=r.position.clone().sub(C).normalize(),L=C.clone().add(V.multiplyScalar(qh));vn.to(r.position,{x:L.x,y:L.y,z:L.z,duration:1.5,ease:"power3.inOut"}),o&&vn.to(o.target,{x:C.x,y:C.y,z:C.z,duration:1.5,ease:"power3.inOut"})}},[r,o,t]);return k.jsxs(k.Fragment,{children:[k.jsxs("instancedMesh",{ref:g,args:[void 0,void 0,c.length],children:[k.jsx("sphereGeometry",{args:[1,8,8]}),k.jsx("meshBasicMaterial",{color:"#BDC3C7",transparent:!0,opacity:.8})]}),k.jsxs("lineSegments",{children:[k.jsx("bufferGeometry",{ref:x}),k.jsx("lineBasicMaterial",{ref:b,color:"#BDC3C7",transparent:!0,opacity:.15,depthWrite:!1,linewidth:1})]}),k.jsxs("lineSegments",{children:[k.jsx("bufferGeometry",{ref:v}),k.jsx("lineBasicMaterial",{color:z.graph.colors.grab_line,transparent:!0,opacity:.3,depthWrite:!1,linewidth:1})]}),k.jsxs("lineSegments",{children:[k.jsx("bufferGeometry",{ref:w}),k.jsx("lineBasicMaterial",{color:"#000000",transparent:!0,opacity:.6,depthWrite:!1,linewidth:2,vertexColors:!0})]}),u.map(A=>k.jsx(hd,{node:A,selected:n===A.id,hovered:P===A.id,dimmed:P!==null&&P!==A.id&&!A.connections.includes(P),onClick:()=>O(A),onHover:C=>D(C?A.id:null)},A.id))]})},hd=({node:e,selected:t,hovered:n,dimmed:i,onClick:s,onHover:r})=>{var h,f,d,m;const o=M.useRef(null),a=ni[e.cluster],l=a?a.color:"#6e6e6e";Bn.useFrame(()=>{o.current&&typeof e.x=="number"&&!isNaN(e.x)&&o.current.position.set(e.x,e.y,e.z)});const u=e.size||8,c=n?u*z.animation.highlight.scale_hover:t?u*z.animation.highlight.scale_selected:u;return k.jsx("group",{ref:o,children:k.jsx(Ai.Html,{transform:!0,sprite:!0,zIndexRange:[100,0],style:{pointerEvents:"none"},children:k.jsxs("div",{onClick:p=>{p.stopPropagation(),s()},onPointerOver:()=>r(!0),onPointerOut:()=>r(!1),className:`
|
|
15
|
+
*/var Lo,ue,je,ss,be,Fo,rs,Sh=function(){return typeof window<"u"},Qt={},Se=180/Math.PI,$e=Math.PI/180,Ue=Math.atan2,Ro=1e8,os=/([A-Z])/g,Ph=/(left|right|width|margin|padding|x)/i,Ah=/[\s,\(]\S/,Gt={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},as=function(t,n){return n.set(n.t,n.p,Math.round((n.s+n.c*t)*1e4)/1e4+n.u,n)},Mh=function(t,n){return n.set(n.t,n.p,t===1?n.e:Math.round((n.s+n.c*t)*1e4)/1e4+n.u,n)},Ch=function(t,n){return n.set(n.t,n.p,t?Math.round((n.s+n.c*t)*1e4)/1e4+n.u:n.b,n)},Dh=function(t,n){return n.set(n.t,n.p,t===1?n.e:t?Math.round((n.s+n.c*t)*1e4)/1e4+n.u:n.b,n)},Eh=function(t,n){var i=n.s+n.c*t;n.set(n.t,n.p,~~(i+(i<0?-.5:.5))+n.u,n)},zo=function(t,n){return n.set(n.t,n.p,t?n.e:n.b,n)},Bo=function(t,n){return n.set(n.t,n.p,t!==1?n.b:n.e,n)},kh=function(t,n,i){return t.style[n]=i},Vh=function(t,n,i){return t.style.setProperty(n,i)},Oh=function(t,n,i){return t._gsap[n]=i},Nh=function(t,n,i){return t._gsap.scaleX=t._gsap.scaleY=i},Ih=function(t,n,i,s,r){var o=t._gsap;o.scaleX=o.scaleY=i,o.renderTransform(r,o)},Lh=function(t,n,i,s,r){var o=t._gsap;o[n]=i,o.renderTransform(r,o)},X="transform",bt=X+"Origin",Fh=function e(t,n){var i=this,s=this.target,r=s.style,o=s._gsap;if(t in Qt&&r){if(this.tfm=this.tfm||{},t!=="transform")t=Gt[t]||t,~t.indexOf(",")?t.split(",").forEach(function(a){return i.tfm[a]=Jt(s,a)}):this.tfm[t]=o.x?o[t]:Jt(s,t),t===bt&&(this.tfm.zOrigin=o.zOrigin);else return Gt.transform.split(",").forEach(function(a){return e.call(i,a,n)});if(this.props.indexOf(X)>=0)return;o.svg&&(this.svgo=s.getAttribute("data-svg-origin"),this.props.push(bt,n,"")),t=X}(r||n)&&this.props.push(t,n,r[t])},jo=function(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))},Rh=function(){var t=this.props,n=this.target,i=n.style,s=n._gsap,r,o;for(r=0;r<t.length;r+=3)t[r+1]?t[r+1]===2?n[t[r]](t[r+2]):n[t[r]]=t[r+2]:t[r+2]?i[t[r]]=t[r+2]:i.removeProperty(t[r].substr(0,2)==="--"?t[r]:t[r].replace(os,"-$1").toLowerCase());if(this.tfm){for(o in this.tfm)s[o]=this.tfm[o];s.svg&&(s.renderTransform(),n.setAttribute("data-svg-origin",this.svgo||"")),r=rs(),(!r||!r.isStart)&&!i[X]&&(jo(i),s.zOrigin&&i[bt]&&(i[bt]+=" "+s.zOrigin+"px",s.zOrigin=0,s.renderTransform()),s.uncache=1)}},$o=function(t,n){var i={target:t,props:[],revert:Rh,save:Fh};return t._gsap||Tt.core.getCache(t),n&&t.style&&t.nodeType&&n.split(",").forEach(function(s){return i.save(s)}),i},Uo,ls=function(t,n){var i=ue.createElementNS?ue.createElementNS((n||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):ue.createElement(t);return i&&i.style?i:ue.createElement(t)},kt=function e(t,n,i){var s=getComputedStyle(t);return s[n]||s.getPropertyValue(n.replace(os,"-$1").toLowerCase())||s.getPropertyValue(n)||!i&&e(t,We(n)||n,1)||""},Wo="O,Moz,ms,Ms,Webkit".split(","),We=function(t,n,i){var s=n||be,r=s.style,o=5;if(t in r&&!i)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);o--&&!(Wo[o]+t in r););return o<0?null:(o===3?"ms":o>=0?Wo[o]:"")+t},us=function(){Sh()&&window.document&&(Lo=window,ue=Lo.document,je=ue.documentElement,be=ls("div")||{style:{}},ls("div"),X=We(X),bt=X+"Origin",be.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Uo=!!We("perspective"),rs=Tt.core.reverting,ss=1)},Go=function(t){var n=t.ownerSVGElement,i=ls("svg",n&&n.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),s=t.cloneNode(!0),r;s.style.display="block",i.appendChild(s),je.appendChild(i);try{r=s.getBBox()}catch{}return i.removeChild(s),je.removeChild(i),r},qo=function(t,n){for(var i=n.length;i--;)if(t.hasAttribute(n[i]))return t.getAttribute(n[i])},Ko=function(t){var n,i;try{n=t.getBBox()}catch{n=Go(t),i=1}return n&&(n.width||n.height)||i||(n=Go(t)),n&&!n.width&&!n.x&&!n.y?{x:+qo(t,["x","cx","x1"])||0,y:+qo(t,["y","cy","y1"])||0,width:0,height:0}:n},Yo=function(t){return!!(t.getCTM&&(!t.parentNode||t.ownerSVGElement)&&Ko(t))},ce=function(t,n){if(n){var i=t.style,s;n in Qt&&n!==bt&&(n=X),i.removeProperty?(s=n.substr(0,2),(s==="ms"||n.substr(0,6)==="webkit")&&(n="-"+n),i.removeProperty(s==="--"?n:n.replace(os,"-$1").toLowerCase())):i.removeAttribute(n)}},he=function(t,n,i,s,r,o){var a=new wt(t._pt,n,i,0,1,o?Bo:zo);return t._pt=a,a.b=s,a.e=r,t._props.push(i),a},Xo={deg:1,rad:1,turn:1},zh={grid:1,flex:1},fe=function e(t,n,i,s){var r=parseFloat(i)||0,o=(i+"").trim().substr((r+"").length)||"px",a=be.style,l=Ph.test(n),u=t.tagName.toLowerCase()==="svg",c=(u?"client":"offset")+(l?"Width":"Height"),h=100,f=s==="px",d=s==="%",m,p,y,g;if(s===o||!r||Xo[s]||Xo[o])return r;if(o!=="px"&&!f&&(r=e(t,n,i,"px")),g=t.getCTM&&Yo(t),(d||o==="%")&&(Qt[n]||~n.indexOf("adius")))return m=g?t.getBBox()[l?"width":"height"]:t[c],tt(d?r/m*h:r/100*m);if(a[l?"width":"height"]=h+(f?o:s),p=s!=="rem"&&~n.indexOf("adius")||s==="em"&&t.appendChild&&!u?t:t.parentNode,g&&(p=(t.ownerSVGElement||{}).parentNode),(!p||p===ue||!p.appendChild)&&(p=ue.body),y=p._gsap,y&&d&&y.width&&l&&y.time===Et.time&&!y.uncache)return tt(r/y.width*h);if(d&&(n==="height"||n==="width")){var x=t.style[n];t.style[n]=h+s,m=t[c],x?t.style[n]=x:ce(t,n)}else(d||o==="%")&&!zh[kt(p,"display")]&&(a.position=kt(t,"position")),p===t&&(a.position="static"),p.appendChild(be),m=be[c],p.removeChild(be),a.position="absolute";return l&&d&&(y=_e(p),y.time=Et.time,y.width=p[c]),tt(f?m*r/h:m&&r?h/m*r:0)},Jt=function(t,n,i,s){var r;return ss||us(),n in Gt&&n!=="transform"&&(n=Gt[n],~n.indexOf(",")&&(n=n.split(",")[0])),Qt[n]&&n!=="transform"?(r=yn(t,s),r=n!=="transformOrigin"?r[n]:r.svg?r.origin:ei(kt(t,bt))+" "+r.zOrigin+"px"):(r=t.style[n],(!r||r==="auto"||s||~(r+"").indexOf("calc("))&&(r=ti[n]&&ti[n](t,n,i)||kt(t,n)||Zr(t,n)||(n==="opacity"?1:0))),i&&!~(r+"").trim().indexOf(" ")?fe(t,n,r,i)+i:r},Bh=function(t,n,i,s){if(!i||i==="none"){var r=We(n,t,1),o=r&&kt(t,r,1);o&&o!==i?(n=r,i=o):n==="borderColor"&&(i=kt(t,"borderTopColor"))}var a=new wt(this._pt,t.style,n,0,1,Vo),l=0,u=0,c,h,f,d,m,p,y,g,x,v,w,_;if(a.b=i,a.e=s,i+="",s+="",s.substring(0,6)==="var(--"&&(s=kt(t,s.substring(4,s.indexOf(")")))),s==="auto"&&(p=t.style[n],t.style[n]=s,s=kt(t,n)||s,p?t.style[n]=p:ce(t,n)),c=[i,s],To(c),i=c[0],s=c[1],f=i.match(Ne)||[],_=s.match(Ne)||[],_.length){for(;h=Ne.exec(s);)y=h[0],x=s.substring(l,h.index),m?m=(m+1)%5:(x.substr(-5)==="rgba("||x.substr(-5)==="hsla(")&&(m=1),y!==(p=f[u++]||"")&&(d=parseFloat(p)||0,w=p.substr((d+"").length),y.charAt(1)==="="&&(y=Ie(d,y)+w),g=parseFloat(y),v=y.substr((g+"").length),l=Ne.lastIndex-v.length,v||(v=v||Pt.units[n]||w,l===s.length&&(s+=v,a.e+=v)),w!==v&&(d=fe(t,n,p,v)||0),a._pt={_next:a._pt,p:x||u===1?x:",",s:d,c:g-d,m:m&&m<4||n==="zIndex"?Math.round:0});a.c=l<s.length?s.substring(l,s.length):""}else a.r=n==="display"&&s==="none"?Bo:zo;return Gr.test(s)&&(a.e=0),this._pt=a,a},Ho={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},jh=function(t){var n=t.split(" "),i=n[0],s=n[1]||"50%";return(i==="top"||i==="bottom"||s==="left"||s==="right")&&(t=i,i=s,s=t),n[0]=Ho[i]||i,n[1]=Ho[s]||s,n.join(" ")},$h=function(t,n){if(n.tween&&n.tween._time===n.tween._dur){var i=n.t,s=i.style,r=n.u,o=i._gsap,a,l,u;if(r==="all"||r===!0)s.cssText="",l=1;else for(r=r.split(","),u=r.length;--u>-1;)a=r[u],Qt[a]&&(l=1,a=a==="transformOrigin"?bt:X),ce(i,a);l&&(ce(i,X),o&&(o.svg&&i.removeAttribute("transform"),s.scale=s.rotate=s.translate="none",yn(i,1),o.uncache=1,jo(s)))}},ti={clearProps:function(t,n,i,s,r){if(r.data!=="isFromStart"){var o=t._pt=new wt(t._pt,n,i,0,0,$h);return o.u=s,o.pr=-10,o.tween=r,t._props.push(i),1}}},gn=[1,0,0,1,0,0],Zo={},Qo=function(t){return t==="matrix(1, 0, 0, 1, 0, 0)"||t==="none"||!t},Jo=function(t){var n=kt(t,X);return Qo(n)?gn:n.substr(7).match(Wr).map(tt)},cs=function(t,n){var i=t._gsap||_e(t),s=t.style,r=Jo(t),o,a,l,u;return i.svg&&t.getAttribute("transform")?(l=t.transform.baseVal.consolidate().matrix,r=[l.a,l.b,l.c,l.d,l.e,l.f],r.join(",")==="1,0,0,1,0,0"?gn:r):(r===gn&&!t.offsetParent&&t!==je&&!i.svg&&(l=s.display,s.display="block",o=t.parentNode,(!o||!t.offsetParent&&!t.getBoundingClientRect().width)&&(u=1,a=t.nextElementSibling,je.appendChild(t)),r=Jo(t),l?s.display=l:ce(t,"display"),u&&(a?o.insertBefore(t,a):o?o.appendChild(t):je.removeChild(t))),n&&r.length>6?[r[0],r[1],r[4],r[5],r[12],r[13]]:r)},hs=function(t,n,i,s,r,o){var a=t._gsap,l=r||cs(t,!0),u=a.xOrigin||0,c=a.yOrigin||0,h=a.xOffset||0,f=a.yOffset||0,d=l[0],m=l[1],p=l[2],y=l[3],g=l[4],x=l[5],v=n.split(" "),w=parseFloat(v[0])||0,_=parseFloat(v[1])||0,T,S,b,P;i?l!==gn&&(S=d*y-m*p)&&(b=w*(y/S)+_*(-p/S)+(p*x-y*g)/S,P=w*(-m/S)+_*(d/S)-(d*x-m*g)/S,w=b,_=P):(T=Ko(t),w=T.x+(~v[0].indexOf("%")?w/100*T.width:w),_=T.y+(~(v[1]||v[0]).indexOf("%")?_/100*T.height:_)),s||s!==!1&&a.smooth?(g=w-u,x=_-c,a.xOffset=h+(g*d+x*p)-g,a.yOffset=f+(g*m+x*y)-x):a.xOffset=a.yOffset=0,a.xOrigin=w,a.yOrigin=_,a.smooth=!!s,a.origin=n,a.originIsAbsolute=!!i,t.style[bt]="0px 0px",o&&(he(o,a,"xOrigin",u,w),he(o,a,"yOrigin",c,_),he(o,a,"xOffset",h,a.xOffset),he(o,a,"yOffset",f,a.yOffset)),t.setAttribute("data-svg-origin",w+" "+_)},yn=function(t,n){var i=t._gsap||new Ao(t);if("x"in i&&!n&&!i.uncache)return i;var s=t.style,r=i.scaleX<0,o="px",a="deg",l=getComputedStyle(t),u=kt(t,bt)||"0",c,h,f,d,m,p,y,g,x,v,w,_,T,S,b,P,C,I,O,M,k,L,N,V,F,$,J,Rt,W,jt,rt,dt;return c=h=f=p=y=g=x=v=w=0,d=m=1,i.svg=!!(t.getCTM&&Yo(t)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(s[X]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[X]!=="none"?l[X]:"")),s.scale=s.rotate=s.translate="none"),S=cs(t,i.svg),i.svg&&(i.uncache?(F=t.getBBox(),u=i.xOrigin-F.x+"px "+(i.yOrigin-F.y)+"px",V=""):V=!n&&t.getAttribute("data-svg-origin"),hs(t,V||u,!!V||i.originIsAbsolute,i.smooth!==!1,S)),_=i.xOrigin||0,T=i.yOrigin||0,S!==gn&&(I=S[0],O=S[1],M=S[2],k=S[3],c=L=S[4],h=N=S[5],S.length===6?(d=Math.sqrt(I*I+O*O),m=Math.sqrt(k*k+M*M),p=I||O?Ue(O,I)*Se:0,x=M||k?Ue(M,k)*Se+p:0,x&&(m*=Math.abs(Math.cos(x*$e))),i.svg&&(c-=_-(_*I+T*M),h-=T-(_*O+T*k))):(dt=S[6],jt=S[7],J=S[8],Rt=S[9],W=S[10],rt=S[11],c=S[12],h=S[13],f=S[14],b=Ue(dt,W),y=b*Se,b&&(P=Math.cos(-b),C=Math.sin(-b),V=L*P+J*C,F=N*P+Rt*C,$=dt*P+W*C,J=L*-C+J*P,Rt=N*-C+Rt*P,W=dt*-C+W*P,rt=jt*-C+rt*P,L=V,N=F,dt=$),b=Ue(-M,W),g=b*Se,b&&(P=Math.cos(-b),C=Math.sin(-b),V=I*P-J*C,F=O*P-Rt*C,$=M*P-W*C,rt=k*C+rt*P,I=V,O=F,M=$),b=Ue(O,I),p=b*Se,b&&(P=Math.cos(b),C=Math.sin(b),V=I*P+O*C,F=L*P+N*C,O=O*P-I*C,N=N*P-L*C,I=V,L=F),y&&Math.abs(y)+Math.abs(p)>359.9&&(y=p=0,g=180-g),d=tt(Math.sqrt(I*I+O*O+M*M)),m=tt(Math.sqrt(N*N+dt*dt)),b=Ue(L,N),x=Math.abs(b)>2e-4?b*Se:0,w=rt?1/(rt<0?-rt:rt):0),i.svg&&(V=t.getAttribute("transform"),i.forceCSS=t.setAttribute("transform","")||!Qo(kt(t,X)),V&&t.setAttribute("transform",V))),Math.abs(x)>90&&Math.abs(x)<270&&(r?(d*=-1,x+=p<=0?180:-180,p+=p<=0?180:-180):(m*=-1,x+=x<=0?180:-180)),n=n||i.uncache,i.x=c-((i.xPercent=c&&(!n&&i.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-c)?-50:0)))?t.offsetWidth*i.xPercent/100:0)+o,i.y=h-((i.yPercent=h&&(!n&&i.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-h)?-50:0)))?t.offsetHeight*i.yPercent/100:0)+o,i.z=f+o,i.scaleX=tt(d),i.scaleY=tt(m),i.rotation=tt(p)+a,i.rotationX=tt(y)+a,i.rotationY=tt(g)+a,i.skewX=x+a,i.skewY=v+a,i.transformPerspective=w+o,(i.zOrigin=parseFloat(u.split(" ")[2])||!n&&i.zOrigin||0)&&(s[bt]=ei(u)),i.xOffset=i.yOffset=0,i.force3D=Pt.force3D,i.renderTransform=i.svg?Wh:Uo?ta:Uh,i.uncache=0,i},ei=function(t){return(t=t.split(" "))[0]+" "+t[1]},fs=function(t,n,i){var s=ht(n);return tt(parseFloat(n)+parseFloat(fe(t,"x",i+"px",s)))+s},Uh=function(t,n){n.z="0px",n.rotationY=n.rotationX="0deg",n.force3D=0,ta(t,n)},Pe="0deg",_n="0px",Ae=") ",ta=function(t,n){var i=n||this,s=i.xPercent,r=i.yPercent,o=i.x,a=i.y,l=i.z,u=i.rotation,c=i.rotationY,h=i.rotationX,f=i.skewX,d=i.skewY,m=i.scaleX,p=i.scaleY,y=i.transformPerspective,g=i.force3D,x=i.target,v=i.zOrigin,w="",_=g==="auto"&&t&&t!==1||g===!0;if(v&&(h!==Pe||c!==Pe)){var T=parseFloat(c)*$e,S=Math.sin(T),b=Math.cos(T),P;T=parseFloat(h)*$e,P=Math.cos(T),o=fs(x,o,S*P*-v),a=fs(x,a,-Math.sin(T)*-v),l=fs(x,l,b*P*-v+v)}y!==_n&&(w+="perspective("+y+Ae),(s||r)&&(w+="translate("+s+"%, "+r+"%) "),(_||o!==_n||a!==_n||l!==_n)&&(w+=l!==_n||_?"translate3d("+o+", "+a+", "+l+") ":"translate("+o+", "+a+Ae),u!==Pe&&(w+="rotate("+u+Ae),c!==Pe&&(w+="rotateY("+c+Ae),h!==Pe&&(w+="rotateX("+h+Ae),(f!==Pe||d!==Pe)&&(w+="skew("+f+", "+d+Ae),(m!==1||p!==1)&&(w+="scale("+m+", "+p+Ae),x.style[X]=w||"translate(0, 0)"},Wh=function(t,n){var i=n||this,s=i.xPercent,r=i.yPercent,o=i.x,a=i.y,l=i.rotation,u=i.skewX,c=i.skewY,h=i.scaleX,f=i.scaleY,d=i.target,m=i.xOrigin,p=i.yOrigin,y=i.xOffset,g=i.yOffset,x=i.forceCSS,v=parseFloat(o),w=parseFloat(a),_,T,S,b,P;l=parseFloat(l),u=parseFloat(u),c=parseFloat(c),c&&(c=parseFloat(c),u+=c,l+=c),l||u?(l*=$e,u*=$e,_=Math.cos(l)*h,T=Math.sin(l)*h,S=Math.sin(l-u)*-f,b=Math.cos(l-u)*f,u&&(c*=$e,P=Math.tan(u-c),P=Math.sqrt(1+P*P),S*=P,b*=P,c&&(P=Math.tan(c),P=Math.sqrt(1+P*P),_*=P,T*=P)),_=tt(_),T=tt(T),S=tt(S),b=tt(b)):(_=h,b=f,T=S=0),(v&&!~(o+"").indexOf("px")||w&&!~(a+"").indexOf("px"))&&(v=fe(d,"x",o,"px"),w=fe(d,"y",a,"px")),(m||p||y||g)&&(v=tt(v+m-(m*_+p*S)+y),w=tt(w+p-(m*T+p*b)+g)),(s||r)&&(P=d.getBBox(),v=tt(v+s/100*P.width),w=tt(w+r/100*P.height)),P="matrix("+_+","+T+","+S+","+b+","+v+","+w+")",d.setAttribute("transform",P),x&&(d.style[X]=P)},Gh=function(t,n,i,s,r){var o=360,a=st(r),l=parseFloat(r)*(a&&~r.indexOf("rad")?Se:1),u=l-s,c=s+u+"deg",h,f;return a&&(h=r.split("_")[1],h==="short"&&(u%=o,u!==u%(o/2)&&(u+=u<0?o:-o)),h==="cw"&&u<0?u=(u+o*Ro)%o-~~(u/o)*o:h==="ccw"&&u>0&&(u=(u-o*Ro)%o-~~(u/o)*o)),t._pt=f=new wt(t._pt,n,i,s,u,Mh),f.e=c,f.u="deg",t._props.push(i),f},ea=function(t,n){for(var i in n)t[i]=n[i];return t},qh=function(t,n,i){var s=ea({},i._gsap),r="perspective,force3D,transformOrigin,svgOrigin",o=i.style,a,l,u,c,h,f,d,m;s.svg?(u=i.getAttribute("transform"),i.setAttribute("transform",""),o[X]=n,a=yn(i,1),ce(i,X),i.setAttribute("transform",u)):(u=getComputedStyle(i)[X],o[X]=n,a=yn(i,1),o[X]=u);for(l in Qt)u=s[l],c=a[l],u!==c&&r.indexOf(l)<0&&(d=ht(u),m=ht(c),h=d!==m?fe(i,l,u,m):parseFloat(u),f=parseFloat(c),t._pt=new wt(t._pt,a,l,h,f-h,as),t._pt.u=m||0,t._props.push(l));ea(a,s)};xt("padding,margin,Width,Radius",function(e,t){var n="Top",i="Right",s="Bottom",r="Left",o=(t<3?[n,i,s,r]:[n+r,n+i,s+i,s+r]).map(function(a){return t<2?e+a:"border"+a+e});ti[t>1?"border"+e:e]=function(a,l,u,c,h){var f,d;if(arguments.length<4)return f=o.map(function(m){return Jt(a,m,u)}),d=f.join(" "),d.split(f[0]).length===5?f[0]:d;f=(c+"").split(" "),d={},o.forEach(function(m,p){return d[m]=f[p]=f[p]||f[(p-1)/2|0]}),a.init(l,d,h)}});var na={name:"css",register:us,targetTest:function(t){return t.style&&t.nodeType},init:function(t,n,i,s,r){var o=this._props,a=t.style,l=i.vars.startAt,u,c,h,f,d,m,p,y,g,x,v,w,_,T,S,b,P;ss||us(),this.styles=this.styles||$o(t),b=this.styles.props,this.tween=i;for(p in n)if(p!=="autoRound"&&(c=n[p],!(Mt[p]&&Mo(p,n,i,s,t,r)))){if(d=typeof c,m=ti[p],d==="function"&&(c=c.call(i,s,t,r),d=typeof c),d==="string"&&~c.indexOf("random(")&&(c=cn(c)),m)m(this,t,p,c,i)&&(S=1);else if(p.substr(0,2)==="--")u=(getComputedStyle(t).getPropertyValue(p)+"").trim(),c+="",ae.lastIndex=0,ae.test(u)||(y=ht(u),g=ht(c),g?y!==g&&(u=fe(t,p,u,g)+g):y&&(c+=y)),this.add(a,"setProperty",u,c,s,r,0,0,p),o.push(p),b.push(p,0,a[p]);else if(d!=="undefined"){if(l&&p in l?(u=typeof l[p]=="function"?l[p].call(i,s,t,r):l[p],st(u)&&~u.indexOf("random(")&&(u=cn(u)),ht(u+"")||u==="auto"||(u+=Pt.units[p]||ht(Jt(t,p))||""),(u+"").charAt(1)==="="&&(u=Jt(t,p))):u=Jt(t,p),f=parseFloat(u),x=d==="string"&&c.charAt(1)==="="&&c.substr(0,2),x&&(c=c.substr(2)),h=parseFloat(c),p in Gt&&(p==="autoAlpha"&&(f===1&&Jt(t,"visibility")==="hidden"&&h&&(f=0),b.push("visibility",0,a.visibility),he(this,a,"visibility",f?"inherit":"hidden",h?"inherit":"hidden",!h)),p!=="scale"&&p!=="transform"&&(p=Gt[p],~p.indexOf(",")&&(p=p.split(",")[0]))),v=p in Qt,v){if(this.styles.save(p),P=c,d==="string"&&c.substring(0,6)==="var(--"){if(c=kt(t,c.substring(4,c.indexOf(")"))),c.substring(0,5)==="calc("){var C=t.style.perspective;t.style.perspective=c,c=kt(t,"perspective"),C?t.style.perspective=C:ce(t,"perspective")}h=parseFloat(c)}if(w||(_=t._gsap,_.renderTransform&&!n.parseTransform||yn(t,n.parseTransform),T=n.smoothOrigin!==!1&&_.smooth,w=this._pt=new wt(this._pt,a,X,0,1,_.renderTransform,_,0,-1),w.dep=1),p==="scale")this._pt=new wt(this._pt,_,"scaleY",_.scaleY,(x?Ie(_.scaleY,x+h):h)-_.scaleY||0,as),this._pt.u=0,o.push("scaleY",p),p+="X";else if(p==="transformOrigin"){b.push(bt,0,a[bt]),c=jh(c),_.svg?hs(t,c,0,T,0,this):(g=parseFloat(c.split(" ")[2])||0,g!==_.zOrigin&&he(this,_,"zOrigin",_.zOrigin,g),he(this,a,p,ei(u),ei(c)));continue}else if(p==="svgOrigin"){hs(t,c,1,T,0,this);continue}else if(p in Zo){Gh(this,_,p,f,x?Ie(f,x+c):c);continue}else if(p==="smoothOrigin"){he(this,_,"smooth",_.smooth,c);continue}else if(p==="force3D"){_[p]=c;continue}else if(p==="transform"){qh(this,c,t);continue}}else p in a||(p=We(p)||p);if(v||(h||h===0)&&(f||f===0)&&!Ah.test(c)&&p in a)y=(u+"").substr((f+"").length),h||(h=0),g=ht(c)||(p in Pt.units?Pt.units[p]:y),y!==g&&(f=fe(t,p,u,g)),this._pt=new wt(this._pt,v?_:a,p,f,(x?Ie(f,x+h):h)-f,!v&&(g==="px"||p==="zIndex")&&n.autoRound!==!1?Eh:as),this._pt.u=g||0,v&&P!==c?(this._pt.b=u,this._pt.e=P,this._pt.r=Dh):y!==g&&g!=="%"&&(this._pt.b=u,this._pt.r=Ch);else if(p in a)Bh.call(this,t,p,u,x?x+c:c);else if(p in t)this.add(t,p,u||t[p],x?x+c:c,s,r);else if(p!=="parseTransform"){Ni(p,c);continue}v||(p in a?b.push(p,0,a[p]):typeof t[p]=="function"?b.push(p,2,t[p]()):b.push(p,1,u||t[p])),o.push(p)}}S&&Oo(this)},render:function(t,n){if(n.tween._time||!rs())for(var i=n._pt;i;)i.r(t,i.d),i=i._next;else n.styles.revert()},get:Jt,aliases:Gt,getSetter:function(t,n,i){var s=Gt[n];return s&&s.indexOf(",")<0&&(n=s),n in Qt&&n!==bt&&(t._gsap.x||Jt(t,"x"))?i&&Fo===i?n==="scale"?Nh:Oh:(Fo=i||{})&&(n==="scale"?Ih:Lh):t.style&&!Di(t.style[n])?kh:~n.indexOf("-")?Vh:Ji(t,n)},core:{_removeProperty:ce,_getMatrix:cs}};Tt.utils.checkPrefix=We,Tt.core.getStyleSaver=$o,(function(e,t,n,i){var s=xt(e+","+t+","+n,function(r){Qt[r]=1});xt(t,function(r){Pt.units[r]="deg",Zo[r]=1}),Gt[s[13]]=e+","+t,xt(i,function(r){var o=r.split(":");Gt[o[1]]=s[o[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY"),xt("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(e){Pt.units[e]="px"}),Tt.registerPlugin(na);var vn=Tt.registerPlugin(na)||Tt;vn.core.Tween;var q=(e=>(e.Core="CORE",e.Finance="FINANCE",e.Social="SOCIAL",e.Infrastructure="INFRA",e.Network="NETWORK",e))(q||{});const ni={[q.Core]:{id:q.Core,label:"Core Systems",color:"#2F80ED",center:[0,0,0]},[q.Finance]:{id:q.Finance,label:"DeFi Galaxy",color:"#D0021B",center:[150,50,-50]},[q.Social]:{id:q.Social,label:"Social Mesh",color:"#00A1E4",center:[-120,80,50]},[q.Infrastructure]:{id:q.Infrastructure,label:"Infra Cloud",color:"#9013FE",center:[50,-100,100]},[q.Network]:{id:q.Network,label:"Global Network",color:"#95A5A6",center:[0,0,0]}},Kh=[0,0,400],Yh=40;function Xh(e,t,n){var i,s=1;e==null&&(e=0),t==null&&(t=0),n==null&&(n=0);function r(){var o,a=i.length,l,u=0,c=0,h=0;for(o=0;o<a;++o)l=i[o],u+=l.x||0,c+=l.y||0,h+=l.z||0;for(u=(u/a-e)*s,c=(c/a-t)*s,h=(h/a-n)*s,o=0;o<a;++o)l=i[o],u&&(l.x-=u),c&&(l.y-=c),h&&(l.z-=h)}return r.initialize=function(o){i=o},r.x=function(o){return arguments.length?(e=+o,r):e},r.y=function(o){return arguments.length?(t=+o,r):t},r.z=function(o){return arguments.length?(n=+o,r):n},r.strength=function(o){return arguments.length?(s=+o,r):s},r}function Hh(e){const t=+this._x.call(null,e);return ia(this.cover(t),t,e)}function ia(e,t,n){if(isNaN(t))return e;var i,s=e._root,r={data:n},o=e._x0,a=e._x1,l,u,c,h,f;if(!s)return e._root=r,e;for(;s.length;)if((c=t>=(l=(o+a)/2))?o=l:a=l,i=s,!(s=s[h=+c]))return i[h]=r,e;if(u=+e._x.call(null,s.data),t===u)return r.next=s,i?i[h]=r:e._root=r,e;do i=i?i[h]=new Array(2):e._root=new Array(2),(c=t>=(l=(o+a)/2))?o=l:a=l;while((h=+c)==(f=+(u>=l)));return i[f]=s,i[h]=r,e}function Zh(e){Array.isArray(e)||(e=Array.from(e));const t=e.length,n=new Float64Array(t);let i=1/0,s=-1/0;for(let r=0,o;r<t;++r)isNaN(o=+this._x.call(null,e[r]))||(n[r]=o,o<i&&(i=o),o>s&&(s=o));if(i>s)return this;this.cover(i).cover(s);for(let r=0;r<t;++r)ia(this,n[r],e[r]);return this}function Qh(e){if(isNaN(e=+e))return this;var t=this._x0,n=this._x1;if(isNaN(t))n=(t=Math.floor(e))+1;else{for(var i=n-t||1,s=this._root,r,o;t>e||e>=n;)switch(o=+(e<t),r=new Array(2),r[o]=s,s=r,i*=2,o){case 0:n=t+i;break;case 1:t=n-i;break}this._root&&this._root.length&&(this._root=s)}return this._x0=t,this._x1=n,this}function Jh(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function tf(e){return arguments.length?this.cover(+e[0][0]).cover(+e[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function te(e,t,n){this.node=e,this.x0=t,this.x1=n}function ef(e,t){var n,i=this._x0,s,r,o=this._x1,a=[],l=this._root,u,c;for(l&&a.push(new te(l,i,o)),t==null?t=1/0:(i=e-t,o=e+t);u=a.pop();)if(!(!(l=u.node)||(s=u.x0)>o||(r=u.x1)<i))if(l.length){var h=(s+r)/2;a.push(new te(l[1],h,r),new te(l[0],s,h)),(c=+(e>=h))&&(u=a[a.length-1],a[a.length-1]=a[a.length-1-c],a[a.length-1-c]=u)}else{var f=Math.abs(e-+this._x.call(null,l.data));f<t&&(t=f,i=e-f,o=e+f,n=l.data)}return n}function nf(e){if(isNaN(l=+this._x.call(null,e)))return this;var t,n=this._root,i,s,r,o=this._x0,a=this._x1,l,u,c,h,f;if(!n)return this;if(n.length)for(;;){if((c=l>=(u=(o+a)/2))?o=u:a=u,t=n,!(n=n[h=+c]))return this;if(!n.length)break;t[h+1&1]&&(i=t,f=h)}for(;n.data!==e;)if(s=n,!(n=n.next))return this;return(r=n.next)&&delete n.next,s?(r?s.next=r:delete s.next,this):t?(r?t[h]=r:delete t[h],(n=t[0]||t[1])&&n===(t[1]||t[0])&&!n.length&&(i?i[f]=n:this._root=n),this):(this._root=r,this)}function sf(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function rf(){return this._root}function of(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function af(e){var t=[],n,i=this._root,s,r,o;for(i&&t.push(new te(i,this._x0,this._x1));n=t.pop();)if(!e(i=n.node,r=n.x0,o=n.x1)&&i.length){var a=(r+o)/2;(s=i[1])&&t.push(new te(s,a,o)),(s=i[0])&&t.push(new te(s,r,a))}return this}function lf(e){var t=[],n=[],i;for(this._root&&t.push(new te(this._root,this._x0,this._x1));i=t.pop();){var s=i.node;if(s.length){var r,o=i.x0,a=i.x1,l=(o+a)/2;(r=s[0])&&t.push(new te(r,o,l)),(r=s[1])&&t.push(new te(r,l,a))}n.push(i)}for(;i=n.pop();)e(i.node,i.x0,i.x1);return this}function uf(e){return e[0]}function cf(e){return arguments.length?(this._x=e,this):this._x}function sa(e,t){var n=new ds(t??uf,NaN,NaN);return e==null?n:n.addAll(e)}function ds(e,t,n){this._x=e,this._x0=t,this._x1=n,this._root=void 0}function ra(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var St=sa.prototype=ds.prototype;St.copy=function(){var e=new ds(this._x,this._x0,this._x1),t=this._root,n,i;if(!t)return e;if(!t.length)return e._root=ra(t),e;for(n=[{source:t,target:e._root=new Array(2)}];t=n.pop();)for(var s=0;s<2;++s)(i=t.source[s])&&(i.length?n.push({source:i,target:t.target[s]=new Array(2)}):t.target[s]=ra(i));return e},St.add=Hh,St.addAll=Zh,St.cover=Qh,St.data=Jh,St.extent=tf,St.find=ef,St.remove=nf,St.removeAll=sf,St.root=rf,St.size=of,St.visit=af,St.visitAfter=lf,St.x=cf;function hf(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return oa(this.cover(t,n),t,n,e)}function oa(e,t,n,i){if(isNaN(t)||isNaN(n))return e;var s,r=e._root,o={data:i},a=e._x0,l=e._y0,u=e._x1,c=e._y1,h,f,d,m,p,y,g,x;if(!r)return e._root=o,e;for(;r.length;)if((p=t>=(h=(a+u)/2))?a=h:u=h,(y=n>=(f=(l+c)/2))?l=f:c=f,s=r,!(r=r[g=y<<1|p]))return s[g]=o,e;if(d=+e._x.call(null,r.data),m=+e._y.call(null,r.data),t===d&&n===m)return o.next=r,s?s[g]=o:e._root=o,e;do s=s?s[g]=new Array(4):e._root=new Array(4),(p=t>=(h=(a+u)/2))?a=h:u=h,(y=n>=(f=(l+c)/2))?l=f:c=f;while((g=y<<1|p)===(x=(m>=f)<<1|d>=h));return s[x]=r,s[g]=o,e}function ff(e){var t,n,i=e.length,s,r,o=new Array(i),a=new Array(i),l=1/0,u=1/0,c=-1/0,h=-1/0;for(n=0;n<i;++n)isNaN(s=+this._x.call(null,t=e[n]))||isNaN(r=+this._y.call(null,t))||(o[n]=s,a[n]=r,s<l&&(l=s),s>c&&(c=s),r<u&&(u=r),r>h&&(h=r));if(l>c||u>h)return this;for(this.cover(l,u).cover(c,h),n=0;n<i;++n)oa(this,o[n],a[n],e[n]);return this}function df(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,i=this._y0,s=this._x1,r=this._y1;if(isNaN(n))s=(n=Math.floor(e))+1,r=(i=Math.floor(t))+1;else{for(var o=s-n||1,a=this._root,l,u;n>e||e>=s||i>t||t>=r;)switch(u=(t<i)<<1|e<n,l=new Array(4),l[u]=a,a=l,o*=2,u){case 0:s=n+o,r=i+o;break;case 1:n=s-o,r=i+o;break;case 2:s=n+o,i=r-o;break;case 3:n=s-o,i=r-o;break}this._root&&this._root.length&&(this._root=a)}return this._x0=n,this._y0=i,this._x1=s,this._y1=r,this}function pf(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function mf(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function mt(e,t,n,i,s){this.node=e,this.x0=t,this.y0=n,this.x1=i,this.y1=s}function gf(e,t,n){var i,s=this._x0,r=this._y0,o,a,l,u,c=this._x1,h=this._y1,f=[],d=this._root,m,p;for(d&&f.push(new mt(d,s,r,c,h)),n==null?n=1/0:(s=e-n,r=t-n,c=e+n,h=t+n,n*=n);m=f.pop();)if(!(!(d=m.node)||(o=m.x0)>c||(a=m.y0)>h||(l=m.x1)<s||(u=m.y1)<r))if(d.length){var y=(o+l)/2,g=(a+u)/2;f.push(new mt(d[3],y,g,l,u),new mt(d[2],o,g,y,u),new mt(d[1],y,a,l,g),new mt(d[0],o,a,y,g)),(p=(t>=g)<<1|e>=y)&&(m=f[f.length-1],f[f.length-1]=f[f.length-1-p],f[f.length-1-p]=m)}else{var x=e-+this._x.call(null,d.data),v=t-+this._y.call(null,d.data),w=x*x+v*v;if(w<n){var _=Math.sqrt(n=w);s=e-_,r=t-_,c=e+_,h=t+_,i=d.data}}return i}function yf(e){if(isNaN(c=+this._x.call(null,e))||isNaN(h=+this._y.call(null,e)))return this;var t,n=this._root,i,s,r,o=this._x0,a=this._y0,l=this._x1,u=this._y1,c,h,f,d,m,p,y,g;if(!n)return this;if(n.length)for(;;){if((m=c>=(f=(o+l)/2))?o=f:l=f,(p=h>=(d=(a+u)/2))?a=d:u=d,t=n,!(n=n[y=p<<1|m]))return this;if(!n.length)break;(t[y+1&3]||t[y+2&3]||t[y+3&3])&&(i=t,g=y)}for(;n.data!==e;)if(s=n,!(n=n.next))return this;return(r=n.next)&&delete n.next,s?(r?s.next=r:delete s.next,this):t?(r?t[y]=r:delete t[y],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(i?i[g]=n:this._root=n),this):(this._root=r,this)}function _f(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function vf(){return this._root}function xf(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function wf(e){var t=[],n,i=this._root,s,r,o,a,l;for(i&&t.push(new mt(i,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(i=n.node,r=n.x0,o=n.y0,a=n.x1,l=n.y1)&&i.length){var u=(r+a)/2,c=(o+l)/2;(s=i[3])&&t.push(new mt(s,u,c,a,l)),(s=i[2])&&t.push(new mt(s,r,c,u,l)),(s=i[1])&&t.push(new mt(s,u,o,a,c)),(s=i[0])&&t.push(new mt(s,r,o,u,c))}return this}function Tf(e){var t=[],n=[],i;for(this._root&&t.push(new mt(this._root,this._x0,this._y0,this._x1,this._y1));i=t.pop();){var s=i.node;if(s.length){var r,o=i.x0,a=i.y0,l=i.x1,u=i.y1,c=(o+l)/2,h=(a+u)/2;(r=s[0])&&t.push(new mt(r,o,a,c,h)),(r=s[1])&&t.push(new mt(r,c,a,l,h)),(r=s[2])&&t.push(new mt(r,o,h,c,u)),(r=s[3])&&t.push(new mt(r,c,h,l,u))}n.push(i)}for(;i=n.pop();)e(i.node,i.x0,i.y0,i.x1,i.y1);return this}function bf(e){return e[0]}function Sf(e){return arguments.length?(this._x=e,this):this._x}function Pf(e){return e[1]}function Af(e){return arguments.length?(this._y=e,this):this._y}function aa(e,t,n){var i=new ps(t??bf,n??Pf,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function ps(e,t,n,i,s,r){this._x=e,this._y=t,this._x0=n,this._y0=i,this._x1=s,this._y1=r,this._root=void 0}function la(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var gt=aa.prototype=ps.prototype;gt.copy=function(){var e=new ps(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,i;if(!t)return e;if(!t.length)return e._root=la(t),e;for(n=[{source:t,target:e._root=new Array(4)}];t=n.pop();)for(var s=0;s<4;++s)(i=t.source[s])&&(i.length?n.push({source:i,target:t.target[s]=new Array(4)}):t.target[s]=la(i));return e},gt.add=hf,gt.addAll=ff,gt.cover=df,gt.data=pf,gt.extent=mf,gt.find=gf,gt.remove=yf,gt.removeAll=_f,gt.root=vf,gt.size=xf,gt.visit=wf,gt.visitAfter=Tf,gt.x=Sf,gt.y=Af;function Mf(e){const t=+this._x.call(null,e),n=+this._y.call(null,e),i=+this._z.call(null,e);return ua(this.cover(t,n,i),t,n,i,e)}function ua(e,t,n,i,s){if(isNaN(t)||isNaN(n)||isNaN(i))return e;var r,o=e._root,a={data:s},l=e._x0,u=e._y0,c=e._z0,h=e._x1,f=e._y1,d=e._z1,m,p,y,g,x,v,w,_,T,S,b;if(!o)return e._root=a,e;for(;o.length;)if((w=t>=(m=(l+h)/2))?l=m:h=m,(_=n>=(p=(u+f)/2))?u=p:f=p,(T=i>=(y=(c+d)/2))?c=y:d=y,r=o,!(o=o[S=T<<2|_<<1|w]))return r[S]=a,e;if(g=+e._x.call(null,o.data),x=+e._y.call(null,o.data),v=+e._z.call(null,o.data),t===g&&n===x&&i===v)return a.next=o,r?r[S]=a:e._root=a,e;do r=r?r[S]=new Array(8):e._root=new Array(8),(w=t>=(m=(l+h)/2))?l=m:h=m,(_=n>=(p=(u+f)/2))?u=p:f=p,(T=i>=(y=(c+d)/2))?c=y:d=y;while((S=T<<2|_<<1|w)===(b=(v>=y)<<2|(x>=p)<<1|g>=m));return r[b]=o,r[S]=a,e}function Cf(e){Array.isArray(e)||(e=Array.from(e));const t=e.length,n=new Float64Array(t),i=new Float64Array(t),s=new Float64Array(t);let r=1/0,o=1/0,a=1/0,l=-1/0,u=-1/0,c=-1/0;for(let h=0,f,d,m,p;h<t;++h)isNaN(d=+this._x.call(null,f=e[h]))||isNaN(m=+this._y.call(null,f))||isNaN(p=+this._z.call(null,f))||(n[h]=d,i[h]=m,s[h]=p,d<r&&(r=d),d>l&&(l=d),m<o&&(o=m),m>u&&(u=m),p<a&&(a=p),p>c&&(c=p));if(r>l||o>u||a>c)return this;this.cover(r,o,a).cover(l,u,c);for(let h=0;h<t;++h)ua(this,n[h],i[h],s[h],e[h]);return this}function Df(e,t,n){if(isNaN(e=+e)||isNaN(t=+t)||isNaN(n=+n))return this;var i=this._x0,s=this._y0,r=this._z0,o=this._x1,a=this._y1,l=this._z1;if(isNaN(i))o=(i=Math.floor(e))+1,a=(s=Math.floor(t))+1,l=(r=Math.floor(n))+1;else{for(var u=o-i||1,c=this._root,h,f;i>e||e>=o||s>t||t>=a||r>n||n>=l;)switch(f=(n<r)<<2|(t<s)<<1|e<i,h=new Array(8),h[f]=c,c=h,u*=2,f){case 0:o=i+u,a=s+u,l=r+u;break;case 1:i=o-u,a=s+u,l=r+u;break;case 2:o=i+u,s=a-u,l=r+u;break;case 3:i=o-u,s=a-u,l=r+u;break;case 4:o=i+u,a=s+u,r=l-u;break;case 5:i=o-u,a=s+u,r=l-u;break;case 6:o=i+u,s=a-u,r=l-u;break;case 7:i=o-u,s=a-u,r=l-u;break}this._root&&this._root.length&&(this._root=c)}return this._x0=i,this._y0=s,this._z0=r,this._x1=o,this._y1=a,this._z1=l,this}function Ef(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function kf(e){return arguments.length?this.cover(+e[0][0],+e[0][1],+e[0][2]).cover(+e[1][0],+e[1][1],+e[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]}function j(e,t,n,i,s,r,o){this.node=e,this.x0=t,this.y0=n,this.z0=i,this.x1=s,this.y1=r,this.z1=o}function Vf(e,t,n,i){var s,r=this._x0,o=this._y0,a=this._z0,l,u,c,h,f,d,m=this._x1,p=this._y1,y=this._z1,g=[],x=this._root,v,w;for(x&&g.push(new j(x,r,o,a,m,p,y)),i==null?i=1/0:(r=e-i,o=t-i,a=n-i,m=e+i,p=t+i,y=n+i,i*=i);v=g.pop();)if(!(!(x=v.node)||(l=v.x0)>m||(u=v.y0)>p||(c=v.z0)>y||(h=v.x1)<r||(f=v.y1)<o||(d=v.z1)<a))if(x.length){var _=(l+h)/2,T=(u+f)/2,S=(c+d)/2;g.push(new j(x[7],_,T,S,h,f,d),new j(x[6],l,T,S,_,f,d),new j(x[5],_,u,S,h,T,d),new j(x[4],l,u,S,_,T,d),new j(x[3],_,T,c,h,f,S),new j(x[2],l,T,c,_,f,S),new j(x[1],_,u,c,h,T,S),new j(x[0],l,u,c,_,T,S)),(w=(n>=S)<<2|(t>=T)<<1|e>=_)&&(v=g[g.length-1],g[g.length-1]=g[g.length-1-w],g[g.length-1-w]=v)}else{var b=e-+this._x.call(null,x.data),P=t-+this._y.call(null,x.data),C=n-+this._z.call(null,x.data),I=b*b+P*P+C*C;if(I<i){var O=Math.sqrt(i=I);r=e-O,o=t-O,a=n-O,m=e+O,p=t+O,y=n+O,s=x.data}}return s}const Of=(e,t,n,i,s,r)=>Math.sqrt((e-i)**2+(t-s)**2+(n-r)**2);function Nf(e,t,n,i){const s=[],r=e-i,o=t-i,a=n-i,l=e+i,u=t+i,c=n+i;return this.visit((h,f,d,m,p,y,g)=>{if(!h.length)do{const x=h.data;Of(e,t,n,this._x(x),this._y(x),this._z(x))<=i&&s.push(x)}while(h=h.next);return f>l||d>u||m>c||p<r||y<o||g<a}),s}function If(e){if(isNaN(f=+this._x.call(null,e))||isNaN(d=+this._y.call(null,e))||isNaN(m=+this._z.call(null,e)))return this;var t,n=this._root,i,s,r,o=this._x0,a=this._y0,l=this._z0,u=this._x1,c=this._y1,h=this._z1,f,d,m,p,y,g,x,v,w,_,T;if(!n)return this;if(n.length)for(;;){if((x=f>=(p=(o+u)/2))?o=p:u=p,(v=d>=(y=(a+c)/2))?a=y:c=y,(w=m>=(g=(l+h)/2))?l=g:h=g,t=n,!(n=n[_=w<<2|v<<1|x]))return this;if(!n.length)break;(t[_+1&7]||t[_+2&7]||t[_+3&7]||t[_+4&7]||t[_+5&7]||t[_+6&7]||t[_+7&7])&&(i=t,T=_)}for(;n.data!==e;)if(s=n,!(n=n.next))return this;return(r=n.next)&&delete n.next,s?(r?s.next=r:delete s.next,this):t?(r?t[_]=r:delete t[_],(n=t[0]||t[1]||t[2]||t[3]||t[4]||t[5]||t[6]||t[7])&&n===(t[7]||t[6]||t[5]||t[4]||t[3]||t[2]||t[1]||t[0])&&!n.length&&(i?i[T]=n:this._root=n),this):(this._root=r,this)}function Lf(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function Ff(){return this._root}function Rf(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function zf(e){var t=[],n,i=this._root,s,r,o,a,l,u,c;for(i&&t.push(new j(i,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));n=t.pop();)if(!e(i=n.node,r=n.x0,o=n.y0,a=n.z0,l=n.x1,u=n.y1,c=n.z1)&&i.length){var h=(r+l)/2,f=(o+u)/2,d=(a+c)/2;(s=i[7])&&t.push(new j(s,h,f,d,l,u,c)),(s=i[6])&&t.push(new j(s,r,f,d,h,u,c)),(s=i[5])&&t.push(new j(s,h,o,d,l,f,c)),(s=i[4])&&t.push(new j(s,r,o,d,h,f,c)),(s=i[3])&&t.push(new j(s,h,f,a,l,u,d)),(s=i[2])&&t.push(new j(s,r,f,a,h,u,d)),(s=i[1])&&t.push(new j(s,h,o,a,l,f,d)),(s=i[0])&&t.push(new j(s,r,o,a,h,f,d))}return this}function Bf(e){var t=[],n=[],i;for(this._root&&t.push(new j(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));i=t.pop();){var s=i.node;if(s.length){var r,o=i.x0,a=i.y0,l=i.z0,u=i.x1,c=i.y1,h=i.z1,f=(o+u)/2,d=(a+c)/2,m=(l+h)/2;(r=s[0])&&t.push(new j(r,o,a,l,f,d,m)),(r=s[1])&&t.push(new j(r,f,a,l,u,d,m)),(r=s[2])&&t.push(new j(r,o,d,l,f,c,m)),(r=s[3])&&t.push(new j(r,f,d,l,u,c,m)),(r=s[4])&&t.push(new j(r,o,a,m,f,d,h)),(r=s[5])&&t.push(new j(r,f,a,m,u,d,h)),(r=s[6])&&t.push(new j(r,o,d,m,f,c,h)),(r=s[7])&&t.push(new j(r,f,d,m,u,c,h))}n.push(i)}for(;i=n.pop();)e(i.node,i.x0,i.y0,i.z0,i.x1,i.y1,i.z1);return this}function jf(e){return e[0]}function $f(e){return arguments.length?(this._x=e,this):this._x}function Uf(e){return e[1]}function Wf(e){return arguments.length?(this._y=e,this):this._y}function Gf(e){return e[2]}function qf(e){return arguments.length?(this._z=e,this):this._z}function ca(e,t,n,i){var s=new ms(t??jf,n??Uf,i??Gf,NaN,NaN,NaN,NaN,NaN,NaN);return e==null?s:s.addAll(e)}function ms(e,t,n,i,s,r,o,a,l){this._x=e,this._y=t,this._z=n,this._x0=i,this._y0=s,this._z0=r,this._x1=o,this._y1=a,this._z1=l,this._root=void 0}function ha(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var at=ca.prototype=ms.prototype;at.copy=function(){var e=new ms(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),t=this._root,n,i;if(!t)return e;if(!t.length)return e._root=ha(t),e;for(n=[{source:t,target:e._root=new Array(8)}];t=n.pop();)for(var s=0;s<8;++s)(i=t.source[s])&&(i.length?n.push({source:i,target:t.target[s]=new Array(8)}):t.target[s]=ha(i));return e},at.add=Mf,at.addAll=Cf,at.cover=Df,at.data=Ef,at.extent=kf,at.find=Vf,at.findAllWithinRadius=Nf,at.remove=If,at.removeAll=Lf,at.root=Ff,at.size=Rf,at.visit=zf,at.visitAfter=Bf,at.x=$f,at.y=Wf,at.z=qf;function xn(e){return function(){return e}}function ee(e){return(e()-.5)*1e-6}function Kf(e){return e.index}function fa(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function Yf(e){var t=Kf,n=f,i,s=xn(30),r,o,a,l,u,c,h=1;e==null&&(e=[]);function f(g){return 1/Math.min(l[g.source.index],l[g.target.index])}function d(g){for(var x=0,v=e.length;x<h;++x)for(var w=0,_,T,S,b=0,P=0,C=0,I,O;w<v;++w)_=e[w],T=_.source,S=_.target,b=S.x+S.vx-T.x-T.vx||ee(c),a>1&&(P=S.y+S.vy-T.y-T.vy||ee(c)),a>2&&(C=S.z+S.vz-T.z-T.vz||ee(c)),I=Math.sqrt(b*b+P*P+C*C),I=(I-r[w])/I*g*i[w],b*=I,P*=I,C*=I,S.vx-=b*(O=u[w]),a>1&&(S.vy-=P*O),a>2&&(S.vz-=C*O),T.vx+=b*(O=1-O),a>1&&(T.vy+=P*O),a>2&&(T.vz+=C*O)}function m(){if(o){var g,x=o.length,v=e.length,w=new Map(o.map((T,S)=>[t(T,S,o),T])),_;for(g=0,l=new Array(x);g<v;++g)_=e[g],_.index=g,typeof _.source!="object"&&(_.source=fa(w,_.source)),typeof _.target!="object"&&(_.target=fa(w,_.target)),l[_.source.index]=(l[_.source.index]||0)+1,l[_.target.index]=(l[_.target.index]||0)+1;for(g=0,u=new Array(v);g<v;++g)_=e[g],u[g]=l[_.source.index]/(l[_.source.index]+l[_.target.index]);i=new Array(v),p(),r=new Array(v),y()}}function p(){if(o)for(var g=0,x=e.length;g<x;++g)i[g]=+n(e[g],g,e)}function y(){if(o)for(var g=0,x=e.length;g<x;++g)r[g]=+s(e[g],g,e)}return d.initialize=function(g,...x){o=g,c=x.find(v=>typeof v=="function")||Math.random,a=x.find(v=>[1,2,3].includes(v))||2,m()},d.links=function(g){return arguments.length?(e=g,m(),d):e},d.id=function(g){return arguments.length?(t=g,d):t},d.iterations=function(g){return arguments.length?(h=+g,d):h},d.strength=function(g){return arguments.length?(n=typeof g=="function"?g:xn(+g),p(),d):n},d.distance=function(g){return arguments.length?(s=typeof g=="function"?g:xn(+g),y(),d):s},d}var Xf={value:()=>{}};function da(){for(var e=0,t=arguments.length,n={},i;e<t;++e){if(!(i=arguments[e]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new ii(n)}function ii(e){this._=e}function Hf(e,t){return e.trim().split(/^|\s+/).map(function(n){var i="",s=n.indexOf(".");if(s>=0&&(i=n.slice(s+1),n=n.slice(0,s)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}ii.prototype=da.prototype={constructor:ii,on:function(e,t){var n=this._,i=Hf(e+"",n),s,r=-1,o=i.length;if(arguments.length<2){for(;++r<o;)if((s=(e=i[r]).type)&&(s=Zf(n[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++r<o;)if(s=(e=i[r]).type)n[s]=pa(n[s],e.name,t);else if(t==null)for(s in n)n[s]=pa(n[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new ii(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var n=new Array(s),i=0,s,r;i<s;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(r=this._[e],i=0,s=r.length;i<s;++i)r[i].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],s=0,r=i.length;s<r;++s)i[s].value.apply(t,n)}};function Zf(e,t){for(var n=0,i=e.length,s;n<i;++n)if((s=e[n]).name===t)return s.value}function pa(e,t,n){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=Xf,e=e.slice(0,i).concat(e.slice(i+1));break}return n!=null&&e.push({name:t,value:n}),e}var Ge=0,wn=0,Tn=0,ma=1e3,si,bn,ri=0,Me=0,oi=0,Sn=typeof performance=="object"&&performance.now?performance:Date,ga=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function ya(){return Me||(ga(Qf),Me=Sn.now()+oi)}function Qf(){Me=0}function gs(){this._call=this._time=this._next=null}gs.prototype=_a.prototype={constructor:gs,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?ya():+n)+(t==null?0:+t),!this._next&&bn!==this&&(bn?bn._next=this:si=this,bn=this),this._call=e,this._time=n,ys()},stop:function(){this._call&&(this._call=null,this._time=1/0,ys())}};function _a(e,t,n){var i=new gs;return i.restart(e,t,n),i}function Jf(){ya(),++Ge;for(var e=si,t;e;)(t=Me-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ge}function va(){Me=(ri=Sn.now())+oi,Ge=wn=0;try{Jf()}finally{Ge=0,ed(),Me=0}}function td(){var e=Sn.now(),t=e-ri;t>ma&&(oi-=t,ri=e)}function ed(){for(var e,t=si,n,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:si=n);bn=e,ys(i)}function ys(e){if(!Ge){wn&&(wn=clearTimeout(wn));var t=e-Me;t>24?(e<1/0&&(wn=setTimeout(va,e-Sn.now()-oi)),Tn&&(Tn=clearInterval(Tn))):(Tn||(ri=Sn.now(),Tn=setInterval(td,ma)),Ge=1,ga(va))}}const nd=1664525,id=1013904223,xa=4294967296;function sd(){let e=1;return()=>(e=(nd*e+id)%xa)/xa}var wa=3;function _s(e){return e.x}function Ta(e){return e.y}function rd(e){return e.z}var od=10,ad=Math.PI*(3-Math.sqrt(5)),ld=Math.PI*20/(9+Math.sqrt(221));function ud(e,t){t=t||2;var n=Math.min(wa,Math.max(1,Math.round(t))),i,s=1,r=.001,o=1-Math.pow(r,1/300),a=0,l=.6,u=new Map,c=_a(d),h=da("tick","end"),f=sd();e==null&&(e=[]);function d(){m(),h.call("tick",i),s<r&&(c.stop(),h.call("end",i))}function m(g){var x,v=e.length,w;g===void 0&&(g=1);for(var _=0;_<g;++_)for(s+=(a-s)*o,u.forEach(function(T){T(s)}),x=0;x<v;++x)w=e[x],w.fx==null?w.x+=w.vx*=l:(w.x=w.fx,w.vx=0),n>1&&(w.fy==null?w.y+=w.vy*=l:(w.y=w.fy,w.vy=0)),n>2&&(w.fz==null?w.z+=w.vz*=l:(w.z=w.fz,w.vz=0));return i}function p(){for(var g=0,x=e.length,v;g<x;++g){if(v=e[g],v.index=g,v.fx!=null&&(v.x=v.fx),v.fy!=null&&(v.y=v.fy),v.fz!=null&&(v.z=v.fz),isNaN(v.x)||n>1&&isNaN(v.y)||n>2&&isNaN(v.z)){var w=od*(n>2?Math.cbrt(.5+g):n>1?Math.sqrt(.5+g):g),_=g*ad,T=g*ld;n===1?v.x=w:n===2?(v.x=w*Math.cos(_),v.y=w*Math.sin(_)):(v.x=w*Math.sin(_)*Math.cos(T),v.y=w*Math.cos(_),v.z=w*Math.sin(_)*Math.sin(T))}(isNaN(v.vx)||n>1&&isNaN(v.vy)||n>2&&isNaN(v.vz))&&(v.vx=0,n>1&&(v.vy=0),n>2&&(v.vz=0))}}function y(g){return g.initialize&&g.initialize(e,f,n),g}return p(),i={tick:m,restart:function(){return c.restart(d),i},stop:function(){return c.stop(),i},numDimensions:function(g){return arguments.length?(n=Math.min(wa,Math.max(1,Math.round(g))),u.forEach(y),i):n},nodes:function(g){return arguments.length?(e=g,p(),u.forEach(y),i):e},alpha:function(g){return arguments.length?(s=+g,i):s},alphaMin:function(g){return arguments.length?(r=+g,i):r},alphaDecay:function(g){return arguments.length?(o=+g,i):+o},alphaTarget:function(g){return arguments.length?(a=+g,i):a},velocityDecay:function(g){return arguments.length?(l=1-g,i):1-l},randomSource:function(g){return arguments.length?(f=g,u.forEach(y),i):f},force:function(g,x){return arguments.length>1?(x==null?u.delete(g):u.set(g,y(x)),i):u.get(g)},find:function(){var g=Array.prototype.slice.call(arguments),x=g.shift()||0,v=(n>1?g.shift():null)||0,w=(n>2?g.shift():null)||0,_=g.shift()||1/0,T=0,S=e.length,b,P,C,I,O,M;for(_*=_,T=0;T<S;++T)O=e[T],b=x-O.x,P=v-(O.y||0),C=w-(O.z||0),I=b*b+P*P+C*C,I<_&&(M=O,_=I);return M},on:function(g,x){return arguments.length>1?(h.on(g,x),i):h.on(g)}}}function cd(){var e,t,n,i,s,r=xn(-30),o,a=1,l=1/0,u=.81;function c(m){var p,y=e.length,g=(t===1?sa(e,_s):t===2?aa(e,_s,Ta):t===3?ca(e,_s,Ta,rd):null).visitAfter(f);for(s=m,p=0;p<y;++p)n=e[p],g.visit(d)}function h(){if(e){var m,p=e.length,y;for(o=new Array(p),m=0;m<p;++m)y=e[m],o[y.index]=+r(y,m,e)}}function f(m){var p=0,y,g,x=0,v,w,_,T,S=m.length;if(S){for(v=w=_=T=0;T<S;++T)(y=m[T])&&(g=Math.abs(y.value))&&(p+=y.value,x+=g,v+=g*(y.x||0),w+=g*(y.y||0),_+=g*(y.z||0));p*=Math.sqrt(4/S),m.x=v/x,t>1&&(m.y=w/x),t>2&&(m.z=_/x)}else{y=m,y.x=y.data.x,t>1&&(y.y=y.data.y),t>2&&(y.z=y.data.z);do p+=o[y.data.index];while(y=y.next)}m.value=p}function d(m,p,y,g,x){if(!m.value)return!0;var v=[y,g,x][t-1],w=m.x-n.x,_=t>1?m.y-n.y:0,T=t>2?m.z-n.z:0,S=v-p,b=w*w+_*_+T*T;if(S*S/u<b)return b<l&&(w===0&&(w=ee(i),b+=w*w),t>1&&_===0&&(_=ee(i),b+=_*_),t>2&&T===0&&(T=ee(i),b+=T*T),b<a&&(b=Math.sqrt(a*b)),n.vx+=w*m.value*s/b,t>1&&(n.vy+=_*m.value*s/b),t>2&&(n.vz+=T*m.value*s/b)),!0;if(m.length||b>=l)return;(m.data!==n||m.next)&&(w===0&&(w=ee(i),b+=w*w),t>1&&_===0&&(_=ee(i),b+=_*_),t>2&&T===0&&(T=ee(i),b+=T*T),b<a&&(b=Math.sqrt(a*b)));do m.data!==n&&(S=o[m.data.index]*s/b,n.vx+=w*S,t>1&&(n.vy+=_*S),t>2&&(n.vz+=T*S));while(m=m.next)}return c.initialize=function(m,...p){e=m,i=p.find(y=>typeof y=="function")||Math.random,t=p.find(y=>[1,2,3].includes(y))||2,h()},c.strength=function(m){return arguments.length?(r=typeof m=="function"?m:xn(+m),h(),c):r},c.distanceMin=function(m){return arguments.length?(a=m*m,c):Math.sqrt(a)},c.distanceMax=function(m){return arguments.length?(l=m*m,c):Math.sqrt(l)},c.theta=function(m){return arguments.length?(u=m*m,c):Math.sqrt(u)},c}const hd=(e,t)=>{const{nodes:n,links:i}=e,s=A.useRef(null);return A.useEffect(()=>{const r=ud(n).numDimensions(3).force("charge",cd().strength(-250).distanceMax(300)).force("link",Yf(i).id(o=>o.id).distance(40).strength(.5)).force("cluster",o=>{n.forEach(a=>{const l=ni[a.cluster];if(l){const[u,c,h]=l.center,f=o*.15;a.vx!==void 0&&(a.vx+=(u-(a.x||0))*f),a.vy!==void 0&&(a.vy+=(c-(a.y||0))*f),a.vz!==void 0&&(a.vz+=(h-(a.z||0))*f)}})}).force("center",Xh(0,0,0).strength(.01)).velocityDecay(.4);return s.current=r,()=>{r.stop()}},[n,i]),s},fd=e=>{if(e<3)return"none";const t=[];for(let n=0;n<e;n++){const i=Math.PI*2*n/e-Math.PI/2,s=50+50*Math.cos(i),r=50+50*Math.sin(i);t.push(`${s.toFixed(1)}% ${r.toFixed(1)}%`)}return`polygon(${t.join(", ")})`},ba=({data:e,onNodeSelect:t,selectedNodeId:n,config:i})=>{const{nodes:s,links:r}=e,{camera:o,controls:a,mouse:l,raycaster:u}=Bn.useThree(),c=A.useMemo(()=>s.filter(M=>M.cluster!=="NETWORK"),[s]),h=A.useMemo(()=>s.filter(M=>M.cluster==="NETWORK"),[s]),{staticLinks:f,dynamicLinks:d}=A.useMemo(()=>{const M=[],k=[],L=new Map;s.forEach(N=>L.set(N.id,N.cluster));for(const N of r){let V=typeof N.source=="object"?N.source.id:N.source,F=typeof N.target=="object"?N.target.id:N.target;const $=L.get(V),J=L.get(F);$==="NETWORK"&&J==="NETWORK"?M.push({source:V,target:F}):k.push(N)}return{staticLinks:M,dynamicLinks:k}},[s,r]);hd({nodes:c,links:d.filter(M=>{const k=typeof M.source=="object"?M.source.id:M.source,L=typeof M.target=="object"?M.target.id:M.target;return c.find(N=>N.id===k)&&c.find(N=>N.id===L)})});const m=h.length,p=A.useMemo(()=>{const M=new Float32Array(m*3);return h.forEach((k,L)=>{M[L*3]=k.x||0,M[L*3+1]=k.y||0,M[L*3+2]=k.z||0}),M},[h,m]),y=A.useMemo(()=>{const M=new Float32Array(m*3);for(let k=0;k<m;k++)M[k*3]=(Math.random()-.5)*.5,M[k*3+1]=(Math.random()-.5)*.5,M[k*3+2]=(Math.random()-.5)*.5;return M},[m]),g=A.useMemo(()=>{const M=new Map;h.forEach((L,N)=>M.set(L.id,N));const k=[];return f.forEach(L=>{const N=M.get(L.source),V=M.get(L.target);N!==void 0&&V!==void 0&&k.push(N,V)}),k},[f,h]),x=A.useRef(null),v=A.useRef(null),w=A.useRef(null),_=A.useRef(null),T=A.useMemo(()=>new Xt.Object3D,[]),S=A.useRef(!1),b=A.useRef(0),P=A.useRef(null);A.useEffect(()=>{const M=()=>{S.current=!0},k=()=>{S.current=!1};return window.addEventListener("mousedown",M),window.addEventListener("mouseup",k),()=>{window.removeEventListener("mousedown",M),window.removeEventListener("mouseup",k)}},[]),Bn.useFrame(()=>{if(x.current){u.setFromCamera(l,o);const M=u.ray.origin,k=u.ray.direction,L=new Xt.Vector3().copy(M).add(k.clone().multiplyScalar(800)),N=i.graph.grab_distance*i.graph.grab_distance,V=[];for(let W=0;W<m;W++){let jt=p[W*3],rt=p[W*3+1],dt=p[W*3+2];jt+=y[W*3],rt+=y[W*3+1],dt+=y[W*3+2],jt*jt+rt*rt+dt*dt>4e3*4e3&&(y[W*3]+=jt*-.01*.001,y[W*3+1]+=rt*-.01*.001,y[W*3+2]+=dt*-.01*.001);const Pc=jt-L.x,Ac=rt-L.y,Mc=dt-L.z;Pc*Pc+Ac*Ac+Mc*Mc<N&&(V.push(jt,rt,dt),V.push(L.x,L.y,L.z)),y[W*3]*=.99,y[W*3+1]*=.99,y[W*3+2]*=.99,p[W*3]=jt,p[W*3+1]=rt,p[W*3+2]=dt,T.position.set(jt,rt,dt),T.scale.set(2,2,2),T.updateMatrix(),x.current.setMatrixAt(W,T.matrix)}x.current.instanceMatrix.needsUpdate=!0,w.current&&(w.current.setAttribute("position",new Xt.Float32BufferAttribute(V,3)),w.current.setDrawRange(0,V.length/3));const F=S.current?1:0;b.current+=(F-b.current)*.1;const $=new Xt.Color(i.graph.colors.network_node),J=new Xt.Color(i.graph.colors.click_active),Rt=$.clone().lerp(J,b.current);x.current.material&&x.current.material.color.copy(Rt),P.current&&P.current.color.copy(Rt)}if(v.current){const M=new Float32Array(g.length*3);let k=0;for(let L=0;L<g.length;L+=2){const N=g[L],V=g[L+1];M[k++]=p[N*3],M[k++]=p[N*3+1],M[k++]=p[N*3+2],M[k++]=p[V*3],M[k++]=p[V*3+1],M[k++]=p[V*3+2]}v.current.setAttribute("position",new Xt.Float32BufferAttribute(M,3))}if(_.current){const M=[],k=[];d.forEach(L=>{let N=L.source,V=L.target;typeof N=="object"&&(N=N.id),typeof V=="object"&&(V=V.id);const F=c.find(J=>J.id===N),$=c.find(J=>J.id===V);if(F&&$&&typeof F.x=="number"&&!isNaN(F.x)&&typeof F.y=="number"&&!isNaN(F.y)&&typeof $.x=="number"&&!isNaN($.x)&&typeof $.y=="number"&&!isNaN($.y)){const J=typeof F.z=="number"&&!isNaN(F.z)?F.z:0,Rt=typeof $.z=="number"&&!isNaN($.z)?$.z:0;M.push(F.x,F.y,J),M.push($.x,$.y,Rt),k.push(.4,.4,.4),k.push(.4,.4,.4)}}),_.current.setAttribute("position",new Xt.Float32BufferAttribute(M,3)),_.current.setAttribute("color",new Xt.Float32BufferAttribute(k,3)),_.current.attributes.position.needsUpdate=!0,_.current.attributes.color.needsUpdate=!0,_.current.setDrawRange(0,M.length/3)}});const[C,I]=A.useState(null),O=A.useCallback(M=>{if(t(M),M.x!==void 0){const k=new Xt.Vector3(M.x,M.y,M.z),N=o.position.clone().sub(k).normalize(),V=k.clone().add(N.multiplyScalar(Yh));vn.to(o.position,{x:V.x,y:V.y,z:V.z,duration:1.5,ease:"power3.inOut"}),a&&vn.to(a.target,{x:k.x,y:k.y,z:k.z,duration:1.5,ease:"power3.inOut"})}},[o,a,t]);return E.jsxs(E.Fragment,{children:[E.jsxs("instancedMesh",{ref:x,args:[void 0,void 0,h.length],children:[E.jsx("sphereGeometry",{args:[1,8,8]}),E.jsx("meshBasicMaterial",{color:"#BDC3C7",transparent:!0,opacity:.8})]}),E.jsxs("lineSegments",{children:[E.jsx("bufferGeometry",{ref:v}),E.jsx("lineBasicMaterial",{ref:P,color:"#BDC3C7",transparent:!0,opacity:.15,depthWrite:!1,linewidth:1})]}),E.jsxs("lineSegments",{children:[E.jsx("bufferGeometry",{ref:w}),E.jsx("lineBasicMaterial",{color:i.graph.colors.grab_line,transparent:!0,opacity:.3,depthWrite:!1,linewidth:1})]}),E.jsxs("lineSegments",{children:[E.jsx("bufferGeometry",{ref:_}),E.jsx("lineBasicMaterial",{color:"#000000",transparent:!0,opacity:.6,depthWrite:!1,linewidth:2,vertexColors:!0})]}),c.map(M=>E.jsx(dd,{node:M,selected:n===M.id,hovered:C===M.id,dimmed:C!==null&&C!==M.id&&!M.connections.includes(C),onClick:()=>O(M),onHover:k=>I(k?M.id:null),config:i},M.id))]})},dd=({node:e,selected:t,hovered:n,dimmed:i,onClick:s,onHover:r,config:o})=>{var f,d,m,p;const a=A.useRef(null),l=ni[e.cluster],u=l?l.color:"#6e6e6e";Bn.useFrame(()=>{a.current&&typeof e.x=="number"&&!isNaN(e.x)&&a.current.position.set(e.x,e.y,e.z)});const c=e.size||8,h=n?c*o.animation.highlight.scale_hover:t?c*o.animation.highlight.scale_selected:c;return E.jsx("group",{ref:a,children:E.jsx(Ai.Html,{transform:!0,sprite:!0,zIndexRange:[100,0],style:{pointerEvents:"none"},children:E.jsxs("div",{onClick:y=>{y.stopPropagation(),s()},onPointerOver:()=>r(!0),onPointerOut:()=>r(!1),className:`
|
|
16
16
|
relative flex items-center justify-center
|
|
17
17
|
transition-opacity cursor-pointer pointer-events-auto
|
|
18
18
|
${i?"opacity-30":"opacity-100"}
|
|
19
|
-
`,style:{width:`${
|
|
19
|
+
`,style:{width:`${h}px`,height:`${h}px`,transitionDuration:`${o.animation.highlight.transition_duration}s`},children:[E.jsx("div",{className:"w-full h-full transition-all",style:{transitionDuration:`${o.animation.highlight.transition_duration}s`,backgroundColor:u,borderRadius:((f=o.graph.node_geometry)==null?void 0:f.shape)==="circle"?"50%":"0%",clipPath:((d=o.graph.node_geometry)==null?void 0:d.shape)==="polygon"?fd(o.graph.node_geometry.polygon_sides||6):"none",boxShadow:(n||t)&&((m=o.graph.node_geometry)==null?void 0:m.shape)==="circle"?`0 0 0 4px rgba(0,0,0,0.1), 0 0 10px ${u}`:"none",filter:(n||t)&&((p=o.graph.node_geometry)==null?void 0:p.shape)==="polygon"?`drop-shadow(0 0 4px ${u})`:"none"}}),E.jsx("div",{className:`
|
|
20
20
|
absolute top-full left-1/2 -translate-x-1/2 mt-2
|
|
21
21
|
whitespace-nowrap text-[12px] font-medium tracking-wide text-neutral-800
|
|
22
22
|
px-3 py-1 bg-white/90 rounded shadow-lg
|
|
23
23
|
transition-all duration-200 pointer-events-none z-20
|
|
24
24
|
${n||t?"opacity-100 scale-100":"opacity-0 scale-95"}
|
|
25
|
-
`,children:e.label})]})})})},fd=M.forwardRef(({data:e,onNodeSelect:t=()=>{},selectedNodeId:n=null,children:i,className:s,style:r},o)=>{const a=M.useRef(null),l=M.useRef(null);return M.useImperativeHandle(o,()=>({camera:l.current,flyTo:(u,c=1.5)=>{!l.current||!a.current||vn.to(l.current.position,{x:u[0],y:u[1],z:u[2],duration:c,ease:"power2.inOut",onUpdate:()=>a.current.update()})},lookAt:(u,c=1.5)=>{a.current&&vn.to(a.current.target,{x:u[0],y:u[1],z:u[2],duration:c,ease:"power2.inOut",onUpdate:()=>a.current.update()})}})),k.jsx("div",{className:`w-full h-full bg-transparent ${s||""}`,style:r,children:k.jsxs(Bn.Canvas,{dpr:[1,2],children:[k.jsx(Ai.PerspectiveCamera,{ref:l,makeDefault:!0,position:Gh,fov:60,near:.1,far:2e3}),k.jsx("color",{attach:"background",args:[z.graph.colors.background]}),k.jsx("fog",{attach:"fog",args:[z.graph.colors.background,400,1600]}),k.jsx(Ai.OrbitControls,{ref:a,enablePan:z.controls.enablePan,enableZoom:z.controls.enableZoom,enableRotate:z.controls.enableRotate,maxDistance:z.graph.camera_max_distance,minDistance:z.graph.detail_view_distance,minPolarAngle:z.controls.minPolarAngle,maxPolarAngle:z.controls.maxPolarAngle,minAzimuthAngle:z.controls.minAzimuthAngle==="Infinity"?-1/0:Number(z.controls.minAzimuthAngle),maxAzimuthAngle:z.controls.maxAzimuthAngle==="Infinity"?1/0:Number(z.controls.maxAzimuthAngle),zoomSpeed:.6,panSpeed:.5,rotateSpeed:.5,dampingFactor:.1}),k.jsx("ambientLight",{intensity:.8}),k.jsx("pointLight",{position:[10,10,10],intensity:1}),k.jsx(M.Suspense,{fallback:null,children:k.jsxs("group",{children:[k.jsx(Ta,{data:e,onNodeSelect:t,selectedNodeId:n}),i]})})]})})}),vs=M.createContext({});function xs(e){const t=M.useRef(null);return t.current===null&&(t.current=e()),t.current}const ba=typeof window<"u",Sa=ba?M.useLayoutEffect:M.useEffect,ai=M.createContext(null);function ws(e,t){e.indexOf(t)===-1&&e.push(t)}function Ts(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const qt=(e,t,n)=>n>t?t:n<e?e:n;function bs(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Ke=()=>{},ne=()=>{};typeof process<"u"&&((Tc=process.env)==null?void 0:Tc.NODE_ENV)!=="production"&&(Ke=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(bs(t,n))},ne=(e,t,n)=>{if(!e)throw new Error(bs(t,n))});const ie={},Pa=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Aa(e){return typeof e=="object"&&e!==null}const Ma=e=>/^0[^.\s]+$/u.test(e);function Ss(e){let t;return()=>(t===void 0&&(t=e()),t)}const Lt=e=>e,dd=(e,t)=>n=>t(e(n)),Pn=(...e)=>e.reduce(dd),An=(e,t,n)=>{const i=t-e;return i===0?1:(n-e)/i};class Ps{constructor(){this.subscriptions=[]}add(t){return ws(this.subscriptions,t),()=>Ts(this.subscriptions,t)}notify(t,n,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,i);else for(let r=0;r<s;r++){const o=this.subscriptions[r];o&&o(t,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Kt=e=>e*1e3,Ft=e=>e/1e3;function Ca(e,t){return t?e*(1e3/t):0}const Da=new Set;function As(e,t,n){e||Da.has(t)||(console.warn(bs(t,n)),Da.add(t))}const Ea=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,pd=1e-7,md=12;function gd(e,t,n,i,s){let r,o,a=0;do o=t+(n-t)/2,r=Ea(o,i,s)-e,r>0?n=o:t=o;while(Math.abs(r)>pd&&++a<md);return o}function Mn(e,t,n,i){if(e===t&&n===i)return Lt;const s=r=>gd(r,0,1,e,n);return r=>r===0||r===1?r:Ea(s(r),t,i)}const ka=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Va=e=>t=>1-e(1-t),Oa=Mn(.33,1.53,.69,.99),Ms=Va(Oa),Na=ka(Ms),Ia=e=>(e*=2)<1?.5*Ms(e):.5*(2-Math.pow(2,-10*(e-1))),Cs=e=>1-Math.sin(Math.acos(e)),La=Va(Cs),Fa=ka(Cs),yd=Mn(.42,0,1,1),_d=Mn(0,0,.58,1),Ra=Mn(.42,0,.58,1),vd=e=>Array.isArray(e)&&typeof e[0]!="number",za=e=>Array.isArray(e)&&typeof e[0]=="number",Ba={linear:Lt,easeIn:yd,easeInOut:Ra,easeOut:_d,circIn:Cs,circInOut:Fa,circOut:La,backIn:Ms,backInOut:Na,backOut:Oa,anticipate:Ia},xd=e=>typeof e=="string",ja=e=>{if(za(e)){ne(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,i,s]=e;return Mn(t,n,i,s)}else if(xd(e))return ne(Ba[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Ba[e];return e},li=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function wd(e,t){let n=new Set,i=new Set,s=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){o.has(c)&&(u.schedule(c),e()),c(a)}const u={schedule:(c,h=!1,f=!1)=>{const m=f&&s?n:i;return h&&o.add(c),m.has(c)||m.add(c),c},cancel:c=>{i.delete(c),o.delete(c)},process:c=>{if(a=c,s){r=!0;return}s=!0,[n,i]=[i,n],n.forEach(l),n.clear(),s=!1,r&&(r=!1,u.process(c))}};return u}const Td=40;function $a(e,t){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=li.reduce((v,w)=>(v[w]=wd(r),v),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:h,preRender:f,render:d,postRender:m}=o,p=()=>{const v=ie.useManualTiming?s.timestamp:performance.now();n=!1,ie.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(v-s.timestamp,Td),1)),s.timestamp=v,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),c.process(s),h.process(s),f.process(s),d.process(s),m.process(s),s.isProcessing=!1,n&&t&&(i=!1,e(p))},y=()=>{n=!0,i=!0,s.isProcessing||e(p)};return{schedule:li.reduce((v,w)=>{const _=o[w];return v[w]=(T,S=!1,b=!1)=>(n||y(),_.schedule(T,S,b)),v},{}),cancel:v=>{for(let w=0;w<li.length;w++)o[li[w]].cancel(v)},state:s,steps:o}}const{schedule:U,cancel:de,state:lt,steps:Ds}=$a(typeof requestAnimationFrame<"u"?requestAnimationFrame:Lt,!0);let ui;function bd(){ui=void 0}const _t={now:()=>(ui===void 0&&_t.set(lt.isProcessing||ie.useManualTiming?lt.timestamp:performance.now()),ui),set:e=>{ui=e,queueMicrotask(bd)}},Ua=e=>t=>typeof t=="string"&&t.startsWith(e),Wa=Ua("--"),Sd=Ua("var(--"),Es=e=>Sd(e)?Pd.test(e.split("/*")[0].trim()):!1,Pd=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Ga(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Ye={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Cn={...Ye,transform:e=>qt(0,1,e)},ci={...Ye,default:1},Dn=e=>Math.round(e*1e5)/1e5,ks=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ad(e){return e==null}const Md=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Vs=(e,t)=>n=>!!(typeof n=="string"&&Md.test(n)&&n.startsWith(e)||t&&!Ad(n)&&Object.prototype.hasOwnProperty.call(n,t)),qa=(e,t,n)=>i=>{if(typeof i!="string")return i;const[s,r,o,a]=i.match(ks);return{[e]:parseFloat(s),[t]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Cd=e=>qt(0,255,e),Os={...Ye,transform:e=>Math.round(Cd(e))},De={test:Vs("rgb","red"),parse:qa("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+Os.transform(e)+", "+Os.transform(t)+", "+Os.transform(n)+", "+Dn(Cn.transform(i))+")"};function Dd(e){let t="",n="",i="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,i+=i,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const Ns={test:Vs("#"),parse:Dd,transform:De.transform},En=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),pe=En("deg"),Yt=En("%"),E=En("px"),Ed=En("vh"),kd=En("vw"),Ka={...Yt,parse:e=>Yt.parse(e)/100,transform:e=>Yt.transform(e*100)},Xe={test:Vs("hsl","hue"),parse:qa("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+Yt.transform(Dn(t))+", "+Yt.transform(Dn(n))+", "+Dn(Cn.transform(i))+")"},nt={test:e=>De.test(e)||Ns.test(e)||Xe.test(e),parse:e=>De.test(e)?De.parse(e):Xe.test(e)?Xe.parse(e):Ns.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?De.transform(e):Xe.transform(e),getAnimatableNone:e=>{const t=nt.parse(e);return t.alpha=0,nt.transform(t)}},Vd=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Od(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(ks))==null?void 0:t.length)||0)+(((n=e.match(Vd))==null?void 0:n.length)||0)>0}const Ya="number",Xa="color",Nd="var",Id="var(",Ha="${}",Ld=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function kn(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},s=[];let r=0;const a=t.replace(Ld,l=>(nt.test(l)?(i.color.push(r),s.push(Xa),n.push(nt.parse(l))):l.startsWith(Id)?(i.var.push(r),s.push(Nd),n.push(l)):(i.number.push(r),s.push(Ya),n.push(parseFloat(l))),++r,Ha)).split(Ha);return{values:n,split:a,indexes:i,types:s}}function Za(e){return kn(e).values}function Qa(e){const{split:t,types:n}=kn(e),i=t.length;return s=>{let r="";for(let o=0;o<i;o++)if(r+=t[o],s[o]!==void 0){const a=n[o];a===Ya?r+=Dn(s[o]):a===Xa?r+=nt.transform(s[o]):r+=s[o]}return r}}const Fd=e=>typeof e=="number"?0:nt.test(e)?nt.getAnimatableNone(e):e;function Rd(e){const t=Za(e);return Qa(e)(t.map(Fd))}const me={test:Od,parse:Za,createTransformer:Qa,getAnimatableNone:Rd};function Is(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function zd({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let s=0,r=0,o=0;if(!t)s=r=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=Is(l,a,e+1/3),r=Is(l,a,e),o=Is(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:i}}function hi(e,t){return n=>n>0?t:e}const H=(e,t,n)=>e+(t-e)*n,Ls=(e,t,n)=>{const i=e*e,s=n*(t*t-i)+i;return s<0?0:Math.sqrt(s)},Bd=[Ns,De,Xe],jd=e=>Bd.find(t=>t.test(e));function Ja(e){const t=jd(e);if(Ke(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Xe&&(n=zd(n)),n}const tl=(e,t)=>{const n=Ja(e),i=Ja(t);if(!n||!i)return hi(e,t);const s={...n};return r=>(s.red=Ls(n.red,i.red,r),s.green=Ls(n.green,i.green,r),s.blue=Ls(n.blue,i.blue,r),s.alpha=H(n.alpha,i.alpha,r),De.transform(s))},Fs=new Set(["none","hidden"]);function $d(e,t){return Fs.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Ud(e,t){return n=>H(e,t,n)}function Rs(e){return typeof e=="number"?Ud:typeof e=="string"?Es(e)?hi:nt.test(e)?tl:qd:Array.isArray(e)?el:typeof e=="object"?nt.test(e)?tl:Wd:hi}function el(e,t){const n=[...e],i=n.length,s=e.map((r,o)=>Rs(r)(r,t[o]));return r=>{for(let o=0;o<i;o++)n[o]=s[o](r);return n}}function Wd(e,t){const n={...e,...t},i={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(i[s]=Rs(e[s])(e[s],t[s]));return s=>{for(const r in i)n[r]=i[r](s);return n}}function Gd(e,t){const n=[],i={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const r=t.types[s],o=e.indexes[r][i[r]],a=e.values[o]??0;n[s]=a,i[r]++}return n}const qd=(e,t)=>{const n=me.createTransformer(t),i=kn(e),s=kn(t);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Fs.has(e)&&!s.values.length||Fs.has(t)&&!i.values.length?$d(e,t):Pn(el(Gd(i,s),s.values),n):(Ke(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),hi(e,t))};function nl(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?H(e,t,n):Rs(e)(e,t)}const Kd=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>U.update(t,n),stop:()=>de(t),now:()=>lt.isProcessing?lt.timestamp:_t.now()}},il=(e,t,n=10)=>{let i="";const s=Math.max(Math.round(t/n),2);for(let r=0;r<s;r++)i+=Math.round(e(r/(s-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},fi=2e4;function zs(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t<fi;)t+=n,i=e.next(t);return t>=fi?1/0:t}function Yd(e,t=100,n){const i=n({...e,keyframes:[0,t]}),s=Math.min(zs(i),fi);return{type:"keyframes",ease:r=>i.next(s*r).value/t,duration:Ft(s)}}const Xd=5;function sl(e,t,n){const i=Math.max(t-Xd,0);return Ca(n-e(i),t-i)}const Z={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Bs=.001;function Hd({duration:e=Z.duration,bounce:t=Z.bounce,velocity:n=Z.velocity,mass:i=Z.mass}){let s,r;Ke(e<=Kt(Z.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=qt(Z.minDamping,Z.maxDamping,o),e=qt(Z.minDuration,Z.maxDuration,Ft(e)),o<1?(s=u=>{const c=u*o,h=c*e,f=c-n,d=js(u,o),m=Math.exp(-h);return Bs-f/d*m},r=u=>{const h=u*o*e,f=h*n+n,d=Math.pow(o,2)*Math.pow(u,2)*e,m=Math.exp(-h),p=js(Math.pow(u,2),o);return(-s(u)+Bs>0?-1:1)*((f-d)*m)/p}):(s=u=>{const c=Math.exp(-u*e),h=(u-n)*e+1;return-Bs+c*h},r=u=>{const c=Math.exp(-u*e),h=(n-u)*(e*e);return c*h});const a=5/e,l=Qd(s,r,a);if(e=Kt(e),isNaN(l))return{stiffness:Z.stiffness,damping:Z.damping,duration:e};{const u=Math.pow(l,2)*i;return{stiffness:u,damping:o*2*Math.sqrt(i*u),duration:e}}}const Zd=12;function Qd(e,t,n){let i=n;for(let s=1;s<Zd;s++)i=i-e(i)/t(i);return i}function js(e,t){return e*Math.sqrt(1-t*t)}const Jd=["duration","bounce"],tp=["stiffness","damping","mass"];function rl(e,t){return t.some(n=>e[n]!==void 0)}function ep(e){let t={velocity:Z.velocity,stiffness:Z.stiffness,damping:Z.damping,mass:Z.mass,isResolvedFromDuration:!1,...e};if(!rl(e,tp)&&rl(e,Jd))if(e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),s=i*i,r=2*qt(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:Z.mass,stiffness:s,damping:r}}else{const n=Hd(e);t={...t,...n,mass:Z.mass},t.isResolvedFromDuration=!0}return t}function di(e=Z.visualDuration,t=Z.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:s}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:u,mass:c,duration:h,velocity:f,isResolvedFromDuration:d}=ep({...n,velocity:-Ft(n.velocity||0)}),m=f||0,p=u/(2*Math.sqrt(l*c)),y=o-r,g=Ft(Math.sqrt(l/c)),x=Math.abs(y)<5;i||(i=x?Z.restSpeed.granular:Z.restSpeed.default),s||(s=x?Z.restDelta.granular:Z.restDelta.default);let v;if(p<1){const _=js(g,p);v=T=>{const S=Math.exp(-p*g*T);return o-S*((m+p*g*y)/_*Math.sin(_*T)+y*Math.cos(_*T))}}else if(p===1)v=_=>o-Math.exp(-g*_)*(y+(m+g*y)*_);else{const _=g*Math.sqrt(p*p-1);v=T=>{const S=Math.exp(-p*g*T),b=Math.min(_*T,300);return o-S*((m+p*g*y)*Math.sinh(b)+_*y*Math.cosh(b))/_}}const w={calculatedDuration:d&&h||null,next:_=>{const T=v(_);if(d)a.done=_>=h;else{let S=_===0?m:0;p<1&&(S=_===0?Kt(m):sl(v,_,T));const b=Math.abs(S)<=i,P=Math.abs(o-T)<=s;a.done=b&&P}return a.value=a.done?o:T,a},toString:()=>{const _=Math.min(zs(w),fi),T=il(S=>w.next(_*S).value,_,30);return _+"ms "+T},toTransition:()=>{}};return w}di.applyToOptions=e=>{const t=Yd(e,100,di);return e.ease=t.ease,e.duration=Kt(t.duration),e.type="keyframes",e};function $s({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=e[0],f={done:!1,value:h},d=b=>a!==void 0&&b<a||l!==void 0&&b>l,m=b=>a===void 0?l:l===void 0||Math.abs(a-b)<Math.abs(l-b)?a:l;let p=n*t;const y=h+p,g=o===void 0?y:o(y);g!==y&&(p=g-h);const x=b=>-p*Math.exp(-b/i),v=b=>g+x(b),w=b=>{const P=x(b),D=v(b);f.done=Math.abs(P)<=u,f.value=f.done?g:D};let _,T;const S=b=>{d(f.value)&&(_=b,T=di({keyframes:[f.value,m(f.value)],velocity:sl(v,b,f.value),damping:s,stiffness:r,restDelta:u,restSpeed:c}))};return S(0),{calculatedDuration:null,next:b=>{let P=!1;return!T&&_===void 0&&(P=!0,w(b),S(b)),_!==void 0&&b>=_?T.next(b-_):(!P&&w(b),f)}}}function np(e,t,n){const i=[],s=n||ie.mix||nl,r=e.length-1;for(let o=0;o<r;o++){let a=s(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||Lt:t;a=Pn(l,a)}i.push(a)}return i}function ip(e,t,{clamp:n=!0,ease:i,mixer:s}={}){const r=e.length;if(ne(r===t.length,"Both input and output ranges must be the same length","range-length"),r===1)return()=>t[0];if(r===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[r-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=np(t,i,s),l=a.length,u=c=>{if(o&&c<e[0])return t[0];let h=0;if(l>1)for(;h<e.length-2&&!(c<e[h+1]);h++);const f=An(e[h],e[h+1],c);return a[h](f)};return n?c=>u(qt(e[0],e[r-1],c)):u}function sp(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const s=An(0,t,i);e.push(H(n,1,s))}}function rp(e){const t=[0];return sp(t,e.length-1),t}function op(e,t){return e.map(n=>n*t)}function ap(e,t){return e.map(()=>t||Ra).splice(0,e.length-1)}function He({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const s=vd(i)?i.map(ja):ja(i),r={done:!1,value:t[0]},o=op(n&&n.length===t.length?n:rp(t),e),a=ip(o,t,{ease:Array.isArray(s)?s:ap(t,s)});return{calculatedDuration:e,next:l=>(r.value=a(l),r.done=l>=e,r)}}const lp=e=>e!==null;function Us(e,{repeat:t,repeatType:n="loop"},i,s=1){const r=e.filter(lp),a=s<0||t&&n!=="loop"&&t%2===1?0:r.length-1;return!a||i===void 0?r[a]:i}const up={decay:$s,inertia:$s,tween:He,keyframes:He,spring:di};function ol(e){typeof e.type=="string"&&(e.type=up[e.type])}class Ws{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const cp=e=>e/100;class Gs extends Ws{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var i,s;const{motionValue:n}=this.options;n&&n.updatedAt!==_t.now()&&this.tick(_t.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(i=this.options).onStop)==null||s.call(i))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;ol(t);const{type:n=He,repeat:i=0,repeatDelay:s=0,repeatType:r,velocity:o=0}=t;let{keyframes:a}=t;const l=n||He;process.env.NODE_ENV!=="production"&&l!==He&&ne(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==He&&typeof a[0]!="number"&&(this.mixKeyframes=Pn(cp,nl(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});r==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=zs(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:i,totalDuration:s,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return i.next(0);const{delay:u=0,keyframes:c,repeat:h,repeatType:f,repeatDelay:d,type:m,onUpdate:p,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const g=this.currentTime-u*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?g<0:g>s;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let v=this.currentTime,w=i;if(h){const b=Math.min(this.currentTime,s)/a;let P=Math.floor(b),D=b%1;!D&&b>=1&&(D=1),D===1&&P--,P=Math.min(P,h+1),!!(P%2)&&(f==="reverse"?(D=1-D,d&&(D-=d/a)):f==="mirror"&&(w=o)),v=qt(0,1,D)*a}const _=x?{done:!1,value:c[0]}:w.next(v);r&&(_.value=r(_.value));let{done:T}=_;!x&&l!==null&&(T=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const S=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return S&&m!==$s&&(_.value=Us(c,this.options,y,this.speed)),p&&p(_.value),S&&this.finish(),_}then(t,n){return this.finished.then(t,n)}get duration(){return Ft(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ft(t)}get time(){return Ft(this.currentTime)}set time(t){var n;t=Kt(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(_t.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ft(this.currentTime))}play(){var s,r;if(this.isStopped)return;const{driver:t=Kd,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(r=(s=this.options).onPlay)==null||r.call(s);const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(_t.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function hp(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Ee=e=>e*180/Math.PI,qs=e=>{const t=Ee(Math.atan2(e[1],e[0]));return Ks(t)},fp={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:qs,rotateZ:qs,skewX:e=>Ee(Math.atan(e[1])),skewY:e=>Ee(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Ks=e=>(e=e%360,e<0&&(e+=360),e),al=qs,ll=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ul=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),dp={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ll,scaleY:ul,scale:e=>(ll(e)+ul(e))/2,rotateX:e=>Ks(Ee(Math.atan2(e[6],e[5]))),rotateY:e=>Ks(Ee(Math.atan2(-e[2],e[0]))),rotateZ:al,rotate:al,skewX:e=>Ee(Math.atan(e[4])),skewY:e=>Ee(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ys(e){return e.includes("scale")?1:0}function Xs(e,t){if(!e||e==="none")return Ys(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=dp,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=fp,s=a}if(!s)return Ys(t);const r=i[t],o=s[1].split(",").map(mp);return typeof r=="function"?r(o):o[r]}const pp=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Xs(n,t)};function mp(e){return parseFloat(e.trim())}const Ze=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Qe=new Set(Ze),cl=e=>e===Ye||e===E,gp=new Set(["x","y","z"]),yp=Ze.filter(e=>!gp.has(e));function _p(e){const t=[];return yp.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const ge={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Xs(t,"x"),y:(e,{transform:t})=>Xs(t,"y")};ge.translateX=ge.x,ge.translateY=ge.y;const ke=new Set;let Hs=!1,Zs=!1,Qs=!1;function hl(){if(Zs){const e=Array.from(ke).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const s=_p(i);s.length&&(n.set(i,s),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const s=n.get(i);s&&s.forEach(([r,o])=>{var a;(a=i.getValue(r))==null||a.set(o)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}Zs=!1,Hs=!1,ke.forEach(e=>e.complete(Qs)),ke.clear()}function fl(){ke.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Zs=!0)})}function vp(){Qs=!0,fl(),hl(),Qs=!1}class Js{constructor(t,n,i,s,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=s,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(ke.add(this),Hs||(Hs=!0,U.read(fl),U.resolveKeyframes(hl))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:s}=this;if(t[0]===null){const r=s==null?void 0:s.get(),o=t[t.length-1];if(r!==void 0)t[0]=r;else if(i&&n){const a=i.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),s&&r===void 0&&s.set(t[0])}hp(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ke.delete(this)}cancel(){this.state==="scheduled"&&(ke.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const xp=e=>e.startsWith("--");function wp(e,t,n){xp(t)?e.style.setProperty(t,n):e.style[t]=n}const Tp=Ss(()=>window.ScrollTimeline!==void 0),bp={};function Sp(e,t){const n=Ss(e);return()=>bp[t]??n()}const dl=Sp(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Vn=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,pl={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Vn([0,.65,.55,1]),circOut:Vn([.55,0,1,.45]),backIn:Vn([.31,.01,.66,-.59]),backOut:Vn([.33,1.53,.69,.99])};function ml(e,t){if(e)return typeof e=="function"?dl()?il(e,t):"ease-out":za(e)?Vn(e):Array.isArray(e)?e.map(n=>ml(n,t)||pl.easeOut):pl[e]}function Pp(e,t,n,{delay:i=0,duration:s=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const h=ml(a,s);Array.isArray(h)&&(c.easing=h);const f={delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(c,f)}function gl(e){return typeof e=="function"&&"applyToOptions"in e}function Ap({type:e,...t}){return gl(e)&&dl()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Mp extends Ws{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:i,keyframes:s,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=t,ne(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=Ap(t);this.animation=Pp(n,i,s,u,r),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const c=Us(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):wp(n,i,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,i,s;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((s=(i=this.animation).commitStyles)==null||s.call(i))}get duration(){var n,i;const t=((i=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:i.call(n).duration)||0;return Ft(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ft(t)}get time(){return Ft(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Kt(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var i;return this.allowFlatten&&((i=this.animation.effect)==null||i.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Tp()?(this.animation.timeline=t,Lt):n(this)}}const yl={anticipate:Ia,backInOut:Na,circInOut:Fa};function Cp(e){return e in yl}function Dp(e){typeof e.ease=="string"&&Cp(e.ease)&&(e.ease=yl[e.ease])}const tr=10;class Ep extends Mp{constructor(t){Dp(t),ol(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:s,element:r,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Gs({...o,autoplay:!1}),l=Math.max(tr,_t.now()-this.startTime),u=qt(0,tr,l-tr);n.setWithVelocity(a.sample(Math.max(0,l-u)).value,a.sample(l).value,u),a.stop()}}const _l=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(me.test(e)||e==="0")&&!e.startsWith("url("));function kp(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Vp(e,t,n,i){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const r=e[e.length-1],o=_l(s,t),a=_l(r,t);return Ke(o===a,`You are trying to animate ${t} from "${s}" to "${r}". "${o?r:s}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:kp(e)||(n==="spring"||gl(n))&&i}function er(e){e.duration=0,e.type="keyframes"}const Op=new Set(["opacity","clipPath","filter","transform"]),Np=Ss(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Ip(e){var c;const{motionValue:t,name:n,repeatDelay:i,repeatType:s,damping:r,type:o}=e;if(!(((c=t==null?void 0:t.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return Np()&&n&&Op.has(n)&&(n!=="transform"||!u)&&!l&&!i&&s!=="mirror"&&r!==0&&o!=="inertia"}const Lp=40;class Fp extends Ws{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...h}){var m;super(),this.stop=()=>{var p,y;this._animation&&(this._animation.stop(),(p=this.stopTimeline)==null||p.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=_t.now();const f={autoplay:t,delay:n,type:i,repeat:s,repeatDelay:r,repeatType:o,name:l,motionValue:u,element:c,...h},d=(c==null?void 0:c.KeyframeResolver)||Js;this.keyframeResolver=new d(a,(p,y,g)=>this.onKeyframesResolved(p,y,f,!g),l,u,c),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(t,n,i,s){var y,g;this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=i;this.resolvedAt=_t.now(),Vp(t,r,o,a)||((ie.instantAnimations||!l)&&(c==null||c(Us(t,i,n))),t[0]=t[t.length-1],er(i),i.repeat=0);const f={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Lp?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},d=!u&&Ip(f),m=(g=(y=f.motionValue)==null?void 0:y.owner)==null?void 0:g.current,p=d?new Ep({...f,element:m}):new Gs(f);p.finished.then(()=>{this.notifyFinished()}).catch(Lt),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),vp()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function vl(e,t,n,i=0,s=1){const r=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),o=e.size,a=(o-1)*i;return typeof n=="function"?n(r,o):s===1?r*i:a-r*i}const Rp=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function zp(e){const t=Rp.exec(e);if(!t)return[,];const[,n,i,s]=t;return[`--${n??i}`,s]}const Bp=4;function xl(e,t,n=1){ne(n<=Bp,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,s]=zp(e);if(!i)return;const r=window.getComputedStyle(t).getPropertyValue(i);if(r){const o=r.trim();return Pa(o)?parseFloat(o):o}return Es(s)?xl(s,t,n+1):s}const jp={type:"spring",stiffness:500,damping:25,restSpeed:10},$p=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Up={type:"keyframes",duration:.8},Wp={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Gp=(e,{keyframes:t})=>t.length>2?Up:Qe.has(e)?e.startsWith("scale")?$p(t[1]):jp:Wp,qp=e=>e!==null;function Kp(e,{repeat:t,repeatType:n="loop"},i){const s=e.filter(qp),r=t&&n!=="loop"&&t%2===1?0:s.length-1;return s[r]}function nr(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}function Yp({when:e,delay:t,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const ir=(e,t,n,i={},s,r)=>o=>{const a=nr(i,e)||{},l=a.delay||i.delay||0;let{elapsed:u=0}=i;u=u-Kt(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:r?void 0:s};Yp(a)||Object.assign(c,Gp(e,c)),c.duration&&(c.duration=Kt(c.duration)),c.repeatDelay&&(c.repeatDelay=Kt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(er(c),c.delay===0&&(h=!0)),(ie.instantAnimations||ie.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(h=!0,er(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!r&&t.get()!==void 0){const f=Kp(c.keyframes,a);if(f!==void 0){U.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new Gs(c):new Fp(c)};function wl(e){const t=[{},{}];return e==null||e.values.forEach((n,i)=>{t[0][i]=n.get(),t[1][i]=n.getVelocity()}),t}function sr(e,t,n,i){if(typeof t=="function"){const[s,r]=wl(i);t=t(n!==void 0?n:e.custom,s,r)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,r]=wl(i);t=t(n!==void 0?n:e.custom,s,r)}return t}function Je(e,t,n){const i=e.getProps();return sr(i,t,n!==void 0?n:i.custom,e)}const Tl=new Set(["width","height","top","left","right","bottom",...Ze]),bl=30,Xp=e=>!isNaN(parseFloat(e));class Hp{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{var r;const s=_t.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&((r=this.events.change)==null||r.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=_t.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Xp(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&As(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Ps);const i=this.events[t].add(n);return t==="change"?()=>{i(),U.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=_t.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>bl)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,bl);return Ca(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function tn(e,t){return new Hp(e,t)}const rr=e=>Array.isArray(e);function Zp(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,tn(n))}function Qp(e){return rr(e)?e[e.length-1]||0:e}function Jp(e,t){const n=Je(e,t);let{transitionEnd:i={},transition:s={},...r}=n||{};r={...r,...i};for(const o in r){const a=Qp(r[o]);Zp(e,o,a)}}const dt=e=>!!(e&&e.getVelocity);function tm(e){return!!(dt(e)&&e.add)}function or(e,t){const n=e.getValue("willChange");if(tm(n))return n.add(t);if(!n&&ie.WillChange){const i=new ie.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function ar(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Sl="data-"+ar("framerAppearId");function Pl(e){return e.props[Sl]}function em({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,i}function Al(e,t,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:r=e.getDefaultTransition(),transitionEnd:o,...a}=t;const l=r==null?void 0:r.reduceMotion;i&&(r=i);const u=[],c=s&&e.animationState&&e.animationState.getState()[s];for(const h in a){const f=e.getValue(h,e.latestValues[h]??null),d=a[h];if(d===void 0||c&&em(c,h))continue;const m={delay:n,...nr(r||{},h)},p=f.get();if(p!==void 0&&!f.isAnimating&&!Array.isArray(d)&&d===p&&!m.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const v=Pl(e);if(v){const w=window.MotionHandoffAnimation(v,h,U);w!==null&&(m.startTime=w,y=!0)}}or(e,h);const g=l??e.shouldReduceMotion;f.start(ir(h,f,d,g&&Tl.has(h)?{type:!1}:m,e,y));const x=f.animation;x&&u.push(x)}return o&&Promise.all(u).then(()=>{U.update(()=>{o&&Jp(e,o)})}),u}function lr(e,t,n={}){var l;const i=Je(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const r=i?()=>Promise.all(Al(e,i,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:h,staggerDirection:f}=s;return nm(e,t,u,c,h,f,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[u,c]=a==="beforeChildren"?[r,o]:[o,r];return u().then(()=>c())}else return Promise.all([r(),o(n.delay)])}function nm(e,t,n=0,i=0,s=0,r=1,o){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(lr(l,t,{...o,delay:n+(typeof i=="function"?0:i)+vl(e.variantChildren,l,i,s,r)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function im(e,t,n={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const s=t.map(r=>lr(e,r,n));i=Promise.all(s)}else if(typeof t=="string")i=lr(e,t,n);else{const s=typeof t=="function"?Je(e,t,n.custom):t;i=Promise.all(Al(e,s,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}const sm={test:e=>e==="auto",parse:e=>e},Ml=e=>t=>t.test(e),Cl=[Ye,E,Yt,pe,kd,Ed,sm],Dl=e=>Cl.find(Ml(e));function rm(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Ma(e):!0}const om=new Set(["brightness","contrast","saturate","opacity"]);function am(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(ks)||[];if(!i)return e;const s=n.replace(i,"");let r=om.has(t)?1:0;return i!==n&&(r*=100),t+"("+r+s+")"}const lm=/\b([a-z-]*)\(.*?\)/gu,ur={...me,getAnimatableNone:e=>{const t=e.match(lm);return t?t.map(am).join(" "):e}},El={...Ye,transform:Math.round},cr={borderWidth:E,borderTopWidth:E,borderRightWidth:E,borderBottomWidth:E,borderLeftWidth:E,borderRadius:E,borderTopLeftRadius:E,borderTopRightRadius:E,borderBottomRightRadius:E,borderBottomLeftRadius:E,width:E,maxWidth:E,height:E,maxHeight:E,top:E,right:E,bottom:E,left:E,inset:E,insetBlock:E,insetBlockStart:E,insetBlockEnd:E,insetInline:E,insetInlineStart:E,insetInlineEnd:E,padding:E,paddingTop:E,paddingRight:E,paddingBottom:E,paddingLeft:E,paddingBlock:E,paddingBlockStart:E,paddingBlockEnd:E,paddingInline:E,paddingInlineStart:E,paddingInlineEnd:E,margin:E,marginTop:E,marginRight:E,marginBottom:E,marginLeft:E,marginBlock:E,marginBlockStart:E,marginBlockEnd:E,marginInline:E,marginInlineStart:E,marginInlineEnd:E,fontSize:E,backgroundPositionX:E,backgroundPositionY:E,...{rotate:pe,rotateX:pe,rotateY:pe,rotateZ:pe,scale:ci,scaleX:ci,scaleY:ci,scaleZ:ci,skew:pe,skewX:pe,skewY:pe,distance:E,translateX:E,translateY:E,translateZ:E,x:E,y:E,z:E,perspective:E,transformPerspective:E,opacity:Cn,originX:Ka,originY:Ka,originZ:E},zIndex:El,fillOpacity:Cn,strokeOpacity:Cn,numOctaves:El},um={...cr,color:nt,backgroundColor:nt,outlineColor:nt,fill:nt,stroke:nt,borderColor:nt,borderTopColor:nt,borderRightColor:nt,borderBottomColor:nt,borderLeftColor:nt,filter:ur,WebkitFilter:ur},kl=e=>um[e];function Vl(e,t){let n=kl(e);return n!==ur&&(n=me),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const cm=new Set(["auto","none","0"]);function hm(e,t,n){let i=0,s;for(;i<e.length&&!s;){const r=e[i];typeof r=="string"&&!cm.has(r)&&kn(r).values.length&&(s=e[i]),i++}if(s&&n)for(const r of t)e[r]=Vl(n,s)}class fm extends Js{constructor(t,n,i,s,r){super(t,n,i,s,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let h=t[c];if(typeof h=="string"&&(h=h.trim(),Es(h))){const f=xl(h,n.current);f!==void 0&&(t[c]=f),c===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Tl.has(i)||t.length!==2)return;const[s,r]=t,o=Dl(s),a=Dl(r),l=Ga(s),u=Ga(r);if(l!==u&&ge[i]){this.needsMeasurement=!0;return}if(o!==a)if(cl(o)&&cl(a))for(let c=0;c<t.length;c++){const h=t[c];typeof h=="string"&&(t[c]=parseFloat(h))}else ge[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,i=[];for(let s=0;s<t.length;s++)(t[s]===null||rm(t[s]))&&i.push(s);i.length&&hm(t,i,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ge[i](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(i,s).jump(s,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const r=i.length-1,o=i[r];i[r]=ge[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function dm(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const s=(n==null?void 0:n[e])??i.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(i=>i!=null)}const Ol=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function hr(e){return Aa(e)&&"offsetHeight"in e}const{schedule:fr}=$a(queueMicrotask,!1),zt={x:!1,y:!1};function Nl(){return zt.x||zt.y}function pm(e){return e==="x"||e==="y"?zt[e]?null:(zt[e]=!0,()=>{zt[e]=!1}):zt.x||zt.y?null:(zt.x=zt.y=!0,()=>{zt.x=zt.y=!1})}function Il(e,t){const n=dm(e),i=new AbortController,s={passive:!0,...t,signal:i.signal};return[n,s,()=>i.abort()]}function Ll(e){return!(e.pointerType==="touch"||Nl())}function mm(e,t,n={}){const[i,s,r]=Il(e,n),o=a=>{if(!Ll(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const c=h=>{Ll(h)&&(u(h),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,s)};return i.forEach(a=>{a.addEventListener("pointerenter",o,s)}),r}const Fl=(e,t)=>t?e===t?!0:Fl(e,t.parentElement):!1,dr=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,gm=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ym(e){return gm.has(e.tagName)||e.isContentEditable===!0}const _m=new Set(["INPUT","SELECT","TEXTAREA"]);function vm(e){return _m.has(e.tagName)||e.isContentEditable===!0}const pi=new WeakSet;function Rl(e){return t=>{t.key==="Enter"&&e(t)}}function pr(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const xm=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=Rl(()=>{if(pi.has(n))return;pr(n,"down");const s=Rl(()=>{pr(n,"up")}),r=()=>pr(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",r,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function zl(e){return dr(e)&&!Nl()}function wm(e,t,n={}){const[i,s,r]=Il(e,n),o=a=>{const l=a.currentTarget;if(!zl(a))return;pi.add(l);const u=t(l,a),c=(d,m)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),pi.has(l)&&pi.delete(l),zl(d)&&typeof u=="function"&&u(d,{success:m})},h=d=>{c(d,l===window||l===document||n.useGlobalTarget||Fl(l,d.target))},f=d=>{c(d,!1)};window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",f,s)};return i.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),hr(a)&&(a.addEventListener("focus",u=>xm(u,s)),!ym(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function Bl(e){return Aa(e)&&"ownerSVGElement"in e}function Tm(e){return Bl(e)&&e.tagName==="svg"}const bm=[...Cl,nt,me],Sm=e=>bm.find(Ml(e)),jl=()=>({translate:0,scale:1,origin:0,originPoint:0}),en=()=>({x:jl(),y:jl()}),$l=()=>({min:0,max:0}),it=()=>({x:$l(),y:$l()}),mr={current:null},Ul={current:!1},Pm=typeof window<"u";function Am(){if(Ul.current=!0,!!Pm)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>mr.current=e.matches;e.addEventListener("change",t),t()}else mr.current=!1}const Mm=new WeakMap;function mi(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function On(e){return typeof e=="string"||Array.isArray(e)}const gr=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],yr=["initial",...gr];function gi(e){return mi(e.animate)||yr.some(t=>On(e[t]))}function Wl(e){return!!(gi(e)||e.variants)}function Cm(e,t,n){for(const i in t){const s=t[i],r=n[i];if(dt(s))e.addValue(i,s);else if(dt(r))e.addValue(i,tn(s,{owner:e}));else if(r!==s)if(e.hasValue(i)){const o=e.getValue(i);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(i);e.addValue(i,tn(o!==void 0?o:s,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const Gl=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let yi={};function ql(e){yi=e}function Dm(){return yi}class Em{scrapeMotionValuesFromProps(t,n,i){return{}}constructor({parent:t,props:n,presenceContext:i,reducedMotionConfig:s,skipAnimations:r,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Js,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=_t.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,U.render(this.render,!1,!0))};const{latestValues:u,renderState:c}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=r,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=gi(n),this.isVariantNode=Wl(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const m=f[d];u[d]!==void 0&&dt(m)&&m.set(u[d])}}mount(t){var n;this.current=t,Mm.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((i,s)=>this.bindToMotionValue(s,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Ul.current||Am(),this.shouldReduceMotion=mr.current),process.env.NODE_ENV!=="production"&&As(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),de(this.notifyUpdate),de(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const i=this.features[n];i&&(i.unmount(),i.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const i=Qe.has(t);i&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&U.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),r&&r(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in yi){const n=yi[t];if(!n)continue;const{isEnabled:i,Feature:s}=n;if(!this.features[t]&&s&&i(this.props)&&(this.features[t]=new s(this)),this.features[t]){const r=this.features[t];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):it()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<Gl.length;i++){const s=Gl[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const r="on"+s,o=t[r];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=Cm(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const i=this.values.get(t);n!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return i===void 0&&n!==void 0&&(i=tn(n===null?void 0:n,{owner:this}),this.addValue(t,i)),i}readValue(t,n){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(Pa(i)||Ma(i))?i=parseFloat(i):!Sm(i)&&me.test(n)&&(i=Vl(t,n)),this.setBaseTarget(t,dt(i)?i.get():i)),dt(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var r;const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const o=sr(this.props,n,(r=this.presenceContext)==null?void 0:r.custom);o&&(i=o[t])}if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!dt(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Ps),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){fr.render(this.render)}}class Kl extends Em{constructor(){super(...arguments),this.KeyframeResolver=fm}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const i=t.style;return i?i[n]:void 0}removeValueFromRenderState(t,{vars:n,style:i}){delete n[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;dt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class ye{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Yl({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function km({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Vm(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function _r(e){return e===void 0||e===1}function vr({scale:e,scaleX:t,scaleY:n}){return!_r(e)||!_r(t)||!_r(n)}function Ve(e){return vr(e)||Xl(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Xl(e){return Hl(e.x)||Hl(e.y)}function Hl(e){return e&&e!=="0%"}function _i(e,t,n){const i=e-n,s=t*i;return n+s}function Zl(e,t,n,i,s){return s!==void 0&&(e=_i(e,s,i)),_i(e,n,i)+t}function xr(e,t=0,n=1,i,s){e.min=Zl(e.min,t,n,i,s),e.max=Zl(e.max,t,n,i,s)}function Ql(e,{x:t,y:n}){xr(e.x,t.translate,t.scale,t.originPoint),xr(e.y,n.translate,n.scale,n.originPoint)}const Jl=.999999999999,tu=1.0000000000001;function Om(e,t,n,i=!1){const s=n.length;if(!s)return;t.x=t.y=1;let r,o;for(let a=0;a<s;a++){r=n[a],o=r.projectionDelta;const{visualElement:l}=r.options;l&&l.props.style&&l.props.style.display==="contents"||(i&&r.options.layoutScroll&&r.scroll&&r!==r.root&&sn(e,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Ql(e,o)),i&&Ve(r.latestValues)&&sn(e,r.latestValues))}t.x<tu&&t.x>Jl&&(t.x=1),t.y<tu&&t.y>Jl&&(t.y=1)}function nn(e,t){e.min=e.min+t,e.max=e.max+t}function eu(e,t,n,i,s=.5){const r=H(e.min,e.max,s);xr(e,t,n,r,i)}function sn(e,t){eu(e.x,t.x,t.scaleX,t.scale,t.originX),eu(e.y,t.y,t.scaleY,t.scale,t.originY)}function nu(e,t){return Yl(Vm(e.getBoundingClientRect(),t))}function Nm(e,t,n){const i=nu(e,n),{scroll:s}=t;return s&&(nn(i.x,s.offset.x),nn(i.y,s.offset.y)),i}const Im={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Lm=Ze.length;function Fm(e,t,n){let i="",s=!0;for(let r=0;r<Lm;r++){const o=Ze[r],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(o.startsWith("scale")?1:0);else{const u=parseFloat(a);l=o.startsWith("scale")?u===1:u===0}if(!l||n){const u=Ol(a,cr[o]);if(!l){s=!1;const c=Im[o]||o;i+=`${c}(${u}) `}n&&(t[o]=u)}}return i=i.trim(),n?i=n(t,s?"":i):s&&(i="none"),i}function wr(e,t,n){const{style:i,vars:s,transformOrigin:r}=e;let o=!1,a=!1;for(const l in t){const u=t[l];if(Qe.has(l)){o=!0;continue}else if(Wa(l)){s[l]=u;continue}else{const c=Ol(u,cr[l]);l.startsWith("origin")?(a=!0,r[l]=c):i[l]=c}}if(t.transform||(o||n?i.transform=Fm(t,e.transform,n):i.transform&&(i.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=r;i.transformOrigin=`${l} ${u} ${c}`}}function iu(e,{style:t,vars:n},i,s){const r=e.style;let o;for(o in t)r[o]=t[o];s==null||s.applyProjectionStyles(r,i);for(o in n)r.setProperty(o,n[o])}function su(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Nn={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(E.test(e))e=parseFloat(e);else return e;const n=su(e,t.target.x),i=su(e,t.target.y);return`${n}% ${i}%`}},Rm={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,s=me.parse(e);if(s.length>5)return i;const r=me.createTransformer(e),o=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+o]/=a,s[1+o]/=l;const u=H(a,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=u),typeof s[3+o]=="number"&&(s[3+o]/=u),r(s)}},Tr={borderRadius:{...Nn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Nn,borderTopRightRadius:Nn,borderBottomLeftRadius:Nn,borderBottomRightRadius:Nn,boxShadow:Rm};function ru(e,{layout:t,layoutId:n}){return Qe.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Tr[e]||e==="opacity")}function br(e,t,n){var o;const i=e.style,s=t==null?void 0:t.style,r={};if(!i)return r;for(const a in i)(dt(i[a])||s&&dt(s[a])||ru(a,e)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(r[a]=i[a]);return r}function zm(e){return window.getComputedStyle(e)}class Bm extends Kl{constructor(){super(...arguments),this.type="html",this.renderInstance=iu}readValueFromInstance(t,n){var i;if(Qe.has(n))return(i=this.projection)!=null&&i.isProjecting?Ys(n):pp(t,n);{const s=zm(t),r=(Wa(n)?s.getPropertyValue(n):s[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return nu(t,n)}build(t,n,i){wr(t,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,i){return br(t,n,i)}}const jm={offset:"stroke-dashoffset",array:"stroke-dasharray"},$m={offset:"strokeDashoffset",array:"strokeDasharray"};function Um(e,t,n=1,i=0,s=!0){e.pathLength=1;const r=s?jm:$m;e[r.offset]=`${-i}`,e[r.array]=`${t} ${n}`}const Wm=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function ou(e,{attrX:t,attrY:n,attrScale:i,pathLength:s,pathSpacing:r=1,pathOffset:o=0,...a},l,u,c){if(wr(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:f}=e;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete h.transformBox);for(const d of Wm)h[d]!==void 0&&(f[d]=h[d],delete h[d]);t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),i!==void 0&&(h.scale=i),s!==void 0&&Um(h,s,r,o,!1)}const au=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),lu=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Gm(e,t,n,i){iu(e,t,void 0,i);for(const s in t.attrs)e.setAttribute(au.has(s)?s:ar(s),t.attrs[s])}function uu(e,t,n){const i=br(e,t,n);for(const s in e)if(dt(e[s])||dt(t[s])){const r=Ze.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[r]=e[s]}return i}class qm extends Kl{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=it}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Qe.has(n)){const i=kl(n);return i&&i.default||0}return n=au.has(n)?n:ar(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,i){return uu(t,n,i)}build(t,n,i){ou(t,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,n,i,s){Gm(t,n,i,s)}mount(t){this.isSVGTag=lu(t.tagName),super.mount(t)}}const Km=yr.length;function cu(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?cu(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Km;n++){const i=yr[n],s=e.props[i];(On(s)||s===!1)&&(t[i]=s)}return t}function hu(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}const Ym=[...gr].reverse(),Xm=gr.length;function Hm(e){return t=>Promise.all(t.map(({animation:n,options:i})=>im(e,n,i)))}function Zm(e){let t=Hm(e),n=fu(),i=!0;const s=l=>(u,c)=>{var f;const h=Je(e,c,l==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(h){const{transition:d,transitionEnd:m,...p}=h;u={...u,...p,...m}}return u};function r(l){t=l(e)}function o(l){const{props:u}=e,c=cu(e.parent)||{},h=[],f=new Set;let d={},m=1/0;for(let y=0;y<Xm;y++){const g=Ym[y],x=n[g],v=u[g]!==void 0?u[g]:c[g],w=On(v),_=g===l?x.isActive:null;_===!1&&(m=y);let T=v===c[g]&&v!==u[g]&&w;if(T&&i&&e.manuallyAnimateOnMount&&(T=!1),x.protectedKeys={...d},!x.isActive&&_===null||!v&&!x.prevProp||mi(v)||typeof v=="boolean")continue;const S=Qm(x.prevProp,v);let b=S||g===l&&x.isActive&&!T&&w||y>m&&w,P=!1;const D=Array.isArray(v)?v:[v];let O=D.reduce(s(g),{});_===!1&&(O={});const{prevResolvedValues:A={}}=x,C={...A,...O},I=N=>{b=!0,f.has(N)&&(P=!0,f.delete(N)),x.needsAnimating[N]=!0;const F=e.getValue(N);F&&(F.liveStyle=!1)};for(const N in C){const F=O[N],J=A[N];if(d.hasOwnProperty(N))continue;let ut=!1;rr(F)&&rr(J)?ut=!hu(F,J):ut=F!==J,ut?F!=null?I(N):f.add(N):F!==void 0&&f.has(N)?I(N):x.protectedKeys[N]=!0}x.prevProp=v,x.prevResolvedValues=O,x.isActive&&(d={...d,...O}),i&&e.blockInitialAnimation&&(b=!1);const V=T&&S;b&&(!V||P)&&h.push(...D.map(N=>{const F={type:g};if(typeof N=="string"&&i&&!V&&e.manuallyAnimateOnMount&&e.parent){const{parent:J}=e,ut=Je(J,N);if(J.enteringChildren&&ut){const{delayChildren:W}=ut.transition||{};F.delay=vl(J.enteringChildren,e,W)}}return{animation:N,options:F}}))}if(f.size){const y={};if(typeof u.initial!="boolean"){const g=Je(e,Array.isArray(u.initial)?u.initial[0]:u.initial);g&&g.transition&&(y.transition=g.transition)}f.forEach(g=>{const x=e.getBaseTarget(g),v=e.getValue(g);v&&(v.liveStyle=!0),y[g]=x??null}),h.push({animation:y})}let p=!!h.length;return i&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(p=!1),i=!1,p?t(h):Promise.resolve()}function a(l,u){var h;if(n[l].isActive===u)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(f=>{var d;return(d=f.animationState)==null?void 0:d.setActive(l,u)}),n[l].isActive=u;const c=o(l);for(const f in n)n[f].protectedKeys={};return c}return{animateChanges:o,setActive:a,setAnimateFunction:r,getState:()=>n,reset:()=>{n=fu()}}}function Qm(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!hu(t,e):!1}function Oe(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function fu(){return{animate:Oe(!0),whileInView:Oe(),whileHover:Oe(),whileTap:Oe(),whileDrag:Oe(),whileFocus:Oe(),exit:Oe()}}function du(e,t){e.min=t.min,e.max=t.max}function Bt(e,t){du(e.x,t.x),du(e.y,t.y)}function pu(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const mu=1e-4,Jm=1-mu,tg=1+mu,gu=.01,eg=0-gu,ng=0+gu;function vt(e){return e.max-e.min}function ig(e,t,n){return Math.abs(e-t)<=n}function yu(e,t,n,i=.5){e.origin=i,e.originPoint=H(t.min,t.max,e.origin),e.scale=vt(n)/vt(t),e.translate=H(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Jm&&e.scale<=tg||isNaN(e.scale))&&(e.scale=1),(e.translate>=eg&&e.translate<=ng||isNaN(e.translate))&&(e.translate=0)}function In(e,t,n,i){yu(e.x,t.x,n.x,i?i.originX:void 0),yu(e.y,t.y,n.y,i?i.originY:void 0)}function _u(e,t,n){e.min=n.min+t.min,e.max=e.min+vt(t)}function sg(e,t,n){_u(e.x,t.x,n.x),_u(e.y,t.y,n.y)}function vu(e,t,n){e.min=t.min-n.min,e.max=e.min+vt(t)}function vi(e,t,n){vu(e.x,t.x,n.x),vu(e.y,t.y,n.y)}function xu(e,t,n,i,s){return e-=t,e=_i(e,1/n,i),s!==void 0&&(e=_i(e,1/s,i)),e}function rg(e,t=0,n=1,i=.5,s,r=e,o=e){if(Yt.test(t)&&(t=parseFloat(t),t=H(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=H(r.min,r.max,i);e===r&&(a-=t),e.min=xu(e.min,t,n,a,s),e.max=xu(e.max,t,n,a,s)}function wu(e,t,[n,i,s],r,o){rg(e,t[n],t[i],t[s],t.scale,r,o)}const og=["x","scaleX","originX"],ag=["y","scaleY","originY"];function Tu(e,t,n,i){wu(e.x,t,og,n?n.x:void 0,i?i.x:void 0),wu(e.y,t,ag,n?n.y:void 0,i?i.y:void 0)}function bu(e){return e.translate===0&&e.scale===1}function Su(e){return bu(e.x)&&bu(e.y)}function Pu(e,t){return e.min===t.min&&e.max===t.max}function lg(e,t){return Pu(e.x,t.x)&&Pu(e.y,t.y)}function Au(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Mu(e,t){return Au(e.x,t.x)&&Au(e.y,t.y)}function Cu(e){return vt(e.x)/vt(e.y)}function Du(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Rt(e){return[e("x"),e("y")]}function ug(e,t,n){let i="";const s=e.x.translate/t.x,r=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||r||o)&&(i=`translate3d(${s}px, ${r}px, ${o}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:h,rotateY:f,skewX:d,skewY:m}=n;u&&(i=`perspective(${u}px) ${i}`),c&&(i+=`rotate(${c}deg) `),h&&(i+=`rotateX(${h}deg) `),f&&(i+=`rotateY(${f}deg) `),d&&(i+=`skewX(${d}deg) `),m&&(i+=`skewY(${m}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(i+=`scale(${a}, ${l})`),i||"none"}const Eu=["TopLeft","TopRight","BottomLeft","BottomRight"],cg=Eu.length,ku=e=>typeof e=="string"?parseFloat(e):e,Vu=e=>typeof e=="number"||E.test(e);function hg(e,t,n,i,s,r){s?(e.opacity=H(0,n.opacity??1,fg(i)),e.opacityExit=H(t.opacity??1,0,dg(i))):r&&(e.opacity=H(t.opacity??1,n.opacity??1,i));for(let o=0;o<cg;o++){const a=`border${Eu[o]}Radius`;let l=Ou(t,a),u=Ou(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Vu(l)===Vu(u)?(e[a]=Math.max(H(ku(l),ku(u),i),0),(Yt.test(u)||Yt.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=H(t.rotate||0,n.rotate||0,i))}function Ou(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const fg=Nu(0,.5,La),dg=Nu(.5,.95,Lt);function Nu(e,t,n){return i=>i<e?0:i>t?1:n(An(e,t,i))}function pg(e,t,n){const i=dt(e)?e:tn(e);return i.start(ir("",i,t,n)),i.animation}function Ln(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}const mg=(e,t)=>e.depth-t.depth;class gg{constructor(){this.children=[],this.isDirty=!1}add(t){ws(this.children,t),this.isDirty=!0}remove(t){Ts(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(mg),this.isDirty=!1,this.children.forEach(t)}}function yg(e,t){const n=_t.now(),i=({timestamp:s})=>{const r=s-n;r>=t&&(de(i),e(r-t))};return U.setup(i,!0),()=>de(i)}function xi(e){return dt(e)?e.get():e}class _g{constructor(){this.members=[]}add(t){ws(this.members,t),t.scheduleRender()}remove(t){if(Ts(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let i;for(let s=n;s>=0;s--){const r=this.members[s];if(r.isPresent!==!1){i=r;break}}return i?(this.promote(i),!0):!1}promote(t,n){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender();const s=i.options.layoutDependency,r=t.options.layoutDependency;s!==void 0&&r!==void 0&&s===r||(t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0));const{crossfade:a}=t.options;a===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:i}=t;n.onExitComplete&&n.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const wi={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Sr=["","X","Y","Z"],vg=1e3;let xg=0;function Pr(e,t,n,i){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),i&&(i[e]=0))}function Iu(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Pl(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",U,!(s||r))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&Iu(i)}function Lu({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(o={},a=t==null?void 0:t()){this.id=xg++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(bg),this.nodes.forEach(Mg),this.nodes.forEach(Cg),this.nodes.forEach(Sg)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new gg)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Ps),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Bl(o)&&!Tm(o),this.instance=o;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let c,h=0;const f=()=>this.root.updateBlockedByResize=!1;U.read(()=>{h=window.innerWidth}),e(o,()=>{const d=window.innerWidth;d!==h&&(h=d,this.root.updateBlockedByResize=!0,c&&c(),c=yg(f,250),wi.hasAnimatedSinceResize&&(wi.hasAnimatedSinceResize=!1,this.nodes.forEach(zu)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||Og,{onLayoutAnimationStart:p,onLayoutAnimationComplete:y}=u.getProps(),g=!this.targetLayout||!Mu(this.targetLayout,d),x=!h&&f;if(this.options.layoutRoot||this.resumeFrom||x||h&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...nr(m,"layout"),onPlay:p,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(c,x)}else h||zu(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),de(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Dg),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Iu(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Fu);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Ru);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ag),this.nodes.forEach(wg),this.nodes.forEach(Tg)):this.nodes.forEach(Ru),this.clearAllSnapshots();const a=_t.now();lt.delta=qt(0,1e3/60,a-lt.timestamp),lt.timestamp=a,lt.isProcessing=!0,Ds.update.process(lt),Ds.preRender.process(lt),Ds.render.process(lt),lt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,fr.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Pg),this.sharedNodes.forEach(Eg)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,U.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){U.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!vt(this.snapshot.measuredBox.x)&&!vt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=it(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=i(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Su(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||Ve(this.latestValues)||c)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),Ng(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return it();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(Ig))){const{scroll:c}=this.root;c&&(nn(a.x,c.offset.x),nn(a.y,c.offset.y))}return a}removeElementScroll(o){var l;const a=it();if(Bt(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:h,options:f}=c;c!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&Bt(a,o),nn(a.x,h.offset.x),nn(a.y,h.offset.y))}return a}applyTransform(o,a=!1){const l=it();Bt(l,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&sn(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Ve(c.latestValues)&&sn(l,c.latestValues)}return Ve(this.latestValues)&&sn(l,this.latestValues),l}removeTransform(o){const a=it();Bt(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Ve(u.latestValues))continue;vr(u.latestValues)&&u.updateSnapshot();const c=it(),h=u.measurePageBox();Bt(c,h),Tu(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Ve(this.latestValues)&&Tu(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==lt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var d;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(d=this.parent)!=null&&d.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!this.layout||!(c||h))return;this.resolvedRelativeTargetAt=lt.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=it(),this.targetWithTransforms=it()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),sg(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Bt(this.target,this.layout.layoutBox),Ql(this.target,this.targetDelta)):Bt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||vr(this.parent.latestValues)||Xl(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=it(),this.relativeTargetOrigin=it(),vi(this.relativeTargetOrigin,a,l),Bt(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var m;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===lt.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;Bt(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;Om(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=it());const{target:d}=o;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(pu(this.prevProjectionDelta.x,this.projectionDelta.x),pu(this.prevProjectionDelta.y,this.projectionDelta.y)),In(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!Du(this.projectionDelta.x,this.prevProjectionDelta.x)||!Du(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=en(),this.projectionDelta=en(),this.projectionDeltaWithTransform=en()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=en();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=it(),d=l?l.source:void 0,m=this.layout?this.layout.source:void 0,p=d!==m,y=this.getStack(),g=!y||y.members.length<=1,x=!!(p&&!g&&this.options.crossfade===!0&&!this.path.some(Vg));this.animationProgress=0;let v;this.mixTargetDelta=w=>{const _=w/1e3;Bu(h.x,o.x,_),Bu(h.y,o.y,_),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(vi(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),kg(this.relativeTarget,this.relativeTargetOrigin,f,_),v&&lg(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=it()),Bt(v,this.relativeTarget)),p&&(this.animationValues=c,hg(c,u,this.latestValues,_,x,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(de(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=U.update(()=>{wi.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=tn(0)),this.currentAnimation=pg(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),o.onUpdate&&o.onUpdate(c)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(vg),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&Gu(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||it();const h=vt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const f=vt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}Bt(a,l),sn(a,c),In(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new _g),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Pr("z",o,u,this.animationValues);for(let c=0;c<Sr.length;c++)Pr(`rotate${Sr[c]}`,o,u,this.animationValues),Pr(`skew${Sr[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=xi(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=xi(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Ve(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=ug(this.projectionDeltaWithTransform,this.treeScale,c);l&&(h=l(c,h)),o.transform=h;const{x:f,y:d}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${d.origin*100}% 0`,u.animationValues?o.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const m in Tr){if(c[m]===void 0)continue;const{correct:p,applyTo:y,isCSSVariable:g}=Tr[m],x=h==="none"?c[m]:p(c[m],u);if(y){const v=y.length;for(let w=0;w<v;w++)o[y[w]]=x}else g?this.options.visualElement.renderState.vars[m]=x:o[m]=x}this.options.layoutId&&(o.pointerEvents=u===this?xi(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Fu),this.root.sharedNodes.clear()}}}function wg(e){e.updateLayout()}function Tg(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:s}=e.layout,{animationType:r}=e.options,o=t.source!==e.layout.source;r==="size"?Rt(h=>{const f=o?t.measuredBox[h]:t.layoutBox[h],d=vt(f);f.min=i[h].min,f.max=f.min+d}):Gu(r,t.layoutBox,i)&&Rt(h=>{const f=o?t.measuredBox[h]:t.layoutBox[h],d=vt(i[h]);f.max=f.min+d,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+d)});const a=en();In(a,i,t.layoutBox);const l=en();o?In(l,e.applyTransform(s,!0),t.measuredBox):In(l,i,t.layoutBox);const u=!Su(a);let c=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const m=it();vi(m,t.layoutBox,f.layoutBox);const p=it();vi(p,i,d.layoutBox),Mu(m,p)||(c=!0),h.options.layoutRoot&&(e.relativeTarget=p,e.relativeTargetOrigin=m,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:i,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:i}=e.options;i&&i()}e.options.transition=void 0}function bg(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Sg(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Pg(e){e.clearSnapshot()}function Fu(e){e.clearMeasurements()}function Ru(e){e.isLayoutDirty=!1}function Ag(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function zu(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Mg(e){e.resolveTargetDelta()}function Cg(e){e.calcProjection()}function Dg(e){e.resetSkewAndRotation()}function Eg(e){e.removeLeadSnapshot()}function Bu(e,t,n){e.translate=H(t.translate,0,n),e.scale=H(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ju(e,t,n,i){e.min=H(t.min,n.min,i),e.max=H(t.max,n.max,i)}function kg(e,t,n,i){ju(e.x,t.x,n.x,i),ju(e.y,t.y,n.y,i)}function Vg(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Og={duration:.45,ease:[.4,0,.1,1]},$u=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Uu=$u("applewebkit/")&&!$u("chrome/")?Math.round:Lt;function Wu(e){e.min=Uu(e.min),e.max=Uu(e.max)}function Ng(e){Wu(e.x),Wu(e.y)}function Gu(e,t,n){return e==="position"||e==="preserve-aspect"&&!ig(Cu(t),Cu(n),.2)}function Ig(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Lg=Lu({attachResizeListener:(e,t)=>Ln(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Ar={current:void 0},qu=Lu({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ar.current){const e=new Lg({});e.mount(window),e.setOptions({layoutScroll:!0}),Ar.current=e}return Ar.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Mr=M.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Ku(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Fg(...e){return t=>{let n=!1;const i=e.map(s=>{const r=Ku(s,t);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let s=0;s<i.length;s++){const r=i[s];typeof r=="function"?r():Ku(e[s],null)}}}}function Rg(...e){return jn.useCallback(Fg(...e),e)}class zg extends jn.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const i=n.offsetParent,s=hr(i)&&i.offsetWidth||0,r=hr(i)&&i.offsetHeight||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=s-o.width-o.left,o.bottom=r-o.height-o.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Bg({children:e,isPresent:t,anchorX:n,anchorY:i,root:s}){var h;const r=M.useId(),o=M.useRef(null),a=M.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=M.useContext(Mr),u=((h=e.props)==null?void 0:h.ref)??(e==null?void 0:e.ref),c=Rg(o,u);return M.useInsertionEffect(()=>{const{width:f,height:d,top:m,left:p,right:y,bottom:g}=a.current;if(t||!o.current||!f||!d)return;const x=n==="left"?`left: ${p}`:`right: ${y}`,v=i==="bottom"?`bottom: ${g}`:`top: ${m}`;o.current.dataset.motionPopId=r;const w=document.createElement("style");l&&(w.nonce=l);const _=s??document.head;return _.appendChild(w),w.sheet&&w.sheet.insertRule(`
|
|
25
|
+
`,children:e.label})]})})})},qe={graph:{network_node_count:4e3,network_spread:1500,connection_distance:250,grab_distance:300,camera_max_distance:1200,initial_camera_position:[400,0,400],detail_view_distance:60,colors:{grab_line:"#012056",network_node:"#BDC3C7",network_line:"#BDC3C7",click_active:"#E47600",background:"#FFFBF4"},node_geometry:{shape:"circle",polygon_sides:6}},animation:{bounce:{enabled:!0,boundary_radius:4e3,rebound_factor:-.01,dampening:.99},click:{camera_duration:1.5,camera_ease:"power3.inOut"},highlight:{scale_hover:1.5,scale_selected:1.5,transition_duration:.3}},controls:{enableZoom:!0,enablePan:!1,enableRotate:!0,minPolarAngle:0,maxPolarAngle:3.14159,minAzimuthAngle:"Infinity",maxAzimuthAngle:"Infinity"}},vs=e=>e&&typeof e=="object"&&!Array.isArray(e),Sa=(e,t)=>{const n=Object.assign({},e);return vs(e)&&vs(t)&&Object.keys(t).forEach(i=>{vs(t[i])?i in e?n[i]=Sa(e[i],t[i]):Object.assign(n,{[i]:t[i]}):Object.assign(n,{[i]:t[i]})}),n},pd=A.forwardRef(({data:e,onNodeSelect:t=()=>{},selectedNodeId:n=null,config:i={},children:s,className:r,style:o},a)=>{const l=A.useRef(null),u=A.useRef(null),c=A.useMemo(()=>Sa(qe,i),[i]);return A.useImperativeHandle(a,()=>({camera:u.current,flyTo:(h,f=1.5)=>{!u.current||!l.current||vn.to(u.current.position,{x:h[0],y:h[1],z:h[2],duration:f,ease:"power2.inOut",onUpdate:()=>l.current.update()})},lookAt:(h,f=1.5)=>{l.current&&vn.to(l.current.target,{x:h[0],y:h[1],z:h[2],duration:f,ease:"power2.inOut",onUpdate:()=>l.current.update()})}})),E.jsx("div",{className:`w-full h-full bg-transparent ${r||""}`,style:o,children:E.jsxs(Bn.Canvas,{dpr:[1,2],children:[E.jsx(Ai.PerspectiveCamera,{ref:u,makeDefault:!0,position:Kh,fov:60,near:.1,far:2e3}),E.jsx("color",{attach:"background",args:[c.graph.colors.background]}),E.jsx("fog",{attach:"fog",args:[c.graph.colors.background,400,1600]}),E.jsx(Ai.OrbitControls,{ref:l,enablePan:c.controls.enablePan,enableZoom:c.controls.enableZoom,enableRotate:c.controls.enableRotate,maxDistance:c.graph.camera_max_distance,minDistance:c.graph.detail_view_distance,minPolarAngle:c.controls.minPolarAngle,maxPolarAngle:c.controls.maxPolarAngle,minAzimuthAngle:c.controls.minAzimuthAngle==="Infinity"?-1/0:Number(c.controls.minAzimuthAngle),maxAzimuthAngle:c.controls.maxAzimuthAngle==="Infinity"?1/0:Number(c.controls.maxAzimuthAngle),zoomSpeed:.6,panSpeed:.5,rotateSpeed:.5,dampingFactor:.1}),E.jsx("ambientLight",{intensity:.8}),E.jsx("pointLight",{position:[10,10,10],intensity:1}),E.jsx(A.Suspense,{fallback:null,children:E.jsxs("group",{children:[E.jsx(ba,{data:e,onNodeSelect:t,selectedNodeId:n,config:c}),s]})})]})})}),xs=A.createContext({});function ws(e){const t=A.useRef(null);return t.current===null&&(t.current=e()),t.current}const Pa=typeof window<"u",Aa=Pa?A.useLayoutEffect:A.useEffect,ai=A.createContext(null);function Ts(e,t){e.indexOf(t)===-1&&e.push(t)}function bs(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const qt=(e,t,n)=>n>t?t:n<e?e:n;function Ss(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Ke=()=>{},ne=()=>{};typeof process<"u"&&((Sc=process.env)==null?void 0:Sc.NODE_ENV)!=="production"&&(Ke=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Ss(t,n))},ne=(e,t,n)=>{if(!e)throw new Error(Ss(t,n))});const ie={},Ma=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Ca(e){return typeof e=="object"&&e!==null}const Da=e=>/^0[^.\s]+$/u.test(e);function Ps(e){let t;return()=>(t===void 0&&(t=e()),t)}const It=e=>e,md=(e,t)=>n=>t(e(n)),Pn=(...e)=>e.reduce(md),An=(e,t,n)=>{const i=t-e;return i===0?1:(n-e)/i};class As{constructor(){this.subscriptions=[]}add(t){return Ts(this.subscriptions,t),()=>bs(this.subscriptions,t)}notify(t,n,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,i);else for(let r=0;r<s;r++){const o=this.subscriptions[r];o&&o(t,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Kt=e=>e*1e3,Lt=e=>e/1e3;function Ea(e,t){return t?e*(1e3/t):0}const ka=new Set;function Ms(e,t,n){e||ka.has(t)||(console.warn(Ss(t,n)),ka.add(t))}const Va=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,gd=1e-7,yd=12;function _d(e,t,n,i,s){let r,o,a=0;do o=t+(n-t)/2,r=Va(o,i,s)-e,r>0?n=o:t=o;while(Math.abs(r)>gd&&++a<yd);return o}function Mn(e,t,n,i){if(e===t&&n===i)return It;const s=r=>_d(r,0,1,e,n);return r=>r===0||r===1?r:Va(s(r),t,i)}const Oa=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Na=e=>t=>1-e(1-t),Ia=Mn(.33,1.53,.69,.99),Cs=Na(Ia),La=Oa(Cs),Fa=e=>(e*=2)<1?.5*Cs(e):.5*(2-Math.pow(2,-10*(e-1))),Ds=e=>1-Math.sin(Math.acos(e)),Ra=Na(Ds),za=Oa(Ds),vd=Mn(.42,0,1,1),xd=Mn(0,0,.58,1),Ba=Mn(.42,0,.58,1),wd=e=>Array.isArray(e)&&typeof e[0]!="number",ja=e=>Array.isArray(e)&&typeof e[0]=="number",$a={linear:It,easeIn:vd,easeInOut:Ba,easeOut:xd,circIn:Ds,circInOut:za,circOut:Ra,backIn:Cs,backInOut:La,backOut:Ia,anticipate:Fa},Td=e=>typeof e=="string",Ua=e=>{if(ja(e)){ne(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,i,s]=e;return Mn(t,n,i,s)}else if(Td(e))return ne($a[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),$a[e];return e},li=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function bd(e,t){let n=new Set,i=new Set,s=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){o.has(c)&&(u.schedule(c),e()),c(a)}const u={schedule:(c,h=!1,f=!1)=>{const m=f&&s?n:i;return h&&o.add(c),m.has(c)||m.add(c),c},cancel:c=>{i.delete(c),o.delete(c)},process:c=>{if(a=c,s){r=!0;return}s=!0,[n,i]=[i,n],n.forEach(l),n.clear(),s=!1,r&&(r=!1,u.process(c))}};return u}const Sd=40;function Wa(e,t){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=li.reduce((v,w)=>(v[w]=bd(r),v),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:h,preRender:f,render:d,postRender:m}=o,p=()=>{const v=ie.useManualTiming?s.timestamp:performance.now();n=!1,ie.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(v-s.timestamp,Sd),1)),s.timestamp=v,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),c.process(s),h.process(s),f.process(s),d.process(s),m.process(s),s.isProcessing=!1,n&&t&&(i=!1,e(p))},y=()=>{n=!0,i=!0,s.isProcessing||e(p)};return{schedule:li.reduce((v,w)=>{const _=o[w];return v[w]=(T,S=!1,b=!1)=>(n||y(),_.schedule(T,S,b)),v},{}),cancel:v=>{for(let w=0;w<li.length;w++)o[li[w]].cancel(v)},state:s,steps:o}}const{schedule:U,cancel:de,state:lt,steps:Es}=Wa(typeof requestAnimationFrame<"u"?requestAnimationFrame:It,!0);let ui;function Pd(){ui=void 0}const yt={now:()=>(ui===void 0&&yt.set(lt.isProcessing||ie.useManualTiming?lt.timestamp:performance.now()),ui),set:e=>{ui=e,queueMicrotask(Pd)}},Ga=e=>t=>typeof t=="string"&&t.startsWith(e),qa=Ga("--"),Ad=Ga("var(--"),ks=e=>Ad(e)?Md.test(e.split("/*")[0].trim()):!1,Md=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Ka(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Ye={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Cn={...Ye,transform:e=>qt(0,1,e)},ci={...Ye,default:1},Dn=e=>Math.round(e*1e5)/1e5,Vs=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Cd(e){return e==null}const Dd=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Os=(e,t)=>n=>!!(typeof n=="string"&&Dd.test(n)&&n.startsWith(e)||t&&!Cd(n)&&Object.prototype.hasOwnProperty.call(n,t)),Ya=(e,t,n)=>i=>{if(typeof i!="string")return i;const[s,r,o,a]=i.match(Vs);return{[e]:parseFloat(s),[t]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Ed=e=>qt(0,255,e),Ns={...Ye,transform:e=>Math.round(Ed(e))},Ce={test:Os("rgb","red"),parse:Ya("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+Ns.transform(e)+", "+Ns.transform(t)+", "+Ns.transform(n)+", "+Dn(Cn.transform(i))+")"};function kd(e){let t="",n="",i="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,i+=i,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const Is={test:Os("#"),parse:kd,transform:Ce.transform},En=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),pe=En("deg"),Yt=En("%"),D=En("px"),Vd=En("vh"),Od=En("vw"),Xa={...Yt,parse:e=>Yt.parse(e)/100,transform:e=>Yt.transform(e*100)},Xe={test:Os("hsl","hue"),parse:Ya("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+Yt.transform(Dn(t))+", "+Yt.transform(Dn(n))+", "+Dn(Cn.transform(i))+")"},nt={test:e=>Ce.test(e)||Is.test(e)||Xe.test(e),parse:e=>Ce.test(e)?Ce.parse(e):Xe.test(e)?Xe.parse(e):Is.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ce.transform(e):Xe.transform(e),getAnimatableNone:e=>{const t=nt.parse(e);return t.alpha=0,nt.transform(t)}},Nd=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Id(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Vs))==null?void 0:t.length)||0)+(((n=e.match(Nd))==null?void 0:n.length)||0)>0}const Ha="number",Za="color",Ld="var",Fd="var(",Qa="${}",Rd=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function kn(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},s=[];let r=0;const a=t.replace(Rd,l=>(nt.test(l)?(i.color.push(r),s.push(Za),n.push(nt.parse(l))):l.startsWith(Fd)?(i.var.push(r),s.push(Ld),n.push(l)):(i.number.push(r),s.push(Ha),n.push(parseFloat(l))),++r,Qa)).split(Qa);return{values:n,split:a,indexes:i,types:s}}function Ja(e){return kn(e).values}function tl(e){const{split:t,types:n}=kn(e),i=t.length;return s=>{let r="";for(let o=0;o<i;o++)if(r+=t[o],s[o]!==void 0){const a=n[o];a===Ha?r+=Dn(s[o]):a===Za?r+=nt.transform(s[o]):r+=s[o]}return r}}const zd=e=>typeof e=="number"?0:nt.test(e)?nt.getAnimatableNone(e):e;function Bd(e){const t=Ja(e);return tl(e)(t.map(zd))}const me={test:Id,parse:Ja,createTransformer:tl,getAnimatableNone:Bd};function Ls(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function jd({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let s=0,r=0,o=0;if(!t)s=r=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=Ls(l,a,e+1/3),r=Ls(l,a,e),o=Ls(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:i}}function hi(e,t){return n=>n>0?t:e}const H=(e,t,n)=>e+(t-e)*n,Fs=(e,t,n)=>{const i=e*e,s=n*(t*t-i)+i;return s<0?0:Math.sqrt(s)},$d=[Is,Ce,Xe],Ud=e=>$d.find(t=>t.test(e));function el(e){const t=Ud(e);if(Ke(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Xe&&(n=jd(n)),n}const nl=(e,t)=>{const n=el(e),i=el(t);if(!n||!i)return hi(e,t);const s={...n};return r=>(s.red=Fs(n.red,i.red,r),s.green=Fs(n.green,i.green,r),s.blue=Fs(n.blue,i.blue,r),s.alpha=H(n.alpha,i.alpha,r),Ce.transform(s))},Rs=new Set(["none","hidden"]);function Wd(e,t){return Rs.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Gd(e,t){return n=>H(e,t,n)}function zs(e){return typeof e=="number"?Gd:typeof e=="string"?ks(e)?hi:nt.test(e)?nl:Yd:Array.isArray(e)?il:typeof e=="object"?nt.test(e)?nl:qd:hi}function il(e,t){const n=[...e],i=n.length,s=e.map((r,o)=>zs(r)(r,t[o]));return r=>{for(let o=0;o<i;o++)n[o]=s[o](r);return n}}function qd(e,t){const n={...e,...t},i={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(i[s]=zs(e[s])(e[s],t[s]));return s=>{for(const r in i)n[r]=i[r](s);return n}}function Kd(e,t){const n=[],i={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const r=t.types[s],o=e.indexes[r][i[r]],a=e.values[o]??0;n[s]=a,i[r]++}return n}const Yd=(e,t)=>{const n=me.createTransformer(t),i=kn(e),s=kn(t);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Rs.has(e)&&!s.values.length||Rs.has(t)&&!i.values.length?Wd(e,t):Pn(il(Kd(i,s),s.values),n):(Ke(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),hi(e,t))};function sl(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?H(e,t,n):zs(e)(e,t)}const Xd=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>U.update(t,n),stop:()=>de(t),now:()=>lt.isProcessing?lt.timestamp:yt.now()}},rl=(e,t,n=10)=>{let i="";const s=Math.max(Math.round(t/n),2);for(let r=0;r<s;r++)i+=Math.round(e(r/(s-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},fi=2e4;function Bs(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t<fi;)t+=n,i=e.next(t);return t>=fi?1/0:t}function Hd(e,t=100,n){const i=n({...e,keyframes:[0,t]}),s=Math.min(Bs(i),fi);return{type:"keyframes",ease:r=>i.next(s*r).value/t,duration:Lt(s)}}const Zd=5;function ol(e,t,n){const i=Math.max(t-Zd,0);return Ea(n-e(i),t-i)}const Z={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},js=.001;function Qd({duration:e=Z.duration,bounce:t=Z.bounce,velocity:n=Z.velocity,mass:i=Z.mass}){let s,r;Ke(e<=Kt(Z.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=qt(Z.minDamping,Z.maxDamping,o),e=qt(Z.minDuration,Z.maxDuration,Lt(e)),o<1?(s=u=>{const c=u*o,h=c*e,f=c-n,d=$s(u,o),m=Math.exp(-h);return js-f/d*m},r=u=>{const h=u*o*e,f=h*n+n,d=Math.pow(o,2)*Math.pow(u,2)*e,m=Math.exp(-h),p=$s(Math.pow(u,2),o);return(-s(u)+js>0?-1:1)*((f-d)*m)/p}):(s=u=>{const c=Math.exp(-u*e),h=(u-n)*e+1;return-js+c*h},r=u=>{const c=Math.exp(-u*e),h=(n-u)*(e*e);return c*h});const a=5/e,l=tp(s,r,a);if(e=Kt(e),isNaN(l))return{stiffness:Z.stiffness,damping:Z.damping,duration:e};{const u=Math.pow(l,2)*i;return{stiffness:u,damping:o*2*Math.sqrt(i*u),duration:e}}}const Jd=12;function tp(e,t,n){let i=n;for(let s=1;s<Jd;s++)i=i-e(i)/t(i);return i}function $s(e,t){return e*Math.sqrt(1-t*t)}const ep=["duration","bounce"],np=["stiffness","damping","mass"];function al(e,t){return t.some(n=>e[n]!==void 0)}function ip(e){let t={velocity:Z.velocity,stiffness:Z.stiffness,damping:Z.damping,mass:Z.mass,isResolvedFromDuration:!1,...e};if(!al(e,np)&&al(e,ep))if(e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),s=i*i,r=2*qt(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:Z.mass,stiffness:s,damping:r}}else{const n=Qd(e);t={...t,...n,mass:Z.mass},t.isResolvedFromDuration=!0}return t}function di(e=Z.visualDuration,t=Z.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:s}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:u,mass:c,duration:h,velocity:f,isResolvedFromDuration:d}=ip({...n,velocity:-Lt(n.velocity||0)}),m=f||0,p=u/(2*Math.sqrt(l*c)),y=o-r,g=Lt(Math.sqrt(l/c)),x=Math.abs(y)<5;i||(i=x?Z.restSpeed.granular:Z.restSpeed.default),s||(s=x?Z.restDelta.granular:Z.restDelta.default);let v;if(p<1){const _=$s(g,p);v=T=>{const S=Math.exp(-p*g*T);return o-S*((m+p*g*y)/_*Math.sin(_*T)+y*Math.cos(_*T))}}else if(p===1)v=_=>o-Math.exp(-g*_)*(y+(m+g*y)*_);else{const _=g*Math.sqrt(p*p-1);v=T=>{const S=Math.exp(-p*g*T),b=Math.min(_*T,300);return o-S*((m+p*g*y)*Math.sinh(b)+_*y*Math.cosh(b))/_}}const w={calculatedDuration:d&&h||null,next:_=>{const T=v(_);if(d)a.done=_>=h;else{let S=_===0?m:0;p<1&&(S=_===0?Kt(m):ol(v,_,T));const b=Math.abs(S)<=i,P=Math.abs(o-T)<=s;a.done=b&&P}return a.value=a.done?o:T,a},toString:()=>{const _=Math.min(Bs(w),fi),T=rl(S=>w.next(_*S).value,_,30);return _+"ms "+T},toTransition:()=>{}};return w}di.applyToOptions=e=>{const t=Hd(e,100,di);return e.ease=t.ease,e.duration=Kt(t.duration),e.type="keyframes",e};function Us({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=e[0],f={done:!1,value:h},d=b=>a!==void 0&&b<a||l!==void 0&&b>l,m=b=>a===void 0?l:l===void 0||Math.abs(a-b)<Math.abs(l-b)?a:l;let p=n*t;const y=h+p,g=o===void 0?y:o(y);g!==y&&(p=g-h);const x=b=>-p*Math.exp(-b/i),v=b=>g+x(b),w=b=>{const P=x(b),C=v(b);f.done=Math.abs(P)<=u,f.value=f.done?g:C};let _,T;const S=b=>{d(f.value)&&(_=b,T=di({keyframes:[f.value,m(f.value)],velocity:ol(v,b,f.value),damping:s,stiffness:r,restDelta:u,restSpeed:c}))};return S(0),{calculatedDuration:null,next:b=>{let P=!1;return!T&&_===void 0&&(P=!0,w(b),S(b)),_!==void 0&&b>=_?T.next(b-_):(!P&&w(b),f)}}}function sp(e,t,n){const i=[],s=n||ie.mix||sl,r=e.length-1;for(let o=0;o<r;o++){let a=s(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||It:t;a=Pn(l,a)}i.push(a)}return i}function rp(e,t,{clamp:n=!0,ease:i,mixer:s}={}){const r=e.length;if(ne(r===t.length,"Both input and output ranges must be the same length","range-length"),r===1)return()=>t[0];if(r===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[r-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=sp(t,i,s),l=a.length,u=c=>{if(o&&c<e[0])return t[0];let h=0;if(l>1)for(;h<e.length-2&&!(c<e[h+1]);h++);const f=An(e[h],e[h+1],c);return a[h](f)};return n?c=>u(qt(e[0],e[r-1],c)):u}function op(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const s=An(0,t,i);e.push(H(n,1,s))}}function ap(e){const t=[0];return op(t,e.length-1),t}function lp(e,t){return e.map(n=>n*t)}function up(e,t){return e.map(()=>t||Ba).splice(0,e.length-1)}function He({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const s=wd(i)?i.map(Ua):Ua(i),r={done:!1,value:t[0]},o=lp(n&&n.length===t.length?n:ap(t),e),a=rp(o,t,{ease:Array.isArray(s)?s:up(t,s)});return{calculatedDuration:e,next:l=>(r.value=a(l),r.done=l>=e,r)}}const cp=e=>e!==null;function Ws(e,{repeat:t,repeatType:n="loop"},i,s=1){const r=e.filter(cp),a=s<0||t&&n!=="loop"&&t%2===1?0:r.length-1;return!a||i===void 0?r[a]:i}const hp={decay:Us,inertia:Us,tween:He,keyframes:He,spring:di};function ll(e){typeof e.type=="string"&&(e.type=hp[e.type])}class Gs{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const fp=e=>e/100;class qs extends Gs{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var i,s;const{motionValue:n}=this.options;n&&n.updatedAt!==yt.now()&&this.tick(yt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(i=this.options).onStop)==null||s.call(i))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;ll(t);const{type:n=He,repeat:i=0,repeatDelay:s=0,repeatType:r,velocity:o=0}=t;let{keyframes:a}=t;const l=n||He;process.env.NODE_ENV!=="production"&&l!==He&&ne(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==He&&typeof a[0]!="number"&&(this.mixKeyframes=Pn(fp,sl(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});r==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=Bs(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:i,totalDuration:s,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return i.next(0);const{delay:u=0,keyframes:c,repeat:h,repeatType:f,repeatDelay:d,type:m,onUpdate:p,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const g=this.currentTime-u*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?g<0:g>s;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let v=this.currentTime,w=i;if(h){const b=Math.min(this.currentTime,s)/a;let P=Math.floor(b),C=b%1;!C&&b>=1&&(C=1),C===1&&P--,P=Math.min(P,h+1),!!(P%2)&&(f==="reverse"?(C=1-C,d&&(C-=d/a)):f==="mirror"&&(w=o)),v=qt(0,1,C)*a}const _=x?{done:!1,value:c[0]}:w.next(v);r&&(_.value=r(_.value));let{done:T}=_;!x&&l!==null&&(T=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const S=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return S&&m!==Us&&(_.value=Ws(c,this.options,y,this.speed)),p&&p(_.value),S&&this.finish(),_}then(t,n){return this.finished.then(t,n)}get duration(){return Lt(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Lt(t)}get time(){return Lt(this.currentTime)}set time(t){var n;t=Kt(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(yt.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Lt(this.currentTime))}play(){var s,r;if(this.isStopped)return;const{driver:t=Xd,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(r=(s=this.options).onPlay)==null||r.call(s);const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(yt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function dp(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const De=e=>e*180/Math.PI,Ks=e=>{const t=De(Math.atan2(e[1],e[0]));return Ys(t)},pp={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ks,rotateZ:Ks,skewX:e=>De(Math.atan(e[1])),skewY:e=>De(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Ys=e=>(e=e%360,e<0&&(e+=360),e),ul=Ks,cl=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),hl=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),mp={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:cl,scaleY:hl,scale:e=>(cl(e)+hl(e))/2,rotateX:e=>Ys(De(Math.atan2(e[6],e[5]))),rotateY:e=>Ys(De(Math.atan2(-e[2],e[0]))),rotateZ:ul,rotate:ul,skewX:e=>De(Math.atan(e[4])),skewY:e=>De(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Xs(e){return e.includes("scale")?1:0}function Hs(e,t){if(!e||e==="none")return Xs(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=mp,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=pp,s=a}if(!s)return Xs(t);const r=i[t],o=s[1].split(",").map(yp);return typeof r=="function"?r(o):o[r]}const gp=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Hs(n,t)};function yp(e){return parseFloat(e.trim())}const Ze=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Qe=new Set(Ze),fl=e=>e===Ye||e===D,_p=new Set(["x","y","z"]),vp=Ze.filter(e=>!_p.has(e));function xp(e){const t=[];return vp.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const ge={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Hs(t,"x"),y:(e,{transform:t})=>Hs(t,"y")};ge.translateX=ge.x,ge.translateY=ge.y;const Ee=new Set;let Zs=!1,Qs=!1,Js=!1;function dl(){if(Qs){const e=Array.from(Ee).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const s=xp(i);s.length&&(n.set(i,s),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const s=n.get(i);s&&s.forEach(([r,o])=>{var a;(a=i.getValue(r))==null||a.set(o)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}Qs=!1,Zs=!1,Ee.forEach(e=>e.complete(Js)),Ee.clear()}function pl(){Ee.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Qs=!0)})}function wp(){Js=!0,pl(),dl(),Js=!1}class tr{constructor(t,n,i,s,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=s,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Ee.add(this),Zs||(Zs=!0,U.read(pl),U.resolveKeyframes(dl))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:s}=this;if(t[0]===null){const r=s==null?void 0:s.get(),o=t[t.length-1];if(r!==void 0)t[0]=r;else if(i&&n){const a=i.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),s&&r===void 0&&s.set(t[0])}dp(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ee.delete(this)}cancel(){this.state==="scheduled"&&(Ee.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Tp=e=>e.startsWith("--");function bp(e,t,n){Tp(t)?e.style.setProperty(t,n):e.style[t]=n}const Sp=Ps(()=>window.ScrollTimeline!==void 0),Pp={};function Ap(e,t){const n=Ps(e);return()=>Pp[t]??n()}const ml=Ap(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Vn=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,gl={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Vn([0,.65,.55,1]),circOut:Vn([.55,0,1,.45]),backIn:Vn([.31,.01,.66,-.59]),backOut:Vn([.33,1.53,.69,.99])};function yl(e,t){if(e)return typeof e=="function"?ml()?rl(e,t):"ease-out":ja(e)?Vn(e):Array.isArray(e)?e.map(n=>yl(n,t)||gl.easeOut):gl[e]}function Mp(e,t,n,{delay:i=0,duration:s=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const h=yl(a,s);Array.isArray(h)&&(c.easing=h);const f={delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(c,f)}function _l(e){return typeof e=="function"&&"applyToOptions"in e}function Cp({type:e,...t}){return _l(e)&&ml()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Dp extends Gs{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:i,keyframes:s,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=t,ne(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=Cp(t);this.animation=Mp(n,i,s,u,r),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const c=Ws(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):bp(n,i,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,i,s;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((s=(i=this.animation).commitStyles)==null||s.call(i))}get duration(){var n,i;const t=((i=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:i.call(n).duration)||0;return Lt(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Lt(t)}get time(){return Lt(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Kt(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var i;return this.allowFlatten&&((i=this.animation.effect)==null||i.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Sp()?(this.animation.timeline=t,It):n(this)}}const vl={anticipate:Fa,backInOut:La,circInOut:za};function Ep(e){return e in vl}function kp(e){typeof e.ease=="string"&&Ep(e.ease)&&(e.ease=vl[e.ease])}const er=10;class Vp extends Dp{constructor(t){kp(t),ll(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:s,element:r,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new qs({...o,autoplay:!1}),l=Math.max(er,yt.now()-this.startTime),u=qt(0,er,l-er);n.setWithVelocity(a.sample(Math.max(0,l-u)).value,a.sample(l).value,u),a.stop()}}const xl=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(me.test(e)||e==="0")&&!e.startsWith("url("));function Op(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Np(e,t,n,i){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const r=e[e.length-1],o=xl(s,t),a=xl(r,t);return Ke(o===a,`You are trying to animate ${t} from "${s}" to "${r}". "${o?r:s}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:Op(e)||(n==="spring"||_l(n))&&i}function nr(e){e.duration=0,e.type="keyframes"}const Ip=new Set(["opacity","clipPath","filter","transform"]),Lp=Ps(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Fp(e){var c;const{motionValue:t,name:n,repeatDelay:i,repeatType:s,damping:r,type:o}=e;if(!(((c=t==null?void 0:t.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return Lp()&&n&&Ip.has(n)&&(n!=="transform"||!u)&&!l&&!i&&s!=="mirror"&&r!==0&&o!=="inertia"}const Rp=40;class zp extends Gs{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...h}){var m;super(),this.stop=()=>{var p,y;this._animation&&(this._animation.stop(),(p=this.stopTimeline)==null||p.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=yt.now();const f={autoplay:t,delay:n,type:i,repeat:s,repeatDelay:r,repeatType:o,name:l,motionValue:u,element:c,...h},d=(c==null?void 0:c.KeyframeResolver)||tr;this.keyframeResolver=new d(a,(p,y,g)=>this.onKeyframesResolved(p,y,f,!g),l,u,c),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(t,n,i,s){var y,g;this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=i;this.resolvedAt=yt.now(),Np(t,r,o,a)||((ie.instantAnimations||!l)&&(c==null||c(Ws(t,i,n))),t[0]=t[t.length-1],nr(i),i.repeat=0);const f={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Rp?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},d=!u&&Fp(f),m=(g=(y=f.motionValue)==null?void 0:y.owner)==null?void 0:g.current,p=d?new Vp({...f,element:m}):new qs(f);p.finished.then(()=>{this.notifyFinished()}).catch(It),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),wp()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function wl(e,t,n,i=0,s=1){const r=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),o=e.size,a=(o-1)*i;return typeof n=="function"?n(r,o):s===1?r*i:a-r*i}const Bp=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function jp(e){const t=Bp.exec(e);if(!t)return[,];const[,n,i,s]=t;return[`--${n??i}`,s]}const $p=4;function Tl(e,t,n=1){ne(n<=$p,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,s]=jp(e);if(!i)return;const r=window.getComputedStyle(t).getPropertyValue(i);if(r){const o=r.trim();return Ma(o)?parseFloat(o):o}return ks(s)?Tl(s,t,n+1):s}const Up={type:"spring",stiffness:500,damping:25,restSpeed:10},Wp=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Gp={type:"keyframes",duration:.8},qp={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Kp=(e,{keyframes:t})=>t.length>2?Gp:Qe.has(e)?e.startsWith("scale")?Wp(t[1]):Up:qp,Yp=e=>e!==null;function Xp(e,{repeat:t,repeatType:n="loop"},i){const s=e.filter(Yp),r=t&&n!=="loop"&&t%2===1?0:s.length-1;return s[r]}function ir(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}function Hp({when:e,delay:t,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const sr=(e,t,n,i={},s,r)=>o=>{const a=ir(i,e)||{},l=a.delay||i.delay||0;let{elapsed:u=0}=i;u=u-Kt(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:r?void 0:s};Hp(a)||Object.assign(c,Kp(e,c)),c.duration&&(c.duration=Kt(c.duration)),c.repeatDelay&&(c.repeatDelay=Kt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(nr(c),c.delay===0&&(h=!0)),(ie.instantAnimations||ie.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(h=!0,nr(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!r&&t.get()!==void 0){const f=Xp(c.keyframes,a);if(f!==void 0){U.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new qs(c):new zp(c)};function bl(e){const t=[{},{}];return e==null||e.values.forEach((n,i)=>{t[0][i]=n.get(),t[1][i]=n.getVelocity()}),t}function rr(e,t,n,i){if(typeof t=="function"){const[s,r]=bl(i);t=t(n!==void 0?n:e.custom,s,r)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,r]=bl(i);t=t(n!==void 0?n:e.custom,s,r)}return t}function Je(e,t,n){const i=e.getProps();return rr(i,t,n!==void 0?n:i.custom,e)}const Sl=new Set(["width","height","top","left","right","bottom",...Ze]),Pl=30,Zp=e=>!isNaN(parseFloat(e));class Qp{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{var r;const s=yt.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&((r=this.events.change)==null||r.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=yt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Zp(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Ms(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new As);const i=this.events[t].add(n);return t==="change"?()=>{i(),U.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=yt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Pl)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Pl);return Ea(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function tn(e,t){return new Qp(e,t)}const or=e=>Array.isArray(e);function Jp(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,tn(n))}function tm(e){return or(e)?e[e.length-1]||0:e}function em(e,t){const n=Je(e,t);let{transitionEnd:i={},transition:s={},...r}=n||{};r={...r,...i};for(const o in r){const a=tm(r[o]);Jp(e,o,a)}}const ft=e=>!!(e&&e.getVelocity);function nm(e){return!!(ft(e)&&e.add)}function ar(e,t){const n=e.getValue("willChange");if(nm(n))return n.add(t);if(!n&&ie.WillChange){const i=new ie.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function lr(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Al="data-"+lr("framerAppearId");function Ml(e){return e.props[Al]}function im({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,i}function Cl(e,t,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:r=e.getDefaultTransition(),transitionEnd:o,...a}=t;const l=r==null?void 0:r.reduceMotion;i&&(r=i);const u=[],c=s&&e.animationState&&e.animationState.getState()[s];for(const h in a){const f=e.getValue(h,e.latestValues[h]??null),d=a[h];if(d===void 0||c&&im(c,h))continue;const m={delay:n,...ir(r||{},h)},p=f.get();if(p!==void 0&&!f.isAnimating&&!Array.isArray(d)&&d===p&&!m.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const v=Ml(e);if(v){const w=window.MotionHandoffAnimation(v,h,U);w!==null&&(m.startTime=w,y=!0)}}ar(e,h);const g=l??e.shouldReduceMotion;f.start(sr(h,f,d,g&&Sl.has(h)?{type:!1}:m,e,y));const x=f.animation;x&&u.push(x)}return o&&Promise.all(u).then(()=>{U.update(()=>{o&&em(e,o)})}),u}function ur(e,t,n={}){var l;const i=Je(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const r=i?()=>Promise.all(Cl(e,i,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:h,staggerDirection:f}=s;return sm(e,t,u,c,h,f,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[u,c]=a==="beforeChildren"?[r,o]:[o,r];return u().then(()=>c())}else return Promise.all([r(),o(n.delay)])}function sm(e,t,n=0,i=0,s=0,r=1,o){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(ur(l,t,{...o,delay:n+(typeof i=="function"?0:i)+wl(e.variantChildren,l,i,s,r)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function rm(e,t,n={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const s=t.map(r=>ur(e,r,n));i=Promise.all(s)}else if(typeof t=="string")i=ur(e,t,n);else{const s=typeof t=="function"?Je(e,t,n.custom):t;i=Promise.all(Cl(e,s,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}const om={test:e=>e==="auto",parse:e=>e},Dl=e=>t=>t.test(e),El=[Ye,D,Yt,pe,Od,Vd,om],kl=e=>El.find(Dl(e));function am(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Da(e):!0}const lm=new Set(["brightness","contrast","saturate","opacity"]);function um(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(Vs)||[];if(!i)return e;const s=n.replace(i,"");let r=lm.has(t)?1:0;return i!==n&&(r*=100),t+"("+r+s+")"}const cm=/\b([a-z-]*)\(.*?\)/gu,cr={...me,getAnimatableNone:e=>{const t=e.match(cm);return t?t.map(um).join(" "):e}},Vl={...Ye,transform:Math.round},hr={borderWidth:D,borderTopWidth:D,borderRightWidth:D,borderBottomWidth:D,borderLeftWidth:D,borderRadius:D,borderTopLeftRadius:D,borderTopRightRadius:D,borderBottomRightRadius:D,borderBottomLeftRadius:D,width:D,maxWidth:D,height:D,maxHeight:D,top:D,right:D,bottom:D,left:D,inset:D,insetBlock:D,insetBlockStart:D,insetBlockEnd:D,insetInline:D,insetInlineStart:D,insetInlineEnd:D,padding:D,paddingTop:D,paddingRight:D,paddingBottom:D,paddingLeft:D,paddingBlock:D,paddingBlockStart:D,paddingBlockEnd:D,paddingInline:D,paddingInlineStart:D,paddingInlineEnd:D,margin:D,marginTop:D,marginRight:D,marginBottom:D,marginLeft:D,marginBlock:D,marginBlockStart:D,marginBlockEnd:D,marginInline:D,marginInlineStart:D,marginInlineEnd:D,fontSize:D,backgroundPositionX:D,backgroundPositionY:D,...{rotate:pe,rotateX:pe,rotateY:pe,rotateZ:pe,scale:ci,scaleX:ci,scaleY:ci,scaleZ:ci,skew:pe,skewX:pe,skewY:pe,distance:D,translateX:D,translateY:D,translateZ:D,x:D,y:D,z:D,perspective:D,transformPerspective:D,opacity:Cn,originX:Xa,originY:Xa,originZ:D},zIndex:Vl,fillOpacity:Cn,strokeOpacity:Cn,numOctaves:Vl},hm={...hr,color:nt,backgroundColor:nt,outlineColor:nt,fill:nt,stroke:nt,borderColor:nt,borderTopColor:nt,borderRightColor:nt,borderBottomColor:nt,borderLeftColor:nt,filter:cr,WebkitFilter:cr},Ol=e=>hm[e];function Nl(e,t){let n=Ol(e);return n!==cr&&(n=me),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const fm=new Set(["auto","none","0"]);function dm(e,t,n){let i=0,s;for(;i<e.length&&!s;){const r=e[i];typeof r=="string"&&!fm.has(r)&&kn(r).values.length&&(s=e[i]),i++}if(s&&n)for(const r of t)e[r]=Nl(n,s)}class pm extends tr{constructor(t,n,i,s,r){super(t,n,i,s,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let h=t[c];if(typeof h=="string"&&(h=h.trim(),ks(h))){const f=Tl(h,n.current);f!==void 0&&(t[c]=f),c===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Sl.has(i)||t.length!==2)return;const[s,r]=t,o=kl(s),a=kl(r),l=Ka(s),u=Ka(r);if(l!==u&&ge[i]){this.needsMeasurement=!0;return}if(o!==a)if(fl(o)&&fl(a))for(let c=0;c<t.length;c++){const h=t[c];typeof h=="string"&&(t[c]=parseFloat(h))}else ge[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,i=[];for(let s=0;s<t.length;s++)(t[s]===null||am(t[s]))&&i.push(s);i.length&&dm(t,i,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ge[i](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(i,s).jump(s,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const r=i.length-1,o=i[r];i[r]=ge[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function mm(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const s=(n==null?void 0:n[e])??i.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(i=>i!=null)}const Il=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function fr(e){return Ca(e)&&"offsetHeight"in e}const{schedule:dr}=Wa(queueMicrotask,!1),zt={x:!1,y:!1};function Ll(){return zt.x||zt.y}function gm(e){return e==="x"||e==="y"?zt[e]?null:(zt[e]=!0,()=>{zt[e]=!1}):zt.x||zt.y?null:(zt.x=zt.y=!0,()=>{zt.x=zt.y=!1})}function Fl(e,t){const n=mm(e),i=new AbortController,s={passive:!0,...t,signal:i.signal};return[n,s,()=>i.abort()]}function Rl(e){return!(e.pointerType==="touch"||Ll())}function ym(e,t,n={}){const[i,s,r]=Fl(e,n),o=a=>{if(!Rl(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const c=h=>{Rl(h)&&(u(h),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,s)};return i.forEach(a=>{a.addEventListener("pointerenter",o,s)}),r}const zl=(e,t)=>t?e===t?!0:zl(e,t.parentElement):!1,pr=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,_m=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function vm(e){return _m.has(e.tagName)||e.isContentEditable===!0}const xm=new Set(["INPUT","SELECT","TEXTAREA"]);function wm(e){return xm.has(e.tagName)||e.isContentEditable===!0}const pi=new WeakSet;function Bl(e){return t=>{t.key==="Enter"&&e(t)}}function mr(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Tm=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=Bl(()=>{if(pi.has(n))return;mr(n,"down");const s=Bl(()=>{mr(n,"up")}),r=()=>mr(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",r,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function jl(e){return pr(e)&&!Ll()}function bm(e,t,n={}){const[i,s,r]=Fl(e,n),o=a=>{const l=a.currentTarget;if(!jl(a))return;pi.add(l);const u=t(l,a),c=(d,m)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),pi.has(l)&&pi.delete(l),jl(d)&&typeof u=="function"&&u(d,{success:m})},h=d=>{c(d,l===window||l===document||n.useGlobalTarget||zl(l,d.target))},f=d=>{c(d,!1)};window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",f,s)};return i.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),fr(a)&&(a.addEventListener("focus",u=>Tm(u,s)),!vm(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function $l(e){return Ca(e)&&"ownerSVGElement"in e}function Sm(e){return $l(e)&&e.tagName==="svg"}const Pm=[...El,nt,me],Am=e=>Pm.find(Dl(e)),Ul=()=>({translate:0,scale:1,origin:0,originPoint:0}),en=()=>({x:Ul(),y:Ul()}),Wl=()=>({min:0,max:0}),it=()=>({x:Wl(),y:Wl()}),gr={current:null},Gl={current:!1},Mm=typeof window<"u";function Cm(){if(Gl.current=!0,!!Mm)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>gr.current=e.matches;e.addEventListener("change",t),t()}else gr.current=!1}const Dm=new WeakMap;function mi(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function On(e){return typeof e=="string"||Array.isArray(e)}const yr=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],_r=["initial",...yr];function gi(e){return mi(e.animate)||_r.some(t=>On(e[t]))}function ql(e){return!!(gi(e)||e.variants)}function Em(e,t,n){for(const i in t){const s=t[i],r=n[i];if(ft(s))e.addValue(i,s);else if(ft(r))e.addValue(i,tn(s,{owner:e}));else if(r!==s)if(e.hasValue(i)){const o=e.getValue(i);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(i);e.addValue(i,tn(o!==void 0?o:s,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const Kl=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let yi={};function Yl(e){yi=e}function km(){return yi}class Vm{scrapeMotionValuesFromProps(t,n,i){return{}}constructor({parent:t,props:n,presenceContext:i,reducedMotionConfig:s,skipAnimations:r,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=tr,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=yt.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,U.render(this.render,!1,!0))};const{latestValues:u,renderState:c}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=r,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=gi(n),this.isVariantNode=ql(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const m=f[d];u[d]!==void 0&&ft(m)&&m.set(u[d])}}mount(t){var n;this.current=t,Dm.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((i,s)=>this.bindToMotionValue(s,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Gl.current||Cm(),this.shouldReduceMotion=gr.current),process.env.NODE_ENV!=="production"&&Ms(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),de(this.notifyUpdate),de(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const i=this.features[n];i&&(i.unmount(),i.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const i=Qe.has(t);i&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&U.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),r&&r(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in yi){const n=yi[t];if(!n)continue;const{isEnabled:i,Feature:s}=n;if(!this.features[t]&&s&&i(this.props)&&(this.features[t]=new s(this)),this.features[t]){const r=this.features[t];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):it()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<Kl.length;i++){const s=Kl[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const r="on"+s,o=t[r];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=Em(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const i=this.values.get(t);n!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return i===void 0&&n!==void 0&&(i=tn(n===null?void 0:n,{owner:this}),this.addValue(t,i)),i}readValue(t,n){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(Ma(i)||Da(i))?i=parseFloat(i):!Am(i)&&me.test(n)&&(i=Nl(t,n)),this.setBaseTarget(t,ft(i)?i.get():i)),ft(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var r;const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const o=rr(this.props,n,(r=this.presenceContext)==null?void 0:r.custom);o&&(i=o[t])}if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!ft(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new As),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){dr.render(this.render)}}class Xl extends Vm{constructor(){super(...arguments),this.KeyframeResolver=pm}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const i=t.style;return i?i[n]:void 0}removeValueFromRenderState(t,{vars:n,style:i}){delete n[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ft(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class ye{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Hl({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function Om({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Nm(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function vr(e){return e===void 0||e===1}function xr({scale:e,scaleX:t,scaleY:n}){return!vr(e)||!vr(t)||!vr(n)}function ke(e){return xr(e)||Zl(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Zl(e){return Ql(e.x)||Ql(e.y)}function Ql(e){return e&&e!=="0%"}function _i(e,t,n){const i=e-n,s=t*i;return n+s}function Jl(e,t,n,i,s){return s!==void 0&&(e=_i(e,s,i)),_i(e,n,i)+t}function wr(e,t=0,n=1,i,s){e.min=Jl(e.min,t,n,i,s),e.max=Jl(e.max,t,n,i,s)}function tu(e,{x:t,y:n}){wr(e.x,t.translate,t.scale,t.originPoint),wr(e.y,n.translate,n.scale,n.originPoint)}const eu=.999999999999,nu=1.0000000000001;function Im(e,t,n,i=!1){const s=n.length;if(!s)return;t.x=t.y=1;let r,o;for(let a=0;a<s;a++){r=n[a],o=r.projectionDelta;const{visualElement:l}=r.options;l&&l.props.style&&l.props.style.display==="contents"||(i&&r.options.layoutScroll&&r.scroll&&r!==r.root&&sn(e,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,tu(e,o)),i&&ke(r.latestValues)&&sn(e,r.latestValues))}t.x<nu&&t.x>eu&&(t.x=1),t.y<nu&&t.y>eu&&(t.y=1)}function nn(e,t){e.min=e.min+t,e.max=e.max+t}function iu(e,t,n,i,s=.5){const r=H(e.min,e.max,s);wr(e,t,n,r,i)}function sn(e,t){iu(e.x,t.x,t.scaleX,t.scale,t.originX),iu(e.y,t.y,t.scaleY,t.scale,t.originY)}function su(e,t){return Hl(Nm(e.getBoundingClientRect(),t))}function Lm(e,t,n){const i=su(e,n),{scroll:s}=t;return s&&(nn(i.x,s.offset.x),nn(i.y,s.offset.y)),i}const Fm={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Rm=Ze.length;function zm(e,t,n){let i="",s=!0;for(let r=0;r<Rm;r++){const o=Ze[r],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(o.startsWith("scale")?1:0);else{const u=parseFloat(a);l=o.startsWith("scale")?u===1:u===0}if(!l||n){const u=Il(a,hr[o]);if(!l){s=!1;const c=Fm[o]||o;i+=`${c}(${u}) `}n&&(t[o]=u)}}return i=i.trim(),n?i=n(t,s?"":i):s&&(i="none"),i}function Tr(e,t,n){const{style:i,vars:s,transformOrigin:r}=e;let o=!1,a=!1;for(const l in t){const u=t[l];if(Qe.has(l)){o=!0;continue}else if(qa(l)){s[l]=u;continue}else{const c=Il(u,hr[l]);l.startsWith("origin")?(a=!0,r[l]=c):i[l]=c}}if(t.transform||(o||n?i.transform=zm(t,e.transform,n):i.transform&&(i.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=r;i.transformOrigin=`${l} ${u} ${c}`}}function ru(e,{style:t,vars:n},i,s){const r=e.style;let o;for(o in t)r[o]=t[o];s==null||s.applyProjectionStyles(r,i);for(o in n)r.setProperty(o,n[o])}function ou(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Nn={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(D.test(e))e=parseFloat(e);else return e;const n=ou(e,t.target.x),i=ou(e,t.target.y);return`${n}% ${i}%`}},Bm={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,s=me.parse(e);if(s.length>5)return i;const r=me.createTransformer(e),o=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+o]/=a,s[1+o]/=l;const u=H(a,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=u),typeof s[3+o]=="number"&&(s[3+o]/=u),r(s)}},br={borderRadius:{...Nn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Nn,borderTopRightRadius:Nn,borderBottomLeftRadius:Nn,borderBottomRightRadius:Nn,boxShadow:Bm};function au(e,{layout:t,layoutId:n}){return Qe.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!br[e]||e==="opacity")}function Sr(e,t,n){var o;const i=e.style,s=t==null?void 0:t.style,r={};if(!i)return r;for(const a in i)(ft(i[a])||s&&ft(s[a])||au(a,e)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(r[a]=i[a]);return r}function jm(e){return window.getComputedStyle(e)}class $m extends Xl{constructor(){super(...arguments),this.type="html",this.renderInstance=ru}readValueFromInstance(t,n){var i;if(Qe.has(n))return(i=this.projection)!=null&&i.isProjecting?Xs(n):gp(t,n);{const s=jm(t),r=(qa(n)?s.getPropertyValue(n):s[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return su(t,n)}build(t,n,i){Tr(t,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,i){return Sr(t,n,i)}}const Um={offset:"stroke-dashoffset",array:"stroke-dasharray"},Wm={offset:"strokeDashoffset",array:"strokeDasharray"};function Gm(e,t,n=1,i=0,s=!0){e.pathLength=1;const r=s?Um:Wm;e[r.offset]=`${-i}`,e[r.array]=`${t} ${n}`}const qm=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function lu(e,{attrX:t,attrY:n,attrScale:i,pathLength:s,pathSpacing:r=1,pathOffset:o=0,...a},l,u,c){if(Tr(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:f}=e;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete h.transformBox);for(const d of qm)h[d]!==void 0&&(f[d]=h[d],delete h[d]);t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),i!==void 0&&(h.scale=i),s!==void 0&&Gm(h,s,r,o,!1)}const uu=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),cu=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Km(e,t,n,i){ru(e,t,void 0,i);for(const s in t.attrs)e.setAttribute(uu.has(s)?s:lr(s),t.attrs[s])}function hu(e,t,n){const i=Sr(e,t,n);for(const s in e)if(ft(e[s])||ft(t[s])){const r=Ze.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[r]=e[s]}return i}class Ym extends Xl{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=it}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Qe.has(n)){const i=Ol(n);return i&&i.default||0}return n=uu.has(n)?n:lr(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,i){return hu(t,n,i)}build(t,n,i){lu(t,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,n,i,s){Km(t,n,i,s)}mount(t){this.isSVGTag=cu(t.tagName),super.mount(t)}}const Xm=_r.length;function fu(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?fu(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Xm;n++){const i=_r[n],s=e.props[i];(On(s)||s===!1)&&(t[i]=s)}return t}function du(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}const Hm=[...yr].reverse(),Zm=yr.length;function Qm(e){return t=>Promise.all(t.map(({animation:n,options:i})=>rm(e,n,i)))}function Jm(e){let t=Qm(e),n=pu(),i=!0;const s=l=>(u,c)=>{var f;const h=Je(e,c,l==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(h){const{transition:d,transitionEnd:m,...p}=h;u={...u,...p,...m}}return u};function r(l){t=l(e)}function o(l){const{props:u}=e,c=fu(e.parent)||{},h=[],f=new Set;let d={},m=1/0;for(let y=0;y<Zm;y++){const g=Hm[y],x=n[g],v=u[g]!==void 0?u[g]:c[g],w=On(v),_=g===l?x.isActive:null;_===!1&&(m=y);let T=v===c[g]&&v!==u[g]&&w;if(T&&i&&e.manuallyAnimateOnMount&&(T=!1),x.protectedKeys={...d},!x.isActive&&_===null||!v&&!x.prevProp||mi(v)||typeof v=="boolean")continue;const S=tg(x.prevProp,v);let b=S||g===l&&x.isActive&&!T&&w||y>m&&w,P=!1;const C=Array.isArray(v)?v:[v];let I=C.reduce(s(g),{});_===!1&&(I={});const{prevResolvedValues:O={}}=x,M={...O,...I},k=V=>{b=!0,f.has(V)&&(P=!0,f.delete(V)),x.needsAnimating[V]=!0;const F=e.getValue(V);F&&(F.liveStyle=!1)};for(const V in M){const F=I[V],$=O[V];if(d.hasOwnProperty(V))continue;let J=!1;or(F)&&or($)?J=!du(F,$):J=F!==$,J?F!=null?k(V):f.add(V):F!==void 0&&f.has(V)?k(V):x.protectedKeys[V]=!0}x.prevProp=v,x.prevResolvedValues=I,x.isActive&&(d={...d,...I}),i&&e.blockInitialAnimation&&(b=!1);const L=T&&S;b&&(!L||P)&&h.push(...C.map(V=>{const F={type:g};if(typeof V=="string"&&i&&!L&&e.manuallyAnimateOnMount&&e.parent){const{parent:$}=e,J=Je($,V);if($.enteringChildren&&J){const{delayChildren:Rt}=J.transition||{};F.delay=wl($.enteringChildren,e,Rt)}}return{animation:V,options:F}}))}if(f.size){const y={};if(typeof u.initial!="boolean"){const g=Je(e,Array.isArray(u.initial)?u.initial[0]:u.initial);g&&g.transition&&(y.transition=g.transition)}f.forEach(g=>{const x=e.getBaseTarget(g),v=e.getValue(g);v&&(v.liveStyle=!0),y[g]=x??null}),h.push({animation:y})}let p=!!h.length;return i&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(p=!1),i=!1,p?t(h):Promise.resolve()}function a(l,u){var h;if(n[l].isActive===u)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(f=>{var d;return(d=f.animationState)==null?void 0:d.setActive(l,u)}),n[l].isActive=u;const c=o(l);for(const f in n)n[f].protectedKeys={};return c}return{animateChanges:o,setActive:a,setAnimateFunction:r,getState:()=>n,reset:()=>{n=pu()}}}function tg(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!du(t,e):!1}function Ve(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function pu(){return{animate:Ve(!0),whileInView:Ve(),whileHover:Ve(),whileTap:Ve(),whileDrag:Ve(),whileFocus:Ve(),exit:Ve()}}function mu(e,t){e.min=t.min,e.max=t.max}function Bt(e,t){mu(e.x,t.x),mu(e.y,t.y)}function gu(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const yu=1e-4,eg=1-yu,ng=1+yu,_u=.01,ig=0-_u,sg=0+_u;function _t(e){return e.max-e.min}function rg(e,t,n){return Math.abs(e-t)<=n}function vu(e,t,n,i=.5){e.origin=i,e.originPoint=H(t.min,t.max,e.origin),e.scale=_t(n)/_t(t),e.translate=H(n.min,n.max,e.origin)-e.originPoint,(e.scale>=eg&&e.scale<=ng||isNaN(e.scale))&&(e.scale=1),(e.translate>=ig&&e.translate<=sg||isNaN(e.translate))&&(e.translate=0)}function In(e,t,n,i){vu(e.x,t.x,n.x,i?i.originX:void 0),vu(e.y,t.y,n.y,i?i.originY:void 0)}function xu(e,t,n){e.min=n.min+t.min,e.max=e.min+_t(t)}function og(e,t,n){xu(e.x,t.x,n.x),xu(e.y,t.y,n.y)}function wu(e,t,n){e.min=t.min-n.min,e.max=e.min+_t(t)}function vi(e,t,n){wu(e.x,t.x,n.x),wu(e.y,t.y,n.y)}function Tu(e,t,n,i,s){return e-=t,e=_i(e,1/n,i),s!==void 0&&(e=_i(e,1/s,i)),e}function ag(e,t=0,n=1,i=.5,s,r=e,o=e){if(Yt.test(t)&&(t=parseFloat(t),t=H(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=H(r.min,r.max,i);e===r&&(a-=t),e.min=Tu(e.min,t,n,a,s),e.max=Tu(e.max,t,n,a,s)}function bu(e,t,[n,i,s],r,o){ag(e,t[n],t[i],t[s],t.scale,r,o)}const lg=["x","scaleX","originX"],ug=["y","scaleY","originY"];function Su(e,t,n,i){bu(e.x,t,lg,n?n.x:void 0,i?i.x:void 0),bu(e.y,t,ug,n?n.y:void 0,i?i.y:void 0)}function Pu(e){return e.translate===0&&e.scale===1}function Au(e){return Pu(e.x)&&Pu(e.y)}function Mu(e,t){return e.min===t.min&&e.max===t.max}function cg(e,t){return Mu(e.x,t.x)&&Mu(e.y,t.y)}function Cu(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Du(e,t){return Cu(e.x,t.x)&&Cu(e.y,t.y)}function Eu(e){return _t(e.x)/_t(e.y)}function ku(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Ft(e){return[e("x"),e("y")]}function hg(e,t,n){let i="";const s=e.x.translate/t.x,r=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||r||o)&&(i=`translate3d(${s}px, ${r}px, ${o}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:h,rotateY:f,skewX:d,skewY:m}=n;u&&(i=`perspective(${u}px) ${i}`),c&&(i+=`rotate(${c}deg) `),h&&(i+=`rotateX(${h}deg) `),f&&(i+=`rotateY(${f}deg) `),d&&(i+=`skewX(${d}deg) `),m&&(i+=`skewY(${m}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(i+=`scale(${a}, ${l})`),i||"none"}const Vu=["TopLeft","TopRight","BottomLeft","BottomRight"],fg=Vu.length,Ou=e=>typeof e=="string"?parseFloat(e):e,Nu=e=>typeof e=="number"||D.test(e);function dg(e,t,n,i,s,r){s?(e.opacity=H(0,n.opacity??1,pg(i)),e.opacityExit=H(t.opacity??1,0,mg(i))):r&&(e.opacity=H(t.opacity??1,n.opacity??1,i));for(let o=0;o<fg;o++){const a=`border${Vu[o]}Radius`;let l=Iu(t,a),u=Iu(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Nu(l)===Nu(u)?(e[a]=Math.max(H(Ou(l),Ou(u),i),0),(Yt.test(u)||Yt.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=H(t.rotate||0,n.rotate||0,i))}function Iu(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const pg=Lu(0,.5,Ra),mg=Lu(.5,.95,It);function Lu(e,t,n){return i=>i<e?0:i>t?1:n(An(e,t,i))}function gg(e,t,n){const i=ft(e)?e:tn(e);return i.start(sr("",i,t,n)),i.animation}function Ln(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}const yg=(e,t)=>e.depth-t.depth;class _g{constructor(){this.children=[],this.isDirty=!1}add(t){Ts(this.children,t),this.isDirty=!0}remove(t){bs(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(yg),this.isDirty=!1,this.children.forEach(t)}}function vg(e,t){const n=yt.now(),i=({timestamp:s})=>{const r=s-n;r>=t&&(de(i),e(r-t))};return U.setup(i,!0),()=>de(i)}function xi(e){return ft(e)?e.get():e}class xg{constructor(){this.members=[]}add(t){Ts(this.members,t),t.scheduleRender()}remove(t){if(bs(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let i;for(let s=n;s>=0;s--){const r=this.members[s];if(r.isPresent!==!1){i=r;break}}return i?(this.promote(i),!0):!1}promote(t,n){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender();const s=i.options.layoutDependency,r=t.options.layoutDependency;s!==void 0&&r!==void 0&&s===r||(t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0));const{crossfade:a}=t.options;a===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:i}=t;n.onExitComplete&&n.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const wi={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Pr=["","X","Y","Z"],wg=1e3;let Tg=0;function Ar(e,t,n,i){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),i&&(i[e]=0))}function Fu(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Ml(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",U,!(s||r))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&Fu(i)}function Ru({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(o={},a=t==null?void 0:t()){this.id=Tg++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Pg),this.nodes.forEach(Dg),this.nodes.forEach(Eg),this.nodes.forEach(Ag)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new _g)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new As),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=$l(o)&&!Sm(o),this.instance=o;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let c,h=0;const f=()=>this.root.updateBlockedByResize=!1;U.read(()=>{h=window.innerWidth}),e(o,()=>{const d=window.innerWidth;d!==h&&(h=d,this.root.updateBlockedByResize=!0,c&&c(),c=vg(f,250),wi.hasAnimatedSinceResize&&(wi.hasAnimatedSinceResize=!1,this.nodes.forEach(ju)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||Ig,{onLayoutAnimationStart:p,onLayoutAnimationComplete:y}=u.getProps(),g=!this.targetLayout||!Du(this.targetLayout,d),x=!h&&f;if(this.options.layoutRoot||this.resumeFrom||x||h&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...ir(m,"layout"),onPlay:p,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(c,x)}else h||ju(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),de(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(kg),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Fu(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(zu);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Bu);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Cg),this.nodes.forEach(bg),this.nodes.forEach(Sg)):this.nodes.forEach(Bu),this.clearAllSnapshots();const a=yt.now();lt.delta=qt(0,1e3/60,a-lt.timestamp),lt.timestamp=a,lt.isProcessing=!0,Es.update.process(lt),Es.preRender.process(lt),Es.render.process(lt),lt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,dr.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Mg),this.sharedNodes.forEach(Vg)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,U.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){U.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!_t(this.snapshot.measuredBox.x)&&!_t(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=it(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=i(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Au(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||ke(this.latestValues)||c)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),Lg(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return it();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(Fg))){const{scroll:c}=this.root;c&&(nn(a.x,c.offset.x),nn(a.y,c.offset.y))}return a}removeElementScroll(o){var l;const a=it();if(Bt(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:h,options:f}=c;c!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&Bt(a,o),nn(a.x,h.offset.x),nn(a.y,h.offset.y))}return a}applyTransform(o,a=!1){const l=it();Bt(l,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&sn(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),ke(c.latestValues)&&sn(l,c.latestValues)}return ke(this.latestValues)&&sn(l,this.latestValues),l}removeTransform(o){const a=it();Bt(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!ke(u.latestValues))continue;xr(u.latestValues)&&u.updateSnapshot();const c=it(),h=u.measurePageBox();Bt(c,h),Su(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return ke(this.latestValues)&&Su(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==lt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var d;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(d=this.parent)!=null&&d.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!this.layout||!(c||h))return;this.resolvedRelativeTargetAt=lt.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=it(),this.targetWithTransforms=it()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),og(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Bt(this.target,this.layout.layoutBox),tu(this.target,this.targetDelta)):Bt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||xr(this.parent.latestValues)||Zl(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=it(),this.relativeTargetOrigin=it(),vi(this.relativeTargetOrigin,a,l),Bt(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var m;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===lt.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;Bt(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;Im(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=it());const{target:d}=o;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(gu(this.prevProjectionDelta.x,this.projectionDelta.x),gu(this.prevProjectionDelta.y,this.projectionDelta.y)),In(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!ku(this.projectionDelta.x,this.prevProjectionDelta.x)||!ku(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=en(),this.projectionDelta=en(),this.projectionDeltaWithTransform=en()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=en();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=it(),d=l?l.source:void 0,m=this.layout?this.layout.source:void 0,p=d!==m,y=this.getStack(),g=!y||y.members.length<=1,x=!!(p&&!g&&this.options.crossfade===!0&&!this.path.some(Ng));this.animationProgress=0;let v;this.mixTargetDelta=w=>{const _=w/1e3;$u(h.x,o.x,_),$u(h.y,o.y,_),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(vi(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Og(this.relativeTarget,this.relativeTargetOrigin,f,_),v&&cg(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=it()),Bt(v,this.relativeTarget)),p&&(this.animationValues=c,dg(c,u,this.latestValues,_,x,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(de(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=U.update(()=>{wi.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=tn(0)),this.currentAnimation=gg(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),o.onUpdate&&o.onUpdate(c)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(wg),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&Ku(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||it();const h=_t(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const f=_t(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}Bt(a,l),sn(a,c),In(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new xg),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Ar("z",o,u,this.animationValues);for(let c=0;c<Pr.length;c++)Ar(`rotate${Pr[c]}`,o,u,this.animationValues),Ar(`skew${Pr[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=xi(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=xi(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!ke(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=hg(this.projectionDeltaWithTransform,this.treeScale,c);l&&(h=l(c,h)),o.transform=h;const{x:f,y:d}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${d.origin*100}% 0`,u.animationValues?o.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const m in br){if(c[m]===void 0)continue;const{correct:p,applyTo:y,isCSSVariable:g}=br[m],x=h==="none"?c[m]:p(c[m],u);if(y){const v=y.length;for(let w=0;w<v;w++)o[y[w]]=x}else g?this.options.visualElement.renderState.vars[m]=x:o[m]=x}this.options.layoutId&&(o.pointerEvents=u===this?xi(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(zu),this.root.sharedNodes.clear()}}}function bg(e){e.updateLayout()}function Sg(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:s}=e.layout,{animationType:r}=e.options,o=t.source!==e.layout.source;r==="size"?Ft(h=>{const f=o?t.measuredBox[h]:t.layoutBox[h],d=_t(f);f.min=i[h].min,f.max=f.min+d}):Ku(r,t.layoutBox,i)&&Ft(h=>{const f=o?t.measuredBox[h]:t.layoutBox[h],d=_t(i[h]);f.max=f.min+d,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+d)});const a=en();In(a,i,t.layoutBox);const l=en();o?In(l,e.applyTransform(s,!0),t.measuredBox):In(l,i,t.layoutBox);const u=!Au(a);let c=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const m=it();vi(m,t.layoutBox,f.layoutBox);const p=it();vi(p,i,d.layoutBox),Du(m,p)||(c=!0),h.options.layoutRoot&&(e.relativeTarget=p,e.relativeTargetOrigin=m,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:i,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:i}=e.options;i&&i()}e.options.transition=void 0}function Pg(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Ag(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Mg(e){e.clearSnapshot()}function zu(e){e.clearMeasurements()}function Bu(e){e.isLayoutDirty=!1}function Cg(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ju(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Dg(e){e.resolveTargetDelta()}function Eg(e){e.calcProjection()}function kg(e){e.resetSkewAndRotation()}function Vg(e){e.removeLeadSnapshot()}function $u(e,t,n){e.translate=H(t.translate,0,n),e.scale=H(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Uu(e,t,n,i){e.min=H(t.min,n.min,i),e.max=H(t.max,n.max,i)}function Og(e,t,n,i){Uu(e.x,t.x,n.x,i),Uu(e.y,t.y,n.y,i)}function Ng(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Ig={duration:.45,ease:[.4,0,.1,1]},Wu=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Gu=Wu("applewebkit/")&&!Wu("chrome/")?Math.round:It;function qu(e){e.min=Gu(e.min),e.max=Gu(e.max)}function Lg(e){qu(e.x),qu(e.y)}function Ku(e,t,n){return e==="position"||e==="preserve-aspect"&&!rg(Eu(t),Eu(n),.2)}function Fg(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Rg=Ru({attachResizeListener:(e,t)=>Ln(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Mr={current:void 0},Yu=Ru({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Mr.current){const e=new Rg({});e.mount(window),e.setOptions({layoutScroll:!0}),Mr.current=e}return Mr.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Cr=A.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Xu(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function zg(...e){return t=>{let n=!1;const i=e.map(s=>{const r=Xu(s,t);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let s=0;s<i.length;s++){const r=i[s];typeof r=="function"?r():Xu(e[s],null)}}}}function Bg(...e){return jn.useCallback(zg(...e),e)}class jg extends jn.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const i=n.offsetParent,s=fr(i)&&i.offsetWidth||0,r=fr(i)&&i.offsetHeight||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=s-o.width-o.left,o.bottom=r-o.height-o.top}return null}componentDidUpdate(){}render(){return this.props.children}}function $g({children:e,isPresent:t,anchorX:n,anchorY:i,root:s}){var h;const r=A.useId(),o=A.useRef(null),a=A.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=A.useContext(Cr),u=((h=e.props)==null?void 0:h.ref)??(e==null?void 0:e.ref),c=Bg(o,u);return A.useInsertionEffect(()=>{const{width:f,height:d,top:m,left:p,right:y,bottom:g}=a.current;if(t||!o.current||!f||!d)return;const x=n==="left"?`left: ${p}`:`right: ${y}`,v=i==="bottom"?`bottom: ${g}`:`top: ${m}`;o.current.dataset.motionPopId=r;const w=document.createElement("style");l&&(w.nonce=l);const _=s??document.head;return _.appendChild(w),w.sheet&&w.sheet.insertRule(`
|
|
26
26
|
[data-motion-pop-id="${r}"] {
|
|
27
27
|
position: absolute !important;
|
|
28
28
|
width: ${f}px !important;
|
|
@@ -30,49 +30,49 @@
|
|
|
30
30
|
${x}px !important;
|
|
31
31
|
${v}px !important;
|
|
32
32
|
}
|
|
33
|
-
`),()=>{_.contains(w)&&_.removeChild(w)}},[t]),k.jsx(zg,{isPresent:t,childRef:o,sizeRef:a,children:jn.cloneElement(e,{ref:c})})}const jg=({children:e,initial:t,isPresent:n,onExitComplete:i,custom:s,presenceAffectsLayout:r,mode:o,anchorX:a,anchorY:l,root:u})=>{const c=xs($g),h=M.useId();let f=!0,d=M.useMemo(()=>(f=!1,{id:h,initial:t,isPresent:n,custom:s,onExitComplete:m=>{c.set(m,!0);for(const p of c.values())if(!p)return;i&&i()},register:m=>(c.set(m,!1),()=>c.delete(m))}),[n,c,i]);return r&&f&&(d={...d}),M.useMemo(()=>{c.forEach((m,p)=>c.set(p,!1))},[n]),jn.useEffect(()=>{!n&&!c.size&&i&&i()},[n]),o==="popLayout"&&(e=k.jsx(Bg,{isPresent:n,anchorX:a,anchorY:l,root:u,children:e})),k.jsx(ai.Provider,{value:d,children:e})};function $g(){return new Map}function Yu(e=!0){const t=M.useContext(ai);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=t,r=M.useId();M.useEffect(()=>{if(e)return s(r)},[e]);const o=M.useCallback(()=>e&&i&&i(r),[r,i,e]);return!n&&i?[!1,o]:[!0]}const Ti=e=>e.key||"";function Xu(e){const t=[];return M.Children.forEach(e,n=>{M.isValidElement(n)&&t.push(n)}),t}const Ug=({children:e,custom:t,initial:n=!0,onExitComplete:i,presenceAffectsLayout:s=!0,mode:r="sync",propagate:o=!1,anchorX:a="left",anchorY:l="top",root:u})=>{const[c,h]=Yu(o),f=M.useMemo(()=>Xu(e),[e]),d=o&&!c?[]:f.map(Ti),m=M.useRef(!0),p=M.useRef(f),y=xs(()=>new Map),g=M.useRef(new Set),[x,v]=M.useState(f),[w,_]=M.useState(f);Sa(()=>{m.current=!1,p.current=f;for(let b=0;b<w.length;b++){const P=Ti(w[b]);d.includes(P)?(y.delete(P),g.current.delete(P)):y.get(P)!==!0&&y.set(P,!1)}},[w,d.length,d.join("-")]);const T=[];if(f!==x){let b=[...f];for(let P=0;P<w.length;P++){const D=w[P],O=Ti(D);d.includes(O)||(b.splice(P,0,D),T.push(D))}return r==="wait"&&T.length&&(b=T),_(Xu(b)),v(f),null}process.env.NODE_ENV!=="production"&&r==="wait"&&w.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:S}=M.useContext(vs);return k.jsx(k.Fragment,{children:w.map(b=>{const P=Ti(b),D=o&&!c?!1:f===w||d.includes(P),O=()=>{if(g.current.has(P))return;if(g.current.add(P),y.has(P))y.set(P,!0);else return;let A=!0;y.forEach(C=>{C||(A=!1)}),A&&(S==null||S(),_(p.current),o&&(h==null||h()),i&&i())};return k.jsx(jg,{isPresent:D,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:r,root:u,onExitComplete:D?void 0:O,anchorX:a,anchorY:l,children:b},P)})})},Hu=M.createContext({strict:!1}),Zu={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Qu=!1;function Wg(){if(Qu)return;const e={};for(const t in Zu)e[t]={isEnabled:n=>Zu[t].some(i=>!!n[i])};ql(e),Qu=!0}function Ju(){return Wg(),Dm()}function Gg(e){const t=Ju();for(const n in e)t[n]={...t[n],...e[n]};ql(t)}const qg=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function bi(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||qg.has(e)}let tc=e=>!bi(e);function Kg(e){typeof e=="function"&&(tc=t=>t.startsWith("on")?!bi(t):e(t))}try{Kg(require("@emotion/is-prop-valid").default)}catch{}function Yg(e,t,n){const i={};for(const s in e)s==="values"&&typeof e.values=="object"||(tc(s)||n===!0&&bi(s)||!t&&!bi(s)||e.draggable&&s.startsWith("onDrag"))&&(i[s]=e[s]);return i}const Si=M.createContext({});function Xg(e,t){if(gi(e)){const{initial:n,animate:i}=e;return{initial:n===!1||On(n)?n:void 0,animate:On(i)?i:void 0}}return e.inherit!==!1?t:{}}function Hg(e){const{initial:t,animate:n}=Xg(e,M.useContext(Si));return M.useMemo(()=>({initial:t,animate:n}),[ec(t),ec(n)])}function ec(e){return Array.isArray(e)?e.join(" "):e}const Cr=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function nc(e,t,n){for(const i in t)!dt(t[i])&&!ru(i,n)&&(e[i]=t[i])}function Zg({transformTemplate:e},t){return M.useMemo(()=>{const n=Cr();return wr(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Qg(e,t){const n=e.style||{},i={};return nc(i,n,e),Object.assign(i,Zg(e,t)),i}function Jg(e,t){const n={},i=Qg(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=i,n}const ic=()=>({...Cr(),attrs:{}});function t0(e,t,n,i){const s=M.useMemo(()=>{const r=ic();return ou(r,t,lu(i),e.transformTemplate,e.style),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};nc(r,e.style,e),s.style={...r,...s.style}}return s}const e0=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Dr(e){return typeof e!="string"||e.includes("-")?!1:!!(e0.indexOf(e)>-1||/[A-Z]/u.test(e))}function n0(e,t,n,{latestValues:i},s,r=!1,o){const l=(o??Dr(e)?t0:Jg)(t,i,s,e),u=Yg(t,typeof e=="string",r),c=e!==M.Fragment?{...u,...l,ref:n}:{},{children:h}=t,f=M.useMemo(()=>dt(h)?h.get():h,[h]);return M.createElement(e,{...c,children:f})}function i0({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,s){return{latestValues:s0(n,i,s,e),renderState:t()}}function s0(e,t,n,i){const s={},r=i(e,{});for(const f in r)s[f]=xi(r[f]);let{initial:o,animate:a}=e;const l=gi(e),u=Wl(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const h=c?a:o;if(h&&typeof h!="boolean"&&!mi(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d<f.length;d++){const m=sr(e,f[d]);if(m){const{transitionEnd:p,transition:y,...g}=m;for(const x in g){let v=g[x];if(Array.isArray(v)){const w=c?v.length-1:0;v=v[w]}v!==null&&(s[x]=v)}for(const x in p)s[x]=p[x]}}}return s}const sc=e=>(t,n)=>{const i=M.useContext(Si),s=M.useContext(ai),r=()=>i0(e,t,i,s);return n?r():xs(r)},r0=sc({scrapeMotionValuesFromProps:br,createRenderState:Cr}),o0=sc({scrapeMotionValuesFromProps:uu,createRenderState:ic}),a0=Symbol.for("motionComponentSymbol");function l0(e,t,n){const i=M.useRef(n);M.useInsertionEffect(()=>{i.current=n});const s=M.useRef(null);return M.useCallback(r=>{var a;r&&((a=e.onMount)==null||a.call(e,r)),t&&(r?t.mount(r):t.unmount());const o=i.current;if(typeof o=="function")if(r){const l=o(r);typeof l=="function"&&(s.current=l)}else s.current?(s.current(),s.current=null):o(r);else o&&(o.current=r)},[t])}const rc=M.createContext({});function Fn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function u0(e,t,n,i,s,r){var v,w;const{visualElement:o}=M.useContext(Si),a=M.useContext(Hu),l=M.useContext(ai),u=M.useContext(Mr),c=u.reducedMotion,h=u.skipAnimations,f=M.useRef(null),d=M.useRef(!1);i=i||a.renderer,!f.current&&i&&(f.current=i(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,skipAnimations:h,isSVG:r}),d.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const m=f.current,p=M.useContext(rc);m&&!m.projection&&s&&(m.type==="html"||m.type==="svg")&&c0(f.current,n,s,p);const y=M.useRef(!1);M.useInsertionEffect(()=>{m&&y.current&&m.update(n,l)});const g=n[Sl],x=M.useRef(!!g&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,g))&&((w=window.MotionHasOptimisedAnimation)==null?void 0:w.call(window,g)));return Sa(()=>{d.current=!0,m&&(y.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),x.current&&m.animationState&&m.animationState.animateChanges())}),M.useEffect(()=>{m&&(!x.current&&m.animationState&&m.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var _;(_=window.MotionHandoffMarkAsComplete)==null||_.call(window,g)}),x.current=!1),m.enteringChildren=void 0)}),m}function c0(e,t,n,i){const{layoutId:s,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:oc(e.parent)),e.projection.setOptions({layoutId:s,layout:r,alwaysMeasureLayout:!!o||a&&Fn(a),visualElement:e,animationType:typeof r=="string"?r:"both",initialPromotionConfig:i,crossfade:c,layoutScroll:l,layoutRoot:u})}function oc(e){if(e)return e.options.allowProjection!==!1?e.projection:oc(e.parent)}function Er(e,{forwardMotionProps:t=!1,type:n}={},i,s){i&&Gg(i);const r=n?n==="svg":Dr(e),o=r?o0:r0;function a(u,c){let h;const f={...M.useContext(Mr),...u,layoutId:h0(u)},{isStatic:d}=f,m=Hg(u),p=o(u,d);if(!d&&ba){f0(f,i);const y=d0(f);h=y.MeasureLayout,m.visualElement=u0(e,p,f,s,y.ProjectionNode,r)}return k.jsxs(Si.Provider,{value:m,children:[h&&m.visualElement?k.jsx(h,{visualElement:m.visualElement,...f}):null,n0(e,u,l0(p,m.visualElement,c),p,d,t,r)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=M.forwardRef(a);return l[a0]=e,l}function h0({layoutId:e}){const t=M.useContext(vs).id;return t&&e!==void 0?t+"-"+e:e}function f0(e,t){const n=M.useContext(Hu).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const i="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Ke(!1,i,"lazy-strict-mode"):ne(!1,i,"lazy-strict-mode")}}function d0(e){const t=Ju(),{drag:n,layout:i}=t;if(!n&&!i)return{};const s={...n,...i};return{MeasureLayout:n!=null&&n.isEnabled(e)||i!=null&&i.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function p0(e,t){if(typeof Proxy>"u")return Er;const n=new Map,i=(r,o)=>Er(r,o,e,t),s=(r,o)=>(process.env.NODE_ENV!=="production"&&As(!1,"motion() is deprecated. Use motion.create() instead."),i(r,o));return new Proxy(s,{get:(r,o)=>o==="create"?i:(n.has(o)||n.set(o,Er(o,void 0,e,t)),n.get(o))})}const m0=(e,t)=>t.isSVG??Dr(e)?new qm(t):new Bm(t,{allowProjection:e!==M.Fragment});class g0 extends ye{constructor(t){super(t),t.animationState||(t.animationState=Zm(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();mi(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let y0=0;class _0 extends ye{constructor(){super(...arguments),this.id=y0++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const v0={animation:{Feature:g0},exit:{Feature:_0}};function Rn(e){return{point:{x:e.pageX,y:e.pageY}}}const x0=e=>t=>dr(t)&&e(t,Rn(t));function zn(e,t,n,i){return Ln(e,t,x0(n),i)}const ac=({current:e})=>e?e.ownerDocument.defaultView:null,lc=(e,t)=>Math.abs(e-t);function w0(e,t){const n=lc(e.x,t.x),i=lc(e.y,t.y);return Math.sqrt(n**2+i**2)}const uc=new Set(["auto","scroll"]);class cc{constructor(t,n,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=d=>{this.handleScroll(d.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Vr(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,p=w0(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!p)return;const{point:y}=d,{timestamp:g}=lt;this.history.push({...y,timestamp:g});const{onStart:x,onMove:v}=this.handlers;m||(x&&x(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,m)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=kr(m,this.transformPagePoint),U.update(this.updatePoint,!0)},this.handlePointerUp=(d,m)=>{this.end();const{onEnd:p,onSessionEnd:y,resumeAnimation:g}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Vr(d.type==="pointercancel"?this.lastMoveEventInfo:kr(m,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,x),y&&y(d,x)},!dr(t))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=o,this.contextWindow=s||window;const l=Rn(t),u=kr(l,this.transformPagePoint),{point:c}=u,{timestamp:h}=lt;this.history=[{...c,timestamp:h}];const{onSessionStart:f}=n;f&&f(t,Vr(u,this.history)),this.removeListeners=Pn(zn(this.contextWindow,"pointermove",this.handlePointerMove),zn(this.contextWindow,"pointerup",this.handlePointerUp),zn(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const i=getComputedStyle(n);(uc.has(i.overflowX)||uc.has(i.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const i=t===window,s=i?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},r={x:s.x-n.x,y:s.y-n.y};r.x===0&&r.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(t,s),U.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),de(this.updatePoint)}}function kr(e,t){return t?{point:t(e.point)}:e}function hc(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Vr({point:e},t){return{point:e,delta:hc(e,fc(t)),offset:hc(e,T0(t)),velocity:b0(t,.1)}}function T0(e){return e[0]}function fc(e){return e[e.length-1]}function b0(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const s=fc(e);for(;n>=0&&(i=e[n],!(s.timestamp-i.timestamp>Kt(t)));)n--;if(!i)return{x:0,y:0};const r=Ft(s.timestamp-i.timestamp);if(r===0)return{x:0,y:0};const o={x:(s.x-i.x)/r,y:(s.y-i.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function S0(e,{min:t,max:n},i){return t!==void 0&&e<t?e=i?H(t,e,i.min):Math.max(e,t):n!==void 0&&e>n&&(e=i?H(n,e,i.max):Math.min(e,n)),e}function dc(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function P0(e,{top:t,left:n,bottom:i,right:s}){return{x:dc(e.x,n,s),y:dc(e.y,t,i)}}function pc(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}function A0(e,t){return{x:pc(e.x,t.x),y:pc(e.y,t.y)}}function M0(e,t){let n=.5;const i=vt(e),s=vt(t);return s>i?n=An(t.min,t.max-i,e.min):i>s&&(n=An(e.min,e.max-s,t.min)),qt(0,1,n)}function C0(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Or=.35;function D0(e=Or){return e===!1?e=0:e===!0&&(e=Or),{x:mc(e,"left","right"),y:mc(e,"top","bottom")}}function mc(e,t,n){return{min:gc(e,t),max:gc(e,n)}}function gc(e,t){return typeof e=="number"?e:e[t]||0}const E0=new WeakMap;class k0{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=it(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const r=h=>{n?(this.stopAnimation(),this.snapToCursor(Rn(h).point)):this.pauseAnimation()},o=(h,f)=>{this.stopAnimation();const{drag:d,dragPropagation:m,onDragStart:p}=this.getProps();if(d&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=pm(d),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Rt(g=>{let x=this.getAxisMotionValue(g).get()||0;if(Yt.test(x)){const{projection:v}=this.visualElement;if(v&&v.layout){const w=v.layout.layoutBox[g];w&&(x=vt(w)*(parseFloat(x)/100))}}this.originPoint[g]=x}),p&&U.update(()=>p(h,f),!1,!0),or(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:d,dragDirectionLock:m,onDirectionLock:p,onDrag:y}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:g}=f;if(m&&this.currentDirection===null){this.currentDirection=V0(g),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,g),this.updateAxis("y",f.point,g),this.visualElement.render(),y&&U.update(()=>y(h,f),!1,!0)},l=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>Rt(h=>{var f;return this.getAnimationState(h)==="paused"&&((f=this.getAxisMotionValue(h).animation)==null?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new cc(t,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:i,contextWindow:ac(this.visualElement),element:this.visualElement.current})}stop(t,n){const i=t||this.latestPointerEvent,s=n||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!s||!i)return;const{velocity:o}=s;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&U.postRender(()=>a(i,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,i){const{drag:s}=this.getProps();if(!i||!Pi(t,s,this.currentDirection))return;const r=this.getAxisMotionValue(t);let o=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(o=S0(o,this.constraints[t],this.elastic[t])),r.set(o)}resolveConstraints(){var r;const{dragConstraints:t,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(r=this.visualElement.projection)==null?void 0:r.layout,s=this.constraints;t&&Fn(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=P0(i.layoutBox,t):this.constraints=!1,this.elastic=D0(n),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Rt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=C0(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Fn(t))return!1;const i=t.current;ne(i!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const r=Nm(i,s.root,this.visualElement.getTransformPagePoint());let o=A0(s.layout.layoutBox,r);if(n){const a=n(km(o));this.hasMutatedConstraints=!!a,a&&(o=Yl(a))}return o}startAnimation(t){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Rt(c=>{if(!Pi(c,n,this.currentDirection))return;let h=l&&l[c]||{};o&&(h={min:0,max:0});const f=s?200:1e6,d=s?40:1e7,m={type:"inertia",velocity:i?t[c]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const i=this.getAxisMotionValue(t);return or(this.visualElement,t),i.start(ir(t,i,0,n,this.visualElement,!1))}stopAnimation(){Rt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Rt(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),s=i[n];return s||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){Rt(n=>{const{drag:i}=this.getProps();if(!Pi(n,i,this.currentDirection))return;const{projection:s}=this.visualElement,r=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n],l=r.get()||0;r.set(t[n]-H(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!Fn(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Rt(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();s[o]=M0({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),Rt(o=>{if(!Pi(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(H(l,u,s[o]))})}addListeners(){if(!this.visualElement.current)return;E0.set(this.visualElement,this);const t=this.visualElement.current,n=zn(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps(),h=l.target,f=h!==t&&vm(h);u&&c&&!f&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();Fn(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,r=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),U.read(i);const o=Ln(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Rt(c=>{const h=this.getAxisMotionValue(c);h&&(this.originPoint[c]+=l[c].translate,h.set(h.get()+l[c].translate))}),this.visualElement.render())}));return()=>{o(),n(),r(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:r=!1,dragElastic:o=Or,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:i,dragPropagation:s,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function Pi(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function V0(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class O0 extends ye{constructor(t){super(t),this.removeGroupControls=Lt,this.removeListeners=Lt,this.controls=new k0(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Lt}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Nr=e=>(t,n)=>{e&&U.update(()=>e(t,n),!1,!0)};class N0 extends ye{constructor(){super(...arguments),this.removePointerDownListener=Lt}onPointerDown(t){this.session=new cc(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ac(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:Nr(t),onStart:Nr(n),onMove:Nr(i),onEnd:(r,o)=>{delete this.session,s&&U.postRender(()=>s(r,o))}}}mount(){this.removePointerDownListener=zn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Ir=!1;class I0 extends M.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i,layoutId:s}=this.props,{projection:r}=t;r&&(n.group&&n.group.add(r),i&&i.register&&s&&i.register(r),Ir&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),wi.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:i,drag:s,isPresent:r}=this.props,{projection:o}=i;return o&&(o.isPresent=r,t.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),Ir=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==r?o.willUpdate():this.safeToRemove(),t.isPresent!==r&&(r?o.promote():o.relegate()||U.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),fr.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:s}=t;Ir=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function yc(e){const[t,n]=Yu(),i=M.useContext(vs);return k.jsx(I0,{...e,layoutGroup:i,switchLayoutGroup:M.useContext(rc),isPresent:t,safeToRemove:n})}const L0={pan:{Feature:N0},drag:{Feature:O0,ProjectionNode:qu,MeasureLayout:yc}};function _c(e,t,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,r=i[s];r&&U.postRender(()=>r(t,Rn(t)))}class F0 extends ye{mount(){const{current:t}=this.node;t&&(this.unmount=mm(t,(n,i)=>(_c(this.node,i,"Start"),s=>_c(this.node,s,"End"))))}unmount(){}}class R0 extends ye{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Pn(Ln(this.node.current,"focus",()=>this.onFocus()),Ln(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function vc(e,t,n){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),r=i[s];r&&U.postRender(()=>r(t,Rn(t)))}class z0 extends ye{mount(){const{current:t}=this.node;t&&(this.unmount=wm(t,(n,i)=>(vc(this.node,i,"Start"),(s,{success:r})=>vc(this.node,s,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Lr=new WeakMap,Fr=new WeakMap,B0=e=>{const t=Lr.get(e.target);t&&t(e)},j0=e=>{e.forEach(B0)};function $0({root:e,...t}){const n=e||document;Fr.has(n)||Fr.set(n,{});const i=Fr.get(n),s=JSON.stringify(t);return i[s]||(i[s]=new IntersectionObserver(j0,{root:e,...t})),i[s]}function U0(e,t,n){const i=$0(t);return Lr.set(e,n),i.observe(e),()=>{Lr.delete(e),i.unobserve(e)}}const W0={some:0,all:1};class G0 extends ye{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:i,amount:s="some",once:r}=t,o={root:n?n.current:void 0,rootMargin:i,threshold:typeof s=="number"?s:W0[s]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,r&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),f=u?c:h;f&&f(l)};return U0(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(q0(t,n))&&this.startObserver()}unmount(){}}function q0({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const K0={...v0,...{inView:{Feature:G0},tap:{Feature:z0},focus:{Feature:R0},hover:{Feature:F0}},...L0,...{layout:{ProjectionNode:qu,MeasureLayout:yc}}},Y0=p0(K0,m0);/**
|
|
33
|
+
`),()=>{_.contains(w)&&_.removeChild(w)}},[t]),E.jsx(jg,{isPresent:t,childRef:o,sizeRef:a,children:jn.cloneElement(e,{ref:c})})}const Ug=({children:e,initial:t,isPresent:n,onExitComplete:i,custom:s,presenceAffectsLayout:r,mode:o,anchorX:a,anchorY:l,root:u})=>{const c=ws(Wg),h=A.useId();let f=!0,d=A.useMemo(()=>(f=!1,{id:h,initial:t,isPresent:n,custom:s,onExitComplete:m=>{c.set(m,!0);for(const p of c.values())if(!p)return;i&&i()},register:m=>(c.set(m,!1),()=>c.delete(m))}),[n,c,i]);return r&&f&&(d={...d}),A.useMemo(()=>{c.forEach((m,p)=>c.set(p,!1))},[n]),jn.useEffect(()=>{!n&&!c.size&&i&&i()},[n]),o==="popLayout"&&(e=E.jsx($g,{isPresent:n,anchorX:a,anchorY:l,root:u,children:e})),E.jsx(ai.Provider,{value:d,children:e})};function Wg(){return new Map}function Hu(e=!0){const t=A.useContext(ai);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=t,r=A.useId();A.useEffect(()=>{if(e)return s(r)},[e]);const o=A.useCallback(()=>e&&i&&i(r),[r,i,e]);return!n&&i?[!1,o]:[!0]}const Ti=e=>e.key||"";function Zu(e){const t=[];return A.Children.forEach(e,n=>{A.isValidElement(n)&&t.push(n)}),t}const Gg=({children:e,custom:t,initial:n=!0,onExitComplete:i,presenceAffectsLayout:s=!0,mode:r="sync",propagate:o=!1,anchorX:a="left",anchorY:l="top",root:u})=>{const[c,h]=Hu(o),f=A.useMemo(()=>Zu(e),[e]),d=o&&!c?[]:f.map(Ti),m=A.useRef(!0),p=A.useRef(f),y=ws(()=>new Map),g=A.useRef(new Set),[x,v]=A.useState(f),[w,_]=A.useState(f);Aa(()=>{m.current=!1,p.current=f;for(let b=0;b<w.length;b++){const P=Ti(w[b]);d.includes(P)?(y.delete(P),g.current.delete(P)):y.get(P)!==!0&&y.set(P,!1)}},[w,d.length,d.join("-")]);const T=[];if(f!==x){let b=[...f];for(let P=0;P<w.length;P++){const C=w[P],I=Ti(C);d.includes(I)||(b.splice(P,0,C),T.push(C))}return r==="wait"&&T.length&&(b=T),_(Zu(b)),v(f),null}process.env.NODE_ENV!=="production"&&r==="wait"&&w.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:S}=A.useContext(xs);return E.jsx(E.Fragment,{children:w.map(b=>{const P=Ti(b),C=o&&!c?!1:f===w||d.includes(P),I=()=>{if(g.current.has(P))return;if(g.current.add(P),y.has(P))y.set(P,!0);else return;let O=!0;y.forEach(M=>{M||(O=!1)}),O&&(S==null||S(),_(p.current),o&&(h==null||h()),i&&i())};return E.jsx(Ug,{isPresent:C,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:r,root:u,onExitComplete:C?void 0:I,anchorX:a,anchorY:l,children:b},P)})})},Qu=A.createContext({strict:!1}),Ju={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let tc=!1;function qg(){if(tc)return;const e={};for(const t in Ju)e[t]={isEnabled:n=>Ju[t].some(i=>!!n[i])};Yl(e),tc=!0}function ec(){return qg(),km()}function Kg(e){const t=ec();for(const n in e)t[n]={...t[n],...e[n]};Yl(t)}const Yg=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function bi(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Yg.has(e)}let nc=e=>!bi(e);function Xg(e){typeof e=="function"&&(nc=t=>t.startsWith("on")?!bi(t):e(t))}try{Xg(require("@emotion/is-prop-valid").default)}catch{}function Hg(e,t,n){const i={};for(const s in e)s==="values"&&typeof e.values=="object"||(nc(s)||n===!0&&bi(s)||!t&&!bi(s)||e.draggable&&s.startsWith("onDrag"))&&(i[s]=e[s]);return i}const Si=A.createContext({});function Zg(e,t){if(gi(e)){const{initial:n,animate:i}=e;return{initial:n===!1||On(n)?n:void 0,animate:On(i)?i:void 0}}return e.inherit!==!1?t:{}}function Qg(e){const{initial:t,animate:n}=Zg(e,A.useContext(Si));return A.useMemo(()=>({initial:t,animate:n}),[ic(t),ic(n)])}function ic(e){return Array.isArray(e)?e.join(" "):e}const Dr=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function sc(e,t,n){for(const i in t)!ft(t[i])&&!au(i,n)&&(e[i]=t[i])}function Jg({transformTemplate:e},t){return A.useMemo(()=>{const n=Dr();return Tr(n,t,e),Object.assign({},n.vars,n.style)},[t])}function t0(e,t){const n=e.style||{},i={};return sc(i,n,e),Object.assign(i,Jg(e,t)),i}function e0(e,t){const n={},i=t0(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=i,n}const rc=()=>({...Dr(),attrs:{}});function n0(e,t,n,i){const s=A.useMemo(()=>{const r=rc();return lu(r,t,cu(i),e.transformTemplate,e.style),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};sc(r,e.style,e),s.style={...r,...s.style}}return s}const i0=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Er(e){return typeof e!="string"||e.includes("-")?!1:!!(i0.indexOf(e)>-1||/[A-Z]/u.test(e))}function s0(e,t,n,{latestValues:i},s,r=!1,o){const l=(o??Er(e)?n0:e0)(t,i,s,e),u=Hg(t,typeof e=="string",r),c=e!==A.Fragment?{...u,...l,ref:n}:{},{children:h}=t,f=A.useMemo(()=>ft(h)?h.get():h,[h]);return A.createElement(e,{...c,children:f})}function r0({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,s){return{latestValues:o0(n,i,s,e),renderState:t()}}function o0(e,t,n,i){const s={},r=i(e,{});for(const f in r)s[f]=xi(r[f]);let{initial:o,animate:a}=e;const l=gi(e),u=ql(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const h=c?a:o;if(h&&typeof h!="boolean"&&!mi(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d<f.length;d++){const m=rr(e,f[d]);if(m){const{transitionEnd:p,transition:y,...g}=m;for(const x in g){let v=g[x];if(Array.isArray(v)){const w=c?v.length-1:0;v=v[w]}v!==null&&(s[x]=v)}for(const x in p)s[x]=p[x]}}}return s}const oc=e=>(t,n)=>{const i=A.useContext(Si),s=A.useContext(ai),r=()=>r0(e,t,i,s);return n?r():ws(r)},a0=oc({scrapeMotionValuesFromProps:Sr,createRenderState:Dr}),l0=oc({scrapeMotionValuesFromProps:hu,createRenderState:rc}),u0=Symbol.for("motionComponentSymbol");function c0(e,t,n){const i=A.useRef(n);A.useInsertionEffect(()=>{i.current=n});const s=A.useRef(null);return A.useCallback(r=>{var a;r&&((a=e.onMount)==null||a.call(e,r)),t&&(r?t.mount(r):t.unmount());const o=i.current;if(typeof o=="function")if(r){const l=o(r);typeof l=="function"&&(s.current=l)}else s.current?(s.current(),s.current=null):o(r);else o&&(o.current=r)},[t])}const ac=A.createContext({});function Fn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function h0(e,t,n,i,s,r){var v,w;const{visualElement:o}=A.useContext(Si),a=A.useContext(Qu),l=A.useContext(ai),u=A.useContext(Cr),c=u.reducedMotion,h=u.skipAnimations,f=A.useRef(null),d=A.useRef(!1);i=i||a.renderer,!f.current&&i&&(f.current=i(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,skipAnimations:h,isSVG:r}),d.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const m=f.current,p=A.useContext(ac);m&&!m.projection&&s&&(m.type==="html"||m.type==="svg")&&f0(f.current,n,s,p);const y=A.useRef(!1);A.useInsertionEffect(()=>{m&&y.current&&m.update(n,l)});const g=n[Al],x=A.useRef(!!g&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,g))&&((w=window.MotionHasOptimisedAnimation)==null?void 0:w.call(window,g)));return Aa(()=>{d.current=!0,m&&(y.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),x.current&&m.animationState&&m.animationState.animateChanges())}),A.useEffect(()=>{m&&(!x.current&&m.animationState&&m.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var _;(_=window.MotionHandoffMarkAsComplete)==null||_.call(window,g)}),x.current=!1),m.enteringChildren=void 0)}),m}function f0(e,t,n,i){const{layoutId:s,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:lc(e.parent)),e.projection.setOptions({layoutId:s,layout:r,alwaysMeasureLayout:!!o||a&&Fn(a),visualElement:e,animationType:typeof r=="string"?r:"both",initialPromotionConfig:i,crossfade:c,layoutScroll:l,layoutRoot:u})}function lc(e){if(e)return e.options.allowProjection!==!1?e.projection:lc(e.parent)}function kr(e,{forwardMotionProps:t=!1,type:n}={},i,s){i&&Kg(i);const r=n?n==="svg":Er(e),o=r?l0:a0;function a(u,c){let h;const f={...A.useContext(Cr),...u,layoutId:d0(u)},{isStatic:d}=f,m=Qg(u),p=o(u,d);if(!d&&Pa){p0(f,i);const y=m0(f);h=y.MeasureLayout,m.visualElement=h0(e,p,f,s,y.ProjectionNode,r)}return E.jsxs(Si.Provider,{value:m,children:[h&&m.visualElement?E.jsx(h,{visualElement:m.visualElement,...f}):null,s0(e,u,c0(p,m.visualElement,c),p,d,t,r)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=A.forwardRef(a);return l[u0]=e,l}function d0({layoutId:e}){const t=A.useContext(xs).id;return t&&e!==void 0?t+"-"+e:e}function p0(e,t){const n=A.useContext(Qu).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const i="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Ke(!1,i,"lazy-strict-mode"):ne(!1,i,"lazy-strict-mode")}}function m0(e){const t=ec(),{drag:n,layout:i}=t;if(!n&&!i)return{};const s={...n,...i};return{MeasureLayout:n!=null&&n.isEnabled(e)||i!=null&&i.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function g0(e,t){if(typeof Proxy>"u")return kr;const n=new Map,i=(r,o)=>kr(r,o,e,t),s=(r,o)=>(process.env.NODE_ENV!=="production"&&Ms(!1,"motion() is deprecated. Use motion.create() instead."),i(r,o));return new Proxy(s,{get:(r,o)=>o==="create"?i:(n.has(o)||n.set(o,kr(o,void 0,e,t)),n.get(o))})}const y0=(e,t)=>t.isSVG??Er(e)?new Ym(t):new $m(t,{allowProjection:e!==A.Fragment});class _0 extends ye{constructor(t){super(t),t.animationState||(t.animationState=Jm(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();mi(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let v0=0;class x0 extends ye{constructor(){super(...arguments),this.id=v0++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const w0={animation:{Feature:_0},exit:{Feature:x0}};function Rn(e){return{point:{x:e.pageX,y:e.pageY}}}const T0=e=>t=>pr(t)&&e(t,Rn(t));function zn(e,t,n,i){return Ln(e,t,T0(n),i)}const uc=({current:e})=>e?e.ownerDocument.defaultView:null,cc=(e,t)=>Math.abs(e-t);function b0(e,t){const n=cc(e.x,t.x),i=cc(e.y,t.y);return Math.sqrt(n**2+i**2)}const hc=new Set(["auto","scroll"]);class fc{constructor(t,n,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=d=>{this.handleScroll(d.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Or(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,p=b0(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!p)return;const{point:y}=d,{timestamp:g}=lt;this.history.push({...y,timestamp:g});const{onStart:x,onMove:v}=this.handlers;m||(x&&x(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,m)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Vr(m,this.transformPagePoint),U.update(this.updatePoint,!0)},this.handlePointerUp=(d,m)=>{this.end();const{onEnd:p,onSessionEnd:y,resumeAnimation:g}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Or(d.type==="pointercancel"?this.lastMoveEventInfo:Vr(m,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,x),y&&y(d,x)},!pr(t))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=o,this.contextWindow=s||window;const l=Rn(t),u=Vr(l,this.transformPagePoint),{point:c}=u,{timestamp:h}=lt;this.history=[{...c,timestamp:h}];const{onSessionStart:f}=n;f&&f(t,Or(u,this.history)),this.removeListeners=Pn(zn(this.contextWindow,"pointermove",this.handlePointerMove),zn(this.contextWindow,"pointerup",this.handlePointerUp),zn(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const i=getComputedStyle(n);(hc.has(i.overflowX)||hc.has(i.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const i=t===window,s=i?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},r={x:s.x-n.x,y:s.y-n.y};r.x===0&&r.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(t,s),U.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),de(this.updatePoint)}}function Vr(e,t){return t?{point:t(e.point)}:e}function dc(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Or({point:e},t){return{point:e,delta:dc(e,pc(t)),offset:dc(e,S0(t)),velocity:P0(t,.1)}}function S0(e){return e[0]}function pc(e){return e[e.length-1]}function P0(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const s=pc(e);for(;n>=0&&(i=e[n],!(s.timestamp-i.timestamp>Kt(t)));)n--;if(!i)return{x:0,y:0};const r=Lt(s.timestamp-i.timestamp);if(r===0)return{x:0,y:0};const o={x:(s.x-i.x)/r,y:(s.y-i.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function A0(e,{min:t,max:n},i){return t!==void 0&&e<t?e=i?H(t,e,i.min):Math.max(e,t):n!==void 0&&e>n&&(e=i?H(n,e,i.max):Math.min(e,n)),e}function mc(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function M0(e,{top:t,left:n,bottom:i,right:s}){return{x:mc(e.x,n,s),y:mc(e.y,t,i)}}function gc(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}function C0(e,t){return{x:gc(e.x,t.x),y:gc(e.y,t.y)}}function D0(e,t){let n=.5;const i=_t(e),s=_t(t);return s>i?n=An(t.min,t.max-i,e.min):i>s&&(n=An(e.min,e.max-s,t.min)),qt(0,1,n)}function E0(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Nr=.35;function k0(e=Nr){return e===!1?e=0:e===!0&&(e=Nr),{x:yc(e,"left","right"),y:yc(e,"top","bottom")}}function yc(e,t,n){return{min:_c(e,t),max:_c(e,n)}}function _c(e,t){return typeof e=="number"?e:e[t]||0}const V0=new WeakMap;class O0{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=it(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const r=h=>{n?(this.stopAnimation(),this.snapToCursor(Rn(h).point)):this.pauseAnimation()},o=(h,f)=>{this.stopAnimation();const{drag:d,dragPropagation:m,onDragStart:p}=this.getProps();if(d&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=gm(d),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ft(g=>{let x=this.getAxisMotionValue(g).get()||0;if(Yt.test(x)){const{projection:v}=this.visualElement;if(v&&v.layout){const w=v.layout.layoutBox[g];w&&(x=_t(w)*(parseFloat(x)/100))}}this.originPoint[g]=x}),p&&U.update(()=>p(h,f),!1,!0),ar(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:d,dragDirectionLock:m,onDirectionLock:p,onDrag:y}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:g}=f;if(m&&this.currentDirection===null){this.currentDirection=N0(g),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,g),this.updateAxis("y",f.point,g),this.visualElement.render(),y&&U.update(()=>y(h,f),!1,!0)},l=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>Ft(h=>{var f;return this.getAnimationState(h)==="paused"&&((f=this.getAxisMotionValue(h).animation)==null?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new fc(t,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:i,contextWindow:uc(this.visualElement),element:this.visualElement.current})}stop(t,n){const i=t||this.latestPointerEvent,s=n||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!s||!i)return;const{velocity:o}=s;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&U.postRender(()=>a(i,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,i){const{drag:s}=this.getProps();if(!i||!Pi(t,s,this.currentDirection))return;const r=this.getAxisMotionValue(t);let o=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(o=A0(o,this.constraints[t],this.elastic[t])),r.set(o)}resolveConstraints(){var r;const{dragConstraints:t,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(r=this.visualElement.projection)==null?void 0:r.layout,s=this.constraints;t&&Fn(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=M0(i.layoutBox,t):this.constraints=!1,this.elastic=k0(n),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Ft(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=E0(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Fn(t))return!1;const i=t.current;ne(i!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const r=Lm(i,s.root,this.visualElement.getTransformPagePoint());let o=C0(s.layout.layoutBox,r);if(n){const a=n(Om(o));this.hasMutatedConstraints=!!a,a&&(o=Hl(a))}return o}startAnimation(t){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Ft(c=>{if(!Pi(c,n,this.currentDirection))return;let h=l&&l[c]||{};o&&(h={min:0,max:0});const f=s?200:1e6,d=s?40:1e7,m={type:"inertia",velocity:i?t[c]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const i=this.getAxisMotionValue(t);return ar(this.visualElement,t),i.start(sr(t,i,0,n,this.visualElement,!1))}stopAnimation(){Ft(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ft(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),s=i[n];return s||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){Ft(n=>{const{drag:i}=this.getProps();if(!Pi(n,i,this.currentDirection))return;const{projection:s}=this.visualElement,r=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n],l=r.get()||0;r.set(t[n]-H(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!Fn(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Ft(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();s[o]=D0({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),Ft(o=>{if(!Pi(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(H(l,u,s[o]))})}addListeners(){if(!this.visualElement.current)return;V0.set(this.visualElement,this);const t=this.visualElement.current,n=zn(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps(),h=l.target,f=h!==t&&wm(h);u&&c&&!f&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();Fn(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,r=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),U.read(i);const o=Ln(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Ft(c=>{const h=this.getAxisMotionValue(c);h&&(this.originPoint[c]+=l[c].translate,h.set(h.get()+l[c].translate))}),this.visualElement.render())}));return()=>{o(),n(),r(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:r=!1,dragElastic:o=Nr,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:i,dragPropagation:s,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function Pi(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function N0(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class I0 extends ye{constructor(t){super(t),this.removeGroupControls=It,this.removeListeners=It,this.controls=new O0(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||It}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Ir=e=>(t,n)=>{e&&U.update(()=>e(t,n),!1,!0)};class L0 extends ye{constructor(){super(...arguments),this.removePointerDownListener=It}onPointerDown(t){this.session=new fc(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:uc(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:Ir(t),onStart:Ir(n),onMove:Ir(i),onEnd:(r,o)=>{delete this.session,s&&U.postRender(()=>s(r,o))}}}mount(){this.removePointerDownListener=zn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Lr=!1;class F0 extends A.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i,layoutId:s}=this.props,{projection:r}=t;r&&(n.group&&n.group.add(r),i&&i.register&&s&&i.register(r),Lr&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),wi.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:i,drag:s,isPresent:r}=this.props,{projection:o}=i;return o&&(o.isPresent=r,t.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),Lr=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==r?o.willUpdate():this.safeToRemove(),t.isPresent!==r&&(r?o.promote():o.relegate()||U.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),dr.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:s}=t;Lr=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function vc(e){const[t,n]=Hu(),i=A.useContext(xs);return E.jsx(F0,{...e,layoutGroup:i,switchLayoutGroup:A.useContext(ac),isPresent:t,safeToRemove:n})}const R0={pan:{Feature:L0},drag:{Feature:I0,ProjectionNode:Yu,MeasureLayout:vc}};function xc(e,t,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,r=i[s];r&&U.postRender(()=>r(t,Rn(t)))}class z0 extends ye{mount(){const{current:t}=this.node;t&&(this.unmount=ym(t,(n,i)=>(xc(this.node,i,"Start"),s=>xc(this.node,s,"End"))))}unmount(){}}class B0 extends ye{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Pn(Ln(this.node.current,"focus",()=>this.onFocus()),Ln(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function wc(e,t,n){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),r=i[s];r&&U.postRender(()=>r(t,Rn(t)))}class j0 extends ye{mount(){const{current:t}=this.node;t&&(this.unmount=bm(t,(n,i)=>(wc(this.node,i,"Start"),(s,{success:r})=>wc(this.node,s,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Fr=new WeakMap,Rr=new WeakMap,$0=e=>{const t=Fr.get(e.target);t&&t(e)},U0=e=>{e.forEach($0)};function W0({root:e,...t}){const n=e||document;Rr.has(n)||Rr.set(n,{});const i=Rr.get(n),s=JSON.stringify(t);return i[s]||(i[s]=new IntersectionObserver(U0,{root:e,...t})),i[s]}function G0(e,t,n){const i=W0(t);return Fr.set(e,n),i.observe(e),()=>{Fr.delete(e),i.unobserve(e)}}const q0={some:0,all:1};class K0 extends ye{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:i,amount:s="some",once:r}=t,o={root:n?n.current:void 0,rootMargin:i,threshold:typeof s=="number"?s:q0[s]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,r&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),f=u?c:h;f&&f(l)};return G0(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Y0(t,n))&&this.startObserver()}unmount(){}}function Y0({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const X0={...w0,...{inView:{Feature:K0},tap:{Feature:j0},focus:{Feature:B0},hover:{Feature:z0}},...R0,...{layout:{ProjectionNode:Yu,MeasureLayout:vc}}},H0=g0(X0,y0);/**
|
|
34
34
|
* @license lucide-react v0.563.0 - ISC
|
|
35
35
|
*
|
|
36
36
|
* This source code is licensed under the ISC license.
|
|
37
37
|
* See the LICENSE file in the root directory of this source tree.
|
|
38
|
-
*/const
|
|
38
|
+
*/const Tc=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim();/**
|
|
39
39
|
* @license lucide-react v0.563.0 - ISC
|
|
40
40
|
*
|
|
41
41
|
* This source code is licensed under the ISC license.
|
|
42
42
|
* See the LICENSE file in the root directory of this source tree.
|
|
43
|
-
*/const
|
|
43
|
+
*/const Z0=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
44
44
|
* @license lucide-react v0.563.0 - ISC
|
|
45
45
|
*
|
|
46
46
|
* This source code is licensed under the ISC license.
|
|
47
47
|
* See the LICENSE file in the root directory of this source tree.
|
|
48
|
-
*/const
|
|
48
|
+
*/const Q0=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,i)=>i?i.toUpperCase():n.toLowerCase());/**
|
|
49
49
|
* @license lucide-react v0.563.0 - ISC
|
|
50
50
|
*
|
|
51
51
|
* This source code is licensed under the ISC license.
|
|
52
52
|
* See the LICENSE file in the root directory of this source tree.
|
|
53
|
-
*/const
|
|
53
|
+
*/const bc=e=>{const t=Q0(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
|
54
54
|
* @license lucide-react v0.563.0 - ISC
|
|
55
55
|
*
|
|
56
56
|
* This source code is licensed under the ISC license.
|
|
57
57
|
* See the LICENSE file in the root directory of this source tree.
|
|
58
|
-
*/var
|
|
58
|
+
*/var J0={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
59
59
|
* @license lucide-react v0.563.0 - ISC
|
|
60
60
|
*
|
|
61
61
|
* This source code is licensed under the ISC license.
|
|
62
62
|
* See the LICENSE file in the root directory of this source tree.
|
|
63
|
-
*/const
|
|
63
|
+
*/const ty=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
|
|
64
64
|
* @license lucide-react v0.563.0 - ISC
|
|
65
65
|
*
|
|
66
66
|
* This source code is licensed under the ISC license.
|
|
67
67
|
* See the LICENSE file in the root directory of this source tree.
|
|
68
|
-
*/const
|
|
68
|
+
*/const ey=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:s="",children:r,iconNode:o,...a},l)=>A.createElement("svg",{ref:l,...J0,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:Tc("lucide",s),...!r&&!ty(a)&&{"aria-hidden":"true"},...a},[...o.map(([u,c])=>A.createElement(u,c)),...Array.isArray(r)?r:[r]]));/**
|
|
69
69
|
* @license lucide-react v0.563.0 - ISC
|
|
70
70
|
*
|
|
71
71
|
* This source code is licensed under the ISC license.
|
|
72
72
|
* See the LICENSE file in the root directory of this source tree.
|
|
73
|
-
*/const
|
|
73
|
+
*/const ny=(e,t)=>{const n=A.forwardRef(({className:i,...s},r)=>A.createElement(ey,{ref:r,iconNode:t,className:Tc(`lucide-${Z0(bc(e))}`,`lucide-${e}`,i),...s}));return n.displayName=bc(e),n};/**
|
|
74
74
|
* @license lucide-react v0.563.0 - ISC
|
|
75
75
|
*
|
|
76
76
|
* This source code is licensed under the ISC license.
|
|
77
77
|
* See the LICENSE file in the root directory of this source tree.
|
|
78
|
-
*/const
|
|
78
|
+
*/const iy=ny("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),sy=({selectedNode:e,onClose:t})=>E.jsx(E.Fragment,{children:E.jsx(Gg,{children:e&&E.jsx(H0.div,{initial:{opacity:0,y:10,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.9},className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-20 pointer-events-auto",children:E.jsxs("div",{className:"w-[400px] bg-[#1a1a1a] rounded-xl shadow-2xl p-6 text-white relative flex flex-col items-center text-center",children:[E.jsx("button",{onClick:t,className:"absolute top-4 right-4 text-white/40 hover:text-white transition-colors",children:E.jsx(iy,{size:16})}),E.jsx("div",{className:"text-[10px] font-mono uppercase tracking-widest text-[#A0C4FF] mb-3",children:e.cluster}),E.jsx("h2",{className:"text-3xl font-bold mb-4 tracking-tight",children:e.label}),E.jsx("div",{className:"w-8 h-[1px] bg-white/20 mb-4"}),E.jsx("p",{className:"text-sm text-white/70 leading-relaxed mb-6 font-light",children:e.description}),E.jsxs("div",{className:"grid grid-cols-2 gap-4 w-full border-t border-white/10 pt-4",children:[E.jsxs("div",{children:[E.jsx("div",{className:"text-[10px] uppercase text-white/40 mb-1",children:"Status"}),E.jsx("div",{className:"text-sm",children:"Active Protocol"})]}),E.jsxs("div",{children:[E.jsx("div",{className:"text-[10px] uppercase text-white/40 mb-1",children:"Website"}),E.jsx("a",{href:"#",className:"text-sm border-b border-white/30 hover:border-white pb-0.5 transition-colors",children:"noded.js.org"})]})]})]})})})}),ry={[q.Core]:0,[q.Finance]:0,[q.Social]:0,[q.Infrastructure]:0,[q.Network]:qe.graph.network_node_count},oy=()=>{const e=[],t=[];Object.values(ni).forEach(r=>{const o=ry[r.id];for(let a=0;a<o;a++){const l=`${r.id.toLowerCase()}-${a}`,u=r.id===q.Network?qe.graph.network_spread:40;let c,h,f;if(r.id===q.Network){const d=Math.cbrt(Math.random())*u,m=Math.random()*2*Math.PI,p=Math.acos(2*Math.random()-1);c=r.center[0]+d*Math.sin(p)*Math.cos(m),h=r.center[1]+d*Math.sin(p)*Math.sin(m),f=r.center[2]+d*Math.cos(p)}e.push({id:l,label:r.id===q.Network?"":`${r.label} Node ${a+1}`,cluster:r.id,description:`High-performance node processing unit within the ${r.label} sector. Handles distributed consensus and data sharding.`,tags:["Protocol","Level 2","Secure"],connections:[],size:r.id===q.Network?2:r.id===q.Core?32:Math.random()>.8?16:6,x:c,y:h,z:f})}});const n=e.filter(r=>r.cluster===q.Network),i=qe.graph.connection_distance*qe.graph.connection_distance;n.forEach((r,o)=>{if(Math.random()>.7)return;let a=[];n.forEach((l,u)=>{if(o===u)return;const c=(r.x||0)-(l.x||0),h=(r.y||0)-(l.y||0),f=(r.z||0)-(l.z||0),d=c*c+h*h+f*f;d<i&&a.push({dist:d,id:l.id})}),a.sort((l,u)=>l.dist-u.dist),a.slice(0,2).forEach(l=>{t.push({source:r.id,target:l.id,value:.2})})}),e.filter(r=>r.cluster!==q.Network).forEach((r,o)=>{const a=e.filter(u=>u.cluster===r.cluster&&u.id!==r.id),l=2+Math.floor(Math.random()*2);for(let u=0;u<l;u++){const c=a[Math.floor(Math.random()*a.length)];c&&(t.push({source:r.id,target:c.id,value:1}),r.connections.push(c.id))}});const s=Object.values(ni);return s.forEach(r=>{s.forEach(o=>{if(r.id!==o.id)for(let a=0;a<3;a++){const l=e.filter(f=>f.cluster===r.id),u=e.filter(f=>f.cluster===o.id),c=l[Math.floor(Math.random()*l.length)],h=u[Math.floor(Math.random()*u.length)];c&&h&&t.push({source:c.id,target:h.id,value:.5})}})}),{nodes:e,links:t}};ut.ClusterId=q,ut.GalaxyGraph=ba,ut.GraphScene=pd,ut.OverlayUI=sy,ut.defaultConfig=qe,ut.generateGraphData=oy,Object.defineProperty(ut,Symbol.toStringTag,{value:"Module"})}));
|