renderloom 1.0.9 → 1.0.10

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.
@@ -1,4 +1,4 @@
1
- (function(L,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],w):(L=typeof globalThis<"u"?globalThis:L||self,w(L.RenderLoom={},L.React,L.ReactDOM))})(this,(function(L,w,Al){"use strict";var Pl;function Ml(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const S=Ml(w);var Mt={exports:{}},dt={};/**
1
+ (function(L,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],b):(L=typeof globalThis<"u"?globalThis:L||self,b(L.RenderLoom={},L.React,L.ReactDOM))})(this,(function(L,b,Ca){"use strict";var Sa;function Na(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 vt=Na(b);var wt={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 ar;function Rl(){if(ar)return dt;ar=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 dt.Fragment=t,dt.jsx=n,dt.jsxs=n,dt}var ft={};/**
9
+ */var As;function Pa(){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,171 +14,160 @@
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 lr;function Dl(){return lr||(lr=1,process.env.NODE_ENV!=="production"&&(function(){function e(T){if(T==null)return null;if(typeof T=="function")return T.$$typeof===z?null:T.displayName||T.name||null;if(typeof T=="string")return T;switch(T){case y:return"Fragment";case b:return"Profiler";case v:return"StrictMode";case N:return"Suspense";case I:return"SuspenseList";case V:return"Activity"}if(typeof T=="object")switch(typeof T.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),T.$$typeof){case p:return"Portal";case j:return T.displayName||"Context";case x:return(T._context.displayName||"Context")+".Consumer";case C:var _=T.render;return T=T.displayName,T||(T=_.displayName||_.name||"",T=T!==""?"ForwardRef("+T+")":"ForwardRef"),T;case k:return _=T.displayName||null,_!==null?_:e(T.type)||"Memo";case M:_=T._payload,T=T._init;try{return e(T(_))}catch{}}return null}function t(T){return""+T}function n(T){try{t(T);var _=!1}catch{_=!0}if(_){_=console;var H=_.error,Z=typeof Symbol=="function"&&Symbol.toStringTag&&T[Symbol.toStringTag]||T.constructor.name||"Object";return H.call(_,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Z),t(T)}}function s(T){if(T===y)return"<>";if(typeof T=="object"&&T!==null&&T.$$typeof===M)return"<...>";try{var _=e(T);return _?"<"+_+">":"<...>"}catch{return"<...>"}}function r(){var T=$.A;return T===null?null:T.getOwner()}function o(){return Error("react-stack-top-frame")}function i(T){if(oe.call(T,"key")){var _=Object.getOwnPropertyDescriptor(T,"key").get;if(_&&_.isReactWarning)return!1}return T.key!==void 0}function a(T,_){function H(){G||(G=!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)",_))}H.isReactWarning=!0,Object.defineProperty(T,"key",{get:H,configurable:!0})}function l(){var T=e(this.type);return ke[T]||(ke[T]=!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.")),T=this.props.ref,T!==void 0?T:null}function u(T,_,H,Z,ee,ie){var q=H.ref;return T={$$typeof:g,type:T,key:_,props:H,_owner:Z},(q!==void 0?q:null)!==null?Object.defineProperty(T,"ref",{enumerable:!1,get:l}):Object.defineProperty(T,"ref",{enumerable:!1,value:null}),T._store={},Object.defineProperty(T._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(T,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(T,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ee}),Object.defineProperty(T,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ie}),Object.freeze&&(Object.freeze(T.props),Object.freeze(T)),T}function d(T,_,H,Z,ee,ie){var q=_.children;if(q!==void 0)if(Z)if(se(q)){for(Z=0;Z<q.length;Z++)f(q[Z]);Object.freeze&&Object.freeze(q)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else f(q);if(oe.call(_,"key")){q=e(T);var De=Object.keys(_).filter(function(bn){return bn!=="key"});Z=0<De.length?"{key: someKey, "+De.join(": ..., ")+": ...}":"{key: someKey}",R[q+Z]||(De=0<De.length?"{"+De.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var Ms;function Aa(){return Ms||(Ms=1,process.env.NODE_ENV!=="production"&&(function(){function e(w){if(w==null)return null;if(typeof w=="function")return w.$$typeof===_?null:w.displayName||w.name||null;if(typeof w=="string")return w;switch(w){case x:return"Fragment";case v:return"Profiler";case k:return"StrictMode";case E:return"Suspense";case z:return"SuspenseList";case D:return"Activity"}if(typeof w=="object")switch(typeof w.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),w.$$typeof){case p:return"Portal";case T:return w.displayName||"Context";case y:return(w._context.displayName||"Context")+".Consumer";case S:var R=w.render;return w=w.displayName,w||(w=R.displayName||R.name||"",w=w!==""?"ForwardRef("+w+")":"ForwardRef"),w;case j:return R=w.displayName||null,R!==null?R:e(w.type)||"Memo";case V:R=w._payload,w=w._init;try{return e(w(R))}catch{}}return null}function t(w){return""+w}function n(w){try{t(w);var R=!1}catch{R=!0}if(R){R=console;var U=R.error,X=typeof Symbol=="function"&&Symbol.toStringTag&&w[Symbol.toStringTag]||w.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(w)}}function s(w){if(w===x)return"<>";if(typeof w=="object"&&w!==null&&w.$$typeof===V)return"<...>";try{var R=e(w);return R?"<"+R+">":"<...>"}catch{return"<...>"}}function r(){var w=B.A;return w===null?null:w.getOwner()}function o(){return Error("react-stack-top-frame")}function i(w){if(de.call(w,"key")){var R=Object.getOwnPropertyDescriptor(w,"key").get;if(R&&R.isReactWarning)return!1}return w.key!==void 0}function a(w,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(w,"key",{get:U,configurable:!0})}function c(){var w=e(this.type);return ye[w]||(ye[w]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),w=this.props.ref,w!==void 0?w:null}function d(w,R,U,X,Q,se){var K=U.ref;return w={$$typeof:g,type:w,key:R,props:U,_owner:X},(K!==void 0?K:null)!==null?Object.defineProperty(w,"ref",{enumerable:!1,get:c}):Object.defineProperty(w,"ref",{enumerable:!1,value:null}),w._store={},Object.defineProperty(w._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(w,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(w,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Q}),Object.defineProperty(w,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:se}),Object.freeze&&(Object.freeze(w.props),Object.freeze(w)),w}function u(w,R,U,X,Q,se){var K=R.children;if(K!==void 0)if(X)if(ae(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(de.call(R,"key")){K=e(w);var Ce=Object.keys(R).filter(function(en){return en!=="key"});X=0<Ce.length?"{key: someKey, "+Ce.join(": ..., ")+": ...}":"{key: someKey}",A[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} />`,Z,q,De,q),R[q+Z]=!0)}if(q=null,H!==void 0&&(n(H),q=""+H),i(_)&&(n(_.key),q=""+_.key),"key"in _){H={};for(var J in _)J!=="key"&&(H[J]=_[J])}else H=_;return q&&a(H,typeof T=="function"?T.displayName||T.name||"Unknown":T),u(T,q,H,r(),ee,ie)}function f(T){h(T)?T._store&&(T._store.validated=1):typeof T=="object"&&T!==null&&T.$$typeof===M&&(T._payload.status==="fulfilled"?h(T._payload.value)&&T._payload.value._store&&(T._payload.value._store.validated=1):T._store&&(T._store.validated=1))}function h(T){return typeof T=="object"&&T!==null&&T.$$typeof===g}var m=w,g=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),j=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),z=Symbol.for("react.client.reference"),$=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe=Object.prototype.hasOwnProperty,se=Array.isArray,B=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(T){return T()}};var G,ke={},Y=m.react_stack_bottom_frame.bind(m,o)(),re=B(s(o)),R={};ft.Fragment=y,ft.jsx=function(T,_,H){var Z=1e4>$.recentlyCreatedOwnerStacks++;return d(T,_,H,!1,Z?Error("react-stack-top-frame"):Y,Z?B(s(T)):re)},ft.jsxs=function(T,_,H){var Z=1e4>$.recentlyCreatedOwnerStacks++;return d(T,_,H,!0,Z?Error("react-stack-top-frame"):Y,Z?B(s(T)):re)}})()),ft}var cr;function Vl(){return cr||(cr=1,process.env.NODE_ENV==="production"?Mt.exports=Rl():Mt.exports=Dl()),Mt.exports}var c=Vl();/**
22
+ <%s key={someKey} {...props} />`,X,K,Ce,K),A[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 w=="function"?w.displayName||w.name||"Unknown":w),d(w,K,U,r(),Q,se)}function f(w){h(w)?w._store&&(w._store.validated=1):typeof w=="object"&&w!==null&&w.$$typeof===V&&(w._payload.status==="fulfilled"?h(w._payload.value)&&w._payload.value._store&&(w._payload.value._store.validated=1):w._store&&(w._store.validated=1))}function h(w){return typeof w=="object"&&w!==null&&w.$$typeof===g}var m=b,g=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),T=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),_=Symbol.for("react.client.reference"),B=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,de=Object.prototype.hasOwnProperty,ae=Array.isArray,J=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(w){return w()}};var W,ye={},Y=m.react_stack_bottom_frame.bind(m,o)(),ne=J(s(o)),A={};st.Fragment=x,st.jsx=function(w,R,U){var X=1e4>B.recentlyCreatedOwnerStacks++;return u(w,R,U,!1,X?Error("react-stack-top-frame"):Y,X?J(s(w)):ne)},st.jsxs=function(w,R,U){var X=1e4>B.recentlyCreatedOwnerStacks++;return u(w,R,U,!0,X?Error("react-stack-top-frame"):Y,X?J(s(w)):ne)}})()),st}var Es;function Ma(){return Es||(Es=1,process.env.NODE_ENV==="production"?wt.exports=Pa():wt.exports=Aa()),wt.exports}var l=Ma();/**
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 Ll=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Il=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,s)=>s?s.toUpperCase():n.toLowerCase()),ur=e=>{const t=Il(e);return t.charAt(0).toUpperCase()+t.slice(1)},dr=(...e)=>e.filter((t,n,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===n).join(" ").trim(),_l=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
27
+ */const Ea=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Va=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,s)=>s?s.toUpperCase():n.toLowerCase()),Vs=e=>{const t=Va(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ds=(...e)=>e.filter((t,n,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===n).join(" ").trim(),Da=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 Ol={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"};/**
32
+ */var La={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 Fl=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:r="",children:o,iconNode:i,...a},l)=>w.createElement("svg",{ref:l,...Ol,width:t,height:t,stroke:e,strokeWidth:s?Number(n)*24/Number(t):n,className:dr("lucide",r),...!o&&!_l(a)&&{"aria-hidden":"true"},...a},[...i.map(([u,d])=>w.createElement(u,d)),...Array.isArray(o)?o:[o]]));/**
37
+ */const Ra=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:r="",children:o,iconNode:i,...a},c)=>b.createElement("svg",{ref:c,...La,width:t,height:t,stroke:e,strokeWidth:s?Number(n)*24/Number(t):n,className:Ds("lucide",r),...!o&&!Da(a)&&{"aria-hidden":"true"},...a},[...i.map(([d,u])=>b.createElement(d,u)),...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 K=(e,t)=>{const n=w.forwardRef(({className:s,...r},o)=>w.createElement(Fl,{ref:o,iconNode:t,className:dr(`lucide-${Ll(ur(e))}`,`lucide-${e}`,s),...r}));return n.displayName=ur(e),n};/**
42
+ */const G=(e,t)=>{const n=b.forwardRef(({className:s,...r},o)=>b.createElement(Ra,{ref:o,iconNode:t,className:Ds(`lucide-${Ea(Vs(e))}`,`lucide-${e}`,s),...r}));return n.displayName=Vs(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 zl=K("arrow-down-right",[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]);/**
47
+ */const Ia=G("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 Bl=K("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
52
+ */const za=G("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 $l=K("arrow-up-right",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
57
+ */const Oa=G("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 fr=K("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"}]]);/**
62
+ */const Ls=G("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 Wl=K("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
67
+ */const _a=G("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 hr=K("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
72
+ */const Rs=G("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 Sn=K("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
77
+ */const rn=G("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 ht=K("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
82
+ */const rt=G("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 mr=K("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"}]]);/**
87
+ */const Is=G("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 Ul=K("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"}]]);/**
92
+ */const Fa=G("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 Rt=K("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
97
+ */const kt=G("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 Gl=K("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"}]]);/**
102
+ */const Ba=G("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 Hl=K("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"}]]);/**
107
+ */const $a=G("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 Dt=K("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
112
+ */const jt=G("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 Kl=K("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"}]]);/**
117
+ */const Wa=G("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 Yl=K("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]);/**
122
+ */const Ua=G("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]);/**
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 ql=K("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]);/**
127
+ */const Ga=G("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]);/**
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 Xl=K("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"}]]);/**
132
+ */const Ya=G("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"}]]);/**
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 Zl=K("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"}]]);/**
137
+ */const Ka=G("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"}]]);/**
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 pr=K("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"}]]);/**
142
+ */const zs=G("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"}]]);/**
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 Jl=K("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"}]]);/**
147
+ */const Ha=G("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"}]]);/**
148
148
  * @license lucide-react v0.562.0 - ISC
149
149
  *
150
150
  * This source code is licensed under the ISC license.
151
151
  * See the LICENSE file in the root directory of this source tree.
152
- */const Ql=K("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"}]]);/**
152
+ */const Xa=G("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"}]]);/**
153
153
  * @license lucide-react v0.562.0 - ISC
154
154
  *
155
155
  * This source code is licensed under the ISC license.
156
156
  * See the LICENSE file in the root directory of this source tree.
157
- */const Tn=K("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"}]]);/**
157
+ */const on=G("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"}]]);/**
158
158
  * @license lucide-react v0.562.0 - ISC
159
159
  *
160
160
  * This source code is licensed under the ISC license.
161
161
  * See the LICENSE file in the root directory of this source tree.
162
- */const Ve=K("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),jn=w.createContext({});function Cn(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const gr=typeof window<"u"?w.useLayoutEffect:w.useEffect,Vt=w.createContext(null);function Nn(e,t){e.indexOf(t)===-1&&e.push(t)}function Lt(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Se=(e,t,n)=>n>t?t:n<e?e:n;function En(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Qe=()=>{},Ee=()=>{};typeof process<"u"&&((Pl=process.env)==null?void 0:Pl.NODE_ENV)!=="production"&&(Qe=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(En(t,n))},Ee=(e,t,n)=>{if(!e)throw new Error(En(t,n))});const Le={},yr=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function xr(e){return typeof e=="object"&&e!==null}const br=e=>/^0[^.\s]+$/u.test(e);function vr(e){let t;return()=>(t===void 0&&(t=e()),t)}const me=e=>e,ec=(e,t)=>n=>t(e(n)),mt=(...e)=>e.reduce(ec),pt=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class Pn{constructor(){this.subscriptions=[]}add(t){return Nn(this.subscriptions,t),()=>Lt(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 he=e=>e*1e3,pe=e=>e/1e3;function wr(e,t){return t?e*(1e3/t):0}const kr=new Set;function An(e,t,n){e||kr.has(t)||(console.warn(En(t,n)),kr.add(t))}const Sr=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,tc=1e-7,nc=12;function sc(e,t,n,s,r){let o,i,a=0;do i=t+(n-t)/2,o=Sr(i,s,r)-e,o>0?n=i:t=i;while(Math.abs(o)>tc&&++a<nc);return i}function gt(e,t,n,s){if(e===t&&n===s)return me;const r=o=>sc(o,0,1,e,n);return o=>o===0||o===1?o:Sr(r(o),t,s)}const Tr=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,jr=e=>t=>1-e(1-t),Cr=gt(.33,1.53,.69,.99),Mn=jr(Cr),Nr=Tr(Mn),Er=e=>e>=1?1:(e*=2)<1?.5*Mn(e):.5*(2-Math.pow(2,-10*(e-1))),Rn=e=>1-Math.sin(Math.acos(e)),Pr=jr(Rn),Ar=Tr(Rn),rc=gt(.42,0,1,1),ic=gt(0,0,.58,1),Mr=gt(.42,0,.58,1),oc=e=>Array.isArray(e)&&typeof e[0]!="number",Rr=e=>Array.isArray(e)&&typeof e[0]=="number",Dr={linear:me,easeIn:rc,easeInOut:Mr,easeOut:ic,circIn:Rn,circInOut:Ar,circOut:Pr,backIn:Mn,backInOut:Nr,backOut:Cr,anticipate:Er},ac=e=>typeof e=="string",Vr=e=>{if(Rr(e)){Ee(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,s,r]=e;return gt(t,n,s,r)}else if(ac(e))return Ee(Dr[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Dr[e];return e},It=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function lc(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 l(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(l),n.clear(),r=!1,o&&(o=!1,u.process(d))}};return u}const cc=40;function Lr(e,t){let n=!1,s=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=It.reduce((x,j)=>(x[j]=lc(o),x),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:d,update:f,preRender:h,render:m,postRender:g}=i,p=()=>{const x=Le.useManualTiming,j=x?r.timestamp:performance.now();n=!1,x||(r.delta=s?1e3/60:Math.max(Math.min(j-r.timestamp,cc),1)),r.timestamp=j,r.isProcessing=!0,a.process(r),l.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:It.reduce((x,j)=>{const C=i[j];return x[j]=(N,I=!1,k=!1)=>(n||y(),C.schedule(N,I,k)),x},{}),cancel:x=>{for(let j=0;j<It.length;j++)i[It[j]].cancel(x)},state:r,steps:i}}const{schedule:W,cancel:Ie,state:ae,steps:Dn}=Lr(typeof requestAnimationFrame<"u"?requestAnimationFrame:me,!0);let _t;function uc(){_t=void 0}const de={now:()=>(_t===void 0&&de.set(ae.isProcessing||Le.useManualTiming?ae.timestamp:performance.now()),_t),set:e=>{_t=e,queueMicrotask(uc)}},Ir=e=>t=>typeof t=="string"&&t.startsWith(e),_r=Ir("--"),dc=Ir("var(--"),Vn=e=>dc(e)?fc.test(e.split("/*")[0].trim()):!1,fc=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Or(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const et={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},yt={...et,transform:e=>Se(0,1,e)},Ot={...et,default:1},xt=e=>Math.round(e*1e5)/1e5,Ln=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function hc(e){return e==null}const mc=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,In=(e,t)=>n=>!!(typeof n=="string"&&mc.test(n)&&n.startsWith(e)||t&&!hc(n)&&Object.prototype.hasOwnProperty.call(n,t)),Fr=(e,t,n)=>s=>{if(typeof s!="string")return s;const[r,o,i,a]=s.match(Ln);return{[e]:parseFloat(r),[t]:parseFloat(o),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},pc=e=>Se(0,255,e),_n={...et,transform:e=>Math.round(pc(e))},Ue={test:In("rgb","red"),parse:Fr("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+_n.transform(e)+", "+_n.transform(t)+", "+_n.transform(n)+", "+xt(yt.transform(s))+")"};function gc(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 On={test:In("#"),parse:gc,transform:Ue.transform},bt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),_e=bt("deg"),Te=bt("%"),A=bt("px"),yc=bt("vh"),xc=bt("vw"),zr={...Te,parse:e=>Te.parse(e)/100,transform:e=>Te.transform(e*100)},tt={test:In("hsl","hue"),parse:Fr("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+Te.transform(xt(t))+", "+Te.transform(xt(n))+", "+xt(yt.transform(s))+")"},Q={test:e=>Ue.test(e)||On.test(e)||tt.test(e),parse:e=>Ue.test(e)?Ue.parse(e):tt.test(e)?tt.parse(e):On.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ue.transform(e):tt.transform(e),getAnimatableNone:e=>{const t=Q.parse(e);return t.alpha=0,Q.transform(t)}},bc=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function vc(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Ln))==null?void 0:t.length)||0)+(((n=e.match(bc))==null?void 0:n.length)||0)>0}const Br="number",$r="color",wc="var",kc="var(",Wr="${}",Sc=/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 nt(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},r=[];let o=0;const a=t.replace(Sc,l=>(Q.test(l)?(s.color.push(o),r.push($r),n.push(Q.parse(l))):l.startsWith(kc)?(s.var.push(o),r.push(wc),n.push(l)):(s.number.push(o),r.push(Br),n.push(parseFloat(l))),++o,Wr)).split(Wr);return{values:n,split:a,indexes:s,types:r}}function Tc(e){return nt(e).values}function Ur({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===Br?r+=xt(s[o]):i===$r?r+=Q.transform(s[o]):r+=s[o]}return r}}function jc(e){return Ur(nt(e))}const Cc=e=>typeof e=="number"?0:Q.test(e)?Q.getAnimatableNone(e):e,Nc=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:Cc(e);function Ec(e){const t=nt(e);return Ur(t)(t.values.map((s,r)=>Nc(s,t.split[r])))}const ge={test:vc,parse:Tc,createTransformer:jc,getAnimatableNone:Ec};function Fn(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 Pc({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,l=2*n-a;r=Fn(l,a,e+1/3),o=Fn(l,a,e),i=Fn(l,a,e-1/3)}return{red:Math.round(r*255),green:Math.round(o*255),blue:Math.round(i*255),alpha:s}}function Ft(e,t){return n=>n>0?t:e}const U=(e,t,n)=>e+(t-e)*n,zn=(e,t,n)=>{const s=e*e,r=n*(t*t-s)+s;return r<0?0:Math.sqrt(r)},Ac=[On,Ue,tt],Mc=e=>Ac.find(t=>t.test(e));function Gr(e){const t=Mc(e);if(Qe(!!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===tt&&(n=Pc(n)),n}const Hr=(e,t)=>{const n=Gr(e),s=Gr(t);if(!n||!s)return Ft(e,t);const r={...n};return o=>(r.red=zn(n.red,s.red,o),r.green=zn(n.green,s.green,o),r.blue=zn(n.blue,s.blue,o),r.alpha=U(n.alpha,s.alpha,o),Ue.transform(r))},Bn=new Set(["none","hidden"]);function Rc(e,t){return Bn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Dc(e,t){return n=>U(e,t,n)}function $n(e){return typeof e=="number"?Dc:typeof e=="string"?Vn(e)?Ft:Q.test(e)?Hr:Ic:Array.isArray(e)?Kr:typeof e=="object"?Q.test(e)?Hr:Vc:Ft}function Kr(e,t){const n=[...e],s=n.length,r=e.map((o,i)=>$n(o)(o,t[i]));return o=>{for(let i=0;i<s;i++)n[i]=r[i](o);return n}}function Vc(e,t){const n={...e,...t},s={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(s[r]=$n(e[r])(e[r],t[r]));return r=>{for(const o in s)n[o]=s[o](r);return n}}function Lc(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 Ic=(e,t)=>{const n=ge.createTransformer(t),s=nt(e),r=nt(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?Bn.has(e)&&!r.values.length||Bn.has(t)&&!s.values.length?Rc(e,t):mt(Kr(Lc(s,r),r.values),n):(Qe(!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"),Ft(e,t))};function Yr(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?U(e,t,n):$n(e)(e,t)}const _c=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>W.update(t,n),stop:()=>Ie(t),now:()=>ae.isProcessing?ae.timestamp:de.now()}},qr=(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)})`},zt=2e4;function Wn(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<zt;)t+=n,s=e.next(t);return t>=zt?1/0:t}function Oc(e,t=100,n){const s=n({...e,keyframes:[0,t]}),r=Math.min(Wn(s),zt);return{type:"keyframes",ease:o=>s.next(r*o).value/t,duration:pe(r)}}const X={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 Un(e,t){return e*Math.sqrt(1-t*t)}const Fc=12;function zc(e,t,n){let s=n;for(let r=1;r<Fc;r++)s=s-e(s)/t(s);return s}const Gn=.001;function Bc({duration:e=X.duration,bounce:t=X.bounce,velocity:n=X.velocity,mass:s=X.mass}){let r,o;Qe(e<=he(X.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=Se(X.minDamping,X.maxDamping,i),e=Se(X.minDuration,X.maxDuration,pe(e)),i<1?(r=u=>{const d=u*i,f=d*e,h=d-n,m=Un(u,i),g=Math.exp(-f);return Gn-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=Un(Math.pow(u,2),i);return(-r(u)+Gn>0?-1:1)*((h-m)*g)/p}):(r=u=>{const d=Math.exp(-u*e),f=(u-n)*e+1;return-Gn+d*f},o=u=>{const d=Math.exp(-u*e),f=(n-u)*(e*e);return d*f});const a=5/e,l=zc(r,o,a);if(e=he(e),isNaN(l))return{stiffness:X.stiffness,damping:X.damping,duration:e};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:i*2*Math.sqrt(s*u),duration:e}}}const $c=["duration","bounce"],Wc=["stiffness","damping","mass"];function Xr(e,t){return t.some(n=>e[n]!==void 0)}function Uc(e){let t={velocity:X.velocity,stiffness:X.stiffness,damping:X.damping,mass:X.mass,isResolvedFromDuration:!1,...e};if(!Xr(e,Wc)&&Xr(e,$c))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),r=s*s,o=2*Se(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:X.mass,stiffness:r,damping:o}}else{const n=Bc({...e,velocity:0});t={...t,...n,mass:X.mass},t.isResolvedFromDuration=!0}return t}function Bt(e=X.visualDuration,t=X.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:l,damping:u,mass:d,duration:f,velocity:h,isResolvedFromDuration:m}=Uc({...n,velocity:-pe(n.velocity||0)}),g=h||0,p=u/(2*Math.sqrt(l*d)),y=i-o,v=pe(Math.sqrt(l/d)),b=Math.abs(y)<5;s||(s=b?X.restSpeed.granular:X.restSpeed.default),r||(r=b?X.restDelta.granular:X.restDelta.default);let x,j,C,N,I,k;if(p<1)C=Un(v,p),N=(g+p*v*y)/C,x=V=>{const z=Math.exp(-p*v*V);return i-z*(N*Math.sin(C*V)+y*Math.cos(C*V))},I=p*v*N+y*C,k=p*v*y-N*C,j=V=>Math.exp(-p*v*V)*(I*Math.sin(C*V)+k*Math.cos(C*V));else if(p===1){x=z=>i-Math.exp(-v*z)*(y+(g+v*y)*z);const V=g+v*y;j=z=>Math.exp(-v*z)*(v*V*z-g)}else{const V=v*Math.sqrt(p*p-1);x=se=>{const B=Math.exp(-p*v*se),G=Math.min(V*se,300);return i-B*((g+p*v*y)*Math.sinh(G)+V*y*Math.cosh(G))/V};const z=(g+p*v*y)/V,$=p*v*z-y*V,oe=p*v*y-z*V;j=se=>{const B=Math.exp(-p*v*se),G=Math.min(V*se,300);return B*($*Math.sinh(G)+oe*Math.cosh(G))}}const M={calculatedDuration:m&&f||null,velocity:V=>he(j(V)),next:V=>{if(!m&&p<1){const $=Math.exp(-p*v*V),oe=Math.sin(C*V),se=Math.cos(C*V),B=i-$*(N*oe+y*se),G=he($*(I*oe+k*se));return a.done=Math.abs(G)<=s&&Math.abs(i-B)<=r,a.value=a.done?i:B,a}const z=x(V);if(m)a.done=V>=f;else{const $=he(j(V));a.done=Math.abs($)<=s&&Math.abs(i-z)<=r}return a.value=a.done?i:z,a},toString:()=>{const V=Math.min(Wn(M),zt),z=qr($=>M.next(V*$).value,V,30);return V+"ms "+z},toTransition:()=>{}};return M}Bt.applyToOptions=e=>{const t=Oc(e,100,Bt);return e.ease=t.ease,e.duration=he(t.duration),e.type="keyframes",e};const Gc=5;function Zr(e,t,n){const s=Math.max(t-Gc,0);return wr(n-e(s),t-s)}function Hn({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:o=500,modifyTarget:i,min:a,max:l,restDelta:u=.5,restSpeed:d}){const f=e[0],h={done:!1,value:f},m=k=>a!==void 0&&k<a||l!==void 0&&k>l,g=k=>a===void 0?l:l===void 0||Math.abs(a-k)<Math.abs(l-k)?a:l;let p=n*t;const y=f+p,v=i===void 0?y:i(y);v!==y&&(p=v-f);const b=k=>-p*Math.exp(-k/s),x=k=>v+b(k),j=k=>{const M=b(k),V=x(k);h.done=Math.abs(M)<=u,h.value=h.done?v:V};let C,N;const I=k=>{m(h.value)&&(C=k,N=Bt({keyframes:[h.value,g(h.value)],velocity:Zr(x,k,h.value),damping:r,stiffness:o,restDelta:u,restSpeed:d}))};return I(0),{calculatedDuration:null,next:k=>{let M=!1;return!N&&C===void 0&&(M=!0,j(k),I(k)),C!==void 0&&k>=C?N.next(k-C):(!M&&j(k),h)}}}function Hc(e,t,n){const s=[],r=n||Le.mix||Yr,o=e.length-1;for(let i=0;i<o;i++){let a=r(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||me:t;a=mt(l,a)}s.push(a)}return s}function Kc(e,t,{clamp:n=!0,ease:s,mixer:r}={}){const o=e.length;if(Ee(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=Hc(t,s,r),l=a.length,u=d=>{if(i&&d<e[0])return t[0];let f=0;if(l>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const h=pt(e[f],e[f+1],d);return a[f](h)};return n?d=>u(Se(e[0],e[o-1],d)):u}function Yc(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const r=pt(0,t,s);e.push(U(n,1,r))}}function qc(e){const t=[0];return Yc(t,e.length-1),t}function Xc(e,t){return e.map(n=>n*t)}function Zc(e,t){return e.map(()=>t||Mr).splice(0,e.length-1)}function st({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const r=oc(s)?s.map(Vr):Vr(s),o={done:!1,value:t[0]},i=Xc(n&&n.length===t.length?n:qc(t),e),a=Kc(i,t,{ease:Array.isArray(r)?r:Zc(t,r)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}const Jc=e=>e!==null;function $t(e,{repeat:t,repeatType:n="loop"},s,r=1){const o=e.filter(Jc),a=r<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const Qc={decay:Hn,inertia:Hn,tween:st,keyframes:st,spring:Bt};function Jr(e){typeof e.type=="string"&&(e.type=Qc[e.type])}class Kn{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 eu=e=>e/100;class Wt extends Kn{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!==de.now()&&this.tick(de.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;Jr(t);const{type:n=st,repeat:s=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=t;let{keyframes:a}=t;const l=n||st;process.env.NODE_ENV!=="production"&&l!==st&&Ee(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==st&&typeof a[0]!="number"&&(this.mixKeyframes=mt(eu,Yr(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=Wn(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:l}=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 v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?v<0:v>r;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let x=this.currentTime,j=s;if(f){const k=Math.min(this.currentTime,r)/a;let M=Math.floor(k),V=k%1;!V&&k>=1&&(V=1),V===1&&M--,M=Math.min(M,f+1),!!(M%2)&&(h==="reverse"?(V=1-V,m&&(V-=m/a)):h==="mirror"&&(j=i)),x=Se(0,1,V)*a}let C;b?(this.delayState.value=d[0],C=this.delayState):C=j.next(x),o&&!b&&(C.value=o(C.value));let{done:N}=C;!b&&l!==null&&(N=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const I=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&N);return I&&g!==Hn&&(C.value=$t(d,this.options,y,this.speed)),p&&p(C.value),I&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return pe(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+pe(t)}get time(){return pe(this.currentTime)}set time(t){t=he(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 Zr(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(de.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=pe(this.currentTime))}play(){var r,o;if(this.isStopped)return;const{driver:t=_c,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(de.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 tu(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Ge=e=>e*180/Math.PI,Yn=e=>{const t=Ge(Math.atan2(e[1],e[0]));return qn(t)},nu={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Yn,rotateZ:Yn,skewX:e=>Ge(Math.atan(e[1])),skewY:e=>Ge(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},qn=e=>(e=e%360,e<0&&(e+=360),e),Qr=Yn,ei=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ti=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),su={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ei,scaleY:ti,scale:e=>(ei(e)+ti(e))/2,rotateX:e=>qn(Ge(Math.atan2(e[6],e[5]))),rotateY:e=>qn(Ge(Math.atan2(-e[2],e[0]))),rotateZ:Qr,rotate:Qr,skewX:e=>Ge(Math.atan(e[4])),skewY:e=>Ge(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Xn(e){return e.includes("scale")?1:0}function Zn(e,t){if(!e||e==="none")return Xn(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,r;if(n)s=su,r=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=nu,r=a}if(!r)return Xn(t);const o=s[t],i=r[1].split(",").map(iu);return typeof o=="function"?o(i):i[o]}const ru=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Zn(n,t)};function iu(e){return parseFloat(e.trim())}const rt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],it=new Set(rt),ni=e=>e===et||e===A,ou=new Set(["x","y","z"]),au=rt.filter(e=>!ou.has(e));function lu(e){const t=[];return au.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const Oe={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})=>Zn(t,"x"),y:(e,{transform:t})=>Zn(t,"y")};Oe.translateX=Oe.x,Oe.translateY=Oe.y;const He=new Set;let Jn=!1,Qn=!1,es=!1;function si(){if(Qn){const e=Array.from(He).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const r=lu(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)})}Qn=!1,Jn=!1,He.forEach(e=>e.complete(es)),He.clear()}function ri(){He.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Qn=!0)})}function cu(){es=!0,ri(),si(),es=!1}class ts{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?(He.add(this),Jn||(Jn=!0,W.read(ri),W.resolveKeyframes(si))):(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])}tu(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),He.delete(this)}cancel(){this.state==="scheduled"&&(He.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const uu=e=>e.startsWith("--");function ii(e,t,n){uu(t)?e.style.setProperty(t,n):e.style[t]=n}const du={};function oi(e,t){const n=vr(e);return()=>du[t]??n()}const fu=oi(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),ai=oi(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),vt=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,li={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:vt([0,.65,.55,1]),circOut:vt([.55,0,1,.45]),backIn:vt([.31,.01,.66,-.59]),backOut:vt([.33,1.53,.69,.99])};function ci(e,t){if(e)return typeof e=="function"?ai()?qr(e,t):"ease-out":Rr(e)?vt(e):Array.isArray(e)?e.map(n=>ci(n,t)||li.easeOut):li[e]}function hu(e,t,n,{delay:s=0,duration:r=300,repeat:o=0,repeatType:i="loop",ease:a="easeOut",times:l}={},u=void 0){const d={[t]:n};l&&(d.offset=l);const f=ci(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 ui(e){return typeof e=="function"&&"applyToOptions"in e}function mu({type:e,...t}){return ui(e)&&ai()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class di extends Kn{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:l}=t;this.isPseudoElement=!!o,this.allowFlatten=i,this.options=t,Ee(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=mu(t);this.animation=hu(n,s,r,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const d=$t(r,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(d),ii(n,s,d),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,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 pe(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+pe(t)}get time(){return pe(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=he(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&&fu()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),me):r(this)}}const fi={anticipate:Er,backInOut:Nr,circInOut:Ar};function pu(e){return e in fi}function gu(e){typeof e.ease=="string"&&pu(e.ease)&&(e.ease=fi[e.ease])}const ns=10;class yu extends di{constructor(t){gu(t),Jr(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 Wt({...i,autoplay:!1}),l=Math.max(ns,de.now()-this.startTime),u=Se(0,ns,l-ns),d=a.sample(l).value,{name:f}=this.options;o&&f&&ii(o,f,d),n.setWithVelocity(a.sample(Math.max(0,l-u)).value,d,u),a.stop()}}const hi=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ge.test(e)||e==="0")&&!e.startsWith("url("));function xu(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 bu(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=hi(r,t),a=hi(o,t);return Qe(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:xu(e)||(n==="spring"||ui(n))&&s}function ss(e){e.duration=0,e.type="keyframes"}const mi=new Set(["opacity","clipPath","filter","transform"]),vu=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function wu(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&vu.test(e[t]))return!0;return!1}const ku=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Su=vr(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Tu(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 Su()&&n&&(mi.has(n)||ku.has(n)&&wu(a))&&(n!=="transform"||!d)&&!u&&!s&&r!=="mirror"&&o!==0&&i!=="inertia"}const ju=40;class Cu extends Kn{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i="loop",keyframes:a,name:l,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=de.now();const h={autoplay:t,delay:n,type:s,repeat:r,repeatDelay:o,repeatType:i,name:l,motionValue:u,element:d,...f},m=(d==null?void 0:d.KeyframeResolver)||ts;this.keyframeResolver=new m(a,(p,y,v)=>this.onKeyframesResolved(p,y,h,!v),l,u,d),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,s,r){var v,b;this.keyframeResolver=void 0;const{name:o,type:i,velocity:a,delay:l,isHandoff:u,onUpdate:d}=s;this.resolvedAt=de.now();let f=!0;bu(t,o,i,a)||(f=!1,(Le.instantAnimations||!l)&&(d==null||d($t(t,s,n))),t[0]=t[t.length-1],ss(s),s.repeat=0);const m={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>ju?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},g=f&&!u&&Tu(m),p=(b=(v=m.motionValue)==null?void 0:v.owner)==null?void 0:b.current;let y;if(g)try{y=new yu({...m,element:p})}catch{y=new Wt(m)}else y=new Wt(m);y.finished.then(()=>{this.notifyFinished()}).catch(me),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(),cu()),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 pi(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 Nu=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Eu(e){const t=Nu.exec(e);if(!t)return[,];const[,n,s,r]=t;return[`--${n??s}`,r]}const Pu=4;function gi(e,t,n=1){Ee(n<=Pu,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,r]=Eu(e);if(!s)return;const o=window.getComputedStyle(t).getPropertyValue(s);if(o){const i=o.trim();return yr(i)?parseFloat(i):i}return Vn(r)?gi(r,t,n+1):r}const Au={type:"spring",stiffness:500,damping:25,restSpeed:10},Mu=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Ru={type:"keyframes",duration:.8},Du={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Vu=(e,{keyframes:t})=>t.length>2?Ru:it.has(e)?e.startsWith("scale")?Mu(t[1]):Au:Du;function yi(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...s}=e;return{...t,...s}}return e}function rs(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?yi(n,e):n}const Lu=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Iu(e){for(const t in e)if(!Lu.has(t))return!0;return!1}const is=(e,t,n,s={},r,o)=>i=>{const a=rs(s,e)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-he(l);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};Iu(a)||Object.assign(d,Vu(e,d)),d.duration&&(d.duration=he(d.duration)),d.repeatDelay&&(d.repeatDelay=he(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(ss(d),d.delay===0&&(f=!0)),(Le.instantAnimations||Le.skipAnimations||r!=null&&r.shouldSkipAnimations)&&(f=!0,ss(d),d.delay=0),d.allowFlatten=!a.type&&!a.ease,f&&!o&&t.get()!==void 0){const h=$t(d.keyframes,a);if(h!==void 0){W.update(()=>{d.onUpdate(h),d.onComplete()});return}}return a.isSync?new Wt(d):new Cu(d)};function xi(e){const t=[{},{}];return e==null||e.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function os(e,t,n,s){if(typeof t=="function"){const[r,o]=xi(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]=xi(s);t=t(n!==void 0?n:e.custom,r,o)}return t}function Ke(e,t,n){const s=e.getProps();return os(s,t,n!==void 0?n:s.custom,e)}const bi=new Set(["width","height","top","left","right","bottom",...rt]),vi=30,_u=e=>!isNaN(parseFloat(e));class Ou{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var o;const r=de.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=de.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=_u(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&An(!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 Pn);const s=this.events[t].add(n);return t==="change"?()=>{s(),W.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=de.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>vi)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,vi);return wr(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 ot(e,t){return new Ou(e,t)}const as=e=>Array.isArray(e);function Fu(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ot(n))}function zu(e){return as(e)?e[e.length-1]||0:e}function Bu(e,t){const n=Ke(e,t);let{transitionEnd:s={},transition:r={},...o}=n||{};o={...o,...s};for(const i in o){const a=zu(o[i]);Fu(e,i,a)}}const le=e=>!!(e&&e.getVelocity);function $u(e){return!!(le(e)&&e.add)}function ls(e,t){const n=e.getValue("willChange");if($u(n))return n.add(t);if(!n&&Le.WillChange){const s=new Le.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function cs(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const wi="data-"+cs("framerAppearId");function ki(e){return e.props[wi]}function Wu({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function Si(e,t,{delay:n=0,transitionOverride:s,type:r}={}){let{transition:o,transitionEnd:i,...a}=t;const l=e.getDefaultTransition();o=o?yi(o,l):l;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&&Wu(f,h))continue;const p={delay:n,...rs(o||{},h)},y=m.get();if(y!==void 0&&!m.isAnimating()&&!Array.isArray(g)&&g===y&&!p.velocity){W.update(()=>m.set(g));continue}let v=!1;if(window.MotionHandoffAnimation){const j=ki(e);if(j){const C=window.MotionHandoffAnimation(j,h,W);C!==null&&(p.startTime=C,v=!0)}}ls(e,h);const b=u??e.shouldReduceMotion;m.start(is(h,m,g,b&&bi.has(h)?{type:!1}:p,e,v));const x=m.animation;x&&d.push(x)}if(i){const h=()=>W.update(()=>{i&&Bu(e,i)});d.length?Promise.all(d).then(h):h()}return d}function us(e,t,n={}){var l;const s=Ke(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:r=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(r=n.transitionOverride);const o=s?()=>Promise.all(Si(e,s,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:h}=r;return Uu(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 Uu(e,t,n=0,s=0,r=0,o=1,i){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(us(l,t,{...i,delay:n+(typeof s=="function"?0:s)+pi(e.variantChildren,l,s,r,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function Gu(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const r=t.map(o=>us(e,o,n));s=Promise.all(r)}else if(typeof t=="string")s=us(e,t,n);else{const r=typeof t=="function"?Ke(e,t,n.custom):t;s=Promise.all(Si(e,r,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}const Hu={test:e=>e==="auto",parse:e=>e},Ti=e=>t=>t.test(e),ji=[et,A,Te,_e,xc,yc,Hu],Ci=e=>ji.find(Ti(e));function Ku(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||br(e):!0}const Yu=new Set(["brightness","contrast","saturate","opacity"]);function qu(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(Ln)||[];if(!s)return e;const r=n.replace(s,"");let o=Yu.has(t)?1:0;return s!==n&&(o*=100),t+"("+o+r+")"}const Xu=/\b([a-z-]*)\(.*?\)/gu,ds={...ge,getAnimatableNone:e=>{const t=e.match(Xu);return t?t.map(qu).join(" "):e}},fs={...ge,getAnimatableNone:e=>{const t=ge.parse(e);return ge.createTransformer(e)(t.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},Ni={...et,transform:Math.round},hs={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:_e,rotateX:_e,rotateY:_e,rotateZ:_e,scale:Ot,scaleX:Ot,scaleY:Ot,scaleZ:Ot,skew:_e,skewX:_e,skewY:_e,distance:A,translateX:A,translateY:A,translateZ:A,x:A,y:A,z:A,perspective:A,transformPerspective:A,opacity:yt,originX:zr,originY:zr,originZ:A},zIndex:Ni,fillOpacity:yt,strokeOpacity:yt,numOctaves:Ni},Zu={...hs,color:Q,backgroundColor:Q,outlineColor:Q,fill:Q,stroke:Q,borderColor:Q,borderTopColor:Q,borderRightColor:Q,borderBottomColor:Q,borderLeftColor:Q,filter:ds,WebkitFilter:ds,mask:fs,WebkitMask:fs},Ei=e=>Zu[e],Ju=new Set([ds,fs]);function Pi(e,t){let n=Ei(e);return Ju.has(n)||(n=ge),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Qu=new Set(["auto","none","0"]);function ed(e,t,n){let s=0,r;for(;s<e.length&&!r;){const o=e[s];typeof o=="string"&&!Qu.has(o)&&nt(o).values.length&&(r=e[s]),s++}if(r&&n)for(const o of t)e[o]=Pi(n,r)}class td extends ts{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(),Vn(f))){const h=gi(f,n.current);h!==void 0&&(t[d]=h),d===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!bi.has(s)||t.length!==2)return;const[r,o]=t,i=Ci(r),a=Ci(o),l=Or(r),u=Or(o);if(l!==u&&Oe[s]){this.needsMeasurement=!0;return}if(i!==a)if(ni(i)&&ni(a))for(let d=0;d<t.length;d++){const f=t[d];typeof f=="string"&&(t[d]=parseFloat(f))}else Oe[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let r=0;r<t.length;r++)(t[r]===null||Ku(t[r]))&&s.push(r);s.length&&ed(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=Oe[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]=Oe[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(([l,u])=>{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function Ai(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 Mi=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Ut(e){return xr(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:ms}=Lr(queueMicrotask,!1),ye={x:!1,y:!1};function Ri(){return ye.x||ye.y}function nd(e){return e==="x"||e==="y"?ye[e]?null:(ye[e]=!0,()=>{ye[e]=!1}):ye.x||ye.y?null:(ye.x=ye.y=!0,()=>{ye.x=ye.y=!1})}function Di(e,t){const n=Ai(e),s=new AbortController,r={passive:!0,...t,signal:s.signal};return[n,r,()=>s.abort()]}function sd(e){return!(e.pointerType==="touch"||Ri())}function rd(e,t,n={}){const[s,r,o]=Di(e,n);return s.forEach(i=>{let a=!1,l=!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),l&&(l=!1,f(y))},m=()=>{a=!0,window.addEventListener("pointerup",h,r),window.addEventListener("pointercancel",h,r)},g=y=>{if(y.pointerType!=="touch"){if(a){l=!0;return}f(y)}},p=y=>{if(!sd(y))return;l=!1;const v=t(i,y);typeof v=="function"&&(u=v,i.addEventListener("pointerleave",g,r))};i.addEventListener("pointerenter",p,r),i.addEventListener("pointerdown",m,r)}),o}const Vi=(e,t)=>t?e===t?!0:Vi(e,t.parentElement):!1,ps=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,id=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function od(e){return id.has(e.tagName)||e.isContentEditable===!0}const ad=new Set(["INPUT","SELECT","TEXTAREA"]);function ld(e){return ad.has(e.tagName)||e.isContentEditable===!0}const Gt=new WeakSet;function Li(e){return t=>{t.key==="Enter"&&e(t)}}function gs(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const cd=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=Li(()=>{if(Gt.has(n))return;gs(n,"down");const r=Li(()=>{gs(n,"up")}),o=()=>gs(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 Ii(e){return ps(e)&&!Ri()}const _i=new WeakSet;function ud(e,t,n={}){const[s,r,o]=Di(e,n),i=a=>{const l=a.currentTarget;if(!Ii(a)||_i.has(a))return;Gt.add(l),n.stopPropagation&&_i.add(a);const u=t(l,a),d=(m,g)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),Gt.has(l)&&Gt.delete(l),Ii(m)&&typeof u=="function"&&u(m,{success:g})},f=m=>{d(m,l===window||l===document||n.useGlobalTarget||Vi(l,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),Ut(a)&&(a.addEventListener("focus",u=>cd(u,r)),!od(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function ys(e){return xr(e)&&"ownerSVGElement"in e}const Ht=new WeakMap;let Fe;const Oi=(e,t,n)=>(s,r)=>r&&r[0]?r[0][e+"Size"]:ys(s)&&"getBBox"in s?s.getBBox()[t]:s[n],dd=Oi("inline","width","offsetWidth"),fd=Oi("block","height","offsetHeight");function hd({target:e,borderBoxSize:t}){var n;(n=Ht.get(e))==null||n.forEach(s=>{s(e,{get width(){return dd(e,t)},get height(){return fd(e,t)}})})}function md(e){e.forEach(hd)}function pd(){typeof ResizeObserver>"u"||(Fe=new ResizeObserver(md))}function gd(e,t){Fe||pd();const n=Ai(e);return n.forEach(s=>{let r=Ht.get(s);r||(r=new Set,Ht.set(s,r)),r.add(t),Fe==null||Fe.observe(s)}),()=>{n.forEach(s=>{const r=Ht.get(s);r==null||r.delete(t),r!=null&&r.size||Fe==null||Fe.unobserve(s)})}}const Kt=new Set;let at;function yd(){at=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Kt.forEach(t=>t(e))},window.addEventListener("resize",at)}function xd(e){return Kt.add(e),at||yd(),()=>{Kt.delete(e),!Kt.size&&typeof at=="function"&&(window.removeEventListener("resize",at),at=void 0)}}function Fi(e,t){return typeof e=="function"?xd(e):gd(e,t)}function bd(e){return ys(e)&&e.tagName==="svg"}const vd=[...ji,Q,ge],wd=e=>vd.find(Ti(e)),zi=()=>({translate:0,scale:1,origin:0,originPoint:0}),lt=()=>({x:zi(),y:zi()}),Bi=()=>({min:0,max:0}),te=()=>({x:Bi(),y:Bi()}),kd=new WeakMap;function Yt(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function wt(e){return typeof e=="string"||Array.isArray(e)}const xs=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],bs=["initial",...xs];function qt(e){return Yt(e.animate)||bs.some(t=>wt(e[t]))}function $i(e){return!!(qt(e)||e.variants)}function Sd(e,t,n){for(const s in t){const r=t[s],o=n[s];if(le(r))e.addValue(s,r);else if(le(o))e.addValue(s,ot(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,ot(i!==void 0?i:r,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const vs={current:null},Wi={current:!1},Td=typeof window<"u";function jd(){if(Wi.current=!0,!!Td)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>vs.current=e.matches;e.addEventListener("change",t),t()}else vs.current=!1}const Ui=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Xt={};function Gi(e){Xt=e}function Cd(){return Xt}class Nd{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:r,skipAnimations:o,blockInitialAnimation:i,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=ts,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=de.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,W.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=l,this.blockInitialAnimation=!!i,this.isControllingVariants=qt(n),this.isVariantNode=$i(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&&le(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,kd.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:(Wi.current||jd(),this.shouldReduceMotion=vs.current),process.env.NODE_ENV!=="production"&&An(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(),Ie(this.notifyUpdate),Ie(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&&mi.has(t)&&this.current instanceof HTMLElement){const{factory:i,keyframes:a,times:l,ease:u,duration:d}=n.accelerate,f=new di({element:this.current,name:t,keyframes:a,times:l,ease:u,duration:he(d)}),h=i(f);this.valueSubscriptions.set(t,()=>{h(),f.cancel()});return}const s=it.has(t);s&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&W.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 Xt){const n=Xt[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):te()}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<Ui.length;s++){const r=Ui[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=Sd(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=ot(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"&&(yr(s)||br(s))?s=parseFloat(s):!wd(s)&&ge.test(n)&&(s=Pi(t,n)),this.setBaseTarget(t,le(s)?s.get():s)),le(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=os(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&&!le(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 Pn),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){ms.render(this.render)}}class Hi extends Nd{constructor(){super(...arguments),this.KeyframeResolver=td}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;le(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class ze{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Ki({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function Ed({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Pd(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 ws(e){return e===void 0||e===1}function ks({scale:e,scaleX:t,scaleY:n}){return!ws(e)||!ws(t)||!ws(n)}function Ye(e){return ks(e)||Yi(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Yi(e){return qi(e.x)||qi(e.y)}function qi(e){return e&&e!=="0%"}function Zt(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=Zt(e,r,s)),Zt(e,n,s)+t}function Ss(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 Zi(e,{x:t,y:n}){Ss(e.x,t.translate,t.scale,t.originPoint),Ss(e.y,n.translate,n.scale,n.originPoint)}const Ji=.999999999999,Qi=1.0000000000001;function Ad(e,t,n,s=!1){var a;const r=n.length;if(!r)return;t.x=t.y=1;let o,i;for(let l=0;l<r;l++){o=n[l],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&&(je(e.x,-o.scroll.offset.x),je(e.y,-o.scroll.offset.y)),i&&(t.x*=i.x.scale,t.y*=i.y.scale,Zi(e,i)),s&&Ye(o.latestValues)&&Jt(e,o.latestValues,(a=o.layout)==null?void 0:a.layoutBox))}t.x<Qi&&t.x>Ji&&(t.x=1),t.y<Qi&&t.y>Ji&&(t.y=1)}function je(e,t){e.min+=t,e.max+=t}function eo(e,t,n,s,r=.5){const o=U(e.min,e.max,r);Ss(e,t,n,o,s)}function to(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Jt(e,t,n){const s=n??e;eo(e.x,to(t.x,s.x),t.scaleX,t.scale,t.originX),eo(e.y,to(t.y,s.y),t.scaleY,t.scale,t.originY)}function no(e,t){return Ki(Pd(e.getBoundingClientRect(),t))}function Md(e,t,n){const s=no(e,n),{scroll:r}=t;return r&&(je(s.x,r.offset.x),je(s.y,r.offset.y)),s}const Rd={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Dd=rt.length;function Vd(e,t,n){let s="",r=!0;for(let o=0;o<Dd;o++){const i=rt[o],a=e[i];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(i.startsWith("scale")?1:0);else{const u=parseFloat(a);l=i.startsWith("scale")?u===1:u===0}if(!l||n){const u=Mi(a,hs[i]);if(!l){r=!1;const d=Rd[i]||i;s+=`${d}(${u}) `}n&&(t[i]=u)}}return s=s.trim(),n?s=n(t,r?"":s):r&&(s="none"),s}function Ts(e,t,n){const{style:s,vars:r,transformOrigin:o}=e;let i=!1,a=!1;for(const l in t){const u=t[l];if(it.has(l)){i=!0;continue}else if(_r(l)){r[l]=u;continue}else{const d=Mi(u,hs[l]);l.startsWith("origin")?(a=!0,o[l]=d):s[l]=d}}if(t.transform||(i||n?s.transform=Vd(t,e.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:d=0}=o;s.transformOrigin=`${l} ${u} ${d}`}}function so(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 ro(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const kt={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(A.test(e))e=parseFloat(e);else return e;const n=ro(e,t.target.x),s=ro(e,t.target.y);return`${n}% ${s}%`}},Ld={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,r=ge.parse(e);if(r.length>5)return s;const o=ge.createTransformer(e),i=typeof r[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;r[0+i]/=a,r[1+i]/=l;const u=U(a,l,.5);return typeof r[2+i]=="number"&&(r[2+i]/=u),typeof r[3+i]=="number"&&(r[3+i]/=u),o(r)}},js={borderRadius:{...kt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:kt,borderTopRightRadius:kt,borderBottomLeftRadius:kt,borderBottomRightRadius:kt,boxShadow:Ld};function io(e,{layout:t,layoutId:n}){return it.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!js[e]||e==="opacity")}function Cs(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)(le(s[a])||r&&le(r[a])||io(a,e)||((i=n==null?void 0:n.getValue(a))==null?void 0:i.liveStyle)!==void 0)&&(o[a]=s[a]);return o}function Id(e){return window.getComputedStyle(e)}class _d extends Hi{constructor(){super(...arguments),this.type="html",this.renderInstance=so}readValueFromInstance(t,n){var s;if(it.has(n))return(s=this.projection)!=null&&s.isProjecting?Xn(n):ru(t,n);{const r=Id(t),o=(_r(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return no(t,n)}build(t,n,s){Ts(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return Cs(t,n,s)}}const Od={offset:"stroke-dashoffset",array:"stroke-dasharray"},Fd={offset:"strokeDashoffset",array:"strokeDasharray"};function zd(e,t,n=1,s=0,r=!0){e.pathLength=1;const o=r?Od:Fd;e[o.offset]=`${-s}`,e[o.array]=`${t} ${n}`}const Bd=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function oo(e,{attrX:t,attrY:n,attrScale:s,pathLength:r,pathSpacing:o=1,pathOffset:i=0,...a},l,u,d){if(Ts(e,a,u),l){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 Bd)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&&zd(f,r,o,i,!1)}const ao=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"]),lo=e=>typeof e=="string"&&e.toLowerCase()==="svg";function $d(e,t,n,s){so(e,t,void 0,s);for(const r in t.attrs)e.setAttribute(ao.has(r)?r:cs(r),t.attrs[r])}function co(e,t,n){const s=Cs(e,t,n);for(const r in e)if(le(e[r])||le(t[r])){const o=rt.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;s[o]=e[r]}return s}class Wd extends Hi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=te}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(it.has(n)){const s=Ei(n);return s&&s.default||0}return n=ao.has(n)?n:cs(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return co(t,n,s)}build(t,n,s){oo(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,r){$d(t,n,s,r)}mount(t){this.isSVGTag=lo(t.tagName),super.mount(t)}}const Ud=bs.length;function uo(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?uo(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Ud;n++){const s=bs[n],r=e.props[s];(wt(r)||r===!1)&&(t[s]=r)}return t}function fo(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 Gd=[...xs].reverse(),Hd=xs.length;function Kd(e){return t=>Promise.all(t.map(({animation:n,options:s})=>Gu(e,n,s)))}function Yd(e){let t=Kd(e),n=ho(),s=!0,r=!1;const o=u=>(d,f)=>{var m;const h=Ke(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=uo(e.parent)||{},h=[],m=new Set;let g={},p=1/0;for(let v=0;v<Hd;v++){const b=Gd[v],x=n[b],j=d[b]!==void 0?d[b]:f[b],C=wt(j),N=b===u?x.isActive:null;N===!1&&(p=v);let I=j===f[b]&&j!==d[b]&&C;if(I&&(s||r)&&e.manuallyAnimateOnMount&&(I=!1),x.protectedKeys={...g},!x.isActive&&N===null||!j&&!x.prevProp||Yt(j)||typeof j=="boolean")continue;if(b==="exit"&&x.isActive&&N!==!0){x.prevResolvedValues&&(g={...g,...x.prevResolvedValues});continue}const k=qd(x.prevProp,j);let M=k||b===u&&x.isActive&&!I&&C||v>p&&C,V=!1;const z=Array.isArray(j)?j:[j];let $=z.reduce(o(b),{});N===!1&&($={});const{prevResolvedValues:oe={}}=x,se={...oe,...$},B=Y=>{M=!0,m.has(Y)&&(V=!0,m.delete(Y)),x.needsAnimating[Y]=!0;const re=e.getValue(Y);re&&(re.liveStyle=!1)};for(const Y in se){const re=$[Y],R=oe[Y];if(g.hasOwnProperty(Y))continue;let T=!1;as(re)&&as(R)?T=!fo(re,R):T=re!==R,T?re!=null?B(Y):m.add(Y):re!==void 0&&m.has(Y)?B(Y):x.protectedKeys[Y]=!0}x.prevProp=j,x.prevResolvedValues=$,x.isActive&&(g={...g,...$}),(s||r)&&e.blockInitialAnimation&&(M=!1);const G=I&&k;M&&(!G||V)&&h.push(...z.map(Y=>{const re={type:b};if(typeof Y=="string"&&(s||r)&&!G&&e.manuallyAnimateOnMount&&e.parent){const{parent:R}=e,T=Ke(R,Y);if(R.enteringChildren&&T){const{delayChildren:_}=T.transition||{};re.delay=pi(R.enteringChildren,e,_)}}return{animation:Y,options:re}}))}if(m.size){const v={};if(typeof d.initial!="boolean"){const b=Ke(e,Array.isArray(d.initial)?d.initial[0]:d.initial);b&&b.transition&&(v.transition=b.transition)}m.forEach(b=>{const x=e.getBaseTarget(b),j=e.getValue(b);j&&(j.liveStyle=!0),v[b]=x??null}),h.push({animation:v})}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 l(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:l,setAnimateFunction:i,getState:()=>n,reset:()=>{n=ho(),r=!0}}}function qd(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!fo(t,e):!1}function qe(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ho(){return{animate:qe(!0),whileInView:qe(),whileHover:qe(),whileTap:qe(),whileDrag:qe(),whileFocus:qe(),exit:qe()}}function Ns(e,t){e.min=t.min,e.max=t.max}function xe(e,t){Ns(e.x,t.x),Ns(e.y,t.y)}function mo(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const po=1e-4,Xd=1-po,Zd=1+po,go=.01,Jd=0-go,Qd=0+go;function fe(e){return e.max-e.min}function ef(e,t,n){return Math.abs(e-t)<=n}function yo(e,t,n,s=.5){e.origin=s,e.originPoint=U(t.min,t.max,e.origin),e.scale=fe(n)/fe(t),e.translate=U(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Xd&&e.scale<=Zd||isNaN(e.scale))&&(e.scale=1),(e.translate>=Jd&&e.translate<=Qd||isNaN(e.translate))&&(e.translate=0)}function St(e,t,n,s){yo(e.x,t.x,n.x,s?s.originX:void 0),yo(e.y,t.y,n.y,s?s.originY:void 0)}function xo(e,t,n,s=0){const r=s?U(n.min,n.max,s):n.min;e.min=r+t.min,e.max=e.min+fe(t)}function tf(e,t,n,s){xo(e.x,t.x,n.x,s==null?void 0:s.x),xo(e.y,t.y,n.y,s==null?void 0:s.y)}function bo(e,t,n,s=0){const r=s?U(n.min,n.max,s):n.min;e.min=t.min-r,e.max=e.min+fe(t)}function Qt(e,t,n,s){bo(e.x,t.x,n.x,s==null?void 0:s.x),bo(e.y,t.y,n.y,s==null?void 0:s.y)}function vo(e,t,n,s,r){return e-=t,e=Zt(e,1/n,s),r!==void 0&&(e=Zt(e,1/r,s)),e}function nf(e,t=0,n=1,s=.5,r,o=e,i=e){if(Te.test(t)&&(t=parseFloat(t),t=U(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=U(o.min,o.max,s);e===o&&(a-=t),e.min=vo(e.min,t,n,a,r),e.max=vo(e.max,t,n,a,r)}function wo(e,t,[n,s,r],o,i){nf(e,t[n],t[s],t[r],t.scale,o,i)}const sf=["x","scaleX","originX"],rf=["y","scaleY","originY"];function ko(e,t,n,s){wo(e.x,t,sf,n?n.x:void 0,s?s.x:void 0),wo(e.y,t,rf,n?n.y:void 0,s?s.y:void 0)}function So(e){return e.translate===0&&e.scale===1}function To(e){return So(e.x)&&So(e.y)}function jo(e,t){return e.min===t.min&&e.max===t.max}function of(e,t){return jo(e.x,t.x)&&jo(e.y,t.y)}function Co(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function No(e,t){return Co(e.x,t.x)&&Co(e.y,t.y)}function Eo(e){return fe(e.x)/fe(e.y)}function Po(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Ce(e){return[e("x"),e("y")]}function af(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,l=e.y.scale*t.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const Ao=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],lf=Ao.length,Mo=e=>typeof e=="string"?parseFloat(e):e,Ro=e=>typeof e=="number"||A.test(e);function cf(e,t,n,s,r,o){r?(e.opacity=U(0,n.opacity??1,uf(s)),e.opacityExit=U(t.opacity??1,0,df(s))):o&&(e.opacity=U(t.opacity??1,n.opacity??1,s));for(let i=0;i<lf;i++){const a=Ao[i];let l=Do(t,a),u=Do(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Ro(l)===Ro(u)?(e[a]=Math.max(U(Mo(l),Mo(u),s),0),(Te.test(u)||Te.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=U(t.rotate||0,n.rotate||0,s))}function Do(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const uf=Vo(0,.5,Pr),df=Vo(.5,.95,me);function Vo(e,t,n){return s=>s<e?0:s>t?1:n(pt(e,t,s))}function ff(e,t,n){const s=le(e)?e:ot(e);return s.start(is("",s,t,n)),s.animation}function Tt(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}const hf=(e,t)=>e.depth-t.depth;class mf{constructor(){this.children=[],this.isDirty=!1}add(t){Nn(this.children,t),this.isDirty=!0}remove(t){Lt(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(hf),this.isDirty=!1,this.children.forEach(t)}}function pf(e,t){const n=de.now(),s=({timestamp:r})=>{const o=r-n;o>=t&&(Ie(s),e(o-t))};return W.setup(s,!0),()=>Ie(s)}function en(e){return le(e)?e.get():e}class gf{constructor(){this.members=[]}add(t){Nn(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&&(Lt(this.members,s),s.unmount())}t.scheduleRender()}remove(t){if(Lt(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 tn={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Es=["","X","Y","Z"],yf=1e3;let xf=0;function Ps(e,t,n,s){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),s&&(s[e]=0))}function Lo(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ki(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",W,!(r||o))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&Lo(s)}function Io({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:s,resetTransform:r}){return class{constructor(i={},a=t==null?void 0:t()){this.id=xf++,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(wf),this.nodes.forEach(Nf),this.nodes.forEach(Ef),this.nodes.forEach(kf)},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 l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new mf)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Pn),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i){if(this.instance)return;this.isSVG=ys(i)&&!bd(i),this.instance=i;const{layoutId:a,layout:l,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&&(l||a)&&(this.isLayoutDirty=!0),e){let d,f=0;const h=()=>this.root.updateBlockedByResize=!1;W.read(()=>{f=window.innerWidth}),e(i,()=>{const m=window.innerWidth;m!==f&&(f=m,this.root.updateBlockedByResize=!0,d&&d(),d=pf(h,250),tn.hasAnimatedSinceResize&&(tn.hasAnimatedSinceResize=!1,this.nodes.forEach(Fo)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&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()||Df,{onLayoutAnimationStart:p,onLayoutAnimationComplete:y}=u.getProps(),v=!this.targetLayout||!No(this.targetLayout,m),b=!f&&h;if(this.options.layoutRoot||this.resumeFrom||b||f&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...rs(g,"layout"),onPlay:p,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(d,b)}else f||Fo(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(),Ie(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(Pf),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&&Lo(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:l}=this.options;if(a===void 0&&!l)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 l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),l&&this.nodes.forEach(Tf),this.nodes.forEach(_o);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Oo);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(jf),this.nodes.forEach(Cf),this.nodes.forEach(bf),this.nodes.forEach(vf)):this.nodes.forEach(Oo),this.clearAllSnapshots();const a=de.now();ae.delta=Se(0,1e3/60,a-ae.timestamp),ae.timestamp=a,ae.isProcessing=!0,Dn.update.process(ae),Dn.preRender.process(ae),Dn.render.process(ae),ae.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ms.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Sf),this.sharedNodes.forEach(Af)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,W.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){W.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!fe(this.snapshot.measuredBox.x)&&!fe(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=te()),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 l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!r)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!To(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;i&&this.instance&&(a||Ye(this.latestValues)||d)&&(r(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),Vf(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:i}=this.options;if(!i)return te();const a=i.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(Lf))){const{scroll:d}=this.root;d&&(je(a.x,d.offset.x),je(a.y,d.offset.y))}return a}removeElementScroll(i){var l;const a=te();if(xe(a,i),(l=this.scroll)!=null&&l.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&&xe(a,i),je(a.x,f.offset.x),je(a.y,f.offset.y))}return a}applyTransform(i,a=!1,l){var d,f;const u=l||te();xe(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&&(je(u.x,-m.scroll.offset.x),je(u.y,-m.scroll.offset.y)),Ye(m.latestValues)&&Jt(u,m.latestValues,(d=m.layout)==null?void 0:d.layoutBox)}return Ye(this.latestValues)&&Jt(u,this.latestValues,(f=this.layout)==null?void 0:f.layoutBox),u}removeTransform(i){var l;const a=te();xe(a,i);for(let u=0;u<this.path.length;u++){const d=this.path[u];if(!Ye(d.latestValues))continue;let f;d.instance&&(ks(d.latestValues)&&d.updateSnapshot(),f=te(),xe(f,d.measurePageBox())),ko(a,d.latestValues,(l=d.snapshot)==null?void 0:l.layoutBox,f)}return Ye(this.latestValues)&&ko(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!==ae.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 l=!!this.resumingFrom||this!==a;if(!(i||l&&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=ae.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=te(),this.targetWithTransforms=te()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),tf(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):xe(this.target,this.layout.layoutBox),Zi(this.target,this.targetDelta)):xe(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||ks(this.parent.latestValues)||Yi(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,l){this.relativeParent=i,this.linkedParentVersion=i.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=te(),this.relativeTargetOrigin=te(),Qt(this.relativeTargetOrigin,a,l,this.options.layoutAnchor||void 0),xe(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var g;const i=this.getLead(),a=!!this.resumingFrom||this!==i;let l=!0;if((this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===ae.timestamp&&(l=!1),l)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;xe(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;Ad(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=te());const{target:m}=i;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(mo(this.prevProjectionDelta.x,this.projectionDelta.x),mo(this.prevProjectionDelta.y,this.projectionDelta.y)),St(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Po(this.projectionDelta.x,this.prevProjectionDelta.x)||!Po(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 l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=lt(),this.projectionDelta=lt(),this.projectionDeltaWithTransform=lt()}setAnimationOrigin(i,a=!1){const l=this.snapshot,u=l?l.latestValues:{},d={...this.latestValues},f=lt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=te(),m=l?l.source:void 0,g=this.layout?this.layout.source:void 0,p=m!==g,y=this.getStack(),v=!y||y.members.length<=1,b=!!(p&&!v&&this.options.crossfade===!0&&!this.path.some(Rf));this.animationProgress=0;let x;this.mixTargetDelta=j=>{const C=j/1e3;zo(f.x,i.x,C),zo(f.y,i.y,C),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Qt(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Mf(this.relativeTarget,this.relativeTargetOrigin,h,C),x&&of(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=te()),xe(x,this.relativeTarget)),p&&(this.animationValues=d,cf(d,u,this.latestValues,C,b,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(Ie(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=W.update(()=>{tn.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ot(0)),this.motionValue.jump(0,!1),this.currentAnimation=ff(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(yf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:d}=i;if(!(!a||!l||!u)){if(this!==i&&this.layout&&u&&Go(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||te();const f=fe(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+f;const h=fe(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+h}xe(a,l),Jt(a,d),St(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new gf),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:l}={}){const u=this.getStack();u&&u.promote(this,l),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:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Ps("z",i,u,this.animationValues);for(let d=0;d<Es.length;d++)Ps(`rotate${Es[d]}`,i,u,this.animationValues),Ps(`skew${Es[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 l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,i.visibility="",i.opacity="",i.pointerEvents=en(a==null?void 0:a.pointerEvents)||"",i.transform=l?l(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=en(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Ye(this.latestValues)&&(i.transform=l?l({},""):"none",this.hasProjected=!1);return}i.visibility="";const d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=af(this.projectionDeltaWithTransform,this.treeScale,d);l&&(f=l(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 js){if(d[g]===void 0)continue;const{correct:p,applyTo:y,isCSSVariable:v}=js[g],b=f==="none"?d[g]:p(d[g],u);if(y){const x=y.length;for(let j=0;j<x;j++)i[y[j]]=b}else v?this.options.visualElement.renderState.vars[g]=b:i[g]=b}this.options.layoutId&&(i.pointerEvents=u===this?en(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(_o),this.root.sharedNodes.clear()}}}function bf(e){e.updateLayout()}function vf(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")Ce(f=>{const h=i?t.measuredBox[f]:t.layoutBox[f],m=fe(h);h.min=s[f].min,h.max=h.min+m});else if(o==="x"||o==="y"){const f=o==="x"?"y":"x";Ns(i?t.measuredBox[f]:t.layoutBox[f],s[f])}else Go(o,t.layoutBox,s)&&Ce(f=>{const h=i?t.measuredBox[f]:t.layoutBox[f],m=fe(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=lt();St(a,s,t.layoutBox);const l=lt();i?St(l,e.applyTransform(r,!0),t.measuredBox):St(l,s,t.layoutBox);const u=!To(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=te();Qt(p,t.layoutBox,h.layoutBox,g);const y=te();Qt(y,s,m.layoutBox,g),No(p,y)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=p,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function wf(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 kf(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Sf(e){e.clearSnapshot()}function _o(e){e.clearMeasurements()}function Tf(e){e.isLayoutDirty=!0,e.updateLayout()}function Oo(e){e.isLayoutDirty=!1}function jf(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Cf(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Fo(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Nf(e){e.resolveTargetDelta()}function Ef(e){e.calcProjection()}function Pf(e){e.resetSkewAndRotation()}function Af(e){e.removeLeadSnapshot()}function zo(e,t,n){e.translate=U(t.translate,0,n),e.scale=U(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Bo(e,t,n,s){e.min=U(t.min,n.min,s),e.max=U(t.max,n.max,s)}function Mf(e,t,n,s){Bo(e.x,t.x,n.x,s),Bo(e.y,t.y,n.y,s)}function Rf(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Df={duration:.45,ease:[.4,0,.1,1]},$o=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Wo=$o("applewebkit/")&&!$o("chrome/")?Math.round:me;function Uo(e){e.min=Wo(e.min),e.max=Wo(e.max)}function Vf(e){Uo(e.x),Uo(e.y)}function Go(e,t,n){return e==="position"||e==="preserve-aspect"&&!ef(Eo(t),Eo(n),.2)}function Lf(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const If=Io({attachResizeListener:(e,t)=>Tt(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}),As={current:void 0},Ho=Io({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!As.current){const e=new If({});e.mount(window),e.setOptions({layoutScroll:!0}),As.current=e}return As.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Ms=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Ko(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _f(...e){return t=>{let n=!1;const s=e.map(r=>{const o=Ko(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():Ko(e[r],null)}}}}function Of(...e){return S.useCallback(_f(...e),e)}class Ff extends S.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(Ut(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const s=n.offsetParent,r=Ut(s)&&s.offsetWidth||0,o=Ut(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 zf({children:e,isPresent:t,anchorX:n,anchorY:s,root:r,pop:o}){var h;const i=w.useId(),a=w.useRef(null),l=w.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=w.useContext(Ms),d=((h=e.props)==null?void 0:h.ref)??(e==null?void 0:e.ref),f=Of(a,d);return w.useInsertionEffect(()=>{const{width:m,height:g,top:p,left:y,right:v,bottom:b}=l.current;if(t||o===!1||!a.current||!m||!g)return;const x=n==="left"?`left: ${y}`:`right: ${v}`,j=s==="bottom"?`bottom: ${b}`:`top: ${p}`;a.current.dataset.motionPopId=i;const C=document.createElement("style");u&&(C.nonce=u);const N=r??document.head;return N.appendChild(C),C.sheet&&C.sheet.insertRule(`
162
+ */const Ne=G("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),an=b.createContext({});function ln(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const Os=typeof window<"u"?b.useLayoutEffect:b.useEffect,Tt=b.createContext(null);function cn(e,t){e.indexOf(t)===-1&&e.push(t)}function St(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 dn(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Ge=()=>{},Te=()=>{};typeof process<"u"&&((Sa=process.env)==null?void 0:Sa.NODE_ENV)!=="production"&&(Ge=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(dn(t,n))},Te=(e,t,n)=>{if(!e)throw new Error(dn(t,n))});const Pe={},_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,qa=(e,t)=>n=>t(e(n)),it=(...e)=>e.reduce(qa),ot=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class un{constructor(){this.subscriptions=[]}add(t){return cn(this.subscriptions,t),()=>St(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 fn(e,t,n){e||Us.has(t)||(console.warn(dn(t,n)),Us.add(t))}const Gs=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Za=1e-7,Ja=12;function Qa(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)>Za&&++a<Ja);return i}function at(e,t,n,s){if(e===t&&n===s)return fe;const r=o=>Qa(o,0,1,e,n);return o=>o===0||o===1?o:Gs(r(o),t,s)}const Ys=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ks=e=>t=>1-e(1-t),Hs=at(.33,1.53,.69,.99),hn=Ks(Hs),Xs=Ys(hn),qs=e=>e>=1?1:(e*=2)<1?.5*hn(e):.5*(2-Math.pow(2,-10*(e-1))),mn=e=>1-Math.sin(Math.acos(e)),Zs=Ks(mn),Js=Ys(mn),el=at(.42,0,1,1),tl=at(0,0,.58,1),Qs=at(.42,0,.58,1),nl=e=>Array.isArray(e)&&typeof e[0]!="number",er=e=>Array.isArray(e)&&typeof e[0]=="number",tr={linear:fe,easeIn:el,easeInOut:Qs,easeOut:tl,circIn:mn,circInOut:Js,circOut:Zs,backIn:hn,backInOut:Xs,backOut:Hs,anticipate:qs},sl=e=>typeof e=="string",nr=e=>{if(er(e)){Te(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,s,r]=e;return at(t,n,s,r)}else if(sl(e))return Te(tr[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),tr[e];return e},Ct=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function rl(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(u){i.has(u)&&(d.schedule(u),e()),u(a)}const d={schedule:(u,f=!1,h=!1)=>{const g=h&&r?n:s;return f&&i.add(u),g.add(u),u},cancel:u=>{s.delete(u),i.delete(u)},process:u=>{if(a=u,r){o=!0;return}r=!0;const f=n;n=s,s=f,n.forEach(c),n.clear(),r=!1,o&&(o=!1,d.process(u))}};return d}const il=40;function sr(e,t){let n=!1,s=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=Ct.reduce((y,T)=>(y[T]=rl(o),y),{}),{setup:a,read:c,resolveKeyframes:d,preUpdate:u,update:f,preRender:h,render:m,postRender:g}=i,p=()=>{const y=Pe.useManualTiming,T=y?r.timestamp:performance.now();n=!1,y||(r.delta=s?1e3/60:Math.max(Math.min(T-r.timestamp,il),1)),r.timestamp=T,r.isProcessing=!0,a.process(r),c.process(r),d.process(r),u.process(r),f.process(r),h.process(r),m.process(r),g.process(r),r.isProcessing=!1,n&&t&&(s=!1,e(p))},x=()=>{n=!0,s=!0,r.isProcessing||e(p)};return{schedule:Ct.reduce((y,T)=>{const S=i[T];return y[T]=(E,z=!1,j=!1)=>(n||x(),S.schedule(E,z,j)),y},{}),cancel:y=>{for(let T=0;T<Ct.length;T++)i[Ct[T]].cancel(y)},state:r,steps:i}}const{schedule:F,cancel:Ae,state:re,steps:pn}=sr(typeof requestAnimationFrame<"u"?requestAnimationFrame:fe,!0);let Nt;function ol(){Nt=void 0}const le={now:()=>(Nt===void 0&&le.set(re.isProcessing||Pe.useManualTiming?re.timestamp:performance.now()),Nt),set:e=>{Nt=e,queueMicrotask(ol)}},rr=e=>t=>typeof t=="string"&&t.startsWith(e),ir=rr("--"),al=rr("var(--"),gn=e=>al(e)?ll.test(e.split("/*")[0].trim()):!1,ll=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function or(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Ye={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},lt={...Ye,transform:e=>be(0,1,e)},Pt={...Ye,default:1},ct=e=>Math.round(e*1e5)/1e5,xn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function cl(e){return e==null}const dl=/^(?:#[\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"&&dl.test(n)&&n.startsWith(e)||t&&!cl(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(xn);return{[e]:parseFloat(r),[t]:parseFloat(o),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},ul=e=>be(0,255,e),bn={...Ye,transform:e=>Math.round(ul(e))},Ie={test:yn("rgb","red"),parse:ar("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+bn.transform(e)+", "+bn.transform(t)+", "+bn.transform(n)+", "+ct(lt.transform(s))+")"};function fl(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 vn={test:yn("#"),parse:fl,transform:Ie.transform},dt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Me=dt("deg"),ve=dt("%"),P=dt("px"),hl=dt("vh"),ml=dt("vw"),lr={...ve,parse:e=>ve.parse(e)/100,transform:e=>ve.transform(e*100)},Ke={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(ct(t))+", "+ve.transform(ct(n))+", "+ct(lt.transform(s))+")"},Z={test:e=>Ie.test(e)||vn.test(e)||Ke.test(e),parse:e=>Ie.test(e)?Ie.parse(e):Ke.test(e)?Ke.parse(e):vn.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ie.transform(e):Ke.transform(e),getAnimatableNone:e=>{const t=Z.parse(e);return t.alpha=0,Z.transform(t)}},pl=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function gl(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(xn))==null?void 0:t.length)||0)+(((n=e.match(pl))==null?void 0:n.length)||0)>0}const cr="number",dr="color",xl="var",yl="var(",ur="${}",bl=/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(bl,c=>(Z.test(c)?(s.color.push(o),r.push(dr),n.push(Z.parse(c))):c.startsWith(yl)?(s.var.push(o),r.push(xl),n.push(c)):(s.number.push(o),r.push(cr),n.push(parseFloat(c))),++o,ur)).split(ur);return{values:n,split:a,indexes:s,types:r}}function vl(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+=ct(s[o]):i===dr?r+=Z.transform(s[o]):r+=s[o]}return r}}function wl(e){return fr(He(e))}const kl=e=>typeof e=="number"?0:Z.test(e)?Z.getAnimatableNone(e):e,jl=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:kl(e);function Tl(e){const t=He(e);return fr(t)(t.values.map((s,r)=>jl(s,t.split[r])))}const me={test:gl,parse:vl,createTransformer:wl,getAnimatableNone:Tl};function wn(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 Sl({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=wn(c,a,e+1/3),o=wn(c,a,e),i=wn(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,kn=(e,t,n)=>{const s=e*e,r=n*(t*t-s)+s;return r<0?0:Math.sqrt(r)},Cl=[vn,Ie,Ke],Nl=e=>Cl.find(t=>t.test(e));function hr(e){const t=Nl(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===Ke&&(n=Sl(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=kn(n.red,s.red,o),r.green=kn(n.green,s.green,o),r.blue=kn(n.blue,s.blue,o),r.alpha=$(n.alpha,s.alpha,o),Ie.transform(r))},jn=new Set(["none","hidden"]);function Pl(e,t){return jn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Al(e,t){return n=>$(e,t,n)}function Tn(e){return typeof e=="number"?Al:typeof e=="string"?gn(e)?At:Z.test(e)?mr:Vl:Array.isArray(e)?pr:typeof e=="object"?Z.test(e)?mr:Ml: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 Ml(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 El(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 Vl=(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?jn.has(e)&&!r.values.length||jn.has(t)&&!s.values.length?Pl(e,t):it(pr(El(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 Dl=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>F.update(t,n),stop:()=>Ae(t),now:()=>re.isProcessing?re.timestamp:le.now()}},xr=(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)})`},Mt=2e4;function Sn(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<Mt;)t+=n,s=e.next(t);return t>=Mt?1/0:t}function Ll(e,t=100,n){const s=n({...e,keyframes:[0,t]}),r=Math.min(Sn(s),Mt);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 Cn(e,t){return e*Math.sqrt(1-t*t)}const Rl=12;function Il(e,t,n){let s=n;for(let r=1;r<Rl;r++)s=s-e(s)/t(s);return s}const Nn=.001;function zl({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=d=>{const u=d*i,f=u*e,h=u-n,m=Cn(d,i),g=Math.exp(-f);return Nn-h/m*g},o=d=>{const f=d*i*e,h=f*n+n,m=Math.pow(i,2)*Math.pow(d,2)*e,g=Math.exp(-f),p=Cn(Math.pow(d,2),i);return(-r(d)+Nn>0?-1:1)*((h-m)*g)/p}):(r=d=>{const u=Math.exp(-d*e),f=(d-n)*e+1;return-Nn+u*f},o=d=>{const u=Math.exp(-d*e),f=(n-d)*(e*e);return u*f});const a=5/e,c=Il(r,o,a);if(e=ue(e),isNaN(c))return{stiffness:H.stiffness,damping:H.damping,duration:e};{const d=Math.pow(c,2)*s;return{stiffness:d,damping:i*2*Math.sqrt(s*d),duration:e}}}const Ol=["duration","bounce"],_l=["stiffness","damping","mass"];function yr(e,t){return t.some(n=>e[n]!==void 0)}function Fl(e){let t={velocity:H.velocity,stiffness:H.stiffness,damping:H.damping,mass:H.mass,isResolvedFromDuration:!1,...e};if(!yr(e,_l)&&yr(e,Ol))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=zl({...e,velocity:0});t={...t,...n,mass:H.mass},t.isResolvedFromDuration=!0}return t}function Et(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:d,mass:u,duration:f,velocity:h,isResolvedFromDuration:m}=Fl({...n,velocity:-he(n.velocity||0)}),g=h||0,p=d/(2*Math.sqrt(c*u)),x=i-o,k=he(Math.sqrt(c/u)),v=Math.abs(x)<5;s||(s=v?H.restSpeed.granular:H.restSpeed.default),r||(r=v?H.restDelta.granular:H.restDelta.default);let y,T,S,E,z,j;if(p<1)S=Cn(k,p),E=(g+p*k*x)/S,y=D=>{const _=Math.exp(-p*k*D);return i-_*(E*Math.sin(S*D)+x*Math.cos(S*D))},z=p*k*E+x*S,j=p*k*x-E*S,T=D=>Math.exp(-p*k*D)*(z*Math.sin(S*D)+j*Math.cos(S*D));else if(p===1){y=_=>i-Math.exp(-k*_)*(x+(g+k*x)*_);const D=g+k*x;T=_=>Math.exp(-k*_)*(k*D*_-g)}else{const D=k*Math.sqrt(p*p-1);y=ae=>{const J=Math.exp(-p*k*ae),W=Math.min(D*ae,300);return i-J*((g+p*k*x)*Math.sinh(W)+D*x*Math.cosh(W))/D};const _=(g+p*k*x)/D,B=p*k*_-x*D,de=p*k*x-_*D;T=ae=>{const J=Math.exp(-p*k*ae),W=Math.min(D*ae,300);return J*(B*Math.sinh(W)+de*Math.cosh(W))}}const V={calculatedDuration:m&&f||null,velocity:D=>ue(T(D)),next:D=>{if(!m&&p<1){const B=Math.exp(-p*k*D),de=Math.sin(S*D),ae=Math.cos(S*D),J=i-B*(E*de+x*ae),W=ue(B*(z*de+j*ae));return a.done=Math.abs(W)<=s&&Math.abs(i-J)<=r,a.value=a.done?i:J,a}const _=y(D);if(m)a.done=D>=f;else{const B=ue(T(D));a.done=Math.abs(B)<=s&&Math.abs(i-_)<=r}return a.value=a.done?i:_,a},toString:()=>{const D=Math.min(Sn(V),Mt),_=xr(B=>V.next(D*B).value,D,30);return D+"ms "+_},toTransition:()=>{}};return V}Et.applyToOptions=e=>{const t=Ll(e,100,Et);return e.ease=t.ease,e.duration=ue(t.duration),e.type="keyframes",e};const Bl=5;function br(e,t,n){const s=Math.max(t-Bl,0);return Ws(n-e(s),t-s)}function Pn({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:o=500,modifyTarget:i,min:a,max:c,restDelta:d=.5,restSpeed:u}){const f=e[0],h={done:!1,value:f},m=j=>a!==void 0&&j<a||c!==void 0&&j>c,g=j=>a===void 0?c:c===void 0||Math.abs(a-j)<Math.abs(c-j)?a:c;let p=n*t;const x=f+p,k=i===void 0?x:i(x);k!==x&&(p=k-f);const v=j=>-p*Math.exp(-j/s),y=j=>k+v(j),T=j=>{const V=v(j),D=y(j);h.done=Math.abs(V)<=d,h.value=h.done?k:D};let S,E;const z=j=>{m(h.value)&&(S=j,E=Et({keyframes:[h.value,g(h.value)],velocity:br(y,j,h.value),damping:r,stiffness:o,restDelta:d,restSpeed:u}))};return z(0),{calculatedDuration:null,next:j=>{let V=!1;return!E&&S===void 0&&(V=!0,T(j),z(j)),S!==void 0&&j>=S?E.next(j-S):(!V&&T(j),h)}}}function $l(e,t,n){const s=[],r=n||Pe.mix||gr,o=e.length-1;for(let i=0;i<o;i++){let a=r(e[i],e[i+1]);if(t){const c=Array.isArray(t)?t[i]||fe:t;a=it(c,a)}s.push(a)}return s}function Wl(e,t,{clamp:n=!0,ease:s,mixer:r}={}){const o=e.length;if(Te(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=$l(t,s,r),c=a.length,d=u=>{if(i&&u<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(u<e[f+1]);f++);const h=ot(e[f],e[f+1],u);return a[f](h)};return n?u=>d(be(e[0],e[o-1],u)):d}function Ul(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const r=ot(0,t,s);e.push($(n,1,r))}}function Gl(e){const t=[0];return Ul(t,e.length-1),t}function Yl(e,t){return e.map(n=>n*t)}function Kl(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=nl(s)?s.map(nr):nr(s),o={done:!1,value:t[0]},i=Yl(n&&n.length===t.length?n:Gl(t),e),a=Wl(i,t,{ease:Array.isArray(r)?r:Kl(t,r)});return{calculatedDuration:e,next:c=>(o.value=a(c),o.done=c>=e,o)}}const Hl=e=>e!==null;function Vt(e,{repeat:t,repeatType:n="loop"},s,r=1){const o=e.filter(Hl),a=r<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const Xl={decay:Pn,inertia:Pn,tween:Xe,keyframes:Xe,spring:Et};function vr(e){typeof e.type=="string"&&(e.type=Xl[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 ql=e=>e/100;class Dt 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!==le.now()&&this.tick(le.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&&Te(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=it(ql,gr(a[0],a[1])),a=[0,100]);const d=c({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...a].reverse(),velocity:-i})),d.calculatedDuration===null&&(d.calculatedDuration=Sn(d));const{calculatedDuration:u}=d;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(s+1)-r,this.generator=d}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:d=0,keyframes:u,repeat:f,repeatType:h,repeatDelay:m,type:g,onUpdate:p,finalKeyframe:x}=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 k=this.currentTime-d*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?k<0:k>r;this.currentTime=Math.max(k,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let y=this.currentTime,T=s;if(f){const j=Math.min(this.currentTime,r)/a;let V=Math.floor(j),D=j%1;!D&&j>=1&&(D=1),D===1&&V--,V=Math.min(V,f+1),!!(V%2)&&(h==="reverse"?(D=1-D,m&&(D-=m/a)):h==="mirror"&&(T=i)),y=be(0,1,D)*a}let S;v?(this.delayState.value=u[0],S=this.delayState):S=T.next(y),o&&!v&&(S.value=o(S.value));let{done:E}=S;!v&&c!==null&&(E=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const z=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return z&&g!==Pn&&(S.value=Vt(u,this.options,x,this.speed)),p&&p(S.value),z&&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(le.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=he(this.currentTime))}play(){var r,o;if(this.isStopped)return;const{driver:t=Dl,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(le.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 Zl(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ze=e=>e*180/Math.PI,Mn=e=>{const t=ze(Math.atan2(e[1],e[0]));return En(t)},Jl={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Mn,rotateZ:Mn,skewX:e=>ze(Math.atan(e[1])),skewY:e=>ze(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},En=e=>(e=e%360,e<0&&(e+=360),e),wr=Mn,kr=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),jr=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Ql={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:kr,scaleY:jr,scale:e=>(kr(e)+jr(e))/2,rotateX:e=>En(ze(Math.atan2(e[6],e[5]))),rotateY:e=>En(ze(Math.atan2(-e[2],e[0]))),rotateZ:wr,rotate:wr,skewX:e=>ze(Math.atan(e[4])),skewY:e=>ze(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Vn(e){return e.includes("scale")?1:0}function Dn(e,t){if(!e||e==="none")return Vn(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,r;if(n)s=Ql,r=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Jl,r=a}if(!r)return Vn(t);const o=s[t],i=r[1].split(",").map(tc);return typeof o=="function"?o(i):i[o]}const ec=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Dn(n,t)};function tc(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),Tr=e=>e===Ye||e===P,nc=new Set(["x","y","z"]),sc=qe.filter(e=>!nc.has(e));function rc(e){const t=[];return sc.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})=>Dn(t,"x"),y:(e,{transform:t})=>Dn(t,"y")};Ee.translateX=Ee.x,Ee.translateY=Ee.y;const Oe=new Set;let Ln=!1,Rn=!1,In=!1;function Sr(){if(Rn){const e=Array.from(Oe).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const r=rc(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)})}Rn=!1,Ln=!1,Oe.forEach(e=>e.complete(In)),Oe.clear()}function Cr(){Oe.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Rn=!0)})}function ic(){In=!0,Cr(),Sr(),In=!1}class zn{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?(Oe.add(this),Ln||(Ln=!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])}Zl(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Oe.delete(this)}cancel(){this.state==="scheduled"&&(Oe.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const oc=e=>e.startsWith("--");function Nr(e,t,n){oc(t)?e.style.setProperty(t,n):e.style[t]=n}const ac={};function Pr(e,t){const n=$s(e);return()=>ac[t]??n()}const lc=Pr(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Ar=Pr(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ut=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,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"?Ar()?xr(e,t):"ease-out":er(e)?ut(e):Array.isArray(e)?e.map(n=>Er(n,t)||Mr.easeOut):Mr[e]}function cc(e,t,n,{delay:s=0,duration:r=300,repeat:o=0,repeatType:i="loop",ease:a="easeOut",times:c}={},d=void 0){const u={[t]:n};c&&(u.offset=c);const f=Er(a,r);Array.isArray(f)&&(u.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 d&&(h.pseudoElement=d),e.animate(u,h)}function Vr(e){return typeof e=="function"&&"applyToOptions"in e}function dc({type:e,...t}){return Vr(e)&&Ar()?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,Te(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const d=dc(t);this.animation=cc(n,s,r,d,o),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=Vt(r,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),Nr(n,s,u),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&&lc()?(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 uc(e){return e in Lr}function fc(e){typeof e.ease=="string"&&uc(e.ease)&&(e.ease=Lr[e.ease])}const On=10;class hc extends Dr{constructor(t){fc(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 Dt({...i,autoplay:!1}),c=Math.max(On,le.now()-this.startTime),d=be(0,On,c-On),u=a.sample(c).value,{name:f}=this.options;o&&f&&Nr(o,f,u),n.setWithVelocity(a.sample(Math.max(0,c-d)).value,u,d),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 mc(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 pc(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:mc(e)||(n==="spring"||Vr(n))&&s}function _n(e){e.duration=0,e.type="keyframes"}const Ir=new Set(["opacity","clipPath","filter","transform"]),gc=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function xc(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&gc.test(e[t]))return!0;return!1}const yc=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),bc=$s(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function vc(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:d,transformTemplate:u}=t.owner.getProps();return bc()&&n&&(Ir.has(n)||yc.has(n)&&xc(a))&&(n!=="transform"||!u)&&!d&&!s&&r!=="mirror"&&o!==0&&i!=="inertia"}const wc=40;class kc 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:d,element:u,...f}){var g;super(),this.stop=()=>{var p,x;this._animation&&(this._animation.stop(),(p=this.stopTimeline)==null||p.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=le.now();const h={autoplay:t,delay:n,type:s,repeat:r,repeatDelay:o,repeatType:i,name:c,motionValue:d,element:u,...f},m=(u==null?void 0:u.KeyframeResolver)||zn;this.keyframeResolver=new m(a,(p,x,k)=>this.onKeyframesResolved(p,x,h,!k),c,d,u),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,s,r){var k,v;this.keyframeResolver=void 0;const{name:o,type:i,velocity:a,delay:c,isHandoff:d,onUpdate:u}=s;this.resolvedAt=le.now();let f=!0;pc(t,o,i,a)||(f=!1,(Pe.instantAnimations||!c)&&(u==null||u(Vt(t,s,n))),t[0]=t[t.length-1],_n(s),s.repeat=0);const m={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>wc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},g=f&&!d&&vc(m),p=(v=(k=m.motionValue)==null?void 0:k.owner)==null?void 0:v.current;let x;if(g)try{x=new hc({...m,element:p})}catch{x=new Dt(m)}else x=new Dt(m);x.finished.then(()=>{this.notifyFinished()}).catch(fe),this.pendingTimeline&&(this.stopTimeline=x.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=x}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(),ic()),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 zr(e,t,n,s=0,r=1){const o=Array.from(e).sort((d,u)=>d.sortNodePosition(u)).indexOf(t),i=e.size,a=(i-1)*s;return typeof n=="function"?n(o,i):r===1?o*s:a-o*s}const jc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Tc(e){const t=jc.exec(e);if(!t)return[,];const[,n,s,r]=t;return[`--${n??s}`,r]}const Sc=4;function Or(e,t,n=1){Te(n<=Sc,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,r]=Tc(e);if(!s)return;const o=window.getComputedStyle(t).getPropertyValue(s);if(o){const i=o.trim();return _s(i)?parseFloat(i):i}return gn(r)?Or(r,t,n+1):r}const Cc={type:"spring",stiffness:500,damping:25,restSpeed:10},Nc=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Pc={type:"keyframes",duration:.8},Ac={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Mc=(e,{keyframes:t})=>t.length>2?Pc:Ze.has(e)?e.startsWith("scale")?Nc(t[1]):Cc:Ac;function _r(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...s}=e;return{...t,...s}}return e}function Fn(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?_r(n,e):n}const Ec=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Vc(e){for(const t in e)if(!Ec.has(t))return!0;return!1}const Bn=(e,t,n,s={},r,o)=>i=>{const a=Fn(s,e)||{},c=a.delay||s.delay||0;let{elapsed:d=0}=s;d=d-ue(c);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-d,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};Vc(a)||Object.assign(u,Mc(e,u)),u.duration&&(u.duration=ue(u.duration)),u.repeatDelay&&(u.repeatDelay=ue(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(_n(u),u.delay===0&&(f=!0)),(Pe.instantAnimations||Pe.skipAnimations||r!=null&&r.shouldSkipAnimations)&&(f=!0,_n(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,f&&!o&&t.get()!==void 0){const h=Vt(u.keyframes,a);if(h!==void 0){F.update(()=>{u.onUpdate(h),u.onComplete()});return}}return a.isSync?new Dt(u):new kc(u)};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 $n(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 $n(s,t,n!==void 0?n:s.custom,e)}const Br=new Set(["width","height","top","left","right","bottom",...qe]),$r=30,Dc=e=>!isNaN(parseFloat(e));class Lc{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var o;const r=le.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=le.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Dc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&fn(!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=le.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 Lc(e,t)}const Wn=e=>Array.isArray(e);function Rc(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Je(n))}function Ic(e){return Wn(e)?e[e.length-1]||0:e}function zc(e,t){const n=_e(e,t);let{transitionEnd:s={},transition:r={},...o}=n||{};o={...o,...s};for(const i in o){const a=Ic(o[i]);Rc(e,i,a)}}const ie=e=>!!(e&&e.getVelocity);function Oc(e){return!!(ie(e)&&e.add)}function Un(e,t){const n=e.getValue("willChange");if(Oc(n))return n.add(t);if(!n&&Pe.WillChange){const s=new Pe.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function Gn(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Wr="data-"+Gn("framerAppearId");function Ur(e){return e.props[Wr]}function _c({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 d=o==null?void 0:o.reduceMotion;s&&(o=s);const u=[],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&&_c(f,h))continue;const p={delay:n,...Fn(o||{},h)},x=m.get();if(x!==void 0&&!m.isAnimating()&&!Array.isArray(g)&&g===x&&!p.velocity){F.update(()=>m.set(g));continue}let k=!1;if(window.MotionHandoffAnimation){const T=Ur(e);if(T){const S=window.MotionHandoffAnimation(T,h,F);S!==null&&(p.startTime=S,k=!0)}}Un(e,h);const v=d??e.shouldReduceMotion;m.start(Bn(h,m,g,v&&Br.has(h)?{type:!1}:p,e,k));const y=m.animation;y&&u.push(y)}if(i){const h=()=>F.update(()=>{i&&zc(e,i)});u.length?Promise.all(u).then(h):h()}return u}function Yn(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?(d=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:h}=r;return Fc(e,t,d,u,f,h,n)}:()=>Promise.resolve(),{when:a}=r;if(a){const[d,u]=a==="beforeChildren"?[o,i]:[i,o];return d().then(()=>u())}else return Promise.all([o(),i(n.delay)])}function Fc(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(Yn(c,t,{...i,delay:n+(typeof s=="function"?0:s)+zr(e.variantChildren,c,s,r,o)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(a)}function Bc(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const r=t.map(o=>Yn(e,o,n));s=Promise.all(r)}else if(typeof t=="string")s=Yn(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 $c={test:e=>e==="auto",parse:e=>e},Yr=e=>t=>t.test(e),Kr=[Ye,P,ve,Me,ml,hl,$c],Hr=e=>Kr.find(Yr(e));function Wc(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Bs(e):!0}const Uc=new Set(["brightness","contrast","saturate","opacity"]);function Gc(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(xn)||[];if(!s)return e;const r=n.replace(s,"");let o=Uc.has(t)?1:0;return s!==n&&(o*=100),t+"("+o+r+")"}const Yc=/\b([a-z-]*)\(.*?\)/gu,Kn={...me,getAnimatableNone:e=>{const t=e.match(Yc);return t?t.map(Gc).join(" "):e}},Hn={...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={...Ye,transform:Math.round},Xn={borderWidth:P,borderTopWidth:P,borderRightWidth:P,borderBottomWidth:P,borderLeftWidth:P,borderRadius:P,borderTopLeftRadius:P,borderTopRightRadius:P,borderBottomRightRadius:P,borderBottomLeftRadius:P,width:P,maxWidth:P,height:P,maxHeight:P,top:P,right:P,bottom:P,left:P,inset:P,insetBlock:P,insetBlockStart:P,insetBlockEnd:P,insetInline:P,insetInlineStart:P,insetInlineEnd:P,padding:P,paddingTop:P,paddingRight:P,paddingBottom:P,paddingLeft:P,paddingBlock:P,paddingBlockStart:P,paddingBlockEnd:P,paddingInline:P,paddingInlineStart:P,paddingInlineEnd:P,margin:P,marginTop:P,marginRight:P,marginBottom:P,marginLeft:P,marginBlock:P,marginBlockStart:P,marginBlockEnd:P,marginInline:P,marginInlineStart:P,marginInlineEnd:P,fontSize:P,backgroundPositionX:P,backgroundPositionY:P,...{rotate:Me,rotateX:Me,rotateY:Me,rotateZ:Me,scale:Pt,scaleX:Pt,scaleY:Pt,scaleZ:Pt,skew:Me,skewX:Me,skewY:Me,distance:P,translateX:P,translateY:P,translateZ:P,x:P,y:P,z:P,perspective:P,transformPerspective:P,opacity:lt,originX:lr,originY:lr,originZ:P},zIndex:Xr,fillOpacity:lt,strokeOpacity:lt,numOctaves:Xr},Kc={...Xn,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:Hn,WebkitMask:Hn},qr=e=>Kc[e],Hc=new Set([Kn,Hn]);function Zr(e,t){let n=qr(e);return Hc.has(n)||(n=me),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Xc=new Set(["auto","none","0"]);function qc(e,t,n){let s=0,r;for(;s<e.length&&!r;){const o=e[s];typeof o=="string"&&!Xc.has(o)&&He(o).values.length&&(r=e[s]),s++}if(r&&n)for(const o of t)e[o]=Zr(n,r)}class Zc extends zn{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 u=0;u<t.length;u++){let f=t[u];if(typeof f=="string"&&(f=f.trim(),gn(f))){const h=Or(f,n.current);h!==void 0&&(t[u]=h),u===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),d=or(o);if(c!==d&&Ee[s]){this.needsMeasurement=!0;return}if(i!==a)if(Tr(i)&&Tr(a))for(let u=0;u<t.length;u++){const f=t[u];typeof f=="string"&&(t[u]=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||Wc(t[r]))&&s.push(r);s.length&&qc(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,d])=>{t.getValue(c).set(d)}),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 Lt(e){return Fs(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:qn}=sr(queueMicrotask,!1),pe={x:!1,y:!1};function ei(){return pe.x||pe.y}function Jc(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 Qc(e){return!(e.pointerType==="touch"||ei())}function ed(e,t,n={}){const[s,r,o]=ti(e,n);return s.forEach(i=>{let a=!1,c=!1,d;const u=()=>{i.removeEventListener("pointerleave",g)},f=x=>{d&&(d(x),d=void 0),u()},h=x=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),c&&(c=!1,f(x))},m=()=>{a=!0,window.addEventListener("pointerup",h,r),window.addEventListener("pointercancel",h,r)},g=x=>{if(x.pointerType!=="touch"){if(a){c=!0;return}f(x)}},p=x=>{if(!Qc(x))return;c=!1;const k=t(i,x);typeof k=="function"&&(d=k,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,Zn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,td=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function nd(e){return td.has(e.tagName)||e.isContentEditable===!0}const sd=new Set(["INPUT","SELECT","TEXTAREA"]);function rd(e){return sd.has(e.tagName)||e.isContentEditable===!0}const Rt=new WeakSet;function si(e){return t=>{t.key==="Enter"&&e(t)}}function Jn(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const id=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=si(()=>{if(Rt.has(n))return;Jn(n,"down");const r=si(()=>{Jn(n,"up")}),o=()=>Jn(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 Zn(e)&&!ei()}const ii=new WeakSet;function od(e,t,n={}){const[s,r,o]=ti(e,n),i=a=>{const c=a.currentTarget;if(!ri(a)||ii.has(a))return;Rt.add(c),n.stopPropagation&&ii.add(a);const d=t(c,a),u=(m,g)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),Rt.has(c)&&Rt.delete(c),ri(m)&&typeof d=="function"&&d(m,{success:g})},f=m=>{u(m,c===window||c===document||n.useGlobalTarget||ni(c,m.target))},h=m=>{u(m,!1)};window.addEventListener("pointerup",f,r),window.addEventListener("pointercancel",h,r)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",i,r),Lt(a)&&(a.addEventListener("focus",d=>id(d,r)),!nd(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Qn(e){return Fs(e)&&"ownerSVGElement"in e}const It=new WeakMap;let Ve;const oi=(e,t,n)=>(s,r)=>r&&r[0]?r[0][e+"Size"]:Qn(s)&&"getBBox"in s?s.getBBox()[t]:s[n],ad=oi("inline","width","offsetWidth"),ld=oi("block","height","offsetHeight");function cd({target:e,borderBoxSize:t}){var n;(n=It.get(e))==null||n.forEach(s=>{s(e,{get width(){return ad(e,t)},get height(){return ld(e,t)}})})}function dd(e){e.forEach(cd)}function ud(){typeof ResizeObserver>"u"||(Ve=new ResizeObserver(dd))}function fd(e,t){Ve||ud();const n=Jr(e);return n.forEach(s=>{let r=It.get(s);r||(r=new Set,It.set(s,r)),r.add(t),Ve==null||Ve.observe(s)}),()=>{n.forEach(s=>{const r=It.get(s);r==null||r.delete(t),r!=null&&r.size||Ve==null||Ve.unobserve(s)})}}const zt=new Set;let Qe;function hd(){Qe=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};zt.forEach(t=>t(e))},window.addEventListener("resize",Qe)}function md(e){return zt.add(e),Qe||hd(),()=>{zt.delete(e),!zt.size&&typeof Qe=="function"&&(window.removeEventListener("resize",Qe),Qe=void 0)}}function ai(e,t){return typeof e=="function"?md(e):fd(e,t)}function pd(e){return Qn(e)&&e.tagName==="svg"}const gd=[...Kr,Z,me],xd=e=>gd.find(Yr(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()}),yd=new WeakMap;function Ot(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ft(e){return typeof e=="string"||Array.isArray(e)}const es=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ts=["initial",...es];function _t(e){return Ot(e.animate)||ts.some(t=>ft(e[t]))}function di(e){return!!(_t(e)||e.variants)}function bd(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 ns={current:null},ui={current:!1},vd=typeof window<"u";function wd(){if(ui.current=!0,!!vd)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ns.current=e.matches;e.addEventListener("change",t),t()}else ns.current=!1}const fi=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Ft={};function hi(e){Ft=e}function kd(){return Ft}class jd{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=zn,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=le.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,F.render(this.render,!1,!0))};const{latestValues:d,renderState:u}=a;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=u,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=_t(n),this.isVariantNode=di(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];d[m]!==void 0&&ie(g)&&g.set(d[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,yd.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:(ui.current||wd(),this.shouldReduceMotion=ns.current),process.env.NODE_ENV!=="production"&&fn(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(),Ae(this.notifyUpdate),Ae(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:d,duration:u}=n.accelerate,f=new Dr({element:this.current,name:t,keyframes:a,times:c,ease:d,duration:ue(u)}),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 Ft){const n=Ft[t];if(!n)continue;const{isEnabled:s,Feature:r}=n;if(!this.features[t]&&r&&s(this.props)&&(this.features[t]=new r(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ee()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<fi.length;s++){const r=fi[s];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const o="on"+r,i=t[o];i&&(this.propEventSubscriptions[r]=this.on(r,i))}this.prevMotionValues=bd(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):!xd(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=$n(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(){qn.render(this.render)}}class mi extends jd{constructor(){super(...arguments),this.KeyframeResolver=Zc}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 Td({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Sd(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 ss(e){return e===void 0||e===1}function rs({scale:e,scaleX:t,scaleY:n}){return!ss(e)||!ss(t)||!ss(n)}function Fe(e){return rs(e)||gi(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function gi(e){return xi(e.x)||xi(e.y)}function xi(e){return e&&e!=="0%"}function Bt(e,t,n){const s=e-n,r=t*s;return n+r}function yi(e,t,n,s,r){return r!==void 0&&(e=Bt(e,r,s)),Bt(e,n,s)+t}function is(e,t=0,n=1,s,r){e.min=yi(e.min,t,n,s,r),e.max=yi(e.max,t,n,s,r)}function bi(e,{x:t,y:n}){is(e.x,t.translate,t.scale,t.originPoint),is(e.y,n.translate,n.scale,n.originPoint)}const vi=.999999999999,wi=1.0000000000001;function Cd(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:d}=o.options;d&&d.props.style&&d.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)&&$t(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);is(e,t,n,o,s)}function ji(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function $t(e,t,n){const s=n??e;ki(e.x,ji(t.x,s.x),t.scaleX,t.scale,t.originX),ki(e.y,ji(t.y,s.y),t.scaleY,t.scale,t.originY)}function Ti(e,t){return pi(Sd(e.getBoundingClientRect(),t))}function Nd(e,t,n){const s=Ti(e,n),{scroll:r}=t;return r&&(we(s.x,r.offset.x),we(s.y,r.offset.y)),s}const Pd={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ad=qe.length;function Md(e,t,n){let s="",r=!0;for(let o=0;o<Ad;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 d=parseFloat(a);c=i.startsWith("scale")?d===1:d===0}if(!c||n){const d=Qr(a,Xn[i]);if(!c){r=!1;const u=Pd[i]||i;s+=`${u}(${d}) `}n&&(t[i]=d)}}return s=s.trim(),n?s=n(t,r?"":s):r&&(s="none"),s}function os(e,t,n){const{style:s,vars:r,transformOrigin:o}=e;let i=!1,a=!1;for(const c in t){const d=t[c];if(Ze.has(c)){i=!0;continue}else if(ir(c)){r[c]=d;continue}else{const u=Qr(d,Xn[c]);c.startsWith("origin")?(a=!0,o[c]=u):s[c]=u}}if(t.transform||(i||n?s.transform=Md(t,e.transform,n):s.transform&&(s.transform="none")),a){const{originX:c="50%",originY:d="50%",originZ:u=0}=o;s.transformOrigin=`${c} ${d} ${u}`}}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 ht={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(P.test(e))e=parseFloat(e);else return e;const n=Ci(e,t.target.x),s=Ci(e,t.target.y);return`${n}% ${s}%`}},Ed={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 d=$(a,c,.5);return typeof r[2+i]=="number"&&(r[2+i]/=d),typeof r[3+i]=="number"&&(r[3+i]/=d),o(r)}},as={borderRadius:{...ht,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ht,borderTopRightRadius:ht,borderBottomLeftRadius:ht,borderBottomRightRadius:ht,boxShadow:Ed};function Ni(e,{layout:t,layoutId:n}){return Ze.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!as[e]||e==="opacity")}function ls(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 Vd(e){return window.getComputedStyle(e)}class Dd 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?Vn(n):ec(t,n);{const r=Vd(t),o=(ir(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Ti(t,n)}build(t,n,s){os(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return ls(t,n,s)}}const Ld={offset:"stroke-dashoffset",array:"stroke-dasharray"},Rd={offset:"strokeDashoffset",array:"strokeDasharray"};function Id(e,t,n=1,s=0,r=!0){e.pathLength=1;const o=r?Ld:Rd;e[o.offset]=`${-s}`,e[o.array]=`${t} ${n}`}const zd=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Pi(e,{attrX:t,attrY:n,attrScale:s,pathLength:r,pathSpacing:o=1,pathOffset:i=0,...a},c,d,u){if(os(e,a,d),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=(u==null?void 0:u.transformBox)??"fill-box",delete f.transformBox);for(const m of zd)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&&Id(f,r,o,i,!1)}const Ai=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 Od(e,t,n,s){Si(e,t,void 0,s);for(const r in t.attrs)e.setAttribute(Ai.has(r)?r:Gn(r),t.attrs[r])}function Ei(e,t,n){const s=ls(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 _d 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=Ai.has(n)?n:Gn(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return Ei(t,n,s)}build(t,n,s){Pi(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,r){Od(t,n,s,r)}mount(t){this.isSVGTag=Mi(t.tagName),super.mount(t)}}const Fd=ts.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<Fd;n++){const s=ts[n],r=e.props[s];(ft(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 Bd=[...es].reverse(),$d=es.length;function Wd(e){return t=>Promise.all(t.map(({animation:n,options:s})=>Bc(e,n,s)))}function Ud(e){let t=Wd(e),n=Li(),s=!0,r=!1;const o=d=>(u,f)=>{var m;const h=_e(e,f,d==="exit"?(m=e.presenceContext)==null?void 0:m.custom:void 0);if(h){const{transition:g,transitionEnd:p,...x}=h;u={...u,...x,...p}}return u};function i(d){t=d(e)}function a(d){const{props:u}=e,f=Vi(e.parent)||{},h=[],m=new Set;let g={},p=1/0;for(let k=0;k<$d;k++){const v=Bd[k],y=n[v],T=u[v]!==void 0?u[v]:f[v],S=ft(T),E=v===d?y.isActive:null;E===!1&&(p=k);let z=T===f[v]&&T!==u[v]&&S;if(z&&(s||r)&&e.manuallyAnimateOnMount&&(z=!1),y.protectedKeys={...g},!y.isActive&&E===null||!T&&!y.prevProp||Ot(T)||typeof T=="boolean")continue;if(v==="exit"&&y.isActive&&E!==!0){y.prevResolvedValues&&(g={...g,...y.prevResolvedValues});continue}const j=Gd(y.prevProp,T);let V=j||v===d&&y.isActive&&!z&&S||k>p&&S,D=!1;const _=Array.isArray(T)?T:[T];let B=_.reduce(o(v),{});E===!1&&(B={});const{prevResolvedValues:de={}}=y,ae={...de,...B},J=Y=>{V=!0,m.has(Y)&&(D=!0,m.delete(Y)),y.needsAnimating[Y]=!0;const ne=e.getValue(Y);ne&&(ne.liveStyle=!1)};for(const Y in ae){const ne=B[Y],A=de[Y];if(g.hasOwnProperty(Y))continue;let w=!1;Wn(ne)&&Wn(A)?w=!Di(ne,A):w=ne!==A,w?ne!=null?J(Y):m.add(Y):ne!==void 0&&m.has(Y)?J(Y):y.protectedKeys[Y]=!0}y.prevProp=T,y.prevResolvedValues=B,y.isActive&&(g={...g,...B}),(s||r)&&e.blockInitialAnimation&&(V=!1);const W=z&&j;V&&(!W||D)&&h.push(..._.map(Y=>{const ne={type:v};if(typeof Y=="string"&&(s||r)&&!W&&e.manuallyAnimateOnMount&&e.parent){const{parent:A}=e,w=_e(A,Y);if(A.enteringChildren&&w){const{delayChildren:R}=w.transition||{};ne.delay=zr(A.enteringChildren,e,R)}}return{animation:Y,options:ne}}))}if(m.size){const k={};if(typeof u.initial!="boolean"){const v=_e(e,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(k.transition=v.transition)}m.forEach(v=>{const y=e.getBaseTarget(v),T=e.getValue(v);T&&(T.liveStyle=!0),k[v]=y??null}),h.push({animation:k})}let x=!!h.length;return s&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(x=!1),s=!1,r=!1,x?t(h):Promise.resolve()}function c(d,u){var h;if(n[d].isActive===u)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(m=>{var g;return(g=m.animationState)==null?void 0:g.setActive(d,u)}),n[d].isActive=u;const f=a(d);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 Gd(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 cs(e,t){e.min=t.min,e.max=t.max}function ge(e,t){cs(e.x,t.x),cs(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,Yd=1-Ii,Kd=1+Ii,zi=.01,Hd=0-zi,Xd=0+zi;function ce(e){return e.max-e.min}function qd(e,t,n){return Math.abs(e-t)<=n}function Oi(e,t,n,s=.5){e.origin=s,e.originPoint=$(t.min,t.max,e.origin),e.scale=ce(n)/ce(t),e.translate=$(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Yd&&e.scale<=Kd||isNaN(e.scale))&&(e.scale=1),(e.translate>=Hd&&e.translate<=Xd||isNaN(e.translate))&&(e.translate=0)}function mt(e,t,n,s){Oi(e.x,t.x,n.x,s?s.originX:void 0),Oi(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+ce(t)}function Zd(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+ce(t)}function Wt(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=Bt(e,1/n,s),r!==void 0&&(e=Bt(e,1/r,s)),e}function Jd(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){Jd(e,t[n],t[s],t[r],t.scale,o,i)}const Qd=["x","scaleX","originX"],eu=["y","scaleY","originY"];function Wi(e,t,n,s){$i(e.x,t,Qd,n?n.x:void 0,s?s.x:void 0),$i(e.y,t,eu,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 Yi(e,t){return e.min===t.min&&e.max===t.max}function tu(e,t){return Yi(e.x,t.x)&&Yi(e.y,t.y)}function Ki(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Hi(e,t){return Ki(e.x,t.x)&&Ki(e.y,t.y)}function Xi(e){return ce(e.x)/ce(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 nu(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:d,rotate:u,rotateX:f,rotateY:h,skewX:m,skewY:g}=n;d&&(s=`perspective(${d}px) ${s}`),u&&(s+=`rotate(${u}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"],su=Zi.length,Ji=e=>typeof e=="string"?parseFloat(e):e,Qi=e=>typeof e=="number"||P.test(e);function ru(e,t,n,s,r,o){r?(e.opacity=$(0,n.opacity??1,iu(s)),e.opacityExit=$(t.opacity??1,0,ou(s))):o&&(e.opacity=$(t.opacity??1,n.opacity??1,s));for(let i=0;i<su;i++){const a=Zi[i];let c=eo(t,a),d=eo(n,a);if(c===void 0&&d===void 0)continue;c||(c=0),d||(d=0),c===0||d===0||Qi(c)===Qi(d)?(e[a]=Math.max($(Ji(c),Ji(d),s),0),(ve.test(d)||ve.test(c))&&(e[a]+="%")):e[a]=d}(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 iu=to(0,.5,Zs),ou=to(.5,.95,fe);function to(e,t,n){return s=>s<e?0:s>t?1:n(ot(e,t,s))}function au(e,t,n){const s=ie(e)?e:Je(e);return s.start(Bn("",s,t,n)),s.animation}function pt(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}const lu=(e,t)=>e.depth-t.depth;class cu{constructor(){this.children=[],this.isDirty=!1}add(t){cn(this.children,t),this.isDirty=!0}remove(t){St(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(lu),this.isDirty=!1,this.children.forEach(t)}}function du(e,t){const n=le.now(),s=({timestamp:r})=>{const o=r-n;o>=t&&(Ae(s),e(o-t))};return F.setup(s,!0),()=>Ae(s)}function Ut(e){return ie(e)?e.get():e}class uu{constructor(){this.members=[]}add(t){cn(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&&(St(this.members,s),s.unmount())}t.scheduleRender()}remove(t){if(St(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 Gt={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ds=["","X","Y","Z"],fu=1e3;let hu=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=hu++,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(gu),this.nodes.forEach(ku),this.nodes.forEach(ju),this.nodes.forEach(xu)},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 cu)}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=Qn(i)&&!pd(i),this.instance=i;const{layoutId:a,layout:c,visualElement:d}=this.options;if(d&&!d.current&&d.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),e){let u,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,u&&u(),u=du(h,250),Gt.hasAnimatedSinceResize&&(Gt.hasAnimatedSinceResize=!1,this.nodes.forEach(oo)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&d&&(a||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||d.getDefaultTransition()||Pu,{onLayoutAnimationStart:p,onLayoutAnimationComplete:x}=d.getProps(),k=!this.targetLayout||!Hi(this.targetLayout,m),v=!f&&h;if(this.options.layoutRoot||this.resumeFrom||v||f&&(k||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const y={...Fn(g,"layout"),onPlay:p,onComplete:x};(d.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(u,v)}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(),Ae(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(Tu),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 u=0;u<this.path.length;u++){const f=this.path[u];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 d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(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(bu),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(vu),this.nodes.forEach(wu),this.nodes.forEach(mu),this.nodes.forEach(pu)):this.nodes.forEach(io),this.clearAllSnapshots();const a=le.now();re.delta=be(0,1e3/60,a-re.timestamp),re.timestamp=a,re.isProcessing=!0,pn.update.process(re),pn.preRender.process(re),pn.render.process(re),re.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,qn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(yu),this.sharedNodes.forEach(Su)}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&&!ce(this.snapshot.measuredBox.x)&&!ce(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(),d=c?c(this.latestValues,""):void 0,u=d!==this.prevTransformTemplateValue;i&&this.instance&&(a||Fe(this.latestValues)||u)&&(r(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return i&&(c=this.removeTransform(c)),Au(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:i}=this.options;if(!i)return ee();const a=i.measureViewportBox();if(!(((d=this.scroll)==null?void 0:d.wasRoot)||this.path.some(Mu))){const{scroll:u}=this.root;u&&(we(a.x,u.offset.x),we(a.y,u.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 d=0;d<this.path.length;d++){const u=this.path[d],{scroll:f,options:h}=u;u!==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 u,f;const d=c||ee();ge(d,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(d.x,-m.scroll.offset.x),we(d.y,-m.scroll.offset.y)),Fe(m.latestValues)&&$t(d,m.latestValues,(u=m.layout)==null?void 0:u.layoutBox)}return Fe(this.latestValues)&&$t(d,this.latestValues,(f=this.layout)==null?void 0:f.layoutBox),d}removeTransform(i){var c;const a=ee();ge(a,i);for(let d=0;d<this.path.length;d++){const u=this.path[d];if(!Fe(u.latestValues))continue;let f;u.instance&&(rs(u.latestValues)&&u.updateSnapshot(),f=ee(),ge(f,u.measurePageBox())),Wi(a,u.latestValues,(c=u.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:u,layoutId:f}=this.options;if(!this.layout||!(u||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(),Zd(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||rs(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(),Wt(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:d,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||u))return;ge(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;Cd(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)),mt(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,d=c?c.latestValues:{},u={...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,x=this.getStack(),k=!x||x.members.length<=1,v=!!(p&&!k&&this.options.crossfade===!0&&!this.path.some(Nu));this.animationProgress=0;let y;this.mixTargetDelta=T=>{const S=T/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&&(Wt(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Cu(this.relativeTarget,this.relativeTargetOrigin,h,S),y&&tu(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=ee()),ge(y,this.relativeTarget)),p&&(this.animationValues=u,ru(u,d,this.latestValues,S,v,k)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){var a,c,d;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(d=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||d.stop(),this.pendingAnimation&&(Ae(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=F.update(()=>{Gt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Je(0)),this.motionValue.jump(0,!1),this.currentAnimation=au(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),i.onUpdate&&i.onUpdate(u)},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(fu),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:c,layout:d,latestValues:u}=i;if(!(!a||!c||!d)){if(this!==i&&this.layout&&d&&ho(this.options.animationType,this.layout.layoutBox,d.layoutBox)){c=this.target||ee();const f=ce(this.layout.layoutBox.x);c.x.min=i.target.x.min,c.x.max=c.x.min+f;const h=ce(this.layout.layoutBox.y);c.y.min=i.target.y.min,c.y.max=c.y.min+h}ge(a,c),$t(a,u),mt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new uu),this.sharedNodes.get(i).add(a);const d=a.options.initialPromotionConfig;a.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.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 d=this.getStack();d&&d.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 d={};c.z&&us("z",i,d,this.animationValues);for(let u=0;u<ds.length;u++)us(`rotate${ds[u]}`,i,d,this.animationValues),us(`skew${ds[u]}`,i,d,this.animationValues);i.render();for(const u in d)i.setStaticValue(u,d[u]),this.animationValues&&(this.animationValues[u]=d[u]);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=Ut(a==null?void 0:a.pointerEvents)||"",i.transform=c?c(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(i.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,i.pointerEvents=Ut(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Fe(this.latestValues)&&(i.transform=c?c({},""):"none",this.hasProjected=!1);return}i.visibility="";const u=d.animationValues||d.latestValues;this.applyTransformsToTarget();let f=nu(this.projectionDeltaWithTransform,this.treeScale,u);c&&(f=c(u,f)),i.transform=f;const{x:h,y:m}=this.projectionDelta;i.transformOrigin=`${h.origin*100}% ${m.origin*100}% 0`,d.animationValues?i.opacity=d===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:i.opacity=d===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const g in as){if(u[g]===void 0)continue;const{correct:p,applyTo:x,isCSSVariable:k}=as[g],v=f==="none"?u[g]:p(u[g],d);if(x){const y=x.length;for(let T=0;T<y;T++)i[x[T]]=v}else k?this.options.visualElement.renderState.vars[g]=v:i[g]=v}this.options.layoutId&&(i.pointerEvents=d===this?Ut(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 mu(e){e.updateLayout()}function pu(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=ce(h);h.min=s[f].min,h.max=h.min+m});else if(o==="x"||o==="y"){const f=o==="x"?"y":"x";cs(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=ce(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();mt(a,s,t.layoutBox);const c=et();i?mt(c,e.applyTransform(r,!0),t.measuredBox):mt(c,s,t.layoutBox);const d=!Gi(a);let u=!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();Wt(p,t.layoutBox,h.layoutBox,g);const x=ee();Wt(x,s,m.layoutBox,g),Hi(p,x)||(u=!0),f.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=p,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:t,delta:c,layoutDelta:a,hasLayoutChanged:d,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function gu(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 xu(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function yu(e){e.clearSnapshot()}function ro(e){e.clearMeasurements()}function bu(e){e.isLayoutDirty=!0,e.updateLayout()}function io(e){e.isLayoutDirty=!1}function vu(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function wu(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 ku(e){e.resolveTargetDelta()}function ju(e){e.calcProjection()}function Tu(e){e.resetSkewAndRotation()}function Su(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 Cu(e,t,n,s){lo(e.x,t.x,n.x,s),lo(e.y,t.y,n.y,s)}function Nu(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Pu={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 Au(e){fo(e.x),fo(e.y)}function ho(e,t,n){return e==="position"||e==="preserve-aspect"&&!qd(Xi(t),Xi(n),.2)}function Mu(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Eu=so({attachResizeListener:(e,t)=>pt(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}),fs={current:void 0},mo=so({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!fs.current){const e=new Eu({});e.mount(window),e.setOptions({layoutScroll:!0}),fs.current=e}return fs.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),hs=b.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 Vu(...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 Du(...e){return vt.useCallback(Vu(...e),e)}class Lu extends vt.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(Lt(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const s=n.offsetParent,r=Lt(s)&&s.offsetWidth||0,o=Lt(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 Ru({children:e,isPresent:t,anchorX:n,anchorY:s,root:r,pop:o}){var h;const i=b.useId(),a=b.useRef(null),c=b.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:d}=b.useContext(hs),u=((h=e.props)==null?void 0:h.ref)??(e==null?void 0:e.ref),f=Du(a,u);return b.useInsertionEffect(()=>{const{width:m,height:g,top:p,left:x,right:k,bottom:v}=c.current;if(t||o===!1||!a.current||!m||!g)return;const y=n==="left"?`left: ${x}`:`right: ${k}`,T=s==="bottom"?`bottom: ${v}`:`top: ${p}`;a.current.dataset.motionPopId=i;const S=document.createElement("style");d&&(S.nonce=d);const E=r??document.head;return E.appendChild(S),S.sheet&&S.sheet.insertRule(`
163
163
  [data-motion-pop-id="${i}"] {
164
164
  position: absolute !important;
165
165
  width: ${m}px !important;
166
166
  height: ${g}px !important;
167
- ${x}px !important;
168
- ${j}px !important;
167
+ ${y}px !important;
168
+ ${T}px !important;
169
169
  }
170
- `),()=>{var I;(I=a.current)==null||I.removeAttribute("data-motion-pop-id"),N.contains(C)&&N.removeChild(C)}},[t]),c.jsx(Ff,{isPresent:t,childRef:a,sizeRef:l,pop:o,children:o===!1?e:S.cloneElement(e,{ref:f})})}const Bf=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:r,presenceAffectsLayout:o,mode:i,anchorX:a,anchorY:l,root:u})=>{const d=Cn($f),f=w.useId();let h=!0,m=w.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}),w.useMemo(()=>{d.forEach((g,p)=>d.set(p,!1))},[n]),S.useEffect(()=>{!n&&!d.size&&s&&s()},[n]),e=c.jsx(zf,{pop:i==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:u,children:e}),c.jsx(Vt.Provider,{value:m,children:e})};function $f(){return new Map}function Yo(e=!0){const t=w.useContext(Vt);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:r}=t,o=w.useId();w.useEffect(()=>{if(e)return r(o)},[e]);const i=w.useCallback(()=>e&&s&&s(o),[o,s,e]);return!n&&s?[!1,i]:[!0]}const nn=e=>e.key||"";function qo(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const ue=({children:e,custom:t,initial:n=!0,onExitComplete:s,presenceAffectsLayout:r=!0,mode:o="sync",propagate:i=!1,anchorX:a="left",anchorY:l="top",root:u})=>{const[d,f]=Yo(i),h=w.useMemo(()=>qo(e),[e]),m=i&&!d?[]:h.map(nn),g=w.useRef(!0),p=w.useRef(h),y=Cn(()=>new Map),v=w.useRef(new Set),[b,x]=w.useState(h),[j,C]=w.useState(h);gr(()=>{g.current=!1,p.current=h;for(let k=0;k<j.length;k++){const M=nn(j[k]);m.includes(M)?(y.delete(M),v.current.delete(M)):y.get(M)!==!0&&y.set(M,!1)}},[j,m.length,m.join("-")]);const N=[];if(h!==b){let k=[...h];for(let M=0;M<j.length;M++){const V=j[M],z=nn(V);m.includes(z)||(k.splice(M,0,V),N.push(V))}return o==="wait"&&N.length&&(k=N),C(qo(k)),x(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:I}=w.useContext(jn);return c.jsx(c.Fragment,{children:j.map(k=>{const M=nn(k),V=i&&!d?!1:h===j||m.includes(M),z=()=>{if(v.current.has(M))return;if(y.has(M))v.current.add(M),y.set(M,!0);else return;let $=!0;y.forEach(oe=>{oe||($=!1)}),$&&(I==null||I(),C(p.current),i&&(f==null||f()),s&&s())};return c.jsx(Bf,{isPresent:V,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:r,mode:o,root:u,onExitComplete:V?void 0:z,anchorX:a,anchorY:l,children:k},M)})})},Xo=w.createContext({strict:!1}),Zo={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 Jo=!1;function Wf(){if(Jo)return;const e={};for(const t in Zo)e[t]={isEnabled:n=>Zo[t].some(s=>!!n[s])};Gi(e),Jo=!0}function Qo(){return Wf(),Cd()}function Uf(e){const t=Qo();for(const n in e)t[n]={...t[n],...e[n]};Gi(t)}const Gf=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 sn(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Gf.has(e)}let ea=e=>!sn(e);function Hf(e){typeof e=="function"&&(ea=t=>t.startsWith("on")?!sn(t):e(t))}try{Hf(require("@emotion/is-prop-valid").default)}catch{}function Kf(e,t,n){const s={};for(const r in e)r==="values"&&typeof e.values=="object"||le(e[r])||(ea(r)||n===!0&&sn(r)||!t&&!sn(r)||e.draggable&&r.startsWith("onDrag"))&&(s[r]=e[r]);return s}const rn=w.createContext({});function Yf(e,t){if(qt(e)){const{initial:n,animate:s}=e;return{initial:n===!1||wt(n)?n:void 0,animate:wt(s)?s:void 0}}return e.inherit!==!1?t:{}}function qf(e){const{initial:t,animate:n}=Yf(e,w.useContext(rn));return w.useMemo(()=>({initial:t,animate:n}),[ta(t),ta(n)])}function ta(e){return Array.isArray(e)?e.join(" "):e}const Rs=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function na(e,t,n){for(const s in t)!le(t[s])&&!io(s,n)&&(e[s]=t[s])}function Xf({transformTemplate:e},t){return w.useMemo(()=>{const n=Rs();return Ts(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Zf(e,t){const n=e.style||{},s={};return na(s,n,e),Object.assign(s,Xf(e,t)),s}function Jf(e,t){const n={},s=Zf(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 sa=()=>({...Rs(),attrs:{}});function Qf(e,t,n,s){const r=w.useMemo(()=>{const o=sa();return oo(o,t,lo(s),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};na(o,e.style,e),r.style={...o,...r.style}}return r}const eh=["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 Ds(e){return typeof e!="string"||e.includes("-")?!1:!!(eh.indexOf(e)>-1||/[A-Z]/u.test(e))}function th(e,t,n,{latestValues:s},r,o=!1,i){const l=(i??Ds(e)?Qf:Jf)(t,s,r,e),u=Kf(t,typeof e=="string",o),d=e!==w.Fragment?{...u,...l,ref:n}:{},{children:f}=t,h=w.useMemo(()=>le(f)?f.get():f,[f]);return w.createElement(e,{...d,children:h})}function nh({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,r){return{latestValues:sh(n,s,r,e),renderState:t()}}function sh(e,t,n,s){const r={},o=s(e,{});for(const h in o)r[h]=en(o[h]);let{initial:i,animate:a}=e;const l=qt(e),u=$i(e);t&&u&&!l&&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"&&!Yt(f)){const h=Array.isArray(f)?f:[f];for(let m=0;m<h.length;m++){const g=os(e,h[m]);if(g){const{transitionEnd:p,transition:y,...v}=g;for(const b in v){let x=v[b];if(Array.isArray(x)){const j=d?x.length-1:0;x=x[j]}x!==null&&(r[b]=x)}for(const b in p)r[b]=p[b]}}}return r}const ra=e=>(t,n)=>{const s=w.useContext(rn),r=w.useContext(Vt),o=()=>nh(e,t,s,r);return n?o():Cn(o)},rh=ra({scrapeMotionValuesFromProps:Cs,createRenderState:Rs}),ih=ra({scrapeMotionValuesFromProps:co,createRenderState:sa}),oh=Symbol.for("motionComponentSymbol");function ah(e,t,n){const s=w.useRef(n);w.useInsertionEffect(()=>{s.current=n});const r=w.useRef(null);return w.useCallback(o=>{var a;o&&((a=e.onMount)==null||a.call(e,o));const i=s.current;if(typeof i=="function")if(o){const l=i(o);typeof l=="function"&&(r.current=l)}else r.current?(r.current(),r.current=null):i(o);else i&&(i.current=o);t&&(o?t.mount(o):t.unmount())},[t])}const ia=w.createContext({});function ct(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function lh(e,t,n,s,r,o){var x,j;const{visualElement:i}=w.useContext(rn),a=w.useContext(Xo),l=w.useContext(Vt),u=w.useContext(Ms),d=u.reducedMotion,f=u.skipAnimations,h=w.useRef(null),m=w.useRef(!1);s=s||a.renderer,!h.current&&s&&(h.current=s(e,{visualState:t,parent:i,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:d,skipAnimations:f,isSVG:o}),m.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const g=h.current,p=w.useContext(ia);g&&!g.projection&&r&&(g.type==="html"||g.type==="svg")&&ch(h.current,n,r,p);const y=w.useRef(!1);w.useInsertionEffect(()=>{g&&y.current&&g.update(n,l)});const v=n[wi],b=w.useRef(!!v&&typeof window<"u"&&!((x=window.MotionHandoffIsComplete)!=null&&x.call(window,v))&&((j=window.MotionHasOptimisedAnimation)==null?void 0:j.call(window,v)));return gr(()=>{m.current=!0,g&&(y.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),b.current&&g.animationState&&g.animationState.animateChanges())}),w.useEffect(()=>{g&&(!b.current&&g.animationState&&g.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var C;(C=window.MotionHandoffMarkAsComplete)==null||C.call(window,v)}),b.current=!1),g.enteringChildren=void 0)}),g}function ch(e,t,n,s){const{layoutId:r,layout:o,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutAnchor:d,layoutCrossfade:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:oa(e.parent)),e.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:!!i||a&&ct(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:f,layoutScroll:l,layoutRoot:u,layoutAnchor:d})}function oa(e){if(e)return e.options.allowProjection!==!1?e.projection:oa(e.parent)}function Vs(e,{forwardMotionProps:t=!1,type:n}={},s,r){s&&Uf(s);const o=n?n==="svg":Ds(e),i=o?ih:rh;function a(u,d){let f;const h={...w.useContext(Ms),...u,layoutId:uh(u)},{isStatic:m}=h,g=qf(u),p=i(u,m);if(!m&&typeof window<"u"){dh(h,s);const y=fh(h);f=y.MeasureLayout,g.visualElement=lh(e,p,h,r,y.ProjectionNode,o)}return c.jsxs(rn.Provider,{value:g,children:[f&&g.visualElement?c.jsx(f,{visualElement:g.visualElement,...h}):null,th(e,u,ah(p,g.visualElement,d),p,m,t,o)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=w.forwardRef(a);return l[oh]=e,l}function uh({layoutId:e}){const t=w.useContext(jn).id;return t&&e!==void 0?t+"-"+e:e}function dh(e,t){const n=w.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?Qe(!1,s,"lazy-strict-mode"):Ee(!1,s,"lazy-strict-mode")}}function fh(e){const t=Qo(),{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 hh(e,t){if(typeof Proxy>"u")return Vs;const n=new Map,s=(o,i)=>Vs(o,i,e,t),r=(o,i)=>(process.env.NODE_ENV!=="production"&&An(!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,Vs(i,void 0,e,t)),n.get(i))})}const mh=(e,t)=>t.isSVG??Ds(e)?new Wd(t):new _d(t,{allowProjection:e!==w.Fragment});class ph extends ze{constructor(t){super(t),t.animationState||(t.animationState=Yd(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Yt(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 gh=0;class yh extends ze{constructor(){super(...arguments),this.id=gh++,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 l=Ke(this.node,i,a);if(l){const{transition:u,transitionEnd:d,...f}=l;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 xh={animation:{Feature:ph},exit:{Feature:yh}};function jt(e){return{point:{x:e.pageX,y:e.pageY}}}const bh=e=>t=>ps(t)&&e(t,jt(t));function Ct(e,t,n,s){return Tt(e,t,bh(n),s)}const aa=({current:e})=>e?e.ownerDocument.defaultView:null,la=(e,t)=>Math.abs(e-t);function vh(e,t){const n=la(e.x,t.x),s=la(e.y,t.y);return Math.sqrt(n**2+s**2)}const ca=new Set(["auto","scroll"]);class ua{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=on(this.lastRawMoveEventInfo,this.transformPagePoint));const m=Ls(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,p=vh(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!p)return;const{point:y}=m,{timestamp:v}=ae;this.history.push({...y,timestamp:v});const{onStart:b,onMove:x}=this.handlers;g||(b&&b(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastRawMoveEventInfo=g,this.lastMoveEventInfo=on(g,this.transformPagePoint),W.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:p,onSessionEnd:y,resumeAnimation:v}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Ls(m.type==="pointercancel"?this.lastMoveEventInfo:on(g,this.transformPagePoint),this.history);this.startEvent&&p&&p(m,b),y&&y(m,b)},!ps(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=i,this.contextWindow=r||window;const l=jt(t),u=on(l,this.transformPagePoint),{point:d}=u,{timestamp:f}=ae;this.history=[{...d,timestamp:f}];const{onSessionStart:h}=n;h&&h(t,Ls(u,this.history)),this.removeListeners=mt(Ct(this.contextWindow,"pointermove",this.handlePointerMove),Ct(this.contextWindow,"pointerup",this.handlePointerUp),Ct(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const s=getComputedStyle(n);(ca.has(s.overflowX)||ca.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),W.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ie(this.updatePoint)}}function on(e,t){return t?{point:t(e.point)}:e}function da(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ls({point:e},t){return{point:e,delta:da(e,fa(t)),offset:da(e,wh(t)),velocity:kh(t,.1)}}function wh(e){return e[0]}function fa(e){return e[e.length-1]}function kh(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,s=null;const r=fa(e);for(;n>=0&&(s=e[n],!(r.timestamp-s.timestamp>he(t)));)n--;if(!s)return{x:0,y:0};s===e[0]&&e.length>2&&r.timestamp-s.timestamp>he(t)*2&&(s=e[1]);const o=pe(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 Sh(e,{min:t,max:n},s){return t!==void 0&&e<t?e=s?U(t,e,s.min):Math.max(e,t):n!==void 0&&e>n&&(e=s?U(n,e,s.max):Math.min(e,n)),e}function ha(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 Th(e,{top:t,left:n,bottom:s,right:r}){return{x:ha(e.x,n,r),y:ha(e.y,t,s)}}function ma(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 jh(e,t){return{x:ma(e.x,t.x),y:ma(e.y,t.y)}}function Ch(e,t){let n=.5;const s=fe(e),r=fe(t);return r>s?n=pt(t.min,t.max-s,e.min):s>r&&(n=pt(e.min,e.max-r,t.min)),Se(0,1,n)}function Nh(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 Is=.35;function Eh(e=Is){return e===!1?e=0:e===!0&&(e=Is),{x:pa(e,"left","right"),y:pa(e,"top","bottom")}}function pa(e,t,n){return{min:ga(e,t),max:ga(e,n)}}function ga(e,t){return typeof e=="number"?e:e[t]||0}const Ph=new WeakMap;class Ah{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=te(),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(jt(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=nd(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),Ce(v=>{let b=this.getAxisMotionValue(v).get()||0;if(Te.test(b)){const{projection:x}=this.visualElement;if(x&&x.layout){const j=x.layout.layoutBox[v];j&&(b=fe(j)*(parseFloat(b)/100))}}this.originPoint[v]=b}),p&&W.update(()=>p(f,h),!1,!0),ls(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:v}=h;if(g&&this.currentDirection===null){this.currentDirection=Rh(v),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",h.point,v),this.updateAxis("y",h.point,v),this.visualElement.render(),y&&W.update(()=>y(f,h),!1,!0)},l=(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 ua(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:s,contextWindow:aa(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&&W.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||!an(t,r,this.currentDirection))return;const o=this.getAxisMotionValue(t);let i=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(i=Sh(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&&ct(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=Th(s.layoutBox,t):this.constraints=!1,this.elastic=Eh(n),r!==this.constraints&&!ct(t)&&s&&this.constraints&&!this.hasMutatedConstraints&&Ce(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=Nh(s.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ct(t))return!1;const s=t.current;Ee(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=Md(s,r.root,this.visualElement.getTransformPagePoint());let i=jh(r.layout.layoutBox,o);if(n){const a=n(Ed(i));this.hasMutatedConstraints=!!a,a&&(i=Ki(a))}return i}startAnimation(t){const{drag:n,dragMomentum:s,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Ce(d=>{if(!an(d,n,this.currentDirection))return;let f=l&&l[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 ls(this.visualElement,t),s.start(is(t,s,0,n,this.visualElement,!1))}stopAnimation(){Ce(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){Ce(n=>{const{drag:s}=this.getProps();if(!an(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],l=o.get()||0;o.set(t[n]-U(i,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!ct(n)||!s||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Ce(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();r[i]=Ch({min:l,max:l},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(),Ce(i=>{if(!an(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:u}=this.constraints[i];a.set(U(l,u,r[i]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Ph.set(this.visualElement,this);const t=this.visualElement.current,n=Ct(t,"pointerdown",u=>{const{drag:d,dragListener:f=!0}=this.getProps(),h=u.target,m=h!==t&&ld(h);d&&f&&!m&&this.start(u)});let s;const r=()=>{const{dragConstraints:u}=this.getProps();ct(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),s||(s=Mh(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),W.read(r);const a=Tt(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(Ce(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(),l&&l(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=Is,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:s,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function ya(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Mh(e,t,n){const s=Fi(e,ya(n)),r=Fi(t,ya(n));return()=>{s(),r()}}function an(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Rh(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Dh extends ze{constructor(t){super(t),this.removeGroupControls=me,this.removeListeners=me,this.controls=new Ah(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||me}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 _s=e=>(t,n)=>{e&&W.update(()=>e(t,n),!1,!0)};class Vh extends ze{constructor(){super(...arguments),this.removePointerDownListener=me}onPointerDown(t){this.session=new ua(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:aa(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:s,onPanEnd:r}=this.node.getProps();return{onSessionStart:_s(t),onStart:_s(n),onMove:_s(s),onEnd:(o,i)=>{delete this.session,r&&W.postRender(()=>r(o,i))}}}mount(){this.removePointerDownListener=Ct(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 Os=!1;class Lh extends w.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),Os&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),tn.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}),Os=!0,r||t.layoutDependency!==n||n===void 0||t.isPresent!==o?i.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?i.promote():i.relegate()||W.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(),ms.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:r}=t;Os=!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 xa(e){const[t,n]=Yo(),s=w.useContext(jn);return c.jsx(Lh,{...e,layoutGroup:s,switchLayoutGroup:w.useContext(ia),isPresent:t,safeToRemove:n})}const Ih={pan:{Feature:Vh},drag:{Feature:Dh,ProjectionNode:Ho,MeasureLayout:xa}};function ba(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&&W.postRender(()=>o(t,jt(t)))}class _h extends ze{mount(){const{current:t}=this.node;t&&(this.unmount=rd(t,(n,s)=>(ba(this.node,s,"Start"),r=>ba(this.node,r,"End"))))}unmount(){}}class Oh extends ze{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=mt(Tt(this.node.current,"focus",()=>this.onFocus()),Tt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function va(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&&W.postRender(()=>o(t,jt(t)))}class Fh extends ze{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=ud(t,(r,o)=>(va(this.node,o,"Start"),(i,{success:a})=>va(this.node,i,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(s==null?void 0:s.tap)===!1})}unmount(){}}const Fs=new WeakMap,zs=new WeakMap,zh=e=>{const t=Fs.get(e.target);t&&t(e)},Bh=e=>{e.forEach(zh)};function $h({root:e,...t}){const n=e||document;zs.has(n)||zs.set(n,{});const s=zs.get(n),r=JSON.stringify(t);return s[r]||(s[r]=new IntersectionObserver(Bh,{root:e,...t})),s[r]}function Wh(e,t,n){const s=$h(t);return Fs.set(e,n),s.observe(e),()=>{Fs.delete(e),s.unobserve(e)}}const Uh={some:0,all:1};class Gh extends ze{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var l;(l=this.stopObserver)==null||l.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:Uh[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=Wh(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(Hh(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function Hh({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Kh={...xh,...{inView:{Feature:Gh},tap:{Feature:Fh},focus:{Feature:Oh},hover:{Feature:_h}},...Ih,...{layout:{ProjectionNode:Ho,MeasureLayout:xa}}},F=hh(Kh,mh);function wa(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=wa(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function Yh(){for(var e,t,n=0,s="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=wa(e))&&(s&&(s+=" "),s+=t);return s}const qh=(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},Xh=(e,t)=>({classGroupId:e,validator:t}),ka=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ln="-",Sa=[],Zh="arbitrary..",Jh=e=>{const t=em(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Qh(i);const a=i.split(ln),l=a[0]===""&&a.length>1?1:0;return Ta(a,l,t)},getConflictingClassGroupIds:(i,a)=>{if(a){const l=s[i],u=n[i];return l?u?qh(u,l):l:u||Sa}return n[i]||Sa}}},Ta=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const r=e[t],o=n.nextPart.get(r);if(o){const u=Ta(e,t+1,o);if(u)return u}const i=n.validators;if(i===null)return;const a=t===0?e.join(ln):e.slice(t).join(ln),l=i.length;for(let u=0;u<l;u++){const d=i[u];if(d.validator(a))return d.classGroupId}},Qh=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?Zh+s:void 0})(),em=e=>{const{theme:t,classGroups:n}=e;return tm(n,t)},tm=(e,t)=>{const n=ka();for(const s in e){const r=e[s];Bs(r,n,s,t)}return n},Bs=(e,t,n,s)=>{const r=e.length;for(let o=0;o<r;o++){const i=e[o];nm(i,t,n,s)}},nm=(e,t,n,s)=>{if(typeof e=="string"){sm(e,t,n);return}if(typeof e=="function"){rm(e,t,n,s);return}im(e,t,n,s)},sm=(e,t,n)=>{const s=e===""?t:ja(t,e);s.classGroupId=n},rm=(e,t,n,s)=>{if(om(e)){Bs(e(s),t,n,s);return}t.validators===null&&(t.validators=[]),t.validators.push(Xh(n,e))},im=(e,t,n,s)=>{const r=Object.entries(e),o=r.length;for(let i=0;i<o;i++){const[a,l]=r[i];Bs(l,ja(t,a),n,s)}},ja=(e,t)=>{let n=e;const s=t.split(ln),r=s.length;for(let o=0;o<r;o++){const i=s[o];let a=n.nextPart.get(i);a||(a=ka(),n.nextPart.set(i,a)),n=a}return n},om=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,am=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)}}},$s="!",Ca=":",lm=[],Na=(e,t,n,s,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:s,isExternal:r}),cm=e=>{const{prefix:t,experimentalParseClassName:n}=e;let s=r=>{const o=[];let i=0,a=0,l=0,u;const d=r.length;for(let p=0;p<d;p++){const y=r[p];if(i===0&&a===0){if(y===Ca){o.push(r.slice(l,p)),l=p+1;continue}if(y==="/"){u=p;continue}}y==="["?i++:y==="]"?i--:y==="("?a++:y===")"&&a--}const f=o.length===0?r:r.slice(l);let h=f,m=!1;f.endsWith($s)?(h=f.slice(0,-1),m=!0):f.startsWith($s)&&(h=f.slice(1),m=!0);const g=u&&u>l?u-l:void 0;return Na(o,m,h,g)};if(t){const r=t+Ca,o=s;s=i=>i.startsWith(r)?o(i.slice(r.length)):Na(lm,!1,i,void 0,!0)}if(n){const r=s;s=o=>n({className:o,parseClassName:r})}return s},um=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]==="[",l=t.has(i);a||l?(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}},dm=e=>({cache:am(e.cacheSize),parseClassName:cm(e),sortModifiers:um(e),postfixLookupClassGroupIds:fm(e),...Jh(e)}),fm=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},hm=/\s+/,mm=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:r,sortModifiers:o,postfixLookupClassGroupIds:i}=t,a=[],l=e.trim().split(hm);let u="";for(let d=l.length-1;d>=0;d-=1){const f=l[d],{isExternal:h,modifiers:m,hasImportantModifier:g,baseClassName:p,maybePostfixModifierPosition:y}=n(f);if(h){u=f+(u.length>0?" "+u:u);continue}let v=!!y,b;if(v){const I=p.substring(0,y);b=s(I);const k=b&&i[b]?s(p):void 0;k&&k!==b&&(b=k,v=!1)}else b=s(p);if(!b){if(!v){u=f+(u.length>0?" "+u:u);continue}if(b=s(p),!b){u=f+(u.length>0?" "+u:u);continue}v=!1}const x=m.length===0?"":m.length===1?m[0]:o(m).join(":"),j=g?x+$s:x,C=j+b;if(a.indexOf(C)>-1)continue;a.push(C);const N=r(b,v);for(let I=0;I<N.length;++I){const k=N[I];a.push(j+k)}u=f+(u.length>0?" "+u:u)}return u},pm=(...e)=>{let t=0,n,s,r="";for(;t<e.length;)(n=e[t++])&&(s=Ea(n))&&(r&&(r+=" "),r+=s);return r},Ea=e=>{if(typeof e=="string")return e;let t,n="";for(let s=0;s<e.length;s++)e[s]&&(t=Ea(e[s]))&&(n&&(n+=" "),n+=t);return n},gm=(e,...t)=>{let n,s,r,o;const i=l=>{const u=t.reduce((d,f)=>f(d),e());return n=dm(u),s=n.cache.get,r=n.cache.set,o=a,a(l)},a=l=>{const u=s(l);if(u)return u;const d=mm(l,n);return r(l,d),d};return o=i,(...l)=>o(pm(...l))},ym=[],ne=e=>{const t=n=>n[e]||ym;return t.isThemeGetter=!0,t},Pa=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Aa=/^\((?:(\w[\w-]*):)?(.+)\)$/i,xm=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,bm=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,vm=/\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$/,wm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,km=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Sm=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Be=e=>xm.test(e),O=e=>!!e&&!Number.isNaN(Number(e)),Ne=e=>!!e&&Number.isInteger(Number(e)),Ws=e=>e.endsWith("%")&&O(e.slice(0,-1)),Pe=e=>bm.test(e),Ma=()=>!0,Tm=e=>vm.test(e)&&!wm.test(e),Us=()=>!1,jm=e=>km.test(e),Cm=e=>Sm.test(e),Nm=e=>!E(e)&&!P(e),Em=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)),Pm=e=>$e(e,_a,Us),E=e=>Pa.test(e),Xe=e=>$e(e,Oa,Tm),Ra=e=>$e(e,_m,O),Am=e=>$e(e,za,Ma),Mm=e=>$e(e,Fa,Us),Da=e=>$e(e,La,Us),Rm=e=>$e(e,Ia,Cm),cn=e=>$e(e,Ba,jm),P=e=>Aa.test(e),Nt=e=>Ze(e,Oa),Dm=e=>Ze(e,Fa),Va=e=>Ze(e,La),Vm=e=>Ze(e,_a),Lm=e=>Ze(e,Ia),un=e=>Ze(e,Ba,!0),Im=e=>Ze(e,za,!0),$e=(e,t,n)=>{const s=Pa.exec(e);return s?s[1]?t(s[1]):n(s[2]):!1},Ze=(e,t,n=!1)=>{const s=Aa.exec(e);return s?s[1]?t(s[1]):n:!1},La=e=>e==="position"||e==="percentage",Ia=e=>e==="image"||e==="url",_a=e=>e==="length"||e==="size"||e==="bg-size",Oa=e=>e==="length",_m=e=>e==="number",Fa=e=>e==="family-name",za=e=>e==="number"||e==="weight",Ba=e=>e==="shadow",Om=gm(()=>{const e=ne("color"),t=ne("font"),n=ne("text"),s=ne("font-weight"),r=ne("tracking"),o=ne("leading"),i=ne("breakpoint"),a=ne("container"),l=ne("spacing"),u=ne("radius"),d=ne("shadow"),f=ne("inset-shadow"),h=ne("text-shadow"),m=ne("drop-shadow"),g=ne("blur"),p=ne("perspective"),y=ne("aspect"),v=ne("ease"),b=ne("animate"),x=()=>["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"],C=()=>[...j(),P,E],N=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],k=()=>[P,E,l],M=()=>[Be,"full","auto",...k()],V=()=>[Ne,"none","subgrid",P,E],z=()=>["auto",{span:["full",Ne,P,E]},Ne,P,E],$=()=>[Ne,"auto",P,E],oe=()=>["auto","min","max","fr",P,E],se=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],B=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...k()],ke=()=>[Be,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],Y=()=>[Be,"screen","full","dvw","lvw","svw","min","max","fit",...k()],re=()=>[Be,"screen","full","lh","dvh","lvh","svh","min","max","fit",...k()],R=()=>[e,P,E],T=()=>[...j(),Va,Da,{position:[P,E]}],_=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",Vm,Pm,{size:[P,E]}],Z=()=>[Ws,Nt,Xe],ee=()=>["","none","full",u,P,E],ie=()=>["",O,Nt,Xe],q=()=>["solid","dashed","dotted","double"],De=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>[O,Ws,Va,Da],bn=()=>["","none",g,P,E],vn=()=>["none",O,P,E],wn=()=>["none",O,P,E],or=()=>[O,P,E],kn=()=>[Be,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Pe],breakpoint:[Pe],color:[Ma],container:[Pe],"drop-shadow":[Pe],ease:["in","out","in-out"],font:[Nm],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Pe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Pe],shadow:[Pe],spacing:["px",O],text:[Pe],"text-shadow":[Pe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Be,E,P,y]}],container:["container"],"container-type":[{"@container":["","normal","size",P,E]}],"container-named":[Em],columns:[{columns:[O,E,P,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"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:C()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{"inset-s":M(),start:M()}],end:[{"inset-e":M(),end:M()}],"inset-bs":[{"inset-bs":M()}],"inset-be":[{"inset-be":M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[Ne,"auto",P,E]}],basis:[{basis:[Be,"full","auto",a,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[O,Be,"auto","initial","none",E]}],grow:[{grow:["",O,P,E]}],shrink:[{shrink:["",O,P,E]}],order:[{order:[Ne,"first","last","none",P,E]}],"grid-cols":[{"grid-cols":V()}],"col-start-end":[{col:z()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":V()}],"row-start-end":[{row:z()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":oe()}],"auto-rows":[{"auto-rows":oe()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...se(),"normal"]}],"justify-items":[{"justify-items":[...B(),"normal"]}],"justify-self":[{"justify-self":["auto",...B()]}],"align-content":[{content:["normal",...se()]}],"align-items":[{items:[...B(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...B(),{baseline:["","last"]}]}],"place-content":[{"place-content":se()}],"place-items":[{"place-items":[...B(),"baseline"]}],"place-self":[{"place-self":["auto",...B()]}],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:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mbs:[{mbs:G()}],mbe:[{mbe:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:ke()}],"inline-size":[{inline:["auto",...Y()]}],"min-inline-size":[{"min-inline":["auto",...Y()]}],"max-inline-size":[{"max-inline":["none",...Y()]}],"block-size":[{block:["auto",...re()]}],"min-block-size":[{"min-block":["auto",...re()]}],"max-block-size":[{"max-block":["none",...re()]}],w:[{w:[a,"screen",...ke()]}],"min-w":[{"min-w":[a,"screen","none",...ke()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...ke()]}],h:[{h:["screen","lh",...ke()]}],"min-h":[{"min-h":["screen","lh","none",...ke()]}],"max-h":[{"max-h":["screen","lh",...ke()]}],"font-size":[{text:["base",n,Nt,Xe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,Im,Am]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ws,E]}],"font-family":[{font:[Dm,Mm,t]}],"font-features":[{"font-features":[E]}],"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,P,E]}],"line-clamp":[{"line-clamp":[O,"none",P,Ra]}],leading:[{leading:[o,...k()]}],"list-image":[{"list-image":["none",P,E]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",P,E]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:[O,"from-font","auto",P,Xe]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[O,"auto",P,E]}],"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:[Ne,P,E]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",P,E]}],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",P,E]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:T()}],"bg-repeat":[{bg:_()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ne,P,E],radial:["",P,E],conic:[Ne,P,E]},Lm,Rm]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:Z()}],"gradient-via-pos":[{via:Z()}],"gradient-to-pos":[{to:Z()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:ee()}],"rounded-s":[{"rounded-s":ee()}],"rounded-e":[{"rounded-e":ee()}],"rounded-t":[{"rounded-t":ee()}],"rounded-r":[{"rounded-r":ee()}],"rounded-b":[{"rounded-b":ee()}],"rounded-l":[{"rounded-l":ee()}],"rounded-ss":[{"rounded-ss":ee()}],"rounded-se":[{"rounded-se":ee()}],"rounded-ee":[{"rounded-ee":ee()}],"rounded-es":[{"rounded-es":ee()}],"rounded-tl":[{"rounded-tl":ee()}],"rounded-tr":[{"rounded-tr":ee()}],"rounded-br":[{"rounded-br":ee()}],"rounded-bl":[{"rounded-bl":ee()}],"border-w":[{border:ie()}],"border-w-x":[{"border-x":ie()}],"border-w-y":[{"border-y":ie()}],"border-w-s":[{"border-s":ie()}],"border-w-e":[{"border-e":ie()}],"border-w-bs":[{"border-bs":ie()}],"border-w-be":[{"border-be":ie()}],"border-w-t":[{"border-t":ie()}],"border-w-r":[{"border-r":ie()}],"border-w-b":[{"border-b":ie()}],"border-w-l":[{"border-l":ie()}],"divide-x":[{"divide-x":ie()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ie()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...q(),"hidden","none"]}],"divide-style":[{divide:[...q(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-bs":[{"border-bs":R()}],"border-color-be":[{"border-be":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...q(),"none","hidden"]}],"outline-offset":[{"outline-offset":[O,P,E]}],"outline-w":[{outline:["",O,Nt,Xe]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",d,un,cn]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",f,un,cn]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[O,Xe]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":ie()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",h,un,cn]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[O,P,E]}],"mix-blend":[{"mix-blend":[...De(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":De()}],"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":[O]}],"mask-image-linear-from-pos":[{"mask-linear-from":J()}],"mask-image-linear-to-pos":[{"mask-linear-to":J()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":J()}],"mask-image-t-to-pos":[{"mask-t-to":J()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":J()}],"mask-image-r-to-pos":[{"mask-r-to":J()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":J()}],"mask-image-b-to-pos":[{"mask-b-to":J()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":J()}],"mask-image-l-to-pos":[{"mask-l-to":J()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":J()}],"mask-image-x-to-pos":[{"mask-x-to":J()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":J()}],"mask-image-y-to-pos":[{"mask-y-to":J()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[P,E]}],"mask-image-radial-from-pos":[{"mask-radial-from":J()}],"mask-image-radial-to-pos":[{"mask-radial-to":J()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"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":[O]}],"mask-image-conic-from-pos":[{"mask-conic-from":J()}],"mask-image-conic-to-pos":[{"mask-conic-to":J()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:T()}],"mask-repeat":[{mask:_()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",P,E]}],filter:[{filter:["","none",P,E]}],blur:[{blur:bn()}],brightness:[{brightness:[O,P,E]}],contrast:[{contrast:[O,P,E]}],"drop-shadow":[{"drop-shadow":["","none",m,un,cn]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",O,P,E]}],"hue-rotate":[{"hue-rotate":[O,P,E]}],invert:[{invert:["",O,P,E]}],saturate:[{saturate:[O,P,E]}],sepia:[{sepia:["",O,P,E]}],"backdrop-filter":[{"backdrop-filter":["","none",P,E]}],"backdrop-blur":[{"backdrop-blur":bn()}],"backdrop-brightness":[{"backdrop-brightness":[O,P,E]}],"backdrop-contrast":[{"backdrop-contrast":[O,P,E]}],"backdrop-grayscale":[{"backdrop-grayscale":["",O,P,E]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[O,P,E]}],"backdrop-invert":[{"backdrop-invert":["",O,P,E]}],"backdrop-opacity":[{"backdrop-opacity":[O,P,E]}],"backdrop-saturate":[{"backdrop-saturate":[O,P,E]}],"backdrop-sepia":[{"backdrop-sepia":["",O,P,E]}],"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",P,E]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[O,"initial",P,E]}],ease:[{ease:["linear","initial",v,P,E]}],delay:[{delay:[O,P,E]}],animate:[{animate:["none",b,P,E]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,P,E]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:vn()}],"rotate-x":[{"rotate-x":vn()}],"rotate-y":[{"rotate-y":vn()}],"rotate-z":[{"rotate-z":vn()}],scale:[{scale:wn()}],"scale-x":[{"scale-x":wn()}],"scale-y":[{"scale-y":wn()}],"scale-z":[{"scale-z":wn()}],"scale-3d":["scale-3d"],skew:[{skew:or()}],"skew-x":[{"skew-x":or()}],"skew-y":[{"skew-y":or()}],transform:[{transform:[P,E,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:kn()}],"translate-x":[{"translate-x":kn()}],"translate-y":[{"translate-y":kn()}],"translate-z":[{"translate-z":kn()}],"translate-none":["translate-none"],zoom:[{zoom:[Ne,P,E]}],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"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",P,E]}],"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":R()}],"scrollbar-track-color":[{"scrollbar-track":R()}],"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",P,E]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[O,Nt,Xe,Ra]}],stroke:[{stroke:["none",...R()]}],"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 Om(Yh(e))}const Fm=({title:e,children:t,className:n})=>{const[s,r]=w.useState(!1);return c.jsxs("div",{className:D("glass-card overflow-hidden p-0 border border-border/50",n),children:[c.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:[c.jsx("span",{children:e}),c.jsx(hr,{size:18,className:D("text-muted-foreground transition-transform duration-200",s&&"rotate-180")})]}),c.jsx(ue,{initial:!1,children:s&&c.jsx(F.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.2},className:"overflow-hidden",children:c.jsx("div",{className:"px-6 pb-5 pt-2 border-t border-border/40 text-sm text-muted-foreground leading-relaxed",children:t})})})]})},$a={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"},Wa={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)"}},zm=({title:e,description:t,variant:n="info",dismissible:s=!1,className:r})=>{const[o,i]=w.useState(!0),a=Wa[n]||Wa.info,l={success:c.jsx(Rt,{size:18,style:{color:a.title}}),error:c.jsx(mr,{size:18,style:{color:a.title}}),warning:c.jsx(Tn,{size:18,style:{color:a.title}}),info:c.jsx(Dt,{size:18,style:{color:a.title}})};return c.jsx(ue,{children:o&&c.jsxs(F.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",$a[n]||$a.info,r),children:[c.jsx("div",{className:"mt-0.5 shrink-0",children:l[n]||l.info}),c.jsxs("div",{className:"flex-1 space-y-1",children:[e&&c.jsx("h4",{style:{color:a.title},className:"font-bold text-sm leading-none",children:e}),t&&c.jsx("p",{style:{color:a.desc},className:"text-xs leading-relaxed font-medium",children:t})]}),s&&c.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:c.jsx(Ve,{size:14})})]})})},Ua={sm:"h-8 w-8 text-xs",md:"h-11 w-11 text-sm",lg:"h-14 w-14 text-base"},Ga={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"},Bm=({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 c.jsxs("div",{className:"relative inline-block shrink-0",children:[c.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",Ua[s]||Ua.md,o),children:e?c.jsx("img",{src:e,alt:t,className:"h-full w-full object-cover"}):c.jsx("span",{children:i||"?"})}),r&&Ga[r]&&c.jsx("span",{className:D("absolute bottom-0 right-0 block h-2.5 w-2.5 rounded-full ring-2 ring-background",Ga[r])})]})},Et=({children:e,className:t})=>c.jsx("div",{className:D("bg-card border border-border rounded-3xl p-6 transition-all duration-300",t),children:e}),Je=({label:e,error:t,icon:n,className:s,id:r,...o})=>c.jsxs("div",{className:D("space-y-1.5 w-full text-left",s),children:[e&&c.jsx("label",{htmlFor:r,className:"text-sm font-semibold text-foreground ml-1",children:e}),c.jsxs("div",{className:"relative group",children:[n&&c.jsx("div",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-muted-foreground group-focus-within:text-primary transition-colors",children:c.jsx(n,{size:18})}),c.jsx("input",{id:r,className:D("glass-input w-full",n&&"pl-11",t&&"ring-2 ring-destructive/50 border-destructive/50"),...o})]}),t&&c.jsx(F.p,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"text-xs text-destructive ml-1 font-medium",children:t})]}),be=({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 c.jsxs(F.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&&c.jsxs("svg",{className:"animate-spin h-5 w-5 text-current shrink-0",viewBox:"0 0 24 24",children:[c.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),c.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,c.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]"})]})},Gs=({checked:e=!1,onChange:t,label:n,className:s})=>c.jsxs("label",{className:D("inline-flex items-center gap-3 cursor-pointer select-none text-left",s),children:[c.jsxs("div",{className:"relative flex items-center",children:[c.jsx("input",{type:"checkbox",checked:e,onChange:r=>t&&t(r.target.checked),className:"sr-only"}),c.jsx(F.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:c.jsx(ue,{children:e&&c.jsx(F.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},transition:{type:"spring",stiffness:500,damping:30},children:c.jsx(Wl,{size:12,className:"text-primary-foreground stroke-[4px]"})})})})]}),n&&c.jsx("span",{className:"text-sm font-semibold text-foreground leading-none",children:n})]}),$m=({initialMode:e="login",onLogin:t,onRegister:n,onForgotPassword:s,logo:r=Kl,title:o="Ether UI Console",className:i})=>{const[a,l]=w.useState(e),[u,d]=w.useState(""),[f,h]=w.useState(""),[m,g]=w.useState(""),[p,y]=w.useState(!1),[v,b]=w.useState(!1),[x,j]=w.useState(!1),C=async N=>{N.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:v}):a==="forgot"&&s&&await s({email:f})}finally{j(!1)}};return c.jsxs("div",{className:D("min-h-screen w-full flex items-center justify-center p-6 relative bg-background overflow-hidden",i),children:[c.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"}),c.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"}),c.jsx("div",{className:"w-full max-w-md z-10",children:c.jsxs(ue,{mode:"wait",children:[a==="login"&&c.jsx(F.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},exit:{opacity:0,y:-15},transition:{duration:.25},children:c.jsxs(Et,{className:"p-8 space-y-6",children:[c.jsxs("div",{className:"text-center space-y-2",children:[c.jsx("div",{className:"inline-flex items-center justify-center p-3 rounded-2xl bg-primary/10 text-primary mb-2",children:c.jsx(r,{size:28,className:"animate-pulse"})}),c.jsx("h3",{className:"text-2xl font-extrabold tracking-tight text-foreground",children:o}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Welcome back! Sign in to manage your ledgers."})]}),c.jsxs("form",{onSubmit:C,className:"space-y-4",children:[c.jsx(Je,{label:"Email Address",type:"email",placeholder:"name@company.com",value:f,onChange:N=>h(N.target.value),required:!0}),c.jsx(Je,{label:"Password",type:"password",placeholder:"••••••••",value:m,onChange:N=>g(N.target.value),required:!0}),c.jsxs("div",{className:"flex items-center justify-between text-xs pt-1",children:[c.jsx(Gs,{label:"Remember me",checked:p,onChange:y}),c.jsx("button",{type:"button",onClick:()=>l("forgot"),className:"font-bold text-primary hover:underline cursor-pointer",children:"Forgot password?"})]}),c.jsx(be,{type:"submit",variant:"primary",loading:x,className:"w-full justify-center py-3 mt-2",children:"Sign In to Console"})]}),c.jsxs("div",{className:"text-center text-xs text-muted-foreground border-t border-border/40 pt-4",children:["Don't have an account?"," ",c.jsx("button",{type:"button",onClick:()=>l("register"),className:"font-bold text-primary hover:underline cursor-pointer",children:"Create one now"})]})]})},"login"),a==="register"&&c.jsx(F.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},exit:{opacity:0,y:-15},transition:{duration:.25},children:c.jsxs(Et,{className:"p-8 space-y-6",children:[c.jsxs("div",{className:"text-center space-y-2",children:[c.jsx("div",{className:"inline-flex items-center justify-center p-3 rounded-2xl bg-primary/10 text-primary mb-2",children:c.jsx(r,{size:28})}),c.jsx("h3",{className:"text-2xl font-extrabold tracking-tight text-foreground",children:"Create Account"}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Sign up to unlock real-time financial synchrony."})]}),c.jsxs("form",{onSubmit:C,className:"space-y-4",children:[c.jsx(Je,{label:"Full Name",type:"text",placeholder:"Alex Carter",value:u,onChange:N=>d(N.target.value),required:!0}),c.jsx(Je,{label:"Work Email",type:"email",placeholder:"alex@company.com",value:f,onChange:N=>h(N.target.value),required:!0}),c.jsx(Je,{label:"Choose Password",type:"password",placeholder:"••••••••",value:m,onChange:N=>g(N.target.value),required:!0}),c.jsx("div",{className:"flex items-start pt-1",children:c.jsx(Gs,{label:"I agree to the Terms & Conditions",checked:v,onChange:b})}),c.jsx(be,{type:"submit",variant:"primary",loading:x,className:"w-full justify-center py-3 mt-2",children:"Register Workspace"})]}),c.jsxs("div",{className:"text-center text-xs text-muted-foreground border-t border-border/40 pt-4",children:["Already have an account?"," ",c.jsx("button",{type:"button",onClick:()=>l("login"),className:"font-bold text-primary hover:underline cursor-pointer",children:"Sign in instead"})]})]})},"register"),a==="forgot"&&c.jsx(F.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},exit:{opacity:0,y:-15},transition:{duration:.25},children:c.jsxs(Et,{className:"p-8 space-y-6",children:[c.jsxs("div",{className:"space-y-2 text-left",children:[c.jsxs("button",{type:"button",onClick:()=>l("login"),className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground font-bold cursor-pointer transition-colors",children:[c.jsx(Bl,{size:12})," Back to Sign In"]}),c.jsx("h3",{className:"text-2xl font-extrabold tracking-tight text-foreground pt-2",children:"Recover Access"}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Enter your verified work email, and we will send a password restoration link."})]}),c.jsxs("form",{onSubmit:C,className:"space-y-4",children:[c.jsx(Je,{label:"Registered Email Address",type:"email",placeholder:"alex@company.com",value:f,onChange:N=>h(N.target.value),required:!0}),c.jsx(be,{type:"submit",variant:"primary",loading:x,className:"w-full justify-center py-3 pt-2",children:"Send Recovery Link"})]})]})},"forgot")]})})]})},Ha=({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 c.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})},Ka=({isOpen:e,onClose:t,title:n,children:s,className:r,width:o})=>c.jsx(ue,{children:e&&c.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[c.jsx(F.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:t,className:"absolute inset-0 bg-black/20 backdrop-blur-sm"}),c.jsxs(F.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:[c.jsxs("div",{className:"flex items-center justify-between px-7 py-5 border-b border-border shrink-0",children:[c.jsx("h3",{className:"text-xl font-bold text-foreground",children:n}),c.jsx("button",{onClick:t,className:"p-2 rounded-xl hover:bg-secondary text-muted-foreground hover:text-foreground transition-all cursor-pointer",children:c.jsx(Ve,{size:20})})]}),c.jsx("div",{className:"p-6 overflow-y-auto custom-scrollbar",children:s})]})]})}),Wm=({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:l=!1})=>c.jsx(Ka,{isOpen:e,onClose:t,title:s,className:"max-w-md",children:c.jsxs("div",{className:"space-y-6",children:[c.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:r}),c.jsxs("div",{className:"flex items-center justify-end gap-3",children:[c.jsx(be,{variant:"ghost",onClick:t,disabled:l,children:i}),c.jsx(be,{variant:a,onClick:n,loading:l,children:o})]})]})}),Um=({label:e,options:t=[],value:n,onChange:s,placeholder:r="Select option",className:o})=>{const[i,a]=w.useState(!1),l=w.useRef(null),u=t.find(d=>d.value===n);return w.useEffect(()=>{const d=f=>{l.current&&!l.current.contains(f.target)&&a(!1)};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[]),c.jsxs("div",{ref:l,className:D("space-y-1.5 w-full text-left relative",o),children:[e&&c.jsx("label",{className:"text-sm font-semibold text-foreground ml-1",children:e}),c.jsx("div",{children:c.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:[c.jsx("span",{className:D(!u&&"text-muted-foreground/60"),children:u?u.label:r}),c.jsx(hr,{size:18,className:D("text-muted-foreground transition-transform duration-200",i&&"rotate-180")})]})}),c.jsx(ue,{children:i&&c.jsx(F.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 c.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)})})})]})},Gm=({onFilesAdded:e,accept:t="*",maxFiles:n=5,maxSizeMB:s=10,className:r})=>{const[o,i]=w.useState(!1),[a,l]=w.useState([]),u=w.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}}),v=[...a,...y].slice(0,n);l(v),e&&e(v.map(b=>b.rawFile)),y.forEach(b=>{if(b.status==="failed")return;let x=0;const j=setInterval(()=>{x+=Math.floor(Math.random()*15)+5,x>=100?(x=100,clearInterval(j),l(C=>C.map(N=>N.id===b.id?{...N,progress:100,status:"success"}:N))):l(C=>C.map(N=>N.id===b.id?{...N,progress:x}:N))},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=>{l(a.filter(y=>y.id!==p))};return c.jsxs("div",{className:D("space-y-4 w-full text-left",r),children:[c.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:[c.jsx("input",{ref:u,type:"file",multiple:!0,accept:t,onChange:m,className:"hidden"}),c.jsx(F.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:c.jsx(Gl,{size:24})}),c.jsxs("div",{className:"text-center space-y-1",children:[c.jsx("p",{className:"text-sm font-bold text-foreground",children:o?"Drop files to stage them!":"Drag & Drop files here"}),c.jsxs("p",{className:"text-xs text-muted-foreground",children:["Or click to browse storage (Max ",n," files, limit ",s,"MB)"]})]})]}),c.jsx(ue,{children:a.length>0&&c.jsxs(F.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:[c.jsxs("div",{className:"flex items-center justify-between pb-2 border-b border-border/20",children:[c.jsxs("span",{className:"text-[10px] font-black uppercase tracking-widest text-muted-foreground",children:["Upload Queue (",a.length,")"]}),c.jsx("button",{onClick:()=>l([]),className:"text-[10px] font-bold text-destructive hover:underline",children:"Clear All"})]}),c.jsx("div",{className:"space-y-3 max-h-[220px] overflow-y-auto custom-scrollbar pr-1",children:a.map(p=>c.jsxs(F.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:[c.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[c.jsx("div",{className:"p-2 rounded-lg bg-card border border-border/20 text-muted-foreground shrink-0",children:c.jsx(Hl,{size:16})}),c.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[c.jsx("p",{className:"font-semibold text-foreground truncate",children:p.name}),c.jsx("span",{className:"text-[10px] text-muted-foreground shrink-0",children:p.size})]}),p.status==="uploading"&&c.jsx("div",{className:"w-full bg-secondary/50 rounded-full h-1 overflow-hidden",children:c.jsx(F.div,{className:"bg-primary h-full rounded-full",animate:{width:`${p.progress}%`},transition:{duration:.1}})}),p.status==="failed"&&c.jsx("p",{className:"text-[10px] font-bold text-destructive truncate",children:p.error}),p.status==="success"&&c.jsxs("p",{className:"text-[10px] font-bold text-primary flex items-center gap-1",children:[c.jsx(Rt,{size:10})," Upload complete!"]})]})]}),c.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:c.jsx(Ve,{size:14})})]},p.id))})]})})]})},Hm=({isOpen:e=!1,onClose:t,notifications:n=[],onClearAll:s,onDismiss:r,className:o})=>c.jsx(ue,{children:e&&c.jsxs(c.Fragment,{children:[c.jsx(F.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"}),c.jsxs(F.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:[c.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:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:"p-2 rounded-xl bg-primary/10 text-primary",children:c.jsx(fr,{size:18,className:"animate-bounce"})}),c.jsxs("div",{children:[c.jsx("h4",{className:"text-sm font-extrabold text-foreground",children:"Notifications"}),c.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Alert console logs"})]})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[n.length>0&&c.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:c.jsx(Ql,{size:16})}),c.jsx("button",{onClick:t,className:"p-2 hover:bg-secondary rounded-xl text-muted-foreground hover:text-foreground cursor-pointer transition-colors",children:c.jsx(Ve,{size:16})})]})]}),c.jsx("div",{className:"flex-1 overflow-y-auto custom-scrollbar p-4 space-y-3",children:c.jsx(ue,{initial:!1,children:n.length===0?c.jsxs(F.div,{initial:{opacity:0},animate:{opacity:1},className:"h-full flex flex-col items-center justify-center text-center gap-3 py-12",children:[c.jsx("div",{className:"p-4 rounded-full bg-secondary/40 text-muted-foreground",children:c.jsx(fr,{size:32,className:"opacity-50"})}),c.jsxs("div",{className:"space-y-1",children:[c.jsx("p",{className:"text-xs font-bold text-foreground",children:"Zero unread notifications"}),c.jsx("p",{className:"text-[10px] text-muted-foreground",children:"All operational tasks succeeded!"})]})]}):n.map(i=>{const a=i.type==="success",l=i.type==="warning";return c.jsxs(F.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&&c.jsxs("span",{className:"absolute top-3.5 right-3.5 flex h-2 w-2",children:[c.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),c.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),c.jsxs("div",{className:D("p-2 rounded-xl shrink-0 border border-border/10",a&&"bg-emerald-500/10 text-emerald-500",l&&"bg-amber-500/10 text-amber-500",!a&&!l&&"bg-sky-500/10 text-sky-500"),children:[a&&c.jsx(Rt,{size:16}),l&&c.jsx(Tn,{size:16}),!a&&!l&&c.jsx(Dt,{size:16})]}),c.jsxs("div",{className:"flex-1 space-y-1.5 pr-4 text-left",children:[c.jsxs("div",{className:"space-y-0.5",children:[c.jsx("p",{className:"font-bold text-foreground",children:i.title}),c.jsx("span",{className:"text-[9px] text-muted-foreground font-medium",children:i.timestamp})]}),c.jsx("p",{className:"text-muted-foreground text-[11px] leading-relaxed",children:i.description})]}),c.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:c.jsx(Ve,{size:12})})]},i.id)})})})]})]})}),Km=({currentPage:e=1,totalPages:t=1,onPageChange:n,loading:s=!1})=>{if(t<=1)return null;const o=((i,a)=>a<=5?Array.from({length:a},(l,u)=>u+1):i<=3?[1,2,3,4,"...",a]:i>=a-2?[1,"...",a-3,a-2,a-1,a]:[1,"...",i-1,i,i+1,"...",a])(e,t);return c.jsxs("div",{className:"flex items-center justify-between py-2 mt-6 w-full",children:[c.jsxs("div",{className:"flex-1 flex justify-between sm:hidden",children:[c.jsx(be,{variant:"outline",className:"text-foreground font-semibold",onClick:()=>n(e-1),disabled:e===1||s,children:"Previous"}),c.jsx(be,{variant:"outline",className:"text-foreground font-semibold",onClick:()=>n(e+1),disabled:e===t||s,children:"Next"})]}),c.jsxs("div",{className:"hidden sm:flex-1 sm:flex sm:items-center sm:justify-between",children:[c.jsx("div",{children:c.jsxs("p",{className:"text-xs text-muted-foreground",children:["Page ",c.jsx("span",{className:"font-bold text-foreground",children:e})," of"," ",c.jsx("span",{className:"font-bold text-foreground",children:t})]})}),c.jsx("div",{children:c.jsxs("nav",{className:"relative z-0 inline-flex gap-1.5 rounded-md shadow-sm","aria-label":"Pagination",children:[c.jsxs(be,{variant:"outline",className:"p-2.5 rounded-xl shrink-0 text-foreground",onClick:()=>n(e-1),disabled:e===1||s,children:[c.jsx("span",{className:"sr-only",children:"Previous"}),c.jsx(Sn,{size:16})]}),o.map((i,a)=>{if(i==="...")return c.jsx("div",{className:"flex items-end justify-center px-1 pb-1",children:c.jsx("span",{className:"text-muted-foreground tracking-widest leading-none font-bold",children:"..."})},`dots-${a}`);const l=e===i;return c.jsx(be,{variant:l?"primary":"outline",className:`w-10 h-10 p-0 rounded-xl shrink-0 font-mono text-xs font-semibold ${l?"":"text-muted-foreground hover:text-foreground"}`,onClick:()=>n(i),disabled:s,children:i},i)}),c.jsxs(be,{variant:"outline",className:"p-2.5 rounded-xl shrink-0 text-foreground",onClick:()=>n(e+1),disabled:e===t||s,children:[c.jsx("span",{className:"sr-only",children:"Next"}),c.jsx(ht,{size:16})]})]})})]})]})},Ym=({children:e,content:t})=>{const[n,s]=w.useState(!1),[r,o]=w.useState({x:0,y:0}),i=w.useRef(null),a=()=>{if(i.current){const d=i.current.getBoundingClientRect();o({x:d.left+d.width/2,y:d.top+window.scrollY-8})}};w.useEffect(()=>(n&&(a(),window.addEventListener("scroll",a),window.addEventListener("resize",a)),()=>{window.removeEventListener("scroll",a),window.removeEventListener("resize",a)}),[n]);const l=()=>{t&&s(!0)},u=()=>{s(!1)};return c.jsxs("div",{ref:i,onMouseEnter:l,onMouseLeave:u,className:"inline-block w-full",children:[e,n&&t&&typeof window<"u"&&Al.createPortal(c.jsx(ue,{children:c.jsxs(F.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,c.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)]})},qm=({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),l=i-a/100*i;return c.jsxs("div",{className:D("relative inline-flex items-center justify-center",r),style:{width:t,height:t},children:[c.jsxs("svg",{className:"transform -rotate-90",width:t,height:t,children:[c.jsx("circle",{className:"text-secondary/50",stroke:"currentColor",strokeWidth:n,fill:"transparent",r:o,cx:t/2,cy:t/2}),c.jsx("circle",{className:"text-primary transition-all duration-500 ease-out",stroke:"currentColor",strokeWidth:n,strokeDasharray:i,strokeDashoffset:l,strokeLinecap:"round",fill:"transparent",r:o,cx:t/2,cy:t/2})]}),s&&c.jsxs("span",{className:"absolute text-[10px] font-mono font-bold text-foreground",children:[Math.round(a),"%"]})]})},Xm=({checked:e=!1,onChange:t,label:n,name:s,value:r,className:o})=>c.jsxs("label",{className:D("inline-flex items-center gap-3 cursor-pointer select-none text-left",o),children:[c.jsxs("div",{className:"relative flex items-center",children:[c.jsx("input",{type:"radio",name:s,value:r,checked:e,onChange:()=>t&&t(r),className:"sr-only"}),c.jsx(F.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:c.jsx(ue,{children:e&&c.jsx(F.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&&c.jsx("span",{className:"text-sm font-semibold text-foreground leading-none",children:n})]});/**
171
- * react-router v7.15.1
172
- *
173
- * Copyright (c) Remix Software Inc.
174
- *
175
- * This source code is licensed under the MIT license found in the
176
- * LICENSE.md file in the root directory of this source tree.
177
- *
178
- * @license MIT
179
- */function ce(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ae(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Hs({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Ks(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let s=e.indexOf("?");s>=0&&(t.search=e.substring(s),e=e.substring(0,s)),e&&(t.pathname=e)}return t}function Ya(e,t,n="/"){return Zm(e,t,n,!1)}function Zm(e,t,n,s,r){let o=typeof t=="string"?Ks(t):t,i=We(o.pathname||"/",n);if(i==null)return null;let a=Jm(e),l=null,u=up(i);for(let d=0;l==null&&d<a.length;++d)l=lp(a[d],u,s);return l}function Jm(e){let t=qa(e);return Qm(t),t}function qa(e,t=[],n=[],s="",r=!1){let o=(i,a,l=r,u)=>{let d={relativePath:u===void 0?i.path||"":u,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};if(d.relativePath.startsWith("/")){if(!d.relativePath.startsWith(s)&&l)return;ce(d.relativePath.startsWith(s),`Absolute route path "${d.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(s.length)}let f=ve([s,d.relativePath]),h=n.concat(d);i.children&&i.children.length>0&&(ce(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),qa(i.children,t,h,f,l)),!(i.path==null&&!i.index)&&t.push({path:f,score:op(f,i.index),routesMeta:h})};return e.forEach((i,a)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))o(i,a);else for(let u of Xa(i.path))o(i,a,!0,u)}),t}function Xa(e){let t=e.split("/");if(t.length===0)return[];let[n,...s]=t,r=n.endsWith("?"),o=n.replace(/\?$/,"");if(s.length===0)return r?[o,""]:[o];let i=Xa(s.join("/")),a=[];return a.push(...i.map(l=>l===""?o:[o,l].join("/"))),r&&a.push(...i),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function Qm(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:ap(t.routesMeta.map(s=>s.childrenIndex),n.routesMeta.map(s=>s.childrenIndex)))}var ep=/^:[\w-]+$/,tp=3,np=2,sp=1,rp=10,ip=-2,Za=e=>e==="*";function op(e,t){let n=e.split("/"),s=n.length;return n.some(Za)&&(s+=ip),t&&(s+=np),n.filter(r=>!Za(r)).reduce((r,o)=>r+(ep.test(o)?tp:o===""?sp:rp),s)}function ap(e,t){return e.length===t.length&&e.slice(0,-1).every((s,r)=>s===t[r])?e[e.length-1]-t[t.length-1]:0}function lp(e,t,n=!1){let{routesMeta:s}=e,r={},o="/",i=[];for(let a=0;a<s.length;++a){let l=s[a],u=a===s.length-1,d=o==="/"?t:t.slice(o.length)||"/",f=dn({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),h=l.route;if(!f&&u&&n&&!s[s.length-1].route.index&&(f=dn({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!f)return null;Object.assign(r,f.params),i.push({params:r,pathname:ve([o,f.pathname]),pathnameBase:mp(ve([o,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(o=ve([o,f.pathnameBase]))}return i}function dn(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,s]=cp(e.path,e.caseSensitive,e.end),r=t.match(n);if(!r)return null;let o=r[0],i=o.replace(/(.)\/+$/,"$1"),a=r.slice(1);return{params:s.reduce((u,{paramName:d,isOptional:f},h)=>{if(d==="*"){let g=a[h]||"";i=o.slice(0,o.length-g.length).replace(/(.)\/+$/,"$1")}const m=a[h];return f&&!m?u[d]=void 0:u[d]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function cp(e,t=!1,n=!0){Ae(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let s=[],r="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,a,l,u,d)=>{if(s.push({paramName:a,isOptional:l!=null}),l){let f=d.charAt(u+i.length);return f&&f!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(s.push({paramName:"*"}),r+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?r+="\\/*$":e!==""&&e!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,t?void 0:"i"),s]}function up(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ae(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function We(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,s=e.charAt(n);return s&&s!=="/"?null:e.slice(n)||"/"}var dp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function fp(e,t="/"){let{pathname:n,search:s="",hash:r=""}=typeof e=="string"?Ks(e):e,o;return n?(n=el(n),n.startsWith("/")?o=Ja(n.substring(1),"/"):o=Ja(n,t)):o=t,{pathname:o,search:pp(s),hash:gp(r)}}function Ja(e,t){let n=fn(t).split("/");return e.split("/").forEach(r=>{r===".."?n.length>1&&n.pop():r!=="."&&n.push(r)}),n.length>1?n.join("/"):"/"}function Ys(e,t,n,s){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function hp(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Qa(e){let t=hp(e);return t.map((n,s)=>s===t.length-1?n.pathname:n.pathnameBase)}function qs(e,t,n,s=!1){let r;typeof e=="string"?r=Ks(e):(r={...e},ce(!r.pathname||!r.pathname.includes("?"),Ys("?","pathname","search",r)),ce(!r.pathname||!r.pathname.includes("#"),Ys("#","pathname","hash",r)),ce(!r.search||!r.search.includes("#"),Ys("#","search","hash",r)));let o=e===""||r.pathname==="",i=o?"/":r.pathname,a;if(i==null)a=n;else{let f=t.length-1;if(!s&&i.startsWith("..")){let h=i.split("/");for(;h[0]==="..";)h.shift(),f-=1;r.pathname=h.join("/")}a=f>=0?t[f]:"/"}let l=fp(r,a),u=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}var el=e=>e.replace(/\/\/+/g,"/"),ve=e=>el(e.join("/")),fn=e=>e.replace(/\/+$/,""),mp=e=>fn(e).replace(/^\/*/,"/"),pp=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,gp=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,yp=class{constructor(e,t,n,s=!1){this.status=e,this.statusText=t||"",this.internal=s,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function xp(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function bp(e){let t=e.map(n=>n.route.path).filter(Boolean);return ve(t)||"/"}var tl=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function nl(e,t){let n=e;if(typeof n!="string"||!dp.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let s=n,r=!1;if(tl)try{let o=new URL(window.location.href),i=n.startsWith("//")?new URL(o.protocol+n):new URL(n),a=We(i.pathname,t);i.origin===o.origin&&a!=null?n=a+i.search+i.hash:r=!0}catch{Ae(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:r,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var sl=["POST","PUT","PATCH","DELETE"];new Set(sl);var vp=["GET",...sl];new Set(vp);var ut=S.createContext(null);ut.displayName="DataRouter";var hn=S.createContext(null);hn.displayName="DataRouterState";var rl=S.createContext(!1);function wp(){return S.useContext(rl)}var il=S.createContext({isTransitioning:!1});il.displayName="ViewTransition";var kp=S.createContext(new Map);kp.displayName="Fetchers";var Sp=S.createContext(null);Sp.displayName="Await";var we=S.createContext(null);we.displayName="Navigation";var Xs=S.createContext(null);Xs.displayName="Location";var Me=S.createContext({outlet:null,matches:[],isDataRoute:!1});Me.displayName="Route";var Zs=S.createContext(null);Zs.displayName="RouteError";var ol="REACT_ROUTER_ERROR",Tp="REDIRECT",jp="ROUTE_ERROR_RESPONSE";function Cp(e){if(e.startsWith(`${ol}:${Tp}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function Np(e){if(e.startsWith(`${ol}:${jp}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new yp(t.status,t.statusText,t.data)}catch{}}function Ep(e,{relative:t}={}){ce(mn(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:s}=S.useContext(we),{hash:r,pathname:o,search:i}=Pt(e,{relative:t}),a=o;return n!=="/"&&(a=o==="/"?n:ve([n,o])),s.createHref({pathname:a,search:i,hash:r})}function mn(){return S.useContext(Xs)!=null}function Re(){return ce(mn(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(Xs).location}var al="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ll(e){S.useContext(we).static||S.useLayoutEffect(e)}function Pp(){let{isDataRoute:e}=S.useContext(Me);return e?$p():Ap()}function Ap(){ce(mn(),"useNavigate() may be used only in the context of a <Router> component.");let e=S.useContext(ut),{basename:t,navigator:n}=S.useContext(we),{matches:s}=S.useContext(Me),{pathname:r}=Re(),o=JSON.stringify(Qa(s)),i=S.useRef(!1);return ll(()=>{i.current=!0}),S.useCallback((l,u={})=>{if(Ae(i.current,al),!i.current)return;if(typeof l=="number"){n.go(l);return}let d=qs(l,JSON.parse(o),r,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:ve([t,d.pathname])),(u.replace?n.replace:n.push)(d,u.state,u)},[t,n,o,r,e])}S.createContext(null);function Pt(e,{relative:t}={}){let{matches:n}=S.useContext(Me),{pathname:s}=Re(),r=JSON.stringify(Qa(n));return S.useMemo(()=>qs(e,JSON.parse(r),s,t==="path"),[e,r,s,t])}function Mp(e,t,n){ce(mn(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=S.useContext(we),{matches:r}=S.useContext(Me),o=r[r.length-1],i=o?o.params:{},a=o?o.pathname:"/",l=o?o.pathnameBase:"/",u=o&&o.route;{let y=u&&u.path||"";dl(a,!u||y.endsWith("*")||y.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${a}" (under <Route path="${y}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
180
-
181
- Please change the parent <Route path="${y}"> to <Route path="${y==="/"?"*":`${y}/*`}">.`)}let d=Re(),f;f=d;let h=f.pathname||"/",m=h;if(l!=="/"){let y=l.replace(/^\//,"").split("/");m="/"+h.replace(/^\//,"").split("/").slice(y.length).join("/")}let g=n&&n.state.matches.length?n.state.matches.map(y=>Object.assign(y,{route:n.manifest[y.route.id]||y.route})):Ya(e,{pathname:m});return Ae(u||g!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),Ae(g==null||g[g.length-1].route.element!==void 0||g[g.length-1].route.Component!==void 0||g[g.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),Ip(g&&g.map(y=>Object.assign({},y,{params:Object.assign({},i,y.params),pathname:ve([l,s.encodeLocation?s.encodeLocation(y.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?l:ve([l,s.encodeLocation?s.encodeLocation(y.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathnameBase])})),r,n)}function Rp(){let e=Bp(),t=xp(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s="rgba(200,200,200, 0.5)",r={padding:"0.5rem",backgroundColor:s},o={padding:"2px 4px",backgroundColor:s},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:o},"ErrorBoundary")," or"," ",S.createElement("code",{style:o},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},t),n?S.createElement("pre",{style:r},n):null,i)}var Dp=S.createElement(Rp,null),cl=class extends S.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=Np(e.digest);n&&(e=n)}let t=e!==void 0?S.createElement(Me.Provider,{value:this.props.routeContext},S.createElement(Zs.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?S.createElement(Vp,{error:e},t):t}};cl.contextType=rl;var Js=new WeakMap;function Vp({children:e,error:t}){let{basename:n}=S.useContext(we);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let s=Cp(t.digest);if(s){let r=Js.get(t);if(r)throw r;let o=nl(s.location,n);if(tl&&!Js.get(t))if(o.isExternal||s.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const i=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:s.replace}));throw Js.set(t,i),i}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function Lp({routeContext:e,match:t,children:n}){let s=S.useContext(ut);return s&&s.static&&s.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=t.route.id),S.createElement(Me.Provider,{value:e},n)}function Ip(e,t=[],n){let s=n==null?void 0:n.state;if(e==null){if(!s)return null;if(s.errors)e=s.matches;else if(t.length===0&&!s.initialized&&s.matches.length>0)e=s.matches;else return null}let r=e,o=s==null?void 0:s.errors;if(o!=null){let d=r.findIndex(f=>f.route.id&&(o==null?void 0:o[f.route.id])!==void 0);ce(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),r=r.slice(0,Math.min(r.length,d+1))}let i=!1,a=-1;if(n&&s){i=s.renderFallback;for(let d=0;d<r.length;d++){let f=r[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(a=d),f.route.id){let{loaderData:h,errors:m}=s,g=f.route.loader&&!h.hasOwnProperty(f.route.id)&&(!m||m[f.route.id]===void 0);if(f.route.lazy||g){n.isStatic&&(i=!0),a>=0?r=r.slice(0,a+1):r=[r[0]];break}}}}let l=n==null?void 0:n.onError,u=s&&l?(d,f)=>{var h,m;l(d,{location:s.location,params:((m=(h=s.matches)==null?void 0:h[0])==null?void 0:m.params)??{},pattern:bp(s.matches),errorInfo:f})}:void 0;return r.reduceRight((d,f,h)=>{let m,g=!1,p=null,y=null;s&&(m=o&&f.route.id?o[f.route.id]:void 0,p=f.route.errorElement||Dp,i&&(a<0&&h===0?(dl("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),g=!0,y=null):a===h&&(g=!0,y=f.route.hydrateFallbackElement||null)));let v=t.concat(r.slice(0,h+1)),b=()=>{let x;return m?x=p:g?x=y:f.route.Component?x=S.createElement(f.route.Component,null):f.route.element?x=f.route.element:x=d,S.createElement(Lp,{match:f,routeContext:{outlet:d,matches:v,isDataRoute:s!=null},children:x})};return s&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?S.createElement(cl,{location:s.location,revalidation:s.revalidation,component:p,error:m,children:b(),routeContext:{outlet:null,matches:v,isDataRoute:!0},onError:u}):b()},null)}function Qs(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function _p(e){let t=S.useContext(ut);return ce(t,Qs(e)),t}function Op(e){let t=S.useContext(hn);return ce(t,Qs(e)),t}function Fp(e){let t=S.useContext(Me);return ce(t,Qs(e)),t}function er(e){let t=Fp(e),n=t.matches[t.matches.length-1];return ce(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function zp(){return er("useRouteId")}function Bp(){var s;let e=S.useContext(Zs),t=Op("useRouteError"),n=er("useRouteError");return e!==void 0?e:(s=t.errors)==null?void 0:s[n]}function $p(){let{router:e}=_p("useNavigate"),t=er("useNavigate"),n=S.useRef(!1);return ll(()=>{n.current=!0}),S.useCallback(async(r,o={})=>{Ae(n.current,al),n.current&&(typeof r=="number"?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...o}))},[e,t])}var ul={};function dl(e,t,n){!t&&!ul[e]&&(ul[e]=!0,Ae(!1,n))}S.memo(Wp);function Wp({routes:e,manifest:t,future:n,state:s,isStatic:r,onError:o}){return Mp(e,void 0,{manifest:t,state:s,isStatic:r,onError:o})}var pn="get",gn="application/x-www-form-urlencoded";function yn(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Up(e){return yn(e)&&e.tagName.toLowerCase()==="button"}function Gp(e){return yn(e)&&e.tagName.toLowerCase()==="form"}function Hp(e){return yn(e)&&e.tagName.toLowerCase()==="input"}function Kp(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Yp(e,t){return e.button===0&&(!t||t==="_self")&&!Kp(e)}var xn=null;function qp(){if(xn===null)try{new FormData(document.createElement("form"),0),xn=!1}catch{xn=!0}return xn}var Xp=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function tr(e){return e!=null&&!Xp.has(e)?(Ae(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${gn}"`),null):e}function Zp(e,t){let n,s,r,o,i;if(Gp(e)){let a=e.getAttribute("action");s=a?We(a,t):null,n=e.getAttribute("method")||pn,r=tr(e.getAttribute("enctype"))||gn,o=new FormData(e)}else if(Up(e)||Hp(e)&&(e.type==="submit"||e.type==="image")){let a=e.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||a.getAttribute("action");if(s=l?We(l,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||pn,r=tr(e.getAttribute("formenctype"))||tr(a.getAttribute("enctype"))||gn,o=new FormData(a,e),!qp()){let{name:u,type:d,value:f}=e;if(d==="image"){let h=u?`${u}.`:"";o.append(`${h}x`,"0"),o.append(`${h}y`,"0")}else u&&o.append(u,f)}}else{if(yn(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=pn,s=null,r=gn,i=e}return o&&r==="text/plain"&&(i=o,o=void 0),{action:s,method:n.toLowerCase(),encType:r,formData:o,body:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function nr(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function fl(e,t,n,s){let r=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?r.pathname.endsWith("/")?r.pathname=`${r.pathname}_.${s}`:r.pathname=`${r.pathname}.${s}`:r.pathname==="/"?r.pathname=`_root.${s}`:t&&We(r.pathname,t)==="/"?r.pathname=`${fn(t)}/_root.${s}`:r.pathname=`${fn(r.pathname)}.${s}`,r}async function Jp(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Qp(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function eg(e,t,n){let s=await Promise.all(e.map(async r=>{let o=t.routes[r.route.id];if(o){let i=await Jp(o,n);return i.links?i.links():[]}return[]}));return rg(s.flat(1).filter(Qp).filter(r=>r.rel==="stylesheet"||r.rel==="preload").map(r=>r.rel==="stylesheet"?{...r,rel:"prefetch",as:"style"}:{...r,rel:"prefetch"}))}function hl(e,t,n,s,r,o){let i=(l,u)=>n[u]?l.route.id!==n[u].route.id:!0,a=(l,u)=>{var d;return n[u].pathname!==l.pathname||((d=n[u].route.path)==null?void 0:d.endsWith("*"))&&n[u].params["*"]!==l.params["*"]};return o==="assets"?t.filter((l,u)=>i(l,u)||a(l,u)):o==="data"?t.filter((l,u)=>{var f;let d=s.routes[l.route.id];if(!d||!d.hasLoader)return!1;if(i(l,u)||a(l,u))return!0;if(l.route.shouldRevalidate){let h=l.route.shouldRevalidate({currentUrl:new URL(r.pathname+r.search+r.hash,window.origin),currentParams:((f=n[0])==null?void 0:f.params)||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function tg(e,t,{includeHydrateFallback:n}={}){return ng(e.map(s=>{let r=t.routes[s.route.id];if(!r)return[];let o=[r.module];return r.clientActionModule&&(o=o.concat(r.clientActionModule)),r.clientLoaderModule&&(o=o.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(o=o.concat(r.hydrateFallbackModule)),r.imports&&(o=o.concat(r.imports)),o}).flat(1))}function ng(e){return[...new Set(e)]}function sg(e){let t={},n=Object.keys(e).sort();for(let s of n)t[s]=e[s];return t}function rg(e,t){let n=new Set;return new Set(t),e.reduce((s,r)=>{let o=JSON.stringify(sg(r));return n.has(o)||(n.add(o),s.push({key:o,link:r})),s},[])}function sr(){let e=S.useContext(ut);return nr(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function ig(){let e=S.useContext(hn);return nr(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var rr=S.createContext(void 0);rr.displayName="FrameworkContext";function ir(){let e=S.useContext(rr);return nr(e,"You must render this element inside a <HydratedRouter> element"),e}function og(e,t){let n=S.useContext(rr),[s,r]=S.useState(!1),[o,i]=S.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,h=S.useRef(null);S.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let p=v=>{v.forEach(b=>{i(b.isIntersecting)})},y=new IntersectionObserver(p,{threshold:.5});return h.current&&y.observe(h.current),()=>{y.disconnect()}}},[e]),S.useEffect(()=>{if(s){let p=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(p)}}},[s]);let m=()=>{r(!0)},g=()=>{r(!1),i(!1)};return n?e!=="intent"?[o,h,{}]:[o,h,{onFocus:At(a,m),onBlur:At(l,g),onMouseEnter:At(u,m),onMouseLeave:At(d,g),onTouchStart:At(f,m)}]:[!1,h,{}]}function At(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function ag({page:e,...t}){let n=wp(),{router:s}=sr(),r=S.useMemo(()=>Ya(s.routes,e,s.basename),[s.routes,e,s.basename]);return r?n?S.createElement(cg,{page:e,matches:r,...t}):S.createElement(ug,{page:e,matches:r,...t}):null}function lg(e){let{manifest:t,routeModules:n}=ir(),[s,r]=S.useState([]);return S.useEffect(()=>{let o=!1;return eg(e,t,n).then(i=>{o||r(i)}),()=>{o=!0}},[e,t,n]),s}function cg({page:e,matches:t,...n}){let s=Re(),{future:r}=ir(),{basename:o}=sr(),i=S.useMemo(()=>{if(e===s.pathname+s.search+s.hash)return[];let a=fl(e,o,r.unstable_trailingSlashAwareDataRequests,"rsc"),l=!1,u=[];for(let d of t)typeof d.route.shouldRevalidate=="function"?l=!0:u.push(d.route.id);return l&&u.length>0&&a.searchParams.set("_routes",u.join(",")),[a.pathname+a.search]},[o,r.unstable_trailingSlashAwareDataRequests,e,s,t]);return S.createElement(S.Fragment,null,i.map(a=>S.createElement("link",{key:a,rel:"prefetch",as:"fetch",href:a,...n})))}function ug({page:e,matches:t,...n}){let s=Re(),{future:r,manifest:o,routeModules:i}=ir(),{basename:a}=sr(),{loaderData:l,matches:u}=ig(),d=S.useMemo(()=>hl(e,t,u,o,s,"data"),[e,t,u,o,s]),f=S.useMemo(()=>hl(e,t,u,o,s,"assets"),[e,t,u,o,s]),h=S.useMemo(()=>{if(e===s.pathname+s.search+s.hash)return[];let p=new Set,y=!1;if(t.forEach(b=>{var j;let x=o.routes[b.route.id];!x||!x.hasLoader||(!d.some(C=>C.route.id===b.route.id)&&b.route.id in l&&((j=i[b.route.id])!=null&&j.shouldRevalidate)||x.hasClientLoader?y=!0:p.add(b.route.id))}),p.size===0)return[];let v=fl(e,a,r.unstable_trailingSlashAwareDataRequests,"data");return y&&p.size>0&&v.searchParams.set("_routes",t.filter(b=>p.has(b.route.id)).map(b=>b.route.id).join(",")),[v.pathname+v.search]},[a,r.unstable_trailingSlashAwareDataRequests,l,s,o,d,t,e,i]),m=S.useMemo(()=>tg(f,o),[f,o]),g=lg(f);return S.createElement(S.Fragment,null,h.map(p=>S.createElement("link",{key:p,rel:"prefetch",as:"fetch",href:p,...n})),m.map(p=>S.createElement("link",{key:p,rel:"modulepreload",href:p,...n})),g.map(({key:p,link:y})=>S.createElement("link",{key:p,nonce:n.nonce,...y,crossOrigin:y.crossOrigin??n.crossOrigin})))}function dg(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var fg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{fg&&(window.__reactRouterVersion="7.15.1")}catch{}var ml=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,pl=S.forwardRef(function({onClick:t,discover:n="render",prefetch:s="none",relative:r,reloadDocument:o,replace:i,mask:a,state:l,target:u,to:d,preventScrollReset:f,viewTransition:h,defaultShouldRevalidate:m,...g},p){let{basename:y,navigator:v,useTransitions:b}=S.useContext(we),x=typeof d=="string"&&ml.test(d),j=nl(d,y);d=j.to;let C=Ep(d,{relative:r}),N=Re(),I=null;if(a){let B=qs(a,[],N.mask?N.mask.pathname:"/",!0);y!=="/"&&(B.pathname=B.pathname==="/"?y:ve([y,B.pathname])),I=v.createHref(B)}let[k,M,V]=og(s,g),z=pg(d,{replace:i,mask:a,state:l,target:u,preventScrollReset:f,relative:r,viewTransition:h,defaultShouldRevalidate:m,useTransitions:b});function $(B){t&&t(B),B.defaultPrevented||z(B)}let oe=!(j.isExternal||o),se=S.createElement("a",{...g,...V,href:(oe?I:void 0)||j.absoluteURL||C,onClick:oe?$:t,ref:dg(p,M),target:u,"data-discover":!x&&n==="render"?"true":void 0});return k&&!x?S.createElement(S.Fragment,null,se,S.createElement(ag,{page:C})):se});pl.displayName="Link";var gl=S.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:s="",end:r=!1,style:o,to:i,viewTransition:a,children:l,...u},d){let f=Pt(i,{relative:u.relative}),h=Re(),m=S.useContext(hn),{navigator:g,basename:p}=S.useContext(we),y=m!=null&&vg(f)&&a===!0,v=g.encodeLocation?g.encodeLocation(f).pathname:f.pathname,b=h.pathname,x=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;n||(b=b.toLowerCase(),x=x?x.toLowerCase():null,v=v.toLowerCase()),x&&p&&(x=We(x,p)||x);const j=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let C=b===v||!r&&b.startsWith(v)&&b.charAt(j)==="/",N=x!=null&&(x===v||!r&&x.startsWith(v)&&x.charAt(v.length)==="/"),I={isActive:C,isPending:N,isTransitioning:y},k=C?t:void 0,M;typeof s=="function"?M=s(I):M=[s,C?"active":null,N?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let V=typeof o=="function"?o(I):o;return S.createElement(pl,{...u,"aria-current":k,className:M,ref:d,style:V,to:i,viewTransition:a},typeof l=="function"?l(I):l)});gl.displayName="NavLink";var hg=S.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:s,replace:r,state:o,method:i=pn,action:a,onSubmit:l,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:h,...m},g)=>{let{useTransitions:p}=S.useContext(we),y=xg(),v=bg(a,{relative:u}),b=i.toLowerCase()==="get"?"get":"post",x=typeof a=="string"&&ml.test(a),j=C=>{if(l&&l(C),C.defaultPrevented)return;C.preventDefault();let N=C.nativeEvent.submitter,I=(N==null?void 0:N.getAttribute("formmethod"))||i,k=()=>y(N||C.currentTarget,{fetcherKey:t,method:I,navigate:n,replace:r,state:o,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:h});p&&n!==!1?S.startTransition(()=>k()):k()};return S.createElement("form",{ref:g,method:b,action:v,onSubmit:s?l:j,...m,"data-discover":!x&&e==="render"?"true":void 0})});hg.displayName="Form";function mg(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function yl(e){let t=S.useContext(ut);return ce(t,mg(e)),t}function pg(e,{target:t,replace:n,mask:s,state:r,preventScrollReset:o,relative:i,viewTransition:a,defaultShouldRevalidate:l,useTransitions:u}={}){let d=Pp(),f=Re(),h=Pt(e,{relative:i});return S.useCallback(m=>{if(Yp(m,t)){m.preventDefault();let g=n!==void 0?n:Hs(f)===Hs(h),p=()=>d(e,{replace:g,mask:s,state:r,preventScrollReset:o,relative:i,viewTransition:a,defaultShouldRevalidate:l});u?S.startTransition(()=>p()):p()}},[f,d,h,n,s,r,t,e,o,i,a,l,u])}var gg=0,yg=()=>`__${String(++gg)}__`;function xg(){let{router:e}=yl("useSubmit"),{basename:t}=S.useContext(we),n=zp(),s=e.fetch,r=e.navigate;return S.useCallback(async(o,i={})=>{let{action:a,method:l,encType:u,formData:d,body:f}=Zp(o,t);if(i.navigate===!1){let h=i.fetcherKey||yg();await s(h,n,i.action||a,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:d,body:f,formMethod:i.method||l,formEncType:i.encType||u,flushSync:i.flushSync})}else await r(i.action||a,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:d,body:f,formMethod:i.method||l,formEncType:i.encType||u,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[s,r,t,n])}function bg(e,{relative:t}={}){let{basename:n}=S.useContext(we),s=S.useContext(Me);ce(s,"useFormAction must be used inside a RouteContext");let[r]=s.matches.slice(-1),o={...Pt(e||".",{relative:t})},i=Re();if(e==null){o.search=i.search;let a=new URLSearchParams(o.search),l=a.getAll("index");if(l.some(d=>d==="")){a.delete("index"),l.filter(f=>f).forEach(f=>a.append("index",f));let d=a.toString();o.search=d?`?${d}`:""}}return(!e||e===".")&&r.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:ve([n,o.pathname])),Hs(o)}function vg(e,{relative:t}={}){let n=S.useContext(il);ce(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=yl("useViewTransitionState"),r=Pt(e,{relative:t});if(!n.isTransitioning)return!1;let o=We(n.currentLocation.pathname,s)||n.currentLocation.pathname,i=We(n.nextLocation.pathname,s)||n.nextLocation.pathname;return dn(r.pathname,i)!=null||dn(r.pathname,o)!=null}const xl=w.createContext(),wg=({children:e,defaultTheme:t="light"})=>{const[n,s]=w.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});w.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 c.jsx(xl.Provider,{value:{isDark:n,toggleTheme:r,setIsDark:s},children:e})},bl=()=>{const e=w.useContext(xl);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e},kg=({collapsed:e=!1,onToggle:t,logo:n,title:s="RenderLoom",children:r,footer:o,className:i,showMobileToggle:a=!0,onLogout:l})=>{const[u,d]=w.useState(!1),[f,h]=w.useState(!e);w.useEffect(()=>{h(!e)},[e]),w.useEffect(()=>{const x=()=>{const j=window.innerWidth<768;d(j),j||h(!1)};return x(),window.addEventListener("resize",x),()=>window.removeEventListener("resize",x)},[]);const m=()=>{if(u){const x=!f;h(x),t&&t(!x)}else t&&t(!e)},g=()=>{u&&(h(!1),t&&t(!0))};let p=!1,y=()=>{},v=!1;try{const x=bl();x&&(p=x.isDark,y=x.toggleTheme,v=!0)}catch{}const b=u?!f:e;return c.jsxs(c.Fragment,{children:[u&&a&&c.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:[c.jsxs("div",{className:"flex items-center gap-3",children:[n&&c.jsx("div",{className:"text-primary shrink-0 transition-transform duration-300",children:n}),c.jsx("span",{className:"font-extrabold text-sm text-foreground tracking-tight",children:s})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[v&&c.jsx("button",{type:"button",onClick:y,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:p?c.jsx(Jl,{size:16,className:"text-amber-500"}):c.jsx(Zl,{size:16,className:"text-primary"})}),c.jsx("button",{type:"button",onClick:m,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:c.jsx(ql,{size:16,className:"text-foreground"})})]})]}),u&&!b&&c.jsx("div",{onClick:m,className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-40 md:hidden transition-opacity duration-300"}),c.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",u?"fixed top-0 bottom-0 left-0 z-50":"z-30",b?"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:[c.jsxs("div",{className:D("flex border-b border-border/20 shrink-0 transition-all duration-300",b?"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:[c.jsxs("div",{className:D("flex items-center gap-3 overflow-hidden",b&&"justify-center"),children:[n&&c.jsx("div",{className:"text-primary shrink-0 transition-transform duration-300",children:n}),!b&&c.jsx("span",{className:"font-extrabold text-base text-foreground tracking-tight whitespace-nowrap animate-[fadeIn_0.2s_ease-out]",children:s})]}),c.jsx("button",{type:"button",onClick:m,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:b?c.jsx(ht,{size:14}):c.jsx(Sn,{size:14})})]}),c.jsx("div",{className:"flex-1 py-4 px-3 space-y-1.5 overflow-y-auto custom-scrollbar",onClickCapture:g,children:r}),o&&c.jsxs("div",{className:D("p-3 border-t border-border/20 min-h-[72px] flex overflow-hidden shrink-0 w-full gap-2",b?"flex-col items-center justify-center py-4":"flex-row items-center justify-between"),children:[c.jsx("div",{className:D("flex-1 min-w-0 flex overflow-hidden",b?"flex-col items-center justify-center":"flex-row items-center"),children:o}),l&&c.jsx("button",{type:"button",onClick:l,title:"Logout",className:D("p-2 rounded-xl text-muted-foreground hover:text-rose-400 hover:bg-rose-500/10 cursor-pointer transition-colors flex items-center justify-center shrink-0 border border-transparent hover:border-rose-500/20",b?"mt-2":""),children:c.jsx(Yl,{size:16})})]})]})]})},vl=({Icon:e,label:t,badge:n,collapsed:s,isActive:r})=>c.jsxs(c.Fragment,{children:[e&&c.jsx(e,{size:18,className:"shrink-0"}),!s&&c.jsx("span",{className:"truncate flex-1 font-semibold text-sm whitespace-nowrap overflow-hidden animate-[fadeIn_0.2s_ease-out]",children:t}),!s&&n&&!r&&c.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:n}),!s&&r&&c.jsx(F.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}})]}),wl=(e,t)=>D("relative w-full flex items-center rounded-xl font-bold text-sm transition-all duration-200 cursor-pointer text-left select-none shrink-0 border border-transparent",e?"justify-center p-3":"px-4 py-3 gap-3",t?"bg-primary/10 text-primary border-primary/15":"text-muted-foreground hover:text-foreground hover:bg-secondary/35"),Sg=({icon:e,label:t,to:n,end:s=!1,active:r=!1,onClick:o,collapsed:i=!1,badge:a})=>n?c.jsx(gl,{to:n,end:s,className:"block w-full outline-none",children:({isActive:l})=>c.jsx("div",{className:wl(i,l),children:c.jsx(vl,{Icon:e,label:t,badge:a,collapsed:i,isActive:l})})}):c.jsx("button",{type:"button",onClick:o,className:wl(i,r),children:c.jsx(vl,{Icon:e,label:t,badge:a,collapsed:i,isActive:r})}),Tg=({avatarLabel:e,avatarSrc:t,avatarClassName:n,title:s,subtitle:r,badges:o=[],meta:i,selected:a=!1,onClick:l,startSlot:u,endSlot:d,showChevron:f=!0,className:h,...m})=>c.jsxs(F.div,{layout:!0,initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.18},onClick:l,className:D("flex items-center gap-3 p-4 rounded-2xl border transition-all duration-200 cursor-pointer select-none group",a?"bg-primary/8 border-primary/30 shadow-md shadow-primary/5":"bg-card border-border hover:bg-secondary/50 hover:border-border/80",h),...m,children:[u&&c.jsx("div",{className:"shrink-0",onClick:g=>g.stopPropagation(),children:u}),c.jsx("div",{className:D("shrink-0 w-10 h-10 rounded-xl flex items-center justify-center text-sm font-black text-primary-foreground overflow-hidden",a?"bg-primary shadow-lg shadow-primary/20":"bg-primary/80",n),children:t?c.jsx("img",{src:t,alt:s,className:"w-full h-full object-cover"}):c.jsx("span",{children:e})}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("p",{className:D("text-sm font-bold truncate transition-colors",a?"text-primary":"text-foreground"),children:s}),r&&c.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5 font-medium",children:r}),o.length>0&&c.jsx("div",{className:"flex flex-wrap gap-1 mt-1.5",children:o.map((g,p)=>c.jsx(jg,{variant:g.variant,children:g.label},p))}),i&&c.jsx("div",{className:"mt-1",children:i})]}),d?c.jsx("div",{className:"shrink-0",children:d}):f?c.jsx(ht,{size:16,className:D("shrink-0 transition-all duration-200",a?"text-primary translate-x-0.5":"text-muted-foreground/40 group-hover:text-muted-foreground")}):null]}),kl={default:"bg-secondary text-foreground border border-border",primary:"bg-primary/10 text-primary border border-primary/20",success:"bg-emerald-500/10 text-emerald-600 border border-emerald-500/20",warning:"bg-amber-500/10 text-amber-600 border border-amber-500/20",danger:"bg-red-500/10 text-red-600 border border-red-500/20"},jg=({variant:e="default",children:t,className:n})=>c.jsx("span",{className:D("inline-flex items-center px-2 py-0.5 rounded-md text-[9px] font-black uppercase tracking-widest",kl[e]??kl.default,n),children:t}),Cg=({count:e=4})=>c.jsx(c.Fragment,{children:Array.from({length:e}).map((t,n)=>c.jsx("div",{className:"h-[76px] rounded-2xl bg-secondary/50 border border-border animate-pulse"},n))}),Ng=({selectedItem:e=null,onBack:t,listHeader:n,list:s,listFooter:r,detail:o,emptyDetail:i,backLabel:a="Back to List",listWidth:l="w-full lg:w-[400px]",className:u,listClassName:d,detailClassName:f})=>c.jsxs("div",{className:D("h-full flex flex-col lg:flex-row gap-6 lg:gap-8",u),children:[c.jsxs("div",{className:D("flex flex-col gap-4 transition-all duration-300",e&&"hidden lg:flex",l,d),children:[n&&c.jsx("div",{className:"shrink-0",children:n}),c.jsx("div",{className:"flex-1 overflow-y-auto custom-scrollbar space-y-2 md:space-y-3 pr-1",children:c.jsx(ue,{mode:"popLayout",children:s})}),r&&c.jsx("div",{className:"shrink-0",children:r})]}),c.jsx("div",{className:D("flex-1 min-w-0 transition-all duration-300",!e&&"hidden lg:block",f),children:c.jsx(ue,{mode:"wait",children:e?c.jsxs(F.div,{initial:{opacity:0,x:16},animate:{opacity:1,x:0},exit:{opacity:0,x:16},transition:{duration:.2,ease:"easeOut"},className:"h-full flex flex-col gap-4",children:[t&&c.jsxs("button",{onClick:t,className:"lg:hidden inline-flex items-center gap-1.5 text-muted-foreground hover:text-foreground font-bold text-xs uppercase tracking-widest transition-colors w-fit shrink-0",children:[c.jsx(Sn,{size:15}),a]}),c.jsx("div",{className:"flex-1 min-h-0",children:o})]},(e==null?void 0:e.id)??"detail"):c.jsx(F.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},className:"h-full",children:i??c.jsx(Eg,{})},"split-view-empty")})})]}),Eg=()=>c.jsxs("div",{className:"h-full rounded-3xl flex flex-col items-center justify-center border-dashed border-2 border-border p-8 text-center bg-card/30",children:[c.jsx("div",{className:"w-16 h-16 rounded-2xl bg-secondary flex items-center justify-center mb-5 border border-border",children:c.jsx(ht,{className:"text-muted-foreground/30",size:28})}),c.jsx("p",{className:"text-muted-foreground font-black uppercase tracking-widest text-[10px]",children:"Select an item to view details"})]}),Pg=({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 c.jsxs("div",{className:D("space-y-2 w-full text-left",i),children:[(o||s!==void 0)&&c.jsxs("div",{className:"flex justify-between items-center px-1",children:[o&&c.jsx("label",{className:"text-sm font-semibold text-foreground",children:o}),c.jsx("span",{className:"text-xs font-mono font-bold text-primary",children:s})]}),c.jsxs("div",{className:"relative flex items-center group",children:[c.jsx("input",{type:"range",min:e,max:t,step:n,value:s,onChange:l=>r&&r(Number(l.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%)`}}),c.jsx("style",{children:`
170
+ `),()=>{var z;(z=a.current)==null||z.removeAttribute("data-motion-pop-id"),E.contains(S)&&E.removeChild(S)}},[t]),l.jsx(Lu,{isPresent:t,childRef:a,sizeRef:c,pop:o,children:o===!1?e:vt.cloneElement(e,{ref:f})})}const Iu=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:r,presenceAffectsLayout:o,mode:i,anchorX:a,anchorY:c,root:d})=>{const u=ln(zu),f=b.useId();let h=!0,m=b.useMemo(()=>(h=!1,{id:f,initial:t,isPresent:n,custom:r,onExitComplete:g=>{u.set(g,!0);for(const p of u.values())if(!p)return;s&&s()},register:g=>(u.set(g,!1),()=>u.delete(g))}),[n,u,s]);return o&&h&&(m={...m}),b.useMemo(()=>{u.forEach((g,p)=>u.set(p,!1))},[n]),vt.useEffect(()=>{!n&&!u.size&&s&&s()},[n]),e=l.jsx(Ru,{pop:i==="popLayout",isPresent:n,anchorX:a,anchorY:c,root:d,children:e}),l.jsx(Tt.Provider,{value:m,children:e})};function zu(){return new Map}function go(e=!0){const t=b.useContext(Tt);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:r}=t,o=b.useId();b.useEffect(()=>{if(e)return r(o)},[e]);const i=b.useCallback(()=>e&&s&&s(o),[o,s,e]);return!n&&s?[!1,i]:[!0]}const Yt=e=>e.key||"";function xo(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const oe=({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:d})=>{const[u,f]=go(i),h=b.useMemo(()=>xo(e),[e]),m=i&&!u?[]:h.map(Yt),g=b.useRef(!0),p=b.useRef(h),x=ln(()=>new Map),k=b.useRef(new Set),[v,y]=b.useState(h),[T,S]=b.useState(h);Os(()=>{g.current=!1,p.current=h;for(let j=0;j<T.length;j++){const V=Yt(T[j]);m.includes(V)?(x.delete(V),k.current.delete(V)):x.get(V)!==!0&&x.set(V,!1)}},[T,m.length,m.join("-")]);const E=[];if(h!==v){let j=[...h];for(let V=0;V<T.length;V++){const D=T[V],_=Yt(D);m.includes(_)||(j.splice(V,0,D),E.push(D))}return o==="wait"&&E.length&&(j=E),S(xo(j)),y(h),null}process.env.NODE_ENV!=="production"&&o==="wait"&&T.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:z}=b.useContext(an);return l.jsx(l.Fragment,{children:T.map(j=>{const V=Yt(j),D=i&&!u?!1:h===T||m.includes(V),_=()=>{if(k.current.has(V))return;if(x.has(V))k.current.add(V),x.set(V,!0);else return;let B=!0;x.forEach(de=>{de||(B=!1)}),B&&(z==null||z(),S(p.current),i&&(f==null||f()),s&&s())};return l.jsx(Iu,{isPresent:D,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:r,mode:o,root:d,onExitComplete:D?void 0:_,anchorX:a,anchorY:c,children:j},V)})})},yo=b.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 Ou(){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 Ou(),kd()}function _u(e){const t=wo();for(const n in e)t[n]={...t[n],...e[n]};hi(t)}const Fu=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")||Fu.has(e)}let ko=e=>!Kt(e);function Bu(e){typeof e=="function"&&(ko=t=>t.startsWith("on")?!Kt(t):e(t))}try{Bu(require("@emotion/is-prop-valid").default)}catch{}function $u(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 Ht=b.createContext({});function Wu(e,t){if(_t(e)){const{initial:n,animate:s}=e;return{initial:n===!1||ft(n)?n:void 0,animate:ft(s)?s:void 0}}return e.inherit!==!1?t:{}}function Uu(e){const{initial:t,animate:n}=Wu(e,b.useContext(Ht));return b.useMemo(()=>({initial:t,animate:n}),[jo(t),jo(n)])}function jo(e){return Array.isArray(e)?e.join(" "):e}const ms=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function To(e,t,n){for(const s in t)!ie(t[s])&&!Ni(s,n)&&(e[s]=t[s])}function Gu({transformTemplate:e},t){return b.useMemo(()=>{const n=ms();return os(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Yu(e,t){const n=e.style||{},s={};return To(s,n,e),Object.assign(s,Gu(e,t)),s}function Ku(e,t){const n={},s=Yu(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=()=>({...ms(),attrs:{}});function Hu(e,t,n,s){const r=b.useMemo(()=>{const o=So();return Pi(o,t,Mi(s),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};To(o,e.style,e),r.style={...o,...r.style}}return r}const Xu=["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 ps(e){return typeof e!="string"||e.includes("-")?!1:!!(Xu.indexOf(e)>-1||/[A-Z]/u.test(e))}function qu(e,t,n,{latestValues:s},r,o=!1,i){const c=(i??ps(e)?Hu:Ku)(t,s,r,e),d=$u(t,typeof e=="string",o),u=e!==b.Fragment?{...d,...c,ref:n}:{},{children:f}=t,h=b.useMemo(()=>ie(f)?f.get():f,[f]);return b.createElement(e,{...u,children:h})}function Zu({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,r){return{latestValues:Ju(n,s,r,e),renderState:t()}}function Ju(e,t,n,s){const r={},o=s(e,{});for(const h in o)r[h]=Ut(o[h]);let{initial:i,animate:a}=e;const c=_t(e),d=di(e);t&&d&&!c&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||i===!1;const f=u?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=$n(e,h[m]);if(g){const{transitionEnd:p,transition:x,...k}=g;for(const v in k){let y=k[v];if(Array.isArray(y)){const T=u?y.length-1:0;y=y[T]}y!==null&&(r[v]=y)}for(const v in p)r[v]=p[v]}}}return r}const Co=e=>(t,n)=>{const s=b.useContext(Ht),r=b.useContext(Tt),o=()=>Zu(e,t,s,r);return n?o():ln(o)},Qu=Co({scrapeMotionValuesFromProps:ls,createRenderState:ms}),ef=Co({scrapeMotionValuesFromProps:Ei,createRenderState:So}),tf=Symbol.for("motionComponentSymbol");function nf(e,t,n){const s=b.useRef(n);b.useInsertionEffect(()=>{s.current=n});const r=b.useRef(null);return b.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=b.createContext({});function tt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function sf(e,t,n,s,r,o){var y,T;const{visualElement:i}=b.useContext(Ht),a=b.useContext(yo),c=b.useContext(Tt),d=b.useContext(hs),u=d.reducedMotion,f=d.skipAnimations,h=b.useRef(null),m=b.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:u,skipAnimations:f,isSVG:o}),m.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const g=h.current,p=b.useContext(No);g&&!g.projection&&r&&(g.type==="html"||g.type==="svg")&&rf(h.current,n,r,p);const x=b.useRef(!1);b.useInsertionEffect(()=>{g&&x.current&&g.update(n,c)});const k=n[Wr],v=b.useRef(!!k&&typeof window<"u"&&!((y=window.MotionHandoffIsComplete)!=null&&y.call(window,k))&&((T=window.MotionHasOptimisedAnimation)==null?void 0:T.call(window,k)));return Os(()=>{m.current=!0,g&&(x.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),v.current&&g.animationState&&g.animationState.animateChanges())}),b.useEffect(()=>{g&&(!v.current&&g.animationState&&g.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)==null||S.call(window,k)}),v.current=!1),g.enteringChildren=void 0)}),g}function rf(e,t,n,s){const{layoutId:r,layout:o,drag:i,dragConstraints:a,layoutScroll:c,layoutRoot:d,layoutAnchor:u,layoutCrossfade:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Po(e.parent)),e.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:!!i||a&&tt(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:f,layoutScroll:c,layoutRoot:d,layoutAnchor:u})}function Po(e){if(e)return e.options.allowProjection!==!1?e.projection:Po(e.parent)}function gs(e,{forwardMotionProps:t=!1,type:n}={},s,r){s&&_u(s);const o=n?n==="svg":ps(e),i=o?ef:Qu;function a(d,u){let f;const h={...b.useContext(hs),...d,layoutId:of(d)},{isStatic:m}=h,g=Uu(d),p=i(d,m);if(!m&&typeof window<"u"){af(h,s);const x=lf(h);f=x.MeasureLayout,g.visualElement=sf(e,p,h,r,x.ProjectionNode,o)}return l.jsxs(Ht.Provider,{value:g,children:[f&&g.visualElement?l.jsx(f,{visualElement:g.visualElement,...h}):null,qu(e,d,nf(p,g.visualElement,u),p,m,t,o)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=b.forwardRef(a);return c[tf]=e,c}function of({layoutId:e}){const t=b.useContext(an).id;return t&&e!==void 0?t+"-"+e:e}function af(e,t){const n=b.useContext(yo).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"):Te(!1,s,"lazy-strict-mode")}}function lf(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 cf(e,t){if(typeof Proxy>"u")return gs;const n=new Map,s=(o,i)=>gs(o,i,e,t),r=(o,i)=>(process.env.NODE_ENV!=="production"&&fn(!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,gs(i,void 0,e,t)),n.get(i))})}const df=(e,t)=>t.isSVG??ps(e)?new _d(t):new Dd(t,{allowProjection:e!==b.Fragment});class uf extends De{constructor(t){super(t),t.animationState||(t.animationState=Ud(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 ff=0;class hf extends De{constructor(){super(...arguments),this.id=ff++,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:d,transitionEnd:u,...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 mf={animation:{Feature:uf},exit:{Feature:hf}};function gt(e){return{point:{x:e.pageX,y:e.pageY}}}const pf=e=>t=>Zn(t)&&e(t,gt(t));function xt(e,t,n,s){return pt(e,t,pf(n),s)}const Ao=({current:e})=>e?e.ownerDocument.defaultView:null,Mo=(e,t)=>Math.abs(e-t);function gf(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=Xt(this.lastRawMoveEventInfo,this.transformPagePoint));const m=xs(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,p=gf(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!p)return;const{point:x}=m,{timestamp:k}=re;this.history.push({...x,timestamp:k});const{onStart:v,onMove:y}=this.handlers;g||(v&&v(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastRawMoveEventInfo=g,this.lastMoveEventInfo=Xt(g,this.transformPagePoint),F.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:p,onSessionEnd:x,resumeAnimation:k}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&k&&k(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=xs(m.type==="pointercancel"?this.lastMoveEventInfo:Xt(g,this.transformPagePoint),this.history);this.startEvent&&p&&p(m,v),x&&x(m,v)},!Zn(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=i,this.contextWindow=r||window;const c=gt(t),d=Xt(c,this.transformPagePoint),{point:u}=d,{timestamp:f}=re;this.history=[{...u,timestamp:f}];const{onSessionStart:h}=n;h&&h(t,xs(d,this.history)),this.removeListeners=it(xt(this.contextWindow,"pointermove",this.handlePointerMove),xt(this.contextWindow,"pointerup",this.handlePointerUp),xt(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(),Ae(this.updatePoint)}}function Xt(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 xs({point:e},t){return{point:e,delta:Do(e,Lo(t)),offset:Do(e,xf(t)),velocity:yf(t,.1)}}function xf(e){return e[0]}function Lo(e){return e[e.length-1]}function yf(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 bf(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 vf(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 wf(e,t){return{x:Io(e.x,t.x),y:Io(e.y,t.y)}}function kf(e,t){let n=.5;const s=ce(e),r=ce(t);return r>s?n=ot(t.min,t.max-s,e.min):s>r&&(n=ot(e.min,e.max-r,t.min)),be(0,1,n)}function jf(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 Tf(e=ys){return e===!1?e=0:e===!0&&(e=ys),{x:zo(e,"left","right"),y:zo(e,"top","bottom")}}function zo(e,t,n){return{min:Oo(e,t),max:Oo(e,n)}}function Oo(e,t){return typeof e=="number"?e:e[t]||0}const Sf=new WeakMap;class Cf{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(gt(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=Jc(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(k=>{let v=this.getAxisMotionValue(k).get()||0;if(ve.test(v)){const{projection:y}=this.visualElement;if(y&&y.layout){const T=y.layout.layoutBox[k];T&&(v=ce(T)*(parseFloat(v)/100))}}this.originPoint[k]=v}),p&&F.update(()=>p(f,h),!1,!0),Un(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h;const{dragPropagation:m,dragDirectionLock:g,onDirectionLock:p,onDrag:x}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:k}=h;if(g&&this.currentDirection===null){this.currentDirection=Pf(k),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",h.point,k),this.updateAxis("y",h.point,k),this.visualElement.render(),x&&F.update(()=>x(f,h),!1,!0)},c=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h,this.stop(f,h),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>{const{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new Vo(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:c,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:s,contextWindow:Ao(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||!qt(t,r,this.currentDirection))return;const o=this.getAxisMotionValue(t);let i=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(i=bf(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=vf(s.layoutBox,t):this.constraints=!1,this.elastic=Tf(n),r!==this.constraints&&!tt(t)&&s&&this.constraints&&!this.hasMutatedConstraints&&ke(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=jf(s.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!tt(t))return!1;const s=t.current;Te(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=Nd(s,r.root,this.visualElement.getTransformPagePoint());let i=wf(r.layout.layoutBox,o);if(n){const a=n(Td(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||{},d=ke(u=>{if(!qt(u,n,this.currentDirection))return;let f=c&&c[u]||{};(i===!0||i===u)&&(f={min:0,max:0});const h=r?200:1e6,m=r?40:1e7,g={type:"inertia",velocity:s?t[u]:0,bounceStiffness:h,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(u,g)});return Promise.all(d).then(a)}startAxisValueAnimation(t,n){const s=this.getAxisMotionValue(t);return Un(this.visualElement,t),s.start(Bn(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(!qt(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]=kf({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(!qt(i,t,null))return;const a=this.getAxisMotionValue(i),{min:c,max:d}=this.constraints[i];a.set($(c,d,r[i]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Sf.set(this.visualElement,this);const t=this.visualElement.current,n=xt(t,"pointerdown",d=>{const{drag:u,dragListener:f=!0}=this.getProps(),h=d.target,m=h!==t&&rd(h);u&&f&&!m&&this.start(d)});let s;const r=()=>{const{dragConstraints:d}=this.getProps();tt(d)&&d.current&&(this.constraints=this.resolveRefConstraints(),s||(s=Nf(t,d.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=pt(window,"resize",()=>this.scalePositionWithinConstraints()),c=o.addEventListener("didUpdate",(({delta:d,hasLayoutChanged:u})=>{this.isDragging&&u&&(ke(f=>{const h=this.getAxisMotionValue(f);h&&(this.originPoint[f]+=d[f].translate,h.set(h.get()+d[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 Nf(e,t,n){const s=ai(e,_o(n)),r=ai(t,_o(n));return()=>{s(),r()}}function qt(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Pf(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Af extends De{constructor(t){super(t),this.removeGroupControls=fe,this.removeListeners=fe,this.controls=new Cf(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 bs=e=>(t,n)=>{e&&F.update(()=>e(t,n),!1,!0)};class Mf extends De{constructor(){super(...arguments),this.removePointerDownListener=fe}onPointerDown(t){this.session=new Vo(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ao(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:s,onPanEnd:r}=this.node.getProps();return{onSessionStart:bs(t),onStart:bs(n),onMove:bs(s),onEnd:(o,i)=>{delete this.session,r&&F.postRender(()=>r(o,i))}}}mount(){this.removePointerDownListener=xt(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 vs=!1;class Ef extends b.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),vs&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Gt.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}),vs=!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(),qn.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:r}=t;vs=!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=b.useContext(an);return l.jsx(Ef,{...e,layoutGroup:s,switchLayoutGroup:b.useContext(No),isPresent:t,safeToRemove:n})}const Vf={pan:{Feature:Mf},drag:{Feature:Af,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,gt(t)))}class Df extends De{mount(){const{current:t}=this.node;t&&(this.unmount=ed(t,(n,s)=>(Bo(this.node,s,"Start"),r=>Bo(this.node,r,"End"))))}unmount(){}}class Lf 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=it(pt(this.node.current,"focus",()=>this.onFocus()),pt(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,gt(t)))}class Rf extends De{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=od(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 ws=new WeakMap,ks=new WeakMap,If=e=>{const t=ws.get(e.target);t&&t(e)},zf=e=>{e.forEach(If)};function Of({root:e,...t}){const n=e||document;ks.has(n)||ks.set(n,{});const s=ks.get(n),r=JSON.stringify(t);return s[r]||(s[r]=new IntersectionObserver(zf,{root:e,...t})),s[r]}function _f(e,t,n){const s=Of(t);return ws.set(e,n),s.observe(e),()=>{ws.delete(e),s.unobserve(e)}}const Ff={some:0,all:1};class Bf 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:Ff[r]},a=d=>{const{isIntersecting:u}=d;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:f,onViewportLeave:h}=this.node.getProps(),m=u?f:h;m&&m(d)};this.stopObserver=_f(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($f(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function $f({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Wf={...mf,...{inView:{Feature:Bf},tap:{Feature:Rf},focus:{Feature:Lf},hover:{Feature:Df}},...Vf,...{layout:{ProjectionNode:mo,MeasureLayout:Fo}}},O=cf(Wf,df);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 Uf(){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 Gf=(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},Yf=(e,t)=>({classGroupId:e,validator:t}),Uo=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Zt="-",Go=[],Kf="arbitrary..",Hf=e=>{const t=qf(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Xf(i);const a=i.split(Zt),c=a[0]===""&&a.length>1?1:0;return Yo(a,c,t)},getConflictingClassGroupIds:(i,a)=>{if(a){const c=s[i],d=n[i];return c?d?Gf(d,c):c:d||Go}return n[i]||Go}}},Yo=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const r=e[t],o=n.nextPart.get(r);if(o){const d=Yo(e,t+1,o);if(d)return d}const i=n.validators;if(i===null)return;const a=t===0?e.join(Zt):e.slice(t).join(Zt),c=i.length;for(let d=0;d<c;d++){const u=i[d];if(u.validator(a))return u.classGroupId}},Xf=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?Kf+s:void 0})(),qf=e=>{const{theme:t,classGroups:n}=e;return Zf(n,t)},Zf=(e,t)=>{const n=Uo();for(const s in e){const r=e[s];js(r,n,s,t)}return n},js=(e,t,n,s)=>{const r=e.length;for(let o=0;o<r;o++){const i=e[o];Jf(i,t,n,s)}},Jf=(e,t,n,s)=>{if(typeof e=="string"){Qf(e,t,n);return}if(typeof e=="function"){eh(e,t,n,s);return}th(e,t,n,s)},Qf=(e,t,n)=>{const s=e===""?t:Ko(t,e);s.classGroupId=n},eh=(e,t,n,s)=>{if(nh(e)){js(e(s),t,n,s);return}t.validators===null&&(t.validators=[]),t.validators.push(Yf(n,e))},th=(e,t,n,s)=>{const r=Object.entries(e),o=r.length;for(let i=0;i<o;i++){const[a,c]=r[i];js(c,Ko(t,a),n,s)}},Ko=(e,t)=>{let n=e;const s=t.split(Zt),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},nh=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,sh=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=":",rh=[],Xo=(e,t,n,s,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:s,isExternal:r}),ih=e=>{const{prefix:t,experimentalParseClassName:n}=e;let s=r=>{const o=[];let i=0,a=0,c=0,d;const u=r.length;for(let p=0;p<u;p++){const x=r[p];if(i===0&&a===0){if(x===Ho){o.push(r.slice(c,p)),c=p+1;continue}if(x==="/"){d=p;continue}}x==="["?i++:x==="]"?i--:x==="("?a++:x===")"&&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=d&&d>c?d-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(rh,!1,i,void 0,!0)}if(n){const r=s;s=o=>n({className:o,parseClassName:r})}return s},oh=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}},ah=e=>({cache:sh(e.cacheSize),parseClassName:ih(e),sortModifiers:oh(e),postfixLookupClassGroupIds:lh(e),...Hf(e)}),lh=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},ch=/\s+/,dh=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:r,sortModifiers:o,postfixLookupClassGroupIds:i}=t,a=[],c=e.trim().split(ch);let d="";for(let u=c.length-1;u>=0;u-=1){const f=c[u],{isExternal:h,modifiers:m,hasImportantModifier:g,baseClassName:p,maybePostfixModifierPosition:x}=n(f);if(h){d=f+(d.length>0?" "+d:d);continue}let k=!!x,v;if(k){const z=p.substring(0,x);v=s(z);const j=v&&i[v]?s(p):void 0;j&&j!==v&&(v=j,k=!1)}else v=s(p);if(!v){if(!k){d=f+(d.length>0?" "+d:d);continue}if(v=s(p),!v){d=f+(d.length>0?" "+d:d);continue}k=!1}const y=m.length===0?"":m.length===1?m[0]:o(m).join(":"),T=g?y+Ts:y,S=T+v;if(a.indexOf(S)>-1)continue;a.push(S);const E=r(v,k);for(let z=0;z<E.length;++z){const j=E[z];a.push(T+j)}d=f+(d.length>0?" "+d:d)}return d},uh=(...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},fh=(e,...t)=>{let n,s,r,o;const i=c=>{const d=t.reduce((u,f)=>f(u),e());return n=ah(d),s=n.cache.get,r=n.cache.set,o=a,a(c)},a=c=>{const d=s(c);if(d)return d;const u=dh(c,n);return r(c,u),u};return o=i,(...c)=>o(uh(...c))},hh=[],te=e=>{const t=n=>n[e]||hh;return t.isThemeGetter=!0,t},Zo=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Jo=/^\((?:(\w[\w-]*):)?(.+)\)$/i,mh=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ph=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,gh=/\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$/,xh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,yh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,bh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Le=e=>mh.test(e),I=e=>!!e&&!Number.isNaN(Number(e)),je=e=>!!e&&Number.isInteger(Number(e)),Ss=e=>e.endsWith("%")&&I(e.slice(0,-1)),Se=e=>ph.test(e),Qo=()=>!0,vh=e=>gh.test(e)&&!xh.test(e),Cs=()=>!1,wh=e=>yh.test(e),kh=e=>bh.test(e),jh=e=>!C(e)&&!N(e),Th=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)),Sh=e=>Re(e,ia,Cs),C=e=>Zo.test(e),$e=e=>Re(e,oa,vh),ea=e=>Re(e,Dh,I),Ch=e=>Re(e,la,Qo),Nh=e=>Re(e,aa,Cs),ta=e=>Re(e,sa,Cs),Ph=e=>Re(e,ra,kh),Jt=e=>Re(e,ca,wh),N=e=>Jo.test(e),yt=e=>We(e,oa),Ah=e=>We(e,aa),na=e=>We(e,sa),Mh=e=>We(e,ia),Eh=e=>We(e,ra),Qt=e=>We(e,ca,!0),Vh=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",Dh=e=>e==="number",aa=e=>e==="family-name",la=e=>e==="number"||e==="weight",ca=e=>e==="shadow",Lh=fh(()=>{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"),d=te("radius"),u=te("shadow"),f=te("inset-shadow"),h=te("text-shadow"),m=te("drop-shadow"),g=te("blur"),p=te("perspective"),x=te("aspect"),k=te("ease"),v=te("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...T(),N,C],E=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],j=()=>[N,C,c],V=()=>[Le,"full","auto",...j()],D=()=>[je,"none","subgrid",N,C],_=()=>["auto",{span:["full",je,N,C]},je,N,C],B=()=>[je,"auto",N,C],de=()=>["auto","min","max","fr",N,C],ae=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],J=()=>["start","end","center","stretch","center-safe","end-safe"],W=()=>["auto",...j()],ye=()=>[Le,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],Y=()=>[Le,"screen","full","dvw","lvw","svw","min","max","fit",...j()],ne=()=>[Le,"screen","full","lh","dvh","lvh","svh","min","max","fit",...j()],A=()=>[e,N,C],w=()=>[...T(),na,ta,{position:[N,C]}],R=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",Mh,Sh,{size:[N,C]}],X=()=>[Ss,yt,$e],Q=()=>["","none","full",d,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,Ss,na,ta],en=()=>["","none",g,N,C],tn=()=>["none",I,N,C],nn=()=>["none",I,N,C],Ps=()=>[I,N,C],sn=()=>[Le,"full",...j()];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:[jh],"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,x]}],container:["container"],"container-type":[{"@container":["","normal","size",N,C]}],"container-named":[Th],columns:[{columns:[I,C,N,a]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:V()}],"inset-x":[{"inset-x":V()}],"inset-y":[{"inset-y":V()}],start:[{"inset-s":V(),start:V()}],end:[{"inset-e":V(),end:V()}],"inset-bs":[{"inset-bs":V()}],"inset-be":[{"inset-be":V()}],top:[{top:V()}],right:[{right:V()}],bottom:[{bottom:V()}],left:[{left:V()}],visibility:["visible","invisible","collapse"],z:[{z:[je,"auto",N,C]}],basis:[{basis:[Le,"full","auto",a,...j()]}],"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:[je,"first","last","none",N,C]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":D()}],"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":de()}],"auto-rows":[{"auto-rows":de()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...ae(),"normal"]}],"justify-items":[{"justify-items":[...J(),"normal"]}],"justify-self":[{"justify-self":["auto",...J()]}],"align-content":[{content:["normal",...ae()]}],"align-items":[{items:[...J(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...J(),{baseline:["","last"]}]}],"place-content":[{"place-content":ae()}],"place-items":[{"place-items":[...J(),"baseline"]}],"place-self":[{"place-self":["auto",...J()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pbs:[{pbs:j()}],pbe:[{pbe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],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":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:ye()}],"inline-size":[{inline:["auto",...Y()]}],"min-inline-size":[{"min-inline":["auto",...Y()]}],"max-inline-size":[{"max-inline":["none",...Y()]}],"block-size":[{block:["auto",...ne()]}],"min-block-size":[{"min-block":["auto",...ne()]}],"max-block-size":[{"max-block":["none",...ne()]}],w:[{w:[a,"screen",...ye()]}],"min-w":[{"min-w":[a,"screen","none",...ye()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...ye()]}],h:[{h:["screen","lh",...ye()]}],"min-h":[{"min-h":["screen","lh","none",...ye()]}],"max-h":[{"max-h":["screen","lh",...ye()]}],"font-size":[{text:["base",n,yt,$e]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,Vh,Ch]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ss,C]}],"font-family":[{font:[Ah,Nh,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,...j()]}],"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:A()}],"text-color":[{text:A()}],"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:A()}],"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:j()}],"tab-size":[{tab:[je,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:w()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:U()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},je,N,C],radial:["",N,C],conic:[je,N,C]},Eh,Ph]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:X()}],"gradient-via-pos":[{via:X()}],"gradient-to-pos":[{to:X()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],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:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...K(),"none","hidden"]}],"outline-offset":[{"outline-offset":[I,N,C]}],"outline-w":[{outline:["",I,yt,$e]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",u,Qt,Jt]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",f,Qt,Jt]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[I,$e]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",h,Qt,Jt]}],"text-shadow-color":[{"text-shadow":A()}],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":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"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":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"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":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"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":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"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":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"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":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"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":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"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":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"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":T()}],"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":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:w()}],"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:en()}],brightness:[{brightness:[I,N,C]}],contrast:[{contrast:[I,N,C]}],"drop-shadow":[{"drop-shadow":["","none",m,Qt,Jt]}],"drop-shadow-color":[{"drop-shadow":A()}],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":en()}],"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":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"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",k,N,C]}],delay:[{delay:[I,N,C]}],animate:[{animate:["none",v,N,C]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,N,C]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:tn()}],"rotate-x":[{"rotate-x":tn()}],"rotate-y":[{"rotate-y":tn()}],"rotate-z":[{"rotate-z":tn()}],scale:[{scale:nn()}],"scale-x":[{"scale-x":nn()}],"scale-y":[{"scale-y":nn()}],"scale-z":[{"scale-z":nn()}],"scale-3d":["scale-3d"],skew:[{skew:Ps()}],"skew-x":[{"skew-x":Ps()}],"skew-y":[{"skew-y":Ps()}],transform:[{transform:[N,C,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:sn()}],"translate-x":[{"translate-x":sn()}],"translate-y":[{"translate-y":sn()}],"translate-z":[{"translate-z":sn()}],"translate-none":["translate-none"],zoom:[{zoom:[je,N,C]}],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"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":A()}],"scrollbar-track-color":[{"scrollbar-track":A()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mbs":[{"scroll-mbs":j()}],"scroll-mbe":[{"scroll-mbe":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pbs":[{"scroll-pbs":j()}],"scroll-pbe":[{"scroll-pbe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"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",...A()]}],"stroke-w":[{stroke:[I,yt,$e,ea]}],stroke:[{stroke:["none",...A()]}],"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 M(...e){return Lh(Uf(e))}const Rh=({title:e,children:t,className:n})=>{const[s,r]=b.useState(!1);return l.jsxs("div",{className:M("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(Rs,{size:18,className:M("text-muted-foreground transition-transform duration-200",s&&"rotate-180")})]}),l.jsx(oe,{initial:!1,children:s&&l.jsx(O.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})})})]})},da={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"},ua={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)"}},Ih=({title:e,description:t,variant:n="info",dismissible:s=!1,className:r})=>{const[o,i]=b.useState(!0),a=ua[n]||ua.info,c={success:l.jsx(kt,{size:18,style:{color:a.title}}),error:l.jsx(Is,{size:18,style:{color:a.title}}),warning:l.jsx(on,{size:18,style:{color:a.title}}),info:l.jsx(jt,{size:18,style:{color:a.title}})};return l.jsx(oe,{children:o&&l.jsxs(O.div,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},exit:{opacity:0,y:-5},className:M("flex items-start gap-4 p-4 rounded-2xl border text-left",da[n]||da.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"},zh=({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:M("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:M("absolute bottom-0 right-0 block h-2.5 w-2.5 rounded-full ring-2 ring-background",ha[r])})]})},bt=({children:e,className:t})=>l.jsx("div",{className:M("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:M("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:M("glass-input w-full",n&&"pl-11",t&&"ring-2 ring-destructive/50 border-destructive/50"),...o})]}),t&&l.jsx(O.p,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"text-xs text-destructive ml-1 font-medium",children:t})]}),xe=({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(O.button,{whileHover:{y:-2},whileTap:{scale:.98},className:M("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]"})]})},Ns=({checked:e=!1,onChange:t,label:n,className:s})=>l.jsxs("label",{className:M("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(O.div,{className:M("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(oe,{children:e&&l.jsx(O.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},transition:{type:"spring",stiffness:500,damping:30},children:l.jsx(_a,{size:12,className:"text-primary-foreground stroke-[4px]"})})})})]}),n&&l.jsx("span",{className:"text-sm font-semibold text-foreground leading-none",children:n})]}),Oh=({initialMode:e="login",onLogin:t,onRegister:n,onForgotPassword:s,logo:r=Wa,title:o="Ether UI Console",className:i})=>{const[a,c]=b.useState(e),[d,u]=b.useState(""),[f,h]=b.useState(""),[m,g]=b.useState(""),[p,x]=b.useState(!1),[k,v]=b.useState(!1),[y,T]=b.useState(!1),S=async E=>{E.preventDefault(),T(!0);try{a==="login"&&t?await t({email:f,password:m,rememberMe:p}):a==="register"&&n?await n({name:d,email:f,password:m,acceptTerms:k}):a==="forgot"&&s&&await s({email:f})}finally{T(!1)}};return l.jsxs("div",{className:M("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(oe,{mode:"wait",children:[a==="login"&&l.jsx(O.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},exit:{opacity:0,y:-15},transition:{duration:.25},children:l.jsxs(bt,{className:"p-8 space-y-6",children:[l.jsxs("div",{className:"text-center space-y-2",children:[l.jsx("div",{className:"inline-flex items-center justify-center p-3 rounded-2xl bg-primary/10 text-primary mb-2",children:l.jsx(r,{size:28,className:"animate-pulse"})}),l.jsx("h3",{className:"text-2xl font-extrabold tracking-tight text-foreground",children:o}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Welcome back! Sign in to manage your ledgers."})]}),l.jsxs("form",{onSubmit:S,className:"space-y-4",children:[l.jsx(Ue,{label:"Email Address",type:"email",placeholder:"name@company.com",value:f,onChange:E=>h(E.target.value),required:!0}),l.jsx(Ue,{label:"Password",type:"password",placeholder:"••••••••",value:m,onChange:E=>g(E.target.value),required:!0}),l.jsxs("div",{className:"flex items-center justify-between text-xs pt-1",children:[l.jsx(Ns,{label:"Remember me",checked:p,onChange:x}),l.jsx("button",{type:"button",onClick:()=>c("forgot"),className:"font-bold text-primary hover:underline cursor-pointer",children:"Forgot password?"})]}),l.jsx(xe,{type:"submit",variant:"primary",loading:y,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(O.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},exit:{opacity:0,y:-15},transition:{duration:.25},children:l.jsxs(bt,{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:d,onChange:E=>u(E.target.value),required:!0}),l.jsx(Ue,{label:"Work Email",type:"email",placeholder:"alex@company.com",value:f,onChange:E=>h(E.target.value),required:!0}),l.jsx(Ue,{label:"Choose Password",type:"password",placeholder:"••••••••",value:m,onChange:E=>g(E.target.value),required:!0}),l.jsx("div",{className:"flex items-start pt-1",children:l.jsx(Ns,{label:"I agree to the Terms & Conditions",checked:k,onChange:v})}),l.jsx(xe,{type:"submit",variant:"primary",loading:y,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(O.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},exit:{opacity:0,y:-15},transition:{duration:.25},children:l.jsxs(bt,{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(za,{size:12})," Back to Sign In"]}),l.jsx("h3",{className:"text-2xl font-extrabold tracking-tight text-foreground pt-2",children:"Recover Access"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Enter your verified work email, and we will send a password restoration link."})]}),l.jsxs("form",{onSubmit:S,className:"space-y-4",children:[l.jsx(Ue,{label:"Registered Email Address",type:"email",placeholder:"alex@company.com",value:f,onChange:E=>h(E.target.value),required:!0}),l.jsx(xe,{type:"submit",variant:"primary",loading:y,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:M("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(oe,{children:e&&l.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[l.jsx(O.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:t,className:"absolute inset-0 bg-black/20 backdrop-blur-sm"}),l.jsxs(O.div,{initial:{opacity:0,scale:.95,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:20},className:M("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})]})]})}),_h=({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(xe,{variant:"ghost",onClick:t,disabled:c,children:i}),l.jsx(xe,{variant:a,onClick:n,loading:c,children:o})]})]})}),Fh=({label:e,options:t=[],value:n,onChange:s,placeholder:r="Select option",className:o})=>{const[i,a]=b.useState(!1),c=b.useRef(null),d=t.find(u=>u.value===n);return b.useEffect(()=>{const u=f=>{c.current&&!c.current.contains(f.target)&&a(!1)};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[]),l.jsxs("div",{ref:c,className:M("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:M(!d&&"text-muted-foreground/60"),children:d?d.label:r}),l.jsx(Rs,{size:18,className:M("text-muted-foreground transition-transform duration-200",i&&"rotate-180")})]})}),l.jsx(oe,{children:i&&l.jsx(O.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((u,f)=>{const h=u.value===n;return l.jsx("button",{type:"button",onClick:()=>{s&&s(u.value),a(!1)},className:M("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:u.label},u.value||f)})})})]})},Bh=({onFilesAdded:e,accept:t="*",maxFiles:n=5,maxSizeMB:s=10,className:r})=>{const[o,i]=b.useState(!1),[a,c]=b.useState([]),d=b.useRef(null),u=p=>{p.preventDefault(),p.stopPropagation(),p.type==="dragenter"||p.type==="dragover"?i(!0):p.type==="dragleave"&&i(!1)},f=p=>{const x=Array.from(p).map(v=>{const T=v.size/1048576>s;return{id:Math.random().toString(36).substring(7),name:v.name,size:(v.size/1024).toFixed(1)+" KB",rawFile:v,progress:0,status:T?"failed":"uploading",error:T?`File exceeds limit of ${s}MB`:null}}),k=[...a,...x].slice(0,n);c(k),e&&e(k.map(v=>v.rawFile)),x.forEach(v=>{if(v.status==="failed")return;let y=0;const T=setInterval(()=>{y+=Math.floor(Math.random()*15)+5,y>=100?(y=100,clearInterval(T),c(S=>S.map(E=>E.id===v.id?{...E,progress:100,status:"success"}:E))):c(S=>S.map(E=>E.id===v.id?{...E,progress:y}:E))},150)})},h=p=>{p.preventDefault(),p.stopPropagation(),i(!1),p.dataTransfer.files&&p.dataTransfer.files[0]&&f(p.dataTransfer.files)},m=p=>{p.target.files&&p.target.files[0]&&f(p.target.files)},g=p=>{c(a.filter(x=>x.id!==p))};return l.jsxs("div",{className:M("space-y-4 w-full text-left",r),children:[l.jsxs("div",{onDragEnter:u,onDragOver:u,onDragLeave:u,onDrop:h,onClick:()=>d.current&&d.current.click(),className:M("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:d,type:"file",multiple:!0,accept:t,onChange:m,className:"hidden"}),l.jsx(O.div,{animate:o?{scale:1.1,y:-2}:{scale:1,y:0},className:M("p-3 rounded-2xl transition-colors",o?"bg-primary text-primary-foreground":"bg-primary/10 text-primary"),children:l.jsx(Ba,{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(oe,{children:a.length>0&&l.jsxs(O.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(O.div,{layout:!0,initial:{opacity:0,x:-10},animate:{opacity:1,x:0},exit:{opacity:0,x:10},className:"flex items-center justify-between gap-4 p-2.5 rounded-xl bg-secondary/30 border border-border/10 text-xs",children:[l.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[l.jsx("div",{className:"p-2 rounded-lg bg-card border border-border/20 text-muted-foreground shrink-0",children:l.jsx($a,{size:16})}),l.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsx("p",{className:"font-semibold text-foreground truncate",children:p.name}),l.jsx("span",{className:"text-[10px] text-muted-foreground shrink-0",children:p.size})]}),p.status==="uploading"&&l.jsx("div",{className:"w-full bg-secondary/50 rounded-full h-1 overflow-hidden",children:l.jsx(O.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(kt,{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))})]})})]})},$h=({isOpen:e=!1,onClose:t,notifications:n=[],onClearAll:s,onDismiss:r,className:o})=>l.jsx(oe,{children:e&&l.jsxs(l.Fragment,{children:[l.jsx(O.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(O.aside,{initial:{x:"110%",opacity:0},animate:{x:0,opacity:1},exit:{x:"110%",opacity:0},transition:{type:"spring",stiffness:380,damping:32},className:M("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(Ls,{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(Xa,{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(oe,{initial:!1,children:n.length===0?l.jsxs(O.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(Ls,{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(O.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:M("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(kt,{size:16}),c&&l.jsx(on,{size:16}),!a&&!c&&l.jsx(jt,{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)})})})]})]})}),Wh=({currentPage:e=1,totalPages:t=1,onPageChange:n,loading:s=!1})=>{if(t<=1)return null;const o=((i,a)=>a<=5?Array.from({length:a},(c,d)=>d+1):i<=3?[1,2,3,4,"...",a]:i>=a-2?[1,"...",a-3,a-2,a-1,a]:[1,"...",i-1,i,i+1,"...",a])(e,t);return 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(xe,{variant:"outline",className:"text-foreground font-semibold",onClick:()=>n(e-1),disabled:e===1||s,children:"Previous"}),l.jsx(xe,{variant:"outline",className:"text-foreground font-semibold",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(xe,{variant:"outline",className:"p-2.5 rounded-xl shrink-0 text-foreground",onClick:()=>n(e-1),disabled:e===1||s,children:[l.jsx("span",{className:"sr-only",children:"Previous"}),l.jsx(rn,{size:16})]}),o.map((i,a)=>{if(i==="...")return l.jsx("div",{className:"flex items-end justify-center px-1 pb-1",children:l.jsx("span",{className:"text-muted-foreground tracking-widest leading-none font-bold",children:"..."})},`dots-${a}`);const c=e===i;return l.jsx(xe,{variant:c?"primary":"outline",className:`w-10 h-10 p-0 rounded-xl shrink-0 font-mono text-xs font-semibold ${c?"":"text-muted-foreground hover:text-foreground"}`,onClick:()=>n(i),disabled:s,children:i},i)}),l.jsxs(xe,{variant:"outline",className:"p-2.5 rounded-xl shrink-0 text-foreground",onClick:()=>n(e+1),disabled:e===t||s,children:[l.jsx("span",{className:"sr-only",children:"Next"}),l.jsx(rt,{size:16})]})]})})]})]})},Uh=({children:e,content:t})=>{const[n,s]=b.useState(!1),[r,o]=b.useState({x:0,y:0}),i=b.useRef(null),a=()=>{if(i.current){const u=i.current.getBoundingClientRect();o({x:u.left+u.width/2,y:u.top+window.scrollY-8})}};b.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)},d=()=>{s(!1)};return l.jsxs("div",{ref:i,onMouseEnter:c,onMouseLeave:d,className:"inline-block w-full",children:[e,n&&t&&typeof window<"u"&&Ca.createPortal(l.jsx(oe,{children:l.jsxs(O.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)]})},Gh=({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:M("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),"%"]})]})},Yh=({checked:e=!1,onChange:t,label:n,name:s,value:r,className:o})=>l.jsxs("label",{className:M("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(O.div,{className:M("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(oe,{children:e&&l.jsx(O.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=b.createContext(),Kh=({children:e,defaultTheme:t="light"})=>{const[n,s]=b.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});b.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})},xa=()=>{const e=b.useContext(ga);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e},Hh=({collapsed:e=!1,onToggle:t,logo:n,title:s="RenderLoom",children:r,footer:o,className:i,showMobileToggle:a=!0,onLogout:c})=>{const[d,u]=b.useState(!1),[f,h]=b.useState(!e);b.useEffect(()=>{h(!e)},[e]),b.useEffect(()=>{const y=()=>{const T=window.innerWidth<768;u(T),T||h(!1)};return y(),window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)},[]);const m=()=>{if(d){const y=!f;h(y),t&&t(!y)}else t&&t(!e)},g=()=>{d&&(h(!1),t&&t(!0))};let p=!1,x=()=>{},k=!1;try{const y=xa();y&&(p=y.isDark,x=y.toggleTheme,k=!0)}catch{}const v=d?!f:e;return l.jsxs(l.Fragment,{children:[d&&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:[k&&l.jsx("button",{type:"button",onClick:x,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:p?l.jsx(Ha,{size:16,className:"text-amber-500"}):l.jsx(Ka,{size:16,className:"text-primary"})}),l.jsx("button",{type:"button",onClick:m,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(Ga,{size:16,className:"text-foreground"})})]})]}),d&&!v&&l.jsx("div",{onClick:m,className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-40 md:hidden transition-opacity duration-300"}),l.jsxs("aside",{className:M("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",d?"fixed top-0 bottom-0 left-0 z-50":"z-30",v?"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:M("flex border-b border-border/20 shrink-0 transition-all duration-300",v?"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:M("flex items-center gap-3 overflow-hidden",v&&"justify-center"),children:[n&&l.jsx("div",{className:"text-primary shrink-0 transition-transform duration-300",children:n}),!v&&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:m,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:v?l.jsx(rt,{size:14}):l.jsx(rn,{size:14})})]}),l.jsx("div",{className:"flex-1 py-4 px-3 space-y-1.5 overflow-y-auto custom-scrollbar",onClickCapture:g,children:r}),o&&l.jsxs("div",{className:M("p-3 border-t border-border/20 min-h-[72px] flex overflow-hidden shrink-0 w-full gap-2",v?"flex-col items-center justify-center py-4":"flex-row items-center justify-between"),children:[l.jsx("div",{className:M("flex-1 min-w-0 flex overflow-hidden",v?"flex-col items-center justify-center":"flex-row items-center"),children:o}),c&&l.jsx("button",{type:"button",onClick:c,title:"Logout",className:M("p-2 rounded-xl text-muted-foreground hover:text-rose-400 hover:bg-rose-500/10 cursor-pointer transition-colors flex items-center justify-center shrink-0 border border-transparent hover:border-rose-500/20",v?"mt-2":""),children:l.jsx(Ua,{size:16})})]})]})]})},Xh=({icon:e,label:t,active:n=!1,onClick:s,collapsed:r=!1,badge:o,as:i,...a})=>{const c=u=>l.jsxs(l.Fragment,{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&&!u&&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&&u&&l.jsx(O.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}})]}),d=u=>M("relative w-full flex items-center rounded-xl font-bold text-sm transition-all duration-200 cursor-pointer text-left select-none shrink-0 border border-transparent",r?"justify-center p-3":"px-4 py-3 gap-3",u?"bg-primary/10 text-primary border-primary/15":"text-muted-foreground hover:text-foreground hover:bg-secondary/35");return i?l.jsx(i,{className:({isActive:u})=>d(u),...a,children:({isActive:u})=>c(u)}):l.jsx("button",{type:"button",onClick:s,className:d(n),children:c(n)})},qh=({avatarLabel:e,avatarSrc:t,avatarClassName:n,title:s,subtitle:r,badges:o=[],meta:i,selected:a=!1,onClick:c,startSlot:d,endSlot:u,showChevron:f=!0,className:h,...m})=>l.jsxs(O.div,{layout:!0,initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.18},onClick:c,className:M("flex items-center gap-3 p-4 rounded-2xl border transition-all duration-200 cursor-pointer select-none group",a?"bg-primary/8 border-primary/30 shadow-md shadow-primary/5":"bg-card border-border hover:bg-secondary/50 hover:border-border/80",h),...m,children:[d&&l.jsx("div",{className:"shrink-0",onClick:g=>g.stopPropagation(),children:d}),l.jsx("div",{className:M("shrink-0 w-10 h-10 rounded-xl flex items-center justify-center text-sm font-black text-primary-foreground overflow-hidden",a?"bg-primary shadow-lg shadow-primary/20":"bg-primary/80",n),children:t?l.jsx("img",{src:t,alt:s,className:"w-full h-full object-cover"}):l.jsx("span",{children:e})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:M("text-sm font-bold truncate transition-colors",a?"text-primary":"text-foreground"),children:s}),r&&l.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5 font-medium",children:r}),o.length>0&&l.jsx("div",{className:"flex flex-wrap gap-1 mt-1.5",children:o.map((g,p)=>l.jsx(Zh,{variant:g.variant,children:g.label},p))}),i&&l.jsx("div",{className:"mt-1",children:i})]}),u?l.jsx("div",{className:"shrink-0",children:u}):f?l.jsx(rt,{size:16,className:M("shrink-0 transition-all duration-200",a?"text-primary translate-x-0.5":"text-muted-foreground/40 group-hover:text-muted-foreground")}):null]}),ya={default:"bg-secondary text-foreground border border-border",primary:"bg-primary/10 text-primary border border-primary/20",success:"bg-emerald-500/10 text-emerald-600 border border-emerald-500/20",warning:"bg-amber-500/10 text-amber-600 border border-amber-500/20",danger:"bg-red-500/10 text-red-600 border border-red-500/20"},Zh=({variant:e="default",children:t,className:n})=>l.jsx("span",{className:M("inline-flex items-center px-2 py-0.5 rounded-md text-[9px] font-black uppercase tracking-widest",ya[e]??ya.default,n),children:t}),Jh=({count:e=4})=>l.jsx(l.Fragment,{children:Array.from({length:e}).map((t,n)=>l.jsx("div",{className:"h-[76px] rounded-2xl bg-secondary/50 border border-border animate-pulse"},n))}),Qh=({selectedItem:e=null,onBack:t,listHeader:n,list:s,listFooter:r,detail:o,emptyDetail:i,backLabel:a="Back to List",listWidth:c="w-full lg:w-[400px]",className:d,listClassName:u,detailClassName:f})=>l.jsxs("div",{className:M("h-full flex flex-col lg:flex-row gap-6 lg:gap-8",d),children:[l.jsxs("div",{className:M("flex flex-col gap-4 transition-all duration-300",e&&"hidden lg:flex",c,u),children:[n&&l.jsx("div",{className:"shrink-0",children:n}),l.jsx("div",{className:"flex-1 overflow-y-auto custom-scrollbar space-y-2 md:space-y-3 pr-1",children:l.jsx(oe,{mode:"popLayout",children:s})}),r&&l.jsx("div",{className:"shrink-0",children:r})]}),l.jsx("div",{className:M("flex-1 min-w-0 transition-all duration-300",!e&&"hidden lg:block",f),children:l.jsx(oe,{mode:"wait",children:e?l.jsxs(O.div,{initial:{opacity:0,x:16},animate:{opacity:1,x:0},exit:{opacity:0,x:16},transition:{duration:.2,ease:"easeOut"},className:"h-full flex flex-col gap-4",children:[t&&l.jsxs("button",{onClick:t,className:"lg:hidden inline-flex items-center gap-1.5 text-muted-foreground hover:text-foreground font-bold text-xs uppercase tracking-widest transition-colors w-fit shrink-0",children:[l.jsx(rn,{size:15}),a]}),l.jsx("div",{className:"flex-1 min-h-0",children:o})]},(e==null?void 0:e.id)??"detail"):l.jsx(O.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},className:"h-full",children:i??l.jsx(em,{})},"split-view-empty")})})]}),em=()=>l.jsxs("div",{className:"h-full rounded-3xl flex flex-col items-center justify-center border-dashed border-2 border-border p-8 text-center bg-card/30",children:[l.jsx("div",{className:"w-16 h-16 rounded-2xl bg-secondary flex items-center justify-center mb-5 border border-border",children:l.jsx(rt,{className:"text-muted-foreground/30",size:28})}),l.jsx("p",{className:"text-muted-foreground font-black uppercase tracking-widest text-[10px]",children:"Select an item to view details"})]}),tm=({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:M("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:`
182
171
  input[type="range"]::-webkit-slider-thumb {
183
172
  -webkit-appearance: none;
184
173
  appearance: none;
@@ -196,5 +185,5 @@ Please change the parent <Route path="${y}"> to <Route path="${y==="/"?"*":`${y}
196
185
  input[type="range"]::-webkit-slider-thumb:active {
197
186
  transform: scale(0.95);
198
187
  }
199
- `})]})]})},Ag=({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 c.jsx("div",{className:D("flex items-center justify-center",t),children:c.jsxs("svg",{className:D("animate-spin text-primary shrink-0",n[e]),viewBox:"0 0 24 24",fill:"none",children:[c.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),c.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"})]})})},Mg=({title:e,value:t,change:n,trend:s="up",description:r,icon:o,className:i})=>c.jsxs(Et,{className:D("space-y-4 hover:border-primary/40 relative overflow-hidden",i),children:[c.jsx("div",{className:"absolute top-0 right-0 w-24 h-24 bg-primary/5 rounded-full blur-2xl pointer-events-none"}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-xs font-bold text-muted-foreground uppercase tracking-wider",children:e}),o&&c.jsx("div",{className:"p-2 rounded-xl bg-secondary/60 text-primary border border-border/40 shrink-0",children:c.jsx(o,{size:18})})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsx("h3",{className:"text-3xl font-extrabold tracking-tight text-foreground font-sans",children:t}),n&&c.jsxs("div",{className:"flex items-center gap-1.5 pt-0.5",children:[c.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"&&c.jsx($l,{size:10}),s==="down"&&c.jsx(zl,{size:10}),n]}),r&&c.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:r})]})]})]}),Rg=({checked:e=!1,onChange:t,label:n,className:s})=>c.jsxs("label",{className:D("inline-flex items-center gap-3 cursor-pointer select-none",s),children:[c.jsxs("div",{className:"relative",children:[c.jsx("input",{type:"checkbox",checked:e,onChange:r=>t&&t(r.target.checked),className:"sr-only"}),c.jsx(F.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:c.jsx(F.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&&c.jsx("span",{className:"text-sm font-semibold text-foreground",children:n})]}),Sl=w.createContext(),Dg=({children:e})=>{const[t,n]=w.useState([]),[s,r]=w.useState(-1),[o,i]=w.useState("IDLE"),[a,l]=w.useState(""),[u,d]=w.useState({success:0,failed:0,skipped:0,noLedger:0,items:[]}),[f,h]=w.useState(null),m=w.useRef(!1),g=(b,x="",j)=>{n(b),l(x||"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 x=await f(b),j=typeof x=="string"?x:x.status||"SUCCESS",C=(x==null?void 0:x.message)||"",N=(x==null?void 0:x.name)||b.name||"Task Item",I=(x==null?void 0:x.detail)||b.detail||"";d(k=>{const M=j.toLowerCase()==="success"?"success":j.toLowerCase()==="failed"?"failed":j.toLowerCase()==="skipped"?"skipped":"noLedger";return{...k,[M]:k[M]+1,items:[{name:N,detail:I,status:j,message:C},...k.items]}})}catch(x){console.error("Task Execution Failed:",x),d(j=>({...j,failed:j.failed+1,items:[{name:b.name||"Task Item",detail:b.detail||"",status:"FAILED",message:x.message||"Execution Error"},...j.items]}))}finally{m.current=!1,s+1<t.length?r(x=>x+1):i("COMPLETED")}};w.useEffect(()=>{o==="SYNCING"&&y()},[s,o,f]);const v=t.length>0?Math.round((s+(o==="COMPLETED"?1:0))/t.length*100):0;return c.jsx(Sl.Provider,{value:{queue:t,currentIndex:s,status:o,results:u,batchName:a,progress:v,addToQueue:g,clearQueue:p},children:e})},Tl=()=>{const e=w.useContext(Sl);if(!e)throw new Error("useSync must be used within a SyncProvider");return e},Vg=()=>{const{status:e,results:t,currentIndex:n,queue:s,progress:r,batchName:o,clearQueue:i}=Tl(),[a,l]=w.useState(!1),[u,d]=w.useState(!1);if(e==="IDLE")return null;const f=s[n]||{};return c.jsx(ue,{children:c.jsx(F.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&&l(!1),children:a?c.jsxs("div",{className:"relative",children:[c.jsx(pr,{className:D("text-primary",e==="SYNCING"&&"animate-spin"),size:24}),e==="SYNCING"&&c.jsx("div",{className:"absolute -top-1 -right-1 w-3 h-3 bg-primary rounded-full border-2 border-background"})]}):c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(pr,{className:D("text-primary",e==="SYNCING"&&"animate-spin"),size:18}),c.jsx("span",{className:"font-bold text-sm",children:e==="SYNCING"?"Processing batch...":o})]}),c.jsxs("div",{className:"flex items-center gap-1",children:[c.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:c.jsx(ht,{className:D("transition-transform",u&&"rotate-90"),size:16})}),c.jsx("button",{onClick:h=>{h.stopPropagation(),l(!0)},className:"p-1 hover:bg-secondary rounded-md text-muted-foreground transition-colors cursor-pointer",children:c.jsx(Xl,{size:14})}),e==="COMPLETED"&&c.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:c.jsx(Ve,{size:14})})]})]}),!u&&e==="SYNCING"&&c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("div",{className:"flex justify-between items-end",children:[c.jsx("p",{className:"text-[10px] text-muted-foreground uppercase font-bold tracking-widest truncate max-w-[180px]",children:f.name||"Running Task..."}),c.jsxs("span",{className:"text-[9px] font-mono font-bold text-primary",children:[n+1," / ",s.length]})]}),c.jsx("div",{className:"h-1.5 w-full bg-secondary rounded-full overflow-hidden",children:c.jsx(F.div,{initial:{width:0},animate:{width:`${r}%`},className:"h-full bg-primary"})})]}),u?c.jsx("div",{className:"space-y-3 max-h-[350px] overflow-y-auto pr-2 custom-scrollbar py-2",children:t.items.length===0?c.jsx("p",{className:"text-center text-xs text-muted-foreground py-8",children:"Queueing..."}):t.items.map((h,m)=>c.jsxs("div",{className:"flex flex-col gap-1 p-2.5 rounded-xl bg-secondary/30 border border-border/40 text-left",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"font-bold text-[11px] truncate max-w-[200px]",children:h.name}),c.jsx(Ha,{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})]}),c.jsxs("div",{className:"flex flex-col",children:[h.detail&&c.jsx("span",{className:"text-[9px] text-muted-foreground font-mono truncate",children:h.detail}),h.message&&c.jsx("span",{className:"text-[9px] text-destructive italic font-medium mt-0.5",children:h.message})]})]},m))}):c.jsxs("div",{className:"grid grid-cols-3 gap-1 pt-2 border-t border-border/50 text-center",children:[c.jsxs("div",{className:"flex flex-col items-center",children:[c.jsx("span",{className:"text-[7px] font-bold text-muted-foreground uppercase",children:"Success"}),c.jsx("span",{className:"text-sm font-mono font-bold text-emerald-600",children:t.success})]}),c.jsxs("div",{className:"flex flex-col items-center border-l border-border/50",children:[c.jsx("span",{className:"text-[7px] font-bold text-muted-foreground uppercase",children:"Failed"}),c.jsx("span",{className:"text-sm font-mono font-bold text-destructive",children:t.failed})]}),c.jsxs("div",{className:"flex flex-col items-center border-l border-border/50",children:[c.jsx("span",{className:"text-[7px] font-bold text-muted-foreground uppercase",children:"Skipped"}),c.jsx("span",{className:"text-sm font-mono font-bold text-muted-foreground",children:t.skipped+t.noLedger})]})]}),!u&&e==="COMPLETED"&&c.jsxs("div",{className:"bg-emerald-500/10 border border-emerald-500/20 p-2 rounded-xl flex items-center gap-2 justify-center",children:[c.jsx(Ul,{className:"text-emerald-500",size:16}),c.jsx("p",{className:"text-[10px] font-bold text-emerald-600 uppercase tracking-tighter",children:"Batch operations completed"})]})]})})})},Lg=({columns:e=[],data:t=[],loading:n=!1,emptyMessage:s="No patterns detected",onRowClick:r})=>c.jsx("div",{className:"glass-card shadow-2xl p-0 overflow-hidden",children:c.jsx("div",{className:"overflow-x-auto custom-scrollbar",children:c.jsxs("table",{className:"w-full text-left border-collapse",children:[c.jsx("thead",{children:c.jsx("tr",{className:"border-b border-border bg-background/50",children:e.map((o,i)=>c.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))})}),c.jsx("tbody",{className:"divide-y divide-border",children:n?[...Array(5)].map((o,i)=>c.jsx("tr",{className:"animate-pulse",children:c.jsx("td",{colSpan:e.length,className:"px-8 py-8",children:c.jsx("div",{className:"h-4 bg-secondary rounded-full w-full"})})},i)):t.length===0?c.jsx("tr",{children:c.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)=>c.jsx(F.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,l)=>c.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},l))},o.id||i))})]})})}),Ig=({tags:e=[],onChange:t,label:n,placeholder:s="Add tags...",maxTags:r=10,className:o})=>{const[i,a]=w.useState(""),[l,u]=w.useState(!1),d=w.useRef(null),f=w.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 v=[...e,y];t&&t(v),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((v,b)=>b!==p);t&&t(y)},g=()=>{f.current&&f.current.focus()};return c.jsxs("div",{className:D("space-y-1.5 w-full text-left",o),children:[n&&c.jsx("label",{className:"text-[10px] font-black uppercase tracking-widest text-muted-foreground pl-0.5",children:n}),c.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",l?"border-primary bg-card/85 ring-1 ring-primary/20":"bg-white/40 border-border dark:bg-black/20 hover:border-primary/50"),children:[c.jsx(ue,{children:e.map((p,y)=>c.jsxs(F.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:[c.jsx("span",{children:p}),c.jsx("button",{type:"button",onClick:v=>{v.stopPropagation(),m(y)},className:"hover:bg-primary/20 rounded text-primary hover:text-foreground shrink-0 transition-colors p-0.5",children:c.jsx(Ve,{size:10})})]},p))}),c.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]"})]})]})},_g=({tabs:e=[],activeTab:t,onChange:n,className:s})=>c.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 c.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&&c.jsx(F.div,{layoutId:"active-tab-highlight",className:"absolute inset-0 bg-primary rounded-xl -z-10",transition:{type:"spring",stiffness:380,damping:30}})]},r.value)})}),jl={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"},Og=({title:e,timestamp:t,description:n,status:s="pending",icon:r,isLast:o=!1})=>c.jsxs("div",{className:"relative flex gap-4 text-left group",children:[!o&&c.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"}),c.jsx("div",{className:"relative flex items-center justify-center shrink-0 w-6 h-6 mt-1",children:r?c.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:c.jsx(r,{size:12})}):c.jsx("span",{className:D("z-10 w-3 h-3 rounded-full ring-4 transition-all duration-300",jl[s]||jl.pending)})}),c.jsxs("div",{className:"flex-1 pb-6 space-y-1",children:[c.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-1",children:[c.jsx("h4",{className:"text-sm font-bold text-foreground transition-colors group-hover:text-primary",children:e}),t&&c.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&&c.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed font-medium",children:n})]})]}),Fg=({children:e,className:t})=>{const n=w.Children.toArray(e);return c.jsx("div",{className:D("space-y-0.5",t),children:n.map((s,r)=>w.isValidElement(s)?w.cloneElement(s,{isLast:r===n.length-1}):s)})},Cl={success:c.jsx(Rt,{size:20,className:"text-green-500"}),error:c.jsx(mr,{size:20,className:"text-red-500"}),warning:c.jsx(Tn,{size:20,className:"text-amber-500"}),info:c.jsx(Dt,{size:20,className:"text-blue-500"}),default:c.jsx(Dt,{size:20,className:"text-foreground"})},Nl={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"},zg=({toasts:e,removeToast:t})=>c.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:c.jsx(ue,{children:e.map(n=>c.jsxs(F.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 ${Nl[n.variant]||Nl.default}`,children:[c.jsx("div",{className:"mt-0.5 shrink-0",children:Cl[n.variant]||Cl.default}),c.jsxs("div",{className:"flex-1",children:[n.title&&c.jsx("h4",{className:"font-bold text-sm text-foreground mb-1",children:n.title}),n.description&&c.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:n.description})]}),c.jsx("button",{onClick:()=>t(n.id),className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors cursor-pointer",children:c.jsx(Ve,{size:16})})]},n.id))})}),El=w.createContext(),Bg=()=>{const e=w.useContext(El);if(!e)throw new Error("useToast must be used within a ToastProvider");return e},$g=({children:e})=>{const[t,n]=w.useState([]),s=w.useCallback(({title:i,description:a,variant:l="default",duration:u=5e3})=>{const d=Math.random().toString(36).substr(2,9);n(f=>[...f,{id:d,title:i,description:a,variant:l,duration:u}]),u!==1/0&&setTimeout(()=>{r(d)},u)},[]),r=w.useCallback(i=>{n(a=>a.filter(l=>l.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 c.jsxs(El.Provider,{value:{toast:o},children:[e,c.jsx(zg,{toasts:t,removeToast:r})]})};L.Accordion=Fm,L.Alert=zm,L.AuthPage=$m,L.Avatar=Bm,L.Badge=Ha,L.Button=be,L.Card=Et,L.Checkbox=Gs,L.ConfirmationModal=Wm,L.Dropdown=Um,L.Dropzone=Gm,L.Input=Je,L.Modal=Ka,L.NotificationCenter=Hm,L.Pagination=Km,L.PortalTooltip=Ym,L.ProgressCircle=qm,L.Radio=Xm,L.Sidebar=kg,L.SidebarItem=Sg,L.Slider=Pg,L.Spinner=Ag,L.SplitView=Ng,L.SplitViewItem=Tg,L.SplitViewSkeleton=Cg,L.StatsCard=Mg,L.Switch=Rg,L.SyncProgressHUD=Vg,L.SyncProvider=Dg,L.Table=Lg,L.Tabs=_g,L.TagInput=Ig,L.ThemeProvider=wg,L.Timeline=Fg,L.TimelineItem=Og,L.ToastProvider=$g,L.cn=D,L.useSync=Tl,L.useTheme=bl,L.useToast=Bg,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})}));
188
+ `})]})]})},nm=({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:M("flex items-center justify-center",t),children:l.jsxs("svg",{className:M("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"})]})})},sm=({title:e,value:t,change:n,trend:s="up",description:r,icon:o,className:i})=>l.jsxs(bt,{className:M("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:M("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(Ia,{size:10}),n]}),r&&l.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:r})]})]})]}),rm=({checked:e=!1,onChange:t,label:n,className:s})=>l.jsxs("label",{className:M("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(O.div,{className:M("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(O.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})]}),ba=b.createContext(),im=({children:e})=>{const[t,n]=b.useState([]),[s,r]=b.useState(-1),[o,i]=b.useState("IDLE"),[a,c]=b.useState(""),[d,u]=b.useState({success:0,failed:0,skipped:0,noLedger:0,items:[]}),[f,h]=b.useState(null),m=b.useRef(!1),g=(v,y="",T)=>{n(v),c(y||"Batch Processing"),r(0),i("SYNCING"),u({success:0,failed:0,skipped:0,noLedger:0,items:[]}),h(()=>T)},p=()=>{n([]),r(-1),i("IDLE"),u({success:0,failed:0,skipped:0,noLedger:0,items:[]}),h(null)},x=async()=>{if(s<0||s>=t.length||m.current||!f)return;m.current=!0;const v=t[s];try{const y=await f(v),T=typeof y=="string"?y:y.status||"SUCCESS",S=(y==null?void 0:y.message)||"",E=(y==null?void 0:y.name)||v.name||"Task Item",z=(y==null?void 0:y.detail)||v.detail||"";u(j=>{const V=T.toLowerCase()==="success"?"success":T.toLowerCase()==="failed"?"failed":T.toLowerCase()==="skipped"?"skipped":"noLedger";return{...j,[V]:j[V]+1,items:[{name:E,detail:z,status:T,message:S},...j.items]}})}catch(y){console.error("Task Execution Failed:",y),u(T=>({...T,failed:T.failed+1,items:[{name:v.name||"Task Item",detail:v.detail||"",status:"FAILED",message:y.message||"Execution Error"},...T.items]}))}finally{m.current=!1,s+1<t.length?r(y=>y+1):i("COMPLETED")}};b.useEffect(()=>{o==="SYNCING"&&x()},[s,o,f]);const k=t.length>0?Math.round((s+(o==="COMPLETED"?1:0))/t.length*100):0;return l.jsx(ba.Provider,{value:{queue:t,currentIndex:s,status:o,results:d,batchName:a,progress:k,addToQueue:g,clearQueue:p},children:e})},va=()=>{const e=b.useContext(ba);if(!e)throw new Error("useSync must be used within a SyncProvider");return e},om=()=>{const{status:e,results:t,currentIndex:n,queue:s,progress:r,batchName:o,clearQueue:i}=va(),[a,c]=b.useState(!1),[d,u]=b.useState(!1);if(e==="IDLE")return null;const f=s[n]||{};return l.jsx(oe,{children:l.jsx(O.div,{initial:{y:100,opacity:0},animate:{y:0,opacity:1},exit:{y:100,opacity:0},className:M("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",d&&!a&&"w-[400px] max-h-[500px]"),onClick:()=>a&&c(!1),children:a?l.jsxs("div",{className:"relative",children:[l.jsx(zs,{className:M("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(zs,{className:M("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(),u(!d)},className:M("p-1 hover:bg-secondary rounded-md text-muted-foreground transition-colors cursor-pointer",d&&"bg-primary/10 text-primary"),title:"View Logs",children:l.jsx(rt,{className:M("transition-transform",d&&"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(Ya,{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})})]})]}),!d&&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(O.div,{initial:{width:0},animate:{width:`${r}%`},className:"h-full bg-primary"})})]}),d?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})]})]}),!d&&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(Fa,{className:"text-emerald-500",size:16}),l.jsx("p",{className:"text-[10px] font-bold text-emerald-600 uppercase tracking-tighter",children:"Batch operations completed"})]})]})})})},am=({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(O.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))})]})})}),lm=({tags:e=[],onChange:t,label:n,placeholder:s="Add tags...",maxTags:r=10,className:o})=>{const[i,a]=b.useState(""),[c,d]=b.useState(!1),u=b.useRef(null),f=b.useRef(null),h=p=>{if(p.key==="Enter"||p.key===","){p.preventDefault();const x=i.trim().replace(/,/g,"");if(x&&!e.includes(x)&&e.length<r){const k=[...e,x];t&&t(k),a("")}}else if(p.key==="Backspace"&&!i&&e.length>0){p.preventDefault();const x=e.slice(0,-1);t&&t(x)}},m=p=>{const x=e.filter((k,v)=>v!==p);t&&t(x)},g=()=>{f.current&&f.current.focus()};return l.jsxs("div",{className:M("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:u,onClick:g,className:M("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(oe,{children:e.map((p,x)=>l.jsxs(O.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:k=>{k.stopPropagation(),m(x)},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:()=>d(!0),onBlur:()=>d(!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]"})]})]})},cm=({tabs:e=[],activeTab:t,onChange:n,className:s})=>l.jsx("div",{className:M("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:M("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(O.div,{layoutId:"active-tab-highlight",className:"absolute inset-0 bg-primary rounded-xl -z-10",transition:{type:"spring",stiffness:380,damping:30}})]},r.value)})}),wa={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"},dm=({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:M("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:M("z-10 w-3 h-3 rounded-full ring-4 transition-all duration-300",wa[s]||wa.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})]})]}),um=({children:e,className:t})=>{const n=b.Children.toArray(e);return l.jsx("div",{className:M("space-y-0.5",t),children:n.map((s,r)=>b.isValidElement(s)?b.cloneElement(s,{isLast:r===n.length-1}):s)})},ka={success:l.jsx(kt,{size:20,className:"text-green-500"}),error:l.jsx(Is,{size:20,className:"text-red-500"}),warning:l.jsx(on,{size:20,className:"text-amber-500"}),info:l.jsx(jt,{size:20,className:"text-blue-500"}),default:l.jsx(jt,{size:20,className:"text-foreground"})},ja={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"},fm=({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(oe,{children:e.map(n=>l.jsxs(O.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 ${ja[n.variant]||ja.default}`,children:[l.jsx("div",{className:"mt-0.5 shrink-0",children:ka[n.variant]||ka.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=b.createContext(),hm=()=>{const e=b.useContext(Ta);if(!e)throw new Error("useToast must be used within a ToastProvider");return e},mm=({children:e})=>{const[t,n]=b.useState([]),s=b.useCallback(({title:i,description:a,variant:c="default",duration:d=5e3})=>{const u=Math.random().toString(36).substr(2,9);n(f=>[...f,{id:u,title:i,description:a,variant:c,duration:d}]),d!==1/0&&setTimeout(()=>{r(u)},d)},[]),r=b.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(fm,{toasts:t,removeToast:r})]})};L.Accordion=Rh,L.Alert=Ih,L.AuthPage=Oh,L.Avatar=zh,L.Badge=ma,L.Button=xe,L.Card=bt,L.Checkbox=Ns,L.ConfirmationModal=_h,L.Dropdown=Fh,L.Dropzone=Bh,L.Input=Ue,L.Modal=pa,L.NotificationCenter=$h,L.Pagination=Wh,L.PortalTooltip=Uh,L.ProgressCircle=Gh,L.Radio=Yh,L.Sidebar=Hh,L.SidebarItem=Xh,L.Slider=tm,L.Spinner=nm,L.SplitView=Qh,L.SplitViewItem=qh,L.SplitViewSkeleton=Jh,L.StatsCard=sm,L.Switch=rm,L.SyncProgressHUD=om,L.SyncProvider=im,L.Table=am,L.Tabs=cm,L.TagInput=lm,L.ThemeProvider=Kh,L.Timeline=um,L.TimelineItem=dm,L.ToastProvider=mm,L.cn=M,L.useSync=va,L.useTheme=xa,L.useToast=hm,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})}));
200
189
  //# sourceMappingURL=renderloom.umd.cjs.map