@qodo/design-system 0.15.2 → 0.15.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react"),hr=require("react-dom");function Hs(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const c=Hs(S),sn=Hs(hr),op={primary:{50:"#eff6ff",100:"#dbeafe",500:"#3b82f6",600:"#2563eb",900:"#1e3a8a"},secondary:{50:"#f8fafc",100:"#f1f5f9",500:"#64748b",600:"#475569",900:"#0f172a"},success:{50:"#f0fdf4",500:"#22c55e",600:"#16a34a"},error:{50:"#fef2f2",500:"#ef4444",600:"#dc2626"}},ap={xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem","2xl":"3rem"},sp={sm:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem"},ip={fontFamily:{sans:["Inter","system-ui","sans-serif"],mono:["JetBrains Mono","monospace"]},fontSize:{xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem"}};var Ir={exports:{}},tr={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react"),hr=require("react-dom");function Hs(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const c=Hs(S),sn=Hs(hr),ap={primary:{50:"#eff6ff",100:"#dbeafe",500:"#3b82f6",600:"#2563eb",900:"#1e3a8a"},secondary:{50:"#f8fafc",100:"#f1f5f9",500:"#64748b",600:"#475569",900:"#0f172a"},success:{50:"#f0fdf4",500:"#22c55e",600:"#16a34a"},error:{50:"#fef2f2",500:"#ef4444",600:"#dc2626"}},sp={xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem","2xl":"3rem"},ip={sm:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem"},lp={fontFamily:{sans:["Inter","system-ui","sans-serif"],mono:["JetBrains Mono","monospace"]},fontSize:{xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem"}};var Ir={exports:{}},tr={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.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 qa;function lp(){if(qa)return tr;qa=1;var e=S,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function i(l,u,d){var f,p={},g=null,m=null;d!==void 0&&(g=""+d),u.key!==void 0&&(g=""+u.key),u.ref!==void 0&&(m=u.ref);for(f in u)n.call(u,f)&&!a.hasOwnProperty(f)&&(p[f]=u[f]);if(l&&l.defaultProps)for(f in u=l.defaultProps,u)p[f]===void 0&&(p[f]=u[f]);return{$$typeof:t,type:l,key:g,ref:m,props:p,_owner:o.current}}return tr.Fragment=r,tr.jsx=i,tr.jsxs=i,tr}var rr={};/**
9
+ */var qa;function cp(){if(qa)return tr;qa=1;var e=S,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function i(l,u,d){var f,p={},g=null,m=null;d!==void 0&&(g=""+d),u.key!==void 0&&(g=""+u.key),u.ref!==void 0&&(m=u.ref);for(f in u)n.call(u,f)&&!a.hasOwnProperty(f)&&(p[f]=u[f]);if(l&&l.defaultProps)for(f in u=l.defaultProps,u)p[f]===void 0&&(p[f]=u[f]);return{$$typeof:t,type:l,key:g,ref:m,props:p,_owner:o.current}}return tr.Fragment=r,tr.jsx=i,tr.jsxs=i,tr}var rr={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,184 +14,184 @@
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 Ua;function cp(){return Ua||(Ua=1,process.env.NODE_ENV!=="production"&&(function(){var e=S,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),v=Symbol.iterator,h="@@iterator";function x(w){if(w===null||typeof w!="object")return null;var L=v&&w[v]||w[h];return typeof L=="function"?L:null}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(w){{for(var L=arguments.length,z=new Array(L>1?L-1:0),ne=1;ne<L;ne++)z[ne-1]=arguments[ne];C("error",w,z)}}function C(w,L,z){{var ne=y.ReactDebugCurrentFrame,de=ne.getStackAddendum();de!==""&&(L+="%s",z=z.concat([de]));var fe=z.map(function(ue){return String(ue)});fe.unshift("Warning: "+L),Function.prototype.apply.call(console[w],console,fe)}}var R=!1,P=!1,j=!1,T=!1,E=!1,V;V=Symbol.for("react.module.reference");function U(w){return!!(typeof w=="string"||typeof w=="function"||w===n||w===a||E||w===o||w===d||w===f||T||w===m||R||P||j||typeof w=="object"&&w!==null&&(w.$$typeof===g||w.$$typeof===p||w.$$typeof===i||w.$$typeof===l||w.$$typeof===u||w.$$typeof===V||w.getModuleId!==void 0))}function re(w,L,z){var ne=w.displayName;if(ne)return ne;var de=L.displayName||L.name||"";return de!==""?z+"("+de+")":z}function te(w){return w.displayName||"Context"}function J(w){if(w==null)return null;if(typeof w.tag=="number"&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof w=="function")return w.displayName||w.name||null;if(typeof w=="string")return w;switch(w){case n:return"Fragment";case r:return"Portal";case a:return"Profiler";case o:return"StrictMode";case d:return"Suspense";case f:return"SuspenseList"}if(typeof w=="object")switch(w.$$typeof){case l:var L=w;return te(L)+".Consumer";case i:var z=w;return te(z._context)+".Provider";case u:return re(w,w.render,"ForwardRef");case p:var ne=w.displayName||null;return ne!==null?ne:J(w.type)||"Memo";case g:{var de=w,fe=de._payload,ue=de._init;try{return J(ue(fe))}catch{return null}}}return null}var q=Object.assign,D=0,A,$,k,O,W,Q,N;function B(){}B.__reactDisabledLog=!0;function Y(){{if(D===0){A=console.log,$=console.info,k=console.warn,O=console.error,W=console.group,Q=console.groupCollapsed,N=console.groupEnd;var w={configurable:!0,enumerable:!0,value:B,writable:!0};Object.defineProperties(console,{info:w,log:w,warn:w,error:w,group:w,groupCollapsed:w,groupEnd:w})}D++}}function M(){{if(D--,D===0){var w={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:q({},w,{value:A}),info:q({},w,{value:$}),warn:q({},w,{value:k}),error:q({},w,{value:O}),group:q({},w,{value:W}),groupCollapsed:q({},w,{value:Q}),groupEnd:q({},w,{value:N})})}D<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var G=y.ReactCurrentDispatcher,I;function Z(w,L,z){{if(I===void 0)try{throw Error()}catch(de){var ne=de.stack.trim().match(/\n( *(at )?)/);I=ne&&ne[1]||""}return`
17
+ */var Ua;function up(){return Ua||(Ua=1,process.env.NODE_ENV!=="production"&&(function(){var e=S,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),v=Symbol.iterator,h="@@iterator";function x(w){if(w===null||typeof w!="object")return null;var L=v&&w[v]||w[h];return typeof L=="function"?L:null}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(w){{for(var L=arguments.length,z=new Array(L>1?L-1:0),ne=1;ne<L;ne++)z[ne-1]=arguments[ne];C("error",w,z)}}function C(w,L,z){{var ne=y.ReactDebugCurrentFrame,de=ne.getStackAddendum();de!==""&&(L+="%s",z=z.concat([de]));var fe=z.map(function(ue){return String(ue)});fe.unshift("Warning: "+L),Function.prototype.apply.call(console[w],console,fe)}}var R=!1,P=!1,j=!1,T=!1,E=!1,V;V=Symbol.for("react.module.reference");function U(w){return!!(typeof w=="string"||typeof w=="function"||w===n||w===a||E||w===o||w===d||w===f||T||w===m||R||P||j||typeof w=="object"&&w!==null&&(w.$$typeof===g||w.$$typeof===p||w.$$typeof===i||w.$$typeof===l||w.$$typeof===u||w.$$typeof===V||w.getModuleId!==void 0))}function re(w,L,z){var ne=w.displayName;if(ne)return ne;var de=L.displayName||L.name||"";return de!==""?z+"("+de+")":z}function te(w){return w.displayName||"Context"}function J(w){if(w==null)return null;if(typeof w.tag=="number"&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof w=="function")return w.displayName||w.name||null;if(typeof w=="string")return w;switch(w){case n:return"Fragment";case r:return"Portal";case a:return"Profiler";case o:return"StrictMode";case d:return"Suspense";case f:return"SuspenseList"}if(typeof w=="object")switch(w.$$typeof){case l:var L=w;return te(L)+".Consumer";case i:var z=w;return te(z._context)+".Provider";case u:return re(w,w.render,"ForwardRef");case p:var ne=w.displayName||null;return ne!==null?ne:J(w.type)||"Memo";case g:{var de=w,fe=de._payload,ue=de._init;try{return J(ue(fe))}catch{return null}}}return null}var q=Object.assign,D=0,A,$,k,O,W,Q,N;function B(){}B.__reactDisabledLog=!0;function Y(){{if(D===0){A=console.log,$=console.info,k=console.warn,O=console.error,W=console.group,Q=console.groupCollapsed,N=console.groupEnd;var w={configurable:!0,enumerable:!0,value:B,writable:!0};Object.defineProperties(console,{info:w,log:w,warn:w,error:w,group:w,groupCollapsed:w,groupEnd:w})}D++}}function M(){{if(D--,D===0){var w={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:q({},w,{value:A}),info:q({},w,{value:$}),warn:q({},w,{value:k}),error:q({},w,{value:O}),group:q({},w,{value:W}),groupCollapsed:q({},w,{value:Q}),groupEnd:q({},w,{value:N})})}D<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var G=y.ReactCurrentDispatcher,I;function Z(w,L,z){{if(I===void 0)try{throw Error()}catch(de){var ne=de.stack.trim().match(/\n( *(at )?)/);I=ne&&ne[1]||""}return`
18
18
  `+I+w}}var ee=!1,oe;{var ce=typeof WeakMap=="function"?WeakMap:Map;oe=new ce}function ie(w,L){if(!w||ee)return"";{var z=oe.get(w);if(z!==void 0)return z}var ne;ee=!0;var de=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var fe;fe=G.current,G.current=null,Y();try{if(L){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(Re){ne=Re}Reflect.construct(w,[],ue)}else{try{ue.call()}catch(Re){ne=Re}w.call(ue.prototype)}}else{try{throw Error()}catch(Re){ne=Re}w()}}catch(Re){if(Re&&ne&&typeof Re.stack=="string"){for(var le=Re.stack.split(`
19
19
  `),Se=ne.stack.split(`
20
20
  `),pe=le.length-1,ge=Se.length-1;pe>=1&&ge>=0&&le[pe]!==Se[ge];)ge--;for(;pe>=1&&ge>=0;pe--,ge--)if(le[pe]!==Se[ge]){if(pe!==1||ge!==1)do if(pe--,ge--,ge<0||le[pe]!==Se[ge]){var Te=`
21
- `+le[pe].replace(" at new "," at ");return w.displayName&&Te.includes("<anonymous>")&&(Te=Te.replace("<anonymous>",w.displayName)),typeof w=="function"&&oe.set(w,Te),Te}while(pe>=1&&ge>=0);break}}}finally{ee=!1,G.current=fe,M(),Error.prepareStackTrace=de}var jt=w?w.displayName||w.name:"",vt=jt?Z(jt):"";return typeof w=="function"&&oe.set(w,vt),vt}function Ce(w,L,z){return ie(w,!1)}function je(w){var L=w.prototype;return!!(L&&L.isReactComponent)}function Be(w,L,z){if(w==null)return"";if(typeof w=="function")return ie(w,je(w));if(typeof w=="string")return Z(w);switch(w){case d:return Z("Suspense");case f:return Z("SuspenseList")}if(typeof w=="object")switch(w.$$typeof){case u:return Ce(w.render);case p:return Be(w.type,L,z);case g:{var ne=w,de=ne._payload,fe=ne._init;try{return Be(fe(de),L,z)}catch{}}}return""}var Ie=Object.prototype.hasOwnProperty,nt={},Ar=y.ReactDebugCurrentFrame;function Xe(w){if(w){var L=w._owner,z=Be(w.type,w._source,L?L.type:null);Ar.setExtraStackFrame(z)}else Ar.setExtraStackFrame(null)}function Df(w,L,z,ne,de){{var fe=Function.call.bind(Ie);for(var ue in w)if(fe(w,ue)){var le=void 0;try{if(typeof w[ue]!="function"){var Se=Error((ne||"React class")+": "+z+" type `"+ue+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof w[ue]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Se.name="Invariant Violation",Se}le=w[ue](L,ue,ne,z,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(pe){le=pe}le&&!(le instanceof Error)&&(Xe(de),b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",ne||"React class",z,ue,typeof le),Xe(null)),le instanceof Error&&!(le.message in nt)&&(nt[le.message]=!0,Xe(de),b("Failed %s type: %s",z,le.message),Xe(null))}}}var Lf=Array.isArray;function $n(w){return Lf(w)}function $f(w){{var L=typeof Symbol=="function"&&Symbol.toStringTag,z=L&&w[Symbol.toStringTag]||w.constructor.name||"Object";return z}}function Ff(w){try{return Ia(w),!1}catch{return!0}}function Ia(w){return""+w}function Ma(w){if(Ff(w))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",$f(w)),Ia(w)}var Oa=y.ReactCurrentOwner,Vf={key:!0,ref:!0,__self:!0,__source:!0},Da,La;function Bf(w){if(Ie.call(w,"ref")){var L=Object.getOwnPropertyDescriptor(w,"ref").get;if(L&&L.isReactWarning)return!1}return w.ref!==void 0}function Gf(w){if(Ie.call(w,"key")){var L=Object.getOwnPropertyDescriptor(w,"key").get;if(L&&L.isReactWarning)return!1}return w.key!==void 0}function Wf(w,L){typeof w.ref=="string"&&Oa.current}function zf(w,L){{var z=function(){Da||(Da=!0,b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",L))};z.isReactWarning=!0,Object.defineProperty(w,"key",{get:z,configurable:!0})}}function qf(w,L){{var z=function(){La||(La=!0,b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",L))};z.isReactWarning=!0,Object.defineProperty(w,"ref",{get:z,configurable:!0})}}var Uf=function(w,L,z,ne,de,fe,ue){var le={$$typeof:t,type:w,key:L,ref:z,props:ue,_owner:fe};return le._store={},Object.defineProperty(le._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(le,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ne}),Object.defineProperty(le,"_source",{configurable:!1,enumerable:!1,writable:!1,value:de}),Object.freeze&&(Object.freeze(le.props),Object.freeze(le)),le};function Hf(w,L,z,ne,de){{var fe,ue={},le=null,Se=null;z!==void 0&&(Ma(z),le=""+z),Gf(L)&&(Ma(L.key),le=""+L.key),Bf(L)&&(Se=L.ref,Wf(L,de));for(fe in L)Ie.call(L,fe)&&!Vf.hasOwnProperty(fe)&&(ue[fe]=L[fe]);if(w&&w.defaultProps){var pe=w.defaultProps;for(fe in pe)ue[fe]===void 0&&(ue[fe]=pe[fe])}if(le||Se){var ge=typeof w=="function"?w.displayName||w.name||"Unknown":w;le&&zf(ue,ge),Se&&qf(ue,ge)}return Uf(w,le,Se,de,ne,Oa.current,ue)}}var Fn=y.ReactCurrentOwner,$a=y.ReactDebugCurrentFrame;function Nt(w){if(w){var L=w._owner,z=Be(w.type,w._source,L?L.type:null);$a.setExtraStackFrame(z)}else $a.setExtraStackFrame(null)}var Vn;Vn=!1;function Bn(w){return typeof w=="object"&&w!==null&&w.$$typeof===t}function Fa(){{if(Fn.current){var w=J(Fn.current.type);if(w)return`
21
+ `+le[pe].replace(" at new "," at ");return w.displayName&&Te.includes("<anonymous>")&&(Te=Te.replace("<anonymous>",w.displayName)),typeof w=="function"&&oe.set(w,Te),Te}while(pe>=1&&ge>=0);break}}}finally{ee=!1,G.current=fe,M(),Error.prepareStackTrace=de}var jt=w?w.displayName||w.name:"",vt=jt?Z(jt):"";return typeof w=="function"&&oe.set(w,vt),vt}function Ce(w,L,z){return ie(w,!1)}function je(w){var L=w.prototype;return!!(L&&L.isReactComponent)}function Be(w,L,z){if(w==null)return"";if(typeof w=="function")return ie(w,je(w));if(typeof w=="string")return Z(w);switch(w){case d:return Z("Suspense");case f:return Z("SuspenseList")}if(typeof w=="object")switch(w.$$typeof){case u:return Ce(w.render);case p:return Be(w.type,L,z);case g:{var ne=w,de=ne._payload,fe=ne._init;try{return Be(fe(de),L,z)}catch{}}}return""}var Ie=Object.prototype.hasOwnProperty,nt={},Ar=y.ReactDebugCurrentFrame;function Xe(w){if(w){var L=w._owner,z=Be(w.type,w._source,L?L.type:null);Ar.setExtraStackFrame(z)}else Ar.setExtraStackFrame(null)}function Lf(w,L,z,ne,de){{var fe=Function.call.bind(Ie);for(var ue in w)if(fe(w,ue)){var le=void 0;try{if(typeof w[ue]!="function"){var Se=Error((ne||"React class")+": "+z+" type `"+ue+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof w[ue]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Se.name="Invariant Violation",Se}le=w[ue](L,ue,ne,z,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(pe){le=pe}le&&!(le instanceof Error)&&(Xe(de),b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",ne||"React class",z,ue,typeof le),Xe(null)),le instanceof Error&&!(le.message in nt)&&(nt[le.message]=!0,Xe(de),b("Failed %s type: %s",z,le.message),Xe(null))}}}var $f=Array.isArray;function $n(w){return $f(w)}function Ff(w){{var L=typeof Symbol=="function"&&Symbol.toStringTag,z=L&&w[Symbol.toStringTag]||w.constructor.name||"Object";return z}}function Vf(w){try{return Ia(w),!1}catch{return!0}}function Ia(w){return""+w}function Ma(w){if(Vf(w))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ff(w)),Ia(w)}var Oa=y.ReactCurrentOwner,Bf={key:!0,ref:!0,__self:!0,__source:!0},Da,La;function Gf(w){if(Ie.call(w,"ref")){var L=Object.getOwnPropertyDescriptor(w,"ref").get;if(L&&L.isReactWarning)return!1}return w.ref!==void 0}function Wf(w){if(Ie.call(w,"key")){var L=Object.getOwnPropertyDescriptor(w,"key").get;if(L&&L.isReactWarning)return!1}return w.key!==void 0}function zf(w,L){typeof w.ref=="string"&&Oa.current}function qf(w,L){{var z=function(){Da||(Da=!0,b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",L))};z.isReactWarning=!0,Object.defineProperty(w,"key",{get:z,configurable:!0})}}function Uf(w,L){{var z=function(){La||(La=!0,b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",L))};z.isReactWarning=!0,Object.defineProperty(w,"ref",{get:z,configurable:!0})}}var Hf=function(w,L,z,ne,de,fe,ue){var le={$$typeof:t,type:w,key:L,ref:z,props:ue,_owner:fe};return le._store={},Object.defineProperty(le._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(le,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ne}),Object.defineProperty(le,"_source",{configurable:!1,enumerable:!1,writable:!1,value:de}),Object.freeze&&(Object.freeze(le.props),Object.freeze(le)),le};function Kf(w,L,z,ne,de){{var fe,ue={},le=null,Se=null;z!==void 0&&(Ma(z),le=""+z),Wf(L)&&(Ma(L.key),le=""+L.key),Gf(L)&&(Se=L.ref,zf(L,de));for(fe in L)Ie.call(L,fe)&&!Bf.hasOwnProperty(fe)&&(ue[fe]=L[fe]);if(w&&w.defaultProps){var pe=w.defaultProps;for(fe in pe)ue[fe]===void 0&&(ue[fe]=pe[fe])}if(le||Se){var ge=typeof w=="function"?w.displayName||w.name||"Unknown":w;le&&qf(ue,ge),Se&&Uf(ue,ge)}return Hf(w,le,Se,de,ne,Oa.current,ue)}}var Fn=y.ReactCurrentOwner,$a=y.ReactDebugCurrentFrame;function Nt(w){if(w){var L=w._owner,z=Be(w.type,w._source,L?L.type:null);$a.setExtraStackFrame(z)}else $a.setExtraStackFrame(null)}var Vn;Vn=!1;function Bn(w){return typeof w=="object"&&w!==null&&w.$$typeof===t}function Fa(){{if(Fn.current){var w=J(Fn.current.type);if(w)return`
22
22
 
23
- Check the render method of \``+w+"`."}return""}}function Kf(w){return""}var Va={};function Yf(w){{var L=Fa();if(!L){var z=typeof w=="string"?w:w.displayName||w.name;z&&(L=`
23
+ Check the render method of \``+w+"`."}return""}}function Yf(w){return""}var Va={};function Xf(w){{var L=Fa();if(!L){var z=typeof w=="string"?w:w.displayName||w.name;z&&(L=`
24
24
 
25
- Check the top-level render call using <`+z+">.")}return L}}function Ba(w,L){{if(!w._store||w._store.validated||w.key!=null)return;w._store.validated=!0;var z=Yf(L);if(Va[z])return;Va[z]=!0;var ne="";w&&w._owner&&w._owner!==Fn.current&&(ne=" It was passed a child from "+J(w._owner.type)+"."),Nt(w),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',z,ne),Nt(null)}}function Ga(w,L){{if(typeof w!="object")return;if($n(w))for(var z=0;z<w.length;z++){var ne=w[z];Bn(ne)&&Ba(ne,L)}else if(Bn(w))w._store&&(w._store.validated=!0);else if(w){var de=x(w);if(typeof de=="function"&&de!==w.entries)for(var fe=de.call(w),ue;!(ue=fe.next()).done;)Bn(ue.value)&&Ba(ue.value,L)}}}function Xf(w){{var L=w.type;if(L==null||typeof L=="string")return;var z;if(typeof L=="function")z=L.propTypes;else if(typeof L=="object"&&(L.$$typeof===u||L.$$typeof===p))z=L.propTypes;else return;if(z){var ne=J(L);Df(z,w.props,"prop",ne,w)}else if(L.PropTypes!==void 0&&!Vn){Vn=!0;var de=J(L);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",de||"Unknown")}typeof L.getDefaultProps=="function"&&!L.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Zf(w){{for(var L=Object.keys(w.props),z=0;z<L.length;z++){var ne=L[z];if(ne!=="children"&&ne!=="key"){Nt(w),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ne),Nt(null);break}}w.ref!==null&&(Nt(w),b("Invalid attribute `ref` supplied to `React.Fragment`."),Nt(null))}}var Wa={};function za(w,L,z,ne,de,fe){{var ue=U(w);if(!ue){var le="";(w===void 0||typeof w=="object"&&w!==null&&Object.keys(w).length===0)&&(le+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Se=Kf();Se?le+=Se:le+=Fa();var pe;w===null?pe="null":$n(w)?pe="array":w!==void 0&&w.$$typeof===t?(pe="<"+(J(w.type)||"Unknown")+" />",le=" Did you accidentally export a JSX literal instead of a component?"):pe=typeof w,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",pe,le)}var ge=Hf(w,L,z,de,fe);if(ge==null)return ge;if(ue){var Te=L.children;if(Te!==void 0)if(ne)if($n(Te)){for(var jt=0;jt<Te.length;jt++)Ga(Te[jt],w);Object.freeze&&Object.freeze(Te)}else b("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 Ga(Te,w)}if(Ie.call(L,"key")){var vt=J(w),Re=Object.keys(L).filter(function(np){return np!=="key"}),Gn=Re.length>0?"{key: someKey, "+Re.join(": ..., ")+": ...}":"{key: someKey}";if(!Wa[vt+Gn]){var rp=Re.length>0?"{"+Re.join(": ..., ")+": ...}":"{}";b(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+z+">.")}return L}}function Ba(w,L){{if(!w._store||w._store.validated||w.key!=null)return;w._store.validated=!0;var z=Xf(L);if(Va[z])return;Va[z]=!0;var ne="";w&&w._owner&&w._owner!==Fn.current&&(ne=" It was passed a child from "+J(w._owner.type)+"."),Nt(w),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',z,ne),Nt(null)}}function Ga(w,L){{if(typeof w!="object")return;if($n(w))for(var z=0;z<w.length;z++){var ne=w[z];Bn(ne)&&Ba(ne,L)}else if(Bn(w))w._store&&(w._store.validated=!0);else if(w){var de=x(w);if(typeof de=="function"&&de!==w.entries)for(var fe=de.call(w),ue;!(ue=fe.next()).done;)Bn(ue.value)&&Ba(ue.value,L)}}}function Zf(w){{var L=w.type;if(L==null||typeof L=="string")return;var z;if(typeof L=="function")z=L.propTypes;else if(typeof L=="object"&&(L.$$typeof===u||L.$$typeof===p))z=L.propTypes;else return;if(z){var ne=J(L);Lf(z,w.props,"prop",ne,w)}else if(L.PropTypes!==void 0&&!Vn){Vn=!0;var de=J(L);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",de||"Unknown")}typeof L.getDefaultProps=="function"&&!L.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Jf(w){{for(var L=Object.keys(w.props),z=0;z<L.length;z++){var ne=L[z];if(ne!=="children"&&ne!=="key"){Nt(w),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ne),Nt(null);break}}w.ref!==null&&(Nt(w),b("Invalid attribute `ref` supplied to `React.Fragment`."),Nt(null))}}var Wa={};function za(w,L,z,ne,de,fe){{var ue=U(w);if(!ue){var le="";(w===void 0||typeof w=="object"&&w!==null&&Object.keys(w).length===0)&&(le+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Se=Yf();Se?le+=Se:le+=Fa();var pe;w===null?pe="null":$n(w)?pe="array":w!==void 0&&w.$$typeof===t?(pe="<"+(J(w.type)||"Unknown")+" />",le=" Did you accidentally export a JSX literal instead of a component?"):pe=typeof w,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",pe,le)}var ge=Kf(w,L,z,de,fe);if(ge==null)return ge;if(ue){var Te=L.children;if(Te!==void 0)if(ne)if($n(Te)){for(var jt=0;jt<Te.length;jt++)Ga(Te[jt],w);Object.freeze&&Object.freeze(Te)}else b("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 Ga(Te,w)}if(Ie.call(L,"key")){var vt=J(w),Re=Object.keys(L).filter(function(op){return op!=="key"}),Gn=Re.length>0?"{key: someKey, "+Re.join(": ..., ")+": ...}":"{key: someKey}";if(!Wa[vt+Gn]){var np=Re.length>0?"{"+Re.join(": ..., ")+": ...}":"{}";b(`A props object containing a "key" prop is being spread into JSX:
26
26
  let props = %s;
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,Gn,vt,rp,vt),Wa[vt+Gn]=!0}}return w===n?Zf(ge):Xf(ge),ge}}function Jf(w,L,z){return za(w,L,z,!0)}function Qf(w,L,z){return za(w,L,z,!1)}var ep=Qf,tp=Jf;rr.Fragment=n,rr.jsx=ep,rr.jsxs=tp})()),rr}var Ha;function up(){return Ha||(Ha=1,process.env.NODE_ENV==="production"?Ir.exports=lp():Ir.exports=cp()),Ir.exports}var s=up();function Ks(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Ks(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Ys(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Ks(e))&&(n&&(n+=" "),n+=t);return n}const Ka=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ya=Ys,ln=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Ya(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(d=>{const f=r==null?void 0:r[d],p=a==null?void 0:a[d];if(f===null)return null;const g=Ka(f)||Ka(p);return o[d][g]}),l=r&&Object.entries(r).reduce((d,f)=>{let[p,g]=f;return g===void 0||(d[p]=g),d},{}),u=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,f)=>{let{class:p,className:g,...m}=f;return Object.entries(m).every(v=>{let[h,x]=v;return Array.isArray(x)?x.includes({...a,...l}[h]):{...a,...l}[h]===x})?[...d,p,g]:d},[]);return Ya(e,i,u,r==null?void 0:r.class,r==null?void 0:r.className)},_o="-",dp=e=>{const t=pp(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{const l=i.split(_o);return l[0]===""&&l.length!==1&&l.shift(),Xs(l,t)||fp(i)},getConflictingClassGroupIds:(i,l)=>{const u=r[i]||[];return l&&n[i]?[...u,...n[i]]:u}}},Xs=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?Xs(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(_o);return(i=t.validators.find(({validator:l})=>l(a)))==null?void 0:i.classGroupId},Xa=/^\[(.+)\]$/,fp=e=>{if(Xa.test(e)){const t=Xa.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},pp=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const o in r)lo(r[o],n,o,t);return n},lo=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:Za(t,o);a.classGroupId=r;return}if(typeof o=="function"){if(mp(o)){lo(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([a,i])=>{lo(i,Za(t,a),r,n)})})},Za=(e,t)=>{let r=e;return t.split(_o).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},mp=e=>e.isThemeGetter,gp=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const o=(a,i)=>{r.set(a,i),t++,t>e&&(t=0,n=r,r=new Map)};return{get(a){let i=r.get(a);if(i!==void 0)return i;if((i=n.get(a))!==void 0)return o(a,i),i},set(a,i){r.has(a)?r.set(a,i):o(a,i)}}},co="!",uo=":",hp=uo.length,vp=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const a=[];let i=0,l=0,u=0,d;for(let v=0;v<o.length;v++){let h=o[v];if(i===0&&l===0){if(h===uo){a.push(o.slice(u,v)),u=v+hp;continue}if(h==="/"){d=v;continue}}h==="["?i++:h==="]"?i--:h==="("?l++:h===")"&&l--}const f=a.length===0?o:o.substring(u),p=xp(f),g=p!==f,m=d&&d>u?d-u:void 0;return{modifiers:a,hasImportantModifier:g,baseClassName:p,maybePostfixModifierPosition:m}};if(t){const o=t+uo,a=n;n=i=>i.startsWith(o)?a(i.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(r){const o=n;n=a=>r({className:a,parseClassName:o})}return n},xp=e=>e.endsWith(co)?e.substring(0,e.length-1):e.startsWith(co)?e.substring(1):e,bp=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const o=[];let a=[];return n.forEach(i=>{i[0]==="["||t[i]?(o.push(...a.sort(),i),a=[]):a.push(i)}),o.push(...a.sort()),o}},yp=e=>({cache:gp(e.cacheSize),parseClassName:vp(e),sortModifiers:bp(e),...dp(e)}),wp=/\s+/,Cp=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:a}=t,i=[],l=e.trim().split(wp);let u="";for(let d=l.length-1;d>=0;d-=1){const f=l[d],{isExternal:p,modifiers:g,hasImportantModifier:m,baseClassName:v,maybePostfixModifierPosition:h}=r(f);if(p){u=f+(u.length>0?" "+u:u);continue}let x=!!h,y=n(x?v.substring(0,h):v);if(!y){if(!x){u=f+(u.length>0?" "+u:u);continue}if(y=n(v),!y){u=f+(u.length>0?" "+u:u);continue}x=!1}const b=a(g).join(":"),C=m?b+co:b,R=C+y;if(i.includes(R))continue;i.push(R);const P=o(y,x);for(let j=0;j<P.length;++j){const T=P[j];i.push(C+T)}u=f+(u.length>0?" "+u:u)}return u};function Sp(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Zs(t))&&(n&&(n+=" "),n+=r);return n}const Zs=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Zs(e[n]))&&(r&&(r+=" "),r+=t);return r};function Rp(e,...t){let r,n,o,a=i;function i(u){const d=t.reduce((f,p)=>p(f),e());return r=yp(d),n=r.cache.get,o=r.cache.set,a=l,l(u)}function l(u){const d=n(u);if(d)return d;const f=Cp(u,r);return o(u,f),f}return function(){return a(Sp.apply(null,arguments))}}const he=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Js=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Qs=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ep=/^\d+\/\d+$/,kp=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Pp=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Np=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,jp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Tp=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Tt=e=>Ep.test(e),ae=e=>!!e&&!Number.isNaN(Number(e)),ot=e=>!!e&&Number.isInteger(Number(e)),Wn=e=>e.endsWith("%")&&ae(e.slice(0,-1)),Ze=e=>kp.test(e),_p=()=>!0,Ap=e=>Pp.test(e)&&!Np.test(e),ei=()=>!1,Ip=e=>jp.test(e),Mp=e=>Tp.test(e),Op=e=>!H(e)&&!K(e),Dp=e=>zt(e,ni,ei),H=e=>Js.test(e),xt=e=>zt(e,oi,Ap),zn=e=>zt(e,Bp,ae),Ja=e=>zt(e,ti,ei),Lp=e=>zt(e,ri,Mp),Mr=e=>zt(e,ai,Ip),K=e=>Qs.test(e),nr=e=>qt(e,oi),$p=e=>qt(e,Gp),Qa=e=>qt(e,ti),Fp=e=>qt(e,ni),Vp=e=>qt(e,ri),Or=e=>qt(e,ai,!0),zt=(e,t,r)=>{const n=Js.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},qt=(e,t,r=!1)=>{const n=Qs.exec(e);return n?n[1]?t(n[1]):r:!1},ti=e=>e==="position"||e==="percentage",ri=e=>e==="image"||e==="url",ni=e=>e==="length"||e==="size"||e==="bg-size",oi=e=>e==="length",Bp=e=>e==="number",Gp=e=>e==="family-name",ai=e=>e==="shadow",Wp=()=>{const e=he("color"),t=he("font"),r=he("text"),n=he("font-weight"),o=he("tracking"),a=he("leading"),i=he("breakpoint"),l=he("container"),u=he("spacing"),d=he("radius"),f=he("shadow"),p=he("inset-shadow"),g=he("text-shadow"),m=he("drop-shadow"),v=he("blur"),h=he("perspective"),x=he("aspect"),y=he("ease"),b=he("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],P=()=>[...R(),K,H],j=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],E=()=>[K,H,u],V=()=>[Tt,"full","auto",...E()],U=()=>[ot,"none","subgrid",K,H],re=()=>["auto",{span:["full",ot,K,H]},ot,K,H],te=()=>[ot,"auto",K,H],J=()=>["auto","min","max","fr",K,H],q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],D=()=>["start","end","center","stretch","center-safe","end-safe"],A=()=>["auto",...E()],$=()=>[Tt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],k=()=>[e,K,H],O=()=>[...R(),Qa,Ja,{position:[K,H]}],W=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Q=()=>["auto","cover","contain",Fp,Dp,{size:[K,H]}],N=()=>[Wn,nr,xt],B=()=>["","none","full",d,K,H],Y=()=>["",ae,nr,xt],M=()=>["solid","dashed","dotted","double"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>[ae,Wn,Qa,Ja],Z=()=>["","none",v,K,H],ee=()=>["none",ae,K,H],oe=()=>["none",ae,K,H],ce=()=>[ae,K,H],ie=()=>[Tt,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ze],breakpoint:[Ze],color:[_p],container:[Ze],"drop-shadow":[Ze],ease:["in","out","in-out"],font:[Op],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ze],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ze],shadow:[Ze],spacing:["px",ae],text:[Ze],"text-shadow":[Ze],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Tt,H,K,x]}],container:["container"],columns:[{columns:[ae,H,K,l]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:P()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:V()}],"inset-x":[{"inset-x":V()}],"inset-y":[{"inset-y":V()}],start:[{start:V()}],end:[{end:V()}],top:[{top:V()}],right:[{right:V()}],bottom:[{bottom:V()}],left:[{left:V()}],visibility:["visible","invisible","collapse"],z:[{z:[ot,"auto",K,H]}],basis:[{basis:[Tt,"full","auto",l,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ae,Tt,"auto","initial","none",H]}],grow:[{grow:["",ae,K,H]}],shrink:[{shrink:["",ae,K,H]}],order:[{order:[ot,"first","last","none",K,H]}],"grid-cols":[{"grid-cols":U()}],"col-start-end":[{col:re()}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":U()}],"row-start-end":[{row:re()}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":J()}],"auto-rows":[{"auto-rows":J()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...q(),"normal"]}],"justify-items":[{"justify-items":[...D(),"normal"]}],"justify-self":[{"justify-self":["auto",...D()]}],"align-content":[{content:["normal",...q()]}],"align-items":[{items:[...D(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...D(),{baseline:["","last"]}]}],"place-content":[{"place-content":q()}],"place-items":[{"place-items":[...D(),"baseline"]}],"place-self":[{"place-self":["auto",...D()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],w:[{w:[l,"screen",...$()]}],"min-w":[{"min-w":[l,"screen","none",...$()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...$()]}],h:[{h:["screen","lh",...$()]}],"min-h":[{"min-h":["screen","lh","none",...$()]}],"max-h":[{"max-h":["screen","lh",...$()]}],"font-size":[{text:["base",r,nr,xt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,K,zn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Wn,H]}],"font-family":[{font:[$p,H,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,K,H]}],"line-clamp":[{"line-clamp":[ae,"none",K,zn]}],leading:[{leading:[a,...E()]}],"list-image":[{"list-image":["none",K,H]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",K,H]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:[ae,"from-font","auto",K,xt]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[ae,"auto",K,H]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",K,H]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",K,H]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:W()}],"bg-size":[{bg:Q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ot,K,H],radial:["",K,H],conic:[ot,K,H]},Vp,Lp]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:N()}],"gradient-via-pos":[{via:N()}],"gradient-to-pos":[{to:N()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"border-w":[{border:Y()}],"border-w-x":[{"border-x":Y()}],"border-w-y":[{"border-y":Y()}],"border-w-s":[{"border-s":Y()}],"border-w-e":[{"border-e":Y()}],"border-w-t":[{"border-t":Y()}],"border-w-r":[{"border-r":Y()}],"border-w-b":[{"border-b":Y()}],"border-w-l":[{"border-l":Y()}],"divide-x":[{"divide-x":Y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...M(),"hidden","none"]}],"divide-style":[{divide:[...M(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...M(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ae,K,H]}],"outline-w":[{outline:["",ae,nr,xt]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",f,Or,Mr]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",p,Or,Mr]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[ae,xt]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",g,Or,Mr]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[ae,K,H]}],"mix-blend":[{"mix-blend":[...G(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":G()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ae]}],"mask-image-linear-from-pos":[{"mask-linear-from":I()}],"mask-image-linear-to-pos":[{"mask-linear-to":I()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":I()}],"mask-image-t-to-pos":[{"mask-t-to":I()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":I()}],"mask-image-r-to-pos":[{"mask-r-to":I()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":I()}],"mask-image-b-to-pos":[{"mask-b-to":I()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":I()}],"mask-image-l-to-pos":[{"mask-l-to":I()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":I()}],"mask-image-x-to-pos":[{"mask-x-to":I()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":I()}],"mask-image-y-to-pos":[{"mask-y-to":I()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[K,H]}],"mask-image-radial-from-pos":[{"mask-radial-from":I()}],"mask-image-radial-to-pos":[{"mask-radial-to":I()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[ae]}],"mask-image-conic-from-pos":[{"mask-conic-from":I()}],"mask-image-conic-to-pos":[{"mask-conic-to":I()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:W()}],"mask-size":[{mask:Q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",K,H]}],filter:[{filter:["","none",K,H]}],blur:[{blur:Z()}],brightness:[{brightness:[ae,K,H]}],contrast:[{contrast:[ae,K,H]}],"drop-shadow":[{"drop-shadow":["","none",m,Or,Mr]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",ae,K,H]}],"hue-rotate":[{"hue-rotate":[ae,K,H]}],invert:[{invert:["",ae,K,H]}],saturate:[{saturate:[ae,K,H]}],sepia:[{sepia:["",ae,K,H]}],"backdrop-filter":[{"backdrop-filter":["","none",K,H]}],"backdrop-blur":[{"backdrop-blur":Z()}],"backdrop-brightness":[{"backdrop-brightness":[ae,K,H]}],"backdrop-contrast":[{"backdrop-contrast":[ae,K,H]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ae,K,H]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ae,K,H]}],"backdrop-invert":[{"backdrop-invert":["",ae,K,H]}],"backdrop-opacity":[{"backdrop-opacity":[ae,K,H]}],"backdrop-saturate":[{"backdrop-saturate":[ae,K,H]}],"backdrop-sepia":[{"backdrop-sepia":["",ae,K,H]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",K,H]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ae,"initial",K,H]}],ease:[{ease:["linear","initial",y,K,H]}],delay:[{delay:[ae,K,H]}],animate:[{animate:["none",b,K,H]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,K,H]}],"perspective-origin":[{"perspective-origin":P()}],rotate:[{rotate:ee()}],"rotate-x":[{"rotate-x":ee()}],"rotate-y":[{"rotate-y":ee()}],"rotate-z":[{"rotate-z":ee()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":["scale-3d"],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[K,H,"","none","gpu","cpu"]}],"transform-origin":[{origin:P()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ie()}],"translate-x":[{"translate-x":ie()}],"translate-y":[{"translate-y":ie()}],"translate-z":[{"translate-z":ie()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",K,H]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",K,H]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[ae,nr,xt,zn]}],stroke:[{stroke:["none",...k()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},zp=Rp(Wp);function _(...e){return zp(Ys(e))}function si(e,t,r){let n="";return typeof e=="object"&&(e.base&&(n+=e.base),Object.keys(t).length&&Object.keys(t).forEach(o=>{o==="className"&&t[o]?(n=n.trim(),n+=` ${t[o]}`):t[o]&&e.hasOwnProperty(o)&&(r&&console.log("styles",o,t[o],e[o]),n=n.trim(),n+=` ${e[o]}`)})),r&&console.log("final.class",n.trim()),n.trim()}const ii=ln("qodo qodo-button inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none cursor-pointer",{variants:{variant:{default:"bg-[var(--fill-action-emphasis-idle)] text-[var(--text-action-on-emphasis-idle)] hover:bg-[var(--fill-action-emphasis-hover)] active:bg-[var(--fill-action-emphasis-active)] disabled:bg-[var(--fill-action-emphasis-disabled)]",secondary:"bg-[var(--fill-action-neutral-idle)] text-[var(--text-action-neutral-idle)] hover:bg-[var(--fill-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-[var(--fill-action-neutral-disabled)] disabled:text-[var(--text-action-neutral-disabled)]",outline:"border border-[var(--border-action-neutral-idle)] text-[var(--text-action-neutral-idle)] hover:bg-[var(--fill-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-none disabled:text-[var(--text-action-neutral-disabled)]",ghost:"text-[var(--text-action-neutral-idle)] hover:text-[var(--text-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-none disabled:text-[var(--text-action-neutral-disabled)]",link:"text-[var(--text-action-emphasis-idle)] hover:text-[var(--text-action-emphasis-hover)] active:bg-[var(--fill-action-emphasis-active)] disabled:bg-none disabled:text-[var(--text-action-emphasis-disabled)]",danger:"border border-[var(--border-action-negative-idle)] text-[var(--icon-action-negative-idle)] hover:bg-[var(--fill-action-negative-hover)] active:bg-[var(--fill-action-negative-active)] disabled:border-[var(--border-action-negative-disabled)] disabled:text-[var(--icon-action-negative-disabled)]"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Je=c.forwardRef(({className:e,variant:t,size:r,...n},o)=>s.jsx("button",{className:_(ii({variant:t,size:r,className:e})),ref:o,...n}));Je.displayName="Button";const qp=ln("qodo qodo-input file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground border-input-neutral-idle flex h-9 w-full min-w-0 rounded-md border bg-fill-input-neutral-idle px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-purple-muted-700 disabled:border-purple-muted-500 disabled:text-purple-muted-400 read-only:bg-purple-muted-700 read-only:border-purple-muted-400 read-only:cursor-default read-only:text-purple-muted-200 md:text-sm dark:border-input-neutral-idle dark:bg-fill-input-neutral-idle dark:text-foreground dark:placeholder:text-muted-foreground",{variants:{variant:{default:"bg-purple-muted-700 border-purple-muted-500 text-purple-muted-300 text-sm",secondary:"bg-secondary border-secondary text-secondary-foreground placeholder:text-muted-foreground dark:bg-secondary dark:border-secondary dark:text-secondary-foreground dark:placeholder:text-muted-foreground",accent:"bg-accent border-accent text-accent-foreground placeholder:text-muted-foreground dark:bg-accent dark:border-accent dark:text-accent-foreground dark:placeholder:text-muted-foreground",success:"bg-success border-success text-success-foreground placeholder:text-success-foreground/70 dark:bg-success dark:border-success dark:text-success-foreground dark:placeholder:text-success-foreground/70",warning:"bg-warning border-warning text-warning-foreground placeholder:text-warning-foreground/70 dark:bg-warning dark:border-warning dark:text-warning-foreground dark:placeholder:text-warning-foreground/70",destructive:"border-destructive bg-purple-muted-700 text-purple-muted-200 placeholder:text-destructive-foreground/70 dark:border-destructive dark:placeholder:text-destructive-foreground/70"}},defaultVariants:{variant:"default"}}),vr=c.forwardRef(({className:e,variant:t,type:r,error:n,...o},a)=>s.jsx("input",{ref:a,type:r,"data-slot":"input","aria-invalid":n||void 0,className:_(qp({variant:t,className:e})),...o}));vr.displayName="Input";function es(e,[t,r]){return Math.min(r,Math.max(t,e))}function F(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Up(e,t){const r=c.createContext(t),n=a=>{const{children:i,...l}=a,u=c.useMemo(()=>l,Object.values(l));return s.jsx(r.Provider,{value:u,children:i})};n.displayName=e+"Provider";function o(a){const i=c.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,o]}function ye(e,t=[]){let r=[];function n(a,i){const l=c.createContext(i),u=r.length;r=[...r,i];const d=p=>{var y;const{scope:g,children:m,...v}=p,h=((y=g==null?void 0:g[e])==null?void 0:y[u])||l,x=c.useMemo(()=>v,Object.values(v));return s.jsx(h.Provider,{value:x,children:m})};d.displayName=a+"Provider";function f(p,g){var h;const m=((h=g==null?void 0:g[e])==null?void 0:h[u])||l,v=c.useContext(m);if(v)return v;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[d,f]}const o=()=>{const a=r.map(i=>c.createContext(i));return function(l){const u=(l==null?void 0:l[e])||a;return c.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return o.scopeName=e,[n,Hp(o,...t)]}function Hp(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const i=n.reduce((l,{useScope:u,scopeName:d})=>{const p=u(a)[`__scope${d}`];return{...l,...p}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function ts(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Qe(...e){return t=>{let r=!1;const n=e.map(o=>{const a=ts(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){const a=n[o];typeof a=="function"?a():ts(e[o],null)}}}}function se(...e){return c.useCallback(Qe(...e),e)}function st(e){const t=Yp(e),r=c.forwardRef((n,o)=>{const{children:a,...i}=n,l=c.Children.toArray(a),u=l.find(Zp);if(u){const d=u.props.children,f=l.map(p=>p===u?c.Children.count(d)>1?c.Children.only(null):c.isValidElement(d)?d.props.children:null:p);return s.jsx(t,{...i,ref:o,children:c.isValidElement(d)?c.cloneElement(d,void 0,f):null})}return s.jsx(t,{...i,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}var Kp=st("Slot");function Yp(e){const t=c.forwardRef((r,n)=>{const{children:o,...a}=r;if(c.isValidElement(o)){const i=Qp(o),l=Jp(a,o.props);return o.type!==c.Fragment&&(l.ref=n?Qe(n,i):i),c.cloneElement(o,l)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var li=Symbol("radix.slottable");function Xp(e){const t=({children:r})=>s.jsx(s.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=li,t}function Zp(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===li}function Jp(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...l)=>{const u=a(...l);return o(...l),u}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function Qp(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function cn(e){const t=e+"CollectionProvider",[r,n]=ye(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:x,children:y}=h,b=S.useRef(null),C=S.useRef(new Map).current;return s.jsx(o,{scope:x,itemMap:C,collectionRef:b,children:y})};i.displayName=t;const l=e+"CollectionSlot",u=st(l),d=S.forwardRef((h,x)=>{const{scope:y,children:b}=h,C=a(l,y),R=se(x,C.collectionRef);return s.jsx(u,{ref:R,children:b})});d.displayName=l;const f=e+"CollectionItemSlot",p="data-radix-collection-item",g=st(f),m=S.forwardRef((h,x)=>{const{scope:y,children:b,...C}=h,R=S.useRef(null),P=se(x,R),j=a(f,y);return S.useEffect(()=>(j.itemMap.set(R,{ref:R,...C}),()=>void j.itemMap.delete(R))),s.jsx(g,{[p]:"",ref:P,children:b})});m.displayName=f;function v(h){const x=a(e+"CollectionConsumer",h);return S.useCallback(()=>{const b=x.collectionRef.current;if(!b)return[];const C=Array.from(b.querySelectorAll(`[${p}]`));return Array.from(x.itemMap.values()).sort((j,T)=>C.indexOf(j.ref.current)-C.indexOf(T.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:d,ItemSlot:m},v,n]}var em=c.createContext(void 0);function Ut(e){const t=c.useContext(em);return e||t||"ltr"}var tm=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],X=tm.reduce((e,t)=>{const r=st(`Primitive.${t}`),n=c.forwardRef((o,a)=>{const{asChild:i,...l}=o,u=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(u,{...l,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function ci(e,t){e&&sn.flushSync(()=>e.dispatchEvent(t))}function Oe(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function rm(e,t=globalThis==null?void 0:globalThis.document){const r=Oe(e);c.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var nm="DismissableLayer",fo="dismissableLayer.update",om="dismissableLayer.pointerDownOutside",am="dismissableLayer.focusOutside",rs,ui=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ht=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:l,...u}=e,d=c.useContext(ui),[f,p]=c.useState(null),g=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=c.useState({}),v=se(t,T=>p(T)),h=Array.from(d.layers),[x]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=h.indexOf(x),b=f?h.indexOf(f):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,R=b>=y,P=lm(T=>{const E=T.target,V=[...d.branches].some(U=>U.contains(E));!R||V||(o==null||o(T),i==null||i(T),T.defaultPrevented||l==null||l())},g),j=cm(T=>{const E=T.target;[...d.branches].some(U=>U.contains(E))||(a==null||a(T),i==null||i(T),T.defaultPrevented||l==null||l())},g);return rm(T=>{b===d.layers.size-1&&(n==null||n(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},g),c.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(rs=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),ns(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=rs)}},[f,g,r,d]),c.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),ns())},[f,d]),c.useEffect(()=>{const T=()=>m({});return document.addEventListener(fo,T),()=>document.removeEventListener(fo,T)},[]),s.jsx(X.div,{...u,ref:v,style:{pointerEvents:C?R?"auto":"none":void 0,...e.style},onFocusCapture:F(e.onFocusCapture,j.onFocusCapture),onBlurCapture:F(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:F(e.onPointerDownCapture,P.onPointerDownCapture)})});Ht.displayName=nm;var sm="DismissableLayerBranch",im=c.forwardRef((e,t)=>{const r=c.useContext(ui),n=c.useRef(null),o=se(t,n);return c.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),s.jsx(X.div,{...e,ref:o})});im.displayName=sm;function lm(e,t=globalThis==null?void 0:globalThis.document){const r=Oe(e),n=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const a=l=>{if(l.target&&!n.current){let u=function(){di(om,r,d,{discrete:!0})};const d={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function cm(e,t=globalThis==null?void 0:globalThis.document){const r=Oe(e),n=c.useRef(!1);return c.useEffect(()=>{const o=a=>{a.target&&!n.current&&di(am,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function ns(){const e=new CustomEvent(fo);document.dispatchEvent(e)}function di(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?ci(o,a):o.dispatchEvent(a)}var qn=0;function un(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??os()),document.body.insertAdjacentElement("beforeend",e[1]??os()),qn++,()=>{qn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),qn--}},[])}function os(){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 Un="focusScope.autoFocusOnMount",Hn="focusScope.autoFocusOnUnmount",as={bubbles:!1,cancelable:!0},um="FocusScope",xr=c.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[l,u]=c.useState(null),d=Oe(o),f=Oe(a),p=c.useRef(null),g=se(t,h=>u(h)),m=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(n){let h=function(C){if(m.paused||!l)return;const R=C.target;l.contains(R)?p.current=R:at(p.current,{select:!0})},x=function(C){if(m.paused||!l)return;const R=C.relatedTarget;R!==null&&(l.contains(R)||at(p.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const P of C)P.removedNodes.length>0&&at(l)};document.addEventListener("focusin",h),document.addEventListener("focusout",x);const b=new MutationObserver(y);return l&&b.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",x),b.disconnect()}}},[n,l,m.paused]),c.useEffect(()=>{if(l){is.add(m);const h=document.activeElement;if(!l.contains(h)){const y=new CustomEvent(Un,as);l.addEventListener(Un,d),l.dispatchEvent(y),y.defaultPrevented||(dm(hm(fi(l)),{select:!0}),document.activeElement===h&&at(l))}return()=>{l.removeEventListener(Un,d),setTimeout(()=>{const y=new CustomEvent(Hn,as);l.addEventListener(Hn,f),l.dispatchEvent(y),y.defaultPrevented||at(h??document.body,{select:!0}),l.removeEventListener(Hn,f),is.remove(m)},0)}}},[l,d,f,m]);const v=c.useCallback(h=>{if(!r&&!n||m.paused)return;const x=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,y=document.activeElement;if(x&&y){const b=h.currentTarget,[C,R]=fm(b);C&&R?!h.shiftKey&&y===R?(h.preventDefault(),r&&at(C,{select:!0})):h.shiftKey&&y===C&&(h.preventDefault(),r&&at(R,{select:!0})):y===b&&h.preventDefault()}},[r,n,m.paused]);return s.jsx(X.div,{tabIndex:-1,...i,ref:g,onKeyDown:v})});xr.displayName=um;function dm(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(at(n,{select:t}),document.activeElement!==r)return}function fm(e){const t=fi(e),r=ss(t,e),n=ss(t.reverse(),e);return[r,n]}function fi(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function ss(e,t){for(const r of e)if(!pm(r,{upTo:t}))return r}function pm(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 mm(e){return e instanceof HTMLInputElement&&"select"in e}function at(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&mm(e)&&t&&e.select()}}var is=gm();function gm(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=ls(e,t),e.unshift(t)},remove(t){var r;e=ls(e,t),(r=e[0])==null||r.resume()}}}function ls(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function hm(e){return e.filter(t=>t.tagName!=="A")}var xe=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},vm=c[" useId ".trim().toString()]||(()=>{}),xm=0;function me(e){const[t,r]=c.useState(vm());return xe(()=>{r(n=>n??String(xm++))},[e]),t?`radix-${t}`:""}const bm=["top","right","bottom","left"],it=Math.min,Pe=Math.max,Ur=Math.round,Dr=Math.floor,Ue=e=>({x:e,y:e}),ym={left:"right",right:"left",bottom:"top",top:"bottom"},wm={start:"end",end:"start"};function po(e,t,r){return Pe(e,it(t,r))}function et(e,t){return typeof e=="function"?e(t):e}function tt(e){return e.split("-")[0]}function Kt(e){return e.split("-")[1]}function Ao(e){return e==="x"?"y":"x"}function Io(e){return e==="y"?"height":"width"}const Cm=new Set(["top","bottom"]);function qe(e){return Cm.has(tt(e))?"y":"x"}function Mo(e){return Ao(qe(e))}function Sm(e,t,r){r===void 0&&(r=!1);const n=Kt(e),o=Mo(e),a=Io(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Hr(i)),[i,Hr(i)]}function Rm(e){const t=Hr(e);return[mo(e),t,mo(t)]}function mo(e){return e.replace(/start|end/g,t=>wm[t])}const cs=["left","right"],us=["right","left"],Em=["top","bottom"],km=["bottom","top"];function Pm(e,t,r){switch(e){case"top":case"bottom":return r?t?us:cs:t?cs:us;case"left":case"right":return t?Em:km;default:return[]}}function Nm(e,t,r,n){const o=Kt(e);let a=Pm(tt(e),r==="start",n);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(mo)))),a}function Hr(e){return e.replace(/left|right|bottom|top/g,t=>ym[t])}function jm(e){return{top:0,right:0,bottom:0,left:0,...e}}function pi(e){return typeof e!="number"?jm(e):{top:e,right:e,bottom:e,left:e}}function Kr(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function ds(e,t,r){let{reference:n,floating:o}=e;const a=qe(t),i=Mo(t),l=Io(i),u=tt(t),d=a==="y",f=n.x+n.width/2-o.width/2,p=n.y+n.height/2-o.height/2,g=n[l]/2-o[l]/2;let m;switch(u){case"top":m={x:f,y:n.y-o.height};break;case"bottom":m={x:f,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:p};break;case"left":m={x:n.x-o.width,y:p};break;default:m={x:n.x,y:n.y}}switch(Kt(t)){case"start":m[i]-=g*(r&&d?-1:1);break;case"end":m[i]+=g*(r&&d?-1:1);break}return m}const Tm=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:i}=r,l=a.filter(Boolean),u=await(i.isRTL==null?void 0:i.isRTL(t));let d=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=ds(d,n,u),g=n,m={},v=0;for(let h=0;h<l.length;h++){const{name:x,fn:y}=l[h],{x:b,y:C,data:R,reset:P}=await y({x:f,y:p,initialPlacement:n,placement:g,strategy:o,middlewareData:m,rects:d,platform:i,elements:{reference:e,floating:t}});f=b??f,p=C??p,m={...m,[x]:{...m[x],...R}},P&&v<=50&&(v++,typeof P=="object"&&(P.placement&&(g=P.placement),P.rects&&(d=P.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):P.rects),{x:f,y:p}=ds(d,g,u)),h=-1)}return{x:f,y:p,placement:g,strategy:o,middlewareData:m}};async function dr(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:i,elements:l,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:g=!1,padding:m=0}=et(t,e),v=pi(m),x=l[g?p==="floating"?"reference":"floating":p],y=Kr(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(x)))==null||r?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:d,rootBoundary:f,strategy:u})),b=p==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),R=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},P=Kr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:b,offsetParent:C,strategy:u}):b);return{top:(y.top-P.top+v.top)/R.y,bottom:(P.bottom-y.bottom+v.bottom)/R.y,left:(y.left-P.left+v.left)/R.x,right:(P.right-y.right+v.right)/R.x}}const _m=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:i,elements:l,middlewareData:u}=t,{element:d,padding:f=0}=et(e,t)||{};if(d==null)return{};const p=pi(f),g={x:r,y:n},m=Mo(o),v=Io(m),h=await i.getDimensions(d),x=m==="y",y=x?"top":"left",b=x?"bottom":"right",C=x?"clientHeight":"clientWidth",R=a.reference[v]+a.reference[m]-g[m]-a.floating[v],P=g[m]-a.reference[m],j=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let T=j?j[C]:0;(!T||!await(i.isElement==null?void 0:i.isElement(j)))&&(T=l.floating[C]||a.floating[v]);const E=R/2-P/2,V=T/2-h[v]/2-1,U=it(p[y],V),re=it(p[b],V),te=U,J=T-h[v]-re,q=T/2-h[v]/2+E,D=po(te,q,J),A=!u.arrow&&Kt(o)!=null&&q!==D&&a.reference[v]/2-(q<te?U:re)-h[v]/2<0,$=A?q<te?q-te:q-J:0;return{[m]:g[m]+$,data:{[m]:D,centerOffset:q-D-$,...A&&{alignmentOffset:$}},reset:A}}}),Am=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:i,initialPlacement:l,platform:u,elements:d}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:h=!0,...x}=et(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const y=tt(o),b=qe(l),C=tt(l)===l,R=await(u.isRTL==null?void 0:u.isRTL(d.floating)),P=g||(C||!h?[Hr(l)]:Rm(l)),j=v!=="none";!g&&j&&P.push(...Nm(l,h,v,R));const T=[l,...P],E=await dr(t,x),V=[];let U=((n=a.flip)==null?void 0:n.overflows)||[];if(f&&V.push(E[y]),p){const q=Sm(o,i,R);V.push(E[q[0]],E[q[1]])}if(U=[...U,{placement:o,overflows:V}],!V.every(q=>q<=0)){var re,te;const q=(((re=a.flip)==null?void 0:re.index)||0)+1,D=T[q];if(D&&(!(p==="alignment"?b!==qe(D):!1)||U.every(k=>qe(k.placement)===b?k.overflows[0]>0:!0)))return{data:{index:q,overflows:U},reset:{placement:D}};let A=(te=U.filter($=>$.overflows[0]<=0).sort(($,k)=>$.overflows[1]-k.overflows[1])[0])==null?void 0:te.placement;if(!A)switch(m){case"bestFit":{var J;const $=(J=U.filter(k=>{if(j){const O=qe(k.placement);return O===b||O==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(O=>O>0).reduce((O,W)=>O+W,0)]).sort((k,O)=>k[1]-O[1])[0])==null?void 0:J[0];$&&(A=$);break}case"initialPlacement":A=l;break}if(o!==A)return{reset:{placement:A}}}return{}}}};function fs(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ps(e){return bm.some(t=>e[t]>=0)}const Im=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=et(e,t);switch(n){case"referenceHidden":{const a=await dr(t,{...o,elementContext:"reference"}),i=fs(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:ps(i)}}}case"escaped":{const a=await dr(t,{...o,altBoundary:!0}),i=fs(a,r.floating);return{data:{escapedOffsets:i,escaped:ps(i)}}}default:return{}}}}},mi=new Set(["left","top"]);async function Mm(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=tt(r),l=Kt(r),u=qe(r)==="y",d=mi.has(i)?-1:1,f=a&&u?-1:1,p=et(t,e);let{mainAxis:g,crossAxis:m,alignmentAxis:v}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof v=="number"&&(m=l==="end"?v*-1:v),u?{x:m*f,y:g*d}:{x:g*d,y:m*f}}const Om=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:a,placement:i,middlewareData:l}=t,u=await Mm(t,e);return i===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:o+u.x,y:a+u.y,data:{...u,placement:i}}}}},Dm=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:l={fn:x=>{let{x:y,y:b}=x;return{x:y,y:b}}},...u}=et(e,t),d={x:r,y:n},f=await dr(t,u),p=qe(tt(o)),g=Ao(p);let m=d[g],v=d[p];if(a){const x=g==="y"?"top":"left",y=g==="y"?"bottom":"right",b=m+f[x],C=m-f[y];m=po(b,m,C)}if(i){const x=p==="y"?"top":"left",y=p==="y"?"bottom":"right",b=v+f[x],C=v-f[y];v=po(b,v,C)}const h=l.fn({...t,[g]:m,[p]:v});return{...h,data:{x:h.x-r,y:h.y-n,enabled:{[g]:a,[p]:i}}}}}},Lm=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:i}=t,{offset:l=0,mainAxis:u=!0,crossAxis:d=!0}=et(e,t),f={x:r,y:n},p=qe(o),g=Ao(p);let m=f[g],v=f[p];const h=et(l,t),x=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){const C=g==="y"?"height":"width",R=a.reference[g]-a.floating[C]+x.mainAxis,P=a.reference[g]+a.reference[C]-x.mainAxis;m<R?m=R:m>P&&(m=P)}if(d){var y,b;const C=g==="y"?"width":"height",R=mi.has(tt(o)),P=a.reference[p]-a.floating[C]+(R&&((y=i.offset)==null?void 0:y[p])||0)+(R?0:x.crossAxis),j=a.reference[p]+a.reference[C]+(R?0:((b=i.offset)==null?void 0:b[p])||0)-(R?x.crossAxis:0);v<P?v=P:v>j&&(v=j)}return{[g]:m,[p]:v}}}},$m=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:a,platform:i,elements:l}=t,{apply:u=()=>{},...d}=et(e,t),f=await dr(t,d),p=tt(o),g=Kt(o),m=qe(o)==="y",{width:v,height:h}=a.floating;let x,y;p==="top"||p==="bottom"?(x=p,y=g===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(y=p,x=g==="end"?"top":"bottom");const b=h-f.top-f.bottom,C=v-f.left-f.right,R=it(h-f[x],b),P=it(v-f[y],C),j=!t.middlewareData.shift;let T=R,E=P;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(E=C),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(T=b),j&&!g){const U=Pe(f.left,0),re=Pe(f.right,0),te=Pe(f.top,0),J=Pe(f.bottom,0);m?E=v-2*(U!==0||re!==0?U+re:Pe(f.left,f.right)):T=h-2*(te!==0||J!==0?te+J:Pe(f.top,f.bottom))}await u({...t,availableWidth:E,availableHeight:T});const V=await i.getDimensions(l.floating);return v!==V.width||h!==V.height?{reset:{rects:!0}}:{}}}};function dn(){return typeof window<"u"}function Yt(e){return gi(e)?(e.nodeName||"").toLowerCase():"#document"}function Ne(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ke(e){var t;return(t=(gi(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gi(e){return dn()?e instanceof Node||e instanceof Ne(e).Node:!1}function De(e){return dn()?e instanceof Element||e instanceof Ne(e).Element:!1}function He(e){return dn()?e instanceof HTMLElement||e instanceof Ne(e).HTMLElement:!1}function ms(e){return!dn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ne(e).ShadowRoot}const Fm=new Set(["inline","contents"]);function br(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Le(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!Fm.has(o)}const Vm=new Set(["table","td","th"]);function Bm(e){return Vm.has(Yt(e))}const Gm=[":popover-open",":modal"];function fn(e){return Gm.some(t=>{try{return e.matches(t)}catch{return!1}})}const Wm=["transform","translate","scale","rotate","perspective"],zm=["transform","translate","scale","rotate","perspective","filter"],qm=["paint","layout","strict","content"];function Oo(e){const t=Do(),r=De(e)?Le(e):e;return Wm.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||zm.some(n=>(r.willChange||"").includes(n))||qm.some(n=>(r.contain||"").includes(n))}function Um(e){let t=lt(e);for(;He(t)&&!Bt(t);){if(Oo(t))return t;if(fn(t))return null;t=lt(t)}return null}function Do(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Hm=new Set(["html","body","#document"]);function Bt(e){return Hm.has(Yt(e))}function Le(e){return Ne(e).getComputedStyle(e)}function pn(e){return De(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function lt(e){if(Yt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ms(e)&&e.host||Ke(e);return ms(t)?t.host:t}function hi(e){const t=lt(e);return Bt(t)?e.ownerDocument?e.ownerDocument.body:e.body:He(t)&&br(t)?t:hi(t)}function fr(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=hi(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),i=Ne(o);if(a){const l=go(i);return t.concat(i,i.visualViewport||[],br(o)?o:[],l&&r?fr(l):[])}return t.concat(o,fr(o,[],r))}function go(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vi(e){const t=Le(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=He(e),a=o?e.offsetWidth:r,i=o?e.offsetHeight:n,l=Ur(r)!==a||Ur(n)!==i;return l&&(r=a,n=i),{width:r,height:n,$:l}}function Lo(e){return De(e)?e:e.contextElement}function Ft(e){const t=Lo(e);if(!He(t))return Ue(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=vi(t);let i=(a?Ur(r.width):r.width)/n,l=(a?Ur(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const Km=Ue(0);function xi(e){const t=Ne(e);return!Do()||!t.visualViewport?Km:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ym(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Ne(e)?!1:t}function yt(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=Lo(e);let i=Ue(1);t&&(n?De(n)&&(i=Ft(n)):i=Ft(e));const l=Ym(a,r,n)?xi(a):Ue(0);let u=(o.left+l.x)/i.x,d=(o.top+l.y)/i.y,f=o.width/i.x,p=o.height/i.y;if(a){const g=Ne(a),m=n&&De(n)?Ne(n):n;let v=g,h=go(v);for(;h&&n&&m!==v;){const x=Ft(h),y=h.getBoundingClientRect(),b=Le(h),C=y.left+(h.clientLeft+parseFloat(b.paddingLeft))*x.x,R=y.top+(h.clientTop+parseFloat(b.paddingTop))*x.y;u*=x.x,d*=x.y,f*=x.x,p*=x.y,u+=C,d+=R,v=Ne(h),h=go(v)}}return Kr({width:f,height:p,x:u,y:d})}function mn(e,t){const r=pn(e).scrollLeft;return t?t.left+r:yt(Ke(e)).left+r}function bi(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-mn(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function Xm(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a=o==="fixed",i=Ke(n),l=t?fn(t.floating):!1;if(n===i||l&&a)return r;let u={scrollLeft:0,scrollTop:0},d=Ue(1);const f=Ue(0),p=He(n);if((p||!p&&!a)&&((Yt(n)!=="body"||br(i))&&(u=pn(n)),He(n))){const m=yt(n);d=Ft(n),f.x=m.x+n.clientLeft,f.y=m.y+n.clientTop}const g=i&&!p&&!a?bi(i,u):Ue(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-u.scrollLeft*d.x+f.x+g.x,y:r.y*d.y-u.scrollTop*d.y+f.y+g.y}}function Zm(e){return Array.from(e.getClientRects())}function Jm(e){const t=Ke(e),r=pn(e),n=e.ownerDocument.body,o=Pe(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=Pe(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+mn(e);const l=-r.scrollTop;return Le(n).direction==="rtl"&&(i+=Pe(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:l}}const gs=25;function Qm(e,t){const r=Ne(e),n=Ke(e),o=r.visualViewport;let a=n.clientWidth,i=n.clientHeight,l=0,u=0;if(o){a=o.width,i=o.height;const f=Do();(!f||f&&t==="fixed")&&(l=o.offsetLeft,u=o.offsetTop)}const d=mn(n);if(d<=0){const f=n.ownerDocument,p=f.body,g=getComputedStyle(p),m=f.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,v=Math.abs(n.clientWidth-p.clientWidth-m);v<=gs&&(a-=v)}else d<=gs&&(a+=d);return{width:a,height:i,x:l,y:u}}const eg=new Set(["absolute","fixed"]);function tg(e,t){const r=yt(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=He(e)?Ft(e):Ue(1),i=e.clientWidth*a.x,l=e.clientHeight*a.y,u=o*a.x,d=n*a.y;return{width:i,height:l,x:u,y:d}}function hs(e,t,r){let n;if(t==="viewport")n=Qm(e,r);else if(t==="document")n=Jm(Ke(e));else if(De(t))n=tg(t,r);else{const o=xi(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Kr(n)}function yi(e,t){const r=lt(e);return r===t||!De(r)||Bt(r)?!1:Le(r).position==="fixed"||yi(r,t)}function rg(e,t){const r=t.get(e);if(r)return r;let n=fr(e,[],!1).filter(l=>De(l)&&Yt(l)!=="body"),o=null;const a=Le(e).position==="fixed";let i=a?lt(e):e;for(;De(i)&&!Bt(i);){const l=Le(i),u=Oo(i);!u&&l.position==="fixed"&&(o=null),(a?!u&&!o:!u&&l.position==="static"&&!!o&&eg.has(o.position)||br(i)&&!u&&yi(e,i))?n=n.filter(f=>f!==i):o=l,i=lt(i)}return t.set(e,n),n}function ng(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?fn(t)?[]:rg(t,this._c):[].concat(r),n],l=i[0],u=i.reduce((d,f)=>{const p=hs(t,f,o);return d.top=Pe(p.top,d.top),d.right=it(p.right,d.right),d.bottom=it(p.bottom,d.bottom),d.left=Pe(p.left,d.left),d},hs(t,l,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function og(e){const{width:t,height:r}=vi(e);return{width:t,height:r}}function ag(e,t,r){const n=He(t),o=Ke(t),a=r==="fixed",i=yt(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const u=Ue(0);function d(){u.x=mn(o)}if(n||!n&&!a)if((Yt(t)!=="body"||br(o))&&(l=pn(t)),n){const m=yt(t,!0,a,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else o&&d();a&&!n&&o&&d();const f=o&&!n&&!a?bi(o,l):Ue(0),p=i.left+l.scrollLeft-u.x-f.x,g=i.top+l.scrollTop-u.y-f.y;return{x:p,y:g,width:i.width,height:i.height}}function Kn(e){return Le(e).position==="static"}function vs(e,t){if(!He(e)||Le(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ke(e)===r&&(r=r.ownerDocument.body),r}function wi(e,t){const r=Ne(e);if(fn(e))return r;if(!He(e)){let o=lt(e);for(;o&&!Bt(o);){if(De(o)&&!Kn(o))return o;o=lt(o)}return r}let n=vs(e,t);for(;n&&Bm(n)&&Kn(n);)n=vs(n,t);return n&&Bt(n)&&Kn(n)&&!Oo(n)?r:n||Um(e)||r}const sg=async function(e){const t=this.getOffsetParent||wi,r=this.getDimensions,n=await r(e.floating);return{reference:ag(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function ig(e){return Le(e).direction==="rtl"}const lg={convertOffsetParentRelativeRectToViewportRelativeRect:Xm,getDocumentElement:Ke,getClippingRect:ng,getOffsetParent:wi,getElementRects:sg,getClientRects:Zm,getDimensions:og,getScale:Ft,isElement:De,isRTL:ig};function Ci(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function cg(e,t){let r=null,n;const o=Ke(e);function a(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function i(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),a();const d=e.getBoundingClientRect(),{left:f,top:p,width:g,height:m}=d;if(l||t(),!g||!m)return;const v=Dr(p),h=Dr(o.clientWidth-(f+g)),x=Dr(o.clientHeight-(p+m)),y=Dr(f),C={rootMargin:-v+"px "+-h+"px "+-x+"px "+-y+"px",threshold:Pe(0,it(1,u))||1};let R=!0;function P(j){const T=j[0].intersectionRatio;if(T!==u){if(!R)return i();T?i(!1,T):n=setTimeout(()=>{i(!1,1e-7)},1e3)}T===1&&!Ci(d,e.getBoundingClientRect())&&i(),R=!1}try{r=new IntersectionObserver(P,{...C,root:o.ownerDocument})}catch{r=new IntersectionObserver(P,C)}r.observe(e)}return i(!0),a}function ug(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=n,d=Lo(e),f=o||a?[...d?fr(d):[],...fr(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",r,{passive:!0}),a&&y.addEventListener("resize",r)});const p=d&&l?cg(d,r):null;let g=-1,m=null;i&&(m=new ResizeObserver(y=>{let[b]=y;b&&b.target===d&&m&&(m.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var C;(C=m)==null||C.observe(t)})),r()}),d&&!u&&m.observe(d),m.observe(t));let v,h=u?yt(e):null;u&&x();function x(){const y=yt(e);h&&!Ci(h,y)&&r(),h=y,v=requestAnimationFrame(x)}return r(),()=>{var y;f.forEach(b=>{o&&b.removeEventListener("scroll",r),a&&b.removeEventListener("resize",r)}),p==null||p(),(y=m)==null||y.disconnect(),m=null,u&&cancelAnimationFrame(v)}}const dg=Om,fg=Dm,pg=Am,mg=$m,gg=Im,xs=_m,hg=Lm,vg=(e,t,r)=>{const n=new Map,o={platform:lg,...r},a={...o.platform,_c:n};return Tm(e,t,{...o,platform:a})};var xg=typeof document<"u",bg=function(){},Gr=xg?S.useLayoutEffect:bg;function Yr(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 r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Yr(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!Yr(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Si(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function bs(e,t){const r=Si(e);return Math.round(t*r)/r}function Yn(e){const t=c.useRef(e);return Gr(()=>{t.current=e}),t}function yg(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:i}={},transform:l=!0,whileElementsMounted:u,open:d}=e,[f,p]=c.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[g,m]=c.useState(n);Yr(g,n)||m(n);const[v,h]=c.useState(null),[x,y]=c.useState(null),b=c.useCallback(k=>{k!==j.current&&(j.current=k,h(k))},[]),C=c.useCallback(k=>{k!==T.current&&(T.current=k,y(k))},[]),R=a||v,P=i||x,j=c.useRef(null),T=c.useRef(null),E=c.useRef(f),V=u!=null,U=Yn(u),re=Yn(o),te=Yn(d),J=c.useCallback(()=>{if(!j.current||!T.current)return;const k={placement:t,strategy:r,middleware:g};re.current&&(k.platform=re.current),vg(j.current,T.current,k).then(O=>{const W={...O,isPositioned:te.current!==!1};q.current&&!Yr(E.current,W)&&(E.current=W,sn.flushSync(()=>{p(W)}))})},[g,t,r,re,te]);Gr(()=>{d===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,p(k=>({...k,isPositioned:!1})))},[d]);const q=c.useRef(!1);Gr(()=>(q.current=!0,()=>{q.current=!1}),[]),Gr(()=>{if(R&&(j.current=R),P&&(T.current=P),R&&P){if(U.current)return U.current(R,P,J);J()}},[R,P,J,U,V]);const D=c.useMemo(()=>({reference:j,floating:T,setReference:b,setFloating:C}),[b,C]),A=c.useMemo(()=>({reference:R,floating:P}),[R,P]),$=c.useMemo(()=>{const k={position:r,left:0,top:0};if(!A.floating)return k;const O=bs(A.floating,f.x),W=bs(A.floating,f.y);return l?{...k,transform:"translate("+O+"px, "+W+"px)",...Si(A.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:O,top:W}},[r,l,A.floating,f.x,f.y]);return c.useMemo(()=>({...f,update:J,refs:D,elements:A,floatingStyles:$}),[f,J,D,A,$])}const wg=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?xs({element:n.current,padding:o}).fn(r):{}:n?xs({element:n,padding:o}).fn(r):{}}}},Cg=(e,t)=>({...dg(e),options:[e,t]}),Sg=(e,t)=>({...fg(e),options:[e,t]}),Rg=(e,t)=>({...hg(e),options:[e,t]}),Eg=(e,t)=>({...pg(e),options:[e,t]}),kg=(e,t)=>({...mg(e),options:[e,t]}),Pg=(e,t)=>({...gg(e),options:[e,t]}),Ng=(e,t)=>({...wg(e),options:[e,t]});var jg="Arrow",Ri=c.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return s.jsx(X.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ri.displayName=jg;var Tg=Ri;function $o(e){const[t,r]=c.useState(void 0);return xe(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let i,l;if("borderBoxSize"in a){const u=a.borderBoxSize,d=Array.isArray(u)?u[0]:u;i=d.inlineSize,l=d.blockSize}else i=e.offsetWidth,l=e.offsetHeight;r({width:i,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Fo="Popper",[Ei,ut]=ye(Fo),[_g,ki]=Ei(Fo),Pi=e=>{const{__scopePopper:t,children:r}=e,[n,o]=c.useState(null);return s.jsx(_g,{scope:t,anchor:n,onAnchorChange:o,children:r})};Pi.displayName=Fo;var Ni="PopperAnchor",ji=c.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=ki(Ni,r),i=c.useRef(null),l=se(t,i),u=c.useRef(null);return c.useEffect(()=>{const d=u.current;u.current=(n==null?void 0:n.current)||i.current,d!==u.current&&a.onAnchorChange(u.current)}),n?null:s.jsx(X.div,{...o,ref:l})});ji.displayName=Ni;var Vo="PopperContent",[Ag,Ig]=Ei(Vo),Ti=c.forwardRef((e,t)=>{var I,Z,ee,oe,ce,ie;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:m="optimized",onPlaced:v,...h}=e,x=ki(Vo,r),[y,b]=c.useState(null),C=se(t,Ce=>b(Ce)),[R,P]=c.useState(null),j=$o(R),T=(j==null?void 0:j.width)??0,E=(j==null?void 0:j.height)??0,V=n+(a!=="center"?"-"+a:""),U=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},re=Array.isArray(d)?d:[d],te=re.length>0,J={padding:U,boundary:re.filter(Og),altBoundary:te},{refs:q,floatingStyles:D,placement:A,isPositioned:$,middlewareData:k}=yg({strategy:"fixed",placement:V,whileElementsMounted:(...Ce)=>ug(...Ce,{animationFrame:m==="always"}),elements:{reference:x.anchor},middleware:[Cg({mainAxis:o+E,alignmentAxis:i}),u&&Sg({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Rg():void 0,...J}),u&&Eg({...J}),kg({...J,apply:({elements:Ce,rects:je,availableWidth:Be,availableHeight:Ie})=>{const{width:nt,height:Ar}=je.reference,Xe=Ce.floating.style;Xe.setProperty("--radix-popper-available-width",`${Be}px`),Xe.setProperty("--radix-popper-available-height",`${Ie}px`),Xe.setProperty("--radix-popper-anchor-width",`${nt}px`),Xe.setProperty("--radix-popper-anchor-height",`${Ar}px`)}}),R&&Ng({element:R,padding:l}),Dg({arrowWidth:T,arrowHeight:E}),g&&Pg({strategy:"referenceHidden",...J})]}),[O,W]=Ii(A),Q=Oe(v);xe(()=>{$&&(Q==null||Q())},[$,Q]);const N=(I=k.arrow)==null?void 0:I.x,B=(Z=k.arrow)==null?void 0:Z.y,Y=((ee=k.arrow)==null?void 0:ee.centerOffset)!==0,[M,G]=c.useState();return xe(()=>{y&&G(window.getComputedStyle(y).zIndex)},[y]),s.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:$?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:M,"--radix-popper-transform-origin":[(oe=k.transformOrigin)==null?void 0:oe.x,(ce=k.transformOrigin)==null?void 0:ce.y].join(" "),...((ie=k.hide)==null?void 0:ie.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(Ag,{scope:r,placedSide:O,onArrowChange:P,arrowX:N,arrowY:B,shouldHideArrow:Y,children:s.jsx(X.div,{"data-side":O,"data-align":W,...h,ref:C,style:{...h.style,animation:$?void 0:"none"}})})})});Ti.displayName=Vo;var _i="PopperArrow",Mg={top:"bottom",right:"left",bottom:"top",left:"right"},Ai=c.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=Ig(_i,n),i=Mg[a.placedSide];return s.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:s.jsx(Tg,{...o,ref:r,style:{...o.style,display:"block"}})})});Ai.displayName=_i;function Og(e){return e!==null}var Dg=e=>({name:"transformOrigin",options:e,fn(t){var x,y,b;const{placement:r,rects:n,middlewareData:o}=t,i=((x=o.arrow)==null?void 0:x.centerOffset)!==0,l=i?0:e.arrowWidth,u=i?0:e.arrowHeight,[d,f]=Ii(r),p={start:"0%",center:"50%",end:"100%"}[f],g=(((y=o.arrow)==null?void 0:y.x)??0)+l/2,m=(((b=o.arrow)==null?void 0:b.y)??0)+u/2;let v="",h="";return d==="bottom"?(v=i?p:`${g}px`,h=`${-u}px`):d==="top"?(v=i?p:`${g}px`,h=`${n.floating.height+u}px`):d==="right"?(v=`${-u}px`,h=i?p:`${m}px`):d==="left"&&(v=`${n.floating.width+u}px`,h=i?p:`${m}px`),{data:{x:v,y:h}}}});function Ii(e){const[t,r="center"]=e.split("-");return[t,r]}var yr=Pi,wr=ji,gn=Ti,hn=Ai,Lg="Portal",Xt=c.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[o,a]=c.useState(!1);xe(()=>a(!0),[]);const i=r||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return i?hr.createPortal(s.jsx(X.div,{...n,ref:t}),i):null});Xt.displayName=Lg;var $g=c[" useInsertionEffect ".trim().toString()]||xe;function be({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,a,i]=Fg({defaultProp:t,onChange:r}),l=e!==void 0,u=l?e:o;{const f=c.useRef(e!==void 0);c.useEffect(()=>{const p=f.current;p!==l&&console.warn(`${n} is changing from ${p?"controlled":"uncontrolled"} to ${l?"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.`),f.current=l},[l,n])}const d=c.useCallback(f=>{var p;if(l){const g=Vg(f)?f(e):f;g!==e&&((p=i.current)==null||p.call(i,g))}else a(f)},[l,e,a,i]);return[u,d]}function Fg({defaultProp:e,onChange:t}){const[r,n]=c.useState(e),o=c.useRef(r),a=c.useRef(t);return $g(()=>{a.current=t},[t]),c.useEffect(()=>{var i;o.current!==r&&((i=a.current)==null||i.call(a,r),o.current=r)},[r,o]),[r,n,a]}function Vg(e){return typeof e=="function"}function Bo(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Mi=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"}),Bg="VisuallyHidden",Oi=c.forwardRef((e,t)=>s.jsx(X.span,{...e,ref:t,style:{...Mi,...e.style}}));Oi.displayName=Bg;var Gg=Oi,Wg=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},_t=new WeakMap,Lr=new WeakMap,$r={},Xn=0,Di=function(e){return e&&(e.host||Di(e.parentNode))},zg=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Di(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},qg=function(e,t,r,n){var o=zg(t,Array.isArray(e)?e:[e]);$r[r]||($r[r]=new WeakMap);var a=$r[r],i=[],l=new Set,u=new Set(o),d=function(p){!p||l.has(p)||(l.add(p),d(p.parentNode))};o.forEach(d);var f=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(g){if(l.has(g))f(g);else try{var m=g.getAttribute(n),v=m!==null&&m!=="false",h=(_t.get(g)||0)+1,x=(a.get(g)||0)+1;_t.set(g,h),a.set(g,x),i.push(g),h===1&&v&&Lr.set(g,!0),x===1&&g.setAttribute(r,"true"),v||g.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",g,y)}})};return f(t),l.clear(),Xn++,function(){i.forEach(function(p){var g=_t.get(p)-1,m=a.get(p)-1;_t.set(p,g),a.set(p,m),g||(Lr.has(p)||p.removeAttribute(n),Lr.delete(p)),m||p.removeAttribute(r)}),Xn--,Xn||(_t=new WeakMap,_t=new WeakMap,Lr=new WeakMap,$r={})}},vn=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=Wg(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),qg(n,o,r,"aria-hidden")):function(){return null}},ze=function(){return ze=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},ze.apply(this,arguments)};function Li(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Ug(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var Wr="right-scroll-bar-position",zr="width-before-scroll-bar",Hg="with-scroll-bars-hidden",Kg="--removed-body-scroll-bar-size";function Zn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Yg(e,t){var r=S.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var Xg=typeof window<"u"?c.useLayoutEffect:c.useEffect,ys=new WeakMap;function Zg(e,t){var r=Yg(null,function(n){return e.forEach(function(o){return Zn(o,n)})});return Xg(function(){var n=ys.get(r);if(n){var o=new Set(n),a=new Set(e),i=r.current;o.forEach(function(l){a.has(l)||Zn(l,null)}),a.forEach(function(l){o.has(l)||Zn(l,i)})}ys.set(r,e)},[e]),r}function Jg(e){return e}function Qg(e,t){t===void 0&&(t=Jg);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var i=t(a,n);return r.push(i),function(){r=r.filter(function(l){return l!==i})}},assignSyncMedium:function(a){for(n=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(l){return a(l)},filter:function(){return r}}},assignMedium:function(a){n=!0;var i=[];if(r.length){var l=r;r=[],l.forEach(a),i=r}var u=function(){var f=i;i=[],f.forEach(a)},d=function(){return Promise.resolve().then(u)};d(),r={push:function(f){i.push(f),d()},filter:function(f){return i=i.filter(f),r}}}};return o}function eh(e){e===void 0&&(e={});var t=Qg(null);return t.options=ze({async:!0,ssr:!1},e),t}var $i=function(e){var t=e.sideCar,r=Li(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return c.createElement(n,ze({},r))};$i.isSideCarExport=!0;function th(e,t){return e.useMedium(t),$i}var Fi=eh(),Jn=function(){},xn=c.forwardRef(function(e,t){var r=c.useRef(null),n=c.useState({onScrollCapture:Jn,onWheelCapture:Jn,onTouchMoveCapture:Jn}),o=n[0],a=n[1],i=e.forwardProps,l=e.children,u=e.className,d=e.removeScrollBar,f=e.enabled,p=e.shards,g=e.sideCar,m=e.noRelative,v=e.noIsolation,h=e.inert,x=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,C=e.gapMode,R=Li(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=g,j=Zg([r,t]),T=ze(ze({},R),o);return c.createElement(c.Fragment,null,f&&c.createElement(P,{sideCar:Fi,removeScrollBar:d,shards:p,noRelative:m,noIsolation:v,inert:h,setCallbacks:a,allowPinchZoom:!!x,lockRef:r,gapMode:C}),i?c.cloneElement(c.Children.only(l),ze(ze({},T),{ref:j})):c.createElement(b,ze({},T,{className:u,ref:j}),l))});xn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};xn.classNames={fullWidth:zr,zeroRight:Wr};var rh=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function nh(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=rh();return t&&e.setAttribute("nonce",t),e}function oh(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ah(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var sh=function(){var e=0,t=null;return{add:function(r){e==0&&(t=nh())&&(oh(t,r),ah(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ih=function(){var e=sh();return function(t,r){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Vi=function(){var e=ih(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},lh={left:0,top:0,right:0,gap:0},Qn=function(e){return parseInt(e||"",10)||0},ch=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Qn(r),Qn(n),Qn(o)]},uh=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return lh;var t=ch(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},dh=Vi(),Vt="data-scroll-locked",fh=function(e,t,r,n){var o=e.left,a=e.top,i=e.right,l=e.gap;return r===void 0&&(r="margin"),`
31
- .`.concat(Hg,` {
32
- overflow: hidden `).concat(n,`;
33
- padding-right: `).concat(l,"px ").concat(n,`;
34
- }
35
- body[`).concat(Vt,`] {
36
- overflow: hidden `).concat(n,`;
37
- overscroll-behavior: contain;
38
- `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
39
- padding-left: `.concat(o,`px;
40
- padding-top: `).concat(a,`px;
41
- padding-right: `).concat(i,`px;
42
- margin-left:0;
43
- margin-top:0;
44
- margin-right: `).concat(l,"px ").concat(n,`;
45
- `),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),`
46
- }
47
-
48
- .`).concat(Wr,` {
49
- right: `).concat(l,"px ").concat(n,`;
50
- }
51
-
52
- .`).concat(zr,` {
53
- margin-right: `).concat(l,"px ").concat(n,`;
54
- }
55
-
56
- .`).concat(Wr," .").concat(Wr,` {
57
- right: 0 `).concat(n,`;
58
- }
59
-
60
- .`).concat(zr," .").concat(zr,` {
61
- margin-right: 0 `).concat(n,`;
62
- }
63
-
64
- body[`).concat(Vt,`] {
65
- `).concat(Kg,": ").concat(l,`px;
66
- }
67
- `)},ws=function(){var e=parseInt(document.body.getAttribute(Vt)||"0",10);return isFinite(e)?e:0},ph=function(){c.useEffect(function(){return document.body.setAttribute(Vt,(ws()+1).toString()),function(){var e=ws()-1;e<=0?document.body.removeAttribute(Vt):document.body.setAttribute(Vt,e.toString())}},[])},mh=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;ph();var a=c.useMemo(function(){return uh(o)},[o]);return c.createElement(dh,{styles:fh(a,!t,o,r?"":"!important")})},ho=!1;if(typeof window<"u")try{var Fr=Object.defineProperty({},"passive",{get:function(){return ho=!0,!0}});window.addEventListener("test",Fr,Fr),window.removeEventListener("test",Fr,Fr)}catch{ho=!1}var At=ho?{passive:!1}:!1,gh=function(e){return e.tagName==="TEXTAREA"},Bi=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!gh(e)&&r[t]==="visible")},hh=function(e){return Bi(e,"overflowY")},vh=function(e){return Bi(e,"overflowX")},Cs=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=Gi(e,n);if(o){var a=Wi(e,n),i=a[1],l=a[2];if(i>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},xh=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},bh=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},Gi=function(e,t){return e==="v"?hh(t):vh(t)},Wi=function(e,t){return e==="v"?xh(t):bh(t)},yh=function(e,t){return e==="h"&&t==="rtl"?-1:1},wh=function(e,t,r,n,o){var a=yh(e,window.getComputedStyle(t).direction),i=a*n,l=r.target,u=t.contains(l),d=!1,f=i>0,p=0,g=0;do{if(!l)break;var m=Wi(e,l),v=m[0],h=m[1],x=m[2],y=h-x-a*v;(v||y)&&Gi(e,l)&&(p+=y,g+=v);var b=l.parentNode;l=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(f&&Math.abs(p)<1||!f&&Math.abs(g)<1)&&(d=!0),d},Vr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ss=function(e){return[e.deltaX,e.deltaY]},Rs=function(e){return e&&"current"in e?e.current:e},Ch=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Sh=function(e){return`
68
- .block-interactivity-`.concat(e,` {pointer-events: none;}
69
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
70
- `)},Rh=0,It=[];function Eh(e){var t=c.useRef([]),r=c.useRef([0,0]),n=c.useRef(),o=c.useState(Rh++)[0],a=c.useState(Vi)[0],i=c.useRef(e);c.useEffect(function(){i.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=Ug([e.lockRef.current],(e.shards||[]).map(Rs),!0).filter(Boolean);return h.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=c.useCallback(function(h,x){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!i.current.allowPinchZoom;var y=Vr(h),b=r.current,C="deltaX"in h?h.deltaX:b[0]-y[0],R="deltaY"in h?h.deltaY:b[1]-y[1],P,j=h.target,T=Math.abs(C)>Math.abs(R)?"h":"v";if("touches"in h&&T==="h"&&j.type==="range")return!1;var E=Cs(T,j);if(!E)return!0;if(E?P=T:(P=T==="v"?"h":"v",E=Cs(T,j)),!E)return!1;if(!n.current&&"changedTouches"in h&&(C||R)&&(n.current=P),!P)return!0;var V=n.current||P;return wh(V,x,h,V==="h"?C:R)},[]),u=c.useCallback(function(h){var x=h;if(!(!It.length||It[It.length-1]!==a)){var y="deltaY"in x?Ss(x):Vr(x),b=t.current.filter(function(P){return P.name===x.type&&(P.target===x.target||x.target===P.shadowParent)&&Ch(P.delta,y)})[0];if(b&&b.should){x.cancelable&&x.preventDefault();return}if(!b){var C=(i.current.shards||[]).map(Rs).filter(Boolean).filter(function(P){return P.contains(x.target)}),R=C.length>0?l(x,C[0]):!i.current.noIsolation;R&&x.cancelable&&x.preventDefault()}}},[]),d=c.useCallback(function(h,x,y,b){var C={name:h,delta:x,target:y,should:b,shadowParent:kh(y)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(R){return R!==C})},1)},[]),f=c.useCallback(function(h){r.current=Vr(h),n.current=void 0},[]),p=c.useCallback(function(h){d(h.type,Ss(h),h.target,l(h,e.lockRef.current))},[]),g=c.useCallback(function(h){d(h.type,Vr(h),h.target,l(h,e.lockRef.current))},[]);c.useEffect(function(){return It.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",u,At),document.addEventListener("touchmove",u,At),document.addEventListener("touchstart",f,At),function(){It=It.filter(function(h){return h!==a}),document.removeEventListener("wheel",u,At),document.removeEventListener("touchmove",u,At),document.removeEventListener("touchstart",f,At)}},[]);var m=e.removeScrollBar,v=e.inert;return c.createElement(c.Fragment,null,v?c.createElement(a,{styles:Sh(o)}):null,m?c.createElement(mh,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function kh(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Ph=th(Fi,Eh);var Cr=c.forwardRef(function(e,t){return c.createElement(xn,ze({},e,{ref:t,sideCar:Ph}))});Cr.classNames=xn.classNames;var Nh=[" ","Enter","ArrowUp","ArrowDown"],jh=[" ","Enter"],wt="Select",[bn,yn,Th]=cn(wt),[Zt,Z1]=ye(wt,[Th,ut]),wn=ut(),[_h,dt]=Zt(wt),[Ah,Ih]=Zt(wt),zi=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:o,onOpenChange:a,value:i,defaultValue:l,onValueChange:u,dir:d,name:f,autoComplete:p,disabled:g,required:m,form:v}=e,h=wn(t),[x,y]=c.useState(null),[b,C]=c.useState(null),[R,P]=c.useState(!1),j=Ut(d),[T,E]=be({prop:n,defaultProp:o??!1,onChange:a,caller:wt}),[V,U]=be({prop:i,defaultProp:l,onChange:u,caller:wt}),re=c.useRef(null),te=x?v||!!x.closest("form"):!0,[J,q]=c.useState(new Set),D=Array.from(J).map(A=>A.props.value).join(";");return s.jsx(yr,{...h,children:s.jsxs(_h,{required:m,scope:t,trigger:x,onTriggerChange:y,valueNode:b,onValueNodeChange:C,valueNodeHasChildren:R,onValueNodeHasChildrenChange:P,contentId:me(),value:V,onValueChange:U,open:T,onOpenChange:E,dir:j,triggerPointerDownPosRef:re,disabled:g,children:[s.jsx(bn.Provider,{scope:t,children:s.jsx(Ah,{scope:e.__scopeSelect,onNativeOptionAdd:c.useCallback(A=>{q($=>new Set($).add(A))},[]),onNativeOptionRemove:c.useCallback(A=>{q($=>{const k=new Set($);return k.delete(A),k})},[]),children:r})}),te?s.jsxs(gl,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:p,value:V,onChange:A=>U(A.target.value),disabled:g,form:v,children:[V===void 0?s.jsx("option",{value:""}):null,Array.from(J)]},D):null]})})};zi.displayName=wt;var qi="SelectTrigger",Ui=c.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...o}=e,a=wn(r),i=dt(qi,r),l=i.disabled||n,u=se(t,i.onTriggerChange),d=yn(r),f=c.useRef("touch"),[p,g,m]=vl(h=>{const x=d().filter(C=>!C.disabled),y=x.find(C=>C.value===i.value),b=xl(x,h,y);b!==void 0&&i.onValueChange(b.value)}),v=h=>{l||(i.onOpenChange(!0),m()),h&&(i.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return s.jsx(wr,{asChild:!0,...a,children:s.jsx(X.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":hl(i.value)?"":void 0,...o,ref:u,onClick:F(o.onClick,h=>{h.currentTarget.focus(),f.current!=="mouse"&&v(h)}),onPointerDown:F(o.onPointerDown,h=>{f.current=h.pointerType;const x=h.target;x.hasPointerCapture(h.pointerId)&&x.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(v(h),h.preventDefault())}),onKeyDown:F(o.onKeyDown,h=>{const x=p.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&g(h.key),!(x&&h.key===" ")&&Nh.includes(h.key)&&(v(),h.preventDefault())})})})});Ui.displayName=qi;var Hi="SelectValue",Ki=c.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:a,placeholder:i="",...l}=e,u=dt(Hi,r),{onValueNodeHasChildrenChange:d}=u,f=a!==void 0,p=se(t,u.onValueNodeChange);return xe(()=>{d(f)},[d,f]),s.jsx(X.span,{...l,ref:p,style:{pointerEvents:"none"},children:hl(u.value)?s.jsx(s.Fragment,{children:i}):a})});Ki.displayName=Hi;var Mh="SelectIcon",Yi=c.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return s.jsx(X.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})});Yi.displayName=Mh;var Oh="SelectPortal",Xi=e=>s.jsx(Xt,{asChild:!0,...e});Xi.displayName=Oh;var Ct="SelectContent",Zi=c.forwardRef((e,t)=>{const r=dt(Ct,e.__scopeSelect),[n,o]=c.useState();if(xe(()=>{o(new DocumentFragment)},[]),!r.open){const a=n;return a?sn.createPortal(s.jsx(Ji,{scope:e.__scopeSelect,children:s.jsx(bn.Slot,{scope:e.__scopeSelect,children:s.jsx("div",{children:e.children})})}),a):null}return s.jsx(Qi,{...e,ref:t})});Zi.displayName=Ct;var Me=10,[Ji,ft]=Zt(Ct),Dh="SelectContentImpl",Lh=st("SelectContent.RemoveScroll"),Qi=c.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:l,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:g,collisionPadding:m,sticky:v,hideWhenDetached:h,avoidCollisions:x,...y}=e,b=dt(Ct,r),[C,R]=c.useState(null),[P,j]=c.useState(null),T=se(t,I=>R(I)),[E,V]=c.useState(null),[U,re]=c.useState(null),te=yn(r),[J,q]=c.useState(!1),D=c.useRef(!1);c.useEffect(()=>{if(C)return vn(C)},[C]),un();const A=c.useCallback(I=>{const[Z,...ee]=te().map(ie=>ie.ref.current),[oe]=ee.slice(-1),ce=document.activeElement;for(const ie of I)if(ie===ce||(ie==null||ie.scrollIntoView({block:"nearest"}),ie===Z&&P&&(P.scrollTop=0),ie===oe&&P&&(P.scrollTop=P.scrollHeight),ie==null||ie.focus(),document.activeElement!==ce))return},[te,P]),$=c.useCallback(()=>A([E,C]),[A,E,C]);c.useEffect(()=>{J&&$()},[J,$]);const{onOpenChange:k,triggerPointerDownPosRef:O}=b;c.useEffect(()=>{if(C){let I={x:0,y:0};const Z=oe=>{var ce,ie;I={x:Math.abs(Math.round(oe.pageX)-(((ce=O.current)==null?void 0:ce.x)??0)),y:Math.abs(Math.round(oe.pageY)-(((ie=O.current)==null?void 0:ie.y)??0))}},ee=oe=>{I.x<=10&&I.y<=10?oe.preventDefault():C.contains(oe.target)||k(!1),document.removeEventListener("pointermove",Z),O.current=null};return O.current!==null&&(document.addEventListener("pointermove",Z),document.addEventListener("pointerup",ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",ee,{capture:!0})}}},[C,k,O]),c.useEffect(()=>{const I=()=>k(!1);return window.addEventListener("blur",I),window.addEventListener("resize",I),()=>{window.removeEventListener("blur",I),window.removeEventListener("resize",I)}},[k]);const[W,Q]=vl(I=>{const Z=te().filter(ce=>!ce.disabled),ee=Z.find(ce=>ce.ref.current===document.activeElement),oe=xl(Z,I,ee);oe&&setTimeout(()=>oe.ref.current.focus())}),N=c.useCallback((I,Z,ee)=>{const oe=!D.current&&!ee;(b.value!==void 0&&b.value===Z||oe)&&(V(I),oe&&(D.current=!0))},[b.value]),B=c.useCallback(()=>C==null?void 0:C.focus(),[C]),Y=c.useCallback((I,Z,ee)=>{const oe=!D.current&&!ee;(b.value!==void 0&&b.value===Z||oe)&&re(I)},[b.value]),M=n==="popper"?vo:el,G=M===vo?{side:l,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:g,collisionPadding:m,sticky:v,hideWhenDetached:h,avoidCollisions:x}:{};return s.jsx(Ji,{scope:r,content:C,viewport:P,onViewportChange:j,itemRefCallback:N,selectedItem:E,onItemLeave:B,itemTextRefCallback:Y,focusSelectedItem:$,selectedItemText:U,position:n,isPositioned:J,searchRef:W,children:s.jsx(Cr,{as:Lh,allowPinchZoom:!0,children:s.jsx(xr,{asChild:!0,trapped:b.open,onMountAutoFocus:I=>{I.preventDefault()},onUnmountAutoFocus:F(o,I=>{var Z;(Z=b.trigger)==null||Z.focus({preventScroll:!0}),I.preventDefault()}),children:s.jsx(Ht,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:I=>I.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:s.jsx(M,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:I=>I.preventDefault(),...y,...G,onPlaced:()=>q(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:F(y.onKeyDown,I=>{const Z=I.ctrlKey||I.altKey||I.metaKey;if(I.key==="Tab"&&I.preventDefault(),!Z&&I.key.length===1&&Q(I.key),["ArrowUp","ArrowDown","Home","End"].includes(I.key)){let oe=te().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);if(["ArrowUp","End"].includes(I.key)&&(oe=oe.slice().reverse()),["ArrowUp","ArrowDown"].includes(I.key)){const ce=I.target,ie=oe.indexOf(ce);oe=oe.slice(ie+1)}setTimeout(()=>A(oe)),I.preventDefault()}})})})})})})});Qi.displayName=Dh;var $h="SelectItemAlignedPosition",el=c.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...o}=e,a=dt(Ct,r),i=ft(Ct,r),[l,u]=c.useState(null),[d,f]=c.useState(null),p=se(t,T=>f(T)),g=yn(r),m=c.useRef(!1),v=c.useRef(!0),{viewport:h,selectedItem:x,selectedItemText:y,focusSelectedItem:b}=i,C=c.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&d&&h&&x&&y){const T=a.trigger.getBoundingClientRect(),E=d.getBoundingClientRect(),V=a.valueNode.getBoundingClientRect(),U=y.getBoundingClientRect();if(a.dir!=="rtl"){const ce=U.left-E.left,ie=V.left-ce,Ce=T.left-ie,je=T.width+Ce,Be=Math.max(je,E.width),Ie=window.innerWidth-Me,nt=es(ie,[Me,Math.max(Me,Ie-Be)]);l.style.minWidth=je+"px",l.style.left=nt+"px"}else{const ce=E.right-U.right,ie=window.innerWidth-V.right-ce,Ce=window.innerWidth-T.right-ie,je=T.width+Ce,Be=Math.max(je,E.width),Ie=window.innerWidth-Me,nt=es(ie,[Me,Math.max(Me,Ie-Be)]);l.style.minWidth=je+"px",l.style.right=nt+"px"}const re=g(),te=window.innerHeight-Me*2,J=h.scrollHeight,q=window.getComputedStyle(d),D=parseInt(q.borderTopWidth,10),A=parseInt(q.paddingTop,10),$=parseInt(q.borderBottomWidth,10),k=parseInt(q.paddingBottom,10),O=D+A+J+k+$,W=Math.min(x.offsetHeight*5,O),Q=window.getComputedStyle(h),N=parseInt(Q.paddingTop,10),B=parseInt(Q.paddingBottom,10),Y=T.top+T.height/2-Me,M=te-Y,G=x.offsetHeight/2,I=x.offsetTop+G,Z=D+A+I,ee=O-Z;if(Z<=Y){const ce=re.length>0&&x===re[re.length-1].ref.current;l.style.bottom="0px";const ie=d.clientHeight-h.offsetTop-h.offsetHeight,Ce=Math.max(M,G+(ce?B:0)+ie+$),je=Z+Ce;l.style.height=je+"px"}else{const ce=re.length>0&&x===re[0].ref.current;l.style.top="0px";const Ce=Math.max(Y,D+h.offsetTop+(ce?N:0)+G)+ee;l.style.height=Ce+"px",h.scrollTop=Z-Y+h.offsetTop}l.style.margin=`${Me}px 0`,l.style.minHeight=W+"px",l.style.maxHeight=te+"px",n==null||n(),requestAnimationFrame(()=>m.current=!0)}},[g,a.trigger,a.valueNode,l,d,h,x,y,a.dir,n]);xe(()=>C(),[C]);const[R,P]=c.useState();xe(()=>{d&&P(window.getComputedStyle(d).zIndex)},[d]);const j=c.useCallback(T=>{T&&v.current===!0&&(C(),b==null||b(),v.current=!1)},[C,b]);return s.jsx(Vh,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:j,children:s.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:s.jsx(X.div,{...o,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});el.displayName=$h;var Fh="SelectPopperPosition",vo=c.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=Me,...a}=e,i=wn(r);return s.jsx(gn,{...i,...a,ref:t,align:n,collisionPadding:o,style:{boxSizing:"border-box",...a.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)"}})});vo.displayName=Fh;var[Vh,Go]=Zt(Ct,{}),xo="SelectViewport",tl=c.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...o}=e,a=ft(xo,r),i=Go(xo,r),l=se(t,a.onViewportChange),u=c.useRef(0);return s.jsxs(s.Fragment,{children:[s.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:n}),s.jsx(bn.Slot,{scope:r,children:s.jsx(X.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:F(o.onScroll,d=>{const f=d.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:g}=i;if(g!=null&&g.current&&p){const m=Math.abs(u.current-f.scrollTop);if(m>0){const v=window.innerHeight-Me*2,h=parseFloat(p.style.minHeight),x=parseFloat(p.style.height),y=Math.max(h,x);if(y<v){const b=y+m,C=Math.min(v,b),R=b-C;p.style.height=C+"px",p.style.bottom==="0px"&&(f.scrollTop=R>0?R:0,p.style.justifyContent="flex-end")}}}u.current=f.scrollTop})})})]})});tl.displayName=xo;var rl="SelectGroup",[Bh,Gh]=Zt(rl),nl=c.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=me();return s.jsx(Bh,{scope:r,id:o,children:s.jsx(X.div,{role:"group","aria-labelledby":o,...n,ref:t})})});nl.displayName=rl;var ol="SelectLabel",al=c.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Gh(ol,r);return s.jsx(X.div,{id:o.id,...n,ref:t})});al.displayName=ol;var Xr="SelectItem",[Wh,sl]=Zt(Xr),il=c.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:o=!1,textValue:a,...i}=e,l=dt(Xr,r),u=ft(Xr,r),d=l.value===n,[f,p]=c.useState(a??""),[g,m]=c.useState(!1),v=se(t,b=>{var C;return(C=u.itemRefCallback)==null?void 0:C.call(u,b,n,o)}),h=me(),x=c.useRef("touch"),y=()=>{o||(l.onValueChange(n),l.onOpenChange(!1))};if(n==="")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 s.jsx(Wh,{scope:r,value:n,disabled:o,textId:h,isSelected:d,onItemTextChange:c.useCallback(b=>{p(C=>C||((b==null?void 0:b.textContent)??"").trim())},[]),children:s.jsx(bn.ItemSlot,{scope:r,value:n,disabled:o,textValue:f,children:s.jsx(X.div,{role:"option","aria-labelledby":h,"data-highlighted":g?"":void 0,"aria-selected":d&&g,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:v,onFocus:F(i.onFocus,()=>m(!0)),onBlur:F(i.onBlur,()=>m(!1)),onClick:F(i.onClick,()=>{x.current!=="mouse"&&y()}),onPointerUp:F(i.onPointerUp,()=>{x.current==="mouse"&&y()}),onPointerDown:F(i.onPointerDown,b=>{x.current=b.pointerType}),onPointerMove:F(i.onPointerMove,b=>{var C;x.current=b.pointerType,o?(C=u.onItemLeave)==null||C.call(u):x.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:F(i.onPointerLeave,b=>{var C;b.currentTarget===document.activeElement&&((C=u.onItemLeave)==null||C.call(u))}),onKeyDown:F(i.onKeyDown,b=>{var R;((R=u.searchRef)==null?void 0:R.current)!==""&&b.key===" "||(jh.includes(b.key)&&y(),b.key===" "&&b.preventDefault())})})})})});il.displayName=Xr;var ar="SelectItemText",ll=c.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,...a}=e,i=dt(ar,r),l=ft(ar,r),u=sl(ar,r),d=Ih(ar,r),[f,p]=c.useState(null),g=se(t,y=>p(y),u.onItemTextChange,y=>{var b;return(b=l.itemTextRefCallback)==null?void 0:b.call(l,y,u.value,u.disabled)}),m=f==null?void 0:f.textContent,v=c.useMemo(()=>s.jsx("option",{value:u.value,disabled:u.disabled,children:m},u.value),[u.disabled,u.value,m]),{onNativeOptionAdd:h,onNativeOptionRemove:x}=d;return xe(()=>(h(v),()=>x(v)),[h,x,v]),s.jsxs(s.Fragment,{children:[s.jsx(X.span,{id:u.textId,...a,ref:g}),u.isSelected&&i.valueNode&&!i.valueNodeHasChildren?sn.createPortal(a.children,i.valueNode):null]})});ll.displayName=ar;var cl="SelectItemIndicator",ul=c.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return sl(cl,r).isSelected?s.jsx(X.span,{"aria-hidden":!0,...n,ref:t}):null});ul.displayName=cl;var bo="SelectScrollUpButton",dl=c.forwardRef((e,t)=>{const r=ft(bo,e.__scopeSelect),n=Go(bo,e.__scopeSelect),[o,a]=c.useState(!1),i=se(t,n.onScrollButtonChange);return xe(()=>{if(r.viewport&&r.isPositioned){let l=function(){const d=u.scrollTop>0;a(d)};const u=r.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),o?s.jsx(pl,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:u}=r;l&&u&&(l.scrollTop=l.scrollTop-u.offsetHeight)}}):null});dl.displayName=bo;var yo="SelectScrollDownButton",fl=c.forwardRef((e,t)=>{const r=ft(yo,e.__scopeSelect),n=Go(yo,e.__scopeSelect),[o,a]=c.useState(!1),i=se(t,n.onScrollButtonChange);return xe(()=>{if(r.viewport&&r.isPositioned){let l=function(){const d=u.scrollHeight-u.clientHeight,f=Math.ceil(u.scrollTop)<d;a(f)};const u=r.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),o?s.jsx(pl,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:u}=r;l&&u&&(l.scrollTop=l.scrollTop+u.offsetHeight)}}):null});fl.displayName=yo;var pl=c.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...o}=e,a=ft("SelectScrollButton",r),i=c.useRef(null),l=yn(r),u=c.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return c.useEffect(()=>()=>u(),[u]),xe(()=>{var f;const d=l().find(p=>p.ref.current===document.activeElement);(f=d==null?void 0:d.ref.current)==null||f.scrollIntoView({block:"nearest"})},[l]),s.jsx(X.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:F(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(n,50))}),onPointerMove:F(o.onPointerMove,()=>{var d;(d=a.onItemLeave)==null||d.call(a),i.current===null&&(i.current=window.setInterval(n,50))}),onPointerLeave:F(o.onPointerLeave,()=>{u()})})}),zh="SelectSeparator",ml=c.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return s.jsx(X.div,{"aria-hidden":!0,...n,ref:t})});ml.displayName=zh;var wo="SelectArrow",qh=c.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=wn(r),a=dt(wo,r),i=ft(wo,r);return a.open&&i.position==="popper"?s.jsx(hn,{...o,...n,ref:t}):null});qh.displayName=wo;var Uh="SelectBubbleInput",gl=c.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const o=c.useRef(null),a=se(n,o),i=Bo(t);return c.useEffect(()=>{const l=o.current;if(!l)return;const u=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(u,"value").set;if(i!==t&&f){const p=new Event("change",{bubbles:!0});f.call(l,t),l.dispatchEvent(p)}},[i,t]),s.jsx(X.select,{...r,style:{...Mi,...r.style},ref:a,defaultValue:t})});gl.displayName=Uh;function hl(e){return e===""||e===void 0}function vl(e){const t=Oe(e),r=c.useRef(""),n=c.useRef(0),o=c.useCallback(i=>{const l=r.current+i;t(l),(function u(d){r.current=d,window.clearTimeout(n.current),d!==""&&(n.current=window.setTimeout(()=>u(""),1e3))})(l)},[t]),a=c.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,a]}function xl(e,t,r){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let i=Hh(e,Math.max(a,0));o.length===1&&(i=i.filter(d=>d!==r));const u=i.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return u!==r?u:void 0}function Hh(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Kh=zi,bl=Ui,Yh=Ki,Xh=Yi,Zh=Xi,yl=Zi,Jh=tl,Qh=nl,wl=al,Cl=il,ev=ll,tv=ul,Sl=dl,Rl=fl,El=ml;/**
30
+ <%s key={someKey} {...props} />`,Gn,vt,np,vt),Wa[vt+Gn]=!0}}return w===n?Jf(ge):Zf(ge),ge}}function Qf(w,L,z){return za(w,L,z,!0)}function ep(w,L,z){return za(w,L,z,!1)}var tp=ep,rp=Qf;rr.Fragment=n,rr.jsx=tp,rr.jsxs=rp})()),rr}var Ha;function dp(){return Ha||(Ha=1,process.env.NODE_ENV==="production"?Ir.exports=cp():Ir.exports=up()),Ir.exports}var s=dp();function Ks(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Ks(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Ys(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Ks(e))&&(n&&(n+=" "),n+=t);return n}const Ka=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ya=Ys,ln=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Ya(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(d=>{const f=r==null?void 0:r[d],p=a==null?void 0:a[d];if(f===null)return null;const g=Ka(f)||Ka(p);return o[d][g]}),l=r&&Object.entries(r).reduce((d,f)=>{let[p,g]=f;return g===void 0||(d[p]=g),d},{}),u=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,f)=>{let{class:p,className:g,...m}=f;return Object.entries(m).every(v=>{let[h,x]=v;return Array.isArray(x)?x.includes({...a,...l}[h]):{...a,...l}[h]===x})?[...d,p,g]:d},[]);return Ya(e,i,u,r==null?void 0:r.class,r==null?void 0:r.className)},_o="-",fp=e=>{const t=mp(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{const l=i.split(_o);return l[0]===""&&l.length!==1&&l.shift(),Xs(l,t)||pp(i)},getConflictingClassGroupIds:(i,l)=>{const u=r[i]||[];return l&&n[i]?[...u,...n[i]]:u}}},Xs=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?Xs(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(_o);return(i=t.validators.find(({validator:l})=>l(a)))==null?void 0:i.classGroupId},Xa=/^\[(.+)\]$/,pp=e=>{if(Xa.test(e)){const t=Xa.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},mp=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const o in r)lo(r[o],n,o,t);return n},lo=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:Za(t,o);a.classGroupId=r;return}if(typeof o=="function"){if(gp(o)){lo(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([a,i])=>{lo(i,Za(t,a),r,n)})})},Za=(e,t)=>{let r=e;return t.split(_o).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},gp=e=>e.isThemeGetter,hp=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const o=(a,i)=>{r.set(a,i),t++,t>e&&(t=0,n=r,r=new Map)};return{get(a){let i=r.get(a);if(i!==void 0)return i;if((i=n.get(a))!==void 0)return o(a,i),i},set(a,i){r.has(a)?r.set(a,i):o(a,i)}}},co="!",uo=":",vp=uo.length,xp=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const a=[];let i=0,l=0,u=0,d;for(let v=0;v<o.length;v++){let h=o[v];if(i===0&&l===0){if(h===uo){a.push(o.slice(u,v)),u=v+vp;continue}if(h==="/"){d=v;continue}}h==="["?i++:h==="]"?i--:h==="("?l++:h===")"&&l--}const f=a.length===0?o:o.substring(u),p=bp(f),g=p!==f,m=d&&d>u?d-u:void 0;return{modifiers:a,hasImportantModifier:g,baseClassName:p,maybePostfixModifierPosition:m}};if(t){const o=t+uo,a=n;n=i=>i.startsWith(o)?a(i.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(r){const o=n;n=a=>r({className:a,parseClassName:o})}return n},bp=e=>e.endsWith(co)?e.substring(0,e.length-1):e.startsWith(co)?e.substring(1):e,yp=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const o=[];let a=[];return n.forEach(i=>{i[0]==="["||t[i]?(o.push(...a.sort(),i),a=[]):a.push(i)}),o.push(...a.sort()),o}},wp=e=>({cache:hp(e.cacheSize),parseClassName:xp(e),sortModifiers:yp(e),...fp(e)}),Cp=/\s+/,Sp=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:a}=t,i=[],l=e.trim().split(Cp);let u="";for(let d=l.length-1;d>=0;d-=1){const f=l[d],{isExternal:p,modifiers:g,hasImportantModifier:m,baseClassName:v,maybePostfixModifierPosition:h}=r(f);if(p){u=f+(u.length>0?" "+u:u);continue}let x=!!h,y=n(x?v.substring(0,h):v);if(!y){if(!x){u=f+(u.length>0?" "+u:u);continue}if(y=n(v),!y){u=f+(u.length>0?" "+u:u);continue}x=!1}const b=a(g).join(":"),C=m?b+co:b,R=C+y;if(i.includes(R))continue;i.push(R);const P=o(y,x);for(let j=0;j<P.length;++j){const T=P[j];i.push(C+T)}u=f+(u.length>0?" "+u:u)}return u};function Rp(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Zs(t))&&(n&&(n+=" "),n+=r);return n}const Zs=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Zs(e[n]))&&(r&&(r+=" "),r+=t);return r};function Ep(e,...t){let r,n,o,a=i;function i(u){const d=t.reduce((f,p)=>p(f),e());return r=wp(d),n=r.cache.get,o=r.cache.set,a=l,l(u)}function l(u){const d=n(u);if(d)return d;const f=Sp(u,r);return o(u,f),f}return function(){return a(Rp.apply(null,arguments))}}const he=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Js=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Qs=/^\((?:(\w[\w-]*):)?(.+)\)$/i,kp=/^\d+\/\d+$/,Pp=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Np=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,jp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Tp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,_p=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Tt=e=>kp.test(e),ae=e=>!!e&&!Number.isNaN(Number(e)),ot=e=>!!e&&Number.isInteger(Number(e)),Wn=e=>e.endsWith("%")&&ae(e.slice(0,-1)),Ze=e=>Pp.test(e),Ap=()=>!0,Ip=e=>Np.test(e)&&!jp.test(e),ei=()=>!1,Mp=e=>Tp.test(e),Op=e=>_p.test(e),Dp=e=>!H(e)&&!K(e),Lp=e=>zt(e,ni,ei),H=e=>Js.test(e),xt=e=>zt(e,oi,Ip),zn=e=>zt(e,Gp,ae),Ja=e=>zt(e,ti,ei),$p=e=>zt(e,ri,Op),Mr=e=>zt(e,ai,Mp),K=e=>Qs.test(e),nr=e=>qt(e,oi),Fp=e=>qt(e,Wp),Qa=e=>qt(e,ti),Vp=e=>qt(e,ni),Bp=e=>qt(e,ri),Or=e=>qt(e,ai,!0),zt=(e,t,r)=>{const n=Js.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},qt=(e,t,r=!1)=>{const n=Qs.exec(e);return n?n[1]?t(n[1]):r:!1},ti=e=>e==="position"||e==="percentage",ri=e=>e==="image"||e==="url",ni=e=>e==="length"||e==="size"||e==="bg-size",oi=e=>e==="length",Gp=e=>e==="number",Wp=e=>e==="family-name",ai=e=>e==="shadow",zp=()=>{const e=he("color"),t=he("font"),r=he("text"),n=he("font-weight"),o=he("tracking"),a=he("leading"),i=he("breakpoint"),l=he("container"),u=he("spacing"),d=he("radius"),f=he("shadow"),p=he("inset-shadow"),g=he("text-shadow"),m=he("drop-shadow"),v=he("blur"),h=he("perspective"),x=he("aspect"),y=he("ease"),b=he("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],P=()=>[...R(),K,H],j=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],E=()=>[K,H,u],V=()=>[Tt,"full","auto",...E()],U=()=>[ot,"none","subgrid",K,H],re=()=>["auto",{span:["full",ot,K,H]},ot,K,H],te=()=>[ot,"auto",K,H],J=()=>["auto","min","max","fr",K,H],q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],D=()=>["start","end","center","stretch","center-safe","end-safe"],A=()=>["auto",...E()],$=()=>[Tt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],k=()=>[e,K,H],O=()=>[...R(),Qa,Ja,{position:[K,H]}],W=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Q=()=>["auto","cover","contain",Vp,Lp,{size:[K,H]}],N=()=>[Wn,nr,xt],B=()=>["","none","full",d,K,H],Y=()=>["",ae,nr,xt],M=()=>["solid","dashed","dotted","double"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>[ae,Wn,Qa,Ja],Z=()=>["","none",v,K,H],ee=()=>["none",ae,K,H],oe=()=>["none",ae,K,H],ce=()=>[ae,K,H],ie=()=>[Tt,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ze],breakpoint:[Ze],color:[Ap],container:[Ze],"drop-shadow":[Ze],ease:["in","out","in-out"],font:[Dp],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ze],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ze],shadow:[Ze],spacing:["px",ae],text:[Ze],"text-shadow":[Ze],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Tt,H,K,x]}],container:["container"],columns:[{columns:[ae,H,K,l]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:P()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:V()}],"inset-x":[{"inset-x":V()}],"inset-y":[{"inset-y":V()}],start:[{start:V()}],end:[{end:V()}],top:[{top:V()}],right:[{right:V()}],bottom:[{bottom:V()}],left:[{left:V()}],visibility:["visible","invisible","collapse"],z:[{z:[ot,"auto",K,H]}],basis:[{basis:[Tt,"full","auto",l,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ae,Tt,"auto","initial","none",H]}],grow:[{grow:["",ae,K,H]}],shrink:[{shrink:["",ae,K,H]}],order:[{order:[ot,"first","last","none",K,H]}],"grid-cols":[{"grid-cols":U()}],"col-start-end":[{col:re()}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":U()}],"row-start-end":[{row:re()}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":J()}],"auto-rows":[{"auto-rows":J()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...q(),"normal"]}],"justify-items":[{"justify-items":[...D(),"normal"]}],"justify-self":[{"justify-self":["auto",...D()]}],"align-content":[{content:["normal",...q()]}],"align-items":[{items:[...D(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...D(),{baseline:["","last"]}]}],"place-content":[{"place-content":q()}],"place-items":[{"place-items":[...D(),"baseline"]}],"place-self":[{"place-self":["auto",...D()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],w:[{w:[l,"screen",...$()]}],"min-w":[{"min-w":[l,"screen","none",...$()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...$()]}],h:[{h:["screen","lh",...$()]}],"min-h":[{"min-h":["screen","lh","none",...$()]}],"max-h":[{"max-h":["screen","lh",...$()]}],"font-size":[{text:["base",r,nr,xt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,K,zn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Wn,H]}],"font-family":[{font:[Fp,H,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,K,H]}],"line-clamp":[{"line-clamp":[ae,"none",K,zn]}],leading:[{leading:[a,...E()]}],"list-image":[{"list-image":["none",K,H]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",K,H]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:[ae,"from-font","auto",K,xt]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[ae,"auto",K,H]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",K,H]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",K,H]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:W()}],"bg-size":[{bg:Q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ot,K,H],radial:["",K,H],conic:[ot,K,H]},Bp,$p]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:N()}],"gradient-via-pos":[{via:N()}],"gradient-to-pos":[{to:N()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"border-w":[{border:Y()}],"border-w-x":[{"border-x":Y()}],"border-w-y":[{"border-y":Y()}],"border-w-s":[{"border-s":Y()}],"border-w-e":[{"border-e":Y()}],"border-w-t":[{"border-t":Y()}],"border-w-r":[{"border-r":Y()}],"border-w-b":[{"border-b":Y()}],"border-w-l":[{"border-l":Y()}],"divide-x":[{"divide-x":Y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...M(),"hidden","none"]}],"divide-style":[{divide:[...M(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...M(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ae,K,H]}],"outline-w":[{outline:["",ae,nr,xt]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",f,Or,Mr]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",p,Or,Mr]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[ae,xt]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",g,Or,Mr]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[ae,K,H]}],"mix-blend":[{"mix-blend":[...G(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":G()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ae]}],"mask-image-linear-from-pos":[{"mask-linear-from":I()}],"mask-image-linear-to-pos":[{"mask-linear-to":I()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":I()}],"mask-image-t-to-pos":[{"mask-t-to":I()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":I()}],"mask-image-r-to-pos":[{"mask-r-to":I()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":I()}],"mask-image-b-to-pos":[{"mask-b-to":I()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":I()}],"mask-image-l-to-pos":[{"mask-l-to":I()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":I()}],"mask-image-x-to-pos":[{"mask-x-to":I()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":I()}],"mask-image-y-to-pos":[{"mask-y-to":I()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[K,H]}],"mask-image-radial-from-pos":[{"mask-radial-from":I()}],"mask-image-radial-to-pos":[{"mask-radial-to":I()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[ae]}],"mask-image-conic-from-pos":[{"mask-conic-from":I()}],"mask-image-conic-to-pos":[{"mask-conic-to":I()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:W()}],"mask-size":[{mask:Q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",K,H]}],filter:[{filter:["","none",K,H]}],blur:[{blur:Z()}],brightness:[{brightness:[ae,K,H]}],contrast:[{contrast:[ae,K,H]}],"drop-shadow":[{"drop-shadow":["","none",m,Or,Mr]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",ae,K,H]}],"hue-rotate":[{"hue-rotate":[ae,K,H]}],invert:[{invert:["",ae,K,H]}],saturate:[{saturate:[ae,K,H]}],sepia:[{sepia:["",ae,K,H]}],"backdrop-filter":[{"backdrop-filter":["","none",K,H]}],"backdrop-blur":[{"backdrop-blur":Z()}],"backdrop-brightness":[{"backdrop-brightness":[ae,K,H]}],"backdrop-contrast":[{"backdrop-contrast":[ae,K,H]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ae,K,H]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ae,K,H]}],"backdrop-invert":[{"backdrop-invert":["",ae,K,H]}],"backdrop-opacity":[{"backdrop-opacity":[ae,K,H]}],"backdrop-saturate":[{"backdrop-saturate":[ae,K,H]}],"backdrop-sepia":[{"backdrop-sepia":["",ae,K,H]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",K,H]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ae,"initial",K,H]}],ease:[{ease:["linear","initial",y,K,H]}],delay:[{delay:[ae,K,H]}],animate:[{animate:["none",b,K,H]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,K,H]}],"perspective-origin":[{"perspective-origin":P()}],rotate:[{rotate:ee()}],"rotate-x":[{"rotate-x":ee()}],"rotate-y":[{"rotate-y":ee()}],"rotate-z":[{"rotate-z":ee()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":["scale-3d"],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[K,H,"","none","gpu","cpu"]}],"transform-origin":[{origin:P()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ie()}],"translate-x":[{"translate-x":ie()}],"translate-y":[{"translate-y":ie()}],"translate-z":[{"translate-z":ie()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",K,H]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",K,H]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[ae,nr,xt,zn]}],stroke:[{stroke:["none",...k()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},qp=Ep(zp);function _(...e){return qp(Ys(e))}function si(e,t,r){let n="";return typeof e=="object"&&(e.base&&(n+=e.base),Object.keys(t).length&&Object.keys(t).forEach(o=>{o==="className"&&t[o]?(n=n.trim(),n+=` ${t[o]}`):t[o]&&e.hasOwnProperty(o)&&(r&&console.log("styles",o,t[o],e[o]),n=n.trim(),n+=` ${e[o]}`)})),r&&console.log("final.class",n.trim()),n.trim()}/**
71
31
  * @license lucide-react v0.525.0 - ISC
72
32
  *
73
33
  * This source code is licensed under the ISC license.
74
34
  * See the LICENSE file in the root directory of this source tree.
75
- */const rv=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),nv=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),Es=e=>{const t=nv(e);return t.charAt(0).toUpperCase()+t.slice(1)},kl=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),ov=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
35
+ */const Up=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Hp=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),es=e=>{const t=Hp(e);return t.charAt(0).toUpperCase()+t.slice(1)},ii=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),Kp=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
76
36
  * @license lucide-react v0.525.0 - ISC
77
37
  *
78
38
  * This source code is licensed under the ISC license.
79
39
  * See the LICENSE file in the root directory of this source tree.
80
- */var av={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
40
+ */var Yp={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
81
41
  * @license lucide-react v0.525.0 - ISC
82
42
  *
83
43
  * This source code is licensed under the ISC license.
84
44
  * See the LICENSE file in the root directory of this source tree.
85
- */const sv=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:i,...l},u)=>S.createElement("svg",{ref:u,...av,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:kl("lucide",o),...!a&&!ov(l)&&{"aria-hidden":"true"},...l},[...i.map(([d,f])=>S.createElement(d,f)),...Array.isArray(a)?a:[a]]));/**
45
+ */const Xp=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:i,...l},u)=>S.createElement("svg",{ref:u,...Yp,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:ii("lucide",o),...!a&&!Kp(l)&&{"aria-hidden":"true"},...l},[...i.map(([d,f])=>S.createElement(d,f)),...Array.isArray(a)?a:[a]]));/**
86
46
  * @license lucide-react v0.525.0 - ISC
87
47
  *
88
48
  * This source code is licensed under the ISC license.
89
49
  * See the LICENSE file in the root directory of this source tree.
90
- */const ve=(e,t)=>{const r=S.forwardRef(({className:n,...o},a)=>S.createElement(sv,{ref:a,iconNode:t,className:kl(`lucide-${rv(Es(e))}`,`lucide-${e}`,n),...o}));return r.displayName=Es(e),r};/**
50
+ */const ve=(e,t)=>{const r=S.forwardRef(({className:n,...o},a)=>S.createElement(Xp,{ref:a,iconNode:t,className:ii(`lucide-${Up(es(e))}`,`lucide-${e}`,n),...o}));return r.displayName=es(e),r};/**
91
51
  * @license lucide-react v0.525.0 - ISC
92
52
  *
93
53
  * This source code is licensed under the ISC license.
94
54
  * See the LICENSE file in the root directory of this source tree.
95
- */const iv=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],lv=ve("arrow-up-down",iv);/**
55
+ */const Zp=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],Jp=ve("arrow-up-down",Zp);/**
96
56
  * @license lucide-react v0.525.0 - ISC
97
57
  *
98
58
  * This source code is licensed under the ISC license.
99
59
  * See the LICENSE file in the root directory of this source tree.
100
- */const cv=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Cn=ve("check",cv);/**
60
+ */const Qp=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],cn=ve("check",Qp);/**
101
61
  * @license lucide-react v0.525.0 - ISC
102
62
  *
103
63
  * This source code is licensed under the ISC license.
104
64
  * See the LICENSE file in the root directory of this source tree.
105
- */const uv=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Wo=ve("chevron-down",uv);/**
65
+ */const em=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ao=ve("chevron-down",em);/**
106
66
  * @license lucide-react v0.525.0 - ISC
107
67
  *
108
68
  * This source code is licensed under the ISC license.
109
69
  * See the LICENSE file in the root directory of this source tree.
110
- */const dv=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],fv=ve("chevron-left",dv);/**
70
+ */const tm=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],rm=ve("chevron-left",tm);/**
111
71
  * @license lucide-react v0.525.0 - ISC
112
72
  *
113
73
  * This source code is licensed under the ISC license.
114
74
  * See the LICENSE file in the root directory of this source tree.
115
- */const pv=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Pl=ve("chevron-right",pv);/**
75
+ */const nm=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],li=ve("chevron-right",nm);/**
116
76
  * @license lucide-react v0.525.0 - ISC
117
77
  *
118
78
  * This source code is licensed under the ISC license.
119
79
  * See the LICENSE file in the root directory of this source tree.
120
- */const mv=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],gv=ve("chevron-up",mv);/**
80
+ */const om=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],am=ve("chevron-up",om);/**
121
81
  * @license lucide-react v0.525.0 - ISC
122
82
  *
123
83
  * This source code is licensed under the ISC license.
124
84
  * See the LICENSE file in the root directory of this source tree.
125
- */const hv=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],vv=ve("chevrons-up-down",hv);/**
85
+ */const sm=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],im=ve("chevrons-up-down",sm);/**
126
86
  * @license lucide-react v0.525.0 - ISC
127
87
  *
128
88
  * This source code is licensed under the ISC license.
129
89
  * See the LICENSE file in the root directory of this source tree.
130
- */const xv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],bv=ve("circle",xv);/**
90
+ */const lm=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],cm=ve("circle",lm);/**
131
91
  * @license lucide-react v0.525.0 - ISC
132
92
  *
133
93
  * This source code is licensed under the ISC license.
134
94
  * See the LICENSE file in the root directory of this source tree.
135
- */const yv=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Nl=ve("ellipsis",yv);/**
95
+ */const um=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],ci=ve("ellipsis",um);/**
136
96
  * @license lucide-react v0.525.0 - ISC
137
97
  *
138
98
  * This source code is licensed under the ISC license.
139
99
  * See the LICENSE file in the root directory of this source tree.
140
- */const wv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Cv=ve("info",wv);/**
100
+ */const dm=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],fm=ve("info",dm);/**
141
101
  * @license lucide-react v0.525.0 - ISC
142
102
  *
143
103
  * This source code is licensed under the ISC license.
144
104
  * See the LICENSE file in the root directory of this source tree.
145
- */const Sv=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]],Rv=ve("list-filter",Sv);/**
105
+ */const pm=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]],mm=ve("list-filter",pm);/**
146
106
  * @license lucide-react v0.525.0 - ISC
147
107
  *
148
108
  * This source code is licensed under the ISC license.
149
109
  * See the LICENSE file in the root directory of this source tree.
150
- */const Ev=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],kv=ve("loader-circle",Ev);/**
110
+ */const gm=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ui=ve("loader-circle",gm);/**
151
111
  * @license lucide-react v0.525.0 - ISC
152
112
  *
153
113
  * This source code is licensed under the ISC license.
154
114
  * See the LICENSE file in the root directory of this source tree.
155
- */const Pv=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],Nv=ve("mail",Pv);/**
115
+ */const hm=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],vm=ve("mail",hm);/**
156
116
  * @license lucide-react v0.525.0 - ISC
157
117
  *
158
118
  * This source code is licensed under the ISC license.
159
119
  * See the LICENSE file in the root directory of this source tree.
160
- */const jv=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],jl=ve("search",jv);/**
120
+ */const xm=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],di=ve("search",xm);/**
161
121
  * @license lucide-react v0.525.0 - ISC
162
122
  *
163
123
  * This source code is licensed under the ISC license.
164
124
  * See the LICENSE file in the root directory of this source tree.
165
- */const Tv=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],_v=ve("tag",Tv);/**
125
+ */const bm=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],ym=ve("tag",bm);/**
166
126
  * @license lucide-react v0.525.0 - ISC
167
127
  *
168
128
  * This source code is licensed under the ISC license.
169
129
  * See the LICENSE file in the root directory of this source tree.
170
- */const Av=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],Iv=ve("trash-2",Av);/**
130
+ */const wm=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],Cm=ve("trash-2",wm);/**
171
131
  * @license lucide-react v0.525.0 - ISC
172
132
  *
173
133
  * This source code is licensed under the ISC license.
174
134
  * See the LICENSE file in the root directory of this source tree.
175
- */const Mv=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]],Ov=ve("trash",Mv);/**
135
+ */const Sm=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]],Rm=ve("trash",Sm);/**
176
136
  * @license lucide-react v0.525.0 - ISC
177
137
  *
178
138
  * This source code is licensed under the ISC license.
179
139
  * See the LICENSE file in the root directory of this source tree.
180
- */const Dv=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Lv=ve("triangle-alert",Dv);/**
140
+ */const Em=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],km=ve("triangle-alert",Em);/**
181
141
  * @license lucide-react v0.525.0 - ISC
182
142
  *
183
143
  * This source code is licensed under the ISC license.
184
144
  * See the LICENSE file in the root directory of this source tree.
185
- */const $v=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Sn=ve("x",$v),Tl=Kh,Fv=Qh,_l=Yh,zo=c.forwardRef(({className:e,children:t,readOnly:r,...n},o)=>{const a=i=>{r&&i.preventDefault()};return s.jsxs(bl,{ref:o,"data-readonly":r||void 0,disabled:n.disabled,onPointerDown:n.disabled?n.onPointerDown:a,tabIndex:r?0:void 0,className:_(_("qodo qodo-select-trigger flex h-9 w-full min-w-0 items-center justify-between","rounded-md border bg-purple-muted-700 border-purple-muted-500","text-sm data-[placeholder]:text-muted-foreground [&:not([data-placeholder])]:text-purple-muted-300 md:text-sm selection:bg-primary selection:text-primary-foreground","px-3 py-1","shadow-xs transition-[color,box-shadow] outline-none focus-visible:!ring-ring/50 focus-visible:!ring-[3px]","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40","disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-purple-muted-700 disabled:border-purple-muted-500 disabled:text-purple-muted-400","data-[readonly]:opacity-100 data-[readonly]:bg-purple-muted-700 data-[readonly]:border-purple-muted-400 data-[readonly]:cursor-default data-[readonly]:text-purple-muted-200",e)),...n,children:[s.jsx("div",{className:"overflow-hidden whitespace-nowrap text-ellipsis",children:t}),s.jsx(Xh,{asChild:!0,children:s.jsx(Wo,{className:"h-4 w-4 text-purple-muted-300"})})]})});zo.displayName=bl.displayName;const qo=c.forwardRef(({className:e,...t},r)=>s.jsx(Sl,{ref:r,className:_("qodo qodo-select-scroll-up-button flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(gv,{className:"h-4 w-4"})}));qo.displayName=Sl.displayName;const Uo=c.forwardRef(({className:e,...t},r)=>s.jsx(Rl,{ref:r,className:_("qodo qodo-select-scroll-down-button flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(Wo,{className:"h-4 w-4"})}));Uo.displayName=Rl.displayName;const Ho=c.forwardRef(({className:e,children:t,position:r="popper",container:n=null,...o},a)=>s.jsx(Zh,{container:n,children:s.jsxs(yl,{ref:a,className:_("qodo qodo-select-content relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-purple-muted-600 border-purple-muted-500 text-purple-muted-300 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...o,children:[s.jsx(qo,{}),s.jsx(Jh,{className:_("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-[var(--radix-select-trigger-width)]"),children:t}),s.jsx(Uo,{})]})}));Ho.displayName=yl.displayName;const Al=c.forwardRef(({className:e,...t},r)=>s.jsx(wl,{ref:r,className:_("qodo qodo-select-label py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Al.displayName=wl.displayName;const Ko=c.forwardRef(({className:e,children:t,...r},n)=>s.jsxs(Cl,{ref:n,title:r.value,className:_(_("qodo qodo-select-item relative w-full cursor-default select-none rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none","focus:bg-purple-muted-500 focus:text-purple-100 text-purple-100","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","block overflow-hidden whitespace-nowrap text-ellipsis"),e),...r,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 mt-0.5",children:s.jsx(tv,{children:s.jsx(Cn,{className:"h-4 w-4"})})}),s.jsx(ev,{children:t})]}));Ko.displayName=Cl.displayName;const Il=c.forwardRef(({className:e,...t},r)=>s.jsx(El,{ref:r,className:_("qodo qodo-select-separator -mx-1 my-1 h-px bg-muted",e),...t}));Il.displayName=El.displayName;var ks=1,Vv=.9,Bv=.8,Gv=.17,eo=.1,to=.999,Wv=.9999,zv=.99,qv=/[\\\/_+.#"@\[\(\{&]/,Uv=/[\\\/_+.#"@\[\(\{&]/g,Hv=/[\s-]/,Ml=/[\s-]/g;function Co(e,t,r,n,o,a,i){if(a===t.length)return o===e.length?ks:zv;var l=`${o},${a}`;if(i[l]!==void 0)return i[l];for(var u=n.charAt(a),d=r.indexOf(u,o),f=0,p,g,m,v;d>=0;)p=Co(e,t,r,n,d+1,a+1,i),p>f&&(d===o?p*=ks:qv.test(e.charAt(d-1))?(p*=Bv,m=e.slice(o,d-1).match(Uv),m&&o>0&&(p*=Math.pow(to,m.length))):Hv.test(e.charAt(d-1))?(p*=Vv,v=e.slice(o,d-1).match(Ml),v&&o>0&&(p*=Math.pow(to,v.length))):(p*=Gv,o>0&&(p*=Math.pow(to,d-o))),e.charAt(d)!==t.charAt(a)&&(p*=Wv)),(p<eo&&r.charAt(d-1)===n.charAt(a+1)||n.charAt(a+1)===n.charAt(a)&&r.charAt(d-1)!==n.charAt(a))&&(g=Co(e,t,r,n,d+1,a+2,i),g*eo>p&&(p=g*eo)),p>f&&(f=p),d=r.indexOf(u,d+1);return i[l]=f,f}function Ps(e){return e.toLowerCase().replace(Ml," ")}function Kv(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,Co(e,t,Ps(e),Ps(t),0,0,{})}function Yv(e,t){return c.useReducer((r,n)=>t[r][n]??r,e)}var ke=e=>{const{present:t,children:r}=e,n=Xv(t),o=typeof r=="function"?r({present:n.isPresent}):c.Children.only(r),a=se(n.ref,Zv(o));return typeof r=="function"||n.isPresent?c.cloneElement(o,{ref:a}):null};ke.displayName="Presence";function Xv(e){const[t,r]=c.useState(),n=c.useRef(null),o=c.useRef(e),a=c.useRef("none"),i=e?"mounted":"unmounted",[l,u]=Yv(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const d=Br(n.current);a.current=l==="mounted"?d:"none"},[l]),xe(()=>{const d=n.current,f=o.current;if(f!==e){const g=a.current,m=Br(d);e?u("MOUNT"):m==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(f&&g!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),xe(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,p=m=>{const h=Br(n.current).includes(CSS.escape(m.animationName));if(m.target===t&&h&&(u("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},g=m=>{m.target===t&&(a.current=Br(n.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:c.useCallback(d=>{n.current=d?getComputedStyle(d):null,r(d)},[])}}function Br(e){return(e==null?void 0:e.animationName)||"none"}function Zv(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Rn="Dialog",[Ol,J1]=ye(Rn),[Jv,$e]=Ol(Rn),Dl=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,l=c.useRef(null),u=c.useRef(null),[d,f]=be({prop:n,defaultProp:o??!1,onChange:a,caller:Rn});return s.jsx(Jv,{scope:t,triggerRef:l,contentRef:u,contentId:me(),titleId:me(),descriptionId:me(),open:d,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(p=>!p),[f]),modal:i,children:r})};Dl.displayName=Rn;var Ll="DialogTrigger",$l=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=$e(Ll,r),a=se(t,o.triggerRef);return s.jsx(X.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Zo(o.open),...n,ref:a,onClick:F(e.onClick,o.onOpenToggle)})});$l.displayName=Ll;var Yo="DialogPortal",[Qv,Fl]=Ol(Yo,{forceMount:void 0}),Vl=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,a=$e(Yo,t);return s.jsx(Qv,{scope:t,forceMount:r,children:c.Children.map(n,i=>s.jsx(ke,{present:r||a.open,children:s.jsx(Xt,{asChild:!0,container:o,children:i})}))})};Vl.displayName=Yo;var Zr="DialogOverlay",Bl=c.forwardRef((e,t)=>{const r=Fl(Zr,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=$e(Zr,e.__scopeDialog);return a.modal?s.jsx(ke,{present:n||a.open,children:s.jsx(tx,{...o,ref:t})}):null});Bl.displayName=Zr;var ex=st("DialogOverlay.RemoveScroll"),tx=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=$e(Zr,r);return s.jsx(Cr,{as:ex,allowPinchZoom:!0,shards:[o.contentRef],children:s.jsx(X.div,{"data-state":Zo(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),St="DialogContent",Gl=c.forwardRef((e,t)=>{const r=Fl(St,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=$e(St,e.__scopeDialog);return s.jsx(ke,{present:n||a.open,children:a.modal?s.jsx(rx,{...o,ref:t}):s.jsx(nx,{...o,ref:t})})});Gl.displayName=St;var rx=c.forwardRef((e,t)=>{const r=$e(St,e.__scopeDialog),n=c.useRef(null),o=se(t,r.contentRef,n);return c.useEffect(()=>{const a=n.current;if(a)return vn(a)},[]),s.jsx(Wl,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:F(e.onCloseAutoFocus,a=>{var i;a.preventDefault(),(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:F(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0;(i.button===2||l)&&a.preventDefault()}),onFocusOutside:F(e.onFocusOutside,a=>a.preventDefault())})}),nx=c.forwardRef((e,t)=>{const r=$e(St,e.__scopeDialog),n=c.useRef(!1),o=c.useRef(!1);return s.jsx(Wl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,l;(i=e.onCloseAutoFocus)==null||i.call(e,a),a.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var u,d;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;((d=r.triggerRef.current)==null?void 0:d.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Wl=c.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,l=$e(St,r),u=c.useRef(null),d=se(t,u);return un(),s.jsxs(s.Fragment,{children:[s.jsx(xr,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:s.jsx(Ht,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Zo(l.open),...i,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),s.jsxs(s.Fragment,{children:[s.jsx(ox,{titleId:l.titleId}),s.jsx(sx,{contentRef:u,descriptionId:l.descriptionId})]})]})}),Xo="DialogTitle",zl=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=$e(Xo,r);return s.jsx(X.h2,{id:o.titleId,...n,ref:t})});zl.displayName=Xo;var ql="DialogDescription",Ul=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=$e(ql,r);return s.jsx(X.p,{id:o.descriptionId,...n,ref:t})});Ul.displayName=ql;var Hl="DialogClose",Kl=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=$e(Hl,r);return s.jsx(X.button,{type:"button",...n,ref:t,onClick:F(e.onClick,()=>o.onOpenChange(!1))})});Kl.displayName=Hl;function Zo(e){return e?"open":"closed"}var Yl="DialogTitleWarning",[Q1,Xl]=Up(Yl,{contentName:St,titleName:Xo,docsSlug:"dialog"}),ox=({titleId:e})=>{const t=Xl(Yl),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
145
+ */const Pm=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],un=ve("x",Pm),fi=ln("qodo qodo-button inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none cursor-pointer",{variants:{variant:{default:"bg-[var(--fill-action-emphasis-idle)] text-[var(--text-action-on-emphasis-idle)] hover:bg-[var(--fill-action-emphasis-hover)] active:bg-[var(--fill-action-emphasis-active)] disabled:bg-[var(--fill-action-emphasis-disabled)]",secondary:"bg-[var(--fill-action-neutral-idle)] text-[var(--text-action-neutral-idle)] hover:bg-[var(--fill-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-[var(--fill-action-neutral-disabled)] disabled:text-[var(--text-action-neutral-disabled)]",outline:"border border-[var(--border-action-neutral-idle)] text-[var(--text-action-neutral-idle)] hover:bg-[var(--fill-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-none disabled:text-[var(--text-action-neutral-disabled)]",ghost:"text-[var(--text-action-neutral-idle)] hover:text-[var(--text-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-none disabled:text-[var(--text-action-neutral-disabled)]",link:"text-[var(--text-action-emphasis-idle)] hover:text-[var(--text-action-emphasis-hover)] active:bg-[var(--fill-action-emphasis-active)] disabled:bg-none disabled:text-[var(--text-action-emphasis-disabled)]",danger:"border border-[var(--border-action-negative-idle)] text-[var(--icon-action-negative-idle)] hover:bg-[var(--fill-action-negative-hover)] active:bg-[var(--fill-action-negative-active)] disabled:border-[var(--border-action-negative-disabled)] disabled:text-[var(--icon-action-negative-disabled)]"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Je=c.forwardRef(({className:e,variant:t,size:r,loading:n,children:o,disabled:a,...i},l)=>s.jsxs("button",{className:_(fi({variant:t,size:r,className:e})),ref:l,disabled:a||n,...i,children:[o,n&&s.jsx(ui,{className:"ml-2 w-4 h-4 animate-spin"})]}));Je.displayName="Button";const Nm=ln("qodo qodo-input file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground border-input-neutral-idle flex h-9 w-full min-w-0 rounded-md border bg-fill-input-neutral-idle px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-purple-muted-700 disabled:border-purple-muted-500 disabled:text-purple-muted-400 read-only:bg-purple-muted-700 read-only:border-purple-muted-400 read-only:cursor-default read-only:text-purple-muted-200 md:text-sm dark:border-input-neutral-idle dark:bg-fill-input-neutral-idle dark:text-foreground dark:placeholder:text-muted-foreground",{variants:{variant:{default:"bg-purple-muted-700 border-purple-muted-500 text-purple-muted-300 text-sm",secondary:"bg-secondary border-secondary text-secondary-foreground placeholder:text-muted-foreground dark:bg-secondary dark:border-secondary dark:text-secondary-foreground dark:placeholder:text-muted-foreground",accent:"bg-accent border-accent text-accent-foreground placeholder:text-muted-foreground dark:bg-accent dark:border-accent dark:text-accent-foreground dark:placeholder:text-muted-foreground",success:"bg-success border-success text-success-foreground placeholder:text-success-foreground/70 dark:bg-success dark:border-success dark:text-success-foreground dark:placeholder:text-success-foreground/70",warning:"bg-warning border-warning text-warning-foreground placeholder:text-warning-foreground/70 dark:bg-warning dark:border-warning dark:text-warning-foreground dark:placeholder:text-warning-foreground/70",destructive:"border-destructive bg-purple-muted-700 text-purple-muted-200 placeholder:text-destructive-foreground/70 dark:border-destructive dark:placeholder:text-destructive-foreground/70"}},defaultVariants:{variant:"default"}}),vr=c.forwardRef(({className:e,variant:t,type:r,error:n,...o},a)=>s.jsx("input",{ref:a,type:r,"data-slot":"input","aria-invalid":n||void 0,className:_(Nm({variant:t,className:e})),...o}));vr.displayName="Input";function ts(e,[t,r]){return Math.min(r,Math.max(t,e))}function F(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function jm(e,t){const r=c.createContext(t),n=a=>{const{children:i,...l}=a,u=c.useMemo(()=>l,Object.values(l));return s.jsx(r.Provider,{value:u,children:i})};n.displayName=e+"Provider";function o(a){const i=c.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,o]}function ye(e,t=[]){let r=[];function n(a,i){const l=c.createContext(i),u=r.length;r=[...r,i];const d=p=>{var y;const{scope:g,children:m,...v}=p,h=((y=g==null?void 0:g[e])==null?void 0:y[u])||l,x=c.useMemo(()=>v,Object.values(v));return s.jsx(h.Provider,{value:x,children:m})};d.displayName=a+"Provider";function f(p,g){var h;const m=((h=g==null?void 0:g[e])==null?void 0:h[u])||l,v=c.useContext(m);if(v)return v;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[d,f]}const o=()=>{const a=r.map(i=>c.createContext(i));return function(l){const u=(l==null?void 0:l[e])||a;return c.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return o.scopeName=e,[n,Tm(o,...t)]}function Tm(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const i=n.reduce((l,{useScope:u,scopeName:d})=>{const p=u(a)[`__scope${d}`];return{...l,...p}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function rs(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Qe(...e){return t=>{let r=!1;const n=e.map(o=>{const a=rs(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){const a=n[o];typeof a=="function"?a():rs(e[o],null)}}}}function se(...e){return c.useCallback(Qe(...e),e)}function st(e){const t=Am(e),r=c.forwardRef((n,o)=>{const{children:a,...i}=n,l=c.Children.toArray(a),u=l.find(Mm);if(u){const d=u.props.children,f=l.map(p=>p===u?c.Children.count(d)>1?c.Children.only(null):c.isValidElement(d)?d.props.children:null:p);return s.jsx(t,{...i,ref:o,children:c.isValidElement(d)?c.cloneElement(d,void 0,f):null})}return s.jsx(t,{...i,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}var _m=st("Slot");function Am(e){const t=c.forwardRef((r,n)=>{const{children:o,...a}=r;if(c.isValidElement(o)){const i=Dm(o),l=Om(a,o.props);return o.type!==c.Fragment&&(l.ref=n?Qe(n,i):i),c.cloneElement(o,l)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var pi=Symbol("radix.slottable");function Im(e){const t=({children:r})=>s.jsx(s.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=pi,t}function Mm(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===pi}function Om(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...l)=>{const u=a(...l);return o(...l),u}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function Dm(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function dn(e){const t=e+"CollectionProvider",[r,n]=ye(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:x,children:y}=h,b=S.useRef(null),C=S.useRef(new Map).current;return s.jsx(o,{scope:x,itemMap:C,collectionRef:b,children:y})};i.displayName=t;const l=e+"CollectionSlot",u=st(l),d=S.forwardRef((h,x)=>{const{scope:y,children:b}=h,C=a(l,y),R=se(x,C.collectionRef);return s.jsx(u,{ref:R,children:b})});d.displayName=l;const f=e+"CollectionItemSlot",p="data-radix-collection-item",g=st(f),m=S.forwardRef((h,x)=>{const{scope:y,children:b,...C}=h,R=S.useRef(null),P=se(x,R),j=a(f,y);return S.useEffect(()=>(j.itemMap.set(R,{ref:R,...C}),()=>void j.itemMap.delete(R))),s.jsx(g,{[p]:"",ref:P,children:b})});m.displayName=f;function v(h){const x=a(e+"CollectionConsumer",h);return S.useCallback(()=>{const b=x.collectionRef.current;if(!b)return[];const C=Array.from(b.querySelectorAll(`[${p}]`));return Array.from(x.itemMap.values()).sort((j,T)=>C.indexOf(j.ref.current)-C.indexOf(T.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:d,ItemSlot:m},v,n]}var Lm=c.createContext(void 0);function Ut(e){const t=c.useContext(Lm);return e||t||"ltr"}var $m=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],X=$m.reduce((e,t)=>{const r=st(`Primitive.${t}`),n=c.forwardRef((o,a)=>{const{asChild:i,...l}=o,u=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(u,{...l,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function mi(e,t){e&&sn.flushSync(()=>e.dispatchEvent(t))}function Oe(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function Fm(e,t=globalThis==null?void 0:globalThis.document){const r=Oe(e);c.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Vm="DismissableLayer",fo="dismissableLayer.update",Bm="dismissableLayer.pointerDownOutside",Gm="dismissableLayer.focusOutside",ns,gi=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ht=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:l,...u}=e,d=c.useContext(gi),[f,p]=c.useState(null),g=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=c.useState({}),v=se(t,T=>p(T)),h=Array.from(d.layers),[x]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=h.indexOf(x),b=f?h.indexOf(f):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,R=b>=y,P=qm(T=>{const E=T.target,V=[...d.branches].some(U=>U.contains(E));!R||V||(o==null||o(T),i==null||i(T),T.defaultPrevented||l==null||l())},g),j=Um(T=>{const E=T.target;[...d.branches].some(U=>U.contains(E))||(a==null||a(T),i==null||i(T),T.defaultPrevented||l==null||l())},g);return Fm(T=>{b===d.layers.size-1&&(n==null||n(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},g),c.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(ns=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),os(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=ns)}},[f,g,r,d]),c.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),os())},[f,d]),c.useEffect(()=>{const T=()=>m({});return document.addEventListener(fo,T),()=>document.removeEventListener(fo,T)},[]),s.jsx(X.div,{...u,ref:v,style:{pointerEvents:C?R?"auto":"none":void 0,...e.style},onFocusCapture:F(e.onFocusCapture,j.onFocusCapture),onBlurCapture:F(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:F(e.onPointerDownCapture,P.onPointerDownCapture)})});Ht.displayName=Vm;var Wm="DismissableLayerBranch",zm=c.forwardRef((e,t)=>{const r=c.useContext(gi),n=c.useRef(null),o=se(t,n);return c.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),s.jsx(X.div,{...e,ref:o})});zm.displayName=Wm;function qm(e,t=globalThis==null?void 0:globalThis.document){const r=Oe(e),n=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const a=l=>{if(l.target&&!n.current){let u=function(){hi(Bm,r,d,{discrete:!0})};const d={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Um(e,t=globalThis==null?void 0:globalThis.document){const r=Oe(e),n=c.useRef(!1);return c.useEffect(()=>{const o=a=>{a.target&&!n.current&&hi(Gm,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function os(){const e=new CustomEvent(fo);document.dispatchEvent(e)}function hi(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?mi(o,a):o.dispatchEvent(a)}var qn=0;function fn(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??as()),document.body.insertAdjacentElement("beforeend",e[1]??as()),qn++,()=>{qn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),qn--}},[])}function as(){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 Un="focusScope.autoFocusOnMount",Hn="focusScope.autoFocusOnUnmount",ss={bubbles:!1,cancelable:!0},Hm="FocusScope",xr=c.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[l,u]=c.useState(null),d=Oe(o),f=Oe(a),p=c.useRef(null),g=se(t,h=>u(h)),m=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(n){let h=function(C){if(m.paused||!l)return;const R=C.target;l.contains(R)?p.current=R:at(p.current,{select:!0})},x=function(C){if(m.paused||!l)return;const R=C.relatedTarget;R!==null&&(l.contains(R)||at(p.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const P of C)P.removedNodes.length>0&&at(l)};document.addEventListener("focusin",h),document.addEventListener("focusout",x);const b=new MutationObserver(y);return l&&b.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",x),b.disconnect()}}},[n,l,m.paused]),c.useEffect(()=>{if(l){ls.add(m);const h=document.activeElement;if(!l.contains(h)){const y=new CustomEvent(Un,ss);l.addEventListener(Un,d),l.dispatchEvent(y),y.defaultPrevented||(Km(Qm(vi(l)),{select:!0}),document.activeElement===h&&at(l))}return()=>{l.removeEventListener(Un,d),setTimeout(()=>{const y=new CustomEvent(Hn,ss);l.addEventListener(Hn,f),l.dispatchEvent(y),y.defaultPrevented||at(h??document.body,{select:!0}),l.removeEventListener(Hn,f),ls.remove(m)},0)}}},[l,d,f,m]);const v=c.useCallback(h=>{if(!r&&!n||m.paused)return;const x=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,y=document.activeElement;if(x&&y){const b=h.currentTarget,[C,R]=Ym(b);C&&R?!h.shiftKey&&y===R?(h.preventDefault(),r&&at(C,{select:!0})):h.shiftKey&&y===C&&(h.preventDefault(),r&&at(R,{select:!0})):y===b&&h.preventDefault()}},[r,n,m.paused]);return s.jsx(X.div,{tabIndex:-1,...i,ref:g,onKeyDown:v})});xr.displayName=Hm;function Km(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(at(n,{select:t}),document.activeElement!==r)return}function Ym(e){const t=vi(e),r=is(t,e),n=is(t.reverse(),e);return[r,n]}function vi(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function is(e,t){for(const r of e)if(!Xm(r,{upTo:t}))return r}function Xm(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 Zm(e){return e instanceof HTMLInputElement&&"select"in e}function at(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Zm(e)&&t&&e.select()}}var ls=Jm();function Jm(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=cs(e,t),e.unshift(t)},remove(t){var r;e=cs(e,t),(r=e[0])==null||r.resume()}}}function cs(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Qm(e){return e.filter(t=>t.tagName!=="A")}var xe=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},eg=c[" useId ".trim().toString()]||(()=>{}),tg=0;function me(e){const[t,r]=c.useState(eg());return xe(()=>{r(n=>n??String(tg++))},[e]),t?`radix-${t}`:""}const rg=["top","right","bottom","left"],it=Math.min,Pe=Math.max,Ur=Math.round,Dr=Math.floor,Ue=e=>({x:e,y:e}),ng={left:"right",right:"left",bottom:"top",top:"bottom"},og={start:"end",end:"start"};function po(e,t,r){return Pe(e,it(t,r))}function et(e,t){return typeof e=="function"?e(t):e}function tt(e){return e.split("-")[0]}function Kt(e){return e.split("-")[1]}function Io(e){return e==="x"?"y":"x"}function Mo(e){return e==="y"?"height":"width"}const ag=new Set(["top","bottom"]);function qe(e){return ag.has(tt(e))?"y":"x"}function Oo(e){return Io(qe(e))}function sg(e,t,r){r===void 0&&(r=!1);const n=Kt(e),o=Oo(e),a=Mo(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Hr(i)),[i,Hr(i)]}function ig(e){const t=Hr(e);return[mo(e),t,mo(t)]}function mo(e){return e.replace(/start|end/g,t=>og[t])}const us=["left","right"],ds=["right","left"],lg=["top","bottom"],cg=["bottom","top"];function ug(e,t,r){switch(e){case"top":case"bottom":return r?t?ds:us:t?us:ds;case"left":case"right":return t?lg:cg;default:return[]}}function dg(e,t,r,n){const o=Kt(e);let a=ug(tt(e),r==="start",n);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(mo)))),a}function Hr(e){return e.replace(/left|right|bottom|top/g,t=>ng[t])}function fg(e){return{top:0,right:0,bottom:0,left:0,...e}}function xi(e){return typeof e!="number"?fg(e):{top:e,right:e,bottom:e,left:e}}function Kr(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function fs(e,t,r){let{reference:n,floating:o}=e;const a=qe(t),i=Oo(t),l=Mo(i),u=tt(t),d=a==="y",f=n.x+n.width/2-o.width/2,p=n.y+n.height/2-o.height/2,g=n[l]/2-o[l]/2;let m;switch(u){case"top":m={x:f,y:n.y-o.height};break;case"bottom":m={x:f,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:p};break;case"left":m={x:n.x-o.width,y:p};break;default:m={x:n.x,y:n.y}}switch(Kt(t)){case"start":m[i]-=g*(r&&d?-1:1);break;case"end":m[i]+=g*(r&&d?-1:1);break}return m}const pg=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:i}=r,l=a.filter(Boolean),u=await(i.isRTL==null?void 0:i.isRTL(t));let d=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=fs(d,n,u),g=n,m={},v=0;for(let h=0;h<l.length;h++){const{name:x,fn:y}=l[h],{x:b,y:C,data:R,reset:P}=await y({x:f,y:p,initialPlacement:n,placement:g,strategy:o,middlewareData:m,rects:d,platform:i,elements:{reference:e,floating:t}});f=b??f,p=C??p,m={...m,[x]:{...m[x],...R}},P&&v<=50&&(v++,typeof P=="object"&&(P.placement&&(g=P.placement),P.rects&&(d=P.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):P.rects),{x:f,y:p}=fs(d,g,u)),h=-1)}return{x:f,y:p,placement:g,strategy:o,middlewareData:m}};async function dr(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:i,elements:l,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:g=!1,padding:m=0}=et(t,e),v=xi(m),x=l[g?p==="floating"?"reference":"floating":p],y=Kr(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(x)))==null||r?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:d,rootBoundary:f,strategy:u})),b=p==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),R=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},P=Kr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:b,offsetParent:C,strategy:u}):b);return{top:(y.top-P.top+v.top)/R.y,bottom:(P.bottom-y.bottom+v.bottom)/R.y,left:(y.left-P.left+v.left)/R.x,right:(P.right-y.right+v.right)/R.x}}const mg=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:i,elements:l,middlewareData:u}=t,{element:d,padding:f=0}=et(e,t)||{};if(d==null)return{};const p=xi(f),g={x:r,y:n},m=Oo(o),v=Mo(m),h=await i.getDimensions(d),x=m==="y",y=x?"top":"left",b=x?"bottom":"right",C=x?"clientHeight":"clientWidth",R=a.reference[v]+a.reference[m]-g[m]-a.floating[v],P=g[m]-a.reference[m],j=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let T=j?j[C]:0;(!T||!await(i.isElement==null?void 0:i.isElement(j)))&&(T=l.floating[C]||a.floating[v]);const E=R/2-P/2,V=T/2-h[v]/2-1,U=it(p[y],V),re=it(p[b],V),te=U,J=T-h[v]-re,q=T/2-h[v]/2+E,D=po(te,q,J),A=!u.arrow&&Kt(o)!=null&&q!==D&&a.reference[v]/2-(q<te?U:re)-h[v]/2<0,$=A?q<te?q-te:q-J:0;return{[m]:g[m]+$,data:{[m]:D,centerOffset:q-D-$,...A&&{alignmentOffset:$}},reset:A}}}),gg=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:i,initialPlacement:l,platform:u,elements:d}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:h=!0,...x}=et(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const y=tt(o),b=qe(l),C=tt(l)===l,R=await(u.isRTL==null?void 0:u.isRTL(d.floating)),P=g||(C||!h?[Hr(l)]:ig(l)),j=v!=="none";!g&&j&&P.push(...dg(l,h,v,R));const T=[l,...P],E=await dr(t,x),V=[];let U=((n=a.flip)==null?void 0:n.overflows)||[];if(f&&V.push(E[y]),p){const q=sg(o,i,R);V.push(E[q[0]],E[q[1]])}if(U=[...U,{placement:o,overflows:V}],!V.every(q=>q<=0)){var re,te;const q=(((re=a.flip)==null?void 0:re.index)||0)+1,D=T[q];if(D&&(!(p==="alignment"?b!==qe(D):!1)||U.every(k=>qe(k.placement)===b?k.overflows[0]>0:!0)))return{data:{index:q,overflows:U},reset:{placement:D}};let A=(te=U.filter($=>$.overflows[0]<=0).sort(($,k)=>$.overflows[1]-k.overflows[1])[0])==null?void 0:te.placement;if(!A)switch(m){case"bestFit":{var J;const $=(J=U.filter(k=>{if(j){const O=qe(k.placement);return O===b||O==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(O=>O>0).reduce((O,W)=>O+W,0)]).sort((k,O)=>k[1]-O[1])[0])==null?void 0:J[0];$&&(A=$);break}case"initialPlacement":A=l;break}if(o!==A)return{reset:{placement:A}}}return{}}}};function ps(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ms(e){return rg.some(t=>e[t]>=0)}const hg=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=et(e,t);switch(n){case"referenceHidden":{const a=await dr(t,{...o,elementContext:"reference"}),i=ps(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:ms(i)}}}case"escaped":{const a=await dr(t,{...o,altBoundary:!0}),i=ps(a,r.floating);return{data:{escapedOffsets:i,escaped:ms(i)}}}default:return{}}}}},bi=new Set(["left","top"]);async function vg(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=tt(r),l=Kt(r),u=qe(r)==="y",d=bi.has(i)?-1:1,f=a&&u?-1:1,p=et(t,e);let{mainAxis:g,crossAxis:m,alignmentAxis:v}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof v=="number"&&(m=l==="end"?v*-1:v),u?{x:m*f,y:g*d}:{x:g*d,y:m*f}}const xg=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:a,placement:i,middlewareData:l}=t,u=await vg(t,e);return i===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:o+u.x,y:a+u.y,data:{...u,placement:i}}}}},bg=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:l={fn:x=>{let{x:y,y:b}=x;return{x:y,y:b}}},...u}=et(e,t),d={x:r,y:n},f=await dr(t,u),p=qe(tt(o)),g=Io(p);let m=d[g],v=d[p];if(a){const x=g==="y"?"top":"left",y=g==="y"?"bottom":"right",b=m+f[x],C=m-f[y];m=po(b,m,C)}if(i){const x=p==="y"?"top":"left",y=p==="y"?"bottom":"right",b=v+f[x],C=v-f[y];v=po(b,v,C)}const h=l.fn({...t,[g]:m,[p]:v});return{...h,data:{x:h.x-r,y:h.y-n,enabled:{[g]:a,[p]:i}}}}}},yg=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:i}=t,{offset:l=0,mainAxis:u=!0,crossAxis:d=!0}=et(e,t),f={x:r,y:n},p=qe(o),g=Io(p);let m=f[g],v=f[p];const h=et(l,t),x=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){const C=g==="y"?"height":"width",R=a.reference[g]-a.floating[C]+x.mainAxis,P=a.reference[g]+a.reference[C]-x.mainAxis;m<R?m=R:m>P&&(m=P)}if(d){var y,b;const C=g==="y"?"width":"height",R=bi.has(tt(o)),P=a.reference[p]-a.floating[C]+(R&&((y=i.offset)==null?void 0:y[p])||0)+(R?0:x.crossAxis),j=a.reference[p]+a.reference[C]+(R?0:((b=i.offset)==null?void 0:b[p])||0)-(R?x.crossAxis:0);v<P?v=P:v>j&&(v=j)}return{[g]:m,[p]:v}}}},wg=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:a,platform:i,elements:l}=t,{apply:u=()=>{},...d}=et(e,t),f=await dr(t,d),p=tt(o),g=Kt(o),m=qe(o)==="y",{width:v,height:h}=a.floating;let x,y;p==="top"||p==="bottom"?(x=p,y=g===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(y=p,x=g==="end"?"top":"bottom");const b=h-f.top-f.bottom,C=v-f.left-f.right,R=it(h-f[x],b),P=it(v-f[y],C),j=!t.middlewareData.shift;let T=R,E=P;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(E=C),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(T=b),j&&!g){const U=Pe(f.left,0),re=Pe(f.right,0),te=Pe(f.top,0),J=Pe(f.bottom,0);m?E=v-2*(U!==0||re!==0?U+re:Pe(f.left,f.right)):T=h-2*(te!==0||J!==0?te+J:Pe(f.top,f.bottom))}await u({...t,availableWidth:E,availableHeight:T});const V=await i.getDimensions(l.floating);return v!==V.width||h!==V.height?{reset:{rects:!0}}:{}}}};function pn(){return typeof window<"u"}function Yt(e){return yi(e)?(e.nodeName||"").toLowerCase():"#document"}function Ne(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ke(e){var t;return(t=(yi(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function yi(e){return pn()?e instanceof Node||e instanceof Ne(e).Node:!1}function De(e){return pn()?e instanceof Element||e instanceof Ne(e).Element:!1}function He(e){return pn()?e instanceof HTMLElement||e instanceof Ne(e).HTMLElement:!1}function gs(e){return!pn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ne(e).ShadowRoot}const Cg=new Set(["inline","contents"]);function br(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Le(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!Cg.has(o)}const Sg=new Set(["table","td","th"]);function Rg(e){return Sg.has(Yt(e))}const Eg=[":popover-open",":modal"];function mn(e){return Eg.some(t=>{try{return e.matches(t)}catch{return!1}})}const kg=["transform","translate","scale","rotate","perspective"],Pg=["transform","translate","scale","rotate","perspective","filter"],Ng=["paint","layout","strict","content"];function Do(e){const t=Lo(),r=De(e)?Le(e):e;return kg.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||Pg.some(n=>(r.willChange||"").includes(n))||Ng.some(n=>(r.contain||"").includes(n))}function jg(e){let t=lt(e);for(;He(t)&&!Bt(t);){if(Do(t))return t;if(mn(t))return null;t=lt(t)}return null}function Lo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Tg=new Set(["html","body","#document"]);function Bt(e){return Tg.has(Yt(e))}function Le(e){return Ne(e).getComputedStyle(e)}function gn(e){return De(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function lt(e){if(Yt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||gs(e)&&e.host||Ke(e);return gs(t)?t.host:t}function wi(e){const t=lt(e);return Bt(t)?e.ownerDocument?e.ownerDocument.body:e.body:He(t)&&br(t)?t:wi(t)}function fr(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=wi(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),i=Ne(o);if(a){const l=go(i);return t.concat(i,i.visualViewport||[],br(o)?o:[],l&&r?fr(l):[])}return t.concat(o,fr(o,[],r))}function go(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ci(e){const t=Le(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=He(e),a=o?e.offsetWidth:r,i=o?e.offsetHeight:n,l=Ur(r)!==a||Ur(n)!==i;return l&&(r=a,n=i),{width:r,height:n,$:l}}function $o(e){return De(e)?e:e.contextElement}function Ft(e){const t=$o(e);if(!He(t))return Ue(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=Ci(t);let i=(a?Ur(r.width):r.width)/n,l=(a?Ur(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const _g=Ue(0);function Si(e){const t=Ne(e);return!Lo()||!t.visualViewport?_g:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ag(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Ne(e)?!1:t}function yt(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=$o(e);let i=Ue(1);t&&(n?De(n)&&(i=Ft(n)):i=Ft(e));const l=Ag(a,r,n)?Si(a):Ue(0);let u=(o.left+l.x)/i.x,d=(o.top+l.y)/i.y,f=o.width/i.x,p=o.height/i.y;if(a){const g=Ne(a),m=n&&De(n)?Ne(n):n;let v=g,h=go(v);for(;h&&n&&m!==v;){const x=Ft(h),y=h.getBoundingClientRect(),b=Le(h),C=y.left+(h.clientLeft+parseFloat(b.paddingLeft))*x.x,R=y.top+(h.clientTop+parseFloat(b.paddingTop))*x.y;u*=x.x,d*=x.y,f*=x.x,p*=x.y,u+=C,d+=R,v=Ne(h),h=go(v)}}return Kr({width:f,height:p,x:u,y:d})}function hn(e,t){const r=gn(e).scrollLeft;return t?t.left+r:yt(Ke(e)).left+r}function Ri(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-hn(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function Ig(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a=o==="fixed",i=Ke(n),l=t?mn(t.floating):!1;if(n===i||l&&a)return r;let u={scrollLeft:0,scrollTop:0},d=Ue(1);const f=Ue(0),p=He(n);if((p||!p&&!a)&&((Yt(n)!=="body"||br(i))&&(u=gn(n)),He(n))){const m=yt(n);d=Ft(n),f.x=m.x+n.clientLeft,f.y=m.y+n.clientTop}const g=i&&!p&&!a?Ri(i,u):Ue(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-u.scrollLeft*d.x+f.x+g.x,y:r.y*d.y-u.scrollTop*d.y+f.y+g.y}}function Mg(e){return Array.from(e.getClientRects())}function Og(e){const t=Ke(e),r=gn(e),n=e.ownerDocument.body,o=Pe(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=Pe(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+hn(e);const l=-r.scrollTop;return Le(n).direction==="rtl"&&(i+=Pe(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:l}}const hs=25;function Dg(e,t){const r=Ne(e),n=Ke(e),o=r.visualViewport;let a=n.clientWidth,i=n.clientHeight,l=0,u=0;if(o){a=o.width,i=o.height;const f=Lo();(!f||f&&t==="fixed")&&(l=o.offsetLeft,u=o.offsetTop)}const d=hn(n);if(d<=0){const f=n.ownerDocument,p=f.body,g=getComputedStyle(p),m=f.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,v=Math.abs(n.clientWidth-p.clientWidth-m);v<=hs&&(a-=v)}else d<=hs&&(a+=d);return{width:a,height:i,x:l,y:u}}const Lg=new Set(["absolute","fixed"]);function $g(e,t){const r=yt(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=He(e)?Ft(e):Ue(1),i=e.clientWidth*a.x,l=e.clientHeight*a.y,u=o*a.x,d=n*a.y;return{width:i,height:l,x:u,y:d}}function vs(e,t,r){let n;if(t==="viewport")n=Dg(e,r);else if(t==="document")n=Og(Ke(e));else if(De(t))n=$g(t,r);else{const o=Si(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Kr(n)}function Ei(e,t){const r=lt(e);return r===t||!De(r)||Bt(r)?!1:Le(r).position==="fixed"||Ei(r,t)}function Fg(e,t){const r=t.get(e);if(r)return r;let n=fr(e,[],!1).filter(l=>De(l)&&Yt(l)!=="body"),o=null;const a=Le(e).position==="fixed";let i=a?lt(e):e;for(;De(i)&&!Bt(i);){const l=Le(i),u=Do(i);!u&&l.position==="fixed"&&(o=null),(a?!u&&!o:!u&&l.position==="static"&&!!o&&Lg.has(o.position)||br(i)&&!u&&Ei(e,i))?n=n.filter(f=>f!==i):o=l,i=lt(i)}return t.set(e,n),n}function Vg(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?mn(t)?[]:Fg(t,this._c):[].concat(r),n],l=i[0],u=i.reduce((d,f)=>{const p=vs(t,f,o);return d.top=Pe(p.top,d.top),d.right=it(p.right,d.right),d.bottom=it(p.bottom,d.bottom),d.left=Pe(p.left,d.left),d},vs(t,l,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function Bg(e){const{width:t,height:r}=Ci(e);return{width:t,height:r}}function Gg(e,t,r){const n=He(t),o=Ke(t),a=r==="fixed",i=yt(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const u=Ue(0);function d(){u.x=hn(o)}if(n||!n&&!a)if((Yt(t)!=="body"||br(o))&&(l=gn(t)),n){const m=yt(t,!0,a,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else o&&d();a&&!n&&o&&d();const f=o&&!n&&!a?Ri(o,l):Ue(0),p=i.left+l.scrollLeft-u.x-f.x,g=i.top+l.scrollTop-u.y-f.y;return{x:p,y:g,width:i.width,height:i.height}}function Kn(e){return Le(e).position==="static"}function xs(e,t){if(!He(e)||Le(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ke(e)===r&&(r=r.ownerDocument.body),r}function ki(e,t){const r=Ne(e);if(mn(e))return r;if(!He(e)){let o=lt(e);for(;o&&!Bt(o);){if(De(o)&&!Kn(o))return o;o=lt(o)}return r}let n=xs(e,t);for(;n&&Rg(n)&&Kn(n);)n=xs(n,t);return n&&Bt(n)&&Kn(n)&&!Do(n)?r:n||jg(e)||r}const Wg=async function(e){const t=this.getOffsetParent||ki,r=this.getDimensions,n=await r(e.floating);return{reference:Gg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function zg(e){return Le(e).direction==="rtl"}const qg={convertOffsetParentRelativeRectToViewportRelativeRect:Ig,getDocumentElement:Ke,getClippingRect:Vg,getOffsetParent:ki,getElementRects:Wg,getClientRects:Mg,getDimensions:Bg,getScale:Ft,isElement:De,isRTL:zg};function Pi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ug(e,t){let r=null,n;const o=Ke(e);function a(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function i(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),a();const d=e.getBoundingClientRect(),{left:f,top:p,width:g,height:m}=d;if(l||t(),!g||!m)return;const v=Dr(p),h=Dr(o.clientWidth-(f+g)),x=Dr(o.clientHeight-(p+m)),y=Dr(f),C={rootMargin:-v+"px "+-h+"px "+-x+"px "+-y+"px",threshold:Pe(0,it(1,u))||1};let R=!0;function P(j){const T=j[0].intersectionRatio;if(T!==u){if(!R)return i();T?i(!1,T):n=setTimeout(()=>{i(!1,1e-7)},1e3)}T===1&&!Pi(d,e.getBoundingClientRect())&&i(),R=!1}try{r=new IntersectionObserver(P,{...C,root:o.ownerDocument})}catch{r=new IntersectionObserver(P,C)}r.observe(e)}return i(!0),a}function Hg(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=n,d=$o(e),f=o||a?[...d?fr(d):[],...fr(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",r,{passive:!0}),a&&y.addEventListener("resize",r)});const p=d&&l?Ug(d,r):null;let g=-1,m=null;i&&(m=new ResizeObserver(y=>{let[b]=y;b&&b.target===d&&m&&(m.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var C;(C=m)==null||C.observe(t)})),r()}),d&&!u&&m.observe(d),m.observe(t));let v,h=u?yt(e):null;u&&x();function x(){const y=yt(e);h&&!Pi(h,y)&&r(),h=y,v=requestAnimationFrame(x)}return r(),()=>{var y;f.forEach(b=>{o&&b.removeEventListener("scroll",r),a&&b.removeEventListener("resize",r)}),p==null||p(),(y=m)==null||y.disconnect(),m=null,u&&cancelAnimationFrame(v)}}const Kg=xg,Yg=bg,Xg=gg,Zg=wg,Jg=hg,bs=mg,Qg=yg,eh=(e,t,r)=>{const n=new Map,o={platform:qg,...r},a={...o.platform,_c:n};return pg(e,t,{...o,platform:a})};var th=typeof document<"u",rh=function(){},Gr=th?S.useLayoutEffect:rh;function Yr(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 r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Yr(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!Yr(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Ni(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ys(e,t){const r=Ni(e);return Math.round(t*r)/r}function Yn(e){const t=c.useRef(e);return Gr(()=>{t.current=e}),t}function nh(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:i}={},transform:l=!0,whileElementsMounted:u,open:d}=e,[f,p]=c.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[g,m]=c.useState(n);Yr(g,n)||m(n);const[v,h]=c.useState(null),[x,y]=c.useState(null),b=c.useCallback(k=>{k!==j.current&&(j.current=k,h(k))},[]),C=c.useCallback(k=>{k!==T.current&&(T.current=k,y(k))},[]),R=a||v,P=i||x,j=c.useRef(null),T=c.useRef(null),E=c.useRef(f),V=u!=null,U=Yn(u),re=Yn(o),te=Yn(d),J=c.useCallback(()=>{if(!j.current||!T.current)return;const k={placement:t,strategy:r,middleware:g};re.current&&(k.platform=re.current),eh(j.current,T.current,k).then(O=>{const W={...O,isPositioned:te.current!==!1};q.current&&!Yr(E.current,W)&&(E.current=W,sn.flushSync(()=>{p(W)}))})},[g,t,r,re,te]);Gr(()=>{d===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,p(k=>({...k,isPositioned:!1})))},[d]);const q=c.useRef(!1);Gr(()=>(q.current=!0,()=>{q.current=!1}),[]),Gr(()=>{if(R&&(j.current=R),P&&(T.current=P),R&&P){if(U.current)return U.current(R,P,J);J()}},[R,P,J,U,V]);const D=c.useMemo(()=>({reference:j,floating:T,setReference:b,setFloating:C}),[b,C]),A=c.useMemo(()=>({reference:R,floating:P}),[R,P]),$=c.useMemo(()=>{const k={position:r,left:0,top:0};if(!A.floating)return k;const O=ys(A.floating,f.x),W=ys(A.floating,f.y);return l?{...k,transform:"translate("+O+"px, "+W+"px)",...Ni(A.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:O,top:W}},[r,l,A.floating,f.x,f.y]);return c.useMemo(()=>({...f,update:J,refs:D,elements:A,floatingStyles:$}),[f,J,D,A,$])}const oh=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?bs({element:n.current,padding:o}).fn(r):{}:n?bs({element:n,padding:o}).fn(r):{}}}},ah=(e,t)=>({...Kg(e),options:[e,t]}),sh=(e,t)=>({...Yg(e),options:[e,t]}),ih=(e,t)=>({...Qg(e),options:[e,t]}),lh=(e,t)=>({...Xg(e),options:[e,t]}),ch=(e,t)=>({...Zg(e),options:[e,t]}),uh=(e,t)=>({...Jg(e),options:[e,t]}),dh=(e,t)=>({...oh(e),options:[e,t]});var fh="Arrow",ji=c.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return s.jsx(X.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});ji.displayName=fh;var ph=ji;function Fo(e){const[t,r]=c.useState(void 0);return xe(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let i,l;if("borderBoxSize"in a){const u=a.borderBoxSize,d=Array.isArray(u)?u[0]:u;i=d.inlineSize,l=d.blockSize}else i=e.offsetWidth,l=e.offsetHeight;r({width:i,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Vo="Popper",[Ti,ut]=ye(Vo),[mh,_i]=Ti(Vo),Ai=e=>{const{__scopePopper:t,children:r}=e,[n,o]=c.useState(null);return s.jsx(mh,{scope:t,anchor:n,onAnchorChange:o,children:r})};Ai.displayName=Vo;var Ii="PopperAnchor",Mi=c.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=_i(Ii,r),i=c.useRef(null),l=se(t,i),u=c.useRef(null);return c.useEffect(()=>{const d=u.current;u.current=(n==null?void 0:n.current)||i.current,d!==u.current&&a.onAnchorChange(u.current)}),n?null:s.jsx(X.div,{...o,ref:l})});Mi.displayName=Ii;var Bo="PopperContent",[gh,hh]=Ti(Bo),Oi=c.forwardRef((e,t)=>{var I,Z,ee,oe,ce,ie;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:m="optimized",onPlaced:v,...h}=e,x=_i(Bo,r),[y,b]=c.useState(null),C=se(t,Ce=>b(Ce)),[R,P]=c.useState(null),j=Fo(R),T=(j==null?void 0:j.width)??0,E=(j==null?void 0:j.height)??0,V=n+(a!=="center"?"-"+a:""),U=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},re=Array.isArray(d)?d:[d],te=re.length>0,J={padding:U,boundary:re.filter(xh),altBoundary:te},{refs:q,floatingStyles:D,placement:A,isPositioned:$,middlewareData:k}=nh({strategy:"fixed",placement:V,whileElementsMounted:(...Ce)=>Hg(...Ce,{animationFrame:m==="always"}),elements:{reference:x.anchor},middleware:[ah({mainAxis:o+E,alignmentAxis:i}),u&&sh({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?ih():void 0,...J}),u&&lh({...J}),ch({...J,apply:({elements:Ce,rects:je,availableWidth:Be,availableHeight:Ie})=>{const{width:nt,height:Ar}=je.reference,Xe=Ce.floating.style;Xe.setProperty("--radix-popper-available-width",`${Be}px`),Xe.setProperty("--radix-popper-available-height",`${Ie}px`),Xe.setProperty("--radix-popper-anchor-width",`${nt}px`),Xe.setProperty("--radix-popper-anchor-height",`${Ar}px`)}}),R&&dh({element:R,padding:l}),bh({arrowWidth:T,arrowHeight:E}),g&&uh({strategy:"referenceHidden",...J})]}),[O,W]=$i(A),Q=Oe(v);xe(()=>{$&&(Q==null||Q())},[$,Q]);const N=(I=k.arrow)==null?void 0:I.x,B=(Z=k.arrow)==null?void 0:Z.y,Y=((ee=k.arrow)==null?void 0:ee.centerOffset)!==0,[M,G]=c.useState();return xe(()=>{y&&G(window.getComputedStyle(y).zIndex)},[y]),s.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:$?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:M,"--radix-popper-transform-origin":[(oe=k.transformOrigin)==null?void 0:oe.x,(ce=k.transformOrigin)==null?void 0:ce.y].join(" "),...((ie=k.hide)==null?void 0:ie.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(gh,{scope:r,placedSide:O,onArrowChange:P,arrowX:N,arrowY:B,shouldHideArrow:Y,children:s.jsx(X.div,{"data-side":O,"data-align":W,...h,ref:C,style:{...h.style,animation:$?void 0:"none"}})})})});Oi.displayName=Bo;var Di="PopperArrow",vh={top:"bottom",right:"left",bottom:"top",left:"right"},Li=c.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=hh(Di,n),i=vh[a.placedSide];return s.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:s.jsx(ph,{...o,ref:r,style:{...o.style,display:"block"}})})});Li.displayName=Di;function xh(e){return e!==null}var bh=e=>({name:"transformOrigin",options:e,fn(t){var x,y,b;const{placement:r,rects:n,middlewareData:o}=t,i=((x=o.arrow)==null?void 0:x.centerOffset)!==0,l=i?0:e.arrowWidth,u=i?0:e.arrowHeight,[d,f]=$i(r),p={start:"0%",center:"50%",end:"100%"}[f],g=(((y=o.arrow)==null?void 0:y.x)??0)+l/2,m=(((b=o.arrow)==null?void 0:b.y)??0)+u/2;let v="",h="";return d==="bottom"?(v=i?p:`${g}px`,h=`${-u}px`):d==="top"?(v=i?p:`${g}px`,h=`${n.floating.height+u}px`):d==="right"?(v=`${-u}px`,h=i?p:`${m}px`):d==="left"&&(v=`${n.floating.width+u}px`,h=i?p:`${m}px`),{data:{x:v,y:h}}}});function $i(e){const[t,r="center"]=e.split("-");return[t,r]}var yr=Ai,wr=Mi,vn=Oi,xn=Li,yh="Portal",Xt=c.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[o,a]=c.useState(!1);xe(()=>a(!0),[]);const i=r||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return i?hr.createPortal(s.jsx(X.div,{...n,ref:t}),i):null});Xt.displayName=yh;var wh=c[" useInsertionEffect ".trim().toString()]||xe;function be({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,a,i]=Ch({defaultProp:t,onChange:r}),l=e!==void 0,u=l?e:o;{const f=c.useRef(e!==void 0);c.useEffect(()=>{const p=f.current;p!==l&&console.warn(`${n} is changing from ${p?"controlled":"uncontrolled"} to ${l?"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.`),f.current=l},[l,n])}const d=c.useCallback(f=>{var p;if(l){const g=Sh(f)?f(e):f;g!==e&&((p=i.current)==null||p.call(i,g))}else a(f)},[l,e,a,i]);return[u,d]}function Ch({defaultProp:e,onChange:t}){const[r,n]=c.useState(e),o=c.useRef(r),a=c.useRef(t);return wh(()=>{a.current=t},[t]),c.useEffect(()=>{var i;o.current!==r&&((i=a.current)==null||i.call(a,r),o.current=r)},[r,o]),[r,n,a]}function Sh(e){return typeof e=="function"}function Go(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Fi=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"}),Rh="VisuallyHidden",Vi=c.forwardRef((e,t)=>s.jsx(X.span,{...e,ref:t,style:{...Fi,...e.style}}));Vi.displayName=Rh;var Eh=Vi,kh=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},_t=new WeakMap,Lr=new WeakMap,$r={},Xn=0,Bi=function(e){return e&&(e.host||Bi(e.parentNode))},Ph=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Bi(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Nh=function(e,t,r,n){var o=Ph(t,Array.isArray(e)?e:[e]);$r[r]||($r[r]=new WeakMap);var a=$r[r],i=[],l=new Set,u=new Set(o),d=function(p){!p||l.has(p)||(l.add(p),d(p.parentNode))};o.forEach(d);var f=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(g){if(l.has(g))f(g);else try{var m=g.getAttribute(n),v=m!==null&&m!=="false",h=(_t.get(g)||0)+1,x=(a.get(g)||0)+1;_t.set(g,h),a.set(g,x),i.push(g),h===1&&v&&Lr.set(g,!0),x===1&&g.setAttribute(r,"true"),v||g.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",g,y)}})};return f(t),l.clear(),Xn++,function(){i.forEach(function(p){var g=_t.get(p)-1,m=a.get(p)-1;_t.set(p,g),a.set(p,m),g||(Lr.has(p)||p.removeAttribute(n),Lr.delete(p)),m||p.removeAttribute(r)}),Xn--,Xn||(_t=new WeakMap,_t=new WeakMap,Lr=new WeakMap,$r={})}},bn=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=kh(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),Nh(n,o,r,"aria-hidden")):function(){return null}},ze=function(){return ze=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},ze.apply(this,arguments)};function Gi(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function jh(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var Wr="right-scroll-bar-position",zr="width-before-scroll-bar",Th="with-scroll-bars-hidden",_h="--removed-body-scroll-bar-size";function Zn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ah(e,t){var r=S.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var Ih=typeof window<"u"?c.useLayoutEffect:c.useEffect,ws=new WeakMap;function Mh(e,t){var r=Ah(null,function(n){return e.forEach(function(o){return Zn(o,n)})});return Ih(function(){var n=ws.get(r);if(n){var o=new Set(n),a=new Set(e),i=r.current;o.forEach(function(l){a.has(l)||Zn(l,null)}),a.forEach(function(l){o.has(l)||Zn(l,i)})}ws.set(r,e)},[e]),r}function Oh(e){return e}function Dh(e,t){t===void 0&&(t=Oh);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var i=t(a,n);return r.push(i),function(){r=r.filter(function(l){return l!==i})}},assignSyncMedium:function(a){for(n=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(l){return a(l)},filter:function(){return r}}},assignMedium:function(a){n=!0;var i=[];if(r.length){var l=r;r=[],l.forEach(a),i=r}var u=function(){var f=i;i=[],f.forEach(a)},d=function(){return Promise.resolve().then(u)};d(),r={push:function(f){i.push(f),d()},filter:function(f){return i=i.filter(f),r}}}};return o}function Lh(e){e===void 0&&(e={});var t=Dh(null);return t.options=ze({async:!0,ssr:!1},e),t}var Wi=function(e){var t=e.sideCar,r=Gi(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return c.createElement(n,ze({},r))};Wi.isSideCarExport=!0;function $h(e,t){return e.useMedium(t),Wi}var zi=Lh(),Jn=function(){},yn=c.forwardRef(function(e,t){var r=c.useRef(null),n=c.useState({onScrollCapture:Jn,onWheelCapture:Jn,onTouchMoveCapture:Jn}),o=n[0],a=n[1],i=e.forwardProps,l=e.children,u=e.className,d=e.removeScrollBar,f=e.enabled,p=e.shards,g=e.sideCar,m=e.noRelative,v=e.noIsolation,h=e.inert,x=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,C=e.gapMode,R=Gi(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=g,j=Mh([r,t]),T=ze(ze({},R),o);return c.createElement(c.Fragment,null,f&&c.createElement(P,{sideCar:zi,removeScrollBar:d,shards:p,noRelative:m,noIsolation:v,inert:h,setCallbacks:a,allowPinchZoom:!!x,lockRef:r,gapMode:C}),i?c.cloneElement(c.Children.only(l),ze(ze({},T),{ref:j})):c.createElement(b,ze({},T,{className:u,ref:j}),l))});yn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};yn.classNames={fullWidth:zr,zeroRight:Wr};var Fh=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Vh(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Fh();return t&&e.setAttribute("nonce",t),e}function Bh(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Gh(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Wh=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Vh())&&(Bh(t,r),Gh(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},zh=function(){var e=Wh();return function(t,r){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},qi=function(){var e=zh(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},qh={left:0,top:0,right:0,gap:0},Qn=function(e){return parseInt(e||"",10)||0},Uh=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Qn(r),Qn(n),Qn(o)]},Hh=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return qh;var t=Uh(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Kh=qi(),Vt="data-scroll-locked",Yh=function(e,t,r,n){var o=e.left,a=e.top,i=e.right,l=e.gap;return r===void 0&&(r="margin"),`
146
+ .`.concat(Th,` {
147
+ overflow: hidden `).concat(n,`;
148
+ padding-right: `).concat(l,"px ").concat(n,`;
149
+ }
150
+ body[`).concat(Vt,`] {
151
+ overflow: hidden `).concat(n,`;
152
+ overscroll-behavior: contain;
153
+ `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
154
+ padding-left: `.concat(o,`px;
155
+ padding-top: `).concat(a,`px;
156
+ padding-right: `).concat(i,`px;
157
+ margin-left:0;
158
+ margin-top:0;
159
+ margin-right: `).concat(l,"px ").concat(n,`;
160
+ `),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),`
161
+ }
162
+
163
+ .`).concat(Wr,` {
164
+ right: `).concat(l,"px ").concat(n,`;
165
+ }
166
+
167
+ .`).concat(zr,` {
168
+ margin-right: `).concat(l,"px ").concat(n,`;
169
+ }
170
+
171
+ .`).concat(Wr," .").concat(Wr,` {
172
+ right: 0 `).concat(n,`;
173
+ }
174
+
175
+ .`).concat(zr," .").concat(zr,` {
176
+ margin-right: 0 `).concat(n,`;
177
+ }
178
+
179
+ body[`).concat(Vt,`] {
180
+ `).concat(_h,": ").concat(l,`px;
181
+ }
182
+ `)},Cs=function(){var e=parseInt(document.body.getAttribute(Vt)||"0",10);return isFinite(e)?e:0},Xh=function(){c.useEffect(function(){return document.body.setAttribute(Vt,(Cs()+1).toString()),function(){var e=Cs()-1;e<=0?document.body.removeAttribute(Vt):document.body.setAttribute(Vt,e.toString())}},[])},Zh=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;Xh();var a=c.useMemo(function(){return Hh(o)},[o]);return c.createElement(Kh,{styles:Yh(a,!t,o,r?"":"!important")})},ho=!1;if(typeof window<"u")try{var Fr=Object.defineProperty({},"passive",{get:function(){return ho=!0,!0}});window.addEventListener("test",Fr,Fr),window.removeEventListener("test",Fr,Fr)}catch{ho=!1}var At=ho?{passive:!1}:!1,Jh=function(e){return e.tagName==="TEXTAREA"},Ui=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Jh(e)&&r[t]==="visible")},Qh=function(e){return Ui(e,"overflowY")},ev=function(e){return Ui(e,"overflowX")},Ss=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=Hi(e,n);if(o){var a=Ki(e,n),i=a[1],l=a[2];if(i>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},tv=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},rv=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},Hi=function(e,t){return e==="v"?Qh(t):ev(t)},Ki=function(e,t){return e==="v"?tv(t):rv(t)},nv=function(e,t){return e==="h"&&t==="rtl"?-1:1},ov=function(e,t,r,n,o){var a=nv(e,window.getComputedStyle(t).direction),i=a*n,l=r.target,u=t.contains(l),d=!1,f=i>0,p=0,g=0;do{if(!l)break;var m=Ki(e,l),v=m[0],h=m[1],x=m[2],y=h-x-a*v;(v||y)&&Hi(e,l)&&(p+=y,g+=v);var b=l.parentNode;l=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(f&&Math.abs(p)<1||!f&&Math.abs(g)<1)&&(d=!0),d},Vr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Rs=function(e){return[e.deltaX,e.deltaY]},Es=function(e){return e&&"current"in e?e.current:e},av=function(e,t){return e[0]===t[0]&&e[1]===t[1]},sv=function(e){return`
183
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
184
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
185
+ `)},iv=0,It=[];function lv(e){var t=c.useRef([]),r=c.useRef([0,0]),n=c.useRef(),o=c.useState(iv++)[0],a=c.useState(qi)[0],i=c.useRef(e);c.useEffect(function(){i.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=jh([e.lockRef.current],(e.shards||[]).map(Es),!0).filter(Boolean);return h.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=c.useCallback(function(h,x){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!i.current.allowPinchZoom;var y=Vr(h),b=r.current,C="deltaX"in h?h.deltaX:b[0]-y[0],R="deltaY"in h?h.deltaY:b[1]-y[1],P,j=h.target,T=Math.abs(C)>Math.abs(R)?"h":"v";if("touches"in h&&T==="h"&&j.type==="range")return!1;var E=Ss(T,j);if(!E)return!0;if(E?P=T:(P=T==="v"?"h":"v",E=Ss(T,j)),!E)return!1;if(!n.current&&"changedTouches"in h&&(C||R)&&(n.current=P),!P)return!0;var V=n.current||P;return ov(V,x,h,V==="h"?C:R)},[]),u=c.useCallback(function(h){var x=h;if(!(!It.length||It[It.length-1]!==a)){var y="deltaY"in x?Rs(x):Vr(x),b=t.current.filter(function(P){return P.name===x.type&&(P.target===x.target||x.target===P.shadowParent)&&av(P.delta,y)})[0];if(b&&b.should){x.cancelable&&x.preventDefault();return}if(!b){var C=(i.current.shards||[]).map(Es).filter(Boolean).filter(function(P){return P.contains(x.target)}),R=C.length>0?l(x,C[0]):!i.current.noIsolation;R&&x.cancelable&&x.preventDefault()}}},[]),d=c.useCallback(function(h,x,y,b){var C={name:h,delta:x,target:y,should:b,shadowParent:cv(y)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(R){return R!==C})},1)},[]),f=c.useCallback(function(h){r.current=Vr(h),n.current=void 0},[]),p=c.useCallback(function(h){d(h.type,Rs(h),h.target,l(h,e.lockRef.current))},[]),g=c.useCallback(function(h){d(h.type,Vr(h),h.target,l(h,e.lockRef.current))},[]);c.useEffect(function(){return It.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",u,At),document.addEventListener("touchmove",u,At),document.addEventListener("touchstart",f,At),function(){It=It.filter(function(h){return h!==a}),document.removeEventListener("wheel",u,At),document.removeEventListener("touchmove",u,At),document.removeEventListener("touchstart",f,At)}},[]);var m=e.removeScrollBar,v=e.inert;return c.createElement(c.Fragment,null,v?c.createElement(a,{styles:sv(o)}):null,m?c.createElement(Zh,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function cv(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const uv=$h(zi,lv);var Cr=c.forwardRef(function(e,t){return c.createElement(yn,ze({},e,{ref:t,sideCar:uv}))});Cr.classNames=yn.classNames;var dv=[" ","Enter","ArrowUp","ArrowDown"],fv=[" ","Enter"],wt="Select",[wn,Cn,pv]=dn(wt),[Zt,Z1]=ye(wt,[pv,ut]),Sn=ut(),[mv,dt]=Zt(wt),[gv,hv]=Zt(wt),Yi=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:o,onOpenChange:a,value:i,defaultValue:l,onValueChange:u,dir:d,name:f,autoComplete:p,disabled:g,required:m,form:v}=e,h=Sn(t),[x,y]=c.useState(null),[b,C]=c.useState(null),[R,P]=c.useState(!1),j=Ut(d),[T,E]=be({prop:n,defaultProp:o??!1,onChange:a,caller:wt}),[V,U]=be({prop:i,defaultProp:l,onChange:u,caller:wt}),re=c.useRef(null),te=x?v||!!x.closest("form"):!0,[J,q]=c.useState(new Set),D=Array.from(J).map(A=>A.props.value).join(";");return s.jsx(yr,{...h,children:s.jsxs(mv,{required:m,scope:t,trigger:x,onTriggerChange:y,valueNode:b,onValueNodeChange:C,valueNodeHasChildren:R,onValueNodeHasChildrenChange:P,contentId:me(),value:V,onValueChange:U,open:T,onOpenChange:E,dir:j,triggerPointerDownPosRef:re,disabled:g,children:[s.jsx(wn.Provider,{scope:t,children:s.jsx(gv,{scope:e.__scopeSelect,onNativeOptionAdd:c.useCallback(A=>{q($=>new Set($).add(A))},[]),onNativeOptionRemove:c.useCallback(A=>{q($=>{const k=new Set($);return k.delete(A),k})},[]),children:r})}),te?s.jsxs(yl,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:p,value:V,onChange:A=>U(A.target.value),disabled:g,form:v,children:[V===void 0?s.jsx("option",{value:""}):null,Array.from(J)]},D):null]})})};Yi.displayName=wt;var Xi="SelectTrigger",Zi=c.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...o}=e,a=Sn(r),i=dt(Xi,r),l=i.disabled||n,u=se(t,i.onTriggerChange),d=Cn(r),f=c.useRef("touch"),[p,g,m]=Cl(h=>{const x=d().filter(C=>!C.disabled),y=x.find(C=>C.value===i.value),b=Sl(x,h,y);b!==void 0&&i.onValueChange(b.value)}),v=h=>{l||(i.onOpenChange(!0),m()),h&&(i.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return s.jsx(wr,{asChild:!0,...a,children:s.jsx(X.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":wl(i.value)?"":void 0,...o,ref:u,onClick:F(o.onClick,h=>{h.currentTarget.focus(),f.current!=="mouse"&&v(h)}),onPointerDown:F(o.onPointerDown,h=>{f.current=h.pointerType;const x=h.target;x.hasPointerCapture(h.pointerId)&&x.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(v(h),h.preventDefault())}),onKeyDown:F(o.onKeyDown,h=>{const x=p.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&g(h.key),!(x&&h.key===" ")&&dv.includes(h.key)&&(v(),h.preventDefault())})})})});Zi.displayName=Xi;var Ji="SelectValue",Qi=c.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:a,placeholder:i="",...l}=e,u=dt(Ji,r),{onValueNodeHasChildrenChange:d}=u,f=a!==void 0,p=se(t,u.onValueNodeChange);return xe(()=>{d(f)},[d,f]),s.jsx(X.span,{...l,ref:p,style:{pointerEvents:"none"},children:wl(u.value)?s.jsx(s.Fragment,{children:i}):a})});Qi.displayName=Ji;var vv="SelectIcon",el=c.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return s.jsx(X.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})});el.displayName=vv;var xv="SelectPortal",tl=e=>s.jsx(Xt,{asChild:!0,...e});tl.displayName=xv;var Ct="SelectContent",rl=c.forwardRef((e,t)=>{const r=dt(Ct,e.__scopeSelect),[n,o]=c.useState();if(xe(()=>{o(new DocumentFragment)},[]),!r.open){const a=n;return a?sn.createPortal(s.jsx(nl,{scope:e.__scopeSelect,children:s.jsx(wn.Slot,{scope:e.__scopeSelect,children:s.jsx("div",{children:e.children})})}),a):null}return s.jsx(ol,{...e,ref:t})});rl.displayName=Ct;var Me=10,[nl,ft]=Zt(Ct),bv="SelectContentImpl",yv=st("SelectContent.RemoveScroll"),ol=c.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:l,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:g,collisionPadding:m,sticky:v,hideWhenDetached:h,avoidCollisions:x,...y}=e,b=dt(Ct,r),[C,R]=c.useState(null),[P,j]=c.useState(null),T=se(t,I=>R(I)),[E,V]=c.useState(null),[U,re]=c.useState(null),te=Cn(r),[J,q]=c.useState(!1),D=c.useRef(!1);c.useEffect(()=>{if(C)return bn(C)},[C]),fn();const A=c.useCallback(I=>{const[Z,...ee]=te().map(ie=>ie.ref.current),[oe]=ee.slice(-1),ce=document.activeElement;for(const ie of I)if(ie===ce||(ie==null||ie.scrollIntoView({block:"nearest"}),ie===Z&&P&&(P.scrollTop=0),ie===oe&&P&&(P.scrollTop=P.scrollHeight),ie==null||ie.focus(),document.activeElement!==ce))return},[te,P]),$=c.useCallback(()=>A([E,C]),[A,E,C]);c.useEffect(()=>{J&&$()},[J,$]);const{onOpenChange:k,triggerPointerDownPosRef:O}=b;c.useEffect(()=>{if(C){let I={x:0,y:0};const Z=oe=>{var ce,ie;I={x:Math.abs(Math.round(oe.pageX)-(((ce=O.current)==null?void 0:ce.x)??0)),y:Math.abs(Math.round(oe.pageY)-(((ie=O.current)==null?void 0:ie.y)??0))}},ee=oe=>{I.x<=10&&I.y<=10?oe.preventDefault():C.contains(oe.target)||k(!1),document.removeEventListener("pointermove",Z),O.current=null};return O.current!==null&&(document.addEventListener("pointermove",Z),document.addEventListener("pointerup",ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",ee,{capture:!0})}}},[C,k,O]),c.useEffect(()=>{const I=()=>k(!1);return window.addEventListener("blur",I),window.addEventListener("resize",I),()=>{window.removeEventListener("blur",I),window.removeEventListener("resize",I)}},[k]);const[W,Q]=Cl(I=>{const Z=te().filter(ce=>!ce.disabled),ee=Z.find(ce=>ce.ref.current===document.activeElement),oe=Sl(Z,I,ee);oe&&setTimeout(()=>oe.ref.current.focus())}),N=c.useCallback((I,Z,ee)=>{const oe=!D.current&&!ee;(b.value!==void 0&&b.value===Z||oe)&&(V(I),oe&&(D.current=!0))},[b.value]),B=c.useCallback(()=>C==null?void 0:C.focus(),[C]),Y=c.useCallback((I,Z,ee)=>{const oe=!D.current&&!ee;(b.value!==void 0&&b.value===Z||oe)&&re(I)},[b.value]),M=n==="popper"?vo:al,G=M===vo?{side:l,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:g,collisionPadding:m,sticky:v,hideWhenDetached:h,avoidCollisions:x}:{};return s.jsx(nl,{scope:r,content:C,viewport:P,onViewportChange:j,itemRefCallback:N,selectedItem:E,onItemLeave:B,itemTextRefCallback:Y,focusSelectedItem:$,selectedItemText:U,position:n,isPositioned:J,searchRef:W,children:s.jsx(Cr,{as:yv,allowPinchZoom:!0,children:s.jsx(xr,{asChild:!0,trapped:b.open,onMountAutoFocus:I=>{I.preventDefault()},onUnmountAutoFocus:F(o,I=>{var Z;(Z=b.trigger)==null||Z.focus({preventScroll:!0}),I.preventDefault()}),children:s.jsx(Ht,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:I=>I.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:s.jsx(M,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:I=>I.preventDefault(),...y,...G,onPlaced:()=>q(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:F(y.onKeyDown,I=>{const Z=I.ctrlKey||I.altKey||I.metaKey;if(I.key==="Tab"&&I.preventDefault(),!Z&&I.key.length===1&&Q(I.key),["ArrowUp","ArrowDown","Home","End"].includes(I.key)){let oe=te().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);if(["ArrowUp","End"].includes(I.key)&&(oe=oe.slice().reverse()),["ArrowUp","ArrowDown"].includes(I.key)){const ce=I.target,ie=oe.indexOf(ce);oe=oe.slice(ie+1)}setTimeout(()=>A(oe)),I.preventDefault()}})})})})})})});ol.displayName=bv;var wv="SelectItemAlignedPosition",al=c.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...o}=e,a=dt(Ct,r),i=ft(Ct,r),[l,u]=c.useState(null),[d,f]=c.useState(null),p=se(t,T=>f(T)),g=Cn(r),m=c.useRef(!1),v=c.useRef(!0),{viewport:h,selectedItem:x,selectedItemText:y,focusSelectedItem:b}=i,C=c.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&d&&h&&x&&y){const T=a.trigger.getBoundingClientRect(),E=d.getBoundingClientRect(),V=a.valueNode.getBoundingClientRect(),U=y.getBoundingClientRect();if(a.dir!=="rtl"){const ce=U.left-E.left,ie=V.left-ce,Ce=T.left-ie,je=T.width+Ce,Be=Math.max(je,E.width),Ie=window.innerWidth-Me,nt=ts(ie,[Me,Math.max(Me,Ie-Be)]);l.style.minWidth=je+"px",l.style.left=nt+"px"}else{const ce=E.right-U.right,ie=window.innerWidth-V.right-ce,Ce=window.innerWidth-T.right-ie,je=T.width+Ce,Be=Math.max(je,E.width),Ie=window.innerWidth-Me,nt=ts(ie,[Me,Math.max(Me,Ie-Be)]);l.style.minWidth=je+"px",l.style.right=nt+"px"}const re=g(),te=window.innerHeight-Me*2,J=h.scrollHeight,q=window.getComputedStyle(d),D=parseInt(q.borderTopWidth,10),A=parseInt(q.paddingTop,10),$=parseInt(q.borderBottomWidth,10),k=parseInt(q.paddingBottom,10),O=D+A+J+k+$,W=Math.min(x.offsetHeight*5,O),Q=window.getComputedStyle(h),N=parseInt(Q.paddingTop,10),B=parseInt(Q.paddingBottom,10),Y=T.top+T.height/2-Me,M=te-Y,G=x.offsetHeight/2,I=x.offsetTop+G,Z=D+A+I,ee=O-Z;if(Z<=Y){const ce=re.length>0&&x===re[re.length-1].ref.current;l.style.bottom="0px";const ie=d.clientHeight-h.offsetTop-h.offsetHeight,Ce=Math.max(M,G+(ce?B:0)+ie+$),je=Z+Ce;l.style.height=je+"px"}else{const ce=re.length>0&&x===re[0].ref.current;l.style.top="0px";const Ce=Math.max(Y,D+h.offsetTop+(ce?N:0)+G)+ee;l.style.height=Ce+"px",h.scrollTop=Z-Y+h.offsetTop}l.style.margin=`${Me}px 0`,l.style.minHeight=W+"px",l.style.maxHeight=te+"px",n==null||n(),requestAnimationFrame(()=>m.current=!0)}},[g,a.trigger,a.valueNode,l,d,h,x,y,a.dir,n]);xe(()=>C(),[C]);const[R,P]=c.useState();xe(()=>{d&&P(window.getComputedStyle(d).zIndex)},[d]);const j=c.useCallback(T=>{T&&v.current===!0&&(C(),b==null||b(),v.current=!1)},[C,b]);return s.jsx(Sv,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:j,children:s.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:s.jsx(X.div,{...o,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});al.displayName=wv;var Cv="SelectPopperPosition",vo=c.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=Me,...a}=e,i=Sn(r);return s.jsx(vn,{...i,...a,ref:t,align:n,collisionPadding:o,style:{boxSizing:"border-box",...a.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)"}})});vo.displayName=Cv;var[Sv,Wo]=Zt(Ct,{}),xo="SelectViewport",sl=c.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...o}=e,a=ft(xo,r),i=Wo(xo,r),l=se(t,a.onViewportChange),u=c.useRef(0);return s.jsxs(s.Fragment,{children:[s.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:n}),s.jsx(wn.Slot,{scope:r,children:s.jsx(X.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:F(o.onScroll,d=>{const f=d.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:g}=i;if(g!=null&&g.current&&p){const m=Math.abs(u.current-f.scrollTop);if(m>0){const v=window.innerHeight-Me*2,h=parseFloat(p.style.minHeight),x=parseFloat(p.style.height),y=Math.max(h,x);if(y<v){const b=y+m,C=Math.min(v,b),R=b-C;p.style.height=C+"px",p.style.bottom==="0px"&&(f.scrollTop=R>0?R:0,p.style.justifyContent="flex-end")}}}u.current=f.scrollTop})})})]})});sl.displayName=xo;var il="SelectGroup",[Rv,Ev]=Zt(il),ll=c.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=me();return s.jsx(Rv,{scope:r,id:o,children:s.jsx(X.div,{role:"group","aria-labelledby":o,...n,ref:t})})});ll.displayName=il;var cl="SelectLabel",ul=c.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Ev(cl,r);return s.jsx(X.div,{id:o.id,...n,ref:t})});ul.displayName=cl;var Xr="SelectItem",[kv,dl]=Zt(Xr),fl=c.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:o=!1,textValue:a,...i}=e,l=dt(Xr,r),u=ft(Xr,r),d=l.value===n,[f,p]=c.useState(a??""),[g,m]=c.useState(!1),v=se(t,b=>{var C;return(C=u.itemRefCallback)==null?void 0:C.call(u,b,n,o)}),h=me(),x=c.useRef("touch"),y=()=>{o||(l.onValueChange(n),l.onOpenChange(!1))};if(n==="")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 s.jsx(kv,{scope:r,value:n,disabled:o,textId:h,isSelected:d,onItemTextChange:c.useCallback(b=>{p(C=>C||((b==null?void 0:b.textContent)??"").trim())},[]),children:s.jsx(wn.ItemSlot,{scope:r,value:n,disabled:o,textValue:f,children:s.jsx(X.div,{role:"option","aria-labelledby":h,"data-highlighted":g?"":void 0,"aria-selected":d&&g,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:v,onFocus:F(i.onFocus,()=>m(!0)),onBlur:F(i.onBlur,()=>m(!1)),onClick:F(i.onClick,()=>{x.current!=="mouse"&&y()}),onPointerUp:F(i.onPointerUp,()=>{x.current==="mouse"&&y()}),onPointerDown:F(i.onPointerDown,b=>{x.current=b.pointerType}),onPointerMove:F(i.onPointerMove,b=>{var C;x.current=b.pointerType,o?(C=u.onItemLeave)==null||C.call(u):x.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:F(i.onPointerLeave,b=>{var C;b.currentTarget===document.activeElement&&((C=u.onItemLeave)==null||C.call(u))}),onKeyDown:F(i.onKeyDown,b=>{var R;((R=u.searchRef)==null?void 0:R.current)!==""&&b.key===" "||(fv.includes(b.key)&&y(),b.key===" "&&b.preventDefault())})})})})});fl.displayName=Xr;var ar="SelectItemText",pl=c.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,...a}=e,i=dt(ar,r),l=ft(ar,r),u=dl(ar,r),d=hv(ar,r),[f,p]=c.useState(null),g=se(t,y=>p(y),u.onItemTextChange,y=>{var b;return(b=l.itemTextRefCallback)==null?void 0:b.call(l,y,u.value,u.disabled)}),m=f==null?void 0:f.textContent,v=c.useMemo(()=>s.jsx("option",{value:u.value,disabled:u.disabled,children:m},u.value),[u.disabled,u.value,m]),{onNativeOptionAdd:h,onNativeOptionRemove:x}=d;return xe(()=>(h(v),()=>x(v)),[h,x,v]),s.jsxs(s.Fragment,{children:[s.jsx(X.span,{id:u.textId,...a,ref:g}),u.isSelected&&i.valueNode&&!i.valueNodeHasChildren?sn.createPortal(a.children,i.valueNode):null]})});pl.displayName=ar;var ml="SelectItemIndicator",gl=c.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return dl(ml,r).isSelected?s.jsx(X.span,{"aria-hidden":!0,...n,ref:t}):null});gl.displayName=ml;var bo="SelectScrollUpButton",hl=c.forwardRef((e,t)=>{const r=ft(bo,e.__scopeSelect),n=Wo(bo,e.__scopeSelect),[o,a]=c.useState(!1),i=se(t,n.onScrollButtonChange);return xe(()=>{if(r.viewport&&r.isPositioned){let l=function(){const d=u.scrollTop>0;a(d)};const u=r.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),o?s.jsx(xl,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:u}=r;l&&u&&(l.scrollTop=l.scrollTop-u.offsetHeight)}}):null});hl.displayName=bo;var yo="SelectScrollDownButton",vl=c.forwardRef((e,t)=>{const r=ft(yo,e.__scopeSelect),n=Wo(yo,e.__scopeSelect),[o,a]=c.useState(!1),i=se(t,n.onScrollButtonChange);return xe(()=>{if(r.viewport&&r.isPositioned){let l=function(){const d=u.scrollHeight-u.clientHeight,f=Math.ceil(u.scrollTop)<d;a(f)};const u=r.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),o?s.jsx(xl,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:u}=r;l&&u&&(l.scrollTop=l.scrollTop+u.offsetHeight)}}):null});vl.displayName=yo;var xl=c.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...o}=e,a=ft("SelectScrollButton",r),i=c.useRef(null),l=Cn(r),u=c.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return c.useEffect(()=>()=>u(),[u]),xe(()=>{var f;const d=l().find(p=>p.ref.current===document.activeElement);(f=d==null?void 0:d.ref.current)==null||f.scrollIntoView({block:"nearest"})},[l]),s.jsx(X.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:F(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(n,50))}),onPointerMove:F(o.onPointerMove,()=>{var d;(d=a.onItemLeave)==null||d.call(a),i.current===null&&(i.current=window.setInterval(n,50))}),onPointerLeave:F(o.onPointerLeave,()=>{u()})})}),Pv="SelectSeparator",bl=c.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return s.jsx(X.div,{"aria-hidden":!0,...n,ref:t})});bl.displayName=Pv;var wo="SelectArrow",Nv=c.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Sn(r),a=dt(wo,r),i=ft(wo,r);return a.open&&i.position==="popper"?s.jsx(xn,{...o,...n,ref:t}):null});Nv.displayName=wo;var jv="SelectBubbleInput",yl=c.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const o=c.useRef(null),a=se(n,o),i=Go(t);return c.useEffect(()=>{const l=o.current;if(!l)return;const u=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(u,"value").set;if(i!==t&&f){const p=new Event("change",{bubbles:!0});f.call(l,t),l.dispatchEvent(p)}},[i,t]),s.jsx(X.select,{...r,style:{...Fi,...r.style},ref:a,defaultValue:t})});yl.displayName=jv;function wl(e){return e===""||e===void 0}function Cl(e){const t=Oe(e),r=c.useRef(""),n=c.useRef(0),o=c.useCallback(i=>{const l=r.current+i;t(l),(function u(d){r.current=d,window.clearTimeout(n.current),d!==""&&(n.current=window.setTimeout(()=>u(""),1e3))})(l)},[t]),a=c.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,a]}function Sl(e,t,r){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let i=Tv(e,Math.max(a,0));o.length===1&&(i=i.filter(d=>d!==r));const u=i.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return u!==r?u:void 0}function Tv(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var _v=Yi,Rl=Zi,Av=Qi,Iv=el,Mv=tl,El=rl,Ov=sl,Dv=ll,kl=ul,Pl=fl,Lv=pl,$v=gl,Nl=hl,jl=vl,Tl=bl;const _l=_v,Fv=Dv,Al=Av,zo=c.forwardRef(({className:e,children:t,readOnly:r,...n},o)=>{const a=i=>{r&&i.preventDefault()};return s.jsxs(Rl,{ref:o,"data-readonly":r||void 0,disabled:n.disabled,onPointerDown:n.disabled?n.onPointerDown:a,tabIndex:r?0:void 0,className:_(_("qodo qodo-select-trigger flex h-9 w-full min-w-0 items-center justify-between","rounded-md border bg-purple-muted-700 border-purple-muted-500","text-sm data-[placeholder]:text-muted-foreground [&:not([data-placeholder])]:text-purple-muted-300 md:text-sm selection:bg-primary selection:text-primary-foreground","px-3 py-1","shadow-xs transition-[color,box-shadow] outline-none focus-visible:!ring-ring/50 focus-visible:!ring-[3px]","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40","disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-purple-muted-700 disabled:border-purple-muted-500 disabled:text-purple-muted-400","data-[readonly]:opacity-100 data-[readonly]:bg-purple-muted-700 data-[readonly]:border-purple-muted-400 data-[readonly]:cursor-default data-[readonly]:text-purple-muted-200",e)),...n,children:[s.jsx("div",{className:"overflow-hidden whitespace-nowrap text-ellipsis",children:t}),s.jsx(Iv,{asChild:!0,children:s.jsx(Ao,{className:"h-4 w-4 text-purple-muted-300"})})]})});zo.displayName=Rl.displayName;const qo=c.forwardRef(({className:e,...t},r)=>s.jsx(Nl,{ref:r,className:_("qodo qodo-select-scroll-up-button flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(am,{className:"h-4 w-4"})}));qo.displayName=Nl.displayName;const Uo=c.forwardRef(({className:e,...t},r)=>s.jsx(jl,{ref:r,className:_("qodo qodo-select-scroll-down-button flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(Ao,{className:"h-4 w-4"})}));Uo.displayName=jl.displayName;const Ho=c.forwardRef(({className:e,children:t,position:r="popper",container:n=null,...o},a)=>s.jsx(Mv,{container:n,children:s.jsxs(El,{ref:a,className:_("qodo qodo-select-content relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-purple-muted-600 border-purple-muted-500 text-purple-muted-300 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...o,children:[s.jsx(qo,{}),s.jsx(Ov,{className:_("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-[var(--radix-select-trigger-width)]"),children:t}),s.jsx(Uo,{})]})}));Ho.displayName=El.displayName;const Il=c.forwardRef(({className:e,...t},r)=>s.jsx(kl,{ref:r,className:_("qodo qodo-select-label py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Il.displayName=kl.displayName;const Ko=c.forwardRef(({className:e,children:t,...r},n)=>s.jsxs(Pl,{ref:n,title:r.value,className:_(_("qodo qodo-select-item relative w-full cursor-default select-none rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none","focus:bg-purple-muted-500 focus:text-purple-100 text-purple-100","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","block overflow-hidden whitespace-nowrap text-ellipsis"),e),...r,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 mt-0.5",children:s.jsx($v,{children:s.jsx(cn,{className:"h-4 w-4"})})}),s.jsx(Lv,{children:t})]}));Ko.displayName=Pl.displayName;const Ml=c.forwardRef(({className:e,...t},r)=>s.jsx(Tl,{ref:r,className:_("qodo qodo-select-separator -mx-1 my-1 h-px bg-muted",e),...t}));Ml.displayName=Tl.displayName;var ks=1,Vv=.9,Bv=.8,Gv=.17,eo=.1,to=.999,Wv=.9999,zv=.99,qv=/[\\\/_+.#"@\[\(\{&]/,Uv=/[\\\/_+.#"@\[\(\{&]/g,Hv=/[\s-]/,Ol=/[\s-]/g;function Co(e,t,r,n,o,a,i){if(a===t.length)return o===e.length?ks:zv;var l=`${o},${a}`;if(i[l]!==void 0)return i[l];for(var u=n.charAt(a),d=r.indexOf(u,o),f=0,p,g,m,v;d>=0;)p=Co(e,t,r,n,d+1,a+1,i),p>f&&(d===o?p*=ks:qv.test(e.charAt(d-1))?(p*=Bv,m=e.slice(o,d-1).match(Uv),m&&o>0&&(p*=Math.pow(to,m.length))):Hv.test(e.charAt(d-1))?(p*=Vv,v=e.slice(o,d-1).match(Ol),v&&o>0&&(p*=Math.pow(to,v.length))):(p*=Gv,o>0&&(p*=Math.pow(to,d-o))),e.charAt(d)!==t.charAt(a)&&(p*=Wv)),(p<eo&&r.charAt(d-1)===n.charAt(a+1)||n.charAt(a+1)===n.charAt(a)&&r.charAt(d-1)!==n.charAt(a))&&(g=Co(e,t,r,n,d+1,a+2,i),g*eo>p&&(p=g*eo)),p>f&&(f=p),d=r.indexOf(u,d+1);return i[l]=f,f}function Ps(e){return e.toLowerCase().replace(Ol," ")}function Kv(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,Co(e,t,Ps(e),Ps(t),0,0,{})}function Yv(e,t){return c.useReducer((r,n)=>t[r][n]??r,e)}var ke=e=>{const{present:t,children:r}=e,n=Xv(t),o=typeof r=="function"?r({present:n.isPresent}):c.Children.only(r),a=se(n.ref,Zv(o));return typeof r=="function"||n.isPresent?c.cloneElement(o,{ref:a}):null};ke.displayName="Presence";function Xv(e){const[t,r]=c.useState(),n=c.useRef(null),o=c.useRef(e),a=c.useRef("none"),i=e?"mounted":"unmounted",[l,u]=Yv(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const d=Br(n.current);a.current=l==="mounted"?d:"none"},[l]),xe(()=>{const d=n.current,f=o.current;if(f!==e){const g=a.current,m=Br(d);e?u("MOUNT"):m==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(f&&g!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),xe(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,p=m=>{const h=Br(n.current).includes(CSS.escape(m.animationName));if(m.target===t&&h&&(u("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},g=m=>{m.target===t&&(a.current=Br(n.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:c.useCallback(d=>{n.current=d?getComputedStyle(d):null,r(d)},[])}}function Br(e){return(e==null?void 0:e.animationName)||"none"}function Zv(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Rn="Dialog",[Dl,J1]=ye(Rn),[Jv,$e]=Dl(Rn),Ll=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,l=c.useRef(null),u=c.useRef(null),[d,f]=be({prop:n,defaultProp:o??!1,onChange:a,caller:Rn});return s.jsx(Jv,{scope:t,triggerRef:l,contentRef:u,contentId:me(),titleId:me(),descriptionId:me(),open:d,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(p=>!p),[f]),modal:i,children:r})};Ll.displayName=Rn;var $l="DialogTrigger",Fl=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=$e($l,r),a=se(t,o.triggerRef);return s.jsx(X.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Zo(o.open),...n,ref:a,onClick:F(e.onClick,o.onOpenToggle)})});Fl.displayName=$l;var Yo="DialogPortal",[Qv,Vl]=Dl(Yo,{forceMount:void 0}),Bl=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,a=$e(Yo,t);return s.jsx(Qv,{scope:t,forceMount:r,children:c.Children.map(n,i=>s.jsx(ke,{present:r||a.open,children:s.jsx(Xt,{asChild:!0,container:o,children:i})}))})};Bl.displayName=Yo;var Zr="DialogOverlay",Gl=c.forwardRef((e,t)=>{const r=Vl(Zr,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=$e(Zr,e.__scopeDialog);return a.modal?s.jsx(ke,{present:n||a.open,children:s.jsx(tx,{...o,ref:t})}):null});Gl.displayName=Zr;var ex=st("DialogOverlay.RemoveScroll"),tx=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=$e(Zr,r);return s.jsx(Cr,{as:ex,allowPinchZoom:!0,shards:[o.contentRef],children:s.jsx(X.div,{"data-state":Zo(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),St="DialogContent",Wl=c.forwardRef((e,t)=>{const r=Vl(St,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=$e(St,e.__scopeDialog);return s.jsx(ke,{present:n||a.open,children:a.modal?s.jsx(rx,{...o,ref:t}):s.jsx(nx,{...o,ref:t})})});Wl.displayName=St;var rx=c.forwardRef((e,t)=>{const r=$e(St,e.__scopeDialog),n=c.useRef(null),o=se(t,r.contentRef,n);return c.useEffect(()=>{const a=n.current;if(a)return bn(a)},[]),s.jsx(zl,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:F(e.onCloseAutoFocus,a=>{var i;a.preventDefault(),(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:F(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0;(i.button===2||l)&&a.preventDefault()}),onFocusOutside:F(e.onFocusOutside,a=>a.preventDefault())})}),nx=c.forwardRef((e,t)=>{const r=$e(St,e.__scopeDialog),n=c.useRef(!1),o=c.useRef(!1);return s.jsx(zl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,l;(i=e.onCloseAutoFocus)==null||i.call(e,a),a.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var u,d;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;((d=r.triggerRef.current)==null?void 0:d.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),zl=c.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,l=$e(St,r),u=c.useRef(null),d=se(t,u);return fn(),s.jsxs(s.Fragment,{children:[s.jsx(xr,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:s.jsx(Ht,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Zo(l.open),...i,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),s.jsxs(s.Fragment,{children:[s.jsx(ox,{titleId:l.titleId}),s.jsx(sx,{contentRef:u,descriptionId:l.descriptionId})]})]})}),Xo="DialogTitle",ql=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=$e(Xo,r);return s.jsx(X.h2,{id:o.titleId,...n,ref:t})});ql.displayName=Xo;var Ul="DialogDescription",Hl=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=$e(Ul,r);return s.jsx(X.p,{id:o.descriptionId,...n,ref:t})});Hl.displayName=Ul;var Kl="DialogClose",Yl=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=$e(Kl,r);return s.jsx(X.button,{type:"button",...n,ref:t,onClick:F(e.onClick,()=>o.onOpenChange(!1))})});Yl.displayName=Kl;function Zo(e){return e?"open":"closed"}var Xl="DialogTitleWarning",[Q1,Zl]=jm(Xl,{contentName:St,titleName:Xo,docsSlug:"dialog"}),ox=({titleId:e})=>{const t=Zl(Xl),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
186
186
 
187
187
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
188
188
 
189
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},ax="DialogDescriptionWarning",sx=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Xl(ax).contentName}}.`;return c.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Zl=Dl,ix=$l,Jl=Vl,Ql=Bl,ec=Gl,lx=zl,cx=Ul,tc=Kl,or='[cmdk-group=""]',ro='[cmdk-group-items=""]',ux='[cmdk-group-heading=""]',rc='[cmdk-item=""]',Ns=`${rc}:not([aria-disabled="true"])`,So="cmdk-item-select",Ot="data-value",dx=(e,t,r)=>Kv(e,t,r),nc=c.createContext(void 0),Sr=()=>c.useContext(nc),oc=c.createContext(void 0),Jo=()=>c.useContext(oc),ac=c.createContext(void 0),sc=c.forwardRef((e,t)=>{let r=Dt(()=>{var N,B;return{search:"",value:(B=(N=e.value)!=null?N:e.defaultValue)!=null?B:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=Dt(()=>new Set),o=Dt(()=>new Map),a=Dt(()=>new Map),i=Dt(()=>new Set),l=ic(e),{label:u,children:d,value:f,onValueChange:p,filter:g,shouldFilter:m,loop:v,disablePointerSelection:h=!1,vimBindings:x=!0,...y}=e,b=me(),C=me(),R=me(),P=c.useRef(null),j=Cx();Rt(()=>{if(f!==void 0){let N=f.trim();r.current.value=N,T.emit()}},[f]),Rt(()=>{j(6,J)},[]);let T=c.useMemo(()=>({subscribe:N=>(i.current.add(N),()=>i.current.delete(N)),snapshot:()=>r.current,setState:(N,B,Y)=>{var M,G,I,Z;if(!Object.is(r.current[N],B)){if(r.current[N]=B,N==="search")te(),U(),j(1,re);else if(N==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ee=document.getElementById(R);ee?ee.focus():(M=document.getElementById(b))==null||M.focus()}if(j(7,()=>{var ee;r.current.selectedItemId=(ee=q())==null?void 0:ee.id,T.emit()}),Y||j(5,J),((G=l.current)==null?void 0:G.value)!==void 0){let ee=B??"";(Z=(I=l.current).onValueChange)==null||Z.call(I,ee);return}}T.emit()}},emit:()=>{i.current.forEach(N=>N())}}),[]),E=c.useMemo(()=>({value:(N,B,Y)=>{var M;B!==((M=a.current.get(N))==null?void 0:M.value)&&(a.current.set(N,{value:B,keywords:Y}),r.current.filtered.items.set(N,V(B,Y)),j(2,()=>{U(),T.emit()}))},item:(N,B)=>(n.current.add(N),B&&(o.current.has(B)?o.current.get(B).add(N):o.current.set(B,new Set([N]))),j(3,()=>{te(),U(),r.current.value||re(),T.emit()}),()=>{a.current.delete(N),n.current.delete(N),r.current.filtered.items.delete(N);let Y=q();j(4,()=>{te(),(Y==null?void 0:Y.getAttribute("id"))===N&&re(),T.emit()})}),group:N=>(o.current.has(N)||o.current.set(N,new Set),()=>{a.current.delete(N),o.current.delete(N)}),filter:()=>l.current.shouldFilter,label:u||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:b,inputId:R,labelId:C,listInnerRef:P}),[]);function V(N,B){var Y,M;let G=(M=(Y=l.current)==null?void 0:Y.filter)!=null?M:dx;return N?G(N,r.current.search,B):0}function U(){if(!r.current.search||l.current.shouldFilter===!1)return;let N=r.current.filtered.items,B=[];r.current.filtered.groups.forEach(M=>{let G=o.current.get(M),I=0;G.forEach(Z=>{let ee=N.get(Z);I=Math.max(ee,I)}),B.push([M,I])});let Y=P.current;D().sort((M,G)=>{var I,Z;let ee=M.getAttribute("id"),oe=G.getAttribute("id");return((I=N.get(oe))!=null?I:0)-((Z=N.get(ee))!=null?Z:0)}).forEach(M=>{let G=M.closest(ro);G?G.appendChild(M.parentElement===G?M:M.closest(`${ro} > *`)):Y.appendChild(M.parentElement===Y?M:M.closest(`${ro} > *`))}),B.sort((M,G)=>G[1]-M[1]).forEach(M=>{var G;let I=(G=P.current)==null?void 0:G.querySelector(`${or}[${Ot}="${encodeURIComponent(M[0])}"]`);I==null||I.parentElement.appendChild(I)})}function re(){let N=D().find(Y=>Y.getAttribute("aria-disabled")!=="true"),B=N==null?void 0:N.getAttribute(Ot);T.setState("value",B||void 0)}function te(){var N,B,Y,M;if(!r.current.search||l.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let G=0;for(let I of n.current){let Z=(B=(N=a.current.get(I))==null?void 0:N.value)!=null?B:"",ee=(M=(Y=a.current.get(I))==null?void 0:Y.keywords)!=null?M:[],oe=V(Z,ee);r.current.filtered.items.set(I,oe),oe>0&&G++}for(let[I,Z]of o.current)for(let ee of Z)if(r.current.filtered.items.get(ee)>0){r.current.filtered.groups.add(I);break}r.current.filtered.count=G}function J(){var N,B,Y;let M=q();M&&(((N=M.parentElement)==null?void 0:N.firstChild)===M&&((Y=(B=M.closest(or))==null?void 0:B.querySelector(ux))==null||Y.scrollIntoView({block:"nearest"})),M.scrollIntoView({block:"nearest"}))}function q(){var N;return(N=P.current)==null?void 0:N.querySelector(`${rc}[aria-selected="true"]`)}function D(){var N;return Array.from(((N=P.current)==null?void 0:N.querySelectorAll(Ns))||[])}function A(N){let B=D()[N];B&&T.setState("value",B.getAttribute(Ot))}function $(N){var B;let Y=q(),M=D(),G=M.findIndex(Z=>Z===Y),I=M[G+N];(B=l.current)!=null&&B.loop&&(I=G+N<0?M[M.length-1]:G+N===M.length?M[0]:M[G+N]),I&&T.setState("value",I.getAttribute(Ot))}function k(N){let B=q(),Y=B==null?void 0:B.closest(or),M;for(;Y&&!M;)Y=N>0?yx(Y,or):wx(Y,or),M=Y==null?void 0:Y.querySelector(Ns);M?T.setState("value",M.getAttribute(Ot)):$(N)}let O=()=>A(D().length-1),W=N=>{N.preventDefault(),N.metaKey?O():N.altKey?k(1):$(1)},Q=N=>{N.preventDefault(),N.metaKey?A(0):N.altKey?k(-1):$(-1)};return c.createElement(X.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:N=>{var B;(B=y.onKeyDown)==null||B.call(y,N);let Y=N.nativeEvent.isComposing||N.keyCode===229;if(!(N.defaultPrevented||Y))switch(N.key){case"n":case"j":{x&&N.ctrlKey&&W(N);break}case"ArrowDown":{W(N);break}case"p":case"k":{x&&N.ctrlKey&&Q(N);break}case"ArrowUp":{Q(N);break}case"Home":{N.preventDefault(),A(0);break}case"End":{N.preventDefault(),O();break}case"Enter":{N.preventDefault();let M=q();if(M){let G=new Event(So);M.dispatchEvent(G)}}}}},c.createElement("label",{"cmdk-label":"",htmlFor:E.inputId,id:E.labelId,style:Rx},u),En(e,N=>c.createElement(oc.Provider,{value:T},c.createElement(nc.Provider,{value:E},N))))}),fx=c.forwardRef((e,t)=>{var r,n;let o=me(),a=c.useRef(null),i=c.useContext(ac),l=Sr(),u=ic(e),d=(n=(r=u.current)==null?void 0:r.forceMount)!=null?n:i==null?void 0:i.forceMount;Rt(()=>{if(!d)return l.item(o,i==null?void 0:i.id)},[d]);let f=lc(o,a,[e.value,e.children,a],e.keywords),p=Jo(),g=ct(j=>j.value&&j.value===f.current),m=ct(j=>d||l.filter()===!1?!0:j.search?j.filtered.items.get(o)>0:!0);c.useEffect(()=>{let j=a.current;if(!(!j||e.disabled))return j.addEventListener(So,v),()=>j.removeEventListener(So,v)},[m,e.onSelect,e.disabled]);function v(){var j,T;h(),(T=(j=u.current).onSelect)==null||T.call(j,f.current)}function h(){p.setState("value",f.current,!0)}if(!m)return null;let{disabled:x,value:y,onSelect:b,forceMount:C,keywords:R,...P}=e;return c.createElement(X.div,{ref:Qe(a,t),...P,id:o,"cmdk-item":"",role:"option","aria-disabled":!!x,"aria-selected":!!g,"data-disabled":!!x,"data-selected":!!g,onPointerMove:x||l.getDisablePointerSelection()?void 0:h,onClick:x?void 0:v},e.children)}),px=c.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:o,...a}=e,i=me(),l=c.useRef(null),u=c.useRef(null),d=me(),f=Sr(),p=ct(m=>o||f.filter()===!1?!0:m.search?m.filtered.groups.has(i):!0);Rt(()=>f.group(i),[]),lc(i,l,[e.value,e.heading,u]);let g=c.useMemo(()=>({id:i,forceMount:o}),[o]);return c.createElement(X.div,{ref:Qe(l,t),...a,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},r&&c.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:d},r),En(e,m=>c.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?d:void 0},c.createElement(ac.Provider,{value:g},m))))}),mx=c.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,o=c.useRef(null),a=ct(i=>!i.search);return!r&&!a?null:c.createElement(X.div,{ref:Qe(o,t),...n,"cmdk-separator":"",role:"separator"})}),gx=c.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,o=e.value!=null,a=Jo(),i=ct(d=>d.search),l=ct(d=>d.selectedItemId),u=Sr();return c.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),c.createElement(X.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":l,id:u.inputId,type:"text",value:o?e.value:i,onChange:d=>{o||a.setState("search",d.target.value),r==null||r(d.target.value)}})}),hx=c.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...o}=e,a=c.useRef(null),i=c.useRef(null),l=ct(d=>d.selectedItemId),u=Sr();return c.useEffect(()=>{if(i.current&&a.current){let d=i.current,f=a.current,p,g=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{let m=d.offsetHeight;f.style.setProperty("--cmdk-list-height",m.toFixed(1)+"px")})});return g.observe(d),()=>{cancelAnimationFrame(p),g.unobserve(d)}}},[]),c.createElement(X.div,{ref:Qe(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":n,id:u.listId},En(e,d=>c.createElement("div",{ref:Qe(i,u.listInnerRef),"cmdk-list-sizer":""},d)))}),vx=c.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:o,contentClassName:a,container:i,...l}=e;return c.createElement(Zl,{open:r,onOpenChange:n},c.createElement(Jl,{container:i},c.createElement(Ql,{"cmdk-overlay":"",className:o}),c.createElement(ec,{"aria-label":e.label,"cmdk-dialog":"",className:a},c.createElement(sc,{ref:t,...l}))))}),xx=c.forwardRef((e,t)=>ct(r=>r.filtered.count===0)?c.createElement(X.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),bx=c.forwardRef((e,t)=>{let{progress:r,children:n,label:o="Loading...",...a}=e;return c.createElement(X.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},En(e,i=>c.createElement("div",{"aria-hidden":!0},i)))}),kt=Object.assign(sc,{List:hx,Item:fx,Input:gx,Group:px,Separator:mx,Dialog:vx,Empty:xx,Loading:bx});function yx(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function wx(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function ic(e){let t=c.useRef(e);return Rt(()=>{t.current=e}),t}var Rt=typeof window>"u"?c.useEffect:c.useLayoutEffect;function Dt(e){let t=c.useRef();return t.current===void 0&&(t.current=e()),t}function ct(e){let t=Jo(),r=()=>e(t.snapshot());return c.useSyncExternalStore(t.subscribe,r,r)}function lc(e,t,r,n=[]){let o=c.useRef(),a=Sr();return Rt(()=>{var i;let l=(()=>{var d;for(let f of r){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(d=f.current.textContent)==null?void 0:d.trim():o.current}})(),u=n.map(d=>d.trim());a.value(e,l,u),(i=t.current)==null||i.setAttribute(Ot,l),o.current=l}),o}var Cx=()=>{let[e,t]=c.useState(),r=Dt(()=>new Map);return Rt(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,o)=>{r.current.set(n,o),t({})}};function Sx(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function En({asChild:e,children:t},r){return e&&c.isValidElement(t)?c.cloneElement(Sx(t),{ref:t.ref},r(t.props.children)):r(t)}var Rx={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Ex({...e}){return s.jsx(Zl,{"data-slot":"dialog",...e})}function kx({...e}){return s.jsx(ix,{"data-slot":"dialog-trigger",...e})}function cc({...e}){return s.jsx(Jl,{"data-slot":"dialog-portal",...e})}function Px({...e}){return s.jsx(tc,{"data-slot":"dialog-close",...e})}function uc({className:e,...t}){return s.jsx(Ql,{"data-slot":"dialog-overlay",className:_("qodo qodo-dialog-overlay,","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",e),...t})}function Nx({className:e,children:t,showCloseButton:r=!0,...n}){return s.jsxs(cc,{"data-slot":"dialog-portal",children:[s.jsx(uc,{}),s.jsxs(ec,{"data-slot":"dialog-content",className:_("qodo qodo-dialog-content bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg dark:bg-background dark:border-border",e),...n,children:[t,r&&s.jsxs(tc,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[s.jsx(Sn,{}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function jx({className:e,...t}){return s.jsx("div",{"data-slot":"dialog-header",className:_("qodo qodo-dialog-header flex flex-col gap-2 text-center sm:text-left",e),...t})}function Tx({className:e,...t}){return s.jsx("div",{"data-slot":"dialog-footer",className:_("qodo qodo-dialog-footer flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function _x({className:e,...t}){return s.jsx(lx,{"data-slot":"dialog-title",className:_("qodo qodo-dialog-title text-lg leading-none font-semibold",e),...t})}function Ax({className:e,...t}){return s.jsx(cx,{"data-slot":"dialog-description",className:_("qodo qodo-dialog-description text-muted-foreground text-sm dark:text-muted-foreground",e),...t})}function Ix({className:e,...t}){return s.jsx(kt,{"data-slot":"command",className:_("qodo qodo-command bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}function Mx({className:e,...t}){return s.jsxs("div",{"data-slot":"command-input-wrapper",className:_("qodo qodo-command-input-wrapper","flex h-9 items-center gap-2 border-b border-purple-muted-400 px-3 text-purple-muted-300"),children:[s.jsx(jl,{className:"size-4 shrink-0 opacity-50"}),s.jsx(kt.Input,{"data-slot":"command-input",className:_("qodo qodo-command-input","placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function Ox({className:e,...t}){return s.jsx(kt.List,{"data-slot":"command-list",className:_("qodo qodo-command-list max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function Dx({...e}){return s.jsx(kt.Empty,{"data-slot":"command-empty",className:_("qodo qodo-command-empty","py-6 text-center text-sm text-purple-muted-300"),...e})}function Lx({className:e,...t}){return s.jsx(kt.Loading,{"data-slot":"command-loading",className:_("qodo qodo-command-loading","py-6 text-center text-sm text-purple-muted-300",e),...t})}function $x({className:e,...t}){return s.jsx(kt.Group,{"data-slot":"command-group",className:_("qodo qodo-command-group","text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}function Fx({className:e,...t}){return s.jsx(kt.Item,{"data-slot":"command-item",className:_("qodo qodo-command-item","data-[selected=true]:bg-purple-muted-500 data-[selected=true]:text-purple-100 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var kn="Popover",[dc,eS]=ye(kn,[ut]),Rr=ut(),[Vx,pt]=dc(kn),fc=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,l=Rr(t),u=c.useRef(null),[d,f]=c.useState(!1),[p,g]=be({prop:n,defaultProp:o??!1,onChange:a,caller:kn});return s.jsx(yr,{...l,children:s.jsx(Vx,{scope:t,contentId:me(),triggerRef:u,open:p,onOpenChange:g,onOpenToggle:c.useCallback(()=>g(m=>!m),[g]),hasCustomAnchor:d,onCustomAnchorAdd:c.useCallback(()=>f(!0),[]),onCustomAnchorRemove:c.useCallback(()=>f(!1),[]),modal:i,children:r})})};fc.displayName=kn;var pc="PopoverAnchor",Bx=c.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=pt(pc,r),a=Rr(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:l}=o;return c.useEffect(()=>(i(),()=>l()),[i,l]),s.jsx(wr,{...a,...n,ref:t})});Bx.displayName=pc;var mc="PopoverTrigger",gc=c.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=pt(mc,r),a=Rr(r),i=se(t,o.triggerRef),l=s.jsx(X.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":yc(o.open),...n,ref:i,onClick:F(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:s.jsx(wr,{asChild:!0,...a,children:l})});gc.displayName=mc;var Qo="PopoverPortal",[Gx,Wx]=dc(Qo,{forceMount:void 0}),hc=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,a=pt(Qo,t);return s.jsx(Gx,{scope:t,forceMount:r,children:s.jsx(ke,{present:r||a.open,children:s.jsx(Xt,{asChild:!0,container:o,children:n})})})};hc.displayName=Qo;var Gt="PopoverContent",vc=c.forwardRef((e,t)=>{const r=Wx(Gt,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,a=pt(Gt,e.__scopePopover);return s.jsx(ke,{present:n||a.open,children:a.modal?s.jsx(qx,{...o,ref:t}):s.jsx(Ux,{...o,ref:t})})});vc.displayName=Gt;var zx=st("PopoverContent.RemoveScroll"),qx=c.forwardRef((e,t)=>{const r=pt(Gt,e.__scopePopover),n=c.useRef(null),o=se(t,n),a=c.useRef(!1);return c.useEffect(()=>{const i=n.current;if(i)return vn(i)},[]),s.jsx(Cr,{as:zx,allowPinchZoom:!0,children:s.jsx(xc,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:F(e.onCloseAutoFocus,i=>{var l;i.preventDefault(),a.current||(l=r.triggerRef.current)==null||l.focus()}),onPointerDownOutside:F(e.onPointerDownOutside,i=>{const l=i.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,d=l.button===2||u;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:F(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Ux=c.forwardRef((e,t)=>{const r=pt(Gt,e.__scopePopover),n=c.useRef(!1),o=c.useRef(!1);return s.jsx(xc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,l;(i=e.onCloseAutoFocus)==null||i.call(e,a),a.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var u,d;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;((d=r.triggerRef.current)==null?void 0:d.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),xc=c.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,...p}=e,g=pt(Gt,r),m=Rr(r);return un(),s.jsx(xr,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:s.jsx(Ht,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>g.onOpenChange(!1),children:s.jsx(gn,{"data-state":yc(g.open),role:"dialog",id:g.contentId,...m,...p,ref:t,style:{...p.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)"}})})})}),bc="PopoverClose",Hx=c.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=pt(bc,r);return s.jsx(X.button,{type:"button",...n,ref:t,onClick:F(e.onClick,()=>o.onOpenChange(!1))})});Hx.displayName=bc;var Kx="PopoverArrow",Yx=c.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Rr(r);return s.jsx(hn,{...o,...n,ref:t})});Yx.displayName=Kx;function yc(e){return e?"open":"closed"}var Xx=fc,Zx=gc,Jx=hc,Qx=vc;function wc({...e}){return s.jsx(Xx,{"data-slot":"popover",...e})}function Cc({...e}){return s.jsx(Zx,{"data-slot":"popover-trigger",...e})}function Sc({className:e,align:t="center",sideOffset:r=4,...n}){return s.jsx(Jx,{children:s.jsx(Qx,{"data-slot":"popover-content",align:t,sideOffset:r,className:_("qodo qodo-popover-content bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...n})})}const ea=c.forwardRef(({options:e,value:t,onValueChange:r,placeholder:n="Select option...",searchPlaceholder:o="Search...",emptyText:a="No option found.",disabled:i=!1,readOnly:l=!1,error:u=!1,className:d,onSearchChange:f,isLoading:p=!1,loadingText:g="Loading...",...m},v)=>{const[h,x]=c.useState(!1),[y,b]=c.useState(""),[C,R]=c.useState(0),P=c.useRef(null),j=e.find(E=>E.value===t),T=E=>{b(E),f==null||f(E)};return c.useEffect(()=>{P.current&&R(P.current.offsetWidth)},[]),s.jsxs(wc,{open:l?!1:h,onOpenChange:x,children:[s.jsx(Cc,{asChild:!0,children:s.jsxs(Je,{ref:E=>{typeof v=="function"?v(E):v&&(v.current=E),P.current=E},variant:"outline",role:"combobox","aria-expanded":h,"aria-invalid":u||void 0,"data-readonly":l||void 0,className:_("qodo qodo-combobox w-full h-9 px-3 py-1 justify-between rounded-md","border border-purple-muted-500 bg-purple-muted-700 hover:bg-purple-muted-700","text-sm md:text-sm text-purple-muted-300 hover:text-purple-muted-300 focus:text-purple-muted-300 active:text-purple-muted-300 selection:bg-primary selection:text-primary-foreground","font-normal shadow-xs transition-[color,box-shadow] outline-none focus-visible:!ring-ring/50 focus-visible:!ring-[3px] focus-visible:!ring-offset-0","aria-invalid:!border-destructive aria-invalid:!ring-destructive/20 dark:aria-invalid:!ring-destructive/40","disabled:!cursor-not-allowed disabled:!pointer-events-auto disabled:opacity-50 disabled:!bg-purple-muted-700 disabled:!border-purple-muted-500 disabled:!text-purple-muted-300 disabled:hover:!bg-purple-muted-700 disabled:hover:!text-purple-muted-300","data-[readonly]:opacity-100 data-[readonly]:bg-purple-muted-700 data-[readonly]:border-purple-muted-400 data-[readonly]:cursor-default data-[readonly]:text-purple-muted-200 data-[readonly]:hover:bg-purple-muted-700 data-[readonly]:hover:text-purple-muted-200",{"text-muted-foreground":!j},d),disabled:i,...m,children:[j?j.label:n,s.jsx(vv,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),s.jsx(Sc,{className:"p-0 border bg-purple-muted-600 border-purple-muted-500 text-purple-muted-300",style:{width:C>0?`${C}px`:"auto"},children:s.jsxs(Ix,{className:"w-full bg-purple-muted-600",shouldFilter:!f,children:[s.jsx(Mx,{placeholder:o,...!!f&&{value:y,onValueChange:T}}),s.jsx(Ox,{children:p?s.jsx(Lx,{children:g}):s.jsxs(s.Fragment,{children:[s.jsx(Dx,{className:"flex justify-center items-center p-6 text-center text-sm text-purple-muted-300",children:a}),s.jsx($x,{children:e.map(E=>{const V=t===E.value;return s.jsxs(Fx,{value:E.value,keywords:[E.label],disabled:E.disabled,className:_("text-purple-100 hover:bg-purple-muted-500","focus:bg-purple-muted-500 focus:text-purple-100",{"bg-purple-muted-500":V}),onSelect:U=>{U!==t&&(r==null||r(U===t?"":U)),x(!1)},children:[s.jsx(Cn,{className:_("mr-2 h-4 w-4",{"opacity-100":V,"opacity-0":!V})}),E.label]},E.value)})})]})})]})})]})});ea.displayName="Combobox";const eb=ln("qodo qodo-badge inline-flex items-center dark:font-normal rounded-full border px-2.5 py-0.5 text-xs transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 font-light gap-1",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",primary:"border-purple-700 bg-purple-800 text-purple-300",secondary:"border-purple-muted-600 text-purple-300",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"bg-purple-muted-700 border border-purple-muted-600 text-purple-muted-300",success:"text-green-300 bg-green-800 border-green-700",error:"text-red-300 bg-red-900 border-red-800",pending:"bg-purple-800 border-purple-700 text-purple-300",text:"bg-transparent border-transparent text-primary-foreground p-0",tag:"bg-[var(--fill-tag-emphasis-idle)] text-[var(--text-tag-emphasis-idle)] border border-[var(--border-tag-emphasis-idle)]"},size:{xs:"text-[10px]",sm:"text-xs",md:"text-sm",lg:"py-2"}},defaultVariants:{variant:"default",size:"sm"}});function Pn({className:e,variant:t,size:r,...n}){return s.jsx("div",{className:_(eb({variant:t,size:r}),e),...n})}function tb({className:e,...t}){return s.jsx("div",{"data-slot":"card",className:_("qodo qodo-card bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm dark:bg-card dark:text-card-foreground dark:border-border",e),...t})}function rb({className:e,...t}){return s.jsx("div",{"data-slot":"card-header",className:_("qodo qodo-card-header @container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function nb({className:e,...t}){return s.jsx("div",{"data-slot":"card-title",className:_("qodo qodo-card-title leading-none font-semibold",e),...t})}function ob({className:e,...t}){return s.jsx("div",{"data-slot":"card-description",className:_("qodo qodo-card-description text-muted-foreground text-sm dark:text-muted-foreground",e),...t})}function ab({className:e,...t}){return s.jsx("div",{"data-slot":"card-action",className:_("qodo qodo-card-action col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...t})}function sb({className:e,...t}){return s.jsx("div",{"data-slot":"card-content",className:_("qodo qodo-card-content px-6",e),...t})}function ib({className:e,...t}){return s.jsx("div",{"data-slot":"card-footer",className:_("qodo qodo-card-footer flex items-center px-6 [.border-t]:pt-6",e),...t})}var ta="Progress",ra=100,[lb,tS]=ye(ta),[cb,ub]=lb(ta),Rc=c.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:o,getValueLabel:a=db,...i}=e;(o||o===0)&&!js(o)&&console.error(fb(`${o}`,"Progress"));const l=js(o)?o:ra;n!==null&&!Ts(n,l)&&console.error(pb(`${n}`,"Progress"));const u=Ts(n,l)?n:null,d=Jr(u)?a(u,l):void 0;return s.jsx(cb,{scope:r,value:u,max:l,children:s.jsx(X.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":Jr(u)?u:void 0,"aria-valuetext":d,role:"progressbar","data-state":Pc(u,l),"data-value":u??void 0,"data-max":l,...i,ref:t})})});Rc.displayName=ta;var Ec="ProgressIndicator",kc=c.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,o=ub(Ec,r);return s.jsx(X.div,{"data-state":Pc(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...n,ref:t})});kc.displayName=Ec;function db(e,t){return`${Math.round(e/t*100)}%`}function Pc(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Jr(e){return typeof e=="number"}function js(e){return Jr(e)&&!isNaN(e)&&e>0}function Ts(e,t){return Jr(e)&&!isNaN(e)&&e<=t&&e>=0}function fb(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${ra}\`.`}function pb(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
189
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},ax="DialogDescriptionWarning",sx=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Zl(ax).contentName}}.`;return c.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Jl=Ll,ix=Fl,Ql=Bl,ec=Gl,tc=Wl,lx=ql,cx=Hl,rc=Yl,or='[cmdk-group=""]',ro='[cmdk-group-items=""]',ux='[cmdk-group-heading=""]',nc='[cmdk-item=""]',Ns=`${nc}:not([aria-disabled="true"])`,So="cmdk-item-select",Ot="data-value",dx=(e,t,r)=>Kv(e,t,r),oc=c.createContext(void 0),Sr=()=>c.useContext(oc),ac=c.createContext(void 0),Jo=()=>c.useContext(ac),sc=c.createContext(void 0),ic=c.forwardRef((e,t)=>{let r=Dt(()=>{var N,B;return{search:"",value:(B=(N=e.value)!=null?N:e.defaultValue)!=null?B:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=Dt(()=>new Set),o=Dt(()=>new Map),a=Dt(()=>new Map),i=Dt(()=>new Set),l=lc(e),{label:u,children:d,value:f,onValueChange:p,filter:g,shouldFilter:m,loop:v,disablePointerSelection:h=!1,vimBindings:x=!0,...y}=e,b=me(),C=me(),R=me(),P=c.useRef(null),j=Cx();Rt(()=>{if(f!==void 0){let N=f.trim();r.current.value=N,T.emit()}},[f]),Rt(()=>{j(6,J)},[]);let T=c.useMemo(()=>({subscribe:N=>(i.current.add(N),()=>i.current.delete(N)),snapshot:()=>r.current,setState:(N,B,Y)=>{var M,G,I,Z;if(!Object.is(r.current[N],B)){if(r.current[N]=B,N==="search")te(),U(),j(1,re);else if(N==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ee=document.getElementById(R);ee?ee.focus():(M=document.getElementById(b))==null||M.focus()}if(j(7,()=>{var ee;r.current.selectedItemId=(ee=q())==null?void 0:ee.id,T.emit()}),Y||j(5,J),((G=l.current)==null?void 0:G.value)!==void 0){let ee=B??"";(Z=(I=l.current).onValueChange)==null||Z.call(I,ee);return}}T.emit()}},emit:()=>{i.current.forEach(N=>N())}}),[]),E=c.useMemo(()=>({value:(N,B,Y)=>{var M;B!==((M=a.current.get(N))==null?void 0:M.value)&&(a.current.set(N,{value:B,keywords:Y}),r.current.filtered.items.set(N,V(B,Y)),j(2,()=>{U(),T.emit()}))},item:(N,B)=>(n.current.add(N),B&&(o.current.has(B)?o.current.get(B).add(N):o.current.set(B,new Set([N]))),j(3,()=>{te(),U(),r.current.value||re(),T.emit()}),()=>{a.current.delete(N),n.current.delete(N),r.current.filtered.items.delete(N);let Y=q();j(4,()=>{te(),(Y==null?void 0:Y.getAttribute("id"))===N&&re(),T.emit()})}),group:N=>(o.current.has(N)||o.current.set(N,new Set),()=>{a.current.delete(N),o.current.delete(N)}),filter:()=>l.current.shouldFilter,label:u||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:b,inputId:R,labelId:C,listInnerRef:P}),[]);function V(N,B){var Y,M;let G=(M=(Y=l.current)==null?void 0:Y.filter)!=null?M:dx;return N?G(N,r.current.search,B):0}function U(){if(!r.current.search||l.current.shouldFilter===!1)return;let N=r.current.filtered.items,B=[];r.current.filtered.groups.forEach(M=>{let G=o.current.get(M),I=0;G.forEach(Z=>{let ee=N.get(Z);I=Math.max(ee,I)}),B.push([M,I])});let Y=P.current;D().sort((M,G)=>{var I,Z;let ee=M.getAttribute("id"),oe=G.getAttribute("id");return((I=N.get(oe))!=null?I:0)-((Z=N.get(ee))!=null?Z:0)}).forEach(M=>{let G=M.closest(ro);G?G.appendChild(M.parentElement===G?M:M.closest(`${ro} > *`)):Y.appendChild(M.parentElement===Y?M:M.closest(`${ro} > *`))}),B.sort((M,G)=>G[1]-M[1]).forEach(M=>{var G;let I=(G=P.current)==null?void 0:G.querySelector(`${or}[${Ot}="${encodeURIComponent(M[0])}"]`);I==null||I.parentElement.appendChild(I)})}function re(){let N=D().find(Y=>Y.getAttribute("aria-disabled")!=="true"),B=N==null?void 0:N.getAttribute(Ot);T.setState("value",B||void 0)}function te(){var N,B,Y,M;if(!r.current.search||l.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let G=0;for(let I of n.current){let Z=(B=(N=a.current.get(I))==null?void 0:N.value)!=null?B:"",ee=(M=(Y=a.current.get(I))==null?void 0:Y.keywords)!=null?M:[],oe=V(Z,ee);r.current.filtered.items.set(I,oe),oe>0&&G++}for(let[I,Z]of o.current)for(let ee of Z)if(r.current.filtered.items.get(ee)>0){r.current.filtered.groups.add(I);break}r.current.filtered.count=G}function J(){var N,B,Y;let M=q();M&&(((N=M.parentElement)==null?void 0:N.firstChild)===M&&((Y=(B=M.closest(or))==null?void 0:B.querySelector(ux))==null||Y.scrollIntoView({block:"nearest"})),M.scrollIntoView({block:"nearest"}))}function q(){var N;return(N=P.current)==null?void 0:N.querySelector(`${nc}[aria-selected="true"]`)}function D(){var N;return Array.from(((N=P.current)==null?void 0:N.querySelectorAll(Ns))||[])}function A(N){let B=D()[N];B&&T.setState("value",B.getAttribute(Ot))}function $(N){var B;let Y=q(),M=D(),G=M.findIndex(Z=>Z===Y),I=M[G+N];(B=l.current)!=null&&B.loop&&(I=G+N<0?M[M.length-1]:G+N===M.length?M[0]:M[G+N]),I&&T.setState("value",I.getAttribute(Ot))}function k(N){let B=q(),Y=B==null?void 0:B.closest(or),M;for(;Y&&!M;)Y=N>0?yx(Y,or):wx(Y,or),M=Y==null?void 0:Y.querySelector(Ns);M?T.setState("value",M.getAttribute(Ot)):$(N)}let O=()=>A(D().length-1),W=N=>{N.preventDefault(),N.metaKey?O():N.altKey?k(1):$(1)},Q=N=>{N.preventDefault(),N.metaKey?A(0):N.altKey?k(-1):$(-1)};return c.createElement(X.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:N=>{var B;(B=y.onKeyDown)==null||B.call(y,N);let Y=N.nativeEvent.isComposing||N.keyCode===229;if(!(N.defaultPrevented||Y))switch(N.key){case"n":case"j":{x&&N.ctrlKey&&W(N);break}case"ArrowDown":{W(N);break}case"p":case"k":{x&&N.ctrlKey&&Q(N);break}case"ArrowUp":{Q(N);break}case"Home":{N.preventDefault(),A(0);break}case"End":{N.preventDefault(),O();break}case"Enter":{N.preventDefault();let M=q();if(M){let G=new Event(So);M.dispatchEvent(G)}}}}},c.createElement("label",{"cmdk-label":"",htmlFor:E.inputId,id:E.labelId,style:Rx},u),En(e,N=>c.createElement(ac.Provider,{value:T},c.createElement(oc.Provider,{value:E},N))))}),fx=c.forwardRef((e,t)=>{var r,n;let o=me(),a=c.useRef(null),i=c.useContext(sc),l=Sr(),u=lc(e),d=(n=(r=u.current)==null?void 0:r.forceMount)!=null?n:i==null?void 0:i.forceMount;Rt(()=>{if(!d)return l.item(o,i==null?void 0:i.id)},[d]);let f=cc(o,a,[e.value,e.children,a],e.keywords),p=Jo(),g=ct(j=>j.value&&j.value===f.current),m=ct(j=>d||l.filter()===!1?!0:j.search?j.filtered.items.get(o)>0:!0);c.useEffect(()=>{let j=a.current;if(!(!j||e.disabled))return j.addEventListener(So,v),()=>j.removeEventListener(So,v)},[m,e.onSelect,e.disabled]);function v(){var j,T;h(),(T=(j=u.current).onSelect)==null||T.call(j,f.current)}function h(){p.setState("value",f.current,!0)}if(!m)return null;let{disabled:x,value:y,onSelect:b,forceMount:C,keywords:R,...P}=e;return c.createElement(X.div,{ref:Qe(a,t),...P,id:o,"cmdk-item":"",role:"option","aria-disabled":!!x,"aria-selected":!!g,"data-disabled":!!x,"data-selected":!!g,onPointerMove:x||l.getDisablePointerSelection()?void 0:h,onClick:x?void 0:v},e.children)}),px=c.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:o,...a}=e,i=me(),l=c.useRef(null),u=c.useRef(null),d=me(),f=Sr(),p=ct(m=>o||f.filter()===!1?!0:m.search?m.filtered.groups.has(i):!0);Rt(()=>f.group(i),[]),cc(i,l,[e.value,e.heading,u]);let g=c.useMemo(()=>({id:i,forceMount:o}),[o]);return c.createElement(X.div,{ref:Qe(l,t),...a,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},r&&c.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:d},r),En(e,m=>c.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?d:void 0},c.createElement(sc.Provider,{value:g},m))))}),mx=c.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,o=c.useRef(null),a=ct(i=>!i.search);return!r&&!a?null:c.createElement(X.div,{ref:Qe(o,t),...n,"cmdk-separator":"",role:"separator"})}),gx=c.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,o=e.value!=null,a=Jo(),i=ct(d=>d.search),l=ct(d=>d.selectedItemId),u=Sr();return c.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),c.createElement(X.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":l,id:u.inputId,type:"text",value:o?e.value:i,onChange:d=>{o||a.setState("search",d.target.value),r==null||r(d.target.value)}})}),hx=c.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...o}=e,a=c.useRef(null),i=c.useRef(null),l=ct(d=>d.selectedItemId),u=Sr();return c.useEffect(()=>{if(i.current&&a.current){let d=i.current,f=a.current,p,g=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{let m=d.offsetHeight;f.style.setProperty("--cmdk-list-height",m.toFixed(1)+"px")})});return g.observe(d),()=>{cancelAnimationFrame(p),g.unobserve(d)}}},[]),c.createElement(X.div,{ref:Qe(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":n,id:u.listId},En(e,d=>c.createElement("div",{ref:Qe(i,u.listInnerRef),"cmdk-list-sizer":""},d)))}),vx=c.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:o,contentClassName:a,container:i,...l}=e;return c.createElement(Jl,{open:r,onOpenChange:n},c.createElement(Ql,{container:i},c.createElement(ec,{"cmdk-overlay":"",className:o}),c.createElement(tc,{"aria-label":e.label,"cmdk-dialog":"",className:a},c.createElement(ic,{ref:t,...l}))))}),xx=c.forwardRef((e,t)=>ct(r=>r.filtered.count===0)?c.createElement(X.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),bx=c.forwardRef((e,t)=>{let{progress:r,children:n,label:o="Loading...",...a}=e;return c.createElement(X.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},En(e,i=>c.createElement("div",{"aria-hidden":!0},i)))}),kt=Object.assign(ic,{List:hx,Item:fx,Input:gx,Group:px,Separator:mx,Dialog:vx,Empty:xx,Loading:bx});function yx(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function wx(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function lc(e){let t=c.useRef(e);return Rt(()=>{t.current=e}),t}var Rt=typeof window>"u"?c.useEffect:c.useLayoutEffect;function Dt(e){let t=c.useRef();return t.current===void 0&&(t.current=e()),t}function ct(e){let t=Jo(),r=()=>e(t.snapshot());return c.useSyncExternalStore(t.subscribe,r,r)}function cc(e,t,r,n=[]){let o=c.useRef(),a=Sr();return Rt(()=>{var i;let l=(()=>{var d;for(let f of r){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(d=f.current.textContent)==null?void 0:d.trim():o.current}})(),u=n.map(d=>d.trim());a.value(e,l,u),(i=t.current)==null||i.setAttribute(Ot,l),o.current=l}),o}var Cx=()=>{let[e,t]=c.useState(),r=Dt(()=>new Map);return Rt(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,o)=>{r.current.set(n,o),t({})}};function Sx(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function En({asChild:e,children:t},r){return e&&c.isValidElement(t)?c.cloneElement(Sx(t),{ref:t.ref},r(t.props.children)):r(t)}var Rx={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Ex({...e}){return s.jsx(Jl,{"data-slot":"dialog",...e})}function kx({...e}){return s.jsx(ix,{"data-slot":"dialog-trigger",...e})}function uc({...e}){return s.jsx(Ql,{"data-slot":"dialog-portal",...e})}function Px({...e}){return s.jsx(rc,{"data-slot":"dialog-close",...e})}function dc({className:e,...t}){return s.jsx(ec,{"data-slot":"dialog-overlay",className:_("qodo qodo-dialog-overlay,","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",e),...t})}function Nx({className:e,children:t,showCloseButton:r=!0,...n}){return s.jsxs(uc,{"data-slot":"dialog-portal",children:[s.jsx(dc,{}),s.jsxs(tc,{"data-slot":"dialog-content",className:_("qodo qodo-dialog-content bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg dark:bg-background dark:border-border",e),...n,children:[t,r&&s.jsxs(rc,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[s.jsx(un,{}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function jx({className:e,...t}){return s.jsx("div",{"data-slot":"dialog-header",className:_("qodo qodo-dialog-header flex flex-col gap-2 text-center sm:text-left",e),...t})}function Tx({className:e,...t}){return s.jsx("div",{"data-slot":"dialog-footer",className:_("qodo qodo-dialog-footer flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function _x({className:e,...t}){return s.jsx(lx,{"data-slot":"dialog-title",className:_("qodo qodo-dialog-title text-lg leading-none font-semibold",e),...t})}function Ax({className:e,...t}){return s.jsx(cx,{"data-slot":"dialog-description",className:_("qodo qodo-dialog-description text-muted-foreground text-sm dark:text-muted-foreground",e),...t})}function Ix({className:e,...t}){return s.jsx(kt,{"data-slot":"command",className:_("qodo qodo-command bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}function Mx({className:e,...t}){return s.jsxs("div",{"data-slot":"command-input-wrapper",className:_("qodo qodo-command-input-wrapper","flex h-9 items-center gap-2 border-b border-purple-muted-400 px-3 text-purple-muted-300"),children:[s.jsx(di,{className:"size-4 shrink-0 opacity-50"}),s.jsx(kt.Input,{"data-slot":"command-input",className:_("qodo qodo-command-input","placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function Ox({className:e,...t}){return s.jsx(kt.List,{"data-slot":"command-list",className:_("qodo qodo-command-list max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function Dx({...e}){return s.jsx(kt.Empty,{"data-slot":"command-empty",className:_("qodo qodo-command-empty","py-6 text-center text-sm text-purple-muted-300"),...e})}function Lx({className:e,...t}){return s.jsx(kt.Loading,{"data-slot":"command-loading",className:_("qodo qodo-command-loading","py-6 text-center text-sm text-purple-muted-300",e),...t})}function $x({className:e,...t}){return s.jsx(kt.Group,{"data-slot":"command-group",className:_("qodo qodo-command-group","text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}function Fx({className:e,...t}){return s.jsx(kt.Item,{"data-slot":"command-item",className:_("qodo qodo-command-item","data-[selected=true]:bg-purple-muted-500 data-[selected=true]:text-purple-100 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var kn="Popover",[fc,eS]=ye(kn,[ut]),Rr=ut(),[Vx,pt]=fc(kn),pc=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,l=Rr(t),u=c.useRef(null),[d,f]=c.useState(!1),[p,g]=be({prop:n,defaultProp:o??!1,onChange:a,caller:kn});return s.jsx(yr,{...l,children:s.jsx(Vx,{scope:t,contentId:me(),triggerRef:u,open:p,onOpenChange:g,onOpenToggle:c.useCallback(()=>g(m=>!m),[g]),hasCustomAnchor:d,onCustomAnchorAdd:c.useCallback(()=>f(!0),[]),onCustomAnchorRemove:c.useCallback(()=>f(!1),[]),modal:i,children:r})})};pc.displayName=kn;var mc="PopoverAnchor",Bx=c.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=pt(mc,r),a=Rr(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:l}=o;return c.useEffect(()=>(i(),()=>l()),[i,l]),s.jsx(wr,{...a,...n,ref:t})});Bx.displayName=mc;var gc="PopoverTrigger",hc=c.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=pt(gc,r),a=Rr(r),i=se(t,o.triggerRef),l=s.jsx(X.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":wc(o.open),...n,ref:i,onClick:F(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:s.jsx(wr,{asChild:!0,...a,children:l})});hc.displayName=gc;var Qo="PopoverPortal",[Gx,Wx]=fc(Qo,{forceMount:void 0}),vc=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,a=pt(Qo,t);return s.jsx(Gx,{scope:t,forceMount:r,children:s.jsx(ke,{present:r||a.open,children:s.jsx(Xt,{asChild:!0,container:o,children:n})})})};vc.displayName=Qo;var Gt="PopoverContent",xc=c.forwardRef((e,t)=>{const r=Wx(Gt,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,a=pt(Gt,e.__scopePopover);return s.jsx(ke,{present:n||a.open,children:a.modal?s.jsx(qx,{...o,ref:t}):s.jsx(Ux,{...o,ref:t})})});xc.displayName=Gt;var zx=st("PopoverContent.RemoveScroll"),qx=c.forwardRef((e,t)=>{const r=pt(Gt,e.__scopePopover),n=c.useRef(null),o=se(t,n),a=c.useRef(!1);return c.useEffect(()=>{const i=n.current;if(i)return bn(i)},[]),s.jsx(Cr,{as:zx,allowPinchZoom:!0,children:s.jsx(bc,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:F(e.onCloseAutoFocus,i=>{var l;i.preventDefault(),a.current||(l=r.triggerRef.current)==null||l.focus()}),onPointerDownOutside:F(e.onPointerDownOutside,i=>{const l=i.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,d=l.button===2||u;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:F(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Ux=c.forwardRef((e,t)=>{const r=pt(Gt,e.__scopePopover),n=c.useRef(!1),o=c.useRef(!1);return s.jsx(bc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,l;(i=e.onCloseAutoFocus)==null||i.call(e,a),a.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var u,d;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;((d=r.triggerRef.current)==null?void 0:d.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),bc=c.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,...p}=e,g=pt(Gt,r),m=Rr(r);return fn(),s.jsx(xr,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:s.jsx(Ht,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>g.onOpenChange(!1),children:s.jsx(vn,{"data-state":wc(g.open),role:"dialog",id:g.contentId,...m,...p,ref:t,style:{...p.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)"}})})})}),yc="PopoverClose",Hx=c.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=pt(yc,r);return s.jsx(X.button,{type:"button",...n,ref:t,onClick:F(e.onClick,()=>o.onOpenChange(!1))})});Hx.displayName=yc;var Kx="PopoverArrow",Yx=c.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Rr(r);return s.jsx(xn,{...o,...n,ref:t})});Yx.displayName=Kx;function wc(e){return e?"open":"closed"}var Xx=pc,Zx=hc,Jx=vc,Qx=xc;function Cc({...e}){return s.jsx(Xx,{"data-slot":"popover",...e})}function Sc({...e}){return s.jsx(Zx,{"data-slot":"popover-trigger",...e})}function Rc({className:e,align:t="center",sideOffset:r=4,...n}){return s.jsx(Jx,{children:s.jsx(Qx,{"data-slot":"popover-content",align:t,sideOffset:r,className:_("qodo qodo-popover-content bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...n})})}const ea=c.forwardRef(({options:e,value:t,onValueChange:r,placeholder:n="Select option...",searchPlaceholder:o="Search...",emptyText:a="No option found.",disabled:i=!1,readOnly:l=!1,error:u=!1,className:d,onSearchChange:f,isLoading:p=!1,loadingText:g="Loading...",...m},v)=>{const[h,x]=c.useState(!1),[y,b]=c.useState(""),[C,R]=c.useState(0),P=c.useRef(null),j=e.find(E=>E.value===t),T=E=>{b(E),f==null||f(E)};return c.useEffect(()=>{P.current&&R(P.current.offsetWidth)},[]),s.jsxs(Cc,{open:l?!1:h,onOpenChange:x,children:[s.jsx(Sc,{asChild:!0,children:s.jsxs(Je,{ref:E=>{typeof v=="function"?v(E):v&&(v.current=E),P.current=E},variant:"outline",role:"combobox","aria-expanded":h,"aria-invalid":u||void 0,"data-readonly":l||void 0,className:_("qodo qodo-combobox w-full h-9 px-3 py-1 justify-between rounded-md","border border-purple-muted-500 bg-purple-muted-700 hover:bg-purple-muted-700","text-sm md:text-sm text-purple-muted-300 hover:text-purple-muted-300 focus:text-purple-muted-300 active:text-purple-muted-300 selection:bg-primary selection:text-primary-foreground","font-normal shadow-xs transition-[color,box-shadow] outline-none focus-visible:!ring-ring/50 focus-visible:!ring-[3px] focus-visible:!ring-offset-0","aria-invalid:!border-destructive aria-invalid:!ring-destructive/20 dark:aria-invalid:!ring-destructive/40","disabled:!cursor-not-allowed disabled:!pointer-events-auto disabled:opacity-50 disabled:!bg-purple-muted-700 disabled:!border-purple-muted-500 disabled:!text-purple-muted-300 disabled:hover:!bg-purple-muted-700 disabled:hover:!text-purple-muted-300","data-[readonly]:opacity-100 data-[readonly]:bg-purple-muted-700 data-[readonly]:border-purple-muted-400 data-[readonly]:cursor-default data-[readonly]:text-purple-muted-200 data-[readonly]:hover:bg-purple-muted-700 data-[readonly]:hover:text-purple-muted-200",{"text-muted-foreground":!j},d),disabled:i,...m,children:[j?j.label:n,s.jsx(im,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),s.jsx(Rc,{className:"p-0 border bg-purple-muted-600 border-purple-muted-500 text-purple-muted-300",style:{width:C>0?`${C}px`:"auto"},children:s.jsxs(Ix,{className:"w-full bg-purple-muted-600",shouldFilter:!f,children:[s.jsx(Mx,{placeholder:o,...!!f&&{value:y,onValueChange:T}}),s.jsx(Ox,{children:p?s.jsx(Lx,{children:g}):s.jsxs(s.Fragment,{children:[s.jsx(Dx,{className:"flex justify-center items-center p-6 text-center text-sm text-purple-muted-300",children:a}),s.jsx($x,{children:e.map(E=>{const V=t===E.value;return s.jsxs(Fx,{value:E.value,keywords:[E.label],disabled:E.disabled,className:_("text-purple-100 hover:bg-purple-muted-500","focus:bg-purple-muted-500 focus:text-purple-100",{"bg-purple-muted-500":V}),onSelect:U=>{U!==t&&(r==null||r(U===t?"":U)),x(!1)},children:[s.jsx(cn,{className:_("mr-2 h-4 w-4",{"opacity-100":V,"opacity-0":!V})}),E.label]},E.value)})})]})})]})})]})});ea.displayName="Combobox";const eb=ln("qodo qodo-badge inline-flex items-center dark:font-normal rounded-full border px-2.5 py-0.5 text-xs transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 font-light gap-1",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",primary:"border-purple-700 bg-purple-800 text-purple-300",secondary:"border-purple-muted-600 text-purple-300",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"bg-purple-muted-700 border border-purple-muted-600 text-purple-muted-300",success:"text-green-300 bg-green-800 border-green-700",error:"text-red-300 bg-red-900 border-red-800",pending:"bg-purple-800 border-purple-700 text-purple-300",text:"bg-transparent border-transparent text-primary-foreground p-0",tag:"bg-[var(--fill-tag-emphasis-idle)] text-[var(--text-tag-emphasis-idle)] border border-[var(--border-tag-emphasis-idle)]"},size:{xs:"text-[10px]",sm:"text-xs",md:"text-sm",lg:"py-2"}},defaultVariants:{variant:"default",size:"sm"}});function Pn({className:e,variant:t,size:r,...n}){return s.jsx("div",{className:_(eb({variant:t,size:r}),e),...n})}function tb({className:e,...t}){return s.jsx("div",{"data-slot":"card",className:_("qodo qodo-card bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm dark:bg-card dark:text-card-foreground dark:border-border",e),...t})}function rb({className:e,...t}){return s.jsx("div",{"data-slot":"card-header",className:_("qodo qodo-card-header @container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function nb({className:e,...t}){return s.jsx("div",{"data-slot":"card-title",className:_("qodo qodo-card-title leading-none font-semibold",e),...t})}function ob({className:e,...t}){return s.jsx("div",{"data-slot":"card-description",className:_("qodo qodo-card-description text-muted-foreground text-sm dark:text-muted-foreground",e),...t})}function ab({className:e,...t}){return s.jsx("div",{"data-slot":"card-action",className:_("qodo qodo-card-action col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...t})}function sb({className:e,...t}){return s.jsx("div",{"data-slot":"card-content",className:_("qodo qodo-card-content px-6",e),...t})}function ib({className:e,...t}){return s.jsx("div",{"data-slot":"card-footer",className:_("qodo qodo-card-footer flex items-center px-6 [.border-t]:pt-6",e),...t})}var ta="Progress",ra=100,[lb,tS]=ye(ta),[cb,ub]=lb(ta),Ec=c.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:o,getValueLabel:a=db,...i}=e;(o||o===0)&&!js(o)&&console.error(fb(`${o}`,"Progress"));const l=js(o)?o:ra;n!==null&&!Ts(n,l)&&console.error(pb(`${n}`,"Progress"));const u=Ts(n,l)?n:null,d=Jr(u)?a(u,l):void 0;return s.jsx(cb,{scope:r,value:u,max:l,children:s.jsx(X.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":Jr(u)?u:void 0,"aria-valuetext":d,role:"progressbar","data-state":Nc(u,l),"data-value":u??void 0,"data-max":l,...i,ref:t})})});Ec.displayName=ta;var kc="ProgressIndicator",Pc=c.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,o=ub(kc,r);return s.jsx(X.div,{"data-state":Nc(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...n,ref:t})});Pc.displayName=kc;function db(e,t){return`${Math.round(e/t*100)}%`}function Nc(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Jr(e){return typeof e=="number"}function js(e){return Jr(e)&&!isNaN(e)&&e>0}function Ts(e,t){return Jr(e)&&!isNaN(e)&&e<=t&&e>=0}function fb(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${ra}\`.`}function pb(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
190
190
  - a positive number
191
191
  - less than the value passed to \`max\` (or ${ra} if no \`max\` prop is set)
192
192
  - \`null\` or \`undefined\` if the progress is indeterminate.
193
193
 
194
- Defaulting to \`null\`.`}var mb=Rc,gb=kc;function hb({className:e,value:t,...r}){return s.jsx(mb,{"data-slot":"progress",className:_("qodo qodo-progress bg-primary/20 relative h-2 w-full overflow-hidden rounded-full dark:bg-primary/20",e),...r,children:s.jsx(gb,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all dark:bg-primary",style:{transform:`translateX(-${100-(t||0)}%)`}})})}function Nc({className:e,...t}){return s.jsx("div",{className:_("qodo qodo-skeleton animate-pulse rounded-md bg-neutral-900/10 dark:bg-neutral-50/10",e),...t})}var Nn="Switch",[vb,rS]=ye(Nn),[xb,bb]=vb(Nn),jc=c.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:a,required:i,disabled:l,value:u="on",onCheckedChange:d,form:f,...p}=e,[g,m]=c.useState(null),v=se(t,C=>m(C)),h=c.useRef(!1),x=g?f||!!g.closest("form"):!0,[y,b]=be({prop:o,defaultProp:a??!1,onChange:d,caller:Nn});return s.jsxs(xb,{scope:r,checked:y,disabled:l,children:[s.jsx(X.button,{type:"button",role:"switch","aria-checked":y,"aria-required":i,"data-state":Ic(y),"data-disabled":l?"":void 0,disabled:l,value:u,...p,ref:v,onClick:F(e.onClick,C=>{b(R=>!R),x&&(h.current=C.isPropagationStopped(),h.current||C.stopPropagation())})}),x&&s.jsx(Ac,{control:g,bubbles:!h.current,name:n,value:u,checked:y,required:i,disabled:l,form:f,style:{transform:"translateX(-100%)"}})]})});jc.displayName=Nn;var Tc="SwitchThumb",_c=c.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=bb(Tc,r);return s.jsx(X.span,{"data-state":Ic(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});_c.displayName=Tc;var yb="SwitchBubbleInput",Ac=c.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{const i=c.useRef(null),l=se(i,a),u=Bo(r),d=$o(t);return c.useEffect(()=>{const f=i.current;if(!f)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(u!==r&&m){const v=new Event("click",{bubbles:n});m.call(f,r),f.dispatchEvent(v)}},[u,r,n]),s.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:l,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ac.displayName=yb;function Ic(e){return e?"checked":"unchecked"}var wb=jc,Cb=_c;function Sb({className:e,...t}){return s.jsx(wb,{"data-slot":"switch",className:_("qodo qodo-switch peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 dark:data-[state=checked]:bg-primary dark:data-[state=unchecked]:bg-input",e),...t,children:s.jsx(Cb,{"data-slot":"switch-thumb",className:_("bg-background pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground")})})}var Mc="Toggle",na=c.forwardRef((e,t)=>{const{pressed:r,defaultPressed:n,onPressedChange:o,...a}=e,[i,l]=be({prop:r,onChange:o,defaultProp:n??!1,caller:Mc});return s.jsx(X.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:F(e.onClick,()=>{e.disabled||l(!i)})})});na.displayName=Mc;var Rb=na;const Oc=ln("qodo qodo-toggle inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium text-foreground hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap dark:text-foreground dark:hover:bg-muted dark:hover:text-muted-foreground dark:data-[state=on]:bg-accent dark:data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent text-foreground dark:bg-transparent dark:text-foreground",outline:"border border-input bg-transparent text-foreground shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-transparent dark:text-foreground dark:hover:bg-accent dark:hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function Eb({className:e,variant:t,size:r,...n}){return s.jsx(Rb,{"data-slot":"toggle",className:_(Oc({variant:t,size:r,className:e})),...n})}var no="rovingFocusGroup.onEntryFocus",kb={bubbles:!1,cancelable:!0},Er="RovingFocusGroup",[Ro,Dc,Pb]=cn(Er),[Nb,Jt]=ye(Er,[Pb]),[jb,Tb]=Nb(Er),Lc=c.forwardRef((e,t)=>s.jsx(Ro.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx(Ro.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(_b,{...e,ref:t})})}));Lc.displayName=Er;var _b=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=e,g=c.useRef(null),m=se(t,g),v=Ut(a),[h,x]=be({prop:i,defaultProp:l??null,onChange:u,caller:Er}),[y,b]=c.useState(!1),C=Oe(d),R=Dc(r),P=c.useRef(!1),[j,T]=c.useState(0);return c.useEffect(()=>{const E=g.current;if(E)return E.addEventListener(no,C),()=>E.removeEventListener(no,C)},[C]),s.jsx(jb,{scope:r,orientation:n,dir:v,loop:o,currentTabStopId:h,onItemFocus:c.useCallback(E=>x(E),[x]),onItemShiftTab:c.useCallback(()=>b(!0),[]),onFocusableItemAdd:c.useCallback(()=>T(E=>E+1),[]),onFocusableItemRemove:c.useCallback(()=>T(E=>E-1),[]),children:s.jsx(X.div,{tabIndex:y||j===0?-1:0,"data-orientation":n,...p,ref:m,style:{outline:"none",...e.style},onMouseDown:F(e.onMouseDown,()=>{P.current=!0}),onFocus:F(e.onFocus,E=>{const V=!P.current;if(E.target===E.currentTarget&&V&&!y){const U=new CustomEvent(no,kb);if(E.currentTarget.dispatchEvent(U),!U.defaultPrevented){const re=R().filter(A=>A.focusable),te=re.find(A=>A.active),J=re.find(A=>A.id===h),D=[te,J,...re].filter(Boolean).map(A=>A.ref.current);Vc(D,f)}}P.current=!1}),onBlur:F(e.onBlur,()=>b(!1))})})}),$c="RovingFocusGroupItem",Fc=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:a,children:i,...l}=e,u=me(),d=a||u,f=Tb($c,r),p=f.currentTabStopId===d,g=Dc(r),{onFocusableItemAdd:m,onFocusableItemRemove:v,currentTabStopId:h}=f;return c.useEffect(()=>{if(n)return m(),()=>v()},[n,m,v]),s.jsx(Ro.ItemSlot,{scope:r,id:d,focusable:n,active:o,children:s.jsx(X.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...l,ref:t,onMouseDown:F(e.onMouseDown,x=>{n?f.onItemFocus(d):x.preventDefault()}),onFocus:F(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:F(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){f.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const y=Mb(x,f.orientation,f.dir);if(y!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let C=g().filter(R=>R.focusable).map(R=>R.ref.current);if(y==="last")C.reverse();else if(y==="prev"||y==="next"){y==="prev"&&C.reverse();const R=C.indexOf(x.currentTarget);C=f.loop?Ob(C,R+1):C.slice(R+1)}setTimeout(()=>Vc(C))}}),children:typeof i=="function"?i({isCurrentTabStop:p,hasTabStop:h!=null}):i})})});Fc.displayName=$c;var Ab={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ib(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Mb(e,t,r){const n=Ib(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Ab[n]}function Vc(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function Ob(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var oa=Lc,aa=Fc,mt="ToggleGroup",[Bc,nS]=ye(mt,[Jt]),Gc=Jt(),sa=S.forwardRef((e,t)=>{const{type:r,...n}=e;if(r==="single"){const o=n;return s.jsx(Db,{...o,ref:t})}if(r==="multiple"){const o=n;return s.jsx(Lb,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${mt}\``)});sa.displayName=mt;var[Wc,zc]=Bc(mt),Db=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,l]=be({prop:r,defaultProp:n??"",onChange:o,caller:mt});return s.jsx(Wc,{scope:e.__scopeToggleGroup,type:"single",value:S.useMemo(()=>i?[i]:[],[i]),onItemActivate:l,onItemDeactivate:S.useCallback(()=>l(""),[l]),children:s.jsx(qc,{...a,ref:t})})}),Lb=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,l]=be({prop:r,defaultProp:n??[],onChange:o,caller:mt}),u=S.useCallback(f=>l((p=[])=>[...p,f]),[l]),d=S.useCallback(f=>l((p=[])=>p.filter(g=>g!==f)),[l]);return s.jsx(Wc,{scope:e.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:u,onItemDeactivate:d,children:s.jsx(qc,{...a,ref:t})})});sa.displayName=mt;var[$b,Fb]=Bc(mt),qc=S.forwardRef((e,t)=>{const{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:o=!0,orientation:a,dir:i,loop:l=!0,...u}=e,d=Gc(r),f=Ut(i),p={role:"group",dir:f,...u};return s.jsx($b,{scope:r,rovingFocus:o,disabled:n,children:o?s.jsx(oa,{asChild:!0,...d,orientation:a,dir:f,loop:l,children:s.jsx(X.div,{...p,ref:t})}):s.jsx(X.div,{...p,ref:t})})}),Qr="ToggleGroupItem",Uc=S.forwardRef((e,t)=>{const r=zc(Qr,e.__scopeToggleGroup),n=Fb(Qr,e.__scopeToggleGroup),o=Gc(e.__scopeToggleGroup),a=r.value.includes(e.value),i=n.disabled||e.disabled,l={...e,pressed:a,disabled:i},u=S.useRef(null);return n.rovingFocus?s.jsx(aa,{asChild:!0,...o,focusable:!i,active:a,ref:u,children:s.jsx(_s,{...l,ref:t})}):s.jsx(_s,{...l,ref:t})});Uc.displayName=Qr;var _s=S.forwardRef((e,t)=>{const{__scopeToggleGroup:r,value:n,...o}=e,a=zc(Qr,r),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=a.type==="single"?i:void 0;return s.jsx(na,{...l,...o,ref:t,onPressedChange:u=>{u?a.onItemActivate(n):a.onItemDeactivate(n)}})}),Vb=sa,Bb=Uc;const Hc=c.createContext({size:"default",variant:"default"});function Gb({className:e,variant:t,size:r,children:n,...o}){return s.jsx(Vb,{"data-slot":"toggle-group","data-variant":t,"data-size":r,className:_("qodo qodo-toggle-group group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs dark:data-[variant=outline]:shadow-xs",e),...o,children:s.jsx(Hc.Provider,{value:{variant:t,size:r},children:n})})}function Wb({className:e,children:t,variant:r,size:n,...o}){const a=c.useContext(Hc);return s.jsx(Bb,{"data-slot":"toggle-group-item","data-variant":a.variant||r,"data-size":a.size||n,className:_(Oc({variant:a.variant||r,size:a.size||n}),"qodo qodo-toggle-group-item min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",e),...o,children:t})}var jn="Collapsible",[zb,Kc]=ye(jn),[qb,ia]=zb(jn),Yc=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:a,onOpenChange:i,...l}=e,[u,d]=be({prop:n,defaultProp:o??!1,onChange:i,caller:jn});return s.jsx(qb,{scope:r,disabled:a,contentId:me(),open:u,onOpenToggle:c.useCallback(()=>d(f=>!f),[d]),children:s.jsx(X.div,{"data-state":ca(u),"data-disabled":a?"":void 0,...l,ref:t})})});Yc.displayName=jn;var Xc="CollapsibleTrigger",Zc=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=ia(Xc,r);return s.jsx(X.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":ca(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:F(e.onClick,o.onOpenToggle)})});Zc.displayName=Xc;var la="CollapsibleContent",Jc=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=ia(la,e.__scopeCollapsible);return s.jsx(ke,{present:r||o.open,children:({present:a})=>s.jsx(Ub,{...n,ref:t,present:a})})});Jc.displayName=la;var Ub=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...a}=e,i=ia(la,r),[l,u]=c.useState(n),d=c.useRef(null),f=se(t,d),p=c.useRef(0),g=p.current,m=c.useRef(0),v=m.current,h=i.open||l,x=c.useRef(h),y=c.useRef(void 0);return c.useEffect(()=>{const b=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(b)},[]),xe(()=>{const b=d.current;if(b){y.current=y.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const C=b.getBoundingClientRect();p.current=C.height,m.current=C.width,x.current||(b.style.transitionDuration=y.current.transitionDuration,b.style.animationName=y.current.animationName),u(n)}},[i.open,n]),s.jsx(X.div,{"data-state":ca(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!h,...a,ref:f,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:h&&o})});function ca(e){return e?"open":"closed"}var Hb=Yc,Kb=Zc,Yb=Jc,Fe="Accordion",Xb=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[ua,Zb,Jb]=cn(Fe),[Tn,oS]=ye(Fe,[Jb,Kc]),da=Kc(),Qc=S.forwardRef((e,t)=>{const{type:r,...n}=e,o=n,a=n;return s.jsx(ua.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?s.jsx(ry,{...a,ref:t}):s.jsx(ty,{...o,ref:t})})});Qc.displayName=Fe;var[eu,Qb]=Tn(Fe),[tu,ey]=Tn(Fe,{collapsible:!1}),ty=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},collapsible:a=!1,...i}=e,[l,u]=be({prop:r,defaultProp:n??"",onChange:o,caller:Fe});return s.jsx(eu,{scope:e.__scopeAccordion,value:S.useMemo(()=>l?[l]:[],[l]),onItemOpen:u,onItemClose:S.useCallback(()=>a&&u(""),[a,u]),children:s.jsx(tu,{scope:e.__scopeAccordion,collapsible:a,children:s.jsx(ru,{...i,ref:t})})})}),ry=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,l]=be({prop:r,defaultProp:n??[],onChange:o,caller:Fe}),u=S.useCallback(f=>l((p=[])=>[...p,f]),[l]),d=S.useCallback(f=>l((p=[])=>p.filter(g=>g!==f)),[l]);return s.jsx(eu,{scope:e.__scopeAccordion,value:i,onItemOpen:u,onItemClose:d,children:s.jsx(tu,{scope:e.__scopeAccordion,collapsible:!0,children:s.jsx(ru,{...a,ref:t})})})}),[ny,_n]=Tn(Fe),ru=S.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:o,orientation:a="vertical",...i}=e,l=S.useRef(null),u=se(l,t),d=Zb(r),p=Ut(o)==="ltr",g=F(e.onKeyDown,m=>{var E;if(!Xb.includes(m.key))return;const v=m.target,h=d().filter(V=>{var U;return!((U=V.ref.current)!=null&&U.disabled)}),x=h.findIndex(V=>V.ref.current===v),y=h.length;if(x===-1)return;m.preventDefault();let b=x;const C=0,R=y-1,P=()=>{b=x+1,b>R&&(b=C)},j=()=>{b=x-1,b<C&&(b=R)};switch(m.key){case"Home":b=C;break;case"End":b=R;break;case"ArrowRight":a==="horizontal"&&(p?P():j());break;case"ArrowDown":a==="vertical"&&P();break;case"ArrowLeft":a==="horizontal"&&(p?j():P());break;case"ArrowUp":a==="vertical"&&j();break}const T=b%y;(E=h[T].ref.current)==null||E.focus()});return s.jsx(ny,{scope:r,disabled:n,direction:o,orientation:a,children:s.jsx(ua.Slot,{scope:r,children:s.jsx(X.div,{...i,"data-orientation":a,ref:u,onKeyDown:n?void 0:g})})})}),en="AccordionItem",[oy,fa]=Tn(en),nu=S.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...o}=e,a=_n(en,r),i=Qb(en,r),l=da(r),u=me(),d=n&&i.value.includes(n)||!1,f=a.disabled||e.disabled;return s.jsx(oy,{scope:r,open:d,disabled:f,triggerId:u,children:s.jsx(Hb,{"data-orientation":a.orientation,"data-state":cu(d),...l,...o,ref:t,disabled:f,open:d,onOpenChange:p=>{p?i.onItemOpen(n):i.onItemClose(n)}})})});nu.displayName=en;var ou="AccordionHeader",au=S.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=_n(Fe,r),a=fa(ou,r);return s.jsx(X.h3,{"data-orientation":o.orientation,"data-state":cu(a.open),"data-disabled":a.disabled?"":void 0,...n,ref:t})});au.displayName=ou;var Eo="AccordionTrigger",su=S.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=_n(Fe,r),a=fa(Eo,r),i=ey(Eo,r),l=da(r);return s.jsx(ua.ItemSlot,{scope:r,children:s.jsx(Kb,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...l,...n,ref:t})})});su.displayName=Eo;var iu="AccordionContent",lu=S.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=_n(Fe,r),a=fa(iu,r),i=da(r);return s.jsx(Yb,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...i,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});lu.displayName=iu;function cu(e){return e?"open":"closed"}var ay=Qc,sy=nu,iy=au,ly=su,cy=lu;function uy({...e}){return s.jsx(ay,{"data-slot":"accordion",...e})}function dy({className:e,...t}){return s.jsx(sy,{"data-slot":"accordion-item",className:_("qodo qodo-accordion-item border-b last:border-b-0 dark:border-border",e),...t})}function fy({className:e,children:t,...r}){return s.jsx(iy,{className:"flex",children:s.jsxs(ly,{"data-slot":"accordion-trigger",className:_("qodo qodo-accordion-trigger focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium text-foreground transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180 dark:text-foreground dark:focus-visible:border-ring dark:focus-visible:ring-ring/50",e),...r,children:[t,s.jsx(Wo,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200 dark:text-muted-foreground"})]})})}function py({className:e,children:t,...r}){return s.jsx(cy,{"data-slot":"accordion-content",className:_("qodo qodo-accordion-content","data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm text-foreground dark:text-foreground"),...r,children:s.jsx("div",{className:_("pt-0 pb-4",e),children:t})})}var my=e=>e.type==="checkbox",sr=e=>e instanceof Date,pa=e=>e==null;const uu=e=>typeof e=="object";var Et=e=>!pa(e)&&!Array.isArray(e)&&uu(e)&&!sr(e),gy=e=>Et(e)&&e.target?my(e.target)?e.target.checked:e.target.value:e,hy=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,vy=(e,t)=>e.has(hy(t)),xy=e=>{const t=e.constructor&&e.constructor.prototype;return Et(t)&&t.hasOwnProperty("isPrototypeOf")},by=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function du(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(by&&(e instanceof Blob||n))&&(r||Et(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!xy(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=du(e[o]));else return e;return t}var fu=e=>/^\w*$/.test(e),ko=e=>e===void 0,yy=e=>Array.isArray(e)?e.filter(Boolean):[],pu=e=>yy(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ee=(e,t,r)=>{if(!t||!Et(e))return r;const n=(fu(t)?[t]:pu(t)).reduce((o,a)=>pa(o)?o:o[a],e);return ko(n)||n===e?ko(e[t])?r:e[t]:n},oo=e=>typeof e=="boolean",As=(e,t,r)=>{let n=-1;const o=fu(t)?[t]:pu(t),a=o.length,i=a-1;for(;++n<a;){const l=o[n];let u=r;if(n!==i){const d=e[l];u=Et(d)||Array.isArray(d)?d:isNaN(+o[n+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=u,e=e[l]}};const Is={BLUR:"blur",CHANGE:"change"},Ms={all:"all"},ma=S.createContext(null);ma.displayName="HookFormContext";const Qt=()=>S.useContext(ma),wy=e=>{const{children:t,...r}=e;return S.createElement(ma.Provider,{value:r},t)};var Cy=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(o,a,{get:()=>{const i=a;return t._proxyFormState[i]!==Ms.all&&(t._proxyFormState[i]=!n||Ms.all),r&&(r[i]=!0),e[i]}});return o};const mu=typeof window<"u"?S.useLayoutEffect:S.useEffect;function gu(e){const t=Qt(),{control:r=t.control,disabled:n,name:o,exact:a}=e||{},[i,l]=S.useState(r._formState),u=S.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return mu(()=>r._subscribe({name:o,formState:u.current,exact:a,callback:d=>{!n&&l({...r._formState,...d})}}),[o,n,a]),S.useEffect(()=>{u.current.isValid&&r._setValid(!0)},[r]),S.useMemo(()=>Cy(i,r,u.current,!1),[i,r])}var Sy=e=>typeof e=="string",Ry=(e,t,r,n,o)=>Sy(e)?Ee(r,e,o):Array.isArray(e)?e.map(a=>Ee(r,a)):r,Os=e=>pa(e)||!uu(e);function hu(e,t,r=new WeakSet){if(Os(e)||Os(t))return e===t;if(sr(e)&&sr(t))return e.getTime()===t.getTime();const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const a of n){const i=e[a];if(!o.includes(a))return!1;if(a!=="ref"){const l=t[a];if(sr(i)&&sr(l)||Et(i)&&Et(l)||Array.isArray(i)&&Array.isArray(l)?!hu(i,l,r):i!==l)return!1}}return!0}function Ey(e){const t=Qt(),{control:r=t.control,name:n,defaultValue:o,disabled:a,exact:i,compute:l}=e||{},u=S.useRef(o),d=S.useRef(l),f=S.useRef(void 0);d.current=l;const p=S.useMemo(()=>r._getWatch(n,u.current),[r,n]),[g,m]=S.useState(d.current?d.current(p):p);return mu(()=>r._subscribe({name:n,formState:{values:!0},exact:i,callback:v=>{if(!a){const h=Ry(n,r._names,v.values||r._formValues,!1,u.current);if(d.current){const x=d.current(h);hu(x,f.current)||(m(x),f.current=x)}else m(h)}}}),[r,a,n,i]),S.useEffect(()=>r._removeUnmounted()),g}function ky(e){const t=Qt(),{name:r,disabled:n,control:o=t.control,shouldUnregister:a,defaultValue:i}=e,l=vy(o._names.array,r),u=S.useMemo(()=>Ee(o._formValues,r,Ee(o._defaultValues,r,i)),[o,r,i]),d=Ey({control:o,name:r,defaultValue:u,exact:!0}),f=gu({control:o,name:r,exact:!0}),p=S.useRef(e),g=S.useRef(o.register(r,{...e.rules,value:d,...oo(e.disabled)?{disabled:e.disabled}:{}}));p.current=e;const m=S.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Ee(f.errors,r)},isDirty:{enumerable:!0,get:()=>!!Ee(f.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!Ee(f.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!Ee(f.validatingFields,r)},error:{enumerable:!0,get:()=>Ee(f.errors,r)}}),[f,r]),v=S.useCallback(b=>g.current.onChange({target:{value:gy(b),name:r},type:Is.CHANGE}),[r]),h=S.useCallback(()=>g.current.onBlur({target:{value:Ee(o._formValues,r),name:r},type:Is.BLUR}),[r,o._formValues]),x=S.useCallback(b=>{const C=Ee(o._fields,r);C&&b&&(C._f.ref={focus:()=>b.focus&&b.focus(),select:()=>b.select&&b.select(),setCustomValidity:R=>b.setCustomValidity(R),reportValidity:()=>b.reportValidity()})},[o._fields,r]),y=S.useMemo(()=>({name:r,value:d,...oo(n)||f.disabled?{disabled:f.disabled||n}:{},onChange:v,onBlur:h,ref:x}),[r,n,f.disabled,v,h,x,d]);return S.useEffect(()=>{const b=o._options.shouldUnregister||a;o.register(r,{...p.current.rules,...oo(p.current.disabled)?{disabled:p.current.disabled}:{}});const C=(R,P)=>{const j=Ee(o._fields,R);j&&j._f&&(j._f.mount=P)};if(C(r,!0),b){const R=du(Ee(o._options.defaultValues,r));As(o._defaultValues,r,R),ko(Ee(o._formValues,r))&&As(o._formValues,r,R)}return!l&&o.register(r),()=>{(l?b&&!o._state.action:b)?o.unregister(r):C(r,!1)}},[r,o,l,a]),S.useEffect(()=>{o._setDisabledField({disabled:n,name:r})},[n,r,o]),S.useMemo(()=>({field:y,formState:f,fieldState:m}),[y,f,m])}const vu=e=>e.render(ky(e)),xu=S.createContext(void 0),bu=e=>{const{methods:t,disabled:r,readOnly:n,children:o}=e;return s.jsx(xu.Provider,{value:{disabled:r,readOnly:n},children:s.jsx(wy,{...t,children:o})})},yu=()=>{const e=S.useContext(xu),t=Qt();if(!e||!t)throw new Error("formContext must be used within a FormProvider");return{...e,...t}},Py=({type:e="button",...t})=>{const r=()=>e==="submit"||e==="reset"?"default":"outline";return s.jsx(Je,{type:e,variant:r(),...t})};var wu={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Ds=S.createContext&&S.createContext(wu),Ny=["attr","size","title"];function jy(e,t){if(e==null)return{};var r=Ty(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ty(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function tn(){return tn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tn.apply(this,arguments)}function Ls(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function rn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ls(Object(r),!0).forEach(function(n){_y(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ls(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _y(e,t,r){return t=Ay(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ay(e){var t=Iy(e,"string");return typeof t=="symbol"?t:t+""}function Iy(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cu(e){return e&&e.map((t,r)=>S.createElement(t.tag,rn({key:r},t.attr),Cu(t.child)))}function Su(e){return t=>S.createElement(My,tn({attr:rn({},e.attr)},t),Cu(e.child))}function My(e){var t=r=>{var{attr:n,size:o,title:a}=e,i=jy(e,Ny),l=o||r.size||"1em",u;return r.className&&(u=r.className),e.className&&(u=(u?u+" ":"")+e.className),S.createElement("svg",tn({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,i,{className:u,style:rn(rn({color:e.color||r.color},r.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&S.createElement("title",null,a),e.children)};return Ds!==void 0?S.createElement(Ds.Consumer,null,r=>t(r)):t(wu)}function Oy(e){return Su({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Circle_Info"},child:[{tag:"g",attr:{},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M11.5,15a.5.5,0,0,0,1,0h0V10.981a.5.5,0,0,0-1,0Z"},child:[]},{tag:"circle",attr:{cx:"12",cy:"8.999",r:"0.5"},child:[]}]},{tag:"path",attr:{d:"M12,2.065A9.934,9.934,0,1,1,2.066,12,9.945,9.945,0,0,1,12,2.065Zm0,18.867A8.934,8.934,0,1,0,3.066,12,8.944,8.944,0,0,0,12,20.932Z"},child:[]}]}]}]})(e)}var Dy="Label",Ru=c.forwardRef((e,t)=>s.jsx(X.label,{...e,ref:t,onMouseDown:r=>{var o;r.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));Ru.displayName=Dy;var Ly=Ru;function Eu({className:e,...t}){return s.jsx(Ly,{"data-slot":"label",className:_("qodo qodo-label flex items-center text-purple-muted-300 gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const ku=c.createContext({}),$y=({...e})=>s.jsx(ku.Provider,{value:{name:e.name},children:s.jsx(vu,{...e})}),An=()=>{const e=c.useContext(ku),t=c.useContext(Pu),{getFieldState:r}=Qt(),n=gu({name:e.name}),o=r(e.name,n);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...o}},Pu=c.createContext({});function Fy({className:e,...t}){const r=c.useId();return s.jsx(Pu.Provider,{value:{id:r},children:s.jsx("div",{"data-slot":"form-item",className:_("qodo qodo-form-item grid gap-2",e),...t})})}function Vy({className:e,...t}){const{formItemId:r}=An();return s.jsx(Eu,{"data-slot":"form-label",className:_("data-[error=true]:text-destructive font-normal text-sm",e),htmlFor:r,...t})}function By({...e}){const{error:t,formItemId:r,formDescriptionId:n,formMessageId:o}=An();return s.jsx(Kp,{"data-slot":"form-control",id:r,"aria-describedby":t?`${n} ${o}`:`${n}`,"aria-invalid":!!t,...e})}function Gy({className:e,...t}){const{formDescriptionId:r}=An();return s.jsx("p",{"data-slot":"form-description",id:r,className:_("text-purple-muted-300 text-sm",e),...t})}function Wy({className:e,...t}){const{error:r,formMessageId:n}=An(),o=r?String((r==null?void 0:r.message)??""):t.children;return o?s.jsx("p",{"data-slot":"form-message",id:n,className:_("text-destructive text-sm",e),...t,children:o}):null}var[In,aS]=ye("Tooltip",[ut]),Mn=ut(),Nu="TooltipProvider",zy=700,Po="tooltip.open",[qy,ga]=In(Nu),ju=e=>{const{__scopeTooltip:t,delayDuration:r=zy,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,i=c.useRef(!0),l=c.useRef(!1),u=c.useRef(0);return c.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),s.jsx(qy,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:c.useCallback(()=>{window.clearTimeout(u.current),i.current=!1},[]),onClose:c.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>i.current=!0,n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:c.useCallback(d=>{l.current=d},[]),disableHoverableContent:o,children:a})};ju.displayName=Nu;var pr="Tooltip",[Uy,kr]=In(pr),Tu=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:l}=e,u=ga(pr,e.__scopeTooltip),d=Mn(t),[f,p]=c.useState(null),g=me(),m=c.useRef(0),v=i??u.disableHoverableContent,h=l??u.delayDuration,x=c.useRef(!1),[y,b]=be({prop:n,defaultProp:o??!1,onChange:T=>{T?(u.onOpen(),document.dispatchEvent(new CustomEvent(Po))):u.onClose(),a==null||a(T)},caller:pr}),C=c.useMemo(()=>y?x.current?"delayed-open":"instant-open":"closed",[y]),R=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x.current=!1,b(!0)},[b]),P=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,b(!1)},[b]),j=c.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{x.current=!0,b(!0),m.current=0},h)},[h,b]);return c.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),s.jsx(yr,{...d,children:s.jsx(Uy,{scope:t,contentId:g,open:y,stateAttribute:C,trigger:f,onTriggerChange:p,onTriggerEnter:c.useCallback(()=>{u.isOpenDelayedRef.current?j():R()},[u.isOpenDelayedRef,j,R]),onTriggerLeave:c.useCallback(()=>{v?P():(window.clearTimeout(m.current),m.current=0)},[P,v]),onOpen:R,onClose:P,disableHoverableContent:v,children:r})})};Tu.displayName=pr;var No="TooltipTrigger",_u=c.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=kr(No,r),a=ga(No,r),i=Mn(r),l=c.useRef(null),u=se(t,l,o.onTriggerChange),d=c.useRef(!1),f=c.useRef(!1),p=c.useCallback(()=>d.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),s.jsx(wr,{asChild:!0,...i,children:s.jsx(X.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:u,onPointerMove:F(e.onPointerMove,g=>{g.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:F(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:F(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:F(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:F(e.onBlur,o.onClose),onClick:F(e.onClick,o.onClose)})})});_u.displayName=No;var ha="TooltipPortal",[Hy,Ky]=In(ha,{forceMount:void 0}),Au=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,a=kr(ha,t);return s.jsx(Hy,{scope:t,forceMount:r,children:s.jsx(ke,{present:r||a.open,children:s.jsx(Xt,{asChild:!0,container:o,children:n})})})};Au.displayName=ha;var Wt="TooltipContent",Iu=c.forwardRef((e,t)=>{const r=Ky(Wt,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,i=kr(Wt,e.__scopeTooltip);return s.jsx(ke,{present:n||i.open,children:i.disableHoverableContent?s.jsx(Mu,{side:o,...a,ref:t}):s.jsx(Yy,{side:o,...a,ref:t})})}),Yy=c.forwardRef((e,t)=>{const r=kr(Wt,e.__scopeTooltip),n=ga(Wt,e.__scopeTooltip),o=c.useRef(null),a=se(t,o),[i,l]=c.useState(null),{trigger:u,onClose:d}=r,f=o.current,{onPointerInTransitChange:p}=n,g=c.useCallback(()=>{l(null),p(!1)},[p]),m=c.useCallback((v,h)=>{const x=v.currentTarget,y={x:v.clientX,y:v.clientY},b=Qy(y,x.getBoundingClientRect()),C=ew(y,b),R=tw(h.getBoundingClientRect()),P=nw([...C,...R]);l(P),p(!0)},[p]);return c.useEffect(()=>()=>g(),[g]),c.useEffect(()=>{if(u&&f){const v=x=>m(x,f),h=x=>m(x,u);return u.addEventListener("pointerleave",v),f.addEventListener("pointerleave",h),()=>{u.removeEventListener("pointerleave",v),f.removeEventListener("pointerleave",h)}}},[u,f,m,g]),c.useEffect(()=>{if(i){const v=h=>{const x=h.target,y={x:h.clientX,y:h.clientY},b=(u==null?void 0:u.contains(x))||(f==null?void 0:f.contains(x)),C=!rw(y,i);b?g():C&&(g(),d())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[u,f,i,d,g]),s.jsx(Mu,{...e,ref:a})}),[Xy,Zy]=In(pr,{isInside:!1}),Jy=Xp("TooltipContent"),Mu=c.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...l}=e,u=kr(Wt,r),d=Mn(r),{onClose:f}=u;return c.useEffect(()=>(document.addEventListener(Po,f),()=>document.removeEventListener(Po,f)),[f]),c.useEffect(()=>{if(u.trigger){const p=g=>{const m=g.target;m!=null&&m.contains(u.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[u.trigger,f]),s.jsx(Ht,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:s.jsxs(gn,{"data-state":u.stateAttribute,...d,...l,ref:t,style:{...l.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:[s.jsx(Jy,{children:n}),s.jsx(Xy,{scope:r,isInside:!0,children:s.jsx(Gg,{id:u.contentId,role:"tooltip",children:o||n})})]})})});Iu.displayName=Wt;var Ou="TooltipArrow",Du=c.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Mn(r);return Zy(Ou,r).isInside?null:s.jsx(hn,{...o,...n,ref:t})});Du.displayName=Ou;function Qy(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,o,a)){case a:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function ew(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function tw(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function rw(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const l=t[a],u=t[i],d=l.x,f=l.y,p=u.x,g=u.y;f>n!=g>n&&r<(p-d)*(n-f)/(g-f)+d&&(o=!o)}return o}function nw(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),ow(t)}function ow(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const a=r[r.length-1],i=r[r.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var aw=ju,sw=Tu,iw=_u,lw=Au,cw=Iu,uw=Du;function Lu({delayDuration:e=0,...t}){return s.jsx(aw,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function $u({...e}){return s.jsx(Lu,{children:s.jsx(sw,{"data-slot":"tooltip",...e})})}function Fu({...e}){return s.jsx(iw,{"data-slot":"tooltip-trigger",...e})}function Vu({className:e,sideOffset:t=0,children:r,disableArrow:n=!1,...o}){return s.jsx(lw,{children:s.jsxs(cw,{"data-slot":"tooltip-content",sideOffset:t,className:_("qodo qodo-tooltip-content bg-purple-muted-700 border border-purple-muted-600 text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e,{"py-2.5":n}),...o,children:[r,!n&&s.jsx(uw,{className:"bg-purple-muted-700 fill-purple-muted-700 z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const er=e=>t=>{const{name:r,label:n,description:o,tooltip:a,required:i=!1,...l}=t,{control:u,disabled:d,readOnly:f}=yu(),p=()=>a?s.jsxs($u,{children:[s.jsx(Fu,{asChild:!0,children:s.jsx("span",{children:s.jsx(Oy,{size:16})})}),s.jsx(Vu,{children:s.jsx("p",{children:a})})]}):s.jsx(s.Fragment,{}),g=()=>o?s.jsx(Gy,{children:o}):s.jsx(s.Fragment,{});return s.jsx($y,{control:u,name:r,render:({field:m,fieldState:v})=>s.jsxs(Fy,{className:"flex flex-col gap-1.5",children:[n&&s.jsx(Vy,{children:s.jsxs("span",{className:"flex items-center gap-1",children:[n,i&&s.jsx("span",{className:"text-purple-muted-300",children:"*"}),!!a&&p()]})}),s.jsx(By,{children:s.jsx(e,{...m,disabled:d,...l,readOnly:f,error:!!v.error})}),!!o&&g(),s.jsx(Wy,{})]})})},dw=S.forwardRef((e,t)=>s.jsx(vr,{...e,ref:t})),fw=S.forwardRef((e,t)=>er(dw)({...e,ref:t})),Bu=S.forwardRef(({options:e,placeholder:t,value:r,onChange:n,disabled:o,readOnly:a,error:i},l)=>{var m;const[u,d]=S.useState(!1),f=v=>{a||n&&n({target:{value:v}})},p=v=>{a||d(v)},g=v=>s.jsx(Ko,{value:v.value,disabled:v.disabled,children:s.jsxs("div",{className:"flex flex-col",children:[v.label,v.subLabel&&s.jsx("span",{className:"text-xs text-muted-foreground",style:{overflowWrap:"anywhere"},children:v.subLabel})]})},v.value);return s.jsxs(Tl,{value:r,open:u,disabled:o,onValueChange:f,onOpenChange:p,children:[s.jsx(zo,{ref:l,readOnly:a,"aria-invalid":i||void 0,children:s.jsx(_l,{placeholder:t,children:r&&((m=e.find(v=>v.value===r))==null?void 0:m.label)})}),s.jsx(Ho,{children:e.map(g)})]})});Bu.displayName="BaseSelectComponent";const pw=er(Bu),mw=S.forwardRef((e,t)=>{const{options:r=[],onChange:n=()=>{},searchPlaceholder:o,onSearchChange:a,...i}=e,l=u=>{n({target:{value:u}})};return s.jsx(ea,{ref:t,options:r,onValueChange:l,searchPlaceholder:o,onSearchChange:a,...i})}),gw=er(mw);var va="Radio",[hw,Gu]=ye(va),[vw,xw]=hw(va),Wu=c.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:o=!1,required:a,disabled:i,value:l="on",onCheck:u,form:d,...f}=e,[p,g]=c.useState(null),m=se(t,x=>g(x)),v=c.useRef(!1),h=p?d||!!p.closest("form"):!0;return s.jsxs(vw,{scope:r,checked:o,disabled:i,children:[s.jsx(X.button,{type:"button",role:"radio","aria-checked":o,"data-state":Hu(o),"data-disabled":i?"":void 0,disabled:i,value:l,...f,ref:m,onClick:F(e.onClick,x=>{o||u==null||u(),h&&(v.current=x.isPropagationStopped(),v.current||x.stopPropagation())})}),h&&s.jsx(Uu,{control:p,bubbles:!v.current,name:n,value:l,checked:o,required:a,disabled:i,form:d,style:{transform:"translateX(-100%)"}})]})});Wu.displayName=va;var zu="RadioIndicator",qu=c.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,a=xw(zu,r);return s.jsx(ke,{present:n||a.checked,children:s.jsx(X.span,{"data-state":Hu(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});qu.displayName=zu;var bw="RadioBubbleInput",Uu=c.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{const i=c.useRef(null),l=se(i,a),u=Bo(r),d=$o(t);return c.useEffect(()=>{const f=i.current;if(!f)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(u!==r&&m){const v=new Event("click",{bubbles:n});m.call(f,r),f.dispatchEvent(v)}},[u,r,n]),s.jsx(X.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:l,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Uu.displayName=bw;function Hu(e){return e?"checked":"unchecked"}var yw=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],On="RadioGroup",[ww,sS]=ye(On,[Jt,Gu]),Ku=Jt(),Yu=Gu(),[Cw,Sw]=ww(On),Xu=c.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:a,required:i=!1,disabled:l=!1,orientation:u,dir:d,loop:f=!0,onValueChange:p,...g}=e,m=Ku(r),v=Ut(d),[h,x]=be({prop:a,defaultProp:o??null,onChange:p,caller:On});return s.jsx(Cw,{scope:r,name:n,required:i,disabled:l,value:h,onValueChange:x,children:s.jsx(oa,{asChild:!0,...m,orientation:u,dir:v,loop:f,children:s.jsx(X.div,{role:"radiogroup","aria-required":i,"aria-orientation":u,"data-disabled":l?"":void 0,dir:v,...g,ref:t})})})});Xu.displayName=On;var Zu="RadioGroupItem",Ju=c.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...o}=e,a=Sw(Zu,r),i=a.disabled||n,l=Ku(r),u=Yu(r),d=c.useRef(null),f=se(t,d),p=a.value===o.value,g=c.useRef(!1);return c.useEffect(()=>{const m=h=>{yw.includes(h.key)&&(g.current=!0)},v=()=>g.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",v)}},[]),s.jsx(aa,{asChild:!0,...l,focusable:!i,active:p,children:s.jsx(Wu,{disabled:i,required:a.required,checked:p,...u,...o,name:a.name,ref:f,onCheck:()=>a.onValueChange(o.value),onKeyDown:F(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:F(o.onFocus,()=>{var m;g.current&&((m=d.current)==null||m.click())})})})});Ju.displayName=Zu;var Rw="RadioGroupIndicator",Qu=c.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=Yu(r);return s.jsx(qu,{...o,...n,ref:t})});Qu.displayName=Rw;var Ew=Xu,kw=Ju,Pw=Qu;function Nw({className:e,...t}){const{readOnly:r,...n}=t;return s.jsx(Ew,{"data-slot":"radio-group","data-readonly":r||void 0,disabled:n.disabled||r,className:_("qodo qodo-radio-group grid gap-3 group",e),...n})}function jw({className:e,...t}){return s.jsx(kw,{"data-slot":"radio-group-item",className:_("qodo qodo-radio-group-item dark:border-purple-muted-200 dark:text-purple-muted-200 focus-visible:border-ring focus-visible:ring-ring/50","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive","aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px]","disabled:cursor-not-allowed disabled:opacity-50","group-data-[readonly]:opacity-100 group-data-[readonly]:cursor-default","mt-[2px] mr-0",e),...t,children:s.jsx(Pw,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:s.jsx(bv,{className:"fill-purple-muted-200 absolute top-1/2 left-1/2 size-3 -translate-x-1/2 -translate-y-1/2"})})})}const xa=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o,disabled:a=!1,readOnly:i=!1,className:l,direction:u="horizontal",dir:d="ltr",name:f,onChange:p,...g}=e,m=h=>{i||(p==null||p({target:{value:h}}),o==null||o(h))},v=_("qodo qodo-custom-radio-group","flex",{"flex-row gap-6":u==="horizontal","flex-col gap-3":u==="vertical"},l);return s.jsx(Nw,{name:f,ref:t,value:r,defaultValue:n,onValueChange:m,disabled:a||i,readOnly:i,className:v,dir:d,...g})});xa.displayName="BaseRadioGroupComponent";const ba=({value:e="",disabled:t,error:r,name:n="radio",children:o,className:a})=>{const i=`${n}-${e}`;return s.jsxs(Eu,{htmlFor:i,className:_("flex items-start p-4 rounded-lg gap-2 transition-all duration-200","font-normal text-purple-muted-200 dark:text-purple-muted-200 leading-5",{"cursor-pointer hover:bg-muted/50":!t,"opacity-50 !cursor-not-allowed hover:!bg-transparent":t,"border border-destructive":r},a),children:[s.jsx(jw,{value:e,id:i,disabled:t||r}),o]},e)};ba.displayName="RadioGroupItemComponent";const Tw=er(xa),_w=e=>s.jsx("hr",{className:"w-full h-px border-purple-muted-500",...e}),Aw=({children:e,description:t,className:r})=>s.jsxs("div",{className:_("space-y-1",r),children:[s.jsx("h2",{className:"flex items-center gap-2.5 text-2xl text-white",children:e}),t&&s.jsx("span",{className:"text-sm text-purple-muted-300",children:t})]}),ed=S.forwardRef(({direction:e="horizontal",className:t,...r},n)=>{const o=_("flex flex-row gap-6",{"flex-col":e==="vertical"},t);return s.jsx("div",{ref:n,className:o,...r})});ed.displayName="FormGroup";function Iw({className:e,rows:t,...r}){return s.jsx("textarea",{"data-slot":"textarea",rows:t,className:_("qodo qodo-textarea border-input px-3 py-2 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20","dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex min-h-16 w-full rounded-md border bg-transparent","placeholder:text-purple-muted-400 text-purple-muted-300 shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] selection:bg-primary selection:text-primary-foreground disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-purple-muted-700 disabled:border-purple-muted-500 disabled:text-purple-muted-400 read-only:bg-purple-muted-700 read-only:border-purple-muted-400 read-only:cursor-default read-only:text-purple-muted-200 md:text-sm",{"field-sizing-content":!t},e),...r})}const Mw=S.forwardRef((e,t)=>er(Iw)({...e,ref:t})),td=({label:e,id:t,onRemoveTag:r,disabled:n,className:o,variant:a="tag"})=>s.jsxs(Pn,{variant:a,className:_("flex items-center gap-1 px-2 py-0.5","rounded-full text-xs font-normal whitespace-nowrap",o),children:[e,r&&s.jsx(Je,{type:"button",variant:"ghost",size:"icon",className:"hover:text-destructive p-0 w-[10px] h-[10px]",onClick:i=>{i.stopPropagation(),r==null||r(t)},"aria-label":`Remove ${e}`,disabled:n,children:s.jsx(Sn,{className:"w-[10px] h-[10px] text-[var(--icon-tag-emphasis-idle)] hover:text-[var(--icon-tag-emphasis-hover)]"})})]}),Ow=({label:e,id:t,onClick:r,onDeleteSuggestion:n,deleteText:o,className:a,tagClassName:i,tagVariant:l})=>s.jsx("div",{onClick:r,className:_("bg-transparent hover:bg-purple-muted-800 rounded-sm py-1 px-2",a),children:s.jsxs("div",{className:"flex w-full items-center justify-between gap-2",children:[s.jsx(td,{label:e,id:t,className:i,variant:l}),n&&s.jsx(Je,{type:"button",variant:"ghost",className:"p-0 text-xs font-normal h-[10px]",onMouseDown:u=>u.preventDefault(),onClick:u=>{u.stopPropagation(),n==null||n(t)},"aria-label":`${o} ${e}`,children:o||s.jsx(Iv,{className:"h-4 w-4"})})]})}),ao={BACKSPACE:"Backspace",ESCAPE:"Escape",ENTER:"Enter"},Dw=e=>{if(!e)return"";let t=e.toLowerCase();return t=t.replace(/[_\s]+/g,"-"),t=t.replace(/[^a-z0-9-]/g,""),t=t.replace(/-+/g,"-"),t=t.replace(/^-|-$/g,""),t},rd=({value:e=[],variant:t="tag",placeholder:r="Type to add a tag...",deleteText:n="Delete",suggestions:o=[],allowCreate:a=!0,maxTags:i=100,disabled:l=!1,className:u,suggestionWrapperClassName:d,suggestionClassName:f,tagClassName:p,tagInputIcon:g,onDeleteSuggestion:m,onBlur:v,normalizeTags:h=Dw,onChange:x=()=>{},onAddTag:y=()=>{},onRemoveTag:b=()=>{},onResetTags:C=()=>{}})=>{const[R,P]=S.useState(""),[j,T]=S.useState(!1),E=S.useRef(null),V=S.useRef(null),U=S.useRef(null),[re,te]=S.useState();S.useEffect(()=>{V.current&&te(V.current.offsetWidth)},[]);const J=e.length>=i,q=M=>{if(J||e.some(I=>I.id===M.id))return;const G=[...e,M];x(G),y(M)},D=M=>{const G=e.filter(I=>I.id!==M);x(G),b(M)},A=()=>{x==null||x([]),C()},$=M=>{const G=M.target.value;P(G),T(!0)},k=()=>{const M=R.trim().toLowerCase();if(!M)return[];const G=new Set(e.map(I=>I.id));return o.filter(I=>I.label.toLowerCase().includes(M)&&!G.has(I.id))},O=M=>h?h(M):M,W=()=>{const M=R.trim();if(!M)return;const G=O(M);if(!G)return;if(e.some(Z=>Z.id===G)){P(""),T(!1);return}const I=o.find(Z=>Z.id===G||O(Z.label)===G);I?q(I):a&&q({id:G,label:G}),P(""),T(!1)},Q=M=>{const G=M.key===ao.BACKSPACE&&!R&&e.length>0,I=M.key===ao.ENTER&&R,Z=M.key===ao.ESCAPE;I?(M.preventDefault(),W(),U.current&&(U.current.scrollLeft=U.current.scrollWidth)):G?D(e[e.length-1].id):Z&&T(!1)},N=()=>{if(R&&k().length>0)return s.jsx(Sc,{className:"p-0 border-transparent bg-[var(--fill-interactive-neutral-idle)] gap-2",align:"start",style:{width:re??void 0},onOpenAutoFocus:M=>M.preventDefault(),onCloseAutoFocus:M=>M.preventDefault(),onMouseDown:M=>M.preventDefault(),children:s.jsx("div",{className:_("max-h-[200px] overflow-y-auto flex flex-col gap-1 p-1",d),children:k().map(M=>s.jsx(Ow,{label:M.label,id:M.id,onDeleteSuggestion:m,deleteText:n,className:f,tagClassName:p,tagVariant:t,onClick:()=>{var G;q(M),P(""),T(!1),(G=E.current)==null||G.focus()}},M.id))})})},B=()=>g||s.jsx(_v,{className:"h-4 w-4 stroke-[var(--icon-bg-neutral-mild)]"}),Y=()=>e.map(M=>s.jsx(td,{label:M.label,id:M.id,onRemoveTag:D,disabled:l,className:p,variant:t},M.id));return s.jsx("div",{className:_("w-full",u),children:s.jsxs(wc,{open:j&&!l,onOpenChange:T,modal:!1,children:[s.jsx(Cc,{className:"w-full",children:s.jsxs("div",{ref:V,tabIndex:-1,className:_("flex items-center gap-2 border border-[var(--border-tag-neutral-idle)] bg-background py-0.5 px-3 rounded-md scrollbar-thin",{"opacity-60":l}),onClick:M=>{var G;M.stopPropagation(),T(!0),(G=E.current)==null||G.focus()},children:[B(),s.jsxs("div",{ref:U,className:"flex items-center gap-2 w-full whitespace-normal overflow-x-auto",children:[Y(),s.jsx(vr,{ref:E,value:R,onChange:$,onClick:M=>M.stopPropagation(),onFocus:()=>T(!0),onBlur:v,onKeyDown:Q,placeholder:r,disabled:l||J,className:_("m-0 h-6.5 flex-1 min-w-[6rem] border-0 bg-transparent dark:bg-transparent p-0 shadow-none focus-visible:outline-none focus-visible:ring-0 font-normal text-xs","placeholder:text-[var(--text-input-neutral-placeholder)] dark:placeholder:text-[var(--text-input-neutral-placeholder)] placeholder:text-xs")})]}),s.jsx(Sn,{className:"h-4 w-4 hover:cursor-pointer text-[var(--icon-input-neutral-idle)] hover:text-[var(--icon-input-neutral-hover)]",onClick:A})]})}),N()]})})};function Lw(e){const{control:t}=Qt();return s.jsx(vu,{name:e.name,control:t,render:({field:r})=>s.jsx(rd,{...e,value:r.value,onChange:r.onChange,onBlur:r.onBlur})})}const $w=er(Lw),Ae=e=>{const{className:t,disabled:r=!1,readOnly:n=!1,methods:o,onSubmit:a=()=>{},...i}=e,{handleSubmit:l}=o,u=_("qodo qodo-form","flex flex-col gap-6",t);return s.jsx(bu,{methods:o,disabled:r,readOnly:n,children:s.jsx("form",{className:u,onSubmit:l(a),...i})})};Ae.Button=Py;Ae.Input=fw;Ae.Select=pw;Ae.Combobox=gw;Ae.RadioGroup=Tw;Ae.RadioGroupItem=ba;Ae.Group=ed;Ae.Textarea=Mw;Ae.Divider=_w;Ae.Title=Aw;Ae.TagsInput=$w;function Fw(e){return e==null?[]:Array.isArray(e)?e:[e]}var Vw=e=>Array.from(Array(e).keys()),$s=e=>(e==null?void 0:e.constructor.name)==="Array",Bw=(e,t)=>{if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!ya(e[r],t[r]))return!1;return!0},ya=(e,t)=>{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof(e==null?void 0:e.isEqual)=="function"&&typeof(t==null?void 0:t.isEqual)=="function")return e.isEqual(t);if(typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();if($s(e)&&$s(t))return Bw(Array.from(e),Array.from(t));if(typeof e!="object"||typeof t!="object")return!1;const r=Object.keys(t??Object.create(null)),n=r.length;for(let o=0;o<n;o++)if(!Reflect.has(e,r[o]))return!1;for(let o=0;o<n;o++){const a=r[o];if(!ya(e[a],t[a]))return!1}return!0},Gw=e=>e!=null&&typeof e=="object",qr=e=>typeof e=="string",ir=e=>typeof e=="function",Ww=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),zw=e=>Object.prototype.toString.call(e),nd=Function.prototype.toString,qw=nd.call(Object),Uw=e=>{if(!Gw(e)||zw(e)!="[object Object]"||Yw(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const r=Ww(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&nd.call(r)==qw},Hw=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,Kw=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,Yw=e=>Hw(e)||Kw(e),Xw=e=>e(),Zw=(...e)=>(...t)=>{e.forEach(function(r){r==null||r(...t)})},Jw=e=>Number.isNaN(e),Qw=e=>Jw(e)?0:e,e0=(e,t,r)=>{const n=Qw(e),o=n>=t,a=r==null||n<=r;return o&&a};function od(e){if(!Uw(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(n=>typeof n=="string"),r={};for(const n of t){const o=e[n];o!==void 0&&(r[n]=od(o))}return r}function Fs(...e){const t=e.length===1?e[0]:e[1];(e.length===2?e[0]:!0)&&process.env.NODE_ENV!=="production"&&console.warn(t)}function t0(e,t){if(e==null)throw new Error(t())}var ad=e=>typeof e=="object"&&e!==null,Ge=e=>e?"":void 0,r0=9,n0=e=>ad(e)&&e.nodeType===r0,o0=e=>ad(e)&&e===e.window;function a0(e){if(!e)return!1;const t=e.getRootNode();return sd(t)===e}function s0(e){return n0(e)?e:o0(e)?e.document:(e==null?void 0:e.ownerDocument)??document}function sd(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const r=t.shadowRoot.activeElement;if(!r||r===t)break;t=r}return t}var i0=(...e)=>e.map(t=>{var r;return(r=t==null?void 0:t.trim)==null?void 0:r.call(t)}).filter(Boolean).join(" "),l0=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Vs=e=>{const t={};let r;for(;r=l0.exec(e);)t[r[1]]=r[2];return t},c0=(e,t)=>{if(qr(e)){if(qr(t))return`${e};${t}`;e=Vs(e)}else qr(t)&&(t=Vs(t));return Object.assign({},e??{},t??{})};function Ve(...e){let t={};for(let r of e){if(!r)continue;for(let o in t){if(o.startsWith("on")&&typeof t[o]=="function"&&typeof r[o]=="function"){t[o]=Zw(r[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=i0(t[o],r[o]);continue}if(o==="style"){t[o]=c0(t[o],r[o]);continue}t[o]=r[o]!==void 0?r[o]:t[o]}for(let o in r)t[o]===void 0&&(t[o]=r[o]);const n=Object.getOwnPropertySymbols(r);for(let o of n)t[o]=r[o]}return t}function u0(e,t,r){let n=[],o;return a=>{const i=e(a);return(i.length!==n.length||i.some((u,d)=>!ya(n[d],u)))&&(n=i,o=t(i,a)),o}}var Lt=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Lt||{}),so="__init__";function d0(e){const t=()=>{var i;return((i=e.getRootNode)==null?void 0:i.call(e))??document},r=()=>s0(t());return{...e,getRootNode:t,getDoc:r,getWin:()=>r().defaultView??window,getActiveElement:()=>sd(t()),isActiveElement:a0,getById:i=>t().getElementById(i)}}function f0(e){return new Proxy({},{get(t,r){return r==="style"?n=>e({style:n}).style:e}})}var p0=()=>e=>Array.from(new Set(e)),id=typeof globalThis.document<"u"?S.useLayoutEffect:S.useEffect;function nn(e){const t=e().value??e().defaultValue,r=e().isEqual??Object.is,[n]=S.useState(t),[o,a]=S.useState(n),i=e().value!==void 0,l=S.useRef(o);l.current=i?e().value:o;const u=S.useRef(l.current);id(()=>{u.current=l.current},[o,e().value]);const d=p=>{var v,h;const g=u.current,m=ir(p)?p(g):p;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:m,prev:g}),i||a(m),r(m,g)||(h=(v=e()).onChange)==null||h.call(v,m,g)};function f(){return i?e().value:o}return{initial:n,ref:l,get:f,set(p){(e().sync?hr.flushSync:Xw)(()=>d(p))},invoke(p,g){var m,v;(v=(m=e()).onChange)==null||v.call(m,p,g)},hash(p){var g,m;return((m=(g=e()).hash)==null?void 0:m.call(g,p))??String(p)}}}nn.cleanup=e=>{S.useEffect(()=>e,[])};nn.ref=e=>{const t=S.useRef(e);return{get:()=>t.current,set:r=>{t.current=r}}};function m0(e){const t=S.useRef(e);return{get(r){return t.current[r]},set(r,n){t.current[r]=n}}}var g0=(e,t)=>{const r=S.useRef(!1),n=S.useRef(!1);S.useEffect(()=>{if(r.current&&n.current)return t();n.current=!0},[...(e??[]).map(o=>typeof o=="function"?o():o)]),S.useEffect(()=>(r.current=!0,()=>{r.current=!1}),[])};function h0(e,t={}){var re,te,J,q;const r=S.useMemo(()=>{const{id:D,ids:A,getRootNode:$}=t;return d0({id:D,ids:A,getRootNode:$})},[t]),n=(...D)=>{e.debug&&console.log(...D)},o=((re=e.props)==null?void 0:re.call(e,{props:od(t),scope:r}))??t,a=v0(o),i=(te=e.context)==null?void 0:te.call(e,{prop:a,bindable:nn,scope:r,flush:Bs,getContext(){return u},getComputed(){return P},getRefs(){return h},getEvent(){return m()}}),l=ld(i),u={get(D){var A;return(A=l.current)==null?void 0:A[D].ref.current},set(D,A){var $;($=l.current)==null||$[D].set(A)},initial(D){var A;return(A=l.current)==null?void 0:A[D].initial},hash(D){var $,k;const A=($=l.current)==null?void 0:$[D].get();return(k=l.current)==null?void 0:k[D].hash(A)}},d=S.useRef(new Map),f=S.useRef(null),p=S.useRef(null),g=S.useRef({type:""}),m=()=>({...g.current,current(){return g.current},previous(){return p.current}}),v=()=>({...j,matches(...D){return D.includes(j.ref.current)},hasTag(D){var A,$;return!!(($=(A=e.states[j.ref.current])==null?void 0:A.tags)!=null&&$.includes(D))}}),h=m0(((J=e.refs)==null?void 0:J.call(e,{prop:a,context:u}))??{}),x=()=>({state:v(),context:u,event:m(),prop:a,send:U,action:y,guard:b,track:g0,refs:h,computed:P,flush:Bs,scope:r,choose:R}),y=D=>{const A=ir(D)?D(x()):D;if(!A)return;const $=A.map(k=>{var W,Q;const O=(Q=(W=e.implementations)==null?void 0:W.actions)==null?void 0:Q[k];return O||Fs(`[zag-js] No implementation found for action "${JSON.stringify(k)}"`),O});for(const k of $)k==null||k(x())},b=D=>{var A,$;return ir(D)?D(x()):($=(A=e.implementations)==null?void 0:A.guards)==null?void 0:$[D](x())},C=D=>{const A=ir(D)?D(x()):D;if(!A)return;const $=A.map(O=>{var Q,N;const W=(N=(Q=e.implementations)==null?void 0:Q.effects)==null?void 0:N[O];return W||Fs(`[zag-js] No implementation found for effect "${JSON.stringify(O)}"`),W}),k=[];for(const O of $){const W=O==null?void 0:O(x());W&&k.push(W)}return()=>k.forEach(O=>O==null?void 0:O())},R=D=>Fw(D).find(A=>{let $=!A.guard;return qr(A.guard)?$=!!b(A.guard):ir(A.guard)&&($=A.guard(x())),$}),P=D=>{t0(e.computed,()=>"[zag-js] No computed object found on machine");const A=e.computed[D];return A({context:u,event:m(),prop:a,refs:h,scope:r,computed:P})},j=nn(()=>({defaultValue:e.initialState({prop:a}),onChange(D,A){var k,O,W,Q;if(A){const N=d.current.get(A);N==null||N(),d.current.delete(A)}A&&y((k=e.states[A])==null?void 0:k.exit),y((O=f.current)==null?void 0:O.actions);const $=C((W=e.states[D])==null?void 0:W.effects);if($&&d.current.set(D,$),A===so){y(e.entry);const N=C(e.effects);N&&d.current.set(so,N)}y((Q=e.states[D])==null?void 0:Q.entry)}})),T=S.useRef(void 0),E=S.useRef(Lt.NotStarted);id(()=>{queueMicrotask(()=>{const $=E.current===Lt.Started;E.current=Lt.Started,n($?"rehydrating...":"initializing...");const k=T.current??j.initial;j.invoke(k,$?j.get():so)});const D=d.current,A=j.ref.current;return()=>{n("unmounting..."),T.current=A,E.current=Lt.Stopped,D.forEach($=>$==null?void 0:$()),d.current=new Map,f.current=null,queueMicrotask(()=>{y(e.exit)})}},[]);const V=()=>"ref"in j?j.ref.current:j.get(),U=D=>{queueMicrotask(()=>{var Q,N;if(E.current!==Lt.Started)return;p.current=g.current,g.current=D;let A=V();const $=((Q=e.states[A].on)==null?void 0:Q[D.type])??((N=e.on)==null?void 0:N[D.type]),k=R($);if(!k)return;f.current=k;const O=k.target??A;n("transition",D.type,k.target||A,`(${k.actions})`);const W=O!==A;W?hr.flushSync(()=>j.set(O)):k.reenter&&!W?j.invoke(A,A):y(k.actions??[])})};return(q=e.watch)==null||q.call(e,x()),{state:v(),send:U,context:u,prop:a,scope:r,refs:h,computed:P,event:m(),getStatus:()=>E.current}}function ld(e){const t=S.useRef(e);return t.current=e,t}function v0(e){const t=ld(e);return function(n){return t.current[n]}}function Bs(e){queueMicrotask(()=>{hr.flushSync(()=>e())})}var x0=f0(e=>e);function b0(...e){return t=>{const r=[];for(const n of e)if(typeof n=="function"){const o=n(t);typeof o=="function"&&r.push(o)}else n&&(n.current=t);if(r.length)return()=>{for(const n of r)n()}}}function y0(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const io=e=>{const t=S.memo(S.forwardRef((r,n)=>{const{asChild:o,children:a,...i}=r;if(!o)return S.createElement(e,{...i,ref:n},a);if(!S.isValidElement(a))return null;const l=S.Children.only(a),u=y0(l);return S.cloneElement(l,{...Ve(i,l.props),ref:n?b0(n,u):u})}));return t.displayName=e.displayName||e.name,t},w0=()=>{const e=new Map;return new Proxy(io,{apply(t,r,n){return io(n[0])},get(t,r){const n=r;return e.has(n)||e.set(n,io(n)),e.get(n)}})},Ye=w0();function C0(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Pr(e={}){const{name:t,strict:r=!0,hookName:n="useContext",providerName:o="Provider",errorMessage:a,defaultValue:i}=e,l=S.createContext(i);l.displayName=t;function u(){var f;const d=S.useContext(l);if(!d&&r){const p=new Error(a??C0(n,o));throw p.name="ContextError",(f=Error.captureStackTrace)==null||f.call(Error,p,u),p}return d}return[l.Provider,u,l]}const[S0,rt]=Pr({name:"StepsContext",hookName:"useStepsContext",providerName:"<StepsProvider />"}),cd=S.forwardRef((e,t)=>{const r=rt(),n=Ve(r.getContentProps({index:r.count}),e);return s.jsx(Ye.div,{...n,ref:t})});cd.displayName="StepsCompletedContent";const wa=()=>(e,t)=>t.reduce((r,n)=>{const[o,a]=r,i=n;return a[i]!==void 0&&(o[i]=a[i]),delete a[i],[o,a]},[{},{...e}]),ud=S.forwardRef((e,t)=>{const[r,n]=wa()(e,["index"]),o=rt(),a=Ve(o.getContentProps(r),n);return s.jsx(Ye.div,{...a,ref:t})});ud.displayName="StepsContent";const[R0,Ca]=Pr({name:"StepsItemPropsContext",hookName:"useStepsItemPropsContext",providerName:"<StepsItemPropsProvider />"}),dd=S.forwardRef((e,t)=>{const r=rt(),n=Ca(),o=Ve(r.getIndicatorProps(n),e);return s.jsx(Ye.div,{...o,ref:t})});dd.displayName="StepsIndicator";const[E0,iS]=Pr({name:"StepsItemContext",hookName:"useStepsItemContext",providerName:"<StepsItem />"}),fd=S.forwardRef((e,t)=>{const[r,n]=wa()(e,["index"]),o=rt(),a=Ve(o.getItemProps(r),n),i=o.getItemState(r);return s.jsx(R0,{value:r,children:s.jsx(E0,{value:i,children:s.jsx(Ye.div,{...a,ref:t})})})});fd.displayName="StepsItem";const pd=S.forwardRef((e,t)=>{const r=rt(),n=Ve(r.getListProps(),e);return s.jsx(Ye.div,{...n,ref:t})});pd.displayName="StepsList";const md=S.forwardRef((e,t)=>{const r=rt(),n=Ve(r.getNextTriggerProps(),e);return s.jsx(Ye.button,{...n,ref:t})});md.displayName="StepsNextTrigger";const gd=S.forwardRef((e,t)=>{const r=rt(),n=Ve(r.getPrevTriggerProps(),e);return s.jsx(Ye.button,{...n,ref:t})});gd.displayName="StepsPrevTrigger";var lr=(e,t=[])=>({parts:(...r)=>{if(k0(t))return lr(e,r);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...r)=>lr(e,[...t,...r]),omit:(...r)=>lr(e,t.filter(n=>!r.includes(n))),rename:r=>lr(r,t),keys:()=>t,build:()=>[...new Set(t)].reduce((r,n)=>Object.assign(r,{[n]:{selector:[`&[data-scope="${Mt(e)}"][data-part="${Mt(n)}"]`,`& [data-scope="${Mt(e)}"][data-part="${Mt(n)}"]`].join(", "),attrs:{"data-scope":Mt(e),"data-part":Mt(n)}}}),{})}),Mt=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),k0=e=>e.length===0,P0=lr("steps").parts("root","list","item","trigger","indicator","separator","content","nextTrigger","prevTrigger","progress"),We=P0.build(),N0=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`steps:${e.id}`},j0=e=>{var t;return((t=e.ids)==null?void 0:t.list)??`steps:${e.id}:list`},Gs=(e,t)=>{var r,n;return((n=(r=e.ids)==null?void 0:r.triggerId)==null?void 0:n.call(r,t))??`steps:${e.id}:trigger:${t}`},T0=(e,t)=>{var r,n;return((n=(r=e.ids)==null?void 0:r.contentId)==null?void 0:n.call(r,t))??`steps:${e.id}:content:${t}`};function _0(e,t){const{context:r,send:n,computed:o,prop:a,scope:i}=e,l=r.get("step"),u=a("count"),d=o("percent"),f=o("hasNextStep"),p=o("hasPrevStep"),g=y=>({triggerId:Gs(i,y.index),contentId:T0(i,y.index),current:y.index===l,completed:y.index<l,incomplete:y.index>l,index:y.index,first:y.index===0,last:y.index===u-1}),m=()=>{n({type:"STEP.NEXT",src:"next.trigger.click"})},v=()=>{n({type:"STEP.PREV",src:"prev.trigger.click"})},h=()=>{n({type:"STEP.RESET",src:"reset.trigger.click"})},x=y=>{n({type:"STEP.SET",value:y,src:"api.setValue"})};return{value:l,count:u,percent:d,hasNextStep:f,hasPrevStep:p,isCompleted:o("completed"),goToNextStep:m,goToPrevStep:v,resetStep:h,getItemState:g,setStep:x,getRootProps(){return t.element({...We.root.attrs,id:N0(i),dir:a("dir"),"data-orientation":a("orientation"),style:{"--percent":`${d}%`}})},getListProps(){const b=Vw(u).map((C,R)=>Gs(i,R));return t.element({...We.list.attrs,dir:a("dir"),id:j0(i),role:"tablist","aria-owns":b.join(" "),"aria-orientation":a("orientation"),"data-orientation":a("orientation")})},getItemProps(y){const b=g(y);return t.element({...We.item.attrs,dir:a("dir"),"aria-current":b.current?"step":void 0,"data-orientation":a("orientation")})},getTriggerProps(y){const b=g(y);return t.button({...We.trigger.attrs,id:b.triggerId,role:"tab",dir:a("dir"),tabIndex:!a("linear")||b.current?0:-1,"aria-selected":b.current,"aria-controls":b.contentId,"data-state":b.current?"open":"closed","data-orientation":a("orientation"),"data-complete":Ge(b.completed),"data-current":Ge(b.current),"data-incomplete":Ge(b.incomplete),onClick(C){C.defaultPrevented||a("linear")||n({type:"STEP.SET",value:y.index,src:"trigger.click"})}})},getContentProps(y){const b=g(y);return t.element({...We.content.attrs,dir:a("dir"),id:b.contentId,role:"tabpanel",tabIndex:0,hidden:!b.current,"data-state":b.current?"open":"closed","data-orientation":a("orientation"),"aria-labelledby":b.triggerId})},getIndicatorProps(y){const b=g(y);return t.element({...We.indicator.attrs,dir:a("dir"),"aria-hidden":!0,"data-complete":Ge(b.completed),"data-current":Ge(b.current),"data-incomplete":Ge(b.incomplete)})},getSeparatorProps(y){const b=g(y);return t.element({...We.separator.attrs,dir:a("dir"),"data-orientation":a("orientation"),"data-complete":Ge(b.completed),"data-current":Ge(b.current),"data-incomplete":Ge(b.incomplete)})},getNextTriggerProps(){return t.button({...We.nextTrigger.attrs,dir:a("dir"),type:"button",disabled:!f,onClick(y){y.defaultPrevented||m()}})},getPrevTriggerProps(){return t.button({dir:a("dir"),...We.prevTrigger.attrs,type:"button",disabled:!p,onClick(y){y.defaultPrevented||v()}})},getProgressProps(){return t.element({dir:a("dir"),...We.progress.attrs,role:"progressbar","aria-valuenow":d,"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":`${d}% complete`,"data-complete":Ge(d===100)})}}}var A0={props({props:e}){return{defaultStep:0,count:1,linear:!1,orientation:"horizontal",...e}},context({prop:e,bindable:t}){return{step:t(()=>({defaultValue:e("defaultStep"),value:e("step"),onChange(r){var o,a;(o=e("onStepChange"))==null||o({step:r}),r==e("count")&&((a=e("onStepComplete"))==null||a())}}))}},computed:{percent:u0(({context:e,prop:t})=>[e.get("step"),t("count")],([e,t])=>e/t*100),hasNextStep:({context:e,prop:t})=>e.get("step")<t("count"),hasPrevStep:({context:e})=>e.get("step")>0,completed:({context:e,prop:t})=>e.get("step")===t("count")},initialState(){return"idle"},entry:["validateStep"],states:{idle:{on:{"STEP.SET":{actions:["setStep"]},"STEP.NEXT":{actions:["goToNextStep"]},"STEP.PREV":{actions:["goToPrevStep"]},"STEP.RESET":{actions:["resetStep"]}}}},implementations:{actions:{goToNextStep({context:e,prop:t}){const r=Math.min(e.get("step")+1,t("count"));e.set("step",r)},goToPrevStep({context:e}){const t=Math.max(e.get("step")-1,0);e.set("step",t)},resetStep({context:e}){e.set("step",0)},setStep({context:e,event:t}){e.set("step",t.value)},validateStep({context:e,prop:t}){I0(t("count"),e.get("step"))}}}},I0=(e,t)=>{if(!e0(t,0,e))throw new RangeError(`[zag-js/steps] step index ${t} is out of bounds`)};p0()(["count","dir","getRootNode","id","ids","linear","onStepChange","onStepComplete","orientation","step","defaultStep"]);const[lS,M0]=Pr({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[cS,O0]=Pr({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}});function D0(e){const t=S.useId(),{getRootNode:r}=M0(),{dir:n}=O0(),o={id:t,dir:n,getRootNode:r,...e},a=h0(A0,o);return _0(a,x0)}const hd=S.forwardRef((e,t)=>{const[r,n]=wa()(e,["defaultStep","id","ids","count","linear","onStepChange","onStepComplete","orientation","step"]),o=D0(r),a=Ve(o.getRootProps(),n);return s.jsx(S0,{value:o,children:s.jsx(Ye.div,{...a,ref:t})})});hd.displayName="StepsRoot";const vd=S.forwardRef((e,t)=>{const r=rt(),n=Ca(),o=Ve(r.getSeparatorProps(n),e);return s.jsx(Ye.div,{...o,ref:t})});vd.displayName="StepsSeparator";const xd=S.forwardRef((e,t)=>{const r=rt(),n=Ca(),o=Ve(r.getTriggerProps(n),e);return s.jsx(Ye.button,{...o,ref:t})});xd.displayName="StepsTrigger";function L0(e){return Su({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M20 6 9 17l-5-5"},child:[]}]})(e)}const bd=S.createContext(void 0),$0=({children:e,step:t})=>s.jsx(bd.Provider,{value:{step:t},children:e}),yd=()=>{const e=S.useContext(bd);if(!e)throw new Error("useSteps must be used within a StepsProvider");return e},F0=({className:e,step:t,...r})=>{const n=_("qodo qodo-steps","flex flex-col gap-4",e);return s.jsx($0,{step:t??0,children:s.jsx(hd,{className:n,step:t,...r})})},V0=({className:e,...t})=>{const r=_("flex flex-row gap-4",e);return s.jsx(pd,{className:r,...t})},B0=({className:e,...t})=>{const r=_("flex flex-row items-center gap-4",e);return s.jsx(fd,{className:r,...t})},G0=({className:e,...t})=>{const r=_("flex flex-row items-center gap-4 text-purple-muted-100 text-sm",e);return s.jsx(xd,{className:r,...t})},W0=({index:e,className:t,...r})=>{const{step:n}=yd(),o=e===n,a=e<n,i=_("flex items-center justify-center w-8 h-8 rounded-full text-white",a&&"bg-green-700",o&&"bg-green-600",!a&&!o&&"bg-purple-muted-500",t),l=_({"text-white":o,"text-purple-muted-300":!a&&e!==n});return s.jsx(dd,{className:i,...r,children:a?s.jsx(L0,{className:"text-green-400"}):s.jsx("span",{className:l,children:e+1})})},z0=({index:e,className:t,...r})=>{const{step:n}=yd(),o=e<n,a=_("min-w-12 h-px",o?"bg-green-400":"bg-gray-400",t);return s.jsx(vd,{className:a,...r})},q0=({className:e,...t})=>{const r=_(e);return s.jsx(ud,{className:r,...t})},U0=({className:e,...t})=>{const r=_(e);return s.jsx(cd,{className:r,...t})},H0=({className:e,...t})=>{const r=_("bg-primary text-white px-4 py-2 rounded-md",e);return s.jsx(gd,{className:r,...t})},K0=({className:e,...t})=>{const r=_("bg-primary text-white px-4 py-2 rounded-md",e);return s.jsx(md,{className:r,...t})},Y0={Root:F0,List:V0,Item:B0,Trigger:G0,Indicator:W0,Separator:z0,Content:q0,CompletedContent:U0,PrevTrigger:H0,NextTrigger:K0},Nr=({children:e,content:t,providerProps:r={},triggerProps:n={},contentProps:o={}})=>s.jsx(Lu,{...r,children:s.jsxs($u,{children:[s.jsx(Fu,{...n,children:e}),t&&s.jsx(Vu,{...o,children:t})]})});/**
194
+ Defaulting to \`null\`.`}var mb=Ec,gb=Pc;function hb({className:e,value:t,...r}){return s.jsx(mb,{"data-slot":"progress",className:_("qodo qodo-progress bg-primary/20 relative h-2 w-full overflow-hidden rounded-full dark:bg-primary/20",e),...r,children:s.jsx(gb,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all dark:bg-primary",style:{transform:`translateX(-${100-(t||0)}%)`}})})}function jc({className:e,...t}){return s.jsx("div",{className:_("qodo qodo-skeleton animate-pulse rounded-md bg-neutral-900/10 dark:bg-neutral-50/10",e),...t})}var Nn="Switch",[vb,rS]=ye(Nn),[xb,bb]=vb(Nn),Tc=c.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:a,required:i,disabled:l,value:u="on",onCheckedChange:d,form:f,...p}=e,[g,m]=c.useState(null),v=se(t,C=>m(C)),h=c.useRef(!1),x=g?f||!!g.closest("form"):!0,[y,b]=be({prop:o,defaultProp:a??!1,onChange:d,caller:Nn});return s.jsxs(xb,{scope:r,checked:y,disabled:l,children:[s.jsx(X.button,{type:"button",role:"switch","aria-checked":y,"aria-required":i,"data-state":Mc(y),"data-disabled":l?"":void 0,disabled:l,value:u,...p,ref:v,onClick:F(e.onClick,C=>{b(R=>!R),x&&(h.current=C.isPropagationStopped(),h.current||C.stopPropagation())})}),x&&s.jsx(Ic,{control:g,bubbles:!h.current,name:n,value:u,checked:y,required:i,disabled:l,form:f,style:{transform:"translateX(-100%)"}})]})});Tc.displayName=Nn;var _c="SwitchThumb",Ac=c.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=bb(_c,r);return s.jsx(X.span,{"data-state":Mc(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});Ac.displayName=_c;var yb="SwitchBubbleInput",Ic=c.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{const i=c.useRef(null),l=se(i,a),u=Go(r),d=Fo(t);return c.useEffect(()=>{const f=i.current;if(!f)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(u!==r&&m){const v=new Event("click",{bubbles:n});m.call(f,r),f.dispatchEvent(v)}},[u,r,n]),s.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:l,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ic.displayName=yb;function Mc(e){return e?"checked":"unchecked"}var wb=Tc,Cb=Ac;function Sb({className:e,...t}){return s.jsx(wb,{"data-slot":"switch",className:_("qodo qodo-switch peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 dark:data-[state=checked]:bg-primary dark:data-[state=unchecked]:bg-input",e),...t,children:s.jsx(Cb,{"data-slot":"switch-thumb",className:_("bg-background pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground")})})}var Oc="Toggle",na=c.forwardRef((e,t)=>{const{pressed:r,defaultPressed:n,onPressedChange:o,...a}=e,[i,l]=be({prop:r,onChange:o,defaultProp:n??!1,caller:Oc});return s.jsx(X.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:F(e.onClick,()=>{e.disabled||l(!i)})})});na.displayName=Oc;var Rb=na;const Dc=ln("qodo qodo-toggle inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium text-foreground hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap dark:text-foreground dark:hover:bg-muted dark:hover:text-muted-foreground dark:data-[state=on]:bg-accent dark:data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent text-foreground dark:bg-transparent dark:text-foreground",outline:"border border-input bg-transparent text-foreground shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-transparent dark:text-foreground dark:hover:bg-accent dark:hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function Eb({className:e,variant:t,size:r,...n}){return s.jsx(Rb,{"data-slot":"toggle",className:_(Dc({variant:t,size:r,className:e})),...n})}var no="rovingFocusGroup.onEntryFocus",kb={bubbles:!1,cancelable:!0},Er="RovingFocusGroup",[Ro,Lc,Pb]=dn(Er),[Nb,Jt]=ye(Er,[Pb]),[jb,Tb]=Nb(Er),$c=c.forwardRef((e,t)=>s.jsx(Ro.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx(Ro.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(_b,{...e,ref:t})})}));$c.displayName=Er;var _b=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=e,g=c.useRef(null),m=se(t,g),v=Ut(a),[h,x]=be({prop:i,defaultProp:l??null,onChange:u,caller:Er}),[y,b]=c.useState(!1),C=Oe(d),R=Lc(r),P=c.useRef(!1),[j,T]=c.useState(0);return c.useEffect(()=>{const E=g.current;if(E)return E.addEventListener(no,C),()=>E.removeEventListener(no,C)},[C]),s.jsx(jb,{scope:r,orientation:n,dir:v,loop:o,currentTabStopId:h,onItemFocus:c.useCallback(E=>x(E),[x]),onItemShiftTab:c.useCallback(()=>b(!0),[]),onFocusableItemAdd:c.useCallback(()=>T(E=>E+1),[]),onFocusableItemRemove:c.useCallback(()=>T(E=>E-1),[]),children:s.jsx(X.div,{tabIndex:y||j===0?-1:0,"data-orientation":n,...p,ref:m,style:{outline:"none",...e.style},onMouseDown:F(e.onMouseDown,()=>{P.current=!0}),onFocus:F(e.onFocus,E=>{const V=!P.current;if(E.target===E.currentTarget&&V&&!y){const U=new CustomEvent(no,kb);if(E.currentTarget.dispatchEvent(U),!U.defaultPrevented){const re=R().filter(A=>A.focusable),te=re.find(A=>A.active),J=re.find(A=>A.id===h),D=[te,J,...re].filter(Boolean).map(A=>A.ref.current);Bc(D,f)}}P.current=!1}),onBlur:F(e.onBlur,()=>b(!1))})})}),Fc="RovingFocusGroupItem",Vc=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:a,children:i,...l}=e,u=me(),d=a||u,f=Tb(Fc,r),p=f.currentTabStopId===d,g=Lc(r),{onFocusableItemAdd:m,onFocusableItemRemove:v,currentTabStopId:h}=f;return c.useEffect(()=>{if(n)return m(),()=>v()},[n,m,v]),s.jsx(Ro.ItemSlot,{scope:r,id:d,focusable:n,active:o,children:s.jsx(X.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...l,ref:t,onMouseDown:F(e.onMouseDown,x=>{n?f.onItemFocus(d):x.preventDefault()}),onFocus:F(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:F(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){f.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const y=Mb(x,f.orientation,f.dir);if(y!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let C=g().filter(R=>R.focusable).map(R=>R.ref.current);if(y==="last")C.reverse();else if(y==="prev"||y==="next"){y==="prev"&&C.reverse();const R=C.indexOf(x.currentTarget);C=f.loop?Ob(C,R+1):C.slice(R+1)}setTimeout(()=>Bc(C))}}),children:typeof i=="function"?i({isCurrentTabStop:p,hasTabStop:h!=null}):i})})});Vc.displayName=Fc;var Ab={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ib(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Mb(e,t,r){const n=Ib(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Ab[n]}function Bc(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function Ob(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var oa=$c,aa=Vc,mt="ToggleGroup",[Gc,nS]=ye(mt,[Jt]),Wc=Jt(),sa=S.forwardRef((e,t)=>{const{type:r,...n}=e;if(r==="single"){const o=n;return s.jsx(Db,{...o,ref:t})}if(r==="multiple"){const o=n;return s.jsx(Lb,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${mt}\``)});sa.displayName=mt;var[zc,qc]=Gc(mt),Db=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,l]=be({prop:r,defaultProp:n??"",onChange:o,caller:mt});return s.jsx(zc,{scope:e.__scopeToggleGroup,type:"single",value:S.useMemo(()=>i?[i]:[],[i]),onItemActivate:l,onItemDeactivate:S.useCallback(()=>l(""),[l]),children:s.jsx(Uc,{...a,ref:t})})}),Lb=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,l]=be({prop:r,defaultProp:n??[],onChange:o,caller:mt}),u=S.useCallback(f=>l((p=[])=>[...p,f]),[l]),d=S.useCallback(f=>l((p=[])=>p.filter(g=>g!==f)),[l]);return s.jsx(zc,{scope:e.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:u,onItemDeactivate:d,children:s.jsx(Uc,{...a,ref:t})})});sa.displayName=mt;var[$b,Fb]=Gc(mt),Uc=S.forwardRef((e,t)=>{const{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:o=!0,orientation:a,dir:i,loop:l=!0,...u}=e,d=Wc(r),f=Ut(i),p={role:"group",dir:f,...u};return s.jsx($b,{scope:r,rovingFocus:o,disabled:n,children:o?s.jsx(oa,{asChild:!0,...d,orientation:a,dir:f,loop:l,children:s.jsx(X.div,{...p,ref:t})}):s.jsx(X.div,{...p,ref:t})})}),Qr="ToggleGroupItem",Hc=S.forwardRef((e,t)=>{const r=qc(Qr,e.__scopeToggleGroup),n=Fb(Qr,e.__scopeToggleGroup),o=Wc(e.__scopeToggleGroup),a=r.value.includes(e.value),i=n.disabled||e.disabled,l={...e,pressed:a,disabled:i},u=S.useRef(null);return n.rovingFocus?s.jsx(aa,{asChild:!0,...o,focusable:!i,active:a,ref:u,children:s.jsx(_s,{...l,ref:t})}):s.jsx(_s,{...l,ref:t})});Hc.displayName=Qr;var _s=S.forwardRef((e,t)=>{const{__scopeToggleGroup:r,value:n,...o}=e,a=qc(Qr,r),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=a.type==="single"?i:void 0;return s.jsx(na,{...l,...o,ref:t,onPressedChange:u=>{u?a.onItemActivate(n):a.onItemDeactivate(n)}})}),Vb=sa,Bb=Hc;const Kc=c.createContext({size:"default",variant:"default"});function Gb({className:e,variant:t,size:r,children:n,...o}){return s.jsx(Vb,{"data-slot":"toggle-group","data-variant":t,"data-size":r,className:_("qodo qodo-toggle-group group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs dark:data-[variant=outline]:shadow-xs",e),...o,children:s.jsx(Kc.Provider,{value:{variant:t,size:r},children:n})})}function Wb({className:e,children:t,variant:r,size:n,...o}){const a=c.useContext(Kc);return s.jsx(Bb,{"data-slot":"toggle-group-item","data-variant":a.variant||r,"data-size":a.size||n,className:_(Dc({variant:a.variant||r,size:a.size||n}),"qodo qodo-toggle-group-item min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",e),...o,children:t})}var jn="Collapsible",[zb,Yc]=ye(jn),[qb,ia]=zb(jn),Xc=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:a,onOpenChange:i,...l}=e,[u,d]=be({prop:n,defaultProp:o??!1,onChange:i,caller:jn});return s.jsx(qb,{scope:r,disabled:a,contentId:me(),open:u,onOpenToggle:c.useCallback(()=>d(f=>!f),[d]),children:s.jsx(X.div,{"data-state":ca(u),"data-disabled":a?"":void 0,...l,ref:t})})});Xc.displayName=jn;var Zc="CollapsibleTrigger",Jc=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=ia(Zc,r);return s.jsx(X.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":ca(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:F(e.onClick,o.onOpenToggle)})});Jc.displayName=Zc;var la="CollapsibleContent",Qc=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=ia(la,e.__scopeCollapsible);return s.jsx(ke,{present:r||o.open,children:({present:a})=>s.jsx(Ub,{...n,ref:t,present:a})})});Qc.displayName=la;var Ub=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...a}=e,i=ia(la,r),[l,u]=c.useState(n),d=c.useRef(null),f=se(t,d),p=c.useRef(0),g=p.current,m=c.useRef(0),v=m.current,h=i.open||l,x=c.useRef(h),y=c.useRef(void 0);return c.useEffect(()=>{const b=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(b)},[]),xe(()=>{const b=d.current;if(b){y.current=y.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const C=b.getBoundingClientRect();p.current=C.height,m.current=C.width,x.current||(b.style.transitionDuration=y.current.transitionDuration,b.style.animationName=y.current.animationName),u(n)}},[i.open,n]),s.jsx(X.div,{"data-state":ca(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!h,...a,ref:f,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:h&&o})});function ca(e){return e?"open":"closed"}var Hb=Xc,Kb=Jc,Yb=Qc,Fe="Accordion",Xb=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[ua,Zb,Jb]=dn(Fe),[Tn,oS]=ye(Fe,[Jb,Yc]),da=Yc(),eu=S.forwardRef((e,t)=>{const{type:r,...n}=e,o=n,a=n;return s.jsx(ua.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?s.jsx(ry,{...a,ref:t}):s.jsx(ty,{...o,ref:t})})});eu.displayName=Fe;var[tu,Qb]=Tn(Fe),[ru,ey]=Tn(Fe,{collapsible:!1}),ty=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},collapsible:a=!1,...i}=e,[l,u]=be({prop:r,defaultProp:n??"",onChange:o,caller:Fe});return s.jsx(tu,{scope:e.__scopeAccordion,value:S.useMemo(()=>l?[l]:[],[l]),onItemOpen:u,onItemClose:S.useCallback(()=>a&&u(""),[a,u]),children:s.jsx(ru,{scope:e.__scopeAccordion,collapsible:a,children:s.jsx(nu,{...i,ref:t})})})}),ry=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,l]=be({prop:r,defaultProp:n??[],onChange:o,caller:Fe}),u=S.useCallback(f=>l((p=[])=>[...p,f]),[l]),d=S.useCallback(f=>l((p=[])=>p.filter(g=>g!==f)),[l]);return s.jsx(tu,{scope:e.__scopeAccordion,value:i,onItemOpen:u,onItemClose:d,children:s.jsx(ru,{scope:e.__scopeAccordion,collapsible:!0,children:s.jsx(nu,{...a,ref:t})})})}),[ny,_n]=Tn(Fe),nu=S.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:o,orientation:a="vertical",...i}=e,l=S.useRef(null),u=se(l,t),d=Zb(r),p=Ut(o)==="ltr",g=F(e.onKeyDown,m=>{var E;if(!Xb.includes(m.key))return;const v=m.target,h=d().filter(V=>{var U;return!((U=V.ref.current)!=null&&U.disabled)}),x=h.findIndex(V=>V.ref.current===v),y=h.length;if(x===-1)return;m.preventDefault();let b=x;const C=0,R=y-1,P=()=>{b=x+1,b>R&&(b=C)},j=()=>{b=x-1,b<C&&(b=R)};switch(m.key){case"Home":b=C;break;case"End":b=R;break;case"ArrowRight":a==="horizontal"&&(p?P():j());break;case"ArrowDown":a==="vertical"&&P();break;case"ArrowLeft":a==="horizontal"&&(p?j():P());break;case"ArrowUp":a==="vertical"&&j();break}const T=b%y;(E=h[T].ref.current)==null||E.focus()});return s.jsx(ny,{scope:r,disabled:n,direction:o,orientation:a,children:s.jsx(ua.Slot,{scope:r,children:s.jsx(X.div,{...i,"data-orientation":a,ref:u,onKeyDown:n?void 0:g})})})}),en="AccordionItem",[oy,fa]=Tn(en),ou=S.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...o}=e,a=_n(en,r),i=Qb(en,r),l=da(r),u=me(),d=n&&i.value.includes(n)||!1,f=a.disabled||e.disabled;return s.jsx(oy,{scope:r,open:d,disabled:f,triggerId:u,children:s.jsx(Hb,{"data-orientation":a.orientation,"data-state":uu(d),...l,...o,ref:t,disabled:f,open:d,onOpenChange:p=>{p?i.onItemOpen(n):i.onItemClose(n)}})})});ou.displayName=en;var au="AccordionHeader",su=S.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=_n(Fe,r),a=fa(au,r);return s.jsx(X.h3,{"data-orientation":o.orientation,"data-state":uu(a.open),"data-disabled":a.disabled?"":void 0,...n,ref:t})});su.displayName=au;var Eo="AccordionTrigger",iu=S.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=_n(Fe,r),a=fa(Eo,r),i=ey(Eo,r),l=da(r);return s.jsx(ua.ItemSlot,{scope:r,children:s.jsx(Kb,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...l,...n,ref:t})})});iu.displayName=Eo;var lu="AccordionContent",cu=S.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=_n(Fe,r),a=fa(lu,r),i=da(r);return s.jsx(Yb,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...i,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});cu.displayName=lu;function uu(e){return e?"open":"closed"}var ay=eu,sy=ou,iy=su,ly=iu,cy=cu;function uy({...e}){return s.jsx(ay,{"data-slot":"accordion",...e})}function dy({className:e,...t}){return s.jsx(sy,{"data-slot":"accordion-item",className:_("qodo qodo-accordion-item border-b last:border-b-0 dark:border-border",e),...t})}function fy({className:e,children:t,...r}){return s.jsx(iy,{className:"flex",children:s.jsxs(ly,{"data-slot":"accordion-trigger",className:_("qodo qodo-accordion-trigger focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium text-foreground transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180 dark:text-foreground dark:focus-visible:border-ring dark:focus-visible:ring-ring/50",e),...r,children:[t,s.jsx(Ao,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200 dark:text-muted-foreground"})]})})}function py({className:e,children:t,...r}){return s.jsx(cy,{"data-slot":"accordion-content",className:_("qodo qodo-accordion-content","data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm text-foreground dark:text-foreground"),...r,children:s.jsx("div",{className:_("pt-0 pb-4",e),children:t})})}var my=e=>e.type==="checkbox",sr=e=>e instanceof Date,pa=e=>e==null;const du=e=>typeof e=="object";var Et=e=>!pa(e)&&!Array.isArray(e)&&du(e)&&!sr(e),gy=e=>Et(e)&&e.target?my(e.target)?e.target.checked:e.target.value:e,hy=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,vy=(e,t)=>e.has(hy(t)),xy=e=>{const t=e.constructor&&e.constructor.prototype;return Et(t)&&t.hasOwnProperty("isPrototypeOf")},by=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function fu(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(by&&(e instanceof Blob||n))&&(r||Et(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!xy(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=fu(e[o]));else return e;return t}var pu=e=>/^\w*$/.test(e),ko=e=>e===void 0,yy=e=>Array.isArray(e)?e.filter(Boolean):[],mu=e=>yy(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ee=(e,t,r)=>{if(!t||!Et(e))return r;const n=(pu(t)?[t]:mu(t)).reduce((o,a)=>pa(o)?o:o[a],e);return ko(n)||n===e?ko(e[t])?r:e[t]:n},oo=e=>typeof e=="boolean",As=(e,t,r)=>{let n=-1;const o=pu(t)?[t]:mu(t),a=o.length,i=a-1;for(;++n<a;){const l=o[n];let u=r;if(n!==i){const d=e[l];u=Et(d)||Array.isArray(d)?d:isNaN(+o[n+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=u,e=e[l]}};const Is={BLUR:"blur",CHANGE:"change"},Ms={all:"all"},ma=S.createContext(null);ma.displayName="HookFormContext";const Qt=()=>S.useContext(ma),wy=e=>{const{children:t,...r}=e;return S.createElement(ma.Provider,{value:r},t)};var Cy=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(o,a,{get:()=>{const i=a;return t._proxyFormState[i]!==Ms.all&&(t._proxyFormState[i]=!n||Ms.all),r&&(r[i]=!0),e[i]}});return o};const gu=typeof window<"u"?S.useLayoutEffect:S.useEffect;function hu(e){const t=Qt(),{control:r=t.control,disabled:n,name:o,exact:a}=e||{},[i,l]=S.useState(r._formState),u=S.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return gu(()=>r._subscribe({name:o,formState:u.current,exact:a,callback:d=>{!n&&l({...r._formState,...d})}}),[o,n,a]),S.useEffect(()=>{u.current.isValid&&r._setValid(!0)},[r]),S.useMemo(()=>Cy(i,r,u.current,!1),[i,r])}var Sy=e=>typeof e=="string",Ry=(e,t,r,n,o)=>Sy(e)?Ee(r,e,o):Array.isArray(e)?e.map(a=>Ee(r,a)):r,Os=e=>pa(e)||!du(e);function vu(e,t,r=new WeakSet){if(Os(e)||Os(t))return e===t;if(sr(e)&&sr(t))return e.getTime()===t.getTime();const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const a of n){const i=e[a];if(!o.includes(a))return!1;if(a!=="ref"){const l=t[a];if(sr(i)&&sr(l)||Et(i)&&Et(l)||Array.isArray(i)&&Array.isArray(l)?!vu(i,l,r):i!==l)return!1}}return!0}function Ey(e){const t=Qt(),{control:r=t.control,name:n,defaultValue:o,disabled:a,exact:i,compute:l}=e||{},u=S.useRef(o),d=S.useRef(l),f=S.useRef(void 0);d.current=l;const p=S.useMemo(()=>r._getWatch(n,u.current),[r,n]),[g,m]=S.useState(d.current?d.current(p):p);return gu(()=>r._subscribe({name:n,formState:{values:!0},exact:i,callback:v=>{if(!a){const h=Ry(n,r._names,v.values||r._formValues,!1,u.current);if(d.current){const x=d.current(h);vu(x,f.current)||(m(x),f.current=x)}else m(h)}}}),[r,a,n,i]),S.useEffect(()=>r._removeUnmounted()),g}function ky(e){const t=Qt(),{name:r,disabled:n,control:o=t.control,shouldUnregister:a,defaultValue:i}=e,l=vy(o._names.array,r),u=S.useMemo(()=>Ee(o._formValues,r,Ee(o._defaultValues,r,i)),[o,r,i]),d=Ey({control:o,name:r,defaultValue:u,exact:!0}),f=hu({control:o,name:r,exact:!0}),p=S.useRef(e),g=S.useRef(o.register(r,{...e.rules,value:d,...oo(e.disabled)?{disabled:e.disabled}:{}}));p.current=e;const m=S.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Ee(f.errors,r)},isDirty:{enumerable:!0,get:()=>!!Ee(f.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!Ee(f.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!Ee(f.validatingFields,r)},error:{enumerable:!0,get:()=>Ee(f.errors,r)}}),[f,r]),v=S.useCallback(b=>g.current.onChange({target:{value:gy(b),name:r},type:Is.CHANGE}),[r]),h=S.useCallback(()=>g.current.onBlur({target:{value:Ee(o._formValues,r),name:r},type:Is.BLUR}),[r,o._formValues]),x=S.useCallback(b=>{const C=Ee(o._fields,r);C&&b&&(C._f.ref={focus:()=>b.focus&&b.focus(),select:()=>b.select&&b.select(),setCustomValidity:R=>b.setCustomValidity(R),reportValidity:()=>b.reportValidity()})},[o._fields,r]),y=S.useMemo(()=>({name:r,value:d,...oo(n)||f.disabled?{disabled:f.disabled||n}:{},onChange:v,onBlur:h,ref:x}),[r,n,f.disabled,v,h,x,d]);return S.useEffect(()=>{const b=o._options.shouldUnregister||a;o.register(r,{...p.current.rules,...oo(p.current.disabled)?{disabled:p.current.disabled}:{}});const C=(R,P)=>{const j=Ee(o._fields,R);j&&j._f&&(j._f.mount=P)};if(C(r,!0),b){const R=fu(Ee(o._options.defaultValues,r));As(o._defaultValues,r,R),ko(Ee(o._formValues,r))&&As(o._formValues,r,R)}return!l&&o.register(r),()=>{(l?b&&!o._state.action:b)?o.unregister(r):C(r,!1)}},[r,o,l,a]),S.useEffect(()=>{o._setDisabledField({disabled:n,name:r})},[n,r,o]),S.useMemo(()=>({field:y,formState:f,fieldState:m}),[y,f,m])}const xu=e=>e.render(ky(e)),bu=S.createContext(void 0),yu=e=>{const{methods:t,disabled:r,readOnly:n,children:o}=e;return s.jsx(bu.Provider,{value:{disabled:r,readOnly:n},children:s.jsx(wy,{...t,children:o})})},wu=()=>{const e=S.useContext(bu),t=Qt();if(!e||!t)throw new Error("formContext must be used within a FormProvider");return{...e,...t}},Py=({type:e="button",...t})=>{const r=()=>e==="submit"||e==="reset"?"default":"outline";return s.jsx(Je,{type:e,variant:r(),...t})};var Cu={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Ds=S.createContext&&S.createContext(Cu),Ny=["attr","size","title"];function jy(e,t){if(e==null)return{};var r=Ty(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ty(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function tn(){return tn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tn.apply(this,arguments)}function Ls(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function rn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ls(Object(r),!0).forEach(function(n){_y(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ls(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _y(e,t,r){return t=Ay(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ay(e){var t=Iy(e,"string");return typeof t=="symbol"?t:t+""}function Iy(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Su(e){return e&&e.map((t,r)=>S.createElement(t.tag,rn({key:r},t.attr),Su(t.child)))}function Ru(e){return t=>S.createElement(My,tn({attr:rn({},e.attr)},t),Su(e.child))}function My(e){var t=r=>{var{attr:n,size:o,title:a}=e,i=jy(e,Ny),l=o||r.size||"1em",u;return r.className&&(u=r.className),e.className&&(u=(u?u+" ":"")+e.className),S.createElement("svg",tn({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,i,{className:u,style:rn(rn({color:e.color||r.color},r.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&S.createElement("title",null,a),e.children)};return Ds!==void 0?S.createElement(Ds.Consumer,null,r=>t(r)):t(Cu)}function Oy(e){return Ru({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Circle_Info"},child:[{tag:"g",attr:{},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M11.5,15a.5.5,0,0,0,1,0h0V10.981a.5.5,0,0,0-1,0Z"},child:[]},{tag:"circle",attr:{cx:"12",cy:"8.999",r:"0.5"},child:[]}]},{tag:"path",attr:{d:"M12,2.065A9.934,9.934,0,1,1,2.066,12,9.945,9.945,0,0,1,12,2.065Zm0,18.867A8.934,8.934,0,1,0,3.066,12,8.944,8.944,0,0,0,12,20.932Z"},child:[]}]}]}]})(e)}var Dy="Label",Eu=c.forwardRef((e,t)=>s.jsx(X.label,{...e,ref:t,onMouseDown:r=>{var o;r.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));Eu.displayName=Dy;var Ly=Eu;function ku({className:e,...t}){return s.jsx(Ly,{"data-slot":"label",className:_("qodo qodo-label flex items-center text-purple-muted-300 gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const Pu=c.createContext({}),$y=({...e})=>s.jsx(Pu.Provider,{value:{name:e.name},children:s.jsx(xu,{...e})}),An=()=>{const e=c.useContext(Pu),t=c.useContext(Nu),{getFieldState:r}=Qt(),n=hu({name:e.name}),o=r(e.name,n);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...o}},Nu=c.createContext({});function Fy({className:e,...t}){const r=c.useId();return s.jsx(Nu.Provider,{value:{id:r},children:s.jsx("div",{"data-slot":"form-item",className:_("qodo qodo-form-item grid gap-2",e),...t})})}function Vy({className:e,...t}){const{formItemId:r}=An();return s.jsx(ku,{"data-slot":"form-label",className:_("data-[error=true]:text-destructive font-normal text-sm",e),htmlFor:r,...t})}function By({...e}){const{error:t,formItemId:r,formDescriptionId:n,formMessageId:o}=An();return s.jsx(_m,{"data-slot":"form-control",id:r,"aria-describedby":t?`${n} ${o}`:`${n}`,"aria-invalid":!!t,...e})}function Gy({className:e,...t}){const{formDescriptionId:r}=An();return s.jsx("p",{"data-slot":"form-description",id:r,className:_("text-purple-muted-300 text-sm",e),...t})}function Wy({className:e,...t}){const{error:r,formMessageId:n}=An(),o=r?String((r==null?void 0:r.message)??""):t.children;return o?s.jsx("p",{"data-slot":"form-message",id:n,className:_("text-destructive text-sm",e),...t,children:o}):null}var[In,aS]=ye("Tooltip",[ut]),Mn=ut(),ju="TooltipProvider",zy=700,Po="tooltip.open",[qy,ga]=In(ju),Tu=e=>{const{__scopeTooltip:t,delayDuration:r=zy,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,i=c.useRef(!0),l=c.useRef(!1),u=c.useRef(0);return c.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),s.jsx(qy,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:c.useCallback(()=>{window.clearTimeout(u.current),i.current=!1},[]),onClose:c.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>i.current=!0,n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:c.useCallback(d=>{l.current=d},[]),disableHoverableContent:o,children:a})};Tu.displayName=ju;var pr="Tooltip",[Uy,kr]=In(pr),_u=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:l}=e,u=ga(pr,e.__scopeTooltip),d=Mn(t),[f,p]=c.useState(null),g=me(),m=c.useRef(0),v=i??u.disableHoverableContent,h=l??u.delayDuration,x=c.useRef(!1),[y,b]=be({prop:n,defaultProp:o??!1,onChange:T=>{T?(u.onOpen(),document.dispatchEvent(new CustomEvent(Po))):u.onClose(),a==null||a(T)},caller:pr}),C=c.useMemo(()=>y?x.current?"delayed-open":"instant-open":"closed",[y]),R=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x.current=!1,b(!0)},[b]),P=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,b(!1)},[b]),j=c.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{x.current=!0,b(!0),m.current=0},h)},[h,b]);return c.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),s.jsx(yr,{...d,children:s.jsx(Uy,{scope:t,contentId:g,open:y,stateAttribute:C,trigger:f,onTriggerChange:p,onTriggerEnter:c.useCallback(()=>{u.isOpenDelayedRef.current?j():R()},[u.isOpenDelayedRef,j,R]),onTriggerLeave:c.useCallback(()=>{v?P():(window.clearTimeout(m.current),m.current=0)},[P,v]),onOpen:R,onClose:P,disableHoverableContent:v,children:r})})};_u.displayName=pr;var No="TooltipTrigger",Au=c.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=kr(No,r),a=ga(No,r),i=Mn(r),l=c.useRef(null),u=se(t,l,o.onTriggerChange),d=c.useRef(!1),f=c.useRef(!1),p=c.useCallback(()=>d.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),s.jsx(wr,{asChild:!0,...i,children:s.jsx(X.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:u,onPointerMove:F(e.onPointerMove,g=>{g.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:F(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:F(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:F(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:F(e.onBlur,o.onClose),onClick:F(e.onClick,o.onClose)})})});Au.displayName=No;var ha="TooltipPortal",[Hy,Ky]=In(ha,{forceMount:void 0}),Iu=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,a=kr(ha,t);return s.jsx(Hy,{scope:t,forceMount:r,children:s.jsx(ke,{present:r||a.open,children:s.jsx(Xt,{asChild:!0,container:o,children:n})})})};Iu.displayName=ha;var Wt="TooltipContent",Mu=c.forwardRef((e,t)=>{const r=Ky(Wt,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,i=kr(Wt,e.__scopeTooltip);return s.jsx(ke,{present:n||i.open,children:i.disableHoverableContent?s.jsx(Ou,{side:o,...a,ref:t}):s.jsx(Yy,{side:o,...a,ref:t})})}),Yy=c.forwardRef((e,t)=>{const r=kr(Wt,e.__scopeTooltip),n=ga(Wt,e.__scopeTooltip),o=c.useRef(null),a=se(t,o),[i,l]=c.useState(null),{trigger:u,onClose:d}=r,f=o.current,{onPointerInTransitChange:p}=n,g=c.useCallback(()=>{l(null),p(!1)},[p]),m=c.useCallback((v,h)=>{const x=v.currentTarget,y={x:v.clientX,y:v.clientY},b=Qy(y,x.getBoundingClientRect()),C=ew(y,b),R=tw(h.getBoundingClientRect()),P=nw([...C,...R]);l(P),p(!0)},[p]);return c.useEffect(()=>()=>g(),[g]),c.useEffect(()=>{if(u&&f){const v=x=>m(x,f),h=x=>m(x,u);return u.addEventListener("pointerleave",v),f.addEventListener("pointerleave",h),()=>{u.removeEventListener("pointerleave",v),f.removeEventListener("pointerleave",h)}}},[u,f,m,g]),c.useEffect(()=>{if(i){const v=h=>{const x=h.target,y={x:h.clientX,y:h.clientY},b=(u==null?void 0:u.contains(x))||(f==null?void 0:f.contains(x)),C=!rw(y,i);b?g():C&&(g(),d())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[u,f,i,d,g]),s.jsx(Ou,{...e,ref:a})}),[Xy,Zy]=In(pr,{isInside:!1}),Jy=Im("TooltipContent"),Ou=c.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...l}=e,u=kr(Wt,r),d=Mn(r),{onClose:f}=u;return c.useEffect(()=>(document.addEventListener(Po,f),()=>document.removeEventListener(Po,f)),[f]),c.useEffect(()=>{if(u.trigger){const p=g=>{const m=g.target;m!=null&&m.contains(u.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[u.trigger,f]),s.jsx(Ht,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:s.jsxs(vn,{"data-state":u.stateAttribute,...d,...l,ref:t,style:{...l.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:[s.jsx(Jy,{children:n}),s.jsx(Xy,{scope:r,isInside:!0,children:s.jsx(Eh,{id:u.contentId,role:"tooltip",children:o||n})})]})})});Mu.displayName=Wt;var Du="TooltipArrow",Lu=c.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Mn(r);return Zy(Du,r).isInside?null:s.jsx(xn,{...o,...n,ref:t})});Lu.displayName=Du;function Qy(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,o,a)){case a:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function ew(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function tw(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function rw(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const l=t[a],u=t[i],d=l.x,f=l.y,p=u.x,g=u.y;f>n!=g>n&&r<(p-d)*(n-f)/(g-f)+d&&(o=!o)}return o}function nw(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),ow(t)}function ow(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const a=r[r.length-1],i=r[r.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var aw=Tu,sw=_u,iw=Au,lw=Iu,cw=Mu,uw=Lu;function $u({delayDuration:e=0,...t}){return s.jsx(aw,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Fu({...e}){return s.jsx($u,{children:s.jsx(sw,{"data-slot":"tooltip",...e})})}function Vu({...e}){return s.jsx(iw,{"data-slot":"tooltip-trigger",...e})}function Bu({className:e,sideOffset:t=0,children:r,disableArrow:n=!1,...o}){return s.jsx(lw,{children:s.jsxs(cw,{"data-slot":"tooltip-content",sideOffset:t,className:_("qodo qodo-tooltip-content bg-purple-muted-700 border border-purple-muted-600 text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e,{"py-2.5":n}),...o,children:[r,!n&&s.jsx(uw,{className:"bg-purple-muted-700 fill-purple-muted-700 z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const er=e=>t=>{const{name:r,label:n,description:o,tooltip:a,required:i=!1,...l}=t,{control:u,disabled:d,readOnly:f}=wu(),p=()=>a?s.jsxs(Fu,{children:[s.jsx(Vu,{asChild:!0,children:s.jsx("span",{children:s.jsx(Oy,{size:16})})}),s.jsx(Bu,{children:s.jsx("p",{children:a})})]}):s.jsx(s.Fragment,{}),g=()=>o?s.jsx(Gy,{children:o}):s.jsx(s.Fragment,{});return s.jsx($y,{control:u,name:r,render:({field:m,fieldState:v})=>s.jsxs(Fy,{className:"flex flex-col gap-1.5",children:[n&&s.jsx(Vy,{children:s.jsxs("span",{className:"flex items-center gap-1",children:[n,i&&s.jsx("span",{className:"text-purple-muted-300",children:"*"}),!!a&&p()]})}),s.jsx(By,{children:s.jsx(e,{...m,disabled:d,...l,readOnly:f,error:!!v.error})}),!!o&&g(),s.jsx(Wy,{})]})})},dw=S.forwardRef((e,t)=>s.jsx(vr,{...e,ref:t})),fw=S.forwardRef((e,t)=>er(dw)({...e,ref:t})),Gu=S.forwardRef(({options:e,placeholder:t,value:r,onChange:n,disabled:o,readOnly:a,error:i},l)=>{var m;const[u,d]=S.useState(!1),f=v=>{a||n&&n({target:{value:v}})},p=v=>{a||d(v)},g=v=>s.jsx(Ko,{value:v.value,disabled:v.disabled,children:s.jsxs("div",{className:"flex flex-col",children:[v.label,v.subLabel&&s.jsx("span",{className:"text-xs text-muted-foreground",style:{overflowWrap:"anywhere"},children:v.subLabel})]})},v.value);return s.jsxs(_l,{value:r,open:u,disabled:o,onValueChange:f,onOpenChange:p,children:[s.jsx(zo,{ref:l,readOnly:a,"aria-invalid":i||void 0,children:s.jsx(Al,{placeholder:t,children:r&&((m=e.find(v=>v.value===r))==null?void 0:m.label)})}),s.jsx(Ho,{children:e.map(g)})]})});Gu.displayName="BaseSelectComponent";const pw=er(Gu),mw=S.forwardRef((e,t)=>{const{options:r=[],onChange:n=()=>{},searchPlaceholder:o,onSearchChange:a,...i}=e,l=u=>{n({target:{value:u}})};return s.jsx(ea,{ref:t,options:r,onValueChange:l,searchPlaceholder:o,onSearchChange:a,...i})}),gw=er(mw);var va="Radio",[hw,Wu]=ye(va),[vw,xw]=hw(va),zu=c.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:o=!1,required:a,disabled:i,value:l="on",onCheck:u,form:d,...f}=e,[p,g]=c.useState(null),m=se(t,x=>g(x)),v=c.useRef(!1),h=p?d||!!p.closest("form"):!0;return s.jsxs(vw,{scope:r,checked:o,disabled:i,children:[s.jsx(X.button,{type:"button",role:"radio","aria-checked":o,"data-state":Ku(o),"data-disabled":i?"":void 0,disabled:i,value:l,...f,ref:m,onClick:F(e.onClick,x=>{o||u==null||u(),h&&(v.current=x.isPropagationStopped(),v.current||x.stopPropagation())})}),h&&s.jsx(Hu,{control:p,bubbles:!v.current,name:n,value:l,checked:o,required:a,disabled:i,form:d,style:{transform:"translateX(-100%)"}})]})});zu.displayName=va;var qu="RadioIndicator",Uu=c.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,a=xw(qu,r);return s.jsx(ke,{present:n||a.checked,children:s.jsx(X.span,{"data-state":Ku(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});Uu.displayName=qu;var bw="RadioBubbleInput",Hu=c.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{const i=c.useRef(null),l=se(i,a),u=Go(r),d=Fo(t);return c.useEffect(()=>{const f=i.current;if(!f)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(u!==r&&m){const v=new Event("click",{bubbles:n});m.call(f,r),f.dispatchEvent(v)}},[u,r,n]),s.jsx(X.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:l,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Hu.displayName=bw;function Ku(e){return e?"checked":"unchecked"}var yw=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],On="RadioGroup",[ww,sS]=ye(On,[Jt,Wu]),Yu=Jt(),Xu=Wu(),[Cw,Sw]=ww(On),Zu=c.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:a,required:i=!1,disabled:l=!1,orientation:u,dir:d,loop:f=!0,onValueChange:p,...g}=e,m=Yu(r),v=Ut(d),[h,x]=be({prop:a,defaultProp:o??null,onChange:p,caller:On});return s.jsx(Cw,{scope:r,name:n,required:i,disabled:l,value:h,onValueChange:x,children:s.jsx(oa,{asChild:!0,...m,orientation:u,dir:v,loop:f,children:s.jsx(X.div,{role:"radiogroup","aria-required":i,"aria-orientation":u,"data-disabled":l?"":void 0,dir:v,...g,ref:t})})})});Zu.displayName=On;var Ju="RadioGroupItem",Qu=c.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...o}=e,a=Sw(Ju,r),i=a.disabled||n,l=Yu(r),u=Xu(r),d=c.useRef(null),f=se(t,d),p=a.value===o.value,g=c.useRef(!1);return c.useEffect(()=>{const m=h=>{yw.includes(h.key)&&(g.current=!0)},v=()=>g.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",v)}},[]),s.jsx(aa,{asChild:!0,...l,focusable:!i,active:p,children:s.jsx(zu,{disabled:i,required:a.required,checked:p,...u,...o,name:a.name,ref:f,onCheck:()=>a.onValueChange(o.value),onKeyDown:F(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:F(o.onFocus,()=>{var m;g.current&&((m=d.current)==null||m.click())})})})});Qu.displayName=Ju;var Rw="RadioGroupIndicator",ed=c.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=Xu(r);return s.jsx(Uu,{...o,...n,ref:t})});ed.displayName=Rw;var Ew=Zu,kw=Qu,Pw=ed;function Nw({className:e,...t}){const{readOnly:r,...n}=t;return s.jsx(Ew,{"data-slot":"radio-group","data-readonly":r||void 0,disabled:n.disabled||r,className:_("qodo qodo-radio-group grid gap-3 group",e),...n})}function jw({className:e,...t}){return s.jsx(kw,{"data-slot":"radio-group-item",className:_("qodo qodo-radio-group-item dark:border-purple-muted-200 dark:text-purple-muted-200 focus-visible:border-ring focus-visible:ring-ring/50","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive","aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px]","disabled:cursor-not-allowed disabled:opacity-50","group-data-[readonly]:opacity-100 group-data-[readonly]:cursor-default","mt-[2px] mr-0",e),...t,children:s.jsx(Pw,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:s.jsx(cm,{className:"fill-purple-muted-200 absolute top-1/2 left-1/2 size-3 -translate-x-1/2 -translate-y-1/2"})})})}const xa=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o,disabled:a=!1,readOnly:i=!1,className:l,direction:u="horizontal",dir:d="ltr",name:f,onChange:p,...g}=e,m=h=>{i||(p==null||p({target:{value:h}}),o==null||o(h))},v=_("qodo qodo-custom-radio-group","flex",{"flex-row gap-6":u==="horizontal","flex-col gap-3":u==="vertical"},l);return s.jsx(Nw,{name:f,ref:t,value:r,defaultValue:n,onValueChange:m,disabled:a||i,readOnly:i,className:v,dir:d,...g})});xa.displayName="BaseRadioGroupComponent";const ba=({value:e="",disabled:t,error:r,name:n="radio",children:o,className:a})=>{const i=`${n}-${e}`;return s.jsxs(ku,{htmlFor:i,className:_("flex items-start p-4 rounded-lg gap-2 transition-all duration-200","font-normal text-purple-muted-200 dark:text-purple-muted-200 leading-5",{"cursor-pointer hover:bg-muted/50":!t,"opacity-50 !cursor-not-allowed hover:!bg-transparent":t,"border border-destructive":r},a),children:[s.jsx(jw,{value:e,id:i,disabled:t||r}),o]},e)};ba.displayName="RadioGroupItemComponent";const Tw=er(xa),_w=e=>s.jsx("hr",{className:"w-full h-px border-purple-muted-500",...e}),Aw=({children:e,description:t,className:r})=>s.jsxs("div",{className:_("space-y-1",r),children:[s.jsx("h2",{className:"flex items-center gap-2.5 text-2xl text-white",children:e}),t&&s.jsx("span",{className:"text-sm text-purple-muted-300",children:t})]}),td=S.forwardRef(({direction:e="horizontal",className:t,...r},n)=>{const o=_("flex flex-row gap-6",{"flex-col":e==="vertical"},t);return s.jsx("div",{ref:n,className:o,...r})});td.displayName="FormGroup";function Iw({className:e,rows:t,...r}){return s.jsx("textarea",{"data-slot":"textarea",rows:t,className:_("qodo qodo-textarea border-input px-3 py-2 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20","dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex min-h-16 w-full rounded-md border bg-transparent","placeholder:text-purple-muted-400 text-purple-muted-300 shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] selection:bg-primary selection:text-primary-foreground disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-purple-muted-700 disabled:border-purple-muted-500 disabled:text-purple-muted-400 read-only:bg-purple-muted-700 read-only:border-purple-muted-400 read-only:cursor-default read-only:text-purple-muted-200 md:text-sm",{"field-sizing-content":!t},e),...r})}const Mw=S.forwardRef((e,t)=>er(Iw)({...e,ref:t})),rd=({label:e,id:t,onRemoveTag:r,disabled:n,className:o,variant:a="tag"})=>s.jsxs(Pn,{variant:a,className:_("flex items-center gap-1 px-2 py-0.5","rounded-full text-xs font-normal whitespace-nowrap",o),children:[e,r&&s.jsx(Je,{type:"button",variant:"ghost",size:"icon",className:"hover:text-destructive p-0 w-[10px] h-[10px]",onClick:i=>{i.stopPropagation(),r==null||r(t)},"aria-label":`Remove ${e}`,disabled:n,children:s.jsx(un,{className:"w-[10px] h-[10px] text-[var(--icon-tag-emphasis-idle)] hover:text-[var(--icon-tag-emphasis-hover)]"})})]}),Ow=({label:e,id:t,onClick:r,onDeleteSuggestion:n,deleteText:o,className:a,tagClassName:i,tagVariant:l})=>s.jsx("div",{onClick:r,className:_("bg-transparent hover:bg-purple-muted-800 rounded-sm py-1 px-2",a),children:s.jsxs("div",{className:"flex w-full items-center justify-between gap-2",children:[s.jsx(rd,{label:e,id:t,className:i,variant:l}),n&&s.jsx(Je,{type:"button",variant:"ghost",className:"p-0 text-xs font-normal h-[10px]",onMouseDown:u=>u.preventDefault(),onClick:u=>{u.stopPropagation(),n==null||n(t)},"aria-label":`${o} ${e}`,children:o||s.jsx(Cm,{className:"h-4 w-4"})})]})}),ao={BACKSPACE:"Backspace",ESCAPE:"Escape",ENTER:"Enter"},Dw=e=>{if(!e)return"";let t=e.toLowerCase();return t=t.replace(/[_\s]+/g,"-"),t=t.replace(/[^a-z0-9-]/g,""),t=t.replace(/-+/g,"-"),t=t.replace(/^-|-$/g,""),t},nd=({value:e=[],variant:t="tag",placeholder:r="Type to add a tag...",deleteText:n="Delete",suggestions:o=[],allowCreate:a=!0,maxTags:i=100,disabled:l=!1,className:u,suggestionWrapperClassName:d,suggestionClassName:f,tagClassName:p,tagInputIcon:g,onDeleteSuggestion:m,onBlur:v,normalizeTags:h=Dw,onChange:x=()=>{},onAddTag:y=()=>{},onRemoveTag:b=()=>{},onResetTags:C=()=>{}})=>{const[R,P]=S.useState(""),[j,T]=S.useState(!1),E=S.useRef(null),V=S.useRef(null),U=S.useRef(null),[re,te]=S.useState();S.useEffect(()=>{V.current&&te(V.current.offsetWidth)},[]);const J=e.length>=i,q=M=>{if(J||e.some(I=>I.id===M.id))return;const G=[...e,M];x(G),y(M)},D=M=>{const G=e.filter(I=>I.id!==M);x(G),b(M)},A=()=>{x==null||x([]),C()},$=M=>{const G=M.target.value;P(G),T(!0)},k=()=>{const M=R.trim().toLowerCase();if(!M)return[];const G=new Set(e.map(I=>I.id));return o.filter(I=>I.label.toLowerCase().includes(M)&&!G.has(I.id))},O=M=>h?h(M):M,W=()=>{const M=R.trim();if(!M)return;const G=O(M);if(!G)return;if(e.some(Z=>Z.id===G)){P(""),T(!1);return}const I=o.find(Z=>Z.id===G||O(Z.label)===G);I?q(I):a&&q({id:G,label:G}),P(""),T(!1)},Q=M=>{const G=M.key===ao.BACKSPACE&&!R&&e.length>0,I=M.key===ao.ENTER&&R,Z=M.key===ao.ESCAPE;I?(M.preventDefault(),W(),U.current&&(U.current.scrollLeft=U.current.scrollWidth)):G?D(e[e.length-1].id):Z&&T(!1)},N=()=>{if(R&&k().length>0)return s.jsx(Rc,{className:"p-0 border-transparent bg-[var(--fill-interactive-neutral-idle)] gap-2",align:"start",style:{width:re??void 0},onOpenAutoFocus:M=>M.preventDefault(),onCloseAutoFocus:M=>M.preventDefault(),onMouseDown:M=>M.preventDefault(),children:s.jsx("div",{className:_("max-h-[200px] overflow-y-auto flex flex-col gap-1 p-1",d),children:k().map(M=>s.jsx(Ow,{label:M.label,id:M.id,onDeleteSuggestion:m,deleteText:n,className:f,tagClassName:p,tagVariant:t,onClick:()=>{var G;q(M),P(""),T(!1),(G=E.current)==null||G.focus()}},M.id))})})},B=()=>g||s.jsx(ym,{className:"h-4 w-4 stroke-[var(--icon-bg-neutral-mild)]"}),Y=()=>e.map(M=>s.jsx(rd,{label:M.label,id:M.id,onRemoveTag:D,disabled:l,className:p,variant:t},M.id));return s.jsx("div",{className:_("w-full",u),children:s.jsxs(Cc,{open:j&&!l,onOpenChange:T,modal:!1,children:[s.jsx(Sc,{className:"w-full",children:s.jsxs("div",{ref:V,tabIndex:-1,className:_("flex items-center gap-2 border border-[var(--border-tag-neutral-idle)] bg-background py-0.5 px-3 rounded-md scrollbar-thin",{"opacity-60":l}),onClick:M=>{var G;M.stopPropagation(),T(!0),(G=E.current)==null||G.focus()},children:[B(),s.jsxs("div",{ref:U,className:"flex items-center gap-2 w-full whitespace-normal overflow-x-auto",children:[Y(),s.jsx(vr,{ref:E,value:R,onChange:$,onClick:M=>M.stopPropagation(),onFocus:()=>T(!0),onBlur:v,onKeyDown:Q,placeholder:r,disabled:l||J,className:_("m-0 h-6.5 flex-1 min-w-[6rem] border-0 bg-transparent dark:bg-transparent p-0 shadow-none focus-visible:outline-none focus-visible:ring-0 font-normal text-xs","placeholder:text-[var(--text-input-neutral-placeholder)] dark:placeholder:text-[var(--text-input-neutral-placeholder)] placeholder:text-xs")})]}),s.jsx(un,{className:"h-4 w-4 hover:cursor-pointer text-[var(--icon-input-neutral-idle)] hover:text-[var(--icon-input-neutral-hover)]",onClick:A})]})}),N()]})})};function Lw(e){const{control:t}=Qt();return s.jsx(xu,{name:e.name,control:t,render:({field:r})=>s.jsx(nd,{...e,value:r.value,onChange:r.onChange,onBlur:r.onBlur})})}const $w=er(Lw),Ae=e=>{const{className:t,disabled:r=!1,readOnly:n=!1,methods:o,onSubmit:a=()=>{},...i}=e,{handleSubmit:l}=o,u=_("qodo qodo-form","flex flex-col gap-6",t);return s.jsx(yu,{methods:o,disabled:r,readOnly:n,children:s.jsx("form",{className:u,onSubmit:l(a),...i})})};Ae.Button=Py;Ae.Input=fw;Ae.Select=pw;Ae.Combobox=gw;Ae.RadioGroup=Tw;Ae.RadioGroupItem=ba;Ae.Group=td;Ae.Textarea=Mw;Ae.Divider=_w;Ae.Title=Aw;Ae.TagsInput=$w;function Fw(e){return e==null?[]:Array.isArray(e)?e:[e]}var Vw=e=>Array.from(Array(e).keys()),$s=e=>(e==null?void 0:e.constructor.name)==="Array",Bw=(e,t)=>{if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!ya(e[r],t[r]))return!1;return!0},ya=(e,t)=>{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof(e==null?void 0:e.isEqual)=="function"&&typeof(t==null?void 0:t.isEqual)=="function")return e.isEqual(t);if(typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();if($s(e)&&$s(t))return Bw(Array.from(e),Array.from(t));if(typeof e!="object"||typeof t!="object")return!1;const r=Object.keys(t??Object.create(null)),n=r.length;for(let o=0;o<n;o++)if(!Reflect.has(e,r[o]))return!1;for(let o=0;o<n;o++){const a=r[o];if(!ya(e[a],t[a]))return!1}return!0},Gw=e=>e!=null&&typeof e=="object",qr=e=>typeof e=="string",ir=e=>typeof e=="function",Ww=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),zw=e=>Object.prototype.toString.call(e),od=Function.prototype.toString,qw=od.call(Object),Uw=e=>{if(!Gw(e)||zw(e)!="[object Object]"||Yw(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const r=Ww(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&od.call(r)==qw},Hw=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,Kw=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,Yw=e=>Hw(e)||Kw(e),Xw=e=>e(),Zw=(...e)=>(...t)=>{e.forEach(function(r){r==null||r(...t)})},Jw=e=>Number.isNaN(e),Qw=e=>Jw(e)?0:e,e0=(e,t,r)=>{const n=Qw(e),o=n>=t,a=r==null||n<=r;return o&&a};function ad(e){if(!Uw(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(n=>typeof n=="string"),r={};for(const n of t){const o=e[n];o!==void 0&&(r[n]=ad(o))}return r}function Fs(...e){const t=e.length===1?e[0]:e[1];(e.length===2?e[0]:!0)&&process.env.NODE_ENV!=="production"&&console.warn(t)}function t0(e,t){if(e==null)throw new Error(t())}var sd=e=>typeof e=="object"&&e!==null,Ge=e=>e?"":void 0,r0=9,n0=e=>sd(e)&&e.nodeType===r0,o0=e=>sd(e)&&e===e.window;function a0(e){if(!e)return!1;const t=e.getRootNode();return id(t)===e}function s0(e){return n0(e)?e:o0(e)?e.document:(e==null?void 0:e.ownerDocument)??document}function id(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const r=t.shadowRoot.activeElement;if(!r||r===t)break;t=r}return t}var i0=(...e)=>e.map(t=>{var r;return(r=t==null?void 0:t.trim)==null?void 0:r.call(t)}).filter(Boolean).join(" "),l0=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Vs=e=>{const t={};let r;for(;r=l0.exec(e);)t[r[1]]=r[2];return t},c0=(e,t)=>{if(qr(e)){if(qr(t))return`${e};${t}`;e=Vs(e)}else qr(t)&&(t=Vs(t));return Object.assign({},e??{},t??{})};function Ve(...e){let t={};for(let r of e){if(!r)continue;for(let o in t){if(o.startsWith("on")&&typeof t[o]=="function"&&typeof r[o]=="function"){t[o]=Zw(r[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=i0(t[o],r[o]);continue}if(o==="style"){t[o]=c0(t[o],r[o]);continue}t[o]=r[o]!==void 0?r[o]:t[o]}for(let o in r)t[o]===void 0&&(t[o]=r[o]);const n=Object.getOwnPropertySymbols(r);for(let o of n)t[o]=r[o]}return t}function u0(e,t,r){let n=[],o;return a=>{const i=e(a);return(i.length!==n.length||i.some((u,d)=>!ya(n[d],u)))&&(n=i,o=t(i,a)),o}}var Lt=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Lt||{}),so="__init__";function d0(e){const t=()=>{var i;return((i=e.getRootNode)==null?void 0:i.call(e))??document},r=()=>s0(t());return{...e,getRootNode:t,getDoc:r,getWin:()=>r().defaultView??window,getActiveElement:()=>id(t()),isActiveElement:a0,getById:i=>t().getElementById(i)}}function f0(e){return new Proxy({},{get(t,r){return r==="style"?n=>e({style:n}).style:e}})}var p0=()=>e=>Array.from(new Set(e)),ld=typeof globalThis.document<"u"?S.useLayoutEffect:S.useEffect;function nn(e){const t=e().value??e().defaultValue,r=e().isEqual??Object.is,[n]=S.useState(t),[o,a]=S.useState(n),i=e().value!==void 0,l=S.useRef(o);l.current=i?e().value:o;const u=S.useRef(l.current);ld(()=>{u.current=l.current},[o,e().value]);const d=p=>{var v,h;const g=u.current,m=ir(p)?p(g):p;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:m,prev:g}),i||a(m),r(m,g)||(h=(v=e()).onChange)==null||h.call(v,m,g)};function f(){return i?e().value:o}return{initial:n,ref:l,get:f,set(p){(e().sync?hr.flushSync:Xw)(()=>d(p))},invoke(p,g){var m,v;(v=(m=e()).onChange)==null||v.call(m,p,g)},hash(p){var g,m;return((m=(g=e()).hash)==null?void 0:m.call(g,p))??String(p)}}}nn.cleanup=e=>{S.useEffect(()=>e,[])};nn.ref=e=>{const t=S.useRef(e);return{get:()=>t.current,set:r=>{t.current=r}}};function m0(e){const t=S.useRef(e);return{get(r){return t.current[r]},set(r,n){t.current[r]=n}}}var g0=(e,t)=>{const r=S.useRef(!1),n=S.useRef(!1);S.useEffect(()=>{if(r.current&&n.current)return t();n.current=!0},[...(e??[]).map(o=>typeof o=="function"?o():o)]),S.useEffect(()=>(r.current=!0,()=>{r.current=!1}),[])};function h0(e,t={}){var re,te,J,q;const r=S.useMemo(()=>{const{id:D,ids:A,getRootNode:$}=t;return d0({id:D,ids:A,getRootNode:$})},[t]),n=(...D)=>{e.debug&&console.log(...D)},o=((re=e.props)==null?void 0:re.call(e,{props:ad(t),scope:r}))??t,a=v0(o),i=(te=e.context)==null?void 0:te.call(e,{prop:a,bindable:nn,scope:r,flush:Bs,getContext(){return u},getComputed(){return P},getRefs(){return h},getEvent(){return m()}}),l=cd(i),u={get(D){var A;return(A=l.current)==null?void 0:A[D].ref.current},set(D,A){var $;($=l.current)==null||$[D].set(A)},initial(D){var A;return(A=l.current)==null?void 0:A[D].initial},hash(D){var $,k;const A=($=l.current)==null?void 0:$[D].get();return(k=l.current)==null?void 0:k[D].hash(A)}},d=S.useRef(new Map),f=S.useRef(null),p=S.useRef(null),g=S.useRef({type:""}),m=()=>({...g.current,current(){return g.current},previous(){return p.current}}),v=()=>({...j,matches(...D){return D.includes(j.ref.current)},hasTag(D){var A,$;return!!(($=(A=e.states[j.ref.current])==null?void 0:A.tags)!=null&&$.includes(D))}}),h=m0(((J=e.refs)==null?void 0:J.call(e,{prop:a,context:u}))??{}),x=()=>({state:v(),context:u,event:m(),prop:a,send:U,action:y,guard:b,track:g0,refs:h,computed:P,flush:Bs,scope:r,choose:R}),y=D=>{const A=ir(D)?D(x()):D;if(!A)return;const $=A.map(k=>{var W,Q;const O=(Q=(W=e.implementations)==null?void 0:W.actions)==null?void 0:Q[k];return O||Fs(`[zag-js] No implementation found for action "${JSON.stringify(k)}"`),O});for(const k of $)k==null||k(x())},b=D=>{var A,$;return ir(D)?D(x()):($=(A=e.implementations)==null?void 0:A.guards)==null?void 0:$[D](x())},C=D=>{const A=ir(D)?D(x()):D;if(!A)return;const $=A.map(O=>{var Q,N;const W=(N=(Q=e.implementations)==null?void 0:Q.effects)==null?void 0:N[O];return W||Fs(`[zag-js] No implementation found for effect "${JSON.stringify(O)}"`),W}),k=[];for(const O of $){const W=O==null?void 0:O(x());W&&k.push(W)}return()=>k.forEach(O=>O==null?void 0:O())},R=D=>Fw(D).find(A=>{let $=!A.guard;return qr(A.guard)?$=!!b(A.guard):ir(A.guard)&&($=A.guard(x())),$}),P=D=>{t0(e.computed,()=>"[zag-js] No computed object found on machine");const A=e.computed[D];return A({context:u,event:m(),prop:a,refs:h,scope:r,computed:P})},j=nn(()=>({defaultValue:e.initialState({prop:a}),onChange(D,A){var k,O,W,Q;if(A){const N=d.current.get(A);N==null||N(),d.current.delete(A)}A&&y((k=e.states[A])==null?void 0:k.exit),y((O=f.current)==null?void 0:O.actions);const $=C((W=e.states[D])==null?void 0:W.effects);if($&&d.current.set(D,$),A===so){y(e.entry);const N=C(e.effects);N&&d.current.set(so,N)}y((Q=e.states[D])==null?void 0:Q.entry)}})),T=S.useRef(void 0),E=S.useRef(Lt.NotStarted);ld(()=>{queueMicrotask(()=>{const $=E.current===Lt.Started;E.current=Lt.Started,n($?"rehydrating...":"initializing...");const k=T.current??j.initial;j.invoke(k,$?j.get():so)});const D=d.current,A=j.ref.current;return()=>{n("unmounting..."),T.current=A,E.current=Lt.Stopped,D.forEach($=>$==null?void 0:$()),d.current=new Map,f.current=null,queueMicrotask(()=>{y(e.exit)})}},[]);const V=()=>"ref"in j?j.ref.current:j.get(),U=D=>{queueMicrotask(()=>{var Q,N;if(E.current!==Lt.Started)return;p.current=g.current,g.current=D;let A=V();const $=((Q=e.states[A].on)==null?void 0:Q[D.type])??((N=e.on)==null?void 0:N[D.type]),k=R($);if(!k)return;f.current=k;const O=k.target??A;n("transition",D.type,k.target||A,`(${k.actions})`);const W=O!==A;W?hr.flushSync(()=>j.set(O)):k.reenter&&!W?j.invoke(A,A):y(k.actions??[])})};return(q=e.watch)==null||q.call(e,x()),{state:v(),send:U,context:u,prop:a,scope:r,refs:h,computed:P,event:m(),getStatus:()=>E.current}}function cd(e){const t=S.useRef(e);return t.current=e,t}function v0(e){const t=cd(e);return function(n){return t.current[n]}}function Bs(e){queueMicrotask(()=>{hr.flushSync(()=>e())})}var x0=f0(e=>e);function b0(...e){return t=>{const r=[];for(const n of e)if(typeof n=="function"){const o=n(t);typeof o=="function"&&r.push(o)}else n&&(n.current=t);if(r.length)return()=>{for(const n of r)n()}}}function y0(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const io=e=>{const t=S.memo(S.forwardRef((r,n)=>{const{asChild:o,children:a,...i}=r;if(!o)return S.createElement(e,{...i,ref:n},a);if(!S.isValidElement(a))return null;const l=S.Children.only(a),u=y0(l);return S.cloneElement(l,{...Ve(i,l.props),ref:n?b0(n,u):u})}));return t.displayName=e.displayName||e.name,t},w0=()=>{const e=new Map;return new Proxy(io,{apply(t,r,n){return io(n[0])},get(t,r){const n=r;return e.has(n)||e.set(n,io(n)),e.get(n)}})},Ye=w0();function C0(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Pr(e={}){const{name:t,strict:r=!0,hookName:n="useContext",providerName:o="Provider",errorMessage:a,defaultValue:i}=e,l=S.createContext(i);l.displayName=t;function u(){var f;const d=S.useContext(l);if(!d&&r){const p=new Error(a??C0(n,o));throw p.name="ContextError",(f=Error.captureStackTrace)==null||f.call(Error,p,u),p}return d}return[l.Provider,u,l]}const[S0,rt]=Pr({name:"StepsContext",hookName:"useStepsContext",providerName:"<StepsProvider />"}),ud=S.forwardRef((e,t)=>{const r=rt(),n=Ve(r.getContentProps({index:r.count}),e);return s.jsx(Ye.div,{...n,ref:t})});ud.displayName="StepsCompletedContent";const wa=()=>(e,t)=>t.reduce((r,n)=>{const[o,a]=r,i=n;return a[i]!==void 0&&(o[i]=a[i]),delete a[i],[o,a]},[{},{...e}]),dd=S.forwardRef((e,t)=>{const[r,n]=wa()(e,["index"]),o=rt(),a=Ve(o.getContentProps(r),n);return s.jsx(Ye.div,{...a,ref:t})});dd.displayName="StepsContent";const[R0,Ca]=Pr({name:"StepsItemPropsContext",hookName:"useStepsItemPropsContext",providerName:"<StepsItemPropsProvider />"}),fd=S.forwardRef((e,t)=>{const r=rt(),n=Ca(),o=Ve(r.getIndicatorProps(n),e);return s.jsx(Ye.div,{...o,ref:t})});fd.displayName="StepsIndicator";const[E0,iS]=Pr({name:"StepsItemContext",hookName:"useStepsItemContext",providerName:"<StepsItem />"}),pd=S.forwardRef((e,t)=>{const[r,n]=wa()(e,["index"]),o=rt(),a=Ve(o.getItemProps(r),n),i=o.getItemState(r);return s.jsx(R0,{value:r,children:s.jsx(E0,{value:i,children:s.jsx(Ye.div,{...a,ref:t})})})});pd.displayName="StepsItem";const md=S.forwardRef((e,t)=>{const r=rt(),n=Ve(r.getListProps(),e);return s.jsx(Ye.div,{...n,ref:t})});md.displayName="StepsList";const gd=S.forwardRef((e,t)=>{const r=rt(),n=Ve(r.getNextTriggerProps(),e);return s.jsx(Ye.button,{...n,ref:t})});gd.displayName="StepsNextTrigger";const hd=S.forwardRef((e,t)=>{const r=rt(),n=Ve(r.getPrevTriggerProps(),e);return s.jsx(Ye.button,{...n,ref:t})});hd.displayName="StepsPrevTrigger";var lr=(e,t=[])=>({parts:(...r)=>{if(k0(t))return lr(e,r);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...r)=>lr(e,[...t,...r]),omit:(...r)=>lr(e,t.filter(n=>!r.includes(n))),rename:r=>lr(r,t),keys:()=>t,build:()=>[...new Set(t)].reduce((r,n)=>Object.assign(r,{[n]:{selector:[`&[data-scope="${Mt(e)}"][data-part="${Mt(n)}"]`,`& [data-scope="${Mt(e)}"][data-part="${Mt(n)}"]`].join(", "),attrs:{"data-scope":Mt(e),"data-part":Mt(n)}}}),{})}),Mt=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),k0=e=>e.length===0,P0=lr("steps").parts("root","list","item","trigger","indicator","separator","content","nextTrigger","prevTrigger","progress"),We=P0.build(),N0=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`steps:${e.id}`},j0=e=>{var t;return((t=e.ids)==null?void 0:t.list)??`steps:${e.id}:list`},Gs=(e,t)=>{var r,n;return((n=(r=e.ids)==null?void 0:r.triggerId)==null?void 0:n.call(r,t))??`steps:${e.id}:trigger:${t}`},T0=(e,t)=>{var r,n;return((n=(r=e.ids)==null?void 0:r.contentId)==null?void 0:n.call(r,t))??`steps:${e.id}:content:${t}`};function _0(e,t){const{context:r,send:n,computed:o,prop:a,scope:i}=e,l=r.get("step"),u=a("count"),d=o("percent"),f=o("hasNextStep"),p=o("hasPrevStep"),g=y=>({triggerId:Gs(i,y.index),contentId:T0(i,y.index),current:y.index===l,completed:y.index<l,incomplete:y.index>l,index:y.index,first:y.index===0,last:y.index===u-1}),m=()=>{n({type:"STEP.NEXT",src:"next.trigger.click"})},v=()=>{n({type:"STEP.PREV",src:"prev.trigger.click"})},h=()=>{n({type:"STEP.RESET",src:"reset.trigger.click"})},x=y=>{n({type:"STEP.SET",value:y,src:"api.setValue"})};return{value:l,count:u,percent:d,hasNextStep:f,hasPrevStep:p,isCompleted:o("completed"),goToNextStep:m,goToPrevStep:v,resetStep:h,getItemState:g,setStep:x,getRootProps(){return t.element({...We.root.attrs,id:N0(i),dir:a("dir"),"data-orientation":a("orientation"),style:{"--percent":`${d}%`}})},getListProps(){const b=Vw(u).map((C,R)=>Gs(i,R));return t.element({...We.list.attrs,dir:a("dir"),id:j0(i),role:"tablist","aria-owns":b.join(" "),"aria-orientation":a("orientation"),"data-orientation":a("orientation")})},getItemProps(y){const b=g(y);return t.element({...We.item.attrs,dir:a("dir"),"aria-current":b.current?"step":void 0,"data-orientation":a("orientation")})},getTriggerProps(y){const b=g(y);return t.button({...We.trigger.attrs,id:b.triggerId,role:"tab",dir:a("dir"),tabIndex:!a("linear")||b.current?0:-1,"aria-selected":b.current,"aria-controls":b.contentId,"data-state":b.current?"open":"closed","data-orientation":a("orientation"),"data-complete":Ge(b.completed),"data-current":Ge(b.current),"data-incomplete":Ge(b.incomplete),onClick(C){C.defaultPrevented||a("linear")||n({type:"STEP.SET",value:y.index,src:"trigger.click"})}})},getContentProps(y){const b=g(y);return t.element({...We.content.attrs,dir:a("dir"),id:b.contentId,role:"tabpanel",tabIndex:0,hidden:!b.current,"data-state":b.current?"open":"closed","data-orientation":a("orientation"),"aria-labelledby":b.triggerId})},getIndicatorProps(y){const b=g(y);return t.element({...We.indicator.attrs,dir:a("dir"),"aria-hidden":!0,"data-complete":Ge(b.completed),"data-current":Ge(b.current),"data-incomplete":Ge(b.incomplete)})},getSeparatorProps(y){const b=g(y);return t.element({...We.separator.attrs,dir:a("dir"),"data-orientation":a("orientation"),"data-complete":Ge(b.completed),"data-current":Ge(b.current),"data-incomplete":Ge(b.incomplete)})},getNextTriggerProps(){return t.button({...We.nextTrigger.attrs,dir:a("dir"),type:"button",disabled:!f,onClick(y){y.defaultPrevented||m()}})},getPrevTriggerProps(){return t.button({dir:a("dir"),...We.prevTrigger.attrs,type:"button",disabled:!p,onClick(y){y.defaultPrevented||v()}})},getProgressProps(){return t.element({dir:a("dir"),...We.progress.attrs,role:"progressbar","aria-valuenow":d,"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":`${d}% complete`,"data-complete":Ge(d===100)})}}}var A0={props({props:e}){return{defaultStep:0,count:1,linear:!1,orientation:"horizontal",...e}},context({prop:e,bindable:t}){return{step:t(()=>({defaultValue:e("defaultStep"),value:e("step"),onChange(r){var o,a;(o=e("onStepChange"))==null||o({step:r}),r==e("count")&&((a=e("onStepComplete"))==null||a())}}))}},computed:{percent:u0(({context:e,prop:t})=>[e.get("step"),t("count")],([e,t])=>e/t*100),hasNextStep:({context:e,prop:t})=>e.get("step")<t("count"),hasPrevStep:({context:e})=>e.get("step")>0,completed:({context:e,prop:t})=>e.get("step")===t("count")},initialState(){return"idle"},entry:["validateStep"],states:{idle:{on:{"STEP.SET":{actions:["setStep"]},"STEP.NEXT":{actions:["goToNextStep"]},"STEP.PREV":{actions:["goToPrevStep"]},"STEP.RESET":{actions:["resetStep"]}}}},implementations:{actions:{goToNextStep({context:e,prop:t}){const r=Math.min(e.get("step")+1,t("count"));e.set("step",r)},goToPrevStep({context:e}){const t=Math.max(e.get("step")-1,0);e.set("step",t)},resetStep({context:e}){e.set("step",0)},setStep({context:e,event:t}){e.set("step",t.value)},validateStep({context:e,prop:t}){I0(t("count"),e.get("step"))}}}},I0=(e,t)=>{if(!e0(t,0,e))throw new RangeError(`[zag-js/steps] step index ${t} is out of bounds`)};p0()(["count","dir","getRootNode","id","ids","linear","onStepChange","onStepComplete","orientation","step","defaultStep"]);const[lS,M0]=Pr({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[cS,O0]=Pr({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}});function D0(e){const t=S.useId(),{getRootNode:r}=M0(),{dir:n}=O0(),o={id:t,dir:n,getRootNode:r,...e},a=h0(A0,o);return _0(a,x0)}const vd=S.forwardRef((e,t)=>{const[r,n]=wa()(e,["defaultStep","id","ids","count","linear","onStepChange","onStepComplete","orientation","step"]),o=D0(r),a=Ve(o.getRootProps(),n);return s.jsx(S0,{value:o,children:s.jsx(Ye.div,{...a,ref:t})})});vd.displayName="StepsRoot";const xd=S.forwardRef((e,t)=>{const r=rt(),n=Ca(),o=Ve(r.getSeparatorProps(n),e);return s.jsx(Ye.div,{...o,ref:t})});xd.displayName="StepsSeparator";const bd=S.forwardRef((e,t)=>{const r=rt(),n=Ca(),o=Ve(r.getTriggerProps(n),e);return s.jsx(Ye.button,{...o,ref:t})});bd.displayName="StepsTrigger";function L0(e){return Ru({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M20 6 9 17l-5-5"},child:[]}]})(e)}const yd=S.createContext(void 0),$0=({children:e,step:t})=>s.jsx(yd.Provider,{value:{step:t},children:e}),wd=()=>{const e=S.useContext(yd);if(!e)throw new Error("useSteps must be used within a StepsProvider");return e},F0=({className:e,step:t,...r})=>{const n=_("qodo qodo-steps","flex flex-col gap-4",e);return s.jsx($0,{step:t??0,children:s.jsx(vd,{className:n,step:t,...r})})},V0=({className:e,...t})=>{const r=_("flex flex-row gap-4",e);return s.jsx(md,{className:r,...t})},B0=({className:e,...t})=>{const r=_("flex flex-row items-center gap-4",e);return s.jsx(pd,{className:r,...t})},G0=({className:e,...t})=>{const r=_("flex flex-row items-center gap-4 text-purple-muted-100 text-sm",e);return s.jsx(bd,{className:r,...t})},W0=({index:e,className:t,...r})=>{const{step:n}=wd(),o=e===n,a=e<n,i=_("flex items-center justify-center w-8 h-8 rounded-full text-white",a&&"bg-green-700",o&&"bg-green-600",!a&&!o&&"bg-purple-muted-500",t),l=_({"text-white":o,"text-purple-muted-300":!a&&e!==n});return s.jsx(fd,{className:i,...r,children:a?s.jsx(L0,{className:"text-green-400"}):s.jsx("span",{className:l,children:e+1})})},z0=({index:e,className:t,...r})=>{const{step:n}=wd(),o=e<n,a=_("min-w-12 h-px",o?"bg-green-400":"bg-gray-400",t);return s.jsx(xd,{className:a,...r})},q0=({className:e,...t})=>{const r=_(e);return s.jsx(dd,{className:r,...t})},U0=({className:e,...t})=>{const r=_(e);return s.jsx(ud,{className:r,...t})},H0=({className:e,...t})=>{const r=_("bg-primary text-white px-4 py-2 rounded-md",e);return s.jsx(hd,{className:r,...t})},K0=({className:e,...t})=>{const r=_("bg-primary text-white px-4 py-2 rounded-md",e);return s.jsx(gd,{className:r,...t})},Y0={Root:F0,List:V0,Item:B0,Trigger:G0,Indicator:W0,Separator:z0,Content:q0,CompletedContent:U0,PrevTrigger:H0,NextTrigger:K0},Nr=({children:e,content:t,providerProps:r={},triggerProps:n={},contentProps:o={}})=>s.jsx($u,{...r,children:s.jsxs(Fu,{children:[s.jsx(Vu,{...n,children:e}),t&&s.jsx(Bu,{...o,children:t})]})});/**
195
195
  * react-table
196
196
  *
197
197
  * Copyright (c) TanStack
@@ -200,5 +200,5 @@ Defaulting to \`null\`.`}var mb=Rc,gb=kc;function hb({className:e,value:t,...r})
200
200
  * LICENSE.md file in the root directory of this source tree.
201
201
  *
202
202
  * @license MIT
203
- */function Ws(e,t){return e?X0(e)?c.createElement(e,t):e:null}function X0(e){return Z0(e)||typeof e=="function"||J0(e)}function Z0(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function J0(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}const wd=c.forwardRef(({className:e,wrapperClassName:t,...r},n)=>s.jsx("div",{className:_("max-h-[100%] min-h-0 overflow-auto rounded-lg border border-purple-muted-600",t),children:s.jsx("table",{ref:n,className:_("w-full caption-bottom text-sm",e),...r})}));wd.displayName="Table";const Cd=c.forwardRef(({className:e,...t},r)=>s.jsx("thead",{ref:r,className:_("sticky top-0 z-10 b-0 [&>tr]:hover:bg-transparent",e),...t}));Cd.displayName="TableHeader";const Sd=c.forwardRef(({className:e,...t},r)=>s.jsx("tbody",{ref:r,className:_("[&_tr:last-child]:border-0 [&_tr:first-child]:border-top-0",e),...t}));Sd.displayName="TableBody";const Q0=c.forwardRef(({className:e,...t},r)=>s.jsx("tfoot",{ref:r,className:_("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));Q0.displayName="TableFooter";const bt=c.forwardRef(({className:e,...t},r)=>s.jsx("tr",{ref:r,className:_("border-b border-purple-muted-600 transition-colors hover:bg-muted/50 data-[state=selected]:bg-purple-muted-600/30",e,{"cursor-pointer hover:bg-purple-muted-600/20":!!t.onClick}),...t}));bt.displayName="TableRow";const Rd=c.forwardRef(({className:e,...t},r)=>s.jsx("th",{ref:r,className:_("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Rd.displayName="TableHead";const $t=c.forwardRef(({className:e,...t},r)=>s.jsx("td",{ref:r,className:_("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));$t.displayName="TableCell";const eC=c.forwardRef(({className:e,...t},r)=>s.jsx("caption",{ref:r,className:_("mt-4 text-sm text-muted-foreground",e),...t}));eC.displayName="TableCaption";const tC=({title:e="No results"})=>s.jsx("div",{className:"grid place-items-center text-foreground h-full w-full p-14",children:e}),rC=({columnsCount:e,rowsCount:t=8})=>s.jsx(s.Fragment,{children:Array.from({length:t}).map((r,n)=>s.jsx(bt,{children:Array.from({length:e}).map((o,a)=>s.jsx($t,{children:s.jsx(Nc,{className:"h-5.5 w-full"})},`loading-cell-${a}`))},`loading-row-${n}`))}),nC=e=>s.jsxs("svg",{width:"280",height:"195",viewBox:"0 0 280 195",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[s.jsxs("g",{clipPath:"url(#clip0_65_2990)",children:[s.jsx("path",{d:"M228.918 10.4603L230.958 3.72536C230.958 3.72536 232.388 0.863297 235.828 2.69334C238.748 4.24674 237.388 7.1514 237.388 7.1514L233.008 13.2586",fill:"white"}),s.jsx("path",{d:"M228.918 10.4603L230.958 3.72536C230.958 3.72536 232.388 0.863297 235.828 2.69334C238.748 4.24674 237.388 7.1514 237.388 7.1514L233.008 13.2586",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M101.487 163.737L94.1771 171.823L88.0371 163.237L78.7071 173.664L73.6671 165.003L63.3071 174.856L60.1271 165.886L48.9371 176.473L45.0671 167.067L33.8771 177.952L30.2871 168.983L19.0971 179.718L14.7971 170.217L3.80712 180.654C-12.9029 120.029 66.1271 113.464 81.2071 111.017C96.2871 108.57 99.7371 98.9092 99.7371 98.9092",fill:"black"}),s.jsx("path",{d:"M101.487 163.737L94.1771 171.823L88.0371 163.237L78.7071 173.664L73.6671 165.003L63.3071 174.856L60.1271 165.886L48.9371 176.473L45.0671 167.067L33.8771 177.952L30.2871 168.983L19.0971 179.718L14.7971 170.217L3.80712 180.654C-12.9029 120.029 66.1271 113.464 81.2071 111.017C96.2871 108.57 99.7371 98.9092 99.7371 98.9092",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M184.735 116.039L184.055 126.562L179.015 117.805L177.675 127.434L172.555 118.933",fill:"white"}),s.jsx("path",{d:"M184.735 116.039L184.055 126.562L179.015 117.805L177.675 127.434L172.555 118.933",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M201.748 52.7432C212.638 77.3529 211.728 113.549 173.418 118.763L201.748 52.7432Z",fill:"white"}),s.jsx("path",{d:"M201.748 52.7432C212.638 77.3529 211.728 113.549 173.418 118.763",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M169.278 124.402C172.948 139.926 177.038 167.153 156.118 183.549C156.118 183.549 179.558 182.261 179.558 193.316H139.768C139.768 193.316 139.898 186.251 144.708 183.666C144.708 183.666 130.798 176.484 130.168 154.715L130.468 141.394",fill:"white"}),s.jsx("path",{d:"M169.278 124.402C172.948 139.926 177.038 167.153 156.118 183.549C156.118 183.549 179.558 182.261 179.558 193.316H139.768C139.768 193.316 139.898 186.251 144.708 183.666C144.708 183.666 130.798 176.484 130.168 154.715L130.468 141.394",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M89.0353 182.686C75.1053 138.51 106.825 68.8089 143.315 34.4425C185.995 -5.7651 243.385 -13.4257 278.755 68.5323L270.145 71.5115C270.365 71.6285 238.435 46.4974 222.705 46.4974C217.675 46.4974 214.215 50.2532 210.675 54.6687C192.345 77.5336 173.815 147.99 131.485 147.905C131.485 147.905 132.205 179.43 99.6853 183.92C99.6853 183.92 124.525 182.282 124.525 193.315H83.9453C84.2153 192.709 83.5353 185.016 89.0453 182.686H89.0353Z",fill:"white",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M130.318 157.438C130.318 157.438 133.678 142.638 127.758 131.765",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M216.647 40.9229L202.547 62.1066",stroke:"black",strokeWidth:"3",strokeLinejoin:"round"}),s.jsx("path",{d:"M206.769 13.823L204.079 6.74764C204.079 6.74764 201.969 2.55554 206.769 1.45965C211.259 0.427586 211.509 4.64092 211.509 4.64092L211.529 12.8974",fill:"white"}),s.jsx("path",{d:"M206.769 13.823L204.079 6.74764C204.079 6.74764 201.969 2.55554 206.769 1.45965C211.259 0.427586 211.509 4.64092 211.509 4.64092L211.529 12.8974",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M200.648 56.6694L209.918 53.4668L205.068 60.2018L211.528 59.0633L206.258 64.6492L211.688 64.6917L204.468 70.6181",fill:"white"}),s.jsx("path",{d:"M200.648 56.6694L209.918 53.4668L205.068 60.2018L211.528 59.0633L206.258 64.6492L211.688 64.6917L204.468 70.6181",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M152.234 77.7571C159.214 84.7474 169.364 89.9397 178.244 89.9397C193.344 89.9397 208.224 73.6821 204.564 59.1163C204.074 57.1692 202.094 56.1158 200.334 56.8393L182.354 64.1808C181.694 64.4468 180.974 64.4894 180.304 64.2659C177.674 63.4147 170.604 60.5952 163.084 53.1367",fill:"white"}),s.jsx("path",{d:"M152.234 77.7571C159.214 84.7474 169.364 89.9397 178.244 89.9397C193.344 89.9397 208.224 73.6821 204.564 59.1163C204.074 57.1692 202.094 56.1158 200.334 56.8393L182.354 64.1808C181.694 64.4468 180.974 64.4894 180.304 64.2659C177.674 63.4147 170.604 60.5952 163.084 53.1367",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M275.767 61.9785L263.938 66.8728L270.147 71.5118L278.568 68.3517L275.767 61.9785Z",fill:"#7A68FA",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M225.147 40.4968C231.289 40.4968 236.267 35.1997 236.267 28.6654C236.267 22.1311 231.289 16.834 225.147 16.834C219.006 16.834 214.027 22.1311 214.027 28.6654C214.027 35.1997 219.006 40.4968 225.147 40.4968Z",fill:"white",stroke:"black",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M225.147 32.9536C227.373 32.9536 229.177 31.0338 229.177 28.6657C229.177 26.2976 227.373 24.3779 225.147 24.3779C222.921 24.3779 221.117 26.2976 221.117 28.6657C221.117 31.0338 222.921 32.9536 225.147 32.9536Z",fill:"black"}),s.jsx("path",{d:"M244.89 26.0693L240.93 29.623L245.78 32.6128",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M220.18 55.8399C220.18 55.8399 223.26 53.4567 227.08 54.9675",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M223.938 59.5836C223.938 59.5836 227.918 58.2004 230.658 60.4986",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),s.jsx("defs",{children:s.jsx("clipPath",{id:"clip0_65_2990",children:s.jsx("rect",{width:"279",height:"195",fill:"white",transform:"translate(0.5)"})})})]}),zs=({title:e="There's nothing to show",description:t="No items to display"})=>s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-14",children:[s.jsx(nC,{className:"mb-6"}),s.jsx("h4",{className:"mb-1 text-foreground",children:e}),s.jsx("p",{className:"text-purple-muted-300",children:t})]}),Ed=({className:e,...t})=>s.jsx("nav",{role:"navigation","aria-label":"pagination",className:_("qodo qodo-pagination mx-auto flex w-full justify-center",e),...t});Ed.displayName="Pagination";const kd=c.forwardRef(({className:e,...t},r)=>s.jsx("ul",{ref:r,className:_("flex flex-row items-center gap-1",e),...t}));kd.displayName="PaginationContent";const cr=c.forwardRef(({className:e,...t},r)=>s.jsx("li",{ref:r,className:_("",e),...t}));cr.displayName="PaginationItem";const Pd=({className:e,isActive:t,size:r="icon",...n})=>s.jsx("a",{"aria-current":t?"page":void 0,className:_(ii({variant:t?"outline":"ghost",size:r}),e),...n});Pd.displayName="PaginationLink";const Nd=({className:e,...t})=>s.jsxs("span",{"aria-hidden":!0,className:_("flex h-9 w-9 items-center justify-center",e),...t,children:[s.jsx(Nl,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"More pages"})]});Nd.displayName="PaginationEllipsis";const oC=({table:e,isLoading:t=!1})=>{const r=e.getPageCount(),n=e.getState().pagination.pageIndex+1,[o,a]=S.useState(r);S.useEffect(()=>{r>=1&&a(r)},[r]);const i=S.useMemo(()=>{const m="text-purple-muted-300 dark:text-purple-muted-300",v="hover:bg-purple-muted-600 hover:text-purple-muted-300 dark:hover:bg-purple-muted-600 dark:hover:text-purple-muted-300",h="bg-purple-muted-600 text-purple-muted-300 dark:bg-purple-muted-600 dark:text-purple-muted-300",x="border-none flex items-center justify-center w-8 h-8",y="pointer-events-none opacity-50 cursor-not-allowed";return{previous:_(n===1||t?"pointer-events-none opacity-50":"cursor-pointer",x,m,t&&y),next:_(n===r||t?"pointer-events-none opacity-50":"cursor-pointer",x,m,t&&y),link:b=>_(x,t?"cursor-not-allowed":"cursor-pointer",m,!t&&v,b&&h,t&&y)}},[n,r,t]),l=S.useCallback(m=>{if(t)return;const v=m-1;e.setPagination(h=>({...h,pageIndex:v}))},[e,t]),u=S.useCallback(()=>{t||n<=1||l(n-1)},[n,l,t]),d=S.useCallback(()=>{t||r<=1||n>=r||l(n+1)},[r,n,l,t]),f=S.useCallback(m=>{if(m<=1)return[];if(m<=7)return Array.from({length:m},(h,x)=>x+1);const v=[];return n<=4?v.push(1,2,3,4,5,"ellipsis",m):n>=m-3?v.push(1,"ellipsis",m-4,m-3,m-2,m-1,m):v.push(1,"ellipsis",n-1,n,n+1,"ellipsis",m),v},[n]),p=S.useMemo(()=>{if(r<=1){const m=Math.max(r,o);return f(m)}return f(r)},[r,o,f]),g=S.useCallback((m,v)=>m==="ellipsis"?s.jsx(cr,{children:s.jsx(Nd,{})},`ellipsis-${v}`):s.jsx(cr,{className:"flex items-center justify-center",children:s.jsx(Pd,{onClick:()=>l(m),isActive:m===n,className:i.link(m===n),children:m})},`${m}-${v}-pagination-item`),[l,n,i]);return r<2&&o<2?s.jsx(s.Fragment,{}):s.jsx(Ed,{className:"dark:bg-transparent",children:s.jsxs(kd,{children:[s.jsx(cr,{children:s.jsx(Je,{variant:"ghost",size:"icon",className:i.previous,onClick:u,children:s.jsx(fv,{})})}),p.map(g),s.jsx(cr,{children:s.jsx(Je,{variant:"ghost",size:"icon",className:i.next,onClick:d,children:s.jsx(Pl,{onClick:d})})})]})})},aC=({table:e,emptyStateComponent:t,noResultsComponent:r,errorComponent:n,isLoading:o=!1,isError:a=!1,onRowClick:i,emptyStateTitle:l="There's nothing to show",emptyStateDescription:u="No items to display",noResultsTitle:d="No results",wrapperClassName:f,loadingRowsCount:p=8,activeRowId:g})=>{const m=e.getVisibleFlatColumns().length,v=e.options.manualPagination&&e.options.onPaginationChange,h=e.getRowModel().rows.length===0,x=e.getCoreRowModel().rows.length===0&&!o,y=!o&&(a||x||h),b="hover:bg-transparent cursor-default",C=()=>e.getHeaderGroups().map(P=>s.jsx(bt,{children:P.headers.map(j=>s.jsx(Rd,{className:"text-[#A1A1AA]",children:j.isPlaceholder?void 0:Ws(j.column.columnDef.header,j.getContext())},j.id))},P.id)),R=()=>o?s.jsx(rC,{rowsCount:p,columnsCount:m}):a?s.jsx(bt,{className:b,children:s.jsx($t,{colSpan:m,children:(n==null?void 0:n())||s.jsx(zs,{title:l,description:u})})}):x?s.jsx(bt,{className:b,children:s.jsx($t,{colSpan:m,children:(t==null?void 0:t())||s.jsx(zs,{title:l,description:u})})}):h?s.jsx(bt,{className:b,children:s.jsx($t,{colSpan:m,children:(r==null?void 0:r())||s.jsx(tC,{title:d})})}):e.getRowModel().rows.map(P=>{var E;const j=(E=P.original)==null?void 0:E.id,T=P.getIsSelected()||!!g&&g===j;return s.jsx(bt,{"data-state":T?"selected":void 0,onClick:()=>i==null?void 0:i(P.original),children:P.getVisibleCells().map(V=>s.jsx($t,{className:"text-[#FAFAFA] whitespace-nowrap",children:Ws(V.column.columnDef.cell,V.getContext())},V.id))},P.id)});return s.jsxs("div",{className:_("qodo qodo-table","flex flex-col h-full w-full"),children:[s.jsx("div",{className:"flex-1 min-h-0",children:s.jsxs(wd,{wrapperClassName:f,className:_({"h-[100%]":y}),children:[s.jsx(Cd,{children:C()}),s.jsx(Sd,{children:R()})]})}),v&&s.jsx("footer",{className:"pt-4 pb-2 border-t border-purple-muted-600/20 flex-shrink-0",children:s.jsx(oC,{table:e,isLoading:o})})]})},jo=e=>{const{children:t,...r}=e,n=t&&t!==0?t:"-";return s.jsx("div",{...r,children:n})},sC=e=>{const{variant:t,children:r}=e,n=r||t;return s.jsx(Pn,{...e,children:n})},iC=e=>{const{children:t,...r}=e;if(typeof t!="number")return console.error("NumberCell must be a number"),s.jsx(jo,{...r,children:"-"});const n=t>1e5?"compact":"standard",o=new Intl.NumberFormat("en-US",{notation:n}).format(t);return s.jsx(jo,{...r,children:o})},lC=({column:e,children:t,tooltipContent:r})=>{const[n,o]=S.useState(!1),a=e.getCanSort();let i=t;return r&&(i=s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("span",{children:t}),s.jsx(Nr,{contentProps:{className:"max-w-[200px]"},content:r,children:s.jsx(Cv,{className:"h-4 w-4"})})]})),a?s.jsxs("span",{className:"flex gap-1 items-center cursor-pointer",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),role:"button",children:[i,s.jsx(lv,{className:_("ml-2 h-4 w-4",{invisible:!n})})]}):s.jsx("span",{children:i})};var To=["Enter"," "],cC=["ArrowDown","PageUp","Home"],jd=["ArrowUp","PageDown","End"],uC=[...cC,...jd],dC={ltr:[...To,"ArrowRight"],rtl:[...To,"ArrowLeft"]},fC={ltr:["ArrowLeft"],rtl:["ArrowRight"]},jr="Menu",[mr,pC,mC]=cn(jr),[Pt,Td]=ye(jr,[mC,ut,Jt]),Tr=ut(),_d=Jt(),[Ad,gt]=Pt(jr),[gC,_r]=Pt(jr),Id=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:o,onOpenChange:a,modal:i=!0}=e,l=Tr(t),[u,d]=c.useState(null),f=c.useRef(!1),p=Oe(a),g=Ut(o);return c.useEffect(()=>{const m=()=>{f.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>f.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),s.jsx(yr,{...l,children:s.jsx(Ad,{scope:t,open:r,onOpenChange:p,content:u,onContentChange:d,children:s.jsx(gC,{scope:t,onClose:c.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:g,modal:i,children:n})})})};Id.displayName=jr;var hC="MenuAnchor",Sa=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=Tr(r);return s.jsx(wr,{...o,...n,ref:t})});Sa.displayName=hC;var Ra="MenuPortal",[vC,Md]=Pt(Ra,{forceMount:void 0}),Od=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:o}=e,a=gt(Ra,t);return s.jsx(vC,{scope:t,forceMount:r,children:s.jsx(ke,{present:r||a.open,children:s.jsx(Xt,{asChild:!0,container:o,children:n})})})};Od.displayName=Ra;var _e="MenuContent",[xC,Ea]=Pt(_e),Dd=c.forwardRef((e,t)=>{const r=Md(_e,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,a=gt(_e,e.__scopeMenu),i=_r(_e,e.__scopeMenu);return s.jsx(mr.Provider,{scope:e.__scopeMenu,children:s.jsx(ke,{present:n||a.open,children:s.jsx(mr.Slot,{scope:e.__scopeMenu,children:i.modal?s.jsx(bC,{...o,ref:t}):s.jsx(yC,{...o,ref:t})})})})}),bC=c.forwardRef((e,t)=>{const r=gt(_e,e.__scopeMenu),n=c.useRef(null),o=se(t,n);return c.useEffect(()=>{const a=n.current;if(a)return vn(a)},[]),s.jsx(ka,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:F(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),yC=c.forwardRef((e,t)=>{const r=gt(_e,e.__scopeMenu);return s.jsx(ka,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),wC=st("MenuContent.ScrollLock"),ka=c.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:g,onDismiss:m,disableOutsideScroll:v,...h}=e,x=gt(_e,r),y=_r(_e,r),b=Tr(r),C=_d(r),R=pC(r),[P,j]=c.useState(null),T=c.useRef(null),E=se(t,T,x.onContentChange),V=c.useRef(0),U=c.useRef(""),re=c.useRef(0),te=c.useRef(null),J=c.useRef("right"),q=c.useRef(0),D=v?Cr:c.Fragment,A=v?{as:wC,allowPinchZoom:!0}:void 0,$=O=>{var I,Z;const W=U.current+O,Q=R().filter(ee=>!ee.disabled),N=document.activeElement,B=(I=Q.find(ee=>ee.ref.current===N))==null?void 0:I.textValue,Y=Q.map(ee=>ee.textValue),M=IC(Y,W,B),G=(Z=Q.find(ee=>ee.textValue===M))==null?void 0:Z.ref.current;(function ee(oe){U.current=oe,window.clearTimeout(V.current),oe!==""&&(V.current=window.setTimeout(()=>ee(""),1e3))})(W),G&&setTimeout(()=>G.focus())};c.useEffect(()=>()=>window.clearTimeout(V.current),[]),un();const k=c.useCallback(O=>{var Q,N;return J.current===((Q=te.current)==null?void 0:Q.side)&&OC(O,(N=te.current)==null?void 0:N.area)},[]);return s.jsx(xC,{scope:r,searchRef:U,onItemEnter:c.useCallback(O=>{k(O)&&O.preventDefault()},[k]),onItemLeave:c.useCallback(O=>{var W;k(O)||((W=T.current)==null||W.focus(),j(null))},[k]),onTriggerLeave:c.useCallback(O=>{k(O)&&O.preventDefault()},[k]),pointerGraceTimerRef:re,onPointerGraceIntentChange:c.useCallback(O=>{te.current=O},[]),children:s.jsx(D,{...A,children:s.jsx(xr,{asChild:!0,trapped:o,onMountAutoFocus:F(a,O=>{var W;O.preventDefault(),(W=T.current)==null||W.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:s.jsx(Ht,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:g,onDismiss:m,children:s.jsx(oa,{asChild:!0,...C,dir:y.dir,orientation:"vertical",loop:n,currentTabStopId:P,onCurrentTabStopIdChange:j,onEntryFocus:F(u,O=>{y.isUsingKeyboardRef.current||O.preventDefault()}),preventScrollOnEntryFocus:!0,children:s.jsx(gn,{role:"menu","aria-orientation":"vertical","data-state":Qd(x.open),"data-radix-menu-content":"",dir:y.dir,...b,...h,ref:E,style:{outline:"none",...h.style},onKeyDown:F(h.onKeyDown,O=>{const Q=O.target.closest("[data-radix-menu-content]")===O.currentTarget,N=O.ctrlKey||O.altKey||O.metaKey,B=O.key.length===1;Q&&(O.key==="Tab"&&O.preventDefault(),!N&&B&&$(O.key));const Y=T.current;if(O.target!==Y||!uC.includes(O.key))return;O.preventDefault();const G=R().filter(I=>!I.disabled).map(I=>I.ref.current);jd.includes(O.key)&&G.reverse(),_C(G)}),onBlur:F(e.onBlur,O=>{O.currentTarget.contains(O.target)||(window.clearTimeout(V.current),U.current="")}),onPointerMove:F(e.onPointerMove,gr(O=>{const W=O.target,Q=q.current!==O.clientX;if(O.currentTarget.contains(W)&&Q){const N=O.clientX>q.current?"right":"left";J.current=N,q.current=O.clientX}}))})})})})})})});Dd.displayName=_e;var CC="MenuGroup",Pa=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return s.jsx(X.div,{role:"group",...n,ref:t})});Pa.displayName=CC;var SC="MenuLabel",Ld=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return s.jsx(X.div,{...n,ref:t})});Ld.displayName=SC;var on="MenuItem",qs="menu.itemSelect",Dn=c.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...o}=e,a=c.useRef(null),i=_r(on,e.__scopeMenu),l=Ea(on,e.__scopeMenu),u=se(t,a),d=c.useRef(!1),f=()=>{const p=a.current;if(!r&&p){const g=new CustomEvent(qs,{bubbles:!0,cancelable:!0});p.addEventListener(qs,m=>n==null?void 0:n(m),{once:!0}),ci(p,g),g.defaultPrevented?d.current=!1:i.onClose()}};return s.jsx($d,{...o,ref:u,disabled:r,onClick:F(e.onClick,f),onPointerDown:p=>{var g;(g=e.onPointerDown)==null||g.call(e,p),d.current=!0},onPointerUp:F(e.onPointerUp,p=>{var g;d.current||(g=p.currentTarget)==null||g.click()}),onKeyDown:F(e.onKeyDown,p=>{const g=l.searchRef.current!=="";r||g&&p.key===" "||To.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Dn.displayName=on;var $d=c.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:o,...a}=e,i=Ea(on,r),l=_d(r),u=c.useRef(null),d=se(t,u),[f,p]=c.useState(!1),[g,m]=c.useState("");return c.useEffect(()=>{const v=u.current;v&&m((v.textContent??"").trim())},[a.children]),s.jsx(mr.ItemSlot,{scope:r,disabled:n,textValue:o??g,children:s.jsx(aa,{asChild:!0,...l,focusable:!n,children:s.jsx(X.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...a,ref:d,onPointerMove:F(e.onPointerMove,gr(v=>{n?i.onItemLeave(v):(i.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:F(e.onPointerLeave,gr(v=>i.onItemLeave(v))),onFocus:F(e.onFocus,()=>p(!0)),onBlur:F(e.onBlur,()=>p(!1))})})})}),RC="MenuCheckboxItem",Fd=c.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...o}=e;return s.jsx(zd,{scope:e.__scopeMenu,checked:r,children:s.jsx(Dn,{role:"menuitemcheckbox","aria-checked":an(r)?"mixed":r,...o,ref:t,"data-state":Ta(r),onSelect:F(o.onSelect,()=>n==null?void 0:n(an(r)?!0:!r),{checkForDefaultPrevented:!1})})})});Fd.displayName=RC;var Vd="MenuRadioGroup",[EC,kC]=Pt(Vd,{value:void 0,onValueChange:()=>{}}),Bd=c.forwardRef((e,t)=>{const{value:r,onValueChange:n,...o}=e,a=Oe(n);return s.jsx(EC,{scope:e.__scopeMenu,value:r,onValueChange:a,children:s.jsx(Pa,{...o,ref:t})})});Bd.displayName=Vd;var Gd="MenuRadioItem",Wd=c.forwardRef((e,t)=>{const{value:r,...n}=e,o=kC(Gd,e.__scopeMenu),a=r===o.value;return s.jsx(zd,{scope:e.__scopeMenu,checked:a,children:s.jsx(Dn,{role:"menuitemradio","aria-checked":a,...n,ref:t,"data-state":Ta(a),onSelect:F(n.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,r)},{checkForDefaultPrevented:!1})})})});Wd.displayName=Gd;var Na="MenuItemIndicator",[zd,PC]=Pt(Na,{checked:!1}),qd=c.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...o}=e,a=PC(Na,r);return s.jsx(ke,{present:n||an(a.checked)||a.checked===!0,children:s.jsx(X.span,{...o,ref:t,"data-state":Ta(a.checked)})})});qd.displayName=Na;var NC="MenuSeparator",Ud=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return s.jsx(X.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});Ud.displayName=NC;var jC="MenuArrow",Hd=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=Tr(r);return s.jsx(hn,{...o,...n,ref:t})});Hd.displayName=jC;var ja="MenuSub",[TC,Kd]=Pt(ja),Yd=e=>{const{__scopeMenu:t,children:r,open:n=!1,onOpenChange:o}=e,a=gt(ja,t),i=Tr(t),[l,u]=c.useState(null),[d,f]=c.useState(null),p=Oe(o);return c.useEffect(()=>(a.open===!1&&p(!1),()=>p(!1)),[a.open,p]),s.jsx(yr,{...i,children:s.jsx(Ad,{scope:t,open:n,onOpenChange:p,content:d,onContentChange:f,children:s.jsx(TC,{scope:t,contentId:me(),triggerId:me(),trigger:l,onTriggerChange:u,children:r})})})};Yd.displayName=ja;var ur="MenuSubTrigger",Xd=c.forwardRef((e,t)=>{const r=gt(ur,e.__scopeMenu),n=_r(ur,e.__scopeMenu),o=Kd(ur,e.__scopeMenu),a=Ea(ur,e.__scopeMenu),i=c.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=a,d={__scopeMenu:e.__scopeMenu},f=c.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return c.useEffect(()=>f,[f]),c.useEffect(()=>{const p=l.current;return()=>{window.clearTimeout(p),u(null)}},[l,u]),s.jsx(Sa,{asChild:!0,...d,children:s.jsx($d,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":o.contentId,"data-state":Qd(r.open),...e,ref:Qe(t,o.onTriggerChange),onClick:p=>{var g;(g=e.onClick)==null||g.call(e,p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:F(e.onPointerMove,gr(p=>{a.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!r.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{r.onOpenChange(!0),f()},100))})),onPointerLeave:F(e.onPointerLeave,gr(p=>{var m,v;f();const g=(m=r.content)==null?void 0:m.getBoundingClientRect();if(g){const h=(v=r.content)==null?void 0:v.dataset.side,x=h==="right",y=x?-5:5,b=g[x?"left":"right"],C=g[x?"right":"left"];a.onPointerGraceIntentChange({area:[{x:p.clientX+y,y:p.clientY},{x:b,y:g.top},{x:C,y:g.top},{x:C,y:g.bottom},{x:b,y:g.bottom}],side:h}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(p),p.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:F(e.onKeyDown,p=>{var m;const g=a.searchRef.current!=="";e.disabled||g&&p.key===" "||dC[n.dir].includes(p.key)&&(r.onOpenChange(!0),(m=r.content)==null||m.focus(),p.preventDefault())})})})});Xd.displayName=ur;var Zd="MenuSubContent",Jd=c.forwardRef((e,t)=>{const r=Md(_e,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,a=gt(_e,e.__scopeMenu),i=_r(_e,e.__scopeMenu),l=Kd(Zd,e.__scopeMenu),u=c.useRef(null),d=se(t,u);return s.jsx(mr.Provider,{scope:e.__scopeMenu,children:s.jsx(ke,{present:n||a.open,children:s.jsx(mr.Slot,{scope:e.__scopeMenu,children:s.jsx(ka,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:d,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var p;i.isUsingKeyboardRef.current&&((p=u.current)==null||p.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:F(e.onFocusOutside,f=>{f.target!==l.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:F(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:F(e.onKeyDown,f=>{var m;const p=f.currentTarget.contains(f.target),g=fC[i.dir].includes(f.key);p&&g&&(a.onOpenChange(!1),(m=l.trigger)==null||m.focus(),f.preventDefault())})})})})})});Jd.displayName=Zd;function Qd(e){return e?"open":"closed"}function an(e){return e==="indeterminate"}function Ta(e){return an(e)?"indeterminate":e?"checked":"unchecked"}function _C(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function AC(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function IC(e,t,r){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let i=AC(e,Math.max(a,0));o.length===1&&(i=i.filter(d=>d!==r));const u=i.find(d=>d.toLowerCase().startsWith(o.toLowerCase()));return u!==r?u:void 0}function MC(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const l=t[a],u=t[i],d=l.x,f=l.y,p=u.x,g=u.y;f>n!=g>n&&r<(p-d)*(n-f)/(g-f)+d&&(o=!o)}return o}function OC(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return MC(r,t)}function gr(e){return t=>t.pointerType==="mouse"?e(t):void 0}var DC=Id,LC=Sa,$C=Od,FC=Dd,VC=Pa,BC=Ld,GC=Dn,WC=Fd,zC=Bd,qC=Wd,UC=qd,HC=Ud,KC=Hd,YC=Yd,XC=Xd,ZC=Jd,Ln="DropdownMenu",[JC,uS]=ye(Ln,[Td]),we=Td(),[QC,ef]=JC(Ln),tf=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:o,defaultOpen:a,onOpenChange:i,modal:l=!0}=e,u=we(t),d=c.useRef(null),[f,p]=be({prop:o,defaultProp:a??!1,onChange:i,caller:Ln});return s.jsx(QC,{scope:t,triggerId:me(),triggerRef:d,contentId:me(),open:f,onOpenChange:p,onOpenToggle:c.useCallback(()=>p(g=>!g),[p]),modal:l,children:s.jsx(DC,{...u,open:f,onOpenChange:p,dir:n,modal:l,children:r})})};tf.displayName=Ln;var rf="DropdownMenuTrigger",nf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...o}=e,a=ef(rf,r),i=we(r);return s.jsx(LC,{asChild:!0,...i,children:s.jsx(X.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...o,ref:Qe(t,a.triggerRef),onPointerDown:F(e.onPointerDown,l=>{!n&&l.button===0&&l.ctrlKey===!1&&(a.onOpenToggle(),a.open||l.preventDefault())}),onKeyDown:F(e.onKeyDown,l=>{n||(["Enter"," "].includes(l.key)&&a.onOpenToggle(),l.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});nf.displayName=rf;var e1="DropdownMenuPortal",of=e=>{const{__scopeDropdownMenu:t,...r}=e,n=we(t);return s.jsx($C,{...n,...r})};of.displayName=e1;var af="DropdownMenuContent",sf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=ef(af,r),a=we(r),i=c.useRef(!1);return s.jsx(FC,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...n,ref:t,onCloseAutoFocus:F(e.onCloseAutoFocus,l=>{var u;i.current||(u=o.triggerRef.current)==null||u.focus(),i.current=!1,l.preventDefault()}),onInteractOutside:F(e.onInteractOutside,l=>{const u=l.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,f=u.button===2||d;(!o.modal||f)&&(i.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)"}})});sf.displayName=af;var t1="DropdownMenuGroup",lf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(VC,{...o,...n,ref:t})});lf.displayName=t1;var r1="DropdownMenuLabel",cf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(BC,{...o,...n,ref:t})});cf.displayName=r1;var n1="DropdownMenuItem",uf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(GC,{...o,...n,ref:t})});uf.displayName=n1;var o1="DropdownMenuCheckboxItem",df=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(WC,{...o,...n,ref:t})});df.displayName=o1;var a1="DropdownMenuRadioGroup",ff=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(zC,{...o,...n,ref:t})});ff.displayName=a1;var s1="DropdownMenuRadioItem",pf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(qC,{...o,...n,ref:t})});pf.displayName=s1;var i1="DropdownMenuItemIndicator",mf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(UC,{...o,...n,ref:t})});mf.displayName=i1;var l1="DropdownMenuSeparator",gf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(HC,{...o,...n,ref:t})});gf.displayName=l1;var c1="DropdownMenuArrow",u1=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(KC,{...o,...n,ref:t})});u1.displayName=c1;var d1=e=>{const{__scopeDropdownMenu:t,children:r,open:n,onOpenChange:o,defaultOpen:a}=e,i=we(t),[l,u]=be({prop:n,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return s.jsx(YC,{...i,open:l,onOpenChange:u,children:r})},f1="DropdownMenuSubTrigger",hf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(XC,{...o,...n,ref:t})});hf.displayName=f1;var p1="DropdownMenuSubContent",vf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(ZC,{...o,...n,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)"}})});vf.displayName=p1;var m1=tf,g1=nf,xf=of,bf=sf,h1=lf,yf=cf,wf=uf,Cf=df,v1=ff,Sf=pf,Rf=mf,Ef=gf,x1=d1,kf=hf,Pf=vf;const b1=m1,y1=g1,w1=h1,C1=xf,S1=x1,R1=v1,Nf=c.forwardRef(({className:e,inset:t,children:r,...n},o)=>s.jsxs(kf,{ref:o,className:_("qodo qodo-dropdown-menu-sub-trigger flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-neutral-100 data-[state=open]:bg-neutral-100 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 dark:focus:bg-neutral-800 dark:data-[state=open]:bg-neutral-800",t&&"pl-8",e),...n,children:[r,s.jsx(Pl,{className:"ml-auto"})]}));Nf.displayName=kf.displayName;const jf=c.forwardRef(({className:e,...t},r)=>s.jsx(Pf,{ref:r,className:_("z-50 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-purple-muted-600 dark:text-neutral-50",e),...t}));jf.displayName=Pf.displayName;const Tf=c.forwardRef(({className:e,sideOffset:t=4,...r},n)=>s.jsx(xf,{children:s.jsx(bf,{ref:n,sideOffset:t,className:_("qodo qodo-dropdown-menu-content z-50 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-md dark:border-neutral-800 dark:bg-purple-muted-600 background dark:text-neutral-50","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));Tf.displayName=bf.displayName;const _a=c.forwardRef(({className:e,inset:t,...r},n)=>s.jsx(wf,{ref:n,className:_("qodo qodo-dropdown-menu-item relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 cursor-pointer data-[disabled]:cursor-default",t&&"pl-8",e),...r}));_a.displayName=wf.displayName;const _f=c.forwardRef(({className:e,children:t,checked:r,...n},o)=>s.jsxs(Cf,{ref:o,className:_("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 cursor-pointer data-[disabled]:cursor-default",e),checked:r,...n,children:[s.jsx("span",{className:"absolute right-3 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(Rf,{children:s.jsx(Cn,{className:"h-4 w-4"})})}),t]}));_f.displayName=Cf.displayName;const Af=c.forwardRef(({className:e,children:t,...r},n)=>s.jsxs(Sf,{ref:n,className:_("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 cursor-pointer data-[disabled]:cursor-default",e),...r,children:[s.jsx("span",{className:"absolute right-3 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(Rf,{children:s.jsx(Cn,{className:"h-[18px] w-[18px] stroke-current stroke-purple-300"})})}),t]}));Af.displayName=Sf.displayName;const Aa=c.forwardRef(({className:e,inset:t,...r},n)=>s.jsx(yf,{ref:n,className:_("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));Aa.displayName=yf.displayName;const ht=c.forwardRef(({className:e,...t},r)=>s.jsx(Ef,{ref:r,className:_("-mx-1 my-1 h-px bg-purple-muted-500",e),...t}));ht.displayName=Ef.displayName;const If=({className:e,...t})=>s.jsx("span",{className:_("ml-auto text-xs tracking-widest [&>svg]:size-4",e),...t});If.displayName="DropdownMenuEndAndornment";const E1=({radioItem:e})=>s.jsxs(Af,{className:"m-0 rounded-none gap-2 text-white focus:text-purple-muted-100 focus:bg-zinc-800 pl-3 pr-9 py-1.5",value:e.value,disabled:e.disabled,onSelect:t=>t.preventDefault(),children:[e.icon,e.label]}),k1=({radioGroupItem:e})=>s.jsxs(s.Fragment,{children:[s.jsx(R1,{value:e.value,onValueChange:e.onValueChange,children:e.radioItems.map((t,r)=>s.jsx(E1,{radioItem:t},`item-${r}`))}),e.separator&&s.jsx(ht,{})]}),P1=({actionItem:e})=>s.jsxs("div",{className:"w-full [&>button]:w-full",children:[s.jsx(Nr,{content:e.tooltip,providerProps:{delayDuration:200},children:s.jsx(_a,{className:"m-0 rounded-none py-1.5 px-3 outline-none text-white focus:text-purple-muted-100 focus:bg-zinc-800",disabled:e.disabled||e.loading,onClick:e.onClick,onSelect:e.onSelect,children:s.jsxs("div",{className:"flex items-center gap-2",children:[e.loading&&s.jsx(kv,{className:"h-4 w-4 motion-preset-spin motion-duration-1000"}),!e.loading&&e.icon,e.label,e.endAndornment&&s.jsx(If,{children:e.endAndornment})]})})}),e.separator&&s.jsx(ht,{})]}),N1=({checkboxItem:e})=>s.jsxs(_f,{className:"gap-2 m-0 rounded-none py-1.5 pl-3 pr-9 outline-none text-white focus:text-purple-muted-100 focus:bg-zinc-800 [&_svg]:stroke-purple-300 [&_svg]:size-[18px] [&_svg]:stroke-[3px]",checked:e.checked,onCheckedChange:e.onSelect,disabled:e.disabled,onSelect:t=>t.preventDefault(),children:[e.icon,e.label]}),j1=({checkboxGroupItem:e})=>s.jsxs(s.Fragment,{children:[s.jsx(w1,{children:e.checkboxes.map((t,r)=>s.jsx(N1,{checkboxItem:t},`item-${r}`))}),e.separator&&s.jsx(ht,{})]}),T1=({subMenuItem:e})=>s.jsxs(s.Fragment,{children:[s.jsxs(S1,{children:[s.jsxs(Nf,{disabled:e.disabled,className:"m-0 rounded-none py-1.5 pl-3 pr-1 data-[state=open]:bg-zinc-800 data-[state=open]:text-purple-muted-100 text-white focus:text-purple-muted-100 hover:text-purple-muted-100 focus:bg-zinc-800 [&_svg]:stroke-1 [&_svg]:stroke-white [&_svg]:stroke-1.5 [&_svg]:size-4",children:[e.icon,e.label]}),s.jsx(C1,{children:s.jsx(jf,{className:"rounded-md text-body dark:bg-purple-muted-700 border-purple-muted-500 px-0 py-1.5",children:e.subItems.map((t,r)=>Mf(t,r))})})]}),e.separator&&s.jsx(ht,{})]}),_1=({menuItem:e})=>s.jsx(Aa,{className:"text-[#7968FA] px-3 font-normal",children:e.label}),A1=()=>s.jsx(ht,{}),Mf=(e,t)=>{switch(e.type){case"ActionMenuItem":return s.jsx(P1,{actionItem:e},`item-${t}`);case"CheckboxGroup":return s.jsx(j1,{checkboxGroupItem:e},`item-${t}`);case"RadioGroup":return s.jsx(k1,{radioGroupItem:e},`item-${t}`);case"SubMenuItem":return s.jsx(T1,{subMenuItem:e},`item-${t}`);case"MenuLabel":return s.jsx(_1,{menuItem:e},`item-${t}`);case"Separator":return s.jsx(A1,{},`item-${t}`);default:return null}},I1={s:"min-w-[140px]",l:"min-w-[257px]"},M1=({header:e})=>s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-purple-muted-300",children:e.title}),s.jsx("span",{children:e.label})]}),O1=({header:e})=>e?s.jsxs(s.Fragment,{children:[s.jsx(Aa,{className:"text-purple-100 font-normal px-3",children:e.type==="MenuTitleHeader"&&s.jsx(M1,{header:e})}),s.jsx(ht,{className:"bg-purple-muted-500"})]}):null,D1=({footer:e})=>e?s.jsxs(s.Fragment,{children:[s.jsx(ht,{className:"bg-purple-muted-500"}),s.jsxs(_a,{onClick:e.action,disabled:e.disabled,className:"cursor-pointer m-0 rounded-none py-1.5 px-3 text-purple-300 focus:text-purple-300 focus:bg-transparent",children:[e.icon,e.label]})]}):null,Of=({menuItems:e,header:t,footer:r,triggerElement:n,size:o="s",asChild:a=!1,side:i="bottom",modal:l=!1,disabled:u=!1})=>{const d=si(I1,{[o]:o,className:"rounded-md text-body dark:bg-purple-muted-700 border-purple-muted-500 px-0 py-1.5"},!1);return s.jsx("div",{className:_("qodo qodo-dropdown"),children:s.jsxs(b1,{modal:l,children:[s.jsx(y1,{asChild:a,className:"select-none outline-none flex items-center",disabled:u,children:n}),s.jsxs(Tf,{side:i,align:"end",className:d,children:[s.jsx(O1,{header:t}),e.filter(f=>!f.isHidden).map((f,p)=>Mf(f,p)),s.jsx(D1,{footer:r})]})]})})},L1=({triggerAriaLabel:e="Open actions menu",className:t,...r})=>s.jsx(Je,{variant:"ghost",size:"icon","aria-label":e,className:_("flex items-center justify-center h-4 w-4",t),...r,children:s.jsx(Nl,{className:"h-4 w-4"})}),$1=({menuItems:e=[],triggerElement:t=L1,triggerProps:r={},className:n,size:o="s",asChild:a=!1,side:i="bottom",modal:l=!1})=>s.jsx("div",{className:n,onClick:u=>u.stopPropagation(),children:s.jsx(Of,{triggerElement:s.jsx(t,{className:_("flex items-center justify-center",r==null?void 0:r.className),...r}),menuItems:e,size:o,asChild:a,side:i,modal:l,disabled:r==null?void 0:r.disabled})}),F1={"data-lpignore":"true","data-1p-ignore":"true","data-bitwarden-watching":"false","data-form-type":"other","data-gramm":"false","data-gramm_editor":"false","data-enable-grammarly":"false",spellCheck:!1,autoComplete:"off"},Us={SMALL:"small",LARGE:"large"},V1=({containerClassName:e,className:t,searchSize:r=Us.SMALL,disabled:n=!1,disableFilterIcon:o=!0,...a})=>{const i=r===Us.LARGE?"pl-12 py-3 pr-4 h-[45px]":"pl-9 py-1.5 pr-2 h-[33px]",l=_("absolute top-1/2 h-4 w-4 -translate-y-1/2",n?"text-purple-muted-600":"text-purple-muted-400"),u=_("text-purple-muted-200 dark:border-purple-muted-600 dark:text-purple-muted-200 dark:bg-[#1C1C1C] dark:placeholder:text-purple-muted-400 pl-9",{"pr-9":!o});return s.jsxs("div",{className:_("qodo qodo-search-input","relative",e),children:[s.jsx(jl,{className:_(l,"left-3")}),s.jsx(vr,{className:_(i,u,t),disabled:n,...a,...F1}),!o&&s.jsx(Rv,{className:_(l,"right-3")})]})},B1=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,G1=e=>e.split(/[,\s]+/).map(t=>t.trim()).filter(Boolean),W1=(e,t)=>{var n;if(!(t!=null&&t.length))return!0;const r=(n=e.split("@")[1])==null?void 0:n.toLowerCase();return t.some(o=>r===o.toLowerCase())},z1=(e,t)=>e.map(r=>{const n=B1.test(r),o=n?W1(r,t==null?void 0:t.domains):void 0;return{email:r,isValid:n&&o!==!1,isDomainValid:o}}),q1=(e,t,r)=>{const n=z1(e,r),o=[...t];for(const a of n)o.some(l=>l.email===a.email)||o.push(a);return o},U1=({onChange:e=()=>{},organization:t})=>{const[r,n]=S.useState([]),o=S.useCallback(d=>{e(d)},[e]),a=S.useCallback(d=>{n(d),o(d)},[o]),i=S.useCallback(d=>{const f=G1(d);if(f.length===0)return;const p=q1(f,r,t);a(p)},[r,a,t]),l=S.useCallback(()=>{a([])},[a]),u=S.useCallback(d=>{const f=r.filter(p=>p.email!==d);a(f)},[r,a]);return{emails:r,setEmails:a,addTokens:i,removeToken:u,clearAll:l,notify:o}},H1=e=>{const{draft:t,setDraft:r,addTokens:n,allSelected:o,setAllSelected:a,clearAll:i,emails:l,setEmails:u,notify:d}=e;return f=>{if((f.key==="a"||f.key==="A")&&(f.metaKey||f.ctrlKey)){f.preventDefault(),a(!0);return}if(o&&(f.key==="Backspace"||f.key==="Delete")){f.preventDefault(),a(!1),i(),r("");return}if(o&&f.key==="Escape"){f.preventDefault(),a(!1);return}if(o&&f.key.length===1&&!f.metaKey&&!f.ctrlKey&&!f.altKey&&(a(!1),i()),f.key==="Backspace"&&t.length===0&&l.length>0){f.preventDefault();const p=l[l.length-1],g=l.slice(0,-1);u(g),r(p.email),d(g);return}if(f.key==="Enter"){f.preventDefault(),t.trim()&&(n(t),r(""));return}[",",";"," "].includes(f.key)&&(f.preventDefault(),t.trim()&&(n(t),r("")))}},K1=({email:e,isValid:t,onRemove:r})=>{const n=o=>{o.stopPropagation(),r(e)};return s.jsxs(Pn,{className:"px-2 group whitespace-nowrap flex-shrink-0",variant:t?"success":"error",size:"sm",children:[s.jsx("span",{className:"max-w-[200px] truncate",children:e}),s.jsx("button",{onClick:n,className:"ml-1 opacity-70 hover:opacity-100 transition-opacity flex-shrink-0",type:"button",children:s.jsx(Sn,{size:12})})]})},Y1=({hasContent:e,onClearAll:t,emails:r,invalidEmailError:n,invalidDomainError:o})=>{const{formatErrors:a,domainErrors:i,totalInvalidCount:l}=S.useMemo(()=>{const m=r.filter(x=>!x.isValid),v=m.filter(x=>!x.email.includes("@")||x.isDomainValid===void 0),h=m.filter(x=>x.isDomainValid===!1);return{formatErrors:v,domainErrors:h,totalInvalidCount:m.length}},[r]),u=m=>{m.preventDefault(),m.stopPropagation()},d=m=>{u(m),t()},f=m=>{u(m)},p=m=>{m.stopPropagation()},g=(m,v)=>v.length===0?s.jsx(s.Fragment,{}):s.jsxs("div",{className:"space-y-1 text-purple-muted-200",children:[s.jsxs("span",{className:"font-medium border-b border-purple-muted-200",children:[m,":"]}),v.map((h,x)=>s.jsx("p",{className:"break-all",children:h.email},`${m}-${x}-${h.email}`))]});return s.jsxs(s.Fragment,{children:[e&&s.jsx("button",{type:"button",onClick:d,className:"absolute right-3 top-1/2 -translate-y-1/2 hover:text-purple-muted-100",children:s.jsx(Ov,{className:"h-4 w-4"})}),l>0&&s.jsx("div",{className:"absolute flex center align-center right-[34px] top-1/2 -translate-y-1/2 [&>button]:h-4",children:s.jsx(Nr,{triggerProps:{asChild:!0},content:s.jsx("div",{onClick:f,onWheel:p,className:"max-w-[min(90vw,32rem)] max-h-[min(60vh,20rem)] p-3 rounded-md border dark:border-red-800 shadow-lg dark:bg-purple-muted-800 dark:text-purple-muted-100",children:s.jsxs("div",{className:"flex flex-col gap-1 text-xs max-h-64 overflow-y-auto pr-1 no-scrollbar",children:[g(n,a),g(o,i)]})}),providerProps:{delayDuration:200},contentProps:{side:"bottom",align:"end",className:"border-0 bg-transparent p-0 m-0",disableArrow:!0},children:s.jsx("button",{type:"button","aria-label":`${l} invalid emails`,className:"text-red-400 hover:text-red-300",children:s.jsx(Lv,{className:"size-[18px]"})})})})]})},X1=({onChange:e,disabled:t=!1,inviteMembersPlaceholder:r=({domain:f})=>`Enter email addresses (e.g., user@${f})`,inviteMembersDisabledTooltip:n="You don't have permission to modify email addresses",organization:o,inputClassName:a,chipClassName:i,wrapperClassName:l,invalidEmailError:u="Invalid email",invalidDomainError:d="Email domain is not allowed"})=>{const f=S.useRef(null),p=S.useRef(null),[g,m]=S.useState(""),[v,h]=S.useState(!1),{emails:x,setEmails:y,addTokens:b,removeToken:C,clearAll:R,notify:P}=U1({onChange:e}),j=H1({draft:g,setDraft:m,addTokens:b,allSelected:v,setAllSelected:h,clearAll:R,emails:x,setEmails:y,notify:P}),T=()=>{var Q;const W=((Q=o==null?void 0:o.domains)==null?void 0:Q[0])||"example.com";return r({domain:W})},E=S.useCallback(W=>{m(W.target.value)},[]),V=S.useCallback(()=>{g.trim()&&(b(g),m("")),h(!1)},[g,b]),U=S.useCallback(W=>{const Q=W.clipboardData.getData("text");Q&&(W.preventDefault(),b(Q),m(""))},[b]),re=S.useCallback(()=>{var W;(W=p.current)==null||W.focus()},[p]),te=S.useCallback(()=>{h(!1)},[]),J=S.useCallback(W=>{var N;const Q=W.relatedTarget;Q&&((N=f.current)!=null&&N.contains(Q))||g.trim()&&(b(g),m(""))},[g,b]),q=x.length>0,D=!q&&g.length===0,A=q||g.length>0,$=_("bg-transparent text-sm outline-none border-0 p-0 h-6 shadow-none focus-visible:ring-0 whitespace-nowrap text-purple-muted-200 placeholder:text-purple-muted-400",q?"flex-none shrink-0 overflow-x-auto overflow-y-hidden no-scrollbar":"flex-1 !min-w-full overflow-hidden",{"opacity-50 cursor-not-allowed":t},a),k=_("inline-flex items-center gap-1 no-scrollbar",q?"w-max":"w-full",i),O=_("qodo qodo-email-chips-input","relative w-full max-w-full min-w-0 overflow-hidden rounded-md border pl-9 pr-14 py-2 pl-9 pr-14 py-2 focus-within:ring-1 border-purple-muted-500 dark:bg-purple-muted-800 focus-within:ring-purple-muted-400",l);return s.jsx(Nr,{triggerProps:{asChild:!0},content:t?n:void 0,children:s.jsxs("div",{ref:f,className:O,onClick:re,onFocus:te,onBlur:J,children:[s.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-purple-muted-400",children:s.jsx(Nv,{className:"w-4 h-4"})}),s.jsx("div",{className:"w-full text-start max-w-full min-w-0 overflow-x-auto overflow-y-hidden no-scrollbar",children:s.jsxs("div",{className:k,children:[x.map((W,Q)=>s.jsx(K1,{email:W.email,isValid:W.isValid,onRemove:C},`email-${Q}-${W.email}`)),s.jsx("input",{ref:p,value:g,onChange:E,onKeyDown:j,onBlur:V,onPaste:U,className:$,placeholder:D?T():"",disabled:t})]})}),s.jsx(Y1,{hasContent:A,onClearAll:R,emails:x,invalidEmailError:u,invalidDomainError:d})]})})};exports.Accordion=uy;exports.AccordionContent=py;exports.AccordionItem=dy;exports.AccordionTrigger=fy;exports.ActionsCell=$1;exports.Badge=Pn;exports.BadgeCell=sC;exports.BaseCell=jo;exports.Button=Je;exports.Card=tb;exports.CardAction=ab;exports.CardContent=sb;exports.CardDescription=ob;exports.CardFooter=ib;exports.CardHeader=rb;exports.CardTitle=nb;exports.ClassHelper=si;exports.Combobox=ea;exports.Dialog=Ex;exports.DialogClose=Px;exports.DialogContent=Nx;exports.DialogDescription=Ax;exports.DialogFooter=Tx;exports.DialogHeader=jx;exports.DialogOverlay=uc;exports.DialogPortal=cc;exports.DialogTitle=_x;exports.DialogTrigger=kx;exports.Dropdown=Of;exports.EmailChipsInput=X1;exports.Form=Ae;exports.FormProvider=bu;exports.Input=vr;exports.NumberCell=iC;exports.Progress=hb;exports.RadioGroup=xa;exports.RadioGroupItem=ba;exports.SearchInput=V1;exports.Select=Tl;exports.SelectContent=Ho;exports.SelectGroup=Fv;exports.SelectItem=Ko;exports.SelectLabel=Al;exports.SelectScrollDownButton=Uo;exports.SelectScrollUpButton=qo;exports.SelectSeparator=Il;exports.SelectTrigger=zo;exports.SelectValue=_l;exports.Skeleton=Nc;exports.SortableHeaderCell=lC;exports.Steps=Y0;exports.Switch=Sb;exports.Table=aC;exports.TagsInput=rd;exports.Toggle=Eb;exports.ToggleGroup=Gb;exports.ToggleGroupItem=Wb;exports.Tooltip=Nr;exports.borderRadius=sp;exports.cn=_;exports.colors=op;exports.spacing=ap;exports.typography=ip;exports.useFormContext=yu;
203
+ */function Ws(e,t){return e?X0(e)?c.createElement(e,t):e:null}function X0(e){return Z0(e)||typeof e=="function"||J0(e)}function Z0(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function J0(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}const Cd=c.forwardRef(({className:e,wrapperClassName:t,...r},n)=>s.jsx("div",{className:_("max-h-[100%] min-h-0 overflow-auto rounded-lg border border-purple-muted-600",t),children:s.jsx("table",{ref:n,className:_("w-full caption-bottom text-sm",e),...r})}));Cd.displayName="Table";const Sd=c.forwardRef(({className:e,...t},r)=>s.jsx("thead",{ref:r,className:_("sticky top-0 z-10 b-0 [&>tr]:hover:bg-transparent",e),...t}));Sd.displayName="TableHeader";const Rd=c.forwardRef(({className:e,...t},r)=>s.jsx("tbody",{ref:r,className:_("[&_tr:last-child]:border-0 [&_tr:first-child]:border-top-0",e),...t}));Rd.displayName="TableBody";const Q0=c.forwardRef(({className:e,...t},r)=>s.jsx("tfoot",{ref:r,className:_("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));Q0.displayName="TableFooter";const bt=c.forwardRef(({className:e,...t},r)=>s.jsx("tr",{ref:r,className:_("border-b border-purple-muted-600 transition-colors hover:bg-muted/50 data-[state=selected]:bg-purple-muted-600/30",e,{"cursor-pointer hover:bg-purple-muted-600/20":!!t.onClick}),...t}));bt.displayName="TableRow";const Ed=c.forwardRef(({className:e,...t},r)=>s.jsx("th",{ref:r,className:_("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Ed.displayName="TableHead";const $t=c.forwardRef(({className:e,...t},r)=>s.jsx("td",{ref:r,className:_("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));$t.displayName="TableCell";const eC=c.forwardRef(({className:e,...t},r)=>s.jsx("caption",{ref:r,className:_("mt-4 text-sm text-muted-foreground",e),...t}));eC.displayName="TableCaption";const tC=({title:e="No results"})=>s.jsx("div",{className:"grid place-items-center text-foreground h-full w-full p-14",children:e}),rC=({columnsCount:e,rowsCount:t=8})=>s.jsx(s.Fragment,{children:Array.from({length:t}).map((r,n)=>s.jsx(bt,{children:Array.from({length:e}).map((o,a)=>s.jsx($t,{children:s.jsx(jc,{className:"h-5.5 w-full"})},`loading-cell-${a}`))},`loading-row-${n}`))}),nC=e=>s.jsxs("svg",{width:"280",height:"195",viewBox:"0 0 280 195",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[s.jsxs("g",{clipPath:"url(#clip0_65_2990)",children:[s.jsx("path",{d:"M228.918 10.4603L230.958 3.72536C230.958 3.72536 232.388 0.863297 235.828 2.69334C238.748 4.24674 237.388 7.1514 237.388 7.1514L233.008 13.2586",fill:"white"}),s.jsx("path",{d:"M228.918 10.4603L230.958 3.72536C230.958 3.72536 232.388 0.863297 235.828 2.69334C238.748 4.24674 237.388 7.1514 237.388 7.1514L233.008 13.2586",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M101.487 163.737L94.1771 171.823L88.0371 163.237L78.7071 173.664L73.6671 165.003L63.3071 174.856L60.1271 165.886L48.9371 176.473L45.0671 167.067L33.8771 177.952L30.2871 168.983L19.0971 179.718L14.7971 170.217L3.80712 180.654C-12.9029 120.029 66.1271 113.464 81.2071 111.017C96.2871 108.57 99.7371 98.9092 99.7371 98.9092",fill:"black"}),s.jsx("path",{d:"M101.487 163.737L94.1771 171.823L88.0371 163.237L78.7071 173.664L73.6671 165.003L63.3071 174.856L60.1271 165.886L48.9371 176.473L45.0671 167.067L33.8771 177.952L30.2871 168.983L19.0971 179.718L14.7971 170.217L3.80712 180.654C-12.9029 120.029 66.1271 113.464 81.2071 111.017C96.2871 108.57 99.7371 98.9092 99.7371 98.9092",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M184.735 116.039L184.055 126.562L179.015 117.805L177.675 127.434L172.555 118.933",fill:"white"}),s.jsx("path",{d:"M184.735 116.039L184.055 126.562L179.015 117.805L177.675 127.434L172.555 118.933",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M201.748 52.7432C212.638 77.3529 211.728 113.549 173.418 118.763L201.748 52.7432Z",fill:"white"}),s.jsx("path",{d:"M201.748 52.7432C212.638 77.3529 211.728 113.549 173.418 118.763",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M169.278 124.402C172.948 139.926 177.038 167.153 156.118 183.549C156.118 183.549 179.558 182.261 179.558 193.316H139.768C139.768 193.316 139.898 186.251 144.708 183.666C144.708 183.666 130.798 176.484 130.168 154.715L130.468 141.394",fill:"white"}),s.jsx("path",{d:"M169.278 124.402C172.948 139.926 177.038 167.153 156.118 183.549C156.118 183.549 179.558 182.261 179.558 193.316H139.768C139.768 193.316 139.898 186.251 144.708 183.666C144.708 183.666 130.798 176.484 130.168 154.715L130.468 141.394",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M89.0353 182.686C75.1053 138.51 106.825 68.8089 143.315 34.4425C185.995 -5.7651 243.385 -13.4257 278.755 68.5323L270.145 71.5115C270.365 71.6285 238.435 46.4974 222.705 46.4974C217.675 46.4974 214.215 50.2532 210.675 54.6687C192.345 77.5336 173.815 147.99 131.485 147.905C131.485 147.905 132.205 179.43 99.6853 183.92C99.6853 183.92 124.525 182.282 124.525 193.315H83.9453C84.2153 192.709 83.5353 185.016 89.0453 182.686H89.0353Z",fill:"white",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M130.318 157.438C130.318 157.438 133.678 142.638 127.758 131.765",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M216.647 40.9229L202.547 62.1066",stroke:"black",strokeWidth:"3",strokeLinejoin:"round"}),s.jsx("path",{d:"M206.769 13.823L204.079 6.74764C204.079 6.74764 201.969 2.55554 206.769 1.45965C211.259 0.427586 211.509 4.64092 211.509 4.64092L211.529 12.8974",fill:"white"}),s.jsx("path",{d:"M206.769 13.823L204.079 6.74764C204.079 6.74764 201.969 2.55554 206.769 1.45965C211.259 0.427586 211.509 4.64092 211.509 4.64092L211.529 12.8974",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M200.648 56.6694L209.918 53.4668L205.068 60.2018L211.528 59.0633L206.258 64.6492L211.688 64.6917L204.468 70.6181",fill:"white"}),s.jsx("path",{d:"M200.648 56.6694L209.918 53.4668L205.068 60.2018L211.528 59.0633L206.258 64.6492L211.688 64.6917L204.468 70.6181",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M152.234 77.7571C159.214 84.7474 169.364 89.9397 178.244 89.9397C193.344 89.9397 208.224 73.6821 204.564 59.1163C204.074 57.1692 202.094 56.1158 200.334 56.8393L182.354 64.1808C181.694 64.4468 180.974 64.4894 180.304 64.2659C177.674 63.4147 170.604 60.5952 163.084 53.1367",fill:"white"}),s.jsx("path",{d:"M152.234 77.7571C159.214 84.7474 169.364 89.9397 178.244 89.9397C193.344 89.9397 208.224 73.6821 204.564 59.1163C204.074 57.1692 202.094 56.1158 200.334 56.8393L182.354 64.1808C181.694 64.4468 180.974 64.4894 180.304 64.2659C177.674 63.4147 170.604 60.5952 163.084 53.1367",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M275.767 61.9785L263.938 66.8728L270.147 71.5118L278.568 68.3517L275.767 61.9785Z",fill:"#7A68FA",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M225.147 40.4968C231.289 40.4968 236.267 35.1997 236.267 28.6654C236.267 22.1311 231.289 16.834 225.147 16.834C219.006 16.834 214.027 22.1311 214.027 28.6654C214.027 35.1997 219.006 40.4968 225.147 40.4968Z",fill:"white",stroke:"black",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M225.147 32.9536C227.373 32.9536 229.177 31.0338 229.177 28.6657C229.177 26.2976 227.373 24.3779 225.147 24.3779C222.921 24.3779 221.117 26.2976 221.117 28.6657C221.117 31.0338 222.921 32.9536 225.147 32.9536Z",fill:"black"}),s.jsx("path",{d:"M244.89 26.0693L240.93 29.623L245.78 32.6128",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M220.18 55.8399C220.18 55.8399 223.26 53.4567 227.08 54.9675",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M223.938 59.5836C223.938 59.5836 227.918 58.2004 230.658 60.4986",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),s.jsx("defs",{children:s.jsx("clipPath",{id:"clip0_65_2990",children:s.jsx("rect",{width:"279",height:"195",fill:"white",transform:"translate(0.5)"})})})]}),zs=({title:e="There's nothing to show",description:t="No items to display"})=>s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-14",children:[s.jsx(nC,{className:"mb-6"}),s.jsx("h4",{className:"mb-1 text-foreground",children:e}),s.jsx("p",{className:"text-purple-muted-300",children:t})]}),kd=({className:e,...t})=>s.jsx("nav",{role:"navigation","aria-label":"pagination",className:_("qodo qodo-pagination mx-auto flex w-full justify-center",e),...t});kd.displayName="Pagination";const Pd=c.forwardRef(({className:e,...t},r)=>s.jsx("ul",{ref:r,className:_("flex flex-row items-center gap-1",e),...t}));Pd.displayName="PaginationContent";const cr=c.forwardRef(({className:e,...t},r)=>s.jsx("li",{ref:r,className:_("",e),...t}));cr.displayName="PaginationItem";const Nd=({className:e,isActive:t,size:r="icon",...n})=>s.jsx("a",{"aria-current":t?"page":void 0,className:_(fi({variant:t?"outline":"ghost",size:r}),e),...n});Nd.displayName="PaginationLink";const jd=({className:e,...t})=>s.jsxs("span",{"aria-hidden":!0,className:_("flex h-9 w-9 items-center justify-center",e),...t,children:[s.jsx(ci,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"More pages"})]});jd.displayName="PaginationEllipsis";const oC=({table:e,isLoading:t=!1})=>{const r=e.getPageCount(),n=e.getState().pagination.pageIndex+1,[o,a]=S.useState(r);S.useEffect(()=>{r>=1&&a(r)},[r]);const i=S.useMemo(()=>{const m="text-purple-muted-300 dark:text-purple-muted-300",v="hover:bg-purple-muted-600 hover:text-purple-muted-300 dark:hover:bg-purple-muted-600 dark:hover:text-purple-muted-300",h="bg-purple-muted-600 text-purple-muted-300 dark:bg-purple-muted-600 dark:text-purple-muted-300",x="border-none flex items-center justify-center w-8 h-8",y="pointer-events-none opacity-50 cursor-not-allowed";return{previous:_(n===1||t?"pointer-events-none opacity-50":"cursor-pointer",x,m,t&&y),next:_(n===r||t?"pointer-events-none opacity-50":"cursor-pointer",x,m,t&&y),link:b=>_(x,t?"cursor-not-allowed":"cursor-pointer",m,!t&&v,b&&h,t&&y)}},[n,r,t]),l=S.useCallback(m=>{if(t)return;const v=m-1;e.setPagination(h=>({...h,pageIndex:v}))},[e,t]),u=S.useCallback(()=>{t||n<=1||l(n-1)},[n,l,t]),d=S.useCallback(()=>{t||r<=1||n>=r||l(n+1)},[r,n,l,t]),f=S.useCallback(m=>{if(m<=1)return[];if(m<=7)return Array.from({length:m},(h,x)=>x+1);const v=[];return n<=4?v.push(1,2,3,4,5,"ellipsis",m):n>=m-3?v.push(1,"ellipsis",m-4,m-3,m-2,m-1,m):v.push(1,"ellipsis",n-1,n,n+1,"ellipsis",m),v},[n]),p=S.useMemo(()=>{if(r<=1){const m=Math.max(r,o);return f(m)}return f(r)},[r,o,f]),g=S.useCallback((m,v)=>m==="ellipsis"?s.jsx(cr,{children:s.jsx(jd,{})},`ellipsis-${v}`):s.jsx(cr,{className:"flex items-center justify-center",children:s.jsx(Nd,{onClick:()=>l(m),isActive:m===n,className:i.link(m===n),children:m})},`${m}-${v}-pagination-item`),[l,n,i]);return r<2&&o<2?s.jsx(s.Fragment,{}):s.jsx(kd,{className:"dark:bg-transparent",children:s.jsxs(Pd,{children:[s.jsx(cr,{children:s.jsx(Je,{variant:"ghost",size:"icon",className:i.previous,onClick:u,children:s.jsx(rm,{})})}),p.map(g),s.jsx(cr,{children:s.jsx(Je,{variant:"ghost",size:"icon",className:i.next,onClick:d,children:s.jsx(li,{onClick:d})})})]})})},aC=({table:e,emptyStateComponent:t,noResultsComponent:r,errorComponent:n,isLoading:o=!1,isError:a=!1,onRowClick:i,emptyStateTitle:l="There's nothing to show",emptyStateDescription:u="No items to display",noResultsTitle:d="No results",wrapperClassName:f,loadingRowsCount:p=8,activeRowId:g})=>{const m=e.getVisibleFlatColumns().length,v=e.options.manualPagination&&e.options.onPaginationChange,h=e.getRowModel().rows.length===0,x=e.getCoreRowModel().rows.length===0&&!o,y=!o&&(a||x||h),b="hover:bg-transparent cursor-default",C=()=>e.getHeaderGroups().map(P=>s.jsx(bt,{children:P.headers.map(j=>s.jsx(Ed,{className:"text-[#A1A1AA]",children:j.isPlaceholder?void 0:Ws(j.column.columnDef.header,j.getContext())},j.id))},P.id)),R=()=>o?s.jsx(rC,{rowsCount:p,columnsCount:m}):a?s.jsx(bt,{className:b,children:s.jsx($t,{colSpan:m,children:(n==null?void 0:n())||s.jsx(zs,{title:l,description:u})})}):x?s.jsx(bt,{className:b,children:s.jsx($t,{colSpan:m,children:(t==null?void 0:t())||s.jsx(zs,{title:l,description:u})})}):h?s.jsx(bt,{className:b,children:s.jsx($t,{colSpan:m,children:(r==null?void 0:r())||s.jsx(tC,{title:d})})}):e.getRowModel().rows.map(P=>{var E;const j=(E=P.original)==null?void 0:E.id,T=P.getIsSelected()||!!g&&g===j;return s.jsx(bt,{"data-state":T?"selected":void 0,onClick:()=>i==null?void 0:i(P.original),children:P.getVisibleCells().map(V=>s.jsx($t,{className:"text-[#FAFAFA] whitespace-nowrap",children:Ws(V.column.columnDef.cell,V.getContext())},V.id))},P.id)});return s.jsxs("div",{className:_("qodo qodo-table","flex flex-col h-full w-full"),children:[s.jsx("div",{className:"flex-1 min-h-0",children:s.jsxs(Cd,{wrapperClassName:f,className:_({"h-[100%]":y}),children:[s.jsx(Sd,{children:C()}),s.jsx(Rd,{children:R()})]})}),v&&s.jsx("footer",{className:"pt-4 pb-2 border-t border-purple-muted-600/20 flex-shrink-0",children:s.jsx(oC,{table:e,isLoading:o})})]})},jo=e=>{const{children:t,...r}=e,n=t&&t!==0?t:"-";return s.jsx("div",{...r,children:n})},sC=e=>{const{variant:t,children:r}=e,n=r||t;return s.jsx(Pn,{...e,children:n})},iC=e=>{const{children:t,...r}=e;if(typeof t!="number")return console.error("NumberCell must be a number"),s.jsx(jo,{...r,children:"-"});const n=t>1e5?"compact":"standard",o=new Intl.NumberFormat("en-US",{notation:n}).format(t);return s.jsx(jo,{...r,children:o})},lC=({column:e,children:t,tooltipContent:r})=>{const[n,o]=S.useState(!1),a=e.getCanSort();let i=t;return r&&(i=s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("span",{children:t}),s.jsx(Nr,{contentProps:{className:"max-w-[200px]"},content:r,children:s.jsx(fm,{className:"h-4 w-4"})})]})),a?s.jsxs("span",{className:"flex gap-1 items-center cursor-pointer",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),role:"button",children:[i,s.jsx(Jp,{className:_("ml-2 h-4 w-4",{invisible:!n})})]}):s.jsx("span",{children:i})};var To=["Enter"," "],cC=["ArrowDown","PageUp","Home"],Td=["ArrowUp","PageDown","End"],uC=[...cC,...Td],dC={ltr:[...To,"ArrowRight"],rtl:[...To,"ArrowLeft"]},fC={ltr:["ArrowLeft"],rtl:["ArrowRight"]},jr="Menu",[mr,pC,mC]=dn(jr),[Pt,_d]=ye(jr,[mC,ut,Jt]),Tr=ut(),Ad=Jt(),[Id,gt]=Pt(jr),[gC,_r]=Pt(jr),Md=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:o,onOpenChange:a,modal:i=!0}=e,l=Tr(t),[u,d]=c.useState(null),f=c.useRef(!1),p=Oe(a),g=Ut(o);return c.useEffect(()=>{const m=()=>{f.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>f.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),s.jsx(yr,{...l,children:s.jsx(Id,{scope:t,open:r,onOpenChange:p,content:u,onContentChange:d,children:s.jsx(gC,{scope:t,onClose:c.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:g,modal:i,children:n})})})};Md.displayName=jr;var hC="MenuAnchor",Sa=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=Tr(r);return s.jsx(wr,{...o,...n,ref:t})});Sa.displayName=hC;var Ra="MenuPortal",[vC,Od]=Pt(Ra,{forceMount:void 0}),Dd=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:o}=e,a=gt(Ra,t);return s.jsx(vC,{scope:t,forceMount:r,children:s.jsx(ke,{present:r||a.open,children:s.jsx(Xt,{asChild:!0,container:o,children:n})})})};Dd.displayName=Ra;var _e="MenuContent",[xC,Ea]=Pt(_e),Ld=c.forwardRef((e,t)=>{const r=Od(_e,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,a=gt(_e,e.__scopeMenu),i=_r(_e,e.__scopeMenu);return s.jsx(mr.Provider,{scope:e.__scopeMenu,children:s.jsx(ke,{present:n||a.open,children:s.jsx(mr.Slot,{scope:e.__scopeMenu,children:i.modal?s.jsx(bC,{...o,ref:t}):s.jsx(yC,{...o,ref:t})})})})}),bC=c.forwardRef((e,t)=>{const r=gt(_e,e.__scopeMenu),n=c.useRef(null),o=se(t,n);return c.useEffect(()=>{const a=n.current;if(a)return bn(a)},[]),s.jsx(ka,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:F(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),yC=c.forwardRef((e,t)=>{const r=gt(_e,e.__scopeMenu);return s.jsx(ka,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),wC=st("MenuContent.ScrollLock"),ka=c.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:g,onDismiss:m,disableOutsideScroll:v,...h}=e,x=gt(_e,r),y=_r(_e,r),b=Tr(r),C=Ad(r),R=pC(r),[P,j]=c.useState(null),T=c.useRef(null),E=se(t,T,x.onContentChange),V=c.useRef(0),U=c.useRef(""),re=c.useRef(0),te=c.useRef(null),J=c.useRef("right"),q=c.useRef(0),D=v?Cr:c.Fragment,A=v?{as:wC,allowPinchZoom:!0}:void 0,$=O=>{var I,Z;const W=U.current+O,Q=R().filter(ee=>!ee.disabled),N=document.activeElement,B=(I=Q.find(ee=>ee.ref.current===N))==null?void 0:I.textValue,Y=Q.map(ee=>ee.textValue),M=IC(Y,W,B),G=(Z=Q.find(ee=>ee.textValue===M))==null?void 0:Z.ref.current;(function ee(oe){U.current=oe,window.clearTimeout(V.current),oe!==""&&(V.current=window.setTimeout(()=>ee(""),1e3))})(W),G&&setTimeout(()=>G.focus())};c.useEffect(()=>()=>window.clearTimeout(V.current),[]),fn();const k=c.useCallback(O=>{var Q,N;return J.current===((Q=te.current)==null?void 0:Q.side)&&OC(O,(N=te.current)==null?void 0:N.area)},[]);return s.jsx(xC,{scope:r,searchRef:U,onItemEnter:c.useCallback(O=>{k(O)&&O.preventDefault()},[k]),onItemLeave:c.useCallback(O=>{var W;k(O)||((W=T.current)==null||W.focus(),j(null))},[k]),onTriggerLeave:c.useCallback(O=>{k(O)&&O.preventDefault()},[k]),pointerGraceTimerRef:re,onPointerGraceIntentChange:c.useCallback(O=>{te.current=O},[]),children:s.jsx(D,{...A,children:s.jsx(xr,{asChild:!0,trapped:o,onMountAutoFocus:F(a,O=>{var W;O.preventDefault(),(W=T.current)==null||W.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:s.jsx(Ht,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:g,onDismiss:m,children:s.jsx(oa,{asChild:!0,...C,dir:y.dir,orientation:"vertical",loop:n,currentTabStopId:P,onCurrentTabStopIdChange:j,onEntryFocus:F(u,O=>{y.isUsingKeyboardRef.current||O.preventDefault()}),preventScrollOnEntryFocus:!0,children:s.jsx(vn,{role:"menu","aria-orientation":"vertical","data-state":ef(x.open),"data-radix-menu-content":"",dir:y.dir,...b,...h,ref:E,style:{outline:"none",...h.style},onKeyDown:F(h.onKeyDown,O=>{const Q=O.target.closest("[data-radix-menu-content]")===O.currentTarget,N=O.ctrlKey||O.altKey||O.metaKey,B=O.key.length===1;Q&&(O.key==="Tab"&&O.preventDefault(),!N&&B&&$(O.key));const Y=T.current;if(O.target!==Y||!uC.includes(O.key))return;O.preventDefault();const G=R().filter(I=>!I.disabled).map(I=>I.ref.current);Td.includes(O.key)&&G.reverse(),_C(G)}),onBlur:F(e.onBlur,O=>{O.currentTarget.contains(O.target)||(window.clearTimeout(V.current),U.current="")}),onPointerMove:F(e.onPointerMove,gr(O=>{const W=O.target,Q=q.current!==O.clientX;if(O.currentTarget.contains(W)&&Q){const N=O.clientX>q.current?"right":"left";J.current=N,q.current=O.clientX}}))})})})})})})});Ld.displayName=_e;var CC="MenuGroup",Pa=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return s.jsx(X.div,{role:"group",...n,ref:t})});Pa.displayName=CC;var SC="MenuLabel",$d=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return s.jsx(X.div,{...n,ref:t})});$d.displayName=SC;var on="MenuItem",qs="menu.itemSelect",Dn=c.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...o}=e,a=c.useRef(null),i=_r(on,e.__scopeMenu),l=Ea(on,e.__scopeMenu),u=se(t,a),d=c.useRef(!1),f=()=>{const p=a.current;if(!r&&p){const g=new CustomEvent(qs,{bubbles:!0,cancelable:!0});p.addEventListener(qs,m=>n==null?void 0:n(m),{once:!0}),mi(p,g),g.defaultPrevented?d.current=!1:i.onClose()}};return s.jsx(Fd,{...o,ref:u,disabled:r,onClick:F(e.onClick,f),onPointerDown:p=>{var g;(g=e.onPointerDown)==null||g.call(e,p),d.current=!0},onPointerUp:F(e.onPointerUp,p=>{var g;d.current||(g=p.currentTarget)==null||g.click()}),onKeyDown:F(e.onKeyDown,p=>{const g=l.searchRef.current!=="";r||g&&p.key===" "||To.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Dn.displayName=on;var Fd=c.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:o,...a}=e,i=Ea(on,r),l=Ad(r),u=c.useRef(null),d=se(t,u),[f,p]=c.useState(!1),[g,m]=c.useState("");return c.useEffect(()=>{const v=u.current;v&&m((v.textContent??"").trim())},[a.children]),s.jsx(mr.ItemSlot,{scope:r,disabled:n,textValue:o??g,children:s.jsx(aa,{asChild:!0,...l,focusable:!n,children:s.jsx(X.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...a,ref:d,onPointerMove:F(e.onPointerMove,gr(v=>{n?i.onItemLeave(v):(i.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:F(e.onPointerLeave,gr(v=>i.onItemLeave(v))),onFocus:F(e.onFocus,()=>p(!0)),onBlur:F(e.onBlur,()=>p(!1))})})})}),RC="MenuCheckboxItem",Vd=c.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...o}=e;return s.jsx(qd,{scope:e.__scopeMenu,checked:r,children:s.jsx(Dn,{role:"menuitemcheckbox","aria-checked":an(r)?"mixed":r,...o,ref:t,"data-state":Ta(r),onSelect:F(o.onSelect,()=>n==null?void 0:n(an(r)?!0:!r),{checkForDefaultPrevented:!1})})})});Vd.displayName=RC;var Bd="MenuRadioGroup",[EC,kC]=Pt(Bd,{value:void 0,onValueChange:()=>{}}),Gd=c.forwardRef((e,t)=>{const{value:r,onValueChange:n,...o}=e,a=Oe(n);return s.jsx(EC,{scope:e.__scopeMenu,value:r,onValueChange:a,children:s.jsx(Pa,{...o,ref:t})})});Gd.displayName=Bd;var Wd="MenuRadioItem",zd=c.forwardRef((e,t)=>{const{value:r,...n}=e,o=kC(Wd,e.__scopeMenu),a=r===o.value;return s.jsx(qd,{scope:e.__scopeMenu,checked:a,children:s.jsx(Dn,{role:"menuitemradio","aria-checked":a,...n,ref:t,"data-state":Ta(a),onSelect:F(n.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,r)},{checkForDefaultPrevented:!1})})})});zd.displayName=Wd;var Na="MenuItemIndicator",[qd,PC]=Pt(Na,{checked:!1}),Ud=c.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...o}=e,a=PC(Na,r);return s.jsx(ke,{present:n||an(a.checked)||a.checked===!0,children:s.jsx(X.span,{...o,ref:t,"data-state":Ta(a.checked)})})});Ud.displayName=Na;var NC="MenuSeparator",Hd=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return s.jsx(X.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});Hd.displayName=NC;var jC="MenuArrow",Kd=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=Tr(r);return s.jsx(xn,{...o,...n,ref:t})});Kd.displayName=jC;var ja="MenuSub",[TC,Yd]=Pt(ja),Xd=e=>{const{__scopeMenu:t,children:r,open:n=!1,onOpenChange:o}=e,a=gt(ja,t),i=Tr(t),[l,u]=c.useState(null),[d,f]=c.useState(null),p=Oe(o);return c.useEffect(()=>(a.open===!1&&p(!1),()=>p(!1)),[a.open,p]),s.jsx(yr,{...i,children:s.jsx(Id,{scope:t,open:n,onOpenChange:p,content:d,onContentChange:f,children:s.jsx(TC,{scope:t,contentId:me(),triggerId:me(),trigger:l,onTriggerChange:u,children:r})})})};Xd.displayName=ja;var ur="MenuSubTrigger",Zd=c.forwardRef((e,t)=>{const r=gt(ur,e.__scopeMenu),n=_r(ur,e.__scopeMenu),o=Yd(ur,e.__scopeMenu),a=Ea(ur,e.__scopeMenu),i=c.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=a,d={__scopeMenu:e.__scopeMenu},f=c.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return c.useEffect(()=>f,[f]),c.useEffect(()=>{const p=l.current;return()=>{window.clearTimeout(p),u(null)}},[l,u]),s.jsx(Sa,{asChild:!0,...d,children:s.jsx(Fd,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":o.contentId,"data-state":ef(r.open),...e,ref:Qe(t,o.onTriggerChange),onClick:p=>{var g;(g=e.onClick)==null||g.call(e,p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:F(e.onPointerMove,gr(p=>{a.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!r.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{r.onOpenChange(!0),f()},100))})),onPointerLeave:F(e.onPointerLeave,gr(p=>{var m,v;f();const g=(m=r.content)==null?void 0:m.getBoundingClientRect();if(g){const h=(v=r.content)==null?void 0:v.dataset.side,x=h==="right",y=x?-5:5,b=g[x?"left":"right"],C=g[x?"right":"left"];a.onPointerGraceIntentChange({area:[{x:p.clientX+y,y:p.clientY},{x:b,y:g.top},{x:C,y:g.top},{x:C,y:g.bottom},{x:b,y:g.bottom}],side:h}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(p),p.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:F(e.onKeyDown,p=>{var m;const g=a.searchRef.current!=="";e.disabled||g&&p.key===" "||dC[n.dir].includes(p.key)&&(r.onOpenChange(!0),(m=r.content)==null||m.focus(),p.preventDefault())})})})});Zd.displayName=ur;var Jd="MenuSubContent",Qd=c.forwardRef((e,t)=>{const r=Od(_e,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,a=gt(_e,e.__scopeMenu),i=_r(_e,e.__scopeMenu),l=Yd(Jd,e.__scopeMenu),u=c.useRef(null),d=se(t,u);return s.jsx(mr.Provider,{scope:e.__scopeMenu,children:s.jsx(ke,{present:n||a.open,children:s.jsx(mr.Slot,{scope:e.__scopeMenu,children:s.jsx(ka,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:d,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var p;i.isUsingKeyboardRef.current&&((p=u.current)==null||p.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:F(e.onFocusOutside,f=>{f.target!==l.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:F(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:F(e.onKeyDown,f=>{var m;const p=f.currentTarget.contains(f.target),g=fC[i.dir].includes(f.key);p&&g&&(a.onOpenChange(!1),(m=l.trigger)==null||m.focus(),f.preventDefault())})})})})})});Qd.displayName=Jd;function ef(e){return e?"open":"closed"}function an(e){return e==="indeterminate"}function Ta(e){return an(e)?"indeterminate":e?"checked":"unchecked"}function _C(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function AC(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function IC(e,t,r){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let i=AC(e,Math.max(a,0));o.length===1&&(i=i.filter(d=>d!==r));const u=i.find(d=>d.toLowerCase().startsWith(o.toLowerCase()));return u!==r?u:void 0}function MC(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const l=t[a],u=t[i],d=l.x,f=l.y,p=u.x,g=u.y;f>n!=g>n&&r<(p-d)*(n-f)/(g-f)+d&&(o=!o)}return o}function OC(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return MC(r,t)}function gr(e){return t=>t.pointerType==="mouse"?e(t):void 0}var DC=Md,LC=Sa,$C=Dd,FC=Ld,VC=Pa,BC=$d,GC=Dn,WC=Vd,zC=Gd,qC=zd,UC=Ud,HC=Hd,KC=Kd,YC=Xd,XC=Zd,ZC=Qd,Ln="DropdownMenu",[JC,uS]=ye(Ln,[_d]),we=_d(),[QC,tf]=JC(Ln),rf=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:o,defaultOpen:a,onOpenChange:i,modal:l=!0}=e,u=we(t),d=c.useRef(null),[f,p]=be({prop:o,defaultProp:a??!1,onChange:i,caller:Ln});return s.jsx(QC,{scope:t,triggerId:me(),triggerRef:d,contentId:me(),open:f,onOpenChange:p,onOpenToggle:c.useCallback(()=>p(g=>!g),[p]),modal:l,children:s.jsx(DC,{...u,open:f,onOpenChange:p,dir:n,modal:l,children:r})})};rf.displayName=Ln;var nf="DropdownMenuTrigger",of=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...o}=e,a=tf(nf,r),i=we(r);return s.jsx(LC,{asChild:!0,...i,children:s.jsx(X.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...o,ref:Qe(t,a.triggerRef),onPointerDown:F(e.onPointerDown,l=>{!n&&l.button===0&&l.ctrlKey===!1&&(a.onOpenToggle(),a.open||l.preventDefault())}),onKeyDown:F(e.onKeyDown,l=>{n||(["Enter"," "].includes(l.key)&&a.onOpenToggle(),l.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});of.displayName=nf;var e1="DropdownMenuPortal",af=e=>{const{__scopeDropdownMenu:t,...r}=e,n=we(t);return s.jsx($C,{...n,...r})};af.displayName=e1;var sf="DropdownMenuContent",lf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=tf(sf,r),a=we(r),i=c.useRef(!1);return s.jsx(FC,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...n,ref:t,onCloseAutoFocus:F(e.onCloseAutoFocus,l=>{var u;i.current||(u=o.triggerRef.current)==null||u.focus(),i.current=!1,l.preventDefault()}),onInteractOutside:F(e.onInteractOutside,l=>{const u=l.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,f=u.button===2||d;(!o.modal||f)&&(i.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)"}})});lf.displayName=sf;var t1="DropdownMenuGroup",cf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(VC,{...o,...n,ref:t})});cf.displayName=t1;var r1="DropdownMenuLabel",uf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(BC,{...o,...n,ref:t})});uf.displayName=r1;var n1="DropdownMenuItem",df=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(GC,{...o,...n,ref:t})});df.displayName=n1;var o1="DropdownMenuCheckboxItem",ff=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(WC,{...o,...n,ref:t})});ff.displayName=o1;var a1="DropdownMenuRadioGroup",pf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(zC,{...o,...n,ref:t})});pf.displayName=a1;var s1="DropdownMenuRadioItem",mf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(qC,{...o,...n,ref:t})});mf.displayName=s1;var i1="DropdownMenuItemIndicator",gf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(UC,{...o,...n,ref:t})});gf.displayName=i1;var l1="DropdownMenuSeparator",hf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(HC,{...o,...n,ref:t})});hf.displayName=l1;var c1="DropdownMenuArrow",u1=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(KC,{...o,...n,ref:t})});u1.displayName=c1;var d1=e=>{const{__scopeDropdownMenu:t,children:r,open:n,onOpenChange:o,defaultOpen:a}=e,i=we(t),[l,u]=be({prop:n,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return s.jsx(YC,{...i,open:l,onOpenChange:u,children:r})},f1="DropdownMenuSubTrigger",vf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(XC,{...o,...n,ref:t})});vf.displayName=f1;var p1="DropdownMenuSubContent",xf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(ZC,{...o,...n,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)"}})});xf.displayName=p1;var m1=rf,g1=of,bf=af,yf=lf,h1=cf,wf=uf,Cf=df,Sf=ff,v1=pf,Rf=mf,Ef=gf,kf=hf,x1=d1,Pf=vf,Nf=xf;const b1=m1,y1=g1,w1=h1,C1=bf,S1=x1,R1=v1,jf=c.forwardRef(({className:e,inset:t,children:r,...n},o)=>s.jsxs(Pf,{ref:o,className:_("qodo qodo-dropdown-menu-sub-trigger flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-neutral-100 data-[state=open]:bg-neutral-100 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 dark:focus:bg-neutral-800 dark:data-[state=open]:bg-neutral-800",t&&"pl-8",e),...n,children:[r,s.jsx(li,{className:"ml-auto"})]}));jf.displayName=Pf.displayName;const Tf=c.forwardRef(({className:e,...t},r)=>s.jsx(Nf,{ref:r,className:_("z-50 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-purple-muted-600 dark:text-neutral-50",e),...t}));Tf.displayName=Nf.displayName;const _f=c.forwardRef(({className:e,sideOffset:t=4,...r},n)=>s.jsx(bf,{children:s.jsx(yf,{ref:n,sideOffset:t,className:_("qodo qodo-dropdown-menu-content z-50 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-md dark:border-neutral-800 dark:bg-purple-muted-600 background dark:text-neutral-50","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));_f.displayName=yf.displayName;const _a=c.forwardRef(({className:e,inset:t,...r},n)=>s.jsx(Cf,{ref:n,className:_("qodo qodo-dropdown-menu-item relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 cursor-pointer data-[disabled]:cursor-default",t&&"pl-8",e),...r}));_a.displayName=Cf.displayName;const Af=c.forwardRef(({className:e,children:t,checked:r,...n},o)=>s.jsxs(Sf,{ref:o,className:_("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 cursor-pointer data-[disabled]:cursor-default",e),checked:r,...n,children:[s.jsx("span",{className:"absolute right-3 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(Ef,{children:s.jsx(cn,{className:"h-4 w-4"})})}),t]}));Af.displayName=Sf.displayName;const If=c.forwardRef(({className:e,children:t,...r},n)=>s.jsxs(Rf,{ref:n,className:_("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 cursor-pointer data-[disabled]:cursor-default",e),...r,children:[s.jsx("span",{className:"absolute right-3 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(Ef,{children:s.jsx(cn,{className:"h-[18px] w-[18px] stroke-current stroke-purple-300"})})}),t]}));If.displayName=Rf.displayName;const Aa=c.forwardRef(({className:e,inset:t,...r},n)=>s.jsx(wf,{ref:n,className:_("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));Aa.displayName=wf.displayName;const ht=c.forwardRef(({className:e,...t},r)=>s.jsx(kf,{ref:r,className:_("-mx-1 my-1 h-px bg-purple-muted-500",e),...t}));ht.displayName=kf.displayName;const Mf=({className:e,...t})=>s.jsx("span",{className:_("ml-auto text-xs tracking-widest [&>svg]:size-4",e),...t});Mf.displayName="DropdownMenuEndAndornment";const E1=({radioItem:e})=>s.jsxs(If,{className:"m-0 rounded-none gap-2 text-white focus:text-purple-muted-100 focus:bg-zinc-800 pl-3 pr-9 py-1.5",value:e.value,disabled:e.disabled,onSelect:t=>t.preventDefault(),children:[e.icon,e.label]}),k1=({radioGroupItem:e})=>s.jsxs(s.Fragment,{children:[s.jsx(R1,{value:e.value,onValueChange:e.onValueChange,children:e.radioItems.map((t,r)=>s.jsx(E1,{radioItem:t},`item-${r}`))}),e.separator&&s.jsx(ht,{})]}),P1=({actionItem:e})=>s.jsxs("div",{className:"w-full [&>button]:w-full",children:[s.jsx(Nr,{content:e.tooltip,providerProps:{delayDuration:200},children:s.jsx(_a,{className:"m-0 rounded-none py-1.5 px-3 outline-none text-white focus:text-purple-muted-100 focus:bg-zinc-800",disabled:e.disabled||e.loading,onClick:e.onClick,onSelect:e.onSelect,children:s.jsxs("div",{className:"flex items-center gap-2",children:[e.loading&&s.jsx(ui,{className:"h-4 w-4 motion-preset-spin motion-duration-1000"}),!e.loading&&e.icon,e.label,e.endAndornment&&s.jsx(Mf,{children:e.endAndornment})]})})}),e.separator&&s.jsx(ht,{})]}),N1=({checkboxItem:e})=>s.jsxs(Af,{className:"gap-2 m-0 rounded-none py-1.5 pl-3 pr-9 outline-none text-white focus:text-purple-muted-100 focus:bg-zinc-800 [&_svg]:stroke-purple-300 [&_svg]:size-[18px] [&_svg]:stroke-[3px]",checked:e.checked,onCheckedChange:e.onSelect,disabled:e.disabled,onSelect:t=>t.preventDefault(),children:[e.icon,e.label]}),j1=({checkboxGroupItem:e})=>s.jsxs(s.Fragment,{children:[s.jsx(w1,{children:e.checkboxes.map((t,r)=>s.jsx(N1,{checkboxItem:t},`item-${r}`))}),e.separator&&s.jsx(ht,{})]}),T1=({subMenuItem:e})=>s.jsxs(s.Fragment,{children:[s.jsxs(S1,{children:[s.jsxs(jf,{disabled:e.disabled,className:"m-0 rounded-none py-1.5 pl-3 pr-1 data-[state=open]:bg-zinc-800 data-[state=open]:text-purple-muted-100 text-white focus:text-purple-muted-100 hover:text-purple-muted-100 focus:bg-zinc-800 [&_svg]:stroke-1 [&_svg]:stroke-white [&_svg]:stroke-1.5 [&_svg]:size-4",children:[e.icon,e.label]}),s.jsx(C1,{children:s.jsx(Tf,{className:"rounded-md text-body dark:bg-purple-muted-700 border-purple-muted-500 px-0 py-1.5",children:e.subItems.map((t,r)=>Of(t,r))})})]}),e.separator&&s.jsx(ht,{})]}),_1=({menuItem:e})=>s.jsx(Aa,{className:"text-[#7968FA] px-3 font-normal",children:e.label}),A1=()=>s.jsx(ht,{}),Of=(e,t)=>{switch(e.type){case"ActionMenuItem":return s.jsx(P1,{actionItem:e},`item-${t}`);case"CheckboxGroup":return s.jsx(j1,{checkboxGroupItem:e},`item-${t}`);case"RadioGroup":return s.jsx(k1,{radioGroupItem:e},`item-${t}`);case"SubMenuItem":return s.jsx(T1,{subMenuItem:e},`item-${t}`);case"MenuLabel":return s.jsx(_1,{menuItem:e},`item-${t}`);case"Separator":return s.jsx(A1,{},`item-${t}`);default:return null}},I1={s:"min-w-[140px]",l:"min-w-[257px]"},M1=({header:e})=>s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-purple-muted-300",children:e.title}),s.jsx("span",{children:e.label})]}),O1=({header:e})=>e?s.jsxs(s.Fragment,{children:[s.jsx(Aa,{className:"text-purple-100 font-normal px-3",children:e.type==="MenuTitleHeader"&&s.jsx(M1,{header:e})}),s.jsx(ht,{className:"bg-purple-muted-500"})]}):null,D1=({footer:e})=>e?s.jsxs(s.Fragment,{children:[s.jsx(ht,{className:"bg-purple-muted-500"}),s.jsxs(_a,{onClick:e.action,disabled:e.disabled,className:"cursor-pointer m-0 rounded-none py-1.5 px-3 text-purple-300 focus:text-purple-300 focus:bg-transparent",children:[e.icon,e.label]})]}):null,Df=({menuItems:e,header:t,footer:r,triggerElement:n,size:o="s",asChild:a=!1,side:i="bottom",modal:l=!1,disabled:u=!1})=>{const d=si(I1,{[o]:o,className:"rounded-md text-body dark:bg-purple-muted-700 border-purple-muted-500 px-0 py-1.5"},!1);return s.jsx("div",{className:_("qodo qodo-dropdown"),children:s.jsxs(b1,{modal:l,children:[s.jsx(y1,{asChild:a,className:"select-none outline-none flex items-center",disabled:u,children:n}),s.jsxs(_f,{side:i,align:"end",className:d,children:[s.jsx(O1,{header:t}),e.filter(f=>!f.isHidden).map((f,p)=>Of(f,p)),s.jsx(D1,{footer:r})]})]})})},L1=({triggerAriaLabel:e="Open actions menu",className:t,...r})=>s.jsx(Je,{variant:"ghost",size:"icon","aria-label":e,className:_("flex items-center justify-center h-4 w-4",t),...r,children:s.jsx(ci,{className:"h-4 w-4"})}),$1=({menuItems:e=[],triggerElement:t=L1,triggerProps:r={},className:n,size:o="s",asChild:a=!1,side:i="bottom",modal:l=!1})=>s.jsx("div",{className:n,onClick:u=>u.stopPropagation(),children:s.jsx(Df,{triggerElement:s.jsx(t,{className:_("flex items-center justify-center",r==null?void 0:r.className),...r}),menuItems:e,size:o,asChild:a,side:i,modal:l,disabled:r==null?void 0:r.disabled})}),F1={"data-lpignore":"true","data-1p-ignore":"true","data-bitwarden-watching":"false","data-form-type":"other","data-gramm":"false","data-gramm_editor":"false","data-enable-grammarly":"false",spellCheck:!1,autoComplete:"off"},Us={SMALL:"small",LARGE:"large"},V1=({containerClassName:e,className:t,searchSize:r=Us.SMALL,disabled:n=!1,disableFilterIcon:o=!0,...a})=>{const i=r===Us.LARGE?"pl-12 py-3 pr-4 h-[45px]":"pl-9 py-1.5 pr-2 h-[33px]",l=_("absolute top-1/2 h-4 w-4 -translate-y-1/2",n?"text-purple-muted-600":"text-purple-muted-400"),u=_("text-purple-muted-200 dark:border-purple-muted-600 dark:text-purple-muted-200 dark:bg-[#1C1C1C] dark:placeholder:text-purple-muted-400 pl-9",{"pr-9":!o});return s.jsxs("div",{className:_("qodo qodo-search-input","relative",e),children:[s.jsx(di,{className:_(l,"left-3")}),s.jsx(vr,{className:_(i,u,t),disabled:n,...a,...F1}),!o&&s.jsx(mm,{className:_(l,"right-3")})]})},B1=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,G1=e=>e.split(/[,\s]+/).map(t=>t.trim()).filter(Boolean),W1=(e,t)=>{var n;if(!(t!=null&&t.length))return!0;const r=(n=e.split("@")[1])==null?void 0:n.toLowerCase();return t.some(o=>r===o.toLowerCase())},z1=(e,t)=>e.map(r=>{const n=B1.test(r),o=n?W1(r,t==null?void 0:t.domains):void 0;return{email:r,isValid:n&&o!==!1,isDomainValid:o}}),q1=(e,t,r)=>{const n=z1(e,r),o=[...t];for(const a of n)o.some(l=>l.email===a.email)||o.push(a);return o},U1=({onChange:e=()=>{},organization:t})=>{const[r,n]=S.useState([]),o=S.useCallback(d=>{e(d)},[e]),a=S.useCallback(d=>{n(d),o(d)},[o]),i=S.useCallback(d=>{const f=G1(d);if(f.length===0)return;const p=q1(f,r,t);a(p)},[r,a,t]),l=S.useCallback(()=>{a([])},[a]),u=S.useCallback(d=>{const f=r.filter(p=>p.email!==d);a(f)},[r,a]);return{emails:r,setEmails:a,addTokens:i,removeToken:u,clearAll:l,notify:o}},H1=e=>{const{draft:t,setDraft:r,addTokens:n,allSelected:o,setAllSelected:a,clearAll:i,emails:l,setEmails:u,notify:d}=e;return f=>{if((f.key==="a"||f.key==="A")&&(f.metaKey||f.ctrlKey)){f.preventDefault(),a(!0);return}if(o&&(f.key==="Backspace"||f.key==="Delete")){f.preventDefault(),a(!1),i(),r("");return}if(o&&f.key==="Escape"){f.preventDefault(),a(!1);return}if(o&&f.key.length===1&&!f.metaKey&&!f.ctrlKey&&!f.altKey&&(a(!1),i()),f.key==="Backspace"&&t.length===0&&l.length>0){f.preventDefault();const p=l[l.length-1],g=l.slice(0,-1);u(g),r(p.email),d(g);return}if(f.key==="Enter"){f.preventDefault(),t.trim()&&(n(t),r(""));return}[",",";"," "].includes(f.key)&&(f.preventDefault(),t.trim()&&(n(t),r("")))}},K1=({email:e,isValid:t,onRemove:r})=>{const n=o=>{o.stopPropagation(),r(e)};return s.jsxs(Pn,{className:"px-2 group whitespace-nowrap flex-shrink-0",variant:t?"success":"error",size:"sm",children:[s.jsx("span",{className:"max-w-[200px] truncate",children:e}),s.jsx("button",{onClick:n,className:"ml-1 opacity-70 hover:opacity-100 transition-opacity flex-shrink-0",type:"button",children:s.jsx(un,{size:12})})]})},Y1=({hasContent:e,onClearAll:t,emails:r,invalidEmailError:n,invalidDomainError:o})=>{const{formatErrors:a,domainErrors:i,totalInvalidCount:l}=S.useMemo(()=>{const m=r.filter(x=>!x.isValid),v=m.filter(x=>!x.email.includes("@")||x.isDomainValid===void 0),h=m.filter(x=>x.isDomainValid===!1);return{formatErrors:v,domainErrors:h,totalInvalidCount:m.length}},[r]),u=m=>{m.preventDefault(),m.stopPropagation()},d=m=>{u(m),t()},f=m=>{u(m)},p=m=>{m.stopPropagation()},g=(m,v)=>v.length===0?s.jsx(s.Fragment,{}):s.jsxs("div",{className:"space-y-1 text-purple-muted-200",children:[s.jsxs("span",{className:"font-medium border-b border-purple-muted-200",children:[m,":"]}),v.map((h,x)=>s.jsx("p",{className:"break-all",children:h.email},`${m}-${x}-${h.email}`))]});return s.jsxs(s.Fragment,{children:[e&&s.jsx("button",{type:"button",onClick:d,className:"absolute right-3 top-1/2 -translate-y-1/2 hover:text-purple-muted-100",children:s.jsx(Rm,{className:"h-4 w-4"})}),l>0&&s.jsx("div",{className:"absolute flex center align-center right-[34px] top-1/2 -translate-y-1/2 [&>button]:h-4",children:s.jsx(Nr,{triggerProps:{asChild:!0},content:s.jsx("div",{onClick:f,onWheel:p,className:"max-w-[min(90vw,32rem)] max-h-[min(60vh,20rem)] p-3 rounded-md border dark:border-red-800 shadow-lg dark:bg-purple-muted-800 dark:text-purple-muted-100",children:s.jsxs("div",{className:"flex flex-col gap-1 text-xs max-h-64 overflow-y-auto pr-1 no-scrollbar",children:[g(n,a),g(o,i)]})}),providerProps:{delayDuration:200},contentProps:{side:"bottom",align:"end",className:"border-0 bg-transparent p-0 m-0",disableArrow:!0},children:s.jsx("button",{type:"button","aria-label":`${l} invalid emails`,className:"text-red-400 hover:text-red-300",children:s.jsx(km,{className:"size-[18px]"})})})})]})},X1=({onChange:e,disabled:t=!1,inviteMembersPlaceholder:r=({domain:f})=>`Enter email addresses (e.g., user@${f})`,inviteMembersDisabledTooltip:n="You don't have permission to modify email addresses",organization:o,inputClassName:a,chipClassName:i,wrapperClassName:l,invalidEmailError:u="Invalid email",invalidDomainError:d="Email domain is not allowed"})=>{const f=S.useRef(null),p=S.useRef(null),[g,m]=S.useState(""),[v,h]=S.useState(!1),{emails:x,setEmails:y,addTokens:b,removeToken:C,clearAll:R,notify:P}=U1({onChange:e}),j=H1({draft:g,setDraft:m,addTokens:b,allSelected:v,setAllSelected:h,clearAll:R,emails:x,setEmails:y,notify:P}),T=()=>{var Q;const W=((Q=o==null?void 0:o.domains)==null?void 0:Q[0])||"example.com";return r({domain:W})},E=S.useCallback(W=>{m(W.target.value)},[]),V=S.useCallback(()=>{g.trim()&&(b(g),m("")),h(!1)},[g,b]),U=S.useCallback(W=>{const Q=W.clipboardData.getData("text");Q&&(W.preventDefault(),b(Q),m(""))},[b]),re=S.useCallback(()=>{var W;(W=p.current)==null||W.focus()},[p]),te=S.useCallback(()=>{h(!1)},[]),J=S.useCallback(W=>{var N;const Q=W.relatedTarget;Q&&((N=f.current)!=null&&N.contains(Q))||g.trim()&&(b(g),m(""))},[g,b]),q=x.length>0,D=!q&&g.length===0,A=q||g.length>0,$=_("bg-transparent text-sm outline-none border-0 p-0 h-6 shadow-none focus-visible:ring-0 whitespace-nowrap text-purple-muted-200 placeholder:text-purple-muted-400",q?"flex-none shrink-0 overflow-x-auto overflow-y-hidden no-scrollbar":"flex-1 !min-w-full overflow-hidden",{"opacity-50 cursor-not-allowed":t},a),k=_("inline-flex items-center gap-1 no-scrollbar",q?"w-max":"w-full",i),O=_("qodo qodo-email-chips-input","relative w-full max-w-full min-w-0 overflow-hidden rounded-md border pl-9 pr-14 py-2 pl-9 pr-14 py-2 focus-within:ring-1 border-purple-muted-500 dark:bg-purple-muted-800 focus-within:ring-purple-muted-400",l);return s.jsx(Nr,{triggerProps:{asChild:!0},content:t?n:void 0,children:s.jsxs("div",{ref:f,className:O,onClick:re,onFocus:te,onBlur:J,children:[s.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-purple-muted-400",children:s.jsx(vm,{className:"w-4 h-4"})}),s.jsx("div",{className:"w-full text-start max-w-full min-w-0 overflow-x-auto overflow-y-hidden no-scrollbar",children:s.jsxs("div",{className:k,children:[x.map((W,Q)=>s.jsx(K1,{email:W.email,isValid:W.isValid,onRemove:C},`email-${Q}-${W.email}`)),s.jsx("input",{ref:p,value:g,onChange:E,onKeyDown:j,onBlur:V,onPaste:U,className:$,placeholder:D?T():"",disabled:t})]})}),s.jsx(Y1,{hasContent:A,onClearAll:R,emails:x,invalidEmailError:u,invalidDomainError:d})]})})};exports.Accordion=uy;exports.AccordionContent=py;exports.AccordionItem=dy;exports.AccordionTrigger=fy;exports.ActionsCell=$1;exports.Badge=Pn;exports.BadgeCell=sC;exports.BaseCell=jo;exports.Button=Je;exports.Card=tb;exports.CardAction=ab;exports.CardContent=sb;exports.CardDescription=ob;exports.CardFooter=ib;exports.CardHeader=rb;exports.CardTitle=nb;exports.ClassHelper=si;exports.Combobox=ea;exports.Dialog=Ex;exports.DialogClose=Px;exports.DialogContent=Nx;exports.DialogDescription=Ax;exports.DialogFooter=Tx;exports.DialogHeader=jx;exports.DialogOverlay=dc;exports.DialogPortal=uc;exports.DialogTitle=_x;exports.DialogTrigger=kx;exports.Dropdown=Df;exports.EmailChipsInput=X1;exports.Form=Ae;exports.FormProvider=yu;exports.Input=vr;exports.NumberCell=iC;exports.Progress=hb;exports.RadioGroup=xa;exports.RadioGroupItem=ba;exports.SearchInput=V1;exports.Select=_l;exports.SelectContent=Ho;exports.SelectGroup=Fv;exports.SelectItem=Ko;exports.SelectLabel=Il;exports.SelectScrollDownButton=Uo;exports.SelectScrollUpButton=qo;exports.SelectSeparator=Ml;exports.SelectTrigger=zo;exports.SelectValue=Al;exports.Skeleton=jc;exports.SortableHeaderCell=lC;exports.Steps=Y0;exports.Switch=Sb;exports.Table=aC;exports.TagsInput=nd;exports.Toggle=Eb;exports.ToggleGroup=Gb;exports.ToggleGroupItem=Wb;exports.Tooltip=Nr;exports.borderRadius=ip;exports.cn=_;exports.colors=ap;exports.spacing=sp;exports.typography=lp;exports.useFormContext=wu;
204
204
  //# sourceMappingURL=index.cjs.js.map