@matthiaskrijgsman/mat-ui 0.0.6 → 0.0.8
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/hooks/use-drag-x.d.ts +37 -0
- package/dist/index.js +1852 -1688
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +29 -24
- package/dist/index.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/table/Table.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(M,T){typeof exports=="object"&&typeof module<"u"?T(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],T):(M=typeof globalThis<"u"?globalThis:M||self,T(M.MatUI={},M.React,M.ReactDOM))})(this,(function(M,T,
|
|
1
|
+
(function(M,T){typeof exports=="object"&&typeof module<"u"?T(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],T):(M=typeof globalThis<"u"?globalThis:M||self,T(M.MatUI={},M.React,M.ReactDOM))})(this,(function(M,T,za){"use strict";function Js(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const S=Js(T),Qs=Js(za);var kt={exports:{}},at={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var ei;function Ka(){if(ei)return at;ei=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(s,i,o){var r=null;if(o!==void 0&&(r=""+o),i.key!==void 0&&(r=""+i.key),"key"in i){o={};for(var a in i)a!=="key"&&(o[a]=i[a])}else o=i;return i=o.ref,{$$typeof:e,type:s,key:r,ref:i!==void 0?i:null,props:o}}return at.Fragment=t,at.jsx=n,at.jsxs=n,at}var lt={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var ti;function Xa(){return ti||(ti=1,process.env.NODE_ENV!=="production"&&(function(){function e(w){if(w==null)return null;if(typeof w=="function")return w.$$typeof===I?null:w.displayName||w.name||null;if(typeof w=="string")return w;switch(w){case y:return"Fragment";case v:return"Profiler";case x:return"StrictMode";case C:return"Suspense";case P:return"SuspenseList";case N:return"Activity"}if(typeof w=="object")switch(typeof w.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),w.$$typeof){case p:return"Portal";case g:return(w.displayName||"Context")+".Provider";case b:return(w._context.displayName||"Context")+".Consumer";case E:var D=w.render;return w=w.displayName,w||(w=D.displayName||D.name||"",w=w!==""?"ForwardRef("+w+")":"ForwardRef"),w;case A:return D=w.displayName||null,D!==null?D:e(w.type)||"Memo";case R:D=w._payload,w=w._init;try{return e(w(D))}catch{}}return null}function t(w){return""+w}function n(w){try{t(w);var D=!1}catch{D=!0}if(D){D=console;var $=D.error,G=typeof Symbol=="function"&&Symbol.toStringTag&&w[Symbol.toStringTag]||w.constructor.name||"Object";return $.call(D,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",G),t(w)}}function s(w){if(w===y)return"<>";if(typeof w=="object"&&w!==null&&w.$$typeof===R)return"<...>";try{var D=e(w);return D?"<"+D+">":"<...>"}catch{return"<...>"}}function i(){var w=U.A;return w===null?null:w.getOwner()}function o(){return Error("react-stack-top-frame")}function r(w){if(ne.call(w,"key")){var D=Object.getOwnPropertyDescriptor(w,"key").get;if(D&&D.isReactWarning)return!1}return w.key!==void 0}function a(w,D){function $(){ve||(ve=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",D))}$.isReactWarning=!0,Object.defineProperty(w,"key",{get:$,configurable:!0})}function l(){var w=e(this.type);return ue[w]||(ue[w]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),w=this.props.ref,w!==void 0?w:null}function u(w,D,$,G,Me,xe,Gs,qs){return $=xe.ref,w={$$typeof:m,type:w,key:D,props:xe,_owner:Me},($!==void 0?$:null)!==null?Object.defineProperty(w,"ref",{enumerable:!1,get:l}):Object.defineProperty(w,"ref",{enumerable:!1,value:null}),w._store={},Object.defineProperty(w._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(w,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(w,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Gs}),Object.defineProperty(w,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:qs}),Object.freeze&&(Object.freeze(w.props),Object.freeze(w)),w}function c(w,D,$,G,Me,xe,Gs,qs){var q=D.children;if(q!==void 0)if(G)if(O(q)){for(G=0;G<q.length;G++)f(q[G]);Object.freeze&&Object.freeze(q)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else f(q);if(ne.call(D,"key")){q=e(w);var ot=Object.keys(D).filter(function(Um){return Um!=="key"});G=0<ot.length?"{key: someKey, "+ot.join(": ..., ")+": ...}":"{key: someKey}",J[q+G]||(ot=0<ot.length?"{"+ot.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,X,q,oe,q),J[q+X]=!0)}if(q=null,$!==void 0&&(n($),q=""+$),r(D)&&(n(D.key),q=""+D.key),"key"in D){$={};for(var Zs in D)Zs!=="key"&&($[Zs]=D[Zs])}else $=D;return q&&a($,typeof b=="function"?b.displayName||b.name||"Unknown":b),u(b,q,xt,Mt,i(),$,Xs,qs)}function f(b){typeof b=="object"&&b!==null&&b.$$typeof===m&&b._store&&(b._store.validated=1)}var d=T,m=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),v=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),O=Symbol.for("react.client.reference"),U=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,et=Object.prototype.hasOwnProperty,I=Array.isArray,K=console.createTask?console.createTask:function(){return null};d={react_stack_bottom_frame:function(b){return b()}};var vt,ut={},_=d.react_stack_bottom_frame.bind(d,o)(),k=K(s(o)),J={};le.Fragment=g,le.jsx=function(b,D,$,X,Mt){var xt=1e4>U.recentlyCreatedOwnerStacks++;return c(b,D,$,!1,X,Mt,xt?Error("react-stack-top-frame"):_,xt?K(s(b)):k)},le.jsxs=function(b,D,$,X,Mt){var xt=1e4>U.recentlyCreatedOwnerStacks++;return c(b,D,$,!0,X,Mt,xt?Error("react-stack-top-frame"):_,xt?K(s(b)):k)}})()),le}var ni;function Ka(){return ni||(ni=1,process.env.NODE_ENV==="production"?Ve.exports=Ua():Ve.exports=za()),Ve.exports}var h=Ka();const V=(...t)=>t.filter(Boolean).join(" "),dn=T.createContext({});function hn(t){const e=T.useRef(null);return e.current===null&&(e.current=t()),e.current}const mn=typeof window<"u",si=mn?T.useLayoutEffect:T.useEffect,ke=T.createContext(null);function pn(t,e){t.indexOf(e)===-1&&t.push(e)}function gn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const bt=(t,e,n)=>n>e?e:n<t?t:n;function yn(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let $t=()=>{},wt=()=>{};process.env.NODE_ENV!=="production"&&($t=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(yn(e,n))},wt=(t,e,n)=>{if(!t)throw new Error(yn(e,n))});const Tt={},ii=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function ri(t){return typeof t=="object"&&t!==null}const oi=t=>/^0[^.\s]+$/u.test(t);function vn(t){let e;return()=>(e===void 0&&(e=t()),e)}const nt=t=>t,Ya=(t,e)=>n=>e(t(n)),ce=(...t)=>t.reduce(Ya),ue=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class xn{constructor(){this.subscriptions=[]}add(e){return pn(this.subscriptions,e),()=>gn(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 o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const at=t=>t*1e3,ft=t=>t/1e3;function ai(t,e){return e?t*(1e3/e):0}const li=new Set;function bn(t,e,n){t||li.has(e)||(console.warn(yn(e,n)),li.add(e))}const ci=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Ha=1e-7,Ga=12;function Xa(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=ci(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>Ha&&++a<Ga);return r}function fe(t,e,n,s){if(t===e&&n===s)return nt;const i=o=>Xa(o,0,1,t,n);return o=>o===0||o===1?o:ci(i(o),e,s)}const ui=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,fi=t=>e=>1-t(1-e),di=fe(.33,1.53,.69,.99),wn=fi(di),hi=ui(wn),mi=t=>(t*=2)<1?.5*wn(t):.5*(2-Math.pow(2,-10*(t-1))),Tn=t=>1-Math.sin(Math.acos(t)),pi=fi(Tn),gi=ui(Tn),qa=fe(.42,0,1,1),Za=fe(0,0,.58,1),yi=fe(.42,0,.58,1),Ja=t=>Array.isArray(t)&&typeof t[0]!="number",vi=t=>Array.isArray(t)&&typeof t[0]=="number",xi={linear:nt,easeIn:qa,easeInOut:yi,easeOut:Za,circIn:Tn,circInOut:gi,circOut:pi,backIn:wn,backInOut:hi,backOut:di,anticipate:mi},Qa=t=>typeof t=="string",bi=t=>{if(vi(t)){wt(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,s,i]=t;return fe(e,n,s,i)}else if(Qa(t))return wt(xi[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),xi[t];return t},Ne=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function tl(t,e){let n=new Set,s=new Set,i=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){r.has(c)&&(u.schedule(c),t()),c(a)}const u={schedule:(c,f=!1,d=!1)=>{const p=d&&i?n:s;return f&&r.add(c),p.has(c)||p.add(c),c},cancel:c=>{s.delete(c),r.delete(c)},process:c=>{if(a=c,i){o=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,o&&(o=!1,u.process(c))}};return u}const el=40;function wi(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=Ne.reduce((v,E)=>(v[E]=tl(o),v),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:f,preRender:d,render:m,postRender:p}=r,g=()=>{const v=Tt.useManualTiming?i.timestamp:performance.now();n=!1,Tt.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(v-i.timestamp,el),1)),i.timestamp=v,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),f.process(i),d.process(i),m.process(i),p.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(g))},x=()=>{n=!0,s=!0,i.isProcessing||t(g)};return{schedule:Ne.reduce((v,E)=>{const S=r[E];return v[E]=(P,A=!1,j=!1)=>(n||x(),S.schedule(P,A,j)),v},{}),cancel:v=>{for(let E=0;E<Ne.length;E++)r[Ne[E]].cancel(v)},state:i,steps:r}}const{schedule:L,cancel:Ct,state:Y,steps:Sn}=wi(typeof requestAnimationFrame<"u"?requestAnimationFrame:nt,!0);let Oe;function nl(){Oe=void 0}const Q={now:()=>(Oe===void 0&&Q.set(Y.isProcessing||Tt.useManualTiming?Y.timestamp:performance.now()),Oe),set:t=>{Oe=t,queueMicrotask(nl)}},Ti=t=>e=>typeof e=="string"&&e.startsWith(t),Cn=Ti("--"),sl=Ti("var(--"),Pn=t=>sl(t)?il.test(t.split("/*")[0].trim()):!1,il=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Wt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},de={...Wt,transform:t=>bt(0,1,t)},Ie={...Wt,default:1},he=t=>Math.round(t*1e5)/1e5,En=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function rl(t){return t==null}const ol=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,An=(t,e)=>n=>!!(typeof n=="string"&&ol.test(n)&&n.startsWith(t)||e&&!rl(n)&&Object.prototype.hasOwnProperty.call(n,e)),Si=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(En);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},al=t=>bt(0,255,t),jn={...Wt,transform:t=>Math.round(al(t))},Dt={test:An("rgb","red"),parse:Si("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+jn.transform(t)+", "+jn.transform(e)+", "+jn.transform(n)+", "+he(de.transform(s))+")"};function ll(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 Rn={test:An("#"),parse:ll,transform:Dt.transform},me=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Pt=me("deg"),dt=me("%"),R=me("px"),cl=me("vh"),ul=me("vw"),Ci={...dt,parse:t=>dt.parse(t)/100,transform:t=>dt.transform(t*100)},Ut={test:An("hsl","hue"),parse:Si("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+dt.transform(he(e))+", "+dt.transform(he(n))+", "+he(de.transform(s))+")"},z={test:t=>Dt.test(t)||Rn.test(t)||Ut.test(t),parse:t=>Dt.test(t)?Dt.parse(t):Ut.test(t)?Ut.parse(t):Rn.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Dt.transform(t):Ut.transform(t),getAnimatableNone:t=>{const e=z.parse(t);return e.alpha=0,z.transform(e)}},fl=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function dl(t){return isNaN(t)&&typeof t=="string"&&(t.match(En)?.length||0)+(t.match(fl)?.length||0)>0}const Pi="number",Ei="color",hl="var",ml="var(",Ai="${}",pl=/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 pe(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(pl,l=>(z.test(l)?(s.color.push(o),i.push(Ei),n.push(z.parse(l))):l.startsWith(ml)?(s.var.push(o),i.push(hl),n.push(l)):(s.number.push(o),i.push(Pi),n.push(parseFloat(l))),++o,Ai)).split(Ai);return{values:n,split:a,indexes:s,types:i}}function ji(t){return pe(t).values}function Ri(t){const{split:e,types:n}=pe(t),s=e.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=e[r],i[r]!==void 0){const a=n[r];a===Pi?o+=he(i[r]):a===Ei?o+=z.transform(i[r]):o+=i[r]}return o}}const gl=t=>typeof t=="number"?0:z.test(t)?z.getAnimatableNone(t):t;function yl(t){const e=ji(t);return Ri(t)(e.map(gl))}const Et={test:dl,parse:ji,createTransformer:Ri,getAnimatableNone:yl};function Mn(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 vl({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=Mn(l,a,t+1/3),o=Mn(l,a,t),r=Mn(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function Le(t,e){return n=>n>0?e:t}const F=(t,e,n)=>t+(e-t)*n,Dn=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},xl=[Rn,Dt,Ut],bl=t=>xl.find(e=>e.test(t));function Mi(t){const e=bl(t);if($t(!!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===Ut&&(n=vl(n)),n}const Di=(t,e)=>{const n=Mi(t),s=Mi(e);if(!n||!s)return Le(t,e);const i={...n};return o=>(i.red=Dn(n.red,s.red,o),i.green=Dn(n.green,s.green,o),i.blue=Dn(n.blue,s.blue,o),i.alpha=F(n.alpha,s.alpha,o),Dt.transform(i))},Vn=new Set(["none","hidden"]);function wl(t,e){return Vn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Tl(t,e){return n=>F(t,e,n)}function kn(t){return typeof t=="number"?Tl:typeof t=="string"?Pn(t)?Le:z.test(t)?Di:Pl:Array.isArray(t)?Vi:typeof t=="object"?z.test(t)?Di:Sl:Le}function Vi(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>kn(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function Sl(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=kn(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function Cl(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],r=t.indexes[o][s[o]],a=t.values[r]??0;n[i]=a,s[o]++}return n}const Pl=(t,e)=>{const n=Et.createTransformer(e),s=pe(t),i=pe(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?Vn.has(t)&&!i.values.length||Vn.has(e)&&!s.values.length?wl(t,e):ce(Vi(Cl(s,i),i.values),n):($t(!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"),Le(t,e))};function ki(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?F(t,e,n):kn(t)(t,e)}const El=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>L.update(e,n),stop:()=>Ct(e),now:()=>Y.isProcessing?Y.timestamp:Q.now()}},Ni=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let o=0;o<i;o++)s+=Math.round(t(o/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Fe=2e4;function Nn(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 Al(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(Nn(s),Fe);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:ft(i)}}const jl=5;function Oi(t,e,n){const s=Math.max(e-jl,0);return ai(n-t(s),e-s)}const B={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},On=.001;function Rl({duration:t=B.duration,bounce:e=B.bounce,velocity:n=B.velocity,mass:s=B.mass}){let i,o;$t(t<=at(B.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-e;r=bt(B.minDamping,B.maxDamping,r),t=bt(B.minDuration,B.maxDuration,ft(t)),r<1?(i=u=>{const c=u*r,f=c*t,d=c-n,m=In(u,r),p=Math.exp(-f);return On-d/m*p},o=u=>{const f=u*r*t,d=f*n+n,m=Math.pow(r,2)*Math.pow(u,2)*t,p=Math.exp(-f),g=In(Math.pow(u,2),r);return(-i(u)+On>0?-1:1)*((d-m)*p)/g}):(i=u=>{const c=Math.exp(-u*t),f=(u-n)*t+1;return-On+c*f},o=u=>{const c=Math.exp(-u*t),f=(n-u)*(t*t);return c*f});const a=5/t,l=Dl(i,o,a);if(t=at(t),isNaN(l))return{stiffness:B.stiffness,damping:B.damping,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:r*2*Math.sqrt(s*u),duration:t}}}const Ml=12;function Dl(t,e,n){let s=n;for(let i=1;i<Ml;i++)s=s-t(s)/e(s);return s}function In(t,e){return t*Math.sqrt(1-e*e)}const Vl=["duration","bounce"],kl=["stiffness","damping","mass"];function Ii(t,e){return e.some(n=>t[n]!==void 0)}function Nl(t){let e={velocity:B.velocity,stiffness:B.stiffness,damping:B.damping,mass:B.mass,isResolvedFromDuration:!1,...t};if(!Ii(t,kl)&&Ii(t,Vl))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*bt(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:B.mass,stiffness:i,damping:o}}else{const n=Rl(t);e={...e,...n,mass:B.mass},e.isResolvedFromDuration=!0}return e}function Be(t=B.visualDuration,e=B.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:c,duration:f,velocity:d,isResolvedFromDuration:m}=Nl({...n,velocity:-ft(n.velocity||0)}),p=d||0,g=u/(2*Math.sqrt(l*c)),x=r-o,y=ft(Math.sqrt(l/c)),w=Math.abs(x)<5;s||(s=w?B.restSpeed.granular:B.restSpeed.default),i||(i=w?B.restDelta.granular:B.restDelta.default);let v;if(g<1){const S=In(y,g);v=P=>{const A=Math.exp(-g*y*P);return r-A*((p+g*y*x)/S*Math.sin(S*P)+x*Math.cos(S*P))}}else if(g===1)v=S=>r-Math.exp(-y*S)*(x+(p+y*x)*S);else{const S=y*Math.sqrt(g*g-1);v=P=>{const A=Math.exp(-g*y*P),j=Math.min(S*P,300);return r-A*((p+g*y*x)*Math.sinh(j)+S*x*Math.cosh(j))/S}}const E={calculatedDuration:m&&f||null,next:S=>{const P=v(S);if(m)a.done=S>=f;else{let A=S===0?p:0;g<1&&(A=S===0?at(p):Oi(v,S,P));const j=Math.abs(A)<=s,N=Math.abs(r-P)<=i;a.done=j&&N}return a.value=a.done?r:P,a},toString:()=>{const S=Math.min(Nn(E),Fe),P=Ni(A=>E.next(S*A).value,S,30);return S+"ms "+P},toTransition:()=>{}};return E}Be.applyToOptions=t=>{const e=Al(t,100,Be);return t.ease=e.ease,t.duration=at(e.duration),t.type="keyframes",t};function Ln({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const f=t[0],d={done:!1,value:f},m=j=>a!==void 0&&j<a||l!==void 0&&j>l,p=j=>a===void 0?l:l===void 0||Math.abs(a-j)<Math.abs(l-j)?a:l;let g=n*e;const x=f+g,y=r===void 0?x:r(x);y!==x&&(g=y-f);const w=j=>-g*Math.exp(-j/s),v=j=>y+w(j),E=j=>{const N=w(j),O=v(j);d.done=Math.abs(N)<=u,d.value=d.done?y:O};let S,P;const A=j=>{m(d.value)&&(S=j,P=Be({keyframes:[d.value,p(d.value)],velocity:Oi(v,j,d.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return A(0),{calculatedDuration:null,next:j=>{let N=!1;return!P&&S===void 0&&(N=!0,E(j),A(j)),S!==void 0&&j>=S?P.next(j-S):(!N&&E(j),d)}}}function Ol(t,e,n){const s=[],i=n||Tt.mix||ki,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const l=Array.isArray(e)?e[r]||nt:e;a=ce(l,a)}s.push(a)}return s}function Il(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(wt(o===e.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Ol(e,s,i),l=a.length,u=c=>{if(r&&c<t[0])return e[0];let f=0;if(l>1)for(;f<t.length-2&&!(c<t[f+1]);f++);const d=ue(t[f],t[f+1],c);return a[f](d)};return n?c=>u(bt(t[0],t[o-1],c)):u}function Ll(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=ue(0,e,s);t.push(F(n,1,i))}}function Fl(t){const e=[0];return Ll(e,t.length-1),e}function Bl(t,e){return t.map(n=>n*e)}function _l(t,e){return t.map(()=>e||yi).splice(0,t.length-1)}function zt({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Ja(s)?s.map(bi):bi(s),o={done:!1,value:e[0]},r=Bl(n&&n.length===e.length?n:Fl(e),t),a=Il(r,e,{ease:Array.isArray(i)?i:_l(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const $l=t=>t!==null;function Fn(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter($l),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const Wl={decay:Ln,inertia:Ln,tween:zt,keyframes:zt,spring:Be};function Li(t){typeof t.type=="string"&&(t.type=Wl[t.type])}class Bn{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 Ul=t=>t/100;class _n extends Bn{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!==Q.now()&&this.tick(Q.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;Li(e);const{type:n=zt,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:a}=e;const l=n||zt;process.env.NODE_ENV!=="production"&&l!==zt&&wt(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==zt&&typeof a[0]!="number"&&(this.mixKeyframes=ce(Ul,ki(a[0],a[1])),a=[0,100]);const u=l({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=Nn(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:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:c,repeat:f,repeatType:d,repeatDelay:m,type:p,onUpdate:g,finalKeyframe:x}=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),w=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,E=s;if(f){const j=Math.min(this.currentTime,i)/a;let N=Math.floor(j),O=j%1;!O&&j>=1&&(O=1),O===1&&N--,N=Math.min(N,f+1),!!(N%2)&&(d==="reverse"?(O=1-O,m&&(O-=m/a)):d==="mirror"&&(E=r)),v=bt(0,1,O)*a}const S=w?{done:!1,value:c[0]}:E.next(v);o&&(S.value=o(S.value));let{done:P}=S;!w&&l!==null&&(P=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return A&&p!==Ln&&(S.value=Fn(c,this.options,x,this.speed)),g&&g(S.value),A&&this.finish(),S}then(e,n){return this.finished.then(e,n)}get duration(){return ft(this.calculatedDuration)}get time(){return ft(this.currentTime)}set time(e){e=at(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(Q.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=ft(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=El,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(Q.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 zl(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Vt=t=>t*180/Math.PI,$n=t=>{const e=Vt(Math.atan2(t[1],t[0]));return Wn(e)},Kl={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:$n,rotateZ:$n,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},Wn=t=>(t=t%360,t<0&&(t+=360),t),Fi=$n,Bi=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),_i=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Yl={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Bi,scaleY:_i,scale:t=>(Bi(t)+_i(t))/2,rotateX:t=>Wn(Vt(Math.atan2(t[6],t[5]))),rotateY:t=>Wn(Vt(Math.atan2(-t[2],t[0]))),rotateZ:Fi,rotate:Fi,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 Un(t){return t.includes("scale")?1:0}function zn(t,e){if(!t||t==="none")return Un(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Yl,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Kl,i=a}if(!i)return Un(e);const o=s[e],r=i[1].split(",").map(Gl);return typeof o=="function"?o(r):r[o]}const Hl=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return zn(n,e)};function Gl(t){return parseFloat(t.trim())}const Kt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Yt=new Set(Kt),$i=t=>t===Wt||t===R,Xl=new Set(["x","y","z"]),ql=Kt.filter(t=>!Xl.has(t));function Zl(t){const e=[];return ql.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const kt={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})=>zn(e,"x"),y:(t,{transform:e})=>zn(e,"y")};kt.translateX=kt.x,kt.translateY=kt.y;const Nt=new Set;let Kn=!1,Yn=!1,Hn=!1;function Wi(){if(Yn){const t=Array.from(Nt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Zl(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(([o,r])=>{s.getValue(o)?.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Yn=!1,Kn=!1,Nt.forEach(t=>t.complete(Hn)),Nt.clear()}function Ui(){Nt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Yn=!0)})}function Jl(){Hn=!0,Ui(),Wi(),Hn=!1}class Gn{constructor(e,n,s,i,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(Nt.add(this),Kn||(Kn=!0,L.read(Ui),L.resolveKeyframes(Wi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const o=i?.get(),r=e[e.length-1];if(o!==void 0)e[0]=o;else if(s&&n){const a=s.readValue(n,r);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=r),i&&o===void 0&&i.set(e[0])}zl(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Nt.delete(this)}cancel(){this.state==="scheduled"&&(Nt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ql=t=>t.startsWith("--");function tc(t,e,n){Ql(e)?t.style.setProperty(e,n):t.style[e]=n}const ec=vn(()=>window.ScrollTimeline!==void 0),nc={};function sc(t,e){const n=vn(t);return()=>nc[e]??n()}const zi=sc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ge=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Ki={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ge([0,.65,.55,1]),circOut:ge([.55,0,1,.45]),backIn:ge([.31,.01,.66,-.59]),backOut:ge([.33,1.53,.69,.99])};function Yi(t,e){if(t)return typeof t=="function"?zi()?Ni(t,e):"ease-out":vi(t)?ge(t):Array.isArray(t)?t.map(n=>Yi(n,e)||Ki.easeOut):Ki[t]}function ic(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const f=Yi(a,i);Array.isArray(f)&&(c.easing=f);const d={delay:s,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return u&&(d.pseudoElement=u),t.animate(c,d)}function Hi(t){return typeof t=="function"&&"applyToOptions"in t}function rc({type:t,...e}){return Hi(t)&&zi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class oc extends Bn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=e,wt(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=rc(e);this.animation=ic(n,s,i,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=Fn(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):tc(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 ft(Number(e))}get time(){return ft(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=at(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&&ec()?(this.animation.timeline=e,nt):n(this)}}const Gi={anticipate:mi,backInOut:hi,circInOut:gi};function ac(t){return t in Gi}function lc(t){typeof t.ease=="string"&&ac(t.ease)&&(t.ease=Gi[t.ease])}const Xi=10;class cc extends oc{constructor(e){lc(e),Li(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:o,...r}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new _n({...r,autoplay:!1}),l=at(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-Xi).value,a.sample(l).value,Xi),a.stop()}}const qi=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Et.test(t)||t==="0")&&!t.startsWith("url("));function uc(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 fc(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=qi(i,e),a=qi(o,e);return $t(r===a,`You are trying to animate ${e} from "${i}" to "${o}". "${r?o:i}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:uc(t)||(n==="spring"||Hi(n))&&s}function Xn(t){t.duration=0,t.type}const dc=new Set(["opacity","clipPath","filter","transform"]),hc=vn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function mc(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return hc()&&n&&dc.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const pc=40;class gc extends Bn{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:l,motionValue:u,element:c,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Q.now();const d={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:l,motionValue:u,element:c,...f},m=c?.KeyframeResolver||Gn;this.keyframeResolver=new m(a,(p,g,x)=>this.onKeyframesResolved(p,g,d,!x),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:u,onUpdate:c}=s;this.resolvedAt=Q.now(),fc(e,o,r,a)||((Tt.instantAnimations||!l)&&c?.(Fn(e,s,n)),e[0]=e[e.length-1],Xn(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>pc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},m=!u&&mc(d)?new cc({...d,element:d.motionValue.owner.current}):new _n(d);m.finished.then(()=>this.notifyFinished()).catch(nt),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}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(),Jl()),this._animation}get duration(){return this.animation.duration}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 yc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function vc(t){const e=yc.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}const xc=4;function Zi(t,e,n=1){wt(n<=xc,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=vc(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return ii(r)?parseFloat(r):r}return Pn(i)?Zi(i,e,n+1):i}function qn(t,e){return t?.[e]??t?.default??t}const Ji=new Set(["width","height","top","left","right","bottom",...Kt]),bc={test:t=>t==="auto",parse:t=>t},Qi=t=>e=>e.test(t),tr=[Wt,R,dt,Pt,ul,cl,bc],er=t=>tr.find(Qi(t));function wc(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||oi(t):!0}const Tc=new Set(["brightness","contrast","saturate","opacity"]);function Sc(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(En)||[];if(!s)return t;const i=n.replace(s,"");let o=Tc.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const Cc=/\b([a-z-]*)\(.*?\)/gu,Zn={...Et,getAnimatableNone:t=>{const e=t.match(Cc);return e?e.map(Sc).join(" "):t}},nr={...Wt,transform:Math.round},Jn={borderWidth:R,borderTopWidth:R,borderRightWidth:R,borderBottomWidth:R,borderLeftWidth:R,borderRadius:R,radius:R,borderTopLeftRadius:R,borderTopRightRadius:R,borderBottomRightRadius:R,borderBottomLeftRadius:R,width:R,maxWidth:R,height:R,maxHeight:R,top:R,right:R,bottom:R,left:R,padding:R,paddingTop:R,paddingRight:R,paddingBottom:R,paddingLeft:R,margin:R,marginTop:R,marginRight:R,marginBottom:R,marginLeft:R,backgroundPositionX:R,backgroundPositionY:R,...{rotate:Pt,rotateX:Pt,rotateY:Pt,rotateZ:Pt,scale:Ie,scaleX:Ie,scaleY:Ie,scaleZ:Ie,skew:Pt,skewX:Pt,skewY:Pt,distance:R,translateX:R,translateY:R,translateZ:R,x:R,y:R,z:R,perspective:R,transformPerspective:R,opacity:de,originX:Ci,originY:Ci,originZ:R},zIndex:nr,fillOpacity:de,strokeOpacity:de,numOctaves:nr},Pc={...Jn,color:z,backgroundColor:z,outlineColor:z,fill:z,stroke:z,borderColor:z,borderTopColor:z,borderRightColor:z,borderBottomColor:z,borderLeftColor:z,filter:Zn,WebkitFilter:Zn},sr=t=>Pc[t];function ir(t,e){let n=sr(t);return n!==Zn&&(n=Et),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ec=new Set(["auto","none","0"]);function Ac(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!Ec.has(o)&&pe(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=ir(n,i)}class jc extends Gn{constructor(e,n,s,i,o){super(e,n,s,i,o,!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(),Pn(u))){const c=Zi(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Ji.has(s)||e.length!==2)return;const[i,o]=e,r=er(i),a=er(o);if(r!==a)if($i(r)&&$i(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else kt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||wc(e[i]))&&s.push(i);s.length&&Ac(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=kt[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 o=s.length-1,r=s[o];s[o]=kt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{e.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function Rc(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 rr=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function or(t){return ri(t)&&"offsetHeight"in t}const ar=30,Mc=t=>!isNaN(parseFloat(t));class Dc{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=Q.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 o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Q.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Mc(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&bn(!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 xn);const s=this.events[e].add(n);return e==="change"?()=>{s(),L.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=Q.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>ar)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ar);return ai(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 Ht(t,e){return new Dc(t,e)}const{schedule:Qn}=wi(queueMicrotask,!1),lt={x:!1,y:!1};function lr(){return lt.x||lt.y}function Vc(t){return t==="x"||t==="y"?lt[t]?null:(lt[t]=!0,()=>{lt[t]=!1}):lt.x||lt.y?null:(lt.x=lt.y=!0,()=>{lt.x=lt.y=!1})}function cr(t,e){const n=Rc(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function ur(t){return!(t.pointerType==="touch"||lr())}function kc(t,e,n={}){const[s,i,o]=cr(t,n),r=a=>{if(!ur(a))return;const{target:l}=a,u=e(l,a);if(typeof u!="function"||!l)return;const c=f=>{ur(f)&&(u(f),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const fr=(t,e)=>e?t===e?!0:fr(t,e.parentElement):!1,ts=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Nc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Oc(t){return Nc.has(t.tagName)||t.tabIndex!==-1}const _e=new WeakSet;function dr(t){return e=>{e.key==="Enter"&&t(e)}}function es(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Ic=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=dr(()=>{if(_e.has(n))return;es(n,"down");const i=dr(()=>{es(n,"up")}),o=()=>es(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",o,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function hr(t){return ts(t)&&!lr()}function Lc(t,e,n={}){const[s,i,o]=cr(t,n),r=a=>{const l=a.currentTarget;if(!hr(a))return;_e.add(l);const u=e(l,a),c=(m,p)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),_e.has(l)&&_e.delete(l),hr(m)&&typeof u=="function"&&u(m,{success:p})},f=m=>{c(m,l===window||l===document||n.useGlobalTarget||fr(l,m.target))},d=m=>{c(m,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",d,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),or(a)&&(a.addEventListener("focus",u=>Ic(u,i)),!Oc(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function mr(t){return ri(t)&&"ownerSVGElement"in t}function Fc(t){return mr(t)&&t.tagName==="svg"}const H=t=>!!(t&&t.getVelocity),Bc=[...tr,z,Et],_c=t=>Bc.find(Qi(t)),ns=T.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class $c extends C.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=n.offsetParent,i=or(s)&&s.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=i-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Wc({children:t,isPresent:e,anchorX:n,root:s}){const i=T.useId(),o=T.useRef(null),r=T.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=T.useContext(ns);return T.useInsertionEffect(()=>{const{width:l,height:u,top:c,left:f,right:d}=r.current;if(e||!o.current||!l||!u)return;const m=n==="left"?`left: ${f}`:`right: ${d}`;o.current.dataset.motionPopId=i;const p=document.createElement("style");a&&(p.nonce=a);const g=s??document.head;return g.appendChild(p),p.sheet&&p.sheet.insertRule(`
|
|
22
|
+
<%s key={someKey} {...props} />`,G,q,ot,q),J[q+G]=!0)}if(q=null,$!==void 0&&(n($),q=""+$),r(D)&&(n(D.key),q=""+D.key),"key"in D){$={};for(var Zs in D)Zs!=="key"&&($[Zs]=D[Zs])}else $=D;return q&&a($,typeof w=="function"?w.displayName||w.name||"Unknown":w),u(w,q,xe,Me,i(),$,Gs,qs)}function f(w){typeof w=="object"&&w!==null&&w.$$typeof===m&&w._store&&(w._store.validated=1)}var d=T,m=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),g=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),I=Symbol.for("react.client.reference"),U=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne=Object.prototype.hasOwnProperty,O=Array.isArray,K=console.createTask?console.createTask:function(){return null};d={react_stack_bottom_frame:function(w){return w()}};var ve,ue={},_=d.react_stack_bottom_frame.bind(d,o)(),V=K(s(o)),J={};lt.Fragment=y,lt.jsx=function(w,D,$,G,Me){var xe=1e4>U.recentlyCreatedOwnerStacks++;return c(w,D,$,!1,G,Me,xe?Error("react-stack-top-frame"):_,xe?K(s(w)):V)},lt.jsxs=function(w,D,$,G,Me){var xe=1e4>U.recentlyCreatedOwnerStacks++;return c(w,D,$,!0,G,Me,xe?Error("react-stack-top-frame"):_,xe?K(s(w)):V)}})()),lt}var ni;function Ya(){return ni||(ni=1,process.env.NODE_ENV==="production"?kt.exports=Ka():kt.exports=Xa()),kt.exports}var h=Ya();const k=(...e)=>e.filter(Boolean).join(" "),dn=T.createContext({});function hn(e){const t=T.useRef(null);return t.current===null&&(t.current=e()),t.current}const mn=typeof window<"u",si=mn?T.useLayoutEffect:T.useEffect,Vt=T.createContext(null);function pn(e,t){e.indexOf(t)===-1&&e.push(t)}function gn(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const be=(e,t,n)=>n>t?t:n<e?e:n;function yn(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let $e=()=>{},we=()=>{};process.env.NODE_ENV!=="production"&&($e=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(yn(t,n))},we=(e,t,n)=>{if(!e)throw new Error(yn(t,n))});const Te={},ii=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function ri(e){return typeof e=="object"&&e!==null}const oi=e=>/^0[^.\s]+$/u.test(e);function vn(e){let t;return()=>(t===void 0&&(t=e()),t)}const se=e=>e,Ha=(e,t)=>n=>t(e(n)),ct=(...e)=>e.reduce(Ha),ut=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class xn{constructor(){this.subscriptions=[]}add(t){return pn(this.subscriptions,t),()=>gn(this.subscriptions,t)}notify(t,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ae=e=>e*1e3,fe=e=>e/1e3;function ai(e,t){return t?e*(1e3/t):0}const li=new Set;function bn(e,t,n){e||li.has(t)||(console.warn(yn(t,n)),li.add(t))}const ci=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Ga=1e-7,qa=12;function Za(e,t,n,s,i){let o,r,a=0;do r=t+(n-t)/2,o=ci(r,s,i)-e,o>0?n=r:t=r;while(Math.abs(o)>Ga&&++a<qa);return r}function ft(e,t,n,s){if(e===t&&n===s)return se;const i=o=>Za(o,0,1,e,n);return o=>o===0||o===1?o:ci(i(o),t,s)}const ui=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,fi=e=>t=>1-e(1-t),di=ft(.33,1.53,.69,.99),wn=fi(di),hi=ui(wn),mi=e=>(e*=2)<1?.5*wn(e):.5*(2-Math.pow(2,-10*(e-1))),Tn=e=>1-Math.sin(Math.acos(e)),pi=fi(Tn),gi=ui(Tn),Ja=ft(.42,0,1,1),Qa=ft(0,0,.58,1),yi=ft(.42,0,.58,1),el=e=>Array.isArray(e)&&typeof e[0]!="number",vi=e=>Array.isArray(e)&&typeof e[0]=="number",xi={linear:se,easeIn:Ja,easeInOut:yi,easeOut:Qa,circIn:Tn,circInOut:gi,circOut:pi,backIn:wn,backInOut:hi,backOut:di,anticipate:mi},tl=e=>typeof e=="string",bi=e=>{if(vi(e)){we(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,s,i]=e;return ft(t,n,s,i)}else if(tl(e))return we(xi[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),xi[e];return e},Nt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function nl(e,t){let n=new Set,s=new Set,i=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){r.has(c)&&(u.schedule(c),e()),c(a)}const u={schedule:(c,f=!1,d=!1)=>{const p=d&&i?n:s;return f&&r.add(c),p.has(c)||p.add(c),c},cancel:c=>{s.delete(c),r.delete(c)},process:c=>{if(a=c,i){o=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,o&&(o=!1,u.process(c))}};return u}const sl=40;function wi(e,t){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=Nt.reduce((g,E)=>(g[E]=nl(o),g),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:f,preRender:d,render:m,postRender:p}=r,y=()=>{const g=Te.useManualTiming?i.timestamp:performance.now();n=!1,Te.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(g-i.timestamp,sl),1)),i.timestamp=g,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),f.process(i),d.process(i),m.process(i),p.process(i),i.isProcessing=!1,n&&t&&(s=!1,e(y))},x=()=>{n=!0,s=!0,i.isProcessing||e(y)};return{schedule:Nt.reduce((g,E)=>{const C=r[E];return g[E]=(P,A=!1,R=!1)=>(n||x(),C.schedule(P,A,R)),g},{}),cancel:g=>{for(let E=0;E<Nt.length;E++)r[Nt[E]].cancel(g)},state:i,steps:r}}const{schedule:L,cancel:Ce,state:X,steps:Sn}=wi(typeof requestAnimationFrame<"u"?requestAnimationFrame:se,!0);let It;function il(){It=void 0}const Q={now:()=>(It===void 0&&Q.set(X.isProcessing||Te.useManualTiming?X.timestamp:performance.now()),It),set:e=>{It=e,queueMicrotask(il)}},Ti=e=>t=>typeof t=="string"&&t.startsWith(e),Cn=Ti("--"),rl=Ti("var(--"),Pn=e=>rl(e)?ol.test(e.split("/*")[0].trim()):!1,ol=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,We={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},dt={...We,transform:e=>be(0,1,e)},Ot={...We,default:1},ht=e=>Math.round(e*1e5)/1e5,En=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function al(e){return e==null}const ll=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,An=(e,t)=>n=>!!(typeof n=="string"&&ll.test(n)&&n.startsWith(e)||t&&!al(n)&&Object.prototype.hasOwnProperty.call(n,t)),Si=(e,t,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(En);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},cl=e=>be(0,255,e),Rn={...We,transform:e=>Math.round(cl(e))},De={test:An("rgb","red"),parse:Si("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+Rn.transform(e)+", "+Rn.transform(t)+", "+Rn.transform(n)+", "+ht(dt.transform(s))+")"};function ul(e){let t="",n="",s="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,s+=s,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const jn={test:An("#"),parse:ul,transform:De.transform},mt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Pe=mt("deg"),de=mt("%"),j=mt("px"),fl=mt("vh"),dl=mt("vw"),Ci={...de,parse:e=>de.parse(e)/100,transform:e=>de.transform(e*100)},Ue={test:An("hsl","hue"),parse:Si("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+de.transform(ht(t))+", "+de.transform(ht(n))+", "+ht(dt.transform(s))+")"},z={test:e=>De.test(e)||jn.test(e)||Ue.test(e),parse:e=>De.test(e)?De.parse(e):Ue.test(e)?Ue.parse(e):jn.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?De.transform(e):Ue.transform(e),getAnimatableNone:e=>{const t=z.parse(e);return t.alpha=0,z.transform(t)}},hl=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ml(e){return isNaN(e)&&typeof e=="string"&&(e.match(En)?.length||0)+(e.match(hl)?.length||0)>0}const Pi="number",Ei="color",pl="var",gl="var(",Ai="${}",yl=/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 pt(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=t.replace(yl,l=>(z.test(l)?(s.color.push(o),i.push(Ei),n.push(z.parse(l))):l.startsWith(gl)?(s.var.push(o),i.push(pl),n.push(l)):(s.number.push(o),i.push(Pi),n.push(parseFloat(l))),++o,Ai)).split(Ai);return{values:n,split:a,indexes:s,types:i}}function Ri(e){return pt(e).values}function ji(e){const{split:t,types:n}=pt(e),s=t.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=t[r],i[r]!==void 0){const a=n[r];a===Pi?o+=ht(i[r]):a===Ei?o+=z.transform(i[r]):o+=i[r]}return o}}const vl=e=>typeof e=="number"?0:z.test(e)?z.getAnimatableNone(e):e;function xl(e){const t=Ri(e);return ji(e)(t.map(vl))}const Ee={test:ml,parse:Ri,createTransformer:ji,getAnimatableNone:xl};function Mn(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function bl({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let i=0,o=0,r=0;if(!t)i=o=r=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=Mn(l,a,e+1/3),o=Mn(l,a,e),r=Mn(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function Lt(e,t){return n=>n>0?t:e}const F=(e,t,n)=>e+(t-e)*n,Dn=(e,t,n)=>{const s=e*e,i=n*(t*t-s)+s;return i<0?0:Math.sqrt(i)},wl=[jn,De,Ue],Tl=e=>wl.find(t=>t.test(e));function Mi(e){const t=Tl(e);if($e(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Ue&&(n=bl(n)),n}const Di=(e,t)=>{const n=Mi(e),s=Mi(t);if(!n||!s)return Lt(e,t);const i={...n};return o=>(i.red=Dn(n.red,s.red,o),i.green=Dn(n.green,s.green,o),i.blue=Dn(n.blue,s.blue,o),i.alpha=F(n.alpha,s.alpha,o),De.transform(i))},kn=new Set(["none","hidden"]);function Sl(e,t){return kn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Cl(e,t){return n=>F(e,t,n)}function Vn(e){return typeof e=="number"?Cl:typeof e=="string"?Pn(e)?Lt:z.test(e)?Di:Al:Array.isArray(e)?ki:typeof e=="object"?z.test(e)?Di:Pl:Lt}function ki(e,t){const n=[...e],s=n.length,i=e.map((o,r)=>Vn(o)(o,t[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function Pl(e,t){const n={...e,...t},s={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(s[i]=Vn(e[i])(e[i],t[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function El(e,t){const n=[],s={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],r=e.indexes[o][s[o]],a=e.values[r]??0;n[i]=a,s[o]++}return n}const Al=(e,t)=>{const n=Ee.createTransformer(t),s=pt(e),i=pt(t);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?kn.has(e)&&!i.values.length||kn.has(t)&&!s.values.length?Sl(e,t):ct(ki(El(s,i),i.values),n):($e(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Lt(e,t))};function Vi(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?F(e,t,n):Vn(e)(e,t)}const Rl=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>L.update(t,n),stop:()=>Ce(t),now:()=>X.isProcessing?X.timestamp:Q.now()}},Ni=(e,t,n=10)=>{let s="";const i=Math.max(Math.round(t/n),2);for(let o=0;o<i;o++)s+=Math.round(e(o/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Ft=2e4;function Nn(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<Ft;)t+=n,s=e.next(t);return t>=Ft?1/0:t}function jl(e,t=100,n){const s=n({...e,keyframes:[0,t]}),i=Math.min(Nn(s),Ft);return{type:"keyframes",ease:o=>s.next(i*o).value/t,duration:fe(i)}}const Ml=5;function Ii(e,t,n){const s=Math.max(t-Ml,0);return ai(n-e(s),t-s)}const B={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},In=.001;function Dl({duration:e=B.duration,bounce:t=B.bounce,velocity:n=B.velocity,mass:s=B.mass}){let i,o;$e(e<=ae(B.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-t;r=be(B.minDamping,B.maxDamping,r),e=be(B.minDuration,B.maxDuration,fe(e)),r<1?(i=u=>{const c=u*r,f=c*e,d=c-n,m=On(u,r),p=Math.exp(-f);return In-d/m*p},o=u=>{const f=u*r*e,d=f*n+n,m=Math.pow(r,2)*Math.pow(u,2)*e,p=Math.exp(-f),y=On(Math.pow(u,2),r);return(-i(u)+In>0?-1:1)*((d-m)*p)/y}):(i=u=>{const c=Math.exp(-u*e),f=(u-n)*e+1;return-In+c*f},o=u=>{const c=Math.exp(-u*e),f=(n-u)*(e*e);return c*f});const a=5/e,l=Vl(i,o,a);if(e=ae(e),isNaN(l))return{stiffness:B.stiffness,damping:B.damping,duration:e};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:r*2*Math.sqrt(s*u),duration:e}}}const kl=12;function Vl(e,t,n){let s=n;for(let i=1;i<kl;i++)s=s-e(s)/t(s);return s}function On(e,t){return e*Math.sqrt(1-t*t)}const Nl=["duration","bounce"],Il=["stiffness","damping","mass"];function Oi(e,t){return t.some(n=>e[n]!==void 0)}function Ol(e){let t={velocity:B.velocity,stiffness:B.stiffness,damping:B.damping,mass:B.mass,isResolvedFromDuration:!1,...e};if(!Oi(e,Il)&&Oi(e,Nl))if(e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*be(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:B.mass,stiffness:i,damping:o}}else{const n=Dl(e);t={...t,...n,mass:B.mass},t.isResolvedFromDuration=!0}return t}function Bt(e=B.visualDuration,t=B.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:i}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:c,duration:f,velocity:d,isResolvedFromDuration:m}=Ol({...n,velocity:-fe(n.velocity||0)}),p=d||0,y=u/(2*Math.sqrt(l*c)),x=r-o,v=fe(Math.sqrt(l/c)),b=Math.abs(x)<5;s||(s=b?B.restSpeed.granular:B.restSpeed.default),i||(i=b?B.restDelta.granular:B.restDelta.default);let g;if(y<1){const C=On(v,y);g=P=>{const A=Math.exp(-y*v*P);return r-A*((p+y*v*x)/C*Math.sin(C*P)+x*Math.cos(C*P))}}else if(y===1)g=C=>r-Math.exp(-v*C)*(x+(p+v*x)*C);else{const C=v*Math.sqrt(y*y-1);g=P=>{const A=Math.exp(-y*v*P),R=Math.min(C*P,300);return r-A*((p+y*v*x)*Math.sinh(R)+C*x*Math.cosh(R))/C}}const E={calculatedDuration:m&&f||null,next:C=>{const P=g(C);if(m)a.done=C>=f;else{let A=C===0?p:0;y<1&&(A=C===0?ae(p):Ii(g,C,P));const R=Math.abs(A)<=s,N=Math.abs(r-P)<=i;a.done=R&&N}return a.value=a.done?r:P,a},toString:()=>{const C=Math.min(Nn(E),Ft),P=Ni(A=>E.next(C*A).value,C,30);return C+"ms "+P},toTransition:()=>{}};return E}Bt.applyToOptions=e=>{const t=jl(e,100,Bt);return e.ease=t.ease,e.duration=ae(t.duration),e.type="keyframes",e};function Ln({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const f=e[0],d={done:!1,value:f},m=R=>a!==void 0&&R<a||l!==void 0&&R>l,p=R=>a===void 0?l:l===void 0||Math.abs(a-R)<Math.abs(l-R)?a:l;let y=n*t;const x=f+y,v=r===void 0?x:r(x);v!==x&&(y=v-f);const b=R=>-y*Math.exp(-R/s),g=R=>v+b(R),E=R=>{const N=b(R),I=g(R);d.done=Math.abs(N)<=u,d.value=d.done?v:I};let C,P;const A=R=>{m(d.value)&&(C=R,P=Bt({keyframes:[d.value,p(d.value)],velocity:Ii(g,R,d.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return A(0),{calculatedDuration:null,next:R=>{let N=!1;return!P&&C===void 0&&(N=!0,E(R),A(R)),C!==void 0&&R>=C?P.next(R-C):(!N&&E(R),d)}}}function Ll(e,t,n){const s=[],i=n||Te.mix||Vi,o=e.length-1;for(let r=0;r<o;r++){let a=i(e[r],e[r+1]);if(t){const l=Array.isArray(t)?t[r]||se:t;a=ct(l,a)}s.push(a)}return s}function Fl(e,t,{clamp:n=!0,ease:s,mixer:i}={}){const o=e.length;if(we(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const r=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Ll(t,s,i),l=a.length,u=c=>{if(r&&c<e[0])return t[0];let f=0;if(l>1)for(;f<e.length-2&&!(c<e[f+1]);f++);const d=ut(e[f],e[f+1],c);return a[f](d)};return n?c=>u(be(e[0],e[o-1],c)):u}function Bl(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const i=ut(0,t,s);e.push(F(n,1,i))}}function _l(e){const t=[0];return Bl(t,e.length-1),t}function $l(e,t){return e.map(n=>n*t)}function Wl(e,t){return e.map(()=>t||yi).splice(0,e.length-1)}function ze({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const i=el(s)?s.map(bi):bi(s),o={done:!1,value:t[0]},r=$l(n&&n.length===t.length?n:_l(t),e),a=Fl(r,t,{ease:Array.isArray(i)?i:Wl(t,i)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}const Ul=e=>e!==null;function Fn(e,{repeat:t,repeatType:n="loop"},s,i=1){const o=e.filter(Ul),a=i<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const zl={decay:Ln,inertia:Ln,tween:ze,keyframes:ze,spring:Bt};function Li(e){typeof e.type=="string"&&(e.type=zl[e.type])}class Bn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const Kl=e=>e/100;class _n extends Bn{constructor(t){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!==Q.now()&&this.tick(Q.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Li(t);const{type:n=ze,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=t;let{keyframes:a}=t;const l=n||ze;process.env.NODE_ENV!=="production"&&l!==ze&&we(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==ze&&typeof a[0]!="number"&&(this.mixKeyframes=ct(Kl,Vi(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=Nn(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:s,totalDuration:i,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:c,repeat:f,repeatType:d,repeatDelay:m,type:p,onUpdate:y,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?v<0:v>i;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let g=this.currentTime,E=s;if(f){const R=Math.min(this.currentTime,i)/a;let N=Math.floor(R),I=R%1;!I&&R>=1&&(I=1),I===1&&N--,N=Math.min(N,f+1),!!(N%2)&&(d==="reverse"?(I=1-I,m&&(I-=m/a)):d==="mirror"&&(E=r)),g=be(0,1,I)*a}const C=b?{done:!1,value:c[0]}:E.next(g);o&&(C.value=o(C.value));let{done:P}=C;!b&&l!==null&&(P=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return A&&p!==Ln&&(C.value=Fn(c,this.options,x,this.speed)),y&&y(C.value),A&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return fe(this.calculatedDuration)}get time(){return fe(this.currentTime)}set time(t){t=ae(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Q.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=fe(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Rl,startTime:n}=this.options;this.driver||(this.driver=t(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(Q.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(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Xl(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ke=e=>e*180/Math.PI,$n=e=>{const t=ke(Math.atan2(e[1],e[0]));return Wn(t)},Yl={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:$n,rotateZ:$n,skewX:e=>ke(Math.atan(e[1])),skewY:e=>ke(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Wn=e=>(e=e%360,e<0&&(e+=360),e),Fi=$n,Bi=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),_i=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Hl={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Bi,scaleY:_i,scale:e=>(Bi(e)+_i(e))/2,rotateX:e=>Wn(ke(Math.atan2(e[6],e[5]))),rotateY:e=>Wn(ke(Math.atan2(-e[2],e[0]))),rotateZ:Fi,rotate:Fi,skewX:e=>ke(Math.atan(e[4])),skewY:e=>ke(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Un(e){return e.includes("scale")?1:0}function zn(e,t){if(!e||e==="none")return Un(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Hl,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Yl,i=a}if(!i)return Un(t);const o=s[t],r=i[1].split(",").map(ql);return typeof o=="function"?o(r):r[o]}const Gl=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return zn(n,t)};function ql(e){return parseFloat(e.trim())}const Ke=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Xe=new Set(Ke),$i=e=>e===We||e===j,Zl=new Set(["x","y","z"]),Jl=Ke.filter(e=>!Zl.has(e));function Ql(e){const t=[];return Jl.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const Ve={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>zn(t,"x"),y:(e,{transform:t})=>zn(t,"y")};Ve.translateX=Ve.x,Ve.translateY=Ve.y;const Ne=new Set;let Kn=!1,Xn=!1,Yn=!1;function Wi(){if(Xn){const e=Array.from(Ne).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const i=Ql(s);i.length&&(n.set(s,i),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{s.getValue(o)?.set(r)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Xn=!1,Kn=!1,Ne.forEach(e=>e.complete(Yn)),Ne.clear()}function Ui(){Ne.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Xn=!0)})}function ec(){Yn=!0,Ui(),Wi(),Yn=!1}class Hn{constructor(t,n,s,i,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(Ne.add(this),Kn||(Kn=!0,L.read(Ui),L.resolveKeyframes(Wi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:i}=this;if(t[0]===null){const o=i?.get(),r=t[t.length-1];if(o!==void 0)t[0]=o;else if(s&&n){const a=s.readValue(n,r);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=r),i&&o===void 0&&i.set(t[0])}Xl(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ne.delete(this)}cancel(){this.state==="scheduled"&&(Ne.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const tc=e=>e.startsWith("--");function nc(e,t,n){tc(t)?e.style.setProperty(t,n):e.style[t]=n}const sc=vn(()=>window.ScrollTimeline!==void 0),ic={};function rc(e,t){const n=vn(e);return()=>ic[t]??n()}const zi=rc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),gt=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,Ki={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:gt([0,.65,.55,1]),circOut:gt([.55,0,1,.45]),backIn:gt([.31,.01,.66,-.59]),backOut:gt([.33,1.53,.69,.99])};function Xi(e,t){if(e)return typeof e=="function"?zi()?Ni(e,t):"ease-out":vi(e)?gt(e):Array.isArray(e)?e.map(n=>Xi(n,t)||Ki.easeOut):Ki[e]}function oc(e,t,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const f=Xi(a,i);Array.isArray(f)&&(c.easing=f);const d={delay:s,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return u&&(d.pseudoElement=u),e.animate(c,d)}function Yi(e){return typeof e=="function"&&"applyToOptions"in e}function ac({type:e,...t}){return Yi(e)&&zi()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class lc extends Bn{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:s,keyframes:i,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=t,we(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=ac(t);this.animation=oc(n,s,i,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=Fn(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):nc(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:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return fe(Number(t))}get time(){return fe(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=ae(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&sc()?(this.animation.timeline=t,se):n(this)}}const Hi={anticipate:mi,backInOut:hi,circInOut:gi};function cc(e){return e in Hi}function uc(e){typeof e.ease=="string"&&cc(e.ease)&&(e.ease=Hi[e.ease])}const Gi=10;class fc extends lc{constructor(t){uc(t),Li(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:s,onComplete:i,element:o,...r}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new _n({...r,autoplay:!1}),l=ae(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-Gi).value,a.sample(l).value,Gi),a.stop()}}const qi=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ee.test(e)||e==="0")&&!e.startsWith("url("));function dc(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function hc(e,t,n,s){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],r=qi(i,t),a=qi(o,t);return $e(r===a,`You are trying to animate ${t} from "${i}" to "${o}". "${r?o:i}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:dc(e)||(n==="spring"||Yi(n))&&s}function Gn(e){e.duration=0,e.type}const mc=new Set(["opacity","clipPath","filter","transform"]),pc=vn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function gc(e){const{motionValue:t,name:n,repeatDelay:s,repeatType:i,damping:o,type:r}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return pc()&&n&&mc.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const yc=40;class vc extends Bn{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:l,motionValue:u,element:c,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Q.now();const d={autoplay:t,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:l,motionValue:u,element:c,...f},m=c?.KeyframeResolver||Hn;this.keyframeResolver=new m(a,(p,y,x)=>this.onKeyframesResolved(p,y,d,!x),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,s,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:u,onUpdate:c}=s;this.resolvedAt=Q.now(),hc(t,o,r,a)||((Te.instantAnimations||!l)&&c?.(Fn(t,s,n)),t[0]=t[t.length-1],Gn(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>yc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},m=!u&&gc(d)?new fc({...d,element:d.motionValue.owner.current}):new _n(d);m.finished.then(()=>this.notifyFinished()).catch(se),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),ec()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const xc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function bc(e){const t=xc.exec(e);if(!t)return[,];const[,n,s,i]=t;return[`--${n??s}`,i]}const wc=4;function Zi(e,t,n=1){we(n<=wc,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=bc(e);if(!s)return;const o=window.getComputedStyle(t).getPropertyValue(s);if(o){const r=o.trim();return ii(r)?parseFloat(r):r}return Pn(i)?Zi(i,t,n+1):i}function qn(e,t){return e?.[t]??e?.default??e}const Ji=new Set(["width","height","top","left","right","bottom",...Ke]),Tc={test:e=>e==="auto",parse:e=>e},Qi=e=>t=>t.test(e),er=[We,j,de,Pe,dl,fl,Tc],tr=e=>er.find(Qi(e));function Sc(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||oi(e):!0}const Cc=new Set(["brightness","contrast","saturate","opacity"]);function Pc(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(En)||[];if(!s)return e;const i=n.replace(s,"");let o=Cc.has(t)?1:0;return s!==n&&(o*=100),t+"("+o+i+")"}const Ec=/\b([a-z-]*)\(.*?\)/gu,Zn={...Ee,getAnimatableNone:e=>{const t=e.match(Ec);return t?t.map(Pc).join(" "):e}},nr={...We,transform:Math.round},Jn={borderWidth:j,borderTopWidth:j,borderRightWidth:j,borderBottomWidth:j,borderLeftWidth:j,borderRadius:j,radius:j,borderTopLeftRadius:j,borderTopRightRadius:j,borderBottomRightRadius:j,borderBottomLeftRadius:j,width:j,maxWidth:j,height:j,maxHeight:j,top:j,right:j,bottom:j,left:j,padding:j,paddingTop:j,paddingRight:j,paddingBottom:j,paddingLeft:j,margin:j,marginTop:j,marginRight:j,marginBottom:j,marginLeft:j,backgroundPositionX:j,backgroundPositionY:j,...{rotate:Pe,rotateX:Pe,rotateY:Pe,rotateZ:Pe,scale:Ot,scaleX:Ot,scaleY:Ot,scaleZ:Ot,skew:Pe,skewX:Pe,skewY:Pe,distance:j,translateX:j,translateY:j,translateZ:j,x:j,y:j,z:j,perspective:j,transformPerspective:j,opacity:dt,originX:Ci,originY:Ci,originZ:j},zIndex:nr,fillOpacity:dt,strokeOpacity:dt,numOctaves:nr},Ac={...Jn,color:z,backgroundColor:z,outlineColor:z,fill:z,stroke:z,borderColor:z,borderTopColor:z,borderRightColor:z,borderBottomColor:z,borderLeftColor:z,filter:Zn,WebkitFilter:Zn},sr=e=>Ac[e];function ir(e,t){let n=sr(e);return n!==Zn&&(n=Ee),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Rc=new Set(["auto","none","0"]);function jc(e,t,n){let s=0,i;for(;s<e.length&&!i;){const o=e[s];typeof o=="string"&&!Rc.has(o)&&pt(o).values.length&&(i=e[s]),s++}if(i&&n)for(const o of t)e[o]=ir(n,i)}class Mc extends Hn{constructor(t,n,s,i,o){super(t,n,s,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),Pn(u))){const c=Zi(u,n.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Ji.has(s)||t.length!==2)return;const[i,o]=t,r=tr(i),a=tr(o);if(r!==a)if($i(r)&&$i(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else Ve[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let i=0;i<t.length;i++)(t[i]===null||Sc(t[i]))&&s.push(i);s.length&&jc(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ve[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(s,i).jump(i,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,r=s[o];s[o]=Ve[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{t.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function Dc(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const i=n?.[e]??s.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const rr=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function or(e){return ri(e)&&"offsetHeight"in e}const ar=30,kc=e=>!isNaN(parseFloat(e));class Vc{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=Q.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 o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Q.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=kc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&bn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new xn);const s=this.events[t].add(n);return t==="change"?()=>{s(),L.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Q.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ar)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ar);return ai(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ye(e,t){return new Vc(e,t)}const{schedule:Qn}=wi(queueMicrotask,!1),le={x:!1,y:!1};function lr(){return le.x||le.y}function Nc(e){return e==="x"||e==="y"?le[e]?null:(le[e]=!0,()=>{le[e]=!1}):le.x||le.y?null:(le.x=le.y=!0,()=>{le.x=le.y=!1})}function cr(e,t){const n=Dc(e),s=new AbortController,i={passive:!0,...t,signal:s.signal};return[n,i,()=>s.abort()]}function ur(e){return!(e.pointerType==="touch"||lr())}function Ic(e,t,n={}){const[s,i,o]=cr(e,n),r=a=>{if(!ur(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const c=f=>{ur(f)&&(u(f),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const fr=(e,t)=>t?e===t?!0:fr(e,t.parentElement):!1,es=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Oc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Lc(e){return Oc.has(e.tagName)||e.tabIndex!==-1}const _t=new WeakSet;function dr(e){return t=>{t.key==="Enter"&&e(t)}}function ts(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Fc=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=dr(()=>{if(_t.has(n))return;ts(n,"down");const i=dr(()=>{ts(n,"up")}),o=()=>ts(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function hr(e){return es(e)&&!lr()}function Bc(e,t,n={}){const[s,i,o]=cr(e,n),r=a=>{const l=a.currentTarget;if(!hr(a))return;_t.add(l);const u=t(l,a),c=(m,p)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),_t.has(l)&&_t.delete(l),hr(m)&&typeof u=="function"&&u(m,{success:p})},f=m=>{c(m,l===window||l===document||n.useGlobalTarget||fr(l,m.target))},d=m=>{c(m,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",d,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),or(a)&&(a.addEventListener("focus",u=>Fc(u,i)),!Lc(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function mr(e){return ri(e)&&"ownerSVGElement"in e}function _c(e){return mr(e)&&e.tagName==="svg"}const Y=e=>!!(e&&e.getVelocity),$c=[...er,z,Ee],Wc=e=>$c.find(Qi(e)),ns=T.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class Uc extends S.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const s=n.offsetParent,i=or(s)&&s.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=i-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function zc({children:e,isPresent:t,anchorX:n,root:s}){const i=T.useId(),o=T.useRef(null),r=T.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=T.useContext(ns);return T.useInsertionEffect(()=>{const{width:l,height:u,top:c,left:f,right:d}=r.current;if(t||!o.current||!l||!u)return;const m=n==="left"?`left: ${f}`:`right: ${d}`;o.current.dataset.motionPopId=i;const p=document.createElement("style");a&&(p.nonce=a);const y=s??document.head;return y.appendChild(p),p.sheet&&p.sheet.insertRule(`
|
|
23
23
|
[data-motion-pop-id="${i}"] {
|
|
24
24
|
position: absolute !important;
|
|
25
25
|
width: ${l}px !important;
|
|
@@ -27,93 +27,98 @@ React keys must be passed directly to JSX without using spread:
|
|
|
27
27
|
${m}px !important;
|
|
28
28
|
top: ${c}px !important;
|
|
29
29
|
}
|
|
30
|
-
`),()=>{g.contains(p)&&g.removeChild(p)}},[e]),h.jsx($c,{isPresent:e,childRef:o,sizeRef:r,children:C.cloneElement(t,{ref:o})})}const Uc=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:o,mode:r,anchorX:a,root:l})=>{const u=hn(zc),c=T.useId();let f=!0,d=T.useMemo(()=>(f=!1,{id:c,initial:e,isPresent:n,custom:i,onExitComplete:m=>{u.set(m,!0);for(const p of u.values())if(!p)return;s&&s()},register:m=>(u.set(m,!1),()=>u.delete(m))}),[n,u,s]);return o&&f&&(d={...d}),T.useMemo(()=>{u.forEach((m,p)=>u.set(p,!1))},[n]),C.useEffect(()=>{!n&&!u.size&&s&&s()},[n]),r==="popLayout"&&(t=h.jsx(Wc,{isPresent:n,anchorX:a,root:l,children:t})),h.jsx(ke.Provider,{value:d,children:t})};function zc(){return new Map}function pr(t=!0){const e=T.useContext(ke);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=T.useId();T.useEffect(()=>{if(t)return i(o)},[t]);const r=T.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const $e=t=>t.key||"";function gr(t){const e=[];return T.Children.forEach(t,n=>{T.isValidElement(n)&&e.push(n)}),e}const ss=({children:t,custom:e,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:o="sync",propagate:r=!1,anchorX:a="left",root:l})=>{const[u,c]=pr(r),f=T.useMemo(()=>gr(t),[t]),d=r&&!u?[]:f.map($e),m=T.useRef(!0),p=T.useRef(f),g=hn(()=>new Map),[x,y]=T.useState(f),[w,v]=T.useState(f);si(()=>{m.current=!1,p.current=f;for(let P=0;P<w.length;P++){const A=$e(w[P]);d.includes(A)?g.delete(A):g.get(A)!==!0&&g.set(A,!1)}},[w,d.length,d.join("-")]);const E=[];if(f!==x){let P=[...f];for(let A=0;A<w.length;A++){const j=w[A],N=$e(j);d.includes(N)||(P.splice(A,0,j),E.push(j))}return o==="wait"&&E.length&&(P=E),v(gr(P)),y(f),null}process.env.NODE_ENV!=="production"&&o==="wait"&&w.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:S}=T.useContext(dn);return h.jsx(h.Fragment,{children:w.map(P=>{const A=$e(P),j=r&&!u?!1:f===w||d.includes(A),N=()=>{if(g.has(A))g.set(A,!0);else return;let O=!0;g.forEach(U=>{U||(O=!1)}),O&&(S?.(),v(p.current),r&&c?.(),s&&s())};return h.jsx(Uc,{isPresent:j,initial:!m.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:o,root:l,onExitComplete:j?void 0:N,anchorX:a,children:P},A)})})},yr=T.createContext({strict:!1}),vr={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"]},Gt={};for(const t in vr)Gt[t]={isEnabled:e=>vr[t].some(n=>!!e[n])};function Kc(t){for(const e in t)Gt[e]={...Gt[e],...t[e]}}const Yc=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 We(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Yc.has(t)}let xr=t=>!We(t);function Hc(t){typeof t=="function"&&(xr=e=>e.startsWith("on")?!We(e):t(e))}try{Hc(require("@emotion/is-prop-valid").default)}catch{}function Gc(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(xr(i)||n===!0&&We(i)||!e&&!We(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const Ue=T.createContext({});function ze(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function ye(t){return typeof t=="string"||Array.isArray(t)}const is=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],rs=["initial",...is];function Ke(t){return ze(t.animate)||rs.some(e=>ye(t[e]))}function br(t){return!!(Ke(t)||t.variants)}function Xc(t,e){if(Ke(t)){const{initial:n,animate:s}=t;return{initial:n===!1||ye(n)?n:void 0,animate:ye(s)?s:void 0}}return t.inherit!==!1?e:{}}function qc(t){const{initial:e,animate:n}=Xc(t,T.useContext(Ue));return T.useMemo(()=>({initial:e,animate:n}),[wr(e),wr(n)])}function wr(t){return Array.isArray(t)?t.join(" "):t}const ve={};function Zc(t){for(const e in t)ve[e]=t[e],Cn(e)&&(ve[e].isCSSVariable=!0)}function Tr(t,{layout:e,layoutId:n}){return Yt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!ve[t]||t==="opacity")}const Jc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Qc=Kt.length;function tu(t,e,n){let s="",i=!0;for(let o=0;o<Qc;o++){const r=Kt[o],a=t[r];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(r.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=rr(a,Jn[r]);if(!l){i=!1;const c=Jc[r]||r;s+=`${c}(${u}) `}n&&(e[r]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function os(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,a=!1;for(const l in e){const u=e[l];if(Yt.has(l)){r=!0;continue}else if(Cn(l)){i[l]=u;continue}else{const c=rr(u,Jn[l]);l.startsWith("origin")?(a=!0,o[l]=c):s[l]=c}}if(e.transform||(r||n?s.transform=tu(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=o;s.transformOrigin=`${l} ${u} ${c}`}}const as=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Sr(t,e,n){for(const s in e)!H(e[s])&&!Tr(s,n)&&(t[s]=e[s])}function eu({transformTemplate:t},e){return T.useMemo(()=>{const n=as();return os(n,e,t),Object.assign({},n.vars,n.style)},[e])}function nu(t,e){const n=t.style||{},s={};return Sr(s,n,t),Object.assign(s,eu(t,e)),s}function su(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 iu={offset:"stroke-dashoffset",array:"stroke-dasharray"},ru={offset:"strokeDashoffset",array:"strokeDasharray"};function ou(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?iu:ru;t[o.offset]=R.transform(-s);const r=R.transform(e),a=R.transform(n);t[o.array]=`${r} ${a}`}function Cr(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},l,u,c){if(os(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:d}=t;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=c?.transformBox??"fill-box",delete f.transformBox),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),i!==void 0&&ou(f,i,o,r,!1)}const Pr=()=>({...as(),attrs:{}}),Er=t=>typeof t=="string"&&t.toLowerCase()==="svg";function au(t,e,n,s){const i=T.useMemo(()=>{const o=Pr();return Cr(o,e,Er(s),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};Sr(o,t.style,t),i.style={...o,...i.style}}return i}const lu=["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 ls(t){return typeof t!="string"||t.includes("-")?!1:!!(lu.indexOf(t)>-1||/[A-Z]/u.test(t))}function cu(t,e,n,{latestValues:s},i,o=!1){const a=(ls(t)?au:su)(e,s,i,t),l=Gc(e,typeof t=="string",o),u=t!==T.Fragment?{...l,...a,ref:n}:{},{children:c}=e,f=T.useMemo(()=>H(c)?c.get():c,[c]);return T.createElement(t,{...u,children:f})}function Ar(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function cs(t,e,n,s){if(typeof e=="function"){const[i,o]=Ar(s);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=Ar(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function Ye(t){return H(t)?t.get():t}function uu({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:fu(n,s,i,t),renderState:e()}}function fu(t,e,n,s){const i={},o=s(t,{});for(const d in o)i[d]=Ye(o[d]);let{initial:r,animate:a}=t;const l=Ke(t),u=br(t);e&&u&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||r===!1;const f=c?a:r;if(f&&typeof f!="boolean"&&!ze(f)){const d=Array.isArray(f)?f:[f];for(let m=0;m<d.length;m++){const p=cs(t,d[m]);if(p){const{transitionEnd:g,transition:x,...y}=p;for(const w in y){let v=y[w];if(Array.isArray(v)){const E=c?v.length-1:0;v=v[E]}v!==null&&(i[w]=v)}for(const w in g)i[w]=g[w]}}}return i}const jr=t=>(e,n)=>{const s=T.useContext(Ue),i=T.useContext(ke),o=()=>uu(t,e,s,i);return n?o():hn(o)};function us(t,e,n){const{style:s}=t,i={};for(const o in s)(H(s[o])||e.style&&H(e.style[o])||Tr(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=s[o]);return i}const du=jr({scrapeMotionValuesFromProps:us,createRenderState:as});function Rr(t,e,n){const s=us(t,e,n);for(const i in t)if(H(t[i])||H(e[i])){const o=Kt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}const hu=jr({scrapeMotionValuesFromProps:Rr,createRenderState:Pr}),mu=Symbol.for("motionComponentSymbol");function Xt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function pu(t,e,n){return T.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):Xt(n)&&(n.current=s))},[e])}const fs=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Mr="data-"+fs("framerAppearId"),Dr=T.createContext({});function gu(t,e,n,s,i){const{visualElement:o}=T.useContext(Ue),r=T.useContext(yr),a=T.useContext(ke),l=T.useContext(ns).reducedMotion,u=T.useRef(null);s=s||r.renderer,!u.current&&s&&(u.current=s(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,f=T.useContext(Dr);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&yu(u.current,n,i,f);const d=T.useRef(!1);T.useInsertionEffect(()=>{c&&d.current&&c.update(n,a)});const m=n[Mr],p=T.useRef(!!m&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return si(()=>{c&&(d.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),p.current&&c.animationState&&c.animationState.animateChanges())}),T.useEffect(()=>{c&&(!p.current&&c.animationState&&c.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(m)}),p.current=!1),c.enteringChildren=void 0)}),c}function yu(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Vr(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&Xt(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:u})}function Vr(t){if(t)return t.options.allowProjection!==!1?t.projection:Vr(t.parent)}function ds(t,{forwardMotionProps:e=!1}={},n,s){n&&Kc(n);const i=ls(t)?hu:du;function o(a,l){let u;const c={...T.useContext(ns),...a,layoutId:vu(a)},{isStatic:f}=c,d=qc(a),m=i(a,f);if(!f&&mn){xu(c,n);const p=bu(c);u=p.MeasureLayout,d.visualElement=gu(t,m,c,s,p.ProjectionNode)}return h.jsxs(Ue.Provider,{value:d,children:[u&&d.visualElement?h.jsx(u,{visualElement:d.visualElement,...c}):null,cu(t,a,pu(m,d.visualElement,l),m,f,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const r=T.forwardRef(o);return r[mu]=t,r}function vu({layoutId:t}){const e=T.useContext(dn).id;return e&&t!==void 0?e+"-"+t:t}function xu(t,e){const n=T.useContext(yr).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?$t(!1,s,"lazy-strict-mode"):wt(!1,s,"lazy-strict-mode")}}function bu(t){const{drag:e,layout:n}=Gt;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function wu(t,e){if(typeof Proxy>"u")return ds;const n=new Map,s=(o,r)=>ds(o,r,t,e),i=(o,r)=>(process.env.NODE_ENV!=="production"&&bn(!1,"motion() is deprecated. Use motion.create() instead."),s(o,r));return new Proxy(i,{get:(o,r)=>r==="create"?s:(n.has(r)||n.set(r,ds(r,void 0,t,e)),n.get(r))})}function kr({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Tu({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Su(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 hs(t){return t===void 0||t===1}function ms({scale:t,scaleX:e,scaleY:n}){return!hs(t)||!hs(e)||!hs(n)}function Ot(t){return ms(t)||Nr(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Nr(t){return Or(t.x)||Or(t.y)}function Or(t){return t&&t!=="0%"}function He(t,e,n){const s=t-n,i=e*s;return n+i}function Ir(t,e,n,s,i){return i!==void 0&&(t=He(t,i,s)),He(t,n,s)+e}function ps(t,e=0,n=1,s,i){t.min=Ir(t.min,e,n,s,i),t.max=Ir(t.max,e,n,s,i)}function Lr(t,{x:e,y:n}){ps(t.x,e.translate,e.scale,e.originPoint),ps(t.y,n.translate,n.scale,n.originPoint)}const Fr=.999999999999,Br=1.0000000000001;function Cu(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Zt(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Lr(t,r)),s&&Ot(o.latestValues)&&Zt(t,o.latestValues))}e.x<Br&&e.x>Fr&&(e.x=1),e.y<Br&&e.y>Fr&&(e.y=1)}function qt(t,e){t.min=t.min+e,t.max=t.max+e}function _r(t,e,n,s,i=.5){const o=F(t.min,t.max,i);ps(t,e,n,o,s)}function Zt(t,e){_r(t.x,e.x,e.scaleX,e.scale,e.originX),_r(t.y,e.y,e.scaleY,e.scale,e.originY)}function $r(t,e){return kr(Su(t.getBoundingClientRect(),e))}function Pu(t,e,n){const s=$r(t,n),{scroll:i}=e;return i&&(qt(s.x,i.offset.x),qt(s.y,i.offset.y)),s}const Wr=()=>({translate:0,scale:1,origin:0,originPoint:0}),Jt=()=>({x:Wr(),y:Wr()}),Ur=()=>({min:0,max:0}),W=()=>({x:Ur(),y:Ur()}),gs={current:null},zr={current:!1};function Eu(){if(zr.current=!0,!!mn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>gs.current=t.matches;t.addEventListener("change",e),e()}else gs.current=!1}const Au=new WeakMap;function ju(t,e,n){for(const s in e){const i=e[s],o=n[s];if(H(i))t.addValue(s,i);else if(H(o))t.addValue(s,Ht(i,{owner:t}));else if(o!==i)if(t.hasValue(s)){const r=t.getValue(s);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=t.getStaticValue(s);t.addValue(s,Ht(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const Kr=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ru{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Gn,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=Q.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,L.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=r;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=!!o,this.isControllingVariants=Ke(n),this.isVariantNode=br(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const m=f[d];l[d]!==void 0&&H(m)&&m.set(l[d])}}mount(e){this.current=e,Au.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)),zr.current||Eu(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:gs.current,process.env.NODE_ENV!=="production"&&bn(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=Yt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&L.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o&&o(),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 Gt){const n=Gt[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 o=this.features[e];o.isMounted?o.update():(o.mount(),o.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<Kr.length;s++){const i=Kr[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=ju(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=Ht(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"&&(ii(s)||oi(s))?s=parseFloat(s):!_c(s)&&Et.test(n)&&(s=ir(e,n)),this.setBaseTarget(e,H(s)?s.get():s)),H(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 o=cs(this.props,n,this.presenceContext?.custom);o&&(s=o[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!H(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 xn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Qn.render(this.render)}}class Yr extends Ru{constructor(){super(...arguments),this.KeyframeResolver=jc}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;H(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Hr(t,{style:e,vars:n},s,i){const o=t.style;let r;for(r in e)o[r]=e[r];i?.applyProjectionStyles(o,s);for(r in n)o.setProperty(r,n[r])}function Mu(t){return window.getComputedStyle(t)}class Du extends Yr{constructor(){super(...arguments),this.type="html",this.renderInstance=Hr}readValueFromInstance(e,n){if(Yt.has(n))return this.projection?.isProjecting?Un(n):Hl(e,n);{const s=Mu(e),i=(Cn(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return $r(e,n)}build(e,n,s){os(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return us(e,n,s)}}const Gr=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 Vu(t,e,n,s){Hr(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Gr.has(i)?i:fs(i),e.attrs[i])}class ku extends Yr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=W}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Yt.has(n)){const s=sr(n);return s&&s.default||0}return n=Gr.has(n)?n:fs(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Rr(e,n,s)}build(e,n,s){Cr(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){Vu(e,n,s,i)}mount(e){this.isSVGTag=Er(e.tagName),super.mount(e)}}const Nu=(t,e)=>ls(t)?new ku(e):new Du(e,{allowProjection:t!==T.Fragment});function Qt(t,e,n){const s=t.getProps();return cs(s,e,n!==void 0?n:s.custom,t)}const ys=t=>Array.isArray(t);function Ou(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ht(n))}function Iu(t){return ys(t)?t[t.length-1]||0:t}function Lu(t,e){const n=Qt(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=Iu(o[r]);Ou(t,r,a)}}function Fu(t){return!!(H(t)&&t.add)}function vs(t,e){const n=t.getValue("willChange");if(Fu(n))return n.add(e);if(!n&&Tt.WillChange){const s=new Tt.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function Xr(t){return t.props[Mr]}const Bu=t=>t!==null;function _u(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(Bu),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[o]}const $u={type:"spring",stiffness:500,damping:25,restSpeed:10},Wu=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Uu={type:"keyframes",duration:.8},zu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ku=(t,{keyframes:e})=>e.length>2?Uu:Yt.has(t)?t.startsWith("scale")?Wu(e[1]):$u:zu;function Yu({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const xs=(t,e,n,s={},i,o)=>r=>{const a=qn(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-at(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:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};Yu(a)||Object.assign(c,Ku(t,c)),c.duration&&(c.duration=at(c.duration)),c.repeatDelay&&(c.repeatDelay=at(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Xn(c),c.delay===0&&(f=!0)),(Tt.instantAnimations||Tt.skipAnimations)&&(f=!0,Xn(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,f&&!o&&e.get()!==void 0){const d=_u(c.keyframes,a);if(d!==void 0){L.update(()=>{c.onUpdate(d),c.onComplete()});return}}return a.isSync?new _n(c):new gc(c)};function Hu({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function qr(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;s&&(o=s);const l=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const c in a){const f=t.getValue(c,t.latestValues[c]??null),d=a[c];if(d===void 0||u&&Hu(u,c))continue;const m={delay:n,...qn(o||{},c)},p=f.get();if(p!==void 0&&!f.isAnimating&&!Array.isArray(d)&&d===p&&!m.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const y=Xr(t);if(y){const w=window.MotionHandoffAnimation(y,c,L);w!==null&&(m.startTime=w,g=!0)}}vs(t,c),f.start(xs(c,f,d,t.shouldReduceMotion&&Ji.has(c)?{type:!1}:m,t,g));const x=f.animation;x&&l.push(x)}return r&&Promise.all(l).then(()=>{L.update(()=>{r&&Lu(t,r)})}),l}function Zr(t,e,n,s=0,i=1){const o=Array.from(t).sort((u,c)=>u.sortNodePosition(c)).indexOf(e),r=t.size,a=(r-1)*s;return typeof n=="function"?n(o,r):i===1?o*s:a-o*s}function bs(t,e,n={}){const s=Qt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(qr(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:f}=i;return Gu(t,e,l,u,c,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[o,r]:[r,o];return l().then(()=>u())}else return Promise.all([o(),r(n.delay)])}function Gu(t,e,n=0,s=0,i=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(bs(l,e,{...r,delay:n+(typeof s=="function"?0:s)+Zr(t.variantChildren,l,s,i,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function Xu(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>bs(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=bs(t,e,n);else{const i=typeof e=="function"?Qt(t,e,n.custom):e;s=Promise.all(qr(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}function Jr(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 qu=rs.length;function Qr(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Qr(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<qu;n++){const s=rs[n],i=t.props[s];(ye(i)||i===!1)&&(e[s]=i)}return e}const Zu=[...is].reverse(),Ju=is.length;function Qu(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Xu(t,n,s)))}function tf(t){let e=Qu(t),n=to(),s=!0;const i=l=>(u,c)=>{const f=Qt(t,c,l==="exit"?t.presenceContext?.custom:void 0);if(f){const{transition:d,transitionEnd:m,...p}=f;u={...u,...p,...m}}return u};function o(l){e=l(t)}function r(l){const{props:u}=t,c=Qr(t.parent)||{},f=[],d=new Set;let m={},p=1/0;for(let x=0;x<Ju;x++){const y=Zu[x],w=n[y],v=u[y]!==void 0?u[y]:c[y],E=ye(v),S=y===l?w.isActive:null;S===!1&&(p=x);let P=v===c[y]&&v!==u[y]&&E;if(P&&s&&t.manuallyAnimateOnMount&&(P=!1),w.protectedKeys={...m},!w.isActive&&S===null||!v&&!w.prevProp||ze(v)||typeof v=="boolean")continue;const A=ef(w.prevProp,v);let j=A||y===l&&w.isActive&&!P&&E||x>p&&E,N=!1;const O=Array.isArray(v)?v:[v];let U=O.reduce(i(y),{});S===!1&&(U={});const{prevResolvedValues:et={}}=w,I={...et,...U},K=_=>{j=!0,d.has(_)&&(N=!0,d.delete(_)),w.needsAnimating[_]=!0;const k=t.getValue(_);k&&(k.liveStyle=!1)};for(const _ in I){const k=U[_],J=et[_];if(m.hasOwnProperty(_))continue;let b=!1;ys(k)&&ys(J)?b=!Jr(k,J):b=k!==J,b?k!=null?K(_):d.add(_):k!==void 0&&d.has(_)?K(_):w.protectedKeys[_]=!0}w.prevProp=v,w.prevResolvedValues=U,w.isActive&&(m={...m,...U}),s&&t.blockInitialAnimation&&(j=!1);const vt=P&&A;j&&(!vt||N)&&f.push(...O.map(_=>{const k={type:y};if(typeof _=="string"&&s&&!vt&&t.manuallyAnimateOnMount&&t.parent){const{parent:J}=t,b=Qt(J,_);if(J.enteringChildren&&b){const{delayChildren:D}=b.transition||{};k.delay=Zr(J.enteringChildren,t,D)}}return{animation:_,options:k}}))}if(d.size){const x={};if(typeof u.initial!="boolean"){const y=Qt(t,Array.isArray(u.initial)?u.initial[0]:u.initial);y&&y.transition&&(x.transition=y.transition)}d.forEach(y=>{const w=t.getBaseTarget(y),v=t.getValue(y);v&&(v.liveStyle=!0),x[y]=w??null}),f.push({animation:x})}let g=!!f.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(g=!1),s=!1,g?e(f):Promise.resolve()}function a(l,u){if(n[l].isActive===u)return Promise.resolve();t.variantChildren?.forEach(f=>f.animationState?.setActive(l,u)),n[l].isActive=u;const c=r(l);for(const f in n)n[f].protectedKeys={};return c}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=to(),s=!0}}}function ef(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Jr(e,t):!1}function It(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function to(){return{animate:It(!0),whileInView:It(),whileHover:It(),whileTap:It(),whileDrag:It(),whileFocus:It(),exit:It()}}class At{constructor(e){this.isMounted=!1,this.node=e}update(){}}class nf extends At{constructor(e){super(e),e.animationState||(e.animationState=tf(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 sf=0;class rf extends At{constructor(){super(...arguments),this.id=sf++}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 of={animation:{Feature:nf},exit:{Feature:rf}};function xe(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function be(t){return{point:{x:t.pageX,y:t.pageY}}}const af=t=>e=>ts(e)&&t(e,be(e));function we(t,e,n,s){return xe(t,e,af(n),s)}const eo=1e-4,lf=1-eo,cf=1+eo,no=.01,uf=0-no,ff=0+no;function Z(t){return t.max-t.min}function df(t,e,n){return Math.abs(t-e)<=n}function so(t,e,n,s=.5){t.origin=s,t.originPoint=F(e.min,e.max,t.origin),t.scale=Z(n)/Z(e),t.translate=F(n.min,n.max,t.origin)-t.originPoint,(t.scale>=lf&&t.scale<=cf||isNaN(t.scale))&&(t.scale=1),(t.translate>=uf&&t.translate<=ff||isNaN(t.translate))&&(t.translate=0)}function Te(t,e,n,s){so(t.x,e.x,n.x,s?s.originX:void 0),so(t.y,e.y,n.y,s?s.originY:void 0)}function io(t,e,n){t.min=n.min+e.min,t.max=t.min+Z(e)}function hf(t,e,n){io(t.x,e.x,n.x),io(t.y,e.y,n.y)}function ro(t,e,n){t.min=e.min-n.min,t.max=t.min+Z(e)}function Se(t,e,n){ro(t.x,e.x,n.x),ro(t.y,e.y,n.y)}function st(t){return[t("x"),t("y")]}const oo=({current:t})=>t?t.ownerDocument.defaultView:null,ao=(t,e)=>Math.abs(t-e);function mf(t,e){const n=ao(t.x,e.x),s=ao(t.y,e.y);return Math.sqrt(n**2+s**2)}class lo{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:r=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=Ts(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,p=mf(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!p)return;const{point:g}=d,{timestamp:x}=Y;this.history.push({...g,timestamp:x});const{onStart:y,onMove:w}=this.handlers;m||(y&&y(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,d)},this.handlePointerMove=(d,m)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=ws(m,this.transformPagePoint),L.update(this.updatePoint,!0)},this.handlePointerUp=(d,m)=>{this.end();const{onEnd:p,onSessionEnd:g,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Ts(d.type==="pointercancel"?this.lastMoveEventInfo:ws(m,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,y),g&&g(d,y)},!ts(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const a=be(e),l=ws(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=Y;this.history=[{...u,timestamp:c}];const{onSessionStart:f}=n;f&&f(e,Ts(l,this.history)),this.removeListeners=ce(we(this.contextWindow,"pointermove",this.handlePointerMove),we(this.contextWindow,"pointerup",this.handlePointerUp),we(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Ct(this.updatePoint)}}function ws(t,e){return e?{point:e(t.point)}:t}function co(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ts({point:t},e){return{point:t,delta:co(t,uo(e)),offset:co(t,pf(e)),velocity:gf(e,.1)}}function pf(t){return t[0]}function uo(t){return t[t.length-1]}function gf(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=uo(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>at(e)));)n--;if(!s)return{x:0,y:0};const o=ft(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function yf(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 fo(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 vf(t,{top:e,left:n,bottom:s,right:i}){return{x:fo(t.x,n,i),y:fo(t.y,e,s)}}function ho(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 xf(t,e){return{x:ho(t.x,e.x),y:ho(t.y,e.y)}}function bf(t,e){let n=.5;const s=Z(t),i=Z(e);return i>s?n=ue(e.min,e.max-s,t.min):s>i&&(n=ue(t.min,t.max-i,e.min)),bt(0,1,n)}function wf(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 Ss=.35;function Tf(t=Ss){return t===!1?t=0:t===!0&&(t=Ss),{x:mo(t,"left","right"),y:mo(t,"top","bottom")}}function mo(t,e,n){return{min:po(t,e),max:po(t,n)}}function po(t,e){return typeof t=="number"?t:t[e]||0}const Sf=new WeakMap;class Cf{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 o=f=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(be(f).point)},r=(f,d)=>{const{drag:m,dragPropagation:p,onDragStart:g}=this.getProps();if(m&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Vc(m),!this.openDragLock))return;this.latestPointerEvent=f,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),st(y=>{let w=this.getAxisMotionValue(y).get()||0;if(dt.test(w)){const{projection:v}=this.visualElement;if(v&&v.layout){const E=v.layout.layoutBox[y];E&&(w=Z(E)*(parseFloat(w)/100))}}this.originPoint[y]=w}),g&&L.postRender(()=>g(f,d)),vs(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d;const{dragPropagation:m,dragDirectionLock:p,onDirectionLock:g,onDrag:x}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:y}=d;if(p&&this.currentDirection===null){this.currentDirection=Pf(y),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",d.point,y),this.updateAxis("y",d.point,y),this.visualElement.render(),x&&x(f,d)},l=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d,this.stop(f,d),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>st(f=>this.getAnimationState(f)==="paused"&&this.getAxisMotionValue(f).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new lo(e,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:oo(this.visualElement)})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!s)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&L.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||!Ge(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=yf(r,this.constraints[e],this.elastic[e])),o.set(r)}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&&Xt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=vf(s.layoutBox,e):this.constraints=!1,this.elastic=Tf(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&st(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=wf(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Xt(e))return!1;const s=e.current;wt(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 o=Pu(s,i.root,this.visualElement.getTransformPagePoint());let r=xf(i.layout.layoutBox,o);if(n){const a=n(Tu(r));this.hasMutatedConstraints=!!a,a&&(r=kr(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=st(c=>{if(!Ge(c,n,this.currentDirection))return;let f=l&&l[c]||{};r&&(f={min:0,max:0});const d=i?200:1e6,m=i?40:1e7,p={type:"inertia",velocity:s?e[c]:0,bounceStiffness:d,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return vs(this.visualElement,e),s.start(xs(e,s,0,n,this.visualElement,!1))}stopAnimation(){st(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){st(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){st(n=>{const{drag:s}=this.getProps();if(!Ge(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(e[n]-F(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Xt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};st(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=bf({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),st(r=>{if(!Ge(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:u}=this.constraints[r];a.set(F(l,u,i[r]))})}addListeners(){if(!this.visualElement.current)return;Sf.set(this.visualElement,this);const e=this.visualElement.current,n=we(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();Xt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),L.read(s);const r=xe(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(st(c=>{const f=this.getAxisMotionValue(c);f&&(this.originPoint[c]+=l[c].translate,f.set(f.get()+l[c].translate))}),this.visualElement.render())}));return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=Ss,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function Ge(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Pf(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Ef extends At{constructor(e){super(e),this.removeGroupControls=nt,this.removeListeners=nt,this.controls=new Cf(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||nt}unmount(){this.removeGroupControls(),this.removeListeners()}}const go=t=>(e,n)=>{t&&L.postRender(()=>t(e,n))};class Af extends At{constructor(){super(...arguments),this.removePointerDownListener=nt}onPointerDown(e){this.session=new lo(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:oo(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:go(e),onStart:go(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&L.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=we(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 Xe={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function yo(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Ce={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(R.test(t))t=parseFloat(t);else return t;const n=yo(t,e.target.x),s=yo(t,e.target.y);return`${n}% ${s}%`}},jf={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=Et.parse(t);if(i.length>5)return s;const o=Et.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const u=F(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=u),typeof i[3+r]=="number"&&(i[3+r]/=u),o(i)}};let Cs=!1;class Rf extends T.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;Zc(Mf),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),Cs&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Xe.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,Cs=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||L.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Qn.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;Cs=!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 vo(t){const[e,n]=pr(),s=T.useContext(dn);return h.jsx(Rf,{...t,layoutGroup:s,switchLayoutGroup:T.useContext(Dr),isPresent:e,safeToRemove:n})}const Mf={borderRadius:{...Ce,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ce,borderTopRightRadius:Ce,borderBottomLeftRadius:Ce,borderBottomRightRadius:Ce,boxShadow:jf};function Df(t,e,n){const s=H(t)?t:Ht(t);return s.start(xs("",s,e,n)),s.animation}const Vf=(t,e)=>t.depth-e.depth;class kf{constructor(){this.children=[],this.isDirty=!1}add(e){pn(this.children,e),this.isDirty=!0}remove(e){gn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Vf),this.isDirty=!1,this.children.forEach(e)}}function Nf(t,e){const n=Q.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(Ct(s),t(o-e))};return L.setup(s,!0),()=>Ct(s)}const xo=["TopLeft","TopRight","BottomLeft","BottomRight"],Of=xo.length,bo=t=>typeof t=="string"?parseFloat(t):t,wo=t=>typeof t=="number"||R.test(t);function If(t,e,n,s,i,o){i?(t.opacity=F(0,n.opacity??1,Lf(s)),t.opacityExit=F(e.opacity??1,0,Ff(s))):o&&(t.opacity=F(e.opacity??1,n.opacity??1,s));for(let r=0;r<Of;r++){const a=`border${xo[r]}Radius`;let l=To(e,a),u=To(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||wo(l)===wo(u)?(t[a]=Math.max(F(bo(l),bo(u),s),0),(dt.test(u)||dt.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=F(e.rotate||0,n.rotate||0,s))}function To(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Lf=So(0,.5,pi),Ff=So(.5,.95,nt);function So(t,e,n){return s=>s<t?0:s>e?1:n(ue(t,e,s))}function Co(t,e){t.min=e.min,t.max=e.max}function it(t,e){Co(t.x,e.x),Co(t.y,e.y)}function Po(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Eo(t,e,n,s,i){return t-=e,t=He(t,1/n,s),i!==void 0&&(t=He(t,1/i,s)),t}function Bf(t,e=0,n=1,s=.5,i,o=t,r=t){if(dt.test(e)&&(e=parseFloat(e),e=F(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=F(o.min,o.max,s);t===o&&(a-=e),t.min=Eo(t.min,e,n,a,i),t.max=Eo(t.max,e,n,a,i)}function Ao(t,e,[n,s,i],o,r){Bf(t,e[n],e[s],e[i],e.scale,o,r)}const _f=["x","scaleX","originX"],$f=["y","scaleY","originY"];function jo(t,e,n,s){Ao(t.x,e,_f,n?n.x:void 0,s?s.x:void 0),Ao(t.y,e,$f,n?n.y:void 0,s?s.y:void 0)}function Ro(t){return t.translate===0&&t.scale===1}function Mo(t){return Ro(t.x)&&Ro(t.y)}function Do(t,e){return t.min===e.min&&t.max===e.max}function Wf(t,e){return Do(t.x,e.x)&&Do(t.y,e.y)}function Vo(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function ko(t,e){return Vo(t.x,e.x)&&Vo(t.y,e.y)}function No(t){return Z(t.x)/Z(t.y)}function Oo(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Uf{constructor(){this.members=[]}add(e){pn(this.members,e),e.scheduleRender()}remove(e){if(gn(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 o=this.members[i];if(o.isPresent!==!1){s=o;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 zf(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:f,rotateY:d,skewX:m,skewY:p}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),f&&(s+=`rotateX(${f}deg) `),d&&(s+=`rotateY(${d}deg) `),m&&(s+=`skewX(${m}deg) `),p&&(s+=`skewY(${p}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 Ps=["","X","Y","Z"],Kf=1e3;let Yf=0;function Es(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Io(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Xr(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",L,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&Io(s)}function Lo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e?.()){this.id=Yf++,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(Xf),this.nodes.forEach(Qf),this.nodes.forEach(td),this.nodes.forEach(qf)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,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 kf)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new xn),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=mr(r)&&!Fc(r),this.instance=r;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let c,f=0;const d=()=>this.root.updateBlockedByResize=!1;L.read(()=>{f=window.innerWidth}),t(r,()=>{const m=window.innerWidth;m!==f&&(f=m,this.root.updateBlockedByResize=!0,c&&c(),c=Nf(d,250),Xe.hasAnimatedSinceResize&&(Xe.hasAnimatedSinceResize=!1,this.nodes.forEach(_o)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||rd,{onLayoutAnimationStart:g,onLayoutAnimationComplete:x}=u.getProps(),y=!this.targetLayout||!ko(this.targetLayout,m),w=!f&&d;if(this.options.layoutRoot||this.resumeFrom||w||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...qn(p,"layout"),onPlay:g,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(c,w)}else f||_o(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.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(ed),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Io(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const f=this.path[c];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.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(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Fo);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Bo);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Jf),this.nodes.forEach(Hf),this.nodes.forEach(Gf)):this.nodes.forEach(Bo),this.clearAllSnapshots();const a=Q.now();Y.delta=bt(0,1e3/60,a-Y.timestamp),Y.timestamp=a,Y.isProcessing=!0,Sn.update.process(Y),Sn.preRender.process(Y),Sn.render.process(Y),Y.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Qn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Zf),this.sharedNodes.forEach(nd)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,L.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){L.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Z(this.snapshot.measuredBox.x)&&!Z(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 r=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,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Mo(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;r&&this.instance&&(a||Ot(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),od(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return W();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(ad))){const{scroll:u}=this.root;u&&(qt(a.x,u.offset.x),qt(a.y,u.offset.y))}return a}removeElementScroll(r){const a=W();if(it(a,r),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:f}=u;u!==this.root&&c&&f.layoutScroll&&(c.wasRoot&&it(a,r),qt(a.x,c.offset.x),qt(a.y,c.offset.y))}return a}applyTransform(r,a=!1){const l=W();it(l,r);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}),Ot(c.latestValues)&&Zt(l,c.latestValues)}return Ot(this.latestValues)&&Zt(l,this.latestValues),l}removeTransform(r){const a=W();it(a,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Ot(u.latestValues))continue;ms(u.latestValues)&&u.updateSnapshot();const c=W(),f=u.measurePageBox();it(c,f),jo(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Ot(this.latestValues)&&jo(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.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!==Y.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!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(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:f}=this.options;if(!(!this.layout||!(c||f))){if(this.resolvedRelativeTargetAt=Y.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(),Se(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),it(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(),hf(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):it(this.target,this.layout.layoutBox),Lr(this.target,this.targetDelta)):it(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(),Se(this.relativeTargetOrigin,this.target,d.target),it(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||ms(this.parent.latestValues)||Nr(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 r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Y.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;it(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;Cu(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=W());const{target:m}=r;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Po(this.prevProjectionDelta.x,this.projectionDelta.x),Po(this.prevProjectionDelta.y,this.projectionDelta.y)),Te(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!Oo(this.projectionDelta.x,this.prevProjectionDelta.x)||!Oo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Jt(),this.projectionDelta=Jt(),this.projectionDeltaWithTransform=Jt()}setAnimationOrigin(r,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},f=Jt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=W(),m=l?l.source:void 0,p=this.layout?this.layout.source:void 0,g=m!==p,x=this.getStack(),y=!x||x.members.length<=1,w=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(id));this.animationProgress=0;let v;this.mixTargetDelta=E=>{const S=E/1e3;$o(f.x,r.x,S),$o(f.y,r.y,S),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Se(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),sd(this.relativeTarget,this.relativeTargetOrigin,d,S),v&&Wf(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=W()),it(v,this.relativeTarget)),g&&(this.animationValues=c,If(c,u,this.latestValues,S,w,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ct(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=L.update(()=>{Xe.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ht(0)),this.currentAnimation=Df(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.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 r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Kf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=r;if(!(!a||!l||!u)){if(this!==r&&this.layout&&u&&Yo(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||W();const f=Z(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+f;const d=Z(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+d}it(a,l),Zt(a,c),Te(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Uf),this.sharedNodes.get(r).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 r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Es("z",r,u,this.animationValues);for(let c=0;c<Ps.length;c++)Es(`rotate${Ps[c]}`,r,u,this.animationValues),Es(`skew${Ps[c]}`,r,u,this.animationValues);r.render();for(const c in u)r.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=Ye(a?.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=Ye(a?.pointerEvents)||""),this.hasProjected&&!Ot(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=zf(this.projectionDeltaWithTransform,this.treeScale,c);l&&(f=l(c,f)),r.transform=f;const{x:d,y:m}=this.projectionDelta;r.transformOrigin=`${d.origin*100}% ${m.origin*100}% 0`,u.animationValues?r.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:r.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const p in ve){if(c[p]===void 0)continue;const{correct:g,applyTo:x,isCSSVariable:y}=ve[p],w=f==="none"?c[p]:g(c[p],u);if(x){const v=x.length;for(let E=0;E<v;E++)r[x[E]]=w}else y?this.options.visualElement.renderState.vars[p]=w:r[p]=w}this.options.layoutId&&(r.pointerEvents=u===this?Ye(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(Fo),this.root.sharedNodes.clear()}}}function Hf(t){t.updateLayout()}function Gf(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,o=e.source!==t.layout.source;i==="size"?st(c=>{const f=o?e.measuredBox[c]:e.layoutBox[c],d=Z(f);f.min=n[c].min,f.max=f.min+d}):Yo(i,e.layoutBox,n)&&st(c=>{const f=o?e.measuredBox[c]:e.layoutBox[c],d=Z(n[c]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[c].max=t.relativeTarget[c].min+d)});const r=Jt();Te(r,n,e.layoutBox);const a=Jt();o?Te(a,t.applyTransform(s,!0),e.measuredBox):Te(a,n,e.layoutBox);const l=!Mo(r);let u=!1;if(!t.resumeFrom){const c=t.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:f,layout:d}=c;if(f&&d){const m=W();Se(m,e.layoutBox,f.layoutBox);const p=W();Se(p,n,d.layoutBox),ko(m,p)||(u=!0),c.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=m,t.relativeParent=c)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Xf(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 qf(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Zf(t){t.clearSnapshot()}function Fo(t){t.clearMeasurements()}function Bo(t){t.isLayoutDirty=!1}function Jf(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function _o(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Qf(t){t.resolveTargetDelta()}function td(t){t.calcProjection()}function ed(t){t.resetSkewAndRotation()}function nd(t){t.removeLeadSnapshot()}function $o(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 Wo(t,e,n,s){t.min=F(e.min,n.min,s),t.max=F(e.max,n.max,s)}function sd(t,e,n,s){Wo(t.x,e.x,n.x,s),Wo(t.y,e.y,n.y,s)}function id(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const rd={duration:.45,ease:[.4,0,.1,1]},Uo=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),zo=Uo("applewebkit/")&&!Uo("chrome/")?Math.round:nt;function Ko(t){t.min=zo(t.min),t.max=zo(t.max)}function od(t){Ko(t.x),Ko(t.y)}function Yo(t,e,n){return t==="position"||t==="preserve-aspect"&&!df(No(e),No(n),.2)}function ad(t){return t!==t.root&&t.scroll?.wasRoot}const ld=Lo({attachResizeListener:(t,e)=>xe(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),As={current:void 0},Ho=Lo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!As.current){const t=new ld({});t.mount(window),t.setOptions({layoutScroll:!0}),As.current=t}return As.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),cd={pan:{Feature:Af},drag:{Feature:Ef,ProjectionNode:Ho,MeasureLayout:vo}};function Go(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=s[i];o&&L.postRender(()=>o(e,be(e)))}class ud extends At{mount(){const{current:e}=this.node;e&&(this.unmount=kc(e,(n,s)=>(Go(this.node,s,"Start"),i=>Go(this.node,i,"End"))))}unmount(){}}class fd extends At{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=ce(xe(this.node.current,"focus",()=>this.onFocus()),xe(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Xo(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),o=s[i];o&&L.postRender(()=>o(e,be(e)))}class dd extends At{mount(){const{current:e}=this.node;e&&(this.unmount=Lc(e,(n,s)=>(Xo(this.node,s,"Start"),(i,{success:o})=>Xo(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const js=new WeakMap,Rs=new WeakMap,hd=t=>{const e=js.get(t.target);e&&e(t)},md=t=>{t.forEach(hd)};function pd({root:t,...e}){const n=t||document;Rs.has(n)||Rs.set(n,{});const s=Rs.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(md,{root:t,...e})),s[i]}function gd(t,e,n){const s=pd(e);return js.set(t,n),s.observe(t),()=>{js.delete(t),s.unobserve(t)}}const yd={some:0,all:1};class vd extends At{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:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:yd[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:f}=this.node.getProps(),d=u?c:f;d&&d(l)};return gd(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(xd(e,n))&&this.startObserver()}unmount(){}}function xd({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const bd={...of,...{inView:{Feature:vd},tap:{Feature:dd},focus:{Feature:fd},hover:{Feature:ud}},...cd,...{layout:{ProjectionNode:Ho,MeasureLayout:vo}}},Pe=wu(bd,Nu),wd=["polygon(50% 50%,0 0,0 0,0 0,0 0,0 0)","polygon(50% 50%,0 0,100% 0,100% 0,100% 0,100% 0)","polygon(50% 50%,0 0,100% 0,100% 100%,100% 100%,100% 100%)","polygon(50% 50%,0 0,100% 0,100% 100%,0 100%,0 100%)","polygon(50% 50%,0 0,100% 0,100% 100%,0 100%,0 0)"],qe=t=>{const{speed:e=1,className:n}=t,s=1/e,i=2/e;return h.jsx(ss,{children:h.jsx(Pe.div,{role:"status",className:V("relative rounded-full",n),animate:{rotate:360},transition:{repeat:1/0,ease:"linear",duration:s},children:h.jsx(Pe.div,{className:"absolute inset-0 rounded-full",style:{boxSizing:"border-box",borderStyle:"solid",borderWidth:2},animate:{clipPath:wd},transition:{repeat:1/0,ease:"linear",duration:i,times:[0,.25,.5,.75,1]}})})})},Td=`
|
|
30
|
+
`),()=>{y.contains(p)&&y.removeChild(p)}},[t]),h.jsx(Uc,{isPresent:t,childRef:o,sizeRef:r,children:S.cloneElement(e,{ref:o})})}const Kc=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:o,mode:r,anchorX:a,root:l})=>{const u=hn(Xc),c=T.useId();let f=!0,d=T.useMemo(()=>(f=!1,{id:c,initial:t,isPresent:n,custom:i,onExitComplete:m=>{u.set(m,!0);for(const p of u.values())if(!p)return;s&&s()},register:m=>(u.set(m,!1),()=>u.delete(m))}),[n,u,s]);return o&&f&&(d={...d}),T.useMemo(()=>{u.forEach((m,p)=>u.set(p,!1))},[n]),S.useEffect(()=>{!n&&!u.size&&s&&s()},[n]),r==="popLayout"&&(e=h.jsx(zc,{isPresent:n,anchorX:a,root:l,children:e})),h.jsx(Vt.Provider,{value:d,children:e})};function Xc(){return new Map}function pr(e=!0){const t=T.useContext(Vt);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=t,o=T.useId();T.useEffect(()=>{if(e)return i(o)},[e]);const r=T.useCallback(()=>e&&s&&s(o),[o,s,e]);return!n&&s?[!1,r]:[!0]}const $t=e=>e.key||"";function gr(e){const t=[];return T.Children.forEach(e,n=>{T.isValidElement(n)&&t.push(n)}),t}const ss=({children:e,custom:t,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:o="sync",propagate:r=!1,anchorX:a="left",root:l})=>{const[u,c]=pr(r),f=T.useMemo(()=>gr(e),[e]),d=r&&!u?[]:f.map($t),m=T.useRef(!0),p=T.useRef(f),y=hn(()=>new Map),[x,v]=T.useState(f),[b,g]=T.useState(f);si(()=>{m.current=!1,p.current=f;for(let P=0;P<b.length;P++){const A=$t(b[P]);d.includes(A)?y.delete(A):y.get(A)!==!0&&y.set(A,!1)}},[b,d.length,d.join("-")]);const E=[];if(f!==x){let P=[...f];for(let A=0;A<b.length;A++){const R=b[A],N=$t(R);d.includes(N)||(P.splice(A,0,R),E.push(R))}return o==="wait"&&E.length&&(P=E),g(gr(P)),v(f),null}process.env.NODE_ENV!=="production"&&o==="wait"&&b.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:C}=T.useContext(dn);return h.jsx(h.Fragment,{children:b.map(P=>{const A=$t(P),R=r&&!u?!1:f===b||d.includes(A),N=()=>{if(y.has(A))y.set(A,!0);else return;let I=!0;y.forEach(U=>{U||(I=!1)}),I&&(C?.(),g(p.current),r&&c?.(),s&&s())};return h.jsx(Kc,{isPresent:R,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:o,root:l,onExitComplete:R?void 0:N,anchorX:a,children:P},A)})})},yr=T.createContext({strict:!1}),vr={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"]},He={};for(const e in vr)He[e]={isEnabled:t=>vr[e].some(n=>!!t[n])};function Yc(e){for(const t in e)He[t]={...He[t],...e[t]}}const Hc=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 Wt(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Hc.has(e)}let xr=e=>!Wt(e);function Gc(e){typeof e=="function"&&(xr=t=>t.startsWith("on")?!Wt(t):e(t))}try{Gc(require("@emotion/is-prop-valid").default)}catch{}function qc(e,t,n){const s={};for(const i in e)i==="values"&&typeof e.values=="object"||(xr(i)||n===!0&&Wt(i)||!t&&!Wt(i)||e.draggable&&i.startsWith("onDrag"))&&(s[i]=e[i]);return s}const Ut=T.createContext({});function zt(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function yt(e){return typeof e=="string"||Array.isArray(e)}const is=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],rs=["initial",...is];function Kt(e){return zt(e.animate)||rs.some(t=>yt(e[t]))}function br(e){return!!(Kt(e)||e.variants)}function Zc(e,t){if(Kt(e)){const{initial:n,animate:s}=e;return{initial:n===!1||yt(n)?n:void 0,animate:yt(s)?s:void 0}}return e.inherit!==!1?t:{}}function Jc(e){const{initial:t,animate:n}=Zc(e,T.useContext(Ut));return T.useMemo(()=>({initial:t,animate:n}),[wr(t),wr(n)])}function wr(e){return Array.isArray(e)?e.join(" "):e}const vt={};function Qc(e){for(const t in e)vt[t]=e[t],Cn(t)&&(vt[t].isCSSVariable=!0)}function Tr(e,{layout:t,layoutId:n}){return Xe.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!vt[e]||e==="opacity")}const eu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},tu=Ke.length;function nu(e,t,n){let s="",i=!0;for(let o=0;o<tu;o++){const r=Ke[o],a=e[r];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(r.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=rr(a,Jn[r]);if(!l){i=!1;const c=eu[r]||r;s+=`${c}(${u}) `}n&&(t[r]=u)}}return s=s.trim(),n?s=n(t,i?"":s):i&&(s="none"),s}function os(e,t,n){const{style:s,vars:i,transformOrigin:o}=e;let r=!1,a=!1;for(const l in t){const u=t[l];if(Xe.has(l)){r=!0;continue}else if(Cn(l)){i[l]=u;continue}else{const c=rr(u,Jn[l]);l.startsWith("origin")?(a=!0,o[l]=c):s[l]=c}}if(t.transform||(r||n?s.transform=nu(t,e.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=o;s.transformOrigin=`${l} ${u} ${c}`}}const as=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Sr(e,t,n){for(const s in t)!Y(t[s])&&!Tr(s,n)&&(e[s]=t[s])}function su({transformTemplate:e},t){return T.useMemo(()=>{const n=as();return os(n,t,e),Object.assign({},n.vars,n.style)},[t])}function iu(e,t){const n=e.style||{},s={};return Sr(s,n,e),Object.assign(s,su(e,t)),s}function ru(e,t){const n={},s=iu(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=s,n}const ou={offset:"stroke-dashoffset",array:"stroke-dasharray"},au={offset:"strokeDashoffset",array:"strokeDasharray"};function lu(e,t,n=1,s=0,i=!0){e.pathLength=1;const o=i?ou:au;e[o.offset]=j.transform(-s);const r=j.transform(t),a=j.transform(n);e[o.array]=`${r} ${a}`}function Cr(e,{attrX:t,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},l,u,c){if(os(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:d}=e;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=c?.transformBox??"fill-box",delete f.transformBox),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),i!==void 0&&lu(f,i,o,r,!1)}const Pr=()=>({...as(),attrs:{}}),Er=e=>typeof e=="string"&&e.toLowerCase()==="svg";function cu(e,t,n,s){const i=T.useMemo(()=>{const o=Pr();return Cr(o,t,Er(s),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Sr(o,e.style,e),i.style={...o,...i.style}}return i}const uu=["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 ls(e){return typeof e!="string"||e.includes("-")?!1:!!(uu.indexOf(e)>-1||/[A-Z]/u.test(e))}function fu(e,t,n,{latestValues:s},i,o=!1){const a=(ls(e)?cu:ru)(t,s,i,e),l=qc(t,typeof e=="string",o),u=e!==T.Fragment?{...l,...a,ref:n}:{},{children:c}=t,f=T.useMemo(()=>Y(c)?c.get():c,[c]);return T.createElement(e,{...u,children:f})}function Ar(e){const t=[{},{}];return e?.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function cs(e,t,n,s){if(typeof t=="function"){const[i,o]=Ar(s);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=Ar(s);t=t(n!==void 0?n:e.custom,i,o)}return t}function Xt(e){return Y(e)?e.get():e}function du({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,i){return{latestValues:hu(n,s,i,e),renderState:t()}}function hu(e,t,n,s){const i={},o=s(e,{});for(const d in o)i[d]=Xt(o[d]);let{initial:r,animate:a}=e;const l=Kt(e),u=br(e);t&&u&&!l&&e.inherit!==!1&&(r===void 0&&(r=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||r===!1;const f=c?a:r;if(f&&typeof f!="boolean"&&!zt(f)){const d=Array.isArray(f)?f:[f];for(let m=0;m<d.length;m++){const p=cs(e,d[m]);if(p){const{transitionEnd:y,transition:x,...v}=p;for(const b in v){let g=v[b];if(Array.isArray(g)){const E=c?g.length-1:0;g=g[E]}g!==null&&(i[b]=g)}for(const b in y)i[b]=y[b]}}}return i}const Rr=e=>(t,n)=>{const s=T.useContext(Ut),i=T.useContext(Vt),o=()=>du(e,t,s,i);return n?o():hn(o)};function us(e,t,n){const{style:s}=e,i={};for(const o in s)(Y(s[o])||t.style&&Y(t.style[o])||Tr(o,e)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=s[o]);return i}const mu=Rr({scrapeMotionValuesFromProps:us,createRenderState:as});function jr(e,t,n){const s=us(e,t,n);for(const i in e)if(Y(e[i])||Y(t[i])){const o=Ke.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=e[i]}return s}const pu=Rr({scrapeMotionValuesFromProps:jr,createRenderState:Pr}),gu=Symbol.for("motionComponentSymbol");function Ge(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function yu(e,t,n){return T.useCallback(s=>{s&&e.onMount&&e.onMount(s),t&&(s?t.mount(s):t.unmount()),n&&(typeof n=="function"?n(s):Ge(n)&&(n.current=s))},[t])}const fs=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Mr="data-"+fs("framerAppearId"),Dr=T.createContext({});function vu(e,t,n,s,i){const{visualElement:o}=T.useContext(Ut),r=T.useContext(yr),a=T.useContext(Vt),l=T.useContext(ns).reducedMotion,u=T.useRef(null);s=s||r.renderer,!u.current&&s&&(u.current=s(e,{visualState:t,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,f=T.useContext(Dr);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&xu(u.current,n,i,f);const d=T.useRef(!1);T.useInsertionEffect(()=>{c&&d.current&&c.update(n,a)});const m=n[Mr],p=T.useRef(!!m&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return si(()=>{c&&(d.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),p.current&&c.animationState&&c.animationState.animateChanges())}),T.useEffect(()=>{c&&(!p.current&&c.animationState&&c.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(m)}),p.current=!1),c.enteringChildren=void 0)}),c}function xu(e,t,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:kr(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&Ge(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:u})}function kr(e){if(e)return e.options.allowProjection!==!1?e.projection:kr(e.parent)}function ds(e,{forwardMotionProps:t=!1}={},n,s){n&&Yc(n);const i=ls(e)?pu:mu;function o(a,l){let u;const c={...T.useContext(ns),...a,layoutId:bu(a)},{isStatic:f}=c,d=Jc(a),m=i(a,f);if(!f&&mn){wu(c,n);const p=Tu(c);u=p.MeasureLayout,d.visualElement=vu(e,m,c,s,p.ProjectionNode)}return h.jsxs(Ut.Provider,{value:d,children:[u&&d.visualElement?h.jsx(u,{visualElement:d.visualElement,...c}):null,fu(e,a,yu(m,d.visualElement,l),m,f,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const r=T.forwardRef(o);return r[gu]=e,r}function bu({layoutId:e}){const t=T.useContext(dn).id;return t&&e!==void 0?t+"-"+e:e}function wu(e,t){const n=T.useContext(yr).strict;if(process.env.NODE_ENV!=="production"&&t&&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.";e.ignoreStrict?$e(!1,s,"lazy-strict-mode"):we(!1,s,"lazy-strict-mode")}}function Tu(e){const{drag:t,layout:n}=He;if(!t&&!n)return{};const s={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function Su(e,t){if(typeof Proxy>"u")return ds;const n=new Map,s=(o,r)=>ds(o,r,e,t),i=(o,r)=>(process.env.NODE_ENV!=="production"&&bn(!1,"motion() is deprecated. Use motion.create() instead."),s(o,r));return new Proxy(i,{get:(o,r)=>r==="create"?s:(n.has(r)||n.set(r,ds(r,void 0,e,t)),n.get(r))})}function Vr({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function Cu({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Pu(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function hs(e){return e===void 0||e===1}function ms({scale:e,scaleX:t,scaleY:n}){return!hs(e)||!hs(t)||!hs(n)}function Ie(e){return ms(e)||Nr(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Nr(e){return Ir(e.x)||Ir(e.y)}function Ir(e){return e&&e!=="0%"}function Yt(e,t,n){const s=e-n,i=t*s;return n+i}function Or(e,t,n,s,i){return i!==void 0&&(e=Yt(e,i,s)),Yt(e,n,s)+t}function ps(e,t=0,n=1,s,i){e.min=Or(e.min,t,n,s,i),e.max=Or(e.max,t,n,s,i)}function Lr(e,{x:t,y:n}){ps(e.x,t.translate,t.scale,t.originPoint),ps(e.y,n.translate,n.scale,n.originPoint)}const Fr=.999999999999,Br=1.0000000000001;function Eu(e,t,n,s=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,r;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Ze(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(t.x*=r.x.scale,t.y*=r.y.scale,Lr(e,r)),s&&Ie(o.latestValues)&&Ze(e,o.latestValues))}t.x<Br&&t.x>Fr&&(t.x=1),t.y<Br&&t.y>Fr&&(t.y=1)}function qe(e,t){e.min=e.min+t,e.max=e.max+t}function _r(e,t,n,s,i=.5){const o=F(e.min,e.max,i);ps(e,t,n,o,s)}function Ze(e,t){_r(e.x,t.x,t.scaleX,t.scale,t.originX),_r(e.y,t.y,t.scaleY,t.scale,t.originY)}function $r(e,t){return Vr(Pu(e.getBoundingClientRect(),t))}function Au(e,t,n){const s=$r(e,n),{scroll:i}=t;return i&&(qe(s.x,i.offset.x),qe(s.y,i.offset.y)),s}const Wr=()=>({translate:0,scale:1,origin:0,originPoint:0}),Je=()=>({x:Wr(),y:Wr()}),Ur=()=>({min:0,max:0}),W=()=>({x:Ur(),y:Ur()}),gs={current:null},zr={current:!1};function Ru(){if(zr.current=!0,!!mn)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>gs.current=e.matches;e.addEventListener("change",t),t()}else gs.current=!1}const ju=new WeakMap;function Mu(e,t,n){for(const s in t){const i=t[s],o=n[s];if(Y(i))e.addValue(s,i);else if(Y(o))e.addValue(s,Ye(i,{owner:e}));else if(o!==i)if(e.hasValue(s)){const r=e.getValue(s);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=e.getStaticValue(s);e.addValue(s,Ye(r!==void 0?r:i,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const Kr=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Du{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Hn,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=Q.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,L.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=Kt(n),this.isVariantNode=br(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const m=f[d];l[d]!==void 0&&Y(m)&&m.set(l[d])}}mount(t){this.current=t,ju.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),zr.current||Ru(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:gs.current,process.env.NODE_ENV!=="production"&&bn(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(),Ce(this.notifyUpdate),Ce(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=Xe.has(t);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[t]=r,this.props.onUpdate&&L.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in He){const n=He[t];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[t]&&i&&s(this.props)&&(this.features[t]=new i(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):W()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Kr.length;s++){const i=Kr[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=t[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=Mu(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const s=this.values.get(t);n!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&n!==void 0&&(s=Ye(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(ii(s)||oi(s))?s=parseFloat(s):!Wc(s)&&Ee.test(n)&&(s=ir(t,n)),this.setBaseTarget(t,Y(s)?s.get():s)),Y(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=cs(this.props,n,this.presenceContext?.custom);o&&(s=o[t])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Y(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new xn),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Qn.render(this.render)}}class Xr extends Du{constructor(){super(...arguments),this.KeyframeResolver=Mc}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:s}){delete n[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Y(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Yr(e,{style:t,vars:n},s,i){const o=e.style;let r;for(r in t)o[r]=t[r];i?.applyProjectionStyles(o,s);for(r in n)o.setProperty(r,n[r])}function ku(e){return window.getComputedStyle(e)}class Vu extends Xr{constructor(){super(...arguments),this.type="html",this.renderInstance=Yr}readValueFromInstance(t,n){if(Xe.has(n))return this.projection?.isProjecting?Un(n):Gl(t,n);{const s=ku(t),i=(Cn(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return $r(t,n)}build(t,n,s){os(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return us(t,n,s)}}const Hr=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 Nu(e,t,n,s){Yr(e,t,void 0,s);for(const i in t.attrs)e.setAttribute(Hr.has(i)?i:fs(i),t.attrs[i])}class Iu extends Xr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=W}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Xe.has(n)){const s=sr(n);return s&&s.default||0}return n=Hr.has(n)?n:fs(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return jr(t,n,s)}build(t,n,s){Cr(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,i){Nu(t,n,s,i)}mount(t){this.isSVGTag=Er(t.tagName),super.mount(t)}}const Ou=(e,t)=>ls(e)?new Iu(t):new Vu(t,{allowProjection:e!==T.Fragment});function Qe(e,t,n){const s=e.getProps();return cs(s,t,n!==void 0?n:s.custom,e)}const ys=e=>Array.isArray(e);function Lu(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ye(n))}function Fu(e){return ys(e)?e[e.length-1]||0:e}function Bu(e,t){const n=Qe(e,t);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=Fu(o[r]);Lu(e,r,a)}}function _u(e){return!!(Y(e)&&e.add)}function vs(e,t){const n=e.getValue("willChange");if(_u(n))return n.add(t);if(!n&&Te.WillChange){const s=new Te.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function Gr(e){return e.props[Mr]}const $u=e=>e!==null;function Wu(e,{repeat:t,repeatType:n="loop"},s){const i=e.filter($u),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[o]}const Uu={type:"spring",stiffness:500,damping:25,restSpeed:10},zu=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Ku={type:"keyframes",duration:.8},Xu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Yu=(e,{keyframes:t})=>t.length>2?Ku:Xe.has(e)?e.startsWith("scale")?zu(t[1]):Uu:Xu;function Hu({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const xs=(e,t,n,s={},i,o)=>r=>{const a=qn(s,e)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-ae(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:d=>{t.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:i};Hu(a)||Object.assign(c,Yu(e,c)),c.duration&&(c.duration=ae(c.duration)),c.repeatDelay&&(c.repeatDelay=ae(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Gn(c),c.delay===0&&(f=!0)),(Te.instantAnimations||Te.skipAnimations)&&(f=!0,Gn(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,f&&!o&&t.get()!==void 0){const d=Wu(c.keyframes,a);if(d!==void 0){L.update(()=>{c.onUpdate(d),c.onComplete()});return}}return a.isSync?new _n(c):new vc(c)};function Gu({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function qr(e,t,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:r,...a}=t;s&&(o=s);const l=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const c in a){const f=e.getValue(c,e.latestValues[c]??null),d=a[c];if(d===void 0||u&&Gu(u,c))continue;const m={delay:n,...qn(o||{},c)},p=f.get();if(p!==void 0&&!f.isAnimating&&!Array.isArray(d)&&d===p&&!m.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const v=Gr(e);if(v){const b=window.MotionHandoffAnimation(v,c,L);b!==null&&(m.startTime=b,y=!0)}}vs(e,c),f.start(xs(c,f,d,e.shouldReduceMotion&&Ji.has(c)?{type:!1}:m,e,y));const x=f.animation;x&&l.push(x)}return r&&Promise.all(l).then(()=>{L.update(()=>{r&&Bu(e,r)})}),l}function Zr(e,t,n,s=0,i=1){const o=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),r=e.size,a=(r-1)*s;return typeof n=="function"?n(o,r):i===1?o*s:a-o*s}function bs(e,t,n={}){const s=Qe(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(qr(e,s,n)):()=>Promise.resolve(),r=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:f}=i;return qu(e,t,l,u,c,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[o,r]:[r,o];return l().then(()=>u())}else return Promise.all([o(),r(n.delay)])}function qu(e,t,n=0,s=0,i=0,o=1,r){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(bs(l,t,{...r,delay:n+(typeof s=="function"?0:s)+Zr(e.variantChildren,l,s,i,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function Zu(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const i=t.map(o=>bs(e,o,n));s=Promise.all(i)}else if(typeof t=="string")s=bs(e,t,n);else{const i=typeof t=="function"?Qe(e,t,n.custom):t;s=Promise.all(qr(e,i,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}function Jr(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;return!0}const Ju=rs.length;function Qr(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Qr(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Ju;n++){const s=rs[n],i=e.props[s];(yt(i)||i===!1)&&(t[s]=i)}return t}const Qu=[...is].reverse(),ef=is.length;function tf(e){return t=>Promise.all(t.map(({animation:n,options:s})=>Zu(e,n,s)))}function nf(e){let t=tf(e),n=eo(),s=!0;const i=l=>(u,c)=>{const f=Qe(e,c,l==="exit"?e.presenceContext?.custom:void 0);if(f){const{transition:d,transitionEnd:m,...p}=f;u={...u,...p,...m}}return u};function o(l){t=l(e)}function r(l){const{props:u}=e,c=Qr(e.parent)||{},f=[],d=new Set;let m={},p=1/0;for(let x=0;x<ef;x++){const v=Qu[x],b=n[v],g=u[v]!==void 0?u[v]:c[v],E=yt(g),C=v===l?b.isActive:null;C===!1&&(p=x);let P=g===c[v]&&g!==u[v]&&E;if(P&&s&&e.manuallyAnimateOnMount&&(P=!1),b.protectedKeys={...m},!b.isActive&&C===null||!g&&!b.prevProp||zt(g)||typeof g=="boolean")continue;const A=sf(b.prevProp,g);let R=A||v===l&&b.isActive&&!P&&E||x>p&&E,N=!1;const I=Array.isArray(g)?g:[g];let U=I.reduce(i(v),{});C===!1&&(U={});const{prevResolvedValues:ne={}}=b,O={...ne,...U},K=_=>{R=!0,d.has(_)&&(N=!0,d.delete(_)),b.needsAnimating[_]=!0;const V=e.getValue(_);V&&(V.liveStyle=!1)};for(const _ in O){const V=U[_],J=ne[_];if(m.hasOwnProperty(_))continue;let w=!1;ys(V)&&ys(J)?w=!Jr(V,J):w=V!==J,w?V!=null?K(_):d.add(_):V!==void 0&&d.has(_)?K(_):b.protectedKeys[_]=!0}b.prevProp=g,b.prevResolvedValues=U,b.isActive&&(m={...m,...U}),s&&e.blockInitialAnimation&&(R=!1);const ve=P&&A;R&&(!ve||N)&&f.push(...I.map(_=>{const V={type:v};if(typeof _=="string"&&s&&!ve&&e.manuallyAnimateOnMount&&e.parent){const{parent:J}=e,w=Qe(J,_);if(J.enteringChildren&&w){const{delayChildren:D}=w.transition||{};V.delay=Zr(J.enteringChildren,e,D)}}return{animation:_,options:V}}))}if(d.size){const x={};if(typeof u.initial!="boolean"){const v=Qe(e,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(x.transition=v.transition)}d.forEach(v=>{const b=e.getBaseTarget(v),g=e.getValue(v);g&&(g.liveStyle=!0),x[v]=b??null}),f.push({animation:x})}let y=!!f.length;return s&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(y=!1),s=!1,y?t(f):Promise.resolve()}function a(l,u){if(n[l].isActive===u)return Promise.resolve();e.variantChildren?.forEach(f=>f.animationState?.setActive(l,u)),n[l].isActive=u;const c=r(l);for(const f in n)n[f].protectedKeys={};return c}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=eo(),s=!0}}}function sf(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Jr(t,e):!1}function Oe(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function eo(){return{animate:Oe(!0),whileInView:Oe(),whileHover:Oe(),whileTap:Oe(),whileDrag:Oe(),whileFocus:Oe(),exit:Oe()}}class Ae{constructor(t){this.isMounted=!1,this.node=t}update(){}}class rf extends Ae{constructor(t){super(t),t.animationState||(t.animationState=nf(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();zt(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let of=0;class af extends Ae{constructor(){super(...arguments),this.id=of++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const lf={animation:{Feature:rf},exit:{Feature:af}};function xt(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}function bt(e){return{point:{x:e.pageX,y:e.pageY}}}const cf=e=>t=>es(t)&&e(t,bt(t));function wt(e,t,n,s){return xt(e,t,cf(n),s)}const to=1e-4,uf=1-to,ff=1+to,no=.01,df=0-no,hf=0+no;function Z(e){return e.max-e.min}function mf(e,t,n){return Math.abs(e-t)<=n}function so(e,t,n,s=.5){e.origin=s,e.originPoint=F(t.min,t.max,e.origin),e.scale=Z(n)/Z(t),e.translate=F(n.min,n.max,e.origin)-e.originPoint,(e.scale>=uf&&e.scale<=ff||isNaN(e.scale))&&(e.scale=1),(e.translate>=df&&e.translate<=hf||isNaN(e.translate))&&(e.translate=0)}function Tt(e,t,n,s){so(e.x,t.x,n.x,s?s.originX:void 0),so(e.y,t.y,n.y,s?s.originY:void 0)}function io(e,t,n){e.min=n.min+t.min,e.max=e.min+Z(t)}function pf(e,t,n){io(e.x,t.x,n.x),io(e.y,t.y,n.y)}function ro(e,t,n){e.min=t.min-n.min,e.max=e.min+Z(t)}function St(e,t,n){ro(e.x,t.x,n.x),ro(e.y,t.y,n.y)}function ie(e){return[e("x"),e("y")]}const oo=({current:e})=>e?e.ownerDocument.defaultView:null,ao=(e,t)=>Math.abs(e-t);function gf(e,t){const n=ao(e.x,t.x),s=ao(e.y,t.y);return Math.sqrt(n**2+s**2)}class lo{constructor(t,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:r=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=Ts(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,p=gf(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!p)return;const{point:y}=d,{timestamp:x}=X;this.history.push({...y,timestamp:x});const{onStart:v,onMove:b}=this.handlers;m||(v&&v(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,d)},this.handlePointerMove=(d,m)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=ws(m,this.transformPagePoint),L.update(this.updatePoint,!0)},this.handlePointerUp=(d,m)=>{this.end();const{onEnd:p,onSessionEnd:y,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Ts(d.type==="pointercancel"?this.lastMoveEventInfo:ws(m,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,v),y&&y(d,v)},!es(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const a=bt(t),l=ws(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=X;this.history=[{...u,timestamp:c}];const{onSessionStart:f}=n;f&&f(t,Ts(l,this.history)),this.removeListeners=ct(wt(this.contextWindow,"pointermove",this.handlePointerMove),wt(this.contextWindow,"pointerup",this.handlePointerUp),wt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ce(this.updatePoint)}}function ws(e,t){return t?{point:t(e.point)}:e}function co(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ts({point:e},t){return{point:e,delta:co(e,uo(t)),offset:co(e,yf(t)),velocity:vf(t,.1)}}function yf(e){return e[0]}function uo(e){return e[e.length-1]}function vf(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,s=null;const i=uo(e);for(;n>=0&&(s=e[n],!(i.timestamp-s.timestamp>ae(t)));)n--;if(!s)return{x:0,y:0};const o=fe(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function xf(e,{min:t,max:n},s){return t!==void 0&&e<t?e=s?F(t,e,s.min):Math.max(e,t):n!==void 0&&e>n&&(e=s?F(n,e,s.max):Math.min(e,n)),e}function fo(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function bf(e,{top:t,left:n,bottom:s,right:i}){return{x:fo(e.x,n,i),y:fo(e.y,t,s)}}function ho(e,t){let n=t.min-e.min,s=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,s]=[s,n]),{min:n,max:s}}function wf(e,t){return{x:ho(e.x,t.x),y:ho(e.y,t.y)}}function Tf(e,t){let n=.5;const s=Z(e),i=Z(t);return i>s?n=ut(t.min,t.max-s,e.min):s>i&&(n=ut(e.min,e.max-i,t.min)),be(0,1,n)}function Sf(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Ss=.35;function Cf(e=Ss){return e===!1?e=0:e===!0&&(e=Ss),{x:mo(e,"left","right"),y:mo(e,"top","bottom")}}function mo(e,t,n){return{min:po(e,t),max:po(e,n)}}function po(e,t){return typeof e=="number"?e:e[t]||0}const Pf=new WeakMap;class Ef{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=W(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=f=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(bt(f).point)},r=(f,d)=>{const{drag:m,dragPropagation:p,onDragStart:y}=this.getProps();if(m&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Nc(m),!this.openDragLock))return;this.latestPointerEvent=f,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),ie(v=>{let b=this.getAxisMotionValue(v).get()||0;if(de.test(b)){const{projection:g}=this.visualElement;if(g&&g.layout){const E=g.layout.layoutBox[v];E&&(b=Z(E)*(parseFloat(b)/100))}}this.originPoint[v]=b}),y&&L.postRender(()=>y(f,d)),vs(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d;const{dragPropagation:m,dragDirectionLock:p,onDirectionLock:y,onDrag:x}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:v}=d;if(p&&this.currentDirection===null){this.currentDirection=Af(v),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",d.point,v),this.updateAxis("y",d.point,v),this.visualElement.render(),x&&x(f,d)},l=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d,this.stop(f,d),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>ie(f=>this.getAnimationState(f)==="paused"&&this.getAxisMotionValue(f).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new lo(t,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:oo(this.visualElement)})}stop(t,n){const s=t||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!s)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&L.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.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(t,n,s){const{drag:i}=this.getProps();if(!s||!Ht(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let r=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(r=xf(r,this.constraints[t],this.elastic[t])),o.set(r)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&Ge(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=bf(s.layoutBox,t):this.constraints=!1,this.elastic=Cf(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&ie(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Sf(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ge(t))return!1;const s=t.current;we(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 o=Au(s,i.root,this.visualElement.getTransformPagePoint());let r=wf(i.layout.layoutBox,o);if(n){const a=n(Cu(r));this.hasMutatedConstraints=!!a,a&&(r=Vr(a))}return r}startAnimation(t){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=ie(c=>{if(!Ht(c,n,this.currentDirection))return;let f=l&&l[c]||{};r&&(f={min:0,max:0});const d=i?200:1e6,m=i?40:1e7,p={type:"inertia",velocity:s?t[c]:0,bounceStiffness:d,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const s=this.getAxisMotionValue(t);return vs(this.visualElement,t),s.start(xs(t,s,0,n,this.visualElement,!1))}stopAnimation(){ie(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ie(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){ie(n=>{const{drag:s}=this.getProps();if(!Ht(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(t[n]-F(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Ge(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};ie(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=Tf({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),ie(r=>{if(!Ht(r,t,null))return;const a=this.getAxisMotionValue(r),{min:l,max:u}=this.constraints[r];a.set(F(l,u,i[r]))})}addListeners(){if(!this.visualElement.current)return;Pf.set(this.visualElement,this);const t=this.visualElement.current,n=wt(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();Ge(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),L.read(s);const r=xt(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(ie(c=>{const f=this.getAxisMotionValue(c);f&&(this.originPoint[c]+=l[c].translate,f.set(f.get()+l[c].translate))}),this.visualElement.render())}));return()=>{r(),n(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=Ss,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function Ht(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Af(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Rf extends Ae{constructor(t){super(t),this.removeGroupControls=se,this.removeListeners=se,this.controls=new Ef(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||se}unmount(){this.removeGroupControls(),this.removeListeners()}}const go=e=>(t,n)=>{e&&L.postRender(()=>e(t,n))};class jf extends Ae{constructor(){super(...arguments),this.removePointerDownListener=se}onPointerDown(t){this.session=new lo(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:oo(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:go(t),onStart:go(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&L.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=wt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Gt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function yo(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ct={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(j.test(e))e=parseFloat(e);else return e;const n=yo(e,t.target.x),s=yo(e,t.target.y);return`${n}% ${s}%`}},Mf={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,i=Ee.parse(e);if(i.length>5)return s;const o=Ee.createTransformer(e),r=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+r]/=a,i[1+r]/=l;const u=F(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=u),typeof i[3+r]=="number"&&(i[3+r]/=u),o(i)}};let Cs=!1;class Df extends T.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=t;Qc(kf),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),Cs&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Gt.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,Cs=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==o?r.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?r.promote():r.relegate()||L.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Qn.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=t;Cs=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function vo(e){const[t,n]=pr(),s=T.useContext(dn);return h.jsx(Df,{...e,layoutGroup:s,switchLayoutGroup:T.useContext(Dr),isPresent:t,safeToRemove:n})}const kf={borderRadius:{...Ct,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ct,borderTopRightRadius:Ct,borderBottomLeftRadius:Ct,borderBottomRightRadius:Ct,boxShadow:Mf};function Vf(e,t,n){const s=Y(e)?e:Ye(e);return s.start(xs("",s,t,n)),s.animation}const Nf=(e,t)=>e.depth-t.depth;class If{constructor(){this.children=[],this.isDirty=!1}add(t){pn(this.children,t),this.isDirty=!0}remove(t){gn(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Nf),this.isDirty=!1,this.children.forEach(t)}}function Of(e,t){const n=Q.now(),s=({timestamp:i})=>{const o=i-n;o>=t&&(Ce(s),e(o-t))};return L.setup(s,!0),()=>Ce(s)}const xo=["TopLeft","TopRight","BottomLeft","BottomRight"],Lf=xo.length,bo=e=>typeof e=="string"?parseFloat(e):e,wo=e=>typeof e=="number"||j.test(e);function Ff(e,t,n,s,i,o){i?(e.opacity=F(0,n.opacity??1,Bf(s)),e.opacityExit=F(t.opacity??1,0,_f(s))):o&&(e.opacity=F(t.opacity??1,n.opacity??1,s));for(let r=0;r<Lf;r++){const a=`border${xo[r]}Radius`;let l=To(t,a),u=To(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||wo(l)===wo(u)?(e[a]=Math.max(F(bo(l),bo(u),s),0),(de.test(u)||de.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=F(t.rotate||0,n.rotate||0,s))}function To(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Bf=So(0,.5,pi),_f=So(.5,.95,se);function So(e,t,n){return s=>s<e?0:s>t?1:n(ut(e,t,s))}function Co(e,t){e.min=t.min,e.max=t.max}function re(e,t){Co(e.x,t.x),Co(e.y,t.y)}function Po(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Eo(e,t,n,s,i){return e-=t,e=Yt(e,1/n,s),i!==void 0&&(e=Yt(e,1/i,s)),e}function $f(e,t=0,n=1,s=.5,i,o=e,r=e){if(de.test(t)&&(t=parseFloat(t),t=F(r.min,r.max,t/100)-r.min),typeof t!="number")return;let a=F(o.min,o.max,s);e===o&&(a-=t),e.min=Eo(e.min,t,n,a,i),e.max=Eo(e.max,t,n,a,i)}function Ao(e,t,[n,s,i],o,r){$f(e,t[n],t[s],t[i],t.scale,o,r)}const Wf=["x","scaleX","originX"],Uf=["y","scaleY","originY"];function Ro(e,t,n,s){Ao(e.x,t,Wf,n?n.x:void 0,s?s.x:void 0),Ao(e.y,t,Uf,n?n.y:void 0,s?s.y:void 0)}function jo(e){return e.translate===0&&e.scale===1}function Mo(e){return jo(e.x)&&jo(e.y)}function Do(e,t){return e.min===t.min&&e.max===t.max}function zf(e,t){return Do(e.x,t.x)&&Do(e.y,t.y)}function ko(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Vo(e,t){return ko(e.x,t.x)&&ko(e.y,t.y)}function No(e){return Z(e.x)/Z(e.y)}function Io(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Kf{constructor(){this.members=[]}add(t){pn(this.members,t),t.scheduleRender()}remove(t){if(gn(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(t,n){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.instance&&s.scheduleRender(),t.scheduleRender(),t.resumeFrom=s,n&&(t.resumeFrom.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:s}=t;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Xf(e,t,n){let s="";const i=e.x.translate/t.x,o=e.y.translate/t.y,r=n?.z||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:f,rotateY:d,skewX:m,skewY:p}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),f&&(s+=`rotateX(${f}deg) `),d&&(s+=`rotateY(${d}deg) `),m&&(s+=`skewX(${m}deg) `),p&&(s+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const Ps=["","X","Y","Z"],Yf=1e3;let Hf=0;function Es(e,t,n,s){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),s&&(s[e]=0))}function Oo(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Gr(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",L,!(i||o))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&Oo(s)}function Lo({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=t?.()){this.id=Hf++,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(Zf),this.nodes.forEach(td),this.nodes.forEach(nd),this.nodes.forEach(Jf)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,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 If)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new xn),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=mr(r)&&!_c(r),this.instance=r;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let c,f=0;const d=()=>this.root.updateBlockedByResize=!1;L.read(()=>{f=window.innerWidth}),e(r,()=>{const m=window.innerWidth;m!==f&&(f=m,this.root.updateBlockedByResize=!0,c&&c(),c=Of(d,250),Gt.hasAnimatedSinceResize&&(Gt.hasAnimatedSinceResize=!1,this.nodes.forEach(_o)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||ad,{onLayoutAnimationStart:y,onLayoutAnimationComplete:x}=u.getProps(),v=!this.targetLayout||!Vo(this.targetLayout,m),b=!f&&d;if(this.options.layoutRoot||this.resumeFrom||b||f&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const g={...qn(p,"layout"),onPlay:y,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(g.delay=0,g.type=!1),this.startAnimation(g),this.setAnimationOrigin(c,b)}else f||_o(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ce(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(sd),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Oo(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const f=this.path[c];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.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(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Fo);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Bo);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(ed),this.nodes.forEach(Gf),this.nodes.forEach(qf)):this.nodes.forEach(Bo),this.clearAllSnapshots();const a=Q.now();X.delta=be(0,1e3/60,a-X.timestamp),X.timestamp=a,X.isProcessing=!0,Sn.update.process(X),Sn.preRender.process(X),Sn.render.process(X),X.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Qn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Qf),this.sharedNodes.forEach(id)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,L.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){L.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Z(this.snapshot.measuredBox.x)&&!Z(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 r=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,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Mo(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;r&&this.instance&&(a||Ie(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),ld(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return W();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(cd))){const{scroll:u}=this.root;u&&(qe(a.x,u.offset.x),qe(a.y,u.offset.y))}return a}removeElementScroll(r){const a=W();if(re(a,r),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:f}=u;u!==this.root&&c&&f.layoutScroll&&(c.wasRoot&&re(a,r),qe(a.x,c.offset.x),qe(a.y,c.offset.y))}return a}applyTransform(r,a=!1){const l=W();re(l,r);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Ze(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Ie(c.latestValues)&&Ze(l,c.latestValues)}return Ie(this.latestValues)&&Ze(l,this.latestValues),l}removeTransform(r){const a=W();re(a,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Ie(u.latestValues))continue;ms(u.latestValues)&&u.updateSnapshot();const c=W(),f=u.measurePageBox();re(c,f),Ro(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Ie(this.latestValues)&&Ro(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.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!==X.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!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(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:f}=this.options;if(!(!this.layout||!(c||f))){if(this.resolvedRelativeTargetAt=X.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(),St(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),re(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(),pf(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):re(this.target,this.layout.layoutBox),Lr(this.target,this.targetDelta)):re(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(),St(this.relativeTargetOrigin,this.target,d.target),re(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||ms(this.parent.latestValues)||Nr(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 r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===X.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;re(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;Eu(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=W());const{target:m}=r;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Po(this.prevProjectionDelta.x,this.projectionDelta.x),Po(this.prevProjectionDelta.y,this.projectionDelta.y)),Tt(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!Io(this.projectionDelta.x,this.prevProjectionDelta.x)||!Io(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Je(),this.projectionDelta=Je(),this.projectionDeltaWithTransform=Je()}setAnimationOrigin(r,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},f=Je();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=W(),m=l?l.source:void 0,p=this.layout?this.layout.source:void 0,y=m!==p,x=this.getStack(),v=!x||x.members.length<=1,b=!!(y&&!v&&this.options.crossfade===!0&&!this.path.some(od));this.animationProgress=0;let g;this.mixTargetDelta=E=>{const C=E/1e3;$o(f.x,r.x,C),$o(f.y,r.y,C),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(St(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),rd(this.relativeTarget,this.relativeTargetOrigin,d,C),g&&zf(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=W()),re(g,this.relativeTarget)),y&&(this.animationValues=c,Ff(c,u,this.latestValues,C,b,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ce(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=L.update(()=>{Gt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ye(0)),this.currentAnimation=Vf(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.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 r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Yf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=r;if(!(!a||!l||!u)){if(this!==r&&this.layout&&u&&Xo(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||W();const f=Z(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+f;const d=Z(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+d}re(a,l),Ze(a,c),Tt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Kf),this.sharedNodes.get(r).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 r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Es("z",r,u,this.animationValues);for(let c=0;c<Ps.length;c++)Es(`rotate${Ps[c]}`,r,u,this.animationValues),Es(`skew${Ps[c]}`,r,u,this.animationValues);r.render();for(const c in u)r.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=Xt(a?.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=Xt(a?.pointerEvents)||""),this.hasProjected&&!Ie(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=Xf(this.projectionDeltaWithTransform,this.treeScale,c);l&&(f=l(c,f)),r.transform=f;const{x:d,y:m}=this.projectionDelta;r.transformOrigin=`${d.origin*100}% ${m.origin*100}% 0`,u.animationValues?r.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:r.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const p in vt){if(c[p]===void 0)continue;const{correct:y,applyTo:x,isCSSVariable:v}=vt[p],b=f==="none"?c[p]:y(c[p],u);if(x){const g=x.length;for(let E=0;E<g;E++)r[x[E]]=b}else v?this.options.visualElement.renderState.vars[p]=b:r[p]=b}this.options.layoutId&&(r.pointerEvents=u===this?Xt(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(Fo),this.root.sharedNodes.clear()}}}function Gf(e){e.updateLayout()}function qf(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;i==="size"?ie(c=>{const f=o?t.measuredBox[c]:t.layoutBox[c],d=Z(f);f.min=n[c].min,f.max=f.min+d}):Xo(i,t.layoutBox,n)&&ie(c=>{const f=o?t.measuredBox[c]:t.layoutBox[c],d=Z(n[c]);f.max=f.min+d,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+d)});const r=Je();Tt(r,n,t.layoutBox);const a=Je();o?Tt(a,e.applyTransform(s,!0),t.measuredBox):Tt(a,n,t.layoutBox);const l=!Mo(r);let u=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:f,layout:d}=c;if(f&&d){const m=W();St(m,t.layoutBox,f.layoutBox);const p=W();St(p,n,d.layoutBox),Vo(m,p)||(u=!0),c.options.layoutRoot&&(e.relativeTarget=p,e.relativeTargetOrigin=m,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function Zf(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Jf(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Qf(e){e.clearSnapshot()}function Fo(e){e.clearMeasurements()}function Bo(e){e.isLayoutDirty=!1}function ed(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function _o(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function td(e){e.resolveTargetDelta()}function nd(e){e.calcProjection()}function sd(e){e.resetSkewAndRotation()}function id(e){e.removeLeadSnapshot()}function $o(e,t,n){e.translate=F(t.translate,0,n),e.scale=F(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Wo(e,t,n,s){e.min=F(t.min,n.min,s),e.max=F(t.max,n.max,s)}function rd(e,t,n,s){Wo(e.x,t.x,n.x,s),Wo(e.y,t.y,n.y,s)}function od(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const ad={duration:.45,ease:[.4,0,.1,1]},Uo=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),zo=Uo("applewebkit/")&&!Uo("chrome/")?Math.round:se;function Ko(e){e.min=zo(e.min),e.max=zo(e.max)}function ld(e){Ko(e.x),Ko(e.y)}function Xo(e,t,n){return e==="position"||e==="preserve-aspect"&&!mf(No(t),No(n),.2)}function cd(e){return e!==e.root&&e.scroll?.wasRoot}const ud=Lo({attachResizeListener:(e,t)=>xt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),As={current:void 0},Yo=Lo({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!As.current){const e=new ud({});e.mount(window),e.setOptions({layoutScroll:!0}),As.current=e}return As.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),fd={pan:{Feature:jf},drag:{Feature:Rf,ProjectionNode:Yo,MeasureLayout:vo}};function Ho(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=s[i];o&&L.postRender(()=>o(t,bt(t)))}class dd extends Ae{mount(){const{current:t}=this.node;t&&(this.unmount=Ic(t,(n,s)=>(Ho(this.node,s,"Start"),i=>Ho(this.node,i,"End"))))}unmount(){}}class hd extends Ae{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ct(xt(this.node.current,"focus",()=>this.onFocus()),xt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Go(e,t,n){const{props:s}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=s[i];o&&L.postRender(()=>o(t,bt(t)))}class md extends Ae{mount(){const{current:t}=this.node;t&&(this.unmount=Bc(t,(n,s)=>(Go(this.node,s,"Start"),(i,{success:o})=>Go(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Rs=new WeakMap,js=new WeakMap,pd=e=>{const t=Rs.get(e.target);t&&t(e)},gd=e=>{e.forEach(pd)};function yd({root:e,...t}){const n=e||document;js.has(n)||js.set(n,{});const s=js.get(n),i=JSON.stringify(t);return s[i]||(s[i]=new IntersectionObserver(gd,{root:e,...t})),s[i]}function vd(e,t,n){const s=yd(t);return Rs.set(e,n),s.observe(e),()=>{Rs.delete(e),s.unobserve(e)}}const xd={some:0,all:1};class bd extends Ae{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=t,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:xd[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:f}=this.node.getProps(),d=u?c:f;d&&d(l)};return vd(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(wd(t,n))&&this.startObserver()}unmount(){}}function wd({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Td={...lf,...{inView:{Feature:bd},tap:{Feature:md},focus:{Feature:hd},hover:{Feature:dd}},...fd,...{layout:{ProjectionNode:Yo,MeasureLayout:vo}}},Pt=Su(Td,Ou),Sd=["polygon(50% 50%,0 0,0 0,0 0,0 0,0 0)","polygon(50% 50%,0 0,100% 0,100% 0,100% 0,100% 0)","polygon(50% 50%,0 0,100% 0,100% 100%,100% 100%,100% 100%)","polygon(50% 50%,0 0,100% 0,100% 100%,0 100%,0 100%)","polygon(50% 50%,0 0,100% 0,100% 100%,0 100%,0 0)"],qt=e=>{const{speed:t=1,className:n}=e,s=1/t,i=2/t;return h.jsx(ss,{children:h.jsx(Pt.div,{role:"status",className:k("relative rounded-full",n),animate:{rotate:360},transition:{repeat:1/0,ease:"linear",duration:s},children:h.jsx(Pt.div,{className:"absolute inset-0 rounded-full",style:{boxSizing:"border-box",borderStyle:"solid",borderWidth:2},animate:{clipPath:Sd},transition:{repeat:1/0,ease:"linear",duration:i,times:[0,.25,.5,.75,1]}})})})},Cd=`
|
|
31
31
|
inline-flex flex-row items-center justify-center gap-2
|
|
32
32
|
button-ring font-semibold ring-0 disabled:hover:ring-0 hover:ring-4 active:ring-1
|
|
33
33
|
rounded-[var(--border-radius-input)]
|
|
34
34
|
cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-4
|
|
35
35
|
disabled:cursor-default
|
|
36
|
-
`,
|
|
36
|
+
`,Pd={primary:"border button-primary shadow-sm",secondary:"border button-secondary shadow-sm",tertiary:"border button-tertiary",white:"border button-white shadow-sm",black:"border button-black shadow-sm",transparent:"border button-transparent"},Ed={sm:"h-10 px-4",md:"h-12 px-6",lg:"h-14 px-8"},qo=S.forwardRef((e,t)=>{const{variant:n="white",size:s="md",className:i,children:o,loading:r=!1,Icon:a,...l}=e;return h.jsxs("button",{ref:t,className:k(Cd,Pd[n],Ed[s],i),...l,children:[r&&h.jsx(qt,{className:"h-5 w-5"}),!r&&h.jsxs(h.Fragment,{children:[a&&h.jsx(a,{className:"h-5 w-5 -ml-2"}),o]})]})}),Ad=`
|
|
37
37
|
inline-flex flex-row items-center justify-center aspect-square
|
|
38
38
|
button-ring font-semibold ring-0 disabled:hover:ring-0 hover:ring-4 active:ring-1
|
|
39
39
|
rounded-[var(--border-radius-input)]
|
|
40
40
|
cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-4
|
|
41
41
|
disabled:cursor-default
|
|
42
|
-
`,
|
|
42
|
+
`,Rd={primary:"border button-primary shadow-sm",secondary:"border button-secondary shadow-sm",tertiary:"border button-tertiary",white:"border button-white shadow-sm",black:"border button-black shadow-sm",transparent:"border button-transparent"},jd={sm:"h-10 w-10",md:"h-12 w-12",lg:"h-14 w-14"},Ms=S.forwardRef((e,t)=>{const{variant:n="white",size:s="md",className:i,Icon:o,...r}=e;return h.jsx("button",{ref:t,className:k(Ad,Rd[n],jd[s],i),...r,children:h.jsx(o,{className:"h-5 w-5"})})}),Md=`
|
|
43
43
|
inline-flex flex-row items-center justify-center aspect-square
|
|
44
44
|
button-ring font-semibold ring-0 disabled:hover:ring-0 hover:ring-4 active:ring-1 rounded-full cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-4
|
|
45
45
|
disabled:cursor-default
|
|
46
|
-
`,
|
|
46
|
+
`,Dd={primary:"border button-primary shadow-sm",secondary:"border button-secondary shadow-sm",tertiary:"border button-tertiary",white:"border button-white shadow-sm",black:"border button-black shadow-sm",transparent:"border button-transparent"},kd={sm:"h-10 w-10",md:"h-12 w-12",lg:"h-14 w-14"},Zo=S.forwardRef((e,t)=>{const{variant:n="white",size:s="md",className:i,Icon:o,...r}=e;return h.jsx("button",{ref:t,className:k(Md,Dd[n],kd[s],i),...r,children:h.jsx(o,{className:"h-5 w-5"})})});/**
|
|
47
47
|
* @license @tabler/icons-react v3.34.1 - MIT
|
|
48
48
|
*
|
|
49
49
|
* This source code is licensed under the MIT license.
|
|
50
50
|
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/var
|
|
51
|
+
*/var Vd={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
|
|
52
52
|
* @license @tabler/icons-react v3.34.1 - MIT
|
|
53
53
|
*
|
|
54
54
|
* This source code is licensed under the MIT license.
|
|
55
55
|
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const
|
|
56
|
+
*/const ee=(e,t,n,s)=>{const i=T.forwardRef(({color:o="currentColor",size:r=24,stroke:a=2,title:l,className:u,children:c,...f},d)=>T.createElement("svg",{ref:d,...Vd[e],width:r,height:r,className:["tabler-icon",`tabler-icon-${t}`,u].join(" "),...e==="filled"?{fill:o}:{strokeWidth:a,stroke:o},...f},[l&&T.createElement("title",{key:"svg-title"},l),...s.map(([m,p])=>T.createElement(m,p)),...Array.isArray(c)?c:[c]]));return i.displayName=`${n}`,i};/**
|
|
57
57
|
* @license @tabler/icons-react v3.34.1 - MIT
|
|
58
58
|
*
|
|
59
59
|
* This source code is licensed under the MIT license.
|
|
60
60
|
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/const
|
|
61
|
+
*/const Nd=ee("outline","check","Check",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]);/**
|
|
62
62
|
* @license @tabler/icons-react v3.34.1 - MIT
|
|
63
63
|
*
|
|
64
64
|
* This source code is licensed under the MIT license.
|
|
65
65
|
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/const
|
|
66
|
+
*/const Zt=ee("outline","chevron-down","ChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);/**
|
|
67
67
|
* @license @tabler/icons-react v3.34.1 - MIT
|
|
68
68
|
*
|
|
69
69
|
* This source code is licensed under the MIT license.
|
|
70
70
|
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const
|
|
71
|
+
*/const Id=ee("outline","eye-off","EyeOff",[["path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828",key:"svg-0"}],["path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]]);/**
|
|
72
72
|
* @license @tabler/icons-react v3.34.1 - MIT
|
|
73
73
|
*
|
|
74
74
|
* This source code is licensed under the MIT license.
|
|
75
75
|
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/const
|
|
76
|
+
*/const Od=ee("outline","eye","Eye",[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]]);/**
|
|
77
77
|
* @license @tabler/icons-react v3.34.1 - MIT
|
|
78
78
|
*
|
|
79
79
|
* This source code is licensed under the MIT license.
|
|
80
80
|
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const Jo=
|
|
81
|
+
*/const Jo=ee("outline","list","List",[["path",{d:"M9 6l11 0",key:"svg-0"}],["path",{d:"M9 12l11 0",key:"svg-1"}],["path",{d:"M9 18l11 0",key:"svg-2"}],["path",{d:"M5 6l0 .01",key:"svg-3"}],["path",{d:"M5 12l0 .01",key:"svg-4"}],["path",{d:"M5 18l0 .01",key:"svg-5"}]]);/**
|
|
82
82
|
* @license @tabler/icons-react v3.34.1 - MIT
|
|
83
83
|
*
|
|
84
84
|
* This source code is licensed under the MIT license.
|
|
85
85
|
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const Qo=
|
|
86
|
+
*/const Qo=ee("outline","plus","Plus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]);/**
|
|
87
87
|
* @license @tabler/icons-react v3.34.1 - MIT
|
|
88
88
|
*
|
|
89
89
|
* This source code is licensed under the MIT license.
|
|
90
90
|
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const
|
|
91
|
+
*/const ea=ee("outline","search-off","SearchOff",[["path",{d:"M5.039 5.062a7 7 0 0 0 9.91 9.89m1.584 -2.434a7 7 0 0 0 -9.038 -9.057",key:"svg-0"}],["path",{d:"M3 3l18 18",key:"svg-1"}]]);/**
|
|
92
92
|
* @license @tabler/icons-react v3.34.1 - MIT
|
|
93
93
|
*
|
|
94
94
|
* This source code is licensed under the MIT license.
|
|
95
95
|
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const
|
|
96
|
+
*/const Ds=ee("outline","search","Search",[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]]);/**
|
|
97
97
|
* @license @tabler/icons-react v3.34.1 - MIT
|
|
98
98
|
*
|
|
99
99
|
* This source code is licensed under the MIT license.
|
|
100
100
|
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const
|
|
101
|
+
*/const ta=ee("outline","settings","Settings",[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]]);/**
|
|
102
102
|
* @license @tabler/icons-react v3.34.1 - MIT
|
|
103
103
|
*
|
|
104
104
|
* This source code is licensed under the MIT license.
|
|
105
105
|
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const
|
|
106
|
+
*/const Ld=ee("outline","trash","Trash",[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]]);/**
|
|
107
107
|
* @license @tabler/icons-react v3.34.1 - MIT
|
|
108
108
|
*
|
|
109
109
|
* This source code is licensed under the MIT license.
|
|
110
110
|
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const
|
|
111
|
+
*/const Et=ee("outline","x","X",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);/**
|
|
112
112
|
* @license @tabler/icons-react v3.34.1 - MIT
|
|
113
113
|
*
|
|
114
114
|
* This source code is licensed under the MIT license.
|
|
115
115
|
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const
|
|
116
|
+
*/const Fd=ee("filled","exclamation-circle-filled","ExclamationCircleFilled",[["path",{d:"M17 3.34a10 10 0 1 1 -15 8.66l.005 -.324a10 10 0 0 1 14.995 -8.336m-5 11.66a1 1 0 0 0 -1 1v.01a1 1 0 0 0 2 0v-.01a1 1 0 0 0 -1 -1m0 -7a1 1 0 0 0 -1 1v4a1 1 0 0 0 2 0v-4a1 1 0 0 0 -1 -1",key:"svg-0"}]]);/**
|
|
117
|
+
* @license @tabler/icons-react v3.34.1 - MIT
|
|
118
|
+
*
|
|
119
|
+
* This source code is licensed under the MIT license.
|
|
120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
+
*/const Bd=ee("filled","mail-filled","MailFilled",[["path",{d:"M22 7.535v9.465a3 3 0 0 1 -2.824 2.995l-.176 .005h-14a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-9.465l9.445 6.297l.116 .066a1 1 0 0 0 .878 0l.116 -.066l9.445 -6.297z",key:"svg-0"}],["path",{d:"M19 4c1.08 0 2.027 .57 2.555 1.427l-9.555 6.37l-9.555 -6.37a2.999 2.999 0 0 1 2.354 -1.42l.201 -.007h14z",key:"svg-1"}]]),Le=e=>{const{children:t}=e;return t?h.jsx("label",{className:"text-gray-900 font-medium mb-1",children:t}):null},Fe=()=>h.jsx("div",{className:"h-5 w-5",children:h.jsx(Fd,{className:"h-5 w-5 text-red-600"})}),Be=e=>{const{children:t,className:n}=e;return h.jsx("div",{className:k("absolute top-1/2 -translate-y-1/2 right-3.5 flex flex-row items-center gap-1",n),children:t})},he=e=>{const{children:t}=e;return t?h.jsx("div",{className:"text-gray-500 text-sm font-medium mt-2",children:t}):null},me=e=>{const{children:t}=e;return t?h.jsx("div",{className:"text-red-600 text-sm font-medium mt-2",children:t}):null},ks=e=>{const{className:t,label:n,description:s,Icon:i,error:o,buttonTray:r,...a}=e;return h.jsxs("div",{className:k("flex flex-col",t),children:[h.jsx(Le,{children:n}),h.jsxs("div",{className:"flex flex-col relative",children:[i&&h.jsx(i,{className:"h-5 w-5 text-gray-900/60 absolute left-4 top-1/2 -translate-y-1/2"}),h.jsx("input",{className:k("h-12 border border-gray-200 text-gray-900 placeholder:text-gray-400 bg-white transition-all duration-150 rounded-xl shadow-sm ring-0 ring-gray-900/10 focus:ring-4 focus:outline-none",i?"pl-12 pr-4":"px-4",o&&"border-red-600 focus:ring-red-600/20 !pr-10"),...a}),h.jsxs(Be,{children:[o&&h.jsx(Fe,{}),r]})]}),h.jsx(he,{children:s}),h.jsx(me,{children:o})]})},Se=e=>{const{onClick:t,Icon:n}=e;return h.jsx("div",{onClick:t,className:k("h-6 w-6 select-none rounded-full p-0.5",t&&"ring-0 transition-all duration-150 ring-gray-200 active:ring-2 cursor-pointer hover:ring-4 group"),children:h.jsx(n,{className:k("h-5 w-5 text-gray-500",t&&"group-active:scale-[0.8] transition-transform origin-center")})})},_d=e=>{const{type:t="password",enableShowPasswordToggle:n=!0,...s}=e,[i,o]=T.useState(!1),r=()=>{o(!i)};return h.jsx(ks,{type:i?"text":t,buttonTray:n?h.jsx(Se,{Icon:i?Id:Od,onClick:r}):void 0,...s})},$d=e=>{const{className:t,label:n,description:s,error:i,...o}=e;return h.jsxs("div",{className:k("flex flex-col",t),children:[h.jsx(Le,{children:n}),h.jsxs("div",{className:"flex flex-col relative",children:[h.jsx("textarea",{className:k("px-4 py-2.5 min-h-12 border border-gray-200 text-gray-900 placeholder:text-gray-400 bg-white transition-all duration-150 rounded-xl shadow-sm ring-0 ring-gray-900/10 focus:ring-4 focus:outline-none",i&&"border-red-600 focus:ring-red-600/20 !pr-10"),...o}),h.jsx(Be,{className:"top-3.5 translate-y-0",children:i&&h.jsx(Fe,{})})]}),h.jsx(he,{children:s}),h.jsx(me,{children:i})]})},Wd=e=>{const{className:t,label:n,description:s,error:i,...o}=e;return h.jsxs("div",{className:k("flex flex-col",t),children:[h.jsxs("div",{className:"flex flex-row gap-3",children:[h.jsx("input",{type:"radio",className:"h-6 w-6 shrink-0 rounded-full border border-gray-300 shadow-sm ring-0 hover:ring-4 focus:ring-4 ring-gray-900/10 ring-offset-0 focus:outline-0 transition-all duration-150",...o}),n&&h.jsx("label",{htmlFor:e.id,className:k("text-gray-900 font-medium mb-1",e.id&&"cursor-pointer"),children:n})]}),h.jsx(he,{children:s}),h.jsx(me,{children:i})]})},Ud=e=>{const{className:t,label:n,description:s,error:i,...o}=e;return h.jsxs("div",{className:k("flex flex-col",t),children:[h.jsxs("div",{className:"flex flex-row gap-3",children:[h.jsxs("div",{className:"relative shrink-0 h-6 w-10",children:[h.jsx("input",{type:"checkbox",className:"appearance-none h-6 w-10 rounded-full checked:bg-transparent border border-gray-300 ring-0 hover:ring-4 focus:ring-4 ring-gray-900/10 ring-offset-0 focus:outline-0 transition-all duration-150",...o}),h.jsx("div",{className:k("rounded-full absolute border inset-0 mt-[2px] pointer-events-none transition-colors duration-150 ",e.checked?"bg-blue-600 border-blue-600":"bg-gray-300 border-gray-300"),children:h.jsx("div",{className:k("absolute top-1/2 -translate-y-1/2 left-1 h-4 w-4 rounded-full bg-white shadow-md transition-all duration-150",e.checked&&"translate-x-3.5 ")})})]}),n&&h.jsx("label",{htmlFor:e.id,className:k("text-gray-900 font-medium mb-1",e.id&&"cursor-pointer"),children:n})]}),h.jsx(he,{children:s}),h.jsx(me,{children:i})]})},zd=e=>{const{className:t,label:n,description:s,error:i,...o}=e;return h.jsxs("div",{className:k("flex flex-col",t),children:[h.jsxs("div",{className:"flex flex-row gap-3",children:[h.jsx("input",{type:"checkbox",className:"h-6 w-6 shrink-0 rounded-lg border border-gray-300 shadow-sm ring-0 hover:ring-4 focus:ring-4 ring-gray-900/10 ring-offset-0 focus:outline-0 transition-all duration-150",...o}),n&&h.jsx("label",{htmlFor:e.id,className:k("text-gray-900 font-medium mb-1",e.id&&"cursor-pointer"),children:n})]}),h.jsx(he,{children:s}),h.jsx(me,{children:i})]})},Kd=e=>{const{className:t,label:n,description:s,options:i,error:o,...r}=e;return h.jsxs("div",{className:k("flex flex-col",t),children:[h.jsx(Le,{children:n}),h.jsxs("div",{className:"relative flex w-full flex-col",children:[h.jsx("select",{className:`
|
|
117
122
|
appearance-none
|
|
118
123
|
h-12
|
|
119
124
|
pl-4
|
|
@@ -132,8 +137,8 @@ React keys must be passed directly to JSX without using spread:
|
|
|
132
137
|
ring-gray-900/10
|
|
133
138
|
focus:ring-4
|
|
134
139
|
focus:outline-none
|
|
135
|
-
`,...r,children:i&&i.map((a,l)=>h.jsx("option",{value:a.value,disabled:a.disabled,children:a.label},l))}),h.jsxs(
|
|
140
|
+
`,...r,children:i&&i.map((a,l)=>h.jsx("option",{value:a.value,disabled:a.disabled,children:a.label},l))}),h.jsxs(Be,{children:[o&&h.jsx(Fe,{}),h.jsx(Se,{Icon:Zt})]})]}),h.jsx(he,{children:s}),h.jsx(me,{children:o})]})},At=e=>{const{children:t,onClick:n,selected:s,disabled:i=!1}=e;return h.jsxs("div",{onClick:()=>!i&&n&&n(),className:k("hover:bg-gray-100 active:bg-gray-200 px-4 py-2 rounded-xl cursor-pointer transition-all duration-150 select-none flex flex-row gap-3 items-center",s&&!i&&"bg-blue-50 hover:bg-blue-100 active:bg-blue-100",i&&"text-gray-400 cursor-not-allowed hover:bg-transparent active:bg-transparent"),children:[h.jsx("div",{className:"flex-1",children:t}),s&&!i&&h.jsx("div",{className:"shrink-0",children:h.jsx(Nd,{className:"h-5 w-5"})})]})};function Jt(){return typeof window<"u"}function et(e){return Vs(e)?(e.nodeName||"").toLowerCase():"#document"}function te(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function pe(e){var t;return(t=(Vs(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Vs(e){return Jt()?e instanceof Node||e instanceof te(e).Node:!1}function H(e){return Jt()?e instanceof Element||e instanceof te(e).Element:!1}function ge(e){return Jt()?e instanceof HTMLElement||e instanceof te(e).HTMLElement:!1}function Ns(e){return!Jt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof te(e).ShadowRoot}const Xd=new Set(["inline","contents"]);function Rt(e){const{overflow:t,overflowX:n,overflowY:s,display:i}=ce(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&!Xd.has(i)}const Yd=new Set(["table","td","th"]);function Hd(e){return Yd.has(et(e))}const Gd=[":popover-open",":modal"];function Qt(e){return Gd.some(t=>{try{return e.matches(t)}catch{return!1}})}const qd=["transform","translate","scale","rotate","perspective"],Zd=["transform","translate","scale","rotate","perspective","filter"],Jd=["paint","layout","strict","content"];function Is(e){const t=Os(),n=H(e)?ce(e):e;return qd.some(s=>n[s]?n[s]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Zd.some(s=>(n.willChange||"").includes(s))||Jd.some(s=>(n.contain||"").includes(s))}function Qd(e){let t=Re(e);for(;ge(t)&&!tt(t);){if(Is(t))return t;if(Qt(t))return null;t=Re(t)}return null}function Os(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const eh=new Set(["html","body","#document"]);function tt(e){return eh.has(et(e))}function ce(e){return te(e).getComputedStyle(e)}function en(e){return H(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Re(e){if(et(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ns(e)&&e.host||pe(e);return Ns(t)?t.host:t}function na(e){const t=Re(e);return tt(t)?e.ownerDocument?e.ownerDocument.body:e.body:ge(t)&&Rt(t)?t:na(t)}function jt(e,t,n){var s;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=na(e),o=i===((s=e.ownerDocument)==null?void 0:s.body),r=te(i);if(o){const a=Ls(r);return t.concat(r,r.visualViewport||[],Rt(i)?i:[],a&&n?jt(a):[])}return t.concat(i,jt(i,[],n))}function Ls(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Mt=Math.min,oe=Math.max,tn=Math.round,nn=Math.floor,ye=e=>({x:e,y:e});function sa(e,t){return typeof e=="function"?e(t):e}function Fs(e){return e.split("-")[0]}function ia(e){return e.split("-")[1]}function th(e){return e==="x"?"y":"x"}function nh(e){return e==="y"?"height":"width"}const sh=new Set(["top","bottom"]);function Bs(e){return sh.has(Fs(e))?"y":"x"}function ih(e){return th(Bs(e))}function rh(e){return{top:0,right:0,bottom:0,left:0,...e}}function oh(e){return typeof e!="number"?rh(e):{top:e,right:e,bottom:e,left:e}}function sn(e){const{x:t,y:n,width:s,height:i}=e;return{width:s,height:i,top:n,left:t,right:t+s,bottom:n+i,x:t,y:n}}/*!
|
|
136
141
|
* tabbable 6.2.0
|
|
137
142
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
138
|
-
*/var rh=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],_s=rh.join(","),ia=typeof Element>"u",De=ia?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,rn=!ia&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t?.ownerDocument},on=function t(e,n){var s;n===void 0&&(n=!0);var i=e==null||(s=e.getAttribute)===null||s===void 0?void 0:s.call(e,"inert"),o=i===""||i==="true",r=o||n&&e&&t(e.parentNode);return r},oh=function(e){var n,s=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return s===""||s==="true"},ah=function(e,n,s){if(on(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(_s));return n&&De.call(e,_s)&&i.unshift(e),i=i.filter(s),i},lh=function t(e,n,s){for(var i=[],o=Array.from(e);o.length;){var r=o.shift();if(!on(r,!1))if(r.tagName==="SLOT"){var a=r.assignedElements(),l=a.length?a:r.children,u=t(l,!0,s);s.flatten?i.push.apply(i,u):i.push({scopeParent:r,candidates:u})}else{var c=De.call(r,_s);c&&s.filter(r)&&(n||!e.includes(r))&&i.push(r);var f=r.shadowRoot||typeof s.getShadowRoot=="function"&&s.getShadowRoot(r),d=!on(f,!1)&&(!s.shadowRootFilter||s.shadowRootFilter(r));if(f&&d){var m=t(f===!0?r.children:f.children,!0,s);s.flatten?i.push.apply(i,m):i.push({scopeParent:r,candidates:m})}else o.unshift.apply(o,r.children)}}return i},ra=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},oa=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||oh(e))&&!ra(e)?0:e.tabIndex},ch=function(e,n){var s=oa(e);return s<0&&n&&!ra(e)?0:s},uh=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},aa=function(e){return e.tagName==="INPUT"},fh=function(e){return aa(e)&&e.type==="hidden"},dh=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(s){return s.tagName==="SUMMARY"});return n},hh=function(e,n){for(var s=0;s<e.length;s++)if(e[s].checked&&e[s].form===n)return e[s]},mh=function(e){if(!e.name)return!0;var n=e.form||rn(e),s=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=s(window.CSS.escape(e.name));else try{i=s(e.name)}catch(r){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",r.message),!1}var o=hh(i,e.form);return!o||o===e},ph=function(e){return aa(e)&&e.type==="radio"},gh=function(e){return ph(e)&&!mh(e)},yh=function(e){var n,s=e&&rn(e),i=(n=s)===null||n===void 0?void 0:n.host,o=!1;if(s&&s!==e){var r,a,l;for(o=!!((r=i)!==null&&r!==void 0&&(a=r.ownerDocument)!==null&&a!==void 0&&a.contains(i)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!o&&i;){var u,c,f;s=rn(i),i=(u=s)===null||u===void 0?void 0:u.host,o=!!((c=i)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(i))}}return o},la=function(e){var n=e.getBoundingClientRect(),s=n.width,i=n.height;return s===0&&i===0},vh=function(e,n){var s=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var o=De.call(e,"details>summary:first-of-type"),r=o?e.parentElement:e;if(De.call(r,"details:not([open]) *"))return!0;if(!s||s==="full"||s==="legacy-full"){if(typeof i=="function"){for(var a=e;e;){var l=e.parentElement,u=rn(e);if(l&&!l.shadowRoot&&i(l)===!0)return la(e);e.assignedSlot?e=e.assignedSlot:!l&&u!==e.ownerDocument?e=u.host:e=l}e=a}if(yh(e))return!e.getClientRects().length;if(s!=="legacy-full")return!0}else if(s==="non-zero-area")return la(e);return!1},xh=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var s=0;s<n.children.length;s++){var i=n.children.item(s);if(i.tagName==="LEGEND")return De.call(n,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}n=n.parentElement}return!1},bh=function(e,n){return!(n.disabled||on(n)||fh(n)||vh(n,e)||dh(n)||xh(n))},ca=function(e,n){return!(gh(n)||oa(n)<0||!bh(e,n))},wh=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Th=function t(e){var n=[],s=[];return e.forEach(function(i,o){var r=!!i.scopeParent,a=r?i.scopeParent:i,l=ch(a,r),u=r?t(i.candidates):a;l===0?r?n.push.apply(n,u):n.push(a):s.push({documentOrder:o,tabIndex:l,item:i,isScope:r,content:u})}),s.sort(uh).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},ua=function(e,n){n=n||{};var s;return n.getShadowRoot?s=lh([e],n.includeContainer,{filter:ca.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:wh}):s=ah(e,n.includeContainer,ca.bind(null,n)),Th(s)};function Sh(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function Ch(){return/apple/i.test(navigator.vendor)}function Ph(t){let e=t.activeElement;for(;((n=e)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;e=e.shadowRoot.activeElement}return e}function Eh(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&Ns(n)){let s=e;for(;s;){if(t===s)return!0;s=s.parentNode||s.host}}return!1}function $s(t){return t?.ownerDocument||document}var Ah=typeof document<"u",jh=function(){},Rt=Ah?T.useLayoutEffect:jh;const Rh={...C}.useInsertionEffect||(t=>t());function Mh(t){const e=C.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Rh(()=>{e.current=t}),C.useCallback(function(){for(var n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return e.current==null?void 0:e.current(...s)},[])}const fa=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function da(t,e){const n=ua(t,fa()),s=n.length;if(s===0)return;const i=Ph($s(t)),o=n.indexOf(i),r=o===-1?e===1?0:s-1:o+e;return n[r]}function Dh(t){return da($s(t).body,1)||t}function Vh(t){return da($s(t).body,-1)||t}function Ws(t,e){const n=e||t.currentTarget,s=t.relatedTarget;return!s||!Eh(n,s)}function kh(t){ua(t,fa()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function ha(t){t.querySelectorAll("[data-tabindex]").forEach(n=>{const s=n.dataset.tabindex;delete n.dataset.tabindex,s?n.setAttribute("tabindex",s):n.removeAttribute("tabindex")})}function ma(t,e,n){let{reference:s,floating:i}=t;const o=Bs(e),r=nh(e),a=th(r),l=Fs(e),u=o==="y",c=s.x+s.width/2-i.width/2,f=s.y+s.height/2-i.height/2,d=s[a]/2-i[a]/2;let m;switch(l){case"top":m={x:c,y:s.y-i.height};break;case"bottom":m={x:c,y:s.y+s.height};break;case"right":m={x:s.x+s.width,y:f};break;case"left":m={x:s.x-i.width,y:f};break;default:m={x:s.x,y:s.y}}switch(sa(e)){case"start":m[r]-=d*(n&&u?-1:1);break;case"end":m[r]+=d*(n&&u?-1:1);break}return m}const Nh=async(t,e,n)=>{const{placement:s="bottom",strategy:i="absolute",middleware:o=[],platform:r}=n,a=o.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(e));let u=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:f}=ma(u,s,l),d=s,m={},p=0;for(let g=0;g<a.length;g++){const{name:x,fn:y}=a[g],{x:w,y:v,data:E,reset:S}=await y({x:c,y:f,initialPlacement:s,placement:d,strategy:i,middlewareData:m,rects:u,platform:r,elements:{reference:t,floating:e}});c=w??c,f=v??f,m={...m,[x]:{...m[x],...E}},S&&p<=50&&(p++,typeof S=="object"&&(S.placement&&(d=S.placement),S.rects&&(u=S.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):S.rects),{x:c,y:f}=ma(u,d,l)),g=-1)}return{x:c,y:f,placement:d,strategy:i,middlewareData:m}};async function Oh(t,e){var n;e===void 0&&(e={});const{x:s,y:i,platform:o,rects:r,elements:a,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:d=!1,padding:m=0}=na(e,t),p=ih(m),x=a[d?f==="floating"?"reference":"floating":f],y=sn(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(x)))==null||n?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),w=f==="floating"?{x:s,y:i,width:r.floating.width,height:r.floating.height}:r.reference,v=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),E=await(o.isElement==null?void 0:o.isElement(v))?await(o.getScale==null?void 0:o.getScale(v))||{x:1,y:1}:{x:1,y:1},S=sn(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:v,strategy:l}):w);return{top:(y.top-S.top+p.top)/E.y,bottom:(S.bottom-y.bottom+p.bottom)/E.y,left:(y.left-S.left+p.left)/E.x,right:(S.right-y.right+p.right)/E.x}}const Ih=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,s;const{placement:i,rects:o,platform:r,elements:a}=e,{apply:l=()=>{},...u}=na(t,e),c=await Oh(e,u),f=Fs(i),d=sa(i),m=Bs(i)==="y",{width:p,height:g}=o.floating;let x,y;f==="top"||f==="bottom"?(x=f,y=d===(await(r.isRTL==null?void 0:r.isRTL(a.floating))?"start":"end")?"left":"right"):(y=f,x=d==="end"?"top":"bottom");const w=g-c.top-c.bottom,v=p-c.left-c.right,E=Me(g-c[x],w),S=Me(p-c[y],v),P=!e.middlewareData.shift;let A=E,j=S;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(j=v),(s=e.middlewareData.shift)!=null&&s.enabled.y&&(A=w),P&&!d){const O=ot(c.left,0),U=ot(c.right,0),et=ot(c.top,0),I=ot(c.bottom,0);m?j=p-2*(O!==0||U!==0?O+U:ot(c.left,c.right)):A=g-2*(et!==0||I!==0?et+I:ot(c.top,c.bottom))}await l({...e,availableWidth:j,availableHeight:A});const N=await r.getDimensions(a.floating);return p!==N.width||g!==N.height?{reset:{rects:!0}}:{}}}};function pa(t){const e=ct(t);let n=parseFloat(e.width)||0,s=parseFloat(e.height)||0;const i=gt(t),o=i?t.offsetWidth:n,r=i?t.offsetHeight:s,a=en(n)!==o||en(s)!==r;return a&&(n=o,s=r),{width:n,height:s,$:a}}function Us(t){return G(t)?t:t.contextElement}function ne(t){const e=Us(t);if(!gt(e))return yt(1);const n=e.getBoundingClientRect(),{width:s,height:i,$:o}=pa(e);let r=(o?en(n.width):n.width)/s,a=(o?en(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const Lh=yt(0);function ga(t){const e=tt(t);return!Is()||!e.visualViewport?Lh:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Fh(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==tt(t)?!1:e}function _t(t,e,n,s){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=Us(t);let r=yt(1);e&&(s?G(s)&&(r=ne(s)):r=ne(t));const a=Fh(o,n,s)?ga(o):yt(0);let l=(i.left+a.x)/r.x,u=(i.top+a.y)/r.y,c=i.width/r.x,f=i.height/r.y;if(o){const d=tt(o),m=s&&G(s)?tt(s):s;let p=d,g=Ls(p);for(;g&&s&&m!==p;){const x=ne(g),y=g.getBoundingClientRect(),w=ct(g),v=y.left+(g.clientLeft+parseFloat(w.paddingLeft))*x.x,E=y.top+(g.clientTop+parseFloat(w.paddingTop))*x.y;l*=x.x,u*=x.y,c*=x.x,f*=x.y,l+=v,u+=E,p=tt(g),g=Ls(p)}}return sn({width:c,height:f,x:l,y:u})}function an(t,e){const n=tn(t).scrollLeft;return e?e.left+n:_t(pt(t)).left+n}function ya(t,e){const n=t.getBoundingClientRect(),s=n.left+e.scrollLeft-an(t,n),i=n.top+e.scrollTop;return{x:s,y:i}}function Bh(t){let{elements:e,rect:n,offsetParent:s,strategy:i}=t;const o=i==="fixed",r=pt(s),a=e?Qe(e.floating):!1;if(s===r||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=yt(1);const c=yt(0),f=gt(s);if((f||!f&&!o)&&((te(s)!=="body"||je(r))&&(l=tn(s)),gt(s))){const m=_t(s);u=ne(s),c.x=m.x+s.clientLeft,c.y=m.y+s.clientTop}const d=r&&!f&&!o?ya(r,l):yt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+d.x,y:n.y*u.y-l.scrollTop*u.y+c.y+d.y}}function _h(t){return Array.from(t.getClientRects())}function $h(t){const e=pt(t),n=tn(t),s=t.ownerDocument.body,i=ot(e.scrollWidth,e.clientWidth,s.scrollWidth,s.clientWidth),o=ot(e.scrollHeight,e.clientHeight,s.scrollHeight,s.clientHeight);let r=-n.scrollLeft+an(t);const a=-n.scrollTop;return ct(s).direction==="rtl"&&(r+=ot(e.clientWidth,s.clientWidth)-i),{width:i,height:o,x:r,y:a}}const va=25;function Wh(t,e){const n=tt(t),s=pt(t),i=n.visualViewport;let o=s.clientWidth,r=s.clientHeight,a=0,l=0;if(i){o=i.width,r=i.height;const c=Is();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const u=an(s);if(u<=0){const c=s.ownerDocument,f=c.body,d=getComputedStyle(f),m=c.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,p=Math.abs(s.clientWidth-f.clientWidth-m);p<=va&&(o-=p)}else u<=va&&(o+=u);return{width:o,height:r,x:a,y:l}}const Uh=new Set(["absolute","fixed"]);function zh(t,e){const n=_t(t,!0,e==="fixed"),s=n.top+t.clientTop,i=n.left+t.clientLeft,o=gt(t)?ne(t):yt(1),r=t.clientWidth*o.x,a=t.clientHeight*o.y,l=i*o.x,u=s*o.y;return{width:r,height:a,x:l,y:u}}function xa(t,e,n){let s;if(e==="viewport")s=Wh(t,n);else if(e==="document")s=$h(pt(t));else if(G(e))s=zh(e,n);else{const i=ga(t);s={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return sn(s)}function ba(t,e){const n=jt(t);return n===e||!G(n)||ee(n)?!1:ct(n).position==="fixed"||ba(n,e)}function Kh(t,e){const n=e.get(t);if(n)return n;let s=Re(t,[],!1).filter(a=>G(a)&&te(a)!=="body"),i=null;const o=ct(t).position==="fixed";let r=o?jt(t):t;for(;G(r)&&!ee(r);){const a=ct(r),l=Os(r);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&!!i&&Uh.has(i.position)||je(r)&&!l&&ba(t,r))?s=s.filter(c=>c!==r):i=a,r=jt(r)}return e.set(t,s),s}function Yh(t){let{element:e,boundary:n,rootBoundary:s,strategy:i}=t;const r=[...n==="clippingAncestors"?Qe(e)?[]:Kh(e,this._c):[].concat(n),s],a=r[0],l=r.reduce((u,c)=>{const f=xa(e,c,i);return u.top=ot(f.top,u.top),u.right=Me(f.right,u.right),u.bottom=Me(f.bottom,u.bottom),u.left=ot(f.left,u.left),u},xa(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Hh(t){const{width:e,height:n}=pa(t);return{width:e,height:n}}function Gh(t,e,n){const s=gt(e),i=pt(e),o=n==="fixed",r=_t(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=yt(0);function u(){l.x=an(i)}if(s||!s&&!o)if((te(e)!=="body"||je(i))&&(a=tn(e)),s){const m=_t(e,!0,o,e);l.x=m.x+e.clientLeft,l.y=m.y+e.clientTop}else i&&u();o&&!s&&i&&u();const c=i&&!s&&!o?ya(i,a):yt(0),f=r.left+a.scrollLeft-l.x-c.x,d=r.top+a.scrollTop-l.y-c.y;return{x:f,y:d,width:r.width,height:r.height}}function zs(t){return ct(t).position==="static"}function wa(t,e){if(!gt(t)||ct(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return pt(t)===n&&(n=n.ownerDocument.body),n}function Ta(t,e){const n=tt(t);if(Qe(t))return n;if(!gt(t)){let i=jt(t);for(;i&&!ee(i);){if(G(i)&&!zs(i))return i;i=jt(i)}return n}let s=wa(t,e);for(;s&&Yd(s)&&zs(s);)s=wa(s,e);return s&&ee(s)&&zs(s)&&!Os(s)?n:s||Zd(t)||n}const Xh=async function(t){const e=this.getOffsetParent||Ta,n=this.getDimensions,s=await n(t.floating);return{reference:Gh(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function qh(t){return ct(t).direction==="rtl"}const Zh={convertOffsetParentRelativeRectToViewportRelativeRect:Bh,getDocumentElement:pt,getClippingRect:Yh,getOffsetParent:Ta,getElementRects:Xh,getClientRects:_h,getDimensions:Hh,getScale:ne,isElement:G,isRTL:qh};function Sa(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Jh(t,e){let n=null,s;const i=pt(t);function o(){var a;clearTimeout(s),(a=n)==null||a.disconnect(),n=null}function r(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const u=t.getBoundingClientRect(),{left:c,top:f,width:d,height:m}=u;if(a||e(),!d||!m)return;const p=nn(f),g=nn(i.clientWidth-(c+d)),x=nn(i.clientHeight-(f+m)),y=nn(c),v={rootMargin:-p+"px "+-g+"px "+-x+"px "+-y+"px",threshold:ot(0,Me(1,l))||1};let E=!0;function S(P){const A=P[0].intersectionRatio;if(A!==l){if(!E)return r();A?r(!1,A):s=setTimeout(()=>{r(!1,1e-7)},1e3)}A===1&&!Sa(u,t.getBoundingClientRect())&&r(),E=!1}try{n=new IntersectionObserver(S,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,v)}n.observe(t)}return r(!0),o}function Qh(t,e,n,s){s===void 0&&(s={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=s,u=Us(t),c=i||o?[...u?Re(u):[],...Re(e)]:[];c.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const f=u&&a?Jh(u,n):null;let d=-1,m=null;r&&(m=new ResizeObserver(y=>{let[w]=y;w&&w.target===u&&m&&(m.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var v;(v=m)==null||v.observe(e)})),n()}),u&&!l&&m.observe(u),m.observe(e));let p,g=l?_t(t):null;l&&x();function x(){const y=_t(t);g&&!Sa(g,y)&&n(),g=y,p=requestAnimationFrame(x)}return n(),()=>{var y;c.forEach(w=>{i&&w.removeEventListener("scroll",n),o&&w.removeEventListener("resize",n)}),f?.(),(y=m)==null||y.disconnect(),m=null,l&&cancelAnimationFrame(p)}}const tm=Ih,em=(t,e,n)=>{const s=new Map,i={platform:Zh,...n},o={...i.platform,_c:s};return Nh(t,e,{...i,platform:o})};var nm=typeof document<"u",sm=function(){},ln=nm?T.useLayoutEffect:sm;function cn(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,s,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(s=n;s--!==0;)if(!cn(t[s],e[s]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(e,i[s]))return!1;for(s=n;s--!==0;){const o=i[s];if(!(o==="_owner"&&t.$$typeof)&&!cn(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function Ca(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Pa(t,e){const n=Ca(t);return Math.round(e*n)/n}function Ks(t){const e=C.useRef(t);return ln(()=>{e.current=t}),e}function im(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:s=[],platform:i,elements:{reference:o,floating:r}={},transform:a=!0,whileElementsMounted:l,open:u}=t,[c,f]=C.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[d,m]=C.useState(s);cn(d,s)||m(s);const[p,g]=C.useState(null),[x,y]=C.useState(null),w=C.useCallback(k=>{k!==P.current&&(P.current=k,g(k))},[]),v=C.useCallback(k=>{k!==A.current&&(A.current=k,y(k))},[]),E=o||p,S=r||x,P=C.useRef(null),A=C.useRef(null),j=C.useRef(c),N=l!=null,O=Ks(l),U=Ks(i),et=Ks(u),I=C.useCallback(()=>{if(!P.current||!A.current)return;const k={placement:e,strategy:n,middleware:d};U.current&&(k.platform=U.current),em(P.current,A.current,k).then(J=>{const b={...J,isPositioned:et.current!==!1};K.current&&!cn(j.current,b)&&(j.current=b,Qs.flushSync(()=>{f(b)}))})},[d,e,n,U,et]);ln(()=>{u===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,f(k=>({...k,isPositioned:!1})))},[u]);const K=C.useRef(!1);ln(()=>(K.current=!0,()=>{K.current=!1}),[]),ln(()=>{if(E&&(P.current=E),S&&(A.current=S),E&&S){if(O.current)return O.current(E,S,I);I()}},[E,S,I,O,N]);const vt=C.useMemo(()=>({reference:P,floating:A,setReference:w,setFloating:v}),[w,v]),ut=C.useMemo(()=>({reference:E,floating:S}),[E,S]),_=C.useMemo(()=>{const k={position:n,left:0,top:0};if(!ut.floating)return k;const J=Pa(ut.floating,c.x),b=Pa(ut.floating,c.y);return a?{...k,transform:"translate("+J+"px, "+b+"px)",...Ca(ut.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:J,top:b}},[n,a,ut.floating,c.x,c.y]);return C.useMemo(()=>({...c,update:I,refs:vt,elements:ut,floatingStyles:_}),[c,I,vt,ut,_])}const rm=(t,e)=>({...tm(t),options:[t,e]}),om={...C};let Ea=!1,am=0;const Aa=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+am++;function lm(){const[t,e]=C.useState(()=>Ea?Aa():void 0);return Rt(()=>{t==null&&e(Aa())},[]),C.useEffect(()=>{Ea=!0},[]),t}const ja=om.useId||lm;let Ys;process.env.NODE_ENV!=="production"&&(Ys=new Set);function cm(){for(var t,e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];const i="Floating UI: "+n.join(" ");if(!((t=Ys)!=null&&t.has(i))){var o;(o=Ys)==null||o.add(i),console.error(i)}}function um(){const t=new Map;return{emit(e,n){var s;(s=t.get(e))==null||s.forEach(i=>i(n))},on(e,n){t.has(e)||t.set(e,new Set),t.get(e).add(n)},off(e,n){var s;(s=t.get(e))==null||s.delete(n)}}}const fm=C.createContext(null),dm=C.createContext(null),hm=()=>{var t;return((t=C.useContext(fm))==null?void 0:t.id)||null},mm=()=>C.useContext(dm);function Ra(t){return"data-floating-ui-"+t}const Ma={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Da=C.forwardRef(function(e,n){const[s,i]=C.useState();Rt(()=>{Ch()&&i("button")},[]);const o={ref:n,tabIndex:0,role:s,"aria-hidden":s?void 0:!0,[Ra("focus-guard")]:"",style:Ma};return h.jsx("span",{...e,...o})}),Va=C.createContext(null),ka=Ra("portal");function pm(t){t===void 0&&(t={});const{id:e,root:n}=t,s=ja(),i=gm(),[o,r]=C.useState(null),a=C.useRef(null);return Rt(()=>()=>{o?.remove(),queueMicrotask(()=>{a.current=null})},[o]),Rt(()=>{if(!s||a.current)return;const l=e?document.getElementById(e):null;if(!l)return;const u=document.createElement("div");u.id=s,u.setAttribute(ka,""),l.appendChild(u),a.current=u,r(u)},[e,s]),Rt(()=>{if(n===null||!s||a.current)return;let l=n||i?.portalNode;l&&!ks(l)&&(l=l.current),l=l||document.body;let u=null;e&&(u=document.createElement("div"),u.id=e,l.appendChild(u));const c=document.createElement("div");c.id=s,c.setAttribute(ka,""),l=u||l,l.appendChild(c),a.current=c,r(c)},[e,n,s,i]),o}function Na(t){const{children:e,id:n,root:s,preserveTabOrder:i=!0}=t,o=pm({id:n,root:s}),[r,a]=C.useState(null),l=C.useRef(null),u=C.useRef(null),c=C.useRef(null),f=C.useRef(null),d=r?.modal,m=r?.open,p=!!r&&!r.modal&&r.open&&i&&!!(s||o);return C.useEffect(()=>{if(!o||!i||d)return;function g(x){o&&Ws(x)&&(x.type==="focusin"?ha:kh)(o)}return o.addEventListener("focusin",g,!0),o.addEventListener("focusout",g,!0),()=>{o.removeEventListener("focusin",g,!0),o.removeEventListener("focusout",g,!0)}},[o,i,d]),C.useEffect(()=>{o&&(m||ha(o))},[m,o]),h.jsxs(Va.Provider,{value:C.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:c,afterInsideRef:f,portalNode:o,setFocusManagerState:a}),[i,o]),children:[p&&o&&h.jsx(Da,{"data-type":"outside",ref:l,onFocus:g=>{if(Ws(g,o)){var x;(x=c.current)==null||x.focus()}else{const y=r?r.domReference:null,w=Vh(y);w?.focus()}}}),p&&o&&h.jsx("span",{"aria-owns":o.id,style:Ma}),o&&Qs.createPortal(e,o),p&&o&&h.jsx(Da,{"data-type":"outside",ref:u,onFocus:g=>{if(Ws(g,o)){var x;(x=f.current)==null||x.focus()}else{const y=r?r.domReference:null,w=Dh(y);w?.focus(),r?.closeOnFocusOut&&r?.onOpenChange(!1,g.nativeEvent,"focus-out")}}})]})}const gm=()=>C.useContext(Va);let un=0;const Oa="--floating-ui-scrollbar-width";function ym(){const t=Sh(),e=/iP(hone|ad|od)|iOS/.test(t)||t==="MacIntel"&&navigator.maxTouchPoints>1,n=document.body.style,i=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",o=window.innerWidth-document.documentElement.clientWidth,r=n.left?parseFloat(n.left):window.scrollX,a=n.top?parseFloat(n.top):window.scrollY;if(n.overflow="hidden",n.setProperty(Oa,o+"px"),o&&(n[i]=o+"px"),e){var l,u;const c=((l=window.visualViewport)==null?void 0:l.offsetLeft)||0,f=((u=window.visualViewport)==null?void 0:u.offsetTop)||0;Object.assign(n,{position:"fixed",top:-(a-Math.floor(f))+"px",left:-(r-Math.floor(c))+"px",right:"0"})}return()=>{Object.assign(n,{overflow:"",[i]:""}),n.removeProperty(Oa),e&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(r,a))}}let Ia=()=>{};const La=C.forwardRef(function(e,n){const{lockScroll:s=!1,...i}=e;return Rt(()=>{if(s)return un++,un===1&&(Ia=ym()),()=>{un--,un===0&&Ia()}},[s]),h.jsx("div",{ref:n,...i,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}})});function vm(t){const{open:e=!1,onOpenChange:n,elements:s}=t,i=ja(),o=C.useRef({}),[r]=C.useState(()=>um()),a=hm()!=null;if(process.env.NODE_ENV!=="production"){const m=s.reference;m&&!G(m)&&cm("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,u]=C.useState(s.reference),c=Mh((m,p,g)=>{o.current.openEvent=m?p:void 0,r.emit("openchange",{open:m,event:p,reason:g,nested:a}),n?.(m,p,g)}),f=C.useMemo(()=>({setPositionReference:u}),[]),d=C.useMemo(()=>({reference:l||s.reference||null,floating:s.floating||null,domReference:s.reference}),[l,s.reference,s.floating]);return C.useMemo(()=>({dataRef:o,open:e,onOpenChange:c,elements:d,events:r,floatingId:i,refs:f}),[e,c,d,r,i,f])}function xm(t){t===void 0&&(t={});const{nodeId:e}=t,n=vm({...t,elements:{reference:null,floating:null,...t.elements}}),s=t.rootContext||n,i=s.elements,[o,r]=C.useState(null),[a,l]=C.useState(null),c=i?.domReference||o,f=C.useRef(null),d=mm();Rt(()=>{c&&(f.current=c)},[c]);const m=im({...t,elements:{...i,...a&&{reference:a}}}),p=C.useCallback(v=>{const E=G(v)?{getBoundingClientRect:()=>v.getBoundingClientRect(),getClientRects:()=>v.getClientRects(),contextElement:v}:v;l(E),m.refs.setReference(E)},[m.refs]),g=C.useCallback(v=>{(G(v)||v===null)&&(f.current=v,r(v)),(G(m.refs.reference.current)||m.refs.reference.current===null||v!==null&&!G(v))&&m.refs.setReference(v)},[m.refs]),x=C.useMemo(()=>({...m.refs,setReference:g,setPositionReference:p,domReference:f}),[m.refs,g,p]),y=C.useMemo(()=>({...m.elements,domReference:c}),[m.elements,c]),w=C.useMemo(()=>({...m,...s,refs:x,elements:y,nodeId:e}),[m,x,y,e,s]);return Rt(()=>{s.dataRef.current.floatingContext=w;const v=d?.nodesRef.current.find(E=>E.id===e);v&&(v.context=w)}),C.useMemo(()=>({...m,context:w,refs:x,elements:y}),[m,x,y,w])}const bm={top:"bottom center","top-start":"bottom left","top-end":"bottom right",right:"left center","right-start":"top left","right-end":"bottom left",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"top right","left-end":"bottom right"},Fa=C.memo(({open:t,children:e,className:n,onOutsideClick:s,floatingStyles:i,setFloating:o,placement:r})=>h.jsx(Na,{children:h.jsx(ss,{children:t&&h.jsxs(h.Fragment,{children:[s&&h.jsx(La,{onClick:s}),h.jsx("div",{ref:o,style:i,className:"z-50",children:h.jsx(Pe.div,{className:n,style:{transformOrigin:bm[r]},initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.1,ease:"easeInOut"},children:e})})]})})})),se=t=>{const{placement:e="bottom",onOutsideClick:n,fullWidth:s,minWidth:i,maxWidth:o}=t,r=C.useMemo(()=>[rm({apply({rects:f,elements:d}){s&&(d.floating.style.width=`${f.reference.width}px`),i&&(d.floating.style.minWidth=`${i}px`),o&&(d.floating.style.maxWidth=`${o}px`)}})],[s,o,i]),{refs:a,floatingStyles:l}=xm({placement:e,middleware:r,whileElementsMounted:Qh}),u=C.useRef({onOutsideClick:n,floatingStyles:l,setFloating:a.setFloating,placement:e});u.current={onOutsideClick:n,floatingStyles:l,setFloating:a.setFloating,placement:e};const c=C.useMemo(()=>{const f=d=>{const{floatingStyles:m,setFloating:p,onOutsideClick:g,placement:x}=u.current,{className:y,open:w,children:v}=d;return h.jsx(Fa,{open:w,className:y,onOutsideClick:g,floatingStyles:m,setFloating:p,placement:x,children:v})};return C.memo(f)},[]);return{anchorRef:a.setReference,Popover:c}},wm="flex flex-col bg-white border mt-1 border-gray-200 rounded-xl shadow-lg overflow-y-auto relative space-y-1",Tm={sm:"p-2",md:"p-3",lg:"p-4"},ie=t=>{const{className:e,children:n,padding:s="md",...i}=t;return h.jsx("div",{className:V(wm,Tm[s],e),...i,children:n})},fn=(t,e)=>{T.useEffect(()=>{if(!t)return;const n=s=>{s.key==="Escape"&&e()};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[t,e])},Ba=t=>{const{className:e,label:n,description:s,options:i,onChange:o,value:r,placeholder:a,maxHeight:l=300,error:u}=t,[c,f]=T.useState(!1),d=C.useRef(null),m=i?.find(x=>x.value===r);fn(c,()=>f(!1)),T.useEffect(()=>{c&&d.current?.focus({preventScroll:!0})},[c]);const{anchorRef:p,Popover:g}=se({placement:"bottom",fullWidth:!0,onOutsideClick:()=>f(!1)});return h.jsxs("div",{className:V("flex flex-col",e),children:[h.jsx(Lt,{children:n}),h.jsxs("div",{className:"relative flex w-full flex-col",ref:p,children:[h.jsxs("div",{ref:d,role:"button",tabIndex:0,className:V("flex flex-row items-center h-12 pl-4 pr-10 border border-gray-200 text-gray-900 placeholder:text-gray-400 bg-white transition-all duration-150 rounded-xl shadow-sm ring-0 ring-gray-900/10 focus:ring-4 focus:outline-none select-none",u&&"border-red-600 ring-red-600/20 !pr-10",c&&"ring-4"),onKeyDown:x=>x.key===" "&&f(y=>!y),onClick:()=>f(!c),children:[m&&h.jsx("span",{children:m.label}),!m&&a&&h.jsx("span",{className:"text-gray-500",children:a})]}),h.jsxs(Bt,{children:[u&&h.jsx(Ft,{}),!!r&&h.jsx(St,{Icon:Ee,onClick:()=>o(null)}),h.jsx(St,{Icon:Ze})]}),h.jsx(g,{open:c,children:h.jsx(ie,{className:"!p-0",style:{maxHeight:l},children:h.jsx("div",{className:"flex flex-col p-2 gap-1",children:i.map(x=>{const y=x.value===r;return h.jsx(Ae,{onClick:()=>{!x.disabled&&o&&(o(x.value),f(!1))},selected:y,disabled:x.disabled,children:x.label},String(x.value))})})})})]}),h.jsx(ht,{children:s}),h.jsx(mt,{children:u})]})},Sm=t=>{const{className:e,label:n,description:s,options:i,onChange:o,onSearch:r,value:a,placeholder:l,maxHeight:u=300,error:c}=t,[f,d]=T.useState(!1),[m,p]=T.useState(i),[g,x]=T.useState(""),y=C.useRef(null),w=C.useRef(null),v=i?.find(P=>P.value===a);fn(f,()=>d(!1)),T.useEffect(()=>{p(r(g))},[g,i,r]),T.useEffect(()=>{f&&w.current?.focus()},[f]);const{anchorRef:E,Popover:S}=se({placement:"bottom",fullWidth:!0,onOutsideClick:()=>d(!1)});return h.jsxs("div",{className:V("flex flex-col",e),children:[h.jsx(Lt,{children:n}),h.jsxs("div",{className:"relative flex w-full flex-col",ref:E,children:[h.jsxs("div",{ref:y,role:"button",tabIndex:0,className:V("flex flex-row items-center h-12 pl-4 pr-10 border border-gray-200 text-gray-900 placeholder:text-gray-400 bg-white transition-all duration-150 rounded-xl shadow-sm ring-0 ring-gray-900/10 focus:ring-4 focus:outline-none select-none",c&&"border-red-600 ring-red-600/20 !pr-10",f&&"ring-4"),onKeyDown:P=>P.key===" "&&d(A=>!A),onClick:()=>d(!f),children:[v&&h.jsx("span",{children:v.label}),!v&&l&&h.jsx("span",{className:"text-gray-500",children:l})]}),h.jsxs(Bt,{children:[c&&h.jsx(Ft,{}),!!a&&h.jsx(St,{Icon:Ee,onClick:()=>o(null)}),h.jsx(St,{Icon:Ze})]}),h.jsx(S,{open:f,children:h.jsxs(ie,{className:"gap-0 !p-0",style:{maxHeight:u},children:[h.jsxs("div",{className:"sticky top-0 border-b border-b-gray-200 py-1 bg-white/50 backdrop-blur-sm",children:[h.jsx("input",{ref:w,type:"text",placeholder:"Search",value:g,className:"appearance-none border-none w-full bg-transparent rounded- pl-10 transition-all duration-150 focus:outline-none ring-0 placeholder:text-gray-400",onChange:P=>x(P.target.value)}),h.jsx(Ds,{className:"absolute text-gray-500 left-4 top-4 h-4 w-4"})]}),h.jsxs("div",{className:"flex flex-col gap-1 p-2",children:[g!==""&&h.jsxs(h.Fragment,{children:[m.length===0&&h.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:h.jsx(Qo,{className:"h-6 w-6 text-gray-900"})}),m.map(P=>{const A=P.value===a;return h.jsx(Ae,{onClick:()=>{!P.disabled&&o&&(o(P.value),d(!1))},selected:A,disabled:P.disabled,children:P.label},String(P.value))})]}),g===""&&h.jsx(h.Fragment,{children:i.map(P=>{const A=P.value===a;return h.jsx(Ae,{onClick:()=>{!P.disabled&&o&&(o(P.value),d(!1))},selected:A,disabled:P.disabled,children:P.label},String(P.value))})})]})]})})]}),h.jsx(ht,{children:s}),h.jsx(mt,{children:c})]})},Cm=(t,e)=>{const[n,s]=T.useState(t);return T.useEffect(()=>{const i=setTimeout(()=>{s(t)},e);return()=>{clearTimeout(i)}},[t,e]),n},Pm=t=>{const{className:e,label:n,description:s,onChange:i,fetchOptionsByQuery:o,fetchOptionByValue:r,onSearchDebounceMs:a=300,value:l,placeholder:u,maxHeight:c=300,error:f}=t,[d,m]=T.useState(!1),p=C.useRef(null),[g,x]=T.useState(""),[y,w]=T.useState([]),[v,E]=T.useState(null),S=C.useRef(null),[P,A]=T.useState(!1),[j,N]=T.useState(!1);fn(d,()=>m(!1));const O=Cm(g,a);T.useEffect(()=>{(async()=>{A(!0);const K=await o(O);w(K),A(!1)})()},[O,o]),T.useEffect(()=>{if(l==null){E(null);return}const I=y?.find(K=>K.value===l);I?E(I):(async()=>{N(!0);const vt=await r(l);E(vt),N(!1)})()},[r,y,l]),T.useEffect(()=>{d&&S.current?.focus()},[d]);const{anchorRef:U,Popover:et}=se({placement:"bottom",fullWidth:!0,onOutsideClick:()=>m(!1)});return h.jsxs("div",{className:V("flex flex-col",e),children:[h.jsx(Lt,{children:n}),h.jsxs("div",{className:"relative flex w-full flex-col",ref:U,children:[h.jsxs("div",{ref:p,role:"button",tabIndex:0,className:V("flex flex-row items-center h-12 pl-4 pr-10 border border-gray-200 text-gray-900 placeholder:text-gray-400 bg-white transition-all duration-150 rounded-xl shadow-sm ring-0 ring-gray-900/10 focus:ring-4 focus:outline-none select-none",f&&"border-red-600 ring-red-600/20 !pr-10",d&&"ring-4"),onKeyDown:I=>I.key===" "&&m(K=>!K),onClick:()=>m(!d),children:[!j&&v&&h.jsx("span",{children:v.label}),!j&&!v&&u&&h.jsx("span",{children:u}),j&&h.jsx(qe,{className:"h-4 w-4 text-gray-600"})]}),h.jsxs(Bt,{children:[f&&h.jsx(Ft,{}),!!l&&h.jsx(St,{Icon:Ee,onClick:()=>i(null)}),h.jsx(St,{Icon:Ze})]}),h.jsx(et,{open:d,children:h.jsxs(ie,{className:"gap-0 !p-0",style:{maxHeight:c},children:[h.jsxs("div",{className:"sticky top-0 border-b border-b-gray-200 py-1 bg-white/50 backdrop-blur-sm",children:[h.jsx("input",{ref:S,type:"text",placeholder:"Search",value:g,className:"appearance-none border-none w-full bg-transparent rounded- pl-10 transition-all duration-150 focus:outline-none ring-0 placeholder:text-gray-400",onChange:I=>x(I.target.value)}),h.jsx(Ds,{className:"absolute text-gray-500 left-4 top-4 h-4 w-4"})]}),h.jsxs("div",{className:"flex flex-col gap-1 p-2",children:[!P&&y.length===0&&h.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:h.jsx(Qo,{className:"h-6 w-6 text-gray-900"})}),P&&h.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:h.jsx(qe,{className:"h-6 w-6 text-gray-900"})}),!P&&h.jsx(h.Fragment,{children:y.map(I=>{const K=I.value===l;return h.jsx(Ae,{onClick:()=>{!I.disabled&&i&&(i(I.value),m(!1))},selected:K,disabled:I.disabled,children:I.label},String(I.value))})})]})]})})]}),h.jsx(ht,{children:s}),h.jsx(mt,{children:f})]})},Em=C.forwardRef((t,e)=>{const{className:n,children:s,...i}=t;return h.jsx("div",{ref:e,className:V("flex flex-col gap-6 border border-gray-200 rounded-xl bg-white shadow-sm px-6 py-6",n),...i,children:s})}),Am=t=>{const{className:e,vertical:n=!1,...s}=t;return h.jsx("div",{className:V(n?"w-px h-full bg-gray-200":"w-full h-px bg-gray-200",e),...s})},jm=t=>{const{children:e,content:n,className:s,placement:i="top",minWidth:o=100,maxWidth:r=200}=t,[a,l]=T.useState(!1),{anchorRef:u,Popover:c}=se({placement:i,minWidth:o,maxWidth:r});return h.jsxs("span",{ref:u,className:s,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[e,h.jsx(c,{open:a,children:h.jsx(ie,{children:n})})]})},Rm=t=>{const{open:e,onDismiss:n,enableDismissOnOutsideClick:s,enableDismissOnEscKey:i,enableDismissButton:o,className:r,children:a,maxWidth:l=600}=t;return fn(!!i&&e,n||(()=>{})),h.jsx(ss,{children:e&&h.jsxs(Na,{children:[h.jsx(Pe.div,{style:{transformOrigin:"center"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15,ease:"easeInOut"},children:h.jsx(La,{className:"bg-gray-400/30 backdrop-blur-[1px] z-10",onClick:s?n:void 0,lockScroll:!0})}),h.jsx("div",{className:"fixed inset-0 flex flex-col items-center pointer-events-none p-4 lg:p-12 overflow-y-auto z-20",children:h.jsxs(Pe.div,{className:V("flex flex-col bg-white rounded-2xl shadow-xl p-6 lg:p-12 pointer-events-auto w-full relative",r),style:{transformOrigin:"bottom",maxWidth:l},initial:{opacity:0,scale:.98,translateY:10},animate:{opacity:1,scale:1,translateY:0},exit:{opacity:0,scale:.98,translateY:10},transition:{duration:.15,ease:"easeInOut"},children:[o&&h.jsx(Zo,{Icon:Ee,className:"absolute top-4 right-4",variant:"transparent",size:"sm",onClick:n}),a]})})]})})},_a={red:"bg-red-100 text-red-700 ring-red-200",orange:"bg-orange-100 text-orange-700 ring-orange-200",amber:"bg-amber-100 text-amber-700 ring-amber-200",yellow:"bg-yellow-100 text-yellow-700 ring-yellow-200",lime:"bg-lime-100 text-lime-700 ring-lime-200",green:"bg-green-100 text-green-700 ring-green-200",emerald:"bg-emerald-100 text-emerald-700 ring-emerald-200",teal:"bg-teal-100 text-teal-700 ring-teal-200",cyan:"bg-cyan-100 text-cyan-700 ring-cyan-200",sky:"bg-sky-100 text-sky-700 ring-sky-200",blue:"bg-blue-100 text-blue-700 ring-blue-200",indigo:"bg-indigo-100 text-indigo-700 ring-indigo-200",violet:"bg-violet-100 text-violet-700 ring-violet-200",purple:"bg-purple-100 text-purple-700 ring-purple-200",fuchsia:"bg-fuchsia-100 text-fuchsia-700 ring-fuchsia-200",pink:"bg-pink-100 text-pink-700 ring-pink-200",rose:"bg-rose-100 text-rose-700 ring-rose-200",slate:"bg-slate-100 text-slate-700 ring-slate-200",gray:"bg-gray-100 text-gray-700 ring-gray-200",zinc:"bg-zinc-100 text-zinc-700 ring-zinc-200",neutral:"bg-neutral-100 text-neutral-700 ring-neutral-200",stone:"bg-stone-100 text-stone-700 ring-stone-200",white:"bg-white text-gray-900 ring-stone-200",black:"bg-black text-white ring-stone-200"},Hs=C.forwardRef((t,e)=>{const{className:n,children:s,onClick:i,showCloseIcon:o,Icon:r,color:a="gray"}=t,l=V("inline-flex align-top items-center gap-2 px-3 h-7 rounded-lg font-semibold",_a[a],n);return i?h.jsx("div",{ref:e,children:h.jsxs("button",{className:V("cursor-pointer ring-0 hover:ring-4 active:ring-1 transition-all duration-100 select-none focus:outline-none focus:ring-4",l),onClick:i,children:[r&&h.jsx(r,{className:"h-4 w-4 shrink-0"}),h.jsx("div",{className:"break-all line-clamp-1 text-left",children:s}),o&&h.jsx(Ee,{className:"h-4 w-4 shrink-0"})]})}):h.jsxs("div",{className:l,ref:e,children:[r&&h.jsx(r,{className:"h-4 w-4 shrink-0"}),h.jsx("div",{className:"break-all line-clamp-1 text-left",children:s})]})}),Mm=t=>{const{className:e,tabs:n}=t;return h.jsx("div",{className:V("h-12 bg-gray-100 p-1 rounded-xl inline-flex flex-row space-x-1 overflow-x-auto",e),children:n.map((s,i)=>{const o=V("shrink-0 px-4 h-full inline-flex flex-row items-center font-semibold rounded-xl cursor-pointer border border-transparent ing-0 hover:bg-gray-200 active:bg-gray-300/80 transition-all duration-150 select-none focus:outline-none focus:ring-0",s.active&&"bg-white shadow-sm !border-gray-300");return s.href?h.jsx("a",{href:s.href,className:o,children:s.label},i):h.jsx("button",{className:o,onClick:s.onClick,children:s.label},i)})})},$a=T.createContext(void 0),Dm=()=>({dismiss:T.useContext($a)||(()=>{})}),Vm="inline-flex flex-row items-center gap-3 h-10 px-3 font-semibold ring-0 hover:bg-gray-100 active:bg-gray-200 rounded-lg cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-0 border border-transparent text-gray-900 bg-transparent ring-gray-900/10",re=C.forwardRef((t,e)=>{const{className:n,children:s,Icon:i,onClick:o,dismissOnClick:r=!0,...a}=t,{dismiss:l}=Dm(),u=c=>{o&&o(c),r&&l()};return h.jsxs("button",{ref:e,className:V(Vm,n),onClick:u,...a,children:[i&&h.jsx(i,{className:"h-5 w-5"}),s]})}),km=t=>{const{label:e,children:n}=t;return h.jsxs("div",{className:"flex flex-col dropdown-button-group",children:[e&&h.jsx("div",{className:"mb-2 text-sm text-gray-500 font-medium px-1",children:e}),n]})},Gs=t=>{const{trigger:e,children:n,placement:s="bottom-end",minWidth:i=200,className:o}=t,[r,a]=T.useState(!1),{Popover:l,anchorRef:u}=se({placement:s,onOutsideClick:()=>a(!1),minWidth:i});return h.jsxs(h.Fragment,{children:[h.jsx("div",{ref:u,className:o,onClick:()=>a(!r),children:e}),h.jsx(l,{open:r,children:h.jsx(ie,{padding:"sm",children:h.jsx($a.Provider,{value:()=>a(!1),children:n})})})]})},Nm=t=>{const{column:e}=t;return h.jsxs("div",{style:{width:250,height:44},className:"flex flex-row items-stretch select-none",children:[h.jsx("div",{className:"flex-1 content-center px-4 relative cursor-pointer bg-gray-50 hover:bg-gray-100 active:bg-gray-200 transition-colors duration-100",children:e.header}),h.jsx("div",{style:{width:8},className:"cursor-ew-resize group py-4 bg-gray-50",children:h.jsx("div",{className:"w-0.5 h-full mx-auto bg-gray-200 group-hover:bg-gray-300 group-active:bg-blue-600"})})]})},Om=t=>{const{columns:e,rows:n}=t;return h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"font-medium text-gray-800 flex flex-row",children:e.map(s=>h.jsx(Nm,{column:s},s.id))}),h.jsx("div",{className:"flex flex-col",children:n.map(s=>h.jsx("div",{className:"flex flex-row border-b border-b-gray-200 hover:bg-gray-50 bg-white transition-all duration-100",children:e.map(i=>h.jsx("div",{className:"flex-1 content-center px-4",style:{height:44},children:i.renderCell(s)},i.id))},JSON.stringify(s)))})]})},Im=()=>h.jsx("div",{}),Lm=[{id:1,email:"matthiaskrijgsman@gmail.com",firstname:"Matthias",lastname:"Krijgsman",status:"active"},{id:2,email:"dennis@snijder.io",firstname:"Dennis",lastname:"Snijder",status:"inactive"},{id:3,email:"arcokrijgsman@gmail.com",firstname:"Arco",lastname:"Krijgsman",status:"active"}],Fm=[{id:"id",header:"ID",renderCell:t=>t.id},{id:"email",header:"Email",renderCell:t=>h.jsx(Hs,{Icon:Ld,onClick:()=>{},children:t.email})},{id:"firstname",header:"First Name",renderCell:t=>t.firstname},{id:"lastname",header:"Last Name",renderCell:t=>t.lastname},{id:"status",header:"Status",renderCell:()=>h.jsx(_m,{})}],Bm=()=>h.jsxs("div",{className:"flex flex-col gap-6",children:[h.jsxs("div",{className:"flex flex-row items-center justify-start gap-3",children:[h.jsx(Vs,{Icon:Ds,placeholder:"Search..."}),h.jsx(Ms,{Icon:ta}),h.jsx(qo,{Icon:Jo,children:"New"}),h.jsxs(Gs,{trigger:h.jsx(Ms,{Icon:ta}),children:[h.jsx(re,{dismissOnClick:!1,Icon:Jo,children:"Add new"}),h.jsx(re,{Icon:Od,children:"Remove"})]})]}),h.jsx(Ba,{options:[{label:"Option 1",value:1},{label:"Option 2",value:2},{label:"Option 3",value:3}],value:null,onChange:()=>{}}),h.jsx(Om,{columns:Fm,rows:Lm}),h.jsx(Im,{})]}),_m=()=>h.jsx(h.Fragment,{children:h.jsxs(Gs,{placement:"bottom-end",className:"inline-block",trigger:h.jsx(Hs,{onClick:()=>{},children:"Test"}),children:[h.jsx(re,{children:"Option 1"}),h.jsx(re,{children:"Option 2"}),h.jsx(re,{children:"Option 3"})]})});M.Badge=Hs,M.BadgeColor=_a,M.Button=qo,M.ButtonIconRound=Zo,M.ButtonIconSquare=Ms,M.Divider=Am,M.DropdownButton=re,M.DropdownButtonGroup=km,M.DropdownMenu=Gs,M.DropdownPanel=ie,M.Input=Vs,M.InputCheck=Wd,M.InputDescription=ht,M.InputError=mt,M.InputErrorIcon=Ft,M.InputIconButton=St,M.InputIconButtonTray=Bt,M.InputLabel=Lt,M.InputPassword=Fd,M.InputRadio=_d,M.InputSelect=Ba,M.InputSelectNative=Ud,M.InputSelectOption=Ae,M.InputSelectSearchable=Sm,M.InputSelectSearchableAsync=Pm,M.InputTextArea=Bd,M.InputToggle=$d,M.Modal=Rm,M.Panel=Em,M.PopoverBase=Fa,M.Spinner=qe,M.TabButtons=Mm,M.Test=Bm,M.Tooltip=jm,M.usePopover=se,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})}));
|
|
143
|
+
*/var ah=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],_s=ah.join(","),ra=typeof Element>"u",Dt=ra?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,rn=!ra&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},on=function e(t,n){var s;n===void 0&&(n=!0);var i=t==null||(s=t.getAttribute)===null||s===void 0?void 0:s.call(t,"inert"),o=i===""||i==="true",r=o||n&&t&&e(t.parentNode);return r},lh=function(t){var n,s=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return s===""||s==="true"},ch=function(t,n,s){if(on(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(_s));return n&&Dt.call(t,_s)&&i.unshift(t),i=i.filter(s),i},uh=function e(t,n,s){for(var i=[],o=Array.from(t);o.length;){var r=o.shift();if(!on(r,!1))if(r.tagName==="SLOT"){var a=r.assignedElements(),l=a.length?a:r.children,u=e(l,!0,s);s.flatten?i.push.apply(i,u):i.push({scopeParent:r,candidates:u})}else{var c=Dt.call(r,_s);c&&s.filter(r)&&(n||!t.includes(r))&&i.push(r);var f=r.shadowRoot||typeof s.getShadowRoot=="function"&&s.getShadowRoot(r),d=!on(f,!1)&&(!s.shadowRootFilter||s.shadowRootFilter(r));if(f&&d){var m=e(f===!0?r.children:f.children,!0,s);s.flatten?i.push.apply(i,m):i.push({scopeParent:r,candidates:m})}else o.unshift.apply(o,r.children)}}return i},oa=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},aa=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||lh(t))&&!oa(t)?0:t.tabIndex},fh=function(t,n){var s=aa(t);return s<0&&n&&!oa(t)?0:s},dh=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},la=function(t){return t.tagName==="INPUT"},hh=function(t){return la(t)&&t.type==="hidden"},mh=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(s){return s.tagName==="SUMMARY"});return n},ph=function(t,n){for(var s=0;s<t.length;s++)if(t[s].checked&&t[s].form===n)return t[s]},gh=function(t){if(!t.name)return!0;var n=t.form||rn(t),s=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=s(window.CSS.escape(t.name));else try{i=s(t.name)}catch(r){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",r.message),!1}var o=ph(i,t.form);return!o||o===t},yh=function(t){return la(t)&&t.type==="radio"},vh=function(t){return yh(t)&&!gh(t)},xh=function(t){var n,s=t&&rn(t),i=(n=s)===null||n===void 0?void 0:n.host,o=!1;if(s&&s!==t){var r,a,l;for(o=!!((r=i)!==null&&r!==void 0&&(a=r.ownerDocument)!==null&&a!==void 0&&a.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!o&&i;){var u,c,f;s=rn(i),i=(u=s)===null||u===void 0?void 0:u.host,o=!!((c=i)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(i))}}return o},ca=function(t){var n=t.getBoundingClientRect(),s=n.width,i=n.height;return s===0&&i===0},bh=function(t,n){var s=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var o=Dt.call(t,"details>summary:first-of-type"),r=o?t.parentElement:t;if(Dt.call(r,"details:not([open]) *"))return!0;if(!s||s==="full"||s==="legacy-full"){if(typeof i=="function"){for(var a=t;t;){var l=t.parentElement,u=rn(t);if(l&&!l.shadowRoot&&i(l)===!0)return ca(t);t.assignedSlot?t=t.assignedSlot:!l&&u!==t.ownerDocument?t=u.host:t=l}t=a}if(xh(t))return!t.getClientRects().length;if(s!=="legacy-full")return!0}else if(s==="non-zero-area")return ca(t);return!1},wh=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var s=0;s<n.children.length;s++){var i=n.children.item(s);if(i.tagName==="LEGEND")return Dt.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},Th=function(t,n){return!(n.disabled||on(n)||hh(n)||bh(n,t)||mh(n)||wh(n))},ua=function(t,n){return!(vh(n)||aa(n)<0||!Th(t,n))},Sh=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Ch=function e(t){var n=[],s=[];return t.forEach(function(i,o){var r=!!i.scopeParent,a=r?i.scopeParent:i,l=fh(a,r),u=r?e(i.candidates):a;l===0?r?n.push.apply(n,u):n.push(a):s.push({documentOrder:o,tabIndex:l,item:i,isScope:r,content:u})}),s.sort(dh).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},fa=function(t,n){n=n||{};var s;return n.getShadowRoot?s=uh([t],n.includeContainer,{filter:ua.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Sh}):s=ch(t,n.includeContainer,ua.bind(null,n)),Ch(s)};function Ph(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Eh(){return/apple/i.test(navigator.vendor)}function Ah(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Rh(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Ns(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function $s(e){return e?.ownerDocument||document}var jh=typeof document<"u",Mh=function(){},je=jh?T.useLayoutEffect:Mh;const Dh={...S}.useInsertionEffect||(e=>e());function kh(e){const t=S.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Dh(()=>{t.current=e}),S.useCallback(function(){for(var n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return t.current==null?void 0:t.current(...s)},[])}const da=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function ha(e,t){const n=fa(e,da()),s=n.length;if(s===0)return;const i=Ah($s(e)),o=n.indexOf(i),r=o===-1?t===1?0:s-1:o+t;return n[r]}function Vh(e){return ha($s(e).body,1)||e}function Nh(e){return ha($s(e).body,-1)||e}function Ws(e,t){const n=t||e.currentTarget,s=e.relatedTarget;return!s||!Rh(n,s)}function Ih(e){fa(e,da()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function ma(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const s=n.dataset.tabindex;delete n.dataset.tabindex,s?n.setAttribute("tabindex",s):n.removeAttribute("tabindex")})}function pa(e,t,n){let{reference:s,floating:i}=e;const o=Bs(t),r=ih(t),a=nh(r),l=Fs(t),u=o==="y",c=s.x+s.width/2-i.width/2,f=s.y+s.height/2-i.height/2,d=s[a]/2-i[a]/2;let m;switch(l){case"top":m={x:c,y:s.y-i.height};break;case"bottom":m={x:c,y:s.y+s.height};break;case"right":m={x:s.x+s.width,y:f};break;case"left":m={x:s.x-i.width,y:f};break;default:m={x:s.x,y:s.y}}switch(ia(t)){case"start":m[r]-=d*(n&&u?-1:1);break;case"end":m[r]+=d*(n&&u?-1:1);break}return m}const Oh=async(e,t,n)=>{const{placement:s="bottom",strategy:i="absolute",middleware:o=[],platform:r}=n,a=o.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(t));let u=await r.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:f}=pa(u,s,l),d=s,m={},p=0;for(let y=0;y<a.length;y++){const{name:x,fn:v}=a[y],{x:b,y:g,data:E,reset:C}=await v({x:c,y:f,initialPlacement:s,placement:d,strategy:i,middlewareData:m,rects:u,platform:r,elements:{reference:e,floating:t}});c=b??c,f=g??f,m={...m,[x]:{...m[x],...E}},C&&p<=50&&(p++,typeof C=="object"&&(C.placement&&(d=C.placement),C.rects&&(u=C.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:i}):C.rects),{x:c,y:f}=pa(u,d,l)),y=-1)}return{x:c,y:f,placement:d,strategy:i,middlewareData:m}};async function Lh(e,t){var n;t===void 0&&(t={});const{x:s,y:i,platform:o,rects:r,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:d=!1,padding:m=0}=sa(t,e),p=oh(m),x=a[d?f==="floating"?"reference":"floating":f],v=sn(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(x)))==null||n?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),b=f==="floating"?{x:s,y:i,width:r.floating.width,height:r.floating.height}:r.reference,g=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),E=await(o.isElement==null?void 0:o.isElement(g))?await(o.getScale==null?void 0:o.getScale(g))||{x:1,y:1}:{x:1,y:1},C=sn(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:g,strategy:l}):b);return{top:(v.top-C.top+p.top)/E.y,bottom:(C.bottom-v.bottom+p.bottom)/E.y,left:(v.left-C.left+p.left)/E.x,right:(C.right-v.right+p.right)/E.x}}const Fh=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,s;const{placement:i,rects:o,platform:r,elements:a}=t,{apply:l=()=>{},...u}=sa(e,t),c=await Lh(t,u),f=Fs(i),d=ia(i),m=Bs(i)==="y",{width:p,height:y}=o.floating;let x,v;f==="top"||f==="bottom"?(x=f,v=d===(await(r.isRTL==null?void 0:r.isRTL(a.floating))?"start":"end")?"left":"right"):(v=f,x=d==="end"?"top":"bottom");const b=y-c.top-c.bottom,g=p-c.left-c.right,E=Mt(y-c[x],b),C=Mt(p-c[v],g),P=!t.middlewareData.shift;let A=E,R=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=g),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(A=b),P&&!d){const I=oe(c.left,0),U=oe(c.right,0),ne=oe(c.top,0),O=oe(c.bottom,0);m?R=p-2*(I!==0||U!==0?I+U:oe(c.left,c.right)):A=y-2*(ne!==0||O!==0?ne+O:oe(c.top,c.bottom))}await l({...t,availableWidth:R,availableHeight:A});const N=await r.getDimensions(a.floating);return p!==N.width||y!==N.height?{reset:{rects:!0}}:{}}}};function ga(e){const t=ce(e);let n=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const i=ge(e),o=i?e.offsetWidth:n,r=i?e.offsetHeight:s,a=tn(n)!==o||tn(s)!==r;return a&&(n=o,s=r),{width:n,height:s,$:a}}function Us(e){return H(e)?e:e.contextElement}function nt(e){const t=Us(e);if(!ge(t))return ye(1);const n=t.getBoundingClientRect(),{width:s,height:i,$:o}=ga(t);let r=(o?tn(n.width):n.width)/s,a=(o?tn(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const Bh=ye(0);function ya(e){const t=te(e);return!Os()||!t.visualViewport?Bh:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _h(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==te(e)?!1:t}function _e(e,t,n,s){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=Us(e);let r=ye(1);t&&(s?H(s)&&(r=nt(s)):r=nt(e));const a=_h(o,n,s)?ya(o):ye(0);let l=(i.left+a.x)/r.x,u=(i.top+a.y)/r.y,c=i.width/r.x,f=i.height/r.y;if(o){const d=te(o),m=s&&H(s)?te(s):s;let p=d,y=Ls(p);for(;y&&s&&m!==p;){const x=nt(y),v=y.getBoundingClientRect(),b=ce(y),g=v.left+(y.clientLeft+parseFloat(b.paddingLeft))*x.x,E=v.top+(y.clientTop+parseFloat(b.paddingTop))*x.y;l*=x.x,u*=x.y,c*=x.x,f*=x.y,l+=g,u+=E,p=te(y),y=Ls(p)}}return sn({width:c,height:f,x:l,y:u})}function an(e,t){const n=en(e).scrollLeft;return t?t.left+n:_e(pe(e)).left+n}function va(e,t){const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-an(e,n),i=n.top+t.scrollTop;return{x:s,y:i}}function $h(e){let{elements:t,rect:n,offsetParent:s,strategy:i}=e;const o=i==="fixed",r=pe(s),a=t?Qt(t.floating):!1;if(s===r||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=ye(1);const c=ye(0),f=ge(s);if((f||!f&&!o)&&((et(s)!=="body"||Rt(r))&&(l=en(s)),ge(s))){const m=_e(s);u=nt(s),c.x=m.x+s.clientLeft,c.y=m.y+s.clientTop}const d=r&&!f&&!o?va(r,l):ye(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+d.x,y:n.y*u.y-l.scrollTop*u.y+c.y+d.y}}function Wh(e){return Array.from(e.getClientRects())}function Uh(e){const t=pe(e),n=en(e),s=e.ownerDocument.body,i=oe(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),o=oe(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let r=-n.scrollLeft+an(e);const a=-n.scrollTop;return ce(s).direction==="rtl"&&(r+=oe(t.clientWidth,s.clientWidth)-i),{width:i,height:o,x:r,y:a}}const xa=25;function zh(e,t){const n=te(e),s=pe(e),i=n.visualViewport;let o=s.clientWidth,r=s.clientHeight,a=0,l=0;if(i){o=i.width,r=i.height;const c=Os();(!c||c&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const u=an(s);if(u<=0){const c=s.ownerDocument,f=c.body,d=getComputedStyle(f),m=c.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,p=Math.abs(s.clientWidth-f.clientWidth-m);p<=xa&&(o-=p)}else u<=xa&&(o+=u);return{width:o,height:r,x:a,y:l}}const Kh=new Set(["absolute","fixed"]);function Xh(e,t){const n=_e(e,!0,t==="fixed"),s=n.top+e.clientTop,i=n.left+e.clientLeft,o=ge(e)?nt(e):ye(1),r=e.clientWidth*o.x,a=e.clientHeight*o.y,l=i*o.x,u=s*o.y;return{width:r,height:a,x:l,y:u}}function ba(e,t,n){let s;if(t==="viewport")s=zh(e,n);else if(t==="document")s=Uh(pe(e));else if(H(t))s=Xh(t,n);else{const i=ya(e);s={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return sn(s)}function wa(e,t){const n=Re(e);return n===t||!H(n)||tt(n)?!1:ce(n).position==="fixed"||wa(n,t)}function Yh(e,t){const n=t.get(e);if(n)return n;let s=jt(e,[],!1).filter(a=>H(a)&&et(a)!=="body"),i=null;const o=ce(e).position==="fixed";let r=o?Re(e):e;for(;H(r)&&!tt(r);){const a=ce(r),l=Is(r);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&!!i&&Kh.has(i.position)||Rt(r)&&!l&&wa(e,r))?s=s.filter(c=>c!==r):i=a,r=Re(r)}return t.set(e,s),s}function Hh(e){let{element:t,boundary:n,rootBoundary:s,strategy:i}=e;const r=[...n==="clippingAncestors"?Qt(t)?[]:Yh(t,this._c):[].concat(n),s],a=r[0],l=r.reduce((u,c)=>{const f=ba(t,c,i);return u.top=oe(f.top,u.top),u.right=Mt(f.right,u.right),u.bottom=Mt(f.bottom,u.bottom),u.left=oe(f.left,u.left),u},ba(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Gh(e){const{width:t,height:n}=ga(e);return{width:t,height:n}}function qh(e,t,n){const s=ge(t),i=pe(t),o=n==="fixed",r=_e(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=ye(0);function u(){l.x=an(i)}if(s||!s&&!o)if((et(t)!=="body"||Rt(i))&&(a=en(t)),s){const m=_e(t,!0,o,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else i&&u();o&&!s&&i&&u();const c=i&&!s&&!o?va(i,a):ye(0),f=r.left+a.scrollLeft-l.x-c.x,d=r.top+a.scrollTop-l.y-c.y;return{x:f,y:d,width:r.width,height:r.height}}function zs(e){return ce(e).position==="static"}function Ta(e,t){if(!ge(e)||ce(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return pe(e)===n&&(n=n.ownerDocument.body),n}function Sa(e,t){const n=te(e);if(Qt(e))return n;if(!ge(e)){let i=Re(e);for(;i&&!tt(i);){if(H(i)&&!zs(i))return i;i=Re(i)}return n}let s=Ta(e,t);for(;s&&Hd(s)&&zs(s);)s=Ta(s,t);return s&&tt(s)&&zs(s)&&!Is(s)?n:s||Qd(e)||n}const Zh=async function(e){const t=this.getOffsetParent||Sa,n=this.getDimensions,s=await n(e.floating);return{reference:qh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function Jh(e){return ce(e).direction==="rtl"}const Qh={convertOffsetParentRelativeRectToViewportRelativeRect:$h,getDocumentElement:pe,getClippingRect:Hh,getOffsetParent:Sa,getElementRects:Zh,getClientRects:Wh,getDimensions:Gh,getScale:nt,isElement:H,isRTL:Jh};function Ca(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function em(e,t){let n=null,s;const i=pe(e);function o(){var a;clearTimeout(s),(a=n)==null||a.disconnect(),n=null}function r(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const u=e.getBoundingClientRect(),{left:c,top:f,width:d,height:m}=u;if(a||t(),!d||!m)return;const p=nn(f),y=nn(i.clientWidth-(c+d)),x=nn(i.clientHeight-(f+m)),v=nn(c),g={rootMargin:-p+"px "+-y+"px "+-x+"px "+-v+"px",threshold:oe(0,Mt(1,l))||1};let E=!0;function C(P){const A=P[0].intersectionRatio;if(A!==l){if(!E)return r();A?r(!1,A):s=setTimeout(()=>{r(!1,1e-7)},1e3)}A===1&&!Ca(u,e.getBoundingClientRect())&&r(),E=!1}try{n=new IntersectionObserver(C,{...g,root:i.ownerDocument})}catch{n=new IntersectionObserver(C,g)}n.observe(e)}return r(!0),o}function tm(e,t,n,s){s===void 0&&(s={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=s,u=Us(e),c=i||o?[...u?jt(u):[],...jt(t)]:[];c.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),o&&v.addEventListener("resize",n)});const f=u&&a?em(u,n):null;let d=-1,m=null;r&&(m=new ResizeObserver(v=>{let[b]=v;b&&b.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var g;(g=m)==null||g.observe(t)})),n()}),u&&!l&&m.observe(u),m.observe(t));let p,y=l?_e(e):null;l&&x();function x(){const v=_e(e);y&&!Ca(y,v)&&n(),y=v,p=requestAnimationFrame(x)}return n(),()=>{var v;c.forEach(b=>{i&&b.removeEventListener("scroll",n),o&&b.removeEventListener("resize",n)}),f?.(),(v=m)==null||v.disconnect(),m=null,l&&cancelAnimationFrame(p)}}const nm=Fh,sm=(e,t,n)=>{const s=new Map,i={platform:Qh,...n},o={...i.platform,_c:s};return Oh(e,t,{...i,platform:o})};var im=typeof document<"u",rm=function(){},ln=im?T.useLayoutEffect:rm;function cn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,s,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(s=n;s--!==0;)if(!cn(e[s],t[s]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(t,i[s]))return!1;for(s=n;s--!==0;){const o=i[s];if(!(o==="_owner"&&e.$$typeof)&&!cn(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Pa(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ea(e,t){const n=Pa(e);return Math.round(t*n)/n}function Ks(e){const t=S.useRef(e);return ln(()=>{t.current=e}),t}function om(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:s=[],platform:i,elements:{reference:o,floating:r}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,f]=S.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,m]=S.useState(s);cn(d,s)||m(s);const[p,y]=S.useState(null),[x,v]=S.useState(null),b=S.useCallback(V=>{V!==P.current&&(P.current=V,y(V))},[]),g=S.useCallback(V=>{V!==A.current&&(A.current=V,v(V))},[]),E=o||p,C=r||x,P=S.useRef(null),A=S.useRef(null),R=S.useRef(c),N=l!=null,I=Ks(l),U=Ks(i),ne=Ks(u),O=S.useCallback(()=>{if(!P.current||!A.current)return;const V={placement:t,strategy:n,middleware:d};U.current&&(V.platform=U.current),sm(P.current,A.current,V).then(J=>{const w={...J,isPositioned:ne.current!==!1};K.current&&!cn(R.current,w)&&(R.current=w,Qs.flushSync(()=>{f(w)}))})},[d,t,n,U,ne]);ln(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(V=>({...V,isPositioned:!1})))},[u]);const K=S.useRef(!1);ln(()=>(K.current=!0,()=>{K.current=!1}),[]),ln(()=>{if(E&&(P.current=E),C&&(A.current=C),E&&C){if(I.current)return I.current(E,C,O);O()}},[E,C,O,I,N]);const ve=S.useMemo(()=>({reference:P,floating:A,setReference:b,setFloating:g}),[b,g]),ue=S.useMemo(()=>({reference:E,floating:C}),[E,C]),_=S.useMemo(()=>{const V={position:n,left:0,top:0};if(!ue.floating)return V;const J=Ea(ue.floating,c.x),w=Ea(ue.floating,c.y);return a?{...V,transform:"translate("+J+"px, "+w+"px)",...Pa(ue.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:J,top:w}},[n,a,ue.floating,c.x,c.y]);return S.useMemo(()=>({...c,update:O,refs:ve,elements:ue,floatingStyles:_}),[c,O,ve,ue,_])}const am=(e,t)=>({...nm(e),options:[e,t]}),lm={...S};let Aa=!1,cm=0;const Ra=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+cm++;function um(){const[e,t]=S.useState(()=>Aa?Ra():void 0);return je(()=>{e==null&&t(Ra())},[]),S.useEffect(()=>{Aa=!0},[]),e}const ja=lm.useId||um;let Xs;process.env.NODE_ENV!=="production"&&(Xs=new Set);function fm(){for(var e,t=arguments.length,n=new Array(t),s=0;s<t;s++)n[s]=arguments[s];const i="Floating UI: "+n.join(" ");if(!((e=Xs)!=null&&e.has(i))){var o;(o=Xs)==null||o.add(i),console.error(i)}}function dm(){const e=new Map;return{emit(t,n){var s;(s=e.get(t))==null||s.forEach(i=>i(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var s;(s=e.get(t))==null||s.delete(n)}}}const hm=S.createContext(null),mm=S.createContext(null),pm=()=>{var e;return((e=S.useContext(hm))==null?void 0:e.id)||null},gm=()=>S.useContext(mm);function Ma(e){return"data-floating-ui-"+e}const Da={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},ka=S.forwardRef(function(t,n){const[s,i]=S.useState();je(()=>{Eh()&&i("button")},[]);const o={ref:n,tabIndex:0,role:s,"aria-hidden":s?void 0:!0,[Ma("focus-guard")]:"",style:Da};return h.jsx("span",{...t,...o})}),Va=S.createContext(null),Na=Ma("portal");function ym(e){e===void 0&&(e={});const{id:t,root:n}=e,s=ja(),i=vm(),[o,r]=S.useState(null),a=S.useRef(null);return je(()=>()=>{o?.remove(),queueMicrotask(()=>{a.current=null})},[o]),je(()=>{if(!s||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const u=document.createElement("div");u.id=s,u.setAttribute(Na,""),l.appendChild(u),a.current=u,r(u)},[t,s]),je(()=>{if(n===null||!s||a.current)return;let l=n||i?.portalNode;l&&!Vs(l)&&(l=l.current),l=l||document.body;let u=null;t&&(u=document.createElement("div"),u.id=t,l.appendChild(u));const c=document.createElement("div");c.id=s,c.setAttribute(Na,""),l=u||l,l.appendChild(c),a.current=c,r(c)},[t,n,s,i]),o}function Ia(e){const{children:t,id:n,root:s,preserveTabOrder:i=!0}=e,o=ym({id:n,root:s}),[r,a]=S.useState(null),l=S.useRef(null),u=S.useRef(null),c=S.useRef(null),f=S.useRef(null),d=r?.modal,m=r?.open,p=!!r&&!r.modal&&r.open&&i&&!!(s||o);return S.useEffect(()=>{if(!o||!i||d)return;function y(x){o&&Ws(x)&&(x.type==="focusin"?ma:Ih)(o)}return o.addEventListener("focusin",y,!0),o.addEventListener("focusout",y,!0),()=>{o.removeEventListener("focusin",y,!0),o.removeEventListener("focusout",y,!0)}},[o,i,d]),S.useEffect(()=>{o&&(m||ma(o))},[m,o]),h.jsxs(Va.Provider,{value:S.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:c,afterInsideRef:f,portalNode:o,setFocusManagerState:a}),[i,o]),children:[p&&o&&h.jsx(ka,{"data-type":"outside",ref:l,onFocus:y=>{if(Ws(y,o)){var x;(x=c.current)==null||x.focus()}else{const v=r?r.domReference:null,b=Nh(v);b?.focus()}}}),p&&o&&h.jsx("span",{"aria-owns":o.id,style:Da}),o&&Qs.createPortal(t,o),p&&o&&h.jsx(ka,{"data-type":"outside",ref:u,onFocus:y=>{if(Ws(y,o)){var x;(x=f.current)==null||x.focus()}else{const v=r?r.domReference:null,b=Vh(v);b?.focus(),r?.closeOnFocusOut&&r?.onOpenChange(!1,y.nativeEvent,"focus-out")}}})]})}const vm=()=>S.useContext(Va);let un=0;const Oa="--floating-ui-scrollbar-width";function xm(){const e=Ph(),t=/iP(hone|ad|od)|iOS/.test(e)||e==="MacIntel"&&navigator.maxTouchPoints>1,n=document.body.style,i=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",o=window.innerWidth-document.documentElement.clientWidth,r=n.left?parseFloat(n.left):window.scrollX,a=n.top?parseFloat(n.top):window.scrollY;if(n.overflow="hidden",n.setProperty(Oa,o+"px"),o&&(n[i]=o+"px"),t){var l,u;const c=((l=window.visualViewport)==null?void 0:l.offsetLeft)||0,f=((u=window.visualViewport)==null?void 0:u.offsetTop)||0;Object.assign(n,{position:"fixed",top:-(a-Math.floor(f))+"px",left:-(r-Math.floor(c))+"px",right:"0"})}return()=>{Object.assign(n,{overflow:"",[i]:""}),n.removeProperty(Oa),t&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(r,a))}}let La=()=>{};const Fa=S.forwardRef(function(t,n){const{lockScroll:s=!1,...i}=t;return je(()=>{if(s)return un++,un===1&&(La=xm()),()=>{un--,un===0&&La()}},[s]),h.jsx("div",{ref:n,...i,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}})});function bm(e){const{open:t=!1,onOpenChange:n,elements:s}=e,i=ja(),o=S.useRef({}),[r]=S.useState(()=>dm()),a=pm()!=null;if(process.env.NODE_ENV!=="production"){const m=s.reference;m&&!H(m)&&fm("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,u]=S.useState(s.reference),c=kh((m,p,y)=>{o.current.openEvent=m?p:void 0,r.emit("openchange",{open:m,event:p,reason:y,nested:a}),n?.(m,p,y)}),f=S.useMemo(()=>({setPositionReference:u}),[]),d=S.useMemo(()=>({reference:l||s.reference||null,floating:s.floating||null,domReference:s.reference}),[l,s.reference,s.floating]);return S.useMemo(()=>({dataRef:o,open:t,onOpenChange:c,elements:d,events:r,floatingId:i,refs:f}),[t,c,d,r,i,f])}function wm(e){e===void 0&&(e={});const{nodeId:t}=e,n=bm({...e,elements:{reference:null,floating:null,...e.elements}}),s=e.rootContext||n,i=s.elements,[o,r]=S.useState(null),[a,l]=S.useState(null),c=i?.domReference||o,f=S.useRef(null),d=gm();je(()=>{c&&(f.current=c)},[c]);const m=om({...e,elements:{...i,...a&&{reference:a}}}),p=S.useCallback(g=>{const E=H(g)?{getBoundingClientRect:()=>g.getBoundingClientRect(),getClientRects:()=>g.getClientRects(),contextElement:g}:g;l(E),m.refs.setReference(E)},[m.refs]),y=S.useCallback(g=>{(H(g)||g===null)&&(f.current=g,r(g)),(H(m.refs.reference.current)||m.refs.reference.current===null||g!==null&&!H(g))&&m.refs.setReference(g)},[m.refs]),x=S.useMemo(()=>({...m.refs,setReference:y,setPositionReference:p,domReference:f}),[m.refs,y,p]),v=S.useMemo(()=>({...m.elements,domReference:c}),[m.elements,c]),b=S.useMemo(()=>({...m,...s,refs:x,elements:v,nodeId:t}),[m,x,v,t,s]);return je(()=>{s.dataRef.current.floatingContext=b;const g=d?.nodesRef.current.find(E=>E.id===t);g&&(g.context=b)}),S.useMemo(()=>({...m,context:b,refs:x,elements:v}),[m,x,v,b])}const Tm={top:"bottom center","top-start":"bottom left","top-end":"bottom right",right:"left center","right-start":"top left","right-end":"bottom left",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"top right","left-end":"bottom right"},Ba=S.memo(({open:e,children:t,className:n,onOutsideClick:s,floatingStyles:i,setFloating:o,placement:r})=>h.jsx(Ia,{children:h.jsx(ss,{children:e&&h.jsxs(h.Fragment,{children:[s&&h.jsx(Fa,{onClick:s}),h.jsx("div",{ref:o,style:i,className:"z-50",children:h.jsx(Pt.div,{className:n,style:{transformOrigin:Tm[r]},initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.1,ease:"easeInOut"},children:t})})]})})})),st=e=>{const{placement:t="bottom",onOutsideClick:n,fullWidth:s,minWidth:i,maxWidth:o}=e,r=S.useMemo(()=>[am({apply({rects:f,elements:d}){s&&(d.floating.style.width=`${f.reference.width}px`),i&&(d.floating.style.minWidth=`${i}px`),o&&(d.floating.style.maxWidth=`${o}px`)}})],[s,o,i]),{refs:a,floatingStyles:l}=wm({placement:t,middleware:r,whileElementsMounted:tm}),u=S.useRef({onOutsideClick:n,floatingStyles:l,setFloating:a.setFloating,placement:t});u.current={onOutsideClick:n,floatingStyles:l,setFloating:a.setFloating,placement:t};const c=S.useMemo(()=>{const f=d=>{const{floatingStyles:m,setFloating:p,onOutsideClick:y,placement:x}=u.current,{className:v,open:b,children:g}=d;return h.jsx(Ba,{open:b,className:v,onOutsideClick:y,floatingStyles:m,setFloating:p,placement:x,children:g})};return S.memo(f)},[]);return{anchorRef:a.setReference,Popover:c}},Sm="flex flex-col bg-white border mt-1 border-gray-200 rounded-xl shadow-lg overflow-y-auto relative space-y-1",Cm={sm:"p-2",md:"p-3",lg:"p-4"},it=e=>{const{className:t,children:n,padding:s="md",...i}=e;return h.jsx("div",{className:k(Sm,Cm[s],t),...i,children:n})},fn=(e,t)=>{T.useEffect(()=>{if(!e)return;const n=s=>{s.key==="Escape"&&t()};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[e,t])},_a=e=>{const{className:t,label:n,description:s,options:i,onChange:o,value:r,placeholder:a,maxHeight:l=300,error:u}=e,[c,f]=T.useState(!1),d=S.useRef(null),m=i?.find(x=>x.value===r);fn(c,()=>f(!1)),T.useEffect(()=>{c&&d.current?.focus({preventScroll:!0})},[c]);const{anchorRef:p,Popover:y}=st({placement:"bottom",fullWidth:!0,onOutsideClick:()=>f(!1)});return h.jsxs("div",{className:k("flex flex-col",t),children:[h.jsx(Le,{children:n}),h.jsxs("div",{className:"relative flex w-full flex-col",ref:p,children:[h.jsxs("div",{ref:d,role:"button",tabIndex:0,className:k("flex flex-row items-center h-12 pl-4 pr-10 border border-gray-200 text-gray-900 placeholder:text-gray-400 bg-white transition-all duration-150 rounded-xl shadow-sm ring-0 ring-gray-900/10 focus:ring-4 focus:outline-none select-none",u&&"border-red-600 ring-red-600/20 !pr-10",c&&"ring-4"),onKeyDown:x=>x.key===" "&&f(v=>!v),onClick:()=>f(!c),children:[m&&h.jsx("span",{children:m.label}),!m&&a&&h.jsx("span",{className:"text-gray-500",children:a})]}),h.jsxs(Be,{children:[u&&h.jsx(Fe,{}),!!r&&h.jsx(Se,{Icon:Et,onClick:()=>o(null)}),h.jsx(Se,{Icon:Zt})]}),h.jsx(y,{open:c,children:h.jsx(it,{className:"!p-0",style:{maxHeight:l},children:h.jsx("div",{className:"flex flex-col p-2 gap-1",children:i.map(x=>{const v=x.value===r;return h.jsx(At,{onClick:()=>{!x.disabled&&o&&(o(x.value),f(!1))},selected:v,disabled:x.disabled,children:x.label},String(x.value))})})})})]}),h.jsx(he,{children:s}),h.jsx(me,{children:u})]})},Pm=e=>{const{className:t,label:n,description:s,options:i,onChange:o,onSearch:r,value:a,placeholder:l,maxHeight:u=300,error:c}=e,[f,d]=T.useState(!1),[m,p]=T.useState(i),[y,x]=T.useState(""),v=S.useRef(null),b=S.useRef(null),g=i?.find(P=>P.value===a);fn(f,()=>d(!1)),T.useEffect(()=>{p(r(y))},[y,i,r]),T.useEffect(()=>{f&&b.current?.focus()},[f]);const{anchorRef:E,Popover:C}=st({placement:"bottom",fullWidth:!0,onOutsideClick:()=>d(!1)});return h.jsxs("div",{className:k("flex flex-col",t),children:[h.jsx(Le,{children:n}),h.jsxs("div",{className:"relative flex w-full flex-col",ref:E,children:[h.jsxs("div",{ref:v,role:"button",tabIndex:0,className:k("flex flex-row items-center h-12 pl-4 pr-10 border border-gray-200 text-gray-900 placeholder:text-gray-400 bg-white transition-all duration-150 rounded-xl shadow-sm ring-0 ring-gray-900/10 focus:ring-4 focus:outline-none select-none",c&&"border-red-600 ring-red-600/20 !pr-10",f&&"ring-4"),onKeyDown:P=>P.key===" "&&d(A=>!A),onClick:()=>d(!f),children:[g&&h.jsx("span",{children:g.label}),!g&&l&&h.jsx("span",{className:"text-gray-500",children:l})]}),h.jsxs(Be,{children:[c&&h.jsx(Fe,{}),!!a&&h.jsx(Se,{Icon:Et,onClick:()=>o(null)}),h.jsx(Se,{Icon:Zt})]}),h.jsx(C,{open:f,children:h.jsxs(it,{className:"gap-0 !p-0",style:{maxHeight:u},children:[h.jsxs("div",{className:"sticky top-0 border-b border-b-gray-200 py-1 bg-white/50 backdrop-blur-sm",children:[h.jsx("input",{ref:b,type:"text",placeholder:"Search",value:y,className:"appearance-none border-none w-full bg-transparent rounded- pl-10 transition-all duration-150 focus:outline-none ring-0 placeholder:text-gray-400",onChange:P=>x(P.target.value)}),h.jsx(Ds,{className:"absolute text-gray-500 left-4 top-4 h-4 w-4"})]}),h.jsxs("div",{className:"flex flex-col gap-1 p-2",children:[y!==""&&h.jsxs(h.Fragment,{children:[m.length===0&&h.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:h.jsx(ea,{className:"h-6 w-6 text-gray-900"})}),m.map(P=>{const A=P.value===a;return h.jsx(At,{onClick:()=>{!P.disabled&&o&&(o(P.value),d(!1))},selected:A,disabled:P.disabled,children:P.label},String(P.value))})]}),y===""&&h.jsx(h.Fragment,{children:i.map(P=>{const A=P.value===a;return h.jsx(At,{onClick:()=>{!P.disabled&&o&&(o(P.value),d(!1))},selected:A,disabled:P.disabled,children:P.label},String(P.value))})})]})]})})]}),h.jsx(he,{children:s}),h.jsx(me,{children:c})]})},Em=(e,t)=>{const[n,s]=T.useState(e);return T.useEffect(()=>{const i=setTimeout(()=>{s(e)},t);return()=>{clearTimeout(i)}},[e,t]),n},Am=e=>{const{className:t,label:n,description:s,onChange:i,fetchOptionsByQuery:o,fetchOptionByValue:r,onSearchDebounceMs:a=300,value:l,placeholder:u,maxHeight:c=300,error:f}=e,[d,m]=T.useState(!1),p=S.useRef(null),[y,x]=T.useState(""),[v,b]=T.useState([]),[g,E]=T.useState(null),C=S.useRef(null),[P,A]=T.useState(!1),[R,N]=T.useState(!1);fn(d,()=>m(!1));const I=Em(y,a);T.useEffect(()=>{(async()=>{A(!0);const K=await o(I);b(K),A(!1)})()},[I,o]),T.useEffect(()=>{if(l==null){E(null);return}const O=v?.find(K=>K.value===l);O?E(O):(async()=>{N(!0);const ve=await r(l);E(ve),N(!1)})()},[r,v,l]),T.useEffect(()=>{d&&C.current?.focus()},[d]);const{anchorRef:U,Popover:ne}=st({placement:"bottom",fullWidth:!0,onOutsideClick:()=>m(!1)});return h.jsxs("div",{className:k("flex flex-col",t),children:[h.jsx(Le,{children:n}),h.jsxs("div",{className:"relative flex w-full flex-col",ref:U,children:[h.jsxs("div",{ref:p,role:"button",tabIndex:0,className:k("flex flex-row items-center h-12 pl-4 pr-10 border border-gray-200 text-gray-900 placeholder:text-gray-400 bg-white transition-all duration-150 rounded-xl shadow-sm ring-0 ring-gray-900/10 focus:ring-4 focus:outline-none select-none",f&&"border-red-600 ring-red-600/20 !pr-10",d&&"ring-4"),onKeyDown:O=>O.key===" "&&m(K=>!K),onClick:()=>m(!d),children:[!R&&g&&h.jsx("span",{children:g.label}),!R&&!g&&u&&h.jsx("span",{children:u}),R&&h.jsx(qt,{className:"h-4 w-4 text-gray-600"})]}),h.jsxs(Be,{children:[f&&h.jsx(Fe,{}),!!l&&h.jsx(Se,{Icon:Et,onClick:()=>i(null)}),h.jsx(Se,{Icon:Zt})]}),h.jsx(ne,{open:d,children:h.jsxs(it,{className:"gap-0 !p-0",style:{maxHeight:c},children:[h.jsxs("div",{className:"sticky top-0 border-b border-b-gray-200 py-1 bg-white/50 backdrop-blur-sm",children:[h.jsx("input",{ref:C,type:"text",placeholder:"Search",value:y,className:"appearance-none border-none w-full bg-transparent rounded- pl-10 transition-all duration-150 focus:outline-none ring-0 placeholder:text-gray-400",onChange:O=>x(O.target.value)}),h.jsx(Ds,{className:"absolute text-gray-500 left-4 top-4 h-4 w-4"})]}),h.jsxs("div",{className:"flex flex-col gap-1 p-2",children:[!P&&v.length===0&&h.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:h.jsx(ea,{className:"h-6 w-6 text-gray-900"})}),P&&h.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:h.jsx(qt,{className:"h-6 w-6 text-gray-900"})}),!P&&h.jsx(h.Fragment,{children:v.map(O=>{const K=O.value===l;return h.jsx(At,{onClick:()=>{!O.disabled&&i&&(i(O.value),m(!1))},selected:K,disabled:O.disabled,children:O.label},String(O.value))})})]})]})})]}),h.jsx(he,{children:s}),h.jsx(me,{children:f})]})},Rm=S.forwardRef((e,t)=>{const{className:n,children:s,...i}=e;return h.jsx("div",{ref:t,className:k("flex flex-col gap-6 border border-gray-200 rounded-2xl bg-white shadow-sm px-6 py-6",n),...i,children:s})}),jm=e=>{const{className:t,vertical:n=!1,...s}=e;return h.jsx("div",{className:k(n?"w-px h-full bg-gray-200":"w-full h-px bg-gray-200",t),...s})},Mm=e=>{const{children:t,content:n,className:s,placement:i="top",minWidth:o=100,maxWidth:r=200}=e,[a,l]=T.useState(!1),{anchorRef:u,Popover:c}=st({placement:i,minWidth:o,maxWidth:r});return h.jsxs("span",{ref:u,className:s,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[t,h.jsx(c,{open:a,children:h.jsx(it,{children:n})})]})},Dm=e=>{const{open:t,onDismiss:n,enableDismissOnOutsideClick:s,enableDismissOnEscKey:i,enableDismissButton:o,className:r,children:a,maxWidth:l=600}=e;return fn(!!i&&t,n||(()=>{})),h.jsx(ss,{children:t&&h.jsxs(Ia,{children:[h.jsx(Pt.div,{style:{transformOrigin:"center"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15,ease:"easeInOut"},children:h.jsx(Fa,{className:"bg-gray-400/30 backdrop-blur-[1px] z-10",onClick:s?n:void 0,lockScroll:!0})}),h.jsx("div",{className:"fixed inset-0 flex flex-col items-center pointer-events-none p-4 lg:p-12 overflow-y-auto z-20",children:h.jsxs(Pt.div,{className:k("flex flex-col bg-white rounded-2xl shadow-xl p-6 lg:p-12 pointer-events-auto w-full relative",r),style:{transformOrigin:"bottom",maxWidth:l},initial:{opacity:0,scale:.98,translateY:10},animate:{opacity:1,scale:1,translateY:0},exit:{opacity:0,scale:.98,translateY:10},transition:{duration:.15,ease:"easeInOut"},children:[o&&h.jsx(Zo,{Icon:Et,className:"absolute top-4 right-4",variant:"transparent",size:"sm",onClick:n}),a]})})]})})},$a={red:"bg-red-100 text-red-700 ring-red-200",orange:"bg-orange-100 text-orange-700 ring-orange-200",amber:"bg-amber-100 text-amber-700 ring-amber-200",yellow:"bg-yellow-100 text-yellow-700 ring-yellow-200",lime:"bg-lime-100 text-lime-700 ring-lime-200",green:"bg-green-100 text-green-700 ring-green-200",emerald:"bg-emerald-100 text-emerald-700 ring-emerald-200",teal:"bg-teal-100 text-teal-700 ring-teal-200",cyan:"bg-cyan-100 text-cyan-700 ring-cyan-200",sky:"bg-sky-100 text-sky-700 ring-sky-200",blue:"bg-blue-100 text-blue-700 ring-blue-200",indigo:"bg-indigo-100 text-indigo-700 ring-indigo-200",violet:"bg-violet-100 text-violet-700 ring-violet-200",purple:"bg-purple-100 text-purple-700 ring-purple-200",fuchsia:"bg-fuchsia-100 text-fuchsia-700 ring-fuchsia-200",pink:"bg-pink-100 text-pink-700 ring-pink-200",rose:"bg-rose-100 text-rose-700 ring-rose-200",slate:"bg-slate-100 text-slate-700 ring-slate-200",gray:"bg-gray-100 text-gray-700 ring-gray-200",zinc:"bg-zinc-100 text-zinc-700 ring-zinc-200",neutral:"bg-neutral-100 text-neutral-700 ring-neutral-200",stone:"bg-stone-100 text-stone-700 ring-stone-200",white:"bg-white text-gray-900 ring-stone-200",black:"bg-black text-white ring-stone-200"},Ys=S.forwardRef((e,t)=>{const{className:n,children:s,onClick:i,showCloseIcon:o,Icon:r,color:a="gray"}=e,l=k("inline-flex align-top items-center gap-2 px-3 h-7 rounded-lg font-semibold",$a[a],n);return i?h.jsx("div",{ref:t,children:h.jsxs("button",{className:k("cursor-pointer ring-0 hover:ring-4 active:ring-1 transition-all duration-100 select-none focus:outline-none focus:ring-4",l),onClick:i,children:[r&&h.jsx(r,{className:"h-4 w-4 shrink-0"}),h.jsx("div",{className:"break-all line-clamp-1 text-left",children:s}),o&&h.jsx(Et,{className:"h-4 w-4 shrink-0"})]})}):h.jsxs("div",{className:l,ref:t,children:[r&&h.jsx(r,{className:"h-4 w-4 shrink-0"}),h.jsx("div",{className:"break-all line-clamp-1 text-left",children:s})]})}),Wa=e=>{const{className:t,tabs:n}=e;return h.jsx("div",{className:k("h-12 bg-gray-100 p-1 rounded-xl inline-flex flex-row space-x-1 overflow-x-auto",t),children:n.map((s,i)=>{const o=k("shrink-0 px-4 h-full inline-flex flex-row items-center font-semibold rounded-xl cursor-pointer border border-transparent ing-0 hover:bg-gray-200 active:bg-gray-300/80 transition-all duration-150 select-none focus:outline-none focus:ring-0",s.active&&"bg-white shadow-sm !border-gray-300");return s.href?h.jsxs("a",{href:s.href,className:o,children:[s.Icon&&h.jsx(s.Icon,{className:"h-5 w-5 shrink-0 mr-2 -ml-1"}),s.label]},i):h.jsxs("button",{className:o,onClick:s.onClick,children:[s.Icon&&h.jsx(s.Icon,{className:"h-5 w-5 shrink-0 mr-2 -ml-1"}),s.label]},i)})})},Ua=T.createContext(void 0),km=()=>({dismiss:T.useContext(Ua)||(()=>{})}),Vm="inline-flex flex-row items-center gap-3 h-10 px-3 font-semibold ring-0 hover:bg-gray-100 active:bg-gray-200 rounded-lg cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-0 border border-transparent text-gray-900 bg-transparent ring-gray-900/10",rt=S.forwardRef((e,t)=>{const{className:n,children:s,Icon:i,onClick:o,dismissOnClick:r=!0,...a}=e,{dismiss:l}=km(),u=c=>{o&&o(c),r&&l()};return h.jsxs("button",{ref:t,className:k(Vm,n),onClick:u,...a,children:[i&&h.jsx(i,{className:"h-5 w-5"}),s]})}),Nm=e=>{const{label:t,children:n}=e;return h.jsxs("div",{className:"flex flex-col dropdown-button-group",children:[t&&h.jsx("div",{className:"mb-2 text-sm text-gray-500 font-medium px-1",children:t}),n]})},Hs=e=>{const{trigger:t,children:n,placement:s="bottom-end",minWidth:i=200,className:o}=e,[r,a]=T.useState(!1),{Popover:l,anchorRef:u}=st({placement:s,onOutsideClick:()=>a(!1),minWidth:i});return h.jsxs(h.Fragment,{children:[h.jsx("div",{ref:u,className:o,onClick:()=>a(!r),children:t}),h.jsx(l,{open:r,children:h.jsx(it,{padding:"sm",children:h.jsx(Ua.Provider,{value:()=>a(!1),children:n})})})]})};function Im(e){const{onDelta:t,onDragStart:n,onDragEnd:s,disabled:i=!1,primaryButtonOnly:o=!0,preventScrollOnMove:r=!0}=e,[a,l]=S.useState(!1),u=S.useRef(0),c=S.useRef(0),f=S.useRef(0),d=S.useRef(null),m=S.useRef(null),p=S.useCallback(g=>{if(!a)return;const E={clientX:g??c.current,startX:u.current,totalDeltaX:f.current,target:d.current};l(!1),window.removeEventListener("pointermove",x,{capture:!0}),window.removeEventListener("pointerup",v,{capture:!0}),window.removeEventListener("pointercancel",v,{capture:!0}),window.removeEventListener("keydown",y,!0),m.current!=null&&(cancelAnimationFrame(m.current),m.current=null),s?.(E),d.current=null,f.current=0},[a,s]),y=S.useCallback(g=>{g.key==="Escape"&&(g.preventDefault(),p())},[p]),x=S.useCallback(g=>{if(!a)return;const E=()=>{const C=g.clientX,P=C-c.current;if(P!==0){c.current=C,f.current+=P;const A={clientX:C,startX:u.current,totalDeltaX:f.current,target:d.current};r&&g.preventDefault(),t(P,A)}m.current=null};m.current==null&&(m.current=requestAnimationFrame(E))},[a,t,r]),v=S.useCallback(g=>{p(g.clientX)},[p]),b=S.useCallback(g=>{if(i||o&&g.button!==0)return;g.target.setPointerCapture?.(g.pointerId),u.current=g.clientX,c.current=g.clientX,f.current=0,d.current=g.target,l(!0);const E={clientX:g.clientX,startX:g.clientX,totalDeltaX:0,target:g.target};n?.(E),window.addEventListener("pointermove",x,{passive:!r,capture:!0}),window.addEventListener("pointerup",v,{capture:!0}),window.addEventListener("pointercancel",v,{capture:!0}),window.addEventListener("keydown",y,!0)},[i,n,y,x,v,o,r]);return S.useEffect(()=>()=>{a&&p()},[a]),{isDragging:a,bind:{onPointerDown:b,role:"separator",style:{touchAction:"none",cursor:"col-resize",userSelect:"none"}}}}const Om=e=>{const{column:t}=e,n=t?.defaultWidth??250,{bind:s}=Im({onDelta:i=>console.log(i),onDragStart:()=>{},onDragEnd:()=>{}});return h.jsxs("div",{style:{width:n,height:44},className:"flex flex-row items-stretch select-none",children:[h.jsx("div",{className:"flex-1 content-center px-4 relative cursor-pointer bg-gray-50 hover:bg-gray-100 active:bg-gray-200 transition-colors duration-100",children:t.header}),h.jsx("div",{...s,className:"cursor-ew-resize group py-4 bg-gray-50 w-[8px]",children:h.jsx("div",{className:"w-0.5 h-full mx-auto bg-gray-200 group-hover:bg-gray-300 group-active:bg-blue-600 pointer-events-none"})})]})},Lm=e=>{const{columns:t,rows:n,className:s}=e,i=S.useRef(null),o=r=>{i.current&&i.current.scrollTo({left:r.currentTarget.scrollLeft})};return h.jsxs("div",{className:s,children:[h.jsx("div",{className:"relative h-[45px] w-full overflow-hidden",ref:i,children:h.jsx("div",{className:"absolute",children:h.jsx("div",{className:"font-medium text-gray-800 flex flex-row border-b border-b-gray-200",children:t.map(r=>h.jsx(Om,{column:r},r.id))})})}),h.jsx("div",{className:"relative overflow-scroll min-w-full min-h-full",onScroll:o,children:h.jsx("div",{className:"absolute",children:h.jsx("div",{className:"flex flex-col",children:n.map(r=>h.jsx("div",{className:"flex flex-row border-b border-b-gray-200 hover:bg-gray-50 bg-white transition-all duration-100",children:t.map(a=>h.jsx("div",{className:"flex-1 content-center px-4",style:{height:44,width:250},children:a.renderCell(r)},a.id))},JSON.stringify(r)))})})})]})},Fm=()=>h.jsx("div",{}),Bm=[{id:1,email:"sarah.jennings@example.com",firstname:"Sarah",lastname:"Jennings",status:"active"},{id:2,email:"liam.patel@outlook.com",firstname:"Liam",lastname:"Patel",status:"inactive"},{id:3,email:"emily.wong@gmail.com",firstname:"Emily",lastname:"Wong",status:"active"},{id:4,email:"noah.thompson@yahoo.com",firstname:"Noah",lastname:"Thompson",status:"active"},{id:5,email:"isabella.martin@protonmail.com",firstname:"Isabella",lastname:"Martin",status:"active"},{id:6,email:"ethan.ross@company.io",firstname:"Ethan",lastname:"Ross",status:"inactive"},{id:7,email:"olivia.nguyen@example.org",firstname:"Olivia",lastname:"Nguyen",status:"active"},{id:8,email:"lucas.henderson@gmail.com",firstname:"Lucas",lastname:"Henderson",status:"inactive"},{id:9,email:"mia.johnson@workmail.com",firstname:"Mia",lastname:"Johnson",status:"active"},{id:10,email:"jackson.rivera@outlook.com",firstname:"Jackson",lastname:"Rivera",status:"active"},{id:11,email:"ava.sanders@example.com",firstname:"Ava",lastname:"Sanders",status:"active"},{id:12,email:"logan.bennett@company.io",firstname:"Logan",lastname:"Bennett",status:"inactive"}],_m=[{id:"id",header:"ID",renderCell:e=>e.id},{id:"email",header:"Email",renderCell:e=>h.jsx(Ys,{Icon:Bd,onClick:()=>{},children:e.email})},{id:"firstname",header:"First Name",renderCell:e=>e.firstname},{id:"lastname",header:"Last Name",renderCell:e=>e.lastname},{id:"status",header:"Status",renderCell:()=>h.jsx(Wm,{})}],$m=()=>h.jsxs("div",{className:"flex flex-col gap-6",children:[h.jsxs("div",{className:"flex flex-row items-center justify-start gap-3",children:[h.jsx(ks,{Icon:Ds,placeholder:"Search..."}),h.jsx(Ms,{Icon:ta}),h.jsx(qo,{Icon:Qo,children:"New"}),h.jsxs(Hs,{trigger:h.jsx(Ms,{Icon:ta}),children:[h.jsx(rt,{dismissOnClick:!1,Icon:Qo,children:"Add new"}),h.jsx(rt,{Icon:Ld,children:"Remove"})]}),h.jsx(Wa,{tabs:[{label:"Tab 1",Icon:Jo,active:!0,onClick:()=>{}},{label:"Tab 2",active:!1,onClick:()=>{}},{label:"Tab 3",Icon:Jo,active:!1,onClick:()=>{}}]})]}),h.jsx(_a,{options:[{label:"Option 1",value:1},{label:"Option 2",value:2},{label:"Option 3",value:3}],value:null,onChange:()=>{}}),h.jsx(Lm,{className:"h-[300px] w-[300px]",columns:_m,rows:Bm}),h.jsx(Fm,{})]}),Wm=()=>h.jsx(h.Fragment,{children:h.jsxs(Hs,{placement:"bottom-end",className:"inline-block",trigger:h.jsx(Ys,{onClick:()=>{},children:"Test"}),children:[h.jsx(rt,{children:"Option 1"}),h.jsx(rt,{children:"Option 2"}),h.jsx(rt,{children:"Option 3"})]})});M.Badge=Ys,M.BadgeColor=$a,M.Button=qo,M.ButtonIconRound=Zo,M.ButtonIconSquare=Ms,M.Divider=jm,M.DropdownButton=rt,M.DropdownButtonGroup=Nm,M.DropdownMenu=Hs,M.DropdownPanel=it,M.Input=ks,M.InputCheck=zd,M.InputDescription=he,M.InputError=me,M.InputErrorIcon=Fe,M.InputIconButton=Se,M.InputIconButtonTray=Be,M.InputLabel=Le,M.InputPassword=_d,M.InputRadio=Wd,M.InputSelect=_a,M.InputSelectNative=Kd,M.InputSelectOption=At,M.InputSelectSearchable=Pm,M.InputSelectSearchableAsync=Am,M.InputTextArea=$d,M.InputToggle=Ud,M.Modal=Dm,M.Panel=Rm,M.PopoverBase=Ba,M.Spinner=qt,M.TabButtons=Wa,M.Test=$m,M.Tooltip=Mm,M.usePopover=st,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})}));
|
|
139
144
|
//# sourceMappingURL=index.umd.cjs.map
|