renderloom 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/renderloom.css +1 -1
- package/dist/renderloom.js +1263 -1205
- package/dist/renderloom.js.map +1 -1
- package/dist/renderloom.umd.cjs +42 -32
- package/dist/renderloom.umd.cjs.map +1 -1
- package/package.json +4 -3
package/dist/renderloom.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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,
|
|
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,Sa){"use strict";var ja;function Ca(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=Ca(x);var vt={exports:{}},nt={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var As;function
|
|
9
|
+
*/var As;function Na(){if(As)return nt;As=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
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,145 +14,155 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Ps;function
|
|
17
|
+
*/var Ps;function Aa(){return Ps||(Ps=1,process.env.NODE_ENV!=="production"&&(function(){function e(k){if(k==null)return null;if(typeof k=="function")return k.$$typeof===_?null:k.displayName||k.name||null;if(typeof k=="string")return k;switch(k){case y:return"Fragment";case b:return"Profiler";case w:return"StrictMode";case M:return"Suspense";case O:return"SuspenseList";case V:return"Activity"}if(typeof k=="object")switch(typeof k.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),k.$$typeof){case p:return"Portal";case j:return k.displayName||"Context";case v:return(k._context.displayName||"Context")+".Consumer";case S:var R=k.render;return k=k.displayName,k||(k=R.displayName||R.name||"",k=k!==""?"ForwardRef("+k+")":"ForwardRef"),k;case T:return R=k.displayName||null,R!==null?R:e(k.type)||"Memo";case E:R=k._payload,k=k._init;try{return e(k(R))}catch{}}return null}function t(k){return""+k}function n(k){try{t(k);var R=!1}catch{R=!0}if(R){R=console;var U=R.error,X=typeof Symbol=="function"&&Symbol.toStringTag&&k[Symbol.toStringTag]||k.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.",X),t(k)}}function s(k){if(k===y)return"<>";if(typeof k=="object"&&k!==null&&k.$$typeof===E)return"<...>";try{var R=e(k);return R?"<"+R+">":"<...>"}catch{return"<...>"}}function r(){var k=B.A;return k===null?null:k.getOwner()}function o(){return Error("react-stack-top-frame")}function i(k){if(ce.call(k,"key")){var R=Object.getOwnPropertyDescriptor(k,"key").get;if(R&&R.isReactWarning)return!1}return k.key!==void 0}function a(k,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(k,"key",{get:U,configurable:!0})}function c(){var k=e(this.type);return xe[k]||(xe[k]=!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.")),k=this.props.ref,k!==void 0?k:null}function u(k,R,U,X,Q,se){var K=U.ref;return k={$$typeof:g,type:k,key:R,props:U,_owner:X},(K!==void 0?K:null)!==null?Object.defineProperty(k,"ref",{enumerable:!1,get:c}):Object.defineProperty(k,"ref",{enumerable:!1,value:null}),k._store={},Object.defineProperty(k._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(k,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(k,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Q}),Object.defineProperty(k,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:se}),Object.freeze&&(Object.freeze(k.props),Object.freeze(k)),k}function d(k,R,U,X,Q,se){var K=R.children;if(K!==void 0)if(X)if(oe(K)){for(X=0;X<K.length;X++)f(K[X]);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(k);var Ce=Object.keys(R).filter(function(Qt){return Qt!=="key"});X=0<Ce.length?"{key: someKey, "+Ce.join(": ..., ")+": ...}":"{key: someKey}",P[K+X]||(Ce=0<Ce.length?"{"+Ce.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,
|
|
22
|
+
<%s key={someKey} {...props} />`,X,K,Ce,K),P[K+X]=!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 q in R)q!=="key"&&(U[q]=R[q])}else U=R;return K&&a(U,typeof k=="function"?k.displayName||k.name||"Unknown":k),u(k,K,U,r(),Q,se)}function f(k){h(k)?k._store&&(k._store.validated=1):typeof k=="object"&&k!==null&&k.$$typeof===E&&(k._payload.status==="fulfilled"?h(k._payload.value)&&k._payload.value._store&&(k._payload.value._store.validated=1):k._store&&(k._store.validated=1))}function h(k){return typeof k=="object"&&k!==null&&k.$$typeof===g}var m=x,g=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),v=Symbol.for("react.consumer"),j=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),_=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(k){return k()}};var W,xe={},G=m.react_stack_bottom_frame.bind(m,o)(),ne=J(s(o)),P={};st.Fragment=y,st.jsx=function(k,R,U){var X=1e4>B.recentlyCreatedOwnerStacks++;return d(k,R,U,!1,X?Error("react-stack-top-frame"):G,X?J(s(k)):ne)},st.jsxs=function(k,R,U){var X=1e4>B.recentlyCreatedOwnerStacks++;return d(k,R,U,!0,X?Error("react-stack-top-frame"):G,X?J(s(k)):ne)}})()),st}var Ms;function Pa(){return Ms||(Ms=1,process.env.NODE_ENV==="production"?vt.exports=Na():vt.exports=Aa()),vt.exports}var l=Pa();/**
|
|
23
23
|
* @license lucide-react v0.562.0 - ISC
|
|
24
24
|
*
|
|
25
25
|
* This source code is licensed under the ISC license.
|
|
26
26
|
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/const
|
|
27
|
+
*/const Ma=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()),Es=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(),Va=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
28
28
|
* @license lucide-react v0.562.0 - ISC
|
|
29
29
|
*
|
|
30
30
|
* This source code is licensed under the ISC license.
|
|
31
31
|
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/var
|
|
32
|
+
*/var Da={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
33
|
* @license lucide-react v0.562.0 - ISC
|
|
34
34
|
*
|
|
35
35
|
* This source code is licensed under the ISC license.
|
|
36
36
|
* See the LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/const
|
|
37
|
+
*/const La=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,...Da,width:t,height:t,stroke:e,strokeWidth:s?Number(n)*24/Number(t):n,className:Vs("lucide",r),...!o&&!Va(a)&&{"aria-hidden":"true"},...a},[...i.map(([u,d])=>x.createElement(u,d)),...Array.isArray(o)?o:[o]]));/**
|
|
38
38
|
* @license lucide-react v0.562.0 - ISC
|
|
39
39
|
*
|
|
40
40
|
* This source code is licensed under the ISC license.
|
|
41
41
|
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/const
|
|
42
|
+
*/const Y=(e,t)=>{const n=x.forwardRef(({className:s,...r},o)=>x.createElement(La,{ref:o,iconNode:t,className:Vs(`lucide-${Ma(Es(e))}`,`lucide-${e}`,s),...r}));return n.displayName=Es(e),n};/**
|
|
43
43
|
* @license lucide-react v0.562.0 - ISC
|
|
44
44
|
*
|
|
45
45
|
* This source code is licensed under the ISC license.
|
|
46
46
|
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
-
*/const
|
|
47
|
+
*/const Ra=Y("arrow-down-right",[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]);/**
|
|
48
48
|
* @license lucide-react v0.562.0 - ISC
|
|
49
49
|
*
|
|
50
50
|
* This source code is licensed under the ISC license.
|
|
51
51
|
* See the LICENSE file in the root directory of this source tree.
|
|
52
|
-
*/const
|
|
52
|
+
*/const Ia=Y("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
53
53
|
* @license lucide-react v0.562.0 - ISC
|
|
54
54
|
*
|
|
55
55
|
* This source code is licensed under the ISC license.
|
|
56
56
|
* See the LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/const
|
|
57
|
+
*/const Oa=Y("arrow-up-right",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
|
|
58
58
|
* @license lucide-react v0.562.0 - ISC
|
|
59
59
|
*
|
|
60
60
|
* This source code is licensed under the ISC license.
|
|
61
61
|
* See the LICENSE file in the root directory of this source tree.
|
|
62
|
-
*/const Ds=
|
|
62
|
+
*/const Ds=Y("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
63
|
* @license lucide-react v0.562.0 - ISC
|
|
64
64
|
*
|
|
65
65
|
* This source code is licensed under the ISC license.
|
|
66
66
|
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
-
*/const
|
|
67
|
+
*/const za=Y("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
68
68
|
* @license lucide-react v0.562.0 - ISC
|
|
69
69
|
*
|
|
70
70
|
* This source code is licensed under the ISC license.
|
|
71
71
|
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
-
*/const Ls=
|
|
72
|
+
*/const Ls=Y("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
73
73
|
* @license lucide-react v0.562.0 - ISC
|
|
74
74
|
*
|
|
75
75
|
* This source code is licensed under the ISC license.
|
|
76
76
|
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
-
*/const Rs=
|
|
77
|
+
*/const Rs=Y("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
78
78
|
* @license lucide-react v0.562.0 - ISC
|
|
79
79
|
*
|
|
80
80
|
* This source code is licensed under the ISC license.
|
|
81
81
|
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
-
*/const sn=
|
|
82
|
+
*/const sn=Y("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
83
83
|
* @license lucide-react v0.562.0 - ISC
|
|
84
84
|
*
|
|
85
85
|
* This source code is licensed under the ISC license.
|
|
86
86
|
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
-
*/const Is=
|
|
87
|
+
*/const Is=Y("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
88
|
* @license lucide-react v0.562.0 - ISC
|
|
89
89
|
*
|
|
90
90
|
* This source code is licensed under the ISC license.
|
|
91
91
|
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
-
*/const
|
|
92
|
+
*/const _a=Y("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
93
|
* @license lucide-react v0.562.0 - ISC
|
|
94
94
|
*
|
|
95
95
|
* This source code is licensed under the ISC license.
|
|
96
96
|
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
-
*/const wt=
|
|
97
|
+
*/const wt=Y("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
98
98
|
* @license lucide-react v0.562.0 - ISC
|
|
99
99
|
*
|
|
100
100
|
* This source code is licensed under the ISC license.
|
|
101
101
|
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
-
*/const
|
|
102
|
+
*/const Fa=Y("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
103
|
* @license lucide-react v0.562.0 - ISC
|
|
104
104
|
*
|
|
105
105
|
* This source code is licensed under the ISC license.
|
|
106
106
|
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
-
*/const
|
|
107
|
+
*/const Ba=Y("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
108
|
* @license lucide-react v0.562.0 - ISC
|
|
109
109
|
*
|
|
110
110
|
* This source code is licensed under the ISC license.
|
|
111
111
|
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
-
*/const kt=
|
|
112
|
+
*/const kt=Y("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
113
|
* @license lucide-react v0.562.0 - ISC
|
|
114
114
|
*
|
|
115
115
|
* This source code is licensed under the ISC license.
|
|
116
116
|
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
-
*/const
|
|
117
|
+
*/const $a=Y("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
118
|
* @license lucide-react v0.562.0 - ISC
|
|
119
119
|
*
|
|
120
120
|
* This source code is licensed under the ISC license.
|
|
121
121
|
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
-
*/const
|
|
122
|
+
*/const Wa=Y("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]);/**
|
|
123
123
|
* @license lucide-react v0.562.0 - ISC
|
|
124
124
|
*
|
|
125
125
|
* This source code is licensed under the ISC license.
|
|
126
126
|
* See the LICENSE file in the root directory of this source tree.
|
|
127
|
-
*/const
|
|
127
|
+
*/const Ua=Y("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"}]]);/**
|
|
128
128
|
* @license lucide-react v0.562.0 - ISC
|
|
129
129
|
*
|
|
130
130
|
* This source code is licensed under the ISC license.
|
|
131
131
|
* See the LICENSE file in the root directory of this source tree.
|
|
132
|
-
*/const
|
|
132
|
+
*/const Ga=Y("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);/**
|
|
133
133
|
* @license lucide-react v0.562.0 - ISC
|
|
134
134
|
*
|
|
135
135
|
* This source code is licensed under the ISC license.
|
|
136
136
|
* See the LICENSE file in the root directory of this source tree.
|
|
137
|
-
*/const
|
|
137
|
+
*/const Os=Y("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"}]]);/**
|
|
138
138
|
* @license lucide-react v0.562.0 - ISC
|
|
139
139
|
*
|
|
140
140
|
* This source code is licensed under the ISC license.
|
|
141
141
|
* See the LICENSE file in the root directory of this source tree.
|
|
142
|
-
*/const
|
|
142
|
+
*/const Ka=Y("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
|
|
143
143
|
* @license lucide-react v0.562.0 - ISC
|
|
144
144
|
*
|
|
145
145
|
* This source code is licensed under the ISC license.
|
|
146
146
|
* See the LICENSE file in the root directory of this source tree.
|
|
147
|
-
*/const Ne=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 Ae={},_s=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Fs(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,Ga=(e,t)=>n=>t(e(n)),rt=(...e)=>e.reduce(Ga),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,Ka=1e-7,Ya=12;function Ha(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)>Ka&&++a<Ya);return i}function ot(e,t,n,s){if(e===t&&n===s)return fe;const r=o=>Ha(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),Xa=ot(.42,0,1,1),qa=ot(0,0,.58,1),Qs=ot(.42,0,.58,1),Za=e=>Array.isArray(e)&&typeof e[0]!="number",er=e=>Array.isArray(e)&&typeof e[0]=="number",tr={linear:fe,easeIn:Xa,easeInOut:Qs,easeOut:qa,circIn:hn,circInOut:Js,circOut:Zs,backIn:fn,backInOut:Xs,backOut:Hs,anticipate:qs},Ja=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(Ja(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 Qa(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 el=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]=Qa(o),b),{}),{setup:a,read:c,resolveKeyframes:u,preUpdate:d,update:f,preRender:h,render:m,postRender:g}=i,p=()=>{const b=Ae.useManualTiming,j=b?r.timestamp:performance.now();n=!1,b||(r.delta=s?1e3/60:Math.max(Math.min(j-r.timestamp,el),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]=(M,O=!1,k=!1)=>(n||y(),S.schedule(M,O,k)),b},{}),cancel:b=>{for(let j=0;j<St.length;j++)i[St[j]].cancel(b)},state:r,steps:i}}const{schedule:F,cancel:Pe,state:re,steps:mn}=sr(typeof requestAnimationFrame<"u"?requestAnimationFrame:fe,!0);let Ct;function tl(){Ct=void 0}const ae={now:()=>(Ct===void 0&&ae.set(re.isProcessing||Ae.useManualTiming?re.timestamp:performance.now()),Ct),set:e=>{Ct=e,queueMicrotask(tl)}},rr=e=>t=>typeof t=="string"&&t.startsWith(e),ir=rr("--"),nl=rr("var(--"),pn=e=>nl(e)?sl.test(e.split("/*")[0].trim()):!1,sl=/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)},Nt={...Ke,default:1},lt=e=>Math.round(e*1e5)/1e5,gn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function rl(e){return e==null}const il=/^(?:#[\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"&&il.test(n)&&n.startsWith(e)||t&&!rl(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}},ol=e=>be(0,255,e),xn={...Ke,transform:e=>Math.round(ol(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 al(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:al,transform:Ie.transform},ct=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Me=ct("deg"),ve=ct("%"),A=ct("px"),ll=ct("vh"),cl=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)}},ul=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function dl(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(gn))==null?void 0:t.length)||0)+(((n=e.match(ul))==null?void 0:n.length)||0)>0}const cr="number",ur="color",fl="var",hl="var(",dr="${}",ml=/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(ml,c=>(Z.test(c)?(s.color.push(o),r.push(ur),n.push(Z.parse(c))):c.startsWith(hl)?(s.var.push(o),r.push(fl),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 pl(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 gl(e){return fr(He(e))}const yl=e=>typeof e=="number"?0:Z.test(e)?Z.getAnimatableNone(e):e,xl=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:yl(e);function bl(e){const t=He(e);return fr(t)(t.values.map((s,r)=>xl(s,t.split[r])))}const me={test:dl,parse:pl,createTransformer:gl,getAnimatableNone:bl};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 vl({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 At(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)},wl=[bn,Ie,Ye],kl=e=>wl.find(t=>t.test(e));function hr(e){const t=kl(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=vl(n)),n}const mr=(e,t)=>{const n=hr(e),s=hr(t);if(!n||!s)return At(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 Tl(e,t){return kn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function jl(e,t){return n=>$(e,t,n)}function Tn(e){return typeof e=="number"?jl:typeof e=="string"?pn(e)?At:Z.test(e)?mr:Nl:Array.isArray(e)?pr:typeof e=="object"?Z.test(e)?mr:Sl:At}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 Sl(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 Cl(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 Nl=(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?Tl(e,t):rt(pr(Cl(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"),At(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)=>F.update(t,n),stop:()=>Pe(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)})`},Pt=2e4;function jn(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<Pt;)t+=n,s=e.next(t);return t>=Pt?1/0:t}function Pl(e,t=100,n){const s=n({...e,keyframes:[0,t]}),r=Math.min(jn(s),Pt);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 Ml=12;function El(e,t,n){let s=n;for(let r=1;r<Ml;r++)s=s-e(s)/t(s);return s}const Cn=.001;function Vl({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 Dl=["duration","bounce"],Ll=["stiffness","damping","mass"];function xr(e,t){return t.some(n=>e[n]!==void 0)}function Rl(e){let t={velocity:Y.velocity,stiffness:Y.stiffness,damping:Y.damping,mass:Y.mass,isResolvedFromDuration:!1,...e};if(!xr(e,Ll)&&xr(e,Dl))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=Vl({...e,velocity:0});t={...t,...n,mass:Y.mass},t.isResolvedFromDuration=!0}return t}function Mt(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}=Rl({...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,M,O,k;if(p<1)S=Sn(T,p),M=(g+p*T*y)/S,b=V=>{const _=Math.exp(-p*T*V);return i-_*(M*Math.sin(S*V)+y*Math.cos(S*V))},O=p*T*M+y*S,k=p*T*y-M*S,j=V=>Math.exp(-p*T*V)*(O*Math.sin(S*V)+k*Math.cos(S*V));else if(p===1){b=_=>i-Math.exp(-T*_)*(y+(g+T*y)*_);const V=g+T*y;j=_=>Math.exp(-T*_)*(T*V*_-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 _=(g+p*T*y)/V,B=p*T*_-y*V,ce=p*T*y-_*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 E={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*(M*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 _=b(V);if(m)a.done=V>=f;else{const B=ue(j(V));a.done=Math.abs(B)<=s&&Math.abs(i-_)<=r}return a.value=a.done?i:_,a},toString:()=>{const V=Math.min(jn(E),Pt),_=yr(B=>E.next(V*B).value,V,30);return V+"ms "+_},toTransition:()=>{}};return E}Mt.applyToOptions=e=>{const t=Pl(e,100,Mt);return e.ease=t.ease,e.duration=ue(t.duration),e.type="keyframes",e};const Il=5;function br(e,t,n){const s=Math.max(t-Il,0);return Ws(n-e(s),t-s)}function Nn({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 E=w(k),V=b(k);h.done=Math.abs(E)<=u,h.value=h.done?T:V};let S,M;const O=k=>{m(h.value)&&(S=k,M=Mt({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 E=!1;return!M&&S===void 0&&(E=!0,j(k),O(k)),S!==void 0&&k>=S?M.next(k-S):(!E&&j(k),h)}}}function Ol(e,t,n){const s=[],r=n||Ae.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 zl(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=Ol(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 _l(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 _l(t,e.length-1),t}function Bl(e,t){return e.map(n=>n*t)}function $l(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=Za(s)?s.map(nr):nr(s),o={done:!1,value:t[0]},i=Bl(n&&n.length===t.length?n:Fl(t),e),a=zl(i,t,{ease:Array.isArray(r)?r:$l(t,r)});return{calculatedDuration:e,next:c=>(o.value=a(c),o.done=c>=e,o)}}const Wl=e=>e!==null;function Et(e,{repeat:t,repeatType:n="loop"},s,r=1){const o=e.filter(Wl),a=r<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const Ul={decay:Nn,inertia:Nn,tween:Xe,keyframes:Xe,spring:Mt};function vr(e){typeof e.type=="string"&&(e.type=Ul[e.type])}class An{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 Gl=e=>e/100;class Vt extends An{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(Gl,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 E=Math.floor(k),V=k%1;!V&&k>=1&&(V=1),V===1&&E--,E=Math.min(E,f+1),!!(E%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:M}=S;!w&&c!==null&&(M=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return O&&g!==Nn&&(S.value=Et(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 Kl(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Oe=e=>e*180/Math.PI,Pn=e=>{const t=Oe(Math.atan2(e[1],e[0]));return Mn(t)},Yl={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Pn,rotateZ:Pn,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},Mn=e=>(e=e%360,e<0&&(e+=360),e),wr=Pn,kr=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Tr=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Hl={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:kr,scaleY:Tr,scale:e=>(kr(e)+Tr(e))/2,rotateX:e=>Mn(Oe(Math.atan2(e[6],e[5]))),rotateY:e=>Mn(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 En(e){return e.includes("scale")?1:0}function Vn(e,t){if(!e||e==="none")return En(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,r;if(n)s=Hl,r=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Yl,r=a}if(!r)return En(t);const o=s[t],i=r[1].split(",").map(ql);return typeof o=="function"?o(i):i[o]}const Xl=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Vn(n,t)};function ql(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===A,Zl=new Set(["x","y","z"]),Jl=qe.filter(e=>!Zl.has(e));function Ql(e){const t=[];return Jl.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const Ee={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")};Ee.translateX=Ee.x,Ee.translateY=Ee.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=Ql(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 ec(){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,F.read(Cr),F.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])}Kl(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 tc=e=>e.startsWith("--");function Nr(e,t,n){tc(t)?e.style.setProperty(t,n):e.style[t]=n}const nc={};function Ar(e,t){const n=$s(e);return()=>nc[t]??n()}const sc=Ar(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Pr=Ar(()=>{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})`,Mr={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 Er(e,t){if(e)return typeof e=="function"?Pr()?yr(e,t):"ease-out":er(e)?ut(e):Array.isArray(e)?e.map(n=>Er(n,t)||Mr.easeOut):Mr[e]}function rc(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=Er(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 ic({type:e,...t}){return Vr(e)&&Pr()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Dr extends An{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=ic(t);this.animation=rc(n,s,r,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const d=Et(r,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(d),Nr(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&&sc()?(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 oc(e){return e in Lr}function ac(e){typeof e.ease=="string"&&oc(e.ease)&&(e.ease=Lr[e.ease])}const On=10;class lc extends Dr{constructor(t){ac(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&&Nr(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 cc(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 uc(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:cc(e)||(n==="spring"||Vr(n))&&s}function zn(e){e.duration=0,e.type="keyframes"}const Ir=new Set(["opacity","clipPath","filter","transform"]),dc=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function fc(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&dc.test(e[t]))return!0;return!1}const hc=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),mc=$s(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function pc(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 mc()&&n&&(Ir.has(n)||hc.has(n)&&fc(a))&&(n!=="transform"||!d)&&!u&&!s&&r!=="mirror"&&o!==0&&i!=="inertia"}const gc=40;class yc extends An{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;uc(t,o,i,a)||(f=!1,(Ae.instantAnimations||!c)&&(d==null||d(Et(t,s,n))),t[0]=t[t.length-1],zn(s),s.repeat=0);const m={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>gc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},g=f&&!u&&pc(m),p=(w=(T=m.motionValue)==null?void 0:T.owner)==null?void 0:w.current;let y;if(g)try{y=new lc({...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(),ec()),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 xc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function bc(e){const t=xc.exec(e);if(!t)return[,];const[,n,s,r]=t;return[`--${n??s}`,r]}const vc=4;function zr(e,t,n=1){je(n<=vc,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,r]=bc(e);if(!s)return;const o=window.getComputedStyle(t).getPropertyValue(s);if(o){const i=o.trim();return _s(i)?parseFloat(i):i}return pn(r)?zr(r,t,n+1):r}const wc={type:"spring",stiffness:500,damping:25,restSpeed:10},kc=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Tc={type:"keyframes",duration:.8},jc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Sc=(e,{keyframes:t})=>t.length>2?Tc:Ze.has(e)?e.startsWith("scale")?kc(t[1]):wc:jc;function _r(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...s}=e;return{...t,...s}}return e}function _n(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?_r(n,e):n}const Cc=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Nc(e){for(const t in e)if(!Cc.has(t))return!0;return!1}const Fn=(e,t,n,s={},r,o)=>i=>{const a=_n(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};Nc(a)||Object.assign(d,Sc(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)),(Ae.instantAnimations||Ae.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=Et(d.keyframes,a);if(h!==void 0){F.update(()=>{d.onUpdate(h),d.onComplete()});return}}return a.isSync?new Vt(d):new yc(d)};function Fr(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]=Fr(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]=Fr(s);t=t(n!==void 0?n:e.custom,r,o)}return t}function _e(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(),F.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 Mc(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 Vc(e,t){const n=_e(e,t);let{transitionEnd:s={},transition:r={},...o}=n||{};o={...o,...s};for(const i in o){const a=Ec(o[i]);Mc(e,i,a)}}const ie=e=>!!(e&&e.getVelocity);function Dc(e){return!!(ie(e)&&e.add)}function Wn(e,t){const n=e.getValue("willChange");if(Dc(n))return n.add(t);if(!n&&Ae.WillChange){const s=new Ae.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 Lc({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?_r(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&&Lc(f,h))continue;const p={delay:n,..._n(o||{},h)},y=m.get();if(y!==void 0&&!m.isAnimating()&&!Array.isArray(g)&&g===y&&!p.velocity){F.update(()=>m.set(g));continue}let T=!1;if(window.MotionHandoffAnimation){const j=Ur(e);if(j){const S=window.MotionHandoffAnimation(j,h,F);S!==null&&(p.startTime=S,T=!0)}}Wn(e,h);const w=u??e.shouldReduceMotion;m.start(Fn(h,m,g,w&&Br.has(h)?{type:!1}:p,e,T));const b=m.animation;b&&d.push(b)}if(i){const h=()=>F.update(()=>{i&&Vc(e,i)});d.length?Promise.all(d).then(h):h()}return d}function Gn(e,t,n={}){var c;const s=_e(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 Rc(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 Rc(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 Ic(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"?_e(e,t,n.custom):t;s=Promise.all(Gr(e,r,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}const Oc={test:e=>e==="auto",parse:e=>e},Kr=e=>t=>t.test(e),Yr=[Ke,A,ve,Me,cl,ll,Oc],Hr=e=>Yr.find(Kr(e));function zc(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Bs(e):!0}const _c=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=_c.has(t)?1:0;return s!==n&&(o*=100),t+"("+o+r+")"}const Bc=/\b([a-z-]*)\(.*?\)/gu,Kn={...me,getAnimatableNone:e=>{const t=e.match(Bc);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:A,borderTopWidth:A,borderRightWidth:A,borderBottomWidth:A,borderLeftWidth:A,borderRadius:A,borderTopLeftRadius:A,borderTopRightRadius:A,borderBottomRightRadius:A,borderBottomLeftRadius:A,width:A,maxWidth:A,height:A,maxHeight:A,top:A,right:A,bottom:A,left:A,inset:A,insetBlock:A,insetBlockStart:A,insetBlockEnd:A,insetInline:A,insetInlineStart:A,insetInlineEnd:A,padding:A,paddingTop:A,paddingRight:A,paddingBottom:A,paddingLeft:A,paddingBlock:A,paddingBlockStart:A,paddingBlockEnd:A,paddingInline:A,paddingInlineStart:A,paddingInlineEnd:A,margin:A,marginTop:A,marginRight:A,marginBottom:A,marginLeft:A,marginBlock:A,marginBlockStart:A,marginBlockEnd:A,marginInline:A,marginInlineStart:A,marginInlineEnd:A,fontSize:A,backgroundPositionX:A,backgroundPositionY:A,...{rotate:Me,rotateX:Me,rotateY:Me,rotateZ:Me,scale:Nt,scaleX:Nt,scaleY:Nt,scaleZ:Nt,skew:Me,skewX:Me,skewY:Me,distance:A,translateX:A,translateY:A,translateZ:A,x:A,y:A,z:A,perspective:A,transformPerspective:A,opacity:at,originX:lr,originY:lr,originZ:A},zIndex:Xr,fillOpacity:at,strokeOpacity:at,numOctaves:Xr},$c={...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=>$c[e],Wc=new Set([Kn,Yn]);function Zr(e,t){let n=qr(e);return Wc.has(n)||(n=me),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Uc=new Set(["auto","none","0"]);function Gc(e,t,n){let s=0,r;for(;s<e.length&&!r;){const o=e[s];typeof o=="string"&&!Uc.has(o)&&He(o).values.length&&(r=e[s]),s++}if(r&&n)for(const o of t)e[o]=Zr(n,r)}class Kc 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&&Ee[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 Ee[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let r=0;r<t.length;r++)(t[r]===null||zc(t[r]))&&s.push(r);s.length&&Gc(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=Ee[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]=Ee[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 Fs(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 Yc(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 Hc(e){return!(e.pointerType==="touch"||ei())}function Xc(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(!Hc(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,qc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Zc(e){return qc.has(e.tagName)||e.isContentEditable===!0}const Jc=new Set(["INPUT","SELECT","TEXTAREA"]);function Qc(e){return Jc.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 eu=(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 tu(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=>eu(u,r)),!Zc(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Jn(e){return Fs(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],nu=oi("inline","width","offsetWidth"),su=oi("block","height","offsetHeight");function ru({target:e,borderBoxSize:t}){var n;(n=Rt.get(e))==null||n.forEach(s=>{s(e,{get width(){return nu(e,t)},get height(){return su(e,t)}})})}function iu(e){e.forEach(ru)}function ou(){typeof ResizeObserver>"u"||(Ve=new ResizeObserver(iu))}function au(e,t){Ve||ou();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 lu(){Qe=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};It.forEach(t=>t(e))},window.addEventListener("resize",Qe)}function cu(e){return It.add(e),Qe||lu(),()=>{It.delete(e),!It.size&&typeof Qe=="function"&&(window.removeEventListener("resize",Qe),Qe=void 0)}}function ai(e,t){return typeof e=="function"?cu(e):au(e,t)}function uu(e){return Jn(e)&&e.tagName==="svg"}const du=[...Yr,Z,me],fu=e=>du.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()}),hu=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 mu(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},pu=typeof window<"u";function gu(){if(di.current=!0,!!pu)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 _t={};function hi(e){_t=e}function yu(){return _t}class xu{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,F.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,hu.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||gu(),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(),Pe(this.notifyUpdate),Pe(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&&F.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 _t){const n=_t[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=mu(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const s=this.values.get(t);n!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&n!==void 0&&(s=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"&&(_s(s)||Bs(s))?s=parseFloat(s):!fu(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 xu{constructor(){super(...arguments),this.KeyframeResolver=Kc}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 bu({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function vu(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 Fe(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 Ft(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=Ft(e,r,s)),Ft(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 wu(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&&Fe(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(vu(e.getBoundingClientRect(),t))}function ku(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 Tu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ju=qe.length;function Su(e,t,n){let s="",r=!0;for(let o=0;o<ju;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=Tu[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=Su(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(A.test(e))e=parseFloat(e);else return e;const n=Ci(e,t.target.x),s=Ci(e,t.target.y);return`${n}% ${s}%`}},Cu={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:Cu};function Ni(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])||Ni(a,e)||((i=n==null?void 0:n.getValue(a))==null?void 0:i.liveStyle)!==void 0)&&(o[a]=s[a]);return o}function Nu(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?En(n):Xl(t,n);{const r=Nu(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"},Mu={offset:"strokeDashoffset",array:"strokeDasharray"};function Eu(e,t,n=1,s=0,r=!0){e.pathLength=1;const o=r?Pu:Mu;e[o.offset]=`${-s}`,e[o.array]=`${t} ${n}`}const Vu=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Ai(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 Vu)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 Pi=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"]),Mi=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Du(e,t,n,s){Si(e,t,void 0,s);for(const r in t.attrs)e.setAttribute(Pi.has(r)?r:Un(r),t.attrs[r])}function Ei(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 Lu 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=Pi.has(n)?n:Un(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return Ei(t,n,s)}build(t,n,s){Ai(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,r){Du(t,n,s,r)}mount(t){this.isSVGTag=Mi(t.tagName),super.mount(t)}}const Ru=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<Ru;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 Iu=[...Qn].reverse(),Ou=Qn.length;function zu(e){return t=>Promise.all(t.map(({animation:n,options:s})=>Ic(e,n,s)))}function _u(e){let t=zu(e),n=Li(),s=!0,r=!1;const o=u=>(d,f)=>{var m;const h=_e(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<Ou;T++){const w=Iu[T],b=n[w],j=d[w]!==void 0?d[w]:f[w],S=dt(j),M=w===u?b.isActive:null;M===!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&&M===null||!j&&!b.prevProp||Ot(j)||typeof j=="boolean")continue;if(w==="exit"&&b.isActive&&M!==!0){b.prevResolvedValues&&(g={...g,...b.prevResolvedValues});continue}const k=Fu(b.prevProp,j);let E=k||w===u&&b.isActive&&!O&&S||T>p&&S,V=!1;const _=Array.isArray(j)?j:[j];let B=_.reduce(o(w),{});M===!1&&(B={});const{prevResolvedValues:ce={}}=b,oe={...ce,...B},J=G=>{E=!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],P=ce[G];if(g.hasOwnProperty(G))continue;let v=!1;$n(ne)&&$n(P)?v=!Di(ne,P):v=ne!==P,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&&(E=!1);const W=O&&k;E&&(!W||V)&&h.push(..._.map(G=>{const ne={type:w};if(typeof G=="string"&&(s||r)&&!W&&e.manuallyAnimateOnMount&&e.parent){const{parent:P}=e,v=_e(P,G);if(P.enteringChildren&&v){const{delayChildren:R}=v.transition||{};ne.delay=Or(P.enteringChildren,e,R)}}return{animation:G,options:ne}}))}if(m.size){const T={};if(typeof d.initial!="boolean"){const w=_e(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,Bu=1-Ii,$u=1+Ii,Oi=.01,Wu=0-Oi,Uu=0+Oi;function le(e){return e.max-e.min}function Gu(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>=Bu&&e.scale<=$u||isNaN(e.scale))&&(e.scale=1),(e.translate>=Wu&&e.translate<=Uu||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 _i(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 Ku(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 Fi(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){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 Bi(e,t,n,s,r){return e-=t,e=Ft(e,1/n,s),r!==void 0&&(e=Ft(e,1/r,s)),e}function Yu(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){Yu(e,t[n],t[s],t[r],t.scale,o,i)}const Hu=["x","scaleX","originX"],Xu=["y","scaleY","originY"];function Wi(e,t,n,s){$i(e.x,t,Hu,n?n.x:void 0,s?s.x:void 0),$i(e.y,t,Xu,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 qu(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 Zu(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"],Ju=Zi.length,Ji=e=>typeof e=="string"?parseFloat(e):e,Qi=e=>typeof e=="number"||A.test(e);function Qu(e,t,n,s,r,o){r?(e.opacity=$(0,n.opacity??1,ed(s)),e.opacityExit=$(t.opacity??1,0,td(s))):o&&(e.opacity=$(t.opacity??1,n.opacity??1,s));for(let i=0;i<Ju;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 ed=to(0,.5,Zs),td=to(.5,.95,fe);function to(e,t,n){return s=>s<e?0:s>t?1:n(it(e,t,s))}function nd(e,t,n){const s=ie(e)?e:Je(e);return s.start(Fn("",s,t,n)),s.animation}function mt(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}const sd=(e,t)=>e.depth-t.depth;class rd{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(sd),this.isDirty=!1,this.children.forEach(t)}}function id(e,t){const n=ae.now(),s=({timestamp:r})=>{const o=r-n;o>=t&&(Pe(s),e(o-t))};return F.setup(s,!0),()=>Pe(s)}function Wt(e){return ie(e)?e.get():e}class od{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"],ad=1e3;let ld=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",F,!(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=ld++,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(dd),this.nodes.forEach(yd),this.nodes.forEach(xd),this.nodes.forEach(fd)},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 rd)}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)&&!uu(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;F.read(()=>{f=window.innerWidth}),e(i,()=>{const m=window.innerWidth;m!==f&&(f=m,this.root.updateBlockedByResize=!0,d&&d(),d=id(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()||Td,{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={..._n(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(),Pe(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(bd),this.animationId++)}getTransformTemplate(){const{visualElement: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(md),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(pd),this.nodes.forEach(gd),this.nodes.forEach(cd),this.nodes.forEach(ud)):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(hd),this.sharedNodes.forEach(vd)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,F.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){F.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||Fe(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)),jd(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(Sd))){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)),Fe(m.latestValues)&&Bt(u,m.latestValues,(d=m.layout)==null?void 0:d.layoutBox)}return Fe(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(!Fe(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 Fe(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(),Ku(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;wu(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(kd));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),wd(this.relativeTarget,this.relativeTargetOrigin,h,S),b&&qu(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=ee()),ge(b,this.relativeTarget)),p&&(this.animationValues=d,Qu(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&&(Pe(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=F.update(()=>{Ut.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Je(0)),this.motionValue.jump(0,!1),this.currentAnimation=nd(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(ad),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 od),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&&!Fe(this.latestValues)&&(i.transform=c?c({},""):"none",this.hasProjected=!1);return}i.visibility="";const d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=Zu(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 cd(e){e.updateLayout()}function ud(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 dd(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 fd(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function hd(e){e.clearSnapshot()}function ro(e){e.clearMeasurements()}function md(e){e.isLayoutDirty=!0,e.updateLayout()}function io(e){e.isLayoutDirty=!1}function pd(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function gd(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 yd(e){e.resolveTargetDelta()}function xd(e){e.calcProjection()}function bd(e){e.resetSkewAndRotation()}function vd(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 wd(e,t,n,s){lo(e.x,t.x,n.x,s),lo(e.y,t.y,n.y,s)}function kd(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Td={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 jd(e){fo(e.x),fo(e.y)}function ho(e,t,n){return e==="position"||e==="preserve-aspect"&&!Gu(Xi(t),Xi(n),.2)}function Sd(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Cd=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 Cd({});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 Nd(...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(Nd(...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 Md({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 M=r??document.head;return M.appendChild(S),S.sheet&&S.sheet.insertRule(`
|
|
147
|
+
*/const Ya=Y("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"}]]);/**
|
|
148
|
+
* @license lucide-react v0.562.0 - ISC
|
|
149
|
+
*
|
|
150
|
+
* This source code is licensed under the ISC license.
|
|
151
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
152
|
+
*/const rn=Y("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"}]]);/**
|
|
153
|
+
* @license lucide-react v0.562.0 - ISC
|
|
154
|
+
*
|
|
155
|
+
* This source code is licensed under the ISC license.
|
|
156
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
157
|
+
*/const Ne=Y("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"&&((ja=process.env)==null?void 0:ja.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 Ae={},_s=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Fs(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,Ha=(e,t)=>n=>t(e(n)),rt=(...e)=>e.reduce(Ha),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,Xa=1e-7,qa=12;function Za(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)>Xa&&++a<qa);return i}function ot(e,t,n,s){if(e===t&&n===s)return fe;const r=o=>Za(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),Ja=ot(.42,0,1,1),Qa=ot(0,0,.58,1),Qs=ot(.42,0,.58,1),el=e=>Array.isArray(e)&&typeof e[0]!="number",er=e=>Array.isArray(e)&&typeof e[0]=="number",tr={linear:fe,easeIn:Ja,easeInOut:Qs,easeOut:Qa,circIn:hn,circInOut:Js,circOut:Zs,backIn:fn,backInOut:Xs,backOut:Hs,anticipate:qs},tl=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(tl(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 nl(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 sl=40;function sr(e,t){let n=!1,s=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=St.reduce((v,j)=>(v[j]=nl(o),v),{}),{setup:a,read:c,resolveKeyframes:u,preUpdate:d,update:f,preRender:h,render:m,postRender:g}=i,p=()=>{const v=Ae.useManualTiming,j=v?r.timestamp:performance.now();n=!1,v||(r.delta=s?1e3/60:Math.max(Math.min(j-r.timestamp,sl),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((v,j)=>{const S=i[j];return v[j]=(M,O=!1,T=!1)=>(n||y(),S.schedule(M,O,T)),v},{}),cancel:v=>{for(let j=0;j<St.length;j++)i[St[j]].cancel(v)},state:r,steps:i}}const{schedule:F,cancel:Pe,state:re,steps:mn}=sr(typeof requestAnimationFrame<"u"?requestAnimationFrame:fe,!0);let Ct;function rl(){Ct=void 0}const ae={now:()=>(Ct===void 0&&ae.set(re.isProcessing||Ae.useManualTiming?re.timestamp:performance.now()),Ct),set:e=>{Ct=e,queueMicrotask(rl)}},rr=e=>t=>typeof t=="string"&&t.startsWith(e),ir=rr("--"),il=rr("var(--"),pn=e=>il(e)?ol.test(e.split("/*")[0].trim()):!1,ol=/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)},Nt={...Ke,default:1},lt=e=>Math.round(e*1e5)/1e5,gn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function al(e){return e==null}const ll=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,yn=(e,t)=>n=>!!(typeof n=="string"&&ll.test(n)&&n.startsWith(e)||t&&!al(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}},cl=e=>be(0,255,e),xn={...Ke,transform:e=>Math.round(cl(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 ul(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:ul,transform:Ie.transform},ct=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Me=ct("deg"),ve=ct("%"),A=ct("px"),dl=ct("vh"),fl=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)}},hl=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ml(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(gn))==null?void 0:t.length)||0)+(((n=e.match(hl))==null?void 0:n.length)||0)>0}const cr="number",ur="color",pl="var",gl="var(",dr="${}",yl=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function He(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},r=[];let o=0;const a=t.replace(yl,c=>(Z.test(c)?(s.color.push(o),r.push(ur),n.push(Z.parse(c))):c.startsWith(gl)?(s.var.push(o),r.push(pl),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 xl(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 bl(e){return fr(He(e))}const vl=e=>typeof e=="number"?0:Z.test(e)?Z.getAnimatableNone(e):e,wl=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:vl(e);function kl(e){const t=He(e);return fr(t)(t.values.map((s,r)=>wl(s,t.split[r])))}const me={test:ml,parse:xl,createTransformer:bl,getAnimatableNone:kl};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 Tl({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 At(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)},jl=[bn,Ie,Ye],Sl=e=>jl.find(t=>t.test(e));function hr(e){const t=Sl(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=Tl(n)),n}const mr=(e,t)=>{const n=hr(e),s=hr(t);if(!n||!s)return At(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 Cl(e,t){return kn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Nl(e,t){return n=>$(e,t,n)}function Tn(e){return typeof e=="number"?Nl:typeof e=="string"?pn(e)?At:Z.test(e)?mr:Ml:Array.isArray(e)?pr:typeof e=="object"?Z.test(e)?mr:Al:At}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 Al(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 Pl(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 Ml=(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?Cl(e,t):rt(pr(Pl(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"),At(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 El=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>F.update(t,n),stop:()=>Pe(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)})`},Pt=2e4;function jn(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<Pt;)t+=n,s=e.next(t);return t>=Pt?1/0:t}function Vl(e,t=100,n){const s=n({...e,keyframes:[0,t]}),r=Math.min(jn(s),Pt);return{type:"keyframes",ease:o=>s.next(r*o).value/t,duration:he(r)}}const H={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 Dl=12;function Ll(e,t,n){let s=n;for(let r=1;r<Dl;r++)s=s-e(s)/t(s);return s}const Cn=.001;function Rl({duration:e=H.duration,bounce:t=H.bounce,velocity:n=H.velocity,mass:s=H.mass}){let r,o;Ge(e<=ue(H.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=be(H.minDamping,H.maxDamping,i),e=be(H.minDuration,H.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=Ll(r,o,a);if(e=ue(e),isNaN(c))return{stiffness:H.stiffness,damping:H.damping,duration:e};{const u=Math.pow(c,2)*s;return{stiffness:u,damping:i*2*Math.sqrt(s*u),duration:e}}}const Il=["duration","bounce"],Ol=["stiffness","damping","mass"];function xr(e,t){return t.some(n=>e[n]!==void 0)}function zl(e){let t={velocity:H.velocity,stiffness:H.stiffness,damping:H.damping,mass:H.mass,isResolvedFromDuration:!1,...e};if(!xr(e,Ol)&&xr(e,Il))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:H.mass,stiffness:r,damping:o}}else{const n=Rl({...e,velocity:0});t={...t,...n,mass:H.mass},t.isResolvedFromDuration=!0}return t}function Mt(e=H.visualDuration,t=H.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}=zl({...n,velocity:-he(n.velocity||0)}),g=h||0,p=u/(2*Math.sqrt(c*d)),y=i-o,w=he(Math.sqrt(c/d)),b=Math.abs(y)<5;s||(s=b?H.restSpeed.granular:H.restSpeed.default),r||(r=b?H.restDelta.granular:H.restDelta.default);let v,j,S,M,O,T;if(p<1)S=Sn(w,p),M=(g+p*w*y)/S,v=V=>{const _=Math.exp(-p*w*V);return i-_*(M*Math.sin(S*V)+y*Math.cos(S*V))},O=p*w*M+y*S,T=p*w*y-M*S,j=V=>Math.exp(-p*w*V)*(O*Math.sin(S*V)+T*Math.cos(S*V));else if(p===1){v=_=>i-Math.exp(-w*_)*(y+(g+w*y)*_);const V=g+w*y;j=_=>Math.exp(-w*_)*(w*V*_-g)}else{const V=w*Math.sqrt(p*p-1);v=oe=>{const J=Math.exp(-p*w*oe),W=Math.min(V*oe,300);return i-J*((g+p*w*y)*Math.sinh(W)+V*y*Math.cosh(W))/V};const _=(g+p*w*y)/V,B=p*w*_-y*V,ce=p*w*y-_*V;j=oe=>{const J=Math.exp(-p*w*oe),W=Math.min(V*oe,300);return J*(B*Math.sinh(W)+ce*Math.cosh(W))}}const E={calculatedDuration:m&&f||null,velocity:V=>ue(j(V)),next:V=>{if(!m&&p<1){const B=Math.exp(-p*w*V),ce=Math.sin(S*V),oe=Math.cos(S*V),J=i-B*(M*ce+y*oe),W=ue(B*(O*ce+T*oe));return a.done=Math.abs(W)<=s&&Math.abs(i-J)<=r,a.value=a.done?i:J,a}const _=v(V);if(m)a.done=V>=f;else{const B=ue(j(V));a.done=Math.abs(B)<=s&&Math.abs(i-_)<=r}return a.value=a.done?i:_,a},toString:()=>{const V=Math.min(jn(E),Pt),_=yr(B=>E.next(V*B).value,V,30);return V+"ms "+_},toTransition:()=>{}};return E}Mt.applyToOptions=e=>{const t=Vl(e,100,Mt);return e.ease=t.ease,e.duration=ue(t.duration),e.type="keyframes",e};const _l=5;function br(e,t,n){const s=Math.max(t-_l,0);return Ws(n-e(s),t-s)}function Nn({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=T=>a!==void 0&&T<a||c!==void 0&&T>c,g=T=>a===void 0?c:c===void 0||Math.abs(a-T)<Math.abs(c-T)?a:c;let p=n*t;const y=f+p,w=i===void 0?y:i(y);w!==y&&(p=w-f);const b=T=>-p*Math.exp(-T/s),v=T=>w+b(T),j=T=>{const E=b(T),V=v(T);h.done=Math.abs(E)<=u,h.value=h.done?w:V};let S,M;const O=T=>{m(h.value)&&(S=T,M=Mt({keyframes:[h.value,g(h.value)],velocity:br(v,T,h.value),damping:r,stiffness:o,restDelta:u,restSpeed:d}))};return O(0),{calculatedDuration:null,next:T=>{let E=!1;return!M&&S===void 0&&(E=!0,j(T),O(T)),S!==void 0&&T>=S?M.next(T-S):(!E&&j(T),h)}}}function Fl(e,t,n){const s=[],r=n||Ae.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 Bl(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=Fl(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 $l(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 Wl(e){const t=[0];return $l(t,e.length-1),t}function Ul(e,t){return e.map(n=>n*t)}function Gl(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=el(s)?s.map(nr):nr(s),o={done:!1,value:t[0]},i=Ul(n&&n.length===t.length?n:Wl(t),e),a=Bl(i,t,{ease:Array.isArray(r)?r:Gl(t,r)});return{calculatedDuration:e,next:c=>(o.value=a(c),o.done=c>=e,o)}}const Kl=e=>e!==null;function Et(e,{repeat:t,repeatType:n="loop"},s,r=1){const o=e.filter(Kl),a=r<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const Yl={decay:Nn,inertia:Nn,tween:Xe,keyframes:Xe,spring:Mt};function vr(e){typeof e.type=="string"&&(e.type=Yl[e.type])}class An{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 Hl=e=>e/100;class Vt extends An{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(Hl,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 w=this.currentTime-u*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?w<0:w>r;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,j=s;if(f){const T=Math.min(this.currentTime,r)/a;let E=Math.floor(T),V=T%1;!V&&T>=1&&(V=1),V===1&&E--,E=Math.min(E,f+1),!!(E%2)&&(h==="reverse"?(V=1-V,m&&(V-=m/a)):h==="mirror"&&(j=i)),v=be(0,1,V)*a}let S;b?(this.delayState.value=d[0],S=this.delayState):S=j.next(v),o&&!b&&(S.value=o(S.value));let{done:M}=S;!b&&c!==null&&(M=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return O&&g!==Nn&&(S.value=Et(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=El,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 Xl(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Oe=e=>e*180/Math.PI,Pn=e=>{const t=Oe(Math.atan2(e[1],e[0]));return Mn(t)},ql={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Pn,rotateZ:Pn,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},Mn=e=>(e=e%360,e<0&&(e+=360),e),wr=Pn,kr=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Tr=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Zl={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=>Mn(Oe(Math.atan2(e[6],e[5]))),rotateY:e=>Mn(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 En(e){return e.includes("scale")?1:0}function Vn(e,t){if(!e||e==="none")return En(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,r;if(n)s=Zl,r=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=ql,r=a}if(!r)return En(t);const o=s[t],i=r[1].split(",").map(Ql);return typeof o=="function"?o(i):i[o]}const Jl=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Vn(n,t)};function Ql(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===A,ec=new Set(["x","y","z"]),tc=qe.filter(e=>!ec.has(e));function nc(e){const t=[];return tc.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const Ee={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")};Ee.translateX=Ee.x,Ee.translateY=Ee.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=nc(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 sc(){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,F.read(Cr),F.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])}Xl(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 rc=e=>e.startsWith("--");function Nr(e,t,n){rc(t)?e.style.setProperty(t,n):e.style[t]=n}const ic={};function Ar(e,t){const n=$s(e);return()=>ic[t]??n()}const oc=Ar(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Pr=Ar(()=>{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})`,Mr={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 Er(e,t){if(e)return typeof e=="function"?Pr()?yr(e,t):"ease-out":er(e)?ut(e):Array.isArray(e)?e.map(n=>Er(n,t)||Mr.easeOut):Mr[e]}function ac(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=Er(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 lc({type:e,...t}){return Vr(e)&&Pr()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Dr extends An{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=lc(t);this.animation=ac(n,s,r,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const d=Et(r,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(d),Nr(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&&oc()?(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 cc(e){return e in Lr}function uc(e){typeof e.ease=="string"&&cc(e.ease)&&(e.ease=Lr[e.ease])}const On=10;class dc extends Dr{constructor(t){uc(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&&Nr(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 fc(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function hc(e,t,n,s){const 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:fc(e)||(n==="spring"||Vr(n))&&s}function zn(e){e.duration=0,e.type="keyframes"}const Ir=new Set(["opacity","clipPath","filter","transform"]),mc=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function pc(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&mc.test(e[t]))return!0;return!1}const gc=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),yc=$s(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function xc(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 yc()&&n&&(Ir.has(n)||gc.has(n)&&pc(a))&&(n!=="transform"||!d)&&!u&&!s&&r!=="mirror"&&o!==0&&i!=="inertia"}const bc=40;class vc extends An{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,w)=>this.onKeyframesResolved(p,y,h,!w),c,u,d),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,s,r){var w,b;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;hc(t,o,i,a)||(f=!1,(Ae.instantAnimations||!c)&&(d==null||d(Et(t,s,n))),t[0]=t[t.length-1],zn(s),s.repeat=0);const m={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>bc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},g=f&&!u&&xc(m),p=(b=(w=m.motionValue)==null?void 0:w.owner)==null?void 0:b.current;let y;if(g)try{y=new dc({...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(),sc()),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 wc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function kc(e){const t=wc.exec(e);if(!t)return[,];const[,n,s,r]=t;return[`--${n??s}`,r]}const Tc=4;function zr(e,t,n=1){je(n<=Tc,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,r]=kc(e);if(!s)return;const o=window.getComputedStyle(t).getPropertyValue(s);if(o){const i=o.trim();return _s(i)?parseFloat(i):i}return pn(r)?zr(r,t,n+1):r}const jc={type:"spring",stiffness:500,damping:25,restSpeed:10},Sc=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Cc={type:"keyframes",duration:.8},Nc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ac=(e,{keyframes:t})=>t.length>2?Cc:Ze.has(e)?e.startsWith("scale")?Sc(t[1]):jc:Nc;function _r(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...s}=e;return{...t,...s}}return e}function _n(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?_r(n,e):n}const Pc=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Mc(e){for(const t in e)if(!Pc.has(t))return!0;return!1}const Fn=(e,t,n,s={},r,o)=>i=>{const a=_n(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};Mc(a)||Object.assign(d,Ac(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)),(Ae.instantAnimations||Ae.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=Et(d.keyframes,a);if(h!==void 0){F.update(()=>{d.onUpdate(h),d.onComplete()});return}}return a.isSync?new Vt(d):new vc(d)};function Fr(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]=Fr(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]=Fr(s);t=t(n!==void 0?n:e.custom,r,o)}return t}function _e(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,Ec=e=>!isNaN(parseFloat(e));class Vc{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=Ec(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(),F.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 Vc(e,t)}const $n=e=>Array.isArray(e);function Dc(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Je(n))}function Lc(e){return $n(e)?e[e.length-1]||0:e}function Rc(e,t){const n=_e(e,t);let{transitionEnd:s={},transition:r={},...o}=n||{};o={...o,...s};for(const i in o){const a=Lc(o[i]);Dc(e,i,a)}}const ie=e=>!!(e&&e.getVelocity);function Ic(e){return!!(ie(e)&&e.add)}function Wn(e,t){const n=e.getValue("willChange");if(Ic(n))return n.add(t);if(!n&&Ae.WillChange){const s=new Ae.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 Oc({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?_r(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&&Oc(f,h))continue;const p={delay:n,..._n(o||{},h)},y=m.get();if(y!==void 0&&!m.isAnimating()&&!Array.isArray(g)&&g===y&&!p.velocity){F.update(()=>m.set(g));continue}let w=!1;if(window.MotionHandoffAnimation){const j=Ur(e);if(j){const S=window.MotionHandoffAnimation(j,h,F);S!==null&&(p.startTime=S,w=!0)}}Wn(e,h);const b=u??e.shouldReduceMotion;m.start(Fn(h,m,g,b&&Br.has(h)?{type:!1}:p,e,w));const v=m.animation;v&&d.push(v)}if(i){const h=()=>F.update(()=>{i&&Rc(e,i)});d.length?Promise.all(d).then(h):h()}return d}function Gn(e,t,n={}){var c;const s=_e(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 zc(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 zc(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 _c(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"?_e(e,t,n.custom):t;s=Promise.all(Gr(e,r,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}const Fc={test:e=>e==="auto",parse:e=>e},Kr=e=>t=>t.test(e),Yr=[Ke,A,ve,Me,fl,dl,Fc],Hr=e=>Yr.find(Kr(e));function Bc(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Bs(e):!0}const $c=new Set(["brightness","contrast","saturate","opacity"]);function Wc(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=$c.has(t)?1:0;return s!==n&&(o*=100),t+"("+o+r+")"}const Uc=/\b([a-z-]*)\(.*?\)/gu,Kn={...me,getAnimatableNone:e=>{const t=e.match(Uc);return t?t.map(Wc).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:A,borderTopWidth:A,borderRightWidth:A,borderBottomWidth:A,borderLeftWidth:A,borderRadius:A,borderTopLeftRadius:A,borderTopRightRadius:A,borderBottomRightRadius:A,borderBottomLeftRadius:A,width:A,maxWidth:A,height:A,maxHeight:A,top:A,right:A,bottom:A,left:A,inset:A,insetBlock:A,insetBlockStart:A,insetBlockEnd:A,insetInline:A,insetInlineStart:A,insetInlineEnd:A,padding:A,paddingTop:A,paddingRight:A,paddingBottom:A,paddingLeft:A,paddingBlock:A,paddingBlockStart:A,paddingBlockEnd:A,paddingInline:A,paddingInlineStart:A,paddingInlineEnd:A,margin:A,marginTop:A,marginRight:A,marginBottom:A,marginLeft:A,marginBlock:A,marginBlockStart:A,marginBlockEnd:A,marginInline:A,marginInlineStart:A,marginInlineEnd:A,fontSize:A,backgroundPositionX:A,backgroundPositionY:A,...{rotate:Me,rotateX:Me,rotateY:Me,rotateZ:Me,scale:Nt,scaleX:Nt,scaleY:Nt,scaleZ:Nt,skew:Me,skewX:Me,skewY:Me,distance:A,translateX:A,translateY:A,translateZ:A,x:A,y:A,z:A,perspective:A,transformPerspective:A,opacity:at,originX:lr,originY:lr,originZ:A},zIndex:Xr,fillOpacity:at,strokeOpacity:at,numOctaves:Xr},Gc={...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=>Gc[e],Kc=new Set([Kn,Yn]);function Zr(e,t){let n=qr(e);return Kc.has(n)||(n=me),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Yc=new Set(["auto","none","0"]);function Hc(e,t,n){let s=0,r;for(;s<e.length&&!r;){const o=e[s];typeof o=="string"&&!Yc.has(o)&&He(o).values.length&&(r=e[s]),s++}if(r&&n)for(const o of t)e[o]=Zr(n,r)}class Xc 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&&Ee[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 Ee[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let r=0;r<t.length;r++)(t[r]===null||Bc(t[r]))&&s.push(r);s.length&&Hc(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=Ee[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]=Ee[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 Fs(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 qc(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 Zc(e){return!(e.pointerType==="touch"||ei())}function Jc(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(!Zc(y))return;c=!1;const w=t(i,y);typeof w=="function"&&(u=w,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,Qc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function eu(e){return Qc.has(e.tagName)||e.isContentEditable===!0}const tu=new Set(["INPUT","SELECT","TEXTAREA"]);function nu(e){return tu.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 su=(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 ru(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=>su(u,r)),!eu(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Jn(e){return Fs(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],iu=oi("inline","width","offsetWidth"),ou=oi("block","height","offsetHeight");function au({target:e,borderBoxSize:t}){var n;(n=Rt.get(e))==null||n.forEach(s=>{s(e,{get width(){return iu(e,t)},get height(){return ou(e,t)}})})}function lu(e){e.forEach(au)}function cu(){typeof ResizeObserver>"u"||(Ve=new ResizeObserver(lu))}function uu(e,t){Ve||cu();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 du(){Qe=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};It.forEach(t=>t(e))},window.addEventListener("resize",Qe)}function fu(e){return It.add(e),Qe||du(),()=>{It.delete(e),!It.size&&typeof Qe=="function"&&(window.removeEventListener("resize",Qe),Qe=void 0)}}function ai(e,t){return typeof e=="function"?fu(e):uu(e,t)}function hu(e){return Jn(e)&&e.tagName==="svg"}const mu=[...Yr,Z,me],pu=e=>mu.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()}),gu=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 yu(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},xu=typeof window<"u";function bu(){if(di.current=!0,!!xu)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 _t={};function hi(e){_t=e}function vu(){return _t}class wu{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,F.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,gu.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||bu(),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(),Pe(this.notifyUpdate),Pe(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&&F.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 _t){const n=_t[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=yu(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"&&(_s(s)||Bs(s))?s=parseFloat(s):!pu(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 wu{constructor(){super(...arguments),this.KeyframeResolver=Xc}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 ku({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Tu(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 Fe(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 Ft(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=Ft(e,r,s)),Ft(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 ju(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&&Fe(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(Tu(e.getBoundingClientRect(),t))}function Su(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 Cu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Nu=qe.length;function Au(e,t,n){let s="",r=!0;for(let o=0;o<Nu;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=Cu[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=Au(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(A.test(e))e=parseFloat(e);else return e;const n=Ci(e,t.target.x),s=Ci(e,t.target.y);return`${n}% ${s}%`}},Pu={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:Pu};function Ni(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])||Ni(a,e)||((i=n==null?void 0:n.getValue(a))==null?void 0:i.liveStyle)!==void 0)&&(o[a]=s[a]);return o}function Mu(e){return window.getComputedStyle(e)}class Eu 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?En(n):Jl(t,n);{const r=Mu(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 Vu={offset:"stroke-dashoffset",array:"stroke-dasharray"},Du={offset:"strokeDashoffset",array:"strokeDasharray"};function Lu(e,t,n=1,s=0,r=!0){e.pathLength=1;const o=r?Vu:Du;e[o.offset]=`${-s}`,e[o.array]=`${t} ${n}`}const Ru=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Ai(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 Ru)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&&Lu(f,r,o,i,!1)}const Pi=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"]),Mi=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Iu(e,t,n,s){Si(e,t,void 0,s);for(const r in t.attrs)e.setAttribute(Pi.has(r)?r:Un(r),t.attrs[r])}function Ei(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 Ou 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=Pi.has(n)?n:Un(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return Ei(t,n,s)}build(t,n,s){Ai(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,r){Iu(t,n,s,r)}mount(t){this.isSVGTag=Mi(t.tagName),super.mount(t)}}const zu=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<zu;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 _u=[...Qn].reverse(),Fu=Qn.length;function Bu(e){return t=>Promise.all(t.map(({animation:n,options:s})=>_c(e,n,s)))}function $u(e){let t=Bu(e),n=Li(),s=!0,r=!1;const o=u=>(d,f)=>{var m;const h=_e(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 w=0;w<Fu;w++){const b=_u[w],v=n[b],j=d[b]!==void 0?d[b]:f[b],S=dt(j),M=b===u?v.isActive:null;M===!1&&(p=w);let O=j===f[b]&&j!==d[b]&&S;if(O&&(s||r)&&e.manuallyAnimateOnMount&&(O=!1),v.protectedKeys={...g},!v.isActive&&M===null||!j&&!v.prevProp||Ot(j)||typeof j=="boolean")continue;if(b==="exit"&&v.isActive&&M!==!0){v.prevResolvedValues&&(g={...g,...v.prevResolvedValues});continue}const T=Wu(v.prevProp,j);let E=T||b===u&&v.isActive&&!O&&S||w>p&&S,V=!1;const _=Array.isArray(j)?j:[j];let B=_.reduce(o(b),{});M===!1&&(B={});const{prevResolvedValues:ce={}}=v,oe={...ce,...B},J=G=>{E=!0,m.has(G)&&(V=!0,m.delete(G)),v.needsAnimating[G]=!0;const ne=e.getValue(G);ne&&(ne.liveStyle=!1)};for(const G in oe){const ne=B[G],P=ce[G];if(g.hasOwnProperty(G))continue;let k=!1;$n(ne)&&$n(P)?k=!Di(ne,P):k=ne!==P,k?ne!=null?J(G):m.add(G):ne!==void 0&&m.has(G)?J(G):v.protectedKeys[G]=!0}v.prevProp=j,v.prevResolvedValues=B,v.isActive&&(g={...g,...B}),(s||r)&&e.blockInitialAnimation&&(E=!1);const W=O&&T;E&&(!W||V)&&h.push(..._.map(G=>{const ne={type:b};if(typeof G=="string"&&(s||r)&&!W&&e.manuallyAnimateOnMount&&e.parent){const{parent:P}=e,k=_e(P,G);if(P.enteringChildren&&k){const{delayChildren:R}=k.transition||{};ne.delay=Or(P.enteringChildren,e,R)}}return{animation:G,options:ne}}))}if(m.size){const w={};if(typeof d.initial!="boolean"){const b=_e(e,Array.isArray(d.initial)?d.initial[0]:d.initial);b&&b.transition&&(w.transition=b.transition)}m.forEach(b=>{const v=e.getBaseTarget(b),j=e.getValue(b);j&&(j.liveStyle=!0),w[b]=v??null}),h.push({animation:w})}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 Wu(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,Uu=1-Ii,Gu=1+Ii,Oi=.01,Ku=0-Oi,Yu=0+Oi;function le(e){return e.max-e.min}function Hu(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>=Uu&&e.scale<=Gu||isNaN(e.scale))&&(e.scale=1),(e.translate>=Ku&&e.translate<=Yu||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 _i(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 Xu(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 Fi(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){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 Bi(e,t,n,s,r){return e-=t,e=Ft(e,1/n,s),r!==void 0&&(e=Ft(e,1/r,s)),e}function qu(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){qu(e,t[n],t[s],t[r],t.scale,o,i)}const Zu=["x","scaleX","originX"],Ju=["y","scaleY","originY"];function Wi(e,t,n,s){$i(e.x,t,Zu,n?n.x:void 0,s?s.x:void 0),$i(e.y,t,Ju,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 Qu(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 ed(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"],td=Zi.length,Ji=e=>typeof e=="string"?parseFloat(e):e,Qi=e=>typeof e=="number"||A.test(e);function nd(e,t,n,s,r,o){r?(e.opacity=$(0,n.opacity??1,sd(s)),e.opacityExit=$(t.opacity??1,0,rd(s))):o&&(e.opacity=$(t.opacity??1,n.opacity??1,s));for(let i=0;i<td;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 sd=to(0,.5,Zs),rd=to(.5,.95,fe);function to(e,t,n){return s=>s<e?0:s>t?1:n(it(e,t,s))}function id(e,t,n){const s=ie(e)?e:Je(e);return s.start(Fn("",s,t,n)),s.animation}function mt(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}const od=(e,t)=>e.depth-t.depth;class ad{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(od),this.isDirty=!1,this.children.forEach(t)}}function ld(e,t){const n=ae.now(),s=({timestamp:r})=>{const o=r-n;o>=t&&(Pe(s),e(o-t))};return F.setup(s,!0),()=>Pe(s)}function Wt(e){return ie(e)?e.get():e}class cd{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"],ud=1e3;let dd=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",F,!(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=dd++,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(md),this.nodes.forEach(vd),this.nodes.forEach(wd),this.nodes.forEach(pd)},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 ad)}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)&&!hu(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;F.read(()=>{f=window.innerWidth}),e(i,()=>{const m=window.innerWidth;m!==f&&(f=m,this.root.updateBlockedByResize=!0,d&&d(),d=ld(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()||Cd,{onLayoutAnimationStart:p,onLayoutAnimationComplete:y}=u.getProps(),w=!this.targetLayout||!Hi(this.targetLayout,m),b=!f&&h;if(this.options.layoutRoot||this.resumeFrom||b||f&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={..._n(g,"layout"),onPlay:p,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(d,b)}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(),Pe(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(kd),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(yd),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(xd),this.nodes.forEach(bd),this.nodes.forEach(fd),this.nodes.forEach(hd)):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(gd),this.sharedNodes.forEach(Td)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,F.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){F.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||Fe(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)),Nd(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(Ad))){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)),Fe(m.latestValues)&&Bt(u,m.latestValues,(d=m.layout)==null?void 0:d.layoutBox)}return Fe(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(!Fe(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 Fe(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(),Xu(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;ju(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(),w=!y||y.members.length<=1,b=!!(p&&!w&&this.options.crossfade===!0&&!this.path.some(Sd));this.animationProgress=0;let v;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),jd(this.relativeTarget,this.relativeTargetOrigin,h,S),v&&Qu(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=ee()),ge(v,this.relativeTarget)),p&&(this.animationValues=d,nd(d,u,this.latestValues,S,b,w)),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&&(Pe(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=F.update(()=>{Ut.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Je(0)),this.motionValue.jump(0,!1),this.currentAnimation=id(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(ud),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 cd),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&&!Fe(this.latestValues)&&(i.transform=c?c({},""):"none",this.hasProjected=!1);return}i.visibility="";const d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=ed(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:w}=os[g],b=f==="none"?d[g]:p(d[g],u);if(y){const v=y.length;for(let j=0;j<v;j++)i[y[j]]=b}else w?this.options.visualElement.renderState.vars[g]=b:i[g]=b}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 fd(e){e.updateLayout()}function hd(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 md(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 pd(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function gd(e){e.clearSnapshot()}function ro(e){e.clearMeasurements()}function yd(e){e.isLayoutDirty=!0,e.updateLayout()}function io(e){e.isLayoutDirty=!1}function xd(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function bd(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 vd(e){e.resolveTargetDelta()}function wd(e){e.calcProjection()}function kd(e){e.resetSkewAndRotation()}function Td(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 jd(e,t,n,s){lo(e.x,t.x,n.x,s),lo(e.y,t.y,n.y,s)}function Sd(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Cd={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 Nd(e){fo(e.x),fo(e.y)}function ho(e,t,n){return e==="position"||e==="preserve-aspect"&&!Hu(Xi(t),Xi(n),.2)}function Ad(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Pd=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 Pd({});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 Md(...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 Ed(...e){return bt.useCallback(Md(...e),e)}class Vd 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 Dd({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=Ed(a,d);return x.useInsertionEffect(()=>{const{width:m,height:g,top:p,left:y,right:w,bottom:b}=c.current;if(t||o===!1||!a.current||!m||!g)return;const v=n==="left"?`left: ${y}`:`right: ${w}`,j=s==="bottom"?`bottom: ${b}`:`top: ${p}`;a.current.dataset.motionPopId=i;const S=document.createElement("style");u&&(S.nonce=u);const M=r??document.head;return M.appendChild(S),S.sheet&&S.sheet.insertRule(`
|
|
148
158
|
[data-motion-pop-id="${i}"] {
|
|
149
159
|
position: absolute !important;
|
|
150
160
|
width: ${m}px !important;
|
|
151
161
|
height: ${g}px !important;
|
|
152
|
-
${
|
|
162
|
+
${v}px !important;
|
|
153
163
|
${j}px !important;
|
|
154
164
|
}
|
|
155
|
-
`),()=>{var O;(O=a.current)==null||O.removeAttribute("data-motion-pop-id"),M.contains(S)&&M.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(Vd),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(Md,{pop:i==="popLayout",isPresent:n,anchorX:a,anchorY:c,root:u,children:e}),l.jsx(Tt.Provider,{value:m,children:e})};function Vd(){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 E=Gt(j[k]);m.includes(E)?(y.delete(E),T.current.delete(E)):y.get(E)!==!0&&y.set(E,!1)}},[j,m.length,m.join("-")]);const M=[];if(h!==w){let k=[...h];for(let E=0;E<j.length;E++){const V=j[E],_=Gt(V);m.includes(_)||(k.splice(E,0,V),M.push(V))}return o==="wait"&&M.length&&(k=M),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 E=Gt(k),V=i&&!d?!1:h===j||m.includes(E),_=()=>{if(T.current.has(E))return;if(y.has(E))T.current.add(E),y.set(E,!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:_,anchorX:a,anchorY:c,children:k},E)})})},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 Dd(){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 Dd(),yu()}function Ld(e){const t=wo();for(const n in e)t[n]={...t[n],...e[n]};hi(t)}const Rd=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")||Rd.has(e)}let ko=e=>!Kt(e);function Id(e){typeof e=="function"&&(ko=t=>t.startsWith("on")?!Kt(t):e(t))}try{Id(require("@emotion/is-prop-valid").default)}catch{}function Od(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 zd(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 _d(e){const{initial:t,animate:n}=zd(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])&&!Ni(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 Bd(e,t){const n=e.style||{},s={};return jo(s,n,e),Object.assign(s,Fd(e,t)),s}function $d(e,t){const n={},s=Bd(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 Wd(e,t,n,s){const r=x.useMemo(()=>{const o=So();return Ai(o,t,Mi(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 Ud=["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:!!(Ud.indexOf(e)>-1||/[A-Z]/u.test(e))}function Gd(e,t,n,{latestValues:s},r,o=!1,i){const c=(i??ms(e)?Wd:$d)(t,s,r,e),u=Od(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 Kd({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,r){return{latestValues:Yd(n,s,r,e),renderState:t()}}function Yd(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=()=>Kd(e,t,s,r);return n?o():an(o)},Hd=Co({scrapeMotionValuesFromProps:as,createRenderState:hs}),Xd=Co({scrapeMotionValuesFromProps:Ei,createRenderState:So}),qd=Symbol.for("motionComponentSymbol");function Zd(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 No=x.createContext({});function tt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Jd(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(No);g&&!g.projection&&r&&(g.type==="html"||g.type==="svg")&&Qd(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 Qd(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:Ao(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 Ao(e){if(e)return e.options.allowProjection!==!1?e.projection:Ao(e.parent)}function ps(e,{forwardMotionProps:t=!1,type:n}={},s,r){s&&Ld(s);const o=n?n==="svg":ms(e),i=o?Xd:Hd;function a(u,d){let f;const h={...x.useContext(fs),...u,layoutId:ef(u)},{isStatic:m}=h,g=_d(u),p=i(u,m);if(!m&&typeof window<"u"){tf(h,s);const y=nf(h);f=y.MeasureLayout,g.visualElement=Jd(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,Gd(e,u,Zd(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[qd]=e,c}function ef({layoutId:e}){const t=x.useContext(on).id;return t&&e!==void 0?t+"-"+e:e}function tf(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 nf(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 sf(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 rf=(e,t)=>t.isSVG??ms(e)?new Lu(t):new Au(t,{allowProjection:e!==x.Fragment});class of extends De{constructor(t){super(t),t.animationState||(t.animationState=_u(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 af=0;class lf extends De{constructor(){super(...arguments),this.id=af++,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=_e(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 cf={animation:{Feature:of},exit:{Feature:lf}};function pt(e){return{point:{x:e.pageX,y:e.pageY}}}const uf=e=>t=>qn(t)&&e(t,pt(t));function gt(e,t,n,s){return mt(e,t,uf(n),s)}const Po=({current:e})=>e?e.ownerDocument.defaultView:null,Mo=(e,t)=>Math.abs(e-t);function df(e,t){const n=Mo(e.x,t.x),s=Mo(e.y,t.y);return Math.sqrt(n**2+s**2)}const Eo=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=df(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),F.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);(Eo.has(s.overflowX)||Eo.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),F.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Pe(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,ff(t)),velocity:hf(t,.1)}}function ff(e){return e[0]}function Lo(e){return e[e.length-1]}function hf(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 mf(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 pf(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 gf(e,t){return{x:Io(e.x,t.x),y:Io(e.y,t.y)}}function yf(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 xf(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 bf(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 vf=new WeakMap;class wf{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=Yc(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&&F.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=Tf(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&&F.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:Po(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&&F.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=mf(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=pf(s.layoutBox,t):this.constraints=!1,this.elastic=bf(n),r!==this.constraints&&!tt(t)&&s&&this.constraints&&!this.hasMutatedConstraints&&ke(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=xf(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=ku(s,r.root,this.visualElement.getTransformPagePoint());let i=gf(r.layout.layoutBox,o);if(n){const a=n(bu(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(Fn(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]=yf({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;vf.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&&Qc(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=kf(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),F.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 _o(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function kf(e,t,n){const s=ai(e,_o(n)),r=ai(t,_o(n));return()=>{s(),r()}}function Xt(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Tf(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class jf extends De{constructor(t){super(t),this.removeGroupControls=fe,this.removeListeners=fe,this.controls=new wf(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&&F.update(()=>e(t,n),!1,!0)};class Sf extends De{constructor(){super(...arguments),this.removePointerDownListener=fe}onPointerDown(t){this.session=new Vo(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Po(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&&F.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 Cf 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()||F.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 Fo(e){const[t,n]=go(),s=x.useContext(on);return l.jsx(Cf,{...e,layoutGroup:s,switchLayoutGroup:x.useContext(No),isPresent:t,safeToRemove:n})}const Nf={pan:{Feature:Sf},drag:{Feature:jf,ProjectionNode:mo,MeasureLayout:Fo}};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&&F.postRender(()=>o(t,pt(t)))}class Af extends De{mount(){const{current:t}=this.node;t&&(this.unmount=Xc(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&&F.postRender(()=>o(t,pt(t)))}class Mf extends De{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=tu(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)},Vf=e=>{e.forEach(Ef)};function Df({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(Vf,{root:e,...t})),s[r]}function Lf(e,t,n){const s=Df(t);return vs.set(e,n),s.observe(e),()=>{vs.delete(e),s.unobserve(e)}}const Rf={some:0,all:1};class If 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:Rf[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=Lf(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(Of(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function Of({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const zf={...cf,...{inView:{Feature:If},tap:{Feature:Mf},focus:{Feature:Pf},hover:{Feature:Af}},...Nf,...{layout:{ProjectionNode:mo,MeasureLayout:Fo}}},z=sf(zf,rf);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 _f(){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},Bf=(e,t)=>({classGroupId:e,validator:t}),Uo=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),qt="-",Go=[],$f="arbitrary..",Wf=e=>{const t=Gf(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Uf(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}},Uf=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?$f+s:void 0})(),Gf=e=>{const{theme:t,classGroups:n}=e;return Kf(n,t)},Kf=(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];Yf(i,t,n,s)}},Yf=(e,t,n,s)=>{if(typeof e=="string"){Hf(e,t,n);return}if(typeof e=="function"){Xf(e,t,n,s);return}qf(e,t,n,s)},Hf=(e,t,n)=>{const s=e===""?t:Yo(t,e);s.classGroupId=n},Xf=(e,t,n,s)=>{if(Zf(e)){ks(e(s),t,n,s);return}t.validators===null&&(t.validators=[]),t.validators.push(Bf(n,e))},qf=(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},Zf=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Jf=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=":",Qf=[],Xo=(e,t,n,s,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:s,isExternal:r}),eh=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(Qf,!1,i,void 0,!0)}if(n){const r=s;s=o=>n({className:o,parseClassName:r})}return s},th=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}},nh=e=>({cache:Jf(e.cacheSize),parseClassName:eh(e),sortModifiers:th(e),postfixLookupClassGroupIds:sh(e),...Wf(e)}),sh=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},rh=/\s+/,ih=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:r,sortModifiers:o,postfixLookupClassGroupIds:i}=t,a=[],c=e.trim().split(rh);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 M=r(w,T);for(let O=0;O<M.length;++O){const k=M[O];a.push(j+k)}u=f+(u.length>0?" "+u:u)}return u},oh=(...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},ah=(e,...t)=>{let n,s,r,o;const i=c=>{const u=t.reduce((d,f)=>f(d),e());return n=nh(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=ih(c,n);return r(c,d),d};return o=i,(...c)=>o(oh(...c))},lh=[],te=e=>{const t=n=>n[e]||lh;return t.isThemeGetter=!0,t},Zo=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Jo=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ch=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,uh=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dh=/\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$/,fh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,hh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,mh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Le=e=>ch.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=>uh.test(e),Qo=()=>!0,ph=e=>dh.test(e)&&!fh.test(e),Ss=()=>!1,gh=e=>hh.test(e),yh=e=>mh.test(e),xh=e=>!C(e)&&!N(e),bh=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)),vh=e=>Re(e,ia,Ss),C=e=>Zo.test(e),$e=e=>Re(e,oa,ph),ea=e=>Re(e,Ah,I),wh=e=>Re(e,la,Qo),kh=e=>Re(e,aa,Ss),ta=e=>Re(e,sa,Ss),Th=e=>Re(e,ra,yh),Zt=e=>Re(e,ca,gh),N=e=>Jo.test(e),yt=e=>We(e,oa),jh=e=>We(e,aa),na=e=>We(e,sa),Sh=e=>We(e,ia),Ch=e=>We(e,ra),Jt=e=>We(e,ca,!0),Nh=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=ah(()=>{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(),N,C],M=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],k=()=>[N,C,c],E=()=>[Le,"full","auto",...k()],V=()=>[Te,"none","subgrid",N,C],_=()=>["auto",{span:["full",Te,N,C]},Te,N,C],B=()=>[Te,"auto",N,C],ce=()=>["auto","min","max","fr",N,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()],P=()=>[e,N,C],v=()=>[...j(),na,ta,{position:[N,C]}],R=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",Sh,vh,{size:[N,C]}],H=()=>[js,yt,$e],Q=()=>["","none","full",u,N,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,N,C],en=()=>["none",I,N,C],tn=()=>["none",I,N,C],Ns=()=>[I,N,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:[xh],"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,N,y]}],container:["container"],"container-type":[{"@container":["","normal","size",N,C]}],"container-named":[bh],columns:[{columns:[I,C,N,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:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:E()}],"inset-x":[{"inset-x":E()}],"inset-y":[{"inset-y":E()}],start:[{"inset-s":E(),start:E()}],end:[{"inset-e":E(),end:E()}],"inset-bs":[{"inset-bs":E()}],"inset-be":[{"inset-be":E()}],top:[{top:E()}],right:[{right:E()}],bottom:[{bottom:E()}],left:[{left:E()}],visibility:["visible","invisible","collapse"],z:[{z:[Te,"auto",N,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,N,C]}],shrink:[{shrink:["",I,N,C]}],order:[{order:[Te,"first","last","none",N,C]}],"grid-cols":[{"grid-cols":V()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":V()}],"row-start-end":[{row:_()}],"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,Nh,wh]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",js,C]}],"font-family":[{font:[jh,kh,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,N,C]}],"line-clamp":[{"line-clamp":[I,"none",N,ea]}],leading:[{leading:[o,...k()]}],"list-image":[{"list-image":["none",N,C]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",N,C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:[I,"from-font","auto",N,$e]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[I,"auto",N,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,N,C]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",N,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",N,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,N,C],radial:["",N,C],conic:[Te,N,C]},Ch,Th]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],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:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...K(),"none","hidden"]}],"outline-offset":[{"outline-offset":[I,N,C]}],"outline-w":[{outline:["",I,yt,$e]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",d,Jt,Zt]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",f,Jt,Zt]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[I,$e]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",h,Jt,Zt]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[I,N,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":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"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":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"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":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"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":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"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":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"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":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"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":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[N,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":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"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":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"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",N,C]}],filter:[{filter:["","none",N,C]}],blur:[{blur:Qt()}],brightness:[{brightness:[I,N,C]}],contrast:[{contrast:[I,N,C]}],"drop-shadow":[{"drop-shadow":["","none",m,Jt,Zt]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",I,N,C]}],"hue-rotate":[{"hue-rotate":[I,N,C]}],invert:[{invert:["",I,N,C]}],saturate:[{saturate:[I,N,C]}],sepia:[{sepia:["",I,N,C]}],"backdrop-filter":[{"backdrop-filter":["","none",N,C]}],"backdrop-blur":[{"backdrop-blur":Qt()}],"backdrop-brightness":[{"backdrop-brightness":[I,N,C]}],"backdrop-contrast":[{"backdrop-contrast":[I,N,C]}],"backdrop-grayscale":[{"backdrop-grayscale":["",I,N,C]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[I,N,C]}],"backdrop-invert":[{"backdrop-invert":["",I,N,C]}],"backdrop-opacity":[{"backdrop-opacity":[I,N,C]}],"backdrop-saturate":[{"backdrop-saturate":[I,N,C]}],"backdrop-sepia":[{"backdrop-sepia":["",I,N,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",N,C]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[I,"initial",N,C]}],ease:[{ease:["linear","initial",T,N,C]}],delay:[{delay:[I,N,C]}],animate:[{animate:["none",w,N,C]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,N,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:Ns()}],"skew-x":[{"skew-x":Ns()}],"skew-y":[{"skew-y":Ns()}],transform:[{transform:[N,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,N,C]}],accent:[{accent:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"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",N,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":P()}],"scrollbar-track-color":[{"scrollbar-track":P()}],"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",N,C]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[I,yt,$e,ea]}],stroke:[{stroke:["none",...P()]}],"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(_f(e))}const Mh=({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(Ne,{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"},Vh=({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})]}),Dh=({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 M=>{M.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:M=>h(M.target.value),required:!0}),l.jsx(Ue,{label:"Password",type:"password",placeholder:"••••••••",value:m,onChange:M=>g(M.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:M=>d(M.target.value),required:!0}),l.jsx(Ue,{label:"Work Email",type:"email",placeholder:"alex@company.com",value:f,onChange:M=>h(M.target.value),required:!0}),l.jsx(Ue,{label:"Choose Password",type:"password",placeholder:"••••••••",value:m,onChange:M=>g(M.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:M=>h(M.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(Ne,{size:20})})]}),l.jsx("div",{className:"p-6 overflow-y-auto custom-scrollbar",children:s})]})]})}),Lh=({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})]})]})}),Rh=({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)})})})]})},Ih=({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(M=>M.id===w.id?{...M,progress:100,status:"success"}:M))):c(S=>S.map(M=>M.id===w.id?{...M,progress:b}:M))},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(_a,{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(Fa,{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(Ne,{size:14})})]},p.id))})]})})]})},Oh=({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(Ua,{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(Ne,{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(Ne,{size:12})})]},i.id)})})})]})]})}),zh=({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})]})]})})]})]}),_h=({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),"%"]})]})},Bh=({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})]}),$h=({collapsed:e=!1,onToggle:t,logo:n,title:s="RenderLoom",children:r,footer:o,className:i,showMobileToggle:a=!0})=>{const[c,u]=x.useState(!1),[d,f]=x.useState(!1);x.useEffect(()=>{const p=()=>{const y=window.innerWidth<768;u(y),y||f(!1)};return p(),window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[]);const h=()=>{if(c){const p=!d;f(p),t&&t(!p)}else t&&t(!e)},m=()=>{c&&(f(!1),t&&t(!0))},g=c?!d:e;return l.jsxs(l.Fragment,{children:[c&&g&&a&&l.jsx("button",{type:"button",onClick:h,className:"fixed top-4 left-4 z-40 p-2.5 rounded-xl bg-card/85 backdrop-blur-xl border border-border/40 text-foreground shadow-lg hover:bg-secondary/60 cursor-pointer md:hidden transition-colors animate-[fadeIn_0.2s_ease-out]",children:l.jsx($a,{size:18})}),c&&!g&&l.jsx("div",{onClick:h,className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-35 md:hidden transition-opacity duration-300"}),l.jsxs("aside",{className:D("h-screen bg-card/45 backdrop-blur-xl border-r border-border/40 flex flex-col transition-all duration-300 ease-in-out shrink-0 text-left relative z-30",c?"fixed top-0 bottom-0 left-0":"",g?"w-0 -translate-x-full md:w-20 md:translate-x-0 overflow-hidden border-r-0 md:border-r border-border/20":"w-64 translate-x-0 border-r border-border/40",i),children:[l.jsxs("div",{className:D("flex border-b border-border/20 shrink-0 transition-all duration-300",g?"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",g&&"justify-center"),children:[n&&l.jsx("div",{className:"text-primary shrink-0 transition-transform duration-300",children:n}),!g&&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:h,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:g?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",onClickCapture:m,children:r}),o&&l.jsx("div",{className:"p-3 border-t border-border/20 min-h-[72px] flex items-center overflow-hidden shrink-0",children:o})]})]})},Wh=({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-250 cursor-pointer text-left select-none shrink-0 border border-transparent",r?"justify-center p-3":"px-4 py-3 gap-3",n?"bg-primary/8 text-primary border-primary/15 shadow-[0_0_20px_rgba(var(--primary),0.02)]":"text-muted-foreground hover:text-foreground hover:bg-secondary/35"),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 shrink-0 ml-auto",transition:{type:"spring",stiffness:380,damping:30}})]}),Uh=({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:`
|
|
165
|
+
`),()=>{var O;(O=a.current)==null||O.removeAttribute("data-motion-pop-id"),M.contains(S)&&M.removeChild(S)}},[t]),l.jsx(Vd,{isPresent:t,childRef:a,sizeRef:c,pop:o,children:o===!1?e:bt.cloneElement(e,{ref:f})})}const Ld=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:r,presenceAffectsLayout:o,mode:i,anchorX:a,anchorY:c,root:u})=>{const d=an(Rd),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(Dd,{pop:i==="popLayout",isPresent:n,anchorX:a,anchorY:c,root:u,children:e}),l.jsx(Tt.Provider,{value:m,children:e})};function Rd(){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),w=x.useRef(new Set),[b,v]=x.useState(h),[j,S]=x.useState(h);zs(()=>{g.current=!1,p.current=h;for(let T=0;T<j.length;T++){const E=Gt(j[T]);m.includes(E)?(y.delete(E),w.current.delete(E)):y.get(E)!==!0&&y.set(E,!1)}},[j,m.length,m.join("-")]);const M=[];if(h!==b){let T=[...h];for(let E=0;E<j.length;E++){const V=j[E],_=Gt(V);m.includes(_)||(T.splice(E,0,V),M.push(V))}return o==="wait"&&M.length&&(T=M),S(yo(T)),v(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(T=>{const E=Gt(T),V=i&&!d?!1:h===j||m.includes(E),_=()=>{if(w.current.has(E))return;if(y.has(E))w.current.add(E),y.set(E,!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(Ld,{isPresent:V,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:r,mode:o,root:u,onExitComplete:V?void 0:_,anchorX:a,anchorY:c,children:T},E)})})},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 Id(){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 Id(),vu()}function Od(e){const t=wo();for(const n in e)t[n]={...t[n],...e[n]};hi(t)}const zd=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")||zd.has(e)}let ko=e=>!Kt(e);function _d(e){typeof e=="function"&&(ko=t=>t.startsWith("on")?!Kt(t):e(t))}try{_d(require("@emotion/is-prop-valid").default)}catch{}function Fd(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 Bd(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 $d(e){const{initial:t,animate:n}=Bd(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])&&!Ni(s,n)&&(e[s]=t[s])}function Wd({transformTemplate:e},t){return x.useMemo(()=>{const n=hs();return is(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Ud(e,t){const n=e.style||{},s={};return jo(s,n,e),Object.assign(s,Wd(e,t)),s}function Gd(e,t){const n={},s=Ud(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 Kd(e,t,n,s){const r=x.useMemo(()=>{const o=So();return Ai(o,t,Mi(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 Yd=["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:!!(Yd.indexOf(e)>-1||/[A-Z]/u.test(e))}function Hd(e,t,n,{latestValues:s},r,o=!1,i){const c=(i??ms(e)?Kd:Gd)(t,s,r,e),u=Fd(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 Xd({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,r){return{latestValues:qd(n,s,r,e),renderState:t()}}function qd(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,...w}=g;for(const b in w){let v=w[b];if(Array.isArray(v)){const j=d?v.length-1:0;v=v[j]}v!==null&&(r[b]=v)}for(const b in p)r[b]=p[b]}}}return r}const Co=e=>(t,n)=>{const s=x.useContext(Yt),r=x.useContext(Tt),o=()=>Xd(e,t,s,r);return n?o():an(o)},Zd=Co({scrapeMotionValuesFromProps:as,createRenderState:hs}),Jd=Co({scrapeMotionValuesFromProps:Ei,createRenderState:So}),Qd=Symbol.for("motionComponentSymbol");function ef(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 No=x.createContext({});function tt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function tf(e,t,n,s,r,o){var v,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(No);g&&!g.projection&&r&&(g.type==="html"||g.type==="svg")&&nf(h.current,n,r,p);const y=x.useRef(!1);x.useInsertionEffect(()=>{g&&y.current&&g.update(n,c)});const w=n[Wr],b=x.useRef(!!w&&typeof window<"u"&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,w))&&((j=window.MotionHasOptimisedAnimation)==null?void 0:j.call(window,w)));return zs(()=>{m.current=!0,g&&(y.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),b.current&&g.animationState&&g.animationState.animateChanges())}),x.useEffect(()=>{g&&(!b.current&&g.animationState&&g.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)==null||S.call(window,w)}),b.current=!1),g.enteringChildren=void 0)}),g}function nf(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:Ao(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 Ao(e){if(e)return e.options.allowProjection!==!1?e.projection:Ao(e.parent)}function ps(e,{forwardMotionProps:t=!1,type:n}={},s,r){s&&Od(s);const o=n?n==="svg":ms(e),i=o?Jd:Zd;function a(u,d){let f;const h={...x.useContext(fs),...u,layoutId:sf(u)},{isStatic:m}=h,g=$d(u),p=i(u,m);if(!m&&typeof window<"u"){rf(h,s);const y=of(h);f=y.MeasureLayout,g.visualElement=tf(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,Hd(e,u,ef(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[Qd]=e,c}function sf({layoutId:e}){const t=x.useContext(on).id;return t&&e!==void 0?t+"-"+e:e}function rf(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 of(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 af(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 lf=(e,t)=>t.isSVG??ms(e)?new Ou(t):new Eu(t,{allowProjection:e!==x.Fragment});class cf extends De{constructor(t){super(t),t.animationState||(t.animationState=$u(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 uf=0;class df extends De{constructor(){super(...arguments),this.id=uf++,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=_e(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 ff={animation:{Feature:cf},exit:{Feature:df}};function pt(e){return{point:{x:e.pageX,y:e.pageY}}}const hf=e=>t=>qn(t)&&e(t,pt(t));function gt(e,t,n,s){return mt(e,t,hf(n),s)}const Po=({current:e})=>e?e.ownerDocument.defaultView:null,Mo=(e,t)=>Math.abs(e-t);function mf(e,t){const n=Mo(e.x,t.x),s=Mo(e.y,t.y);return Math.sqrt(n**2+s**2)}const Eo=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=mf(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!p)return;const{point:y}=m,{timestamp:w}=re;this.history.push({...y,timestamp:w});const{onStart:b,onMove:v}=this.handlers;g||(b&&b(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastRawMoveEventInfo=g,this.lastMoveEventInfo=Ht(g,this.transformPagePoint),F.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:p,onSessionEnd:y,resumeAnimation:w}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&w&&w(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=gs(m.type==="pointercancel"?this.lastMoveEventInfo:Ht(g,this.transformPagePoint),this.history);this.startEvent&&p&&p(m,b),y&&y(m,b)},!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);(Eo.has(s.overflowX)||Eo.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),F.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Pe(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,pf(t)),velocity:gf(t,.1)}}function pf(e){return e[0]}function Lo(e){return e[e.length-1]}function gf(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 yf(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 xf(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 bf(e,t){return{x:Io(e.x,t.x),y:Io(e.y,t.y)}}function vf(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 wf(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 kf(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 Tf=new WeakMap;class jf{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=qc(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(w=>{let b=this.getAxisMotionValue(w).get()||0;if(ve.test(b)){const{projection:v}=this.visualElement;if(v&&v.layout){const j=v.layout.layoutBox[w];j&&(b=le(j)*(parseFloat(b)/100))}}this.originPoint[w]=b}),p&&F.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:w}=h;if(g&&this.currentDirection===null){this.currentDirection=Cf(w),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",h.point,w),this.updateAxis("y",h.point,w),this.visualElement.render(),y&&F.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:Po(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&&F.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=yf(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=xf(s.layoutBox,t):this.constraints=!1,this.elastic=kf(n),r!==this.constraints&&!tt(t)&&s&&this.constraints&&!this.hasMutatedConstraints&&ke(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=wf(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=Su(s,r.root,this.visualElement.getTransformPagePoint());let i=bf(r.layout.layoutBox,o);if(n){const a=n(ku(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(Fn(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]=vf({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;Tf.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&&nu(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=Sf(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),F.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 _o(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Sf(e,t,n){const s=ai(e,_o(n)),r=ai(t,_o(n));return()=>{s(),r()}}function Xt(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Cf(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Nf extends De{constructor(t){super(t),this.removeGroupControls=fe,this.removeListeners=fe,this.controls=new jf(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&&F.update(()=>e(t,n),!1,!0)};class Af extends De{constructor(){super(...arguments),this.removePointerDownListener=fe}onPointerDown(t){this.session=new Vo(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Po(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&&F.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 Pf 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()||F.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 Fo(e){const[t,n]=go(),s=x.useContext(on);return l.jsx(Pf,{...e,layoutGroup:s,switchLayoutGroup:x.useContext(No),isPresent:t,safeToRemove:n})}const Mf={pan:{Feature:Af},drag:{Feature:Nf,ProjectionNode:mo,MeasureLayout:Fo}};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&&F.postRender(()=>o(t,pt(t)))}class Ef extends De{mount(){const{current:t}=this.node;t&&(this.unmount=Jc(t,(n,s)=>(Bo(this.node,s,"Start"),r=>Bo(this.node,r,"End"))))}unmount(){}}class Vf 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&&F.postRender(()=>o(t,pt(t)))}class Df extends De{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=ru(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,Lf=e=>{const t=vs.get(e.target);t&&t(e)},Rf=e=>{e.forEach(Lf)};function If({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(Rf,{root:e,...t})),s[r]}function Of(e,t,n){const s=If(t);return vs.set(e,n),s.observe(e),()=>{vs.delete(e),s.unobserve(e)}}const zf={some:0,all:1};class _f 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:zf[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=Of(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(Ff(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function Ff({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Bf={...ff,...{inView:{Feature:_f},tap:{Feature:Df},focus:{Feature:Vf},hover:{Feature:Ef}},...Mf,...{layout:{ProjectionNode:mo,MeasureLayout:Fo}}},z=af(Bf,lf);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 $f(){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 Wf=(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},Uf=(e,t)=>({classGroupId:e,validator:t}),Uo=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),qt="-",Go=[],Gf="arbitrary..",Kf=e=>{const t=Hf(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Yf(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?Wf(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}},Yf=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?Gf+s:void 0})(),Hf=e=>{const{theme:t,classGroups:n}=e;return Xf(n,t)},Xf=(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];qf(i,t,n,s)}},qf=(e,t,n,s)=>{if(typeof e=="string"){Zf(e,t,n);return}if(typeof e=="function"){Jf(e,t,n,s);return}Qf(e,t,n,s)},Zf=(e,t,n)=>{const s=e===""?t:Yo(t,e);s.classGroupId=n},Jf=(e,t,n,s)=>{if(eh(e)){ks(e(s),t,n,s);return}t.validators===null&&(t.validators=[]),t.validators.push(Uf(n,e))},Qf=(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},eh=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,th=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=":",nh=[],Xo=(e,t,n,s,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:s,isExternal:r}),sh=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(nh,!1,i,void 0,!0)}if(n){const r=s;s=o=>n({className:o,parseClassName:r})}return s},rh=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}},ih=e=>({cache:th(e.cacheSize),parseClassName:sh(e),sortModifiers:rh(e),postfixLookupClassGroupIds:oh(e),...Kf(e)}),oh=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},ah=/\s+/,lh=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:r,sortModifiers:o,postfixLookupClassGroupIds:i}=t,a=[],c=e.trim().split(ah);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 w=!!y,b;if(w){const O=p.substring(0,y);b=s(O);const T=b&&i[b]?s(p):void 0;T&&T!==b&&(b=T,w=!1)}else b=s(p);if(!b){if(!w){u=f+(u.length>0?" "+u:u);continue}if(b=s(p),!b){u=f+(u.length>0?" "+u:u);continue}w=!1}const v=m.length===0?"":m.length===1?m[0]:o(m).join(":"),j=g?v+Ts:v,S=j+b;if(a.indexOf(S)>-1)continue;a.push(S);const M=r(b,w);for(let O=0;O<M.length;++O){const T=M[O];a.push(j+T)}u=f+(u.length>0?" "+u:u)}return u},ch=(...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},uh=(e,...t)=>{let n,s,r,o;const i=c=>{const u=t.reduce((d,f)=>f(d),e());return n=ih(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=lh(c,n);return r(c,d),d};return o=i,(...c)=>o(ch(...c))},dh=[],te=e=>{const t=n=>n[e]||dh;return t.isThemeGetter=!0,t},Zo=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Jo=/^\((?:(\w[\w-]*):)?(.+)\)$/i,fh=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,hh=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,mh=/\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$/,ph=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,gh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,yh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Le=e=>fh.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=>hh.test(e),Qo=()=>!0,xh=e=>mh.test(e)&&!ph.test(e),Ss=()=>!1,bh=e=>gh.test(e),vh=e=>yh.test(e),wh=e=>!C(e)&&!N(e),kh=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)),Th=e=>Re(e,ia,Ss),C=e=>Zo.test(e),$e=e=>Re(e,oa,xh),ea=e=>Re(e,Eh,I),jh=e=>Re(e,la,Qo),Sh=e=>Re(e,aa,Ss),ta=e=>Re(e,sa,Ss),Ch=e=>Re(e,ra,vh),Zt=e=>Re(e,ca,bh),N=e=>Jo.test(e),yt=e=>We(e,oa),Nh=e=>We(e,aa),na=e=>We(e,sa),Ah=e=>We(e,ia),Ph=e=>We(e,ra),Jt=e=>We(e,ca,!0),Mh=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",Eh=e=>e==="number",aa=e=>e==="family-name",la=e=>e==="number"||e==="weight",ca=e=>e==="shadow",Vh=uh(()=>{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"),w=te("ease"),b=te("animate"),v=()=>["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(),N,C],M=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],T=()=>[N,C,c],E=()=>[Le,"full","auto",...T()],V=()=>[Te,"none","subgrid",N,C],_=()=>["auto",{span:["full",Te,N,C]},Te,N,C],B=()=>[Te,"auto",N,C],ce=()=>["auto","min","max","fr",N,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",...T()],xe=()=>[Le,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],G=()=>[Le,"screen","full","dvw","lvw","svw","min","max","fit",...T()],ne=()=>[Le,"screen","full","lh","dvh","lvh","svh","min","max","fit",...T()],P=()=>[e,N,C],k=()=>[...j(),na,ta,{position:[N,C]}],R=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",Ah,Th,{size:[N,C]}],X=()=>[js,yt,$e],Q=()=>["","none","full",u,N,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"],q=()=>[I,js,na,ta],Qt=()=>["","none",g,N,C],en=()=>["none",I,N,C],tn=()=>["none",I,N,C],Ns=()=>[I,N,C],nn=()=>[Le,"full",...T()];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:[wh],"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,N,y]}],container:["container"],"container-type":[{"@container":["","normal","size",N,C]}],"container-named":[kh],columns:[{columns:[I,C,N,a]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"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:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:E()}],"inset-x":[{"inset-x":E()}],"inset-y":[{"inset-y":E()}],start:[{"inset-s":E(),start:E()}],end:[{"inset-e":E(),end:E()}],"inset-bs":[{"inset-bs":E()}],"inset-be":[{"inset-be":E()}],top:[{top:E()}],right:[{right:E()}],bottom:[{bottom:E()}],left:[{left:E()}],visibility:["visible","invisible","collapse"],z:[{z:[Te,"auto",N,C]}],basis:[{basis:[Le,"full","auto",a,...T()]}],"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,N,C]}],shrink:[{shrink:["",I,N,C]}],order:[{order:[Te,"first","last","none",N,C]}],"grid-cols":[{"grid-cols":V()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":V()}],"row-start-end":[{row:_()}],"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:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"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:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pbs:[{pbs:T()}],pbe:[{pbe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],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":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"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,Mh,jh]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",js,C]}],"font-family":[{font:[Nh,Sh,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,N,C]}],"line-clamp":[{"line-clamp":[I,"none",N,ea]}],leading:[{leading:[o,...T()]}],"list-image":[{"list-image":["none",N,C]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",N,C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:[I,"from-font","auto",N,$e]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[I,"auto",N,C]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"tab-size":[{tab:[Te,N,C]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",N,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",N,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:k()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:U()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Te,N,C],radial:["",N,C],conic:[Te,N,C]},Ph,Ch]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:X()}],"gradient-via-pos":[{via:X()}],"gradient-to-pos":[{to:X()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],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:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...K(),"none","hidden"]}],"outline-offset":[{"outline-offset":[I,N,C]}],"outline-w":[{outline:["",I,yt,$e]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",d,Jt,Zt]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",f,Jt,Zt]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[I,$e]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",h,Jt,Zt]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[I,N,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":q()}],"mask-image-linear-to-pos":[{"mask-linear-to":q()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":q()}],"mask-image-t-to-pos":[{"mask-t-to":q()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":q()}],"mask-image-r-to-pos":[{"mask-r-to":q()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":q()}],"mask-image-b-to-pos":[{"mask-b-to":q()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":q()}],"mask-image-l-to-pos":[{"mask-l-to":q()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":q()}],"mask-image-x-to-pos":[{"mask-x-to":q()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":q()}],"mask-image-y-to-pos":[{"mask-y-to":q()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[N,C]}],"mask-image-radial-from-pos":[{"mask-radial-from":q()}],"mask-image-radial-to-pos":[{"mask-radial-to":q()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"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":q()}],"mask-image-conic-to-pos":[{"mask-conic-to":q()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:k()}],"mask-repeat":[{mask:R()}],"mask-size":[{mask:U()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",N,C]}],filter:[{filter:["","none",N,C]}],blur:[{blur:Qt()}],brightness:[{brightness:[I,N,C]}],contrast:[{contrast:[I,N,C]}],"drop-shadow":[{"drop-shadow":["","none",m,Jt,Zt]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",I,N,C]}],"hue-rotate":[{"hue-rotate":[I,N,C]}],invert:[{invert:["",I,N,C]}],saturate:[{saturate:[I,N,C]}],sepia:[{sepia:["",I,N,C]}],"backdrop-filter":[{"backdrop-filter":["","none",N,C]}],"backdrop-blur":[{"backdrop-blur":Qt()}],"backdrop-brightness":[{"backdrop-brightness":[I,N,C]}],"backdrop-contrast":[{"backdrop-contrast":[I,N,C]}],"backdrop-grayscale":[{"backdrop-grayscale":["",I,N,C]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[I,N,C]}],"backdrop-invert":[{"backdrop-invert":["",I,N,C]}],"backdrop-opacity":[{"backdrop-opacity":[I,N,C]}],"backdrop-saturate":[{"backdrop-saturate":[I,N,C]}],"backdrop-sepia":[{"backdrop-sepia":["",I,N,C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",N,C]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[I,"initial",N,C]}],ease:[{ease:["linear","initial",w,N,C]}],delay:[{delay:[I,N,C]}],animate:[{animate:["none",b,N,C]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,N,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:Ns()}],"skew-x":[{"skew-x":Ns()}],"skew-y":[{"skew-y":Ns()}],transform:[{transform:[N,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,N,C]}],accent:[{accent:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"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",N,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":P()}],"scrollbar-track-color":[{"scrollbar-track":P()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mbs":[{"scroll-mbs":T()}],"scroll-mbe":[{"scroll-mbe":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pbs":[{"scroll-pbs":T()}],"scroll-pbe":[{"scroll-pbe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"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",N,C]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[I,yt,$e,ea]}],stroke:[{stroke:["none",...P()]}],"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 Vh($f(e))}const Dh=({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)"}},Lh=({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(Ne,{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"},Rh=({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(za,{size:12,className:"text-primary-foreground stroke-[4px]"})})})})]}),n&&l.jsx("span",{className:"text-sm font-semibold text-foreground leading-none",children:n})]}),Ih=({initialMode:e="login",onLogin:t,onRegister:n,onForgotPassword:s,logo:r=$a,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),[w,b]=x.useState(!1),[v,j]=x.useState(!1),S=async M=>{M.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:w}):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:M=>h(M.target.value),required:!0}),l.jsx(Ue,{label:"Password",type:"password",placeholder:"••••••••",value:m,onChange:M=>g(M.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:v,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:M=>d(M.target.value),required:!0}),l.jsx(Ue,{label:"Work Email",type:"email",placeholder:"alex@company.com",value:f,onChange:M=>h(M.target.value),required:!0}),l.jsx(Ue,{label:"Choose Password",type:"password",placeholder:"••••••••",value:m,onChange:M=>g(M.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:w,onChange:b})}),l.jsx(ye,{type:"submit",variant:"primary",loading:v,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(Ia,{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:M=>h(M.target.value),required:!0}),l.jsx(ye,{type:"submit",variant:"primary",loading:v,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(Ne,{size:20})})]}),l.jsx("div",{className:"p-6 overflow-y-auto custom-scrollbar",children:s})]})]})}),Oh=({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})]})]})}),zh=({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)})})})]})},_h=({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(b=>{const j=b.size/1048576>s;return{id:Math.random().toString(36).substring(7),name:b.name,size:(b.size/1024).toFixed(1)+" KB",rawFile:b,progress:0,status:j?"failed":"uploading",error:j?`File exceeds limit of ${s}MB`:null}}),w=[...a,...y].slice(0,n);c(w),e&&e(w.map(b=>b.rawFile)),y.forEach(b=>{if(b.status==="failed")return;let v=0;const j=setInterval(()=>{v+=Math.floor(Math.random()*15)+5,v>=100?(v=100,clearInterval(j),c(S=>S.map(M=>M.id===b.id?{...M,progress:100,status:"success"}:M))):c(S=>S.map(M=>M.id===b.id?{...M,progress:v}:M))},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(Ba,{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(Ne,{size:14})})]},p.id))})]})})]})},Fh=({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(Ya,{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(Ne,{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(Ne,{size:12})})]},i.id)})})})]})]})}),Bh=({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})]})]})})]})]}),$h=({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"&&Sa.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)]})},Wh=({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),"%"]})]})},Uh=({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})]}),ga=x.createContext(),Gh=({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(ga.Provider,{value:{isDark:n,toggleTheme:r,setIsDark:s},children:e})},ya=()=>{const e=x.useContext(ga);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e},Kh=({collapsed:e=!1,onToggle:t,logo:n,title:s="RenderLoom",children:r,footer:o,className:i,showMobileToggle:a=!0})=>{const[c,u]=x.useState(!1),[d,f]=x.useState(!e);x.useEffect(()=>{f(!e)},[e]),x.useEffect(()=>{const b=()=>{const v=window.innerWidth<768;u(v),v||f(!1)};return b(),window.addEventListener("resize",b),()=>window.removeEventListener("resize",b)},[]);const h=()=>{if(c){const b=!d;f(b),t&&t(!b)}else t&&t(!e)},m=()=>{c&&(f(!1),t&&t(!0))};let g=!1,p=()=>{},y=!1;try{const b=ya();b&&(g=b.isDark,p=b.toggleTheme,y=!0)}catch{}const w=c?!d:e;return l.jsxs(l.Fragment,{children:[c&&a&&l.jsxs("div",{className:"flex md:hidden items-center justify-between px-6 py-4 border-b border-border/20 bg-card/45 backdrop-blur-xl w-full shrink-0 min-h-[64px]",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[n&&l.jsx("div",{className:"text-primary shrink-0 transition-transform duration-300",children:n}),l.jsx("span",{className:"font-extrabold text-sm text-foreground tracking-tight",children:s})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[y&&l.jsx("button",{type:"button",onClick:p,className:"p-2.5 rounded-xl bg-secondary/20 hover:bg-secondary/35 text-foreground cursor-pointer border border-transparent transition-colors flex items-center justify-center shrink-0",children:g?l.jsx(Ka,{size:16,className:"text-amber-500"}):l.jsx(Ga,{size:16,className:"text-primary"})}),l.jsx("button",{type:"button",onClick:h,className:"p-2.5 rounded-xl bg-secondary/20 hover:bg-secondary/35 text-foreground cursor-pointer border border-transparent transition-colors flex items-center justify-center shrink-0",children:l.jsx(Wa,{size:16,className:"text-foreground"})})]})]}),c&&!w&&l.jsx("div",{onClick:h,className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-40 md:hidden transition-opacity duration-300"}),l.jsxs("aside",{className:D("h-screen bg-card/45 backdrop-blur-xl border-r border-border/40 flex flex-col transition-all duration-300 ease-in-out shrink-0 text-left relative",c?"fixed top-0 bottom-0 left-0 z-50":"z-30",w?"w-0 -translate-x-full md:w-20 md:translate-x-0 overflow-hidden border-r-0 md:border-r border-border/20":"w-64 translate-x-0 border-r border-border/40",i),children:[l.jsxs("div",{className:D("flex border-b border-border/20 shrink-0 transition-all duration-300",w?"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",w&&"justify-center"),children:[n&&l.jsx("div",{className:"text-primary shrink-0 transition-transform duration-300",children:n}),!w&&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:h,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:w?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",onClickCapture:m,children:r}),o&&l.jsx("div",{className:"p-3 border-t border-border/20 min-h-[72px] flex items-center overflow-hidden shrink-0",children:o})]})]})},Yh=({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-250 cursor-pointer text-left select-none shrink-0 border border-transparent",r?"justify-center p-3":"px-4 py-3 gap-3",n?"bg-primary/8 text-primary border-primary/15 shadow-[0_0_20px_rgba(var(--primary),0.02)]":"text-muted-foreground hover:text-foreground hover:bg-secondary/35"),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 shrink-0 ml-auto",transition:{type:"spring",stiffness:380,damping:30}})]}),Hh=({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:`
|
|
156
166
|
input[type="range"]::-webkit-slider-thumb {
|
|
157
167
|
-webkit-appearance: none;
|
|
158
168
|
appearance: none;
|
|
@@ -170,5 +180,5 @@ React keys must be passed directly to JSX without using spread:
|
|
|
170
180
|
input[type="range"]::-webkit-slider-thumb:active {
|
|
171
181
|
transform: scale(0.95);
|
|
172
182
|
}
|
|
173
|
-
`})]})]})},Gh=({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"})]})})},Kh=({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})]})]})]}),Yh=({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(),Hh=({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)||"",M=(b==null?void 0:b.name)||w.name||"Task Item",O=(b==null?void 0:b.detail)||w.detail||"";d(k=>{const E=j.toLowerCase()==="success"?"success":j.toLowerCase()==="failed"?"failed":j.toLowerCase()==="skipped"?"skipped":"noLedger";return{...k,[E]:k[E]+1,items:[{name:M,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},Xh=()=>{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(Wa,{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(Ne,{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"})]})]})})})},qh=({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))})]})})}),Zh=({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(Ne,{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]"})]})]})},Jh=({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"},Qh=({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})]})]}),em=({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"},tm=({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(Ne,{size:16})})]},n.id))})}),wa=x.createContext(),nm=()=>{const e=x.useContext(wa);if(!e)throw new Error("useToast must be used within a ToastProvider");return e},sm=({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(tm,{toasts:t,removeToast:r})]})},ka=x.createContext(),rm=({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})},im=()=>{const e=x.useContext(ka);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e};L.Accordion=Mh,L.Alert=Eh,L.AuthPage=Dh,L.Avatar=Vh,L.Badge=ma,L.Button=ye,L.Card=xt,L.Checkbox=Cs,L.ConfirmationModal=Lh,L.Dropdown=Rh,L.Dropzone=Ih,L.Input=Ue,L.Modal=pa,L.NotificationCenter=Oh,L.Pagination=zh,L.PortalTooltip=_h,L.ProgressCircle=Fh,L.Radio=Bh,L.Sidebar=$h,L.SidebarItem=Wh,L.Slider=Uh,L.Spinner=Gh,L.StatsCard=Kh,L.Switch=Yh,L.SyncProgressHUD=Xh,L.SyncProvider=Hh,L.Table=qh,L.Tabs=Jh,L.TagInput=Zh,L.ThemeProvider=rm,L.Timeline=em,L.TimelineItem=Qh,L.ToastProvider=sm,L.cn=D,L.useSync=ya,L.useTheme=im,L.useToast=nm,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})}));
|
|
183
|
+
`})]})]})},Xh=({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"})]})})},qh=({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(Oa,{size:10}),s==="down"&&l.jsx(Ra,{size:10}),n]}),r&&l.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:r})]})]})]}),Zh=({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})]}),xa=x.createContext(),Jh=({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=(b,v="",j)=>{n(b),c(v||"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 b=t[s];try{const v=await f(b),j=typeof v=="string"?v:v.status||"SUCCESS",S=(v==null?void 0:v.message)||"",M=(v==null?void 0:v.name)||b.name||"Task Item",O=(v==null?void 0:v.detail)||b.detail||"";d(T=>{const E=j.toLowerCase()==="success"?"success":j.toLowerCase()==="failed"?"failed":j.toLowerCase()==="skipped"?"skipped":"noLedger";return{...T,[E]:T[E]+1,items:[{name:M,detail:O,status:j,message:S},...T.items]}})}catch(v){console.error("Task Execution Failed:",v),d(j=>({...j,failed:j.failed+1,items:[{name:b.name||"Task Item",detail:b.detail||"",status:"FAILED",message:v.message||"Execution Error"},...j.items]}))}finally{m.current=!1,s+1<t.length?r(v=>v+1):i("COMPLETED")}};x.useEffect(()=>{o==="SYNCING"&&y()},[s,o,f]);const w=t.length>0?Math.round((s+(o==="COMPLETED"?1:0))/t.length*100):0;return l.jsx(xa.Provider,{value:{queue:t,currentIndex:s,status:o,results:u,batchName:a,progress:w,addToQueue:g,clearQueue:p},children:e})},ba=()=>{const e=x.useContext(xa);if(!e)throw new Error("useSync must be used within a SyncProvider");return e},Qh=()=>{const{status:e,results:t,currentIndex:n,queue:s,progress:r,batchName:o,clearQueue:i}=ba(),[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(Ua,{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(Ne,{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(_a,{className:"text-emerald-500",size:16}),l.jsx("p",{className:"text-[10px] font-bold text-emerald-600 uppercase tracking-tighter",children:"Batch operations completed"})]})]})})})},em=({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))})]})})}),tm=({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 w=[...e,y];t&&t(w),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((w,b)=>b!==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:w=>{w.stopPropagation(),m(y)},className:"hover:bg-primary/20 rounded text-primary hover:text-foreground shrink-0 transition-colors p-0.5",children:l.jsx(Ne,{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]"})]})]})},nm=({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)})}),va={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"},sm=({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",va[s]||va.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})]})]}),rm=({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)})},wa={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"})},ka={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"},im=({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 ${ka[n.variant]||ka.default}`,children:[l.jsx("div",{className:"mt-0.5 shrink-0",children:wa[n.variant]||wa.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(Ne,{size:16})})]},n.id))})}),Ta=x.createContext(),om=()=>{const e=x.useContext(Ta);if(!e)throw new Error("useToast must be used within a ToastProvider");return e},am=({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(Ta.Provider,{value:{toast:o},children:[e,l.jsx(im,{toasts:t,removeToast:r})]})};L.Accordion=Dh,L.Alert=Lh,L.AuthPage=Ih,L.Avatar=Rh,L.Badge=ma,L.Button=ye,L.Card=xt,L.Checkbox=Cs,L.ConfirmationModal=Oh,L.Dropdown=zh,L.Dropzone=_h,L.Input=Ue,L.Modal=pa,L.NotificationCenter=Fh,L.Pagination=Bh,L.PortalTooltip=$h,L.ProgressCircle=Wh,L.Radio=Uh,L.Sidebar=Kh,L.SidebarItem=Yh,L.Slider=Hh,L.Spinner=Xh,L.StatsCard=qh,L.Switch=Zh,L.SyncProgressHUD=Qh,L.SyncProvider=Jh,L.Table=em,L.Tabs=nm,L.TagInput=tm,L.ThemeProvider=Gh,L.Timeline=rm,L.TimelineItem=sm,L.ToastProvider=am,L.cn=D,L.useSync=ba,L.useTheme=ya,L.useToast=om,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})}));
|
|
174
184
|
//# sourceMappingURL=renderloom.umd.cjs.map
|