@mp-front/components 0.0.1-next-0 → 0.0.1-next-2

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.
Files changed (51) hide show
  1. package/dist/components/grid/col/col.component.d.ts +4 -0
  2. package/dist/components/grid/col/col.component.d.ts.map +1 -0
  3. package/dist/components/grid/col/index.d.ts +2 -0
  4. package/dist/components/grid/col/index.d.ts.map +1 -0
  5. package/dist/components/grid/grid.stories.d.ts +52 -0
  6. package/dist/components/grid/grid.stories.d.ts.map +1 -0
  7. package/dist/components/grid/grid.test.d.ts +2 -0
  8. package/dist/components/grid/grid.test.d.ts.map +1 -0
  9. package/dist/components/grid/grid.types.d.ts +33 -0
  10. package/dist/components/grid/grid.types.d.ts.map +1 -0
  11. package/dist/components/grid/index.d.ts +3 -0
  12. package/dist/components/grid/index.d.ts.map +1 -0
  13. package/dist/components/grid/row/index.d.ts +2 -0
  14. package/dist/components/grid/row/index.d.ts.map +1 -0
  15. package/dist/components/grid/row/row.component.d.ts +4 -0
  16. package/dist/components/grid/row/row.component.d.ts.map +1 -0
  17. package/dist/components/index.d.ts +3 -0
  18. package/dist/components/index.d.ts.map +1 -1
  19. package/dist/components/tabs/index.d.ts +3 -0
  20. package/dist/components/tabs/index.d.ts.map +1 -0
  21. package/dist/components/tabs/tabs.component.d.ts +4 -0
  22. package/dist/components/tabs/tabs.component.d.ts.map +1 -0
  23. package/dist/components/tabs/tabs.stories.d.ts +8 -0
  24. package/dist/components/tabs/tabs.stories.d.ts.map +1 -0
  25. package/dist/components/tabs/tabs.styles.d.ts +15 -0
  26. package/dist/components/tabs/tabs.styles.d.ts.map +1 -0
  27. package/dist/components/tabs/tabs.test.d.ts +2 -0
  28. package/dist/components/tabs/tabs.test.d.ts.map +1 -0
  29. package/dist/components/tabs/tabs.types.d.ts +19 -0
  30. package/dist/components/tabs/tabs.types.d.ts.map +1 -0
  31. package/dist/components/tabs/tabs.utils.d.ts +6 -0
  32. package/dist/components/tabs/tabs.utils.d.ts.map +1 -0
  33. package/dist/components/tabs/tabsContent.d.ts +10 -0
  34. package/dist/components/tabs/tabsContent.d.ts.map +1 -0
  35. package/dist/components/tabs/tabsList.d.ts +11 -0
  36. package/dist/components/tabs/tabsList.d.ts.map +1 -0
  37. package/dist/{index-7ocIcUgh.cjs → index-B2DyV2Jl.cjs} +1 -1
  38. package/dist/{index-ChBRNDqP.js → index-CcUNk-y0.js} +6 -5
  39. package/dist/styles.css +1 -1
  40. package/dist/ui-components-hooks.js +1 -1
  41. package/dist/ui-components-index.cjs +39 -39
  42. package/dist/ui-components-index.js +6762 -6477
  43. package/dist/ui-components-utils.cjs +1 -1
  44. package/dist/ui-components-utils.js +6 -5
  45. package/dist/utils/classNames.d.ts +1 -0
  46. package/dist/utils/classNames.d.ts.map +1 -1
  47. package/package.json +11 -11
  48. package/dist/constants/tailwind-config/index.d.ts +0 -3
  49. package/dist/constants/tailwind-config/index.d.ts.map +0 -1
  50. package/dist/ui-components-tailwind.cjs +0 -1
  51. package/dist/ui-components-tailwind.js +0 -9
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("react"),j=require("./index-7ocIcUgh.cjs"),ya=require("react-dom"),ce=require("./skeleton-avatar-Ce_osCsT.cjs"),sd=require("./use-controlled-state-H7oMYjxi.cjs");function ad(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 y=ad(_),ni=ad(ya);function cd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Or={exports:{}},On={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("react"),N=require("./index-B2DyV2Jl.cjs"),xa=require("react-dom"),ce=require("./skeleton-avatar-Ce_osCsT.cjs"),dd=require("./use-controlled-state-H7oMYjxi.cjs");function hd(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 y=hd(_),oi=hd(xa);function pd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ir={exports:{}},Mn={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Uc;function dy(){if(Uc)return On;Uc=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,s){var c=null;if(s!==void 0&&(c=""+s),o.key!==void 0&&(c=""+o.key),"key"in o){s={};for(var u in o)u!=="key"&&(s[u]=o[u])}else s=o;return o=s.ref,{$$typeof:e,type:r,key:c,ref:o!==void 0?o:null,props:s}}return On.Fragment=t,On.jsx=n,On.jsxs=n,On}var Mn={};/**
9
+ */var qc;function Ty(){if(qc)return Mn;qc=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,i){var c=null;if(i!==void 0&&(c=""+i),o.key!==void 0&&(c=""+o.key),"key"in o){i={};for(var u in o)u!=="key"&&(i[u]=o[u])}else i=o;return o=i.ref,{$$typeof:e,type:r,key:c,ref:o!==void 0?o:null,props:i}}return Mn.Fragment=t,Mn.jsx=n,Mn.jsxs=n,Mn}var In={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,31 +14,31 @@
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 Gc;function hy(){return Gc||(Gc=1,process.env.NODE_ENV!=="production"&&(function(){function e(C){if(C==null)return null;if(typeof C=="function")return C.$$typeof===U?null:C.displayName||C.name||null;if(typeof C=="string")return C;switch(C){case T:return"Fragment";case S:return"Portal";case A:return"Profiler";case P:return"StrictMode";case D:return"Suspense";case F:return"SuspenseList"}if(typeof C=="object")switch(typeof C.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),C.$$typeof){case R:return(C.displayName||"Context")+".Provider";case O:return(C._context.displayName||"Context")+".Consumer";case I:var Q=C.render;return C=C.displayName,C||(C=Q.displayName||Q.name||"",C=C!==""?"ForwardRef("+C+")":"ForwardRef"),C;case B:return Q=C.displayName||null,Q!==null?Q:e(C.type)||"Memo";case q:Q=C._payload,C=C._init;try{return e(C(Q))}catch{}}return null}function t(C){return""+C}function n(C){try{t(C);var Q=!1}catch{Q=!0}if(Q){Q=console;var J=Q.error,le=typeof Symbol=="function"&&Symbol.toStringTag&&C[Symbol.toStringTag]||C.constructor.name||"Object";return J.call(Q,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",le),t(C)}}function r(){}function o(){if(X===0){ie=console.log,te=console.info,V=console.warn,K=console.error,Z=console.group,W=console.groupCollapsed,oe=console.groupEnd;var C={configurable:!0,enumerable:!0,value:r,writable:!0};Object.defineProperties(console,{info:C,log:C,warn:C,error:C,group:C,groupCollapsed:C,groupEnd:C})}X++}function s(){if(X--,X===0){var C={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:k({},C,{value:ie}),info:k({},C,{value:te}),warn:k({},C,{value:V}),error:k({},C,{value:K}),group:k({},C,{value:Z}),groupCollapsed:k({},C,{value:W}),groupEnd:k({},C,{value:oe})})}0>X&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function c(C){if(N===void 0)try{throw Error()}catch(J){var Q=J.stack.trim().match(/\n( *(at )?)/);N=Q&&Q[1]||"",he=-1<J.stack.indexOf(`
17
+ */var Kc;function Py(){return Kc||(Kc=1,process.env.NODE_ENV!=="production"&&(function(){function e(C){if(C==null)return null;if(typeof C=="function")return C.$$typeof===U?null:C.displayName||C.name||null;if(typeof C=="string")return C;switch(C){case A:return"Fragment";case E:return"Portal";case T:return"Profiler";case R:return"StrictMode";case j:return"Suspense";case V:return"SuspenseList"}if(typeof C=="object")switch(typeof C.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),C.$$typeof){case P:return(C.displayName||"Context")+".Provider";case I:return(C._context.displayName||"Context")+".Consumer";case M:var Q=C.render;return C=C.displayName,C||(C=Q.displayName||Q.name||"",C=C!==""?"ForwardRef("+C+")":"ForwardRef"),C;case $:return Q=C.displayName||null,Q!==null?Q:e(C.type)||"Memo";case K:Q=C._payload,C=C._init;try{return e(C(Q))}catch{}}return null}function t(C){return""+C}function n(C){try{t(C);var Q=!1}catch{Q=!0}if(Q){Q=console;var J=Q.error,ue=typeof Symbol=="function"&&Symbol.toStringTag&&C[Symbol.toStringTag]||C.constructor.name||"Object";return J.call(Q,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ue),t(C)}}function r(){}function o(){if(X===0){ie=console.log,te=console.info,F=console.warn,Y=console.error,Z=console.group,q=console.groupCollapsed,oe=console.groupEnd;var C={configurable:!0,enumerable:!0,value:r,writable:!0};Object.defineProperties(console,{info:C,log:C,warn:C,error:C,group:C,groupCollapsed:C,groupEnd:C})}X++}function i(){if(X--,X===0){var C={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:k({},C,{value:ie}),info:k({},C,{value:te}),warn:k({},C,{value:F}),error:k({},C,{value:Y}),group:k({},C,{value:Z}),groupCollapsed:k({},C,{value:q}),groupEnd:k({},C,{value:oe})})}0>X&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function c(C){if(D===void 0)try{throw Error()}catch(J){var Q=J.stack.trim().match(/\n( *(at )?)/);D=Q&&Q[1]||"",he=-1<J.stack.indexOf(`
18
18
  at`)?" (<anonymous>)":-1<J.stack.indexOf("@")?"@unknown:0:0":""}return`
19
- `+N+C+he}function u(C,Q){if(!C||Ee)return"";var J=$e.get(C);if(J!==void 0)return J;Ee=!0,J=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var le=null;le=L.H,L.H=null,o();try{var Re={DetermineComponentFrameRoot:function(){try{if(Q){var yt=function(){throw Error()};if(Object.defineProperty(yt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(yt,[])}catch(ft){var Ar=ft}Reflect.construct(C,[],yt)}else{try{yt.call()}catch(ft){Ar=ft}C.call(yt.prototype)}}else{try{throw Error()}catch(ft){Ar=ft}(yt=C())&&typeof yt.catch=="function"&&yt.catch(function(){})}}catch(ft){if(ft&&Ar&&typeof ft.stack=="string")return[ft.stack,Ar.stack]}return[null,null]}};Re.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var me=Object.getOwnPropertyDescriptor(Re.DetermineComponentFrameRoot,"name");me&&me.configurable&&Object.defineProperty(Re.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var se=Re.DetermineComponentFrameRoot(),ut=se[0],Xt=se[1];if(ut&&Xt){var Ae=ut.split(`
20
- `),Nt=Xt.split(`
21
- `);for(se=me=0;me<Ae.length&&!Ae[me].includes("DetermineComponentFrameRoot");)me++;for(;se<Nt.length&&!Nt[se].includes("DetermineComponentFrameRoot");)se++;if(me===Ae.length||se===Nt.length)for(me=Ae.length-1,se=Nt.length-1;1<=me&&0<=se&&Ae[me]!==Nt[se];)se--;for(;1<=me&&0<=se;me--,se--)if(Ae[me]!==Nt[se]){if(me!==1||se!==1)do if(me--,se--,0>se||Ae[me]!==Nt[se]){var An=`
22
- `+Ae[me].replace(" at new "," at ");return C.displayName&&An.includes("<anonymous>")&&(An=An.replace("<anonymous>",C.displayName)),typeof C=="function"&&$e.set(C,An),An}while(1<=me&&0<=se);break}}}finally{Ee=!1,L.H=le,s(),Error.prepareStackTrace=J}return Ae=(Ae=C?C.displayName||C.name:"")?c(Ae):"",typeof C=="function"&&$e.set(C,Ae),Ae}function l(C){if(C==null)return"";if(typeof C=="function"){var Q=C.prototype;return u(C,!(!Q||!Q.isReactComponent))}if(typeof C=="string")return c(C);switch(C){case D:return c("Suspense");case F:return c("SuspenseList")}if(typeof C=="object")switch(C.$$typeof){case I:return C=u(C.render,!1),C;case B:return l(C.type);case q:Q=C._payload,C=C._init;try{return l(C(Q))}catch{}}return""}function i(){var C=L.A;return C===null?null:C.getOwner()}function a(C){if(M.call(C,"key")){var Q=Object.getOwnPropertyDescriptor(C,"key").get;if(Q&&Q.isReactWarning)return!1}return C.key!==void 0}function f(C,Q){function J(){vt||(vt=!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)",Q))}J.isReactWarning=!0,Object.defineProperty(C,"key",{get:J,configurable:!0})}function d(){var C=e(this.type);return Pr[C]||(Pr[C]=!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.")),C=this.props.ref,C!==void 0?C:null}function h(C,Q,J,le,Re,me){return J=me.ref,C={$$typeof:E,type:C,key:Q,props:me,_owner:Re},(J!==void 0?J:null)!==null?Object.defineProperty(C,"ref",{enumerable:!1,get:d}):Object.defineProperty(C,"ref",{enumerable:!1,value:null}),C._store={},Object.defineProperty(C._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(C,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(C.props),Object.freeze(C)),C}function m(C,Q,J,le,Re,me){if(typeof C=="string"||typeof C=="function"||C===T||C===A||C===P||C===D||C===F||C===G||typeof C=="object"&&C!==null&&(C.$$typeof===q||C.$$typeof===B||C.$$typeof===R||C.$$typeof===O||C.$$typeof===I||C.$$typeof===ee||C.getModuleId!==void 0)){var se=Q.children;if(se!==void 0)if(le)if(ne(se)){for(le=0;le<se.length;le++)p(se[le],C);Object.freeze&&Object.freeze(se)}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 p(se,C)}else se="",(C===void 0||typeof C=="object"&&C!==null&&Object.keys(C).length===0)&&(se+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),C===null?le="null":ne(C)?le="array":C!==void 0&&C.$$typeof===E?(le="<"+(e(C.type)||"Unknown")+" />",se=" Did you accidentally export a JSX literal instead of a component?"):le=typeof C,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",le,se);if(M.call(Q,"key")){se=e(C);var ut=Object.keys(Q).filter(function(Ae){return Ae!=="key"});le=0<ut.length?"{key: someKey, "+ut.join(": ..., ")+": ...}":"{key: someKey}",Dt[se+le]||(ut=0<ut.length?"{"+ut.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
19
+ `+D+C+he}function u(C,Q){if(!C||Se)return"";var J=$e.get(C);if(J!==void 0)return J;Se=!0,J=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var ue=null;ue=L.H,L.H=null,o();try{var Te={DetermineComponentFrameRoot:function(){try{if(Q){var yt=function(){throw Error()};if(Object.defineProperty(yt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(yt,[])}catch(ft){var Mr=ft}Reflect.construct(C,[],yt)}else{try{yt.call()}catch(ft){Mr=ft}C.call(yt.prototype)}}else{try{throw Error()}catch(ft){Mr=ft}(yt=C())&&typeof yt.catch=="function"&&yt.catch(function(){})}}catch(ft){if(ft&&Mr&&typeof ft.stack=="string")return[ft.stack,Mr.stack]}return[null,null]}};Te.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var me=Object.getOwnPropertyDescriptor(Te.DetermineComponentFrameRoot,"name");me&&me.configurable&&Object.defineProperty(Te.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var se=Te.DetermineComponentFrameRoot(),ut=se[0],Qt=se[1];if(ut&&Qt){var Ae=ut.split(`
20
+ `),jt=Qt.split(`
21
+ `);for(se=me=0;me<Ae.length&&!Ae[me].includes("DetermineComponentFrameRoot");)me++;for(;se<jt.length&&!jt[se].includes("DetermineComponentFrameRoot");)se++;if(me===Ae.length||se===jt.length)for(me=Ae.length-1,se=jt.length-1;1<=me&&0<=se&&Ae[me]!==jt[se];)se--;for(;1<=me&&0<=se;me--,se--)if(Ae[me]!==jt[se]){if(me!==1||se!==1)do if(me--,se--,0>se||Ae[me]!==jt[se]){var On=`
22
+ `+Ae[me].replace(" at new "," at ");return C.displayName&&On.includes("<anonymous>")&&(On=On.replace("<anonymous>",C.displayName)),typeof C=="function"&&$e.set(C,On),On}while(1<=me&&0<=se);break}}}finally{Se=!1,L.H=ue,i(),Error.prepareStackTrace=J}return Ae=(Ae=C?C.displayName||C.name:"")?c(Ae):"",typeof C=="function"&&$e.set(C,Ae),Ae}function l(C){if(C==null)return"";if(typeof C=="function"){var Q=C.prototype;return u(C,!(!Q||!Q.isReactComponent))}if(typeof C=="string")return c(C);switch(C){case j:return c("Suspense");case V:return c("SuspenseList")}if(typeof C=="object")switch(C.$$typeof){case M:return C=u(C.render,!1),C;case $:return l(C.type);case K:Q=C._payload,C=C._init;try{return l(C(Q))}catch{}}return""}function s(){var C=L.A;return C===null?null:C.getOwner()}function a(C){if(O.call(C,"key")){var Q=Object.getOwnPropertyDescriptor(C,"key").get;if(Q&&Q.isReactWarning)return!1}return C.key!==void 0}function f(C,Q){function J(){vt||(vt=!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)",Q))}J.isReactWarning=!0,Object.defineProperty(C,"key",{get:J,configurable:!0})}function d(){var C=e(this.type);return Or[C]||(Or[C]=!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.")),C=this.props.ref,C!==void 0?C:null}function h(C,Q,J,ue,Te,me){return J=me.ref,C={$$typeof:S,type:C,key:Q,props:me,_owner:Te},(J!==void 0?J:null)!==null?Object.defineProperty(C,"ref",{enumerable:!1,get:d}):Object.defineProperty(C,"ref",{enumerable:!1,value:null}),C._store={},Object.defineProperty(C._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(C,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(C.props),Object.freeze(C)),C}function m(C,Q,J,ue,Te,me){if(typeof C=="string"||typeof C=="function"||C===A||C===T||C===R||C===j||C===V||C===G||typeof C=="object"&&C!==null&&(C.$$typeof===K||C.$$typeof===$||C.$$typeof===P||C.$$typeof===I||C.$$typeof===M||C.$$typeof===ee||C.getModuleId!==void 0)){var se=Q.children;if(se!==void 0)if(ue)if(ne(se)){for(ue=0;ue<se.length;ue++)p(se[ue],C);Object.freeze&&Object.freeze(se)}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 p(se,C)}else se="",(C===void 0||typeof C=="object"&&C!==null&&Object.keys(C).length===0)&&(se+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),C===null?ue="null":ne(C)?ue="array":C!==void 0&&C.$$typeof===S?(ue="<"+(e(C.type)||"Unknown")+" />",se=" Did you accidentally export a JSX literal instead of a component?"):ue=typeof C,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ue,se);if(O.call(Q,"key")){se=e(C);var ut=Object.keys(Q).filter(function(Ae){return Ae!=="key"});ue=0<ut.length?"{key: someKey, "+ut.join(": ..., ")+": ...}":"{key: someKey}",Nt[se+ue]||(ut=0<ut.length?"{"+ut.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
23
23
  let props = %s;
24
24
  <%s {...props} />
25
25
  React keys must be passed directly to JSX without using spread:
26
26
  let props = %s;
27
- <%s key={someKey} {...props} />`,le,se,ut,se),Dt[se+le]=!0)}if(se=null,J!==void 0&&(n(J),se=""+J),a(Q)&&(n(Q.key),se=""+Q.key),"key"in Q){J={};for(var Xt in Q)Xt!=="key"&&(J[Xt]=Q[Xt])}else J=Q;return se&&f(J,typeof C=="function"?C.displayName||C.name||"Unknown":C),h(C,se,me,Re,i(),J)}function p(C,Q){if(typeof C=="object"&&C&&C.$$typeof!==It){if(ne(C))for(var J=0;J<C.length;J++){var le=C[J];v(le)&&x(le,Q)}else if(v(C))C._store&&(C._store.validated=1);else if(C===null||typeof C!="object"?J=null:(J=H&&C[H]||C["@@iterator"],J=typeof J=="function"?J:null),typeof J=="function"&&J!==C.entries&&(J=J.call(C),J!==C))for(;!(C=J.next()).done;)v(C.value)&&x(C.value,Q)}}function v(C){return typeof C=="object"&&C!==null&&C.$$typeof===E}function x(C,Q){if(C._store&&!C._store.validated&&C.key==null&&(C._store.validated=1,Q=b(Q),!$c[Q])){$c[Q]=!0;var J="";C&&C._owner!=null&&C._owner!==i()&&(J=null,typeof C._owner.tag=="number"?J=e(C._owner.type):typeof C._owner.name=="string"&&(J=C._owner.name),J=" It was passed a child from "+J+".");var le=L.getCurrentStack;L.getCurrentStack=function(){var Re=l(C.type);return le&&(Re+=le()||""),Re},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',Q,J),L.getCurrentStack=le}}function b(C){var Q="",J=i();return J&&(J=e(J.type))&&(Q=`
27
+ <%s key={someKey} {...props} />`,ue,se,ut,se),Nt[se+ue]=!0)}if(se=null,J!==void 0&&(n(J),se=""+J),a(Q)&&(n(Q.key),se=""+Q.key),"key"in Q){J={};for(var Qt in Q)Qt!=="key"&&(J[Qt]=Q[Qt])}else J=Q;return se&&f(J,typeof C=="function"?C.displayName||C.name||"Unknown":C),h(C,se,me,Te,s(),J)}function p(C,Q){if(typeof C=="object"&&C&&C.$$typeof!==It){if(ne(C))for(var J=0;J<C.length;J++){var ue=C[J];v(ue)&&x(ue,Q)}else if(v(C))C._store&&(C._store.validated=1);else if(C===null||typeof C!="object"?J=null:(J=H&&C[H]||C["@@iterator"],J=typeof J=="function"?J:null),typeof J=="function"&&J!==C.entries&&(J=J.call(C),J!==C))for(;!(C=J.next()).done;)v(C.value)&&x(C.value,Q)}}function v(C){return typeof C=="object"&&C!==null&&C.$$typeof===S}function x(C,Q){if(C._store&&!C._store.validated&&C.key==null&&(C._store.validated=1,Q=b(Q),!Wc[Q])){Wc[Q]=!0;var J="";C&&C._owner!=null&&C._owner!==s()&&(J=null,typeof C._owner.tag=="number"?J=e(C._owner.type):typeof C._owner.name=="string"&&(J=C._owner.name),J=" It was passed a child from "+J+".");var ue=L.getCurrentStack;L.getCurrentStack=function(){var Te=l(C.type);return ue&&(Te+=ue()||""),Te},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',Q,J),L.getCurrentStack=ue}}function b(C){var Q="",J=s();return J&&(J=e(J.type))&&(Q=`
28
28
 
29
29
  Check the render method of \``+J+"`."),Q||(C=e(C))&&(Q=`
30
30
 
31
- Check the top-level render call using <`+C+">."),Q}var w=_,E=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),R=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),G=Symbol.for("react.offscreen"),H=Symbol.iterator,U=Symbol.for("react.client.reference"),L=w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=Object.prototype.hasOwnProperty,k=Object.assign,ee=Symbol.for("react.client.reference"),ne=Array.isArray,X=0,ie,te,V,K,Z,W,oe;r.__reactDisabledLog=!0;var N,he,Ee=!1,$e=new(typeof WeakMap=="function"?WeakMap:Map),It=Symbol.for("react.client.reference"),vt,Pr={},Dt={},$c={};Mn.Fragment=T,Mn.jsx=function(C,Q,J,le,Re){return m(C,Q,J,!1,le,Re)},Mn.jsxs=function(C,Q,J,le,Re){return m(C,Q,J,!0,le,Re)}})()),Mn}var Hc;function py(){return Hc||(Hc=1,process.env.NODE_ENV==="production"?Or.exports=dy():Or.exports=hy()),Or.exports}var g=py();const ld={sm:"size-8",md:"size-12",lg:"size-16",xl:"size-20"},my=({size:e="sm",text:t,className:n,color:r="border-t-blue-500"})=>g.jsx("div",{className:"grid gap-4 place-content-center",children:g.jsxs("div",{className:"flex flex-col items-center",children:[g.jsx("output",{className:j.classNames(ld[e],"animate-spin rounded-full border-4",r,n),"aria-busy":"true"}),!!t&&g.jsx("span",{className:"flex justify-center",children:t})]})});function zc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ri(...e){return t=>{let n=!1;const r=e.map(o=>{const s=zc(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():zc(e[o],null)}}}}function re(...e){return y.useCallback(ri(...e),e)}function St(e){const t=gy(e),n=y.forwardRef((r,o)=>{const{children:s,...c}=r,u=y.Children.toArray(s),l=u.find(yy);if(l){const i=l.props.children,a=u.map(f=>f===l?y.Children.count(i)>1?y.Children.only(null):y.isValidElement(i)?i.props.children:null:f);return g.jsx(t,{...c,ref:o,children:y.isValidElement(i)?y.cloneElement(i,void 0,a):null})}return g.jsx(t,{...c,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var ud=St("Slot");function gy(e){const t=y.forwardRef((n,r)=>{const{children:o,...s}=n;if(y.isValidElement(o)){const c=by(o),u=xy(s,o.props);return o.type!==y.Fragment&&(u.ref=r?ri(r,c):c),y.cloneElement(o,u)}return y.Children.count(o)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var fd=Symbol("radix.slottable");function vy(e){const t=({children:n})=>g.jsx(g.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=fd,t}function yy(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===fd}function xy(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...u)=>{const l=s(...u);return o(...u),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function by(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var wy=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],z=wy.reduce((e,t)=>{const n=St(`Primitive.${t}`),r=y.forwardRef((o,s)=>{const{asChild:c,...u}=o,l=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(l,{...u,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function dd(e,t){e&&ni.flushSync(()=>e.dispatchEvent(t))}var hd=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Ey="VisuallyHidden",pd=y.forwardRef((e,t)=>g.jsx(z.span,{...e,ref:t,style:{...hd,...e.style}}));pd.displayName=Ey;var Sy=pd;function Cy(e,t){const n=y.createContext(t),r=s=>{const{children:c,...u}=s,l=y.useMemo(()=>u,Object.values(u));return g.jsx(n.Provider,{value:l,children:c})};r.displayName=e+"Provider";function o(s){const c=y.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function Ce(e,t=[]){let n=[];function r(s,c){const u=y.createContext(c),l=n.length;n=[...n,c];const i=f=>{var x;const{scope:d,children:h,...m}=f,p=((x=d==null?void 0:d[e])==null?void 0:x[l])||u,v=y.useMemo(()=>m,Object.values(m));return g.jsx(p.Provider,{value:v,children:h})};i.displayName=s+"Provider";function a(f,d){var p;const h=((p=d==null?void 0:d[e])==null?void 0:p[l])||u,m=y.useContext(h);if(m)return m;if(c!==void 0)return c;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[i,a]}const o=()=>{const s=n.map(c=>y.createContext(c));return function(u){const l=(u==null?void 0:u[e])||s;return y.useMemo(()=>({[`__scope${e}`]:{...u,[e]:l}}),[u,l])}};return o.scopeName=e,[r,_y(o,...t)]}function _y(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const c=r.reduce((u,{useScope:l,scopeName:i})=>{const f=l(s)[`__scope${i}`];return{...u,...f}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function ir(e){const t=e+"CollectionProvider",[n,r]=Ce(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=p=>{const{scope:v,children:x}=p,b=_.useRef(null),w=_.useRef(new Map).current;return g.jsx(o,{scope:v,itemMap:w,collectionRef:b,children:x})};c.displayName=t;const u=e+"CollectionSlot",l=St(u),i=_.forwardRef((p,v)=>{const{scope:x,children:b}=p,w=s(u,x),E=re(v,w.collectionRef);return g.jsx(l,{ref:E,children:b})});i.displayName=u;const a=e+"CollectionItemSlot",f="data-radix-collection-item",d=St(a),h=_.forwardRef((p,v)=>{const{scope:x,children:b,...w}=p,E=_.useRef(null),S=re(v,E),T=s(a,x);return _.useEffect(()=>(T.itemMap.set(E,{ref:E,...w}),()=>void T.itemMap.delete(E))),g.jsx(d,{[f]:"",ref:S,children:b})});h.displayName=a;function m(p){const v=s(e+"CollectionConsumer",p);return _.useCallback(()=>{const b=v.collectionRef.current;if(!b)return[];const w=Array.from(b.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((T,P)=>w.indexOf(T.ref.current)-w.indexOf(P.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:c,Slot:i,ItemSlot:h},m,r]}function $(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var we=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},Ry=y[" useInsertionEffect ".trim().toString()]||we;function Ne({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,c]=Ty({defaultProp:t,onChange:n}),u=e!==void 0,l=u?e:o;{const a=y.useRef(e!==void 0);y.useEffect(()=>{const f=a.current;f!==u&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),a.current=u},[u,r])}const i=y.useCallback(a=>{var f;if(u){const d=Py(a)?a(e):a;d!==e&&((f=c.current)==null||f.call(c,d))}else s(a)},[u,e,s,c]);return[l,i]}function Ty({defaultProp:e,onChange:t}){const[n,r]=y.useState(e),o=y.useRef(n),s=y.useRef(t);return Ry(()=>{s.current=t},[t]),y.useEffect(()=>{var c;o.current!==n&&((c=s.current)==null||c.call(s,n),o.current=n)},[n,o]),[n,r,s]}function Py(e){return typeof e=="function"}function Ay(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var je=e=>{const{present:t,children:n}=e,r=Oy(t),o=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),s=re(r.ref,My(o));return typeof n=="function"||r.isPresent?y.cloneElement(o,{ref:s}):null};je.displayName="Presence";function Oy(e){const[t,n]=y.useState(),r=y.useRef(null),o=y.useRef(e),s=y.useRef("none"),c=e?"mounted":"unmounted",[u,l]=Ay(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const i=Mr(r.current);s.current=u==="mounted"?i:"none"},[u]),we(()=>{const i=r.current,a=o.current;if(a!==e){const d=s.current,h=Mr(i);e?l("MOUNT"):h==="none"||(i==null?void 0:i.display)==="none"?l("UNMOUNT"):l(a&&d!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),we(()=>{if(t){let i;const a=t.ownerDocument.defaultView??window,f=h=>{const p=Mr(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&p&&(l("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",i=a.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},d=h=>{h.target===t&&(s.current=Mr(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{a.clearTimeout(i),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:y.useCallback(i=>{r.current=i?getComputedStyle(i):null,n(i)},[])}}function Mr(e){return(e==null?void 0:e.animationName)||"none"}function My(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Iy=y[" useId ".trim().toString()]||(()=>{}),Dy=0;function Pe(e){const[t,n]=y.useState(Iy());return we(()=>{n(r=>r??String(Dy++))},[e]),t?`radix-${t}`:""}var oi="Collapsible",[Ny,md]=Ce(oi),[jy,xa]=Ny(oi),gd=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:s,onOpenChange:c,...u}=e,[l,i]=Ne({prop:r,defaultProp:o??!1,onChange:c,caller:oi});return g.jsx(jy,{scope:n,disabled:s,contentId:Pe(),open:l,onOpenToggle:y.useCallback(()=>i(a=>!a),[i]),children:g.jsx(z.div,{"data-state":wa(l),"data-disabled":s?"":void 0,...u,ref:t})})});gd.displayName=oi;var vd="CollapsibleTrigger",yd=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=xa(vd,n);return g.jsx(z.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":wa(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:$(e.onClick,o.onOpenToggle)})});yd.displayName=vd;var ba="CollapsibleContent",xd=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=xa(ba,e.__scopeCollapsible);return g.jsx(je,{present:n||o.open,children:({present:s})=>g.jsx(ky,{...r,ref:t,present:s})})});xd.displayName=ba;var ky=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...s}=e,c=xa(ba,n),[u,l]=y.useState(r),i=y.useRef(null),a=re(t,i),f=y.useRef(0),d=f.current,h=y.useRef(0),m=h.current,p=c.open||u,v=y.useRef(p),x=y.useRef(void 0);return y.useEffect(()=>{const b=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(b)},[]),we(()=>{const b=i.current;if(b){x.current=x.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const w=b.getBoundingClientRect();f.current=w.height,h.current=w.width,v.current||(b.style.transitionDuration=x.current.transitionDuration,b.style.animationName=x.current.animationName),l(r)}},[c.open,r]),g.jsx(z.div,{"data-state":wa(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!p,...s,ref:a,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:p&&o})});function wa(e){return e?"open":"closed"}var Ly=gd,Fy=yd,Vy=xd,By=y.createContext(void 0);function yn(e){const t=y.useContext(By);return e||t||"ltr"}var et="Accordion",$y=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Ea,Uy,Gy]=ir(et),[ii]=Ce(et,[Gy,md]),Sa=md(),bd=_.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,s=r;return g.jsx(Ea.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?g.jsx(qy,{...s,ref:t}):g.jsx(Wy,{...o,ref:t})})});bd.displayName=et;var[wd,Hy]=ii(et),[Ed,zy]=ii(et,{collapsible:!1}),Wy=_.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:s=!1,...c}=e,[u,l]=Ne({prop:n,defaultProp:r??"",onChange:o,caller:et});return g.jsx(wd,{scope:e.__scopeAccordion,value:_.useMemo(()=>u?[u]:[],[u]),onItemOpen:l,onItemClose:_.useCallback(()=>s&&l(""),[s,l]),children:g.jsx(Ed,{scope:e.__scopeAccordion,collapsible:s,children:g.jsx(Sd,{...c,ref:t})})})}),qy=_.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=e,[c,u]=Ne({prop:n,defaultProp:r??[],onChange:o,caller:et}),l=_.useCallback(a=>u((f=[])=>[...f,a]),[u]),i=_.useCallback(a=>u((f=[])=>f.filter(d=>d!==a)),[u]);return g.jsx(wd,{scope:e.__scopeAccordion,value:c,onItemOpen:l,onItemClose:i,children:g.jsx(Ed,{scope:e.__scopeAccordion,collapsible:!0,children:g.jsx(Sd,{...s,ref:t})})})}),[Ky,si]=ii(et),Sd=_.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:s="vertical",...c}=e,u=_.useRef(null),l=re(u,t),i=Uy(n),f=yn(o)==="ltr",d=$(e.onKeyDown,h=>{var A;if(!$y.includes(h.key))return;const m=h.target,p=i().filter(O=>{var R;return!((R=O.ref.current)!=null&&R.disabled)}),v=p.findIndex(O=>O.ref.current===m),x=p.length;if(v===-1)return;h.preventDefault();let b=v;const w=0,E=x-1,S=()=>{b=v+1,b>E&&(b=w)},T=()=>{b=v-1,b<w&&(b=E)};switch(h.key){case"Home":b=w;break;case"End":b=E;break;case"ArrowRight":s==="horizontal"&&(f?S():T());break;case"ArrowDown":s==="vertical"&&S();break;case"ArrowLeft":s==="horizontal"&&(f?T():S());break;case"ArrowUp":s==="vertical"&&T();break}const P=b%x;(A=p[P].ref.current)==null||A.focus()});return g.jsx(Ky,{scope:n,disabled:r,direction:o,orientation:s,children:g.jsx(Ea.Slot,{scope:n,children:g.jsx(z.div,{...c,"data-orientation":s,ref:l,onKeyDown:r?void 0:d})})})}),Lo="AccordionItem",[Yy,Ca]=ii(Lo),Cd=_.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,s=si(Lo,n),c=Hy(Lo,n),u=Sa(n),l=Pe(),i=r&&c.value.includes(r)||!1,a=s.disabled||e.disabled;return g.jsx(Yy,{scope:n,open:i,disabled:a,triggerId:l,children:g.jsx(Ly,{"data-orientation":s.orientation,"data-state":Od(i),...u,...o,ref:t,disabled:a,open:i,onOpenChange:f=>{f?c.onItemOpen(r):c.onItemClose(r)}})})});Cd.displayName=Lo;var _d="AccordionHeader",Rd=_.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=si(et,n),s=Ca(_d,n);return g.jsx(z.h3,{"data-orientation":o.orientation,"data-state":Od(s.open),"data-disabled":s.disabled?"":void 0,...r,ref:t})});Rd.displayName=_d;var Rs="AccordionTrigger",Td=_.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=si(et,n),s=Ca(Rs,n),c=zy(Rs,n),u=Sa(n);return g.jsx(Ea.ItemSlot,{scope:n,children:g.jsx(Fy,{"aria-disabled":s.open&&!c.collapsible||void 0,"data-orientation":o.orientation,id:s.triggerId,...u,...r,ref:t})})});Td.displayName=Rs;var Pd="AccordionContent",Ad=_.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=si(et,n),s=Ca(Pd,n),c=Sa(n);return g.jsx(Vy,{role:"region","aria-labelledby":s.triggerId,"data-orientation":o.orientation,...c,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});Ad.displayName=Pd;function Od(e){return e?"open":"closed"}var Xy=bd,Zy=Cd,Qy=Rd,Jy=Td,e0=Ad;function Ze(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function t0(e,t=globalThis==null?void 0:globalThis.document){const n=Ze(e);y.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var n0="DismissableLayer",Ts="dismissableLayer.update",r0="dismissableLayer.pointerDownOutside",o0="dismissableLayer.focusOutside",Wc,Md=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),xn=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:c,onDismiss:u,...l}=e,i=y.useContext(Md),[a,f]=y.useState(null),d=(a==null?void 0:a.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=y.useState({}),m=re(t,P=>f(P)),p=Array.from(i.layers),[v]=[...i.layersWithOutsidePointerEventsDisabled].slice(-1),x=p.indexOf(v),b=a?p.indexOf(a):-1,w=i.layersWithOutsidePointerEventsDisabled.size>0,E=b>=x,S=a0(P=>{const A=P.target,O=[...i.branches].some(R=>R.contains(A));!E||O||(o==null||o(P),c==null||c(P),P.defaultPrevented||u==null||u())},d),T=c0(P=>{const A=P.target;[...i.branches].some(R=>R.contains(A))||(s==null||s(P),c==null||c(P),P.defaultPrevented||u==null||u())},d);return t0(P=>{b===i.layers.size-1&&(r==null||r(P),!P.defaultPrevented&&u&&(P.preventDefault(),u()))},d),y.useEffect(()=>{if(a)return n&&(i.layersWithOutsidePointerEventsDisabled.size===0&&(Wc=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),i.layersWithOutsidePointerEventsDisabled.add(a)),i.layers.add(a),qc(),()=>{n&&i.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=Wc)}},[a,d,n,i]),y.useEffect(()=>()=>{a&&(i.layers.delete(a),i.layersWithOutsidePointerEventsDisabled.delete(a),qc())},[a,i]),y.useEffect(()=>{const P=()=>h({});return document.addEventListener(Ts,P),()=>document.removeEventListener(Ts,P)},[]),g.jsx(z.div,{...l,ref:m,style:{pointerEvents:w?E?"auto":"none":void 0,...e.style},onFocusCapture:$(e.onFocusCapture,T.onFocusCapture),onBlurCapture:$(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:$(e.onPointerDownCapture,S.onPointerDownCapture)})});xn.displayName=n0;var i0="DismissableLayerBranch",s0=y.forwardRef((e,t)=>{const n=y.useContext(Md),r=y.useRef(null),o=re(t,r);return y.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),g.jsx(z.div,{...e,ref:o})});s0.displayName=i0;function a0(e,t=globalThis==null?void 0:globalThis.document){const n=Ze(e),r=y.useRef(!1),o=y.useRef(()=>{});return y.useEffect(()=>{const s=u=>{if(u.target&&!r.current){let l=function(){Id(r0,n,i,{discrete:!0})};const i={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function c0(e,t=globalThis==null?void 0:globalThis.document){const n=Ze(e),r=y.useRef(!1);return y.useEffect(()=>{const o=s=>{s.target&&!r.current&&Id(o0,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function qc(){const e=new CustomEvent(Ts);document.dispatchEvent(e)}function Id(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?dd(o,s):o.dispatchEvent(s)}var Bi="focusScope.autoFocusOnMount",$i="focusScope.autoFocusOnUnmount",Kc={bubbles:!1,cancelable:!0},l0="FocusScope",sr=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...c}=e,[u,l]=y.useState(null),i=Ze(o),a=Ze(s),f=y.useRef(null),d=re(t,p=>l(p)),h=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let p=function(w){if(h.paused||!u)return;const E=w.target;u.contains(E)?f.current=E:xt(f.current,{select:!0})},v=function(w){if(h.paused||!u)return;const E=w.relatedTarget;E!==null&&(u.contains(E)||xt(f.current,{select:!0}))},x=function(w){if(document.activeElement===document.body)for(const S of w)S.removedNodes.length>0&&xt(u)};document.addEventListener("focusin",p),document.addEventListener("focusout",v);const b=new MutationObserver(x);return u&&b.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",v),b.disconnect()}}},[r,u,h.paused]),y.useEffect(()=>{if(u){Xc.add(h);const p=document.activeElement;if(!u.contains(p)){const x=new CustomEvent(Bi,Kc);u.addEventListener(Bi,i),u.dispatchEvent(x),x.defaultPrevented||(u0(m0(Dd(u)),{select:!0}),document.activeElement===p&&xt(u))}return()=>{u.removeEventListener(Bi,i),setTimeout(()=>{const x=new CustomEvent($i,Kc);u.addEventListener($i,a),u.dispatchEvent(x),x.defaultPrevented||xt(p??document.body,{select:!0}),u.removeEventListener($i,a),Xc.remove(h)},0)}}},[u,i,a,h]);const m=y.useCallback(p=>{if(!n&&!r||h.paused)return;const v=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,x=document.activeElement;if(v&&x){const b=p.currentTarget,[w,E]=f0(b);w&&E?!p.shiftKey&&x===E?(p.preventDefault(),n&&xt(w,{select:!0})):p.shiftKey&&x===w&&(p.preventDefault(),n&&xt(E,{select:!0})):x===b&&p.preventDefault()}},[n,r,h.paused]);return g.jsx(z.div,{tabIndex:-1,...c,ref:d,onKeyDown:m})});sr.displayName=l0;function u0(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(xt(r,{select:t}),document.activeElement!==n)return}function f0(e){const t=Dd(e),n=Yc(t,e),r=Yc(t.reverse(),e);return[n,r]}function Dd(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Yc(e,t){for(const n of e)if(!d0(n,{upTo:t}))return n}function d0(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function h0(e){return e instanceof HTMLInputElement&&"select"in e}function xt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&h0(e)&&t&&e.select()}}var Xc=p0();function p0(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Zc(e,t),e.unshift(t)},remove(t){var n;e=Zc(e,t),(n=e[0])==null||n.resume()}}}function Zc(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function m0(e){return e.filter(t=>t.tagName!=="A")}var g0="Portal",ar=y.forwardRef((e,t)=>{var u;const{container:n,...r}=e,[o,s]=y.useState(!1);we(()=>s(!0),[]);const c=n||o&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return c?ya.createPortal(g.jsx(z.div,{...r,ref:t}),c):null});ar.displayName=g0;var Ui=0;function ai(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Qc()),document.body.insertAdjacentElement("beforeend",e[1]??Qc()),Ui++,()=>{Ui===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ui--}},[])}function Qc(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var nt=function(){return nt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},nt.apply(this,arguments)};function Nd(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function v0(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var Ao="right-scroll-bar-position",Oo="width-before-scroll-bar",y0="with-scroll-bars-hidden",x0="--removed-body-scroll-bar-size";function Gi(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function b0(e,t){var n=_.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var w0=typeof window<"u"?y.useLayoutEffect:y.useEffect,Jc=new WeakMap;function E0(e,t){var n=b0(null,function(r){return e.forEach(function(o){return Gi(o,r)})});return w0(function(){var r=Jc.get(n);if(r){var o=new Set(r),s=new Set(e),c=n.current;o.forEach(function(u){s.has(u)||Gi(u,null)}),s.forEach(function(u){o.has(u)||Gi(u,c)})}Jc.set(n,e)},[e]),n}function S0(e){return e}function C0(e,t){t===void 0&&(t=S0);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var c=t(s,r);return n.push(c),function(){n=n.filter(function(u){return u!==c})}},assignSyncMedium:function(s){for(r=!0;n.length;){var c=n;n=[],c.forEach(s)}n={push:function(u){return s(u)},filter:function(){return n}}},assignMedium:function(s){r=!0;var c=[];if(n.length){var u=n;n=[],u.forEach(s),c=n}var l=function(){var a=c;c=[],a.forEach(s)},i=function(){return Promise.resolve().then(l)};i(),n={push:function(a){c.push(a),i()},filter:function(a){return c=c.filter(a),n}}}};return o}function _0(e){e===void 0&&(e={});var t=C0(null);return t.options=nt({async:!0,ssr:!1},e),t}var jd=function(e){var t=e.sideCar,n=Nd(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return y.createElement(r,nt({},n))};jd.isSideCarExport=!0;function R0(e,t){return e.useMedium(t),jd}var kd=_0(),Hi=function(){},ci=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:Hi,onWheelCapture:Hi,onTouchMoveCapture:Hi}),o=r[0],s=r[1],c=e.forwardProps,u=e.children,l=e.className,i=e.removeScrollBar,a=e.enabled,f=e.shards,d=e.sideCar,h=e.noRelative,m=e.noIsolation,p=e.inert,v=e.allowPinchZoom,x=e.as,b=x===void 0?"div":x,w=e.gapMode,E=Nd(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=d,T=E0([n,t]),P=nt(nt({},E),o);return y.createElement(y.Fragment,null,a&&y.createElement(S,{sideCar:kd,removeScrollBar:i,shards:f,noRelative:h,noIsolation:m,inert:p,setCallbacks:s,allowPinchZoom:!!v,lockRef:n,gapMode:w}),c?y.cloneElement(y.Children.only(u),nt(nt({},P),{ref:T})):y.createElement(b,nt({},P,{className:l,ref:T}),u))});ci.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ci.classNames={fullWidth:Oo,zeroRight:Ao};var T0=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function P0(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=T0();return t&&e.setAttribute("nonce",t),e}function A0(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function O0(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var M0=function(){var e=0,t=null;return{add:function(n){e==0&&(t=P0())&&(A0(t,n),O0(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},I0=function(){var e=M0();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ld=function(){var e=I0(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},D0={left:0,top:0,right:0,gap:0},zi=function(e){return parseInt(e||"",10)||0},N0=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[zi(n),zi(r),zi(o)]},j0=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return D0;var t=N0(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},k0=Ld(),un="data-scroll-locked",L0=function(e,t,n,r){var o=e.left,s=e.top,c=e.right,u=e.gap;return n===void 0&&(n="margin"),`
32
- .`.concat(y0,` {
31
+ Check the top-level render call using <`+C+">."),Q}var w=_,S=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),I=Symbol.for("react.consumer"),P=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),G=Symbol.for("react.offscreen"),H=Symbol.iterator,U=Symbol.for("react.client.reference"),L=w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=Object.prototype.hasOwnProperty,k=Object.assign,ee=Symbol.for("react.client.reference"),ne=Array.isArray,X=0,ie,te,F,Y,Z,q,oe;r.__reactDisabledLog=!0;var D,he,Se=!1,$e=new(typeof WeakMap=="function"?WeakMap:Map),It=Symbol.for("react.client.reference"),vt,Or={},Nt={},Wc={};In.Fragment=A,In.jsx=function(C,Q,J,ue,Te){return m(C,Q,J,!1,ue,Te)},In.jsxs=function(C,Q,J,ue,Te){return m(C,Q,J,!0,ue,Te)}})()),In}var Yc;function Ay(){return Yc||(Yc=1,process.env.NODE_ENV==="production"?Ir.exports=Ty():Ir.exports=Py()),Ir.exports}var g=Ay();const md={sm:"size-8",md:"size-12",lg:"size-16",xl:"size-20"},Oy=({size:e="sm",text:t,className:n,color:r="border-t-blue-500"})=>g.jsx("div",{className:"grid gap-4 place-content-center",children:g.jsxs("div",{className:"flex flex-col items-center",children:[g.jsx("output",{className:N.classNames(md[e],"animate-spin rounded-full border-4",r,n),"aria-busy":"true"}),!!t&&g.jsx("span",{className:"flex justify-center",children:t})]})});function Xc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ii(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Xc(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Xc(e[o],null)}}}}function re(...e){return y.useCallback(ii(...e),e)}function St(e){const t=My(e),n=y.forwardRef((r,o)=>{const{children:i,...c}=r,u=y.Children.toArray(i),l=u.find(Ny);if(l){const s=l.props.children,a=u.map(f=>f===l?y.Children.count(s)>1?y.Children.only(null):y.isValidElement(s)?s.props.children:null:f);return g.jsx(t,{...c,ref:o,children:y.isValidElement(s)?y.cloneElement(s,void 0,a):null})}return g.jsx(t,{...c,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var gd=St("Slot");function My(e){const t=y.forwardRef((n,r)=>{const{children:o,...i}=n;if(y.isValidElement(o)){const c=Dy(o),u=jy(i,o.props);return o.type!==y.Fragment&&(u.ref=r?ii(r,c):c),y.cloneElement(o,u)}return y.Children.count(o)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var vd=Symbol("radix.slottable");function Iy(e){const t=({children:n})=>g.jsx(g.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=vd,t}function Ny(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===vd}function jy(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...u)=>{const l=i(...u);return o(...u),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Dy(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ky=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],z=ky.reduce((e,t)=>{const n=St(`Primitive.${t}`),r=y.forwardRef((o,i)=>{const{asChild:c,...u}=o,l=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(l,{...u,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function yd(e,t){e&&oi.flushSync(()=>e.dispatchEvent(t))}var xd=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Ly="VisuallyHidden",bd=y.forwardRef((e,t)=>g.jsx(z.span,{...e,ref:t,style:{...xd,...e.style}}));bd.displayName=Ly;var Fy=bd;function Vy(e,t){const n=y.createContext(t),r=i=>{const{children:c,...u}=i,l=y.useMemo(()=>u,Object.values(u));return g.jsx(n.Provider,{value:l,children:c})};r.displayName=e+"Provider";function o(i){const c=y.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function Ee(e,t=[]){let n=[];function r(i,c){const u=y.createContext(c),l=n.length;n=[...n,c];const s=f=>{var x;const{scope:d,children:h,...m}=f,p=((x=d==null?void 0:d[e])==null?void 0:x[l])||u,v=y.useMemo(()=>m,Object.values(m));return g.jsx(p.Provider,{value:v,children:h})};s.displayName=i+"Provider";function a(f,d){var p;const h=((p=d==null?void 0:d[e])==null?void 0:p[l])||u,m=y.useContext(h);if(m)return m;if(c!==void 0)return c;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[s,a]}const o=()=>{const i=n.map(c=>y.createContext(c));return function(u){const l=(u==null?void 0:u[e])||i;return y.useMemo(()=>({[`__scope${e}`]:{...u,[e]:l}}),[u,l])}};return o.scopeName=e,[r,By(o,...t)]}function By(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const c=r.reduce((u,{useScope:l,scopeName:s})=>{const f=l(i)[`__scope${s}`];return{...u,...f}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function ar(e){const t=e+"CollectionProvider",[n,r]=Ee(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=p=>{const{scope:v,children:x}=p,b=_.useRef(null),w=_.useRef(new Map).current;return g.jsx(o,{scope:v,itemMap:w,collectionRef:b,children:x})};c.displayName=t;const u=e+"CollectionSlot",l=St(u),s=_.forwardRef((p,v)=>{const{scope:x,children:b}=p,w=i(u,x),S=re(v,w.collectionRef);return g.jsx(l,{ref:S,children:b})});s.displayName=u;const a=e+"CollectionItemSlot",f="data-radix-collection-item",d=St(a),h=_.forwardRef((p,v)=>{const{scope:x,children:b,...w}=p,S=_.useRef(null),E=re(v,S),A=i(a,x);return _.useEffect(()=>(A.itemMap.set(S,{ref:S,...w}),()=>void A.itemMap.delete(S))),g.jsx(d,{[f]:"",ref:E,children:b})});h.displayName=a;function m(p){const v=i(e+"CollectionConsumer",p);return _.useCallback(()=>{const b=v.collectionRef.current;if(!b)return[];const w=Array.from(b.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((A,R)=>w.indexOf(A.ref.current)-w.indexOf(R.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:c,Slot:s,ItemSlot:h},m,r]}function B(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var we=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},$y=y[" useInsertionEffect ".trim().toString()]||we;function Ne({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,c]=Uy({defaultProp:t,onChange:n}),u=e!==void 0,l=u?e:o;{const a=y.useRef(e!==void 0);y.useEffect(()=>{const f=a.current;f!==u&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),a.current=u},[u,r])}const s=y.useCallback(a=>{var f;if(u){const d=Gy(a)?a(e):a;d!==e&&((f=c.current)==null||f.call(c,d))}else i(a)},[u,e,i,c]);return[l,s]}function Uy({defaultProp:e,onChange:t}){const[n,r]=y.useState(e),o=y.useRef(n),i=y.useRef(t);return $y(()=>{i.current=t},[t]),y.useEffect(()=>{var c;o.current!==n&&((c=i.current)==null||c.call(i,n),o.current=n)},[n,o]),[n,r,i]}function Gy(e){return typeof e=="function"}function Hy(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var je=e=>{const{present:t,children:n}=e,r=zy(t),o=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),i=re(r.ref,Wy(o));return typeof n=="function"||r.isPresent?y.cloneElement(o,{ref:i}):null};je.displayName="Presence";function zy(e){const[t,n]=y.useState(),r=y.useRef(null),o=y.useRef(e),i=y.useRef("none"),c=e?"mounted":"unmounted",[u,l]=Hy(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const s=Nr(r.current);i.current=u==="mounted"?s:"none"},[u]),we(()=>{const s=r.current,a=o.current;if(a!==e){const d=i.current,h=Nr(s);e?l("MOUNT"):h==="none"||(s==null?void 0:s.display)==="none"?l("UNMOUNT"):l(a&&d!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),we(()=>{if(t){let s;const a=t.ownerDocument.defaultView??window,f=h=>{const p=Nr(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&p&&(l("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",s=a.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},d=h=>{h.target===t&&(i.current=Nr(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{a.clearTimeout(s),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:y.useCallback(s=>{r.current=s?getComputedStyle(s):null,n(s)},[])}}function Nr(e){return(e==null?void 0:e.animationName)||"none"}function Wy(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var qy=y[" useId ".trim().toString()]||(()=>{}),Ky=0;function Re(e){const[t,n]=y.useState(qy());return we(()=>{n(r=>r??String(Ky++))},[e]),t?`radix-${t}`:""}var si="Collapsible",[Yy,wd]=Ee(si),[Xy,ba]=Yy(si),Ed=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:c,...u}=e,[l,s]=Ne({prop:r,defaultProp:o??!1,onChange:c,caller:si});return g.jsx(Xy,{scope:n,disabled:i,contentId:Re(),open:l,onOpenToggle:y.useCallback(()=>s(a=>!a),[s]),children:g.jsx(z.div,{"data-state":Ea(l),"data-disabled":i?"":void 0,...u,ref:t})})});Ed.displayName=si;var Sd="CollapsibleTrigger",Cd=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=ba(Sd,n);return g.jsx(z.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Ea(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:B(e.onClick,o.onOpenToggle)})});Cd.displayName=Sd;var wa="CollapsibleContent",_d=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ba(wa,e.__scopeCollapsible);return g.jsx(je,{present:n||o.open,children:({present:i})=>g.jsx(Zy,{...r,ref:t,present:i})})});_d.displayName=wa;var Zy=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,c=ba(wa,n),[u,l]=y.useState(r),s=y.useRef(null),a=re(t,s),f=y.useRef(0),d=f.current,h=y.useRef(0),m=h.current,p=c.open||u,v=y.useRef(p),x=y.useRef(void 0);return y.useEffect(()=>{const b=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(b)},[]),we(()=>{const b=s.current;if(b){x.current=x.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const w=b.getBoundingClientRect();f.current=w.height,h.current=w.width,v.current||(b.style.transitionDuration=x.current.transitionDuration,b.style.animationName=x.current.animationName),l(r)}},[c.open,r]),g.jsx(z.div,{"data-state":Ea(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!p,...i,ref:a,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:p&&o})});function Ea(e){return e?"open":"closed"}var Qy=Ed,Jy=Cd,e0=_d,t0=y.createContext(void 0);function Kt(e){const t=y.useContext(t0);return e||t||"ltr"}var et="Accordion",n0=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Sa,r0,o0]=ar(et),[ai]=Ee(et,[o0,wd]),Ca=wd(),Rd=_.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,i=r;return g.jsx(Sa.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?g.jsx(c0,{...i,ref:t}):g.jsx(a0,{...o,ref:t})})});Rd.displayName=et;var[Td,i0]=ai(et),[Pd,s0]=ai(et,{collapsible:!1}),a0=_.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:i=!1,...c}=e,[u,l]=Ne({prop:n,defaultProp:r??"",onChange:o,caller:et});return g.jsx(Td,{scope:e.__scopeAccordion,value:_.useMemo(()=>u?[u]:[],[u]),onItemOpen:l,onItemClose:_.useCallback(()=>i&&l(""),[i,l]),children:g.jsx(Pd,{scope:e.__scopeAccordion,collapsible:i,children:g.jsx(Ad,{...c,ref:t})})})}),c0=_.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[c,u]=Ne({prop:n,defaultProp:r??[],onChange:o,caller:et}),l=_.useCallback(a=>u((f=[])=>[...f,a]),[u]),s=_.useCallback(a=>u((f=[])=>f.filter(d=>d!==a)),[u]);return g.jsx(Td,{scope:e.__scopeAccordion,value:c,onItemOpen:l,onItemClose:s,children:g.jsx(Pd,{scope:e.__scopeAccordion,collapsible:!0,children:g.jsx(Ad,{...i,ref:t})})})}),[l0,ci]=ai(et),Ad=_.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:i="vertical",...c}=e,u=_.useRef(null),l=re(u,t),s=r0(n),f=Kt(o)==="ltr",d=B(e.onKeyDown,h=>{var T;if(!n0.includes(h.key))return;const m=h.target,p=s().filter(I=>{var P;return!((P=I.ref.current)!=null&&P.disabled)}),v=p.findIndex(I=>I.ref.current===m),x=p.length;if(v===-1)return;h.preventDefault();let b=v;const w=0,S=x-1,E=()=>{b=v+1,b>S&&(b=w)},A=()=>{b=v-1,b<w&&(b=S)};switch(h.key){case"Home":b=w;break;case"End":b=S;break;case"ArrowRight":i==="horizontal"&&(f?E():A());break;case"ArrowDown":i==="vertical"&&E();break;case"ArrowLeft":i==="horizontal"&&(f?A():E());break;case"ArrowUp":i==="vertical"&&A();break}const R=b%x;(T=p[R].ref.current)==null||T.focus()});return g.jsx(l0,{scope:n,disabled:r,direction:o,orientation:i,children:g.jsx(Sa.Slot,{scope:n,children:g.jsx(z.div,{...c,"data-orientation":i,ref:l,onKeyDown:r?void 0:d})})})}),Vo="AccordionItem",[u0,_a]=ai(Vo),Od=_.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,i=ci(Vo,n),c=i0(Vo,n),u=Ca(n),l=Re(),s=r&&c.value.includes(r)||!1,a=i.disabled||e.disabled;return g.jsx(u0,{scope:n,open:s,disabled:a,triggerId:l,children:g.jsx(Qy,{"data-orientation":i.orientation,"data-state":kd(s),...u,...o,ref:t,disabled:a,open:s,onOpenChange:f=>{f?c.onItemOpen(r):c.onItemClose(r)}})})});Od.displayName=Vo;var Md="AccordionHeader",Id=_.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ci(et,n),i=_a(Md,n);return g.jsx(z.h3,{"data-orientation":o.orientation,"data-state":kd(i.open),"data-disabled":i.disabled?"":void 0,...r,ref:t})});Id.displayName=Md;var Ps="AccordionTrigger",Nd=_.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ci(et,n),i=_a(Ps,n),c=s0(Ps,n),u=Ca(n);return g.jsx(Sa.ItemSlot,{scope:n,children:g.jsx(Jy,{"aria-disabled":i.open&&!c.collapsible||void 0,"data-orientation":o.orientation,id:i.triggerId,...u,...r,ref:t})})});Nd.displayName=Ps;var jd="AccordionContent",Dd=_.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ci(et,n),i=_a(jd,n),c=Ca(n);return g.jsx(e0,{role:"region","aria-labelledby":i.triggerId,"data-orientation":o.orientation,...c,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});Dd.displayName=jd;function kd(e){return e?"open":"closed"}var f0=Rd,d0=Od,h0=Id,p0=Nd,m0=Dd;function Ze(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function g0(e,t=globalThis==null?void 0:globalThis.document){const n=Ze(e);y.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var v0="DismissableLayer",As="dismissableLayer.update",y0="dismissableLayer.pointerDownOutside",x0="dismissableLayer.focusOutside",Zc,Ld=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),xn=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:c,onDismiss:u,...l}=e,s=y.useContext(Ld),[a,f]=y.useState(null),d=(a==null?void 0:a.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=y.useState({}),m=re(t,R=>f(R)),p=Array.from(s.layers),[v]=[...s.layersWithOutsidePointerEventsDisabled].slice(-1),x=p.indexOf(v),b=a?p.indexOf(a):-1,w=s.layersWithOutsidePointerEventsDisabled.size>0,S=b>=x,E=E0(R=>{const T=R.target,I=[...s.branches].some(P=>P.contains(T));!S||I||(o==null||o(R),c==null||c(R),R.defaultPrevented||u==null||u())},d),A=S0(R=>{const T=R.target;[...s.branches].some(P=>P.contains(T))||(i==null||i(R),c==null||c(R),R.defaultPrevented||u==null||u())},d);return g0(R=>{b===s.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&u&&(R.preventDefault(),u()))},d),y.useEffect(()=>{if(a)return n&&(s.layersWithOutsidePointerEventsDisabled.size===0&&(Zc=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),s.layersWithOutsidePointerEventsDisabled.add(a)),s.layers.add(a),Qc(),()=>{n&&s.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=Zc)}},[a,d,n,s]),y.useEffect(()=>()=>{a&&(s.layers.delete(a),s.layersWithOutsidePointerEventsDisabled.delete(a),Qc())},[a,s]),y.useEffect(()=>{const R=()=>h({});return document.addEventListener(As,R),()=>document.removeEventListener(As,R)},[]),g.jsx(z.div,{...l,ref:m,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:B(e.onFocusCapture,A.onFocusCapture),onBlurCapture:B(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:B(e.onPointerDownCapture,E.onPointerDownCapture)})});xn.displayName=v0;var b0="DismissableLayerBranch",w0=y.forwardRef((e,t)=>{const n=y.useContext(Ld),r=y.useRef(null),o=re(t,r);return y.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),g.jsx(z.div,{...e,ref:o})});w0.displayName=b0;function E0(e,t=globalThis==null?void 0:globalThis.document){const n=Ze(e),r=y.useRef(!1),o=y.useRef(()=>{});return y.useEffect(()=>{const i=u=>{if(u.target&&!r.current){let l=function(){Fd(y0,n,s,{discrete:!0})};const s={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function S0(e,t=globalThis==null?void 0:globalThis.document){const n=Ze(e),r=y.useRef(!1);return y.useEffect(()=>{const o=i=>{i.target&&!r.current&&Fd(x0,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Qc(){const e=new CustomEvent(As);document.dispatchEvent(e)}function Fd(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?yd(o,i):o.dispatchEvent(i)}var Ui="focusScope.autoFocusOnMount",Gi="focusScope.autoFocusOnUnmount",Jc={bubbles:!1,cancelable:!0},C0="FocusScope",cr=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...c}=e,[u,l]=y.useState(null),s=Ze(o),a=Ze(i),f=y.useRef(null),d=re(t,p=>l(p)),h=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let p=function(w){if(h.paused||!u)return;const S=w.target;u.contains(S)?f.current=S:xt(f.current,{select:!0})},v=function(w){if(h.paused||!u)return;const S=w.relatedTarget;S!==null&&(u.contains(S)||xt(f.current,{select:!0}))},x=function(w){if(document.activeElement===document.body)for(const E of w)E.removedNodes.length>0&&xt(u)};document.addEventListener("focusin",p),document.addEventListener("focusout",v);const b=new MutationObserver(x);return u&&b.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",v),b.disconnect()}}},[r,u,h.paused]),y.useEffect(()=>{if(u){tl.add(h);const p=document.activeElement;if(!u.contains(p)){const x=new CustomEvent(Ui,Jc);u.addEventListener(Ui,s),u.dispatchEvent(x),x.defaultPrevented||(_0(O0(Vd(u)),{select:!0}),document.activeElement===p&&xt(u))}return()=>{u.removeEventListener(Ui,s),setTimeout(()=>{const x=new CustomEvent(Gi,Jc);u.addEventListener(Gi,a),u.dispatchEvent(x),x.defaultPrevented||xt(p??document.body,{select:!0}),u.removeEventListener(Gi,a),tl.remove(h)},0)}}},[u,s,a,h]);const m=y.useCallback(p=>{if(!n&&!r||h.paused)return;const v=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,x=document.activeElement;if(v&&x){const b=p.currentTarget,[w,S]=R0(b);w&&S?!p.shiftKey&&x===S?(p.preventDefault(),n&&xt(w,{select:!0})):p.shiftKey&&x===w&&(p.preventDefault(),n&&xt(S,{select:!0})):x===b&&p.preventDefault()}},[n,r,h.paused]);return g.jsx(z.div,{tabIndex:-1,...c,ref:d,onKeyDown:m})});cr.displayName=C0;function _0(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(xt(r,{select:t}),document.activeElement!==n)return}function R0(e){const t=Vd(e),n=el(t,e),r=el(t.reverse(),e);return[n,r]}function Vd(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function el(e,t){for(const n of e)if(!T0(n,{upTo:t}))return n}function T0(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function P0(e){return e instanceof HTMLInputElement&&"select"in e}function xt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&P0(e)&&t&&e.select()}}var tl=A0();function A0(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=nl(e,t),e.unshift(t)},remove(t){var n;e=nl(e,t),(n=e[0])==null||n.resume()}}}function nl(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function O0(e){return e.filter(t=>t.tagName!=="A")}var M0="Portal",lr=y.forwardRef((e,t)=>{var u;const{container:n,...r}=e,[o,i]=y.useState(!1);we(()=>i(!0),[]);const c=n||o&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return c?xa.createPortal(g.jsx(z.div,{...r,ref:t}),c):null});lr.displayName=M0;var Hi=0;function li(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??rl()),document.body.insertAdjacentElement("beforeend",e[1]??rl()),Hi++,()=>{Hi===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Hi--}},[])}function rl(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var nt=function(){return nt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},nt.apply(this,arguments)};function Bd(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function I0(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var Mo="right-scroll-bar-position",Io="width-before-scroll-bar",N0="with-scroll-bars-hidden",j0="--removed-body-scroll-bar-size";function zi(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function D0(e,t){var n=_.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var k0=typeof window<"u"?y.useLayoutEffect:y.useEffect,ol=new WeakMap;function L0(e,t){var n=D0(null,function(r){return e.forEach(function(o){return zi(o,r)})});return k0(function(){var r=ol.get(n);if(r){var o=new Set(r),i=new Set(e),c=n.current;o.forEach(function(u){i.has(u)||zi(u,null)}),i.forEach(function(u){o.has(u)||zi(u,c)})}ol.set(n,e)},[e]),n}function F0(e){return e}function V0(e,t){t===void 0&&(t=F0);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var c=t(i,r);return n.push(c),function(){n=n.filter(function(u){return u!==c})}},assignSyncMedium:function(i){for(r=!0;n.length;){var c=n;n=[],c.forEach(i)}n={push:function(u){return i(u)},filter:function(){return n}}},assignMedium:function(i){r=!0;var c=[];if(n.length){var u=n;n=[],u.forEach(i),c=n}var l=function(){var a=c;c=[],a.forEach(i)},s=function(){return Promise.resolve().then(l)};s(),n={push:function(a){c.push(a),s()},filter:function(a){return c=c.filter(a),n}}}};return o}function B0(e){e===void 0&&(e={});var t=V0(null);return t.options=nt({async:!0,ssr:!1},e),t}var $d=function(e){var t=e.sideCar,n=Bd(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return y.createElement(r,nt({},n))};$d.isSideCarExport=!0;function $0(e,t){return e.useMedium(t),$d}var Ud=B0(),Wi=function(){},ui=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:Wi,onWheelCapture:Wi,onTouchMoveCapture:Wi}),o=r[0],i=r[1],c=e.forwardProps,u=e.children,l=e.className,s=e.removeScrollBar,a=e.enabled,f=e.shards,d=e.sideCar,h=e.noRelative,m=e.noIsolation,p=e.inert,v=e.allowPinchZoom,x=e.as,b=x===void 0?"div":x,w=e.gapMode,S=Bd(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=d,A=L0([n,t]),R=nt(nt({},S),o);return y.createElement(y.Fragment,null,a&&y.createElement(E,{sideCar:Ud,removeScrollBar:s,shards:f,noRelative:h,noIsolation:m,inert:p,setCallbacks:i,allowPinchZoom:!!v,lockRef:n,gapMode:w}),c?y.cloneElement(y.Children.only(u),nt(nt({},R),{ref:A})):y.createElement(b,nt({},R,{className:l,ref:A}),u))});ui.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ui.classNames={fullWidth:Io,zeroRight:Mo};var U0=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function G0(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=U0();return t&&e.setAttribute("nonce",t),e}function H0(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function z0(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var W0=function(){var e=0,t=null;return{add:function(n){e==0&&(t=G0())&&(H0(t,n),z0(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},q0=function(){var e=W0();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Gd=function(){var e=q0(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},K0={left:0,top:0,right:0,gap:0},qi=function(e){return parseInt(e||"",10)||0},Y0=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[qi(n),qi(r),qi(o)]},X0=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return K0;var t=Y0(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Z0=Gd(),dn="data-scroll-locked",Q0=function(e,t,n,r){var o=e.left,i=e.top,c=e.right,u=e.gap;return n===void 0&&(n="margin"),`
32
+ .`.concat(N0,` {
33
33
  overflow: hidden `).concat(r,`;
34
34
  padding-right: `).concat(u,"px ").concat(r,`;
35
35
  }
36
- body[`).concat(un,`] {
36
+ body[`).concat(dn,`] {
37
37
  overflow: hidden `).concat(r,`;
38
38
  overscroll-behavior: contain;
39
39
  `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
40
40
  padding-left: `.concat(o,`px;
41
- padding-top: `).concat(s,`px;
41
+ padding-top: `).concat(i,`px;
42
42
  padding-right: `).concat(c,`px;
43
43
  margin-left:0;
44
44
  margin-top:0;
@@ -46,33 +46,33 @@ Check the top-level render call using <`+C+">."),Q}var w=_,E=Symbol.for("react.t
46
46
  `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
47
47
  }
48
48
 
49
- .`).concat(Ao,` {
49
+ .`).concat(Mo,` {
50
50
  right: `).concat(u,"px ").concat(r,`;
51
51
  }
52
52
 
53
- .`).concat(Oo,` {
53
+ .`).concat(Io,` {
54
54
  margin-right: `).concat(u,"px ").concat(r,`;
55
55
  }
56
56
 
57
- .`).concat(Ao," .").concat(Ao,` {
57
+ .`).concat(Mo," .").concat(Mo,` {
58
58
  right: 0 `).concat(r,`;
59
59
  }
60
60
 
61
- .`).concat(Oo," .").concat(Oo,` {
61
+ .`).concat(Io," .").concat(Io,` {
62
62
  margin-right: 0 `).concat(r,`;
63
63
  }
64
64
 
65
- body[`).concat(un,`] {
66
- `).concat(x0,": ").concat(u,`px;
65
+ body[`).concat(dn,`] {
66
+ `).concat(j0,": ").concat(u,`px;
67
67
  }
68
- `)},el=function(){var e=parseInt(document.body.getAttribute(un)||"0",10);return isFinite(e)?e:0},F0=function(){y.useEffect(function(){return document.body.setAttribute(un,(el()+1).toString()),function(){var e=el()-1;e<=0?document.body.removeAttribute(un):document.body.setAttribute(un,e.toString())}},[])},V0=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;F0();var s=y.useMemo(function(){return j0(o)},[o]);return y.createElement(k0,{styles:L0(s,!t,o,n?"":"!important")})},Ps=!1;if(typeof window<"u")try{var Ir=Object.defineProperty({},"passive",{get:function(){return Ps=!0,!0}});window.addEventListener("test",Ir,Ir),window.removeEventListener("test",Ir,Ir)}catch{Ps=!1}var Zt=Ps?{passive:!1}:!1,B0=function(e){return e.tagName==="TEXTAREA"},Fd=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!B0(e)&&n[t]==="visible")},$0=function(e){return Fd(e,"overflowY")},U0=function(e){return Fd(e,"overflowX")},tl=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Vd(e,r);if(o){var s=Bd(e,r),c=s[1],u=s[2];if(c>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},G0=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},H0=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Vd=function(e,t){return e==="v"?$0(t):U0(t)},Bd=function(e,t){return e==="v"?G0(t):H0(t)},z0=function(e,t){return e==="h"&&t==="rtl"?-1:1},W0=function(e,t,n,r,o){var s=z0(e,window.getComputedStyle(t).direction),c=s*r,u=n.target,l=t.contains(u),i=!1,a=c>0,f=0,d=0;do{if(!u)break;var h=Bd(e,u),m=h[0],p=h[1],v=h[2],x=p-v-s*m;(m||x)&&Vd(e,u)&&(f+=x,d+=m);var b=u.parentNode;u=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!l&&u!==document.body||l&&(t.contains(u)||t===u));return(a&&Math.abs(f)<1||!a&&Math.abs(d)<1)&&(i=!0),i},Dr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},nl=function(e){return[e.deltaX,e.deltaY]},rl=function(e){return e&&"current"in e?e.current:e},q0=function(e,t){return e[0]===t[0]&&e[1]===t[1]},K0=function(e){return`
68
+ `)},il=function(){var e=parseInt(document.body.getAttribute(dn)||"0",10);return isFinite(e)?e:0},J0=function(){y.useEffect(function(){return document.body.setAttribute(dn,(il()+1).toString()),function(){var e=il()-1;e<=0?document.body.removeAttribute(dn):document.body.setAttribute(dn,e.toString())}},[])},ex=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;J0();var i=y.useMemo(function(){return X0(o)},[o]);return y.createElement(Z0,{styles:Q0(i,!t,o,n?"":"!important")})},Os=!1;if(typeof window<"u")try{var jr=Object.defineProperty({},"passive",{get:function(){return Os=!0,!0}});window.addEventListener("test",jr,jr),window.removeEventListener("test",jr,jr)}catch{Os=!1}var Jt=Os?{passive:!1}:!1,tx=function(e){return e.tagName==="TEXTAREA"},Hd=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!tx(e)&&n[t]==="visible")},nx=function(e){return Hd(e,"overflowY")},rx=function(e){return Hd(e,"overflowX")},sl=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=zd(e,r);if(o){var i=Wd(e,r),c=i[1],u=i[2];if(c>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ox=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},ix=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},zd=function(e,t){return e==="v"?nx(t):rx(t)},Wd=function(e,t){return e==="v"?ox(t):ix(t)},sx=function(e,t){return e==="h"&&t==="rtl"?-1:1},ax=function(e,t,n,r,o){var i=sx(e,window.getComputedStyle(t).direction),c=i*r,u=n.target,l=t.contains(u),s=!1,a=c>0,f=0,d=0;do{if(!u)break;var h=Wd(e,u),m=h[0],p=h[1],v=h[2],x=p-v-i*m;(m||x)&&zd(e,u)&&(f+=x,d+=m);var b=u.parentNode;u=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!l&&u!==document.body||l&&(t.contains(u)||t===u));return(a&&Math.abs(f)<1||!a&&Math.abs(d)<1)&&(s=!0),s},Dr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},al=function(e){return[e.deltaX,e.deltaY]},cl=function(e){return e&&"current"in e?e.current:e},cx=function(e,t){return e[0]===t[0]&&e[1]===t[1]},lx=function(e){return`
69
69
  .block-interactivity-`.concat(e,` {pointer-events: none;}
70
70
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
71
- `)},Y0=0,Qt=[];function X0(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),o=y.useState(Y0++)[0],s=y.useState(Ld)[0],c=y.useRef(e);y.useEffect(function(){c.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var p=v0([e.lockRef.current],(e.shards||[]).map(rl),!0).filter(Boolean);return p.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),p.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var u=y.useCallback(function(p,v){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!c.current.allowPinchZoom;var x=Dr(p),b=n.current,w="deltaX"in p?p.deltaX:b[0]-x[0],E="deltaY"in p?p.deltaY:b[1]-x[1],S,T=p.target,P=Math.abs(w)>Math.abs(E)?"h":"v";if("touches"in p&&P==="h"&&T.type==="range")return!1;var A=window.getSelection(),O=A&&A.anchorNode,R=O?O===T||O.contains(T):!1;if(R)return!1;var I=tl(P,T);if(!I)return!0;if(I?S=P:(S=P==="v"?"h":"v",I=tl(P,T)),!I)return!1;if(!r.current&&"changedTouches"in p&&(w||E)&&(r.current=S),!S)return!0;var D=r.current||S;return W0(D,v,p,D==="h"?w:E)},[]),l=y.useCallback(function(p){var v=p;if(!(!Qt.length||Qt[Qt.length-1]!==s)){var x="deltaY"in v?nl(v):Dr(v),b=t.current.filter(function(S){return S.name===v.type&&(S.target===v.target||v.target===S.shadowParent)&&q0(S.delta,x)})[0];if(b&&b.should){v.cancelable&&v.preventDefault();return}if(!b){var w=(c.current.shards||[]).map(rl).filter(Boolean).filter(function(S){return S.contains(v.target)}),E=w.length>0?u(v,w[0]):!c.current.noIsolation;E&&v.cancelable&&v.preventDefault()}}},[]),i=y.useCallback(function(p,v,x,b){var w={name:p,delta:v,target:x,should:b,shadowParent:Z0(x)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(E){return E!==w})},1)},[]),a=y.useCallback(function(p){n.current=Dr(p),r.current=void 0},[]),f=y.useCallback(function(p){i(p.type,nl(p),p.target,u(p,e.lockRef.current))},[]),d=y.useCallback(function(p){i(p.type,Dr(p),p.target,u(p,e.lockRef.current))},[]);y.useEffect(function(){return Qt.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",l,Zt),document.addEventListener("touchmove",l,Zt),document.addEventListener("touchstart",a,Zt),function(){Qt=Qt.filter(function(p){return p!==s}),document.removeEventListener("wheel",l,Zt),document.removeEventListener("touchmove",l,Zt),document.removeEventListener("touchstart",a,Zt)}},[]);var h=e.removeScrollBar,m=e.inert;return y.createElement(y.Fragment,null,m?y.createElement(s,{styles:K0(o)}):null,h?y.createElement(V0,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Z0(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Q0=R0(kd,X0);var cr=y.forwardRef(function(e,t){return y.createElement(ci,nt({},e,{ref:t,sideCar:Q0}))});cr.classNames=ci.classNames;var J0=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Jt=new WeakMap,Nr=new WeakMap,jr={},Wi=0,$d=function(e){return e&&(e.host||$d(e.parentNode))},ex=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=$d(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},tx=function(e,t,n,r){var o=ex(t,Array.isArray(e)?e:[e]);jr[n]||(jr[n]=new WeakMap);var s=jr[n],c=[],u=new Set,l=new Set(o),i=function(f){!f||u.has(f)||(u.add(f),i(f.parentNode))};o.forEach(i);var a=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(d){if(u.has(d))a(d);else try{var h=d.getAttribute(r),m=h!==null&&h!=="false",p=(Jt.get(d)||0)+1,v=(s.get(d)||0)+1;Jt.set(d,p),s.set(d,v),c.push(d),p===1&&m&&Nr.set(d,!0),v===1&&d.setAttribute(n,"true"),m||d.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",d,x)}})};return a(t),u.clear(),Wi++,function(){c.forEach(function(f){var d=Jt.get(f)-1,h=s.get(f)-1;Jt.set(f,d),s.set(f,h),d||(Nr.has(f)||f.removeAttribute(r),Nr.delete(f)),h||f.removeAttribute(n)}),Wi--,Wi||(Jt=new WeakMap,Jt=new WeakMap,Nr=new WeakMap,jr={})}},li=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=J0(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),tx(r,o,n,"aria-hidden")):function(){return null}},ui="Dialog",[Ud]=Ce(ui),[nx,tt]=Ud(ui),Gd=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:c=!0}=e,u=y.useRef(null),l=y.useRef(null),[i,a]=Ne({prop:r,defaultProp:o??!1,onChange:s,caller:ui});return g.jsx(nx,{scope:t,triggerRef:u,contentRef:l,contentId:Pe(),titleId:Pe(),descriptionId:Pe(),open:i,onOpenChange:a,onOpenToggle:y.useCallback(()=>a(f=>!f),[a]),modal:c,children:n})};Gd.displayName=ui;var Hd="DialogTrigger",rx=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=tt(Hd,n),s=re(t,o.triggerRef);return g.jsx(z.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Ta(o.open),...r,ref:s,onClick:$(e.onClick,o.onOpenToggle)})});rx.displayName=Hd;var _a="DialogPortal",[ox,zd]=Ud(_a,{forceMount:void 0}),Wd=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=tt(_a,t);return g.jsx(ox,{scope:t,forceMount:n,children:y.Children.map(r,c=>g.jsx(je,{present:n||s.open,children:g.jsx(ar,{asChild:!0,container:o,children:c})}))})};Wd.displayName=_a;var Fo="DialogOverlay",qd=y.forwardRef((e,t)=>{const n=zd(Fo,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=tt(Fo,e.__scopeDialog);return s.modal?g.jsx(je,{present:r||s.open,children:g.jsx(sx,{...o,ref:t})}):null});qd.displayName=Fo;var ix=St("DialogOverlay.RemoveScroll"),sx=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=tt(Fo,n);return g.jsx(cr,{as:ix,allowPinchZoom:!0,shards:[o.contentRef],children:g.jsx(z.div,{"data-state":Ta(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Ut="DialogContent",Kd=y.forwardRef((e,t)=>{const n=zd(Ut,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=tt(Ut,e.__scopeDialog);return g.jsx(je,{present:r||s.open,children:s.modal?g.jsx(ax,{...o,ref:t}):g.jsx(cx,{...o,ref:t})})});Kd.displayName=Ut;var ax=y.forwardRef((e,t)=>{const n=tt(Ut,e.__scopeDialog),r=y.useRef(null),o=re(t,n.contentRef,r);return y.useEffect(()=>{const s=r.current;if(s)return li(s)},[]),g.jsx(Yd,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:$(e.onCloseAutoFocus,s=>{var c;s.preventDefault(),(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:$(e.onPointerDownOutside,s=>{const c=s.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0;(c.button===2||u)&&s.preventDefault()}),onFocusOutside:$(e.onFocusOutside,s=>s.preventDefault())})}),cx=y.forwardRef((e,t)=>{const n=tt(Ut,e.__scopeDialog),r=y.useRef(!1),o=y.useRef(!1);return g.jsx(Yd,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var c,u;(c=e.onCloseAutoFocus)==null||c.call(e,s),s.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var l,i;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=s.target;((i=n.triggerRef.current)==null?void 0:i.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Yd=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...c}=e,u=tt(Ut,n),l=y.useRef(null),i=re(t,l);return ai(),g.jsxs(g.Fragment,{children:[g.jsx(sr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:g.jsx(xn,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":Ta(u.open),...c,ref:i,onDismiss:()=>u.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(ux,{titleId:u.titleId}),g.jsx(dx,{contentRef:l,descriptionId:u.descriptionId})]})]})}),Ra="DialogTitle",Xd=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=tt(Ra,n);return g.jsx(z.h2,{id:o.titleId,...r,ref:t})});Xd.displayName=Ra;var Zd="DialogDescription",Qd=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=tt(Zd,n);return g.jsx(z.p,{id:o.descriptionId,...r,ref:t})});Qd.displayName=Zd;var Jd="DialogClose",lx=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=tt(Jd,n);return g.jsx(z.button,{type:"button",...r,ref:t,onClick:$(e.onClick,()=>o.onOpenChange(!1))})});lx.displayName=Jd;function Ta(e){return e?"open":"closed"}var eh="DialogTitleWarning",[kI,th]=Cy(eh,{contentName:Ut,titleName:Ra,docsSlug:"dialog"}),ux=({titleId:e})=>{const t=th(eh),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
71
+ `)},ux=0,en=[];function fx(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),o=y.useState(ux++)[0],i=y.useState(Gd)[0],c=y.useRef(e);y.useEffect(function(){c.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var p=I0([e.lockRef.current],(e.shards||[]).map(cl),!0).filter(Boolean);return p.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),p.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var u=y.useCallback(function(p,v){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!c.current.allowPinchZoom;var x=Dr(p),b=n.current,w="deltaX"in p?p.deltaX:b[0]-x[0],S="deltaY"in p?p.deltaY:b[1]-x[1],E,A=p.target,R=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in p&&R==="h"&&A.type==="range")return!1;var T=window.getSelection(),I=T&&T.anchorNode,P=I?I===A||I.contains(A):!1;if(P)return!1;var M=sl(R,A);if(!M)return!0;if(M?E=R:(E=R==="v"?"h":"v",M=sl(R,A)),!M)return!1;if(!r.current&&"changedTouches"in p&&(w||S)&&(r.current=E),!E)return!0;var j=r.current||E;return ax(j,v,p,j==="h"?w:S)},[]),l=y.useCallback(function(p){var v=p;if(!(!en.length||en[en.length-1]!==i)){var x="deltaY"in v?al(v):Dr(v),b=t.current.filter(function(E){return E.name===v.type&&(E.target===v.target||v.target===E.shadowParent)&&cx(E.delta,x)})[0];if(b&&b.should){v.cancelable&&v.preventDefault();return}if(!b){var w=(c.current.shards||[]).map(cl).filter(Boolean).filter(function(E){return E.contains(v.target)}),S=w.length>0?u(v,w[0]):!c.current.noIsolation;S&&v.cancelable&&v.preventDefault()}}},[]),s=y.useCallback(function(p,v,x,b){var w={name:p,delta:v,target:x,should:b,shadowParent:dx(x)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),a=y.useCallback(function(p){n.current=Dr(p),r.current=void 0},[]),f=y.useCallback(function(p){s(p.type,al(p),p.target,u(p,e.lockRef.current))},[]),d=y.useCallback(function(p){s(p.type,Dr(p),p.target,u(p,e.lockRef.current))},[]);y.useEffect(function(){return en.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",l,Jt),document.addEventListener("touchmove",l,Jt),document.addEventListener("touchstart",a,Jt),function(){en=en.filter(function(p){return p!==i}),document.removeEventListener("wheel",l,Jt),document.removeEventListener("touchmove",l,Jt),document.removeEventListener("touchstart",a,Jt)}},[]);var h=e.removeScrollBar,m=e.inert;return y.createElement(y.Fragment,null,m?y.createElement(i,{styles:lx(o)}):null,h?y.createElement(ex,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function dx(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const hx=$0(Ud,fx);var ur=y.forwardRef(function(e,t){return y.createElement(ui,nt({},e,{ref:t,sideCar:hx}))});ur.classNames=ui.classNames;var px=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},tn=new WeakMap,kr=new WeakMap,Lr={},Ki=0,qd=function(e){return e&&(e.host||qd(e.parentNode))},mx=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=qd(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},gx=function(e,t,n,r){var o=mx(t,Array.isArray(e)?e:[e]);Lr[n]||(Lr[n]=new WeakMap);var i=Lr[n],c=[],u=new Set,l=new Set(o),s=function(f){!f||u.has(f)||(u.add(f),s(f.parentNode))};o.forEach(s);var a=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(d){if(u.has(d))a(d);else try{var h=d.getAttribute(r),m=h!==null&&h!=="false",p=(tn.get(d)||0)+1,v=(i.get(d)||0)+1;tn.set(d,p),i.set(d,v),c.push(d),p===1&&m&&kr.set(d,!0),v===1&&d.setAttribute(n,"true"),m||d.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",d,x)}})};return a(t),u.clear(),Ki++,function(){c.forEach(function(f){var d=tn.get(f)-1,h=i.get(f)-1;tn.set(f,d),i.set(f,h),d||(kr.has(f)||f.removeAttribute(r),kr.delete(f)),h||f.removeAttribute(n)}),Ki--,Ki||(tn=new WeakMap,tn=new WeakMap,kr=new WeakMap,Lr={})}},fi=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=px(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),gx(r,o,n,"aria-hidden")):function(){return null}},di="Dialog",[Kd]=Ee(di),[vx,tt]=Kd(di),Yd=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:c=!0}=e,u=y.useRef(null),l=y.useRef(null),[s,a]=Ne({prop:r,defaultProp:o??!1,onChange:i,caller:di});return g.jsx(vx,{scope:t,triggerRef:u,contentRef:l,contentId:Re(),titleId:Re(),descriptionId:Re(),open:s,onOpenChange:a,onOpenToggle:y.useCallback(()=>a(f=>!f),[a]),modal:c,children:n})};Yd.displayName=di;var Xd="DialogTrigger",yx=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=tt(Xd,n),i=re(t,o.triggerRef);return g.jsx(z.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Pa(o.open),...r,ref:i,onClick:B(e.onClick,o.onOpenToggle)})});yx.displayName=Xd;var Ra="DialogPortal",[xx,Zd]=Kd(Ra,{forceMount:void 0}),Qd=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=tt(Ra,t);return g.jsx(xx,{scope:t,forceMount:n,children:y.Children.map(r,c=>g.jsx(je,{present:n||i.open,children:g.jsx(lr,{asChild:!0,container:o,children:c})}))})};Qd.displayName=Ra;var Bo="DialogOverlay",Jd=y.forwardRef((e,t)=>{const n=Zd(Bo,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=tt(Bo,e.__scopeDialog);return i.modal?g.jsx(je,{present:r||i.open,children:g.jsx(wx,{...o,ref:t})}):null});Jd.displayName=Bo;var bx=St("DialogOverlay.RemoveScroll"),wx=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=tt(Bo,n);return g.jsx(ur,{as:bx,allowPinchZoom:!0,shards:[o.contentRef],children:g.jsx(z.div,{"data-state":Pa(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Ut="DialogContent",eh=y.forwardRef((e,t)=>{const n=Zd(Ut,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=tt(Ut,e.__scopeDialog);return g.jsx(je,{present:r||i.open,children:i.modal?g.jsx(Ex,{...o,ref:t}):g.jsx(Sx,{...o,ref:t})})});eh.displayName=Ut;var Ex=y.forwardRef((e,t)=>{const n=tt(Ut,e.__scopeDialog),r=y.useRef(null),o=re(t,n.contentRef,r);return y.useEffect(()=>{const i=r.current;if(i)return fi(i)},[]),g.jsx(th,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:B(e.onCloseAutoFocus,i=>{var c;i.preventDefault(),(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:B(e.onPointerDownOutside,i=>{const c=i.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0;(c.button===2||u)&&i.preventDefault()}),onFocusOutside:B(e.onFocusOutside,i=>i.preventDefault())})}),Sx=y.forwardRef((e,t)=>{const n=tt(Ut,e.__scopeDialog),r=y.useRef(!1),o=y.useRef(!1);return g.jsx(th,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var c,u;(c=e.onCloseAutoFocus)==null||c.call(e,i),i.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var l,s;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;((s=n.triggerRef.current)==null?void 0:s.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),th=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...c}=e,u=tt(Ut,n),l=y.useRef(null),s=re(t,l);return li(),g.jsxs(g.Fragment,{children:[g.jsx(cr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:g.jsx(xn,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":Pa(u.open),...c,ref:s,onDismiss:()=>u.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(_x,{titleId:u.titleId}),g.jsx(Tx,{contentRef:l,descriptionId:u.descriptionId})]})]})}),Ta="DialogTitle",nh=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=tt(Ta,n);return g.jsx(z.h2,{id:o.titleId,...r,ref:t})});nh.displayName=Ta;var rh="DialogDescription",oh=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=tt(rh,n);return g.jsx(z.p,{id:o.descriptionId,...r,ref:t})});oh.displayName=rh;var ih="DialogClose",Cx=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=tt(ih,n);return g.jsx(z.button,{type:"button",...r,ref:t,onClick:B(e.onClick,()=>o.onOpenChange(!1))})});Cx.displayName=ih;function Pa(e){return e?"open":"closed"}var sh="DialogTitleWarning",[bN,ah]=Vy(sh,{contentName:Ut,titleName:Ta,docsSlug:"dialog"}),_x=({titleId:e})=>{const t=ah(sh),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
72
72
 
73
73
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
74
74
 
75
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},fx="DialogDescriptionWarning",dx=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${th(fx).contentName}}.`;return y.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},hx=Gd,px=Wd,mx=qd,gx=Kd,vx=Xd,yx=Qd,kr={exports:{}},qi={};/**
75
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Rx="DialogDescriptionWarning",Tx=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ah(Rx).contentName}}.`;return y.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Px=Yd,Ax=Qd,Ox=Jd,Mx=eh,Ix=nh,Nx=oh,Fr={exports:{}},Yi={};/**
76
76
  * @license React
77
77
  * use-sync-external-store-shim.production.js
78
78
  *
@@ -80,7 +80,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
80
80
  *
81
81
  * This source code is licensed under the MIT license found in the
82
82
  * LICENSE file in the root directory of this source tree.
83
- */var ol;function xx(){if(ol)return qi;ol=1;var e=_;function t(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,c=e.useDebugValue;function u(f,d){var h=d(),m=r({inst:{value:h,getSnapshot:d}}),p=m[0].inst,v=m[1];return s(function(){p.value=h,p.getSnapshot=d,l(p)&&v({inst:p})},[f,h,d]),o(function(){return l(p)&&v({inst:p}),f(function(){l(p)&&v({inst:p})})},[f]),c(h),h}function l(f){var d=f.getSnapshot;f=f.value;try{var h=d();return!n(f,h)}catch{return!0}}function i(f,d){return d()}var a=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?i:u;return qi.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:a,qi}var Ki={};/**
83
+ */var ll;function jx(){if(ll)return Yi;ll=1;var e=_;function t(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,c=e.useDebugValue;function u(f,d){var h=d(),m=r({inst:{value:h,getSnapshot:d}}),p=m[0].inst,v=m[1];return i(function(){p.value=h,p.getSnapshot=d,l(p)&&v({inst:p})},[f,h,d]),o(function(){return l(p)&&v({inst:p}),f(function(){l(p)&&v({inst:p})})},[f]),c(h),h}function l(f){var d=f.getSnapshot;f=f.value;try{var h=d();return!n(f,h)}catch{return!0}}function s(f,d){return d()}var a=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?s:u;return Yi.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:a,Yi}var Xi={};/**
84
84
  * @license React
85
85
  * use-sync-external-store-shim.development.js
86
86
  *
@@ -88,53 +88,53 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
88
88
  *
89
89
  * This source code is licensed under the MIT license found in the
90
90
  * LICENSE file in the root directory of this source tree.
91
- */var il;function bx(){return il||(il=1,process.env.NODE_ENV!=="production"&&(function(){function e(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}function t(h,m){a||o.startTransition===void 0||(a=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var p=m();if(!f){var v=m();s(p,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}v=c({inst:{value:p,getSnapshot:m}});var x=v[0].inst,b=v[1];return l(function(){x.value=p,x.getSnapshot=m,n(x)&&b({inst:x})},[h,p,m]),u(function(){return n(x)&&b({inst:x}),h(function(){n(x)&&b({inst:x})})},[h]),i(p),p}function n(h){var m=h.getSnapshot;h=h.value;try{var p=m();return!s(h,p)}catch{return!0}}function r(h,m){return m()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=_,s=typeof Object.is=="function"?Object.is:e,c=o.useState,u=o.useEffect,l=o.useLayoutEffect,i=o.useDebugValue,a=!1,f=!1,d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Ki.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:d,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Ki}var sl;function wx(){return sl||(sl=1,process.env.NODE_ENV==="production"?kr.exports=xx():kr.exports=bx()),kr.exports}var Ex=wx();function Sx(){return Ex.useSyncExternalStore(Cx,()=>!0,()=>!1)}function Cx(){return()=>{}}var Pa="Avatar",[_x]=Ce(Pa),[Rx,nh]=_x(Pa),rh=y.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,s]=y.useState("idle");return g.jsx(Rx,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:s,children:g.jsx(z.span,{...r,ref:t})})});rh.displayName=Pa;var oh="AvatarImage",ih=y.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...s}=e,c=nh(oh,n),u=Tx(r,s),l=Ze(i=>{o(i),c.onImageLoadingStatusChange(i)});return we(()=>{u!=="idle"&&l(u)},[u,l]),u==="loaded"?g.jsx(z.img,{...s,ref:t,src:r}):null});ih.displayName=oh;var sh="AvatarFallback",ah=y.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,s=nh(sh,n),[c,u]=y.useState(r===void 0);return y.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>u(!0),r);return()=>window.clearTimeout(l)}},[r]),c&&s.imageLoadingStatus!=="loaded"?g.jsx(z.span,{...o,ref:t}):null});ah.displayName=sh;function al(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Tx(e,{referrerPolicy:t,crossOrigin:n}){const r=Sx(),o=y.useRef(null),s=r?(o.current||(o.current=new window.Image),o.current):null,[c,u]=y.useState(()=>al(s,e));return we(()=>{u(al(s,e))},[s,e]),we(()=>{const l=f=>()=>{u(f)};if(!s)return;const i=l("loaded"),a=l("error");return s.addEventListener("load",i),s.addEventListener("error",a),t&&(s.referrerPolicy=t),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",i),s.removeEventListener("error",a)}},[s,n,t]),c}var Px=rh,Ax=ih,Ox=ah;function lr(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function ur(e){const[t,n]=y.useState(void 0);return we(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let c,u;if("borderBoxSize"in s){const l=s.borderBoxSize,i=Array.isArray(l)?l[0]:l;c=i.inlineSize,u=i.blockSize}else c=e.offsetWidth,u=e.offsetHeight;n({width:c,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var fi="Checkbox",[Mx]=Ce(fi),[Ix,Aa]=Mx(fi);function Dx(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:s,form:c,name:u,onCheckedChange:l,required:i,value:a="on",internal_do_not_use_render:f}=e,[d,h]=Ne({prop:n,defaultProp:o??!1,onChange:l,caller:fi}),[m,p]=y.useState(null),[v,x]=y.useState(null),b=y.useRef(!1),w=m?!!c||!!m.closest("form"):!0,E={checked:d,disabled:s,setChecked:h,control:m,setControl:p,name:u,form:c,value:a,hasConsumerStoppedPropagationRef:b,required:i,defaultChecked:Et(o)?!1:o,isFormControl:w,bubbleInput:v,setBubbleInput:x};return g.jsx(Ix,{scope:t,...E,children:jx(f)?f(E):r})}var ch="CheckboxTrigger",lh=y.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:s,value:c,disabled:u,checked:l,required:i,setControl:a,setChecked:f,hasConsumerStoppedPropagationRef:d,isFormControl:h,bubbleInput:m}=Aa(ch,e),p=re(o,a),v=y.useRef(l);return y.useEffect(()=>{const x=s==null?void 0:s.form;if(x){const b=()=>f(v.current);return x.addEventListener("reset",b),()=>x.removeEventListener("reset",b)}},[s,f]),g.jsx(z.button,{type:"button",role:"checkbox","aria-checked":Et(l)?"mixed":l,"aria-required":i,"data-state":ph(l),"data-disabled":u?"":void 0,disabled:u,value:c,...r,ref:p,onKeyDown:$(t,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:$(n,x=>{f(b=>Et(b)?!0:!b),m&&h&&(d.current=x.isPropagationStopped(),d.current||x.stopPropagation())})})});lh.displayName=ch;var uh=y.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:s,required:c,disabled:u,value:l,onCheckedChange:i,form:a,...f}=e;return g.jsx(Dx,{__scopeCheckbox:n,checked:o,defaultChecked:s,disabled:u,required:c,onCheckedChange:i,name:r,form:a,value:l,internal_do_not_use_render:({isFormControl:d})=>g.jsxs(g.Fragment,{children:[g.jsx(lh,{...f,ref:t,__scopeCheckbox:n}),d&&g.jsx(hh,{__scopeCheckbox:n})]})})});uh.displayName=fi;var fh="CheckboxIndicator",Nx=y.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,s=Aa(fh,n);return g.jsx(je,{present:r||Et(s.checked)||s.checked===!0,children:g.jsx(z.span,{"data-state":ph(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Nx.displayName=fh;var dh="CheckboxBubbleInput",hh=y.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:c,required:u,disabled:l,name:i,value:a,form:f,bubbleInput:d,setBubbleInput:h}=Aa(dh,e),m=re(n,h),p=lr(s),v=ur(r);y.useEffect(()=>{const b=d;if(!b)return;const w=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(w,"checked").set,T=!o.current;if(p!==s&&S){const P=new Event("click",{bubbles:T});b.indeterminate=Et(s),S.call(b,Et(s)?!1:s),b.dispatchEvent(P)}},[d,p,s,o]);const x=y.useRef(Et(s)?!1:s);return g.jsx(z.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??x.current,required:u,disabled:l,name:i,value:a,form:f,...t,tabIndex:-1,ref:m,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});hh.displayName=dh;function jx(e){return typeof e=="function"}function Et(e){return e==="indeterminate"}function ph(e){return Et(e)?"indeterminate":e?"checked":"unchecked"}const kx=["top","right","bottom","left"],Ct=Math.min,Fe=Math.max,Vo=Math.round,Lr=Math.floor,ot=e=>({x:e,y:e}),Lx={left:"right",right:"left",bottom:"top",top:"bottom"},Fx={start:"end",end:"start"};function As(e,t,n){return Fe(e,Ct(t,n))}function ht(e,t){return typeof e=="function"?e(t):e}function pt(e){return e.split("-")[0]}function bn(e){return e.split("-")[1]}function Oa(e){return e==="x"?"y":"x"}function Ma(e){return e==="y"?"height":"width"}const Vx=new Set(["top","bottom"]);function rt(e){return Vx.has(pt(e))?"y":"x"}function Ia(e){return Oa(rt(e))}function Bx(e,t,n){n===void 0&&(n=!1);const r=bn(e),o=Ia(e),s=Ma(o);let c=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(c=Bo(c)),[c,Bo(c)]}function $x(e){const t=Bo(e);return[Os(e),t,Os(t)]}function Os(e){return e.replace(/start|end/g,t=>Fx[t])}const cl=["left","right"],ll=["right","left"],Ux=["top","bottom"],Gx=["bottom","top"];function Hx(e,t,n){switch(e){case"top":case"bottom":return n?t?ll:cl:t?cl:ll;case"left":case"right":return t?Ux:Gx;default:return[]}}function zx(e,t,n,r){const o=bn(e);let s=Hx(pt(e),n==="start",r);return o&&(s=s.map(c=>c+"-"+o),t&&(s=s.concat(s.map(Os)))),s}function Bo(e){return e.replace(/left|right|bottom|top/g,t=>Lx[t])}function Wx(e){return{top:0,right:0,bottom:0,left:0,...e}}function mh(e){return typeof e!="number"?Wx(e):{top:e,right:e,bottom:e,left:e}}function $o(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function ul(e,t,n){let{reference:r,floating:o}=e;const s=rt(t),c=Ia(t),u=Ma(c),l=pt(t),i=s==="y",a=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[u]/2-o[u]/2;let h;switch(l){case"top":h={x:a,y:r.y-o.height};break;case"bottom":h={x:a,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(bn(t)){case"start":h[c]-=d*(n&&i?-1:1);break;case"end":h[c]+=d*(n&&i?-1:1);break}return h}async function qx(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:c,elements:u,strategy:l}=e,{boundary:i="clippingAncestors",rootBoundary:a="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=ht(t,e),m=mh(h),v=u[d?f==="floating"?"reference":"floating":f],x=$o(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(u.floating)),boundary:i,rootBoundary:a,strategy:l})),b=f==="floating"?{x:r,y:o,width:c.floating.width,height:c.floating.height}:c.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u.floating)),E=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},S=$o(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:b,offsetParent:w,strategy:l}):b);return{top:(x.top-S.top+m.top)/E.y,bottom:(S.bottom-x.bottom+m.bottom)/E.y,left:(x.left-S.left+m.left)/E.x,right:(S.right-x.right+m.right)/E.x}}const Kx=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:c}=n,u=s.filter(Boolean),l=await(c.isRTL==null?void 0:c.isRTL(t));let i=await c.getElementRects({reference:e,floating:t,strategy:o}),{x:a,y:f}=ul(i,r,l),d=r,h={},m=0;for(let v=0;v<u.length;v++){var p;const{name:x,fn:b}=u[v],{x:w,y:E,data:S,reset:T}=await b({x:a,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:h,rects:i,platform:{...c,detectOverflow:(p=c.detectOverflow)!=null?p:qx},elements:{reference:e,floating:t}});a=w??a,f=E??f,h={...h,[x]:{...h[x],...S}},T&&m<=50&&(m++,typeof T=="object"&&(T.placement&&(d=T.placement),T.rects&&(i=T.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:o}):T.rects),{x:a,y:f}=ul(i,d,l)),v=-1)}return{x:a,y:f,placement:d,strategy:o,middlewareData:h}},Yx=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:c,elements:u,middlewareData:l}=t,{element:i,padding:a=0}=ht(e,t)||{};if(i==null)return{};const f=mh(a),d={x:n,y:r},h=Ia(o),m=Ma(h),p=await c.getDimensions(i),v=h==="y",x=v?"top":"left",b=v?"bottom":"right",w=v?"clientHeight":"clientWidth",E=s.reference[m]+s.reference[h]-d[h]-s.floating[m],S=d[h]-s.reference[h],T=await(c.getOffsetParent==null?void 0:c.getOffsetParent(i));let P=T?T[w]:0;(!P||!await(c.isElement==null?void 0:c.isElement(T)))&&(P=u.floating[w]||s.floating[m]);const A=E/2-S/2,O=P/2-p[m]/2-1,R=Ct(f[x],O),I=Ct(f[b],O),D=R,F=P-p[m]-I,B=P/2-p[m]/2+A,q=As(D,B,F),G=!l.arrow&&bn(o)!=null&&B!==q&&s.reference[m]/2-(B<D?R:I)-p[m]/2<0,H=G?B<D?B-D:B-F:0;return{[h]:d[h]+H,data:{[h]:q,centerOffset:B-q-H,...G&&{alignmentOffset:H}},reset:G}}}),Xx=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:c,initialPlacement:u,platform:l,elements:i}=t,{mainAxis:a=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...v}=ht(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=pt(o),b=rt(u),w=pt(u)===u,E=await(l.isRTL==null?void 0:l.isRTL(i.floating)),S=d||(w||!p?[Bo(u)]:$x(u)),T=m!=="none";!d&&T&&S.push(...zx(u,p,m,E));const P=[u,...S],A=await l.detectOverflow(t,v),O=[];let R=((r=s.flip)==null?void 0:r.overflows)||[];if(a&&O.push(A[x]),f){const B=Bx(o,c,E);O.push(A[B[0]],A[B[1]])}if(R=[...R,{placement:o,overflows:O}],!O.every(B=>B<=0)){var I,D;const B=(((I=s.flip)==null?void 0:I.index)||0)+1,q=P[B];if(q&&(!(f==="alignment"?b!==rt(q):!1)||R.every(U=>rt(U.placement)===b?U.overflows[0]>0:!0)))return{data:{index:B,overflows:R},reset:{placement:q}};let G=(D=R.filter(H=>H.overflows[0]<=0).sort((H,U)=>H.overflows[1]-U.overflows[1])[0])==null?void 0:D.placement;if(!G)switch(h){case"bestFit":{var F;const H=(F=R.filter(U=>{if(T){const L=rt(U.placement);return L===b||L==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(L=>L>0).reduce((L,M)=>L+M,0)]).sort((U,L)=>U[1]-L[1])[0])==null?void 0:F[0];H&&(G=H);break}case"initialPlacement":G=u;break}if(o!==G)return{reset:{placement:G}}}return{}}}};function fl(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function dl(e){return kx.some(t=>e[t]>=0)}const Zx=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=ht(e,t);switch(o){case"referenceHidden":{const c=await r.detectOverflow(t,{...s,elementContext:"reference"}),u=fl(c,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:dl(u)}}}case"escaped":{const c=await r.detectOverflow(t,{...s,altBoundary:!0}),u=fl(c,n.floating);return{data:{escapedOffsets:u,escaped:dl(u)}}}default:return{}}}}},gh=new Set(["left","top"]);async function Qx(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),c=pt(n),u=bn(n),l=rt(n)==="y",i=gh.has(c)?-1:1,a=s&&l?-1:1,f=ht(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return u&&typeof m=="number"&&(h=u==="end"?m*-1:m),l?{x:h*a,y:d*i}:{x:d*i,y:h*a}}const Jx=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:c,middlewareData:u}=t,l=await Qx(t,e);return c===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:c}}}}},e1=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:c=!0,crossAxis:u=!1,limiter:l={fn:x=>{let{x:b,y:w}=x;return{x:b,y:w}}},...i}=ht(e,t),a={x:n,y:r},f=await s.detectOverflow(t,i),d=rt(pt(o)),h=Oa(d);let m=a[h],p=a[d];if(c){const x=h==="y"?"top":"left",b=h==="y"?"bottom":"right",w=m+f[x],E=m-f[b];m=As(w,m,E)}if(u){const x=d==="y"?"top":"left",b=d==="y"?"bottom":"right",w=p+f[x],E=p-f[b];p=As(w,p,E)}const v=l.fn({...t,[h]:m,[d]:p});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[h]:c,[d]:u}}}}}},t1=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:c}=t,{offset:u=0,mainAxis:l=!0,crossAxis:i=!0}=ht(e,t),a={x:n,y:r},f=rt(o),d=Oa(f);let h=a[d],m=a[f];const p=ht(u,t),v=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const w=d==="y"?"height":"width",E=s.reference[d]-s.floating[w]+v.mainAxis,S=s.reference[d]+s.reference[w]-v.mainAxis;h<E?h=E:h>S&&(h=S)}if(i){var x,b;const w=d==="y"?"width":"height",E=gh.has(pt(o)),S=s.reference[f]-s.floating[w]+(E&&((x=c.offset)==null?void 0:x[f])||0)+(E?0:v.crossAxis),T=s.reference[f]+s.reference[w]+(E?0:((b=c.offset)==null?void 0:b[f])||0)-(E?v.crossAxis:0);m<S?m=S:m>T&&(m=T)}return{[d]:h,[f]:m}}}},n1=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:c,elements:u}=t,{apply:l=()=>{},...i}=ht(e,t),a=await c.detectOverflow(t,i),f=pt(o),d=bn(o),h=rt(o)==="y",{width:m,height:p}=s.floating;let v,x;f==="top"||f==="bottom"?(v=f,x=d===(await(c.isRTL==null?void 0:c.isRTL(u.floating))?"start":"end")?"left":"right"):(x=f,v=d==="end"?"top":"bottom");const b=p-a.top-a.bottom,w=m-a.left-a.right,E=Ct(p-a[v],b),S=Ct(m-a[x],w),T=!t.middlewareData.shift;let P=E,A=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(A=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(P=b),T&&!d){const R=Fe(a.left,0),I=Fe(a.right,0),D=Fe(a.top,0),F=Fe(a.bottom,0);h?A=m-2*(R!==0||I!==0?R+I:Fe(a.left,a.right)):P=p-2*(D!==0||F!==0?D+F:Fe(a.top,a.bottom))}await l({...t,availableWidth:A,availableHeight:P});const O=await c.getDimensions(u.floating);return m!==O.width||p!==O.height?{reset:{rects:!0}}:{}}}};function di(){return typeof window<"u"}function wn(e){return vh(e)?(e.nodeName||"").toLowerCase():"#document"}function Ve(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function lt(e){var t;return(t=(vh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function vh(e){return di()?e instanceof Node||e instanceof Ve(e).Node:!1}function Qe(e){return di()?e instanceof Element||e instanceof Ve(e).Element:!1}function at(e){return di()?e instanceof HTMLElement||e instanceof Ve(e).HTMLElement:!1}function hl(e){return!di()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ve(e).ShadowRoot}const r1=new Set(["inline","contents"]);function fr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Je(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!r1.has(o)}const o1=new Set(["table","td","th"]);function i1(e){return o1.has(wn(e))}const s1=[":popover-open",":modal"];function hi(e){return s1.some(t=>{try{return e.matches(t)}catch{return!1}})}const a1=["transform","translate","scale","rotate","perspective"],c1=["transform","translate","scale","rotate","perspective","filter"],l1=["paint","layout","strict","content"];function Da(e){const t=Na(),n=Qe(e)?Je(e):e;return a1.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||c1.some(r=>(n.willChange||"").includes(r))||l1.some(r=>(n.contain||"").includes(r))}function u1(e){let t=_t(e);for(;at(t)&&!hn(t);){if(Da(t))return t;if(hi(t))return null;t=_t(t)}return null}function Na(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const f1=new Set(["html","body","#document"]);function hn(e){return f1.has(wn(e))}function Je(e){return Ve(e).getComputedStyle(e)}function pi(e){return Qe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _t(e){if(wn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||hl(e)&&e.host||lt(e);return hl(t)?t.host:t}function yh(e){const t=_t(e);return hn(t)?e.ownerDocument?e.ownerDocument.body:e.body:at(t)&&fr(t)?t:yh(t)}function Yn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=yh(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),c=Ve(o);if(s){const u=Ms(c);return t.concat(c,c.visualViewport||[],fr(o)?o:[],u&&n?Yn(u):[])}return t.concat(o,Yn(o,[],n))}function Ms(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xh(e){const t=Je(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=at(e),s=o?e.offsetWidth:n,c=o?e.offsetHeight:r,u=Vo(n)!==s||Vo(r)!==c;return u&&(n=s,r=c),{width:n,height:r,$:u}}function ja(e){return Qe(e)?e:e.contextElement}function fn(e){const t=ja(e);if(!at(t))return ot(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=xh(t);let c=(s?Vo(n.width):n.width)/r,u=(s?Vo(n.height):n.height)/o;return(!c||!Number.isFinite(c))&&(c=1),(!u||!Number.isFinite(u))&&(u=1),{x:c,y:u}}const d1=ot(0);function bh(e){const t=Ve(e);return!Na()||!t.visualViewport?d1:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function h1(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ve(e)?!1:t}function Gt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=ja(e);let c=ot(1);t&&(r?Qe(r)&&(c=fn(r)):c=fn(e));const u=h1(s,n,r)?bh(s):ot(0);let l=(o.left+u.x)/c.x,i=(o.top+u.y)/c.y,a=o.width/c.x,f=o.height/c.y;if(s){const d=Ve(s),h=r&&Qe(r)?Ve(r):r;let m=d,p=Ms(m);for(;p&&r&&h!==m;){const v=fn(p),x=p.getBoundingClientRect(),b=Je(p),w=x.left+(p.clientLeft+parseFloat(b.paddingLeft))*v.x,E=x.top+(p.clientTop+parseFloat(b.paddingTop))*v.y;l*=v.x,i*=v.y,a*=v.x,f*=v.y,l+=w,i+=E,m=Ve(p),p=Ms(m)}}return $o({width:a,height:f,x:l,y:i})}function mi(e,t){const n=pi(e).scrollLeft;return t?t.left+n:Gt(lt(e)).left+n}function wh(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-mi(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function p1(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",c=lt(r),u=t?hi(t.floating):!1;if(r===c||u&&s)return n;let l={scrollLeft:0,scrollTop:0},i=ot(1);const a=ot(0),f=at(r);if((f||!f&&!s)&&((wn(r)!=="body"||fr(c))&&(l=pi(r)),at(r))){const h=Gt(r);i=fn(r),a.x=h.x+r.clientLeft,a.y=h.y+r.clientTop}const d=c&&!f&&!s?wh(c,l):ot(0);return{width:n.width*i.x,height:n.height*i.y,x:n.x*i.x-l.scrollLeft*i.x+a.x+d.x,y:n.y*i.y-l.scrollTop*i.y+a.y+d.y}}function m1(e){return Array.from(e.getClientRects())}function g1(e){const t=lt(e),n=pi(e),r=e.ownerDocument.body,o=Fe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Fe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let c=-n.scrollLeft+mi(e);const u=-n.scrollTop;return Je(r).direction==="rtl"&&(c+=Fe(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:c,y:u}}const pl=25;function v1(e,t){const n=Ve(e),r=lt(e),o=n.visualViewport;let s=r.clientWidth,c=r.clientHeight,u=0,l=0;if(o){s=o.width,c=o.height;const a=Na();(!a||a&&t==="fixed")&&(u=o.offsetLeft,l=o.offsetTop)}const i=mi(r);if(i<=0){const a=r.ownerDocument,f=a.body,d=getComputedStyle(f),h=a.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,m=Math.abs(r.clientWidth-f.clientWidth-h);m<=pl&&(s-=m)}else i<=pl&&(s+=i);return{width:s,height:c,x:u,y:l}}const y1=new Set(["absolute","fixed"]);function x1(e,t){const n=Gt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=at(e)?fn(e):ot(1),c=e.clientWidth*s.x,u=e.clientHeight*s.y,l=o*s.x,i=r*s.y;return{width:c,height:u,x:l,y:i}}function ml(e,t,n){let r;if(t==="viewport")r=v1(e,n);else if(t==="document")r=g1(lt(e));else if(Qe(t))r=x1(t,n);else{const o=bh(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return $o(r)}function Eh(e,t){const n=_t(e);return n===t||!Qe(n)||hn(n)?!1:Je(n).position==="fixed"||Eh(n,t)}function b1(e,t){const n=t.get(e);if(n)return n;let r=Yn(e,[],!1).filter(u=>Qe(u)&&wn(u)!=="body"),o=null;const s=Je(e).position==="fixed";let c=s?_t(e):e;for(;Qe(c)&&!hn(c);){const u=Je(c),l=Da(c);!l&&u.position==="fixed"&&(o=null),(s?!l&&!o:!l&&u.position==="static"&&!!o&&y1.has(o.position)||fr(c)&&!l&&Eh(e,c))?r=r.filter(a=>a!==c):o=u,c=_t(c)}return t.set(e,r),r}function w1(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const c=[...n==="clippingAncestors"?hi(t)?[]:b1(t,this._c):[].concat(n),r],u=c[0],l=c.reduce((i,a)=>{const f=ml(t,a,o);return i.top=Fe(f.top,i.top),i.right=Ct(f.right,i.right),i.bottom=Ct(f.bottom,i.bottom),i.left=Fe(f.left,i.left),i},ml(t,u,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function E1(e){const{width:t,height:n}=xh(e);return{width:t,height:n}}function S1(e,t,n){const r=at(t),o=lt(t),s=n==="fixed",c=Gt(e,!0,s,t);let u={scrollLeft:0,scrollTop:0};const l=ot(0);function i(){l.x=mi(o)}if(r||!r&&!s)if((wn(t)!=="body"||fr(o))&&(u=pi(t)),r){const h=Gt(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&i();s&&!r&&o&&i();const a=o&&!r&&!s?wh(o,u):ot(0),f=c.left+u.scrollLeft-l.x-a.x,d=c.top+u.scrollTop-l.y-a.y;return{x:f,y:d,width:c.width,height:c.height}}function Yi(e){return Je(e).position==="static"}function gl(e,t){if(!at(e)||Je(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return lt(e)===n&&(n=n.ownerDocument.body),n}function Sh(e,t){const n=Ve(e);if(hi(e))return n;if(!at(e)){let o=_t(e);for(;o&&!hn(o);){if(Qe(o)&&!Yi(o))return o;o=_t(o)}return n}let r=gl(e,t);for(;r&&i1(r)&&Yi(r);)r=gl(r,t);return r&&hn(r)&&Yi(r)&&!Da(r)?n:r||u1(e)||n}const C1=async function(e){const t=this.getOffsetParent||Sh,n=this.getDimensions,r=await n(e.floating);return{reference:S1(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function _1(e){return Je(e).direction==="rtl"}const R1={convertOffsetParentRelativeRectToViewportRelativeRect:p1,getDocumentElement:lt,getClippingRect:w1,getOffsetParent:Sh,getElementRects:C1,getClientRects:m1,getDimensions:E1,getScale:fn,isElement:Qe,isRTL:_1};function Ch(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function T1(e,t){let n=null,r;const o=lt(e);function s(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function c(u,l){u===void 0&&(u=!1),l===void 0&&(l=1),s();const i=e.getBoundingClientRect(),{left:a,top:f,width:d,height:h}=i;if(u||t(),!d||!h)return;const m=Lr(f),p=Lr(o.clientWidth-(a+d)),v=Lr(o.clientHeight-(f+h)),x=Lr(a),w={rootMargin:-m+"px "+-p+"px "+-v+"px "+-x+"px",threshold:Fe(0,Ct(1,l))||1};let E=!0;function S(T){const P=T[0].intersectionRatio;if(P!==l){if(!E)return c();P?c(!1,P):r=setTimeout(()=>{c(!1,1e-7)},1e3)}P===1&&!Ch(i,e.getBoundingClientRect())&&c(),E=!1}try{n=new IntersectionObserver(S,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,w)}n.observe(e)}return c(!0),s}function P1(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,i=ja(e),a=o||s?[...i?Yn(i):[],...Yn(t)]:[];a.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const f=i&&u?T1(i,n):null;let d=-1,h=null;c&&(h=new ResizeObserver(x=>{let[b]=x;b&&b.target===i&&h&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),i&&!l&&h.observe(i),h.observe(t));let m,p=l?Gt(e):null;l&&v();function v(){const x=Gt(e);p&&!Ch(p,x)&&n(),p=x,m=requestAnimationFrame(v)}return n(),()=>{var x;a.forEach(b=>{o&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),f==null||f(),(x=h)==null||x.disconnect(),h=null,l&&cancelAnimationFrame(m)}}const A1=Jx,O1=e1,M1=Xx,I1=n1,D1=Zx,vl=Yx,N1=t1,j1=(e,t,n)=>{const r=new Map,o={platform:R1,...n},s={...o.platform,_c:r};return Kx(e,t,{...o,platform:s})};var k1=typeof document<"u",L1=function(){},Mo=k1?_.useLayoutEffect:L1;function Uo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Uo(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Uo(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function _h(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function yl(e,t){const n=_h(e);return Math.round(t*n)/n}function Xi(e){const t=y.useRef(e);return Mo(()=>{t.current=e}),t}function F1(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:c}={},transform:u=!0,whileElementsMounted:l,open:i}=e,[a,f]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=y.useState(r);Uo(d,r)||h(r);const[m,p]=y.useState(null),[v,x]=y.useState(null),b=y.useCallback(U=>{U!==T.current&&(T.current=U,p(U))},[]),w=y.useCallback(U=>{U!==P.current&&(P.current=U,x(U))},[]),E=s||m,S=c||v,T=y.useRef(null),P=y.useRef(null),A=y.useRef(a),O=l!=null,R=Xi(l),I=Xi(o),D=Xi(i),F=y.useCallback(()=>{if(!T.current||!P.current)return;const U={placement:t,strategy:n,middleware:d};I.current&&(U.platform=I.current),j1(T.current,P.current,U).then(L=>{const M={...L,isPositioned:D.current!==!1};B.current&&!Uo(A.current,M)&&(A.current=M,ni.flushSync(()=>{f(M)}))})},[d,t,n,I,D]);Mo(()=>{i===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,f(U=>({...U,isPositioned:!1})))},[i]);const B=y.useRef(!1);Mo(()=>(B.current=!0,()=>{B.current=!1}),[]),Mo(()=>{if(E&&(T.current=E),S&&(P.current=S),E&&S){if(R.current)return R.current(E,S,F);F()}},[E,S,F,R,O]);const q=y.useMemo(()=>({reference:T,floating:P,setReference:b,setFloating:w}),[b,w]),G=y.useMemo(()=>({reference:E,floating:S}),[E,S]),H=y.useMemo(()=>{const U={position:n,left:0,top:0};if(!G.floating)return U;const L=yl(G.floating,a.x),M=yl(G.floating,a.y);return u?{...U,transform:"translate("+L+"px, "+M+"px)",..._h(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:M}},[n,u,G.floating,a.x,a.y]);return y.useMemo(()=>({...a,update:F,refs:q,elements:G,floatingStyles:H}),[a,F,q,G,H])}const V1=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?vl({element:r.current,padding:o}).fn(n):{}:r?vl({element:r,padding:o}).fn(n):{}}}},B1=(e,t)=>({...A1(e),options:[e,t]}),$1=(e,t)=>({...O1(e),options:[e,t]}),U1=(e,t)=>({...N1(e),options:[e,t]}),G1=(e,t)=>({...M1(e),options:[e,t]}),H1=(e,t)=>({...I1(e),options:[e,t]}),z1=(e,t)=>({...D1(e),options:[e,t]}),W1=(e,t)=>({...V1(e),options:[e,t]});var q1="Arrow",Rh=y.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return g.jsx(z.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});Rh.displayName=q1;var K1=Rh,ka="Popper",[Th,Pt]=Ce(ka),[Y1,Ph]=Th(ka),Ah=e=>{const{__scopePopper:t,children:n}=e,[r,o]=y.useState(null);return g.jsx(Y1,{scope:t,anchor:r,onAnchorChange:o,children:n})};Ah.displayName=ka;var Oh="PopperAnchor",Mh=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Ph(Oh,n),c=y.useRef(null),u=re(t,c),l=y.useRef(null);return y.useEffect(()=>{const i=l.current;l.current=(r==null?void 0:r.current)||c.current,i!==l.current&&s.onAnchorChange(l.current)}),r?null:g.jsx(z.div,{...o,ref:u})});Mh.displayName=Oh;var La="PopperContent",[X1,Z1]=Th(La),Ih=y.forwardRef((e,t)=>{var V,K,Z,W,oe,N;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:c=0,arrowPadding:u=0,avoidCollisions:l=!0,collisionBoundary:i=[],collisionPadding:a=0,sticky:f="partial",hideWhenDetached:d=!1,updatePositionStrategy:h="optimized",onPlaced:m,...p}=e,v=Ph(La,n),[x,b]=y.useState(null),w=re(t,he=>b(he)),[E,S]=y.useState(null),T=ur(E),P=(T==null?void 0:T.width)??0,A=(T==null?void 0:T.height)??0,O=r+(s!=="center"?"-"+s:""),R=typeof a=="number"?a:{top:0,right:0,bottom:0,left:0,...a},I=Array.isArray(i)?i:[i],D=I.length>0,F={padding:R,boundary:I.filter(J1),altBoundary:D},{refs:B,floatingStyles:q,placement:G,isPositioned:H,middlewareData:U}=F1({strategy:"fixed",placement:O,whileElementsMounted:(...he)=>P1(...he,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[B1({mainAxis:o+A,alignmentAxis:c}),l&&$1({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?U1():void 0,...F}),l&&G1({...F}),H1({...F,apply:({elements:he,rects:Ee,availableWidth:$e,availableHeight:It})=>{const{width:vt,height:Pr}=Ee.reference,Dt=he.floating.style;Dt.setProperty("--radix-popper-available-width",`${$e}px`),Dt.setProperty("--radix-popper-available-height",`${It}px`),Dt.setProperty("--radix-popper-anchor-width",`${vt}px`),Dt.setProperty("--radix-popper-anchor-height",`${Pr}px`)}}),E&&W1({element:E,padding:u}),eb({arrowWidth:P,arrowHeight:A}),d&&z1({strategy:"referenceHidden",...F})]}),[L,M]=jh(G),k=Ze(m);we(()=>{H&&(k==null||k())},[H,k]);const ee=(V=U.arrow)==null?void 0:V.x,ne=(K=U.arrow)==null?void 0:K.y,X=((Z=U.arrow)==null?void 0:Z.centerOffset)!==0,[ie,te]=y.useState();return we(()=>{x&&te(window.getComputedStyle(x).zIndex)},[x]),g.jsx("div",{ref:B.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:H?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ie,"--radix-popper-transform-origin":[(W=U.transformOrigin)==null?void 0:W.x,(oe=U.transformOrigin)==null?void 0:oe.y].join(" "),...((N=U.hide)==null?void 0:N.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(X1,{scope:n,placedSide:L,onArrowChange:S,arrowX:ee,arrowY:ne,shouldHideArrow:X,children:g.jsx(z.div,{"data-side":L,"data-align":M,...p,ref:w,style:{...p.style,animation:H?void 0:"none"}})})})});Ih.displayName=La;var Dh="PopperArrow",Q1={top:"bottom",right:"left",bottom:"top",left:"right"},Nh=y.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Z1(Dh,r),c=Q1[s.placedSide];return g.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:g.jsx(K1,{...o,ref:n,style:{...o.style,display:"block"}})})});Nh.displayName=Dh;function J1(e){return e!==null}var eb=e=>({name:"transformOrigin",options:e,fn(t){var v,x,b;const{placement:n,rects:r,middlewareData:o}=t,c=((v=o.arrow)==null?void 0:v.centerOffset)!==0,u=c?0:e.arrowWidth,l=c?0:e.arrowHeight,[i,a]=jh(n),f={start:"0%",center:"50%",end:"100%"}[a],d=(((x=o.arrow)==null?void 0:x.x)??0)+u/2,h=(((b=o.arrow)==null?void 0:b.y)??0)+l/2;let m="",p="";return i==="bottom"?(m=c?f:`${d}px`,p=`${-l}px`):i==="top"?(m=c?f:`${d}px`,p=`${r.floating.height+l}px`):i==="right"?(m=`${-l}px`,p=c?f:`${h}px`):i==="left"&&(m=`${r.floating.width+l}px`,p=c?f:`${h}px`),{data:{x:m,y:p}}}});function jh(e){const[t,n="center"]=e.split("-");return[t,n]}var gi=Ah,dr=Mh,vi=Ih,yi=Nh,Zi="rovingFocusGroup.onEntryFocus",tb={bubbles:!1,cancelable:!0},hr="RovingFocusGroup",[Is,kh,nb]=ir(hr),[rb,xi]=Ce(hr,[nb]),[ob,ib]=rb(hr),Lh=y.forwardRef((e,t)=>g.jsx(Is.Provider,{scope:e.__scopeRovingFocusGroup,children:g.jsx(Is.Slot,{scope:e.__scopeRovingFocusGroup,children:g.jsx(sb,{...e,ref:t})})}));Lh.displayName=hr;var sb=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:c,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:l,onEntryFocus:i,preventScrollOnEntryFocus:a=!1,...f}=e,d=y.useRef(null),h=re(t,d),m=yn(s),[p,v]=Ne({prop:c,defaultProp:u??null,onChange:l,caller:hr}),[x,b]=y.useState(!1),w=Ze(i),E=kh(n),S=y.useRef(!1),[T,P]=y.useState(0);return y.useEffect(()=>{const A=d.current;if(A)return A.addEventListener(Zi,w),()=>A.removeEventListener(Zi,w)},[w]),g.jsx(ob,{scope:n,orientation:r,dir:m,loop:o,currentTabStopId:p,onItemFocus:y.useCallback(A=>v(A),[v]),onItemShiftTab:y.useCallback(()=>b(!0),[]),onFocusableItemAdd:y.useCallback(()=>P(A=>A+1),[]),onFocusableItemRemove:y.useCallback(()=>P(A=>A-1),[]),children:g.jsx(z.div,{tabIndex:x||T===0?-1:0,"data-orientation":r,...f,ref:h,style:{outline:"none",...e.style},onMouseDown:$(e.onMouseDown,()=>{S.current=!0}),onFocus:$(e.onFocus,A=>{const O=!S.current;if(A.target===A.currentTarget&&O&&!x){const R=new CustomEvent(Zi,tb);if(A.currentTarget.dispatchEvent(R),!R.defaultPrevented){const I=E().filter(G=>G.focusable),D=I.find(G=>G.active),F=I.find(G=>G.id===p),q=[D,F,...I].filter(Boolean).map(G=>G.ref.current);Bh(q,a)}}S.current=!1}),onBlur:$(e.onBlur,()=>b(!1))})})}),Fh="RovingFocusGroupItem",Vh=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:c,...u}=e,l=Pe(),i=s||l,a=ib(Fh,n),f=a.currentTabStopId===i,d=kh(n),{onFocusableItemAdd:h,onFocusableItemRemove:m,currentTabStopId:p}=a;return y.useEffect(()=>{if(r)return h(),()=>m()},[r,h,m]),g.jsx(Is.ItemSlot,{scope:n,id:i,focusable:r,active:o,children:g.jsx(z.span,{tabIndex:f?0:-1,"data-orientation":a.orientation,...u,ref:t,onMouseDown:$(e.onMouseDown,v=>{r?a.onItemFocus(i):v.preventDefault()}),onFocus:$(e.onFocus,()=>a.onItemFocus(i)),onKeyDown:$(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){a.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const x=lb(v,a.orientation,a.dir);if(x!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let w=d().filter(E=>E.focusable).map(E=>E.ref.current);if(x==="last")w.reverse();else if(x==="prev"||x==="next"){x==="prev"&&w.reverse();const E=w.indexOf(v.currentTarget);w=a.loop?ub(w,E+1):w.slice(E+1)}setTimeout(()=>Bh(w))}}),children:typeof c=="function"?c({isCurrentTabStop:f,hasTabStop:p!=null}):c})})});Vh.displayName=Fh;var ab={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function cb(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function lb(e,t,n){const r=cb(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return ab[r]}function Bh(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function ub(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var $h=Lh,Uh=Vh,Ds=["Enter"," "],fb=["ArrowDown","PageUp","Home"],Gh=["ArrowUp","PageDown","End"],db=[...fb,...Gh],hb={ltr:[...Ds,"ArrowRight"],rtl:[...Ds,"ArrowLeft"]},pb={ltr:["ArrowLeft"],rtl:["ArrowRight"]},pr="Menu",[Xn,mb,gb]=ir(pr),[qt,Hh]=Ce(pr,[gb,Pt,xi]),bi=Pt(),zh=xi(),[vb,Kt]=qt(pr),[yb,mr]=qt(pr),Wh=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:c=!0}=e,u=bi(t),[l,i]=y.useState(null),a=y.useRef(!1),f=Ze(s),d=yn(o);return y.useEffect(()=>{const h=()=>{a.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>a.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),g.jsx(gi,{...u,children:g.jsx(vb,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:i,children:g.jsx(yb,{scope:t,onClose:y.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:a,dir:d,modal:c,children:r})})})};Wh.displayName=pr;var xb="MenuAnchor",Fa=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=bi(n);return g.jsx(dr,{...o,...r,ref:t})});Fa.displayName=xb;var Va="MenuPortal",[bb,qh]=qt(Va,{forceMount:void 0}),Kh=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Kt(Va,t);return g.jsx(bb,{scope:t,forceMount:n,children:g.jsx(je,{present:n||s.open,children:g.jsx(ar,{asChild:!0,container:o,children:r})})})};Kh.displayName=Va;var He="MenuContent",[wb,Ba]=qt(He),Yh=y.forwardRef((e,t)=>{const n=qh(He,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Kt(He,e.__scopeMenu),c=mr(He,e.__scopeMenu);return g.jsx(Xn.Provider,{scope:e.__scopeMenu,children:g.jsx(je,{present:r||s.open,children:g.jsx(Xn.Slot,{scope:e.__scopeMenu,children:c.modal?g.jsx(Eb,{...o,ref:t}):g.jsx(Sb,{...o,ref:t})})})})}),Eb=y.forwardRef((e,t)=>{const n=Kt(He,e.__scopeMenu),r=y.useRef(null),o=re(t,r);return y.useEffect(()=>{const s=r.current;if(s)return li(s)},[]),g.jsx($a,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:$(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Sb=y.forwardRef((e,t)=>{const n=Kt(He,e.__scopeMenu);return g.jsx($a,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Cb=St("MenuContent.ScrollLock"),$a=y.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:c,disableOutsidePointerEvents:u,onEntryFocus:l,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:f,onInteractOutside:d,onDismiss:h,disableOutsideScroll:m,...p}=e,v=Kt(He,n),x=mr(He,n),b=bi(n),w=zh(n),E=mb(n),[S,T]=y.useState(null),P=y.useRef(null),A=re(t,P,v.onContentChange),O=y.useRef(0),R=y.useRef(""),I=y.useRef(0),D=y.useRef(null),F=y.useRef("right"),B=y.useRef(0),q=m?cr:y.Fragment,G=m?{as:Cb,allowPinchZoom:!0}:void 0,H=L=>{var V,K;const M=R.current+L,k=E().filter(Z=>!Z.disabled),ee=document.activeElement,ne=(V=k.find(Z=>Z.ref.current===ee))==null?void 0:V.textValue,X=k.map(Z=>Z.textValue),ie=kb(X,M,ne),te=(K=k.find(Z=>Z.textValue===ie))==null?void 0:K.ref.current;(function Z(W){R.current=W,window.clearTimeout(O.current),W!==""&&(O.current=window.setTimeout(()=>Z(""),1e3))})(M),te&&setTimeout(()=>te.focus())};y.useEffect(()=>()=>window.clearTimeout(O.current),[]),ai();const U=y.useCallback(L=>{var k,ee;return F.current===((k=D.current)==null?void 0:k.side)&&Fb(L,(ee=D.current)==null?void 0:ee.area)},[]);return g.jsx(wb,{scope:n,searchRef:R,onItemEnter:y.useCallback(L=>{U(L)&&L.preventDefault()},[U]),onItemLeave:y.useCallback(L=>{var M;U(L)||((M=P.current)==null||M.focus(),T(null))},[U]),onTriggerLeave:y.useCallback(L=>{U(L)&&L.preventDefault()},[U]),pointerGraceTimerRef:I,onPointerGraceIntentChange:y.useCallback(L=>{D.current=L},[]),children:g.jsx(q,{...G,children:g.jsx(sr,{asChild:!0,trapped:o,onMountAutoFocus:$(s,L=>{var M;L.preventDefault(),(M=P.current)==null||M.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:g.jsx(xn,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:f,onInteractOutside:d,onDismiss:h,children:g.jsx($h,{asChild:!0,...w,dir:x.dir,orientation:"vertical",loop:r,currentTabStopId:S,onCurrentTabStopIdChange:T,onEntryFocus:$(l,L=>{x.isUsingKeyboardRef.current||L.preventDefault()}),preventScrollOnEntryFocus:!0,children:g.jsx(vi,{role:"menu","aria-orientation":"vertical","data-state":fp(v.open),"data-radix-menu-content":"",dir:x.dir,...b,...p,ref:A,style:{outline:"none",...p.style},onKeyDown:$(p.onKeyDown,L=>{const k=L.target.closest("[data-radix-menu-content]")===L.currentTarget,ee=L.ctrlKey||L.altKey||L.metaKey,ne=L.key.length===1;k&&(L.key==="Tab"&&L.preventDefault(),!ee&&ne&&H(L.key));const X=P.current;if(L.target!==X||!db.includes(L.key))return;L.preventDefault();const te=E().filter(V=>!V.disabled).map(V=>V.ref.current);Gh.includes(L.key)&&te.reverse(),Nb(te)}),onBlur:$(e.onBlur,L=>{L.currentTarget.contains(L.target)||(window.clearTimeout(O.current),R.current="")}),onPointerMove:$(e.onPointerMove,Zn(L=>{const M=L.target,k=B.current!==L.clientX;if(L.currentTarget.contains(M)&&k){const ee=L.clientX>B.current?"right":"left";F.current=ee,B.current=L.clientX}}))})})})})})})});Yh.displayName=He;var _b="MenuGroup",Ua=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(z.div,{role:"group",...r,ref:t})});Ua.displayName=_b;var Rb="MenuLabel",Xh=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(z.div,{...r,ref:t})});Xh.displayName=Rb;var Go="MenuItem",xl="menu.itemSelect",wi=y.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=y.useRef(null),c=mr(Go,e.__scopeMenu),u=Ba(Go,e.__scopeMenu),l=re(t,s),i=y.useRef(!1),a=()=>{const f=s.current;if(!n&&f){const d=new CustomEvent(xl,{bubbles:!0,cancelable:!0});f.addEventListener(xl,h=>r==null?void 0:r(h),{once:!0}),dd(f,d),d.defaultPrevented?i.current=!1:c.onClose()}};return g.jsx(Zh,{...o,ref:l,disabled:n,onClick:$(e.onClick,a),onPointerDown:f=>{var d;(d=e.onPointerDown)==null||d.call(e,f),i.current=!0},onPointerUp:$(e.onPointerUp,f=>{var d;i.current||(d=f.currentTarget)==null||d.click()}),onKeyDown:$(e.onKeyDown,f=>{const d=u.searchRef.current!=="";n||d&&f.key===" "||Ds.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});wi.displayName=Go;var Zh=y.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,c=Ba(Go,n),u=zh(n),l=y.useRef(null),i=re(t,l),[a,f]=y.useState(!1),[d,h]=y.useState("");return y.useEffect(()=>{const m=l.current;m&&h((m.textContent??"").trim())},[s.children]),g.jsx(Xn.ItemSlot,{scope:n,disabled:r,textValue:o??d,children:g.jsx(Uh,{asChild:!0,...u,focusable:!r,children:g.jsx(z.div,{role:"menuitem","data-highlighted":a?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:i,onPointerMove:$(e.onPointerMove,Zn(m=>{r?c.onItemLeave(m):(c.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:$(e.onPointerLeave,Zn(m=>c.onItemLeave(m))),onFocus:$(e.onFocus,()=>f(!0)),onBlur:$(e.onBlur,()=>f(!1))})})})}),Tb="MenuCheckboxItem",Qh=y.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return g.jsx(rp,{scope:e.__scopeMenu,checked:n,children:g.jsx(wi,{role:"menuitemcheckbox","aria-checked":Ho(n)?"mixed":n,...o,ref:t,"data-state":Ha(n),onSelect:$(o.onSelect,()=>r==null?void 0:r(Ho(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Qh.displayName=Tb;var Jh="MenuRadioGroup",[Pb,Ab]=qt(Jh,{value:void 0,onValueChange:()=>{}}),ep=y.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=Ze(r);return g.jsx(Pb,{scope:e.__scopeMenu,value:n,onValueChange:s,children:g.jsx(Ua,{...o,ref:t})})});ep.displayName=Jh;var tp="MenuRadioItem",np=y.forwardRef((e,t)=>{const{value:n,...r}=e,o=Ab(tp,e.__scopeMenu),s=n===o.value;return g.jsx(rp,{scope:e.__scopeMenu,checked:s,children:g.jsx(wi,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":Ha(s),onSelect:$(r.onSelect,()=>{var c;return(c=o.onValueChange)==null?void 0:c.call(o,n)},{checkForDefaultPrevented:!1})})})});np.displayName=tp;var Ga="MenuItemIndicator",[rp,Ob]=qt(Ga,{checked:!1}),op=y.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=Ob(Ga,n);return g.jsx(je,{present:r||Ho(s.checked)||s.checked===!0,children:g.jsx(z.span,{...o,ref:t,"data-state":Ha(s.checked)})})});op.displayName=Ga;var Mb="MenuSeparator",ip=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(z.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});ip.displayName=Mb;var Ib="MenuArrow",sp=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=bi(n);return g.jsx(yi,{...o,...r,ref:t})});sp.displayName=Ib;var Db="MenuSub",[LI,ap]=qt(Db),$n="MenuSubTrigger",cp=y.forwardRef((e,t)=>{const n=Kt($n,e.__scopeMenu),r=mr($n,e.__scopeMenu),o=ap($n,e.__scopeMenu),s=Ba($n,e.__scopeMenu),c=y.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:l}=s,i={__scopeMenu:e.__scopeMenu},a=y.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return y.useEffect(()=>a,[a]),y.useEffect(()=>{const f=u.current;return()=>{window.clearTimeout(f),l(null)}},[u,l]),g.jsx(Fa,{asChild:!0,...i,children:g.jsx(Zh,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":fp(n.open),...e,ref:ri(t,o.onTriggerChange),onClick:f=>{var d;(d=e.onClick)==null||d.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:$(e.onPointerMove,Zn(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!c.current&&(s.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{n.onOpenChange(!0),a()},100))})),onPointerLeave:$(e.onPointerLeave,Zn(f=>{var h,m;a();const d=(h=n.content)==null?void 0:h.getBoundingClientRect();if(d){const p=(m=n.content)==null?void 0:m.dataset.side,v=p==="right",x=v?-5:5,b=d[v?"left":"right"],w=d[v?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+x,y:f.clientY},{x:b,y:d.top},{x:w,y:d.top},{x:w,y:d.bottom},{x:b,y:d.bottom}],side:p}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:$(e.onKeyDown,f=>{var h;const d=s.searchRef.current!=="";e.disabled||d&&f.key===" "||hb[r.dir].includes(f.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),f.preventDefault())})})})});cp.displayName=$n;var lp="MenuSubContent",up=y.forwardRef((e,t)=>{const n=qh(He,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Kt(He,e.__scopeMenu),c=mr(He,e.__scopeMenu),u=ap(lp,e.__scopeMenu),l=y.useRef(null),i=re(t,l);return g.jsx(Xn.Provider,{scope:e.__scopeMenu,children:g.jsx(je,{present:r||s.open,children:g.jsx(Xn.Slot,{scope:e.__scopeMenu,children:g.jsx($a,{id:u.contentId,"aria-labelledby":u.triggerId,...o,ref:i,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:a=>{var f;c.isUsingKeyboardRef.current&&((f=l.current)==null||f.focus()),a.preventDefault()},onCloseAutoFocus:a=>a.preventDefault(),onFocusOutside:$(e.onFocusOutside,a=>{a.target!==u.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:$(e.onEscapeKeyDown,a=>{c.onClose(),a.preventDefault()}),onKeyDown:$(e.onKeyDown,a=>{var h;const f=a.currentTarget.contains(a.target),d=pb[c.dir].includes(a.key);f&&d&&(s.onOpenChange(!1),(h=u.trigger)==null||h.focus(),a.preventDefault())})})})})})});up.displayName=lp;function fp(e){return e?"open":"closed"}function Ho(e){return e==="indeterminate"}function Ha(e){return Ho(e)?"indeterminate":e?"checked":"unchecked"}function Nb(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function jb(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function kb(e,t,n){const o=t.length>1&&Array.from(t).every(i=>i===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let c=jb(e,Math.max(s,0));o.length===1&&(c=c.filter(i=>i!==n));const l=c.find(i=>i.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Lb(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,c=t.length-1;s<t.length;c=s++){const u=t[s],l=t[c],i=u.x,a=u.y,f=l.x,d=l.y;a>r!=d>r&&n<(f-i)*(r-a)/(d-a)+i&&(o=!o)}return o}function Fb(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Lb(n,t)}function Zn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Vb=Wh,Bb=Fa,$b=Kh,Ub=Yh,Gb=Ua,Hb=Xh,zb=wi,Wb=Qh,qb=ep,Kb=np,Yb=op,Xb=ip,Zb=sp,Qb=cp,Jb=up,Ei="DropdownMenu",[ew]=Ce(Ei,[Hh]),De=Hh(),[tw,dp]=ew(Ei),hp=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:c,modal:u=!0}=e,l=De(t),i=y.useRef(null),[a,f]=Ne({prop:o,defaultProp:s??!1,onChange:c,caller:Ei});return g.jsx(tw,{scope:t,triggerId:Pe(),triggerRef:i,contentId:Pe(),open:a,onOpenChange:f,onOpenToggle:y.useCallback(()=>f(d=>!d),[f]),modal:u,children:g.jsx(Vb,{...l,open:a,onOpenChange:f,dir:r,modal:u,children:n})})};hp.displayName=Ei;var pp="DropdownMenuTrigger",mp=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=dp(pp,n),c=De(n);return g.jsx(Bb,{asChild:!0,...c,children:g.jsx(z.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:ri(t,s.triggerRef),onPointerDown:$(e.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(s.onOpenToggle(),s.open||u.preventDefault())}),onKeyDown:$(e.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&s.onOpenToggle(),u.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});mp.displayName=pp;var nw="DropdownMenuPortal",gp=e=>{const{__scopeDropdownMenu:t,...n}=e,r=De(t);return g.jsx($b,{...r,...n})};gp.displayName=nw;var vp="DropdownMenuContent",yp=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=dp(vp,n),s=De(n),c=y.useRef(!1);return g.jsx(Ub,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:$(e.onCloseAutoFocus,u=>{var l;c.current||(l=o.triggerRef.current)==null||l.focus(),c.current=!1,u.preventDefault()}),onInteractOutside:$(e.onInteractOutside,u=>{const l=u.detail.originalEvent,i=l.button===0&&l.ctrlKey===!0,a=l.button===2||i;(!o.modal||a)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});yp.displayName=vp;var rw="DropdownMenuGroup",ow=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(Gb,{...o,...r,ref:t})});ow.displayName=rw;var iw="DropdownMenuLabel",xp=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(Hb,{...o,...r,ref:t})});xp.displayName=iw;var sw="DropdownMenuItem",bp=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(zb,{...o,...r,ref:t})});bp.displayName=sw;var aw="DropdownMenuCheckboxItem",cw=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(Wb,{...o,...r,ref:t})});cw.displayName=aw;var lw="DropdownMenuRadioGroup",uw=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(qb,{...o,...r,ref:t})});uw.displayName=lw;var fw="DropdownMenuRadioItem",dw=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(Kb,{...o,...r,ref:t})});dw.displayName=fw;var hw="DropdownMenuItemIndicator",pw=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(Yb,{...o,...r,ref:t})});pw.displayName=hw;var mw="DropdownMenuSeparator",wp=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(Xb,{...o,...r,ref:t})});wp.displayName=mw;var gw="DropdownMenuArrow",vw=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(Zb,{...o,...r,ref:t})});vw.displayName=gw;var yw="DropdownMenuSubTrigger",xw=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(Qb,{...o,...r,ref:t})});xw.displayName=yw;var bw="DropdownMenuSubContent",ww=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(Jb,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});ww.displayName=bw;var Ew=hp,Sw=mp,Cw=gp,_w=yp,Rw=xp,Tw=bp,Pw=wp,Aw="Label",Ep=y.forwardRef((e,t)=>g.jsx(z.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Ep.displayName=Aw;var[za]=Ce("Form"),Wa="Form",[Ow,gr]=za(Wa),[Mw,Sp]=za(Wa),Cp=y.forwardRef((e,t)=>{const{__scopeForm:n,onClearServerErrors:r=()=>{},...o}=e,s=y.useRef(null),c=re(t,s),[u,l]=y.useState({}),i=y.useCallback(R=>u[R],[u]),a=y.useCallback((R,I)=>l(D=>({...D,[R]:{...D[R]??{},...I}})),[]),f=y.useCallback(R=>{l(I=>({...I,[R]:void 0})),b(I=>({...I,[R]:{}}))},[]),[d,h]=y.useState({}),m=y.useCallback(R=>d[R]??[],[d]),p=y.useCallback((R,I)=>{h(D=>({...D,[R]:[...D[R]??[],I]}))},[]),v=y.useCallback((R,I)=>{h(D=>({...D,[R]:(D[R]??[]).filter(F=>F.id!==I)}))},[]),[x,b]=y.useState({}),w=y.useCallback(R=>x[R]??{},[x]),E=y.useCallback((R,I)=>{b(D=>({...D,[R]:{...D[R]??{},...I}}))},[]),[S,T]=y.useState({}),P=y.useCallback((R,I)=>{T(D=>{const F=new Set(D[R]).add(I);return{...D,[R]:F}})},[]),A=y.useCallback((R,I)=>{T(D=>{const F=new Set(D[R]);return F.delete(I),{...D,[R]:F}})},[]),O=y.useCallback(R=>Array.from(S[R]??[]).join(" ")||void 0,[S]);return g.jsx(Ow,{scope:n,getFieldValidity:i,onFieldValidityChange:a,getFieldCustomMatcherEntries:m,onFieldCustomMatcherEntryAdd:p,onFieldCustomMatcherEntryRemove:v,getFieldCustomErrors:w,onFieldCustomErrorsChange:E,onFieldValiditionClear:f,children:g.jsx(Mw,{scope:n,onFieldMessageIdAdd:P,onFieldMessageIdRemove:A,getFieldDescription:O,children:g.jsx(z.form,{...o,ref:c,onInvalid:$(e.onInvalid,R=>{const I=Ap(R.currentTarget);I===R.target&&I.focus(),R.preventDefault()}),onSubmit:$(e.onSubmit,r,{checkForDefaultPrevented:!1}),onReset:$(e.onReset,r)})})})});Cp.displayName=Wa;var qa="FormField",[Iw,Ka]=za(qa),_p=y.forwardRef((e,t)=>{const{__scopeForm:n,name:r,serverInvalid:o=!1,...s}=e,u=gr(qa,n).getFieldValidity(r),l=Pe();return g.jsx(Iw,{scope:n,id:l,name:r,serverInvalid:o,children:g.jsx(z.div,{"data-valid":Xa(u,o),"data-invalid":Za(u,o),...s,ref:t})})});_p.displayName=qa;var Ns="FormLabel",Rp=y.forwardRef((e,t)=>{const{__scopeForm:n,...r}=e,o=gr(Ns,n),s=Ka(Ns,n),c=r.htmlFor||s.id,u=o.getFieldValidity(s.name);return g.jsx(Ep,{"data-valid":Xa(u,s.serverInvalid),"data-invalid":Za(u,s.serverInvalid),...r,ref:t,htmlFor:c})});Rp.displayName=Ns;var Io="FormControl",Tp=y.forwardRef((e,t)=>{const{__scopeForm:n,...r}=e,o=gr(Io,n),s=Ka(Io,n),c=Sp(Io,n),u=y.useRef(null),l=re(t,u),i=r.name||s.name,a=r.id||s.id,f=o.getFieldCustomMatcherEntries(i),{onFieldValidityChange:d,onFieldCustomErrorsChange:h,onFieldValiditionClear:m}=o,p=y.useCallback(async b=>{if(Op(b.validity)){const D=Qi(b.validity);d(i,D);return}const w=b.form?new FormData(b.form):new FormData,E=[b.value,w],S=[],T=[];f.forEach(D=>{$w(D,E)?T.push(D):Uw(D)&&S.push(D)});const P=S.map(({id:D,match:F})=>[D,F(...E)]),A=Object.fromEntries(P),O=Object.values(A).some(Boolean),R=O;b.setCustomValidity(R?Qn:"");const I=Qi(b.validity);if(d(i,I),h(i,A),!O&&T.length>0){const D=T.map(({id:U,match:L})=>L(...E).then(M=>[U,M])),F=await Promise.all(D),B=Object.fromEntries(F),G=Object.values(B).some(Boolean);b.setCustomValidity(G?Qn:"");const H=Qi(b.validity);d(i,H),h(i,B)}},[f,i,h,d]);y.useEffect(()=>{const b=u.current;if(b){const w=()=>p(b);return b.addEventListener("change",w),()=>b.removeEventListener("change",w)}},[p]);const v=y.useCallback(()=>{const b=u.current;b&&(b.setCustomValidity(""),m(i))},[i,m]);y.useEffect(()=>{var w;const b=(w=u.current)==null?void 0:w.form;if(b)return b.addEventListener("reset",v),()=>b.removeEventListener("reset",v)},[v]),y.useEffect(()=>{const b=u.current,w=b==null?void 0:b.closest("form");if(w&&s.serverInvalid){const E=Ap(w);E===b&&E.focus()}},[s.serverInvalid]);const x=o.getFieldValidity(i);return g.jsx(z.input,{"data-valid":Xa(x,s.serverInvalid),"data-invalid":Za(x,s.serverInvalid),"aria-invalid":s.serverInvalid?!0:void 0,"aria-describedby":c.getFieldDescription(i),title:"",...r,ref:l,id:a,name:i,onInvalid:$(e.onInvalid,b=>{const w=b.currentTarget;p(w)}),onChange:$(e.onChange,b=>{v()})})});Tp.displayName=Io;var Qn="This value is not valid",Dw={badInput:Qn,patternMismatch:"This value does not match the required pattern",rangeOverflow:"This value is too large",rangeUnderflow:"This value is too small",stepMismatch:"This value does not match the required step",tooLong:"This value is too long",tooShort:"This value is too short",typeMismatch:"This value does not match the required type",valid:void 0,valueMissing:"This value is missing"},vr="FormMessage",Pp=y.forwardRef((e,t)=>{const{match:n,name:r,...o}=e,s=Ka(vr,e.__scopeForm),c=r??s.name;return n===void 0?g.jsx(Ya,{...o,ref:t,name:c,children:e.children||Qn}):typeof n=="function"?g.jsx(jw,{match:n,...o,ref:t,name:c}):g.jsx(Nw,{match:n,...o,ref:t,name:c})});Pp.displayName=vr;var Nw=y.forwardRef((e,t)=>{const{match:n,forceMatch:r=!1,name:o,children:s,...c}=e,l=gr(vr,c.__scopeForm).getFieldValidity(o);return r||(l==null?void 0:l[n])?g.jsx(Ya,{ref:t,...c,name:o,children:s??Dw[n]}):null}),jw=y.forwardRef((e,t)=>{const{match:n,forceMatch:r=!1,name:o,id:s,children:c,...u}=e,l=gr(vr,u.__scopeForm),i=y.useRef(null),a=re(t,i),f=Pe(),d=s??f,h=y.useMemo(()=>({id:d,match:n}),[d,n]),{onFieldCustomMatcherEntryAdd:m,onFieldCustomMatcherEntryRemove:p}=l;y.useEffect(()=>(m(o,h),()=>p(o,h.id)),[h,o,m,p]);const v=l.getFieldValidity(o),b=l.getFieldCustomErrors(o)[d];return r||v&&!Op(v)&&b?g.jsx(Ya,{id:d,ref:a,...u,name:o,children:c??Qn}):null}),Ya=y.forwardRef((e,t)=>{const{__scopeForm:n,id:r,name:o,...s}=e,c=Sp(vr,n),u=Pe(),l=r??u,{onFieldMessageIdAdd:i,onFieldMessageIdRemove:a}=c;return y.useEffect(()=>(i(o,l),()=>a(o,l)),[o,l,i,a]),g.jsx(z.span,{id:l,...s,ref:t})}),kw="FormSubmit",Lw=y.forwardRef((e,t)=>{const{__scopeForm:n,...r}=e;return g.jsx(z.button,{type:"submit",...r,ref:t})});Lw.displayName=kw;function Qi(e){const t={};for(const n in e)t[n]=e[n];return t}function Fw(e){return e instanceof HTMLElement}function Vw(e){return"validity"in e}function Bw(e){return Vw(e)&&(e.validity.valid===!1||e.getAttribute("aria-invalid")==="true")}function Ap(e){const t=e.elements,[n]=Array.from(t).filter(Fw).filter(Bw);return n}function $w(e,t){return e.match.constructor.name==="AsyncFunction"||Gw(e.match,t)}function Uw(e){return e.match.constructor.name==="Function"}function Gw(e,t){return e(...t)instanceof Promise}function Op(e){let t=!1;for(const n in e){const r=n;if(r!=="valid"&&r!=="customError"&&e[r]){t=!0;break}}return t}function Xa(e,t){if((e==null?void 0:e.valid)===!0&&!t)return!0}function Za(e,t){if((e==null?void 0:e.valid)===!1||t)return!0}var Hw=Cp,zw=_p,Ww=Rp,qw=Tp,Kw=Pp;function zo(e,[t,n]){return Math.min(n,Math.max(t,e))}var Si="Popover",[Mp]=Ce(Si,[Pt]),yr=Pt(),[Yw,Yt]=Mp(Si),Ip=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:c=!1}=e,u=yr(t),l=y.useRef(null),[i,a]=y.useState(!1),[f,d]=Ne({prop:r,defaultProp:o??!1,onChange:s,caller:Si});return g.jsx(gi,{...u,children:g.jsx(Yw,{scope:t,contentId:Pe(),triggerRef:l,open:f,onOpenChange:d,onOpenToggle:y.useCallback(()=>d(h=>!h),[d]),hasCustomAnchor:i,onCustomAnchorAdd:y.useCallback(()=>a(!0),[]),onCustomAnchorRemove:y.useCallback(()=>a(!1),[]),modal:c,children:n})})};Ip.displayName=Si;var Dp="PopoverAnchor",Xw=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Yt(Dp,n),s=yr(n),{onCustomAnchorAdd:c,onCustomAnchorRemove:u}=o;return y.useEffect(()=>(c(),()=>u()),[c,u]),g.jsx(dr,{...s,...r,ref:t})});Xw.displayName=Dp;var Np="PopoverTrigger",Zw=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Yt(Np,n),s=yr(n),c=re(t,o.triggerRef),u=g.jsx(z.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Lp(o.open),...r,ref:c,onClick:$(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?u:g.jsx(dr,{asChild:!0,...s,children:u})});Zw.displayName=Np;var Qw="PopoverPortal",[FI,Jw]=Mp(Qw,{forceMount:void 0}),pn="PopoverContent",eE=y.forwardRef((e,t)=>{const n=Jw(pn,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=Yt(pn,e.__scopePopover);return g.jsx(je,{present:r||s.open,children:s.modal?g.jsx(nE,{...o,ref:t}):g.jsx(rE,{...o,ref:t})})});eE.displayName=pn;var tE=St("PopoverContent.RemoveScroll"),nE=y.forwardRef((e,t)=>{const n=Yt(pn,e.__scopePopover),r=y.useRef(null),o=re(t,r),s=y.useRef(!1);return y.useEffect(()=>{const c=r.current;if(c)return li(c)},[]),g.jsx(cr,{as:tE,allowPinchZoom:!0,children:g.jsx(jp,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:$(e.onCloseAutoFocus,c=>{var u;c.preventDefault(),s.current||(u=n.triggerRef.current)==null||u.focus()}),onPointerDownOutside:$(e.onPointerDownOutside,c=>{const u=c.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0,i=u.button===2||l;s.current=i},{checkForDefaultPrevented:!1}),onFocusOutside:$(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),rE=y.forwardRef((e,t)=>{const n=Yt(pn,e.__scopePopover),r=y.useRef(!1),o=y.useRef(!1);return g.jsx(jp,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var c,u;(c=e.onCloseAutoFocus)==null||c.call(e,s),s.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var l,i;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=s.target;((i=n.triggerRef.current)==null?void 0:i.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),jp=y.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:l,onFocusOutside:i,onInteractOutside:a,...f}=e,d=Yt(pn,n),h=yr(n);return ai(),g.jsx(sr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:g.jsx(xn,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:a,onEscapeKeyDown:u,onPointerDownOutside:l,onFocusOutside:i,onDismiss:()=>d.onOpenChange(!1),children:g.jsx(vi,{"data-state":Lp(d.open),role:"dialog",id:d.contentId,...h,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),kp="PopoverClose",oE=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Yt(kp,n);return g.jsx(z.button,{type:"button",...r,ref:t,onClick:$(e.onClick,()=>o.onOpenChange(!1))})});oE.displayName=kp;var iE="PopoverArrow",sE=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=yr(n);return g.jsx(yi,{...o,...r,ref:t})});sE.displayName=iE;function Lp(e){return e?"open":"closed"}var aE=Ip,Qa="Progress",Ja=100,[cE]=Ce(Qa),[lE,uE]=cE(Qa),Fp=y.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:s=fE,...c}=e;(o||o===0)&&!bl(o)&&console.error(dE(`${o}`,"Progress"));const u=bl(o)?o:Ja;r!==null&&!wl(r,u)&&console.error(hE(`${r}`,"Progress"));const l=wl(r,u)?r:null,i=Wo(l)?s(l,u):void 0;return g.jsx(lE,{scope:n,value:l,max:u,children:g.jsx(z.div,{"aria-valuemax":u,"aria-valuemin":0,"aria-valuenow":Wo(l)?l:void 0,"aria-valuetext":i,role:"progressbar","data-state":$p(l,u),"data-value":l??void 0,"data-max":u,...c,ref:t})})});Fp.displayName=Qa;var Vp="ProgressIndicator",Bp=y.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=uE(Vp,n);return g.jsx(z.div,{"data-state":$p(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});Bp.displayName=Vp;function fE(e,t){return`${Math.round(e/t*100)}%`}function $p(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Wo(e){return typeof e=="number"}function bl(e){return Wo(e)&&!isNaN(e)&&e>0}function wl(e,t){return Wo(e)&&!isNaN(e)&&e<=t&&e>=0}function dE(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Ja}\`.`}function hE(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
91
+ */var ul;function Dx(){return ul||(ul=1,process.env.NODE_ENV!=="production"&&(function(){function e(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}function t(h,m){a||o.startTransition===void 0||(a=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var p=m();if(!f){var v=m();i(p,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}v=c({inst:{value:p,getSnapshot:m}});var x=v[0].inst,b=v[1];return l(function(){x.value=p,x.getSnapshot=m,n(x)&&b({inst:x})},[h,p,m]),u(function(){return n(x)&&b({inst:x}),h(function(){n(x)&&b({inst:x})})},[h]),s(p),p}function n(h){var m=h.getSnapshot;h=h.value;try{var p=m();return!i(h,p)}catch{return!0}}function r(h,m){return m()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=_,i=typeof Object.is=="function"?Object.is:e,c=o.useState,u=o.useEffect,l=o.useLayoutEffect,s=o.useDebugValue,a=!1,f=!1,d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Xi.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:d,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Xi}var fl;function kx(){return fl||(fl=1,process.env.NODE_ENV==="production"?Fr.exports=jx():Fr.exports=Dx()),Fr.exports}var Lx=kx();function Fx(){return Lx.useSyncExternalStore(Vx,()=>!0,()=>!1)}function Vx(){return()=>{}}var Aa="Avatar",[Bx]=Ee(Aa),[$x,ch]=Bx(Aa),lh=y.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,i]=y.useState("idle");return g.jsx($x,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:i,children:g.jsx(z.span,{...r,ref:t})})});lh.displayName=Aa;var uh="AvatarImage",fh=y.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...i}=e,c=ch(uh,n),u=Ux(r,i),l=Ze(s=>{o(s),c.onImageLoadingStatusChange(s)});return we(()=>{u!=="idle"&&l(u)},[u,l]),u==="loaded"?g.jsx(z.img,{...i,ref:t,src:r}):null});fh.displayName=uh;var dh="AvatarFallback",hh=y.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,i=ch(dh,n),[c,u]=y.useState(r===void 0);return y.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>u(!0),r);return()=>window.clearTimeout(l)}},[r]),c&&i.imageLoadingStatus!=="loaded"?g.jsx(z.span,{...o,ref:t}):null});hh.displayName=dh;function dl(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Ux(e,{referrerPolicy:t,crossOrigin:n}){const r=Fx(),o=y.useRef(null),i=r?(o.current||(o.current=new window.Image),o.current):null,[c,u]=y.useState(()=>dl(i,e));return we(()=>{u(dl(i,e))},[i,e]),we(()=>{const l=f=>()=>{u(f)};if(!i)return;const s=l("loaded"),a=l("error");return i.addEventListener("load",s),i.addEventListener("error",a),t&&(i.referrerPolicy=t),typeof n=="string"&&(i.crossOrigin=n),()=>{i.removeEventListener("load",s),i.removeEventListener("error",a)}},[i,n,t]),c}var Gx=lh,Hx=fh,zx=hh;function fr(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function dr(e){const[t,n]=y.useState(void 0);return we(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let c,u;if("borderBoxSize"in i){const l=i.borderBoxSize,s=Array.isArray(l)?l[0]:l;c=s.inlineSize,u=s.blockSize}else c=e.offsetWidth,u=e.offsetHeight;n({width:c,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var hi="Checkbox",[Wx]=Ee(hi),[qx,Oa]=Wx(hi);function Kx(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:i,form:c,name:u,onCheckedChange:l,required:s,value:a="on",internal_do_not_use_render:f}=e,[d,h]=Ne({prop:n,defaultProp:o??!1,onChange:l,caller:hi}),[m,p]=y.useState(null),[v,x]=y.useState(null),b=y.useRef(!1),w=m?!!c||!!m.closest("form"):!0,S={checked:d,disabled:i,setChecked:h,control:m,setControl:p,name:u,form:c,value:a,hasConsumerStoppedPropagationRef:b,required:s,defaultChecked:Et(o)?!1:o,isFormControl:w,bubbleInput:v,setBubbleInput:x};return g.jsx(qx,{scope:t,...S,children:Xx(f)?f(S):r})}var ph="CheckboxTrigger",mh=y.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:i,value:c,disabled:u,checked:l,required:s,setControl:a,setChecked:f,hasConsumerStoppedPropagationRef:d,isFormControl:h,bubbleInput:m}=Oa(ph,e),p=re(o,a),v=y.useRef(l);return y.useEffect(()=>{const x=i==null?void 0:i.form;if(x){const b=()=>f(v.current);return x.addEventListener("reset",b),()=>x.removeEventListener("reset",b)}},[i,f]),g.jsx(z.button,{type:"button",role:"checkbox","aria-checked":Et(l)?"mixed":l,"aria-required":s,"data-state":bh(l),"data-disabled":u?"":void 0,disabled:u,value:c,...r,ref:p,onKeyDown:B(t,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:B(n,x=>{f(b=>Et(b)?!0:!b),m&&h&&(d.current=x.isPropagationStopped(),d.current||x.stopPropagation())})})});mh.displayName=ph;var gh=y.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:c,disabled:u,value:l,onCheckedChange:s,form:a,...f}=e;return g.jsx(Kx,{__scopeCheckbox:n,checked:o,defaultChecked:i,disabled:u,required:c,onCheckedChange:s,name:r,form:a,value:l,internal_do_not_use_render:({isFormControl:d})=>g.jsxs(g.Fragment,{children:[g.jsx(mh,{...f,ref:t,__scopeCheckbox:n}),d&&g.jsx(xh,{__scopeCheckbox:n})]})})});gh.displayName=hi;var vh="CheckboxIndicator",Yx=y.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=Oa(vh,n);return g.jsx(je,{present:r||Et(i.checked)||i.checked===!0,children:g.jsx(z.span,{"data-state":bh(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Yx.displayName=vh;var yh="CheckboxBubbleInput",xh=y.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:i,defaultChecked:c,required:u,disabled:l,name:s,value:a,form:f,bubbleInput:d,setBubbleInput:h}=Oa(yh,e),m=re(n,h),p=fr(i),v=dr(r);y.useEffect(()=>{const b=d;if(!b)return;const w=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(w,"checked").set,A=!o.current;if(p!==i&&E){const R=new Event("click",{bubbles:A});b.indeterminate=Et(i),E.call(b,Et(i)?!1:i),b.dispatchEvent(R)}},[d,p,i,o]);const x=y.useRef(Et(i)?!1:i);return g.jsx(z.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??x.current,required:u,disabled:l,name:s,value:a,form:f,...t,tabIndex:-1,ref:m,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});xh.displayName=yh;function Xx(e){return typeof e=="function"}function Et(e){return e==="indeterminate"}function bh(e){return Et(e)?"indeterminate":e?"checked":"unchecked"}const Zx=["top","right","bottom","left"],Ct=Math.min,Fe=Math.max,$o=Math.round,Vr=Math.floor,ot=e=>({x:e,y:e}),Qx={left:"right",right:"left",bottom:"top",top:"bottom"},Jx={start:"end",end:"start"};function Ms(e,t,n){return Fe(e,Ct(t,n))}function ht(e,t){return typeof e=="function"?e(t):e}function pt(e){return e.split("-")[0]}function bn(e){return e.split("-")[1]}function Ma(e){return e==="x"?"y":"x"}function Ia(e){return e==="y"?"height":"width"}const e1=new Set(["top","bottom"]);function rt(e){return e1.has(pt(e))?"y":"x"}function Na(e){return Ma(rt(e))}function t1(e,t,n){n===void 0&&(n=!1);const r=bn(e),o=Na(e),i=Ia(o);let c=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(c=Uo(c)),[c,Uo(c)]}function n1(e){const t=Uo(e);return[Is(e),t,Is(t)]}function Is(e){return e.replace(/start|end/g,t=>Jx[t])}const hl=["left","right"],pl=["right","left"],r1=["top","bottom"],o1=["bottom","top"];function i1(e,t,n){switch(e){case"top":case"bottom":return n?t?pl:hl:t?hl:pl;case"left":case"right":return t?r1:o1;default:return[]}}function s1(e,t,n,r){const o=bn(e);let i=i1(pt(e),n==="start",r);return o&&(i=i.map(c=>c+"-"+o),t&&(i=i.concat(i.map(Is)))),i}function Uo(e){return e.replace(/left|right|bottom|top/g,t=>Qx[t])}function a1(e){return{top:0,right:0,bottom:0,left:0,...e}}function wh(e){return typeof e!="number"?a1(e):{top:e,right:e,bottom:e,left:e}}function Go(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function ml(e,t,n){let{reference:r,floating:o}=e;const i=rt(t),c=Na(t),u=Ia(c),l=pt(t),s=i==="y",a=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[u]/2-o[u]/2;let h;switch(l){case"top":h={x:a,y:r.y-o.height};break;case"bottom":h={x:a,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(bn(t)){case"start":h[c]-=d*(n&&s?-1:1);break;case"end":h[c]+=d*(n&&s?-1:1);break}return h}const c1=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:c}=n,u=i.filter(Boolean),l=await(c.isRTL==null?void 0:c.isRTL(t));let s=await c.getElementRects({reference:e,floating:t,strategy:o}),{x:a,y:f}=ml(s,r,l),d=r,h={},m=0;for(let p=0;p<u.length;p++){const{name:v,fn:x}=u[p],{x:b,y:w,data:S,reset:E}=await x({x:a,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:h,rects:s,platform:c,elements:{reference:e,floating:t}});a=b??a,f=w??f,h={...h,[v]:{...h[v],...S}},E&&m<=50&&(m++,typeof E=="object"&&(E.placement&&(d=E.placement),E.rects&&(s=E.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:a,y:f}=ml(s,d,l)),p=-1)}return{x:a,y:f,placement:d,strategy:o,middlewareData:h}};async function Xn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:c,elements:u,strategy:l}=e,{boundary:s="clippingAncestors",rootBoundary:a="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=ht(t,e),m=wh(h),v=u[d?f==="floating"?"reference":"floating":f],x=Go(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(u.floating)),boundary:s,rootBoundary:a,strategy:l})),b=f==="floating"?{x:r,y:o,width:c.floating.width,height:c.floating.height}:c.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u.floating)),S=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},E=Go(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:b,offsetParent:w,strategy:l}):b);return{top:(x.top-E.top+m.top)/S.y,bottom:(E.bottom-x.bottom+m.bottom)/S.y,left:(x.left-E.left+m.left)/S.x,right:(E.right-x.right+m.right)/S.x}}const l1=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:c,elements:u,middlewareData:l}=t,{element:s,padding:a=0}=ht(e,t)||{};if(s==null)return{};const f=wh(a),d={x:n,y:r},h=Na(o),m=Ia(h),p=await c.getDimensions(s),v=h==="y",x=v?"top":"left",b=v?"bottom":"right",w=v?"clientHeight":"clientWidth",S=i.reference[m]+i.reference[h]-d[h]-i.floating[m],E=d[h]-i.reference[h],A=await(c.getOffsetParent==null?void 0:c.getOffsetParent(s));let R=A?A[w]:0;(!R||!await(c.isElement==null?void 0:c.isElement(A)))&&(R=u.floating[w]||i.floating[m]);const T=S/2-E/2,I=R/2-p[m]/2-1,P=Ct(f[x],I),M=Ct(f[b],I),j=P,V=R-p[m]-M,$=R/2-p[m]/2+T,K=Ms(j,$,V),G=!l.arrow&&bn(o)!=null&&$!==K&&i.reference[m]/2-($<j?P:M)-p[m]/2<0,H=G?$<j?$-j:$-V:0;return{[h]:d[h]+H,data:{[h]:K,centerOffset:$-K-H,...G&&{alignmentOffset:H}},reset:G}}}),u1=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:c,initialPlacement:u,platform:l,elements:s}=t,{mainAxis:a=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...v}=ht(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const x=pt(o),b=rt(u),w=pt(u)===u,S=await(l.isRTL==null?void 0:l.isRTL(s.floating)),E=d||(w||!p?[Uo(u)]:n1(u)),A=m!=="none";!d&&A&&E.push(...s1(u,p,m,S));const R=[u,...E],T=await Xn(t,v),I=[];let P=((r=i.flip)==null?void 0:r.overflows)||[];if(a&&I.push(T[x]),f){const $=t1(o,c,S);I.push(T[$[0]],T[$[1]])}if(P=[...P,{placement:o,overflows:I}],!I.every($=>$<=0)){var M,j;const $=(((M=i.flip)==null?void 0:M.index)||0)+1,K=R[$];if(K&&(!(f==="alignment"?b!==rt(K):!1)||P.every(U=>rt(U.placement)===b?U.overflows[0]>0:!0)))return{data:{index:$,overflows:P},reset:{placement:K}};let G=(j=P.filter(H=>H.overflows[0]<=0).sort((H,U)=>H.overflows[1]-U.overflows[1])[0])==null?void 0:j.placement;if(!G)switch(h){case"bestFit":{var V;const H=(V=P.filter(U=>{if(A){const L=rt(U.placement);return L===b||L==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(L=>L>0).reduce((L,O)=>L+O,0)]).sort((U,L)=>U[1]-L[1])[0])==null?void 0:V[0];H&&(G=H);break}case"initialPlacement":G=u;break}if(o!==G)return{reset:{placement:G}}}return{}}}};function gl(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function vl(e){return Zx.some(t=>e[t]>=0)}const f1=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=ht(e,t);switch(r){case"referenceHidden":{const i=await Xn(t,{...o,elementContext:"reference"}),c=gl(i,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:vl(c)}}}case"escaped":{const i=await Xn(t,{...o,altBoundary:!0}),c=gl(i,n.floating);return{data:{escapedOffsets:c,escaped:vl(c)}}}default:return{}}}}},Eh=new Set(["left","top"]);async function d1(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),c=pt(n),u=bn(n),l=rt(n)==="y",s=Eh.has(c)?-1:1,a=i&&l?-1:1,f=ht(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return u&&typeof m=="number"&&(h=u==="end"?m*-1:m),l?{x:h*a,y:d*s}:{x:d*s,y:h*a}}const h1=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:c,middlewareData:u}=t,l=await d1(t,e);return c===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:c}}}}},p1=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:c=!1,limiter:u={fn:v=>{let{x,y:b}=v;return{x,y:b}}},...l}=ht(e,t),s={x:n,y:r},a=await Xn(t,l),f=rt(pt(o)),d=Ma(f);let h=s[d],m=s[f];if(i){const v=d==="y"?"top":"left",x=d==="y"?"bottom":"right",b=h+a[v],w=h-a[x];h=Ms(b,h,w)}if(c){const v=f==="y"?"top":"left",x=f==="y"?"bottom":"right",b=m+a[v],w=m-a[x];m=Ms(b,m,w)}const p=u.fn({...t,[d]:h,[f]:m});return{...p,data:{x:p.x-n,y:p.y-r,enabled:{[d]:i,[f]:c}}}}}},m1=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:c}=t,{offset:u=0,mainAxis:l=!0,crossAxis:s=!0}=ht(e,t),a={x:n,y:r},f=rt(o),d=Ma(f);let h=a[d],m=a[f];const p=ht(u,t),v=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const w=d==="y"?"height":"width",S=i.reference[d]-i.floating[w]+v.mainAxis,E=i.reference[d]+i.reference[w]-v.mainAxis;h<S?h=S:h>E&&(h=E)}if(s){var x,b;const w=d==="y"?"width":"height",S=Eh.has(pt(o)),E=i.reference[f]-i.floating[w]+(S&&((x=c.offset)==null?void 0:x[f])||0)+(S?0:v.crossAxis),A=i.reference[f]+i.reference[w]+(S?0:((b=c.offset)==null?void 0:b[f])||0)-(S?v.crossAxis:0);m<E?m=E:m>A&&(m=A)}return{[d]:h,[f]:m}}}},g1=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:c,elements:u}=t,{apply:l=()=>{},...s}=ht(e,t),a=await Xn(t,s),f=pt(o),d=bn(o),h=rt(o)==="y",{width:m,height:p}=i.floating;let v,x;f==="top"||f==="bottom"?(v=f,x=d===(await(c.isRTL==null?void 0:c.isRTL(u.floating))?"start":"end")?"left":"right"):(x=f,v=d==="end"?"top":"bottom");const b=p-a.top-a.bottom,w=m-a.left-a.right,S=Ct(p-a[v],b),E=Ct(m-a[x],w),A=!t.middlewareData.shift;let R=S,T=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=b),A&&!d){const P=Fe(a.left,0),M=Fe(a.right,0),j=Fe(a.top,0),V=Fe(a.bottom,0);h?T=m-2*(P!==0||M!==0?P+M:Fe(a.left,a.right)):R=p-2*(j!==0||V!==0?j+V:Fe(a.top,a.bottom))}await l({...t,availableWidth:T,availableHeight:R});const I=await c.getDimensions(u.floating);return m!==I.width||p!==I.height?{reset:{rects:!0}}:{}}}};function pi(){return typeof window<"u"}function wn(e){return Sh(e)?(e.nodeName||"").toLowerCase():"#document"}function Ve(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function lt(e){var t;return(t=(Sh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Sh(e){return pi()?e instanceof Node||e instanceof Ve(e).Node:!1}function Qe(e){return pi()?e instanceof Element||e instanceof Ve(e).Element:!1}function at(e){return pi()?e instanceof HTMLElement||e instanceof Ve(e).HTMLElement:!1}function yl(e){return!pi()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ve(e).ShadowRoot}const v1=new Set(["inline","contents"]);function hr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Je(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!v1.has(o)}const y1=new Set(["table","td","th"]);function x1(e){return y1.has(wn(e))}const b1=[":popover-open",":modal"];function mi(e){return b1.some(t=>{try{return e.matches(t)}catch{return!1}})}const w1=["transform","translate","scale","rotate","perspective"],E1=["transform","translate","scale","rotate","perspective","filter"],S1=["paint","layout","strict","content"];function ja(e){const t=Da(),n=Qe(e)?Je(e):e;return w1.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||E1.some(r=>(n.willChange||"").includes(r))||S1.some(r=>(n.contain||"").includes(r))}function C1(e){let t=_t(e);for(;at(t)&&!mn(t);){if(ja(t))return t;if(mi(t))return null;t=_t(t)}return null}function Da(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const _1=new Set(["html","body","#document"]);function mn(e){return _1.has(wn(e))}function Je(e){return Ve(e).getComputedStyle(e)}function gi(e){return Qe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _t(e){if(wn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||yl(e)&&e.host||lt(e);return yl(t)?t.host:t}function Ch(e){const t=_t(e);return mn(t)?e.ownerDocument?e.ownerDocument.body:e.body:at(t)&&hr(t)?t:Ch(t)}function Zn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ch(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),c=Ve(o);if(i){const u=Ns(c);return t.concat(c,c.visualViewport||[],hr(o)?o:[],u&&n?Zn(u):[])}return t.concat(o,Zn(o,[],n))}function Ns(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function _h(e){const t=Je(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=at(e),i=o?e.offsetWidth:n,c=o?e.offsetHeight:r,u=$o(n)!==i||$o(r)!==c;return u&&(n=i,r=c),{width:n,height:r,$:u}}function ka(e){return Qe(e)?e:e.contextElement}function hn(e){const t=ka(e);if(!at(t))return ot(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=_h(t);let c=(i?$o(n.width):n.width)/r,u=(i?$o(n.height):n.height)/o;return(!c||!Number.isFinite(c))&&(c=1),(!u||!Number.isFinite(u))&&(u=1),{x:c,y:u}}const R1=ot(0);function Rh(e){const t=Ve(e);return!Da()||!t.visualViewport?R1:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function T1(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ve(e)?!1:t}function Gt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=ka(e);let c=ot(1);t&&(r?Qe(r)&&(c=hn(r)):c=hn(e));const u=T1(i,n,r)?Rh(i):ot(0);let l=(o.left+u.x)/c.x,s=(o.top+u.y)/c.y,a=o.width/c.x,f=o.height/c.y;if(i){const d=Ve(i),h=r&&Qe(r)?Ve(r):r;let m=d,p=Ns(m);for(;p&&r&&h!==m;){const v=hn(p),x=p.getBoundingClientRect(),b=Je(p),w=x.left+(p.clientLeft+parseFloat(b.paddingLeft))*v.x,S=x.top+(p.clientTop+parseFloat(b.paddingTop))*v.y;l*=v.x,s*=v.y,a*=v.x,f*=v.y,l+=w,s+=S,m=Ve(p),p=Ns(m)}}return Go({width:a,height:f,x:l,y:s})}function vi(e,t){const n=gi(e).scrollLeft;return t?t.left+n:Gt(lt(e)).left+n}function Th(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-vi(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function P1(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",c=lt(r),u=t?mi(t.floating):!1;if(r===c||u&&i)return n;let l={scrollLeft:0,scrollTop:0},s=ot(1);const a=ot(0),f=at(r);if((f||!f&&!i)&&((wn(r)!=="body"||hr(c))&&(l=gi(r)),at(r))){const h=Gt(r);s=hn(r),a.x=h.x+r.clientLeft,a.y=h.y+r.clientTop}const d=c&&!f&&!i?Th(c,l):ot(0);return{width:n.width*s.x,height:n.height*s.y,x:n.x*s.x-l.scrollLeft*s.x+a.x+d.x,y:n.y*s.y-l.scrollTop*s.y+a.y+d.y}}function A1(e){return Array.from(e.getClientRects())}function O1(e){const t=lt(e),n=gi(e),r=e.ownerDocument.body,o=Fe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Fe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let c=-n.scrollLeft+vi(e);const u=-n.scrollTop;return Je(r).direction==="rtl"&&(c+=Fe(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:c,y:u}}const xl=25;function M1(e,t){const n=Ve(e),r=lt(e),o=n.visualViewport;let i=r.clientWidth,c=r.clientHeight,u=0,l=0;if(o){i=o.width,c=o.height;const a=Da();(!a||a&&t==="fixed")&&(u=o.offsetLeft,l=o.offsetTop)}const s=vi(r);if(s<=0){const a=r.ownerDocument,f=a.body,d=getComputedStyle(f),h=a.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,m=Math.abs(r.clientWidth-f.clientWidth-h);m<=xl&&(i-=m)}else s<=xl&&(i+=s);return{width:i,height:c,x:u,y:l}}const I1=new Set(["absolute","fixed"]);function N1(e,t){const n=Gt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=at(e)?hn(e):ot(1),c=e.clientWidth*i.x,u=e.clientHeight*i.y,l=o*i.x,s=r*i.y;return{width:c,height:u,x:l,y:s}}function bl(e,t,n){let r;if(t==="viewport")r=M1(e,n);else if(t==="document")r=O1(lt(e));else if(Qe(t))r=N1(t,n);else{const o=Rh(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Go(r)}function Ph(e,t){const n=_t(e);return n===t||!Qe(n)||mn(n)?!1:Je(n).position==="fixed"||Ph(n,t)}function j1(e,t){const n=t.get(e);if(n)return n;let r=Zn(e,[],!1).filter(u=>Qe(u)&&wn(u)!=="body"),o=null;const i=Je(e).position==="fixed";let c=i?_t(e):e;for(;Qe(c)&&!mn(c);){const u=Je(c),l=ja(c);!l&&u.position==="fixed"&&(o=null),(i?!l&&!o:!l&&u.position==="static"&&!!o&&I1.has(o.position)||hr(c)&&!l&&Ph(e,c))?r=r.filter(a=>a!==c):o=u,c=_t(c)}return t.set(e,r),r}function D1(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const c=[...n==="clippingAncestors"?mi(t)?[]:j1(t,this._c):[].concat(n),r],u=c[0],l=c.reduce((s,a)=>{const f=bl(t,a,o);return s.top=Fe(f.top,s.top),s.right=Ct(f.right,s.right),s.bottom=Ct(f.bottom,s.bottom),s.left=Fe(f.left,s.left),s},bl(t,u,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function k1(e){const{width:t,height:n}=_h(e);return{width:t,height:n}}function L1(e,t,n){const r=at(t),o=lt(t),i=n==="fixed",c=Gt(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const l=ot(0);function s(){l.x=vi(o)}if(r||!r&&!i)if((wn(t)!=="body"||hr(o))&&(u=gi(t)),r){const h=Gt(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&s();i&&!r&&o&&s();const a=o&&!r&&!i?Th(o,u):ot(0),f=c.left+u.scrollLeft-l.x-a.x,d=c.top+u.scrollTop-l.y-a.y;return{x:f,y:d,width:c.width,height:c.height}}function Zi(e){return Je(e).position==="static"}function wl(e,t){if(!at(e)||Je(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return lt(e)===n&&(n=n.ownerDocument.body),n}function Ah(e,t){const n=Ve(e);if(mi(e))return n;if(!at(e)){let o=_t(e);for(;o&&!mn(o);){if(Qe(o)&&!Zi(o))return o;o=_t(o)}return n}let r=wl(e,t);for(;r&&x1(r)&&Zi(r);)r=wl(r,t);return r&&mn(r)&&Zi(r)&&!ja(r)?n:r||C1(e)||n}const F1=async function(e){const t=this.getOffsetParent||Ah,n=this.getDimensions,r=await n(e.floating);return{reference:L1(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function V1(e){return Je(e).direction==="rtl"}const B1={convertOffsetParentRelativeRectToViewportRelativeRect:P1,getDocumentElement:lt,getClippingRect:D1,getOffsetParent:Ah,getElementRects:F1,getClientRects:A1,getDimensions:k1,getScale:hn,isElement:Qe,isRTL:V1};function Oh(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $1(e,t){let n=null,r;const o=lt(e);function i(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function c(u,l){u===void 0&&(u=!1),l===void 0&&(l=1),i();const s=e.getBoundingClientRect(),{left:a,top:f,width:d,height:h}=s;if(u||t(),!d||!h)return;const m=Vr(f),p=Vr(o.clientWidth-(a+d)),v=Vr(o.clientHeight-(f+h)),x=Vr(a),w={rootMargin:-m+"px "+-p+"px "+-v+"px "+-x+"px",threshold:Fe(0,Ct(1,l))||1};let S=!0;function E(A){const R=A[0].intersectionRatio;if(R!==l){if(!S)return c();R?c(!1,R):r=setTimeout(()=>{c(!1,1e-7)},1e3)}R===1&&!Oh(s,e.getBoundingClientRect())&&c(),S=!1}try{n=new IntersectionObserver(E,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,w)}n.observe(e)}return c(!0),i}function U1(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,s=ka(e),a=o||i?[...s?Zn(s):[],...Zn(t)]:[];a.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const f=s&&u?$1(s,n):null;let d=-1,h=null;c&&(h=new ResizeObserver(x=>{let[b]=x;b&&b.target===s&&h&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),s&&!l&&h.observe(s),h.observe(t));let m,p=l?Gt(e):null;l&&v();function v(){const x=Gt(e);p&&!Oh(p,x)&&n(),p=x,m=requestAnimationFrame(v)}return n(),()=>{var x;a.forEach(b=>{o&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),f==null||f(),(x=h)==null||x.disconnect(),h=null,l&&cancelAnimationFrame(m)}}const G1=h1,H1=p1,z1=u1,W1=g1,q1=f1,El=l1,K1=m1,Y1=(e,t,n)=>{const r=new Map,o={platform:B1,...n},i={...o.platform,_c:r};return c1(e,t,{...o,platform:i})};var X1=typeof document<"u",Z1=function(){},No=X1?_.useLayoutEffect:Z1;function Ho(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ho(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Ho(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Mh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Sl(e,t){const n=Mh(e);return Math.round(t*n)/n}function Qi(e){const t=y.useRef(e);return No(()=>{t.current=e}),t}function Q1(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:c}={},transform:u=!0,whileElementsMounted:l,open:s}=e,[a,f]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=y.useState(r);Ho(d,r)||h(r);const[m,p]=y.useState(null),[v,x]=y.useState(null),b=y.useCallback(U=>{U!==A.current&&(A.current=U,p(U))},[]),w=y.useCallback(U=>{U!==R.current&&(R.current=U,x(U))},[]),S=i||m,E=c||v,A=y.useRef(null),R=y.useRef(null),T=y.useRef(a),I=l!=null,P=Qi(l),M=Qi(o),j=Qi(s),V=y.useCallback(()=>{if(!A.current||!R.current)return;const U={placement:t,strategy:n,middleware:d};M.current&&(U.platform=M.current),Y1(A.current,R.current,U).then(L=>{const O={...L,isPositioned:j.current!==!1};$.current&&!Ho(T.current,O)&&(T.current=O,oi.flushSync(()=>{f(O)}))})},[d,t,n,M,j]);No(()=>{s===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(U=>({...U,isPositioned:!1})))},[s]);const $=y.useRef(!1);No(()=>($.current=!0,()=>{$.current=!1}),[]),No(()=>{if(S&&(A.current=S),E&&(R.current=E),S&&E){if(P.current)return P.current(S,E,V);V()}},[S,E,V,P,I]);const K=y.useMemo(()=>({reference:A,floating:R,setReference:b,setFloating:w}),[b,w]),G=y.useMemo(()=>({reference:S,floating:E}),[S,E]),H=y.useMemo(()=>{const U={position:n,left:0,top:0};if(!G.floating)return U;const L=Sl(G.floating,a.x),O=Sl(G.floating,a.y);return u?{...U,transform:"translate("+L+"px, "+O+"px)",...Mh(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:O}},[n,u,G.floating,a.x,a.y]);return y.useMemo(()=>({...a,update:V,refs:K,elements:G,floatingStyles:H}),[a,V,K,G,H])}const J1=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?El({element:r.current,padding:o}).fn(n):{}:r?El({element:r,padding:o}).fn(n):{}}}},eb=(e,t)=>({...G1(e),options:[e,t]}),tb=(e,t)=>({...H1(e),options:[e,t]}),nb=(e,t)=>({...K1(e),options:[e,t]}),rb=(e,t)=>({...z1(e),options:[e,t]}),ob=(e,t)=>({...W1(e),options:[e,t]}),ib=(e,t)=>({...q1(e),options:[e,t]}),sb=(e,t)=>({...J1(e),options:[e,t]});var ab="Arrow",Ih=y.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return g.jsx(z.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ih.displayName=ab;var cb=Ih,La="Popper",[Nh,Pt]=Ee(La),[lb,jh]=Nh(La),Dh=e=>{const{__scopePopper:t,children:n}=e,[r,o]=y.useState(null);return g.jsx(lb,{scope:t,anchor:r,onAnchorChange:o,children:n})};Dh.displayName=La;var kh="PopperAnchor",Lh=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=jh(kh,n),c=y.useRef(null),u=re(t,c),l=y.useRef(null);return y.useEffect(()=>{const s=l.current;l.current=(r==null?void 0:r.current)||c.current,s!==l.current&&i.onAnchorChange(l.current)}),r?null:g.jsx(z.div,{...o,ref:u})});Lh.displayName=kh;var Fa="PopperContent",[ub,fb]=Nh(Fa),Fh=y.forwardRef((e,t)=>{var F,Y,Z,q,oe,D;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:c=0,arrowPadding:u=0,avoidCollisions:l=!0,collisionBoundary:s=[],collisionPadding:a=0,sticky:f="partial",hideWhenDetached:d=!1,updatePositionStrategy:h="optimized",onPlaced:m,...p}=e,v=jh(Fa,n),[x,b]=y.useState(null),w=re(t,he=>b(he)),[S,E]=y.useState(null),A=dr(S),R=(A==null?void 0:A.width)??0,T=(A==null?void 0:A.height)??0,I=r+(i!=="center"?"-"+i:""),P=typeof a=="number"?a:{top:0,right:0,bottom:0,left:0,...a},M=Array.isArray(s)?s:[s],j=M.length>0,V={padding:P,boundary:M.filter(hb),altBoundary:j},{refs:$,floatingStyles:K,placement:G,isPositioned:H,middlewareData:U}=Q1({strategy:"fixed",placement:I,whileElementsMounted:(...he)=>U1(...he,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[eb({mainAxis:o+T,alignmentAxis:c}),l&&tb({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?nb():void 0,...V}),l&&rb({...V}),ob({...V,apply:({elements:he,rects:Se,availableWidth:$e,availableHeight:It})=>{const{width:vt,height:Or}=Se.reference,Nt=he.floating.style;Nt.setProperty("--radix-popper-available-width",`${$e}px`),Nt.setProperty("--radix-popper-available-height",`${It}px`),Nt.setProperty("--radix-popper-anchor-width",`${vt}px`),Nt.setProperty("--radix-popper-anchor-height",`${Or}px`)}}),S&&sb({element:S,padding:u}),pb({arrowWidth:R,arrowHeight:T}),d&&ib({strategy:"referenceHidden",...V})]}),[L,O]=$h(G),k=Ze(m);we(()=>{H&&(k==null||k())},[H,k]);const ee=(F=U.arrow)==null?void 0:F.x,ne=(Y=U.arrow)==null?void 0:Y.y,X=((Z=U.arrow)==null?void 0:Z.centerOffset)!==0,[ie,te]=y.useState();return we(()=>{x&&te(window.getComputedStyle(x).zIndex)},[x]),g.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:H?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ie,"--radix-popper-transform-origin":[(q=U.transformOrigin)==null?void 0:q.x,(oe=U.transformOrigin)==null?void 0:oe.y].join(" "),...((D=U.hide)==null?void 0:D.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(ub,{scope:n,placedSide:L,onArrowChange:E,arrowX:ee,arrowY:ne,shouldHideArrow:X,children:g.jsx(z.div,{"data-side":L,"data-align":O,...p,ref:w,style:{...p.style,animation:H?void 0:"none"}})})})});Fh.displayName=Fa;var Vh="PopperArrow",db={top:"bottom",right:"left",bottom:"top",left:"right"},Bh=y.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=fb(Vh,r),c=db[i.placedSide];return g.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:g.jsx(cb,{...o,ref:n,style:{...o.style,display:"block"}})})});Bh.displayName=Vh;function hb(e){return e!==null}var pb=e=>({name:"transformOrigin",options:e,fn(t){var v,x,b;const{placement:n,rects:r,middlewareData:o}=t,c=((v=o.arrow)==null?void 0:v.centerOffset)!==0,u=c?0:e.arrowWidth,l=c?0:e.arrowHeight,[s,a]=$h(n),f={start:"0%",center:"50%",end:"100%"}[a],d=(((x=o.arrow)==null?void 0:x.x)??0)+u/2,h=(((b=o.arrow)==null?void 0:b.y)??0)+l/2;let m="",p="";return s==="bottom"?(m=c?f:`${d}px`,p=`${-l}px`):s==="top"?(m=c?f:`${d}px`,p=`${r.floating.height+l}px`):s==="right"?(m=`${-l}px`,p=c?f:`${h}px`):s==="left"&&(m=`${r.floating.width+l}px`,p=c?f:`${h}px`),{data:{x:m,y:p}}}});function $h(e){const[t,n="center"]=e.split("-");return[t,n]}var yi=Dh,pr=Lh,xi=Fh,bi=Bh,Ji="rovingFocusGroup.onEntryFocus",mb={bubbles:!1,cancelable:!0},mr="RovingFocusGroup",[js,Uh,gb]=ar(mr),[vb,En]=Ee(mr,[gb]),[yb,xb]=vb(mr),Gh=y.forwardRef((e,t)=>g.jsx(js.Provider,{scope:e.__scopeRovingFocusGroup,children:g.jsx(js.Slot,{scope:e.__scopeRovingFocusGroup,children:g.jsx(bb,{...e,ref:t})})}));Gh.displayName=mr;var bb=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:c,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:l,onEntryFocus:s,preventScrollOnEntryFocus:a=!1,...f}=e,d=y.useRef(null),h=re(t,d),m=Kt(i),[p,v]=Ne({prop:c,defaultProp:u??null,onChange:l,caller:mr}),[x,b]=y.useState(!1),w=Ze(s),S=Uh(n),E=y.useRef(!1),[A,R]=y.useState(0);return y.useEffect(()=>{const T=d.current;if(T)return T.addEventListener(Ji,w),()=>T.removeEventListener(Ji,w)},[w]),g.jsx(yb,{scope:n,orientation:r,dir:m,loop:o,currentTabStopId:p,onItemFocus:y.useCallback(T=>v(T),[v]),onItemShiftTab:y.useCallback(()=>b(!0),[]),onFocusableItemAdd:y.useCallback(()=>R(T=>T+1),[]),onFocusableItemRemove:y.useCallback(()=>R(T=>T-1),[]),children:g.jsx(z.div,{tabIndex:x||A===0?-1:0,"data-orientation":r,...f,ref:h,style:{outline:"none",...e.style},onMouseDown:B(e.onMouseDown,()=>{E.current=!0}),onFocus:B(e.onFocus,T=>{const I=!E.current;if(T.target===T.currentTarget&&I&&!x){const P=new CustomEvent(Ji,mb);if(T.currentTarget.dispatchEvent(P),!P.defaultPrevented){const M=S().filter(G=>G.focusable),j=M.find(G=>G.active),V=M.find(G=>G.id===p),K=[j,V,...M].filter(Boolean).map(G=>G.ref.current);Wh(K,a)}}E.current=!1}),onBlur:B(e.onBlur,()=>b(!1))})})}),Hh="RovingFocusGroupItem",zh=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,children:c,...u}=e,l=Re(),s=i||l,a=xb(Hh,n),f=a.currentTabStopId===s,d=Uh(n),{onFocusableItemAdd:h,onFocusableItemRemove:m,currentTabStopId:p}=a;return y.useEffect(()=>{if(r)return h(),()=>m()},[r,h,m]),g.jsx(js.ItemSlot,{scope:n,id:s,focusable:r,active:o,children:g.jsx(z.span,{tabIndex:f?0:-1,"data-orientation":a.orientation,...u,ref:t,onMouseDown:B(e.onMouseDown,v=>{r?a.onItemFocus(s):v.preventDefault()}),onFocus:B(e.onFocus,()=>a.onItemFocus(s)),onKeyDown:B(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){a.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const x=Sb(v,a.orientation,a.dir);if(x!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let w=d().filter(S=>S.focusable).map(S=>S.ref.current);if(x==="last")w.reverse();else if(x==="prev"||x==="next"){x==="prev"&&w.reverse();const S=w.indexOf(v.currentTarget);w=a.loop?Cb(w,S+1):w.slice(S+1)}setTimeout(()=>Wh(w))}}),children:typeof c=="function"?c({isCurrentTabStop:f,hasTabStop:p!=null}):c})})});zh.displayName=Hh;var wb={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Eb(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Sb(e,t,n){const r=Eb(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return wb[r]}function Wh(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Cb(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Va=Gh,Ba=zh,Ds=["Enter"," "],_b=["ArrowDown","PageUp","Home"],qh=["ArrowUp","PageDown","End"],Rb=[..._b,...qh],Tb={ltr:[...Ds,"ArrowRight"],rtl:[...Ds,"ArrowLeft"]},Pb={ltr:["ArrowLeft"],rtl:["ArrowRight"]},gr="Menu",[Qn,Ab,Ob]=ar(gr),[Yt,Kh]=Ee(gr,[Ob,Pt,En]),wi=Pt(),Yh=En(),[Mb,Xt]=Yt(gr),[Ib,vr]=Yt(gr),Xh=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:c=!0}=e,u=wi(t),[l,s]=y.useState(null),a=y.useRef(!1),f=Ze(i),d=Kt(o);return y.useEffect(()=>{const h=()=>{a.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>a.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),g.jsx(yi,{...u,children:g.jsx(Mb,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:s,children:g.jsx(Ib,{scope:t,onClose:y.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:a,dir:d,modal:c,children:r})})})};Xh.displayName=gr;var Nb="MenuAnchor",$a=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=wi(n);return g.jsx(pr,{...o,...r,ref:t})});$a.displayName=Nb;var Ua="MenuPortal",[jb,Zh]=Yt(Ua,{forceMount:void 0}),Qh=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=Xt(Ua,t);return g.jsx(jb,{scope:t,forceMount:n,children:g.jsx(je,{present:n||i.open,children:g.jsx(lr,{asChild:!0,container:o,children:r})})})};Qh.displayName=Ua;var He="MenuContent",[Db,Ga]=Yt(He),Jh=y.forwardRef((e,t)=>{const n=Zh(He,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=Xt(He,e.__scopeMenu),c=vr(He,e.__scopeMenu);return g.jsx(Qn.Provider,{scope:e.__scopeMenu,children:g.jsx(je,{present:r||i.open,children:g.jsx(Qn.Slot,{scope:e.__scopeMenu,children:c.modal?g.jsx(kb,{...o,ref:t}):g.jsx(Lb,{...o,ref:t})})})})}),kb=y.forwardRef((e,t)=>{const n=Xt(He,e.__scopeMenu),r=y.useRef(null),o=re(t,r);return y.useEffect(()=>{const i=r.current;if(i)return fi(i)},[]),g.jsx(Ha,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:B(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Lb=y.forwardRef((e,t)=>{const n=Xt(He,e.__scopeMenu);return g.jsx(Ha,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Fb=St("MenuContent.ScrollLock"),Ha=y.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:c,disableOutsidePointerEvents:u,onEntryFocus:l,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:f,onInteractOutside:d,onDismiss:h,disableOutsideScroll:m,...p}=e,v=Xt(He,n),x=vr(He,n),b=wi(n),w=Yh(n),S=Ab(n),[E,A]=y.useState(null),R=y.useRef(null),T=re(t,R,v.onContentChange),I=y.useRef(0),P=y.useRef(""),M=y.useRef(0),j=y.useRef(null),V=y.useRef("right"),$=y.useRef(0),K=m?ur:y.Fragment,G=m?{as:Fb,allowPinchZoom:!0}:void 0,H=L=>{var F,Y;const O=P.current+L,k=S().filter(Z=>!Z.disabled),ee=document.activeElement,ne=(F=k.find(Z=>Z.ref.current===ee))==null?void 0:F.textValue,X=k.map(Z=>Z.textValue),ie=Xb(X,O,ne),te=(Y=k.find(Z=>Z.textValue===ie))==null?void 0:Y.ref.current;(function Z(q){P.current=q,window.clearTimeout(I.current),q!==""&&(I.current=window.setTimeout(()=>Z(""),1e3))})(O),te&&setTimeout(()=>te.focus())};y.useEffect(()=>()=>window.clearTimeout(I.current),[]),li();const U=y.useCallback(L=>{var k,ee;return V.current===((k=j.current)==null?void 0:k.side)&&Qb(L,(ee=j.current)==null?void 0:ee.area)},[]);return g.jsx(Db,{scope:n,searchRef:P,onItemEnter:y.useCallback(L=>{U(L)&&L.preventDefault()},[U]),onItemLeave:y.useCallback(L=>{var O;U(L)||((O=R.current)==null||O.focus(),A(null))},[U]),onTriggerLeave:y.useCallback(L=>{U(L)&&L.preventDefault()},[U]),pointerGraceTimerRef:M,onPointerGraceIntentChange:y.useCallback(L=>{j.current=L},[]),children:g.jsx(K,{...G,children:g.jsx(cr,{asChild:!0,trapped:o,onMountAutoFocus:B(i,L=>{var O;L.preventDefault(),(O=R.current)==null||O.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:g.jsx(xn,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:f,onInteractOutside:d,onDismiss:h,children:g.jsx(Va,{asChild:!0,...w,dir:x.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:A,onEntryFocus:B(l,L=>{x.isUsingKeyboardRef.current||L.preventDefault()}),preventScrollOnEntryFocus:!0,children:g.jsx(xi,{role:"menu","aria-orientation":"vertical","data-state":mp(v.open),"data-radix-menu-content":"",dir:x.dir,...b,...p,ref:T,style:{outline:"none",...p.style},onKeyDown:B(p.onKeyDown,L=>{const k=L.target.closest("[data-radix-menu-content]")===L.currentTarget,ee=L.ctrlKey||L.altKey||L.metaKey,ne=L.key.length===1;k&&(L.key==="Tab"&&L.preventDefault(),!ee&&ne&&H(L.key));const X=R.current;if(L.target!==X||!Rb.includes(L.key))return;L.preventDefault();const te=S().filter(F=>!F.disabled).map(F=>F.ref.current);qh.includes(L.key)&&te.reverse(),Kb(te)}),onBlur:B(e.onBlur,L=>{L.currentTarget.contains(L.target)||(window.clearTimeout(I.current),P.current="")}),onPointerMove:B(e.onPointerMove,Jn(L=>{const O=L.target,k=$.current!==L.clientX;if(L.currentTarget.contains(O)&&k){const ee=L.clientX>$.current?"right":"left";V.current=ee,$.current=L.clientX}}))})})})})})})});Jh.displayName=He;var Vb="MenuGroup",za=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(z.div,{role:"group",...r,ref:t})});za.displayName=Vb;var Bb="MenuLabel",ep=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(z.div,{...r,ref:t})});ep.displayName=Bb;var zo="MenuItem",Cl="menu.itemSelect",Ei=y.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=y.useRef(null),c=vr(zo,e.__scopeMenu),u=Ga(zo,e.__scopeMenu),l=re(t,i),s=y.useRef(!1),a=()=>{const f=i.current;if(!n&&f){const d=new CustomEvent(Cl,{bubbles:!0,cancelable:!0});f.addEventListener(Cl,h=>r==null?void 0:r(h),{once:!0}),yd(f,d),d.defaultPrevented?s.current=!1:c.onClose()}};return g.jsx(tp,{...o,ref:l,disabled:n,onClick:B(e.onClick,a),onPointerDown:f=>{var d;(d=e.onPointerDown)==null||d.call(e,f),s.current=!0},onPointerUp:B(e.onPointerUp,f=>{var d;s.current||(d=f.currentTarget)==null||d.click()}),onKeyDown:B(e.onKeyDown,f=>{const d=u.searchRef.current!=="";n||d&&f.key===" "||Ds.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});Ei.displayName=zo;var tp=y.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,c=Ga(zo,n),u=Yh(n),l=y.useRef(null),s=re(t,l),[a,f]=y.useState(!1),[d,h]=y.useState("");return y.useEffect(()=>{const m=l.current;m&&h((m.textContent??"").trim())},[i.children]),g.jsx(Qn.ItemSlot,{scope:n,disabled:r,textValue:o??d,children:g.jsx(Ba,{asChild:!0,...u,focusable:!r,children:g.jsx(z.div,{role:"menuitem","data-highlighted":a?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:s,onPointerMove:B(e.onPointerMove,Jn(m=>{r?c.onItemLeave(m):(c.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:B(e.onPointerLeave,Jn(m=>c.onItemLeave(m))),onFocus:B(e.onFocus,()=>f(!0)),onBlur:B(e.onBlur,()=>f(!1))})})})}),$b="MenuCheckboxItem",np=y.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return g.jsx(ap,{scope:e.__scopeMenu,checked:n,children:g.jsx(Ei,{role:"menuitemcheckbox","aria-checked":Wo(n)?"mixed":n,...o,ref:t,"data-state":qa(n),onSelect:B(o.onSelect,()=>r==null?void 0:r(Wo(n)?!0:!n),{checkForDefaultPrevented:!1})})})});np.displayName=$b;var rp="MenuRadioGroup",[Ub,Gb]=Yt(rp,{value:void 0,onValueChange:()=>{}}),op=y.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=Ze(r);return g.jsx(Ub,{scope:e.__scopeMenu,value:n,onValueChange:i,children:g.jsx(za,{...o,ref:t})})});op.displayName=rp;var ip="MenuRadioItem",sp=y.forwardRef((e,t)=>{const{value:n,...r}=e,o=Gb(ip,e.__scopeMenu),i=n===o.value;return g.jsx(ap,{scope:e.__scopeMenu,checked:i,children:g.jsx(Ei,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":qa(i),onSelect:B(r.onSelect,()=>{var c;return(c=o.onValueChange)==null?void 0:c.call(o,n)},{checkForDefaultPrevented:!1})})})});sp.displayName=ip;var Wa="MenuItemIndicator",[ap,Hb]=Yt(Wa,{checked:!1}),cp=y.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=Hb(Wa,n);return g.jsx(je,{present:r||Wo(i.checked)||i.checked===!0,children:g.jsx(z.span,{...o,ref:t,"data-state":qa(i.checked)})})});cp.displayName=Wa;var zb="MenuSeparator",lp=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(z.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});lp.displayName=zb;var Wb="MenuArrow",up=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=wi(n);return g.jsx(bi,{...o,...r,ref:t})});up.displayName=Wb;var qb="MenuSub",[wN,fp]=Yt(qb),Un="MenuSubTrigger",dp=y.forwardRef((e,t)=>{const n=Xt(Un,e.__scopeMenu),r=vr(Un,e.__scopeMenu),o=fp(Un,e.__scopeMenu),i=Ga(Un,e.__scopeMenu),c=y.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:l}=i,s={__scopeMenu:e.__scopeMenu},a=y.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return y.useEffect(()=>a,[a]),y.useEffect(()=>{const f=u.current;return()=>{window.clearTimeout(f),l(null)}},[u,l]),g.jsx($a,{asChild:!0,...s,children:g.jsx(tp,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":mp(n.open),...e,ref:ii(t,o.onTriggerChange),onClick:f=>{var d;(d=e.onClick)==null||d.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:B(e.onPointerMove,Jn(f=>{i.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!c.current&&(i.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{n.onOpenChange(!0),a()},100))})),onPointerLeave:B(e.onPointerLeave,Jn(f=>{var h,m;a();const d=(h=n.content)==null?void 0:h.getBoundingClientRect();if(d){const p=(m=n.content)==null?void 0:m.dataset.side,v=p==="right",x=v?-5:5,b=d[v?"left":"right"],w=d[v?"right":"left"];i.onPointerGraceIntentChange({area:[{x:f.clientX+x,y:f.clientY},{x:b,y:d.top},{x:w,y:d.top},{x:w,y:d.bottom},{x:b,y:d.bottom}],side:p}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(f),f.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:B(e.onKeyDown,f=>{var h;const d=i.searchRef.current!=="";e.disabled||d&&f.key===" "||Tb[r.dir].includes(f.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),f.preventDefault())})})})});dp.displayName=Un;var hp="MenuSubContent",pp=y.forwardRef((e,t)=>{const n=Zh(He,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=Xt(He,e.__scopeMenu),c=vr(He,e.__scopeMenu),u=fp(hp,e.__scopeMenu),l=y.useRef(null),s=re(t,l);return g.jsx(Qn.Provider,{scope:e.__scopeMenu,children:g.jsx(je,{present:r||i.open,children:g.jsx(Qn.Slot,{scope:e.__scopeMenu,children:g.jsx(Ha,{id:u.contentId,"aria-labelledby":u.triggerId,...o,ref:s,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:a=>{var f;c.isUsingKeyboardRef.current&&((f=l.current)==null||f.focus()),a.preventDefault()},onCloseAutoFocus:a=>a.preventDefault(),onFocusOutside:B(e.onFocusOutside,a=>{a.target!==u.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:B(e.onEscapeKeyDown,a=>{c.onClose(),a.preventDefault()}),onKeyDown:B(e.onKeyDown,a=>{var h;const f=a.currentTarget.contains(a.target),d=Pb[c.dir].includes(a.key);f&&d&&(i.onOpenChange(!1),(h=u.trigger)==null||h.focus(),a.preventDefault())})})})})})});pp.displayName=hp;function mp(e){return e?"open":"closed"}function Wo(e){return e==="indeterminate"}function qa(e){return Wo(e)?"indeterminate":e?"checked":"unchecked"}function Kb(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Yb(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Xb(e,t,n){const o=t.length>1&&Array.from(t).every(s=>s===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let c=Yb(e,Math.max(i,0));o.length===1&&(c=c.filter(s=>s!==n));const l=c.find(s=>s.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Zb(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,c=t.length-1;i<t.length;c=i++){const u=t[i],l=t[c],s=u.x,a=u.y,f=l.x,d=l.y;a>r!=d>r&&n<(f-s)*(r-a)/(d-a)+s&&(o=!o)}return o}function Qb(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Zb(n,t)}function Jn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Jb=Xh,ew=$a,tw=Qh,nw=Jh,rw=za,ow=ep,iw=Ei,sw=np,aw=op,cw=sp,lw=cp,uw=lp,fw=up,dw=dp,hw=pp,Si="DropdownMenu",[pw]=Ee(Si,[Kh]),De=Kh(),[mw,gp]=pw(Si),vp=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:c,modal:u=!0}=e,l=De(t),s=y.useRef(null),[a,f]=Ne({prop:o,defaultProp:i??!1,onChange:c,caller:Si});return g.jsx(mw,{scope:t,triggerId:Re(),triggerRef:s,contentId:Re(),open:a,onOpenChange:f,onOpenToggle:y.useCallback(()=>f(d=>!d),[f]),modal:u,children:g.jsx(Jb,{...l,open:a,onOpenChange:f,dir:r,modal:u,children:n})})};vp.displayName=Si;var yp="DropdownMenuTrigger",xp=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=gp(yp,n),c=De(n);return g.jsx(ew,{asChild:!0,...c,children:g.jsx(z.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:ii(t,i.triggerRef),onPointerDown:B(e.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(i.onOpenToggle(),i.open||u.preventDefault())}),onKeyDown:B(e.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&i.onOpenToggle(),u.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});xp.displayName=yp;var gw="DropdownMenuPortal",bp=e=>{const{__scopeDropdownMenu:t,...n}=e,r=De(t);return g.jsx(tw,{...r,...n})};bp.displayName=gw;var wp="DropdownMenuContent",Ep=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=gp(wp,n),i=De(n),c=y.useRef(!1);return g.jsx(nw,{id:o.contentId,"aria-labelledby":o.triggerId,...i,...r,ref:t,onCloseAutoFocus:B(e.onCloseAutoFocus,u=>{var l;c.current||(l=o.triggerRef.current)==null||l.focus(),c.current=!1,u.preventDefault()}),onInteractOutside:B(e.onInteractOutside,u=>{const l=u.detail.originalEvent,s=l.button===0&&l.ctrlKey===!0,a=l.button===2||s;(!o.modal||a)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ep.displayName=wp;var vw="DropdownMenuGroup",yw=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(rw,{...o,...r,ref:t})});yw.displayName=vw;var xw="DropdownMenuLabel",Sp=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(ow,{...o,...r,ref:t})});Sp.displayName=xw;var bw="DropdownMenuItem",Cp=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(iw,{...o,...r,ref:t})});Cp.displayName=bw;var ww="DropdownMenuCheckboxItem",Ew=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(sw,{...o,...r,ref:t})});Ew.displayName=ww;var Sw="DropdownMenuRadioGroup",Cw=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(aw,{...o,...r,ref:t})});Cw.displayName=Sw;var _w="DropdownMenuRadioItem",Rw=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(cw,{...o,...r,ref:t})});Rw.displayName=_w;var Tw="DropdownMenuItemIndicator",Pw=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(lw,{...o,...r,ref:t})});Pw.displayName=Tw;var Aw="DropdownMenuSeparator",_p=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(uw,{...o,...r,ref:t})});_p.displayName=Aw;var Ow="DropdownMenuArrow",Mw=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(fw,{...o,...r,ref:t})});Mw.displayName=Ow;var Iw="DropdownMenuSubTrigger",Nw=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(dw,{...o,...r,ref:t})});Nw.displayName=Iw;var jw="DropdownMenuSubContent",Dw=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(hw,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Dw.displayName=jw;var kw=vp,Lw=xp,Fw=bp,Vw=Ep,Bw=Sp,$w=Cp,Uw=_p,Gw="Label",Rp=y.forwardRef((e,t)=>g.jsx(z.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Rp.displayName=Gw;var[Ka]=Ee("Form"),Ya="Form",[Hw,yr]=Ka(Ya),[zw,Tp]=Ka(Ya),Pp=y.forwardRef((e,t)=>{const{__scopeForm:n,onClearServerErrors:r=()=>{},...o}=e,i=y.useRef(null),c=re(t,i),[u,l]=y.useState({}),s=y.useCallback(P=>u[P],[u]),a=y.useCallback((P,M)=>l(j=>({...j,[P]:{...j[P]??{},...M}})),[]),f=y.useCallback(P=>{l(M=>({...M,[P]:void 0})),b(M=>({...M,[P]:{}}))},[]),[d,h]=y.useState({}),m=y.useCallback(P=>d[P]??[],[d]),p=y.useCallback((P,M)=>{h(j=>({...j,[P]:[...j[P]??[],M]}))},[]),v=y.useCallback((P,M)=>{h(j=>({...j,[P]:(j[P]??[]).filter(V=>V.id!==M)}))},[]),[x,b]=y.useState({}),w=y.useCallback(P=>x[P]??{},[x]),S=y.useCallback((P,M)=>{b(j=>({...j,[P]:{...j[P]??{},...M}}))},[]),[E,A]=y.useState({}),R=y.useCallback((P,M)=>{A(j=>{const V=new Set(j[P]).add(M);return{...j,[P]:V}})},[]),T=y.useCallback((P,M)=>{A(j=>{const V=new Set(j[P]);return V.delete(M),{...j,[P]:V}})},[]),I=y.useCallback(P=>Array.from(E[P]??[]).join(" ")||void 0,[E]);return g.jsx(Hw,{scope:n,getFieldValidity:s,onFieldValidityChange:a,getFieldCustomMatcherEntries:m,onFieldCustomMatcherEntryAdd:p,onFieldCustomMatcherEntryRemove:v,getFieldCustomErrors:w,onFieldCustomErrorsChange:S,onFieldValiditionClear:f,children:g.jsx(zw,{scope:n,onFieldMessageIdAdd:R,onFieldMessageIdRemove:T,getFieldDescription:I,children:g.jsx(z.form,{...o,ref:c,onInvalid:B(e.onInvalid,P=>{const M=Np(P.currentTarget);M===P.target&&M.focus(),P.preventDefault()}),onSubmit:B(e.onSubmit,r,{checkForDefaultPrevented:!1}),onReset:B(e.onReset,r)})})})});Pp.displayName=Ya;var Xa="FormField",[Ww,Za]=Ka(Xa),Ap=y.forwardRef((e,t)=>{const{__scopeForm:n,name:r,serverInvalid:o=!1,...i}=e,u=yr(Xa,n).getFieldValidity(r),l=Re();return g.jsx(Ww,{scope:n,id:l,name:r,serverInvalid:o,children:g.jsx(z.div,{"data-valid":Ja(u,o),"data-invalid":ec(u,o),...i,ref:t})})});Ap.displayName=Xa;var ks="FormLabel",Op=y.forwardRef((e,t)=>{const{__scopeForm:n,...r}=e,o=yr(ks,n),i=Za(ks,n),c=r.htmlFor||i.id,u=o.getFieldValidity(i.name);return g.jsx(Rp,{"data-valid":Ja(u,i.serverInvalid),"data-invalid":ec(u,i.serverInvalid),...r,ref:t,htmlFor:c})});Op.displayName=ks;var jo="FormControl",Mp=y.forwardRef((e,t)=>{const{__scopeForm:n,...r}=e,o=yr(jo,n),i=Za(jo,n),c=Tp(jo,n),u=y.useRef(null),l=re(t,u),s=r.name||i.name,a=r.id||i.id,f=o.getFieldCustomMatcherEntries(s),{onFieldValidityChange:d,onFieldCustomErrorsChange:h,onFieldValiditionClear:m}=o,p=y.useCallback(async b=>{if(jp(b.validity)){const j=es(b.validity);d(s,j);return}const w=b.form?new FormData(b.form):new FormData,S=[b.value,w],E=[],A=[];f.forEach(j=>{tE(j,S)?A.push(j):nE(j)&&E.push(j)});const R=E.map(({id:j,match:V})=>[j,V(...S)]),T=Object.fromEntries(R),I=Object.values(T).some(Boolean),P=I;b.setCustomValidity(P?er:"");const M=es(b.validity);if(d(s,M),h(s,T),!I&&A.length>0){const j=A.map(({id:U,match:L})=>L(...S).then(O=>[U,O])),V=await Promise.all(j),$=Object.fromEntries(V),G=Object.values($).some(Boolean);b.setCustomValidity(G?er:"");const H=es(b.validity);d(s,H),h(s,$)}},[f,s,h,d]);y.useEffect(()=>{const b=u.current;if(b){const w=()=>p(b);return b.addEventListener("change",w),()=>b.removeEventListener("change",w)}},[p]);const v=y.useCallback(()=>{const b=u.current;b&&(b.setCustomValidity(""),m(s))},[s,m]);y.useEffect(()=>{var w;const b=(w=u.current)==null?void 0:w.form;if(b)return b.addEventListener("reset",v),()=>b.removeEventListener("reset",v)},[v]),y.useEffect(()=>{const b=u.current,w=b==null?void 0:b.closest("form");if(w&&i.serverInvalid){const S=Np(w);S===b&&S.focus()}},[i.serverInvalid]);const x=o.getFieldValidity(s);return g.jsx(z.input,{"data-valid":Ja(x,i.serverInvalid),"data-invalid":ec(x,i.serverInvalid),"aria-invalid":i.serverInvalid?!0:void 0,"aria-describedby":c.getFieldDescription(s),title:"",...r,ref:l,id:a,name:s,onInvalid:B(e.onInvalid,b=>{const w=b.currentTarget;p(w)}),onChange:B(e.onChange,b=>{v()})})});Mp.displayName=jo;var er="This value is not valid",qw={badInput:er,patternMismatch:"This value does not match the required pattern",rangeOverflow:"This value is too large",rangeUnderflow:"This value is too small",stepMismatch:"This value does not match the required step",tooLong:"This value is too long",tooShort:"This value is too short",typeMismatch:"This value does not match the required type",valid:void 0,valueMissing:"This value is missing"},xr="FormMessage",Ip=y.forwardRef((e,t)=>{const{match:n,name:r,...o}=e,i=Za(xr,e.__scopeForm),c=r??i.name;return n===void 0?g.jsx(Qa,{...o,ref:t,name:c,children:e.children||er}):typeof n=="function"?g.jsx(Yw,{match:n,...o,ref:t,name:c}):g.jsx(Kw,{match:n,...o,ref:t,name:c})});Ip.displayName=xr;var Kw=y.forwardRef((e,t)=>{const{match:n,forceMatch:r=!1,name:o,children:i,...c}=e,l=yr(xr,c.__scopeForm).getFieldValidity(o);return r||(l==null?void 0:l[n])?g.jsx(Qa,{ref:t,...c,name:o,children:i??qw[n]}):null}),Yw=y.forwardRef((e,t)=>{const{match:n,forceMatch:r=!1,name:o,id:i,children:c,...u}=e,l=yr(xr,u.__scopeForm),s=y.useRef(null),a=re(t,s),f=Re(),d=i??f,h=y.useMemo(()=>({id:d,match:n}),[d,n]),{onFieldCustomMatcherEntryAdd:m,onFieldCustomMatcherEntryRemove:p}=l;y.useEffect(()=>(m(o,h),()=>p(o,h.id)),[h,o,m,p]);const v=l.getFieldValidity(o),b=l.getFieldCustomErrors(o)[d];return r||v&&!jp(v)&&b?g.jsx(Qa,{id:d,ref:a,...u,name:o,children:c??er}):null}),Qa=y.forwardRef((e,t)=>{const{__scopeForm:n,id:r,name:o,...i}=e,c=Tp(xr,n),u=Re(),l=r??u,{onFieldMessageIdAdd:s,onFieldMessageIdRemove:a}=c;return y.useEffect(()=>(s(o,l),()=>a(o,l)),[o,l,s,a]),g.jsx(z.span,{id:l,...i,ref:t})}),Xw="FormSubmit",Zw=y.forwardRef((e,t)=>{const{__scopeForm:n,...r}=e;return g.jsx(z.button,{type:"submit",...r,ref:t})});Zw.displayName=Xw;function es(e){const t={};for(const n in e)t[n]=e[n];return t}function Qw(e){return e instanceof HTMLElement}function Jw(e){return"validity"in e}function eE(e){return Jw(e)&&(e.validity.valid===!1||e.getAttribute("aria-invalid")==="true")}function Np(e){const t=e.elements,[n]=Array.from(t).filter(Qw).filter(eE);return n}function tE(e,t){return e.match.constructor.name==="AsyncFunction"||rE(e.match,t)}function nE(e){return e.match.constructor.name==="Function"}function rE(e,t){return e(...t)instanceof Promise}function jp(e){let t=!1;for(const n in e){const r=n;if(r!=="valid"&&r!=="customError"&&e[r]){t=!0;break}}return t}function Ja(e,t){if((e==null?void 0:e.valid)===!0&&!t)return!0}function ec(e,t){if((e==null?void 0:e.valid)===!1||t)return!0}var oE=Pp,iE=Ap,sE=Op,aE=Mp,cE=Ip;function qo(e,[t,n]){return Math.min(n,Math.max(t,e))}var Ci="Popover",[Dp]=Ee(Ci,[Pt]),br=Pt(),[lE,Zt]=Dp(Ci),kp=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:c=!1}=e,u=br(t),l=y.useRef(null),[s,a]=y.useState(!1),[f,d]=Ne({prop:r,defaultProp:o??!1,onChange:i,caller:Ci});return g.jsx(yi,{...u,children:g.jsx(lE,{scope:t,contentId:Re(),triggerRef:l,open:f,onOpenChange:d,onOpenToggle:y.useCallback(()=>d(h=>!h),[d]),hasCustomAnchor:s,onCustomAnchorAdd:y.useCallback(()=>a(!0),[]),onCustomAnchorRemove:y.useCallback(()=>a(!1),[]),modal:c,children:n})})};kp.displayName=Ci;var Lp="PopoverAnchor",uE=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Zt(Lp,n),i=br(n),{onCustomAnchorAdd:c,onCustomAnchorRemove:u}=o;return y.useEffect(()=>(c(),()=>u()),[c,u]),g.jsx(pr,{...i,...r,ref:t})});uE.displayName=Lp;var Fp="PopoverTrigger",fE=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Zt(Fp,n),i=br(n),c=re(t,o.triggerRef),u=g.jsx(z.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":$p(o.open),...r,ref:c,onClick:B(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?u:g.jsx(pr,{asChild:!0,...i,children:u})});fE.displayName=Fp;var dE="PopoverPortal",[EN,hE]=Dp(dE,{forceMount:void 0}),gn="PopoverContent",pE=y.forwardRef((e,t)=>{const n=hE(gn,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=Zt(gn,e.__scopePopover);return g.jsx(je,{present:r||i.open,children:i.modal?g.jsx(gE,{...o,ref:t}):g.jsx(vE,{...o,ref:t})})});pE.displayName=gn;var mE=St("PopoverContent.RemoveScroll"),gE=y.forwardRef((e,t)=>{const n=Zt(gn,e.__scopePopover),r=y.useRef(null),o=re(t,r),i=y.useRef(!1);return y.useEffect(()=>{const c=r.current;if(c)return fi(c)},[]),g.jsx(ur,{as:mE,allowPinchZoom:!0,children:g.jsx(Vp,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:B(e.onCloseAutoFocus,c=>{var u;c.preventDefault(),i.current||(u=n.triggerRef.current)==null||u.focus()}),onPointerDownOutside:B(e.onPointerDownOutside,c=>{const u=c.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0,s=u.button===2||l;i.current=s},{checkForDefaultPrevented:!1}),onFocusOutside:B(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),vE=y.forwardRef((e,t)=>{const n=Zt(gn,e.__scopePopover),r=y.useRef(!1),o=y.useRef(!1);return g.jsx(Vp,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var c,u;(c=e.onCloseAutoFocus)==null||c.call(e,i),i.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var l,s;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;((s=n.triggerRef.current)==null?void 0:s.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),Vp=y.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:l,onFocusOutside:s,onInteractOutside:a,...f}=e,d=Zt(gn,n),h=br(n);return li(),g.jsx(cr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:g.jsx(xn,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:a,onEscapeKeyDown:u,onPointerDownOutside:l,onFocusOutside:s,onDismiss:()=>d.onOpenChange(!1),children:g.jsx(xi,{"data-state":$p(d.open),role:"dialog",id:d.contentId,...h,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Bp="PopoverClose",yE=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Zt(Bp,n);return g.jsx(z.button,{type:"button",...r,ref:t,onClick:B(e.onClick,()=>o.onOpenChange(!1))})});yE.displayName=Bp;var xE="PopoverArrow",bE=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=br(n);return g.jsx(bi,{...o,...r,ref:t})});bE.displayName=xE;function $p(e){return e?"open":"closed"}var wE=kp,tc="Progress",nc=100,[EE]=Ee(tc),[SE,CE]=EE(tc),Up=y.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=_E,...c}=e;(o||o===0)&&!_l(o)&&console.error(RE(`${o}`,"Progress"));const u=_l(o)?o:nc;r!==null&&!Rl(r,u)&&console.error(TE(`${r}`,"Progress"));const l=Rl(r,u)?r:null,s=Ko(l)?i(l,u):void 0;return g.jsx(SE,{scope:n,value:l,max:u,children:g.jsx(z.div,{"aria-valuemax":u,"aria-valuemin":0,"aria-valuenow":Ko(l)?l:void 0,"aria-valuetext":s,role:"progressbar","data-state":zp(l,u),"data-value":l??void 0,"data-max":u,...c,ref:t})})});Up.displayName=tc;var Gp="ProgressIndicator",Hp=y.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=CE(Gp,n);return g.jsx(z.div,{"data-state":zp(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});Hp.displayName=Gp;function _E(e,t){return`${Math.round(e/t*100)}%`}function zp(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Ko(e){return typeof e=="number"}function _l(e){return Ko(e)&&!isNaN(e)&&e>0}function Rl(e,t){return Ko(e)&&!isNaN(e)&&e<=t&&e>=0}function RE(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${nc}\`.`}function TE(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
92
92
  - a positive number
93
- - less than the value passed to \`max\` (or ${Ja} if no \`max\` prop is set)
93
+ - less than the value passed to \`max\` (or ${nc} if no \`max\` prop is set)
94
94
  - \`null\` or \`undefined\` if the progress is indeterminate.
95
95
 
96
- Defaulting to \`null\`.`}var pE=Fp,mE=Bp,ec="Radio",[gE,Up]=Ce(ec),[vE,yE]=gE(ec),Gp=y.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:s,disabled:c,value:u="on",onCheck:l,form:i,...a}=e,[f,d]=y.useState(null),h=re(t,v=>d(v)),m=y.useRef(!1),p=f?i||!!f.closest("form"):!0;return g.jsxs(vE,{scope:n,checked:o,disabled:c,children:[g.jsx(z.button,{type:"button",role:"radio","aria-checked":o,"data-state":qp(o),"data-disabled":c?"":void 0,disabled:c,value:u,...a,ref:h,onClick:$(e.onClick,v=>{o||l==null||l(),p&&(m.current=v.isPropagationStopped(),m.current||v.stopPropagation())})}),p&&g.jsx(Wp,{control:f,bubbles:!m.current,name:r,value:u,checked:o,required:s,disabled:c,form:i,style:{transform:"translateX(-100%)"}})]})});Gp.displayName=ec;var Hp="RadioIndicator",zp=y.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,s=yE(Hp,n);return g.jsx(je,{present:r||s.checked,children:g.jsx(z.span,{"data-state":qp(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})})});zp.displayName=Hp;var xE="RadioBubbleInput",Wp=y.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const c=y.useRef(null),u=re(c,s),l=lr(n),i=ur(t);return y.useEffect(()=>{const a=c.current;if(!a)return;const f=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&h){const m=new Event("click",{bubbles:r});h.call(a,n),a.dispatchEvent(m)}},[l,n,r]),g.jsx(z.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:u,style:{...o.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Wp.displayName=xE;function qp(e){return e?"checked":"unchecked"}var bE=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Ci="RadioGroup",[wE]=Ce(Ci,[xi,Up]),Kp=xi(),Yp=Up(),[EE,SE]=wE(Ci),Xp=y.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:s,required:c=!1,disabled:u=!1,orientation:l,dir:i,loop:a=!0,onValueChange:f,...d}=e,h=Kp(n),m=yn(i),[p,v]=Ne({prop:s,defaultProp:o??null,onChange:f,caller:Ci});return g.jsx(EE,{scope:n,name:r,required:c,disabled:u,value:p,onValueChange:v,children:g.jsx($h,{asChild:!0,...h,orientation:l,dir:m,loop:a,children:g.jsx(z.div,{role:"radiogroup","aria-required":c,"aria-orientation":l,"data-disabled":u?"":void 0,dir:m,...d,ref:t})})})});Xp.displayName=Ci;var Zp="RadioGroupItem",Qp=y.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,s=SE(Zp,n),c=s.disabled||r,u=Kp(n),l=Yp(n),i=y.useRef(null),a=re(t,i),f=s.value===o.value,d=y.useRef(!1);return y.useEffect(()=>{const h=p=>{bE.includes(p.key)&&(d.current=!0)},m=()=>d.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",m),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",m)}},[]),g.jsx(Uh,{asChild:!0,...u,focusable:!c,active:f,children:g.jsx(Gp,{disabled:c,required:s.required,checked:f,...l,...o,name:s.name,ref:a,onCheck:()=>s.onValueChange(o.value),onKeyDown:$(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:$(o.onFocus,()=>{var h;d.current&&((h=i.current)==null||h.click())})})})});Qp.displayName=Zp;var CE="RadioGroupIndicator",Jp=y.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=Yp(n);return g.jsx(zp,{...o,...r,ref:t})});Jp.displayName=CE;var _E=Xp,RE=Qp,TE=Jp,PE=[" ","Enter","ArrowUp","ArrowDown"],AE=[" ","Enter"],Ht="Select",[_i,Ri,OE]=ir(Ht),[En]=Ce(Ht,[OE,Pt]),Ti=Pt(),[ME,At]=En(Ht),[IE,DE]=En(Ht),em=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:c,defaultValue:u,onValueChange:l,dir:i,name:a,autoComplete:f,disabled:d,required:h,form:m}=e,p=Ti(t),[v,x]=y.useState(null),[b,w]=y.useState(null),[E,S]=y.useState(!1),T=yn(i),[P,A]=Ne({prop:r,defaultProp:o??!1,onChange:s,caller:Ht}),[O,R]=Ne({prop:c,defaultProp:u,onChange:l,caller:Ht}),I=y.useRef(null),D=v?m||!!v.closest("form"):!0,[F,B]=y.useState(new Set),q=Array.from(F).map(G=>G.props.value).join(";");return g.jsx(gi,{...p,children:g.jsxs(ME,{required:h,scope:t,trigger:v,onTriggerChange:x,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:E,onValueNodeHasChildrenChange:S,contentId:Pe(),value:O,onValueChange:R,open:P,onOpenChange:A,dir:T,triggerPointerDownPosRef:I,disabled:d,children:[g.jsx(_i.Provider,{scope:t,children:g.jsx(IE,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback(G=>{B(H=>new Set(H).add(G))},[]),onNativeOptionRemove:y.useCallback(G=>{B(H=>{const U=new Set(H);return U.delete(G),U})},[]),children:n})}),D?g.jsxs(xm,{"aria-hidden":!0,required:h,tabIndex:-1,name:a,autoComplete:f,value:O,onChange:G=>R(G.target.value),disabled:d,form:m,children:[O===void 0?g.jsx("option",{value:""}):null,Array.from(F)]},q):null]})})};em.displayName=Ht;var tm="SelectTrigger",nm=y.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=Ti(n),c=At(tm,n),u=c.disabled||r,l=re(t,c.onTriggerChange),i=Ri(n),a=y.useRef("touch"),[f,d,h]=wm(p=>{const v=i().filter(w=>!w.disabled),x=v.find(w=>w.value===c.value),b=Em(v,p,x);b!==void 0&&c.onValueChange(b.value)}),m=p=>{u||(c.onOpenChange(!0),h()),p&&(c.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return g.jsx(dr,{asChild:!0,...s,children:g.jsx(z.button,{type:"button",role:"combobox","aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":bm(c.value)?"":void 0,...o,ref:l,onClick:$(o.onClick,p=>{p.currentTarget.focus(),a.current!=="mouse"&&m(p)}),onPointerDown:$(o.onPointerDown,p=>{a.current=p.pointerType;const v=p.target;v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(m(p),p.preventDefault())}),onKeyDown:$(o.onKeyDown,p=>{const v=f.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&d(p.key),!(v&&p.key===" ")&&PE.includes(p.key)&&(m(),p.preventDefault())})})})});nm.displayName=tm;var rm="SelectValue",om=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:c="",...u}=e,l=At(rm,n),{onValueNodeHasChildrenChange:i}=l,a=s!==void 0,f=re(t,l.onValueNodeChange);return we(()=>{i(a)},[i,a]),g.jsx(z.span,{...u,ref:f,style:{pointerEvents:"none"},children:bm(l.value)?g.jsx(g.Fragment,{children:c}):s})});om.displayName=rm;var NE="SelectIcon",im=y.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return g.jsx(z.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});im.displayName=NE;var jE="SelectPortal",sm=e=>g.jsx(ar,{asChild:!0,...e});sm.displayName=jE;var zt="SelectContent",am=y.forwardRef((e,t)=>{const n=At(zt,e.__scopeSelect),[r,o]=y.useState();if(we(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?ni.createPortal(g.jsx(cm,{scope:e.__scopeSelect,children:g.jsx(_i.Slot,{scope:e.__scopeSelect,children:g.jsx("div",{children:e.children})})}),s):null}return g.jsx(lm,{...e,ref:t})});am.displayName=zt;var Ye=10,[cm,Ot]=En(zt),kE="SelectContentImpl",LE=St("SelectContent.RemoveScroll"),lm=y.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:c,side:u,sideOffset:l,align:i,alignOffset:a,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:m,hideWhenDetached:p,avoidCollisions:v,...x}=e,b=At(zt,n),[w,E]=y.useState(null),[S,T]=y.useState(null),P=re(t,V=>E(V)),[A,O]=y.useState(null),[R,I]=y.useState(null),D=Ri(n),[F,B]=y.useState(!1),q=y.useRef(!1);y.useEffect(()=>{if(w)return li(w)},[w]),ai();const G=y.useCallback(V=>{const[K,...Z]=D().map(N=>N.ref.current),[W]=Z.slice(-1),oe=document.activeElement;for(const N of V)if(N===oe||(N==null||N.scrollIntoView({block:"nearest"}),N===K&&S&&(S.scrollTop=0),N===W&&S&&(S.scrollTop=S.scrollHeight),N==null||N.focus(),document.activeElement!==oe))return},[D,S]),H=y.useCallback(()=>G([A,w]),[G,A,w]);y.useEffect(()=>{F&&H()},[F,H]);const{onOpenChange:U,triggerPointerDownPosRef:L}=b;y.useEffect(()=>{if(w){let V={x:0,y:0};const K=W=>{var oe,N;V={x:Math.abs(Math.round(W.pageX)-(((oe=L.current)==null?void 0:oe.x)??0)),y:Math.abs(Math.round(W.pageY)-(((N=L.current)==null?void 0:N.y)??0))}},Z=W=>{V.x<=10&&V.y<=10?W.preventDefault():w.contains(W.target)||U(!1),document.removeEventListener("pointermove",K),L.current=null};return L.current!==null&&(document.addEventListener("pointermove",K),document.addEventListener("pointerup",Z,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",Z,{capture:!0})}}},[w,U,L]),y.useEffect(()=>{const V=()=>U(!1);return window.addEventListener("blur",V),window.addEventListener("resize",V),()=>{window.removeEventListener("blur",V),window.removeEventListener("resize",V)}},[U]);const[M,k]=wm(V=>{const K=D().filter(oe=>!oe.disabled),Z=K.find(oe=>oe.ref.current===document.activeElement),W=Em(K,V,Z);W&&setTimeout(()=>W.ref.current.focus())}),ee=y.useCallback((V,K,Z)=>{const W=!q.current&&!Z;(b.value!==void 0&&b.value===K||W)&&(O(V),W&&(q.current=!0))},[b.value]),ne=y.useCallback(()=>w==null?void 0:w.focus(),[w]),X=y.useCallback((V,K,Z)=>{const W=!q.current&&!Z;(b.value!==void 0&&b.value===K||W)&&I(V)},[b.value]),ie=r==="popper"?js:um,te=ie===js?{side:u,sideOffset:l,align:i,alignOffset:a,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:m,hideWhenDetached:p,avoidCollisions:v}:{};return g.jsx(cm,{scope:n,content:w,viewport:S,onViewportChange:T,itemRefCallback:ee,selectedItem:A,onItemLeave:ne,itemTextRefCallback:X,focusSelectedItem:H,selectedItemText:R,position:r,isPositioned:F,searchRef:M,children:g.jsx(cr,{as:LE,allowPinchZoom:!0,children:g.jsx(sr,{asChild:!0,trapped:b.open,onMountAutoFocus:V=>{V.preventDefault()},onUnmountAutoFocus:$(o,V=>{var K;(K=b.trigger)==null||K.focus({preventScroll:!0}),V.preventDefault()}),children:g.jsx(xn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:V=>V.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:g.jsx(ie,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:V=>V.preventDefault(),...x,...te,onPlaced:()=>B(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:$(x.onKeyDown,V=>{const K=V.ctrlKey||V.altKey||V.metaKey;if(V.key==="Tab"&&V.preventDefault(),!K&&V.key.length===1&&k(V.key),["ArrowUp","ArrowDown","Home","End"].includes(V.key)){let W=D().filter(oe=>!oe.disabled).map(oe=>oe.ref.current);if(["ArrowUp","End"].includes(V.key)&&(W=W.slice().reverse()),["ArrowUp","ArrowDown"].includes(V.key)){const oe=V.target,N=W.indexOf(oe);W=W.slice(N+1)}setTimeout(()=>G(W)),V.preventDefault()}})})})})})})});lm.displayName=kE;var FE="SelectItemAlignedPosition",um=y.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=At(zt,n),c=Ot(zt,n),[u,l]=y.useState(null),[i,a]=y.useState(null),f=re(t,P=>a(P)),d=Ri(n),h=y.useRef(!1),m=y.useRef(!0),{viewport:p,selectedItem:v,selectedItemText:x,focusSelectedItem:b}=c,w=y.useCallback(()=>{if(s.trigger&&s.valueNode&&u&&i&&p&&v&&x){const P=s.trigger.getBoundingClientRect(),A=i.getBoundingClientRect(),O=s.valueNode.getBoundingClientRect(),R=x.getBoundingClientRect();if(s.dir!=="rtl"){const oe=R.left-A.left,N=O.left-oe,he=P.left-N,Ee=P.width+he,$e=Math.max(Ee,A.width),It=window.innerWidth-Ye,vt=zo(N,[Ye,Math.max(Ye,It-$e)]);u.style.minWidth=Ee+"px",u.style.left=vt+"px"}else{const oe=A.right-R.right,N=window.innerWidth-O.right-oe,he=window.innerWidth-P.right-N,Ee=P.width+he,$e=Math.max(Ee,A.width),It=window.innerWidth-Ye,vt=zo(N,[Ye,Math.max(Ye,It-$e)]);u.style.minWidth=Ee+"px",u.style.right=vt+"px"}const I=d(),D=window.innerHeight-Ye*2,F=p.scrollHeight,B=window.getComputedStyle(i),q=parseInt(B.borderTopWidth,10),G=parseInt(B.paddingTop,10),H=parseInt(B.borderBottomWidth,10),U=parseInt(B.paddingBottom,10),L=q+G+F+U+H,M=Math.min(v.offsetHeight*5,L),k=window.getComputedStyle(p),ee=parseInt(k.paddingTop,10),ne=parseInt(k.paddingBottom,10),X=P.top+P.height/2-Ye,ie=D-X,te=v.offsetHeight/2,V=v.offsetTop+te,K=q+G+V,Z=L-K;if(K<=X){const oe=I.length>0&&v===I[I.length-1].ref.current;u.style.bottom="0px";const N=i.clientHeight-p.offsetTop-p.offsetHeight,he=Math.max(ie,te+(oe?ne:0)+N+H),Ee=K+he;u.style.height=Ee+"px"}else{const oe=I.length>0&&v===I[0].ref.current;u.style.top="0px";const he=Math.max(X,q+p.offsetTop+(oe?ee:0)+te)+Z;u.style.height=he+"px",p.scrollTop=K-X+p.offsetTop}u.style.margin=`${Ye}px 0`,u.style.minHeight=M+"px",u.style.maxHeight=D+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[d,s.trigger,s.valueNode,u,i,p,v,x,s.dir,r]);we(()=>w(),[w]);const[E,S]=y.useState();we(()=>{i&&S(window.getComputedStyle(i).zIndex)},[i]);const T=y.useCallback(P=>{P&&m.current===!0&&(w(),b==null||b(),m.current=!1)},[w,b]);return g.jsx(BE,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:h,onScrollButtonChange:T,children:g.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E},children:g.jsx(z.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});um.displayName=FE;var VE="SelectPopperPosition",js=y.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Ye,...s}=e,c=Ti(n);return g.jsx(vi,{...c,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});js.displayName=VE;var[BE,tc]=En(zt,{}),ks="SelectViewport",fm=y.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=Ot(ks,n),c=tc(ks,n),u=re(t,s.onViewportChange),l=y.useRef(0);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),g.jsx(_i.Slot,{scope:n,children:g.jsx(z.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:$(o.onScroll,i=>{const a=i.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:d}=c;if(d!=null&&d.current&&f){const h=Math.abs(l.current-a.scrollTop);if(h>0){const m=window.innerHeight-Ye*2,p=parseFloat(f.style.minHeight),v=parseFloat(f.style.height),x=Math.max(p,v);if(x<m){const b=x+h,w=Math.min(m,b),E=b-w;f.style.height=w+"px",f.style.bottom==="0px"&&(a.scrollTop=E>0?E:0,f.style.justifyContent="flex-end")}}}l.current=a.scrollTop})})})]})});fm.displayName=ks;var dm="SelectGroup",[$E,UE]=En(dm),GE=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Pe();return g.jsx($E,{scope:n,id:o,children:g.jsx(z.div,{role:"group","aria-labelledby":o,...r,ref:t})})});GE.displayName=dm;var hm="SelectLabel",HE=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=UE(hm,n);return g.jsx(z.div,{id:o.id,...r,ref:t})});HE.displayName=hm;var qo="SelectItem",[zE,pm]=En(qo),mm=y.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...c}=e,u=At(qo,n),l=Ot(qo,n),i=u.value===r,[a,f]=y.useState(s??""),[d,h]=y.useState(!1),m=re(t,b=>{var w;return(w=l.itemRefCallback)==null?void 0:w.call(l,b,r,o)}),p=Pe(),v=y.useRef("touch"),x=()=>{o||(u.onValueChange(r),u.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return g.jsx(zE,{scope:n,value:r,disabled:o,textId:p,isSelected:i,onItemTextChange:y.useCallback(b=>{f(w=>w||((b==null?void 0:b.textContent)??"").trim())},[]),children:g.jsx(_i.ItemSlot,{scope:n,value:r,disabled:o,textValue:a,children:g.jsx(z.div,{role:"option","aria-labelledby":p,"data-highlighted":d?"":void 0,"aria-selected":i&&d,"data-state":i?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...c,ref:m,onFocus:$(c.onFocus,()=>h(!0)),onBlur:$(c.onBlur,()=>h(!1)),onClick:$(c.onClick,()=>{v.current!=="mouse"&&x()}),onPointerUp:$(c.onPointerUp,()=>{v.current==="mouse"&&x()}),onPointerDown:$(c.onPointerDown,b=>{v.current=b.pointerType}),onPointerMove:$(c.onPointerMove,b=>{var w;v.current=b.pointerType,o?(w=l.onItemLeave)==null||w.call(l):v.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:$(c.onPointerLeave,b=>{var w;b.currentTarget===document.activeElement&&((w=l.onItemLeave)==null||w.call(l))}),onKeyDown:$(c.onKeyDown,b=>{var E;((E=l.searchRef)==null?void 0:E.current)!==""&&b.key===" "||(AE.includes(b.key)&&x(),b.key===" "&&b.preventDefault())})})})})});mm.displayName=qo;var Un="SelectItemText",gm=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,c=At(Un,n),u=Ot(Un,n),l=pm(Un,n),i=DE(Un,n),[a,f]=y.useState(null),d=re(t,x=>f(x),l.onItemTextChange,x=>{var b;return(b=u.itemTextRefCallback)==null?void 0:b.call(u,x,l.value,l.disabled)}),h=a==null?void 0:a.textContent,m=y.useMemo(()=>g.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:p,onNativeOptionRemove:v}=i;return we(()=>(p(m),()=>v(m)),[p,v,m]),g.jsxs(g.Fragment,{children:[g.jsx(z.span,{id:l.textId,...s,ref:d}),l.isSelected&&c.valueNode&&!c.valueNodeHasChildren?ni.createPortal(s.children,c.valueNode):null]})});gm.displayName=Un;var vm="SelectItemIndicator",WE=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return pm(vm,n).isSelected?g.jsx(z.span,{"aria-hidden":!0,...r,ref:t}):null});WE.displayName=vm;var Ls="SelectScrollUpButton",qE=y.forwardRef((e,t)=>{const n=Ot(Ls,e.__scopeSelect),r=tc(Ls,e.__scopeSelect),[o,s]=y.useState(!1),c=re(t,r.onScrollButtonChange);return we(()=>{if(n.viewport&&n.isPositioned){let u=function(){const i=l.scrollTop>0;s(i)};const l=n.viewport;return u(),l.addEventListener("scroll",u),()=>l.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),o?g.jsx(ym,{...e,ref:c,onAutoScroll:()=>{const{viewport:u,selectedItem:l}=n;u&&l&&(u.scrollTop=u.scrollTop-l.offsetHeight)}}):null});qE.displayName=Ls;var Fs="SelectScrollDownButton",KE=y.forwardRef((e,t)=>{const n=Ot(Fs,e.__scopeSelect),r=tc(Fs,e.__scopeSelect),[o,s]=y.useState(!1),c=re(t,r.onScrollButtonChange);return we(()=>{if(n.viewport&&n.isPositioned){let u=function(){const i=l.scrollHeight-l.clientHeight,a=Math.ceil(l.scrollTop)<i;s(a)};const l=n.viewport;return u(),l.addEventListener("scroll",u),()=>l.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),o?g.jsx(ym,{...e,ref:c,onAutoScroll:()=>{const{viewport:u,selectedItem:l}=n;u&&l&&(u.scrollTop=u.scrollTop+l.offsetHeight)}}):null});KE.displayName=Fs;var ym=y.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=Ot("SelectScrollButton",n),c=y.useRef(null),u=Ri(n),l=y.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return y.useEffect(()=>()=>l(),[l]),we(()=>{var a;const i=u().find(f=>f.ref.current===document.activeElement);(a=i==null?void 0:i.ref.current)==null||a.scrollIntoView({block:"nearest"})},[u]),g.jsx(z.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:$(o.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(r,50))}),onPointerMove:$(o.onPointerMove,()=>{var i;(i=s.onItemLeave)==null||i.call(s),c.current===null&&(c.current=window.setInterval(r,50))}),onPointerLeave:$(o.onPointerLeave,()=>{l()})})}),YE="SelectSeparator",XE=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return g.jsx(z.div,{"aria-hidden":!0,...r,ref:t})});XE.displayName=YE;var Vs="SelectArrow",ZE=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ti(n),s=At(Vs,n),c=Ot(Vs,n);return s.open&&c.position==="popper"?g.jsx(yi,{...o,...r,ref:t}):null});ZE.displayName=Vs;var QE="SelectBubbleInput",xm=y.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=y.useRef(null),s=re(r,o),c=lr(t);return y.useEffect(()=>{const u=o.current;if(!u)return;const l=window.HTMLSelectElement.prototype,a=Object.getOwnPropertyDescriptor(l,"value").set;if(c!==t&&a){const f=new Event("change",{bubbles:!0});a.call(u,t),u.dispatchEvent(f)}},[c,t]),g.jsx(z.select,{...n,style:{...hd,...n.style},ref:s,defaultValue:t})});xm.displayName=QE;function bm(e){return e===""||e===void 0}function wm(e){const t=Ze(e),n=y.useRef(""),r=y.useRef(0),o=y.useCallback(c=>{const u=n.current+c;t(u),(function l(i){n.current=i,window.clearTimeout(r.current),i!==""&&(r.current=window.setTimeout(()=>l(""),1e3))})(u)},[t]),s=y.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function Em(e,t,n){const o=t.length>1&&Array.from(t).every(i=>i===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let c=JE(e,Math.max(s,0));o.length===1&&(c=c.filter(i=>i!==n));const l=c.find(i=>i.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function JE(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var eS=em,tS=nm,nS=om,rS=im,oS=sm,iS=am,sS=fm,aS=mm,cS=gm,Sm=["PageUp","PageDown"],Cm=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],_m={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Sn="Slider",[Bs,lS,uS]=ir(Sn),[Rm]=Ce(Sn,[uS]),[fS,Pi]=Rm(Sn),Tm=y.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:s=1,orientation:c="horizontal",disabled:u=!1,minStepsBetweenThumbs:l=0,defaultValue:i=[r],value:a,onValueChange:f=()=>{},onValueCommit:d=()=>{},inverted:h=!1,form:m,...p}=e,v=y.useRef(new Set),x=y.useRef(0),w=c==="horizontal"?dS:hS,[E=[],S]=Ne({prop:a,defaultProp:i,onChange:I=>{var F;(F=[...v.current][x.current])==null||F.focus(),f(I)}}),T=y.useRef(E);function P(I){const D=yS(E,I);R(I,D)}function A(I){R(I,x.current)}function O(){const I=T.current[x.current];E[x.current]!==I&&d(E)}function R(I,D,{commit:F}={commit:!1}){const B=ES(s),q=SS(Math.round((I-r)/s)*s+r,B),G=zo(q,[r,o]);S((H=[])=>{const U=gS(H,G,D);if(wS(U,l*s)){x.current=U.indexOf(G);const L=String(U)!==String(H);return L&&F&&d(U),L?U:H}else return H})}return g.jsx(fS,{scope:e.__scopeSlider,name:n,disabled:u,min:r,max:o,valueIndexToChangeRef:x,thumbs:v.current,values:E,orientation:c,form:m,children:g.jsx(Bs.Provider,{scope:e.__scopeSlider,children:g.jsx(Bs.Slot,{scope:e.__scopeSlider,children:g.jsx(w,{"aria-disabled":u,"data-disabled":u?"":void 0,...p,ref:t,onPointerDown:$(p.onPointerDown,()=>{u||(T.current=E)}),min:r,max:o,inverted:h,onSlideStart:u?void 0:P,onSlideMove:u?void 0:A,onSlideEnd:u?void 0:O,onHomeKeyDown:()=>!u&&R(r,0,{commit:!0}),onEndKeyDown:()=>!u&&R(o,E.length-1,{commit:!0}),onStepKeyDown:({event:I,direction:D})=>{if(!u){const q=Sm.includes(I.key)||I.shiftKey&&Cm.includes(I.key)?10:1,G=x.current,H=E[G],U=s*q*D;R(H+U,G,{commit:!0})}}})})})})});Tm.displayName=Sn;var[Pm,Am]=Rm(Sn,{startEdge:"left",endEdge:"right",size:"width",direction:1}),dS=y.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:s,onSlideStart:c,onSlideMove:u,onSlideEnd:l,onStepKeyDown:i,...a}=e,[f,d]=y.useState(null),h=re(t,w=>d(w)),m=y.useRef(void 0),p=yn(o),v=p==="ltr",x=v&&!s||!v&&s;function b(w){const E=m.current||f.getBoundingClientRect(),S=[0,E.width],P=nc(S,x?[n,r]:[r,n]);return m.current=E,P(w-E.left)}return g.jsx(Pm,{scope:e.__scopeSlider,startEdge:x?"left":"right",endEdge:x?"right":"left",direction:x?1:-1,size:"width",children:g.jsx(Om,{dir:p,"data-orientation":"horizontal",...a,ref:h,style:{...a.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const E=b(w.clientX);c==null||c(E)},onSlideMove:w=>{const E=b(w.clientX);u==null||u(E)},onSlideEnd:()=>{m.current=void 0,l==null||l()},onStepKeyDown:w=>{const S=_m[x?"from-left":"from-right"].includes(w.key);i==null||i({event:w,direction:S?-1:1})}})})}),hS=y.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:s,onSlideMove:c,onSlideEnd:u,onStepKeyDown:l,...i}=e,a=y.useRef(null),f=re(t,a),d=y.useRef(void 0),h=!o;function m(p){const v=d.current||a.current.getBoundingClientRect(),x=[0,v.height],w=nc(x,h?[r,n]:[n,r]);return d.current=v,w(p-v.top)}return g.jsx(Pm,{scope:e.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:g.jsx(Om,{"data-orientation":"vertical",...i,ref:f,style:{...i.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:p=>{const v=m(p.clientY);s==null||s(v)},onSlideMove:p=>{const v=m(p.clientY);c==null||c(v)},onSlideEnd:()=>{d.current=void 0,u==null||u()},onStepKeyDown:p=>{const x=_m[h?"from-bottom":"from-top"].includes(p.key);l==null||l({event:p,direction:x?-1:1})}})})}),Om=y.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:s,onHomeKeyDown:c,onEndKeyDown:u,onStepKeyDown:l,...i}=e,a=Pi(Sn,n);return g.jsx(z.span,{...i,ref:t,onKeyDown:$(e.onKeyDown,f=>{f.key==="Home"?(c(f),f.preventDefault()):f.key==="End"?(u(f),f.preventDefault()):Sm.concat(Cm).includes(f.key)&&(l(f),f.preventDefault())}),onPointerDown:$(e.onPointerDown,f=>{const d=f.target;d.setPointerCapture(f.pointerId),f.preventDefault(),a.thumbs.has(d)?d.focus():r(f)}),onPointerMove:$(e.onPointerMove,f=>{f.target.hasPointerCapture(f.pointerId)&&o(f)}),onPointerUp:$(e.onPointerUp,f=>{const d=f.target;d.hasPointerCapture(f.pointerId)&&(d.releasePointerCapture(f.pointerId),s(f))})})}),Mm="SliderTrack",Im=y.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Pi(Mm,n);return g.jsx(z.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});Im.displayName=Mm;var $s="SliderRange",Dm=y.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Pi($s,n),s=Am($s,n),c=y.useRef(null),u=re(t,c),l=o.values.length,i=o.values.map(d=>km(d,o.min,o.max)),a=l>1?Math.min(...i):0,f=100-Math.max(...i);return g.jsx(z.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:u,style:{...e.style,[s.startEdge]:a+"%",[s.endEdge]:f+"%"}})});Dm.displayName=$s;var Us="SliderThumb",Nm=y.forwardRef((e,t)=>{const n=lS(e.__scopeSlider),[r,o]=y.useState(null),s=re(t,u=>o(u)),c=y.useMemo(()=>r?n().findIndex(u=>u.ref.current===r):-1,[n,r]);return g.jsx(pS,{...e,ref:s,index:c})}),pS=y.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...s}=e,c=Pi(Us,n),u=Am(Us,n),[l,i]=y.useState(null),a=re(t,b=>i(b)),f=l?c.form||!!l.closest("form"):!0,d=ur(l),h=c.values[r],m=h===void 0?0:km(h,c.min,c.max),p=vS(r,c.values.length),v=d==null?void 0:d[u.size],x=v?xS(v,m,u.direction):0;return y.useEffect(()=>{if(l)return c.thumbs.add(l),()=>{c.thumbs.delete(l)}},[l,c.thumbs]),g.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[u.startEdge]:`calc(${m}% + ${x}px)`},children:[g.jsx(Bs.ItemSlot,{scope:e.__scopeSlider,children:g.jsx(z.span,{role:"slider","aria-label":e["aria-label"]||p,"aria-valuemin":c.min,"aria-valuenow":h,"aria-valuemax":c.max,"aria-orientation":c.orientation,"data-orientation":c.orientation,"data-disabled":c.disabled?"":void 0,tabIndex:c.disabled?void 0:0,...s,ref:a,style:h===void 0?{display:"none"}:e.style,onFocus:$(e.onFocus,()=>{c.valueIndexToChangeRef.current=r})})}),f&&g.jsx(jm,{name:o??(c.name?c.name+(c.values.length>1?"[]":""):void 0),form:c.form,value:h},r)]})});Nm.displayName=Us;var mS="RadioBubbleInput",jm=y.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=y.useRef(null),s=re(o,r),c=lr(t);return y.useEffect(()=>{const u=o.current;if(!u)return;const l=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(l,"value").set;if(c!==t&&a){const f=new Event("input",{bubbles:!0});a.call(u,t),u.dispatchEvent(f)}},[c,t]),g.jsx(z.input,{style:{display:"none"},...n,ref:s,defaultValue:t})});jm.displayName=mS;function gS(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,s)=>o-s)}function km(e,t,n){const s=100/(n-t)*(e-t);return zo(s,[0,100])}function vS(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function yS(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function xS(e,t,n){const r=e/2,s=nc([0,50],[0,r]);return(r-s(t)*n)*n}function bS(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function wS(e,t){if(t>0){const n=bS(e);return Math.min(...n)>=t}return!0}function nc(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function ES(e){return(String(e).split(".")[1]||"").length}function SS(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var CS=Tm,_S=Im,RS=Dm,TS=Nm,Ai="Switch",[PS]=Ce(Ai),[AS,OS]=PS(Ai),Lm=y.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:s,required:c,disabled:u,value:l="on",onCheckedChange:i,form:a,...f}=e,[d,h]=y.useState(null),m=re(t,w=>h(w)),p=y.useRef(!1),v=d?a||!!d.closest("form"):!0,[x,b]=Ne({prop:o,defaultProp:s??!1,onChange:i,caller:Ai});return g.jsxs(AS,{scope:n,checked:x,disabled:u,children:[g.jsx(z.button,{type:"button",role:"switch","aria-checked":x,"aria-required":c,"data-state":$m(x),"data-disabled":u?"":void 0,disabled:u,value:l,...f,ref:m,onClick:$(e.onClick,w=>{b(E=>!E),v&&(p.current=w.isPropagationStopped(),p.current||w.stopPropagation())})}),v&&g.jsx(Bm,{control:d,bubbles:!p.current,name:r,value:l,checked:x,required:c,disabled:u,form:a,style:{transform:"translateX(-100%)"}})]})});Lm.displayName=Ai;var Fm="SwitchThumb",Vm=y.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=OS(Fm,n);return g.jsx(z.span,{"data-state":$m(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});Vm.displayName=Fm;var MS="SwitchBubbleInput",Bm=y.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const c=y.useRef(null),u=re(c,s),l=lr(n),i=ur(t);return y.useEffect(()=>{const a=c.current;if(!a)return;const f=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&h){const m=new Event("click",{bubbles:r});h.call(a,n),a.dispatchEvent(m)}},[l,n,r]),g.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:u,style:{...o.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Bm.displayName=MS;function $m(e){return e?"checked":"unchecked"}var IS=Lm,DS=Vm,[Oi]=Ce("Tooltip",[Pt]),Mi=Pt(),Um="TooltipProvider",NS=700,Gs="tooltip.open",[jS,rc]=Oi(Um),Gm=e=>{const{__scopeTooltip:t,delayDuration:n=NS,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,c=y.useRef(!0),u=y.useRef(!1),l=y.useRef(0);return y.useEffect(()=>{const i=l.current;return()=>window.clearTimeout(i)},[]),g.jsx(jS,{scope:t,isOpenDelayedRef:c,delayDuration:n,onOpen:y.useCallback(()=>{window.clearTimeout(l.current),c.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>c.current=!0,r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:y.useCallback(i=>{u.current=i},[]),disableHoverableContent:o,children:s})};Gm.displayName=Um;var Jn="Tooltip",[kS,xr]=Oi(Jn),Hm=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:c,delayDuration:u}=e,l=rc(Jn,e.__scopeTooltip),i=Mi(t),[a,f]=y.useState(null),d=Pe(),h=y.useRef(0),m=c??l.disableHoverableContent,p=u??l.delayDuration,v=y.useRef(!1),[x,b]=Ne({prop:r,defaultProp:o??!1,onChange:P=>{P?(l.onOpen(),document.dispatchEvent(new CustomEvent(Gs))):l.onClose(),s==null||s(P)},caller:Jn}),w=y.useMemo(()=>x?v.current?"delayed-open":"instant-open":"closed",[x]),E=y.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,b(!0)},[b]),S=y.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b(!1)},[b]),T=y.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,b(!0),h.current=0},p)},[p,b]);return y.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),g.jsx(gi,{...i,children:g.jsx(kS,{scope:t,contentId:d,open:x,stateAttribute:w,trigger:a,onTriggerChange:f,onTriggerEnter:y.useCallback(()=>{l.isOpenDelayedRef.current?T():E()},[l.isOpenDelayedRef,T,E]),onTriggerLeave:y.useCallback(()=>{m?S():(window.clearTimeout(h.current),h.current=0)},[S,m]),onOpen:E,onClose:S,disableHoverableContent:m,children:n})})};Hm.displayName=Jn;var Hs="TooltipTrigger",zm=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=xr(Hs,n),s=rc(Hs,n),c=Mi(n),u=y.useRef(null),l=re(t,u,o.onTriggerChange),i=y.useRef(!1),a=y.useRef(!1),f=y.useCallback(()=>i.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),g.jsx(dr,{asChild:!0,...c,children:g.jsx(z.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:$(e.onPointerMove,d=>{d.pointerType!=="touch"&&!a.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),a.current=!0)}),onPointerLeave:$(e.onPointerLeave,()=>{o.onTriggerLeave(),a.current=!1}),onPointerDown:$(e.onPointerDown,()=>{o.open&&o.onClose(),i.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:$(e.onFocus,()=>{i.current||o.onOpen()}),onBlur:$(e.onBlur,o.onClose),onClick:$(e.onClick,o.onClose)})})});zm.displayName=Hs;var oc="TooltipPortal",[LS,FS]=Oi(oc,{forceMount:void 0}),Wm=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=xr(oc,t);return g.jsx(LS,{scope:t,forceMount:n,children:g.jsx(je,{present:n||s.open,children:g.jsx(ar,{asChild:!0,container:o,children:r})})})};Wm.displayName=oc;var mn="TooltipContent",qm=y.forwardRef((e,t)=>{const n=FS(mn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,c=xr(mn,e.__scopeTooltip);return g.jsx(je,{present:r||c.open,children:c.disableHoverableContent?g.jsx(Km,{side:o,...s,ref:t}):g.jsx(VS,{side:o,...s,ref:t})})}),VS=y.forwardRef((e,t)=>{const n=xr(mn,e.__scopeTooltip),r=rc(mn,e.__scopeTooltip),o=y.useRef(null),s=re(t,o),[c,u]=y.useState(null),{trigger:l,onClose:i}=n,a=o.current,{onPointerInTransitChange:f}=r,d=y.useCallback(()=>{u(null),f(!1)},[f]),h=y.useCallback((m,p)=>{const v=m.currentTarget,x={x:m.clientX,y:m.clientY},b=GS(x,v.getBoundingClientRect()),w=HS(x,b),E=zS(p.getBoundingClientRect()),S=qS([...w,...E]);u(S),f(!0)},[f]);return y.useEffect(()=>()=>d(),[d]),y.useEffect(()=>{if(l&&a){const m=v=>h(v,a),p=v=>h(v,l);return l.addEventListener("pointerleave",m),a.addEventListener("pointerleave",p),()=>{l.removeEventListener("pointerleave",m),a.removeEventListener("pointerleave",p)}}},[l,a,h,d]),y.useEffect(()=>{if(c){const m=p=>{const v=p.target,x={x:p.clientX,y:p.clientY},b=(l==null?void 0:l.contains(v))||(a==null?void 0:a.contains(v)),w=!WS(x,c);b?d():w&&(d(),i())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[l,a,c,i,d]),g.jsx(Km,{...e,ref:s})}),[BS,$S]=Oi(Jn,{isInside:!1}),US=vy("TooltipContent"),Km=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:c,...u}=e,l=xr(mn,n),i=Mi(n),{onClose:a}=l;return y.useEffect(()=>(document.addEventListener(Gs,a),()=>document.removeEventListener(Gs,a)),[a]),y.useEffect(()=>{if(l.trigger){const f=d=>{const h=d.target;h!=null&&h.contains(l.trigger)&&a()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,a]),g.jsx(xn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:f=>f.preventDefault(),onDismiss:a,children:g.jsxs(vi,{"data-state":l.stateAttribute,...i,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx(US,{children:r}),g.jsx(BS,{scope:n,isInside:!0,children:g.jsx(Sy,{id:l.contentId,role:"tooltip",children:o||r})})]})})});qm.displayName=mn;var Ym="TooltipArrow",Xm=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Mi(n);return $S(Ym,n).isInside?null:g.jsx(yi,{...o,...r,ref:t})});Xm.displayName=Ym;function GS(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function HS(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function zS(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function WS(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,c=t.length-1;s<t.length;c=s++){const u=t[s],l=t[c],i=u.x,a=u.y,f=l.x,d=l.y;a>r!=d>r&&n<(f-i)*(r-a)/(d-a)+i&&(o=!o)}return o}function qS(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),KS(t)}function KS(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],c=t[t.length-2];if((s.x-c.x)*(o.y-c.y)>=(s.y-c.y)*(o.x-c.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],c=n[n.length-2];if((s.x-c.x)*(o.y-c.y)>=(s.y-c.y)*(o.x-c.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var YS=Gm,XS=Hm,ZS=zm,QS=Wm,JS=qm,eC=Xm;const tC=_.forwardRef(({children:e,className:t,...n},r)=>g.jsx(Zy,{className:j.classNames("overflow-hidden rounded-xl shadow-(--box-shadow-accordion)",t),ref:r,...n,children:e})),nC=_.forwardRef(({children:e,className:t,triggerIcon:n,...r},o)=>g.jsx(Qy,{className:"flex",children:g.jsxs(Jy,{className:j.classNames("group flex h-14 flex-1 cursor-pointer items-center justify-between px-6 text-[15px] leading-none bg-white space-x-2",t),ref:o,...r,children:[e,n??g.jsx(ce.SvgArrowMp,{className:"size-3 shrink-0 transition-transform duration-300 ease-in-out group-data-[state=open]:rotate-180 fill-primary-blue"})]})})),ic=_.createContext({});function sc(e){const t=_.useRef(null);return t.current===null&&(t.current=e()),t.current}const Zm=typeof window<"u",Qm=Zm?_.useLayoutEffect:_.useEffect,Ii=_.createContext(null);function ac(e,t){e.indexOf(t)===-1&&e.push(t)}function cc(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ct=(e,t,n)=>n>t?t:n<e?e:n;function zs(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Cn=()=>{},mt=()=>{};var id;typeof process<"u"&&((id=process.env)==null?void 0:id.NODE_ENV)!=="production"&&(Cn=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(zs(t,n))},mt=(e,t,n)=>{if(!e)throw new Error(zs(t,n))});const gt={},Jm=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function eg(e){return typeof e=="object"&&e!==null}const tg=e=>/^0[^.\s]+$/u.test(e);function lc(e){let t;return()=>(t===void 0&&(t=e()),t)}const ze=e=>e,rC=(e,t)=>n=>t(e(n)),br=(...e)=>e.reduce(rC),er=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class uc{constructor(){this.subscriptions=[]}add(t){return ac(this.subscriptions,t),()=>cc(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const c=this.subscriptions[s];c&&c(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const it=e=>e*1e3,Ge=e=>e/1e3;function ng(e,t){return t?e*(1e3/t):0}const El=new Set;function fc(e,t,n){e||El.has(t)||(console.warn(zs(t,n)),El.add(t))}const rg=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,oC=1e-7,iC=12;function sC(e,t,n,r,o){let s,c,u=0;do c=t+(n-t)/2,s=rg(c,r,o)-e,s>0?n=c:t=c;while(Math.abs(s)>oC&&++u<iC);return c}function wr(e,t,n,r){if(e===t&&n===r)return ze;const o=s=>sC(s,0,1,e,n);return s=>s===0||s===1?s:rg(o(s),t,r)}const og=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ig=e=>t=>1-e(1-t),sg=wr(.33,1.53,.69,.99),dc=ig(sg),ag=og(dc),cg=e=>(e*=2)<1?.5*dc(e):.5*(2-Math.pow(2,-10*(e-1))),hc=e=>1-Math.sin(Math.acos(e)),lg=ig(hc),ug=og(hc),aC=wr(.42,0,1,1),cC=wr(0,0,.58,1),fg=wr(.42,0,.58,1),lC=e=>Array.isArray(e)&&typeof e[0]!="number",dg=e=>Array.isArray(e)&&typeof e[0]=="number",Sl={linear:ze,easeIn:aC,easeInOut:fg,easeOut:cC,circIn:hc,circInOut:ug,circOut:lg,backIn:dc,backInOut:ag,backOut:sg,anticipate:cg},uC=e=>typeof e=="string",Cl=e=>{if(dg(e)){mt(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return wr(t,n,r,o)}else if(uC(e))return mt(Sl[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Sl[e];return e},Fr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function fC(e,t){let n=new Set,r=new Set,o=!1,s=!1;const c=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function l(a){c.has(a)&&(i.schedule(a),e()),a(u)}const i={schedule:(a,f=!1,d=!1)=>{const m=d&&o?n:r;return f&&c.add(a),m.has(a)||m.add(a),a},cancel:a=>{r.delete(a),c.delete(a)},process:a=>{if(u=a,o){s=!0;return}o=!0,[n,r]=[r,n],n.forEach(l),n.clear(),o=!1,s&&(s=!1,i.process(a))}};return i}const dC=40;function hg(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,c=Fr.reduce((w,E)=>(w[E]=fC(s),w),{}),{setup:u,read:l,resolveKeyframes:i,preUpdate:a,update:f,preRender:d,render:h,postRender:m}=c,p=()=>{const w=gt.useManualTiming?o.timestamp:performance.now();n=!1,gt.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(w-o.timestamp,dC),1)),o.timestamp=w,o.isProcessing=!0,u.process(o),l.process(o),i.process(o),a.process(o),f.process(o),d.process(o),h.process(o),m.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(p))},v=()=>{n=!0,r=!0,o.isProcessing||e(p)};return{schedule:Fr.reduce((w,E)=>{const S=c[E];return w[E]=(T,P=!1,A=!1)=>(n||v(),S.schedule(T,P,A)),w},{}),cancel:w=>{for(let E=0;E<Fr.length;E++)c[Fr[E]].cancel(w)},state:o,steps:c}}const{schedule:pe,cancel:Rt,state:_e,steps:Ji}=hg(typeof requestAnimationFrame<"u"?requestAnimationFrame:ze,!0);let Do;function hC(){Do=void 0}const Me={now:()=>(Do===void 0&&Me.set(_e.isProcessing||gt.useManualTiming?_e.timestamp:performance.now()),Do),set:e=>{Do=e,queueMicrotask(hC)}},pg=e=>t=>typeof t=="string"&&t.startsWith(e),mg=pg("--"),pC=pg("var(--"),pc=e=>pC(e)?mC.test(e.split("/*")[0].trim()):!1,mC=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function _l(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const _n={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},tr={..._n,transform:e=>ct(0,1,e)},Vr={..._n,default:1},zn=e=>Math.round(e*1e5)/1e5,mc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function gC(e){return e==null}const vC=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,gc=(e,t)=>n=>!!(typeof n=="string"&&vC.test(n)&&n.startsWith(e)||t&&!gC(n)&&Object.prototype.hasOwnProperty.call(n,t)),gg=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,c,u]=r.match(mc);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(c),alpha:u!==void 0?parseFloat(u):1}},yC=e=>ct(0,255,e),es={..._n,transform:e=>Math.round(yC(e))},Vt={test:gc("rgb","red"),parse:gg("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+es.transform(e)+", "+es.transform(t)+", "+es.transform(n)+", "+zn(tr.transform(r))+")"};function xC(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Ws={test:gc("#"),parse:xC,transform:Vt.transform},Er=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),bt=Er("deg"),st=Er("%"),Y=Er("px"),bC=Er("vh"),wC=Er("vw"),Rl={...st,parse:e=>st.parse(e)/100,transform:e=>st.transform(e*100)},rn={test:gc("hsl","hue"),parse:gg("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+st.transform(zn(t))+", "+st.transform(zn(n))+", "+zn(tr.transform(r))+")"},be={test:e=>Vt.test(e)||Ws.test(e)||rn.test(e),parse:e=>Vt.test(e)?Vt.parse(e):rn.test(e)?rn.parse(e):Ws.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Vt.transform(e):rn.transform(e),getAnimatableNone:e=>{const t=be.parse(e);return t.alpha=0,be.transform(t)}},EC=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function SC(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(mc))==null?void 0:t.length)||0)+(((n=e.match(EC))==null?void 0:n.length)||0)>0}const vg="number",yg="color",CC="var",_C="var(",Tl="${}",RC=/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 nr(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const u=t.replace(RC,l=>(be.test(l)?(r.color.push(s),o.push(yg),n.push(be.parse(l))):l.startsWith(_C)?(r.var.push(s),o.push(CC),n.push(l)):(r.number.push(s),o.push(vg),n.push(parseFloat(l))),++s,Tl)).split(Tl);return{values:n,split:u,indexes:r,types:o}}function xg(e){return nr(e).values}function bg(e){const{split:t,types:n}=nr(e),r=t.length;return o=>{let s="";for(let c=0;c<r;c++)if(s+=t[c],o[c]!==void 0){const u=n[c];u===vg?s+=zn(o[c]):u===yg?s+=be.transform(o[c]):s+=o[c]}return s}}const TC=e=>typeof e=="number"?0:be.test(e)?be.getAnimatableNone(e):e;function PC(e){const t=xg(e);return bg(e)(t.map(TC))}const Tt={test:SC,parse:xg,createTransformer:bg,getAnimatableNone:PC};function ts(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 AC({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,c=0;if(!t)o=s=c=n;else{const u=n<.5?n*(1+t):n+t-n*t,l=2*n-u;o=ts(l,u,e+1/3),s=ts(l,u,e),c=ts(l,u,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(c*255),alpha:r}}function Ko(e,t){return n=>n>0?t:e}const ve=(e,t,n)=>e+(t-e)*n,ns=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},OC=[Ws,Vt,rn],MC=e=>OC.find(t=>t.test(e));function Pl(e){const t=MC(e);if(Cn(!!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===rn&&(n=AC(n)),n}const Al=(e,t)=>{const n=Pl(e),r=Pl(t);if(!n||!r)return Ko(e,t);const o={...n};return s=>(o.red=ns(n.red,r.red,s),o.green=ns(n.green,r.green,s),o.blue=ns(n.blue,r.blue,s),o.alpha=ve(n.alpha,r.alpha,s),Vt.transform(o))},qs=new Set(["none","hidden"]);function IC(e,t){return qs.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function DC(e,t){return n=>ve(e,t,n)}function vc(e){return typeof e=="number"?DC:typeof e=="string"?pc(e)?Ko:be.test(e)?Al:kC:Array.isArray(e)?wg:typeof e=="object"?be.test(e)?Al:NC:Ko}function wg(e,t){const n=[...e],r=n.length,o=e.map((s,c)=>vc(s)(s,t[c]));return s=>{for(let c=0;c<r;c++)n[c]=o[c](s);return n}}function NC(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=vc(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function jC(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],c=e.indexes[s][r[s]],u=e.values[c]??0;n[o]=u,r[s]++}return n}const kC=(e,t)=>{const n=Tt.createTransformer(t),r=nr(e),o=nr(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?qs.has(e)&&!o.values.length||qs.has(t)&&!r.values.length?IC(e,t):br(wg(jC(r,o),o.values),n):(Cn(!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"),Ko(e,t))};function Eg(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ve(e,t,n):vc(e)(e,t)}const LC=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>pe.update(t,n),stop:()=>Rt(t),now:()=>_e.isProcessing?_e.timestamp:Me.now()}},Sg=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=Math.round(e(s/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Yo=2e4;function yc(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Yo;)t+=n,r=e.next(t);return t>=Yo?1/0:t}function FC(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(yc(r),Yo);return{type:"keyframes",ease:s=>r.next(o*s).value/t,duration:Ge(o)}}const VC=5;function Cg(e,t,n){const r=Math.max(t-VC,0);return ng(n-e(r),t-r)}const ge={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},rs=.001;function BC({duration:e=ge.duration,bounce:t=ge.bounce,velocity:n=ge.velocity,mass:r=ge.mass}){let o,s;Cn(e<=it(ge.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let c=1-t;c=ct(ge.minDamping,ge.maxDamping,c),e=ct(ge.minDuration,ge.maxDuration,Ge(e)),c<1?(o=i=>{const a=i*c,f=a*e,d=a-n,h=Ks(i,c),m=Math.exp(-f);return rs-d/h*m},s=i=>{const f=i*c*e,d=f*n+n,h=Math.pow(c,2)*Math.pow(i,2)*e,m=Math.exp(-f),p=Ks(Math.pow(i,2),c);return(-o(i)+rs>0?-1:1)*((d-h)*m)/p}):(o=i=>{const a=Math.exp(-i*e),f=(i-n)*e+1;return-rs+a*f},s=i=>{const a=Math.exp(-i*e),f=(n-i)*(e*e);return a*f});const u=5/e,l=UC(o,s,u);if(e=it(e),isNaN(l))return{stiffness:ge.stiffness,damping:ge.damping,duration:e};{const i=Math.pow(l,2)*r;return{stiffness:i,damping:c*2*Math.sqrt(r*i),duration:e}}}const $C=12;function UC(e,t,n){let r=n;for(let o=1;o<$C;o++)r=r-e(r)/t(r);return r}function Ks(e,t){return e*Math.sqrt(1-t*t)}const GC=["duration","bounce"],HC=["stiffness","damping","mass"];function Ol(e,t){return t.some(n=>e[n]!==void 0)}function zC(e){let t={velocity:ge.velocity,stiffness:ge.stiffness,damping:ge.damping,mass:ge.mass,isResolvedFromDuration:!1,...e};if(!Ol(e,HC)&&Ol(e,GC))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*ct(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:ge.mass,stiffness:o,damping:s}}else{const n=BC(e);t={...t,...n,mass:ge.mass},t.isResolvedFromDuration=!0}return t}function Xo(e=ge.visualDuration,t=ge.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],c=n.keyframes[n.keyframes.length-1],u={done:!1,value:s},{stiffness:l,damping:i,mass:a,duration:f,velocity:d,isResolvedFromDuration:h}=zC({...n,velocity:-Ge(n.velocity||0)}),m=d||0,p=i/(2*Math.sqrt(l*a)),v=c-s,x=Ge(Math.sqrt(l/a)),b=Math.abs(v)<5;r||(r=b?ge.restSpeed.granular:ge.restSpeed.default),o||(o=b?ge.restDelta.granular:ge.restDelta.default);let w;if(p<1){const S=Ks(x,p);w=T=>{const P=Math.exp(-p*x*T);return c-P*((m+p*x*v)/S*Math.sin(S*T)+v*Math.cos(S*T))}}else if(p===1)w=S=>c-Math.exp(-x*S)*(v+(m+x*v)*S);else{const S=x*Math.sqrt(p*p-1);w=T=>{const P=Math.exp(-p*x*T),A=Math.min(S*T,300);return c-P*((m+p*x*v)*Math.sinh(A)+S*v*Math.cosh(A))/S}}const E={calculatedDuration:h&&f||null,next:S=>{const T=w(S);if(h)u.done=S>=f;else{let P=S===0?m:0;p<1&&(P=S===0?it(m):Cg(w,S,T));const A=Math.abs(P)<=r,O=Math.abs(c-T)<=o;u.done=A&&O}return u.value=u.done?c:T,u},toString:()=>{const S=Math.min(yc(E),Yo),T=Sg(P=>E.next(S*P).value,S,30);return S+"ms "+T},toTransition:()=>{}};return E}Xo.applyToOptions=e=>{const t=FC(e,100,Xo);return e.ease=t.ease,e.duration=it(t.duration),e.type="keyframes",e};function Ys({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:c,min:u,max:l,restDelta:i=.5,restSpeed:a}){const f=e[0],d={done:!1,value:f},h=A=>u!==void 0&&A<u||l!==void 0&&A>l,m=A=>u===void 0?l:l===void 0||Math.abs(u-A)<Math.abs(l-A)?u:l;let p=n*t;const v=f+p,x=c===void 0?v:c(v);x!==v&&(p=x-f);const b=A=>-p*Math.exp(-A/r),w=A=>x+b(A),E=A=>{const O=b(A),R=w(A);d.done=Math.abs(O)<=i,d.value=d.done?x:R};let S,T;const P=A=>{h(d.value)&&(S=A,T=Xo({keyframes:[d.value,m(d.value)],velocity:Cg(w,A,d.value),damping:o,stiffness:s,restDelta:i,restSpeed:a}))};return P(0),{calculatedDuration:null,next:A=>{let O=!1;return!T&&S===void 0&&(O=!0,E(A),P(A)),S!==void 0&&A>=S?T.next(A-S):(!O&&E(A),d)}}}function WC(e,t,n){const r=[],o=n||gt.mix||Eg,s=e.length-1;for(let c=0;c<s;c++){let u=o(e[c],e[c+1]);if(t){const l=Array.isArray(t)?t[c]||ze:t;u=br(l,u)}r.push(u)}return r}function qC(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(mt(s===t.length,"Both input and output ranges must be the same length","range-length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const c=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const u=WC(t,r,o),l=u.length,i=a=>{if(c&&a<e[0])return t[0];let f=0;if(l>1)for(;f<e.length-2&&!(a<e[f+1]);f++);const d=er(e[f],e[f+1],a);return u[f](d)};return n?a=>i(ct(e[0],e[s-1],a)):i}function KC(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=er(0,t,r);e.push(ve(n,1,o))}}function YC(e){const t=[0];return KC(t,e.length-1),t}function XC(e,t){return e.map(n=>n*t)}function ZC(e,t){return e.map(()=>t||fg).splice(0,e.length-1)}function on({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=lC(r)?r.map(Cl):Cl(r),s={done:!1,value:t[0]},c=XC(n&&n.length===t.length?n:YC(t),e),u=qC(c,t,{ease:Array.isArray(o)?o:ZC(t,o)});return{calculatedDuration:e,next:l=>(s.value=u(l),s.done=l>=e,s)}}const QC=e=>e!==null;function xc(e,{repeat:t,repeatType:n="loop"},r,o=1){const s=e.filter(QC),u=o<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!u||r===void 0?s[u]:r}const JC={decay:Ys,inertia:Ys,tween:on,keyframes:on,spring:Xo};function _g(e){typeof e.type=="string"&&(e.type=JC[e.type])}class bc{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 e_=e=>e/100;class wc extends bc{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,o;const{motionValue:n}=this.options;n&&n.updatedAt!==Me.now()&&this.tick(Me.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(o=(r=this.options).onStop)==null||o.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;_g(t);const{type:n=on,repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:c=0}=t;let{keyframes:u}=t;const l=n||on;process.env.NODE_ENV!=="production"&&l!==on&&mt(u.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${u}`,"spring-two-frames"),l!==on&&typeof u[0]!="number"&&(this.mixKeyframes=br(e_,Eg(u[0],u[1])),u=[0,100]);const i=l({...t,keyframes:u});s==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...u].reverse(),velocity:-c})),i.calculatedDuration===null&&(i.calculatedDuration=yc(i));const{calculatedDuration:a}=i;this.calculatedDuration=a,this.resolvedDuration=a+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=i}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:o,mixKeyframes:s,mirroredGenerator:c,resolvedDuration:u,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:i=0,keyframes:a,repeat:f,repeatType:d,repeatDelay:h,type:m,onUpdate:p,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const x=this.currentTime-i*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?x<0:x>o;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let w=this.currentTime,E=r;if(f){const A=Math.min(this.currentTime,o)/u;let O=Math.floor(A),R=A%1;!R&&A>=1&&(R=1),R===1&&O--,O=Math.min(O,f+1),!!(O%2)&&(d==="reverse"?(R=1-R,h&&(R-=h/u)):d==="mirror"&&(E=c)),w=ct(0,1,R)*u}const S=b?{done:!1,value:a[0]}:E.next(w);s&&(S.value=s(S.value));let{done:T}=S;!b&&l!==null&&(T=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return P&&m!==Ys&&(S.value=xc(a,this.options,v,this.speed)),p&&p(S.value),P&&this.finish(),S}then(t,n){return this.finished.then(t,n)}get duration(){return Ge(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ge(t)}get time(){return Ge(this.currentTime)}set time(t){var n;t=it(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),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Me.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ge(this.currentTime))}play(){var o,s;if(this.isStopped)return;const{driver:t=LC,startTime:n}=this.options;this.driver||(this.driver=t(c=>this.tick(c))),(s=(o=this.options).onPlay)==null||s.call(o);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(Me.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function t_(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Bt=e=>e*180/Math.PI,Xs=e=>{const t=Bt(Math.atan2(e[1],e[0]));return Zs(t)},n_={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Xs,rotateZ:Xs,skewX:e=>Bt(Math.atan(e[1])),skewY:e=>Bt(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Zs=e=>(e=e%360,e<0&&(e+=360),e),Ml=Xs,Il=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Dl=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),r_={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Il,scaleY:Dl,scale:e=>(Il(e)+Dl(e))/2,rotateX:e=>Zs(Bt(Math.atan2(e[6],e[5]))),rotateY:e=>Zs(Bt(Math.atan2(-e[2],e[0]))),rotateZ:Ml,rotate:Ml,skewX:e=>Bt(Math.atan(e[4])),skewY:e=>Bt(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Qs(e){return e.includes("scale")?1:0}function Js(e,t){if(!e||e==="none")return Qs(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=r_,o=n;else{const u=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=n_,o=u}if(!o)return Qs(t);const s=r[t],c=o[1].split(",").map(i_);return typeof s=="function"?s(c):c[s]}const o_=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Js(n,t)};function i_(e){return parseFloat(e.trim())}const Rn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Tn=new Set(Rn),Nl=e=>e===_n||e===Y,s_=new Set(["x","y","z"]),a_=Rn.filter(e=>!s_.has(e));function c_(e){const t=[];return a_.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const wt={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})=>Js(t,"x"),y:(e,{transform:t})=>Js(t,"y")};wt.translateX=wt.x;wt.translateY=wt.y;const $t=new Set;let ea=!1,ta=!1,na=!1;function Rg(){if(ta){const e=Array.from($t).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=c_(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,c])=>{var u;(u=r.getValue(s))==null||u.set(c)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ta=!1,ea=!1,$t.forEach(e=>e.complete(na)),$t.clear()}function Tg(){$t.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ta=!0)})}function l_(){na=!0,Tg(),Rg(),na=!1}class Ec{constructor(t,n,r,o,s,c=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=c}scheduleResolve(){this.state="scheduled",this.isAsync?($t.add(this),ea||(ea=!0,pe.read(Tg),pe.resolveKeyframes(Rg))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const s=o==null?void 0:o.get(),c=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const u=r.readValue(n,c);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=c),o&&s===void 0&&o.set(t[0])}t_(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),$t.delete(this)}cancel(){this.state==="scheduled"&&($t.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const u_=e=>e.startsWith("--");function f_(e,t,n){u_(t)?e.style.setProperty(t,n):e.style[t]=n}const d_=lc(()=>window.ScrollTimeline!==void 0),h_={};function p_(e,t){const n=lc(e);return()=>h_[t]??n()}const Pg=p_(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Gn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,jl={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Gn([0,.65,.55,1]),circOut:Gn([.55,0,1,.45]),backIn:Gn([.31,.01,.66,-.59]),backOut:Gn([.33,1.53,.69,.99])};function Ag(e,t){if(e)return typeof e=="function"?Pg()?Sg(e,t):"ease-out":dg(e)?Gn(e):Array.isArray(e)?e.map(n=>Ag(n,t)||jl.easeOut):jl[e]}function m_(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:c="loop",ease:u="easeOut",times:l}={},i=void 0){const a={[t]:n};l&&(a.offset=l);const f=Ag(u,o);Array.isArray(f)&&(a.easing=f);const d={delay:r,duration:o,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:s+1,direction:c==="reverse"?"alternate":"normal"};return i&&(d.pseudoElement=i),e.animate(a,d)}function Og(e){return typeof e=="function"&&"applyToOptions"in e}function g_({type:e,...t}){return Og(e)&&Pg()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class v_ extends bc{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:s,allowFlatten:c=!1,finalKeyframe:u,onComplete:l}=t;this.isPseudoElement=!!s,this.allowFlatten=c,this.options=t,mt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const i=g_(t);this.animation=m_(n,r,o,i,s),i.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const a=xc(o,this.options,u,this.speed);this.updateMotionValue?this.updateMotionValue(a):f_(n,r,a),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Ge(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ge(t)}get time(){return Ge(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=it(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 this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&d_()?(this.animation.timeline=t,ze):n(this)}}const Mg={anticipate:cg,backInOut:ag,circInOut:ug};function y_(e){return e in Mg}function x_(e){typeof e.ease=="string"&&y_(e.ease)&&(e.ease=Mg[e.ease])}const os=10;class b_ extends v_{constructor(t){x_(t),_g(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:s,...c}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const u=new wc({...c,autoplay:!1}),l=Math.max(os,Me.now()-this.startTime),i=ct(0,os,l-os);n.setWithVelocity(u.sample(Math.max(0,l-i)).value,u.sample(l).value,i),u.stop()}}const kl=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Tt.test(e)||e==="0")&&!e.startsWith("url("));function w_(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 E_(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],c=kl(o,t),u=kl(s,t);return Cn(c===u,`You are trying to animate ${t} from "${o}" to "${s}". "${c?s:o}" is not an animatable value.`,"value-not-animatable"),!c||!u?!1:w_(e)||(n==="spring"||Og(n))&&r}function ra(e){e.duration=0,e.type="keyframes"}const S_=new Set(["opacity","clipPath","filter","transform"]),C_=lc(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function __(e){var a;const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:s,type:c}=e;if(!(((a=t==null?void 0:t.owner)==null?void 0:a.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:i}=t.owner.getProps();return C_()&&n&&S_.has(n)&&(n!=="transform"||!i)&&!l&&!r&&o!=="mirror"&&s!==0&&c!=="inertia"}const R_=40;class T_ extends bc{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:c="loop",keyframes:u,name:l,motionValue:i,element:a,...f}){var m;super(),this.stop=()=>{var p,v;this._animation&&(this._animation.stop(),(p=this.stopTimeline)==null||p.call(this)),(v=this.keyframeResolver)==null||v.cancel()},this.createdAt=Me.now();const d={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:c,name:l,motionValue:i,element:a,...f},h=(a==null?void 0:a.KeyframeResolver)||Ec;this.keyframeResolver=new h(u,(p,v,x)=>this.onKeyframesResolved(p,v,d,!x),l,i,a),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(t,n,r,o){var v,x;this.keyframeResolver=void 0;const{name:s,type:c,velocity:u,delay:l,isHandoff:i,onUpdate:a}=r;this.resolvedAt=Me.now(),E_(t,s,c,u)||((gt.instantAnimations||!l)&&(a==null||a(xc(t,r,n))),t[0]=t[t.length-1],ra(r),r.repeat=0);const d={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>R_?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},h=!i&&__(d),m=(x=(v=d.motionValue)==null?void 0:v.owner)==null?void 0:x.current,p=h?new b_({...d,element:m}):new wc(d);p.finished.then(()=>{this.notifyFinished()}).catch(ze),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),l_()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function Ig(e,t,n,r=0,o=1){const s=Array.from(e).sort((i,a)=>i.sortNodePosition(a)).indexOf(t),c=e.size,u=(c-1)*r;return typeof n=="function"?n(s,c):o===1?s*r:u-s*r}const P_=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function A_(e){const t=P_.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const O_=4;function Dg(e,t,n=1){mt(n<=O_,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=A_(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const c=s.trim();return Jm(c)?parseFloat(c):c}return pc(o)?Dg(o,t,n+1):o}const M_={type:"spring",stiffness:500,damping:25,restSpeed:10},I_=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),D_={type:"keyframes",duration:.8},N_={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},j_=(e,{keyframes:t})=>t.length>2?D_:Tn.has(e)?e.startsWith("scale")?I_(t[1]):M_:N_,k_=e=>e!==null;function L_(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(k_),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[s]}function Sc(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}function F_({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:c,repeatDelay:u,from:l,elapsed:i,...a}){return!!Object.keys(a).length}const Cc=(e,t,n,r={},o,s)=>c=>{const u=Sc(r,e)||{},l=u.delay||r.delay||0;let{elapsed:i=0}=r;i=i-it(l);const a={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...u,delay:-i,onUpdate:d=>{t.set(d),u.onUpdate&&u.onUpdate(d)},onComplete:()=>{c(),u.onComplete&&u.onComplete()},name:e,motionValue:t,element:s?void 0:o};F_(u)||Object.assign(a,j_(e,a)),a.duration&&(a.duration=it(a.duration)),a.repeatDelay&&(a.repeatDelay=it(a.repeatDelay)),a.from!==void 0&&(a.keyframes[0]=a.from);let f=!1;if((a.type===!1||a.duration===0&&!a.repeatDelay)&&(ra(a),a.delay===0&&(f=!0)),(gt.instantAnimations||gt.skipAnimations)&&(f=!0,ra(a),a.delay=0),a.allowFlatten=!u.type&&!u.ease,f&&!s&&t.get()!==void 0){const d=L_(a.keyframes,u);if(d!==void 0){pe.update(()=>{a.onUpdate(d),a.onComplete()});return}}return u.isSync?new wc(a):new T_(a)};function Ll(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function _c(e,t,n,r){if(typeof t=="function"){const[o,s]=Ll(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=Ll(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function dn(e,t,n){const r=e.getProps();return _c(r,t,n!==void 0?n:r.custom,e)}const Ng=new Set(["width","height","top","left","right","bottom",...Rn]),Fl=30,V_=e=>!isNaN(parseFloat(e));class B_{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;const o=Me.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const c of this.dependents)c.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Me.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=V_(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&fc(!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 uc);const r=this.events[t].add(n);return t==="change"?()=>{r(),pe.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(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Me.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Fl)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Fl);return ng(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function gn(e,t){return new B_(e,t)}const oa=e=>Array.isArray(e);function $_(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,gn(n))}function U_(e){return oa(e)?e[e.length-1]||0:e}function G_(e,t){const n=dn(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const c in s){const u=U_(s[c]);$_(e,c,u)}}const Te=e=>!!(e&&e.getVelocity);function H_(e){return!!(Te(e)&&e.add)}function ia(e,t){const n=e.getValue("willChange");if(H_(n))return n.add(t);if(!n&&gt.WillChange){const r=new gt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Rc(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const z_="framerAppearId",jg="data-"+Rc(z_);function kg(e){return e.props[jg]}function W_({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Lg(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:c,...u}=t;const l=s==null?void 0:s.reduceMotion;r&&(s=r);const i=[],a=o&&e.animationState&&e.animationState.getState()[o];for(const f in u){const d=e.getValue(f,e.latestValues[f]??null),h=u[f];if(h===void 0||a&&W_(a,f))continue;const m={delay:n,...Sc(s||{},f)},p=d.get();if(p!==void 0&&!d.isAnimating&&!Array.isArray(h)&&h===p&&!m.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const w=kg(e);if(w){const E=window.MotionHandoffAnimation(w,f,pe);E!==null&&(m.startTime=E,v=!0)}}ia(e,f);const x=l??e.shouldReduceMotion;d.start(Cc(f,d,h,x&&Ng.has(f)?{type:!1}:m,e,v));const b=d.animation;b&&i.push(b)}return c&&Promise.all(i).then(()=>{pe.update(()=>{c&&G_(e,c)})}),i}function sa(e,t,n={}){var l;const r=dn(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all(Lg(e,r,n)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(i=0)=>{const{delayChildren:a=0,staggerChildren:f,staggerDirection:d}=o;return q_(e,t,i,a,f,d,n)}:()=>Promise.resolve(),{when:u}=o;if(u){const[i,a]=u==="beforeChildren"?[s,c]:[c,s];return i().then(()=>a())}else return Promise.all([s(),c(n.delay)])}function q_(e,t,n=0,r=0,o=0,s=1,c){const u=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),u.push(sa(l,t,{...c,delay:n+(typeof r=="function"?0:r)+Ig(e.variantChildren,l,r,o,s)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(u)}function K_(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>sa(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=sa(e,t,n);else{const o=typeof t=="function"?dn(e,t,n.custom):t;r=Promise.all(Lg(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const Y_={test:e=>e==="auto",parse:e=>e},Fg=e=>t=>t.test(e),Vg=[_n,Y,st,bt,wC,bC,Y_],Vl=e=>Vg.find(Fg(e));function X_(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||tg(e):!0}const Z_=new Set(["brightness","contrast","saturate","opacity"]);function Q_(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(mc)||[];if(!r)return e;const o=n.replace(r,"");let s=Z_.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const J_=/\b([a-z-]*)\(.*?\)/gu,aa={...Tt,getAnimatableNone:e=>{const t=e.match(J_);return t?t.map(Q_).join(" "):e}},Bl={..._n,transform:Math.round},eR={rotate:bt,rotateX:bt,rotateY:bt,rotateZ:bt,scale:Vr,scaleX:Vr,scaleY:Vr,scaleZ:Vr,skew:bt,skewX:bt,skewY:bt,distance:Y,translateX:Y,translateY:Y,translateZ:Y,x:Y,y:Y,z:Y,perspective:Y,transformPerspective:Y,opacity:tr,originX:Rl,originY:Rl,originZ:Y},Tc={borderWidth:Y,borderTopWidth:Y,borderRightWidth:Y,borderBottomWidth:Y,borderLeftWidth:Y,borderRadius:Y,borderTopLeftRadius:Y,borderTopRightRadius:Y,borderBottomRightRadius:Y,borderBottomLeftRadius:Y,width:Y,maxWidth:Y,height:Y,maxHeight:Y,top:Y,right:Y,bottom:Y,left:Y,inset:Y,insetBlock:Y,insetBlockStart:Y,insetBlockEnd:Y,insetInline:Y,insetInlineStart:Y,insetInlineEnd:Y,padding:Y,paddingTop:Y,paddingRight:Y,paddingBottom:Y,paddingLeft:Y,paddingBlock:Y,paddingBlockStart:Y,paddingBlockEnd:Y,paddingInline:Y,paddingInlineStart:Y,paddingInlineEnd:Y,margin:Y,marginTop:Y,marginRight:Y,marginBottom:Y,marginLeft:Y,marginBlock:Y,marginBlockStart:Y,marginBlockEnd:Y,marginInline:Y,marginInlineStart:Y,marginInlineEnd:Y,fontSize:Y,backgroundPositionX:Y,backgroundPositionY:Y,...eR,zIndex:Bl,fillOpacity:tr,strokeOpacity:tr,numOctaves:Bl},tR={...Tc,color:be,backgroundColor:be,outlineColor:be,fill:be,stroke:be,borderColor:be,borderTopColor:be,borderRightColor:be,borderBottomColor:be,borderLeftColor:be,filter:aa,WebkitFilter:aa},Bg=e=>tR[e];function $g(e,t){let n=Bg(e);return n!==aa&&(n=Tt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const nR=new Set(["auto","none","0"]);function rR(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!nR.has(s)&&nr(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=$g(n,o)}class oR extends Ec{constructor(t,n,r,o,s){super(t,n,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let a=0;a<t.length;a++){let f=t[a];if(typeof f=="string"&&(f=f.trim(),pc(f))){const d=Dg(f,n.current);d!==void 0&&(t[a]=d),a===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!Ng.has(r)||t.length!==2)return;const[o,s]=t,c=Vl(o),u=Vl(s),l=_l(o),i=_l(s);if(l!==i&&wt[r]){this.needsMeasurement=!0;return}if(c!==u)if(Nl(c)&&Nl(u))for(let a=0;a<t.length;a++){const f=t[a];typeof f=="string"&&(t[a]=parseFloat(f))}else wt[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||X_(t[o]))&&r.push(o);r.length&&rR(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=wt[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var u;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const s=r.length-1,c=r[s];r[s]=wt[n](t.measureViewportBox(),window.getComputedStyle(t.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),(u=this.removedTransforms)!=null&&u.length&&this.removedTransforms.forEach(([l,i])=>{t.getValue(l).set(i)}),this.resolveNoneKeyframes()}}function iR(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const o=(n==null?void 0:n[e])??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(r=>r!=null)}const Ug=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function ca(e){return eg(e)&&"offsetHeight"in e}const{schedule:Pc}=hg(queueMicrotask,!1),Xe={x:!1,y:!1};function Gg(){return Xe.x||Xe.y}function sR(e){return e==="x"||e==="y"?Xe[e]?null:(Xe[e]=!0,()=>{Xe[e]=!1}):Xe.x||Xe.y?null:(Xe.x=Xe.y=!0,()=>{Xe.x=Xe.y=!1})}function Hg(e,t){const n=iR(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function $l(e){return!(e.pointerType==="touch"||Gg())}function aR(e,t,n={}){const[r,o,s]=Hg(e,n),c=u=>{if(!$l(u))return;const{target:l}=u,i=t(l,u);if(typeof i!="function"||!l)return;const a=f=>{$l(f)&&(i(f),l.removeEventListener("pointerleave",a))};l.addEventListener("pointerleave",a,o)};return r.forEach(u=>{u.addEventListener("pointerenter",c,o)}),s}const zg=(e,t)=>t?e===t?!0:zg(e,t.parentElement):!1,Ac=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,cR=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Wg(e){return cR.has(e.tagName)||e.isContentEditable===!0}const No=new WeakSet;function Ul(e){return t=>{t.key==="Enter"&&e(t)}}function is(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const lR=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Ul(()=>{if(No.has(n))return;is(n,"down");const o=Ul(()=>{is(n,"up")}),s=()=>is(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Gl(e){return Ac(e)&&!Gg()}function uR(e,t,n={}){const[r,o,s]=Hg(e,n),c=u=>{const l=u.currentTarget;if(!Gl(u))return;No.add(l);const i=t(l,u),a=(h,m)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),No.has(l)&&No.delete(l),Gl(h)&&typeof i=="function"&&i(h,{success:m})},f=h=>{a(h,l===window||l===document||n.useGlobalTarget||zg(l,h.target))},d=h=>{a(h,!1)};window.addEventListener("pointerup",f,o),window.addEventListener("pointercancel",d,o)};return r.forEach(u=>{(n.useGlobalTarget?window:u).addEventListener("pointerdown",c,o),ca(u)&&(u.addEventListener("focus",i=>lR(i,o)),!Wg(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),s}function qg(e){return eg(e)&&"ownerSVGElement"in e}function fR(e){return qg(e)&&e.tagName==="svg"}const dR=[...Vg,be,Tt],hR=e=>dR.find(Fg(e)),Hl=()=>({translate:0,scale:1,origin:0,originPoint:0}),sn=()=>({x:Hl(),y:Hl()}),zl=()=>({min:0,max:0}),Se=()=>({x:zl(),y:zl()}),la={current:null},Kg={current:!1},pR=typeof window<"u";function mR(){if(Kg.current=!0,!!pR)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>la.current=e.matches;e.addEventListener("change",t),t()}else la.current=!1}const gR=new WeakMap;function Di(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function rr(e){return typeof e=="string"||Array.isArray(e)}const Oc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Mc=["initial",...Oc];function Ni(e){return Di(e.animate)||Mc.some(t=>rr(e[t]))}function Yg(e){return!!(Ni(e)||e.variants)}function vR(e,t,n){for(const r in t){const o=t[r],s=n[r];if(Te(o))e.addValue(r,o);else if(Te(s))e.addValue(r,gn(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const c=e.getValue(r);c.liveStyle===!0?c.jump(o):c.hasAnimated||c.set(o)}else{const c=e.getStaticValue(r);e.addValue(r,gn(c!==void 0?c:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Wl=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Zo={};function Xg(e){Zo=e}function yR(){return Zo}class xR{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:c},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ec,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=Me.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,pe.render(this.render,!1,!0))};const{latestValues:l,renderState:i}=c;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=i,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=u,this.blockInitialAnimation=!!s,this.isControllingVariants=Ni(n),this.isVariantNode=Yg(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:a,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const h=f[d];l[d]!==void 0&&Te(h)&&h.set(l[d])}}mount(t){var n;this.current=t,gR.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,o)=>this.bindToMotionValue(o,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Kg.current||mR(),this.shouldReduceMotion=la.current),process.env.NODE_ENV!=="production"&&fc(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),Rt(this.notifyUpdate),Rt(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.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=Tn.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&pe.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;typeof window<"u"&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s&&s(),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 Zo){const n=Zo[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Se()}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<Wl.length;r++){const o=Wl[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,c=t[s];c&&(this.propEventSubscriptions[o]=this.on(o,c))}this.prevMotionValues=vR(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=gn(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"&&(Jm(r)||tg(r))?r=parseFloat(r):!hR(r)&&Tt.test(n)&&(r=$g(t,n)),this.setBaseTarget(t,Te(r)?r.get():r)),Te(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const c=_c(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);c&&(r=c[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Te(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new uc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Pc.render(this.render)}}class Zg extends xR{constructor(){super(...arguments),this.KeyframeResolver=oR}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[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;Te(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Mt{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Qg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function bR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function wR(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 ss(e){return e===void 0||e===1}function ua({scale:e,scaleX:t,scaleY:n}){return!ss(e)||!ss(t)||!ss(n)}function Ft(e){return ua(e)||Jg(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Jg(e){return ql(e.x)||ql(e.y)}function ql(e){return e&&e!=="0%"}function Qo(e,t,n){const r=e-n,o=t*r;return n+o}function Kl(e,t,n,r,o){return o!==void 0&&(e=Qo(e,o,r)),Qo(e,n,r)+t}function fa(e,t=0,n=1,r,o){e.min=Kl(e.min,t,n,r,o),e.max=Kl(e.max,t,n,r,o)}function ev(e,{x:t,y:n}){fa(e.x,t.translate,t.scale,t.originPoint),fa(e.y,n.translate,n.scale,n.originPoint)}const Yl=.999999999999,Xl=1.0000000000001;function ER(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,c;for(let u=0;u<o;u++){s=n[u],c=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&cn(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),c&&(t.x*=c.x.scale,t.y*=c.y.scale,ev(e,c)),r&&Ft(s.latestValues)&&cn(e,s.latestValues))}t.x<Xl&&t.x>Yl&&(t.x=1),t.y<Xl&&t.y>Yl&&(t.y=1)}function an(e,t){e.min=e.min+t,e.max=e.max+t}function Zl(e,t,n,r,o=.5){const s=ve(e.min,e.max,o);fa(e,t,n,s,r)}function cn(e,t){Zl(e.x,t.x,t.scaleX,t.scale,t.originX),Zl(e.y,t.y,t.scaleY,t.scale,t.originY)}function tv(e,t){return Qg(wR(e.getBoundingClientRect(),t))}function SR(e,t,n){const r=tv(e,n),{scroll:o}=t;return o&&(an(r.x,o.offset.x),an(r.y,o.offset.y)),r}const CR={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},_R=Rn.length;function RR(e,t,n){let r="",o=!0;for(let s=0;s<_R;s++){const c=Rn[s],u=e[c];if(u===void 0)continue;let l=!0;if(typeof u=="number")l=u===(c.startsWith("scale")?1:0);else{const i=parseFloat(u);l=c.startsWith("scale")?i===1:i===0}if(!l||n){const i=Ug(u,Tc[c]);if(!l){o=!1;const a=CR[c]||c;r+=`${a}(${i}) `}n&&(t[c]=i)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Ic(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let c=!1,u=!1;for(const l in t){const i=t[l];if(Tn.has(l)){c=!0;continue}else if(mg(l)){o[l]=i;continue}else{const a=Ug(i,Tc[l]);l.startsWith("origin")?(u=!0,s[l]=a):r[l]=a}}if(t.transform||(c||n?r.transform=RR(t,e.transform,n):r.transform&&(r.transform="none")),u){const{originX:l="50%",originY:i="50%",originZ:a=0}=s;r.transformOrigin=`${l} ${i} ${a}`}}function nv(e,{style:t,vars:n},r,o){const s=e.style;let c;for(c in t)s[c]=t[c];o==null||o.applyProjectionStyles(s,r);for(c in n)s.setProperty(c,n[c])}function Ql(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const In={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Y.test(e))e=parseFloat(e);else return e;const n=Ql(e,t.target.x),r=Ql(e,t.target.y);return`${n}% ${r}%`}},TR={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Tt.parse(e);if(o.length>5)return r;const s=Tt.createTransformer(e),c=typeof o[0]!="number"?1:0,u=n.x.scale*t.x,l=n.y.scale*t.y;o[0+c]/=u,o[1+c]/=l;const i=ve(u,l,.5);return typeof o[2+c]=="number"&&(o[2+c]/=i),typeof o[3+c]=="number"&&(o[3+c]/=i),s(o)}},da={borderRadius:{...In,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:In,borderTopRightRadius:In,borderBottomLeftRadius:In,borderBottomRightRadius:In,boxShadow:TR};function rv(e,{layout:t,layoutId:n}){return Tn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!da[e]||e==="opacity")}function Dc(e,t,n){var c;const r=e.style,o=t==null?void 0:t.style,s={};if(!r)return s;for(const u in r)(Te(r[u])||o&&Te(o[u])||rv(u,e)||((c=n==null?void 0:n.getValue(u))==null?void 0:c.liveStyle)!==void 0)&&(s[u]=r[u]);return s}function PR(e){return window.getComputedStyle(e)}class AR extends Zg{constructor(){super(...arguments),this.type="html",this.renderInstance=nv}readValueFromInstance(t,n){var r;if(Tn.has(n))return(r=this.projection)!=null&&r.isProjecting?Qs(n):o_(t,n);{const o=PR(t),s=(mg(n)?o.getPropertyValue(n):o[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return tv(t,n)}build(t,n,r){Ic(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Dc(t,n,r)}}const OR={offset:"stroke-dashoffset",array:"stroke-dasharray"},MR={offset:"strokeDashoffset",array:"strokeDasharray"};function IR(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?OR:MR;e[s.offset]=`${-r}`,e[s.array]=`${t} ${n}`}const DR=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function ov(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:s=1,pathOffset:c=0,...u},l,i,a){if(Ic(e,u,i),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:d}=e;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=(a==null?void 0:a.transformBox)??"fill-box",delete f.transformBox);for(const h of DR)f[h]!==void 0&&(d[h]=f[h],delete f[h]);t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),o!==void 0&&IR(f,o,s,c,!1)}const iv=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"]),sv=e=>typeof e=="string"&&e.toLowerCase()==="svg";function NR(e,t,n,r){nv(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(iv.has(o)?o:Rc(o),t.attrs[o])}function av(e,t,n){const r=Dc(e,t,n);for(const o in e)if(Te(e[o])||Te(t[o])){const s=Rn.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}class jR extends Zg{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Se}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Tn.has(n)){const r=Bg(n);return r&&r.default||0}return n=iv.has(n)?n:Rc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return av(t,n,r)}build(t,n,r){ov(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){NR(t,n,r,o)}mount(t){this.isSVGTag=sv(t.tagName),super.mount(t)}}const kR=Mc.length;function cv(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?cv(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<kR;n++){const r=Mc[n],o=e.props[r];(rr(o)||o===!1)&&(t[r]=o)}return t}function lv(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 LR=[...Oc].reverse(),FR=Oc.length;function VR(e){return t=>Promise.all(t.map(({animation:n,options:r})=>K_(e,n,r)))}function BR(e){let t=VR(e),n=Jl(),r=!0;const o=l=>(i,a)=>{var d;const f=dn(e,a,l==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:m,...p}=f;i={...i,...p,...m}}return i};function s(l){t=l(e)}function c(l){const{props:i}=e,a=cv(e.parent)||{},f=[],d=new Set;let h={},m=1/0;for(let v=0;v<FR;v++){const x=LR[v],b=n[x],w=i[x]!==void 0?i[x]:a[x],E=rr(w),S=x===l?b.isActive:null;S===!1&&(m=v);let T=w===a[x]&&w!==i[x]&&E;if(T&&r&&e.manuallyAnimateOnMount&&(T=!1),b.protectedKeys={...h},!b.isActive&&S===null||!w&&!b.prevProp||Di(w)||typeof w=="boolean")continue;const P=$R(b.prevProp,w);let A=P||x===l&&b.isActive&&!T&&E||v>m&&E,O=!1;const R=Array.isArray(w)?w:[w];let I=R.reduce(o(x),{});S===!1&&(I={});const{prevResolvedValues:D={}}=b,F={...D,...I},B=H=>{A=!0,d.has(H)&&(O=!0,d.delete(H)),b.needsAnimating[H]=!0;const U=e.getValue(H);U&&(U.liveStyle=!1)};for(const H in F){const U=I[H],L=D[H];if(h.hasOwnProperty(H))continue;let M=!1;oa(U)&&oa(L)?M=!lv(U,L):M=U!==L,M?U!=null?B(H):d.add(H):U!==void 0&&d.has(H)?B(H):b.protectedKeys[H]=!0}b.prevProp=w,b.prevResolvedValues=I,b.isActive&&(h={...h,...I}),r&&e.blockInitialAnimation&&(A=!1);const q=T&&P;A&&(!q||O)&&f.push(...R.map(H=>{const U={type:x};if(typeof H=="string"&&r&&!q&&e.manuallyAnimateOnMount&&e.parent){const{parent:L}=e,M=dn(L,H);if(L.enteringChildren&&M){const{delayChildren:k}=M.transition||{};U.delay=Ig(L.enteringChildren,e,k)}}return{animation:H,options:U}}))}if(d.size){const v={};if(typeof i.initial!="boolean"){const x=dn(e,Array.isArray(i.initial)?i.initial[0]:i.initial);x&&x.transition&&(v.transition=x.transition)}d.forEach(x=>{const b=e.getBaseTarget(x),w=e.getValue(x);w&&(w.liveStyle=!0),v[x]=b??null}),f.push({animation:v})}let p=!!f.length;return r&&(i.initial===!1||i.initial===i.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,p?t(f):Promise.resolve()}function u(l,i){var f;if(n[l].isActive===i)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(d=>{var h;return(h=d.animationState)==null?void 0:h.setActive(l,i)}),n[l].isActive=i;const a=c(l);for(const d in n)n[d].protectedKeys={};return a}return{animateChanges:c,setActive:u,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Jl()}}}function $R(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!lv(t,e):!1}function jt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Jl(){return{animate:jt(!0),whileInView:jt(),whileHover:jt(),whileTap:jt(),whileDrag:jt(),whileFocus:jt(),exit:jt()}}function eu(e,t){e.min=t.min,e.max=t.max}function qe(e,t){eu(e.x,t.x),eu(e.y,t.y)}function tu(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const uv=1e-4,UR=1-uv,GR=1+uv,fv=.01,HR=0-fv,zR=0+fv;function Ie(e){return e.max-e.min}function WR(e,t,n){return Math.abs(e-t)<=n}function nu(e,t,n,r=.5){e.origin=r,e.originPoint=ve(t.min,t.max,e.origin),e.scale=Ie(n)/Ie(t),e.translate=ve(n.min,n.max,e.origin)-e.originPoint,(e.scale>=UR&&e.scale<=GR||isNaN(e.scale))&&(e.scale=1),(e.translate>=HR&&e.translate<=zR||isNaN(e.translate))&&(e.translate=0)}function Wn(e,t,n,r){nu(e.x,t.x,n.x,r?r.originX:void 0),nu(e.y,t.y,n.y,r?r.originY:void 0)}function ru(e,t,n){e.min=n.min+t.min,e.max=e.min+Ie(t)}function qR(e,t,n){ru(e.x,t.x,n.x),ru(e.y,t.y,n.y)}function ou(e,t,n){e.min=t.min-n.min,e.max=e.min+Ie(t)}function Jo(e,t,n){ou(e.x,t.x,n.x),ou(e.y,t.y,n.y)}function iu(e,t,n,r,o){return e-=t,e=Qo(e,1/n,r),o!==void 0&&(e=Qo(e,1/o,r)),e}function KR(e,t=0,n=1,r=.5,o,s=e,c=e){if(st.test(t)&&(t=parseFloat(t),t=ve(c.min,c.max,t/100)-c.min),typeof t!="number")return;let u=ve(s.min,s.max,r);e===s&&(u-=t),e.min=iu(e.min,t,n,u,o),e.max=iu(e.max,t,n,u,o)}function su(e,t,[n,r,o],s,c){KR(e,t[n],t[r],t[o],t.scale,s,c)}const YR=["x","scaleX","originX"],XR=["y","scaleY","originY"];function au(e,t,n,r){su(e.x,t,YR,n?n.x:void 0,r?r.x:void 0),su(e.y,t,XR,n?n.y:void 0,r?r.y:void 0)}function cu(e){return e.translate===0&&e.scale===1}function dv(e){return cu(e.x)&&cu(e.y)}function lu(e,t){return e.min===t.min&&e.max===t.max}function ZR(e,t){return lu(e.x,t.x)&&lu(e.y,t.y)}function uu(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function hv(e,t){return uu(e.x,t.x)&&uu(e.y,t.y)}function fu(e){return Ie(e.x)/Ie(e.y)}function du(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Ue(e){return[e("x"),e("y")]}function QR(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,c=(n==null?void 0:n.z)||0;if((o||s||c)&&(r=`translate3d(${o}px, ${s}px, ${c}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:i,rotate:a,rotateX:f,rotateY:d,skewX:h,skewY:m}=n;i&&(r=`perspective(${i}px) ${r}`),a&&(r+=`rotate(${a}deg) `),f&&(r+=`rotateX(${f}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),m&&(r+=`skewY(${m}deg) `)}const u=e.x.scale*t.x,l=e.y.scale*t.y;return(u!==1||l!==1)&&(r+=`scale(${u}, ${l})`),r||"none"}const pv=["TopLeft","TopRight","BottomLeft","BottomRight"],JR=pv.length,hu=e=>typeof e=="string"?parseFloat(e):e,pu=e=>typeof e=="number"||Y.test(e);function eT(e,t,n,r,o,s){o?(e.opacity=ve(0,n.opacity??1,tT(r)),e.opacityExit=ve(t.opacity??1,0,nT(r))):s&&(e.opacity=ve(t.opacity??1,n.opacity??1,r));for(let c=0;c<JR;c++){const u=`border${pv[c]}Radius`;let l=mu(t,u),i=mu(n,u);if(l===void 0&&i===void 0)continue;l||(l=0),i||(i=0),l===0||i===0||pu(l)===pu(i)?(e[u]=Math.max(ve(hu(l),hu(i),r),0),(st.test(i)||st.test(l))&&(e[u]+="%")):e[u]=i}(t.rotate||n.rotate)&&(e.rotate=ve(t.rotate||0,n.rotate||0,r))}function mu(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const tT=mv(0,.5,lg),nT=mv(.5,.95,ze);function mv(e,t,n){return r=>r<e?0:r>t?1:n(er(e,t,r))}function rT(e,t,n){const r=Te(e)?e:gn(e);return r.start(Cc("",r,t,n)),r.animation}function or(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const oT=(e,t)=>e.depth-t.depth;class iT{constructor(){this.children=[],this.isDirty=!1}add(t){ac(this.children,t),this.isDirty=!0}remove(t){cc(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(oT),this.isDirty=!1,this.children.forEach(t)}}function sT(e,t){const n=Me.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(Rt(r),e(s-t))};return pe.setup(r,!0),()=>Rt(r)}function jo(e){return Te(e)?e.get():e}class aT{constructor(){this.members=[]}add(t){ac(this.members,t),t.scheduleRender()}remove(t){if(cc(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender();const o=r.options.layoutDependency,s=t.options.layoutDependency;o!==void 0&&s!==void 0&&o===s||(t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0));const{crossfade:u}=t.options;u===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const ko={hasAnimatedSinceResize:!0,hasEverUpdated:!1},as=["","X","Y","Z"],cT=1e3;let lT=0;function cs(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function gv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=kg(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",pe,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&gv(r)}function vv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(c={},u=t==null?void 0:t()){this.id=lT++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(dT),this.nodes.forEach(gT),this.nodes.forEach(vT),this.nodes.forEach(hT)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=c,this.root=u?u.root||u:this,this.path=u?[...u.path,u]:[],this.parent=u,this.depth=u?u.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new iT)}addEventListener(c,u){return this.eventHandlers.has(c)||this.eventHandlers.set(c,new uc),this.eventHandlers.get(c).add(u)}notifyListeners(c,...u){const l=this.eventHandlers.get(c);l&&l.notify(...u)}hasListeners(c){return this.eventHandlers.has(c)}mount(c){if(this.instance)return;this.isSVG=qg(c)&&!fR(c),this.instance=c;const{layoutId:u,layout:l,visualElement:i}=this.options;if(i&&!i.current&&i.mount(c),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||u)&&(this.isLayoutDirty=!0),e){let a,f=0;const d=()=>this.root.updateBlockedByResize=!1;pe.read(()=>{f=window.innerWidth}),e(c,()=>{const h=window.innerWidth;h!==f&&(f=h,this.root.updateBlockedByResize=!0,a&&a(),a=sT(d,250),ko.hasAnimatedSinceResize&&(ko.hasAnimatedSinceResize=!1,this.nodes.forEach(yu)))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&i&&(u||l)&&this.addEventListener("didUpdate",({delta:a,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||i.getDefaultTransition()||ET,{onLayoutAnimationStart:p,onLayoutAnimationComplete:v}=i.getProps(),x=!this.targetLayout||!hv(this.targetLayout,h),b=!f&&d;if(this.options.layoutRoot||this.resumeFrom||b||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...Sc(m,"layout"),onPlay:p,onComplete:v};(i.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(a,b)}else f||yu(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const c=this.getStack();c&&c.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Rt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(yT),this.animationId++)}getTransformTemplate(){const{visualElement:c}=this.options;return c&&c.getProps().transformTemplate}willUpdate(c=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&gv(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let a=0;a<this.path.length;a++){const f=this.path[a];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:u,layout:l}=this.options;if(u===void 0&&!l)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),c&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(gu);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(vu);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(mT),this.nodes.forEach(uT),this.nodes.forEach(fT)):this.nodes.forEach(vu),this.clearAllSnapshots();const u=Me.now();_e.delta=ct(0,1e3/60,u-_e.timestamp),_e.timestamp=u,_e.isProcessing=!0,Ji.update.process(_e),Ji.preRender.process(_e),Ji.render.process(_e),_e.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Pc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(pT),this.sharedNodes.forEach(xT)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,pe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){pe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ie(this.snapshot.measuredBox.x)&&!Ie(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const c=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Se(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:u}=this.options;u&&u.notify("LayoutMeasure",this.layout.layoutBox,c?c.layoutBox:void 0)}updateScroll(c="measure"){let u=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===c&&(u=!1),u&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:c,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const c=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,u=this.projectionDelta&&!dv(this.projectionDelta),l=this.getTransformTemplate(),i=l?l(this.latestValues,""):void 0,a=i!==this.prevTransformTemplateValue;c&&this.instance&&(u||Ft(this.latestValues)||a)&&(o(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(c=!0){const u=this.measurePageBox();let l=this.removeElementScroll(u);return c&&(l=this.removeTransform(l)),ST(l),{animationId:this.root.animationId,measuredBox:u,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var i;const{visualElement:c}=this.options;if(!c)return Se();const u=c.measureViewportBox();if(!(((i=this.scroll)==null?void 0:i.wasRoot)||this.path.some(CT))){const{scroll:a}=this.root;a&&(an(u.x,a.offset.x),an(u.y,a.offset.y))}return u}removeElementScroll(c){var l;const u=Se();if(qe(u,c),(l=this.scroll)!=null&&l.wasRoot)return u;for(let i=0;i<this.path.length;i++){const a=this.path[i],{scroll:f,options:d}=a;a!==this.root&&f&&d.layoutScroll&&(f.wasRoot&&qe(u,c),an(u.x,f.offset.x),an(u.y,f.offset.y))}return u}applyTransform(c,u=!1){const l=Se();qe(l,c);for(let i=0;i<this.path.length;i++){const a=this.path[i];!u&&a.options.layoutScroll&&a.scroll&&a!==a.root&&cn(l,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),Ft(a.latestValues)&&cn(l,a.latestValues)}return Ft(this.latestValues)&&cn(l,this.latestValues),l}removeTransform(c){const u=Se();qe(u,c);for(let l=0;l<this.path.length;l++){const i=this.path[l];if(!i.instance||!Ft(i.latestValues))continue;ua(i.latestValues)&&i.updateSnapshot();const a=Se(),f=i.measurePageBox();qe(a,f),au(u,i.latestValues,i.snapshot?i.snapshot.layoutBox:void 0,a)}return Ft(this.latestValues)&&au(u,this.latestValues),u}setTargetDelta(c){this.targetDelta=c,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(c){this.options={...this.options,...c,crossfade:c.crossfade!==void 0?c.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==_e.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(c=!1){var h;const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==u;if(!(c||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(h=this.parent)!=null&&h.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:a,layoutId:f}=this.options;if(!this.layout||!(a||f))return;this.resolvedRelativeTargetAt=_e.timestamp;const d=this.getClosestProjectingParent();d&&this.linkedParentVersion!==d.layoutVersion&&!d.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(d&&d.layout?this.createRelativeTarget(d,this.layout.layoutBox,d.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Se(),this.targetWithTransforms=Se()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),qR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):qe(this.target,this.layout.layoutBox),ev(this.target,this.targetDelta)):qe(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?this.createRelativeTarget(d,this.target,d.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||ua(this.parent.latestValues)||Jg(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(c,u,l){this.relativeParent=c,this.linkedParentVersion=c.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Se(),this.relativeTargetOrigin=Se(),Jo(this.relativeTargetOrigin,u,l),qe(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var m;const c=this.getLead(),u=!!this.resumingFrom||this!==c;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===_e.timestamp&&(l=!1),l)return;const{layout:i,layoutId:a}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(i||a))return;qe(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;ER(this.layoutCorrected,this.treeScale,this.path,u),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=Se());const{target:h}=c;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(tu(this.prevProjectionDelta.x,this.projectionDelta.x),tu(this.prevProjectionDelta.y,this.projectionDelta.y)),Wn(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!du(this.projectionDelta.x,this.prevProjectionDelta.x)||!du(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(c=!0){var u;if((u=this.options.visualElement)==null||u.scheduleRender(),c){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=sn(),this.projectionDelta=sn(),this.projectionDeltaWithTransform=sn()}setAnimationOrigin(c,u=!1){const l=this.snapshot,i=l?l.latestValues:{},a={...this.latestValues},f=sn();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!u;const d=Se(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,p=h!==m,v=this.getStack(),x=!v||v.members.length<=1,b=!!(p&&!x&&this.options.crossfade===!0&&!this.path.some(wT));this.animationProgress=0;let w;this.mixTargetDelta=E=>{const S=E/1e3;xu(f.x,c.x,S),xu(f.y,c.y,S),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Jo(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),bT(this.relativeTarget,this.relativeTargetOrigin,d,S),w&&ZR(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Se()),qe(w,this.relativeTarget)),p&&(this.animationValues=a,eT(a,i,this.latestValues,S,b,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(c){var u,l,i;this.notifyListeners("animationStart"),(u=this.currentAnimation)==null||u.stop(),(i=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||i.stop(),this.pendingAnimation&&(Rt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=pe.update(()=>{ko.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=gn(0)),this.currentAnimation=rT(this.motionValue,[0,1e3],{...c,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),c.onUpdate&&c.onUpdate(a)},onStop:()=>{},onComplete:()=>{c.onComplete&&c.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const c=this.getStack();c&&c.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(cT),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const c=this.getLead();let{targetWithTransforms:u,target:l,layout:i,latestValues:a}=c;if(!(!u||!l||!i)){if(this!==c&&this.layout&&i&&yv(this.options.animationType,this.layout.layoutBox,i.layoutBox)){l=this.target||Se();const f=Ie(this.layout.layoutBox.x);l.x.min=c.target.x.min,l.x.max=l.x.min+f;const d=Ie(this.layout.layoutBox.y);l.y.min=c.target.y.min,l.y.max=l.y.min+d}qe(u,l),cn(u,a),Wn(this.projectionDeltaWithTransform,this.layoutCorrected,u,a)}}registerSharedNode(c,u){this.sharedNodes.has(c)||this.sharedNodes.set(c,new aT),this.sharedNodes.get(c).add(u);const i=u.options.initialPromotionConfig;u.promote({transition:i?i.transition:void 0,preserveFollowOpacity:i&&i.shouldPreserveFollowOpacity?i.shouldPreserveFollowOpacity(u):void 0})}isLead(){const c=this.getStack();return c?c.lead===this:!0}getLead(){var u;const{layoutId:c}=this.options;return c?((u=this.getStack())==null?void 0:u.lead)||this:this}getPrevLead(){var u;const{layoutId:c}=this.options;return c?(u=this.getStack())==null?void 0:u.prevLead:void 0}getStack(){const{layoutId:c}=this.options;if(c)return this.root.sharedNodes.get(c)}promote({needsReset:c,transition:u,preserveFollowOpacity:l}={}){const i=this.getStack();i&&i.promote(this,l),c&&(this.projectionDelta=void 0,this.needsReset=!0),u&&this.setOptions({transition:u})}relegate(){const c=this.getStack();return c?c.relegate(this):!1}resetSkewAndRotation(){const{visualElement:c}=this.options;if(!c)return;let u=!1;const{latestValues:l}=c;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(u=!0),!u)return;const i={};l.z&&cs("z",c,i,this.animationValues);for(let a=0;a<as.length;a++)cs(`rotate${as[a]}`,c,i,this.animationValues),cs(`skew${as[a]}`,c,i,this.animationValues);c.render();for(const a in i)c.setStaticValue(a,i[a]),this.animationValues&&(this.animationValues[a]=i[a]);c.scheduleRender()}applyProjectionStyles(c,u){if(!this.instance||this.isSVG)return;if(!this.isVisible){c.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,c.visibility="",c.opacity="",c.pointerEvents=jo(u==null?void 0:u.pointerEvents)||"",c.transform=l?l(this.latestValues,""):"none";return}const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){this.options.layoutId&&(c.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,c.pointerEvents=jo(u==null?void 0:u.pointerEvents)||""),this.hasProjected&&!Ft(this.latestValues)&&(c.transform=l?l({},""):"none",this.hasProjected=!1);return}c.visibility="";const a=i.animationValues||i.latestValues;this.applyTransformsToTarget();let f=QR(this.projectionDeltaWithTransform,this.treeScale,a);l&&(f=l(a,f)),c.transform=f;const{x:d,y:h}=this.projectionDelta;c.transformOrigin=`${d.origin*100}% ${h.origin*100}% 0`,i.animationValues?c.opacity=i===this?a.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:c.opacity=i===this?a.opacity!==void 0?a.opacity:"":a.opacityExit!==void 0?a.opacityExit:0;for(const m in da){if(a[m]===void 0)continue;const{correct:p,applyTo:v,isCSSVariable:x}=da[m],b=f==="none"?a[m]:p(a[m],i);if(v){const w=v.length;for(let E=0;E<w;E++)c[v[E]]=b}else x?this.options.visualElement.renderState.vars[m]=b:c[m]=b}this.options.layoutId&&(c.pointerEvents=i===this?jo(u==null?void 0:u.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(c=>{var u;return(u=c.currentAnimation)==null?void 0:u.stop()}),this.root.nodes.forEach(gu),this.root.sharedNodes.clear()}}}function uT(e){e.updateLayout()}function fT(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,c=t.source!==e.layout.source;s==="size"?Ue(f=>{const d=c?t.measuredBox[f]:t.layoutBox[f],h=Ie(d);d.min=r[f].min,d.max=d.min+h}):yv(s,t.layoutBox,r)&&Ue(f=>{const d=c?t.measuredBox[f]:t.layoutBox[f],h=Ie(r[f]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+h)});const u=sn();Wn(u,r,t.layoutBox);const l=sn();c?Wn(l,e.applyTransform(o,!0),t.measuredBox):Wn(l,r,t.layoutBox);const i=!dv(u);let a=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:h}=f;if(d&&h){const m=Se();Jo(m,t.layoutBox,d.layoutBox);const p=Se();Jo(p,r,h.layoutBox),hv(m,p)||(a=!0),f.options.layoutRoot&&(e.relativeTarget=p,e.relativeTargetOrigin=m,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:u,hasLayoutChanged:i,hasRelativeLayoutChanged:a})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function dT(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function hT(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function pT(e){e.clearSnapshot()}function gu(e){e.clearMeasurements()}function vu(e){e.isLayoutDirty=!1}function mT(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function yu(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function gT(e){e.resolveTargetDelta()}function vT(e){e.calcProjection()}function yT(e){e.resetSkewAndRotation()}function xT(e){e.removeLeadSnapshot()}function xu(e,t,n){e.translate=ve(t.translate,0,n),e.scale=ve(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function bu(e,t,n,r){e.min=ve(t.min,n.min,r),e.max=ve(t.max,n.max,r)}function bT(e,t,n,r){bu(e.x,t.x,n.x,r),bu(e.y,t.y,n.y,r)}function wT(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const ET={duration:.45,ease:[.4,0,.1,1]},wu=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Eu=wu("applewebkit/")&&!wu("chrome/")?Math.round:ze;function Su(e){e.min=Eu(e.min),e.max=Eu(e.max)}function ST(e){Su(e.x),Su(e.y)}function yv(e,t,n){return e==="position"||e==="preserve-aspect"&&!WR(fu(t),fu(n),.2)}function CT(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const _T=vv({attachResizeListener:(e,t)=>or(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),ls={current:void 0},xv=vv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ls.current){const e=new _T({});e.mount(window),e.setOptions({layoutScroll:!0}),ls.current=e}return ls.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Nc=_.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Cu(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function RT(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Cu(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Cu(e[o],null)}}}}function TT(...e){return y.useCallback(RT(...e),e)}class PT extends y.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=ca(r)&&r.offsetWidth||0,s=ca(r)&&r.offsetHeight||0,c=this.props.sizeRef.current;c.height=n.offsetHeight||0,c.width=n.offsetWidth||0,c.top=n.offsetTop,c.left=n.offsetLeft,c.right=o-c.width-c.left,c.bottom=s-c.height-c.top}return null}componentDidUpdate(){}render(){return this.props.children}}function AT({children:e,isPresent:t,anchorX:n,anchorY:r,root:o}){var f;const s=_.useId(),c=_.useRef(null),u=_.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=_.useContext(Nc),i=((f=e.props)==null?void 0:f.ref)??(e==null?void 0:e.ref),a=TT(c,i);return _.useInsertionEffect(()=>{const{width:d,height:h,top:m,left:p,right:v,bottom:x}=u.current;if(t||!c.current||!d||!h)return;const b=n==="left"?`left: ${p}`:`right: ${v}`,w=r==="bottom"?`bottom: ${x}`:`top: ${m}`;c.current.dataset.motionPopId=s;const E=document.createElement("style");l&&(E.nonce=l);const S=o??document.head;return S.appendChild(E),E.sheet&&E.sheet.insertRule(`
97
- [data-motion-pop-id="${s}"] {
96
+ Defaulting to \`null\`.`}var PE=Up,AE=Hp,rc="Radio",[OE,Wp]=Ee(rc),[ME,IE]=OE(rc),qp=y.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:c,value:u="on",onCheck:l,form:s,...a}=e,[f,d]=y.useState(null),h=re(t,v=>d(v)),m=y.useRef(!1),p=f?s||!!f.closest("form"):!0;return g.jsxs(ME,{scope:n,checked:o,disabled:c,children:[g.jsx(z.button,{type:"button",role:"radio","aria-checked":o,"data-state":Zp(o),"data-disabled":c?"":void 0,disabled:c,value:u,...a,ref:h,onClick:B(e.onClick,v=>{o||l==null||l(),p&&(m.current=v.isPropagationStopped(),m.current||v.stopPropagation())})}),p&&g.jsx(Xp,{control:f,bubbles:!m.current,name:r,value:u,checked:o,required:i,disabled:c,form:s,style:{transform:"translateX(-100%)"}})]})});qp.displayName=rc;var Kp="RadioIndicator",Yp=y.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=IE(Kp,n);return g.jsx(je,{present:r||i.checked,children:g.jsx(z.span,{"data-state":Zp(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})})});Yp.displayName=Kp;var NE="RadioBubbleInput",Xp=y.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},i)=>{const c=y.useRef(null),u=re(c,i),l=fr(n),s=dr(t);return y.useEffect(()=>{const a=c.current;if(!a)return;const f=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&h){const m=new Event("click",{bubbles:r});h.call(a,n),a.dispatchEvent(m)}},[l,n,r]),g.jsx(z.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:u,style:{...o.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Xp.displayName=NE;function Zp(e){return e?"checked":"unchecked"}var jE=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],_i="RadioGroup",[DE]=Ee(_i,[En,Wp]),Qp=En(),Jp=Wp(),[kE,LE]=DE(_i),em=y.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:c=!1,disabled:u=!1,orientation:l,dir:s,loop:a=!0,onValueChange:f,...d}=e,h=Qp(n),m=Kt(s),[p,v]=Ne({prop:i,defaultProp:o??null,onChange:f,caller:_i});return g.jsx(kE,{scope:n,name:r,required:c,disabled:u,value:p,onValueChange:v,children:g.jsx(Va,{asChild:!0,...h,orientation:l,dir:m,loop:a,children:g.jsx(z.div,{role:"radiogroup","aria-required":c,"aria-orientation":l,"data-disabled":u?"":void 0,dir:m,...d,ref:t})})})});em.displayName=_i;var tm="RadioGroupItem",nm=y.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=LE(tm,n),c=i.disabled||r,u=Qp(n),l=Jp(n),s=y.useRef(null),a=re(t,s),f=i.value===o.value,d=y.useRef(!1);return y.useEffect(()=>{const h=p=>{jE.includes(p.key)&&(d.current=!0)},m=()=>d.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",m),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",m)}},[]),g.jsx(Ba,{asChild:!0,...u,focusable:!c,active:f,children:g.jsx(qp,{disabled:c,required:i.required,checked:f,...l,...o,name:i.name,ref:a,onCheck:()=>i.onValueChange(o.value),onKeyDown:B(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:B(o.onFocus,()=>{var h;d.current&&((h=s.current)==null||h.click())})})})});nm.displayName=tm;var FE="RadioGroupIndicator",rm=y.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=Jp(n);return g.jsx(Yp,{...o,...r,ref:t})});rm.displayName=FE;var VE=em,BE=nm,$E=rm,UE=[" ","Enter","ArrowUp","ArrowDown"],GE=[" ","Enter"],Ht="Select",[Ri,Ti,HE]=ar(Ht),[Sn]=Ee(Ht,[HE,Pt]),Pi=Pt(),[zE,At]=Sn(Ht),[WE,qE]=Sn(Ht),om=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:c,defaultValue:u,onValueChange:l,dir:s,name:a,autoComplete:f,disabled:d,required:h,form:m}=e,p=Pi(t),[v,x]=y.useState(null),[b,w]=y.useState(null),[S,E]=y.useState(!1),A=Kt(s),[R,T]=Ne({prop:r,defaultProp:o??!1,onChange:i,caller:Ht}),[I,P]=Ne({prop:c,defaultProp:u,onChange:l,caller:Ht}),M=y.useRef(null),j=v?m||!!v.closest("form"):!0,[V,$]=y.useState(new Set),K=Array.from(V).map(G=>G.props.value).join(";");return g.jsx(yi,{...p,children:g.jsxs(zE,{required:h,scope:t,trigger:v,onTriggerChange:x,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:E,contentId:Re(),value:I,onValueChange:P,open:R,onOpenChange:T,dir:A,triggerPointerDownPosRef:M,disabled:d,children:[g.jsx(Ri.Provider,{scope:t,children:g.jsx(WE,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback(G=>{$(H=>new Set(H).add(G))},[]),onNativeOptionRemove:y.useCallback(G=>{$(H=>{const U=new Set(H);return U.delete(G),U})},[]),children:n})}),j?g.jsxs(Sm,{"aria-hidden":!0,required:h,tabIndex:-1,name:a,autoComplete:f,value:I,onChange:G=>P(G.target.value),disabled:d,form:m,children:[I===void 0?g.jsx("option",{value:""}):null,Array.from(V)]},K):null]})})};om.displayName=Ht;var im="SelectTrigger",sm=y.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Pi(n),c=At(im,n),u=c.disabled||r,l=re(t,c.onTriggerChange),s=Ti(n),a=y.useRef("touch"),[f,d,h]=_m(p=>{const v=s().filter(w=>!w.disabled),x=v.find(w=>w.value===c.value),b=Rm(v,p,x);b!==void 0&&c.onValueChange(b.value)}),m=p=>{u||(c.onOpenChange(!0),h()),p&&(c.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return g.jsx(pr,{asChild:!0,...i,children:g.jsx(z.button,{type:"button",role:"combobox","aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":Cm(c.value)?"":void 0,...o,ref:l,onClick:B(o.onClick,p=>{p.currentTarget.focus(),a.current!=="mouse"&&m(p)}),onPointerDown:B(o.onPointerDown,p=>{a.current=p.pointerType;const v=p.target;v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(m(p),p.preventDefault())}),onKeyDown:B(o.onKeyDown,p=>{const v=f.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&d(p.key),!(v&&p.key===" ")&&UE.includes(p.key)&&(m(),p.preventDefault())})})})});sm.displayName=im;var am="SelectValue",cm=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:c="",...u}=e,l=At(am,n),{onValueNodeHasChildrenChange:s}=l,a=i!==void 0,f=re(t,l.onValueNodeChange);return we(()=>{s(a)},[s,a]),g.jsx(z.span,{...u,ref:f,style:{pointerEvents:"none"},children:Cm(l.value)?g.jsx(g.Fragment,{children:c}):i})});cm.displayName=am;var KE="SelectIcon",lm=y.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return g.jsx(z.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});lm.displayName=KE;var YE="SelectPortal",um=e=>g.jsx(lr,{asChild:!0,...e});um.displayName=YE;var zt="SelectContent",fm=y.forwardRef((e,t)=>{const n=At(zt,e.__scopeSelect),[r,o]=y.useState();if(we(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?oi.createPortal(g.jsx(dm,{scope:e.__scopeSelect,children:g.jsx(Ri.Slot,{scope:e.__scopeSelect,children:g.jsx("div",{children:e.children})})}),i):null}return g.jsx(hm,{...e,ref:t})});fm.displayName=zt;var Ye=10,[dm,Ot]=Sn(zt),XE="SelectContentImpl",ZE=St("SelectContent.RemoveScroll"),hm=y.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:c,side:u,sideOffset:l,align:s,alignOffset:a,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:m,hideWhenDetached:p,avoidCollisions:v,...x}=e,b=At(zt,n),[w,S]=y.useState(null),[E,A]=y.useState(null),R=re(t,F=>S(F)),[T,I]=y.useState(null),[P,M]=y.useState(null),j=Ti(n),[V,$]=y.useState(!1),K=y.useRef(!1);y.useEffect(()=>{if(w)return fi(w)},[w]),li();const G=y.useCallback(F=>{const[Y,...Z]=j().map(D=>D.ref.current),[q]=Z.slice(-1),oe=document.activeElement;for(const D of F)if(D===oe||(D==null||D.scrollIntoView({block:"nearest"}),D===Y&&E&&(E.scrollTop=0),D===q&&E&&(E.scrollTop=E.scrollHeight),D==null||D.focus(),document.activeElement!==oe))return},[j,E]),H=y.useCallback(()=>G([T,w]),[G,T,w]);y.useEffect(()=>{V&&H()},[V,H]);const{onOpenChange:U,triggerPointerDownPosRef:L}=b;y.useEffect(()=>{if(w){let F={x:0,y:0};const Y=q=>{var oe,D;F={x:Math.abs(Math.round(q.pageX)-(((oe=L.current)==null?void 0:oe.x)??0)),y:Math.abs(Math.round(q.pageY)-(((D=L.current)==null?void 0:D.y)??0))}},Z=q=>{F.x<=10&&F.y<=10?q.preventDefault():w.contains(q.target)||U(!1),document.removeEventListener("pointermove",Y),L.current=null};return L.current!==null&&(document.addEventListener("pointermove",Y),document.addEventListener("pointerup",Z,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Y),document.removeEventListener("pointerup",Z,{capture:!0})}}},[w,U,L]),y.useEffect(()=>{const F=()=>U(!1);return window.addEventListener("blur",F),window.addEventListener("resize",F),()=>{window.removeEventListener("blur",F),window.removeEventListener("resize",F)}},[U]);const[O,k]=_m(F=>{const Y=j().filter(oe=>!oe.disabled),Z=Y.find(oe=>oe.ref.current===document.activeElement),q=Rm(Y,F,Z);q&&setTimeout(()=>q.ref.current.focus())}),ee=y.useCallback((F,Y,Z)=>{const q=!K.current&&!Z;(b.value!==void 0&&b.value===Y||q)&&(I(F),q&&(K.current=!0))},[b.value]),ne=y.useCallback(()=>w==null?void 0:w.focus(),[w]),X=y.useCallback((F,Y,Z)=>{const q=!K.current&&!Z;(b.value!==void 0&&b.value===Y||q)&&M(F)},[b.value]),ie=r==="popper"?Ls:pm,te=ie===Ls?{side:u,sideOffset:l,align:s,alignOffset:a,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:m,hideWhenDetached:p,avoidCollisions:v}:{};return g.jsx(dm,{scope:n,content:w,viewport:E,onViewportChange:A,itemRefCallback:ee,selectedItem:T,onItemLeave:ne,itemTextRefCallback:X,focusSelectedItem:H,selectedItemText:P,position:r,isPositioned:V,searchRef:O,children:g.jsx(ur,{as:ZE,allowPinchZoom:!0,children:g.jsx(cr,{asChild:!0,trapped:b.open,onMountAutoFocus:F=>{F.preventDefault()},onUnmountAutoFocus:B(o,F=>{var Y;(Y=b.trigger)==null||Y.focus({preventScroll:!0}),F.preventDefault()}),children:g.jsx(xn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:F=>F.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:g.jsx(ie,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:F=>F.preventDefault(),...x,...te,onPlaced:()=>$(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:B(x.onKeyDown,F=>{const Y=F.ctrlKey||F.altKey||F.metaKey;if(F.key==="Tab"&&F.preventDefault(),!Y&&F.key.length===1&&k(F.key),["ArrowUp","ArrowDown","Home","End"].includes(F.key)){let q=j().filter(oe=>!oe.disabled).map(oe=>oe.ref.current);if(["ArrowUp","End"].includes(F.key)&&(q=q.slice().reverse()),["ArrowUp","ArrowDown"].includes(F.key)){const oe=F.target,D=q.indexOf(oe);q=q.slice(D+1)}setTimeout(()=>G(q)),F.preventDefault()}})})})})})})});hm.displayName=XE;var QE="SelectItemAlignedPosition",pm=y.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=At(zt,n),c=Ot(zt,n),[u,l]=y.useState(null),[s,a]=y.useState(null),f=re(t,R=>a(R)),d=Ti(n),h=y.useRef(!1),m=y.useRef(!0),{viewport:p,selectedItem:v,selectedItemText:x,focusSelectedItem:b}=c,w=y.useCallback(()=>{if(i.trigger&&i.valueNode&&u&&s&&p&&v&&x){const R=i.trigger.getBoundingClientRect(),T=s.getBoundingClientRect(),I=i.valueNode.getBoundingClientRect(),P=x.getBoundingClientRect();if(i.dir!=="rtl"){const oe=P.left-T.left,D=I.left-oe,he=R.left-D,Se=R.width+he,$e=Math.max(Se,T.width),It=window.innerWidth-Ye,vt=qo(D,[Ye,Math.max(Ye,It-$e)]);u.style.minWidth=Se+"px",u.style.left=vt+"px"}else{const oe=T.right-P.right,D=window.innerWidth-I.right-oe,he=window.innerWidth-R.right-D,Se=R.width+he,$e=Math.max(Se,T.width),It=window.innerWidth-Ye,vt=qo(D,[Ye,Math.max(Ye,It-$e)]);u.style.minWidth=Se+"px",u.style.right=vt+"px"}const M=d(),j=window.innerHeight-Ye*2,V=p.scrollHeight,$=window.getComputedStyle(s),K=parseInt($.borderTopWidth,10),G=parseInt($.paddingTop,10),H=parseInt($.borderBottomWidth,10),U=parseInt($.paddingBottom,10),L=K+G+V+U+H,O=Math.min(v.offsetHeight*5,L),k=window.getComputedStyle(p),ee=parseInt(k.paddingTop,10),ne=parseInt(k.paddingBottom,10),X=R.top+R.height/2-Ye,ie=j-X,te=v.offsetHeight/2,F=v.offsetTop+te,Y=K+G+F,Z=L-Y;if(Y<=X){const oe=M.length>0&&v===M[M.length-1].ref.current;u.style.bottom="0px";const D=s.clientHeight-p.offsetTop-p.offsetHeight,he=Math.max(ie,te+(oe?ne:0)+D+H),Se=Y+he;u.style.height=Se+"px"}else{const oe=M.length>0&&v===M[0].ref.current;u.style.top="0px";const he=Math.max(X,K+p.offsetTop+(oe?ee:0)+te)+Z;u.style.height=he+"px",p.scrollTop=Y-X+p.offsetTop}u.style.margin=`${Ye}px 0`,u.style.minHeight=O+"px",u.style.maxHeight=j+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[d,i.trigger,i.valueNode,u,s,p,v,x,i.dir,r]);we(()=>w(),[w]);const[S,E]=y.useState();we(()=>{s&&E(window.getComputedStyle(s).zIndex)},[s]);const A=y.useCallback(R=>{R&&m.current===!0&&(w(),b==null||b(),m.current=!1)},[w,b]);return g.jsx(eS,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:h,onScrollButtonChange:A,children:g.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:g.jsx(z.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});pm.displayName=QE;var JE="SelectPopperPosition",Ls=y.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Ye,...i}=e,c=Pi(n);return g.jsx(xi,{...c,...i,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Ls.displayName=JE;var[eS,oc]=Sn(zt,{}),Fs="SelectViewport",mm=y.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,i=Ot(Fs,n),c=oc(Fs,n),u=re(t,i.onViewportChange),l=y.useRef(0);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),g.jsx(Ri.Slot,{scope:n,children:g.jsx(z.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:B(o.onScroll,s=>{const a=s.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:d}=c;if(d!=null&&d.current&&f){const h=Math.abs(l.current-a.scrollTop);if(h>0){const m=window.innerHeight-Ye*2,p=parseFloat(f.style.minHeight),v=parseFloat(f.style.height),x=Math.max(p,v);if(x<m){const b=x+h,w=Math.min(m,b),S=b-w;f.style.height=w+"px",f.style.bottom==="0px"&&(a.scrollTop=S>0?S:0,f.style.justifyContent="flex-end")}}}l.current=a.scrollTop})})})]})});mm.displayName=Fs;var gm="SelectGroup",[tS,nS]=Sn(gm),rS=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Re();return g.jsx(tS,{scope:n,id:o,children:g.jsx(z.div,{role:"group","aria-labelledby":o,...r,ref:t})})});rS.displayName=gm;var vm="SelectLabel",oS=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=nS(vm,n);return g.jsx(z.div,{id:o.id,...r,ref:t})});oS.displayName=vm;var Yo="SelectItem",[iS,ym]=Sn(Yo),xm=y.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...c}=e,u=At(Yo,n),l=Ot(Yo,n),s=u.value===r,[a,f]=y.useState(i??""),[d,h]=y.useState(!1),m=re(t,b=>{var w;return(w=l.itemRefCallback)==null?void 0:w.call(l,b,r,o)}),p=Re(),v=y.useRef("touch"),x=()=>{o||(u.onValueChange(r),u.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return g.jsx(iS,{scope:n,value:r,disabled:o,textId:p,isSelected:s,onItemTextChange:y.useCallback(b=>{f(w=>w||((b==null?void 0:b.textContent)??"").trim())},[]),children:g.jsx(Ri.ItemSlot,{scope:n,value:r,disabled:o,textValue:a,children:g.jsx(z.div,{role:"option","aria-labelledby":p,"data-highlighted":d?"":void 0,"aria-selected":s&&d,"data-state":s?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...c,ref:m,onFocus:B(c.onFocus,()=>h(!0)),onBlur:B(c.onBlur,()=>h(!1)),onClick:B(c.onClick,()=>{v.current!=="mouse"&&x()}),onPointerUp:B(c.onPointerUp,()=>{v.current==="mouse"&&x()}),onPointerDown:B(c.onPointerDown,b=>{v.current=b.pointerType}),onPointerMove:B(c.onPointerMove,b=>{var w;v.current=b.pointerType,o?(w=l.onItemLeave)==null||w.call(l):v.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:B(c.onPointerLeave,b=>{var w;b.currentTarget===document.activeElement&&((w=l.onItemLeave)==null||w.call(l))}),onKeyDown:B(c.onKeyDown,b=>{var S;((S=l.searchRef)==null?void 0:S.current)!==""&&b.key===" "||(GE.includes(b.key)&&x(),b.key===" "&&b.preventDefault())})})})})});xm.displayName=Yo;var Gn="SelectItemText",bm=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,c=At(Gn,n),u=Ot(Gn,n),l=ym(Gn,n),s=qE(Gn,n),[a,f]=y.useState(null),d=re(t,x=>f(x),l.onItemTextChange,x=>{var b;return(b=u.itemTextRefCallback)==null?void 0:b.call(u,x,l.value,l.disabled)}),h=a==null?void 0:a.textContent,m=y.useMemo(()=>g.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:p,onNativeOptionRemove:v}=s;return we(()=>(p(m),()=>v(m)),[p,v,m]),g.jsxs(g.Fragment,{children:[g.jsx(z.span,{id:l.textId,...i,ref:d}),l.isSelected&&c.valueNode&&!c.valueNodeHasChildren?oi.createPortal(i.children,c.valueNode):null]})});bm.displayName=Gn;var wm="SelectItemIndicator",sS=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return ym(wm,n).isSelected?g.jsx(z.span,{"aria-hidden":!0,...r,ref:t}):null});sS.displayName=wm;var Vs="SelectScrollUpButton",aS=y.forwardRef((e,t)=>{const n=Ot(Vs,e.__scopeSelect),r=oc(Vs,e.__scopeSelect),[o,i]=y.useState(!1),c=re(t,r.onScrollButtonChange);return we(()=>{if(n.viewport&&n.isPositioned){let u=function(){const s=l.scrollTop>0;i(s)};const l=n.viewport;return u(),l.addEventListener("scroll",u),()=>l.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),o?g.jsx(Em,{...e,ref:c,onAutoScroll:()=>{const{viewport:u,selectedItem:l}=n;u&&l&&(u.scrollTop=u.scrollTop-l.offsetHeight)}}):null});aS.displayName=Vs;var Bs="SelectScrollDownButton",cS=y.forwardRef((e,t)=>{const n=Ot(Bs,e.__scopeSelect),r=oc(Bs,e.__scopeSelect),[o,i]=y.useState(!1),c=re(t,r.onScrollButtonChange);return we(()=>{if(n.viewport&&n.isPositioned){let u=function(){const s=l.scrollHeight-l.clientHeight,a=Math.ceil(l.scrollTop)<s;i(a)};const l=n.viewport;return u(),l.addEventListener("scroll",u),()=>l.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),o?g.jsx(Em,{...e,ref:c,onAutoScroll:()=>{const{viewport:u,selectedItem:l}=n;u&&l&&(u.scrollTop=u.scrollTop+l.offsetHeight)}}):null});cS.displayName=Bs;var Em=y.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=Ot("SelectScrollButton",n),c=y.useRef(null),u=Ti(n),l=y.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return y.useEffect(()=>()=>l(),[l]),we(()=>{var a;const s=u().find(f=>f.ref.current===document.activeElement);(a=s==null?void 0:s.ref.current)==null||a.scrollIntoView({block:"nearest"})},[u]),g.jsx(z.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:B(o.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(r,50))}),onPointerMove:B(o.onPointerMove,()=>{var s;(s=i.onItemLeave)==null||s.call(i),c.current===null&&(c.current=window.setInterval(r,50))}),onPointerLeave:B(o.onPointerLeave,()=>{l()})})}),lS="SelectSeparator",uS=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return g.jsx(z.div,{"aria-hidden":!0,...r,ref:t})});uS.displayName=lS;var $s="SelectArrow",fS=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Pi(n),i=At($s,n),c=Ot($s,n);return i.open&&c.position==="popper"?g.jsx(bi,{...o,...r,ref:t}):null});fS.displayName=$s;var dS="SelectBubbleInput",Sm=y.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=y.useRef(null),i=re(r,o),c=fr(t);return y.useEffect(()=>{const u=o.current;if(!u)return;const l=window.HTMLSelectElement.prototype,a=Object.getOwnPropertyDescriptor(l,"value").set;if(c!==t&&a){const f=new Event("change",{bubbles:!0});a.call(u,t),u.dispatchEvent(f)}},[c,t]),g.jsx(z.select,{...n,style:{...xd,...n.style},ref:i,defaultValue:t})});Sm.displayName=dS;function Cm(e){return e===""||e===void 0}function _m(e){const t=Ze(e),n=y.useRef(""),r=y.useRef(0),o=y.useCallback(c=>{const u=n.current+c;t(u),(function l(s){n.current=s,window.clearTimeout(r.current),s!==""&&(r.current=window.setTimeout(()=>l(""),1e3))})(u)},[t]),i=y.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function Rm(e,t,n){const o=t.length>1&&Array.from(t).every(s=>s===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let c=hS(e,Math.max(i,0));o.length===1&&(c=c.filter(s=>s!==n));const l=c.find(s=>s.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function hS(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var pS=om,mS=sm,gS=cm,vS=lm,yS=um,xS=fm,bS=mm,wS=xm,ES=bm,Tm=["PageUp","PageDown"],Pm=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Am={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Cn="Slider",[Us,SS,CS]=ar(Cn),[Om]=Ee(Cn,[CS]),[_S,Ai]=Om(Cn),Mm=y.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:c="horizontal",disabled:u=!1,minStepsBetweenThumbs:l=0,defaultValue:s=[r],value:a,onValueChange:f=()=>{},onValueCommit:d=()=>{},inverted:h=!1,form:m,...p}=e,v=y.useRef(new Set),x=y.useRef(0),w=c==="horizontal"?RS:TS,[S=[],E]=Ne({prop:a,defaultProp:s,onChange:M=>{var V;(V=[...v.current][x.current])==null||V.focus(),f(M)}}),A=y.useRef(S);function R(M){const j=IS(S,M);P(M,j)}function T(M){P(M,x.current)}function I(){const M=A.current[x.current];S[x.current]!==M&&d(S)}function P(M,j,{commit:V}={commit:!1}){const $=kS(i),K=LS(Math.round((M-r)/i)*i+r,$),G=qo(K,[r,o]);E((H=[])=>{const U=OS(H,G,j);if(DS(U,l*i)){x.current=U.indexOf(G);const L=String(U)!==String(H);return L&&V&&d(U),L?U:H}else return H})}return g.jsx(_S,{scope:e.__scopeSlider,name:n,disabled:u,min:r,max:o,valueIndexToChangeRef:x,thumbs:v.current,values:S,orientation:c,form:m,children:g.jsx(Us.Provider,{scope:e.__scopeSlider,children:g.jsx(Us.Slot,{scope:e.__scopeSlider,children:g.jsx(w,{"aria-disabled":u,"data-disabled":u?"":void 0,...p,ref:t,onPointerDown:B(p.onPointerDown,()=>{u||(A.current=S)}),min:r,max:o,inverted:h,onSlideStart:u?void 0:R,onSlideMove:u?void 0:T,onSlideEnd:u?void 0:I,onHomeKeyDown:()=>!u&&P(r,0,{commit:!0}),onEndKeyDown:()=>!u&&P(o,S.length-1,{commit:!0}),onStepKeyDown:({event:M,direction:j})=>{if(!u){const K=Tm.includes(M.key)||M.shiftKey&&Pm.includes(M.key)?10:1,G=x.current,H=S[G],U=i*K*j;P(H+U,G,{commit:!0})}}})})})})});Mm.displayName=Cn;var[Im,Nm]=Om(Cn,{startEdge:"left",endEdge:"right",size:"width",direction:1}),RS=y.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:c,onSlideMove:u,onSlideEnd:l,onStepKeyDown:s,...a}=e,[f,d]=y.useState(null),h=re(t,w=>d(w)),m=y.useRef(void 0),p=Kt(o),v=p==="ltr",x=v&&!i||!v&&i;function b(w){const S=m.current||f.getBoundingClientRect(),E=[0,S.width],R=ic(E,x?[n,r]:[r,n]);return m.current=S,R(w-S.left)}return g.jsx(Im,{scope:e.__scopeSlider,startEdge:x?"left":"right",endEdge:x?"right":"left",direction:x?1:-1,size:"width",children:g.jsx(jm,{dir:p,"data-orientation":"horizontal",...a,ref:h,style:{...a.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const S=b(w.clientX);c==null||c(S)},onSlideMove:w=>{const S=b(w.clientX);u==null||u(S)},onSlideEnd:()=>{m.current=void 0,l==null||l()},onStepKeyDown:w=>{const E=Am[x?"from-left":"from-right"].includes(w.key);s==null||s({event:w,direction:E?-1:1})}})})}),TS=y.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:c,onSlideEnd:u,onStepKeyDown:l,...s}=e,a=y.useRef(null),f=re(t,a),d=y.useRef(void 0),h=!o;function m(p){const v=d.current||a.current.getBoundingClientRect(),x=[0,v.height],w=ic(x,h?[r,n]:[n,r]);return d.current=v,w(p-v.top)}return g.jsx(Im,{scope:e.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:g.jsx(jm,{"data-orientation":"vertical",...s,ref:f,style:{...s.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:p=>{const v=m(p.clientY);i==null||i(v)},onSlideMove:p=>{const v=m(p.clientY);c==null||c(v)},onSlideEnd:()=>{d.current=void 0,u==null||u()},onStepKeyDown:p=>{const x=Am[h?"from-bottom":"from-top"].includes(p.key);l==null||l({event:p,direction:x?-1:1})}})})}),jm=y.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:c,onEndKeyDown:u,onStepKeyDown:l,...s}=e,a=Ai(Cn,n);return g.jsx(z.span,{...s,ref:t,onKeyDown:B(e.onKeyDown,f=>{f.key==="Home"?(c(f),f.preventDefault()):f.key==="End"?(u(f),f.preventDefault()):Tm.concat(Pm).includes(f.key)&&(l(f),f.preventDefault())}),onPointerDown:B(e.onPointerDown,f=>{const d=f.target;d.setPointerCapture(f.pointerId),f.preventDefault(),a.thumbs.has(d)?d.focus():r(f)}),onPointerMove:B(e.onPointerMove,f=>{f.target.hasPointerCapture(f.pointerId)&&o(f)}),onPointerUp:B(e.onPointerUp,f=>{const d=f.target;d.hasPointerCapture(f.pointerId)&&(d.releasePointerCapture(f.pointerId),i(f))})})}),Dm="SliderTrack",km=y.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Ai(Dm,n);return g.jsx(z.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});km.displayName=Dm;var Gs="SliderRange",Lm=y.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Ai(Gs,n),i=Nm(Gs,n),c=y.useRef(null),u=re(t,c),l=o.values.length,s=o.values.map(d=>Bm(d,o.min,o.max)),a=l>1?Math.min(...s):0,f=100-Math.max(...s);return g.jsx(z.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:u,style:{...e.style,[i.startEdge]:a+"%",[i.endEdge]:f+"%"}})});Lm.displayName=Gs;var Hs="SliderThumb",Fm=y.forwardRef((e,t)=>{const n=SS(e.__scopeSlider),[r,o]=y.useState(null),i=re(t,u=>o(u)),c=y.useMemo(()=>r?n().findIndex(u=>u.ref.current===r):-1,[n,r]);return g.jsx(PS,{...e,ref:i,index:c})}),PS=y.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,c=Ai(Hs,n),u=Nm(Hs,n),[l,s]=y.useState(null),a=re(t,b=>s(b)),f=l?c.form||!!l.closest("form"):!0,d=dr(l),h=c.values[r],m=h===void 0?0:Bm(h,c.min,c.max),p=MS(r,c.values.length),v=d==null?void 0:d[u.size],x=v?NS(v,m,u.direction):0;return y.useEffect(()=>{if(l)return c.thumbs.add(l),()=>{c.thumbs.delete(l)}},[l,c.thumbs]),g.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[u.startEdge]:`calc(${m}% + ${x}px)`},children:[g.jsx(Us.ItemSlot,{scope:e.__scopeSlider,children:g.jsx(z.span,{role:"slider","aria-label":e["aria-label"]||p,"aria-valuemin":c.min,"aria-valuenow":h,"aria-valuemax":c.max,"aria-orientation":c.orientation,"data-orientation":c.orientation,"data-disabled":c.disabled?"":void 0,tabIndex:c.disabled?void 0:0,...i,ref:a,style:h===void 0?{display:"none"}:e.style,onFocus:B(e.onFocus,()=>{c.valueIndexToChangeRef.current=r})})}),f&&g.jsx(Vm,{name:o??(c.name?c.name+(c.values.length>1?"[]":""):void 0),form:c.form,value:h},r)]})});Fm.displayName=Hs;var AS="RadioBubbleInput",Vm=y.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=y.useRef(null),i=re(o,r),c=fr(t);return y.useEffect(()=>{const u=o.current;if(!u)return;const l=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(l,"value").set;if(c!==t&&a){const f=new Event("input",{bubbles:!0});a.call(u,t),u.dispatchEvent(f)}},[c,t]),g.jsx(z.input,{style:{display:"none"},...n,ref:i,defaultValue:t})});Vm.displayName=AS;function OS(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function Bm(e,t,n){const i=100/(n-t)*(e-t);return qo(i,[0,100])}function MS(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function IS(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function NS(e,t,n){const r=e/2,i=ic([0,50],[0,r]);return(r-i(t)*n)*n}function jS(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function DS(e,t){if(t>0){const n=jS(e);return Math.min(...n)>=t}return!0}function ic(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function kS(e){return(String(e).split(".")[1]||"").length}function LS(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var FS=Mm,VS=km,BS=Lm,$S=Fm,Oi="Switch",[US]=Ee(Oi),[GS,HS]=US(Oi),$m=y.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:c,disabled:u,value:l="on",onCheckedChange:s,form:a,...f}=e,[d,h]=y.useState(null),m=re(t,w=>h(w)),p=y.useRef(!1),v=d?a||!!d.closest("form"):!0,[x,b]=Ne({prop:o,defaultProp:i??!1,onChange:s,caller:Oi});return g.jsxs(GS,{scope:n,checked:x,disabled:u,children:[g.jsx(z.button,{type:"button",role:"switch","aria-checked":x,"aria-required":c,"data-state":zm(x),"data-disabled":u?"":void 0,disabled:u,value:l,...f,ref:m,onClick:B(e.onClick,w=>{b(S=>!S),v&&(p.current=w.isPropagationStopped(),p.current||w.stopPropagation())})}),v&&g.jsx(Hm,{control:d,bubbles:!p.current,name:r,value:l,checked:x,required:c,disabled:u,form:a,style:{transform:"translateX(-100%)"}})]})});$m.displayName=Oi;var Um="SwitchThumb",Gm=y.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=HS(Um,n);return g.jsx(z.span,{"data-state":zm(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});Gm.displayName=Um;var zS="SwitchBubbleInput",Hm=y.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},i)=>{const c=y.useRef(null),u=re(c,i),l=fr(n),s=dr(t);return y.useEffect(()=>{const a=c.current;if(!a)return;const f=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&h){const m=new Event("click",{bubbles:r});h.call(a,n),a.dispatchEvent(m)}},[l,n,r]),g.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:u,style:{...o.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Hm.displayName=zS;function zm(e){return e?"checked":"unchecked"}var WS=$m,qS=Gm,Mi="Tabs",[KS]=Ee(Mi,[En]),Wm=En(),[YS,sc]=KS(Mi),qm=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:c="horizontal",dir:u,activationMode:l="automatic",...s}=e,a=Kt(u),[f,d]=Ne({prop:r,onChange:o,defaultProp:i??"",caller:Mi});return g.jsx(YS,{scope:n,baseId:Re(),value:f,onValueChange:d,orientation:c,dir:a,activationMode:l,children:g.jsx(z.div,{dir:a,"data-orientation":c,...s,ref:t})})});qm.displayName=Mi;var Km="TabsList",Ym=y.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=sc(Km,n),c=Wm(n);return g.jsx(Va,{asChild:!0,...c,orientation:i.orientation,dir:i.dir,loop:r,children:g.jsx(z.div,{role:"tablist","aria-orientation":i.orientation,...o,ref:t})})});Ym.displayName=Km;var Xm="TabsTrigger",Zm=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,c=sc(Xm,n),u=Wm(n),l=eg(c.baseId,r),s=tg(c.baseId,r),a=r===c.value;return g.jsx(Ba,{asChild:!0,...u,focusable:!o,active:a,children:g.jsx(z.button,{type:"button",role:"tab","aria-selected":a,"aria-controls":s,"data-state":a?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...i,ref:t,onMouseDown:B(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?c.onValueChange(r):f.preventDefault()}),onKeyDown:B(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&c.onValueChange(r)}),onFocus:B(e.onFocus,()=>{const f=c.activationMode!=="manual";!a&&!o&&f&&c.onValueChange(r)})})})});Zm.displayName=Xm;var Qm="TabsContent",Jm=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...c}=e,u=sc(Qm,n),l=eg(u.baseId,r),s=tg(u.baseId,r),a=r===u.value,f=y.useRef(a);return y.useEffect(()=>{const d=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(d)},[]),g.jsx(je,{present:o||a,children:({present:d})=>g.jsx(z.div,{"data-state":a?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":l,hidden:!d,id:s,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:d&&i})})});Jm.displayName=Qm;function eg(e,t){return`${e}-trigger-${t}`}function tg(e,t){return`${e}-content-${t}`}var XS=qm,ZS=Ym,QS=Zm,Tl=Jm,[Ii]=Ee("Tooltip",[Pt]),Ni=Pt(),ng="TooltipProvider",JS=700,zs="tooltip.open",[eC,ac]=Ii(ng),rg=e=>{const{__scopeTooltip:t,delayDuration:n=JS,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,c=y.useRef(!0),u=y.useRef(!1),l=y.useRef(0);return y.useEffect(()=>{const s=l.current;return()=>window.clearTimeout(s)},[]),g.jsx(eC,{scope:t,isOpenDelayedRef:c,delayDuration:n,onOpen:y.useCallback(()=>{window.clearTimeout(l.current),c.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>c.current=!0,r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:y.useCallback(s=>{u.current=s},[]),disableHoverableContent:o,children:i})};rg.displayName=ng;var tr="Tooltip",[tC,wr]=Ii(tr),og=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:i,disableHoverableContent:c,delayDuration:u}=e,l=ac(tr,e.__scopeTooltip),s=Ni(t),[a,f]=y.useState(null),d=Re(),h=y.useRef(0),m=c??l.disableHoverableContent,p=u??l.delayDuration,v=y.useRef(!1),[x,b]=Ne({prop:r,defaultProp:o??!1,onChange:R=>{R?(l.onOpen(),document.dispatchEvent(new CustomEvent(zs))):l.onClose(),i==null||i(R)},caller:tr}),w=y.useMemo(()=>x?v.current?"delayed-open":"instant-open":"closed",[x]),S=y.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,b(!0)},[b]),E=y.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b(!1)},[b]),A=y.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,b(!0),h.current=0},p)},[p,b]);return y.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),g.jsx(yi,{...s,children:g.jsx(tC,{scope:t,contentId:d,open:x,stateAttribute:w,trigger:a,onTriggerChange:f,onTriggerEnter:y.useCallback(()=>{l.isOpenDelayedRef.current?A():S()},[l.isOpenDelayedRef,A,S]),onTriggerLeave:y.useCallback(()=>{m?E():(window.clearTimeout(h.current),h.current=0)},[E,m]),onOpen:S,onClose:E,disableHoverableContent:m,children:n})})};og.displayName=tr;var Ws="TooltipTrigger",ig=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=wr(Ws,n),i=ac(Ws,n),c=Ni(n),u=y.useRef(null),l=re(t,u,o.onTriggerChange),s=y.useRef(!1),a=y.useRef(!1),f=y.useCallback(()=>s.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),g.jsx(pr,{asChild:!0,...c,children:g.jsx(z.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:B(e.onPointerMove,d=>{d.pointerType!=="touch"&&!a.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),a.current=!0)}),onPointerLeave:B(e.onPointerLeave,()=>{o.onTriggerLeave(),a.current=!1}),onPointerDown:B(e.onPointerDown,()=>{o.open&&o.onClose(),s.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:B(e.onFocus,()=>{s.current||o.onOpen()}),onBlur:B(e.onBlur,o.onClose),onClick:B(e.onClick,o.onClose)})})});ig.displayName=Ws;var cc="TooltipPortal",[nC,rC]=Ii(cc,{forceMount:void 0}),sg=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=wr(cc,t);return g.jsx(nC,{scope:t,forceMount:n,children:g.jsx(je,{present:n||i.open,children:g.jsx(lr,{asChild:!0,container:o,children:r})})})};sg.displayName=cc;var vn="TooltipContent",ag=y.forwardRef((e,t)=>{const n=rC(vn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,c=wr(vn,e.__scopeTooltip);return g.jsx(je,{present:r||c.open,children:c.disableHoverableContent?g.jsx(cg,{side:o,...i,ref:t}):g.jsx(oC,{side:o,...i,ref:t})})}),oC=y.forwardRef((e,t)=>{const n=wr(vn,e.__scopeTooltip),r=ac(vn,e.__scopeTooltip),o=y.useRef(null),i=re(t,o),[c,u]=y.useState(null),{trigger:l,onClose:s}=n,a=o.current,{onPointerInTransitChange:f}=r,d=y.useCallback(()=>{u(null),f(!1)},[f]),h=y.useCallback((m,p)=>{const v=m.currentTarget,x={x:m.clientX,y:m.clientY},b=cC(x,v.getBoundingClientRect()),w=lC(x,b),S=uC(p.getBoundingClientRect()),E=dC([...w,...S]);u(E),f(!0)},[f]);return y.useEffect(()=>()=>d(),[d]),y.useEffect(()=>{if(l&&a){const m=v=>h(v,a),p=v=>h(v,l);return l.addEventListener("pointerleave",m),a.addEventListener("pointerleave",p),()=>{l.removeEventListener("pointerleave",m),a.removeEventListener("pointerleave",p)}}},[l,a,h,d]),y.useEffect(()=>{if(c){const m=p=>{const v=p.target,x={x:p.clientX,y:p.clientY},b=(l==null?void 0:l.contains(v))||(a==null?void 0:a.contains(v)),w=!fC(x,c);b?d():w&&(d(),s())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[l,a,c,s,d]),g.jsx(cg,{...e,ref:i})}),[iC,sC]=Ii(tr,{isInside:!1}),aC=Iy("TooltipContent"),cg=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:c,...u}=e,l=wr(vn,n),s=Ni(n),{onClose:a}=l;return y.useEffect(()=>(document.addEventListener(zs,a),()=>document.removeEventListener(zs,a)),[a]),y.useEffect(()=>{if(l.trigger){const f=d=>{const h=d.target;h!=null&&h.contains(l.trigger)&&a()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,a]),g.jsx(xn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:f=>f.preventDefault(),onDismiss:a,children:g.jsxs(xi,{"data-state":l.stateAttribute,...s,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx(aC,{children:r}),g.jsx(iC,{scope:n,isInside:!0,children:g.jsx(Fy,{id:l.contentId,role:"tooltip",children:o||r})})]})})});ag.displayName=vn;var lg="TooltipArrow",ug=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ni(n);return sC(lg,n).isInside?null:g.jsx(bi,{...o,...r,ref:t})});ug.displayName=lg;function cC(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function lC(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function uC(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function fC(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,c=t.length-1;i<t.length;c=i++){const u=t[i],l=t[c],s=u.x,a=u.y,f=l.x,d=l.y;a>r!=d>r&&n<(f-s)*(r-a)/(d-a)+s&&(o=!o)}return o}function dC(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),hC(t)}function hC(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],c=t[t.length-2];if((i.x-c.x)*(o.y-c.y)>=(i.y-c.y)*(o.x-c.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],c=n[n.length-2];if((i.x-c.x)*(o.y-c.y)>=(i.y-c.y)*(o.x-c.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var pC=rg,mC=og,gC=ig,vC=sg,yC=ag,xC=ug;const bC=_.forwardRef(({children:e,className:t,...n},r)=>g.jsx(d0,{className:N.classNames("overflow-hidden rounded-xl shadow-(--box-shadow-accordion)",t),ref:r,...n,children:e})),wC=_.forwardRef(({children:e,className:t,triggerIcon:n,...r},o)=>g.jsx(h0,{className:"flex",children:g.jsxs(p0,{className:N.classNames("group flex h-14 flex-1 cursor-pointer items-center justify-between px-6 text-[15px] leading-none bg-white space-x-2",t),ref:o,...r,children:[e,n??g.jsx(ce.SvgArrowMp,{className:"size-3 shrink-0 transition-transform duration-300 ease-in-out group-data-[state=open]:rotate-180 fill-primary-blue"})]})})),lc=_.createContext({});function uc(e){const t=_.useRef(null);return t.current===null&&(t.current=e()),t.current}const fg=typeof window<"u",dg=fg?_.useLayoutEffect:_.useEffect,ji=_.createContext(null);function fc(e,t){e.indexOf(t)===-1&&e.push(t)}function dc(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ct=(e,t,n)=>n>t?t:n<e?e:n;function qs(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let _n=()=>{},mt=()=>{};var fd;typeof process<"u"&&((fd=process.env)==null?void 0:fd.NODE_ENV)!=="production"&&(_n=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(qs(t,n))},mt=(e,t,n)=>{if(!e)throw new Error(qs(t,n))});const gt={},hg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function pg(e){return typeof e=="object"&&e!==null}const mg=e=>/^0[^.\s]+$/u.test(e);function hc(e){let t;return()=>(t===void 0&&(t=e()),t)}const ze=e=>e,EC=(e,t)=>n=>t(e(n)),Er=(...e)=>e.reduce(EC),nr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class pc{constructor(){this.subscriptions=[]}add(t){return fc(this.subscriptions,t),()=>dc(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const c=this.subscriptions[i];c&&c(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const it=e=>e*1e3,Ge=e=>e/1e3;function gg(e,t){return t?e*(1e3/t):0}const Pl=new Set;function mc(e,t,n){e||Pl.has(t)||(console.warn(qs(t,n)),Pl.add(t))}const vg=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,SC=1e-7,CC=12;function _C(e,t,n,r,o){let i,c,u=0;do c=t+(n-t)/2,i=vg(c,r,o)-e,i>0?n=c:t=c;while(Math.abs(i)>SC&&++u<CC);return c}function Sr(e,t,n,r){if(e===t&&n===r)return ze;const o=i=>_C(i,0,1,e,n);return i=>i===0||i===1?i:vg(o(i),t,r)}const yg=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,xg=e=>t=>1-e(1-t),bg=Sr(.33,1.53,.69,.99),gc=xg(bg),wg=yg(gc),Eg=e=>(e*=2)<1?.5*gc(e):.5*(2-Math.pow(2,-10*(e-1))),vc=e=>1-Math.sin(Math.acos(e)),Sg=xg(vc),Cg=yg(vc),RC=Sr(.42,0,1,1),TC=Sr(0,0,.58,1),_g=Sr(.42,0,.58,1),PC=e=>Array.isArray(e)&&typeof e[0]!="number",Rg=e=>Array.isArray(e)&&typeof e[0]=="number",Al={linear:ze,easeIn:RC,easeInOut:_g,easeOut:TC,circIn:vc,circInOut:Cg,circOut:Sg,backIn:gc,backInOut:wg,backOut:bg,anticipate:Eg},AC=e=>typeof e=="string",Ol=e=>{if(Rg(e)){mt(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return Sr(t,n,r,o)}else if(AC(e))return mt(Al[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Al[e];return e},Br=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function OC(e,t){let n=new Set,r=new Set,o=!1,i=!1;const c=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function l(a){c.has(a)&&(s.schedule(a),e()),a(u)}const s={schedule:(a,f=!1,d=!1)=>{const m=d&&o?n:r;return f&&c.add(a),m.has(a)||m.add(a),a},cancel:a=>{r.delete(a),c.delete(a)},process:a=>{if(u=a,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(l),n.clear(),o=!1,i&&(i=!1,s.process(a))}};return s}const MC=40;function Tg(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,c=Br.reduce((w,S)=>(w[S]=OC(i),w),{}),{setup:u,read:l,resolveKeyframes:s,preUpdate:a,update:f,preRender:d,render:h,postRender:m}=c,p=()=>{const w=gt.useManualTiming?o.timestamp:performance.now();n=!1,gt.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(w-o.timestamp,MC),1)),o.timestamp=w,o.isProcessing=!0,u.process(o),l.process(o),s.process(o),a.process(o),f.process(o),d.process(o),h.process(o),m.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(p))},v=()=>{n=!0,r=!0,o.isProcessing||e(p)};return{schedule:Br.reduce((w,S)=>{const E=c[S];return w[S]=(A,R=!1,T=!1)=>(n||v(),E.schedule(A,R,T)),w},{}),cancel:w=>{for(let S=0;S<Br.length;S++)c[Br[S]].cancel(w)},state:o,steps:c}}const{schedule:pe,cancel:Rt,state:_e,steps:ts}=Tg(typeof requestAnimationFrame<"u"?requestAnimationFrame:ze,!0);let Do;function IC(){Do=void 0}const Me={now:()=>(Do===void 0&&Me.set(_e.isProcessing||gt.useManualTiming?_e.timestamp:performance.now()),Do),set:e=>{Do=e,queueMicrotask(IC)}},Pg=e=>t=>typeof t=="string"&&t.startsWith(e),Ag=Pg("--"),NC=Pg("var(--"),yc=e=>NC(e)?jC.test(e.split("/*")[0].trim()):!1,jC=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Ml(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Rn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},rr={...Rn,transform:e=>ct(0,1,e)},$r={...Rn,default:1},Wn=e=>Math.round(e*1e5)/1e5,xc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function DC(e){return e==null}const kC=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,bc=(e,t)=>n=>!!(typeof n=="string"&&kC.test(n)&&n.startsWith(e)||t&&!DC(n)&&Object.prototype.hasOwnProperty.call(n,t)),Og=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,c,u]=r.match(xc);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(c),alpha:u!==void 0?parseFloat(u):1}},LC=e=>ct(0,255,e),ns={...Rn,transform:e=>Math.round(LC(e))},Vt={test:bc("rgb","red"),parse:Og("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ns.transform(e)+", "+ns.transform(t)+", "+ns.transform(n)+", "+Wn(rr.transform(r))+")"};function FC(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Ks={test:bc("#"),parse:FC,transform:Vt.transform},Cr=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),bt=Cr("deg"),st=Cr("%"),W=Cr("px"),VC=Cr("vh"),BC=Cr("vw"),Il={...st,parse:e=>st.parse(e)/100,transform:e=>st.transform(e*100)},sn={test:bc("hsl","hue"),parse:Og("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+st.transform(Wn(t))+", "+st.transform(Wn(n))+", "+Wn(rr.transform(r))+")"},be={test:e=>Vt.test(e)||Ks.test(e)||sn.test(e),parse:e=>Vt.test(e)?Vt.parse(e):sn.test(e)?sn.parse(e):Ks.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Vt.transform(e):sn.transform(e),getAnimatableNone:e=>{const t=be.parse(e);return t.alpha=0,be.transform(t)}},$C=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function UC(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(xc))==null?void 0:t.length)||0)+(((n=e.match($C))==null?void 0:n.length)||0)>0}const Mg="number",Ig="color",GC="var",HC="var(",Nl="${}",zC=/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 or(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const u=t.replace(zC,l=>(be.test(l)?(r.color.push(i),o.push(Ig),n.push(be.parse(l))):l.startsWith(HC)?(r.var.push(i),o.push(GC),n.push(l)):(r.number.push(i),o.push(Mg),n.push(parseFloat(l))),++i,Nl)).split(Nl);return{values:n,split:u,indexes:r,types:o}}function Ng(e){return or(e).values}function jg(e){const{split:t,types:n}=or(e),r=t.length;return o=>{let i="";for(let c=0;c<r;c++)if(i+=t[c],o[c]!==void 0){const u=n[c];u===Mg?i+=Wn(o[c]):u===Ig?i+=be.transform(o[c]):i+=o[c]}return i}}const WC=e=>typeof e=="number"?0:be.test(e)?be.getAnimatableNone(e):e;function qC(e){const t=Ng(e);return jg(e)(t.map(WC))}const Tt={test:UC,parse:Ng,createTransformer:jg,getAnimatableNone:qC};function rs(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 KC({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,c=0;if(!t)o=i=c=n;else{const u=n<.5?n*(1+t):n+t-n*t,l=2*n-u;o=rs(l,u,e+1/3),i=rs(l,u,e),c=rs(l,u,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(c*255),alpha:r}}function Xo(e,t){return n=>n>0?t:e}const ve=(e,t,n)=>e+(t-e)*n,os=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},YC=[Ks,Vt,sn],XC=e=>YC.find(t=>t.test(e));function jl(e){const t=XC(e);if(_n(!!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===sn&&(n=KC(n)),n}const Dl=(e,t)=>{const n=jl(e),r=jl(t);if(!n||!r)return Xo(e,t);const o={...n};return i=>(o.red=os(n.red,r.red,i),o.green=os(n.green,r.green,i),o.blue=os(n.blue,r.blue,i),o.alpha=ve(n.alpha,r.alpha,i),Vt.transform(o))},Ys=new Set(["none","hidden"]);function ZC(e,t){return Ys.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function QC(e,t){return n=>ve(e,t,n)}function wc(e){return typeof e=="number"?QC:typeof e=="string"?yc(e)?Xo:be.test(e)?Dl:t_:Array.isArray(e)?Dg:typeof e=="object"?be.test(e)?Dl:JC:Xo}function Dg(e,t){const n=[...e],r=n.length,o=e.map((i,c)=>wc(i)(i,t[c]));return i=>{for(let c=0;c<r;c++)n[c]=o[c](i);return n}}function JC(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=wc(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function e_(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],c=e.indexes[i][r[i]],u=e.values[c]??0;n[o]=u,r[i]++}return n}const t_=(e,t)=>{const n=Tt.createTransformer(t),r=or(e),o=or(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Ys.has(e)&&!o.values.length||Ys.has(t)&&!r.values.length?ZC(e,t):Er(Dg(e_(r,o),o.values),n):(_n(!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"),Xo(e,t))};function kg(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ve(e,t,n):wc(e)(e,t)}const n_=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>pe.update(t,n),stop:()=>Rt(t),now:()=>_e.isProcessing?_e.timestamp:Me.now()}},Lg=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=Math.round(e(i/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Zo=2e4;function Ec(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Zo;)t+=n,r=e.next(t);return t>=Zo?1/0:t}function r_(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Ec(r),Zo);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:Ge(o)}}const o_=5;function Fg(e,t,n){const r=Math.max(t-o_,0);return gg(n-e(r),t-r)}const ge={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},is=.001;function i_({duration:e=ge.duration,bounce:t=ge.bounce,velocity:n=ge.velocity,mass:r=ge.mass}){let o,i;_n(e<=it(ge.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let c=1-t;c=ct(ge.minDamping,ge.maxDamping,c),e=ct(ge.minDuration,ge.maxDuration,Ge(e)),c<1?(o=s=>{const a=s*c,f=a*e,d=a-n,h=Xs(s,c),m=Math.exp(-f);return is-d/h*m},i=s=>{const f=s*c*e,d=f*n+n,h=Math.pow(c,2)*Math.pow(s,2)*e,m=Math.exp(-f),p=Xs(Math.pow(s,2),c);return(-o(s)+is>0?-1:1)*((d-h)*m)/p}):(o=s=>{const a=Math.exp(-s*e),f=(s-n)*e+1;return-is+a*f},i=s=>{const a=Math.exp(-s*e),f=(n-s)*(e*e);return a*f});const u=5/e,l=a_(o,i,u);if(e=it(e),isNaN(l))return{stiffness:ge.stiffness,damping:ge.damping,duration:e};{const s=Math.pow(l,2)*r;return{stiffness:s,damping:c*2*Math.sqrt(r*s),duration:e}}}const s_=12;function a_(e,t,n){let r=n;for(let o=1;o<s_;o++)r=r-e(r)/t(r);return r}function Xs(e,t){return e*Math.sqrt(1-t*t)}const c_=["duration","bounce"],l_=["stiffness","damping","mass"];function kl(e,t){return t.some(n=>e[n]!==void 0)}function u_(e){let t={velocity:ge.velocity,stiffness:ge.stiffness,damping:ge.damping,mass:ge.mass,isResolvedFromDuration:!1,...e};if(!kl(e,l_)&&kl(e,c_))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*ct(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:ge.mass,stiffness:o,damping:i}}else{const n=i_(e);t={...t,...n,mass:ge.mass},t.isResolvedFromDuration=!0}return t}function Qo(e=ge.visualDuration,t=ge.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],c=n.keyframes[n.keyframes.length-1],u={done:!1,value:i},{stiffness:l,damping:s,mass:a,duration:f,velocity:d,isResolvedFromDuration:h}=u_({...n,velocity:-Ge(n.velocity||0)}),m=d||0,p=s/(2*Math.sqrt(l*a)),v=c-i,x=Ge(Math.sqrt(l/a)),b=Math.abs(v)<5;r||(r=b?ge.restSpeed.granular:ge.restSpeed.default),o||(o=b?ge.restDelta.granular:ge.restDelta.default);let w;if(p<1){const E=Xs(x,p);w=A=>{const R=Math.exp(-p*x*A);return c-R*((m+p*x*v)/E*Math.sin(E*A)+v*Math.cos(E*A))}}else if(p===1)w=E=>c-Math.exp(-x*E)*(v+(m+x*v)*E);else{const E=x*Math.sqrt(p*p-1);w=A=>{const R=Math.exp(-p*x*A),T=Math.min(E*A,300);return c-R*((m+p*x*v)*Math.sinh(T)+E*v*Math.cosh(T))/E}}const S={calculatedDuration:h&&f||null,next:E=>{const A=w(E);if(h)u.done=E>=f;else{let R=E===0?m:0;p<1&&(R=E===0?it(m):Fg(w,E,A));const T=Math.abs(R)<=r,I=Math.abs(c-A)<=o;u.done=T&&I}return u.value=u.done?c:A,u},toString:()=>{const E=Math.min(Ec(S),Zo),A=Lg(R=>S.next(E*R).value,E,30);return E+"ms "+A},toTransition:()=>{}};return S}Qo.applyToOptions=e=>{const t=r_(e,100,Qo);return e.ease=t.ease,e.duration=it(t.duration),e.type="keyframes",e};function Zs({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:c,min:u,max:l,restDelta:s=.5,restSpeed:a}){const f=e[0],d={done:!1,value:f},h=T=>u!==void 0&&T<u||l!==void 0&&T>l,m=T=>u===void 0?l:l===void 0||Math.abs(u-T)<Math.abs(l-T)?u:l;let p=n*t;const v=f+p,x=c===void 0?v:c(v);x!==v&&(p=x-f);const b=T=>-p*Math.exp(-T/r),w=T=>x+b(T),S=T=>{const I=b(T),P=w(T);d.done=Math.abs(I)<=s,d.value=d.done?x:P};let E,A;const R=T=>{h(d.value)&&(E=T,A=Qo({keyframes:[d.value,m(d.value)],velocity:Fg(w,T,d.value),damping:o,stiffness:i,restDelta:s,restSpeed:a}))};return R(0),{calculatedDuration:null,next:T=>{let I=!1;return!A&&E===void 0&&(I=!0,S(T),R(T)),E!==void 0&&T>=E?A.next(T-E):(!I&&S(T),d)}}}function f_(e,t,n){const r=[],o=n||gt.mix||kg,i=e.length-1;for(let c=0;c<i;c++){let u=o(e[c],e[c+1]);if(t){const l=Array.isArray(t)?t[c]||ze:t;u=Er(l,u)}r.push(u)}return r}function d_(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(mt(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const c=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const u=f_(t,r,o),l=u.length,s=a=>{if(c&&a<e[0])return t[0];let f=0;if(l>1)for(;f<e.length-2&&!(a<e[f+1]);f++);const d=nr(e[f],e[f+1],a);return u[f](d)};return n?a=>s(ct(e[0],e[i-1],a)):s}function h_(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=nr(0,t,r);e.push(ve(n,1,o))}}function p_(e){const t=[0];return h_(t,e.length-1),t}function m_(e,t){return e.map(n=>n*t)}function g_(e,t){return e.map(()=>t||_g).splice(0,e.length-1)}function an({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=PC(r)?r.map(Ol):Ol(r),i={done:!1,value:t[0]},c=m_(n&&n.length===t.length?n:p_(t),e),u=d_(c,t,{ease:Array.isArray(o)?o:g_(t,o)});return{calculatedDuration:e,next:l=>(i.value=u(l),i.done=l>=e,i)}}const v_=e=>e!==null;function Sc(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(v_),u=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!u||r===void 0?i[u]:r}const y_={decay:Zs,inertia:Zs,tween:an,keyframes:an,spring:Qo};function Vg(e){typeof e.type=="string"&&(e.type=y_[e.type])}class Cc{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 x_=e=>e/100;class _c extends Cc{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,o;const{motionValue:n}=this.options;n&&n.updatedAt!==Me.now()&&this.tick(Me.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(o=(r=this.options).onStop)==null||o.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Vg(t);const{type:n=an,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:c=0}=t;let{keyframes:u}=t;const l=n||an;process.env.NODE_ENV!=="production"&&l!==an&&mt(u.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${u}`,"spring-two-frames"),l!==an&&typeof u[0]!="number"&&(this.mixKeyframes=Er(x_,kg(u[0],u[1])),u=[0,100]);const s=l({...t,keyframes:u});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...u].reverse(),velocity:-c})),s.calculatedDuration===null&&(s.calculatedDuration=Ec(s));const{calculatedDuration:a}=s;this.calculatedDuration=a,this.resolvedDuration=a+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=s}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:o,mixKeyframes:i,mirroredGenerator:c,resolvedDuration:u,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:s=0,keyframes:a,repeat:f,repeatType:d,repeatDelay:h,type:m,onUpdate:p,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const x=this.currentTime-s*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?x<0:x>o;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let w=this.currentTime,S=r;if(f){const T=Math.min(this.currentTime,o)/u;let I=Math.floor(T),P=T%1;!P&&T>=1&&(P=1),P===1&&I--,I=Math.min(I,f+1),!!(I%2)&&(d==="reverse"?(P=1-P,h&&(P-=h/u)):d==="mirror"&&(S=c)),w=ct(0,1,P)*u}const E=b?{done:!1,value:a[0]}:S.next(w);i&&(E.value=i(E.value));let{done:A}=E;!b&&l!==null&&(A=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const R=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return R&&m!==Zs&&(E.value=Sc(a,this.options,v,this.speed)),p&&p(E.value),R&&this.finish(),E}then(t,n){return this.finished.then(t,n)}get duration(){return Ge(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ge(t)}get time(){return Ge(this.currentTime)}set time(t){var n;t=it(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),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Me.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ge(this.currentTime))}play(){var o,i;if(this.isStopped)return;const{driver:t=n_,startTime:n}=this.options;this.driver||(this.driver=t(c=>this.tick(c))),(i=(o=this.options).onPlay)==null||i.call(o);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(Me.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function b_(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Bt=e=>e*180/Math.PI,Qs=e=>{const t=Bt(Math.atan2(e[1],e[0]));return Js(t)},w_={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Qs,rotateZ:Qs,skewX:e=>Bt(Math.atan(e[1])),skewY:e=>Bt(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Js=e=>(e=e%360,e<0&&(e+=360),e),Ll=Qs,Fl=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Vl=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),E_={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Fl,scaleY:Vl,scale:e=>(Fl(e)+Vl(e))/2,rotateX:e=>Js(Bt(Math.atan2(e[6],e[5]))),rotateY:e=>Js(Bt(Math.atan2(-e[2],e[0]))),rotateZ:Ll,rotate:Ll,skewX:e=>Bt(Math.atan(e[4])),skewY:e=>Bt(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ea(e){return e.includes("scale")?1:0}function ta(e,t){if(!e||e==="none")return ea(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=E_,o=n;else{const u=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=w_,o=u}if(!o)return ea(t);const i=r[t],c=o[1].split(",").map(C_);return typeof i=="function"?i(c):c[i]}const S_=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ta(n,t)};function C_(e){return parseFloat(e.trim())}const Tn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Pn=new Set(Tn),Bl=e=>e===Rn||e===W,__=new Set(["x","y","z"]),R_=Tn.filter(e=>!__.has(e));function T_(e){const t=[];return R_.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const wt={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})=>ta(t,"x"),y:(e,{transform:t})=>ta(t,"y")};wt.translateX=wt.x;wt.translateY=wt.y;const $t=new Set;let na=!1,ra=!1,oa=!1;function Bg(){if(ra){const e=Array.from($t).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=T_(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,c])=>{var u;(u=r.getValue(i))==null||u.set(c)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ra=!1,na=!1,$t.forEach(e=>e.complete(oa)),$t.clear()}function $g(){$t.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ra=!0)})}function P_(){oa=!0,$g(),Bg(),oa=!1}class Rc{constructor(t,n,r,o,i,c=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=c}scheduleResolve(){this.state="scheduled",this.isAsync?($t.add(this),na||(na=!0,pe.read($g),pe.resolveKeyframes(Bg))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const i=o==null?void 0:o.get(),c=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const u=r.readValue(n,c);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=c),o&&i===void 0&&o.set(t[0])}b_(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),$t.delete(this)}cancel(){this.state==="scheduled"&&($t.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const A_=e=>e.startsWith("--");function O_(e,t,n){A_(t)?e.style.setProperty(t,n):e.style[t]=n}const M_=hc(()=>window.ScrollTimeline!==void 0),I_={};function N_(e,t){const n=hc(e);return()=>I_[t]??n()}const Ug=N_(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Hn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,$l={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Hn([0,.65,.55,1]),circOut:Hn([.55,0,1,.45]),backIn:Hn([.31,.01,.66,-.59]),backOut:Hn([.33,1.53,.69,.99])};function Gg(e,t){if(e)return typeof e=="function"?Ug()?Lg(e,t):"ease-out":Rg(e)?Hn(e):Array.isArray(e)?e.map(n=>Gg(n,t)||$l.easeOut):$l[e]}function j_(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:c="loop",ease:u="easeOut",times:l}={},s=void 0){const a={[t]:n};l&&(a.offset=l);const f=Gg(u,o);Array.isArray(f)&&(a.easing=f);const d={delay:r,duration:o,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:i+1,direction:c==="reverse"?"alternate":"normal"};return s&&(d.pseudoElement=s),e.animate(a,d)}function Hg(e){return typeof e=="function"&&"applyToOptions"in e}function D_({type:e,...t}){return Hg(e)&&Ug()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class k_ extends Cc{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:i,allowFlatten:c=!1,finalKeyframe:u,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=c,this.options=t,mt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const s=D_(t);this.animation=j_(n,r,o,s,i),s.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const a=Sc(o,this.options,u,this.speed);this.updateMotionValue?this.updateMotionValue(a):O_(n,r,a),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Ge(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ge(t)}get time(){return Ge(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=it(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 this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&M_()?(this.animation.timeline=t,ze):n(this)}}const zg={anticipate:Eg,backInOut:wg,circInOut:Cg};function L_(e){return e in zg}function F_(e){typeof e.ease=="string"&&L_(e.ease)&&(e.ease=zg[e.ease])}const ss=10;class V_ extends k_{constructor(t){F_(t),Vg(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:i,...c}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const u=new _c({...c,autoplay:!1}),l=Math.max(ss,Me.now()-this.startTime),s=ct(0,ss,l-ss);n.setWithVelocity(u.sample(Math.max(0,l-s)).value,u.sample(l).value,s),u.stop()}}const Ul=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Tt.test(e)||e==="0")&&!e.startsWith("url("));function B_(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 $_(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],c=Ul(o,t),u=Ul(i,t);return _n(c===u,`You are trying to animate ${t} from "${o}" to "${i}". "${c?i:o}" is not an animatable value.`,"value-not-animatable"),!c||!u?!1:B_(e)||(n==="spring"||Hg(n))&&r}function ia(e){e.duration=0,e.type="keyframes"}const U_=new Set(["opacity","clipPath","filter","transform"]),G_=hc(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function H_(e){var a;const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:c}=e;if(!(((a=t==null?void 0:t.owner)==null?void 0:a.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:s}=t.owner.getProps();return G_()&&n&&U_.has(n)&&(n!=="transform"||!s)&&!l&&!r&&o!=="mirror"&&i!==0&&c!=="inertia"}const z_=40;class W_ extends Cc{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:c="loop",keyframes:u,name:l,motionValue:s,element:a,...f}){var m;super(),this.stop=()=>{var p,v;this._animation&&(this._animation.stop(),(p=this.stopTimeline)==null||p.call(this)),(v=this.keyframeResolver)==null||v.cancel()},this.createdAt=Me.now();const d={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:c,name:l,motionValue:s,element:a,...f},h=(a==null?void 0:a.KeyframeResolver)||Rc;this.keyframeResolver=new h(u,(p,v,x)=>this.onKeyframesResolved(p,v,d,!x),l,s,a),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(t,n,r,o){var v,x;this.keyframeResolver=void 0;const{name:i,type:c,velocity:u,delay:l,isHandoff:s,onUpdate:a}=r;this.resolvedAt=Me.now(),$_(t,i,c,u)||((gt.instantAnimations||!l)&&(a==null||a(Sc(t,r,n))),t[0]=t[t.length-1],ia(r),r.repeat=0);const d={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>z_?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},h=!s&&H_(d),m=(x=(v=d.motionValue)==null?void 0:v.owner)==null?void 0:x.current,p=h?new V_({...d,element:m}):new _c(d);p.finished.then(()=>{this.notifyFinished()}).catch(ze),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),P_()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function Wg(e,t,n,r=0,o=1){const i=Array.from(e).sort((s,a)=>s.sortNodePosition(a)).indexOf(t),c=e.size,u=(c-1)*r;return typeof n=="function"?n(i,c):o===1?i*r:u-i*r}const q_=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function K_(e){const t=q_.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const Y_=4;function qg(e,t,n=1){mt(n<=Y_,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=K_(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const c=i.trim();return hg(c)?parseFloat(c):c}return yc(o)?qg(o,t,n+1):o}const X_={type:"spring",stiffness:500,damping:25,restSpeed:10},Z_=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Q_={type:"keyframes",duration:.8},J_={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},eR=(e,{keyframes:t})=>t.length>2?Q_:Pn.has(e)?e.startsWith("scale")?Z_(t[1]):X_:J_,tR=e=>e!==null;function nR(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(tR),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}function Tc(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}function rR({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:c,repeatDelay:u,from:l,elapsed:s,...a}){return!!Object.keys(a).length}const Pc=(e,t,n,r={},o,i)=>c=>{const u=Tc(r,e)||{},l=u.delay||r.delay||0;let{elapsed:s=0}=r;s=s-it(l);const a={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...u,delay:-s,onUpdate:d=>{t.set(d),u.onUpdate&&u.onUpdate(d)},onComplete:()=>{c(),u.onComplete&&u.onComplete()},name:e,motionValue:t,element:i?void 0:o};rR(u)||Object.assign(a,eR(e,a)),a.duration&&(a.duration=it(a.duration)),a.repeatDelay&&(a.repeatDelay=it(a.repeatDelay)),a.from!==void 0&&(a.keyframes[0]=a.from);let f=!1;if((a.type===!1||a.duration===0&&!a.repeatDelay)&&(ia(a),a.delay===0&&(f=!0)),(gt.instantAnimations||gt.skipAnimations)&&(f=!0,ia(a),a.delay=0),a.allowFlatten=!u.type&&!u.ease,f&&!i&&t.get()!==void 0){const d=nR(a.keyframes,u);if(d!==void 0){pe.update(()=>{a.onUpdate(d),a.onComplete()});return}}return u.isSync?new _c(a):new W_(a)};function Gl(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Ac(e,t,n,r){if(typeof t=="function"){const[o,i]=Gl(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=Gl(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function pn(e,t,n){const r=e.getProps();return Ac(r,t,n!==void 0?n:r.custom,e)}const Kg=new Set(["width","height","top","left","right","bottom",...Tn]),Hl=30,oR=e=>!isNaN(parseFloat(e));class iR{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const o=Me.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const c of this.dependents)c.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Me.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=oR(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&mc(!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 pc);const r=this.events[t].add(n);return t==="change"?()=>{r(),pe.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(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Me.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Hl)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Hl);return gg(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function yn(e,t){return new iR(e,t)}const sa=e=>Array.isArray(e);function sR(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,yn(n))}function aR(e){return sa(e)?e[e.length-1]||0:e}function cR(e,t){const n=pn(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const c in i){const u=aR(i[c]);sR(e,c,u)}}const Pe=e=>!!(e&&e.getVelocity);function lR(e){return!!(Pe(e)&&e.add)}function aa(e,t){const n=e.getValue("willChange");if(lR(n))return n.add(t);if(!n&&gt.WillChange){const r=new gt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Oc(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const uR="framerAppearId",Yg="data-"+Oc(uR);function Xg(e){return e.props[Yg]}function fR({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Zg(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:c,...u}=t;r&&(i=r);const l=[],s=o&&e.animationState&&e.animationState.getState()[o];for(const a in u){const f=e.getValue(a,e.latestValues[a]??null),d=u[a];if(d===void 0||s&&fR(s,a))continue;const h={delay:n,...Tc(i||{},a)},m=f.get();if(m!==void 0&&!f.isAnimating&&!Array.isArray(d)&&d===m&&!h.velocity)continue;let p=!1;if(window.MotionHandoffAnimation){const x=Xg(e);if(x){const b=window.MotionHandoffAnimation(x,a,pe);b!==null&&(h.startTime=b,p=!0)}}aa(e,a),f.start(Pc(a,f,d,e.shouldReduceMotion&&Kg.has(a)?{type:!1}:h,e,p));const v=f.animation;v&&l.push(v)}return c&&Promise.all(l).then(()=>{pe.update(()=>{c&&cR(e,c)})}),l}function ca(e,t,n={}){var l;const r=pn(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(Zg(e,r,n)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(s=0)=>{const{delayChildren:a=0,staggerChildren:f,staggerDirection:d}=o;return dR(e,t,s,a,f,d,n)}:()=>Promise.resolve(),{when:u}=o;if(u){const[s,a]=u==="beforeChildren"?[i,c]:[c,i];return s().then(()=>a())}else return Promise.all([i(),c(n.delay)])}function dR(e,t,n=0,r=0,o=0,i=1,c){const u=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),u.push(ca(l,t,{...c,delay:n+(typeof r=="function"?0:r)+Wg(e.variantChildren,l,r,o,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(u)}function hR(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>ca(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=ca(e,t,n);else{const o=typeof t=="function"?pn(e,t,n.custom):t;r=Promise.all(Zg(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const pR={test:e=>e==="auto",parse:e=>e},Qg=e=>t=>t.test(e),Jg=[Rn,W,st,bt,BC,VC,pR],zl=e=>Jg.find(Qg(e));function mR(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||mg(e):!0}const gR=new Set(["brightness","contrast","saturate","opacity"]);function vR(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(xc)||[];if(!r)return e;const o=n.replace(r,"");let i=gR.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const yR=/\b([a-z-]*)\(.*?\)/gu,la={...Tt,getAnimatableNone:e=>{const t=e.match(yR);return t?t.map(vR).join(" "):e}},Wl={...Rn,transform:Math.round},xR={rotate:bt,rotateX:bt,rotateY:bt,rotateZ:bt,scale:$r,scaleX:$r,scaleY:$r,scaleZ:$r,skew:bt,skewX:bt,skewY:bt,distance:W,translateX:W,translateY:W,translateZ:W,x:W,y:W,z:W,perspective:W,transformPerspective:W,opacity:rr,originX:Il,originY:Il,originZ:W},Mc={borderWidth:W,borderTopWidth:W,borderRightWidth:W,borderBottomWidth:W,borderLeftWidth:W,borderRadius:W,radius:W,borderTopLeftRadius:W,borderTopRightRadius:W,borderBottomRightRadius:W,borderBottomLeftRadius:W,width:W,maxWidth:W,height:W,maxHeight:W,top:W,right:W,bottom:W,left:W,inset:W,insetBlock:W,insetBlockStart:W,insetBlockEnd:W,insetInline:W,insetInlineStart:W,insetInlineEnd:W,padding:W,paddingTop:W,paddingRight:W,paddingBottom:W,paddingLeft:W,paddingBlock:W,paddingBlockStart:W,paddingBlockEnd:W,paddingInline:W,paddingInlineStart:W,paddingInlineEnd:W,margin:W,marginTop:W,marginRight:W,marginBottom:W,marginLeft:W,marginBlock:W,marginBlockStart:W,marginBlockEnd:W,marginInline:W,marginInlineStart:W,marginInlineEnd:W,backgroundPositionX:W,backgroundPositionY:W,...xR,zIndex:Wl,fillOpacity:rr,strokeOpacity:rr,numOctaves:Wl},bR={...Mc,color:be,backgroundColor:be,outlineColor:be,fill:be,stroke:be,borderColor:be,borderTopColor:be,borderRightColor:be,borderBottomColor:be,borderLeftColor:be,filter:la,WebkitFilter:la},ev=e=>bR[e];function tv(e,t){let n=ev(e);return n!==la&&(n=Tt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const wR=new Set(["auto","none","0"]);function ER(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!wR.has(i)&&or(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=tv(n,o)}class SR extends Rc{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let a=0;a<t.length;a++){let f=t[a];if(typeof f=="string"&&(f=f.trim(),yc(f))){const d=qg(f,n.current);d!==void 0&&(t[a]=d),a===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!Kg.has(r)||t.length!==2)return;const[o,i]=t,c=zl(o),u=zl(i),l=Ml(o),s=Ml(i);if(l!==s&&wt[r]){this.needsMeasurement=!0;return}if(c!==u)if(Bl(c)&&Bl(u))for(let a=0;a<t.length;a++){const f=t[a];typeof f=="string"&&(t[a]=parseFloat(f))}else wt[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||mR(t[o]))&&r.push(o);r.length&&ER(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=wt[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var u;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,c=r[i];r[i]=wt[n](t.measureViewportBox(),window.getComputedStyle(t.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),(u=this.removedTransforms)!=null&&u.length&&this.removedTransforms.forEach(([l,s])=>{t.getValue(l).set(s)}),this.resolveNoneKeyframes()}}function CR(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const o=(n==null?void 0:n[e])??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}const nv=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function rv(e){return pg(e)&&"offsetHeight"in e}const{schedule:Ic}=Tg(queueMicrotask,!1),Xe={x:!1,y:!1};function ov(){return Xe.x||Xe.y}function _R(e){return e==="x"||e==="y"?Xe[e]?null:(Xe[e]=!0,()=>{Xe[e]=!1}):Xe.x||Xe.y?null:(Xe.x=Xe.y=!0,()=>{Xe.x=Xe.y=!1})}function iv(e,t){const n=CR(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function ql(e){return!(e.pointerType==="touch"||ov())}function RR(e,t,n={}){const[r,o,i]=iv(e,n),c=u=>{if(!ql(u))return;const{target:l}=u,s=t(l,u);if(typeof s!="function"||!l)return;const a=f=>{ql(f)&&(s(f),l.removeEventListener("pointerleave",a))};l.addEventListener("pointerleave",a,o)};return r.forEach(u=>{u.addEventListener("pointerenter",c,o)}),i}const sv=(e,t)=>t?e===t?!0:sv(e,t.parentElement):!1,Nc=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,TR=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function av(e){return TR.has(e.tagName)||e.isContentEditable===!0}const ko=new WeakSet;function Kl(e){return t=>{t.key==="Enter"&&e(t)}}function as(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const PR=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Kl(()=>{if(ko.has(n))return;as(n,"down");const o=Kl(()=>{as(n,"up")}),i=()=>as(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Yl(e){return Nc(e)&&!ov()}function AR(e,t,n={}){const[r,o,i]=iv(e,n),c=u=>{const l=u.currentTarget;if(!Yl(u))return;ko.add(l);const s=t(l,u),a=(h,m)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),ko.has(l)&&ko.delete(l),Yl(h)&&typeof s=="function"&&s(h,{success:m})},f=h=>{a(h,l===window||l===document||n.useGlobalTarget||sv(l,h.target))},d=h=>{a(h,!1)};window.addEventListener("pointerup",f,o),window.addEventListener("pointercancel",d,o)};return r.forEach(u=>{(n.useGlobalTarget?window:u).addEventListener("pointerdown",c,o),rv(u)&&(u.addEventListener("focus",s=>PR(s,o)),!av(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),i}function cv(e){return pg(e)&&"ownerSVGElement"in e}function OR(e){return cv(e)&&e.tagName==="svg"}const MR=[...Jg,be,Tt],IR=e=>MR.find(Qg(e)),Xl=()=>({translate:0,scale:1,origin:0,originPoint:0}),cn=()=>({x:Xl(),y:Xl()}),Zl=()=>({min:0,max:0}),Ce=()=>({x:Zl(),y:Zl()}),ua={current:null},lv={current:!1},NR=typeof window<"u";function jR(){if(lv.current=!0,!!NR)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ua.current=e.matches;e.addEventListener("change",t),t()}else ua.current=!1}const DR=new WeakMap;function Di(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ir(e){return typeof e=="string"||Array.isArray(e)}const jc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Dc=["initial",...jc];function ki(e){return Di(e.animate)||Dc.some(t=>ir(e[t]))}function uv(e){return!!(ki(e)||e.variants)}function kR(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Pe(o))e.addValue(r,o);else if(Pe(i))e.addValue(r,yn(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const c=e.getValue(r);c.liveStyle===!0?c.jump(o):c.hasAnimated||c.set(o)}else{const c=e.getStaticValue(r);e.addValue(r,yn(c!==void 0?c:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Ql=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Jo={};function fv(e){Jo=e}function LR(){return Jo}class FR{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:c},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Rc,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=Me.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,pe.render(this.render,!1,!0))};const{latestValues:l,renderState:s}=c;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=s,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=u,this.blockInitialAnimation=!!i,this.isControllingVariants=ki(n),this.isVariantNode=uv(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:a,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const h=f[d];l[d]!==void 0&&Pe(h)&&h.set(l[d])}}mount(t){var n;this.current=t,DR.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,o)=>this.bindToMotionValue(o,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(lv.current||jR(),this.shouldReduceMotion=ua.current),process.env.NODE_ENV!=="production"&&mc(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),Rt(this.notifyUpdate),Rt(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.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=Pn.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&pe.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i&&i(),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 Jo){const n=Jo[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ce()}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<Ql.length;r++){const o=Ql[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,c=t[i];c&&(this.propEventSubscriptions[o]=this.on(o,c))}this.prevMotionValues=kR(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=yn(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"&&(hg(r)||mg(r))?r=parseFloat(r):!IR(r)&&Tt.test(n)&&(r=tv(t,n)),this.setBaseTarget(t,Pe(r)?r.get():r)),Pe(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const c=Ac(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);c&&(r=c[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Pe(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new pc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Ic.render(this.render)}}class dv extends FR{constructor(){super(...arguments),this.KeyframeResolver=SR}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[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;Pe(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Mt{constructor(t){this.isMounted=!1,this.node=t}update(){}}function hv({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function VR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function BR(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 cs(e){return e===void 0||e===1}function fa({scale:e,scaleX:t,scaleY:n}){return!cs(e)||!cs(t)||!cs(n)}function Ft(e){return fa(e)||pv(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function pv(e){return Jl(e.x)||Jl(e.y)}function Jl(e){return e&&e!=="0%"}function ei(e,t,n){const r=e-n,o=t*r;return n+o}function eu(e,t,n,r,o){return o!==void 0&&(e=ei(e,o,r)),ei(e,n,r)+t}function da(e,t=0,n=1,r,o){e.min=eu(e.min,t,n,r,o),e.max=eu(e.max,t,n,r,o)}function mv(e,{x:t,y:n}){da(e.x,t.translate,t.scale,t.originPoint),da(e.y,n.translate,n.scale,n.originPoint)}const tu=.999999999999,nu=1.0000000000001;function $R(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,c;for(let u=0;u<o;u++){i=n[u],c=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&un(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),c&&(t.x*=c.x.scale,t.y*=c.y.scale,mv(e,c)),r&&Ft(i.latestValues)&&un(e,i.latestValues))}t.x<nu&&t.x>tu&&(t.x=1),t.y<nu&&t.y>tu&&(t.y=1)}function ln(e,t){e.min=e.min+t,e.max=e.max+t}function ru(e,t,n,r,o=.5){const i=ve(e.min,e.max,o);da(e,t,n,i,r)}function un(e,t){ru(e.x,t.x,t.scaleX,t.scale,t.originX),ru(e.y,t.y,t.scaleY,t.scale,t.originY)}function gv(e,t){return hv(BR(e.getBoundingClientRect(),t))}function UR(e,t,n){const r=gv(e,n),{scroll:o}=t;return o&&(ln(r.x,o.offset.x),ln(r.y,o.offset.y)),r}const GR={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},HR=Tn.length;function zR(e,t,n){let r="",o=!0;for(let i=0;i<HR;i++){const c=Tn[i],u=e[c];if(u===void 0)continue;let l=!0;if(typeof u=="number"?l=u===(c.startsWith("scale")?1:0):l=parseFloat(u)===0,!l||n){const s=nv(u,Mc[c]);if(!l){o=!1;const a=GR[c]||c;r+=`${a}(${s}) `}n&&(t[c]=s)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function kc(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let c=!1,u=!1;for(const l in t){const s=t[l];if(Pn.has(l)){c=!0;continue}else if(Ag(l)){o[l]=s;continue}else{const a=nv(s,Mc[l]);l.startsWith("origin")?(u=!0,i[l]=a):r[l]=a}}if(t.transform||(c||n?r.transform=zR(t,e.transform,n):r.transform&&(r.transform="none")),u){const{originX:l="50%",originY:s="50%",originZ:a=0}=i;r.transformOrigin=`${l} ${s} ${a}`}}function vv(e,{style:t,vars:n},r,o){const i=e.style;let c;for(c in t)i[c]=t[c];o==null||o.applyProjectionStyles(i,r);for(c in n)i.setProperty(c,n[c])}function ou(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Nn={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(W.test(e))e=parseFloat(e);else return e;const n=ou(e,t.target.x),r=ou(e,t.target.y);return`${n}% ${r}%`}},WR={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Tt.parse(e);if(o.length>5)return r;const i=Tt.createTransformer(e),c=typeof o[0]!="number"?1:0,u=n.x.scale*t.x,l=n.y.scale*t.y;o[0+c]/=u,o[1+c]/=l;const s=ve(u,l,.5);return typeof o[2+c]=="number"&&(o[2+c]/=s),typeof o[3+c]=="number"&&(o[3+c]/=s),i(o)}},ha={borderRadius:{...Nn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Nn,borderTopRightRadius:Nn,borderBottomLeftRadius:Nn,borderBottomRightRadius:Nn,boxShadow:WR};function yv(e,{layout:t,layoutId:n}){return Pn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ha[e]||e==="opacity")}function Lc(e,t,n){var c;const r=e.style,o=t==null?void 0:t.style,i={};if(!r)return i;for(const u in r)(Pe(r[u])||o&&Pe(o[u])||yv(u,e)||((c=n==null?void 0:n.getValue(u))==null?void 0:c.liveStyle)!==void 0)&&(i[u]=r[u]);return i}function qR(e){return window.getComputedStyle(e)}class KR extends dv{constructor(){super(...arguments),this.type="html",this.renderInstance=vv}readValueFromInstance(t,n){var r;if(Pn.has(n))return(r=this.projection)!=null&&r.isProjecting?ea(n):S_(t,n);{const o=qR(t),i=(Ag(n)?o.getPropertyValue(n):o[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return gv(t,n)}build(t,n,r){kc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Lc(t,n,r)}}const YR={offset:"stroke-dashoffset",array:"stroke-dasharray"},XR={offset:"strokeDashoffset",array:"strokeDasharray"};function ZR(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?YR:XR;e[i.offset]=W.transform(-r);const c=W.transform(t),u=W.transform(n);e[i.array]=`${c} ${u}`}const QR=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function xv(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:c=0,...u},l,s,a){if(kc(e,u,s),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:d}=e;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=(a==null?void 0:a.transformBox)??"fill-box",delete f.transformBox);for(const h of QR)f[h]!==void 0&&(d[h]=f[h],delete f[h]);t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),o!==void 0&&ZR(f,o,i,c,!1)}const bv=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"]),wv=e=>typeof e=="string"&&e.toLowerCase()==="svg";function JR(e,t,n,r){vv(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(bv.has(o)?o:Oc(o),t.attrs[o])}function Ev(e,t,n){const r=Lc(e,t,n);for(const o in e)if(Pe(e[o])||Pe(t[o])){const i=Tn.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}class eT extends dv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ce}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Pn.has(n)){const r=ev(n);return r&&r.default||0}return n=bv.has(n)?n:Oc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Ev(t,n,r)}build(t,n,r){xv(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){JR(t,n,r,o)}mount(t){this.isSVGTag=wv(t.tagName),super.mount(t)}}const tT=Dc.length;function Sv(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Sv(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<tT;n++){const r=Dc[n],o=e.props[r];(ir(o)||o===!1)&&(t[r]=o)}return t}function Cv(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 nT=[...jc].reverse(),rT=jc.length;function oT(e){return t=>Promise.all(t.map(({animation:n,options:r})=>hR(e,n,r)))}function iT(e){let t=oT(e),n=iu(),r=!0;const o=l=>(s,a)=>{var d;const f=pn(e,a,l==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:m,...p}=f;s={...s,...p,...m}}return s};function i(l){t=l(e)}function c(l){const{props:s}=e,a=Sv(e.parent)||{},f=[],d=new Set;let h={},m=1/0;for(let v=0;v<rT;v++){const x=nT[v],b=n[x],w=s[x]!==void 0?s[x]:a[x],S=ir(w),E=x===l?b.isActive:null;E===!1&&(m=v);let A=w===a[x]&&w!==s[x]&&S;if(A&&r&&e.manuallyAnimateOnMount&&(A=!1),b.protectedKeys={...h},!b.isActive&&E===null||!w&&!b.prevProp||Di(w)||typeof w=="boolean")continue;const R=sT(b.prevProp,w);let T=R||x===l&&b.isActive&&!A&&S||v>m&&S,I=!1;const P=Array.isArray(w)?w:[w];let M=P.reduce(o(x),{});E===!1&&(M={});const{prevResolvedValues:j={}}=b,V={...j,...M},$=H=>{T=!0,d.has(H)&&(I=!0,d.delete(H)),b.needsAnimating[H]=!0;const U=e.getValue(H);U&&(U.liveStyle=!1)};for(const H in V){const U=M[H],L=j[H];if(h.hasOwnProperty(H))continue;let O=!1;sa(U)&&sa(L)?O=!Cv(U,L):O=U!==L,O?U!=null?$(H):d.add(H):U!==void 0&&d.has(H)?$(H):b.protectedKeys[H]=!0}b.prevProp=w,b.prevResolvedValues=M,b.isActive&&(h={...h,...M}),r&&e.blockInitialAnimation&&(T=!1);const K=A&&R;T&&(!K||I)&&f.push(...P.map(H=>{const U={type:x};if(typeof H=="string"&&r&&!K&&e.manuallyAnimateOnMount&&e.parent){const{parent:L}=e,O=pn(L,H);if(L.enteringChildren&&O){const{delayChildren:k}=O.transition||{};U.delay=Wg(L.enteringChildren,e,k)}}return{animation:H,options:U}}))}if(d.size){const v={};if(typeof s.initial!="boolean"){const x=pn(e,Array.isArray(s.initial)?s.initial[0]:s.initial);x&&x.transition&&(v.transition=x.transition)}d.forEach(x=>{const b=e.getBaseTarget(x),w=e.getValue(x);w&&(w.liveStyle=!0),v[x]=b??null}),f.push({animation:v})}let p=!!f.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,p?t(f):Promise.resolve()}function u(l,s){var f;if(n[l].isActive===s)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(d=>{var h;return(h=d.animationState)==null?void 0:h.setActive(l,s)}),n[l].isActive=s;const a=c(l);for(const d in n)n[d].protectedKeys={};return a}return{animateChanges:c,setActive:u,setAnimateFunction:i,getState:()=>n,reset:()=>{n=iu()}}}function sT(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Cv(t,e):!1}function Dt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function iu(){return{animate:Dt(!0),whileInView:Dt(),whileHover:Dt(),whileTap:Dt(),whileDrag:Dt(),whileFocus:Dt(),exit:Dt()}}function su(e,t){e.min=t.min,e.max=t.max}function qe(e,t){su(e.x,t.x),su(e.y,t.y)}function au(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const _v=1e-4,aT=1-_v,cT=1+_v,Rv=.01,lT=0-Rv,uT=0+Rv;function Ie(e){return e.max-e.min}function fT(e,t,n){return Math.abs(e-t)<=n}function cu(e,t,n,r=.5){e.origin=r,e.originPoint=ve(t.min,t.max,e.origin),e.scale=Ie(n)/Ie(t),e.translate=ve(n.min,n.max,e.origin)-e.originPoint,(e.scale>=aT&&e.scale<=cT||isNaN(e.scale))&&(e.scale=1),(e.translate>=lT&&e.translate<=uT||isNaN(e.translate))&&(e.translate=0)}function qn(e,t,n,r){cu(e.x,t.x,n.x,r?r.originX:void 0),cu(e.y,t.y,n.y,r?r.originY:void 0)}function lu(e,t,n){e.min=n.min+t.min,e.max=e.min+Ie(t)}function dT(e,t,n){lu(e.x,t.x,n.x),lu(e.y,t.y,n.y)}function uu(e,t,n){e.min=t.min-n.min,e.max=e.min+Ie(t)}function ti(e,t,n){uu(e.x,t.x,n.x),uu(e.y,t.y,n.y)}function fu(e,t,n,r,o){return e-=t,e=ei(e,1/n,r),o!==void 0&&(e=ei(e,1/o,r)),e}function hT(e,t=0,n=1,r=.5,o,i=e,c=e){if(st.test(t)&&(t=parseFloat(t),t=ve(c.min,c.max,t/100)-c.min),typeof t!="number")return;let u=ve(i.min,i.max,r);e===i&&(u-=t),e.min=fu(e.min,t,n,u,o),e.max=fu(e.max,t,n,u,o)}function du(e,t,[n,r,o],i,c){hT(e,t[n],t[r],t[o],t.scale,i,c)}const pT=["x","scaleX","originX"],mT=["y","scaleY","originY"];function hu(e,t,n,r){du(e.x,t,pT,n?n.x:void 0,r?r.x:void 0),du(e.y,t,mT,n?n.y:void 0,r?r.y:void 0)}function pu(e){return e.translate===0&&e.scale===1}function Tv(e){return pu(e.x)&&pu(e.y)}function mu(e,t){return e.min===t.min&&e.max===t.max}function gT(e,t){return mu(e.x,t.x)&&mu(e.y,t.y)}function gu(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Pv(e,t){return gu(e.x,t.x)&&gu(e.y,t.y)}function vu(e){return Ie(e.x)/Ie(e.y)}function yu(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Ue(e){return[e("x"),e("y")]}function vT(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,c=(n==null?void 0:n.z)||0;if((o||i||c)&&(r=`translate3d(${o}px, ${i}px, ${c}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:s,rotate:a,rotateX:f,rotateY:d,skewX:h,skewY:m}=n;s&&(r=`perspective(${s}px) ${r}`),a&&(r+=`rotate(${a}deg) `),f&&(r+=`rotateX(${f}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),m&&(r+=`skewY(${m}deg) `)}const u=e.x.scale*t.x,l=e.y.scale*t.y;return(u!==1||l!==1)&&(r+=`scale(${u}, ${l})`),r||"none"}const Av=["TopLeft","TopRight","BottomLeft","BottomRight"],yT=Av.length,xu=e=>typeof e=="string"?parseFloat(e):e,bu=e=>typeof e=="number"||W.test(e);function xT(e,t,n,r,o,i){o?(e.opacity=ve(0,n.opacity??1,bT(r)),e.opacityExit=ve(t.opacity??1,0,wT(r))):i&&(e.opacity=ve(t.opacity??1,n.opacity??1,r));for(let c=0;c<yT;c++){const u=`border${Av[c]}Radius`;let l=wu(t,u),s=wu(n,u);if(l===void 0&&s===void 0)continue;l||(l=0),s||(s=0),l===0||s===0||bu(l)===bu(s)?(e[u]=Math.max(ve(xu(l),xu(s),r),0),(st.test(s)||st.test(l))&&(e[u]+="%")):e[u]=s}(t.rotate||n.rotate)&&(e.rotate=ve(t.rotate||0,n.rotate||0,r))}function wu(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const bT=Ov(0,.5,Sg),wT=Ov(.5,.95,ze);function Ov(e,t,n){return r=>r<e?0:r>t?1:n(nr(e,t,r))}function ET(e,t,n){const r=Pe(e)?e:yn(e);return r.start(Pc("",r,t,n)),r.animation}function sr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const ST=(e,t)=>e.depth-t.depth;class CT{constructor(){this.children=[],this.isDirty=!1}add(t){fc(this.children,t),this.isDirty=!0}remove(t){dc(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ST),this.isDirty=!1,this.children.forEach(t)}}function _T(e,t){const n=Me.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Rt(r),e(i-t))};return pe.setup(r,!0),()=>Rt(r)}function Lo(e){return Pe(e)?e.get():e}class RT{constructor(){this.members=[]}add(t){fc(this.members,t),t.scheduleRender()}remove(t){if(dc(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Fo={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ls=["","X","Y","Z"],TT=1e3;let PT=0;function us(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Mv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Xg(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",pe,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Mv(r)}function Iv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(c={},u=t==null?void 0:t()){this.id=PT++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(MT),this.nodes.forEach(DT),this.nodes.forEach(kT),this.nodes.forEach(IT)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=c,this.root=u?u.root||u:this,this.path=u?[...u.path,u]:[],this.parent=u,this.depth=u?u.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new CT)}addEventListener(c,u){return this.eventHandlers.has(c)||this.eventHandlers.set(c,new pc),this.eventHandlers.get(c).add(u)}notifyListeners(c,...u){const l=this.eventHandlers.get(c);l&&l.notify(...u)}hasListeners(c){return this.eventHandlers.has(c)}mount(c){if(this.instance)return;this.isSVG=cv(c)&&!OR(c),this.instance=c;const{layoutId:u,layout:l,visualElement:s}=this.options;if(s&&!s.current&&s.mount(c),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||u)&&(this.isLayoutDirty=!0),e){let a,f=0;const d=()=>this.root.updateBlockedByResize=!1;pe.read(()=>{f=window.innerWidth}),e(c,()=>{const h=window.innerWidth;h!==f&&(f=h,this.root.updateBlockedByResize=!0,a&&a(),a=_T(d,250),Fo.hasAnimatedSinceResize&&(Fo.hasAnimatedSinceResize=!1,this.nodes.forEach(Cu)))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&s&&(u||l)&&this.addEventListener("didUpdate",({delta:a,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||s.getDefaultTransition()||$T,{onLayoutAnimationStart:p,onLayoutAnimationComplete:v}=s.getProps(),x=!this.targetLayout||!Pv(this.targetLayout,h),b=!f&&d;if(this.options.layoutRoot||this.resumeFrom||b||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...Tc(m,"layout"),onPlay:p,onComplete:v};(s.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(a,b)}else f||Cu(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const c=this.getStack();c&&c.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Rt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(LT),this.animationId++)}getTransformTemplate(){const{visualElement:c}=this.options;return c&&c.getProps().transformTemplate}willUpdate(c=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Mv(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let a=0;a<this.path.length;a++){const f=this.path[a];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:u,layout:l}=this.options;if(u===void 0&&!l)return;const s=this.getTransformTemplate();this.prevTransformTemplateValue=s?s(this.latestValues,""):void 0,this.updateSnapshot(),c&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Eu);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Su);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(jT),this.nodes.forEach(AT),this.nodes.forEach(OT)):this.nodes.forEach(Su),this.clearAllSnapshots();const u=Me.now();_e.delta=ct(0,1e3/60,u-_e.timestamp),_e.timestamp=u,_e.isProcessing=!0,ts.update.process(_e),ts.preRender.process(_e),ts.render.process(_e),_e.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ic.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(NT),this.sharedNodes.forEach(FT)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,pe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){pe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ie(this.snapshot.measuredBox.x)&&!Ie(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const c=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Ce(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:u}=this.options;u&&u.notify("LayoutMeasure",this.layout.layoutBox,c?c.layoutBox:void 0)}updateScroll(c="measure"){let u=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===c&&(u=!1),u&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:c,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const c=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,u=this.projectionDelta&&!Tv(this.projectionDelta),l=this.getTransformTemplate(),s=l?l(this.latestValues,""):void 0,a=s!==this.prevTransformTemplateValue;c&&this.instance&&(u||Ft(this.latestValues)||a)&&(o(this.instance,s),this.shouldResetTransform=!1,this.scheduleRender())}measure(c=!0){const u=this.measurePageBox();let l=this.removeElementScroll(u);return c&&(l=this.removeTransform(l)),UT(l),{animationId:this.root.animationId,measuredBox:u,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var s;const{visualElement:c}=this.options;if(!c)return Ce();const u=c.measureViewportBox();if(!(((s=this.scroll)==null?void 0:s.wasRoot)||this.path.some(GT))){const{scroll:a}=this.root;a&&(ln(u.x,a.offset.x),ln(u.y,a.offset.y))}return u}removeElementScroll(c){var l;const u=Ce();if(qe(u,c),(l=this.scroll)!=null&&l.wasRoot)return u;for(let s=0;s<this.path.length;s++){const a=this.path[s],{scroll:f,options:d}=a;a!==this.root&&f&&d.layoutScroll&&(f.wasRoot&&qe(u,c),ln(u.x,f.offset.x),ln(u.y,f.offset.y))}return u}applyTransform(c,u=!1){const l=Ce();qe(l,c);for(let s=0;s<this.path.length;s++){const a=this.path[s];!u&&a.options.layoutScroll&&a.scroll&&a!==a.root&&un(l,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),Ft(a.latestValues)&&un(l,a.latestValues)}return Ft(this.latestValues)&&un(l,this.latestValues),l}removeTransform(c){const u=Ce();qe(u,c);for(let l=0;l<this.path.length;l++){const s=this.path[l];if(!s.instance||!Ft(s.latestValues))continue;fa(s.latestValues)&&s.updateSnapshot();const a=Ce(),f=s.measurePageBox();qe(a,f),hu(u,s.latestValues,s.snapshot?s.snapshot.layoutBox:void 0,a)}return Ft(this.latestValues)&&hu(u,this.latestValues),u}setTargetDelta(c){this.targetDelta=c,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(c){this.options={...this.options,...c,crossfade:c.crossfade!==void 0?c.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==_e.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(c=!1){var h;const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==u;if(!(c||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(h=this.parent)!=null&&h.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:a,layoutId:f}=this.options;if(!this.layout||!(a||f))return;this.resolvedRelativeTargetAt=_e.timestamp;const d=this.getClosestProjectingParent();d&&this.linkedParentVersion!==d.layoutVersion&&!d.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(d&&d.layout?this.createRelativeTarget(d,this.layout.layoutBox,d.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ce(),this.targetWithTransforms=Ce()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),dT(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):qe(this.target,this.layout.layoutBox),mv(this.target,this.targetDelta)):qe(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?this.createRelativeTarget(d,this.target,d.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||fa(this.parent.latestValues)||pv(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(c,u,l){this.relativeParent=c,this.linkedParentVersion=c.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ce(),this.relativeTargetOrigin=Ce(),ti(this.relativeTargetOrigin,u,l),qe(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var m;const c=this.getLead(),u=!!this.resumingFrom||this!==c;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===_e.timestamp&&(l=!1),l)return;const{layout:s,layoutId:a}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(s||a))return;qe(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;$R(this.layoutCorrected,this.treeScale,this.path,u),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=Ce());const{target:h}=c;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(au(this.prevProjectionDelta.x,this.projectionDelta.x),au(this.prevProjectionDelta.y,this.projectionDelta.y)),qn(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!yu(this.projectionDelta.x,this.prevProjectionDelta.x)||!yu(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(c=!0){var u;if((u=this.options.visualElement)==null||u.scheduleRender(),c){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=cn(),this.projectionDelta=cn(),this.projectionDeltaWithTransform=cn()}setAnimationOrigin(c,u=!1){const l=this.snapshot,s=l?l.latestValues:{},a={...this.latestValues},f=cn();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!u;const d=Ce(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,p=h!==m,v=this.getStack(),x=!v||v.members.length<=1,b=!!(p&&!x&&this.options.crossfade===!0&&!this.path.some(BT));this.animationProgress=0;let w;this.mixTargetDelta=S=>{const E=S/1e3;_u(f.x,c.x,E),_u(f.y,c.y,E),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ti(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),VT(this.relativeTarget,this.relativeTargetOrigin,d,E),w&&gT(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Ce()),qe(w,this.relativeTarget)),p&&(this.animationValues=a,xT(a,s,this.latestValues,E,b,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(c){var u,l,s;this.notifyListeners("animationStart"),(u=this.currentAnimation)==null||u.stop(),(s=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||s.stop(),this.pendingAnimation&&(Rt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=pe.update(()=>{Fo.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=yn(0)),this.currentAnimation=ET(this.motionValue,[0,1e3],{...c,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),c.onUpdate&&c.onUpdate(a)},onStop:()=>{},onComplete:()=>{c.onComplete&&c.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const c=this.getStack();c&&c.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(TT),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const c=this.getLead();let{targetWithTransforms:u,target:l,layout:s,latestValues:a}=c;if(!(!u||!l||!s)){if(this!==c&&this.layout&&s&&Nv(this.options.animationType,this.layout.layoutBox,s.layoutBox)){l=this.target||Ce();const f=Ie(this.layout.layoutBox.x);l.x.min=c.target.x.min,l.x.max=l.x.min+f;const d=Ie(this.layout.layoutBox.y);l.y.min=c.target.y.min,l.y.max=l.y.min+d}qe(u,l),un(u,a),qn(this.projectionDeltaWithTransform,this.layoutCorrected,u,a)}}registerSharedNode(c,u){this.sharedNodes.has(c)||this.sharedNodes.set(c,new RT),this.sharedNodes.get(c).add(u);const s=u.options.initialPromotionConfig;u.promote({transition:s?s.transition:void 0,preserveFollowOpacity:s&&s.shouldPreserveFollowOpacity?s.shouldPreserveFollowOpacity(u):void 0})}isLead(){const c=this.getStack();return c?c.lead===this:!0}getLead(){var u;const{layoutId:c}=this.options;return c?((u=this.getStack())==null?void 0:u.lead)||this:this}getPrevLead(){var u;const{layoutId:c}=this.options;return c?(u=this.getStack())==null?void 0:u.prevLead:void 0}getStack(){const{layoutId:c}=this.options;if(c)return this.root.sharedNodes.get(c)}promote({needsReset:c,transition:u,preserveFollowOpacity:l}={}){const s=this.getStack();s&&s.promote(this,l),c&&(this.projectionDelta=void 0,this.needsReset=!0),u&&this.setOptions({transition:u})}relegate(){const c=this.getStack();return c?c.relegate(this):!1}resetSkewAndRotation(){const{visualElement:c}=this.options;if(!c)return;let u=!1;const{latestValues:l}=c;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(u=!0),!u)return;const s={};l.z&&us("z",c,s,this.animationValues);for(let a=0;a<ls.length;a++)us(`rotate${ls[a]}`,c,s,this.animationValues),us(`skew${ls[a]}`,c,s,this.animationValues);c.render();for(const a in s)c.setStaticValue(a,s[a]),this.animationValues&&(this.animationValues[a]=s[a]);c.scheduleRender()}applyProjectionStyles(c,u){if(!this.instance||this.isSVG)return;if(!this.isVisible){c.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,c.visibility="",c.opacity="",c.pointerEvents=Lo(u==null?void 0:u.pointerEvents)||"",c.transform=l?l(this.latestValues,""):"none";return}const s=this.getLead();if(!this.projectionDelta||!this.layout||!s.target){this.options.layoutId&&(c.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,c.pointerEvents=Lo(u==null?void 0:u.pointerEvents)||""),this.hasProjected&&!Ft(this.latestValues)&&(c.transform=l?l({},""):"none",this.hasProjected=!1);return}c.visibility="";const a=s.animationValues||s.latestValues;this.applyTransformsToTarget();let f=vT(this.projectionDeltaWithTransform,this.treeScale,a);l&&(f=l(a,f)),c.transform=f;const{x:d,y:h}=this.projectionDelta;c.transformOrigin=`${d.origin*100}% ${h.origin*100}% 0`,s.animationValues?c.opacity=s===this?a.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:c.opacity=s===this?a.opacity!==void 0?a.opacity:"":a.opacityExit!==void 0?a.opacityExit:0;for(const m in ha){if(a[m]===void 0)continue;const{correct:p,applyTo:v,isCSSVariable:x}=ha[m],b=f==="none"?a[m]:p(a[m],s);if(v){const w=v.length;for(let S=0;S<w;S++)c[v[S]]=b}else x?this.options.visualElement.renderState.vars[m]=b:c[m]=b}this.options.layoutId&&(c.pointerEvents=s===this?Lo(u==null?void 0:u.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(c=>{var u;return(u=c.currentAnimation)==null?void 0:u.stop()}),this.root.nodes.forEach(Eu),this.root.sharedNodes.clear()}}}function AT(e){e.updateLayout()}function OT(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,c=t.source!==e.layout.source;i==="size"?Ue(f=>{const d=c?t.measuredBox[f]:t.layoutBox[f],h=Ie(d);d.min=r[f].min,d.max=d.min+h}):Nv(i,t.layoutBox,r)&&Ue(f=>{const d=c?t.measuredBox[f]:t.layoutBox[f],h=Ie(r[f]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+h)});const u=cn();qn(u,r,t.layoutBox);const l=cn();c?qn(l,e.applyTransform(o,!0),t.measuredBox):qn(l,r,t.layoutBox);const s=!Tv(u);let a=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:h}=f;if(d&&h){const m=Ce();ti(m,t.layoutBox,d.layoutBox);const p=Ce();ti(p,r,h.layoutBox),Pv(m,p)||(a=!0),f.options.layoutRoot&&(e.relativeTarget=p,e.relativeTargetOrigin=m,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:u,hasLayoutChanged:s,hasRelativeLayoutChanged:a})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function MT(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function IT(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function NT(e){e.clearSnapshot()}function Eu(e){e.clearMeasurements()}function Su(e){e.isLayoutDirty=!1}function jT(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Cu(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function DT(e){e.resolveTargetDelta()}function kT(e){e.calcProjection()}function LT(e){e.resetSkewAndRotation()}function FT(e){e.removeLeadSnapshot()}function _u(e,t,n){e.translate=ve(t.translate,0,n),e.scale=ve(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Ru(e,t,n,r){e.min=ve(t.min,n.min,r),e.max=ve(t.max,n.max,r)}function VT(e,t,n,r){Ru(e.x,t.x,n.x,r),Ru(e.y,t.y,n.y,r)}function BT(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const $T={duration:.45,ease:[.4,0,.1,1]},Tu=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Pu=Tu("applewebkit/")&&!Tu("chrome/")?Math.round:ze;function Au(e){e.min=Pu(e.min),e.max=Pu(e.max)}function UT(e){Au(e.x),Au(e.y)}function Nv(e,t,n){return e==="position"||e==="preserve-aspect"&&!fT(vu(t),vu(n),.2)}function GT(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const HT=Iv({attachResizeListener:(e,t)=>sr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),fs={current:void 0},jv=Iv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!fs.current){const e=new HT({});e.mount(window),e.setOptions({layoutScroll:!0}),fs.current=e}return fs.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Fc=_.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Ou(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function zT(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Ou(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Ou(e[o],null)}}}}function WT(...e){return y.useCallback(zT(...e),e)}class qT extends y.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=rv(r)&&r.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=o-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function KT({children:e,isPresent:t,anchorX:n,root:r}){var a;const o=_.useId(),i=_.useRef(null),c=_.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:u}=_.useContext(Fc),l=((a=e.props)==null?void 0:a.ref)??(e==null?void 0:e.ref),s=WT(i,l);return _.useInsertionEffect(()=>{const{width:f,height:d,top:h,left:m,right:p}=c.current;if(t||!i.current||!f||!d)return;const v=n==="left"?`left: ${m}`:`right: ${p}`;i.current.dataset.motionPopId=o;const x=document.createElement("style");u&&(x.nonce=u);const b=r??document.head;return b.appendChild(x),x.sheet&&x.sheet.insertRule(`
97
+ [data-motion-pop-id="${o}"] {
98
98
  position: absolute !important;
99
- width: ${d}px !important;
100
- height: ${h}px !important;
101
- ${b}px !important;
102
- ${w}px !important;
99
+ width: ${f}px !important;
100
+ height: ${d}px !important;
101
+ ${v}px !important;
102
+ top: ${h}px !important;
103
103
  }
104
- `),()=>{S.contains(E)&&S.removeChild(E)}},[t]),g.jsx(PT,{isPresent:t,childRef:c,sizeRef:u,children:y.cloneElement(e,{ref:a})})}const OT=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:c,anchorX:u,anchorY:l,root:i})=>{const a=sc(MT),f=_.useId();let d=!0,h=_.useMemo(()=>(d=!1,{id:f,initial:t,isPresent:n,custom:o,onExitComplete:m=>{a.set(m,!0);for(const p of a.values())if(!p)return;r&&r()},register:m=>(a.set(m,!1),()=>a.delete(m))}),[n,a,r]);return s&&d&&(h={...h}),_.useMemo(()=>{a.forEach((m,p)=>a.set(p,!1))},[n]),y.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),c==="popLayout"&&(e=g.jsx(AT,{isPresent:n,anchorX:u,anchorY:l,root:i,children:e})),g.jsx(Ii.Provider,{value:h,children:e})};function MT(){return new Map}function bv(e=!0){const t=_.useContext(Ii);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=_.useId();_.useEffect(()=>{if(e)return o(s)},[e]);const c=_.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,c]:[!0]}const Br=e=>e.key||"";function _u(e){const t=[];return _.Children.forEach(e,n=>{_.isValidElement(n)&&t.push(n)}),t}const vn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:s="sync",propagate:c=!1,anchorX:u="left",anchorY:l="top",root:i})=>{const[a,f]=bv(c),d=_.useMemo(()=>_u(e),[e]),h=c&&!a?[]:d.map(Br),m=_.useRef(!0),p=_.useRef(d),v=sc(()=>new Map),x=_.useRef(new Set),[b,w]=_.useState(d),[E,S]=_.useState(d);Qm(()=>{m.current=!1,p.current=d;for(let A=0;A<E.length;A++){const O=Br(E[A]);h.includes(O)?(v.delete(O),x.current.delete(O)):v.get(O)!==!0&&v.set(O,!1)}},[E,h.length,h.join("-")]);const T=[];if(d!==b){let A=[...d];for(let O=0;O<E.length;O++){const R=E[O],I=Br(R);h.includes(I)||(A.splice(O,0,R),T.push(R))}return s==="wait"&&T.length&&(A=T),S(_u(A)),w(d),null}process.env.NODE_ENV!=="production"&&s==="wait"&&E.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:P}=_.useContext(ic);return g.jsx(g.Fragment,{children:E.map(A=>{const O=Br(A),R=c&&!a?!1:d===E||h.includes(O),I=()=>{if(x.current.has(O))return;if(x.current.add(O),v.has(O))v.set(O,!0);else return;let D=!0;v.forEach(F=>{F||(D=!1)}),D&&(P==null||P(),S(p.current),c&&(f==null||f()),r&&r())};return g.jsx(OT,{isPresent:R,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:s,root:i,onExitComplete:R?void 0:I,anchorX:u,anchorY:l,children:A},O)})})},wv=_.createContext({strict:!1}),Ru={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Tu=!1;function IT(){if(Tu)return;const e={};for(const t in Ru)e[t]={isEnabled:n=>Ru[t].some(r=>!!n[r])};Xg(e),Tu=!0}function Ev(){return IT(),yR()}function DT(e){const t=Ev();for(const n in e)t[n]={...t[n],...e[n]};Xg(t)}const NT=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 ei(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||NT.has(e)}let Sv=e=>!ei(e);function jT(e){typeof e=="function"&&(Sv=t=>t.startsWith("on")?!ei(t):e(t))}try{jT(require("@emotion/is-prop-valid").default)}catch{}function kT(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Sv(o)||n===!0&&ei(o)||!t&&!ei(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const ji=_.createContext({});function LT(e,t){if(Ni(e)){const{initial:n,animate:r}=e;return{initial:n===!1||rr(n)?n:void 0,animate:rr(r)?r:void 0}}return e.inherit!==!1?t:{}}function FT(e){const{initial:t,animate:n}=LT(e,_.useContext(ji));return _.useMemo(()=>({initial:t,animate:n}),[Pu(t),Pu(n)])}function Pu(e){return Array.isArray(e)?e.join(" "):e}const jc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Cv(e,t,n){for(const r in t)!Te(t[r])&&!rv(r,n)&&(e[r]=t[r])}function VT({transformTemplate:e},t){return _.useMemo(()=>{const n=jc();return Ic(n,t,e),Object.assign({},n.vars,n.style)},[t])}function BT(e,t){const n=e.style||{},r={};return Cv(r,n,e),Object.assign(r,VT(e,t)),r}function $T(e,t){const n={},r=BT(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 _v=()=>({...jc(),attrs:{}});function UT(e,t,n,r){const o=_.useMemo(()=>{const s=_v();return ov(s,t,sv(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Cv(s,e.style,e),o.style={...s,...o.style}}return o}const GT=["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 kc(e){return typeof e!="string"||e.includes("-")?!1:!!(GT.indexOf(e)>-1||/[A-Z]/u.test(e))}function HT(e,t,n,{latestValues:r},o,s=!1,c){const l=(c??kc(e)?UT:$T)(t,r,o,e),i=kT(t,typeof e=="string",s),a=e!==_.Fragment?{...i,...l,ref:n}:{},{children:f}=t,d=_.useMemo(()=>Te(f)?f.get():f,[f]);return _.createElement(e,{...a,children:d})}function zT({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:WT(n,r,o,e),renderState:t()}}function WT(e,t,n,r){const o={},s=r(e,{});for(const d in s)o[d]=jo(s[d]);let{initial:c,animate:u}=e;const l=Ni(e),i=Yg(e);t&&i&&!l&&e.inherit!==!1&&(c===void 0&&(c=t.initial),u===void 0&&(u=t.animate));let a=n?n.initial===!1:!1;a=a||c===!1;const f=a?u:c;if(f&&typeof f!="boolean"&&!Di(f)){const d=Array.isArray(f)?f:[f];for(let h=0;h<d.length;h++){const m=_c(e,d[h]);if(m){const{transitionEnd:p,transition:v,...x}=m;for(const b in x){let w=x[b];if(Array.isArray(w)){const E=a?w.length-1:0;w=w[E]}w!==null&&(o[b]=w)}for(const b in p)o[b]=p[b]}}}return o}const Rv=e=>(t,n)=>{const r=_.useContext(ji),o=_.useContext(Ii),s=()=>zT(e,t,r,o);return n?s():sc(s)},qT=Rv({scrapeMotionValuesFromProps:Dc,createRenderState:jc}),KT=Rv({scrapeMotionValuesFromProps:av,createRenderState:_v}),YT=Symbol.for("motionComponentSymbol");function XT(e,t,n){const r=_.useRef(n);_.useInsertionEffect(()=>{r.current=n});const o=_.useRef(null);return _.useCallback(s=>{var u;s&&((u=e.onMount)==null||u.call(e,s)),t&&(s?t.mount(s):t.unmount());const c=r.current;if(typeof c=="function")if(s){const l=c(s);typeof l=="function"&&(o.current=l)}else o.current?(o.current(),o.current=null):c(s);else c&&(c.current=s)},[t])}const Tv=_.createContext({});function Hn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function ZT(e,t,n,r,o,s){var x,b;const{visualElement:c}=_.useContext(ji),u=_.useContext(wv),l=_.useContext(Ii),i=_.useContext(Nc).reducedMotion,a=_.useRef(null),f=_.useRef(!1);r=r||u.renderer,!a.current&&r&&(a.current=r(e,{visualState:t,parent:c,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:i,isSVG:s}),f.current&&a.current&&(a.current.manuallyAnimateOnMount=!0));const d=a.current,h=_.useContext(Tv);d&&!d.projection&&o&&(d.type==="html"||d.type==="svg")&&QT(a.current,n,o,h);const m=_.useRef(!1);_.useInsertionEffect(()=>{d&&m.current&&d.update(n,l)});const p=n[jg],v=_.useRef(!!p&&!((x=window.MotionHandoffIsComplete)!=null&&x.call(window,p))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,p)));return Qm(()=>{f.current=!0,d&&(m.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),v.current&&d.animationState&&d.animationState.animateChanges())}),_.useEffect(()=>{d&&(!v.current&&d.animationState&&d.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var w;(w=window.MotionHandoffMarkAsComplete)==null||w.call(window,p)}),v.current=!1),d.enteringChildren=void 0)}),d}function QT(e,t,n,r){const{layoutId:o,layout:s,drag:c,dragConstraints:u,layoutScroll:l,layoutRoot:i,layoutCrossfade:a}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Pv(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!c||u&&Hn(u),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:a,layoutScroll:l,layoutRoot:i})}function Pv(e){if(e)return e.options.allowProjection!==!1?e.projection:Pv(e.parent)}function us(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&DT(r);const s=n?n==="svg":kc(e),c=s?KT:qT;function u(i,a){let f;const d={..._.useContext(Nc),...i,layoutId:JT(i)},{isStatic:h}=d,m=FT(i),p=c(i,h);if(!h&&Zm){eP(d,r);const v=tP(d);f=v.MeasureLayout,m.visualElement=ZT(e,p,d,o,v.ProjectionNode,s)}return g.jsxs(ji.Provider,{value:m,children:[f&&m.visualElement?g.jsx(f,{visualElement:m.visualElement,...d}):null,HT(e,i,XT(p,m.visualElement,a),p,h,t,s)]})}u.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=_.forwardRef(u);return l[YT]=e,l}function JT({layoutId:e}){const t=_.useContext(ic).id;return t&&e!==void 0?t+"-"+e:e}function eP(e,t){const n=_.useContext(wv).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?Cn(!1,r,"lazy-strict-mode"):mt(!1,r,"lazy-strict-mode")}}function tP(e){const t=Ev(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function nP(e,t){if(typeof Proxy>"u")return us;const n=new Map,r=(s,c)=>us(s,c,e,t),o=(s,c)=>(process.env.NODE_ENV!=="production"&&fc(!1,"motion() is deprecated. Use motion.create() instead."),r(s,c));return new Proxy(o,{get:(s,c)=>c==="create"?r:(n.has(c)||n.set(c,us(c,void 0,e,t)),n.get(c))})}const rP=(e,t)=>t.isSVG??kc(e)?new jR(t):new AR(t,{allowProjection:e!==_.Fragment});class oP extends Mt{constructor(t){super(t),t.animationState||(t.animationState=BR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Di(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let iP=0;class sP extends Mt{constructor(){super(...arguments),this.id=iP++}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 o=this.node.animationState.setActive("exit",!t);n&&!t&&o.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 aP={animation:{Feature:oP},exit:{Feature:sP}};function Sr(e){return{point:{x:e.pageX,y:e.pageY}}}const cP=e=>t=>Ac(t)&&e(t,Sr(t));function qn(e,t,n,r){return or(e,t,cP(n),r)}const Av=({current:e})=>e?e.ownerDocument.defaultView:null,Au=(e,t)=>Math.abs(e-t);function lP(e,t){const n=Au(e.x,t.x),r=Au(e.y,t.y);return Math.sqrt(n**2+r**2)}const Ou=new Set(["auto","scroll"]);class Ov{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:s=!1,distanceThreshold:c=3,element:u}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=h=>{this.handleScroll(h.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=ds(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,p=lP(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!p)return;const{point:v}=h,{timestamp:x}=_e;this.history.push({...v,timestamp:x});const{onStart:b,onMove:w}=this.handlers;m||(b&&b(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,h)},this.handlePointerMove=(h,m)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=fs(m,this.transformPagePoint),pe.update(this.updatePoint,!0)},this.handlePointerUp=(h,m)=>{this.end();const{onEnd:p,onSessionEnd:v,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=ds(h.type==="pointercancel"?this.lastMoveEventInfo:fs(m,this.transformPagePoint),this.history);this.startEvent&&p&&p(h,b),v&&v(h,b)},!Ac(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=c,this.contextWindow=o||window;const l=Sr(t),i=fs(l,this.transformPagePoint),{point:a}=i,{timestamp:f}=_e;this.history=[{...a,timestamp:f}];const{onSessionStart:d}=n;d&&d(t,ds(i,this.history)),this.removeListeners=br(qn(this.contextWindow,"pointermove",this.handlePointerMove),qn(this.contextWindow,"pointerup",this.handlePointerUp),qn(this.contextWindow,"pointercancel",this.handlePointerUp)),u&&this.startScrollTracking(u)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(Ou.has(r.overflowX)||Ou.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:o.x-n.x,y:o.y-n.y};s.x===0&&s.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,o),pe.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Rt(this.updatePoint)}}function fs(e,t){return t?{point:t(e.point)}:e}function Mu(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ds({point:e},t){return{point:e,delta:Mu(e,Mv(t)),offset:Mu(e,uP(t)),velocity:fP(t,.1)}}function uP(e){return e[0]}function Mv(e){return e[e.length-1]}function fP(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Mv(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>it(t)));)n--;if(!r)return{x:0,y:0};const s=Ge(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const c={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function dP(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ve(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ve(n,e,r.max):Math.min(e,n)),e}function Iu(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function hP(e,{top:t,left:n,bottom:r,right:o}){return{x:Iu(e.x,n,o),y:Iu(e.y,t,r)}}function Du(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function pP(e,t){return{x:Du(e.x,t.x),y:Du(e.y,t.y)}}function mP(e,t){let n=.5;const r=Ie(e),o=Ie(t);return o>r?n=er(t.min,t.max-r,e.min):r>o&&(n=er(e.min,e.max-o,t.min)),ct(0,1,n)}function gP(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const ha=.35;function vP(e=ha){return e===!1?e=0:e===!0&&(e=ha),{x:Nu(e,"left","right"),y:Nu(e,"top","bottom")}}function Nu(e,t,n){return{min:ju(e,t),max:ju(e,n)}}function ju(e,t){return typeof e=="number"?e:e[t]||0}const yP=new WeakMap;class xP{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Se(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const s=f=>{n?(this.stopAnimation(),this.snapToCursor(Sr(f).point)):this.pauseAnimation()},c=(f,d)=>{this.stopAnimation();const{drag:h,dragPropagation:m,onDragStart:p}=this.getProps();if(h&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=sR(h),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=d,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ue(x=>{let b=this.getAxisMotionValue(x).get()||0;if(st.test(b)){const{projection:w}=this.visualElement;if(w&&w.layout){const E=w.layout.layoutBox[x];E&&(b=Ie(E)*(parseFloat(b)/100))}}this.originPoint[x]=b}),p&&pe.postRender(()=>p(f,d)),ia(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},u=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d;const{dragPropagation:h,dragDirectionLock:m,onDirectionLock:p,onDrag:v}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:x}=d;if(m&&this.currentDirection===null){this.currentDirection=bP(x),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,x),this.updateAxis("y",d.point,x),this.visualElement.render(),v&&v(f,d)},l=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d,this.stop(f,d),this.latestPointerEvent=null,this.latestPanInfo=null},i=()=>Ue(f=>{var d;return this.getAnimationState(f)==="paused"&&((d=this.getAxisMotionValue(f).animation)==null?void 0:d.play())}),{dragSnapToOrigin:a}=this.getProps();this.panSession=new Ov(t,{onSessionStart:s,onStart:c,onMove:u,onSessionEnd:l,resumeAnimation:i},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:a,distanceThreshold:r,contextWindow:Av(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!o||!r)return;const{velocity:c}=o;this.startAnimation(c);const{onDragEnd:u}=this.getProps();u&&pe.postRender(()=>u(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!$r(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let c=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(c=dP(c,this.constraints[t],this.elastic[t])),s.set(c)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,o=this.constraints;t&&Hn(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=hP(r.layoutBox,t):this.constraints=!1,this.elastic=vP(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ue(c=>{this.constraints!==!1&&this.getAxisMotionValue(c)&&(this.constraints[c]=gP(r.layoutBox[c],this.constraints[c]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Hn(t))return!1;const r=t.current;mt(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=SR(r,o.root,this.visualElement.getTransformPagePoint());let c=pP(o.layout.layoutBox,s);if(n){const u=n(bR(c));this.hasMutatedConstraints=!!u,u&&(c=Qg(u))}return c}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:c,onDragTransitionEnd:u}=this.getProps(),l=this.constraints||{},i=Ue(a=>{if(!$r(a,n,this.currentDirection))return;let f=l&&l[a]||{};c&&(f={min:0,max:0});const d=o?200:1e6,h=o?40:1e7,m={type:"inertia",velocity:r?t[a]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(a,m)});return Promise.all(i).then(u)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return ia(this.visualElement,t),r.start(Cc(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ue(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ue(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ue(n=>{const{drag:r}=this.getProps();if(!$r(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:c,max:u}=o.layout.layoutBox[n],l=s.get()||0;s.set(t[n]-ve(c,u,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Hn(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Ue(c=>{const u=this.getAxisMotionValue(c);if(u&&this.constraints!==!1){const l=u.get();o[c]=mP({min:l,max:l},this.constraints[c])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ue(c=>{if(!$r(c,t,null))return;const u=this.getAxisMotionValue(c),{min:l,max:i}=this.constraints[c];u.set(ve(l,i,o[c]))})}addListeners(){if(!this.visualElement.current)return;yP.set(this.visualElement,this);const t=this.visualElement.current,n=qn(t,"pointerdown",l=>{const{drag:i,dragListener:a=!0}=this.getProps(),f=l.target,d=f!==t&&Wg(f);i&&a&&!d&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Hn(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),pe.read(r);const c=or(window,"resize",()=>this.scalePositionWithinConstraints()),u=o.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:i})=>{this.isDragging&&i&&(Ue(a=>{const f=this.getAxisMotionValue(a);f&&(this.originPoint[a]+=l[a].translate,f.set(f.get()+l[a].translate))}),this.visualElement.render())}));return()=>{c(),n(),s(),u&&u()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:c=ha,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:c,dragMomentum:u}}}function $r(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function bP(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class wP extends Mt{constructor(t){super(t),this.removeGroupControls=ze,this.removeListeners=ze,this.controls=new xP(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ze}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const ku=e=>(t,n)=>{e&&pe.postRender(()=>e(t,n))};class EP extends Mt{constructor(){super(...arguments),this.removePointerDownListener=ze}onPointerDown(t){this.session=new Ov(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Av(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:ku(t),onStart:ku(n),onMove:r,onEnd:(s,c)=>{delete this.session,o&&pe.postRender(()=>o(s,c))}}}mount(){this.removePointerDownListener=qn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let hs=!1;class SP extends _.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),hs&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ko.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,{projection:c}=r;return c&&(c.isPresent=s,t.layoutDependency!==n&&c.setOptions({...c.options,layoutDependency:n}),hs=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?c.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?c.promote():c.relegate()||pe.postRender(()=>{const u=c.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Pc.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;hs=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Iv(e){const[t,n]=bv(),r=_.useContext(ic);return g.jsx(SP,{...e,layoutGroup:r,switchLayoutGroup:_.useContext(Tv),isPresent:t,safeToRemove:n})}const CP={pan:{Feature:EP},drag:{Feature:wP,ProjectionNode:xv,MeasureLayout:Iv}};function Lu(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&pe.postRender(()=>s(t,Sr(t)))}class _P extends Mt{mount(){const{current:t}=this.node;t&&(this.unmount=aR(t,(n,r)=>(Lu(this.node,r,"Start"),o=>Lu(this.node,o,"End"))))}unmount(){}}class RP extends Mt{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=br(or(this.node.current,"focus",()=>this.onFocus()),or(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Fu(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 o="onTap"+(n==="End"?"":n),s=r[o];s&&pe.postRender(()=>s(t,Sr(t)))}class TP extends Mt{mount(){const{current:t}=this.node;t&&(this.unmount=uR(t,(n,r)=>(Fu(this.node,r,"Start"),(o,{success:s})=>Fu(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const pa=new WeakMap,ps=new WeakMap,PP=e=>{const t=pa.get(e.target);t&&t(e)},AP=e=>{e.forEach(PP)};function OP({root:e,...t}){const n=e||document;ps.has(n)||ps.set(n,{});const r=ps.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(AP,{root:e,...t})),r[o]}function MP(e,t,n){const r=OP(t);return pa.set(e,n),r.observe(e),()=>{pa.delete(e),r.unobserve(e)}}const IP={some:0,all:1};class DP extends Mt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,c={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:IP[o]},u=l=>{const{isIntersecting:i}=l;if(this.isInView===i||(this.isInView=i,s&&!i&&this.hasEnteredView))return;i&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",i);const{onViewportEnter:a,onViewportLeave:f}=this.node.getProps(),d=i?a:f;d&&d(l)};return MP(this.node.current,c,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(NP(t,n))&&this.startObserver()}unmount(){}}function NP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const jP={inView:{Feature:DP},tap:{Feature:TP},focus:{Feature:RP},hover:{Feature:_P}},kP={layout:{ProjectionNode:xv,MeasureLayout:Iv}},LP={...aP,...jP,...CP,...kP},de=nP(LP,rP),FP=_.forwardRef(({children:e,className:t,dividerClassName:n,showDivider:r=!0,...o},s)=>g.jsx(e0,{...o,className:j.classNames("overflow-hidden bg-white",t),ref:s,asChild:!0,children:g.jsxs(de.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3,ease:[.04,.62,.23,.98]},children:[r&&g.jsx("hr",{className:j.classNames("bg-primary-blue h-0.5 border-0",n)}),g.jsx("div",{className:"px-5 py-[15px]",children:e})]})})),VP=({items:e,classNames:t,showDivider:n,defaultValue:r})=>g.jsx(Xy,{className:j.classNames("flex flex-col space-y-4",t==null?void 0:t.container),type:"single",defaultValue:r,collapsible:!0,children:e==null?void 0:e.map(o=>g.jsxs(tC,{className:t==null?void 0:t.item,value:o.id,children:[g.jsx(nC,{className:t==null?void 0:t.trigger,triggerIcon:o==null?void 0:o.triggerIcon,children:o.title}),g.jsx(FP,{showDivider:n,dividerClassName:t==null?void 0:t.divider,className:t==null?void 0:t.content,children:o.content})]},o.id))}),BP={success:g.jsx(ce.SvgIconCheckCircle,{width:24,height:24}),info:g.jsx(ce.SvgIconInfoCircle,{width:24,height:24}),warning:g.jsx(ce.SvgIconWarningCircle,{width:24,height:24}),error:g.jsx(ce.SvgIconErrorCircle,{width:24,height:24})},$P={success:"text-green-6",info:"text-blue-6",warning:"text-gold-6",error:"text-red-6"},UP={success:"text-gray-6 hover:bg-gray-100 cursor-pointer",error:"text-gray-6 hover:bg-gray-100 cursor-pointer",warning:"text-gray-6 hover:bg-gray-100 cursor-pointer",info:"text-gray-6 hover:bg-gray-100 cursor-pointer"},GP={success:"bg-green-1 border border-green-3",info:"bg-blue-1 border border-blue-3",warning:"bg-gold-1 border border-gold-3",error:"bg-red-1 border border-red-3"},HP=({type:e="info",title:t,description:n,showIcon:r=!0,closable:o=!1,onClose:s,className:c="",children:u,...l})=>{const i=!!t&&!n&&!u||!t&&!!n&&!u;return g.jsxs(de.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},className:j.classNames("relative border rounded-lg p-4",GP[e],{[c]:c}),...l,children:[g.jsxs(We,{gap:4,align:i?"center":"start",children:[r&&g.jsx("div",{className:j.classNames("shrink-0",$P[e]),children:BP[e]}),g.jsxs(We,{direction:i?"horizontal":"vertical",gap:0,className:"flex-1 min-w-0",align:i?"center":"start",children:[t&&g.jsx("h4",{className:"text-base font-medium leading-tight text-gray-12",children:t}),n&&g.jsx("p",{className:j.classNames("text-sm font-medium leading-tight text-gray-12",{"mt-2":!!t&&!i}),children:n}),u&&g.jsx("div",{className:"mt-2",children:u})]})]}),o&&g.jsx("button",{onClick:s,className:j.classNames("absolute top-4 right-4 p-1 rounded transition-colors",UP[e]),"aria-label":"Cerrar alerta",children:g.jsx(ce.SvgClose,{width:16,height:16})})]})},zP={sm:"size-8 text-[1.3rem]",md:"size-10 text-[1.4rem]",lg:"size-12 text-[2.1rem]",xl:"size-14 text-[2.5rem]"},WP=({size:e="md",src:t,alt:n="avatar",icon:r=g.jsx(ce.SvgUser,{}),bgClassName:o="bg-[#A1ADC0]",colorClassName:s="text-white",className:c="",onClick:u,style:l})=>g.jsxs(Px,{className:j.classNames("inline-flex shrink-0 overflow-hidden rounded-full",zP[e],c),onClick:u,style:l,children:[t&&g.jsx(Ax,{src:t,alt:n,className:"h-full w-full object-cover"}),g.jsx(Ox,{delayMs:0,className:j.classNames("flex h-full w-full items-center justify-center rounded-full",s,o),children:r})]}),qP={default:j.classNames("bg-primary-blue border-primary-blue text-white","hover:bg-darks-blue-Macropay-30 hover:border-darks-blue-Macropay-30"),primary:j.classNames("bg-primary-yellow border-primary-yellow text-primary-blue","hover:bg-shades-yellow-10 hover:border-shades-yellow-10"),secondary:j.classNames("bg-white text-primary-blue border-primary-blue","hover:border-darks-blue-Macropay-30 hover:text-darks-blue-Macropay-30"),text:j.classNames("bg-transparent text-primary-blue border-transparent shadow-none","hover:text-darks-blue-Macropay-30","disabled:bg-transparent disabled:border-transparent"),danger:j.classNames("bg-primary-red border-primary-red text-white","hover:bg-shades-red-10 hover:border-shades-red-10"),withoutColor:"bg-transparent border-transparent shadow-none"},KP={sm:"px-3 text-sm h-6 rounded-md",md:"px-4 py-2 h-8",lg:"px-6 py-[7px] text-base h-10 rounded-lg",xl:"px-6 py-[11px] h-12"},Vu=["sm","md","lg","xl"],YP=e=>{const t=Vu.indexOf(e);return t===-1?"":j.classNames(Vu.slice(0,t+1).map(n=>KP[n]))},XP={pointer:"cursor-pointer",default:"cursor-default","not-allowed":"cursor-not-allowed",wait:"cursor-wait",text:"cursor-text"},ZP=e=>j.classNames("flex items-center justify-center gap-2 border active:scale-95",XP[e],"disabled:bg-gray-3 disabled:text-gray-6 disabled:border-gray-5 disabled:cursor-not-allowed","transition-all duration-300 ease-in-out","shadow-button"),ma=({icon:e,children:t,leftIcon:n,rightIcon:r,type:o="button",variant:s="default",size:c="md",className:u="",isLoading:l=!1,positionLoading:i="left",cursor:a="pointer",...f})=>{const d=_.useId(),h=ZP(a),{isLeftLoading:m,isRightLoading:p}=_.useMemo(()=>({isLeftLoading:i==="left"&&l,isRightLoading:i==="right"&&l}),[l,i]),v=_.useMemo(()=>["primary","secondary","text","withoutColor"].includes(s)?g.jsx(ce.SvgLoaderAnimBlue,{className:"animate-spin"}):g.jsx(ce.SvgLoaderAnimWhite,{className:"animate-spin"}),[s]),x=_.useMemo(()=>e??n,[e,n]);return g.jsxs(de.button,{id:`${d}-button`,className:j.classNames(h,qP[s],YP(c),u),type:o,...f,children:[g.jsx(vn,{mode:"wait",children:(m||x)&&g.jsx(de.div,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},exit:{opacity:0,x:-8},transition:{duration:.2},children:m?v:x},"leftIcon")}),typeof t=="string"||typeof t=="number"?g.jsx("span",{className:"whitespace-normal",children:t}):t,g.jsx(vn,{mode:"wait",children:(p||r)&&g.jsx(de.div,{initial:{opacity:0,x:8},animate:{opacity:1,x:0},exit:{opacity:0,x:8},transition:{duration:.2},children:p?v:r},"rightIcon")})]})},QP=({children:e,className:t="",align:n="horizontal",shadow:r=!0,rounded:o=!0,bordered:s=!0,...c})=>{const{...u}=c,l=j.classNames("bg-white p-4",{"flex flex-col":n==="horizontal","flex flex-col md:flex-row md:max-w-xl":n==="vertical"},{"shadow-lg":r},{"rounded-2xl":o},{"border border-gray-200":s},{[t]:t});return g.jsx(de.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.2},className:l,...u,children:e})};var ms={exports:{}};/*!
104
+ `),()=>{b.contains(x)&&b.removeChild(x)}},[t]),g.jsx(qT,{isPresent:t,childRef:i,sizeRef:c,children:y.cloneElement(e,{ref:s})})}const YT=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:c,anchorX:u,root:l})=>{const s=uc(XT),a=_.useId();let f=!0,d=_.useMemo(()=>(f=!1,{id:a,initial:t,isPresent:n,custom:o,onExitComplete:h=>{s.set(h,!0);for(const m of s.values())if(!m)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),[n,s,r]);return i&&f&&(d={...d}),_.useMemo(()=>{s.forEach((h,m)=>s.set(m,!1))},[n]),y.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),c==="popLayout"&&(e=g.jsx(KT,{isPresent:n,anchorX:u,root:l,children:e})),g.jsx(ji.Provider,{value:d,children:e})};function XT(){return new Map}function Dv(e=!0){const t=_.useContext(ji);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=_.useId();_.useEffect(()=>{if(e)return o(i)},[e]);const c=_.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,c]:[!0]}const Ur=e=>e.key||"";function Mu(e){const t=[];return _.Children.forEach(e,n=>{_.isValidElement(n)&&t.push(n)}),t}const Wt=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:c=!1,anchorX:u="left",root:l})=>{const[s,a]=Dv(c),f=_.useMemo(()=>Mu(e),[e]),d=c&&!s?[]:f.map(Ur),h=_.useRef(!0),m=_.useRef(f),p=uc(()=>new Map),v=_.useRef(new Set),[x,b]=_.useState(f),[w,S]=_.useState(f);dg(()=>{h.current=!1,m.current=f;for(let R=0;R<w.length;R++){const T=Ur(w[R]);d.includes(T)?(p.delete(T),v.current.delete(T)):p.get(T)!==!0&&p.set(T,!1)}},[w,d.length,d.join("-")]);const E=[];if(f!==x){let R=[...f];for(let T=0;T<w.length;T++){const I=w[T],P=Ur(I);d.includes(P)||(R.splice(T,0,I),E.push(I))}return i==="wait"&&E.length&&(R=E),S(Mu(R)),b(f),null}process.env.NODE_ENV!=="production"&&i==="wait"&&w.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:A}=_.useContext(lc);return g.jsx(g.Fragment,{children:w.map(R=>{const T=Ur(R),I=c&&!s?!1:f===w||d.includes(T),P=()=>{if(v.current.has(T))return;if(v.current.add(T),p.has(T))p.set(T,!0);else return;let M=!0;p.forEach(j=>{j||(M=!1)}),M&&(A==null||A(),S(m.current),c&&(a==null||a()),r&&r())};return g.jsx(YT,{isPresent:I,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,root:l,onExitComplete:I?void 0:P,anchorX:u,children:R},T)})})},kv=_.createContext({strict:!1}),Iu={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Nu=!1;function ZT(){if(Nu)return;const e={};for(const t in Iu)e[t]={isEnabled:n=>Iu[t].some(r=>!!n[r])};fv(e),Nu=!0}function Lv(){return ZT(),LR()}function QT(e){const t=Lv();for(const n in e)t[n]={...t[n],...e[n]};fv(t)}const JT=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 ni(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||JT.has(e)}let Fv=e=>!ni(e);function eP(e){typeof e=="function"&&(Fv=t=>t.startsWith("on")?!ni(t):e(t))}try{eP(require("@emotion/is-prop-valid").default)}catch{}function tP(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Fv(o)||n===!0&&ni(o)||!t&&!ni(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const Li=_.createContext({});function nP(e,t){if(ki(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ir(n)?n:void 0,animate:ir(r)?r:void 0}}return e.inherit!==!1?t:{}}function rP(e){const{initial:t,animate:n}=nP(e,_.useContext(Li));return _.useMemo(()=>({initial:t,animate:n}),[ju(t),ju(n)])}function ju(e){return Array.isArray(e)?e.join(" "):e}const Vc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Vv(e,t,n){for(const r in t)!Pe(t[r])&&!yv(r,n)&&(e[r]=t[r])}function oP({transformTemplate:e},t){return _.useMemo(()=>{const n=Vc();return kc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function iP(e,t){const n=e.style||{},r={};return Vv(r,n,e),Object.assign(r,oP(e,t)),r}function sP(e,t){const n={},r=iP(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 Bv=()=>({...Vc(),attrs:{}});function aP(e,t,n,r){const o=_.useMemo(()=>{const i=Bv();return xv(i,t,wv(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Vv(i,e.style,e),o.style={...i,...o.style}}return o}const cP=["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 Bc(e){return typeof e!="string"||e.includes("-")?!1:!!(cP.indexOf(e)>-1||/[A-Z]/u.test(e))}function lP(e,t,n,{latestValues:r},o,i=!1,c){const l=(c??Bc(e)?aP:sP)(t,r,o,e),s=tP(t,typeof e=="string",i),a=e!==_.Fragment?{...s,...l,ref:n}:{},{children:f}=t,d=_.useMemo(()=>Pe(f)?f.get():f,[f]);return _.createElement(e,{...a,children:d})}function uP({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:fP(n,r,o,e),renderState:t()}}function fP(e,t,n,r){const o={},i=r(e,{});for(const d in i)o[d]=Lo(i[d]);let{initial:c,animate:u}=e;const l=ki(e),s=uv(e);t&&s&&!l&&e.inherit!==!1&&(c===void 0&&(c=t.initial),u===void 0&&(u=t.animate));let a=n?n.initial===!1:!1;a=a||c===!1;const f=a?u:c;if(f&&typeof f!="boolean"&&!Di(f)){const d=Array.isArray(f)?f:[f];for(let h=0;h<d.length;h++){const m=Ac(e,d[h]);if(m){const{transitionEnd:p,transition:v,...x}=m;for(const b in x){let w=x[b];if(Array.isArray(w)){const S=a?w.length-1:0;w=w[S]}w!==null&&(o[b]=w)}for(const b in p)o[b]=p[b]}}}return o}const $v=e=>(t,n)=>{const r=_.useContext(Li),o=_.useContext(ji),i=()=>uP(e,t,r,o);return n?i():uc(i)},dP=$v({scrapeMotionValuesFromProps:Lc,createRenderState:Vc}),hP=$v({scrapeMotionValuesFromProps:Ev,createRenderState:Bv}),pP=Symbol.for("motionComponentSymbol");function mP(e,t,n){const r=_.useRef(n);_.useInsertionEffect(()=>{r.current=n});const o=_.useRef(null);return _.useCallback(i=>{var u;i&&((u=e.onMount)==null||u.call(e,i)),t&&(i?t.mount(i):t.unmount());const c=r.current;if(typeof c=="function")if(i){const l=c(i);typeof l=="function"&&(o.current=l)}else o.current?(o.current(),o.current=null):c(i);else c&&(c.current=i)},[t])}const Uv=_.createContext({});function zn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function gP(e,t,n,r,o,i){var v,x;const{visualElement:c}=_.useContext(Li),u=_.useContext(kv),l=_.useContext(ji),s=_.useContext(Fc).reducedMotion,a=_.useRef(null);r=r||u.renderer,!a.current&&r&&(a.current=r(e,{visualState:t,parent:c,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:s,isSVG:i}));const f=a.current,d=_.useContext(Uv);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&vP(a.current,n,o,d);const h=_.useRef(!1);_.useInsertionEffect(()=>{f&&h.current&&f.update(n,l)});const m=n[Yg],p=_.useRef(!!m&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,m))&&((x=window.MotionHasOptimisedAnimation)==null?void 0:x.call(window,m)));return dg(()=>{f&&(h.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),p.current&&f.animationState&&f.animationState.animateChanges())}),_.useEffect(()=>{f&&(!p.current&&f.animationState&&f.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)==null||b.call(window,m)}),p.current=!1),f.enteringChildren=void 0)}),f}function vP(e,t,n,r){const{layoutId:o,layout:i,drag:c,dragConstraints:u,layoutScroll:l,layoutRoot:s,layoutCrossfade:a}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Gv(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!c||u&&zn(u),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:a,layoutScroll:l,layoutRoot:s})}function Gv(e){if(e)return e.options.allowProjection!==!1?e.projection:Gv(e.parent)}function ds(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&QT(r);const i=n?n==="svg":Bc(e),c=i?hP:dP;function u(s,a){let f;const d={..._.useContext(Fc),...s,layoutId:yP(s)},{isStatic:h}=d,m=rP(s),p=c(s,h);if(!h&&fg){xP(d,r);const v=bP(d);f=v.MeasureLayout,m.visualElement=gP(e,p,d,o,v.ProjectionNode,i)}return g.jsxs(Li.Provider,{value:m,children:[f&&m.visualElement?g.jsx(f,{visualElement:m.visualElement,...d}):null,lP(e,s,mP(p,m.visualElement,a),p,h,t,i)]})}u.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=_.forwardRef(u);return l[pP]=e,l}function yP({layoutId:e}){const t=_.useContext(lc).id;return t&&e!==void 0?t+"-"+e:e}function xP(e,t){const n=_.useContext(kv).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?_n(!1,r,"lazy-strict-mode"):mt(!1,r,"lazy-strict-mode")}}function bP(e){const t=Lv(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function wP(e,t){if(typeof Proxy>"u")return ds;const n=new Map,r=(i,c)=>ds(i,c,e,t),o=(i,c)=>(process.env.NODE_ENV!=="production"&&mc(!1,"motion() is deprecated. Use motion.create() instead."),r(i,c));return new Proxy(o,{get:(i,c)=>c==="create"?r:(n.has(c)||n.set(c,ds(c,void 0,e,t)),n.get(c))})}const EP=(e,t)=>t.isSVG??Bc(e)?new eT(t):new KR(t,{allowProjection:e!==_.Fragment});class SP extends Mt{constructor(t){super(t),t.animationState||(t.animationState=iT(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Di(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let CP=0;class _P extends Mt{constructor(){super(...arguments),this.id=CP++}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 o=this.node.animationState.setActive("exit",!t);n&&!t&&o.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 RP={animation:{Feature:SP},exit:{Feature:_P}};function _r(e){return{point:{x:e.pageX,y:e.pageY}}}const TP=e=>t=>Nc(t)&&e(t,_r(t));function Kn(e,t,n,r){return sr(e,t,TP(n),r)}const Hv=({current:e})=>e?e.ownerDocument.defaultView:null,Du=(e,t)=>Math.abs(e-t);function PP(e,t){const n=Du(e.x,t.x),r=Du(e.y,t.y);return Math.sqrt(n**2+r**2)}const ku=new Set(["auto","scroll"]);class zv{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:i=!1,distanceThreshold:c=3,element:u}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=h=>{this.handleScroll(h.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=ps(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,p=PP(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!p)return;const{point:v}=h,{timestamp:x}=_e;this.history.push({...v,timestamp:x});const{onStart:b,onMove:w}=this.handlers;m||(b&&b(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,h)},this.handlePointerMove=(h,m)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=hs(m,this.transformPagePoint),pe.update(this.updatePoint,!0)},this.handlePointerUp=(h,m)=>{this.end();const{onEnd:p,onSessionEnd:v,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=ps(h.type==="pointercancel"?this.lastMoveEventInfo:hs(m,this.transformPagePoint),this.history);this.startEvent&&p&&p(h,b),v&&v(h,b)},!Nc(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=c,this.contextWindow=o||window;const l=_r(t),s=hs(l,this.transformPagePoint),{point:a}=s,{timestamp:f}=_e;this.history=[{...a,timestamp:f}];const{onSessionStart:d}=n;d&&d(t,ps(s,this.history)),this.removeListeners=Er(Kn(this.contextWindow,"pointermove",this.handlePointerMove),Kn(this.contextWindow,"pointerup",this.handlePointerUp),Kn(this.contextWindow,"pointercancel",this.handlePointerUp)),u&&this.startScrollTracking(u)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(ku.has(r.overflowX)||ku.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:o.x-n.x,y:o.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,o),pe.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Rt(this.updatePoint)}}function hs(e,t){return t?{point:t(e.point)}:e}function Lu(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ps({point:e},t){return{point:e,delta:Lu(e,Wv(t)),offset:Lu(e,AP(t)),velocity:OP(t,.1)}}function AP(e){return e[0]}function Wv(e){return e[e.length-1]}function OP(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Wv(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>it(t)));)n--;if(!r)return{x:0,y:0};const i=Ge(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const c={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function MP(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ve(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ve(n,e,r.max):Math.min(e,n)),e}function Fu(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function IP(e,{top:t,left:n,bottom:r,right:o}){return{x:Fu(e.x,n,o),y:Fu(e.y,t,r)}}function Vu(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function NP(e,t){return{x:Vu(e.x,t.x),y:Vu(e.y,t.y)}}function jP(e,t){let n=.5;const r=Ie(e),o=Ie(t);return o>r?n=nr(t.min,t.max-r,e.min):r>o&&(n=nr(e.min,e.max-o,t.min)),ct(0,1,n)}function DP(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const pa=.35;function kP(e=pa){return e===!1?e=0:e===!0&&(e=pa),{x:Bu(e,"left","right"),y:Bu(e,"top","bottom")}}function Bu(e,t,n){return{min:$u(e,t),max:$u(e,n)}}function $u(e,t){return typeof e=="number"?e:e[t]||0}const LP=new WeakMap;class FP{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ce(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const i=f=>{n?(this.stopAnimation(),this.snapToCursor(_r(f).point)):this.pauseAnimation()},c=(f,d)=>{this.stopAnimation();const{drag:h,dragPropagation:m,onDragStart:p}=this.getProps();if(h&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=_R(h),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=d,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ue(x=>{let b=this.getAxisMotionValue(x).get()||0;if(st.test(b)){const{projection:w}=this.visualElement;if(w&&w.layout){const S=w.layout.layoutBox[x];S&&(b=Ie(S)*(parseFloat(b)/100))}}this.originPoint[x]=b}),p&&pe.postRender(()=>p(f,d)),aa(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},u=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d;const{dragPropagation:h,dragDirectionLock:m,onDirectionLock:p,onDrag:v}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:x}=d;if(m&&this.currentDirection===null){this.currentDirection=VP(x),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,x),this.updateAxis("y",d.point,x),this.visualElement.render(),v&&v(f,d)},l=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d,this.stop(f,d),this.latestPointerEvent=null,this.latestPanInfo=null},s=()=>Ue(f=>{var d;return this.getAnimationState(f)==="paused"&&((d=this.getAxisMotionValue(f).animation)==null?void 0:d.play())}),{dragSnapToOrigin:a}=this.getProps();this.panSession=new zv(t,{onSessionStart:i,onStart:c,onMove:u,onSessionEnd:l,resumeAnimation:s},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:a,distanceThreshold:r,contextWindow:Hv(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!o||!r)return;const{velocity:c}=o;this.startAnimation(c);const{onDragEnd:u}=this.getProps();u&&pe.postRender(()=>u(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Gr(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let c=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(c=MP(c,this.constraints[t],this.elastic[t])),i.set(c)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,o=this.constraints;t&&zn(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=IP(r.layoutBox,t):this.constraints=!1,this.elastic=kP(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ue(c=>{this.constraints!==!1&&this.getAxisMotionValue(c)&&(this.constraints[c]=DP(r.layoutBox[c],this.constraints[c]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!zn(t))return!1;const r=t.current;mt(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=UR(r,o.root,this.visualElement.getTransformPagePoint());let c=NP(o.layout.layoutBox,i);if(n){const u=n(VR(c));this.hasMutatedConstraints=!!u,u&&(c=hv(u))}return c}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:c,onDragTransitionEnd:u}=this.getProps(),l=this.constraints||{},s=Ue(a=>{if(!Gr(a,n,this.currentDirection))return;let f=l&&l[a]||{};c&&(f={min:0,max:0});const d=o?200:1e6,h=o?40:1e7,m={type:"inertia",velocity:r?t[a]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(a,m)});return Promise.all(s).then(u)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return aa(this.visualElement,t),r.start(Pc(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ue(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ue(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ue(n=>{const{drag:r}=this.getProps();if(!Gr(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:c,max:u}=o.layout.layoutBox[n],l=i.get()||0;i.set(t[n]-ve(c,u,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!zn(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Ue(c=>{const u=this.getAxisMotionValue(c);if(u&&this.constraints!==!1){const l=u.get();o[c]=jP({min:l,max:l},this.constraints[c])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ue(c=>{if(!Gr(c,t,null))return;const u=this.getAxisMotionValue(c),{min:l,max:s}=this.constraints[c];u.set(ve(l,s,o[c]))})}addListeners(){if(!this.visualElement.current)return;LP.set(this.visualElement,this);const t=this.visualElement.current,n=Kn(t,"pointerdown",l=>{const{drag:s,dragListener:a=!0}=this.getProps();s&&a&&!av(l.target)&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();zn(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),pe.read(r);const c=sr(window,"resize",()=>this.scalePositionWithinConstraints()),u=o.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:s})=>{this.isDragging&&s&&(Ue(a=>{const f=this.getAxisMotionValue(a);f&&(this.originPoint[a]+=l[a].translate,f.set(f.get()+l[a].translate))}),this.visualElement.render())}));return()=>{c(),n(),i(),u&&u()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:c=pa,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:c,dragMomentum:u}}}function Gr(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function VP(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class BP extends Mt{constructor(t){super(t),this.removeGroupControls=ze,this.removeListeners=ze,this.controls=new FP(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ze}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const Uu=e=>(t,n)=>{e&&pe.postRender(()=>e(t,n))};class $P extends Mt{constructor(){super(...arguments),this.removePointerDownListener=ze}onPointerDown(t){this.session=new zv(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Hv(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Uu(t),onStart:Uu(n),onMove:r,onEnd:(i,c)=>{delete this.session,o&&pe.postRender(()=>o(i,c))}}}mount(){this.removePointerDownListener=Kn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let ms=!1;class UP extends _.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),ms&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Fo.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:c}=r;return c&&(c.isPresent=i,ms=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?c.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?c.promote():c.relegate()||pe.postRender(()=>{const u=c.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ic.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;ms=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function qv(e){const[t,n]=Dv(),r=_.useContext(lc);return g.jsx(UP,{...e,layoutGroup:r,switchLayoutGroup:_.useContext(Uv),isPresent:t,safeToRemove:n})}const GP={pan:{Feature:$P},drag:{Feature:BP,ProjectionNode:jv,MeasureLayout:qv}};function Gu(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&pe.postRender(()=>i(t,_r(t)))}class HP extends Mt{mount(){const{current:t}=this.node;t&&(this.unmount=RR(t,(n,r)=>(Gu(this.node,r,"Start"),o=>Gu(this.node,o,"End"))))}unmount(){}}class zP extends Mt{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=Er(sr(this.node.current,"focus",()=>this.onFocus()),sr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Hu(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 o="onTap"+(n==="End"?"":n),i=r[o];i&&pe.postRender(()=>i(t,_r(t)))}class WP extends Mt{mount(){const{current:t}=this.node;t&&(this.unmount=AR(t,(n,r)=>(Hu(this.node,r,"Start"),(o,{success:i})=>Hu(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ma=new WeakMap,gs=new WeakMap,qP=e=>{const t=ma.get(e.target);t&&t(e)},KP=e=>{e.forEach(qP)};function YP({root:e,...t}){const n=e||document;gs.has(n)||gs.set(n,{});const r=gs.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(KP,{root:e,...t})),r[o]}function XP(e,t,n){const r=YP(t);return ma.set(e,n),r.observe(e),()=>{ma.delete(e),r.unobserve(e)}}const ZP={some:0,all:1};class QP extends Mt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,c={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:ZP[o]},u=l=>{const{isIntersecting:s}=l;if(this.isInView===s||(this.isInView=s,i&&!s&&this.hasEnteredView))return;s&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",s);const{onViewportEnter:a,onViewportLeave:f}=this.node.getProps(),d=s?a:f;d&&d(l)};return XP(this.node.current,c,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(JP(t,n))&&this.startObserver()}unmount(){}}function JP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const eA={inView:{Feature:QP},tap:{Feature:WP},focus:{Feature:zP},hover:{Feature:HP}},tA={layout:{ProjectionNode:jv,MeasureLayout:qv}},nA={...RP,...eA,...GP,...tA},le=wP(nA,EP),rA=_.forwardRef(({children:e,className:t,dividerClassName:n,showDivider:r=!0,...o},i)=>g.jsx(m0,{...o,className:N.classNames("overflow-hidden bg-white",t),ref:i,asChild:!0,children:g.jsxs(le.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3,ease:[.04,.62,.23,.98]},children:[r&&g.jsx("hr",{className:N.classNames("bg-primary-blue h-0.5 border-0",n)}),g.jsx("div",{className:"px-5 py-[15px]",children:e})]})})),oA=({items:e,classNames:t,showDivider:n,defaultValue:r})=>g.jsx(f0,{className:N.classNames("flex flex-col space-y-4",t==null?void 0:t.container),type:"single",defaultValue:r,collapsible:!0,children:e==null?void 0:e.map(o=>g.jsxs(bC,{className:t==null?void 0:t.item,value:o.id,children:[g.jsx(wC,{className:t==null?void 0:t.trigger,triggerIcon:o==null?void 0:o.triggerIcon,children:o.title}),g.jsx(rA,{showDivider:n,dividerClassName:t==null?void 0:t.divider,className:t==null?void 0:t.content,children:o.content})]},o.id))}),iA={success:g.jsx(ce.SvgIconCheckCircle,{width:24,height:24}),info:g.jsx(ce.SvgIconInfoCircle,{width:24,height:24}),warning:g.jsx(ce.SvgIconWarningCircle,{width:24,height:24}),error:g.jsx(ce.SvgIconErrorCircle,{width:24,height:24})},sA={success:"text-green-6",info:"text-blue-6",warning:"text-gold-6",error:"text-red-6"},aA={success:"text-gray-6 hover:bg-gray-100 cursor-pointer",error:"text-gray-6 hover:bg-gray-100 cursor-pointer",warning:"text-gray-6 hover:bg-gray-100 cursor-pointer",info:"text-gray-6 hover:bg-gray-100 cursor-pointer"},cA={success:"bg-green-1 border border-green-3",info:"bg-blue-1 border border-blue-3",warning:"bg-gold-1 border border-gold-3",error:"bg-red-1 border border-red-3"},lA=({type:e="info",title:t,description:n,showIcon:r=!0,closable:o=!1,onClose:i,className:c="",children:u,...l})=>{const s=!!t&&!n&&!u||!t&&!!n&&!u;return g.jsxs(le.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},className:N.classNames("relative border rounded-lg p-4",cA[e],{[c]:c}),...l,children:[g.jsxs(We,{gap:4,align:s?"center":"start",children:[r&&g.jsx("div",{className:N.classNames("shrink-0",sA[e]),children:iA[e]}),g.jsxs(We,{direction:s?"horizontal":"vertical",gap:0,className:"flex-1 min-w-0",align:s?"center":"start",children:[t&&g.jsx("h4",{className:"text-base font-medium leading-tight text-gray-12",children:t}),n&&g.jsx("p",{className:N.classNames("text-sm font-medium leading-tight text-gray-12",{"mt-2":!!t&&!s}),children:n}),u&&g.jsx("div",{className:"mt-2",children:u})]})]}),o&&g.jsx("button",{onClick:i,className:N.classNames("absolute top-4 right-4 p-1 rounded transition-colors",aA[e]),"aria-label":"Cerrar alerta",children:g.jsx(ce.SvgClose,{width:16,height:16})})]})},uA={sm:"size-8 text-[1.3rem]",md:"size-10 text-[1.4rem]",lg:"size-12 text-[2.1rem]",xl:"size-14 text-[2.5rem]"},fA=({size:e="md",src:t,alt:n="avatar",icon:r=g.jsx(ce.SvgUser,{}),bgClassName:o="bg-[#A1ADC0]",colorClassName:i="text-white",className:c="",onClick:u,style:l})=>g.jsxs(Gx,{className:N.classNames("inline-flex shrink-0 overflow-hidden rounded-full",uA[e],c),onClick:u,style:l,children:[t&&g.jsx(Hx,{src:t,alt:n,className:"h-full w-full object-cover"}),g.jsx(zx,{delayMs:0,className:N.classNames("flex h-full w-full items-center justify-center rounded-full",i,o),children:r})]}),dA={default:N.classNames("bg-primary-blue border-primary-blue text-white","hover:bg-darks-blue-Macropay-30 hover:border-darks-blue-Macropay-30"),primary:N.classNames("bg-primary-yellow border-primary-yellow text-primary-blue","hover:bg-shades-yellow-10 hover:border-shades-yellow-10"),secondary:N.classNames("bg-white text-primary-blue border-primary-blue","hover:border-darks-blue-Macropay-30 hover:text-darks-blue-Macropay-30"),text:N.classNames("bg-transparent text-primary-blue border-transparent shadow-none","hover:text-darks-blue-Macropay-30","disabled:bg-transparent disabled:border-transparent"),danger:N.classNames("bg-primary-red border-primary-red text-white","hover:bg-shades-red-10 hover:border-shades-red-10"),withoutColor:"bg-transparent border-transparent shadow-none"},hA={sm:"px-3 text-sm h-6 rounded-md",md:"px-4 py-2 h-8",lg:"px-6 py-[7px] text-base h-10 rounded-lg",xl:"px-6 py-[11px] h-12"},zu=["sm","md","lg","xl"],pA=e=>{const t=zu.indexOf(e);return t===-1?"":N.classNames(zu.slice(0,t+1).map(n=>hA[n]))},mA={pointer:"cursor-pointer",default:"cursor-default","not-allowed":"cursor-not-allowed",wait:"cursor-wait",text:"cursor-text"},gA=e=>N.classNames("flex items-center justify-center gap-2 border active:scale-95",mA[e],"disabled:bg-gray-3 disabled:text-gray-6 disabled:border-gray-5 disabled:cursor-not-allowed","transition-all duration-300 ease-in-out","shadow-button"),ga=({icon:e,children:t,leftIcon:n,rightIcon:r,type:o="button",variant:i="default",size:c="md",className:u="",isLoading:l=!1,positionLoading:s="left",cursor:a="pointer",...f})=>{const d=_.useId(),h=gA(a),{isLeftLoading:m,isRightLoading:p}=_.useMemo(()=>({isLeftLoading:s==="left"&&l,isRightLoading:s==="right"&&l}),[l,s]),v=_.useMemo(()=>["primary","secondary","text","withoutColor"].includes(i)?g.jsx(ce.SvgLoaderAnimBlue,{className:"animate-spin"}):g.jsx(ce.SvgLoaderAnimWhite,{className:"animate-spin"}),[i]),x=_.useMemo(()=>e??n,[e,n]);return g.jsxs(le.button,{id:`${d}-button`,className:N.classNames(h,dA[i],pA(c),u),type:o,...f,children:[g.jsx(Wt,{mode:"wait",children:(m||x)&&g.jsx(le.div,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},exit:{opacity:0,x:-8},transition:{duration:.2},children:m?v:x},"leftIcon")}),typeof t=="string"||typeof t=="number"?g.jsx("span",{className:"whitespace-normal",children:t}):t,g.jsx(Wt,{mode:"wait",children:(p||r)&&g.jsx(le.div,{initial:{opacity:0,x:8},animate:{opacity:1,x:0},exit:{opacity:0,x:8},transition:{duration:.2},children:p?v:r},"rightIcon")})]})},vA=({children:e,className:t="",align:n="horizontal",shadow:r=!0,rounded:o=!0,bordered:i=!0,...c})=>{const{...u}=c,l=N.classNames("bg-white p-4",{"flex flex-col":n==="horizontal","flex flex-col md:flex-row md:max-w-xl":n==="vertical"},{"shadow-lg":r},{"rounded-2xl":o},{"border border-gray-200":i},{[t]:t});return g.jsx(le.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.2},className:l,...u,children:e})};var vs={exports:{}};/*!
105
105
  Copyright (c) 2018 Jed Watson.
106
106
  Licensed under the MIT License (MIT), see
107
107
  http://jedwatson.github.io/classnames
108
- */var Bu;function JP(){return Bu||(Bu=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",c=0;c<arguments.length;c++){var u=arguments[c];u&&(s=o(s,r(u)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var c="";for(var u in s)t.call(s,u)&&s[u]&&(c=o(c,u));return c}function o(s,c){return c?s?s+" "+c:s+c:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(ms)),ms.exports}var eA=JP();const Dn=cd(eA),tA={sm:"h-4 w-4",md:"h-6 w-6"},nA={sm:"h-3 w-3",md:"h-4 w-4"},rA={sm:"h-2 w-2",md:"h-4 w-4"},oA={sm:"text-sm",md:"text-base"},Dv=y.forwardRef(({label:e,size:t="md",checked:n,indeterminate:r=!1,disabled:o=!1,onCheckedChange:s,className:c,...u},l)=>{const i=y.useId(),a=h=>{o||s==null||s(h===!0)},f=r?"indeterminate":n?"checked":"none",d={checked:g.jsx(ce.SvgCheckv2,{className:Dn(nA[t],o?"text-stone-300 fill-stone-300":"text-white")}),indeterminate:g.jsx(ce.SvgIndeterminate,{className:Dn(rA[t],o?"text-stone-300 fill-stone-300":"text-blue-800")})};return g.jsxs("div",{className:Dn("flex gap-2 items-start sm:items-center select-none",o?"pointer-events-none":"cursor-pointer",c),children:[g.jsx(uh,{id:i,ref:l,checked:n,"aria-checked":r?"mixed":n,disabled:o,onCheckedChange:a,className:Dn("flex justify-center items-center rounded-sm border relative transition-[background-color]",tA[t],{"bg-white border-gray-300 hover:border-blue-800":!n&&!o,"bg-blue-800 border-blue-800":n&&!r&&!o||r&&!o,"bg-neutral-100 border-stone-300":o}),...u,children:f!=="none"&&d[f]}),e&&g.jsx("label",{htmlFor:i,className:Dn(oA[t],o&&"text-gray-400","cursor-pointer"),children:e})]})});Dv.displayName="Checkbox";const iA=({children:e,className:t,width:n="min-w-full w-full",type:r="horizontal",align:o="center"})=>{const s={left:"before:w-[5%] after:w-full",center:"before:w-full after:w-full",right:"before:w-full after:w-[5%]"};return g.jsx("div",{className:j.classNames("p-0 m-0 box-border",{"flex h-px items-center":r==="horizontal","inline-block border-s border-s-gray-5 min-h-[1em] h-full":r==="vertical","bg-grays-Macropay-05":r==="horizontal"&&!e,"whitespace-nowrap before:h-px after:h-px before:bg-grays-Macropay-05 after:bg-grays-Macropay-05":r==="horizontal"&&e,[`${s[o]}`]:o,[n]:n&&r==="horizontal",[`${t}`]:t}),children:e&&r==="horizontal"&&g.jsx("span",{className:j.classNames("inline-block ps-4 pe-4",{[`text-${o}`]:o}),children:e})})},sA=({children:e,id:t,className:n=""})=>{const r=_.useRef(null),[o,s]=_.useState(!1);return _.useEffect(()=>{const c=document.getElementById(t)||document.createElement("div");return r.current=c,r.current.id=t,n&&(r.current.className=n),document.body.appendChild(r.current),s(!0),()=>{r.current.parentElement&&r.current.parentElement.removeChild(r.current)}},[t]),o?ya.createPortal(e,r.current):null},Nv=_.memo(sA),Nn={backdrop:"fixed inset-0 bg-black/50",drawer:"fixed top-0 h-full w-80 bg-white shadow-xl",header:"flex justify-end absolute right-7",closeButton:"text-gray-500 hover:text-gray-700",children:"overflow-y-auto h-[calc(100%-3rem)]"},aA={right:"right-0",left:"left-0"},Ur={backdrop:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},drawer:{transition:{type:"tween",duration:.2}}},cA=({open:e,onClose:t,children:n,position:r="right",className:o="",classNames:s={backdrop:"",drawer:"",header:"",children:""}})=>(_.useEffect(()=>{const c=u=>{u.key==="Escape"&&t()};return e&&document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[e,t]),g.jsx(Nv,{id:"drawer",children:g.jsx(vn,{children:e&&g.jsxs(g.Fragment,{children:[g.jsx(de.div,{className:j.classNames(Nn.backdrop,s.backdrop),initial:Ur.backdrop.initial,animate:Ur.backdrop.animate,exit:Ur.backdrop.exit,onClick:t}),g.jsxs(de.div,{className:j.classNames(Nn.drawer,aA[r],s.drawer,o),initial:{x:r==="right"?"100%":"-100%"},animate:{x:0},exit:{x:r==="right"?"100%":"-100%"},transition:Ur.drawer.transition,children:[g.jsx("div",{className:j.classNames(Nn.header,s.header),children:g.jsx("button",{onClick:t,className:Nn.closeButton,children:"✕"})}),g.jsx("div",{className:j.classNames(Nn.children,s.children),children:n})]})]})})})),lA=_.forwardRef(({children:e,className:t,...n},r)=>g.jsx(Sw,{className:j.classNames("inline-flex items-center justify-center rounded px-4 py-2 text-sm font-medium","bg-white border border-gray-3 text-gray-12","hover:bg-gray-1 focus:outline-none focus:ring-2 focus:ring-primary-blue focus:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","transition-colors",t),ref:r,...n,children:e})),uA=_.forwardRef(({children:e,className:t,...n},r)=>g.jsx(Cw,{children:g.jsx(_w,{...n,className:j.classNames("min-w-[220px] rounded-lg bg-white shadow-(--box-shadow-accordion) border border-gray-2","overflow-hidden",t),ref:r,asChild:!0,children:g.jsx(de.div,{initial:{opacity:0,scale:.95,y:-10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:-10},transition:{duration:.2,ease:[.04,.62,.23,.98]},children:g.jsx("div",{className:"p-1",children:e})})})})),fA=_.forwardRef(({children:e,className:t,icon:n,shortcut:r,...o},s)=>g.jsxs(Tw,{className:j.classNames("group relative flex cursor-pointer select-none items-center justify-between rounded px-3 py-2 text-sm outline-none","text-gray-12 hover:bg-blue-1 hover:text-blue-6","focus:bg-blue-1 focus:text-blue-6","data-disabled:pointer-events-none data-disabled:opacity-50","transition-colors",t),ref:s,...o,children:[g.jsxs("div",{className:"flex items-center gap-2",children:[n&&g.jsx("span",{className:"inline-flex shrink-0",children:n}),g.jsx("span",{children:e})]}),r&&g.jsx("span",{className:"ml-auto pl-4 text-xs text-gray-6 group-hover:text-blue-6",children:r})]})),dA=_.forwardRef(({className:e,...t},n)=>g.jsx(Pw,{className:j.classNames("my-1 h-px bg-gray-3",e),ref:n,...t})),hA=_.forwardRef(({children:e,className:t,...n},r)=>g.jsx(Rw,{className:j.classNames("px-3 py-2 text-xs font-semibold text-gray-6",t),ref:r,...n,children:e})),pA=(e,t)=>{const n={separator:()=>g.jsx(dA,{className:t==null?void 0:t.separator},e.id),label:()=>g.jsx(hA,{className:t==null?void 0:t.label,children:e.label},e.id),default:()=>g.jsx(fA,{className:t==null?void 0:t.item,icon:e.icon,shortcut:e.shortcut,disabled:e.disabled,onSelect:e.onSelect,children:e.label},e.id)};return(n[e.type]||n.default)()},mA=({trigger:e,items:t=[],align:n="start",sideOffset:r=4,classNames:o})=>g.jsxs(Ew,{children:[g.jsx(lA,{children:e}),g.jsx(uA,{align:n,sideOffset:r,className:o==null?void 0:o.content,children:t.map(s=>g.jsx("div",{children:pA(s,o)},s.id))})]}),Gr={container:"container mx-auto",wrapper:"flex flex-col items-center",icon:"text-3xl text-gray-300",text:"mt-3 text-base text-gray-300 font-normal"},gA=({text:e="No hay datos para mostrar",className:t="",icon:n=g.jsx(ce.SvgEmpty,{})})=>g.jsx(ud,{children:g.jsx(de.section,{"data-cy":"empty-component",initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.25,ease:"easeOut"},className:j.classNames(Gr.container,t),children:g.jsxs("div",{className:Gr.wrapper,children:[g.jsx(de.div,{initial:{scale:.9},animate:{scale:1},transition:{duration:.2},children:_.cloneElement(n,{className:j.classNames(Gr.icon,n.props.className),...n.props})}),g.jsx(de.h1,{"data-cy":"empty-text",className:Gr.text,initial:{opacity:0},animate:{opacity:1},transition:{delay:.1},children:e})]})})});var jv=(e=>(e.justify="justify",e.align="items",e.gap="gap",e))(jv||{});const{align:vA,justify:yA,gap:xA}=jv,bA={horizontal:"flex-row",vertical:"flex-col"},wA={horizontal:"flex-row-reverse",vertical:"flex-col-reverse"},We=({children:e,justify:t,align:n,gap:r,direction:o="horizontal",isReverse:s=!1,style:c,className:u="",onClick:l,wrap:i,...a})=>g.jsx(de.div,{"aria-hidden":!0,className:j.classNames(`flex ${s?wA[o]:bA[o]}`,j.generateClasses(xA,r),j.generateClasses(yA,t),j.generateClasses(vA,n),{[u]:u,"flex-wrap":i}),onClick:l,style:c,children:e,...a}),EA={md:"py-[5px] min-h-8 rounded-md",lg:"py-2 text-base min-h-10 rounded-lg",xl:"py-3 text-base min-h-12 rounded-lg"},kv=(e,t,n,r,o)=>{const s=["px-3 py-px min-h-6 text-sm leading-[22px] w-full","transition-all ease-out duration-300","placeholder:text-gray-6 text-gray-10 outline-none appearance-none","disabled:bg-gray-3 disabled:text-gray-6 disabled:border-gray-5"],c=e==="default"?["rounded border shadow-button border-gray-7","focus:border-light-blue-30 focus:ring-light-blue-30 focus:shadow-[0_0_0_2px_#E6EDF8]"]:["border-0 border-b border-gray-7 rounded-none! bg-transparent","focus:border-light-blue-30"],u={"pl-8":o,[e==="default"?"border-red text-red focus:border-red focus:ring-red focus:shadow-[0_0_0_2px_#FFCCC7]":"border-b-red text-red focus:border-b-red"]:n,[e==="default"?"border-green text-green focus:border-green focus:ring-green focus:shadow-[0_0_0_2px_#D4F0E0]":"border-b-green text-green focus:border-b-green"]:r};return{sizeStyles:EA[t],stateStyles:u,baseStyles:s,variantStyles:c}},Lv=({onClick:e,disabled:t})=>g.jsx(de.button,{initial:{opacity:0,y:"-50%"},animate:{opacity:1,y:"-50%"},exit:{opacity:0,y:"-50%"},transition:{duration:.2},type:"button",className:"absolute transition-colors ease-out duration-300 top-1/2 right-3 disabled:opacity-100 text-gray-6 hover:text-gray-7 disabled:hover:text-gray-6",onClick:e,disabled:t,children:g.jsx(ce.SvgCloseCircle,{})},"clear-button"),SA=({error:e,size:t="md",check:n,icon:r,leftIcon:o,clear:s=!0,disabled:c=!1,variant:u="default",className:l,...i})=>{const[a,f]=_.useState(i.value??""),{baseStyles:d,variantStyles:h,sizeStyles:m,stateStyles:p}=kv(u,t,e,n,!!r),v=_.useMemo(()=>s&&a?g.jsx(Lv,{disabled:c,onClick:()=>f("")}):o?g.jsx("div",{className:j.classNames("absolute right-3 top-1/2 -translate-y-1/2",{"opacity-40":c}),children:o}):null,[s,a,o,c]);return g.jsxs("div",{className:j.classNames("relative",l),children:[r&&g.jsx("div",{className:j.classNames("absolute left-3 top-1/2 -translate-y-1/2",{"opacity-40":c}),children:r}),g.jsx(de.input,{...i,value:a,disabled:c,onChange:x=>f(x.target.value),className:j.classNames(...d,...h,m,p,l)}),g.jsx(vn,{children:v})]})},CA=({num:e,format:t,useGrouping:n,minFractionDigits:r,maxFractionDigits:o,mode:s,currency:c,currencyDisplay:u,locale:l,prefix:i="",suffix:a=""})=>{if(e==null||!t)return(e==null?void 0:e.toString())??"";const f={useGrouping:n,minimumFractionDigits:r,maximumFractionDigits:o,...s==="currency"&&{style:"currency",currency:c,currencyDisplay:u}},d=new Intl.NumberFormat(l,f).format(e);return`${i} ${d} ${a}`.trim()},_A=(e,t="",n="",r=!0)=>{if(!e)return r?null:0;const o=e.replace(t,"").replace(n,"").replaceAll(/[^\d.-]/g,""),s=Number.parseFloat(o);return Number.isNaN(s)?null:s},RA=(e,t,n)=>e==null||(t==null||e>=t)&&(n==null||e<=n),TA=e=>{const{onChange:t,onValueChange:n,format:r=!0,locale:o="es-MX",mode:s="decimal",currency:c="MXN",currencyDisplay:u="symbol",useGrouping:l=!0,minFractionDigits:i,maxFractionDigits:a,min:f,max:d,allowEmpty:h=!0,prefix:m,suffix:p,...v}=e,[x,b]=_.useState(Number((v==null?void 0:v.value)??null)),[w,E]=_.useState(""),[S,T]=_.useState(!1),P=_.useMemo(()=>({format:r,useGrouping:l,minFractionDigits:i,maxFractionDigits:a,mode:s,currency:c,currencyDisplay:u,locale:o,prefix:m,suffix:p}),[r,l,i,a,s,c,u,o,m,p]),A=_.useCallback(B=>CA({num:B,...P}),[P]),O=_.useCallback(B=>_A(B,m,p,h),[m,p,h]);_.useEffect(()=>{S||E(A(x))},[x,A,S]);const R=_.useCallback(B=>{const q=B.target.value;E(q);const G=O(q);RA(G,f,d)&&(b(G),t==null||t(G),n==null||n({originalEvent:B.nativeEvent,value:G}))},[O,f,d,t,n]),I=_.useCallback(B=>{var q;T(!0),x!=null&&E(x.toString()),(q=v.onFocus)==null||q.call(v,B)},[x,v]),D=_.useCallback(B=>{var q;T(!1),E(A(x)),(q=v.onBlur)==null||q.call(v,B)},[A,x,v]),F=_.useCallback(()=>{E(""),b(null),t==null||t(null)},[t]);return{displayValue:w,handleChange:R,handleFocus:I,handleBlur:D,handleClear:F,...v}},Fv=_.forwardRef((e,t)=>{const{error:n,size:r="md",check:o,icon:s,leftIcon:c,clear:u=!0,disabled:l=!1,variant:i="default",className:a,displayValue:f,handleChange:d,handleFocus:h,handleBlur:m,handleClear:p,...v}=TA(e),{baseStyles:x,variantStyles:b,sizeStyles:w,stateStyles:E}=kv(i,r,n,o,!!s),S=_.useMemo(()=>u&&f?g.jsx(Lv,{disabled:l,onClick:p}):c?g.jsx("div",{className:j.classNames("absolute right-3 top-1/2 -translate-y-1/2",{"opacity-40":l}),children:c}):null,[u,f,c,l,p]);return g.jsxs("div",{className:j.classNames("relative",a),children:[s&&g.jsx("div",{className:j.classNames("absolute left-3 top-1/2 -translate-y-1/2",{"opacity-40":l}),children:s}),g.jsx(de.input,{...v,ref:t,type:"text",value:f,disabled:l,onChange:d,onFocus:h,onBlur:m,className:j.classNames(...x,...b,w,E,a)}),g.jsx(vn,{children:S})]})});Fv.displayName="InputNumber";const PA={Text:SA,Number:Fv},$u=(e,t)=>`${e}-${t}`,ki=_.forwardRef(({children:e,as:t,asChild:n=!1,className:r,italic:o=!1,size:s="base",weight:c="normal",...u},l)=>{if(!e)return null;const i=$u("text",s),a=$u("font",c),f=n?ud:t??"p";return g.jsx(f,{ref:l,className:j.classNames("text-grays-Macropay-10",i,a,r,{italic:o}),...u,children:e})});ki.displayName="Typography";const AA=({children:e,as:t="p",className:n,...r})=>g.jsx(ki,{as:t,className:n,...r,children:e}),OA={1:"text-4xl",2:"text-3xl",3:"text-2xl",4:"text-xl",5:"text-lg",6:"text-base"},MA={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"},IA=({children:e,className:t="",level:n=1,...r})=>{const o=MA[n];return g.jsx(ki,{as:o,weight:"bold",className:`${OA[n]} ${t}`,...r,children:e})},Pn=ki;Pn.Text=AA;Pn.Title=IA;const DA=({title:e,className:t=""})=>g.jsx(Pn.Title,{level:3,className:t,children:e}),NA={sm:"12rem",md:"16rem",lg:"20rem",xl:"24rem"},jA={sm:"w-56",md:"w-64",lg:"w-80",xl:"w-96"},kA={sm:"px-2 py-1.5",md:"px-3 py-2",lg:"px-4 py-2.5",xl:"px-5 py-3"},Vv={sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"},LA=({item:e,index:t,isLast:n,size:r,itemClassName:o=""})=>{const s=e.href?"a":"button",c=e.href?{href:e.href}:{onClick:e.onClick,type:"button"};return g.jsx(de.li,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{duration:.2,delay:t*.05},className:j.classNames("border-gray-5 transition-colors duration-200",{"border-b":!n,"hover:bg-gray-3":!e.disabled,"opacity-50 cursor-not-allowed":e.disabled}),children:g.jsx(s,{...c,disabled:e.disabled,className:j.classNames("w-full text-left block",kA[r],Vv[r],"text-gray-12 no-underline","focus:outline-none focus:ring-2 focus:ring-primary-blue focus:ring-inset",{"cursor-pointer":!e.disabled,"cursor-not-allowed":e.disabled,[o]:o}),children:e.content})},e.id)},FA=({message:e,size:t})=>g.jsx("li",{className:j.classNames("flex items-center justify-center h-full text-gray-9",Vv[t]),children:e}),VA=({paginatedItems:e,containerHeight:t,size:n,withPagination:r,showBorder:o,showShadow:s,emptyMessage:c,itemClassName:u=""})=>g.jsx("ul",{style:{height:r?"auto":t},className:j.classNames(jA[n],"rounded-lg",{"border border-gray-6":o,"shadow-md":s,"overflow-y-auto scroll-smooth":!r}),children:e.length===0?g.jsx(FA,{message:c,size:n}):e.map((l,i)=>g.jsx(LA,{item:l,index:i,isLast:i===e.length-1,size:n,itemClassName:u},l.id))}),BA=(e,t,n,r)=>_.useMemo(()=>{if(!t)return e;const o=(n-1)*r,s=o+r;return e.slice(o,s)},[e,t,n,r]),$A=(e,t)=>_.useMemo(()=>Math.ceil(e/t),[e,t]),UA=(e,t)=>t||NA[e],GA=e=>t=>{e&&e(t)},HA=({items:e,title:t,size:n="md",withPagination:r=!1,currentPage:o=1,itemsPerPage:s=10,onPageChange:c,showBorder:u=!0,showShadow:l=!0,height:i,className:a="",titleClassName:f="",itemClassName:d="",emptyMessage:h="No items to display",onAnimationStart:m,onAnimationEnd:p,onAnimationIteration:v,...x})=>{const b=BA(e,r,o,s),w=$A(e.length,s),E=UA(n,i),S=GA(c);return g.jsx("div",{onAnimationStart:m,onAnimationEnd:p,onAnimationIteration:v,...x,children:g.jsxs(de.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3},className:j.classNames("flex flex-col",{[a]:a}),children:[t&&g.jsx(DA,{title:t,size:n,className:f}),g.jsx(VA,{paginatedItems:b,containerHeight:E,size:n,withPagination:r,showBorder:u,showShadow:l,emptyMessage:h,itemClassName:d}),r&&w>1&&g.jsx(Bv,{currentPage:o,totalPages:w,onPageChange:S,size:n})]})})},zA={hidden:{opacity:0},visible:{opacity:1},exit:{opacity:0}},WA={hidden:{opacity:0,scale:.95,y:8},visible:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:8}},qA=()=>g.jsx(mx,{asChild:!0,children:g.jsx(de.div,{className:`\r
108
+ */var Wu;function yA(){return Wu||(Wu=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var i="",c=0;c<arguments.length;c++){var u=arguments[c];u&&(i=o(i,r(u)))}return i}function r(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return n.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var c="";for(var u in i)t.call(i,u)&&i[u]&&(c=o(c,u));return c}function o(i,c){return c?i?i+" "+c:i+c:i}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(vs)),vs.exports}var xA=yA();const jn=pd(xA),bA={sm:"h-4 w-4",md:"h-6 w-6"},wA={sm:"h-3 w-3",md:"h-4 w-4"},EA={sm:"h-2 w-2",md:"h-4 w-4"},SA={sm:"text-sm",md:"text-base"},Kv=y.forwardRef(({label:e,size:t="md",checked:n,indeterminate:r=!1,disabled:o=!1,onCheckedChange:i,className:c,...u},l)=>{const s=y.useId(),a=h=>{o||i==null||i(h===!0)},f=r?"indeterminate":n?"checked":"none",d={checked:g.jsx(ce.SvgCheckv2,{className:jn(wA[t],o?"text-stone-300 fill-stone-300":"text-white")}),indeterminate:g.jsx(ce.SvgIndeterminate,{className:jn(EA[t],o?"text-stone-300 fill-stone-300":"text-blue-800")})};return g.jsxs("div",{className:jn("flex gap-2 items-start sm:items-center select-none",o?"pointer-events-none":"cursor-pointer",c),children:[g.jsx(gh,{id:s,ref:l,checked:n,"aria-checked":r?"mixed":n,disabled:o,onCheckedChange:a,className:jn("flex justify-center items-center rounded-sm border relative transition-[background-color]",bA[t],{"bg-white border-gray-300 hover:border-blue-800":!n&&!o,"bg-blue-800 border-blue-800":n&&!r&&!o||r&&!o,"bg-neutral-100 border-stone-300":o}),...u,children:f!=="none"&&d[f]}),e&&g.jsx("label",{htmlFor:s,className:jn(SA[t],o&&"text-gray-400","cursor-pointer"),children:e})]})});Kv.displayName="Checkbox";const CA=({children:e,className:t,width:n="min-w-full w-full",type:r="horizontal",align:o="center"})=>{const i={left:"before:w-[5%] after:w-full",center:"before:w-full after:w-full",right:"before:w-full after:w-[5%]"};return g.jsx("div",{className:N.classNames("p-0 m-0 box-border",{"flex h-px items-center":r==="horizontal","inline-block border-s border-s-gray-5 min-h-[1em] h-full":r==="vertical","bg-grays-Macropay-05":r==="horizontal"&&!e,"whitespace-nowrap before:h-px after:h-px before:bg-grays-Macropay-05 after:bg-grays-Macropay-05":r==="horizontal"&&e,[`${i[o]}`]:o,[n]:n&&r==="horizontal",[`${t}`]:t}),children:e&&r==="horizontal"&&g.jsx("span",{className:N.classNames("inline-block ps-4 pe-4",{[`text-${o}`]:o}),children:e})})},_A=({children:e,id:t,className:n=""})=>{const r=_.useRef(null),[o,i]=_.useState(!1);return _.useEffect(()=>{const c=document.getElementById(t)||document.createElement("div");return r.current=c,r.current.id=t,n&&(r.current.className=n),document.body.appendChild(r.current),i(!0),()=>{r.current.parentElement&&r.current.parentElement.removeChild(r.current)}},[t]),o?xa.createPortal(e,r.current):null},Yv=_.memo(_A),Dn={backdrop:"fixed inset-0 bg-black/50",drawer:"fixed top-0 h-full w-80 bg-white shadow-xl",header:"flex justify-end absolute right-7",closeButton:"text-gray-500 hover:text-gray-700",children:"overflow-y-auto h-[calc(100%-3rem)]"},RA={right:"right-0",left:"left-0"},Hr={backdrop:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},drawer:{transition:{type:"tween",duration:.2}}},TA=({open:e,onClose:t,children:n,position:r="right",className:o="",classNames:i={backdrop:"",drawer:"",header:"",children:""}})=>(_.useEffect(()=>{const c=u=>{u.key==="Escape"&&t()};return e&&document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[e,t]),g.jsx(Yv,{id:"drawer",children:g.jsx(Wt,{children:e&&g.jsxs(g.Fragment,{children:[g.jsx(le.div,{className:N.classNames(Dn.backdrop,i.backdrop),initial:Hr.backdrop.initial,animate:Hr.backdrop.animate,exit:Hr.backdrop.exit,onClick:t}),g.jsxs(le.div,{className:N.classNames(Dn.drawer,RA[r],i.drawer,o),initial:{x:r==="right"?"100%":"-100%"},animate:{x:0},exit:{x:r==="right"?"100%":"-100%"},transition:Hr.drawer.transition,children:[g.jsx("div",{className:N.classNames(Dn.header,i.header),children:g.jsx("button",{onClick:t,className:Dn.closeButton,children:"✕"})}),g.jsx("div",{className:N.classNames(Dn.children,i.children),children:n})]})]})})})),PA=_.forwardRef(({children:e,className:t,...n},r)=>g.jsx(Lw,{className:N.classNames("inline-flex items-center justify-center rounded px-4 py-2 text-sm font-medium","bg-white border border-gray-3 text-gray-12","hover:bg-gray-1 focus:outline-none focus:ring-2 focus:ring-primary-blue focus:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","transition-colors",t),ref:r,...n,children:e})),AA=_.forwardRef(({children:e,className:t,...n},r)=>g.jsx(Fw,{children:g.jsx(Vw,{...n,className:N.classNames("min-w-[220px] rounded-lg bg-white shadow-(--box-shadow-accordion) border border-gray-2","overflow-hidden",t),ref:r,asChild:!0,children:g.jsx(le.div,{initial:{opacity:0,scale:.95,y:-10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:-10},transition:{duration:.2,ease:[.04,.62,.23,.98]},children:g.jsx("div",{className:"p-1",children:e})})})})),OA=_.forwardRef(({children:e,className:t,icon:n,shortcut:r,...o},i)=>g.jsxs($w,{className:N.classNames("group relative flex cursor-pointer select-none items-center justify-between rounded px-3 py-2 text-sm outline-none","text-gray-12 hover:bg-blue-1 hover:text-blue-6","focus:bg-blue-1 focus:text-blue-6","data-disabled:pointer-events-none data-disabled:opacity-50","transition-colors",t),ref:i,...o,children:[g.jsxs("div",{className:"flex items-center gap-2",children:[n&&g.jsx("span",{className:"inline-flex shrink-0",children:n}),g.jsx("span",{children:e})]}),r&&g.jsx("span",{className:"ml-auto pl-4 text-xs text-gray-6 group-hover:text-blue-6",children:r})]})),MA=_.forwardRef(({className:e,...t},n)=>g.jsx(Uw,{className:N.classNames("my-1 h-px bg-gray-3",e),ref:n,...t})),IA=_.forwardRef(({children:e,className:t,...n},r)=>g.jsx(Bw,{className:N.classNames("px-3 py-2 text-xs font-semibold text-gray-6",t),ref:r,...n,children:e})),NA=(e,t)=>{const n={separator:()=>g.jsx(MA,{className:t==null?void 0:t.separator},e.id),label:()=>g.jsx(IA,{className:t==null?void 0:t.label,children:e.label},e.id),default:()=>g.jsx(OA,{className:t==null?void 0:t.item,icon:e.icon,shortcut:e.shortcut,disabled:e.disabled,onSelect:e.onSelect,children:e.label},e.id)};return(n[e.type]||n.default)()},jA=({trigger:e,items:t=[],align:n="start",sideOffset:r=4,classNames:o})=>g.jsxs(kw,{children:[g.jsx(PA,{children:e}),g.jsx(AA,{align:n,sideOffset:r,className:o==null?void 0:o.content,children:t.map(i=>g.jsx("div",{children:NA(i,o)},i.id))})]}),zr={container:"container mx-auto",wrapper:"flex flex-col items-center",icon:"text-3xl text-gray-300",text:"mt-3 text-base text-gray-300 font-normal"},DA=({text:e="No hay datos para mostrar",className:t="",icon:n=g.jsx(ce.SvgEmpty,{})})=>g.jsx(gd,{children:g.jsx(le.section,{"data-cy":"empty-component",initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.25,ease:"easeOut"},className:N.classNames(zr.container,t),children:g.jsxs("div",{className:zr.wrapper,children:[g.jsx(le.div,{initial:{scale:.9},animate:{scale:1},transition:{duration:.2},children:_.cloneElement(n,{className:N.classNames(zr.icon,n.props.className),...n.props})}),g.jsx(le.h1,{"data-cy":"empty-text",className:zr.text,initial:{opacity:0},animate:{opacity:1},transition:{delay:.1},children:e})]})})});var Xv=(e=>(e.justify="justify",e.align="items",e.gap="gap",e))(Xv||{});const{align:kA,justify:LA,gap:FA}=Xv,VA={horizontal:"flex-row",vertical:"flex-col"},BA={horizontal:"flex-row-reverse",vertical:"flex-col-reverse"},We=({children:e,justify:t,align:n,gap:r,direction:o="horizontal",isReverse:i=!1,style:c,className:u="",onClick:l,wrap:s,...a})=>g.jsx(le.div,{"aria-hidden":!0,className:N.classNames(`flex ${i?BA[o]:VA[o]}`,N.generateClasses(FA,r),N.generateClasses(LA,t),N.generateClasses(kA,n),{[u]:u,"flex-wrap":s}),onClick:l,style:c,children:e,...a}),$A={md:"py-[5px] min-h-8 rounded-md",lg:"py-2 text-base min-h-10 rounded-lg",xl:"py-3 text-base min-h-12 rounded-lg"},Zv=(e,t,n,r,o)=>{const i=["px-3 py-px min-h-6 text-sm leading-[22px] w-full","transition-all ease-out duration-300","placeholder:text-gray-6 text-gray-10 outline-none appearance-none","disabled:bg-gray-3 disabled:text-gray-6 disabled:border-gray-5"],c=e==="default"?["rounded border shadow-button border-gray-7","focus:border-light-blue-30 focus:ring-light-blue-30 focus:shadow-[0_0_0_2px_#E6EDF8]"]:["border-0 border-b border-gray-7 rounded-none! bg-transparent","focus:border-light-blue-30"],u={"pl-8":o,[e==="default"?"border-red text-red focus:border-red focus:ring-red focus:shadow-[0_0_0_2px_#FFCCC7]":"border-b-red text-red focus:border-b-red"]:n,[e==="default"?"border-green text-green focus:border-green focus:ring-green focus:shadow-[0_0_0_2px_#D4F0E0]":"border-b-green text-green focus:border-b-green"]:r};return{sizeStyles:$A[t],stateStyles:u,baseStyles:i,variantStyles:c}},Qv=({onClick:e,disabled:t})=>g.jsx(le.button,{initial:{opacity:0,y:"-50%"},animate:{opacity:1,y:"-50%"},exit:{opacity:0,y:"-50%"},transition:{duration:.2},type:"button",className:"absolute transition-colors ease-out duration-300 top-1/2 right-3 disabled:opacity-100 text-gray-6 hover:text-gray-7 disabled:hover:text-gray-6",onClick:e,disabled:t,children:g.jsx(ce.SvgCloseCircle,{})},"clear-button"),UA=({error:e,size:t="md",check:n,icon:r,leftIcon:o,clear:i=!0,disabled:c=!1,variant:u="default",className:l,...s})=>{const[a,f]=_.useState(s.value??""),{baseStyles:d,variantStyles:h,sizeStyles:m,stateStyles:p}=Zv(u,t,e,n,!!r),v=_.useMemo(()=>i&&a?g.jsx(Qv,{disabled:c,onClick:()=>f("")}):o?g.jsx("div",{className:N.classNames("absolute right-3 top-1/2 -translate-y-1/2",{"opacity-40":c}),children:o}):null,[i,a,o,c]);return g.jsxs("div",{className:N.classNames("relative",l),children:[r&&g.jsx("div",{className:N.classNames("absolute left-3 top-1/2 -translate-y-1/2",{"opacity-40":c}),children:r}),g.jsx(le.input,{...s,value:a,disabled:c,onChange:x=>f(x.target.value),className:N.classNames(...d,...h,m,p,l)}),g.jsx(Wt,{children:v})]})},GA=({num:e,format:t,useGrouping:n,minFractionDigits:r,maxFractionDigits:o,mode:i,currency:c,currencyDisplay:u,locale:l,prefix:s="",suffix:a=""})=>{if(e==null||!t)return(e==null?void 0:e.toString())??"";const f={useGrouping:n,minimumFractionDigits:r,maximumFractionDigits:o,...i==="currency"&&{style:"currency",currency:c,currencyDisplay:u}},d=new Intl.NumberFormat(l,f).format(e);return`${s} ${d} ${a}`.trim()},HA=(e,t="",n="",r=!0)=>{if(!e)return r?null:0;const o=e.replace(t,"").replace(n,"").replaceAll(/[^\d.-]/g,""),i=Number.parseFloat(o);return Number.isNaN(i)?null:i},zA=(e,t,n)=>e==null||(t==null||e>=t)&&(n==null||e<=n),WA=e=>{const{onChange:t,onValueChange:n,format:r=!0,locale:o="es-MX",mode:i="decimal",currency:c="MXN",currencyDisplay:u="symbol",useGrouping:l=!0,minFractionDigits:s,maxFractionDigits:a,min:f,max:d,allowEmpty:h=!0,prefix:m,suffix:p,...v}=e,[x,b]=_.useState(Number((v==null?void 0:v.value)??null)),[w,S]=_.useState(""),[E,A]=_.useState(!1),R=_.useMemo(()=>({format:r,useGrouping:l,minFractionDigits:s,maxFractionDigits:a,mode:i,currency:c,currencyDisplay:u,locale:o,prefix:m,suffix:p}),[r,l,s,a,i,c,u,o,m,p]),T=_.useCallback($=>GA({num:$,...R}),[R]),I=_.useCallback($=>HA($,m,p,h),[m,p,h]);_.useEffect(()=>{E||S(T(x))},[x,T,E]);const P=_.useCallback($=>{const K=$.target.value;S(K);const G=I(K);zA(G,f,d)&&(b(G),t==null||t(G),n==null||n({originalEvent:$.nativeEvent,value:G}))},[I,f,d,t,n]),M=_.useCallback($=>{var K;A(!0),x!=null&&S(x.toString()),(K=v.onFocus)==null||K.call(v,$)},[x,v]),j=_.useCallback($=>{var K;A(!1),S(T(x)),(K=v.onBlur)==null||K.call(v,$)},[T,x,v]),V=_.useCallback(()=>{S(""),b(null),t==null||t(null)},[t]);return{displayValue:w,handleChange:P,handleFocus:M,handleBlur:j,handleClear:V,...v}},Jv=_.forwardRef((e,t)=>{const{error:n,size:r="md",check:o,icon:i,leftIcon:c,clear:u=!0,disabled:l=!1,variant:s="default",className:a,displayValue:f,handleChange:d,handleFocus:h,handleBlur:m,handleClear:p,...v}=WA(e),{baseStyles:x,variantStyles:b,sizeStyles:w,stateStyles:S}=Zv(s,r,n,o,!!i),E=_.useMemo(()=>u&&f?g.jsx(Qv,{disabled:l,onClick:p}):c?g.jsx("div",{className:N.classNames("absolute right-3 top-1/2 -translate-y-1/2",{"opacity-40":l}),children:c}):null,[u,f,c,l,p]);return g.jsxs("div",{className:N.classNames("relative",a),children:[i&&g.jsx("div",{className:N.classNames("absolute left-3 top-1/2 -translate-y-1/2",{"opacity-40":l}),children:i}),g.jsx(le.input,{...v,ref:t,type:"text",value:f,disabled:l,onChange:d,onFocus:h,onBlur:m,className:N.classNames(...x,...b,w,S,a)}),g.jsx(Wt,{children:E})]})});Jv.displayName="InputNumber";const qA={Text:UA,Number:Jv},qu=(e,t)=>`${e}-${t}`,Fi=_.forwardRef(({children:e,as:t,asChild:n=!1,className:r,italic:o=!1,size:i="base",weight:c="normal",...u},l)=>{if(!e)return null;const s=qu("text",i),a=qu("font",c),f=n?gd:t??"p";return g.jsx(f,{ref:l,className:N.classNames("text-grays-Macropay-10",s,a,r,{italic:o}),...u,children:e})});Fi.displayName="Typography";const KA=({children:e,as:t="p",className:n,...r})=>g.jsx(Fi,{as:t,className:n,...r,children:e}),YA={1:"text-4xl",2:"text-3xl",3:"text-2xl",4:"text-xl",5:"text-lg",6:"text-base"},XA={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"},ZA=({children:e,className:t="",level:n=1,...r})=>{const o=XA[n];return g.jsx(Fi,{as:o,weight:"bold",className:`${YA[n]} ${t}`,...r,children:e})},An=Fi;An.Text=KA;An.Title=ZA;const QA=({title:e,className:t=""})=>g.jsx(An.Title,{level:3,className:t,children:e}),JA={sm:"12rem",md:"16rem",lg:"20rem",xl:"24rem"},eO={sm:"w-56",md:"w-64",lg:"w-80",xl:"w-96"},tO={sm:"px-2 py-1.5",md:"px-3 py-2",lg:"px-4 py-2.5",xl:"px-5 py-3"},ey={sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"},nO=({item:e,index:t,isLast:n,size:r,itemClassName:o=""})=>{const i=e.href?"a":"button",c=e.href?{href:e.href}:{onClick:e.onClick,type:"button"};return g.jsx(le.li,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{duration:.2,delay:t*.05},className:N.classNames("border-gray-5 transition-colors duration-200",{"border-b":!n,"hover:bg-gray-3":!e.disabled,"opacity-50 cursor-not-allowed":e.disabled}),children:g.jsx(i,{...c,disabled:e.disabled,className:N.classNames("w-full text-left block",tO[r],ey[r],"text-gray-12 no-underline","focus:outline-none focus:ring-2 focus:ring-primary-blue focus:ring-inset",{"cursor-pointer":!e.disabled,"cursor-not-allowed":e.disabled,[o]:o}),children:e.content})},e.id)},rO=({message:e,size:t})=>g.jsx("li",{className:N.classNames("flex items-center justify-center h-full text-gray-9",ey[t]),children:e}),oO=({paginatedItems:e,containerHeight:t,size:n,withPagination:r,showBorder:o,showShadow:i,emptyMessage:c,itemClassName:u=""})=>g.jsx("ul",{style:{height:r?"auto":t},className:N.classNames(eO[n],"rounded-lg",{"border border-gray-6":o,"shadow-md":i,"overflow-y-auto scroll-smooth":!r}),children:e.length===0?g.jsx(rO,{message:c,size:n}):e.map((l,s)=>g.jsx(nO,{item:l,index:s,isLast:s===e.length-1,size:n,itemClassName:u},l.id))}),iO=(e,t,n,r)=>_.useMemo(()=>{if(!t)return e;const o=(n-1)*r,i=o+r;return e.slice(o,i)},[e,t,n,r]),sO=(e,t)=>_.useMemo(()=>Math.ceil(e/t),[e,t]),aO=(e,t)=>t||JA[e],cO=e=>t=>{e&&e(t)},lO=({items:e,title:t,size:n="md",withPagination:r=!1,currentPage:o=1,itemsPerPage:i=10,onPageChange:c,showBorder:u=!0,showShadow:l=!0,height:s,className:a="",titleClassName:f="",itemClassName:d="",emptyMessage:h="No items to display",onAnimationStart:m,onAnimationEnd:p,onAnimationIteration:v,...x})=>{const b=iO(e,r,o,i),w=sO(e.length,i),S=aO(n,s),E=cO(c);return g.jsx("div",{onAnimationStart:m,onAnimationEnd:p,onAnimationIteration:v,...x,children:g.jsxs(le.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3},className:N.classNames("flex flex-col",{[a]:a}),children:[t&&g.jsx(QA,{title:t,size:n,className:f}),g.jsx(oO,{paginatedItems:b,containerHeight:S,size:n,withPagination:r,showBorder:u,showShadow:l,emptyMessage:h,itemClassName:d}),r&&w>1&&g.jsx(ty,{currentPage:o,totalPages:w,onPageChange:E,size:n})]})})},uO={hidden:{opacity:0},visible:{opacity:1},exit:{opacity:0}},fO={hidden:{opacity:0,scale:.95,y:8},visible:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:8}},dO=()=>g.jsx(Ox,{asChild:!0,children:g.jsx(le.div,{className:`\r
109
109
  fixed inset-0 z-10\r
110
110
  bg-gray-500 bg-opacity-75\r
111
111
  transition-opacity\r
112
112
  backdrop-filter backdrop-blur-sm\r
113
- `,variants:zA,initial:"hidden",animate:"visible",exit:"exit",onClick:e=>e.stopPropagation()})}),KA=({children:e,panelClassName:t,isCloseAble:n,onClose:r})=>g.jsx("div",{className:"fixed inset-0 z-10 w-screen overflow-y-auto",children:g.jsx(We,{align:"center",justify:"center",className:"min-h-full p-4 text-center items-center",children:g.jsx(gx,{asChild:!0,children:g.jsx(de.div,{variants:WA,initial:"hidden",animate:"visible",exit:"exit",transition:{duration:.2,ease:"easeOut"},className:j.classNames("relative min-w-full md:min-w-104.5 p-6 md:p-8 transform rounded-lg bg-white text-left shadow-xl outline-none max-w-lg",{[t]:t}),children:g.jsxs(We,{className:"relative gap-6",direction:"vertical",align:"center",children:[n&&g.jsx("button",{className:"absolute -right-4 -top-4 md:-right-5 w-auto h-auto",onClick:r,children:g.jsx(ce.SvgClose,{className:"cursor-pointer text-gray-7 text-2xl"})}),e]})})})})}),YA=({type:e="default",title:t,message:n,titleAlign:r="left",children:o})=>!t&&!n?null:g.jsxs(We,{gap:4,className:j.classNames("w-full",{hidden:!t&&!n}),children:[e!=="default"&&g.jsxs(We,{align:"center",justify:"center",className:j.classNames("w-6 h-6 md:h-7 md:w-7 shrink-0 rounded-full text-white",{"bg-error":e==="error","bg-success":e==="success","bg-warning":e==="warning","bg-info":e==="info"}),children:[e==="error"&&g.jsx(ce.SvgClose,{}),e==="success"&&g.jsx(ce.SvgDone,{}),e==="warning"&&g.jsx(ce.SvgExclamation,{}),e==="info"&&g.jsx(ce.SvgInfo,{})]}),g.jsxs(We,{direction:"vertical",gap:2,className:"w-full",children:[typeof t!="string"?t:g.jsx(vx,{asChild:!0,children:g.jsx(Pn.Title,{weight:"semibold",level:4,...typeof t!="string"?t:{},className:j.classNames("inline-block",{[`text-${r}`]:r}),children:typeof t=="string"?t:o})}),n&&g.jsx(yx,{asChild:!0,children:g.jsx("span",{className:"text-base font-normal text-black text-opacity-85",children:n})})]})]}),XA=({buttonCancel:e,buttonOk:t})=>!e&&!t?null:g.jsxs("div",{className:"w-full max-[400px]:grid grid-cols-1 flex flex-wrap justify-end gap-4",children:[t&&g.jsx(ma,{className:"outline-none inline-flex max-[400px]:order-1 order-2",variant:"primary",size:"xl",...t}),e&&g.jsx(ma,{className:"outline-none inline-flex max-[400px]:order-2 order-1",variant:"secondary",size:"xl",...e})]}),ZA=({isOpen:e,onClose:t=()=>{},children:n,header:r,title:o,message:s,type:c,titleAlign:u,buttonOk:l,buttonCancel:i,isCloseAble:a,className:f=""})=>g.jsx(hx,{open:e,children:g.jsx(vn,{children:e&&g.jsxs(px,{forceMount:!0,children:[g.jsx(qA,{}),g.jsxs(KA,{panelClassName:f,isCloseAble:a,onClose:t,children:[r,g.jsx(YA,{type:c,title:o,message:s,titleAlign:u,children:n}),n&&g.jsx("div",{children:n,className:"w-full"}),g.jsx(XA,{buttonOk:l,buttonCancel:i})]})]})})}),QA={success:{icon:g.jsx(ce.SvgCheckCircle,{className:"size-6"}),borderColor:"border-green-6",iconColor:"text-green-6"},error:{icon:g.jsx(ce.SvgCloseCircle,{className:"size-6"}),borderColor:"border-primary-red",iconColor:"text-primary-red"},warning:{icon:g.jsx(ce.SvgIconWarning,{className:"size-6"}),borderColor:"border-gold-6",iconColor:"text-gold-6"},info:{icon:g.jsx(ce.SvgInfoCircle,{className:"size-6"}),borderColor:"border-blue-500",iconColor:"text-blue-500"},default:{icon:g.jsx(ce.SvgCloseCircle,{className:"size-6"}),borderColor:"border-gray-300",iconColor:"text-primary-blue"}},JA=e=>({"top-left":{initial:{opacity:0,x:-100,scale:.95},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:-100,scale:.95}},"top-right":{initial:{opacity:0,x:100,scale:.95},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:100,scale:.95}},"top-center":{initial:{opacity:0,y:-50,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-50,scale:.95}},"bottom-left":{initial:{opacity:0,x:-100,scale:.95},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:-100,scale:.95}},"bottom-right":{initial:{opacity:0,x:100,scale:.95},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:100,scale:.95}},"bottom-center":{initial:{opacity:0,y:50,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:50,scale:.95}}})[e||"top-right"],eO=({onClose:e,id:t})=>g.jsx("button",{type:"button",onClick:()=>e==null?void 0:e(t),className:"absolute top-2 right-2 shrink-0 p-1 rounded-md transition-colors text-gray-10 hover:text-gray-12 hover:bg-gray-4 focus:outline-none focus:ring-2 focus:ring-gray-7 cursor-pointer","aria-label":"Close notification",children:g.jsx(ce.SvgClose,{className:"size-6"})}),tO=({IconComponent:e,iconColor:t,defaultIconColor:n})=>e?g.jsx(We,{align:"center",justify:"center",className:j.classNames("w-7 h-7 shrink-0 sm:w-6 sm:h-6",t||n),children:e}):null,{Title:nO,Text:rO}=Pn,oO=({title:e,message:t,children:n})=>g.jsxs(We,{gap:2,direction:"vertical",justify:"center",className:"w-full",children:[e&&g.jsx(nO,{level:6,weight:"medium",children:e}),t&&g.jsx(rO,{className:"leading-5",size:"sm",children:t}),n]}),iO=({type:e="default",title:t,message:n,duration:r=4e3,id:o,placement:s="top-right",showIcon:c=!0,closable:u=!1,onClose:l,className:i="",children:a,borderColor:f,iconColor:d,...h})=>{const{initial:m,animate:p,exit:v}=JA(s);_.useEffect(()=>{if(r>0){const E=setTimeout(()=>{l==null||l(o)},r);return()=>clearTimeout(E)}},[r,o,l]);const x=e?QA[e]:null,b=x==null?void 0:x.icon,w=j.classNames("px-6 py-4 rounded flex gap-4 max-w-96 shadow-md relative border bg-white",f||(x==null?void 0:x.borderColor),i);return g.jsxs(de.div,{layout:!0,initial:m,animate:p,exit:v,transition:{duration:.35,ease:"easeOut"},className:w,role:"alert","aria-live":"polite",...h,children:[u&&g.jsx(eO,{onClose:l,id:o}),c&&g.jsx(tO,{IconComponent:b,iconColor:d,defaultIconColor:x==null?void 0:x.iconColor}),g.jsx(oO,{title:t,message:n,children:a})]})},Lc={sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"},Fc={sm:"min-w-8 h-8",md:"min-w-9 h-9",lg:"min-w-10 h-10",xl:"min-w-12 h-12"},sO=5,Uu=({onClick:e,disabled:t,size:n,label:r,children:o})=>g.jsx(de.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:e,disabled:t,className:j.classNames(Fc[n],Lc[n],"flex items-center justify-center rounded-md border border-gray-6","transition-colors duration-200","hover:bg-gray-3 active:bg-gray-4","disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent"),"aria-label":r,children:o}),aO=({pageNumber:e,isActive:t,onPageChange:n,size:r})=>g.jsx(de.button,{whileHover:{scale:t?1:1.05},whileTap:{scale:.95},onClick:()=>n(e),className:j.classNames(Fc[r],Lc[r],"flex items-center justify-center rounded-md border transition-colors duration-200",{"bg-primary-blue text-white border-primary-blue":t,"border-gray-6 hover:bg-gray-3 active:bg-gray-4":!t}),"aria-label":`Page ${e}`,"aria-current":t?"page":void 0,children:e},e),cO=({prevPage:e,nextPage:t,size:n})=>g.jsx("span",{className:j.classNames(Fc[n],Lc[n],"flex items-center justify-center"),children:"..."},`ellipsis-${e}-${t}`),lO=(e,t)=>t<=sO?Array.from({length:t},(n,r)=>r+1):e<=3?[1,2,3,4,"...",t]:e>=t-2?[1,"...",t-3,t-2,t-1,t]:[1,"...",e-1,e,e+1,"...",t],uO=(e,t)=>()=>{e>1&&t(e-1)},fO=(e,t,n)=>()=>{e<t&&n(e+1)},Bv=({currentPage:e,totalPages:t,onPageChange:n,size:r="md",className:o=""})=>{const s=uO(e,n),c=fO(e,t,n),u=lO(e,t);return g.jsxs(de.div,{initial:{opacity:0},animate:{opacity:1},className:j.classNames("flex items-center justify-center gap-1 mt-3",{[o]:o}),children:[g.jsx(Uu,{onClick:s,disabled:e===1,size:r,label:"Previous page",children:"←"}),u.map((l,i,a)=>{if(l==="..."){const h=a[i-1]||"start",m=a[i+1]||"end";return g.jsx(cO,{prevPage:h,nextPage:m,size:r},`ellipsis-${h}-${m}`)}const f=l,d=f===e;return g.jsx(aO,{pageNumber:f,isActive:d,onPageChange:n,size:r},f)}),g.jsx(Uu,{onClick:c,disabled:e===t,size:r,label:"Next page",children:"→"})]})},dO=e=>{const t=_.createContext(void 0);return[({value:o,children:s})=>g.jsx(t.Provider,{value:o,children:s}),()=>{const o=_.useContext(t);if(o===void 0)throw new Error(`useContext must be used within a ${e}Provider`);return o}]},[hO]=dO("PopoverContext"),pO=e=>{const[t,n]=sd.useControlledState({value:e==null?void 0:e.open,defaultValue:e==null?void 0:e.defaultOpen,onChange:e==null?void 0:e.onOpenChange});return g.jsx(hO,{value:{open:t,setOpen:n},children:g.jsx(aE,{"data-slot":"popover",...e,onOpenChange:n})})},mO={sm:"h-1",md:"h-2",lg:"h-3",xl:"h-4"},gO={primary:"bg-primary-blue",success:"bg-green-500",warning:"bg-yellow-500",error:"bg-red-500",info:"bg-blue-400"},vO=({value:e=0,classNames:t,indicatorColor:n="primary",customIndicatorClass:r,size:o="md",showLabel:s=!1,labelClassName:c,...u})=>g.jsxs("div",{className:"w-full",children:[g.jsx(pE,{className:j.classNames("relative w-full overflow-hidden rounded-full bg-gray-200",mO[o],t==null?void 0:t.root),value:e,...u,children:g.jsx(mE,{className:j.classNames("h-full transition-transform duration-300 ease-in-out",r||gO[n],t==null?void 0:t.indicator),style:{transform:`translateX(-${100-(e||0)}%)`}})}),s&&g.jsxs("div",{className:j.classNames("mt-1 text-right text-sm text-gray-600",c),children:[e,"%"]})]});var yO=Object.defineProperty,ti=Object.getOwnPropertySymbols,$v=Object.prototype.hasOwnProperty,Uv=Object.prototype.propertyIsEnumerable,Gu=(e,t,n)=>t in e?yO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ga=(e,t)=>{for(var n in t||(t={}))$v.call(t,n)&&Gu(e,n,t[n]);if(ti)for(var n of ti(t))Uv.call(t,n)&&Gu(e,n,t[n]);return e},va=(e,t)=>{var n={};for(var r in e)$v.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ti)for(var r of ti(e))t.indexOf(r)<0&&Uv.call(e,r)&&(n[r]=e[r]);return n};/**
113
+ `,variants:uO,initial:"hidden",animate:"visible",exit:"exit",onClick:e=>e.stopPropagation()})}),hO=({children:e,panelClassName:t,isCloseAble:n,onClose:r})=>g.jsx("div",{className:"fixed inset-0 z-10 w-screen overflow-y-auto",children:g.jsx(We,{align:"center",justify:"center",className:"min-h-full p-4 text-center items-center",children:g.jsx(Mx,{asChild:!0,children:g.jsx(le.div,{variants:fO,initial:"hidden",animate:"visible",exit:"exit",transition:{duration:.2,ease:"easeOut"},className:N.classNames("relative min-w-full md:min-w-104.5 p-6 md:p-8 transform rounded-lg bg-white text-left shadow-xl outline-none max-w-lg",{[t]:t}),children:g.jsxs(We,{className:"relative gap-6",direction:"vertical",align:"center",children:[n&&g.jsx("button",{className:"absolute -right-4 -top-4 md:-right-5 w-auto h-auto",onClick:r,children:g.jsx(ce.SvgClose,{className:"cursor-pointer text-gray-7 text-2xl"})}),e]})})})})}),pO=({type:e="default",title:t,message:n,titleAlign:r="left",children:o})=>!t&&!n?null:g.jsxs(We,{gap:4,className:N.classNames("w-full",{hidden:!t&&!n}),children:[e!=="default"&&g.jsxs(We,{align:"center",justify:"center",className:N.classNames("w-6 h-6 md:h-7 md:w-7 shrink-0 rounded-full text-white",{"bg-error":e==="error","bg-success":e==="success","bg-warning":e==="warning","bg-info":e==="info"}),children:[e==="error"&&g.jsx(ce.SvgClose,{}),e==="success"&&g.jsx(ce.SvgDone,{}),e==="warning"&&g.jsx(ce.SvgExclamation,{}),e==="info"&&g.jsx(ce.SvgInfo,{})]}),g.jsxs(We,{direction:"vertical",gap:2,className:"w-full",children:[typeof t!="string"?t:g.jsx(Ix,{asChild:!0,children:g.jsx(An.Title,{weight:"semibold",level:4,...typeof t!="string"?t:{},className:N.classNames("inline-block",{[`text-${r}`]:r}),children:typeof t=="string"?t:o})}),n&&g.jsx(Nx,{asChild:!0,children:g.jsx("span",{className:"text-base font-normal text-black text-opacity-85",children:n})})]})]}),mO=({buttonCancel:e,buttonOk:t})=>!e&&!t?null:g.jsxs("div",{className:"w-full max-[400px]:grid grid-cols-1 flex flex-wrap justify-end gap-4",children:[t&&g.jsx(ga,{className:"outline-none inline-flex max-[400px]:order-1 order-2",variant:"primary",size:"xl",...t}),e&&g.jsx(ga,{className:"outline-none inline-flex max-[400px]:order-2 order-1",variant:"secondary",size:"xl",...e})]}),gO=({isOpen:e,onClose:t=()=>{},children:n,header:r,title:o,message:i,type:c,titleAlign:u,buttonOk:l,buttonCancel:s,isCloseAble:a,className:f=""})=>g.jsx(Px,{open:e,children:g.jsx(Wt,{children:e&&g.jsxs(Ax,{forceMount:!0,children:[g.jsx(dO,{}),g.jsxs(hO,{panelClassName:f,isCloseAble:a,onClose:t,children:[r,g.jsx(pO,{type:c,title:o,message:i,titleAlign:u,children:n}),n&&g.jsx("div",{children:n,className:"w-full"}),g.jsx(mO,{buttonOk:l,buttonCancel:s})]})]})})}),vO={success:{icon:g.jsx(ce.SvgCheckCircle,{className:"size-6"}),borderColor:"border-green-6",iconColor:"text-green-6"},error:{icon:g.jsx(ce.SvgCloseCircle,{className:"size-6"}),borderColor:"border-primary-red",iconColor:"text-primary-red"},warning:{icon:g.jsx(ce.SvgIconWarning,{className:"size-6"}),borderColor:"border-gold-6",iconColor:"text-gold-6"},info:{icon:g.jsx(ce.SvgInfoCircle,{className:"size-6"}),borderColor:"border-blue-500",iconColor:"text-blue-500"},default:{icon:g.jsx(ce.SvgCloseCircle,{className:"size-6"}),borderColor:"border-gray-300",iconColor:"text-primary-blue"}},yO=e=>({"top-left":{initial:{opacity:0,x:-100,scale:.95},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:-100,scale:.95}},"top-right":{initial:{opacity:0,x:100,scale:.95},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:100,scale:.95}},"top-center":{initial:{opacity:0,y:-50,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-50,scale:.95}},"bottom-left":{initial:{opacity:0,x:-100,scale:.95},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:-100,scale:.95}},"bottom-right":{initial:{opacity:0,x:100,scale:.95},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:100,scale:.95}},"bottom-center":{initial:{opacity:0,y:50,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:50,scale:.95}}})[e||"top-right"],xO=({onClose:e,id:t})=>g.jsx("button",{type:"button",onClick:()=>e==null?void 0:e(t),className:"absolute top-2 right-2 shrink-0 p-1 rounded-md transition-colors text-gray-10 hover:text-gray-12 hover:bg-gray-4 focus:outline-none focus:ring-2 focus:ring-gray-7 cursor-pointer","aria-label":"Close notification",children:g.jsx(ce.SvgClose,{className:"size-6"})}),bO=({IconComponent:e,iconColor:t,defaultIconColor:n})=>e?g.jsx(We,{align:"center",justify:"center",className:N.classNames("w-7 h-7 shrink-0 sm:w-6 sm:h-6",t||n),children:e}):null,{Title:wO,Text:EO}=An,SO=({title:e,message:t,children:n})=>g.jsxs(We,{gap:2,direction:"vertical",justify:"center",className:"w-full",children:[e&&g.jsx(wO,{level:6,weight:"medium",children:e}),t&&g.jsx(EO,{className:"leading-5",size:"sm",children:t}),n]}),CO=({type:e="default",title:t,message:n,duration:r=4e3,id:o,placement:i="top-right",showIcon:c=!0,closable:u=!1,onClose:l,className:s="",children:a,borderColor:f,iconColor:d,...h})=>{const{initial:m,animate:p,exit:v}=yO(i);_.useEffect(()=>{if(r>0){const S=setTimeout(()=>{l==null||l(o)},r);return()=>clearTimeout(S)}},[r,o,l]);const x=e?vO[e]:null,b=x==null?void 0:x.icon,w=N.classNames("px-6 py-4 rounded flex gap-4 max-w-96 shadow-md relative border bg-white",f||(x==null?void 0:x.borderColor),s);return g.jsxs(le.div,{layout:!0,initial:m,animate:p,exit:v,transition:{duration:.35,ease:"easeOut"},className:w,role:"alert","aria-live":"polite",...h,children:[u&&g.jsx(xO,{onClose:l,id:o}),c&&g.jsx(bO,{IconComponent:b,iconColor:d,defaultIconColor:x==null?void 0:x.iconColor}),g.jsx(SO,{title:t,message:n,children:a})]})},$c={sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"},Uc={sm:"min-w-8 h-8",md:"min-w-9 h-9",lg:"min-w-10 h-10",xl:"min-w-12 h-12"},_O=5,Ku=({onClick:e,disabled:t,size:n,label:r,children:o})=>g.jsx(le.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:e,disabled:t,className:N.classNames(Uc[n],$c[n],"flex items-center justify-center rounded-md border border-gray-6","transition-colors duration-200","hover:bg-gray-3 active:bg-gray-4","disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent"),"aria-label":r,children:o}),RO=({pageNumber:e,isActive:t,onPageChange:n,size:r})=>g.jsx(le.button,{whileHover:{scale:t?1:1.05},whileTap:{scale:.95},onClick:()=>n(e),className:N.classNames(Uc[r],$c[r],"flex items-center justify-center rounded-md border transition-colors duration-200",{"bg-primary-blue text-white border-primary-blue":t,"border-gray-6 hover:bg-gray-3 active:bg-gray-4":!t}),"aria-label":`Page ${e}`,"aria-current":t?"page":void 0,children:e},e),TO=({prevPage:e,nextPage:t,size:n})=>g.jsx("span",{className:N.classNames(Uc[n],$c[n],"flex items-center justify-center"),children:"..."},`ellipsis-${e}-${t}`),PO=(e,t)=>t<=_O?Array.from({length:t},(n,r)=>r+1):e<=3?[1,2,3,4,"...",t]:e>=t-2?[1,"...",t-3,t-2,t-1,t]:[1,"...",e-1,e,e+1,"...",t],AO=(e,t)=>()=>{e>1&&t(e-1)},OO=(e,t,n)=>()=>{e<t&&n(e+1)},ty=({currentPage:e,totalPages:t,onPageChange:n,size:r="md",className:o=""})=>{const i=AO(e,n),c=OO(e,t,n),u=PO(e,t);return g.jsxs(le.div,{initial:{opacity:0},animate:{opacity:1},className:N.classNames("flex items-center justify-center gap-1 mt-3",{[o]:o}),children:[g.jsx(Ku,{onClick:i,disabled:e===1,size:r,label:"Previous page",children:"←"}),u.map((l,s,a)=>{if(l==="..."){const h=a[s-1]||"start",m=a[s+1]||"end";return g.jsx(TO,{prevPage:h,nextPage:m,size:r},`ellipsis-${h}-${m}`)}const f=l,d=f===e;return g.jsx(RO,{pageNumber:f,isActive:d,onPageChange:n,size:r},f)}),g.jsx(Ku,{onClick:c,disabled:e===t,size:r,label:"Next page",children:"→"})]})},MO=e=>{const t=_.createContext(void 0);return[({value:o,children:i})=>g.jsx(t.Provider,{value:o,children:i}),()=>{const o=_.useContext(t);if(o===void 0)throw new Error(`useContext must be used within a ${e}Provider`);return o}]},[IO]=MO("PopoverContext"),NO=e=>{const[t,n]=dd.useControlledState({value:e==null?void 0:e.open,defaultValue:e==null?void 0:e.defaultOpen,onChange:e==null?void 0:e.onOpenChange});return g.jsx(IO,{value:{open:t,setOpen:n},children:g.jsx(wE,{"data-slot":"popover",...e,onOpenChange:n})})},jO={sm:"h-1",md:"h-2",lg:"h-3",xl:"h-4"},DO={primary:"bg-primary-blue",success:"bg-green-500",warning:"bg-yellow-500",error:"bg-red-500",info:"bg-blue-400"},kO=({value:e=0,classNames:t,indicatorColor:n="primary",customIndicatorClass:r,size:o="md",showLabel:i=!1,labelClassName:c,...u})=>g.jsxs("div",{className:"w-full",children:[g.jsx(PE,{className:N.classNames("relative w-full overflow-hidden rounded-full bg-gray-200",jO[o],t==null?void 0:t.root),value:e,...u,children:g.jsx(AE,{className:N.classNames("h-full transition-transform duration-300 ease-in-out",r||DO[n],t==null?void 0:t.indicator),style:{transform:`translateX(-${100-(e||0)}%)`}})}),i&&g.jsxs("div",{className:N.classNames("mt-1 text-right text-sm text-gray-600",c),children:[e,"%"]})]});var LO=Object.defineProperty,ri=Object.getOwnPropertySymbols,ny=Object.prototype.hasOwnProperty,ry=Object.prototype.propertyIsEnumerable,Yu=(e,t,n)=>t in e?LO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,va=(e,t)=>{for(var n in t||(t={}))ny.call(t,n)&&Yu(e,n,t[n]);if(ri)for(var n of ri(t))ry.call(t,n)&&Yu(e,n,t[n]);return e},ya=(e,t)=>{var n={};for(var r in e)ny.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ri)for(var r of ri(e))t.indexOf(r)<0&&ry.call(e,r)&&(n[r]=e[r]);return n};/**
114
114
  * @license QR Code generator library (TypeScript)
115
115
  * Copyright (c) Project Nayuki.
116
116
  * SPDX-License-Identifier: MIT
117
- */var Wt;(e=>{const t=class ae{constructor(l,i,a,f){if(this.version=l,this.errorCorrectionLevel=i,this.modules=[],this.isFunction=[],l<ae.MIN_VERSION||l>ae.MAX_VERSION)throw new RangeError("Version value out of range");if(f<-1||f>7)throw new RangeError("Mask value out of range");this.size=l*4+17;let d=[];for(let m=0;m<this.size;m++)d.push(!1);for(let m=0;m<this.size;m++)this.modules.push(d.slice()),this.isFunction.push(d.slice());this.drawFunctionPatterns();const h=this.addEccAndInterleave(a);if(this.drawCodewords(h),f==-1){let m=1e9;for(let p=0;p<8;p++){this.applyMask(p),this.drawFormatBits(p);const v=this.getPenaltyScore();v<m&&(f=p,m=v),this.applyMask(p)}}o(0<=f&&f<=7),this.mask=f,this.applyMask(f),this.drawFormatBits(f),this.isFunction=[]}static encodeText(l,i){const a=e.QrSegment.makeSegments(l);return ae.encodeSegments(a,i)}static encodeBinary(l,i){const a=e.QrSegment.makeBytes(l);return ae.encodeSegments([a],i)}static encodeSegments(l,i,a=1,f=40,d=-1,h=!0){if(!(ae.MIN_VERSION<=a&&a<=f&&f<=ae.MAX_VERSION)||d<-1||d>7)throw new RangeError("Invalid value");let m,p;for(m=a;;m++){const w=ae.getNumDataCodewords(m,i)*8,E=c.getTotalBits(l,m);if(E<=w){p=E;break}if(m>=f)throw new RangeError("Data too long")}for(const w of[ae.Ecc.MEDIUM,ae.Ecc.QUARTILE,ae.Ecc.HIGH])h&&p<=ae.getNumDataCodewords(m,w)*8&&(i=w);let v=[];for(const w of l){n(w.mode.modeBits,4,v),n(w.numChars,w.mode.numCharCountBits(m),v);for(const E of w.getData())v.push(E)}o(v.length==p);const x=ae.getNumDataCodewords(m,i)*8;o(v.length<=x),n(0,Math.min(4,x-v.length),v),n(0,(8-v.length%8)%8,v),o(v.length%8==0);for(let w=236;v.length<x;w^=253)n(w,8,v);let b=[];for(;b.length*8<v.length;)b.push(0);return v.forEach((w,E)=>b[E>>>3]|=w<<7-(E&7)),new ae(m,i,b,d)}getModule(l,i){return 0<=l&&l<this.size&&0<=i&&i<this.size&&this.modules[i][l]}getModules(){return this.modules}drawFunctionPatterns(){for(let a=0;a<this.size;a++)this.setFunctionModule(6,a,a%2==0),this.setFunctionModule(a,6,a%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const l=this.getAlignmentPatternPositions(),i=l.length;for(let a=0;a<i;a++)for(let f=0;f<i;f++)a==0&&f==0||a==0&&f==i-1||a==i-1&&f==0||this.drawAlignmentPattern(l[a],l[f]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(l){const i=this.errorCorrectionLevel.formatBits<<3|l;let a=i;for(let d=0;d<10;d++)a=a<<1^(a>>>9)*1335;const f=(i<<10|a)^21522;o(f>>>15==0);for(let d=0;d<=5;d++)this.setFunctionModule(8,d,r(f,d));this.setFunctionModule(8,7,r(f,6)),this.setFunctionModule(8,8,r(f,7)),this.setFunctionModule(7,8,r(f,8));for(let d=9;d<15;d++)this.setFunctionModule(14-d,8,r(f,d));for(let d=0;d<8;d++)this.setFunctionModule(this.size-1-d,8,r(f,d));for(let d=8;d<15;d++)this.setFunctionModule(8,this.size-15+d,r(f,d));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let l=this.version;for(let a=0;a<12;a++)l=l<<1^(l>>>11)*7973;const i=this.version<<12|l;o(i>>>18==0);for(let a=0;a<18;a++){const f=r(i,a),d=this.size-11+a%3,h=Math.floor(a/3);this.setFunctionModule(d,h,f),this.setFunctionModule(h,d,f)}}drawFinderPattern(l,i){for(let a=-4;a<=4;a++)for(let f=-4;f<=4;f++){const d=Math.max(Math.abs(f),Math.abs(a)),h=l+f,m=i+a;0<=h&&h<this.size&&0<=m&&m<this.size&&this.setFunctionModule(h,m,d!=2&&d!=4)}}drawAlignmentPattern(l,i){for(let a=-2;a<=2;a++)for(let f=-2;f<=2;f++)this.setFunctionModule(l+f,i+a,Math.max(Math.abs(f),Math.abs(a))!=1)}setFunctionModule(l,i,a){this.modules[i][l]=a,this.isFunction[i][l]=!0}addEccAndInterleave(l){const i=this.version,a=this.errorCorrectionLevel;if(l.length!=ae.getNumDataCodewords(i,a))throw new RangeError("Invalid argument");const f=ae.NUM_ERROR_CORRECTION_BLOCKS[a.ordinal][i],d=ae.ECC_CODEWORDS_PER_BLOCK[a.ordinal][i],h=Math.floor(ae.getNumRawDataModules(i)/8),m=f-h%f,p=Math.floor(h/f);let v=[];const x=ae.reedSolomonComputeDivisor(d);for(let w=0,E=0;w<f;w++){let S=l.slice(E,E+p-d+(w<m?0:1));E+=S.length;const T=ae.reedSolomonComputeRemainder(S,x);w<m&&S.push(0),v.push(S.concat(T))}let b=[];for(let w=0;w<v[0].length;w++)v.forEach((E,S)=>{(w!=p-d||S>=m)&&b.push(E[w])});return o(b.length==h),b}drawCodewords(l){if(l.length!=Math.floor(ae.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let i=0;for(let a=this.size-1;a>=1;a-=2){a==6&&(a=5);for(let f=0;f<this.size;f++)for(let d=0;d<2;d++){const h=a-d,p=(a+1&2)==0?this.size-1-f:f;!this.isFunction[p][h]&&i<l.length*8&&(this.modules[p][h]=r(l[i>>>3],7-(i&7)),i++)}}o(i==l.length*8)}applyMask(l){if(l<0||l>7)throw new RangeError("Mask value out of range");for(let i=0;i<this.size;i++)for(let a=0;a<this.size;a++){let f;switch(l){case 0:f=(a+i)%2==0;break;case 1:f=i%2==0;break;case 2:f=a%3==0;break;case 3:f=(a+i)%3==0;break;case 4:f=(Math.floor(a/3)+Math.floor(i/2))%2==0;break;case 5:f=a*i%2+a*i%3==0;break;case 6:f=(a*i%2+a*i%3)%2==0;break;case 7:f=((a+i)%2+a*i%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[i][a]&&f&&(this.modules[i][a]=!this.modules[i][a])}}getPenaltyScore(){let l=0;for(let d=0;d<this.size;d++){let h=!1,m=0,p=[0,0,0,0,0,0,0];for(let v=0;v<this.size;v++)this.modules[d][v]==h?(m++,m==5?l+=ae.PENALTY_N1:m>5&&l++):(this.finderPenaltyAddHistory(m,p),h||(l+=this.finderPenaltyCountPatterns(p)*ae.PENALTY_N3),h=this.modules[d][v],m=1);l+=this.finderPenaltyTerminateAndCount(h,m,p)*ae.PENALTY_N3}for(let d=0;d<this.size;d++){let h=!1,m=0,p=[0,0,0,0,0,0,0];for(let v=0;v<this.size;v++)this.modules[v][d]==h?(m++,m==5?l+=ae.PENALTY_N1:m>5&&l++):(this.finderPenaltyAddHistory(m,p),h||(l+=this.finderPenaltyCountPatterns(p)*ae.PENALTY_N3),h=this.modules[v][d],m=1);l+=this.finderPenaltyTerminateAndCount(h,m,p)*ae.PENALTY_N3}for(let d=0;d<this.size-1;d++)for(let h=0;h<this.size-1;h++){const m=this.modules[d][h];m==this.modules[d][h+1]&&m==this.modules[d+1][h]&&m==this.modules[d+1][h+1]&&(l+=ae.PENALTY_N2)}let i=0;for(const d of this.modules)i=d.reduce((h,m)=>h+(m?1:0),i);const a=this.size*this.size,f=Math.ceil(Math.abs(i*20-a*10)/a)-1;return o(0<=f&&f<=9),l+=f*ae.PENALTY_N4,o(0<=l&&l<=2568888),l}getAlignmentPatternPositions(){if(this.version==1)return[];{const l=Math.floor(this.version/7)+2,i=this.version==32?26:Math.ceil((this.version*4+4)/(l*2-2))*2;let a=[6];for(let f=this.size-7;a.length<l;f-=i)a.splice(1,0,f);return a}}static getNumRawDataModules(l){if(l<ae.MIN_VERSION||l>ae.MAX_VERSION)throw new RangeError("Version number out of range");let i=(16*l+128)*l+64;if(l>=2){const a=Math.floor(l/7)+2;i-=(25*a-10)*a-55,l>=7&&(i-=36)}return o(208<=i&&i<=29648),i}static getNumDataCodewords(l,i){return Math.floor(ae.getNumRawDataModules(l)/8)-ae.ECC_CODEWORDS_PER_BLOCK[i.ordinal][l]*ae.NUM_ERROR_CORRECTION_BLOCKS[i.ordinal][l]}static reedSolomonComputeDivisor(l){if(l<1||l>255)throw new RangeError("Degree out of range");let i=[];for(let f=0;f<l-1;f++)i.push(0);i.push(1);let a=1;for(let f=0;f<l;f++){for(let d=0;d<i.length;d++)i[d]=ae.reedSolomonMultiply(i[d],a),d+1<i.length&&(i[d]^=i[d+1]);a=ae.reedSolomonMultiply(a,2)}return i}static reedSolomonComputeRemainder(l,i){let a=i.map(f=>0);for(const f of l){const d=f^a.shift();a.push(0),i.forEach((h,m)=>a[m]^=ae.reedSolomonMultiply(h,d))}return a}static reedSolomonMultiply(l,i){if(l>>>8||i>>>8)throw new RangeError("Byte out of range");let a=0;for(let f=7;f>=0;f--)a=a<<1^(a>>>7)*285,a^=(i>>>f&1)*l;return o(a>>>8==0),a}finderPenaltyCountPatterns(l){const i=l[1];o(i<=this.size*3);const a=i>0&&l[2]==i&&l[3]==i*3&&l[4]==i&&l[5]==i;return(a&&l[0]>=i*4&&l[6]>=i?1:0)+(a&&l[6]>=i*4&&l[0]>=i?1:0)}finderPenaltyTerminateAndCount(l,i,a){return l&&(this.finderPenaltyAddHistory(i,a),i=0),i+=this.size,this.finderPenaltyAddHistory(i,a),this.finderPenaltyCountPatterns(a)}finderPenaltyAddHistory(l,i){i[0]==0&&(l+=this.size),i.pop(),i.unshift(l)}};t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function n(u,l,i){if(l<0||l>31||u>>>l)throw new RangeError("Value out of range");for(let a=l-1;a>=0;a--)i.push(u>>>a&1)}function r(u,l){return(u>>>l&1)!=0}function o(u){if(!u)throw new Error("Assertion error")}const s=class xe{constructor(l,i,a){if(this.mode=l,this.numChars=i,this.bitData=a,i<0)throw new RangeError("Invalid argument");this.bitData=a.slice()}static makeBytes(l){let i=[];for(const a of l)n(a,8,i);return new xe(xe.Mode.BYTE,l.length,i)}static makeNumeric(l){if(!xe.isNumeric(l))throw new RangeError("String contains non-numeric characters");let i=[];for(let a=0;a<l.length;){const f=Math.min(l.length-a,3);n(parseInt(l.substring(a,a+f),10),f*3+1,i),a+=f}return new xe(xe.Mode.NUMERIC,l.length,i)}static makeAlphanumeric(l){if(!xe.isAlphanumeric(l))throw new RangeError("String contains unencodable characters in alphanumeric mode");let i=[],a;for(a=0;a+2<=l.length;a+=2){let f=xe.ALPHANUMERIC_CHARSET.indexOf(l.charAt(a))*45;f+=xe.ALPHANUMERIC_CHARSET.indexOf(l.charAt(a+1)),n(f,11,i)}return a<l.length&&n(xe.ALPHANUMERIC_CHARSET.indexOf(l.charAt(a)),6,i),new xe(xe.Mode.ALPHANUMERIC,l.length,i)}static makeSegments(l){return l==""?[]:xe.isNumeric(l)?[xe.makeNumeric(l)]:xe.isAlphanumeric(l)?[xe.makeAlphanumeric(l)]:[xe.makeBytes(xe.toUtf8ByteArray(l))]}static makeEci(l){let i=[];if(l<0)throw new RangeError("ECI assignment value out of range");if(l<128)n(l,8,i);else if(l<16384)n(2,2,i),n(l,14,i);else if(l<1e6)n(6,3,i),n(l,21,i);else throw new RangeError("ECI assignment value out of range");return new xe(xe.Mode.ECI,0,i)}static isNumeric(l){return xe.NUMERIC_REGEX.test(l)}static isAlphanumeric(l){return xe.ALPHANUMERIC_REGEX.test(l)}getData(){return this.bitData.slice()}static getTotalBits(l,i){let a=0;for(const f of l){const d=f.mode.numCharCountBits(i);if(f.numChars>=1<<d)return 1/0;a+=4+d+f.bitData.length}return a}static toUtf8ByteArray(l){l=encodeURI(l);let i=[];for(let a=0;a<l.length;a++)l.charAt(a)!="%"?i.push(l.charCodeAt(a)):(i.push(parseInt(l.substring(a+1,a+3),16)),a+=2);return i}};s.NUMERIC_REGEX=/^[0-9]*$/,s.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,s.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let c=s;e.QrSegment=s})(Wt||(Wt={}));(e=>{(t=>{const n=class{constructor(o,s){this.ordinal=o,this.formatBits=s}};n.LOW=new n(0,1),n.MEDIUM=new n(1,0),n.QUARTILE=new n(2,3),n.HIGH=new n(3,2),t.Ecc=n})(e.QrCode||(e.QrCode={}))})(Wt||(Wt={}));(e=>{(t=>{const n=class{constructor(o,s){this.modeBits=o,this.numBitsCharCount=s}numCharCountBits(o){return this.numBitsCharCount[Math.floor((o+7)/17)]}};n.NUMERIC=new n(1,[10,12,14]),n.ALPHANUMERIC=new n(2,[9,11,13]),n.BYTE=new n(4,[8,16,16]),n.KANJI=new n(8,[8,10,12]),n.ECI=new n(7,[0,0,0]),t.Mode=n})(e.QrSegment||(e.QrSegment={}))})(Wt||(Wt={}));var ln=Wt;/**
117
+ */var qt;(e=>{const t=class ae{constructor(l,s,a,f){if(this.version=l,this.errorCorrectionLevel=s,this.modules=[],this.isFunction=[],l<ae.MIN_VERSION||l>ae.MAX_VERSION)throw new RangeError("Version value out of range");if(f<-1||f>7)throw new RangeError("Mask value out of range");this.size=l*4+17;let d=[];for(let m=0;m<this.size;m++)d.push(!1);for(let m=0;m<this.size;m++)this.modules.push(d.slice()),this.isFunction.push(d.slice());this.drawFunctionPatterns();const h=this.addEccAndInterleave(a);if(this.drawCodewords(h),f==-1){let m=1e9;for(let p=0;p<8;p++){this.applyMask(p),this.drawFormatBits(p);const v=this.getPenaltyScore();v<m&&(f=p,m=v),this.applyMask(p)}}o(0<=f&&f<=7),this.mask=f,this.applyMask(f),this.drawFormatBits(f),this.isFunction=[]}static encodeText(l,s){const a=e.QrSegment.makeSegments(l);return ae.encodeSegments(a,s)}static encodeBinary(l,s){const a=e.QrSegment.makeBytes(l);return ae.encodeSegments([a],s)}static encodeSegments(l,s,a=1,f=40,d=-1,h=!0){if(!(ae.MIN_VERSION<=a&&a<=f&&f<=ae.MAX_VERSION)||d<-1||d>7)throw new RangeError("Invalid value");let m,p;for(m=a;;m++){const w=ae.getNumDataCodewords(m,s)*8,S=c.getTotalBits(l,m);if(S<=w){p=S;break}if(m>=f)throw new RangeError("Data too long")}for(const w of[ae.Ecc.MEDIUM,ae.Ecc.QUARTILE,ae.Ecc.HIGH])h&&p<=ae.getNumDataCodewords(m,w)*8&&(s=w);let v=[];for(const w of l){n(w.mode.modeBits,4,v),n(w.numChars,w.mode.numCharCountBits(m),v);for(const S of w.getData())v.push(S)}o(v.length==p);const x=ae.getNumDataCodewords(m,s)*8;o(v.length<=x),n(0,Math.min(4,x-v.length),v),n(0,(8-v.length%8)%8,v),o(v.length%8==0);for(let w=236;v.length<x;w^=253)n(w,8,v);let b=[];for(;b.length*8<v.length;)b.push(0);return v.forEach((w,S)=>b[S>>>3]|=w<<7-(S&7)),new ae(m,s,b,d)}getModule(l,s){return 0<=l&&l<this.size&&0<=s&&s<this.size&&this.modules[s][l]}getModules(){return this.modules}drawFunctionPatterns(){for(let a=0;a<this.size;a++)this.setFunctionModule(6,a,a%2==0),this.setFunctionModule(a,6,a%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const l=this.getAlignmentPatternPositions(),s=l.length;for(let a=0;a<s;a++)for(let f=0;f<s;f++)a==0&&f==0||a==0&&f==s-1||a==s-1&&f==0||this.drawAlignmentPattern(l[a],l[f]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(l){const s=this.errorCorrectionLevel.formatBits<<3|l;let a=s;for(let d=0;d<10;d++)a=a<<1^(a>>>9)*1335;const f=(s<<10|a)^21522;o(f>>>15==0);for(let d=0;d<=5;d++)this.setFunctionModule(8,d,r(f,d));this.setFunctionModule(8,7,r(f,6)),this.setFunctionModule(8,8,r(f,7)),this.setFunctionModule(7,8,r(f,8));for(let d=9;d<15;d++)this.setFunctionModule(14-d,8,r(f,d));for(let d=0;d<8;d++)this.setFunctionModule(this.size-1-d,8,r(f,d));for(let d=8;d<15;d++)this.setFunctionModule(8,this.size-15+d,r(f,d));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let l=this.version;for(let a=0;a<12;a++)l=l<<1^(l>>>11)*7973;const s=this.version<<12|l;o(s>>>18==0);for(let a=0;a<18;a++){const f=r(s,a),d=this.size-11+a%3,h=Math.floor(a/3);this.setFunctionModule(d,h,f),this.setFunctionModule(h,d,f)}}drawFinderPattern(l,s){for(let a=-4;a<=4;a++)for(let f=-4;f<=4;f++){const d=Math.max(Math.abs(f),Math.abs(a)),h=l+f,m=s+a;0<=h&&h<this.size&&0<=m&&m<this.size&&this.setFunctionModule(h,m,d!=2&&d!=4)}}drawAlignmentPattern(l,s){for(let a=-2;a<=2;a++)for(let f=-2;f<=2;f++)this.setFunctionModule(l+f,s+a,Math.max(Math.abs(f),Math.abs(a))!=1)}setFunctionModule(l,s,a){this.modules[s][l]=a,this.isFunction[s][l]=!0}addEccAndInterleave(l){const s=this.version,a=this.errorCorrectionLevel;if(l.length!=ae.getNumDataCodewords(s,a))throw new RangeError("Invalid argument");const f=ae.NUM_ERROR_CORRECTION_BLOCKS[a.ordinal][s],d=ae.ECC_CODEWORDS_PER_BLOCK[a.ordinal][s],h=Math.floor(ae.getNumRawDataModules(s)/8),m=f-h%f,p=Math.floor(h/f);let v=[];const x=ae.reedSolomonComputeDivisor(d);for(let w=0,S=0;w<f;w++){let E=l.slice(S,S+p-d+(w<m?0:1));S+=E.length;const A=ae.reedSolomonComputeRemainder(E,x);w<m&&E.push(0),v.push(E.concat(A))}let b=[];for(let w=0;w<v[0].length;w++)v.forEach((S,E)=>{(w!=p-d||E>=m)&&b.push(S[w])});return o(b.length==h),b}drawCodewords(l){if(l.length!=Math.floor(ae.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let s=0;for(let a=this.size-1;a>=1;a-=2){a==6&&(a=5);for(let f=0;f<this.size;f++)for(let d=0;d<2;d++){const h=a-d,p=(a+1&2)==0?this.size-1-f:f;!this.isFunction[p][h]&&s<l.length*8&&(this.modules[p][h]=r(l[s>>>3],7-(s&7)),s++)}}o(s==l.length*8)}applyMask(l){if(l<0||l>7)throw new RangeError("Mask value out of range");for(let s=0;s<this.size;s++)for(let a=0;a<this.size;a++){let f;switch(l){case 0:f=(a+s)%2==0;break;case 1:f=s%2==0;break;case 2:f=a%3==0;break;case 3:f=(a+s)%3==0;break;case 4:f=(Math.floor(a/3)+Math.floor(s/2))%2==0;break;case 5:f=a*s%2+a*s%3==0;break;case 6:f=(a*s%2+a*s%3)%2==0;break;case 7:f=((a+s)%2+a*s%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[s][a]&&f&&(this.modules[s][a]=!this.modules[s][a])}}getPenaltyScore(){let l=0;for(let d=0;d<this.size;d++){let h=!1,m=0,p=[0,0,0,0,0,0,0];for(let v=0;v<this.size;v++)this.modules[d][v]==h?(m++,m==5?l+=ae.PENALTY_N1:m>5&&l++):(this.finderPenaltyAddHistory(m,p),h||(l+=this.finderPenaltyCountPatterns(p)*ae.PENALTY_N3),h=this.modules[d][v],m=1);l+=this.finderPenaltyTerminateAndCount(h,m,p)*ae.PENALTY_N3}for(let d=0;d<this.size;d++){let h=!1,m=0,p=[0,0,0,0,0,0,0];for(let v=0;v<this.size;v++)this.modules[v][d]==h?(m++,m==5?l+=ae.PENALTY_N1:m>5&&l++):(this.finderPenaltyAddHistory(m,p),h||(l+=this.finderPenaltyCountPatterns(p)*ae.PENALTY_N3),h=this.modules[v][d],m=1);l+=this.finderPenaltyTerminateAndCount(h,m,p)*ae.PENALTY_N3}for(let d=0;d<this.size-1;d++)for(let h=0;h<this.size-1;h++){const m=this.modules[d][h];m==this.modules[d][h+1]&&m==this.modules[d+1][h]&&m==this.modules[d+1][h+1]&&(l+=ae.PENALTY_N2)}let s=0;for(const d of this.modules)s=d.reduce((h,m)=>h+(m?1:0),s);const a=this.size*this.size,f=Math.ceil(Math.abs(s*20-a*10)/a)-1;return o(0<=f&&f<=9),l+=f*ae.PENALTY_N4,o(0<=l&&l<=2568888),l}getAlignmentPatternPositions(){if(this.version==1)return[];{const l=Math.floor(this.version/7)+2,s=this.version==32?26:Math.ceil((this.version*4+4)/(l*2-2))*2;let a=[6];for(let f=this.size-7;a.length<l;f-=s)a.splice(1,0,f);return a}}static getNumRawDataModules(l){if(l<ae.MIN_VERSION||l>ae.MAX_VERSION)throw new RangeError("Version number out of range");let s=(16*l+128)*l+64;if(l>=2){const a=Math.floor(l/7)+2;s-=(25*a-10)*a-55,l>=7&&(s-=36)}return o(208<=s&&s<=29648),s}static getNumDataCodewords(l,s){return Math.floor(ae.getNumRawDataModules(l)/8)-ae.ECC_CODEWORDS_PER_BLOCK[s.ordinal][l]*ae.NUM_ERROR_CORRECTION_BLOCKS[s.ordinal][l]}static reedSolomonComputeDivisor(l){if(l<1||l>255)throw new RangeError("Degree out of range");let s=[];for(let f=0;f<l-1;f++)s.push(0);s.push(1);let a=1;for(let f=0;f<l;f++){for(let d=0;d<s.length;d++)s[d]=ae.reedSolomonMultiply(s[d],a),d+1<s.length&&(s[d]^=s[d+1]);a=ae.reedSolomonMultiply(a,2)}return s}static reedSolomonComputeRemainder(l,s){let a=s.map(f=>0);for(const f of l){const d=f^a.shift();a.push(0),s.forEach((h,m)=>a[m]^=ae.reedSolomonMultiply(h,d))}return a}static reedSolomonMultiply(l,s){if(l>>>8||s>>>8)throw new RangeError("Byte out of range");let a=0;for(let f=7;f>=0;f--)a=a<<1^(a>>>7)*285,a^=(s>>>f&1)*l;return o(a>>>8==0),a}finderPenaltyCountPatterns(l){const s=l[1];o(s<=this.size*3);const a=s>0&&l[2]==s&&l[3]==s*3&&l[4]==s&&l[5]==s;return(a&&l[0]>=s*4&&l[6]>=s?1:0)+(a&&l[6]>=s*4&&l[0]>=s?1:0)}finderPenaltyTerminateAndCount(l,s,a){return l&&(this.finderPenaltyAddHistory(s,a),s=0),s+=this.size,this.finderPenaltyAddHistory(s,a),this.finderPenaltyCountPatterns(a)}finderPenaltyAddHistory(l,s){s[0]==0&&(l+=this.size),s.pop(),s.unshift(l)}};t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function n(u,l,s){if(l<0||l>31||u>>>l)throw new RangeError("Value out of range");for(let a=l-1;a>=0;a--)s.push(u>>>a&1)}function r(u,l){return(u>>>l&1)!=0}function o(u){if(!u)throw new Error("Assertion error")}const i=class xe{constructor(l,s,a){if(this.mode=l,this.numChars=s,this.bitData=a,s<0)throw new RangeError("Invalid argument");this.bitData=a.slice()}static makeBytes(l){let s=[];for(const a of l)n(a,8,s);return new xe(xe.Mode.BYTE,l.length,s)}static makeNumeric(l){if(!xe.isNumeric(l))throw new RangeError("String contains non-numeric characters");let s=[];for(let a=0;a<l.length;){const f=Math.min(l.length-a,3);n(parseInt(l.substring(a,a+f),10),f*3+1,s),a+=f}return new xe(xe.Mode.NUMERIC,l.length,s)}static makeAlphanumeric(l){if(!xe.isAlphanumeric(l))throw new RangeError("String contains unencodable characters in alphanumeric mode");let s=[],a;for(a=0;a+2<=l.length;a+=2){let f=xe.ALPHANUMERIC_CHARSET.indexOf(l.charAt(a))*45;f+=xe.ALPHANUMERIC_CHARSET.indexOf(l.charAt(a+1)),n(f,11,s)}return a<l.length&&n(xe.ALPHANUMERIC_CHARSET.indexOf(l.charAt(a)),6,s),new xe(xe.Mode.ALPHANUMERIC,l.length,s)}static makeSegments(l){return l==""?[]:xe.isNumeric(l)?[xe.makeNumeric(l)]:xe.isAlphanumeric(l)?[xe.makeAlphanumeric(l)]:[xe.makeBytes(xe.toUtf8ByteArray(l))]}static makeEci(l){let s=[];if(l<0)throw new RangeError("ECI assignment value out of range");if(l<128)n(l,8,s);else if(l<16384)n(2,2,s),n(l,14,s);else if(l<1e6)n(6,3,s),n(l,21,s);else throw new RangeError("ECI assignment value out of range");return new xe(xe.Mode.ECI,0,s)}static isNumeric(l){return xe.NUMERIC_REGEX.test(l)}static isAlphanumeric(l){return xe.ALPHANUMERIC_REGEX.test(l)}getData(){return this.bitData.slice()}static getTotalBits(l,s){let a=0;for(const f of l){const d=f.mode.numCharCountBits(s);if(f.numChars>=1<<d)return 1/0;a+=4+d+f.bitData.length}return a}static toUtf8ByteArray(l){l=encodeURI(l);let s=[];for(let a=0;a<l.length;a++)l.charAt(a)!="%"?s.push(l.charCodeAt(a)):(s.push(parseInt(l.substring(a+1,a+3),16)),a+=2);return s}};i.NUMERIC_REGEX=/^[0-9]*$/,i.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,i.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let c=i;e.QrSegment=i})(qt||(qt={}));(e=>{(t=>{const n=class{constructor(o,i){this.ordinal=o,this.formatBits=i}};n.LOW=new n(0,1),n.MEDIUM=new n(1,0),n.QUARTILE=new n(2,3),n.HIGH=new n(3,2),t.Ecc=n})(e.QrCode||(e.QrCode={}))})(qt||(qt={}));(e=>{(t=>{const n=class{constructor(o,i){this.modeBits=o,this.numBitsCharCount=i}numCharCountBits(o){return this.numBitsCharCount[Math.floor((o+7)/17)]}};n.NUMERIC=new n(1,[10,12,14]),n.ALPHANUMERIC=new n(2,[9,11,13]),n.BYTE=new n(4,[8,16,16]),n.KANJI=new n(8,[8,10,12]),n.ECI=new n(7,[0,0,0]),t.Mode=n})(e.QrSegment||(e.QrSegment={}))})(qt||(qt={}));var fn=qt;/**
118
118
  * @license qrcode.react
119
119
  * Copyright (c) Paul O'Shannessy
120
120
  * SPDX-License-Identifier: ISC
121
- */var xO={L:ln.QrCode.Ecc.LOW,M:ln.QrCode.Ecc.MEDIUM,Q:ln.QrCode.Ecc.QUARTILE,H:ln.QrCode.Ecc.HIGH},Gv=128,Hv="L",zv="#FFFFFF",Wv="#000000",qv=!1,Kv=1,bO=4,wO=0,EO=.1;function Yv(e,t=0){const n=[];return e.forEach(function(r,o){let s=null;r.forEach(function(c,u){if(!c&&s!==null){n.push(`M${s+t} ${o+t}h${u-s}v1H${s+t}z`),s=null;return}if(u===r.length-1){if(!c)return;s===null?n.push(`M${u+t},${o+t} h1v1H${u+t}z`):n.push(`M${s+t},${o+t} h${u+1-s}v1H${s+t}z`);return}c&&s===null&&(s=u)})}),n.join("")}function Xv(e,t){return e.slice().map((n,r)=>r<t.y||r>=t.y+t.h?n:n.map((o,s)=>s<t.x||s>=t.x+t.w?o:!1))}function SO(e,t,n,r){if(r==null)return null;const o=e.length+n*2,s=Math.floor(t*EO),c=o/t,u=(r.width||s)*c,l=(r.height||s)*c,i=r.x==null?e.length/2-u/2:r.x*c,a=r.y==null?e.length/2-l/2:r.y*c,f=r.opacity==null?1:r.opacity;let d=null;if(r.excavate){let m=Math.floor(i),p=Math.floor(a),v=Math.ceil(u+i-m),x=Math.ceil(l+a-p);d={x:m,y:p,w:v,h:x}}const h=r.crossOrigin;return{x:i,y:a,h:l,w:u,excavation:d,opacity:f,crossOrigin:h}}function CO(e,t){return t!=null?Math.max(Math.floor(t),0):e?bO:wO}function Zv({value:e,level:t,minVersion:n,includeMargin:r,marginSize:o,imageSettings:s,size:c,boostLevel:u}){let l=_.useMemo(()=>{const m=(Array.isArray(e)?e:[e]).reduce((p,v)=>(p.push(...ln.QrSegment.makeSegments(v)),p),[]);return ln.QrCode.encodeSegments(m,xO[t],n,void 0,void 0,u)},[e,t,n,u]);const{cells:i,margin:a,numCells:f,calculatedImageSettings:d}=_.useMemo(()=>{let h=l.getModules();const m=CO(r,o),p=h.length+m*2,v=SO(h,c,m,s);return{cells:h,margin:m,numCells:p,calculatedImageSettings:v}},[l,c,s,r,o]);return{qrcode:l,margin:a,cells:i,numCells:f,calculatedImageSettings:d}}var _O=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),RO=_.forwardRef(function(t,n){const r=t,{value:o,size:s=Gv,level:c=Hv,bgColor:u=zv,fgColor:l=Wv,includeMargin:i=qv,minVersion:a=Kv,boostLevel:f,marginSize:d,imageSettings:h}=r,p=va(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:v}=p,x=va(p,["style"]),b=h==null?void 0:h.src,w=_.useRef(null),E=_.useRef(null),S=_.useCallback(B=>{w.current=B,typeof n=="function"?n(B):n&&(n.current=B)},[n]),[T,P]=_.useState(!1),{margin:A,cells:O,numCells:R,calculatedImageSettings:I}=Zv({value:o,level:c,minVersion:a,boostLevel:f,includeMargin:i,marginSize:d,imageSettings:h,size:s});_.useEffect(()=>{if(w.current!=null){const B=w.current,q=B.getContext("2d");if(!q)return;let G=O;const H=E.current,U=I!=null&&H!==null&&H.complete&&H.naturalHeight!==0&&H.naturalWidth!==0;U&&I.excavation!=null&&(G=Xv(O,I.excavation));const L=window.devicePixelRatio||1;B.height=B.width=s*L;const M=s/R*L;q.scale(M,M),q.fillStyle=u,q.fillRect(0,0,R,R),q.fillStyle=l,_O?q.fill(new Path2D(Yv(G,A))):O.forEach(function(k,ee){k.forEach(function(ne,X){ne&&q.fillRect(X+A,ee+A,1,1)})}),I&&(q.globalAlpha=I.opacity),U&&q.drawImage(H,I.x+A,I.y+A,I.w,I.h)}}),_.useEffect(()=>{P(!1)},[b]);const D=ga({height:s,width:s},v);let F=null;return b!=null&&(F=_.createElement("img",{src:b,key:b,style:{display:"none"},onLoad:()=>{P(!0)},ref:E,crossOrigin:I==null?void 0:I.crossOrigin})),_.createElement(_.Fragment,null,_.createElement("canvas",ga({style:D,height:s,width:s,ref:S,role:"img"},x)),F)});RO.displayName="QRCodeCanvas";var Qv=_.forwardRef(function(t,n){const r=t,{value:o,size:s=Gv,level:c=Hv,bgColor:u=zv,fgColor:l=Wv,includeMargin:i=qv,minVersion:a=Kv,boostLevel:f,title:d,marginSize:h,imageSettings:m}=r,p=va(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:v,cells:x,numCells:b,calculatedImageSettings:w}=Zv({value:o,level:c,minVersion:a,boostLevel:f,includeMargin:i,marginSize:h,imageSettings:m,size:s});let E=x,S=null;m!=null&&w!=null&&(w.excavation!=null&&(E=Xv(x,w.excavation)),S=_.createElement("image",{href:m.src,height:w.h,width:w.w,x:w.x+v,y:w.y+v,preserveAspectRatio:"none",opacity:w.opacity,crossOrigin:w.crossOrigin}));const T=Yv(E,v);return _.createElement("svg",ga({height:s,width:s,viewBox:`0 0 ${b} ${b}`,ref:n,role:"img"},p),!!d&&_.createElement("title",null,d),_.createElement("path",{fill:u,d:`M0,0 h${b}v${b}H0z`,shapeRendering:"crispEdges"}),_.createElement("path",{fill:l,d:T,shapeRendering:"crispEdges"}),S)});Qv.displayName="QRCodeSVG";const TO=e=>{const{value:t,className:n="",size:r=200,bgColor:o="#FFFFFF",fgColor:s="#000000",level:c="M",marginSize:u=4,imageSettings:l,...i}=e,a=j.classNames("flex items-center justify-center",n);return g.jsx("div",{className:a,...i,children:g.jsx(Qv,{value:t,size:r,bgColor:o,fgColor:s,level:c,marginSize:u,imageSettings:l})})};var Hr={},jn={},zr={},Hu;function Be(){if(Hu)return zr;Hu=1,Object.defineProperty(zr,"__esModule",{value:!0});function e(n,r){if(!(n instanceof r))throw new TypeError("Cannot call a class as a function")}var t=function n(r,o){e(this,n),this.data=r,this.text=o.text||r,this.options=o};return zr.default=t,zr}var zu;function PO(){if(zu)return jn;zu=1,Object.defineProperty(jn,"__esModule",{value:!0}),jn.CODE39=void 0;var e=(function(){function p(v,x){for(var b=0;b<x.length;b++){var w=x[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(v,w.key,w)}}return function(v,x,b){return x&&p(v.prototype,x),b&&p(v,b),v}})(),t=Be(),n=r(t);function r(p){return p&&p.__esModule?p:{default:p}}function o(p,v){if(!(p instanceof v))throw new TypeError("Cannot call a class as a function")}function s(p,v){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:p}function c(p,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);p.prototype=Object.create(v&&v.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(p,v):p.__proto__=v)}var u=(function(p){c(v,p);function v(x,b){return o(this,v),x=x.toUpperCase(),b.mod43&&(x+=d(m(x))),s(this,(v.__proto__||Object.getPrototypeOf(v)).call(this,x,b))}return e(v,[{key:"encode",value:function(){for(var b=a("*"),w=0;w<this.data.length;w++)b+=a(this.data[w])+"0";return b+=a("*"),{data:b,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)!==-1}}]),v})(n.default),l=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","*"],i=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770];function a(p){return f(h(p))}function f(p){return i[p].toString(2)}function d(p){return l[p]}function h(p){return l.indexOf(p)}function m(p){for(var v=0,x=0;x<p.length;x++)v+=h(p[x]);return v=v%43,v}return jn.CODE39=u,jn}var Ke={},Wr={},qr={},ye={},Wu;function Cr(){if(Wu)return ye;Wu=1,Object.defineProperty(ye,"__esModule",{value:!0});var e;function t(l,i,a){return i in l?Object.defineProperty(l,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):l[i]=a,l}var n=ye.SET_A=0,r=ye.SET_B=1,o=ye.SET_C=2;ye.SHIFT=98;var s=ye.START_A=103,c=ye.START_B=104,u=ye.START_C=105;return ye.MODULO=103,ye.STOP=106,ye.FNC1=207,ye.SET_BY_CODE=(e={},t(e,s,n),t(e,c,r),t(e,u,o),e),ye.SWAP={101:n,100:r,99:o},ye.A_START_CHAR="Ð",ye.B_START_CHAR="Ñ",ye.C_START_CHAR="Ò",ye.A_CHARS="[\0-_È-Ï]",ye.B_CHARS="[ -È-Ï]",ye.C_CHARS="(Ï*[0-9]{2}Ï*)",ye.BARS=[11011001100,11001101100,11001100110,10010011e3,10010001100,10001001100,10011001e3,10011000100,10001100100,11001001e3,11001000100,11000100100,10110011100,10011011100,10011001110,10111001100,10011101100,10011100110,11001110010,11001011100,11001001110,11011100100,11001110100,11101101110,11101001100,11100101100,11100100110,11101100100,11100110100,11100110010,11011011e3,11011000110,11000110110,10100011e3,10001011e3,10001000110,10110001e3,10001101e3,10001100010,11010001e3,11000101e3,11000100010,10110111e3,10110001110,10001101110,10111011e3,10111000110,10001110110,11101110110,11010001110,11000101110,11011101e3,11011100010,11011101110,11101011e3,11101000110,11100010110,11101101e3,11101100010,11100011010,11101111010,11001000010,11110001010,1010011e4,10100001100,1001011e4,10010000110,10000101100,10000100110,1011001e4,10110000100,1001101e4,10011000010,10000110100,10000110010,11000010010,1100101e4,11110111010,11000010100,10001111010,10100111100,10010111100,10010011110,10111100100,10011110100,10011110010,11110100100,11110010100,11110010010,11011011110,11011110110,11110110110,10101111e3,10100011110,10001011110,10111101e3,10111100010,11110101e3,11110100010,10111011110,10111101110,11101011110,11110101110,11010000100,1101001e4,11010011100,1100011101011],ye}var qu;function Li(){if(qu)return qr;qu=1,Object.defineProperty(qr,"__esModule",{value:!0});var e=(function(){function i(a,f){for(var d=0;d<f.length;d++){var h=f[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(a,h.key,h)}}return function(a,f,d){return f&&i(a.prototype,f),d&&i(a,d),a}})(),t=Be(),n=o(t),r=Cr();function o(i){return i&&i.__esModule?i:{default:i}}function s(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function c(i,a){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:i}function u(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);i.prototype=Object.create(a&&a.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(i,a):i.__proto__=a)}var l=(function(i){u(a,i);function a(f,d){s(this,a);var h=c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,f.substring(1),d));return h.bytes=f.split("").map(function(m){return m.charCodeAt(0)}),h}return e(a,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var d=this.bytes,h=d.shift()-105,m=r.SET_BY_CODE[h];if(m===void 0)throw new RangeError("The encoding does not start with a start character.");this.shouldEncodeAsEan128()===!0&&d.unshift(r.FNC1);var p=a.next(d,1,m);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:a.getBar(h)+p.result+a.getBar((p.checksum+h)%r.MODULO)+a.getBar(r.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var d=this.options.ean128||!1;return typeof d=="string"&&(d=d.toLowerCase()==="true"),d}}],[{key:"getBar",value:function(d){return r.BARS[d]?r.BARS[d].toString():""}},{key:"correctIndex",value:function(d,h){if(h===r.SET_A){var m=d.shift();return m<32?m+64:m-32}else return h===r.SET_B?d.shift()-32:(d.shift()-48)*10+d.shift()-48}},{key:"next",value:function(d,h,m){if(!d.length)return{result:"",checksum:0};var p=void 0,v=void 0;if(d[0]>=200){v=d.shift()-105;var x=r.SWAP[v];x!==void 0?p=a.next(d,h+1,x):((m===r.SET_A||m===r.SET_B)&&v===r.SHIFT&&(d[0]=m===r.SET_A?d[0]>95?d[0]-96:d[0]:d[0]<32?d[0]+96:d[0]),p=a.next(d,h+1,m))}else v=a.correctIndex(d,m),p=a.next(d,h+1,m);var b=a.getBar(v),w=v*h;return{result:b+p.result,checksum:w+p.checksum}}}]),a})(n.default);return qr.default=l,qr}var Kr={},Ku;function AO(){if(Ku)return Kr;Ku=1,Object.defineProperty(Kr,"__esModule",{value:!0});var e=Cr(),t=function(u){return u.match(new RegExp("^"+e.A_CHARS+"*"))[0].length},n=function(u){return u.match(new RegExp("^"+e.B_CHARS+"*"))[0].length},r=function(u){return u.match(new RegExp("^"+e.C_CHARS+"*"))[0]};function o(c,u){var l=u?e.A_CHARS:e.B_CHARS,i=c.match(new RegExp("^("+l+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(i)return i[1]+"Ì"+s(c.substring(i[1].length));var a=c.match(new RegExp("^"+l+"+"))[0];return a.length===c.length?c:a+String.fromCharCode(u?205:206)+o(c.substring(a.length),!u)}function s(c){var u=r(c),l=u.length;if(l===c.length)return c;c=c.substring(l);var i=t(c)>=n(c);return u+String.fromCharCode(i?206:205)+o(c,i)}return Kr.default=function(c){var u=void 0,l=r(c).length;if(l>=2)u=e.C_START_CHAR+s(c);else{var i=t(c)>n(c);u=(i?e.A_START_CHAR:e.B_START_CHAR)+o(c,i)}return u.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(a,f){return"Ë"+f})},Kr}var Yu;function OO(){if(Yu)return Wr;Yu=1,Object.defineProperty(Wr,"__esModule",{value:!0});var e=Li(),t=o(e),n=AO(),r=o(n);function o(i){return i&&i.__esModule?i:{default:i}}function s(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function c(i,a){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:i}function u(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);i.prototype=Object.create(a&&a.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(i,a):i.__proto__=a)}var l=(function(i){u(a,i);function a(f,d){if(s(this,a),/^[\x00-\x7F\xC8-\xD3]+$/.test(f))var h=c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,(0,r.default)(f),d));else var h=c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,f,d));return c(h)}return a})(t.default);return Wr.default=l,Wr}var Yr={},Xu;function MO(){if(Xu)return Yr;Xu=1,Object.defineProperty(Yr,"__esModule",{value:!0});var e=(function(){function i(a,f){for(var d=0;d<f.length;d++){var h=f[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(a,h.key,h)}}return function(a,f,d){return f&&i(a.prototype,f),d&&i(a,d),a}})(),t=Li(),n=o(t),r=Cr();function o(i){return i&&i.__esModule?i:{default:i}}function s(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function c(i,a){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:i}function u(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);i.prototype=Object.create(a&&a.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(i,a):i.__proto__=a)}var l=(function(i){u(a,i);function a(f,d){return s(this,a),c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,r.A_START_CHAR+f,d))}return e(a,[{key:"valid",value:function(){return new RegExp("^"+r.A_CHARS+"+$").test(this.data)}}]),a})(n.default);return Yr.default=l,Yr}var Xr={},Zu;function IO(){if(Zu)return Xr;Zu=1,Object.defineProperty(Xr,"__esModule",{value:!0});var e=(function(){function i(a,f){for(var d=0;d<f.length;d++){var h=f[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(a,h.key,h)}}return function(a,f,d){return f&&i(a.prototype,f),d&&i(a,d),a}})(),t=Li(),n=o(t),r=Cr();function o(i){return i&&i.__esModule?i:{default:i}}function s(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function c(i,a){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:i}function u(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);i.prototype=Object.create(a&&a.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(i,a):i.__proto__=a)}var l=(function(i){u(a,i);function a(f,d){return s(this,a),c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,r.B_START_CHAR+f,d))}return e(a,[{key:"valid",value:function(){return new RegExp("^"+r.B_CHARS+"+$").test(this.data)}}]),a})(n.default);return Xr.default=l,Xr}var Zr={},Qu;function DO(){if(Qu)return Zr;Qu=1,Object.defineProperty(Zr,"__esModule",{value:!0});var e=(function(){function i(a,f){for(var d=0;d<f.length;d++){var h=f[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(a,h.key,h)}}return function(a,f,d){return f&&i(a.prototype,f),d&&i(a,d),a}})(),t=Li(),n=o(t),r=Cr();function o(i){return i&&i.__esModule?i:{default:i}}function s(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function c(i,a){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:i}function u(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);i.prototype=Object.create(a&&a.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(i,a):i.__proto__=a)}var l=(function(i){u(a,i);function a(f,d){return s(this,a),c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,r.C_START_CHAR+f,d))}return e(a,[{key:"valid",value:function(){return new RegExp("^"+r.C_CHARS+"+$").test(this.data)}}]),a})(n.default);return Zr.default=l,Zr}var Ju;function NO(){if(Ju)return Ke;Ju=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.CODE128C=Ke.CODE128B=Ke.CODE128A=Ke.CODE128=void 0;var e=OO(),t=l(e),n=MO(),r=l(n),o=IO(),s=l(o),c=DO(),u=l(c);function l(i){return i&&i.__esModule?i:{default:i}}return Ke.CODE128=t.default,Ke.CODE128A=r.default,Ke.CODE128B=s.default,Ke.CODE128C=u.default,Ke}var Oe={},Qr={},dt={},ef;function _r(){return ef||(ef=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.SIDE_BIN="101",dt.MIDDLE_BIN="01010",dt.BINARIES={L:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],G:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],R:["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"],O:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],E:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"]},dt.EAN2_STRUCTURE=["LL","LG","GL","GG"],dt.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],dt.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]),dt}var Jr={},eo={},tf;function Rr(){if(tf)return eo;tf=1,Object.defineProperty(eo,"__esModule",{value:!0});var e=_r(),t=function(r,o,s){var c=r.split("").map(function(l,i){return e.BINARIES[o[i]]}).map(function(l,i){return l?l[r[i]]:""});if(s){var u=r.length-1;c=c.map(function(l,i){return i<u?l+s:l})}return c.join("")};return eo.default=t,eo}var nf;function Jv(){if(nf)return Jr;nf=1,Object.defineProperty(Jr,"__esModule",{value:!0});var e=(function(){function f(d,h){for(var m=0;m<h.length;m++){var p=h[m];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(d,p.key,p)}}return function(d,h,m){return h&&f(d.prototype,h),m&&f(d,m),d}})(),t=_r(),n=Rr(),r=c(n),o=Be(),s=c(o);function c(f){return f&&f.__esModule?f:{default:f}}function u(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function l(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function i(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var a=(function(f){i(d,f);function d(h,m){u(this,d);var p=l(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,h,m));return p.fontSize=!m.flat&&m.fontSize>m.width*10?m.width*10:m.fontSize,p.guardHeight=m.height+p.fontSize/2+m.textMargin,p}return e(d,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(m,p){return this.text.substr(m,p)}},{key:"leftEncode",value:function(m,p){return(0,r.default)(m,p)}},{key:"rightText",value:function(m,p){return this.text.substr(m,p)}},{key:"rightEncode",value:function(m,p){return(0,r.default)(m,p)}},{key:"encodeGuarded",value:function(){var m={fontSize:this.fontSize},p={height:this.guardHeight};return[{data:t.SIDE_BIN,options:p},{data:this.leftEncode(),text:this.leftText(),options:m},{data:t.MIDDLE_BIN,options:p},{data:this.rightEncode(),text:this.rightText(),options:m},{data:t.SIDE_BIN,options:p}]}},{key:"encodeFlat",value:function(){var m=[t.SIDE_BIN,this.leftEncode(),t.MIDDLE_BIN,this.rightEncode(),t.SIDE_BIN];return{data:m.join(""),text:this.text}}}]),d})(s.default);return Jr.default=a,Jr}var rf;function jO(){if(rf)return Qr;rf=1,Object.defineProperty(Qr,"__esModule",{value:!0});var e=(function(){function f(d,h){for(var m=0;m<h.length;m++){var p=h[m];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(d,p.key,p)}}return function(d,h,m){return h&&f(d.prototype,h),m&&f(d,m),d}})(),t=function f(d,h,m){d===null&&(d=Function.prototype);var p=Object.getOwnPropertyDescriptor(d,h);if(p===void 0){var v=Object.getPrototypeOf(d);return v===null?void 0:f(v,h,m)}else{if("value"in p)return p.value;var x=p.get;return x===void 0?void 0:x.call(m)}},n=_r(),r=Jv(),o=s(r);function s(f){return f&&f.__esModule?f:{default:f}}function c(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function u(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function l(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var i=function(d){var h=d.substr(0,12).split("").map(function(m){return+m}).reduce(function(m,p,v){return v%2?m+p*3:m+p},0);return(10-h%10)%10},a=(function(f){l(d,f);function d(h,m){c(this,d),h.search(/^[0-9]{12}$/)!==-1&&(h+=i(h));var p=u(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,h,m));return p.lastChar=m.lastChar,p}return e(d,[{key:"valid",value:function(){return this.data.search(/^[0-9]{13}$/)!==-1&&+this.data[12]===i(this.data)}},{key:"leftText",value:function(){return t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var m=this.data.substr(1,6),p=n.EAN13_STRUCTURE[this.data[0]];return t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"leftEncode",this).call(this,m,p)}},{key:"rightText",value:function(){return t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var m=this.data.substr(7,6);return t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"rightEncode",this).call(this,m,"RRRRRR")}},{key:"encodeGuarded",value:function(){var m=t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(m.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(m.push({data:"00"}),m.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),m}}]),d})(o.default);return Qr.default=a,Qr}var to={},of;function kO(){if(of)return to;of=1,Object.defineProperty(to,"__esModule",{value:!0});var e=(function(){function a(f,d){for(var h=0;h<d.length;h++){var m=d[h];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(f,m.key,m)}}return function(f,d,h){return d&&a(f.prototype,d),h&&a(f,h),f}})(),t=function a(f,d,h){f===null&&(f=Function.prototype);var m=Object.getOwnPropertyDescriptor(f,d);if(m===void 0){var p=Object.getPrototypeOf(f);return p===null?void 0:a(p,d,h)}else{if("value"in m)return m.value;var v=m.get;return v===void 0?void 0:v.call(h)}},n=Jv(),r=o(n);function o(a){return a&&a.__esModule?a:{default:a}}function s(a,f){if(!(a instanceof f))throw new TypeError("Cannot call a class as a function")}function c(a,f){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:a}function u(a,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);a.prototype=Object.create(f&&f.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(a,f):a.__proto__=f)}var l=function(f){var d=f.substr(0,7).split("").map(function(h){return+h}).reduce(function(h,m,p){return p%2?h+m:h+m*3},0);return(10-d%10)%10},i=(function(a){u(f,a);function f(d,h){return s(this,f),d.search(/^[0-9]{7}$/)!==-1&&(d+=l(d)),c(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,d,h))}return e(f,[{key:"valid",value:function(){return this.data.search(/^[0-9]{8}$/)!==-1&&+this.data[7]===l(this.data)}},{key:"leftText",value:function(){return t(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var h=this.data.substr(0,4);return t(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"leftEncode",this).call(this,h,"LLLL")}},{key:"rightText",value:function(){return t(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var h=this.data.substr(4,4);return t(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"rightEncode",this).call(this,h,"RRRR")}}]),f})(r.default);return to.default=i,to}var no={},sf;function LO(){if(sf)return no;sf=1,Object.defineProperty(no,"__esModule",{value:!0});var e=(function(){function d(h,m){for(var p=0;p<m.length;p++){var v=m[p];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(h,v.key,v)}}return function(h,m,p){return m&&d(h.prototype,m),p&&d(h,p),h}})(),t=_r(),n=Rr(),r=c(n),o=Be(),s=c(o);function c(d){return d&&d.__esModule?d:{default:d}}function u(d,h){if(!(d instanceof h))throw new TypeError("Cannot call a class as a function")}function l(d,h){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:d}function i(d,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);d.prototype=Object.create(h&&h.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(d,h):d.__proto__=h)}var a=function(h){var m=h.split("").map(function(p){return+p}).reduce(function(p,v,x){return x%2?p+v*9:p+v*3},0);return m%10},f=(function(d){i(h,d);function h(m,p){return u(this,h),l(this,(h.__proto__||Object.getPrototypeOf(h)).call(this,m,p))}return e(h,[{key:"valid",value:function(){return this.data.search(/^[0-9]{5}$/)!==-1}},{key:"encode",value:function(){var p=t.EAN5_STRUCTURE[a(this.data)];return{data:"1011"+(0,r.default)(this.data,p,"01"),text:this.text}}}]),h})(s.default);return no.default=f,no}var ro={},af;function FO(){if(af)return ro;af=1,Object.defineProperty(ro,"__esModule",{value:!0});var e=(function(){function f(d,h){for(var m=0;m<h.length;m++){var p=h[m];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(d,p.key,p)}}return function(d,h,m){return h&&f(d.prototype,h),m&&f(d,m),d}})(),t=_r(),n=Rr(),r=c(n),o=Be(),s=c(o);function c(f){return f&&f.__esModule?f:{default:f}}function u(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function l(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function i(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var a=(function(f){i(d,f);function d(h,m){return u(this,d),l(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,h,m))}return e(d,[{key:"valid",value:function(){return this.data.search(/^[0-9]{2}$/)!==-1}},{key:"encode",value:function(){var m=t.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,r.default)(this.data,m,"01"),text:this.text}}}]),d})(s.default);return ro.default=a,ro}var kn={},cf;function ey(){if(cf)return kn;cf=1,Object.defineProperty(kn,"__esModule",{value:!0});var e=(function(){function f(d,h){for(var m=0;m<h.length;m++){var p=h[m];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(d,p.key,p)}}return function(d,h,m){return h&&f(d.prototype,h),m&&f(d,m),d}})();kn.checksum=a;var t=Rr(),n=s(t),r=Be(),o=s(r);function s(f){return f&&f.__esModule?f:{default:f}}function c(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function u(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function l(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var i=(function(f){l(d,f);function d(h,m){c(this,d),h.search(/^[0-9]{11}$/)!==-1&&(h+=a(h));var p=u(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,h,m));return p.displayValue=m.displayValue,m.fontSize>m.width*10?p.fontSize=m.width*10:p.fontSize=m.fontSize,p.guardHeight=m.height+p.fontSize/2+m.textMargin,p}return e(d,[{key:"valid",value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==a(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var m="";return m+="101",m+=(0,n.default)(this.data.substr(0,6),"LLLLLL"),m+="01010",m+=(0,n.default)(this.data.substr(6,6),"RRRRRR"),m+="101",{data:m,text:this.text}}},{key:"guardedEncoding",value:function(){var m=[];return this.displayValue&&m.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),m.push({data:"101"+(0,n.default)(this.data[0],"L"),options:{height:this.guardHeight}}),m.push({data:(0,n.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),m.push({data:"01010",options:{height:this.guardHeight}}),m.push({data:(0,n.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),m.push({data:(0,n.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&m.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),m}}]),d})(o.default);function a(f){var d=0,h;for(h=1;h<11;h+=2)d+=parseInt(f[h]);for(h=0;h<11;h+=2)d+=parseInt(f[h])*3;return(10-d%10)%10}return kn.default=i,kn}var oo={},lf;function VO(){if(lf)return oo;lf=1,Object.defineProperty(oo,"__esModule",{value:!0});var e=(function(){function m(p,v){for(var x=0;x<v.length;x++){var b=v[x];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(p,b.key,b)}}return function(p,v,x){return v&&m(p.prototype,v),x&&m(p,x),p}})(),t=Rr(),n=c(t),r=Be(),o=c(r),s=ey();function c(m){return m&&m.__esModule?m:{default:m}}function u(m,p){if(!(m instanceof p))throw new TypeError("Cannot call a class as a function")}function l(m,p){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:m}function i(m,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);m.prototype=Object.create(p&&p.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(m,p):m.__proto__=p)}var a=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],f=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],d=(function(m){i(p,m);function p(v,x){u(this,p);var b=l(this,(p.__proto__||Object.getPrototypeOf(p)).call(this,v,x));if(b.isValid=!1,v.search(/^[0-9]{6}$/)!==-1)b.middleDigits=v,b.upcA=h(v,"0"),b.text=x.text||""+b.upcA[0]+v+b.upcA[b.upcA.length-1],b.isValid=!0;else if(v.search(/^[01][0-9]{7}$/)!==-1)if(b.middleDigits=v.substring(1,v.length-1),b.upcA=h(b.middleDigits,v[0]),b.upcA[b.upcA.length-1]===v[v.length-1])b.isValid=!0;else return l(b);else return l(b);return b.displayValue=x.displayValue,x.fontSize>x.width*10?b.fontSize=x.width*10:b.fontSize=x.fontSize,b.guardHeight=x.height+b.fontSize/2+x.textMargin,b}return e(p,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var x="";return x+="101",x+=this.encodeMiddleDigits(),x+="010101",{data:x,text:this.text}}},{key:"guardedEncoding",value:function(){var x=[];return this.displayValue&&x.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),x.push({data:"101",options:{height:this.guardHeight}}),x.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),x.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&x.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),x}},{key:"encodeMiddleDigits",value:function(){var x=this.upcA[0],b=this.upcA[this.upcA.length-1],w=f[parseInt(b)][parseInt(x)];return(0,n.default)(this.middleDigits,w)}}]),p})(o.default);function h(m,p){for(var v=parseInt(m[m.length-1]),x=a[v],b="",w=0,E=0;E<x.length;E++){var S=x[E];S==="X"?b+=m[w++]:b+=S}return b=""+p+b,""+b+(0,s.checksum)(b)}return oo.default=d,oo}var uf;function BO(){if(uf)return Oe;uf=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.UPCE=Oe.UPC=Oe.EAN2=Oe.EAN5=Oe.EAN8=Oe.EAN13=void 0;var e=jO(),t=d(e),n=kO(),r=d(n),o=LO(),s=d(o),c=FO(),u=d(c),l=ey(),i=d(l),a=VO(),f=d(a);function d(h){return h&&h.__esModule?h:{default:h}}return Oe.EAN13=t.default,Oe.EAN8=r.default,Oe.EAN5=s.default,Oe.EAN2=u.default,Oe.UPC=i.default,Oe.UPCE=f.default,Oe}var kt={},io={},en={},ff;function $O(){return ff||(ff=1,Object.defineProperty(en,"__esModule",{value:!0}),en.START_BIN="1010",en.END_BIN="11101",en.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]),en}var df;function ty(){if(df)return io;df=1,Object.defineProperty(io,"__esModule",{value:!0});var e=(function(){function i(a,f){for(var d=0;d<f.length;d++){var h=f[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(a,h.key,h)}}return function(a,f,d){return f&&i(a.prototype,f),d&&i(a,d),a}})(),t=$O(),n=Be(),r=o(n);function o(i){return i&&i.__esModule?i:{default:i}}function s(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function c(i,a){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:i}function u(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);i.prototype=Object.create(a&&a.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(i,a):i.__proto__=a)}var l=(function(i){u(a,i);function a(){return s(this,a),c(this,(a.__proto__||Object.getPrototypeOf(a)).apply(this,arguments))}return e(a,[{key:"valid",value:function(){return this.data.search(/^([0-9]{2})+$/)!==-1}},{key:"encode",value:function(){var d=this,h=this.data.match(/.{2}/g).map(function(m){return d.encodePair(m)}).join("");return{data:t.START_BIN+h+t.END_BIN,text:this.text}}},{key:"encodePair",value:function(d){var h=t.BINARIES[d[1]];return t.BINARIES[d[0]].split("").map(function(m,p){return(m==="1"?"111":"1")+(h[p]==="1"?"000":"0")}).join("")}}]),a})(r.default);return io.default=l,io}var so={},hf;function UO(){if(hf)return so;hf=1,Object.defineProperty(so,"__esModule",{value:!0});var e=(function(){function i(a,f){for(var d=0;d<f.length;d++){var h=f[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(a,h.key,h)}}return function(a,f,d){return f&&i(a.prototype,f),d&&i(a,d),a}})(),t=ty(),n=r(t);function r(i){return i&&i.__esModule?i:{default:i}}function o(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function s(i,a){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:i}function c(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);i.prototype=Object.create(a&&a.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(i,a):i.__proto__=a)}var u=function(a){var f=a.substr(0,13).split("").map(function(d){return parseInt(d,10)}).reduce(function(d,h,m){return d+h*(3-m%2*2)},0);return Math.ceil(f/10)*10-f},l=(function(i){c(a,i);function a(f,d){return o(this,a),f.search(/^[0-9]{13}$/)!==-1&&(f+=u(f)),s(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,f,d))}return e(a,[{key:"valid",value:function(){return this.data.search(/^[0-9]{14}$/)!==-1&&+this.data[13]===u(this.data)}}]),a})(n.default);return so.default=l,so}var pf;function GO(){if(pf)return kt;pf=1,Object.defineProperty(kt,"__esModule",{value:!0}),kt.ITF14=kt.ITF=void 0;var e=ty(),t=o(e),n=UO(),r=o(n);function o(s){return s&&s.__esModule?s:{default:s}}return kt.ITF=t.default,kt.ITF14=r.default,kt}var ke={},ao={},mf;function Tr(){if(mf)return ao;mf=1,Object.defineProperty(ao,"__esModule",{value:!0});var e=(function(){function i(a,f){for(var d=0;d<f.length;d++){var h=f[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(a,h.key,h)}}return function(a,f,d){return f&&i(a.prototype,f),d&&i(a,d),a}})(),t=Be(),n=r(t);function r(i){return i&&i.__esModule?i:{default:i}}function o(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function s(i,a){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:i}function c(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);i.prototype=Object.create(a&&a.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(i,a):i.__proto__=a)}var u=(function(i){c(a,i);function a(f,d){return o(this,a),s(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,f,d))}return e(a,[{key:"encode",value:function(){for(var d="110",h=0;h<this.data.length;h++){var m=parseInt(this.data[h]),p=m.toString(2);p=l(p,4-p.length);for(var v=0;v<p.length;v++)d+=p[v]=="0"?"100":"110"}return d+="1001",{data:d,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9]+$/)!==-1}}]),a})(n.default);function l(i,a){for(var f=0;f<a;f++)i="0"+i;return i}return ao.default=u,ao}var co={},Ln={},gf;function Fi(){if(gf)return Ln;gf=1,Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.mod10=e,Ln.mod11=t;function e(n){for(var r=0,o=0;o<n.length;o++){var s=parseInt(n[o]);(o+n.length)%2===0?r+=s:r+=s*2%10+Math.floor(s*2/10)}return(10-r%10)%10}function t(n){for(var r=0,o=[2,3,4,5,6,7],s=0;s<n.length;s++){var c=parseInt(n[n.length-1-s]);r+=o[s%o.length]*c}return(11-r%11)%11}return Ln}var vf;function HO(){if(vf)return co;vf=1,Object.defineProperty(co,"__esModule",{value:!0});var e=Tr(),t=r(e),n=Fi();function r(l){return l&&l.__esModule?l:{default:l}}function o(l,i){if(!(l instanceof i))throw new TypeError("Cannot call a class as a function")}function s(l,i){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:l}function c(l,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);l.prototype=Object.create(i&&i.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(l,i):l.__proto__=i)}var u=(function(l){c(i,l);function i(a,f){return o(this,i),s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,a+(0,n.mod10)(a),f))}return i})(t.default);return co.default=u,co}var lo={},yf;function zO(){if(yf)return lo;yf=1,Object.defineProperty(lo,"__esModule",{value:!0});var e=Tr(),t=r(e),n=Fi();function r(l){return l&&l.__esModule?l:{default:l}}function o(l,i){if(!(l instanceof i))throw new TypeError("Cannot call a class as a function")}function s(l,i){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:l}function c(l,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);l.prototype=Object.create(i&&i.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(l,i):l.__proto__=i)}var u=(function(l){c(i,l);function i(a,f){return o(this,i),s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,a+(0,n.mod11)(a),f))}return i})(t.default);return lo.default=u,lo}var uo={},xf;function WO(){if(xf)return uo;xf=1,Object.defineProperty(uo,"__esModule",{value:!0});var e=Tr(),t=r(e),n=Fi();function r(l){return l&&l.__esModule?l:{default:l}}function o(l,i){if(!(l instanceof i))throw new TypeError("Cannot call a class as a function")}function s(l,i){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:l}function c(l,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);l.prototype=Object.create(i&&i.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(l,i):l.__proto__=i)}var u=(function(l){c(i,l);function i(a,f){return o(this,i),a+=(0,n.mod10)(a),a+=(0,n.mod10)(a),s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,a,f))}return i})(t.default);return uo.default=u,uo}var fo={},bf;function qO(){if(bf)return fo;bf=1,Object.defineProperty(fo,"__esModule",{value:!0});var e=Tr(),t=r(e),n=Fi();function r(l){return l&&l.__esModule?l:{default:l}}function o(l,i){if(!(l instanceof i))throw new TypeError("Cannot call a class as a function")}function s(l,i){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:l}function c(l,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);l.prototype=Object.create(i&&i.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(l,i):l.__proto__=i)}var u=(function(l){c(i,l);function i(a,f){return o(this,i),a+=(0,n.mod11)(a),a+=(0,n.mod10)(a),s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,a,f))}return i})(t.default);return fo.default=u,fo}var wf;function KO(){if(wf)return ke;wf=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.MSI1110=ke.MSI1010=ke.MSI11=ke.MSI10=ke.MSI=void 0;var e=Tr(),t=a(e),n=HO(),r=a(n),o=zO(),s=a(o),c=WO(),u=a(c),l=qO(),i=a(l);function a(f){return f&&f.__esModule?f:{default:f}}return ke.MSI=t.default,ke.MSI10=r.default,ke.MSI11=s.default,ke.MSI1010=u.default,ke.MSI1110=i.default,ke}var Fn={},Ef;function YO(){if(Ef)return Fn;Ef=1,Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.pharmacode=void 0;var e=(function(){function l(i,a){for(var f=0;f<a.length;f++){var d=a[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(i,d.key,d)}}return function(i,a,f){return a&&l(i.prototype,a),f&&l(i,f),i}})(),t=Be(),n=r(t);function r(l){return l&&l.__esModule?l:{default:l}}function o(l,i){if(!(l instanceof i))throw new TypeError("Cannot call a class as a function")}function s(l,i){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:l}function c(l,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);l.prototype=Object.create(i&&i.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(l,i):l.__proto__=i)}var u=(function(l){c(i,l);function i(a,f){o(this,i);var d=s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,a,f));return d.number=parseInt(a,10),d}return e(i,[{key:"encode",value:function(){for(var f=this.number,d="";!isNaN(f)&&f!=0;)f%2===0?(d="11100"+d,f=(f-2)/2):(d="100"+d,f=(f-1)/2);return d=d.slice(0,-2),{data:d,text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),i})(n.default);return Fn.pharmacode=u,Fn}var Vn={},Sf;function XO(){if(Sf)return Vn;Sf=1,Object.defineProperty(Vn,"__esModule",{value:!0}),Vn.codabar=void 0;var e=(function(){function l(i,a){for(var f=0;f<a.length;f++){var d=a[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(i,d.key,d)}}return function(i,a,f){return a&&l(i.prototype,a),f&&l(i,f),i}})(),t=Be(),n=r(t);function r(l){return l&&l.__esModule?l:{default:l}}function o(l,i){if(!(l instanceof i))throw new TypeError("Cannot call a class as a function")}function s(l,i){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:l}function c(l,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);l.prototype=Object.create(i&&i.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(l,i):l.__proto__=i)}var u=(function(l){c(i,l);function i(a,f){o(this,i),a.search(/^[0-9\-\$\:\.\+\/]+$/)===0&&(a="A"+a+"A");var d=s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,a.toUpperCase(),f));return d.text=d.options.text||d.text.replace(/[A-D]/g,""),d}return e(i,[{key:"valid",value:function(){return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)!==-1}},{key:"encode",value:function(){for(var f=[],d=this.getEncodings(),h=0;h<this.data.length;h++)f.push(d[this.data.charAt(h)]),h!==this.data.length-1&&f.push("0");return{text:this.text,data:f.join("")}}},{key:"getEncodings",value:function(){return{0:"101010011",1:"101011001",2:"101001011",3:"110010101",4:"101101001",5:"110101001",6:"100101011",7:"100101101",8:"100110101",9:"110100101","-":"101001101",$:"101100101",":":"1101011011","/":"1101101011",".":"1101101101","+":"1011011011",A:"1011001001",B:"1001001011",C:"1010010011",D:"1010011001"}}}]),i})(n.default);return Vn.codabar=u,Vn}var Lt={},ho={},tn={},Cf;function ZO(){return Cf||(Cf=1,Object.defineProperty(tn,"__esModule",{value:!0}),tn.SYMBOLS=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","($)","(%)","(/)","(+)","ÿ"],tn.BINARIES=["100010100","101001000","101000100","101000010","100101000","100100100","100100010","101010000","100010010","100001010","110101000","110100100","110100010","110010100","110010010","110001010","101101000","101100100","101100010","100110100","100011010","101011000","101001100","101000110","100101100","100010110","110110100","110110010","110101100","110100110","110010110","110011010","101101100","101100110","100110110","100111010","100101110","111010100","111010010","111001010","101101110","101110110","110101110","100100110","111011010","111010110","100110010","101011110"],tn.MULTI_SYMBOLS={"\0":["(%)","U"],"":["($)","A"],"":["($)","B"],"":["($)","C"],"":["($)","D"],"":["($)","E"],"":["($)","F"],"\x07":["($)","G"],"\b":["($)","H"]," ":["($)","I"],"\n":["($)","J"],"\v":["($)","K"],"\f":["($)","L"],"\r":["($)","M"],"":["($)","N"],"":["($)","O"],"":["($)","P"],"":["($)","Q"],"":["($)","R"],"":["($)","S"],"":["($)","T"],"":["($)","U"],"":["($)","V"],"":["($)","W"],"":["($)","X"],"":["($)","Y"],"":["($)","Z"],"\x1B":["(%)","A"],"":["(%)","B"],"":["(%)","C"],"":["(%)","D"],"":["(%)","E"],"!":["(/)","A"],'"':["(/)","B"],"#":["(/)","C"],"&":["(/)","F"],"'":["(/)","G"],"(":["(/)","H"],")":["(/)","I"],"*":["(/)","J"],",":["(/)","L"],":":["(/)","Z"],";":["(%)","F"],"<":["(%)","G"],"=":["(%)","H"],">":["(%)","I"],"?":["(%)","J"],"@":["(%)","V"],"[":["(%)","K"],"\\":["(%)","L"],"]":["(%)","M"],"^":["(%)","N"],_:["(%)","O"],"`":["(%)","W"],a:["(+)","A"],b:["(+)","B"],c:["(+)","C"],d:["(+)","D"],e:["(+)","E"],f:["(+)","F"],g:["(+)","G"],h:["(+)","H"],i:["(+)","I"],j:["(+)","J"],k:["(+)","K"],l:["(+)","L"],m:["(+)","M"],n:["(+)","N"],o:["(+)","O"],p:["(+)","P"],q:["(+)","Q"],r:["(+)","R"],s:["(+)","S"],t:["(+)","T"],u:["(+)","U"],v:["(+)","V"],w:["(+)","W"],x:["(+)","X"],y:["(+)","Y"],z:["(+)","Z"],"{":["(%)","P"],"|":["(%)","Q"],"}":["(%)","R"],"~":["(%)","S"],"":["(%)","T"]}),tn}var _f;function ny(){if(_f)return ho;_f=1,Object.defineProperty(ho,"__esModule",{value:!0});var e=(function(){function i(a,f){for(var d=0;d<f.length;d++){var h=f[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(a,h.key,h)}}return function(a,f,d){return f&&i(a.prototype,f),d&&i(a,d),a}})(),t=ZO(),n=Be(),r=o(n);function o(i){return i&&i.__esModule?i:{default:i}}function s(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function c(i,a){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:i}function u(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);i.prototype=Object.create(a&&a.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(i,a):i.__proto__=a)}var l=(function(i){u(a,i);function a(f,d){return s(this,a),c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,f,d))}return e(a,[{key:"valid",value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:"encode",value:function(){var d=this.data.split("").flatMap(function(v){return t.MULTI_SYMBOLS[v]||v}),h=d.map(function(v){return a.getEncoding(v)}).join(""),m=a.checksum(d,20),p=a.checksum(d.concat(m),15);return{text:this.text,data:a.getEncoding("ÿ")+h+a.getEncoding(m)+a.getEncoding(p)+a.getEncoding("ÿ")+"1"}}}],[{key:"getEncoding",value:function(d){return t.BINARIES[a.symbolValue(d)]}},{key:"getSymbol",value:function(d){return t.SYMBOLS[d]}},{key:"symbolValue",value:function(d){return t.SYMBOLS.indexOf(d)}},{key:"checksum",value:function(d,h){var m=d.slice().reverse().reduce(function(p,v,x){var b=x%h+1;return p+a.symbolValue(v)*b},0);return a.getSymbol(m%47)}}]),a})(r.default);return ho.default=l,ho}var po={},Rf;function QO(){if(Rf)return po;Rf=1,Object.defineProperty(po,"__esModule",{value:!0});var e=(function(){function l(i,a){for(var f=0;f<a.length;f++){var d=a[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(i,d.key,d)}}return function(i,a,f){return a&&l(i.prototype,a),f&&l(i,f),i}})(),t=ny(),n=r(t);function r(l){return l&&l.__esModule?l:{default:l}}function o(l,i){if(!(l instanceof i))throw new TypeError("Cannot call a class as a function")}function s(l,i){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:l}function c(l,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);l.prototype=Object.create(i&&i.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(l,i):l.__proto__=i)}var u=(function(l){c(i,l);function i(a,f){return o(this,i),s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,a,f))}return e(i,[{key:"valid",value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),i})(n.default);return po.default=u,po}var Tf;function JO(){if(Tf)return Lt;Tf=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.CODE93FullASCII=Lt.CODE93=void 0;var e=ny(),t=o(e),n=QO(),r=o(n);function o(s){return s&&s.__esModule?s:{default:s}}return Lt.CODE93=t.default,Lt.CODE93FullASCII=r.default,Lt}var Bn={},Pf;function eM(){if(Pf)return Bn;Pf=1,Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.GenericBarcode=void 0;var e=(function(){function l(i,a){for(var f=0;f<a.length;f++){var d=a[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(i,d.key,d)}}return function(i,a,f){return a&&l(i.prototype,a),f&&l(i,f),i}})(),t=Be(),n=r(t);function r(l){return l&&l.__esModule?l:{default:l}}function o(l,i){if(!(l instanceof i))throw new TypeError("Cannot call a class as a function")}function s(l,i){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:l}function c(l,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);l.prototype=Object.create(i&&i.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(l,i):l.__proto__=i)}var u=(function(l){c(i,l);function i(a,f){return o(this,i),s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,a,f))}return e(i,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),i})(n.default);return Bn.GenericBarcode=u,Bn}var Af;function tM(){if(Af)return Hr;Af=1,Object.defineProperty(Hr,"__esModule",{value:!0});var e=PO(),t=NO(),n=BO(),r=GO(),o=KO(),s=YO(),c=XO(),u=JO(),l=eM();return Hr.default={CODE39:e.CODE39,CODE128:t.CODE128,CODE128A:t.CODE128A,CODE128B:t.CODE128B,CODE128C:t.CODE128C,EAN13:n.EAN13,EAN8:n.EAN8,EAN5:n.EAN5,EAN2:n.EAN2,UPC:n.UPC,UPCE:n.UPCE,ITF14:r.ITF14,ITF:r.ITF,MSI:o.MSI,MSI10:o.MSI10,MSI11:o.MSI11,MSI1010:o.MSI1010,MSI1110:o.MSI1110,pharmacode:s.pharmacode,codabar:c.codabar,CODE93:u.CODE93,CODE93FullASCII:u.CODE93FullASCII,GenericBarcode:l.GenericBarcode},Hr}var mo={},Of;function Vi(){if(Of)return mo;Of=1,Object.defineProperty(mo,"__esModule",{value:!0});var e=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t};return mo.default=function(t,n){return e({},t,n)},mo}var go={},Mf;function nM(){if(Mf)return go;Mf=1,Object.defineProperty(go,"__esModule",{value:!0}),go.default=e;function e(t){var n=[];function r(o){if(Array.isArray(o))for(var s=0;s<o.length;s++)r(o[s]);else o.text=o.text||"",o.data=o.data||"",n.push(o)}return r(t),n}return go}var vo={},If;function rM(){if(If)return vo;If=1,Object.defineProperty(vo,"__esModule",{value:!0}),vo.default=e;function e(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}return vo}var yo={},xo={},bo={},Df;function ry(){if(Df)return bo;Df=1,Object.defineProperty(bo,"__esModule",{value:!0}),bo.default=e;function e(t){var n=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var r in n)n.hasOwnProperty(r)&&(r=n[r],typeof t[r]=="string"&&(t[r]=parseInt(t[r],10)));return typeof t.displayValue=="string"&&(t.displayValue=t.displayValue!="false"),t}return bo}var wo={},Nf;function oy(){if(Nf)return wo;Nf=1,Object.defineProperty(wo,"__esModule",{value:!0});var e={width:2,height:100,format:"auto",displayValue:!0,fontOptions:"",font:"monospace",text:void 0,textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}};return wo.default=e,wo}var jf;function oM(){if(jf)return xo;jf=1,Object.defineProperty(xo,"__esModule",{value:!0});var e=ry(),t=o(e),n=oy(),r=o(n);function o(c){return c&&c.__esModule?c:{default:c}}function s(c){var u={};for(var l in r.default)r.default.hasOwnProperty(l)&&(c.hasAttribute("jsbarcode-"+l.toLowerCase())&&(u[l]=c.getAttribute("jsbarcode-"+l.toLowerCase())),c.hasAttribute("data-"+l.toLowerCase())&&(u[l]=c.getAttribute("data-"+l.toLowerCase())));return u.value=c.getAttribute("jsbarcode-value")||c.getAttribute("data-value"),u=(0,t.default)(u),u}return xo.default=s,xo}var Eo={},So={},Le={},kf;function iy(){if(kf)return Le;kf=1,Object.defineProperty(Le,"__esModule",{value:!0}),Le.getTotalWidthOfEncodings=Le.calculateEncodingAttributes=Le.getBarcodePadding=Le.getEncodingHeight=Le.getMaximumHeightOfEncodings=void 0;var e=Vi(),t=n(e);function n(i){return i&&i.__esModule?i:{default:i}}function r(i,a){return a.height+(a.displayValue&&i.text.length>0?a.fontSize+a.textMargin:0)+a.marginTop+a.marginBottom}function o(i,a,f){if(f.displayValue&&a<i){if(f.textAlign=="center")return Math.floor((i-a)/2);if(f.textAlign=="left")return 0;if(f.textAlign=="right")return Math.floor(i-a)}return 0}function s(i,a,f){for(var d=0;d<i.length;d++){var h=i[d],m=(0,t.default)(a,h.options),p;m.displayValue?p=l(h.text,m,f):p=0;var v=h.data.length*m.width;h.width=Math.ceil(Math.max(p,v)),h.height=r(h,m),h.barcodePadding=o(p,v,m)}}function c(i){for(var a=0,f=0;f<i.length;f++)a+=i[f].width;return a}function u(i){for(var a=0,f=0;f<i.length;f++)i[f].height>a&&(a=i[f].height);return a}function l(i,a,f){var d;if(f)d=f;else if(typeof document<"u")d=document.createElement("canvas").getContext("2d");else return 0;d.font=a.fontOptions+" "+a.fontSize+"px "+a.font;var h=d.measureText(i);if(!h)return 0;var m=h.width;return m}return Le.getMaximumHeightOfEncodings=u,Le.getEncodingHeight=r,Le.getBarcodePadding=o,Le.calculateEncodingAttributes=s,Le.getTotalWidthOfEncodings=c,Le}var Lf;function iM(){if(Lf)return So;Lf=1,Object.defineProperty(So,"__esModule",{value:!0});var e=(function(){function u(l,i){for(var a=0;a<i.length;a++){var f=i[a];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(l,f.key,f)}}return function(l,i,a){return i&&u(l.prototype,i),a&&u(l,a),l}})(),t=Vi(),n=o(t),r=iy();function o(u){return u&&u.__esModule?u:{default:u}}function s(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}var c=(function(){function u(l,i,a){s(this,u),this.canvas=l,this.encodings=i,this.options=a}return e(u,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var i=0;i<this.encodings.length;i++){var a=(0,n.default)(this.options,this.encodings[i].options);this.drawCanvasBarcode(a,this.encodings[i]),this.drawCanvasText(a,this.encodings[i]),this.moveCanvasDrawing(this.encodings[i])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var i=this.canvas.getContext("2d");i.save(),(0,r.calculateEncodingAttributes)(this.encodings,this.options,i);var a=(0,r.getTotalWidthOfEncodings)(this.encodings),f=(0,r.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=a+this.options.marginLeft+this.options.marginRight,this.canvas.height=f,i.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(i.fillStyle=this.options.background,i.fillRect(0,0,this.canvas.width,this.canvas.height)),i.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(i,a){var f=this.canvas.getContext("2d"),d=a.data,h;i.textPosition=="top"?h=i.marginTop+i.fontSize+i.textMargin:h=i.marginTop,f.fillStyle=i.lineColor;for(var m=0;m<d.length;m++){var p=m*i.width+a.barcodePadding;d[m]==="1"?f.fillRect(p,h,i.width,i.height):d[m]&&f.fillRect(p,h,i.width,i.height*d[m])}}},{key:"drawCanvasText",value:function(i,a){var f=this.canvas.getContext("2d"),d=i.fontOptions+" "+i.fontSize+"px "+i.font;if(i.displayValue){var h,m;i.textPosition=="top"?m=i.marginTop+i.fontSize-i.textMargin:m=i.height+i.textMargin+i.marginTop+i.fontSize,f.font=d,i.textAlign=="left"||a.barcodePadding>0?(h=0,f.textAlign="left"):i.textAlign=="right"?(h=a.width-1,f.textAlign="right"):(h=a.width/2,f.textAlign="center"),f.fillText(a.text,h,m)}}},{key:"moveCanvasDrawing",value:function(i){var a=this.canvas.getContext("2d");a.translate(i.width,0)}},{key:"restoreCanvas",value:function(){var i=this.canvas.getContext("2d");i.restore()}}]),u})();return So.default=c,So}var Co={},Ff;function sM(){if(Ff)return Co;Ff=1,Object.defineProperty(Co,"__esModule",{value:!0});var e=(function(){function l(i,a){for(var f=0;f<a.length;f++){var d=a[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(i,d.key,d)}}return function(i,a,f){return a&&l(i.prototype,a),f&&l(i,f),i}})(),t=Vi(),n=o(t),r=iy();function o(l){return l&&l.__esModule?l:{default:l}}function s(l,i){if(!(l instanceof i))throw new TypeError("Cannot call a class as a function")}var c="http://www.w3.org/2000/svg",u=(function(){function l(i,a,f){s(this,l),this.svg=i,this.encodings=a,this.options=f,this.document=f.xmlDocument||document}return e(l,[{key:"render",value:function(){var a=this.options.marginLeft;this.prepareSVG();for(var f=0;f<this.encodings.length;f++){var d=this.encodings[f],h=(0,n.default)(this.options,d.options),m=this.createGroup(a,h.marginTop,this.svg);this.setGroupOptions(m,h),this.drawSvgBarcode(m,h,d),this.drawSVGText(m,h,d),a+=d.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,r.calculateEncodingAttributes)(this.encodings,this.options);var a=(0,r.getTotalWidthOfEncodings)(this.encodings),f=(0,r.getMaximumHeightOfEncodings)(this.encodings),d=a+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(d,f),this.options.background&&this.drawRect(0,0,d,f,this.svg).setAttribute("fill",this.options.background)}},{key:"drawSvgBarcode",value:function(a,f,d){var h=d.data,m;f.textPosition=="top"?m=f.fontSize+f.textMargin:m=0;for(var p=0,v=0,x=0;x<h.length;x++)v=x*f.width+d.barcodePadding,h[x]==="1"?p++:p>0&&(this.drawRect(v-f.width*p,m,f.width*p,f.height,a),p=0);p>0&&this.drawRect(v-f.width*(p-1),m,f.width*p,f.height,a)}},{key:"drawSVGText",value:function(a,f,d){var h=this.document.createElementNS(c,"text");if(f.displayValue){var m,p;h.setAttribute("font-family",f.font),h.setAttribute("font-size",f.fontSize),f.fontOptions.includes("bold")&&h.setAttribute("font-weight","bold"),f.fontOptions.includes("italic")&&h.setAttribute("font-style","italic"),f.textPosition=="top"?p=f.fontSize-f.textMargin:p=f.height+f.textMargin+f.fontSize,f.textAlign=="left"||d.barcodePadding>0?(m=0,h.setAttribute("text-anchor","start")):f.textAlign=="right"?(m=d.width-1,h.setAttribute("text-anchor","end")):(m=d.width/2,h.setAttribute("text-anchor","middle")),h.setAttribute("x",m),h.setAttribute("y",p),h.appendChild(this.document.createTextNode(d.text)),a.appendChild(h)}}},{key:"setSvgAttributes",value:function(a,f){var d=this.svg;d.setAttribute("width",a+"px"),d.setAttribute("height",f+"px"),d.setAttribute("x","0px"),d.setAttribute("y","0px"),d.setAttribute("viewBox","0 0 "+a+" "+f),d.setAttribute("xmlns",c),d.setAttribute("version","1.1")}},{key:"createGroup",value:function(a,f,d){var h=this.document.createElementNS(c,"g");return h.setAttribute("transform","translate("+a+", "+f+")"),d.appendChild(h),h}},{key:"setGroupOptions",value:function(a,f){a.setAttribute("fill",f.lineColor)}},{key:"drawRect",value:function(a,f,d,h,m){var p=this.document.createElementNS(c,"rect");return p.setAttribute("x",a),p.setAttribute("y",f),p.setAttribute("width",d),p.setAttribute("height",h),m.appendChild(p),p}}]),l})();return Co.default=u,Co}var _o={},Vf;function aM(){if(Vf)return _o;Vf=1,Object.defineProperty(_o,"__esModule",{value:!0});var e=(function(){function r(o,s){for(var c=0;c<s.length;c++){var u=s[c];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(o,u.key,u)}}return function(o,s,c){return s&&r(o.prototype,s),c&&r(o,c),o}})();function t(r,o){if(!(r instanceof o))throw new TypeError("Cannot call a class as a function")}var n=(function(){function r(o,s,c){t(this,r),this.object=o,this.encodings=s,this.options=c}return e(r,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),r})();return _o.default=n,_o}var Bf;function cM(){if(Bf)return Eo;Bf=1,Object.defineProperty(Eo,"__esModule",{value:!0});var e=iM(),t=c(e),n=sM(),r=c(n),o=aM(),s=c(o);function c(u){return u&&u.__esModule?u:{default:u}}return Eo.default={CanvasRenderer:t.default,SVGRenderer:r.default,ObjectRenderer:s.default},Eo}var nn={},$f;function sy(){if($f)return nn;$f=1,Object.defineProperty(nn,"__esModule",{value:!0});function e(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function t(c,u){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u&&(typeof u=="object"||typeof u=="function")?u:c}function n(c,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof u);c.prototype=Object.create(u&&u.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(c,u):c.__proto__=u)}var r=(function(c){n(u,c);function u(l,i){e(this,u);var a=t(this,(u.__proto__||Object.getPrototypeOf(u)).call(this));return a.name="InvalidInputException",a.symbology=l,a.input=i,a.message='"'+a.input+'" is not a valid input for '+a.symbology,a}return u})(Error),o=(function(c){n(u,c);function u(){e(this,u);var l=t(this,(u.__proto__||Object.getPrototypeOf(u)).call(this));return l.name="InvalidElementException",l.message="Not supported type to render on",l}return u})(Error),s=(function(c){n(u,c);function u(){e(this,u);var l=t(this,(u.__proto__||Object.getPrototypeOf(u)).call(this));return l.name="NoElementException",l.message="No element to render on.",l}return u})(Error);return nn.InvalidInputException=r,nn.InvalidElementException=o,nn.NoElementException=s,nn}var Uf;function lM(){if(Uf)return yo;Uf=1,Object.defineProperty(yo,"__esModule",{value:!0});var e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},t=oM(),n=c(t),r=cM(),o=c(r),s=sy();function c(a){return a&&a.__esModule?a:{default:a}}function u(a){if(typeof a=="string")return l(a);if(Array.isArray(a)){for(var f=[],d=0;d<a.length;d++)f.push(u(a[d]));return f}else{if(typeof HTMLCanvasElement<"u"&&a instanceof HTMLImageElement)return i(a);if(a&&a.nodeName&&a.nodeName.toLowerCase()==="svg"||typeof SVGElement<"u"&&a instanceof SVGElement)return{element:a,options:(0,n.default)(a),renderer:o.default.SVGRenderer};if(typeof HTMLCanvasElement<"u"&&a instanceof HTMLCanvasElement)return{element:a,options:(0,n.default)(a),renderer:o.default.CanvasRenderer};if(a&&a.getContext)return{element:a,renderer:o.default.CanvasRenderer};if(a&&(typeof a>"u"?"undefined":e(a))==="object"&&!a.nodeName)return{element:a,renderer:o.default.ObjectRenderer};throw new s.InvalidElementException}}function l(a){var f=document.querySelectorAll(a);if(f.length!==0){for(var d=[],h=0;h<f.length;h++)d.push(u(f[h]));return d}}function i(a){var f=document.createElement("canvas");return{element:f,options:(0,n.default)(a),renderer:o.default.CanvasRenderer,afterRender:function(){a.setAttribute("src",f.toDataURL())}}}return yo.default=u,yo}var Ro={},Gf;function uM(){if(Gf)return Ro;Gf=1,Object.defineProperty(Ro,"__esModule",{value:!0});var e=(function(){function r(o,s){for(var c=0;c<s.length;c++){var u=s[c];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(o,u.key,u)}}return function(o,s,c){return s&&r(o.prototype,s),c&&r(o,c),o}})();function t(r,o){if(!(r instanceof o))throw new TypeError("Cannot call a class as a function")}var n=(function(){function r(o){t(this,r),this.api=o}return e(r,[{key:"handleCatch",value:function(s){if(s.name==="InvalidInputException")if(this.api._options.valid!==this.api._defaults.valid)this.api._options.valid(!1);else throw s.message;else throw s;this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(s){try{var c=s.apply(void 0,arguments);return this.api._options.valid(!0),c}catch(u){return this.handleCatch(u),this.api}}}]),r})();return Ro.default=n,Ro}var gs,Hf;function fM(){if(Hf)return gs;Hf=1;var e=tM(),t=x(e),n=Vi(),r=x(n),o=nM(),s=x(o),c=rM(),u=x(c),l=lM(),i=x(l),a=ry(),f=x(a),d=uM(),h=x(d),m=sy(),p=oy(),v=x(p);function x(O){return O&&O.__esModule?O:{default:O}}var b=function(){},w=function(R,I,D){var F=new b;if(typeof R>"u")throw Error("No element to render on was provided.");return F._renderProperties=(0,i.default)(R),F._encodings=[],F._options=v.default,F._errorHandler=new h.default(F),typeof I<"u"&&(D=D||{},D.format||(D.format=P()),F.options(D)[D.format](I,D).render()),F};w.getModule=function(O){return t.default[O]};for(var E in t.default)t.default.hasOwnProperty(E)&&S(t.default,E);function S(O,R){b.prototype[R]=b.prototype[R.toUpperCase()]=b.prototype[R.toLowerCase()]=function(I,D){var F=this;return F._errorHandler.wrapBarcodeCall(function(){D.text=typeof D.text>"u"?void 0:""+D.text;var B=(0,r.default)(F._options,D);B=(0,f.default)(B);var q=O[R],G=T(I,q,B);return F._encodings.push(G),F})}}function T(O,R,I){O=""+O;var D=new R(O,I);if(!D.valid())throw new m.InvalidInputException(D.constructor.name,O);var F=D.encode();F=(0,s.default)(F);for(var B=0;B<F.length;B++)F[B].options=(0,r.default)(I,F[B].options);return F}function P(){return t.default.CODE128?"CODE128":Object.keys(t.default)[0]}b.prototype.options=function(O){return this._options=(0,r.default)(this._options,O),this},b.prototype.blank=function(O){var R=new Array(O+1).join("0");return this._encodings.push({data:R}),this},b.prototype.init=function(){if(this._renderProperties){Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]);var O;for(var R in this._renderProperties){O=this._renderProperties[R];var I=(0,r.default)(this._options,O.options);I.format=="auto"&&(I.format=P()),this._errorHandler.wrapBarcodeCall(function(){var D=I.value,F=t.default[I.format.toUpperCase()],B=T(D,F,I);A(O,B,I)})}}},b.prototype.render=function(){if(!this._renderProperties)throw new m.NoElementException;if(Array.isArray(this._renderProperties))for(var O=0;O<this._renderProperties.length;O++)A(this._renderProperties[O],this._encodings,this._options);else A(this._renderProperties,this._encodings,this._options);return this},b.prototype._defaults=v.default;function A(O,R,I){R=(0,s.default)(R);for(var D=0;D<R.length;D++)R[D].options=(0,r.default)(I,R[D].options),(0,u.default)(R[D].options);(0,u.default)(I);var F=O.renderer,B=new F(O.element,R,I);B.render(),O.afterRender&&O.afterRender()}return typeof window<"u"&&(window.JsBarcode=w),typeof jQuery<"u"&&(jQuery.fn.JsBarcode=function(O,R){var I=[];return jQuery(this).each(function(){I.push(this)}),w(I,O,R)}),gs=w,gs}var To={exports:{}},Po={exports:{}},ue={};/** @license React v16.13.1
121
+ */var FO={L:fn.QrCode.Ecc.LOW,M:fn.QrCode.Ecc.MEDIUM,Q:fn.QrCode.Ecc.QUARTILE,H:fn.QrCode.Ecc.HIGH},oy=128,iy="L",sy="#FFFFFF",ay="#000000",cy=!1,ly=1,VO=4,BO=0,$O=.1;function uy(e,t=0){const n=[];return e.forEach(function(r,o){let i=null;r.forEach(function(c,u){if(!c&&i!==null){n.push(`M${i+t} ${o+t}h${u-i}v1H${i+t}z`),i=null;return}if(u===r.length-1){if(!c)return;i===null?n.push(`M${u+t},${o+t} h1v1H${u+t}z`):n.push(`M${i+t},${o+t} h${u+1-i}v1H${i+t}z`);return}c&&i===null&&(i=u)})}),n.join("")}function fy(e,t){return e.slice().map((n,r)=>r<t.y||r>=t.y+t.h?n:n.map((o,i)=>i<t.x||i>=t.x+t.w?o:!1))}function UO(e,t,n,r){if(r==null)return null;const o=e.length+n*2,i=Math.floor(t*$O),c=o/t,u=(r.width||i)*c,l=(r.height||i)*c,s=r.x==null?e.length/2-u/2:r.x*c,a=r.y==null?e.length/2-l/2:r.y*c,f=r.opacity==null?1:r.opacity;let d=null;if(r.excavate){let m=Math.floor(s),p=Math.floor(a),v=Math.ceil(u+s-m),x=Math.ceil(l+a-p);d={x:m,y:p,w:v,h:x}}const h=r.crossOrigin;return{x:s,y:a,h:l,w:u,excavation:d,opacity:f,crossOrigin:h}}function GO(e,t){return t!=null?Math.max(Math.floor(t),0):e?VO:BO}function dy({value:e,level:t,minVersion:n,includeMargin:r,marginSize:o,imageSettings:i,size:c,boostLevel:u}){let l=_.useMemo(()=>{const m=(Array.isArray(e)?e:[e]).reduce((p,v)=>(p.push(...fn.QrSegment.makeSegments(v)),p),[]);return fn.QrCode.encodeSegments(m,FO[t],n,void 0,void 0,u)},[e,t,n,u]);const{cells:s,margin:a,numCells:f,calculatedImageSettings:d}=_.useMemo(()=>{let h=l.getModules();const m=GO(r,o),p=h.length+m*2,v=UO(h,c,m,i);return{cells:h,margin:m,numCells:p,calculatedImageSettings:v}},[l,c,i,r,o]);return{qrcode:l,margin:a,cells:s,numCells:f,calculatedImageSettings:d}}var HO=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),zO=_.forwardRef(function(t,n){const r=t,{value:o,size:i=oy,level:c=iy,bgColor:u=sy,fgColor:l=ay,includeMargin:s=cy,minVersion:a=ly,boostLevel:f,marginSize:d,imageSettings:h}=r,p=ya(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:v}=p,x=ya(p,["style"]),b=h==null?void 0:h.src,w=_.useRef(null),S=_.useRef(null),E=_.useCallback($=>{w.current=$,typeof n=="function"?n($):n&&(n.current=$)},[n]),[A,R]=_.useState(!1),{margin:T,cells:I,numCells:P,calculatedImageSettings:M}=dy({value:o,level:c,minVersion:a,boostLevel:f,includeMargin:s,marginSize:d,imageSettings:h,size:i});_.useEffect(()=>{if(w.current!=null){const $=w.current,K=$.getContext("2d");if(!K)return;let G=I;const H=S.current,U=M!=null&&H!==null&&H.complete&&H.naturalHeight!==0&&H.naturalWidth!==0;U&&M.excavation!=null&&(G=fy(I,M.excavation));const L=window.devicePixelRatio||1;$.height=$.width=i*L;const O=i/P*L;K.scale(O,O),K.fillStyle=u,K.fillRect(0,0,P,P),K.fillStyle=l,HO?K.fill(new Path2D(uy(G,T))):I.forEach(function(k,ee){k.forEach(function(ne,X){ne&&K.fillRect(X+T,ee+T,1,1)})}),M&&(K.globalAlpha=M.opacity),U&&K.drawImage(H,M.x+T,M.y+T,M.w,M.h)}}),_.useEffect(()=>{R(!1)},[b]);const j=va({height:i,width:i},v);let V=null;return b!=null&&(V=_.createElement("img",{src:b,key:b,style:{display:"none"},onLoad:()=>{R(!0)},ref:S,crossOrigin:M==null?void 0:M.crossOrigin})),_.createElement(_.Fragment,null,_.createElement("canvas",va({style:j,height:i,width:i,ref:E,role:"img"},x)),V)});zO.displayName="QRCodeCanvas";var hy=_.forwardRef(function(t,n){const r=t,{value:o,size:i=oy,level:c=iy,bgColor:u=sy,fgColor:l=ay,includeMargin:s=cy,minVersion:a=ly,boostLevel:f,title:d,marginSize:h,imageSettings:m}=r,p=ya(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:v,cells:x,numCells:b,calculatedImageSettings:w}=dy({value:o,level:c,minVersion:a,boostLevel:f,includeMargin:s,marginSize:h,imageSettings:m,size:i});let S=x,E=null;m!=null&&w!=null&&(w.excavation!=null&&(S=fy(x,w.excavation)),E=_.createElement("image",{href:m.src,height:w.h,width:w.w,x:w.x+v,y:w.y+v,preserveAspectRatio:"none",opacity:w.opacity,crossOrigin:w.crossOrigin}));const A=uy(S,v);return _.createElement("svg",va({height:i,width:i,viewBox:`0 0 ${b} ${b}`,ref:n,role:"img"},p),!!d&&_.createElement("title",null,d),_.createElement("path",{fill:u,d:`M0,0 h${b}v${b}H0z`,shapeRendering:"crispEdges"}),_.createElement("path",{fill:l,d:A,shapeRendering:"crispEdges"}),E)});hy.displayName="QRCodeSVG";const WO=e=>{const{value:t,className:n="",size:r=200,bgColor:o="#FFFFFF",fgColor:i="#000000",level:c="M",marginSize:u=4,imageSettings:l,...s}=e,a=N.classNames("flex items-center justify-center",n);return g.jsx("div",{className:a,...s,children:g.jsx(hy,{value:t,size:r,bgColor:o,fgColor:i,level:c,marginSize:u,imageSettings:l})})};var Wr={},kn={},qr={},Xu;function Be(){if(Xu)return qr;Xu=1,Object.defineProperty(qr,"__esModule",{value:!0});function e(n,r){if(!(n instanceof r))throw new TypeError("Cannot call a class as a function")}var t=function n(r,o){e(this,n),this.data=r,this.text=o.text||r,this.options=o};return qr.default=t,qr}var Zu;function qO(){if(Zu)return kn;Zu=1,Object.defineProperty(kn,"__esModule",{value:!0}),kn.CODE39=void 0;var e=(function(){function p(v,x){for(var b=0;b<x.length;b++){var w=x[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(v,w.key,w)}}return function(v,x,b){return x&&p(v.prototype,x),b&&p(v,b),v}})(),t=Be(),n=r(t);function r(p){return p&&p.__esModule?p:{default:p}}function o(p,v){if(!(p instanceof v))throw new TypeError("Cannot call a class as a function")}function i(p,v){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:p}function c(p,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);p.prototype=Object.create(v&&v.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(p,v):p.__proto__=v)}var u=(function(p){c(v,p);function v(x,b){return o(this,v),x=x.toUpperCase(),b.mod43&&(x+=d(m(x))),i(this,(v.__proto__||Object.getPrototypeOf(v)).call(this,x,b))}return e(v,[{key:"encode",value:function(){for(var b=a("*"),w=0;w<this.data.length;w++)b+=a(this.data[w])+"0";return b+=a("*"),{data:b,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)!==-1}}]),v})(n.default),l=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","*"],s=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770];function a(p){return f(h(p))}function f(p){return s[p].toString(2)}function d(p){return l[p]}function h(p){return l.indexOf(p)}function m(p){for(var v=0,x=0;x<p.length;x++)v+=h(p[x]);return v=v%43,v}return kn.CODE39=u,kn}var Ke={},Kr={},Yr={},ye={},Qu;function Rr(){if(Qu)return ye;Qu=1,Object.defineProperty(ye,"__esModule",{value:!0});var e;function t(l,s,a){return s in l?Object.defineProperty(l,s,{value:a,enumerable:!0,configurable:!0,writable:!0}):l[s]=a,l}var n=ye.SET_A=0,r=ye.SET_B=1,o=ye.SET_C=2;ye.SHIFT=98;var i=ye.START_A=103,c=ye.START_B=104,u=ye.START_C=105;return ye.MODULO=103,ye.STOP=106,ye.FNC1=207,ye.SET_BY_CODE=(e={},t(e,i,n),t(e,c,r),t(e,u,o),e),ye.SWAP={101:n,100:r,99:o},ye.A_START_CHAR="Ð",ye.B_START_CHAR="Ñ",ye.C_START_CHAR="Ò",ye.A_CHARS="[\0-_È-Ï]",ye.B_CHARS="[ -È-Ï]",ye.C_CHARS="(Ï*[0-9]{2}Ï*)",ye.BARS=[11011001100,11001101100,11001100110,10010011e3,10010001100,10001001100,10011001e3,10011000100,10001100100,11001001e3,11001000100,11000100100,10110011100,10011011100,10011001110,10111001100,10011101100,10011100110,11001110010,11001011100,11001001110,11011100100,11001110100,11101101110,11101001100,11100101100,11100100110,11101100100,11100110100,11100110010,11011011e3,11011000110,11000110110,10100011e3,10001011e3,10001000110,10110001e3,10001101e3,10001100010,11010001e3,11000101e3,11000100010,10110111e3,10110001110,10001101110,10111011e3,10111000110,10001110110,11101110110,11010001110,11000101110,11011101e3,11011100010,11011101110,11101011e3,11101000110,11100010110,11101101e3,11101100010,11100011010,11101111010,11001000010,11110001010,1010011e4,10100001100,1001011e4,10010000110,10000101100,10000100110,1011001e4,10110000100,1001101e4,10011000010,10000110100,10000110010,11000010010,1100101e4,11110111010,11000010100,10001111010,10100111100,10010111100,10010011110,10111100100,10011110100,10011110010,11110100100,11110010100,11110010010,11011011110,11011110110,11110110110,10101111e3,10100011110,10001011110,10111101e3,10111100010,11110101e3,11110100010,10111011110,10111101110,11101011110,11110101110,11010000100,1101001e4,11010011100,1100011101011],ye}var Ju;function Vi(){if(Ju)return Yr;Ju=1,Object.defineProperty(Yr,"__esModule",{value:!0});var e=(function(){function s(a,f){for(var d=0;d<f.length;d++){var h=f[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(a,h.key,h)}}return function(a,f,d){return f&&s(a.prototype,f),d&&s(a,d),a}})(),t=Be(),n=o(t),r=Rr();function o(s){return s&&s.__esModule?s:{default:s}}function i(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function c(s,a){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:s}function u(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(s,a):s.__proto__=a)}var l=(function(s){u(a,s);function a(f,d){i(this,a);var h=c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,f.substring(1),d));return h.bytes=f.split("").map(function(m){return m.charCodeAt(0)}),h}return e(a,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var d=this.bytes,h=d.shift()-105,m=r.SET_BY_CODE[h];if(m===void 0)throw new RangeError("The encoding does not start with a start character.");this.shouldEncodeAsEan128()===!0&&d.unshift(r.FNC1);var p=a.next(d,1,m);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:a.getBar(h)+p.result+a.getBar((p.checksum+h)%r.MODULO)+a.getBar(r.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var d=this.options.ean128||!1;return typeof d=="string"&&(d=d.toLowerCase()==="true"),d}}],[{key:"getBar",value:function(d){return r.BARS[d]?r.BARS[d].toString():""}},{key:"correctIndex",value:function(d,h){if(h===r.SET_A){var m=d.shift();return m<32?m+64:m-32}else return h===r.SET_B?d.shift()-32:(d.shift()-48)*10+d.shift()-48}},{key:"next",value:function(d,h,m){if(!d.length)return{result:"",checksum:0};var p=void 0,v=void 0;if(d[0]>=200){v=d.shift()-105;var x=r.SWAP[v];x!==void 0?p=a.next(d,h+1,x):((m===r.SET_A||m===r.SET_B)&&v===r.SHIFT&&(d[0]=m===r.SET_A?d[0]>95?d[0]-96:d[0]:d[0]<32?d[0]+96:d[0]),p=a.next(d,h+1,m))}else v=a.correctIndex(d,m),p=a.next(d,h+1,m);var b=a.getBar(v),w=v*h;return{result:b+p.result,checksum:w+p.checksum}}}]),a})(n.default);return Yr.default=l,Yr}var Xr={},ef;function KO(){if(ef)return Xr;ef=1,Object.defineProperty(Xr,"__esModule",{value:!0});var e=Rr(),t=function(u){return u.match(new RegExp("^"+e.A_CHARS+"*"))[0].length},n=function(u){return u.match(new RegExp("^"+e.B_CHARS+"*"))[0].length},r=function(u){return u.match(new RegExp("^"+e.C_CHARS+"*"))[0]};function o(c,u){var l=u?e.A_CHARS:e.B_CHARS,s=c.match(new RegExp("^("+l+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(s)return s[1]+"Ì"+i(c.substring(s[1].length));var a=c.match(new RegExp("^"+l+"+"))[0];return a.length===c.length?c:a+String.fromCharCode(u?205:206)+o(c.substring(a.length),!u)}function i(c){var u=r(c),l=u.length;if(l===c.length)return c;c=c.substring(l);var s=t(c)>=n(c);return u+String.fromCharCode(s?206:205)+o(c,s)}return Xr.default=function(c){var u=void 0,l=r(c).length;if(l>=2)u=e.C_START_CHAR+i(c);else{var s=t(c)>n(c);u=(s?e.A_START_CHAR:e.B_START_CHAR)+o(c,s)}return u.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(a,f){return"Ë"+f})},Xr}var tf;function YO(){if(tf)return Kr;tf=1,Object.defineProperty(Kr,"__esModule",{value:!0});var e=Vi(),t=o(e),n=KO(),r=o(n);function o(s){return s&&s.__esModule?s:{default:s}}function i(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function c(s,a){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:s}function u(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(s,a):s.__proto__=a)}var l=(function(s){u(a,s);function a(f,d){if(i(this,a),/^[\x00-\x7F\xC8-\xD3]+$/.test(f))var h=c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,(0,r.default)(f),d));else var h=c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,f,d));return c(h)}return a})(t.default);return Kr.default=l,Kr}var Zr={},nf;function XO(){if(nf)return Zr;nf=1,Object.defineProperty(Zr,"__esModule",{value:!0});var e=(function(){function s(a,f){for(var d=0;d<f.length;d++){var h=f[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(a,h.key,h)}}return function(a,f,d){return f&&s(a.prototype,f),d&&s(a,d),a}})(),t=Vi(),n=o(t),r=Rr();function o(s){return s&&s.__esModule?s:{default:s}}function i(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function c(s,a){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:s}function u(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(s,a):s.__proto__=a)}var l=(function(s){u(a,s);function a(f,d){return i(this,a),c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,r.A_START_CHAR+f,d))}return e(a,[{key:"valid",value:function(){return new RegExp("^"+r.A_CHARS+"+$").test(this.data)}}]),a})(n.default);return Zr.default=l,Zr}var Qr={},rf;function ZO(){if(rf)return Qr;rf=1,Object.defineProperty(Qr,"__esModule",{value:!0});var e=(function(){function s(a,f){for(var d=0;d<f.length;d++){var h=f[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(a,h.key,h)}}return function(a,f,d){return f&&s(a.prototype,f),d&&s(a,d),a}})(),t=Vi(),n=o(t),r=Rr();function o(s){return s&&s.__esModule?s:{default:s}}function i(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function c(s,a){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:s}function u(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(s,a):s.__proto__=a)}var l=(function(s){u(a,s);function a(f,d){return i(this,a),c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,r.B_START_CHAR+f,d))}return e(a,[{key:"valid",value:function(){return new RegExp("^"+r.B_CHARS+"+$").test(this.data)}}]),a})(n.default);return Qr.default=l,Qr}var Jr={},of;function QO(){if(of)return Jr;of=1,Object.defineProperty(Jr,"__esModule",{value:!0});var e=(function(){function s(a,f){for(var d=0;d<f.length;d++){var h=f[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(a,h.key,h)}}return function(a,f,d){return f&&s(a.prototype,f),d&&s(a,d),a}})(),t=Vi(),n=o(t),r=Rr();function o(s){return s&&s.__esModule?s:{default:s}}function i(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function c(s,a){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:s}function u(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(s,a):s.__proto__=a)}var l=(function(s){u(a,s);function a(f,d){return i(this,a),c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,r.C_START_CHAR+f,d))}return e(a,[{key:"valid",value:function(){return new RegExp("^"+r.C_CHARS+"+$").test(this.data)}}]),a})(n.default);return Jr.default=l,Jr}var sf;function JO(){if(sf)return Ke;sf=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.CODE128C=Ke.CODE128B=Ke.CODE128A=Ke.CODE128=void 0;var e=YO(),t=l(e),n=XO(),r=l(n),o=ZO(),i=l(o),c=QO(),u=l(c);function l(s){return s&&s.__esModule?s:{default:s}}return Ke.CODE128=t.default,Ke.CODE128A=r.default,Ke.CODE128B=i.default,Ke.CODE128C=u.default,Ke}var Oe={},eo={},dt={},af;function Tr(){return af||(af=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.SIDE_BIN="101",dt.MIDDLE_BIN="01010",dt.BINARIES={L:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],G:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],R:["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"],O:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],E:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"]},dt.EAN2_STRUCTURE=["LL","LG","GL","GG"],dt.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],dt.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]),dt}var to={},no={},cf;function Pr(){if(cf)return no;cf=1,Object.defineProperty(no,"__esModule",{value:!0});var e=Tr(),t=function(r,o,i){var c=r.split("").map(function(l,s){return e.BINARIES[o[s]]}).map(function(l,s){return l?l[r[s]]:""});if(i){var u=r.length-1;c=c.map(function(l,s){return s<u?l+i:l})}return c.join("")};return no.default=t,no}var lf;function py(){if(lf)return to;lf=1,Object.defineProperty(to,"__esModule",{value:!0});var e=(function(){function f(d,h){for(var m=0;m<h.length;m++){var p=h[m];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(d,p.key,p)}}return function(d,h,m){return h&&f(d.prototype,h),m&&f(d,m),d}})(),t=Tr(),n=Pr(),r=c(n),o=Be(),i=c(o);function c(f){return f&&f.__esModule?f:{default:f}}function u(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function l(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function s(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var a=(function(f){s(d,f);function d(h,m){u(this,d);var p=l(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,h,m));return p.fontSize=!m.flat&&m.fontSize>m.width*10?m.width*10:m.fontSize,p.guardHeight=m.height+p.fontSize/2+m.textMargin,p}return e(d,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(m,p){return this.text.substr(m,p)}},{key:"leftEncode",value:function(m,p){return(0,r.default)(m,p)}},{key:"rightText",value:function(m,p){return this.text.substr(m,p)}},{key:"rightEncode",value:function(m,p){return(0,r.default)(m,p)}},{key:"encodeGuarded",value:function(){var m={fontSize:this.fontSize},p={height:this.guardHeight};return[{data:t.SIDE_BIN,options:p},{data:this.leftEncode(),text:this.leftText(),options:m},{data:t.MIDDLE_BIN,options:p},{data:this.rightEncode(),text:this.rightText(),options:m},{data:t.SIDE_BIN,options:p}]}},{key:"encodeFlat",value:function(){var m=[t.SIDE_BIN,this.leftEncode(),t.MIDDLE_BIN,this.rightEncode(),t.SIDE_BIN];return{data:m.join(""),text:this.text}}}]),d})(i.default);return to.default=a,to}var uf;function eM(){if(uf)return eo;uf=1,Object.defineProperty(eo,"__esModule",{value:!0});var e=(function(){function f(d,h){for(var m=0;m<h.length;m++){var p=h[m];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(d,p.key,p)}}return function(d,h,m){return h&&f(d.prototype,h),m&&f(d,m),d}})(),t=function f(d,h,m){d===null&&(d=Function.prototype);var p=Object.getOwnPropertyDescriptor(d,h);if(p===void 0){var v=Object.getPrototypeOf(d);return v===null?void 0:f(v,h,m)}else{if("value"in p)return p.value;var x=p.get;return x===void 0?void 0:x.call(m)}},n=Tr(),r=py(),o=i(r);function i(f){return f&&f.__esModule?f:{default:f}}function c(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function u(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function l(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var s=function(d){var h=d.substr(0,12).split("").map(function(m){return+m}).reduce(function(m,p,v){return v%2?m+p*3:m+p},0);return(10-h%10)%10},a=(function(f){l(d,f);function d(h,m){c(this,d),h.search(/^[0-9]{12}$/)!==-1&&(h+=s(h));var p=u(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,h,m));return p.lastChar=m.lastChar,p}return e(d,[{key:"valid",value:function(){return this.data.search(/^[0-9]{13}$/)!==-1&&+this.data[12]===s(this.data)}},{key:"leftText",value:function(){return t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var m=this.data.substr(1,6),p=n.EAN13_STRUCTURE[this.data[0]];return t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"leftEncode",this).call(this,m,p)}},{key:"rightText",value:function(){return t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var m=this.data.substr(7,6);return t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"rightEncode",this).call(this,m,"RRRRRR")}},{key:"encodeGuarded",value:function(){var m=t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(m.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(m.push({data:"00"}),m.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),m}}]),d})(o.default);return eo.default=a,eo}var ro={},ff;function tM(){if(ff)return ro;ff=1,Object.defineProperty(ro,"__esModule",{value:!0});var e=(function(){function a(f,d){for(var h=0;h<d.length;h++){var m=d[h];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(f,m.key,m)}}return function(f,d,h){return d&&a(f.prototype,d),h&&a(f,h),f}})(),t=function a(f,d,h){f===null&&(f=Function.prototype);var m=Object.getOwnPropertyDescriptor(f,d);if(m===void 0){var p=Object.getPrototypeOf(f);return p===null?void 0:a(p,d,h)}else{if("value"in m)return m.value;var v=m.get;return v===void 0?void 0:v.call(h)}},n=py(),r=o(n);function o(a){return a&&a.__esModule?a:{default:a}}function i(a,f){if(!(a instanceof f))throw new TypeError("Cannot call a class as a function")}function c(a,f){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:a}function u(a,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);a.prototype=Object.create(f&&f.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(a,f):a.__proto__=f)}var l=function(f){var d=f.substr(0,7).split("").map(function(h){return+h}).reduce(function(h,m,p){return p%2?h+m:h+m*3},0);return(10-d%10)%10},s=(function(a){u(f,a);function f(d,h){return i(this,f),d.search(/^[0-9]{7}$/)!==-1&&(d+=l(d)),c(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,d,h))}return e(f,[{key:"valid",value:function(){return this.data.search(/^[0-9]{8}$/)!==-1&&+this.data[7]===l(this.data)}},{key:"leftText",value:function(){return t(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var h=this.data.substr(0,4);return t(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"leftEncode",this).call(this,h,"LLLL")}},{key:"rightText",value:function(){return t(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var h=this.data.substr(4,4);return t(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"rightEncode",this).call(this,h,"RRRR")}}]),f})(r.default);return ro.default=s,ro}var oo={},df;function nM(){if(df)return oo;df=1,Object.defineProperty(oo,"__esModule",{value:!0});var e=(function(){function d(h,m){for(var p=0;p<m.length;p++){var v=m[p];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(h,v.key,v)}}return function(h,m,p){return m&&d(h.prototype,m),p&&d(h,p),h}})(),t=Tr(),n=Pr(),r=c(n),o=Be(),i=c(o);function c(d){return d&&d.__esModule?d:{default:d}}function u(d,h){if(!(d instanceof h))throw new TypeError("Cannot call a class as a function")}function l(d,h){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:d}function s(d,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);d.prototype=Object.create(h&&h.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(d,h):d.__proto__=h)}var a=function(h){var m=h.split("").map(function(p){return+p}).reduce(function(p,v,x){return x%2?p+v*9:p+v*3},0);return m%10},f=(function(d){s(h,d);function h(m,p){return u(this,h),l(this,(h.__proto__||Object.getPrototypeOf(h)).call(this,m,p))}return e(h,[{key:"valid",value:function(){return this.data.search(/^[0-9]{5}$/)!==-1}},{key:"encode",value:function(){var p=t.EAN5_STRUCTURE[a(this.data)];return{data:"1011"+(0,r.default)(this.data,p,"01"),text:this.text}}}]),h})(i.default);return oo.default=f,oo}var io={},hf;function rM(){if(hf)return io;hf=1,Object.defineProperty(io,"__esModule",{value:!0});var e=(function(){function f(d,h){for(var m=0;m<h.length;m++){var p=h[m];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(d,p.key,p)}}return function(d,h,m){return h&&f(d.prototype,h),m&&f(d,m),d}})(),t=Tr(),n=Pr(),r=c(n),o=Be(),i=c(o);function c(f){return f&&f.__esModule?f:{default:f}}function u(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function l(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function s(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var a=(function(f){s(d,f);function d(h,m){return u(this,d),l(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,h,m))}return e(d,[{key:"valid",value:function(){return this.data.search(/^[0-9]{2}$/)!==-1}},{key:"encode",value:function(){var m=t.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,r.default)(this.data,m,"01"),text:this.text}}}]),d})(i.default);return io.default=a,io}var Ln={},pf;function my(){if(pf)return Ln;pf=1,Object.defineProperty(Ln,"__esModule",{value:!0});var e=(function(){function f(d,h){for(var m=0;m<h.length;m++){var p=h[m];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(d,p.key,p)}}return function(d,h,m){return h&&f(d.prototype,h),m&&f(d,m),d}})();Ln.checksum=a;var t=Pr(),n=i(t),r=Be(),o=i(r);function i(f){return f&&f.__esModule?f:{default:f}}function c(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function u(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function l(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var s=(function(f){l(d,f);function d(h,m){c(this,d),h.search(/^[0-9]{11}$/)!==-1&&(h+=a(h));var p=u(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,h,m));return p.displayValue=m.displayValue,m.fontSize>m.width*10?p.fontSize=m.width*10:p.fontSize=m.fontSize,p.guardHeight=m.height+p.fontSize/2+m.textMargin,p}return e(d,[{key:"valid",value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==a(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var m="";return m+="101",m+=(0,n.default)(this.data.substr(0,6),"LLLLLL"),m+="01010",m+=(0,n.default)(this.data.substr(6,6),"RRRRRR"),m+="101",{data:m,text:this.text}}},{key:"guardedEncoding",value:function(){var m=[];return this.displayValue&&m.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),m.push({data:"101"+(0,n.default)(this.data[0],"L"),options:{height:this.guardHeight}}),m.push({data:(0,n.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),m.push({data:"01010",options:{height:this.guardHeight}}),m.push({data:(0,n.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),m.push({data:(0,n.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&m.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),m}}]),d})(o.default);function a(f){var d=0,h;for(h=1;h<11;h+=2)d+=parseInt(f[h]);for(h=0;h<11;h+=2)d+=parseInt(f[h])*3;return(10-d%10)%10}return Ln.default=s,Ln}var so={},mf;function oM(){if(mf)return so;mf=1,Object.defineProperty(so,"__esModule",{value:!0});var e=(function(){function m(p,v){for(var x=0;x<v.length;x++){var b=v[x];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(p,b.key,b)}}return function(p,v,x){return v&&m(p.prototype,v),x&&m(p,x),p}})(),t=Pr(),n=c(t),r=Be(),o=c(r),i=my();function c(m){return m&&m.__esModule?m:{default:m}}function u(m,p){if(!(m instanceof p))throw new TypeError("Cannot call a class as a function")}function l(m,p){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:m}function s(m,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);m.prototype=Object.create(p&&p.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(m,p):m.__proto__=p)}var a=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],f=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],d=(function(m){s(p,m);function p(v,x){u(this,p);var b=l(this,(p.__proto__||Object.getPrototypeOf(p)).call(this,v,x));if(b.isValid=!1,v.search(/^[0-9]{6}$/)!==-1)b.middleDigits=v,b.upcA=h(v,"0"),b.text=x.text||""+b.upcA[0]+v+b.upcA[b.upcA.length-1],b.isValid=!0;else if(v.search(/^[01][0-9]{7}$/)!==-1)if(b.middleDigits=v.substring(1,v.length-1),b.upcA=h(b.middleDigits,v[0]),b.upcA[b.upcA.length-1]===v[v.length-1])b.isValid=!0;else return l(b);else return l(b);return b.displayValue=x.displayValue,x.fontSize>x.width*10?b.fontSize=x.width*10:b.fontSize=x.fontSize,b.guardHeight=x.height+b.fontSize/2+x.textMargin,b}return e(p,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var x="";return x+="101",x+=this.encodeMiddleDigits(),x+="010101",{data:x,text:this.text}}},{key:"guardedEncoding",value:function(){var x=[];return this.displayValue&&x.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),x.push({data:"101",options:{height:this.guardHeight}}),x.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),x.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&x.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),x}},{key:"encodeMiddleDigits",value:function(){var x=this.upcA[0],b=this.upcA[this.upcA.length-1],w=f[parseInt(b)][parseInt(x)];return(0,n.default)(this.middleDigits,w)}}]),p})(o.default);function h(m,p){for(var v=parseInt(m[m.length-1]),x=a[v],b="",w=0,S=0;S<x.length;S++){var E=x[S];E==="X"?b+=m[w++]:b+=E}return b=""+p+b,""+b+(0,i.checksum)(b)}return so.default=d,so}var gf;function iM(){if(gf)return Oe;gf=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.UPCE=Oe.UPC=Oe.EAN2=Oe.EAN5=Oe.EAN8=Oe.EAN13=void 0;var e=eM(),t=d(e),n=tM(),r=d(n),o=nM(),i=d(o),c=rM(),u=d(c),l=my(),s=d(l),a=oM(),f=d(a);function d(h){return h&&h.__esModule?h:{default:h}}return Oe.EAN13=t.default,Oe.EAN8=r.default,Oe.EAN5=i.default,Oe.EAN2=u.default,Oe.UPC=s.default,Oe.UPCE=f.default,Oe}var kt={},ao={},nn={},vf;function sM(){return vf||(vf=1,Object.defineProperty(nn,"__esModule",{value:!0}),nn.START_BIN="1010",nn.END_BIN="11101",nn.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]),nn}var yf;function gy(){if(yf)return ao;yf=1,Object.defineProperty(ao,"__esModule",{value:!0});var e=(function(){function s(a,f){for(var d=0;d<f.length;d++){var h=f[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(a,h.key,h)}}return function(a,f,d){return f&&s(a.prototype,f),d&&s(a,d),a}})(),t=sM(),n=Be(),r=o(n);function o(s){return s&&s.__esModule?s:{default:s}}function i(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function c(s,a){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:s}function u(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(s,a):s.__proto__=a)}var l=(function(s){u(a,s);function a(){return i(this,a),c(this,(a.__proto__||Object.getPrototypeOf(a)).apply(this,arguments))}return e(a,[{key:"valid",value:function(){return this.data.search(/^([0-9]{2})+$/)!==-1}},{key:"encode",value:function(){var d=this,h=this.data.match(/.{2}/g).map(function(m){return d.encodePair(m)}).join("");return{data:t.START_BIN+h+t.END_BIN,text:this.text}}},{key:"encodePair",value:function(d){var h=t.BINARIES[d[1]];return t.BINARIES[d[0]].split("").map(function(m,p){return(m==="1"?"111":"1")+(h[p]==="1"?"000":"0")}).join("")}}]),a})(r.default);return ao.default=l,ao}var co={},xf;function aM(){if(xf)return co;xf=1,Object.defineProperty(co,"__esModule",{value:!0});var e=(function(){function s(a,f){for(var d=0;d<f.length;d++){var h=f[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(a,h.key,h)}}return function(a,f,d){return f&&s(a.prototype,f),d&&s(a,d),a}})(),t=gy(),n=r(t);function r(s){return s&&s.__esModule?s:{default:s}}function o(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function i(s,a){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:s}function c(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(s,a):s.__proto__=a)}var u=function(a){var f=a.substr(0,13).split("").map(function(d){return parseInt(d,10)}).reduce(function(d,h,m){return d+h*(3-m%2*2)},0);return Math.ceil(f/10)*10-f},l=(function(s){c(a,s);function a(f,d){return o(this,a),f.search(/^[0-9]{13}$/)!==-1&&(f+=u(f)),i(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,f,d))}return e(a,[{key:"valid",value:function(){return this.data.search(/^[0-9]{14}$/)!==-1&&+this.data[13]===u(this.data)}}]),a})(n.default);return co.default=l,co}var bf;function cM(){if(bf)return kt;bf=1,Object.defineProperty(kt,"__esModule",{value:!0}),kt.ITF14=kt.ITF=void 0;var e=gy(),t=o(e),n=aM(),r=o(n);function o(i){return i&&i.__esModule?i:{default:i}}return kt.ITF=t.default,kt.ITF14=r.default,kt}var ke={},lo={},wf;function Ar(){if(wf)return lo;wf=1,Object.defineProperty(lo,"__esModule",{value:!0});var e=(function(){function s(a,f){for(var d=0;d<f.length;d++){var h=f[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(a,h.key,h)}}return function(a,f,d){return f&&s(a.prototype,f),d&&s(a,d),a}})(),t=Be(),n=r(t);function r(s){return s&&s.__esModule?s:{default:s}}function o(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function i(s,a){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:s}function c(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(s,a):s.__proto__=a)}var u=(function(s){c(a,s);function a(f,d){return o(this,a),i(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,f,d))}return e(a,[{key:"encode",value:function(){for(var d="110",h=0;h<this.data.length;h++){var m=parseInt(this.data[h]),p=m.toString(2);p=l(p,4-p.length);for(var v=0;v<p.length;v++)d+=p[v]=="0"?"100":"110"}return d+="1001",{data:d,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9]+$/)!==-1}}]),a})(n.default);function l(s,a){for(var f=0;f<a;f++)s="0"+s;return s}return lo.default=u,lo}var uo={},Fn={},Ef;function Bi(){if(Ef)return Fn;Ef=1,Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.mod10=e,Fn.mod11=t;function e(n){for(var r=0,o=0;o<n.length;o++){var i=parseInt(n[o]);(o+n.length)%2===0?r+=i:r+=i*2%10+Math.floor(i*2/10)}return(10-r%10)%10}function t(n){for(var r=0,o=[2,3,4,5,6,7],i=0;i<n.length;i++){var c=parseInt(n[n.length-1-i]);r+=o[i%o.length]*c}return(11-r%11)%11}return Fn}var Sf;function lM(){if(Sf)return uo;Sf=1,Object.defineProperty(uo,"__esModule",{value:!0});var e=Ar(),t=r(e),n=Bi();function r(l){return l&&l.__esModule?l:{default:l}}function o(l,s){if(!(l instanceof s))throw new TypeError("Cannot call a class as a function")}function i(l,s){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:l}function c(l,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);l.prototype=Object.create(s&&s.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(l,s):l.__proto__=s)}var u=(function(l){c(s,l);function s(a,f){return o(this,s),i(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a+(0,n.mod10)(a),f))}return s})(t.default);return uo.default=u,uo}var fo={},Cf;function uM(){if(Cf)return fo;Cf=1,Object.defineProperty(fo,"__esModule",{value:!0});var e=Ar(),t=r(e),n=Bi();function r(l){return l&&l.__esModule?l:{default:l}}function o(l,s){if(!(l instanceof s))throw new TypeError("Cannot call a class as a function")}function i(l,s){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:l}function c(l,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);l.prototype=Object.create(s&&s.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(l,s):l.__proto__=s)}var u=(function(l){c(s,l);function s(a,f){return o(this,s),i(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a+(0,n.mod11)(a),f))}return s})(t.default);return fo.default=u,fo}var ho={},_f;function fM(){if(_f)return ho;_f=1,Object.defineProperty(ho,"__esModule",{value:!0});var e=Ar(),t=r(e),n=Bi();function r(l){return l&&l.__esModule?l:{default:l}}function o(l,s){if(!(l instanceof s))throw new TypeError("Cannot call a class as a function")}function i(l,s){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:l}function c(l,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);l.prototype=Object.create(s&&s.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(l,s):l.__proto__=s)}var u=(function(l){c(s,l);function s(a,f){return o(this,s),a+=(0,n.mod10)(a),a+=(0,n.mod10)(a),i(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a,f))}return s})(t.default);return ho.default=u,ho}var po={},Rf;function dM(){if(Rf)return po;Rf=1,Object.defineProperty(po,"__esModule",{value:!0});var e=Ar(),t=r(e),n=Bi();function r(l){return l&&l.__esModule?l:{default:l}}function o(l,s){if(!(l instanceof s))throw new TypeError("Cannot call a class as a function")}function i(l,s){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:l}function c(l,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);l.prototype=Object.create(s&&s.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(l,s):l.__proto__=s)}var u=(function(l){c(s,l);function s(a,f){return o(this,s),a+=(0,n.mod11)(a),a+=(0,n.mod10)(a),i(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a,f))}return s})(t.default);return po.default=u,po}var Tf;function hM(){if(Tf)return ke;Tf=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.MSI1110=ke.MSI1010=ke.MSI11=ke.MSI10=ke.MSI=void 0;var e=Ar(),t=a(e),n=lM(),r=a(n),o=uM(),i=a(o),c=fM(),u=a(c),l=dM(),s=a(l);function a(f){return f&&f.__esModule?f:{default:f}}return ke.MSI=t.default,ke.MSI10=r.default,ke.MSI11=i.default,ke.MSI1010=u.default,ke.MSI1110=s.default,ke}var Vn={},Pf;function pM(){if(Pf)return Vn;Pf=1,Object.defineProperty(Vn,"__esModule",{value:!0}),Vn.pharmacode=void 0;var e=(function(){function l(s,a){for(var f=0;f<a.length;f++){var d=a[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(s,d.key,d)}}return function(s,a,f){return a&&l(s.prototype,a),f&&l(s,f),s}})(),t=Be(),n=r(t);function r(l){return l&&l.__esModule?l:{default:l}}function o(l,s){if(!(l instanceof s))throw new TypeError("Cannot call a class as a function")}function i(l,s){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:l}function c(l,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);l.prototype=Object.create(s&&s.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(l,s):l.__proto__=s)}var u=(function(l){c(s,l);function s(a,f){o(this,s);var d=i(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a,f));return d.number=parseInt(a,10),d}return e(s,[{key:"encode",value:function(){for(var f=this.number,d="";!isNaN(f)&&f!=0;)f%2===0?(d="11100"+d,f=(f-2)/2):(d="100"+d,f=(f-1)/2);return d=d.slice(0,-2),{data:d,text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),s})(n.default);return Vn.pharmacode=u,Vn}var Bn={},Af;function mM(){if(Af)return Bn;Af=1,Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.codabar=void 0;var e=(function(){function l(s,a){for(var f=0;f<a.length;f++){var d=a[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(s,d.key,d)}}return function(s,a,f){return a&&l(s.prototype,a),f&&l(s,f),s}})(),t=Be(),n=r(t);function r(l){return l&&l.__esModule?l:{default:l}}function o(l,s){if(!(l instanceof s))throw new TypeError("Cannot call a class as a function")}function i(l,s){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:l}function c(l,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);l.prototype=Object.create(s&&s.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(l,s):l.__proto__=s)}var u=(function(l){c(s,l);function s(a,f){o(this,s),a.search(/^[0-9\-\$\:\.\+\/]+$/)===0&&(a="A"+a+"A");var d=i(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a.toUpperCase(),f));return d.text=d.options.text||d.text.replace(/[A-D]/g,""),d}return e(s,[{key:"valid",value:function(){return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)!==-1}},{key:"encode",value:function(){for(var f=[],d=this.getEncodings(),h=0;h<this.data.length;h++)f.push(d[this.data.charAt(h)]),h!==this.data.length-1&&f.push("0");return{text:this.text,data:f.join("")}}},{key:"getEncodings",value:function(){return{0:"101010011",1:"101011001",2:"101001011",3:"110010101",4:"101101001",5:"110101001",6:"100101011",7:"100101101",8:"100110101",9:"110100101","-":"101001101",$:"101100101",":":"1101011011","/":"1101101011",".":"1101101101","+":"1011011011",A:"1011001001",B:"1001001011",C:"1010010011",D:"1010011001"}}}]),s})(n.default);return Bn.codabar=u,Bn}var Lt={},mo={},rn={},Of;function gM(){return Of||(Of=1,Object.defineProperty(rn,"__esModule",{value:!0}),rn.SYMBOLS=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","($)","(%)","(/)","(+)","ÿ"],rn.BINARIES=["100010100","101001000","101000100","101000010","100101000","100100100","100100010","101010000","100010010","100001010","110101000","110100100","110100010","110010100","110010010","110001010","101101000","101100100","101100010","100110100","100011010","101011000","101001100","101000110","100101100","100010110","110110100","110110010","110101100","110100110","110010110","110011010","101101100","101100110","100110110","100111010","100101110","111010100","111010010","111001010","101101110","101110110","110101110","100100110","111011010","111010110","100110010","101011110"],rn.MULTI_SYMBOLS={"\0":["(%)","U"],"":["($)","A"],"":["($)","B"],"":["($)","C"],"":["($)","D"],"":["($)","E"],"":["($)","F"],"\x07":["($)","G"],"\b":["($)","H"]," ":["($)","I"],"\n":["($)","J"],"\v":["($)","K"],"\f":["($)","L"],"\r":["($)","M"],"":["($)","N"],"":["($)","O"],"":["($)","P"],"":["($)","Q"],"":["($)","R"],"":["($)","S"],"":["($)","T"],"":["($)","U"],"":["($)","V"],"":["($)","W"],"":["($)","X"],"":["($)","Y"],"":["($)","Z"],"\x1B":["(%)","A"],"":["(%)","B"],"":["(%)","C"],"":["(%)","D"],"":["(%)","E"],"!":["(/)","A"],'"':["(/)","B"],"#":["(/)","C"],"&":["(/)","F"],"'":["(/)","G"],"(":["(/)","H"],")":["(/)","I"],"*":["(/)","J"],",":["(/)","L"],":":["(/)","Z"],";":["(%)","F"],"<":["(%)","G"],"=":["(%)","H"],">":["(%)","I"],"?":["(%)","J"],"@":["(%)","V"],"[":["(%)","K"],"\\":["(%)","L"],"]":["(%)","M"],"^":["(%)","N"],_:["(%)","O"],"`":["(%)","W"],a:["(+)","A"],b:["(+)","B"],c:["(+)","C"],d:["(+)","D"],e:["(+)","E"],f:["(+)","F"],g:["(+)","G"],h:["(+)","H"],i:["(+)","I"],j:["(+)","J"],k:["(+)","K"],l:["(+)","L"],m:["(+)","M"],n:["(+)","N"],o:["(+)","O"],p:["(+)","P"],q:["(+)","Q"],r:["(+)","R"],s:["(+)","S"],t:["(+)","T"],u:["(+)","U"],v:["(+)","V"],w:["(+)","W"],x:["(+)","X"],y:["(+)","Y"],z:["(+)","Z"],"{":["(%)","P"],"|":["(%)","Q"],"}":["(%)","R"],"~":["(%)","S"],"":["(%)","T"]}),rn}var Mf;function vy(){if(Mf)return mo;Mf=1,Object.defineProperty(mo,"__esModule",{value:!0});var e=(function(){function s(a,f){for(var d=0;d<f.length;d++){var h=f[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(a,h.key,h)}}return function(a,f,d){return f&&s(a.prototype,f),d&&s(a,d),a}})(),t=gM(),n=Be(),r=o(n);function o(s){return s&&s.__esModule?s:{default:s}}function i(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function c(s,a){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:s}function u(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(s,a):s.__proto__=a)}var l=(function(s){u(a,s);function a(f,d){return i(this,a),c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,f,d))}return e(a,[{key:"valid",value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:"encode",value:function(){var d=this.data.split("").flatMap(function(v){return t.MULTI_SYMBOLS[v]||v}),h=d.map(function(v){return a.getEncoding(v)}).join(""),m=a.checksum(d,20),p=a.checksum(d.concat(m),15);return{text:this.text,data:a.getEncoding("ÿ")+h+a.getEncoding(m)+a.getEncoding(p)+a.getEncoding("ÿ")+"1"}}}],[{key:"getEncoding",value:function(d){return t.BINARIES[a.symbolValue(d)]}},{key:"getSymbol",value:function(d){return t.SYMBOLS[d]}},{key:"symbolValue",value:function(d){return t.SYMBOLS.indexOf(d)}},{key:"checksum",value:function(d,h){var m=d.slice().reverse().reduce(function(p,v,x){var b=x%h+1;return p+a.symbolValue(v)*b},0);return a.getSymbol(m%47)}}]),a})(r.default);return mo.default=l,mo}var go={},If;function vM(){if(If)return go;If=1,Object.defineProperty(go,"__esModule",{value:!0});var e=(function(){function l(s,a){for(var f=0;f<a.length;f++){var d=a[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(s,d.key,d)}}return function(s,a,f){return a&&l(s.prototype,a),f&&l(s,f),s}})(),t=vy(),n=r(t);function r(l){return l&&l.__esModule?l:{default:l}}function o(l,s){if(!(l instanceof s))throw new TypeError("Cannot call a class as a function")}function i(l,s){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:l}function c(l,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);l.prototype=Object.create(s&&s.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(l,s):l.__proto__=s)}var u=(function(l){c(s,l);function s(a,f){return o(this,s),i(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a,f))}return e(s,[{key:"valid",value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),s})(n.default);return go.default=u,go}var Nf;function yM(){if(Nf)return Lt;Nf=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.CODE93FullASCII=Lt.CODE93=void 0;var e=vy(),t=o(e),n=vM(),r=o(n);function o(i){return i&&i.__esModule?i:{default:i}}return Lt.CODE93=t.default,Lt.CODE93FullASCII=r.default,Lt}var $n={},jf;function xM(){if(jf)return $n;jf=1,Object.defineProperty($n,"__esModule",{value:!0}),$n.GenericBarcode=void 0;var e=(function(){function l(s,a){for(var f=0;f<a.length;f++){var d=a[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(s,d.key,d)}}return function(s,a,f){return a&&l(s.prototype,a),f&&l(s,f),s}})(),t=Be(),n=r(t);function r(l){return l&&l.__esModule?l:{default:l}}function o(l,s){if(!(l instanceof s))throw new TypeError("Cannot call a class as a function")}function i(l,s){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:l}function c(l,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);l.prototype=Object.create(s&&s.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(l,s):l.__proto__=s)}var u=(function(l){c(s,l);function s(a,f){return o(this,s),i(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a,f))}return e(s,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),s})(n.default);return $n.GenericBarcode=u,$n}var Df;function bM(){if(Df)return Wr;Df=1,Object.defineProperty(Wr,"__esModule",{value:!0});var e=qO(),t=JO(),n=iM(),r=cM(),o=hM(),i=pM(),c=mM(),u=yM(),l=xM();return Wr.default={CODE39:e.CODE39,CODE128:t.CODE128,CODE128A:t.CODE128A,CODE128B:t.CODE128B,CODE128C:t.CODE128C,EAN13:n.EAN13,EAN8:n.EAN8,EAN5:n.EAN5,EAN2:n.EAN2,UPC:n.UPC,UPCE:n.UPCE,ITF14:r.ITF14,ITF:r.ITF,MSI:o.MSI,MSI10:o.MSI10,MSI11:o.MSI11,MSI1010:o.MSI1010,MSI1110:o.MSI1110,pharmacode:i.pharmacode,codabar:c.codabar,CODE93:u.CODE93,CODE93FullASCII:u.CODE93FullASCII,GenericBarcode:l.GenericBarcode},Wr}var vo={},kf;function $i(){if(kf)return vo;kf=1,Object.defineProperty(vo,"__esModule",{value:!0});var e=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t};return vo.default=function(t,n){return e({},t,n)},vo}var yo={},Lf;function wM(){if(Lf)return yo;Lf=1,Object.defineProperty(yo,"__esModule",{value:!0}),yo.default=e;function e(t){var n=[];function r(o){if(Array.isArray(o))for(var i=0;i<o.length;i++)r(o[i]);else o.text=o.text||"",o.data=o.data||"",n.push(o)}return r(t),n}return yo}var xo={},Ff;function EM(){if(Ff)return xo;Ff=1,Object.defineProperty(xo,"__esModule",{value:!0}),xo.default=e;function e(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}return xo}var bo={},wo={},Eo={},Vf;function yy(){if(Vf)return Eo;Vf=1,Object.defineProperty(Eo,"__esModule",{value:!0}),Eo.default=e;function e(t){var n=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var r in n)n.hasOwnProperty(r)&&(r=n[r],typeof t[r]=="string"&&(t[r]=parseInt(t[r],10)));return typeof t.displayValue=="string"&&(t.displayValue=t.displayValue!="false"),t}return Eo}var So={},Bf;function xy(){if(Bf)return So;Bf=1,Object.defineProperty(So,"__esModule",{value:!0});var e={width:2,height:100,format:"auto",displayValue:!0,fontOptions:"",font:"monospace",text:void 0,textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}};return So.default=e,So}var $f;function SM(){if($f)return wo;$f=1,Object.defineProperty(wo,"__esModule",{value:!0});var e=yy(),t=o(e),n=xy(),r=o(n);function o(c){return c&&c.__esModule?c:{default:c}}function i(c){var u={};for(var l in r.default)r.default.hasOwnProperty(l)&&(c.hasAttribute("jsbarcode-"+l.toLowerCase())&&(u[l]=c.getAttribute("jsbarcode-"+l.toLowerCase())),c.hasAttribute("data-"+l.toLowerCase())&&(u[l]=c.getAttribute("data-"+l.toLowerCase())));return u.value=c.getAttribute("jsbarcode-value")||c.getAttribute("data-value"),u=(0,t.default)(u),u}return wo.default=i,wo}var Co={},_o={},Le={},Uf;function by(){if(Uf)return Le;Uf=1,Object.defineProperty(Le,"__esModule",{value:!0}),Le.getTotalWidthOfEncodings=Le.calculateEncodingAttributes=Le.getBarcodePadding=Le.getEncodingHeight=Le.getMaximumHeightOfEncodings=void 0;var e=$i(),t=n(e);function n(s){return s&&s.__esModule?s:{default:s}}function r(s,a){return a.height+(a.displayValue&&s.text.length>0?a.fontSize+a.textMargin:0)+a.marginTop+a.marginBottom}function o(s,a,f){if(f.displayValue&&a<s){if(f.textAlign=="center")return Math.floor((s-a)/2);if(f.textAlign=="left")return 0;if(f.textAlign=="right")return Math.floor(s-a)}return 0}function i(s,a,f){for(var d=0;d<s.length;d++){var h=s[d],m=(0,t.default)(a,h.options),p;m.displayValue?p=l(h.text,m,f):p=0;var v=h.data.length*m.width;h.width=Math.ceil(Math.max(p,v)),h.height=r(h,m),h.barcodePadding=o(p,v,m)}}function c(s){for(var a=0,f=0;f<s.length;f++)a+=s[f].width;return a}function u(s){for(var a=0,f=0;f<s.length;f++)s[f].height>a&&(a=s[f].height);return a}function l(s,a,f){var d;if(f)d=f;else if(typeof document<"u")d=document.createElement("canvas").getContext("2d");else return 0;d.font=a.fontOptions+" "+a.fontSize+"px "+a.font;var h=d.measureText(s);if(!h)return 0;var m=h.width;return m}return Le.getMaximumHeightOfEncodings=u,Le.getEncodingHeight=r,Le.getBarcodePadding=o,Le.calculateEncodingAttributes=i,Le.getTotalWidthOfEncodings=c,Le}var Gf;function CM(){if(Gf)return _o;Gf=1,Object.defineProperty(_o,"__esModule",{value:!0});var e=(function(){function u(l,s){for(var a=0;a<s.length;a++){var f=s[a];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(l,f.key,f)}}return function(l,s,a){return s&&u(l.prototype,s),a&&u(l,a),l}})(),t=$i(),n=o(t),r=by();function o(u){return u&&u.__esModule?u:{default:u}}function i(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}var c=(function(){function u(l,s,a){i(this,u),this.canvas=l,this.encodings=s,this.options=a}return e(u,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var s=0;s<this.encodings.length;s++){var a=(0,n.default)(this.options,this.encodings[s].options);this.drawCanvasBarcode(a,this.encodings[s]),this.drawCanvasText(a,this.encodings[s]),this.moveCanvasDrawing(this.encodings[s])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var s=this.canvas.getContext("2d");s.save(),(0,r.calculateEncodingAttributes)(this.encodings,this.options,s);var a=(0,r.getTotalWidthOfEncodings)(this.encodings),f=(0,r.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=a+this.options.marginLeft+this.options.marginRight,this.canvas.height=f,s.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(s.fillStyle=this.options.background,s.fillRect(0,0,this.canvas.width,this.canvas.height)),s.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(s,a){var f=this.canvas.getContext("2d"),d=a.data,h;s.textPosition=="top"?h=s.marginTop+s.fontSize+s.textMargin:h=s.marginTop,f.fillStyle=s.lineColor;for(var m=0;m<d.length;m++){var p=m*s.width+a.barcodePadding;d[m]==="1"?f.fillRect(p,h,s.width,s.height):d[m]&&f.fillRect(p,h,s.width,s.height*d[m])}}},{key:"drawCanvasText",value:function(s,a){var f=this.canvas.getContext("2d"),d=s.fontOptions+" "+s.fontSize+"px "+s.font;if(s.displayValue){var h,m;s.textPosition=="top"?m=s.marginTop+s.fontSize-s.textMargin:m=s.height+s.textMargin+s.marginTop+s.fontSize,f.font=d,s.textAlign=="left"||a.barcodePadding>0?(h=0,f.textAlign="left"):s.textAlign=="right"?(h=a.width-1,f.textAlign="right"):(h=a.width/2,f.textAlign="center"),f.fillText(a.text,h,m)}}},{key:"moveCanvasDrawing",value:function(s){var a=this.canvas.getContext("2d");a.translate(s.width,0)}},{key:"restoreCanvas",value:function(){var s=this.canvas.getContext("2d");s.restore()}}]),u})();return _o.default=c,_o}var Ro={},Hf;function _M(){if(Hf)return Ro;Hf=1,Object.defineProperty(Ro,"__esModule",{value:!0});var e=(function(){function l(s,a){for(var f=0;f<a.length;f++){var d=a[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(s,d.key,d)}}return function(s,a,f){return a&&l(s.prototype,a),f&&l(s,f),s}})(),t=$i(),n=o(t),r=by();function o(l){return l&&l.__esModule?l:{default:l}}function i(l,s){if(!(l instanceof s))throw new TypeError("Cannot call a class as a function")}var c="http://www.w3.org/2000/svg",u=(function(){function l(s,a,f){i(this,l),this.svg=s,this.encodings=a,this.options=f,this.document=f.xmlDocument||document}return e(l,[{key:"render",value:function(){var a=this.options.marginLeft;this.prepareSVG();for(var f=0;f<this.encodings.length;f++){var d=this.encodings[f],h=(0,n.default)(this.options,d.options),m=this.createGroup(a,h.marginTop,this.svg);this.setGroupOptions(m,h),this.drawSvgBarcode(m,h,d),this.drawSVGText(m,h,d),a+=d.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,r.calculateEncodingAttributes)(this.encodings,this.options);var a=(0,r.getTotalWidthOfEncodings)(this.encodings),f=(0,r.getMaximumHeightOfEncodings)(this.encodings),d=a+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(d,f),this.options.background&&this.drawRect(0,0,d,f,this.svg).setAttribute("fill",this.options.background)}},{key:"drawSvgBarcode",value:function(a,f,d){var h=d.data,m;f.textPosition=="top"?m=f.fontSize+f.textMargin:m=0;for(var p=0,v=0,x=0;x<h.length;x++)v=x*f.width+d.barcodePadding,h[x]==="1"?p++:p>0&&(this.drawRect(v-f.width*p,m,f.width*p,f.height,a),p=0);p>0&&this.drawRect(v-f.width*(p-1),m,f.width*p,f.height,a)}},{key:"drawSVGText",value:function(a,f,d){var h=this.document.createElementNS(c,"text");if(f.displayValue){var m,p;h.setAttribute("font-family",f.font),h.setAttribute("font-size",f.fontSize),f.fontOptions.includes("bold")&&h.setAttribute("font-weight","bold"),f.fontOptions.includes("italic")&&h.setAttribute("font-style","italic"),f.textPosition=="top"?p=f.fontSize-f.textMargin:p=f.height+f.textMargin+f.fontSize,f.textAlign=="left"||d.barcodePadding>0?(m=0,h.setAttribute("text-anchor","start")):f.textAlign=="right"?(m=d.width-1,h.setAttribute("text-anchor","end")):(m=d.width/2,h.setAttribute("text-anchor","middle")),h.setAttribute("x",m),h.setAttribute("y",p),h.appendChild(this.document.createTextNode(d.text)),a.appendChild(h)}}},{key:"setSvgAttributes",value:function(a,f){var d=this.svg;d.setAttribute("width",a+"px"),d.setAttribute("height",f+"px"),d.setAttribute("x","0px"),d.setAttribute("y","0px"),d.setAttribute("viewBox","0 0 "+a+" "+f),d.setAttribute("xmlns",c),d.setAttribute("version","1.1")}},{key:"createGroup",value:function(a,f,d){var h=this.document.createElementNS(c,"g");return h.setAttribute("transform","translate("+a+", "+f+")"),d.appendChild(h),h}},{key:"setGroupOptions",value:function(a,f){a.setAttribute("fill",f.lineColor)}},{key:"drawRect",value:function(a,f,d,h,m){var p=this.document.createElementNS(c,"rect");return p.setAttribute("x",a),p.setAttribute("y",f),p.setAttribute("width",d),p.setAttribute("height",h),m.appendChild(p),p}}]),l})();return Ro.default=u,Ro}var To={},zf;function RM(){if(zf)return To;zf=1,Object.defineProperty(To,"__esModule",{value:!0});var e=(function(){function r(o,i){for(var c=0;c<i.length;c++){var u=i[c];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(o,u.key,u)}}return function(o,i,c){return i&&r(o.prototype,i),c&&r(o,c),o}})();function t(r,o){if(!(r instanceof o))throw new TypeError("Cannot call a class as a function")}var n=(function(){function r(o,i,c){t(this,r),this.object=o,this.encodings=i,this.options=c}return e(r,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),r})();return To.default=n,To}var Wf;function TM(){if(Wf)return Co;Wf=1,Object.defineProperty(Co,"__esModule",{value:!0});var e=CM(),t=c(e),n=_M(),r=c(n),o=RM(),i=c(o);function c(u){return u&&u.__esModule?u:{default:u}}return Co.default={CanvasRenderer:t.default,SVGRenderer:r.default,ObjectRenderer:i.default},Co}var on={},qf;function wy(){if(qf)return on;qf=1,Object.defineProperty(on,"__esModule",{value:!0});function e(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function t(c,u){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u&&(typeof u=="object"||typeof u=="function")?u:c}function n(c,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof u);c.prototype=Object.create(u&&u.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(c,u):c.__proto__=u)}var r=(function(c){n(u,c);function u(l,s){e(this,u);var a=t(this,(u.__proto__||Object.getPrototypeOf(u)).call(this));return a.name="InvalidInputException",a.symbology=l,a.input=s,a.message='"'+a.input+'" is not a valid input for '+a.symbology,a}return u})(Error),o=(function(c){n(u,c);function u(){e(this,u);var l=t(this,(u.__proto__||Object.getPrototypeOf(u)).call(this));return l.name="InvalidElementException",l.message="Not supported type to render on",l}return u})(Error),i=(function(c){n(u,c);function u(){e(this,u);var l=t(this,(u.__proto__||Object.getPrototypeOf(u)).call(this));return l.name="NoElementException",l.message="No element to render on.",l}return u})(Error);return on.InvalidInputException=r,on.InvalidElementException=o,on.NoElementException=i,on}var Kf;function PM(){if(Kf)return bo;Kf=1,Object.defineProperty(bo,"__esModule",{value:!0});var e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},t=SM(),n=c(t),r=TM(),o=c(r),i=wy();function c(a){return a&&a.__esModule?a:{default:a}}function u(a){if(typeof a=="string")return l(a);if(Array.isArray(a)){for(var f=[],d=0;d<a.length;d++)f.push(u(a[d]));return f}else{if(typeof HTMLCanvasElement<"u"&&a instanceof HTMLImageElement)return s(a);if(a&&a.nodeName&&a.nodeName.toLowerCase()==="svg"||typeof SVGElement<"u"&&a instanceof SVGElement)return{element:a,options:(0,n.default)(a),renderer:o.default.SVGRenderer};if(typeof HTMLCanvasElement<"u"&&a instanceof HTMLCanvasElement)return{element:a,options:(0,n.default)(a),renderer:o.default.CanvasRenderer};if(a&&a.getContext)return{element:a,renderer:o.default.CanvasRenderer};if(a&&(typeof a>"u"?"undefined":e(a))==="object"&&!a.nodeName)return{element:a,renderer:o.default.ObjectRenderer};throw new i.InvalidElementException}}function l(a){var f=document.querySelectorAll(a);if(f.length!==0){for(var d=[],h=0;h<f.length;h++)d.push(u(f[h]));return d}}function s(a){var f=document.createElement("canvas");return{element:f,options:(0,n.default)(a),renderer:o.default.CanvasRenderer,afterRender:function(){a.setAttribute("src",f.toDataURL())}}}return bo.default=u,bo}var Po={},Yf;function AM(){if(Yf)return Po;Yf=1,Object.defineProperty(Po,"__esModule",{value:!0});var e=(function(){function r(o,i){for(var c=0;c<i.length;c++){var u=i[c];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(o,u.key,u)}}return function(o,i,c){return i&&r(o.prototype,i),c&&r(o,c),o}})();function t(r,o){if(!(r instanceof o))throw new TypeError("Cannot call a class as a function")}var n=(function(){function r(o){t(this,r),this.api=o}return e(r,[{key:"handleCatch",value:function(i){if(i.name==="InvalidInputException")if(this.api._options.valid!==this.api._defaults.valid)this.api._options.valid(!1);else throw i.message;else throw i;this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(i){try{var c=i.apply(void 0,arguments);return this.api._options.valid(!0),c}catch(u){return this.handleCatch(u),this.api}}}]),r})();return Po.default=n,Po}var ys,Xf;function OM(){if(Xf)return ys;Xf=1;var e=bM(),t=x(e),n=$i(),r=x(n),o=wM(),i=x(o),c=EM(),u=x(c),l=PM(),s=x(l),a=yy(),f=x(a),d=AM(),h=x(d),m=wy(),p=xy(),v=x(p);function x(I){return I&&I.__esModule?I:{default:I}}var b=function(){},w=function(P,M,j){var V=new b;if(typeof P>"u")throw Error("No element to render on was provided.");return V._renderProperties=(0,s.default)(P),V._encodings=[],V._options=v.default,V._errorHandler=new h.default(V),typeof M<"u"&&(j=j||{},j.format||(j.format=R()),V.options(j)[j.format](M,j).render()),V};w.getModule=function(I){return t.default[I]};for(var S in t.default)t.default.hasOwnProperty(S)&&E(t.default,S);function E(I,P){b.prototype[P]=b.prototype[P.toUpperCase()]=b.prototype[P.toLowerCase()]=function(M,j){var V=this;return V._errorHandler.wrapBarcodeCall(function(){j.text=typeof j.text>"u"?void 0:""+j.text;var $=(0,r.default)(V._options,j);$=(0,f.default)($);var K=I[P],G=A(M,K,$);return V._encodings.push(G),V})}}function A(I,P,M){I=""+I;var j=new P(I,M);if(!j.valid())throw new m.InvalidInputException(j.constructor.name,I);var V=j.encode();V=(0,i.default)(V);for(var $=0;$<V.length;$++)V[$].options=(0,r.default)(M,V[$].options);return V}function R(){return t.default.CODE128?"CODE128":Object.keys(t.default)[0]}b.prototype.options=function(I){return this._options=(0,r.default)(this._options,I),this},b.prototype.blank=function(I){var P=new Array(I+1).join("0");return this._encodings.push({data:P}),this},b.prototype.init=function(){if(this._renderProperties){Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]);var I;for(var P in this._renderProperties){I=this._renderProperties[P];var M=(0,r.default)(this._options,I.options);M.format=="auto"&&(M.format=R()),this._errorHandler.wrapBarcodeCall(function(){var j=M.value,V=t.default[M.format.toUpperCase()],$=A(j,V,M);T(I,$,M)})}}},b.prototype.render=function(){if(!this._renderProperties)throw new m.NoElementException;if(Array.isArray(this._renderProperties))for(var I=0;I<this._renderProperties.length;I++)T(this._renderProperties[I],this._encodings,this._options);else T(this._renderProperties,this._encodings,this._options);return this},b.prototype._defaults=v.default;function T(I,P,M){P=(0,i.default)(P);for(var j=0;j<P.length;j++)P[j].options=(0,r.default)(M,P[j].options),(0,u.default)(P[j].options);(0,u.default)(M);var V=I.renderer,$=new V(I.element,P,M);$.render(),I.afterRender&&I.afterRender()}return typeof window<"u"&&(window.JsBarcode=w),typeof jQuery<"u"&&(jQuery.fn.JsBarcode=function(I,P){var M=[];return jQuery(this).each(function(){M.push(this)}),w(M,I,P)}),ys=w,ys}var Ao={exports:{}},Oo={exports:{}},fe={};/** @license React v16.13.1
122
122
  * react-is.production.min.js
123
123
  *
124
124
  * Copyright (c) Facebook, Inc. and its affiliates.
125
125
  *
126
126
  * This source code is licensed under the MIT license found in the
127
127
  * LICENSE file in the root directory of this source tree.
128
- */var zf;function dM(){if(zf)return ue;zf=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,i=e?Symbol.for("react.concurrent_mode"):60111,a=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(S){if(typeof S=="object"&&S!==null){var T=S.$$typeof;switch(T){case t:switch(S=S.type,S){case l:case i:case r:case s:case o:case f:return S;default:switch(S=S&&S.$$typeof,S){case u:case a:case m:case h:case c:return S;default:return T}}case n:return T}}}function E(S){return w(S)===i}return ue.AsyncMode=l,ue.ConcurrentMode=i,ue.ContextConsumer=u,ue.ContextProvider=c,ue.Element=t,ue.ForwardRef=a,ue.Fragment=r,ue.Lazy=m,ue.Memo=h,ue.Portal=n,ue.Profiler=s,ue.StrictMode=o,ue.Suspense=f,ue.isAsyncMode=function(S){return E(S)||w(S)===l},ue.isConcurrentMode=E,ue.isContextConsumer=function(S){return w(S)===u},ue.isContextProvider=function(S){return w(S)===c},ue.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},ue.isForwardRef=function(S){return w(S)===a},ue.isFragment=function(S){return w(S)===r},ue.isLazy=function(S){return w(S)===m},ue.isMemo=function(S){return w(S)===h},ue.isPortal=function(S){return w(S)===n},ue.isProfiler=function(S){return w(S)===s},ue.isStrictMode=function(S){return w(S)===o},ue.isSuspense=function(S){return w(S)===f},ue.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===i||S===s||S===o||S===f||S===d||typeof S=="object"&&S!==null&&(S.$$typeof===m||S.$$typeof===h||S.$$typeof===c||S.$$typeof===u||S.$$typeof===a||S.$$typeof===v||S.$$typeof===x||S.$$typeof===b||S.$$typeof===p)},ue.typeOf=w,ue}var fe={};/** @license React v16.13.1
128
+ */var Zf;function MM(){if(Zf)return fe;Zf=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,a=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(E){if(typeof E=="object"&&E!==null){var A=E.$$typeof;switch(A){case t:switch(E=E.type,E){case l:case s:case r:case i:case o:case f:return E;default:switch(E=E&&E.$$typeof,E){case u:case a:case m:case h:case c:return E;default:return A}}case n:return A}}}function S(E){return w(E)===s}return fe.AsyncMode=l,fe.ConcurrentMode=s,fe.ContextConsumer=u,fe.ContextProvider=c,fe.Element=t,fe.ForwardRef=a,fe.Fragment=r,fe.Lazy=m,fe.Memo=h,fe.Portal=n,fe.Profiler=i,fe.StrictMode=o,fe.Suspense=f,fe.isAsyncMode=function(E){return S(E)||w(E)===l},fe.isConcurrentMode=S,fe.isContextConsumer=function(E){return w(E)===u},fe.isContextProvider=function(E){return w(E)===c},fe.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},fe.isForwardRef=function(E){return w(E)===a},fe.isFragment=function(E){return w(E)===r},fe.isLazy=function(E){return w(E)===m},fe.isMemo=function(E){return w(E)===h},fe.isPortal=function(E){return w(E)===n},fe.isProfiler=function(E){return w(E)===i},fe.isStrictMode=function(E){return w(E)===o},fe.isSuspense=function(E){return w(E)===f},fe.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===r||E===s||E===i||E===o||E===f||E===d||typeof E=="object"&&E!==null&&(E.$$typeof===m||E.$$typeof===h||E.$$typeof===c||E.$$typeof===u||E.$$typeof===a||E.$$typeof===v||E.$$typeof===x||E.$$typeof===b||E.$$typeof===p)},fe.typeOf=w,fe}var de={};/** @license React v16.13.1
129
129
  * react-is.development.js
130
130
  *
131
131
  * Copyright (c) Facebook, Inc. and its affiliates.
132
132
  *
133
133
  * This source code is licensed under the MIT license found in the
134
134
  * LICENSE file in the root directory of this source tree.
135
- */var Wf;function hM(){return Wf||(Wf=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,i=e?Symbol.for("react.concurrent_mode"):60111,a=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(N){return typeof N=="string"||typeof N=="function"||N===r||N===i||N===s||N===o||N===f||N===d||typeof N=="object"&&N!==null&&(N.$$typeof===m||N.$$typeof===h||N.$$typeof===c||N.$$typeof===u||N.$$typeof===a||N.$$typeof===v||N.$$typeof===x||N.$$typeof===b||N.$$typeof===p)}function E(N){if(typeof N=="object"&&N!==null){var he=N.$$typeof;switch(he){case t:var Ee=N.type;switch(Ee){case l:case i:case r:case s:case o:case f:return Ee;default:var $e=Ee&&Ee.$$typeof;switch($e){case u:case a:case m:case h:case c:return $e;default:return he}}case n:return he}}}var S=l,T=i,P=u,A=c,O=t,R=a,I=r,D=m,F=h,B=n,q=s,G=o,H=f,U=!1;function L(N){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),M(N)||E(N)===l}function M(N){return E(N)===i}function k(N){return E(N)===u}function ee(N){return E(N)===c}function ne(N){return typeof N=="object"&&N!==null&&N.$$typeof===t}function X(N){return E(N)===a}function ie(N){return E(N)===r}function te(N){return E(N)===m}function V(N){return E(N)===h}function K(N){return E(N)===n}function Z(N){return E(N)===s}function W(N){return E(N)===o}function oe(N){return E(N)===f}fe.AsyncMode=S,fe.ConcurrentMode=T,fe.ContextConsumer=P,fe.ContextProvider=A,fe.Element=O,fe.ForwardRef=R,fe.Fragment=I,fe.Lazy=D,fe.Memo=F,fe.Portal=B,fe.Profiler=q,fe.StrictMode=G,fe.Suspense=H,fe.isAsyncMode=L,fe.isConcurrentMode=M,fe.isContextConsumer=k,fe.isContextProvider=ee,fe.isElement=ne,fe.isForwardRef=X,fe.isFragment=ie,fe.isLazy=te,fe.isMemo=V,fe.isPortal=K,fe.isProfiler=Z,fe.isStrictMode=W,fe.isSuspense=oe,fe.isValidElementType=w,fe.typeOf=E})()),fe}var qf;function ay(){return qf||(qf=1,process.env.NODE_ENV==="production"?Po.exports=dM():Po.exports=hM()),Po.exports}/*
135
+ */var Qf;function IM(){return Qf||(Qf=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,a=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(D){return typeof D=="string"||typeof D=="function"||D===r||D===s||D===i||D===o||D===f||D===d||typeof D=="object"&&D!==null&&(D.$$typeof===m||D.$$typeof===h||D.$$typeof===c||D.$$typeof===u||D.$$typeof===a||D.$$typeof===v||D.$$typeof===x||D.$$typeof===b||D.$$typeof===p)}function S(D){if(typeof D=="object"&&D!==null){var he=D.$$typeof;switch(he){case t:var Se=D.type;switch(Se){case l:case s:case r:case i:case o:case f:return Se;default:var $e=Se&&Se.$$typeof;switch($e){case u:case a:case m:case h:case c:return $e;default:return he}}case n:return he}}}var E=l,A=s,R=u,T=c,I=t,P=a,M=r,j=m,V=h,$=n,K=i,G=o,H=f,U=!1;function L(D){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),O(D)||S(D)===l}function O(D){return S(D)===s}function k(D){return S(D)===u}function ee(D){return S(D)===c}function ne(D){return typeof D=="object"&&D!==null&&D.$$typeof===t}function X(D){return S(D)===a}function ie(D){return S(D)===r}function te(D){return S(D)===m}function F(D){return S(D)===h}function Y(D){return S(D)===n}function Z(D){return S(D)===i}function q(D){return S(D)===o}function oe(D){return S(D)===f}de.AsyncMode=E,de.ConcurrentMode=A,de.ContextConsumer=R,de.ContextProvider=T,de.Element=I,de.ForwardRef=P,de.Fragment=M,de.Lazy=j,de.Memo=V,de.Portal=$,de.Profiler=K,de.StrictMode=G,de.Suspense=H,de.isAsyncMode=L,de.isConcurrentMode=O,de.isContextConsumer=k,de.isContextProvider=ee,de.isElement=ne,de.isForwardRef=X,de.isFragment=ie,de.isLazy=te,de.isMemo=F,de.isPortal=Y,de.isProfiler=Z,de.isStrictMode=q,de.isSuspense=oe,de.isValidElementType=w,de.typeOf=S})()),de}var Jf;function Ey(){return Jf||(Jf=1,process.env.NODE_ENV==="production"?Oo.exports=MM():Oo.exports=IM()),Oo.exports}/*
136
136
  object-assign
137
137
  (c) Sindre Sorhus
138
138
  @license MIT
139
- */var vs,Kf;function pM(){if(Kf)return vs;Kf=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var c={},u=0;u<10;u++)c["_"+String.fromCharCode(u)]=u;var l=Object.getOwnPropertyNames(c).map(function(a){return c[a]});if(l.join("")!=="0123456789")return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(a){i[a]=a}),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return vs=o()?Object.assign:function(s,c){for(var u,l=r(s),i,a=1;a<arguments.length;a++){u=Object(arguments[a]);for(var f in u)t.call(u,f)&&(l[f]=u[f]);if(e){i=e(u);for(var d=0;d<i.length;d++)n.call(u,i[d])&&(l[i[d]]=u[i[d]])}}return l},vs}var ys,Yf;function Vc(){if(Yf)return ys;Yf=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ys=e,ys}var xs,Xf;function cy(){return Xf||(Xf=1,xs=Function.call.bind(Object.prototype.hasOwnProperty)),xs}var bs,Zf;function mM(){if(Zf)return bs;Zf=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Vc(),n={},r=cy();e=function(s){var c="Warning: "+s;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}}}function o(s,c,u,l,i){if(process.env.NODE_ENV!=="production"){for(var a in s)if(r(s,a)){var f;try{if(typeof s[a]!="function"){var d=Error((l||"React class")+": "+u+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}f=s[a](c,a,l,u,null,t)}catch(m){f=m}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+u+" `"+a+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var h=i?i():"";e("Failed "+u+" type: "+f.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},bs=o,bs}var ws,Qf;function gM(){if(Qf)return ws;Qf=1;var e=ay(),t=pM(),n=Vc(),r=cy(),o=mM(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(u){var l="Warning: "+u;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function c(){return null}return ws=function(u,l){var i=typeof Symbol=="function"&&Symbol.iterator,a="@@iterator";function f(M){var k=M&&(i&&M[i]||M[a]);if(typeof k=="function")return k}var d="<<anonymous>>",h={array:x("array"),bigint:x("bigint"),bool:x("boolean"),func:x("function"),number:x("number"),object:x("object"),string:x("string"),symbol:x("symbol"),any:b(),arrayOf:w,element:E(),elementType:S(),instanceOf:T,node:R(),objectOf:A,oneOf:P,oneOfType:O,shape:D,exact:F};function m(M,k){return M===k?M!==0||1/M===1/k:M!==M&&k!==k}function p(M,k){this.message=M,this.data=k&&typeof k=="object"?k:{},this.stack=""}p.prototype=Error.prototype;function v(M){if(process.env.NODE_ENV!=="production")var k={},ee=0;function ne(ie,te,V,K,Z,W,oe){if(K=K||d,W=W||V,oe!==n){if(l){var N=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw N.name="Invariant Violation",N}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var he=K+":"+V;!k[he]&&ee<3&&(s("You are manually calling a React.PropTypes validation function for the `"+W+"` prop on `"+K+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),k[he]=!0,ee++)}}return te[V]==null?ie?te[V]===null?new p("The "+Z+" `"+W+"` is marked as required "+("in `"+K+"`, but its value is `null`.")):new p("The "+Z+" `"+W+"` is marked as required in "+("`"+K+"`, but its value is `undefined`.")):null:M(te,V,K,Z,W)}var X=ne.bind(null,!1);return X.isRequired=ne.bind(null,!0),X}function x(M){function k(ee,ne,X,ie,te,V){var K=ee[ne],Z=G(K);if(Z!==M){var W=H(K);return new p("Invalid "+ie+" `"+te+"` of type "+("`"+W+"` supplied to `"+X+"`, expected ")+("`"+M+"`."),{expectedType:M})}return null}return v(k)}function b(){return v(c)}function w(M){function k(ee,ne,X,ie,te){if(typeof M!="function")return new p("Property `"+te+"` of component `"+X+"` has invalid PropType notation inside arrayOf.");var V=ee[ne];if(!Array.isArray(V)){var K=G(V);return new p("Invalid "+ie+" `"+te+"` of type "+("`"+K+"` supplied to `"+X+"`, expected an array."))}for(var Z=0;Z<V.length;Z++){var W=M(V,Z,X,ie,te+"["+Z+"]",n);if(W instanceof Error)return W}return null}return v(k)}function E(){function M(k,ee,ne,X,ie){var te=k[ee];if(!u(te)){var V=G(te);return new p("Invalid "+X+" `"+ie+"` of type "+("`"+V+"` supplied to `"+ne+"`, expected a single ReactElement."))}return null}return v(M)}function S(){function M(k,ee,ne,X,ie){var te=k[ee];if(!e.isValidElementType(te)){var V=G(te);return new p("Invalid "+X+" `"+ie+"` of type "+("`"+V+"` supplied to `"+ne+"`, expected a single ReactElement type."))}return null}return v(M)}function T(M){function k(ee,ne,X,ie,te){if(!(ee[ne]instanceof M)){var V=M.name||d,K=L(ee[ne]);return new p("Invalid "+ie+" `"+te+"` of type "+("`"+K+"` supplied to `"+X+"`, expected ")+("instance of `"+V+"`."))}return null}return v(k)}function P(M){if(!Array.isArray(M))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),c;function k(ee,ne,X,ie,te){for(var V=ee[ne],K=0;K<M.length;K++)if(m(V,M[K]))return null;var Z=JSON.stringify(M,function(oe,N){var he=H(N);return he==="symbol"?String(N):N});return new p("Invalid "+ie+" `"+te+"` of value `"+String(V)+"` "+("supplied to `"+X+"`, expected one of "+Z+"."))}return v(k)}function A(M){function k(ee,ne,X,ie,te){if(typeof M!="function")return new p("Property `"+te+"` of component `"+X+"` has invalid PropType notation inside objectOf.");var V=ee[ne],K=G(V);if(K!=="object")return new p("Invalid "+ie+" `"+te+"` of type "+("`"+K+"` supplied to `"+X+"`, expected an object."));for(var Z in V)if(r(V,Z)){var W=M(V,Z,X,ie,te+"."+Z,n);if(W instanceof Error)return W}return null}return v(k)}function O(M){if(!Array.isArray(M))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),c;for(var k=0;k<M.length;k++){var ee=M[k];if(typeof ee!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+U(ee)+" at index "+k+"."),c}function ne(X,ie,te,V,K){for(var Z=[],W=0;W<M.length;W++){var oe=M[W],N=oe(X,ie,te,V,K,n);if(N==null)return null;N.data&&r(N.data,"expectedType")&&Z.push(N.data.expectedType)}var he=Z.length>0?", expected one of type ["+Z.join(", ")+"]":"";return new p("Invalid "+V+" `"+K+"` supplied to "+("`"+te+"`"+he+"."))}return v(ne)}function R(){function M(k,ee,ne,X,ie){return B(k[ee])?null:new p("Invalid "+X+" `"+ie+"` supplied to "+("`"+ne+"`, expected a ReactNode."))}return v(M)}function I(M,k,ee,ne,X){return new p((M||"React class")+": "+k+" type `"+ee+"."+ne+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+X+"`.")}function D(M){function k(ee,ne,X,ie,te){var V=ee[ne],K=G(V);if(K!=="object")return new p("Invalid "+ie+" `"+te+"` of type `"+K+"` "+("supplied to `"+X+"`, expected `object`."));for(var Z in M){var W=M[Z];if(typeof W!="function")return I(X,ie,te,Z,H(W));var oe=W(V,Z,X,ie,te+"."+Z,n);if(oe)return oe}return null}return v(k)}function F(M){function k(ee,ne,X,ie,te){var V=ee[ne],K=G(V);if(K!=="object")return new p("Invalid "+ie+" `"+te+"` of type `"+K+"` "+("supplied to `"+X+"`, expected `object`."));var Z=t({},ee[ne],M);for(var W in Z){var oe=M[W];if(r(M,W)&&typeof oe!="function")return I(X,ie,te,W,H(oe));if(!oe)return new p("Invalid "+ie+" `"+te+"` key `"+W+"` supplied to `"+X+"`.\nBad object: "+JSON.stringify(ee[ne],null," ")+`
140
- Valid keys: `+JSON.stringify(Object.keys(M),null," "));var N=oe(V,W,X,ie,te+"."+W,n);if(N)return N}return null}return v(k)}function B(M){switch(typeof M){case"number":case"string":case"undefined":return!0;case"boolean":return!M;case"object":if(Array.isArray(M))return M.every(B);if(M===null||u(M))return!0;var k=f(M);if(k){var ee=k.call(M),ne;if(k!==M.entries){for(;!(ne=ee.next()).done;)if(!B(ne.value))return!1}else for(;!(ne=ee.next()).done;){var X=ne.value;if(X&&!B(X[1]))return!1}}else return!1;return!0;default:return!1}}function q(M,k){return M==="symbol"?!0:k?k["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&k instanceof Symbol:!1}function G(M){var k=typeof M;return Array.isArray(M)?"array":M instanceof RegExp?"object":q(k,M)?"symbol":k}function H(M){if(typeof M>"u"||M===null)return""+M;var k=G(M);if(k==="object"){if(M instanceof Date)return"date";if(M instanceof RegExp)return"regexp"}return k}function U(M){var k=H(M);switch(k){case"array":case"object":return"an "+k;case"boolean":case"date":case"regexp":return"a "+k;default:return k}}function L(M){return!M.constructor||!M.constructor.name?d:M.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},ws}var Es,Jf;function vM(){if(Jf)return Es;Jf=1;var e=Vc();function t(){}function n(){}return n.resetWarningCache=t,Es=function(){function r(c,u,l,i,a,f){if(f!==e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},Es}var ed;function yM(){if(ed)return To.exports;if(ed=1,process.env.NODE_ENV!=="production"){var e=ay(),t=!0;To.exports=gM()(e.isElement,t)}else To.exports=vM()();return To.exports}var Ss,td;function xM(){if(td)return Ss;td=1;function e(v){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(b){return typeof b}:e=function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},e(v)}var t=o(_),n=o(fM()),r=o(yM());function o(v){return v&&v.__esModule?v:{default:v}}function s(v,x){if(!(v instanceof x))throw new TypeError("Cannot call a class as a function")}function c(v,x){for(var b=0;b<x.length;b++){var w=x[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(v,w.key,w)}}function u(v,x,b){return x&&c(v.prototype,x),v}function l(v,x){return x&&(e(x)==="object"||typeof x=="function")?x:a(v)}function i(v){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(b){return b.__proto__||Object.getPrototypeOf(b)},i(v)}function a(v){if(v===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v}function f(v,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function");v.prototype=Object.create(x&&x.prototype,{constructor:{value:v,writable:!0,configurable:!0}}),x&&d(v,x)}function d(v,x){return d=Object.setPrototypeOf||function(w,E){return w.__proto__=E,w},d(v,x)}var h,m=t.default.version.split(/[.-]/);m[0]==="0"&&(m[1]==="13"||m[1]==="12")?h=function(x){return x.getDOMNode()}:h=function(x){return x};var p=(function(v){f(x,v);function x(b){var w;return s(this,x),w=l(this,i(x).call(this,b)),w.renderElementRef=t.default.createRef(),w.update=w.update.bind(a(w)),w}return u(x,[{key:"shouldComponentUpdate",value:function(w){var E=this;return Object.keys(x.propTypes).some(function(S){return E.props[S]!==w[S]})}},{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var w=h(this.renderElementRef.current);try{new n.default(w,this.props.value,Object.assign({text:this.props.text||this.props.value},this.props))}catch(E){window.console.error(E)}}},{key:"render",value:function(){var w=this.props,E=w.id,S=w.className;if(this.props.renderer==="svg")return t.default.createElement("svg",{ref:this.renderElementRef,id:E,className:S});if(this.props.renderer==="canvas")return t.default.createElement("canvas",{ref:this.renderElementRef,id:E,className:S});if(this.props.renderer==="img")return t.default.createElement("img",{ref:this.renderElementRef,id:E,className:S})}}]),x})(t.default.Component);return p.propTypes={value:r.default.string.isRequired,text:r.default.string,renderer:r.default.string,format:r.default.string,width:r.default.number,height:r.default.number,displayValue:r.default.bool,fontOptions:r.default.string,font:r.default.string,textAlign:r.default.string,textPosition:r.default.string,textMargin:r.default.number,fontSize:r.default.number,background:r.default.string,lineColor:r.default.string,margin:r.default.number,marginTop:r.default.number,marginBottom:r.default.number,marginLeft:r.default.number,marginRight:r.default.number,id:r.default.string,className:r.default.string,ean128:r.default.bool},p.defaultProps={format:"CODE128",renderer:"svg",width:2,height:100,displayValue:!0,fontOptions:"",font:"monospace",textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,className:"",ean128:!1},Ss=p,Ss}var bM=xM();const wM=cd(bM),EM=e=>{const{value:t,className:n="",format:r="CODE128",width:o=2,height:s=100,displayValue:c=!0,fontSize:u=20,background:l="#FFFFFF",lineColor:i="#000000",margin:a=10,...f}=e,d=j.classNames("flex items-center justify-center",n);return g.jsx("div",{className:d,...f,children:g.jsx(wM,{value:t,format:r,width:o,height:s,displayValue:c,fontSize:u,background:l,lineColor:i,margin:a})})},SM=e=>{const{variant:t}=e;return t==="qr"?g.jsx(TO,{...e}):t==="barcode"?g.jsx(EM,{...e}):null},CM=({classNames:e,group:t=[],defaultValue:n="",ariaLabel:r="",onValueChange:o,...s})=>g.jsx(_E,{className:"flex flex-row gap-4",defaultValue:n,"aria-label":r,onValueChange:o,...s,children:t==null?void 0:t.map(({id:c,label:u,value:l,checked:i,disabled:a})=>g.jsxs("div",{className:"flex items-center",children:[g.jsx(RE,{className:j.classNames("size-4 cursor-pointer rounded-full bg-white outline-1 hover:outline-primary-blue focus:outline-primary-blue data-[state=checked]:outline-1 data-[state=checked]:outline-primary-blue outline-neutral-3",{"cursor-not-allowed outline-gray-5 bg-gray-3 hover:outline-neutral-3 data-[state=checked]:outline-neutral-3":a},e==null?void 0:e.item),disabled:a,defaultChecked:i,value:l,id:c,children:g.jsx(TE,{className:j.classNames("relative flex size-full items-center justify-center after:block after:size-2 after:rounded-full after:bg-primary-blue",{"after:bg-black/25":a},e==null?void 0:e.indicator)})}),g.jsx("label",{className:j.classNames("pl-2 text-[15px] leading-none text-black cursor-pointer",{"cursor-not-allowed text-black/25":a},e==null?void 0:e.label),htmlFor:c,children:u})]},c))}),_M="relative flex bg-gray-100 rounded-xl p-1 md:w-fit",RM="relative text-grays-Macropay-07 z-10 inline-flex items-center gap-1 text-sm font-medium transition-colors duration-200 justify-center flex-1 whitespace-nowrap",TM="cursor-not-allowed bg-gray-3 text-gray-6 opacity-50",PM="text-primary-blue",AM="flex-col",OM={sm:"h-6 rounded-md",md:"h-8",lg:"h-10 rounded-lg",xl:"h-12 rounded-lg"},MM={sm:"w-6 rounded-md",md:"w-8",lg:"w-10 rounded-lg",xl:"w-12 rounded-lg"},IM={sm:"px-3 py-[3px]",md:"px-3 py-[3px]",lg:"px-3 py-[3px]",xl:"px-3 py-[3px]"},DM=(e,t=!1)=>(t?MM:OM)[e]||"",NM=(e,t,n,r)=>j.classNames(_M,DM(e,t),t&&AM,n&&"opacity-50 cursor-not-allowed",r),jM=(e,t,n)=>(r,o)=>{e||r.disabled||(t(o),n==null||n(r.value))},kM=(e,t)=>e??t,LM=e=>e.map(t=>typeof t=="string"||typeof t=="number"?{label:t,value:t}:t),FM=(e,t)=>{const[n,r]=_.useState(0),o=_.useMemo(()=>LM(e),[e]);return _.useEffect(()=>{const s=o.findIndex(c=>c.value===t);s!==-1&&r(s)},[t,o]),{activeIndex:n,setActiveIndex:r,normalizedOptions:o}},VM=(e,t,n,r)=>{const[o,s]=_.useState({width:0,height:0,x:0,y:0}),c=_.useCallback(()=>{if(e.current){const u=e.current.children[t+1];if(u){const l=e.current.getBoundingClientRect(),i=u.getBoundingClientRect();s({width:i.width,height:i.height,x:i.left-l.left,y:i.top-l.top})}}},[e,t]);return _.useEffect(()=>{c()},[c,n,r]),_.useEffect(()=>{if(!e.current)return;const u=new ResizeObserver(()=>{c()});return u.observe(e.current),()=>{u.disconnect()}},[c]),o},BM={sm:"rounded-md",lg:"rounded-lg",xl:"rounded-lg"},$M=({indicatorStyle:e,vertical:t,size:n})=>{const r=BM[n]||"rounded-lg";return g.jsx(de.div,{className:j.classNames("absolute bg-white shadow-md",r,t?"left-1 right-1":"top-1 bottom-1"),animate:{left:t?4:e.x,top:t?e.y:4,width:t?"calc(100% - 8px)":e.width,height:t?e.height:"calc(100% - 8px)"},transition:{type:"spring",stiffness:500,damping:30}})},UM=(e,t,n)=>j.classNames(RM,IM[e],t&&TM,n?"w-full":"flex-shrink-0"),GM=({option:e,index:t,isActive:n,disabled:r,vertical:o,size:s,onClick:c})=>{const u=UM(s,e.disabled||r,o);return g.jsxs("button",{type:"button",className:j.classNames(u,n&&PM),onClick:()=>c(e,t),disabled:r||e.disabled,children:[e.icon&&g.jsx("span",{className:"text-base",children:e.icon}),e.label]},`${e.value}-${t}`)},HM={initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.3,ease:"easeOut"}},zM=({options:e,value:t,defaultValue:n,onChange:r,size:o="md",disabled:s=!1,vertical:c=!1,className:u,...l})=>{const i=_.useId(),a=_.useRef(null),{activeIndex:f,setActiveIndex:d,normalizedOptions:h}=FM(e,kM(t,n)),m=VM(a,f,o,c),p=jM(s,d,r),v=NM(o,c,s,u);return g.jsxs(de.div,{ref:a,id:`${i}-segmented`,className:v,...HM,...l,children:[g.jsx($M,{indicatorStyle:m,vertical:c,size:o}),h.map((x,b)=>g.jsx(GM,{option:x,index:b,isActive:b===f,disabled:s,vertical:c,size:o,onClick:p},`${x.value}-${b}`))]})},WM={sm:"h-6 text-sm py-px rounded-sm",md:"h-8 text-base py-[5px] rounded-md",lg:"h-10 text-lg py-2 rounded-lg",xl:"h-12 text-lg p-3 rounded-lg"},qM=({size:e,disabled:t,className:n,triggerRef:r,placeholder:o})=>g.jsxs(tS,{ref:r,disabled:t,className:j.classNames("outline-1 outline-gray-7 px-3 py-[5px] bg-white flex justify-between items-center cursor-pointer h-auto!",n,WM[e],{"bg-gray-3 text-gray-6 outline-gray-5 cursor-not-allowed":t}),children:[g.jsx(nS,{className:j.classNames("text-black truncate flex-1",{"text-gray-6":t}),placeholder:o}),g.jsx(rS,{className:"flex items-center",children:g.jsx(ce.SvgChevronLeft,{className:j.classNames("-rotate-90",{"text-gray-6":t})})})]}),ly=_.forwardRef(({children:e,className:t,disabled:n,...r},o)=>g.jsx(aS,{ref:o,disabled:n,className:j.classNames("w-full h-auto outline-0 hover:bg-gray-3 px-4 py-[5px] cursor-pointer",{"text-gray-6 cursor-not-allowed":n},t),...r,children:g.jsx(cS,{className:"whitespace-nowrap",children:e})}));ly.displayName="SelectItem";const KM=({message:e="No hay elementos disponibles."})=>g.jsx("div",{className:"w-full h-24 flex justify-center items-center text-gray-6 text-sm",children:e}),uy=_.forwardRef(({value:e,onChange:t,placeholder:n="Buscar...",disabled:r},o)=>g.jsx("div",{className:"px-2 py-2 border-b border-gray-4 bg-white sticky top-0",onPointerDown:s=>{s.stopPropagation()},children:g.jsx("input",{ref:o,type:"text",value:e,onChange:t,placeholder:n,disabled:r,autoComplete:"off",autoFocus:!0,className:j.classNames("w-full px-3 py-1.5 text-sm border border-gray-4 rounded outline-none","focus:border-primary-blue focus:ring-1 focus:ring-primary-blue","disabled:bg-gray-3 disabled:cursor-not-allowed"),onKeyDown:s=>{s.stopPropagation()},onMouseDown:s=>{s.stopPropagation()},onPointerDown:s=>{s.stopPropagation()}})}));uy.displayName="SearchInput";const YM=({width:e,allItems:t,filteredItems:n,currentValue:r,emptyMessage:o,showSearch:s,searchValue:c="",onSearchChange:u,searchPlaceholder:l,disabled:i,notFoundContent:a,inputRef:f})=>{const d=(n==null?void 0:n.length)===0&&!r;let h;return c&&a?h=a:c?h="No results found":h=o||"No elements available.",g.jsxs(iS,{position:"popper",sideOffset:5,className:j.classNames("overflow-hidden rounded-lg bg-white shadow-lg border border-gray-4 min-w-[200px] max-w-[350px] w-auto"),style:e?{width:e}:{},children:[s&&u&&g.jsx(uy,{ref:f,value:c,onChange:u,placeholder:l,disabled:i}),g.jsx(sS,{className:"space-y-1",children:d?g.jsx(KM,{message:h}):g.jsx(g.Fragment,{children:t==null?void 0:t.map(m=>{const p=n.some(v=>v.value===m.value);return g.jsx(ly,{value:m.value,disabled:m==null?void 0:m.disabled,className:p?"":"hidden",children:m.children},m.value)})})})]})},XM=e=>{const[t,n]=_.useState(0),r=_.useRef(null);return _.useEffect(()=>{r.current&&n(r.current.offsetWidth)},[e]),{triggerWidth:t,triggerRef:r}},ZM=({showSearch:e,items:t,filterOption:n,onSearch:r})=>{const[o,s]=_.useState(""),[c,u]=_.useState(!1),l=_.useRef(null);_.useEffect(()=>{c||s("")},[c]),_.useEffect(()=>{c&&e&&l.current&&requestAnimationFrame(()=>{var d;(d=l.current)==null||d.focus()})},[c,e,o]);const i=(d,h)=>{if(!d)return!0;const m=d.toLowerCase(),p=typeof h.children=="string"?h.children.toLowerCase():"",v=h.value.toLowerCase();return p.includes(m)||v.includes(m)},a=e?t.filter(d=>(n||i)(o,d)):t;return{searchValue:o,open:c,setOpen:u,filteredItems:a,handleSearchChange:d=>{const h=d.target.value;s(h),r==null||r(h)},inputRef:l}},QM=({value:e,defaultValue:t,onValueChange:n})=>{const[r,o]=_.useState(t);return _.useEffect(()=>{e!==void 0&&o(e)},[e]),{currentValue:e??r,handleValueChange:u=>{e===void 0&&o(u),n==null||n(u)}}},JM=({disabled:e,className:t,value:n,defaultValue:r,size:o="md",items:s=[],placeholder:c="Selecciona un elemento...",emptyMessage:u="No hay elementos disponibles.",onValueChange:l,showSearch:i=!1,searchPlaceholder:a="Buscar...",onSearch:f,filterOption:d,notFoundContent:h})=>{const{currentValue:m,handleValueChange:p}=QM({value:n,defaultValue:r,onValueChange:l}),{triggerWidth:v,triggerRef:x}=XM(t),{searchValue:b,open:w,setOpen:E,filteredItems:S,handleSearchChange:T,inputRef:P}=ZM({showSearch:i,items:s,filterOption:d,onSearch:f});return g.jsxs(eS,{value:m,onValueChange:p,open:w,onOpenChange:E,children:[g.jsx(qM,{size:o,disabled:e,className:t,triggerRef:x,placeholder:c}),g.jsx(oS,{children:g.jsx(YM,{width:v,allItems:s,filteredItems:S,currentValue:m,emptyMessage:u,showSearch:i,searchValue:b,onSearchChange:T,searchPlaceholder:a,disabled:e,notFoundContent:h,inputRef:P})})]})},eI=()=>g.jsxs("div",{role:"status",className:"animate-pulse",children:[g.jsxs("div",{className:"flex items-center justify-center mt-4",children:[g.jsx(ce.SvgSkeletonAvatar,{}),g.jsxs("div",{className:"flex flex-col space-y-2",children:[g.jsx("div",{className:"w-20 h-3.5 bg-gray-200 rounded-full dark:bg-gray-700 me-3"}),g.jsx("div",{className:"w-24 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]})]}),g.jsx("span",{className:"sr-only",children:"Loading..."})]}),fy=()=>g.jsxs("div",{role:"status","aria-hidden":!0,className:"animate-pulse",children:[g.jsx("div",{className:"h-3.5 bg-gray-200 rounded-full dark:bg-gray-700 w-48 mb-4"}),g.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),g.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),g.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),g.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),g.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 "}),g.jsx("span",{className:"sr-only",children:"Loading..."})]}),tI=()=>g.jsxs("div",{role:"status",className:"space-y-8 animate-pulse md:space-y-0 md:space-x-8 rtl:space-x-reverse md:flex md:items-center",children:[g.jsx("div",{className:"flex items-center justify-center w-full h-48 bg-gray-300 rounded sm:w-96 dark:bg-gray-700",children:g.jsx(ce.SvgSkeletonImage,{})}),g.jsx("span",{className:"sr-only",children:"Loading..."})]}),nI=()=>g.jsxs("div",{role:"status",className:"space-y-8 animate-pulse md:space-y-0 md:space-x-8 rtl:space-x-reverse md:flex md:items-center",children:[g.jsx("div",{className:"flex items-center justify-center w-full h-48 bg-gray-300 rounded sm:w-96 dark:bg-gray-700",children:g.jsx(ce.SvgSkeletonImage,{})}),g.jsxs("div",{className:"w-full",children:[g.jsx("div",{className:"h-3.5 bg-gray-200 rounded-full dark:bg-gray-700 w-48 mb-4"}),g.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[480px] mb-2.5"}),g.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),g.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[440px] mb-2.5"}),g.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[460px] mb-2.5"}),g.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[360px]"})]}),g.jsx("span",{className:"sr-only",children:"Loading..."})]}),rI=()=>g.jsxs("div",{role:"status",className:"p-4 space-y-4 border border-gray-200 divide-y divide-gray-200 rounded shadow animate-pulse dark:divide-gray-700 md:p-6 dark:border-gray-700",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{children:[g.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"}),g.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]}),g.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]}),g.jsxs("div",{className:"flex items-center justify-between pt-4",children:[g.jsxs("div",{children:[g.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"}),g.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]}),g.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]}),g.jsxs("div",{className:"flex items-center justify-between pt-4",children:[g.jsxs("div",{children:[g.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"}),g.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]}),g.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]}),g.jsxs("div",{className:"flex items-center justify-between pt-4",children:[g.jsxs("div",{children:[g.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"}),g.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]}),g.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]}),g.jsxs("div",{className:"flex items-center justify-between pt-4",children:[g.jsxs("div",{children:[g.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"}),g.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]}),g.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]}),g.jsx("span",{className:"sr-only",children:"Loading..."})]}),oI={default:fy,avatar:eI,image:tI,"image-description":nI,list:rI},iI=({type:e="default"})=>{const t=oI[e]??fy;return g.jsx(t,{})},sI={sm:"h-1",md:"h-2",lg:"h-3",xl:"h-4"},aI={primary:"bg-primary-blue",success:"bg-green-500",warning:"bg-yellow-500",error:"bg-red-500",info:"bg-blue-400"},cI={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-7 w-7"},lI=({classNames:e,rangeColor:t="primary",customRangeClass:n,size:r="md",showLabels:o=!1,formatLabel:s,min:c=0,max:u=100,...l})=>{const i=a=>s?s(a):a.toString();return g.jsxs("div",{className:"w-full",children:[g.jsxs(CS,{className:j.classNames("relative flex items-center select-none touch-none w-full",e==null?void 0:e.root),min:c,max:u,...l,children:[g.jsx(_S,{className:j.classNames("relative grow rounded-full bg-gray-200",sI[r],e==null?void 0:e.track),children:g.jsx(RS,{className:j.classNames("absolute rounded-full h-full",n||aI[t],e==null?void 0:e.range)})}),g.jsx(TS,{className:j.classNames("block rounded-full bg-white border-2 border-primary-blue shadow-md hover:shadow-lg","focus:outline-none focus:ring-2 focus:ring-primary-blue focus:ring-offset-2","transition-shadow cursor-pointer",cI[r],e==null?void 0:e.thumb)})]}),o&&g.jsxs("div",{className:j.classNames("flex justify-between mt-2 text-sm text-gray-600",e==null?void 0:e.labels),children:[g.jsx("span",{className:e==null?void 0:e.startLabelClass,children:i(c)}),g.jsx("span",{className:e==null?void 0:e.endLabelClass,children:i(u)})]})]})},uI={sm:"size-6",md:"size-8",lg:"size-10",xl:"size-12"},fI={sm:"size-5",md:"size-6",lg:"size-7",xl:"size-8"},Cs={sm:"text-xs",md:"text-sm",lg:"text-base",xl:"text-lg"},dI={sm:"size-6",md:"size-8",lg:"size-10",xl:"size-12"},hI={sm:2,md:4,lg:6,xl:8},nd=({disabled:e,onClick:t,arrow:n,size:r})=>{const o=`${e?"text-gray-6":"text-primary-blue"}`,s={right:g.jsx(ce.SvgRight,{className:o}),left:g.jsx(ce.SvgLeft,{className:o})},c=j.classNames("flex items-center justify-center rounded-md border disabled:border-zinc-300 disabled:bg-neutral-100 disabled:text-stone-300 shadow-none transition-colors duration-300 ease-linear bg-white border-gray-5 text-gray-4 transitions-all easy-out hover:text-blue-900 hover:border-blue-900",uI[r]);return g.jsx("button",{"aria-label":`stepButton-${n}`,type:"button",className:c,disabled:e,onClick:t,children:s[n]})},pI=({id:e,name:t,status:n,href:r,size:o="md"})=>{const s=j.classNames("flex items-center justify-center rounded-full",fI[o],{"border border-primary-blue":n==="COMPLETE","bg-primary-blue":n==="CURRENT","border border-gray-6":n==="PENDING"}),c=j.classNames("font-medium",Cs[o],{"text-primary-blue":n==="CURRENT","text-gray-6":n==="PENDING"}),u=j.classNames("font-medium",Cs[o],{"text-white":n==="CURRENT","text-gray-6":n==="PENDING"});return g.jsxs("a",{href:r,className:j.classNames("flex gap-2 font-medium items-center",Cs[o]),children:[g.jsx("span",{className:s,children:n==="COMPLETE"?g.jsx(ce.SvgDone,{className:j.classNames("text-primary-blue",dI[o]),"aria-hidden":"true"}):g.jsx("span",{className:u,children:e})}),g.jsx("span",{className:c,children:t})]})},mI=({visibleSteps:e,size:t})=>{const n=hI[t];return g.jsx(We,{gap:n,justify:"center",children:e.map((r,o)=>g.jsxs(We,{gap:n,align:"center",children:[g.jsx(pI,{...r,size:t}),o+1!==e.length&&g.jsx(ce.SvgRight,{className:"text-gray-5"})]},crypto.randomUUID()))})},_s=(e,t,n,r)=>e?4:t?3:n?2:r?1:3,gI=e=>{const t=e.find(n=>n.status==="CURRENT");return t?Number(t.id)-1:0},vI=e=>e===0,yI=(e,t,n)=>e>=t-n,xI=e=>e-1,bI=e=>e+1,wI=({steps:e,size:t="md",className:n=""})=>{const{xs:r,sm:o,md:s,lg:c}=sd.useBreakpoint(),[u,l]=_.useState(()=>_s(c,s,o,r)),i=gI(e),[a,f]=_.useState(()=>{const b=_s(c,s,o,r),w=Math.max(0,e.length-b);return Math.min(i,w)}),[d,h]=_.useState([]);_.useEffect(()=>{l(_s(c,s,o,r))},[r,o,s,c]),_.useEffect(()=>{const b=Math.min(a+u,e.length);h(e.slice(a,b))},[a,e,u]);const m=()=>f(xI(a)),p=()=>f(bI(a)),v=vI(a),x=yI(a,e.length,u);return g.jsxs("div",{className:j.classNames("flex flex-row items-center w-full justify-between gap-4",{[n]:n}),children:[g.jsx(nd,{arrow:"left",disabled:v,onClick:m,size:t}),g.jsx(mI,{visibleSteps:d,size:t}),g.jsx(nd,{arrow:"right",disabled:x,onClick:p,size:t})]})},Bc={md:{root:"h-[22px] w-11",thumb:"size-[18px]",children:"h-4 w-4 text-xs"},sm:{root:"h-4 w-7",thumb:"size-3",children:"h-3 w-3 text-[10px]"}},Kn={root:"relative peer focus-visible:border-ring focus-visible:ring-ring/50 flex px-px shrink-0 items-center justify-start rounded-full border border-transparent shadow-xs outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[state=unchecked]:bg-gray-6 dark:data-[state=unchecked]:bg-input/80 data-[state=checked]:justify-end transition-colors duration-200",thumb:"relative z-10 bg-white pointer-events-none block rounded-full ring-0 shadow-sm",children:"absolute flex items-center justify-center text-white/80 transition-opacity duration-200",unCheckedChildren:"left-1 data-[state=checked]:opacity-0 data-[state=checked]:invisible",checkedChildren:"right-1 data-[state=unchecked]:opacity-0 data-[state=unchecked]:invisible"},EI={default:"data-[state=checked]:bg-[#0047BA]",success:"data-[state=checked]:bg-green-500",danger:"data-[state=checked]:bg-red-500"},SI=(e,t,n,r)=>j.classNames(Kn.root,EI[e],Bc[t].root,n&&"cursor-not-allowed",r),rd=(e,t)=>{const n=t?Kn.checkedChildren:Kn.unCheckedChildren;return j.classNames(Kn.children,n,Bc[e].children)},CI=e=>{const t=typeof e=="string"?e:e.text,n=typeof e=="string"?"right":e.position;return{labelText:t,labelPosition:n}},od=e=>j.classNames("text-sm text-foreground",e&&"opacity-50"),_I=e=>j.classNames("flex items-center gap-2",e&&"cursor-not-allowed"),RI={type:"spring",stiffness:500,damping:30,mass:1},TI=({className:e,label:t,type:n="default",size:r="md",checked:o,defaultChecked:s=!1,disabled:c=!1,onCheckedChange:u,checkedChildren:l,unCheckedChildren:i,...a})=>{const f=Bc[r],d=g.jsxs(IS,{className:SI(n,r,c,e),checked:o,defaultChecked:s,disabled:c,onCheckedChange:u,...a,children:[i&&g.jsx("div",{className:rd(r,!1),children:i}),g.jsx(DS,{asChild:!0,children:g.jsx(de.div,{className:j.classNames(Kn.thumb,f.thumb),layout:!0,transition:RI,whileTap:{scale:.95}})}),l&&g.jsx("div",{className:rd(r,!0),children:l})]});if(t){const{labelText:h,labelPosition:m}=CI(t);return g.jsxs("div",{className:_I(c),children:[m==="left"&&g.jsx("span",{className:od(c),children:h}),d,m==="right"&&g.jsx("span",{className:od(c),children:h})]})}return d},PI={success:{icon:g.jsx(ce.SvgIconCheckCircle,{width:16,height:16}),bgColor:"bg-green-1",textColor:"text-green-6",borderColor:"border-green-3",closeButtonColor:"hover:bg-green-2"},info:{icon:g.jsx(ce.SvgIconInfoCircle,{width:16,height:16}),bgColor:"bg-blue-1",textColor:"text-blue-6",borderColor:"border-blue-3",closeButtonColor:"hover:bg-blue-2"},warning:{icon:g.jsx(ce.SvgIconWarningCircle,{width:16,height:16}),bgColor:"bg-gold-1",textColor:"text-gold-6",borderColor:"border-gold-3",closeButtonColor:"hover:bg-gold-2"},error:{icon:g.jsx(ce.SvgIconErrorCircle,{width:16,height:16}),bgColor:"bg-red-1",textColor:"text-red-6",borderColor:"border-red-3",closeButtonColor:"hover:bg-red-2"}},AI=({children:e,type:t="info",showIcon:n=!1,closable:r=!1,onClose:o,className:s="",icon:c,bgColor:u,textColor:l,borderColor:i,...a})=>{const f=!!(u||l||i),d=PI[t],h=c||(n?d.icon:null),m=j.classNames("inline-flex items-center gap-2 px-2 py-2 rounded border text-sm font-medium leading-none rounded-sm",{[d.bgColor]:!f,[d.textColor]:!f,[d.borderColor]:!f,[s]:s}),p=f?{backgroundColor:u,color:l,borderColor:i}:void 0,v=j.classNames("rounded transition-colors cursor-pointer text-black/[0.45]",{[d.closeButtonColor]:!f});return g.jsxs("span",{className:m,style:p,...a,children:[h&&g.jsx("span",{className:"inline-flex shrink-0",children:h}),g.jsx("span",{className:"inline-flex items-center",children:e}),r&&g.jsx("button",{onClick:o,className:v,"aria-label":"Remove tag",type:"button",children:g.jsx(ce.SvgClose,{width:16,height:16})})]})},OI=({name:e,label:t,children:n})=>g.jsxs(zw,{name:e,children:[t&&g.jsx(Ww,{children:t}),n]}),MI=({type:e,error:t,disabled:n,readOnly:r,inputSize:o,className:s="",classesNames:c})=>j.classNames("block w-full p-2 focus:outline-none text-black rounded-lg h-[150px] transition duration-200 ease-in-out",{"border border-gray-7 focus:border-tints-Blue-30 focus:shadow-[0px_0px_0px_2px_#E6EDF8]":e==="normal"&&!n&&!t,"bg-transparent border-b border-gray-7 rounded-none focus:border-b-tints-Blue-30":e==="underline"&&!t&&!n,"border-red-400 focus:shadow-[0px_0px_0px_2px_#FFCCC7]":t&&e!=="underline","border-b border-red-400 rounded-none":t&&e==="underline","cursor-not-allowed bg-gray-3 text-gray-6":n&&e==="normal","cursor-not-allowed text-gray-6":n&&e==="underline","cursor-not-allowed font-semibold text-primary-blue":r,"h-8 text-sm":o==="sm","h-9 text-base":o==="md","h-10 text-base":o==="lg","h-12 text-base":o==="xl",[s]:s,[(c==null?void 0:c.input)??""]:c==null?void 0:c.input}),II=({type:e="normal",inputSize:t="xl",className:n,classesNames:r,clearOnFocus:o,onFocus:s,...c})=>g.jsx(qw,{asChild:!0,children:g.jsx("textarea",{...c,className:MI({type:e,inputSize:t,className:n,classesNames:r,disabled:c.disabled,readOnly:c.readOnly}),onFocus:u=>{o&&(u.currentTarget.value=""),s==null||s(u)}})}),DI=({footer:e,current:t=0,max:n})=>g.jsxs("div",{className:"flex justify-between pt-1 text-sm text-gray-7",children:[g.jsx("span",{children:e}),n&&g.jsx("span",{children:`${t} / ${n}`})]}),NI=({name:e,label:t,labelFooter:n,error:r,maxLength:o,minLength:s,defaultValue:c="",classesNames:u,...l})=>{const[i,a]=_.useState(c);return g.jsx(Hw,{children:g.jsxs(de.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},className:u==null?void 0:u.container,children:[g.jsx(OI,{name:e,label:t,children:g.jsx(II,{...l,maxLength:o,minLength:s,value:i,onChange:f=>{var d;a(f.target.value),(d=l.onChange)==null||d.call(l,f)}})}),g.jsx(DI,{footer:n??`${s} caracteres requeridos`,current:i.length,max:o}),r&&g.jsx(Kw,{className:u==null?void 0:u.messageError,children:r})]})})},jI=({className:e,content:t,children:n,...r})=>{const o=typeof t=="string";return g.jsx(YS,{children:g.jsxs(XS,{children:[g.jsx(ZS,{asChild:!0,children:n}),g.jsx(QS,{children:g.jsx(JS,{className:e,asChild:!0,...r,children:g.jsxs(de.div,{className:j.classNames({"bg-gray-800 text-white rounded shadow-lg select-none px-4 py-2 outline-none border-0":o&&!e}),initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.15},children:[t,g.jsx(eC,{className:"w-4 h-2"})]})})})]})})};exports.Accordion=VP;exports.Alert=HP;exports.Avatar=WP;exports.Button=ma;exports.Card=QP;exports.Checkbox=Dv;exports.Divider=iA;exports.Drawer=cA;exports.Dropdown=mA;exports.Empty=gA;exports.Flex=We;exports.Input=PA;exports.List=HA;exports.Modal=ZA;exports.Notification=iO;exports.Pagination=Bv;exports.Popover=pO;exports.Portal=Nv;exports.Progress=vO;exports.QRBarcode=SM;exports.RadioGroup=CM;exports.Segmented=zM;exports.Select=JM;exports.Skeleton=iI;exports.Slider=lI;exports.Spinner=my;exports.SpinnerSizeMap=ld;exports.Steps=wI;exports.Switch=TI;exports.Tag=AI;exports.TextArea=NI;exports.Tooltip=jI;exports.Typography=Pn;
139
+ */var xs,ed;function NM(){if(ed)return xs;ed=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var c={},u=0;u<10;u++)c["_"+String.fromCharCode(u)]=u;var l=Object.getOwnPropertyNames(c).map(function(a){return c[a]});if(l.join("")!=="0123456789")return!1;var s={};return"abcdefghijklmnopqrst".split("").forEach(function(a){s[a]=a}),Object.keys(Object.assign({},s)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return xs=o()?Object.assign:function(i,c){for(var u,l=r(i),s,a=1;a<arguments.length;a++){u=Object(arguments[a]);for(var f in u)t.call(u,f)&&(l[f]=u[f]);if(e){s=e(u);for(var d=0;d<s.length;d++)n.call(u,s[d])&&(l[s[d]]=u[s[d]])}}return l},xs}var bs,td;function Gc(){if(td)return bs;td=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return bs=e,bs}var ws,nd;function Sy(){return nd||(nd=1,ws=Function.call.bind(Object.prototype.hasOwnProperty)),ws}var Es,rd;function jM(){if(rd)return Es;rd=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Gc(),n={},r=Sy();e=function(i){var c="Warning: "+i;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}}}function o(i,c,u,l,s){if(process.env.NODE_ENV!=="production"){for(var a in i)if(r(i,a)){var f;try{if(typeof i[a]!="function"){var d=Error((l||"React class")+": "+u+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}f=i[a](c,a,l,u,null,t)}catch(m){f=m}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+u+" `"+a+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var h=s?s():"";e("Failed "+u+" type: "+f.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Es=o,Es}var Ss,od;function DM(){if(od)return Ss;od=1;var e=Ey(),t=NM(),n=Gc(),r=Sy(),o=jM(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(u){var l="Warning: "+u;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function c(){return null}return Ss=function(u,l){var s=typeof Symbol=="function"&&Symbol.iterator,a="@@iterator";function f(O){var k=O&&(s&&O[s]||O[a]);if(typeof k=="function")return k}var d="<<anonymous>>",h={array:x("array"),bigint:x("bigint"),bool:x("boolean"),func:x("function"),number:x("number"),object:x("object"),string:x("string"),symbol:x("symbol"),any:b(),arrayOf:w,element:S(),elementType:E(),instanceOf:A,node:P(),objectOf:T,oneOf:R,oneOfType:I,shape:j,exact:V};function m(O,k){return O===k?O!==0||1/O===1/k:O!==O&&k!==k}function p(O,k){this.message=O,this.data=k&&typeof k=="object"?k:{},this.stack=""}p.prototype=Error.prototype;function v(O){if(process.env.NODE_ENV!=="production")var k={},ee=0;function ne(ie,te,F,Y,Z,q,oe){if(Y=Y||d,q=q||F,oe!==n){if(l){var D=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw D.name="Invariant Violation",D}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var he=Y+":"+F;!k[he]&&ee<3&&(i("You are manually calling a React.PropTypes validation function for the `"+q+"` prop on `"+Y+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),k[he]=!0,ee++)}}return te[F]==null?ie?te[F]===null?new p("The "+Z+" `"+q+"` is marked as required "+("in `"+Y+"`, but its value is `null`.")):new p("The "+Z+" `"+q+"` is marked as required in "+("`"+Y+"`, but its value is `undefined`.")):null:O(te,F,Y,Z,q)}var X=ne.bind(null,!1);return X.isRequired=ne.bind(null,!0),X}function x(O){function k(ee,ne,X,ie,te,F){var Y=ee[ne],Z=G(Y);if(Z!==O){var q=H(Y);return new p("Invalid "+ie+" `"+te+"` of type "+("`"+q+"` supplied to `"+X+"`, expected ")+("`"+O+"`."),{expectedType:O})}return null}return v(k)}function b(){return v(c)}function w(O){function k(ee,ne,X,ie,te){if(typeof O!="function")return new p("Property `"+te+"` of component `"+X+"` has invalid PropType notation inside arrayOf.");var F=ee[ne];if(!Array.isArray(F)){var Y=G(F);return new p("Invalid "+ie+" `"+te+"` of type "+("`"+Y+"` supplied to `"+X+"`, expected an array."))}for(var Z=0;Z<F.length;Z++){var q=O(F,Z,X,ie,te+"["+Z+"]",n);if(q instanceof Error)return q}return null}return v(k)}function S(){function O(k,ee,ne,X,ie){var te=k[ee];if(!u(te)){var F=G(te);return new p("Invalid "+X+" `"+ie+"` of type "+("`"+F+"` supplied to `"+ne+"`, expected a single ReactElement."))}return null}return v(O)}function E(){function O(k,ee,ne,X,ie){var te=k[ee];if(!e.isValidElementType(te)){var F=G(te);return new p("Invalid "+X+" `"+ie+"` of type "+("`"+F+"` supplied to `"+ne+"`, expected a single ReactElement type."))}return null}return v(O)}function A(O){function k(ee,ne,X,ie,te){if(!(ee[ne]instanceof O)){var F=O.name||d,Y=L(ee[ne]);return new p("Invalid "+ie+" `"+te+"` of type "+("`"+Y+"` supplied to `"+X+"`, expected ")+("instance of `"+F+"`."))}return null}return v(k)}function R(O){if(!Array.isArray(O))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),c;function k(ee,ne,X,ie,te){for(var F=ee[ne],Y=0;Y<O.length;Y++)if(m(F,O[Y]))return null;var Z=JSON.stringify(O,function(oe,D){var he=H(D);return he==="symbol"?String(D):D});return new p("Invalid "+ie+" `"+te+"` of value `"+String(F)+"` "+("supplied to `"+X+"`, expected one of "+Z+"."))}return v(k)}function T(O){function k(ee,ne,X,ie,te){if(typeof O!="function")return new p("Property `"+te+"` of component `"+X+"` has invalid PropType notation inside objectOf.");var F=ee[ne],Y=G(F);if(Y!=="object")return new p("Invalid "+ie+" `"+te+"` of type "+("`"+Y+"` supplied to `"+X+"`, expected an object."));for(var Z in F)if(r(F,Z)){var q=O(F,Z,X,ie,te+"."+Z,n);if(q instanceof Error)return q}return null}return v(k)}function I(O){if(!Array.isArray(O))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),c;for(var k=0;k<O.length;k++){var ee=O[k];if(typeof ee!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+U(ee)+" at index "+k+"."),c}function ne(X,ie,te,F,Y){for(var Z=[],q=0;q<O.length;q++){var oe=O[q],D=oe(X,ie,te,F,Y,n);if(D==null)return null;D.data&&r(D.data,"expectedType")&&Z.push(D.data.expectedType)}var he=Z.length>0?", expected one of type ["+Z.join(", ")+"]":"";return new p("Invalid "+F+" `"+Y+"` supplied to "+("`"+te+"`"+he+"."))}return v(ne)}function P(){function O(k,ee,ne,X,ie){return $(k[ee])?null:new p("Invalid "+X+" `"+ie+"` supplied to "+("`"+ne+"`, expected a ReactNode."))}return v(O)}function M(O,k,ee,ne,X){return new p((O||"React class")+": "+k+" type `"+ee+"."+ne+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+X+"`.")}function j(O){function k(ee,ne,X,ie,te){var F=ee[ne],Y=G(F);if(Y!=="object")return new p("Invalid "+ie+" `"+te+"` of type `"+Y+"` "+("supplied to `"+X+"`, expected `object`."));for(var Z in O){var q=O[Z];if(typeof q!="function")return M(X,ie,te,Z,H(q));var oe=q(F,Z,X,ie,te+"."+Z,n);if(oe)return oe}return null}return v(k)}function V(O){function k(ee,ne,X,ie,te){var F=ee[ne],Y=G(F);if(Y!=="object")return new p("Invalid "+ie+" `"+te+"` of type `"+Y+"` "+("supplied to `"+X+"`, expected `object`."));var Z=t({},ee[ne],O);for(var q in Z){var oe=O[q];if(r(O,q)&&typeof oe!="function")return M(X,ie,te,q,H(oe));if(!oe)return new p("Invalid "+ie+" `"+te+"` key `"+q+"` supplied to `"+X+"`.\nBad object: "+JSON.stringify(ee[ne],null," ")+`
140
+ Valid keys: `+JSON.stringify(Object.keys(O),null," "));var D=oe(F,q,X,ie,te+"."+q,n);if(D)return D}return null}return v(k)}function $(O){switch(typeof O){case"number":case"string":case"undefined":return!0;case"boolean":return!O;case"object":if(Array.isArray(O))return O.every($);if(O===null||u(O))return!0;var k=f(O);if(k){var ee=k.call(O),ne;if(k!==O.entries){for(;!(ne=ee.next()).done;)if(!$(ne.value))return!1}else for(;!(ne=ee.next()).done;){var X=ne.value;if(X&&!$(X[1]))return!1}}else return!1;return!0;default:return!1}}function K(O,k){return O==="symbol"?!0:k?k["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&k instanceof Symbol:!1}function G(O){var k=typeof O;return Array.isArray(O)?"array":O instanceof RegExp?"object":K(k,O)?"symbol":k}function H(O){if(typeof O>"u"||O===null)return""+O;var k=G(O);if(k==="object"){if(O instanceof Date)return"date";if(O instanceof RegExp)return"regexp"}return k}function U(O){var k=H(O);switch(k){case"array":case"object":return"an "+k;case"boolean":case"date":case"regexp":return"a "+k;default:return k}}function L(O){return!O.constructor||!O.constructor.name?d:O.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},Ss}var Cs,id;function kM(){if(id)return Cs;id=1;var e=Gc();function t(){}function n(){}return n.resetWarningCache=t,Cs=function(){function r(c,u,l,s,a,f){if(f!==e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},Cs}var sd;function LM(){if(sd)return Ao.exports;if(sd=1,process.env.NODE_ENV!=="production"){var e=Ey(),t=!0;Ao.exports=DM()(e.isElement,t)}else Ao.exports=kM()();return Ao.exports}var _s,ad;function FM(){if(ad)return _s;ad=1;function e(v){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(b){return typeof b}:e=function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},e(v)}var t=o(_),n=o(OM()),r=o(LM());function o(v){return v&&v.__esModule?v:{default:v}}function i(v,x){if(!(v instanceof x))throw new TypeError("Cannot call a class as a function")}function c(v,x){for(var b=0;b<x.length;b++){var w=x[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(v,w.key,w)}}function u(v,x,b){return x&&c(v.prototype,x),v}function l(v,x){return x&&(e(x)==="object"||typeof x=="function")?x:a(v)}function s(v){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(b){return b.__proto__||Object.getPrototypeOf(b)},s(v)}function a(v){if(v===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v}function f(v,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function");v.prototype=Object.create(x&&x.prototype,{constructor:{value:v,writable:!0,configurable:!0}}),x&&d(v,x)}function d(v,x){return d=Object.setPrototypeOf||function(w,S){return w.__proto__=S,w},d(v,x)}var h,m=t.default.version.split(/[.-]/);m[0]==="0"&&(m[1]==="13"||m[1]==="12")?h=function(x){return x.getDOMNode()}:h=function(x){return x};var p=(function(v){f(x,v);function x(b){var w;return i(this,x),w=l(this,s(x).call(this,b)),w.renderElementRef=t.default.createRef(),w.update=w.update.bind(a(w)),w}return u(x,[{key:"shouldComponentUpdate",value:function(w){var S=this;return Object.keys(x.propTypes).some(function(E){return S.props[E]!==w[E]})}},{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var w=h(this.renderElementRef.current);try{new n.default(w,this.props.value,Object.assign({text:this.props.text||this.props.value},this.props))}catch(S){window.console.error(S)}}},{key:"render",value:function(){var w=this.props,S=w.id,E=w.className;if(this.props.renderer==="svg")return t.default.createElement("svg",{ref:this.renderElementRef,id:S,className:E});if(this.props.renderer==="canvas")return t.default.createElement("canvas",{ref:this.renderElementRef,id:S,className:E});if(this.props.renderer==="img")return t.default.createElement("img",{ref:this.renderElementRef,id:S,className:E})}}]),x})(t.default.Component);return p.propTypes={value:r.default.string.isRequired,text:r.default.string,renderer:r.default.string,format:r.default.string,width:r.default.number,height:r.default.number,displayValue:r.default.bool,fontOptions:r.default.string,font:r.default.string,textAlign:r.default.string,textPosition:r.default.string,textMargin:r.default.number,fontSize:r.default.number,background:r.default.string,lineColor:r.default.string,margin:r.default.number,marginTop:r.default.number,marginBottom:r.default.number,marginLeft:r.default.number,marginRight:r.default.number,id:r.default.string,className:r.default.string,ean128:r.default.bool},p.defaultProps={format:"CODE128",renderer:"svg",width:2,height:100,displayValue:!0,fontOptions:"",font:"monospace",textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,className:"",ean128:!1},_s=p,_s}var VM=FM();const BM=pd(VM),$M=e=>{const{value:t,className:n="",format:r="CODE128",width:o=2,height:i=100,displayValue:c=!0,fontSize:u=20,background:l="#FFFFFF",lineColor:s="#000000",margin:a=10,...f}=e,d=N.classNames("flex items-center justify-center",n);return g.jsx("div",{className:d,...f,children:g.jsx(BM,{value:t,format:r,width:o,height:i,displayValue:c,fontSize:u,background:l,lineColor:s,margin:a})})},UM=e=>{const{variant:t}=e;return t==="qr"?g.jsx(WO,{...e}):t==="barcode"?g.jsx($M,{...e}):null},GM=({classNames:e,group:t=[],defaultValue:n="",ariaLabel:r="",onValueChange:o,...i})=>g.jsx(VE,{className:"flex flex-row gap-4",defaultValue:n,"aria-label":r,onValueChange:o,...i,children:t==null?void 0:t.map(({id:c,label:u,value:l,checked:s,disabled:a})=>g.jsxs("div",{className:"flex items-center",children:[g.jsx(BE,{className:N.classNames("size-4 cursor-pointer rounded-full bg-white outline-1 hover:outline-primary-blue focus:outline-primary-blue data-[state=checked]:outline-1 data-[state=checked]:outline-primary-blue outline-neutral-3",{"cursor-not-allowed outline-gray-5 bg-gray-3 hover:outline-neutral-3 data-[state=checked]:outline-neutral-3":a},e==null?void 0:e.item),disabled:a,defaultChecked:s,value:l,id:c,children:g.jsx($E,{className:N.classNames("relative flex size-full items-center justify-center after:block after:size-2 after:rounded-full after:bg-primary-blue",{"after:bg-black/25":a},e==null?void 0:e.indicator)})}),g.jsx("label",{className:N.classNames("pl-2 text-[15px] leading-none text-black cursor-pointer",{"cursor-not-allowed text-black/25":a},e==null?void 0:e.label),htmlFor:c,children:u})]},c))}),HM="relative flex bg-gray-100 rounded-xl p-1 md:w-fit",zM="relative text-grays-Macropay-07 z-10 inline-flex items-center gap-1 text-sm font-medium transition-colors duration-200 justify-center flex-1 whitespace-nowrap",WM="cursor-not-allowed bg-gray-3 text-gray-6 opacity-50",qM="text-primary-blue",KM="flex-col",YM={sm:"h-6 rounded-md",md:"h-8",lg:"h-10 rounded-lg",xl:"h-12 rounded-lg"},XM={sm:"w-6 rounded-md",md:"w-8",lg:"w-10 rounded-lg",xl:"w-12 rounded-lg"},ZM={sm:"px-3 py-[3px]",md:"px-3 py-[3px]",lg:"px-3 py-[3px]",xl:"px-3 py-[3px]"},QM=(e,t=!1)=>(t?XM:YM)[e]||"",JM=(e,t,n,r)=>N.classNames(HM,QM(e,t),t&&KM,n&&"opacity-50 cursor-not-allowed",r),eI=(e,t,n)=>(r,o)=>{e||r.disabled||(t(o),n==null||n(r.value))},tI=(e,t)=>e??t,nI=e=>e.map(t=>typeof t=="string"||typeof t=="number"?{label:t,value:t}:t),rI=(e,t)=>{const[n,r]=_.useState(0),o=_.useMemo(()=>nI(e),[e]);return _.useEffect(()=>{const i=o.findIndex(c=>c.value===t);i!==-1&&r(i)},[t,o]),{activeIndex:n,setActiveIndex:r,normalizedOptions:o}},oI=(e,t,n,r)=>{const[o,i]=_.useState({width:0,height:0,x:0,y:0}),c=_.useCallback(()=>{if(e.current){const u=e.current.children[t+1];if(u){const l=e.current.getBoundingClientRect(),s=u.getBoundingClientRect();i({width:s.width,height:s.height,x:s.left-l.left,y:s.top-l.top})}}},[e,t]);return _.useEffect(()=>{c()},[c,n,r]),_.useEffect(()=>{if(!e.current)return;const u=new ResizeObserver(()=>{c()});return u.observe(e.current),()=>{u.disconnect()}},[c]),o},iI={sm:"rounded-md",lg:"rounded-lg",xl:"rounded-lg"},sI=({indicatorStyle:e,vertical:t,size:n})=>{const r=iI[n]||"rounded-lg";return g.jsx(le.div,{className:N.classNames("absolute bg-white shadow-md",r,t?"left-1 right-1":"top-1 bottom-1"),animate:{left:t?4:e.x,top:t?e.y:4,width:t?"calc(100% - 8px)":e.width,height:t?e.height:"calc(100% - 8px)"},transition:{type:"spring",stiffness:500,damping:30}})},aI=(e,t,n)=>N.classNames(zM,ZM[e],t&&WM,n?"w-full":"flex-shrink-0"),cI=({option:e,index:t,isActive:n,disabled:r,vertical:o,size:i,onClick:c})=>{const u=aI(i,e.disabled||r,o);return g.jsxs("button",{type:"button",className:N.classNames(u,n&&qM),onClick:()=>c(e,t),disabled:r||e.disabled,children:[e.icon&&g.jsx("span",{className:"text-base",children:e.icon}),e.label]},`${e.value}-${t}`)},lI={initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.3,ease:"easeOut"}},uI=({options:e,value:t,defaultValue:n,onChange:r,size:o="md",disabled:i=!1,vertical:c=!1,className:u,...l})=>{const s=_.useId(),a=_.useRef(null),{activeIndex:f,setActiveIndex:d,normalizedOptions:h}=rI(e,tI(t,n)),m=oI(a,f,o,c),p=eI(i,d,r),v=JM(o,c,i,u);return g.jsxs(le.div,{ref:a,id:`${s}-segmented`,className:v,...lI,...l,children:[g.jsx(sI,{indicatorStyle:m,vertical:c,size:o}),h.map((x,b)=>g.jsx(cI,{option:x,index:b,isActive:b===f,disabled:i,vertical:c,size:o,onClick:p},`${x.value}-${b}`))]})},fI={sm:"h-6 text-sm py-px rounded-sm",md:"h-8 text-base py-[5px] rounded-md",lg:"h-10 text-lg py-2 rounded-lg",xl:"h-12 text-lg p-3 rounded-lg"},dI=({size:e,disabled:t,className:n,triggerRef:r,placeholder:o})=>g.jsxs(mS,{ref:r,disabled:t,className:N.classNames("outline-1 outline-gray-7 px-3 py-[5px] bg-white flex justify-between items-center cursor-pointer h-auto!",n,fI[e],{"bg-gray-3 text-gray-6 outline-gray-5 cursor-not-allowed":t}),children:[g.jsx(gS,{className:N.classNames("text-black truncate flex-1",{"text-gray-6":t}),placeholder:o}),g.jsx(vS,{className:"flex items-center",children:g.jsx(ce.SvgChevronLeft,{className:N.classNames("-rotate-90",{"text-gray-6":t})})})]}),Cy=_.forwardRef(({children:e,className:t,disabled:n,...r},o)=>g.jsx(wS,{ref:o,disabled:n,className:N.classNames("w-full h-auto outline-0 hover:bg-gray-3 px-4 py-[5px] cursor-pointer",{"text-gray-6 cursor-not-allowed":n},t),...r,children:g.jsx(ES,{className:"whitespace-nowrap",children:e})}));Cy.displayName="SelectItem";const hI=({message:e="No hay elementos disponibles."})=>g.jsx("div",{className:"w-full h-24 flex justify-center items-center text-gray-6 text-sm",children:e}),_y=_.forwardRef(({value:e,onChange:t,placeholder:n="Buscar...",disabled:r},o)=>g.jsx("div",{className:"px-2 py-2 border-b border-gray-4 bg-white sticky top-0",onPointerDown:i=>{i.stopPropagation()},children:g.jsx("input",{ref:o,type:"text",value:e,onChange:t,placeholder:n,disabled:r,autoComplete:"off",autoFocus:!0,className:N.classNames("w-full px-3 py-1.5 text-sm border border-gray-4 rounded outline-none","focus:border-primary-blue focus:ring-1 focus:ring-primary-blue","disabled:bg-gray-3 disabled:cursor-not-allowed"),onKeyDown:i=>{i.stopPropagation()},onMouseDown:i=>{i.stopPropagation()},onPointerDown:i=>{i.stopPropagation()}})}));_y.displayName="SearchInput";const pI=({width:e,allItems:t,filteredItems:n,currentValue:r,emptyMessage:o,showSearch:i,searchValue:c="",onSearchChange:u,searchPlaceholder:l,disabled:s,notFoundContent:a,inputRef:f})=>{const d=(n==null?void 0:n.length)===0&&!r;let h;return c&&a?h=a:c?h="No results found":h=o||"No elements available.",g.jsxs(xS,{position:"popper",sideOffset:5,className:N.classNames("overflow-hidden rounded-lg bg-white shadow-lg border border-gray-4 min-w-[200px] max-w-[350px] w-auto"),style:e?{width:e}:{},children:[i&&u&&g.jsx(_y,{ref:f,value:c,onChange:u,placeholder:l,disabled:s}),g.jsx(bS,{className:"space-y-1",children:d?g.jsx(hI,{message:h}):g.jsx(g.Fragment,{children:t==null?void 0:t.map(m=>{const p=n.some(v=>v.value===m.value);return g.jsx(Cy,{value:m.value,disabled:m==null?void 0:m.disabled,className:p?"":"hidden",children:m.children},m.value)})})})]})},mI=e=>{const[t,n]=_.useState(0),r=_.useRef(null);return _.useEffect(()=>{r.current&&n(r.current.offsetWidth)},[e]),{triggerWidth:t,triggerRef:r}},gI=({showSearch:e,items:t,filterOption:n,onSearch:r})=>{const[o,i]=_.useState(""),[c,u]=_.useState(!1),l=_.useRef(null);_.useEffect(()=>{c||i("")},[c]),_.useEffect(()=>{c&&e&&l.current&&requestAnimationFrame(()=>{var d;(d=l.current)==null||d.focus()})},[c,e,o]);const s=(d,h)=>{if(!d)return!0;const m=d.toLowerCase(),p=typeof h.children=="string"?h.children.toLowerCase():"",v=h.value.toLowerCase();return p.includes(m)||v.includes(m)},a=e?t.filter(d=>(n||s)(o,d)):t;return{searchValue:o,open:c,setOpen:u,filteredItems:a,handleSearchChange:d=>{const h=d.target.value;i(h),r==null||r(h)},inputRef:l}},vI=({value:e,defaultValue:t,onValueChange:n})=>{const[r,o]=_.useState(t);return _.useEffect(()=>{e!==void 0&&o(e)},[e]),{currentValue:e??r,handleValueChange:u=>{e===void 0&&o(u),n==null||n(u)}}},yI=({disabled:e,className:t,value:n,defaultValue:r,size:o="md",items:i=[],placeholder:c="Selecciona un elemento...",emptyMessage:u="No hay elementos disponibles.",onValueChange:l,showSearch:s=!1,searchPlaceholder:a="Buscar...",onSearch:f,filterOption:d,notFoundContent:h})=>{const{currentValue:m,handleValueChange:p}=vI({value:n,defaultValue:r,onValueChange:l}),{triggerWidth:v,triggerRef:x}=mI(t),{searchValue:b,open:w,setOpen:S,filteredItems:E,handleSearchChange:A,inputRef:R}=gI({showSearch:s,items:i,filterOption:d,onSearch:f});return g.jsxs(pS,{value:m,onValueChange:p,open:w,onOpenChange:S,children:[g.jsx(dI,{size:o,disabled:e,className:t,triggerRef:x,placeholder:c}),g.jsx(yS,{children:g.jsx(pI,{width:v,allItems:i,filteredItems:E,currentValue:m,emptyMessage:u,showSearch:s,searchValue:b,onSearchChange:A,searchPlaceholder:a,disabled:e,notFoundContent:h,inputRef:R})})]})},xI=()=>g.jsxs("div",{role:"status",className:"animate-pulse",children:[g.jsxs("div",{className:"flex items-center justify-center mt-4",children:[g.jsx(ce.SvgSkeletonAvatar,{}),g.jsxs("div",{className:"flex flex-col space-y-2",children:[g.jsx("div",{className:"w-20 h-3.5 bg-gray-200 rounded-full dark:bg-gray-700 me-3"}),g.jsx("div",{className:"w-24 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]})]}),g.jsx("span",{className:"sr-only",children:"Loading..."})]}),Ry=()=>g.jsxs("div",{role:"status","aria-hidden":!0,className:"animate-pulse",children:[g.jsx("div",{className:"h-3.5 bg-gray-200 rounded-full dark:bg-gray-700 w-48 mb-4"}),g.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),g.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),g.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),g.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),g.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 "}),g.jsx("span",{className:"sr-only",children:"Loading..."})]}),bI=()=>g.jsxs("div",{role:"status",className:"space-y-8 animate-pulse md:space-y-0 md:space-x-8 rtl:space-x-reverse md:flex md:items-center",children:[g.jsx("div",{className:"flex items-center justify-center w-full h-48 bg-gray-300 rounded sm:w-96 dark:bg-gray-700",children:g.jsx(ce.SvgSkeletonImage,{})}),g.jsx("span",{className:"sr-only",children:"Loading..."})]}),wI=()=>g.jsxs("div",{role:"status",className:"space-y-8 animate-pulse md:space-y-0 md:space-x-8 rtl:space-x-reverse md:flex md:items-center",children:[g.jsx("div",{className:"flex items-center justify-center w-full h-48 bg-gray-300 rounded sm:w-96 dark:bg-gray-700",children:g.jsx(ce.SvgSkeletonImage,{})}),g.jsxs("div",{className:"w-full",children:[g.jsx("div",{className:"h-3.5 bg-gray-200 rounded-full dark:bg-gray-700 w-48 mb-4"}),g.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[480px] mb-2.5"}),g.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),g.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[440px] mb-2.5"}),g.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[460px] mb-2.5"}),g.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[360px]"})]}),g.jsx("span",{className:"sr-only",children:"Loading..."})]}),EI=()=>g.jsxs("div",{role:"status",className:"p-4 space-y-4 border border-gray-200 divide-y divide-gray-200 rounded shadow animate-pulse dark:divide-gray-700 md:p-6 dark:border-gray-700",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{children:[g.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"}),g.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]}),g.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]}),g.jsxs("div",{className:"flex items-center justify-between pt-4",children:[g.jsxs("div",{children:[g.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"}),g.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]}),g.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]}),g.jsxs("div",{className:"flex items-center justify-between pt-4",children:[g.jsxs("div",{children:[g.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"}),g.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]}),g.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]}),g.jsxs("div",{className:"flex items-center justify-between pt-4",children:[g.jsxs("div",{children:[g.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"}),g.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]}),g.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]}),g.jsxs("div",{className:"flex items-center justify-between pt-4",children:[g.jsxs("div",{children:[g.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"}),g.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]}),g.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]}),g.jsx("span",{className:"sr-only",children:"Loading..."})]}),SI={default:Ry,avatar:xI,image:bI,"image-description":wI,list:EI},CI=({type:e="default"})=>{const t=SI[e]??Ry;return g.jsx(t,{})},_I={sm:"h-1",md:"h-2",lg:"h-3",xl:"h-4"},RI={primary:"bg-primary-blue",success:"bg-green-500",warning:"bg-yellow-500",error:"bg-red-500",info:"bg-blue-400"},TI={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-7 w-7"},PI=({classNames:e,rangeColor:t="primary",customRangeClass:n,size:r="md",showLabels:o=!1,formatLabel:i,min:c=0,max:u=100,...l})=>{const s=a=>i?i(a):a.toString();return g.jsxs("div",{className:"w-full",children:[g.jsxs(FS,{className:N.classNames("relative flex items-center select-none touch-none w-full",e==null?void 0:e.root),min:c,max:u,...l,children:[g.jsx(VS,{className:N.classNames("relative grow rounded-full bg-gray-200",_I[r],e==null?void 0:e.track),children:g.jsx(BS,{className:N.classNames("absolute rounded-full h-full",n||RI[t],e==null?void 0:e.range)})}),g.jsx($S,{className:N.classNames("block rounded-full bg-white border-2 border-primary-blue shadow-md hover:shadow-lg","focus:outline-none focus:ring-2 focus:ring-primary-blue focus:ring-offset-2","transition-shadow cursor-pointer",TI[r],e==null?void 0:e.thumb)})]}),o&&g.jsxs("div",{className:N.classNames("flex justify-between mt-2 text-sm text-gray-600",e==null?void 0:e.labels),children:[g.jsx("span",{className:e==null?void 0:e.startLabelClass,children:s(c)}),g.jsx("span",{className:e==null?void 0:e.endLabelClass,children:s(u)})]})]})},AI={sm:"size-6",md:"size-8",lg:"size-10",xl:"size-12"},OI={sm:"size-5",md:"size-6",lg:"size-7",xl:"size-8"},Rs={sm:"text-xs",md:"text-sm",lg:"text-base",xl:"text-lg"},MI={sm:"size-6",md:"size-8",lg:"size-10",xl:"size-12"},II={sm:2,md:4,lg:6,xl:8},cd=({disabled:e,onClick:t,arrow:n,size:r})=>{const o=`${e?"text-gray-6":"text-primary-blue"}`,i={right:g.jsx(ce.SvgRight,{className:o}),left:g.jsx(ce.SvgLeft,{className:o})},c=N.classNames("flex items-center justify-center rounded-md border disabled:border-zinc-300 disabled:bg-neutral-100 disabled:text-stone-300 shadow-none transition-colors duration-300 ease-linear bg-white border-gray-5 text-gray-4 transitions-all easy-out hover:text-blue-900 hover:border-blue-900",AI[r]);return g.jsx("button",{"aria-label":`stepButton-${n}`,type:"button",className:c,disabled:e,onClick:t,children:i[n]})},NI=({id:e,name:t,status:n,href:r,size:o="md"})=>{const i=N.classNames("flex items-center justify-center rounded-full",OI[o],{"border border-primary-blue":n==="COMPLETE","bg-primary-blue":n==="CURRENT","border border-gray-6":n==="PENDING"}),c=N.classNames("font-medium",Rs[o],{"text-primary-blue":n==="CURRENT","text-gray-6":n==="PENDING"}),u=N.classNames("font-medium",Rs[o],{"text-white":n==="CURRENT","text-gray-6":n==="PENDING"});return g.jsxs("a",{href:r,className:N.classNames("flex gap-2 font-medium items-center",Rs[o]),children:[g.jsx("span",{className:i,children:n==="COMPLETE"?g.jsx(ce.SvgDone,{className:N.classNames("text-primary-blue",MI[o]),"aria-hidden":"true"}):g.jsx("span",{className:u,children:e})}),g.jsx("span",{className:c,children:t})]})},jI=({visibleSteps:e,size:t})=>{const n=II[t];return g.jsx(We,{gap:n,justify:"center",children:e.map((r,o)=>g.jsxs(We,{gap:n,align:"center",children:[g.jsx(NI,{...r,size:t}),o+1!==e.length&&g.jsx(ce.SvgRight,{className:"text-gray-5"})]},crypto.randomUUID()))})},Ts=(e,t,n,r)=>e?4:t?3:n?2:r?1:3,DI=e=>{const t=e.find(n=>n.status==="CURRENT");return t?Number(t.id)-1:0},kI=e=>e===0,LI=(e,t,n)=>e>=t-n,FI=e=>e-1,VI=e=>e+1,BI=({steps:e,size:t="md",className:n=""})=>{const{xs:r,sm:o,md:i,lg:c}=dd.useBreakpoint(),[u,l]=_.useState(()=>Ts(c,i,o,r)),s=DI(e),[a,f]=_.useState(()=>{const b=Ts(c,i,o,r),w=Math.max(0,e.length-b);return Math.min(s,w)}),[d,h]=_.useState([]);_.useEffect(()=>{l(Ts(c,i,o,r))},[r,o,i,c]),_.useEffect(()=>{const b=Math.min(a+u,e.length);h(e.slice(a,b))},[a,e,u]);const m=()=>f(FI(a)),p=()=>f(VI(a)),v=kI(a),x=LI(a,e.length,u);return g.jsxs("div",{className:N.classNames("flex flex-row items-center w-full justify-between gap-4",{[n]:n}),children:[g.jsx(cd,{arrow:"left",disabled:v,onClick:m,size:t}),g.jsx(jI,{visibleSteps:d,size:t}),g.jsx(cd,{arrow:"right",disabled:x,onClick:p,size:t})]})},Hc={md:{root:"h-[22px] w-11",thumb:"size-[18px]",children:"h-4 w-4 text-xs"},sm:{root:"h-4 w-7",thumb:"size-3",children:"h-3 w-3 text-[10px]"}},Yn={root:"relative peer focus-visible:border-ring focus-visible:ring-ring/50 flex px-px shrink-0 items-center justify-start rounded-full border border-transparent shadow-xs outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[state=unchecked]:bg-gray-6 dark:data-[state=unchecked]:bg-input/80 data-[state=checked]:justify-end transition-colors duration-200",thumb:"relative z-10 bg-white pointer-events-none block rounded-full ring-0 shadow-sm",children:"absolute flex items-center justify-center text-white/80 transition-opacity duration-200",unCheckedChildren:"left-1 data-[state=checked]:opacity-0 data-[state=checked]:invisible",checkedChildren:"right-1 data-[state=unchecked]:opacity-0 data-[state=unchecked]:invisible"},$I={default:"data-[state=checked]:bg-[#0047BA]",success:"data-[state=checked]:bg-green-500",danger:"data-[state=checked]:bg-red-500"},UI=(e,t,n,r)=>N.classNames(Yn.root,$I[e],Hc[t].root,n&&"cursor-not-allowed",r),ld=(e,t)=>{const n=t?Yn.checkedChildren:Yn.unCheckedChildren;return N.classNames(Yn.children,n,Hc[e].children)},GI=e=>{const t=typeof e=="string"?e:e.text,n=typeof e=="string"?"right":e.position;return{labelText:t,labelPosition:n}},ud=e=>N.classNames("text-sm text-foreground",e&&"opacity-50"),HI=e=>N.classNames("flex items-center gap-2",e&&"cursor-not-allowed"),zI={type:"spring",stiffness:500,damping:30,mass:1},WI=({className:e,label:t,type:n="default",size:r="md",checked:o,defaultChecked:i=!1,disabled:c=!1,onCheckedChange:u,checkedChildren:l,unCheckedChildren:s,...a})=>{const f=Hc[r],d=g.jsxs(WS,{className:UI(n,r,c,e),checked:o,defaultChecked:i,disabled:c,onCheckedChange:u,...a,children:[s&&g.jsx("div",{className:ld(r,!1),children:s}),g.jsx(qS,{asChild:!0,children:g.jsx(le.div,{className:N.classNames(Yn.thumb,f.thumb),layout:!0,transition:zI,whileTap:{scale:.95}})}),l&&g.jsx("div",{className:ld(r,!0),children:l})]});if(t){const{labelText:h,labelPosition:m}=GI(t);return g.jsxs("div",{className:HI(c),children:[m==="left"&&g.jsx("span",{className:ud(c),children:h}),d,m==="right"&&g.jsx("span",{className:ud(c),children:h})]})}return d},qI={success:{icon:g.jsx(ce.SvgIconCheckCircle,{width:16,height:16}),bgColor:"bg-green-1",textColor:"text-green-6",borderColor:"border-green-3",closeButtonColor:"hover:bg-green-2"},info:{icon:g.jsx(ce.SvgIconInfoCircle,{width:16,height:16}),bgColor:"bg-blue-1",textColor:"text-blue-6",borderColor:"border-blue-3",closeButtonColor:"hover:bg-blue-2"},warning:{icon:g.jsx(ce.SvgIconWarningCircle,{width:16,height:16}),bgColor:"bg-gold-1",textColor:"text-gold-6",borderColor:"border-gold-3",closeButtonColor:"hover:bg-gold-2"},error:{icon:g.jsx(ce.SvgIconErrorCircle,{width:16,height:16}),bgColor:"bg-red-1",textColor:"text-red-6",borderColor:"border-red-3",closeButtonColor:"hover:bg-red-2"}},KI=({children:e,type:t="info",showIcon:n=!1,closable:r=!1,onClose:o,className:i="",icon:c,bgColor:u,textColor:l,borderColor:s,...a})=>{const f=!!(u||l||s),d=qI[t],h=c||(n?d.icon:null),m=N.classNames("inline-flex items-center gap-2 px-2 py-2 rounded border text-sm font-medium leading-none rounded-sm",{[d.bgColor]:!f,[d.textColor]:!f,[d.borderColor]:!f,[i]:i}),p=f?{backgroundColor:u,color:l,borderColor:s}:void 0,v=N.classNames("rounded transition-colors cursor-pointer text-black/[0.45]",{[d.closeButtonColor]:!f});return g.jsxs("span",{className:m,style:p,...a,children:[h&&g.jsx("span",{className:"inline-flex shrink-0",children:h}),g.jsx("span",{className:"inline-flex items-center",children:e}),r&&g.jsx("button",{onClick:o,className:v,"aria-label":"Remove tag",type:"button",children:g.jsx(ce.SvgClose,{width:16,height:16})})]})},YI={initial:{opacity:0,x:16},animate:{opacity:1,x:0},exit:{opacity:0,x:-20}},XI=({type:e,items:t,currentActiveKey:n,contentClassName:r})=>{var o;if(e==="segmented"){const i=(o=t.find(c=>c.key===n))==null?void 0:o.content;return g.jsx(Tl,{value:n,forceMount:!0,asChild:!0,children:g.jsx(Wt,{mode:"wait",initial:!1,children:g.jsx(le.div,{className:N.classNames("min-w-full",r),variants:YI,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.25,ease:"easeInOut"},children:i},n)})})}return g.jsx(g.Fragment,{children:t.map(i=>g.jsx(Tl,{value:i.key,className:N.classNames("min-w-full",r),children:i.content},i.key))})},ZI=(e,t)=>N.classNames({"text-sm font-normal":e==="default"||e==="underline"||e==="pills","border-b border-gray-200":e==="underline","border-b border-gray-200 text-lg font-semibold":e==="with-icon","bg-gray-100 rounded-xl p-1 text-lg text-grays-Macropay-07 font-normal":e==="segmented"},t),QI=e=>N.classNames("select-none",{"flex flex-wrap text-center text-gray-500 border-b border-gray-200 font-normal":e==="default"||e==="pills","-mb-px":e==="underline","flex flex-wrap -mb-px font-normal text-sm text-center text-gray-500":e==="with-icon","grid grid-flow-col justify-stretch items-center text-lg font-normal text-center text-lg sm:w-full":e==="segmented"}),JI=e=>N.classNames({"inline-block p-3 py-3 rounded-t-lg active:text-gray-500 active:bg-gray-50":e==="default"||e==="pills","inline-block p-3 py-3 border-b-2 rounded-t-lg active:border-primary-blue":e==="underline","inline-flex items-center justify-center p-3 border-b-2 rounded-t-lg active:border-gray-300":e==="with-icon","md:inline-block px-2 py-3 rounded-lg min-w-full h-full items-center text-center flex justify-center text-sm":e==="segmented"}),eN=(e,t)=>N.classNames({[`font-bold text-${t} bg-white`]:e==="default"||e==="pills",[`text-${t} border-b-2 border-primary-blue`]:e==="underline"||e==="with-icon",[`font-bold text-${t} active:text-${t}`]:e==="segmented"}),tN=({type:e,items:t,currentActiveKey:n,activeColorTabs:r,className:o})=>g.jsx("div",{className:ZI(e,o),children:g.jsx(ZS,{className:QI(e),children:t.map(({key:i,label:c,disabled:u})=>g.jsxs(QS,{value:i,disabled:u,className:N.classNames("h-full relative",JI(e),i===n&&eN(e,r),u&&"text-gray-300 cursor-not-allowed"),children:[e==="segmented"&&i===n&&g.jsx(le.div,{layoutId:"segmented-indicator",className:"absolute inset-0 bg-white rounded-lg z-0","data-testid":"tab-indicator",initial:!1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.2}}),g.jsx("span",{className:"relative z-10",children:c})]},i))})}),nN=({currentActiveKey:e,type:t="default",items:n,onChange:r,className:o,contentClassName:i,activeColorTabs:c="primary-blue"})=>g.jsxs(XS,{value:e,onValueChange:r,className:"flex flex-col gap-4",children:[g.jsx(tN,{type:t,items:n,currentActiveKey:e,activeColorTabs:c,className:o}),g.jsx(XI,{type:t,items:n,currentActiveKey:e,contentClassName:i})]}),rN=({name:e,label:t,children:n})=>g.jsxs(iE,{name:e,children:[t&&g.jsx(sE,{children:t}),n]}),oN=({type:e,error:t,disabled:n,readOnly:r,inputSize:o,className:i="",classesNames:c})=>N.classNames("block w-full p-2 focus:outline-none text-black rounded-lg h-[150px] transition duration-200 ease-in-out",{"border border-gray-7 focus:border-tints-Blue-30 focus:shadow-[0px_0px_0px_2px_#E6EDF8]":e==="normal"&&!n&&!t,"bg-transparent border-b border-gray-7 rounded-none focus:border-b-tints-Blue-30":e==="underline"&&!t&&!n,"border-red-400 focus:shadow-[0px_0px_0px_2px_#FFCCC7]":t&&e!=="underline","border-b border-red-400 rounded-none":t&&e==="underline","cursor-not-allowed bg-gray-3 text-gray-6":n&&e==="normal","cursor-not-allowed text-gray-6":n&&e==="underline","cursor-not-allowed font-semibold text-primary-blue":r,"h-8 text-sm":o==="sm","h-9 text-base":o==="md","h-10 text-base":o==="lg","h-12 text-base":o==="xl",[i]:i,[(c==null?void 0:c.input)??""]:c==null?void 0:c.input}),iN=({type:e="normal",inputSize:t="xl",className:n,classesNames:r,clearOnFocus:o,onFocus:i,...c})=>g.jsx(aE,{asChild:!0,children:g.jsx("textarea",{...c,className:oN({type:e,inputSize:t,className:n,classesNames:r,disabled:c.disabled,readOnly:c.readOnly}),onFocus:u=>{o&&(u.currentTarget.value=""),i==null||i(u)}})}),sN=({footer:e,current:t=0,max:n})=>g.jsxs("div",{className:"flex justify-between pt-1 text-sm text-gray-7",children:[g.jsx("span",{children:e}),n&&g.jsx("span",{children:`${t} / ${n}`})]}),aN=({name:e,label:t,labelFooter:n,error:r,maxLength:o,minLength:i,defaultValue:c="",classesNames:u,...l})=>{const[s,a]=_.useState(c);return g.jsx(oE,{children:g.jsxs(le.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},className:u==null?void 0:u.container,children:[g.jsx(rN,{name:e,label:t,children:g.jsx(iN,{...l,maxLength:o,minLength:i,value:s,onChange:f=>{var d;a(f.target.value),(d=l.onChange)==null||d.call(l,f)}})}),g.jsx(sN,{footer:n??`${i} caracteres requeridos`,current:s.length,max:o}),r&&g.jsx(cE,{className:u==null?void 0:u.messageError,children:r})]})})},cN=({className:e,content:t,children:n,...r})=>{const o=typeof t=="string";return g.jsx(pC,{children:g.jsxs(mC,{children:[g.jsx(gC,{asChild:!0,children:n}),g.jsx(vC,{children:g.jsx(yC,{className:e,asChild:!0,...r,children:g.jsxs(le.div,{className:N.classNames({"bg-gray-800 text-white rounded shadow-lg select-none px-4 py-2 outline-none border-0":o&&!e}),initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.15},children:[t,g.jsx(xC,{className:"w-4 h-2"})]})})})]})})};var zc=(e=>(e.cols="grid-cols",e.rows="grid-rows",e.gap="gap",e.justifyItems="justify-items",e.alignContent="content",e.span="col-span",e.start="col-start",e.end="col-end",e.justifySelf="justify-self",e.alignSelf="self",e))(zc||{});const{cols:lN,gap:uN,justifyItems:fN,alignContent:dN}=zc,hN=({cols:e,align:t,gap:n,justify:r,className:o="",...i})=>g.jsx(le.div,{className:N.classNames("grid",{[o]:o},N.generateClasses(lN,e),N.generateClasses(uN,n),N.generateClasses(fN,r),N.generateClasses(dN,t)),...i}),{span:pN,start:mN,end:gN,justifySelf:vN,alignSelf:yN}=zc,xN=({align:e,end:t,justify:n,span:r,start:o,className:i="",...c})=>g.jsx(le.div,{...c,className:N.classNames({[i]:i},N.generateClasses(pN,r),N.generateClasses(mN,o),N.generateClasses(gN,t),N.generateClasses(vN,n),N.generateClasses(yN,e))});exports.Accordion=oA;exports.Alert=lA;exports.Avatar=fA;exports.Button=ga;exports.Card=vA;exports.Checkbox=Kv;exports.Col=xN;exports.Divider=CA;exports.Drawer=TA;exports.Dropdown=jA;exports.Empty=DA;exports.Flex=We;exports.Input=qA;exports.List=lO;exports.Modal=gO;exports.Notification=CO;exports.Pagination=ty;exports.Popover=NO;exports.Portal=Yv;exports.Progress=kO;exports.QRBarcode=UM;exports.RadioGroup=GM;exports.Row=hN;exports.Segmented=uI;exports.Select=yI;exports.Skeleton=CI;exports.Slider=PI;exports.Spinner=Oy;exports.SpinnerSizeMap=md;exports.Steps=BI;exports.Switch=WI;exports.Tabs=nN;exports.Tag=KI;exports.TextArea=aN;exports.Tooltip=cN;exports.Typography=An;