@dss-kit/ui-kit 0.1.6 → 0.1.7
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/dist/components/builders/Box/Box.d.ts.map +1 -1
- package/dist/components/builders/Loader/Loader.d.ts.map +1 -1
- package/dist/components/builders/Modal/Modal.d.ts.map +1 -1
- package/dist/components/builders/Modal/Modal.stories.d.ts.map +1 -1
- package/dist/components/builders/Modal/ModalFooter/ModalFooter.d.ts.map +1 -1
- package/dist/components/builders/Modal/ModalHeader/ModalHeader.d.ts.map +1 -1
- package/dist/components/builders/Modal/ModalMain/ModalMain.d.ts +1 -1
- package/dist/components/builders/Modal/ModalMain/ModalMain.d.ts.map +1 -1
- package/dist/components/builders/Modal/index.d.ts.map +1 -1
- package/dist/components/builders/Ripple/Ripple.d.ts.map +1 -1
- package/dist/components/builders/Text/Text.d.ts.map +1 -1
- package/dist/components/builders/Text/Text.stories.d.ts.map +1 -1
- package/dist/components/controls/Button/Button.d.ts +1 -1
- package/dist/components/controls/Button/Button.d.ts.map +1 -1
- package/dist/components/controls/Button/styles.d.ts.map +1 -1
- package/dist/components/controls/Button/types.d.ts.map +1 -1
- package/dist/components/controls/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/controls/IconButton/IconButton.stories.d.ts.map +1 -1
- package/dist/components/controls/IconButton/IconButton.types.d.ts +1 -1
- package/dist/components/controls/IconButton/IconButton.types.d.ts.map +1 -1
- package/dist/components/controls/Input/Input.d.ts.map +1 -1
- package/dist/components/controls/Input/Input.stories.d.ts.map +1 -1
- package/dist/components/controls/Select/Select.d.ts.map +1 -1
- package/dist/components/controls/Select/Select.stories.d.ts.map +1 -1
- package/dist/components/controls/Switch/Switch.d.ts.map +1 -1
- package/dist/components/controls/Switch/Switch.stories.d.ts.map +1 -1
- package/dist/components/shared/Avatar/Avatar.stories.d.ts.map +1 -1
- package/dist/components/shared/Hint/Hint.d.ts.map +1 -1
- package/dist/components/shared/Hint/Hint.stories.d.ts.map +1 -1
- package/dist/components/shared/Portal/Portal.d.ts.map +1 -1
- package/dist/components/shared/Tag/Tag.d.ts.map +1 -1
- package/dist/components/shared/Tag/Tag.stories.d.ts.map +1 -1
- package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.d.ts +1 -1
- package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.d.ts.map +1 -1
- package/dist/root.css +1 -1
- package/dist/ui-kit.cjs.js +4 -4
- package/dist/ui-kit.cjs.js.map +1 -1
- package/dist/ui-kit.css +1 -1
- package/dist/ui-kit.es.js +1026 -855
- package/dist/ui-kit.es.js.map +1 -1
- package/package.json +5 -16
package/dist/ui-kit.cjs.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react/jsx-runtime"),w=require("react"),dr=require("react-dom");function ma(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const V=ma(w);function pa(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function ga(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var ya=(function(){function t(n){var s=this;this._insertTag=function(i){var r;s.tags.length===0?s.insertionPoint?r=s.insertionPoint.nextSibling:s.prepend?r=s.container.firstChild:r=s.before:r=s.tags[s.tags.length-1].nextSibling,s.container.insertBefore(i,r),s.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(s){s.forEach(this._insertTag)},e.insert=function(s){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(ga(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var r=pa(i);try{r.insertRule(s,r.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(s));this.ctr++},e.flush=function(){this.tags.forEach(function(s){var i;return(i=s.parentNode)==null?void 0:i.removeChild(s)}),this.tags=[],this.ctr=0},t})(),Y="-ms-",Ie="-moz-",R="-webkit-",fr="comm",Hn="rule",Gn="decl",va="@import",mr="@keyframes",xa="@layer",ba=Math.abs,Ue=String.fromCharCode,wa=Object.assign;function Ca(t,e){return q(t,0)^45?(((e<<2^q(t,0))<<2^q(t,1))<<2^q(t,2))<<2^q(t,3):0}function pr(t){return t.trim()}function _a(t,e){return(t=e.exec(t))?t[0]:t}function D(t,e,n){return t.replace(e,n)}function Cn(t,e){return t.indexOf(e)}function q(t,e){return t.charCodeAt(e)|0}function ce(t,e,n){return t.slice(e,n)}function dt(t){return t.length}function qn(t){return t.length}function Se(t,e){return e.push(t),t}function Sa(t,e){return t.map(e).join("")}var Ke=1,Ht=1,gr=0,et=0,K=0,Yt="";function He(t,e,n,s,i,r,o){return{value:t,root:e,parent:n,type:s,props:i,children:r,line:Ke,column:Ht,length:o,return:""}}function te(t,e){return wa(He("",null,null,"",null,null,0),t,{length:-t.length},e)}function Ta(){return K}function Pa(){return K=et>0?q(Yt,--et):0,Ht--,K===10&&(Ht=1,Ke--),K}function nt(){return K=et<gr?q(Yt,et++):0,Ht++,K===10&&(Ht=1,Ke++),K}function ft(){return q(Yt,et)}function Ve(){return et}function ve(t,e){return ce(Yt,t,e)}function ue(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function yr(t){return Ke=Ht=1,gr=dt(Yt=t),et=0,[]}function vr(t){return Yt="",t}function ke(t){return pr(ve(et-1,_n(t===91?t+2:t===40?t+1:t)))}function Ma(t){for(;(K=ft())&&K<33;)nt();return ue(t)>2||ue(K)>3?"":" "}function Ea(t,e){for(;--e&&nt()&&!(K<48||K>102||K>57&&K<65||K>70&&K<97););return ve(t,Ve()+(e<6&&ft()==32&&nt()==32))}function _n(t){for(;nt();)switch(K){case t:return et;case 34:case 39:t!==34&&t!==39&&_n(K);break;case 40:t===41&&_n(t);break;case 92:nt();break}return et}function Aa(t,e){for(;nt()&&t+K!==57;)if(t+K===84&&ft()===47)break;return"/*"+ve(e,et-1)+"*"+Ue(t===47?t:nt())}function Va(t){for(;!ue(ft());)nt();return ve(t,et)}function ka(t){return vr(Re("",null,null,null,[""],t=yr(t),0,[0],t))}function Re(t,e,n,s,i,r,o,a,l){for(var u=0,c=0,h=o,d=0,f=0,g=0,m=1,v=1,y=1,x=0,p="",C=i,S=r,P=s,_=p;v;)switch(g=x,x=nt()){case 40:if(g!=108&&q(_,h-1)==58){Cn(_+=D(ke(x),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:_+=ke(x);break;case 9:case 10:case 13:case 32:_+=Ma(g);break;case 92:_+=Ea(Ve()-1,7);continue;case 47:switch(ft()){case 42:case 47:Se(Ra(Aa(nt(),Ve()),e,n),l);break;default:_+="/"}break;case 123*m:a[u++]=dt(_)*y;case 125*m:case 59:case 0:switch(x){case 0:case 125:v=0;case 59+c:y==-1&&(_=D(_,/\f/g,"")),f>0&&dt(_)-h&&Se(f>32?js(_+";",s,n,h-1):js(D(_," ","")+";",s,n,h-2),l);break;case 59:_+=";";default:if(Se(P=Ds(_,e,n,u,c,i,a,p,C=[],S=[],h),r),x===123)if(c===0)Re(_,e,P,P,C,r,h,a,S);else switch(d===99&&q(_,3)===110?100:d){case 100:case 108:case 109:case 115:Re(t,P,P,s&&Se(Ds(t,P,P,0,0,i,a,p,i,C=[],h),S),i,S,h,a,s?C:S);break;default:Re(_,P,P,P,[""],S,0,a,S)}}u=c=f=0,m=y=1,p=_="",h=o;break;case 58:h=1+dt(_),f=g;default:if(m<1){if(x==123)--m;else if(x==125&&m++==0&&Pa()==125)continue}switch(_+=Ue(x),x*m){case 38:y=c>0?1:(_+="\f",-1);break;case 44:a[u++]=(dt(_)-1)*y,y=1;break;case 64:ft()===45&&(_+=ke(nt())),d=ft(),c=h=dt(p=_+=Va(Ve())),x++;break;case 45:g===45&&dt(_)==2&&(m=0)}}return r}function Ds(t,e,n,s,i,r,o,a,l,u,c){for(var h=i-1,d=i===0?r:[""],f=qn(d),g=0,m=0,v=0;g<s;++g)for(var y=0,x=ce(t,h+1,h=ba(m=o[g])),p=t;y<f;++y)(p=pr(m>0?d[y]+" "+x:D(x,/&\f/g,d[y])))&&(l[v++]=p);return He(t,e,n,i===0?Hn:a,l,u,c)}function Ra(t,e,n){return He(t,e,n,fr,Ue(Ta()),ce(t,2,-2),0)}function js(t,e,n,s){return He(t,e,n,Gn,ce(t,0,s),ce(t,s+1,-1),s)}function Ut(t,e){for(var n="",s=qn(t),i=0;i<s;i++)n+=e(t[i],i,t,e)||"";return n}function Da(t,e,n,s){switch(t.type){case xa:if(t.children.length)break;case va:case Gn:return t.return=t.return||t.value;case fr:return"";case mr:return t.return=t.value+"{"+Ut(t.children,s)+"}";case Hn:t.value=t.props.join(",")}return dt(n=Ut(t.children,s))?t.return=t.value+"{"+n+"}":""}function ja(t){var e=qn(t);return function(n,s,i,r){for(var o="",a=0;a<e;a++)o+=t[a](n,s,i,r)||"";return o}}function La(t){return function(e){e.root||(e=e.return)&&t(e)}}function Oa(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var Ia=function(e,n,s){for(var i=0,r=0;i=r,r=ft(),i===38&&r===12&&(n[s]=1),!ue(r);)nt();return ve(e,et)},Ba=function(e,n){var s=-1,i=44;do switch(ue(i)){case 0:i===38&&ft()===12&&(n[s]=1),e[s]+=Ia(et-1,n,s);break;case 2:e[s]+=ke(i);break;case 4:if(i===44){e[++s]=ft()===58?"&\f":"",n[s]=e[s].length;break}default:e[s]+=Ue(i)}while(i=nt());return e},Na=function(e,n){return vr(Ba(yr(e),n))},Ls=new WeakMap,Fa=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,s=e.parent,i=e.column===s.column&&e.line===s.line;s.type!=="rule";)if(s=s.parent,!s)return;if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!Ls.get(s))&&!i){Ls.set(e,!0);for(var r=[],o=Na(n,r),a=s.props,l=0,u=0;l<o.length;l++)for(var c=0;c<a.length;c++,u++)e.props[u]=r[l]?o[l].replace(/&\f/g,a[c]):a[c]+" "+o[l]}}},za=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function xr(t,e){switch(Ca(t,e)){case 5103:return R+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return R+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return R+t+Ie+t+Y+t+t;case 6828:case 4268:return R+t+Y+t+t;case 6165:return R+t+Y+"flex-"+t+t;case 5187:return R+t+D(t,/(\w+).+(:[^]+)/,R+"box-$1$2"+Y+"flex-$1$2")+t;case 5443:return R+t+Y+"flex-item-"+D(t,/flex-|-self/,"")+t;case 4675:return R+t+Y+"flex-line-pack"+D(t,/align-content|flex-|-self/,"")+t;case 5548:return R+t+Y+D(t,"shrink","negative")+t;case 5292:return R+t+Y+D(t,"basis","preferred-size")+t;case 6060:return R+"box-"+D(t,"-grow","")+R+t+Y+D(t,"grow","positive")+t;case 4554:return R+D(t,/([^-])(transform)/g,"$1"+R+"$2")+t;case 6187:return D(D(D(t,/(zoom-|grab)/,R+"$1"),/(image-set)/,R+"$1"),t,"")+t;case 5495:case 3959:return D(t,/(image-set\([^]*)/,R+"$1$`$1");case 4968:return D(D(t,/(.+:)(flex-)?(.*)/,R+"box-pack:$3"+Y+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+R+t+t;case 4095:case 3583:case 4068:case 2532:return D(t,/(.+)-inline(.+)/,R+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(dt(t)-1-e>6)switch(q(t,e+1)){case 109:if(q(t,e+4)!==45)break;case 102:return D(t,/(.+:)(.+)-([^]+)/,"$1"+R+"$2-$3$1"+Ie+(q(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Cn(t,"stretch")?xr(D(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(q(t,e+1)!==115)break;case 6444:switch(q(t,dt(t)-3-(~Cn(t,"!important")&&10))){case 107:return D(t,":",":"+R)+t;case 101:return D(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+R+(q(t,14)===45?"inline-":"")+"box$3$1"+R+"$2$3$1"+Y+"$2box$3")+t}break;case 5936:switch(q(t,e+11)){case 114:return R+t+Y+D(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return R+t+Y+D(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return R+t+Y+D(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return R+t+Y+t+t}return t}var $a=function(e,n,s,i){if(e.length>-1&&!e.return)switch(e.type){case Gn:e.return=xr(e.value,e.length);break;case mr:return Ut([te(e,{value:D(e.value,"@","@"+R)})],i);case Hn:if(e.length)return Sa(e.props,function(r){switch(_a(r,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ut([te(e,{props:[D(r,/:(read-\w+)/,":"+Ie+"$1")]})],i);case"::placeholder":return Ut([te(e,{props:[D(r,/:(plac\w+)/,":"+R+"input-$1")]}),te(e,{props:[D(r,/:(plac\w+)/,":"+Ie+"$1")]}),te(e,{props:[D(r,/:(plac\w+)/,Y+"input-$1")]})],i)}return""})}},Wa=[$a],Ua=function(e){var n=e.key;if(n==="css"){var s=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(s,function(m){var v=m.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var i=e.stylisPlugins||Wa,r={},o,a=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(m){for(var v=m.getAttribute("data-emotion").split(" "),y=1;y<v.length;y++)r[v[y]]=!0;a.push(m)});var l,u=[Fa,za];{var c,h=[Da,La(function(m){c.insert(m)})],d=ja(u.concat(i,h)),f=function(v){return Ut(ka(v),d)};l=function(v,y,x,p){c=x,f(v?v+"{"+y.styles+"}":y.styles),p&&(g.inserted[y.name]=!0)}}var g={key:n,sheet:new ya({key:n,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:r,registered:{},insert:l};return g.sheet.hydrate(a),g};function Ka(t){for(var e=0,n,s=0,i=t.length;i>=4;++s,i-=4)n=t.charCodeAt(s)&255|(t.charCodeAt(++s)&255)<<8|(t.charCodeAt(++s)&255)<<16|(t.charCodeAt(++s)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(s+2)&255)<<16;case 2:e^=(t.charCodeAt(s+1)&255)<<8;case 1:e^=t.charCodeAt(s)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var Ha={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Ga=/[A-Z]|^ms/g,qa=/_EMO_([^_]+?)_([^]*?)_EMO_/g,br=function(e){return e.charCodeAt(1)===45},Os=function(e){return e!=null&&typeof e!="boolean"},tn=Oa(function(t){return br(t)?t:t.replace(Ga,"-$&").toLowerCase()}),Is=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(qa,function(s,i,r){return wt={name:i,styles:r,next:wt},i})}return Ha[e]!==1&&!br(e)&&typeof n=="number"&&n!==0?n+"px":n};function Be(t,e,n){if(n==null)return"";var s=n;if(s.__emotion_styles!==void 0)return s;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return wt={name:i.name,styles:i.styles,next:wt},i.name;var r=n;if(r.styles!==void 0){var o=r.next;if(o!==void 0)for(;o!==void 0;)wt={name:o.name,styles:o.styles,next:wt},o=o.next;var a=r.styles+";";return a}return Ya(t,e,n)}}var l=n;if(e==null)return l;var u=e[l];return u!==void 0?u:l}function Ya(t,e,n){var s="";if(Array.isArray(n))for(var i=0;i<n.length;i++)s+=Be(t,e,n[i])+";";else for(var r in n){var o=n[r];if(typeof o!="object"){var a=o;e!=null&&e[a]!==void 0?s+=r+"{"+e[a]+"}":Os(a)&&(s+=tn(r)+":"+Is(r,a)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&(e==null||e[o[0]]===void 0))for(var l=0;l<o.length;l++)Os(o[l])&&(s+=tn(r)+":"+Is(r,o[l])+";");else{var u=Be(t,e,o);switch(r){case"animation":case"animationName":{s+=tn(r)+":"+u+";";break}default:s+=r+"{"+u+"}"}}}return s}var Bs=/label:\s*([^\s;{]+)\s*(;|$)/g,wt;function en(t,e,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var s=!0,i="";wt=void 0;var r=t[0];if(r==null||r.raw===void 0)s=!1,i+=Be(n,e,r);else{var o=r;i+=o[0]}for(var a=1;a<t.length;a++)if(i+=Be(n,e,t[a]),s){var l=r;i+=l[a]}Bs.lastIndex=0;for(var u="",c;(c=Bs.exec(i))!==null;)u+="-"+c[1];var h=Ka(i)+u;return{name:h,styles:i,next:wt}}function wr(t,e,n){var s="";return n.split(" ").forEach(function(i){t[i]!==void 0?e.push(t[i]+";"):i&&(s+=i+" ")}),s}var Xa=function(e,n,s){var i=e.key+"-"+n.name;e.registered[i]===void 0&&(e.registered[i]=n.styles)},Za=function(e,n,s){Xa(e,n);var i=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var r=n;do e.insert(n===r?"."+i:"",r,e.sheet,!0),r=r.next;while(r!==void 0)}};function Ns(t,e){if(t.inserted[e.name]===void 0)return t.insert("",e,t.sheet,!0)}function Fs(t,e,n){var s=[],i=wr(t,s,n);return s.length<2?n:i+e(s)}var Ja=function(e){var n=Ua(e);n.sheet.speedy=function(a){this.isSpeedy=a},n.compat=!0;var s=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];var h=en(u,n.registered,void 0);return Za(n,h),n.key+"-"+h.name},i=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];var h=en(u,n.registered),d="animation-"+h.name;return Ns(n,{name:h.name,styles:"@keyframes "+d+"{"+h.styles+"}"}),d},r=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];var h=en(u,n.registered);Ns(n,h)},o=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];return Fs(n.registered,s,Qa(u))};return{css:s,cx:o,injectGlobal:r,keyframes:i,hydrate:function(l){l.forEach(function(u){n.inserted[u]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:wr.bind(null,n.registered),merge:Fs.bind(null,n.registered,s)}},Qa=function t(e){for(var n="",s=0;s<e.length;s++){var i=e[s];if(i!=null){var r=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))r=t(i);else{r="";for(var o in i)i[o]&&o&&(r&&(r+=" "),r+=o)}break}default:r=i}r&&(n&&(n+=" "),n+=r)}}return n},Cr=Ja({key:"css"}),I=Cr.cx,X=Cr.css;function tl(t){const{h:e,w:n,m:s,mx:i,my:r,mt:o,mr:a,mb:l,ml:u,p:c,px:h,py:d,pt:f,pr:g,pb:m,pl:v,xGap:y,yGap:x,row:p,flex:C,relative:S,absolute:P,display:_,overflow:T,...E}=t;return{spacers:{h:e,w:n,m:s,mx:i,my:r,mt:o,mr:a,mb:l,ml:u,p:c,px:h,py:d,pt:f,pr:g,pb:m,pl:v,xGap:y,yGap:x,row:p,flex:C,relative:S,absolute:P,overflow:T,...E},rest:E}}const el=t=>X({display:t.display??"flex",flexDirection:t.row?"row":"column",height:t.h==="screen"?"100vh":t.h==="full"?"100%":t.h,width:t.w==="screen"?"100vw":t.w==="full"?"100%":t.w,margin:t.m,marginTop:t.mt??t.my,marginBottom:t.mb??t.my,marginLeft:t.ml??t.mx,marginRight:t.mr??t.mx,padding:t.p,paddingTop:t.pt??t.py,paddingBottom:t.pb??t.py,paddingLeft:t.pl??t.px,paddingRight:t.pr??t.px,gap:t.gap,columnGap:t.xGap,rowGap:t.yGap,justifyContent:t.center?"center":t.justifyContent,alignItems:t.center?"center":t.alignItems,alignSelf:t.alignSelf,borderWidth:t.borderWidth,borderBottomWidth:t.borderBottomWidth,borderColor:t.borderColor,borderRadius:t.borderRadius,zIndex:t.zIndex,overflow:t.overflow,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,flex:t.flex===!0?1:t.flex,flexWrap:t.flexWrap,flexGrow:t.flexGrow,flexShrink:t.flexShrink,flexBasis:t.flexBasis,backgroundColor:t.backgroundColor,position:t.absolute?"absolute":t.relative?"relative":"unset",...t.absoluteFill&&{position:"absolute",top:0,right:0,bottom:0,left:0}}),A=w.forwardRef(({className:t,children:e,...n},s)=>{const{spacers:i,rest:r}=tl(n),o=w.useMemo(()=>el(i),[i]);return b.jsx("div",{ref:s,className:I(o,t),...r,children:e})});A.displayName="Box";function nl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var nn={exports:{}};/*!
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react/jsx-runtime"),w=require("react"),dr=require("react-dom");function ma(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const k=ma(w);function pa(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function ga(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var ya=(function(){function t(n){var s=this;this._insertTag=function(i){var r;s.tags.length===0?s.insertionPoint?r=s.insertionPoint.nextSibling:s.prepend?r=s.container.firstChild:r=s.before:r=s.tags[s.tags.length-1].nextSibling,s.container.insertBefore(i,r),s.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(s){s.forEach(this._insertTag)},e.insert=function(s){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(ga(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var r=pa(i);try{r.insertRule(s,r.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(s));this.ctr++},e.flush=function(){this.tags.forEach(function(s){var i;return(i=s.parentNode)==null?void 0:i.removeChild(s)}),this.tags=[],this.ctr=0},t})(),Y="-ms-",Ie="-moz-",R="-webkit-",fr="comm",Hn="rule",Gn="decl",va="@import",mr="@keyframes",xa="@layer",ba=Math.abs,Ue=String.fromCharCode,wa=Object.assign;function _a(t,e){return q(t,0)^45?(((e<<2^q(t,0))<<2^q(t,1))<<2^q(t,2))<<2^q(t,3):0}function pr(t){return t.trim()}function Ca(t,e){return(t=e.exec(t))?t[0]:t}function D(t,e,n){return t.replace(e,n)}function _n(t,e){return t.indexOf(e)}function q(t,e){return t.charCodeAt(e)|0}function ce(t,e,n){return t.slice(e,n)}function dt(t){return t.length}function qn(t){return t.length}function Se(t,e){return e.push(t),t}function Sa(t,e){return t.map(e).join("")}var Ke=1,Ht=1,gr=0,et=0,K=0,Yt="";function He(t,e,n,s,i,r,o){return{value:t,root:e,parent:n,type:s,props:i,children:r,line:Ke,column:Ht,length:o,return:""}}function te(t,e){return wa(He("",null,null,"",null,null,0),t,{length:-t.length},e)}function Ta(){return K}function Pa(){return K=et>0?q(Yt,--et):0,Ht--,K===10&&(Ht=1,Ke--),K}function nt(){return K=et<gr?q(Yt,et++):0,Ht++,K===10&&(Ht=1,Ke++),K}function ft(){return q(Yt,et)}function ke(){return et}function ve(t,e){return ce(Yt,t,e)}function ue(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function yr(t){return Ke=Ht=1,gr=dt(Yt=t),et=0,[]}function vr(t){return Yt="",t}function Ve(t){return pr(ve(et-1,Cn(t===91?t+2:t===40?t+1:t)))}function Ma(t){for(;(K=ft())&&K<33;)nt();return ue(t)>2||ue(K)>3?"":" "}function Ea(t,e){for(;--e&&nt()&&!(K<48||K>102||K>57&&K<65||K>70&&K<97););return ve(t,ke()+(e<6&&ft()==32&&nt()==32))}function Cn(t){for(;nt();)switch(K){case t:return et;case 34:case 39:t!==34&&t!==39&&Cn(K);break;case 40:t===41&&Cn(t);break;case 92:nt();break}return et}function Aa(t,e){for(;nt()&&t+K!==57;)if(t+K===84&&ft()===47)break;return"/*"+ve(e,et-1)+"*"+Ue(t===47?t:nt())}function ka(t){for(;!ue(ft());)nt();return ve(t,et)}function Va(t){return vr(Re("",null,null,null,[""],t=yr(t),0,[0],t))}function Re(t,e,n,s,i,r,o,a,l){for(var u=0,c=0,h=o,d=0,f=0,g=0,m=1,v=1,y=1,x=0,p="",_=i,S=r,P=s,C=p;v;)switch(g=x,x=nt()){case 40:if(g!=108&&q(C,h-1)==58){_n(C+=D(Ve(x),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:C+=Ve(x);break;case 9:case 10:case 13:case 32:C+=Ma(g);break;case 92:C+=Ea(ke()-1,7);continue;case 47:switch(ft()){case 42:case 47:Se(Ra(Aa(nt(),ke()),e,n),l);break;default:C+="/"}break;case 123*m:a[u++]=dt(C)*y;case 125*m:case 59:case 0:switch(x){case 0:case 125:v=0;case 59+c:y==-1&&(C=D(C,/\f/g,"")),f>0&&dt(C)-h&&Se(f>32?js(C+";",s,n,h-1):js(D(C," ","")+";",s,n,h-2),l);break;case 59:C+=";";default:if(Se(P=Ds(C,e,n,u,c,i,a,p,_=[],S=[],h),r),x===123)if(c===0)Re(C,e,P,P,_,r,h,a,S);else switch(d===99&&q(C,3)===110?100:d){case 100:case 108:case 109:case 115:Re(t,P,P,s&&Se(Ds(t,P,P,0,0,i,a,p,i,_=[],h),S),i,S,h,a,s?_:S);break;default:Re(C,P,P,P,[""],S,0,a,S)}}u=c=f=0,m=y=1,p=C="",h=o;break;case 58:h=1+dt(C),f=g;default:if(m<1){if(x==123)--m;else if(x==125&&m++==0&&Pa()==125)continue}switch(C+=Ue(x),x*m){case 38:y=c>0?1:(C+="\f",-1);break;case 44:a[u++]=(dt(C)-1)*y,y=1;break;case 64:ft()===45&&(C+=Ve(nt())),d=ft(),c=h=dt(p=C+=ka(ke())),x++;break;case 45:g===45&&dt(C)==2&&(m=0)}}return r}function Ds(t,e,n,s,i,r,o,a,l,u,c){for(var h=i-1,d=i===0?r:[""],f=qn(d),g=0,m=0,v=0;g<s;++g)for(var y=0,x=ce(t,h+1,h=ba(m=o[g])),p=t;y<f;++y)(p=pr(m>0?d[y]+" "+x:D(x,/&\f/g,d[y])))&&(l[v++]=p);return He(t,e,n,i===0?Hn:a,l,u,c)}function Ra(t,e,n){return He(t,e,n,fr,Ue(Ta()),ce(t,2,-2),0)}function js(t,e,n,s){return He(t,e,n,Gn,ce(t,0,s),ce(t,s+1,-1),s)}function Ut(t,e){for(var n="",s=qn(t),i=0;i<s;i++)n+=e(t[i],i,t,e)||"";return n}function Da(t,e,n,s){switch(t.type){case xa:if(t.children.length)break;case va:case Gn:return t.return=t.return||t.value;case fr:return"";case mr:return t.return=t.value+"{"+Ut(t.children,s)+"}";case Hn:t.value=t.props.join(",")}return dt(n=Ut(t.children,s))?t.return=t.value+"{"+n+"}":""}function ja(t){var e=qn(t);return function(n,s,i,r){for(var o="",a=0;a<e;a++)o+=t[a](n,s,i,r)||"";return o}}function La(t){return function(e){e.root||(e=e.return)&&t(e)}}function Oa(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var Ia=function(e,n,s){for(var i=0,r=0;i=r,r=ft(),i===38&&r===12&&(n[s]=1),!ue(r);)nt();return ve(e,et)},Ba=function(e,n){var s=-1,i=44;do switch(ue(i)){case 0:i===38&&ft()===12&&(n[s]=1),e[s]+=Ia(et-1,n,s);break;case 2:e[s]+=Ve(i);break;case 4:if(i===44){e[++s]=ft()===58?"&\f":"",n[s]=e[s].length;break}default:e[s]+=Ue(i)}while(i=nt());return e},Na=function(e,n){return vr(Ba(yr(e),n))},Ls=new WeakMap,Fa=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,s=e.parent,i=e.column===s.column&&e.line===s.line;s.type!=="rule";)if(s=s.parent,!s)return;if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!Ls.get(s))&&!i){Ls.set(e,!0);for(var r=[],o=Na(n,r),a=s.props,l=0,u=0;l<o.length;l++)for(var c=0;c<a.length;c++,u++)e.props[u]=r[l]?o[l].replace(/&\f/g,a[c]):a[c]+" "+o[l]}}},$a=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function xr(t,e){switch(_a(t,e)){case 5103:return R+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return R+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return R+t+Ie+t+Y+t+t;case 6828:case 4268:return R+t+Y+t+t;case 6165:return R+t+Y+"flex-"+t+t;case 5187:return R+t+D(t,/(\w+).+(:[^]+)/,R+"box-$1$2"+Y+"flex-$1$2")+t;case 5443:return R+t+Y+"flex-item-"+D(t,/flex-|-self/,"")+t;case 4675:return R+t+Y+"flex-line-pack"+D(t,/align-content|flex-|-self/,"")+t;case 5548:return R+t+Y+D(t,"shrink","negative")+t;case 5292:return R+t+Y+D(t,"basis","preferred-size")+t;case 6060:return R+"box-"+D(t,"-grow","")+R+t+Y+D(t,"grow","positive")+t;case 4554:return R+D(t,/([^-])(transform)/g,"$1"+R+"$2")+t;case 6187:return D(D(D(t,/(zoom-|grab)/,R+"$1"),/(image-set)/,R+"$1"),t,"")+t;case 5495:case 3959:return D(t,/(image-set\([^]*)/,R+"$1$`$1");case 4968:return D(D(t,/(.+:)(flex-)?(.*)/,R+"box-pack:$3"+Y+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+R+t+t;case 4095:case 3583:case 4068:case 2532:return D(t,/(.+)-inline(.+)/,R+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(dt(t)-1-e>6)switch(q(t,e+1)){case 109:if(q(t,e+4)!==45)break;case 102:return D(t,/(.+:)(.+)-([^]+)/,"$1"+R+"$2-$3$1"+Ie+(q(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~_n(t,"stretch")?xr(D(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(q(t,e+1)!==115)break;case 6444:switch(q(t,dt(t)-3-(~_n(t,"!important")&&10))){case 107:return D(t,":",":"+R)+t;case 101:return D(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+R+(q(t,14)===45?"inline-":"")+"box$3$1"+R+"$2$3$1"+Y+"$2box$3")+t}break;case 5936:switch(q(t,e+11)){case 114:return R+t+Y+D(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return R+t+Y+D(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return R+t+Y+D(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return R+t+Y+t+t}return t}var za=function(e,n,s,i){if(e.length>-1&&!e.return)switch(e.type){case Gn:e.return=xr(e.value,e.length);break;case mr:return Ut([te(e,{value:D(e.value,"@","@"+R)})],i);case Hn:if(e.length)return Sa(e.props,function(r){switch(Ca(r,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ut([te(e,{props:[D(r,/:(read-\w+)/,":"+Ie+"$1")]})],i);case"::placeholder":return Ut([te(e,{props:[D(r,/:(plac\w+)/,":"+R+"input-$1")]}),te(e,{props:[D(r,/:(plac\w+)/,":"+Ie+"$1")]}),te(e,{props:[D(r,/:(plac\w+)/,Y+"input-$1")]})],i)}return""})}},Wa=[za],Ua=function(e){var n=e.key;if(n==="css"){var s=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(s,function(m){var v=m.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var i=e.stylisPlugins||Wa,r={},o,a=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(m){for(var v=m.getAttribute("data-emotion").split(" "),y=1;y<v.length;y++)r[v[y]]=!0;a.push(m)});var l,u=[Fa,$a];{var c,h=[Da,La(function(m){c.insert(m)})],d=ja(u.concat(i,h)),f=function(v){return Ut(Va(v),d)};l=function(v,y,x,p){c=x,f(v?v+"{"+y.styles+"}":y.styles),p&&(g.inserted[y.name]=!0)}}var g={key:n,sheet:new ya({key:n,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:r,registered:{},insert:l};return g.sheet.hydrate(a),g};function Ka(t){for(var e=0,n,s=0,i=t.length;i>=4;++s,i-=4)n=t.charCodeAt(s)&255|(t.charCodeAt(++s)&255)<<8|(t.charCodeAt(++s)&255)<<16|(t.charCodeAt(++s)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(s+2)&255)<<16;case 2:e^=(t.charCodeAt(s+1)&255)<<8;case 1:e^=t.charCodeAt(s)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var Ha={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Ga=/[A-Z]|^ms/g,qa=/_EMO_([^_]+?)_([^]*?)_EMO_/g,br=function(e){return e.charCodeAt(1)===45},Os=function(e){return e!=null&&typeof e!="boolean"},tn=Oa(function(t){return br(t)?t:t.replace(Ga,"-$&").toLowerCase()}),Is=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(qa,function(s,i,r){return wt={name:i,styles:r,next:wt},i})}return Ha[e]!==1&&!br(e)&&typeof n=="number"&&n!==0?n+"px":n};function Be(t,e,n){if(n==null)return"";var s=n;if(s.__emotion_styles!==void 0)return s;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return wt={name:i.name,styles:i.styles,next:wt},i.name;var r=n;if(r.styles!==void 0){var o=r.next;if(o!==void 0)for(;o!==void 0;)wt={name:o.name,styles:o.styles,next:wt},o=o.next;var a=r.styles+";";return a}return Ya(t,e,n)}}var l=n;if(e==null)return l;var u=e[l];return u!==void 0?u:l}function Ya(t,e,n){var s="";if(Array.isArray(n))for(var i=0;i<n.length;i++)s+=Be(t,e,n[i])+";";else for(var r in n){var o=n[r];if(typeof o!="object"){var a=o;e!=null&&e[a]!==void 0?s+=r+"{"+e[a]+"}":Os(a)&&(s+=tn(r)+":"+Is(r,a)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&(e==null||e[o[0]]===void 0))for(var l=0;l<o.length;l++)Os(o[l])&&(s+=tn(r)+":"+Is(r,o[l])+";");else{var u=Be(t,e,o);switch(r){case"animation":case"animationName":{s+=tn(r)+":"+u+";";break}default:s+=r+"{"+u+"}"}}}return s}var Bs=/label:\s*([^\s;{]+)\s*(;|$)/g,wt;function en(t,e,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var s=!0,i="";wt=void 0;var r=t[0];if(r==null||r.raw===void 0)s=!1,i+=Be(n,e,r);else{var o=r;i+=o[0]}for(var a=1;a<t.length;a++)if(i+=Be(n,e,t[a]),s){var l=r;i+=l[a]}Bs.lastIndex=0;for(var u="",c;(c=Bs.exec(i))!==null;)u+="-"+c[1];var h=Ka(i)+u;return{name:h,styles:i,next:wt}}function wr(t,e,n){var s="";return n.split(" ").forEach(function(i){t[i]!==void 0?e.push(t[i]+";"):i&&(s+=i+" ")}),s}var Xa=function(e,n,s){var i=e.key+"-"+n.name;e.registered[i]===void 0&&(e.registered[i]=n.styles)},Za=function(e,n,s){Xa(e,n);var i=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var r=n;do e.insert(n===r?"."+i:"",r,e.sheet,!0),r=r.next;while(r!==void 0)}};function Ns(t,e){if(t.inserted[e.name]===void 0)return t.insert("",e,t.sheet,!0)}function Fs(t,e,n){var s=[],i=wr(t,s,n);return s.length<2?n:i+e(s)}var Ja=function(e){var n=Ua(e);n.sheet.speedy=function(a){this.isSpeedy=a},n.compat=!0;var s=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];var h=en(u,n.registered,void 0);return Za(n,h),n.key+"-"+h.name},i=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];var h=en(u,n.registered),d="animation-"+h.name;return Ns(n,{name:h.name,styles:"@keyframes "+d+"{"+h.styles+"}"}),d},r=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];var h=en(u,n.registered);Ns(n,h)},o=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];return Fs(n.registered,s,Qa(u))};return{css:s,cx:o,injectGlobal:r,keyframes:i,hydrate:function(l){l.forEach(function(u){n.inserted[u]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:wr.bind(null,n.registered),merge:Fs.bind(null,n.registered,s)}},Qa=function t(e){for(var n="",s=0;s<e.length;s++){var i=e[s];if(i!=null){var r=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))r=t(i);else{r="";for(var o in i)i[o]&&o&&(r&&(r+=" "),r+=o)}break}default:r=i}r&&(n&&(n+=" "),n+=r)}}return n},_r=Ja({key:"css"}),I=_r.cx,X=_r.css;function tl(t){const{h:e,w:n,m:s,mx:i,my:r,mt:o,mr:a,mb:l,ml:u,p:c,px:h,py:d,pt:f,pr:g,pb:m,pl:v,xGap:y,yGap:x,row:p,flex:_,relative:S,absolute:P,display:C,overflow:T,...E}=t;return{spacers:{h:e,w:n,m:s,mx:i,my:r,mt:o,mr:a,mb:l,ml:u,p:c,px:h,py:d,pt:f,pr:g,pb:m,pl:v,xGap:y,yGap:x,row:p,flex:_,relative:S,absolute:P,overflow:T,...E},rest:E}}const el=t=>X({display:t.display??"flex",flexDirection:t.row?"row":"column",height:t.h==="screen"?"100vh":t.h==="full"?"100%":t.h,width:t.w==="screen"?"100vw":t.w==="full"?"100%":t.w,margin:t.m,marginTop:t.mt??t.my,marginBottom:t.mb??t.my,marginLeft:t.ml??t.mx,marginRight:t.mr??t.mx,padding:t.p,paddingTop:t.pt??t.py,paddingBottom:t.pb??t.py,paddingLeft:t.pl??t.px,paddingRight:t.pr??t.px,gap:t.gap,columnGap:t.xGap,rowGap:t.yGap,justifyContent:t.center?"center":t.justifyContent,alignItems:t.center?"center":t.alignItems,alignSelf:t.alignSelf,borderWidth:t.borderWidth,borderBottomWidth:t.borderBottomWidth,borderColor:t.borderColor,borderRadius:t.borderRadius,zIndex:t.zIndex,overflow:t.overflow,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,flex:t.flex===!0?1:t.flex,flexWrap:t.flexWrap,flexGrow:t.flexGrow,flexShrink:t.flexShrink,flexBasis:t.flexBasis,backgroundColor:t.backgroundColor,position:t.absolute?"absolute":t.relative?"relative":"unset",...t.absoluteFill&&{position:"absolute",top:0,right:0,bottom:0,left:0}}),A=w.forwardRef(({className:t,children:e,...n},s)=>{const{spacers:i,rest:r}=tl(n),o=w.useMemo(()=>el(i),[i]);return b.jsx("div",{ref:s,className:I(o,t),...r,children:e})});A.displayName="Box";const Cr=t=>k.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},k.createElement("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}));function nl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var nn={exports:{}};/*!
|
|
2
2
|
Copyright (c) 2018 Jed Watson.
|
|
3
3
|
Licensed under the MIT License (MIT), see
|
|
4
4
|
http://jedwatson.github.io/classnames
|
|
5
|
-
*/var zs;function sl(){return zs||(zs=1,(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var r="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(r=i(r,s(a)))}return r}function s(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var o="";for(var a in r)e.call(r,a)&&r[a]&&(o=i(o,a));return o}function i(r,o){return o?r?r+" "+o:r+o:r}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(nn)),nn.exports}var il=sl();const At=nl(il),rl="_rippleOverlay_s2kim_8",ol="_ripple_s2kim_8",$s={rippleOverlay:rl,ripple:ol},sn="button, a, input, label, [role='button'], [data-ripple']";function al(t){if(typeof t.composedPath=="function")return t.composedPath();const e=[];let n=t.target;for(;n;)e.push(n),n=n.parentNode||n.host;return e.push(window),e}const xe=w.forwardRef(({color:t="rgba(0,0,0,0.18)",duration:e=1e3,radius:n="auto",className:s},i)=>{const r=w.useRef(null),[o,a]=w.useState([]),l=w.useRef([]),u=w.useRef(1),c=w.useRef(null),h=()=>{l.current.forEach(m=>clearTimeout(m)),l.current=[]},d=w.useCallback((m,v,y,x)=>{const p=y.getBoundingClientRect(),C=n==="auto"?Math.max(p.width,p.height)*2:n,S=m-x.left,P=v-x.top,_=Math.max(0,p.top-x.top),T=Math.max(0,p.left-x.left),E=Math.max(0,x.right-p.right),L=Math.max(0,x.bottom-p.bottom),pt=window.getComputedStyle(y).borderRadius||"0px",Tt=u.current++,xt={id:Tt,left:S-C/2,top:P-C/2,size:Math.ceil(C),clip:{top:Math.round(_),right:Math.round(E),bottom:Math.round(L),left:Math.round(T)},borderRadius:pt};a(Lt=>[...Lt,xt]);const jt=window.setTimeout(()=>{a(Lt=>Lt.filter(z=>z.id!==Tt))},e+80);l.current.push(jt)},[e,n]),f=w.useCallback(m=>{try{if(!r.current)return;const v=r.current,y=v.parentElement;if(!y)return;const x=al(m);let p=null;for(const T of x)if(T instanceof Element){if(T===y)break;if(T.matches&&T.matches(sn)){p=T;break}}if(p||(p=y),p.closest&&(p.closest("[disabled]")||p.getAttribute("aria-disabled")==="true"||p.classList.contains("ripple-disabled")))return;const C=m.target;if(C&&C.closest&&(C.closest("[disabled]")||C.getAttribute?.("aria-disabled")==="true"))return;const S=v.getBoundingClientRect(),{clientX:P}=m,{clientY:_}=m;d(P,_,p,S)}catch{}},[d]),g=w.useCallback(m=>{if(!r.current||!(m.key==="Enter"||m.key===" "))return;const v=r.current,y=v.parentElement;if(!y)return;const x=document.activeElement;let p=null;if(x instanceof Element&&x.matches(sn)&&(p=x),p||(p=y),p.closest&&(p.closest("[disabled]")||p.getAttribute("aria-disabled")==="true"))return;const C=v.getBoundingClientRect(),S=p.getBoundingClientRect().left+p.getBoundingClientRect().width/2,P=p.getBoundingClientRect().top+p.getBoundingClientRect().height/2;d(S,P,p,C)},[d]);return w.useImperativeHandle(i,()=>({trigger:({center:m=!0,x:v,y}={})=>{const x=r.current;if(!x)return;const p=x.parentElement;if(!p)return;const C=x.getBoundingClientRect(),S=document.activeElement instanceof Element&&document.activeElement.matches(sn)?document.activeElement:p,P=m?S.getBoundingClientRect().left+S.getBoundingClientRect().width/2:v??C.left+C.width/2,_=m?S.getBoundingClientRect().top+S.getBoundingClientRect().height/2:y??C.top+C.height/2;d(P,_,S,C)}}),[d]),w.useEffect(()=>{const m=r.current;if(!m)return;const v=m.parentElement;if(!v)return;const y=window.getComputedStyle(v);let x=!1;return y.position==="static"&&(v.style.position="relative",x=!0,c.current=v),v.addEventListener("pointerdown",f,!0),v.addEventListener("keydown",g),()=>{v.removeEventListener("pointerdown",f,!0),v.removeEventListener("keydown",g),x&&c.current&&(c.current.style.position="",c.current=null),h()}},[f,g]),w.useEffect(()=>()=>h(),[]),b.jsx("div",{ref:r,className:`${$s.rippleOverlay} ${s??""}`,"aria-hidden":!0,children:o.map(m=>b.jsx("span",{className:$s.ripple,style:{left:`${m.left}px`,top:`${m.top}px`,width:`${m.size}px`,height:`${m.size}px`,backgroundColor:t,animationDuration:`${e}ms`,clipPath:`inset(${m.clip.top}px ${m.clip.right}px ${m.clip.bottom}px ${m.clip.left}px round ${m.borderRadius})`}},m.id))})});function Ge(t,e){const{current:n}=w.useRef(t!==void 0),[s,i]=w.useState(e),r=n?t:s,o=w.useCallback(a=>{n||i(a)},[n]);return[r,o]}const _r=(t,e)=>{const[n,s]=w.useState({top:0,left:0,width:0});return w.useLayoutEffect(()=>{if(!e||!t.current)return;const i=()=>{const o=t.current.getBoundingClientRect();s({top:o.bottom+window.scrollY+4,left:o.left+window.scrollX,width:o.width})};i(),window.addEventListener("resize",i),window.addEventListener("scroll",i,!0);const r=new ResizeObserver(()=>i());return r.observe(t.current),()=>{window.removeEventListener("resize",i),window.removeEventListener("scroll",i,!0),r.disconnect()}},[e,t]),n};function qe(t,e,n,s=""){if(n)return t[`${e}_${n}${s}`]}function he(t,e,n){return qe(t,e,n,"Size")}const ll="_button_12z2f_8",cl="_button_primary_12z2f_19",ul="_button_secondary_12z2f_22",hl="_button_negative_12z2f_25",dl="_button_positive_12z2f_28",fl="_button_warning_12z2f_31",ml="_button_neutral_12z2f_34",pl="_button_mdSize_12z2f_94",gl="_button_smSize_12z2f_104",yl="_button_xsSize_12z2f_114",rn={button:ll,button_primary:cl,button_secondary:ul,button_negative:hl,button_positive:dl,button_warning:fl,button_neutral:ml,button_mdSize:pl,button_smSize:gl,button_xsSize:yl};function Yn({attr:t,children:e,className:n,type:s="button",color:i="primary",size:r="md",...o}){const a="button";return b.jsxs("button",{...t,...o,type:s,className:At(rn[a],n,he(rn,a,r),qe(rn,a,i)),children:[b.jsx(xe,{}),e]})}const Sr=t=>V.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},V.createElement("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),vl="_overlay_1udux_8",xl="_open_1udux_21",bl="_modal_1udux_25",wl="_closeButton_1udux_42",Cl="_size_lg_1udux_49",_l="_size_md_1udux_52",Sl="_size_sm_1udux_55",ee={overlay:vl,open:xl,modal:bl,"modal-animation":"_modal-animation_1udux_1",closeButton:wl,size_lg:Cl,size_md:_l,size_sm:Sl},Tr=w.forwardRef(({isOpen:t=!0,onClose:e,overlayClassName:n,modalClassName:s,size:i="md",closeOnBackdropClick:r=!0,closeOnEsc:o=!0,disableBodyScroll:a=!1,showAbsoluteCloseButton:l=!1,children:u},c)=>{w.useEffect(()=>{if(a&&t&&typeof window<"u"&&typeof document<"u"){const f=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=f}}},[t,a]);const h=w.useCallback(f=>{f.key==="Escape"&&e&&e()},[e]);w.useEffect(()=>{if(typeof window<"u"&&typeof document<"u"&&o&&t)return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[t,o,h]);const d=w.useCallback(f=>{f.target===f.currentTarget&&r&&e&&e()},[r,e]);return b.jsx("div",{onClick:d,className:I(ee.overlay,{[ee.open]:t},n),children:b.jsxs(A,{ref:c,className:I(ee.modal,ee[`size_${i}`],s),children:[l&&b.jsx(Yn,{className:ee.closeButton,onClick:e,color:"neutral",children:b.jsx(Sr,{})}),u]})})});Tr.displayName="Modal";const Xn=w.createContext({});function Zn(t){const e=w.useRef(null);return e.current===null&&(e.current=t()),e.current}const Jn=typeof window<"u",Pr=Jn?w.useLayoutEffect:w.useEffect,Ye=w.createContext(null);function Qn(t,e){t.indexOf(e)===-1&&t.push(e)}function ts(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const gt=(t,e,n)=>n>e?e:n<t?t:n;function Sn(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let Xt=()=>{},yt=()=>{};process.env.NODE_ENV!=="production"&&(Xt=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(Sn(e,n))},yt=(t,e,n)=>{if(!t)throw new Error(Sn(e,n))});const vt={},Mr=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Er(t){return typeof t=="object"&&t!==null}const Ar=t=>/^0[^.\s]+$/u.test(t);function es(t){let e;return()=>(e===void 0&&(e=t()),e)}const at=t=>t,Tl=(t,e)=>n=>e(t(n)),be=(...t)=>t.reduce(Tl),de=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class ns{constructor(){this.subscriptions=[]}add(e){return Qn(this.subscriptions,e),()=>ts(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ht=t=>t*1e3,ot=t=>t/1e3;function Vr(t,e){return e?t*(1e3/e):0}const Ws=new Set;function ss(t,e,n){t||Ws.has(e)||(console.warn(Sn(e,n)),Ws.add(e))}const kr=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Pl=1e-7,Ml=12;function El(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=kr(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>Pl&&++a<Ml);return o}function we(t,e,n,s){if(t===e&&n===s)return at;const i=r=>El(r,0,1,t,n);return r=>r===0||r===1?r:kr(i(r),e,s)}const Rr=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Dr=t=>e=>1-t(1-e),jr=we(.33,1.53,.69,.99),is=Dr(jr),Lr=Rr(is),Or=t=>(t*=2)<1?.5*is(t):.5*(2-Math.pow(2,-10*(t-1))),rs=t=>1-Math.sin(Math.acos(t)),Ir=Dr(rs),Br=Rr(rs),Al=we(.42,0,1,1),Vl=we(0,0,.58,1),Nr=we(.42,0,.58,1),kl=t=>Array.isArray(t)&&typeof t[0]!="number",Fr=t=>Array.isArray(t)&&typeof t[0]=="number",Us={linear:at,easeIn:Al,easeInOut:Nr,easeOut:Vl,circIn:rs,circInOut:Br,circOut:Ir,backIn:is,backInOut:Lr,backOut:jr,anticipate:Or},Rl=t=>typeof t=="string",Ks=t=>{if(Fr(t)){yt(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,s,i]=t;return we(e,n,s,i)}else if(Rl(t))return yt(Us[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),Us[t];return t},Te=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Dl(t,e){let n=new Set,s=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){o.has(c)&&(u.schedule(c),t()),c(a)}const u={schedule:(c,h=!1,d=!1)=>{const g=d&&i?n:s;return h&&o.add(c),g.has(c)||g.add(c),c},cancel:c=>{s.delete(c),o.delete(c)},process:c=>{if(a=c,i){r=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,r&&(r=!1,u.process(c))}};return u}const jl=40;function zr(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Te.reduce((p,C)=>(p[C]=Dl(r),p),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:h,preRender:d,render:f,postRender:g}=o,m=()=>{const p=vt.useManualTiming?i.timestamp:performance.now();n=!1,vt.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(p-i.timestamp,jl),1)),i.timestamp=p,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),d.process(i),f.process(i),g.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(m))},v=()=>{n=!0,s=!0,i.isProcessing||t(m)};return{schedule:Te.reduce((p,C)=>{const S=o[C];return p[C]=(P,_=!1,T=!1)=>(n||v(),S.schedule(P,_,T)),p},{}),cancel:p=>{for(let C=0;C<Te.length;C++)o[Te[C]].cancel(p)},state:i,steps:o}}const{schedule:B,cancel:Ct,state:G,steps:on}=zr(typeof requestAnimationFrame<"u"?requestAnimationFrame:at,!0);let De;function Ll(){De=void 0}const tt={now:()=>(De===void 0&&tt.set(G.isProcessing||vt.useManualTiming?G.timestamp:performance.now()),De),set:t=>{De=t,queueMicrotask(Ll)}},$r=t=>e=>typeof e=="string"&&e.startsWith(t),os=$r("--"),Ol=$r("var(--"),as=t=>Ol(t)?Il.test(t.split("/*")[0].trim()):!1,Il=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Zt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},fe={...Zt,transform:t=>gt(0,1,t)},Pe={...Zt,default:1},re=t=>Math.round(t*1e5)/1e5,ls=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Bl(t){return t==null}const Nl=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,cs=(t,e)=>n=>!!(typeof n=="string"&&Nl.test(n)&&n.startsWith(t)||e&&!Bl(n)&&Object.prototype.hasOwnProperty.call(n,e)),Wr=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(ls);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Fl=t=>gt(0,255,t),an={...Zt,transform:t=>Math.round(Fl(t))},Vt={test:cs("rgb","red"),parse:Wr("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+an.transform(t)+", "+an.transform(e)+", "+an.transform(n)+", "+re(fe.transform(s))+")"};function zl(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Tn={test:cs("#"),parse:zl,transform:Vt.transform},Ce=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),bt=Ce("deg"),mt=Ce("%"),M=Ce("px"),$l=Ce("vh"),Wl=Ce("vw"),Hs={...mt,parse:t=>mt.parse(t)/100,transform:t=>mt.transform(t*100)},Bt={test:cs("hsl","hue"),parse:Wr("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+mt.transform(re(e))+", "+mt.transform(re(n))+", "+re(fe.transform(s))+")"},U={test:t=>Vt.test(t)||Tn.test(t)||Bt.test(t),parse:t=>Vt.test(t)?Vt.parse(t):Bt.test(t)?Bt.parse(t):Tn.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Vt.transform(t):Bt.transform(t),getAnimatableNone:t=>{const e=U.parse(t);return e.alpha=0,U.transform(e)}},Ul=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Kl(t){return isNaN(t)&&typeof t=="string"&&(t.match(ls)?.length||0)+(t.match(Ul)?.length||0)>0}const Ur="number",Kr="color",Hl="var",Gl="var(",Gs="${}",ql=/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 me(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(ql,l=>(U.test(l)?(s.color.push(r),i.push(Kr),n.push(U.parse(l))):l.startsWith(Gl)?(s.var.push(r),i.push(Hl),n.push(l)):(s.number.push(r),i.push(Ur),n.push(parseFloat(l))),++r,Gs)).split(Gs);return{values:n,split:a,indexes:s,types:i}}function Hr(t){return me(t).values}function Gr(t){const{split:e,types:n}=me(t),s=e.length;return i=>{let r="";for(let o=0;o<s;o++)if(r+=e[o],i[o]!==void 0){const a=n[o];a===Ur?r+=re(i[o]):a===Kr?r+=U.transform(i[o]):r+=i[o]}return r}}const Yl=t=>typeof t=="number"?0:U.test(t)?U.getAnimatableNone(t):t;function Xl(t){const e=Hr(t);return Gr(t)(e.map(Yl))}const _t={test:Kl,parse:Hr,createTransformer:Gr,getAnimatableNone:Xl};function ln(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Zl({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=ln(l,a,t+1/3),r=ln(l,a,t),o=ln(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function Ne(t,e){return n=>n>0?e:t}const F=(t,e,n)=>t+(e-t)*n,cn=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Jl=[Tn,Vt,Bt],Ql=t=>Jl.find(e=>e.test(t));function qs(t){const e=Ql(t);if(Xt(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===Bt&&(n=Zl(n)),n}const Ys=(t,e)=>{const n=qs(t),s=qs(e);if(!n||!s)return Ne(t,e);const i={...n};return r=>(i.red=cn(n.red,s.red,r),i.green=cn(n.green,s.green,r),i.blue=cn(n.blue,s.blue,r),i.alpha=F(n.alpha,s.alpha,r),Vt.transform(i))},Pn=new Set(["none","hidden"]);function tc(t,e){return Pn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function ec(t,e){return n=>F(t,e,n)}function us(t){return typeof t=="number"?ec:typeof t=="string"?as(t)?Ne:U.test(t)?Ys:ic:Array.isArray(t)?qr:typeof t=="object"?U.test(t)?Ys:nc:Ne}function qr(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>us(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function nc(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=us(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function sc(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const r=e.types[i],o=t.indexes[r][s[r]],a=t.values[o]??0;n[i]=a,s[r]++}return n}const ic=(t,e)=>{const n=_t.createTransformer(e),s=me(t),i=me(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Pn.has(t)&&!i.values.length||Pn.has(e)&&!s.values.length?tc(t,e):be(qr(sc(s,i),i.values),n):(Xt(!0,`Complex values '${t}' and '${e}' 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"),Ne(t,e))};function Yr(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?F(t,e,n):us(t)(t,e)}const rc=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>B.update(e,n),stop:()=>Ct(e),now:()=>G.isProcessing?G.timestamp:tt.now()}},Xr=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=Math.round(t(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Fe=2e4;function hs(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Fe;)e+=n,s=t.next(e);return e>=Fe?1/0:e}function oc(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(hs(s),Fe);return{type:"keyframes",ease:r=>s.next(i*r).value/e,duration:ot(i)}}const ac=5;function Zr(t,e,n){const s=Math.max(e-ac,0);return Vr(n-t(s),e-s)}const N={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},un=.001;function lc({duration:t=N.duration,bounce:e=N.bounce,velocity:n=N.velocity,mass:s=N.mass}){let i,r;Xt(t<=ht(N.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-e;o=gt(N.minDamping,N.maxDamping,o),t=gt(N.minDuration,N.maxDuration,ot(t)),o<1?(i=u=>{const c=u*o,h=c*t,d=c-n,f=Mn(u,o),g=Math.exp(-h);return un-d/f*g},r=u=>{const h=u*o*t,d=h*n+n,f=Math.pow(o,2)*Math.pow(u,2)*t,g=Math.exp(-h),m=Mn(Math.pow(u,2),o);return(-i(u)+un>0?-1:1)*((d-f)*g)/m}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-un+c*h},r=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=uc(i,r,a);if(t=ht(t),isNaN(l))return{stiffness:N.stiffness,damping:N.damping,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:o*2*Math.sqrt(s*u),duration:t}}}const cc=12;function uc(t,e,n){let s=n;for(let i=1;i<cc;i++)s=s-t(s)/e(s);return s}function Mn(t,e){return t*Math.sqrt(1-e*e)}const hc=["duration","bounce"],dc=["stiffness","damping","mass"];function Xs(t,e){return e.some(n=>t[n]!==void 0)}function fc(t){let e={velocity:N.velocity,stiffness:N.stiffness,damping:N.damping,mass:N.mass,isResolvedFromDuration:!1,...t};if(!Xs(t,dc)&&Xs(t,hc))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*gt(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:N.mass,stiffness:i,damping:r}}else{const n=lc(t);e={...e,...n,mass:N.mass},e.isResolvedFromDuration=!0}return e}function ze(t=N.visualDuration,e=N.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=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:d,isResolvedFromDuration:f}=fc({...n,velocity:-ot(n.velocity||0)}),g=d||0,m=u/(2*Math.sqrt(l*c)),v=o-r,y=ot(Math.sqrt(l/c)),x=Math.abs(v)<5;s||(s=x?N.restSpeed.granular:N.restSpeed.default),i||(i=x?N.restDelta.granular:N.restDelta.default);let p;if(m<1){const S=Mn(y,m);p=P=>{const _=Math.exp(-m*y*P);return o-_*((g+m*y*v)/S*Math.sin(S*P)+v*Math.cos(S*P))}}else if(m===1)p=S=>o-Math.exp(-y*S)*(v+(g+y*v)*S);else{const S=y*Math.sqrt(m*m-1);p=P=>{const _=Math.exp(-m*y*P),T=Math.min(S*P,300);return o-_*((g+m*y*v)*Math.sinh(T)+S*v*Math.cosh(T))/S}}const C={calculatedDuration:f&&h||null,next:S=>{const P=p(S);if(f)a.done=S>=h;else{let _=S===0?g:0;m<1&&(_=S===0?ht(g):Zr(p,S,P));const T=Math.abs(_)<=s,E=Math.abs(o-P)<=i;a.done=T&&E}return a.value=a.done?o:P,a},toString:()=>{const S=Math.min(hs(C),Fe),P=Xr(_=>C.next(S*_).value,S,30);return S+"ms "+P},toTransition:()=>{}};return C}ze.applyToOptions=t=>{const e=oc(t,100,ze);return t.ease=e.ease,t.duration=ht(e.duration),t.type="keyframes",t};function En({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},f=T=>a!==void 0&&T<a||l!==void 0&&T>l,g=T=>a===void 0?l:l===void 0||Math.abs(a-T)<Math.abs(l-T)?a:l;let m=n*e;const v=h+m,y=o===void 0?v:o(v);y!==v&&(m=y-h);const x=T=>-m*Math.exp(-T/s),p=T=>y+x(T),C=T=>{const E=x(T),L=p(T);d.done=Math.abs(E)<=u,d.value=d.done?y:L};let S,P;const _=T=>{f(d.value)&&(S=T,P=ze({keyframes:[d.value,g(d.value)],velocity:Zr(p,T,d.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return _(0),{calculatedDuration:null,next:T=>{let E=!1;return!P&&S===void 0&&(E=!0,C(T),_(T)),S!==void 0&&T>=S?P.next(T-S):(!E&&C(T),d)}}}function mc(t,e,n){const s=[],i=n||vt.mix||Yr,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||at:e;a=be(l,a)}s.push(a)}return s}function pc(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(yt(r===e.length,"Both input and output ranges must be the same length","range-length"),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=mc(e,s,i),l=a.length,u=c=>{if(o&&c<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(c<t[h+1]);h++);const d=de(t[h],t[h+1],c);return a[h](d)};return n?c=>u(gt(t[0],t[r-1],c)):u}function gc(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=de(0,e,s);t.push(F(n,1,i))}}function yc(t){const e=[0];return gc(e,t.length-1),e}function vc(t,e){return t.map(n=>n*e)}function xc(t,e){return t.map(()=>e||Nr).splice(0,t.length-1)}function Nt({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=kl(s)?s.map(Ks):Ks(s),r={done:!1,value:e[0]},o=vc(n&&n.length===e.length?n:yc(e),t),a=pc(o,e,{ease:Array.isArray(i)?i:xc(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const bc=t=>t!==null;function ds(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(bc),a=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const wc={decay:En,inertia:En,tween:Nt,keyframes:Nt,spring:ze};function Jr(t){typeof t.type=="string"&&(t.type=wc[t.type])}class fs{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Cc=t=>t/100;class ms extends fs{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==tt.now()&&this.tick(tt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;Jr(e);const{type:n=Nt,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const l=n||Nt;process.env.NODE_ENV!=="production"&&l!==Nt&&yt(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Nt&&typeof a[0]!="number"&&(this.mixKeyframes=be(Cc,Yr(a[0],a[1])),a=[0,100]);const u=l({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=hs(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:c,repeat:h,repeatType:d,repeatDelay:f,type:g,onUpdate:m,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let p=this.currentTime,C=s;if(h){const T=Math.min(this.currentTime,i)/a;let E=Math.floor(T),L=T%1;!L&&T>=1&&(L=1),L===1&&E--,E=Math.min(E,h+1),!!(E%2)&&(d==="reverse"?(L=1-L,f&&(L-=f/a)):d==="mirror"&&(C=o)),p=gt(0,1,L)*a}const S=x?{done:!1,value:c[0]}:C.next(p);r&&(S.value=r(S.value));let{done:P}=S;!x&&l!==null&&(P=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const _=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return _&&g!==En&&(S.value=ds(c,this.options,v,this.speed)),m&&m(S.value),_&&this.finish(),S}then(e,n){return this.finished.then(e,n)}get duration(){return ot(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+ot(e)}get time(){return ot(this.currentTime)}set time(e){e=ht(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(tt.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=ot(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=rc,startTime:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),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(tt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function _c(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const kt=t=>t*180/Math.PI,An=t=>{const e=kt(Math.atan2(t[1],t[0]));return Vn(e)},Sc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:An,rotateZ:An,skewX:t=>kt(Math.atan(t[1])),skewY:t=>kt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Vn=t=>(t=t%360,t<0&&(t+=360),t),Zs=An,Js=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Qs=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Tc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Js,scaleY:Qs,scale:t=>(Js(t)+Qs(t))/2,rotateX:t=>Vn(kt(Math.atan2(t[6],t[5]))),rotateY:t=>Vn(kt(Math.atan2(-t[2],t[0]))),rotateZ:Zs,rotate:Zs,skewX:t=>kt(Math.atan(t[4])),skewY:t=>kt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function kn(t){return t.includes("scale")?1:0}function Rn(t,e){if(!t||t==="none")return kn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Tc,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Sc,i=a}if(!i)return kn(e);const r=s[e],o=i[1].split(",").map(Mc);return typeof r=="function"?r(o):o[r]}const Pc=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Rn(n,e)};function Mc(t){return parseFloat(t.trim())}const Jt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Qt=new Set(Jt),ti=t=>t===Zt||t===M,Ec=new Set(["x","y","z"]),Ac=Jt.filter(t=>!Ec.has(t));function Vc(t){const e=[];return Ac.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const Rt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Rn(e,"x"),y:(t,{transform:e})=>Rn(e,"y")};Rt.translateX=Rt.x;Rt.translateY=Rt.y;const Dt=new Set;let Dn=!1,jn=!1,Ln=!1;function Qr(){if(jn){const t=Array.from(Dt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Vc(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,o])=>{s.getValue(r)?.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}jn=!1,Dn=!1,Dt.forEach(t=>t.complete(Ln)),Dt.clear()}function to(){Dt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(jn=!0)})}function kc(){Ln=!0,to(),Qr(),Ln=!1}class ps{constructor(e,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Dt.add(this),Dn||(Dn=!0,B.read(to),B.resolveKeyframes(Qr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i?.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&r===void 0&&i.set(e[0])}_c(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Dt.delete(this)}cancel(){this.state==="scheduled"&&(Dt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Rc=t=>t.startsWith("--");function Dc(t,e,n){Rc(e)?t.style.setProperty(e,n):t.style[e]=n}const jc=es(()=>window.ScrollTimeline!==void 0),Lc={};function Oc(t,e){const n=es(t);return()=>Lc[e]??n()}const eo=Oc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ie=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,ei={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ie([0,.65,.55,1]),circOut:ie([.55,0,1,.45]),backIn:ie([.31,.01,.66,-.59]),backOut:ie([.33,1.53,.69,.99])};function no(t,e){if(t)return typeof t=="function"?eo()?Xr(t,e):"ease-out":Fr(t)?ie(t):Array.isArray(t)?t.map(n=>no(n,e)||ei.easeOut):ei[t]}function Ic(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const h=no(a,i);Array.isArray(h)&&(c.easing=h);const d={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return u&&(d.pseudoElement=u),t.animate(c,d)}function so(t){return typeof t=="function"&&"applyToOptions"in t}function Bc({type:t,...e}){return so(t)&&eo()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Nc extends fs{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,yt(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=Bc(e);this.animation=Ic(n,s,i,u,r),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const c=ds(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Dc(n,s,c),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return ot(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+ot(e)}get time(){return ot(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=ht(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&jc()?(this.animation.timeline=e,at):n(this)}}const io={anticipate:Or,backInOut:Lr,circInOut:Br};function Fc(t){return t in io}function zc(t){typeof t.ease=="string"&&Fc(t.ease)&&(t.ease=io[t.ease])}const ni=10;class $c extends Nc{constructor(e){zc(e),Jr(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new ms({...o,autoplay:!1}),l=ht(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-ni).value,a.sample(l).value,ni),a.stop()}}const si=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(_t.test(t)||t==="0")&&!t.startsWith("url("));function Wc(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Uc(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=si(i,e),a=si(r,e);return Xt(o===a,`You are trying to animate ${e} from "${i}" to "${r}". "${o?r:i}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:Wc(t)||(n==="spring"||so(n))&&s}function On(t){t.duration=0,t.type="keyframes"}const Kc=new Set(["opacity","clipPath","filter","transform"]),Hc=es(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Gc(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return Hc()&&n&&Kc.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const qc=40;class Yc extends fs{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=tt.now();const d={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:l,motionValue:u,element:c,...h},f=c?.KeyframeResolver||ps;this.keyframeResolver=new f(a,(g,m,v)=>this.onKeyframesResolved(g,m,d,!v),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=s;this.resolvedAt=tt.now(),Uc(e,r,o,a)||((vt.instantAnimations||!l)&&c?.(ds(e,s,n)),e[0]=e[e.length-1],On(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>qc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},f=!u&&Gc(d)?new $c({...d,element:d.motionValue.owner.current}):new ms(d);f.finished.then(()=>this.notifyFinished()).catch(at),this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),kc()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const Xc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Zc(t){const e=Xc.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}const Jc=4;function ro(t,e,n=1){yt(n<=Jc,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=Zc(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return Mr(o)?parseFloat(o):o}return as(i)?ro(i,e,n+1):i}function gs(t,e){return t?.[e]??t?.default??t}const oo=new Set(["width","height","top","left","right","bottom",...Jt]),Qc={test:t=>t==="auto",parse:t=>t},ao=t=>e=>e.test(t),lo=[Zt,M,mt,bt,Wl,$l,Qc],ii=t=>lo.find(ao(t));function tu(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Ar(t):!0}const eu=new Set(["brightness","contrast","saturate","opacity"]);function nu(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(ls)||[];if(!s)return t;const i=n.replace(s,"");let r=eu.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const su=/\b([a-z-]*)\(.*?\)/gu,In={..._t,getAnimatableNone:t=>{const e=t.match(su);return e?e.map(nu).join(" "):t}},ri={...Zt,transform:Math.round},iu={rotate:bt,rotateX:bt,rotateY:bt,rotateZ:bt,scale:Pe,scaleX:Pe,scaleY:Pe,scaleZ:Pe,skew:bt,skewX:bt,skewY:bt,distance:M,translateX:M,translateY:M,translateZ:M,x:M,y:M,z:M,perspective:M,transformPerspective:M,opacity:fe,originX:Hs,originY:Hs,originZ:M},ys={borderWidth:M,borderTopWidth:M,borderRightWidth:M,borderBottomWidth:M,borderLeftWidth:M,borderRadius:M,radius:M,borderTopLeftRadius:M,borderTopRightRadius:M,borderBottomRightRadius:M,borderBottomLeftRadius:M,width:M,maxWidth:M,height:M,maxHeight:M,top:M,right:M,bottom:M,left:M,padding:M,paddingTop:M,paddingRight:M,paddingBottom:M,paddingLeft:M,margin:M,marginTop:M,marginRight:M,marginBottom:M,marginLeft:M,backgroundPositionX:M,backgroundPositionY:M,...iu,zIndex:ri,fillOpacity:fe,strokeOpacity:fe,numOctaves:ri},ru={...ys,color:U,backgroundColor:U,outlineColor:U,fill:U,stroke:U,borderColor:U,borderTopColor:U,borderRightColor:U,borderBottomColor:U,borderLeftColor:U,filter:In,WebkitFilter:In},co=t=>ru[t];function uo(t,e){let n=co(t);return n!==In&&(n=_t),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ou=new Set(["auto","none","0"]);function au(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!ou.has(r)&&me(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=uo(n,i)}class lu extends ps{constructor(e,n,s,i,r){super(e,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let u=e[l];if(typeof u=="string"&&(u=u.trim(),as(u))){const c=ro(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!oo.has(s)||e.length!==2)return;const[i,r]=e,o=ii(i),a=ii(r);if(o!==a)if(ti(o)&&ti(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else Rt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||tu(e[i]))&&s.push(i);s.length&&au(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Rt[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=Rt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{e.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function cu(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const ho=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function fo(t){return Er(t)&&"offsetHeight"in t}const oi=30,uu=t=>!isNaN(parseFloat(t));class hu{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=tt.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=tt.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=uu(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&ss(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new ns);const s=this.events[e].add(n);return e==="change"?()=>{s(),B.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=tt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>oi)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,oi);return Vr(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(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(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Gt(t,e){return new hu(t,e)}const{schedule:vs}=zr(queueMicrotask,!1),ut={x:!1,y:!1};function mo(){return ut.x||ut.y}function du(t){return t==="x"||t==="y"?ut[t]?null:(ut[t]=!0,()=>{ut[t]=!1}):ut.x||ut.y?null:(ut.x=ut.y=!0,()=>{ut.x=ut.y=!1})}function po(t,e){const n=cu(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function ai(t){return!(t.pointerType==="touch"||mo())}function fu(t,e,n={}){const[s,i,r]=po(t,n),o=a=>{if(!ai(a))return;const{target:l}=a,u=e(l,a);if(typeof u!="function"||!l)return;const c=h=>{ai(h)&&(u(h),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return s.forEach(a=>{a.addEventListener("pointerenter",o,i)}),r}const go=(t,e)=>e?t===e?!0:go(t,e.parentElement):!1,xs=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,mu=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function pu(t){return mu.has(t.tagName)||t.tabIndex!==-1}const je=new WeakSet;function li(t){return e=>{e.key==="Enter"&&t(e)}}function hn(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const gu=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=li(()=>{if(je.has(n))return;hn(n,"down");const i=li(()=>{hn(n,"up")}),r=()=>hn(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function ci(t){return xs(t)&&!mo()}function yu(t,e,n={}){const[s,i,r]=po(t,n),o=a=>{const l=a.currentTarget;if(!ci(a))return;je.add(l);const u=e(l,a),c=(f,g)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",d),je.has(l)&&je.delete(l),ci(f)&&typeof u=="function"&&u(f,{success:g})},h=f=>{c(f,l===window||l===document||n.useGlobalTarget||go(l,f.target))},d=f=>{c(f,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",d,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),fo(a)&&(a.addEventListener("focus",u=>gu(u,i)),!pu(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function yo(t){return Er(t)&&"ownerSVGElement"in t}function vu(t){return yo(t)&&t.tagName==="svg"}const Z=t=>!!(t&&t.getVelocity),xu=[...lo,U,_t],bu=t=>xu.find(ao(t)),bs=w.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function ui(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function wu(...t){return e=>{let n=!1;const s=t.map(i=>{const r=ui(i,e);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let i=0;i<s.length;i++){const r=s[i];typeof r=="function"?r():ui(t[i],null)}}}}function Cu(...t){return V.useCallback(wu(...t),t)}class _u extends V.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=n.offsetParent,i=fo(s)&&s.offsetWidth||0,r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft,r.right=i-r.width-r.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Su({children:t,isPresent:e,anchorX:n,root:s}){const i=w.useId(),r=w.useRef(null),o=w.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=w.useContext(bs),l=Cu(r,t?.ref);return w.useInsertionEffect(()=>{const{width:u,height:c,top:h,left:d,right:f}=o.current;if(e||!r.current||!u||!c)return;const g=n==="left"?`left: ${d}`:`right: ${f}`;r.current.dataset.motionPopId=i;const m=document.createElement("style");a&&(m.nonce=a);const v=s??document.head;return v.appendChild(m),m.sheet&&m.sheet.insertRule(`
|
|
5
|
+
*/var $s;function sl(){return $s||($s=1,(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var r="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(r=i(r,s(a)))}return r}function s(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var o="";for(var a in r)e.call(r,a)&&r[a]&&(o=i(o,a));return o}function i(r,o){return o?r?r+" "+o:r+o:r}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(nn)),nn.exports}var il=sl();const At=nl(il),rl="_rippleOverlay_s2kim_8",ol="_ripple_s2kim_8",zs={rippleOverlay:rl,ripple:ol},sn="button, a, input, label, [role='button'], [data-ripple']";function al(t){if(typeof t.composedPath=="function")return t.composedPath();const e=[];let n=t.target;for(;n;)e.push(n),n=n.parentNode||n.host;return e.push(window),e}const xe=w.forwardRef(({color:t="rgba(0,0,0,0.18)",duration:e=1e3,radius:n="auto",className:s},i)=>{const r=w.useRef(null),[o,a]=w.useState([]),l=w.useRef([]),u=w.useRef(1),c=w.useRef(null),h=()=>{l.current.forEach(m=>clearTimeout(m)),l.current=[]},d=w.useCallback((m,v,y,x)=>{const p=y.getBoundingClientRect(),_=n==="auto"?Math.max(p.width,p.height)*2:n,S=m-x.left,P=v-x.top,C=Math.max(0,p.top-x.top),T=Math.max(0,p.left-x.left),E=Math.max(0,x.right-p.right),L=Math.max(0,x.bottom-p.bottom),pt=window.getComputedStyle(y).borderRadius||"0px",Tt=u.current++,xt={id:Tt,left:S-_/2,top:P-_/2,size:Math.ceil(_),clip:{top:Math.round(C),right:Math.round(E),bottom:Math.round(L),left:Math.round(T)},borderRadius:pt};a(Lt=>[...Lt,xt]);const jt=window.setTimeout(()=>{a(Lt=>Lt.filter($=>$.id!==Tt))},e+80);l.current.push(jt)},[e,n]),f=w.useCallback(m=>{try{if(!r.current)return;const v=r.current,y=v.parentElement;if(!y)return;const x=al(m);let p=null;for(const T of x)if(T instanceof Element){if(T===y)break;if(T.matches&&T.matches(sn)){p=T;break}}if(p||(p=y),p.closest&&(p.closest("[disabled]")||p.getAttribute("aria-disabled")==="true"||p.classList.contains("ripple-disabled")))return;const _=m.target;if(_&&_.closest&&(_.closest("[disabled]")||_.getAttribute?.("aria-disabled")==="true"))return;const S=v.getBoundingClientRect(),{clientX:P}=m,{clientY:C}=m;d(P,C,p,S)}catch{}},[d]),g=w.useCallback(m=>{if(!r.current||!(m.key==="Enter"||m.key===" "))return;const v=r.current,y=v.parentElement;if(!y)return;const x=document.activeElement;let p=null;if(x instanceof Element&&x.matches(sn)&&(p=x),p||(p=y),p.closest&&(p.closest("[disabled]")||p.getAttribute("aria-disabled")==="true"))return;const _=v.getBoundingClientRect(),S=p.getBoundingClientRect().left+p.getBoundingClientRect().width/2,P=p.getBoundingClientRect().top+p.getBoundingClientRect().height/2;d(S,P,p,_)},[d]);return w.useImperativeHandle(i,()=>({trigger:({center:m=!0,x:v,y}={})=>{const x=r.current;if(!x)return;const p=x.parentElement;if(!p)return;const _=x.getBoundingClientRect(),S=document.activeElement instanceof Element&&document.activeElement.matches(sn)?document.activeElement:p,P=m?S.getBoundingClientRect().left+S.getBoundingClientRect().width/2:v??_.left+_.width/2,C=m?S.getBoundingClientRect().top+S.getBoundingClientRect().height/2:y??_.top+_.height/2;d(P,C,S,_)}}),[d]),w.useEffect(()=>{const m=r.current;if(!m)return;const v=m.parentElement;if(!v)return;const y=window.getComputedStyle(v);let x=!1;return y.position==="static"&&(v.style.position="relative",x=!0,c.current=v),v.addEventListener("pointerdown",f,!0),v.addEventListener("keydown",g),()=>{v.removeEventListener("pointerdown",f,!0),v.removeEventListener("keydown",g),x&&c.current&&(c.current.style.position="",c.current=null),h()}},[f,g]),w.useEffect(()=>()=>h(),[]),b.jsx("div",{ref:r,className:`${zs.rippleOverlay} ${s??""}`,"aria-hidden":!0,children:o.map(m=>b.jsx("span",{className:zs.ripple,style:{left:`${m.left}px`,top:`${m.top}px`,width:`${m.size}px`,height:`${m.size}px`,backgroundColor:t,animationDuration:`${e}ms`,clipPath:`inset(${m.clip.top}px ${m.clip.right}px ${m.clip.bottom}px ${m.clip.left}px round ${m.borderRadius})`}},m.id))})});function Ge(t,e){const{current:n}=w.useRef(t!==void 0),[s,i]=w.useState(e),r=n?t:s,o=w.useCallback(a=>{n||i(a)},[n]);return[r,o]}const Sr=(t,e)=>{const[n,s]=w.useState({top:0,left:0,width:0});return w.useLayoutEffect(()=>{if(!e||!t.current)return;const i=()=>{const o=t.current.getBoundingClientRect();s({top:o.bottom+window.scrollY+4,left:o.left+window.scrollX,width:o.width})};i(),window.addEventListener("resize",i),window.addEventListener("scroll",i,!0);const r=new ResizeObserver(()=>i());return r.observe(t.current),()=>{window.removeEventListener("resize",i),window.removeEventListener("scroll",i,!0),r.disconnect()}},[e,t]),n};function qe(t,e,n,s=""){if(n)return t[`${e}_${n}${s}`]}function he(t,e,n){return qe(t,e,n,"Size")}const ll="_button_11ykb_8",cl="_button_primary_11ykb_19",ul="_button_secondary_11ykb_22",hl="_button_negative_11ykb_25",dl="_button_positive_11ykb_28",fl="_button_warning_11ykb_31",ml="_button_neutral_11ykb_34",pl="_button_mdSize_11ykb_118",gl="_button_smSize_11ykb_128",yl="_button_xsSize_11ykb_138",rn={button:ll,button_primary:cl,button_secondary:ul,button_negative:hl,button_positive:dl,button_warning:fl,button_neutral:ml,"button_neutral-white":"_button_neutral-white_11ykb_37","button_no-bg":"_button_no-bg_11ykb_40",button_mdSize:pl,button_smSize:gl,button_xsSize:yl};function Yn({attr:t,children:e,className:n,type:s="button",color:i="primary",size:r="md",...o}){const a="button";return b.jsxs("button",{...t,...o,type:s,className:At(rn[a],n,he(rn,a,r),qe(rn,a,i)),children:[b.jsx(xe,{}),e]})}const vl="_overlay_1udux_8",xl="_open_1udux_21",bl="_modal_1udux_25",wl="_closeButton_1udux_42",_l="_size_lg_1udux_49",Cl="_size_md_1udux_52",Sl="_size_sm_1udux_55",ee={overlay:vl,open:xl,modal:bl,"modal-animation":"_modal-animation_1udux_1",closeButton:wl,size_lg:_l,size_md:Cl,size_sm:Sl},Tr=w.forwardRef(({isOpen:t=!0,onClose:e,overlayClassName:n,modalClassName:s,size:i="md",closeOnBackdropClick:r=!0,closeOnEsc:o=!0,disableBodyScroll:a=!1,showAbsoluteCloseButton:l=!1,children:u},c)=>{w.useEffect(()=>{if(a&&t&&typeof window<"u"&&typeof document<"u"){const f=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=f}}},[t,a]);const h=w.useCallback(f=>{f.key==="Escape"&&e&&e()},[e]);w.useEffect(()=>{if(typeof window<"u"&&typeof document<"u"&&o&&t)return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[t,o,h]);const d=w.useCallback(f=>{f.target===f.currentTarget&&r&&e&&e()},[r,e]);return b.jsx("div",{onClick:d,className:I(ee.overlay,{[ee.open]:t},n),children:b.jsxs(A,{ref:c,className:I(ee.modal,ee[`size_${i}`],s),children:[l&&b.jsx(Yn,{className:ee.closeButton,onClick:e,color:"neutral",children:b.jsx(Cr,{})}),u]})})});Tr.displayName="Modal";const Xn=w.createContext({});function Zn(t){const e=w.useRef(null);return e.current===null&&(e.current=t()),e.current}const Jn=typeof window<"u",Pr=Jn?w.useLayoutEffect:w.useEffect,Ye=w.createContext(null);function Qn(t,e){t.indexOf(e)===-1&&t.push(e)}function ts(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const gt=(t,e,n)=>n>e?e:n<t?t:n;function Sn(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let Xt=()=>{},yt=()=>{};process.env.NODE_ENV!=="production"&&(Xt=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(Sn(e,n))},yt=(t,e,n)=>{if(!t)throw new Error(Sn(e,n))});const vt={},Mr=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Er(t){return typeof t=="object"&&t!==null}const Ar=t=>/^0[^.\s]+$/u.test(t);function es(t){let e;return()=>(e===void 0&&(e=t()),e)}const lt=t=>t,Tl=(t,e)=>n=>e(t(n)),be=(...t)=>t.reduce(Tl),de=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class ns{constructor(){this.subscriptions=[]}add(e){return Qn(this.subscriptions,e),()=>ts(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ht=t=>t*1e3,at=t=>t/1e3;function kr(t,e){return e?t*(1e3/e):0}const Ws=new Set;function ss(t,e,n){t||Ws.has(e)||(console.warn(Sn(e,n)),Ws.add(e))}const Vr=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Pl=1e-7,Ml=12;function El(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=Vr(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>Pl&&++a<Ml);return o}function we(t,e,n,s){if(t===e&&n===s)return lt;const i=r=>El(r,0,1,t,n);return r=>r===0||r===1?r:Vr(i(r),e,s)}const Rr=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Dr=t=>e=>1-t(1-e),jr=we(.33,1.53,.69,.99),is=Dr(jr),Lr=Rr(is),Or=t=>(t*=2)<1?.5*is(t):.5*(2-Math.pow(2,-10*(t-1))),rs=t=>1-Math.sin(Math.acos(t)),Ir=Dr(rs),Br=Rr(rs),Al=we(.42,0,1,1),kl=we(0,0,.58,1),Nr=we(.42,0,.58,1),Vl=t=>Array.isArray(t)&&typeof t[0]!="number",Fr=t=>Array.isArray(t)&&typeof t[0]=="number",Us={linear:lt,easeIn:Al,easeInOut:Nr,easeOut:kl,circIn:rs,circInOut:Br,circOut:Ir,backIn:is,backInOut:Lr,backOut:jr,anticipate:Or},Rl=t=>typeof t=="string",Ks=t=>{if(Fr(t)){yt(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,s,i]=t;return we(e,n,s,i)}else if(Rl(t))return yt(Us[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),Us[t];return t},Te=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Dl(t,e){let n=new Set,s=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){o.has(c)&&(u.schedule(c),t()),c(a)}const u={schedule:(c,h=!1,d=!1)=>{const g=d&&i?n:s;return h&&o.add(c),g.has(c)||g.add(c),c},cancel:c=>{s.delete(c),o.delete(c)},process:c=>{if(a=c,i){r=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,r&&(r=!1,u.process(c))}};return u}const jl=40;function $r(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Te.reduce((p,_)=>(p[_]=Dl(r),p),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:h,preRender:d,render:f,postRender:g}=o,m=()=>{const p=vt.useManualTiming?i.timestamp:performance.now();n=!1,vt.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(p-i.timestamp,jl),1)),i.timestamp=p,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),d.process(i),f.process(i),g.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(m))},v=()=>{n=!0,s=!0,i.isProcessing||t(m)};return{schedule:Te.reduce((p,_)=>{const S=o[_];return p[_]=(P,C=!1,T=!1)=>(n||v(),S.schedule(P,C,T)),p},{}),cancel:p=>{for(let _=0;_<Te.length;_++)o[Te[_]].cancel(p)},state:i,steps:o}}const{schedule:B,cancel:_t,state:G,steps:on}=$r(typeof requestAnimationFrame<"u"?requestAnimationFrame:lt,!0);let De;function Ll(){De=void 0}const tt={now:()=>(De===void 0&&tt.set(G.isProcessing||vt.useManualTiming?G.timestamp:performance.now()),De),set:t=>{De=t,queueMicrotask(Ll)}},zr=t=>e=>typeof e=="string"&&e.startsWith(t),os=zr("--"),Ol=zr("var(--"),as=t=>Ol(t)?Il.test(t.split("/*")[0].trim()):!1,Il=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Zt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},fe={...Zt,transform:t=>gt(0,1,t)},Pe={...Zt,default:1},re=t=>Math.round(t*1e5)/1e5,ls=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Bl(t){return t==null}const Nl=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,cs=(t,e)=>n=>!!(typeof n=="string"&&Nl.test(n)&&n.startsWith(t)||e&&!Bl(n)&&Object.prototype.hasOwnProperty.call(n,e)),Wr=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(ls);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Fl=t=>gt(0,255,t),an={...Zt,transform:t=>Math.round(Fl(t))},kt={test:cs("rgb","red"),parse:Wr("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+an.transform(t)+", "+an.transform(e)+", "+an.transform(n)+", "+re(fe.transform(s))+")"};function $l(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Tn={test:cs("#"),parse:$l,transform:kt.transform},_e=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),bt=_e("deg"),mt=_e("%"),M=_e("px"),zl=_e("vh"),Wl=_e("vw"),Hs={...mt,parse:t=>mt.parse(t)/100,transform:t=>mt.transform(t*100)},Bt={test:cs("hsl","hue"),parse:Wr("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+mt.transform(re(e))+", "+mt.transform(re(n))+", "+re(fe.transform(s))+")"},U={test:t=>kt.test(t)||Tn.test(t)||Bt.test(t),parse:t=>kt.test(t)?kt.parse(t):Bt.test(t)?Bt.parse(t):Tn.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?kt.transform(t):Bt.transform(t),getAnimatableNone:t=>{const e=U.parse(t);return e.alpha=0,U.transform(e)}},Ul=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Kl(t){return isNaN(t)&&typeof t=="string"&&(t.match(ls)?.length||0)+(t.match(Ul)?.length||0)>0}const Ur="number",Kr="color",Hl="var",Gl="var(",Gs="${}",ql=/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 me(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(ql,l=>(U.test(l)?(s.color.push(r),i.push(Kr),n.push(U.parse(l))):l.startsWith(Gl)?(s.var.push(r),i.push(Hl),n.push(l)):(s.number.push(r),i.push(Ur),n.push(parseFloat(l))),++r,Gs)).split(Gs);return{values:n,split:a,indexes:s,types:i}}function Hr(t){return me(t).values}function Gr(t){const{split:e,types:n}=me(t),s=e.length;return i=>{let r="";for(let o=0;o<s;o++)if(r+=e[o],i[o]!==void 0){const a=n[o];a===Ur?r+=re(i[o]):a===Kr?r+=U.transform(i[o]):r+=i[o]}return r}}const Yl=t=>typeof t=="number"?0:U.test(t)?U.getAnimatableNone(t):t;function Xl(t){const e=Hr(t);return Gr(t)(e.map(Yl))}const Ct={test:Kl,parse:Hr,createTransformer:Gr,getAnimatableNone:Xl};function ln(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Zl({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=ln(l,a,t+1/3),r=ln(l,a,t),o=ln(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function Ne(t,e){return n=>n>0?e:t}const F=(t,e,n)=>t+(e-t)*n,cn=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Jl=[Tn,kt,Bt],Ql=t=>Jl.find(e=>e.test(t));function qs(t){const e=Ql(t);if(Xt(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===Bt&&(n=Zl(n)),n}const Ys=(t,e)=>{const n=qs(t),s=qs(e);if(!n||!s)return Ne(t,e);const i={...n};return r=>(i.red=cn(n.red,s.red,r),i.green=cn(n.green,s.green,r),i.blue=cn(n.blue,s.blue,r),i.alpha=F(n.alpha,s.alpha,r),kt.transform(i))},Pn=new Set(["none","hidden"]);function tc(t,e){return Pn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function ec(t,e){return n=>F(t,e,n)}function us(t){return typeof t=="number"?ec:typeof t=="string"?as(t)?Ne:U.test(t)?Ys:ic:Array.isArray(t)?qr:typeof t=="object"?U.test(t)?Ys:nc:Ne}function qr(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>us(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function nc(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=us(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function sc(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const r=e.types[i],o=t.indexes[r][s[r]],a=t.values[o]??0;n[i]=a,s[r]++}return n}const ic=(t,e)=>{const n=Ct.createTransformer(e),s=me(t),i=me(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Pn.has(t)&&!i.values.length||Pn.has(e)&&!s.values.length?tc(t,e):be(qr(sc(s,i),i.values),n):(Xt(!0,`Complex values '${t}' and '${e}' 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"),Ne(t,e))};function Yr(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?F(t,e,n):us(t)(t,e)}const rc=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>B.update(e,n),stop:()=>_t(e),now:()=>G.isProcessing?G.timestamp:tt.now()}},Xr=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=Math.round(t(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Fe=2e4;function hs(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Fe;)e+=n,s=t.next(e);return e>=Fe?1/0:e}function oc(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(hs(s),Fe);return{type:"keyframes",ease:r=>s.next(i*r).value/e,duration:at(i)}}const ac=5;function Zr(t,e,n){const s=Math.max(e-ac,0);return kr(n-t(s),e-s)}const N={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},un=.001;function lc({duration:t=N.duration,bounce:e=N.bounce,velocity:n=N.velocity,mass:s=N.mass}){let i,r;Xt(t<=ht(N.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-e;o=gt(N.minDamping,N.maxDamping,o),t=gt(N.minDuration,N.maxDuration,at(t)),o<1?(i=u=>{const c=u*o,h=c*t,d=c-n,f=Mn(u,o),g=Math.exp(-h);return un-d/f*g},r=u=>{const h=u*o*t,d=h*n+n,f=Math.pow(o,2)*Math.pow(u,2)*t,g=Math.exp(-h),m=Mn(Math.pow(u,2),o);return(-i(u)+un>0?-1:1)*((d-f)*g)/m}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-un+c*h},r=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=uc(i,r,a);if(t=ht(t),isNaN(l))return{stiffness:N.stiffness,damping:N.damping,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:o*2*Math.sqrt(s*u),duration:t}}}const cc=12;function uc(t,e,n){let s=n;for(let i=1;i<cc;i++)s=s-t(s)/e(s);return s}function Mn(t,e){return t*Math.sqrt(1-e*e)}const hc=["duration","bounce"],dc=["stiffness","damping","mass"];function Xs(t,e){return e.some(n=>t[n]!==void 0)}function fc(t){let e={velocity:N.velocity,stiffness:N.stiffness,damping:N.damping,mass:N.mass,isResolvedFromDuration:!1,...t};if(!Xs(t,dc)&&Xs(t,hc))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*gt(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:N.mass,stiffness:i,damping:r}}else{const n=lc(t);e={...e,...n,mass:N.mass},e.isResolvedFromDuration=!0}return e}function $e(t=N.visualDuration,e=N.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=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:d,isResolvedFromDuration:f}=fc({...n,velocity:-at(n.velocity||0)}),g=d||0,m=u/(2*Math.sqrt(l*c)),v=o-r,y=at(Math.sqrt(l/c)),x=Math.abs(v)<5;s||(s=x?N.restSpeed.granular:N.restSpeed.default),i||(i=x?N.restDelta.granular:N.restDelta.default);let p;if(m<1){const S=Mn(y,m);p=P=>{const C=Math.exp(-m*y*P);return o-C*((g+m*y*v)/S*Math.sin(S*P)+v*Math.cos(S*P))}}else if(m===1)p=S=>o-Math.exp(-y*S)*(v+(g+y*v)*S);else{const S=y*Math.sqrt(m*m-1);p=P=>{const C=Math.exp(-m*y*P),T=Math.min(S*P,300);return o-C*((g+m*y*v)*Math.sinh(T)+S*v*Math.cosh(T))/S}}const _={calculatedDuration:f&&h||null,next:S=>{const P=p(S);if(f)a.done=S>=h;else{let C=S===0?g:0;m<1&&(C=S===0?ht(g):Zr(p,S,P));const T=Math.abs(C)<=s,E=Math.abs(o-P)<=i;a.done=T&&E}return a.value=a.done?o:P,a},toString:()=>{const S=Math.min(hs(_),Fe),P=Xr(C=>_.next(S*C).value,S,30);return S+"ms "+P},toTransition:()=>{}};return _}$e.applyToOptions=t=>{const e=oc(t,100,$e);return t.ease=e.ease,t.duration=ht(e.duration),t.type="keyframes",t};function En({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},f=T=>a!==void 0&&T<a||l!==void 0&&T>l,g=T=>a===void 0?l:l===void 0||Math.abs(a-T)<Math.abs(l-T)?a:l;let m=n*e;const v=h+m,y=o===void 0?v:o(v);y!==v&&(m=y-h);const x=T=>-m*Math.exp(-T/s),p=T=>y+x(T),_=T=>{const E=x(T),L=p(T);d.done=Math.abs(E)<=u,d.value=d.done?y:L};let S,P;const C=T=>{f(d.value)&&(S=T,P=$e({keyframes:[d.value,g(d.value)],velocity:Zr(p,T,d.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return C(0),{calculatedDuration:null,next:T=>{let E=!1;return!P&&S===void 0&&(E=!0,_(T),C(T)),S!==void 0&&T>=S?P.next(T-S):(!E&&_(T),d)}}}function mc(t,e,n){const s=[],i=n||vt.mix||Yr,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||lt:e;a=be(l,a)}s.push(a)}return s}function pc(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(yt(r===e.length,"Both input and output ranges must be the same length","range-length"),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=mc(e,s,i),l=a.length,u=c=>{if(o&&c<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(c<t[h+1]);h++);const d=de(t[h],t[h+1],c);return a[h](d)};return n?c=>u(gt(t[0],t[r-1],c)):u}function gc(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=de(0,e,s);t.push(F(n,1,i))}}function yc(t){const e=[0];return gc(e,t.length-1),e}function vc(t,e){return t.map(n=>n*e)}function xc(t,e){return t.map(()=>e||Nr).splice(0,t.length-1)}function Nt({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Vl(s)?s.map(Ks):Ks(s),r={done:!1,value:e[0]},o=vc(n&&n.length===e.length?n:yc(e),t),a=pc(o,e,{ease:Array.isArray(i)?i:xc(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const bc=t=>t!==null;function ds(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(bc),a=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const wc={decay:En,inertia:En,tween:Nt,keyframes:Nt,spring:$e};function Jr(t){typeof t.type=="string"&&(t.type=wc[t.type])}class fs{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const _c=t=>t/100;class ms extends fs{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==tt.now()&&this.tick(tt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;Jr(e);const{type:n=Nt,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const l=n||Nt;process.env.NODE_ENV!=="production"&&l!==Nt&&yt(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Nt&&typeof a[0]!="number"&&(this.mixKeyframes=be(_c,Yr(a[0],a[1])),a=[0,100]);const u=l({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=hs(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:c,repeat:h,repeatType:d,repeatDelay:f,type:g,onUpdate:m,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let p=this.currentTime,_=s;if(h){const T=Math.min(this.currentTime,i)/a;let E=Math.floor(T),L=T%1;!L&&T>=1&&(L=1),L===1&&E--,E=Math.min(E,h+1),!!(E%2)&&(d==="reverse"?(L=1-L,f&&(L-=f/a)):d==="mirror"&&(_=o)),p=gt(0,1,L)*a}const S=x?{done:!1,value:c[0]}:_.next(p);r&&(S.value=r(S.value));let{done:P}=S;!x&&l!==null&&(P=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return C&&g!==En&&(S.value=ds(c,this.options,v,this.speed)),m&&m(S.value),C&&this.finish(),S}then(e,n){return this.finished.then(e,n)}get duration(){return at(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+at(e)}get time(){return at(this.currentTime)}set time(e){e=ht(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(tt.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=at(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=rc,startTime:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),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(tt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function Cc(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Vt=t=>t*180/Math.PI,An=t=>{const e=Vt(Math.atan2(t[1],t[0]));return kn(e)},Sc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:An,rotateZ:An,skewX:t=>Vt(Math.atan(t[1])),skewY:t=>Vt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},kn=t=>(t=t%360,t<0&&(t+=360),t),Zs=An,Js=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Qs=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Tc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Js,scaleY:Qs,scale:t=>(Js(t)+Qs(t))/2,rotateX:t=>kn(Vt(Math.atan2(t[6],t[5]))),rotateY:t=>kn(Vt(Math.atan2(-t[2],t[0]))),rotateZ:Zs,rotate:Zs,skewX:t=>Vt(Math.atan(t[4])),skewY:t=>Vt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Vn(t){return t.includes("scale")?1:0}function Rn(t,e){if(!t||t==="none")return Vn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Tc,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Sc,i=a}if(!i)return Vn(e);const r=s[e],o=i[1].split(",").map(Mc);return typeof r=="function"?r(o):o[r]}const Pc=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Rn(n,e)};function Mc(t){return parseFloat(t.trim())}const Jt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Qt=new Set(Jt),ti=t=>t===Zt||t===M,Ec=new Set(["x","y","z"]),Ac=Jt.filter(t=>!Ec.has(t));function kc(t){const e=[];return Ac.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const Rt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Rn(e,"x"),y:(t,{transform:e})=>Rn(e,"y")};Rt.translateX=Rt.x;Rt.translateY=Rt.y;const Dt=new Set;let Dn=!1,jn=!1,Ln=!1;function Qr(){if(jn){const t=Array.from(Dt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=kc(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,o])=>{s.getValue(r)?.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}jn=!1,Dn=!1,Dt.forEach(t=>t.complete(Ln)),Dt.clear()}function to(){Dt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(jn=!0)})}function Vc(){Ln=!0,to(),Qr(),Ln=!1}class ps{constructor(e,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Dt.add(this),Dn||(Dn=!0,B.read(to),B.resolveKeyframes(Qr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i?.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&r===void 0&&i.set(e[0])}Cc(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Dt.delete(this)}cancel(){this.state==="scheduled"&&(Dt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Rc=t=>t.startsWith("--");function Dc(t,e,n){Rc(e)?t.style.setProperty(e,n):t.style[e]=n}const jc=es(()=>window.ScrollTimeline!==void 0),Lc={};function Oc(t,e){const n=es(t);return()=>Lc[e]??n()}const eo=Oc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ie=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,ei={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ie([0,.65,.55,1]),circOut:ie([.55,0,1,.45]),backIn:ie([.31,.01,.66,-.59]),backOut:ie([.33,1.53,.69,.99])};function no(t,e){if(t)return typeof t=="function"?eo()?Xr(t,e):"ease-out":Fr(t)?ie(t):Array.isArray(t)?t.map(n=>no(n,e)||ei.easeOut):ei[t]}function Ic(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const h=no(a,i);Array.isArray(h)&&(c.easing=h);const d={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return u&&(d.pseudoElement=u),t.animate(c,d)}function so(t){return typeof t=="function"&&"applyToOptions"in t}function Bc({type:t,...e}){return so(t)&&eo()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Nc extends fs{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,yt(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=Bc(e);this.animation=Ic(n,s,i,u,r),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const c=ds(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Dc(n,s,c),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return at(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+at(e)}get time(){return at(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=ht(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&jc()?(this.animation.timeline=e,lt):n(this)}}const io={anticipate:Or,backInOut:Lr,circInOut:Br};function Fc(t){return t in io}function $c(t){typeof t.ease=="string"&&Fc(t.ease)&&(t.ease=io[t.ease])}const ni=10;class zc extends Nc{constructor(e){$c(e),Jr(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new ms({...o,autoplay:!1}),l=ht(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-ni).value,a.sample(l).value,ni),a.stop()}}const si=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Ct.test(t)||t==="0")&&!t.startsWith("url("));function Wc(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Uc(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=si(i,e),a=si(r,e);return Xt(o===a,`You are trying to animate ${e} from "${i}" to "${r}". "${o?r:i}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:Wc(t)||(n==="spring"||so(n))&&s}function On(t){t.duration=0,t.type="keyframes"}const Kc=new Set(["opacity","clipPath","filter","transform"]),Hc=es(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Gc(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return Hc()&&n&&Kc.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const qc=40;class Yc extends fs{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=tt.now();const d={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:l,motionValue:u,element:c,...h},f=c?.KeyframeResolver||ps;this.keyframeResolver=new f(a,(g,m,v)=>this.onKeyframesResolved(g,m,d,!v),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=s;this.resolvedAt=tt.now(),Uc(e,r,o,a)||((vt.instantAnimations||!l)&&c?.(ds(e,s,n)),e[0]=e[e.length-1],On(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>qc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},f=!u&&Gc(d)?new zc({...d,element:d.motionValue.owner.current}):new ms(d);f.finished.then(()=>this.notifyFinished()).catch(lt),this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Vc()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const Xc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Zc(t){const e=Xc.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}const Jc=4;function ro(t,e,n=1){yt(n<=Jc,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=Zc(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return Mr(o)?parseFloat(o):o}return as(i)?ro(i,e,n+1):i}function gs(t,e){return t?.[e]??t?.default??t}const oo=new Set(["width","height","top","left","right","bottom",...Jt]),Qc={test:t=>t==="auto",parse:t=>t},ao=t=>e=>e.test(t),lo=[Zt,M,mt,bt,Wl,zl,Qc],ii=t=>lo.find(ao(t));function tu(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Ar(t):!0}const eu=new Set(["brightness","contrast","saturate","opacity"]);function nu(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(ls)||[];if(!s)return t;const i=n.replace(s,"");let r=eu.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const su=/\b([a-z-]*)\(.*?\)/gu,In={...Ct,getAnimatableNone:t=>{const e=t.match(su);return e?e.map(nu).join(" "):t}},ri={...Zt,transform:Math.round},iu={rotate:bt,rotateX:bt,rotateY:bt,rotateZ:bt,scale:Pe,scaleX:Pe,scaleY:Pe,scaleZ:Pe,skew:bt,skewX:bt,skewY:bt,distance:M,translateX:M,translateY:M,translateZ:M,x:M,y:M,z:M,perspective:M,transformPerspective:M,opacity:fe,originX:Hs,originY:Hs,originZ:M},ys={borderWidth:M,borderTopWidth:M,borderRightWidth:M,borderBottomWidth:M,borderLeftWidth:M,borderRadius:M,radius:M,borderTopLeftRadius:M,borderTopRightRadius:M,borderBottomRightRadius:M,borderBottomLeftRadius:M,width:M,maxWidth:M,height:M,maxHeight:M,top:M,right:M,bottom:M,left:M,padding:M,paddingTop:M,paddingRight:M,paddingBottom:M,paddingLeft:M,margin:M,marginTop:M,marginRight:M,marginBottom:M,marginLeft:M,backgroundPositionX:M,backgroundPositionY:M,...iu,zIndex:ri,fillOpacity:fe,strokeOpacity:fe,numOctaves:ri},ru={...ys,color:U,backgroundColor:U,outlineColor:U,fill:U,stroke:U,borderColor:U,borderTopColor:U,borderRightColor:U,borderBottomColor:U,borderLeftColor:U,filter:In,WebkitFilter:In},co=t=>ru[t];function uo(t,e){let n=co(t);return n!==In&&(n=Ct),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ou=new Set(["auto","none","0"]);function au(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!ou.has(r)&&me(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=uo(n,i)}class lu extends ps{constructor(e,n,s,i,r){super(e,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let u=e[l];if(typeof u=="string"&&(u=u.trim(),as(u))){const c=ro(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!oo.has(s)||e.length!==2)return;const[i,r]=e,o=ii(i),a=ii(r);if(o!==a)if(ti(o)&&ti(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else Rt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||tu(e[i]))&&s.push(i);s.length&&au(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Rt[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=Rt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{e.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function cu(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const ho=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function fo(t){return Er(t)&&"offsetHeight"in t}const oi=30,uu=t=>!isNaN(parseFloat(t));class hu{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=tt.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=tt.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=uu(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&ss(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new ns);const s=this.events[e].add(n);return e==="change"?()=>{s(),B.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=tt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>oi)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,oi);return kr(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(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(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Gt(t,e){return new hu(t,e)}const{schedule:vs}=$r(queueMicrotask,!1),ut={x:!1,y:!1};function mo(){return ut.x||ut.y}function du(t){return t==="x"||t==="y"?ut[t]?null:(ut[t]=!0,()=>{ut[t]=!1}):ut.x||ut.y?null:(ut.x=ut.y=!0,()=>{ut.x=ut.y=!1})}function po(t,e){const n=cu(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function ai(t){return!(t.pointerType==="touch"||mo())}function fu(t,e,n={}){const[s,i,r]=po(t,n),o=a=>{if(!ai(a))return;const{target:l}=a,u=e(l,a);if(typeof u!="function"||!l)return;const c=h=>{ai(h)&&(u(h),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return s.forEach(a=>{a.addEventListener("pointerenter",o,i)}),r}const go=(t,e)=>e?t===e?!0:go(t,e.parentElement):!1,xs=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,mu=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function pu(t){return mu.has(t.tagName)||t.tabIndex!==-1}const je=new WeakSet;function li(t){return e=>{e.key==="Enter"&&t(e)}}function hn(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const gu=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=li(()=>{if(je.has(n))return;hn(n,"down");const i=li(()=>{hn(n,"up")}),r=()=>hn(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function ci(t){return xs(t)&&!mo()}function yu(t,e,n={}){const[s,i,r]=po(t,n),o=a=>{const l=a.currentTarget;if(!ci(a))return;je.add(l);const u=e(l,a),c=(f,g)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",d),je.has(l)&&je.delete(l),ci(f)&&typeof u=="function"&&u(f,{success:g})},h=f=>{c(f,l===window||l===document||n.useGlobalTarget||go(l,f.target))},d=f=>{c(f,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",d,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),fo(a)&&(a.addEventListener("focus",u=>gu(u,i)),!pu(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function yo(t){return Er(t)&&"ownerSVGElement"in t}function vu(t){return yo(t)&&t.tagName==="svg"}const Z=t=>!!(t&&t.getVelocity),xu=[...lo,U,Ct],bu=t=>xu.find(ao(t)),bs=w.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function ui(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function wu(...t){return e=>{let n=!1;const s=t.map(i=>{const r=ui(i,e);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let i=0;i<s.length;i++){const r=s[i];typeof r=="function"?r():ui(t[i],null)}}}}function _u(...t){return k.useCallback(wu(...t),t)}class Cu extends k.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=n.offsetParent,i=fo(s)&&s.offsetWidth||0,r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft,r.right=i-r.width-r.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Su({children:t,isPresent:e,anchorX:n,root:s}){const i=w.useId(),r=w.useRef(null),o=w.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=w.useContext(bs),l=_u(r,t?.ref);return w.useInsertionEffect(()=>{const{width:u,height:c,top:h,left:d,right:f}=o.current;if(e||!r.current||!u||!c)return;const g=n==="left"?`left: ${d}`:`right: ${f}`;r.current.dataset.motionPopId=i;const m=document.createElement("style");a&&(m.nonce=a);const v=s??document.head;return v.appendChild(m),m.sheet&&m.sheet.insertRule(`
|
|
6
6
|
[data-motion-pop-id="${i}"] {
|
|
7
7
|
position: absolute !important;
|
|
8
8
|
width: ${u}px !important;
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
${g}px !important;
|
|
11
11
|
top: ${h}px !important;
|
|
12
12
|
}
|
|
13
|
-
`),()=>{v.contains(m)&&v.removeChild(m)}},[e]),b.jsx(_u,{isPresent:e,childRef:r,sizeRef:o,children:V.cloneElement(t,{ref:l})})}const Tu=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:r,mode:o,anchorX:a,root:l})=>{const u=Zn(Pu),c=w.useId();let h=!0,d=w.useMemo(()=>(h=!1,{id:c,initial:e,isPresent:n,custom:i,onExitComplete:f=>{u.set(f,!0);for(const g of u.values())if(!g)return;s&&s()},register:f=>(u.set(f,!1),()=>u.delete(f))}),[n,u,s]);return r&&h&&(d={...d}),w.useMemo(()=>{u.forEach((f,g)=>u.set(g,!1))},[n]),V.useEffect(()=>{!n&&!u.size&&s&&s()},[n]),o==="popLayout"&&(t=b.jsx(Su,{isPresent:n,anchorX:a,root:l,children:t})),b.jsx(Ye.Provider,{value:d,children:t})};function Pu(){return new Map}function vo(t=!0){const e=w.useContext(Ye);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,r=w.useId();w.useEffect(()=>{if(t)return i(r)},[t]);const o=w.useCallback(()=>t&&s&&s(r),[r,s,t]);return!n&&s?[!1,o]:[!0]}const Me=t=>t.key||"";function hi(t){const e=[];return w.Children.forEach(t,n=>{w.isValidElement(n)&&e.push(n)}),e}const Mu=({children:t,custom:e,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:r="sync",propagate:o=!1,anchorX:a="left",root:l})=>{const[u,c]=vo(o),h=w.useMemo(()=>hi(t),[t]),d=o&&!u?[]:h.map(Me),f=w.useRef(!0),g=w.useRef(h),m=Zn(()=>new Map),[v,y]=w.useState(h),[x,p]=w.useState(h);Pr(()=>{f.current=!1,g.current=h;for(let P=0;P<x.length;P++){const _=Me(x[P]);d.includes(_)?m.delete(_):m.get(_)!==!0&&m.set(_,!1)}},[x,d.length,d.join("-")]);const C=[];if(h!==v){let P=[...h];for(let _=0;_<x.length;_++){const T=x[_],E=Me(T);d.includes(E)||(P.splice(_,0,T),C.push(T))}return r==="wait"&&C.length&&(P=C),p(hi(P)),y(h),null}process.env.NODE_ENV!=="production"&&r==="wait"&&x.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}=w.useContext(Xn);return b.jsx(b.Fragment,{children:x.map(P=>{const _=Me(P),T=o&&!u?!1:h===x||d.includes(_),E=()=>{if(m.has(_))m.set(_,!0);else return;let L=!0;m.forEach(Q=>{Q||(L=!1)}),L&&(S?.(),p(g.current),o&&c?.(),s&&s())};return b.jsx(Tu,{isPresent:T,initial:!f.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:r,root:l,onExitComplete:T?void 0:E,anchorX:a,children:P},_)})})},xo=w.createContext({strict:!1}),di={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"]},qt={};for(const t in di)qt[t]={isEnabled:e=>di[t].some(n=>!!e[n])};function Eu(t){for(const e in t)qt[e]={...qt[e],...t[e]}}const Au=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 $e(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Au.has(t)}let bo=t=>!$e(t);function Vu(t){typeof t=="function"&&(bo=e=>e.startsWith("on")?!$e(e):t(e))}try{Vu(require("@emotion/is-prop-valid").default)}catch{}function ku(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(bo(i)||n===!0&&$e(i)||!e&&!$e(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const Xe=w.createContext({});function Ze(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function pe(t){return typeof t=="string"||Array.isArray(t)}const ws=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Cs=["initial",...ws];function Je(t){return Ze(t.animate)||Cs.some(e=>pe(t[e]))}function wo(t){return!!(Je(t)||t.variants)}function Ru(t,e){if(Je(t)){const{initial:n,animate:s}=t;return{initial:n===!1||pe(n)?n:void 0,animate:pe(s)?s:void 0}}return t.inherit!==!1?e:{}}function Du(t){const{initial:e,animate:n}=Ru(t,w.useContext(Xe));return w.useMemo(()=>({initial:e,animate:n}),[fi(e),fi(n)])}function fi(t){return Array.isArray(t)?t.join(" "):t}const ge={};function ju(t){for(const e in t)ge[e]=t[e],os(e)&&(ge[e].isCSSVariable=!0)}function Co(t,{layout:e,layoutId:n}){return Qt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!ge[t]||t==="opacity")}const Lu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ou=Jt.length;function Iu(t,e,n){let s="",i=!0;for(let r=0;r<Ou;r++){const o=Jt[r],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=ho(a,ys[o]);if(!l){i=!1;const c=Lu[o]||o;s+=`${c}(${u}) `}n&&(e[o]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function _s(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const l in e){const u=e[l];if(Qt.has(l)){o=!0;continue}else if(os(l)){i[l]=u;continue}else{const c=ho(u,ys[l]);l.startsWith("origin")?(a=!0,r[l]=c):s[l]=c}}if(e.transform||(o||n?s.transform=Iu(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=r;s.transformOrigin=`${l} ${u} ${c}`}}const Ss=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function _o(t,e,n){for(const s in e)!Z(e[s])&&!Co(s,n)&&(t[s]=e[s])}function Bu({transformTemplate:t},e){return w.useMemo(()=>{const n=Ss();return _s(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Nu(t,e){const n=t.style||{},s={};return _o(s,n,t),Object.assign(s,Bu(t,e)),s}function Fu(t,e){const n={},s=Nu(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const zu={offset:"stroke-dashoffset",array:"stroke-dasharray"},$u={offset:"strokeDashoffset",array:"strokeDasharray"};function Wu(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?zu:$u;t[r.offset]=M.transform(-s);const o=M.transform(e),a=M.transform(n);t[r.array]=`${o} ${a}`}function So(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},l,u,c){if(_s(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;h.transform&&(d.transform=h.transform,delete h.transform),(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=c?.transformBox??"fill-box",delete h.transformBox),e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&Wu(h,i,r,o,!1)}const To=()=>({...Ss(),attrs:{}}),Po=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Uu(t,e,n,s){const i=w.useMemo(()=>{const r=To();return So(r,e,Po(s),t.transformTemplate,t.style),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};_o(r,t.style,t),i.style={...r,...i.style}}return i}const Ku=["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 Ts(t){return typeof t!="string"||t.includes("-")?!1:!!(Ku.indexOf(t)>-1||/[A-Z]/u.test(t))}function Hu(t,e,n,{latestValues:s},i,r=!1){const a=(Ts(t)?Uu:Fu)(e,s,i,t),l=ku(e,typeof t=="string",r),u=t!==w.Fragment?{...l,...a,ref:n}:{},{children:c}=e,h=w.useMemo(()=>Z(c)?c.get():c,[c]);return w.createElement(t,{...u,children:h})}function mi(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Ps(t,e,n,s){if(typeof e=="function"){const[i,r]=mi(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=mi(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function Le(t){return Z(t)?t.get():t}function Gu({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:qu(n,s,i,t),renderState:e()}}function qu(t,e,n,s){const i={},r=s(t,{});for(const d in r)i[d]=Le(r[d]);let{initial:o,animate:a}=t;const l=Je(t),u=wo(t);e&&u&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const h=c?a:o;if(h&&typeof h!="boolean"&&!Ze(h)){const d=Array.isArray(h)?h:[h];for(let f=0;f<d.length;f++){const g=Ps(t,d[f]);if(g){const{transitionEnd:m,transition:v,...y}=g;for(const x in y){let p=y[x];if(Array.isArray(p)){const C=c?p.length-1:0;p=p[C]}p!==null&&(i[x]=p)}for(const x in m)i[x]=m[x]}}}return i}const Mo=t=>(e,n)=>{const s=w.useContext(Xe),i=w.useContext(Ye),r=()=>Gu(t,e,s,i);return n?r():Zn(r)};function Ms(t,e,n){const{style:s}=t,i={};for(const r in s)(Z(s[r])||e.style&&Z(e.style[r])||Co(r,t)||n?.getValue(r)?.liveStyle!==void 0)&&(i[r]=s[r]);return i}const Yu=Mo({scrapeMotionValuesFromProps:Ms,createRenderState:Ss});function Eo(t,e,n){const s=Ms(t,e,n);for(const i in t)if(Z(t[i])||Z(e[i])){const r=Jt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}const Xu=Mo({scrapeMotionValuesFromProps:Eo,createRenderState:To}),Zu=Symbol.for("motionComponentSymbol");function Ft(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Ju(t,e,n){return w.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):Ft(n)&&(n.current=s))},[e])}const Es=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Qu="framerAppearId",Ao="data-"+Es(Qu),Vo=w.createContext({});function th(t,e,n,s,i){const{visualElement:r}=w.useContext(Xe),o=w.useContext(xo),a=w.useContext(Ye),l=w.useContext(bs).reducedMotion,u=w.useRef(null);s=s||o.renderer,!u.current&&s&&(u.current=s(t,{visualState:e,parent:r,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,h=w.useContext(Vo);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&eh(u.current,n,i,h);const d=w.useRef(!1);w.useInsertionEffect(()=>{c&&d.current&&c.update(n,a)});const f=n[Ao],g=w.useRef(!!f&&!window.MotionHandoffIsComplete?.(f)&&window.MotionHasOptimisedAnimation?.(f));return Pr(()=>{c&&(d.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),g.current&&c.animationState&&c.animationState.animateChanges())}),w.useEffect(()=>{c&&(!g.current&&c.animationState&&c.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(f)}),g.current=!1),c.enteringChildren=void 0)}),c}function eh(t,e,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:ko(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&Ft(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:u})}function ko(t){if(t)return t.options.allowProjection!==!1?t.projection:ko(t.parent)}function dn(t,{forwardMotionProps:e=!1}={},n,s){n&&Eu(n);const i=Ts(t)?Xu:Yu;function r(a,l){let u;const c={...w.useContext(bs),...a,layoutId:nh(a)},{isStatic:h}=c,d=Du(a),f=i(a,h);if(!h&&Jn){sh(c,n);const g=ih(c);u=g.MeasureLayout,d.visualElement=th(t,f,c,s,g.ProjectionNode)}return b.jsxs(Xe.Provider,{value:d,children:[u&&d.visualElement?b.jsx(u,{visualElement:d.visualElement,...c}):null,Hu(t,a,Ju(f,d.visualElement,l),f,h,e)]})}r.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const o=w.forwardRef(r);return o[Zu]=t,o}function nh({layoutId:t}){const e=w.useContext(Xn).id;return e&&t!==void 0?e+"-"+t:t}function sh(t,e){const n=w.useContext(xo).strict;if(process.env.NODE_ENV!=="production"&&e&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?Xt(!1,s,"lazy-strict-mode"):yt(!1,s,"lazy-strict-mode")}}function ih(t){const{drag:e,layout:n}=qt;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function rh(t,e){if(typeof Proxy>"u")return dn;const n=new Map,s=(r,o)=>dn(r,o,t,e),i=(r,o)=>(process.env.NODE_ENV!=="production"&&ss(!1,"motion() is deprecated. Use motion.create() instead."),s(r,o));return new Proxy(i,{get:(r,o)=>o==="create"?s:(n.has(o)||n.set(o,dn(o,void 0,t,e)),n.get(o))})}function Ro({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function oh({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function ah(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function fn(t){return t===void 0||t===1}function Bn({scale:t,scaleX:e,scaleY:n}){return!fn(t)||!fn(e)||!fn(n)}function Et(t){return Bn(t)||Do(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Do(t){return pi(t.x)||pi(t.y)}function pi(t){return t&&t!=="0%"}function We(t,e,n){const s=t-n,i=e*s;return n+i}function gi(t,e,n,s,i){return i!==void 0&&(t=We(t,i,s)),We(t,n,s)+e}function Nn(t,e=0,n=1,s,i){t.min=gi(t.min,e,n,s,i),t.max=gi(t.max,e,n,s,i)}function jo(t,{x:e,y:n}){Nn(t.x,e.translate,e.scale,e.originPoint),Nn(t.y,n.translate,n.scale,n.originPoint)}const yi=.999999999999,vi=1.0000000000001;function lh(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const{visualElement:l}=r.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&$t(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,jo(t,o)),s&&Et(r.latestValues)&&$t(t,r.latestValues))}e.x<vi&&e.x>yi&&(e.x=1),e.y<vi&&e.y>yi&&(e.y=1)}function zt(t,e){t.min=t.min+e,t.max=t.max+e}function xi(t,e,n,s,i=.5){const r=F(t.min,t.max,i);Nn(t,e,n,r,s)}function $t(t,e){xi(t.x,e.x,e.scaleX,e.scale,e.originX),xi(t.y,e.y,e.scaleY,e.scale,e.originY)}function Lo(t,e){return Ro(ah(t.getBoundingClientRect(),e))}function ch(t,e,n){const s=Lo(t,n),{scroll:i}=e;return i&&(zt(s.x,i.offset.x),zt(s.y,i.offset.y)),s}const bi=()=>({translate:0,scale:1,origin:0,originPoint:0}),Wt=()=>({x:bi(),y:bi()}),wi=()=>({min:0,max:0}),W=()=>({x:wi(),y:wi()}),Fn={current:null},Oo={current:!1};function uh(){if(Oo.current=!0,!!Jn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Fn.current=t.matches;t.addEventListener("change",e),e()}else Fn.current=!1}const hh=new WeakMap;function dh(t,e,n){for(const s in e){const i=e[s],r=n[s];if(Z(i))t.addValue(s,i);else if(Z(r))t.addValue(s,Gt(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,Gt(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const Ci=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class fh{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ps,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=tt.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,B.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=Je(n),this.isVariantNode=wo(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in h){const f=h[d];l[d]!==void 0&&Z(f)&&f.set(l[d])}}mount(e){this.current=e,hh.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),Oo.current||uh(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Fn.current,process.env.NODE_ENV!=="production"&&ss(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ct(this.notifyUpdate),Ct(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=Qt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&B.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r&&r(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in qt){const n=qt[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const r=this.features[e];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):W()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Ci.length;s++){const i=Ci[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=e[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=dh(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=Gt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Mr(s)||Ar(s))?s=parseFloat(s):!bu(s)&&_t.test(n)&&(s=uo(e,n)),this.setBaseTarget(e,Z(s)?s.get():s)),Z(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const r=Ps(this.props,n,this.presenceContext?.custom);r&&(s=r[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!Z(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new ns),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){vs.render(this.render)}}class Io extends fh{constructor(){super(...arguments),this.KeyframeResolver=lu}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Z(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Bo(t,{style:e,vars:n},s,i){const r=t.style;let o;for(o in e)r[o]=e[o];i?.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function mh(t){return window.getComputedStyle(t)}class ph extends Io{constructor(){super(...arguments),this.type="html",this.renderInstance=Bo}readValueFromInstance(e,n){if(Qt.has(n))return this.projection?.isProjecting?kn(n):Pc(e,n);{const s=mh(e),i=(os(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Lo(e,n)}build(e,n,s){_s(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Ms(e,n,s)}}const No=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"]);function gh(t,e,n,s){Bo(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(No.has(i)?i:Es(i),e.attrs[i])}class yh extends Io{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=W}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Qt.has(n)){const s=co(n);return s&&s.default||0}return n=No.has(n)?n:Es(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Eo(e,n,s)}build(e,n,s){So(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){gh(e,n,s,i)}mount(e){this.isSVGTag=Po(e.tagName),super.mount(e)}}const vh=(t,e)=>Ts(t)?new yh(e):new ph(e,{allowProjection:t!==w.Fragment});function Kt(t,e,n){const s=t.getProps();return Ps(s,e,n!==void 0?n:s.custom,t)}const zn=t=>Array.isArray(t);function xh(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Gt(n))}function bh(t){return zn(t)?t[t.length-1]||0:t}function wh(t,e){const n=Kt(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=bh(r[o]);xh(t,o,a)}}function Ch(t){return!!(Z(t)&&t.add)}function $n(t,e){const n=t.getValue("willChange");if(Ch(n))return n.add(e);if(!n&&vt.WillChange){const s=new vt.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function Fo(t){return t.props[Ao]}const _h=t=>t!==null;function Sh(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(_h),r=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[r]}const Th={type:"spring",stiffness:500,damping:25,restSpeed:10},Ph=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Mh={type:"keyframes",duration:.8},Eh={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ah=(t,{keyframes:e})=>e.length>2?Mh:Qt.has(t)?t.startsWith("scale")?Ph(e[1]):Th:Eh;function Vh({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const As=(t,e,n,s={},i,r)=>o=>{const a=gs(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-ht(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:d=>{e.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};Vh(a)||Object.assign(c,Ah(t,c)),c.duration&&(c.duration=ht(c.duration)),c.repeatDelay&&(c.repeatDelay=ht(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(On(c),c.delay===0&&(h=!0)),(vt.instantAnimations||vt.skipAnimations)&&(h=!0,On(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const d=Sh(c.keyframes,a);if(d!==void 0){B.update(()=>{c.onUpdate(d),c.onComplete()});return}}return a.isSync?new ms(c):new Yc(c)};function kh({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function zo(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r=t.getDefaultTransition(),transitionEnd:o,...a}=e;s&&(r=s);const l=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const c in a){const h=t.getValue(c,t.latestValues[c]??null),d=a[c];if(d===void 0||u&&kh(u,c))continue;const f={delay:n,...gs(r||{},c)},g=h.get();if(g!==void 0&&!h.isAnimating&&!Array.isArray(d)&&d===g&&!f.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){const y=Fo(t);if(y){const x=window.MotionHandoffAnimation(y,c,B);x!==null&&(f.startTime=x,m=!0)}}$n(t,c),h.start(As(c,h,d,t.shouldReduceMotion&&oo.has(c)?{type:!1}:f,t,m));const v=h.animation;v&&l.push(v)}return o&&Promise.all(l).then(()=>{B.update(()=>{o&&wh(t,o)})}),l}function $o(t,e,n,s=0,i=1){const r=Array.from(t).sort((u,c)=>u.sortNodePosition(c)).indexOf(e),o=t.size,a=(o-1)*s;return typeof n=="function"?n(r,o):i===1?r*s:a-r*s}function Wn(t,e,n={}){const s=Kt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(zo(t,s,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:h}=i;return Rh(t,e,l,u,c,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[r,o]:[o,r];return l().then(()=>u())}else return Promise.all([r(),o(n.delay)])}function Rh(t,e,n=0,s=0,i=0,r=1,o){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(Wn(l,e,{...o,delay:n+(typeof s=="function"?0:s)+$o(t.variantChildren,l,s,i,r)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function Dh(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>Wn(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=Wn(t,e,n);else{const i=typeof e=="function"?Kt(t,e,n.custom):e;s=Promise.all(zo(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}function Wo(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const jh=Cs.length;function Uo(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Uo(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<jh;n++){const s=Cs[n],i=t.props[s];(pe(i)||i===!1)&&(e[s]=i)}return e}const Lh=[...ws].reverse(),Oh=ws.length;function Ih(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Dh(t,n,s)))}function Bh(t){let e=Ih(t),n=_i(),s=!0;const i=l=>(u,c)=>{const h=Kt(t,c,l==="exit"?t.presenceContext?.custom:void 0);if(h){const{transition:d,transitionEnd:f,...g}=h;u={...u,...g,...f}}return u};function r(l){e=l(t)}function o(l){const{props:u}=t,c=Uo(t.parent)||{},h=[],d=new Set;let f={},g=1/0;for(let v=0;v<Oh;v++){const y=Lh[v],x=n[y],p=u[y]!==void 0?u[y]:c[y],C=pe(p),S=y===l?x.isActive:null;S===!1&&(g=v);let P=p===c[y]&&p!==u[y]&&C;if(P&&s&&t.manuallyAnimateOnMount&&(P=!1),x.protectedKeys={...f},!x.isActive&&S===null||!p&&!x.prevProp||Ze(p)||typeof p=="boolean")continue;const _=Nh(x.prevProp,p);let T=_||y===l&&x.isActive&&!P&&C||v>g&&C,E=!1;const L=Array.isArray(p)?p:[p];let Q=L.reduce(i(y),{});S===!1&&(Q={});const{prevResolvedValues:pt={}}=x,Tt={...pt,...Q},xt=z=>{T=!0,d.has(z)&&(E=!0,d.delete(z)),x.needsAnimating[z]=!0;const k=t.getValue(z);k&&(k.liveStyle=!1)};for(const z in Tt){const k=Q[z],j=pt[z];if(f.hasOwnProperty(z))continue;let $=!1;zn(k)&&zn(j)?$=!Wo(k,j):$=k!==j,$?k!=null?xt(z):d.add(z):k!==void 0&&d.has(z)?xt(z):x.protectedKeys[z]=!0}x.prevProp=p,x.prevResolvedValues=Q,x.isActive&&(f={...f,...Q}),s&&t.blockInitialAnimation&&(T=!1);const jt=P&&_;T&&(!jt||E)&&h.push(...L.map(z=>{const k={type:y};if(typeof z=="string"&&s&&!jt&&t.manuallyAnimateOnMount&&t.parent){const{parent:j}=t,$=Kt(j,z);if(j.enteringChildren&&$){const{delayChildren:Ot}=$.transition||{};k.delay=$o(j.enteringChildren,t,Ot)}}return{animation:z,options:k}}))}if(d.size){const v={};if(typeof u.initial!="boolean"){const y=Kt(t,Array.isArray(u.initial)?u.initial[0]:u.initial);y&&y.transition&&(v.transition=y.transition)}d.forEach(y=>{const x=t.getBaseTarget(y),p=t.getValue(y);p&&(p.liveStyle=!0),v[y]=x??null}),h.push({animation:v})}let m=!!h.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(m=!1),s=!1,m?e(h):Promise.resolve()}function a(l,u){if(n[l].isActive===u)return Promise.resolve();t.variantChildren?.forEach(h=>h.animationState?.setActive(l,u)),n[l].isActive=u;const c=o(l);for(const h in n)n[h].protectedKeys={};return c}return{animateChanges:o,setActive:a,setAnimateFunction:r,getState:()=>n,reset:()=>{n=_i(),s=!0}}}function Nh(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Wo(e,t):!1}function Pt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function _i(){return{animate:Pt(!0),whileInView:Pt(),whileHover:Pt(),whileTap:Pt(),whileDrag:Pt(),whileFocus:Pt(),exit:Pt()}}class St{constructor(e){this.isMounted=!1,this.node=e}update(){}}class Fh extends St{constructor(e){super(e),e.animationState||(e.animationState=Bh(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Ze(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let zh=0;class $h extends St{constructor(){super(...arguments),this.id=zh++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const Wh={animation:{Feature:Fh},exit:{Feature:$h}};function ye(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function _e(t){return{point:{x:t.pageX,y:t.pageY}}}const Uh=t=>e=>xs(e)&&t(e,_e(e));function oe(t,e,n,s){return ye(t,e,Uh(n),s)}const Ko=1e-4,Kh=1-Ko,Hh=1+Ko,Ho=.01,Gh=0-Ho,qh=0+Ho;function J(t){return t.max-t.min}function Yh(t,e,n){return Math.abs(t-e)<=n}function Si(t,e,n,s=.5){t.origin=s,t.originPoint=F(e.min,e.max,t.origin),t.scale=J(n)/J(e),t.translate=F(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Kh&&t.scale<=Hh||isNaN(t.scale))&&(t.scale=1),(t.translate>=Gh&&t.translate<=qh||isNaN(t.translate))&&(t.translate=0)}function ae(t,e,n,s){Si(t.x,e.x,n.x,s?s.originX:void 0),Si(t.y,e.y,n.y,s?s.originY:void 0)}function Ti(t,e,n){t.min=n.min+e.min,t.max=t.min+J(e)}function Xh(t,e,n){Ti(t.x,e.x,n.x),Ti(t.y,e.y,n.y)}function Pi(t,e,n){t.min=e.min-n.min,t.max=t.min+J(e)}function le(t,e,n){Pi(t.x,e.x,n.x),Pi(t.y,e.y,n.y)}function rt(t){return[t("x"),t("y")]}const Go=({current:t})=>t?t.ownerDocument.defaultView:null,Mi=(t,e)=>Math.abs(t-e);function Zh(t,e){const n=Mi(t.x,e.x),s=Mi(t.y,e.y);return Math.sqrt(n**2+s**2)}class qo{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=pn(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,g=Zh(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!f&&!g)return;const{point:m}=d,{timestamp:v}=G;this.history.push({...m,timestamp:v});const{onStart:y,onMove:x}=this.handlers;f||(y&&y(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=mn(f,this.transformPagePoint),B.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:g,onSessionEnd:m,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=pn(d.type==="pointercancel"?this.lastMoveEventInfo:mn(f,this.transformPagePoint),this.history);this.startEvent&&g&&g(d,y),m&&m(d,y)},!xs(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=o,this.contextWindow=i||window;const a=_e(e),l=mn(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=G;this.history=[{...u,timestamp:c}];const{onSessionStart:h}=n;h&&h(e,pn(l,this.history)),this.removeListeners=be(oe(this.contextWindow,"pointermove",this.handlePointerMove),oe(this.contextWindow,"pointerup",this.handlePointerUp),oe(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Ct(this.updatePoint)}}function mn(t,e){return e?{point:e(t.point)}:t}function Ei(t,e){return{x:t.x-e.x,y:t.y-e.y}}function pn({point:t},e){return{point:t,delta:Ei(t,Yo(e)),offset:Ei(t,Jh(e)),velocity:Qh(e,.1)}}function Jh(t){return t[0]}function Yo(t){return t[t.length-1]}function Qh(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Yo(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>ht(e)));)n--;if(!s)return{x:0,y:0};const r=ot(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function td(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?F(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?F(n,t,s.max):Math.min(t,n)),t}function Ai(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function ed(t,{top:e,left:n,bottom:s,right:i}){return{x:Ai(t.x,n,i),y:Ai(t.y,e,s)}}function Vi(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function nd(t,e){return{x:Vi(t.x,e.x),y:Vi(t.y,e.y)}}function sd(t,e){let n=.5;const s=J(t),i=J(e);return i>s?n=de(e.min,e.max-s,t.min):s>i&&(n=de(t.min,t.max-i,e.min)),gt(0,1,n)}function id(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Un=.35;function rd(t=Un){return t===!1?t=0:t===!0&&(t=Un),{x:ki(t,"left","right"),y:ki(t,"top","bottom")}}function ki(t,e,n){return{min:Ri(t,e),max:Ri(t,n)}}function Ri(t,e){return typeof t=="number"?t:t[e]||0}const od=new WeakMap;class ad{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=W(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=h=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(_e(h).point)},o=(h,d)=>{const{drag:f,dragPropagation:g,onDragStart:m}=this.getProps();if(f&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=du(f),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=d,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),rt(y=>{let x=this.getAxisMotionValue(y).get()||0;if(mt.test(x)){const{projection:p}=this.visualElement;if(p&&p.layout){const C=p.layout.layoutBox[y];C&&(x=J(C)*(parseFloat(x)/100))}}this.originPoint[y]=x}),m&&B.postRender(()=>m(h,d)),$n(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},a=(h,d)=>{this.latestPointerEvent=h,this.latestPanInfo=d;const{dragPropagation:f,dragDirectionLock:g,onDirectionLock:m,onDrag:v}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:y}=d;if(g&&this.currentDirection===null){this.currentDirection=ld(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,y),this.updateAxis("y",d.point,y),this.visualElement.render(),v&&v(h,d)},l=(h,d)=>{this.latestPointerEvent=h,this.latestPanInfo=d,this.stop(h,d),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>rt(h=>this.getAnimationState(h)==="paused"&&this.getAxisMotionValue(h).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new qo(e,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:Go(this.visualElement)})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!i||!s)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&B.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Ee(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=td(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&Ft(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=ed(s.layoutBox,e):this.constraints=!1,this.elastic=rd(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&rt(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=id(s.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Ft(e))return!1;const s=e.current;yt(s!==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:i}=this.visualElement;if(!i||!i.layout)return!1;const r=ch(s,i.root,this.visualElement.getTransformPagePoint());let o=nd(i.layout.layoutBox,r);if(n){const a=n(oh(o));this.hasMutatedConstraints=!!a,a&&(o=Ro(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=rt(c=>{if(!Ee(c,n,this.currentDirection))return;let h=l&&l[c]||{};o&&(h={min:0,max:0});const d=i?200:1e6,f=i?40:1e7,g={type:"inertia",velocity:s?e[c]:0,bounceStiffness:d,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(c,g)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return $n(this.visualElement,e),s.start(As(e,s,0,n,this.visualElement,!1))}stopAnimation(){rt(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){rt(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){rt(n=>{const{drag:s}=this.getProps();if(!Ee(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];r.set(e[n]-F(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Ft(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};rt(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=sd({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),rt(o=>{if(!Ee(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(F(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;od.set(this.visualElement,this);const e=this.visualElement.current,n=oe(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();Ft(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,r=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),B.read(s);const o=ye(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.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 e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=Un,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function Ee(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function ld(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class cd extends St{constructor(e){super(e),this.removeGroupControls=at,this.removeListeners=at,this.controls=new ad(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||at}unmount(){this.removeGroupControls(),this.removeListeners()}}const Di=t=>(e,n)=>{t&&B.postRender(()=>t(e,n))};class ud extends St{constructor(){super(...arguments),this.removePointerDownListener=at}onPointerDown(e){this.session=new qo(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Go(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Di(e),onStart:Di(n),onMove:s,onEnd:(r,o)=>{delete this.session,i&&B.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=oe(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Oe={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ji(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const ne={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(M.test(t))t=parseFloat(t);else return t;const n=ji(t,e.target.x),s=ji(t,e.target.y);return`${n}% ${s}%`}},hd={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=_t.parse(t);if(i.length>5)return s;const r=_t.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const u=F(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),r(i)}};let gn=!1;class dd extends w.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;ju(fd),r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),gn&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),Oe.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,{projection:o}=s;return o&&(o.isPresent=r,gn=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==r?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||B.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),vs.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;gn=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Xo(t){const[e,n]=vo(),s=w.useContext(Xn);return b.jsx(dd,{...t,layoutGroup:s,switchLayoutGroup:w.useContext(Vo),isPresent:e,safeToRemove:n})}const fd={borderRadius:{...ne,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ne,borderTopRightRadius:ne,borderBottomLeftRadius:ne,borderBottomRightRadius:ne,boxShadow:hd};function md(t,e,n){const s=Z(t)?t:Gt(t);return s.start(As("",s,e,n)),s.animation}const pd=(t,e)=>t.depth-e.depth;class gd{constructor(){this.children=[],this.isDirty=!1}add(e){Qn(this.children,e),this.isDirty=!0}remove(e){ts(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(pd),this.isDirty=!1,this.children.forEach(e)}}function yd(t,e){const n=tt.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(Ct(s),t(r-e))};return B.setup(s,!0),()=>Ct(s)}const Zo=["TopLeft","TopRight","BottomLeft","BottomRight"],vd=Zo.length,Li=t=>typeof t=="string"?parseFloat(t):t,Oi=t=>typeof t=="number"||M.test(t);function xd(t,e,n,s,i,r){i?(t.opacity=F(0,n.opacity??1,bd(s)),t.opacityExit=F(e.opacity??1,0,wd(s))):r&&(t.opacity=F(e.opacity??1,n.opacity??1,s));for(let o=0;o<vd;o++){const a=`border${Zo[o]}Radius`;let l=Ii(e,a),u=Ii(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Oi(l)===Oi(u)?(t[a]=Math.max(F(Li(l),Li(u),s),0),(mt.test(u)||mt.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=F(e.rotate||0,n.rotate||0,s))}function Ii(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const bd=Jo(0,.5,Ir),wd=Jo(.5,.95,at);function Jo(t,e,n){return s=>s<t?0:s>e?1:n(de(t,e,s))}function Bi(t,e){t.min=e.min,t.max=e.max}function st(t,e){Bi(t.x,e.x),Bi(t.y,e.y)}function Ni(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Fi(t,e,n,s,i){return t-=e,t=We(t,1/n,s),i!==void 0&&(t=We(t,1/i,s)),t}function Cd(t,e=0,n=1,s=.5,i,r=t,o=t){if(mt.test(e)&&(e=parseFloat(e),e=F(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=F(r.min,r.max,s);t===r&&(a-=e),t.min=Fi(t.min,e,n,a,i),t.max=Fi(t.max,e,n,a,i)}function zi(t,e,[n,s,i],r,o){Cd(t,e[n],e[s],e[i],e.scale,r,o)}const _d=["x","scaleX","originX"],Sd=["y","scaleY","originY"];function $i(t,e,n,s){zi(t.x,e,_d,n?n.x:void 0,s?s.x:void 0),zi(t.y,e,Sd,n?n.y:void 0,s?s.y:void 0)}function Wi(t){return t.translate===0&&t.scale===1}function Qo(t){return Wi(t.x)&&Wi(t.y)}function Ui(t,e){return t.min===e.min&&t.max===e.max}function Td(t,e){return Ui(t.x,e.x)&&Ui(t.y,e.y)}function Ki(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function ta(t,e){return Ki(t.x,e.x)&&Ki(t.y,e.y)}function Hi(t){return J(t.x)/J(t.y)}function Gi(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Pd{constructor(){this.members=[]}add(e){Qn(this.members,e),e.scheduleRender()}remove(e){if(ts(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const r=this.members[i];if(r.isPresent!==!1){s=r;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Md(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=n?.z||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:h,rotateY:d,skewX:f,skewY:g}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),h&&(s+=`rotateX(${h}deg) `),d&&(s+=`rotateY(${d}deg) `),f&&(s+=`skewX(${f}deg) `),g&&(s+=`skewY(${g}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const yn=["","X","Y","Z"],Ed=1e3;let Ad=0;function vn(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function ea(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Fo(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",B,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&ea(s)}function na({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e?.()){this.id=Ad++,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.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(Rd),this.nodes.forEach(Od),this.nodes.forEach(Id),this.nodes.forEach(Dd)},this.resolvedRelativeTargetAt=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 gd)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new ns),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=yo(o)&&!vu(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),t){let c,h=0;const d=()=>this.root.updateBlockedByResize=!1;B.read(()=>{h=window.innerWidth}),t(o,()=>{const f=window.innerWidth;f!==h&&(h=f,this.root.updateBlockedByResize=!0,c&&c(),c=yd(d,250),Oe.hasAnimatedSinceResize&&(Oe.hasAnimatedSinceResize=!1,this.nodes.forEach(Xi)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:d,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||$d,{onLayoutAnimationStart:m,onLayoutAnimationComplete:v}=u.getProps(),y=!this.targetLayout||!ta(this.targetLayout,f),x=!h&&d;if(this.options.layoutRoot||this.resumeFrom||x||h&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const p={...gs(g,"layout"),onPlay:m,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(p.delay=0,p.type=!1),this.startAnimation(p),this.setAnimationOrigin(c,x)}else h||Xi(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}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(),Ct(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(Bd),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&&ea(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(qi);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Yi);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ld),this.nodes.forEach(Vd),this.nodes.forEach(kd)):this.nodes.forEach(Yi),this.clearAllSnapshots();const a=tt.now();G.delta=gt(0,1e3/60,a-G.timestamp),G.timestamp=a,G.isProcessing=!0,on.update.process(G),on.preRender.process(G),on.render.process(G),G.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,vs.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(jd),this.sharedNodes.forEach(Nd)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,B.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){B.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!J(this.snapshot.measuredBox.x)&&!J(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.layoutCorrected=W(),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=s(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(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Qo(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||Et(this.latestValues)||c)&&(i(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)),Wd(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return W();const a=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Ud))){const{scroll:u}=this.root;u&&(zt(a.x,u.offset.x),zt(a.y,u.offset.y))}return a}removeElementScroll(o){const a=W();if(st(a,o),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:h}=u;u!==this.root&&c&&h.layoutScroll&&(c.wasRoot&&st(a,o),zt(a.x,c.offset.x),zt(a.y,c.offset.y))}return a}applyTransform(o,a=!1){const l=W();st(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&&$t(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Et(c.latestValues)&&$t(l,c.latestValues)}return Et(this.latestValues)&&$t(l,this.latestValues),l}removeTransform(o){const a=W();st(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Et(u.latestValues))continue;Bn(u.latestValues)&&u.updateSnapshot();const c=W(),h=u.measurePageBox();st(c,h),$i(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Et(this.latestValues)&&$i(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!==G.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){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||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!(!this.layout||!(c||h))){if(this.resolvedRelativeTargetAt=G.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=W(),this.relativeTargetOrigin=W(),le(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),st(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=W(),this.targetWithTransforms=W()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Xh(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):st(this.target,this.layout.layoutBox),jo(this.target,this.targetDelta)):st(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=W(),this.relativeTargetOrigin=W(),le(this.relativeTargetOrigin,this.target,d.target),st(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Bn(this.parent.latestValues)||Do(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===G.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;st(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,d=this.treeScale.y;lh(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=W());const{target:f}=o;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ni(this.prevProjectionDelta.x,this.projectionDelta.x),Ni(this.prevProjectionDelta.y,this.projectionDelta.y)),ae(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==d||!Gi(this.projectionDelta.x,this.prevProjectionDelta.x)||!Gi(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Wt(),this.projectionDelta=Wt(),this.projectionDeltaWithTransform=Wt()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=Wt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=W(),f=l?l.source:void 0,g=this.layout?this.layout.source:void 0,m=f!==g,v=this.getStack(),y=!v||v.members.length<=1,x=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some(zd));this.animationProgress=0;let p;this.mixTargetDelta=C=>{const S=C/1e3;Zi(h.x,o.x,S),Zi(h.y,o.y,S),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(le(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Fd(this.relativeTarget,this.relativeTargetOrigin,d,S),p&&Td(this.relativeTarget,p)&&(this.isProjectionDirty=!1),p||(p=W()),st(p,this.relativeTarget)),m&&(this.animationValues=c,xd(c,u,this.latestValues,S,x,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ct(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=B.update(()=>{Oe.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Gt(0)),this.currentAnimation=md(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},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(Ed),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&&sa(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||W();const h=J(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const d=J(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}st(a,l),$t(a,c),ae(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Pd),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(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.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&&vn("z",o,u,this.animationValues);for(let c=0;c<yn.length;c++)vn(`rotate${yn[c]}`,o,u,this.animationValues),vn(`skew${yn[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=Le(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=Le(a?.pointerEvents)||""),this.hasProjected&&!Et(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=Md(this.projectionDeltaWithTransform,this.treeScale,c);l&&(h=l(c,h)),o.transform=h;const{x:d,y:f}=this.projectionDelta;o.transformOrigin=`${d.origin*100}% ${f.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 g in ge){if(c[g]===void 0)continue;const{correct:m,applyTo:v,isCSSVariable:y}=ge[g],x=h==="none"?c[g]:m(c[g],u);if(v){const p=v.length;for(let C=0;C<p;C++)o[v[C]]=x}else y?this.options.visualElement.renderState.vars[g]=x:o[g]=x}this.options.layoutId&&(o.pointerEvents=u===this?Le(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(qi),this.root.sharedNodes.clear()}}}function Vd(t){t.updateLayout()}function kd(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,r=e.source!==t.layout.source;i==="size"?rt(c=>{const h=r?e.measuredBox[c]:e.layoutBox[c],d=J(h);h.min=n[c].min,h.max=h.min+d}):sa(i,e.layoutBox,n)&&rt(c=>{const h=r?e.measuredBox[c]:e.layoutBox[c],d=J(n[c]);h.max=h.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[c].max=t.relativeTarget[c].min+d)});const o=Wt();ae(o,n,e.layoutBox);const a=Wt();r?ae(a,t.applyTransform(s,!0),e.measuredBox):ae(a,n,e.layoutBox);const l=!Qo(o);let u=!1;if(!t.resumeFrom){const c=t.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:h,layout:d}=c;if(h&&d){const f=W();le(f,e.layoutBox,h.layoutBox);const g=W();le(g,n,d.layoutBox),ta(f,g)||(u=!0),c.options.layoutRoot&&(t.relativeTarget=g,t.relativeTargetOrigin=f,t.relativeParent=c)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Rd(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Dd(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function jd(t){t.clearSnapshot()}function qi(t){t.clearMeasurements()}function Yi(t){t.isLayoutDirty=!1}function Ld(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Xi(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Od(t){t.resolveTargetDelta()}function Id(t){t.calcProjection()}function Bd(t){t.resetSkewAndRotation()}function Nd(t){t.removeLeadSnapshot()}function Zi(t,e,n){t.translate=F(e.translate,0,n),t.scale=F(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ji(t,e,n,s){t.min=F(e.min,n.min,s),t.max=F(e.max,n.max,s)}function Fd(t,e,n,s){Ji(t.x,e.x,n.x,s),Ji(t.y,e.y,n.y,s)}function zd(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const $d={duration:.45,ease:[.4,0,.1,1]},Qi=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),tr=Qi("applewebkit/")&&!Qi("chrome/")?Math.round:at;function er(t){t.min=tr(t.min),t.max=tr(t.max)}function Wd(t){er(t.x),er(t.y)}function sa(t,e,n){return t==="position"||t==="preserve-aspect"&&!Yh(Hi(e),Hi(n),.2)}function Ud(t){return t!==t.root&&t.scroll?.wasRoot}const Kd=na({attachResizeListener:(t,e)=>ye(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),xn={current:void 0},ia=na({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!xn.current){const t=new Kd({});t.mount(window),t.setOptions({layoutScroll:!0}),xn.current=t}return xn.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Hd={pan:{Feature:ud},drag:{Feature:cd,ProjectionNode:ia,MeasureLayout:Xo}};function nr(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,r=s[i];r&&B.postRender(()=>r(e,_e(e)))}class Gd extends St{mount(){const{current:e}=this.node;e&&(this.unmount=fu(e,(n,s)=>(nr(this.node,s,"Start"),i=>nr(this.node,i,"End"))))}unmount(){}}class qd extends St{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!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=be(ye(this.node.current,"focus",()=>this.onFocus()),ye(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function sr(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),r=s[i];r&&B.postRender(()=>r(e,_e(e)))}class Yd extends St{mount(){const{current:e}=this.node;e&&(this.unmount=yu(e,(n,s)=>(sr(this.node,s,"Start"),(i,{success:r})=>sr(this.node,i,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Kn=new WeakMap,bn=new WeakMap,Xd=t=>{const e=Kn.get(t.target);e&&e(t)},Zd=t=>{t.forEach(Xd)};function Jd({root:t,...e}){const n=t||document;bn.has(n)||bn.set(n,{});const s=bn.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Zd,{root:t,...e})),s[i]}function Qd(t,e,n){const s=Jd(e);return Kn.set(t,n),s.observe(t),()=>{Kn.delete(t),s.unobserve(t)}}const tf={some:0,all:1};class ef extends St{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r}=e,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:tf[i]},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(),d=u?c:h;d&&d(l)};return Qd(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(nf(e,n))&&this.startObserver()}unmount(){}}function nf({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const sf={inView:{Feature:ef},tap:{Feature:Yd},focus:{Feature:qd},hover:{Feature:Gd}},rf={layout:{ProjectionNode:ia,MeasureLayout:Xo}},of={...Wh,...sf,...Hd,...rf},Vs=rh(of,vh),af=t=>{let e;t.center?e="center":t.left?e="left":t.right&&(e="right");let n;return t.uppercase?n="uppercase":t.lowercase?n="lowercase":t.capitalize&&(n="capitalize"),X({marginTop:t.mt,marginBottom:t.mb,marginRight:t.mr,marginLeft:t.ml,flex:t.flex,cursor:t.cursor,wordBreak:t.wordBreak,whiteSpace:t.whiteSpace,textOverflow:t.textOverflow,textDecoration:t.decoration,textAlign:e,textTransform:n,color:t.color,opacity:t.disabled?.5:void 0,overflow:t.overflow})},lf="_primary_13825_8",cf="_secondary_13825_12",uf="_tertiary_13825_16",hf="_positive_13825_20",df="_negative_13825_24",ff="_warning_13825_28",mf="_accent_13825_32",pf="_inverse_13825_36",gf="_text_13825_111",yf="_regular_13825_117",vf="_medium_13825_121",xf="_semibold_13825_125",bf="_bold_13825_129",Ae={primary:lf,secondary:cf,tertiary:uf,positive:hf,negative:df,warning:ff,accent:mf,inverse:pf,"title-1":"_title-1_13825_41","title-2":"_title-2_13825_51","title-3":"_title-3_13825_61","headline-1":"_headline-1_13825_76","headline-2":"_headline-2_13825_81","headline-3":"_headline-3_13825_86","body-1":"_body-1_13825_91","body-2":"_body-2_13825_96","caption-1":"_caption-1_13825_101","caption-2":"_caption-2_13825_106",text:gf,regular:yf,medium:vf,semibold:xf,bold:bf},O=w.forwardRef((t,e)=>{const{children:n,className:s,variant:i="body-1",fontWeight:r="medium",tag:o="p",colorName:a="primary",style:l,clickOpacity:u=.5,opacityDuration:c=200,onClick:h,disabled:d,...f}=t,[g,m]=w.useState(!1),v=!!h,y=()=>v&&m(!0),x=()=>v&&m(!1),p=o,C=v?X({opacity:g?u:1,transition:`opacity ${c}ms ease`}):"";return b.jsx(p,{ref:e,...f,className:I(Ae.text,Ae[i],Ae[a],Ae[r],C,s,af(t)),style:l,onClick:h,onMouseDown:y,onMouseUp:x,onMouseLeave:x,onTouchStart:y,onTouchEnd:x,role:v?"button":void 0,tabIndex:v?0:void 0,children:n})});O.displayName="Text";const ra=Vs(O),wf="_loader_1qleq_8",Cf={loader:wf},_f=({color:t="var(--text-accent)"})=>b.jsx("span",{className:I(Cf.loader,X({"--loader-color":t}))}),Sf=X({display:"flex",alignItems:"center",justifyContent:"center",position:"relative",borderRadius:16,height:48,padding:"0 16px",cursor:"pointer",fontSize:16,fontWeight:600,overflow:"hidden",transition:"all 0.2s ease",gap:8}),se={zero:"var(--corner-zero)",xs:"var(--corner-xs)",sm:"var(--corner-sm)",md:"var(--corner-md)",lg:"var(--corner-lg)",xl:"var(--corner-xl)","2xl":"var(--corner-2xl)","3xl":"var(--corner-3xl)","4xl":"var(--corner-4xl)","5xl":"var(--corner-5xl)","6xl":"var(--corner-6xl)","full-round":"var(--corner-full-round)"},Tf={xs:"var(--height-button-xs)",sm:"var(--height-button-sm)",md:"var(--height-button-md)",lg:"var(--height-button-lg)"},Pf={clear:X({backgroundColor:"transparent",border:"none"}),filled:X({backgroundColor:"var(--fill-accent-primary)",color:"white",border:"none"}),outline:X({backgroundColor:"transparent",border:"1px solid var(--border-accent-primary)"})},Mf=(t,e,n,s)=>{if(s)return X({cursor:"not-allowed",opacity:.7});const i={transition:"all 0.2s ease",borderRadius:"var(--corner-lg)",border:"none",color:t==="filled"?"var(--text-inverse)":`var(--text-${e})`};switch(t){case"filled":return X({...i,backgroundColor:`var(--fill-${e}-${n})`,":hover":{backgroundColor:`var(--fill-${e}-${n}-hover)`},":active":{backgroundColor:`var(--fill-${e}-${n}-hover)`}});case"outline":return X({...i,backgroundColor:"transparent",border:`1px solid var(--border-${e}-${n})`,":hover":{backgroundColor:`var(--fill-${e}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${e}-secondary-hover)`}});case"clear":return X({...i,backgroundColor:"transparent",":hover":{backgroundColor:`var(--fill-${e}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${e}-secondary-hover)`}});default:return X(i)}},Ef=({disabled:t,loading:e,onClick:n,wrapperClassName:s,buttonClassName:i,buttonDisabledClassName:r,textClassName:o,children:a,variant:l="filled",backgroundColor:u,textColor:c,textFontWeight:h,borderColor:d,color:f="accent",borderRadius:g,width:m="full",size:v="md",iconLeft:y,iconRight:x,intensity:p="primary",...C})=>{const S=w.useMemo(()=>{switch(m){case"full":return"100%";case"auto":return"auto";default:return m}},[m]),P=w.useMemo(()=>u||(l==="filled"?f==="neutral"?"var(--fill-neutral-secondary)":`var(--fill-${f}-${p})`:"transparent"),[l,t,u,f,p]),_=w.useMemo(()=>{if(p==="primary"){if(f==="neutral")return"var(--text-secondary)";if(l==="filled")return"var(--text-inverse)"}else if(f==="neutral")return"var(--text-secondary)";return`var(--text-${f})`},[p,f,l]),T=w.useMemo(()=>{if(p==="primary"){if(f==="neutral")return"secondary";if(l==="filled")return"inverse"}else if(f==="neutral")return"secondary";return f},[l,t,c,f,p]),E=w.useMemo(()=>d||(l==="outline"?`var(--border-${f}-${p})`:"transparent"),[l,d,f,p]),L=w.useMemo(()=>{switch(v){case"lg":return se.lg;case"md":case"sm":return se.md;case"xs":return se.sm;default:return se.md}},[v]),Q=I(Sf,Mf(l,f,p,t),Pf[l],i,t?r:void 0,X({borderRadius:g?se[g]:L,backgroundColor:P,borderColor:E,color:c,width:"100%",height:Tf[v],opacity:t?.7:1})),pt=w.useMemo(()=>{switch(v){case"lg":case"md":return"body-1";case"sm":case"xs":return"body-2";default:return"body-1"}},[v]);return b.jsx(A,{className:I(s),w:S,relative:!0,overflow:"hidden",children:b.jsxs(Vs.button,{whileTap:!t&&!e?{scale:.99,boxShadow:"inset 0 0 0 10000px rgba(0,0,0,0.1)",transition:{duration:0}}:{},className:Q,disabled:t||e,onClick:n,...C,children:[e?b.jsx(_f,{color:_}):b.jsxs(b.Fragment,{children:[y,b.jsx(ra,{style:{color:c},colorName:T,variant:pt,className:o,textOverflow:"ellipsis",overflow:"hidden",children:a}),x]}),b.jsx(xe,{})]})})},Af=t=>V.createElement("svg",{viewBox:"0 0 24 24",fill:"none",...t},V.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z",fill:"currentColor"})),Vf=t=>V.createElement("svg",{viewBox:"0 0 24 24",fill:"none",...t},V.createElement("path",{d:"M19 13H5v-2h14v2z",fill:"currentColor"})),kf="_checkbox_1hy9q_8",Rf="_disabled_1hy9q_15",Df="_checkbox__input_1hy9q_27",jf="_checkbox__box_1hy9q_35",Mt={checkbox:kf,disabled:Rf,checkbox__input:Df,checkbox__box:jf,"checkbox__box--checked":"_checkbox__box--checked_1hy9q_51"},Lf={sm:20,md:24},ks=w.forwardRef(({checked:t,onChange:e,disabled:n,indeterminate:s,size:i="md",title:r,titleColor:o,subtitle:a,subtitleColor:l="secondary",name:u,value:c,required:h},d)=>{const[f,g]=w.useState(!1),m=t!==void 0,v=m?t:f,y=C=>{m||g(C.target.checked),e?.(C)},x=Lf[i],p=v||s;return b.jsxs("label",{className:I(Mt.checkbox,{[Mt.disabled]:n}),children:[b.jsxs(A,{relative:!0,display:"inline-flex",style:{"--checkbox-size":`${x}px`,"--checkbox-size-double":`${x*2}px`},children:[b.jsx("input",{ref:d,type:"checkbox",checked:v,onChange:y,onClick:C=>C.stopPropagation(),disabled:n,name:u,value:c,required:h,className:I(Mt.checkbox__input,{[Mt.disabled]:n})}),b.jsx("div",{className:I(Mt.checkbox__box,p&&Mt["checkbox__box--checked"],{[Mt.disabled]:n}),children:p&&(s?b.jsx(Vf,{width:x*.75,height:x*.75}):b.jsx(Af,{width:x*.75,height:x*.75}))})]}),(r||a)&&b.jsxs(A,{gap:4,children:[r&&b.jsx(O,{colorName:o,variant:i==="sm"?"body-2":"body-1",children:r}),a&&b.jsx(O,{variant:"body-2",colorName:l,children:a})]})]})});ks.displayName="Checkbox";const Of=t=>V.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},V.createElement("g",{opacity:.5},V.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.0002 17.9999C14.4185 17.9999 18.0002 14.4182 18.0002 9.99991C18.0002 5.58163 14.4185 1.99991 10.0002 1.99991C5.58197 1.99991 2.00024 5.58163 2.00024 9.99991C2.00024 14.4182 5.58197 17.9999 10.0002 17.9999ZM6.46514 6.46446C6.85566 6.07393 7.48883 6.07393 7.87935 6.46446L9.64712 8.23222C9.84238 8.42749 10.159 8.42749 10.3542 8.23222L12.122 6.46446C12.5125 6.07393 13.1457 6.07393 13.5362 6.46446C13.9267 6.85498 13.9267 7.48814 13.5362 7.87867L11.7684 9.64644C11.5732 9.8417 11.5732 10.1583 11.7684 10.3535L13.5362 12.1213C13.9267 12.5118 13.9267 13.145 13.5362 13.5355C13.1457 13.926 12.5125 13.926 12.122 13.5355L10.3542 11.7678C10.159 11.5725 9.84238 11.5725 9.64712 11.7678L7.87935 13.5355C7.48883 13.926 6.85566 13.926 6.46514 13.5355C6.07462 13.145 6.07462 12.5118 6.46514 12.1213L8.23291 10.3535C8.42817 10.1583 8.42817 9.8417 8.23291 9.64644L6.46514 7.87867C6.07462 7.48815 6.07462 6.85498 6.46514 6.46446Z",fill:"currentColor"}))),If="_disabled_15p1l_20",Bf="_input_15p1l_8",Nf="_sm_15p1l_61",Ff="_md_15p1l_66",zf="_error_15p1l_71",$f="_white_15p1l_75",Wf="_gray_15p1l_79",lt={"input-container":"_input-container_15p1l_8",disabled:If,input:Bf,"input-text-size_sm":"_input-text-size_sm_15p1l_52","input-text-size_md":"_input-text-size_md_15p1l_56",sm:Nf,md:Ff,error:zf,white:$f,gray:Wf,"clear-button":"_clear-button_15p1l_83"};function ir(t){return{...new Event("input",{bubbles:!0}),target:t,currentTarget:t}}const oa=w.forwardRef((t,e)=>{const{label:n,prompt:s,error:i,errorText:r,size:o="md",prefix:a,suffix:l,background:u="white",showClearButton:c,disabled:h,value:d,defaultValue:f,...g}=t,m=t.multiline===!0,v=w.useRef(null),y=w.useRef(null),[x,p]=Ge(d!==void 0?String(d):void 0,f!==void 0?String(f):"");w.useImperativeHandle(e,()=>({focus:()=>{v.current?.focus(),y.current?.focus()},blur:()=>{v.current?.blur(),y.current?.blur()},get value(){return v.current?.value||y.current?.value}}));const C=_=>{if(p(_.target.value),m){const T=t.onChange;T?.(_)}else{const T=t.onChange;T?.(_)}};w.useEffect(()=>{m&&t.autoResize&&y.current&&(y.current.style.height="auto",y.current.style.height=`${y.current.scrollHeight}px`)},[x,m,t.autoResize]);const S=()=>{if(p(""),!m){const T=v.current;if(T){T.value="";const E=ir(T),L=t.onChange;L?.(E)}return}const _=y.current;if(_){_.value="";const T=ir(_),E=t.onChange;E?.(T)}},P=()=>{if(m){const{rows:L,autoResize:Q,onChange:pt,multiline:Tt,...xt}=g;return b.jsx("textarea",{ref:y,rows:t.rows??3,className:I(lt.input,{[lt.disabled]:h}),disabled:h,maxLength:t.maxLength,...xt,value:x,onChange:C})}const{onChange:_,multiline:T,...E}=g;return b.jsx("input",{...E,ref:v,className:I(lt.input,lt[`input-text-size_${o}`],{[lt.disabled]:h}),disabled:h,type:t.type??"text",value:x,onChange:C})};return b.jsxs(A,{w:"full",gap:"var(--spacing-sm)",children:[n&&b.jsx(O,{variant:"body-2",fontWeight:"regular",colorName:i?"negative":"tertiary",children:n}),b.jsxs(A,{row:!0,alignItems:"center",w:"full",gap:"var(--spacing-md)",className:I(lt["input-container"],lt[u],lt[o],{[lt.error]:i,[lt.disabled]:h}),children:[a&&b.jsx(A,{flex:"none",children:a}),b.jsx(A,{flex:"1",children:P()}),c&&x&&!h&&b.jsx(A,{flex:"none",children:b.jsx("span",{className:lt["clear-button"],onClick:S,children:b.jsx(Of,{})})}),l&&b.jsx(A,{flex:"none",children:l})]}),(s||m)&&b.jsxs(A,{row:!0,gap:10,w:"full",children:[typeof s=="string"?b.jsx(O,{variant:"caption-1",colorName:"tertiary",children:s}):s,m&&t.maxLength&&b.jsx(O,{right:!0,ml:"auto",flex:"none",variant:"caption-1",colorName:"tertiary",children:`${x.length}/${t.maxLength}`})]}),r&&i&&b.jsx(O,{variant:"body-2",colorName:"negative",fontWeight:"regular",children:r})]})});oa.displayName="Input";const Uf="_avatar_1oe2p_8",Kf="_avatar_primary_1oe2p_22",Hf="_avatar_secondary_1oe2p_25",Gf="_avatar_negative_1oe2p_28",qf="_avatar_positive_1oe2p_31",Yf="_avatar_warning_1oe2p_34",Xf="_avatar_lgSize_1oe2p_71",Zf="_avatar_mdSize_1oe2p_85",Jf="_avatar_smSize_1oe2p_99",wn={avatar:Uf,avatar_primary:Kf,avatar_secondary:Hf,avatar_negative:Gf,avatar_positive:qf,avatar_warning:Yf,avatar_lgSize:Xf,avatar_mdSize:Zf,avatar_smSize:Jf};function Qf({attr:t,children:e,className:n,color:s="primary",size:i="md",...r}){const o="avatar";return b.jsx("div",{...t,...r,className:At(wn[o],n,he(wn,o,i),qe(wn,o,s)),children:e})}const tm=t=>V.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},V.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.15}),V.createElement("path",{d:"M16 9L10.0337 15L8 12.9548",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),rr=t=>V.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},V.createElement("path",{d:"M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",fill:"currentColor",fillOpacity:.15}),V.createElement("path",{d:"M12 6C11.4477 6 11 6.44772 11 7V13C11 13.5523 11.4477 14 12 14C12.5523 14 13 13.5523 13 13V7C13 6.44772 12.5523 6 12 6Z",fill:"currentColor"}),V.createElement("path",{d:"M12 15C11.4477 15 11 15.4477 11 16V17C11 17.5523 11.4477 18 12 18C12.5523 18 13 17.5523 13 17V16C13 15.4477 12.5523 15 12 15Z",fill:"currentColor"})),em=t=>V.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},V.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.12}),V.createElement("path",{d:"M16 8L8 16M16 16L8 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),nm=t=>V.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"black",...t},V.createElement("path",{d:"M12 2V22M19.0711 4.92893L4.92893 19.0711M22 12H2M19.0711 19.0711L4.92893 4.92893",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),sm="_hint_prca1_8",im="_md_prca1_19",rm="_sm_prca1_24",om="_icon_prca1_29",am="_content_prca1_40",lm="_title_prca1_46",cm="_subtitle_prca1_50",um="_disabled_prca1_55",hm="_warning_prca1_60",dm="_solid_prca1_60",fm="_negative_prca1_65",mm="_positive_prca1_70",pm="_accent_prca1_75",gm="_neutral_prca1_80",ym="_soft_prca1_85",it={hint:sm,md:im,sm:rm,icon:om,content:am,title:lm,subtitle:cm,disabled:um,warning:hm,solid:dm,negative:fm,positive:mm,accent:pm,neutral:gm,soft:ym},vm={negative:b.jsx(em,{}),positive:b.jsx(tm,{}),accent:b.jsx(rr,{}),warning:b.jsx(rr,{}),neutral:b.jsx(nm,{})},xm=({title:t,subtitle:e,color:n="warning",variant:s="soft",size:i="md",icon:r,disabled:o=!1,className:a,style:l})=>{const u=r||vm[n];return b.jsxs("div",{className:At(it.hint,it[n],it[s],it[i],o&&it.disabled,a),style:l,"aria-disabled":o,children:[u&&b.jsx("span",{className:At(it.icon,it[n]),children:u}),b.jsxs("div",{className:it.content,children:[t&&b.jsx(O,{className:At(it.title,he(it,"title",i)),variant:i==="md"?"body-1":"caption-2",children:t}),e&&b.jsx(O,{className:At(it.subtitle,he(it,"subtitle",i)),variant:i==="md"?"body-2":"caption-1",children:e})]})]})},bm={primary:{bg:"var(--status-neutral-tint-low)",color:"var(--text-primary)"},accent:{bg:"var(--status-accent-tint-low)",color:"var(--text-accent)"},warning:{bg:"var(--status-warning-tint-low)",color:"var(--text-warning)"},positive:{bg:"var(--status-positive-tint-low)",color:"var(--text-positive)"},negative:{bg:"var(--status-negative-tint-low)",color:"var(--text-negative)"}},wm={sm:28,md:32,lg:40},Rs=w.forwardRef(({label:t,color:e="primary",size:n="md",onClick:s,onDelete:i,avatar:r,icon:o,disabled:a,className:l},u)=>{const c=w.useRef(null),h=bm[e],d=X({cursor:a?"not-allowed":s?"pointer":"default",opacity:a?.5:1,userSelect:"none",position:"relative",transition:"background-color 0.2s, opacity 0.2s","&:hover":a?void 0:{backgroundColor:h.bg}}),f=X({cursor:"pointer",opacity:.6,"&:hover":{opacity:1}});return b.jsxs(A,{ref:g=>{c.current=g,typeof u=="function"?u(g):u&&(u.current=g)},row:!0,alignItems:"center",gap:6,px:10,py:4,h:wm[n],maxWidth:196,overflow:"hidden",borderRadius:"var(--corner-sm)",backgroundColor:h.bg,color:h.color,onClick:s,className:I(d,l),children:[s&&b.jsx(xe,{}),r&&b.jsx(A,{w:20,h:20,borderRadius:"50%",overflow:"hidden",children:r}),o&&b.jsx(A,{children:o}),b.jsx(O,{variant:"caption-1",colorName:e,textOverflow:"ellipsis",children:t}),i&&!a&&b.jsx(O,{className:f,colorName:e,onClick:g=>{g.stopPropagation(),i(g)},children:"×"})]})});Rs.displayName="Tag";const aa=({children:t})=>{const[e]=w.useState(()=>document.createElement("div"));return w.useEffect(()=>{let n=document.getElementById("portal-root");return n||(n=document.createElement("div"),n.id="portal-root",document.body.appendChild(n)),n.appendChild(e),()=>{n&&n.contains(e)&&n.removeChild(e)}},[e]),dr.createPortal(t,e)},Cm=t=>V.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},V.createElement("path",{d:"M6 9L12 15L18 9",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),_m=t=>V.createElement("svg",{fill:"currentColor",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 462.035 462.035",xmlSpace:"preserve",...t},V.createElement("g",null,V.createElement("path",{d:"M457.83,158.441c-0.021-0.028-0.033-0.058-0.057-0.087l-50.184-62.48c-0.564-0.701-1.201-1.305-1.879-1.845 c-2.16-2.562-5.355-4.225-8.967-4.225H65.292c-3.615,0-6.804,1.661-8.965,4.225c-0.678,0.54-1.316,1.138-1.885,1.845l-50.178,62.48 c-0.023,0.029-0.034,0.059-0.057,0.087C1.655,160.602,0,163.787,0,167.39v193.07c0,6.5,5.27,11.771,11.77,11.771h438.496 c6.5,0,11.77-5.271,11.77-11.771V167.39C462.037,163.787,460.381,160.602,457.83,158.441z M408.516,134.615l16.873,21.005h-16.873 V134.615z M384.975,113.345v42.274H296.84c-2.514,0-4.955,0.805-6.979,2.293l-58.837,43.299l-58.849-43.305 c-2.023-1.482-4.466-2.287-6.978-2.287H77.061v-42.274H384.975z M53.523,155.62H36.65l16.873-21.005V155.62z M438.498,348.69H23.54 V179.16h137.796l62.711,46.148c4.15,3.046,9.805,3.052,13.954-0.005l62.698-46.144h137.799V348.69L438.498,348.69z"}))),Sm="_disabled_6kgqd_40",Tm="_open_6kgqd_48",Pm="_error_6kgqd_51",Mm="_hidden_6kgqd_87",Em="_visible_6kgqd_90",Am="_selected_6kgqd_163",H={"select-container":"_select-container_6kgqd_8","full-width":"_full-width_6kgqd_13","select-input":"_select-input_6kgqd_17","size-xs":"_size-xs_6kgqd_25","size-sm":"_size-sm_6kgqd_30","size-md":"_size-md_6kgqd_35",disabled:Sm,open:Tm,"select-arrow":"_select-arrow_6kgqd_48",error:Pm,"select-value":"_select-value_6kgqd_62","select-value_xs":"_select-value_xs_6kgqd_74","select-placeholder":"_select-placeholder_6kgqd_81",hidden:Mm,visible:Em,"select-arrow_xs":"_select-arrow_xs_6kgqd_106","select-dropdown":"_select-dropdown_6kgqd_116","select-menu":"_select-menu_6kgqd_126","select-menu-item":"_select-menu-item_6kgqd_145","select-menu-item-first":"_select-menu-item-first_6kgqd_158",selected:Am,"overflow-tooltip-container":"_overflow-tooltip-container_6kgqd_167","overflow-tooltip-text":"_overflow-tooltip-text_6kgqd_172","empty-block":"_empty-block_6kgqd_179"},Vm={xs:"sm",sm:"md",md:"lg"};function km({value:t,onChange:e,multiple:n=!1,returnedValue:s,renderItem:i,placeholder:r,items:o,fullWidth:a,size:l="md",showDefaultItem:u,disabled:c,label:h,firstItem:d,lastItem:f,observer:g,emptyText:m,onBlur:v,error:y,errorText:x}){const[p,C]=Ge(t,n?[]:null),S=w.useRef(null),P=w.useRef(null),[_,T]=w.useState(!1),E=w.useMemo(()=>n?p||[]:p!=null?[p]:[],[p,n]),L=w.useMemo(()=>{const k=new Map;return o.forEach(j=>k.set(s(j),j)),k},[o,s]),Q=_r(S,_),pt=!o.length&&!y,Tt=k=>{const j=s(k);if(n){const $=E.includes(j)?E.filter(Ot=>Ot!==j):[...E,j];C($),e?.($)}else C(j),e?.(j),T(!1)},xt=k=>{if(!n)return;const j=E.filter($=>$!==k);C(j),e?.(j)},jt=()=>{const k=n?[]:null;C(k),e?.(k),n||T(!1)};w.useEffect(()=>{if(!_)return;const k=j=>{const $=j.target;!S.current?.contains($)&&!P.current?.contains($)&&T(!1)};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[_]);const Lt=()=>{if(!E.length)return b.jsx(O,{variant:l==="xs"?"caption-1":"body-2",textOverflow:"ellipsis",overflow:"hidden",children:r??"Select..."});if(n)return b.jsx(A,{flexWrap:"wrap",row:!0,gap:10,children:E.map($=>{const Ot=L.get($);return Ot?b.jsx(Rs,{size:Vm[l],label:i(Ot),onDelete:fa=>{fa.stopPropagation(),xt($)}},$):null})});const k=L.get(E[0]);if(!k)return b.jsx(O,{variant:l==="xs"?"caption-1":"body-2",textOverflow:"ellipsis",overflow:"hidden",children:r});const j=i(k);return typeof j=="string"?b.jsx(O,{variant:l==="xs"?"caption-1":"body-2",tag:"p",textOverflow:"ellipsis",overflow:"hidden",children:j}):b.jsx(b.Fragment,{children:j})},z=_&&b.jsx(aa,{children:b.jsx(Vs.div,{ref:P,className:H["select-dropdown"],initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.25,ease:"easeInOut"},style:{...Q,position:"absolute",zIndex:1},children:b.jsxs("ul",{className:H["select-menu"],children:[u&&!n&&b.jsx(A,{className:H["select-menu-item"],role:"option",onClick:jt,children:b.jsx(O,{variant:"body-2",children:r})}),d&&b.jsx(A,{className:I(H["select-menu-item"],H["select-menu-item-first"]),children:d}),pt&&b.jsxs(A,{className:H["empty-block"],children:[b.jsx(A,{w:20,h:20,children:b.jsx(_m,{})}),b.jsx(O,{variant:"body-2",children:m??"There is nothing yet"})]}),o.map(k=>{const j=s(k),$=E.includes(j);return b.jsxs(A,{row:!0,gap:10,alignItems:"center",className:I(H["select-menu-item"],{[H.selected]:$}),role:"option",relative:!0,onClick:()=>Tt(k),children:[n&&b.jsx(ks,{size:"sm",checked:$}),typeof i(k)=="string"?b.jsx(O,{variant:"body-2",tag:"p",wordBreak:"break-all",whiteSpace:"break-spaces",children:i(k)}):i(k),b.jsx(xe,{})]},j)}),g,f&&b.jsx(A,{className:I(H["select-menu-item"],H["select-menu-item-first"]),children:f})]})},"dropdown")});return b.jsxs(A,{relative:!0,display:"inline-block",minWidth:120,w:a?"full":"auto",children:[typeof h=="string"?b.jsx(O,{variant:"body-2",colorName:"tertiary",fontWeight:"regular",mb:l==="sm"?4:8,children:h}):h,b.jsxs(A,{ref:S,row:!0,gap:10,tabIndex:c?-1:0,role:"button",alignItems:"flex-start","aria-haspopup":"listbox",relative:!0,w:"100%",className:I(H["select-input"],H[`size-${l}`],{[H.error]:y,[H.disabled]:c,[H.open]:_}),onClick:()=>!c&&T(k=>!k),onBlur:v,children:[b.jsx(A,{className:I(H["select-value"]),children:Lt()}),b.jsx(A,{className:I(H["select-arrow"],H[`select-arrow_${l}`]),children:b.jsx(Cm,{})})]}),y&&x&&b.jsx(O,{tag:"p",colorName:"negative",variant:"body-2",mt:5,children:x}),b.jsx(Mu,{initial:!1,children:z})]})}const Rm=t=>V.createElement("svg",{width:10,height:10,viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},V.createElement("path",{d:"M3.94629 0.220237C3.78013 0.264025 3.64089 0.377624 3.56348 0.53176C3.27371 1.11189 3.05664 1.46395 2.83887 1.74953C2.61807 2.03873 2.38547 2.27579 2.03027 2.63039C1.21079 3.45057 0.799805 4.52619 0.799805 5.60012C0.799838 6.67406 1.21073 7.74968 2.03027 8.56985C3.67062 10.2096 6.32931 10.2095 7.96973 8.56985C8.78929 7.74968 9.20016 6.67408 9.2002 5.60012C9.15131 4.32908 8.43217 3.48543 7.94727 3.05813C7.76902 2.90106 7.40643 3.02424 7.2627 3.2134C7.24031 3.24286 7.21612 3.2739 7.18945 3.30617C6.93211 3.61754 6.56236 3.80807 6.41504 3.83156C6.38264 3.83667 6.36979 3.76513 6.2959 3.58254C5.79455 2.34427 5.78927 2.49365 5.58887 2.01125C5.48847 1.7692 5.05517 1.02727 4.92676 0.828635C4.80206 0.635591 4.64095 0.439873 4.43359 0.301292C4.29028 0.205951 4.1124 0.175957 3.94629 0.220237ZM4.75293 4.17824C5.2689 4.63997 5.60857 5.26651 5.71484 5.95071C6.10631 5.85571 6.46727 5.68318 6.78125 5.45071C6.86578 5.70826 6.89338 5.98123 6.8623 6.25051C6.83115 6.51993 6.74174 6.77966 6.60059 7.01125C6.45944 7.24281 6.27008 7.44117 6.04492 7.59231C5.81977 7.74344 5.56462 7.8443 5.29688 7.88723C5.0292 7.93013 4.75518 7.91446 4.49414 7.84133C4.23299 7.76812 3.99064 7.6383 3.78418 7.46242C3.5778 7.28657 3.41161 7.06792 3.29785 6.8218C3.18419 6.57572 3.12519 6.30771 3.125 6.03664C3.12508 5.58233 3.29054 5.14308 3.58984 4.80129C3.88917 4.4597 4.30271 4.2382 4.75293 4.17824Z",fill:"#FEAD34"})),Dm=t=>V.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},V.createElement("path",{d:"M10.1483 8.61509C10.3344 8.26159 9.98299 7.89856 9.58534 7.93723C9.42671 7.95265 9.25857 7.9605 9.07422 7.96035C6.36522 7.9582 4.17129 5.76427 4.16914 3.05527C4.169 2.87115 4.17682 2.70321 4.19221 2.54477C4.23082 2.14712 3.86769 1.79411 3.50976 1.97161C2.03398 2.70343 1.20002 4.02274 1.20002 5.89477C1.20002 8.60377 3.3961 10.7998 6.1051 10.7998C7.97571 10.7998 9.38737 10.06 10.1483 8.61509Z",fill:"white"})),jm="_container_e7tan_8",Lm="_disabled_e7tan_17",Om="_reverse_e7tan_21",Im="_input_e7tan_25",Bm="_switchContainer_e7tan_35",Nm="_variant_accent_e7tan_43",Fm="_variant_secondary_e7tan_47",zm="_thumb_e7tan_51",$m="_variant_theme_e7tan_54",Wm="_moon_e7tan_58",Um="_fire_e7tan_61",Km="_size_sm_e7tan_74",Hm="_size_md_e7tan_80",Gm="_size_lg_e7tan_86",ct={container:jm,disabled:Lm,reverse:Om,input:Im,switchContainer:Bm,variant_accent:Nm,variant_secondary:Fm,switch:"_switch_e7tan_35",thumb:zm,variant_theme:$m,moon:Wm,fire:Um,size_sm:Km,size_md:Hm,size_lg:Gm},la=w.forwardRef(({title:t,text:e,icon:n,disabled:s,onChange:i,checked:r,defaultValue:o,className:a,size:l="md",variant:u="accent",reverse:c=!1,w:h="auto",...d},f)=>{const[g,m]=Ge(r,o),v=w.useRef(null);w.useImperativeHandle(f,()=>({focus:()=>{v.current?.focus()},blur:()=>{v.current?.blur()},get checked(){return g??!1},setChecked:C=>{m(C),i?.(C)},toggle:()=>{const C=!g;m(C),i?.(C)},isFocused:()=>document.activeElement===v.current,isDisabled:()=>s??!1,getInputElement:()=>v.current,checkValidity:()=>v.current?.checkValidity()??!0,reset:()=>{const C=o??!1;m(C),i?.(C)}}),[g,m,i,s,o]);const y=w.useCallback(C=>{m(C.target.checked),i?.(C.target.checked)},[i]),x=w.useMemo(()=>typeof t=="string"?b.jsx(O,{variant:"body-1",colorName:"primary",fontWeight:"medium",children:t}):t,[t]),p=w.useMemo(()=>typeof e=="string"?b.jsx(O,{variant:"body-2",colorName:"secondary",fontWeight:"regular",children:e}):e,[e]);return b.jsxs(A,{row:!0,w:h,gap:"var(--spacing-sm)",children:[b.jsxs("label",{className:I(ct.container,a,{[ct.disabled]:s,[ct.reverse]:c}),children:[b.jsxs(A,{className:I(ct.switchContainer,ct[`size_${l}`],ct[`variant_${u}`]),children:[b.jsx("input",{ref:v,type:"checkbox",checked:g,className:ct.input,onChange:y,disabled:s,...d}),b.jsx("div",{className:ct.switch,children:b.jsx("div",{className:ct.thumb,children:u==="theme"&&b.jsxs(b.Fragment,{children:[b.jsx(Dm,{className:ct.moon}),b.jsx(Rm,{className:ct.fire})]})})})]}),b.jsxs(A,{gap:"var(--spacing-xs)",children:[x,p]})]}),n]})});la.displayName="Switch";const qm="_header_446to_8",Ym={header:qm},ca=w.forwardRef(({title:t,subtitle:e,onClose:n,w:s="full",p:i,py:r,px:o="var(--spacing-2xl)",pt:a="var(--spacing-2xl)",pb:l="var(--spacing-lg)",row:u=!0,justifyContent:c="space-between",showCloseButton:h=!0},d)=>b.jsxs(A,{w:s,p:i,py:r,px:o,pt:a,pb:l,row:u,justifyContent:c,ref:d,className:Ym.header,children:[b.jsxs(A,{gap:"var(--spacing-sm)",children:[b.jsx(O,{variant:"title-3",colorName:"primary",fontWeight:"semibold",children:t}),b.jsx(O,{variant:"body-1",colorName:"tertiary",fontWeight:"medium",children:e})]}),h&&b.jsx(A,{children:b.jsx(Yn,{onClick:n,color:"neutral",children:b.jsx(Sr,{})})})]}));ca.displayName="ModalHeader";const Xm="_footer_1bo08_8",Zm={footer:Xm},ua=w.forwardRef(({children:t,row:e=!0,flex:n=!0,gap:s="var(--spacing-lg)",p:i="var(--spacing-2xl)",className:r,...o},a)=>b.jsx(A,{flex:n,row:e,gap:s,p:i,className:I(Zm.footer,r),ref:a,...o,children:t}));ua.displayName="ModalFooter";function It(t,e,n){let s=n.initialDeps??[],i;function r(){var o,a,l,u;let c;n.key&&((o=n.debug)!=null&&o.call(n))&&(c=Date.now());const h=t();if(!(h.length!==s.length||h.some((g,m)=>s[m]!==g)))return i;s=h;let f;if(n.key&&((a=n.debug)!=null&&a.call(n))&&(f=Date.now()),i=e(...h),n.key&&((l=n.debug)!=null&&l.call(n))){const g=Math.round((Date.now()-c)*100)/100,m=Math.round((Date.now()-f)*100)/100,v=m/16,y=(x,p)=>{for(x=String(x);x.length<p;)x=" "+x;return x};console.info(`%c⏱ ${y(m,5)} /${y(g,5)} ms`,`
|
|
13
|
+
`),()=>{v.contains(m)&&v.removeChild(m)}},[e]),b.jsx(Cu,{isPresent:e,childRef:r,sizeRef:o,children:k.cloneElement(t,{ref:l})})}const Tu=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:r,mode:o,anchorX:a,root:l})=>{const u=Zn(Pu),c=w.useId();let h=!0,d=w.useMemo(()=>(h=!1,{id:c,initial:e,isPresent:n,custom:i,onExitComplete:f=>{u.set(f,!0);for(const g of u.values())if(!g)return;s&&s()},register:f=>(u.set(f,!1),()=>u.delete(f))}),[n,u,s]);return r&&h&&(d={...d}),w.useMemo(()=>{u.forEach((f,g)=>u.set(g,!1))},[n]),k.useEffect(()=>{!n&&!u.size&&s&&s()},[n]),o==="popLayout"&&(t=b.jsx(Su,{isPresent:n,anchorX:a,root:l,children:t})),b.jsx(Ye.Provider,{value:d,children:t})};function Pu(){return new Map}function vo(t=!0){const e=w.useContext(Ye);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,r=w.useId();w.useEffect(()=>{if(t)return i(r)},[t]);const o=w.useCallback(()=>t&&s&&s(r),[r,s,t]);return!n&&s?[!1,o]:[!0]}const Me=t=>t.key||"";function hi(t){const e=[];return w.Children.forEach(t,n=>{w.isValidElement(n)&&e.push(n)}),e}const Mu=({children:t,custom:e,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:r="sync",propagate:o=!1,anchorX:a="left",root:l})=>{const[u,c]=vo(o),h=w.useMemo(()=>hi(t),[t]),d=o&&!u?[]:h.map(Me),f=w.useRef(!0),g=w.useRef(h),m=Zn(()=>new Map),[v,y]=w.useState(h),[x,p]=w.useState(h);Pr(()=>{f.current=!1,g.current=h;for(let P=0;P<x.length;P++){const C=Me(x[P]);d.includes(C)?m.delete(C):m.get(C)!==!0&&m.set(C,!1)}},[x,d.length,d.join("-")]);const _=[];if(h!==v){let P=[...h];for(let C=0;C<x.length;C++){const T=x[C],E=Me(T);d.includes(E)||(P.splice(C,0,T),_.push(T))}return r==="wait"&&_.length&&(P=_),p(hi(P)),y(h),null}process.env.NODE_ENV!=="production"&&r==="wait"&&x.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}=w.useContext(Xn);return b.jsx(b.Fragment,{children:x.map(P=>{const C=Me(P),T=o&&!u?!1:h===x||d.includes(C),E=()=>{if(m.has(C))m.set(C,!0);else return;let L=!0;m.forEach(Q=>{Q||(L=!1)}),L&&(S?.(),p(g.current),o&&c?.(),s&&s())};return b.jsx(Tu,{isPresent:T,initial:!f.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:r,root:l,onExitComplete:T?void 0:E,anchorX:a,children:P},C)})})},xo=w.createContext({strict:!1}),di={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"]},qt={};for(const t in di)qt[t]={isEnabled:e=>di[t].some(n=>!!e[n])};function Eu(t){for(const e in t)qt[e]={...qt[e],...t[e]}}const Au=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 ze(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Au.has(t)}let bo=t=>!ze(t);function ku(t){typeof t=="function"&&(bo=e=>e.startsWith("on")?!ze(e):t(e))}try{ku(require("@emotion/is-prop-valid").default)}catch{}function Vu(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(bo(i)||n===!0&&ze(i)||!e&&!ze(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const Xe=w.createContext({});function Ze(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function pe(t){return typeof t=="string"||Array.isArray(t)}const ws=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],_s=["initial",...ws];function Je(t){return Ze(t.animate)||_s.some(e=>pe(t[e]))}function wo(t){return!!(Je(t)||t.variants)}function Ru(t,e){if(Je(t)){const{initial:n,animate:s}=t;return{initial:n===!1||pe(n)?n:void 0,animate:pe(s)?s:void 0}}return t.inherit!==!1?e:{}}function Du(t){const{initial:e,animate:n}=Ru(t,w.useContext(Xe));return w.useMemo(()=>({initial:e,animate:n}),[fi(e),fi(n)])}function fi(t){return Array.isArray(t)?t.join(" "):t}const ge={};function ju(t){for(const e in t)ge[e]=t[e],os(e)&&(ge[e].isCSSVariable=!0)}function _o(t,{layout:e,layoutId:n}){return Qt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!ge[t]||t==="opacity")}const Lu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ou=Jt.length;function Iu(t,e,n){let s="",i=!0;for(let r=0;r<Ou;r++){const o=Jt[r],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=ho(a,ys[o]);if(!l){i=!1;const c=Lu[o]||o;s+=`${c}(${u}) `}n&&(e[o]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Cs(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const l in e){const u=e[l];if(Qt.has(l)){o=!0;continue}else if(os(l)){i[l]=u;continue}else{const c=ho(u,ys[l]);l.startsWith("origin")?(a=!0,r[l]=c):s[l]=c}}if(e.transform||(o||n?s.transform=Iu(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=r;s.transformOrigin=`${l} ${u} ${c}`}}const Ss=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Co(t,e,n){for(const s in e)!Z(e[s])&&!_o(s,n)&&(t[s]=e[s])}function Bu({transformTemplate:t},e){return w.useMemo(()=>{const n=Ss();return Cs(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Nu(t,e){const n=t.style||{},s={};return Co(s,n,t),Object.assign(s,Bu(t,e)),s}function Fu(t,e){const n={},s=Nu(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const $u={offset:"stroke-dashoffset",array:"stroke-dasharray"},zu={offset:"strokeDashoffset",array:"strokeDasharray"};function Wu(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?$u:zu;t[r.offset]=M.transform(-s);const o=M.transform(e),a=M.transform(n);t[r.array]=`${o} ${a}`}function So(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},l,u,c){if(Cs(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;h.transform&&(d.transform=h.transform,delete h.transform),(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=c?.transformBox??"fill-box",delete h.transformBox),e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&Wu(h,i,r,o,!1)}const To=()=>({...Ss(),attrs:{}}),Po=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Uu(t,e,n,s){const i=w.useMemo(()=>{const r=To();return So(r,e,Po(s),t.transformTemplate,t.style),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};Co(r,t.style,t),i.style={...r,...i.style}}return i}const Ku=["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 Ts(t){return typeof t!="string"||t.includes("-")?!1:!!(Ku.indexOf(t)>-1||/[A-Z]/u.test(t))}function Hu(t,e,n,{latestValues:s},i,r=!1){const a=(Ts(t)?Uu:Fu)(e,s,i,t),l=Vu(e,typeof t=="string",r),u=t!==w.Fragment?{...l,...a,ref:n}:{},{children:c}=e,h=w.useMemo(()=>Z(c)?c.get():c,[c]);return w.createElement(t,{...u,children:h})}function mi(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Ps(t,e,n,s){if(typeof e=="function"){const[i,r]=mi(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=mi(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function Le(t){return Z(t)?t.get():t}function Gu({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:qu(n,s,i,t),renderState:e()}}function qu(t,e,n,s){const i={},r=s(t,{});for(const d in r)i[d]=Le(r[d]);let{initial:o,animate:a}=t;const l=Je(t),u=wo(t);e&&u&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const h=c?a:o;if(h&&typeof h!="boolean"&&!Ze(h)){const d=Array.isArray(h)?h:[h];for(let f=0;f<d.length;f++){const g=Ps(t,d[f]);if(g){const{transitionEnd:m,transition:v,...y}=g;for(const x in y){let p=y[x];if(Array.isArray(p)){const _=c?p.length-1:0;p=p[_]}p!==null&&(i[x]=p)}for(const x in m)i[x]=m[x]}}}return i}const Mo=t=>(e,n)=>{const s=w.useContext(Xe),i=w.useContext(Ye),r=()=>Gu(t,e,s,i);return n?r():Zn(r)};function Ms(t,e,n){const{style:s}=t,i={};for(const r in s)(Z(s[r])||e.style&&Z(e.style[r])||_o(r,t)||n?.getValue(r)?.liveStyle!==void 0)&&(i[r]=s[r]);return i}const Yu=Mo({scrapeMotionValuesFromProps:Ms,createRenderState:Ss});function Eo(t,e,n){const s=Ms(t,e,n);for(const i in t)if(Z(t[i])||Z(e[i])){const r=Jt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}const Xu=Mo({scrapeMotionValuesFromProps:Eo,createRenderState:To}),Zu=Symbol.for("motionComponentSymbol");function Ft(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Ju(t,e,n){return w.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):Ft(n)&&(n.current=s))},[e])}const Es=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Qu="framerAppearId",Ao="data-"+Es(Qu),ko=w.createContext({});function th(t,e,n,s,i){const{visualElement:r}=w.useContext(Xe),o=w.useContext(xo),a=w.useContext(Ye),l=w.useContext(bs).reducedMotion,u=w.useRef(null);s=s||o.renderer,!u.current&&s&&(u.current=s(t,{visualState:e,parent:r,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,h=w.useContext(ko);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&eh(u.current,n,i,h);const d=w.useRef(!1);w.useInsertionEffect(()=>{c&&d.current&&c.update(n,a)});const f=n[Ao],g=w.useRef(!!f&&!window.MotionHandoffIsComplete?.(f)&&window.MotionHasOptimisedAnimation?.(f));return Pr(()=>{c&&(d.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),g.current&&c.animationState&&c.animationState.animateChanges())}),w.useEffect(()=>{c&&(!g.current&&c.animationState&&c.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(f)}),g.current=!1),c.enteringChildren=void 0)}),c}function eh(t,e,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Vo(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&Ft(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:u})}function Vo(t){if(t)return t.options.allowProjection!==!1?t.projection:Vo(t.parent)}function dn(t,{forwardMotionProps:e=!1}={},n,s){n&&Eu(n);const i=Ts(t)?Xu:Yu;function r(a,l){let u;const c={...w.useContext(bs),...a,layoutId:nh(a)},{isStatic:h}=c,d=Du(a),f=i(a,h);if(!h&&Jn){sh(c,n);const g=ih(c);u=g.MeasureLayout,d.visualElement=th(t,f,c,s,g.ProjectionNode)}return b.jsxs(Xe.Provider,{value:d,children:[u&&d.visualElement?b.jsx(u,{visualElement:d.visualElement,...c}):null,Hu(t,a,Ju(f,d.visualElement,l),f,h,e)]})}r.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const o=w.forwardRef(r);return o[Zu]=t,o}function nh({layoutId:t}){const e=w.useContext(Xn).id;return e&&t!==void 0?e+"-"+t:t}function sh(t,e){const n=w.useContext(xo).strict;if(process.env.NODE_ENV!=="production"&&e&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?Xt(!1,s,"lazy-strict-mode"):yt(!1,s,"lazy-strict-mode")}}function ih(t){const{drag:e,layout:n}=qt;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function rh(t,e){if(typeof Proxy>"u")return dn;const n=new Map,s=(r,o)=>dn(r,o,t,e),i=(r,o)=>(process.env.NODE_ENV!=="production"&&ss(!1,"motion() is deprecated. Use motion.create() instead."),s(r,o));return new Proxy(i,{get:(r,o)=>o==="create"?s:(n.has(o)||n.set(o,dn(o,void 0,t,e)),n.get(o))})}function Ro({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function oh({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function ah(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function fn(t){return t===void 0||t===1}function Bn({scale:t,scaleX:e,scaleY:n}){return!fn(t)||!fn(e)||!fn(n)}function Et(t){return Bn(t)||Do(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Do(t){return pi(t.x)||pi(t.y)}function pi(t){return t&&t!=="0%"}function We(t,e,n){const s=t-n,i=e*s;return n+i}function gi(t,e,n,s,i){return i!==void 0&&(t=We(t,i,s)),We(t,n,s)+e}function Nn(t,e=0,n=1,s,i){t.min=gi(t.min,e,n,s,i),t.max=gi(t.max,e,n,s,i)}function jo(t,{x:e,y:n}){Nn(t.x,e.translate,e.scale,e.originPoint),Nn(t.y,n.translate,n.scale,n.originPoint)}const yi=.999999999999,vi=1.0000000000001;function lh(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const{visualElement:l}=r.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&zt(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,jo(t,o)),s&&Et(r.latestValues)&&zt(t,r.latestValues))}e.x<vi&&e.x>yi&&(e.x=1),e.y<vi&&e.y>yi&&(e.y=1)}function $t(t,e){t.min=t.min+e,t.max=t.max+e}function xi(t,e,n,s,i=.5){const r=F(t.min,t.max,i);Nn(t,e,n,r,s)}function zt(t,e){xi(t.x,e.x,e.scaleX,e.scale,e.originX),xi(t.y,e.y,e.scaleY,e.scale,e.originY)}function Lo(t,e){return Ro(ah(t.getBoundingClientRect(),e))}function ch(t,e,n){const s=Lo(t,n),{scroll:i}=e;return i&&($t(s.x,i.offset.x),$t(s.y,i.offset.y)),s}const bi=()=>({translate:0,scale:1,origin:0,originPoint:0}),Wt=()=>({x:bi(),y:bi()}),wi=()=>({min:0,max:0}),W=()=>({x:wi(),y:wi()}),Fn={current:null},Oo={current:!1};function uh(){if(Oo.current=!0,!!Jn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Fn.current=t.matches;t.addEventListener("change",e),e()}else Fn.current=!1}const hh=new WeakMap;function dh(t,e,n){for(const s in e){const i=e[s],r=n[s];if(Z(i))t.addValue(s,i);else if(Z(r))t.addValue(s,Gt(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,Gt(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const _i=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class fh{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ps,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=tt.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,B.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=Je(n),this.isVariantNode=wo(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in h){const f=h[d];l[d]!==void 0&&Z(f)&&f.set(l[d])}}mount(e){this.current=e,hh.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),Oo.current||uh(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Fn.current,process.env.NODE_ENV!=="production"&&ss(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),_t(this.notifyUpdate),_t(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=Qt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&B.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r&&r(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in qt){const n=qt[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const r=this.features[e];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):W()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<_i.length;s++){const i=_i[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=e[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=dh(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=Gt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Mr(s)||Ar(s))?s=parseFloat(s):!bu(s)&&Ct.test(n)&&(s=uo(e,n)),this.setBaseTarget(e,Z(s)?s.get():s)),Z(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const r=Ps(this.props,n,this.presenceContext?.custom);r&&(s=r[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!Z(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new ns),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){vs.render(this.render)}}class Io extends fh{constructor(){super(...arguments),this.KeyframeResolver=lu}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Z(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Bo(t,{style:e,vars:n},s,i){const r=t.style;let o;for(o in e)r[o]=e[o];i?.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function mh(t){return window.getComputedStyle(t)}class ph extends Io{constructor(){super(...arguments),this.type="html",this.renderInstance=Bo}readValueFromInstance(e,n){if(Qt.has(n))return this.projection?.isProjecting?Vn(n):Pc(e,n);{const s=mh(e),i=(os(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Lo(e,n)}build(e,n,s){Cs(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Ms(e,n,s)}}const No=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"]);function gh(t,e,n,s){Bo(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(No.has(i)?i:Es(i),e.attrs[i])}class yh extends Io{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=W}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Qt.has(n)){const s=co(n);return s&&s.default||0}return n=No.has(n)?n:Es(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Eo(e,n,s)}build(e,n,s){So(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){gh(e,n,s,i)}mount(e){this.isSVGTag=Po(e.tagName),super.mount(e)}}const vh=(t,e)=>Ts(t)?new yh(e):new ph(e,{allowProjection:t!==w.Fragment});function Kt(t,e,n){const s=t.getProps();return Ps(s,e,n!==void 0?n:s.custom,t)}const $n=t=>Array.isArray(t);function xh(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Gt(n))}function bh(t){return $n(t)?t[t.length-1]||0:t}function wh(t,e){const n=Kt(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=bh(r[o]);xh(t,o,a)}}function _h(t){return!!(Z(t)&&t.add)}function zn(t,e){const n=t.getValue("willChange");if(_h(n))return n.add(e);if(!n&&vt.WillChange){const s=new vt.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function Fo(t){return t.props[Ao]}const Ch=t=>t!==null;function Sh(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(Ch),r=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[r]}const Th={type:"spring",stiffness:500,damping:25,restSpeed:10},Ph=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Mh={type:"keyframes",duration:.8},Eh={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ah=(t,{keyframes:e})=>e.length>2?Mh:Qt.has(t)?t.startsWith("scale")?Ph(e[1]):Th:Eh;function kh({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const As=(t,e,n,s={},i,r)=>o=>{const a=gs(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-ht(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:d=>{e.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};kh(a)||Object.assign(c,Ah(t,c)),c.duration&&(c.duration=ht(c.duration)),c.repeatDelay&&(c.repeatDelay=ht(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(On(c),c.delay===0&&(h=!0)),(vt.instantAnimations||vt.skipAnimations)&&(h=!0,On(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const d=Sh(c.keyframes,a);if(d!==void 0){B.update(()=>{c.onUpdate(d),c.onComplete()});return}}return a.isSync?new ms(c):new Yc(c)};function Vh({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function $o(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r=t.getDefaultTransition(),transitionEnd:o,...a}=e;s&&(r=s);const l=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const c in a){const h=t.getValue(c,t.latestValues[c]??null),d=a[c];if(d===void 0||u&&Vh(u,c))continue;const f={delay:n,...gs(r||{},c)},g=h.get();if(g!==void 0&&!h.isAnimating&&!Array.isArray(d)&&d===g&&!f.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){const y=Fo(t);if(y){const x=window.MotionHandoffAnimation(y,c,B);x!==null&&(f.startTime=x,m=!0)}}zn(t,c),h.start(As(c,h,d,t.shouldReduceMotion&&oo.has(c)?{type:!1}:f,t,m));const v=h.animation;v&&l.push(v)}return o&&Promise.all(l).then(()=>{B.update(()=>{o&&wh(t,o)})}),l}function zo(t,e,n,s=0,i=1){const r=Array.from(t).sort((u,c)=>u.sortNodePosition(c)).indexOf(e),o=t.size,a=(o-1)*s;return typeof n=="function"?n(r,o):i===1?r*s:a-r*s}function Wn(t,e,n={}){const s=Kt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all($o(t,s,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:h}=i;return Rh(t,e,l,u,c,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[r,o]:[o,r];return l().then(()=>u())}else return Promise.all([r(),o(n.delay)])}function Rh(t,e,n=0,s=0,i=0,r=1,o){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(Wn(l,e,{...o,delay:n+(typeof s=="function"?0:s)+zo(t.variantChildren,l,s,i,r)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function Dh(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>Wn(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=Wn(t,e,n);else{const i=typeof e=="function"?Kt(t,e,n.custom):e;s=Promise.all($o(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}function Wo(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const jh=_s.length;function Uo(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Uo(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<jh;n++){const s=_s[n],i=t.props[s];(pe(i)||i===!1)&&(e[s]=i)}return e}const Lh=[...ws].reverse(),Oh=ws.length;function Ih(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Dh(t,n,s)))}function Bh(t){let e=Ih(t),n=Ci(),s=!0;const i=l=>(u,c)=>{const h=Kt(t,c,l==="exit"?t.presenceContext?.custom:void 0);if(h){const{transition:d,transitionEnd:f,...g}=h;u={...u,...g,...f}}return u};function r(l){e=l(t)}function o(l){const{props:u}=t,c=Uo(t.parent)||{},h=[],d=new Set;let f={},g=1/0;for(let v=0;v<Oh;v++){const y=Lh[v],x=n[y],p=u[y]!==void 0?u[y]:c[y],_=pe(p),S=y===l?x.isActive:null;S===!1&&(g=v);let P=p===c[y]&&p!==u[y]&&_;if(P&&s&&t.manuallyAnimateOnMount&&(P=!1),x.protectedKeys={...f},!x.isActive&&S===null||!p&&!x.prevProp||Ze(p)||typeof p=="boolean")continue;const C=Nh(x.prevProp,p);let T=C||y===l&&x.isActive&&!P&&_||v>g&&_,E=!1;const L=Array.isArray(p)?p:[p];let Q=L.reduce(i(y),{});S===!1&&(Q={});const{prevResolvedValues:pt={}}=x,Tt={...pt,...Q},xt=$=>{T=!0,d.has($)&&(E=!0,d.delete($)),x.needsAnimating[$]=!0;const V=t.getValue($);V&&(V.liveStyle=!1)};for(const $ in Tt){const V=Q[$],j=pt[$];if(f.hasOwnProperty($))continue;let z=!1;$n(V)&&$n(j)?z=!Wo(V,j):z=V!==j,z?V!=null?xt($):d.add($):V!==void 0&&d.has($)?xt($):x.protectedKeys[$]=!0}x.prevProp=p,x.prevResolvedValues=Q,x.isActive&&(f={...f,...Q}),s&&t.blockInitialAnimation&&(T=!1);const jt=P&&C;T&&(!jt||E)&&h.push(...L.map($=>{const V={type:y};if(typeof $=="string"&&s&&!jt&&t.manuallyAnimateOnMount&&t.parent){const{parent:j}=t,z=Kt(j,$);if(j.enteringChildren&&z){const{delayChildren:Ot}=z.transition||{};V.delay=zo(j.enteringChildren,t,Ot)}}return{animation:$,options:V}}))}if(d.size){const v={};if(typeof u.initial!="boolean"){const y=Kt(t,Array.isArray(u.initial)?u.initial[0]:u.initial);y&&y.transition&&(v.transition=y.transition)}d.forEach(y=>{const x=t.getBaseTarget(y),p=t.getValue(y);p&&(p.liveStyle=!0),v[y]=x??null}),h.push({animation:v})}let m=!!h.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(m=!1),s=!1,m?e(h):Promise.resolve()}function a(l,u){if(n[l].isActive===u)return Promise.resolve();t.variantChildren?.forEach(h=>h.animationState?.setActive(l,u)),n[l].isActive=u;const c=o(l);for(const h in n)n[h].protectedKeys={};return c}return{animateChanges:o,setActive:a,setAnimateFunction:r,getState:()=>n,reset:()=>{n=Ci(),s=!0}}}function Nh(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Wo(e,t):!1}function Pt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ci(){return{animate:Pt(!0),whileInView:Pt(),whileHover:Pt(),whileTap:Pt(),whileDrag:Pt(),whileFocus:Pt(),exit:Pt()}}class St{constructor(e){this.isMounted=!1,this.node=e}update(){}}class Fh extends St{constructor(e){super(e),e.animationState||(e.animationState=Bh(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Ze(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let $h=0;class zh extends St{constructor(){super(...arguments),this.id=$h++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const Wh={animation:{Feature:Fh},exit:{Feature:zh}};function ye(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function Ce(t){return{point:{x:t.pageX,y:t.pageY}}}const Uh=t=>e=>xs(e)&&t(e,Ce(e));function oe(t,e,n,s){return ye(t,e,Uh(n),s)}const Ko=1e-4,Kh=1-Ko,Hh=1+Ko,Ho=.01,Gh=0-Ho,qh=0+Ho;function J(t){return t.max-t.min}function Yh(t,e,n){return Math.abs(t-e)<=n}function Si(t,e,n,s=.5){t.origin=s,t.originPoint=F(e.min,e.max,t.origin),t.scale=J(n)/J(e),t.translate=F(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Kh&&t.scale<=Hh||isNaN(t.scale))&&(t.scale=1),(t.translate>=Gh&&t.translate<=qh||isNaN(t.translate))&&(t.translate=0)}function ae(t,e,n,s){Si(t.x,e.x,n.x,s?s.originX:void 0),Si(t.y,e.y,n.y,s?s.originY:void 0)}function Ti(t,e,n){t.min=n.min+e.min,t.max=t.min+J(e)}function Xh(t,e,n){Ti(t.x,e.x,n.x),Ti(t.y,e.y,n.y)}function Pi(t,e,n){t.min=e.min-n.min,t.max=t.min+J(e)}function le(t,e,n){Pi(t.x,e.x,n.x),Pi(t.y,e.y,n.y)}function ot(t){return[t("x"),t("y")]}const Go=({current:t})=>t?t.ownerDocument.defaultView:null,Mi=(t,e)=>Math.abs(t-e);function Zh(t,e){const n=Mi(t.x,e.x),s=Mi(t.y,e.y);return Math.sqrt(n**2+s**2)}class qo{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=pn(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,g=Zh(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!f&&!g)return;const{point:m}=d,{timestamp:v}=G;this.history.push({...m,timestamp:v});const{onStart:y,onMove:x}=this.handlers;f||(y&&y(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=mn(f,this.transformPagePoint),B.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:g,onSessionEnd:m,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=pn(d.type==="pointercancel"?this.lastMoveEventInfo:mn(f,this.transformPagePoint),this.history);this.startEvent&&g&&g(d,y),m&&m(d,y)},!xs(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=o,this.contextWindow=i||window;const a=Ce(e),l=mn(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=G;this.history=[{...u,timestamp:c}];const{onSessionStart:h}=n;h&&h(e,pn(l,this.history)),this.removeListeners=be(oe(this.contextWindow,"pointermove",this.handlePointerMove),oe(this.contextWindow,"pointerup",this.handlePointerUp),oe(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),_t(this.updatePoint)}}function mn(t,e){return e?{point:e(t.point)}:t}function Ei(t,e){return{x:t.x-e.x,y:t.y-e.y}}function pn({point:t},e){return{point:t,delta:Ei(t,Yo(e)),offset:Ei(t,Jh(e)),velocity:Qh(e,.1)}}function Jh(t){return t[0]}function Yo(t){return t[t.length-1]}function Qh(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Yo(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>ht(e)));)n--;if(!s)return{x:0,y:0};const r=at(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function td(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?F(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?F(n,t,s.max):Math.min(t,n)),t}function Ai(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function ed(t,{top:e,left:n,bottom:s,right:i}){return{x:Ai(t.x,n,i),y:Ai(t.y,e,s)}}function ki(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function nd(t,e){return{x:ki(t.x,e.x),y:ki(t.y,e.y)}}function sd(t,e){let n=.5;const s=J(t),i=J(e);return i>s?n=de(e.min,e.max-s,t.min):s>i&&(n=de(t.min,t.max-i,e.min)),gt(0,1,n)}function id(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Un=.35;function rd(t=Un){return t===!1?t=0:t===!0&&(t=Un),{x:Vi(t,"left","right"),y:Vi(t,"top","bottom")}}function Vi(t,e,n){return{min:Ri(t,e),max:Ri(t,n)}}function Ri(t,e){return typeof t=="number"?t:t[e]||0}const od=new WeakMap;class ad{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=W(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=h=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ce(h).point)},o=(h,d)=>{const{drag:f,dragPropagation:g,onDragStart:m}=this.getProps();if(f&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=du(f),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=d,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ot(y=>{let x=this.getAxisMotionValue(y).get()||0;if(mt.test(x)){const{projection:p}=this.visualElement;if(p&&p.layout){const _=p.layout.layoutBox[y];_&&(x=J(_)*(parseFloat(x)/100))}}this.originPoint[y]=x}),m&&B.postRender(()=>m(h,d)),zn(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},a=(h,d)=>{this.latestPointerEvent=h,this.latestPanInfo=d;const{dragPropagation:f,dragDirectionLock:g,onDirectionLock:m,onDrag:v}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:y}=d;if(g&&this.currentDirection===null){this.currentDirection=ld(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,y),this.updateAxis("y",d.point,y),this.visualElement.render(),v&&v(h,d)},l=(h,d)=>{this.latestPointerEvent=h,this.latestPanInfo=d,this.stop(h,d),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>ot(h=>this.getAnimationState(h)==="paused"&&this.getAxisMotionValue(h).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new qo(e,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:Go(this.visualElement)})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!i||!s)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&B.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Ee(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=td(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&Ft(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=ed(s.layoutBox,e):this.constraints=!1,this.elastic=rd(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&ot(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=id(s.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Ft(e))return!1;const s=e.current;yt(s!==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:i}=this.visualElement;if(!i||!i.layout)return!1;const r=ch(s,i.root,this.visualElement.getTransformPagePoint());let o=nd(i.layout.layoutBox,r);if(n){const a=n(oh(o));this.hasMutatedConstraints=!!a,a&&(o=Ro(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=ot(c=>{if(!Ee(c,n,this.currentDirection))return;let h=l&&l[c]||{};o&&(h={min:0,max:0});const d=i?200:1e6,f=i?40:1e7,g={type:"inertia",velocity:s?e[c]:0,bounceStiffness:d,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(c,g)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return zn(this.visualElement,e),s.start(As(e,s,0,n,this.visualElement,!1))}stopAnimation(){ot(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){ot(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){ot(n=>{const{drag:s}=this.getProps();if(!Ee(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];r.set(e[n]-F(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Ft(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};ot(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=sd({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),ot(o=>{if(!Ee(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(F(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;od.set(this.visualElement,this);const e=this.visualElement.current,n=oe(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();Ft(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,r=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),B.read(s);const o=ye(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(ot(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 e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=Un,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function Ee(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function ld(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class cd extends St{constructor(e){super(e),this.removeGroupControls=lt,this.removeListeners=lt,this.controls=new ad(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||lt}unmount(){this.removeGroupControls(),this.removeListeners()}}const Di=t=>(e,n)=>{t&&B.postRender(()=>t(e,n))};class ud extends St{constructor(){super(...arguments),this.removePointerDownListener=lt}onPointerDown(e){this.session=new qo(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Go(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Di(e),onStart:Di(n),onMove:s,onEnd:(r,o)=>{delete this.session,i&&B.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=oe(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Oe={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ji(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const ne={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(M.test(t))t=parseFloat(t);else return t;const n=ji(t,e.target.x),s=ji(t,e.target.y);return`${n}% ${s}%`}},hd={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=Ct.parse(t);if(i.length>5)return s;const r=Ct.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const u=F(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),r(i)}};let gn=!1;class dd extends w.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;ju(fd),r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),gn&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),Oe.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,{projection:o}=s;return o&&(o.isPresent=r,gn=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==r?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||B.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),vs.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;gn=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Xo(t){const[e,n]=vo(),s=w.useContext(Xn);return b.jsx(dd,{...t,layoutGroup:s,switchLayoutGroup:w.useContext(ko),isPresent:e,safeToRemove:n})}const fd={borderRadius:{...ne,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ne,borderTopRightRadius:ne,borderBottomLeftRadius:ne,borderBottomRightRadius:ne,boxShadow:hd};function md(t,e,n){const s=Z(t)?t:Gt(t);return s.start(As("",s,e,n)),s.animation}const pd=(t,e)=>t.depth-e.depth;class gd{constructor(){this.children=[],this.isDirty=!1}add(e){Qn(this.children,e),this.isDirty=!0}remove(e){ts(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(pd),this.isDirty=!1,this.children.forEach(e)}}function yd(t,e){const n=tt.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(_t(s),t(r-e))};return B.setup(s,!0),()=>_t(s)}const Zo=["TopLeft","TopRight","BottomLeft","BottomRight"],vd=Zo.length,Li=t=>typeof t=="string"?parseFloat(t):t,Oi=t=>typeof t=="number"||M.test(t);function xd(t,e,n,s,i,r){i?(t.opacity=F(0,n.opacity??1,bd(s)),t.opacityExit=F(e.opacity??1,0,wd(s))):r&&(t.opacity=F(e.opacity??1,n.opacity??1,s));for(let o=0;o<vd;o++){const a=`border${Zo[o]}Radius`;let l=Ii(e,a),u=Ii(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Oi(l)===Oi(u)?(t[a]=Math.max(F(Li(l),Li(u),s),0),(mt.test(u)||mt.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=F(e.rotate||0,n.rotate||0,s))}function Ii(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const bd=Jo(0,.5,Ir),wd=Jo(.5,.95,lt);function Jo(t,e,n){return s=>s<t?0:s>e?1:n(de(t,e,s))}function Bi(t,e){t.min=e.min,t.max=e.max}function st(t,e){Bi(t.x,e.x),Bi(t.y,e.y)}function Ni(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Fi(t,e,n,s,i){return t-=e,t=We(t,1/n,s),i!==void 0&&(t=We(t,1/i,s)),t}function _d(t,e=0,n=1,s=.5,i,r=t,o=t){if(mt.test(e)&&(e=parseFloat(e),e=F(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=F(r.min,r.max,s);t===r&&(a-=e),t.min=Fi(t.min,e,n,a,i),t.max=Fi(t.max,e,n,a,i)}function $i(t,e,[n,s,i],r,o){_d(t,e[n],e[s],e[i],e.scale,r,o)}const Cd=["x","scaleX","originX"],Sd=["y","scaleY","originY"];function zi(t,e,n,s){$i(t.x,e,Cd,n?n.x:void 0,s?s.x:void 0),$i(t.y,e,Sd,n?n.y:void 0,s?s.y:void 0)}function Wi(t){return t.translate===0&&t.scale===1}function Qo(t){return Wi(t.x)&&Wi(t.y)}function Ui(t,e){return t.min===e.min&&t.max===e.max}function Td(t,e){return Ui(t.x,e.x)&&Ui(t.y,e.y)}function Ki(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function ta(t,e){return Ki(t.x,e.x)&&Ki(t.y,e.y)}function Hi(t){return J(t.x)/J(t.y)}function Gi(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Pd{constructor(){this.members=[]}add(e){Qn(this.members,e),e.scheduleRender()}remove(e){if(ts(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const r=this.members[i];if(r.isPresent!==!1){s=r;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Md(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=n?.z||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:h,rotateY:d,skewX:f,skewY:g}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),h&&(s+=`rotateX(${h}deg) `),d&&(s+=`rotateY(${d}deg) `),f&&(s+=`skewX(${f}deg) `),g&&(s+=`skewY(${g}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const yn=["","X","Y","Z"],Ed=1e3;let Ad=0;function vn(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function ea(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Fo(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",B,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&ea(s)}function na({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e?.()){this.id=Ad++,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.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(Rd),this.nodes.forEach(Od),this.nodes.forEach(Id),this.nodes.forEach(Dd)},this.resolvedRelativeTargetAt=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 gd)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new ns),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=yo(o)&&!vu(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),t){let c,h=0;const d=()=>this.root.updateBlockedByResize=!1;B.read(()=>{h=window.innerWidth}),t(o,()=>{const f=window.innerWidth;f!==h&&(h=f,this.root.updateBlockedByResize=!0,c&&c(),c=yd(d,250),Oe.hasAnimatedSinceResize&&(Oe.hasAnimatedSinceResize=!1,this.nodes.forEach(Xi)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:d,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||zd,{onLayoutAnimationStart:m,onLayoutAnimationComplete:v}=u.getProps(),y=!this.targetLayout||!ta(this.targetLayout,f),x=!h&&d;if(this.options.layoutRoot||this.resumeFrom||x||h&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const p={...gs(g,"layout"),onPlay:m,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(p.delay=0,p.type=!1),this.startAnimation(p),this.setAnimationOrigin(c,x)}else h||Xi(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}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(),_t(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(Bd),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&&ea(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(qi);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Yi);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ld),this.nodes.forEach(kd),this.nodes.forEach(Vd)):this.nodes.forEach(Yi),this.clearAllSnapshots();const a=tt.now();G.delta=gt(0,1e3/60,a-G.timestamp),G.timestamp=a,G.isProcessing=!0,on.update.process(G),on.preRender.process(G),on.render.process(G),G.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,vs.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(jd),this.sharedNodes.forEach(Nd)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,B.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){B.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!J(this.snapshot.measuredBox.x)&&!J(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.layoutCorrected=W(),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=s(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(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Qo(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||Et(this.latestValues)||c)&&(i(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)),Wd(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return W();const a=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Ud))){const{scroll:u}=this.root;u&&($t(a.x,u.offset.x),$t(a.y,u.offset.y))}return a}removeElementScroll(o){const a=W();if(st(a,o),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:h}=u;u!==this.root&&c&&h.layoutScroll&&(c.wasRoot&&st(a,o),$t(a.x,c.offset.x),$t(a.y,c.offset.y))}return a}applyTransform(o,a=!1){const l=W();st(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&&zt(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Et(c.latestValues)&&zt(l,c.latestValues)}return Et(this.latestValues)&&zt(l,this.latestValues),l}removeTransform(o){const a=W();st(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Et(u.latestValues))continue;Bn(u.latestValues)&&u.updateSnapshot();const c=W(),h=u.measurePageBox();st(c,h),zi(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Et(this.latestValues)&&zi(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!==G.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){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||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!(!this.layout||!(c||h))){if(this.resolvedRelativeTargetAt=G.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=W(),this.relativeTargetOrigin=W(),le(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),st(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=W(),this.targetWithTransforms=W()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Xh(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):st(this.target,this.layout.layoutBox),jo(this.target,this.targetDelta)):st(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=W(),this.relativeTargetOrigin=W(),le(this.relativeTargetOrigin,this.target,d.target),st(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Bn(this.parent.latestValues)||Do(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===G.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;st(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,d=this.treeScale.y;lh(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=W());const{target:f}=o;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ni(this.prevProjectionDelta.x,this.projectionDelta.x),Ni(this.prevProjectionDelta.y,this.projectionDelta.y)),ae(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==d||!Gi(this.projectionDelta.x,this.prevProjectionDelta.x)||!Gi(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Wt(),this.projectionDelta=Wt(),this.projectionDeltaWithTransform=Wt()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=Wt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=W(),f=l?l.source:void 0,g=this.layout?this.layout.source:void 0,m=f!==g,v=this.getStack(),y=!v||v.members.length<=1,x=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some($d));this.animationProgress=0;let p;this.mixTargetDelta=_=>{const S=_/1e3;Zi(h.x,o.x,S),Zi(h.y,o.y,S),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(le(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Fd(this.relativeTarget,this.relativeTargetOrigin,d,S),p&&Td(this.relativeTarget,p)&&(this.isProjectionDirty=!1),p||(p=W()),st(p,this.relativeTarget)),m&&(this.animationValues=c,xd(c,u,this.latestValues,S,x,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(_t(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=B.update(()=>{Oe.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Gt(0)),this.currentAnimation=md(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},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(Ed),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&&sa(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||W();const h=J(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const d=J(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}st(a,l),zt(a,c),ae(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Pd),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(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.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&&vn("z",o,u,this.animationValues);for(let c=0;c<yn.length;c++)vn(`rotate${yn[c]}`,o,u,this.animationValues),vn(`skew${yn[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=Le(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=Le(a?.pointerEvents)||""),this.hasProjected&&!Et(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=Md(this.projectionDeltaWithTransform,this.treeScale,c);l&&(h=l(c,h)),o.transform=h;const{x:d,y:f}=this.projectionDelta;o.transformOrigin=`${d.origin*100}% ${f.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 g in ge){if(c[g]===void 0)continue;const{correct:m,applyTo:v,isCSSVariable:y}=ge[g],x=h==="none"?c[g]:m(c[g],u);if(v){const p=v.length;for(let _=0;_<p;_++)o[v[_]]=x}else y?this.options.visualElement.renderState.vars[g]=x:o[g]=x}this.options.layoutId&&(o.pointerEvents=u===this?Le(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(qi),this.root.sharedNodes.clear()}}}function kd(t){t.updateLayout()}function Vd(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,r=e.source!==t.layout.source;i==="size"?ot(c=>{const h=r?e.measuredBox[c]:e.layoutBox[c],d=J(h);h.min=n[c].min,h.max=h.min+d}):sa(i,e.layoutBox,n)&&ot(c=>{const h=r?e.measuredBox[c]:e.layoutBox[c],d=J(n[c]);h.max=h.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[c].max=t.relativeTarget[c].min+d)});const o=Wt();ae(o,n,e.layoutBox);const a=Wt();r?ae(a,t.applyTransform(s,!0),e.measuredBox):ae(a,n,e.layoutBox);const l=!Qo(o);let u=!1;if(!t.resumeFrom){const c=t.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:h,layout:d}=c;if(h&&d){const f=W();le(f,e.layoutBox,h.layoutBox);const g=W();le(g,n,d.layoutBox),ta(f,g)||(u=!0),c.options.layoutRoot&&(t.relativeTarget=g,t.relativeTargetOrigin=f,t.relativeParent=c)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Rd(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Dd(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function jd(t){t.clearSnapshot()}function qi(t){t.clearMeasurements()}function Yi(t){t.isLayoutDirty=!1}function Ld(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Xi(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Od(t){t.resolveTargetDelta()}function Id(t){t.calcProjection()}function Bd(t){t.resetSkewAndRotation()}function Nd(t){t.removeLeadSnapshot()}function Zi(t,e,n){t.translate=F(e.translate,0,n),t.scale=F(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ji(t,e,n,s){t.min=F(e.min,n.min,s),t.max=F(e.max,n.max,s)}function Fd(t,e,n,s){Ji(t.x,e.x,n.x,s),Ji(t.y,e.y,n.y,s)}function $d(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const zd={duration:.45,ease:[.4,0,.1,1]},Qi=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),tr=Qi("applewebkit/")&&!Qi("chrome/")?Math.round:lt;function er(t){t.min=tr(t.min),t.max=tr(t.max)}function Wd(t){er(t.x),er(t.y)}function sa(t,e,n){return t==="position"||t==="preserve-aspect"&&!Yh(Hi(e),Hi(n),.2)}function Ud(t){return t!==t.root&&t.scroll?.wasRoot}const Kd=na({attachResizeListener:(t,e)=>ye(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),xn={current:void 0},ia=na({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!xn.current){const t=new Kd({});t.mount(window),t.setOptions({layoutScroll:!0}),xn.current=t}return xn.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Hd={pan:{Feature:ud},drag:{Feature:cd,ProjectionNode:ia,MeasureLayout:Xo}};function nr(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,r=s[i];r&&B.postRender(()=>r(e,Ce(e)))}class Gd extends St{mount(){const{current:e}=this.node;e&&(this.unmount=fu(e,(n,s)=>(nr(this.node,s,"Start"),i=>nr(this.node,i,"End"))))}unmount(){}}class qd extends St{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!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=be(ye(this.node.current,"focus",()=>this.onFocus()),ye(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function sr(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),r=s[i];r&&B.postRender(()=>r(e,Ce(e)))}class Yd extends St{mount(){const{current:e}=this.node;e&&(this.unmount=yu(e,(n,s)=>(sr(this.node,s,"Start"),(i,{success:r})=>sr(this.node,i,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Kn=new WeakMap,bn=new WeakMap,Xd=t=>{const e=Kn.get(t.target);e&&e(t)},Zd=t=>{t.forEach(Xd)};function Jd({root:t,...e}){const n=t||document;bn.has(n)||bn.set(n,{});const s=bn.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Zd,{root:t,...e})),s[i]}function Qd(t,e,n){const s=Jd(e);return Kn.set(t,n),s.observe(t),()=>{Kn.delete(t),s.unobserve(t)}}const tf={some:0,all:1};class ef extends St{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r}=e,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:tf[i]},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(),d=u?c:h;d&&d(l)};return Qd(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(nf(e,n))&&this.startObserver()}unmount(){}}function nf({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const sf={inView:{Feature:ef},tap:{Feature:Yd},focus:{Feature:qd},hover:{Feature:Gd}},rf={layout:{ProjectionNode:ia,MeasureLayout:Xo}},of={...Wh,...sf,...Hd,...rf},ks=rh(of,vh),af="_primary_13825_8",lf="_secondary_13825_12",cf="_tertiary_13825_16",uf="_positive_13825_20",hf="_negative_13825_24",df="_warning_13825_28",ff="_accent_13825_32",mf="_inverse_13825_36",pf="_text_13825_111",gf="_regular_13825_117",yf="_medium_13825_121",vf="_semibold_13825_125",xf="_bold_13825_129",Ae={primary:af,secondary:lf,tertiary:cf,positive:uf,negative:hf,warning:df,accent:ff,inverse:mf,"title-1":"_title-1_13825_41","title-2":"_title-2_13825_51","title-3":"_title-3_13825_61","headline-1":"_headline-1_13825_76","headline-2":"_headline-2_13825_81","headline-3":"_headline-3_13825_86","body-1":"_body-1_13825_91","body-2":"_body-2_13825_96","caption-1":"_caption-1_13825_101","caption-2":"_caption-2_13825_106",text:pf,regular:gf,medium:yf,semibold:vf,bold:xf},bf=t=>{let e;t.center?e="center":t.left?e="left":t.right&&(e="right");let n;return t.uppercase?n="uppercase":t.lowercase?n="lowercase":t.capitalize&&(n="capitalize"),X({marginTop:t.mt,marginBottom:t.mb,marginRight:t.mr,marginLeft:t.ml,flex:t.flex,cursor:t.cursor,wordBreak:t.wordBreak,whiteSpace:t.whiteSpace,textOverflow:t.textOverflow,textDecoration:t.decoration,textAlign:e,textTransform:n,color:t.color,opacity:t.disabled?.5:void 0,overflow:t.overflow})},O=w.forwardRef((t,e)=>{const{children:n,className:s,variant:i="body-1",fontWeight:r="medium",tag:o="p",colorName:a="primary",style:l,clickOpacity:u=.5,opacityDuration:c=200,onClick:h,disabled:d,...f}=t,[g,m]=w.useState(!1),v=!!h,y=()=>v&&m(!0),x=()=>v&&m(!1),p=o,_=v?X({opacity:g?u:1,transition:`opacity ${c}ms ease`}):"";return b.jsx(p,{ref:e,...f,className:I(Ae.text,Ae[i],Ae[a],Ae[r],_,s,bf(t)),style:l,onClick:h,onMouseDown:y,onMouseUp:x,onMouseLeave:x,onTouchStart:y,onTouchEnd:x,role:v?"button":void 0,tabIndex:v?0:void 0,children:n})});O.displayName="Text";const ra=ks(O),wf="_loader_1qleq_8",_f={loader:wf},Cf=({color:t="var(--text-accent)"})=>b.jsx("span",{className:I(_f.loader,X({"--loader-color":t}))}),Sf=X({display:"flex",alignItems:"center",justifyContent:"center",position:"relative",borderRadius:16,height:48,padding:"0 16px",cursor:"pointer",fontSize:16,fontWeight:600,overflow:"hidden",transition:"all 0.2s ease",gap:8}),se={zero:"var(--corner-zero)",xs:"var(--corner-xs)",sm:"var(--corner-sm)",md:"var(--corner-md)",lg:"var(--corner-lg)",xl:"var(--corner-xl)","2xl":"var(--corner-2xl)","3xl":"var(--corner-3xl)","4xl":"var(--corner-4xl)","5xl":"var(--corner-5xl)","6xl":"var(--corner-6xl)","full-round":"var(--corner-full-round)"},Tf={xs:"var(--height-button-xs)",sm:"var(--height-button-sm)",md:"var(--height-button-md)",lg:"var(--height-button-lg)"},Pf={clear:X({backgroundColor:"transparent",border:"none"}),filled:X({backgroundColor:"var(--fill-accent-primary)",color:"white",border:"none"}),outline:X({backgroundColor:"transparent",border:"1px solid var(--border-accent-primary)"})},Mf=(t,e,n,s)=>{if(s)return X({cursor:"not-allowed",opacity:.7});const i={transition:"all 0.2s ease",borderRadius:"var(--corner-lg)",border:"none",color:t==="filled"?"var(--text-inverse)":`var(--text-${e})`};switch(t){case"filled":return X({...i,backgroundColor:`var(--fill-${e}-${n})`,":hover":{backgroundColor:`var(--fill-${e}-${n}-hover)`},":active":{backgroundColor:`var(--fill-${e}-${n}-hover)`}});case"outline":return X({...i,backgroundColor:"transparent",border:`1px solid var(--border-${e}-${n})`,":hover":{backgroundColor:`var(--fill-${e}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${e}-secondary-hover)`}});case"clear":return X({...i,backgroundColor:"transparent",":hover":{backgroundColor:`var(--fill-${e}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${e}-secondary-hover)`}});default:return X(i)}},Ef=({disabled:t,loading:e,onClick:n,wrapperClassName:s,buttonClassName:i,buttonDisabledClassName:r,textClassName:o,children:a,variant:l="filled",backgroundColor:u,textColor:c,textFontWeight:h,borderColor:d,color:f="accent",borderRadius:g,width:m="full",size:v="md",iconLeft:y,iconRight:x,intensity:p="primary",..._})=>{const S=w.useMemo(()=>{switch(m){case"full":return"100%";case"auto":return"auto";default:return m}},[m]),P=w.useMemo(()=>u||(l==="filled"?f==="neutral"?"var(--fill-neutral-secondary)":`var(--fill-${f}-${p})`:"transparent"),[l,t,u,f,p]),C=w.useMemo(()=>{if(p==="primary"){if(f==="neutral")return"var(--text-secondary)";if(l==="filled")return"var(--text-inverse)"}else if(f==="neutral")return"var(--text-secondary)";return`var(--text-${f})`},[p,f,l]),T=w.useMemo(()=>{if(p==="primary"){if(f==="neutral")return"secondary";if(l==="filled")return"inverse"}else if(f==="neutral")return"secondary";return f},[l,t,c,f,p]),E=w.useMemo(()=>d||(l==="outline"?`var(--border-${f}-${p})`:"transparent"),[l,d,f,p]),L=w.useMemo(()=>{switch(v){case"lg":return se.lg;case"md":case"sm":return se.md;case"xs":return se.sm;default:return se.md}},[v]),Q=I(Sf,Mf(l,f,p,t),Pf[l],i,t?r:void 0,X({borderRadius:g?se[g]:L,backgroundColor:P,borderColor:E,color:c,width:"100%",height:Tf[v],opacity:t?.7:1})),pt=w.useMemo(()=>{switch(v){case"lg":case"md":return"body-1";case"sm":case"xs":return"body-2";default:return"body-1"}},[v]);return b.jsx(A,{className:I(s),w:S,relative:!0,overflow:"hidden",children:b.jsxs(ks.button,{whileTap:!t&&!e?{scale:.99,boxShadow:"inset 0 0 0 10000px rgba(0,0,0,0.1)",transition:{duration:0}}:{},className:Q,disabled:t||e,onClick:n,..._,children:[e?b.jsx(Cf,{color:C}):b.jsxs(b.Fragment,{children:[y,b.jsx(ra,{style:{color:c},colorName:T,variant:pt,className:o,textOverflow:"ellipsis",overflow:"hidden",children:a}),x]}),b.jsx(xe,{})]})})},Af=t=>k.createElement("svg",{viewBox:"0 0 24 24",fill:"none",...t},k.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z",fill:"currentColor"})),kf=t=>k.createElement("svg",{viewBox:"0 0 24 24",fill:"none",...t},k.createElement("path",{d:"M19 13H5v-2h14v2z",fill:"currentColor"})),Vf="_checkbox_1hy9q_8",Rf="_disabled_1hy9q_15",Df="_checkbox__input_1hy9q_27",jf="_checkbox__box_1hy9q_35",Mt={checkbox:Vf,disabled:Rf,checkbox__input:Df,checkbox__box:jf,"checkbox__box--checked":"_checkbox__box--checked_1hy9q_51"},Lf={sm:20,md:24},Vs=w.forwardRef(({checked:t,onChange:e,disabled:n,indeterminate:s,size:i="md",title:r,titleColor:o,subtitle:a,subtitleColor:l="secondary",name:u,value:c,required:h},d)=>{const[f,g]=w.useState(!1),m=t!==void 0,v=m?t:f,y=_=>{m||g(_.target.checked),e?.(_)},x=Lf[i],p=v||s;return b.jsxs("label",{className:I(Mt.checkbox,{[Mt.disabled]:n}),children:[b.jsxs(A,{relative:!0,display:"inline-flex",style:{"--checkbox-size":`${x}px`,"--checkbox-size-double":`${x*2}px`},children:[b.jsx("input",{ref:d,type:"checkbox",checked:v,onChange:y,onClick:_=>_.stopPropagation(),disabled:n,name:u,value:c,required:h,className:I(Mt.checkbox__input,{[Mt.disabled]:n})}),b.jsx("div",{className:I(Mt.checkbox__box,p&&Mt["checkbox__box--checked"],{[Mt.disabled]:n}),children:p&&(s?b.jsx(kf,{width:x*.75,height:x*.75}):b.jsx(Af,{width:x*.75,height:x*.75}))})]}),(r||a)&&b.jsxs(A,{gap:4,children:[r&&b.jsx(O,{colorName:o,variant:i==="sm"?"body-2":"body-1",children:r}),a&&b.jsx(O,{variant:"body-2",colorName:l,children:a})]})]})});Vs.displayName="Checkbox";const Of=t=>k.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},k.createElement("g",{opacity:.5},k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.0002 17.9999C14.4185 17.9999 18.0002 14.4182 18.0002 9.99991C18.0002 5.58163 14.4185 1.99991 10.0002 1.99991C5.58197 1.99991 2.00024 5.58163 2.00024 9.99991C2.00024 14.4182 5.58197 17.9999 10.0002 17.9999ZM6.46514 6.46446C6.85566 6.07393 7.48883 6.07393 7.87935 6.46446L9.64712 8.23222C9.84238 8.42749 10.159 8.42749 10.3542 8.23222L12.122 6.46446C12.5125 6.07393 13.1457 6.07393 13.5362 6.46446C13.9267 6.85498 13.9267 7.48814 13.5362 7.87867L11.7684 9.64644C11.5732 9.8417 11.5732 10.1583 11.7684 10.3535L13.5362 12.1213C13.9267 12.5118 13.9267 13.145 13.5362 13.5355C13.1457 13.926 12.5125 13.926 12.122 13.5355L10.3542 11.7678C10.159 11.5725 9.84238 11.5725 9.64712 11.7678L7.87935 13.5355C7.48883 13.926 6.85566 13.926 6.46514 13.5355C6.07462 13.145 6.07462 12.5118 6.46514 12.1213L8.23291 10.3535C8.42817 10.1583 8.42817 9.8417 8.23291 9.64644L6.46514 7.87867C6.07462 7.48815 6.07462 6.85498 6.46514 6.46446Z",fill:"currentColor"}))),If="_disabled_j0s55_20",Bf="_multiline_j0s55_24",Nf="_input_j0s55_8",Ff="_sm_j0s55_64",$f="_md_j0s55_69",zf="_error_j0s55_74",Wf="_white_j0s55_78",Uf="_gray_j0s55_82",it={"input-container":"_input-container_j0s55_8",disabled:If,multiline:Bf,input:Nf,"input-text-size_sm":"_input-text-size_sm_j0s55_55","input-text-size_md":"_input-text-size_md_j0s55_59",sm:Ff,md:$f,error:zf,white:Wf,gray:Uf,"clear-button":"_clear-button_j0s55_86"};function ir(t){return{...new Event("input",{bubbles:!0}),target:t,currentTarget:t}}const oa=w.forwardRef((t,e)=>{const{label:n,prompt:s,error:i,errorText:r,size:o="md",prefix:a,suffix:l,background:u="white",showClearButton:c,disabled:h,value:d,defaultValue:f,...g}=t,m=t.multiline===!0,v=w.useRef(null),y=w.useRef(null),[x,p]=Ge(d!==void 0?String(d):void 0,f!==void 0?String(f):"");w.useImperativeHandle(e,()=>({focus:()=>{v.current?.focus(),y.current?.focus()},blur:()=>{v.current?.blur(),y.current?.blur()},get value(){return v.current?.value||y.current?.value}}));const _=C=>{if(p(C.target.value),m){const T=t.onChange;T?.(C)}else{const T=t.onChange;T?.(C)}};w.useEffect(()=>{m&&t.autoResize&&y.current&&(y.current.style.height="auto",y.current.style.height=`${y.current.scrollHeight}px`)},[x,m,t.autoResize]);const S=()=>{if(p(""),!m){const T=v.current;if(T){T.value="";const E=ir(T),L=t.onChange;L?.(E)}return}const C=y.current;if(C){C.value="";const T=ir(C),E=t.onChange;E?.(T)}},P=()=>{if(m){const{rows:L,autoResize:Q,onChange:pt,multiline:Tt,...xt}=g;return b.jsx("textarea",{ref:y,rows:t.rows??3,className:I(it.input,{[it.disabled]:h}),disabled:h,maxLength:t.maxLength,...xt,value:x,onChange:_})}const{onChange:C,multiline:T,...E}=g;return b.jsx("input",{...E,ref:v,className:I(it.input,it[`input-text-size_${o}`],{[it.disabled]:h}),disabled:h,type:t.type??"text",value:x,onChange:_})};return b.jsxs(A,{w:"full",gap:"var(--spacing-sm)",children:[n&&b.jsx(O,{variant:"body-2",fontWeight:"regular",colorName:i?"negative":"tertiary",children:n}),b.jsxs(A,{row:!0,alignItems:m?"flex-start":"center",w:"full",gap:"var(--spacing-md)",className:I(it["input-container"],it[u],it[o],{[it.error]:i,[it.disabled]:h,[it.multiline]:m}),children:[a&&b.jsx(A,{flex:"none",children:a}),b.jsx(A,{flex:"1",children:P()}),c&&x&&!h&&b.jsx(A,{flex:"none",children:b.jsx("span",{className:it["clear-button"],onClick:S,children:b.jsx(Of,{})})}),l&&b.jsx(A,{flex:"none",children:l})]}),(s||m)&&b.jsxs(A,{row:!0,gap:10,w:"full",children:[typeof s=="string"?b.jsx(O,{variant:"caption-1",colorName:"tertiary",children:s}):s,m&&t.maxLength&&b.jsx(O,{right:!0,ml:"auto",flex:"none",variant:"caption-1",colorName:"tertiary",children:`${x.length}/${t.maxLength}`})]}),r&&i&&b.jsx(O,{variant:"body-2",colorName:"negative",fontWeight:"regular",children:r})]})});oa.displayName="Input";const Kf=t=>k.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},k.createElement("path",{d:"M6 9L12 15L18 9",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Hf=t=>k.createElement("svg",{fill:"currentColor",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 462.035 462.035",xmlSpace:"preserve",...t},k.createElement("g",null,k.createElement("path",{d:"M457.83,158.441c-0.021-0.028-0.033-0.058-0.057-0.087l-50.184-62.48c-0.564-0.701-1.201-1.305-1.879-1.845 c-2.16-2.562-5.355-4.225-8.967-4.225H65.292c-3.615,0-6.804,1.661-8.965,4.225c-0.678,0.54-1.316,1.138-1.885,1.845l-50.178,62.48 c-0.023,0.029-0.034,0.059-0.057,0.087C1.655,160.602,0,163.787,0,167.39v193.07c0,6.5,5.27,11.771,11.77,11.771h438.496 c6.5,0,11.77-5.271,11.77-11.771V167.39C462.037,163.787,460.381,160.602,457.83,158.441z M408.516,134.615l16.873,21.005h-16.873 V134.615z M384.975,113.345v42.274H296.84c-2.514,0-4.955,0.805-6.979,2.293l-58.837,43.299l-58.849-43.305 c-2.023-1.482-4.466-2.287-6.978-2.287H77.061v-42.274H384.975z M53.523,155.62H36.65l16.873-21.005V155.62z M438.498,348.69H23.54 V179.16h137.796l62.711,46.148c4.15,3.046,9.805,3.052,13.954-0.005l62.698-46.144h137.799V348.69L438.498,348.69z"}))),Gf="_avatar_1oe2p_8",qf="_avatar_primary_1oe2p_22",Yf="_avatar_secondary_1oe2p_25",Xf="_avatar_negative_1oe2p_28",Zf="_avatar_positive_1oe2p_31",Jf="_avatar_warning_1oe2p_34",Qf="_avatar_lgSize_1oe2p_71",tm="_avatar_mdSize_1oe2p_85",em="_avatar_smSize_1oe2p_99",wn={avatar:Gf,avatar_primary:qf,avatar_secondary:Yf,avatar_negative:Xf,avatar_positive:Zf,avatar_warning:Jf,avatar_lgSize:Qf,avatar_mdSize:tm,avatar_smSize:em};function nm({attr:t,children:e,className:n,color:s="primary",size:i="md",...r}){const o="avatar";return b.jsx("div",{...t,...r,className:At(wn[o],n,he(wn,o,i),qe(wn,o,s)),children:e})}const sm=t=>k.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},k.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.15}),k.createElement("path",{d:"M16 9L10.0337 15L8 12.9548",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),rr=t=>k.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},k.createElement("path",{d:"M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",fill:"currentColor",fillOpacity:.15}),k.createElement("path",{d:"M12 6C11.4477 6 11 6.44772 11 7V13C11 13.5523 11.4477 14 12 14C12.5523 14 13 13.5523 13 13V7C13 6.44772 12.5523 6 12 6Z",fill:"currentColor"}),k.createElement("path",{d:"M12 15C11.4477 15 11 15.4477 11 16V17C11 17.5523 11.4477 18 12 18C12.5523 18 13 17.5523 13 17V16C13 15.4477 12.5523 15 12 15Z",fill:"currentColor"})),im=t=>k.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},k.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.12}),k.createElement("path",{d:"M16 8L8 16M16 16L8 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),rm=t=>k.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"black",...t},k.createElement("path",{d:"M12 2V22M19.0711 4.92893L4.92893 19.0711M22 12H2M19.0711 19.0711L4.92893 4.92893",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),om="_hint_prca1_8",am="_md_prca1_19",lm="_sm_prca1_24",cm="_icon_prca1_29",um="_content_prca1_40",hm="_title_prca1_46",dm="_subtitle_prca1_50",fm="_disabled_prca1_55",mm="_warning_prca1_60",pm="_solid_prca1_60",gm="_negative_prca1_65",ym="_positive_prca1_70",vm="_accent_prca1_75",xm="_neutral_prca1_80",bm="_soft_prca1_85",rt={hint:om,md:am,sm:lm,icon:cm,content:um,title:hm,subtitle:dm,disabled:fm,warning:mm,solid:pm,negative:gm,positive:ym,accent:vm,neutral:xm,soft:bm},wm={negative:b.jsx(im,{}),positive:b.jsx(sm,{}),accent:b.jsx(rr,{}),warning:b.jsx(rr,{}),neutral:b.jsx(rm,{})},_m=({title:t,subtitle:e,color:n="warning",variant:s="soft",size:i="md",icon:r,disabled:o=!1,className:a,style:l})=>{const u=r||wm[n];return b.jsxs("div",{className:At(rt.hint,rt[n],rt[s],rt[i],o&&rt.disabled,a),style:l,"aria-disabled":o,children:[u&&b.jsx("span",{className:At(rt.icon,rt[n]),children:u}),b.jsxs("div",{className:rt.content,children:[t&&b.jsx(O,{className:At(rt.title,he(rt,"title",i)),variant:i==="md"?"body-1":"caption-2",children:t}),e&&b.jsx(O,{className:At(rt.subtitle,he(rt,"subtitle",i)),variant:i==="md"?"body-2":"caption-1",children:e})]})]})},Cm={primary:{bg:"var(--status-neutral-tint-low)",color:"var(--text-primary)"},accent:{bg:"var(--status-accent-tint-low)",color:"var(--text-accent)"},warning:{bg:"var(--status-warning-tint-low)",color:"var(--text-warning)"},positive:{bg:"var(--status-positive-tint-low)",color:"var(--text-positive)"},negative:{bg:"var(--status-negative-tint-low)",color:"var(--text-negative)"}},Sm={sm:28,md:32,lg:40},Rs=w.forwardRef(({label:t,color:e="primary",size:n="md",onClick:s,onDelete:i,avatar:r,icon:o,disabled:a,className:l},u)=>{const c=w.useRef(null),h=Cm[e],d=X({cursor:a?"not-allowed":s?"pointer":"default",opacity:a?.5:1,userSelect:"none",position:"relative",transition:"background-color 0.2s, opacity 0.2s","&:hover":a?void 0:{backgroundColor:h.bg}}),f=X({cursor:"pointer",opacity:.6,"&:hover":{opacity:1}});return b.jsxs(A,{ref:g=>{c.current=g,typeof u=="function"?u(g):u&&(u.current=g)},row:!0,alignItems:"center",gap:6,px:10,py:4,h:Sm[n],maxWidth:196,overflow:"hidden",borderRadius:"var(--corner-sm)",backgroundColor:h.bg,color:h.color,onClick:s,className:I(d,l),children:[s&&b.jsx(xe,{}),r&&b.jsx(A,{w:20,h:20,borderRadius:"50%",overflow:"hidden",children:r}),o&&b.jsx(A,{children:o}),b.jsx(O,{variant:"caption-1",colorName:e,textOverflow:"ellipsis",children:t}),i&&!a&&b.jsx(O,{className:f,colorName:e,onClick:g=>{g.stopPropagation(),i(g)},children:"×"})]})});Rs.displayName="Tag";const aa=({children:t})=>{const[e]=w.useState(()=>document.createElement("div"));return w.useEffect(()=>{let n=document.getElementById("portal-root");return n||(n=document.createElement("div"),n.id="portal-root",document.body.appendChild(n)),n.appendChild(e),()=>{n&&n.contains(e)&&n.removeChild(e)}},[e]),dr.createPortal(t,e)},Tm="_disabled_6kgqd_40",Pm="_open_6kgqd_48",Mm="_error_6kgqd_51",Em="_hidden_6kgqd_87",Am="_visible_6kgqd_90",km="_selected_6kgqd_163",H={"select-container":"_select-container_6kgqd_8","full-width":"_full-width_6kgqd_13","select-input":"_select-input_6kgqd_17","size-xs":"_size-xs_6kgqd_25","size-sm":"_size-sm_6kgqd_30","size-md":"_size-md_6kgqd_35",disabled:Tm,open:Pm,"select-arrow":"_select-arrow_6kgqd_48",error:Mm,"select-value":"_select-value_6kgqd_62","select-value_xs":"_select-value_xs_6kgqd_74","select-placeholder":"_select-placeholder_6kgqd_81",hidden:Em,visible:Am,"select-arrow_xs":"_select-arrow_xs_6kgqd_106","select-dropdown":"_select-dropdown_6kgqd_116","select-menu":"_select-menu_6kgqd_126","select-menu-item":"_select-menu-item_6kgqd_145","select-menu-item-first":"_select-menu-item-first_6kgqd_158",selected:km,"overflow-tooltip-container":"_overflow-tooltip-container_6kgqd_167","overflow-tooltip-text":"_overflow-tooltip-text_6kgqd_172","empty-block":"_empty-block_6kgqd_179"},Vm={xs:"sm",sm:"md",md:"lg"};function Rm({value:t,onChange:e,multiple:n=!1,returnedValue:s,renderItem:i,placeholder:r,items:o,fullWidth:a,size:l="md",showDefaultItem:u,disabled:c,label:h,firstItem:d,lastItem:f,observer:g,emptyText:m,onBlur:v,error:y,errorText:x}){const[p,_]=Ge(t,n?[]:null),S=w.useRef(null),P=w.useRef(null),[C,T]=w.useState(!1),E=w.useMemo(()=>n?p||[]:p!=null?[p]:[],[p,n]),L=w.useMemo(()=>{const V=new Map;return o.forEach(j=>V.set(s(j),j)),V},[o,s]),Q=Sr(S,C),pt=!o.length&&!y,Tt=V=>{const j=s(V);if(n){const z=E.includes(j)?E.filter(Ot=>Ot!==j):[...E,j];_(z),e?.(z)}else _(j),e?.(j),T(!1)},xt=V=>{if(!n)return;const j=E.filter(z=>z!==V);_(j),e?.(j)},jt=()=>{const V=n?[]:null;_(V),e?.(V),n||T(!1)};w.useEffect(()=>{if(!C)return;const V=j=>{const z=j.target;!S.current?.contains(z)&&!P.current?.contains(z)&&T(!1)};return document.addEventListener("mousedown",V),()=>document.removeEventListener("mousedown",V)},[C]);const Lt=()=>{if(!E.length)return b.jsx(O,{variant:l==="xs"?"caption-1":"body-2",textOverflow:"ellipsis",overflow:"hidden",children:r??"Select..."});if(n)return b.jsx(A,{flexWrap:"wrap",row:!0,gap:10,children:E.map(z=>{const Ot=L.get(z);return Ot?b.jsx(Rs,{size:Vm[l],label:i(Ot),onDelete:fa=>{fa.stopPropagation(),xt(z)}},z):null})});const V=L.get(E[0]);if(!V)return b.jsx(O,{variant:l==="xs"?"caption-1":"body-2",textOverflow:"ellipsis",overflow:"hidden",children:r});const j=i(V);return typeof j=="string"?b.jsx(O,{variant:l==="xs"?"caption-1":"body-2",tag:"p",textOverflow:"ellipsis",overflow:"hidden",children:j}):b.jsx(b.Fragment,{children:j})},$=C&&b.jsx(aa,{children:b.jsx(ks.div,{ref:P,className:H["select-dropdown"],initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.25,ease:"easeInOut"},style:{...Q,position:"absolute",zIndex:1},children:b.jsxs("ul",{className:H["select-menu"],children:[u&&!n&&b.jsx(A,{className:H["select-menu-item"],role:"option",onClick:jt,children:b.jsx(O,{variant:"body-2",children:r})}),d&&b.jsx(A,{className:I(H["select-menu-item"],H["select-menu-item-first"]),children:d}),pt&&b.jsxs(A,{className:H["empty-block"],children:[b.jsx(A,{w:20,h:20,children:b.jsx(Hf,{})}),b.jsx(O,{variant:"body-2",children:m??"There is nothing yet"})]}),o.map(V=>{const j=s(V),z=E.includes(j);return b.jsxs(A,{row:!0,gap:10,alignItems:"center",className:I(H["select-menu-item"],{[H.selected]:z}),role:"option",relative:!0,onClick:()=>Tt(V),children:[n&&b.jsx(Vs,{size:"sm",checked:z}),typeof i(V)=="string"?b.jsx(O,{variant:"body-2",tag:"p",wordBreak:"break-all",whiteSpace:"break-spaces",children:i(V)}):i(V),b.jsx(xe,{})]},j)}),g,f&&b.jsx(A,{className:I(H["select-menu-item"],H["select-menu-item-first"]),children:f})]})},"dropdown")});return b.jsxs(A,{relative:!0,display:"inline-block",minWidth:120,w:a?"full":"auto",children:[typeof h=="string"?b.jsx(O,{variant:"body-2",colorName:"tertiary",fontWeight:"regular",mb:l==="sm"?4:8,children:h}):h,b.jsxs(A,{ref:S,row:!0,gap:10,tabIndex:c?-1:0,role:"button",alignItems:"flex-start","aria-haspopup":"listbox",relative:!0,w:"100%",className:I(H["select-input"],H[`size-${l}`],{[H.error]:y,[H.disabled]:c,[H.open]:C}),onClick:()=>!c&&T(V=>!V),onBlur:v,children:[b.jsx(A,{className:I(H["select-value"]),children:Lt()}),b.jsx(A,{className:I(H["select-arrow"],H[`select-arrow_${l}`]),children:b.jsx(Kf,{})})]}),y&&x&&b.jsx(O,{tag:"p",colorName:"negative",variant:"body-2",mt:5,children:x}),b.jsx(Mu,{initial:!1,children:$})]})}const Dm=t=>k.createElement("svg",{width:10,height:10,viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},k.createElement("path",{d:"M3.94629 0.220237C3.78013 0.264025 3.64089 0.377624 3.56348 0.53176C3.27371 1.11189 3.05664 1.46395 2.83887 1.74953C2.61807 2.03873 2.38547 2.27579 2.03027 2.63039C1.21079 3.45057 0.799805 4.52619 0.799805 5.60012C0.799838 6.67406 1.21073 7.74968 2.03027 8.56985C3.67062 10.2096 6.32931 10.2095 7.96973 8.56985C8.78929 7.74968 9.20016 6.67408 9.2002 5.60012C9.15131 4.32908 8.43217 3.48543 7.94727 3.05813C7.76902 2.90106 7.40643 3.02424 7.2627 3.2134C7.24031 3.24286 7.21612 3.2739 7.18945 3.30617C6.93211 3.61754 6.56236 3.80807 6.41504 3.83156C6.38264 3.83667 6.36979 3.76513 6.2959 3.58254C5.79455 2.34427 5.78927 2.49365 5.58887 2.01125C5.48847 1.7692 5.05517 1.02727 4.92676 0.828635C4.80206 0.635591 4.64095 0.439873 4.43359 0.301292C4.29028 0.205951 4.1124 0.175957 3.94629 0.220237ZM4.75293 4.17824C5.2689 4.63997 5.60857 5.26651 5.71484 5.95071C6.10631 5.85571 6.46727 5.68318 6.78125 5.45071C6.86578 5.70826 6.89338 5.98123 6.8623 6.25051C6.83115 6.51993 6.74174 6.77966 6.60059 7.01125C6.45944 7.24281 6.27008 7.44117 6.04492 7.59231C5.81977 7.74344 5.56462 7.8443 5.29688 7.88723C5.0292 7.93013 4.75518 7.91446 4.49414 7.84133C4.23299 7.76812 3.99064 7.6383 3.78418 7.46242C3.5778 7.28657 3.41161 7.06792 3.29785 6.8218C3.18419 6.57572 3.12519 6.30771 3.125 6.03664C3.12508 5.58233 3.29054 5.14308 3.58984 4.80129C3.88917 4.4597 4.30271 4.2382 4.75293 4.17824Z",fill:"#FEAD34"})),jm=t=>k.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},k.createElement("path",{d:"M10.1483 8.61509C10.3344 8.26159 9.98299 7.89856 9.58534 7.93723C9.42671 7.95265 9.25857 7.9605 9.07422 7.96035C6.36522 7.9582 4.17129 5.76427 4.16914 3.05527C4.169 2.87115 4.17682 2.70321 4.19221 2.54477C4.23082 2.14712 3.86769 1.79411 3.50976 1.97161C2.03398 2.70343 1.20002 4.02274 1.20002 5.89477C1.20002 8.60377 3.3961 10.7998 6.1051 10.7998C7.97571 10.7998 9.38737 10.06 10.1483 8.61509Z",fill:"white"})),Lm="_container_e7tan_8",Om="_disabled_e7tan_17",Im="_reverse_e7tan_21",Bm="_input_e7tan_25",Nm="_switchContainer_e7tan_35",Fm="_variant_accent_e7tan_43",$m="_variant_secondary_e7tan_47",zm="_thumb_e7tan_51",Wm="_variant_theme_e7tan_54",Um="_moon_e7tan_58",Km="_fire_e7tan_61",Hm="_size_sm_e7tan_74",Gm="_size_md_e7tan_80",qm="_size_lg_e7tan_86",ct={container:Lm,disabled:Om,reverse:Im,input:Bm,switchContainer:Nm,variant_accent:Fm,variant_secondary:$m,switch:"_switch_e7tan_35",thumb:zm,variant_theme:Wm,moon:Um,fire:Km,size_sm:Hm,size_md:Gm,size_lg:qm},la=w.forwardRef(({title:t,text:e,icon:n,disabled:s,onChange:i,checked:r,defaultValue:o,className:a,size:l="md",variant:u="accent",reverse:c=!1,w:h="auto",...d},f)=>{const[g,m]=Ge(r,o),v=w.useRef(null);w.useImperativeHandle(f,()=>({focus:()=>{v.current?.focus()},blur:()=>{v.current?.blur()},get checked(){return g??!1},setChecked:_=>{m(_),i?.(_)},toggle:()=>{const _=!g;m(_),i?.(_)},isFocused:()=>document.activeElement===v.current,isDisabled:()=>s??!1,getInputElement:()=>v.current,checkValidity:()=>v.current?.checkValidity()??!0,reset:()=>{const _=o??!1;m(_),i?.(_)}}),[g,m,i,s,o]);const y=w.useCallback(_=>{m(_.target.checked),i?.(_.target.checked)},[i]),x=w.useMemo(()=>typeof t=="string"?b.jsx(O,{variant:"body-1",colorName:"primary",fontWeight:"medium",children:t}):t,[t]),p=w.useMemo(()=>typeof e=="string"?b.jsx(O,{variant:"body-2",colorName:"secondary",fontWeight:"regular",children:e}):e,[e]);return b.jsxs(A,{row:!0,w:h,gap:"var(--spacing-sm)",children:[b.jsxs("label",{className:I(ct.container,a,{[ct.disabled]:s,[ct.reverse]:c}),children:[b.jsxs(A,{className:I(ct.switchContainer,ct[`size_${l}`],ct[`variant_${u}`]),children:[b.jsx("input",{ref:v,type:"checkbox",checked:g,className:ct.input,onChange:y,disabled:s,...d}),b.jsx("div",{className:ct.switch,children:b.jsx("div",{className:ct.thumb,children:u==="theme"&&b.jsxs(b.Fragment,{children:[b.jsx(jm,{className:ct.moon}),b.jsx(Dm,{className:ct.fire})]})})})]}),b.jsxs(A,{gap:"var(--spacing-xs)",children:[x,p]})]}),n]})});la.displayName="Switch";const Ym="_header_446to_8",Xm={header:Ym},ca=w.forwardRef(({title:t,subtitle:e,onClose:n,w:s="full",p:i,py:r,px:o="var(--spacing-2xl)",pt:a="var(--spacing-2xl)",pb:l="var(--spacing-lg)",row:u=!0,justifyContent:c="space-between",showCloseButton:h=!0},d)=>b.jsxs(A,{w:s,p:i,py:r,px:o,pt:a,pb:l,row:u,justifyContent:c,ref:d,className:Xm.header,children:[b.jsxs(A,{gap:"var(--spacing-sm)",children:[b.jsx(O,{variant:"title-3",colorName:"primary",fontWeight:"semibold",children:t}),b.jsx(O,{variant:"body-1",colorName:"tertiary",fontWeight:"medium",children:e})]}),h&&b.jsx(A,{children:b.jsx(Yn,{onClick:n,color:"neutral",children:b.jsx(Cr,{})})})]}));ca.displayName="ModalHeader";const Zm="_footer_1bo08_8",Jm={footer:Zm},ua=w.forwardRef(({children:t,row:e=!0,flex:n=!0,gap:s="var(--spacing-lg)",p:i="var(--spacing-2xl)",className:r,...o},a)=>b.jsx(A,{flex:n,row:e,gap:s,p:i,className:I(Jm.footer,r),ref:a,...o,children:t}));ua.displayName="ModalFooter";function It(t,e,n){let s=n.initialDeps??[],i;function r(){var o,a,l,u;let c;n.key&&((o=n.debug)!=null&&o.call(n))&&(c=Date.now());const h=t();if(!(h.length!==s.length||h.some((g,m)=>s[m]!==g)))return i;s=h;let f;if(n.key&&((a=n.debug)!=null&&a.call(n))&&(f=Date.now()),i=e(...h),n.key&&((l=n.debug)!=null&&l.call(n))){const g=Math.round((Date.now()-c)*100)/100,m=Math.round((Date.now()-f)*100)/100,v=m/16,y=(x,p)=>{for(x=String(x);x.length<p;)x=" "+x;return x};console.info(`%c⏱ ${y(m,5)} /${y(g,5)} ms`,`
|
|
14
14
|
font-size: .6rem;
|
|
15
15
|
font-weight: bold;
|
|
16
|
-
color: hsl(${Math.max(0,Math.min(120-120*v,120))}deg 100% 31%);`,n?.key)}return(u=n?.onChange)==null||u.call(n,i),i}return r.updateDeps=o=>{s=o},r}function or(t,e){if(t===void 0)throw new Error("Unexpected undefined");return t}const Jm=(t,e)=>Math.abs(t-e)<1.01,Qm=(t,e,n)=>{let s;return function(...i){t.clearTimeout(s),s=t.setTimeout(()=>e.apply(this,i),n)}},ar=t=>{const{offsetWidth:e,offsetHeight:n}=t;return{width:e,height:n}},tp=t=>t,ep=t=>{const e=Math.max(t.startIndex-t.overscan,0),n=Math.min(t.endIndex+t.overscan,t.count-1),s=[];for(let i=e;i<=n;i++)s.push(i);return s},np=(t,e)=>{const n=t.scrollElement;if(!n)return;const s=t.targetWindow;if(!s)return;const i=o=>{const{width:a,height:l}=o;e({width:Math.round(a),height:Math.round(l)})};if(i(ar(n)),!s.ResizeObserver)return()=>{};const r=new s.ResizeObserver(o=>{const a=()=>{const l=o[0];if(l?.borderBoxSize){const u=l.borderBoxSize[0];if(u){i({width:u.inlineSize,height:u.blockSize});return}}i(ar(n))};t.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return r.observe(n,{box:"border-box"}),()=>{r.unobserve(n)}},lr={passive:!0},cr=typeof window>"u"?!0:"onscrollend"in window,sp=(t,e)=>{const n=t.scrollElement;if(!n)return;const s=t.targetWindow;if(!s)return;let i=0;const r=t.options.useScrollendEvent&&cr?()=>{}:Qm(s,()=>{e(i,!1)},t.options.isScrollingResetDelay),o=c=>()=>{const{horizontal:h,isRtl:d}=t.options;i=h?n.scrollLeft*(d&&-1||1):n.scrollTop,r(),e(i,c)},a=o(!0),l=o(!1);l(),n.addEventListener("scroll",a,lr);const u=t.options.useScrollendEvent&&cr;return u&&n.addEventListener("scrollend",l,lr),()=>{n.removeEventListener("scroll",a),u&&n.removeEventListener("scrollend",l)}},ip=(t,e,n)=>{if(e?.borderBoxSize){const s=e.borderBoxSize[0];if(s)return Math.round(s[n.options.horizontal?"inlineSize":"blockSize"])}return t[n.options.horizontal?"offsetWidth":"offsetHeight"]},rp=(t,{adjustments:e=0,behavior:n},s)=>{var i,r;const o=t+e;(r=(i=s.scrollElement)==null?void 0:i.scrollTo)==null||r.call(i,{[s.options.horizontal?"left":"top"]:o,behavior:n})};class op{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const s=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(i=>{i.forEach(r=>{const o=()=>{this._measureElement(r.target,r)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()})}));return{disconnect:()=>{var i;(i=s())==null||i.disconnect(),n=null},observe:i=>{var r;return(r=s())==null?void 0:r.observe(i,{box:"border-box"})},unobserve:i=>{var r;return(r=s())==null?void 0:r.unobserve(i)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([s,i])=>{typeof i>"u"&&delete n[s]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:tp,rangeExtractor:ep,onChange:()=>{},measureElement:ip,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var s,i;(i=(s=this.options).onChange)==null||i.call(s,this,n)},this.maybeNotify=It(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const s=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==s){if(this.cleanup(),!s){this.maybeNotify();return}this.scrollElement=s,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,r)=>{this.scrollAdjustments=0,this.scrollDirection=r?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=r,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,s)=>{const i=new Map,r=new Map;for(let o=s-1;o>=0;o--){const a=n[o];if(i.has(a.lane))continue;const l=r.get(a.lane);if(l==null||a.end>l.end?r.set(a.lane,a):a.end<l.end&&i.set(a.lane,!0),i.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort((o,a)=>o.end===a.end?o.index-a.index:o.end-a.end)[0]:void 0},this.getMeasurementOptions=It(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,s,i,r,o)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:s,scrollMargin:i,getItemKey:r,enabled:o}),{key:!1}),this.getMeasurements=It(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:s,scrollMargin:i,getItemKey:r,enabled:o},a)=>{if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(c=>{this.itemSizeCache.set(c.key,c.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,l);for(let c=l;c<n;c++){const h=r(c),d=this.options.lanes===1?u[c-1]:this.getFurthestMeasurement(u,c),f=d?d.end+this.options.gap:s+i,g=a.get(h),m=typeof g=="number"?g:this.options.estimateSize(c),v=f+m,y=d?d.lane:c%this.options.lanes;u[c]={index:c,start:f,size:m,end:v,key:h,lane:y}}return this.measurementsCache=u,u},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=It(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,s,i,r)=>this.range=n.length>0&&s>0?ap({measurements:n,outerSize:s,scrollOffset:i,lanes:r}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=It(()=>{let n=null,s=null;const i=this.calculateRange();return i&&(n=i.startIndex,s=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,s]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,s]},(n,s,i,r,o)=>r===null||o===null?[]:n({startIndex:r,endIndex:o,overscan:s,count:i}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const s=this.options.indexAttribute,i=n.getAttribute(s);return i?parseInt(i,10):(console.warn(`Missing attribute name '${s}={index}' on measured element.`),-1)},this._measureElement=(n,s)=>{const i=this.indexFromElement(n),r=this.measurementsCache[i];if(!r)return;const o=r.key,a=this.elementsCache.get(o);a!==n&&(a&&this.observer.unobserve(a),this.observer.observe(n),this.elementsCache.set(o,n)),n.isConnected&&this.resizeItem(i,this.options.measureElement(n,s,this))},this.resizeItem=(n,s)=>{const i=this.measurementsCache[n];if(!i)return;const r=this.itemSizeCache.get(i.key)??i.size,o=s-r;o!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(i,o,this):i.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",o),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(i.index),this.itemSizeCache=new Map(this.itemSizeCache.set(i.key,s)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((s,i)=>{s.isConnected||(this.observer.unobserve(s),this.elementsCache.delete(i))});return}this._measureElement(n,void 0)},this.getVirtualItems=It(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,s)=>{const i=[];for(let r=0,o=n.length;r<o;r++){const a=n[r],l=s[a];i.push(l)}return i},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const s=this.getMeasurements();if(s.length!==0)return or(s[ha(0,s.length-1,i=>or(s[i]).start,n)])},this.getOffsetForAlignment=(n,s,i=0)=>{const r=this.getSize(),o=this.getScrollOffset();s==="auto"&&(s=n>=o+r?"end":"start"),s==="center"?n+=(i-r)/2:s==="end"&&(n-=r);const a=this.getTotalSize()+this.options.scrollMargin-r;return Math.max(Math.min(a,n),0)},this.getOffsetForIndex=(n,s="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const i=this.measurementsCache[n];if(!i)return;const r=this.getSize(),o=this.getScrollOffset();if(s==="auto")if(i.end>=o+r-this.options.scrollPaddingEnd)s="end";else if(i.start<=o+this.options.scrollPaddingStart)s="start";else return[o,s];const a=s==="end"?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,s,i.size),s]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:s="start",behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,s),{adjustments:void 0,behavior:i})},this.scrollToIndex=(n,{align:s="auto",behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1));let r=0;const o=10,a=u=>{if(!this.targetWindow)return;const c=this.getOffsetForIndex(n,u);if(!c){console.warn("Failed to get offset for index:",n);return}const[h,d]=c;this._scrollToOffset(h,{adjustments:void 0,behavior:i}),this.targetWindow.requestAnimationFrame(()=>{const f=this.getScrollOffset(),g=this.getOffsetForIndex(n,d);if(!g){console.warn("Failed to get offset for index:",n);return}Jm(g[0],f)||l(d)})},l=u=>{this.targetWindow&&(r++,r<o?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",r,o),this.targetWindow.requestAnimationFrame(()=>a(u))):console.warn(`Failed to scroll to index ${n} after ${o} attempts.`))};a(s)},this.scrollBy=(n,{behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:s})},this.getTotalSize=()=>{var n;const s=this.getMeasurements();let i;if(s.length===0)i=this.options.paddingStart;else if(this.options.lanes===1)i=((n=s[s.length-1])==null?void 0:n.end)??0;else{const r=Array(this.options.lanes).fill(null);let o=s.length-1;for(;o>=0&&r.some(a=>a===null);){const a=s[o];r[a.lane]===null&&(r[a.lane]=a.end),o--}i=Math.max(...r.filter(a=>a!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:s,behavior:i})=>{this.options.scrollToFn(n,{behavior:i,adjustments:s},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}}const ha=(t,e,n,s)=>{for(;t<=e;){const i=(t+e)/2|0,r=n(i);if(r<s)t=i+1;else if(r>s)e=i-1;else return i}return t>0?t-1:0};function ap({measurements:t,outerSize:e,scrollOffset:n,lanes:s}){const i=t.length-1,r=l=>t[l].start;if(t.length<=s)return{startIndex:0,endIndex:i};let o=ha(0,i,r,n),a=o;if(s===1)for(;a<i&&t[a].end<n+e;)a++;else if(s>1){const l=Array(s).fill(0);for(;a<i&&l.some(c=>c<n+e);){const c=t[a];l[c.lane]=c.end,a++}const u=Array(s).fill(n+e);for(;o>=0&&u.some(c=>c>=n);){const c=t[o];u[c.lane]=c.start,o--}o=Math.max(0,o-o%s),a=Math.min(i,a+(s-1-a%s))}return{startIndex:o,endIndex:a}}const ur=typeof document<"u"?V.useLayoutEffect:V.useEffect;function lp(t){const e=V.useReducer(()=>({}),{})[1],n={...t,onChange:(i,r)=>{var o;r?dr.flushSync(e):e(),(o=t.onChange)==null||o.call(t,i,r)}},[s]=V.useState(()=>new op(n));return s.setOptions(n),ur(()=>s._didMount(),[]),ur(()=>s._willUpdate()),s}function cp(t){return lp({observeElementRect:np,observeElementOffset:sp,scrollToFn:rp,...t})}const up="_main_pl2ip_8",hr={main:up},da=w.forwardRef(({children:t,className:e,row:n=!1,estimatedItemHeight:s=100,virtualize:i=!1},r)=>{const o=w.useRef(null),a=w.useMemo(()=>w.Children.toArray(t),[t]),l=cp({count:a.length,getScrollElement:()=>o.current,estimateSize:()=>s,measureElement:c=>c.getBoundingClientRect().height});return w.useImperativeHandle(r,()=>({scrollToTop:()=>l.scrollToOffset(0,{behavior:"smooth"}),scrollToBottom:()=>l.scrollToOffset(l.getTotalSize(),{behavior:"smooth"}),scrollToIndex:(c,h={})=>l.scrollToIndex(c,{behavior:"smooth",...h}),scrollToOffset:(c,h={})=>l.scrollToOffset(c,{behavior:"smooth",...h}),scrollBy:c=>{const h=l.scrollOffset||0;l.scrollToOffset(h+c,{behavior:"smooth"})},getElement:()=>o.current,getScrollOffset:()=>l.scrollOffset||0,getTotalSize:()=>l.getTotalSize()}),[l]),w.useMemo(()=>i||a.length>50,[i,a])&&a.length>0?b.jsx(A,{ref:o,className:I(hr.main,e),w:"full",row:n,p:"var(--spacing-2xl)",children:b.jsx(A,{style:{height:`${l.getTotalSize()}px`,position:"relative"},children:l.getVirtualItems().map(c=>b.jsx(A,{"data-index":c.index,ref:l.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${c.start}px)`},children:a[c.index]},c.key))})}):b.jsx(A,{ref:o,className:I(hr.main,e),w:"full",row:n,pl:"var(--spacing-2xl)",pr:"var(--spacing-xs)",children:b.jsx(A,{py:"var(--spacing-2xl)",pr:"var(--spacing-xl)",children:t})})});da.displayName="ModalMain";const Qe=Tr;Qe.Header=ca;Qe.Main=da;Qe.Footer=ua;const hp="_themeProviderScoped_10kh5_9",dp={themeProviderScoped:hp};function fp({className:t,children:e,theme:n}){return b.jsx("div",{className:At(dp.themeProviderScoped,t),id:"theme-provider-scoped","data-theme":n,children:e})}exports.AnimatedText=ra;exports.Avatar=Qf;exports.Box=A;exports.Button=Ef;exports.Checkbox=ks;exports.Hint=xm;exports.IconButton=Yn;exports.Input=oa;exports.Modal=Qe;exports.Portal=aa;exports.Ripple=xe;exports.Select=km;exports.Switch=la;exports.Tag=Rs;exports.Text=O;exports.ThemeProviderScoped=fp;exports.getSizeClass=he;exports.getStyleClass=qe;exports.useControlled=Ge;exports.useDropdownPosition=_r;
|
|
16
|
+
color: hsl(${Math.max(0,Math.min(120-120*v,120))}deg 100% 31%);`,n?.key)}return(u=n?.onChange)==null||u.call(n,i),i}return r.updateDeps=o=>{s=o},r}function or(t,e){if(t===void 0)throw new Error("Unexpected undefined");return t}const Qm=(t,e)=>Math.abs(t-e)<1.01,tp=(t,e,n)=>{let s;return function(...i){t.clearTimeout(s),s=t.setTimeout(()=>e.apply(this,i),n)}},ar=t=>{const{offsetWidth:e,offsetHeight:n}=t;return{width:e,height:n}},ep=t=>t,np=t=>{const e=Math.max(t.startIndex-t.overscan,0),n=Math.min(t.endIndex+t.overscan,t.count-1),s=[];for(let i=e;i<=n;i++)s.push(i);return s},sp=(t,e)=>{const n=t.scrollElement;if(!n)return;const s=t.targetWindow;if(!s)return;const i=o=>{const{width:a,height:l}=o;e({width:Math.round(a),height:Math.round(l)})};if(i(ar(n)),!s.ResizeObserver)return()=>{};const r=new s.ResizeObserver(o=>{const a=()=>{const l=o[0];if(l?.borderBoxSize){const u=l.borderBoxSize[0];if(u){i({width:u.inlineSize,height:u.blockSize});return}}i(ar(n))};t.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return r.observe(n,{box:"border-box"}),()=>{r.unobserve(n)}},lr={passive:!0},cr=typeof window>"u"?!0:"onscrollend"in window,ip=(t,e)=>{const n=t.scrollElement;if(!n)return;const s=t.targetWindow;if(!s)return;let i=0;const r=t.options.useScrollendEvent&&cr?()=>{}:tp(s,()=>{e(i,!1)},t.options.isScrollingResetDelay),o=c=>()=>{const{horizontal:h,isRtl:d}=t.options;i=h?n.scrollLeft*(d&&-1||1):n.scrollTop,r(),e(i,c)},a=o(!0),l=o(!1);l(),n.addEventListener("scroll",a,lr);const u=t.options.useScrollendEvent&&cr;return u&&n.addEventListener("scrollend",l,lr),()=>{n.removeEventListener("scroll",a),u&&n.removeEventListener("scrollend",l)}},rp=(t,e,n)=>{if(e?.borderBoxSize){const s=e.borderBoxSize[0];if(s)return Math.round(s[n.options.horizontal?"inlineSize":"blockSize"])}return t[n.options.horizontal?"offsetWidth":"offsetHeight"]},op=(t,{adjustments:e=0,behavior:n},s)=>{var i,r;const o=t+e;(r=(i=s.scrollElement)==null?void 0:i.scrollTo)==null||r.call(i,{[s.options.horizontal?"left":"top"]:o,behavior:n})};class ap{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const s=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(i=>{i.forEach(r=>{const o=()=>{this._measureElement(r.target,r)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()})}));return{disconnect:()=>{var i;(i=s())==null||i.disconnect(),n=null},observe:i=>{var r;return(r=s())==null?void 0:r.observe(i,{box:"border-box"})},unobserve:i=>{var r;return(r=s())==null?void 0:r.unobserve(i)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([s,i])=>{typeof i>"u"&&delete n[s]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:ep,rangeExtractor:np,onChange:()=>{},measureElement:rp,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var s,i;(i=(s=this.options).onChange)==null||i.call(s,this,n)},this.maybeNotify=It(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const s=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==s){if(this.cleanup(),!s){this.maybeNotify();return}this.scrollElement=s,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,r)=>{this.scrollAdjustments=0,this.scrollDirection=r?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=r,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,s)=>{const i=new Map,r=new Map;for(let o=s-1;o>=0;o--){const a=n[o];if(i.has(a.lane))continue;const l=r.get(a.lane);if(l==null||a.end>l.end?r.set(a.lane,a):a.end<l.end&&i.set(a.lane,!0),i.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort((o,a)=>o.end===a.end?o.index-a.index:o.end-a.end)[0]:void 0},this.getMeasurementOptions=It(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,s,i,r,o)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:s,scrollMargin:i,getItemKey:r,enabled:o}),{key:!1}),this.getMeasurements=It(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:s,scrollMargin:i,getItemKey:r,enabled:o},a)=>{if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(c=>{this.itemSizeCache.set(c.key,c.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,l);for(let c=l;c<n;c++){const h=r(c),d=this.options.lanes===1?u[c-1]:this.getFurthestMeasurement(u,c),f=d?d.end+this.options.gap:s+i,g=a.get(h),m=typeof g=="number"?g:this.options.estimateSize(c),v=f+m,y=d?d.lane:c%this.options.lanes;u[c]={index:c,start:f,size:m,end:v,key:h,lane:y}}return this.measurementsCache=u,u},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=It(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,s,i,r)=>this.range=n.length>0&&s>0?lp({measurements:n,outerSize:s,scrollOffset:i,lanes:r}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=It(()=>{let n=null,s=null;const i=this.calculateRange();return i&&(n=i.startIndex,s=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,s]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,s]},(n,s,i,r,o)=>r===null||o===null?[]:n({startIndex:r,endIndex:o,overscan:s,count:i}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const s=this.options.indexAttribute,i=n.getAttribute(s);return i?parseInt(i,10):(console.warn(`Missing attribute name '${s}={index}' on measured element.`),-1)},this._measureElement=(n,s)=>{const i=this.indexFromElement(n),r=this.measurementsCache[i];if(!r)return;const o=r.key,a=this.elementsCache.get(o);a!==n&&(a&&this.observer.unobserve(a),this.observer.observe(n),this.elementsCache.set(o,n)),n.isConnected&&this.resizeItem(i,this.options.measureElement(n,s,this))},this.resizeItem=(n,s)=>{const i=this.measurementsCache[n];if(!i)return;const r=this.itemSizeCache.get(i.key)??i.size,o=s-r;o!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(i,o,this):i.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",o),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(i.index),this.itemSizeCache=new Map(this.itemSizeCache.set(i.key,s)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((s,i)=>{s.isConnected||(this.observer.unobserve(s),this.elementsCache.delete(i))});return}this._measureElement(n,void 0)},this.getVirtualItems=It(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,s)=>{const i=[];for(let r=0,o=n.length;r<o;r++){const a=n[r],l=s[a];i.push(l)}return i},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const s=this.getMeasurements();if(s.length!==0)return or(s[ha(0,s.length-1,i=>or(s[i]).start,n)])},this.getOffsetForAlignment=(n,s,i=0)=>{const r=this.getSize(),o=this.getScrollOffset();s==="auto"&&(s=n>=o+r?"end":"start"),s==="center"?n+=(i-r)/2:s==="end"&&(n-=r);const a=this.getTotalSize()+this.options.scrollMargin-r;return Math.max(Math.min(a,n),0)},this.getOffsetForIndex=(n,s="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const i=this.measurementsCache[n];if(!i)return;const r=this.getSize(),o=this.getScrollOffset();if(s==="auto")if(i.end>=o+r-this.options.scrollPaddingEnd)s="end";else if(i.start<=o+this.options.scrollPaddingStart)s="start";else return[o,s];const a=s==="end"?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,s,i.size),s]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:s="start",behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,s),{adjustments:void 0,behavior:i})},this.scrollToIndex=(n,{align:s="auto",behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1));let r=0;const o=10,a=u=>{if(!this.targetWindow)return;const c=this.getOffsetForIndex(n,u);if(!c){console.warn("Failed to get offset for index:",n);return}const[h,d]=c;this._scrollToOffset(h,{adjustments:void 0,behavior:i}),this.targetWindow.requestAnimationFrame(()=>{const f=this.getScrollOffset(),g=this.getOffsetForIndex(n,d);if(!g){console.warn("Failed to get offset for index:",n);return}Qm(g[0],f)||l(d)})},l=u=>{this.targetWindow&&(r++,r<o?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",r,o),this.targetWindow.requestAnimationFrame(()=>a(u))):console.warn(`Failed to scroll to index ${n} after ${o} attempts.`))};a(s)},this.scrollBy=(n,{behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:s})},this.getTotalSize=()=>{var n;const s=this.getMeasurements();let i;if(s.length===0)i=this.options.paddingStart;else if(this.options.lanes===1)i=((n=s[s.length-1])==null?void 0:n.end)??0;else{const r=Array(this.options.lanes).fill(null);let o=s.length-1;for(;o>=0&&r.some(a=>a===null);){const a=s[o];r[a.lane]===null&&(r[a.lane]=a.end),o--}i=Math.max(...r.filter(a=>a!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:s,behavior:i})=>{this.options.scrollToFn(n,{behavior:i,adjustments:s},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}}const ha=(t,e,n,s)=>{for(;t<=e;){const i=(t+e)/2|0,r=n(i);if(r<s)t=i+1;else if(r>s)e=i-1;else return i}return t>0?t-1:0};function lp({measurements:t,outerSize:e,scrollOffset:n,lanes:s}){const i=t.length-1,r=l=>t[l].start;if(t.length<=s)return{startIndex:0,endIndex:i};let o=ha(0,i,r,n),a=o;if(s===1)for(;a<i&&t[a].end<n+e;)a++;else if(s>1){const l=Array(s).fill(0);for(;a<i&&l.some(c=>c<n+e);){const c=t[a];l[c.lane]=c.end,a++}const u=Array(s).fill(n+e);for(;o>=0&&u.some(c=>c>=n);){const c=t[o];u[c.lane]=c.start,o--}o=Math.max(0,o-o%s),a=Math.min(i,a+(s-1-a%s))}return{startIndex:o,endIndex:a}}const ur=typeof document<"u"?k.useLayoutEffect:k.useEffect;function cp(t){const e=k.useReducer(()=>({}),{})[1],n={...t,onChange:(i,r)=>{var o;r?dr.flushSync(e):e(),(o=t.onChange)==null||o.call(t,i,r)}},[s]=k.useState(()=>new ap(n));return s.setOptions(n),ur(()=>s._didMount(),[]),ur(()=>s._willUpdate()),s}function up(t){return cp({observeElementRect:sp,observeElementOffset:ip,scrollToFn:op,...t})}const hp="_main_pl2ip_8",hr={main:hp},da=w.forwardRef(({children:t,className:e,row:n=!1,estimatedItemHeight:s=100,virtualize:i=!1},r)=>{const o=w.useRef(null),a=w.useMemo(()=>w.Children.toArray(t),[t]),l=up({count:a.length,getScrollElement:()=>o.current,estimateSize:()=>s,measureElement:c=>c.getBoundingClientRect().height});return w.useImperativeHandle(r,()=>({scrollToTop:()=>l.scrollToOffset(0,{behavior:"smooth"}),scrollToBottom:()=>l.scrollToOffset(l.getTotalSize(),{behavior:"smooth"}),scrollToIndex:(c,h={})=>l.scrollToIndex(c,{behavior:"smooth",...h}),scrollToOffset:(c,h={})=>l.scrollToOffset(c,{behavior:"smooth",...h}),scrollBy:c=>{const h=l.scrollOffset||0;l.scrollToOffset(h+c,{behavior:"smooth"})},getElement:()=>o.current,getScrollOffset:()=>l.scrollOffset||0,getTotalSize:()=>l.getTotalSize()}),[l]),w.useMemo(()=>i||a.length>50,[i,a])&&a.length>0?b.jsx(A,{ref:o,className:I(hr.main,e),w:"full",row:n,p:"var(--spacing-2xl)",children:b.jsx(A,{style:{height:`${l.getTotalSize()}px`,position:"relative"},children:l.getVirtualItems().map(c=>b.jsx(A,{"data-index":c.index,ref:l.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${c.start}px)`},children:a[c.index]},c.key))})}):b.jsx(A,{ref:o,className:I(hr.main,e),w:"full",row:n,pl:"var(--spacing-2xl)",pr:"var(--spacing-xs)",children:b.jsx(A,{py:"var(--spacing-2xl)",pr:"var(--spacing-xl)",children:t})})});da.displayName="ModalMain";const Qe=Tr;Qe.Header=ca;Qe.Main=da;Qe.Footer=ua;const dp="_themeProviderScoped_uzb80_9",fp={themeProviderScoped:dp};function mp({className:t,children:e,theme:n}){return b.jsx("div",{className:At(fp.themeProviderScoped,t),id:"theme-provider-scoped","data-theme":n,children:e})}exports.AnimatedText=ra;exports.Avatar=nm;exports.Box=A;exports.Button=Ef;exports.Checkbox=Vs;exports.Hint=_m;exports.IconButton=Yn;exports.Input=oa;exports.Modal=Qe;exports.Portal=aa;exports.Ripple=xe;exports.Select=Rm;exports.Switch=la;exports.Tag=Rs;exports.Text=O;exports.ThemeProviderScoped=mp;exports.getSizeClass=he;exports.getStyleClass=qe;exports.useControlled=Ge;exports.useDropdownPosition=Sr;
|
|
17
17
|
//# sourceMappingURL=ui-kit.cjs.js.map
|