renderloom 1.0.0

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.
@@ -0,0 +1,169 @@
1
+ (function(L,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],x):(L=typeof globalThis<"u"?globalThis:L||self,x(L.RenderLoom={},L.React,L.ReactDOM))})(this,(function(L,x,ja){"use strict";var Ta;function Sa(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 bt=Sa(x);var vt={exports:{}},nt={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Ps;function Ca(){if(Ps)return nt;Ps=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(s,r,o){var i=null;if(o!==void 0&&(i=""+o),r.key!==void 0&&(i=""+r.key),"key"in r){o={};for(var a in r)a!=="key"&&(o[a]=r[a])}else o=r;return r=o.ref,{$$typeof:e,type:s,key:i,ref:r!==void 0?r:null,props:o}}return nt.Fragment=t,nt.jsx=n,nt.jsxs=n,nt}var st={};/**
10
+ * @license React
11
+ * react-jsx-runtime.development.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Ns;function Aa(){return Ns||(Ns=1,process.env.NODE_ENV!=="production"&&(function(){function e(v){if(v==null)return null;if(typeof v=="function")return v.$$typeof===F?null:v.displayName||v.name||null;if(typeof v=="string")return v;switch(v){case y:return"Fragment";case w:return"Profiler";case T:return"StrictMode";case E:return"Suspense";case O:return"SuspenseList";case V:return"Activity"}if(typeof v=="object")switch(typeof v.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),v.$$typeof){case p:return"Portal";case j:return v.displayName||"Context";case b:return(v._context.displayName||"Context")+".Consumer";case S:var R=v.render;return v=v.displayName,v||(v=R.displayName||R.name||"",v=v!==""?"ForwardRef("+v+")":"ForwardRef"),v;case k:return R=v.displayName||null,R!==null?R:e(v.type)||"Memo";case M:R=v._payload,v=v._init;try{return e(v(R))}catch{}}return null}function t(v){return""+v}function n(v){try{t(v);var R=!1}catch{R=!0}if(R){R=console;var U=R.error,H=typeof Symbol=="function"&&Symbol.toStringTag&&v[Symbol.toStringTag]||v.constructor.name||"Object";return U.call(R,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",H),t(v)}}function s(v){if(v===y)return"<>";if(typeof v=="object"&&v!==null&&v.$$typeof===M)return"<...>";try{var R=e(v);return R?"<"+R+">":"<...>"}catch{return"<...>"}}function r(){var v=B.A;return v===null?null:v.getOwner()}function o(){return Error("react-stack-top-frame")}function i(v){if(ce.call(v,"key")){var R=Object.getOwnPropertyDescriptor(v,"key").get;if(R&&R.isReactWarning)return!1}return v.key!==void 0}function a(v,R){function U(){W||(W=!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)",R))}U.isReactWarning=!0,Object.defineProperty(v,"key",{get:U,configurable:!0})}function c(){var v=e(this.type);return xe[v]||(xe[v]=!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.")),v=this.props.ref,v!==void 0?v:null}function u(v,R,U,H,Q,se){var K=U.ref;return v={$$typeof:g,type:v,key:R,props:U,_owner:H},(K!==void 0?K:null)!==null?Object.defineProperty(v,"ref",{enumerable:!1,get:c}):Object.defineProperty(v,"ref",{enumerable:!1,value:null}),v._store={},Object.defineProperty(v._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(v,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(v,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Q}),Object.defineProperty(v,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:se}),Object.freeze&&(Object.freeze(v.props),Object.freeze(v)),v}function d(v,R,U,H,Q,se){var K=R.children;if(K!==void 0)if(H)if(oe(K)){for(H=0;H<K.length;H++)f(K[H]);Object.freeze&&Object.freeze(K)}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(K);if(ce.call(R,"key")){K=e(v);var Ce=Object.keys(R).filter(function(Qt){return Qt!=="key"});H=0<Ce.length?"{key: someKey, "+Ce.join(": ..., ")+": ...}":"{key: someKey}",N[K+H]||(Ce=0<Ce.length?"{"+Ce.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
+ let props = %s;
19
+ <%s {...props} />
20
+ React keys must be passed directly to JSX without using spread:
21
+ let props = %s;
22
+ <%s key={someKey} {...props} />`,H,K,Ce,K),N[K+H]=!0)}if(K=null,U!==void 0&&(n(U),K=""+U),i(R)&&(n(R.key),K=""+R.key),"key"in R){U={};for(var X in R)X!=="key"&&(U[X]=R[X])}else U=R;return K&&a(U,typeof v=="function"?v.displayName||v.name||"Unknown":v),u(v,K,U,r(),Q,se)}function f(v){h(v)?v._store&&(v._store.validated=1):typeof v=="object"&&v!==null&&v.$$typeof===M&&(v._payload.status==="fulfilled"?h(v._payload.value)&&v._payload.value._store&&(v._payload.value._store.validated=1):v._store&&(v._store.validated=1))}function h(v){return typeof v=="object"&&v!==null&&v.$$typeof===g}var m=x,g=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),j=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),F=Symbol.for("react.client.reference"),B=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce=Object.prototype.hasOwnProperty,oe=Array.isArray,J=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(v){return v()}};var W,xe={},G=m.react_stack_bottom_frame.bind(m,o)(),ne=J(s(o)),N={};st.Fragment=y,st.jsx=function(v,R,U){var H=1e4>B.recentlyCreatedOwnerStacks++;return d(v,R,U,!1,H?Error("react-stack-top-frame"):G,H?J(s(v)):ne)},st.jsxs=function(v,R,U){var H=1e4>B.recentlyCreatedOwnerStacks++;return d(v,R,U,!0,H?Error("react-stack-top-frame"):G,H?J(s(v)):ne)}})()),st}var Es;function Pa(){return Es||(Es=1,process.env.NODE_ENV==="production"?vt.exports=Ca():vt.exports=Aa()),vt.exports}var l=Pa();/**
23
+ * @license lucide-react v0.562.0 - ISC
24
+ *
25
+ * This source code is licensed under the ISC license.
26
+ * See the LICENSE file in the root directory of this source tree.
27
+ */const Na=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ea=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,s)=>s?s.toUpperCase():n.toLowerCase()),Ms=e=>{const t=Ea(e);return t.charAt(0).toUpperCase()+t.slice(1)},Vs=(...e)=>e.filter((t,n,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===n).join(" ").trim(),Ma=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
28
+ * @license lucide-react v0.562.0 - ISC
29
+ *
30
+ * This source code is licensed under the ISC license.
31
+ * See the LICENSE file in the root directory of this source tree.
32
+ */var Va={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"};/**
33
+ * @license lucide-react v0.562.0 - ISC
34
+ *
35
+ * This source code is licensed under the ISC license.
36
+ * See the LICENSE file in the root directory of this source tree.
37
+ */const Da=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:r="",children:o,iconNode:i,...a},c)=>x.createElement("svg",{ref:c,...Va,width:t,height:t,stroke:e,strokeWidth:s?Number(n)*24/Number(t):n,className:Vs("lucide",r),...!o&&!Ma(a)&&{"aria-hidden":"true"},...a},[...i.map(([u,d])=>x.createElement(u,d)),...Array.isArray(o)?o:[o]]));/**
38
+ * @license lucide-react v0.562.0 - ISC
39
+ *
40
+ * This source code is licensed under the ISC license.
41
+ * See the LICENSE file in the root directory of this source tree.
42
+ */const q=(e,t)=>{const n=x.forwardRef(({className:s,...r},o)=>x.createElement(Da,{ref:o,iconNode:t,className:Vs(`lucide-${Na(Ms(e))}`,`lucide-${e}`,s),...r}));return n.displayName=Ms(e),n};/**
43
+ * @license lucide-react v0.562.0 - ISC
44
+ *
45
+ * This source code is licensed under the ISC license.
46
+ * See the LICENSE file in the root directory of this source tree.
47
+ */const La=q("arrow-down-right",[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]);/**
48
+ * @license lucide-react v0.562.0 - ISC
49
+ *
50
+ * This source code is licensed under the ISC license.
51
+ * See the LICENSE file in the root directory of this source tree.
52
+ */const Ra=q("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
53
+ * @license lucide-react v0.562.0 - ISC
54
+ *
55
+ * This source code is licensed under the ISC license.
56
+ * See the LICENSE file in the root directory of this source tree.
57
+ */const Ia=q("arrow-up-right",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
58
+ * @license lucide-react v0.562.0 - ISC
59
+ *
60
+ * This source code is licensed under the ISC license.
61
+ * See the LICENSE file in the root directory of this source tree.
62
+ */const Ds=q("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]);/**
63
+ * @license lucide-react v0.562.0 - ISC
64
+ *
65
+ * This source code is licensed under the ISC license.
66
+ * See the LICENSE file in the root directory of this source tree.
67
+ */const Oa=q("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
68
+ * @license lucide-react v0.562.0 - ISC
69
+ *
70
+ * This source code is licensed under the ISC license.
71
+ * See the LICENSE file in the root directory of this source tree.
72
+ */const Ls=q("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
73
+ * @license lucide-react v0.562.0 - ISC
74
+ *
75
+ * This source code is licensed under the ISC license.
76
+ * See the LICENSE file in the root directory of this source tree.
77
+ */const Rs=q("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
78
+ * @license lucide-react v0.562.0 - ISC
79
+ *
80
+ * This source code is licensed under the ISC license.
81
+ * See the LICENSE file in the root directory of this source tree.
82
+ */const sn=q("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
83
+ * @license lucide-react v0.562.0 - ISC
84
+ *
85
+ * This source code is licensed under the ISC license.
86
+ * See the LICENSE file in the root directory of this source tree.
87
+ */const Is=q("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
88
+ * @license lucide-react v0.562.0 - ISC
89
+ *
90
+ * This source code is licensed under the ISC license.
91
+ * See the LICENSE file in the root directory of this source tree.
92
+ */const za=q("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
93
+ * @license lucide-react v0.562.0 - ISC
94
+ *
95
+ * This source code is licensed under the ISC license.
96
+ * See the LICENSE file in the root directory of this source tree.
97
+ */const wt=q("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
98
+ * @license lucide-react v0.562.0 - ISC
99
+ *
100
+ * This source code is licensed under the ISC license.
101
+ * See the LICENSE file in the root directory of this source tree.
102
+ */const Fa=q("cloud-upload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);/**
103
+ * @license lucide-react v0.562.0 - ISC
104
+ *
105
+ * This source code is licensed under the ISC license.
106
+ * See the LICENSE file in the root directory of this source tree.
107
+ */const _a=q("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
108
+ * @license lucide-react v0.562.0 - ISC
109
+ *
110
+ * This source code is licensed under the ISC license.
111
+ * See the LICENSE file in the root directory of this source tree.
112
+ */const kt=q("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
113
+ * @license lucide-react v0.562.0 - ISC
114
+ *
115
+ * This source code is licensed under the ISC license.
116
+ * See the LICENSE file in the root directory of this source tree.
117
+ */const Ba=q("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/**
118
+ * @license lucide-react v0.562.0 - ISC
119
+ *
120
+ * This source code is licensed under the ISC license.
121
+ * See the LICENSE file in the root directory of this source tree.
122
+ */const $a=q("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]);/**
123
+ * @license lucide-react v0.562.0 - ISC
124
+ *
125
+ * This source code is licensed under the ISC license.
126
+ * See the LICENSE file in the root directory of this source tree.
127
+ */const Os=q("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
128
+ * @license lucide-react v0.562.0 - ISC
129
+ *
130
+ * This source code is licensed under the ISC license.
131
+ * See the LICENSE file in the root directory of this source tree.
132
+ */const Wa=q("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);/**
133
+ * @license lucide-react v0.562.0 - ISC
134
+ *
135
+ * This source code is licensed under the ISC license.
136
+ * See the LICENSE file in the root directory of this source tree.
137
+ */const rn=q("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
138
+ * @license lucide-react v0.562.0 - ISC
139
+ *
140
+ * This source code is licensed under the ISC license.
141
+ * See the LICENSE file in the root directory of this source tree.
142
+ */const Ae=q("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),on=x.createContext({});function an(e){const t=x.useRef(null);return t.current===null&&(t.current=e()),t.current}const zs=typeof window<"u"?x.useLayoutEffect:x.useEffect,Tt=x.createContext(null);function ln(e,t){e.indexOf(t)===-1&&e.push(t)}function jt(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 cn(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Ge=()=>{},je=()=>{};typeof process<"u"&&((Ta=process.env)==null?void 0:Ta.NODE_ENV)!=="production"&&(Ge=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(cn(t,n))},je=(e,t,n)=>{if(!e)throw new Error(cn(t,n))});const Pe={},Fs=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function _s(e){return typeof e=="object"&&e!==null}const Bs=e=>/^0[^.\s]+$/u.test(e);function $s(e){let t;return()=>(t===void 0&&(t=e()),t)}const fe=e=>e,Ua=(e,t)=>n=>t(e(n)),rt=(...e)=>e.reduce(Ua),it=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class un{constructor(){this.subscriptions=[]}add(t){return ln(this.subscriptions,t),()=>jt(this.subscriptions,t)}notify(t,n,s){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,s);else for(let o=0;o<r;o++){const i=this.subscriptions[o];i&&i(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ue=e=>e*1e3,he=e=>e/1e3;function Ws(e,t){return t?e*(1e3/t):0}const Us=new Set;function dn(e,t,n){e||Us.has(t)||(console.warn(cn(t,n)),Us.add(t))}const Gs=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Ga=1e-7,Ka=12;function Ya(e,t,n,s,r){let o,i,a=0;do i=t+(n-t)/2,o=Gs(i,s,r)-e,o>0?n=i:t=i;while(Math.abs(o)>Ga&&++a<Ka);return i}function ot(e,t,n,s){if(e===t&&n===s)return fe;const r=o=>Ya(o,0,1,e,n);return o=>o===0||o===1?o:Gs(r(o),t,s)}const Ks=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ys=e=>t=>1-e(1-t),Hs=ot(.33,1.53,.69,.99),fn=Ys(Hs),Xs=Ks(fn),qs=e=>e>=1?1:(e*=2)<1?.5*fn(e):.5*(2-Math.pow(2,-10*(e-1))),hn=e=>1-Math.sin(Math.acos(e)),Zs=Ys(hn),Js=Ks(hn),Ha=ot(.42,0,1,1),Xa=ot(0,0,.58,1),Qs=ot(.42,0,.58,1),qa=e=>Array.isArray(e)&&typeof e[0]!="number",er=e=>Array.isArray(e)&&typeof e[0]=="number",tr={linear:fe,easeIn:Ha,easeInOut:Qs,easeOut:Xa,circIn:hn,circInOut:Js,circOut:Zs,backIn:fn,backInOut:Xs,backOut:Hs,anticipate:qs},Za=e=>typeof e=="string",nr=e=>{if(er(e)){je(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,s,r]=e;return ot(t,n,s,r)}else if(Za(e))return je(tr[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),tr[e];return e},St=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Ja(e,t){let n=new Set,s=new Set,r=!1,o=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(d){i.has(d)&&(u.schedule(d),e()),d(a)}const u={schedule:(d,f=!1,h=!1)=>{const g=h&&r?n:s;return f&&i.add(d),g.add(d),d},cancel:d=>{s.delete(d),i.delete(d)},process:d=>{if(a=d,r){o=!0;return}r=!0;const f=n;n=s,s=f,n.forEach(c),n.clear(),r=!1,o&&(o=!1,u.process(d))}};return u}const Qa=40;function sr(e,t){let n=!1,s=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=St.reduce((b,j)=>(b[j]=Ja(o),b),{}),{setup:a,read:c,resolveKeyframes:u,preUpdate:d,update:f,preRender:h,render:m,postRender:g}=i,p=()=>{const b=Pe.useManualTiming,j=b?r.timestamp:performance.now();n=!1,b||(r.delta=s?1e3/60:Math.max(Math.min(j-r.timestamp,Qa),1)),r.timestamp=j,r.isProcessing=!0,a.process(r),c.process(r),u.process(r),d.process(r),f.process(r),h.process(r),m.process(r),g.process(r),r.isProcessing=!1,n&&t&&(s=!1,e(p))},y=()=>{n=!0,s=!0,r.isProcessing||e(p)};return{schedule:St.reduce((b,j)=>{const S=i[j];return b[j]=(E,O=!1,k=!1)=>(n||y(),S.schedule(E,O,k)),b},{}),cancel:b=>{for(let j=0;j<St.length;j++)i[St[j]].cancel(b)},state:r,steps:i}}const{schedule:_,cancel:Ne,state:re,steps:mn}=sr(typeof requestAnimationFrame<"u"?requestAnimationFrame:fe,!0);let Ct;function el(){Ct=void 0}const ae={now:()=>(Ct===void 0&&ae.set(re.isProcessing||Pe.useManualTiming?re.timestamp:performance.now()),Ct),set:e=>{Ct=e,queueMicrotask(el)}},rr=e=>t=>typeof t=="string"&&t.startsWith(e),ir=rr("--"),tl=rr("var(--"),pn=e=>tl(e)?nl.test(e.split("/*")[0].trim()):!1,nl=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function or(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Ke={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},at={...Ke,transform:e=>be(0,1,e)},At={...Ke,default:1},lt=e=>Math.round(e*1e5)/1e5,gn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function sl(e){return e==null}const rl=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,yn=(e,t)=>n=>!!(typeof n=="string"&&rl.test(n)&&n.startsWith(e)||t&&!sl(n)&&Object.prototype.hasOwnProperty.call(n,t)),ar=(e,t,n)=>s=>{if(typeof s!="string")return s;const[r,o,i,a]=s.match(gn);return{[e]:parseFloat(r),[t]:parseFloat(o),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},il=e=>be(0,255,e),xn={...Ke,transform:e=>Math.round(il(e))},Ie={test:yn("rgb","red"),parse:ar("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+xn.transform(e)+", "+xn.transform(t)+", "+xn.transform(n)+", "+lt(at.transform(s))+")"};function ol(e){let t="",n="",s="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,s+=s,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}}const bn={test:yn("#"),parse:ol,transform:Ie.transform},ct=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ee=ct("deg"),ve=ct("%"),P=ct("px"),al=ct("vh"),ll=ct("vw"),lr={...ve,parse:e=>ve.parse(e)/100,transform:e=>ve.transform(e*100)},Ye={test:yn("hsl","hue"),parse:ar("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+ve.transform(lt(t))+", "+ve.transform(lt(n))+", "+lt(at.transform(s))+")"},Z={test:e=>Ie.test(e)||bn.test(e)||Ye.test(e),parse:e=>Ie.test(e)?Ie.parse(e):Ye.test(e)?Ye.parse(e):bn.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ie.transform(e):Ye.transform(e),getAnimatableNone:e=>{const t=Z.parse(e);return t.alpha=0,Z.transform(t)}},cl=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ul(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(gn))==null?void 0:t.length)||0)+(((n=e.match(cl))==null?void 0:n.length)||0)>0}const cr="number",ur="color",dl="var",fl="var(",dr="${}",hl=/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 He(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},r=[];let o=0;const a=t.replace(hl,c=>(Z.test(c)?(s.color.push(o),r.push(ur),n.push(Z.parse(c))):c.startsWith(fl)?(s.var.push(o),r.push(dl),n.push(c)):(s.number.push(o),r.push(cr),n.push(parseFloat(c))),++o,dr)).split(dr);return{values:n,split:a,indexes:s,types:r}}function ml(e){return He(e).values}function fr({split:e,types:t}){const n=e.length;return s=>{let r="";for(let o=0;o<n;o++)if(r+=e[o],s[o]!==void 0){const i=t[o];i===cr?r+=lt(s[o]):i===ur?r+=Z.transform(s[o]):r+=s[o]}return r}}function pl(e){return fr(He(e))}const gl=e=>typeof e=="number"?0:Z.test(e)?Z.getAnimatableNone(e):e,yl=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:gl(e);function xl(e){const t=He(e);return fr(t)(t.values.map((s,r)=>yl(s,t.split[r])))}const me={test:ul,parse:ml,createTransformer:pl,getAnimatableNone:xl};function vn(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 r=0,o=0,i=0;if(!t)r=o=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;r=vn(c,a,e+1/3),o=vn(c,a,e),i=vn(c,a,e-1/3)}return{red:Math.round(r*255),green:Math.round(o*255),blue:Math.round(i*255),alpha:s}}function Pt(e,t){return n=>n>0?t:e}const $=(e,t,n)=>e+(t-e)*n,wn=(e,t,n)=>{const s=e*e,r=n*(t*t-s)+s;return r<0?0:Math.sqrt(r)},vl=[bn,Ie,Ye],wl=e=>vl.find(t=>t.test(e));function hr(e){const t=wl(e);if(Ge(!!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===Ye&&(n=bl(n)),n}const mr=(e,t)=>{const n=hr(e),s=hr(t);if(!n||!s)return Pt(e,t);const r={...n};return o=>(r.red=wn(n.red,s.red,o),r.green=wn(n.green,s.green,o),r.blue=wn(n.blue,s.blue,o),r.alpha=$(n.alpha,s.alpha,o),Ie.transform(r))},kn=new Set(["none","hidden"]);function kl(e,t){return kn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Tl(e,t){return n=>$(e,t,n)}function Tn(e){return typeof e=="number"?Tl:typeof e=="string"?pn(e)?Pt:Z.test(e)?mr:Cl:Array.isArray(e)?pr:typeof e=="object"?Z.test(e)?mr:jl:Pt}function pr(e,t){const n=[...e],s=n.length,r=e.map((o,i)=>Tn(o)(o,t[i]));return o=>{for(let i=0;i<s;i++)n[i]=r[i](o);return n}}function jl(e,t){const n={...e,...t},s={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(s[r]=Tn(e[r])(e[r],t[r]));return r=>{for(const o in s)n[o]=s[o](r);return n}}function Sl(e,t){const n=[],s={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){const o=t.types[r],i=e.indexes[o][s[o]],a=e.values[i]??0;n[r]=a,s[o]++}return n}const Cl=(e,t)=>{const n=me.createTransformer(t),s=He(e),r=He(t);return s.indexes.var.length===r.indexes.var.length&&s.indexes.color.length===r.indexes.color.length&&s.indexes.number.length>=r.indexes.number.length?kn.has(e)&&!r.values.length||kn.has(t)&&!s.values.length?kl(e,t):rt(pr(Sl(s,r),r.values),n):(Ge(!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"),Pt(e,t))};function gr(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?$(e,t,n):Tn(e)(e,t)}const Al=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>_.update(t,n),stop:()=>Ne(t),now:()=>re.isProcessing?re.timestamp:ae.now()}},yr=(e,t,n=10)=>{let s="";const r=Math.max(Math.round(t/n),2);for(let o=0;o<r;o++)s+=Math.round(e(o/(r-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Nt=2e4;function jn(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<Nt;)t+=n,s=e.next(t);return t>=Nt?1/0:t}function Pl(e,t=100,n){const s=n({...e,keyframes:[0,t]}),r=Math.min(jn(s),Nt);return{type:"keyframes",ease:o=>s.next(r*o).value/t,duration:he(r)}}const Y={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};function Sn(e,t){return e*Math.sqrt(1-t*t)}const Nl=12;function El(e,t,n){let s=n;for(let r=1;r<Nl;r++)s=s-e(s)/t(s);return s}const Cn=.001;function Ml({duration:e=Y.duration,bounce:t=Y.bounce,velocity:n=Y.velocity,mass:s=Y.mass}){let r,o;Ge(e<=ue(Y.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=be(Y.minDamping,Y.maxDamping,i),e=be(Y.minDuration,Y.maxDuration,he(e)),i<1?(r=u=>{const d=u*i,f=d*e,h=d-n,m=Sn(u,i),g=Math.exp(-f);return Cn-h/m*g},o=u=>{const f=u*i*e,h=f*n+n,m=Math.pow(i,2)*Math.pow(u,2)*e,g=Math.exp(-f),p=Sn(Math.pow(u,2),i);return(-r(u)+Cn>0?-1:1)*((h-m)*g)/p}):(r=u=>{const d=Math.exp(-u*e),f=(u-n)*e+1;return-Cn+d*f},o=u=>{const d=Math.exp(-u*e),f=(n-u)*(e*e);return d*f});const a=5/e,c=El(r,o,a);if(e=ue(e),isNaN(c))return{stiffness:Y.stiffness,damping:Y.damping,duration:e};{const u=Math.pow(c,2)*s;return{stiffness:u,damping:i*2*Math.sqrt(s*u),duration:e}}}const Vl=["duration","bounce"],Dl=["stiffness","damping","mass"];function xr(e,t){return t.some(n=>e[n]!==void 0)}function Ll(e){let t={velocity:Y.velocity,stiffness:Y.stiffness,damping:Y.damping,mass:Y.mass,isResolvedFromDuration:!1,...e};if(!xr(e,Dl)&&xr(e,Vl))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),r=s*s,o=2*be(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:Y.mass,stiffness:r,damping:o}}else{const n=Ml({...e,velocity:0});t={...t,...n,mass:Y.mass},t.isResolvedFromDuration=!0}return t}function Et(e=Y.visualDuration,t=Y.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:r}=n;const o=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:c,damping:u,mass:d,duration:f,velocity:h,isResolvedFromDuration:m}=Ll({...n,velocity:-he(n.velocity||0)}),g=h||0,p=u/(2*Math.sqrt(c*d)),y=i-o,T=he(Math.sqrt(c/d)),w=Math.abs(y)<5;s||(s=w?Y.restSpeed.granular:Y.restSpeed.default),r||(r=w?Y.restDelta.granular:Y.restDelta.default);let b,j,S,E,O,k;if(p<1)S=Sn(T,p),E=(g+p*T*y)/S,b=V=>{const F=Math.exp(-p*T*V);return i-F*(E*Math.sin(S*V)+y*Math.cos(S*V))},O=p*T*E+y*S,k=p*T*y-E*S,j=V=>Math.exp(-p*T*V)*(O*Math.sin(S*V)+k*Math.cos(S*V));else if(p===1){b=F=>i-Math.exp(-T*F)*(y+(g+T*y)*F);const V=g+T*y;j=F=>Math.exp(-T*F)*(T*V*F-g)}else{const V=T*Math.sqrt(p*p-1);b=oe=>{const J=Math.exp(-p*T*oe),W=Math.min(V*oe,300);return i-J*((g+p*T*y)*Math.sinh(W)+V*y*Math.cosh(W))/V};const F=(g+p*T*y)/V,B=p*T*F-y*V,ce=p*T*y-F*V;j=oe=>{const J=Math.exp(-p*T*oe),W=Math.min(V*oe,300);return J*(B*Math.sinh(W)+ce*Math.cosh(W))}}const M={calculatedDuration:m&&f||null,velocity:V=>ue(j(V)),next:V=>{if(!m&&p<1){const B=Math.exp(-p*T*V),ce=Math.sin(S*V),oe=Math.cos(S*V),J=i-B*(E*ce+y*oe),W=ue(B*(O*ce+k*oe));return a.done=Math.abs(W)<=s&&Math.abs(i-J)<=r,a.value=a.done?i:J,a}const F=b(V);if(m)a.done=V>=f;else{const B=ue(j(V));a.done=Math.abs(B)<=s&&Math.abs(i-F)<=r}return a.value=a.done?i:F,a},toString:()=>{const V=Math.min(jn(M),Nt),F=yr(B=>M.next(V*B).value,V,30);return V+"ms "+F},toTransition:()=>{}};return M}Et.applyToOptions=e=>{const t=Pl(e,100,Et);return e.ease=t.ease,e.duration=ue(t.duration),e.type="keyframes",e};const Rl=5;function br(e,t,n){const s=Math.max(t-Rl,0);return Ws(n-e(s),t-s)}function An({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:o=500,modifyTarget:i,min:a,max:c,restDelta:u=.5,restSpeed:d}){const f=e[0],h={done:!1,value:f},m=k=>a!==void 0&&k<a||c!==void 0&&k>c,g=k=>a===void 0?c:c===void 0||Math.abs(a-k)<Math.abs(c-k)?a:c;let p=n*t;const y=f+p,T=i===void 0?y:i(y);T!==y&&(p=T-f);const w=k=>-p*Math.exp(-k/s),b=k=>T+w(k),j=k=>{const M=w(k),V=b(k);h.done=Math.abs(M)<=u,h.value=h.done?T:V};let S,E;const O=k=>{m(h.value)&&(S=k,E=Et({keyframes:[h.value,g(h.value)],velocity:br(b,k,h.value),damping:r,stiffness:o,restDelta:u,restSpeed:d}))};return O(0),{calculatedDuration:null,next:k=>{let M=!1;return!E&&S===void 0&&(M=!0,j(k),O(k)),S!==void 0&&k>=S?E.next(k-S):(!M&&j(k),h)}}}function Il(e,t,n){const s=[],r=n||Pe.mix||gr,o=e.length-1;for(let i=0;i<o;i++){let a=r(e[i],e[i+1]);if(t){const c=Array.isArray(t)?t[i]||fe:t;a=rt(c,a)}s.push(a)}return s}function Ol(e,t,{clamp:n=!0,ease:s,mixer:r}={}){const o=e.length;if(je(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 i=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Il(t,s,r),c=a.length,u=d=>{if(i&&d<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const h=it(e[f],e[f+1],d);return a[f](h)};return n?d=>u(be(e[0],e[o-1],d)):u}function zl(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const r=it(0,t,s);e.push($(n,1,r))}}function Fl(e){const t=[0];return zl(t,e.length-1),t}function _l(e,t){return e.map(n=>n*t)}function Bl(e,t){return e.map(()=>t||Qs).splice(0,e.length-1)}function Xe({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const r=qa(s)?s.map(nr):nr(s),o={done:!1,value:t[0]},i=_l(n&&n.length===t.length?n:Fl(t),e),a=Ol(i,t,{ease:Array.isArray(r)?r:Bl(t,r)});return{calculatedDuration:e,next:c=>(o.value=a(c),o.done=c>=e,o)}}const $l=e=>e!==null;function Mt(e,{repeat:t,repeatType:n="loop"},s,r=1){const o=e.filter($l),a=r<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const Wl={decay:An,inertia:An,tween:Xe,keyframes:Xe,spring:Et};function vr(e){typeof e.type=="string"&&(e.type=Wl[e.type])}class Pn{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 Ul=e=>e/100;class Vt extends Pn{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var s,r;const{motionValue:n}=this.options;n&&n.updatedAt!==ae.now()&&this.tick(ae.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(r=(s=this.options).onStop)==null||r.call(s))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;vr(t);const{type:n=Xe,repeat:s=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=t;let{keyframes:a}=t;const c=n||Xe;process.env.NODE_ENV!=="production"&&c!==Xe&&je(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),c!==Xe&&typeof a[0]!="number"&&(this.mixKeyframes=rt(Ul,gr(a[0],a[1])),a=[0,100]);const u=c({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...a].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=jn(u));const{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+r,this.totalDuration=this.resolvedDuration*(s+1)-r,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:r,mixKeyframes:o,mirroredGenerator:i,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:d,repeat:f,repeatType:h,repeatDelay:m,type:g,onUpdate:p,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-r/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const T=this.currentTime-u*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?T<0:T>r;this.currentTime=Math.max(T,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let b=this.currentTime,j=s;if(f){const k=Math.min(this.currentTime,r)/a;let M=Math.floor(k),V=k%1;!V&&k>=1&&(V=1),V===1&&M--,M=Math.min(M,f+1),!!(M%2)&&(h==="reverse"?(V=1-V,m&&(V-=m/a)):h==="mirror"&&(j=i)),b=be(0,1,V)*a}let S;w?(this.delayState.value=d[0],S=this.delayState):S=j.next(b),o&&!w&&(S.value=o(S.value));let{done:E}=S;!w&&c!==null&&(E=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return O&&g!==An&&(S.value=Mt(d,this.options,y,this.speed)),p&&p(S.value),O&&this.finish(),S}then(t,n){return this.finished.then(t,n)}get duration(){return he(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+he(t)}get time(){return he(this.currentTime)}set time(t){t=ue(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?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return br(s=>this.generator.next(s).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(ae.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=he(this.currentTime))}play(){var r,o;if(this.isStopped)return;const{driver:t=Al,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),(o=(r=this.options).onPlay)==null||o.call(r);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(ae.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function Gl(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Oe=e=>e*180/Math.PI,Nn=e=>{const t=Oe(Math.atan2(e[1],e[0]));return En(t)},Kl={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Nn,rotateZ:Nn,skewX:e=>Oe(Math.atan(e[1])),skewY:e=>Oe(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},En=e=>(e=e%360,e<0&&(e+=360),e),wr=Nn,kr=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Tr=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Yl={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:kr,scaleY:Tr,scale:e=>(kr(e)+Tr(e))/2,rotateX:e=>En(Oe(Math.atan2(e[6],e[5]))),rotateY:e=>En(Oe(Math.atan2(-e[2],e[0]))),rotateZ:wr,rotate:wr,skewX:e=>Oe(Math.atan(e[4])),skewY:e=>Oe(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Mn(e){return e.includes("scale")?1:0}function Vn(e,t){if(!e||e==="none")return Mn(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,r;if(n)s=Yl,r=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Kl,r=a}if(!r)return Mn(t);const o=s[t],i=r[1].split(",").map(Xl);return typeof o=="function"?o(i):i[o]}const Hl=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Vn(n,t)};function Xl(e){return parseFloat(e.trim())}const qe=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ze=new Set(qe),jr=e=>e===Ke||e===P,ql=new Set(["x","y","z"]),Zl=qe.filter(e=>!ql.has(e));function Jl(e){const t=[];return Zl.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const Me={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:s})=>{const r=e.max-e.min;return s==="border-box"?r:r-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:s})=>{const r=e.max-e.min;return s==="border-box"?r:r-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})=>Vn(t,"x"),y:(e,{transform:t})=>Vn(t,"y")};Me.translateX=Me.x,Me.translateY=Me.y;const ze=new Set;let Dn=!1,Ln=!1,Rn=!1;function Sr(){if(Ln){const e=Array.from(ze).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const r=Jl(s);r.length&&(n.set(s,r),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const r=n.get(s);r&&r.forEach(([o,i])=>{var a;(a=s.getValue(o))==null||a.set(i)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Ln=!1,Dn=!1,ze.forEach(e=>e.complete(Rn)),ze.clear()}function Cr(){ze.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ln=!0)})}function Ql(){Rn=!0,Cr(),Sr(),Rn=!1}class In{constructor(t,n,s,r,o,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=r,this.element=o,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(ze.add(this),Dn||(Dn=!0,_.read(Cr),_.resolveKeyframes(Sr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:r}=this;if(t[0]===null){const o=r==null?void 0:r.get(),i=t[t.length-1];if(o!==void 0)t[0]=o;else if(s&&n){const a=s.readValue(n,i);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=i),r&&o===void 0&&r.set(t[0])}Gl(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ze.delete(this)}cancel(){this.state==="scheduled"&&(ze.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const ec=e=>e.startsWith("--");function Ar(e,t,n){ec(t)?e.style.setProperty(t,n):e.style[t]=n}const tc={};function Pr(e,t){const n=$s(e);return()=>tc[t]??n()}const nc=Pr(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Nr=Pr(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ut=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,Er={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ut([0,.65,.55,1]),circOut:ut([.55,0,1,.45]),backIn:ut([.31,.01,.66,-.59]),backOut:ut([.33,1.53,.69,.99])};function Mr(e,t){if(e)return typeof e=="function"?Nr()?yr(e,t):"ease-out":er(e)?ut(e):Array.isArray(e)?e.map(n=>Mr(n,t)||Er.easeOut):Er[e]}function sc(e,t,n,{delay:s=0,duration:r=300,repeat:o=0,repeatType:i="loop",ease:a="easeOut",times:c}={},u=void 0){const d={[t]:n};c&&(d.offset=c);const f=Mr(a,r);Array.isArray(f)&&(d.easing=f);const h={delay:s,duration:r,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:i==="reverse"?"alternate":"normal"};return u&&(h.pseudoElement=u),e.animate(d,h)}function Vr(e){return typeof e=="function"&&"applyToOptions"in e}function rc({type:e,...t}){return Vr(e)&&Nr()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Dr extends Pn{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:s,keyframes:r,pseudoElement:o,allowFlatten:i=!1,finalKeyframe:a,onComplete:c}=t;this.isPseudoElement=!!o,this.allowFlatten=i,this.options=t,je(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=rc(t);this.animation=sc(n,s,r,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const d=Mt(r,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(d),Ar(n,s,d),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,s,r;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((r=(s=this.animation).commitStyles)==null||r.call(s))}get duration(){var n,s;const t=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return he(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+he(t)}get time(){return he(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=ue(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:s,observe:r}){var o;return this.allowFlatten&&((o=this.animation.effect)==null||o.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&nc()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),fe):r(this)}}const Lr={anticipate:qs,backInOut:Xs,circInOut:Js};function ic(e){return e in Lr}function oc(e){typeof e.ease=="string"&&ic(e.ease)&&(e.ease=Lr[e.ease])}const On=10;class ac extends Dr{constructor(t){oc(t),vr(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:s,onComplete:r,element:o,...i}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Vt({...i,autoplay:!1}),c=Math.max(On,ae.now()-this.startTime),u=be(0,On,c-On),d=a.sample(c).value,{name:f}=this.options;o&&f&&Ar(o,f,d),n.setWithVelocity(a.sample(Math.max(0,c-u)).value,d,u),a.stop()}}const Rr=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(me.test(e)||e==="0")&&!e.startsWith("url("));function lc(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 cc(e,t,n,s){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],i=Rr(r,t),a=Rr(o,t);return Ge(i===a,`You are trying to animate ${t} from "${r}" to "${o}". "${i?o:r}" is not an animatable value.`,"value-not-animatable"),!i||!a?!1:lc(e)||(n==="spring"||Vr(n))&&s}function zn(e){e.duration=0,e.type="keyframes"}const Ir=new Set(["opacity","clipPath","filter","transform"]),uc=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function dc(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&uc.test(e[t]))return!0;return!1}const fc=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),hc=$s(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function mc(e){var f;const{motionValue:t,name:n,repeatDelay:s,repeatType:r,damping:o,type:i,keyframes:a}=e;if(!(((f=t==null?void 0:t.owner)==null?void 0:f.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:d}=t.owner.getProps();return hc()&&n&&(Ir.has(n)||fc.has(n)&&dc(a))&&(n!=="transform"||!d)&&!u&&!s&&r!=="mirror"&&o!==0&&i!=="inertia"}const pc=40;class gc extends Pn{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i="loop",keyframes:a,name:c,motionValue:u,element:d,...f}){var g;super(),this.stop=()=>{var p,y;this._animation&&(this._animation.stop(),(p=this.stopTimeline)==null||p.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=ae.now();const h={autoplay:t,delay:n,type:s,repeat:r,repeatDelay:o,repeatType:i,name:c,motionValue:u,element:d,...f},m=(d==null?void 0:d.KeyframeResolver)||In;this.keyframeResolver=new m(a,(p,y,T)=>this.onKeyframesResolved(p,y,h,!T),c,u,d),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,s,r){var T,w;this.keyframeResolver=void 0;const{name:o,type:i,velocity:a,delay:c,isHandoff:u,onUpdate:d}=s;this.resolvedAt=ae.now();let f=!0;cc(t,o,i,a)||(f=!1,(Pe.instantAnimations||!c)&&(d==null||d(Mt(t,s,n))),t[0]=t[t.length-1],zn(s),s.repeat=0);const m={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>pc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},g=f&&!u&&mc(m),p=(w=(T=m.motionValue)==null?void 0:T.owner)==null?void 0:w.current;let y;if(g)try{y=new ac({...m,element:p})}catch{y=new Vt(m)}else y=new Vt(m);y.finished.then(()=>{this.notifyFinished()}).catch(fe),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Ql()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function Or(e,t,n,s=0,r=1){const o=Array.from(e).sort((u,d)=>u.sortNodePosition(d)).indexOf(t),i=e.size,a=(i-1)*s;return typeof n=="function"?n(o,i):r===1?o*s:a-o*s}const yc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function xc(e){const t=yc.exec(e);if(!t)return[,];const[,n,s,r]=t;return[`--${n??s}`,r]}const bc=4;function zr(e,t,n=1){je(n<=bc,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,r]=xc(e);if(!s)return;const o=window.getComputedStyle(t).getPropertyValue(s);if(o){const i=o.trim();return Fs(i)?parseFloat(i):i}return pn(r)?zr(r,t,n+1):r}const vc={type:"spring",stiffness:500,damping:25,restSpeed:10},wc=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),kc={type:"keyframes",duration:.8},Tc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},jc=(e,{keyframes:t})=>t.length>2?kc:Ze.has(e)?e.startsWith("scale")?wc(t[1]):vc:Tc;function Fr(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...s}=e;return{...t,...s}}return e}function Fn(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?Fr(n,e):n}const Sc=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Cc(e){for(const t in e)if(!Sc.has(t))return!0;return!1}const _n=(e,t,n,s={},r,o)=>i=>{const a=Fn(s,e)||{},c=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-ue(c);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:r};Cc(a)||Object.assign(d,jc(e,d)),d.duration&&(d.duration=ue(d.duration)),d.repeatDelay&&(d.repeatDelay=ue(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(zn(d),d.delay===0&&(f=!0)),(Pe.instantAnimations||Pe.skipAnimations||r!=null&&r.shouldSkipAnimations)&&(f=!0,zn(d),d.delay=0),d.allowFlatten=!a.type&&!a.ease,f&&!o&&t.get()!==void 0){const h=Mt(d.keyframes,a);if(h!==void 0){_.update(()=>{d.onUpdate(h),d.onComplete()});return}}return a.isSync?new Vt(d):new gc(d)};function _r(e){const t=[{},{}];return e==null||e.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function Bn(e,t,n,s){if(typeof t=="function"){const[r,o]=_r(s);t=t(n!==void 0?n:e.custom,r,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,o]=_r(s);t=t(n!==void 0?n:e.custom,r,o)}return t}function Fe(e,t,n){const s=e.getProps();return Bn(s,t,n!==void 0?n:s.custom,e)}const Br=new Set(["width","height","top","left","right","bottom",...qe]),$r=30,Ac=e=>!isNaN(parseFloat(e));class Pc{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var o;const r=ae.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ae.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Ac(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&dn(!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 un);const s=this.events[t].add(n);return t==="change"?()=>{s(),_.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(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ae.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>$r)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,$r);return Ws(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Je(e,t){return new Pc(e,t)}const $n=e=>Array.isArray(e);function Nc(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Je(n))}function Ec(e){return $n(e)?e[e.length-1]||0:e}function Mc(e,t){const n=Fe(e,t);let{transitionEnd:s={},transition:r={},...o}=n||{};o={...o,...s};for(const i in o){const a=Ec(o[i]);Nc(e,i,a)}}const ie=e=>!!(e&&e.getVelocity);function Vc(e){return!!(ie(e)&&e.add)}function Wn(e,t){const n=e.getValue("willChange");if(Vc(n))return n.add(t);if(!n&&Pe.WillChange){const s=new Pe.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function Un(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Wr="data-"+Un("framerAppearId");function Ur(e){return e.props[Wr]}function Dc({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function Gr(e,t,{delay:n=0,transitionOverride:s,type:r}={}){let{transition:o,transitionEnd:i,...a}=t;const c=e.getDefaultTransition();o=o?Fr(o,c):c;const u=o==null?void 0:o.reduceMotion;s&&(o=s);const d=[],f=r&&e.animationState&&e.animationState.getState()[r];for(const h in a){const m=e.getValue(h,e.latestValues[h]??null),g=a[h];if(g===void 0||f&&Dc(f,h))continue;const p={delay:n,...Fn(o||{},h)},y=m.get();if(y!==void 0&&!m.isAnimating()&&!Array.isArray(g)&&g===y&&!p.velocity){_.update(()=>m.set(g));continue}let T=!1;if(window.MotionHandoffAnimation){const j=Ur(e);if(j){const S=window.MotionHandoffAnimation(j,h,_);S!==null&&(p.startTime=S,T=!0)}}Wn(e,h);const w=u??e.shouldReduceMotion;m.start(_n(h,m,g,w&&Br.has(h)?{type:!1}:p,e,T));const b=m.animation;b&&d.push(b)}if(i){const h=()=>_.update(()=>{i&&Mc(e,i)});d.length?Promise.all(d).then(h):h()}return d}function Gn(e,t,n={}){var c;const s=Fe(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:r=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(r=n.transitionOverride);const o=s?()=>Promise.all(Gr(e,s,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:h}=r;return Lc(e,t,u,d,f,h,n)}:()=>Promise.resolve(),{when:a}=r;if(a){const[u,d]=a==="beforeChildren"?[o,i]:[i,o];return u().then(()=>d())}else return Promise.all([o(),i(n.delay)])}function Lc(e,t,n=0,s=0,r=0,o=1,i){const a=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),a.push(Gn(c,t,{...i,delay:n+(typeof s=="function"?0:s)+Or(e.variantChildren,c,s,r,o)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(a)}function Rc(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const r=t.map(o=>Gn(e,o,n));s=Promise.all(r)}else if(typeof t=="string")s=Gn(e,t,n);else{const r=typeof t=="function"?Fe(e,t,n.custom):t;s=Promise.all(Gr(e,r,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}const Ic={test:e=>e==="auto",parse:e=>e},Kr=e=>t=>t.test(e),Yr=[Ke,P,ve,Ee,ll,al,Ic],Hr=e=>Yr.find(Kr(e));function Oc(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Bs(e):!0}const zc=new Set(["brightness","contrast","saturate","opacity"]);function Fc(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(gn)||[];if(!s)return e;const r=n.replace(s,"");let o=zc.has(t)?1:0;return s!==n&&(o*=100),t+"("+o+r+")"}const _c=/\b([a-z-]*)\(.*?\)/gu,Kn={...me,getAnimatableNone:e=>{const t=e.match(_c);return t?t.map(Fc).join(" "):e}},Yn={...me,getAnimatableNone:e=>{const t=me.parse(e);return me.createTransformer(e)(t.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},Xr={...Ke,transform:Math.round},Hn={borderWidth:P,borderTopWidth:P,borderRightWidth:P,borderBottomWidth:P,borderLeftWidth:P,borderRadius:P,borderTopLeftRadius:P,borderTopRightRadius:P,borderBottomRightRadius:P,borderBottomLeftRadius:P,width:P,maxWidth:P,height:P,maxHeight:P,top:P,right:P,bottom:P,left:P,inset:P,insetBlock:P,insetBlockStart:P,insetBlockEnd:P,insetInline:P,insetInlineStart:P,insetInlineEnd:P,padding:P,paddingTop:P,paddingRight:P,paddingBottom:P,paddingLeft:P,paddingBlock:P,paddingBlockStart:P,paddingBlockEnd:P,paddingInline:P,paddingInlineStart:P,paddingInlineEnd:P,margin:P,marginTop:P,marginRight:P,marginBottom:P,marginLeft:P,marginBlock:P,marginBlockStart:P,marginBlockEnd:P,marginInline:P,marginInlineStart:P,marginInlineEnd:P,fontSize:P,backgroundPositionX:P,backgroundPositionY:P,...{rotate:Ee,rotateX:Ee,rotateY:Ee,rotateZ:Ee,scale:At,scaleX:At,scaleY:At,scaleZ:At,skew:Ee,skewX:Ee,skewY:Ee,distance:P,translateX:P,translateY:P,translateZ:P,x:P,y:P,z:P,perspective:P,transformPerspective:P,opacity:at,originX:lr,originY:lr,originZ:P},zIndex:Xr,fillOpacity:at,strokeOpacity:at,numOctaves:Xr},Bc={...Hn,color:Z,backgroundColor:Z,outlineColor:Z,fill:Z,stroke:Z,borderColor:Z,borderTopColor:Z,borderRightColor:Z,borderBottomColor:Z,borderLeftColor:Z,filter:Kn,WebkitFilter:Kn,mask:Yn,WebkitMask:Yn},qr=e=>Bc[e],$c=new Set([Kn,Yn]);function Zr(e,t){let n=qr(e);return $c.has(n)||(n=me),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Wc=new Set(["auto","none","0"]);function Uc(e,t,n){let s=0,r;for(;s<e.length&&!r;){const o=e[s];typeof o=="string"&&!Wc.has(o)&&He(o).values.length&&(r=e[s]),s++}if(r&&n)for(const o of t)e[o]=Zr(n,r)}class Gc extends In{constructor(t,n,s,r,o){super(t,n,s,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let f=t[d];if(typeof f=="string"&&(f=f.trim(),pn(f))){const h=zr(f,n.current);h!==void 0&&(t[d]=h),d===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!Br.has(s)||t.length!==2)return;const[r,o]=t,i=Hr(r),a=Hr(o),c=or(r),u=or(o);if(c!==u&&Me[s]){this.needsMeasurement=!0;return}if(i!==a)if(jr(i)&&jr(a))for(let d=0;d<t.length;d++){const f=t[d];typeof f=="string"&&(t[d]=parseFloat(f))}else Me[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let r=0;r<t.length;r++)(t[r]===null||Oc(t[r]))&&s.push(r);s.length&&Uc(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=Me[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&t.getValue(s,r).jump(r,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const r=t.getValue(n);r&&r.jump(this.measuredOrigin,!1);const o=s.length-1,i=s[o];s[o]=Me[n](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function Jr(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const r=(n==null?void 0:n[e])??s.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e).filter(s=>s!=null)}const Qr=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Dt(e){return _s(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Xn}=sr(queueMicrotask,!1),pe={x:!1,y:!1};function ei(){return pe.x||pe.y}function Kc(e){return e==="x"||e==="y"?pe[e]?null:(pe[e]=!0,()=>{pe[e]=!1}):pe.x||pe.y?null:(pe.x=pe.y=!0,()=>{pe.x=pe.y=!1})}function ti(e,t){const n=Jr(e),s=new AbortController,r={passive:!0,...t,signal:s.signal};return[n,r,()=>s.abort()]}function Yc(e){return!(e.pointerType==="touch"||ei())}function Hc(e,t,n={}){const[s,r,o]=ti(e,n);return s.forEach(i=>{let a=!1,c=!1,u;const d=()=>{i.removeEventListener("pointerleave",g)},f=y=>{u&&(u(y),u=void 0),d()},h=y=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),c&&(c=!1,f(y))},m=()=>{a=!0,window.addEventListener("pointerup",h,r),window.addEventListener("pointercancel",h,r)},g=y=>{if(y.pointerType!=="touch"){if(a){c=!0;return}f(y)}},p=y=>{if(!Yc(y))return;c=!1;const T=t(i,y);typeof T=="function"&&(u=T,i.addEventListener("pointerleave",g,r))};i.addEventListener("pointerenter",p,r),i.addEventListener("pointerdown",m,r)}),o}const ni=(e,t)=>t?e===t?!0:ni(e,t.parentElement):!1,qn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Xc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function qc(e){return Xc.has(e.tagName)||e.isContentEditable===!0}const Zc=new Set(["INPUT","SELECT","TEXTAREA"]);function Jc(e){return Zc.has(e.tagName)||e.isContentEditable===!0}const Lt=new WeakSet;function si(e){return t=>{t.key==="Enter"&&e(t)}}function Zn(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Qc=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=si(()=>{if(Lt.has(n))return;Zn(n,"down");const r=si(()=>{Zn(n,"up")}),o=()=>Zn(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function ri(e){return qn(e)&&!ei()}const ii=new WeakSet;function eu(e,t,n={}){const[s,r,o]=ti(e,n),i=a=>{const c=a.currentTarget;if(!ri(a)||ii.has(a))return;Lt.add(c),n.stopPropagation&&ii.add(a);const u=t(c,a),d=(m,g)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),Lt.has(c)&&Lt.delete(c),ri(m)&&typeof u=="function"&&u(m,{success:g})},f=m=>{d(m,c===window||c===document||n.useGlobalTarget||ni(c,m.target))},h=m=>{d(m,!1)};window.addEventListener("pointerup",f,r),window.addEventListener("pointercancel",h,r)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",i,r),Dt(a)&&(a.addEventListener("focus",u=>Qc(u,r)),!qc(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Jn(e){return _s(e)&&"ownerSVGElement"in e}const Rt=new WeakMap;let Ve;const oi=(e,t,n)=>(s,r)=>r&&r[0]?r[0][e+"Size"]:Jn(s)&&"getBBox"in s?s.getBBox()[t]:s[n],tu=oi("inline","width","offsetWidth"),nu=oi("block","height","offsetHeight");function su({target:e,borderBoxSize:t}){var n;(n=Rt.get(e))==null||n.forEach(s=>{s(e,{get width(){return tu(e,t)},get height(){return nu(e,t)}})})}function ru(e){e.forEach(su)}function iu(){typeof ResizeObserver>"u"||(Ve=new ResizeObserver(ru))}function ou(e,t){Ve||iu();const n=Jr(e);return n.forEach(s=>{let r=Rt.get(s);r||(r=new Set,Rt.set(s,r)),r.add(t),Ve==null||Ve.observe(s)}),()=>{n.forEach(s=>{const r=Rt.get(s);r==null||r.delete(t),r!=null&&r.size||Ve==null||Ve.unobserve(s)})}}const It=new Set;let Qe;function au(){Qe=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};It.forEach(t=>t(e))},window.addEventListener("resize",Qe)}function lu(e){return It.add(e),Qe||au(),()=>{It.delete(e),!It.size&&typeof Qe=="function"&&(window.removeEventListener("resize",Qe),Qe=void 0)}}function ai(e,t){return typeof e=="function"?lu(e):ou(e,t)}function cu(e){return Jn(e)&&e.tagName==="svg"}const uu=[...Yr,Z,me],du=e=>uu.find(Kr(e)),li=()=>({translate:0,scale:1,origin:0,originPoint:0}),et=()=>({x:li(),y:li()}),ci=()=>({min:0,max:0}),ee=()=>({x:ci(),y:ci()}),fu=new WeakMap;function Ot(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function dt(e){return typeof e=="string"||Array.isArray(e)}const Qn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],es=["initial",...Qn];function zt(e){return Ot(e.animate)||es.some(t=>dt(e[t]))}function ui(e){return!!(zt(e)||e.variants)}function hu(e,t,n){for(const s in t){const r=t[s],o=n[s];if(ie(r))e.addValue(s,r);else if(ie(o))e.addValue(s,Je(r,{owner:e}));else if(o!==r)if(e.hasValue(s)){const i=e.getValue(s);i.liveStyle===!0?i.jump(r):i.hasAnimated||i.set(r)}else{const i=e.getStaticValue(s);e.addValue(s,Je(i!==void 0?i:r,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const ts={current:null},di={current:!1},mu=typeof window<"u";function pu(){if(di.current=!0,!!mu)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ts.current=e.matches;e.addEventListener("change",t),t()}else ts.current=!1}const fi=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Ft={};function hi(e){Ft=e}function gu(){return Ft}class yu{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:r,skipAnimations:o,blockInitialAnimation:i,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=In,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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 m=ae.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,_.render(this.render,!1,!0))};const{latestValues:u,renderState:d}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=o,this.options=c,this.blockInitialAnimation=!!i,this.isControllingVariants=zt(n),this.isVariantNode=ui(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in h){const g=h[m];u[m]!==void 0&&ie(g)&&g.set(u[m])}}mount(t){var n,s;if(this.hasBeenMounted)for(const r in this.initialValues)(n=this.values.get(r))==null||n.jump(this.initialValues[r]),this.latestValues[r]=this.initialValues[r];this.current=t,fu.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((r,o)=>this.bindToMotionValue(o,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(di.current||pu(),this.shouldReduceMotion=ts.current),process.env.NODE_ENV!=="production"&&dn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(s=this.parent)==null||s.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Ne(this.notifyUpdate),Ne(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.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){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&Ir.has(t)&&this.current instanceof HTMLElement){const{factory:i,keyframes:a,times:c,ease:u,duration:d}=n.accelerate,f=new Dr({element:this.current,name:t,keyframes:a,times:c,ease:u,duration:ue(d)}),h=i(f);this.valueSubscriptions.set(t,()=>{h(),f.cancel()});return}const s=Ze.has(t);s&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&_.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),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 Ft){const n=Ft[t];if(!n)continue;const{isEnabled:s,Feature:r}=n;if(!this.features[t]&&r&&s(this.props)&&(this.features[t]=new r(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):ee()}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<fi.length;s++){const r=fi[s];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const o="on"+r,i=t[o];i&&(this.propEventSubscriptions[r]=this.on(r,i))}this.prevMotionValues=hu(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=Je(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"&&(Fs(s)||Bs(s))?s=parseFloat(s):!du(s)&&me.test(n)&&(s=Zr(t,n)),this.setBaseTarget(t,ie(s)?s.get():s)),ie(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const i=Bn(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);i&&(s=i[t])}if(n&&s!==void 0)return s;const r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!ie(r)?r:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new un),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Xn.render(this.render)}}class mi extends yu{constructor(){super(...arguments),this.KeyframeResolver=Gc}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const s=t.style;return s?s[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;ie(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class De{constructor(t){this.isMounted=!1,this.node=t}update(){}}function pi({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function xu({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function bu(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 ns(e){return e===void 0||e===1}function ss({scale:e,scaleX:t,scaleY:n}){return!ns(e)||!ns(t)||!ns(n)}function _e(e){return ss(e)||gi(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function gi(e){return yi(e.x)||yi(e.y)}function yi(e){return e&&e!=="0%"}function _t(e,t,n){const s=e-n,r=t*s;return n+r}function xi(e,t,n,s,r){return r!==void 0&&(e=_t(e,r,s)),_t(e,n,s)+t}function rs(e,t=0,n=1,s,r){e.min=xi(e.min,t,n,s,r),e.max=xi(e.max,t,n,s,r)}function bi(e,{x:t,y:n}){rs(e.x,t.translate,t.scale,t.originPoint),rs(e.y,n.translate,n.scale,n.originPoint)}const vi=.999999999999,wi=1.0000000000001;function vu(e,t,n,s=!1){var a;const r=n.length;if(!r)return;t.x=t.y=1;let o,i;for(let c=0;c<r;c++){o=n[c],i=o.projectionDelta;const{visualElement:u}=o.options;u&&u.props.style&&u.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(we(e.x,-o.scroll.offset.x),we(e.y,-o.scroll.offset.y)),i&&(t.x*=i.x.scale,t.y*=i.y.scale,bi(e,i)),s&&_e(o.latestValues)&&Bt(e,o.latestValues,(a=o.layout)==null?void 0:a.layoutBox))}t.x<wi&&t.x>vi&&(t.x=1),t.y<wi&&t.y>vi&&(t.y=1)}function we(e,t){e.min+=t,e.max+=t}function ki(e,t,n,s,r=.5){const o=$(e.min,e.max,r);rs(e,t,n,o,s)}function Ti(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Bt(e,t,n){const s=n??e;ki(e.x,Ti(t.x,s.x),t.scaleX,t.scale,t.originX),ki(e.y,Ti(t.y,s.y),t.scaleY,t.scale,t.originY)}function ji(e,t){return pi(bu(e.getBoundingClientRect(),t))}function wu(e,t,n){const s=ji(e,n),{scroll:r}=t;return r&&(we(s.x,r.offset.x),we(s.y,r.offset.y)),s}const ku={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Tu=qe.length;function ju(e,t,n){let s="",r=!0;for(let o=0;o<Tu;o++){const i=qe[o],a=e[i];if(a===void 0)continue;let c=!0;if(typeof a=="number")c=a===(i.startsWith("scale")?1:0);else{const u=parseFloat(a);c=i.startsWith("scale")?u===1:u===0}if(!c||n){const u=Qr(a,Hn[i]);if(!c){r=!1;const d=ku[i]||i;s+=`${d}(${u}) `}n&&(t[i]=u)}}return s=s.trim(),n?s=n(t,r?"":s):r&&(s="none"),s}function is(e,t,n){const{style:s,vars:r,transformOrigin:o}=e;let i=!1,a=!1;for(const c in t){const u=t[c];if(Ze.has(c)){i=!0;continue}else if(ir(c)){r[c]=u;continue}else{const d=Qr(u,Hn[c]);c.startsWith("origin")?(a=!0,o[c]=d):s[c]=d}}if(t.transform||(i||n?s.transform=ju(t,e.transform,n):s.transform&&(s.transform="none")),a){const{originX:c="50%",originY:u="50%",originZ:d=0}=o;s.transformOrigin=`${c} ${u} ${d}`}}function Si(e,{style:t,vars:n},s,r){const o=e.style;let i;for(i in t)o[i]=t[i];r==null||r.applyProjectionStyles(o,s);for(i in n)o.setProperty(i,n[i])}function Ci(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ft={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(P.test(e))e=parseFloat(e);else return e;const n=Ci(e,t.target.x),s=Ci(e,t.target.y);return`${n}% ${s}%`}},Su={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,r=me.parse(e);if(r.length>5)return s;const o=me.createTransformer(e),i=typeof r[0]!="number"?1:0,a=n.x.scale*t.x,c=n.y.scale*t.y;r[0+i]/=a,r[1+i]/=c;const u=$(a,c,.5);return typeof r[2+i]=="number"&&(r[2+i]/=u),typeof r[3+i]=="number"&&(r[3+i]/=u),o(r)}},os={borderRadius:{...ft,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ft,borderTopRightRadius:ft,borderBottomLeftRadius:ft,borderBottomRightRadius:ft,boxShadow:Su};function Ai(e,{layout:t,layoutId:n}){return Ze.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!os[e]||e==="opacity")}function as(e,t,n){var i;const s=e.style,r=t==null?void 0:t.style,o={};if(!s)return o;for(const a in s)(ie(s[a])||r&&ie(r[a])||Ai(a,e)||((i=n==null?void 0:n.getValue(a))==null?void 0:i.liveStyle)!==void 0)&&(o[a]=s[a]);return o}function Cu(e){return window.getComputedStyle(e)}class Au extends mi{constructor(){super(...arguments),this.type="html",this.renderInstance=Si}readValueFromInstance(t,n){var s;if(Ze.has(n))return(s=this.projection)!=null&&s.isProjecting?Mn(n):Hl(t,n);{const r=Cu(t),o=(ir(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ji(t,n)}build(t,n,s){is(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return as(t,n,s)}}const Pu={offset:"stroke-dashoffset",array:"stroke-dasharray"},Nu={offset:"strokeDashoffset",array:"strokeDasharray"};function Eu(e,t,n=1,s=0,r=!0){e.pathLength=1;const o=r?Pu:Nu;e[o.offset]=`${-s}`,e[o.array]=`${t} ${n}`}const Mu=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Pi(e,{attrX:t,attrY:n,attrScale:s,pathLength:r,pathSpacing:o=1,pathOffset:i=0,...a},c,u,d){if(is(e,a,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h}=e;f.transform&&(h.transform=f.transform,delete f.transform),(h.transform||f.transformOrigin)&&(h.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),h.transform&&(h.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete f.transformBox);for(const m of Mu)f[m]!==void 0&&(h[m]=f[m],delete f[m]);t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),r!==void 0&&Eu(f,r,o,i,!1)}const Ni=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"]),Ei=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Vu(e,t,n,s){Si(e,t,void 0,s);for(const r in t.attrs)e.setAttribute(Ni.has(r)?r:Un(r),t.attrs[r])}function Mi(e,t,n){const s=as(e,t,n);for(const r in e)if(ie(e[r])||ie(t[r])){const o=qe.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;s[o]=e[r]}return s}class Du extends mi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ee}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ze.has(n)){const s=qr(n);return s&&s.default||0}return n=Ni.has(n)?n:Un(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return Mi(t,n,s)}build(t,n,s){Pi(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,r){Vu(t,n,s,r)}mount(t){this.isSVGTag=Ei(t.tagName),super.mount(t)}}const Lu=es.length;function Vi(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Vi(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Lu;n++){const s=es[n],r=e.props[s];(dt(r)||r===!1)&&(t[s]=r)}return t}function Di(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 Ru=[...Qn].reverse(),Iu=Qn.length;function Ou(e){return t=>Promise.all(t.map(({animation:n,options:s})=>Rc(e,n,s)))}function zu(e){let t=Ou(e),n=Li(),s=!0,r=!1;const o=u=>(d,f)=>{var m;const h=Fe(e,f,u==="exit"?(m=e.presenceContext)==null?void 0:m.custom:void 0);if(h){const{transition:g,transitionEnd:p,...y}=h;d={...d,...y,...p}}return d};function i(u){t=u(e)}function a(u){const{props:d}=e,f=Vi(e.parent)||{},h=[],m=new Set;let g={},p=1/0;for(let T=0;T<Iu;T++){const w=Ru[T],b=n[w],j=d[w]!==void 0?d[w]:f[w],S=dt(j),E=w===u?b.isActive:null;E===!1&&(p=T);let O=j===f[w]&&j!==d[w]&&S;if(O&&(s||r)&&e.manuallyAnimateOnMount&&(O=!1),b.protectedKeys={...g},!b.isActive&&E===null||!j&&!b.prevProp||Ot(j)||typeof j=="boolean")continue;if(w==="exit"&&b.isActive&&E!==!0){b.prevResolvedValues&&(g={...g,...b.prevResolvedValues});continue}const k=Fu(b.prevProp,j);let M=k||w===u&&b.isActive&&!O&&S||T>p&&S,V=!1;const F=Array.isArray(j)?j:[j];let B=F.reduce(o(w),{});E===!1&&(B={});const{prevResolvedValues:ce={}}=b,oe={...ce,...B},J=G=>{M=!0,m.has(G)&&(V=!0,m.delete(G)),b.needsAnimating[G]=!0;const ne=e.getValue(G);ne&&(ne.liveStyle=!1)};for(const G in oe){const ne=B[G],N=ce[G];if(g.hasOwnProperty(G))continue;let v=!1;$n(ne)&&$n(N)?v=!Di(ne,N):v=ne!==N,v?ne!=null?J(G):m.add(G):ne!==void 0&&m.has(G)?J(G):b.protectedKeys[G]=!0}b.prevProp=j,b.prevResolvedValues=B,b.isActive&&(g={...g,...B}),(s||r)&&e.blockInitialAnimation&&(M=!1);const W=O&&k;M&&(!W||V)&&h.push(...F.map(G=>{const ne={type:w};if(typeof G=="string"&&(s||r)&&!W&&e.manuallyAnimateOnMount&&e.parent){const{parent:N}=e,v=Fe(N,G);if(N.enteringChildren&&v){const{delayChildren:R}=v.transition||{};ne.delay=Or(N.enteringChildren,e,R)}}return{animation:G,options:ne}}))}if(m.size){const T={};if(typeof d.initial!="boolean"){const w=Fe(e,Array.isArray(d.initial)?d.initial[0]:d.initial);w&&w.transition&&(T.transition=w.transition)}m.forEach(w=>{const b=e.getBaseTarget(w),j=e.getValue(w);j&&(j.liveStyle=!0),T[w]=b??null}),h.push({animation:T})}let y=!!h.length;return s&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(y=!1),s=!1,r=!1,y?t(h):Promise.resolve()}function c(u,d){var h;if(n[u].isActive===d)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(m=>{var g;return(g=m.animationState)==null?void 0:g.setActive(u,d)}),n[u].isActive=d;const f=a(u);for(const m in n)n[m].protectedKeys={};return f}return{animateChanges:a,setActive:c,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Li(),r=!0}}}function Fu(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Di(t,e):!1}function Be(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Li(){return{animate:Be(!0),whileInView:Be(),whileHover:Be(),whileTap:Be(),whileDrag:Be(),whileFocus:Be(),exit:Be()}}function ls(e,t){e.min=t.min,e.max=t.max}function ge(e,t){ls(e.x,t.x),ls(e.y,t.y)}function Ri(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Ii=1e-4,_u=1-Ii,Bu=1+Ii,Oi=.01,$u=0-Oi,Wu=0+Oi;function le(e){return e.max-e.min}function Uu(e,t,n){return Math.abs(e-t)<=n}function zi(e,t,n,s=.5){e.origin=s,e.originPoint=$(t.min,t.max,e.origin),e.scale=le(n)/le(t),e.translate=$(n.min,n.max,e.origin)-e.originPoint,(e.scale>=_u&&e.scale<=Bu||isNaN(e.scale))&&(e.scale=1),(e.translate>=$u&&e.translate<=Wu||isNaN(e.translate))&&(e.translate=0)}function ht(e,t,n,s){zi(e.x,t.x,n.x,s?s.originX:void 0),zi(e.y,t.y,n.y,s?s.originY:void 0)}function Fi(e,t,n,s=0){const r=s?$(n.min,n.max,s):n.min;e.min=r+t.min,e.max=e.min+le(t)}function Gu(e,t,n,s){Fi(e.x,t.x,n.x,s==null?void 0:s.x),Fi(e.y,t.y,n.y,s==null?void 0:s.y)}function _i(e,t,n,s=0){const r=s?$(n.min,n.max,s):n.min;e.min=t.min-r,e.max=e.min+le(t)}function $t(e,t,n,s){_i(e.x,t.x,n.x,s==null?void 0:s.x),_i(e.y,t.y,n.y,s==null?void 0:s.y)}function Bi(e,t,n,s,r){return e-=t,e=_t(e,1/n,s),r!==void 0&&(e=_t(e,1/r,s)),e}function Ku(e,t=0,n=1,s=.5,r,o=e,i=e){if(ve.test(t)&&(t=parseFloat(t),t=$(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=$(o.min,o.max,s);e===o&&(a-=t),e.min=Bi(e.min,t,n,a,r),e.max=Bi(e.max,t,n,a,r)}function $i(e,t,[n,s,r],o,i){Ku(e,t[n],t[s],t[r],t.scale,o,i)}const Yu=["x","scaleX","originX"],Hu=["y","scaleY","originY"];function Wi(e,t,n,s){$i(e.x,t,Yu,n?n.x:void 0,s?s.x:void 0),$i(e.y,t,Hu,n?n.y:void 0,s?s.y:void 0)}function Ui(e){return e.translate===0&&e.scale===1}function Gi(e){return Ui(e.x)&&Ui(e.y)}function Ki(e,t){return e.min===t.min&&e.max===t.max}function Xu(e,t){return Ki(e.x,t.x)&&Ki(e.y,t.y)}function Yi(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Hi(e,t){return Yi(e.x,t.x)&&Yi(e.y,t.y)}function Xi(e){return le(e.x)/le(e.y)}function qi(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function ke(e){return[e("x"),e("y")]}function qu(e,t,n){let s="";const r=e.x.translate/t.x,o=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((r||o||i)&&(s=`translate3d(${r}px, ${o}px, ${i}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:f,rotateY:h,skewX:m,skewY:g}=n;u&&(s=`perspective(${u}px) ${s}`),d&&(s+=`rotate(${d}deg) `),f&&(s+=`rotateX(${f}deg) `),h&&(s+=`rotateY(${h}deg) `),m&&(s+=`skewX(${m}deg) `),g&&(s+=`skewY(${g}deg) `)}const a=e.x.scale*t.x,c=e.y.scale*t.y;return(a!==1||c!==1)&&(s+=`scale(${a}, ${c})`),s||"none"}const Zi=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],Zu=Zi.length,Ji=e=>typeof e=="string"?parseFloat(e):e,Qi=e=>typeof e=="number"||P.test(e);function Ju(e,t,n,s,r,o){r?(e.opacity=$(0,n.opacity??1,Qu(s)),e.opacityExit=$(t.opacity??1,0,ed(s))):o&&(e.opacity=$(t.opacity??1,n.opacity??1,s));for(let i=0;i<Zu;i++){const a=Zi[i];let c=eo(t,a),u=eo(n,a);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||Qi(c)===Qi(u)?(e[a]=Math.max($(Ji(c),Ji(u),s),0),(ve.test(u)||ve.test(c))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=$(t.rotate||0,n.rotate||0,s))}function eo(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Qu=to(0,.5,Zs),ed=to(.5,.95,fe);function to(e,t,n){return s=>s<e?0:s>t?1:n(it(e,t,s))}function td(e,t,n){const s=ie(e)?e:Je(e);return s.start(_n("",s,t,n)),s.animation}function mt(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}const nd=(e,t)=>e.depth-t.depth;class sd{constructor(){this.children=[],this.isDirty=!1}add(t){ln(this.children,t),this.isDirty=!0}remove(t){jt(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(nd),this.isDirty=!1,this.children.forEach(t)}}function rd(e,t){const n=ae.now(),s=({timestamp:r})=>{const o=r-n;o>=t&&(Ne(s),e(o-t))};return _.setup(s,!0),()=>Ne(s)}function Wt(e){return ie(e)?e.get():e}class id{constructor(){this.members=[]}add(t){ln(this.members,t);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===t||s===this.lead||s===this.prevLead)continue;const r=s.instance;(!r||r.isConnected===!1)&&!s.snapshot&&(jt(this.members,s),s.unmount())}t.scheduleRender()}remove(t){if(jt(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){var n;for(let s=this.members.indexOf(t)-1;s>=0;s--){const r=this.members[s];if(r.isPresent!==!1&&((n=r.instance)==null?void 0:n.isConnected)!==!1)return this.promote(r),!0}return!1}promote(t,n){var r;const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.updateSnapshot(),t.scheduleRender();const{layoutDependency:o}=s.options,{layoutDependency:i}=t.options;(o===void 0||o!==i)&&(t.resumeFrom=s,n&&(s.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),(r=t.root)!=null&&r.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,s,r,o,i;(s=(n=t.options).onExitComplete)==null||s.call(n),(i=(r=t.resumingFrom)==null?void 0:(o=r.options).onExitComplete)==null||i.call(o)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const Ut={hasAnimatedSinceResize:!0,hasEverUpdated:!1},cs=["","X","Y","Z"],od=1e3;let ad=0;function us(e,t,n,s){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),s&&(s[e]=0))}function no(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Ur(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",_,!(r||o))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&no(s)}function so({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:s,resetTransform:r}){return class{constructor(i={},a=t==null?void 0:t()){this.id=ad++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(ud),this.nodes.forEach(gd),this.nodes.forEach(yd),this.nodes.forEach(dd)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,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 c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new sd)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new un),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const c=this.eventHandlers.get(i);c&&c.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i){if(this.instance)return;this.isSVG=Jn(i)&&!cu(i),this.instance=i;const{layoutId:a,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),e){let d,f=0;const h=()=>this.root.updateBlockedByResize=!1;_.read(()=>{f=window.innerWidth}),e(i,()=>{const m=window.innerWidth;m!==f&&(f=m,this.root.updateBlockedByResize=!0,d&&d(),d=rd(h,250),Ut.hasAnimatedSinceResize&&(Ut.hasAnimatedSinceResize=!1,this.nodes.forEach(oo)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||kd,{onLayoutAnimationStart:p,onLayoutAnimationComplete:y}=u.getProps(),T=!this.targetLayout||!Hi(this.targetLayout,m),w=!f&&h;if(this.options.layoutRoot||this.resumeFrom||w||f&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const b={...Fn(g,"layout"),onPlay:p,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b),this.setAnimationOrigin(d,w)}else f||oo(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ne(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(xd),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&no(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,(typeof f.latestValues.x=="string"||typeof f.latestValues.y=="string")&&(f.isLayoutDirty=!0),f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(hd),this.nodes.forEach(ro);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(io);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(md),this.nodes.forEach(pd),this.nodes.forEach(ld),this.nodes.forEach(cd)):this.nodes.forEach(io),this.clearAllSnapshots();const a=ae.now();re.delta=be(0,1e3/60,a-re.timestamp),re.timestamp=a,re.isProcessing=!0,mn.update.process(re),mn.preRender.process(re),mn.render.process(re),re.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Xn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(fd),this.sharedNodes.forEach(bd)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,_.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){_.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!le(this.snapshot.measuredBox.x)&&!le(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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=ee()),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,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a&&this.instance){const c=s(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!r)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Gi(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;i&&this.instance&&(a||_e(this.latestValues)||d)&&(r(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return i&&(c=this.removeTransform(c)),Td(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:i}=this.options;if(!i)return ee();const a=i.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(jd))){const{scroll:d}=this.root;d&&(we(a.x,d.offset.x),we(a.y,d.offset.y))}return a}removeElementScroll(i){var c;const a=ee();if(ge(a,i),(c=this.scroll)!=null&&c.wasRoot)return a;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:f,options:h}=d;d!==this.root&&f&&h.layoutScroll&&(f.wasRoot&&ge(a,i),we(a.x,f.offset.x),we(a.y,f.offset.y))}return a}applyTransform(i,a=!1,c){var d,f;const u=c||ee();ge(u,i);for(let h=0;h<this.path.length;h++){const m=this.path[h];!a&&m.options.layoutScroll&&m.scroll&&m!==m.root&&(we(u.x,-m.scroll.offset.x),we(u.y,-m.scroll.offset.y)),_e(m.latestValues)&&Bt(u,m.latestValues,(d=m.layout)==null?void 0:d.layoutBox)}return _e(this.latestValues)&&Bt(u,this.latestValues,(f=this.layout)==null?void 0:f.layoutBox),u}removeTransform(i){var c;const a=ee();ge(a,i);for(let u=0;u<this.path.length;u++){const d=this.path[u];if(!_e(d.latestValues))continue;let f;d.instance&&(ss(d.latestValues)&&d.updateSnapshot(),f=ee(),ge(f,d.measurePageBox())),Wi(a,d.latestValues,(c=d.snapshot)==null?void 0:c.layoutBox,f)}return _e(this.latestValues)&&Wi(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.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!==re.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var m;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!this.layout||!(d||f))return;this.resolvedRelativeTargetAt=re.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=ee(),this.targetWithTransforms=ee()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Gu(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):ge(this.target,this.layout.layoutBox),bi(this.target,this.targetDelta)):ge(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||ss(this.parent.latestValues)||gi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(i,a,c){this.relativeParent=i,this.linkedParentVersion=i.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ee(),this.relativeTargetOrigin=ee(),$t(this.relativeTargetOrigin,a,c,this.options.layoutAnchor||void 0),ge(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var g;const i=this.getLead(),a=!!this.resumingFrom||this!==i;let c=!0;if((this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===re.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=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||d))return;ge(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;vu(this.layoutCorrected,this.treeScale,this.path,a),i.layout&&!i.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(i.target=i.layout.layoutBox,i.targetWithTransforms=ee());const{target:m}=i;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ri(this.prevProjectionDelta.x,this.projectionDelta.x),Ri(this.prevProjectionDelta.y,this.projectionDelta.y)),ht(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!qi(this.projectionDelta.x,this.prevProjectionDelta.x)||!qi(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),i){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=et(),this.projectionDelta=et(),this.projectionDeltaWithTransform=et()}setAnimationOrigin(i,a=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},f=et();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=ee(),m=c?c.source:void 0,g=this.layout?this.layout.source:void 0,p=m!==g,y=this.getStack(),T=!y||y.members.length<=1,w=!!(p&&!T&&this.options.crossfade===!0&&!this.path.some(wd));this.animationProgress=0;let b;this.mixTargetDelta=j=>{const S=j/1e3;ao(f.x,i.x,S),ao(f.y,i.y,S),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($t(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),vd(this.relativeTarget,this.relativeTargetOrigin,h,S),b&&Xu(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=ee()),ge(b,this.relativeTarget)),p&&(this.animationValues=d,Ju(d,u,this.latestValues,S,w,T)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){var a,c,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(Ne(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=_.update(()=>{Ut.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Je(0)),this.motionValue.jump(0,!1),this.currentAnimation=td(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),i.onUpdate&&i.onUpdate(d)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.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 i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(od),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:c,layout:u,latestValues:d}=i;if(!(!a||!c||!u)){if(this!==i&&this.layout&&u&&ho(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||ee();const f=le(this.layout.layoutBox.x);c.x.min=i.target.x.min,c.x.max=c.x.min+f;const h=le(this.layout.layoutBox.y);c.y.min=i.target.y.min,c.y.max=c.y.min+h}ge(a,c),Bt(a,d),ht(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new id),this.sharedNodes.get(i).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 i=this.getStack();return i?i.lead===this:!0}getLead(){var a;const{layoutId:i}=this.options;return i?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:i}=this.options;return i?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:c}=i;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const u={};c.z&&us("z",i,u,this.animationValues);for(let d=0;d<cs.length;d++)us(`rotate${cs[d]}`,i,u,this.animationValues),us(`skew${cs[d]}`,i,u,this.animationValues);i.render();for(const d in u)i.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);i.scheduleRender()}applyProjectionStyles(i,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){i.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,i.visibility="",i.opacity="",i.pointerEvents=Wt(a==null?void 0:a.pointerEvents)||"",i.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(i.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,i.pointerEvents=Wt(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!_e(this.latestValues)&&(i.transform=c?c({},""):"none",this.hasProjected=!1);return}i.visibility="";const d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=qu(this.projectionDeltaWithTransform,this.treeScale,d);c&&(f=c(d,f)),i.transform=f;const{x:h,y:m}=this.projectionDelta;i.transformOrigin=`${h.origin*100}% ${m.origin*100}% 0`,u.animationValues?i.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:i.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const g in os){if(d[g]===void 0)continue;const{correct:p,applyTo:y,isCSSVariable:T}=os[g],w=f==="none"?d[g]:p(d[g],u);if(y){const b=y.length;for(let j=0;j<b;j++)i[y[j]]=w}else T?this.options.visualElement.renderState.vars[g]=w:i[g]=w}this.options.layoutId&&(i.pointerEvents=u===this?Wt(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(ro),this.root.sharedNodes.clear()}}}function ld(e){e.updateLayout()}function cd(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:r}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;if(o==="size")ke(f=>{const h=i?t.measuredBox[f]:t.layoutBox[f],m=le(h);h.min=s[f].min,h.max=h.min+m});else if(o==="x"||o==="y"){const f=o==="x"?"y":"x";ls(i?t.measuredBox[f]:t.layoutBox[f],s[f])}else ho(o,t.layoutBox,s)&&ke(f=>{const h=i?t.measuredBox[f]:t.layoutBox[f],m=le(s[f]);h.max=h.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+m)});const a=et();ht(a,s,t.layoutBox);const c=et();i?ht(c,e.applyTransform(r,!0),t.measuredBox):ht(c,s,t.layoutBox);const u=!Gi(a);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:m}=f;if(h&&m){const g=e.options.layoutAnchor||void 0,p=ee();$t(p,t.layoutBox,h.layoutBox,g);const y=ee();$t(y,s,m.layoutBox,g),Hi(p,y)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=p,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:t,delta:c,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function ud(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 dd(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function fd(e){e.clearSnapshot()}function ro(e){e.clearMeasurements()}function hd(e){e.isLayoutDirty=!0,e.updateLayout()}function io(e){e.isLayoutDirty=!1}function md(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function pd(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function oo(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function gd(e){e.resolveTargetDelta()}function yd(e){e.calcProjection()}function xd(e){e.resetSkewAndRotation()}function bd(e){e.removeLeadSnapshot()}function ao(e,t,n){e.translate=$(t.translate,0,n),e.scale=$(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function lo(e,t,n,s){e.min=$(t.min,n.min,s),e.max=$(t.max,n.max,s)}function vd(e,t,n,s){lo(e.x,t.x,n.x,s),lo(e.y,t.y,n.y,s)}function wd(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const kd={duration:.45,ease:[.4,0,.1,1]},co=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),uo=co("applewebkit/")&&!co("chrome/")?Math.round:fe;function fo(e){e.min=uo(e.min),e.max=uo(e.max)}function Td(e){fo(e.x),fo(e.y)}function ho(e,t,n){return e==="position"||e==="preserve-aspect"&&!Uu(Xi(t),Xi(n),.2)}function jd(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Sd=so({attachResizeListener:(e,t)=>mt(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),ds={current:void 0},mo=so({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ds.current){const e=new Sd({});e.mount(window),e.setOptions({layoutScroll:!0}),ds.current=e}return ds.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),fs=x.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function po(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Cd(...e){return t=>{let n=!1;const s=e.map(r=>{const o=po(r,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let r=0;r<s.length;r++){const o=s[r];typeof o=="function"?o():po(e[r],null)}}}}function Ad(...e){return bt.useCallback(Cd(...e),e)}class Pd extends bt.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(Dt(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const s=n.offsetParent,r=Dt(s)&&s.offsetWidth||0,o=Dt(s)&&s.offsetHeight||0,i=getComputedStyle(n),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=n.offsetTop,a.left=n.offsetLeft,a.right=r-a.width-a.left,a.bottom=o-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Nd({children:e,isPresent:t,anchorX:n,anchorY:s,root:r,pop:o}){var h;const i=x.useId(),a=x.useRef(null),c=x.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=x.useContext(fs),d=((h=e.props)==null?void 0:h.ref)??(e==null?void 0:e.ref),f=Ad(a,d);return x.useInsertionEffect(()=>{const{width:m,height:g,top:p,left:y,right:T,bottom:w}=c.current;if(t||o===!1||!a.current||!m||!g)return;const b=n==="left"?`left: ${y}`:`right: ${T}`,j=s==="bottom"?`bottom: ${w}`:`top: ${p}`;a.current.dataset.motionPopId=i;const S=document.createElement("style");u&&(S.nonce=u);const E=r??document.head;return E.appendChild(S),S.sheet&&S.sheet.insertRule(`
143
+ [data-motion-pop-id="${i}"] {
144
+ position: absolute !important;
145
+ width: ${m}px !important;
146
+ height: ${g}px !important;
147
+ ${b}px !important;
148
+ ${j}px !important;
149
+ }
150
+ `),()=>{var O;(O=a.current)==null||O.removeAttribute("data-motion-pop-id"),E.contains(S)&&E.removeChild(S)}},[t]),l.jsx(Pd,{isPresent:t,childRef:a,sizeRef:c,pop:o,children:o===!1?e:bt.cloneElement(e,{ref:f})})}const Ed=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:r,presenceAffectsLayout:o,mode:i,anchorX:a,anchorY:c,root:u})=>{const d=an(Md),f=x.useId();let h=!0,m=x.useMemo(()=>(h=!1,{id:f,initial:t,isPresent:n,custom:r,onExitComplete:g=>{d.set(g,!0);for(const p of d.values())if(!p)return;s&&s()},register:g=>(d.set(g,!1),()=>d.delete(g))}),[n,d,s]);return o&&h&&(m={...m}),x.useMemo(()=>{d.forEach((g,p)=>d.set(p,!1))},[n]),bt.useEffect(()=>{!n&&!d.size&&s&&s()},[n]),e=l.jsx(Nd,{pop:i==="popLayout",isPresent:n,anchorX:a,anchorY:c,root:u,children:e}),l.jsx(Tt.Provider,{value:m,children:e})};function Md(){return new Map}function go(e=!0){const t=x.useContext(Tt);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:r}=t,o=x.useId();x.useEffect(()=>{if(e)return r(o)},[e]);const i=x.useCallback(()=>e&&s&&s(o),[o,s,e]);return!n&&s?[!1,i]:[!0]}const Gt=e=>e.key||"";function yo(e){const t=[];return x.Children.forEach(e,n=>{x.isValidElement(n)&&t.push(n)}),t}const de=({children:e,custom:t,initial:n=!0,onExitComplete:s,presenceAffectsLayout:r=!0,mode:o="sync",propagate:i=!1,anchorX:a="left",anchorY:c="top",root:u})=>{const[d,f]=go(i),h=x.useMemo(()=>yo(e),[e]),m=i&&!d?[]:h.map(Gt),g=x.useRef(!0),p=x.useRef(h),y=an(()=>new Map),T=x.useRef(new Set),[w,b]=x.useState(h),[j,S]=x.useState(h);zs(()=>{g.current=!1,p.current=h;for(let k=0;k<j.length;k++){const M=Gt(j[k]);m.includes(M)?(y.delete(M),T.current.delete(M)):y.get(M)!==!0&&y.set(M,!1)}},[j,m.length,m.join("-")]);const E=[];if(h!==w){let k=[...h];for(let M=0;M<j.length;M++){const V=j[M],F=Gt(V);m.includes(F)||(k.splice(M,0,V),E.push(V))}return o==="wait"&&E.length&&(k=E),S(yo(k)),b(h),null}process.env.NODE_ENV!=="production"&&o==="wait"&&j.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:O}=x.useContext(on);return l.jsx(l.Fragment,{children:j.map(k=>{const M=Gt(k),V=i&&!d?!1:h===j||m.includes(M),F=()=>{if(T.current.has(M))return;if(y.has(M))T.current.add(M),y.set(M,!0);else return;let B=!0;y.forEach(ce=>{ce||(B=!1)}),B&&(O==null||O(),S(p.current),i&&(f==null||f()),s&&s())};return l.jsx(Ed,{isPresent:V,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:r,mode:o,root:u,onExitComplete:V?void 0:F,anchorX:a,anchorY:c,children:k},M)})})},xo=x.createContext({strict:!1}),bo={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let vo=!1;function Vd(){if(vo)return;const e={};for(const t in bo)e[t]={isEnabled:n=>bo[t].some(s=>!!n[s])};hi(e),vo=!0}function wo(){return Vd(),gu()}function Dd(e){const t=wo();for(const n in e)t[n]={...t[n],...e[n]};hi(t)}const Ld=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","propagate","ignoreStrict","viewport"]);function Kt(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Ld.has(e)}let ko=e=>!Kt(e);function Rd(e){typeof e=="function"&&(ko=t=>t.startsWith("on")?!Kt(t):e(t))}try{Rd(require("@emotion/is-prop-valid").default)}catch{}function Id(e,t,n){const s={};for(const r in e)r==="values"&&typeof e.values=="object"||ie(e[r])||(ko(r)||n===!0&&Kt(r)||!t&&!Kt(r)||e.draggable&&r.startsWith("onDrag"))&&(s[r]=e[r]);return s}const Yt=x.createContext({});function Od(e,t){if(zt(e)){const{initial:n,animate:s}=e;return{initial:n===!1||dt(n)?n:void 0,animate:dt(s)?s:void 0}}return e.inherit!==!1?t:{}}function zd(e){const{initial:t,animate:n}=Od(e,x.useContext(Yt));return x.useMemo(()=>({initial:t,animate:n}),[To(t),To(n)])}function To(e){return Array.isArray(e)?e.join(" "):e}const hs=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function jo(e,t,n){for(const s in t)!ie(t[s])&&!Ai(s,n)&&(e[s]=t[s])}function Fd({transformTemplate:e},t){return x.useMemo(()=>{const n=hs();return is(n,t,e),Object.assign({},n.vars,n.style)},[t])}function _d(e,t){const n=e.style||{},s={};return jo(s,n,e),Object.assign(s,Fd(e,t)),s}function Bd(e,t){const n={},s=_d(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 So=()=>({...hs(),attrs:{}});function $d(e,t,n,s){const r=x.useMemo(()=>{const o=So();return Pi(o,t,Ei(s),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};jo(o,e.style,e),r.style={...o,...r.style}}return r}const Wd=["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 ms(e){return typeof e!="string"||e.includes("-")?!1:!!(Wd.indexOf(e)>-1||/[A-Z]/u.test(e))}function Ud(e,t,n,{latestValues:s},r,o=!1,i){const c=(i??ms(e)?$d:Bd)(t,s,r,e),u=Id(t,typeof e=="string",o),d=e!==x.Fragment?{...u,...c,ref:n}:{},{children:f}=t,h=x.useMemo(()=>ie(f)?f.get():f,[f]);return x.createElement(e,{...d,children:h})}function Gd({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,r){return{latestValues:Kd(n,s,r,e),renderState:t()}}function Kd(e,t,n,s){const r={},o=s(e,{});for(const h in o)r[h]=Wt(o[h]);let{initial:i,animate:a}=e;const c=zt(e),u=ui(e);t&&u&&!c&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||i===!1;const f=d?a:i;if(f&&typeof f!="boolean"&&!Ot(f)){const h=Array.isArray(f)?f:[f];for(let m=0;m<h.length;m++){const g=Bn(e,h[m]);if(g){const{transitionEnd:p,transition:y,...T}=g;for(const w in T){let b=T[w];if(Array.isArray(b)){const j=d?b.length-1:0;b=b[j]}b!==null&&(r[w]=b)}for(const w in p)r[w]=p[w]}}}return r}const Co=e=>(t,n)=>{const s=x.useContext(Yt),r=x.useContext(Tt),o=()=>Gd(e,t,s,r);return n?o():an(o)},Yd=Co({scrapeMotionValuesFromProps:as,createRenderState:hs}),Hd=Co({scrapeMotionValuesFromProps:Mi,createRenderState:So}),Xd=Symbol.for("motionComponentSymbol");function qd(e,t,n){const s=x.useRef(n);x.useInsertionEffect(()=>{s.current=n});const r=x.useRef(null);return x.useCallback(o=>{var a;o&&((a=e.onMount)==null||a.call(e,o));const i=s.current;if(typeof i=="function")if(o){const c=i(o);typeof c=="function"&&(r.current=c)}else r.current?(r.current(),r.current=null):i(o);else i&&(i.current=o);t&&(o?t.mount(o):t.unmount())},[t])}const Ao=x.createContext({});function tt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Zd(e,t,n,s,r,o){var b,j;const{visualElement:i}=x.useContext(Yt),a=x.useContext(xo),c=x.useContext(Tt),u=x.useContext(fs),d=u.reducedMotion,f=u.skipAnimations,h=x.useRef(null),m=x.useRef(!1);s=s||a.renderer,!h.current&&s&&(h.current=s(e,{visualState:t,parent:i,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d,skipAnimations:f,isSVG:o}),m.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const g=h.current,p=x.useContext(Ao);g&&!g.projection&&r&&(g.type==="html"||g.type==="svg")&&Jd(h.current,n,r,p);const y=x.useRef(!1);x.useInsertionEffect(()=>{g&&y.current&&g.update(n,c)});const T=n[Wr],w=x.useRef(!!T&&typeof window<"u"&&!((b=window.MotionHandoffIsComplete)!=null&&b.call(window,T))&&((j=window.MotionHasOptimisedAnimation)==null?void 0:j.call(window,T)));return zs(()=>{m.current=!0,g&&(y.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),w.current&&g.animationState&&g.animationState.animateChanges())}),x.useEffect(()=>{g&&(!w.current&&g.animationState&&g.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)==null||S.call(window,T)}),w.current=!1),g.enteringChildren=void 0)}),g}function Jd(e,t,n,s){const{layoutId:r,layout:o,drag:i,dragConstraints:a,layoutScroll:c,layoutRoot:u,layoutAnchor:d,layoutCrossfade:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Po(e.parent)),e.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:!!i||a&&tt(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:f,layoutScroll:c,layoutRoot:u,layoutAnchor:d})}function Po(e){if(e)return e.options.allowProjection!==!1?e.projection:Po(e.parent)}function ps(e,{forwardMotionProps:t=!1,type:n}={},s,r){s&&Dd(s);const o=n?n==="svg":ms(e),i=o?Hd:Yd;function a(u,d){let f;const h={...x.useContext(fs),...u,layoutId:Qd(u)},{isStatic:m}=h,g=zd(u),p=i(u,m);if(!m&&typeof window<"u"){ef(h,s);const y=tf(h);f=y.MeasureLayout,g.visualElement=Zd(e,p,h,r,y.ProjectionNode,o)}return l.jsxs(Yt.Provider,{value:g,children:[f&&g.visualElement?l.jsx(f,{visualElement:g.visualElement,...h}):null,Ud(e,u,qd(p,g.visualElement,d),p,m,t,o)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=x.forwardRef(a);return c[Xd]=e,c}function Qd({layoutId:e}){const t=x.useContext(on).id;return t&&e!==void 0?t+"-"+e:e}function ef(e,t){const n=x.useContext(xo).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?Ge(!1,s,"lazy-strict-mode"):je(!1,s,"lazy-strict-mode")}}function tf(e){const t=wo(),{drag:n,layout:s}=t;if(!n&&!s)return{};const r={...n,...s};return{MeasureLayout:n!=null&&n.isEnabled(e)||s!=null&&s.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function nf(e,t){if(typeof Proxy>"u")return ps;const n=new Map,s=(o,i)=>ps(o,i,e,t),r=(o,i)=>(process.env.NODE_ENV!=="production"&&dn(!1,"motion() is deprecated. Use motion.create() instead."),s(o,i));return new Proxy(r,{get:(o,i)=>i==="create"?s:(n.has(i)||n.set(i,ps(i,void 0,e,t)),n.get(i))})}const sf=(e,t)=>t.isSVG??ms(e)?new Du(t):new Au(t,{allowProjection:e!==x.Fragment});class rf extends De{constructor(t){super(t),t.animationState||(t.animationState=zu(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ot(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let of=0;class af extends De{constructor(){super(...arguments),this.id=of++,this.isExitComplete=!1}update(){var o;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;if(t&&s===!1){if(this.isExitComplete){const{initial:i,custom:a}=this.node.getProps();if(typeof i=="string"){const c=Fe(this.node,i,a);if(c){const{transition:u,transitionEnd:d,...f}=c;for(const h in f)(o=this.node.getValue(h))==null||o.jump(f[h])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.then(()=>{this.isExitComplete=!0,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 pt(e){return{point:{x:e.pageX,y:e.pageY}}}const cf=e=>t=>qn(t)&&e(t,pt(t));function gt(e,t,n,s){return mt(e,t,cf(n),s)}const No=({current:e})=>e?e.ownerDocument.defaultView:null,Eo=(e,t)=>Math.abs(e-t);function uf(e,t){const n=Eo(e.x,t.x),s=Eo(e.y,t.y);return Math.sqrt(n**2+s**2)}const Mo=new Set(["auto","scroll"]);class Vo{constructor(t,n,{transformPagePoint:s,contextWindow:r=window,dragSnapToOrigin:o=!1,distanceThreshold:i=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Ht(this.lastRawMoveEventInfo,this.transformPagePoint));const m=gs(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,p=uf(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!p)return;const{point:y}=m,{timestamp:T}=re;this.history.push({...y,timestamp:T});const{onStart:w,onMove:b}=this.handlers;g||(w&&w(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastRawMoveEventInfo=g,this.lastMoveEventInfo=Ht(g,this.transformPagePoint),_.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:p,onSessionEnd:y,resumeAnimation:T}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&T&&T(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=gs(m.type==="pointercancel"?this.lastMoveEventInfo:Ht(g,this.transformPagePoint),this.history);this.startEvent&&p&&p(m,w),y&&y(m,w)},!qn(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=i,this.contextWindow=r||window;const c=pt(t),u=Ht(c,this.transformPagePoint),{point:d}=u,{timestamp:f}=re;this.history=[{...d,timestamp:f}];const{onSessionStart:h}=n;h&&h(t,gs(u,this.history)),this.removeListeners=rt(gt(this.contextWindow,"pointermove",this.handlePointerMove),gt(this.contextWindow,"pointerup",this.handlePointerUp),gt(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const s=getComputedStyle(n);(Mo.has(s.overflowX)||Mo.has(s.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const s=t===window,r=s?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o={x:r.x-n.x,y:r.y-n.y};o.x===0&&o.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(t,r),_.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ne(this.updatePoint)}}function Ht(e,t){return t?{point:t(e.point)}:e}function Do(e,t){return{x:e.x-t.x,y:e.y-t.y}}function gs({point:e},t){return{point:e,delta:Do(e,Lo(t)),offset:Do(e,df(t)),velocity:ff(t,.1)}}function df(e){return e[0]}function Lo(e){return e[e.length-1]}function ff(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,s=null;const r=Lo(e);for(;n>=0&&(s=e[n],!(r.timestamp-s.timestamp>ue(t)));)n--;if(!s)return{x:0,y:0};s===e[0]&&e.length>2&&r.timestamp-s.timestamp>ue(t)*2&&(s=e[1]);const o=he(r.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const i={x:(r.x-s.x)/o,y:(r.y-s.y)/o};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function hf(e,{min:t,max:n},s){return t!==void 0&&e<t?e=s?$(t,e,s.min):Math.max(e,t):n!==void 0&&e>n&&(e=s?$(n,e,s.max):Math.min(e,n)),e}function Ro(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 mf(e,{top:t,left:n,bottom:s,right:r}){return{x:Ro(e.x,n,r),y:Ro(e.y,t,s)}}function Io(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 pf(e,t){return{x:Io(e.x,t.x),y:Io(e.y,t.y)}}function gf(e,t){let n=.5;const s=le(e),r=le(t);return r>s?n=it(t.min,t.max-s,e.min):s>r&&(n=it(e.min,e.max-r,t.min)),be(0,1,n)}function yf(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 ys=.35;function xf(e=ys){return e===!1?e=0:e===!0&&(e=ys),{x:Oo(e,"left","right"),y:Oo(e,"top","bottom")}}function Oo(e,t,n){return{min:zo(e,t),max:zo(e,n)}}function zo(e,t){return typeof e=="number"?e:e[t]||0}const bf=new WeakMap;class vf{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=ee(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=f=>{n&&this.snapToCursor(pt(f).point),this.stopAnimation()},i=(f,h)=>{const{drag:m,dragPropagation:g,onDragStart:p}=this.getProps();if(m&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Kc(m),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ke(T=>{let w=this.getAxisMotionValue(T).get()||0;if(ve.test(w)){const{projection:b}=this.visualElement;if(b&&b.layout){const j=b.layout.layoutBox[T];j&&(w=le(j)*(parseFloat(w)/100))}}this.originPoint[T]=w}),p&&_.update(()=>p(f,h),!1,!0),Wn(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h;const{dragPropagation:m,dragDirectionLock:g,onDirectionLock:p,onDrag:y}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:T}=h;if(g&&this.currentDirection===null){this.currentDirection=kf(T),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",h.point,T),this.updateAxis("y",h.point,T),this.visualElement.render(),y&&_.update(()=>y(f,h),!1,!0)},c=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h,this.stop(f,h),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new Vo(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:s,contextWindow:No(this.visualElement),element:this.visualElement.current})}stop(t,n){const s=t||this.latestPointerEvent,r=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!r||!s)return;const{velocity:i}=r;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&_.postRender(()=>a(s,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,s){const{drag:r}=this.getProps();if(!s||!Xt(t,r,this.currentDirection))return;const o=this.getAxisMotionValue(t);let i=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(i=hf(i,this.constraints[t],this.elastic[t])),o.set(i)}resolveConstraints(){var o;const{dragConstraints:t,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,r=this.constraints;t&&tt(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=mf(s.layoutBox,t):this.constraints=!1,this.elastic=xf(n),r!==this.constraints&&!tt(t)&&s&&this.constraints&&!this.hasMutatedConstraints&&ke(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=yf(s.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!tt(t))return!1;const s=t.current;je(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:r}=this.visualElement;if(!r||!r.layout)return!1;const o=wu(s,r.root,this.visualElement.getTransformPagePoint());let i=pf(r.layout.layoutBox,o);if(n){const a=n(xu(i));this.hasMutatedConstraints=!!a,a&&(i=pi(a))}return i}startAnimation(t){const{drag:n,dragMomentum:s,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},u=ke(d=>{if(!Xt(d,n,this.currentDirection))return;let f=c&&c[d]||{};(i===!0||i===d)&&(f={min:0,max:0});const h=r?200:1e6,m=r?40:1e7,g={type:"inertia",velocity:s?t[d]:0,bounceStiffness:h,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(d,g)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const s=this.getAxisMotionValue(t);return Wn(this.visualElement,t),s.start(_n(t,s,0,n,this.visualElement,!1))}stopAnimation(){ke(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),r=s[n];return r||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){ke(n=>{const{drag:s}=this.getProps();if(!Xt(n,s,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(n);if(r&&r.layout){const{min:i,max:a}=r.layout.layoutBox[n],c=o.get()||0;o.set(t[n]-$(i,a,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!tt(n)||!s||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};ke(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const c=a.get();r[i]=gf({min:c,max:c},this.constraints[i])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.constraints=!1,this.resolveConstraints(),ke(i=>{if(!Xt(i,t,null))return;const a=this.getAxisMotionValue(i),{min:c,max:u}=this.constraints[i];a.set($(c,u,r[i]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;bf.set(this.visualElement,this);const t=this.visualElement.current,n=gt(t,"pointerdown",u=>{const{drag:d,dragListener:f=!0}=this.getProps(),h=u.target,m=h!==t&&Jc(h);d&&f&&!m&&this.start(u)});let s;const r=()=>{const{dragConstraints:u}=this.getProps();tt(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),s||(s=wf(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),_.read(r);const a=mt(window,"resize",()=>this.scalePositionWithinConstraints()),c=o.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(ke(f=>{const h=this.getAxisMotionValue(f);h&&(this.originPoint[f]+=u[f].translate,h.set(h.get()+u[f].translate))}),this.visualElement.render())}));return()=>{a(),n(),i(),c&&c(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=ys,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:s,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function Fo(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function wf(e,t,n){const s=ai(e,Fo(n)),r=ai(t,Fo(n));return()=>{s(),r()}}function Xt(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function kf(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Tf extends De{constructor(t){super(t),this.removeGroupControls=fe,this.removeListeners=fe,this.controls=new vf(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||fe}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const xs=e=>(t,n)=>{e&&_.update(()=>e(t,n),!1,!0)};class jf extends De{constructor(){super(...arguments),this.removePointerDownListener=fe}onPointerDown(t){this.session=new Vo(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:No(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:s,onPanEnd:r}=this.node.getProps();return{onSessionStart:xs(t),onStart:xs(n),onMove:xs(s),onEnd:(o,i)=>{delete this.session,r&&_.postRender(()=>r(o,i))}}}mount(){this.removePointerDownListener=gt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let bs=!1;class Sf extends x.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s,layoutId:r}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),s&&s.register&&r&&s.register(o),bs&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Ut.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:s,drag:r,isPresent:o}=this.props,{projection:i}=s;return i&&(i.isPresent=o,t.layoutDependency!==n&&i.setOptions({...i.options,layoutDependency:n}),bs=!0,r||t.layoutDependency!==n||n===void 0||t.isPresent!==o?i.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?i.promote():i.relegate()||_.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:s}=t;s&&(s.options.layoutAnchor=n,s.root.didUpdate(),Xn.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:r}=t;bs=!0,r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),s&&s.deregister&&s.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function _o(e){const[t,n]=go(),s=x.useContext(on);return l.jsx(Sf,{...e,layoutGroup:s,switchLayoutGroup:x.useContext(Ao),isPresent:t,safeToRemove:n})}const Cf={pan:{Feature:jf},drag:{Feature:Tf,ProjectionNode:mo,MeasureLayout:_o}};function Bo(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,o=s[r];o&&_.postRender(()=>o(t,pt(t)))}class Af extends De{mount(){const{current:t}=this.node;t&&(this.unmount=Hc(t,(n,s)=>(Bo(this.node,s,"Start"),r=>Bo(this.node,r,"End"))))}unmount(){}}class Pf extends De{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=rt(mt(this.node.current,"focus",()=>this.onFocus()),mt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function $o(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 r="onTap"+(n==="End"?"":n),o=s[r];o&&_.postRender(()=>o(t,pt(t)))}class Nf extends De{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=eu(t,(r,o)=>($o(this.node,o,"Start"),(i,{success:a})=>$o(this.node,i,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(s==null?void 0:s.tap)===!1})}unmount(){}}const vs=new WeakMap,ws=new WeakMap,Ef=e=>{const t=vs.get(e.target);t&&t(e)},Mf=e=>{e.forEach(Ef)};function Vf({root:e,...t}){const n=e||document;ws.has(n)||ws.set(n,{});const s=ws.get(n),r=JSON.stringify(t);return s[r]||(s[r]=new IntersectionObserver(Mf,{root:e,...t})),s[r]}function Df(e,t,n){const s=Vf(t);return vs.set(e,n),s.observe(e),()=>{vs.delete(e),s.unobserve(e)}}const Lf={some:0,all:1};class Rf extends De{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var c;(c=this.stopObserver)==null||c.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:r="some",once:o}=t,i={root:n?n.current:void 0,rootMargin:s,threshold:typeof r=="number"?r:Lf[r]},a=u=>{const{isIntersecting:d}=u;if(this.isInView===d||(this.isInView=d,o&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:f,onViewportLeave:h}=this.node.getProps(),m=d?f:h;m&&m(u)};this.stopObserver=Df(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(If(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function If({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Of={...lf,...{inView:{Feature:Rf},tap:{Feature:Nf},focus:{Feature:Pf},hover:{Feature:Af}},...Cf,...{layout:{ProjectionNode:mo,MeasureLayout:_o}}},z=nf(Of,sf);function Wo(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Wo(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function zf(){for(var e,t,n=0,s="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Wo(e))&&(s&&(s+=" "),s+=t);return s}const Ff=(e,t)=>{const n=new Array(e.length+t.length);for(let s=0;s<e.length;s++)n[s]=e[s];for(let s=0;s<t.length;s++)n[e.length+s]=t[s];return n},_f=(e,t)=>({classGroupId:e,validator:t}),Uo=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),qt="-",Go=[],Bf="arbitrary..",$f=e=>{const t=Uf(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Wf(i);const a=i.split(qt),c=a[0]===""&&a.length>1?1:0;return Ko(a,c,t)},getConflictingClassGroupIds:(i,a)=>{if(a){const c=s[i],u=n[i];return c?u?Ff(u,c):c:u||Go}return n[i]||Go}}},Ko=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const r=e[t],o=n.nextPart.get(r);if(o){const u=Ko(e,t+1,o);if(u)return u}const i=n.validators;if(i===null)return;const a=t===0?e.join(qt):e.slice(t).join(qt),c=i.length;for(let u=0;u<c;u++){const d=i[u];if(d.validator(a))return d.classGroupId}},Wf=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),s=t.slice(0,n);return s?Bf+s:void 0})(),Uf=e=>{const{theme:t,classGroups:n}=e;return Gf(n,t)},Gf=(e,t)=>{const n=Uo();for(const s in e){const r=e[s];ks(r,n,s,t)}return n},ks=(e,t,n,s)=>{const r=e.length;for(let o=0;o<r;o++){const i=e[o];Kf(i,t,n,s)}},Kf=(e,t,n,s)=>{if(typeof e=="string"){Yf(e,t,n);return}if(typeof e=="function"){Hf(e,t,n,s);return}Xf(e,t,n,s)},Yf=(e,t,n)=>{const s=e===""?t:Yo(t,e);s.classGroupId=n},Hf=(e,t,n,s)=>{if(qf(e)){ks(e(s),t,n,s);return}t.validators===null&&(t.validators=[]),t.validators.push(_f(n,e))},Xf=(e,t,n,s)=>{const r=Object.entries(e),o=r.length;for(let i=0;i<o;i++){const[a,c]=r[i];ks(c,Yo(t,a),n,s)}},Yo=(e,t)=>{let n=e;const s=t.split(qt),r=s.length;for(let o=0;o<r;o++){const i=s[o];let a=n.nextPart.get(i);a||(a=Uo(),n.nextPart.set(i,a)),n=a}return n},qf=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Zf=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),s=Object.create(null);const r=(o,i)=>{n[o]=i,t++,t>e&&(t=0,s=n,n=Object.create(null))};return{get(o){let i=n[o];if(i!==void 0)return i;if((i=s[o])!==void 0)return r(o,i),i},set(o,i){o in n?n[o]=i:r(o,i)}}},Ts="!",Ho=":",Jf=[],Xo=(e,t,n,s,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:s,isExternal:r}),Qf=e=>{const{prefix:t,experimentalParseClassName:n}=e;let s=r=>{const o=[];let i=0,a=0,c=0,u;const d=r.length;for(let p=0;p<d;p++){const y=r[p];if(i===0&&a===0){if(y===Ho){o.push(r.slice(c,p)),c=p+1;continue}if(y==="/"){u=p;continue}}y==="["?i++:y==="]"?i--:y==="("?a++:y===")"&&a--}const f=o.length===0?r:r.slice(c);let h=f,m=!1;f.endsWith(Ts)?(h=f.slice(0,-1),m=!0):f.startsWith(Ts)&&(h=f.slice(1),m=!0);const g=u&&u>c?u-c:void 0;return Xo(o,m,h,g)};if(t){const r=t+Ho,o=s;s=i=>i.startsWith(r)?o(i.slice(r.length)):Xo(Jf,!1,i,void 0,!0)}if(n){const r=s;s=o=>n({className:o,parseClassName:r})}return s},eh=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,s)=>{t.set(n,1e6+s)}),n=>{const s=[];let r=[];for(let o=0;o<n.length;o++){const i=n[o],a=i[0]==="[",c=t.has(i);a||c?(r.length>0&&(r.sort(),s.push(...r),r=[]),s.push(i)):r.push(i)}return r.length>0&&(r.sort(),s.push(...r)),s}},th=e=>({cache:Zf(e.cacheSize),parseClassName:Qf(e),sortModifiers:eh(e),postfixLookupClassGroupIds:nh(e),...$f(e)}),nh=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let s=0;s<n.length;s++)t[n[s]]=!0;return t},sh=/\s+/,rh=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:r,sortModifiers:o,postfixLookupClassGroupIds:i}=t,a=[],c=e.trim().split(sh);let u="";for(let d=c.length-1;d>=0;d-=1){const f=c[d],{isExternal:h,modifiers:m,hasImportantModifier:g,baseClassName:p,maybePostfixModifierPosition:y}=n(f);if(h){u=f+(u.length>0?" "+u:u);continue}let T=!!y,w;if(T){const O=p.substring(0,y);w=s(O);const k=w&&i[w]?s(p):void 0;k&&k!==w&&(w=k,T=!1)}else w=s(p);if(!w){if(!T){u=f+(u.length>0?" "+u:u);continue}if(w=s(p),!w){u=f+(u.length>0?" "+u:u);continue}T=!1}const b=m.length===0?"":m.length===1?m[0]:o(m).join(":"),j=g?b+Ts:b,S=j+w;if(a.indexOf(S)>-1)continue;a.push(S);const E=r(w,T);for(let O=0;O<E.length;++O){const k=E[O];a.push(j+k)}u=f+(u.length>0?" "+u:u)}return u},ih=(...e)=>{let t=0,n,s,r="";for(;t<e.length;)(n=e[t++])&&(s=qo(n))&&(r&&(r+=" "),r+=s);return r},qo=e=>{if(typeof e=="string")return e;let t,n="";for(let s=0;s<e.length;s++)e[s]&&(t=qo(e[s]))&&(n&&(n+=" "),n+=t);return n},oh=(e,...t)=>{let n,s,r,o;const i=c=>{const u=t.reduce((d,f)=>f(d),e());return n=th(u),s=n.cache.get,r=n.cache.set,o=a,a(c)},a=c=>{const u=s(c);if(u)return u;const d=rh(c,n);return r(c,d),d};return o=i,(...c)=>o(ih(...c))},ah=[],te=e=>{const t=n=>n[e]||ah;return t.isThemeGetter=!0,t},Zo=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Jo=/^\((?:(\w[\w-]*):)?(.+)\)$/i,lh=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ch=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,uh=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,dh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,fh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Le=e=>lh.test(e),I=e=>!!e&&!Number.isNaN(Number(e)),Te=e=>!!e&&Number.isInteger(Number(e)),js=e=>e.endsWith("%")&&I(e.slice(0,-1)),Se=e=>ch.test(e),Qo=()=>!0,mh=e=>uh.test(e)&&!dh.test(e),Ss=()=>!1,ph=e=>fh.test(e),gh=e=>hh.test(e),yh=e=>!C(e)&&!A(e),xh=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),bh=e=>Re(e,ia,Ss),C=e=>Zo.test(e),$e=e=>Re(e,oa,mh),ea=e=>Re(e,Ah,I),vh=e=>Re(e,la,Qo),wh=e=>Re(e,aa,Ss),ta=e=>Re(e,sa,Ss),kh=e=>Re(e,ra,gh),Zt=e=>Re(e,ca,ph),A=e=>Jo.test(e),yt=e=>We(e,oa),Th=e=>We(e,aa),na=e=>We(e,sa),jh=e=>We(e,ia),Sh=e=>We(e,ra),Jt=e=>We(e,ca,!0),Ch=e=>We(e,la,!0),Re=(e,t,n)=>{const s=Zo.exec(e);return s?s[1]?t(s[1]):n(s[2]):!1},We=(e,t,n=!1)=>{const s=Jo.exec(e);return s?s[1]?t(s[1]):n:!1},sa=e=>e==="position"||e==="percentage",ra=e=>e==="image"||e==="url",ia=e=>e==="length"||e==="size"||e==="bg-size",oa=e=>e==="length",Ah=e=>e==="number",aa=e=>e==="family-name",la=e=>e==="number"||e==="weight",ca=e=>e==="shadow",Ph=oh(()=>{const e=te("color"),t=te("font"),n=te("text"),s=te("font-weight"),r=te("tracking"),o=te("leading"),i=te("breakpoint"),a=te("container"),c=te("spacing"),u=te("radius"),d=te("shadow"),f=te("inset-shadow"),h=te("text-shadow"),m=te("drop-shadow"),g=te("blur"),p=te("perspective"),y=te("aspect"),T=te("ease"),w=te("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...j(),A,C],E=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],k=()=>[A,C,c],M=()=>[Le,"full","auto",...k()],V=()=>[Te,"none","subgrid",A,C],F=()=>["auto",{span:["full",Te,A,C]},Te,A,C],B=()=>[Te,"auto",A,C],ce=()=>["auto","min","max","fr",A,C],oe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],J=()=>["start","end","center","stretch","center-safe","end-safe"],W=()=>["auto",...k()],xe=()=>[Le,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],G=()=>[Le,"screen","full","dvw","lvw","svw","min","max","fit",...k()],ne=()=>[Le,"screen","full","lh","dvh","lvh","svh","min","max","fit",...k()],N=()=>[e,A,C],v=()=>[...j(),na,ta,{position:[A,C]}],R=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",jh,bh,{size:[A,C]}],H=()=>[js,yt,$e],Q=()=>["","none","full",u,A,C],se=()=>["",I,yt,$e],K=()=>["solid","dashed","dotted","double"],Ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>[I,js,na,ta],Qt=()=>["","none",g,A,C],en=()=>["none",I,A,C],tn=()=>["none",I,A,C],As=()=>[I,A,C],nn=()=>[Le,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Se],breakpoint:[Se],color:[Qo],container:[Se],"drop-shadow":[Se],ease:["in","out","in-out"],font:[yh],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Se],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Se],shadow:[Se],spacing:["px",I],text:[Se],"text-shadow":[Se],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Le,C,A,y]}],container:["container"],"container-type":[{"@container":["","normal","size",A,C]}],"container-named":[xh],columns:[{columns:[I,C,A,a]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{"inset-s":M(),start:M()}],end:[{"inset-e":M(),end:M()}],"inset-bs":[{"inset-bs":M()}],"inset-be":[{"inset-be":M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[Te,"auto",A,C]}],basis:[{basis:[Le,"full","auto",a,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[I,Le,"auto","initial","none",C]}],grow:[{grow:["",I,A,C]}],shrink:[{shrink:["",I,A,C]}],order:[{order:[Te,"first","last","none",A,C]}],"grid-cols":[{"grid-cols":V()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":V()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ce()}],"auto-rows":[{"auto-rows":ce()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...oe(),"normal"]}],"justify-items":[{"justify-items":[...J(),"normal"]}],"justify-self":[{"justify-self":["auto",...J()]}],"align-content":[{content:["normal",...oe()]}],"align-items":[{items:[...J(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...J(),{baseline:["","last"]}]}],"place-content":[{"place-content":oe()}],"place-items":[{"place-items":[...J(),"baseline"]}],"place-self":[{"place-self":["auto",...J()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pbs:[{pbs:k()}],pbe:[{pbe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:W()}],mx:[{mx:W()}],my:[{my:W()}],ms:[{ms:W()}],me:[{me:W()}],mbs:[{mbs:W()}],mbe:[{mbe:W()}],mt:[{mt:W()}],mr:[{mr:W()}],mb:[{mb:W()}],ml:[{ml:W()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:xe()}],"inline-size":[{inline:["auto",...G()]}],"min-inline-size":[{"min-inline":["auto",...G()]}],"max-inline-size":[{"max-inline":["none",...G()]}],"block-size":[{block:["auto",...ne()]}],"min-block-size":[{"min-block":["auto",...ne()]}],"max-block-size":[{"max-block":["none",...ne()]}],w:[{w:[a,"screen",...xe()]}],"min-w":[{"min-w":[a,"screen","none",...xe()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...xe()]}],h:[{h:["screen","lh",...xe()]}],"min-h":[{"min-h":["screen","lh","none",...xe()]}],"max-h":[{"max-h":["screen","lh",...xe()]}],"font-size":[{text:["base",n,yt,$e]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,Ch,vh]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",js,C]}],"font-family":[{font:[Th,wh,t]}],"font-features":[{"font-features":[C]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,A,C]}],"line-clamp":[{"line-clamp":[I,"none",A,ea]}],leading:[{leading:[o,...k()]}],"list-image":[{"list-image":["none",A,C]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",A,C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:[I,"from-font","auto",A,$e]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[I,"auto",A,C]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"tab-size":[{tab:[Te,A,C]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",A,C]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",A,C]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:v()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:U()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Te,A,C],radial:["",A,C],conic:[Te,A,C]},Sh,kh]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:Q()}],"rounded-s":[{"rounded-s":Q()}],"rounded-e":[{"rounded-e":Q()}],"rounded-t":[{"rounded-t":Q()}],"rounded-r":[{"rounded-r":Q()}],"rounded-b":[{"rounded-b":Q()}],"rounded-l":[{"rounded-l":Q()}],"rounded-ss":[{"rounded-ss":Q()}],"rounded-se":[{"rounded-se":Q()}],"rounded-ee":[{"rounded-ee":Q()}],"rounded-es":[{"rounded-es":Q()}],"rounded-tl":[{"rounded-tl":Q()}],"rounded-tr":[{"rounded-tr":Q()}],"rounded-br":[{"rounded-br":Q()}],"rounded-bl":[{"rounded-bl":Q()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-bs":[{"border-bs":se()}],"border-w-be":[{"border-be":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...K(),"hidden","none"]}],"divide-style":[{divide:[...K(),"hidden","none"]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-bs":[{"border-bs":N()}],"border-color-be":[{"border-be":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...K(),"none","hidden"]}],"outline-offset":[{"outline-offset":[I,A,C]}],"outline-w":[{outline:["",I,yt,$e]}],"outline-color":[{outline:N()}],shadow:[{shadow:["","none",d,Jt,Zt]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":["none",f,Jt,Zt]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[I,$e]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":["none",h,Jt,Zt]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[I,A,C]}],"mix-blend":[{"mix-blend":[...Ce(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ce()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[I]}],"mask-image-linear-from-pos":[{"mask-linear-from":X()}],"mask-image-linear-to-pos":[{"mask-linear-to":X()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":X()}],"mask-image-t-to-pos":[{"mask-t-to":X()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":X()}],"mask-image-r-to-pos":[{"mask-r-to":X()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":X()}],"mask-image-b-to-pos":[{"mask-b-to":X()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":X()}],"mask-image-l-to-pos":[{"mask-l-to":X()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":X()}],"mask-image-x-to-pos":[{"mask-x-to":X()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":X()}],"mask-image-y-to-pos":[{"mask-y-to":X()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[A,C]}],"mask-image-radial-from-pos":[{"mask-radial-from":X()}],"mask-image-radial-to-pos":[{"mask-radial-to":X()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":j()}],"mask-image-conic-pos":[{"mask-conic":[I]}],"mask-image-conic-from-pos":[{"mask-conic-from":X()}],"mask-image-conic-to-pos":[{"mask-conic-to":X()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:v()}],"mask-repeat":[{mask:R()}],"mask-size":[{mask:U()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",A,C]}],filter:[{filter:["","none",A,C]}],blur:[{blur:Qt()}],brightness:[{brightness:[I,A,C]}],contrast:[{contrast:[I,A,C]}],"drop-shadow":[{"drop-shadow":["","none",m,Jt,Zt]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:["",I,A,C]}],"hue-rotate":[{"hue-rotate":[I,A,C]}],invert:[{invert:["",I,A,C]}],saturate:[{saturate:[I,A,C]}],sepia:[{sepia:["",I,A,C]}],"backdrop-filter":[{"backdrop-filter":["","none",A,C]}],"backdrop-blur":[{"backdrop-blur":Qt()}],"backdrop-brightness":[{"backdrop-brightness":[I,A,C]}],"backdrop-contrast":[{"backdrop-contrast":[I,A,C]}],"backdrop-grayscale":[{"backdrop-grayscale":["",I,A,C]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[I,A,C]}],"backdrop-invert":[{"backdrop-invert":["",I,A,C]}],"backdrop-opacity":[{"backdrop-opacity":[I,A,C]}],"backdrop-saturate":[{"backdrop-saturate":[I,A,C]}],"backdrop-sepia":[{"backdrop-sepia":["",I,A,C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",A,C]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[I,"initial",A,C]}],ease:[{ease:["linear","initial",T,A,C]}],delay:[{delay:[I,A,C]}],animate:[{animate:["none",w,A,C]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,A,C]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:en()}],"rotate-x":[{"rotate-x":en()}],"rotate-y":[{"rotate-y":en()}],"rotate-z":[{"rotate-z":en()}],scale:[{scale:tn()}],"scale-x":[{"scale-x":tn()}],"scale-y":[{"scale-y":tn()}],"scale-z":[{"scale-z":tn()}],"scale-3d":["scale-3d"],skew:[{skew:As()}],"skew-x":[{"skew-x":As()}],"skew-y":[{"skew-y":As()}],transform:[{transform:[A,C,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:nn()}],"translate-x":[{"translate-x":nn()}],"translate-y":[{"translate-y":nn()}],"translate-z":[{"translate-z":nn()}],"translate-none":["translate-none"],zoom:[{zoom:[Te,A,C]}],accent:[{accent:N()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",A,C]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":N()}],"scrollbar-track-color":[{"scrollbar-track":N()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mbs":[{"scroll-mbs":k()}],"scroll-mbe":[{"scroll-mbe":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pbs":[{"scroll-pbs":k()}],"scroll-pbe":[{"scroll-pbe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",A,C]}],fill:[{fill:["none",...N()]}],"stroke-w":[{stroke:[I,yt,$e,ea]}],stroke:[{stroke:["none",...N()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function D(...e){return Ph(zf(e))}const Nh=({title:e,children:t,className:n})=>{const[s,r]=x.useState(!1);return l.jsxs("div",{className:D("glass-card overflow-hidden p-0 border border-border/50",n),children:[l.jsxs("button",{type:"button",onClick:()=>r(!s),className:"w-full px-6 py-4 flex items-center justify-between font-bold text-foreground text-left cursor-pointer hover:bg-secondary/20 transition-colors",children:[l.jsx("span",{children:e}),l.jsx(Ls,{size:18,className:D("text-muted-foreground transition-transform duration-200",s&&"rotate-180")})]}),l.jsx(de,{initial:!1,children:s&&l.jsx(z.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.2},className:"overflow-hidden",children:l.jsx("div",{className:"px-6 pb-5 pt-2 border-t border-border/40 text-sm text-muted-foreground leading-relaxed",children:t})})})]})},ua={success:"border-green-500/20 bg-green-500/5",error:"border-red-500/20 bg-red-500/5",warning:"border-amber-500/20 bg-amber-500/5",info:"border-blue-500/20 bg-blue-500/5"},da={success:{title:"var(--alert-success-title, #14532d)",desc:"var(--alert-success-desc, #15803d)"},error:{title:"var(--alert-error-title, #7f1d1d)",desc:"var(--alert-error-desc, #b91c1c)"},warning:{title:"var(--alert-warning-title, #78350f)",desc:"var(--alert-warning-desc, #b45309)"},info:{title:"var(--alert-info-title, #1e3a8a)",desc:"var(--alert-info-desc, #1d4ed8)"}},Eh=({title:e,description:t,variant:n="info",dismissible:s=!1,className:r})=>{const[o,i]=x.useState(!0),a=da[n]||da.info,c={success:l.jsx(wt,{size:18,style:{color:a.title}}),error:l.jsx(Is,{size:18,style:{color:a.title}}),warning:l.jsx(rn,{size:18,style:{color:a.title}}),info:l.jsx(kt,{size:18,style:{color:a.title}})};return l.jsx(de,{children:o&&l.jsxs(z.div,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},exit:{opacity:0,y:-5},className:D("flex items-start gap-4 p-4 rounded-2xl border text-left",ua[n]||ua.info,r),children:[l.jsx("div",{className:"mt-0.5 shrink-0",children:c[n]||c.info}),l.jsxs("div",{className:"flex-1 space-y-1",children:[e&&l.jsx("h4",{style:{color:a.title},className:"font-bold text-sm leading-none",children:e}),t&&l.jsx("p",{style:{color:a.desc},className:"text-xs leading-relaxed font-medium",children:t})]}),s&&l.jsx("button",{type:"button",onClick:()=>i(!1),style:{color:a.title},className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg transition-colors cursor-pointer shrink-0",children:l.jsx(Ae,{size:14})})]})})},fa={sm:"h-8 w-8 text-xs",md:"h-11 w-11 text-sm",lg:"h-14 w-14 text-base"},ha={online:"bg-emerald-500 ring-emerald-500/20",offline:"bg-zinc-400 ring-zinc-400/20",busy:"bg-destructive ring-destructive/20",syncing:"bg-primary ring-primary/20 animate-pulse"},Mh=({src:e,alt:t="User Profile",name:n="",size:s="md",status:r,className:o})=>{const i=n?n.split(" ").map(a=>a[0]).slice(0,2).join("").toUpperCase():"";return l.jsxs("div",{className:"relative inline-block shrink-0",children:[l.jsx("div",{className:D("relative rounded-full overflow-hidden flex items-center justify-center border border-border/80 shadow-md bg-secondary/50 font-bold text-foreground font-sans",fa[s]||fa.md,o),children:e?l.jsx("img",{src:e,alt:t,className:"h-full w-full object-cover"}):l.jsx("span",{children:i||"?"})}),r&&ha[r]&&l.jsx("span",{className:D("absolute bottom-0 right-0 block h-2.5 w-2.5 rounded-full ring-2 ring-background",ha[r])})]})},xt=({children:e,className:t})=>l.jsx("div",{className:D("bg-card border border-border rounded-3xl p-6 transition-all duration-300",t),children:e}),Ue=({label:e,error:t,icon:n,className:s,id:r,...o})=>l.jsxs("div",{className:D("space-y-1.5 w-full text-left",s),children:[e&&l.jsx("label",{htmlFor:r,className:"text-sm font-semibold text-foreground ml-1",children:e}),l.jsxs("div",{className:"relative group",children:[n&&l.jsx("div",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-muted-foreground group-focus-within:text-primary transition-colors",children:l.jsx(n,{size:18})}),l.jsx("input",{id:r,className:D("glass-input w-full",n&&"pl-11",t&&"ring-2 ring-destructive/50 border-destructive/50"),...o})]}),t&&l.jsx(z.p,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"text-xs text-destructive ml-1 font-medium",children:t})]}),ye=({children:e,className:t,variant:n="primary",loading:s=!1,...r})=>{const o={primary:"btn-primary",secondary:"btn-secondary",outline:"btn-outline",ghost:"btn-ghost",glass:"btn-glass",destructive:"btn-destructive"};return l.jsxs(z.button,{whileHover:{y:-2},whileTap:{scale:.98},className:D("relative overflow-hidden",o[n],s&&"opacity-70 cursor-not-allowed",t),disabled:s||r.disabled,...r,children:[s&&l.jsxs("svg",{className:"animate-spin h-5 w-5 text-current shrink-0",viewBox:"0 0 24 24",children:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),l.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),e,l.jsx("div",{className:"absolute inset-0 w-full h-full bg-gradient-to-r from-transparent via-white/10 to-transparent -translate-x-full hover:animate-[shine_1.5s_infinite]"})]})},Cs=({checked:e=!1,onChange:t,label:n,className:s})=>l.jsxs("label",{className:D("inline-flex items-center gap-3 cursor-pointer select-none text-left",s),children:[l.jsxs("div",{className:"relative flex items-center",children:[l.jsx("input",{type:"checkbox",checked:e,onChange:r=>t&&t(r.target.checked),className:"sr-only"}),l.jsx(z.div,{className:D("w-5 h-5 rounded-lg border flex items-center justify-center transition-colors duration-200",e?"bg-primary border-primary":"bg-white/40 border-input dark:bg-black/20"),children:l.jsx(de,{children:e&&l.jsx(z.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},transition:{type:"spring",stiffness:500,damping:30},children:l.jsx(Oa,{size:12,className:"text-primary-foreground stroke-[4px]"})})})})]}),n&&l.jsx("span",{className:"text-sm font-semibold text-foreground leading-none",children:n})]}),Vh=({initialMode:e="login",onLogin:t,onRegister:n,onForgotPassword:s,logo:r=Ba,title:o="Ether UI Console",className:i})=>{const[a,c]=x.useState(e),[u,d]=x.useState(""),[f,h]=x.useState(""),[m,g]=x.useState(""),[p,y]=x.useState(!1),[T,w]=x.useState(!1),[b,j]=x.useState(!1),S=async E=>{E.preventDefault(),j(!0);try{a==="login"&&t?await t({email:f,password:m,rememberMe:p}):a==="register"&&n?await n({name:u,email:f,password:m,acceptTerms:T}):a==="forgot"&&s&&await s({email:f})}finally{j(!1)}};return l.jsxs("div",{className:D("min-h-screen w-full flex items-center justify-center p-6 relative bg-background overflow-hidden",i),children:[l.jsx("div",{className:"absolute top-1/4 left-1/4 w-[400px] h-[400px] bg-primary/5 rounded-full blur-[120px] pointer-events-none animate-pulse"}),l.jsx("div",{className:"absolute bottom-1/4 right-1/4 w-[400px] h-[400px] bg-primary/10 rounded-full blur-[120px] pointer-events-none animate-pulse duration-4000"}),l.jsx("div",{className:"w-full max-w-md z-10",children:l.jsxs(de,{mode:"wait",children:[a==="login"&&l.jsx(z.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},exit:{opacity:0,y:-15},transition:{duration:.25},children:l.jsxs(xt,{className:"p-8 space-y-6",children:[l.jsxs("div",{className:"text-center space-y-2",children:[l.jsx("div",{className:"inline-flex items-center justify-center p-3 rounded-2xl bg-primary/10 text-primary mb-2",children:l.jsx(r,{size:28,className:"animate-pulse"})}),l.jsx("h3",{className:"text-2xl font-extrabold tracking-tight text-foreground",children:o}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Welcome back! Sign in to manage your ledgers."})]}),l.jsxs("form",{onSubmit:S,className:"space-y-4",children:[l.jsx(Ue,{label:"Email Address",type:"email",placeholder:"name@company.com",value:f,onChange:E=>h(E.target.value),required:!0}),l.jsx(Ue,{label:"Password",type:"password",placeholder:"••••••••",value:m,onChange:E=>g(E.target.value),required:!0}),l.jsxs("div",{className:"flex items-center justify-between text-xs pt-1",children:[l.jsx(Cs,{label:"Remember me",checked:p,onChange:y}),l.jsx("button",{type:"button",onClick:()=>c("forgot"),className:"font-bold text-primary hover:underline cursor-pointer",children:"Forgot password?"})]}),l.jsx(ye,{type:"submit",variant:"primary",loading:b,className:"w-full justify-center py-3 mt-2",children:"Sign In to Console"})]}),l.jsxs("div",{className:"text-center text-xs text-muted-foreground border-t border-border/40 pt-4",children:["Don't have an account?"," ",l.jsx("button",{type:"button",onClick:()=>c("register"),className:"font-bold text-primary hover:underline cursor-pointer",children:"Create one now"})]})]})},"login"),a==="register"&&l.jsx(z.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},exit:{opacity:0,y:-15},transition:{duration:.25},children:l.jsxs(xt,{className:"p-8 space-y-6",children:[l.jsxs("div",{className:"text-center space-y-2",children:[l.jsx("div",{className:"inline-flex items-center justify-center p-3 rounded-2xl bg-primary/10 text-primary mb-2",children:l.jsx(r,{size:28})}),l.jsx("h3",{className:"text-2xl font-extrabold tracking-tight text-foreground",children:"Create Account"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Sign up to unlock real-time financial synchrony."})]}),l.jsxs("form",{onSubmit:S,className:"space-y-4",children:[l.jsx(Ue,{label:"Full Name",type:"text",placeholder:"Alex Carter",value:u,onChange:E=>d(E.target.value),required:!0}),l.jsx(Ue,{label:"Work Email",type:"email",placeholder:"alex@company.com",value:f,onChange:E=>h(E.target.value),required:!0}),l.jsx(Ue,{label:"Choose Password",type:"password",placeholder:"••••••••",value:m,onChange:E=>g(E.target.value),required:!0}),l.jsx("div",{className:"flex items-start pt-1",children:l.jsx(Cs,{label:"I agree to the Terms & Conditions",checked:T,onChange:w})}),l.jsx(ye,{type:"submit",variant:"primary",loading:b,className:"w-full justify-center py-3 mt-2",children:"Register Workspace"})]}),l.jsxs("div",{className:"text-center text-xs text-muted-foreground border-t border-border/40 pt-4",children:["Already have an account?"," ",l.jsx("button",{type:"button",onClick:()=>c("login"),className:"font-bold text-primary hover:underline cursor-pointer",children:"Sign in instead"})]})]})},"register"),a==="forgot"&&l.jsx(z.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},exit:{opacity:0,y:-15},transition:{duration:.25},children:l.jsxs(xt,{className:"p-8 space-y-6",children:[l.jsxs("div",{className:"space-y-2 text-left",children:[l.jsxs("button",{type:"button",onClick:()=>c("login"),className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground font-bold cursor-pointer transition-colors",children:[l.jsx(Ra,{size:12})," Back to Sign In"]}),l.jsx("h3",{className:"text-2xl font-extrabold tracking-tight text-foreground pt-2",children:"Recover Access"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Enter your verified work email, and we will send a password restoration link."})]}),l.jsxs("form",{onSubmit:S,className:"space-y-4",children:[l.jsx(Ue,{label:"Registered Email Address",type:"email",placeholder:"alex@company.com",value:f,onChange:E=>h(E.target.value),required:!0}),l.jsx(ye,{type:"submit",variant:"primary",loading:b,className:"w-full justify-center py-3 pt-2",children:"Send Recovery Link"})]})]})},"forgot")]})})]})},ma=({children:e,variant:t="default",className:n})=>{const s={default:"bg-secondary text-secondary-foreground border-border",primary:"bg-primary text-primary-foreground border-primary",success:"bg-emerald-50 text-emerald-700 border-emerald-100 dark:bg-emerald-500/10 dark:text-emerald-400 dark:border-emerald-500/20",warning:"bg-amber-50 text-amber-700 border-amber-100 dark:bg-amber-500/10 dark:text-amber-400 dark:border-amber-500/20",danger:"bg-destructive text-destructive-foreground border-destructive"};return l.jsx("span",{className:D("px-2 py-0.5 rounded-md text-[10px] font-bold uppercase tracking-wider border inline-flex items-center justify-center",s[t],n),children:e})},pa=({isOpen:e,onClose:t,title:n,children:s,className:r,width:o})=>l.jsx(de,{children:e&&l.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[l.jsx(z.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:t,className:"absolute inset-0 bg-black/20 backdrop-blur-sm"}),l.jsxs(z.div,{initial:{opacity:0,scale:.95,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:20},className:D("relative w-full max-w-lg glass-card overflow-hidden p-0 flex flex-col max-h-[90vh] text-left",o,r),children:[l.jsxs("div",{className:"flex items-center justify-between px-7 py-5 border-b border-border shrink-0",children:[l.jsx("h3",{className:"text-xl font-bold text-foreground",children:n}),l.jsx("button",{onClick:t,className:"p-2 rounded-xl hover:bg-secondary text-muted-foreground hover:text-foreground transition-all cursor-pointer",children:l.jsx(Ae,{size:20})})]}),l.jsx("div",{className:"p-6 overflow-y-auto custom-scrollbar",children:s})]})]})}),Dh=({isOpen:e,onClose:t,onConfirm:n,title:s="Are you sure?",message:r="This action cannot be undone.",confirmText:o="Confirm",cancelText:i="Cancel",confirmVariant:a="destructive",loading:c=!1})=>l.jsx(pa,{isOpen:e,onClose:t,title:s,className:"max-w-md",children:l.jsxs("div",{className:"space-y-6",children:[l.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:r}),l.jsxs("div",{className:"flex items-center justify-end gap-3",children:[l.jsx(ye,{variant:"ghost",onClick:t,disabled:c,children:i}),l.jsx(ye,{variant:a,onClick:n,loading:c,children:o})]})]})}),Lh=({label:e,options:t=[],value:n,onChange:s,placeholder:r="Select option",className:o})=>{const[i,a]=x.useState(!1),c=x.useRef(null),u=t.find(d=>d.value===n);return x.useEffect(()=>{const d=f=>{c.current&&!c.current.contains(f.target)&&a(!1)};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[]),l.jsxs("div",{ref:c,className:D("space-y-1.5 w-full text-left relative",o),children:[e&&l.jsx("label",{className:"text-sm font-semibold text-foreground ml-1",children:e}),l.jsx("div",{children:l.jsxs("button",{type:"button",onClick:()=>a(!i),className:"glass-input w-full flex items-center justify-between cursor-pointer focus:ring-2 focus:ring-ring/10 text-left",children:[l.jsx("span",{className:D(!u&&"text-muted-foreground/60"),children:u?u.label:r}),l.jsx(Ls,{size:18,className:D("text-muted-foreground transition-transform duration-200",i&&"rotate-180")})]})}),l.jsx(de,{children:i&&l.jsx(z.div,{initial:{opacity:0,y:5,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:5,scale:.98},transition:{duration:.15},className:"absolute z-50 w-full mt-2 glass-panel rounded-2xl overflow-hidden shadow-2xl p-1 max-h-60 overflow-y-auto custom-scrollbar",children:t.map((d,f)=>{const h=d.value===n;return l.jsx("button",{type:"button",onClick:()=>{s&&s(d.value),a(!1)},className:D("w-full text-left px-4 py-2.5 rounded-xl text-sm transition-colors cursor-pointer",h?"bg-primary text-primary-foreground font-semibold":"hover:bg-secondary text-foreground"),children:d.label},d.value||f)})})})]})},Rh=({onFilesAdded:e,accept:t="*",maxFiles:n=5,maxSizeMB:s=10,className:r})=>{const[o,i]=x.useState(!1),[a,c]=x.useState([]),u=x.useRef(null),d=p=>{p.preventDefault(),p.stopPropagation(),p.type==="dragenter"||p.type==="dragover"?i(!0):p.type==="dragleave"&&i(!1)},f=p=>{const y=Array.from(p).map(w=>{const j=w.size/1048576>s;return{id:Math.random().toString(36).substring(7),name:w.name,size:(w.size/1024).toFixed(1)+" KB",rawFile:w,progress:0,status:j?"failed":"uploading",error:j?`File exceeds limit of ${s}MB`:null}}),T=[...a,...y].slice(0,n);c(T),e&&e(T.map(w=>w.rawFile)),y.forEach(w=>{if(w.status==="failed")return;let b=0;const j=setInterval(()=>{b+=Math.floor(Math.random()*15)+5,b>=100?(b=100,clearInterval(j),c(S=>S.map(E=>E.id===w.id?{...E,progress:100,status:"success"}:E))):c(S=>S.map(E=>E.id===w.id?{...E,progress:b}:E))},150)})},h=p=>{p.preventDefault(),p.stopPropagation(),i(!1),p.dataTransfer.files&&p.dataTransfer.files[0]&&f(p.dataTransfer.files)},m=p=>{p.target.files&&p.target.files[0]&&f(p.target.files)},g=p=>{c(a.filter(y=>y.id!==p))};return l.jsxs("div",{className:D("space-y-4 w-full text-left",r),children:[l.jsxs("div",{onDragEnter:d,onDragOver:d,onDragLeave:d,onDrop:h,onClick:()=>u.current&&u.current.click(),className:D("relative border-2 border-dashed rounded-2xl p-8 flex flex-col items-center justify-center gap-3 cursor-pointer select-none transition-all duration-300 min-h-[160px]",o?"border-primary bg-primary/5 scale-[0.99] shadow-md shadow-primary/5":"bg-white/40 border-border dark:bg-black/20 hover:border-primary/50 hover:bg-secondary/20"),children:[l.jsx("input",{ref:u,type:"file",multiple:!0,accept:t,onChange:m,className:"hidden"}),l.jsx(z.div,{animate:o?{scale:1.1,y:-2}:{scale:1,y:0},className:D("p-3 rounded-2xl transition-colors",o?"bg-primary text-primary-foreground":"bg-primary/10 text-primary"),children:l.jsx(Fa,{size:24})}),l.jsxs("div",{className:"text-center space-y-1",children:[l.jsx("p",{className:"text-sm font-bold text-foreground",children:o?"Drop files to stage them!":"Drag & Drop files here"}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Or click to browse storage (Max ",n," files, limit ",s,"MB)"]})]})]}),l.jsx(de,{children:a.length>0&&l.jsxs(z.div,{initial:{opacity:0,y:5},animate:{opacity:1,y:0},exit:{opacity:0,y:5},className:"space-y-2 border border-border/40 bg-card/60 rounded-2xl p-4",children:[l.jsxs("div",{className:"flex items-center justify-between pb-2 border-b border-border/20",children:[l.jsxs("span",{className:"text-[10px] font-black uppercase tracking-widest text-muted-foreground",children:["Upload Queue (",a.length,")"]}),l.jsx("button",{onClick:()=>c([]),className:"text-[10px] font-bold text-destructive hover:underline",children:"Clear All"})]}),l.jsx("div",{className:"space-y-3 max-h-[220px] overflow-y-auto custom-scrollbar pr-1",children:a.map(p=>l.jsxs(z.div,{layout:!0,initial:{opacity:0,x:-10},animate:{opacity:1,x:0},exit:{opacity:0,x:10},className:"flex items-center justify-between gap-4 p-2.5 rounded-xl bg-secondary/30 border border-border/10 text-xs",children:[l.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[l.jsx("div",{className:"p-2 rounded-lg bg-card border border-border/20 text-muted-foreground shrink-0",children:l.jsx(_a,{size:16})}),l.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsx("p",{className:"font-semibold text-foreground truncate",children:p.name}),l.jsx("span",{className:"text-[10px] text-muted-foreground shrink-0",children:p.size})]}),p.status==="uploading"&&l.jsx("div",{className:"w-full bg-secondary/50 rounded-full h-1 overflow-hidden",children:l.jsx(z.div,{className:"bg-primary h-full rounded-full",animate:{width:`${p.progress}%`},transition:{duration:.1}})}),p.status==="failed"&&l.jsx("p",{className:"text-[10px] font-bold text-destructive truncate",children:p.error}),p.status==="success"&&l.jsxs("p",{className:"text-[10px] font-bold text-primary flex items-center gap-1",children:[l.jsx(wt,{size:10})," Upload complete!"]})]})]}),l.jsx("button",{onClick:()=>g(p.id),className:"p-1 hover:bg-secondary rounded-lg text-muted-foreground hover:text-foreground cursor-pointer transition-colors",children:l.jsx(Ae,{size:14})})]},p.id))})]})})]})},Ih=({isOpen:e=!1,onClose:t,notifications:n=[],onClearAll:s,onDismiss:r,className:o})=>l.jsx(de,{children:e&&l.jsxs(l.Fragment,{children:[l.jsx(z.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:t,className:"fixed inset-0 z-40 bg-black/30 backdrop-blur-sm cursor-pointer"}),l.jsxs(z.aside,{initial:{x:"110%",opacity:0},animate:{x:0,opacity:1},exit:{x:"110%",opacity:0},transition:{type:"spring",stiffness:380,damping:32},className:D("fixed top-4 right-4 z-50 h-[calc(100vh-2rem)] w-[calc(100%-2rem)] max-w-sm bg-card/95 backdrop-blur-xl border border-border/50 shadow-2xl rounded-3xl flex flex-col text-left overflow-hidden",o),children:[l.jsxs("div",{className:"p-4 border-b border-border/40 flex items-center justify-between min-h-[72px] shrink-0 bg-card/65 backdrop-blur-md",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"p-2 rounded-xl bg-primary/10 text-primary",children:l.jsx(Ds,{size:18,className:"animate-bounce"})}),l.jsxs("div",{children:[l.jsx("h4",{className:"text-sm font-extrabold text-foreground",children:"Notifications"}),l.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Alert console logs"})]})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[n.length>0&&l.jsx("button",{onClick:s,className:"p-2 hover:bg-secondary rounded-xl text-muted-foreground hover:text-destructive cursor-pointer transition-colors",title:"Clear All",children:l.jsx(Wa,{size:16})}),l.jsx("button",{onClick:t,className:"p-2 hover:bg-secondary rounded-xl text-muted-foreground hover:text-foreground cursor-pointer transition-colors",children:l.jsx(Ae,{size:16})})]})]}),l.jsx("div",{className:"flex-1 overflow-y-auto custom-scrollbar p-4 space-y-3",children:l.jsx(de,{initial:!1,children:n.length===0?l.jsxs(z.div,{initial:{opacity:0},animate:{opacity:1},className:"h-full flex flex-col items-center justify-center text-center gap-3 py-12",children:[l.jsx("div",{className:"p-4 rounded-full bg-secondary/40 text-muted-foreground",children:l.jsx(Ds,{size:32,className:"opacity-50"})}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-xs font-bold text-foreground",children:"Zero unread notifications"}),l.jsx("p",{className:"text-[10px] text-muted-foreground",children:"All operational tasks succeeded!"})]})]}):n.map(i=>{const a=i.type==="success",c=i.type==="warning";return l.jsxs(z.div,{layout:!0,initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},className:"p-3.5 rounded-2xl bg-secondary/20 border border-border/10 flex items-start gap-3 relative overflow-hidden group hover:border-border/30 transition-all text-xs",children:[i.unread&&l.jsxs("span",{className:"absolute top-3.5 right-3.5 flex h-2 w-2",children:[l.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),l.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),l.jsxs("div",{className:D("p-2 rounded-xl shrink-0 border border-border/10",a&&"bg-emerald-500/10 text-emerald-500",c&&"bg-amber-500/10 text-amber-500",!a&&!c&&"bg-sky-500/10 text-sky-500"),children:[a&&l.jsx(wt,{size:16}),c&&l.jsx(rn,{size:16}),!a&&!c&&l.jsx(kt,{size:16})]}),l.jsxs("div",{className:"flex-1 space-y-1.5 pr-4 text-left",children:[l.jsxs("div",{className:"space-y-0.5",children:[l.jsx("p",{className:"font-bold text-foreground",children:i.title}),l.jsx("span",{className:"text-[9px] text-muted-foreground font-medium",children:i.timestamp})]}),l.jsx("p",{className:"text-muted-foreground text-[11px] leading-relaxed",children:i.description})]}),l.jsx("button",{onClick:()=>r&&r(i.id),className:"absolute bottom-3 right-3 p-1 hover:bg-secondary rounded-lg text-muted-foreground hover:text-foreground cursor-pointer transition-colors opacity-0 group-hover:opacity-100",title:"Dismiss notification",children:l.jsx(Ae,{size:12})})]},i.id)})})})]})]})}),Oh=({currentPage:e=1,totalPages:t=1,onPageChange:n,loading:s=!1})=>t<=1?null:l.jsxs("div",{className:"flex items-center justify-between py-2 mt-6 w-full",children:[l.jsxs("div",{className:"flex-1 flex justify-between sm:hidden",children:[l.jsx(ye,{variant:"outline",onClick:()=>n(e-1),disabled:e===1||s,children:"Previous"}),l.jsx(ye,{variant:"outline",onClick:()=>n(e+1),disabled:e===t||s,children:"Next"})]}),l.jsxs("div",{className:"hidden sm:flex-1 sm:flex sm:items-center sm:justify-between",children:[l.jsx("div",{children:l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Page ",l.jsx("span",{className:"font-bold text-foreground",children:e})," of"," ",l.jsx("span",{className:"font-bold text-foreground",children:t})]})}),l.jsx("div",{children:l.jsxs("nav",{className:"relative z-0 inline-flex gap-1.5 rounded-md shadow-sm","aria-label":"Pagination",children:[l.jsxs(ye,{variant:"outline",className:"p-2.5 rounded-xl shrink-0",onClick:()=>n(e-1),disabled:e===1||s,children:[l.jsx("span",{className:"sr-only",children:"Previous"}),l.jsx(Rs,{size:16})]}),[...Array(t)].map((r,o)=>{const i=o+1,a=e===i;return l.jsx(ye,{variant:a?"primary":"outline",className:"w-10 h-10 p-0 rounded-xl shrink-0 font-mono text-xs",onClick:()=>n(i),disabled:s,children:i},i)}),l.jsxs(ye,{variant:"outline",className:"p-2.5 rounded-xl shrink-0",onClick:()=>n(e+1),disabled:e===t||s,children:[l.jsx("span",{className:"sr-only",children:"Next"}),l.jsx(sn,{size:16})]})]})})]})]}),zh=({children:e,content:t})=>{const[n,s]=x.useState(!1),[r,o]=x.useState({x:0,y:0}),i=x.useRef(null),a=()=>{if(i.current){const d=i.current.getBoundingClientRect();o({x:d.left+d.width/2,y:d.top+window.scrollY-8})}};x.useEffect(()=>(n&&(a(),window.addEventListener("scroll",a),window.addEventListener("resize",a)),()=>{window.removeEventListener("scroll",a),window.removeEventListener("resize",a)}),[n]);const c=()=>{t&&s(!0)},u=()=>{s(!1)};return l.jsxs("div",{ref:i,onMouseEnter:c,onMouseLeave:u,className:"inline-block w-full",children:[e,n&&t&&typeof window<"u"&&ja.createPortal(l.jsx(de,{children:l.jsxs(z.div,{initial:{opacity:0,scale:.95,y:4},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:4},style:{position:"absolute",left:r.x,top:r.y,transform:"translateX(-50%) translateY(-100%)",zIndex:99999,pointerEvents:"none"},className:"bg-zinc-900 text-zinc-100 dark:bg-zinc-100 dark:text-zinc-900 text-[10px] font-black uppercase tracking-widest px-3 py-2 rounded-lg shadow-xl whitespace-nowrap",children:[t,l.jsx("div",{className:"absolute top-full left-1/2 -translate-x-1/2 -mt-1 border-4 border-transparent border-t-zinc-900 dark:border-t-zinc-100"})]})}),document.body)]})},Fh=({value:e=0,size:t=80,strokeWidth:n=6,showPercent:s=!0,className:r})=>{const o=(t-n)/2,i=o*2*Math.PI,a=Math.min(Math.max(e,0),100),c=i-a/100*i;return l.jsxs("div",{className:D("relative inline-flex items-center justify-center",r),style:{width:t,height:t},children:[l.jsxs("svg",{className:"transform -rotate-90",width:t,height:t,children:[l.jsx("circle",{className:"text-secondary/50",stroke:"currentColor",strokeWidth:n,fill:"transparent",r:o,cx:t/2,cy:t/2}),l.jsx("circle",{className:"text-primary transition-all duration-500 ease-out",stroke:"currentColor",strokeWidth:n,strokeDasharray:i,strokeDashoffset:c,strokeLinecap:"round",fill:"transparent",r:o,cx:t/2,cy:t/2})]}),s&&l.jsxs("span",{className:"absolute text-[10px] font-mono font-bold text-foreground",children:[Math.round(a),"%"]})]})},_h=({checked:e=!1,onChange:t,label:n,name:s,value:r,className:o})=>l.jsxs("label",{className:D("inline-flex items-center gap-3 cursor-pointer select-none text-left",o),children:[l.jsxs("div",{className:"relative flex items-center",children:[l.jsx("input",{type:"radio",name:s,value:r,checked:e,onChange:()=>t&&t(r),className:"sr-only"}),l.jsx(z.div,{className:D("w-5 h-5 rounded-full border flex items-center justify-center transition-colors duration-200",e?"border-primary":"bg-white/40 border-input dark:bg-black/20"),children:l.jsx(de,{children:e&&l.jsx(z.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},transition:{type:"spring",stiffness:500,damping:30},className:"w-2.5 h-2.5 rounded-full bg-primary"})})})]}),n&&l.jsx("span",{className:"text-sm font-semibold text-foreground leading-none",children:n})]}),Bh=({collapsed:e=!1,onToggle:t,logo:n,title:s="Ether UI",children:r,footer:o,className:i})=>l.jsxs("aside",{className:D("h-screen bg-card border-r border-border/80 flex flex-col transition-all duration-300 ease-in-out shrink-0 text-left",e?"w-20":"w-64",i),children:[l.jsxs("div",{className:D("flex border-b border-border/40 shrink-0 transition-all duration-300",e?"flex-col items-center justify-center gap-2.5 py-4 px-1 min-h-[88px]":"flex-row items-center justify-between p-4 min-h-[72px]"),children:[l.jsxs("div",{className:D("flex items-center gap-3 overflow-hidden",e&&"justify-center"),children:[n&&l.jsx("div",{className:"text-primary shrink-0 transition-transform duration-300",children:n}),!e&&l.jsx("span",{className:"font-extrabold text-base text-foreground tracking-tight whitespace-nowrap animate-[fadeIn_0.2s_ease-out]",children:s})]}),l.jsx("button",{type:"button",onClick:()=>t&&t(!e),className:"p-1.5 hover:bg-secondary/60 rounded-xl border border-border/20 text-muted-foreground hover:text-foreground cursor-pointer shrink-0 transition-colors",children:e?l.jsx(sn,{size:14}):l.jsx(Rs,{size:14})})]}),l.jsx("div",{className:"flex-1 py-4 px-3 space-y-1.5 overflow-y-auto custom-scrollbar",children:r}),o&&l.jsx("div",{className:"p-3 border-t border-border/40 min-h-[72px] flex items-center overflow-hidden shrink-0",children:o})]}),$h=({icon:e,label:t,active:n=!1,onClick:s,collapsed:r=!1,badge:o})=>l.jsxs("button",{type:"button",onClick:s,className:D("relative w-full flex items-center rounded-xl font-bold text-sm transition-all duration-200 cursor-pointer text-left select-none shrink-0",r?"justify-center p-3":"px-4 py-3 gap-3",n?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground hover:bg-secondary/40"),children:[e&&l.jsx(e,{size:18,className:"shrink-0"}),!r&&l.jsx("span",{className:"truncate flex-1 font-semibold text-sm whitespace-nowrap overflow-hidden animate-[fadeIn_0.2s_ease-out]",children:t}),!r&&o&&!n&&l.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full font-bold border shrink-0 bg-primary/10 text-primary border-primary/20",children:o}),!r&&n&&l.jsx(z.div,{layoutId:"active-sidebar-indicator",className:"w-1.5 h-1.5 rounded-full bg-primary-foreground shrink-0 ml-auto",transition:{type:"spring",stiffness:380,damping:30}})]}),Wh=({min:e=0,max:t=100,step:n=1,value:s=50,onChange:r,label:o,className:i})=>{const a=(s-e)/(t-e)*100;return l.jsxs("div",{className:D("space-y-2 w-full text-left",i),children:[(o||s!==void 0)&&l.jsxs("div",{className:"flex justify-between items-center px-1",children:[o&&l.jsx("label",{className:"text-sm font-semibold text-foreground",children:o}),l.jsx("span",{className:"text-xs font-mono font-bold text-primary",children:s})]}),l.jsxs("div",{className:"relative flex items-center group",children:[l.jsx("input",{type:"range",min:e,max:t,step:n,value:s,onChange:c=>r&&r(Number(c.target.value)),className:"w-full h-1.5 bg-secondary/50 dark:bg-zinc-800 rounded-full appearance-none outline-none cursor-pointer",style:{background:`linear-gradient(to right, var(--primary) 0%, var(--primary) ${a}%, var(--secondary) ${a}%, var(--secondary) 100%)`}}),l.jsx("style",{children:`
151
+ input[type="range"]::-webkit-slider-thumb {
152
+ -webkit-appearance: none;
153
+ appearance: none;
154
+ width: 16px;
155
+ height: 16px;
156
+ border-radius: 50%;
157
+ background: var(--primary);
158
+ border: 2px solid var(--background);
159
+ box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
160
+ transition: transform 0.1s ease;
161
+ }
162
+ input[type="range"]::-webkit-slider-thumb:hover {
163
+ transform: scale(1.15);
164
+ }
165
+ input[type="range"]::-webkit-slider-thumb:active {
166
+ transform: scale(0.95);
167
+ }
168
+ `})]})]})},Uh=({size:e="md",className:t})=>{const n={sm:"h-4 w-4 stroke-[3px]",md:"h-8 w-8 stroke-[2px]",lg:"h-12 w-12 stroke-[1.5px]"};return l.jsx("div",{className:D("flex items-center justify-center",t),children:l.jsxs("svg",{className:D("animate-spin text-primary shrink-0",n[e]),viewBox:"0 0 24 24",fill:"none",children:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})})},Gh=({title:e,value:t,change:n,trend:s="up",description:r,icon:o,className:i})=>l.jsxs(xt,{className:D("space-y-4 hover:border-primary/40 relative overflow-hidden",i),children:[l.jsx("div",{className:"absolute top-0 right-0 w-24 h-24 bg-primary/5 rounded-full blur-2xl pointer-events-none"}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-xs font-bold text-muted-foreground uppercase tracking-wider",children:e}),o&&l.jsx("div",{className:"p-2 rounded-xl bg-secondary/60 text-primary border border-border/40 shrink-0",children:l.jsx(o,{size:18})})]}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("h3",{className:"text-3xl font-extrabold tracking-tight text-foreground font-sans",children:t}),n&&l.jsxs("div",{className:"flex items-center gap-1.5 pt-0.5",children:[l.jsxs("span",{className:D("inline-flex items-center gap-0.5 px-2 py-0.5 rounded-full text-[10px] font-bold border",s==="up"?"bg-emerald-500/10 text-emerald-600 border-emerald-500/20 dark:text-emerald-400":s==="down"?"bg-rose-500/10 text-rose-600 border-rose-500/20 dark:text-rose-400":"bg-zinc-500/10 text-zinc-600 border-zinc-500/20 dark:text-zinc-400"),children:[s==="up"&&l.jsx(Ia,{size:10}),s==="down"&&l.jsx(La,{size:10}),n]}),r&&l.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:r})]})]})]}),Kh=({checked:e=!1,onChange:t,label:n,className:s})=>l.jsxs("label",{className:D("inline-flex items-center gap-3 cursor-pointer select-none",s),children:[l.jsxs("div",{className:"relative",children:[l.jsx("input",{type:"checkbox",checked:e,onChange:r=>t&&t(r.target.checked),className:"sr-only"}),l.jsx(z.div,{className:D("w-11 h-6 rounded-full border transition-colors duration-200",e?"bg-primary border-primary":"bg-white/40 border-input dark:bg-black/20"),children:l.jsx(z.div,{className:"w-4 h-4 bg-white rounded-full shadow-md absolute top-1 left-1",animate:{x:e?20:0},transition:{type:"spring",stiffness:500,damping:30}})})]}),n&&l.jsx("span",{className:"text-sm font-semibold text-foreground",children:n})]}),ga=x.createContext(),Yh=({children:e})=>{const[t,n]=x.useState([]),[s,r]=x.useState(-1),[o,i]=x.useState("IDLE"),[a,c]=x.useState(""),[u,d]=x.useState({success:0,failed:0,skipped:0,noLedger:0,items:[]}),[f,h]=x.useState(null),m=x.useRef(!1),g=(w,b="",j)=>{n(w),c(b||"Batch Processing"),r(0),i("SYNCING"),d({success:0,failed:0,skipped:0,noLedger:0,items:[]}),h(()=>j)},p=()=>{n([]),r(-1),i("IDLE"),d({success:0,failed:0,skipped:0,noLedger:0,items:[]}),h(null)},y=async()=>{if(s<0||s>=t.length||m.current||!f)return;m.current=!0;const w=t[s];try{const b=await f(w),j=typeof b=="string"?b:b.status||"SUCCESS",S=(b==null?void 0:b.message)||"",E=(b==null?void 0:b.name)||w.name||"Task Item",O=(b==null?void 0:b.detail)||w.detail||"";d(k=>{const M=j.toLowerCase()==="success"?"success":j.toLowerCase()==="failed"?"failed":j.toLowerCase()==="skipped"?"skipped":"noLedger";return{...k,[M]:k[M]+1,items:[{name:E,detail:O,status:j,message:S},...k.items]}})}catch(b){console.error("Task Execution Failed:",b),d(j=>({...j,failed:j.failed+1,items:[{name:w.name||"Task Item",detail:w.detail||"",status:"FAILED",message:b.message||"Execution Error"},...j.items]}))}finally{m.current=!1,s+1<t.length?r(b=>b+1):i("COMPLETED")}};x.useEffect(()=>{o==="SYNCING"&&y()},[s,o,f]);const T=t.length>0?Math.round((s+(o==="COMPLETED"?1:0))/t.length*100):0;return l.jsx(ga.Provider,{value:{queue:t,currentIndex:s,status:o,results:u,batchName:a,progress:T,addToQueue:g,clearQueue:p},children:e})},ya=()=>{const e=x.useContext(ga);if(!e)throw new Error("useSync must be used within a SyncProvider");return e},Hh=()=>{const{status:e,results:t,currentIndex:n,queue:s,progress:r,batchName:o,clearQueue:i}=ya(),[a,c]=x.useState(!1),[u,d]=x.useState(!1);if(e==="IDLE")return null;const f=s[n]||{};return l.jsx(de,{children:l.jsx(z.div,{initial:{y:100,opacity:0},animate:{y:0,opacity:1},exit:{y:100,opacity:0},className:D("fixed bottom-6 right-6 z-50 glass-card border border-border/50 shadow-2xl transition-all duration-300 overflow-hidden",a?"w-12 h-12 rounded-full p-0 flex items-center justify-center cursor-pointer":"w-80 rounded-2xl p-4",u&&!a&&"w-[400px] max-h-[500px]"),onClick:()=>a&&c(!1),children:a?l.jsxs("div",{className:"relative",children:[l.jsx(Os,{className:D("text-primary",e==="SYNCING"&&"animate-spin"),size:24}),e==="SYNCING"&&l.jsx("div",{className:"absolute -top-1 -right-1 w-3 h-3 bg-primary rounded-full border-2 border-background"})]}):l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Os,{className:D("text-primary",e==="SYNCING"&&"animate-spin"),size:18}),l.jsx("span",{className:"font-bold text-sm",children:e==="SYNCING"?"Processing batch...":o})]}),l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx("button",{onClick:h=>{h.stopPropagation(),d(!u)},className:D("p-1 hover:bg-secondary rounded-md text-muted-foreground transition-colors cursor-pointer",u&&"bg-primary/10 text-primary"),title:"View Logs",children:l.jsx(sn,{className:D("transition-transform",u&&"rotate-90"),size:16})}),l.jsx("button",{onClick:h=>{h.stopPropagation(),c(!0)},className:"p-1 hover:bg-secondary rounded-md text-muted-foreground transition-colors cursor-pointer",children:l.jsx($a,{size:14})}),e==="COMPLETED"&&l.jsx("button",{onClick:h=>{h.stopPropagation(),i()},className:"p-1 hover:bg-destructive/10 hover:text-destructive rounded-md text-muted-foreground transition-colors cursor-pointer",children:l.jsx(Ae,{size:14})})]})]}),!u&&e==="SYNCING"&&l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs("div",{className:"flex justify-between items-end",children:[l.jsx("p",{className:"text-[10px] text-muted-foreground uppercase font-bold tracking-widest truncate max-w-[180px]",children:f.name||"Running Task..."}),l.jsxs("span",{className:"text-[9px] font-mono font-bold text-primary",children:[n+1," / ",s.length]})]}),l.jsx("div",{className:"h-1.5 w-full bg-secondary rounded-full overflow-hidden",children:l.jsx(z.div,{initial:{width:0},animate:{width:`${r}%`},className:"h-full bg-primary"})})]}),u?l.jsx("div",{className:"space-y-3 max-h-[350px] overflow-y-auto pr-2 custom-scrollbar py-2",children:t.items.length===0?l.jsx("p",{className:"text-center text-xs text-muted-foreground py-8",children:"Queueing..."}):t.items.map((h,m)=>l.jsxs("div",{className:"flex flex-col gap-1 p-2.5 rounded-xl bg-secondary/30 border border-border/40 text-left",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"font-bold text-[11px] truncate max-w-[200px]",children:h.name}),l.jsx(ma,{variant:h.status==="SUCCESS"||h.status==="SENT"?"success":h.status==="FAILED"?"danger":h.status==="SKIPPED"?"warning":"secondary",className:"text-[8px] px-1 py-0 font-extrabold",children:h.status})]}),l.jsxs("div",{className:"flex flex-col",children:[h.detail&&l.jsx("span",{className:"text-[9px] text-muted-foreground font-mono truncate",children:h.detail}),h.message&&l.jsx("span",{className:"text-[9px] text-destructive italic font-medium mt-0.5",children:h.message})]})]},m))}):l.jsxs("div",{className:"grid grid-cols-3 gap-1 pt-2 border-t border-border/50 text-center",children:[l.jsxs("div",{className:"flex flex-col items-center",children:[l.jsx("span",{className:"text-[7px] font-bold text-muted-foreground uppercase",children:"Success"}),l.jsx("span",{className:"text-sm font-mono font-bold text-emerald-600",children:t.success})]}),l.jsxs("div",{className:"flex flex-col items-center border-l border-border/50",children:[l.jsx("span",{className:"text-[7px] font-bold text-muted-foreground uppercase",children:"Failed"}),l.jsx("span",{className:"text-sm font-mono font-bold text-destructive",children:t.failed})]}),l.jsxs("div",{className:"flex flex-col items-center border-l border-border/50",children:[l.jsx("span",{className:"text-[7px] font-bold text-muted-foreground uppercase",children:"Skipped"}),l.jsx("span",{className:"text-sm font-mono font-bold text-muted-foreground",children:t.skipped+t.noLedger})]})]}),!u&&e==="COMPLETED"&&l.jsxs("div",{className:"bg-emerald-500/10 border border-emerald-500/20 p-2 rounded-xl flex items-center gap-2 justify-center",children:[l.jsx(za,{className:"text-emerald-500",size:16}),l.jsx("p",{className:"text-[10px] font-bold text-emerald-600 uppercase tracking-tighter",children:"Batch operations completed"})]})]})})})},Xh=({columns:e=[],data:t=[],loading:n=!1,emptyMessage:s="No patterns detected",onRowClick:r})=>l.jsx("div",{className:"glass-card shadow-2xl p-0 overflow-hidden",children:l.jsx("div",{className:"overflow-x-auto custom-scrollbar",children:l.jsxs("table",{className:"w-full text-left border-collapse",children:[l.jsx("thead",{children:l.jsx("tr",{className:"border-b border-border bg-background/50",children:e.map((o,i)=>l.jsx("th",{className:`px-4 md:px-8 py-4 md:py-5 text-[10px] font-black text-muted-foreground uppercase tracking-widest whitespace-nowrap ${o.className||""}`,children:o.header},i))})}),l.jsx("tbody",{className:"divide-y divide-border",children:n?[...Array(5)].map((o,i)=>l.jsx("tr",{className:"animate-pulse",children:l.jsx("td",{colSpan:e.length,className:"px-8 py-8",children:l.jsx("div",{className:"h-4 bg-secondary rounded-full w-full"})})},i)):t.length===0?l.jsx("tr",{children:l.jsx("td",{colSpan:e.length,className:"px-8 py-32 text-center text-muted-foreground font-black uppercase tracking-widest text-[10px]",children:s})}):t.map((o,i)=>l.jsx(z.tr,{initial:{opacity:0,y:5},animate:{opacity:1,y:0},transition:{delay:i*.03},onClick:()=>r&&r(o),className:`group hover:bg-secondary/50 transition-all duration-300 ${r?"cursor-pointer":""}`,children:e.map((a,c)=>l.jsx("td",{className:`px-4 md:px-8 py-4 md:py-6 ${a.className||""}`,children:a.accessor?typeof a.accessor=="function"?a.accessor(o):o[a.accessor]:null},c))},o.id||i))})]})})}),qh=({tags:e=[],onChange:t,label:n,placeholder:s="Add tags...",maxTags:r=10,className:o})=>{const[i,a]=x.useState(""),[c,u]=x.useState(!1),d=x.useRef(null),f=x.useRef(null),h=p=>{if(p.key==="Enter"||p.key===","){p.preventDefault();const y=i.trim().replace(/,/g,"");if(y&&!e.includes(y)&&e.length<r){const T=[...e,y];t&&t(T),a("")}}else if(p.key==="Backspace"&&!i&&e.length>0){p.preventDefault();const y=e.slice(0,-1);t&&t(y)}},m=p=>{const y=e.filter((T,w)=>w!==p);t&&t(y)},g=()=>{f.current&&f.current.focus()};return l.jsxs("div",{className:D("space-y-1.5 w-full text-left",o),children:[n&&l.jsx("label",{className:"text-[10px] font-black uppercase tracking-widest text-muted-foreground pl-0.5",children:n}),l.jsxs("div",{ref:d,onClick:g,className:D("flex flex-wrap items-center gap-1.5 min-h-[42px] px-3 py-1.5 rounded-xl border transition-all duration-200 cursor-text select-none",c?"border-primary bg-card/85 ring-1 ring-primary/20":"bg-white/40 border-border dark:bg-black/20 hover:border-primary/50"),children:[l.jsx(de,{children:e.map((p,y)=>l.jsxs(z.div,{initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},transition:{type:"spring",stiffness:450,damping:25},className:"inline-flex items-center gap-1 text-xs font-semibold px-2 py-0.5 rounded-lg bg-primary/10 text-primary border border-primary/20 leading-none shrink-0",children:[l.jsx("span",{children:p}),l.jsx("button",{type:"button",onClick:T=>{T.stopPropagation(),m(y)},className:"hover:bg-primary/20 rounded text-primary hover:text-foreground shrink-0 transition-colors p-0.5",children:l.jsx(Ae,{size:10})})]},p))}),l.jsx("input",{ref:f,type:"text",value:i,onChange:p=>a(p.target.value),onKeyDown:h,onFocus:()=>u(!0),onBlur:()=>u(!1),placeholder:e.length===0?s:"",disabled:e.length>=r,className:"flex-1 bg-transparent border-0 outline-none p-0 text-sm text-foreground placeholder:text-muted-foreground/60 min-w-[80px]"})]})]})},Zh=({tabs:e=[],activeTab:t,onChange:n,className:s})=>l.jsx("div",{className:D("flex items-center gap-1.5 p-1 glass-panel rounded-2xl w-fit relative",s),children:e.map(r=>{const o=r.value===t;return l.jsxs("button",{type:"button",onClick:()=>n&&n(r.value),className:D("relative px-4 py-2 text-xs font-bold uppercase tracking-wider rounded-xl transition-colors duration-200 cursor-pointer select-none",o?"text-primary-foreground z-10":"text-muted-foreground hover:text-foreground"),children:[r.label,o&&l.jsx(z.div,{layoutId:"active-tab-highlight",className:"absolute inset-0 bg-primary rounded-xl -z-10",transition:{type:"spring",stiffness:380,damping:30}})]},r.value)})}),xa={success:"bg-emerald-500 ring-emerald-500/20",warning:"bg-amber-500 ring-amber-500/20",danger:"bg-destructive ring-destructive/20",running:"bg-primary ring-primary/20 animate-pulse",pending:"bg-zinc-400 ring-zinc-400/20"},Jh=({title:e,timestamp:t,description:n,status:s="pending",icon:r,isLast:o=!1})=>l.jsxs("div",{className:"relative flex gap-4 text-left group",children:[!o&&l.jsx("span",{className:"absolute left-[11px] top-6 bottom-0 w-0.5 bg-border/50 group-hover:bg-primary/20 transition-colors","aria-hidden":"true"}),l.jsx("div",{className:"relative flex items-center justify-center shrink-0 w-6 h-6 mt-1",children:r?l.jsx("div",{className:D("z-10 w-6 h-6 rounded-full flex items-center justify-center border text-[10px] font-bold shadow-sm bg-background",s==="success"?"border-emerald-500 text-emerald-500":s==="warning"?"border-amber-500 text-amber-500":s==="danger"?"border-destructive text-destructive":s==="running"?"border-primary text-primary animate-pulse":"border-border text-muted-foreground"),children:l.jsx(r,{size:12})}):l.jsx("span",{className:D("z-10 w-3 h-3 rounded-full ring-4 transition-all duration-300",xa[s]||xa.pending)})}),l.jsxs("div",{className:"flex-1 pb-6 space-y-1",children:[l.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-1",children:[l.jsx("h4",{className:"text-sm font-bold text-foreground transition-colors group-hover:text-primary",children:e}),t&&l.jsx("span",{className:"text-[10px] font-mono font-bold text-muted-foreground bg-secondary/50 px-2 py-0.5 rounded-md border border-border/40 w-fit shrink-0",children:t})]}),n&&l.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed font-medium",children:n})]})]}),Qh=({children:e,className:t})=>{const n=x.Children.toArray(e);return l.jsx("div",{className:D("space-y-0.5",t),children:n.map((s,r)=>x.isValidElement(s)?x.cloneElement(s,{isLast:r===n.length-1}):s)})},ba={success:l.jsx(wt,{size:20,className:"text-green-500"}),error:l.jsx(Is,{size:20,className:"text-red-500"}),warning:l.jsx(rn,{size:20,className:"text-amber-500"}),info:l.jsx(kt,{size:20,className:"text-blue-500"}),default:l.jsx(kt,{size:20,className:"text-foreground"})},va={success:"border-green-500/20 bg-green-500/10",error:"border-red-500/20 bg-red-500/10",warning:"border-amber-500/20 bg-amber-500/10",info:"border-blue-500/20 bg-blue-500/10",default:"border-border bg-background"},em=({toasts:e,removeToast:t})=>l.jsx("div",{className:"fixed bottom-4 right-4 z-[9999] flex flex-col gap-3 p-4 max-w-sm w-full pointer-events-none",children:l.jsx(de,{children:e.map(n=>l.jsxs(z.div,{initial:{opacity:0,y:20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.95,transition:{duration:.2}},layout:!0,className:`pointer-events-auto relative flex items-start gap-4 p-4 rounded-xl border shadow-lg backdrop-blur-md ${va[n.variant]||va.default}`,children:[l.jsx("div",{className:"mt-0.5 shrink-0",children:ba[n.variant]||ba.default}),l.jsxs("div",{className:"flex-1",children:[n.title&&l.jsx("h4",{className:"font-bold text-sm text-foreground mb-1",children:n.title}),n.description&&l.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:n.description})]}),l.jsx("button",{onClick:()=>t(n.id),className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors cursor-pointer",children:l.jsx(Ae,{size:16})})]},n.id))})}),wa=x.createContext(),tm=()=>{const e=x.useContext(wa);if(!e)throw new Error("useToast must be used within a ToastProvider");return e},nm=({children:e})=>{const[t,n]=x.useState([]),s=x.useCallback(({title:i,description:a,variant:c="default",duration:u=5e3})=>{const d=Math.random().toString(36).substr(2,9);n(f=>[...f,{id:d,title:i,description:a,variant:c,duration:u}]),u!==1/0&&setTimeout(()=>{r(d)},u)},[]),r=x.useCallback(i=>{n(a=>a.filter(c=>c.id!==i))},[]),o={success:(i,a)=>s({title:i,description:a,variant:"success"}),error:(i,a)=>s({title:i,description:a,variant:"error"}),warning:(i,a)=>s({title:i,description:a,variant:"warning"}),info:(i,a)=>s({title:i,description:a,variant:"info"}),custom:i=>s(i),dismiss:i=>r(i)};return l.jsxs(wa.Provider,{value:{toast:o},children:[e,l.jsx(em,{toasts:t,removeToast:r})]})},ka=x.createContext(),sm=({children:e,defaultTheme:t="light"})=>{const[n,s]=x.useState(()=>{if(typeof window>"u")return!1;const i=new URLSearchParams(window.location.search).get("theme");if(i)return i==="dark";const a=localStorage.getItem("theme");return a?a==="dark":window.matchMedia("(prefers-color-scheme: dark)").matches});x.useEffect(()=>{n?(document.documentElement.classList.add("dark"),localStorage.setItem("theme","dark")):(document.documentElement.classList.remove("dark"),localStorage.setItem("theme","light"))},[n]);const r=()=>s(o=>!o);return l.jsx(ka.Provider,{value:{isDark:n,toggleTheme:r,setIsDark:s},children:e})},rm=()=>{const e=x.useContext(ka);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e};L.Accordion=Nh,L.Alert=Eh,L.AuthPage=Vh,L.Avatar=Mh,L.Badge=ma,L.Button=ye,L.Card=xt,L.Checkbox=Cs,L.ConfirmationModal=Dh,L.Dropdown=Lh,L.Dropzone=Rh,L.Input=Ue,L.Modal=pa,L.NotificationCenter=Ih,L.Pagination=Oh,L.PortalTooltip=zh,L.ProgressCircle=Fh,L.Radio=_h,L.Sidebar=Bh,L.SidebarItem=$h,L.Slider=Wh,L.Spinner=Uh,L.StatsCard=Gh,L.Switch=Kh,L.SyncProgressHUD=Hh,L.SyncProvider=Yh,L.Table=Xh,L.Tabs=Zh,L.TagInput=qh,L.ThemeProvider=sm,L.Timeline=Qh,L.TimelineItem=Jh,L.ToastProvider=nm,L.cn=D,L.useSync=ya,L.useTheme=rm,L.useToast=tm,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})}));
169
+ //# sourceMappingURL=renderloom.umd.cjs.map