@mathwiz/ui-components 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,77 +1,71 @@
1
- (function(K,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):(K=typeof globalThis<"u"?globalThis:K||self,b(K.MathwizUIComponents={},K.React,K.ReactDOM))})(this,(function(K,b,Ic){"use strict";function Oc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Be=Oc(b);var nn={exports:{}},_t={};/**
1
+ (function(v,R){typeof exports=="object"&&typeof module<"u"?R(exports,require("react"),require("@heroui/progress"),require("@heroui/card"),require("@heroui/react")):typeof define=="function"&&define.amd?define(["exports","react","@heroui/progress","@heroui/card","@heroui/react"],R):(v=typeof globalThis<"u"?globalThis:v||self,R(v.MathwizUIComponents={},v.React,v.progress,v.card,v.react))})(this,(function(v,R,Jn,Ke,ye){"use strict";var Oe={exports:{}},xe={};/**
2
2
  * @license React
3
- * react-jsx-runtime.production.js
3
+ * react-jsx-runtime.production.min.js
4
4
  *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
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 ro;function Lc(){if(ro)return _t;ro=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,s,o){var i=null;if(o!==void 0&&(i=""+o),s.key!==void 0&&(i=""+s.key),"key"in s){o={};for(var a in s)a!=="key"&&(o[a]=s[a])}else o=s;return s=o.ref,{$$typeof:e,type:r,key:i,ref:s!==void 0?s:null,props:o}}return _t.Fragment=t,_t.jsx=n,_t.jsxs=n,_t}var Mt={};/**
9
+ */var wt;function Gn(){if(wt)return xe;wt=1;var e=R,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,r=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(l,m,f){var u,h={},x=null,O=null;f!==void 0&&(x=""+f),m.key!==void 0&&(x=""+m.key),m.ref!==void 0&&(O=m.ref);for(u in m)s.call(m,u)&&!i.hasOwnProperty(u)&&(h[u]=m[u]);if(l&&l.defaultProps)for(u in m=l.defaultProps,m)h[u]===void 0&&(h[u]=m[u]);return{$$typeof:t,type:l,key:x,ref:O,props:h,_owner:r.current}}return xe.Fragment=n,xe.jsx=o,xe.jsxs=o,xe}var we={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
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 so;function Dc(){return so||(so=1,process.env.NODE_ENV!=="production"&&(function(){function e(P){if(P==null)return null;if(typeof P=="function")return P.$$typeof===W?null:P.displayName||P.name||null;if(typeof P=="string")return P;switch(P){case v:return"Fragment";case E:return"Profiler";case y:return"StrictMode";case A:return"Suspense";case I:return"SuspenseList";case V:return"Activity"}if(typeof P=="object")switch(typeof P.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),P.$$typeof){case p:return"Portal";case _:return(P.displayName||"Context")+".Provider";case N:return(P._context.displayName||"Context")+".Consumer";case O:var D=P.render;return P=P.displayName,P||(P=D.displayName||D.name||"",P=P!==""?"ForwardRef("+P+")":"ForwardRef"),P;case $:return D=P.displayName||null,D!==null?D:e(P.type)||"Memo";case C:D=P._payload,P=P._init;try{return e(P(D))}catch{}}return null}function t(P){return""+P}function n(P){try{t(P);var D=!1}catch{D=!0}if(D){D=console;var z=D.error,U=typeof Symbol=="function"&&Symbol.toStringTag&&P[Symbol.toStringTag]||P.constructor.name||"Object";return z.call(D,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",U),t(P)}}function r(P){if(P===v)return"<>";if(typeof P=="object"&&P!==null&&P.$$typeof===C)return"<...>";try{var D=e(P);return D?"<"+D+">":"<...>"}catch{return"<...>"}}function s(){var P=h.A;return P===null?null:P.getOwner()}function o(){return Error("react-stack-top-frame")}function i(P){if(k.call(P,"key")){var D=Object.getOwnPropertyDescriptor(P,"key").get;if(D&&D.isReactWarning)return!1}return P.key!==void 0}function a(P,D){function z(){L||(L=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",D))}z.isReactWarning=!0,Object.defineProperty(P,"key",{get:z,configurable:!0})}function c(){var P=e(this.type);return g[P]||(g[P]=!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.")),P=this.props.ref,P!==void 0?P:null}function u(P,D,z,U,Y,Z,ie,J){return z=Z.ref,P={$$typeof:w,type:P,key:D,props:Z,_owner:Y},(z!==void 0?z:null)!==null?Object.defineProperty(P,"ref",{enumerable:!1,get:c}):Object.defineProperty(P,"ref",{enumerable:!1,value:null}),P._store={},Object.defineProperty(P._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(P,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(P,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ie}),Object.defineProperty(P,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:J}),Object.freeze&&(Object.freeze(P.props),Object.freeze(P)),P}function l(P,D,z,U,Y,Z,ie,J){var Q=D.children;if(Q!==void 0)if(U)if(j(Q)){for(U=0;U<Q.length;U++)d(Q[U]);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 d(Q);if(k.call(D,"key")){Q=e(P);var le=Object.keys(D).filter(function(we){return we!=="key"});U=0<le.length?"{key: someKey, "+le.join(": ..., ")+": ...}":"{key: someKey}",B[Q+U]||(le=0<le.length?"{"+le.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var vt;function Vn(){return vt||(vt=1,process.env.NODE_ENV!=="production"&&(function(){var e=R,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),l=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),O=Symbol.for("react.offscreen"),p=Symbol.iterator,y="@@iterator";function g(a){if(a===null||typeof a!="object")return null;var _=p&&a[p]||a[y];return typeof _=="function"?_:null}var E=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function k(a){{for(var _=arguments.length,b=new Array(_>1?_-1:0),S=1;S<_;S++)b[S-1]=arguments[S];N("error",a,b)}}function N(a,_,b){{var S=E.ReactDebugCurrentFrame,T=S.getStackAddendum();T!==""&&(_+="%s",b=b.concat([T]));var L=b.map(function(U){return String(U)});L.unshift("Warning: "+_),Function.prototype.apply.call(console[a],console,L)}}var P=!1,A=!1,I=!1,w=!1,F=!1,q;q=Symbol.for("react.module.reference");function ne(a){return!!(typeof a=="string"||typeof a=="function"||a===s||a===i||F||a===r||a===f||a===u||w||a===O||P||A||I||typeof a=="object"&&a!==null&&(a.$$typeof===x||a.$$typeof===h||a.$$typeof===o||a.$$typeof===l||a.$$typeof===m||a.$$typeof===q||a.getModuleId!==void 0))}function z(a,_,b){var S=a.displayName;if(S)return S;var T=_.displayName||_.name||"";return T!==""?b+"("+T+")":b}function D(a){return a.displayName||"Context"}function J(a){if(a==null)return null;if(typeof a.tag=="number"&&k("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case s:return"Fragment";case n:return"Portal";case i:return"Profiler";case r:return"StrictMode";case f:return"Suspense";case u:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case l:var _=a;return D(_)+".Consumer";case o:var b=a;return D(b._context)+".Provider";case m:return z(a,a.render,"ForwardRef");case h:var S=a.displayName||null;return S!==null?S:J(a.type)||"Memo";case x:{var T=a,L=T._payload,U=T._init;try{return J(U(L))}catch{return null}}}return null}var G=Object.assign,ae=0,Z,ke,se,Ne,He,re,ie;function he(){}he.__reactDisabledLog=!0;function ge(){{if(ae===0){Z=console.log,ke=console.info,se=console.warn,Ne=console.error,He=console.group,re=console.groupCollapsed,ie=console.groupEnd;var a={configurable:!0,enumerable:!0,value:he,writable:!0};Object.defineProperties(console,{info:a,log:a,warn:a,error:a,group:a,groupCollapsed:a,groupEnd:a})}ae++}}function We(){{if(ae--,ae===0){var a={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:G({},a,{value:Z}),info:G({},a,{value:ke}),warn:G({},a,{value:se}),error:G({},a,{value:Ne}),group:G({},a,{value:He}),groupCollapsed:G({},a,{value:re}),groupEnd:G({},a,{value:ie})})}ae<0&&k("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var mt=E.ReactCurrentDispatcher,pt;function ze(a,_,b){{if(pt===void 0)try{throw Error()}catch(T){var S=T.stack.trim().match(/\n( *(at )?)/);pt=S&&S[1]||""}return`
18
+ `+pt+a}}var ht=!1,Je;{var ho=typeof WeakMap=="function"?WeakMap:Map;Je=new ho}function jn(a,_){if(!a||ht)return"";{var b=Je.get(a);if(b!==void 0)return b}var S;ht=!0;var T=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var L;L=mt.current,mt.current=null,ge();try{if(_){var U=function(){throw Error()};if(Object.defineProperty(U.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(U,[])}catch(X){S=X}Reflect.construct(a,[],U)}else{try{U.call()}catch(X){S=X}a.call(U.prototype)}}else{try{throw Error()}catch(X){S=X}a()}}catch(X){if(X&&S&&typeof X.stack=="string"){for(var j=X.stack.split(`
19
+ `),V=S.stack.split(`
20
+ `),$=j.length-1,B=V.length-1;$>=1&&B>=0&&j[$]!==V[B];)B--;for(;$>=1&&B>=0;$--,B--)if(j[$]!==V[B]){if($!==1||B!==1)do if($--,B--,B<0||j[$]!==V[B]){var Q=`
21
+ `+j[$].replace(" at new "," at ");return a.displayName&&Q.includes("<anonymous>")&&(Q=Q.replace("<anonymous>",a.displayName)),typeof a=="function"&&Je.set(a,Q),Q}while($>=1&&B>=0);break}}}finally{ht=!1,mt.current=L,We(),Error.prepareStackTrace=T}var be=a?a.displayName||a.name:"",de=be?ze(be):"";return typeof a=="function"&&Je.set(a,de),de}function go(a,_,b){return jn(a,!1)}function _o(a){var _=a.prototype;return!!(_&&_.isReactComponent)}function Ge(a,_,b){if(a==null)return"";if(typeof a=="function")return jn(a,_o(a));if(typeof a=="string")return ze(a);switch(a){case f:return ze("Suspense");case u:return ze("SuspenseList")}if(typeof a=="object")switch(a.$$typeof){case m:return go(a.render);case h:return Ge(a.type,_,b);case x:{var S=a,T=S._payload,L=S._init;try{return Ge(L(T),_,b)}catch{}}}return""}var je=Object.prototype.hasOwnProperty,On={},Un=E.ReactDebugCurrentFrame;function Ve(a){if(a){var _=a._owner,b=Ge(a.type,a._source,_?_.type:null);Un.setExtraStackFrame(b)}else Un.setExtraStackFrame(null)}function bo(a,_,b,S,T){{var L=Function.call.bind(je);for(var U in a)if(L(a,U)){var j=void 0;try{if(typeof a[U]!="function"){var V=Error((S||"React class")+": "+b+" type `"+U+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[U]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw V.name="Invariant Violation",V}j=a[U](_,U,S,b,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch($){j=$}j&&!(j instanceof Error)&&(Ve(T),k("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",S||"React class",b,U,typeof j),Ve(null)),j instanceof Error&&!(j.message in On)&&(On[j.message]=!0,Ve(T),k("Failed %s type: %s",b,j.message),Ve(null))}}}var yo=Array.isArray;function gt(a){return yo(a)}function xo(a){{var _=typeof Symbol=="function"&&Symbol.toStringTag,b=_&&a[Symbol.toStringTag]||a.constructor.name||"Object";return b}}function wo(a){try{return Tn(a),!1}catch{return!0}}function Tn(a){return""+a}function Pn(a){if(wo(a))return k("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",xo(a)),Tn(a)}var In=E.ReactCurrentOwner,vo={key:!0,ref:!0,__self:!0,__source:!0},Ln,Dn;function Eo(a){if(je.call(a,"ref")){var _=Object.getOwnPropertyDescriptor(a,"ref").get;if(_&&_.isReactWarning)return!1}return a.ref!==void 0}function So(a){if(je.call(a,"key")){var _=Object.getOwnPropertyDescriptor(a,"key").get;if(_&&_.isReactWarning)return!1}return a.key!==void 0}function Ao(a,_){typeof a.ref=="string"&&In.current}function Co(a,_){{var b=function(){Ln||(Ln=!0,k("%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://reactjs.org/link/special-props)",_))};b.isReactWarning=!0,Object.defineProperty(a,"key",{get:b,configurable:!0})}}function Ro(a,_){{var b=function(){Dn||(Dn=!0,k("%s: `ref` 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://reactjs.org/link/special-props)",_))};b.isReactWarning=!0,Object.defineProperty(a,"ref",{get:b,configurable:!0})}}var ko=function(a,_,b,S,T,L,U){var j={$$typeof:t,type:a,key:_,ref:b,props:U,_owner:L};return j._store={},Object.defineProperty(j._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(j,"_self",{configurable:!1,enumerable:!1,writable:!1,value:S}),Object.defineProperty(j,"_source",{configurable:!1,enumerable:!1,writable:!1,value:T}),Object.freeze&&(Object.freeze(j.props),Object.freeze(j)),j};function No(a,_,b,S,T){{var L,U={},j=null,V=null;b!==void 0&&(Pn(b),j=""+b),So(_)&&(Pn(_.key),j=""+_.key),Eo(_)&&(V=_.ref,Ao(_,T));for(L in _)je.call(_,L)&&!vo.hasOwnProperty(L)&&(U[L]=_[L]);if(a&&a.defaultProps){var $=a.defaultProps;for(L in $)U[L]===void 0&&(U[L]=$[L])}if(j||V){var B=typeof a=="function"?a.displayName||a.name||"Unknown":a;j&&Co(U,B),V&&Ro(U,B)}return ko(a,j,V,T,S,In.current,U)}}var _t=E.ReactCurrentOwner,Mn=E.ReactDebugCurrentFrame;function _e(a){if(a){var _=a._owner,b=Ge(a.type,a._source,_?_.type:null);Mn.setExtraStackFrame(b)}else Mn.setExtraStackFrame(null)}var bt;bt=!1;function yt(a){return typeof a=="object"&&a!==null&&a.$$typeof===t}function Fn(){{if(_t.current){var a=J(_t.current.type);if(a)return`
22
+
23
+ Check the render method of \``+a+"`."}return""}}function jo(a){return""}var $n={};function Oo(a){{var _=Fn();if(!_){var b=typeof a=="string"?a:a.displayName||a.name;b&&(_=`
24
+
25
+ Check the top-level render call using <`+b+">.")}return _}}function Bn(a,_){{if(!a._store||a._store.validated||a.key!=null)return;a._store.validated=!0;var b=Oo(_);if($n[b])return;$n[b]=!0;var S="";a&&a._owner&&a._owner!==_t.current&&(S=" It was passed a child from "+J(a._owner.type)+"."),_e(a),k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',b,S),_e(null)}}function qn(a,_){{if(typeof a!="object")return;if(gt(a))for(var b=0;b<a.length;b++){var S=a[b];yt(S)&&Bn(S,_)}else if(yt(a))a._store&&(a._store.validated=!0);else if(a){var T=g(a);if(typeof T=="function"&&T!==a.entries)for(var L=T.call(a),U;!(U=L.next()).done;)yt(U.value)&&Bn(U.value,_)}}}function Uo(a){{var _=a.type;if(_==null||typeof _=="string")return;var b;if(typeof _=="function")b=_.propTypes;else if(typeof _=="object"&&(_.$$typeof===m||_.$$typeof===h))b=_.propTypes;else return;if(b){var S=J(_);bo(b,a.props,"prop",S,a)}else if(_.PropTypes!==void 0&&!bt){bt=!0;var T=J(_);k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",T||"Unknown")}typeof _.getDefaultProps=="function"&&!_.getDefaultProps.isReactClassApproved&&k("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function To(a){{for(var _=Object.keys(a.props),b=0;b<_.length;b++){var S=_[b];if(S!=="children"&&S!=="key"){_e(a),k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",S),_e(null);break}}a.ref!==null&&(_e(a),k("Invalid attribute `ref` supplied to `React.Fragment`."),_e(null))}}var Hn={};function Wn(a,_,b,S,T,L){{var U=ne(a);if(!U){var j="";(a===void 0||typeof a=="object"&&a!==null&&Object.keys(a).length===0)&&(j+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var V=jo();V?j+=V:j+=Fn();var $;a===null?$="null":gt(a)?$="array":a!==void 0&&a.$$typeof===t?($="<"+(J(a.type)||"Unknown")+" />",j=" Did you accidentally export a JSX literal instead of a component?"):$=typeof a,k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",$,j)}var B=No(a,_,b,T,L);if(B==null)return B;if(U){var Q=_.children;if(Q!==void 0)if(S)if(gt(Q)){for(var be=0;be<Q.length;be++)qn(Q[be],a);Object.freeze&&Object.freeze(Q)}else k("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 qn(Q,a)}if(je.call(_,"key")){var de=J(a),X=Object.keys(_).filter(function(Fo){return Fo!=="key"}),xt=X.length>0?"{key: someKey, "+X.join(": ..., ")+": ...}":"{key: someKey}";if(!Hn[de+xt]){var Mo=X.length>0?"{"+X.join(": ..., ")+": ...}":"{}";k(`A props object containing a "key" prop is being spread into JSX:
18
26
  let props = %s;
19
27
  <%s {...props} />
20
28
  React keys must be passed directly to JSX without using spread:
21
29
  let props = %s;
22
- <%s key={someKey} {...props} />`,U,Q,le,Q),B[Q+U]=!0)}if(Q=null,z!==void 0&&(n(z),Q=""+z),i(D)&&(n(D.key),Q=""+D.key),"key"in D){z={};for(var ve in D)ve!=="key"&&(z[ve]=D[ve])}else z=D;return Q&&a(z,typeof P=="function"?P.displayName||P.name||"Unknown":P),u(P,Q,Z,Y,s(),z,ie,J)}function d(P){typeof P=="object"&&P!==null&&P.$$typeof===w&&P._store&&(P._store.validated=1)}var m=b,w=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),_=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),W=Symbol.for("react.client.reference"),h=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,k=Object.prototype.hasOwnProperty,j=Array.isArray,S=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(P){return P()}};var L,g={},M=m.react_stack_bottom_frame.bind(m,o)(),T=S(r(o)),B={};Mt.Fragment=v,Mt.jsx=function(P,D,z,U,Y){var Z=1e4>h.recentlyCreatedOwnerStacks++;return l(P,D,z,!1,U,Y,Z?Error("react-stack-top-frame"):M,Z?S(r(P)):T)},Mt.jsxs=function(P,D,z,U,Y){var Z=1e4>h.recentlyCreatedOwnerStacks++;return l(P,D,z,!0,U,Y,Z?Error("react-stack-top-frame"):M,Z?S(r(P)):T)}})()),Mt}var oo;function jc(){return oo||(oo=1,process.env.NODE_ENV==="production"?nn.exports=Lc():nn.exports=Dc()),nn.exports}var f=jc();const io=({progress:e,variant:t="solid",size:n="md",radius:r="md",children:s,className:o="",...i})=>{const c=e!==void 0?(l=>l===0?"button--primary":l===100?"button--success":"button--secondary")(e):"button--primary",u=["button",`button--${n}`,`button--${t}`,`button--radius-${r}`,c,o].filter(Boolean).join(" ");return f.jsx("button",{type:"button",className:u,"data-progress":e,...i,children:s})};function rn(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,s=Be.createContext(void 0);s.displayName=r;function o(){var i;const a=Be.useContext(s);if(!a&&t){const c=new Error(n);throw c.name="ContextError",(i=Error.captureStackTrace)==null||i.call(Error,c,o),c}return a}return[s.Provider,o,s]}function ze(e){const t=b.useRef(null);return b.useImperativeHandle(e,()=>t.current),t}process.env.NODE_ENV,process.env.NODE_ENV;var ae=e=>e?"true":void 0;function ao(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=ao(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Ie(...e){for(var t=0,n,r,s="";t<e.length;)(n=e[t++])&&(r=ao(n))&&(s&&(s+=" "),s+=r);return s}var Vc=e=>e?.length<=4?e:e?.slice(0,3);function Fc(e){return`${e}-${Math.floor(Math.random()*1e6)}`}function tr(e){if(!e||typeof e!="object")return"";try{return JSON.stringify(e)}catch{return""}}function Rc(e,t,n){return Math.min(Math.max(e,t),n)}function Uc(e,t=100){return Math.min(Math.max(e,0),t)}function nr(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}var lo=new Map;function Bc(e,t){if(e===t)return e;let n=lo.get(e);if(n)return n.forEach(s=>s.current=t),t;let r=lo.get(t);return r?(r.forEach(s=>s.current=e),e):t}function ot(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let s in r){let o=t[s],i=r[s];typeof o=="function"&&typeof i=="function"&&s[0]==="o"&&s[1]==="n"&&s.charCodeAt(2)>=65&&s.charCodeAt(2)<=90?t[s]=nr(o,i):(s==="className"||s==="UNSAFE_className")&&typeof o=="string"&&typeof i=="string"?t[s]=Ie(o,i):s==="id"&&o&&i?t.id=Bc(o,i):t[s]=i!==void 0?i:o}}return t}function zc(){const e=()=>()=>{};return Be.useSyncExternalStore(e,()=>!0,()=>!1)}var Gc=new Set(["id","type","style","title","role","tabIndex","htmlFor","width","height","abbr","accept","acceptCharset","accessKey","action","allowFullScreen","allowTransparency","alt","async","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","challenge","charset","checked","cite","class","className","cols","colSpan","command","content","contentEditable","contextMenu","controls","coords","crossOrigin","data","dateTime","default","defer","dir","disabled","download","draggable","dropzone","encType","enterKeyHint","for","form","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","headers","hidden","high","href","hrefLang","httpEquiv","icon","inputMode","isMap","itemId","itemProp","itemRef","itemScope","itemType","kind","label","lang","list","loop","manifest","max","maxLength","media","mediaGroup","method","min","minLength","multiple","muted","name","noValidate","open","optimum","pattern","ping","placeholder","poster","preload","radioGroup","referrerPolicy","readOnly","rel","required","rows","rowSpan","sandbox","scope","scoped","scrolling","seamless","selected","shape","size","sizes","slot","sortable","span","spellCheck","src","srcDoc","srcSet","start","step","target","translate","typeMustMatch","useMap","value","wmode","wrap"]),Kc=new Set(["onCopy","onCut","onPaste","onLoad","onError","onWheel","onScroll","onCompositionEnd","onCompositionStart","onCompositionUpdate","onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onSubmit","onClick","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onPointerDown","onPointerEnter","onPointerLeave","onPointerUp","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionEnd"]),co=/^(data-.*)$/,Hc=/^(aria-.*)$/,sn=/^(on[A-Z].*)$/;function Nt(e,t={}){let{labelable:n=!0,enabled:r=!0,propNames:s,omitPropNames:o,omitEventNames:i,omitDataProps:a,omitEventProps:c}=t,u={};if(!r)return e;for(const l in e)o?.has(l)||i?.has(l)&&sn.test(l)||sn.test(l)&&!Kc.has(l)||a&&co.test(l)||c&&sn.test(l)||(Object.prototype.hasOwnProperty.call(e,l)&&(Gc.has(l)||n&&Hc.test(l)||s?.has(l)||co.test(l))||sn.test(l))&&(u[l]=e[l]);return u}var[Gy,It]=rn({name:"ProviderContext",strict:!1});const Wc=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),qc=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function Yc(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return Wc.has(n.script)}let t=e.split("-")[0];return qc.has(t)}const on={prefix:String(Math.round(Math.random()*1e10)),current:0},uo=b.createContext(on),Xc=b.createContext(!1);let Jc=!!(typeof window<"u"&&window.document&&window.document.createElement),rr=new WeakMap;function Zc(e=!1){let t=b.useContext(uo),n=b.useRef(null);if(n.current===null&&!e){var r,s;let o=(s=b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||s===void 0||(r=s.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(o){let i=rr.get(o);i==null?rr.set(o,{id:t.current,state:o.memoizedState}):o.memoizedState!==i.state&&(t.current=i.id,rr.delete(o))}n.current=++t.current}return n.current}function Qc(e){let t=b.useContext(uo);t===on&&!Jc&&process.env.NODE_ENV!=="production"&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=Zc(!!e),r=t===on&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${n}`}function eu(e){let t=b.useId(),[n]=b.useState(fo()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${on.prefix}`;return e||`${r}-${t}`}const tu=typeof b.useId=="function"?eu:Qc;function nu(){return!1}function ru(){return!0}function su(e){return()=>{}}function fo(){return typeof b.useSyncExternalStore=="function"?b.useSyncExternalStore(su,nu,ru):b.useContext(Xc)}const ou=Symbol.for("react-aria.i18n.locale");function po(){let e=typeof window<"u"&&window[ou]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:Yc(e)?"rtl":"ltr"}}let sr=po(),Ot=new Set;function mo(){sr=po();for(let e of Ot)e(sr)}function iu(){let e=fo(),[t,n]=b.useState(sr);return b.useEffect(()=>(Ot.size===0&&window.addEventListener("languagechange",mo),Ot.add(n),()=>{Ot.delete(n),Ot.size===0&&window.removeEventListener("languagechange",mo)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const au=b.createContext(null);function lu(){let e=iu();return b.useContext(au)||e}function cu(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function uu(e,t,n){cu(e,t),t.set(e,n)}const an=typeof document<"u"?b.useLayoutEffect:()=>{};var or;const du=(or=b.useInsertionEffect)!==null&&or!==void 0?or:an;function Oe(e){const t=b.useRef(null);return du(()=>{t.current=e},[e]),b.useCallback((...n)=>{const r=t.current;return r?.(...n)},[])}let fu=!!(typeof window<"u"&&window.document&&window.document.createElement),it=new Map,Lt;typeof FinalizationRegistry<"u"&&(Lt=new FinalizationRegistry(e=>{it.delete(e)}));function ir(e){let[t,n]=b.useState(e),r=b.useRef(null),s=tu(t),o=b.useRef(null);if(Lt&&Lt.register(o,s),fu){const i=it.get(s);i&&!i.includes(r)?i.push(r):it.set(s,[r])}return an(()=>{let i=s;return()=>{Lt&&Lt.unregister(o),it.delete(i)}},[s]),b.useEffect(()=>{let i=r.current;return i&&n(i),()=>{i&&(r.current=null)}}),s}function pu(e,t){if(e===t)return e;let n=it.get(e);if(n)return n.forEach(s=>s.current=t),t;let r=it.get(t);return r?(r.forEach(s=>s.current=e),e):t}function ho(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const ce=e=>{var t;return(t=e?.ownerDocument)!==null&&t!==void 0?t:document},ge=e=>e&&"window"in e&&e.window===e?e:ce(e).defaultView||window;function mu(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function hu(e){return mu(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let gu=!1;function ar(){return gu}function re(e,t){if(!ar())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:hu(n)?n=n.host:n=n.parentNode}return!1}const Dt=(e=document)=>{var t;if(!ar())return e.activeElement;let n=e.activeElement;for(;n&&"shadowRoot"in n&&(!((t=n.shadowRoot)===null||t===void 0)&&t.activeElement);)n=n.shadowRoot.activeElement;return n};function ee(e){return ar()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function go(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=go(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function bu(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=go(e))&&(r&&(r+=" "),r+=t);return r}function Ge(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let s in r){let o=t[s],i=r[s];typeof o=="function"&&typeof i=="function"&&s[0]==="o"&&s[1]==="n"&&s.charCodeAt(2)>=65&&s.charCodeAt(2)<=90?t[s]=ho(o,i):(s==="className"||s==="UNSAFE_className")&&typeof o=="string"&&typeof i=="string"?t[s]=bu(o,i):s==="id"&&o&&i?t.id=pu(o,i):t[s]=i!==void 0?i:o}}return t}const yu=new Set(["id"]),vu=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),wu=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),xu=new Set(["dir","lang","hidden","inert","translate"]),bo=new Set(["onClick","onAuxClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionCancel","onTransitionEnd","onTransitionRun","onTransitionStart"]),Su=/^(data-.*)$/;function yo(e,t={}){let{labelable:n,isLink:r,global:s,events:o=s,propNames:i}=t,a={};for(const c in e)Object.prototype.hasOwnProperty.call(e,c)&&(yu.has(c)||n&&vu.has(c)||r&&wu.has(c)||s&&xu.has(c)||o&&bo.has(c)||c.endsWith("Capture")&&bo.has(c.slice(0,-7))||i?.has(c)||Su.test(c))&&(a[c]=e[c]);return a}function at(e){if(Tu())e.focus({preventScroll:!0});else{let t=Eu(e);e.focus(),Cu(t)}}let ln=null;function Tu(){if(ln==null){ln=!1;try{document.createElement("div").focus({get preventScroll(){return ln=!0,!0}})}catch{}}return ln}function Eu(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function Cu(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function cn(e){var t;if(typeof window>"u"||window.navigator==null)return!1;let n=(t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands;return Array.isArray(n)&&n.some(r=>e.test(r.brand))||e.test(window.navigator.userAgent)}function lr(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Ae(e){if(process.env.NODE_ENV==="test")return e;let t=null;return()=>(t==null&&(t=e()),t)}const lt=Ae(function(){return lr(/^Mac/i)}),Pu=Ae(function(){return lr(/^iPhone/i)}),vo=Ae(function(){return lr(/^iPad/i)||lt()&&navigator.maxTouchPoints>1}),cr=Ae(function(){return Pu()||vo()});Ae(function(){return lt()||cr()});const ku=Ae(function(){return cn(/AppleWebKit/i)&&!Au()}),Au=Ae(function(){return cn(/Chrome/i)}),wo=Ae(function(){return cn(/Android/i)}),$u=Ae(function(){return cn(/Firefox/i)});function jt(e,t,n=!0){var r,s;let{metaKey:o,ctrlKey:i,altKey:a,shiftKey:c}=t;$u()&&(!((s=window.event)===null||s===void 0||(r=s.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(lt()?o=!0:i=!0);let u=ku()&&lt()&&!vo()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:i,altKey:a,shiftKey:c}):new MouseEvent("click",{metaKey:o,ctrlKey:i,altKey:a,shiftKey:c,bubbles:!0,cancelable:!0});jt.isOpening=n,at(e),e.dispatchEvent(u),jt.isOpening=!1}jt.isOpening=!1;let Le=new Map,ur=new Set;function xo(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let s=Le.get(r.target);s||(s=new Set,Le.set(r.target,s),r.target.addEventListener("transitioncancel",n,{once:!0})),s.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let s=Le.get(r.target);if(s&&(s.delete(r.propertyName),s.size===0&&(r.target.removeEventListener("transitioncancel",n),Le.delete(r.target)),Le.size===0)){for(let o of ur)o();ur.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?xo():document.addEventListener("DOMContentLoaded",xo));function _u(){for(const[e]of Le)"isConnected"in e&&!e.isConnected&&Le.delete(e)}function So(e){requestAnimationFrame(()=>{_u(),Le.size===0?e():ur.add(e)})}function dr(){let e=b.useRef(new Map),t=b.useCallback((s,o,i,a)=>{let c=a?.once?(...u)=>{e.current.delete(i),i(...u)}:i;e.current.set(i,{type:o,eventTarget:s,fn:c,options:a}),s.addEventListener(o,c,a)},[]),n=b.useCallback((s,o,i,a)=>{var c;let u=((c=e.current.get(i))===null||c===void 0?void 0:c.fn)||i;s.removeEventListener(o,u,a),e.current.delete(i)},[]),r=b.useCallback(()=>{e.current.forEach((s,o)=>{n(s.eventTarget,s.type,o,s.options)})},[n]);return b.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function Mu(e,t){let{id:n,"aria-label":r,"aria-labelledby":s}=e;return n=ir(n),s&&r?s=[...new Set([n,...s.trim().split(/\s+/)])].join(" "):s&&(s=s.trim().split(/\s+/).join(" ")),!r&&!s&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":s}}function To(e,t){an(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function fr(e){return e.mozInputSource===0&&e.isTrusted?!0:wo()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Nu(e){return!wo()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}const Iu=typeof Element<"u"&&"checkVisibility"in Element.prototype;function Ou(e){const t=ge(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,s=n!=="none"&&r!=="hidden"&&r!=="collapse";if(s){const{getComputedStyle:o}=e.ownerDocument.defaultView;let{display:i,visibility:a}=o(e);s=i!=="none"&&a!=="hidden"&&a!=="collapse"}return s}function Lu(e,t){return!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function Eo(e,t){return Iu?e.checkVisibility():e.nodeName!=="#comment"&&Ou(e)&&Lu(e,t)&&(!e.parentElement||Eo(e.parentElement,e))}const Co=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"],Du=Co.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";Co.push('[tabindex]:not([tabindex="-1"]):not([disabled])');function ju(e){return e.matches(Du)&&Eo(e)&&!Vu(e)}function Vu(e){let t=e;for(;t!=null;){if(t instanceof t.ownerDocument.defaultView.HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}function Fu(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}let pr=new Map,mr=!1;try{mr=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let un=!1;try{un=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const Po={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class Ru{format(t){let n="";if(!mr&&this.options.signDisplay!=null?n=Bu(this.numberFormatter,this.options.signDisplay,t):n=this.numberFormatter.format(t),this.options.style==="unit"&&!un){var r;let{unit:s,unitDisplay:o="short",locale:i}=this.resolvedOptions();if(!s)return n;let a=(r=Po[s])===null||r===void 0?void 0:r[o];n+=a[i]||a.default}return n}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,n){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,n);if(n<t)throw new RangeError("End date must be >= start date");return`${this.format(t)} – ${this.format(n)}`}formatRangeToParts(t,n){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,n);if(n<t)throw new RangeError("End date must be >= start date");let r=this.numberFormatter.formatToParts(t),s=this.numberFormatter.formatToParts(n);return[...r.map(o=>({...o,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...s.map(o=>({...o,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!mr&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!un&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,n={}){this.numberFormatter=Uu(t,n),this.options=n}}function Uu(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${n}`),t.style==="unit"&&!un){var r;let{unit:i,unitDisplay:a="short"}=t;if(!i)throw new Error('unit option must be provided with style: "unit"');if(!(!((r=Po[i])===null||r===void 0)&&r[a]))throw new Error(`Unsupported unit ${i} with unitDisplay = ${a}`);t={...t,style:"decimal"}}let s=e+(t?Object.entries(t).sort((i,a)=>i[0]<a[0]?-1:1).join():"");if(pr.has(s))return pr.get(s);let o=new Intl.NumberFormat(e,t);return pr.set(s,o),o}function Bu(e,t,n){if(t==="auto")return e.format(n);if(t==="never")return e.format(Math.abs(n));{let r=!1;if(t==="always"?r=n>0||Object.is(n,0):t==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let s=e.format(-n),o=e.format(n),i=s.replace(o,"").replace(/\u200e|\u061C/,"");return[...i].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),s.replace(o,"!!!").replace(i,"+").replace("!!!",o)}else return e.format(n)}}function zu(e={}){let{locale:t}=lu();return b.useMemo(()=>new Ru(t,e),[t,e])}const ko=b.createContext({});function hr(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const gr=typeof window<"u",Ao=gr?b.useLayoutEffect:b.useEffect,dn=b.createContext(null);function Gu(e,t){e.indexOf(t)===-1&&e.push(t)}function Ku(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Ke=(e,t,n)=>n>t?t:n<e?e:n;function br(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let ct=()=>{},De=()=>{};process.env.NODE_ENV!=="production"&&(ct=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(br(t,n))},De=(e,t,n)=>{if(!e)throw new Error(br(t,n))});const $e={},$o=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Hu(e){return typeof e=="object"&&e!==null}const _o=e=>/^0[^.\s]+$/u.test(e);function yr(e){let t;return()=>(t===void 0&&(t=e()),t)}const ut=e=>e,Wu=(e,t)=>n=>t(e(n)),fn=(...e)=>e.reduce(Wu),Mo=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class No{constructor(){this.subscriptions=[]}add(t){return Gu(this.subscriptions,t),()=>Ku(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let o=0;o<s;o++){const i=this.subscriptions[o];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ee=e=>e*1e3,_e=e=>e/1e3;function Io(e,t){return t?e*(1e3/t):0}const Oo=new Set;function vr(e,t,n){e||Oo.has(t)||(console.warn(br(t,n)),Oo.add(t))}const Lo=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,qu=1e-7,Yu=12;function Xu(e,t,n,r,s){let o,i,a=0;do i=t+(n-t)/2,o=Lo(i,r,s)-e,o>0?n=i:t=i;while(Math.abs(o)>qu&&++a<Yu);return i}function Vt(e,t,n,r){if(e===t&&n===r)return ut;const s=o=>Xu(o,0,1,e,n);return o=>o===0||o===1?o:Lo(s(o),t,r)}const Do=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,jo=e=>t=>1-e(1-t),Vo=Vt(.33,1.53,.69,.99),wr=jo(Vo),Fo=Do(wr),Ro=e=>(e*=2)<1?.5*wr(e):.5*(2-Math.pow(2,-10*(e-1))),xr=e=>1-Math.sin(Math.acos(e)),Ju=jo(xr),Uo=Do(xr),Zu=Vt(.42,0,1,1),Qu=Vt(0,0,.58,1),Bo=Vt(.42,0,.58,1),ed=e=>Array.isArray(e)&&typeof e[0]!="number",zo=e=>Array.isArray(e)&&typeof e[0]=="number",Go={linear:ut,easeIn:Zu,easeInOut:Bo,easeOut:Qu,circIn:xr,circInOut:Uo,circOut:Ju,backIn:wr,backInOut:Fo,backOut:Vo,anticipate:Ro},td=e=>typeof e=="string",Ko=e=>{if(zo(e)){De(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,s]=e;return Vt(t,n,r,s)}else if(td(e))return De(Go[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Go[e];return e},pn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function nd(e,t){let n=new Set,r=new Set,s=!1,o=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(l){i.has(l)&&(u.schedule(l),e()),l(a)}const u={schedule:(l,d=!1,m=!1)=>{const p=m&&s?n:r;return d&&i.add(l),p.has(l)||p.add(l),l},cancel:l=>{r.delete(l),i.delete(l)},process:l=>{if(a=l,s){o=!0;return}s=!0,[n,r]=[r,n],n.forEach(c),n.clear(),s=!1,o&&(o=!1,u.process(l))}};return u}const rd=40;function Ho(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=pn.reduce((_,O)=>(_[O]=nd(o),_),{}),{setup:a,read:c,resolveKeyframes:u,preUpdate:l,update:d,preRender:m,render:w,postRender:p}=i,v=()=>{const _=$e.useManualTiming?s.timestamp:performance.now();n=!1,$e.useManualTiming||(s.delta=r?1e3/60:Math.max(Math.min(_-s.timestamp,rd),1)),s.timestamp=_,s.isProcessing=!0,a.process(s),c.process(s),u.process(s),l.process(s),d.process(s),m.process(s),w.process(s),p.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(v))},y=()=>{n=!0,r=!0,s.isProcessing||e(v)};return{schedule:pn.reduce((_,O)=>{const A=i[O];return _[O]=(I,$=!1,C=!1)=>(n||y(),A.schedule(I,$,C)),_},{}),cancel:_=>{for(let O=0;O<pn.length;O++)i[pn[O]].cancel(_)},state:s,steps:i}}const{schedule:xe,cancel:Sr,state:mn}=Ho(typeof requestAnimationFrame<"u"?requestAnimationFrame:ut,!0);let hn;function sd(){hn=void 0}const be={now:()=>(hn===void 0&&be.set(mn.isProcessing||$e.useManualTiming?mn.timestamp:performance.now()),hn),set:e=>{hn=e,queueMicrotask(sd)}},Wo=e=>t=>typeof t=="string"&&t.startsWith(e),qo=Wo("--"),od=Wo("var(--"),Tr=e=>od(e)?id.test(e.split("/*")[0].trim()):!1,id=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,dt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ft={...dt,transform:e=>Ke(0,1,e)},gn={...dt,default:1},Rt=e=>Math.round(e*1e5)/1e5,Er=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ad(e){return e==null}const ld=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Cr=(e,t)=>n=>!!(typeof n=="string"&&ld.test(n)&&n.startsWith(e)||t&&!ad(n)&&Object.prototype.hasOwnProperty.call(n,t)),Yo=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,o,i,a]=r.match(Er);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},cd=e=>Ke(0,255,e),Pr={...dt,transform:e=>Math.round(cd(e))},He={test:Cr("rgb","red"),parse:Yo("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Pr.transform(e)+", "+Pr.transform(t)+", "+Pr.transform(n)+", "+Rt(Ft.transform(r))+")"};function ud(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const kr={test:Cr("#"),parse:ud,transform:He.transform},Ut=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),je=Ut("deg"),ft=Ut("%"),H=Ut("px"),dd=Ut("vh"),fd=Ut("vw"),Xo={...ft,parse:e=>ft.parse(e)/100,transform:e=>ft.transform(e*100)},pt={test:Cr("hsl","hue"),parse:Yo("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ft.transform(Rt(t))+", "+ft.transform(Rt(n))+", "+Rt(Ft.transform(r))+")"},se={test:e=>He.test(e)||kr.test(e)||pt.test(e),parse:e=>He.test(e)?He.parse(e):pt.test(e)?pt.parse(e):kr.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?He.transform(e):pt.transform(e),getAnimatableNone:e=>{const t=se.parse(e);return t.alpha=0,se.transform(t)}},pd=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function md(e){return isNaN(e)&&typeof e=="string"&&(e.match(Er)?.length||0)+(e.match(pd)?.length||0)>0}const Jo="number",Zo="color",hd="var",gd="var(",Qo="${}",bd=/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 Bt(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let o=0;const a=t.replace(bd,c=>(se.test(c)?(r.color.push(o),s.push(Zo),n.push(se.parse(c))):c.startsWith(gd)?(r.var.push(o),s.push(hd),n.push(c)):(r.number.push(o),s.push(Jo),n.push(parseFloat(c))),++o,Qo)).split(Qo);return{values:n,split:a,indexes:r,types:s}}function ei(e){return Bt(e).values}function ti(e){const{split:t,types:n}=Bt(e),r=t.length;return s=>{let o="";for(let i=0;i<r;i++)if(o+=t[i],s[i]!==void 0){const a=n[i];a===Jo?o+=Rt(s[i]):a===Zo?o+=se.transform(s[i]):o+=s[i]}return o}}const yd=e=>typeof e=="number"?0:se.test(e)?se.getAnimatableNone(e):e;function vd(e){const t=ei(e);return ti(e)(t.map(yd))}const mt={test:md,parse:ei,createTransformer:ti,getAnimatableNone:vd};function Ar(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 wd({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,o=0,i=0;if(!t)s=o=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;s=Ar(c,a,e+1/3),o=Ar(c,a,e),i=Ar(c,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(i*255),alpha:r}}function bn(e,t){return n=>n>0?t:e}const yn=(e,t,n)=>e+(t-e)*n,$r=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},xd=[kr,He,pt],Sd=e=>xd.find(t=>t.test(e));function ni(e){const t=Sd(e);if(ct(!!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===pt&&(n=wd(n)),n}const ri=(e,t)=>{const n=ni(e),r=ni(t);if(!n||!r)return bn(e,t);const s={...n};return o=>(s.red=$r(n.red,r.red,o),s.green=$r(n.green,r.green,o),s.blue=$r(n.blue,r.blue,o),s.alpha=yn(n.alpha,r.alpha,o),He.transform(s))},_r=new Set(["none","hidden"]);function Td(e,t){return _r.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Ed(e,t){return n=>yn(e,t,n)}function Mr(e){return typeof e=="number"?Ed:typeof e=="string"?Tr(e)?bn:se.test(e)?ri:kd:Array.isArray(e)?si:typeof e=="object"?se.test(e)?ri:Cd:bn}function si(e,t){const n=[...e],r=n.length,s=e.map((o,i)=>Mr(o)(o,t[i]));return o=>{for(let i=0;i<r;i++)n[i]=s[i](o);return n}}function Cd(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=Mr(e[s])(e[s],t[s]));return s=>{for(const o in r)n[o]=r[o](s);return n}}function Pd(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],i=e.indexes[o][r[o]],a=e.values[i]??0;n[s]=a,r[o]++}return n}const kd=(e,t)=>{const n=mt.createTransformer(t),r=Bt(e),s=Bt(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?_r.has(e)&&!s.values.length||_r.has(t)&&!r.values.length?Td(e,t):fn(si(Pd(r,s),s.values),n):(ct(!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"),bn(e,t))};function oi(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?yn(e,t,n):Mr(e)(e,t)}const Ad=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>xe.update(t,n),stop:()=>Sr(t),now:()=>mn.isProcessing?mn.timestamp:be.now()}},ii=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)r+=Math.round(e(o/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},vn=2e4;function Nr(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<vn;)t+=n,r=e.next(t);return t>=vn?1/0:t}function $d(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(Nr(r),vn);return{type:"keyframes",ease:o=>r.next(s*o).value/t,duration:_e(s)}}const _d=5;function ai(e,t,n){const r=Math.max(t-_d,0);return Io(n-e(r),t-r)}const te={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},Ir=.001;function Md({duration:e=te.duration,bounce:t=te.bounce,velocity:n=te.velocity,mass:r=te.mass}){let s,o;ct(e<=Ee(te.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=Ke(te.minDamping,te.maxDamping,i),e=Ke(te.minDuration,te.maxDuration,_e(e)),i<1?(s=u=>{const l=u*i,d=l*e,m=l-n,w=Or(u,i),p=Math.exp(-d);return Ir-m/w*p},o=u=>{const d=u*i*e,m=d*n+n,w=Math.pow(i,2)*Math.pow(u,2)*e,p=Math.exp(-d),v=Or(Math.pow(u,2),i);return(-s(u)+Ir>0?-1:1)*((m-w)*p)/v}):(s=u=>{const l=Math.exp(-u*e),d=(u-n)*e+1;return-Ir+l*d},o=u=>{const l=Math.exp(-u*e),d=(n-u)*(e*e);return l*d});const a=5/e,c=Id(s,o,a);if(e=Ee(e),isNaN(c))return{stiffness:te.stiffness,damping:te.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:i*2*Math.sqrt(r*u),duration:e}}}const Nd=12;function Id(e,t,n){let r=n;for(let s=1;s<Nd;s++)r=r-e(r)/t(r);return r}function Or(e,t){return e*Math.sqrt(1-t*t)}const Od=["duration","bounce"],Ld=["stiffness","damping","mass"];function li(e,t){return t.some(n=>e[n]!==void 0)}function Dd(e){let t={velocity:te.velocity,stiffness:te.stiffness,damping:te.damping,mass:te.mass,isResolvedFromDuration:!1,...e};if(!li(e,Ld)&&li(e,Od))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,o=2*Ke(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:te.mass,stiffness:s,damping:o}}else{const n=Md(e);t={...t,...n,mass:te.mass},t.isResolvedFromDuration=!0}return t}function wn(e=te.visualDuration,t=te.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const o=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:c,damping:u,mass:l,duration:d,velocity:m,isResolvedFromDuration:w}=Dd({...n,velocity:-_e(n.velocity||0)}),p=m||0,v=u/(2*Math.sqrt(c*l)),y=i-o,E=_e(Math.sqrt(c/l)),N=Math.abs(y)<5;r||(r=N?te.restSpeed.granular:te.restSpeed.default),s||(s=N?te.restDelta.granular:te.restDelta.default);let _;if(v<1){const A=Or(E,v);_=I=>{const $=Math.exp(-v*E*I);return i-$*((p+v*E*y)/A*Math.sin(A*I)+y*Math.cos(A*I))}}else if(v===1)_=A=>i-Math.exp(-E*A)*(y+(p+E*y)*A);else{const A=E*Math.sqrt(v*v-1);_=I=>{const $=Math.exp(-v*E*I),C=Math.min(A*I,300);return i-$*((p+v*E*y)*Math.sinh(C)+A*y*Math.cosh(C))/A}}const O={calculatedDuration:w&&d||null,next:A=>{const I=_(A);if(w)a.done=A>=d;else{let $=A===0?p:0;v<1&&($=A===0?Ee(p):ai(_,A,I));const C=Math.abs($)<=r,V=Math.abs(i-I)<=s;a.done=C&&V}return a.value=a.done?i:I,a},toString:()=>{const A=Math.min(Nr(O),vn),I=ii($=>O.next(A*$).value,A,30);return A+"ms "+I},toTransition:()=>{}};return O}wn.applyToOptions=e=>{const t=$d(e,100,wn);return e.ease=t.ease,e.duration=Ee(t.duration),e.type="keyframes",e};function Lr({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:i,min:a,max:c,restDelta:u=.5,restSpeed:l}){const d=e[0],m={done:!1,value:d},w=C=>a!==void 0&&C<a||c!==void 0&&C>c,p=C=>a===void 0?c:c===void 0||Math.abs(a-C)<Math.abs(c-C)?a:c;let v=n*t;const y=d+v,E=i===void 0?y:i(y);E!==y&&(v=E-d);const N=C=>-v*Math.exp(-C/r),_=C=>E+N(C),O=C=>{const V=N(C),W=_(C);m.done=Math.abs(V)<=u,m.value=m.done?E:W};let A,I;const $=C=>{w(m.value)&&(A=C,I=wn({keyframes:[m.value,p(m.value)],velocity:ai(_,C,m.value),damping:s,stiffness:o,restDelta:u,restSpeed:l}))};return $(0),{calculatedDuration:null,next:C=>{let V=!1;return!I&&A===void 0&&(V=!0,O(C),$(C)),A!==void 0&&C>=A?I.next(C-A):(!V&&O(C),m)}}}function jd(e,t,n){const r=[],s=n||$e.mix||oi,o=e.length-1;for(let i=0;i<o;i++){let a=s(e[i],e[i+1]);if(t){const c=Array.isArray(t)?t[i]||ut:t;a=fn(c,a)}r.push(a)}return r}function Vd(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const o=e.length;if(De(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=jd(t,r,s),c=a.length,u=l=>{if(i&&l<e[0])return t[0];let d=0;if(c>1)for(;d<e.length-2&&!(l<e[d+1]);d++);const m=Mo(e[d],e[d+1],l);return a[d](m)};return n?l=>u(Ke(e[0],e[o-1],l)):u}function Fd(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Mo(0,t,r);e.push(yn(n,1,s))}}function Rd(e){const t=[0];return Fd(t,e.length-1),t}function Ud(e,t){return e.map(n=>n*t)}function Bd(e,t){return e.map(()=>t||Bo).splice(0,e.length-1)}function ht({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=ed(r)?r.map(Ko):Ko(r),o={done:!1,value:t[0]},i=Ud(n&&n.length===t.length?n:Rd(t),e),a=Vd(i,t,{ease:Array.isArray(s)?s:Bd(t,s)});return{calculatedDuration:e,next:c=>(o.value=a(c),o.done=c>=e,o)}}const zd=e=>e!==null;function Dr(e,{repeat:t,repeatType:n="loop"},r,s=1){const o=e.filter(zd),a=s<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||r===void 0?o[a]:r}const Gd={decay:Lr,inertia:Lr,tween:ht,keyframes:ht,spring:wn};function ci(e){typeof e.type=="string"&&(e.type=Gd[e.type])}class jr{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 Kd=e=>e/100;class Vr extends jr{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==be.now()&&this.tick(be.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;ci(t);const{type:n=ht,repeat:r=0,repeatDelay:s=0,repeatType:o,velocity:i=0}=t;let{keyframes:a}=t;const c=n||ht;process.env.NODE_ENV!=="production"&&c!==ht&&De(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),c!==ht&&typeof a[0]!="number"&&(this.mixKeyframes=fn(Kd,oi(a[0],a[1])),a=[0,100]);const u=c({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...a].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=Nr(u));const{calculatedDuration:l}=u;this.calculatedDuration=l,this.resolvedDuration=l+s,this.totalDuration=this.resolvedDuration*(r+1)-s,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:r,totalDuration:s,mixKeyframes:o,mirroredGenerator:i,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:l,repeat:d,repeatType:m,repeatDelay:w,type:p,onUpdate:v,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const E=this.currentTime-u*(this.playbackSpeed>=0?1:-1),N=this.playbackSpeed>=0?E<0:E>s;this.currentTime=Math.max(E,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let _=this.currentTime,O=r;if(d){const C=Math.min(this.currentTime,s)/a;let V=Math.floor(C),W=C%1;!W&&C>=1&&(W=1),W===1&&V--,V=Math.min(V,d+1),!!(V%2)&&(m==="reverse"?(W=1-W,w&&(W-=w/a)):m==="mirror"&&(O=i)),_=Ke(0,1,W)*a}const A=N?{done:!1,value:l[0]}:O.next(_);o&&(A.value=o(A.value));let{done:I}=A;!N&&c!==null&&(I=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const $=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return $&&p!==Lr&&(A.value=Dr(l,this.options,y,this.speed)),v&&v(A.value),$&&this.finish(),A}then(t,n){return this.finished.then(t,n)}get duration(){return _e(this.calculatedDuration)}get time(){return _e(this.currentTime)}set time(t){t=Ee(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(be.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=_e(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Ad,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),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(be.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Hd(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const We=e=>e*180/Math.PI,Fr=e=>{const t=We(Math.atan2(e[1],e[0]));return Rr(t)},Wd={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Fr,rotateZ:Fr,skewX:e=>We(Math.atan(e[1])),skewY:e=>We(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Rr=e=>(e=e%360,e<0&&(e+=360),e),ui=Fr,di=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),fi=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),qd={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:di,scaleY:fi,scale:e=>(di(e)+fi(e))/2,rotateX:e=>Rr(We(Math.atan2(e[6],e[5]))),rotateY:e=>Rr(We(Math.atan2(-e[2],e[0]))),rotateZ:ui,rotate:ui,skewX:e=>We(Math.atan(e[4])),skewY:e=>We(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ur(e){return e.includes("scale")?1:0}function Br(e,t){if(!e||e==="none")return Ur(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=qd,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Wd,s=a}if(!s)return Ur(t);const o=r[t],i=s[1].split(",").map(Xd);return typeof o=="function"?o(i):i[o]}const Yd=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Br(n,t)};function Xd(e){return parseFloat(e.trim())}const gt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],bt=new Set(gt),pi=e=>e===dt||e===H,Jd=new Set(["x","y","z"]),Zd=gt.filter(e=>!Jd.has(e));function Qd(e){const t=[];return Zd.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const qe={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Br(t,"x"),y:(e,{transform:t})=>Br(t,"y")};qe.translateX=qe.x,qe.translateY=qe.y;const Ye=new Set;let zr=!1,Gr=!1,Kr=!1;function mi(){if(Gr){const e=Array.from(Ye).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=Qd(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([o,i])=>{r.getValue(o)?.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Gr=!1,zr=!1,Ye.forEach(e=>e.complete(Kr)),Ye.clear()}function hi(){Ye.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Gr=!0)})}function ef(){Kr=!0,hi(),mi(),Kr=!1}class Hr{constructor(t,n,r,s,o,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=o,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(Ye.add(this),zr||(zr=!0,xe.read(hi),xe.resolveKeyframes(mi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const o=s?.get(),i=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const a=r.readValue(n,i);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=i),s&&o===void 0&&s.set(t[0])}Hd(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ye.delete(this)}cancel(){this.state==="scheduled"&&(Ye.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const tf=e=>e.startsWith("--");function nf(e,t,n){tf(t)?e.style.setProperty(t,n):e.style[t]=n}const rf=yr(()=>window.ScrollTimeline!==void 0),sf={};function of(e,t){const n=yr(e);return()=>sf[t]??n()}const gi=of(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),zt=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,bi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:zt([0,.65,.55,1]),circOut:zt([.55,0,1,.45]),backIn:zt([.31,.01,.66,-.59]),backOut:zt([.33,1.53,.69,.99])};function yi(e,t){if(e)return typeof e=="function"?gi()?ii(e,t):"ease-out":zo(e)?zt(e):Array.isArray(e)?e.map(n=>yi(n,t)||bi.easeOut):bi[e]}function af(e,t,n,{delay:r=0,duration:s=300,repeat:o=0,repeatType:i="loop",ease:a="easeOut",times:c}={},u=void 0){const l={[t]:n};c&&(l.offset=c);const d=yi(a,s);Array.isArray(d)&&(l.easing=d);const m={delay:r,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:i==="reverse"?"alternate":"normal"};return u&&(m.pseudoElement=u),e.animate(l,m)}function vi(e){return typeof e=="function"&&"applyToOptions"in e}function lf({type:e,...t}){return vi(e)&&gi()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class cf extends jr{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:o,allowFlatten:i=!1,finalKeyframe:a,onComplete:c}=t;this.isPseudoElement=!!o,this.allowFlatten=i,this.options=t,De(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=lf(t);this.animation=af(n,r,s,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const l=Dr(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(l):nf(n,r,l),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return _e(Number(t))}get time(){return _e(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ee(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&rf()?(this.animation.timeline=t,ut):n(this)}}const wi={anticipate:Ro,backInOut:Fo,circInOut:Uo};function uf(e){return e in wi}function df(e){typeof e.ease=="string"&&uf(e.ease)&&(e.ease=wi[e.ease])}const xi=10;class ff extends cf{constructor(t){df(t),ci(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:o,...i}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Vr({...i,autoplay:!1}),c=Ee(this.finishedTime??this.time);n.setWithVelocity(a.sample(c-xi).value,a.sample(c).value,xi),a.stop()}}const Si=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(mt.test(e)||e==="0")&&!e.startsWith("url("));function pf(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 mf(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],i=Si(s,t),a=Si(o,t);return ct(i===a,`You are trying to animate ${t} from "${s}" to "${o}". "${i?o:s}" is not an animatable value.`,"value-not-animatable"),!i||!a?!1:pf(e)||(n==="spring"||vi(n))&&r}function Wr(e){e.duration=0,e.type}const hf=new Set(["opacity","clipPath","filter","transform"]),gf=yr(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function bf(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:o,type:i}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return gf()&&n&&hf.has(n)&&(n!=="transform"||!u)&&!c&&!r&&s!=="mirror"&&o!==0&&i!=="inertia"}const yf=40;class vf extends jr{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:i="loop",keyframes:a,name:c,motionValue:u,element:l,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=be.now();const m={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:o,repeatType:i,name:c,motionValue:u,element:l,...d},w=l?.KeyframeResolver||Hr;this.keyframeResolver=new w(a,(p,v,y)=>this.onKeyframesResolved(p,v,m,!y),c,u,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,s){this.keyframeResolver=void 0;const{name:o,type:i,velocity:a,delay:c,isHandoff:u,onUpdate:l}=r;this.resolvedAt=be.now(),mf(t,o,i,a)||(($e.instantAnimations||!c)&&l?.(Dr(t,r,n)),t[0]=t[t.length-1],Wr(r),r.repeat=0);const m={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>yf?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},w=!u&&bf(m)?new ff({...m,element:m.motionValue.owner.current}):new Vr(m);w.finished.then(()=>this.notifyFinished()).catch(ut),this.pendingTimeline&&(this.stopTimeline=w.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=w}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),ef()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const wf=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function xf(e){const t=wf.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const Sf=4;function Ti(e,t,n=1){De(n<=Sf,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,s]=xf(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const i=o.trim();return $o(i)?parseFloat(i):i}return Tr(s)?Ti(s,t,n+1):s}function Ei(e,t){return e?.[t]??e?.default??e}const Ci=new Set(["width","height","top","left","right","bottom",...gt]),Tf={test:e=>e==="auto",parse:e=>e},Pi=e=>t=>t.test(e),ki=[dt,H,ft,je,fd,dd,Tf],Ai=e=>ki.find(Pi(e));function Ef(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||_o(e):!0}const Cf=new Set(["brightness","contrast","saturate","opacity"]);function Pf(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Er)||[];if(!r)return e;const s=n.replace(r,"");let o=Cf.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+s+")"}const kf=/\b([a-z-]*)\(.*?\)/gu,qr={...mt,getAnimatableNone:e=>{const t=e.match(kf);return t?t.map(Pf).join(" "):e}},$i={...dt,transform:Math.round},Yr={borderWidth:H,borderTopWidth:H,borderRightWidth:H,borderBottomWidth:H,borderLeftWidth:H,borderRadius:H,radius:H,borderTopLeftRadius:H,borderTopRightRadius:H,borderBottomRightRadius:H,borderBottomLeftRadius:H,width:H,maxWidth:H,height:H,maxHeight:H,top:H,right:H,bottom:H,left:H,padding:H,paddingTop:H,paddingRight:H,paddingBottom:H,paddingLeft:H,margin:H,marginTop:H,marginRight:H,marginBottom:H,marginLeft:H,backgroundPositionX:H,backgroundPositionY:H,...{rotate:je,rotateX:je,rotateY:je,rotateZ:je,scale:gn,scaleX:gn,scaleY:gn,scaleZ:gn,skew:je,skewX:je,skewY:je,distance:H,translateX:H,translateY:H,translateZ:H,x:H,y:H,z:H,perspective:H,transformPerspective:H,opacity:Ft,originX:Xo,originY:Xo,originZ:H},zIndex:$i,fillOpacity:Ft,strokeOpacity:Ft,numOctaves:$i},Af={...Yr,color:se,backgroundColor:se,outlineColor:se,fill:se,stroke:se,borderColor:se,borderTopColor:se,borderRightColor:se,borderBottomColor:se,borderLeftColor:se,filter:qr,WebkitFilter:qr},_i=e=>Af[e];function Mi(e,t){let n=_i(e);return n!==qr&&(n=mt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const $f=new Set(["auto","none","0"]);function _f(e,t,n){let r=0,s;for(;r<e.length&&!s;){const o=e[r];typeof o=="string"&&!$f.has(o)&&Bt(o).values.length&&(s=e[r]),r++}if(s&&n)for(const o of t)e[o]=Mi(n,s)}class Mf extends Hr{constructor(t,n,r,s,o){super(t,n,r,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),Tr(u))){const l=Ti(u,n.current);l!==void 0&&(t[c]=l),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Ci.has(r)||t.length!==2)return;const[s,o]=t,i=Ai(s),a=Ai(o);if(i!==a)if(pi(i)&&pi(a))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else qe[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||Ef(t[s]))&&r.push(s);r.length&&_f(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=qe[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=r.length-1,i=r[o];r[o]=qe[n](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,c])=>{t.getValue(a).set(c)}),this.resolveNoneKeyframes()}}function Nf(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const s=n?.[e]??r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}const Ni=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Ii(e){return Hu(e)&&"offsetHeight"in e}const Oi=30,If=e=>!isNaN(parseFloat(e));class Of{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const s=be.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=be.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=If(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&vr(!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 No);const r=this.events[t].add(n);return t==="change"?()=>{r(),xe.read(()=>{this.events.change.getSize()||this.stop()})}:r}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,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=be.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Oi)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Oi);return Io(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function xn(e,t){return new Of(e,t)}const{schedule:Lf}=Ho(queueMicrotask,!1),Df={y:!1};function jf(){return Df.y}function Li(e,t){const n=Nf(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function Di(e){return!(e.pointerType==="touch"||jf())}function Vf(e,t,n={}){const[r,s,o]=Li(e,n),i=a=>{if(!Di(a))return;const{target:c}=a,u=t(c,a);if(typeof u!="function"||!c)return;const l=d=>{Di(d)&&(u(d),c.removeEventListener("pointerleave",l))};c.addEventListener("pointerleave",l,s)};return r.forEach(a=>{a.addEventListener("pointerenter",i,s)}),o}const ji=(e,t)=>t?e===t?!0:ji(e,t.parentElement):!1,Ff=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Rf=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Uf(e){return Rf.has(e.tagName)||e.tabIndex!==-1}const Sn=new WeakSet;function Vi(e){return t=>{t.key==="Enter"&&e(t)}}function Xr(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Bf=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Vi(()=>{if(Sn.has(n))return;Xr(n,"down");const s=Vi(()=>{Xr(n,"up")}),o=()=>Xr(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Fi(e){return Ff(e)&&!0}function zf(e,t,n={}){const[r,s,o]=Li(e,n),i=a=>{const c=a.currentTarget;if(!Fi(a))return;Sn.add(c);const u=t(c,a),l=(w,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",m),Sn.has(c)&&Sn.delete(c),Fi(w)&&typeof u=="function"&&u(w,{success:p})},d=w=>{l(w,c===window||c===document||n.useGlobalTarget||ji(c,w.target))},m=w=>{l(w,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",m,s)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",i,s),Ii(a)&&(a.addEventListener("focus",u=>Bf(u,s)),!Uf(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}const de=e=>!!(e&&e.getVelocity),Gf=[...ki,se,mt],Kf=e=>Gf.find(Pi(e)),Jr=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Ri(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Hf(...e){return t=>{let n=!1;const r=e.map(s=>{const o=Ri(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<r.length;s++){const o=r[s];typeof o=="function"?o():Ri(e[s],null)}}}}function Wf(...e){return Be.useCallback(Hf(...e),e)}class qf extends Be.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,s=Ii(r)&&r.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=s-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Yf({children:e,isPresent:t,anchorX:n,root:r}){const s=b.useId(),o=b.useRef(null),i=b.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=b.useContext(Jr),c=Wf(o,e?.ref);return b.useInsertionEffect(()=>{const{width:u,height:l,top:d,left:m,right:w}=i.current;if(t||!o.current||!u||!l)return;const p=n==="left"?`left: ${m}`:`right: ${w}`;o.current.dataset.motionPopId=s;const v=document.createElement("style");a&&(v.nonce=a);const y=r??document.head;return y.appendChild(v),v.sheet&&v.sheet.insertRule(`
23
- [data-motion-pop-id="${s}"] {
24
- position: absolute !important;
25
- width: ${u}px !important;
26
- height: ${l}px !important;
27
- ${p}px !important;
28
- top: ${d}px !important;
29
- }
30
- `),()=>{y.contains(v)&&y.removeChild(v)}},[t]),f.jsx(qf,{isPresent:t,childRef:o,sizeRef:i,children:Be.cloneElement(e,{ref:c})})}const Xf=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:o,mode:i,anchorX:a,root:c})=>{const u=hr(Jf),l=b.useId();let d=!0,m=b.useMemo(()=>(d=!1,{id:l,initial:t,isPresent:n,custom:s,onExitComplete:w=>{u.set(w,!0);for(const p of u.values())if(!p)return;r&&r()},register:w=>(u.set(w,!1),()=>u.delete(w))}),[n,u,r]);return o&&d&&(m={...m}),b.useMemo(()=>{u.forEach((w,p)=>u.set(p,!1))},[n]),Be.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),i==="popLayout"&&(e=f.jsx(Yf,{isPresent:n,anchorX:a,root:c,children:e})),f.jsx(dn.Provider,{value:m,children:e})};function Jf(){return new Map}function Zf(e=!0){const t=b.useContext(dn);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,o=b.useId();b.useEffect(()=>{if(e)return s(o)},[e]);const i=b.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,i]:[!0]}const Tn=e=>e.key||"";function Ui(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const Qf=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:o="sync",propagate:i=!1,anchorX:a="left",root:c})=>{const[u,l]=Zf(i),d=b.useMemo(()=>Ui(e),[e]),m=i&&!u?[]:d.map(Tn),w=b.useRef(!0),p=b.useRef(d),v=hr(()=>new Map),[y,E]=b.useState(d),[N,_]=b.useState(d);Ao(()=>{w.current=!1,p.current=d;for(let I=0;I<N.length;I++){const $=Tn(N[I]);m.includes($)?v.delete($):v.get($)!==!0&&v.set($,!1)}},[N,m.length,m.join("-")]);const O=[];if(d!==y){let I=[...d];for(let $=0;$<N.length;$++){const C=N[$],V=Tn(C);m.includes(V)||(I.splice($,0,C),O.push(C))}return o==="wait"&&O.length&&(I=O),_(Ui(I)),E(d),null}process.env.NODE_ENV!=="production"&&o==="wait"&&N.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:A}=b.useContext(ko);return f.jsx(f.Fragment,{children:N.map(I=>{const $=Tn(I),C=i&&!u?!1:d===N||m.includes($),V=()=>{if(v.has($))v.set($,!0);else return;let W=!0;v.forEach(h=>{h||(W=!1)}),W&&(A?.(),_(p.current),i&&l?.(),r&&r())};return f.jsx(Xf,{isPresent:C,initial:!w.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:o,root:c,onExitComplete:C?void 0:V,anchorX:a,children:I},$)})})},Zr=b.createContext({strict:!1}),Bi={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"]},yt={};for(const e in Bi)yt[e]={isEnabled:t=>Bi[e].some(n=>!!t[n])};function Qr(e){for(const t in e)yt[t]={...yt[t],...e[t]}}function ep({children:e,features:t,strict:n=!1}){const[,r]=b.useState(!es(t)),s=b.useRef(void 0);if(!es(t)){const{renderer:o,...i}=t;s.current=o,Qr(i)}return b.useEffect(()=>{es(t)&&t().then(({renderer:o,...i})=>{Qr(i),s.current=o,r(!0)})},[]),f.jsx(Zr.Provider,{value:{renderer:s.current,strict:n},children:e})}function es(e){return typeof e=="function"}const tp=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function En(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||tp.has(e)}let zi=e=>!En(e);function np(e){typeof e=="function"&&(zi=t=>t.startsWith("on")?!En(t):e(t))}try{np(require("@emotion/is-prop-valid").default)}catch{}function rp(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(zi(s)||n===!0&&En(s)||!t&&!En(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const Cn=b.createContext({});function Pn(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Gt(e){return typeof e=="string"||Array.isArray(e)}const ts=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ns=["initial",...ts];function kn(e){return Pn(e.animate)||ns.some(t=>Gt(e[t]))}function Gi(e){return!!(kn(e)||e.variants)}function sp(e,t){if(kn(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Gt(n)?n:void 0,animate:Gt(r)?r:void 0}}return e.inherit!==!1?t:{}}function op(e){const{initial:t,animate:n}=sp(e,b.useContext(Cn));return b.useMemo(()=>({initial:t,animate:n}),[Ki(t),Ki(n)])}function Ki(e){return Array.isArray(e)?e.join(" "):e}const ip={};function Hi(e,{layout:t,layoutId:n}){return bt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ip[e]||e==="opacity")}const ap={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},lp=gt.length;function cp(e,t,n){let r="",s=!0;for(let o=0;o<lp;o++){const i=gt[o],a=e[i];if(a===void 0)continue;let c=!0;if(typeof a=="number"?c=a===(i.startsWith("scale")?1:0):c=parseFloat(a)===0,!c||n){const u=Ni(a,Yr[i]);if(!c){s=!1;const l=ap[i]||i;r+=`${l}(${u}) `}n&&(t[i]=u)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function rs(e,t,n){const{style:r,vars:s,transformOrigin:o}=e;let i=!1,a=!1;for(const c in t){const u=t[c];if(bt.has(c)){i=!0;continue}else if(qo(c)){s[c]=u;continue}else{const l=Ni(u,Yr[c]);c.startsWith("origin")?(a=!0,o[c]=l):r[c]=l}}if(t.transform||(i||n?r.transform=cp(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:c="50%",originY:u="50%",originZ:l=0}=o;r.transformOrigin=`${c} ${u} ${l}`}}const ss=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Wi(e,t,n){for(const r in t)!de(t[r])&&!Hi(r,n)&&(e[r]=t[r])}function up({transformTemplate:e},t){return b.useMemo(()=>{const n=ss();return rs(n,t,e),Object.assign({},n.vars,n.style)},[t])}function dp(e,t){const n=e.style||{},r={};return Wi(r,n,e),Object.assign(r,up(e,t)),r}function fp(e,t){const n={},r=dp(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.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=r,n}const pp={offset:"stroke-dashoffset",array:"stroke-dasharray"},mp={offset:"strokeDashoffset",array:"strokeDasharray"};function hp(e,t,n=1,r=0,s=!0){e.pathLength=1;const o=s?pp:mp;e[o.offset]=H.transform(-r);const i=H.transform(t),a=H.transform(n);e[o.array]=`${i} ${a}`}function qi(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:o=1,pathOffset:i=0,...a},c,u,l){if(rs(e,a,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:m}=e;d.transform&&(m.transform=d.transform,delete d.transform),(m.transform||d.transformOrigin)&&(m.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),m.transform&&(m.transformBox=l?.transformBox??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),s!==void 0&&hp(d,s,o,i,!1)}const Yi=()=>({...ss(),attrs:{}}),Xi=e=>typeof e=="string"&&e.toLowerCase()==="svg";function gp(e,t,n,r){const s=b.useMemo(()=>{const o=Yi();return qi(o,t,Xi(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Wi(o,e.style,e),s.style={...o,...s.style}}return s}const bp=["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 os(e){return typeof e!="string"||e.includes("-")?!1:!!(bp.indexOf(e)>-1||/[A-Z]/u.test(e))}function yp(e,t,n,{latestValues:r},s,o=!1){const a=(os(e)?gp:fp)(t,r,s,e),c=rp(t,typeof e=="string",o),u=e!==b.Fragment?{...c,...a,ref:n}:{},{children:l}=t,d=b.useMemo(()=>de(l)?l.get():l,[l]);return b.createElement(e,{...u,children:d})}function Ji(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function is(e,t,n,r){if(typeof t=="function"){const[s,o]=Ji(r);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=Ji(r);t=t(n!==void 0?n:e.custom,s,o)}return t}function vp(e){return de(e)?e.get():e}function wp({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:xp(n,r,s,e),renderState:t()}}function xp(e,t,n,r){const s={},o=r(e,{});for(const m in o)s[m]=vp(o[m]);let{initial:i,animate:a}=e;const c=kn(e),u=Gi(e);t&&u&&!c&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let l=n?n.initial===!1:!1;l=l||i===!1;const d=l?a:i;if(d&&typeof d!="boolean"&&!Pn(d)){const m=Array.isArray(d)?d:[d];for(let w=0;w<m.length;w++){const p=is(e,m[w]);if(p){const{transitionEnd:v,transition:y,...E}=p;for(const N in E){let _=E[N];if(Array.isArray(_)){const O=l?_.length-1:0;_=_[O]}_!==null&&(s[N]=_)}for(const N in v)s[N]=v[N]}}}return s}const Zi=e=>(t,n)=>{const r=b.useContext(Cn),s=b.useContext(dn),o=()=>wp(e,t,r,s);return n?o():hr(o)};function as(e,t,n){const{style:r}=e,s={};for(const o in r)(de(r[o])||t.style&&de(t.style[o])||Hi(o,e)||n?.getValue(o)?.liveStyle!==void 0)&&(s[o]=r[o]);return s}const Sp=Zi({scrapeMotionValuesFromProps:as,createRenderState:ss});function Qi(e,t,n){const r=as(e,t,n);for(const s in e)if(de(e[s])||de(t[s])){const o=gt.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[o]=e[s]}return r}const Tp=Zi({scrapeMotionValuesFromProps:Qi,createRenderState:Yi}),Ep=Symbol.for("motionComponentSymbol");function ea(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Cp(e,t,n){return b.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ea(n)&&(n.current=r))},[t])}const ls=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ta="data-"+ls("framerAppearId"),Pp=b.createContext({});function kp(e,t,n,r,s){const{visualElement:o}=b.useContext(Cn),i=b.useContext(Zr),a=b.useContext(dn),c=b.useContext(Jr).reducedMotion,u=b.useRef(null);r=r||i.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:c}));const l=u.current,d=b.useContext(Pp);l&&!l.projection&&s&&(l.type==="html"||l.type==="svg")&&Ap(u.current,n,s,d);const m=b.useRef(!1);b.useInsertionEffect(()=>{l&&m.current&&l.update(n,a)});const w=n[ta],p=b.useRef(!!w&&!window.MotionHandoffIsComplete?.(w)&&window.MotionHasOptimisedAnimation?.(w));return Ao(()=>{l&&(m.current=!0,window.MotionIsMounted=!0,l.updateFeatures(),l.scheduleRenderMicrotask(),p.current&&l.animationState&&l.animationState.animateChanges())}),b.useEffect(()=>{l&&(!p.current&&l.animationState&&l.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(w)}),p.current=!1),l.enteringChildren=void 0)}),l}function Ap(e,t,n,r){const{layoutId:s,layout:o,drag:i,dragConstraints:a,layoutScroll:c,layoutRoot:u,layoutCrossfade:l}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:na(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!i||a&&ea(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:l,layoutScroll:c,layoutRoot:u})}function na(e){if(e)return e.options.allowProjection!==!1?e.projection:na(e.parent)}function cs(e,{forwardMotionProps:t=!1}={},n,r){n&&Qr(n);const s=os(e)?Tp:Sp;function o(a,c){let u;const l={...b.useContext(Jr),...a,layoutId:$p(a)},{isStatic:d}=l,m=op(a),w=s(a,d);if(!d&&gr){_p(l,n);const p=Mp(l);u=p.MeasureLayout,m.visualElement=kp(e,w,l,r,p.ProjectionNode)}return f.jsxs(Cn.Provider,{value:m,children:[u&&m.visualElement?f.jsx(u,{visualElement:m.visualElement,...l}):null,yp(e,a,Cp(w,m.visualElement,c),w,d,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const i=b.forwardRef(o);return i[Ep]=e,i}function $p({layoutId:e}){const t=b.useContext(ko).id;return t&&e!==void 0?t+"-"+e:e}function _p(e,t){const n=b.useContext(Zr).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?ct(!1,r,"lazy-strict-mode"):De(!1,r,"lazy-strict-mode")}}function Mp(e){const{drag:t,layout:n}=yt;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Np(e,t){if(typeof Proxy>"u")return cs;const n=new Map,r=(o,i)=>cs(o,i,e,t),s=(o,i)=>(process.env.NODE_ENV!=="production"&&vr(!1,"motion() is deprecated. Use motion.create() instead."),r(o,i));return new Proxy(s,{get:(o,i)=>i==="create"?r:(n.has(i)||n.set(i,cs(i,void 0,e,t)),n.get(i))})}const Ip=Np();function Op({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Lp(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Dp(e,t){return Op(Lp(e.getBoundingClientRect(),t))}const ra=()=>({min:0,max:0}),sa=()=>({x:ra(),y:ra()}),us={current:null},oa={current:!1};function jp(){if(oa.current=!0,!!gr)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>us.current=e.matches;e.addEventListener("change",t),t()}else us.current=!1}const Vp=new WeakMap;function Fp(e,t,n){for(const r in t){const s=t[r],o=n[r];if(de(s))e.addValue(r,s);else if(de(o))e.addValue(r,xn(s,{owner:e}));else if(o!==s)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(s):i.hasAnimated||i.set(s)}else{const i=e.getStaticValue(r);e.addValue(r,xn(i!==void 0?i:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const ia=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Rp{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:o,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Hr,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=be.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,xe.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=i;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=kn(n),this.isVariantNode=Gi(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:l,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in d){const w=d[m];c[m]!==void 0&&de(w)&&w.set(c[m])}}mount(t){this.current=t,Vp.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),oa.current||jp(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:us.current,process.env.NODE_ENV!=="production"&&vr(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Sr(this.notifyUpdate),Sr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=bt.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&xe.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),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 yt){const n=yt[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(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):sa()}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 r=0;r<ia.length;r++){const s=ia[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,i=t[o];i&&(this.propEventSubscriptions[s]=this.on(s,i))}this.prevMotionValues=Fp(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 r=this.values.get(t);n!==r&&(r&&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 r=this.values.get(t);return r===void 0&&n!==void 0&&(r=xn(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&($o(r)||_o(r))?r=parseFloat(r):!Kf(r)&&mt.test(n)&&(r=Mi(t,n)),this.setBaseTarget(t,de(r)?r.get():r)),de(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=is(this.props,n,this.presenceContext?.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!de(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new No),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Lf.render(this.render)}}class aa extends Rp{constructor(){super(...arguments),this.KeyframeResolver=Mf}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;de(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function la(e,{style:t,vars:n},r,s){const o=e.style;let i;for(i in t)o[i]=t[i];s?.applyProjectionStyles(o,r);for(i in n)o.setProperty(i,n[i])}function Up(e){return window.getComputedStyle(e)}class Bp extends aa{constructor(){super(...arguments),this.type="html",this.renderInstance=la}readValueFromInstance(t,n){if(bt.has(n))return this.projection?.isProjecting?Ur(n):Yd(t,n);{const r=Up(t),s=(qo(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Dp(t,n)}build(t,n,r){rs(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return as(t,n,r)}}const ca=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function zp(e,t,n,r){la(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(ca.has(s)?s:ls(s),t.attrs[s])}class Gp extends aa{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=sa}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(bt.has(n)){const r=_i(n);return r&&r.default||0}return n=ca.has(n)?n:ls(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Qi(t,n,r)}build(t,n,r){qi(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){zp(t,n,r,s)}mount(t){this.isSVGTag=Xi(t.tagName),super.mount(t)}}const Kp=(e,t)=>os(e)?new Gp(t):new Bp(t,{allowProjection:e!==b.Fragment});function vt(e,t,n){const r=e.getProps();return is(r,t,n!==void 0?n:r.custom,e)}const ds=e=>Array.isArray(e);function Hp(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,xn(n))}function Wp(e){return ds(e)?e[e.length-1]||0:e}function qp(e,t){const n=vt(e,t);let{transitionEnd:r={},transition:s={},...o}=n||{};o={...o,...r};for(const i in o){const a=Wp(o[i]);Hp(e,i,a)}}function Yp(e){return!!(de(e)&&e.add)}function Xp(e,t){const n=e.getValue("willChange");if(Yp(n))return n.add(t);if(!n&&$e.WillChange){const r=new $e.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Jp(e){return e.props[ta]}const Zp=e=>e!==null;function Qp(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(Zp),o=t&&n!=="loop"&&t%2===1?0:s.length-1;return s[o]}const em={type:"spring",stiffness:500,damping:25,restSpeed:10},tm=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),nm={type:"keyframes",duration:.8},rm={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},sm=(e,{keyframes:t})=>t.length>2?nm:bt.has(e)?e.startsWith("scale")?tm(t[1]):em:rm;function om({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:o,repeatType:i,repeatDelay:a,from:c,elapsed:u,...l}){return!!Object.keys(l).length}const im=(e,t,n,r={},s,o)=>i=>{const a=Ei(r,e)||{},c=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Ee(c);const l={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:m=>{t.set(m),a.onUpdate&&a.onUpdate(m)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:s};om(a)||Object.assign(l,sm(e,l)),l.duration&&(l.duration=Ee(l.duration)),l.repeatDelay&&(l.repeatDelay=Ee(l.repeatDelay)),l.from!==void 0&&(l.keyframes[0]=l.from);let d=!1;if((l.type===!1||l.duration===0&&!l.repeatDelay)&&(Wr(l),l.delay===0&&(d=!0)),($e.instantAnimations||$e.skipAnimations)&&(d=!0,Wr(l),l.delay=0),l.allowFlatten=!a.type&&!a.ease,d&&!o&&t.get()!==void 0){const m=Qp(l.keyframes,a);if(m!==void 0){xe.update(()=>{l.onUpdate(m),l.onComplete()});return}}return a.isSync?new Vr(l):new vf(l)};function am({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function ua(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:i,...a}=t;r&&(o=r);const c=[],u=s&&e.animationState&&e.animationState.getState()[s];for(const l in a){const d=e.getValue(l,e.latestValues[l]??null),m=a[l];if(m===void 0||u&&am(u,l))continue;const w={delay:n,...Ei(o||{},l)},p=d.get();if(p!==void 0&&!d.isAnimating&&!Array.isArray(m)&&m===p&&!w.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const E=Jp(e);if(E){const N=window.MotionHandoffAnimation(E,l,xe);N!==null&&(w.startTime=N,v=!0)}}Xp(e,l),d.start(im(l,d,m,e.shouldReduceMotion&&Ci.has(l)?{type:!1}:w,e,v));const y=d.animation;y&&c.push(y)}return i&&Promise.all(c).then(()=>{xe.update(()=>{i&&qp(e,i)})}),c}function da(e,t,n,r=0,s=1){const o=Array.from(e).sort((u,l)=>u.sortNodePosition(l)).indexOf(t),i=e.size,a=(i-1)*r;return typeof n=="function"?n(o,i):s===1?o*r:a-o*r}function fs(e,t,n={}){const r=vt(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const o=r?()=>Promise.all(ua(e,r,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:l,staggerDirection:d}=s;return lm(e,t,c,u,l,d,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[c,u]=a==="beforeChildren"?[o,i]:[i,o];return c().then(()=>u())}else return Promise.all([o(),i(n.delay)])}function lm(e,t,n=0,r=0,s=0,o=1,i){const a=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),a.push(fs(c,t,{...i,delay:n+(typeof r=="function"?0:r)+da(e.variantChildren,c,r,s,o)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(a)}function cm(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(o=>fs(e,o,n));r=Promise.all(s)}else if(typeof t=="string")r=fs(e,t,n);else{const s=typeof t=="function"?vt(e,t,n.custom):t;r=Promise.all(ua(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function fa(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const um=ns.length;function pa(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?pa(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<um;n++){const r=ns[n],s=e.props[r];(Gt(s)||s===!1)&&(t[r]=s)}return t}const dm=[...ts].reverse(),fm=ts.length;function pm(e){return t=>Promise.all(t.map(({animation:n,options:r})=>cm(e,n,r)))}function mm(e){let t=pm(e),n=ma(),r=!0;const s=c=>(u,l)=>{const d=vt(e,l,c==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:m,transitionEnd:w,...p}=d;u={...u,...p,...w}}return u};function o(c){t=c(e)}function i(c){const{props:u}=e,l=pa(e.parent)||{},d=[],m=new Set;let w={},p=1/0;for(let y=0;y<fm;y++){const E=dm[y],N=n[E],_=u[E]!==void 0?u[E]:l[E],O=Gt(_),A=E===c?N.isActive:null;A===!1&&(p=y);let I=_===l[E]&&_!==u[E]&&O;if(I&&r&&e.manuallyAnimateOnMount&&(I=!1),N.protectedKeys={...w},!N.isActive&&A===null||!_&&!N.prevProp||Pn(_)||typeof _=="boolean")continue;const $=hm(N.prevProp,_);let C=$||E===c&&N.isActive&&!I&&O||y>p&&O,V=!1;const W=Array.isArray(_)?_:[_];let h=W.reduce(s(E),{});A===!1&&(h={});const{prevResolvedValues:k={}}=N,j={...k,...h},S=M=>{C=!0,m.has(M)&&(V=!0,m.delete(M)),N.needsAnimating[M]=!0;const T=e.getValue(M);T&&(T.liveStyle=!1)};for(const M in j){const T=h[M],B=k[M];if(w.hasOwnProperty(M))continue;let P=!1;ds(T)&&ds(B)?P=!fa(T,B):P=T!==B,P?T!=null?S(M):m.add(M):T!==void 0&&m.has(M)?S(M):N.protectedKeys[M]=!0}N.prevProp=_,N.prevResolvedValues=h,N.isActive&&(w={...w,...h}),r&&e.blockInitialAnimation&&(C=!1);const L=I&&$;C&&(!L||V)&&d.push(...W.map(M=>{const T={type:E};if(typeof M=="string"&&r&&!L&&e.manuallyAnimateOnMount&&e.parent){const{parent:B}=e,P=vt(B,M);if(B.enteringChildren&&P){const{delayChildren:D}=P.transition||{};T.delay=da(B.enteringChildren,e,D)}}return{animation:M,options:T}}))}if(m.size){const y={};if(typeof u.initial!="boolean"){const E=vt(e,Array.isArray(u.initial)?u.initial[0]:u.initial);E&&E.transition&&(y.transition=E.transition)}m.forEach(E=>{const N=e.getBaseTarget(E),_=e.getValue(E);_&&(_.liveStyle=!0),y[E]=N??null}),d.push({animation:y})}let v=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(d):Promise.resolve()}function a(c,u){if(n[c].isActive===u)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(c,u)),n[c].isActive=u;const l=i(c);for(const d in n)n[d].protectedKeys={};return l}return{animateChanges:i,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=ma(),r=!0}}}function hm(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!fa(t,e):!1}function Xe(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ma(){return{animate:Xe(!0),whileInView:Xe(),whileHover:Xe(),whileTap:Xe(),whileDrag:Xe(),whileFocus:Xe(),exit:Xe()}}class wt{constructor(t){this.isMounted=!1,this.node=t}update(){}}class gm extends wt{constructor(t){super(t),t.animationState||(t.animationState=mm(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Pn(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let bm=0;class ym extends wt{constructor(){super(...arguments),this.id=bm++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const vm={animation:{Feature:gm},exit:{Feature:ym}};function ha(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function ga(e){return{point:{x:e.pageX,y:e.pageY}}}function ba(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=r[s];o&&xe.postRender(()=>o(t,ga(t)))}class wm extends wt{mount(){const{current:t}=this.node;t&&(this.unmount=Vf(t,(n,r)=>(ba(this.node,r,"Start"),s=>ba(this.node,s,"End"))))}unmount(){}}class xm extends wt{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=fn(ha(this.node.current,"focus",()=>this.onFocus()),ha(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ya(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=r[s];o&&xe.postRender(()=>o(t,ga(t)))}class Sm extends wt{mount(){const{current:t}=this.node;t&&(this.unmount=zf(t,(n,r)=>(ya(this.node,r,"Start"),(s,{success:o})=>ya(this.node,s,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ps=new WeakMap,ms=new WeakMap,Tm=e=>{const t=ps.get(e.target);t&&t(e)},Em=e=>{e.forEach(Tm)};function Cm({root:e,...t}){const n=e||document;ms.has(n)||ms.set(n,{});const r=ms.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(Em,{root:e,...t})),r[s]}function Pm(e,t,n){const r=Cm(t);return ps.set(e,n),r.observe(e),()=>{ps.delete(e),r.unobserve(e)}}const km={some:0,all:1};class Am extends wt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:o}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:km[s]},a=c=>{const{isIntersecting:u}=c;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:l,onViewportLeave:d}=this.node.getProps(),m=u?l:d;m&&m(c)};return Pm(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($m(t,n))&&this.startObserver()}unmount(){}}function $m({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const _m={renderer:Kp,...vm,...{inView:{Feature:Am},tap:{Feature:Sm},focus:{Feature:xm},hover:{Feature:wm}}};function hs(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function va(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function wa(e){let t=b.useRef({isFocused:!1,observer:null});an(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=Oe(r=>{e?.(r)});return b.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let s=r.target,o=i=>{if(t.current.isFocused=!1,s.disabled){let a=hs(i);n(a)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};s.addEventListener("focusout",o,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&s.disabled){var i;(i=t.current.observer)===null||i===void 0||i.disconnect();let a=s===document.activeElement?null:document.activeElement;s.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),s.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),t.current.observer.observe(s,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let An=!1;function xa(e){for(;e&&!ju(e);)e=e.parentElement;let t=ge(e),n=t.document.activeElement;if(!n||n===e)return;An=!0;let r=!1,s=l=>{(l.target===n||r)&&l.stopImmediatePropagation()},o=l=>{(l.target===n||r)&&(l.stopImmediatePropagation(),!e&&!r&&(r=!0,at(n),c()))},i=l=>{(l.target===e||r)&&l.stopImmediatePropagation()},a=l=>{(l.target===e||r)&&(l.stopImmediatePropagation(),r||(r=!0,at(n),c()))};t.addEventListener("blur",s,!0),t.addEventListener("focusout",o,!0),t.addEventListener("focusin",a,!0),t.addEventListener("focus",i,!0);let c=()=>{cancelAnimationFrame(u),t.removeEventListener("blur",s,!0),t.removeEventListener("focusout",o,!0),t.removeEventListener("focusin",a,!0),t.removeEventListener("focus",i,!0),An=!1,r=!1},u=requestAnimationFrame(c);return c}let xt="default",gs="",$n=new WeakMap;function Sa(e){if(cr()){if(xt==="default"){const t=ce(e);gs=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}xt="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";$n.set(e,e.style[t]),e.style[t]="none"}}function bs(e){if(cr()){if(xt!=="disabled")return;xt="restoring",setTimeout(()=>{So(()=>{if(xt==="restoring"){const t=ce(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=gs||""),gs="",xt="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&$n.has(e)){let t=$n.get(e),n="userSelect"in e.style?"userSelect":"webkitUserSelect";e.style[n]==="none"&&(e.style[n]=t),e.getAttribute("style")===""&&e.removeAttribute("style"),$n.delete(e)}}const Ta=b.createContext({register:()=>{}});Ta.displayName="PressResponderContext";function Mm(e,t){return t.get?t.get.call(e):t.value}function Ea(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function Nm(e,t){var n=Ea(e,t,"get");return Mm(e,n)}function Im(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function Ca(e,t,n){var r=Ea(e,t,"set");return Im(e,r,n),n}function Om(e){let t=b.useContext(Ta);if(t){let{register:n,...r}=t;e=Ge(r,e),n()}return To(t,e.ref),e}var _n=new WeakMap;class Mn{continuePropagation(){Ca(this,_n,!1)}get shouldStopPropagation(){return Nm(this,_n)}constructor(t,n,r,s){uu(this,_n,{writable:!0,value:void 0}),Ca(this,_n,!0);var o;let i=(o=s?.target)!==null&&o!==void 0?o:r.currentTarget;const a=i?.getBoundingClientRect();let c,u=0,l,d=null;r.clientX!=null&&r.clientY!=null&&(l=r.clientX,d=r.clientY),a&&(l!=null&&d!=null?(c=l-a.left,u=d-a.top):(c=a.width/2,u=a.height/2)),this.type=t,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=c,this.y=u}}const Pa=Symbol("linkClicked"),ka="react-aria-pressable-style",Aa="data-react-aria-pressable";function Lm(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:s,onPressUp:o,onClick:i,isDisabled:a,isPressed:c,preventFocusOnPress:u,shouldCancelOnPointerExit:l,allowTextSelectionOnPress:d,ref:m,...w}=Om(e),[p,v]=b.useState(!1),y=b.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:E,removeAllGlobalListeners:N}=dr(),_=Oe((h,k)=>{let j=y.current;if(a||j.didFirePressStart)return!1;let S=!0;if(j.isTriggeringEvent=!0,r){let L=new Mn("pressstart",k,h);r(L),S=L.shouldStopPropagation}return n&&n(!0),j.isTriggeringEvent=!1,j.didFirePressStart=!0,v(!0),S}),O=Oe((h,k,j=!0)=>{let S=y.current;if(!S.didFirePressStart)return!1;S.didFirePressStart=!1,S.isTriggeringEvent=!0;let L=!0;if(s){let g=new Mn("pressend",k,h);s(g),L=g.shouldStopPropagation}if(n&&n(!1),v(!1),t&&j&&!a){let g=new Mn("press",k,h);t(g),L&&(L=g.shouldStopPropagation)}return S.isTriggeringEvent=!1,L}),A=Oe((h,k)=>{let j=y.current;if(a)return!1;if(o){j.isTriggeringEvent=!0;let S=new Mn("pressup",k,h);return o(S),j.isTriggeringEvent=!1,S.shouldStopPropagation}return!0}),I=Oe(h=>{let k=y.current;if(k.isPressed&&k.target){k.didFirePressStart&&k.pointerType!=null&&O(Je(k.target,h),k.pointerType,!1),k.isPressed=!1,k.isOverTarget=!1,k.activePointerId=null,k.pointerType=null,N(),d||bs(k.target);for(let j of k.disposables)j();k.disposables=[]}}),$=Oe(h=>{l&&I(h)}),C=Oe(h=>{i?.(h)}),V=Oe((h,k)=>{if(i){let j=new MouseEvent("click",h);va(j,k),i(hs(j))}}),W=b.useMemo(()=>{let h=y.current,k={onKeyDown(S){if(vs(S.nativeEvent,S.currentTarget)&&re(S.currentTarget,ee(S.nativeEvent))){var L;Ma(ee(S.nativeEvent),S.key)&&S.preventDefault();let g=!0;if(!h.isPressed&&!S.repeat){h.target=S.currentTarget,h.isPressed=!0,h.pointerType="keyboard",g=_(S,"keyboard");let M=S.currentTarget,T=B=>{vs(B,M)&&!B.repeat&&re(M,ee(B))&&h.target&&A(Je(h.target,B),"keyboard")};E(ce(S.currentTarget),"keyup",ho(T,j),!0)}g&&S.stopPropagation(),S.metaKey&&lt()&&((L=h.metaKeyEvents)===null||L===void 0||L.set(S.key,S.nativeEvent))}else S.key==="Meta"&&(h.metaKeyEvents=new Map)},onClick(S){if(!(S&&!re(S.currentTarget,ee(S.nativeEvent)))&&S&&S.button===0&&!h.isTriggeringEvent&&!jt.isOpening){let L=!0;if(a&&S.preventDefault(),!h.ignoreEmulatedMouseEvents&&!h.isPressed&&(h.pointerType==="virtual"||fr(S.nativeEvent))){let g=_(S,"virtual"),M=A(S,"virtual"),T=O(S,"virtual");C(S),L=g&&M&&T}else if(h.isPressed&&h.pointerType!=="keyboard"){let g=h.pointerType||S.nativeEvent.pointerType||"virtual",M=A(Je(S.currentTarget,S),g),T=O(Je(S.currentTarget,S),g,!0);L=M&&T,h.isOverTarget=!1,C(S),I(S)}h.ignoreEmulatedMouseEvents=!1,L&&S.stopPropagation()}}},j=S=>{var L;if(h.isPressed&&h.target&&vs(S,h.target)){var g;Ma(ee(S),S.key)&&S.preventDefault();let T=ee(S),B=re(h.target,ee(S));O(Je(h.target,S),"keyboard",B),B&&V(S,h.target),N(),S.key!=="Enter"&&ys(h.target)&&re(h.target,T)&&!S[Pa]&&(S[Pa]=!0,jt(h.target,S,!1)),h.isPressed=!1,(g=h.metaKeyEvents)===null||g===void 0||g.delete(S.key)}else if(S.key==="Meta"&&(!((L=h.metaKeyEvents)===null||L===void 0)&&L.size)){var M;let T=h.metaKeyEvents;h.metaKeyEvents=void 0;for(let B of T.values())(M=h.target)===null||M===void 0||M.dispatchEvent(new KeyboardEvent("keyup",B))}};if(typeof PointerEvent<"u"){k.onPointerDown=g=>{if(g.button!==0||!re(g.currentTarget,ee(g.nativeEvent)))return;if(Nu(g.nativeEvent)){h.pointerType="virtual";return}h.pointerType=g.pointerType;let M=!0;if(!h.isPressed){h.isPressed=!0,h.isOverTarget=!0,h.activePointerId=g.pointerId,h.target=g.currentTarget,d||Sa(h.target),M=_(g,h.pointerType);let T=ee(g.nativeEvent);"releasePointerCapture"in T&&T.releasePointerCapture(g.pointerId),E(ce(g.currentTarget),"pointerup",S,!1),E(ce(g.currentTarget),"pointercancel",L,!1)}M&&g.stopPropagation()},k.onMouseDown=g=>{if(re(g.currentTarget,ee(g.nativeEvent))&&g.button===0){if(u){let M=xa(g.target);M&&h.disposables.push(M)}g.stopPropagation()}},k.onPointerUp=g=>{!re(g.currentTarget,ee(g.nativeEvent))||h.pointerType==="virtual"||g.button===0&&!h.isPressed&&A(g,h.pointerType||g.pointerType)},k.onPointerEnter=g=>{g.pointerId===h.activePointerId&&h.target&&!h.isOverTarget&&h.pointerType!=null&&(h.isOverTarget=!0,_(Je(h.target,g),h.pointerType))},k.onPointerLeave=g=>{g.pointerId===h.activePointerId&&h.target&&h.isOverTarget&&h.pointerType!=null&&(h.isOverTarget=!1,O(Je(h.target,g),h.pointerType,!1),$(g))};let S=g=>{if(g.pointerId===h.activePointerId&&h.isPressed&&g.button===0&&h.target){if(re(h.target,ee(g))&&h.pointerType!=null){let M=!1,T=setTimeout(()=>{h.isPressed&&h.target instanceof HTMLElement&&(M?I(g):(at(h.target),h.target.click()))},80);E(g.currentTarget,"click",()=>M=!0,!0),h.disposables.push(()=>clearTimeout(T))}else I(g);h.isOverTarget=!1}},L=g=>{I(g)};k.onDragStart=g=>{re(g.currentTarget,ee(g.nativeEvent))&&I(g)}}else if(process.env.NODE_ENV==="test"){k.onMouseDown=g=>{if(g.button!==0||!re(g.currentTarget,ee(g.nativeEvent)))return;if(h.ignoreEmulatedMouseEvents){g.stopPropagation();return}if(h.isPressed=!0,h.isOverTarget=!0,h.target=g.currentTarget,h.pointerType=fr(g.nativeEvent)?"virtual":"mouse",Ic.flushSync(()=>_(g,h.pointerType))&&g.stopPropagation(),u){let T=xa(g.target);T&&h.disposables.push(T)}E(ce(g.currentTarget),"mouseup",S,!1)},k.onMouseEnter=g=>{if(!re(g.currentTarget,ee(g.nativeEvent)))return;let M=!0;h.isPressed&&!h.ignoreEmulatedMouseEvents&&h.pointerType!=null&&(h.isOverTarget=!0,M=_(g,h.pointerType)),M&&g.stopPropagation()},k.onMouseLeave=g=>{if(!re(g.currentTarget,ee(g.nativeEvent)))return;let M=!0;h.isPressed&&!h.ignoreEmulatedMouseEvents&&h.pointerType!=null&&(h.isOverTarget=!1,M=O(g,h.pointerType,!1),$(g)),M&&g.stopPropagation()},k.onMouseUp=g=>{re(g.currentTarget,ee(g.nativeEvent))&&!h.ignoreEmulatedMouseEvents&&g.button===0&&!h.isPressed&&A(g,h.pointerType||"mouse")};let S=g=>{if(g.button===0){if(h.ignoreEmulatedMouseEvents){h.ignoreEmulatedMouseEvents=!1;return}h.target&&h.target.contains(g.target)&&h.pointerType!=null||I(g),h.isOverTarget=!1}};k.onTouchStart=g=>{if(!re(g.currentTarget,ee(g.nativeEvent)))return;let M=Dm(g.nativeEvent);if(!M)return;h.activePointerId=M.identifier,h.ignoreEmulatedMouseEvents=!0,h.isOverTarget=!0,h.isPressed=!0,h.target=g.currentTarget,h.pointerType="touch",d||Sa(h.target),_(Ve(h.target,g),h.pointerType)&&g.stopPropagation(),E(ge(g.currentTarget),"scroll",L,!0)},k.onTouchMove=g=>{if(!re(g.currentTarget,ee(g.nativeEvent)))return;if(!h.isPressed){g.stopPropagation();return}let M=$a(g.nativeEvent,h.activePointerId),T=!0;M&&_a(M,g.currentTarget)?!h.isOverTarget&&h.pointerType!=null&&(h.isOverTarget=!0,T=_(Ve(h.target,g),h.pointerType)):h.isOverTarget&&h.pointerType!=null&&(h.isOverTarget=!1,T=O(Ve(h.target,g),h.pointerType,!1),$(Ve(h.target,g))),T&&g.stopPropagation()},k.onTouchEnd=g=>{if(!re(g.currentTarget,ee(g.nativeEvent)))return;if(!h.isPressed){g.stopPropagation();return}let M=$a(g.nativeEvent,h.activePointerId),T=!0;M&&_a(M,g.currentTarget)&&h.pointerType!=null?(A(Ve(h.target,g),h.pointerType),T=O(Ve(h.target,g),h.pointerType),V(g.nativeEvent,h.target)):h.isOverTarget&&h.pointerType!=null&&(T=O(Ve(h.target,g),h.pointerType,!1)),T&&g.stopPropagation(),h.isPressed=!1,h.activePointerId=null,h.isOverTarget=!1,h.ignoreEmulatedMouseEvents=!0,h.target&&!d&&bs(h.target),N()},k.onTouchCancel=g=>{re(g.currentTarget,ee(g.nativeEvent))&&(g.stopPropagation(),h.isPressed&&I(Ve(h.target,g)))};let L=g=>{h.isPressed&&re(ee(g),h.target)&&I({currentTarget:h.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};k.onDragStart=g=>{re(g.currentTarget,ee(g.nativeEvent))&&I(g)}}return k},[E,a,u,N,d,I,$,O,_,A,C,V]);return b.useEffect(()=>{if(!m||process.env.NODE_ENV==="test")return;const h=ce(m.current);if(!h||!h.head||h.getElementById(ka))return;const k=h.createElement("style");k.id=ka,k.textContent=`
31
- @layer {
32
- [${Aa}] {
33
- touch-action: pan-x pan-y pinch-zoom;
34
- }
35
- }
36
- `.trim(),h.head.prepend(k)},[m]),b.useEffect(()=>{let h=y.current;return()=>{var k;d||bs((k=h.target)!==null&&k!==void 0?k:void 0);for(let j of h.disposables)j();h.disposables=[]}},[d]),{isPressed:c||p,pressProps:Ge(w,W,{[Aa]:!0})}}function ys(e){return e.tagName==="A"&&e.hasAttribute("href")}function vs(e,t){const{key:n,code:r}=e,s=t,o=s.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(s instanceof ge(s).HTMLInputElement&&!Na(s,n)||s instanceof ge(s).HTMLTextAreaElement||s.isContentEditable)&&!((o==="link"||!o&&ys(s))&&n!=="Enter")}function Dm(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function $a(e,t){const n=e.changedTouches;for(let r=0;r<n.length;r++){const s=n[r];if(s.identifier===t)return s}return null}function Ve(e,t){let n=0,r=0;return t.targetTouches&&t.targetTouches.length===1&&(n=t.targetTouches[0].clientX,r=t.targetTouches[0].clientY),{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function Je(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function jm(e){let t=0,n=0;return e.width!==void 0?t=e.width/2:e.radiusX!==void 0&&(t=e.radiusX),e.height!==void 0?n=e.height/2:e.radiusY!==void 0&&(n=e.radiusY),{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function Vm(e,t){return!(e.left>t.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function _a(e,t){let n=t.getBoundingClientRect(),r=jm(e);return Vm(n,r)}function Fm(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!ys(e)}function Ma(e,t){return e instanceof HTMLInputElement?!Na(e,t):Fm(e)}const Rm=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Na(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":Rm.has(e.type)}let St=null,ws=new Set,Kt=new Map,Ze=!1,xs=!1;const Um={Tab:!0,Escape:!0};function Ss(e,t){for(let n of ws)n(e,t)}function Bm(e){return!(e.metaKey||!lt()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Nn(e){Ze=!0,Bm(e)&&(St="keyboard",Ss("keyboard",e))}function ye(e){St="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Ze=!0,Ss("pointer",e))}function Ia(e){fr(e)&&(Ze=!0,St="virtual")}function Oa(e){e.target===window||e.target===document||An||!e.isTrusted||(!Ze&&!xs&&(St="virtual",Ss("virtual",e)),Ze=!1,xs=!1)}function La(){An||(Ze=!1,xs=!0)}function Ts(e){if(typeof window>"u"||typeof document>"u"||Kt.get(ge(e)))return;const t=ge(e),n=ce(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Ze=!0,r.apply(this,arguments)},n.addEventListener("keydown",Nn,!0),n.addEventListener("keyup",Nn,!0),n.addEventListener("click",Ia,!0),t.addEventListener("focus",Oa,!0),t.addEventListener("blur",La,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",ye,!0),n.addEventListener("pointermove",ye,!0),n.addEventListener("pointerup",ye,!0)):process.env.NODE_ENV==="test"&&(n.addEventListener("mousedown",ye,!0),n.addEventListener("mousemove",ye,!0),n.addEventListener("mouseup",ye,!0)),t.addEventListener("beforeunload",()=>{Da(e)},{once:!0}),Kt.set(t,{focus:r})}const Da=(e,t)=>{const n=ge(e),r=ce(e);t&&r.removeEventListener("DOMContentLoaded",t),Kt.has(n)&&(n.HTMLElement.prototype.focus=Kt.get(n).focus,r.removeEventListener("keydown",Nn,!0),r.removeEventListener("keyup",Nn,!0),r.removeEventListener("click",Ia,!0),n.removeEventListener("focus",Oa,!0),n.removeEventListener("blur",La,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",ye,!0),r.removeEventListener("pointermove",ye,!0),r.removeEventListener("pointerup",ye,!0)):process.env.NODE_ENV==="test"&&(r.removeEventListener("mousedown",ye,!0),r.removeEventListener("mousemove",ye,!0),r.removeEventListener("mouseup",ye,!0)),Kt.delete(n))};function zm(e){const t=ce(e);let n;return t.readyState!=="loading"?Ts(e):(n=()=>{Ts(e)},t.addEventListener("DOMContentLoaded",n)),()=>Da(e,n)}typeof document<"u"&&zm();function ja(){return St!=="pointer"}function Gm(){return St}const Km=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Hm(e,t,n){let r=ce(n?.target);const s=typeof window<"u"?ge(n?.target).HTMLInputElement:HTMLInputElement,o=typeof window<"u"?ge(n?.target).HTMLTextAreaElement:HTMLTextAreaElement,i=typeof window<"u"?ge(n?.target).HTMLElement:HTMLElement,a=typeof window<"u"?ge(n?.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof s&&!Km.has(r.activeElement.type)||r.activeElement instanceof o||r.activeElement instanceof i&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof a&&!Um[n.key])}function Wm(e,t,n){Ts(),b.useEffect(()=>{let r=(s,o)=>{Hm(!!n?.isTextInput,s,o)&&e(ja())};return ws.add(r),()=>{ws.delete(r)}},t)}function qm(e){const t=ce(e),n=Dt(t);if(Gm()==="virtual"){let r=n;So(()=>{Dt(t)===r&&e.isConnected&&at(e)})}else at(e)}function Va(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:s}=e;const o=b.useCallback(c=>{if(c.target===c.currentTarget)return r&&r(c),s&&s(!1),!0},[r,s]),i=wa(o),a=b.useCallback(c=>{const u=ce(c.target),l=u?Dt(u):Dt();c.target===c.currentTarget&&l===ee(c.nativeEvent)&&(n&&n(c),s&&s(!0),i(c))},[s,n,i]);return{focusProps:{onFocus:!t&&(n||s||r)?a:void 0,onBlur:!t&&(r||s)?o:void 0}}}function Fa(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){t&&process.env.NODE_ENV!=="production"?console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior."):t=!0},continuePropagation(){t=!1},isPropagationStopped(){return t}};e(r),t&&n.stopPropagation()}}function Ym(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:Fa(e.onKeyDown),onKeyUp:Fa(e.onKeyUp)}}}let Xm=b.createContext(null);function Jm(e){let t=b.useContext(Xm)||{};To(t,e);let{ref:n,...r}=t;return r}function Zm(e,t){let{focusProps:n}=Va(e),{keyboardProps:r}=Ym(e),s=Ge(n,r),o=Jm(t),i=e.isDisabled?{}:o,a=b.useRef(e.autoFocus);b.useEffect(()=>{a.current&&t.current&&qm(t.current),a.current=!1},[t]);let c=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(c=void 0),{focusableProps:Ge({...s,tabIndex:c},i)}}function Qm(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:s}=e,o=b.useRef({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:a}=dr(),c=b.useCallback(d=>{d.currentTarget.contains(d.target)&&o.current.isFocusWithin&&!d.currentTarget.contains(d.relatedTarget)&&(o.current.isFocusWithin=!1,a(),n&&n(d),s&&s(!1))},[n,s,o,a]),u=wa(c),l=b.useCallback(d=>{if(!d.currentTarget.contains(d.target))return;const m=ce(d.target),w=Dt(m);if(!o.current.isFocusWithin&&w===ee(d.nativeEvent)){r&&r(d),s&&s(!0),o.current.isFocusWithin=!0,u(d);let p=d.currentTarget;i(m,"focus",v=>{if(o.current.isFocusWithin&&!re(p,v.target)){let y=new m.defaultView.FocusEvent("blur",{relatedTarget:v.target});va(y,p);let E=hs(y);c(E)}},{capture:!0})}},[r,s,u,i,c]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:c}}}let In=!1,On=0;function Es(){In=!0,setTimeout(()=>{In=!1},50)}function Ra(e){e.pointerType==="touch"&&Es()}function eh(){if(!(typeof document>"u"))return On===0&&(typeof PointerEvent<"u"?document.addEventListener("pointerup",Ra):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",Es)),On++,()=>{On--,!(On>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",Ra):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",Es))}}function Cs(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:s}=e,[o,i]=b.useState(!1),a=b.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;b.useEffect(eh,[]);let{addGlobalListener:c,removeAllGlobalListeners:u}=dr(),{hoverProps:l,triggerHoverEnd:d}=b.useMemo(()=>{let m=(v,y)=>{if(a.pointerType=y,s||y==="touch"||a.isHovered||!v.currentTarget.contains(v.target))return;a.isHovered=!0;let E=v.currentTarget;a.target=E,c(ce(v.target),"pointerover",N=>{a.isHovered&&a.target&&!re(a.target,N.target)&&w(N,N.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:E,pointerType:y}),n&&n(!0),i(!0)},w=(v,y)=>{let E=a.target;a.pointerType="",a.target=null,!(y==="touch"||!a.isHovered||!E)&&(a.isHovered=!1,u(),r&&r({type:"hoverend",target:E,pointerType:y}),n&&n(!1),i(!1))},p={};return typeof PointerEvent<"u"?(p.onPointerEnter=v=>{In&&v.pointerType==="mouse"||m(v,v.pointerType)},p.onPointerLeave=v=>{!s&&v.currentTarget.contains(v.target)&&w(v,v.pointerType)}):process.env.NODE_ENV==="test"&&(p.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},p.onMouseEnter=v=>{!a.ignoreEmulatedMouseEvents&&!In&&m(v,"mouse"),a.ignoreEmulatedMouseEvents=!1},p.onMouseLeave=v=>{!s&&v.currentTarget.contains(v.target)&&w(v,"mouse")}),{hoverProps:p,triggerHoverEnd:w}},[t,n,r,s,a,c,u]);return b.useEffect(()=>{s&&d({currentTarget:a.target},a.pointerType)},[s]),{hoverProps:l,isHovered:o}}function Ps(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,s=b.useRef({isFocused:!1,isFocusVisible:t||ja()}),[o,i]=b.useState(!1),[a,c]=b.useState(()=>s.current.isFocused&&s.current.isFocusVisible),u=b.useCallback(()=>c(s.current.isFocused&&s.current.isFocusVisible),[]),l=b.useCallback(w=>{s.current.isFocused=w,i(w),u()},[u]);Wm(w=>{s.current.isFocusVisible=w,u()},[],{isTextInput:n});let{focusProps:d}=Va({isDisabled:r,onFocusChange:l}),{focusWithinProps:m}=Qm({isDisabled:!r,onFocusWithinChange:l});return{isFocused:o,isFocusVisible:a,focusProps:r?m:d}}function Qe(e){return b.forwardRef(e)}var ks=(e,t,n=!0)=>{if(!t)return[e,{}];const r=t.reduce((s,o)=>o in e?{...s,[o]:e[o]}:s,{});return n?[Object.keys(e).filter(o=>!t.includes(o)).reduce((o,i)=>({...o,[i]:e[i]}),{}),r]:[e,r]},th={default:"bg-default text-default-foreground",primary:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",success:"bg-success text-success-foreground",warning:"bg-warning text-warning-foreground",danger:"bg-danger text-danger-foreground"},nh={default:"shadow-lg shadow-default/50 bg-default text-default-foreground",primary:"shadow-lg shadow-primary/40 bg-primary text-primary-foreground",secondary:"shadow-lg shadow-secondary/40 bg-secondary text-secondary-foreground",success:"shadow-lg shadow-success/40 bg-success text-success-foreground",warning:"shadow-lg shadow-warning/40 bg-warning text-warning-foreground",danger:"shadow-lg shadow-danger/40 bg-danger text-danger-foreground"},rh={default:"bg-transparent border-default text-foreground",primary:"bg-transparent border-primary text-primary",secondary:"bg-transparent border-secondary text-secondary",success:"bg-transparent border-success text-success",warning:"bg-transparent border-warning text-warning",danger:"bg-transparent border-danger text-danger"},sh={default:"bg-default/40 text-default-700",primary:"bg-primary/20 text-primary-600",secondary:"bg-secondary/20 text-secondary-600",success:"bg-success/20 text-success-700 dark:text-success",warning:"bg-warning/20 text-warning-700 dark:text-warning",danger:"bg-danger/20 text-danger-600 dark:text-danger-500"},oh={default:"border-default bg-default-100 text-default-foreground",primary:"border-default bg-default-100 text-primary",secondary:"border-default bg-default-100 text-secondary",success:"border-default bg-default-100 text-success",warning:"border-default bg-default-100 text-warning",danger:"border-default bg-default-100 text-danger"},ih={default:"bg-transparent text-default-foreground",primary:"bg-transparent text-primary",secondary:"bg-transparent text-secondary",success:"bg-transparent text-success",warning:"bg-transparent text-warning",danger:"bg-transparent text-danger"},ah={default:"border-default text-default-foreground",primary:"border-primary text-primary",secondary:"border-secondary text-secondary",success:"border-success text-success",warning:"border-warning text-warning",danger:"border-danger text-danger"},G={solid:th,shadow:nh,bordered:rh,flat:sh,faded:oh,light:ih,ghost:ah},lh={".spinner-bar-animation":{"animation-delay":"calc(-1.2s + (0.1s * var(--bar-index)))",transform:"rotate(calc(30deg * var(--bar-index)))translate(140%)"},".spinner-dot-animation":{"animation-delay":"calc(250ms * var(--dot-index))"},".spinner-dot-blink-animation":{"animation-delay":"calc(200ms * var(--dot-index))"}},ch={".leading-inherit":{"line-height":"inherit"},".bg-img-inherit":{"background-image":"inherit"},".bg-clip-inherit":{"background-clip":"inherit"},".text-fill-inherit":{"-webkit-text-fill-color":"inherit"},".tap-highlight-transparent":{"-webkit-tap-highlight-color":"transparent"},".input-search-cancel-button-none":{"&::-webkit-search-cancel-button":{"-webkit-appearance":"none"}}},uh={".scrollbar-hide":{"-ms-overflow-style":"none","scrollbar-width":"none","&::-webkit-scrollbar":{display:"none"}},".scrollbar-default":{"-ms-overflow-style":"auto","scrollbar-width":"auto","&::-webkit-scrollbar":{display:"block"}}},dh={".text-tiny":{"font-size":"var(--heroui-font-size-tiny)","line-height":"var(--heroui-line-height-tiny)"},".text-small":{"font-size":"var(--heroui-font-size-small)","line-height":"var(--heroui-line-height-small)"},".text-medium":{"font-size":"var(--heroui-font-size-medium)","line-height":"var(--heroui-line-height-medium)"},".text-large":{"font-size":"var(--heroui-font-size-large)","line-height":"var(--heroui-line-height-large)"}},Ce="250ms",fh={".transition-background":{"transition-property":"background","transition-timing-function":"ease","transition-duration":Ce},".transition-colors-opacity":{"transition-property":"color, background-color, border-color, text-decoration-color, fill, stroke, opacity","transition-timing-function":"ease","transition-duration":Ce},".transition-width":{"transition-property":"width","transition-timing-function":"ease","transition-duration":Ce},".transition-height":{"transition-property":"height","transition-timing-function":"ease","transition-duration":Ce},".transition-size":{"transition-property":"width, height","transition-timing-function":"ease","transition-duration":Ce},".transition-left":{"transition-property":"left","transition-timing-function":"ease","transition-duration":Ce},".transition-transform-opacity":{"transition-property":"transform, scale, opacity rotate","transition-timing-function":"ease","transition-duration":Ce},".transition-transform-background":{"transition-property":"transform, scale, background","transition-timing-function":"ease","transition-duration":Ce},".transition-transform-colors":{"transition-property":"transform, scale, color, background, background-color, border-color, text-decoration-color, fill, stroke","transition-timing-function":"ease","transition-duration":Ce},".transition-transform-colors-opacity":{"transition-property":"transform, scale, color, background, background-color, border-color, text-decoration-color, fill, stroke, opacity","transition-timing-function":"ease","transition-duration":Ce}},ph={...ch,...fh,...uh,...dh,...lh},Ln=["small","medium","large"],Ua={theme:{spacing:["divider"],radius:Ln},classGroups:{shadow:[{shadow:Ln}],opacity:[{opacity:["disabled"]}],"font-size":[{text:["tiny",...Ln]}],"border-w":[{border:Ln}],"bg-image":["bg-stripe-gradient-default","bg-stripe-gradient-primary","bg-stripe-gradient-secondary","bg-stripe-gradient-success","bg-stripe-gradient-warning","bg-stripe-gradient-danger"],transition:Object.keys(ph).filter(e=>e.includes(".transition")).map(e=>e.replace(".",""))}},Ba=e=>e===!1?"false":e===!0?"true":e===0?"0":e,pe=e=>{if(!e||typeof e!="object")return!0;for(let t in e)return!1;return!0},mh=(e,t)=>{if(e===t)return!0;if(!e||!t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let s=0;s<n.length;s++){let o=n[s];if(!r.includes(o)||e[o]!==t[o])return!1}return!0};function za(e,t){for(let n=0;n<e.length;n++){let r=e[n];Array.isArray(r)?za(r,t):t.push(r)}}var Ga=(...e)=>{let t=[];za(e,t);let n=[];for(let r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n},Ka=(e,t)=>{let n={};for(let r in e){let s=e[r];if(r in t){let o=t[r];Array.isArray(s)||Array.isArray(o)?n[r]=Ga(o,s):typeof s=="object"&&typeof o=="object"&&s&&o?n[r]=Ka(s,o):n[r]=o+" "+s}else n[r]=s}for(let r in t)r in e||(n[r]=t[r]);return n},hh=/\s+/g,Ha=e=>!e||typeof e!="string"?e:e.replace(hh," ").trim();const As="-",gh=e=>{const t=yh(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(As);return a[0]===""&&a.length!==1&&a.shift(),Wa(a,t)||bh(i)},getConflictingClassGroupIds:(i,a)=>{const c=n[i]||[];return a&&r[i]?[...c,...r[i]]:c}}},Wa=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?Wa(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(As);return t.validators.find(({validator:i})=>i(o))?.classGroupId},qa=/^\[(.+)\]$/,bh=e=>{if(qa.test(e)){const t=qa.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},yh=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const s in n)$s(n[s],r,s,t);return r},$s=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:Ya(t,s);o.classGroupId=n;return}if(typeof s=="function"){if(vh(s)){$s(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,i])=>{$s(i,Ya(t,o),n,r)})})},Ya=(e,t)=>{let n=e;return t.split(As).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},vh=e=>e.isThemeGetter,wh=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let i=n.get(o);if(i!==void 0)return i;if((i=r.get(o))!==void 0)return s(o,i),i},set(o,i){n.has(o)?n.set(o,i):s(o,i)}}},_s="!",Ms=":",xh=Ms.length,Sh=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=s=>{const o=[];let i=0,a=0,c=0,u;for(let p=0;p<s.length;p++){let v=s[p];if(i===0&&a===0){if(v===Ms){o.push(s.slice(c,p)),c=p+xh;continue}if(v==="/"){u=p;continue}}v==="["?i++:v==="]"?i--:v==="("?a++:v===")"&&a--}const l=o.length===0?s:s.substring(c),d=Th(l),m=d!==l,w=u&&u>c?u-c:void 0;return{modifiers:o,hasImportantModifier:m,baseClassName:d,maybePostfixModifierPosition:w}};if(t){const s=t+Ms,o=r;r=i=>i.startsWith(s)?o(i.substring(s.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(n){const s=r;r=o=>n({className:o,parseClassName:s})}return r},Th=e=>e.endsWith(_s)?e.substring(0,e.length-1):e.startsWith(_s)?e.substring(1):e,Eh=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const s=[];let o=[];return r.forEach(i=>{i[0]==="["||t[i]?(s.push(...o.sort(),i),o=[]):o.push(i)}),s.push(...o.sort()),s}},Ch=e=>({cache:wh(e.cacheSize),parseClassName:Sh(e),sortModifiers:Eh(e),...gh(e)}),Ph=/\s+/,kh=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:o}=t,i=[],a=e.trim().split(Ph);let c="";for(let u=a.length-1;u>=0;u-=1){const l=a[u],{isExternal:d,modifiers:m,hasImportantModifier:w,baseClassName:p,maybePostfixModifierPosition:v}=n(l);if(d){c=l+(c.length>0?" "+c:c);continue}let y=!!v,E=r(y?p.substring(0,v):p);if(!E){if(!y){c=l+(c.length>0?" "+c:c);continue}if(E=r(p),!E){c=l+(c.length>0?" "+c:c);continue}y=!1}const N=o(m).join(":"),_=w?N+_s:N,O=_+E;if(i.includes(O))continue;i.push(O);const A=s(E,y);for(let I=0;I<A.length;++I){const $=A[I];i.push(_+$)}c=l+(c.length>0?" "+c:c)}return c};function Ah(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Xa(t))&&(r&&(r+=" "),r+=n);return r}const Xa=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Xa(e[r]))&&(n&&(n+=" "),n+=t);return n};function Ns(e,...t){let n,r,s,o=i;function i(c){const u=t.reduce((l,d)=>d(l),e());return n=Ch(u),r=n.cache.get,s=n.cache.set,o=a,a(c)}function a(c){const u=r(c);if(u)return u;const l=kh(c,n);return s(c,l),l}return function(){return o(Ah.apply(null,arguments))}}const oe=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Ja=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Za=/^\((?:(\w[\w-]*):)?(.+)\)$/i,$h=/^\d+\/\d+$/,_h=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Mh=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Nh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ih=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Oh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Tt=e=>$h.test(e),X=e=>!!e&&!Number.isNaN(Number(e)),Fe=e=>!!e&&Number.isInteger(Number(e)),Is=e=>e.endsWith("%")&&X(e.slice(0,-1)),Me=e=>_h.test(e),Lh=()=>!0,Dh=e=>Mh.test(e)&&!Nh.test(e),Qa=()=>!1,jh=e=>Ih.test(e),Vh=e=>Oh.test(e),Fh=e=>!F(e)&&!R(e),Rh=e=>Et(e,sl,Qa),F=e=>Ja.test(e),et=e=>Et(e,ol,Dh),Os=e=>Et(e,Kh,X),el=e=>Et(e,nl,Qa),Uh=e=>Et(e,rl,Vh),Dn=e=>Et(e,il,jh),R=e=>Za.test(e),Ht=e=>Ct(e,ol),Bh=e=>Ct(e,Hh),tl=e=>Ct(e,nl),zh=e=>Ct(e,sl),Gh=e=>Ct(e,rl),jn=e=>Ct(e,il,!0),Et=(e,t,n)=>{const r=Ja.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Ct=(e,t,n=!1)=>{const r=Za.exec(e);return r?r[1]?t(r[1]):n:!1},nl=e=>e==="position"||e==="percentage",rl=e=>e==="image"||e==="url",sl=e=>e==="length"||e==="size"||e==="bg-size",ol=e=>e==="length",Kh=e=>e==="number",Hh=e=>e==="family-name",il=e=>e==="shadow",Ls=()=>{const e=oe("color"),t=oe("font"),n=oe("text"),r=oe("font-weight"),s=oe("tracking"),o=oe("leading"),i=oe("breakpoint"),a=oe("container"),c=oe("spacing"),u=oe("radius"),l=oe("shadow"),d=oe("inset-shadow"),m=oe("text-shadow"),w=oe("drop-shadow"),p=oe("blur"),v=oe("perspective"),y=oe("aspect"),E=oe("ease"),N=oe("animate"),_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...O(),R,F],I=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto","contain","none"],C=()=>[R,F,c],V=()=>[Tt,"full","auto",...C()],W=()=>[Fe,"none","subgrid",R,F],h=()=>["auto",{span:["full",Fe,R,F]},Fe,R,F],k=()=>[Fe,"auto",R,F],j=()=>["auto","min","max","fr",R,F],S=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],L=()=>["start","end","center","stretch","center-safe","end-safe"],g=()=>["auto",...C()],M=()=>[Tt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],T=()=>[e,R,F],B=()=>[...O(),tl,el,{position:[R,F]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],D=()=>["auto","cover","contain",zh,Rh,{size:[R,F]}],z=()=>[Is,Ht,et],U=()=>["","none","full",u,R,F],Y=()=>["",X,Ht,et],Z=()=>["solid","dashed","dotted","double"],ie=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>[X,Is,tl,el],Q=()=>["","none",p,R,F],le=()=>["none",X,R,F],ve=()=>["none",X,R,F],we=()=>[X,R,F],ke=()=>[Tt,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Me],breakpoint:[Me],color:[Lh],container:[Me],"drop-shadow":[Me],ease:["in","out","in-out"],font:[Fh],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Me],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Me],shadow:[Me],spacing:["px",X],text:[Me],"text-shadow":[Me],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Tt,F,R,y]}],container:["container"],columns:[{columns:[X,F,R,a]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"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:A()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:V()}],"inset-x":[{"inset-x":V()}],"inset-y":[{"inset-y":V()}],start:[{start:V()}],end:[{end:V()}],top:[{top:V()}],right:[{right:V()}],bottom:[{bottom:V()}],left:[{left:V()}],visibility:["visible","invisible","collapse"],z:[{z:[Fe,"auto",R,F]}],basis:[{basis:[Tt,"full","auto",a,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[X,Tt,"auto","initial","none",F]}],grow:[{grow:["",X,R,F]}],shrink:[{shrink:["",X,R,F]}],order:[{order:[Fe,"first","last","none",R,F]}],"grid-cols":[{"grid-cols":W()}],"col-start-end":[{col:h()}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":W()}],"row-start-end":[{row:h()}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":j()}],"auto-rows":[{"auto-rows":j()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...S(),"normal"]}],"justify-items":[{"justify-items":[...L(),"normal"]}],"justify-self":[{"justify-self":["auto",...L()]}],"align-content":[{content:["normal",...S()]}],"align-items":[{items:[...L(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...L(),{baseline:["","last"]}]}],"place-content":[{"place-content":S()}],"place-items":[{"place-items":[...L(),"baseline"]}],"place-self":[{"place-self":["auto",...L()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:g()}],mx:[{mx:g()}],my:[{my:g()}],ms:[{ms:g()}],me:[{me:g()}],mt:[{mt:g()}],mr:[{mr:g()}],mb:[{mb:g()}],ml:[{ml:g()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:M()}],w:[{w:[a,"screen",...M()]}],"min-w":[{"min-w":[a,"screen","none",...M()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...M()]}],h:[{h:["screen","lh",...M()]}],"min-h":[{"min-h":["screen","lh","none",...M()]}],"max-h":[{"max-h":["screen","lh",...M()]}],"font-size":[{text:["base",n,Ht,et]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,R,Os]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Is,F]}],"font-family":[{font:[Bh,F,t]}],"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:[s,R,F]}],"line-clamp":[{"line-clamp":[X,"none",R,Os]}],leading:[{leading:[o,...C()]}],"list-image":[{"list-image":["none",R,F]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",R,F]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Z(),"wavy"]}],"text-decoration-thickness":[{decoration:[X,"from-font","auto",R,et]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[X,"auto",R,F]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",R,F]}],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",R,F]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:B()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:D()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Fe,R,F],radial:["",R,F],conic:[Fe,R,F]},Gh,Uh]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:z()}],"gradient-via-pos":[{via:z()}],"gradient-to-pos":[{to:z()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:U()}],"rounded-s":[{"rounded-s":U()}],"rounded-e":[{"rounded-e":U()}],"rounded-t":[{"rounded-t":U()}],"rounded-r":[{"rounded-r":U()}],"rounded-b":[{"rounded-b":U()}],"rounded-l":[{"rounded-l":U()}],"rounded-ss":[{"rounded-ss":U()}],"rounded-se":[{"rounded-se":U()}],"rounded-ee":[{"rounded-ee":U()}],"rounded-es":[{"rounded-es":U()}],"rounded-tl":[{"rounded-tl":U()}],"rounded-tr":[{"rounded-tr":U()}],"rounded-br":[{"rounded-br":U()}],"rounded-bl":[{"rounded-bl":U()}],"border-w":[{border:Y()}],"border-w-x":[{"border-x":Y()}],"border-w-y":[{"border-y":Y()}],"border-w-s":[{"border-s":Y()}],"border-w-e":[{"border-e":Y()}],"border-w-t":[{"border-t":Y()}],"border-w-r":[{"border-r":Y()}],"border-w-b":[{"border-b":Y()}],"border-w-l":[{"border-l":Y()}],"divide-x":[{"divide-x":Y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Z(),"hidden","none"]}],"divide-style":[{divide:[...Z(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...Z(),"none","hidden"]}],"outline-offset":[{"outline-offset":[X,R,F]}],"outline-w":[{outline:["",X,Ht,et]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",l,jn,Dn]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",d,jn,Dn]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[X,et]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",m,jn,Dn]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[X,R,F]}],"mix-blend":[{"mix-blend":[...ie(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ie()}],"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":[X]}],"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":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"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":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"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":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"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":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"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":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"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":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"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":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[R,F]}],"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":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"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":O()}],"mask-image-conic-pos":[{"mask-conic":[X]}],"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":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:B()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:D()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",R,F]}],filter:[{filter:["","none",R,F]}],blur:[{blur:Q()}],brightness:[{brightness:[X,R,F]}],contrast:[{contrast:[X,R,F]}],"drop-shadow":[{"drop-shadow":["","none",w,jn,Dn]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",X,R,F]}],"hue-rotate":[{"hue-rotate":[X,R,F]}],invert:[{invert:["",X,R,F]}],saturate:[{saturate:[X,R,F]}],sepia:[{sepia:["",X,R,F]}],"backdrop-filter":[{"backdrop-filter":["","none",R,F]}],"backdrop-blur":[{"backdrop-blur":Q()}],"backdrop-brightness":[{"backdrop-brightness":[X,R,F]}],"backdrop-contrast":[{"backdrop-contrast":[X,R,F]}],"backdrop-grayscale":[{"backdrop-grayscale":["",X,R,F]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[X,R,F]}],"backdrop-invert":[{"backdrop-invert":["",X,R,F]}],"backdrop-opacity":[{"backdrop-opacity":[X,R,F]}],"backdrop-saturate":[{"backdrop-saturate":[X,R,F]}],"backdrop-sepia":[{"backdrop-sepia":["",X,R,F]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",R,F]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[X,"initial",R,F]}],ease:[{ease:["linear","initial",E,R,F]}],delay:[{delay:[X,R,F]}],animate:[{animate:["none",N,R,F]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,R,F]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:le()}],"rotate-x":[{"rotate-x":le()}],"rotate-y":[{"rotate-y":le()}],"rotate-z":[{"rotate-z":le()}],scale:[{scale:ve()}],"scale-x":[{"scale-x":ve()}],"scale-y":[{"scale-y":ve()}],"scale-z":[{"scale-z":ve()}],"scale-3d":["scale-3d"],skew:[{skew:we()}],"skew-x":[{"skew-x":we()}],"skew-y":[{"skew-y":we()}],transform:[{transform:[R,F,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ke()}],"translate-x":[{"translate-x":ke()}],"translate-y":[{"translate-y":ke()}],"translate-z":[{"translate-z":ke()}],"translate-none":["translate-none"],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"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",R,F]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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",R,F]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[X,Ht,et,Os]}],stroke:[{stroke:["none",...T()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Wh=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:s={},override:o={}})=>(Wt(e,"cacheSize",t),Wt(e,"prefix",n),Wt(e,"experimentalParseClassName",r),Vn(e.theme,o.theme),Vn(e.classGroups,o.classGroups),Vn(e.conflictingClassGroups,o.conflictingClassGroups),Vn(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),Wt(e,"orderSensitiveModifiers",o.orderSensitiveModifiers),Fn(e.theme,s.theme),Fn(e.classGroups,s.classGroups),Fn(e.conflictingClassGroups,s.conflictingClassGroups),Fn(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),al(e,s,"orderSensitiveModifiers"),e),Wt=(e,t,n)=>{n!==void 0&&(e[t]=n)},Vn=(e,t)=>{if(t)for(const n in t)Wt(e,n,t[n])},Fn=(e,t)=>{if(t)for(const n in t)al(e,t,n)},al=(e,t,n)=>{const r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},qh=(e,...t)=>typeof e=="function"?Ns(Ls,e,...t):Ns(()=>Wh(Ls(),e),...t),Yh=Ns(Ls);var Xh=e=>pe(e)?Yh:qh({...e,extend:{theme:e.theme,classGroups:e.classGroups,conflictingClassGroupModifiers:e.conflictingClassGroupModifiers,conflictingClassGroups:e.conflictingClassGroups,...e.extend}}),Jh={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},Rn=(...e)=>{let t=[];ll(e,t);let n="";for(let r=0;r<t.length;r++)t[r]&&(n&&(n+=" "),n+=t[r]);return n||void 0};function ll(e,t){for(let n=0;n<e.length;n++){let r=e[n];Array.isArray(r)?ll(r,t):r&&t.push(r)}}var Ds=null,js={},Vs=!1,Un=(...e)=>t=>{let n=Rn(e);return!n||!t.twMerge?n:((!Ds||Vs)&&(Vs=!1,Ds=Xh(js)),Ds(n)||void 0)},cl=(e,t)=>{for(let n in t)n in e?e[n]=Rn(e[n],t[n]):e[n]=t[n];return e},Zh=(e,t)=>{let{extend:n=null,slots:r={},variants:s={},compoundVariants:o=[],compoundSlots:i=[],defaultVariants:a={}}=e,c={...Jh,...t},u=n?.base?Rn(n.base,e?.base):e?.base,l=n?.variants&&!pe(n.variants)?Ka(s,n.variants):s,d=n?.defaultVariants&&!pe(n.defaultVariants)?{...n.defaultVariants,...a}:a;!pe(c.twMergeConfig)&&!mh(c.twMergeConfig,js)&&(Vs=!0,js=c.twMergeConfig);let m=pe(n?.slots),w=pe(r)?{}:{base:Rn(e?.base,m&&n?.base),...r},p=m?w:cl({...n?.slots},pe(w)?{base:e?.base}:w),v=pe(n?.compoundVariants)?o:Ga(n?.compoundVariants,o),y=N=>{if(pe(l)&&pe(r)&&m)return Un(u,N?.class,N?.className)(c);if(v&&!Array.isArray(v))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof v}`);if(i&&!Array.isArray(i))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof i}`);let _=(k,j,S=[],L)=>{let g=S;if(typeof j=="string"){let M=Ha(j).split(" ");for(let T=0;T<M.length;T++)g.push(`${k}:${M[T]}`)}else if(Array.isArray(j))for(let M=0;M<j.length;M++)g.push(`${k}:${j[M]}`);else if(typeof j=="object"&&typeof L=="string"&&L in j){let M=j[L];if(M&&typeof M=="string"){let T=Ha(M).split(" "),B=[];for(let P=0;P<T.length;P++)B.push(`${k}:${T[P]}`);g[L]=g[L]?g[L].concat(B):B}else if(Array.isArray(M)&&M.length>0){let T=[];for(let B=0;B<M.length;B++)T.push(`${k}:${M[B]}`);g[L]=T}}return g},O=(k,j=l,S=null,L=null)=>{let g=j[k];if(!g||pe(g))return null;let M=L?.[k]??N?.[k];if(M===null)return null;let T=Ba(M),B=Array.isArray(c.responsiveVariants)&&c.responsiveVariants.length>0||c.responsiveVariants===!0,P=d?.[k],D=[];if(typeof T=="object"&&B)for(let[Y,Z]of Object.entries(T)){let ie=g[Z];if(Y==="initial"){P=Z;continue}Array.isArray(c.responsiveVariants)&&!c.responsiveVariants.includes(Y)||(D=_(Y,ie,D,S))}let z=T!=null&&typeof T!="object"?T:Ba(P),U=g[z||"false"];return typeof D=="object"&&typeof S=="string"&&D[S]?cl(D,U):D.length>0?(D.push(U),S==="base"?D.join(" "):D):U},A=()=>{if(!l)return null;let k=Object.keys(l),j=[];for(let S=0;S<k.length;S++){let L=O(k[S],l);L&&j.push(L)}return j},I=(k,j)=>{if(!l||typeof l!="object")return null;let S=[];for(let L in l){let g=O(L,l,k,j),M=k==="base"&&typeof g=="string"?g:g&&g[k];M&&S.push(M)}return S},$={};for(let k in N){let j=N[k];j!==void 0&&($[k]=j)}let C=(k,j)=>{let S=typeof N?.[k]=="object"?{[k]:N[k]?.initial}:{};return{...d,...$,...S,...j}},V=(k=[],j)=>{let S=[],L=k.length;for(let g=0;g<L;g++){let{class:M,className:T,...B}=k[g],P=!0,D=C(null,j);for(let z in B){let U=B[z],Y=D[z];if(Array.isArray(U)){if(!U.includes(Y)){P=!1;break}}else{if((U==null||U===!1)&&(Y==null||Y===!1))continue;if(Y!==U){P=!1;break}}}P&&(M&&S.push(M),T&&S.push(T))}return S},W=k=>{let j=V(v,k);if(!Array.isArray(j))return j;let S={},L=Un;for(let g=0;g<j.length;g++){let M=j[g];if(typeof M=="string")S.base=L(S.base,M)(c);else if(typeof M=="object")for(let T in M)S[T]=L(S[T],M[T])(c)}return S},h=k=>{if(i.length<1)return null;let j={},S=C(null,k);for(let L=0;L<i.length;L++){let{slots:g=[],class:M,className:T,...B}=i[L];if(!pe(B)){let P=!0;for(let D in B){let z=S[D],U=B[D];if(z===void 0||(Array.isArray(U)?!U.includes(z):U!==z)){P=!1;break}}if(!P)continue}for(let P=0;P<g.length;P++){let D=g[P];j[D]||(j[D]=[]),j[D].push([M,T])}}return j};if(!pe(r)||!m){let k={};if(typeof p=="object"&&!pe(p)){let j=Un;for(let S in p)k[S]=L=>{let g=W(L),M=h(L);return j(p[S],I(S,L),g?g[S]:void 0,M?M[S]:void 0,L?.class,L?.className)(c)}}return k}return Un(u,A(),V(v),N?.class,N?.className)(c)},E=()=>{if(!(!l||typeof l!="object"))return Object.keys(l)};return y.variantKeys=E(),y.extend=n,y.base=u,y.slots=p,y.variants=l,y.defaultVariants=d,y.compoundSlots=i,y.compoundVariants=v,y},Re=(e,t)=>{var n,r,s;return Zh(e,{...t,twMerge:(n=t?.twMerge)!=null?n:!0,twMergeConfig:{...t?.twMergeConfig,theme:{...(r=t?.twMergeConfig)==null?void 0:r.theme,...Ua.theme},classGroups:{...(s=t?.twMergeConfig)==null?void 0:s.classGroups,...Ua.classGroups}}})},ul=Re({slots:{base:"relative inline-flex flex-col gap-2 items-center justify-center",wrapper:"relative flex",label:"text-foreground dark:text-foreground-dark font-regular",circle1:"absolute w-full h-full rounded-full",circle2:"absolute w-full h-full rounded-full",dots:"relative rounded-full mx-auto",spinnerBars:["absolute","animate-fade-out","rounded-full","w-[25%]","h-[8%]","left-[calc(37.5%)]","top-[calc(46%)]","spinner-bar-animation"]},variants:{size:{sm:{wrapper:"w-5 h-5",circle1:"border-2",circle2:"border-2",dots:"size-1",label:"text-small"},md:{wrapper:"w-8 h-8",circle1:"border-3",circle2:"border-3",dots:"size-1.5",label:"text-medium"},lg:{wrapper:"w-10 h-10",circle1:"border-3",circle2:"border-3",dots:"size-2",label:"text-large"}},color:{current:{circle1:"border-b-current",circle2:"border-b-current",dots:"bg-current",spinnerBars:"bg-current"},white:{circle1:"border-b-white",circle2:"border-b-white",dots:"bg-white",spinnerBars:"bg-white"},default:{circle1:"border-b-default",circle2:"border-b-default",dots:"bg-default",spinnerBars:"bg-default"},primary:{circle1:"border-b-primary",circle2:"border-b-primary",dots:"bg-primary",spinnerBars:"bg-primary"},secondary:{circle1:"border-b-secondary",circle2:"border-b-secondary",dots:"bg-secondary",spinnerBars:"bg-secondary"},success:{circle1:"border-b-success",circle2:"border-b-success",dots:"bg-success",spinnerBars:"bg-success"},warning:{circle1:"border-b-warning",circle2:"border-b-warning",dots:"bg-warning",spinnerBars:"bg-warning"},danger:{circle1:"border-b-danger",circle2:"border-b-danger",dots:"bg-danger",spinnerBars:"bg-danger"}},labelColor:{foreground:{label:"text-foreground"},primary:{label:"text-primary"},secondary:{label:"text-secondary"},success:{label:"text-success"},warning:{label:"text-warning"},danger:{label:"text-danger"}},variant:{default:{circle1:["animate-spinner-ease-spin","border-solid","border-t-transparent","border-l-transparent","border-r-transparent"],circle2:["opacity-75","animate-spinner-linear-spin","border-dotted","border-t-transparent","border-l-transparent","border-r-transparent"]},gradient:{circle1:["border-0","bg-gradient-to-b","from-transparent","via-transparent","to-primary","animate-spinner-linear-spin","[animation-duration:1s]","[-webkit-mask:radial-gradient(closest-side,rgba(0,0,0,0.0)calc(100%-3px),rgba(0,0,0,1)calc(100%-3px))]"],circle2:["hidden"]},wave:{wrapper:"translate-y-3/4",dots:["animate-sway","spinner-dot-animation"]},dots:{wrapper:"translate-y-2/4",dots:["animate-blink","spinner-dot-blink-animation"]},spinner:{},simple:{wrapper:"text-foreground h-5 w-5 animate-spin",circle1:"opacity-25",circle2:"opacity-75"}}},defaultVariants:{size:"md",color:"primary",labelColor:"foreground",variant:"default"},compoundVariants:[{variant:"gradient",color:"current",class:{circle1:"to-current"}},{variant:"gradient",color:"white",class:{circle1:"to-white"}},{variant:"gradient",color:"default",class:{circle1:"to-default"}},{variant:"gradient",color:"primary",class:{circle1:"to-primary"}},{variant:"gradient",color:"secondary",class:{circle1:"to-secondary"}},{variant:"gradient",color:"success",class:{circle1:"to-success"}},{variant:"gradient",color:"warning",class:{circle1:"to-warning"}},{variant:"gradient",color:"danger",class:{circle1:"to-danger"}},{variant:"wave",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"wave",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"wave",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"dots",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"dots",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"dots",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"simple",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"simple",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"simple",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"simple",color:"current",class:{wrapper:"text-current"}},{variant:"simple",color:"white",class:{wrapper:"text-white"}},{variant:"simple",color:"default",class:{wrapper:"text-default"}},{variant:"simple",color:"primary",class:{wrapper:"text-primary"}},{variant:"simple",color:"secondary",class:{wrapper:"text-secondary"}},{variant:"simple",color:"success",class:{wrapper:"text-success"}},{variant:"simple",color:"warning",class:{wrapper:"text-warning"}},{variant:"simple",color:"danger",class:{wrapper:"text-danger"}}]}),Fs=["outline-solid outline-transparent","data-[focus-visible=true]:z-10","data-[focus-visible=true]:outline-2","data-[focus-visible=true]:outline-focus","data-[focus-visible=true]:outline-offset-2"],Rs=["absolute","top-1/2","left-1/2","-translate-x-1/2","-translate-y-1/2"],Pt={default:["[&+.border-medium.border-default]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],primary:["[&+.border-medium.border-primary]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],secondary:["[&+.border-medium.border-secondary]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],success:["[&+.border-medium.border-success]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],warning:["[&+.border-medium.border-warning]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],danger:["[&+.border-medium.border-danger]:ms-[calc(var(--heroui-border-width-medium)*-1)]"]},dl=Re({slots:{base:"flex flex-col gap-2 w-full",label:"",labelWrapper:"flex justify-between",value:"",track:"z-0 relative bg-default-300/50 overflow-hidden rtl:rotate-180",indicator:"h-full"},variants:{color:{default:{indicator:"bg-default-400"},primary:{indicator:"bg-primary"},secondary:{indicator:"bg-secondary"},success:{indicator:"bg-success"},warning:{indicator:"bg-warning"},danger:{indicator:"bg-danger"}},size:{sm:{label:"text-small",value:"text-small",track:"h-1"},md:{label:"text-medium",value:"text-medium",track:"h-3"},lg:{label:"text-large",value:"text-large",track:"h-5"}},radius:{none:{track:"rounded-none",indicator:"rounded-none"},sm:{track:"rounded-small",indicator:"rounded-small"},md:{track:"rounded-medium",indicator:"rounded-medium"},lg:{track:"rounded-large",indicator:"rounded-large"},full:{track:"rounded-full",indicator:"rounded-full"}},isStriped:{true:{indicator:"bg-stripe-gradient-default bg-stripe-size"}},isIndeterminate:{true:{indicator:["absolute","w-full","origin-left","animate-indeterminate-bar"]}},isDisabled:{true:{base:"opacity-disabled cursor-not-allowed"}},disableAnimation:{true:{},false:{indicator:"transition-transform !duration-500"}}},defaultVariants:{color:"primary",size:"md",radius:"full",isStriped:!1,isIndeterminate:!1,isDisabled:!1},compoundVariants:[{disableAnimation:!0,isIndeterminate:!1,class:{indicator:"!transition-none motion-reduce:transition-none"}},{color:"primary",isStriped:!0,class:{indicator:"bg-stripe-gradient-primary bg-stripe-size"}},{color:"secondary",isStriped:!0,class:{indicator:"bg-stripe-gradient-secondary bg-stripe-size"}},{color:"success",isStriped:!0,class:{indicator:"bg-stripe-gradient-success bg-stripe-size"}},{color:"warning",isStriped:!0,class:{indicator:"bg-stripe-gradient-warning bg-stripe-size"}},{color:"danger",isStriped:!0,class:{indicator:"bg-stripe-gradient-danger bg-stripe-size"}}]},{twMerge:!0});Re({slots:{base:"flex flex-col justify-center gap-1 max-w-fit items-center",label:"",svgWrapper:"relative block",svg:"z-0 relative overflow-hidden",track:"h-full stroke-default-300/50",indicator:"h-full stroke-current",value:"absolute font-normal inset-0 flex items-center justify-center"},variants:{color:{default:{svg:"text-default-400"},primary:{svg:"text-primary"},secondary:{svg:"text-secondary"},success:{svg:"text-success"},warning:{svg:"text-warning"},danger:{svg:"text-danger"}},size:{sm:{svg:"w-8 h-8",label:"text-small",value:"text-[0.5rem]"},md:{svg:"w-10 h-10",label:"text-small",value:"text-[0.55rem]"},lg:{svg:"w-12 h-12",label:"text-medium",value:"text-[0.6rem]"}},isIndeterminate:{true:{svg:"animate-spinner-ease-spin"}},isDisabled:{true:{base:"opacity-disabled cursor-not-allowed"}},disableAnimation:{true:{},false:{indicator:"transition-all !duration-500"}}},defaultVariants:{color:"primary",size:"md",isDisabled:!1},compoundVariants:[{disableAnimation:!0,isIndeterminate:!1,class:{svg:"!transition-none motion-reduce:transition-none"}}]});var Qh=Re({base:["z-0","group","relative","inline-flex","items-center","justify-center","box-border","appearance-none","outline-solid outline-transparent","select-none","whitespace-nowrap","min-w-max","font-normal","subpixel-antialiased","overflow-hidden","tap-highlight-transparent","transform-gpu data-[pressed=true]:scale-[0.97]","cursor-pointer",...Fs],variants:{variant:{solid:"",bordered:"border-medium bg-transparent",light:"bg-transparent",flat:"",faded:"border-medium",shadow:"",ghost:"border-medium bg-transparent"},size:{sm:"px-3 min-w-16 h-8 text-tiny gap-2 rounded-small",md:"px-4 min-w-20 h-10 text-small gap-2 rounded-medium",lg:"px-6 min-w-24 h-12 text-medium gap-3 rounded-large"},color:{default:"",primary:"",secondary:"",success:"",warning:"",danger:""},radius:{none:"rounded-none",sm:"rounded-small",md:"rounded-medium",lg:"rounded-large",full:"rounded-full"},fullWidth:{true:"w-full"},isDisabled:{true:"opacity-disabled pointer-events-none"},isInGroup:{true:"[&:not(:first-child):not(:last-child)]:rounded-none"},isIconOnly:{true:"px-0 !gap-0",false:"[&>svg]:max-w-[theme(spacing.8)]"},disableAnimation:{true:"!transition-none data-[pressed=true]:scale-100",false:"transition-transform-colors-opacity motion-reduce:transition-none"}},defaultVariants:{size:"md",variant:"solid",color:"default",fullWidth:!1,isDisabled:!1,isInGroup:!1},compoundVariants:[{variant:"solid",color:"default",class:G.solid.default},{variant:"solid",color:"primary",class:G.solid.primary},{variant:"solid",color:"secondary",class:G.solid.secondary},{variant:"solid",color:"success",class:G.solid.success},{variant:"solid",color:"warning",class:G.solid.warning},{variant:"solid",color:"danger",class:G.solid.danger},{variant:"shadow",color:"default",class:G.shadow.default},{variant:"shadow",color:"primary",class:G.shadow.primary},{variant:"shadow",color:"secondary",class:G.shadow.secondary},{variant:"shadow",color:"success",class:G.shadow.success},{variant:"shadow",color:"warning",class:G.shadow.warning},{variant:"shadow",color:"danger",class:G.shadow.danger},{variant:"bordered",color:"default",class:G.bordered.default},{variant:"bordered",color:"primary",class:G.bordered.primary},{variant:"bordered",color:"secondary",class:G.bordered.secondary},{variant:"bordered",color:"success",class:G.bordered.success},{variant:"bordered",color:"warning",class:G.bordered.warning},{variant:"bordered",color:"danger",class:G.bordered.danger},{variant:"flat",color:"default",class:G.flat.default},{variant:"flat",color:"primary",class:G.flat.primary},{variant:"flat",color:"secondary",class:G.flat.secondary},{variant:"flat",color:"success",class:G.flat.success},{variant:"flat",color:"warning",class:G.flat.warning},{variant:"flat",color:"danger",class:G.flat.danger},{variant:"faded",color:"default",class:G.faded.default},{variant:"faded",color:"primary",class:G.faded.primary},{variant:"faded",color:"secondary",class:G.faded.secondary},{variant:"faded",color:"success",class:G.faded.success},{variant:"faded",color:"warning",class:G.faded.warning},{variant:"faded",color:"danger",class:G.faded.danger},{variant:"light",color:"default",class:[G.light.default,"data-[hover=true]:bg-default/40"]},{variant:"light",color:"primary",class:[G.light.primary,"data-[hover=true]:bg-primary/20"]},{variant:"light",color:"secondary",class:[G.light.secondary,"data-[hover=true]:bg-secondary/20"]},{variant:"light",color:"success",class:[G.light.success,"data-[hover=true]:bg-success/20"]},{variant:"light",color:"warning",class:[G.light.warning,"data-[hover=true]:bg-warning/20"]},{variant:"light",color:"danger",class:[G.light.danger,"data-[hover=true]:bg-danger/20"]},{variant:"ghost",color:"default",class:[G.ghost.default,"data-[hover=true]:!bg-default"]},{variant:"ghost",color:"primary",class:[G.ghost.primary,"data-[hover=true]:!bg-primary data-[hover=true]:!text-primary-foreground"]},{variant:"ghost",color:"secondary",class:[G.ghost.secondary,"data-[hover=true]:!bg-secondary data-[hover=true]:!text-secondary-foreground"]},{variant:"ghost",color:"success",class:[G.ghost.success,"data-[hover=true]:!bg-success data-[hover=true]:!text-success-foreground"]},{variant:"ghost",color:"warning",class:[G.ghost.warning,"data-[hover=true]:!bg-warning data-[hover=true]:!text-warning-foreground"]},{variant:"ghost",color:"danger",class:[G.ghost.danger,"data-[hover=true]:!bg-danger data-[hover=true]:!text-danger-foreground"]},{isInGroup:!0,class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,size:"sm",class:"rounded-none first:rounded-s-small last:rounded-e-small"},{isInGroup:!0,size:"md",class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,size:"lg",class:"rounded-none first:rounded-s-large last:rounded-e-large"},{isInGroup:!0,isRounded:!0,class:"rounded-none first:rounded-s-full last:rounded-e-full"},{isInGroup:!0,radius:"none",class:"rounded-none first:rounded-s-none last:rounded-e-none"},{isInGroup:!0,radius:"sm",class:"rounded-none first:rounded-s-small last:rounded-e-small"},{isInGroup:!0,radius:"md",class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,radius:"lg",class:"rounded-none first:rounded-s-large last:rounded-e-large"},{isInGroup:!0,radius:"full",class:"rounded-none first:rounded-s-full last:rounded-e-full"},{isInGroup:!0,variant:["ghost","bordered"],color:"default",className:Pt.default},{isInGroup:!0,variant:["ghost","bordered"],color:"primary",className:Pt.primary},{isInGroup:!0,variant:["ghost","bordered"],color:"secondary",className:Pt.secondary},{isInGroup:!0,variant:["ghost","bordered"],color:"success",className:Pt.success},{isInGroup:!0,variant:["ghost","bordered"],color:"warning",className:Pt.warning},{isInGroup:!0,variant:["ghost","bordered"],color:"danger",className:Pt.danger},{isIconOnly:!0,size:"sm",class:"min-w-8 w-8 h-8"},{isIconOnly:!0,size:"md",class:"min-w-10 w-10 h-10"},{isIconOnly:!0,size:"lg",class:"min-w-12 w-12 h-12"},{variant:["solid","faded","flat","bordered","shadow"],class:"data-[hover=true]:opacity-hover"}]});Re({base:"inline-flex items-center justify-center h-auto",variants:{fullWidth:{true:"w-full"}},defaultVariants:{fullWidth:!1}});var fl=Re({slots:{base:["flex","flex-col","relative","overflow-hidden","h-auto","outline-solid outline-transparent","text-foreground","box-border","bg-content1",...Fs],header:["flex","p-3","z-10","w-full","justify-start","items-center","shrink-0","overflow-inherit","color-inherit","subpixel-antialiased"],body:["relative","flex","flex-1","w-full","p-3","flex-auto","flex-col","place-content-inherit","align-items-inherit","h-auto","break-words","text-left","overflow-y-auto","subpixel-antialiased"],footer:["p-3","h-auto","flex","w-full","items-center","overflow-hidden","color-inherit","subpixel-antialiased"]},variants:{shadow:{none:{base:"shadow-none"},sm:{base:"shadow-small"},md:{base:"shadow-medium"},lg:{base:"shadow-large"}},radius:{none:{base:"rounded-none",header:"rounded-none",footer:"rounded-none"},sm:{base:"rounded-small",header:"rounded-t-small",footer:"rounded-b-small"},md:{base:"rounded-medium",header:"rounded-t-medium",footer:"rounded-b-medium"},lg:{base:"rounded-large",header:"rounded-t-large",footer:"rounded-b-large"}},fullWidth:{true:{base:"w-full"}},isHoverable:{true:{base:"data-[hover=true]:bg-content2 dark:data-[hover=true]:bg-content2"}},isPressable:{true:{base:"cursor-pointer"}},isBlurred:{true:{base:["bg-background/80","dark:bg-background/20","backdrop-blur-md","backdrop-saturate-150"]}},isFooterBlurred:{true:{footer:["bg-background/10","backdrop-blur","backdrop-saturate-150"]}},isDisabled:{true:{base:"opacity-disabled cursor-not-allowed"}},disableAnimation:{true:"",false:{base:"transition-transform-background motion-reduce:transition-none"}}},compoundVariants:[{isPressable:!0,class:"data-[pressed=true]:scale-[0.97] tap-highlight-transparent"}],defaultVariants:{radius:"lg",shadow:"md",fullWidth:!1,isHoverable:!1,isPressable:!1,isDisabled:!1,isFooterBlurred:!1}}),eg=Re({slots:{base:["flex","relative","justify-center","items-center","box-border","overflow-hidden","align-middle","text-white","z-0",...Fs],img:["flex","object-cover","w-full","h-full","transition-opacity","!duration-500","opacity-0","data-[loaded=true]:opacity-100"],fallback:[...Rs,"flex","items-center","justify-center"],name:[...Rs,"font-normal","text-center","text-inherit"],icon:[...Rs,"flex","items-center","justify-center","text-inherit","w-full","h-full"]},variants:{size:{sm:{base:"w-8 h-8 text-tiny"},md:{base:"w-10 h-10 text-tiny"},lg:{base:"w-14 h-14 text-small"}},color:{default:{base:G.solid.default},primary:{base:G.solid.primary},secondary:{base:G.solid.secondary},success:{base:G.solid.success},warning:{base:G.solid.warning},danger:{base:G.solid.danger}},radius:{none:{base:"rounded-none"},sm:{base:"rounded-small"},md:{base:"rounded-medium"},lg:{base:"rounded-large"},full:{base:"rounded-full"}},isBordered:{true:{base:"ring-2 ring-offset-2 ring-offset-background dark:ring-offset-background-dark"}},isDisabled:{true:{base:"opacity-disabled"}},isInGroup:{true:{base:["-ms-2 data-[hover=true]:-translate-x-3 rtl:data-[hover=true]:translate-x-3 transition-transform","data-[focus-visible=true]:-translate-x-3 rtl:data-[focus-visible=true]:translate-x-3"]}},isInGridGroup:{true:{base:"m-0 data-[hover=true]:translate-x-0"}},disableAnimation:{true:{base:"transition-none",img:"transition-none"},false:{}}},defaultVariants:{size:"md",color:"default",radius:"full"},compoundVariants:[{color:"default",isBordered:!0,class:{base:"ring-default"}},{color:"primary",isBordered:!0,class:{base:"ring-primary"}},{color:"secondary",isBordered:!0,class:{base:"ring-secondary"}},{color:"success",isBordered:!0,class:{base:"ring-success"}},{color:"warning",isBordered:!0,class:{base:"ring-warning"}},{color:"danger",isBordered:!0,class:{base:"ring-danger"}}]});Re({slots:{base:"flex items-center justify-center h-auto w-max",count:"hover:-translate-x-0"},variants:{isGrid:{true:"inline-grid grid-cols-4 gap-3"}}});function tg(e={}){const{rerender:t=!1,delay:n=0}=e,r=b.useRef(!1),[s,o]=b.useState(!1);return b.useEffect(()=>{r.current=!0;let i=null;return t&&(n>0?i=setTimeout(()=>{o(!0)},n):o(!0)),()=>{r.current=!1,t&&o(!1),i&&clearTimeout(i)}},[t]),[b.useCallback(()=>r.current,[]),s]}function ng(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":s,labelElementType:o="label"}=e;t=ir(t);let i=ir(),a={};n?(r=r?`${i} ${r}`:i,a={id:i,htmlFor:o==="label"?t:void 0}):!r&&!s&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let c=Mu({id:t,"aria-label":s,"aria-labelledby":r});return{labelProps:a,fieldProps:c}}function rg(e){let{value:t=0,minValue:n=0,maxValue:r=100,valueLabel:s,isIndeterminate:o,formatOptions:i={style:"percent"}}=e,a=yo(e,{labelable:!0}),{labelProps:c,fieldProps:u}=ng({...e,labelElementType:"span"});t=Fu(t,n,r);let l=(t-n)/(r-n),d=zu(i);if(!o&&!s){let m=i.style==="percent"?l:t;s=d.format(m)}return{progressBarProps:Ge(a,{...u,"aria-valuenow":o?void 0:t,"aria-valuemin":n,"aria-valuemax":r,"aria-valuetext":o?void 0:s,role:"progressbar"}),labelProps:c}}function sg(e){var t,n;const r=It(),[s,o]=ks(e,dl.variantKeys),{ref:i,as:a,id:c,className:u,classNames:l,label:d,valueLabel:m,value:w=0,minValue:p=0,maxValue:v=100,showValueLabel:y=!1,formatOptions:E={style:"percent"},...N}=s,_=a||"div",O=ze(i),A=Ie(l?.base,u),[,I]=tg({rerender:!0,delay:100}),$=e.isIndeterminate,C=(n=(t=e.disableAnimation)!=null?t:r?.disableAnimation)!=null?n:!1,{progressBarProps:V,labelProps:W}=rg({id:c,label:d,value:w,minValue:p,maxValue:v,valueLabel:m,formatOptions:E,isIndeterminate:$,"aria-labelledby":e["aria-labelledby"],"aria-label":e["aria-label"]}),h=b.useMemo(()=>dl({...o,disableAnimation:C}),[tr(o),C]),k=C?!0:I,j=b.useMemo(()=>$||!k?void 0:Uc((w-p)/(v-p)*100),[k,$,w,p,v]),S=b.useCallback((g={})=>({ref:O,"data-indeterminate":ae($),"data-disabled":ae(e.isDisabled),className:h.base({class:A}),...ot(V,N,g)}),[O,h,$,e.isDisabled,A,V,N]),L=b.useCallback((g={})=>({className:h.label({class:l?.label}),...ot(W,g)}),[h,l,W]);return{Component:_,domRef:O,slots:h,classNames:l,label:d,percentage:j,showValueLabel:y,getProgressBarProps:S,getLabelProps:L}}var pl=Qe((e,t)=>{const{Component:n,slots:r,classNames:s,label:o,percentage:i,showValueLabel:a,getProgressBarProps:c,getLabelProps:u}=sg({...e,ref:t}),l=c(),d=o||a;return f.jsxs(n,{...l,children:[d?f.jsxs("div",{className:r.labelWrapper({class:s?.labelWrapper}),children:[o&&f.jsx("span",{...u(),children:o}),a&&f.jsx("span",{className:r.value({class:s?.value}),children:l["aria-valuetext"]})]}):null,f.jsx("div",{className:r.track({class:s?.track}),children:f.jsx("div",{className:r.indicator({class:s?.indicator}),style:{transform:`translateX(-${100-(i||0)}%)`}})})]})});pl.displayName="HeroUI.Progress";var ml=pl,[og,hl]=rn({name:"CardContext",strict:!0,errorMessage:"useCardContext: `context` is undefined. Seems you forgot to wrap component within <Card />"}),gl=Qe((e,t)=>{var n;const{as:r,className:s,children:o,...i}=e,a=r||"div",c=ze(t),{slots:u,classNames:l}=hl(),d=Ie(l?.body,s);return f.jsx(a,{ref:c,className:(n=u.body)==null?void 0:n.call(u,{class:d}),...i,children:o})});gl.displayName="HeroUI.CardBody";var bl=gl,yl=Qe((e,t)=>{var n;const{as:r,className:s,children:o,...i}=e,a=r||"div",c=ze(t),{slots:u,classNames:l}=hl(),d=Ie(l?.footer,s);return f.jsx(a,{ref:c,className:(n=u.footer)==null?void 0:n.call(u,{class:d}),...i,children:o})});yl.displayName="HeroUI.CardFooter";var ig=yl;function vl(e,t){let{elementType:n="button",isDisabled:r,onPress:s,onPressStart:o,onPressEnd:i,onPressUp:a,onPressChange:c,preventFocusOnPress:u,allowFocusWhenDisabled:l,onClick:d,href:m,target:w,rel:p,type:v="button",allowTextSelectionOnPress:y}=e,E;n==="button"?E={type:v,disabled:r}:E={role:"button",href:n==="a"&&!r?m:void 0,target:n==="a"?w:void 0,type:n==="input"?v:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?p:void 0};let{pressProps:N,isPressed:_}=Lm({onClick:d,onPressStart:o,onPressEnd:i,onPressUp:a,onPressChange:c,onPress:s,isDisabled:r,preventFocusOnPress:u,allowTextSelectionOnPress:y,ref:t}),{focusableProps:O}=Zm(e,t);l&&(O.tabIndex=r?-1:O.tabIndex);let A=Ge(O,N,yo(e,{labelable:!0}));return{isPressed:_,buttonProps:Ge(E,A,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"]})}}var ag=()=>Promise.resolve().then(()=>Uy).then(e=>e.default),wl=e=>{const{ripples:t=[],motionProps:n,color:r="currentColor",style:s,onClear:o}=e;return f.jsx(f.Fragment,{children:t.map(i=>{const a=Rc(.01*i.size,.2,i.size>100?.75:.5);return f.jsx(ep,{features:ag,children:f.jsx(Qf,{mode:"popLayout",children:f.jsx(Ip.span,{animate:{transform:"scale(2)",opacity:0},className:"heroui-ripple",exit:{opacity:0},initial:{transform:"scale(0)",opacity:.35},style:{position:"absolute",backgroundColor:r,borderRadius:"100%",transformOrigin:"center",pointerEvents:"none",overflow:"hidden",inset:0,zIndex:0,top:i.y,left:i.x,width:`${i.size}px`,height:`${i.size}px`,...s},transition:{duration:a},onAnimationComplete:()=>{o(i.key)},...n})})},i.key)})})};wl.displayName="HeroUI.Ripple";var xl=wl;function Sl(e={}){const[t,n]=b.useState([]),r=b.useCallback(o=>{const i=o.target,a=Math.max(i.clientWidth,i.clientHeight);n(c=>[...c,{key:Fc(c.length.toString()),size:a,x:o.x-a/2,y:o.y-a/2}])},[]),s=b.useCallback(o=>{n(i=>i.filter(a=>a.key!==o))},[]);return{ripples:t,onClear:s,onPress:r,...e}}function lg(e){var t,n,r,s;const o=It(),[i,a]=ks(e,fl.variantKeys),{ref:c,as:u,children:l,onClick:d,onPress:m,autoFocus:w,className:p,classNames:v,allowTextSelectionOnPress:y=!0,...E}=i,N=ze(c),_=u||(e.isPressable?"button":"div"),O=typeof _=="string",A=(n=(t=e.disableAnimation)!=null?t:o?.disableAnimation)!=null?n:!1,I=(s=(r=e.disableRipple)!=null?r:o?.disableRipple)!=null?s:!1,$=Ie(v?.base,p),{onClear:C,onPress:V,ripples:W}=Sl(),h=b.useCallback(U=>{I||A||N.current&&V(U)},[I,A,N,V]),{buttonProps:k,isPressed:j}=vl({onPress:nr(m,h),elementType:u,isDisabled:!e.isPressable,onClick:d,allowTextSelectionOnPress:y,...E},N),{hoverProps:S,isHovered:L}=Cs({isDisabled:!e.isHoverable,...E}),{isFocusVisible:g,isFocused:M,focusProps:T}=Ps({autoFocus:w}),B=b.useMemo(()=>fl({...a,disableAnimation:A}),[tr(a),A]),P=b.useMemo(()=>({slots:B,classNames:v,disableAnimation:A,isDisabled:e.isDisabled,isFooterBlurred:e.isFooterBlurred,fullWidth:e.fullWidth}),[B,v,e.isDisabled,e.isFooterBlurred,A,e.fullWidth]),D=b.useCallback((U={})=>({ref:N,className:B.base({class:$}),tabIndex:e.isPressable?0:-1,"data-hover":ae(L),"data-pressed":ae(j),"data-focus":ae(M),"data-focus-visible":ae(g),"data-disabled":ae(e.isDisabled),...ot(e.isPressable?{...k,...T,role:"button"}:{},e.isHoverable?S:{},Nt(E,{enabled:O}),Nt(U))}),[N,B,$,O,e.isPressable,e.isHoverable,e.isDisabled,L,j,g,k,T,S,E]),z=b.useCallback(()=>({ripples:W,onClear:C}),[W,C]);return{context:P,domRef:N,Component:_,classNames:v,children:l,isHovered:L,isPressed:j,disableAnimation:A,isPressable:e.isPressable,isHoverable:e.isHoverable,disableRipple:I,handlePress:h,isFocusVisible:g,getCardProps:D,getRippleProps:z}}var Tl=Qe((e,t)=>{const{children:n,context:r,Component:s,isPressable:o,disableAnimation:i,disableRipple:a,getCardProps:c,getRippleProps:u}=lg({...e,ref:t});return f.jsxs(s,{...c(),children:[f.jsx(og,{value:r,children:n}),o&&!i&&!a&&f.jsx(xl,{...u()})]})});Tl.displayName="HeroUI.Card";var El=Tl;/**
30
+ <%s key={someKey} {...props} />`,xt,de,Mo,de),Hn[de+xt]=!0}}return a===s?To(B):Uo(B),B}}function Po(a,_,b){return Wn(a,_,b,!0)}function Io(a,_,b){return Wn(a,_,b,!1)}var Lo=Io,Do=Po;we.Fragment=s,we.jsx=Lo,we.jsxs=Do})()),we}var Et;function Kn(){return Et||(Et=1,process.env.NODE_ENV==="production"?Oe.exports=Gn():Oe.exports=Vn()),Oe.exports}var c=Kn();const St=({progress:e,variant:t="solid",size:n="md",radius:s="md",children:r,className:i="",loading:o,...l})=>{const f=e!==void 0?(h=>h===0?"button--primary":h===100?"button--success":"button--secondary")(e):"button--primary",u=["button",`button--${n}`,`button--${t}`,`button--radius-${s}`,f,o&&"button--loading",i].filter(Boolean).join(" ");return c.jsx("button",{type:"button",className:u,"data-progress":e,disabled:o||l.disabled,...l,children:o?"加载中...":r})};/**
37
31
  * @license lucide-react v0.541.0 - ISC
38
32
  *
39
33
  * This source code is licensed under the ISC license.
40
34
  * See the LICENSE file in the root directory of this source tree.
41
- */const cg=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ug=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Cl=e=>{const t=ug(e);return t.charAt(0).toUpperCase()+t.slice(1)},Pl=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),dg=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
35
+ */const Yn=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Xn=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,s)=>s?s.toUpperCase():n.toLowerCase()),At=e=>{const t=Xn(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ct=(...e)=>e.filter((t,n,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===n).join(" ").trim(),Zn=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
42
36
  * @license lucide-react v0.541.0 - ISC
43
37
  *
44
38
  * This source code is licensed under the ISC license.
45
39
  * See the LICENSE file in the root directory of this source tree.
46
- */var fg={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"};/**
40
+ */var Qn={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"};/**
47
41
  * @license lucide-react v0.541.0 - ISC
48
42
  *
49
43
  * This source code is licensed under the ISC license.
50
44
  * See the LICENSE file in the root directory of this source tree.
51
- */const pg=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:i,...a},c)=>b.createElement("svg",{ref:c,...fg,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Pl("lucide",s),...!o&&!dg(a)&&{"aria-hidden":"true"},...a},[...i.map(([u,l])=>b.createElement(u,l)),...Array.isArray(o)?o:[o]]));/**
45
+ */const es=R.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:r="",children:i,iconNode:o,...l},m)=>R.createElement("svg",{ref:m,...Qn,width:t,height:t,stroke:e,strokeWidth:s?Number(n)*24/Number(t):n,className:Ct("lucide",r),...!i&&!Zn(l)&&{"aria-hidden":"true"},...l},[...o.map(([f,u])=>R.createElement(f,u)),...Array.isArray(i)?i:[i]]));/**
52
46
  * @license lucide-react v0.541.0 - ISC
53
47
  *
54
48
  * This source code is licensed under the ISC license.
55
49
  * See the LICENSE file in the root directory of this source tree.
56
- */const Us=(e,t)=>{const n=b.forwardRef(({className:r,...s},o)=>b.createElement(pg,{ref:o,iconNode:t,className:Pl(`lucide-${cg(Cl(e))}`,`lucide-${e}`,r),...s}));return n.displayName=Cl(e),n};/**
50
+ */const Ye=(e,t)=>{const n=R.forwardRef(({className:s,...r},i)=>R.createElement(es,{ref:i,iconNode:t,className:Ct(`lucide-${Yn(At(e))}`,`lucide-${e}`,s),...r}));return n.displayName=At(e),n};/**
57
51
  * @license lucide-react v0.541.0 - ISC
58
52
  *
59
53
  * This source code is licensed under the ISC license.
60
54
  * See the LICENSE file in the root directory of this source tree.
61
- */const mg=Us("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
55
+ */const ts=Ye("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
62
56
  * @license lucide-react v0.541.0 - ISC
63
57
  *
64
58
  * This source code is licensed under the ISC license.
65
59
  * See the LICENSE file in the root directory of this source tree.
66
- */const hg=Us("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
60
+ */const ns=Ye("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
67
61
  * @license lucide-react v0.541.0 - ISC
68
62
  *
69
63
  * This source code is licensed under the ISC license.
70
64
  * See the LICENSE file in the root directory of this source tree.
71
- */const gg=Us("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),kl=e=>e===0?"开始学习":e===100?"复习":"继续学习",bg=e=>{if(e.length===0)return 0;const t=e.reduce((n,r)=>n+r.progress,0);return Math.round(t/e.length)},yg=({knowledgeItem:e,onLearnAction:t})=>{const n=()=>{t(e)};return console.log("KnowledgeCard render:",{progress:e.progress,text:kl(e.progress)}),f.jsxs(El,{className:"content-accordion__knowledge-card",children:[f.jsxs(bl,{children:[f.jsx("h3",{className:"content-accordion__knowledge-title",children:e.title}),f.jsx("p",{className:"content-accordion__knowledge-description",children:e.description})]}),f.jsxs(ig,{className:"content-accordion__knowledge-actions",children:[f.jsxs("div",{className:"content-accordion__progress-container",children:[f.jsx(ml,{value:e.progress,size:"sm","aria-label":`${e.title} 进度`,className:"content-accordion__progress-bar"}),f.jsxs("span",{className:"content-accordion__progress-text",children:[e.progress,"%"]})]}),f.jsx(io,{size:"sm",radius:"md",onClick:n,progress:e.progress,variant:e.progress===100?"light":e.progress===0?"solid":"bordered",className:"content-accordion__learn-button",children:kl(e.progress)})]})]})},vg=({lesson:e,isExpanded:t,onToggle:n,onLearnAction:r})=>{const s=()=>{n(e.id)},o=bg(e.knowledgeItems);return f.jsxs("div",{className:`content-accordion__lesson-item ${t?"content-accordion__lesson-item--expanded":""}`,children:[f.jsxs("div",{className:"content-accordion__lesson-header",onClick:s,role:"button",tabIndex:0,"aria-expanded":t,"aria-label":`${e.title},点击${t?"收起":"展开"}`,children:[f.jsxs("div",{className:"content-accordion__lesson-header-content",children:[f.jsx("h2",{className:"content-accordion__lesson-title",children:e.title}),f.jsxs("span",{className:"content-accordion__lesson-duration",children:["约 ",e.duration," 分钟"]})]}),f.jsxs("div",{className:"content-accordion__lesson-actions",children:[f.jsxs("span",{className:"content-accordion__lesson-progress",children:[o,"%"]}),t?f.jsx(hg,{className:"content-accordion__lesson-icon"}):f.jsx(gg,{className:"content-accordion__lesson-icon"})]})]}),t&&f.jsx("div",{className:"content-accordion__knowledge-list",children:e.knowledgeItems.map(i=>f.jsx(yg,{knowledgeItem:i,onLearnAction:r},i.id))})]})},Al=({unit:e,activeLessonIds:t,onToggleLesson:n,onLearnAction:r,loading:s=!1,className:o="",emptyState:i})=>s?f.jsx("div",{className:"content-accordion content-accordion--loading",children:f.jsx("div",{className:"content-accordion__loading",children:"加载中..."})}):e?f.jsxs("div",{className:`content-accordion ${o}`,children:[f.jsxs("header",{className:"content-accordion__header",children:[f.jsx("h1",{className:"content-accordion__unit-title",children:e.title}),f.jsx("p",{className:"content-accordion__unit-description",children:e.description}),f.jsxs("div",{className:"content-accordion__unit-meta",children:[f.jsxs("span",{children:["总共 ",e.totalLessons," 节课"]}),f.jsx("span",{children:"•"}),f.jsxs("span",{children:["预计学习 ",e.estimatedDuration]})]})]}),f.jsx("div",{className:"content-accordion__lessons",children:e.lessons.map(a=>f.jsx(vg,{lesson:a,isExpanded:t.includes(a.id),onToggle:n,onLearnAction:r},a.id))})]}):f.jsx("div",{className:"content-accordion content-accordion--empty",children:i||f.jsx("div",{className:"content-accordion__empty",children:"暂无学习内容"})});var wg=()=>f.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"80%",role:"presentation",viewBox:"0 0 24 24",width:"80%",children:[f.jsx("path",{d:"M12 2C9.38 2 7.25 4.13 7.25 6.75C7.25 9.32 9.26 11.4 11.88 11.49C11.96 11.48 12.04 11.48 12.1 11.49C12.12 11.49 12.13 11.49 12.15 11.49C12.16 11.49 12.16 11.49 12.17 11.49C14.73 11.4 16.74 9.32 16.75 6.75C16.75 4.13 14.62 2 12 2Z",fill:"currentColor"}),f.jsx("path",{d:"M17.0809 14.1489C14.2909 12.2889 9.74094 12.2889 6.93094 14.1489C5.66094 14.9989 4.96094 16.1489 4.96094 17.3789C4.96094 18.6089 5.66094 19.7489 6.92094 20.5889C8.32094 21.5289 10.1609 21.9989 12.0009 21.9989C13.8409 21.9989 15.6809 21.5289 17.0809 20.5889C18.3409 19.7389 19.0409 18.5989 19.0409 17.3589C19.0309 16.1289 18.3409 14.9889 17.0809 14.1489Z",fill:"currentColor"})]}),[Jy,xg]=rn({name:"AvatarGroupContext",strict:!1}),Sg=globalThis?.document?b.useLayoutEffect:b.useEffect;function Tg(e={}){const{onLoad:t,onError:n,ignoreFallback:r,src:s,crossOrigin:o,srcSet:i,sizes:a,loading:c,shouldBypassImageLoad:u=!1}=e,l=zc(),d=b.useRef(l?new Image:null),[m,w]=b.useState("pending");b.useEffect(()=>{d.current&&(d.current.onload=y=>{p(),w("loaded"),t?.(y)},d.current.onerror=y=>{p(),w("failed"),n?.(y)})},[d.current]);const p=()=>{d.current&&(d.current.onload=null,d.current.onerror=null,d.current=null)},v=b.useCallback(()=>{if(!s)return"pending";if(r||u)return"loaded";const y=new Image;return y.src=s,o&&(y.crossOrigin=o),i&&(y.srcset=i),a&&(y.sizes=a),c&&(y.loading=c),d.current=y,y.complete&&y.naturalWidth?"loaded":"loading"},[s,o,i,a,t,n,c,u]);return Sg(()=>{l&&w(v())},[l,v]),r?"loaded":m}function Eg(e={}){var t,n,r,s,o,i,a,c;const u=It(),l=xg(),d=!!l,{as:m,ref:w,src:p,name:v,icon:y,classNames:E,fallback:N,alt:_=v||"avatar",imgRef:O,color:A=(t=l?.color)!=null?t:"default",radius:I=(n=l?.radius)!=null?n:"full",size:$=(r=l?.size)!=null?r:"md",isBordered:C=(s=l?.isBordered)!=null?s:!1,isDisabled:V=(o=l?.isDisabled)!=null?o:!1,isFocusable:W=!1,getInitials:h=Vc,ignoreFallback:k=!1,showFallback:j=!1,ImgComponent:S="img",imgProps:L,className:g,onError:M,disableAnimation:T,...B}=e,P=m||"span",D=ze(w),z=ze(O),{isFocusVisible:U,isFocused:Y,focusProps:Z}=Ps(),{isHovered:ie,hoverProps:J}=Cs({isDisabled:V}),Q=(i=T??u?.disableAnimation)!=null?i:!1,le=(c=typeof S=="object"&&((a=S?.displayName)==null?void 0:a.includes("HeroUI")))!=null?c:!1,we=Tg({src:p,onError:M,ignoreFallback:k,shouldBypassImageLoad:m!==void 0||S!=="img"&&!le})==="loaded",ke=!le,Qn=(!p||!we)&&j,Ue=b.useMemo(()=>{var Ne;return eg({color:A,radius:I,size:$,isBordered:C,isDisabled:V,isInGroup:d,disableAnimation:Q,isInGridGroup:(Ne=l?.isGrid)!=null?Ne:!1})},[A,I,$,C,V,Q,d,l?.isGrid]),en=Ie(E?.base,g),tn=b.useMemo(()=>W||m==="button",[W,m]),er=b.useCallback((Ne={})=>({ref:D,tabIndex:tn?0:-1,"data-hover":ae(ie),"data-focus":ae(Y),"data-focus-visible":ae(U),className:Ue.base({class:Ie(en,Ne?.className)}),...ot(B,J,tn?Z:{})}),[tn,Ue,en,Z,B]),no=b.useCallback((Ne={})=>({ref:z,src:p,"data-loaded":ae(we),className:Ue.img({class:E?.img}),...ot(L,Ne,Nt({disableAnimation:Q},{enabled:ke}))}),[Ue,we,L,Q,p,z,ke]);return{Component:P,ImgComponent:S,src:p,alt:_,icon:y,name:v,imgRef:z,slots:Ue,classNames:E,fallback:N,isImgLoaded:we,showFallback:Qn,ignoreFallback:k,getInitials:h,getAvatarProps:er,getImageProps:no}}var $l=Qe((e,t)=>{const{Component:n,ImgComponent:r,src:s,icon:o=f.jsx(wg,{}),alt:i,classNames:a,slots:c,name:u,showFallback:l,fallback:d,getInitials:m,getAvatarProps:w,getImageProps:p}=Eg({...e,ref:t}),v=b.useMemo(()=>!l&&s?null:d?f.jsx("div",{"aria-label":i,className:c.fallback({class:a?.fallback}),role:"img",children:d}):u?f.jsx("span",{"aria-label":i,className:c.name({class:a?.name}),role:"img",children:m(u)}):f.jsx("span",{"aria-label":i,className:c.icon({class:a?.icon}),role:"img",children:o}),[l,s,d,u,a]);return f.jsxs(n,{...w(),children:[s&&f.jsx(r,{...p(),alt:i}),v]})});$l.displayName="HeroUI.Avatar";var Cg=$l,[Zy,Pg]=rn({name:"ButtonGroupContext",strict:!1});function kg(e){var t,n,r,s,o,i,a,c,u;const l=Pg(),d=It(),m=!!l,{ref:w,as:p,children:v,startContent:y,endContent:E,autoFocus:N,className:_,spinner:O,isLoading:A=!1,disableRipple:I=!1,fullWidth:$=(t=l?.fullWidth)!=null?t:!1,radius:C=l?.radius,size:V=(n=l?.size)!=null?n:"md",color:W=(r=l?.color)!=null?r:"default",variant:h=(s=l?.variant)!=null?s:"solid",disableAnimation:k=(i=(o=l?.disableAnimation)!=null?o:d?.disableAnimation)!=null?i:!1,isDisabled:j=(a=l?.isDisabled)!=null?a:!1,isIconOnly:S=(c=l?.isIconOnly)!=null?c:!1,spinnerPlacement:L="start",onPress:g,onClick:M,...T}=e,B=p||"button",P=typeof B=="string",D=ze(w),z=(u=I||d?.disableRipple)!=null?u:k,{isFocusVisible:U,isFocused:Y,focusProps:Z}=Ps({autoFocus:N}),ie=j||A,J=b.useMemo(()=>Qh({size:V,color:W,variant:h,radius:C,fullWidth:$,isDisabled:ie,isInGroup:m,disableAnimation:k,isIconOnly:S,className:_}),[V,W,h,C,$,ie,m,S,k,_]),{onPress:Q,onClear:le,ripples:ve}=Sl(),we=b.useCallback(st=>{z||ie||k||D.current&&Q(st)},[z,ie,k,D,Q]),{buttonProps:ke,isPressed:Qn}=vl({elementType:p,isDisabled:ie,onPress:nr(g,we),onClick:M,...T},D),{isHovered:Ue,hoverProps:en}=Cs({isDisabled:ie}),tn=b.useCallback((st={})=>({"data-disabled":ae(ie),"data-focus":ae(Y),"data-pressed":ae(Qn),"data-focus-visible":ae(U),"data-hover":ae(Ue),"data-loading":ae(A),...ot(ke,Z,en,Nt(T,{enabled:P}),Nt(st)),className:J}),[A,ie,Y,Qn,P,U,Ue,ke,Z,en,T,J]),er=st=>b.isValidElement(st)?b.cloneElement(st,{"aria-hidden":!0,focusable:!1}):null,no=er(y),Ne=er(E),By=b.useMemo(()=>({sm:"sm",md:"sm",lg:"md"})[V],[V]),zy=b.useCallback(()=>({ripples:ve,onClear:le}),[ve,le]);return{Component:B,children:v,domRef:D,spinner:O,styles:J,startContent:no,endContent:Ne,isLoading:A,spinnerPlacement:L,spinnerSize:By,disableRipple:z,getButtonProps:tn,getRippleProps:zy,isIconOnly:S}}function Ag(e){var t,n;const[r,s]=ks(e,ul.variantKeys),o=It(),i=(n=(t=e?.variant)!=null?t:o?.spinnerVariant)!=null?n:"default",{children:a,className:c,classNames:u,label:l,...d}=r,m=b.useMemo(()=>ul({...s}),[tr(s)]),w=Ie(u?.base,c),p=l||a,v=b.useMemo(()=>p&&typeof p=="string"?p:d["aria-label"]?"":"Loading",[a,p,d["aria-label"]]),y=b.useCallback(()=>({"aria-label":v,className:m.base({class:w}),...d}),[v,m,w,d]);return{label:p,slots:m,classNames:u,variant:i,getSpinnerProps:y}}var _l=Qe((e,t)=>{const{slots:n,classNames:r,label:s,variant:o,getSpinnerProps:i}=Ag({...e});return o==="wave"||o==="dots"?f.jsxs("div",{ref:t,...i(),children:[f.jsx("div",{className:n.wrapper({class:r?.wrapper}),children:[...new Array(3)].map((a,c)=>f.jsx("i",{className:n.dots({class:r?.dots}),style:{"--dot-index":c}},`dot-${c}`))}),s&&f.jsx("span",{className:n.label({class:r?.label}),children:s})]}):o==="simple"?f.jsxs("div",{ref:t,...i(),children:[f.jsxs("svg",{className:n.wrapper({class:r?.wrapper}),fill:"none",viewBox:"0 0 24 24",children:[f.jsx("circle",{className:n.circle1({class:r?.circle1}),cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),f.jsx("path",{className:n.circle2({class:r?.circle2}),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",fill:"currentColor"})]}),s&&f.jsx("span",{className:n.label({class:r?.label}),children:s})]}):o==="spinner"?f.jsxs("div",{ref:t,...i(),children:[f.jsx("div",{className:n.wrapper({class:r?.wrapper}),children:[...new Array(12)].map((a,c)=>f.jsx("i",{className:n.spinnerBars({class:r?.spinnerBars}),style:{"--bar-index":c}},`star-${c}`))}),s&&f.jsx("span",{className:n.label({class:r?.label}),children:s})]}):f.jsxs("div",{ref:t,...i(),children:[f.jsxs("div",{className:n.wrapper({class:r?.wrapper}),children:[f.jsx("i",{className:n.circle1({class:r?.circle1})}),f.jsx("i",{className:n.circle2({class:r?.circle2})})]}),s&&f.jsx("span",{className:n.label({class:r?.label}),children:s})]})});_l.displayName="HeroUI.Spinner";var $g=_l,Ml=Qe((e,t)=>{const{Component:n,domRef:r,children:s,spinnerSize:o,spinner:i=f.jsx($g,{color:"current",size:o}),spinnerPlacement:a,startContent:c,endContent:u,isLoading:l,disableRipple:d,getButtonProps:m,getRippleProps:w,isIconOnly:p}=kg({...e,ref:t});return f.jsxs(n,{ref:r,...m(),children:[c,l&&a==="start"&&i,l&&p?null:s,l&&a==="end"&&i,u,!d&&f.jsx(xl,{...w()})]})});Ml.displayName="HeroUI.Button";var _g=Ml;const Mg=e=>{switch(e){case"completed":return"success";case"in-progress":return"primary";case"not-started":default:return"default"}},Nl=({data:e,loading:t=!1,error:n=null,collapsed:r=!1,onToggleCollapse:s,activeUnitId:o=null,onUnitSelect:i,renderUnitItem:a,className:c="",unitItemClassName:u="",style:l={},unitItemStyle:d={}})=>{const m=(y,E)=>{E.preventDefault(),i?.(y)},w=()=>{s?.()},p=y=>f.jsxs("div",{className:`sidebar__unit-item ${u} ${o===y.unitId?"sidebar__unit-item--active":""} ${y.status?`sidebar__unit-item--${y.status}`:""}`,style:d,onClick:E=>m(y.unitId,E),role:"button",tabIndex:0,"aria-label":`${y.title},进度 ${y.progressPercentage}%`,children:[f.jsxs("div",{className:"sidebar__unit-item__content",children:[y.icon&&f.jsx("span",{className:"sidebar__unit-item__icon",children:y.icon}),!r&&f.jsx("span",{className:"sidebar__unit-item__title",children:y.title})]}),!r&&y.progressPercentage!==void 0&&f.jsxs("div",{className:"sidebar__unit-item__progress",children:[f.jsx(ml,{value:y.progressPercentage,size:"sm",color:Mg(y.status),"aria-label":`${y.title} 进度`}),f.jsxs("span",{className:"progress-percentage",children:[y.progressPercentage,"%"]})]})]},y.unitId),v=()=>t?f.jsx("div",{className:"sidebar__loading",children:"加载中..."}):n?f.jsxs("div",{className:"sidebar__error",children:["加载失败: ",n.message]}):e?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"sidebar__header",children:[f.jsx("button",{className:"sidebar__toggle-btn",onClick:w,"aria-label":"切换侧边栏折叠状态",children:r?"→":"←"}),!r&&f.jsxs("div",{className:"sidebar__course-info",children:[f.jsx("h3",{className:"sidebar__course-title",children:e.courseTitle}),f.jsxs("span",{className:"sidebar__course-level",children:[e.courseLevel,"年级"]})]})]}),f.jsx("nav",{className:"sidebar__content",children:f.jsx("ul",{className:"sidebar__unit-list",children:e.units.map(y=>f.jsx("li",{children:a?a(y,y):p(y)},y.unitId))})})]}):f.jsx("div",{className:"sidebar__empty",children:"暂无课程数据"});return f.jsx("aside",{className:`sidebar ${c} ${r?"sidebar--collapsed":""} ${t?"sidebar--loading":""} ${n?"sidebar--error":""}`,style:l,"aria-label":"课程导航侧边栏",role:"complementary",children:v()})},Bs=({trigger:e,items:t,position:n="bottom",alignment:r="start",openDelay:s=300,closeDelay:o=100,onOpen:i,onClose:a,renderItem:c,itemConfig:u={},className:l,menuClassName:d,itemClassName:m})=>{const[w,p]=b.useState(!1),v=b.useRef(null),y=b.useRef(null),E=()=>{v.current&&clearTimeout(v.current),y.current&&clearTimeout(y.current)},N=()=>{E(),v.current=setTimeout(()=>{p(!0),i?.()},s)},_=()=>{E(),y.current=setTimeout(()=>{p(!1),a?.()},o)},O=$=>{!$.disabled&&$.onClick&&$.onClick($)};b.useEffect(()=>()=>E(),[]);const A=$=>f.jsxs("div",{className:`submenu-item ${$.disabled?"is-disabled":""} ${m||""}`,onClick:()=>O($),children:[$.icon&&f.jsx("span",{className:"submenu-item-icon",children:$.icon}),f.jsx("span",{children:$.label})]},$.id),I=()=>{const $=["submenu-panel"];return d&&$.push(d),$.push(`position-${n}`),r!=="start"&&$.push(`alignment-${r}`),w&&$.push("is-open"),$.join(" ")};return f.jsxs("div",{className:`submenu-container ${l||""}`,onMouseEnter:N,onMouseLeave:_,children:[f.jsx("div",{className:"submenu-trigger",children:e}),f.jsx("div",{className:I(),children:t.map($=>c?c($,u):A($))})]})};function Il(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ng}=Object.prototype,{getPrototypeOf:zs}=Object,{iterator:Bn,toStringTag:Ol}=Symbol,zn=(e=>t=>{const n=Ng.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Se=e=>(e=e.toLowerCase(),t=>zn(t)===e),Gn=e=>t=>typeof t===e,{isArray:kt}=Array,At=Gn("undefined");function qt(e){return e!==null&&!At(e)&&e.constructor!==null&&!At(e.constructor)&&me(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ll=Se("ArrayBuffer");function Ig(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ll(e.buffer),t}const Og=Gn("string"),me=Gn("function"),Dl=Gn("number"),Yt=e=>e!==null&&typeof e=="object",Lg=e=>e===!0||e===!1,Kn=e=>{if(zn(e)!=="object")return!1;const t=zs(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Ol in e)&&!(Bn in e)},Dg=e=>{if(!Yt(e)||qt(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},jg=Se("Date"),Vg=Se("File"),Fg=Se("Blob"),Rg=Se("FileList"),Ug=e=>Yt(e)&&me(e.pipe),Bg=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||me(e.append)&&((t=zn(e))==="formdata"||t==="object"&&me(e.toString)&&e.toString()==="[object FormData]"))},zg=Se("URLSearchParams"),[Gg,Kg,Hg,Wg]=["ReadableStream","Request","Response","Headers"].map(Se),qg=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Xt(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),kt(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(qt(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(r=0;r<i;r++)a=o[r],t.call(null,e[a],a,e)}}function jl(e,t){if(qt(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const tt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Vl=e=>!At(e)&&e!==tt;function Gs(){const{caseless:e,skipUndefined:t}=Vl(this)&&this||{},n={},r=(s,o)=>{const i=e&&jl(n,o)||o;Kn(n[i])&&Kn(s)?n[i]=Gs(n[i],s):Kn(s)?n[i]=Gs({},s):kt(s)?n[i]=s.slice():(!t||!At(s))&&(n[i]=s)};for(let s=0,o=arguments.length;s<o;s++)arguments[s]&&Xt(arguments[s],r);return n}const Yg=(e,t,n,{allOwnKeys:r}={})=>(Xt(t,(s,o)=>{n&&me(s)?e[o]=Il(s,n):e[o]=s},{allOwnKeys:r}),e),Xg=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Jg=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Zg=(e,t,n,r)=>{let s,o,i;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=n!==!1&&zs(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Qg=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},eb=e=>{if(!e)return null;if(kt(e))return e;let t=e.length;if(!Dl(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},tb=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&zs(Uint8Array)),nb=(e,t)=>{const r=(e&&e[Bn]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},rb=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},sb=Se("HTMLFormElement"),ob=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Fl=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ib=Se("RegExp"),Rl=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Xt(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},ab=e=>{Rl(e,(t,n)=>{if(me(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(me(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},lb=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return kt(e)?r(e):r(String(e).split(t)),n},cb=()=>{},ub=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function db(e){return!!(e&&me(e.append)&&e[Ol]==="FormData"&&e[Bn])}const fb=e=>{const t=new Array(10),n=(r,s)=>{if(Yt(r)){if(t.indexOf(r)>=0)return;if(qt(r))return r;if(!("toJSON"in r)){t[s]=r;const o=kt(r)?[]:{};return Xt(r,(i,a)=>{const c=n(i,s+1);!At(c)&&(o[a]=c)}),t[s]=void 0,o}}return r};return n(e,0)},pb=Se("AsyncFunction"),mb=e=>e&&(Yt(e)||me(e))&&me(e.then)&&me(e.catch),Ul=((e,t)=>e?setImmediate:t?((n,r)=>(tt.addEventListener("message",({source:s,data:o})=>{s===tt&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),tt.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",me(tt.postMessage)),hb=typeof queueMicrotask<"u"?queueMicrotask.bind(tt):typeof process<"u"&&process.nextTick||Ul,x={isArray:kt,isArrayBuffer:Ll,isBuffer:qt,isFormData:Bg,isArrayBufferView:Ig,isString:Og,isNumber:Dl,isBoolean:Lg,isObject:Yt,isPlainObject:Kn,isEmptyObject:Dg,isReadableStream:Gg,isRequest:Kg,isResponse:Hg,isHeaders:Wg,isUndefined:At,isDate:jg,isFile:Vg,isBlob:Fg,isRegExp:ib,isFunction:me,isStream:Ug,isURLSearchParams:zg,isTypedArray:tb,isFileList:Rg,forEach:Xt,merge:Gs,extend:Yg,trim:qg,stripBOM:Xg,inherits:Jg,toFlatObject:Zg,kindOf:zn,kindOfTest:Se,endsWith:Qg,toArray:eb,forEachEntry:nb,matchAll:rb,isHTMLForm:sb,hasOwnProperty:Fl,hasOwnProp:Fl,reduceDescriptors:Rl,freezeMethods:ab,toObjectSet:lb,toCamelCase:ob,noop:cb,toFiniteNumber:ub,findKey:jl,global:tt,isContextDefined:Vl,isSpecCompliantForm:db,toJSONObject:fb,isAsyncFn:pb,isThenable:mb,setImmediate:Ul,asap:hb,isIterable:e=>e!=null&&me(e[Bn])};function q(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}x.inherits(q,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:x.toJSONObject(this.config),code:this.code,status:this.status}}});const Bl=q.prototype,zl={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{zl[e]={value:e}}),Object.defineProperties(q,zl),Object.defineProperty(Bl,"isAxiosError",{value:!0}),q.from=(e,t,n,r,s,o)=>{const i=Object.create(Bl);x.toFlatObject(e,i,function(l){return l!==Error.prototype},u=>u!=="isAxiosError");const a=e&&e.message?e.message:"Error",c=t==null&&e?e.code:t;return q.call(i,a,c,n,r,s),e&&i.cause==null&&Object.defineProperty(i,"cause",{value:e,configurable:!0}),i.name=e&&e.name||"Error",o&&Object.assign(i,o),i};const gb=null;function Ks(e){return x.isPlainObject(e)||x.isArray(e)}function Gl(e){return x.endsWith(e,"[]")?e.slice(0,-2):e}function Kl(e,t,n){return e?e.concat(t).map(function(s,o){return s=Gl(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function bb(e){return x.isArray(e)&&!e.some(Ks)}const yb=x.toFlatObject(x,{},null,function(t){return/^is[A-Z]/.test(t)});function Hn(e,t,n){if(!x.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=x.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,y){return!x.isUndefined(y[v])});const r=n.metaTokens,s=n.visitor||l,o=n.dots,i=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&x.isSpecCompliantForm(t);if(!x.isFunction(s))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(x.isDate(p))return p.toISOString();if(x.isBoolean(p))return p.toString();if(!c&&x.isBlob(p))throw new q("Blob is not supported. Use a Buffer instead.");return x.isArrayBuffer(p)||x.isTypedArray(p)?c&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function l(p,v,y){let E=p;if(p&&!y&&typeof p=="object"){if(x.endsWith(v,"{}"))v=r?v:v.slice(0,-2),p=JSON.stringify(p);else if(x.isArray(p)&&bb(p)||(x.isFileList(p)||x.endsWith(v,"[]"))&&(E=x.toArray(p)))return v=Gl(v),E.forEach(function(_,O){!(x.isUndefined(_)||_===null)&&t.append(i===!0?Kl([v],O,o):i===null?v:v+"[]",u(_))}),!1}return Ks(p)?!0:(t.append(Kl(y,v,o),u(p)),!1)}const d=[],m=Object.assign(yb,{defaultVisitor:l,convertValue:u,isVisitable:Ks});function w(p,v){if(!x.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+v.join("."));d.push(p),x.forEach(p,function(E,N){(!(x.isUndefined(E)||E===null)&&s.call(t,E,x.isString(N)?N.trim():N,v,m))===!0&&w(E,v?v.concat(N):[N])}),d.pop()}}if(!x.isObject(e))throw new TypeError("data must be an object");return w(e),t}function Hl(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Hs(e,t){this._pairs=[],e&&Hn(e,this,t)}const Wl=Hs.prototype;Wl.append=function(t,n){this._pairs.push([t,n])},Wl.toString=function(t){const n=t?function(r){return t.call(this,r,Hl)}:Hl;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function vb(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ql(e,t,n){if(!t)return e;const r=n&&n.encode||vb;x.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let o;if(s?o=s(t,n):o=x.isURLSearchParams(t)?t.toString():new Hs(t,n).toString(r),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Yl{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){x.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Xl={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},wb={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Hs,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ws=typeof window<"u"&&typeof document<"u",qs=typeof navigator=="object"&&navigator||void 0,xb=Ws&&(!qs||["ReactNative","NativeScript","NS"].indexOf(qs.product)<0),Sb=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Tb=Ws&&window.location.href||"http://localhost",ue={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ws,hasStandardBrowserEnv:xb,hasStandardBrowserWebWorkerEnv:Sb,navigator:qs,origin:Tb},Symbol.toStringTag,{value:"Module"})),...wb};function Eb(e,t){return Hn(e,new ue.classes.URLSearchParams,{visitor:function(n,r,s,o){return ue.isNode&&x.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function Cb(e){return x.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Pb(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],t[o]=e[o];return t}function Jl(e){function t(n,r,s,o){let i=n[o++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),c=o>=n.length;return i=!i&&x.isArray(s)?s.length:i,c?(x.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!a):((!s[i]||!x.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&x.isArray(s[i])&&(s[i]=Pb(s[i])),!a)}if(x.isFormData(e)&&x.isFunction(e.entries)){const n={};return x.forEachEntry(e,(r,s)=>{t(Cb(r),s,n,0)}),n}return null}function kb(e,t,n){if(x.isString(e))try{return(t||JSON.parse)(e),x.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Jt={transitional:Xl,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=x.isObject(t);if(o&&x.isHTMLForm(t)&&(t=new FormData(t)),x.isFormData(t))return s?JSON.stringify(Jl(t)):t;if(x.isArrayBuffer(t)||x.isBuffer(t)||x.isStream(t)||x.isFile(t)||x.isBlob(t)||x.isReadableStream(t))return t;if(x.isArrayBufferView(t))return t.buffer;if(x.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Eb(t,this.formSerializer).toString();if((a=x.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Hn(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),kb(t)):t}],transformResponse:[function(t){const n=this.transitional||Jt.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(x.isResponse(t)||x.isReadableStream(t))return t;if(t&&x.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(a){if(i)throw a.name==="SyntaxError"?q.from(a,q.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ue.classes.FormData,Blob:ue.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};x.forEach(["delete","get","head","post","put","patch"],e=>{Jt.headers[e]={}});const Ab=x.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),$b=e=>{const t={};let n,r,s;return e&&e.split(`
72
- `).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&Ab[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Zl=Symbol("internals");function Zt(e){return e&&String(e).trim().toLowerCase()}function Wn(e){return e===!1||e==null?e:x.isArray(e)?e.map(Wn):String(e)}function _b(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Mb=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ys(e,t,n,r,s){if(x.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!x.isString(t)){if(x.isString(r))return t.indexOf(r)!==-1;if(x.isRegExp(r))return r.test(t)}}function Nb(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Ib(e,t){const n=x.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}let he=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(a,c,u){const l=Zt(c);if(!l)throw new Error("header name must be a non-empty string");const d=x.findKey(s,l);(!d||s[d]===void 0||u===!0||u===void 0&&s[d]!==!1)&&(s[d||c]=Wn(a))}const i=(a,c)=>x.forEach(a,(u,l)=>o(u,l,c));if(x.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(x.isString(t)&&(t=t.trim())&&!Mb(t))i($b(t),n);else if(x.isObject(t)&&x.isIterable(t)){let a={},c,u;for(const l of t){if(!x.isArray(l))throw TypeError("Object iterator must return a key-value pair");a[u=l[0]]=(c=a[u])?x.isArray(c)?[...c,l[1]]:[c,l[1]]:l[1]}i(a,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=Zt(t),t){const r=x.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return _b(s);if(x.isFunction(n))return n.call(this,s,r);if(x.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Zt(t),t){const r=x.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ys(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=Zt(i),i){const a=x.findKey(r,i);a&&(!n||Ys(r,r[a],a,n))&&(delete r[a],s=!0)}}return x.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||Ys(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return x.forEach(this,(s,o)=>{const i=x.findKey(r,o);if(i){n[i]=Wn(s),delete n[o];return}const a=t?Nb(o):String(o).trim();a!==o&&delete n[o],n[a]=Wn(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return x.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&x.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
73
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[Zl]=this[Zl]={accessors:{}}).accessors,s=this.prototype;function o(i){const a=Zt(i);r[a]||(Ib(s,i),r[a]=!0)}return x.isArray(t)?t.forEach(o):o(t),this}};he.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),x.reduceDescriptors(he.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),x.freezeMethods(he);function Xs(e,t){const n=this||Jt,r=t||n,s=he.from(r.headers);let o=r.data;return x.forEach(e,function(a){o=a.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function Ql(e){return!!(e&&e.__CANCEL__)}function $t(e,t,n){q.call(this,e??"canceled",q.ERR_CANCELED,t,n),this.name="CanceledError"}x.inherits($t,q,{__CANCEL__:!0});function ec(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new q("Request failed with status code "+n.status,[q.ERR_BAD_REQUEST,q.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Ob(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Lb(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),l=r[o];i||(i=u),n[s]=c,r[s]=u;let d=o,m=0;for(;d!==s;)m+=n[d++],d=d%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),u-i<t)return;const w=l&&u-l;return w?Math.round(m*1e3/w):void 0}}function Db(e,t){let n=0,r=1e3/t,s,o;const i=(u,l=Date.now())=>{n=l,s=null,o&&(clearTimeout(o),o=null),e(...u)};return[(...u)=>{const l=Date.now(),d=l-n;d>=r?i(u,l):(s=u,o||(o=setTimeout(()=>{o=null,i(s)},r-d)))},()=>s&&i(s)]}const qn=(e,t,n=3)=>{let r=0;const s=Lb(50,250);return Db(o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,c=i-r,u=s(c),l=i<=a;r=i;const d={loaded:i,total:a,progress:a?i/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&l?(a-i)/u:void 0,event:o,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},tc=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},nc=e=>(...t)=>x.asap(()=>e(...t)),jb=ue.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,ue.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(ue.origin),ue.navigator&&/(msie|trident)/i.test(ue.navigator.userAgent)):()=>!0,Vb=ue.hasStandardBrowserEnv?{write(e,t,n,r,s,o){const i=[e+"="+encodeURIComponent(t)];x.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),x.isString(r)&&i.push("path="+r),x.isString(s)&&i.push("domain="+s),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Fb(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Rb(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function rc(e,t,n){let r=!Fb(t);return e&&(r||n==!1)?Rb(e,t):t}const sc=e=>e instanceof he?{...e}:e;function nt(e,t){t=t||{};const n={};function r(u,l,d,m){return x.isPlainObject(u)&&x.isPlainObject(l)?x.merge.call({caseless:m},u,l):x.isPlainObject(l)?x.merge({},l):x.isArray(l)?l.slice():l}function s(u,l,d,m){if(x.isUndefined(l)){if(!x.isUndefined(u))return r(void 0,u,d,m)}else return r(u,l,d,m)}function o(u,l){if(!x.isUndefined(l))return r(void 0,l)}function i(u,l){if(x.isUndefined(l)){if(!x.isUndefined(u))return r(void 0,u)}else return r(void 0,l)}function a(u,l,d){if(d in t)return r(u,l);if(d in e)return r(void 0,u)}const c={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(u,l,d)=>s(sc(u),sc(l),d,!0)};return x.forEach(Object.keys({...e,...t}),function(l){const d=c[l]||s,m=d(e[l],t[l],l);x.isUndefined(m)&&d!==a||(n[l]=m)}),n}const oc=e=>{const t=nt({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:a}=t;if(t.headers=i=he.from(i),t.url=ql(rc(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),x.isFormData(n)){if(ue.hasStandardBrowserEnv||ue.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(x.isFunction(n.getHeaders)){const c=n.getHeaders(),u=["content-type","content-length"];Object.entries(c).forEach(([l,d])=>{u.includes(l.toLowerCase())&&i.set(l,d)})}}if(ue.hasStandardBrowserEnv&&(r&&x.isFunction(r)&&(r=r(t)),r||r!==!1&&jb(t.url))){const c=s&&o&&Vb.read(o);c&&i.set(s,c)}return t},Ub=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const s=oc(e);let o=s.data;const i=he.from(s.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=s,l,d,m,w,p;function v(){w&&w(),p&&p(),s.cancelToken&&s.cancelToken.unsubscribe(l),s.signal&&s.signal.removeEventListener("abort",l)}let y=new XMLHttpRequest;y.open(s.method.toUpperCase(),s.url,!0),y.timeout=s.timeout;function E(){if(!y)return;const _=he.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),A={data:!a||a==="text"||a==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:_,config:e,request:y};ec(function($){n($),v()},function($){r($),v()},A),y=null}"onloadend"in y?y.onloadend=E:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(E)},y.onabort=function(){y&&(r(new q("Request aborted",q.ECONNABORTED,e,y)),y=null)},y.onerror=function(O){const A=O&&O.message?O.message:"Network Error",I=new q(A,q.ERR_NETWORK,e,y);I.event=O||null,r(I),y=null},y.ontimeout=function(){let O=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const A=s.transitional||Xl;s.timeoutErrorMessage&&(O=s.timeoutErrorMessage),r(new q(O,A.clarifyTimeoutError?q.ETIMEDOUT:q.ECONNABORTED,e,y)),y=null},o===void 0&&i.setContentType(null),"setRequestHeader"in y&&x.forEach(i.toJSON(),function(O,A){y.setRequestHeader(A,O)}),x.isUndefined(s.withCredentials)||(y.withCredentials=!!s.withCredentials),a&&a!=="json"&&(y.responseType=s.responseType),u&&([m,p]=qn(u,!0),y.addEventListener("progress",m)),c&&y.upload&&([d,w]=qn(c),y.upload.addEventListener("progress",d),y.upload.addEventListener("loadend",w)),(s.cancelToken||s.signal)&&(l=_=>{y&&(r(!_||_.type?new $t(null,e,y):_),y.abort(),y=null)},s.cancelToken&&s.cancelToken.subscribe(l),s.signal&&(s.signal.aborted?l():s.signal.addEventListener("abort",l)));const N=Ob(s.url);if(N&&ue.protocols.indexOf(N)===-1){r(new q("Unsupported protocol "+N+":",q.ERR_BAD_REQUEST,e));return}y.send(o||null)})},Bb=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const o=function(u){if(!s){s=!0,a();const l=u instanceof Error?u:this.reason;r.abort(l instanceof q?l:new $t(l instanceof Error?l.message:l))}};let i=t&&setTimeout(()=>{i=null,o(new q(`timeout ${t} of ms exceeded`,q.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),e=null)};e.forEach(u=>u.addEventListener("abort",o));const{signal:c}=r;return c.unsubscribe=()=>x.asap(a),c}},zb=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},Gb=async function*(e,t){for await(const n of Kb(e))yield*zb(n,t)},Kb=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},ic=(e,t,n,r)=>{const s=Gb(e,t);let o=0,i,a=c=>{i||(i=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:l}=await s.next();if(u){a(),c.close();return}let d=l.byteLength;if(n){let m=o+=d;n(m)}c.enqueue(new Uint8Array(l))}catch(u){throw a(u),u}},cancel(c){return a(c),s.return()}},{highWaterMark:2})},ac=64*1024,{isFunction:Yn}=x,Hb=(({Request:e,Response:t})=>({Request:e,Response:t}))(x.global),{ReadableStream:lc,TextEncoder:cc}=x.global,uc=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Wb=e=>{e=x.merge.call({skipUndefined:!0},Hb,e);const{fetch:t,Request:n,Response:r}=e,s=t?Yn(t):typeof fetch=="function",o=Yn(n),i=Yn(r);if(!s)return!1;const a=s&&Yn(lc),c=s&&(typeof cc=="function"?(p=>v=>p.encode(v))(new cc):async p=>new Uint8Array(await new n(p).arrayBuffer())),u=o&&a&&uc(()=>{let p=!1;const v=new n(ue.origin,{body:new lc,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!v}),l=i&&a&&uc(()=>x.isReadableStream(new r("").body)),d={stream:l&&(p=>p.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!d[p]&&(d[p]=(v,y)=>{let E=v&&v[p];if(E)return E.call(v);throw new q(`Response type '${p}' is not supported`,q.ERR_NOT_SUPPORT,y)})});const m=async p=>{if(p==null)return 0;if(x.isBlob(p))return p.size;if(x.isSpecCompliantForm(p))return(await new n(ue.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(x.isArrayBufferView(p)||x.isArrayBuffer(p))return p.byteLength;if(x.isURLSearchParams(p)&&(p=p+""),x.isString(p))return(await c(p)).byteLength},w=async(p,v)=>{const y=x.toFiniteNumber(p.getContentLength());return y??m(v)};return async p=>{let{url:v,method:y,data:E,signal:N,cancelToken:_,timeout:O,onDownloadProgress:A,onUploadProgress:I,responseType:$,headers:C,withCredentials:V="same-origin",fetchOptions:W}=oc(p),h=t||fetch;$=$?($+"").toLowerCase():"text";let k=Bb([N,_&&_.toAbortSignal()],O),j=null;const S=k&&k.unsubscribe&&(()=>{k.unsubscribe()});let L;try{if(I&&u&&y!=="get"&&y!=="head"&&(L=await w(C,E))!==0){let D=new n(v,{method:"POST",body:E,duplex:"half"}),z;if(x.isFormData(E)&&(z=D.headers.get("content-type"))&&C.setContentType(z),D.body){const[U,Y]=tc(L,qn(nc(I)));E=ic(D.body,ac,U,Y)}}x.isString(V)||(V=V?"include":"omit");const g=o&&"credentials"in n.prototype,M={...W,signal:k,method:y.toUpperCase(),headers:C.normalize().toJSON(),body:E,duplex:"half",credentials:g?V:void 0};j=o&&new n(v,M);let T=await(o?h(j,W):h(v,M));const B=l&&($==="stream"||$==="response");if(l&&(A||B&&S)){const D={};["status","statusText","headers"].forEach(Z=>{D[Z]=T[Z]});const z=x.toFiniteNumber(T.headers.get("content-length")),[U,Y]=A&&tc(z,qn(nc(A),!0))||[];T=new r(ic(T.body,ac,U,()=>{Y&&Y(),S&&S()}),D)}$=$||"text";let P=await d[x.findKey(d,$)||"text"](T,p);return!B&&S&&S(),await new Promise((D,z)=>{ec(D,z,{data:P,headers:he.from(T.headers),status:T.status,statusText:T.statusText,config:p,request:j})})}catch(g){throw S&&S(),g&&g.name==="TypeError"&&/Load failed|fetch/i.test(g.message)?Object.assign(new q("Network Error",q.ERR_NETWORK,p,j),{cause:g.cause||g}):q.from(g,g&&g.code,p,j)}}},qb=new Map,dc=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:s}=t,o=[r,s,n];let i=o.length,a=i,c,u,l=qb;for(;a--;)c=o[a],u=l.get(c),u===void 0&&l.set(c,u=a?new Map:Wb(t)),l=u;return u};dc();const Js={http:gb,xhr:Ub,fetch:{get:dc}};x.forEach(Js,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const fc=e=>`- ${e}`,Yb=e=>x.isFunction(e)||e===null||e===!1,pc={getAdapter:(e,t)=>{e=x.isArray(e)?e:[e];const{length:n}=e;let r,s;const o={};for(let i=0;i<n;i++){r=e[i];let a;if(s=r,!Yb(r)&&(s=Js[(a=String(r)).toLowerCase()],s===void 0))throw new q(`Unknown adapter '${a}'`);if(s&&(x.isFunction(s)||(s=s.get(t))))break;o[a||"#"+i]=s}if(!s){const i=Object.entries(o).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=n?i.length>1?`since :
74
- `+i.map(fc).join(`
75
- `):" "+fc(i[0]):"as no adapter specified";throw new q("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s},adapters:Js};function Zs(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new $t(null,e)}function mc(e){return Zs(e),e.headers=he.from(e.headers),e.data=Xs.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),pc.getAdapter(e.adapter||Jt.adapter,e)(e).then(function(r){return Zs(e),r.data=Xs.call(e,e.transformResponse,r),r.headers=he.from(r.headers),r},function(r){return Ql(r)||(Zs(e),r&&r.response&&(r.response.data=Xs.call(e,e.transformResponse,r.response),r.response.headers=he.from(r.response.headers))),Promise.reject(r)})}const hc="1.12.2",Xn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Xn[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const gc={};Xn.transitional=function(t,n,r){function s(o,i){return"[Axios v"+hc+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,a)=>{if(t===!1)throw new q(s(i," has been removed"+(n?" in "+n:"")),q.ERR_DEPRECATED);return n&&!gc[i]&&(gc[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,a):!0}},Xn.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Xb(e,t,n){if(typeof e!="object")throw new q("options must be an object",q.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const a=e[o],c=a===void 0||i(a,o,e);if(c!==!0)throw new q("option "+o+" must be "+c,q.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new q("Unknown option "+o,q.ERR_BAD_OPTION)}}const Jn={assertOptions:Xb,validators:Xn},Pe=Jn.validators;let rt=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Yl,response:new Yl}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
76
- `+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=nt(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&Jn.assertOptions(r,{silentJSONParsing:Pe.transitional(Pe.boolean),forcedJSONParsing:Pe.transitional(Pe.boolean),clarifyTimeoutError:Pe.transitional(Pe.boolean)},!1),s!=null&&(x.isFunction(s)?n.paramsSerializer={serialize:s}:Jn.assertOptions(s,{encode:Pe.function,serialize:Pe.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Jn.assertOptions(n,{baseUrl:Pe.spelling("baseURL"),withXsrfToken:Pe.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&x.merge(o.common,o[n.method]);o&&x.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),n.headers=he.concat(i,o);const a=[];let c=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(c=c&&v.synchronous,a.unshift(v.fulfilled,v.rejected))});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let l,d=0,m;if(!c){const p=[mc.bind(this),void 0];for(p.unshift(...a),p.push(...u),m=p.length,l=Promise.resolve(n);d<m;)l=l.then(p[d++],p[d++]);return l}m=a.length;let w=n;for(;d<m;){const p=a[d++],v=a[d++];try{w=p(w)}catch(y){v.call(this,y);break}}try{l=mc.call(this,w)}catch(p){return Promise.reject(p)}for(d=0,m=u.length;d<m;)l=l.then(u[d++],u[d++]);return l}getUri(t){t=nt(this.defaults,t);const n=rc(t.baseURL,t.url,t.allowAbsoluteUrls);return ql(n,t.params,t.paramsSerializer)}};x.forEach(["delete","get","head","options"],function(t){rt.prototype[t]=function(n,r){return this.request(nt(r||{},{method:t,url:n,data:(r||{}).data}))}}),x.forEach(["post","put","patch"],function(t){function n(r){return function(o,i,a){return this.request(nt(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}rt.prototype[t]=n(),rt.prototype[t+"Form"]=n(!0)});let Jb=class Nc{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(a=>{r.subscribe(a),o=a}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,a){r.reason||(r.reason=new $t(o,i,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Nc(function(s){t=s}),cancel:t}}};function Zb(e){return function(n){return e.apply(null,n)}}function Qb(e){return x.isObject(e)&&e.isAxiosError===!0}const Qs={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Qs).forEach(([e,t])=>{Qs[t]=e});function bc(e){const t=new rt(e),n=Il(rt.prototype.request,t);return x.extend(n,rt.prototype,t,{allOwnKeys:!0}),x.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return bc(nt(e,s))},n}const ne=bc(Jt);ne.Axios=rt,ne.CanceledError=$t,ne.CancelToken=Jb,ne.isCancel=Ql,ne.VERSION=hc,ne.toFormData=Hn,ne.AxiosError=q,ne.Cancel=ne.CanceledError,ne.all=function(t){return Promise.all(t)},ne.spread=Zb,ne.isAxiosError=Qb,ne.mergeConfig=nt,ne.AxiosHeaders=he,ne.formToJSON=e=>Jl(x.isHTMLForm(e)?new FormData(e):e),ne.getAdapter=pc.getAdapter,ne.HttpStatusCode=Qs,ne.default=ne;const{Axios:ov,AxiosError:iv,CanceledError:av,isCancel:lv,CancelToken:cv,VERSION:uv,all:dv,Cancel:fv,isAxiosError:pv,spread:mv,toFormData:hv,AxiosHeaders:gv,HttpStatusCode:bv,formToJSON:yv,getAdapter:vv,mergeConfig:wv}=ne,ey=()=>f.jsx("span",{style:{marginRight:8,fontSize:"1.2em"},children:"👤"}),ty=()=>f.jsx("span",{style:{marginRight:8,fontSize:"1.2em"},children:"⚙️"}),ny=()=>f.jsx("span",{style:{marginRight:8,fontSize:"1.2em"},children:"❓"}),ry=()=>f.jsx("span",{style:{marginRight:8,fontSize:"1.2em"},children:"🚪"}),sy=[{id:"profile",label:"个人主页",icon:f.jsx(ey,{})},{id:"settings",label:"设置",icon:f.jsx(ty,{})},{id:"help",label:"帮助",icon:f.jsx(ny,{})},{id:"logout",label:"退出",icon:f.jsx(ry,{})}],yc=({userId:e,userName:t,userAvatar:n,apiConfig:r,menuItems:s=sy,avatarSize:o="md",isLoading:i=!1,error:a=null,avatarClassName:c,userNameClassName:u,containerClassName:l,onMenuOpen:d,onMenuClose:m,onMenuItemClick:w,onLogout:p,renderMenuItem:v,renderUserInfo:y})=>{const[E,N]=b.useState({id:e||"",name:t||"",avatar:n||"",level:0,badges:[]}),[_,O]=b.useState(i),[A,I]=b.useState(a);b.useEffect(()=>{e&&r&&!t&&!n&&$()},[e,r,t,n]);const $=async()=>{O(!0),I(null);try{const k=r.endpoints.userProfile.replace(":userId",e),j=await ne.get(`${r.baseURL}${k}`,{headers:r.headers});N(j.data)}catch(k){I(k)}finally{O(!1)}},C=k=>{w?.(k.id),k.id==="logout"&&p?.()},V=()=>{d?.()},W=()=>{m?.()},h=()=>f.jsxs("div",{className:"user-profile-trigger",children:[f.jsx(Cg,{src:E.avatar,size:o,className:c,alt:"用户头像"}),f.jsx("span",{className:`user-name ${u||""}`,children:E.name})]});return _?f.jsx("div",{className:`user-profile-container ${l||""} is-loading`,children:f.jsx("div",{className:"user-profile-loading",children:"加载中..."})}):A?f.jsx("div",{className:`user-profile-container ${l||""} has-error`,children:f.jsxs("div",{className:"user-profile-error",children:["错误: ",A.message]})}):E.name?f.jsx("div",{className:`user-profile-container ${l||""}`,children:f.jsx(Bs,{trigger:y?y(E):h(),items:s.map(k=>({...k,onClick:()=>C(k)})),position:"bottom",alignment:"end",onOpen:V,onClose:W,renderItem:v?k=>v(k,E):void 0})}):f.jsx("div",{className:`user-profile-container ${l||""}`,children:f.jsx("div",{className:"user-profile-loading",children:"未登录"})})},oy=e=>f.jsxs("div",{className:"explore-menu-item",onClick:()=>e.onClick?.(e),children:[f.jsx("span",{className:"explore-item-label",children:e.label}),e.status&&f.jsx("span",{className:`explore-item-status status-${e.status.toLowerCase().replace("%","").replace(" ","-")}`,children:e.status})]},e.id),iy=()=>f.jsxs("button",{className:"explore-button","aria-label":"探索数学课程",children:[f.jsx("span",{className:"explore-icon",children:"🌍"}),f.jsx("span",{className:"explore-text",children:"探索"})]}),ay=({className:e="",style:t,logoHref:n="/",logoText:r="MathWiz",onLogoClick:s,exploreItems:o=[],exploreMenuOpen:i=!1,onExploreMenuToggle:a,onExploreItemClick:c,renderExploreItem:u=oy,userData:l,userMenuItems:d,onUserMenuItemClick:m,onLogout:w,isLoading:p=!1,error:v=null,headerClassName:y="",logoClassName:E="",exploreClassName:N="",userProfileClassName:_="","aria-label":O,"aria-labelledby":A,...I})=>{const $=o.map(C=>({id:C.id,label:u(C),onClick:()=>c?.(C)}));return f.jsx("header",{className:`mathwiz-header site-header ${y} ${e}`,style:t,"aria-label":O,"aria-labelledby":A,role:"banner",...I,children:f.jsxs("div",{className:"header-content",children:[f.jsx("div",{className:"header-section left",children:f.jsx(Bs,{trigger:f.jsx(iy,{}),items:$,position:"bottom",alignment:"start",openDelay:300,closeDelay:100,onOpen:()=>a?.(!0),onClose:()=>a?.(!1),className:`explore-submenu ${N}`,menuClassName:"explore-panel"})}),f.jsx("div",{className:"header-section center",children:f.jsx("a",{href:n,className:`logo ${E}`,onClick:s,"aria-label":"MathWiz 首页",children:r})}),f.jsx("div",{className:"header-section right",children:f.jsx(yc,{userName:l?.name,userAvatar:l?.avatar,menuItems:d,onMenuItemClick:m,onLogout:w,containerClassName:_,isLoading:p,error:v})})]})})},vc=b.memo(ay,(e,t)=>e.logoText===t.logoText&&e.logoHref===t.logoHref&&e.className===t.className&&e.headerClassName===t.headerClassName&&e.logoClassName===t.logoClassName&&e.exploreClassName===t.exploreClassName&&e.userProfileClassName===t.userProfileClassName&&e["aria-label"]===t["aria-label"]&&e["aria-labelledby"]===t["aria-labelledby"]&&e.isLoading===t.isLoading&&e.error===t.error&&JSON.stringify(e.exploreItems)===JSON.stringify(t.exploreItems)&&JSON.stringify(e.userData)===JSON.stringify(t.userData)&&JSON.stringify(e.userMenuItems)===JSON.stringify(t.userMenuItems)),wc=({abilities:e,width:t=400,height:n=400})=>{const r=()=>e.length===0?"":e.map(i=>{if(i.svgPoint)return`${i.svgPoint.x},${i.svgPoint.y}`;const a=Math.PI*2*e.indexOf(i)/e.length,c=i.score/i.maxScore*40+10,u=50+c*Math.sin(a),l=50-c*Math.cos(a);return`${u},${l}`}).join(" "),s=i=>{const a=Math.PI*2*i/Math.max(e.length,1),c=50+40*Math.sin(a),u=50-40*Math.cos(a);return{x2:c,y2:u}},o=i=>{const a=Math.PI*2*i/Math.max(e.length,1),c=50+45*Math.sin(a),u=50-45*Math.cos(a);let l="middle";return a>Math.PI*.25&&a<Math.PI*.75&&(l="start"),a>Math.PI*1.25&&a<Math.PI*1.75&&(l="end"),{x:c,y:u,textAnchor:l}};return f.jsxs("svg",{"data-testid":"radar-chart",width:t,height:n,viewBox:"0 0 100 100",className:"w-full h-full",preserveAspectRatio:"xMidYMid meet",children:[f.jsx("circle",{"data-testid":"center-point",cx:"50",cy:"50",r:"1",fill:"#4A90E2"}),e.map((i,a)=>{const{x2:c,y2:u}=s(a);return f.jsx("line",{"data-testid":"axis-line",x1:"50",y1:"50",x2:c,y2:u,stroke:"#E2E8F0",strokeWidth:"0.5"},`axis-${a}`)}),e.length>2&&f.jsx("polygon",{"data-testid":"radar-polygon",points:r(),fill:"rgba(74, 144, 226, 0.2)",stroke:"rgb(74, 144, 226)",strokeWidth:"1",fillRule:"evenodd"}),e.map((i,a)=>{let c,u;if(i.svgPoint)c=i.svgPoint.x,u=i.svgPoint.y;else{const l=Math.PI*2*a/e.length,d=i.score/i.maxScore*40+10;c=50+d*Math.sin(l),u=50-d*Math.cos(l)}return f.jsx("circle",{"data-testid":"data-point",cx:c,cy:u,r:"2",fill:i.progressBarColor==="bg-orange-400"?"#FBBF24":"#4A90E2"},`point-${i.name}`)}),e.map((i,a)=>{const{x:c,y:u,textAnchor:l}=o(a);return f.jsx("text",{x:c,y:u,textAnchor:l,fontSize:"5",fill:"#334155",className:"text-xs",children:i.name},`label-${i.name}`)})]})},xc=e=>{let t;const n=new Set,r=(u,l)=>{const d=typeof u=="function"?u(t):u;if(!Object.is(d,t)){const m=t;t=l??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(w=>w(t,m))}},s=()=>t,a={setState:r,getState:s,getInitialState:()=>c,subscribe:u=>(n.add(u),()=>n.delete(u))},c=t=e(r,s,a);return a},ly=(e=>e?xc(e):xc),cy=e=>e;function uy(e,t=cy){const n=b.useSyncExternalStore(e.subscribe,b.useCallback(()=>t(e.getState()),[e,t]),b.useCallback(()=>t(e.getInitialState()),[e,t]));return b.useDebugValue(n),n}const Sc=e=>{const t=ly(e),n=r=>uy(t,r);return Object.assign(n,t),n},dy=(e=>e?Sc(e):Sc),Tc={overallRating:"优秀",generalRecommendation:"你的空间想象力和逻辑推理能力非常出色!若能进一步提升在复杂图形下的专注力,你将所向披靡。建议尝试我们‘专注力挑战’系列游戏。",abilities:[{name:"空间想象力",score:7.5,maxScore:10,progressBarColor:"bg-blue-500",svgPoint:{x:50,y:17.5},recommendation:"通过观察三维物体在不同角度的投影,或尝试构建复杂结构的游戏,能有效提升空间想象力。",recommendationLink:"#spatial-challenges"},{name:"逻辑推理",score:8,maxScore:10,progressBarColor:"bg-blue-500",svgPoint:{x:82,y:35},recommendation:"解决数独、迷宫或逻辑谜题,能够持续锻炼你的逻辑思维,尝试挑战更高难度的推理游戏。",recommendationLink:"#logic-puzzles"},{name:"图形辨识",score:9,maxScore:10,progressBarColor:"bg-blue-500",svgPoint:{x:85,y:65},recommendation:"你在这方面表现出色!可以尝试在更复杂、干扰因素更多的图形中进行辨识训练,保持敏锐。",recommendationLink:"#graphic-training"},{name:"专注力",score:7,maxScore:10,progressBarColor:"bg-orange-400",svgPoint:{x:50,y:80},recommendation:"在长时间的游戏中保持专注对你来说是一个挑战,建议尝试我们‘专注力挑战’系列游戏,逐渐延长专注时间。",recommendationLink:"#focus-challenges"},{name:"观察力",score:8.5,maxScore:10,progressBarColor:"bg-blue-500",svgPoint:{x:15,y:65},recommendation:"你的观察力非常敏锐,在细节发现上尤为突出。尝试在限时模式下进行观察力训练,提高反应速度。",recommendationLink:"#observation-drills"},{name:"抗压性",score:7.8,maxScore:10,progressBarColor:"bg-blue-500",svgPoint:{x:18,y:35},recommendation:"面对高压挑战时,保持冷静是关键。通过模拟竞赛或限时任务来提升抗压能力,逐步适应压力。",recommendationLink:"#stress-games"}]};class fy{static API_BASE_URL="/api/radar-ability";static async fetchRadarAbilityData(){try{return process.env.NODE_ENV==="test"?(await new Promise(t=>setTimeout(t,100)),Tc):(await ne.get(`${this.API_BASE_URL}/assessment`)).data}catch(t){if(console.error("Failed to fetch radar ability data:",t),process.env.NODE_ENV==="test")throw new Error("获取能力评估数据失败");return Tc}}static async submitFeedback(t){try{await ne.post(`${this.API_BASE_URL}/feedback`,t)}catch(n){throw console.error("Failed to submit feedback:",n),new Error("提交反馈失败")}}}const py=dy((e,t)=>({data:null,loading:!1,error:null,fetchData:async()=>{if(!t().loading){e({loading:!0,error:null});try{const n=await fy.fetchRadarAbilityData();e({data:n,loading:!1})}catch(n){const r=n instanceof Error?n.message:"获取数据失败";e({error:r,loading:!1})}}},setData:n=>{e({data:n,error:null,loading:!1})},setError:n=>{e({error:n,loading:!1})},reset:()=>{e({data:null,loading:!1,error:null})}})),Ec=({ability:e})=>{const t=e.score/e.maxScore*100;return f.jsxs("div",{className:"ability-progress-bar-item","data-ability":e.name,"data-testid":"progress-bar-container",children:[f.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[f.jsx("span",{className:"text-gray-700 font-medium",children:e.name}),f.jsxs("span",{className:"text-gray-600",children:[e.score,"/",e.maxScore]})]}),f.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2.5","data-testid":"progress-bar-outer",children:f.jsx("div",{className:`${e.progressBarColor} h-2.5 rounded-full transition-all duration-300`,style:{width:`${t}%`},"data-testid":"progress-bar-inner",role:"progressbar","aria-valuenow":e.score,"aria-valuemin":0,"aria-valuemax":e.maxScore,"aria-label":`${e.name} progress: ${e.score} out of ${e.maxScore}`})})]})},Cc=({generalRecommendation:e})=>f.jsx("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4","data-testid":"advice-panel",role:"region","aria-label":"个性化建议",children:f.jsxs("div",{className:"flex items-start",children:[f.jsx("div",{className:"flex-shrink-0",children:f.jsx("i",{className:"material-icons text-blue-500","data-testid":"lightbulb-icon","aria-hidden":"true",children:"lightbulb"})}),f.jsxs("div",{className:"ml-3",children:[f.jsx("h3",{className:"text-md font-semibold text-blue-800","aria-level":3,children:"个性化建议"}),f.jsx("p",{className:"text-sm text-blue-700 mt-1","data-testid":"recommendation-text",children:e})]})]})}),Pc=({ability:e,customLinkTexts:t={}})=>{const n=r=>{const s={空间想象力:"探索空间挑战",逻辑推理:"深入逻辑谜题",图形辨识:"精进图形训练",专注力:"挑战专注极限",观察力:"提升观察速度",抗压性:"磨砺抗压意志"};return t[r]||s[r]||"开始挑战"};return f.jsx(El,{className:"recommendation-card w-full max-w-sm hover:shadow-lg transition-all duration-300","data-ability":e.name,"data-testid":"recommendation-card",isHoverable:!0,isPressable:!0,children:f.jsx(bl,{className:"p-5",children:f.jsxs("div",{className:"flex flex-col gap-3",children:[f.jsxs("h4",{className:"text-lg font-semibold text-foreground","aria-level":4,children:[e.name,": 专项提高"]}),f.jsx("p",{className:"text-sm text-default-600 leading-relaxed","data-testid":"recommendation-description",children:e.recommendation}),f.jsx(_g,{as:"a",href:e.recommendationLink,className:"mt-2 w-fit",size:"sm",variant:"flat",color:"primary",endContent:f.jsx(mg,{className:"w-4 h-4"}),"data-testid":"recommendation-link","aria-label":`前往${e.name}专项提高页面`,children:n(e.name)})]})})})},Zn={dashboardLayout:"_dashboardLayout_10wqn_5",upperSection:"_upperSection_10wqn_19",lowerSection:"_lowerSection_10wqn_33",radarChartArea:"_radarChartArea_10wqn_51"},my=()=>{const{data:e,loading:t,error:n,fetchData:r}=py();return b.useEffect(()=>{r()},[r]),t?f.jsxs("div",{className:"card max-w-4xl mx-auto p-6 md:p-8 flex items-center justify-center","data-testid":"loading-spinner",children:[f.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-500"}),f.jsx("span",{className:"ml-3 text-gray-600",children:"加载中..."})]}):n?f.jsxs("div",{className:"card max-w-4xl mx-auto p-6 md:p-8 text-center",role:"alert","aria-live":"assertive",children:[f.jsx("div",{className:"text-red-500 mb-4",children:f.jsx("i",{className:"material-icons text-4xl","aria-hidden":"true",children:"error_outline"})}),f.jsx("h3",{className:"text-lg font-semibold text-gray-800 mb-2",children:"加载失败"}),f.jsx("p",{className:"text-gray-600 mb-4",children:n}),f.jsx("button",{onClick:r,className:"bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-lg transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2","aria-label":"重试加载数据",children:"重试"})]}):e?f.jsxs("div",{className:"card max-w-4xl mx-auto p-6 md:p-8 animate-fade-in","data-component":"AbilityAssessmentDashboard",role:"main","aria-label":"能力评估雷达图展示",children:[f.jsxs("div",{className:"flex justify-between items-center mb-6",children:[f.jsx("h2",{className:"text-xl font-bold text-gray-800",children:"能力评估雷达图"}),f.jsxs("span",{className:"bg-blue-100 text-blue-800 text-sm font-semibold px-2.5 py-0.5 rounded-full","aria-label":`综合评级: ${e.overallRating}`,children:["综合评级: ",e.overallRating]})]}),f.jsxs("div",{className:Zn.dashboardLayout,children:[f.jsxs("div",{className:Zn.upperSection,children:[f.jsx("div",{className:Zn.radarChartArea,children:f.jsx(wc,{abilities:e.abilities})}),f.jsx("div",{className:"space-y-4 flex flex-col justify-around py-2",children:e.abilities.map(s=>f.jsx(Ec,{ability:s},s.name))})]}),f.jsxs("div",{className:Zn.lowerSection,children:[f.jsx(Cc,{generalRecommendation:e.generalRecommendation}),f.jsx("h3",{className:"text-lg font-bold text-gray-800 mb-4 mt-6",children:"专项提升建议"}),f.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:e.abilities.map(s=>f.jsx(Pc,{ability:s},s.name))})]})]})]}):f.jsx("div",{className:"card max-w-4xl mx-auto p-6 md:p-8 text-center",role:"status","aria-live":"polite",children:f.jsx("p",{className:"text-gray-600",children:"暂无数据"})})},Qt={id:"user-001",name:"小明",level:5,avatar:"https://i.pravatar.cc/40?u=student1",logIn:!0,badges:["🏆","🏅","🌟"]},hy=[{id:"g3",label:"三年级",status:"new",onClick:()=>console.log("三年级 clicked")},{id:"g4",label:"四年级",status:"2%",onClick:()=>console.log("四年级 clicked")},{id:"g5",label:"五年级",status:"进行中",onClick:()=>console.log("五年级 clicked")},{id:"g6",label:"六年级",status:"new",onClick:()=>console.log("六年级 clicked")},{id:"g7",label:"七年级",status:"new",onClick:()=>console.log("七年级 clicked")},{id:"g8",label:"八年级",status:"new",onClick:()=>console.log("八年级 clicked")},{id:"alg_topic",label:"代数专题",status:"new",onClick:()=>console.log("代数专题 clicked")},{id:"calc_topic",label:"计算专题",status:"new",onClick:()=>console.log("计算专题 clicked")},{id:"geo_topic",label:"几何专题",status:"new",onClick:()=>console.log("几何专题 clicked")},{id:"olym_topic",label:"奥数专题",status:"new",onClick:()=>console.log("奥数专题 clicked")}],gy="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJ1c2VyLTAwMSIsIm5hbWUiOiLlsI_mmI4iLCJsZXZlbCI6NSwiYXZhdGFyIjoiaHR0cHM6Ly9pLnByYXZhdGFyLmNjLzQwP3U9c3R1ZGVudDEiLCJiYWRnZXMiOlsi8J-SoiIsIvCfjZUiLCLwn5KbIl0sImlhdCI6MTY5MTYwMDAwMCwiZXhwIjoxNzIzMTM2MDAwfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c";class by{baseURL;token;constructor(t="/api",n=gy){this.baseURL=t,this.token=n}getAuthHeaders(){return{Authorization:`Bearer ${this.token}`,"Content-Type":"application/json"}}async fetchWithAuth(t,n={}){const r=await fetch(t,{...n,headers:{...this.getAuthHeaders(),...n.headers}});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return r}async getCourseData(t){return(await this.fetchWithAuth(`${this.baseURL}/courses/${t}`)).json()}async getUserGradeUnitsNav(t){const n=t?`${this.baseURL}/user/grade/units/nav?gradeId=${encodeURIComponent(t)}`:`${this.baseURL}/user/grade/units/nav`;return(await this.fetchWithAuth(n)).json()}async getUnitProgress(t,n){const r=n?`${this.baseURL}/courses/${t}/units/${n}/progress`:`${this.baseURL}/courses/${t}/progress`;return(await this.fetchWithAuth(r)).json()}async batchUpdateLessonProgress(t,n){return(await this.fetchWithAuth(`${this.baseURL}/user/units/${t}/progress/batch`,{method:"POST",body:JSON.stringify(n)})).json()}async updateLessonProgress(t,n,r,s){await this.fetchWithAuth(`${this.baseURL}/courses/${t}/units/${n}/lessons/${r}/progress`,{method:"POST",body:JSON.stringify({status:s})})}setToken(t){this.token=t}getToken(){return this.token}}const yy=new by,fe={id:"g5",title:"小学数学五年级",level:5,subject:"数学",units:[{id:"unit_1",title:"小数乘法",description:"学习小数乘法的计算方法及应用",estimatedDuration:"3周",totalLessons:10,moduleCategory:"Arithmetic and Algebra",lessons:[{id:"unit1_lesson1",title:"小数乘整数",duration:40,knowledgeItems:[{id:"unit1_lesson1_k1",title:"小数乘整数的意义",description:"理解小数乘整数的意义与整数乘法相同",progress:0,contentUrl:""},{id:"unit1_lesson1_k2",title:"小数乘整数的计算方法",description:"掌握小数乘整数的计算方法:先按整数乘法计算,再看因数中有几位小数,就从积的右边起数出几位点上小数点",progress:0,contentUrl:""}]},{id:"unit1_lesson2",title:"小数乘小数",duration:40,knowledgeItems:[{id:"unit1_lesson2_k1",title:"小数乘小数的计算方法",description:"掌握小数乘小数的计算方法:先按整数乘法算出积,再给积点上小数点",progress:0,contentUrl:""},{id:"unit1_lesson2_k2",title:"积的小数位数确定",description:"理解积的小数位数等于两个因数的小数位数之和",progress:0,contentUrl:""}]},{id:"unit1_lesson3",title:"积的近似数",duration:40,knowledgeItems:[{id:"unit1_lesson3_k1",title:'用"四舍五入"法求积的近似数',description:'掌握用"四舍五入"法求积的近似数的方法',progress:0,contentUrl:""}]},{id:"unit1_lesson4",title:"整数乘法运算定律推广到小数",duration:40,knowledgeItems:[{id:"unit1_lesson4_k1",title:"乘法运算定律在小数中的适用性",description:"理解整数乘法运算定律对于小数乘法同样适用",progress:0,contentUrl:""},{id:"unit1_lesson4_k2",title:"运用运算定律进行简便计算",description:"能运用乘法运算定律进行小数乘法的简便计算",progress:0,contentUrl:""}]},{id:"unit1_lesson5",title:"解决问题",duration:40,knowledgeItems:[{id:"unit1_lesson5_k1",title:"用小数乘法解决实际问题",description:"能运用小数乘法解决购物、面积计算等实际问题",progress:0,contentUrl:""}]}]},{id:"unit_2",title:"小数除法",description:"学习小数除法的计算方法及应用",estimatedDuration:"3周",totalLessons:12,moduleCategory:"Arithmetic and Algebra",lessons:[{id:"unit2_lesson1",title:"小数除以整数",duration:40,knowledgeItems:[{id:"unit2_lesson1_k1",title:"小数除以整数的计算方法",description:"掌握小数除以整数的计算方法:按照整数除法的方法计算,商的小数点要与被除数的小数点对齐",progress:0,contentUrl:""}]},{id:"unit2_lesson2",title:"一个数除以小数",duration:40,knowledgeItems:[{id:"unit2_lesson2_k1",title:"除数是小数的除法计算方法",description:"掌握除数是小数的除法计算方法:利用商不变的性质,将除数转化为整数",progress:0,contentUrl:""}]},{id:"unit2_lesson3",title:"商的近似数",duration:40,knowledgeItems:[{id:"unit2_lesson3_k1",title:'用"四舍五入"法求商的近似数',description:'掌握用"四舍五入"法求商的近似数的方法',progress:0,contentUrl:""}]},{id:"unit2_lesson4",title:"循环小数",duration:40,knowledgeItems:[{id:"unit2_lesson4_k1",title:"循环小数的概念",description:"理解循环小数的概念,认识循环节",progress:0,contentUrl:""},{id:"unit2_lesson4_k2",title:"循环小数的表示方法",description:"掌握循环小数的简便表示方法",progress:0,contentUrl:""}]},{id:"unit2_lesson5",title:"用计算器探索规律",duration:40,knowledgeItems:[{id:"unit2_lesson5_k1",title:"用计算器计算小数除法",description:"会用计算器计算较复杂的小数除法",progress:0,contentUrl:""},{id:"unit2_lesson5_k2",title:"发现商的变化规律",description:"能借助计算器发现商的变化规律",progress:0,contentUrl:""}]},{id:"unit2_lesson6",title:"解决问题",duration:40,knowledgeItems:[{id:"unit2_lesson6_k1",title:"用小数除法解决实际问题",description:"能运用小数除法解决购物、分配等实际问题",progress:0,contentUrl:""}]}]},{id:"unit_3",title:"简易方程",description:"学习用字母表示数和解简易方程",estimatedDuration:"4周",totalLessons:14,moduleCategory:"Arithmetic and Algebra",lessons:[{id:"unit3_lesson1",title:"用字母表示数",duration:40,knowledgeItems:[{id:"unit3_lesson1_k1",title:"用字母表示数",description:"初步理解用字母表示数的意义和作用",progress:0,contentUrl:""},{id:"unit3_lesson1_k2",title:"用字母表示运算定律和计算公式",description:"会用字母表示运算定律和计算公式",progress:0,contentUrl:""}]},{id:"unit3_lesson2",title:"方程的意义",duration:40,knowledgeItems:[{id:"unit3_lesson2_k1",title:"方程的概念",description:"理解方程的意义,知道方程与等式的区别和联系",progress:0,contentUrl:""}]},{id:"unit3_lesson3",title:"等式的性质",duration:40,knowledgeItems:[{id:"unit3_lesson3_k1",title:"等式的性质1",description:"理解等式的性质1:等式两边加上或减去同一个数,左右两边仍然相等",progress:0,contentUrl:""},{id:"unit3_lesson3_k2",title:"等式的性质2",description:"理解等式的性质2:等式两边乘同一个数,或除以同一个不为0的数,左右两边仍然相等",progress:0,contentUrl:""}]},{id:"unit3_lesson4",title:"解简易方程",duration:40,knowledgeItems:[{id:"unit3_lesson4_k1",title:"利用等式的性质解方程",description:"会利用等式的性质解形如x±a=b、ax=b、x÷a=b、a-x=b、a÷x=b的方程",progress:0,contentUrl:""}]},{id:"unit3_lesson5",title:"实际问题与方程",duration:40,knowledgeItems:[{id:"unit3_lesson5_k1",title:"列方程解决实际问题",description:"初步学会列方程解决一些简单的实际问题",progress:0,contentUrl:""}]}]},{id:"unit_4",title:"多边形的面积",description:"学习平行四边形、三角形、梯形和组合图形的面积计算",estimatedDuration:"3周",totalLessons:12,moduleCategory:"Graphics and Geometry",lessons:[{id:"unit4_lesson1",title:"平行四边形的面积",duration:40,knowledgeItems:[{id:"unit4_lesson1_k1",title:"平行四边形面积公式的推导",description:"通过割补法理解平行四边形面积公式的推导过程",progress:0,contentUrl:""},{id:"unit4_lesson1_k2",title:"平行四边形面积的计算",description:"掌握平行四边形面积计算公式:S=ah,并能正确运用",progress:0,contentUrl:""}]},{id:"unit4_lesson2",title:"三角形的面积",duration:40,knowledgeItems:[{id:"unit4_lesson2_k1",title:"三角形面积公式的推导",description:"通过拼摆法理解三角形面积公式的推导过程",progress:0,contentUrl:""},{id:"unit4_lesson2_k2",title:"三角形面积的计算",description:"掌握三角形面积计算公式:S=ah÷2,并能正确运用",progress:0,contentUrl:""}]},{id:"unit4_lesson3",title:"梯形的面积",duration:40,knowledgeItems:[{id:"unit4_lesson3_k1",title:"梯形面积公式的推导",description:"通过拼摆法理解梯形面积公式的推导过程",progress:0,contentUrl:""},{id:"unit4_lesson3_k2",title:"梯形面积的计算",description:"掌握梯形面积计算公式:S=(a+b)h÷2,并能正确运用",progress:0,contentUrl:""}]},{id:"unit4_lesson4",title:"组合图形的面积",duration:40,knowledgeItems:[{id:"unit4_lesson4_k1",title:"认识组合图形",description:"认识组合图形,会把组合图形分解成已学过的平面图形",progress:0,contentUrl:""},{id:"unit4_lesson4_k2",title:"计算组合图形的面积",description:"掌握计算组合图形面积的多种方法",progress:0,contentUrl:""}]}]},{id:"unit_5",title:"因数与倍数",description:"学习因数、倍数、质数、合数等概念",estimatedDuration:"3周",totalLessons:10,moduleCategory:"Arithmetic and Algebra",lessons:[{id:"unit5_lesson1",title:"因数和倍数",duration:40,knowledgeItems:[{id:"unit5_lesson1_k1",title:"因数和倍数的意义",description:"理解因数和倍数的意义,掌握找一个数的因数和倍数的方法",progress:0,contentUrl:""},{id:"unit5_lesson1_k2",title:"因数和倍数的特征",description:"了解一个数的因数的个数是有限的,倍数的个数是无限的",progress:0,contentUrl:""}]},{id:"unit5_lesson2",title:"2、5、3的倍数的特征",duration:40,knowledgeItems:[{id:"unit5_lesson2_k1",title:"2、5的倍数的特征",description:"掌握2、5的倍数的特征,理解奇数和偶数的意义",progress:0,contentUrl:""},{id:"unit5_lesson2_k2",title:"3的倍数的特征",description:"掌握3的倍数的特征,能判断一个数是不是3的倍数",progress:0,contentUrl:""}]},{id:"unit5_lesson3",title:"质数和合数",duration:40,knowledgeItems:[{id:"unit5_lesson3_k1",title:"质数和合数的意义",description:"理解质数和合数的意义,能判断一个数是质数还是合数",progress:0,contentUrl:""},{id:"unit5_lesson3_k2",title:"制作100以内的质数表",description:"会制作100以内的质数表,熟记20以内的质数",progress:0,contentUrl:""}]}]},{id:"unit_6",title:"长方体和正方体",description:"学习长方体和正方体的特征、表面积和体积计算",estimatedDuration:"4周",totalLessons:14,moduleCategory:"Graphics and Geometry",lessons:[{id:"unit6_lesson1",title:"长方体和正方体的认识",duration:40,knowledgeItems:[{id:"unit6_lesson1_k1",title:"长方体的特征",description:"认识长方体的特征,了解长方体的长、宽、高",progress:0,contentUrl:""},{id:"unit6_lesson1_k2",title:"正方体的特征",description:"认识正方体的特征,理解正方体是特殊的长方体",progress:0,contentUrl:""}]},{id:"unit6_lesson2",title:"长方体和正方体的表面积",duration:40,knowledgeItems:[{id:"unit6_lesson2_k1",title:"表面积的意义",description:"理解表面积的意义,掌握长方体和正方体表面积的计算方法",progress:0,contentUrl:""},{id:"unit6_lesson2_k2",title:"表面积的实际应用",description:"能运用表面积知识解决一些实际问题",progress:0,contentUrl:""}]},{id:"unit6_lesson3",title:"长方体和正方体的体积",duration:40,knowledgeItems:[{id:"unit6_lesson3_k1",title:"体积和体积单位",description:"理解体积的意义,认识常用的体积单位",progress:0,contentUrl:""},{id:"unit6_lesson3_k2",title:"长方体和正方体体积的计算",description:"掌握长方体和正方体体积的计算公式",progress:0,contentUrl:""},{id:"unit6_lesson3_k3",title:"体积单位间的进率",description:"掌握体积单位之间的进率和换算",progress:0,contentUrl:""}]},{id:"unit6_lesson4",title:"容积和容积单位",duration:40,knowledgeItems:[{id:"unit6_lesson4_k1",title:"容积和容积单位",description:"理解容积的意义,认识常用的容积单位",progress:0,contentUrl:""},{id:"unit6_lesson4_k2",title:"容积和体积的关系",description:"掌握容积和体积之间的关系",progress:0,contentUrl:""}]}]},{id:"unit_7",title:"分数的意义和性质",description:"学习分数的意义、性质和约分、通分等方法",estimatedDuration:"4周",totalLessons:16,moduleCategory:"Arithmetic and Algebra",lessons:[{id:"unit7_lesson1",title:"分数的意义",duration:40,knowledgeItems:[{id:"unit7_lesson1_k1",title:"分数的产生和意义",description:"理解分数的产生和意义,明确分数与除法的关系",progress:0,contentUrl:""},{id:"unit7_lesson1_k2",title:"分数单位",description:"认识分数单位,能说出一个分数中有几个这样的分数单位",progress:0,contentUrl:""}]},{id:"unit7_lesson2",title:"分数与除法",duration:40,knowledgeItems:[{id:"unit7_lesson2_k1",title:"分数与除法的关系",description:"理解分数与除法的关系,会用分数表示两个数相除的商",progress:0,contentUrl:""}]},{id:"unit7_lesson3",title:"真分数和假分数",duration:40,knowledgeItems:[{id:"unit7_lesson3_k1",title:"真分数和假分数的意义",description:"理解真分数和假分数的意义和特征",progress:0,contentUrl:""},{id:"unit7_lesson3_k2",title:"带分数",description:"认识带分数,会进行假分数与整数、带分数的互化",progress:0,contentUrl:""}]},{id:"unit7_lesson4",title:"分数的基本性质",duration:40,knowledgeItems:[{id:"unit7_lesson4_k1",title:"分数的基本性质",description:"理解分数的基本性质,能运用分数的基本性质进行分数的变形",progress:0,contentUrl:""}]},{id:"unit7_lesson5",title:"约分",duration:40,knowledgeItems:[{id:"unit7_lesson5_k1",title:"最大公因数",description:"理解公因数和最大公因数的意义,掌握求两个数的最大公因数的方法",progress:0,contentUrl:""},{id:"unit7_lesson5_k2",title:"约分的方法",description:"掌握约分的方法,能正确地进行约分",progress:0,contentUrl:""}]},{id:"unit7_lesson6",title:"通分",duration:40,knowledgeItems:[{id:"unit7_lesson6_k1",title:"最小公倍数",description:"理解公倍数和最小公倍数的意义,掌握求两个数的最小公倍数的方法",progress:0,contentUrl:""},{id:"unit7_lesson6_k2",title:"通分的方法",description:"掌握通分的方法,能正确地进行通分",progress:0,contentUrl:""}]},{id:"unit7_lesson7",title:"分数和小数的互化",duration:40,knowledgeItems:[{id:"unit7_lesson7_k1",title:"分数化成小数",description:"掌握分数化成小数的方法",progress:0,contentUrl:""},{id:"unit7_lesson7_k2",title:"小数化成分数",description:"掌握小数化成分数的方法",progress:0,contentUrl:""}]}]},{id:"unit_8",title:"分数的加法和减法",description:"学习同分母分数、异分母分数的加法和减法",estimatedDuration:"3周",totalLessons:12,moduleCategory:"Arithmetic and Algebra",lessons:[{id:"unit8_lesson1",title:"同分母分数加、减法",duration:40,knowledgeItems:[{id:"unit8_lesson1_k1",title:"同分母分数加法的计算方法",description:"掌握同分母分数加法的计算方法",progress:0,contentUrl:""},{id:"unit8_lesson1_k2",title:"同分母分数减法的计算方法",description:"掌握同分母分数减法的计算方法",progress:0,contentUrl:""}]},{id:"unit8_lesson2",title:"异分母分数加、减法",duration:40,knowledgeItems:[{id:"unit8_lesson2_k1",title:"异分母分数加法的计算方法",description:"掌握异分母分数加法的计算方法:先通分,然后按照同分母分数加法进行计算",progress:0,contentUrl:""},{id:"unit8_lesson2_k2",title:"异分母分数减法的计算方法",description:"掌握异分母分数减法的计算方法:先通分,然后按照同分母分数减法进行计算",progress:0,contentUrl:""}]},{id:"unit8_lesson3",title:"分数加减混合运算",duration:40,knowledgeItems:[{id:"unit8_lesson3_k1",title:"分数加减混合运算的顺序",description:"掌握分数加减混合运算的运算顺序",progress:0,contentUrl:""},{id:"unit8_lesson3_k2",title:"整数加法运算定律推广到分数加法",description:"理解整数加法运算定律对于分数加法同样适用,能运用运算定律进行简便计算",progress:0,contentUrl:""}]}]},{id:"unit_9",title:"折线统计图",description:"学习单式折线统计图和复式折线统计图的认识和制作",estimatedDuration:"2周",totalLessons:6,moduleCategory:"Probability and Statistics",lessons:[{id:"unit9_lesson1",title:"单式折线统计图",duration:40,knowledgeItems:[{id:"unit9_lesson1_k1",title:"单式折线统计图的特点",description:"认识单式折线统计图,了解其特点和作用",progress:0,contentUrl:""},{id:"unit9_lesson1_k2",title:"绘制单式折线统计图",description:"能根据数据绘制单式折线统计图",progress:0,contentUrl:""}]},{id:"unit9_lesson2",title:"复式折线统计图",duration:40,knowledgeItems:[{id:"unit9_lesson2_k1",title:"复式折线统计图的特点",description:"认识复式折线统计图,了解其特点和作用",progress:0,contentUrl:""},{id:"unit9_lesson2_k2",title:"绘制复式折线统计图",description:"能根据数据绘制复式折线统计图",progress:0,contentUrl:""}]},{id:"unit9_lesson3",title:"数据分析",duration:40,knowledgeItems:[{id:"unit9_lesson3_k1",title:"根据统计图进行数据分析",description:"能根据折线统计图进行简单的数据分析,作出合理的判断和预测",progress:0,contentUrl:""}]}]}]},vy=hy,wy=Qt,kc=b.createContext(null),Ac=()=>{const e=b.useContext(kc);if(!e)throw new Error("useGradeUnitBrowser must be used within GradeUnitBrowserProvider");return e},xy=({children:e})=>{const[t,n]=b.useState(null),[r,s]=b.useState([]),[o,i]=b.useState(null),[a,c]=b.useState({}),[u,l]=b.useState(!1),[d,m]=b.useState(null),[w,p]=b.useState(null),[v,y]=b.useState([]),E=b.useCallback(async(A,I)=>{l(!0),m(null);try{await new Promise(C=>setTimeout(C,100));try{console.log("Attempting to fetch units data from API...");const C=await yy.getUserGradeUnitsNav(A);console.log("API call successful, units data:",C),i(C),console.log("unitsData:",C)}catch(C){const V=C;console.error("API call failed, using mock data. Error details:",{message:V.message,name:V.name,stack:V.stack});const W={userId:I,courseId:"g5",courseTitle:"小学数学五年级",courseLevel:5,totalUnits:2,completedUnits:0,overallProgress:23,status:"in-progress",lastAccessed:new Date().toISOString(),units:[{unitId:"unit_1",title:"小数乘法",description:"学习小数乘法的计算方法及应用",moduleCategory:"Arithmetic and Algebra",estimatedDuration:"3周",totalLessons:5,completedLessons:1,progressPercentage:20,status:"in-progress",lastAccessed:new Date().toISOString(),isActive:!0,route:"/math/grade-5/unit/unit_1"},{unitId:"unit_2",title:"小数除法",description:"学习小数除法的计算方法及应用",moduleCategory:"Arithmetic and Algebra",estimatedDuration:"3周",totalLessons:5,completedLessons:0,progressPercentage:0,status:"not-started",isActive:!1,route:"/math/grade-5/unit/unit_2"}]};i(W)}const $={};fe.units.forEach(C=>{$[C.id]=C.lessons.map(V=>({id:V.id,title:V.title,duration:V.duration,knowledgeItems:V.knowledgeItems.map(W=>({...W,progress:0}))}))}),console.log("Lessons data loaded:",$),c($),console.log("unitsData:",o),console.log("unitsData.units:",o?.units),console.log("First unit isActive:",o?.units?.[0]?.isActive),console.log("First unit unitId:",o?.units?.[0]?.unitId),console.log("Lessons data keys:",Object.keys($)),console.log("Lessons for unit_1:",$.unit_1),n({id:I,name:"学生用户",level:5,avatar:"https://i.pravatar.cc/40",badges:["🏆"]}),s([{id:"g5",label:"五年级",status:"进行中"},{id:"g6",label:"六年级",status:"new"}])}catch($){m($ instanceof Error?$.message:"数据加载失败"),console.error("数据加载错误:",$),console.error("API call error details:",$),console.log("gradeId parameter:",A)}finally{l(!1)}},[]),N=b.useCallback(A=>{y(I=>I.includes(A)?I.filter($=>$!==A):[...I,A])},[]),_=b.useCallback(A=>{p(A)},[]);b.useEffect(()=>{if(console.log("unitsData state updated:",o),o&&o.units.length>0){const A=o.units.find(I=>I.isActive)?.unitId||o.units[0].unitId;p(A),console.log("Default active unit set after state update:",A)}},[o]);const O={userInfo:t,exploreMenu:r,unitsData:o,lessons:a,loading:u,error:d,activeUnitId:w,activeLessonIds:v,setLoading:l,setError:m,setActiveUnit:_,toggleLesson:N,loadPageData:E};return f.jsx(kc.Provider,{value:O,children:e})},Sy=({gradeId:e,userId:t,onLearnAction:n,className:r,userInfo:s,exploreMenu:o})=>{const{userInfo:i,exploreMenu:a,unitsData:c,lessons:u,loading:l,error:d,activeUnitId:m,activeLessonIds:w,setActiveUnit:p,toggleLesson:v,loadPageData:y}=Ac(),E=s??i,N=o??a;b.useEffect(()=>{y(e,t)},[e,t,y]),b.useEffect(()=>{console.log("activeUnitId from context:",m),console.log("lessons from context:",u);const A=c?.units?.find($=>$.unitId===m)||null,I=A&&m&&u[m]?{id:A.unitId,title:A.title,description:A.description,estimatedDuration:A.estimatedDuration,totalLessons:A.totalLessons,moduleCategory:A.moduleCategory,lessons:u[m]}:null;console.log("activeUnit computed:",I)},[m,u,c]);const _=c?.units?.find(A=>A.unitId===m)||null,O=_&&m&&u[m]?{id:_.unitId,title:_.title,description:_.description,estimatedDuration:_.estimatedDuration,totalLessons:_.totalLessons,moduleCategory:_.moduleCategory,lessons:u[m]}:null;return l?f.jsx("div",{className:"grade-unit-browser-page loading","data-testid":"grade-unit-browser-page",children:f.jsx("div",{className:"loading-spinner","data-testid":"loading-spinner",children:"加载中..."})}):d?f.jsxs("div",{className:"grade-unit-browser-page error","data-testid":"grade-unit-browser-page",children:[f.jsx("div",{className:"error-message","data-testid":"error-message",children:d}),f.jsx("button",{onClick:()=>y(e,t),className:"retry-button",children:"重试"})]}):f.jsxs("div",{className:`grade-unit-browser-page ${r||""}`,"data-testid":"grade-unit-browser-page",children:[f.jsx("div",{className:"header-area",children:f.jsx(vc,{userData:E||void 0,exploreItems:N})}),f.jsx("div",{className:"sidebar-area",children:f.jsx(Nl,{data:c,activeUnitId:m,onUnitSelect:p,loading:l})}),f.jsx("div",{className:"content-area",children:f.jsx(Al,{unit:O,activeLessonIds:w,onToggleLesson:v,onLearnAction:n||(()=>{}),loading:l})})]})},Ty={"Arithmetic and Algebra":"🔢","Graphics and Geometry":"📐","Probability and Statistics":"📊",Default:"📚"},Ey={mastered:"已掌握",proficient:"熟练",familiar:"熟悉",attempted:"已尝试","not-started":"未开始"},Cy={mastered:"#10b981",proficient:"#3b82f6",familiar:"#f59e0b",attempted:"#8b5cf6","not-started":"#6b7280"},Te=(e,t,n)=>({x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}),Py=()=>{const e={x:.5,y:.1,name:"A"},t={x:.1,y:.75,name:"B"},n={x:.9,y:.75,name:"C"},r={...Te(e,t,1/3),name:"D"},s={...Te(e,n,1/3),name:"E"},o={...Te(e,t,2/3),name:"M"},i={...Te(e,n,2/3),name:"N"},a={...Te(t,n,1/3),name:"P"},c={...Te(t,n,2/3),name:"Q"},u={...Te(r,s,1/3),name:"U"},l={...Te(r,s,2/3),name:"S"},d={...Te(o,i,1/3),name:"K"},m={...Te(o,i,2/3),name:"L"};return{A:e,B:t,C:n,D:r,E:s,M:o,N:i,P:a,Q:c,U:u,S:l,K:d,L:m}},ky=(e,t,n)=>{const r={};for(const[s,o]of Object.entries(e))r[s]={...o,x:o.x*t,y:o.y*n};return r},Ay=(e,t)=>{const[n,r,s]=t,{x:o,y:i}=e,a=(r.y-s.y)*(n.x-s.x)+(s.x-r.x)*(n.y-s.y);if(Math.abs(a)<1e-4)return!1;const c=((r.y-s.y)*(o-s.x)+(s.x-r.x)*(i-s.y))/a,u=((s.y-n.y)*(o-s.x)+(n.x-s.x)*(i-s.y))/a,l=1-c-u;return c>=-.001&&u>=-.001&&l>=-.001},$y=(e,t)=>{if(!e||!t||e.length!==3||t.length!==3)return!1;const n=e.map(s=>s.name).sort(),r=t.map(s=>s.name).sort();return n.every((s,o)=>s===r[o])},_y=(e,t)=>{if(!e||!t||e.length!==t.length)return!1;const n=e.map(s=>s.name).sort(),r=t.map(s=>s.name).sort();return n.join("")===r.join("")},My=()=>[{from:"A",to:"B"},{from:"A",to:"C"},{from:"B",to:"C"},{from:"D",to:"E"},{from:"M",to:"N"},{from:"P",to:"Q"},{from:"A",to:"D"},{from:"A",to:"E"},{from:"A",to:"M"},{from:"A",to:"N"},{from:"A",to:"P"},{from:"A",to:"Q"},{from:"D",to:"U"},{from:"U",to:"S"},{from:"S",to:"E"},{from:"M",to:"K"},{from:"K",to:"L"},{from:"L",to:"N"},{from:"B",to:"P"},{from:"P",to:"Q"},{from:"Q",to:"C"}],Ny=()=>[{id:"gem_1",vertices:["A","B","P"],points:10,category:"basic"},{id:"gem_2",vertices:["A","P","Q"],points:10,category:"basic"},{id:"gem_3",vertices:["A","Q","C"],points:10,category:"basic"},{id:"gem_4",vertices:["A","B","Q"],points:15,category:"medium"},{id:"gem_5",vertices:["A","P","C"],points:15,category:"medium"},{id:"gem_6",vertices:["A","B","C"],points:20,category:"large"},{id:"gem_7",vertices:["A","D","U"],points:12,category:"ade_small"},{id:"gem_8",vertices:["A","U","S"],points:12,category:"ade_small"},{id:"gem_9",vertices:["A","S","E"],points:12,category:"ade_small"},{id:"gem_10",vertices:["A","D","S"],points:18,category:"ade_medium"},{id:"gem_11",vertices:["A","U","E"],points:18,category:"ade_medium"},{id:"gem_12",vertices:["A","D","E"],points:25,category:"ade_large"},{id:"gem_13",vertices:["A","M","K"],points:14,category:"amn_small"},{id:"gem_14",vertices:["A","K","L"],points:14,category:"amn_small"},{id:"gem_15",vertices:["A","L","N"],points:14,category:"amn_small"},{id:"gem_16",vertices:["A","M","L"],points:20,category:"amn_medium"},{id:"gem_17",vertices:["A","K","N"],points:20,category:"amn_medium"},{id:"gem_18",vertices:["A","M","N"],points:30,category:"amn_large"}],Iy={TOTAL_GEMS:18,CANVAS_RATIO:4/3,DEFAULT_VIEWBOX:{width:700,height:600},POINT_RADIUS:{default:6,selected:9},TOLERANCE:.001,MIN_TRIANGLE_AREA:.001,COORDINATE_PRECISION:1e-4,BARYCENTRIC_TOLERANCE:-.001},$c=(e=Qt.id)=>{const t=fe.units.map((s,o)=>{const i=Math.min(100,Math.max(0,o*15+Math.random()*20)),a=Math.floor(s.lessons.length*i/100),c=s.lessons.map((u,l)=>{const d=Math.min(100,Math.max(0,i-l*10+Math.random()*30));return{lessonId:u.id,status:d>=100?"completed":d>0?"in-progress":"not-started",progressPercentage:Math.round(d),lastAccessed:d>0?new Date(Date.now()-Math.random()*7*24*60*60*1e3).toISOString():void 0,timeSpent:d>0?Math.floor(Math.random()*120+10):void 0,score:d>=100?Math.floor(Math.random()*21+80):void 0,attempts:d>0?Math.floor(Math.random()*3+1):void 0}});return{unitId:s.id,userId:e,totalLessons:s.lessons.length,completedLessons:a,progressPercentage:Math.round(i),status:i>=100?"completed":i>0?"in-progress":"not-started",lastAccessed:i>0?new Date(Date.now()-Math.random()*14*24*60*60*1e3).toISOString():void 0,lessons:c}}),n=t.reduce((s,o)=>s+o.progressPercentage,0)/t.length,r=t.filter(s=>s.status==="completed").length;return{courseId:fe.id,userId:e,totalUnits:t.length,completedUnits:r,progressPercentage:Math.round(n),status:n>=100?"completed":n>0?"in-progress":"not-started",lastAccessed:new Date(Date.now()-Math.random()*3*24*60*60*1e3).toISOString(),units:t}},_c=$c(),eo=(e,t)=>e===Qt.id&&t===fe.id?_c:null,Mc=(e,t,n)=>{const r=eo(e,t);return r&&r.units.find(s=>s.unitId===n)||null},Oy=(e,t,n,r)=>{const s=Mc(e,t,n);return s&&s.lessons.find(o=>o.lessonId===r)||null},Ly=(e,t,n,r,s)=>(console.log("Updating lesson progress:",{userId:e,courseId:t,unitId:n,lessonId:r,progress:s}),!0),to=(e,t)=>{const n=eo(e,t);if(!n)return null;const r=fe.units.map((s,o)=>{const i=n.units.find(a=>a.unitId===s.id);return{unitId:s.id,title:s.title,description:s.description,moduleCategory:s.moduleCategory,estimatedDuration:s.estimatedDuration,totalLessons:s.lessons.length,completedLessons:i?.completedLessons||0,progressPercentage:i?.progressPercentage||0,status:i?.status||"not-started",lastAccessed:i?.lastAccessed,isActive:o===0,route:`/math/grade-${fe.level}/unit/${s.id}`}});return{userId:e,courseId:fe.id,courseTitle:fe.title,courseLevel:fe.level,totalUnits:r.length,completedUnits:r.filter(s=>s.status==="completed").length,overallProgress:n.progressPercentage,status:n.status,lastAccessed:n.lastAccessed,units:r}},Dy=(e,t,n)=>{const r=to(e,t);return r&&r.units.find(s=>s.unitId===n)||null},jy=(e,t,n,r)=>(console.log("Updating unit active status:",{userId:e,courseId:t,unitId:n,isActive:r}),!0),Vy=to(Qt.id,fe.id),Fy={userId:Qt.id,courseId:fe.id,courseTitle:fe.title,courseLevel:fe.level,totalUnits:fe.units.length,completedUnits:3,overallProgress:45,status:"in-progress",lastAccessed:"2024-01-15T10:30:00Z",units:[{unitId:"unit_1",title:"小数乘法",description:"学习小数乘法的计算方法及应用",moduleCategory:"Arithmetic and Algebra",estimatedDuration:"3周",totalLessons:10,completedLessons:8,progressPercentage:80,status:"completed",lastAccessed:"2024-01-10T14:20:00Z",isActive:!1,route:"/math/grade-5/unit/unit_1",icon:"🔢"},{unitId:"unit_2",title:"小数除法",description:"学习小数除法的计算方法及应用",moduleCategory:"Arithmetic and Algebra",estimatedDuration:"3周",totalLessons:12,completedLessons:6,progressPercentage:50,status:"in-progress",lastAccessed:"2024-01-15T10:30:00Z",isActive:!0,route:"/math/grade-5/unit/unit_2",icon:"➗"},{unitId:"unit_3",title:"简易方程",description:"学习用字母表示数和解简易方程",moduleCategory:"Arithmetic and Algebra",estimatedDuration:"4周",totalLessons:14,completedLessons:2,progressPercentage:14,status:"in-progress",lastAccessed:"2024-01-12T16:45:00Z",isActive:!1,route:"/math/grade-5/unit/unit_3",icon:"📝"},{unitId:"unit_4",title:"多边形的面积",description:"学习平行四边形、三角形、梯形和组合图形的面积计算",moduleCategory:"Graphics and Geometry",estimatedDuration:"3周",totalLessons:12,completedLessons:0,progressPercentage:0,status:"not-started",isActive:!1,route:"/math/grade-5/unit/unit_4",icon:"📐"},{unitId:"unit_5",title:"因数与倍数",description:"学习因数、倍数、质数、合数等概念",moduleCategory:"Arithmetic and Algebra",estimatedDuration:"3周",totalLessons:10,completedLessons:0,progressPercentage:0,status:"not-started",isActive:!1,route:"/math/grade-5/unit/unit_5",icon:"🔢"},{unitId:"unit_6",title:"长方体和正方体",description:"学习长方体和正方体的特征、表面积和体积计算",moduleCategory:"Graphics and Geometry",estimatedDuration:"4周",totalLessons:14,completedLessons:0,progressPercentage:0,status:"not-started",isActive:!1,route:"/math/grade-5/unit/unit_6",icon:"📦"},{unitId:"unit_7",title:"分数的意义和性质",description:"学习分数的意义、性质和约分、通分等方法",moduleCategory:"Arithmetic and Algebra",estimatedDuration:"4周",totalLessons:16,completedLessons:0,progressPercentage:0,status:"not-started",isActive:!1,route:"/math/grade-5/unit/unit_7",icon:"½"},{unitId:"unit_8",title:"分数的加法和减法",description:"学习同分母分数、异分母分数的加法和减法",moduleCategory:"Arithmetic and Algebra",estimatedDuration:"3周",totalLessons:12,completedLessons:0,progressPercentage:0,status:"not-started",isActive:!1,route:"/math/grade-5/unit/unit_8",icon:"➕"},{unitId:"unit_9",title:"折线统计图",description:"学习单式折线统计图和复式折线统计图的认识和制作",moduleCategory:"Probability and Statistics",estimatedDuration:"2周",totalLessons:6,completedLessons:0,progressPercentage:0,status:"not-started",isActive:!1,route:"/math/grade-5/unit/unit_9",icon:"📊"}]};var Ry=_m;const Uy=Object.freeze(Object.defineProperty({__proto__:null,default:Ry},Symbol.toStringTag,{value:"Module"}));K.AbilityAssessmentDashboard=my,K.AbilityProgressBar=Ec,K.Button=io,K.ContentAccordion=Al,K.GEOMETRY_CONFIG=Iy,K.GradeUnitBrowserPage=Sy,K.GradeUnitBrowserProvider=xy,K.MOCK_USER_COURSE_PROGRESS=_c,K.MOCK_USER_GRADE_UNITS_NAV=Vy,K.MOCK_USER_GRADE_UNITS_PROGRESS=Fy,K.MathWizHeader=vc,K.PersonalizedAdvicePanel=Cc,K.RadarChart=wc,K.RecommendationCard=Pc,K.Sidebar=Nl,K.Submenu=Bs,K.UserProfile=yc,K.calculateGamePoints=Py,K.categoryIcons=Ty,K.comparePointArrays=_y,K.courseData=fe,K.exploreItems=vy,K.generateMockUserCourseProgress=$c,K.getBasicGemDefinitions=Ny,K.getBasicLineDefinitions=My,K.getUnitNavItem=Dy,K.getUserCourseProgress=eo,K.getUserGradeUnitsNav=to,K.getUserLessonProgress=Oy,K.getUserUnitProgress=Mc,K.isPointInTriangle=Ay,K.pointOnLine=Te,K.statusColors=Cy,K.statusMapping=Ey,K.toPixelCoordinates=ky,K.trianglesMatch=$y,K.updateUnitActiveStatus=jy,K.updateUserLessonProgress=Ly,K.useGradeUnitBrowser=Ac,K.userData=wy,Object.defineProperty(K,Symbol.toStringTag,{value:"Module"})}));
65
+ */const ss=Ye("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),Rt=e=>e===0?"开始学习":e===100?"复习":"继续学习",rs=e=>{if(e.length===0)return 0;const t=e.reduce((n,s)=>n+s.progress,0);return Math.round(t/e.length)},os=({knowledgeItem:e,onLearnAction:t})=>{const n=()=>{t(e)};return console.log("KnowledgeCard render:",{progress:e.progress,text:Rt(e.progress)}),c.jsxs(Ke.Card,{className:"content-accordion__knowledge-card",children:[c.jsxs(Ke.CardBody,{children:[c.jsx("h3",{className:"content-accordion__knowledge-title",children:e.title}),c.jsx("p",{className:"content-accordion__knowledge-description",children:e.description})]}),c.jsxs(Ke.CardFooter,{className:"content-accordion__knowledge-actions",children:[c.jsxs("div",{className:"content-accordion__progress-container",children:[c.jsx(Jn.Progress,{value:e.progress,size:"sm","aria-label":`${e.title} 进度`,className:"content-accordion__progress-bar"}),c.jsxs("span",{className:"content-accordion__progress-text",children:[e.progress,"%"]})]}),c.jsx(St,{size:"sm",radius:"md",onClick:n,progress:e.progress,variant:e.progress===100?"light":e.progress===0?"solid":"bordered",className:"content-accordion__learn-button",children:Rt(e.progress)})]})]})},is=({lesson:e,isExpanded:t,onToggle:n,onLearnAction:s})=>{const r=()=>{n(e.id)},i=rs(e.knowledgeItems);return c.jsxs("div",{className:`content-accordion__lesson-item ${t?"content-accordion__lesson-item--expanded":""}`,children:[c.jsxs("div",{className:"content-accordion__lesson-header",onClick:r,role:"button",tabIndex:0,"aria-expanded":t,"aria-label":`${e.title},点击${t?"收起":"展开"}`,children:[c.jsxs("div",{className:"content-accordion__lesson-header-content",children:[c.jsx("h2",{className:"content-accordion__lesson-title",children:e.title}),c.jsxs("span",{className:"content-accordion__lesson-duration",children:["约 ",e.duration," 分钟"]})]}),c.jsxs("div",{className:"content-accordion__lesson-actions",children:[c.jsxs("span",{className:"content-accordion__lesson-progress",children:[i,"%"]}),t?c.jsx(ns,{className:"content-accordion__lesson-icon"}):c.jsx(ss,{className:"content-accordion__lesson-icon"})]})]}),t&&c.jsx("div",{className:"content-accordion__knowledge-list",children:e.knowledgeItems.map(o=>c.jsx(os,{knowledgeItem:o,onLearnAction:s},o.id))})]})},kt=({unit:e,activeLessonIds:t,onToggleLesson:n,onLearnAction:s,loading:r=!1,className:i="",emptyState:o})=>r?c.jsx("div",{className:"content-accordion content-accordion--loading",children:c.jsx("div",{className:"content-accordion__loading",children:"加载中..."})}):e?c.jsxs("div",{className:`content-accordion ${i}`,children:[c.jsxs("header",{className:"content-accordion__header",children:[c.jsx("h1",{className:"content-accordion__unit-title",children:e.title}),c.jsx("p",{className:"content-accordion__unit-description",children:e.description}),c.jsxs("div",{className:"content-accordion__unit-meta",children:[c.jsxs("span",{children:["总共 ",e.totalLessons," 节课"]}),c.jsx("span",{children:"•"}),c.jsxs("span",{children:["预计学习 ",e.estimatedDuration]})]})]}),c.jsx("div",{className:"content-accordion__lessons",children:e.lessons.map(l=>c.jsx(is,{lesson:l,isExpanded:t.includes(l.id),onToggle:n,onLearnAction:s},l.id))})]}):c.jsx("div",{className:"content-accordion content-accordion--empty",children:o||c.jsx("div",{className:"content-accordion__empty",children:"暂无学习内容"})}),as=e=>{switch(e){case"completed":return"success";case"in-progress":return"primary";case"not-started":default:return"default"}},Nt=({data:e,loading:t=!1,error:n=null,collapsed:s=!1,onToggleCollapse:r,activeUnitId:i=null,onUnitSelect:o,renderUnitItem:l,className:m="",unitItemClassName:f="",style:u={},unitItemStyle:h={}})=>{const x=(g,E)=>{E.preventDefault(),o?.(g)},O=()=>{r?.()},p=g=>c.jsxs("div",{className:`sidebar__unit-item ${f} ${i===g.unitId?"sidebar__unit-item--active":""} ${g.status?`sidebar__unit-item--${g.status}`:""}`,style:h,onClick:E=>x(g.unitId,E),role:"button",tabIndex:0,"aria-label":`${g.title},进度 ${g.progressPercentage}%`,children:[c.jsxs("div",{className:"sidebar__unit-item__content",children:[g.icon&&c.jsx("span",{className:"sidebar__unit-item__icon",children:g.icon}),!s&&c.jsx("span",{className:"sidebar__unit-item__title",children:g.title})]}),!s&&g.progressPercentage!==void 0&&c.jsxs("div",{className:"sidebar__unit-item__progress",children:[c.jsx(ye.Progress,{value:g.progressPercentage,size:"sm",color:as(g.status),"aria-label":`${g.title} 进度`}),c.jsxs("span",{className:"progress-percentage",children:[g.progressPercentage,"%"]})]})]},g.unitId),y=()=>t?c.jsx("div",{className:"sidebar__loading",children:"加载中..."}):n?c.jsxs("div",{className:"sidebar__error",children:["加载失败: ",n.message]}):e?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"sidebar__header",children:[c.jsx("button",{className:"sidebar__toggle-btn",onClick:O,"aria-label":"切换侧边栏折叠状态",children:s?"→":"←"}),!s&&c.jsxs("div",{className:"sidebar__course-info",children:[c.jsx("h3",{className:"sidebar__course-title",children:e.courseTitle}),c.jsxs("span",{className:"sidebar__course-level",children:[e.courseLevel,"年级"]})]})]}),c.jsx("nav",{className:"sidebar__content",children:c.jsx("ul",{className:"sidebar__unit-list",children:e.units&&e.units.length>0?e.units.map(g=>c.jsx("li",{children:l?l(g,g):p(g)},g.unitId)):c.jsx("div",{className:"sidebar__empty",children:"暂无单元数据"})})})]}):c.jsx("div",{className:"sidebar__empty",children:"暂无课程数据"});return c.jsx("aside",{className:`sidebar ${m} ${s?"sidebar--collapsed":""} ${t?"sidebar--loading":""} ${n?"sidebar--error":""}`,style:u,"aria-label":"课程导航侧边栏",role:"complementary",children:y()})},Xe=({trigger:e,items:t,position:n="bottom",alignment:s="start",openDelay:r=300,closeDelay:i=100,onOpen:o,onClose:l,renderItem:m,itemConfig:f={},className:u,menuClassName:h,itemClassName:x})=>{const[O,p]=R.useState(!1),y=R.useRef(null),g=R.useRef(null),E=()=>{y.current&&clearTimeout(y.current),g.current&&clearTimeout(g.current)},k=()=>{E(),y.current=setTimeout(()=>{p(!0),o?.()},r)},N=()=>{E(),g.current=setTimeout(()=>{p(!1),l?.()},i)},P=w=>{!w.disabled&&w.onClick&&w.onClick(w)};R.useEffect(()=>()=>E(),[]);const A=w=>c.jsxs("div",{className:`submenu-item ${w.disabled?"is-disabled":""} ${x||""}`,onClick:()=>P(w),children:[w.icon&&c.jsx("span",{className:"submenu-item-icon",children:w.icon}),c.jsx("span",{children:w.label})]},w.id),I=()=>{const w=["submenu-panel"];return h&&w.push(h),w.push(`position-${n}`),s!=="start"&&w.push(`alignment-${s}`),O&&w.push("is-open"),w.join(" ")};return c.jsxs("div",{className:`submenu-container ${u||""}`,onMouseEnter:k,onMouseLeave:N,children:[c.jsx("div",{className:"submenu-trigger",children:e}),c.jsx("div",{className:I(),children:t.map(w=>m?m(w,f):A(w))})]})};function jt(e,t){return function(){return e.apply(t,arguments)}}const{toString:ls}=Object.prototype,{getPrototypeOf:Ze}=Object,{iterator:Ue,toStringTag:Ot}=Symbol,Te=(e=>t=>{const n=ls.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ee=e=>(e=e.toLowerCase(),t=>Te(t)===e),Pe=e=>t=>typeof t===e,{isArray:fe}=Array,me=Pe("undefined");function ve(e){return e!==null&&!me(e)&&e.constructor!==null&&!me(e.constructor)&&K(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ut=ee("ArrayBuffer");function cs(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ut(e.buffer),t}const us=Pe("string"),K=Pe("function"),Tt=Pe("number"),Ee=e=>e!==null&&typeof e=="object",ds=e=>e===!0||e===!1,Ie=e=>{if(Te(e)!=="object")return!1;const t=Ze(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Ot in e)&&!(Ue in e)},fs=e=>{if(!Ee(e)||ve(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},ms=ee("Date"),ps=ee("File"),hs=ee("Blob"),gs=ee("FileList"),_s=e=>Ee(e)&&K(e.pipe),bs=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||K(e.append)&&((t=Te(e))==="formdata"||t==="object"&&K(e.toString)&&e.toString()==="[object FormData]"))},ys=ee("URLSearchParams"),[xs,ws,vs,Es]=["ReadableStream","Request","Response","Headers"].map(ee),Ss=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Se(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let s,r;if(typeof e!="object"&&(e=[e]),fe(e))for(s=0,r=e.length;s<r;s++)t.call(null,e[s],s,e);else{if(ve(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let l;for(s=0;s<o;s++)l=i[s],t.call(null,e[l],l,e)}}function Pt(e,t){if(ve(e))return null;t=t.toLowerCase();const n=Object.keys(e);let s=n.length,r;for(;s-- >0;)if(r=n[s],t===r.toLowerCase())return r;return null}const le=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,It=e=>!me(e)&&e!==le;function Qe(){const{caseless:e,skipUndefined:t}=It(this)&&this||{},n={},s=(r,i)=>{const o=e&&Pt(n,i)||i;Ie(n[o])&&Ie(r)?n[o]=Qe(n[o],r):Ie(r)?n[o]=Qe({},r):fe(r)?n[o]=r.slice():(!t||!me(r))&&(n[o]=r)};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Se(arguments[r],s);return n}const As=(e,t,n,{allOwnKeys:s}={})=>(Se(t,(r,i)=>{n&&K(r)?e[i]=jt(r,n):e[i]=r},{allOwnKeys:s}),e),Cs=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Rs=(e,t,n,s)=>{e.prototype=Object.create(t.prototype,s),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},ks=(e,t,n,s)=>{let r,i,o;const l={};if(t=t||{},e==null)return t;do{for(r=Object.getOwnPropertyNames(e),i=r.length;i-- >0;)o=r[i],(!s||s(o,e,t))&&!l[o]&&(t[o]=e[o],l[o]=!0);e=n!==!1&&Ze(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Ns=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const s=e.indexOf(t,n);return s!==-1&&s===n},js=e=>{if(!e)return null;if(fe(e))return e;let t=e.length;if(!Tt(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Os=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ze(Uint8Array)),Us=(e,t)=>{const s=(e&&e[Ue]).call(e);let r;for(;(r=s.next())&&!r.done;){const i=r.value;t.call(e,i[0],i[1])}},Ts=(e,t)=>{let n;const s=[];for(;(n=e.exec(t))!==null;)s.push(n);return s},Ps=ee("HTMLFormElement"),Is=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,r){return s.toUpperCase()+r}),Lt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ls=ee("RegExp"),Dt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),s={};Se(n,(r,i)=>{let o;(o=t(r,i,e))!==!1&&(s[i]=o||r)}),Object.defineProperties(e,s)},Ds=e=>{Dt(e,(t,n)=>{if(K(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const s=e[n];if(K(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Ms=(e,t)=>{const n={},s=r=>{r.forEach(i=>{n[i]=!0})};return fe(e)?s(e):s(String(e).split(t)),n},Fs=()=>{},$s=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Bs(e){return!!(e&&K(e.append)&&e[Ot]==="FormData"&&e[Ue])}const qs=e=>{const t=new Array(10),n=(s,r)=>{if(Ee(s)){if(t.indexOf(s)>=0)return;if(ve(s))return s;if(!("toJSON"in s)){t[r]=s;const i=fe(s)?[]:{};return Se(s,(o,l)=>{const m=n(o,r+1);!me(m)&&(i[l]=m)}),t[r]=void 0,i}}return s};return n(e,0)},Hs=ee("AsyncFunction"),Ws=e=>e&&(Ee(e)||K(e))&&K(e.then)&&K(e.catch),Mt=((e,t)=>e?setImmediate:t?((n,s)=>(le.addEventListener("message",({source:r,data:i})=>{r===le&&i===n&&s.length&&s.shift()()},!1),r=>{s.push(r),le.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",K(le.postMessage)),zs=typeof queueMicrotask<"u"?queueMicrotask.bind(le):typeof process<"u"&&process.nextTick||Mt,d={isArray:fe,isArrayBuffer:Ut,isBuffer:ve,isFormData:bs,isArrayBufferView:cs,isString:us,isNumber:Tt,isBoolean:ds,isObject:Ee,isPlainObject:Ie,isEmptyObject:fs,isReadableStream:xs,isRequest:ws,isResponse:vs,isHeaders:Es,isUndefined:me,isDate:ms,isFile:ps,isBlob:hs,isRegExp:Ls,isFunction:K,isStream:_s,isURLSearchParams:ys,isTypedArray:Os,isFileList:gs,forEach:Se,merge:Qe,extend:As,trim:Ss,stripBOM:Cs,inherits:Rs,toFlatObject:ks,kindOf:Te,kindOfTest:ee,endsWith:Ns,toArray:js,forEachEntry:Us,matchAll:Ts,isHTMLForm:Ps,hasOwnProperty:Lt,hasOwnProp:Lt,reduceDescriptors:Dt,freezeMethods:Ds,toObjectSet:Ms,toCamelCase:Is,noop:Fs,toFiniteNumber:$s,findKey:Pt,global:le,isContextDefined:It,isSpecCompliantForm:Bs,toJSONObject:qs,isAsyncFn:Hs,isThenable:Ws,setImmediate:Mt,asap:zs,isIterable:e=>e!=null&&K(e[Ue])};function C(e,t,n,s,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),s&&(this.request=s),r&&(this.response=r,this.status=r.status?r.status:null)}d.inherits(C,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:d.toJSONObject(this.config),code:this.code,status:this.status}}});const Ft=C.prototype,$t={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{$t[e]={value:e}}),Object.defineProperties(C,$t),Object.defineProperty(Ft,"isAxiosError",{value:!0}),C.from=(e,t,n,s,r,i)=>{const o=Object.create(Ft);d.toFlatObject(e,o,function(u){return u!==Error.prototype},f=>f!=="isAxiosError");const l=e&&e.message?e.message:"Error",m=t==null&&e?e.code:t;return C.call(o,l,m,n,s,r),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",i&&Object.assign(o,i),o};const Js=null;function et(e){return d.isPlainObject(e)||d.isArray(e)}function Bt(e){return d.endsWith(e,"[]")?e.slice(0,-2):e}function qt(e,t,n){return e?e.concat(t).map(function(r,i){return r=Bt(r),!n&&i?"["+r+"]":r}).join(n?".":""):t}function Gs(e){return d.isArray(e)&&!e.some(et)}const Vs=d.toFlatObject(d,{},null,function(t){return/^is[A-Z]/.test(t)});function Le(e,t,n){if(!d.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=d.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,g){return!d.isUndefined(g[y])});const s=n.metaTokens,r=n.visitor||u,i=n.dots,o=n.indexes,m=(n.Blob||typeof Blob<"u"&&Blob)&&d.isSpecCompliantForm(t);if(!d.isFunction(r))throw new TypeError("visitor must be a function");function f(p){if(p===null)return"";if(d.isDate(p))return p.toISOString();if(d.isBoolean(p))return p.toString();if(!m&&d.isBlob(p))throw new C("Blob is not supported. Use a Buffer instead.");return d.isArrayBuffer(p)||d.isTypedArray(p)?m&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,y,g){let E=p;if(p&&!g&&typeof p=="object"){if(d.endsWith(y,"{}"))y=s?y:y.slice(0,-2),p=JSON.stringify(p);else if(d.isArray(p)&&Gs(p)||(d.isFileList(p)||d.endsWith(y,"[]"))&&(E=d.toArray(p)))return y=Bt(y),E.forEach(function(N,P){!(d.isUndefined(N)||N===null)&&t.append(o===!0?qt([y],P,i):o===null?y:y+"[]",f(N))}),!1}return et(p)?!0:(t.append(qt(g,y,i),f(p)),!1)}const h=[],x=Object.assign(Vs,{defaultVisitor:u,convertValue:f,isVisitable:et});function O(p,y){if(!d.isUndefined(p)){if(h.indexOf(p)!==-1)throw Error("Circular reference detected in "+y.join("."));h.push(p),d.forEach(p,function(E,k){(!(d.isUndefined(E)||E===null)&&r.call(t,E,d.isString(k)?k.trim():k,y,x))===!0&&O(E,y?y.concat(k):[k])}),h.pop()}}if(!d.isObject(e))throw new TypeError("data must be an object");return O(e),t}function Ht(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function tt(e,t){this._pairs=[],e&&Le(e,this,t)}const Wt=tt.prototype;Wt.append=function(t,n){this._pairs.push([t,n])},Wt.toString=function(t){const n=t?function(s){return t.call(this,s,Ht)}:Ht;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function Ks(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function zt(e,t,n){if(!t)return e;const s=n&&n.encode||Ks;d.isFunction(n)&&(n={serialize:n});const r=n&&n.serialize;let i;if(r?i=r(t,n):i=d.isURLSearchParams(t)?t.toString():new tt(t,n).toString(s),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Jt{constructor(){this.handlers=[]}use(t,n,s){return this.handlers.push({fulfilled:t,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){d.forEach(this.handlers,function(s){s!==null&&t(s)})}}const Gt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ys={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:tt,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},nt=typeof window<"u"&&typeof document<"u",st=typeof navigator=="object"&&navigator||void 0,Xs=nt&&(!st||["ReactNative","NativeScript","NS"].indexOf(st.product)<0),Zs=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Qs=nt&&window.location.href||"http://localhost",W={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:nt,hasStandardBrowserEnv:Xs,hasStandardBrowserWebWorkerEnv:Zs,navigator:st,origin:Qs},Symbol.toStringTag,{value:"Module"})),...Ys};function er(e,t){return Le(e,new W.classes.URLSearchParams,{visitor:function(n,s,r,i){return W.isNode&&d.isBuffer(n)?(this.append(s,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function tr(e){return d.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function nr(e){const t={},n=Object.keys(e);let s;const r=n.length;let i;for(s=0;s<r;s++)i=n[s],t[i]=e[i];return t}function Vt(e){function t(n,s,r,i){let o=n[i++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),m=i>=n.length;return o=!o&&d.isArray(r)?r.length:o,m?(d.hasOwnProp(r,o)?r[o]=[r[o],s]:r[o]=s,!l):((!r[o]||!d.isObject(r[o]))&&(r[o]=[]),t(n,s,r[o],i)&&d.isArray(r[o])&&(r[o]=nr(r[o])),!l)}if(d.isFormData(e)&&d.isFunction(e.entries)){const n={};return d.forEachEntry(e,(s,r)=>{t(tr(s),r,n,0)}),n}return null}function sr(e,t,n){if(d.isString(e))try{return(t||JSON.parse)(e),d.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(e)}const Ae={transitional:Gt,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const s=n.getContentType()||"",r=s.indexOf("application/json")>-1,i=d.isObject(t);if(i&&d.isHTMLForm(t)&&(t=new FormData(t)),d.isFormData(t))return r?JSON.stringify(Vt(t)):t;if(d.isArrayBuffer(t)||d.isBuffer(t)||d.isStream(t)||d.isFile(t)||d.isBlob(t)||d.isReadableStream(t))return t;if(d.isArrayBufferView(t))return t.buffer;if(d.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(i){if(s.indexOf("application/x-www-form-urlencoded")>-1)return er(t,this.formSerializer).toString();if((l=d.isFileList(t))||s.indexOf("multipart/form-data")>-1){const m=this.env&&this.env.FormData;return Le(l?{"files[]":t}:t,m&&new m,this.formSerializer)}}return i||r?(n.setContentType("application/json",!1),sr(t)):t}],transformResponse:[function(t){const n=this.transitional||Ae.transitional,s=n&&n.forcedJSONParsing,r=this.responseType==="json";if(d.isResponse(t)||d.isReadableStream(t))return t;if(t&&d.isString(t)&&(s&&!this.responseType||r)){const o=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(t,this.parseReviver)}catch(l){if(o)throw l.name==="SyntaxError"?C.from(l,C.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:W.classes.FormData,Blob:W.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};d.forEach(["delete","get","head","post","put","patch"],e=>{Ae.headers[e]={}});const rr=d.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),or=e=>{const t={};let n,s,r;return e&&e.split(`
66
+ `).forEach(function(o){r=o.indexOf(":"),n=o.substring(0,r).trim().toLowerCase(),s=o.substring(r+1).trim(),!(!n||t[n]&&rr[n])&&(n==="set-cookie"?t[n]?t[n].push(s):t[n]=[s]:t[n]=t[n]?t[n]+", "+s:s)}),t},Kt=Symbol("internals");function Ce(e){return e&&String(e).trim().toLowerCase()}function De(e){return e===!1||e==null?e:d.isArray(e)?e.map(De):String(e)}function ir(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(e);)t[s[1]]=s[2];return t}const ar=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function rt(e,t,n,s,r){if(d.isFunction(s))return s.call(this,t,n);if(r&&(t=n),!!d.isString(t)){if(d.isString(s))return t.indexOf(s)!==-1;if(d.isRegExp(s))return s.test(t)}}function lr(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,s)=>n.toUpperCase()+s)}function cr(e,t){const n=d.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+n,{value:function(r,i,o){return this[s].call(this,t,r,i,o)},configurable:!0})})}let Y=class{constructor(t){t&&this.set(t)}set(t,n,s){const r=this;function i(l,m,f){const u=Ce(m);if(!u)throw new Error("header name must be a non-empty string");const h=d.findKey(r,u);(!h||r[h]===void 0||f===!0||f===void 0&&r[h]!==!1)&&(r[h||m]=De(l))}const o=(l,m)=>d.forEach(l,(f,u)=>i(f,u,m));if(d.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(d.isString(t)&&(t=t.trim())&&!ar(t))o(or(t),n);else if(d.isObject(t)&&d.isIterable(t)){let l={},m,f;for(const u of t){if(!d.isArray(u))throw TypeError("Object iterator must return a key-value pair");l[f=u[0]]=(m=l[f])?d.isArray(m)?[...m,u[1]]:[m,u[1]]:u[1]}o(l,n)}else t!=null&&i(n,t,s);return this}get(t,n){if(t=Ce(t),t){const s=d.findKey(this,t);if(s){const r=this[s];if(!n)return r;if(n===!0)return ir(r);if(d.isFunction(n))return n.call(this,r,s);if(d.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ce(t),t){const s=d.findKey(this,t);return!!(s&&this[s]!==void 0&&(!n||rt(this,this[s],s,n)))}return!1}delete(t,n){const s=this;let r=!1;function i(o){if(o=Ce(o),o){const l=d.findKey(s,o);l&&(!n||rt(s,s[l],l,n))&&(delete s[l],r=!0)}}return d.isArray(t)?t.forEach(i):i(t),r}clear(t){const n=Object.keys(this);let s=n.length,r=!1;for(;s--;){const i=n[s];(!t||rt(this,this[i],i,t,!0))&&(delete this[i],r=!0)}return r}normalize(t){const n=this,s={};return d.forEach(this,(r,i)=>{const o=d.findKey(s,i);if(o){n[o]=De(r),delete n[i];return}const l=t?lr(i):String(i).trim();l!==i&&delete n[i],n[l]=De(r),s[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return d.forEach(this,(s,r)=>{s!=null&&s!==!1&&(n[r]=t&&d.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
67
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const s=new this(t);return n.forEach(r=>s.set(r)),s}static accessor(t){const s=(this[Kt]=this[Kt]={accessors:{}}).accessors,r=this.prototype;function i(o){const l=Ce(o);s[l]||(cr(r,o),s[l]=!0)}return d.isArray(t)?t.forEach(i):i(t),this}};Y.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),d.reduceDescriptors(Y.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[n]=s}}}),d.freezeMethods(Y);function ot(e,t){const n=this||Ae,s=t||n,r=Y.from(s.headers);let i=s.data;return d.forEach(e,function(l){i=l.call(n,i,r.normalize(),t?t.status:void 0)}),r.normalize(),i}function Yt(e){return!!(e&&e.__CANCEL__)}function pe(e,t,n){C.call(this,e??"canceled",C.ERR_CANCELED,t,n),this.name="CanceledError"}d.inherits(pe,C,{__CANCEL__:!0});function Xt(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new C("Request failed with status code "+n.status,[C.ERR_BAD_REQUEST,C.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function ur(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function dr(e,t){e=e||10;const n=new Array(e),s=new Array(e);let r=0,i=0,o;return t=t!==void 0?t:1e3,function(m){const f=Date.now(),u=s[i];o||(o=f),n[r]=m,s[r]=f;let h=i,x=0;for(;h!==r;)x+=n[h++],h=h%e;if(r=(r+1)%e,r===i&&(i=(i+1)%e),f-o<t)return;const O=u&&f-u;return O?Math.round(x*1e3/O):void 0}}function fr(e,t){let n=0,s=1e3/t,r,i;const o=(f,u=Date.now())=>{n=u,r=null,i&&(clearTimeout(i),i=null),e(...f)};return[(...f)=>{const u=Date.now(),h=u-n;h>=s?o(f,u):(r=f,i||(i=setTimeout(()=>{i=null,o(r)},s-h)))},()=>r&&o(r)]}const Me=(e,t,n=3)=>{let s=0;const r=dr(50,250);return fr(i=>{const o=i.loaded,l=i.lengthComputable?i.total:void 0,m=o-s,f=r(m),u=o<=l;s=o;const h={loaded:o,total:l,progress:l?o/l:void 0,bytes:m,rate:f||void 0,estimated:f&&l&&u?(l-o)/f:void 0,event:i,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(h)},n)},Zt=(e,t)=>{const n=e!=null;return[s=>t[0]({lengthComputable:n,total:e,loaded:s}),t[1]]},Qt=e=>(...t)=>d.asap(()=>e(...t)),mr=W.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,W.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(W.origin),W.navigator&&/(msie|trident)/i.test(W.navigator.userAgent)):()=>!0,pr=W.hasStandardBrowserEnv?{write(e,t,n,s,r,i){const o=[e+"="+encodeURIComponent(t)];d.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),d.isString(s)&&o.push("path="+s),d.isString(r)&&o.push("domain="+r),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function hr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function gr(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function en(e,t,n){let s=!hr(t);return e&&(s||n==!1)?gr(e,t):t}const tn=e=>e instanceof Y?{...e}:e;function ce(e,t){t=t||{};const n={};function s(f,u,h,x){return d.isPlainObject(f)&&d.isPlainObject(u)?d.merge.call({caseless:x},f,u):d.isPlainObject(u)?d.merge({},u):d.isArray(u)?u.slice():u}function r(f,u,h,x){if(d.isUndefined(u)){if(!d.isUndefined(f))return s(void 0,f,h,x)}else return s(f,u,h,x)}function i(f,u){if(!d.isUndefined(u))return s(void 0,u)}function o(f,u){if(d.isUndefined(u)){if(!d.isUndefined(f))return s(void 0,f)}else return s(void 0,u)}function l(f,u,h){if(h in t)return s(f,u);if(h in e)return s(void 0,f)}const m={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:(f,u,h)=>r(tn(f),tn(u),h,!0)};return d.forEach(Object.keys({...e,...t}),function(u){const h=m[u]||r,x=h(e[u],t[u],u);d.isUndefined(x)&&h!==l||(n[u]=x)}),n}const nn=e=>{const t=ce({},e);let{data:n,withXSRFToken:s,xsrfHeaderName:r,xsrfCookieName:i,headers:o,auth:l}=t;if(t.headers=o=Y.from(o),t.url=zt(en(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),d.isFormData(n)){if(W.hasStandardBrowserEnv||W.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(d.isFunction(n.getHeaders)){const m=n.getHeaders(),f=["content-type","content-length"];Object.entries(m).forEach(([u,h])=>{f.includes(u.toLowerCase())&&o.set(u,h)})}}if(W.hasStandardBrowserEnv&&(s&&d.isFunction(s)&&(s=s(t)),s||s!==!1&&mr(t.url))){const m=r&&i&&pr.read(i);m&&o.set(r,m)}return t},_r=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,s){const r=nn(e);let i=r.data;const o=Y.from(r.headers).normalize();let{responseType:l,onUploadProgress:m,onDownloadProgress:f}=r,u,h,x,O,p;function y(){O&&O(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(u),r.signal&&r.signal.removeEventListener("abort",u)}let g=new XMLHttpRequest;g.open(r.method.toUpperCase(),r.url,!0),g.timeout=r.timeout;function E(){if(!g)return;const N=Y.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),A={data:!l||l==="text"||l==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:N,config:e,request:g};Xt(function(w){n(w),y()},function(w){s(w),y()},A),g=null}"onloadend"in g?g.onloadend=E:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(E)},g.onabort=function(){g&&(s(new C("Request aborted",C.ECONNABORTED,e,g)),g=null)},g.onerror=function(P){const A=P&&P.message?P.message:"Network Error",I=new C(A,C.ERR_NETWORK,e,g);I.event=P||null,s(I),g=null},g.ontimeout=function(){let P=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const A=r.transitional||Gt;r.timeoutErrorMessage&&(P=r.timeoutErrorMessage),s(new C(P,A.clarifyTimeoutError?C.ETIMEDOUT:C.ECONNABORTED,e,g)),g=null},i===void 0&&o.setContentType(null),"setRequestHeader"in g&&d.forEach(o.toJSON(),function(P,A){g.setRequestHeader(A,P)}),d.isUndefined(r.withCredentials)||(g.withCredentials=!!r.withCredentials),l&&l!=="json"&&(g.responseType=r.responseType),f&&([x,p]=Me(f,!0),g.addEventListener("progress",x)),m&&g.upload&&([h,O]=Me(m),g.upload.addEventListener("progress",h),g.upload.addEventListener("loadend",O)),(r.cancelToken||r.signal)&&(u=N=>{g&&(s(!N||N.type?new pe(null,e,g):N),g.abort(),g=null)},r.cancelToken&&r.cancelToken.subscribe(u),r.signal&&(r.signal.aborted?u():r.signal.addEventListener("abort",u)));const k=ur(r.url);if(k&&W.protocols.indexOf(k)===-1){s(new C("Unsupported protocol "+k+":",C.ERR_BAD_REQUEST,e));return}g.send(i||null)})},br=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let s=new AbortController,r;const i=function(f){if(!r){r=!0,l();const u=f instanceof Error?f:this.reason;s.abort(u instanceof C?u:new pe(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,i(new C(`timeout ${t} of ms exceeded`,C.ETIMEDOUT))},t);const l=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(i):f.removeEventListener("abort",i)}),e=null)};e.forEach(f=>f.addEventListener("abort",i));const{signal:m}=s;return m.unsubscribe=()=>d.asap(l),m}},yr=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let s=0,r;for(;s<n;)r=s+t,yield e.slice(s,r),s=r},xr=async function*(e,t){for await(const n of wr(e))yield*yr(n,t)},wr=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:s}=await t.read();if(n)break;yield s}}finally{await t.cancel()}},sn=(e,t,n,s)=>{const r=xr(e,t);let i=0,o,l=m=>{o||(o=!0,s&&s(m))};return new ReadableStream({async pull(m){try{const{done:f,value:u}=await r.next();if(f){l(),m.close();return}let h=u.byteLength;if(n){let x=i+=h;n(x)}m.enqueue(new Uint8Array(u))}catch(f){throw l(f),f}},cancel(m){return l(m),r.return()}},{highWaterMark:2})},rn=64*1024,{isFunction:Fe}=d,vr=(({Request:e,Response:t})=>({Request:e,Response:t}))(d.global),{ReadableStream:on,TextEncoder:an}=d.global,ln=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Er=e=>{e=d.merge.call({skipUndefined:!0},vr,e);const{fetch:t,Request:n,Response:s}=e,r=t?Fe(t):typeof fetch=="function",i=Fe(n),o=Fe(s);if(!r)return!1;const l=r&&Fe(on),m=r&&(typeof an=="function"?(p=>y=>p.encode(y))(new an):async p=>new Uint8Array(await new n(p).arrayBuffer())),f=i&&l&&ln(()=>{let p=!1;const y=new n(W.origin,{body:new on,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!y}),u=o&&l&&ln(()=>d.isReadableStream(new s("").body)),h={stream:u&&(p=>p.body)};r&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!h[p]&&(h[p]=(y,g)=>{let E=y&&y[p];if(E)return E.call(y);throw new C(`Response type '${p}' is not supported`,C.ERR_NOT_SUPPORT,g)})});const x=async p=>{if(p==null)return 0;if(d.isBlob(p))return p.size;if(d.isSpecCompliantForm(p))return(await new n(W.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(d.isArrayBufferView(p)||d.isArrayBuffer(p))return p.byteLength;if(d.isURLSearchParams(p)&&(p=p+""),d.isString(p))return(await m(p)).byteLength},O=async(p,y)=>{const g=d.toFiniteNumber(p.getContentLength());return g??x(y)};return async p=>{let{url:y,method:g,data:E,signal:k,cancelToken:N,timeout:P,onDownloadProgress:A,onUploadProgress:I,responseType:w,headers:F,withCredentials:q="same-origin",fetchOptions:ne}=nn(p),z=t||fetch;w=w?(w+"").toLowerCase():"text";let D=br([k,N&&N.toAbortSignal()],P),J=null;const G=D&&D.unsubscribe&&(()=>{D.unsubscribe()});let ae;try{if(I&&f&&g!=="get"&&g!=="head"&&(ae=await O(F,E))!==0){let re=new n(y,{method:"POST",body:E,duplex:"half"}),ie;if(d.isFormData(E)&&(ie=re.headers.get("content-type"))&&F.setContentType(ie),re.body){const[he,ge]=Zt(ae,Me(Qt(I)));E=sn(re.body,rn,he,ge)}}d.isString(q)||(q=q?"include":"omit");const Z=i&&"credentials"in n.prototype,ke={...ne,signal:D,method:g.toUpperCase(),headers:F.normalize().toJSON(),body:E,duplex:"half",credentials:Z?q:void 0};J=i&&new n(y,ke);let se=await(i?z(J,ne):z(y,ke));const Ne=u&&(w==="stream"||w==="response");if(u&&(A||Ne&&G)){const re={};["status","statusText","headers"].forEach(We=>{re[We]=se[We]});const ie=d.toFiniteNumber(se.headers.get("content-length")),[he,ge]=A&&Zt(ie,Me(Qt(A),!0))||[];se=new s(sn(se.body,rn,he,()=>{ge&&ge(),G&&G()}),re)}w=w||"text";let He=await h[d.findKey(h,w)||"text"](se,p);return!Ne&&G&&G(),await new Promise((re,ie)=>{Xt(re,ie,{data:He,headers:Y.from(se.headers),status:se.status,statusText:se.statusText,config:p,request:J})})}catch(Z){throw G&&G(),Z&&Z.name==="TypeError"&&/Load failed|fetch/i.test(Z.message)?Object.assign(new C("Network Error",C.ERR_NETWORK,p,J),{cause:Z.cause||Z}):C.from(Z,Z&&Z.code,p,J)}}},Sr=new Map,cn=e=>{let t=e?e.env:{};const{fetch:n,Request:s,Response:r}=t,i=[s,r,n];let o=i.length,l=o,m,f,u=Sr;for(;l--;)m=i[l],f=u.get(m),f===void 0&&u.set(m,f=l?new Map:Er(t)),u=f;return f};cn();const it={http:Js,xhr:_r,fetch:{get:cn}};d.forEach(it,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const un=e=>`- ${e}`,Ar=e=>d.isFunction(e)||e===null||e===!1,dn={getAdapter:(e,t)=>{e=d.isArray(e)?e:[e];const{length:n}=e;let s,r;const i={};for(let o=0;o<n;o++){s=e[o];let l;if(r=s,!Ar(s)&&(r=it[(l=String(s)).toLowerCase()],r===void 0))throw new C(`Unknown adapter '${l}'`);if(r&&(d.isFunction(r)||(r=r.get(t))))break;i[l||"#"+o]=r}if(!r){const o=Object.entries(i).map(([m,f])=>`adapter ${m} `+(f===!1?"is not supported by the environment":"is not available in the build"));let l=n?o.length>1?`since :
68
+ `+o.map(un).join(`
69
+ `):" "+un(o[0]):"as no adapter specified";throw new C("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return r},adapters:it};function at(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new pe(null,e)}function fn(e){return at(e),e.headers=Y.from(e.headers),e.data=ot.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),dn.getAdapter(e.adapter||Ae.adapter,e)(e).then(function(s){return at(e),s.data=ot.call(e,e.transformResponse,s),s.headers=Y.from(s.headers),s},function(s){return Yt(s)||(at(e),s&&s.response&&(s.response.data=ot.call(e,e.transformResponse,s.response),s.response.headers=Y.from(s.response.headers))),Promise.reject(s)})}const mn="1.12.2",$e={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{$e[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const pn={};$e.transitional=function(t,n,s){function r(i,o){return"[Axios v"+mn+"] Transitional option '"+i+"'"+o+(s?". "+s:"")}return(i,o,l)=>{if(t===!1)throw new C(r(o," has been removed"+(n?" in "+n:"")),C.ERR_DEPRECATED);return n&&!pn[o]&&(pn[o]=!0,console.warn(r(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,l):!0}},$e.spelling=function(t){return(n,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function Cr(e,t,n){if(typeof e!="object")throw new C("options must be an object",C.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let r=s.length;for(;r-- >0;){const i=s[r],o=t[i];if(o){const l=e[i],m=l===void 0||o(l,i,e);if(m!==!0)throw new C("option "+i+" must be "+m,C.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new C("Unknown option "+i,C.ERR_BAD_OPTION)}}const Be={assertOptions:Cr,validators:$e},oe=Be.validators;let ue=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Jt,response:new Jt}}async request(t,n){try{return await this._request(t,n)}catch(s){if(s instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const i=r.stack?r.stack.replace(/^.+\n/,""):"";try{s.stack?i&&!String(s.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(s.stack+=`
70
+ `+i):s.stack=i}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ce(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:i}=n;s!==void 0&&Be.assertOptions(s,{silentJSONParsing:oe.transitional(oe.boolean),forcedJSONParsing:oe.transitional(oe.boolean),clarifyTimeoutError:oe.transitional(oe.boolean)},!1),r!=null&&(d.isFunction(r)?n.paramsSerializer={serialize:r}:Be.assertOptions(r,{encode:oe.function,serialize:oe.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Be.assertOptions(n,{baseUrl:oe.spelling("baseURL"),withXsrfToken:oe.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&d.merge(i.common,i[n.method]);i&&d.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),n.headers=Y.concat(o,i);const l=[];let m=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(m=m&&y.synchronous,l.unshift(y.fulfilled,y.rejected))});const f=[];this.interceptors.response.forEach(function(y){f.push(y.fulfilled,y.rejected)});let u,h=0,x;if(!m){const p=[fn.bind(this),void 0];for(p.unshift(...l),p.push(...f),x=p.length,u=Promise.resolve(n);h<x;)u=u.then(p[h++],p[h++]);return u}x=l.length;let O=n;for(;h<x;){const p=l[h++],y=l[h++];try{O=p(O)}catch(g){y.call(this,g);break}}try{u=fn.call(this,O)}catch(p){return Promise.reject(p)}for(h=0,x=f.length;h<x;)u=u.then(f[h++],f[h++]);return u}getUri(t){t=ce(this.defaults,t);const n=en(t.baseURL,t.url,t.allowAbsoluteUrls);return zt(n,t.params,t.paramsSerializer)}};d.forEach(["delete","get","head","options"],function(t){ue.prototype[t]=function(n,s){return this.request(ce(s||{},{method:t,url:n,data:(s||{}).data}))}}),d.forEach(["post","put","patch"],function(t){function n(s){return function(i,o,l){return this.request(ce(l||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}ue.prototype[t]=n(),ue.prototype[t+"Form"]=n(!0)});let Rr=class zn{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const s=this;this.promise.then(r=>{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](r);s._listeners=null}),this.promise.then=r=>{let i;const o=new Promise(l=>{s.subscribe(l),i=l}).then(r);return o.cancel=function(){s.unsubscribe(i)},o},t(function(i,o,l){s.reason||(s.reason=new pe(i,o,l),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new zn(function(r){t=r}),cancel:t}}};function kr(e){return function(n){return e.apply(null,n)}}function Nr(e){return d.isObject(e)&&e.isAxiosError===!0}const lt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(lt).forEach(([e,t])=>{lt[t]=e});function hn(e){const t=new ue(e),n=jt(ue.prototype.request,t);return d.extend(n,ue.prototype,t,{allOwnKeys:!0}),d.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return hn(ce(e,r))},n}const M=hn(Ae);M.Axios=ue,M.CanceledError=pe,M.CancelToken=Rr,M.isCancel=Yt,M.VERSION=mn,M.toFormData=Le,M.AxiosError=C,M.Cancel=M.CanceledError,M.all=function(t){return Promise.all(t)},M.spread=kr,M.isAxiosError=Nr,M.mergeConfig=ce,M.AxiosHeaders=Y,M.formToJSON=e=>Vt(d.isHTMLForm(e)?new FormData(e):e),M.getAdapter=dn.getAdapter,M.HttpStatusCode=lt,M.default=M;const{Axios:Ko,AxiosError:Yo,CanceledError:Xo,isCancel:Zo,CancelToken:Qo,VERSION:ei,all:ti,Cancel:ni,isAxiosError:si,spread:ri,toFormData:oi,AxiosHeaders:ii,HttpStatusCode:ai,formToJSON:li,getAdapter:ci,mergeConfig:ui}=M,jr=()=>c.jsx("span",{style:{marginRight:8,fontSize:"1.2em"},children:"👤"}),Or=()=>c.jsx("span",{style:{marginRight:8,fontSize:"1.2em"},children:"⚙️"}),Ur=()=>c.jsx("span",{style:{marginRight:8,fontSize:"1.2em"},children:"❓"}),Tr=()=>c.jsx("span",{style:{marginRight:8,fontSize:"1.2em"},children:"🚪"}),Pr=[{id:"profile",label:"个人主页",icon:c.jsx(jr,{})},{id:"settings",label:"设置",icon:c.jsx(Or,{})},{id:"help",label:"帮助",icon:c.jsx(Ur,{})},{id:"logout",label:"退出",icon:c.jsx(Tr,{})}],gn=({userId:e,userName:t,userAvatar:n,apiConfig:s,menuItems:r=Pr,avatarSize:i="md",isLoading:o=!1,error:l=null,avatarClassName:m,userNameClassName:f,containerClassName:u,onMenuOpen:h,onMenuClose:x,onMenuItemClick:O,onLogout:p,renderMenuItem:y,renderUserInfo:g})=>{const[E,k]=R.useState({id:e||"",name:t||"",avatar:n||"",level:0,badges:[]}),[N,P]=R.useState(o),[A,I]=R.useState(l);R.useEffect(()=>{e&&s&&!t&&!n&&w()},[e,s,t,n]);const w=async()=>{P(!0),I(null);try{const D=s.endpoints.userProfile.replace(":userId",e),J=await M.get(`${s.baseURL}${D}`,{headers:s.headers});k(J.data)}catch(D){I(D)}finally{P(!1)}},F=D=>{O?.(D.id),D.id==="logout"&&p?.()},q=()=>{h?.()},ne=()=>{x?.()},z=()=>c.jsxs("div",{className:"user-profile-trigger",children:[c.jsx(ye.Avatar,{src:E.avatar,size:i,className:m,alt:"用户头像"}),c.jsx("span",{className:`user-name ${f||""}`,children:E.name})]});return N?c.jsx("div",{className:`user-profile-container ${u||""} is-loading`,children:c.jsx("div",{className:"user-profile-loading",children:"加载中..."})}):A?c.jsx("div",{className:`user-profile-container ${u||""} has-error`,children:c.jsxs("div",{className:"user-profile-error",children:["错误: ",A.message]})}):E.name?c.jsx("div",{className:`user-profile-container ${u||""}`,children:c.jsx(Xe,{trigger:g?g(E):z(),items:r.map(D=>({...D,onClick:()=>F(D)})),position:"bottom",alignment:"end",onOpen:q,onClose:ne,renderItem:y?D=>y(D,E):void 0})}):c.jsx("div",{className:`user-profile-container ${u||""}`,children:c.jsx("div",{className:"user-profile-loading",children:"未登录"})})},Ir=e=>c.jsxs("div",{className:"explore-menu-item",onClick:()=>e.onClick?.(e),children:[c.jsx("span",{className:"explore-item-label",children:e.label}),e.status&&c.jsx("span",{className:`explore-item-status status-${e.status.toLowerCase().replace("%","").replace(" ","-")}`,children:e.status})]},e.id),Lr=()=>c.jsxs("button",{className:"explore-button","aria-label":"探索数学课程",children:[c.jsx("span",{className:"explore-icon",children:"🌍"}),c.jsx("span",{className:"explore-text",children:"探索"})]}),Dr=({className:e="",style:t,logoHref:n="/",logoText:s="MathWiz",onLogoClick:r,exploreItems:i=[],exploreMenuOpen:o=!1,onExploreMenuToggle:l,onExploreItemClick:m,renderExploreItem:f=Ir,userData:u,userMenuItems:h,onUserMenuItemClick:x,onLogout:O,isLoading:p=!1,error:y=null,headerClassName:g="",logoClassName:E="",exploreClassName:k="",userProfileClassName:N="","aria-label":P,"aria-labelledby":A,...I})=>{const w=i.map(F=>({id:F.id,label:f(F),onClick:()=>m?.(F)}));return c.jsx("header",{className:`mathwiz-header site-header ${g} ${e}`,style:t,"aria-label":P,"aria-labelledby":A,role:"banner",...I,children:c.jsxs("div",{className:"header-content",children:[c.jsx("div",{className:"header-section left",children:c.jsx(Xe,{trigger:c.jsx(Lr,{}),items:w,position:"bottom",alignment:"start",openDelay:300,closeDelay:100,onOpen:()=>l?.(!0),onClose:()=>l?.(!1),className:`explore-submenu ${k}`,menuClassName:"explore-panel"})}),c.jsx("div",{className:"header-section center",children:c.jsx("a",{href:n,className:`logo ${E}`,onClick:r,"aria-label":"MathWiz 首页",children:s})}),c.jsx("div",{className:"header-section right",children:c.jsx(gn,{userName:u?.name,userAvatar:u?.avatar,menuItems:h,onMenuItemClick:x,onLogout:O,containerClassName:N,isLoading:p,error:y})})]})})},_n=R.memo(Dr,(e,t)=>e.logoText===t.logoText&&e.logoHref===t.logoHref&&e.className===t.className&&e.headerClassName===t.headerClassName&&e.logoClassName===t.logoClassName&&e.exploreClassName===t.exploreClassName&&e.userProfileClassName===t.userProfileClassName&&e["aria-label"]===t["aria-label"]&&e["aria-labelledby"]===t["aria-labelledby"]&&e.isLoading===t.isLoading&&e.error===t.error&&JSON.stringify(e.exploreItems)===JSON.stringify(t.exploreItems)&&JSON.stringify(e.userData)===JSON.stringify(t.userData)&&JSON.stringify(e.userMenuItems)===JSON.stringify(t.userMenuItems)),bn=({abilities:e,width:t=400,height:n=400})=>{const s=()=>e.length===0?"":e.map(o=>{if(o.svgPoint)return`${o.svgPoint.x},${o.svgPoint.y}`;const l=Math.PI*2*e.indexOf(o)/e.length,m=o.score/o.maxScore*40+10,f=50+m*Math.sin(l),u=50-m*Math.cos(l);return`${f},${u}`}).join(" "),r=o=>{const l=Math.PI*2*o/Math.max(e.length,1),m=50+40*Math.sin(l),f=50-40*Math.cos(l);return{x2:m,y2:f}},i=o=>{const l=Math.PI*2*o/Math.max(e.length,1),m=50+45*Math.sin(l),f=50-45*Math.cos(l);let u="middle";return l>Math.PI*.25&&l<Math.PI*.75&&(u="start"),l>Math.PI*1.25&&l<Math.PI*1.75&&(u="end"),{x:m,y:f,textAnchor:u}};return c.jsxs("svg",{"data-testid":"radar-chart",width:t,height:n,viewBox:"0 0 100 100",className:"w-full h-full",preserveAspectRatio:"xMidYMid meet",children:[c.jsx("circle",{"data-testid":"center-point",cx:"50",cy:"50",r:"1",fill:"#4A90E2"}),e.map((o,l)=>{const{x2:m,y2:f}=r(l);return c.jsx("line",{"data-testid":"axis-line",x1:"50",y1:"50",x2:m,y2:f,stroke:"#E2E8F0",strokeWidth:"0.5"},`axis-${l}`)}),e.length>2&&c.jsx("polygon",{"data-testid":"radar-polygon",points:s(),fill:"rgba(74, 144, 226, 0.2)",stroke:"rgb(74, 144, 226)",strokeWidth:"1",fillRule:"evenodd"}),e.map((o,l)=>{let m,f;if(o.svgPoint)m=o.svgPoint.x,f=o.svgPoint.y;else{const u=Math.PI*2*l/e.length,h=o.score/o.maxScore*40+10;m=50+h*Math.sin(u),f=50-h*Math.cos(u)}return c.jsx("circle",{"data-testid":"data-point",cx:m,cy:f,r:"2",fill:o.progressBarColor==="bg-orange-400"?"#FBBF24":"#4A90E2"},`point-${o.name}`)}),e.map((o,l)=>{const{x:m,y:f,textAnchor:u}=i(l);return c.jsx("text",{x:m,y:f,textAnchor:u,fontSize:"5",fill:"#334155",className:"text-xs",children:o.name},`label-${o.name}`)})]})},yn=e=>{let t;const n=new Set,s=(f,u)=>{const h=typeof f=="function"?f(t):f;if(!Object.is(h,t)){const x=t;t=u??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(O=>O(t,x))}},r=()=>t,l={setState:s,getState:r,getInitialState:()=>m,subscribe:f=>(n.add(f),()=>n.delete(f))},m=t=e(s,r,l);return l},Mr=(e=>e?yn(e):yn),Fr=e=>e;function $r(e,t=Fr){const n=R.useSyncExternalStore(e.subscribe,R.useCallback(()=>t(e.getState()),[e,t]),R.useCallback(()=>t(e.getInitialState()),[e,t]));return R.useDebugValue(n),n}const xn=e=>{const t=Mr(e),n=s=>$r(t,s);return Object.assign(n,t),n},Br=(e=>e?xn(e):xn),wn={overallRating:"优秀",generalRecommendation:"你的空间想象力和逻辑推理能力非常出色!若能进一步提升在复杂图形下的专注力,你将所向披靡。建议尝试我们‘专注力挑战’系列游戏。",abilities:[{name:"空间想象力",score:7.5,maxScore:10,progressBarColor:"bg-blue-500",svgPoint:{x:50,y:17.5},recommendation:"通过观察三维物体在不同角度的投影,或尝试构建复杂结构的游戏,能有效提升空间想象力。",recommendationLink:"#spatial-challenges"},{name:"逻辑推理",score:8,maxScore:10,progressBarColor:"bg-blue-500",svgPoint:{x:82,y:35},recommendation:"解决数独、迷宫或逻辑谜题,能够持续锻炼你的逻辑思维,尝试挑战更高难度的推理游戏。",recommendationLink:"#logic-puzzles"},{name:"图形辨识",score:9,maxScore:10,progressBarColor:"bg-blue-500",svgPoint:{x:85,y:65},recommendation:"你在这方面表现出色!可以尝试在更复杂、干扰因素更多的图形中进行辨识训练,保持敏锐。",recommendationLink:"#graphic-training"},{name:"专注力",score:7,maxScore:10,progressBarColor:"bg-orange-400",svgPoint:{x:50,y:80},recommendation:"在长时间的游戏中保持专注对你来说是一个挑战,建议尝试我们‘专注力挑战’系列游戏,逐渐延长专注时间。",recommendationLink:"#focus-challenges"},{name:"观察力",score:8.5,maxScore:10,progressBarColor:"bg-blue-500",svgPoint:{x:15,y:65},recommendation:"你的观察力非常敏锐,在细节发现上尤为突出。尝试在限时模式下进行观察力训练,提高反应速度。",recommendationLink:"#observation-drills"},{name:"抗压性",score:7.8,maxScore:10,progressBarColor:"bg-blue-500",svgPoint:{x:18,y:35},recommendation:"面对高压挑战时,保持冷静是关键。通过模拟竞赛或限时任务来提升抗压能力,逐步适应压力。",recommendationLink:"#stress-games"}]};class qr{static API_BASE_URL="/api/radar-ability";static async fetchRadarAbilityData(){try{return process.env.NODE_ENV==="test"?(await new Promise(t=>setTimeout(t,100)),wn):(await M.get(`${this.API_BASE_URL}/assessment`)).data}catch(t){if(console.error("Failed to fetch radar ability data:",t),process.env.NODE_ENV==="test")throw new Error("获取能力评估数据失败");return wn}}static async submitFeedback(t){try{await M.post(`${this.API_BASE_URL}/feedback`,t)}catch(n){throw console.error("Failed to submit feedback:",n),new Error("提交反馈失败")}}}const Hr=Br((e,t)=>({data:null,loading:!1,error:null,fetchData:async()=>{if(!t().loading){e({loading:!0,error:null});try{const n=await qr.fetchRadarAbilityData();e({data:n,loading:!1})}catch(n){const s=n instanceof Error?n.message:"获取数据失败";e({error:s,loading:!1})}}},setData:n=>{e({data:n,error:null,loading:!1})},setError:n=>{e({error:n,loading:!1})},reset:()=>{e({data:null,loading:!1,error:null})}})),vn=({ability:e})=>{const t=e.score/e.maxScore*100;return c.jsxs("div",{className:"ability-progress-bar-item","data-ability":e.name,"data-testid":"progress-bar-container",children:[c.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[c.jsx("span",{className:"text-gray-700 font-medium",children:e.name}),c.jsxs("span",{className:"text-gray-600",children:[e.score,"/",e.maxScore]})]}),c.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2.5","data-testid":"progress-bar-outer",children:c.jsx("div",{className:`${e.progressBarColor} h-2.5 rounded-full transition-all duration-300`,style:{width:`${t}%`},"data-testid":"progress-bar-inner",role:"progressbar","aria-valuenow":e.score,"aria-valuemin":0,"aria-valuemax":e.maxScore,"aria-label":`${e.name} progress: ${e.score} out of ${e.maxScore}`})})]})},En=({generalRecommendation:e})=>c.jsx("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4","data-testid":"advice-panel",role:"region","aria-label":"个性化建议",children:c.jsxs("div",{className:"flex items-start",children:[c.jsx("div",{className:"flex-shrink-0",children:c.jsx("i",{className:"material-icons text-blue-500","data-testid":"lightbulb-icon","aria-hidden":"true",children:"lightbulb"})}),c.jsxs("div",{className:"ml-3",children:[c.jsx("h3",{className:"text-md font-semibold text-blue-800","aria-level":3,children:"个性化建议"}),c.jsx("p",{className:"text-sm text-blue-700 mt-1","data-testid":"recommendation-text",children:e})]})]})}),Sn=({ability:e,customLinkTexts:t={}})=>{const n=s=>{const r={空间想象力:"探索空间挑战",逻辑推理:"深入逻辑谜题",图形辨识:"精进图形训练",专注力:"挑战专注极限",观察力:"提升观察速度",抗压性:"磨砺抗压意志"};return t[s]||r[s]||"开始挑战"};return c.jsx(ye.Card,{className:"recommendation-card w-full max-w-sm hover:shadow-lg transition-all duration-300","data-ability":e.name,"data-testid":"recommendation-card",isHoverable:!0,isPressable:!0,children:c.jsx(ye.CardBody,{className:"p-5",children:c.jsxs("div",{className:"flex flex-col gap-3",children:[c.jsxs("h4",{className:"text-lg font-semibold text-foreground","aria-level":4,children:[e.name,": 专项提高"]}),c.jsx("p",{className:"text-sm text-default-600 leading-relaxed","data-testid":"recommendation-description",children:e.recommendation}),c.jsx(ye.Button,{as:"a",href:e.recommendationLink,className:"mt-2 w-fit",size:"sm",variant:"flat",color:"primary",endContent:c.jsx(ts,{className:"w-4 h-4"}),"data-testid":"recommendation-link","aria-label":`前往${e.name}专项提高页面`,children:n(e.name)})]})})})},qe={dashboardLayout:"_dashboardLayout_10wqn_5",upperSection:"_upperSection_10wqn_19",lowerSection:"_lowerSection_10wqn_33",radarChartArea:"_radarChartArea_10wqn_51"},Wr=()=>{const{data:e,loading:t,error:n,fetchData:s}=Hr();return R.useEffect(()=>{s()},[s]),t?c.jsxs("div",{className:"card max-w-4xl mx-auto p-6 md:p-8 flex items-center justify-center","data-testid":"loading-spinner",children:[c.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-500"}),c.jsx("span",{className:"ml-3 text-gray-600",children:"加载中..."})]}):n?c.jsxs("div",{className:"card max-w-4xl mx-auto p-6 md:p-8 text-center",role:"alert","aria-live":"assertive",children:[c.jsx("div",{className:"text-red-500 mb-4",children:c.jsx("i",{className:"material-icons text-4xl","aria-hidden":"true",children:"error_outline"})}),c.jsx("h3",{className:"text-lg font-semibold text-gray-800 mb-2",children:"加载失败"}),c.jsx("p",{className:"text-gray-600 mb-4",children:n}),c.jsx("button",{onClick:s,className:"bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-lg transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2","aria-label":"重试加载数据",children:"重试"})]}):e?c.jsxs("div",{className:"card max-w-4xl mx-auto p-6 md:p-8 animate-fade-in","data-component":"AbilityAssessmentDashboard",role:"main","aria-label":"能力评估雷达图展示",children:[c.jsxs("div",{className:"flex justify-between items-center mb-6",children:[c.jsx("h2",{className:"text-xl font-bold text-gray-800",children:"能力评估雷达图"}),c.jsxs("span",{className:"bg-blue-100 text-blue-800 text-sm font-semibold px-2.5 py-0.5 rounded-full","aria-label":`综合评级: ${e.overallRating}`,children:["综合评级: ",e.overallRating]})]}),c.jsxs("div",{className:qe.dashboardLayout,children:[c.jsxs("div",{className:qe.upperSection,children:[c.jsx("div",{className:qe.radarChartArea,children:c.jsx(bn,{abilities:e.abilities})}),c.jsx("div",{className:"space-y-4 flex flex-col justify-around py-2",children:e.abilities.map(r=>c.jsx(vn,{ability:r},r.name))})]}),c.jsxs("div",{className:qe.lowerSection,children:[c.jsx(En,{generalRecommendation:e.generalRecommendation}),c.jsx("h3",{className:"text-lg font-bold text-gray-800 mb-4 mt-6",children:"专项提升建议"}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:e.abilities.map(r=>c.jsx(Sn,{ability:r},r.name))})]})]})]}):c.jsx("div",{className:"card max-w-4xl mx-auto p-6 md:p-8 text-center",role:"status","aria-live":"polite",children:c.jsx("p",{className:"text-gray-600",children:"暂无数据"})})},ct={"Arithmetic and Algebra":"🔢","Graphics and Geometry":"📐","Probability and Statistics":"📊",Default:"📚"},zr={mastered:"已掌握",proficient:"熟练",familiar:"熟悉",attempted:"已尝试","not-started":"未开始"},Jr={mastered:"#10b981",proficient:"#3b82f6",familiar:"#f59e0b",attempted:"#8b5cf6","not-started":"#6b7280"},Re={id:"user-001",name:"小明",level:5,avatar:"https://i.pravatar.cc/40?u=student1",logIn:!0,badges:["🏆","🏅","🌟"]},Gr=[{id:"g3",label:"三年级",status:"new",onClick:()=>console.log("三年级 clicked")},{id:"g4",label:"四年级",status:"2%",onClick:()=>console.log("四年级 clicked")},{id:"g5",label:"五年级",status:"进行中",onClick:()=>console.log("五年级 clicked")},{id:"g6",label:"六年级",status:"new",onClick:()=>console.log("六年级 clicked")},{id:"g7",label:"七年级",status:"new",onClick:()=>console.log("七年级 clicked")},{id:"g8",label:"八年级",status:"new",onClick:()=>console.log("八年级 clicked")},{id:"alg_topic",label:"代数专题",status:"new",onClick:()=>console.log("代数专题 clicked")},{id:"calc_topic",label:"计算专题",status:"new",onClick:()=>console.log("计算专题 clicked")},{id:"geo_topic",label:"几何专题",status:"new",onClick:()=>console.log("几何专题 clicked")},{id:"olym_topic",label:"奥数专题",status:"new",onClick:()=>console.log("奥数专题 clicked")}],Vr="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJ1c2VyLTAwMSIsIm5hbWUiOiLlsI_mmI4iLCJsZXZlbCI6NSwiYXZhdGFyIjoiaHR0cHM6Ly9pLnByYXZhdGFyLmNjLzQwP3U9c3R1ZGVudDEiLCJiYWRnZXMiOlsi8J-SoiIsIvCfjZUiLCLwn5KbIl0sImlhdCI6MTY5MTYwMDAwMCwiZXhwIjoxNzIzMTM2MDAwfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c";class Kr{baseURL;token;constructor(t="/api",n=Vr){this.baseURL=t,this.token=n}getAuthHeaders(){return{Authorization:`Bearer ${this.token}`,"Content-Type":"application/json"}}async fetchWithAuth(t,n={}){const s=await fetch(t,{...n,headers:{...this.getAuthHeaders(),...n.headers}});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return s}async getCourseData(t){return(await this.fetchWithAuth(`${this.baseURL}/courses/${t}`)).json()}async getUserGradeUnitsNav(t){const n=t?`${this.baseURL}/user/grade/units/nav?gradeId=${encodeURIComponent(t)}`:`${this.baseURL}/user/grade/units/nav`;return(await this.fetchWithAuth(n)).json()}async getUnitProgress(t,n){const s=n?`${this.baseURL}/courses/${t}/units/${n}/progress`:`${this.baseURL}/courses/${t}/progress`;return(await this.fetchWithAuth(s)).json()}async batchUpdateLessonProgress(t,n){return(await this.fetchWithAuth(`${this.baseURL}/user/units/${t}/progress/batch`,{method:"POST",body:JSON.stringify(n)})).json()}async updateLessonProgress(t,n,s,r){await this.fetchWithAuth(`${this.baseURL}/courses/${t}/units/${n}/lessons/${s}/progress`,{method:"POST",body:JSON.stringify({status:r})})}setToken(t){this.token=t}getToken(){return this.token}}const ut=new Kr,H={id:"g5",title:"小学数学五年级",level:5,subject:"数学",units:[{id:"unit_1",title:"小数乘法",description:"学习小数乘法的计算方法及应用",estimatedDuration:"3周",totalLessons:10,moduleCategory:"Arithmetic and Algebra",lessons:[{id:"unit1_lesson1",title:"小数乘整数",duration:40,knowledgeItems:[{id:"unit1_lesson1_k1",title:"小数乘整数的意义",description:"理解小数乘整数的意义与整数乘法相同",progress:0,contentUrl:""},{id:"unit1_lesson1_k2",title:"小数乘整数的计算方法",description:"掌握小数乘整数的计算方法:先按整数乘法计算,再看因数中有几位小数,就从积的右边起数出几位点上小数点",progress:0,contentUrl:""}]},{id:"unit1_lesson2",title:"小数乘小数",duration:40,knowledgeItems:[{id:"unit1_lesson2_k1",title:"小数乘小数的计算方法",description:"掌握小数乘小数的计算方法:先按整数乘法算出积,再给积点上小数点",progress:0,contentUrl:""},{id:"unit1_lesson2_k2",title:"积的小数位数确定",description:"理解积的小数位数等于两个因数的小数位数之和",progress:0,contentUrl:""}]},{id:"unit1_lesson3",title:"积的近似数",duration:40,knowledgeItems:[{id:"unit1_lesson3_k1",title:'用"四舍五入"法求积的近似数',description:'掌握用"四舍五入"法求积的近似数的方法',progress:0,contentUrl:""}]},{id:"unit1_lesson4",title:"整数乘法运算定律推广到小数",duration:40,knowledgeItems:[{id:"unit1_lesson4_k1",title:"乘法运算定律在小数中的适用性",description:"理解整数乘法运算定律对于小数乘法同样适用",progress:0,contentUrl:""},{id:"unit1_lesson4_k2",title:"运用运算定律进行简便计算",description:"能运用乘法运算定律进行小数乘法的简便计算",progress:0,contentUrl:""}]},{id:"unit1_lesson5",title:"解决问题",duration:40,knowledgeItems:[{id:"unit1_lesson5_k1",title:"用小数乘法解决实际问题",description:"能运用小数乘法解决购物、面积计算等实际问题",progress:0,contentUrl:""}]}]},{id:"unit_2",title:"小数除法",description:"学习小数除法的计算方法及应用",estimatedDuration:"3周",totalLessons:12,moduleCategory:"Arithmetic and Algebra",lessons:[{id:"unit2_lesson1",title:"小数除以整数",duration:40,knowledgeItems:[{id:"unit2_lesson1_k1",title:"小数除以整数的计算方法",description:"掌握小数除以整数的计算方法:按照整数除法的方法计算,商的小数点要与被除数的小数点对齐",progress:0,contentUrl:""}]},{id:"unit2_lesson2",title:"一个数除以小数",duration:40,knowledgeItems:[{id:"unit2_lesson2_k1",title:"除数是小数的除法计算方法",description:"掌握除数是小数的除法计算方法:利用商不变的性质,将除数转化为整数",progress:0,contentUrl:""}]},{id:"unit2_lesson3",title:"商的近似数",duration:40,knowledgeItems:[{id:"unit2_lesson3_k1",title:'用"四舍五入"法求商的近似数',description:'掌握用"四舍五入"法求商的近似数的方法',progress:0,contentUrl:""}]},{id:"unit2_lesson4",title:"循环小数",duration:40,knowledgeItems:[{id:"unit2_lesson4_k1",title:"循环小数的概念",description:"理解循环小数的概念,认识循环节",progress:0,contentUrl:""},{id:"unit2_lesson4_k2",title:"循环小数的表示方法",description:"掌握循环小数的简便表示方法",progress:0,contentUrl:""}]},{id:"unit2_lesson5",title:"用计算器探索规律",duration:40,knowledgeItems:[{id:"unit2_lesson5_k1",title:"用计算器计算小数除法",description:"会用计算器计算较复杂的小数除法",progress:0,contentUrl:""},{id:"unit2_lesson5_k2",title:"发现商的变化规律",description:"能借助计算器发现商的变化规律",progress:0,contentUrl:""}]},{id:"unit2_lesson6",title:"解决问题",duration:40,knowledgeItems:[{id:"unit2_lesson6_k1",title:"用小数除法解决实际问题",description:"能运用小数除法解决购物、分配等实际问题",progress:0,contentUrl:""}]}]},{id:"unit_3",title:"简易方程",description:"学习用字母表示数和解简易方程",estimatedDuration:"4周",totalLessons:14,moduleCategory:"Arithmetic and Algebra",lessons:[{id:"unit3_lesson1",title:"用字母表示数",duration:40,knowledgeItems:[{id:"unit3_lesson1_k1",title:"用字母表示数",description:"初步理解用字母表示数的意义和作用",progress:0,contentUrl:""},{id:"unit3_lesson1_k2",title:"用字母表示运算定律和计算公式",description:"会用字母表示运算定律和计算公式",progress:0,contentUrl:""}]},{id:"unit3_lesson2",title:"方程的意义",duration:40,knowledgeItems:[{id:"unit3_lesson2_k1",title:"方程的概念",description:"理解方程的意义,知道方程与等式的区别和联系",progress:0,contentUrl:""}]},{id:"unit3_lesson3",title:"等式的性质",duration:40,knowledgeItems:[{id:"unit3_lesson3_k1",title:"等式的性质1",description:"理解等式的性质1:等式两边加上或减去同一个数,左右两边仍然相等",progress:0,contentUrl:""},{id:"unit3_lesson3_k2",title:"等式的性质2",description:"理解等式的性质2:等式两边乘同一个数,或除以同一个不为0的数,左右两边仍然相等",progress:0,contentUrl:""}]},{id:"unit3_lesson4",title:"解简易方程",duration:40,knowledgeItems:[{id:"unit3_lesson4_k1",title:"利用等式的性质解方程",description:"会利用等式的性质解形如x±a=b、ax=b、x÷a=b、a-x=b、a÷x=b的方程",progress:0,contentUrl:""}]},{id:"unit3_lesson5",title:"实际问题与方程",duration:40,knowledgeItems:[{id:"unit3_lesson5_k1",title:"列方程解决实际问题",description:"初步学会列方程解决一些简单的实际问题",progress:0,contentUrl:""}]}]},{id:"unit_4",title:"多边形的面积",description:"学习平行四边形、三角形、梯形和组合图形的面积计算",estimatedDuration:"3周",totalLessons:12,moduleCategory:"Graphics and Geometry",lessons:[{id:"unit4_lesson1",title:"平行四边形的面积",duration:40,knowledgeItems:[{id:"unit4_lesson1_k1",title:"平行四边形面积公式的推导",description:"通过割补法理解平行四边形面积公式的推导过程",progress:0,contentUrl:""},{id:"unit4_lesson1_k2",title:"平行四边形面积的计算",description:"掌握平行四边形面积计算公式:S=ah,并能正确运用",progress:0,contentUrl:""}]},{id:"unit4_lesson2",title:"三角形的面积",duration:40,knowledgeItems:[{id:"unit4_lesson2_k1",title:"三角形面积公式的推导",description:"通过拼摆法理解三角形面积公式的推导过程",progress:0,contentUrl:""},{id:"unit4_lesson2_k2",title:"三角形面积的计算",description:"掌握三角形面积计算公式:S=ah÷2,并能正确运用",progress:0,contentUrl:""}]},{id:"unit4_lesson3",title:"梯形的面积",duration:40,knowledgeItems:[{id:"unit4_lesson3_k1",title:"梯形面积公式的推导",description:"通过拼摆法理解梯形面积公式的推导过程",progress:0,contentUrl:""},{id:"unit4_lesson3_k2",title:"梯形面积的计算",description:"掌握梯形面积计算公式:S=(a+b)h÷2,并能正确运用",progress:0,contentUrl:""}]},{id:"unit4_lesson4",title:"组合图形的面积",duration:40,knowledgeItems:[{id:"unit4_lesson4_k1",title:"认识组合图形",description:"认识组合图形,会把组合图形分解成已学过的平面图形",progress:0,contentUrl:""},{id:"unit4_lesson4_k2",title:"计算组合图形的面积",description:"掌握计算组合图形面积的多种方法",progress:0,contentUrl:""}]}]},{id:"unit_5",title:"因数与倍数",description:"学习因数、倍数、质数、合数等概念",estimatedDuration:"3周",totalLessons:10,moduleCategory:"Arithmetic and Algebra",lessons:[{id:"unit5_lesson1",title:"因数和倍数",duration:40,knowledgeItems:[{id:"unit5_lesson1_k1",title:"因数和倍数的意义",description:"理解因数和倍数的意义,掌握找一个数的因数和倍数的方法",progress:0,contentUrl:""},{id:"unit5_lesson1_k2",title:"因数和倍数的特征",description:"了解一个数的因数的个数是有限的,倍数的个数是无限的",progress:0,contentUrl:""}]},{id:"unit5_lesson2",title:"2、5、3的倍数的特征",duration:40,knowledgeItems:[{id:"unit5_lesson2_k1",title:"2、5的倍数的特征",description:"掌握2、5的倍数的特征,理解奇数和偶数的意义",progress:0,contentUrl:""},{id:"unit5_lesson2_k2",title:"3的倍数的特征",description:"掌握3的倍数的特征,能判断一个数是不是3的倍数",progress:0,contentUrl:""}]},{id:"unit5_lesson3",title:"质数和合数",duration:40,knowledgeItems:[{id:"unit5_lesson3_k1",title:"质数和合数的意义",description:"理解质数和合数的意义,能判断一个数是质数还是合数",progress:0,contentUrl:""},{id:"unit5_lesson3_k2",title:"制作100以内的质数表",description:"会制作100以内的质数表,熟记20以内的质数",progress:0,contentUrl:""}]}]},{id:"unit_6",title:"长方体和正方体",description:"学习长方体和正方体的特征、表面积和体积计算",estimatedDuration:"4周",totalLessons:14,moduleCategory:"Graphics and Geometry",lessons:[{id:"unit6_lesson1",title:"长方体和正方体的认识",duration:40,knowledgeItems:[{id:"unit6_lesson1_k1",title:"长方体的特征",description:"认识长方体的特征,了解长方体的长、宽、高",progress:0,contentUrl:""},{id:"unit6_lesson1_k2",title:"正方体的特征",description:"认识正方体的特征,理解正方体是特殊的长方体",progress:0,contentUrl:""}]},{id:"unit6_lesson2",title:"长方体和正方体的表面积",duration:40,knowledgeItems:[{id:"unit6_lesson2_k1",title:"表面积的意义",description:"理解表面积的意义,掌握长方体和正方体表面积的计算方法",progress:0,contentUrl:""},{id:"unit6_lesson2_k2",title:"表面积的实际应用",description:"能运用表面积知识解决一些实际问题",progress:0,contentUrl:""}]},{id:"unit6_lesson3",title:"长方体和正方体的体积",duration:40,knowledgeItems:[{id:"unit6_lesson3_k1",title:"体积和体积单位",description:"理解体积的意义,认识常用的体积单位",progress:0,contentUrl:""},{id:"unit6_lesson3_k2",title:"长方体和正方体体积的计算",description:"掌握长方体和正方体体积的计算公式",progress:0,contentUrl:""},{id:"unit6_lesson3_k3",title:"体积单位间的进率",description:"掌握体积单位之间的进率和换算",progress:0,contentUrl:""}]},{id:"unit6_lesson4",title:"容积和容积单位",duration:40,knowledgeItems:[{id:"unit6_lesson4_k1",title:"容积和容积单位",description:"理解容积的意义,认识常用的容积单位",progress:0,contentUrl:""},{id:"unit6_lesson4_k2",title:"容积和体积的关系",description:"掌握容积和体积之间的关系",progress:0,contentUrl:""}]}]},{id:"unit_7",title:"分数的意义和性质",description:"学习分数的意义、性质和约分、通分等方法",estimatedDuration:"4周",totalLessons:16,moduleCategory:"Arithmetic and Algebra",lessons:[{id:"unit7_lesson1",title:"分数的意义",duration:40,knowledgeItems:[{id:"unit7_lesson1_k1",title:"分数的产生和意义",description:"理解分数的产生和意义,明确分数与除法的关系",progress:0,contentUrl:""},{id:"unit7_lesson1_k2",title:"分数单位",description:"认识分数单位,能说出一个分数中有几个这样的分数单位",progress:0,contentUrl:""}]},{id:"unit7_lesson2",title:"分数与除法",duration:40,knowledgeItems:[{id:"unit7_lesson2_k1",title:"分数与除法的关系",description:"理解分数与除法的关系,会用分数表示两个数相除的商",progress:0,contentUrl:""}]},{id:"unit7_lesson3",title:"真分数和假分数",duration:40,knowledgeItems:[{id:"unit7_lesson3_k1",title:"真分数和假分数的意义",description:"理解真分数和假分数的意义和特征",progress:0,contentUrl:""},{id:"unit7_lesson3_k2",title:"带分数",description:"认识带分数,会进行假分数与整数、带分数的互化",progress:0,contentUrl:""}]},{id:"unit7_lesson4",title:"分数的基本性质",duration:40,knowledgeItems:[{id:"unit7_lesson4_k1",title:"分数的基本性质",description:"理解分数的基本性质,能运用分数的基本性质进行分数的变形",progress:0,contentUrl:""}]},{id:"unit7_lesson5",title:"约分",duration:40,knowledgeItems:[{id:"unit7_lesson5_k1",title:"最大公因数",description:"理解公因数和最大公因数的意义,掌握求两个数的最大公因数的方法",progress:0,contentUrl:""},{id:"unit7_lesson5_k2",title:"约分的方法",description:"掌握约分的方法,能正确地进行约分",progress:0,contentUrl:""}]},{id:"unit7_lesson6",title:"通分",duration:40,knowledgeItems:[{id:"unit7_lesson6_k1",title:"最小公倍数",description:"理解公倍数和最小公倍数的意义,掌握求两个数的最小公倍数的方法",progress:0,contentUrl:""},{id:"unit7_lesson6_k2",title:"通分的方法",description:"掌握通分的方法,能正确地进行通分",progress:0,contentUrl:""}]},{id:"unit7_lesson7",title:"分数和小数的互化",duration:40,knowledgeItems:[{id:"unit7_lesson7_k1",title:"分数化成小数",description:"掌握分数化成小数的方法",progress:0,contentUrl:""},{id:"unit7_lesson7_k2",title:"小数化成分数",description:"掌握小数化成分数的方法",progress:0,contentUrl:""}]}]},{id:"unit_8",title:"分数的加法和减法",description:"学习同分母分数、异分母分数的加法和减法",estimatedDuration:"3周",totalLessons:12,moduleCategory:"Arithmetic and Algebra",lessons:[{id:"unit8_lesson1",title:"同分母分数加、减法",duration:40,knowledgeItems:[{id:"unit8_lesson1_k1",title:"同分母分数加法的计算方法",description:"掌握同分母分数加法的计算方法",progress:0,contentUrl:""},{id:"unit8_lesson1_k2",title:"同分母分数减法的计算方法",description:"掌握同分母分数减法的计算方法",progress:0,contentUrl:""}]},{id:"unit8_lesson2",title:"异分母分数加、减法",duration:40,knowledgeItems:[{id:"unit8_lesson2_k1",title:"异分母分数加法的计算方法",description:"掌握异分母分数加法的计算方法:先通分,然后按照同分母分数加法进行计算",progress:0,contentUrl:""},{id:"unit8_lesson2_k2",title:"异分母分数减法的计算方法",description:"掌握异分母分数减法的计算方法:先通分,然后按照同分母分数减法进行计算",progress:0,contentUrl:""}]},{id:"unit8_lesson3",title:"分数加减混合运算",duration:40,knowledgeItems:[{id:"unit8_lesson3_k1",title:"分数加减混合运算的顺序",description:"掌握分数加减混合运算的运算顺序",progress:0,contentUrl:""},{id:"unit8_lesson3_k2",title:"整数加法运算定律推广到分数加法",description:"理解整数加法运算定律对于分数加法同样适用,能运用运算定律进行简便计算",progress:0,contentUrl:""}]}]},{id:"unit_9",title:"折线统计图",description:"学习单式折线统计图和复式折线统计图的认识和制作",estimatedDuration:"2周",totalLessons:6,moduleCategory:"Probability and Statistics",lessons:[{id:"unit9_lesson1",title:"单式折线统计图",duration:40,knowledgeItems:[{id:"unit9_lesson1_k1",title:"单式折线统计图的特点",description:"认识单式折线统计图,了解其特点和作用",progress:0,contentUrl:""},{id:"unit9_lesson1_k2",title:"绘制单式折线统计图",description:"能根据数据绘制单式折线统计图",progress:0,contentUrl:""}]},{id:"unit9_lesson2",title:"复式折线统计图",duration:40,knowledgeItems:[{id:"unit9_lesson2_k1",title:"复式折线统计图的特点",description:"认识复式折线统计图,了解其特点和作用",progress:0,contentUrl:""},{id:"unit9_lesson2_k2",title:"绘制复式折线统计图",description:"能根据数据绘制复式折线统计图",progress:0,contentUrl:""}]},{id:"unit9_lesson3",title:"数据分析",duration:40,knowledgeItems:[{id:"unit9_lesson3_k1",title:"根据统计图进行数据分析",description:"能根据折线统计图进行简单的数据分析,作出合理的判断和预测",progress:0,contentUrl:""}]}]}]},Yr=Gr,Xr=Re,An=R.createContext(null),Cn=()=>{const e=R.useContext(An);if(!e)throw new Error("useGradeUnitBrowser must be used within GradeUnitBrowserProvider");return e},Zr=({children:e})=>{const[t,n]=R.useState(null),[s,r]=R.useState([]),[i,o]=R.useState(null),[l,m]=R.useState({}),[f,u]=R.useState(!1),[h,x]=R.useState(null),[O,p]=R.useState(null),[y,g]=R.useState([]),E=R.useCallback(async(A,I)=>{u(!0),x(null);try{await new Promise(F=>setTimeout(F,100));try{console.log("Attempting to fetch units data from API..."),console.log("API URL will be:",`/api/user/grade/units/nav?gradeId=${A}`),console.log("Using token:",ut.getToken());const F=await ut.getUserGradeUnitsNav(A);console.log("API call successful, units data:",F),o(F),console.log("unitsData:",F)}catch(F){const q=F;console.error("🚨 MSW API 请求失败 - 详细调试信息:"),console.error("📡 请求 URL:",`/api/user/grade/units/nav?gradeId=${A}`),console.error("🔑 使用 Token:",ut.getToken()),console.error("❌ 错误信息:",q.message),console.error("📝 错误类型:",q.name),console.error("🔍 错误堆栈:",q.stack),x(`MSW API 请求失败: ${q.message} - 请检查浏览器控制台获取详细信息`);const ne={userId:I,courseId:"g5",courseTitle:"小学数学五年级",courseLevel:5,totalUnits:H.units.length,completedUnits:2,overallProgress:22,status:"in-progress",lastAccessed:new Date().toISOString(),units:H.units.map((z,D)=>({unitId:z.id,title:z.title,description:z.description,moduleCategory:z.moduleCategory,estimatedDuration:z.estimatedDuration,totalLessons:z.lessons.length,completedLessons:D<2?Math.floor(z.lessons.length*.5):0,progressPercentage:D<2?50:0,status:D<2?"in-progress":"not-started",lastAccessed:D<2?new Date().toISOString():void 0,isActive:D===0,route:`/math/grade-5/unit/${z.id}`,icon:ct[z.moduleCategory]||ct.Default}))};o(ne),console.log("Using courseData.ts as fallback:",ne)}const w={};H.units.forEach(F=>{w[F.id]=F.lessons.map(q=>({id:q.id,title:q.title,duration:q.duration,knowledgeItems:q.knowledgeItems.map(ne=>({...ne,progress:0}))}))}),console.log("Lessons data loaded:",w),m(w),console.log("unitsData:",i),console.log("unitsData.units:",i?.units),console.log("First unit isActive:",i?.units?.[0]?.isActive),console.log("First unit unitId:",i?.units?.[0]?.unitId),console.log("Lessons data keys:",Object.keys(w)),console.log("Lessons for unit_1:",w.unit_1),n({id:I,name:"学生用户",level:5,avatar:"https://i.pravatar.cc/40",badges:["🏆"]}),r([{id:"g5",label:"五年级",status:"进行中"},{id:"g6",label:"六年级",status:"new"}])}catch(w){x(w instanceof Error?w.message:"数据加载失败"),console.error("数据加载错误:",w),console.error("API call error details:",w),console.log("gradeId parameter:",A)}finally{u(!1)}},[]),k=R.useCallback(A=>{g(I=>I.includes(A)?I.filter(w=>w!==A):[...I,A])},[]),N=R.useCallback(A=>{p(A)},[]);R.useEffect(()=>{if(console.log("unitsData state updated:",i),i&&i.units.length>0){const A=i.units.find(I=>I.isActive)?.unitId||i.units[0].unitId;p(A),console.log("Default active unit set after state update:",A)}},[i]);const P={userInfo:t,exploreMenu:s,unitsData:i,lessons:l,loading:f,error:h,activeUnitId:O,activeLessonIds:y,setLoading:u,setError:x,setActiveUnit:N,toggleLesson:k,loadPageData:E};return c.jsx(An.Provider,{value:P,children:e})},Qr=({gradeId:e,userId:t,onLearnAction:n,className:s,userInfo:r,exploreMenu:i})=>{const{userInfo:o,exploreMenu:l,unitsData:m,lessons:f,loading:u,error:h,activeUnitId:x,activeLessonIds:O,setActiveUnit:p,toggleLesson:y,loadPageData:g}=Cn(),E=r??o,k=i??l;R.useEffect(()=>{g(e,t)},[e,t,g]),R.useEffect(()=>{console.log("activeUnitId from context:",x),console.log("lessons from context:",f);const A=m?.units?.find(w=>w.unitId===x)||null,I=A&&x&&f[x]?{id:A.unitId,title:A.title,description:A.description,estimatedDuration:A.estimatedDuration,totalLessons:A.totalLessons,moduleCategory:A.moduleCategory,lessons:f[x]}:null;console.log("activeUnit computed:",I)},[x,f,m]);const N=m?.units?.find(A=>A.unitId===x)||null,P=N&&x&&f[x]?{id:N.unitId,title:N.title,description:N.description,estimatedDuration:N.estimatedDuration,totalLessons:N.totalLessons,moduleCategory:N.moduleCategory,lessons:f[x]}:null;return u?c.jsx("div",{className:"grade-unit-browser-page loading","data-testid":"grade-unit-browser-page",children:c.jsx("div",{className:"loading-spinner","data-testid":"loading-spinner",children:"加载中..."})}):h?c.jsxs("div",{className:"grade-unit-browser-page error","data-testid":"grade-unit-browser-page",children:[c.jsx("div",{className:"error-message","data-testid":"error-message",children:h}),c.jsx("button",{onClick:()=>g(e,t),className:"retry-button",children:"重试"})]}):c.jsxs("div",{className:`grade-unit-browser-page ${s||""}`,"data-testid":"grade-unit-browser-page",children:[c.jsx("div",{className:"header-area",children:c.jsx(_n,{userData:E||void 0,exploreItems:k})}),c.jsx("div",{className:"sidebar-area",children:c.jsx(Nt,{data:m,activeUnitId:x,onUnitSelect:p,loading:u})}),c.jsx("div",{className:"content-area",children:c.jsx(kt,{unit:P,activeLessonIds:O,onToggleLesson:y,onLearnAction:n||(()=>{}),loading:u})})]})},te=(e,t,n)=>({x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}),eo=()=>{const e={x:.5,y:.1,name:"A"},t={x:.1,y:.75,name:"B"},n={x:.9,y:.75,name:"C"},s={...te(e,t,1/3),name:"D"},r={...te(e,n,1/3),name:"E"},i={...te(e,t,2/3),name:"M"},o={...te(e,n,2/3),name:"N"},l={...te(t,n,1/3),name:"P"},m={...te(t,n,2/3),name:"Q"},f={...te(s,r,1/3),name:"U"},u={...te(s,r,2/3),name:"S"},h={...te(i,o,1/3),name:"K"},x={...te(i,o,2/3),name:"L"};return{A:e,B:t,C:n,D:s,E:r,M:i,N:o,P:l,Q:m,U:f,S:u,K:h,L:x}},to=(e,t,n)=>{const s={};for(const[r,i]of Object.entries(e))s[r]={...i,x:i.x*t,y:i.y*n};return s},no=(e,t)=>{const[n,s,r]=t,{x:i,y:o}=e,l=(s.y-r.y)*(n.x-r.x)+(r.x-s.x)*(n.y-r.y);if(Math.abs(l)<1e-4)return!1;const m=((s.y-r.y)*(i-r.x)+(r.x-s.x)*(o-r.y))/l,f=((r.y-n.y)*(i-r.x)+(n.x-r.x)*(o-r.y))/l,u=1-m-f;return m>=-.001&&f>=-.001&&u>=-.001},so=(e,t)=>{if(!e||!t||e.length!==3||t.length!==3)return!1;const n=e.map(r=>r.name).sort(),s=t.map(r=>r.name).sort();return n.every((r,i)=>r===s[i])},ro=(e,t)=>{if(!e||!t||e.length!==t.length)return!1;const n=e.map(r=>r.name).sort(),s=t.map(r=>r.name).sort();return n.join("")===s.join("")},oo=()=>[{from:"A",to:"B"},{from:"A",to:"C"},{from:"B",to:"C"},{from:"D",to:"E"},{from:"M",to:"N"},{from:"P",to:"Q"},{from:"A",to:"D"},{from:"A",to:"E"},{from:"A",to:"M"},{from:"A",to:"N"},{from:"A",to:"P"},{from:"A",to:"Q"},{from:"D",to:"U"},{from:"U",to:"S"},{from:"S",to:"E"},{from:"M",to:"K"},{from:"K",to:"L"},{from:"L",to:"N"},{from:"B",to:"P"},{from:"P",to:"Q"},{from:"Q",to:"C"}],io=()=>[{id:"gem_1",vertices:["A","B","P"],points:10,category:"basic"},{id:"gem_2",vertices:["A","P","Q"],points:10,category:"basic"},{id:"gem_3",vertices:["A","Q","C"],points:10,category:"basic"},{id:"gem_4",vertices:["A","B","Q"],points:15,category:"medium"},{id:"gem_5",vertices:["A","P","C"],points:15,category:"medium"},{id:"gem_6",vertices:["A","B","C"],points:20,category:"large"},{id:"gem_7",vertices:["A","D","U"],points:12,category:"ade_small"},{id:"gem_8",vertices:["A","U","S"],points:12,category:"ade_small"},{id:"gem_9",vertices:["A","S","E"],points:12,category:"ade_small"},{id:"gem_10",vertices:["A","D","S"],points:18,category:"ade_medium"},{id:"gem_11",vertices:["A","U","E"],points:18,category:"ade_medium"},{id:"gem_12",vertices:["A","D","E"],points:25,category:"ade_large"},{id:"gem_13",vertices:["A","M","K"],points:14,category:"amn_small"},{id:"gem_14",vertices:["A","K","L"],points:14,category:"amn_small"},{id:"gem_15",vertices:["A","L","N"],points:14,category:"amn_small"},{id:"gem_16",vertices:["A","M","L"],points:20,category:"amn_medium"},{id:"gem_17",vertices:["A","K","N"],points:20,category:"amn_medium"},{id:"gem_18",vertices:["A","M","N"],points:30,category:"amn_large"}],ao={TOTAL_GEMS:18,CANVAS_RATIO:4/3,DEFAULT_VIEWBOX:{width:700,height:600},POINT_RADIUS:{default:6,selected:9},TOLERANCE:.001,MIN_TRIANGLE_AREA:.001,COORDINATE_PRECISION:1e-4,BARYCENTRIC_TOLERANCE:-.001},Rn=(e=Re.id)=>{const t=H.units.map((r,i)=>{const o=Math.min(100,Math.max(0,i*15+Math.random()*20)),l=Math.floor(r.lessons.length*o/100),m=r.lessons.map((f,u)=>{const h=Math.min(100,Math.max(0,o-u*10+Math.random()*30));return{lessonId:f.id,status:h>=100?"completed":h>0?"in-progress":"not-started",progressPercentage:Math.round(h),lastAccessed:h>0?new Date(Date.now()-Math.random()*7*24*60*60*1e3).toISOString():void 0,timeSpent:h>0?Math.floor(Math.random()*120+10):void 0,score:h>=100?Math.floor(Math.random()*21+80):void 0,attempts:h>0?Math.floor(Math.random()*3+1):void 0}});return{unitId:r.id,userId:e,totalLessons:r.lessons.length,completedLessons:l,progressPercentage:Math.round(o),status:o>=100?"completed":o>0?"in-progress":"not-started",lastAccessed:o>0?new Date(Date.now()-Math.random()*14*24*60*60*1e3).toISOString():void 0,lessons:m}}),n=t.reduce((r,i)=>r+i.progressPercentage,0)/t.length,s=t.filter(r=>r.status==="completed").length;return{courseId:H.id,userId:e,totalUnits:t.length,completedUnits:s,progressPercentage:Math.round(n),status:n>=100?"completed":n>0?"in-progress":"not-started",lastAccessed:new Date(Date.now()-Math.random()*3*24*60*60*1e3).toISOString(),units:t}},kn=Rn(),dt=(e,t)=>e===Re.id&&t===H.id?kn:null,Nn=(e,t,n)=>{const s=dt(e,t);return s&&s.units.find(r=>r.unitId===n)||null},lo=(e,t,n,s)=>{const r=Nn(e,t,n);return r&&r.lessons.find(i=>i.lessonId===s)||null},co=(e,t,n,s,r)=>(console.log("Updating lesson progress:",{userId:e,courseId:t,unitId:n,lessonId:s,progress:r}),!0),ft=(e,t)=>{const n=dt(e,t);if(!n)return null;const s=H.units.map((r,i)=>{const o=n.units.find(l=>l.unitId===r.id);return{unitId:r.id,title:r.title,description:r.description,moduleCategory:r.moduleCategory,estimatedDuration:r.estimatedDuration,totalLessons:r.lessons.length,completedLessons:o?.completedLessons||0,progressPercentage:o?.progressPercentage||0,status:o?.status||"not-started",lastAccessed:o?.lastAccessed,isActive:i===0,route:`/math/grade-${H.level}/unit/${r.id}`}});return{userId:e,courseId:H.id,courseTitle:H.title,courseLevel:H.level,totalUnits:s.length,completedUnits:s.filter(r=>r.status==="completed").length,overallProgress:n.progressPercentage,status:n.status,lastAccessed:n.lastAccessed,units:s}},uo=(e,t,n)=>{const s=ft(e,t);return s&&s.units.find(r=>r.unitId===n)||null},fo=(e,t,n,s)=>(console.log("Updating unit active status:",{userId:e,courseId:t,unitId:n,isActive:s}),!0),mo=ft(Re.id,H.id),po={userId:Re.id,courseId:H.id,courseTitle:H.title,courseLevel:H.level,totalUnits:H.units.length,completedUnits:3,overallProgress:45,status:"in-progress",lastAccessed:"2024-01-15T10:30:00Z",units:[{unitId:"unit_1",title:"小数乘法",description:"学习小数乘法的计算方法及应用",moduleCategory:"Arithmetic and Algebra",estimatedDuration:"3周",totalLessons:10,completedLessons:8,progressPercentage:80,status:"completed",lastAccessed:"2024-01-10T14:20:00Z",isActive:!1,route:"/math/grade-5/unit/unit_1",icon:"🔢"},{unitId:"unit_2",title:"小数除法",description:"学习小数除法的计算方法及应用",moduleCategory:"Arithmetic and Algebra",estimatedDuration:"3周",totalLessons:12,completedLessons:6,progressPercentage:50,status:"in-progress",lastAccessed:"2024-01-15T10:30:00Z",isActive:!0,route:"/math/grade-5/unit/unit_2",icon:"➗"},{unitId:"unit_3",title:"简易方程",description:"学习用字母表示数和解简易方程",moduleCategory:"Arithmetic and Algebra",estimatedDuration:"4周",totalLessons:14,completedLessons:2,progressPercentage:14,status:"in-progress",lastAccessed:"2024-01-12T16:45:00Z",isActive:!1,route:"/math/grade-5/unit/unit_3",icon:"📝"},{unitId:"unit_4",title:"多边形的面积",description:"学习平行四边形、三角形、梯形和组合图形的面积计算",moduleCategory:"Graphics and Geometry",estimatedDuration:"3周",totalLessons:12,completedLessons:0,progressPercentage:0,status:"not-started",isActive:!1,route:"/math/grade-5/unit/unit_4",icon:"📐"},{unitId:"unit_5",title:"因数与倍数",description:"学习因数、倍数、质数、合数等概念",moduleCategory:"Arithmetic and Algebra",estimatedDuration:"3周",totalLessons:10,completedLessons:0,progressPercentage:0,status:"not-started",isActive:!1,route:"/math/grade-5/unit/unit_5",icon:"🔢"},{unitId:"unit_6",title:"长方体和正方体",description:"学习长方体和正方体的特征、表面积和体积计算",moduleCategory:"Graphics and Geometry",estimatedDuration:"4周",totalLessons:14,completedLessons:0,progressPercentage:0,status:"not-started",isActive:!1,route:"/math/grade-5/unit/unit_6",icon:"📦"},{unitId:"unit_7",title:"分数的意义和性质",description:"学习分数的意义、性质和约分、通分等方法",moduleCategory:"Arithmetic and Algebra",estimatedDuration:"4周",totalLessons:16,completedLessons:0,progressPercentage:0,status:"not-started",isActive:!1,route:"/math/grade-5/unit/unit_7",icon:"½"},{unitId:"unit_8",title:"分数的加法和减法",description:"学习同分母分数、异分母分数的加法和减法",moduleCategory:"Arithmetic and Algebra",estimatedDuration:"3周",totalLessons:12,completedLessons:0,progressPercentage:0,status:"not-started",isActive:!1,route:"/math/grade-5/unit/unit_8",icon:"➕"},{unitId:"unit_9",title:"折线统计图",description:"学习单式折线统计图和复式折线统计图的认识和制作",moduleCategory:"Probability and Statistics",estimatedDuration:"2周",totalLessons:6,completedLessons:0,progressPercentage:0,status:"not-started",isActive:!1,route:"/math/grade-5/unit/unit_9",icon:"📊"}]};v.AbilityAssessmentDashboard=Wr,v.AbilityProgressBar=vn,v.Button=St,v.ContentAccordion=kt,v.GEOMETRY_CONFIG=ao,v.GradeUnitBrowserPage=Qr,v.GradeUnitBrowserProvider=Zr,v.MOCK_USER_COURSE_PROGRESS=kn,v.MOCK_USER_GRADE_UNITS_NAV=mo,v.MOCK_USER_GRADE_UNITS_PROGRESS=po,v.MathWizHeader=_n,v.PersonalizedAdvicePanel=En,v.RadarChart=bn,v.RecommendationCard=Sn,v.Sidebar=Nt,v.Submenu=Xe,v.UserProfile=gn,v.calculateGamePoints=eo,v.categoryIcons=ct,v.comparePointArrays=ro,v.courseData=H,v.exploreItems=Yr,v.generateMockUserCourseProgress=Rn,v.getBasicGemDefinitions=io,v.getBasicLineDefinitions=oo,v.getUnitNavItem=uo,v.getUserCourseProgress=dt,v.getUserGradeUnitsNav=ft,v.getUserLessonProgress=lo,v.getUserUnitProgress=Nn,v.isPointInTriangle=no,v.pointOnLine=te,v.statusColors=Jr,v.statusMapping=zr,v.toPixelCoordinates=to,v.trianglesMatch=so,v.updateUnitActiveStatus=fo,v.updateUserLessonProgress=co,v.useGradeUnitBrowser=Cn,v.userData=Xr,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})}));
77
71
  //# sourceMappingURL=index.cjs.map