@qodo/design-system 0.19.2 → 0.19.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/design-system.css +1 -1
- package/dist/index.cjs.js +45 -45
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +25 -3
- package/dist/index.esm.js +2141 -2046
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react"),jr=require("react-dom");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react"),jr=require("react-dom");function zi(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 d=zi(S),Sn=zi(jr),zm={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"}},qm={xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem","2xl":"3rem"},Um={sm:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem"},Hm={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 Hr={exports:{}},dr={};/**
|
|
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 Rs;function
|
|
9
|
+
*/var Rs;function Km(){if(Rs)return dr;Rs=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,c,u){var f,p={},g=null,m=null;u!==void 0&&(g=""+u),c.key!==void 0&&(g=""+c.key),c.ref!==void 0&&(m=c.ref);for(f in c)n.call(c,f)&&!a.hasOwnProperty(f)&&(p[f]=c[f]);if(l&&l.defaultProps)for(f in c=l.defaultProps,c)p[f]===void 0&&(p[f]=c[f]);return{$$typeof:t,type:l,key:g,ref:m,props:p,_owner:o.current}}return dr.Fragment=r,dr.jsx=i,dr.jsxs=i,dr}var ur={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,155 +14,155 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+A+w}}var ee=!1,oe;{var ce=typeof WeakMap=="function"?WeakMap:Map;oe=new ce}function ie(w,$){if(!w||ee)return"";{var H=oe.get(w);if(H!==void 0)return H}var ne;ee=!0;var ue=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var fe;fe=L.current,L.current=null,Z();try{if($){var de=function(){throw Error()};if(Object.defineProperty(de.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(de,[])}catch(
|
|
19
|
-
`),
|
|
20
|
-
`),ve=le.length-1,he=
|
|
21
|
-
`+le[ve].replace(" at new "," at ");return w.displayName&&Ae.includes("<anonymous>")&&(Ae=Ae.replace("<anonymous>",w.displayName)),typeof w=="function"&&oe.set(w,Ae),Ae}while(ve>=1&&he>=0);break}}}finally{ee=!1,L.current=fe,z(),Error.prepareStackTrace=ue}var
|
|
17
|
+
*/var Ns;function Ym(){return Ns||(Ns=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"),c=Symbol.for("react.forward_ref"),u=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"),b=Symbol.iterator,v="@@iterator";function x(w){if(w===null||typeof w!="object")return null;var $=b&&w[b]||w[v];return typeof $=="function"?$:null}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function h(w){{for(var $=arguments.length,H=new Array($>1?$-1:0),ne=1;ne<$;ne++)H[ne-1]=arguments[ne];C("error",w,H)}}function C(w,$,H){{var ne=y.ReactDebugCurrentFrame,ue=ne.getStackAddendum();ue!==""&&($+="%s",H=H.concat([ue]));var fe=H.map(function(de){return String(de)});fe.unshift("Warning: "+$),Function.prototype.apply.call(console[w],console,fe)}}var E=!1,j=!1,_=!1,P=!1,N=!1,W;W=Symbol.for("react.module.reference");function U(w){return!!(typeof w=="string"||typeof w=="function"||w===n||w===a||N||w===o||w===u||w===f||P||w===m||E||j||_||typeof w=="object"&&w!==null&&(w.$$typeof===g||w.$$typeof===p||w.$$typeof===i||w.$$typeof===l||w.$$typeof===c||w.$$typeof===W||w.getModuleId!==void 0))}function re(w,$,H){var ne=w.displayName;if(ne)return ne;var ue=$.displayName||$.name||"";return ue!==""?H+"("+ue+")":H}function te(w){return w.displayName||"Context"}function Q(w){if(w==null)return null;if(typeof w.tag=="number"&&h("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 u:return"Suspense";case f:return"SuspenseList"}if(typeof w=="object")switch(w.$$typeof){case l:var $=w;return te($)+".Consumer";case i:var H=w;return te(H._context)+".Provider";case c:return re(w,w.render,"ForwardRef");case p:var ne=w.displayName||null;return ne!==null?ne:Q(w.type)||"Memo";case g:{var ue=w,fe=ue._payload,de=ue._init;try{return Q(de(fe))}catch{return null}}}return null}var V=Object.assign,O=0,I,D,k,M,B,J,T;function G(){}G.__reactDisabledLog=!0;function Z(){{if(O===0){I=console.log,D=console.info,k=console.warn,M=console.error,B=console.group,J=console.groupCollapsed,T=console.groupEnd;var w={configurable:!0,enumerable:!0,value:G,writable:!0};Object.defineProperties(console,{info:w,log:w,warn:w,error:w,group:w,groupCollapsed:w,groupEnd:w})}O++}}function z(){{if(O--,O===0){var w={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:V({},w,{value:I}),info:V({},w,{value:D}),warn:V({},w,{value:k}),error:V({},w,{value:M}),group:V({},w,{value:B}),groupCollapsed:V({},w,{value:J}),groupEnd:V({},w,{value:T})})}O<0&&h("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var L=y.ReactCurrentDispatcher,A;function K(w,$,H){{if(A===void 0)try{throw Error()}catch(ue){var ne=ue.stack.trim().match(/\n( *(at )?)/);A=ne&&ne[1]||""}return`
|
|
18
|
+
`+A+w}}var ee=!1,oe;{var ce=typeof WeakMap=="function"?WeakMap:Map;oe=new ce}function ie(w,$){if(!w||ee)return"";{var H=oe.get(w);if(H!==void 0)return H}var ne;ee=!0;var ue=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var fe;fe=L.current,L.current=null,Z();try{if($){var de=function(){throw Error()};if(Object.defineProperty(de.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(de,[])}catch(Re){ne=Re}Reflect.construct(w,[],de)}else{try{de.call()}catch(Re){ne=Re}w.call(de.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
|
+
`),ke=ne.stack.split(`
|
|
20
|
+
`),ve=le.length-1,he=ke.length-1;ve>=1&&he>=0&&le[ve]!==ke[he];)he--;for(;ve>=1&&he>=0;ve--,he--)if(le[ve]!==ke[he]){if(ve!==1||he!==1)do if(ve--,he--,he<0||le[ve]!==ke[he]){var Ae=`
|
|
21
|
+
`+le[ve].replace(" at new "," at ");return w.displayName&&Ae.includes("<anonymous>")&&(Ae=Ae.replace("<anonymous>",w.displayName)),typeof w=="function"&&oe.set(w,Ae),Ae}while(ve>=1&&he>=0);break}}}finally{ee=!1,L.current=fe,z(),Error.prepareStackTrace=ue}var Ft=w?w.displayName||w.name:"",St=Ft?K(Ft):"";return typeof w=="function"&&oe.set(w,St),St}function Ee(w,$,H){return ie(w,!1)}function _e(w){var $=w.prototype;return!!($&&$.isReactComponent)}function Ge(w,$,H){if(w==null)return"";if(typeof w=="function")return ie(w,_e(w));if(typeof w=="string")return K(w);switch(w){case u:return K("Suspense");case f:return K("SuspenseList")}if(typeof w=="object")switch(w.$$typeof){case c:return Ee(w.render);case p:return Ge(w.type,$,H);case g:{var ne=w,ue=ne._payload,fe=ne._init;try{return Ge(fe(ue),$,H)}catch{}}}return""}var Me=Object.prototype.hasOwnProperty,at={},Ur=y.ReactDebugCurrentFrame;function Ze(w){if(w){var $=w._owner,H=Ge(w.type,w._source,$?$.type:null);Ur.setExtraStackFrame(H)}else Ur.setExtraStackFrame(null)}function Cm(w,$,H,ne,ue){{var fe=Function.call.bind(Me);for(var de in w)if(fe(w,de)){var le=void 0;try{if(typeof w[de]!="function"){var ke=Error((ne||"React class")+": "+H+" type `"+de+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof w[de]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ke.name="Invariant Violation",ke}le=w[de]($,de,ne,H,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ve){le=ve}le&&!(le instanceof Error)&&(Ze(ue),h("%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",H,de,typeof le),Ze(null)),le instanceof Error&&!(le.message in at)&&(at[le.message]=!0,Ze(ue),h("Failed %s type: %s",H,le.message),Ze(null))}}}var Sm=Array.isArray;function ao(w){return Sm(w)}function Em(w){{var $=typeof Symbol=="function"&&Symbol.toStringTag,H=$&&w[Symbol.toStringTag]||w.constructor.name||"Object";return H}}function km(w){try{return ms(w),!1}catch{return!0}}function ms(w){return""+w}function gs(w){if(km(w))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Em(w)),ms(w)}var vs=y.ReactCurrentOwner,Rm={key:!0,ref:!0,__self:!0,__source:!0},hs,xs;function Nm(w){if(Me.call(w,"ref")){var $=Object.getOwnPropertyDescriptor(w,"ref").get;if($&&$.isReactWarning)return!1}return w.ref!==void 0}function jm(w){if(Me.call(w,"key")){var $=Object.getOwnPropertyDescriptor(w,"key").get;if($&&$.isReactWarning)return!1}return w.key!==void 0}function Pm(w,$){typeof w.ref=="string"&&vs.current}function Tm(w,$){{var H=function(){hs||(hs=!0,h("%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)",$))};H.isReactWarning=!0,Object.defineProperty(w,"key",{get:H,configurable:!0})}}function _m(w,$){{var H=function(){xs||(xs=!0,h("%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)",$))};H.isReactWarning=!0,Object.defineProperty(w,"ref",{get:H,configurable:!0})}}var Am=function(w,$,H,ne,ue,fe,de){var le={$$typeof:t,type:w,key:$,ref:H,props:de,_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:ue}),Object.freeze&&(Object.freeze(le.props),Object.freeze(le)),le};function Im(w,$,H,ne,ue){{var fe,de={},le=null,ke=null;H!==void 0&&(gs(H),le=""+H),jm($)&&(gs($.key),le=""+$.key),Nm($)&&(ke=$.ref,Pm($,ue));for(fe in $)Me.call($,fe)&&!Rm.hasOwnProperty(fe)&&(de[fe]=$[fe]);if(w&&w.defaultProps){var ve=w.defaultProps;for(fe in ve)de[fe]===void 0&&(de[fe]=ve[fe])}if(le||ke){var he=typeof w=="function"?w.displayName||w.name||"Unknown":w;le&&Tm(de,he),ke&&_m(de,he)}return Am(w,le,ke,ue,ne,vs.current,de)}}var so=y.ReactCurrentOwner,bs=y.ReactDebugCurrentFrame;function Lt(w){if(w){var $=w._owner,H=Ge(w.type,w._source,$?$.type:null);bs.setExtraStackFrame(H)}else bs.setExtraStackFrame(null)}var io;io=!1;function lo(w){return typeof w=="object"&&w!==null&&w.$$typeof===t}function ys(){{if(so.current){var w=Q(so.current.type);if(w)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+w+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+w+"`."}return""}}function Mm(w){return""}var ws={};function Om(w){{var $=ys();if(!$){var H=typeof w=="string"?w:w.displayName||w.name;H&&($=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+H+">.")}return $}}function
|
|
25
|
+
Check the top-level render call using <`+H+">.")}return $}}function Cs(w,$){{if(!w._store||w._store.validated||w.key!=null)return;w._store.validated=!0;var H=Om($);if(ws[H])return;ws[H]=!0;var ne="";w&&w._owner&&w._owner!==so.current&&(ne=" It was passed a child from "+Q(w._owner.type)+"."),Lt(w),h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',H,ne),Lt(null)}}function Ss(w,$){{if(typeof w!="object")return;if(ao(w))for(var H=0;H<w.length;H++){var ne=w[H];lo(ne)&&Cs(ne,$)}else if(lo(w))w._store&&(w._store.validated=!0);else if(w){var ue=x(w);if(typeof ue=="function"&&ue!==w.entries)for(var fe=ue.call(w),de;!(de=fe.next()).done;)lo(de.value)&&Cs(de.value,$)}}}function Dm(w){{var $=w.type;if($==null||typeof $=="string")return;var H;if(typeof $=="function")H=$.propTypes;else if(typeof $=="object"&&($.$$typeof===c||$.$$typeof===p))H=$.propTypes;else return;if(H){var ne=Q($);Cm(H,w.props,"prop",ne,w)}else if($.PropTypes!==void 0&&!io){io=!0;var ue=Q($);h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ue||"Unknown")}typeof $.getDefaultProps=="function"&&!$.getDefaultProps.isReactClassApproved&&h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function $m(w){{for(var $=Object.keys(w.props),H=0;H<$.length;H++){var ne=$[H];if(ne!=="children"&&ne!=="key"){Lt(w),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ne),Lt(null);break}}w.ref!==null&&(Lt(w),h("Invalid attribute `ref` supplied to `React.Fragment`."),Lt(null))}}var Es={};function ks(w,$,H,ne,ue,fe){{var de=U(w);if(!de){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 ke=Mm();ke?le+=ke:le+=ys();var ve;w===null?ve="null":ao(w)?ve="array":w!==void 0&&w.$$typeof===t?(ve="<"+(Q(w.type)||"Unknown")+" />",le=" Did you accidentally export a JSX literal instead of a component?"):ve=typeof w,h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ve,le)}var he=Im(w,$,H,ue,fe);if(he==null)return he;if(de){var Ae=$.children;if(Ae!==void 0)if(ne)if(ao(Ae)){for(var Ft=0;Ft<Ae.length;Ft++)Ss(Ae[Ft],w);Object.freeze&&Object.freeze(Ae)}else h("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 Ss(Ae,w)}if(Me.call($,"key")){var St=Q(w),Re=Object.keys($).filter(function(Wm){return Wm!=="key"}),co=Re.length>0?"{key: someKey, "+Re.join(": ..., ")+": ...}":"{key: someKey}";if(!Es[St+co]){var Gm=Re.length>0?"{"+Re.join(": ..., ")+": ...}":"{}";h(`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} />`,co,St,Lm,St),Ss[St+co]=!0}}return w===n?Im(he):Am(he),he}}function Mm(w,$,H){return Es(w,$,H,!0)}function Om(w,$,H){return Es(w,$,H,!1)}var Dm=Om,$m=Mm;ur.Fragment=n,ur.jsx=Dm,ur.jsxs=$m})()),ur}var Ns;function Um(){return Ns||(Ns=1,process.env.NODE_ENV==="production"?Hr.exports=zm():Hr.exports=qm()),Hr.exports}var s=Um();function Wi(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=Wi(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function zi(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Wi(e))&&(n&&(n+=" "),n+=t);return n}const js=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ps=zi,Qt=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Ps(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(u=>{const f=r==null?void 0:r[u],p=a==null?void 0:a[u];if(f===null)return null;const g=js(f)||js(p);return o[u][g]}),l=r&&Object.entries(r).reduce((u,f)=>{let[p,g]=f;return g===void 0||(u[p]=g),u},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,f)=>{let{class:p,className:g,...m}=f;return Object.entries(m).every(b=>{let[v,x]=b;return Array.isArray(x)?x.includes({...a,...l}[v]):{...a,...l}[v]===x})?[...u,p,g]:u},[]);return Ps(e,i,c,r==null?void 0:r.class,r==null?void 0:r.className)},aa="-",Hm=e=>{const t=Ym(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{const l=i.split(aa);return l[0]===""&&l.length!==1&&l.shift(),qi(l,t)||Km(i)},getConflictingClassGroupIds:(i,l)=>{const c=r[i]||[];return l&&n[i]?[...c,...n[i]]:c}}},qi=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?qi(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(aa);return(i=t.validators.find(({validator:l})=>l(a)))==null?void 0:i.classGroupId},Ts=/^\[(.+)\]$/,Km=e=>{if(Ts.test(e)){const t=Ts.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Ym=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const o in r)Ao(r[o],n,o,t);return n},Ao=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:_s(t,o);a.classGroupId=r;return}if(typeof o=="function"){if(Xm(o)){Ao(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([a,i])=>{Ao(i,_s(t,a),r,n)})})},_s=(e,t)=>{let r=e;return t.split(aa).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Xm=e=>e.isThemeGetter,Zm=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)}}},Io="!",Mo=":",Jm=Mo.length,Qm=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const a=[];let i=0,l=0,c=0,u;for(let b=0;b<o.length;b++){let v=o[b];if(i===0&&l===0){if(v===Mo){a.push(o.slice(c,b)),c=b+Jm;continue}if(v==="/"){u=b;continue}}v==="["?i++:v==="]"?i--:v==="("?l++:v===")"&&l--}const f=a.length===0?o:o.substring(c),p=eg(f),g=p!==f,m=u&&u>c?u-c:void 0;return{modifiers:a,hasImportantModifier:g,baseClassName:p,maybePostfixModifierPosition:m}};if(t){const o=t+Mo,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},eg=e=>e.endsWith(Io)?e.substring(0,e.length-1):e.startsWith(Io)?e.substring(1):e,tg=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}},rg=e=>({cache:Zm(e.cacheSize),parseClassName:Qm(e),sortModifiers:tg(e),...Hm(e)}),ng=/\s+/,og=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:a}=t,i=[],l=e.trim().split(ng);let c="";for(let u=l.length-1;u>=0;u-=1){const f=l[u],{isExternal:p,modifiers:g,hasImportantModifier:m,baseClassName:b,maybePostfixModifierPosition:v}=r(f);if(p){c=f+(c.length>0?" "+c:c);continue}let x=!!v,y=n(x?b.substring(0,v):b);if(!y){if(!x){c=f+(c.length>0?" "+c:c);continue}if(y=n(b),!y){c=f+(c.length>0?" "+c:c);continue}x=!1}const h=a(g).join(":"),C=m?h+Io:h,E=C+y;if(i.includes(E))continue;i.push(E);const j=o(y,x);for(let _=0;_<j.length;++_){const P=j[_];i.push(C+P)}c=f+(c.length>0?" "+c:c)}return c};function ag(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Ui(t))&&(n&&(n+=" "),n+=r);return n}const Ui=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Ui(e[n]))&&(r&&(r+=" "),r+=t);return r};function sg(e,...t){let r,n,o,a=i;function i(c){const u=t.reduce((f,p)=>p(f),e());return r=rg(u),n=r.cache.get,o=r.cache.set,a=l,l(c)}function l(c){const u=n(c);if(u)return u;const f=og(c,r);return o(c,f),f}return function(){return a(ag.apply(null,arguments))}}const xe=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Hi=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ki=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ig=/^\d+\/\d+$/,lg=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,cg=/\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$/,dg=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ug=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fg=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ft=e=>ig.test(e),se=e=>!!e&&!Number.isNaN(Number(e)),st=e=>!!e&&Number.isInteger(Number(e)),uo=e=>e.endsWith("%")&&se(e.slice(0,-1)),Je=e=>lg.test(e),pg=()=>!0,mg=e=>cg.test(e)&&!dg.test(e),Yi=()=>!1,gg=e=>ug.test(e),vg=e=>fg.test(e),hg=e=>!Y(e)&&!X(e),xg=e=>er(e,Ji,Yi),Y=e=>Hi.test(e),Et=e=>er(e,Qi,mg),fo=e=>er(e,Sg,se),As=e=>er(e,Xi,Yi),bg=e=>er(e,Zi,vg),Kr=e=>er(e,el,gg),X=e=>Ki.test(e),fr=e=>tr(e,Qi),yg=e=>tr(e,Eg),Is=e=>tr(e,Xi),wg=e=>tr(e,Ji),Cg=e=>tr(e,Zi),Yr=e=>tr(e,el,!0),er=(e,t,r)=>{const n=Hi.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},tr=(e,t,r=!1)=>{const n=Ki.exec(e);return n?n[1]?t(n[1]):r:!1},Xi=e=>e==="position"||e==="percentage",Zi=e=>e==="image"||e==="url",Ji=e=>e==="length"||e==="size"||e==="bg-size",Qi=e=>e==="length",Sg=e=>e==="number",Eg=e=>e==="family-name",el=e=>e==="shadow",Rg=()=>{const e=xe("color"),t=xe("font"),r=xe("text"),n=xe("font-weight"),o=xe("tracking"),a=xe("leading"),i=xe("breakpoint"),l=xe("container"),c=xe("spacing"),u=xe("radius"),f=xe("shadow"),p=xe("inset-shadow"),g=xe("text-shadow"),m=xe("drop-shadow"),b=xe("blur"),v=xe("perspective"),x=xe("aspect"),y=xe("ease"),h=xe("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],j=()=>[...E(),X,Y],_=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],N=()=>[X,Y,c],W=()=>[Ft,"full","auto",...N()],U=()=>[st,"none","subgrid",X,Y],re=()=>["auto",{span:["full",st,X,Y]},st,X,Y],te=()=>[st,"auto",X,Y],Q=()=>["auto","min","max","fr",X,Y],V=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],O=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...N()],D=()=>[Ft,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],R=()=>[e,X,Y],M=()=>[...E(),Is,As,{position:[X,Y]}],B=()=>["no-repeat",{repeat:["","x","y","space","round"]}],J=()=>["auto","cover","contain",wg,xg,{size:[X,Y]}],T=()=>[uo,fr,Et],G=()=>["","none","full",u,X,Y],Z=()=>["",se,fr,Et],z=()=>["solid","dashed","dotted","double"],L=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>[se,uo,Is,As],K=()=>["","none",b,X,Y],ee=()=>["none",se,X,Y],oe=()=>["none",se,X,Y],ce=()=>[se,X,Y],ie=()=>[Ft,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Je],breakpoint:[Je],color:[pg],container:[Je],"drop-shadow":[Je],ease:["in","out","in-out"],font:[hg],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Je],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Je],shadow:[Je],spacing:["px",se],text:[Je],"text-shadow":[Je],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ft,Y,X,x]}],container:["container"],columns:[{columns:[se,Y,X,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:j()}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:W()}],"inset-x":[{"inset-x":W()}],"inset-y":[{"inset-y":W()}],start:[{start:W()}],end:[{end:W()}],top:[{top:W()}],right:[{right:W()}],bottom:[{bottom:W()}],left:[{left:W()}],visibility:["visible","invisible","collapse"],z:[{z:[st,"auto",X,Y]}],basis:[{basis:[Ft,"full","auto",l,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[se,Ft,"auto","initial","none",Y]}],grow:[{grow:["",se,X,Y]}],shrink:[{shrink:["",se,X,Y]}],order:[{order:[st,"first","last","none",X,Y]}],"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":Q()}],"auto-rows":[{"auto-rows":Q()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...V(),"normal"]}],"justify-items":[{"justify-items":[...O(),"normal"]}],"justify-self":[{"justify-self":["auto",...O()]}],"align-content":[{content:["normal",...V()]}],"align-items":[{items:[...O(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...O(),{baseline:["","last"]}]}],"place-content":[{"place-content":V()}],"place-items":[{"place-items":[...O(),"baseline"]}],"place-self":[{"place-self":["auto",...O()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],w:[{w:[l,"screen",...D()]}],"min-w":[{"min-w":[l,"screen","none",...D()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...D()]}],h:[{h:["screen","lh",...D()]}],"min-h":[{"min-h":["screen","lh","none",...D()]}],"max-h":[{"max-h":["screen","lh",...D()]}],"font-size":[{text:["base",r,fr,Et]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,X,fo]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",uo,Y]}],"font-family":[{font:[yg,Y,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,X,Y]}],"line-clamp":[{"line-clamp":[se,"none",X,fo]}],leading:[{leading:[a,...N()]}],"list-image":[{"list-image":["none",X,Y]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",X,Y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...z(),"wavy"]}],"text-decoration-thickness":[{decoration:[se,"from-font","auto",X,Et]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[se,"auto",X,Y]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",X,Y]}],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",X,Y]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:B()}],"bg-size":[{bg:J()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},st,X,Y],radial:["",X,Y],conic:[st,X,Y]},Cg,bg]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:T()}],"gradient-via-pos":[{via:T()}],"gradient-to-pos":[{to:T()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:G()}],"rounded-s":[{"rounded-s":G()}],"rounded-e":[{"rounded-e":G()}],"rounded-t":[{"rounded-t":G()}],"rounded-r":[{"rounded-r":G()}],"rounded-b":[{"rounded-b":G()}],"rounded-l":[{"rounded-l":G()}],"rounded-ss":[{"rounded-ss":G()}],"rounded-se":[{"rounded-se":G()}],"rounded-ee":[{"rounded-ee":G()}],"rounded-es":[{"rounded-es":G()}],"rounded-tl":[{"rounded-tl":G()}],"rounded-tr":[{"rounded-tr":G()}],"rounded-br":[{"rounded-br":G()}],"rounded-bl":[{"rounded-bl":G()}],"border-w":[{border:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...z(),"hidden","none"]}],"divide-style":[{divide:[...z(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...z(),"none","hidden"]}],"outline-offset":[{"outline-offset":[se,X,Y]}],"outline-w":[{outline:["",se,fr,Et]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",f,Yr,Kr]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",p,Yr,Kr]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[se,Et]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",g,Yr,Kr]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[se,X,Y]}],"mix-blend":[{"mix-blend":[...L(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":L()}],"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":[se]}],"mask-image-linear-from-pos":[{"mask-linear-from":A()}],"mask-image-linear-to-pos":[{"mask-linear-to":A()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":A()}],"mask-image-t-to-pos":[{"mask-t-to":A()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":A()}],"mask-image-r-to-pos":[{"mask-r-to":A()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":A()}],"mask-image-b-to-pos":[{"mask-b-to":A()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":A()}],"mask-image-l-to-pos":[{"mask-l-to":A()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":A()}],"mask-image-x-to-pos":[{"mask-x-to":A()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":A()}],"mask-image-y-to-pos":[{"mask-y-to":A()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[X,Y]}],"mask-image-radial-from-pos":[{"mask-radial-from":A()}],"mask-image-radial-to-pos":[{"mask-radial-to":A()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":E()}],"mask-image-conic-pos":[{"mask-conic":[se]}],"mask-image-conic-from-pos":[{"mask-conic-from":A()}],"mask-image-conic-to-pos":[{"mask-conic-to":A()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:B()}],"mask-size":[{mask:J()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",X,Y]}],filter:[{filter:["","none",X,Y]}],blur:[{blur:K()}],brightness:[{brightness:[se,X,Y]}],contrast:[{contrast:[se,X,Y]}],"drop-shadow":[{"drop-shadow":["","none",m,Yr,Kr]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",se,X,Y]}],"hue-rotate":[{"hue-rotate":[se,X,Y]}],invert:[{invert:["",se,X,Y]}],saturate:[{saturate:[se,X,Y]}],sepia:[{sepia:["",se,X,Y]}],"backdrop-filter":[{"backdrop-filter":["","none",X,Y]}],"backdrop-blur":[{"backdrop-blur":K()}],"backdrop-brightness":[{"backdrop-brightness":[se,X,Y]}],"backdrop-contrast":[{"backdrop-contrast":[se,X,Y]}],"backdrop-grayscale":[{"backdrop-grayscale":["",se,X,Y]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[se,X,Y]}],"backdrop-invert":[{"backdrop-invert":["",se,X,Y]}],"backdrop-opacity":[{"backdrop-opacity":[se,X,Y]}],"backdrop-saturate":[{"backdrop-saturate":[se,X,Y]}],"backdrop-sepia":[{"backdrop-sepia":["",se,X,Y]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",X,Y]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[se,"initial",X,Y]}],ease:[{ease:["linear","initial",y,X,Y]}],delay:[{delay:[se,X,Y]}],animate:[{animate:["none",h,X,Y]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,X,Y]}],"perspective-origin":[{"perspective-origin":j()}],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:[X,Y,"","none","gpu","cpu"]}],"transform-origin":[{origin:j()}],"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:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",X,Y]}],"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":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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",X,Y]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[se,fr,Et,fo]}],stroke:[{stroke:["none",...R()]}],"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"]}},kg=sg(Rg);function k(...e){return kg(zi(e))}function tl(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()}/**
|
|
30
|
+
<%s key={someKey} {...props} />`,co,St,Gm,St),Es[St+co]=!0}}return w===n?$m(he):Dm(he),he}}function Lm(w,$,H){return ks(w,$,H,!0)}function Fm(w,$,H){return ks(w,$,H,!1)}var Vm=Fm,Bm=Lm;ur.Fragment=n,ur.jsx=Vm,ur.jsxs=Bm})()),ur}var js;function Xm(){return js||(js=1,process.env.NODE_ENV==="production"?Hr.exports=Km():Hr.exports=Ym()),Hr.exports}var s=Xm();function qi(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=qi(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Ui(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=qi(e))&&(n&&(n+=" "),n+=t);return n}const Ps=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ts=Ui,At=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Ts(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(u=>{const f=r==null?void 0:r[u],p=a==null?void 0:a[u];if(f===null)return null;const g=Ps(f)||Ps(p);return o[u][g]}),l=r&&Object.entries(r).reduce((u,f)=>{let[p,g]=f;return g===void 0||(u[p]=g),u},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,f)=>{let{class:p,className:g,...m}=f;return Object.entries(m).every(b=>{let[v,x]=b;return Array.isArray(x)?x.includes({...a,...l}[v]):{...a,...l}[v]===x})?[...u,p,g]:u},[]);return Ts(e,i,c,r==null?void 0:r.class,r==null?void 0:r.className)},aa="-",Zm=e=>{const t=Qm(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{const l=i.split(aa);return l[0]===""&&l.length!==1&&l.shift(),Hi(l,t)||Jm(i)},getConflictingClassGroupIds:(i,l)=>{const c=r[i]||[];return l&&n[i]?[...c,...n[i]]:c}}},Hi=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?Hi(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(aa);return(i=t.validators.find(({validator:l})=>l(a)))==null?void 0:i.classGroupId},_s=/^\[(.+)\]$/,Jm=e=>{if(_s.test(e)){const t=_s.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Qm=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const o in r)Ao(r[o],n,o,t);return n},Ao=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:As(t,o);a.classGroupId=r;return}if(typeof o=="function"){if(eg(o)){Ao(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([a,i])=>{Ao(i,As(t,a),r,n)})})},As=(e,t)=>{let r=e;return t.split(aa).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},eg=e=>e.isThemeGetter,tg=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)}}},Io="!",Mo=":",rg=Mo.length,ng=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const a=[];let i=0,l=0,c=0,u;for(let b=0;b<o.length;b++){let v=o[b];if(i===0&&l===0){if(v===Mo){a.push(o.slice(c,b)),c=b+rg;continue}if(v==="/"){u=b;continue}}v==="["?i++:v==="]"?i--:v==="("?l++:v===")"&&l--}const f=a.length===0?o:o.substring(c),p=og(f),g=p!==f,m=u&&u>c?u-c:void 0;return{modifiers:a,hasImportantModifier:g,baseClassName:p,maybePostfixModifierPosition:m}};if(t){const o=t+Mo,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},og=e=>e.endsWith(Io)?e.substring(0,e.length-1):e.startsWith(Io)?e.substring(1):e,ag=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}},sg=e=>({cache:tg(e.cacheSize),parseClassName:ng(e),sortModifiers:ag(e),...Zm(e)}),ig=/\s+/,lg=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:a}=t,i=[],l=e.trim().split(ig);let c="";for(let u=l.length-1;u>=0;u-=1){const f=l[u],{isExternal:p,modifiers:g,hasImportantModifier:m,baseClassName:b,maybePostfixModifierPosition:v}=r(f);if(p){c=f+(c.length>0?" "+c:c);continue}let x=!!v,y=n(x?b.substring(0,v):b);if(!y){if(!x){c=f+(c.length>0?" "+c:c);continue}if(y=n(b),!y){c=f+(c.length>0?" "+c:c);continue}x=!1}const h=a(g).join(":"),C=m?h+Io:h,E=C+y;if(i.includes(E))continue;i.push(E);const j=o(y,x);for(let _=0;_<j.length;++_){const P=j[_];i.push(C+P)}c=f+(c.length>0?" "+c:c)}return c};function cg(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Ki(t))&&(n&&(n+=" "),n+=r);return n}const Ki=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Ki(e[n]))&&(r&&(r+=" "),r+=t);return r};function dg(e,...t){let r,n,o,a=i;function i(c){const u=t.reduce((f,p)=>p(f),e());return r=sg(u),n=r.cache.get,o=r.cache.set,a=l,l(c)}function l(c){const u=n(c);if(u)return u;const f=lg(c,r);return o(c,f),f}return function(){return a(cg.apply(null,arguments))}}const xe=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Yi=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Xi=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ug=/^\d+\/\d+$/,fg=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,pg=/\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$/,mg=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,gg=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vg=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Vt=e=>ug.test(e),se=e=>!!e&&!Number.isNaN(Number(e)),st=e=>!!e&&Number.isInteger(Number(e)),uo=e=>e.endsWith("%")&&se(e.slice(0,-1)),Je=e=>fg.test(e),hg=()=>!0,xg=e=>pg.test(e)&&!mg.test(e),Zi=()=>!1,bg=e=>gg.test(e),yg=e=>vg.test(e),wg=e=>!Y(e)&&!X(e),Cg=e=>er(e,el,Zi),Y=e=>Yi.test(e),Et=e=>er(e,tl,xg),fo=e=>er(e,Ng,se),Is=e=>er(e,Ji,Zi),Sg=e=>er(e,Qi,yg),Kr=e=>er(e,rl,bg),X=e=>Xi.test(e),fr=e=>tr(e,tl),Eg=e=>tr(e,jg),Ms=e=>tr(e,Ji),kg=e=>tr(e,el),Rg=e=>tr(e,Qi),Yr=e=>tr(e,rl,!0),er=(e,t,r)=>{const n=Yi.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},tr=(e,t,r=!1)=>{const n=Xi.exec(e);return n?n[1]?t(n[1]):r:!1},Ji=e=>e==="position"||e==="percentage",Qi=e=>e==="image"||e==="url",el=e=>e==="length"||e==="size"||e==="bg-size",tl=e=>e==="length",Ng=e=>e==="number",jg=e=>e==="family-name",rl=e=>e==="shadow",Pg=()=>{const e=xe("color"),t=xe("font"),r=xe("text"),n=xe("font-weight"),o=xe("tracking"),a=xe("leading"),i=xe("breakpoint"),l=xe("container"),c=xe("spacing"),u=xe("radius"),f=xe("shadow"),p=xe("inset-shadow"),g=xe("text-shadow"),m=xe("drop-shadow"),b=xe("blur"),v=xe("perspective"),x=xe("aspect"),y=xe("ease"),h=xe("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],j=()=>[...E(),X,Y],_=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],N=()=>[X,Y,c],W=()=>[Vt,"full","auto",...N()],U=()=>[st,"none","subgrid",X,Y],re=()=>["auto",{span:["full",st,X,Y]},st,X,Y],te=()=>[st,"auto",X,Y],Q=()=>["auto","min","max","fr",X,Y],V=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],O=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...N()],D=()=>[Vt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],k=()=>[e,X,Y],M=()=>[...E(),Ms,Is,{position:[X,Y]}],B=()=>["no-repeat",{repeat:["","x","y","space","round"]}],J=()=>["auto","cover","contain",kg,Cg,{size:[X,Y]}],T=()=>[uo,fr,Et],G=()=>["","none","full",u,X,Y],Z=()=>["",se,fr,Et],z=()=>["solid","dashed","dotted","double"],L=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>[se,uo,Ms,Is],K=()=>["","none",b,X,Y],ee=()=>["none",se,X,Y],oe=()=>["none",se,X,Y],ce=()=>[se,X,Y],ie=()=>[Vt,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Je],breakpoint:[Je],color:[hg],container:[Je],"drop-shadow":[Je],ease:["in","out","in-out"],font:[wg],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Je],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Je],shadow:[Je],spacing:["px",se],text:[Je],"text-shadow":[Je],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Vt,Y,X,x]}],container:["container"],columns:[{columns:[se,Y,X,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:j()}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:W()}],"inset-x":[{"inset-x":W()}],"inset-y":[{"inset-y":W()}],start:[{start:W()}],end:[{end:W()}],top:[{top:W()}],right:[{right:W()}],bottom:[{bottom:W()}],left:[{left:W()}],visibility:["visible","invisible","collapse"],z:[{z:[st,"auto",X,Y]}],basis:[{basis:[Vt,"full","auto",l,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[se,Vt,"auto","initial","none",Y]}],grow:[{grow:["",se,X,Y]}],shrink:[{shrink:["",se,X,Y]}],order:[{order:[st,"first","last","none",X,Y]}],"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":Q()}],"auto-rows":[{"auto-rows":Q()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...V(),"normal"]}],"justify-items":[{"justify-items":[...O(),"normal"]}],"justify-self":[{"justify-self":["auto",...O()]}],"align-content":[{content:["normal",...V()]}],"align-items":[{items:[...O(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...O(),{baseline:["","last"]}]}],"place-content":[{"place-content":V()}],"place-items":[{"place-items":[...O(),"baseline"]}],"place-self":[{"place-self":["auto",...O()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],w:[{w:[l,"screen",...D()]}],"min-w":[{"min-w":[l,"screen","none",...D()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...D()]}],h:[{h:["screen","lh",...D()]}],"min-h":[{"min-h":["screen","lh","none",...D()]}],"max-h":[{"max-h":["screen","lh",...D()]}],"font-size":[{text:["base",r,fr,Et]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,X,fo]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",uo,Y]}],"font-family":[{font:[Eg,Y,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,X,Y]}],"line-clamp":[{"line-clamp":[se,"none",X,fo]}],leading:[{leading:[a,...N()]}],"list-image":[{"list-image":["none",X,Y]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",X,Y]}],"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:[...z(),"wavy"]}],"text-decoration-thickness":[{decoration:[se,"from-font","auto",X,Et]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[se,"auto",X,Y]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",X,Y]}],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",X,Y]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:B()}],"bg-size":[{bg:J()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},st,X,Y],radial:["",X,Y],conic:[st,X,Y]},Rg,Sg]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:T()}],"gradient-via-pos":[{via:T()}],"gradient-to-pos":[{to:T()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:G()}],"rounded-s":[{"rounded-s":G()}],"rounded-e":[{"rounded-e":G()}],"rounded-t":[{"rounded-t":G()}],"rounded-r":[{"rounded-r":G()}],"rounded-b":[{"rounded-b":G()}],"rounded-l":[{"rounded-l":G()}],"rounded-ss":[{"rounded-ss":G()}],"rounded-se":[{"rounded-se":G()}],"rounded-ee":[{"rounded-ee":G()}],"rounded-es":[{"rounded-es":G()}],"rounded-tl":[{"rounded-tl":G()}],"rounded-tr":[{"rounded-tr":G()}],"rounded-br":[{"rounded-br":G()}],"rounded-bl":[{"rounded-bl":G()}],"border-w":[{border:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...z(),"hidden","none"]}],"divide-style":[{divide:[...z(),"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:[...z(),"none","hidden"]}],"outline-offset":[{"outline-offset":[se,X,Y]}],"outline-w":[{outline:["",se,fr,Et]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",f,Yr,Kr]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",p,Yr,Kr]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[se,Et]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",g,Yr,Kr]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[se,X,Y]}],"mix-blend":[{"mix-blend":[...L(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":L()}],"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":[se]}],"mask-image-linear-from-pos":[{"mask-linear-from":A()}],"mask-image-linear-to-pos":[{"mask-linear-to":A()}],"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":A()}],"mask-image-t-to-pos":[{"mask-t-to":A()}],"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":A()}],"mask-image-r-to-pos":[{"mask-r-to":A()}],"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":A()}],"mask-image-b-to-pos":[{"mask-b-to":A()}],"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":A()}],"mask-image-l-to-pos":[{"mask-l-to":A()}],"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":A()}],"mask-image-x-to-pos":[{"mask-x-to":A()}],"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":A()}],"mask-image-y-to-pos":[{"mask-y-to":A()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[X,Y]}],"mask-image-radial-from-pos":[{"mask-radial-from":A()}],"mask-image-radial-to-pos":[{"mask-radial-to":A()}],"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":E()}],"mask-image-conic-pos":[{"mask-conic":[se]}],"mask-image-conic-from-pos":[{"mask-conic-from":A()}],"mask-image-conic-to-pos":[{"mask-conic-to":A()}],"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:M()}],"mask-repeat":[{mask:B()}],"mask-size":[{mask:J()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",X,Y]}],filter:[{filter:["","none",X,Y]}],blur:[{blur:K()}],brightness:[{brightness:[se,X,Y]}],contrast:[{contrast:[se,X,Y]}],"drop-shadow":[{"drop-shadow":["","none",m,Yr,Kr]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",se,X,Y]}],"hue-rotate":[{"hue-rotate":[se,X,Y]}],invert:[{invert:["",se,X,Y]}],saturate:[{saturate:[se,X,Y]}],sepia:[{sepia:["",se,X,Y]}],"backdrop-filter":[{"backdrop-filter":["","none",X,Y]}],"backdrop-blur":[{"backdrop-blur":K()}],"backdrop-brightness":[{"backdrop-brightness":[se,X,Y]}],"backdrop-contrast":[{"backdrop-contrast":[se,X,Y]}],"backdrop-grayscale":[{"backdrop-grayscale":["",se,X,Y]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[se,X,Y]}],"backdrop-invert":[{"backdrop-invert":["",se,X,Y]}],"backdrop-opacity":[{"backdrop-opacity":[se,X,Y]}],"backdrop-saturate":[{"backdrop-saturate":[se,X,Y]}],"backdrop-sepia":[{"backdrop-sepia":["",se,X,Y]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",X,Y]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[se,"initial",X,Y]}],ease:[{ease:["linear","initial",y,X,Y]}],delay:[{delay:[se,X,Y]}],animate:[{animate:["none",h,X,Y]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,X,Y]}],"perspective-origin":[{"perspective-origin":j()}],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:[X,Y,"","none","gpu","cpu"]}],"transform-origin":[{origin:j()}],"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",X,Y]}],"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":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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",X,Y]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[se,fr,Et,fo]}],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"]}},Tg=dg(Pg);function R(...e){return Tg(Ui(e))}function nl(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()}/**
|
|
31
31
|
* @license lucide-react v0.525.0 - ISC
|
|
32
32
|
*
|
|
33
33
|
* This source code is licensed under the ISC license.
|
|
34
34
|
* See the LICENSE file in the root directory of this source tree.
|
|
35
|
-
*/const
|
|
35
|
+
*/const _g=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ag=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),Os=e=>{const t=Ag(e);return t.charAt(0).toUpperCase()+t.slice(1)},ol=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),Ig=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
36
36
|
* @license lucide-react v0.525.0 - ISC
|
|
37
37
|
*
|
|
38
38
|
* This source code is licensed under the ISC license.
|
|
39
39
|
* See the LICENSE file in the root directory of this source tree.
|
|
40
|
-
*/var
|
|
40
|
+
*/var Mg={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"};/**
|
|
41
41
|
* @license lucide-react v0.525.0 - ISC
|
|
42
42
|
*
|
|
43
43
|
* This source code is licensed under the ISC license.
|
|
44
44
|
* See the LICENSE file in the root directory of this source tree.
|
|
45
|
-
*/const
|
|
45
|
+
*/const Og=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:i,...l},c)=>S.createElement("svg",{ref:c,...Mg,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:ol("lucide",o),...!a&&!Ig(l)&&{"aria-hidden":"true"},...l},[...i.map(([u,f])=>S.createElement(u,f)),...Array.isArray(a)?a:[a]]));/**
|
|
46
46
|
* @license lucide-react v0.525.0 - ISC
|
|
47
47
|
*
|
|
48
48
|
* This source code is licensed under the ISC license.
|
|
49
49
|
* See the LICENSE file in the root directory of this source tree.
|
|
50
|
-
*/const ge=(e,t)=>{const r=S.forwardRef(({className:n,...o},a)=>S.createElement(
|
|
50
|
+
*/const ge=(e,t)=>{const r=S.forwardRef(({className:n,...o},a)=>S.createElement(Og,{ref:a,iconNode:t,className:ol(`lucide-${_g(Os(e))}`,`lucide-${e}`,n),...o}));return r.displayName=Os(e),r};/**
|
|
51
51
|
* @license lucide-react v0.525.0 - ISC
|
|
52
52
|
*
|
|
53
53
|
* This source code is licensed under the ISC license.
|
|
54
54
|
* See the LICENSE file in the root directory of this source tree.
|
|
55
|
-
*/const
|
|
55
|
+
*/const Dg=[["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"}]],$g=ge("arrow-up-down",Dg);/**
|
|
56
56
|
* @license lucide-react v0.525.0 - ISC
|
|
57
57
|
*
|
|
58
58
|
* This source code is licensed under the ISC license.
|
|
59
59
|
* See the LICENSE file in the root directory of this source tree.
|
|
60
|
-
*/const
|
|
60
|
+
*/const Lg=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],rr=ge("check",Lg);/**
|
|
61
61
|
* @license lucide-react v0.525.0 - ISC
|
|
62
62
|
*
|
|
63
63
|
* This source code is licensed under the ISC license.
|
|
64
64
|
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
-
*/const
|
|
65
|
+
*/const Fg=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],En=ge("chevron-down",Fg);/**
|
|
66
66
|
* @license lucide-react v0.525.0 - ISC
|
|
67
67
|
*
|
|
68
68
|
* This source code is licensed under the ISC license.
|
|
69
69
|
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
-
*/const
|
|
70
|
+
*/const Vg=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Bg=ge("chevron-left",Vg);/**
|
|
71
71
|
* @license lucide-react v0.525.0 - ISC
|
|
72
72
|
*
|
|
73
73
|
* This source code is licensed under the ISC license.
|
|
74
74
|
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
-
*/const
|
|
75
|
+
*/const Gg=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],al=ge("chevron-right",Gg);/**
|
|
76
76
|
* @license lucide-react v0.525.0 - ISC
|
|
77
77
|
*
|
|
78
78
|
* This source code is licensed under the ISC license.
|
|
79
79
|
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/const
|
|
80
|
+
*/const Wg=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],zg=ge("chevron-up",Wg);/**
|
|
81
81
|
* @license lucide-react v0.525.0 - ISC
|
|
82
82
|
*
|
|
83
83
|
* This source code is licensed under the ISC license.
|
|
84
84
|
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
-
*/const
|
|
85
|
+
*/const qg=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Ug=ge("chevrons-up-down",qg);/**
|
|
86
86
|
* @license lucide-react v0.525.0 - ISC
|
|
87
87
|
*
|
|
88
88
|
* This source code is licensed under the ISC license.
|
|
89
89
|
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
-
*/const
|
|
90
|
+
*/const Hg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Kg=ge("circle",Hg);/**
|
|
91
91
|
* @license lucide-react v0.525.0 - ISC
|
|
92
92
|
*
|
|
93
93
|
* This source code is licensed under the ISC license.
|
|
94
94
|
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
-
*/const
|
|
95
|
+
*/const Yg=[["path",{d:"m15 10 5 5-5 5",key:"qqa56n"}],["path",{d:"M4 4v7a4 4 0 0 0 4 4h12",key:"z08zvw"}]],Xg=ge("corner-down-right",Yg);/**
|
|
96
96
|
* @license lucide-react v0.525.0 - ISC
|
|
97
97
|
*
|
|
98
98
|
* This source code is licensed under the ISC license.
|
|
99
99
|
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
-
*/const
|
|
100
|
+
*/const Zg=[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]],Jg=ge("dot",Zg);/**
|
|
101
101
|
* @license lucide-react v0.525.0 - ISC
|
|
102
102
|
*
|
|
103
103
|
* This source code is licensed under the ISC license.
|
|
104
104
|
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
-
*/const
|
|
105
|
+
*/const Qg=[["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"}]],sl=ge("ellipsis",Qg);/**
|
|
106
106
|
* @license lucide-react v0.525.0 - ISC
|
|
107
107
|
*
|
|
108
108
|
* This source code is licensed under the ISC license.
|
|
109
109
|
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
-
*/const
|
|
110
|
+
*/const ev=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],tv=ge("info",ev);/**
|
|
111
111
|
* @license lucide-react v0.525.0 - ISC
|
|
112
112
|
*
|
|
113
113
|
* This source code is licensed under the ISC license.
|
|
114
114
|
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
-
*/const
|
|
115
|
+
*/const rv=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]],nv=ge("list-filter",rv);/**
|
|
116
116
|
* @license lucide-react v0.525.0 - ISC
|
|
117
117
|
*
|
|
118
118
|
* This source code is licensed under the ISC license.
|
|
119
119
|
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
-
*/const
|
|
120
|
+
*/const ov=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],il=ge("loader-circle",ov);/**
|
|
121
121
|
* @license lucide-react v0.525.0 - ISC
|
|
122
122
|
*
|
|
123
123
|
* This source code is licensed under the ISC license.
|
|
124
124
|
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
-
*/const
|
|
125
|
+
*/const av=[["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"}]],sv=ge("mail",av);/**
|
|
126
126
|
* @license lucide-react v0.525.0 - ISC
|
|
127
127
|
*
|
|
128
128
|
* This source code is licensed under the ISC license.
|
|
129
129
|
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
-
*/const
|
|
130
|
+
*/const iv=[["path",{d:"M5 12h14",key:"1ays0h"}]],lv=ge("minus",iv);/**
|
|
131
131
|
* @license lucide-react v0.525.0 - ISC
|
|
132
132
|
*
|
|
133
133
|
* This source code is licensed under the ISC license.
|
|
134
134
|
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
-
*/const
|
|
135
|
+
*/const cv=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ll=ge("search",cv);/**
|
|
136
136
|
* @license lucide-react v0.525.0 - ISC
|
|
137
137
|
*
|
|
138
138
|
* This source code is licensed under the ISC license.
|
|
139
139
|
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
-
*/const
|
|
140
|
+
*/const dv=[["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"}]],uv=ge("tag",dv);/**
|
|
141
141
|
* @license lucide-react v0.525.0 - ISC
|
|
142
142
|
*
|
|
143
143
|
* This source code is licensed under the ISC license.
|
|
144
144
|
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
-
*/const
|
|
145
|
+
*/const fv=[["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"}]],pv=ge("trash-2",fv);/**
|
|
146
146
|
* @license lucide-react v0.525.0 - ISC
|
|
147
147
|
*
|
|
148
148
|
* This source code is licensed under the ISC license.
|
|
149
149
|
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
-
*/const
|
|
150
|
+
*/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"}]],gv=ge("trash",mv);/**
|
|
151
151
|
* @license lucide-react v0.525.0 - ISC
|
|
152
152
|
*
|
|
153
153
|
* This source code is licensed under the ISC license.
|
|
154
154
|
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
-
*/const
|
|
155
|
+
*/const vv=[["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"}]],hv=ge("triangle-alert",vv);/**
|
|
156
156
|
* @license lucide-react v0.525.0 - ISC
|
|
157
157
|
*
|
|
158
158
|
* This source code is licensed under the ISC license.
|
|
159
159
|
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
-
*/const mv=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Rn=ge("x",mv),il=Qt("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",xs:"h-fit rounded-md text-xs px-2 py-1.5",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10","icon-sm":"h-7 w-7 p-1.5 rounded-md","icon-md":"h-8 w-8 p-1.5 rounded-md","icon-lg":"h-[45px] w-[45px] p-3 rounded-md"}},defaultVariants:{variant:"default",size:"default"}}),et=d.forwardRef(({className:e,variant:t,size:r,loading:n,children:o,disabled:a,...i},l)=>s.jsxs("button",{className:k(il({variant:t,size:r,className:e})),ref:l,disabled:a||n,...i,children:[o,n&&s.jsx(al,{className:"ml-2 w-4 h-4 animate-spin"})]}));et.displayName="Button";const gv=Qt("qodo qodo-input file:text-foreground placeholder:text-purple-muted-400 selection:bg-primary selection:text-primary-foreground border-input-neutral-idle flex h-9 w-full min-w-0 rounded-md border bg-purple-muted-900 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-none focus-visible:ring-none aria-invalid:border-red-600 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 disabled:cursor-not-allowed disabled:opacity-50 dark: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-purple-muted-900 dark:text-foreground dark:placeholder:text-[var(--color-purple-muted-400)] [:not(:placeholder-shown)]:bg-purple-muted-700",{variants:{variant:{default:"dark:focus-visible:bg-fill-input-neutral-idle dark:hover:bg-purple-muted-700 border-purple-muted-600 hover:bg-fill-input-neutral-hover focus:bg-purple-muted-700 focus:border-purple-muted-600 focus-visible:ring-none focus-visible:ring-none",secondary:"bg-secondary border-secondary text-secondary-foreground placeholder:text-color-purple-muted-400 dark:bg-secondary dark:border-secondary dark:text-secondary-foreground dark:placeholder:text-purple-muted-400",accent:"bg-accent border-accent text-accent-foreground placeholder:text-color-purple-muted-400 dark:bg-accent dark:border-accent dark:text-accent-foreground dark:placeholder:text-purple-muted-400",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"}}),Pr=d.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:k(gv({variant:t,className:e})),...o}));Pr.displayName="Input";function Os(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 vv(e,t){const r=d.createContext(t),n=a=>{const{children:i,...l}=a,c=d.useMemo(()=>l,Object.values(l));return s.jsx(r.Provider,{value:c,children:i})};n.displayName=e+"Provider";function o(a){const i=d.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=d.createContext(i),c=r.length;r=[...r,i];const u=p=>{var y;const{scope:g,children:m,...b}=p,v=((y=g==null?void 0:g[e])==null?void 0:y[c])||l,x=d.useMemo(()=>b,Object.values(b));return s.jsx(v.Provider,{value:x,children:m})};u.displayName=a+"Provider";function f(p,g){var v;const m=((v=g==null?void 0:g[e])==null?void 0:v[c])||l,b=d.useContext(m);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[u,f]}const o=()=>{const a=r.map(i=>d.createContext(i));return function(l){const c=(l==null?void 0:l[e])||a;return d.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return o.scopeName=e,[n,hv(o,...t)]}function hv(...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:c,scopeName:u})=>{const p=c(a)[`__scope${u}`];return{...l,...p}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function Ds(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function tt(...e){return t=>{let r=!1;const n=e.map(o=>{const a=Ds(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():Ds(e[o],null)}}}}function ae(...e){return d.useCallback(tt(...e),e)}function dt(e){const t=bv(e),r=d.forwardRef((n,o)=>{const{children:a,...i}=n,l=d.Children.toArray(a),c=l.find(wv);if(c){const u=c.props.children,f=l.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return s.jsx(t,{...i,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return s.jsx(t,{...i,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}var xv=dt("Slot");function bv(e){const t=d.forwardRef((r,n)=>{const{children:o,...a}=r;if(d.isValidElement(o)){const i=Sv(o),l=Cv(a,o.props);return o.type!==d.Fragment&&(l.ref=n?tt(n,i):i),d.cloneElement(o,l)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ll=Symbol("radix.slottable");function yv(e){const t=({children:r})=>s.jsx(s.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=ll,t}function wv(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ll}function Cv(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 c=a(...l);return o(...l),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function Sv(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 kn(e){const t=e+"CollectionProvider",[r,n]=ye(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=v=>{const{scope:x,children:y}=v,h=S.useRef(null),C=S.useRef(new Map).current;return s.jsx(o,{scope:x,itemMap:C,collectionRef:h,children:y})};i.displayName=t;const l=e+"CollectionSlot",c=dt(l),u=S.forwardRef((v,x)=>{const{scope:y,children:h}=v,C=a(l,y),E=ae(x,C.collectionRef);return s.jsx(c,{ref:E,children:h})});u.displayName=l;const f=e+"CollectionItemSlot",p="data-radix-collection-item",g=dt(f),m=S.forwardRef((v,x)=>{const{scope:y,children:h,...C}=v,E=S.useRef(null),j=ae(x,E),_=a(f,y);return S.useEffect(()=>(_.itemMap.set(E,{ref:E,...C}),()=>void _.itemMap.delete(E))),s.jsx(g,{[p]:"",ref:j,children:h})});m.displayName=f;function b(v){const x=a(e+"CollectionConsumer",v);return S.useCallback(()=>{const h=x.collectionRef.current;if(!h)return[];const C=Array.from(h.querySelectorAll(`[${p}]`));return Array.from(x.itemMap.values()).sort((_,P)=>C.indexOf(_.ref.current)-C.indexOf(P.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:u,ItemSlot:m},b,n]}var Ev=d.createContext(void 0);function At(e){const t=d.useContext(Ev);return e||t||"ltr"}var Rv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],q=Rv.reduce((e,t)=>{const r=dt(`Primitive.${t}`),n=d.forwardRef((o,a)=>{const{asChild:i,...l}=o,c=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(c,{...l,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function cl(e,t){e&&Sn.flushSync(()=>e.dispatchEvent(t))}function De(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function kv(e,t=globalThis==null?void 0:globalThis.document){const r=De(e);d.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 Nv="DismissableLayer",Oo="dismissableLayer.update",jv="dismissableLayer.pointerDownOutside",Pv="dismissableLayer.focusOutside",$s,dl=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),nr=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:l,...c}=e,u=d.useContext(dl),[f,p]=d.useState(null),g=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=d.useState({}),b=ae(t,P=>p(P)),v=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf(x),h=f?v.indexOf(f):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,E=h>=y,j=Av(P=>{const N=P.target,W=[...u.branches].some(U=>U.contains(N));!E||W||(o==null||o(P),i==null||i(P),P.defaultPrevented||l==null||l())},g),_=Iv(P=>{const N=P.target;[...u.branches].some(U=>U.contains(N))||(a==null||a(P),i==null||i(P),P.defaultPrevented||l==null||l())},g);return kv(P=>{h===u.layers.size-1&&(n==null||n(P),!P.defaultPrevented&&l&&(P.preventDefault(),l()))},g),d.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&($s=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Ls(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=$s)}},[f,g,r,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Ls())},[f,u]),d.useEffect(()=>{const P=()=>m({});return document.addEventListener(Oo,P),()=>document.removeEventListener(Oo,P)},[]),s.jsx(q.div,{...c,ref:b,style:{pointerEvents:C?E?"auto":"none":void 0,...e.style},onFocusCapture:F(e.onFocusCapture,_.onFocusCapture),onBlurCapture:F(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:F(e.onPointerDownCapture,j.onPointerDownCapture)})});nr.displayName=Nv;var Tv="DismissableLayerBranch",_v=d.forwardRef((e,t)=>{const r=d.useContext(dl),n=d.useRef(null),o=ae(t,n);return d.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),s.jsx(q.div,{...e,ref:o})});_v.displayName=Tv;function Av(e,t=globalThis==null?void 0:globalThis.document){const r=De(e),n=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=l=>{if(l.target&&!n.current){let c=function(){ul(jv,r,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}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 Iv(e,t=globalThis==null?void 0:globalThis.document){const r=De(e),n=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!n.current&&ul(Pv,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 Ls(){const e=new CustomEvent(Oo);document.dispatchEvent(e)}function ul(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?cl(o,a):o.dispatchEvent(a)}var po=0;function Nn(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Fs()),document.body.insertAdjacentElement("beforeend",e[1]??Fs()),po++,()=>{po===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),po--}},[])}function Fs(){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 mo="focusScope.autoFocusOnMount",go="focusScope.autoFocusOnUnmount",Vs={bubbles:!1,cancelable:!0},Mv="FocusScope",Tr=d.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[l,c]=d.useState(null),u=De(o),f=De(a),p=d.useRef(null),g=ae(t,v=>c(v)),m=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(n){let v=function(C){if(m.paused||!l)return;const E=C.target;l.contains(E)?p.current=E:it(p.current,{select:!0})},x=function(C){if(m.paused||!l)return;const E=C.relatedTarget;E!==null&&(l.contains(E)||it(p.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const j of C)j.removedNodes.length>0&&it(l)};document.addEventListener("focusin",v),document.addEventListener("focusout",x);const h=new MutationObserver(y);return l&&h.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",x),h.disconnect()}}},[n,l,m.paused]),d.useEffect(()=>{if(l){Gs.add(m);const v=document.activeElement;if(!l.contains(v)){const y=new CustomEvent(mo,Vs);l.addEventListener(mo,u),l.dispatchEvent(y),y.defaultPrevented||(Ov(Vv(fl(l)),{select:!0}),document.activeElement===v&&it(l))}return()=>{l.removeEventListener(mo,u),setTimeout(()=>{const y=new CustomEvent(go,Vs);l.addEventListener(go,f),l.dispatchEvent(y),y.defaultPrevented||it(v??document.body,{select:!0}),l.removeEventListener(go,f),Gs.remove(m)},0)}}},[l,u,f,m]);const b=d.useCallback(v=>{if(!r&&!n||m.paused)return;const x=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,y=document.activeElement;if(x&&y){const h=v.currentTarget,[C,E]=Dv(h);C&&E?!v.shiftKey&&y===E?(v.preventDefault(),r&&it(C,{select:!0})):v.shiftKey&&y===C&&(v.preventDefault(),r&&it(E,{select:!0})):y===h&&v.preventDefault()}},[r,n,m.paused]);return s.jsx(q.div,{tabIndex:-1,...i,ref:g,onKeyDown:b})});Tr.displayName=Mv;function Ov(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(it(n,{select:t}),document.activeElement!==r)return}function Dv(e){const t=fl(e),r=Bs(t,e),n=Bs(t.reverse(),e);return[r,n]}function fl(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 Bs(e,t){for(const r of e)if(!$v(r,{upTo:t}))return r}function $v(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 Lv(e){return e instanceof HTMLInputElement&&"select"in e}function it(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Lv(e)&&t&&e.select()}}var Gs=Fv();function Fv(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Ws(e,t),e.unshift(t)},remove(t){var r;e=Ws(e,t),(r=e[0])==null||r.resume()}}}function Ws(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Vv(e){return e.filter(t=>t.tagName!=="A")}var we=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},Bv=d[" useId ".trim().toString()]||(()=>{}),Gv=0;function me(e){const[t,r]=d.useState(Bv());return we(()=>{r(n=>n??String(Gv++))},[e]),t?`radix-${t}`:""}const Wv=["top","right","bottom","left"],ut=Math.min,Pe=Math.max,ln=Math.round,Xr=Math.floor,He=e=>({x:e,y:e}),zv={left:"right",right:"left",bottom:"top",top:"bottom"},qv={start:"end",end:"start"};function Do(e,t,r){return Pe(e,ut(t,r))}function rt(e,t){return typeof e=="function"?e(t):e}function nt(e){return e.split("-")[0]}function or(e){return e.split("-")[1]}function sa(e){return e==="x"?"y":"x"}function ia(e){return e==="y"?"height":"width"}const Uv=new Set(["top","bottom"]);function Ue(e){return Uv.has(nt(e))?"y":"x"}function la(e){return sa(Ue(e))}function Hv(e,t,r){r===void 0&&(r=!1);const n=or(e),o=la(e),a=ia(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=cn(i)),[i,cn(i)]}function Kv(e){const t=cn(e);return[$o(e),t,$o(t)]}function $o(e){return e.replace(/start|end/g,t=>qv[t])}const zs=["left","right"],qs=["right","left"],Yv=["top","bottom"],Xv=["bottom","top"];function Zv(e,t,r){switch(e){case"top":case"bottom":return r?t?qs:zs:t?zs:qs;case"left":case"right":return t?Yv:Xv;default:return[]}}function Jv(e,t,r,n){const o=or(e);let a=Zv(nt(e),r==="start",n);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map($o)))),a}function cn(e){return e.replace(/left|right|bottom|top/g,t=>zv[t])}function Qv(e){return{top:0,right:0,bottom:0,left:0,...e}}function pl(e){return typeof e!="number"?Qv(e):{top:e,right:e,bottom:e,left:e}}function dn(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 Us(e,t,r){let{reference:n,floating:o}=e;const a=Ue(t),i=la(t),l=ia(i),c=nt(t),u=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(c){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(or(t)){case"start":m[i]-=g*(r&&u?-1:1);break;case"end":m[i]+=g*(r&&u?-1:1);break}return m}const eh=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:i}=r,l=a.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=Us(u,n,c),g=n,m={},b=0;for(let v=0;v<l.length;v++){const{name:x,fn:y}=l[v],{x:h,y:C,data:E,reset:j}=await y({x:f,y:p,initialPlacement:n,placement:g,strategy:o,middlewareData:m,rects:u,platform:i,elements:{reference:e,floating:t}});f=h??f,p=C??p,m={...m,[x]:{...m[x],...E}},j&&b<=50&&(b++,typeof j=="object"&&(j.placement&&(g=j.placement),j.rects&&(u=j.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):j.rects),{x:f,y:p}=Us(u,g,c)),v=-1)}return{x:f,y:p,placement:g,strategy:o,middlewareData:m}};async function Sr(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:i,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:g=!1,padding:m=0}=rt(t,e),b=pl(m),x=l[g?p==="floating"?"reference":"floating":p],y=dn(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:u,rootBoundary:f,strategy:c})),h=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)),E=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},j=dn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:h,offsetParent:C,strategy:c}):h);return{top:(y.top-j.top+b.top)/E.y,bottom:(j.bottom-y.bottom+b.bottom)/E.y,left:(y.left-j.left+b.left)/E.x,right:(j.right-y.right+b.right)/E.x}}const th=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:i,elements:l,middlewareData:c}=t,{element:u,padding:f=0}=rt(e,t)||{};if(u==null)return{};const p=pl(f),g={x:r,y:n},m=la(o),b=ia(m),v=await i.getDimensions(u),x=m==="y",y=x?"top":"left",h=x?"bottom":"right",C=x?"clientHeight":"clientWidth",E=a.reference[b]+a.reference[m]-g[m]-a.floating[b],j=g[m]-a.reference[m],_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let P=_?_[C]:0;(!P||!await(i.isElement==null?void 0:i.isElement(_)))&&(P=l.floating[C]||a.floating[b]);const N=E/2-j/2,W=P/2-v[b]/2-1,U=ut(p[y],W),re=ut(p[h],W),te=U,Q=P-v[b]-re,V=P/2-v[b]/2+N,O=Do(te,V,Q),I=!c.arrow&&or(o)!=null&&V!==O&&a.reference[b]/2-(V<te?U:re)-v[b]/2<0,D=I?V<te?V-te:V-Q:0;return{[m]:g[m]+D,data:{[m]:O,centerOffset:V-O-D,...I&&{alignmentOffset:D}},reset:I}}}),rh=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:c,elements:u}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...x}=rt(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const y=nt(o),h=Ue(l),C=nt(l)===l,E=await(c.isRTL==null?void 0:c.isRTL(u.floating)),j=g||(C||!v?[cn(l)]:Kv(l)),_=b!=="none";!g&&_&&j.push(...Jv(l,v,b,E));const P=[l,...j],N=await Sr(t,x),W=[];let U=((n=a.flip)==null?void 0:n.overflows)||[];if(f&&W.push(N[y]),p){const V=Hv(o,i,E);W.push(N[V[0]],N[V[1]])}if(U=[...U,{placement:o,overflows:W}],!W.every(V=>V<=0)){var re,te;const V=(((re=a.flip)==null?void 0:re.index)||0)+1,O=P[V];if(O&&(!(p==="alignment"?h!==Ue(O):!1)||U.every(R=>Ue(R.placement)===h?R.overflows[0]>0:!0)))return{data:{index:V,overflows:U},reset:{placement:O}};let I=(te=U.filter(D=>D.overflows[0]<=0).sort((D,R)=>D.overflows[1]-R.overflows[1])[0])==null?void 0:te.placement;if(!I)switch(m){case"bestFit":{var Q;const D=(Q=U.filter(R=>{if(_){const M=Ue(R.placement);return M===h||M==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(M=>M>0).reduce((M,B)=>M+B,0)]).sort((R,M)=>R[1]-M[1])[0])==null?void 0:Q[0];D&&(I=D);break}case"initialPlacement":I=l;break}if(o!==I)return{reset:{placement:I}}}return{}}}};function Hs(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ks(e){return Wv.some(t=>e[t]>=0)}const nh=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=rt(e,t);switch(n){case"referenceHidden":{const a=await Sr(t,{...o,elementContext:"reference"}),i=Hs(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Ks(i)}}}case"escaped":{const a=await Sr(t,{...o,altBoundary:!0}),i=Hs(a,r.floating);return{data:{escapedOffsets:i,escaped:Ks(i)}}}default:return{}}}}},ml=new Set(["left","top"]);async function oh(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=nt(r),l=or(r),c=Ue(r)==="y",u=ml.has(i)?-1:1,f=a&&c?-1:1,p=rt(t,e);let{mainAxis:g,crossAxis:m,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof b=="number"&&(m=l==="end"?b*-1:b),c?{x:m*f,y:g*u}:{x:g*u,y:m*f}}const ah=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,c=await oh(t,e);return i===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:i}}}}},sh=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:h}=x;return{x:y,y:h}}},...c}=rt(e,t),u={x:r,y:n},f=await Sr(t,c),p=Ue(nt(o)),g=sa(p);let m=u[g],b=u[p];if(a){const x=g==="y"?"top":"left",y=g==="y"?"bottom":"right",h=m+f[x],C=m-f[y];m=Do(h,m,C)}if(i){const x=p==="y"?"top":"left",y=p==="y"?"bottom":"right",h=b+f[x],C=b-f[y];b=Do(h,b,C)}const v=l.fn({...t,[g]:m,[p]:b});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[g]:a,[p]:i}}}}}},ih=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:c=!0,crossAxis:u=!0}=rt(e,t),f={x:r,y:n},p=Ue(o),g=sa(p);let m=f[g],b=f[p];const v=rt(l,t),x=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const C=g==="y"?"height":"width",E=a.reference[g]-a.floating[C]+x.mainAxis,j=a.reference[g]+a.reference[C]-x.mainAxis;m<E?m=E:m>j&&(m=j)}if(u){var y,h;const C=g==="y"?"width":"height",E=ml.has(nt(o)),j=a.reference[p]-a.floating[C]+(E&&((y=i.offset)==null?void 0:y[p])||0)+(E?0:x.crossAxis),_=a.reference[p]+a.reference[C]+(E?0:((h=i.offset)==null?void 0:h[p])||0)-(E?x.crossAxis:0);b<j?b=j:b>_&&(b=_)}return{[g]:m,[p]:b}}}},lh=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:c=()=>{},...u}=rt(e,t),f=await Sr(t,u),p=nt(o),g=or(o),m=Ue(o)==="y",{width:b,height:v}=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 h=v-f.top-f.bottom,C=b-f.left-f.right,E=ut(v-f[x],h),j=ut(b-f[y],C),_=!t.middlewareData.shift;let P=E,N=j;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=C),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(P=h),_&&!g){const U=Pe(f.left,0),re=Pe(f.right,0),te=Pe(f.top,0),Q=Pe(f.bottom,0);m?N=b-2*(U!==0||re!==0?U+re:Pe(f.left,f.right)):P=v-2*(te!==0||Q!==0?te+Q:Pe(f.top,f.bottom))}await c({...t,availableWidth:N,availableHeight:P});const W=await i.getDimensions(l.floating);return b!==W.width||v!==W.height?{reset:{rects:!0}}:{}}}};function jn(){return typeof window<"u"}function ar(e){return gl(e)?(e.nodeName||"").toLowerCase():"#document"}function Te(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ye(e){var t;return(t=(gl(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gl(e){return jn()?e instanceof Node||e instanceof Te(e).Node:!1}function $e(e){return jn()?e instanceof Element||e instanceof Te(e).Element:!1}function Ke(e){return jn()?e instanceof HTMLElement||e instanceof Te(e).HTMLElement:!1}function Ys(e){return!jn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Te(e).ShadowRoot}const ch=new Set(["inline","contents"]);function _r(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Le(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!ch.has(o)}const dh=new Set(["table","td","th"]);function uh(e){return dh.has(ar(e))}const fh=[":popover-open",":modal"];function Pn(e){return fh.some(t=>{try{return e.matches(t)}catch{return!1}})}const ph=["transform","translate","scale","rotate","perspective"],mh=["transform","translate","scale","rotate","perspective","filter"],gh=["paint","layout","strict","content"];function ca(e){const t=da(),r=$e(e)?Le(e):e;return ph.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)||mh.some(n=>(r.willChange||"").includes(n))||gh.some(n=>(r.contain||"").includes(n))}function vh(e){let t=ft(e);for(;Ke(t)&&!Yt(t);){if(ca(t))return t;if(Pn(t))return null;t=ft(t)}return null}function da(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const hh=new Set(["html","body","#document"]);function Yt(e){return hh.has(ar(e))}function Le(e){return Te(e).getComputedStyle(e)}function Tn(e){return $e(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ft(e){if(ar(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ys(e)&&e.host||Ye(e);return Ys(t)?t.host:t}function vl(e){const t=ft(e);return Yt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ke(t)&&_r(t)?t:vl(t)}function Er(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=vl(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),i=Te(o);if(a){const l=Lo(i);return t.concat(i,i.visualViewport||[],_r(o)?o:[],l&&r?Er(l):[])}return t.concat(o,Er(o,[],r))}function Lo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function hl(e){const t=Le(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Ke(e),a=o?e.offsetWidth:r,i=o?e.offsetHeight:n,l=ln(r)!==a||ln(n)!==i;return l&&(r=a,n=i),{width:r,height:n,$:l}}function ua(e){return $e(e)?e:e.contextElement}function Ht(e){const t=ua(e);if(!Ke(t))return He(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=hl(t);let i=(a?ln(r.width):r.width)/n,l=(a?ln(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const xh=He(0);function xl(e){const t=Te(e);return!da()||!t.visualViewport?xh:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function bh(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Te(e)?!1:t}function kt(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=ua(e);let i=He(1);t&&(n?$e(n)&&(i=Ht(n)):i=Ht(e));const l=bh(a,r,n)?xl(a):He(0);let c=(o.left+l.x)/i.x,u=(o.top+l.y)/i.y,f=o.width/i.x,p=o.height/i.y;if(a){const g=Te(a),m=n&&$e(n)?Te(n):n;let b=g,v=Lo(b);for(;v&&n&&m!==b;){const x=Ht(v),y=v.getBoundingClientRect(),h=Le(v),C=y.left+(v.clientLeft+parseFloat(h.paddingLeft))*x.x,E=y.top+(v.clientTop+parseFloat(h.paddingTop))*x.y;c*=x.x,u*=x.y,f*=x.x,p*=x.y,c+=C,u+=E,b=Te(v),v=Lo(b)}}return dn({width:f,height:p,x:c,y:u})}function _n(e,t){const r=Tn(e).scrollLeft;return t?t.left+r:kt(Ye(e)).left+r}function bl(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-_n(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function yh(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a=o==="fixed",i=Ye(n),l=t?Pn(t.floating):!1;if(n===i||l&&a)return r;let c={scrollLeft:0,scrollTop:0},u=He(1);const f=He(0),p=Ke(n);if((p||!p&&!a)&&((ar(n)!=="body"||_r(i))&&(c=Tn(n)),Ke(n))){const m=kt(n);u=Ht(n),f.x=m.x+n.clientLeft,f.y=m.y+n.clientTop}const g=i&&!p&&!a?bl(i,c):He(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+f.x+g.x,y:r.y*u.y-c.scrollTop*u.y+f.y+g.y}}function wh(e){return Array.from(e.getClientRects())}function Ch(e){const t=Ye(e),r=Tn(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+_n(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 Xs=25;function Sh(e,t){const r=Te(e),n=Ye(e),o=r.visualViewport;let a=n.clientWidth,i=n.clientHeight,l=0,c=0;if(o){a=o.width,i=o.height;const f=da();(!f||f&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}const u=_n(n);if(u<=0){const f=n.ownerDocument,p=f.body,g=getComputedStyle(p),m=f.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,b=Math.abs(n.clientWidth-p.clientWidth-m);b<=Xs&&(a-=b)}else u<=Xs&&(a+=u);return{width:a,height:i,x:l,y:c}}const Eh=new Set(["absolute","fixed"]);function Rh(e,t){const r=kt(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=Ke(e)?Ht(e):He(1),i=e.clientWidth*a.x,l=e.clientHeight*a.y,c=o*a.x,u=n*a.y;return{width:i,height:l,x:c,y:u}}function Zs(e,t,r){let n;if(t==="viewport")n=Sh(e,r);else if(t==="document")n=Ch(Ye(e));else if($e(t))n=Rh(t,r);else{const o=xl(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return dn(n)}function yl(e,t){const r=ft(e);return r===t||!$e(r)||Yt(r)?!1:Le(r).position==="fixed"||yl(r,t)}function kh(e,t){const r=t.get(e);if(r)return r;let n=Er(e,[],!1).filter(l=>$e(l)&&ar(l)!=="body"),o=null;const a=Le(e).position==="fixed";let i=a?ft(e):e;for(;$e(i)&&!Yt(i);){const l=Le(i),c=ca(i);!c&&l.position==="fixed"&&(o=null),(a?!c&&!o:!c&&l.position==="static"&&!!o&&Eh.has(o.position)||_r(i)&&!c&&yl(e,i))?n=n.filter(f=>f!==i):o=l,i=ft(i)}return t.set(e,n),n}function Nh(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?Pn(t)?[]:kh(t,this._c):[].concat(r),n],l=i[0],c=i.reduce((u,f)=>{const p=Zs(t,f,o);return u.top=Pe(p.top,u.top),u.right=ut(p.right,u.right),u.bottom=ut(p.bottom,u.bottom),u.left=Pe(p.left,u.left),u},Zs(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function jh(e){const{width:t,height:r}=hl(e);return{width:t,height:r}}function Ph(e,t,r){const n=Ke(t),o=Ye(t),a=r==="fixed",i=kt(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const c=He(0);function u(){c.x=_n(o)}if(n||!n&&!a)if((ar(t)!=="body"||_r(o))&&(l=Tn(t)),n){const m=kt(t,!0,a,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else o&&u();a&&!n&&o&&u();const f=o&&!n&&!a?bl(o,l):He(0),p=i.left+l.scrollLeft-c.x-f.x,g=i.top+l.scrollTop-c.y-f.y;return{x:p,y:g,width:i.width,height:i.height}}function vo(e){return Le(e).position==="static"}function Js(e,t){if(!Ke(e)||Le(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ye(e)===r&&(r=r.ownerDocument.body),r}function wl(e,t){const r=Te(e);if(Pn(e))return r;if(!Ke(e)){let o=ft(e);for(;o&&!Yt(o);){if($e(o)&&!vo(o))return o;o=ft(o)}return r}let n=Js(e,t);for(;n&&uh(n)&&vo(n);)n=Js(n,t);return n&&Yt(n)&&vo(n)&&!ca(n)?r:n||vh(e)||r}const Th=async function(e){const t=this.getOffsetParent||wl,r=this.getDimensions,n=await r(e.floating);return{reference:Ph(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function _h(e){return Le(e).direction==="rtl"}const Ah={convertOffsetParentRelativeRectToViewportRelativeRect:yh,getDocumentElement:Ye,getClippingRect:Nh,getOffsetParent:wl,getElementRects:Th,getClientRects:wh,getDimensions:jh,getScale:Ht,isElement:$e,isRTL:_h};function Cl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ih(e,t){let r=null,n;const o=Ye(e);function a(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),a();const u=e.getBoundingClientRect(),{left:f,top:p,width:g,height:m}=u;if(l||t(),!g||!m)return;const b=Xr(p),v=Xr(o.clientWidth-(f+g)),x=Xr(o.clientHeight-(p+m)),y=Xr(f),C={rootMargin:-b+"px "+-v+"px "+-x+"px "+-y+"px",threshold:Pe(0,ut(1,c))||1};let E=!0;function j(_){const P=_[0].intersectionRatio;if(P!==c){if(!E)return i();P?i(!1,P):n=setTimeout(()=>{i(!1,1e-7)},1e3)}P===1&&!Cl(u,e.getBoundingClientRect())&&i(),E=!1}try{r=new IntersectionObserver(j,{...C,root:o.ownerDocument})}catch{r=new IntersectionObserver(j,C)}r.observe(e)}return i(!0),a}function Mh(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:c=!1}=n,u=ua(e),f=o||a?[...u?Er(u):[],...Er(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",r,{passive:!0}),a&&y.addEventListener("resize",r)});const p=u&&l?Ih(u,r):null;let g=-1,m=null;i&&(m=new ResizeObserver(y=>{let[h]=y;h&&h.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var C;(C=m)==null||C.observe(t)})),r()}),u&&!c&&m.observe(u),m.observe(t));let b,v=c?kt(e):null;c&&x();function x(){const y=kt(e);v&&!Cl(v,y)&&r(),v=y,b=requestAnimationFrame(x)}return r(),()=>{var y;f.forEach(h=>{o&&h.removeEventListener("scroll",r),a&&h.removeEventListener("resize",r)}),p==null||p(),(y=m)==null||y.disconnect(),m=null,c&&cancelAnimationFrame(b)}}const Oh=ah,Dh=sh,$h=rh,Lh=lh,Fh=nh,Qs=th,Vh=ih,Bh=(e,t,r)=>{const n=new Map,o={platform:Ah,...r},a={...o.platform,_c:n};return eh(e,t,{...o,platform:a})};var Gh=typeof document<"u",Wh=function(){},nn=Gh?S.useLayoutEffect:Wh;function un(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(!un(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)&&!un(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Sl(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ei(e,t){const r=Sl(e);return Math.round(t*r)/r}function ho(e){const t=d.useRef(e);return nn(()=>{t.current=e}),t}function zh(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:c,open:u}=e,[f,p]=d.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[g,m]=d.useState(n);un(g,n)||m(n);const[b,v]=d.useState(null),[x,y]=d.useState(null),h=d.useCallback(R=>{R!==_.current&&(_.current=R,v(R))},[]),C=d.useCallback(R=>{R!==P.current&&(P.current=R,y(R))},[]),E=a||b,j=i||x,_=d.useRef(null),P=d.useRef(null),N=d.useRef(f),W=c!=null,U=ho(c),re=ho(o),te=ho(u),Q=d.useCallback(()=>{if(!_.current||!P.current)return;const R={placement:t,strategy:r,middleware:g};re.current&&(R.platform=re.current),Bh(_.current,P.current,R).then(M=>{const B={...M,isPositioned:te.current!==!1};V.current&&!un(N.current,B)&&(N.current=B,Sn.flushSync(()=>{p(B)}))})},[g,t,r,re,te]);nn(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,p(R=>({...R,isPositioned:!1})))},[u]);const V=d.useRef(!1);nn(()=>(V.current=!0,()=>{V.current=!1}),[]),nn(()=>{if(E&&(_.current=E),j&&(P.current=j),E&&j){if(U.current)return U.current(E,j,Q);Q()}},[E,j,Q,U,W]);const O=d.useMemo(()=>({reference:_,floating:P,setReference:h,setFloating:C}),[h,C]),I=d.useMemo(()=>({reference:E,floating:j}),[E,j]),D=d.useMemo(()=>{const R={position:r,left:0,top:0};if(!I.floating)return R;const M=ei(I.floating,f.x),B=ei(I.floating,f.y);return l?{...R,transform:"translate("+M+"px, "+B+"px)",...Sl(I.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:M,top:B}},[r,l,I.floating,f.x,f.y]);return d.useMemo(()=>({...f,update:Q,refs:O,elements:I,floatingStyles:D}),[f,Q,O,I,D])}const qh=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?Qs({element:n.current,padding:o}).fn(r):{}:n?Qs({element:n,padding:o}).fn(r):{}}}},Uh=(e,t)=>({...Oh(e),options:[e,t]}),Hh=(e,t)=>({...Dh(e),options:[e,t]}),Kh=(e,t)=>({...Vh(e),options:[e,t]}),Yh=(e,t)=>({...$h(e),options:[e,t]}),Xh=(e,t)=>({...Lh(e),options:[e,t]}),Zh=(e,t)=>({...Fh(e),options:[e,t]}),Jh=(e,t)=>({...qh(e),options:[e,t]});var Qh="Arrow",El=d.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return s.jsx(q.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"})})});El.displayName=Qh;var ex=El;function An(e){const[t,r]=d.useState(void 0);return we(()=>{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 c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,l=u.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 fa="Popper",[Rl,mt]=ye(fa),[tx,kl]=Rl(fa),Nl=e=>{const{__scopePopper:t,children:r}=e,[n,o]=d.useState(null);return s.jsx(tx,{scope:t,anchor:n,onAnchorChange:o,children:r})};Nl.displayName=fa;var jl="PopperAnchor",Pl=d.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=kl(jl,r),i=d.useRef(null),l=ae(t,i),c=d.useRef(null);return d.useEffect(()=>{const u=c.current;c.current=(n==null?void 0:n.current)||i.current,u!==c.current&&a.onAnchorChange(c.current)}),n?null:s.jsx(q.div,{...o,ref:l})});Pl.displayName=jl;var pa="PopperContent",[rx,nx]=Rl(pa),Tl=d.forwardRef((e,t)=>{var A,K,ee,oe,ce,ie;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:m="optimized",onPlaced:b,...v}=e,x=kl(pa,r),[y,h]=d.useState(null),C=ae(t,Ee=>h(Ee)),[E,j]=d.useState(null),_=An(E),P=(_==null?void 0:_.width)??0,N=(_==null?void 0:_.height)??0,W=n+(a!=="center"?"-"+a:""),U=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},re=Array.isArray(u)?u:[u],te=re.length>0,Q={padding:U,boundary:re.filter(ax),altBoundary:te},{refs:V,floatingStyles:O,placement:I,isPositioned:D,middlewareData:R}=zh({strategy:"fixed",placement:W,whileElementsMounted:(...Ee)=>Mh(...Ee,{animationFrame:m==="always"}),elements:{reference:x.anchor},middleware:[Uh({mainAxis:o+N,alignmentAxis:i}),c&&Hh({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Kh():void 0,...Q}),c&&Yh({...Q}),Xh({...Q,apply:({elements:Ee,rects:_e,availableWidth:Ge,availableHeight:Me})=>{const{width:at,height:Ur}=_e.reference,Ze=Ee.floating.style;Ze.setProperty("--radix-popper-available-width",`${Ge}px`),Ze.setProperty("--radix-popper-available-height",`${Me}px`),Ze.setProperty("--radix-popper-anchor-width",`${at}px`),Ze.setProperty("--radix-popper-anchor-height",`${Ur}px`)}}),E&&Jh({element:E,padding:l}),sx({arrowWidth:P,arrowHeight:N}),g&&Zh({strategy:"referenceHidden",...Q})]}),[M,B]=Il(I),J=De(b);we(()=>{D&&(J==null||J())},[D,J]);const T=(A=R.arrow)==null?void 0:A.x,G=(K=R.arrow)==null?void 0:K.y,Z=((ee=R.arrow)==null?void 0:ee.centerOffset)!==0,[z,L]=d.useState();return we(()=>{y&&L(window.getComputedStyle(y).zIndex)},[y]),s.jsx("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:{...O,transform:D?O.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:z,"--radix-popper-transform-origin":[(oe=R.transformOrigin)==null?void 0:oe.x,(ce=R.transformOrigin)==null?void 0:ce.y].join(" "),...((ie=R.hide)==null?void 0:ie.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(rx,{scope:r,placedSide:M,onArrowChange:j,arrowX:T,arrowY:G,shouldHideArrow:Z,children:s.jsx(q.div,{"data-side":M,"data-align":B,...v,ref:C,style:{...v.style,animation:D?void 0:"none"}})})})});Tl.displayName=pa;var _l="PopperArrow",ox={top:"bottom",right:"left",bottom:"top",left:"right"},Al=d.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=nx(_l,n),i=ox[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(ex,{...o,ref:r,style:{...o.style,display:"block"}})})});Al.displayName=_l;function ax(e){return e!==null}var sx=e=>({name:"transformOrigin",options:e,fn(t){var x,y,h;const{placement:r,rects:n,middlewareData:o}=t,i=((x=o.arrow)==null?void 0:x.centerOffset)!==0,l=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,f]=Il(r),p={start:"0%",center:"50%",end:"100%"}[f],g=(((y=o.arrow)==null?void 0:y.x)??0)+l/2,m=(((h=o.arrow)==null?void 0:h.y)??0)+c/2;let b="",v="";return u==="bottom"?(b=i?p:`${g}px`,v=`${-c}px`):u==="top"?(b=i?p:`${g}px`,v=`${n.floating.height+c}px`):u==="right"?(b=`${-c}px`,v=i?p:`${m}px`):u==="left"&&(b=`${n.floating.width+c}px`,v=i?p:`${m}px`),{data:{x:b,y:v}}}});function Il(e){const[t,r="center"]=e.split("-");return[t,r]}var Ar=Nl,Ir=Pl,In=Tl,Mn=Al,ix="Portal",sr=d.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[o,a]=d.useState(!1);we(()=>a(!0),[]);const i=r||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return i?jr.createPortal(s.jsx(q.div,{...n,ref:t}),i):null});sr.displayName=ix;var lx=d[" useInsertionEffect ".trim().toString()]||we;function be({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,a,i]=cx({defaultProp:t,onChange:r}),l=e!==void 0,c=l?e:o;{const f=d.useRef(e!==void 0);d.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 u=d.useCallback(f=>{var p;if(l){const g=dx(f)?f(e):f;g!==e&&((p=i.current)==null||p.call(i,g))}else a(f)},[l,e,a,i]);return[c,u]}function cx({defaultProp:e,onChange:t}){const[r,n]=d.useState(e),o=d.useRef(r),a=d.useRef(t);return lx(()=>{a.current=t},[t]),d.useEffect(()=>{var i;o.current!==r&&((i=a.current)==null||i.call(a,r),o.current=r)},[r,o]),[r,n,a]}function dx(e){return typeof e=="function"}function On(e){const t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Ml=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"}),ux="VisuallyHidden",Ol=d.forwardRef((e,t)=>s.jsx(q.span,{...e,ref:t,style:{...Ml,...e.style}}));Ol.displayName=ux;var fx=Ol,px=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Vt=new WeakMap,Zr=new WeakMap,Jr={},xo=0,Dl=function(e){return e&&(e.host||Dl(e.parentNode))},mx=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Dl(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})},gx=function(e,t,r,n){var o=mx(t,Array.isArray(e)?e:[e]);Jr[r]||(Jr[r]=new WeakMap);var a=Jr[r],i=[],l=new Set,c=new Set(o),u=function(p){!p||l.has(p)||(l.add(p),u(p.parentNode))};o.forEach(u);var f=function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(g){if(l.has(g))f(g);else try{var m=g.getAttribute(n),b=m!==null&&m!=="false",v=(Vt.get(g)||0)+1,x=(a.get(g)||0)+1;Vt.set(g,v),a.set(g,x),i.push(g),v===1&&b&&Zr.set(g,!0),x===1&&g.setAttribute(r,"true"),b||g.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",g,y)}})};return f(t),l.clear(),xo++,function(){i.forEach(function(p){var g=Vt.get(p)-1,m=a.get(p)-1;Vt.set(p,g),a.set(p,m),g||(Zr.has(p)||p.removeAttribute(n),Zr.delete(p)),m||p.removeAttribute(r)}),xo--,xo||(Vt=new WeakMap,Vt=new WeakMap,Zr=new WeakMap,Jr={})}},Dn=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=px(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),gx(n,o,r,"aria-hidden")):function(){return null}},qe=function(){return qe=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},qe.apply(this,arguments)};function $l(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 vx(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 on="right-scroll-bar-position",an="width-before-scroll-bar",hx="with-scroll-bars-hidden",xx="--removed-body-scroll-bar-size";function bo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function bx(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 yx=typeof window<"u"?d.useLayoutEffect:d.useEffect,ti=new WeakMap;function wx(e,t){var r=bx(null,function(n){return e.forEach(function(o){return bo(o,n)})});return yx(function(){var n=ti.get(r);if(n){var o=new Set(n),a=new Set(e),i=r.current;o.forEach(function(l){a.has(l)||bo(l,null)}),a.forEach(function(l){o.has(l)||bo(l,i)})}ti.set(r,e)},[e]),r}function Cx(e){return e}function Sx(e,t){t===void 0&&(t=Cx);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 c=function(){var f=i;i=[],f.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(f){i.push(f),u()},filter:function(f){return i=i.filter(f),r}}}};return o}function Ex(e){e===void 0&&(e={});var t=Sx(null);return t.options=qe({async:!0,ssr:!1},e),t}var Ll=function(e){var t=e.sideCar,r=$l(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 d.createElement(n,qe({},r))};Ll.isSideCarExport=!0;function Rx(e,t){return e.useMedium(t),Ll}var Fl=Ex(),yo=function(){},$n=d.forwardRef(function(e,t){var r=d.useRef(null),n=d.useState({onScrollCapture:yo,onWheelCapture:yo,onTouchMoveCapture:yo}),o=n[0],a=n[1],i=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,p=e.shards,g=e.sideCar,m=e.noRelative,b=e.noIsolation,v=e.inert,x=e.allowPinchZoom,y=e.as,h=y===void 0?"div":y,C=e.gapMode,E=$l(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=g,_=wx([r,t]),P=qe(qe({},E),o);return d.createElement(d.Fragment,null,f&&d.createElement(j,{sideCar:Fl,removeScrollBar:u,shards:p,noRelative:m,noIsolation:b,inert:v,setCallbacks:a,allowPinchZoom:!!x,lockRef:r,gapMode:C}),i?d.cloneElement(d.Children.only(l),qe(qe({},P),{ref:_})):d.createElement(h,qe({},P,{className:c,ref:_}),l))});$n.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};$n.classNames={fullWidth:an,zeroRight:on};var kx=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Nx(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=kx();return t&&e.setAttribute("nonce",t),e}function jx(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Px(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Tx=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Nx())&&(jx(t,r),Px(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},_x=function(){var e=Tx();return function(t,r){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Vl=function(){var e=_x(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Ax={left:0,top:0,right:0,gap:0},wo=function(e){return parseInt(e||"",10)||0},Ix=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[wo(r),wo(n),wo(o)]},Mx=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ax;var t=Ix(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])}},Ox=Vl(),Kt="data-scroll-locked",Dx=function(e,t,r,n){var o=e.left,a=e.top,i=e.right,l=e.gap;return r===void 0&&(r="margin"),`
|
|
161
|
-
.`.concat(
|
|
160
|
+
*/const xv=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],kn=ge("x",xv),cl=At("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",xs:"h-fit rounded-md text-xs px-2 py-1.5",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10","icon-sm":"h-7 w-7 p-1.5 rounded-md","icon-md":"h-8 w-8 p-1.5 rounded-md","icon-lg":"h-[45px] w-[45px] p-3 rounded-md"}},defaultVariants:{variant:"default",size:"default"}}),et=d.forwardRef(({className:e,variant:t,size:r,loading:n,children:o,disabled:a,...i},l)=>s.jsxs("button",{className:R(cl({variant:t,size:r,className:e})),ref:l,disabled:a||n,...i,children:[o,n&&s.jsx(il,{className:"ml-2 w-4 h-4 animate-spin"})]}));et.displayName="Button";const bv=At("qodo qodo-input file:text-foreground placeholder:text-purple-muted-400 selection:bg-primary selection:text-primary-foreground border-input-neutral-idle flex h-9 w-full min-w-0 rounded-md border bg-purple-muted-900 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-none focus-visible:ring-none aria-invalid:border-red-600 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 disabled:cursor-not-allowed disabled:opacity-50 dark: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-purple-muted-900 dark:text-foreground dark:placeholder:text-[var(--color-purple-muted-400)] [:not(:placeholder-shown)]:bg-purple-muted-700",{variants:{variant:{default:"dark:focus-visible:bg-fill-input-neutral-idle dark:hover:bg-purple-muted-700 border-purple-muted-600 hover:bg-fill-input-neutral-hover focus:bg-purple-muted-700 focus:border-purple-muted-600 focus-visible:ring-none focus-visible:ring-none",secondary:"bg-secondary border-secondary text-secondary-foreground placeholder:text-color-purple-muted-400 dark:bg-secondary dark:border-secondary dark:text-secondary-foreground dark:placeholder:text-purple-muted-400",accent:"bg-accent border-accent text-accent-foreground placeholder:text-color-purple-muted-400 dark:bg-accent dark:border-accent dark:text-accent-foreground dark:placeholder:text-purple-muted-400",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"}}),Pr=d.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:R(bv({variant:t,className:e})),...o}));Pr.displayName="Input";function Ds(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 yv(e,t){const r=d.createContext(t),n=a=>{const{children:i,...l}=a,c=d.useMemo(()=>l,Object.values(l));return s.jsx(r.Provider,{value:c,children:i})};n.displayName=e+"Provider";function o(a){const i=d.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=d.createContext(i),c=r.length;r=[...r,i];const u=p=>{var y;const{scope:g,children:m,...b}=p,v=((y=g==null?void 0:g[e])==null?void 0:y[c])||l,x=d.useMemo(()=>b,Object.values(b));return s.jsx(v.Provider,{value:x,children:m})};u.displayName=a+"Provider";function f(p,g){var v;const m=((v=g==null?void 0:g[e])==null?void 0:v[c])||l,b=d.useContext(m);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[u,f]}const o=()=>{const a=r.map(i=>d.createContext(i));return function(l){const c=(l==null?void 0:l[e])||a;return d.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return o.scopeName=e,[n,wv(o,...t)]}function wv(...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:c,scopeName:u})=>{const p=c(a)[`__scope${u}`];return{...l,...p}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function $s(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function tt(...e){return t=>{let r=!1;const n=e.map(o=>{const a=$s(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():$s(e[o],null)}}}}function ae(...e){return d.useCallback(tt(...e),e)}function dt(e){const t=Sv(e),r=d.forwardRef((n,o)=>{const{children:a,...i}=n,l=d.Children.toArray(a),c=l.find(kv);if(c){const u=c.props.children,f=l.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return s.jsx(t,{...i,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return s.jsx(t,{...i,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}var Cv=dt("Slot");function Sv(e){const t=d.forwardRef((r,n)=>{const{children:o,...a}=r;if(d.isValidElement(o)){const i=Nv(o),l=Rv(a,o.props);return o.type!==d.Fragment&&(l.ref=n?tt(n,i):i),d.cloneElement(o,l)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var dl=Symbol("radix.slottable");function Ev(e){const t=({children:r})=>s.jsx(s.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=dl,t}function kv(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===dl}function Rv(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 c=a(...l);return o(...l),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function Nv(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 Rn(e){const t=e+"CollectionProvider",[r,n]=ye(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=v=>{const{scope:x,children:y}=v,h=S.useRef(null),C=S.useRef(new Map).current;return s.jsx(o,{scope:x,itemMap:C,collectionRef:h,children:y})};i.displayName=t;const l=e+"CollectionSlot",c=dt(l),u=S.forwardRef((v,x)=>{const{scope:y,children:h}=v,C=a(l,y),E=ae(x,C.collectionRef);return s.jsx(c,{ref:E,children:h})});u.displayName=l;const f=e+"CollectionItemSlot",p="data-radix-collection-item",g=dt(f),m=S.forwardRef((v,x)=>{const{scope:y,children:h,...C}=v,E=S.useRef(null),j=ae(x,E),_=a(f,y);return S.useEffect(()=>(_.itemMap.set(E,{ref:E,...C}),()=>void _.itemMap.delete(E))),s.jsx(g,{[p]:"",ref:j,children:h})});m.displayName=f;function b(v){const x=a(e+"CollectionConsumer",v);return S.useCallback(()=>{const h=x.collectionRef.current;if(!h)return[];const C=Array.from(h.querySelectorAll(`[${p}]`));return Array.from(x.itemMap.values()).sort((_,P)=>C.indexOf(_.ref.current)-C.indexOf(P.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:u,ItemSlot:m},b,n]}var jv=d.createContext(void 0);function It(e){const t=d.useContext(jv);return e||t||"ltr"}var Pv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],q=Pv.reduce((e,t)=>{const r=dt(`Primitive.${t}`),n=d.forwardRef((o,a)=>{const{asChild:i,...l}=o,c=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(c,{...l,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function ul(e,t){e&&Sn.flushSync(()=>e.dispatchEvent(t))}function De(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function Tv(e,t=globalThis==null?void 0:globalThis.document){const r=De(e);d.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 _v="DismissableLayer",Oo="dismissableLayer.update",Av="dismissableLayer.pointerDownOutside",Iv="dismissableLayer.focusOutside",Ls,fl=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),nr=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:l,...c}=e,u=d.useContext(fl),[f,p]=d.useState(null),g=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=d.useState({}),b=ae(t,P=>p(P)),v=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf(x),h=f?v.indexOf(f):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,E=h>=y,j=Dv(P=>{const N=P.target,W=[...u.branches].some(U=>U.contains(N));!E||W||(o==null||o(P),i==null||i(P),P.defaultPrevented||l==null||l())},g),_=$v(P=>{const N=P.target;[...u.branches].some(U=>U.contains(N))||(a==null||a(P),i==null||i(P),P.defaultPrevented||l==null||l())},g);return Tv(P=>{h===u.layers.size-1&&(n==null||n(P),!P.defaultPrevented&&l&&(P.preventDefault(),l()))},g),d.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ls=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Fs(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=Ls)}},[f,g,r,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Fs())},[f,u]),d.useEffect(()=>{const P=()=>m({});return document.addEventListener(Oo,P),()=>document.removeEventListener(Oo,P)},[]),s.jsx(q.div,{...c,ref:b,style:{pointerEvents:C?E?"auto":"none":void 0,...e.style},onFocusCapture:F(e.onFocusCapture,_.onFocusCapture),onBlurCapture:F(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:F(e.onPointerDownCapture,j.onPointerDownCapture)})});nr.displayName=_v;var Mv="DismissableLayerBranch",Ov=d.forwardRef((e,t)=>{const r=d.useContext(fl),n=d.useRef(null),o=ae(t,n);return d.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),s.jsx(q.div,{...e,ref:o})});Ov.displayName=Mv;function Dv(e,t=globalThis==null?void 0:globalThis.document){const r=De(e),n=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=l=>{if(l.target&&!n.current){let c=function(){pl(Av,r,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}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 $v(e,t=globalThis==null?void 0:globalThis.document){const r=De(e),n=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!n.current&&pl(Iv,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 Fs(){const e=new CustomEvent(Oo);document.dispatchEvent(e)}function pl(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?ul(o,a):o.dispatchEvent(a)}var po=0;function Nn(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Vs()),document.body.insertAdjacentElement("beforeend",e[1]??Vs()),po++,()=>{po===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),po--}},[])}function Vs(){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 mo="focusScope.autoFocusOnMount",go="focusScope.autoFocusOnUnmount",Bs={bubbles:!1,cancelable:!0},Lv="FocusScope",Tr=d.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[l,c]=d.useState(null),u=De(o),f=De(a),p=d.useRef(null),g=ae(t,v=>c(v)),m=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(n){let v=function(C){if(m.paused||!l)return;const E=C.target;l.contains(E)?p.current=E:it(p.current,{select:!0})},x=function(C){if(m.paused||!l)return;const E=C.relatedTarget;E!==null&&(l.contains(E)||it(p.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const j of C)j.removedNodes.length>0&&it(l)};document.addEventListener("focusin",v),document.addEventListener("focusout",x);const h=new MutationObserver(y);return l&&h.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",x),h.disconnect()}}},[n,l,m.paused]),d.useEffect(()=>{if(l){Ws.add(m);const v=document.activeElement;if(!l.contains(v)){const y=new CustomEvent(mo,Bs);l.addEventListener(mo,u),l.dispatchEvent(y),y.defaultPrevented||(Fv(zv(ml(l)),{select:!0}),document.activeElement===v&&it(l))}return()=>{l.removeEventListener(mo,u),setTimeout(()=>{const y=new CustomEvent(go,Bs);l.addEventListener(go,f),l.dispatchEvent(y),y.defaultPrevented||it(v??document.body,{select:!0}),l.removeEventListener(go,f),Ws.remove(m)},0)}}},[l,u,f,m]);const b=d.useCallback(v=>{if(!r&&!n||m.paused)return;const x=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,y=document.activeElement;if(x&&y){const h=v.currentTarget,[C,E]=Vv(h);C&&E?!v.shiftKey&&y===E?(v.preventDefault(),r&&it(C,{select:!0})):v.shiftKey&&y===C&&(v.preventDefault(),r&&it(E,{select:!0})):y===h&&v.preventDefault()}},[r,n,m.paused]);return s.jsx(q.div,{tabIndex:-1,...i,ref:g,onKeyDown:b})});Tr.displayName=Lv;function Fv(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(it(n,{select:t}),document.activeElement!==r)return}function Vv(e){const t=ml(e),r=Gs(t,e),n=Gs(t.reverse(),e);return[r,n]}function ml(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 Gs(e,t){for(const r of e)if(!Bv(r,{upTo:t}))return r}function Bv(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 Gv(e){return e instanceof HTMLInputElement&&"select"in e}function it(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Gv(e)&&t&&e.select()}}var Ws=Wv();function Wv(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=zs(e,t),e.unshift(t)},remove(t){var r;e=zs(e,t),(r=e[0])==null||r.resume()}}}function zs(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function zv(e){return e.filter(t=>t.tagName!=="A")}var we=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},qv=d[" useId ".trim().toString()]||(()=>{}),Uv=0;function me(e){const[t,r]=d.useState(qv());return we(()=>{r(n=>n??String(Uv++))},[e]),t?`radix-${t}`:""}const Hv=["top","right","bottom","left"],ut=Math.min,Pe=Math.max,ln=Math.round,Xr=Math.floor,He=e=>({x:e,y:e}),Kv={left:"right",right:"left",bottom:"top",top:"bottom"},Yv={start:"end",end:"start"};function Do(e,t,r){return Pe(e,ut(t,r))}function rt(e,t){return typeof e=="function"?e(t):e}function nt(e){return e.split("-")[0]}function or(e){return e.split("-")[1]}function sa(e){return e==="x"?"y":"x"}function ia(e){return e==="y"?"height":"width"}const Xv=new Set(["top","bottom"]);function Ue(e){return Xv.has(nt(e))?"y":"x"}function la(e){return sa(Ue(e))}function Zv(e,t,r){r===void 0&&(r=!1);const n=or(e),o=la(e),a=ia(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=cn(i)),[i,cn(i)]}function Jv(e){const t=cn(e);return[$o(e),t,$o(t)]}function $o(e){return e.replace(/start|end/g,t=>Yv[t])}const qs=["left","right"],Us=["right","left"],Qv=["top","bottom"],eh=["bottom","top"];function th(e,t,r){switch(e){case"top":case"bottom":return r?t?Us:qs:t?qs:Us;case"left":case"right":return t?Qv:eh;default:return[]}}function rh(e,t,r,n){const o=or(e);let a=th(nt(e),r==="start",n);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map($o)))),a}function cn(e){return e.replace(/left|right|bottom|top/g,t=>Kv[t])}function nh(e){return{top:0,right:0,bottom:0,left:0,...e}}function gl(e){return typeof e!="number"?nh(e):{top:e,right:e,bottom:e,left:e}}function dn(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 Hs(e,t,r){let{reference:n,floating:o}=e;const a=Ue(t),i=la(t),l=ia(i),c=nt(t),u=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(c){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(or(t)){case"start":m[i]-=g*(r&&u?-1:1);break;case"end":m[i]+=g*(r&&u?-1:1);break}return m}const oh=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:i}=r,l=a.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=Hs(u,n,c),g=n,m={},b=0;for(let v=0;v<l.length;v++){const{name:x,fn:y}=l[v],{x:h,y:C,data:E,reset:j}=await y({x:f,y:p,initialPlacement:n,placement:g,strategy:o,middlewareData:m,rects:u,platform:i,elements:{reference:e,floating:t}});f=h??f,p=C??p,m={...m,[x]:{...m[x],...E}},j&&b<=50&&(b++,typeof j=="object"&&(j.placement&&(g=j.placement),j.rects&&(u=j.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):j.rects),{x:f,y:p}=Hs(u,g,c)),v=-1)}return{x:f,y:p,placement:g,strategy:o,middlewareData:m}};async function Sr(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:i,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:g=!1,padding:m=0}=rt(t,e),b=gl(m),x=l[g?p==="floating"?"reference":"floating":p],y=dn(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:u,rootBoundary:f,strategy:c})),h=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)),E=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},j=dn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:h,offsetParent:C,strategy:c}):h);return{top:(y.top-j.top+b.top)/E.y,bottom:(j.bottom-y.bottom+b.bottom)/E.y,left:(y.left-j.left+b.left)/E.x,right:(j.right-y.right+b.right)/E.x}}const ah=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:i,elements:l,middlewareData:c}=t,{element:u,padding:f=0}=rt(e,t)||{};if(u==null)return{};const p=gl(f),g={x:r,y:n},m=la(o),b=ia(m),v=await i.getDimensions(u),x=m==="y",y=x?"top":"left",h=x?"bottom":"right",C=x?"clientHeight":"clientWidth",E=a.reference[b]+a.reference[m]-g[m]-a.floating[b],j=g[m]-a.reference[m],_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let P=_?_[C]:0;(!P||!await(i.isElement==null?void 0:i.isElement(_)))&&(P=l.floating[C]||a.floating[b]);const N=E/2-j/2,W=P/2-v[b]/2-1,U=ut(p[y],W),re=ut(p[h],W),te=U,Q=P-v[b]-re,V=P/2-v[b]/2+N,O=Do(te,V,Q),I=!c.arrow&&or(o)!=null&&V!==O&&a.reference[b]/2-(V<te?U:re)-v[b]/2<0,D=I?V<te?V-te:V-Q:0;return{[m]:g[m]+D,data:{[m]:O,centerOffset:V-O-D,...I&&{alignmentOffset:D}},reset:I}}}),sh=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:c,elements:u}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...x}=rt(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const y=nt(o),h=Ue(l),C=nt(l)===l,E=await(c.isRTL==null?void 0:c.isRTL(u.floating)),j=g||(C||!v?[cn(l)]:Jv(l)),_=b!=="none";!g&&_&&j.push(...rh(l,v,b,E));const P=[l,...j],N=await Sr(t,x),W=[];let U=((n=a.flip)==null?void 0:n.overflows)||[];if(f&&W.push(N[y]),p){const V=Zv(o,i,E);W.push(N[V[0]],N[V[1]])}if(U=[...U,{placement:o,overflows:W}],!W.every(V=>V<=0)){var re,te;const V=(((re=a.flip)==null?void 0:re.index)||0)+1,O=P[V];if(O&&(!(p==="alignment"?h!==Ue(O):!1)||U.every(k=>Ue(k.placement)===h?k.overflows[0]>0:!0)))return{data:{index:V,overflows:U},reset:{placement:O}};let I=(te=U.filter(D=>D.overflows[0]<=0).sort((D,k)=>D.overflows[1]-k.overflows[1])[0])==null?void 0:te.placement;if(!I)switch(m){case"bestFit":{var Q;const D=(Q=U.filter(k=>{if(_){const M=Ue(k.placement);return M===h||M==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(M=>M>0).reduce((M,B)=>M+B,0)]).sort((k,M)=>k[1]-M[1])[0])==null?void 0:Q[0];D&&(I=D);break}case"initialPlacement":I=l;break}if(o!==I)return{reset:{placement:I}}}return{}}}};function Ks(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ys(e){return Hv.some(t=>e[t]>=0)}const ih=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=rt(e,t);switch(n){case"referenceHidden":{const a=await Sr(t,{...o,elementContext:"reference"}),i=Ks(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Ys(i)}}}case"escaped":{const a=await Sr(t,{...o,altBoundary:!0}),i=Ks(a,r.floating);return{data:{escapedOffsets:i,escaped:Ys(i)}}}default:return{}}}}},vl=new Set(["left","top"]);async function lh(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=nt(r),l=or(r),c=Ue(r)==="y",u=vl.has(i)?-1:1,f=a&&c?-1:1,p=rt(t,e);let{mainAxis:g,crossAxis:m,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof b=="number"&&(m=l==="end"?b*-1:b),c?{x:m*f,y:g*u}:{x:g*u,y:m*f}}const ch=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,c=await lh(t,e);return i===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:i}}}}},dh=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:h}=x;return{x:y,y:h}}},...c}=rt(e,t),u={x:r,y:n},f=await Sr(t,c),p=Ue(nt(o)),g=sa(p);let m=u[g],b=u[p];if(a){const x=g==="y"?"top":"left",y=g==="y"?"bottom":"right",h=m+f[x],C=m-f[y];m=Do(h,m,C)}if(i){const x=p==="y"?"top":"left",y=p==="y"?"bottom":"right",h=b+f[x],C=b-f[y];b=Do(h,b,C)}const v=l.fn({...t,[g]:m,[p]:b});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[g]:a,[p]:i}}}}}},uh=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:c=!0,crossAxis:u=!0}=rt(e,t),f={x:r,y:n},p=Ue(o),g=sa(p);let m=f[g],b=f[p];const v=rt(l,t),x=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const C=g==="y"?"height":"width",E=a.reference[g]-a.floating[C]+x.mainAxis,j=a.reference[g]+a.reference[C]-x.mainAxis;m<E?m=E:m>j&&(m=j)}if(u){var y,h;const C=g==="y"?"width":"height",E=vl.has(nt(o)),j=a.reference[p]-a.floating[C]+(E&&((y=i.offset)==null?void 0:y[p])||0)+(E?0:x.crossAxis),_=a.reference[p]+a.reference[C]+(E?0:((h=i.offset)==null?void 0:h[p])||0)-(E?x.crossAxis:0);b<j?b=j:b>_&&(b=_)}return{[g]:m,[p]:b}}}},fh=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:c=()=>{},...u}=rt(e,t),f=await Sr(t,u),p=nt(o),g=or(o),m=Ue(o)==="y",{width:b,height:v}=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 h=v-f.top-f.bottom,C=b-f.left-f.right,E=ut(v-f[x],h),j=ut(b-f[y],C),_=!t.middlewareData.shift;let P=E,N=j;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=C),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(P=h),_&&!g){const U=Pe(f.left,0),re=Pe(f.right,0),te=Pe(f.top,0),Q=Pe(f.bottom,0);m?N=b-2*(U!==0||re!==0?U+re:Pe(f.left,f.right)):P=v-2*(te!==0||Q!==0?te+Q:Pe(f.top,f.bottom))}await c({...t,availableWidth:N,availableHeight:P});const W=await i.getDimensions(l.floating);return b!==W.width||v!==W.height?{reset:{rects:!0}}:{}}}};function jn(){return typeof window<"u"}function ar(e){return hl(e)?(e.nodeName||"").toLowerCase():"#document"}function Te(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ye(e){var t;return(t=(hl(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function hl(e){return jn()?e instanceof Node||e instanceof Te(e).Node:!1}function $e(e){return jn()?e instanceof Element||e instanceof Te(e).Element:!1}function Ke(e){return jn()?e instanceof HTMLElement||e instanceof Te(e).HTMLElement:!1}function Xs(e){return!jn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Te(e).ShadowRoot}const ph=new Set(["inline","contents"]);function _r(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Le(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!ph.has(o)}const mh=new Set(["table","td","th"]);function gh(e){return mh.has(ar(e))}const vh=[":popover-open",":modal"];function Pn(e){return vh.some(t=>{try{return e.matches(t)}catch{return!1}})}const hh=["transform","translate","scale","rotate","perspective"],xh=["transform","translate","scale","rotate","perspective","filter"],bh=["paint","layout","strict","content"];function ca(e){const t=da(),r=$e(e)?Le(e):e;return hh.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)||xh.some(n=>(r.willChange||"").includes(n))||bh.some(n=>(r.contain||"").includes(n))}function yh(e){let t=ft(e);for(;Ke(t)&&!Xt(t);){if(ca(t))return t;if(Pn(t))return null;t=ft(t)}return null}function da(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const wh=new Set(["html","body","#document"]);function Xt(e){return wh.has(ar(e))}function Le(e){return Te(e).getComputedStyle(e)}function Tn(e){return $e(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ft(e){if(ar(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Xs(e)&&e.host||Ye(e);return Xs(t)?t.host:t}function xl(e){const t=ft(e);return Xt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ke(t)&&_r(t)?t:xl(t)}function Er(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=xl(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),i=Te(o);if(a){const l=Lo(i);return t.concat(i,i.visualViewport||[],_r(o)?o:[],l&&r?Er(l):[])}return t.concat(o,Er(o,[],r))}function Lo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function bl(e){const t=Le(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Ke(e),a=o?e.offsetWidth:r,i=o?e.offsetHeight:n,l=ln(r)!==a||ln(n)!==i;return l&&(r=a,n=i),{width:r,height:n,$:l}}function ua(e){return $e(e)?e:e.contextElement}function Kt(e){const t=ua(e);if(!Ke(t))return He(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=bl(t);let i=(a?ln(r.width):r.width)/n,l=(a?ln(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const Ch=He(0);function yl(e){const t=Te(e);return!da()||!t.visualViewport?Ch:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Sh(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Te(e)?!1:t}function Rt(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=ua(e);let i=He(1);t&&(n?$e(n)&&(i=Kt(n)):i=Kt(e));const l=Sh(a,r,n)?yl(a):He(0);let c=(o.left+l.x)/i.x,u=(o.top+l.y)/i.y,f=o.width/i.x,p=o.height/i.y;if(a){const g=Te(a),m=n&&$e(n)?Te(n):n;let b=g,v=Lo(b);for(;v&&n&&m!==b;){const x=Kt(v),y=v.getBoundingClientRect(),h=Le(v),C=y.left+(v.clientLeft+parseFloat(h.paddingLeft))*x.x,E=y.top+(v.clientTop+parseFloat(h.paddingTop))*x.y;c*=x.x,u*=x.y,f*=x.x,p*=x.y,c+=C,u+=E,b=Te(v),v=Lo(b)}}return dn({width:f,height:p,x:c,y:u})}function _n(e,t){const r=Tn(e).scrollLeft;return t?t.left+r:Rt(Ye(e)).left+r}function wl(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-_n(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function Eh(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a=o==="fixed",i=Ye(n),l=t?Pn(t.floating):!1;if(n===i||l&&a)return r;let c={scrollLeft:0,scrollTop:0},u=He(1);const f=He(0),p=Ke(n);if((p||!p&&!a)&&((ar(n)!=="body"||_r(i))&&(c=Tn(n)),Ke(n))){const m=Rt(n);u=Kt(n),f.x=m.x+n.clientLeft,f.y=m.y+n.clientTop}const g=i&&!p&&!a?wl(i,c):He(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+f.x+g.x,y:r.y*u.y-c.scrollTop*u.y+f.y+g.y}}function kh(e){return Array.from(e.getClientRects())}function Rh(e){const t=Ye(e),r=Tn(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+_n(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 Zs=25;function Nh(e,t){const r=Te(e),n=Ye(e),o=r.visualViewport;let a=n.clientWidth,i=n.clientHeight,l=0,c=0;if(o){a=o.width,i=o.height;const f=da();(!f||f&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}const u=_n(n);if(u<=0){const f=n.ownerDocument,p=f.body,g=getComputedStyle(p),m=f.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,b=Math.abs(n.clientWidth-p.clientWidth-m);b<=Zs&&(a-=b)}else u<=Zs&&(a+=u);return{width:a,height:i,x:l,y:c}}const jh=new Set(["absolute","fixed"]);function Ph(e,t){const r=Rt(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=Ke(e)?Kt(e):He(1),i=e.clientWidth*a.x,l=e.clientHeight*a.y,c=o*a.x,u=n*a.y;return{width:i,height:l,x:c,y:u}}function Js(e,t,r){let n;if(t==="viewport")n=Nh(e,r);else if(t==="document")n=Rh(Ye(e));else if($e(t))n=Ph(t,r);else{const o=yl(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return dn(n)}function Cl(e,t){const r=ft(e);return r===t||!$e(r)||Xt(r)?!1:Le(r).position==="fixed"||Cl(r,t)}function Th(e,t){const r=t.get(e);if(r)return r;let n=Er(e,[],!1).filter(l=>$e(l)&&ar(l)!=="body"),o=null;const a=Le(e).position==="fixed";let i=a?ft(e):e;for(;$e(i)&&!Xt(i);){const l=Le(i),c=ca(i);!c&&l.position==="fixed"&&(o=null),(a?!c&&!o:!c&&l.position==="static"&&!!o&&jh.has(o.position)||_r(i)&&!c&&Cl(e,i))?n=n.filter(f=>f!==i):o=l,i=ft(i)}return t.set(e,n),n}function _h(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?Pn(t)?[]:Th(t,this._c):[].concat(r),n],l=i[0],c=i.reduce((u,f)=>{const p=Js(t,f,o);return u.top=Pe(p.top,u.top),u.right=ut(p.right,u.right),u.bottom=ut(p.bottom,u.bottom),u.left=Pe(p.left,u.left),u},Js(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Ah(e){const{width:t,height:r}=bl(e);return{width:t,height:r}}function Ih(e,t,r){const n=Ke(t),o=Ye(t),a=r==="fixed",i=Rt(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const c=He(0);function u(){c.x=_n(o)}if(n||!n&&!a)if((ar(t)!=="body"||_r(o))&&(l=Tn(t)),n){const m=Rt(t,!0,a,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else o&&u();a&&!n&&o&&u();const f=o&&!n&&!a?wl(o,l):He(0),p=i.left+l.scrollLeft-c.x-f.x,g=i.top+l.scrollTop-c.y-f.y;return{x:p,y:g,width:i.width,height:i.height}}function vo(e){return Le(e).position==="static"}function Qs(e,t){if(!Ke(e)||Le(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ye(e)===r&&(r=r.ownerDocument.body),r}function Sl(e,t){const r=Te(e);if(Pn(e))return r;if(!Ke(e)){let o=ft(e);for(;o&&!Xt(o);){if($e(o)&&!vo(o))return o;o=ft(o)}return r}let n=Qs(e,t);for(;n&&gh(n)&&vo(n);)n=Qs(n,t);return n&&Xt(n)&&vo(n)&&!ca(n)?r:n||yh(e)||r}const Mh=async function(e){const t=this.getOffsetParent||Sl,r=this.getDimensions,n=await r(e.floating);return{reference:Ih(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Oh(e){return Le(e).direction==="rtl"}const Dh={convertOffsetParentRelativeRectToViewportRelativeRect:Eh,getDocumentElement:Ye,getClippingRect:_h,getOffsetParent:Sl,getElementRects:Mh,getClientRects:kh,getDimensions:Ah,getScale:Kt,isElement:$e,isRTL:Oh};function El(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $h(e,t){let r=null,n;const o=Ye(e);function a(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),a();const u=e.getBoundingClientRect(),{left:f,top:p,width:g,height:m}=u;if(l||t(),!g||!m)return;const b=Xr(p),v=Xr(o.clientWidth-(f+g)),x=Xr(o.clientHeight-(p+m)),y=Xr(f),C={rootMargin:-b+"px "+-v+"px "+-x+"px "+-y+"px",threshold:Pe(0,ut(1,c))||1};let E=!0;function j(_){const P=_[0].intersectionRatio;if(P!==c){if(!E)return i();P?i(!1,P):n=setTimeout(()=>{i(!1,1e-7)},1e3)}P===1&&!El(u,e.getBoundingClientRect())&&i(),E=!1}try{r=new IntersectionObserver(j,{...C,root:o.ownerDocument})}catch{r=new IntersectionObserver(j,C)}r.observe(e)}return i(!0),a}function Lh(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:c=!1}=n,u=ua(e),f=o||a?[...u?Er(u):[],...Er(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",r,{passive:!0}),a&&y.addEventListener("resize",r)});const p=u&&l?$h(u,r):null;let g=-1,m=null;i&&(m=new ResizeObserver(y=>{let[h]=y;h&&h.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var C;(C=m)==null||C.observe(t)})),r()}),u&&!c&&m.observe(u),m.observe(t));let b,v=c?Rt(e):null;c&&x();function x(){const y=Rt(e);v&&!El(v,y)&&r(),v=y,b=requestAnimationFrame(x)}return r(),()=>{var y;f.forEach(h=>{o&&h.removeEventListener("scroll",r),a&&h.removeEventListener("resize",r)}),p==null||p(),(y=m)==null||y.disconnect(),m=null,c&&cancelAnimationFrame(b)}}const Fh=ch,Vh=dh,Bh=sh,Gh=fh,Wh=ih,ei=ah,zh=uh,qh=(e,t,r)=>{const n=new Map,o={platform:Dh,...r},a={...o.platform,_c:n};return oh(e,t,{...o,platform:a})};var Uh=typeof document<"u",Hh=function(){},nn=Uh?S.useLayoutEffect:Hh;function un(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(!un(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)&&!un(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function kl(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ti(e,t){const r=kl(e);return Math.round(t*r)/r}function ho(e){const t=d.useRef(e);return nn(()=>{t.current=e}),t}function Kh(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:c,open:u}=e,[f,p]=d.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[g,m]=d.useState(n);un(g,n)||m(n);const[b,v]=d.useState(null),[x,y]=d.useState(null),h=d.useCallback(k=>{k!==_.current&&(_.current=k,v(k))},[]),C=d.useCallback(k=>{k!==P.current&&(P.current=k,y(k))},[]),E=a||b,j=i||x,_=d.useRef(null),P=d.useRef(null),N=d.useRef(f),W=c!=null,U=ho(c),re=ho(o),te=ho(u),Q=d.useCallback(()=>{if(!_.current||!P.current)return;const k={placement:t,strategy:r,middleware:g};re.current&&(k.platform=re.current),qh(_.current,P.current,k).then(M=>{const B={...M,isPositioned:te.current!==!1};V.current&&!un(N.current,B)&&(N.current=B,Sn.flushSync(()=>{p(B)}))})},[g,t,r,re,te]);nn(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,p(k=>({...k,isPositioned:!1})))},[u]);const V=d.useRef(!1);nn(()=>(V.current=!0,()=>{V.current=!1}),[]),nn(()=>{if(E&&(_.current=E),j&&(P.current=j),E&&j){if(U.current)return U.current(E,j,Q);Q()}},[E,j,Q,U,W]);const O=d.useMemo(()=>({reference:_,floating:P,setReference:h,setFloating:C}),[h,C]),I=d.useMemo(()=>({reference:E,floating:j}),[E,j]),D=d.useMemo(()=>{const k={position:r,left:0,top:0};if(!I.floating)return k;const M=ti(I.floating,f.x),B=ti(I.floating,f.y);return l?{...k,transform:"translate("+M+"px, "+B+"px)",...kl(I.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:M,top:B}},[r,l,I.floating,f.x,f.y]);return d.useMemo(()=>({...f,update:Q,refs:O,elements:I,floatingStyles:D}),[f,Q,O,I,D])}const Yh=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?ei({element:n.current,padding:o}).fn(r):{}:n?ei({element:n,padding:o}).fn(r):{}}}},Xh=(e,t)=>({...Fh(e),options:[e,t]}),Zh=(e,t)=>({...Vh(e),options:[e,t]}),Jh=(e,t)=>({...zh(e),options:[e,t]}),Qh=(e,t)=>({...Bh(e),options:[e,t]}),ex=(e,t)=>({...Gh(e),options:[e,t]}),tx=(e,t)=>({...Wh(e),options:[e,t]}),rx=(e,t)=>({...Yh(e),options:[e,t]});var nx="Arrow",Rl=d.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return s.jsx(q.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"})})});Rl.displayName=nx;var ox=Rl;function An(e){const[t,r]=d.useState(void 0);return we(()=>{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 c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,l=u.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 fa="Popper",[Nl,mt]=ye(fa),[ax,jl]=Nl(fa),Pl=e=>{const{__scopePopper:t,children:r}=e,[n,o]=d.useState(null);return s.jsx(ax,{scope:t,anchor:n,onAnchorChange:o,children:r})};Pl.displayName=fa;var Tl="PopperAnchor",_l=d.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=jl(Tl,r),i=d.useRef(null),l=ae(t,i),c=d.useRef(null);return d.useEffect(()=>{const u=c.current;c.current=(n==null?void 0:n.current)||i.current,u!==c.current&&a.onAnchorChange(c.current)}),n?null:s.jsx(q.div,{...o,ref:l})});_l.displayName=Tl;var pa="PopperContent",[sx,ix]=Nl(pa),Al=d.forwardRef((e,t)=>{var A,K,ee,oe,ce,ie;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:m="optimized",onPlaced:b,...v}=e,x=jl(pa,r),[y,h]=d.useState(null),C=ae(t,Ee=>h(Ee)),[E,j]=d.useState(null),_=An(E),P=(_==null?void 0:_.width)??0,N=(_==null?void 0:_.height)??0,W=n+(a!=="center"?"-"+a:""),U=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},re=Array.isArray(u)?u:[u],te=re.length>0,Q={padding:U,boundary:re.filter(cx),altBoundary:te},{refs:V,floatingStyles:O,placement:I,isPositioned:D,middlewareData:k}=Kh({strategy:"fixed",placement:W,whileElementsMounted:(...Ee)=>Lh(...Ee,{animationFrame:m==="always"}),elements:{reference:x.anchor},middleware:[Xh({mainAxis:o+N,alignmentAxis:i}),c&&Zh({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Jh():void 0,...Q}),c&&Qh({...Q}),ex({...Q,apply:({elements:Ee,rects:_e,availableWidth:Ge,availableHeight:Me})=>{const{width:at,height:Ur}=_e.reference,Ze=Ee.floating.style;Ze.setProperty("--radix-popper-available-width",`${Ge}px`),Ze.setProperty("--radix-popper-available-height",`${Me}px`),Ze.setProperty("--radix-popper-anchor-width",`${at}px`),Ze.setProperty("--radix-popper-anchor-height",`${Ur}px`)}}),E&&rx({element:E,padding:l}),dx({arrowWidth:P,arrowHeight:N}),g&&tx({strategy:"referenceHidden",...Q})]}),[M,B]=Ol(I),J=De(b);we(()=>{D&&(J==null||J())},[D,J]);const T=(A=k.arrow)==null?void 0:A.x,G=(K=k.arrow)==null?void 0:K.y,Z=((ee=k.arrow)==null?void 0:ee.centerOffset)!==0,[z,L]=d.useState();return we(()=>{y&&L(window.getComputedStyle(y).zIndex)},[y]),s.jsx("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:{...O,transform:D?O.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:z,"--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(sx,{scope:r,placedSide:M,onArrowChange:j,arrowX:T,arrowY:G,shouldHideArrow:Z,children:s.jsx(q.div,{"data-side":M,"data-align":B,...v,ref:C,style:{...v.style,animation:D?void 0:"none"}})})})});Al.displayName=pa;var Il="PopperArrow",lx={top:"bottom",right:"left",bottom:"top",left:"right"},Ml=d.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=ix(Il,n),i=lx[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(ox,{...o,ref:r,style:{...o.style,display:"block"}})})});Ml.displayName=Il;function cx(e){return e!==null}var dx=e=>({name:"transformOrigin",options:e,fn(t){var x,y,h;const{placement:r,rects:n,middlewareData:o}=t,i=((x=o.arrow)==null?void 0:x.centerOffset)!==0,l=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,f]=Ol(r),p={start:"0%",center:"50%",end:"100%"}[f],g=(((y=o.arrow)==null?void 0:y.x)??0)+l/2,m=(((h=o.arrow)==null?void 0:h.y)??0)+c/2;let b="",v="";return u==="bottom"?(b=i?p:`${g}px`,v=`${-c}px`):u==="top"?(b=i?p:`${g}px`,v=`${n.floating.height+c}px`):u==="right"?(b=`${-c}px`,v=i?p:`${m}px`):u==="left"&&(b=`${n.floating.width+c}px`,v=i?p:`${m}px`),{data:{x:b,y:v}}}});function Ol(e){const[t,r="center"]=e.split("-");return[t,r]}var Ar=Pl,Ir=_l,In=Al,Mn=Ml,ux="Portal",sr=d.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[o,a]=d.useState(!1);we(()=>a(!0),[]);const i=r||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return i?jr.createPortal(s.jsx(q.div,{...n,ref:t}),i):null});sr.displayName=ux;var fx=d[" useInsertionEffect ".trim().toString()]||we;function be({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,a,i]=px({defaultProp:t,onChange:r}),l=e!==void 0,c=l?e:o;{const f=d.useRef(e!==void 0);d.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 u=d.useCallback(f=>{var p;if(l){const g=mx(f)?f(e):f;g!==e&&((p=i.current)==null||p.call(i,g))}else a(f)},[l,e,a,i]);return[c,u]}function px({defaultProp:e,onChange:t}){const[r,n]=d.useState(e),o=d.useRef(r),a=d.useRef(t);return fx(()=>{a.current=t},[t]),d.useEffect(()=>{var i;o.current!==r&&((i=a.current)==null||i.call(a,r),o.current=r)},[r,o]),[r,n,a]}function mx(e){return typeof e=="function"}function On(e){const t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Dl=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"}),gx="VisuallyHidden",$l=d.forwardRef((e,t)=>s.jsx(q.span,{...e,ref:t,style:{...Dl,...e.style}}));$l.displayName=gx;var vx=$l,hx=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Bt=new WeakMap,Zr=new WeakMap,Jr={},xo=0,Ll=function(e){return e&&(e.host||Ll(e.parentNode))},xx=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Ll(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})},bx=function(e,t,r,n){var o=xx(t,Array.isArray(e)?e:[e]);Jr[r]||(Jr[r]=new WeakMap);var a=Jr[r],i=[],l=new Set,c=new Set(o),u=function(p){!p||l.has(p)||(l.add(p),u(p.parentNode))};o.forEach(u);var f=function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(g){if(l.has(g))f(g);else try{var m=g.getAttribute(n),b=m!==null&&m!=="false",v=(Bt.get(g)||0)+1,x=(a.get(g)||0)+1;Bt.set(g,v),a.set(g,x),i.push(g),v===1&&b&&Zr.set(g,!0),x===1&&g.setAttribute(r,"true"),b||g.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",g,y)}})};return f(t),l.clear(),xo++,function(){i.forEach(function(p){var g=Bt.get(p)-1,m=a.get(p)-1;Bt.set(p,g),a.set(p,m),g||(Zr.has(p)||p.removeAttribute(n),Zr.delete(p)),m||p.removeAttribute(r)}),xo--,xo||(Bt=new WeakMap,Bt=new WeakMap,Zr=new WeakMap,Jr={})}},Dn=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=hx(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),bx(n,o,r,"aria-hidden")):function(){return null}},qe=function(){return qe=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},qe.apply(this,arguments)};function Fl(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 yx(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 on="right-scroll-bar-position",an="width-before-scroll-bar",wx="with-scroll-bars-hidden",Cx="--removed-body-scroll-bar-size";function bo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Sx(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 Ex=typeof window<"u"?d.useLayoutEffect:d.useEffect,ri=new WeakMap;function kx(e,t){var r=Sx(null,function(n){return e.forEach(function(o){return bo(o,n)})});return Ex(function(){var n=ri.get(r);if(n){var o=new Set(n),a=new Set(e),i=r.current;o.forEach(function(l){a.has(l)||bo(l,null)}),a.forEach(function(l){o.has(l)||bo(l,i)})}ri.set(r,e)},[e]),r}function Rx(e){return e}function Nx(e,t){t===void 0&&(t=Rx);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 c=function(){var f=i;i=[],f.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(f){i.push(f),u()},filter:function(f){return i=i.filter(f),r}}}};return o}function jx(e){e===void 0&&(e={});var t=Nx(null);return t.options=qe({async:!0,ssr:!1},e),t}var Vl=function(e){var t=e.sideCar,r=Fl(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 d.createElement(n,qe({},r))};Vl.isSideCarExport=!0;function Px(e,t){return e.useMedium(t),Vl}var Bl=jx(),yo=function(){},$n=d.forwardRef(function(e,t){var r=d.useRef(null),n=d.useState({onScrollCapture:yo,onWheelCapture:yo,onTouchMoveCapture:yo}),o=n[0],a=n[1],i=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,p=e.shards,g=e.sideCar,m=e.noRelative,b=e.noIsolation,v=e.inert,x=e.allowPinchZoom,y=e.as,h=y===void 0?"div":y,C=e.gapMode,E=Fl(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=g,_=kx([r,t]),P=qe(qe({},E),o);return d.createElement(d.Fragment,null,f&&d.createElement(j,{sideCar:Bl,removeScrollBar:u,shards:p,noRelative:m,noIsolation:b,inert:v,setCallbacks:a,allowPinchZoom:!!x,lockRef:r,gapMode:C}),i?d.cloneElement(d.Children.only(l),qe(qe({},P),{ref:_})):d.createElement(h,qe({},P,{className:c,ref:_}),l))});$n.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};$n.classNames={fullWidth:an,zeroRight:on};var Tx=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function _x(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Tx();return t&&e.setAttribute("nonce",t),e}function Ax(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ix(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Mx=function(){var e=0,t=null;return{add:function(r){e==0&&(t=_x())&&(Ax(t,r),Ix(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ox=function(){var e=Mx();return function(t,r){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Gl=function(){var e=Ox(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Dx={left:0,top:0,right:0,gap:0},wo=function(e){return parseInt(e||"",10)||0},$x=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[wo(r),wo(n),wo(o)]},Lx=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Dx;var t=$x(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])}},Fx=Gl(),Yt="data-scroll-locked",Vx=function(e,t,r,n){var o=e.left,a=e.top,i=e.right,l=e.gap;return r===void 0&&(r="margin"),`
|
|
161
|
+
.`.concat(wx,` {
|
|
162
162
|
overflow: hidden `).concat(n,`;
|
|
163
163
|
padding-right: `).concat(l,"px ").concat(n,`;
|
|
164
164
|
}
|
|
165
|
-
body[`).concat(
|
|
165
|
+
body[`).concat(Yt,`] {
|
|
166
166
|
overflow: hidden `).concat(n,`;
|
|
167
167
|
overscroll-behavior: contain;
|
|
168
168
|
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
|
|
@@ -191,22 +191,22 @@ React keys must be passed directly to JSX without using spread:
|
|
|
191
191
|
margin-right: 0 `).concat(n,`;
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
body[`).concat(
|
|
195
|
-
`).concat(
|
|
194
|
+
body[`).concat(Yt,`] {
|
|
195
|
+
`).concat(Cx,": ").concat(l,`px;
|
|
196
196
|
}
|
|
197
|
-
`)},
|
|
197
|
+
`)},ni=function(){var e=parseInt(document.body.getAttribute(Yt)||"0",10);return isFinite(e)?e:0},Bx=function(){d.useEffect(function(){return document.body.setAttribute(Yt,(ni()+1).toString()),function(){var e=ni()-1;e<=0?document.body.removeAttribute(Yt):document.body.setAttribute(Yt,e.toString())}},[])},Gx=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;Bx();var a=d.useMemo(function(){return Lx(o)},[o]);return d.createElement(Fx,{styles:Vx(a,!t,o,r?"":"!important")})},Fo=!1;if(typeof window<"u")try{var Qr=Object.defineProperty({},"passive",{get:function(){return Fo=!0,!0}});window.addEventListener("test",Qr,Qr),window.removeEventListener("test",Qr,Qr)}catch{Fo=!1}var Gt=Fo?{passive:!1}:!1,Wx=function(e){return e.tagName==="TEXTAREA"},Wl=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Wx(e)&&r[t]==="visible")},zx=function(e){return Wl(e,"overflowY")},qx=function(e){return Wl(e,"overflowX")},oi=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=zl(e,n);if(o){var a=ql(e,n),i=a[1],l=a[2];if(i>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Ux=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Hx=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},zl=function(e,t){return e==="v"?zx(t):qx(t)},ql=function(e,t){return e==="v"?Ux(t):Hx(t)},Kx=function(e,t){return e==="h"&&t==="rtl"?-1:1},Yx=function(e,t,r,n,o){var a=Kx(e,window.getComputedStyle(t).direction),i=a*n,l=r.target,c=t.contains(l),u=!1,f=i>0,p=0,g=0;do{if(!l)break;var m=ql(e,l),b=m[0],v=m[1],x=m[2],y=v-x-a*b;(b||y)&&zl(e,l)&&(p+=y,g+=b);var h=l.parentNode;l=h&&h.nodeType===Node.DOCUMENT_FRAGMENT_NODE?h.host:h}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(f&&Math.abs(p)<1||!f&&Math.abs(g)<1)&&(u=!0),u},en=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ai=function(e){return[e.deltaX,e.deltaY]},si=function(e){return e&&"current"in e?e.current:e},Xx=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Zx=function(e){return`
|
|
198
198
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
199
199
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
200
|
-
`)},Kx=0,Gt=[];function Yx(e){var t=d.useRef([]),r=d.useRef([0,0]),n=d.useRef(),o=d.useState(Kx++)[0],a=d.useState(Vl)[0],i=d.useRef(e);d.useEffect(function(){i.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=vx([e.lockRef.current],(e.shards||[]).map(ai),!0).filter(Boolean);return v.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=d.useCallback(function(v,x){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!i.current.allowPinchZoom;var y=en(v),h=r.current,C="deltaX"in v?v.deltaX:h[0]-y[0],E="deltaY"in v?v.deltaY:h[1]-y[1],j,_=v.target,P=Math.abs(C)>Math.abs(E)?"h":"v";if("touches"in v&&P==="h"&&_.type==="range")return!1;var N=ni(P,_);if(!N)return!0;if(N?j=P:(j=P==="v"?"h":"v",N=ni(P,_)),!N)return!1;if(!n.current&&"changedTouches"in v&&(C||E)&&(n.current=j),!j)return!0;var W=n.current||j;return qx(W,x,v,W==="h"?C:E)},[]),c=d.useCallback(function(v){var x=v;if(!(!Gt.length||Gt[Gt.length-1]!==a)){var y="deltaY"in x?oi(x):en(x),h=t.current.filter(function(j){return j.name===x.type&&(j.target===x.target||x.target===j.shadowParent)&&Ux(j.delta,y)})[0];if(h&&h.should){x.cancelable&&x.preventDefault();return}if(!h){var C=(i.current.shards||[]).map(ai).filter(Boolean).filter(function(j){return j.contains(x.target)}),E=C.length>0?l(x,C[0]):!i.current.noIsolation;E&&x.cancelable&&x.preventDefault()}}},[]),u=d.useCallback(function(v,x,y,h){var C={name:v,delta:x,target:y,should:h,shadowParent:Xx(y)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(E){return E!==C})},1)},[]),f=d.useCallback(function(v){r.current=en(v),n.current=void 0},[]),p=d.useCallback(function(v){u(v.type,oi(v),v.target,l(v,e.lockRef.current))},[]),g=d.useCallback(function(v){u(v.type,en(v),v.target,l(v,e.lockRef.current))},[]);d.useEffect(function(){return Gt.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",c,Bt),document.addEventListener("touchmove",c,Bt),document.addEventListener("touchstart",f,Bt),function(){Gt=Gt.filter(function(v){return v!==a}),document.removeEventListener("wheel",c,Bt),document.removeEventListener("touchmove",c,Bt),document.removeEventListener("touchstart",f,Bt)}},[]);var m=e.removeScrollBar,b=e.inert;return d.createElement(d.Fragment,null,b?d.createElement(a,{styles:Hx(o)}):null,m?d.createElement(Lx,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Xx(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Zx=Rx(Fl,Yx);var Mr=d.forwardRef(function(e,t){return d.createElement($n,qe({},e,{ref:t,sideCar:Zx}))});Mr.classNames=$n.classNames;var Jx=[" ","Enter","ArrowUp","ArrowDown"],Qx=[" ","Enter"],Nt="Select",[Ln,Fn,eb]=kn(Nt),[ir,_k]=ye(Nt,[eb,mt]),Vn=mt(),[tb,gt]=ir(Nt),[rb,nb]=ir(Nt),zl=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:o,onOpenChange:a,value:i,defaultValue:l,onValueChange:c,dir:u,name:f,autoComplete:p,disabled:g,required:m,form:b}=e,v=Vn(t),[x,y]=d.useState(null),[h,C]=d.useState(null),[E,j]=d.useState(!1),_=At(u),[P,N]=be({prop:n,defaultProp:o??!1,onChange:a,caller:Nt}),[W,U]=be({prop:i,defaultProp:l,onChange:c,caller:Nt}),re=d.useRef(null),te=x?b||!!x.closest("form"):!0,[Q,V]=d.useState(new Set),O=Array.from(Q).map(I=>I.props.value).join(";");return s.jsx(Ar,{...v,children:s.jsxs(tb,{required:m,scope:t,trigger:x,onTriggerChange:y,valueNode:h,onValueNodeChange:C,valueNodeHasChildren:E,onValueNodeHasChildrenChange:j,contentId:me(),value:W,onValueChange:U,open:P,onOpenChange:N,dir:_,triggerPointerDownPosRef:re,disabled:g,children:[s.jsx(Ln.Provider,{scope:t,children:s.jsx(rb,{scope:e.__scopeSelect,onNativeOptionAdd:d.useCallback(I=>{V(D=>new Set(D).add(I))},[]),onNativeOptionRemove:d.useCallback(I=>{V(D=>{const R=new Set(D);return R.delete(I),R})},[]),children:r})}),te?s.jsxs(gc,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:p,value:W,onChange:I=>U(I.target.value),disabled:g,form:b,children:[W===void 0?s.jsx("option",{value:""}):null,Array.from(Q)]},O):null]})})};zl.displayName=Nt;var ql="SelectTrigger",Ul=d.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...o}=e,a=Vn(r),i=gt(ql,r),l=i.disabled||n,c=ae(t,i.onTriggerChange),u=Fn(r),f=d.useRef("touch"),[p,g,m]=hc(v=>{const x=u().filter(C=>!C.disabled),y=x.find(C=>C.value===i.value),h=xc(x,v,y);h!==void 0&&i.onValueChange(h.value)}),b=v=>{l||(i.onOpenChange(!0),m()),v&&(i.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return s.jsx(Ir,{asChild:!0,...a,children:s.jsx(q.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":vc(i.value)?"":void 0,...o,ref:c,onClick:F(o.onClick,v=>{v.currentTarget.focus(),f.current!=="mouse"&&b(v)}),onPointerDown:F(o.onPointerDown,v=>{f.current=v.pointerType;const x=v.target;x.hasPointerCapture(v.pointerId)&&x.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(b(v),v.preventDefault())}),onKeyDown:F(o.onKeyDown,v=>{const x=p.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&g(v.key),!(x&&v.key===" ")&&Jx.includes(v.key)&&(b(),v.preventDefault())})})})});Ul.displayName=ql;var Hl="SelectValue",Kl=d.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:a,placeholder:i="",...l}=e,c=gt(Hl,r),{onValueNodeHasChildrenChange:u}=c,f=a!==void 0,p=ae(t,c.onValueNodeChange);return we(()=>{u(f)},[u,f]),s.jsx(q.span,{...l,ref:p,style:{pointerEvents:"none"},children:vc(c.value)?s.jsx(s.Fragment,{children:i}):a})});Kl.displayName=Hl;var ob="SelectIcon",Yl=d.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return s.jsx(q.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})});Yl.displayName=ob;var ab="SelectPortal",Xl=e=>s.jsx(sr,{asChild:!0,...e});Xl.displayName=ab;var jt="SelectContent",Zl=d.forwardRef((e,t)=>{const r=gt(jt,e.__scopeSelect),[n,o]=d.useState();if(we(()=>{o(new DocumentFragment)},[]),!r.open){const a=n;return a?Sn.createPortal(s.jsx(Jl,{scope:e.__scopeSelect,children:s.jsx(Ln.Slot,{scope:e.__scopeSelect,children:s.jsx("div",{children:e.children})})}),a):null}return s.jsx(Ql,{...e,ref:t})});Zl.displayName=jt;var Oe=10,[Jl,vt]=ir(jt),sb="SelectContentImpl",ib=dt("SelectContent.RemoveScroll"),Ql=d.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:l,sideOffset:c,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:g,collisionPadding:m,sticky:b,hideWhenDetached:v,avoidCollisions:x,...y}=e,h=gt(jt,r),[C,E]=d.useState(null),[j,_]=d.useState(null),P=ae(t,A=>E(A)),[N,W]=d.useState(null),[U,re]=d.useState(null),te=Fn(r),[Q,V]=d.useState(!1),O=d.useRef(!1);d.useEffect(()=>{if(C)return Dn(C)},[C]),Nn();const I=d.useCallback(A=>{const[K,...ee]=te().map(ie=>ie.ref.current),[oe]=ee.slice(-1),ce=document.activeElement;for(const ie of A)if(ie===ce||(ie==null||ie.scrollIntoView({block:"nearest"}),ie===K&&j&&(j.scrollTop=0),ie===oe&&j&&(j.scrollTop=j.scrollHeight),ie==null||ie.focus(),document.activeElement!==ce))return},[te,j]),D=d.useCallback(()=>I([N,C]),[I,N,C]);d.useEffect(()=>{Q&&D()},[Q,D]);const{onOpenChange:R,triggerPointerDownPosRef:M}=h;d.useEffect(()=>{if(C){let A={x:0,y:0};const K=oe=>{var ce,ie;A={x:Math.abs(Math.round(oe.pageX)-(((ce=M.current)==null?void 0:ce.x)??0)),y:Math.abs(Math.round(oe.pageY)-(((ie=M.current)==null?void 0:ie.y)??0))}},ee=oe=>{A.x<=10&&A.y<=10?oe.preventDefault():C.contains(oe.target)||R(!1),document.removeEventListener("pointermove",K),M.current=null};return M.current!==null&&(document.addEventListener("pointermove",K),document.addEventListener("pointerup",ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",ee,{capture:!0})}}},[C,R,M]),d.useEffect(()=>{const A=()=>R(!1);return window.addEventListener("blur",A),window.addEventListener("resize",A),()=>{window.removeEventListener("blur",A),window.removeEventListener("resize",A)}},[R]);const[B,J]=hc(A=>{const K=te().filter(ce=>!ce.disabled),ee=K.find(ce=>ce.ref.current===document.activeElement),oe=xc(K,A,ee);oe&&setTimeout(()=>oe.ref.current.focus())}),T=d.useCallback((A,K,ee)=>{const oe=!O.current&&!ee;(h.value!==void 0&&h.value===K||oe)&&(W(A),oe&&(O.current=!0))},[h.value]),G=d.useCallback(()=>C==null?void 0:C.focus(),[C]),Z=d.useCallback((A,K,ee)=>{const oe=!O.current&&!ee;(h.value!==void 0&&h.value===K||oe)&&re(A)},[h.value]),z=n==="popper"?Vo:ec,L=z===Vo?{side:l,sideOffset:c,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:g,collisionPadding:m,sticky:b,hideWhenDetached:v,avoidCollisions:x}:{};return s.jsx(Jl,{scope:r,content:C,viewport:j,onViewportChange:_,itemRefCallback:T,selectedItem:N,onItemLeave:G,itemTextRefCallback:Z,focusSelectedItem:D,selectedItemText:U,position:n,isPositioned:Q,searchRef:B,children:s.jsx(Mr,{as:ib,allowPinchZoom:!0,children:s.jsx(Tr,{asChild:!0,trapped:h.open,onMountAutoFocus:A=>{A.preventDefault()},onUnmountAutoFocus:F(o,A=>{var K;(K=h.trigger)==null||K.focus({preventScroll:!0}),A.preventDefault()}),children:s.jsx(nr,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:A=>A.preventDefault(),onDismiss:()=>h.onOpenChange(!1),children:s.jsx(z,{role:"listbox",id:h.contentId,"data-state":h.open?"open":"closed",dir:h.dir,onContextMenu:A=>A.preventDefault(),...y,...L,onPlaced:()=>V(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:F(y.onKeyDown,A=>{const K=A.ctrlKey||A.altKey||A.metaKey;if(A.key==="Tab"&&A.preventDefault(),!K&&A.key.length===1&&J(A.key),["ArrowUp","ArrowDown","Home","End"].includes(A.key)){let oe=te().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);if(["ArrowUp","End"].includes(A.key)&&(oe=oe.slice().reverse()),["ArrowUp","ArrowDown"].includes(A.key)){const ce=A.target,ie=oe.indexOf(ce);oe=oe.slice(ie+1)}setTimeout(()=>I(oe)),A.preventDefault()}})})})})})})});Ql.displayName=sb;var lb="SelectItemAlignedPosition",ec=d.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...o}=e,a=gt(jt,r),i=vt(jt,r),[l,c]=d.useState(null),[u,f]=d.useState(null),p=ae(t,P=>f(P)),g=Fn(r),m=d.useRef(!1),b=d.useRef(!0),{viewport:v,selectedItem:x,selectedItemText:y,focusSelectedItem:h}=i,C=d.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&u&&v&&x&&y){const P=a.trigger.getBoundingClientRect(),N=u.getBoundingClientRect(),W=a.valueNode.getBoundingClientRect(),U=y.getBoundingClientRect();if(a.dir!=="rtl"){const ce=U.left-N.left,ie=W.left-ce,Ee=P.left-ie,_e=P.width+Ee,Ge=Math.max(_e,N.width),Me=window.innerWidth-Oe,at=Os(ie,[Oe,Math.max(Oe,Me-Ge)]);l.style.minWidth=_e+"px",l.style.left=at+"px"}else{const ce=N.right-U.right,ie=window.innerWidth-W.right-ce,Ee=window.innerWidth-P.right-ie,_e=P.width+Ee,Ge=Math.max(_e,N.width),Me=window.innerWidth-Oe,at=Os(ie,[Oe,Math.max(Oe,Me-Ge)]);l.style.minWidth=_e+"px",l.style.right=at+"px"}const re=g(),te=window.innerHeight-Oe*2,Q=v.scrollHeight,V=window.getComputedStyle(u),O=parseInt(V.borderTopWidth,10),I=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),R=parseInt(V.paddingBottom,10),M=O+I+Q+R+D,B=Math.min(x.offsetHeight*5,M),J=window.getComputedStyle(v),T=parseInt(J.paddingTop,10),G=parseInt(J.paddingBottom,10),Z=P.top+P.height/2-Oe,z=te-Z,L=x.offsetHeight/2,A=x.offsetTop+L,K=O+I+A,ee=M-K;if(K<=Z){const ce=re.length>0&&x===re[re.length-1].ref.current;l.style.bottom="0px";const ie=u.clientHeight-v.offsetTop-v.offsetHeight,Ee=Math.max(z,L+(ce?G:0)+ie+D),_e=K+Ee;l.style.height=_e+"px"}else{const ce=re.length>0&&x===re[0].ref.current;l.style.top="0px";const Ee=Math.max(Z,O+v.offsetTop+(ce?T:0)+L)+ee;l.style.height=Ee+"px",v.scrollTop=K-Z+v.offsetTop}l.style.margin=`${Oe}px 0`,l.style.minHeight=B+"px",l.style.maxHeight=te+"px",n==null||n(),requestAnimationFrame(()=>m.current=!0)}},[g,a.trigger,a.valueNode,l,u,v,x,y,a.dir,n]);we(()=>C(),[C]);const[E,j]=d.useState();we(()=>{u&&j(window.getComputedStyle(u).zIndex)},[u]);const _=d.useCallback(P=>{P&&b.current===!0&&(C(),h==null||h(),b.current=!1)},[C,h]);return s.jsx(db,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:_,children:s.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E},children:s.jsx(q.div,{...o,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});ec.displayName=lb;var cb="SelectPopperPosition",Vo=d.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=Oe,...a}=e,i=Vn(r);return s.jsx(In,{...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=cb;var[db,ma]=ir(jt,{}),Bo="SelectViewport",tc=d.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...o}=e,a=vt(Bo,r),i=ma(Bo,r),l=ae(t,a.onViewportChange),c=d.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(Ln.Slot,{scope:r,children:s.jsx(q.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:F(o.onScroll,u=>{const f=u.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:g}=i;if(g!=null&&g.current&&p){const m=Math.abs(c.current-f.scrollTop);if(m>0){const b=window.innerHeight-Oe*2,v=parseFloat(p.style.minHeight),x=parseFloat(p.style.height),y=Math.max(v,x);if(y<b){const h=y+m,C=Math.min(b,h),E=h-C;p.style.height=C+"px",p.style.bottom==="0px"&&(f.scrollTop=E>0?E:0,p.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});tc.displayName=Bo;var rc="SelectGroup",[ub,fb]=ir(rc),nc=d.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=me();return s.jsx(ub,{scope:r,id:o,children:s.jsx(q.div,{role:"group","aria-labelledby":o,...n,ref:t})})});nc.displayName=rc;var oc="SelectLabel",ac=d.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=fb(oc,r);return s.jsx(q.div,{id:o.id,...n,ref:t})});ac.displayName=oc;var fn="SelectItem",[pb,sc]=ir(fn),ic=d.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:o=!1,textValue:a,...i}=e,l=gt(fn,r),c=vt(fn,r),u=l.value===n,[f,p]=d.useState(a??""),[g,m]=d.useState(!1),b=ae(t,h=>{var C;return(C=c.itemRefCallback)==null?void 0:C.call(c,h,n,o)}),v=me(),x=d.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(pb,{scope:r,value:n,disabled:o,textId:v,isSelected:u,onItemTextChange:d.useCallback(h=>{p(C=>C||((h==null?void 0:h.textContent)??"").trim())},[]),children:s.jsx(Ln.ItemSlot,{scope:r,value:n,disabled:o,textValue:f,children:s.jsx(q.div,{role:"option","aria-labelledby":v,"data-highlighted":g?"":void 0,"aria-selected":u&&g,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:b,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,h=>{x.current=h.pointerType}),onPointerMove:F(i.onPointerMove,h=>{var C;x.current=h.pointerType,o?(C=c.onItemLeave)==null||C.call(c):x.current==="mouse"&&h.currentTarget.focus({preventScroll:!0})}),onPointerLeave:F(i.onPointerLeave,h=>{var C;h.currentTarget===document.activeElement&&((C=c.onItemLeave)==null||C.call(c))}),onKeyDown:F(i.onKeyDown,h=>{var E;((E=c.searchRef)==null?void 0:E.current)!==""&&h.key===" "||(Qx.includes(h.key)&&y(),h.key===" "&&h.preventDefault())})})})})});ic.displayName=fn;var gr="SelectItemText",lc=d.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,...a}=e,i=gt(gr,r),l=vt(gr,r),c=sc(gr,r),u=nb(gr,r),[f,p]=d.useState(null),g=ae(t,y=>p(y),c.onItemTextChange,y=>{var h;return(h=l.itemTextRefCallback)==null?void 0:h.call(l,y,c.value,c.disabled)}),m=f==null?void 0:f.textContent,b=d.useMemo(()=>s.jsx("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:v,onNativeOptionRemove:x}=u;return we(()=>(v(b),()=>x(b)),[v,x,b]),s.jsxs(s.Fragment,{children:[s.jsx(q.span,{id:c.textId,...a,ref:g}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Sn.createPortal(a.children,i.valueNode):null]})});lc.displayName=gr;var cc="SelectItemIndicator",dc=d.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return sc(cc,r).isSelected?s.jsx(q.span,{"aria-hidden":!0,...n,ref:t}):null});dc.displayName=cc;var Go="SelectScrollUpButton",uc=d.forwardRef((e,t)=>{const r=vt(Go,e.__scopeSelect),n=ma(Go,e.__scopeSelect),[o,a]=d.useState(!1),i=ae(t,n.onScrollButtonChange);return we(()=>{if(r.viewport&&r.isPositioned){let l=function(){const u=c.scrollTop>0;a(u)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),o?s.jsx(pc,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});uc.displayName=Go;var Wo="SelectScrollDownButton",fc=d.forwardRef((e,t)=>{const r=vt(Wo,e.__scopeSelect),n=ma(Wo,e.__scopeSelect),[o,a]=d.useState(!1),i=ae(t,n.onScrollButtonChange);return we(()=>{if(r.viewport&&r.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<u;a(f)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),o?s.jsx(pc,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});fc.displayName=Wo;var pc=d.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...o}=e,a=vt("SelectScrollButton",r),i=d.useRef(null),l=Fn(r),c=d.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return d.useEffect(()=>()=>c(),[c]),we(()=>{var f;const u=l().find(p=>p.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[l]),s.jsx(q.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 u;(u=a.onItemLeave)==null||u.call(a),i.current===null&&(i.current=window.setInterval(n,50))}),onPointerLeave:F(o.onPointerLeave,()=>{c()})})}),mb="SelectSeparator",mc=d.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return s.jsx(q.div,{"aria-hidden":!0,...n,ref:t})});mc.displayName=mb;var zo="SelectArrow",gb=d.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Vn(r),a=gt(zo,r),i=vt(zo,r);return a.open&&i.position==="popper"?s.jsx(Mn,{...o,...n,ref:t}):null});gb.displayName=zo;var vb="SelectBubbleInput",gc=d.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const o=d.useRef(null),a=ae(n,o),i=On(t);return d.useEffect(()=>{const l=o.current;if(!l)return;const c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&f){const p=new Event("change",{bubbles:!0});f.call(l,t),l.dispatchEvent(p)}},[i,t]),s.jsx(q.select,{...r,style:{...Ml,...r.style},ref:a,defaultValue:t})});gc.displayName=vb;function vc(e){return e===""||e===void 0}function hc(e){const t=De(e),r=d.useRef(""),n=d.useRef(0),o=d.useCallback(i=>{const l=r.current+i;t(l),(function c(u){r.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>c(""),1e3))})(l)},[t]),a=d.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,a]}function xc(e,t,r){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let i=hb(e,Math.max(a,0));o.length===1&&(i=i.filter(u=>u!==r));const c=i.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==r?c:void 0}function hb(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var xb=zl,bc=Ul,bb=Kl,yb=Yl,wb=Xl,yc=Zl,Cb=tc,Sb=nc,wc=ac,Cc=ic,Eb=lc,Rb=dc,Sc=uc,Ec=fc,Rc=mc;const kb=xb,Nb=Sb,jb=bb,kc=d.forwardRef(({className:e,children:t,readOnly:r,...n},o)=>{const a=i=>{r&&i.preventDefault()};return s.jsxs(bc,{ref:o,"data-readonly":r||void 0,disabled:n.disabled,onPointerDown:n.disabled?n.onPointerDown:a,tabIndex:r?0:void 0,className:k(k("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(yb,{asChild:!0,children:s.jsx(En,{className:"h-4 w-4 text-purple-muted-300"})})]})});kc.displayName=bc.displayName;const ga=d.forwardRef(({className:e,...t},r)=>s.jsx(Sc,{ref:r,className:k("qodo qodo-select-scroll-up-button flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(Vg,{className:"h-4 w-4"})}));ga.displayName=Sc.displayName;const va=d.forwardRef(({className:e,...t},r)=>s.jsx(Ec,{ref:r,className:k("qodo qodo-select-scroll-down-button flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(En,{className:"h-4 w-4"})}));va.displayName=Ec.displayName;const Nc=d.forwardRef(({className:e,children:t,position:r="popper",container:n=null,...o},a)=>s.jsx(wb,{container:n,children:s.jsxs(yc,{ref:a,className:k("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(ga,{}),s.jsx(Cb,{className:k("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-[var(--radix-select-trigger-width)]"),children:t}),s.jsx(va,{})]})}));Nc.displayName=yc.displayName;const jc=d.forwardRef(({className:e,...t},r)=>s.jsx(wc,{ref:r,className:k("qodo qodo-select-label py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));jc.displayName=wc.displayName;const Pc=d.forwardRef(({className:e,children:t,...r},n)=>s.jsxs(Cc,{ref:n,title:r.value,className:k(k("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(Rb,{children:s.jsx(rr,{className:"h-4 w-4"})})}),s.jsx(Eb,{children:t})]}));Pc.displayName=Cc.displayName;const Tc=d.forwardRef(({className:e,...t},r)=>s.jsx(Rc,{ref:r,className:k("qodo qodo-select-separator -mx-1 my-1 h-px bg-muted",e),...t}));Tc.displayName=Rc.displayName;var si=1,Pb=.9,Tb=.8,_b=.17,Co=.1,So=.999,Ab=.9999,Ib=.99,Mb=/[\\\/_+.#"@\[\(\{&]/,Ob=/[\\\/_+.#"@\[\(\{&]/g,Db=/[\s-]/,_c=/[\s-]/g;function qo(e,t,r,n,o,a,i){if(a===t.length)return o===e.length?si:Ib;var l=`${o},${a}`;if(i[l]!==void 0)return i[l];for(var c=n.charAt(a),u=r.indexOf(c,o),f=0,p,g,m,b;u>=0;)p=qo(e,t,r,n,u+1,a+1,i),p>f&&(u===o?p*=si:Mb.test(e.charAt(u-1))?(p*=Tb,m=e.slice(o,u-1).match(Ob),m&&o>0&&(p*=Math.pow(So,m.length))):Db.test(e.charAt(u-1))?(p*=Pb,b=e.slice(o,u-1).match(_c),b&&o>0&&(p*=Math.pow(So,b.length))):(p*=_b,o>0&&(p*=Math.pow(So,u-o))),e.charAt(u)!==t.charAt(a)&&(p*=Ab)),(p<Co&&r.charAt(u-1)===n.charAt(a+1)||n.charAt(a+1)===n.charAt(a)&&r.charAt(u-1)!==n.charAt(a))&&(g=qo(e,t,r,n,u+1,a+2,i),g*Co>p&&(p=g*Co)),p>f&&(f=p),u=r.indexOf(c,u+1);return i[l]=f,f}function ii(e){return e.toLowerCase().replace(_c," ")}function $b(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,qo(e,t,ii(e),ii(t),0,0,{})}function Lb(e,t){return d.useReducer((r,n)=>t[r][n]??r,e)}var Ce=e=>{const{present:t,children:r}=e,n=Fb(t),o=typeof r=="function"?r({present:n.isPresent}):d.Children.only(r),a=ae(n.ref,Vb(o));return typeof r=="function"||n.isPresent?d.cloneElement(o,{ref:a}):null};Ce.displayName="Presence";function Fb(e){const[t,r]=d.useState(),n=d.useRef(null),o=d.useRef(e),a=d.useRef("none"),i=e?"mounted":"unmounted",[l,c]=Lb(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const u=tn(n.current);a.current=l==="mounted"?u:"none"},[l]),we(()=>{const u=n.current,f=o.current;if(f!==e){const g=a.current,m=tn(u);e?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&g!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),we(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,p=m=>{const v=tn(n.current).includes(CSS.escape(m.animationName));if(m.target===t&&v&&(c("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},g=m=>{m.target===t&&(a.current=tn(n.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:d.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function tn(e){return(e==null?void 0:e.animationName)||"none"}function Vb(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 Bn="Dialog",[Ac,Ak]=ye(Bn),[Bb,Fe]=Ac(Bn),Ic=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,l=d.useRef(null),c=d.useRef(null),[u,f]=be({prop:n,defaultProp:o??!1,onChange:a,caller:Bn});return s.jsx(Bb,{scope:t,triggerRef:l,contentRef:c,contentId:me(),titleId:me(),descriptionId:me(),open:u,onOpenChange:f,onOpenToggle:d.useCallback(()=>f(p=>!p),[f]),modal:i,children:r})};Ic.displayName=Bn;var Mc="DialogTrigger",Oc=d.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Fe(Mc,r),a=ae(t,o.triggerRef);return s.jsx(q.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ba(o.open),...n,ref:a,onClick:F(e.onClick,o.onOpenToggle)})});Oc.displayName=Mc;var ha="DialogPortal",[Gb,Dc]=Ac(ha,{forceMount:void 0}),$c=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,a=Fe(ha,t);return s.jsx(Gb,{scope:t,forceMount:r,children:d.Children.map(n,i=>s.jsx(Ce,{present:r||a.open,children:s.jsx(sr,{asChild:!0,container:o,children:i})}))})};$c.displayName=ha;var pn="DialogOverlay",Lc=d.forwardRef((e,t)=>{const r=Dc(pn,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=Fe(pn,e.__scopeDialog);return a.modal?s.jsx(Ce,{present:n||a.open,children:s.jsx(zb,{...o,ref:t})}):null});Lc.displayName=pn;var Wb=dt("DialogOverlay.RemoveScroll"),zb=d.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Fe(pn,r);return s.jsx(Mr,{as:Wb,allowPinchZoom:!0,shards:[o.contentRef],children:s.jsx(q.div,{"data-state":ba(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Pt="DialogContent",Fc=d.forwardRef((e,t)=>{const r=Dc(Pt,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=Fe(Pt,e.__scopeDialog);return s.jsx(Ce,{present:n||a.open,children:a.modal?s.jsx(qb,{...o,ref:t}):s.jsx(Ub,{...o,ref:t})})});Fc.displayName=Pt;var qb=d.forwardRef((e,t)=>{const r=Fe(Pt,e.__scopeDialog),n=d.useRef(null),o=ae(t,r.contentRef,n);return d.useEffect(()=>{const a=n.current;if(a)return Dn(a)},[]),s.jsx(Vc,{...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())})}),Ub=d.forwardRef((e,t)=>{const r=Fe(Pt,e.__scopeDialog),n=d.useRef(!1),o=d.useRef(!1);return s.jsx(Vc,{...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 c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Vc=d.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,l=Fe(Pt,r),c=d.useRef(null),u=ae(t,c);return Nn(),s.jsxs(s.Fragment,{children:[s.jsx(Tr,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:s.jsx(nr,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":ba(l.open),...i,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),s.jsxs(s.Fragment,{children:[s.jsx(Hb,{titleId:l.titleId}),s.jsx(Yb,{contentRef:c,descriptionId:l.descriptionId})]})]})}),xa="DialogTitle",Bc=d.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Fe(xa,r);return s.jsx(q.h2,{id:o.titleId,...n,ref:t})});Bc.displayName=xa;var Gc="DialogDescription",Wc=d.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Fe(Gc,r);return s.jsx(q.p,{id:o.descriptionId,...n,ref:t})});Wc.displayName=Gc;var zc="DialogClose",qc=d.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Fe(zc,r);return s.jsx(q.button,{type:"button",...n,ref:t,onClick:F(e.onClick,()=>o.onOpenChange(!1))})});qc.displayName=zc;function ba(e){return e?"open":"closed"}var Uc="DialogTitleWarning",[Ik,Hc]=vv(Uc,{contentName:Pt,titleName:xa,docsSlug:"dialog"}),Hb=({titleId:e})=>{const t=Hc(Uc),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
200
|
+
`)},Jx=0,Wt=[];function Qx(e){var t=d.useRef([]),r=d.useRef([0,0]),n=d.useRef(),o=d.useState(Jx++)[0],a=d.useState(Gl)[0],i=d.useRef(e);d.useEffect(function(){i.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=yx([e.lockRef.current],(e.shards||[]).map(si),!0).filter(Boolean);return v.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=d.useCallback(function(v,x){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!i.current.allowPinchZoom;var y=en(v),h=r.current,C="deltaX"in v?v.deltaX:h[0]-y[0],E="deltaY"in v?v.deltaY:h[1]-y[1],j,_=v.target,P=Math.abs(C)>Math.abs(E)?"h":"v";if("touches"in v&&P==="h"&&_.type==="range")return!1;var N=oi(P,_);if(!N)return!0;if(N?j=P:(j=P==="v"?"h":"v",N=oi(P,_)),!N)return!1;if(!n.current&&"changedTouches"in v&&(C||E)&&(n.current=j),!j)return!0;var W=n.current||j;return Yx(W,x,v,W==="h"?C:E)},[]),c=d.useCallback(function(v){var x=v;if(!(!Wt.length||Wt[Wt.length-1]!==a)){var y="deltaY"in x?ai(x):en(x),h=t.current.filter(function(j){return j.name===x.type&&(j.target===x.target||x.target===j.shadowParent)&&Xx(j.delta,y)})[0];if(h&&h.should){x.cancelable&&x.preventDefault();return}if(!h){var C=(i.current.shards||[]).map(si).filter(Boolean).filter(function(j){return j.contains(x.target)}),E=C.length>0?l(x,C[0]):!i.current.noIsolation;E&&x.cancelable&&x.preventDefault()}}},[]),u=d.useCallback(function(v,x,y,h){var C={name:v,delta:x,target:y,should:h,shadowParent:eb(y)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(E){return E!==C})},1)},[]),f=d.useCallback(function(v){r.current=en(v),n.current=void 0},[]),p=d.useCallback(function(v){u(v.type,ai(v),v.target,l(v,e.lockRef.current))},[]),g=d.useCallback(function(v){u(v.type,en(v),v.target,l(v,e.lockRef.current))},[]);d.useEffect(function(){return Wt.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",c,Gt),document.addEventListener("touchmove",c,Gt),document.addEventListener("touchstart",f,Gt),function(){Wt=Wt.filter(function(v){return v!==a}),document.removeEventListener("wheel",c,Gt),document.removeEventListener("touchmove",c,Gt),document.removeEventListener("touchstart",f,Gt)}},[]);var m=e.removeScrollBar,b=e.inert;return d.createElement(d.Fragment,null,b?d.createElement(a,{styles:Zx(o)}):null,m?d.createElement(Gx,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function eb(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const tb=Px(Bl,Qx);var Mr=d.forwardRef(function(e,t){return d.createElement($n,qe({},e,{ref:t,sideCar:tb}))});Mr.classNames=$n.classNames;var rb=[" ","Enter","ArrowUp","ArrowDown"],nb=[" ","Enter"],Nt="Select",[Ln,Fn,ob]=Rn(Nt),[ir,DR]=ye(Nt,[ob,mt]),Vn=mt(),[ab,gt]=ir(Nt),[sb,ib]=ir(Nt),Ul=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:o,onOpenChange:a,value:i,defaultValue:l,onValueChange:c,dir:u,name:f,autoComplete:p,disabled:g,required:m,form:b}=e,v=Vn(t),[x,y]=d.useState(null),[h,C]=d.useState(null),[E,j]=d.useState(!1),_=It(u),[P,N]=be({prop:n,defaultProp:o??!1,onChange:a,caller:Nt}),[W,U]=be({prop:i,defaultProp:l,onChange:c,caller:Nt}),re=d.useRef(null),te=x?b||!!x.closest("form"):!0,[Q,V]=d.useState(new Set),O=Array.from(Q).map(I=>I.props.value).join(";");return s.jsx(Ar,{...v,children:s.jsxs(ab,{required:m,scope:t,trigger:x,onTriggerChange:y,valueNode:h,onValueNodeChange:C,valueNodeHasChildren:E,onValueNodeHasChildrenChange:j,contentId:me(),value:W,onValueChange:U,open:P,onOpenChange:N,dir:_,triggerPointerDownPosRef:re,disabled:g,children:[s.jsx(Ln.Provider,{scope:t,children:s.jsx(sb,{scope:e.__scopeSelect,onNativeOptionAdd:d.useCallback(I=>{V(D=>new Set(D).add(I))},[]),onNativeOptionRemove:d.useCallback(I=>{V(D=>{const k=new Set(D);return k.delete(I),k})},[]),children:r})}),te?s.jsxs(hc,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:p,value:W,onChange:I=>U(I.target.value),disabled:g,form:b,children:[W===void 0?s.jsx("option",{value:""}):null,Array.from(Q)]},O):null]})})};Ul.displayName=Nt;var Hl="SelectTrigger",Kl=d.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...o}=e,a=Vn(r),i=gt(Hl,r),l=i.disabled||n,c=ae(t,i.onTriggerChange),u=Fn(r),f=d.useRef("touch"),[p,g,m]=bc(v=>{const x=u().filter(C=>!C.disabled),y=x.find(C=>C.value===i.value),h=yc(x,v,y);h!==void 0&&i.onValueChange(h.value)}),b=v=>{l||(i.onOpenChange(!0),m()),v&&(i.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return s.jsx(Ir,{asChild:!0,...a,children:s.jsx(q.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":xc(i.value)?"":void 0,...o,ref:c,onClick:F(o.onClick,v=>{v.currentTarget.focus(),f.current!=="mouse"&&b(v)}),onPointerDown:F(o.onPointerDown,v=>{f.current=v.pointerType;const x=v.target;x.hasPointerCapture(v.pointerId)&&x.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(b(v),v.preventDefault())}),onKeyDown:F(o.onKeyDown,v=>{const x=p.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&g(v.key),!(x&&v.key===" ")&&rb.includes(v.key)&&(b(),v.preventDefault())})})})});Kl.displayName=Hl;var Yl="SelectValue",Xl=d.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:a,placeholder:i="",...l}=e,c=gt(Yl,r),{onValueNodeHasChildrenChange:u}=c,f=a!==void 0,p=ae(t,c.onValueNodeChange);return we(()=>{u(f)},[u,f]),s.jsx(q.span,{...l,ref:p,style:{pointerEvents:"none"},children:xc(c.value)?s.jsx(s.Fragment,{children:i}):a})});Xl.displayName=Yl;var lb="SelectIcon",Zl=d.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return s.jsx(q.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})});Zl.displayName=lb;var cb="SelectPortal",Jl=e=>s.jsx(sr,{asChild:!0,...e});Jl.displayName=cb;var jt="SelectContent",Ql=d.forwardRef((e,t)=>{const r=gt(jt,e.__scopeSelect),[n,o]=d.useState();if(we(()=>{o(new DocumentFragment)},[]),!r.open){const a=n;return a?Sn.createPortal(s.jsx(ec,{scope:e.__scopeSelect,children:s.jsx(Ln.Slot,{scope:e.__scopeSelect,children:s.jsx("div",{children:e.children})})}),a):null}return s.jsx(tc,{...e,ref:t})});Ql.displayName=jt;var Oe=10,[ec,vt]=ir(jt),db="SelectContentImpl",ub=dt("SelectContent.RemoveScroll"),tc=d.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:l,sideOffset:c,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:g,collisionPadding:m,sticky:b,hideWhenDetached:v,avoidCollisions:x,...y}=e,h=gt(jt,r),[C,E]=d.useState(null),[j,_]=d.useState(null),P=ae(t,A=>E(A)),[N,W]=d.useState(null),[U,re]=d.useState(null),te=Fn(r),[Q,V]=d.useState(!1),O=d.useRef(!1);d.useEffect(()=>{if(C)return Dn(C)},[C]),Nn();const I=d.useCallback(A=>{const[K,...ee]=te().map(ie=>ie.ref.current),[oe]=ee.slice(-1),ce=document.activeElement;for(const ie of A)if(ie===ce||(ie==null||ie.scrollIntoView({block:"nearest"}),ie===K&&j&&(j.scrollTop=0),ie===oe&&j&&(j.scrollTop=j.scrollHeight),ie==null||ie.focus(),document.activeElement!==ce))return},[te,j]),D=d.useCallback(()=>I([N,C]),[I,N,C]);d.useEffect(()=>{Q&&D()},[Q,D]);const{onOpenChange:k,triggerPointerDownPosRef:M}=h;d.useEffect(()=>{if(C){let A={x:0,y:0};const K=oe=>{var ce,ie;A={x:Math.abs(Math.round(oe.pageX)-(((ce=M.current)==null?void 0:ce.x)??0)),y:Math.abs(Math.round(oe.pageY)-(((ie=M.current)==null?void 0:ie.y)??0))}},ee=oe=>{A.x<=10&&A.y<=10?oe.preventDefault():C.contains(oe.target)||k(!1),document.removeEventListener("pointermove",K),M.current=null};return M.current!==null&&(document.addEventListener("pointermove",K),document.addEventListener("pointerup",ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",ee,{capture:!0})}}},[C,k,M]),d.useEffect(()=>{const A=()=>k(!1);return window.addEventListener("blur",A),window.addEventListener("resize",A),()=>{window.removeEventListener("blur",A),window.removeEventListener("resize",A)}},[k]);const[B,J]=bc(A=>{const K=te().filter(ce=>!ce.disabled),ee=K.find(ce=>ce.ref.current===document.activeElement),oe=yc(K,A,ee);oe&&setTimeout(()=>oe.ref.current.focus())}),T=d.useCallback((A,K,ee)=>{const oe=!O.current&&!ee;(h.value!==void 0&&h.value===K||oe)&&(W(A),oe&&(O.current=!0))},[h.value]),G=d.useCallback(()=>C==null?void 0:C.focus(),[C]),Z=d.useCallback((A,K,ee)=>{const oe=!O.current&&!ee;(h.value!==void 0&&h.value===K||oe)&&re(A)},[h.value]),z=n==="popper"?Vo:rc,L=z===Vo?{side:l,sideOffset:c,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:g,collisionPadding:m,sticky:b,hideWhenDetached:v,avoidCollisions:x}:{};return s.jsx(ec,{scope:r,content:C,viewport:j,onViewportChange:_,itemRefCallback:T,selectedItem:N,onItemLeave:G,itemTextRefCallback:Z,focusSelectedItem:D,selectedItemText:U,position:n,isPositioned:Q,searchRef:B,children:s.jsx(Mr,{as:ub,allowPinchZoom:!0,children:s.jsx(Tr,{asChild:!0,trapped:h.open,onMountAutoFocus:A=>{A.preventDefault()},onUnmountAutoFocus:F(o,A=>{var K;(K=h.trigger)==null||K.focus({preventScroll:!0}),A.preventDefault()}),children:s.jsx(nr,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:A=>A.preventDefault(),onDismiss:()=>h.onOpenChange(!1),children:s.jsx(z,{role:"listbox",id:h.contentId,"data-state":h.open?"open":"closed",dir:h.dir,onContextMenu:A=>A.preventDefault(),...y,...L,onPlaced:()=>V(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:F(y.onKeyDown,A=>{const K=A.ctrlKey||A.altKey||A.metaKey;if(A.key==="Tab"&&A.preventDefault(),!K&&A.key.length===1&&J(A.key),["ArrowUp","ArrowDown","Home","End"].includes(A.key)){let oe=te().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);if(["ArrowUp","End"].includes(A.key)&&(oe=oe.slice().reverse()),["ArrowUp","ArrowDown"].includes(A.key)){const ce=A.target,ie=oe.indexOf(ce);oe=oe.slice(ie+1)}setTimeout(()=>I(oe)),A.preventDefault()}})})})})})})});tc.displayName=db;var fb="SelectItemAlignedPosition",rc=d.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...o}=e,a=gt(jt,r),i=vt(jt,r),[l,c]=d.useState(null),[u,f]=d.useState(null),p=ae(t,P=>f(P)),g=Fn(r),m=d.useRef(!1),b=d.useRef(!0),{viewport:v,selectedItem:x,selectedItemText:y,focusSelectedItem:h}=i,C=d.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&u&&v&&x&&y){const P=a.trigger.getBoundingClientRect(),N=u.getBoundingClientRect(),W=a.valueNode.getBoundingClientRect(),U=y.getBoundingClientRect();if(a.dir!=="rtl"){const ce=U.left-N.left,ie=W.left-ce,Ee=P.left-ie,_e=P.width+Ee,Ge=Math.max(_e,N.width),Me=window.innerWidth-Oe,at=Ds(ie,[Oe,Math.max(Oe,Me-Ge)]);l.style.minWidth=_e+"px",l.style.left=at+"px"}else{const ce=N.right-U.right,ie=window.innerWidth-W.right-ce,Ee=window.innerWidth-P.right-ie,_e=P.width+Ee,Ge=Math.max(_e,N.width),Me=window.innerWidth-Oe,at=Ds(ie,[Oe,Math.max(Oe,Me-Ge)]);l.style.minWidth=_e+"px",l.style.right=at+"px"}const re=g(),te=window.innerHeight-Oe*2,Q=v.scrollHeight,V=window.getComputedStyle(u),O=parseInt(V.borderTopWidth,10),I=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),k=parseInt(V.paddingBottom,10),M=O+I+Q+k+D,B=Math.min(x.offsetHeight*5,M),J=window.getComputedStyle(v),T=parseInt(J.paddingTop,10),G=parseInt(J.paddingBottom,10),Z=P.top+P.height/2-Oe,z=te-Z,L=x.offsetHeight/2,A=x.offsetTop+L,K=O+I+A,ee=M-K;if(K<=Z){const ce=re.length>0&&x===re[re.length-1].ref.current;l.style.bottom="0px";const ie=u.clientHeight-v.offsetTop-v.offsetHeight,Ee=Math.max(z,L+(ce?G:0)+ie+D),_e=K+Ee;l.style.height=_e+"px"}else{const ce=re.length>0&&x===re[0].ref.current;l.style.top="0px";const Ee=Math.max(Z,O+v.offsetTop+(ce?T:0)+L)+ee;l.style.height=Ee+"px",v.scrollTop=K-Z+v.offsetTop}l.style.margin=`${Oe}px 0`,l.style.minHeight=B+"px",l.style.maxHeight=te+"px",n==null||n(),requestAnimationFrame(()=>m.current=!0)}},[g,a.trigger,a.valueNode,l,u,v,x,y,a.dir,n]);we(()=>C(),[C]);const[E,j]=d.useState();we(()=>{u&&j(window.getComputedStyle(u).zIndex)},[u]);const _=d.useCallback(P=>{P&&b.current===!0&&(C(),h==null||h(),b.current=!1)},[C,h]);return s.jsx(mb,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:_,children:s.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E},children:s.jsx(q.div,{...o,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});rc.displayName=fb;var pb="SelectPopperPosition",Vo=d.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=Oe,...a}=e,i=Vn(r);return s.jsx(In,{...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=pb;var[mb,ma]=ir(jt,{}),Bo="SelectViewport",nc=d.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...o}=e,a=vt(Bo,r),i=ma(Bo,r),l=ae(t,a.onViewportChange),c=d.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(Ln.Slot,{scope:r,children:s.jsx(q.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:F(o.onScroll,u=>{const f=u.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:g}=i;if(g!=null&&g.current&&p){const m=Math.abs(c.current-f.scrollTop);if(m>0){const b=window.innerHeight-Oe*2,v=parseFloat(p.style.minHeight),x=parseFloat(p.style.height),y=Math.max(v,x);if(y<b){const h=y+m,C=Math.min(b,h),E=h-C;p.style.height=C+"px",p.style.bottom==="0px"&&(f.scrollTop=E>0?E:0,p.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});nc.displayName=Bo;var oc="SelectGroup",[gb,vb]=ir(oc),ac=d.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=me();return s.jsx(gb,{scope:r,id:o,children:s.jsx(q.div,{role:"group","aria-labelledby":o,...n,ref:t})})});ac.displayName=oc;var sc="SelectLabel",ic=d.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=vb(sc,r);return s.jsx(q.div,{id:o.id,...n,ref:t})});ic.displayName=sc;var fn="SelectItem",[hb,lc]=ir(fn),cc=d.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:o=!1,textValue:a,...i}=e,l=gt(fn,r),c=vt(fn,r),u=l.value===n,[f,p]=d.useState(a??""),[g,m]=d.useState(!1),b=ae(t,h=>{var C;return(C=c.itemRefCallback)==null?void 0:C.call(c,h,n,o)}),v=me(),x=d.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(hb,{scope:r,value:n,disabled:o,textId:v,isSelected:u,onItemTextChange:d.useCallback(h=>{p(C=>C||((h==null?void 0:h.textContent)??"").trim())},[]),children:s.jsx(Ln.ItemSlot,{scope:r,value:n,disabled:o,textValue:f,children:s.jsx(q.div,{role:"option","aria-labelledby":v,"data-highlighted":g?"":void 0,"aria-selected":u&&g,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:b,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,h=>{x.current=h.pointerType}),onPointerMove:F(i.onPointerMove,h=>{var C;x.current=h.pointerType,o?(C=c.onItemLeave)==null||C.call(c):x.current==="mouse"&&h.currentTarget.focus({preventScroll:!0})}),onPointerLeave:F(i.onPointerLeave,h=>{var C;h.currentTarget===document.activeElement&&((C=c.onItemLeave)==null||C.call(c))}),onKeyDown:F(i.onKeyDown,h=>{var E;((E=c.searchRef)==null?void 0:E.current)!==""&&h.key===" "||(nb.includes(h.key)&&y(),h.key===" "&&h.preventDefault())})})})})});cc.displayName=fn;var gr="SelectItemText",dc=d.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,...a}=e,i=gt(gr,r),l=vt(gr,r),c=lc(gr,r),u=ib(gr,r),[f,p]=d.useState(null),g=ae(t,y=>p(y),c.onItemTextChange,y=>{var h;return(h=l.itemTextRefCallback)==null?void 0:h.call(l,y,c.value,c.disabled)}),m=f==null?void 0:f.textContent,b=d.useMemo(()=>s.jsx("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:v,onNativeOptionRemove:x}=u;return we(()=>(v(b),()=>x(b)),[v,x,b]),s.jsxs(s.Fragment,{children:[s.jsx(q.span,{id:c.textId,...a,ref:g}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Sn.createPortal(a.children,i.valueNode):null]})});dc.displayName=gr;var uc="SelectItemIndicator",fc=d.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return lc(uc,r).isSelected?s.jsx(q.span,{"aria-hidden":!0,...n,ref:t}):null});fc.displayName=uc;var Go="SelectScrollUpButton",pc=d.forwardRef((e,t)=>{const r=vt(Go,e.__scopeSelect),n=ma(Go,e.__scopeSelect),[o,a]=d.useState(!1),i=ae(t,n.onScrollButtonChange);return we(()=>{if(r.viewport&&r.isPositioned){let l=function(){const u=c.scrollTop>0;a(u)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),o?s.jsx(gc,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});pc.displayName=Go;var Wo="SelectScrollDownButton",mc=d.forwardRef((e,t)=>{const r=vt(Wo,e.__scopeSelect),n=ma(Wo,e.__scopeSelect),[o,a]=d.useState(!1),i=ae(t,n.onScrollButtonChange);return we(()=>{if(r.viewport&&r.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<u;a(f)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),o?s.jsx(gc,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});mc.displayName=Wo;var gc=d.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...o}=e,a=vt("SelectScrollButton",r),i=d.useRef(null),l=Fn(r),c=d.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return d.useEffect(()=>()=>c(),[c]),we(()=>{var f;const u=l().find(p=>p.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[l]),s.jsx(q.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 u;(u=a.onItemLeave)==null||u.call(a),i.current===null&&(i.current=window.setInterval(n,50))}),onPointerLeave:F(o.onPointerLeave,()=>{c()})})}),xb="SelectSeparator",vc=d.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return s.jsx(q.div,{"aria-hidden":!0,...n,ref:t})});vc.displayName=xb;var zo="SelectArrow",bb=d.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Vn(r),a=gt(zo,r),i=vt(zo,r);return a.open&&i.position==="popper"?s.jsx(Mn,{...o,...n,ref:t}):null});bb.displayName=zo;var yb="SelectBubbleInput",hc=d.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const o=d.useRef(null),a=ae(n,o),i=On(t);return d.useEffect(()=>{const l=o.current;if(!l)return;const c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&f){const p=new Event("change",{bubbles:!0});f.call(l,t),l.dispatchEvent(p)}},[i,t]),s.jsx(q.select,{...r,style:{...Dl,...r.style},ref:a,defaultValue:t})});hc.displayName=yb;function xc(e){return e===""||e===void 0}function bc(e){const t=De(e),r=d.useRef(""),n=d.useRef(0),o=d.useCallback(i=>{const l=r.current+i;t(l),(function c(u){r.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>c(""),1e3))})(l)},[t]),a=d.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,a]}function yc(e,t,r){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let i=wb(e,Math.max(a,0));o.length===1&&(i=i.filter(u=>u!==r));const c=i.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==r?c:void 0}function wb(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Cb=Ul,wc=Kl,Sb=Xl,Eb=Zl,kb=Jl,Cc=Ql,Rb=nc,Nb=ac,Sc=ic,Ec=cc,jb=dc,Pb=fc,kc=pc,Rc=mc,Nc=vc;const Tb=Cb,_b=Nb,Ab=Sb,jc=d.forwardRef(({className:e,children:t,readOnly:r,...n},o)=>{const a=i=>{r&&i.preventDefault()};return s.jsxs(wc,{ref:o,"data-readonly":r||void 0,disabled:n.disabled,onPointerDown:n.disabled?n.onPointerDown:a,tabIndex:r?0:void 0,className:R(R("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(Eb,{asChild:!0,children:s.jsx(En,{className:"h-4 w-4 text-purple-muted-300"})})]})});jc.displayName=wc.displayName;const ga=d.forwardRef(({className:e,...t},r)=>s.jsx(kc,{ref:r,className:R("qodo qodo-select-scroll-up-button flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(zg,{className:"h-4 w-4"})}));ga.displayName=kc.displayName;const va=d.forwardRef(({className:e,...t},r)=>s.jsx(Rc,{ref:r,className:R("qodo qodo-select-scroll-down-button flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(En,{className:"h-4 w-4"})}));va.displayName=Rc.displayName;const Pc=d.forwardRef(({className:e,children:t,position:r="popper",container:n=null,...o},a)=>s.jsx(kb,{container:n,children:s.jsxs(Cc,{ref:a,className:R("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(ga,{}),s.jsx(Rb,{className:R("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-[var(--radix-select-trigger-width)]"),children:t}),s.jsx(va,{})]})}));Pc.displayName=Cc.displayName;const Tc=d.forwardRef(({className:e,...t},r)=>s.jsx(Sc,{ref:r,className:R("qodo qodo-select-label py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Tc.displayName=Sc.displayName;const _c=d.forwardRef(({className:e,children:t,...r},n)=>s.jsxs(Ec,{ref:n,title:r.value,className:R(R("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(Pb,{children:s.jsx(rr,{className:"h-4 w-4"})})}),s.jsx(jb,{children:t})]}));_c.displayName=Ec.displayName;const Ac=d.forwardRef(({className:e,...t},r)=>s.jsx(Nc,{ref:r,className:R("qodo qodo-select-separator -mx-1 my-1 h-px bg-muted",e),...t}));Ac.displayName=Nc.displayName;var ii=1,Ib=.9,Mb=.8,Ob=.17,Co=.1,So=.999,Db=.9999,$b=.99,Lb=/[\\\/_+.#"@\[\(\{&]/,Fb=/[\\\/_+.#"@\[\(\{&]/g,Vb=/[\s-]/,Ic=/[\s-]/g;function qo(e,t,r,n,o,a,i){if(a===t.length)return o===e.length?ii:$b;var l=`${o},${a}`;if(i[l]!==void 0)return i[l];for(var c=n.charAt(a),u=r.indexOf(c,o),f=0,p,g,m,b;u>=0;)p=qo(e,t,r,n,u+1,a+1,i),p>f&&(u===o?p*=ii:Lb.test(e.charAt(u-1))?(p*=Mb,m=e.slice(o,u-1).match(Fb),m&&o>0&&(p*=Math.pow(So,m.length))):Vb.test(e.charAt(u-1))?(p*=Ib,b=e.slice(o,u-1).match(Ic),b&&o>0&&(p*=Math.pow(So,b.length))):(p*=Ob,o>0&&(p*=Math.pow(So,u-o))),e.charAt(u)!==t.charAt(a)&&(p*=Db)),(p<Co&&r.charAt(u-1)===n.charAt(a+1)||n.charAt(a+1)===n.charAt(a)&&r.charAt(u-1)!==n.charAt(a))&&(g=qo(e,t,r,n,u+1,a+2,i),g*Co>p&&(p=g*Co)),p>f&&(f=p),u=r.indexOf(c,u+1);return i[l]=f,f}function li(e){return e.toLowerCase().replace(Ic," ")}function Bb(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,qo(e,t,li(e),li(t),0,0,{})}function Gb(e,t){return d.useReducer((r,n)=>t[r][n]??r,e)}var Ce=e=>{const{present:t,children:r}=e,n=Wb(t),o=typeof r=="function"?r({present:n.isPresent}):d.Children.only(r),a=ae(n.ref,zb(o));return typeof r=="function"||n.isPresent?d.cloneElement(o,{ref:a}):null};Ce.displayName="Presence";function Wb(e){const[t,r]=d.useState(),n=d.useRef(null),o=d.useRef(e),a=d.useRef("none"),i=e?"mounted":"unmounted",[l,c]=Gb(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const u=tn(n.current);a.current=l==="mounted"?u:"none"},[l]),we(()=>{const u=n.current,f=o.current;if(f!==e){const g=a.current,m=tn(u);e?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&g!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),we(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,p=m=>{const v=tn(n.current).includes(CSS.escape(m.animationName));if(m.target===t&&v&&(c("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},g=m=>{m.target===t&&(a.current=tn(n.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:d.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function tn(e){return(e==null?void 0:e.animationName)||"none"}function zb(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 Bn="Dialog",[Mc,$R]=ye(Bn),[qb,Fe]=Mc(Bn),Oc=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,l=d.useRef(null),c=d.useRef(null),[u,f]=be({prop:n,defaultProp:o??!1,onChange:a,caller:Bn});return s.jsx(qb,{scope:t,triggerRef:l,contentRef:c,contentId:me(),titleId:me(),descriptionId:me(),open:u,onOpenChange:f,onOpenToggle:d.useCallback(()=>f(p=>!p),[f]),modal:i,children:r})};Oc.displayName=Bn;var Dc="DialogTrigger",$c=d.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Fe(Dc,r),a=ae(t,o.triggerRef);return s.jsx(q.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ba(o.open),...n,ref:a,onClick:F(e.onClick,o.onOpenToggle)})});$c.displayName=Dc;var ha="DialogPortal",[Ub,Lc]=Mc(ha,{forceMount:void 0}),Fc=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,a=Fe(ha,t);return s.jsx(Ub,{scope:t,forceMount:r,children:d.Children.map(n,i=>s.jsx(Ce,{present:r||a.open,children:s.jsx(sr,{asChild:!0,container:o,children:i})}))})};Fc.displayName=ha;var pn="DialogOverlay",Vc=d.forwardRef((e,t)=>{const r=Lc(pn,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=Fe(pn,e.__scopeDialog);return a.modal?s.jsx(Ce,{present:n||a.open,children:s.jsx(Kb,{...o,ref:t})}):null});Vc.displayName=pn;var Hb=dt("DialogOverlay.RemoveScroll"),Kb=d.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Fe(pn,r);return s.jsx(Mr,{as:Hb,allowPinchZoom:!0,shards:[o.contentRef],children:s.jsx(q.div,{"data-state":ba(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Pt="DialogContent",Bc=d.forwardRef((e,t)=>{const r=Lc(Pt,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=Fe(Pt,e.__scopeDialog);return s.jsx(Ce,{present:n||a.open,children:a.modal?s.jsx(Yb,{...o,ref:t}):s.jsx(Xb,{...o,ref:t})})});Bc.displayName=Pt;var Yb=d.forwardRef((e,t)=>{const r=Fe(Pt,e.__scopeDialog),n=d.useRef(null),o=ae(t,r.contentRef,n);return d.useEffect(()=>{const a=n.current;if(a)return Dn(a)},[]),s.jsx(Gc,{...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())})}),Xb=d.forwardRef((e,t)=>{const r=Fe(Pt,e.__scopeDialog),n=d.useRef(!1),o=d.useRef(!1);return s.jsx(Gc,{...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 c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Gc=d.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,l=Fe(Pt,r),c=d.useRef(null),u=ae(t,c);return Nn(),s.jsxs(s.Fragment,{children:[s.jsx(Tr,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:s.jsx(nr,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":ba(l.open),...i,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),s.jsxs(s.Fragment,{children:[s.jsx(Zb,{titleId:l.titleId}),s.jsx(Qb,{contentRef:c,descriptionId:l.descriptionId})]})]})}),xa="DialogTitle",Wc=d.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Fe(xa,r);return s.jsx(q.h2,{id:o.titleId,...n,ref:t})});Wc.displayName=xa;var zc="DialogDescription",qc=d.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Fe(zc,r);return s.jsx(q.p,{id:o.descriptionId,...n,ref:t})});qc.displayName=zc;var Uc="DialogClose",Hc=d.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Fe(Uc,r);return s.jsx(q.button,{type:"button",...n,ref:t,onClick:F(e.onClick,()=>o.onOpenChange(!1))})});Hc.displayName=Uc;function ba(e){return e?"open":"closed"}var Kc="DialogTitleWarning",[LR,Yc]=yv(Kc,{contentName:Pt,titleName:xa,docsSlug:"dialog"}),Zb=({titleId:e})=>{const t=Yc(Kc),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
201
201
|
|
|
202
202
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
203
203
|
|
|
204
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return d.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},Kb="DialogDescriptionWarning",Yb=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Hc(Kb).contentName}}.`;return d.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},Kc=Ic,Xb=Oc,Yc=$c,Xc=Lc,Zc=Fc,Zb=Bc,Jb=Wc,Jc=qc,pr='[cmdk-group=""]',Eo='[cmdk-group-items=""]',Qb='[cmdk-group-heading=""]',Qc='[cmdk-item=""]',li=`${Qc}:not([aria-disabled="true"])`,Uo="cmdk-item-select",zt="data-value",ey=(e,t,r)=>$b(e,t,r),ed=d.createContext(void 0),Or=()=>d.useContext(ed),td=d.createContext(void 0),ya=()=>d.useContext(td),rd=d.createContext(void 0),nd=d.forwardRef((e,t)=>{let r=qt(()=>{var T,G;return{search:"",value:(G=(T=e.value)!=null?T:e.defaultValue)!=null?G:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=qt(()=>new Set),o=qt(()=>new Map),a=qt(()=>new Map),i=qt(()=>new Set),l=od(e),{label:c,children:u,value:f,onValueChange:p,filter:g,shouldFilter:m,loop:b,disablePointerSelection:v=!1,vimBindings:x=!0,...y}=e,h=me(),C=me(),E=me(),j=d.useRef(null),_=uy();Tt(()=>{if(f!==void 0){let T=f.trim();r.current.value=T,P.emit()}},[f]),Tt(()=>{_(6,Q)},[]);let P=d.useMemo(()=>({subscribe:T=>(i.current.add(T),()=>i.current.delete(T)),snapshot:()=>r.current,setState:(T,G,Z)=>{var z,L,A,K;if(!Object.is(r.current[T],G)){if(r.current[T]=G,T==="search")te(),U(),_(1,re);else if(T==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ee=document.getElementById(E);ee?ee.focus():(z=document.getElementById(h))==null||z.focus()}if(_(7,()=>{var ee;r.current.selectedItemId=(ee=V())==null?void 0:ee.id,P.emit()}),Z||_(5,Q),((L=l.current)==null?void 0:L.value)!==void 0){let ee=G??"";(K=(A=l.current).onValueChange)==null||K.call(A,ee);return}}P.emit()}},emit:()=>{i.current.forEach(T=>T())}}),[]),N=d.useMemo(()=>({value:(T,G,Z)=>{var z;G!==((z=a.current.get(T))==null?void 0:z.value)&&(a.current.set(T,{value:G,keywords:Z}),r.current.filtered.items.set(T,W(G,Z)),_(2,()=>{U(),P.emit()}))},item:(T,G)=>(n.current.add(T),G&&(o.current.has(G)?o.current.get(G).add(T):o.current.set(G,new Set([T]))),_(3,()=>{te(),U(),r.current.value||re(),P.emit()}),()=>{a.current.delete(T),n.current.delete(T),r.current.filtered.items.delete(T);let Z=V();_(4,()=>{te(),(Z==null?void 0:Z.getAttribute("id"))===T&&re(),P.emit()})}),group:T=>(o.current.has(T)||o.current.set(T,new Set),()=>{a.current.delete(T),o.current.delete(T)}),filter:()=>l.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:h,inputId:E,labelId:C,listInnerRef:j}),[]);function W(T,G){var Z,z;let L=(z=(Z=l.current)==null?void 0:Z.filter)!=null?z:ey;return T?L(T,r.current.search,G):0}function U(){if(!r.current.search||l.current.shouldFilter===!1)return;let T=r.current.filtered.items,G=[];r.current.filtered.groups.forEach(z=>{let L=o.current.get(z),A=0;L.forEach(K=>{let ee=T.get(K);A=Math.max(ee,A)}),G.push([z,A])});let Z=j.current;O().sort((z,L)=>{var A,K;let ee=z.getAttribute("id"),oe=L.getAttribute("id");return((A=T.get(oe))!=null?A:0)-((K=T.get(ee))!=null?K:0)}).forEach(z=>{let L=z.closest(Eo);L?L.appendChild(z.parentElement===L?z:z.closest(`${Eo} > *`)):Z.appendChild(z.parentElement===Z?z:z.closest(`${Eo} > *`))}),G.sort((z,L)=>L[1]-z[1]).forEach(z=>{var L;let A=(L=j.current)==null?void 0:L.querySelector(`${pr}[${zt}="${encodeURIComponent(z[0])}"]`);A==null||A.parentElement.appendChild(A)})}function re(){let T=O().find(Z=>Z.getAttribute("aria-disabled")!=="true"),G=T==null?void 0:T.getAttribute(zt);P.setState("value",G||void 0)}function te(){var T,G,Z,z;if(!r.current.search||l.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let L=0;for(let A of n.current){let K=(G=(T=a.current.get(A))==null?void 0:T.value)!=null?G:"",ee=(z=(Z=a.current.get(A))==null?void 0:Z.keywords)!=null?z:[],oe=W(K,ee);r.current.filtered.items.set(A,oe),oe>0&&L++}for(let[A,K]of o.current)for(let ee of K)if(r.current.filtered.items.get(ee)>0){r.current.filtered.groups.add(A);break}r.current.filtered.count=L}function Q(){var T,G,Z;let z=V();z&&(((T=z.parentElement)==null?void 0:T.firstChild)===z&&((Z=(G=z.closest(pr))==null?void 0:G.querySelector(Qb))==null||Z.scrollIntoView({block:"nearest"})),z.scrollIntoView({block:"nearest"}))}function V(){var T;return(T=j.current)==null?void 0:T.querySelector(`${Qc}[aria-selected="true"]`)}function O(){var T;return Array.from(((T=j.current)==null?void 0:T.querySelectorAll(li))||[])}function I(T){let G=O()[T];G&&P.setState("value",G.getAttribute(zt))}function D(T){var G;let Z=V(),z=O(),L=z.findIndex(K=>K===Z),A=z[L+T];(G=l.current)!=null&&G.loop&&(A=L+T<0?z[z.length-1]:L+T===z.length?z[0]:z[L+T]),A&&P.setState("value",A.getAttribute(zt))}function R(T){let G=V(),Z=G==null?void 0:G.closest(pr),z;for(;Z&&!z;)Z=T>0?cy(Z,pr):dy(Z,pr),z=Z==null?void 0:Z.querySelector(li);z?P.setState("value",z.getAttribute(zt)):D(T)}let M=()=>I(O().length-1),B=T=>{T.preventDefault(),T.metaKey?M():T.altKey?R(1):D(1)},J=T=>{T.preventDefault(),T.metaKey?I(0):T.altKey?R(-1):D(-1)};return d.createElement(q.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:T=>{var G;(G=y.onKeyDown)==null||G.call(y,T);let Z=T.nativeEvent.isComposing||T.keyCode===229;if(!(T.defaultPrevented||Z))switch(T.key){case"n":case"j":{x&&T.ctrlKey&&B(T);break}case"ArrowDown":{B(T);break}case"p":case"k":{x&&T.ctrlKey&&J(T);break}case"ArrowUp":{J(T);break}case"Home":{T.preventDefault(),I(0);break}case"End":{T.preventDefault(),M();break}case"Enter":{T.preventDefault();let z=V();if(z){let L=new Event(Uo);z.dispatchEvent(L)}}}}},d.createElement("label",{"cmdk-label":"",htmlFor:N.inputId,id:N.labelId,style:py},c),Gn(e,T=>d.createElement(td.Provider,{value:P},d.createElement(ed.Provider,{value:N},T))))}),ty=d.forwardRef((e,t)=>{var r,n;let o=me(),a=d.useRef(null),i=d.useContext(rd),l=Or(),c=od(e),u=(n=(r=c.current)==null?void 0:r.forceMount)!=null?n:i==null?void 0:i.forceMount;Tt(()=>{if(!u)return l.item(o,i==null?void 0:i.id)},[u]);let f=ad(o,a,[e.value,e.children,a],e.keywords),p=ya(),g=pt(_=>_.value&&_.value===f.current),m=pt(_=>u||l.filter()===!1?!0:_.search?_.filtered.items.get(o)>0:!0);d.useEffect(()=>{let _=a.current;if(!(!_||e.disabled))return _.addEventListener(Uo,b),()=>_.removeEventListener(Uo,b)},[m,e.onSelect,e.disabled]);function b(){var _,P;v(),(P=(_=c.current).onSelect)==null||P.call(_,f.current)}function v(){p.setState("value",f.current,!0)}if(!m)return null;let{disabled:x,value:y,onSelect:h,forceMount:C,keywords:E,...j}=e;return d.createElement(q.div,{ref:tt(a,t),...j,id:o,"cmdk-item":"",role:"option","aria-disabled":!!x,"aria-selected":!!g,"data-disabled":!!x,"data-selected":!!g,onPointerMove:x||l.getDisablePointerSelection()?void 0:v,onClick:x?void 0:b},e.children)}),ry=d.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:o,...a}=e,i=me(),l=d.useRef(null),c=d.useRef(null),u=me(),f=Or(),p=pt(m=>o||f.filter()===!1?!0:m.search?m.filtered.groups.has(i):!0);Tt(()=>f.group(i),[]),ad(i,l,[e.value,e.heading,c]);let g=d.useMemo(()=>({id:i,forceMount:o}),[o]);return d.createElement(q.div,{ref:tt(l,t),...a,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},r&&d.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},r),Gn(e,m=>d.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?u:void 0},d.createElement(rd.Provider,{value:g},m))))}),ny=d.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,o=d.useRef(null),a=pt(i=>!i.search);return!r&&!a?null:d.createElement(q.div,{ref:tt(o,t),...n,"cmdk-separator":"",role:"separator"})}),oy=d.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,o=e.value!=null,a=ya(),i=pt(u=>u.search),l=pt(u=>u.selectedItemId),c=Or();return d.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),d.createElement(q.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":l,id:c.inputId,type:"text",value:o?e.value:i,onChange:u=>{o||a.setState("search",u.target.value),r==null||r(u.target.value)}})}),ay=d.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...o}=e,a=d.useRef(null),i=d.useRef(null),l=pt(u=>u.selectedItemId),c=Or();return d.useEffect(()=>{if(i.current&&a.current){let u=i.current,f=a.current,p,g=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{let m=u.offsetHeight;f.style.setProperty("--cmdk-list-height",m.toFixed(1)+"px")})});return g.observe(u),()=>{cancelAnimationFrame(p),g.unobserve(u)}}},[]),d.createElement(q.div,{ref:tt(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":n,id:c.listId},Gn(e,u=>d.createElement("div",{ref:tt(i,c.listInnerRef),"cmdk-list-sizer":""},u)))}),sy=d.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:o,contentClassName:a,container:i,...l}=e;return d.createElement(Kc,{open:r,onOpenChange:n},d.createElement(Yc,{container:i},d.createElement(Xc,{"cmdk-overlay":"",className:o}),d.createElement(Zc,{"aria-label":e.label,"cmdk-dialog":"",className:a},d.createElement(nd,{ref:t,...l}))))}),iy=d.forwardRef((e,t)=>pt(r=>r.filtered.count===0)?d.createElement(q.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),ly=d.forwardRef((e,t)=>{let{progress:r,children:n,label:o="Loading...",...a}=e;return d.createElement(q.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},Gn(e,i=>d.createElement("div",{"aria-hidden":!0},i)))}),It=Object.assign(nd,{List:ay,Item:ty,Input:oy,Group:ry,Separator:ny,Dialog:sy,Empty:iy,Loading:ly});function cy(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function dy(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function od(e){let t=d.useRef(e);return Tt(()=>{t.current=e}),t}var Tt=typeof window>"u"?d.useEffect:d.useLayoutEffect;function qt(e){let t=d.useRef();return t.current===void 0&&(t.current=e()),t}function pt(e){let t=ya(),r=()=>e(t.snapshot());return d.useSyncExternalStore(t.subscribe,r,r)}function ad(e,t,r,n=[]){let o=d.useRef(),a=Or();return Tt(()=>{var i;let l=(()=>{var u;for(let f of r){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(u=f.current.textContent)==null?void 0:u.trim():o.current}})(),c=n.map(u=>u.trim());a.value(e,l,c),(i=t.current)==null||i.setAttribute(zt,l),o.current=l}),o}var uy=()=>{let[e,t]=d.useState(),r=qt(()=>new Map);return Tt(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,o)=>{r.current.set(n,o),t({})}};function fy(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Gn({asChild:e,children:t},r){return e&&d.isValidElement(t)?d.cloneElement(fy(t),{ref:t.ref},r(t.props.children)):r(t)}var py={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function my({...e}){return s.jsx(Kc,{"data-slot":"dialog",...e})}function gy({...e}){return s.jsx(Xb,{"data-slot":"dialog-trigger",...e})}function sd({...e}){return s.jsx(Yc,{"data-slot":"dialog-portal",...e})}function vy({...e}){return s.jsx(Jc,{"data-slot":"dialog-close",...e})}function id({className:e,...t}){return s.jsx(Xc,{"data-slot":"dialog-overlay",className:k("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 hy({className:e,children:t,showCloseButton:r=!0,...n}){return s.jsxs(sd,{"data-slot":"dialog-portal",children:[s.jsx(id,{}),s.jsxs(Zc,{"data-slot":"dialog-content",className:k("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(Jc,{"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(Rn,{}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function xy({className:e,...t}){return s.jsx("div",{"data-slot":"dialog-header",className:k("qodo qodo-dialog-header flex flex-col gap-2 text-center sm:text-left",e),...t})}function by({className:e,...t}){return s.jsx("div",{"data-slot":"dialog-footer",className:k("qodo qodo-dialog-footer flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function yy({className:e,...t}){return s.jsx(Zb,{"data-slot":"dialog-title",className:k("qodo qodo-dialog-title text-lg leading-none font-semibold",e),...t})}function wy({className:e,...t}){return s.jsx(Jb,{"data-slot":"dialog-description",className:k("qodo qodo-dialog-description text-muted-foreground text-sm dark:text-muted-foreground",e),...t})}function ld({className:e,...t}){return s.jsx(It,{"data-slot":"command",className:k("qodo qodo-command bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}function cd({className:e,...t}){return s.jsxs("div",{"data-slot":"command-input-wrapper",className:k("qodo qodo-command-input-wrapper","flex h-9 items-center gap-2 border-b border-[var(--border-panel-neutral)] px-3 text-purple-muted-300"),children:[s.jsx(sl,{className:"size-4 shrink-0 text-purple-muted-300"}),s.jsx(It.Input,{"data-slot":"command-input",className:k("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 dd({className:e,...t}){return s.jsx(It.List,{"data-slot":"command-list",className:k("qodo qodo-command-list max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function ud({...e}){return s.jsx(It.Empty,{"data-slot":"command-empty",className:k("qodo qodo-command-empty","py-6 text-center text-sm text-purple-muted-300"),...e})}function Cy({className:e,...t}){return s.jsx(It.Loading,{"data-slot":"command-loading",className:k("qodo qodo-command-loading","py-6 text-center text-sm text-purple-muted-300",e),...t})}function fd({className:e,...t}){return s.jsx(It.Group,{"data-slot":"command-group",className:k("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 pd({className:e,...t}){return s.jsx(It.Item,{"data-slot":"command-item",className:k("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 Wn="Popover",[md,Mk]=ye(Wn,[mt]),Dr=mt(),[Sy,ht]=md(Wn),gd=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,l=Dr(t),c=d.useRef(null),[u,f]=d.useState(!1),[p,g]=be({prop:n,defaultProp:o??!1,onChange:a,caller:Wn});return s.jsx(Ar,{...l,children:s.jsx(Sy,{scope:t,contentId:me(),triggerRef:c,open:p,onOpenChange:g,onOpenToggle:d.useCallback(()=>g(m=>!m),[g]),hasCustomAnchor:u,onCustomAnchorAdd:d.useCallback(()=>f(!0),[]),onCustomAnchorRemove:d.useCallback(()=>f(!1),[]),modal:i,children:r})})};gd.displayName=Wn;var vd="PopoverAnchor",Ey=d.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=ht(vd,r),a=Dr(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:l}=o;return d.useEffect(()=>(i(),()=>l()),[i,l]),s.jsx(Ir,{...a,...n,ref:t})});Ey.displayName=vd;var hd="PopoverTrigger",xd=d.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=ht(hd,r),a=Dr(r),i=ae(t,o.triggerRef),l=s.jsx(q.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Sd(o.open),...n,ref:i,onClick:F(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:s.jsx(Ir,{asChild:!0,...a,children:l})});xd.displayName=hd;var wa="PopoverPortal",[Ry,ky]=md(wa,{forceMount:void 0}),bd=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,a=ht(wa,t);return s.jsx(Ry,{scope:t,forceMount:r,children:s.jsx(Ce,{present:r||a.open,children:s.jsx(sr,{asChild:!0,container:o,children:n})})})};bd.displayName=wa;var Xt="PopoverContent",yd=d.forwardRef((e,t)=>{const r=ky(Xt,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,a=ht(Xt,e.__scopePopover);return s.jsx(Ce,{present:n||a.open,children:a.modal?s.jsx(jy,{...o,ref:t}):s.jsx(Py,{...o,ref:t})})});yd.displayName=Xt;var Ny=dt("PopoverContent.RemoveScroll"),jy=d.forwardRef((e,t)=>{const r=ht(Xt,e.__scopePopover),n=d.useRef(null),o=ae(t,n),a=d.useRef(!1);return d.useEffect(()=>{const i=n.current;if(i)return Dn(i)},[]),s.jsx(Mr,{as:Ny,allowPinchZoom:!0,children:s.jsx(wd,{...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,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:F(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Py=d.forwardRef((e,t)=>{const r=ht(Xt,e.__scopePopover),n=d.useRef(!1),o=d.useRef(!1);return s.jsx(wd,{...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 c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),wd=d.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:f,...p}=e,g=ht(Xt,r),m=Dr(r);return Nn(),s.jsx(Tr,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:s.jsx(nr,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>g.onOpenChange(!1),children:s.jsx(In,{"data-state":Sd(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)"}})})})}),Cd="PopoverClose",Ty=d.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=ht(Cd,r);return s.jsx(q.button,{type:"button",...n,ref:t,onClick:F(e.onClick,()=>o.onOpenChange(!1))})});Ty.displayName=Cd;var _y="PopoverArrow",Ay=d.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Dr(r);return s.jsx(Mn,{...o,...n,ref:t})});Ay.displayName=_y;function Sd(e){return e?"open":"closed"}var Iy=gd,My=xd,Oy=bd,Dy=yd;function Ca({...e}){return s.jsx(Iy,{"data-slot":"popover",...e})}function Sa({...e}){return s.jsx(My,{"data-slot":"popover-trigger",...e})}function Ea({className:e,align:t="center",sideOffset:r=4,...n}){return s.jsx(Oy,{children:s.jsx(Dy,{"data-slot":"popover-content",align:t,sideOffset:r,className:k("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 Ra=d.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:c=!1,className:u,onSearchChange:f,isLoading:p=!1,loadingText:g="Loading...",...m},b)=>{const[v,x]=d.useState(!1),[y,h]=d.useState(""),[C,E]=d.useState(0),j=d.useRef(null),_=e.find(N=>N.value===t),P=N=>{h(N),f==null||f(N)};return d.useEffect(()=>{j.current&&E(j.current.offsetWidth)},[]),s.jsxs(Ca,{open:l?!1:v,onOpenChange:x,children:[s.jsx(Sa,{asChild:!0,children:s.jsxs(et,{ref:N=>{typeof b=="function"?b(N):b&&(b.current=N),j.current=N},variant:"outline",role:"combobox","aria-expanded":v,"aria-invalid":c||void 0,"data-readonly":l||void 0,className:k("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":!_},u),disabled:i,...m,children:[_?_.label:n,s.jsx(Gg,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),s.jsx(Ea,{className:"p-0 border bg-[var(--fill-interactive-neutral-idle)] border-purple-muted-500 text-purple-muted-300",style:{width:C>0?`${C}px`:"auto"},children:s.jsxs(ld,{className:"w-full bg-[var(--fill-interactive-neutral-idle)]",shouldFilter:!f,children:[s.jsx(cd,{placeholder:o,...!!f&&{value:y,onValueChange:P}}),s.jsx(dd,{children:p?s.jsx(Cy,{children:g}):s.jsxs(s.Fragment,{children:[s.jsx(ud,{className:"flex justify-center items-center p-6 text-center text-sm text-purple-muted-300",children:a}),s.jsx(fd,{children:e.map(N=>{const W=t===N.value;return s.jsxs(pd,{value:N.value,keywords:[N.label],disabled:N.disabled,className:k("text-purple-100 hover:bg-purple-muted-500","focus:bg-purple-muted-500 focus:text-purple-100",{"bg-purple-muted-500":W}),onSelect:U=>{U!==t&&(r==null||r(U===t?"":U)),x(!1)},children:[s.jsx(rr,{className:k("mr-2 h-4 w-4",{"opacity-100":W,"opacity-0":!W})}),N.label]},N.value)})})]})})]})})]})});Ra.displayName="Combobox";const $y=Qt("qodo qodo-badge inline-flex items-center dark:font-normal border transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 font-light gap-1",{variants:{variant:{default:"border-[var(--border-tag-emphasis-idle)] bg-[var(--fill-tag-emphasis-idle)] text-[var(--text-tag-emphasis-idle)] hover:text-[var(--text-tag-emphasis-hover)] hover:bg-[var(--fill-tag-emphasis-hover)] hover:border-[var(--border-tag-emphasis-hover)] aria-active:text-[var(--text-tag-emphasis-active)] aria-active:bg-[var(--fill-tag-emphasis-active)] aria-active:border-[var(--border-tag-emphasis-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-emphasis-disabled)] aria-disabled:bg-[var(--fill-tag-emphasis-disabled)] aria-disabled:border-[var(--border-tag-emphasis-disabled)] ",primary:"border-[var(--border-tag-emphasis-idle)] bg-[var(--fill-tag-emphasis-idle)] text-[var(--text-tag-emphasis-idle)] hover:text-[var(--text-tag-emphasis-hover)] hover:bg-[var(--fill-tag-emphasis-hover)] hover:border-[var(--border-tag-emphasis-hover)] aria-active:text-[var(--text-tag-emphasis-active)] aria-active:bg-[var(--fill-tag-emphasis-active)] aria-active:border-[var(--border-tag-emphasis-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-emphasis-disabled)] aria-disabled:bg-[var(--fill-tag-emphasis-disabled)] aria-disabled:border-[var(--border-tag-emphasis-disabled)] ",secondary:"border-purple-muted-600 text-purple-300",destructive:"border-[var(--border-tag-negative-idle)] bg-[var(--fill-tag-negative-idle)] text-[var(--text-tag-negative-idle)] hover:text-[var(--text-tag-negative-hover)] hover:bg-[var(--fill-tag-negative-hover)] hover:border-[var(--border-tag-negative-hover)] aria-active:text-[var(--text-tag-negative-active)] aria-active:bg-[var(--fill-tag-negative-active)] aria-active:border-[var(--border-tag-negative-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-negative-disabled)] aria-disabled:bg-[var(--fill-tag-negative-disabled)] aria-disabled:border-[var(--border-tag-negative-disabled)] ",outline:"border-[var(--border-tag-neutral-idle)] bg-[var(--fill-tag-neutral-idle)] text-[var(--text-tag-neutral-idle)] hover:text-[var(--text-tag-neutral-hover)] hover:bg-[var(--fill-tag-neutral-hover)] hover:border-[var(--border-tag-neutral-hover)] aria-active:text-[var(--text-tag-neutral-active)] aria-active:bg-[var(--fill-tag-neutral-active)] aria-active:border-[var(--border-tag-neutral-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-neutral-disabled)] aria-disabled:bg-[var(--fill-tag-neutral-disabled)] aria-disabled:border-[var(--border-tag-neutral-disabled)] ",success:"text-[var(--text-tag-positive-idle)] bg-[var(--fill-tag-positive-idle)] border-[var(--border-tag-positive-idle)] hover:text-[var(--text-tag-positive-hover)] hover:bg-[var(--fill-tag-positive-hover)] hover:border-[var(--border-tag-positive-hover)] aria-active:text-[var(--text-tag-positive-active)] aria-active:bg-[var(--fill-tag-positive-active)] aria-active:border-[var(--border-tag-positive-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-positive-disabled)] aria-disabled:bg-[var(--fill-tag-positive-disabled)] aria-disabled:border-[var(--border-tag-positive-disabled)] ",error:"border-[var(--border-tag-negative-idle)] bg-[var(--fill-tag-negative-idle)] text-[var(--text-tag-negative-idle)] hover:text-[var(--text-tag-negative-hover)] hover:bg-[var(--fill-tag-negative-hover)] hover:border-[var(--border-tag-negative-hover)] aria-active:text-[var(--text-tag-negative-active)] aria-active:bg-[var(--fill-tag-negative-active)] aria-active:border-[var(--border-tag-negative-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-negative-disabled)] aria-disabled:bg-[var(--fill-tag-negative-disabled)] aria-disabled:border-[var(--border-tag-negative-disabled)] ",pending:"border-[var(--border-tag-emphasis-idle)] bg-[var(--fill-tag-emphasis-idle)] text-[var(--text-tag-emphasis-idle)] hover:text-[var(--text-tag-emphasis-hover)] hover:bg-[var(--fill-tag-emphasis-hover)] hover:border-[var(--border-tag-emphasis-hover)] aria-active:text-[var(--text-tag-emphasis-active)] aria-active:bg-[var(--fill-tag-emphasis-active)] aria-active:border-[var(--border-tag-emphasis-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-emphasis-disabled)] aria-disabled:bg-[var(--fill-tag-emphasis-disabled)] aria-disabled:border-[var(--border-tag-emphasis-disabled)] ",warning:"border-[var(--border-tag-warning-idle)] bg-[var(--fill-tag-warning-idle)] text-[var(--text-tag-warning-idle)] hover:text-[var(--text-tag-warning-hover)] hover:bg-[var(--fill-tag-warning-hover)] hover:border-[var(--border-tag-warning-hover)] aria-active:text-[var(--text-tag-warning-active)] aria-active:bg-[var(--fill-tag-warning-active)] aria-active:border-[var(--border-tag-warning-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-warning-disabled)] aria-disabled:bg-[var(--fill-tag-warning-disabled)] aria-disabled:border-[var(--border-tag-warning-disabled)] ",text:"bg-transparent border-transparent text-primary-foreground !p-0"},size:{xs:"text-[10px] px-1.5 py-0.5 rounded-sm bg-transparent hover:bg-transparent aria-disabled:bg-transparent aria-active:bg-transparent",sm:"text-xs px-2.5 py-0.5 rounded-full",md:"text-sm px-2.5 py-0.5 rounded-full",lg:"text-base px-2.5 py-2 rounded-full"}},defaultVariants:{variant:"default",size:"sm"}});function Zt({className:e,variant:t,size:r,disabled:n=!1,active:o=!1,...a}){return s.jsx("div",{"aria-disabled":n,"aria-active":o,className:k($y({variant:t,size:r}),e),...a})}function Ed({className:e,...t}){return s.jsx("div",{"data-slot":"card",className:k("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 Rd({className:e,...t}){return s.jsx("div",{"data-slot":"card-header",className:k("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 kd({className:e,...t}){return s.jsx("div",{"data-slot":"card-title",className:k("qodo qodo-card-title leading-none font-semibold",e),...t})}function Nd({className:e,...t}){return s.jsx("div",{"data-slot":"card-description",className:k("qodo qodo-card-description text-muted-foreground text-sm dark:text-muted-foreground",e),...t})}function Ly({className:e,...t}){return s.jsx("div",{"data-slot":"card-action",className:k("qodo qodo-card-action col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...t})}function jd({className:e,...t}){return s.jsx("div",{"data-slot":"card-content",className:k("qodo qodo-card-content px-6",e),...t})}function Fy({className:e,...t}){return s.jsx("div",{"data-slot":"card-footer",className:k("qodo qodo-card-footer flex items-center px-6 [.border-t]:pt-6",e),...t})}var ka="Progress",Na=100,[Vy,Ok]=ye(ka),[By,Gy]=Vy(ka),Pd=d.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:o,getValueLabel:a=Wy,...i}=e;(o||o===0)&&!ci(o)&&console.error(zy(`${o}`,"Progress"));const l=ci(o)?o:Na;n!==null&&!di(n,l)&&console.error(qy(`${n}`,"Progress"));const c=di(n,l)?n:null,u=mn(c)?a(c,l):void 0;return s.jsx(By,{scope:r,value:c,max:l,children:s.jsx(q.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":mn(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":Ad(c,l),"data-value":c??void 0,"data-max":l,...i,ref:t})})});Pd.displayName=ka;var Td="ProgressIndicator",_d=d.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,o=Gy(Td,r);return s.jsx(q.div,{"data-state":Ad(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...n,ref:t})});_d.displayName=Td;function Wy(e,t){return`${Math.round(e/t*100)}%`}function Ad(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function mn(e){return typeof e=="number"}function ci(e){return mn(e)&&!isNaN(e)&&e>0}function di(e,t){return mn(e)&&!isNaN(e)&&e<=t&&e>=0}function zy(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Na}\`.`}function qy(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
204
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return d.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},Jb="DialogDescriptionWarning",Qb=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Yc(Jb).contentName}}.`;return d.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},Xc=Oc,ey=$c,Zc=Fc,Jc=Vc,Qc=Bc,ty=Wc,ry=qc,ed=Hc,pr='[cmdk-group=""]',Eo='[cmdk-group-items=""]',ny='[cmdk-group-heading=""]',td='[cmdk-item=""]',ci=`${td}:not([aria-disabled="true"])`,Uo="cmdk-item-select",qt="data-value",oy=(e,t,r)=>Bb(e,t,r),rd=d.createContext(void 0),Or=()=>d.useContext(rd),nd=d.createContext(void 0),ya=()=>d.useContext(nd),od=d.createContext(void 0),ad=d.forwardRef((e,t)=>{let r=Ut(()=>{var T,G;return{search:"",value:(G=(T=e.value)!=null?T:e.defaultValue)!=null?G:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=Ut(()=>new Set),o=Ut(()=>new Map),a=Ut(()=>new Map),i=Ut(()=>new Set),l=sd(e),{label:c,children:u,value:f,onValueChange:p,filter:g,shouldFilter:m,loop:b,disablePointerSelection:v=!1,vimBindings:x=!0,...y}=e,h=me(),C=me(),E=me(),j=d.useRef(null),_=gy();Tt(()=>{if(f!==void 0){let T=f.trim();r.current.value=T,P.emit()}},[f]),Tt(()=>{_(6,Q)},[]);let P=d.useMemo(()=>({subscribe:T=>(i.current.add(T),()=>i.current.delete(T)),snapshot:()=>r.current,setState:(T,G,Z)=>{var z,L,A,K;if(!Object.is(r.current[T],G)){if(r.current[T]=G,T==="search")te(),U(),_(1,re);else if(T==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ee=document.getElementById(E);ee?ee.focus():(z=document.getElementById(h))==null||z.focus()}if(_(7,()=>{var ee;r.current.selectedItemId=(ee=V())==null?void 0:ee.id,P.emit()}),Z||_(5,Q),((L=l.current)==null?void 0:L.value)!==void 0){let ee=G??"";(K=(A=l.current).onValueChange)==null||K.call(A,ee);return}}P.emit()}},emit:()=>{i.current.forEach(T=>T())}}),[]),N=d.useMemo(()=>({value:(T,G,Z)=>{var z;G!==((z=a.current.get(T))==null?void 0:z.value)&&(a.current.set(T,{value:G,keywords:Z}),r.current.filtered.items.set(T,W(G,Z)),_(2,()=>{U(),P.emit()}))},item:(T,G)=>(n.current.add(T),G&&(o.current.has(G)?o.current.get(G).add(T):o.current.set(G,new Set([T]))),_(3,()=>{te(),U(),r.current.value||re(),P.emit()}),()=>{a.current.delete(T),n.current.delete(T),r.current.filtered.items.delete(T);let Z=V();_(4,()=>{te(),(Z==null?void 0:Z.getAttribute("id"))===T&&re(),P.emit()})}),group:T=>(o.current.has(T)||o.current.set(T,new Set),()=>{a.current.delete(T),o.current.delete(T)}),filter:()=>l.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:h,inputId:E,labelId:C,listInnerRef:j}),[]);function W(T,G){var Z,z;let L=(z=(Z=l.current)==null?void 0:Z.filter)!=null?z:oy;return T?L(T,r.current.search,G):0}function U(){if(!r.current.search||l.current.shouldFilter===!1)return;let T=r.current.filtered.items,G=[];r.current.filtered.groups.forEach(z=>{let L=o.current.get(z),A=0;L.forEach(K=>{let ee=T.get(K);A=Math.max(ee,A)}),G.push([z,A])});let Z=j.current;O().sort((z,L)=>{var A,K;let ee=z.getAttribute("id"),oe=L.getAttribute("id");return((A=T.get(oe))!=null?A:0)-((K=T.get(ee))!=null?K:0)}).forEach(z=>{let L=z.closest(Eo);L?L.appendChild(z.parentElement===L?z:z.closest(`${Eo} > *`)):Z.appendChild(z.parentElement===Z?z:z.closest(`${Eo} > *`))}),G.sort((z,L)=>L[1]-z[1]).forEach(z=>{var L;let A=(L=j.current)==null?void 0:L.querySelector(`${pr}[${qt}="${encodeURIComponent(z[0])}"]`);A==null||A.parentElement.appendChild(A)})}function re(){let T=O().find(Z=>Z.getAttribute("aria-disabled")!=="true"),G=T==null?void 0:T.getAttribute(qt);P.setState("value",G||void 0)}function te(){var T,G,Z,z;if(!r.current.search||l.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let L=0;for(let A of n.current){let K=(G=(T=a.current.get(A))==null?void 0:T.value)!=null?G:"",ee=(z=(Z=a.current.get(A))==null?void 0:Z.keywords)!=null?z:[],oe=W(K,ee);r.current.filtered.items.set(A,oe),oe>0&&L++}for(let[A,K]of o.current)for(let ee of K)if(r.current.filtered.items.get(ee)>0){r.current.filtered.groups.add(A);break}r.current.filtered.count=L}function Q(){var T,G,Z;let z=V();z&&(((T=z.parentElement)==null?void 0:T.firstChild)===z&&((Z=(G=z.closest(pr))==null?void 0:G.querySelector(ny))==null||Z.scrollIntoView({block:"nearest"})),z.scrollIntoView({block:"nearest"}))}function V(){var T;return(T=j.current)==null?void 0:T.querySelector(`${td}[aria-selected="true"]`)}function O(){var T;return Array.from(((T=j.current)==null?void 0:T.querySelectorAll(ci))||[])}function I(T){let G=O()[T];G&&P.setState("value",G.getAttribute(qt))}function D(T){var G;let Z=V(),z=O(),L=z.findIndex(K=>K===Z),A=z[L+T];(G=l.current)!=null&&G.loop&&(A=L+T<0?z[z.length-1]:L+T===z.length?z[0]:z[L+T]),A&&P.setState("value",A.getAttribute(qt))}function k(T){let G=V(),Z=G==null?void 0:G.closest(pr),z;for(;Z&&!z;)Z=T>0?py(Z,pr):my(Z,pr),z=Z==null?void 0:Z.querySelector(ci);z?P.setState("value",z.getAttribute(qt)):D(T)}let M=()=>I(O().length-1),B=T=>{T.preventDefault(),T.metaKey?M():T.altKey?k(1):D(1)},J=T=>{T.preventDefault(),T.metaKey?I(0):T.altKey?k(-1):D(-1)};return d.createElement(q.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:T=>{var G;(G=y.onKeyDown)==null||G.call(y,T);let Z=T.nativeEvent.isComposing||T.keyCode===229;if(!(T.defaultPrevented||Z))switch(T.key){case"n":case"j":{x&&T.ctrlKey&&B(T);break}case"ArrowDown":{B(T);break}case"p":case"k":{x&&T.ctrlKey&&J(T);break}case"ArrowUp":{J(T);break}case"Home":{T.preventDefault(),I(0);break}case"End":{T.preventDefault(),M();break}case"Enter":{T.preventDefault();let z=V();if(z){let L=new Event(Uo);z.dispatchEvent(L)}}}}},d.createElement("label",{"cmdk-label":"",htmlFor:N.inputId,id:N.labelId,style:hy},c),Gn(e,T=>d.createElement(nd.Provider,{value:P},d.createElement(rd.Provider,{value:N},T))))}),ay=d.forwardRef((e,t)=>{var r,n;let o=me(),a=d.useRef(null),i=d.useContext(od),l=Or(),c=sd(e),u=(n=(r=c.current)==null?void 0:r.forceMount)!=null?n:i==null?void 0:i.forceMount;Tt(()=>{if(!u)return l.item(o,i==null?void 0:i.id)},[u]);let f=id(o,a,[e.value,e.children,a],e.keywords),p=ya(),g=pt(_=>_.value&&_.value===f.current),m=pt(_=>u||l.filter()===!1?!0:_.search?_.filtered.items.get(o)>0:!0);d.useEffect(()=>{let _=a.current;if(!(!_||e.disabled))return _.addEventListener(Uo,b),()=>_.removeEventListener(Uo,b)},[m,e.onSelect,e.disabled]);function b(){var _,P;v(),(P=(_=c.current).onSelect)==null||P.call(_,f.current)}function v(){p.setState("value",f.current,!0)}if(!m)return null;let{disabled:x,value:y,onSelect:h,forceMount:C,keywords:E,...j}=e;return d.createElement(q.div,{ref:tt(a,t),...j,id:o,"cmdk-item":"",role:"option","aria-disabled":!!x,"aria-selected":!!g,"data-disabled":!!x,"data-selected":!!g,onPointerMove:x||l.getDisablePointerSelection()?void 0:v,onClick:x?void 0:b},e.children)}),sy=d.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:o,...a}=e,i=me(),l=d.useRef(null),c=d.useRef(null),u=me(),f=Or(),p=pt(m=>o||f.filter()===!1?!0:m.search?m.filtered.groups.has(i):!0);Tt(()=>f.group(i),[]),id(i,l,[e.value,e.heading,c]);let g=d.useMemo(()=>({id:i,forceMount:o}),[o]);return d.createElement(q.div,{ref:tt(l,t),...a,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},r&&d.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},r),Gn(e,m=>d.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?u:void 0},d.createElement(od.Provider,{value:g},m))))}),iy=d.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,o=d.useRef(null),a=pt(i=>!i.search);return!r&&!a?null:d.createElement(q.div,{ref:tt(o,t),...n,"cmdk-separator":"",role:"separator"})}),ly=d.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,o=e.value!=null,a=ya(),i=pt(u=>u.search),l=pt(u=>u.selectedItemId),c=Or();return d.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),d.createElement(q.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":l,id:c.inputId,type:"text",value:o?e.value:i,onChange:u=>{o||a.setState("search",u.target.value),r==null||r(u.target.value)}})}),cy=d.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...o}=e,a=d.useRef(null),i=d.useRef(null),l=pt(u=>u.selectedItemId),c=Or();return d.useEffect(()=>{if(i.current&&a.current){let u=i.current,f=a.current,p,g=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{let m=u.offsetHeight;f.style.setProperty("--cmdk-list-height",m.toFixed(1)+"px")})});return g.observe(u),()=>{cancelAnimationFrame(p),g.unobserve(u)}}},[]),d.createElement(q.div,{ref:tt(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":n,id:c.listId},Gn(e,u=>d.createElement("div",{ref:tt(i,c.listInnerRef),"cmdk-list-sizer":""},u)))}),dy=d.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:o,contentClassName:a,container:i,...l}=e;return d.createElement(Xc,{open:r,onOpenChange:n},d.createElement(Zc,{container:i},d.createElement(Jc,{"cmdk-overlay":"",className:o}),d.createElement(Qc,{"aria-label":e.label,"cmdk-dialog":"",className:a},d.createElement(ad,{ref:t,...l}))))}),uy=d.forwardRef((e,t)=>pt(r=>r.filtered.count===0)?d.createElement(q.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),fy=d.forwardRef((e,t)=>{let{progress:r,children:n,label:o="Loading...",...a}=e;return d.createElement(q.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},Gn(e,i=>d.createElement("div",{"aria-hidden":!0},i)))}),Mt=Object.assign(ad,{List:cy,Item:ay,Input:ly,Group:sy,Separator:iy,Dialog:dy,Empty:uy,Loading:fy});function py(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function my(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function sd(e){let t=d.useRef(e);return Tt(()=>{t.current=e}),t}var Tt=typeof window>"u"?d.useEffect:d.useLayoutEffect;function Ut(e){let t=d.useRef();return t.current===void 0&&(t.current=e()),t}function pt(e){let t=ya(),r=()=>e(t.snapshot());return d.useSyncExternalStore(t.subscribe,r,r)}function id(e,t,r,n=[]){let o=d.useRef(),a=Or();return Tt(()=>{var i;let l=(()=>{var u;for(let f of r){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(u=f.current.textContent)==null?void 0:u.trim():o.current}})(),c=n.map(u=>u.trim());a.value(e,l,c),(i=t.current)==null||i.setAttribute(qt,l),o.current=l}),o}var gy=()=>{let[e,t]=d.useState(),r=Ut(()=>new Map);return Tt(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,o)=>{r.current.set(n,o),t({})}};function vy(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Gn({asChild:e,children:t},r){return e&&d.isValidElement(t)?d.cloneElement(vy(t),{ref:t.ref},r(t.props.children)):r(t)}var hy={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function xy({...e}){return s.jsx(Xc,{"data-slot":"dialog",...e})}function by({...e}){return s.jsx(ey,{"data-slot":"dialog-trigger",...e})}function ld({...e}){return s.jsx(Zc,{"data-slot":"dialog-portal",...e})}function yy({...e}){return s.jsx(ed,{"data-slot":"dialog-close",...e})}function cd({className:e,...t}){return s.jsx(Jc,{"data-slot":"dialog-overlay",className:R("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 wy({className:e,children:t,showCloseButton:r=!0,...n}){return s.jsxs(ld,{"data-slot":"dialog-portal",children:[s.jsx(cd,{}),s.jsxs(Qc,{"data-slot":"dialog-content",className:R("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(ed,{"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(kn,{}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Cy({className:e,...t}){return s.jsx("div",{"data-slot":"dialog-header",className:R("qodo qodo-dialog-header flex flex-col gap-2 text-center sm:text-left",e),...t})}function Sy({className:e,...t}){return s.jsx("div",{"data-slot":"dialog-footer",className:R("qodo qodo-dialog-footer flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function Ey({className:e,...t}){return s.jsx(ty,{"data-slot":"dialog-title",className:R("qodo qodo-dialog-title text-lg leading-none font-semibold",e),...t})}function ky({className:e,...t}){return s.jsx(ry,{"data-slot":"dialog-description",className:R("qodo qodo-dialog-description text-muted-foreground text-sm dark:text-muted-foreground",e),...t})}function dd({className:e,...t}){return s.jsx(Mt,{"data-slot":"command",className:R("qodo qodo-command bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}function ud({className:e,...t}){return s.jsxs("div",{"data-slot":"command-input-wrapper",className:R("qodo qodo-command-input-wrapper","flex h-9 items-center gap-2 border-b border-[var(--border-panel-neutral)] px-3 text-purple-muted-300"),children:[s.jsx(ll,{className:"size-4 shrink-0 text-purple-muted-300"}),s.jsx(Mt.Input,{"data-slot":"command-input",className:R("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 fd({className:e,...t}){return s.jsx(Mt.List,{"data-slot":"command-list",className:R("qodo qodo-command-list max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function pd({...e}){return s.jsx(Mt.Empty,{"data-slot":"command-empty",className:R("qodo qodo-command-empty","py-6 text-center text-sm text-purple-muted-300"),...e})}function Ry({className:e,...t}){return s.jsx(Mt.Loading,{"data-slot":"command-loading",className:R("qodo qodo-command-loading","py-6 text-center text-sm text-purple-muted-300",e),...t})}function md({className:e,...t}){return s.jsx(Mt.Group,{"data-slot":"command-group",className:R("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 gd({className:e,...t}){return s.jsx(Mt.Item,{"data-slot":"command-item",className:R("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 Wn="Popover",[vd,FR]=ye(Wn,[mt]),Dr=mt(),[Ny,ht]=vd(Wn),hd=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,l=Dr(t),c=d.useRef(null),[u,f]=d.useState(!1),[p,g]=be({prop:n,defaultProp:o??!1,onChange:a,caller:Wn});return s.jsx(Ar,{...l,children:s.jsx(Ny,{scope:t,contentId:me(),triggerRef:c,open:p,onOpenChange:g,onOpenToggle:d.useCallback(()=>g(m=>!m),[g]),hasCustomAnchor:u,onCustomAnchorAdd:d.useCallback(()=>f(!0),[]),onCustomAnchorRemove:d.useCallback(()=>f(!1),[]),modal:i,children:r})})};hd.displayName=Wn;var xd="PopoverAnchor",jy=d.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=ht(xd,r),a=Dr(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:l}=o;return d.useEffect(()=>(i(),()=>l()),[i,l]),s.jsx(Ir,{...a,...n,ref:t})});jy.displayName=xd;var bd="PopoverTrigger",yd=d.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=ht(bd,r),a=Dr(r),i=ae(t,o.triggerRef),l=s.jsx(q.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":kd(o.open),...n,ref:i,onClick:F(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:s.jsx(Ir,{asChild:!0,...a,children:l})});yd.displayName=bd;var wa="PopoverPortal",[Py,Ty]=vd(wa,{forceMount:void 0}),wd=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,a=ht(wa,t);return s.jsx(Py,{scope:t,forceMount:r,children:s.jsx(Ce,{present:r||a.open,children:s.jsx(sr,{asChild:!0,container:o,children:n})})})};wd.displayName=wa;var Zt="PopoverContent",Cd=d.forwardRef((e,t)=>{const r=Ty(Zt,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,a=ht(Zt,e.__scopePopover);return s.jsx(Ce,{present:n||a.open,children:a.modal?s.jsx(Ay,{...o,ref:t}):s.jsx(Iy,{...o,ref:t})})});Cd.displayName=Zt;var _y=dt("PopoverContent.RemoveScroll"),Ay=d.forwardRef((e,t)=>{const r=ht(Zt,e.__scopePopover),n=d.useRef(null),o=ae(t,n),a=d.useRef(!1);return d.useEffect(()=>{const i=n.current;if(i)return Dn(i)},[]),s.jsx(Mr,{as:_y,allowPinchZoom:!0,children:s.jsx(Sd,{...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,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:F(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Iy=d.forwardRef((e,t)=>{const r=ht(Zt,e.__scopePopover),n=d.useRef(!1),o=d.useRef(!1);return s.jsx(Sd,{...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 c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Sd=d.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:f,...p}=e,g=ht(Zt,r),m=Dr(r);return Nn(),s.jsx(Tr,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:s.jsx(nr,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>g.onOpenChange(!1),children:s.jsx(In,{"data-state":kd(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)"}})})})}),Ed="PopoverClose",My=d.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=ht(Ed,r);return s.jsx(q.button,{type:"button",...n,ref:t,onClick:F(e.onClick,()=>o.onOpenChange(!1))})});My.displayName=Ed;var Oy="PopoverArrow",Dy=d.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Dr(r);return s.jsx(Mn,{...o,...n,ref:t})});Dy.displayName=Oy;function kd(e){return e?"open":"closed"}var $y=hd,Ly=yd,Fy=wd,Vy=Cd;function Ca({...e}){return s.jsx($y,{"data-slot":"popover",...e})}function Sa({...e}){return s.jsx(Ly,{"data-slot":"popover-trigger",...e})}function Ea({className:e,align:t="center",sideOffset:r=4,...n}){return s.jsx(Fy,{children:s.jsx(Vy,{"data-slot":"popover-content",align:t,sideOffset:r,className:R("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 ka=d.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:c=!1,className:u,onSearchChange:f,isLoading:p=!1,loadingText:g="Loading...",...m},b)=>{const[v,x]=d.useState(!1),[y,h]=d.useState(""),[C,E]=d.useState(0),j=d.useRef(null),_=e.find(N=>N.value===t),P=N=>{h(N),f==null||f(N)};return d.useEffect(()=>{j.current&&E(j.current.offsetWidth)},[]),s.jsxs(Ca,{open:l?!1:v,onOpenChange:x,children:[s.jsx(Sa,{asChild:!0,children:s.jsxs(et,{ref:N=>{typeof b=="function"?b(N):b&&(b.current=N),j.current=N},variant:"outline",role:"combobox","aria-expanded":v,"aria-invalid":c||void 0,"data-readonly":l||void 0,className:R("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":!_},u),disabled:i,...m,children:[_?_.label:n,s.jsx(Ug,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),s.jsx(Ea,{className:"p-0 border bg-[var(--fill-interactive-neutral-idle)] border-purple-muted-500 text-purple-muted-300",style:{width:C>0?`${C}px`:"auto"},children:s.jsxs(dd,{className:"w-full bg-[var(--fill-interactive-neutral-idle)]",shouldFilter:!f,children:[s.jsx(ud,{placeholder:o,...!!f&&{value:y,onValueChange:P}}),s.jsx(fd,{children:p?s.jsx(Ry,{children:g}):s.jsxs(s.Fragment,{children:[s.jsx(pd,{className:"flex justify-center items-center p-6 text-center text-sm text-purple-muted-300",children:a}),s.jsx(md,{children:e.map(N=>{const W=t===N.value;return s.jsxs(gd,{value:N.value,keywords:[N.label],disabled:N.disabled,className:R("text-purple-100 hover:bg-purple-muted-500","focus:bg-purple-muted-500 focus:text-purple-100",{"bg-purple-muted-500":W}),onSelect:U=>{U!==t&&(r==null||r(U===t?"":U)),x(!1)},children:[s.jsx(rr,{className:R("mr-2 h-4 w-4",{"opacity-100":W,"opacity-0":!W})}),N.label]},N.value)})})]})})]})})]})});ka.displayName="Combobox";const By=At("qodo qodo-badge inline-flex items-center dark:font-normal border transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 font-light gap-1",{variants:{variant:{default:"border-[var(--border-tag-emphasis-idle)] bg-[var(--fill-tag-emphasis-idle)] text-[var(--text-tag-emphasis-idle)] hover:text-[var(--text-tag-emphasis-hover)] hover:bg-[var(--fill-tag-emphasis-hover)] hover:border-[var(--border-tag-emphasis-hover)] aria-active:text-[var(--text-tag-emphasis-active)] aria-active:bg-[var(--fill-tag-emphasis-active)] aria-active:border-[var(--border-tag-emphasis-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-emphasis-disabled)] aria-disabled:bg-[var(--fill-tag-emphasis-disabled)] aria-disabled:border-[var(--border-tag-emphasis-disabled)] ",primary:"border-[var(--border-tag-emphasis-idle)] bg-[var(--fill-tag-emphasis-idle)] text-[var(--text-tag-emphasis-idle)] hover:text-[var(--text-tag-emphasis-hover)] hover:bg-[var(--fill-tag-emphasis-hover)] hover:border-[var(--border-tag-emphasis-hover)] aria-active:text-[var(--text-tag-emphasis-active)] aria-active:bg-[var(--fill-tag-emphasis-active)] aria-active:border-[var(--border-tag-emphasis-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-emphasis-disabled)] aria-disabled:bg-[var(--fill-tag-emphasis-disabled)] aria-disabled:border-[var(--border-tag-emphasis-disabled)] ",secondary:"border-purple-muted-600 text-purple-300",destructive:"border-[var(--border-tag-negative-idle)] bg-[var(--fill-tag-negative-idle)] text-[var(--text-tag-negative-idle)] hover:text-[var(--text-tag-negative-hover)] hover:bg-[var(--fill-tag-negative-hover)] hover:border-[var(--border-tag-negative-hover)] aria-active:text-[var(--text-tag-negative-active)] aria-active:bg-[var(--fill-tag-negative-active)] aria-active:border-[var(--border-tag-negative-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-negative-disabled)] aria-disabled:bg-[var(--fill-tag-negative-disabled)] aria-disabled:border-[var(--border-tag-negative-disabled)] ",outline:"border-[var(--border-tag-neutral-idle)] bg-[var(--fill-tag-neutral-idle)] text-[var(--text-tag-neutral-idle)] hover:text-[var(--text-tag-neutral-hover)] hover:bg-[var(--fill-tag-neutral-hover)] hover:border-[var(--border-tag-neutral-hover)] aria-active:text-[var(--text-tag-neutral-active)] aria-active:bg-[var(--fill-tag-neutral-active)] aria-active:border-[var(--border-tag-neutral-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-neutral-disabled)] aria-disabled:bg-[var(--fill-tag-neutral-disabled)] aria-disabled:border-[var(--border-tag-neutral-disabled)] ",success:"text-[var(--text-tag-positive-idle)] bg-[var(--fill-tag-positive-idle)] border-[var(--border-tag-positive-idle)] hover:text-[var(--text-tag-positive-hover)] hover:bg-[var(--fill-tag-positive-hover)] hover:border-[var(--border-tag-positive-hover)] aria-active:text-[var(--text-tag-positive-active)] aria-active:bg-[var(--fill-tag-positive-active)] aria-active:border-[var(--border-tag-positive-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-positive-disabled)] aria-disabled:bg-[var(--fill-tag-positive-disabled)] aria-disabled:border-[var(--border-tag-positive-disabled)] ",error:"border-[var(--border-tag-negative-idle)] bg-[var(--fill-tag-negative-idle)] text-[var(--text-tag-negative-idle)] hover:text-[var(--text-tag-negative-hover)] hover:bg-[var(--fill-tag-negative-hover)] hover:border-[var(--border-tag-negative-hover)] aria-active:text-[var(--text-tag-negative-active)] aria-active:bg-[var(--fill-tag-negative-active)] aria-active:border-[var(--border-tag-negative-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-negative-disabled)] aria-disabled:bg-[var(--fill-tag-negative-disabled)] aria-disabled:border-[var(--border-tag-negative-disabled)] ",pending:"border-[var(--border-tag-emphasis-idle)] bg-[var(--fill-tag-emphasis-idle)] text-[var(--text-tag-emphasis-idle)] hover:text-[var(--text-tag-emphasis-hover)] hover:bg-[var(--fill-tag-emphasis-hover)] hover:border-[var(--border-tag-emphasis-hover)] aria-active:text-[var(--text-tag-emphasis-active)] aria-active:bg-[var(--fill-tag-emphasis-active)] aria-active:border-[var(--border-tag-emphasis-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-emphasis-disabled)] aria-disabled:bg-[var(--fill-tag-emphasis-disabled)] aria-disabled:border-[var(--border-tag-emphasis-disabled)] ",warning:"border-[var(--border-tag-warning-idle)] bg-[var(--fill-tag-warning-idle)] text-[var(--text-tag-warning-idle)] hover:text-[var(--text-tag-warning-hover)] hover:bg-[var(--fill-tag-warning-hover)] hover:border-[var(--border-tag-warning-hover)] aria-active:text-[var(--text-tag-warning-active)] aria-active:bg-[var(--fill-tag-warning-active)] aria-active:border-[var(--border-tag-warning-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-warning-disabled)] aria-disabled:bg-[var(--fill-tag-warning-disabled)] aria-disabled:border-[var(--border-tag-warning-disabled)] ",text:"bg-transparent border-transparent text-primary-foreground !p-0"},size:{xs:"text-[10px] px-1.5 py-0.5 rounded-sm bg-transparent hover:bg-transparent aria-disabled:bg-transparent aria-active:bg-transparent",sm:"text-xs px-2.5 py-0.5 rounded-full",md:"text-sm px-2.5 py-0.5 rounded-full",lg:"text-base px-2.5 py-2 rounded-full"}},defaultVariants:{variant:"default",size:"sm"}});function Jt({className:e,variant:t,size:r,disabled:n=!1,active:o=!1,...a}){return s.jsx("div",{"aria-disabled":n,"aria-active":o,className:R(By({variant:t,size:r}),e),...a})}function Rd({className:e,...t}){return s.jsx("div",{"data-slot":"card",className:R("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 Nd({className:e,...t}){return s.jsx("div",{"data-slot":"card-header",className:R("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 jd({className:e,...t}){return s.jsx("div",{"data-slot":"card-title",className:R("qodo qodo-card-title leading-none font-semibold",e),...t})}function Pd({className:e,...t}){return s.jsx("div",{"data-slot":"card-description",className:R("qodo qodo-card-description text-muted-foreground text-sm dark:text-muted-foreground",e),...t})}function Gy({className:e,...t}){return s.jsx("div",{"data-slot":"card-action",className:R("qodo qodo-card-action col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...t})}function Td({className:e,...t}){return s.jsx("div",{"data-slot":"card-content",className:R("qodo qodo-card-content px-6",e),...t})}function Wy({className:e,...t}){return s.jsx("div",{"data-slot":"card-footer",className:R("qodo qodo-card-footer flex items-center px-6 [.border-t]:pt-6",e),...t})}var Ra="Progress",Na=100,[zy,VR]=ye(Ra),[qy,Uy]=zy(Ra),_d=d.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:o,getValueLabel:a=Hy,...i}=e;(o||o===0)&&!di(o)&&console.error(Ky(`${o}`,"Progress"));const l=di(o)?o:Na;n!==null&&!ui(n,l)&&console.error(Yy(`${n}`,"Progress"));const c=ui(n,l)?n:null,u=mn(c)?a(c,l):void 0;return s.jsx(qy,{scope:r,value:c,max:l,children:s.jsx(q.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":mn(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":Md(c,l),"data-value":c??void 0,"data-max":l,...i,ref:t})})});_d.displayName=Ra;var Ad="ProgressIndicator",Id=d.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,o=Uy(Ad,r);return s.jsx(q.div,{"data-state":Md(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...n,ref:t})});Id.displayName=Ad;function Hy(e,t){return`${Math.round(e/t*100)}%`}function Md(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function mn(e){return typeof e=="number"}function di(e){return mn(e)&&!isNaN(e)&&e>0}function ui(e,t){return mn(e)&&!isNaN(e)&&e<=t&&e>=0}function Ky(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Na}\`.`}function Yy(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
205
205
|
- a positive number
|
|
206
206
|
- less than the value passed to \`max\` (or ${Na} if no \`max\` prop is set)
|
|
207
207
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
208
208
|
|
|
209
|
-
Defaulting to \`null\`.`}var Uy=Pd,Hy=_d;function Ky({className:e,value:t,...r}){return s.jsx(Uy,{"data-slot":"progress",className:k("qodo qodo-progress bg-primary/20 relative h-2 w-full overflow-hidden rounded-full dark:bg-primary/20",e),...r,children:s.jsx(Hy,{"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 Id({className:e,...t}){return s.jsx("div",{className:k("qodo qodo-skeleton animate-pulse rounded-md bg-neutral-900/10 dark:bg-neutral-50/10",e),...t})}var zn="Switch",[Yy,Dk]=ye(zn),[Xy,Zy]=Yy(zn),Md=d.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:a,required:i,disabled:l,value:c="on",onCheckedChange:u,form:f,...p}=e,[g,m]=d.useState(null),b=ae(t,C=>m(C)),v=d.useRef(!1),x=g?f||!!g.closest("form"):!0,[y,h]=be({prop:o,defaultProp:a??!1,onChange:u,caller:zn});return s.jsxs(Xy,{scope:r,checked:y,disabled:l,children:[s.jsx(q.button,{type:"button",role:"switch","aria-checked":y,"aria-required":i,"data-state":Ld(y),"data-disabled":l?"":void 0,disabled:l,value:c,...p,ref:b,onClick:F(e.onClick,C=>{h(E=>!E),x&&(v.current=C.isPropagationStopped(),v.current||C.stopPropagation())})}),x&&s.jsx($d,{control:g,bubbles:!v.current,name:n,value:c,checked:y,required:i,disabled:l,form:f,style:{transform:"translateX(-100%)"}})]})});Md.displayName=zn;var Od="SwitchThumb",Dd=d.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=Zy(Od,r);return s.jsx(q.span,{"data-state":Ld(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});Dd.displayName=Od;var Jy="SwitchBubbleInput",$d=d.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{const i=d.useRef(null),l=ae(i,a),c=On(r),u=An(t);return d.useEffect(()=>{const f=i.current;if(!f)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(c!==r&&m){const b=new Event("click",{bubbles:n});m.call(f,r),f.dispatchEvent(b)}},[c,r,n]),s.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:l,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});$d.displayName=Jy;function Ld(e){return e?"checked":"unchecked"}var Qy=Md,ew=Dd;const tw=Qt("qodo qodo-switch peer inline-flex shrink-0 items-center rounded-full border transition-all outline-none shadow-lg p-0.5 disabled:cursor-not-allowed",{variants:{size:{small:"h-5 w-8",large:"h-6 w-10"}},defaultVariants:{size:"small"}}),rw=Qt("pointer-events-none block rounded-full ring-0 transition-transform shadow-lg",{variants:{size:{small:"h-[14px] w-[14px] data-[state=checked]:translate-x-[12px]",large:"h-[18px] w-[18px] data-[state=checked]:translate-x-[16px]"}},defaultVariants:{size:"small"}});function nw({className:e,size:t,...r}){return s.jsx(Qy,{"data-slot":"switch",className:k(tw({size:t}),"data-[state=unchecked]:border-[var(--border-input-neutral-idle)] data-[state=unchecked]:bg-[var(--fill-input-neutral-idle)]","data-[state=unchecked]:hover:border-[var(--border-input-neutral-hover)] data-[state=unchecked]:hover:bg-[var(--fill-input-neutral-hover)]","data-[state=unchecked]:active:border-[var(--border-input-neutral-active)] data-[state=unchecked]:active:bg-[var(--fill-input-neutral-active)]","data-[state=unchecked]:disabled:border-[var(--border-input-neutral-disabled)] data-[state=unchecked]:disabled:bg-[var(--fill-input-neutral-disabled)]","data-[state=checked]:border-[var(--color-purple-700)] data-[state=checked]:bg-[var(--fill-input-emphasis-idle)]","data-[state=checked]:hover:border-[var(--color-purple-600)] data-[state=checked]:hover:bg-[var(--fill-input-emphasis-hover)]","data-[state=checked]:active:border-[var(--color-purple-600)] data-[state=checked]:active:bg-[var(--fill-input-emphasis-active)]","data-[state=checked]:disabled:border-[var(--fill-input-emphasis-disabled)] data-[state=checked]:disabled:bg-[var(--fill-input-emphasis-disabled)]",e),...r,children:s.jsx(ew,{"data-slot":"switch-thumb",className:k(rw({size:t}),"data-[state=unchecked]:bg-[var(--icon-input-neutral-idle)]","data-[state=unchecked]:hover:bg-[var(--icon-input-neutral-hover)]","data-[state=unchecked]:active:bg-[var(--icon-input-neutral-active)]","data-[state=unchecked]:disabled:bg-[var(--icon-input-neutral-disabled)]","data-[state=checked]:bg-[var(--icon-input-emphasis-idle)]","data-[state=checked]:hover:bg-[var(--icon-input-emphasis-hover)]","data-[state=checked]:active:bg-[var(--icon-input-emphasis-active)]","data-[state=checked]:disabled:bg-[var(--icon-input-emphasis-disabled)]","data-[state=unchecked]:translate-x-0")})})}var Fd="Toggle",ja=d.forwardRef((e,t)=>{const{pressed:r,defaultPressed:n,onPressedChange:o,...a}=e,[i,l]=be({prop:r,onChange:o,defaultProp:n??!1,caller:Fd});return s.jsx(q.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)})})});ja.displayName=Fd;var ow=ja;const Vd=Qt("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 aw({className:e,variant:t,size:r,...n}){return s.jsx(ow,{"data-slot":"toggle",className:k(Vd({variant:t,size:r,className:e})),...n})}var Ro="rovingFocusGroup.onEntryFocus",sw={bubbles:!1,cancelable:!0},$r="RovingFocusGroup",[Ho,Bd,iw]=kn($r),[lw,xt]=ye($r,[iw]),[cw,dw]=lw($r),Gd=d.forwardRef((e,t)=>s.jsx(Ho.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx(Ho.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(uw,{...e,ref:t})})}));Gd.displayName=$r;var uw=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...p}=e,g=d.useRef(null),m=ae(t,g),b=At(a),[v,x]=be({prop:i,defaultProp:l??null,onChange:c,caller:$r}),[y,h]=d.useState(!1),C=De(u),E=Bd(r),j=d.useRef(!1),[_,P]=d.useState(0);return d.useEffect(()=>{const N=g.current;if(N)return N.addEventListener(Ro,C),()=>N.removeEventListener(Ro,C)},[C]),s.jsx(cw,{scope:r,orientation:n,dir:b,loop:o,currentTabStopId:v,onItemFocus:d.useCallback(N=>x(N),[x]),onItemShiftTab:d.useCallback(()=>h(!0),[]),onFocusableItemAdd:d.useCallback(()=>P(N=>N+1),[]),onFocusableItemRemove:d.useCallback(()=>P(N=>N-1),[]),children:s.jsx(q.div,{tabIndex:y||_===0?-1:0,"data-orientation":n,...p,ref:m,style:{outline:"none",...e.style},onMouseDown:F(e.onMouseDown,()=>{j.current=!0}),onFocus:F(e.onFocus,N=>{const W=!j.current;if(N.target===N.currentTarget&&W&&!y){const U=new CustomEvent(Ro,sw);if(N.currentTarget.dispatchEvent(U),!U.defaultPrevented){const re=E().filter(I=>I.focusable),te=re.find(I=>I.active),Q=re.find(I=>I.id===v),O=[te,Q,...re].filter(Boolean).map(I=>I.ref.current);qd(O,f)}}j.current=!1}),onBlur:F(e.onBlur,()=>h(!1))})})}),Wd="RovingFocusGroupItem",zd=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:a,children:i,...l}=e,c=me(),u=a||c,f=dw(Wd,r),p=f.currentTabStopId===u,g=Bd(r),{onFocusableItemAdd:m,onFocusableItemRemove:b,currentTabStopId:v}=f;return d.useEffect(()=>{if(n)return m(),()=>b()},[n,m,b]),s.jsx(Ho.ItemSlot,{scope:r,id:u,focusable:n,active:o,children:s.jsx(q.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...l,ref:t,onMouseDown:F(e.onMouseDown,x=>{n?f.onItemFocus(u):x.preventDefault()}),onFocus:F(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:F(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){f.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const y=mw(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(E=>E.focusable).map(E=>E.ref.current);if(y==="last")C.reverse();else if(y==="prev"||y==="next"){y==="prev"&&C.reverse();const E=C.indexOf(x.currentTarget);C=f.loop?gw(C,E+1):C.slice(E+1)}setTimeout(()=>qd(C))}}),children:typeof i=="function"?i({isCurrentTabStop:p,hasTabStop:v!=null}):i})})});zd.displayName=Wd;var fw={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function pw(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function mw(e,t,r){const n=pw(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return fw[n]}function qd(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function gw(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var qn=Gd,Un=zd,bt="ToggleGroup",[Ud,$k]=ye(bt,[xt]),Hd=xt(),Pa=S.forwardRef((e,t)=>{const{type:r,...n}=e;if(r==="single"){const o=n;return s.jsx(vw,{...o,ref:t})}if(r==="multiple"){const o=n;return s.jsx(hw,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${bt}\``)});Pa.displayName=bt;var[Kd,Yd]=Ud(bt),vw=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,l]=be({prop:r,defaultProp:n??"",onChange:o,caller:bt});return s.jsx(Kd,{scope:e.__scopeToggleGroup,type:"single",value:S.useMemo(()=>i?[i]:[],[i]),onItemActivate:l,onItemDeactivate:S.useCallback(()=>l(""),[l]),children:s.jsx(Xd,{...a,ref:t})})}),hw=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,l]=be({prop:r,defaultProp:n??[],onChange:o,caller:bt}),c=S.useCallback(f=>l((p=[])=>[...p,f]),[l]),u=S.useCallback(f=>l((p=[])=>p.filter(g=>g!==f)),[l]);return s.jsx(Kd,{scope:e.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:c,onItemDeactivate:u,children:s.jsx(Xd,{...a,ref:t})})});Pa.displayName=bt;var[xw,bw]=Ud(bt),Xd=S.forwardRef((e,t)=>{const{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:o=!0,orientation:a,dir:i,loop:l=!0,...c}=e,u=Hd(r),f=At(i),p={role:"group",dir:f,...c};return s.jsx(xw,{scope:r,rovingFocus:o,disabled:n,children:o?s.jsx(qn,{asChild:!0,...u,orientation:a,dir:f,loop:l,children:s.jsx(q.div,{...p,ref:t})}):s.jsx(q.div,{...p,ref:t})})}),gn="ToggleGroupItem",Zd=S.forwardRef((e,t)=>{const r=Yd(gn,e.__scopeToggleGroup),n=bw(gn,e.__scopeToggleGroup),o=Hd(e.__scopeToggleGroup),a=r.value.includes(e.value),i=n.disabled||e.disabled,l={...e,pressed:a,disabled:i},c=S.useRef(null);return n.rovingFocus?s.jsx(Un,{asChild:!0,...o,focusable:!i,active:a,ref:c,children:s.jsx(ui,{...l,ref:t})}):s.jsx(ui,{...l,ref:t})});Zd.displayName=gn;var ui=S.forwardRef((e,t)=>{const{__scopeToggleGroup:r,value:n,...o}=e,a=Yd(gn,r),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=a.type==="single"?i:void 0;return s.jsx(ja,{...l,...o,ref:t,onPressedChange:c=>{c?a.onItemActivate(n):a.onItemDeactivate(n)}})}),yw=Pa,ww=Zd;const Jd=d.createContext({size:"default",variant:"default"});function Cw({className:e,variant:t,size:r,children:n,...o}){return s.jsx(yw,{"data-slot":"toggle-group","data-variant":t,"data-size":r,className:k("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(Jd.Provider,{value:{variant:t,size:r},children:n})})}function Sw({className:e,children:t,variant:r,size:n,...o}){const a=d.useContext(Jd);return s.jsx(ww,{"data-slot":"toggle-group-item","data-variant":a.variant||r,"data-size":a.size||n,className:k(Vd({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 Hn="Collapsible",[Ew,Qd]=ye(Hn),[Rw,Ta]=Ew(Hn),eu=d.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:a,onOpenChange:i,...l}=e,[c,u]=be({prop:n,defaultProp:o??!1,onChange:i,caller:Hn});return s.jsx(Rw,{scope:r,disabled:a,contentId:me(),open:c,onOpenToggle:d.useCallback(()=>u(f=>!f),[u]),children:s.jsx(q.div,{"data-state":Aa(c),"data-disabled":a?"":void 0,...l,ref:t})})});eu.displayName=Hn;var tu="CollapsibleTrigger",ru=d.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=Ta(tu,r);return s.jsx(q.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Aa(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:F(e.onClick,o.onOpenToggle)})});ru.displayName=tu;var _a="CollapsibleContent",nu=d.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Ta(_a,e.__scopeCollapsible);return s.jsx(Ce,{present:r||o.open,children:({present:a})=>s.jsx(kw,{...n,ref:t,present:a})})});nu.displayName=_a;var kw=d.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...a}=e,i=Ta(_a,r),[l,c]=d.useState(n),u=d.useRef(null),f=ae(t,u),p=d.useRef(0),g=p.current,m=d.useRef(0),b=m.current,v=i.open||l,x=d.useRef(v),y=d.useRef(void 0);return d.useEffect(()=>{const h=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(h)},[]),we(()=>{const h=u.current;if(h){y.current=y.current||{transitionDuration:h.style.transitionDuration,animationName:h.style.animationName},h.style.transitionDuration="0s",h.style.animationName="none";const C=h.getBoundingClientRect();p.current=C.height,m.current=C.width,x.current||(h.style.transitionDuration=y.current.transitionDuration,h.style.animationName=y.current.animationName),c(n)}},[i.open,n]),s.jsx(q.div,{"data-state":Aa(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!v,...a,ref:f,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:v&&o})});function Aa(e){return e?"open":"closed"}var Nw=eu,jw=ru,Pw=nu,Ve="Accordion",Tw=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Ia,_w,Aw]=kn(Ve),[Kn,Lk]=ye(Ve,[Aw,Qd]),Ma=Qd(),ou=S.forwardRef((e,t)=>{const{type:r,...n}=e,o=n,a=n;return s.jsx(Ia.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?s.jsx(Dw,{...a,ref:t}):s.jsx(Ow,{...o,ref:t})})});ou.displayName=Ve;var[au,Iw]=Kn(Ve),[su,Mw]=Kn(Ve,{collapsible:!1}),Ow=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},collapsible:a=!1,...i}=e,[l,c]=be({prop:r,defaultProp:n??"",onChange:o,caller:Ve});return s.jsx(au,{scope:e.__scopeAccordion,value:S.useMemo(()=>l?[l]:[],[l]),onItemOpen:c,onItemClose:S.useCallback(()=>a&&c(""),[a,c]),children:s.jsx(su,{scope:e.__scopeAccordion,collapsible:a,children:s.jsx(iu,{...i,ref:t})})})}),Dw=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,l]=be({prop:r,defaultProp:n??[],onChange:o,caller:Ve}),c=S.useCallback(f=>l((p=[])=>[...p,f]),[l]),u=S.useCallback(f=>l((p=[])=>p.filter(g=>g!==f)),[l]);return s.jsx(au,{scope:e.__scopeAccordion,value:i,onItemOpen:c,onItemClose:u,children:s.jsx(su,{scope:e.__scopeAccordion,collapsible:!0,children:s.jsx(iu,{...a,ref:t})})})}),[$w,Yn]=Kn(Ve),iu=S.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:o,orientation:a="vertical",...i}=e,l=S.useRef(null),c=ae(l,t),u=_w(r),p=At(o)==="ltr",g=F(e.onKeyDown,m=>{var N;if(!Tw.includes(m.key))return;const b=m.target,v=u().filter(W=>{var U;return!((U=W.ref.current)!=null&&U.disabled)}),x=v.findIndex(W=>W.ref.current===b),y=v.length;if(x===-1)return;m.preventDefault();let h=x;const C=0,E=y-1,j=()=>{h=x+1,h>E&&(h=C)},_=()=>{h=x-1,h<C&&(h=E)};switch(m.key){case"Home":h=C;break;case"End":h=E;break;case"ArrowRight":a==="horizontal"&&(p?j():_());break;case"ArrowDown":a==="vertical"&&j();break;case"ArrowLeft":a==="horizontal"&&(p?_():j());break;case"ArrowUp":a==="vertical"&&_();break}const P=h%y;(N=v[P].ref.current)==null||N.focus()});return s.jsx($w,{scope:r,disabled:n,direction:o,orientation:a,children:s.jsx(Ia.Slot,{scope:r,children:s.jsx(q.div,{...i,"data-orientation":a,ref:c,onKeyDown:n?void 0:g})})})}),vn="AccordionItem",[Lw,Oa]=Kn(vn),lu=S.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...o}=e,a=Yn(vn,r),i=Iw(vn,r),l=Ma(r),c=me(),u=n&&i.value.includes(n)||!1,f=a.disabled||e.disabled;return s.jsx(Lw,{scope:r,open:u,disabled:f,triggerId:c,children:s.jsx(Nw,{"data-orientation":a.orientation,"data-state":mu(u),...l,...o,ref:t,disabled:f,open:u,onOpenChange:p=>{p?i.onItemOpen(n):i.onItemClose(n)}})})});lu.displayName=vn;var cu="AccordionHeader",du=S.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Yn(Ve,r),a=Oa(cu,r);return s.jsx(q.h3,{"data-orientation":o.orientation,"data-state":mu(a.open),"data-disabled":a.disabled?"":void 0,...n,ref:t})});du.displayName=cu;var Ko="AccordionTrigger",uu=S.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Yn(Ve,r),a=Oa(Ko,r),i=Mw(Ko,r),l=Ma(r);return s.jsx(Ia.ItemSlot,{scope:r,children:s.jsx(jw,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...l,...n,ref:t})})});uu.displayName=Ko;var fu="AccordionContent",pu=S.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Yn(Ve,r),a=Oa(fu,r),i=Ma(r);return s.jsx(Pw,{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}})});pu.displayName=fu;function mu(e){return e?"open":"closed"}var Fw=ou,Vw=lu,Bw=du,Gw=uu,Ww=pu;function zw({...e}){return s.jsx(Fw,{"data-slot":"accordion",...e})}function qw({className:e,...t}){return s.jsx(Vw,{"data-slot":"accordion-item",className:k("qodo qodo-accordion-item border-b border-[var(--border-interactive-neutral-idle)] text-[var(--text-interactive-neutral-idle)] text-base font-medium leading-6 hover:text-[var(--text-interactive-neutral-hover)]",e),...t})}function Uw({className:e,children:t,...r}){return s.jsx(Bw,{className:"flex",children:s.jsxs(Gw,{"data-slot":"accordion-trigger",className:k("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 transition-all outline-none text-text-interactive-neutral-idle focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180 dark:focus-visible:border-ring dark:focus-visible:ring-ring/50 cursor-pointer hover:text-[var(--text-interactive-neutral-hover)]",e),...r,children:[t,s.jsx(En,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200 dark:text-muted-foreground"})]})})}function Hw({className:e,children:t,...r}){return s.jsx(Ww,{"data-slot":"accordion-content",className:k("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:k("pt-0 pb-4 text-text-interactive-neutral-idle font-normal text-sm",e),children:t})})}var Xn="Tabs",[Kw,Fk]=ye(Xn,[xt]),gu=xt(),[Yw,Da]=Kw(Xn),vu=d.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:l,activationMode:c="automatic",...u}=e,f=At(l),[p,g]=be({prop:n,onChange:o,defaultProp:a??"",caller:Xn});return s.jsx(Yw,{scope:r,baseId:me(),value:p,onValueChange:g,orientation:i,dir:f,activationMode:c,children:s.jsx(q.div,{dir:f,"data-orientation":i,...u,ref:t})})});vu.displayName=Xn;var hu="TabsList",xu=d.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...o}=e,a=Da(hu,r),i=gu(r);return s.jsx(qn,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:n,children:s.jsx(q.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});xu.displayName=hu;var bu="TabsTrigger",yu=d.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:o=!1,...a}=e,i=Da(bu,r),l=gu(r),c=Su(i.baseId,n),u=Eu(i.baseId,n),f=n===i.value;return s.jsx(Un,{asChild:!0,...l,focusable:!o,active:f,children:s.jsx(q.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...a,ref:t,onMouseDown:F(e.onMouseDown,p=>{!o&&p.button===0&&p.ctrlKey===!1?i.onValueChange(n):p.preventDefault()}),onKeyDown:F(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&i.onValueChange(n)}),onFocus:F(e.onFocus,()=>{const p=i.activationMode!=="manual";!f&&!o&&p&&i.onValueChange(n)})})})});yu.displayName=bu;var wu="TabsContent",Cu=d.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:o,children:a,...i}=e,l=Da(wu,r),c=Su(l.baseId,n),u=Eu(l.baseId,n),f=n===l.value,p=d.useRef(f);return d.useEffect(()=>{const g=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(g)},[]),s.jsx(Ce,{present:o||f,children:({present:g})=>s.jsx(q.div,{"data-state":f?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!g,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:g&&a})})});Cu.displayName=wu;function Su(e,t){return`${e}-trigger-${t}`}function Eu(e,t){return`${e}-content-${t}`}var Xw=vu,Zw=xu,Jw=yu,Qw=Cu;function e0({className:e,...t}){return s.jsx(Xw,{"data-slot":"tabs",className:k("qodo qodo-tabs flex flex-col gap-2",e),...t})}function t0({className:e,...t}){return s.jsx(Zw,{"data-slot":"tabs-list",className:k("inline-flex w-full items-end justify-start gap-4",e),...t})}function r0({className:e,...t}){return s.jsx(Jw,{"data-slot":"tabs-trigger",className:k("text-[var(--text-interactive-neutral-idle)] hover:text-[var(--text-interactive-neutral-hover)] data-[state=active]:text-[var(--text-interactive-emphasis-active)] focus-visible:ring-ring/50 focus-visible:outline-ring inline-flex items-center justify-center gap-1.5 border-b border-transparent py-4 text-xs font-normal whitespace-nowrap transition-[color,border-color] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed data-[state=active]:border-[var(--color-purple-400)] relative -mb-px tracking-[0.01em] leading-[150%] cursor-pointer [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function n0({className:e,...t}){return s.jsx(Qw,{"data-slot":"tabs-content",className:k("flex-1 outline-none",e),...t})}var o0=e=>e.type==="checkbox",vr=e=>e instanceof Date,$a=e=>e==null;const Ru=e=>typeof e=="object";var _t=e=>!$a(e)&&!Array.isArray(e)&&Ru(e)&&!vr(e),a0=e=>_t(e)&&e.target?o0(e.target)?e.target.checked:e.target.value:e,s0=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,i0=(e,t)=>e.has(s0(t)),l0=e=>{const t=e.constructor&&e.constructor.prototype;return _t(t)&&t.hasOwnProperty("isPrototypeOf")},c0=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ku(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(!(c0&&(e instanceof Blob||n))&&(r||_t(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!l0(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=ku(e[o]));else return e;return t}var Nu=e=>/^\w*$/.test(e),Yo=e=>e===void 0,d0=e=>Array.isArray(e)?e.filter(Boolean):[],ju=e=>d0(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ne=(e,t,r)=>{if(!t||!_t(e))return r;const n=(Nu(t)?[t]:ju(t)).reduce((o,a)=>$a(o)?o:o[a],e);return Yo(n)||n===e?Yo(e[t])?r:e[t]:n},ko=e=>typeof e=="boolean",fi=(e,t,r)=>{let n=-1;const o=Nu(t)?[t]:ju(t),a=o.length,i=a-1;for(;++n<a;){const l=o[n];let c=r;if(n!==i){const u=e[l];c=_t(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=c,e=e[l]}};const pi={BLUR:"blur",CHANGE:"change"},mi={all:"all"},La=S.createContext(null);La.displayName="HookFormContext";const lr=()=>S.useContext(La),u0=e=>{const{children:t,...r}=e;return S.createElement(La.Provider,{value:r},t)};var f0=(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]!==mi.all&&(t._proxyFormState[i]=!n||mi.all),r&&(r[i]=!0),e[i]}});return o};const Pu=typeof window<"u"?S.useLayoutEffect:S.useEffect;function Tu(e){const t=lr(),{control:r=t.control,disabled:n,name:o,exact:a}=e||{},[i,l]=S.useState(r._formState),c=S.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Pu(()=>r._subscribe({name:o,formState:c.current,exact:a,callback:u=>{!n&&l({...r._formState,...u})}}),[o,n,a]),S.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),S.useMemo(()=>f0(i,r,c.current,!1),[i,r])}var p0=e=>typeof e=="string",m0=(e,t,r,n,o)=>p0(e)?Ne(r,e,o):Array.isArray(e)?e.map(a=>Ne(r,a)):r,gi=e=>$a(e)||!Ru(e);function _u(e,t,r=new WeakSet){if(gi(e)||gi(t))return e===t;if(vr(e)&&vr(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(vr(i)&&vr(l)||_t(i)&&_t(l)||Array.isArray(i)&&Array.isArray(l)?!_u(i,l,r):i!==l)return!1}}return!0}function g0(e){const t=lr(),{control:r=t.control,name:n,defaultValue:o,disabled:a,exact:i,compute:l}=e||{},c=S.useRef(o),u=S.useRef(l),f=S.useRef(void 0);u.current=l;const p=S.useMemo(()=>r._getWatch(n,c.current),[r,n]),[g,m]=S.useState(u.current?u.current(p):p);return Pu(()=>r._subscribe({name:n,formState:{values:!0},exact:i,callback:b=>{if(!a){const v=m0(n,r._names,b.values||r._formValues,!1,c.current);if(u.current){const x=u.current(v);_u(x,f.current)||(m(x),f.current=x)}else m(v)}}}),[r,a,n,i]),S.useEffect(()=>r._removeUnmounted()),g}function v0(e){const t=lr(),{name:r,disabled:n,control:o=t.control,shouldUnregister:a,defaultValue:i}=e,l=i0(o._names.array,r),c=S.useMemo(()=>Ne(o._formValues,r,Ne(o._defaultValues,r,i)),[o,r,i]),u=g0({control:o,name:r,defaultValue:c,exact:!0}),f=Tu({control:o,name:r,exact:!0}),p=S.useRef(e),g=S.useRef(o.register(r,{...e.rules,value:u,...ko(e.disabled)?{disabled:e.disabled}:{}}));p.current=e;const m=S.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Ne(f.errors,r)},isDirty:{enumerable:!0,get:()=>!!Ne(f.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!Ne(f.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!Ne(f.validatingFields,r)},error:{enumerable:!0,get:()=>Ne(f.errors,r)}}),[f,r]),b=S.useCallback(h=>g.current.onChange({target:{value:a0(h),name:r},type:pi.CHANGE}),[r]),v=S.useCallback(()=>g.current.onBlur({target:{value:Ne(o._formValues,r),name:r},type:pi.BLUR}),[r,o._formValues]),x=S.useCallback(h=>{const C=Ne(o._fields,r);C&&h&&(C._f.ref={focus:()=>h.focus&&h.focus(),select:()=>h.select&&h.select(),setCustomValidity:E=>h.setCustomValidity(E),reportValidity:()=>h.reportValidity()})},[o._fields,r]),y=S.useMemo(()=>({name:r,value:u,...ko(n)||f.disabled?{disabled:f.disabled||n}:{},onChange:b,onBlur:v,ref:x}),[r,n,f.disabled,b,v,x,u]);return S.useEffect(()=>{const h=o._options.shouldUnregister||a;o.register(r,{...p.current.rules,...ko(p.current.disabled)?{disabled:p.current.disabled}:{}});const C=(E,j)=>{const _=Ne(o._fields,E);_&&_._f&&(_._f.mount=j)};if(C(r,!0),h){const E=ku(Ne(o._options.defaultValues,r));fi(o._defaultValues,r,E),Yo(Ne(o._formValues,r))&&fi(o._formValues,r,E)}return!l&&o.register(r),()=>{(l?h&&!o._state.action:h)?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 Au=e=>e.render(v0(e)),Iu=S.createContext(void 0),Mu=e=>{const{methods:t,disabled:r,readOnly:n,children:o}=e;return s.jsx(Iu.Provider,{value:{disabled:r,readOnly:n},children:s.jsx(u0,{...t,children:o})})},Ou=()=>{const e=S.useContext(Iu),t=lr();if(!e||!t)throw new Error("formContext must be used within a FormProvider");return{...e,...t}},h0=({type:e="button",variant:t="outline",...r})=>{const n=()=>e==="submit"||e==="reset"?"default":t;return s.jsx(et,{type:e,variant:n(),...r})};var Du={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},vi=S.createContext&&S.createContext(Du),x0=["attr","size","title"];function b0(e,t){if(e==null)return{};var r=y0(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 y0(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 hn(){return hn=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},hn.apply(this,arguments)}function hi(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 xn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hi(Object(r),!0).forEach(function(n){w0(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function w0(e,t,r){return t=C0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function C0(e){var t=S0(e,"string");return typeof t=="symbol"?t:t+""}function S0(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 $u(e){return e&&e.map((t,r)=>S.createElement(t.tag,xn({key:r},t.attr),$u(t.child)))}function Lu(e){return t=>S.createElement(E0,hn({attr:xn({},e.attr)},t),$u(e.child))}function E0(e){var t=r=>{var{attr:n,size:o,title:a}=e,i=b0(e,x0),l=o||r.size||"1em",c;return r.className&&(c=r.className),e.className&&(c=(c?c+" ":"")+e.className),S.createElement("svg",hn({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,i,{className:c,style:xn(xn({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 vi!==void 0?S.createElement(vi.Consumer,null,r=>t(r)):t(Du)}function R0(e){return Lu({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 k0="Label",Fu=d.forwardRef((e,t)=>s.jsx(q.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())}}));Fu.displayName=k0;var N0=Fu;function Fa({className:e,...t}){return s.jsx(N0,{"data-slot":"label",className:k("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 Vu=d.createContext({}),j0=({...e})=>s.jsx(Vu.Provider,{value:{name:e.name},children:s.jsx(Au,{...e})}),Zn=()=>{const e=d.useContext(Vu),t=d.useContext(Bu),{getFieldState:r}=lr(),n=Tu({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}},Bu=d.createContext({});function P0({className:e,...t}){const r=d.useId();return s.jsx(Bu.Provider,{value:{id:r},children:s.jsx("div",{"data-slot":"form-item",className:k("qodo qodo-form-item grid gap-2",e),...t})})}function T0({className:e,...t}){const{formItemId:r}=Zn();return s.jsx(Fa,{"data-slot":"form-label",className:k("data-[error=true]:text-destructive font-normal text-sm",e),htmlFor:r,...t})}function _0({...e}){const{error:t,formItemId:r,formDescriptionId:n,formMessageId:o}=Zn();return s.jsx(xv,{"data-slot":"form-control",id:r,"aria-describedby":t?`${n} ${o}`:`${n}`,"aria-invalid":!!t,...e})}function A0({className:e,...t}){const{formDescriptionId:r}=Zn();return s.jsx("p",{"data-slot":"form-description",id:r,className:k("text-purple-muted-300 text-sm",e),...t})}function I0({className:e,...t}){const{error:r,formMessageId:n}=Zn(),o=r?String((r==null?void 0:r.message)??""):t.children;return o?s.jsx("p",{"data-slot":"form-message",id:n,className:k("text-destructive text-sm",e),...t,children:o}):null}var[Jn,Vk]=ye("Tooltip",[mt]),Qn=mt(),Gu="TooltipProvider",M0=700,Xo="tooltip.open",[O0,Va]=Jn(Gu),Wu=e=>{const{__scopeTooltip:t,delayDuration:r=M0,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,i=d.useRef(!0),l=d.useRef(!1),c=d.useRef(0);return d.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),s.jsx(O0,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:d.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:d.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:d.useCallback(u=>{l.current=u},[]),disableHoverableContent:o,children:a})};Wu.displayName=Gu;var Rr="Tooltip",[D0,Lr]=Jn(Rr),zu=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:l}=e,c=Va(Rr,e.__scopeTooltip),u=Qn(t),[f,p]=d.useState(null),g=me(),m=d.useRef(0),b=i??c.disableHoverableContent,v=l??c.delayDuration,x=d.useRef(!1),[y,h]=be({prop:n,defaultProp:o??!1,onChange:P=>{P?(c.onOpen(),document.dispatchEvent(new CustomEvent(Xo))):c.onClose(),a==null||a(P)},caller:Rr}),C=d.useMemo(()=>y?x.current?"delayed-open":"instant-open":"closed",[y]),E=d.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x.current=!1,h(!0)},[h]),j=d.useCallback(()=>{window.clearTimeout(m.current),m.current=0,h(!1)},[h]),_=d.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{x.current=!0,h(!0),m.current=0},v)},[v,h]);return d.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),s.jsx(Ar,{...u,children:s.jsx(D0,{scope:t,contentId:g,open:y,stateAttribute:C,trigger:f,onTriggerChange:p,onTriggerEnter:d.useCallback(()=>{c.isOpenDelayedRef.current?_():E()},[c.isOpenDelayedRef,_,E]),onTriggerLeave:d.useCallback(()=>{b?j():(window.clearTimeout(m.current),m.current=0)},[j,b]),onOpen:E,onClose:j,disableHoverableContent:b,children:r})})};zu.displayName=Rr;var Zo="TooltipTrigger",qu=d.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Lr(Zo,r),a=Va(Zo,r),i=Qn(r),l=d.useRef(null),c=ae(t,l,o.onTriggerChange),u=d.useRef(!1),f=d.useRef(!1),p=d.useCallback(()=>u.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),s.jsx(Ir,{asChild:!0,...i,children:s.jsx(q.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:c,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(),u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:F(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:F(e.onBlur,o.onClose),onClick:F(e.onClick,o.onClose)})})});qu.displayName=Zo;var Ba="TooltipPortal",[$0,L0]=Jn(Ba,{forceMount:void 0}),Uu=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,a=Lr(Ba,t);return s.jsx($0,{scope:t,forceMount:r,children:s.jsx(Ce,{present:r||a.open,children:s.jsx(sr,{asChild:!0,container:o,children:n})})})};Uu.displayName=Ba;var Jt="TooltipContent",Hu=d.forwardRef((e,t)=>{const r=L0(Jt,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,i=Lr(Jt,e.__scopeTooltip);return s.jsx(Ce,{present:n||i.open,children:i.disableHoverableContent?s.jsx(Ku,{side:o,...a,ref:t}):s.jsx(F0,{side:o,...a,ref:t})})}),F0=d.forwardRef((e,t)=>{const r=Lr(Jt,e.__scopeTooltip),n=Va(Jt,e.__scopeTooltip),o=d.useRef(null),a=ae(t,o),[i,l]=d.useState(null),{trigger:c,onClose:u}=r,f=o.current,{onPointerInTransitChange:p}=n,g=d.useCallback(()=>{l(null),p(!1)},[p]),m=d.useCallback((b,v)=>{const x=b.currentTarget,y={x:b.clientX,y:b.clientY},h=W0(y,x.getBoundingClientRect()),C=z0(y,h),E=q0(v.getBoundingClientRect()),j=H0([...C,...E]);l(j),p(!0)},[p]);return d.useEffect(()=>()=>g(),[g]),d.useEffect(()=>{if(c&&f){const b=x=>m(x,f),v=x=>m(x,c);return c.addEventListener("pointerleave",b),f.addEventListener("pointerleave",v),()=>{c.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",v)}}},[c,f,m,g]),d.useEffect(()=>{if(i){const b=v=>{const x=v.target,y={x:v.clientX,y:v.clientY},h=(c==null?void 0:c.contains(x))||(f==null?void 0:f.contains(x)),C=!U0(y,i);h?g():C&&(g(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,f,i,u,g]),s.jsx(Ku,{...e,ref:a})}),[V0,B0]=Jn(Rr,{isInside:!1}),G0=yv("TooltipContent"),Ku=d.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...l}=e,c=Lr(Jt,r),u=Qn(r),{onClose:f}=c;return d.useEffect(()=>(document.addEventListener(Xo,f),()=>document.removeEventListener(Xo,f)),[f]),d.useEffect(()=>{if(c.trigger){const p=g=>{const m=g.target;m!=null&&m.contains(c.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[c.trigger,f]),s.jsx(nr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:s.jsxs(In,{"data-state":c.stateAttribute,...u,...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(G0,{children:n}),s.jsx(V0,{scope:r,isInside:!0,children:s.jsx(fx,{id:c.contentId,role:"tooltip",children:o||n})})]})})});Hu.displayName=Jt;var Yu="TooltipArrow",Xu=d.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Qn(r);return B0(Yu,r).isInside?null:s.jsx(Mn,{...o,...n,ref:t})});Xu.displayName=Yu;function W0(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 z0(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 q0(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 U0(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],c=t[i],u=l.x,f=l.y,p=c.x,g=c.y;f>n!=g>n&&r<(p-u)*(n-f)/(g-f)+u&&(o=!o)}return o}function H0(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),K0(t)}function K0(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 Y0=Wu,X0=zu,Z0=qu,J0=Uu,Q0=Hu,eC=Xu;function Zu({delayDuration:e=0,...t}){return s.jsx(Y0,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Ju({...e}){return s.jsx(Zu,{children:s.jsx(X0,{"data-slot":"tooltip",...e})})}function Qu({...e}){return s.jsx(Z0,{"data-slot":"tooltip-trigger",...e})}function ef({className:e,sideOffset:t=0,children:r,disableArrow:n=!1,...o}){return s.jsx(J0,{children:s.jsxs(Q0,{"data-slot":"tooltip-content",sideOffset:t,className:k("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(eC,{className:"bg-purple-muted-700 fill-purple-muted-700 z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const Mt=e=>t=>{const{name:r,label:n,description:o,tooltip:a,required:i=!1,...l}=t,{control:c,disabled:u,readOnly:f}=Ou(),p=()=>a?s.jsxs(Ju,{children:[s.jsx(Qu,{asChild:!0,children:s.jsx("span",{children:s.jsx(R0,{size:16})})}),s.jsx(ef,{children:s.jsx("p",{children:a})})]}):s.jsx(s.Fragment,{}),g=()=>o?s.jsx(A0,{children:o}):s.jsx(s.Fragment,{});return s.jsx(j0,{control:c,name:r,render:({field:m,fieldState:b})=>s.jsxs(P0,{className:"flex flex-col gap-1.5",children:[n&&s.jsx(T0,{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(_0,{children:s.jsx(e,{...m,disabled:u,...l,readOnly:f,error:!!b.error})}),!!o&&g(),s.jsx(I0,{})]})})},tC=S.forwardRef((e,t)=>s.jsx(Pr,{...e,ref:t})),rC=S.forwardRef((e,t)=>Mt(tC)({...e,ref:t})),nC=S.forwardRef((e,t)=>{const{options:r=[],onChange:n=()=>{},searchPlaceholder:o,onSearchChange:a,...i}=e,l=c=>{n({target:{value:c}})};return s.jsx(Ra,{ref:t,options:r,onValueChange:l,searchPlaceholder:o,onSearchChange:a,...i})}),oC=Mt(nC);var Ga="Radio",[aC,tf]=ye(Ga),[sC,iC]=aC(Ga),rf=d.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:o=!1,required:a,disabled:i,value:l="on",onCheck:c,form:u,...f}=e,[p,g]=d.useState(null),m=ae(t,x=>g(x)),b=d.useRef(!1),v=p?u||!!p.closest("form"):!0;return s.jsxs(sC,{scope:r,checked:o,disabled:i,children:[s.jsx(q.button,{type:"button",role:"radio","aria-checked":o,"data-state":sf(o),"data-disabled":i?"":void 0,disabled:i,value:l,...f,ref:m,onClick:F(e.onClick,x=>{o||c==null||c(),v&&(b.current=x.isPropagationStopped(),b.current||x.stopPropagation())})}),v&&s.jsx(af,{control:p,bubbles:!b.current,name:n,value:l,checked:o,required:a,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});rf.displayName=Ga;var nf="RadioIndicator",of=d.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,a=iC(nf,r);return s.jsx(Ce,{present:n||a.checked,children:s.jsx(q.span,{"data-state":sf(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});of.displayName=nf;var lC="RadioBubbleInput",af=d.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{const i=d.useRef(null),l=ae(i,a),c=On(r),u=An(t);return d.useEffect(()=>{const f=i.current;if(!f)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(c!==r&&m){const b=new Event("click",{bubbles:n});m.call(f,r),f.dispatchEvent(b)}},[c,r,n]),s.jsx(q.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:l,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});af.displayName=lC;function sf(e){return e?"checked":"unchecked"}var cC=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],eo="RadioGroup",[dC,Bk]=ye(eo,[xt,tf]),lf=xt(),cf=tf(),[uC,fC]=dC(eo),df=d.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:a,required:i=!1,disabled:l=!1,orientation:c,dir:u,loop:f=!0,onValueChange:p,...g}=e,m=lf(r),b=At(u),[v,x]=be({prop:a,defaultProp:o??null,onChange:p,caller:eo});return s.jsx(uC,{scope:r,name:n,required:i,disabled:l,value:v,onValueChange:x,children:s.jsx(qn,{asChild:!0,...m,orientation:c,dir:b,loop:f,children:s.jsx(q.div,{role:"radiogroup","aria-required":i,"aria-orientation":c,"data-disabled":l?"":void 0,dir:b,...g,ref:t})})})});df.displayName=eo;var uf="RadioGroupItem",ff=d.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...o}=e,a=fC(uf,r),i=a.disabled||n,l=lf(r),c=cf(r),u=d.useRef(null),f=ae(t,u),p=a.value===o.value,g=d.useRef(!1);return d.useEffect(()=>{const m=v=>{cC.includes(v.key)&&(g.current=!0)},b=()=>g.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",b)}},[]),s.jsx(Un,{asChild:!0,...l,focusable:!i,active:p,children:s.jsx(rf,{disabled:i,required:a.required,checked:p,...c,...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=u.current)==null||m.click())})})})});ff.displayName=uf;var pC="RadioGroupIndicator",pf=d.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=cf(r);return s.jsx(of,{...o,...n,ref:t})});pf.displayName=pC;var mC=df,gC=ff,vC=pf;function hC({className:e,...t}){const{readOnly:r,...n}=t;return s.jsx(mC,{"data-slot":"radio-group","data-readonly":r||void 0,disabled:n.disabled||r,className:k("qodo qodo-radio-group grid gap-3 group",e),...n})}function xC({className:e,...t}){return s.jsx(gC,{"data-slot":"radio-group-item",className:k("qodo qodo-radio-group-item cursor-pointer border-[var(--border-input-neutral-idle)] bg-[var(--fill-input-neutral-idle)] 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]","aria-checked:border-[var(--border-input-emphasis-active)] hover:aria-checked:border-[var(--border-input-emphasis-active)]","group-data-[readonly]:opacity-100 group-data-[readonly]:cursor-default","data-disabled:cursor-not-allowed data-disabled:opacity-50","aria-disabled:cursor-not-allowed aria-disabled:opacity-50","mt-[2px] mr-0",e),...t,children:s.jsx(vC,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:s.jsx(zg,{className:"stroke-transparent fill-[var(--icon-input-emphasis-active)] absolute top-1/2 left-1/2 size-3 -translate-x-1/2 -translate-y-1/2"})})})}const Wa=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o,disabled:a=!1,readOnly:i=!1,className:l,direction:c="horizontal",dir:u="ltr",name:f,onChange:p,...g}=e,m=v=>{i||(p==null||p({target:{value:v}}),o==null||o(v))},b=k("qodo qodo-custom-radio-group","flex",{"flex-row gap-6":c==="horizontal","flex-col gap-3":c==="vertical"},l);return s.jsx(hC,{name:f,ref:t,value:r,defaultValue:n,onValueChange:m,disabled:a||i,readOnly:i,className:b,dir:u,...g})});Wa.displayName="BaseRadioGroupComponent";const za=({label:e,description:t,disabled:r=!1,labelClassName:n,descriptionClassName:o,labelWrapperClassName:a})=>s.jsxs("div",{className:k("flex flex-col gap-2",a),children:[e&&s.jsx("div",{className:k("text-[var(--text-bg-neutral-mid)] font-normal text-sm","group-has-[button:disabled]/radio-item:opacity-70","group-has-[button:disabled]/checkbox-item:opacity-70",{"opacity-70":r},n),children:e}),t&&s.jsx("div",{className:k("text-sm text-[var(--text-bg-neutral-mild)] font-normal",o),children:t})]});za.displayName="LabelWithDescription";const qa=({value:e="",disabled:t,error:r,name:n="radio",label:o,description:a,wrapperClassName:i,labelClassName:l,descriptionClassName:c,labelWrapperClassName:u})=>{const f=`${n}-${e}`;return s.jsxs(Fa,{htmlFor:f,className:k("group/radio-item flex items-start p-4 rounded-lg gap-2 transition-all duration-200","font-normal leading-5 cursor-pointer","has-[button:disabled]:cursor-not-allowed has-[button:disabled]:hover:bg-transparent",{"cursor-pointer":!t,"!cursor-not-allowed hover:!bg-transparent":t,"border border-destructive":r},i),children:[s.jsx(xC,{value:e,id:f,disabled:t||r}),s.jsx(za,{label:o,description:a,disabled:t,labelClassName:l,descriptionClassName:c,labelWrapperClassName:u})]},e)};qa.displayName="RadioGroupItemComponent";const bC=Mt(Wa),yC=e=>s.jsx("hr",{className:"w-full h-px border-[var(--base-sidebar-border)]",...e}),wC=({children:e,description:t,className:r})=>s.jsxs("div",{className:k("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})]}),mf=S.forwardRef(({direction:e="horizontal",className:t,...r},n)=>{const o=k("flex flex-row gap-6",{"flex-col":e==="vertical"},t);return s.jsx("div",{ref:n,className:o,...r})});mf.displayName="FormGroup";function CC({className:e,rows:t,...r}){return s.jsx("textarea",{"data-slot":"textarea",rows:t,className:k("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 SC=S.forwardRef(({variant:e="default",className:t,...r},n)=>{const o=Mt(CC);return s.jsx(o,{...r,ref:n,className:k({"font-plex-mono text-sm leading-relaxed rounded dark:bg-fill-input-neutral-idle px-3 py-2 border-0":e==="code"},t)})}),gf=({label:e,id:t,onRemoveTag:r,disabled:n,className:o,variant:a="default"})=>s.jsxs(Zt,{variant:a,disabled:n,size:"sm",className:k("flex items-center gap-1 px-2 py-0.5","font-normal whitespace-nowrap",o),children:[e,r&&s.jsx(et,{type:"button",variant:"ghost",size:"icon",className:"p-0 w-[10px] h-[10px] text-inherit disabled:text-inherit",onClick:i=>{i.stopPropagation(),r==null||r(t)},"aria-label":`Remove ${e}`,disabled:n,children:s.jsx(Rn,{className:"w-[10px] h-[10px]"})})]}),EC=({label:e,id:t,onClick:r,onDeleteSuggestion:n,deleteText:o,className:a,tagClassName:i,tagVariant:l})=>s.jsx("div",{onClick:r,className:k("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(gf,{label:e,id:t,className:i,variant:l}),n&&s.jsx(et,{type:"button",variant:"ghost",className:"p-0 text-xs font-normal h-[10px]",onMouseDown:c=>c.preventDefault(),onClick:c=>{c.stopPropagation(),n==null||n(t)},"aria-label":`${o} ${e}`,children:o||s.jsx(cv,{className:"h-4 w-4"})})]})}),No={BACKSPACE:"Backspace",ESCAPE:"Escape",ENTER:"Enter"},RC=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},vf=({value:e=[],variant:t="default",placeholder:r="Type to add a tag...",deleteText:n="Delete",suggestions:o=[],allowCreate:a=!0,maxTags:i=100,disabled:l=!1,className:c,suggestionWrapperClassName:u,suggestionClassName:f,tagClassName:p,tagInputIcon:g,onDeleteSuggestion:m,onBlur:b,normalizeTags:v=RC,onChange:x=()=>{},onAddTag:y=()=>{},onRemoveTag:h=()=>{},onResetTags:C=()=>{}})=>{const[E,j]=S.useState(""),[_,P]=S.useState(!1),N=S.useRef(null),W=S.useRef(null),U=S.useRef(null),[re,te]=S.useState();S.useEffect(()=>{W.current&&te(W.current.offsetWidth)},[]);const Q=e.length>=i,V=L=>{if(Q||e.some(K=>K.id===L.id))return;const A=[...e,L];x(A),y(L)},O=L=>{const A=e.filter(K=>K.id!==L);x(A),h(L)},I=()=>{x==null||x([]),C()},D=L=>{const A=L.target.value;j(A),P(!0)},R=()=>{const L=E.trim().toLowerCase();if(!L)return[];const A=new Set(e.map(K=>K.id));return o.filter(K=>K.label.toLowerCase().includes(L)&&!A.has(K.id))},M=L=>v?v(L):L,B=()=>{const L=E.trim();if(!L)return;const A=M(L);if(!A)return;if(e.some(ee=>ee.id===A)){j(""),P(!1);return}const K=o.find(ee=>ee.id===A||M(ee.label)===A);K?V(K):a&&V({id:A,label:A}),j(""),P(!1)},J=L=>{const A=L.key===No.BACKSPACE&&!E&&e.length>0,K=L.key===No.ENTER&&E,ee=L.key===No.ESCAPE;K?(L.preventDefault(),B(),U.current&&(U.current.scrollLeft=U.current.scrollWidth)):A?O(e[e.length-1].id):ee&&P(!1)},T=()=>{if(E&&R().length>0)return s.jsx(Ea,{className:"p-0 border-transparent bg-[var(--fill-interactive-neutral-idle)] gap-2",align:"start",style:{width:re??void 0},onOpenAutoFocus:L=>L.preventDefault(),onCloseAutoFocus:L=>L.preventDefault(),onMouseDown:L=>L.preventDefault(),children:s.jsx("div",{className:k("max-h-[200px] overflow-y-auto flex flex-col gap-1 p-1",u),children:R().map(L=>s.jsx(EC,{label:L.label,id:L.id,onDeleteSuggestion:m,deleteText:n,className:f,tagClassName:p,tagVariant:t,onClick:()=>{var A;V(L),j(""),P(!1),(A=N.current)==null||A.focus()}},L.id))})})},G=()=>g||s.jsx(iv,{className:"h-4 w-4 stroke-[var(--icon-bg-neutral-mild)]"}),Z=()=>e.map(L=>s.jsx(gf,{label:L.label,id:L.id,onRemoveTag:O,disabled:l,className:p,variant:t},L.id)),z=()=>e.length===0?s.jsx(s.Fragment,{}):s.jsx(Rn,{className:"h-4 w-4 hover:cursor-pointer stroke-[var(--icon-input-neutral-idle)] hover:stroke-[var(--icon-input-neutral-hover)]",onClick:I});return s.jsx("div",{className:k("w-full",c),children:s.jsxs(Ca,{open:_&&!l,onOpenChange:P,modal:!1,children:[s.jsx(Sa,{className:"w-full",children:s.jsxs("div",{ref:W,tabIndex:-1,className:k("flex items-center gap-2 border border-[var(--border-tag-neutral-idle)] bg-purple-muted-800 py-0.5 px-3 rounded-md scrollbar-thin",{"opacity-60":l}),onClick:L=>{var A;L.stopPropagation(),P(!0),(A=N.current)==null||A.focus()},children:[G(),s.jsxs("div",{ref:U,className:"flex items-center gap-2 w-full whitespace-normal overflow-x-auto",children:[Z(),s.jsx(Pr,{ref:N,value:E,onChange:D,onClick:L=>L.stopPropagation(),onFocus:()=>P(!0),onBlur:b,onKeyDown:J,placeholder:r,disabled:l||Q,className:k("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")})]}),z()]})}),T()]})})};function kC(e){const{control:t}=lr();return s.jsx(Au,{name:e.name,control:t,render:({field:r})=>s.jsx(vf,{...e,value:r.value,onChange:r.onChange,onBlur:r.onBlur})})}const NC=Mt(kC),jC=12,xi={SINGLE:"single",MULTIPLE:"multiple"},bi={LTR:"ltr"};var hf=typeof global=="object"&&global&&global.Object===Object&&global,PC=typeof self=="object"&&self&&self.Object===Object&&self,yt=hf||PC||Function("return this")(),bn=yt.Symbol,xf=Object.prototype,TC=xf.hasOwnProperty,_C=xf.toString,mr=bn?bn.toStringTag:void 0;function AC(e){var t=TC.call(e,mr),r=e[mr];try{e[mr]=void 0;var n=!0}catch{}var o=_C.call(e);return n&&(t?e[mr]=r:delete e[mr]),o}var IC=Object.prototype,MC=IC.toString;function OC(e){return MC.call(e)}var DC="[object Null]",$C="[object Undefined]",yi=bn?bn.toStringTag:void 0;function Fr(e){return e==null?e===void 0?$C:DC:yi&&yi in Object(e)?AC(e):OC(e)}function Ua(e){return e!=null&&typeof e=="object"}var LC=Array.isArray;function bf(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var FC="[object AsyncFunction]",VC="[object Function]",BC="[object GeneratorFunction]",GC="[object Proxy]";function yf(e){if(!bf(e))return!1;var t=Fr(e);return t==VC||t==BC||t==FC||t==GC}var jo=yt["__core-js_shared__"],wi=(function(){var e=/[^.]+$/.exec(jo&&jo.keys&&jo.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function WC(e){return!!wi&&wi in e}var zC=Function.prototype,qC=zC.toString;function Ot(e){if(e!=null){try{return qC.call(e)}catch{}try{return e+""}catch{}}return""}var UC=/[\\^$.*+?()[\]{}|]/g,HC=/^\[object .+?Constructor\]$/,KC=Function.prototype,YC=Object.prototype,XC=KC.toString,ZC=YC.hasOwnProperty,JC=RegExp("^"+XC.call(ZC).replace(UC,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function QC(e){if(!bf(e)||WC(e))return!1;var t=yf(e)?JC:HC;return t.test(Ot(e))}function e1(e,t){return e==null?void 0:e[t]}function Vr(e,t){var r=e1(e,t);return QC(r)?r:void 0}var Jo=Vr(yt,"WeakMap"),t1=9007199254740991;function wf(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=t1}function r1(e){return e!=null&&wf(e.length)&&!yf(e)}var n1=Object.prototype;function Cf(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||n1;return e===r}var o1="[object Arguments]";function Ci(e){return Ua(e)&&Fr(e)==o1}var Sf=Object.prototype,a1=Sf.hasOwnProperty,s1=Sf.propertyIsEnumerable,i1=Ci((function(){return arguments})())?Ci:function(e){return Ua(e)&&a1.call(e,"callee")&&!s1.call(e,"callee")};function l1(){return!1}var Ef=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Si=Ef&&typeof module=="object"&&module&&!module.nodeType&&module,c1=Si&&Si.exports===Ef,Ei=c1?yt.Buffer:void 0,d1=Ei?Ei.isBuffer:void 0,u1=d1||l1,f1="[object Arguments]",p1="[object Array]",m1="[object Boolean]",g1="[object Date]",v1="[object Error]",h1="[object Function]",x1="[object Map]",b1="[object Number]",y1="[object Object]",w1="[object RegExp]",C1="[object Set]",S1="[object String]",E1="[object WeakMap]",R1="[object ArrayBuffer]",k1="[object DataView]",N1="[object Float32Array]",j1="[object Float64Array]",P1="[object Int8Array]",T1="[object Int16Array]",_1="[object Int32Array]",A1="[object Uint8Array]",I1="[object Uint8ClampedArray]",M1="[object Uint16Array]",O1="[object Uint32Array]",pe={};pe[N1]=pe[j1]=pe[P1]=pe[T1]=pe[_1]=pe[A1]=pe[I1]=pe[M1]=pe[O1]=!0;pe[f1]=pe[p1]=pe[R1]=pe[m1]=pe[k1]=pe[g1]=pe[v1]=pe[h1]=pe[x1]=pe[b1]=pe[y1]=pe[w1]=pe[C1]=pe[S1]=pe[E1]=!1;function D1(e){return Ua(e)&&wf(e.length)&&!!pe[Fr(e)]}function $1(e){return function(t){return e(t)}}var Rf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Cr=Rf&&typeof module=="object"&&module&&!module.nodeType&&module,L1=Cr&&Cr.exports===Rf,Po=L1&&hf.process,Ri=(function(){try{var e=Cr&&Cr.require&&Cr.require("util").types;return e||Po&&Po.binding&&Po.binding("util")}catch{}})(),ki=Ri&&Ri.isTypedArray,F1=ki?$1(ki):D1;function V1(e,t){return function(r){return e(t(r))}}var B1=V1(Object.keys,Object),G1=Object.prototype,W1=G1.hasOwnProperty;function z1(e){if(!Cf(e))return B1(e);var t=[];for(var r in Object(e))W1.call(e,r)&&r!="constructor"&&t.push(r);return t}var Qo=Vr(yt,"Map"),ea=Vr(yt,"DataView"),ta=Vr(yt,"Promise"),ra=Vr(yt,"Set"),Ni="[object Map]",q1="[object Object]",ji="[object Promise]",Pi="[object Set]",Ti="[object WeakMap]",_i="[object DataView]",U1=Ot(ea),H1=Ot(Qo),K1=Ot(ta),Y1=Ot(ra),X1=Ot(Jo),Rt=Fr;(ea&&Rt(new ea(new ArrayBuffer(1)))!=_i||Qo&&Rt(new Qo)!=Ni||ta&&Rt(ta.resolve())!=ji||ra&&Rt(new ra)!=Pi||Jo&&Rt(new Jo)!=Ti)&&(Rt=function(e){var t=Fr(e),r=t==q1?e.constructor:void 0,n=r?Ot(r):"";if(n)switch(n){case U1:return _i;case H1:return Ni;case K1:return ji;case Y1:return Pi;case X1:return Ti}return t});var Z1="[object Map]",J1="[object Set]",Q1=Object.prototype,eS=Q1.hasOwnProperty;function cr(e){if(e==null)return!0;if(r1(e)&&(LC(e)||typeof e=="string"||typeof e.splice=="function"||u1(e)||F1(e)||i1(e)))return!e.length;var t=Rt(e);if(t==Z1||t==J1)return!e.size;if(Cf(e))return!z1(e).length;for(var r in e)if(eS.call(e,r))return!1;return!0}function to(e){return!e.children||e.children.length===0?[e.value]:e.children.flatMap(t=>to(t))}function Ha(e){const t=[e.value];return e.children&&e.children.forEach(r=>{t.push(...Ha(r))}),t}function Ka(e,t){return cr(e.children)?!1:to(e).every(n=>t.has(n))}function tS(e,t){return cr(e.children)?!1:to(e).some(n=>t.has(n))}function kf(e,t){for(const r of e){if(r.value===t)return r;if(r.children){const n=kf(r.children,t);if(n)return n}}return null}function Ya(e,t){const r=new Map;for(const n of e){const o=t(n);o&&r.set(o[0],o[1]),n.children&&Ya(n.children,t).forEach((i,l)=>r.set(l,i))}return r}function Nf(e,t){e.forEach(r=>{cr(r.children)||(Ka(r,t)?t.add(r.value):t.delete(r.value),r.children&&Nf(r.children,t))})}const rS=e=>e?Array.isArray(e)?e:[e]:[],nS=e=>Ya(e,t=>[t.value,t.label]),oS=e=>Ya(e,t=>t.icon?[t.value,t.icon]:null);function aS(e,t){Ha(e).forEach(n=>t.delete(n))}function sS(e,t){Ha(e).forEach(n=>t.add(n))}function jf(e,t){const r=new Set(t);return e.flatMap(n=>!cr(n.children)&&n.children?Ka(n,r)?[n.value]:jf(n.children,t):r.has(n.value)?[n.value]:[])}function iS(e){return e&&e>1?e*jC:0}function Pf({option:e,selected:t,onSelect:r,nestLevel:n=0,disabled:o=!1,dir:a=bi.LTR}){const i=!cr(e.children),l=t.has(e.value),c=`${iS(n)}px`,u=Ka(e,t),p=tS(e,t)&&!u,g=l||u,m=()=>{if(n!==0)return s.jsx(Ug,{className:"w-4 text-[var(--text-interactive-neutral-idle)]"})},b=()=>{if(e.icon)return s.jsx("div",{className:"flex-shrink-0 [&>svg]:text-[var(--text-interactive-neutral-idle)]!",children:e.icon})},v=()=>p?s.jsx(Kg,{className:"w-2 h-2 flex-shrink-0 transition-opacity text-[var(--text-interactive-neutral-idle)]"}):s.jsx(rr,{className:k("h-4 w-4 flex-shrink-0 transition-opacity text-[var(--text-interactive-neutral-idle)] opacity-0",{"opacity-100":g})}),x=()=>{if(i)return e.children.map(h=>s.jsx(Pf,{option:h,selected:t,onSelect:r,nestLevel:n+1,dir:a},h.value))},y=()=>s.jsxs("div",{className:k("flex items-center w-full gap-2 flex-row",{"flex-row-reverse":a===bi.LTR}),style:{paddingLeft:c},children:[s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[m(),b(),s.jsx("span",{className:"flex-1 text-[var(--text-interactive-neutral-active)]",children:e.label})]}),v()]});return s.jsxs("div",{children:[s.jsx(pd,{disabled:e.disabled||o,onSelect:()=>r(e.value,i),className:k("text-[var(--text-interactive-neutral-idle)] hover:text-[var(--text-interactive-neutral-hover)]! cursor-pointer disabled:cursor-not-allowed","focus:text-[var(--text-interactive-neutral-active)] data-[selected=true]:text-[var(--text-interactive-neutral-hover)]!",{"bg-[var(--fill-interactive-neutral-idle)]":g}),children:y()}),x()]})}function Tf({value:e,options:t=[],onSelect:r,disabled:n=!1,mode:o=xi.SINGLE,placeholder:a="Select...",inputPlaceholder:i="Search...",emptyState:l="No option found.",triggerClassName:c,triggerWrapperClassName:u,badgeClassName:f,badgeVariant:p="text",searchable:g=!1,toggleIcon:m=s.jsx(En,{}),dir:b="ltr",...v}){const[x,y]=S.useState(0),[h,C]=S.useState(!1),E=S.useRef(null),j=o===xi.MULTIPLE,[_,P]=S.useState(e!==void 0?e:j?[]:""),N=rS(_),W=new Set(N);S.useEffect(()=>{E.current&&y(E.current.offsetWidth)},[_]);const U=nS(t),re=oS(t);S.useEffect(()=>{e!==void 0&&P(j?e||[]:e||"")},[e,j]);function te(D,R){if(!j){P(D),r==null||r(D),C(!1);return}P(M=>{const B=Array.isArray(M)?M:[],J=new Set(B),T=kf(t,D);if(!T)return B;R?Q(T,J):V(D,J);const G=Array.from(J);return r==null||r(G),G})}function Q(D,R){to(D).every(J=>R.has(J))?aS(D,R):sS(D,R)}function V(D,R){R.has(D)?R.delete(D):R.add(D),Nf(t,R)}const O=()=>{const D=jf(t,N);return D.length===0?s.jsx(Zt,{variant:p,size:"md",className:k("text-purple-muted-300",f),children:a}):D.map(M=>{const B=re.get(M),J=U.get(M)||M;return s.jsx(Zt,{variant:p,size:"md",className:k("text-[var(--text-bg-neutral-mid)]",f),children:s.jsxs("div",{className:"flex items-center gap-1",children:[B&&s.jsx("div",{className:"flex-shrink-0",children:B}),s.jsx("span",{children:J})]})},M)})},I=()=>{if(g)return s.jsx(cd,{className:"placeholder:text-[var(--text-bg-neutral-mid)] text-[var(--text-interactive-neutral-active)]",placeholder:i})};return s.jsxs(Ca,{open:h,onOpenChange:n?void 0:C,children:[s.jsx(Sa,{asChild:!0,disabled:n,children:s.jsxs("div",{className:k("flex items-center gap-1.5 justify-between py-1 px-3 w-[100%] border border-[var(--border-interactive-neutral-idle)] bg-[var(--fill-input-neutral-idle)] rounded-sm scrollbar-thin","aria-invalid:!border-destructive aria-invalid:!ring-destructive/20 dark:aria-invalid:!ring-destructive/40",{"cursor-pointer hover:border-[var(--border-input-neutral-hover)] hover:bg-[var(--fill-input-neutral-hover)]":!n,"cursor-not-allowed opacity-75 ":n},u),ref:E,"aria-disabled":n,...v,children:[s.jsx("div",{className:k("flex justify-start text-start w-[100%] whitespace-nowrap overflow-x-auto gap-1.5",c),children:O()}),s.jsx("div",{className:"[&>svg]:text-[var(--icon-input-neutral-idle)] [&>svg]:hover:text-[var(--icon-input-neutral-hover)] [&>svg]:w-4 [&>svg]:h-4",children:m})]})}),s.jsx(Ea,{className:"p-0 border bg-[var(--fill-interactive-neutral-idle)] border-[var(--border-interactive-neutral-idle)] [&>svg]:text-purple-muted-300",style:{width:x??"auto"},children:s.jsxs(ld,{className:"bg-[var(--fill-interactive-neutral-idle)]",children:[I(),s.jsxs(dd,{children:[s.jsx(ud,{children:l}),s.jsx(fd,{children:t.map(D=>s.jsx(Pf,{disabled:n,option:D,selected:W,onSelect:te,dir:b},D.value))})]})]})})]})}const _f=S.forwardRef(e=>{const{options:t,onChange:r,readOnly:n,value:o,disabled:a,mode:i,...l}=e,c=u=>{n||r&&r({target:{value:u}})};return s.jsx(Tf,{options:t,value:o,disabled:a,...l,onSelect:c,mode:i})});_f.displayName="BaseSelectComponent";const lS=Mt(_f),Xa=S.forwardRef((e,t)=>{const{value:r=[],defaultValue:n=[],onValueChange:o,disabled:a=!1,readOnly:i=!1,className:l,direction:c="vertical",onChange:u,children:f,...p}=e,[g,m]=S.useState(cr(r)?n:r),b=c==="horizontal",v=r!==void 0?r:g,x=(C,E)=>{if(i)return;const j=E?[...v,C]:v.filter(_=>_!==C);r===void 0&&m(j),u==null||u({target:{value:j}}),o==null||o(j)},y=k("qodo qodo-custom-checkbox-group","flex",{"flex-row gap-6":b,"flex-col gap-3":!b},l),h=()=>S.Children.map(f,C=>{if(!S.isValidElement(C))return C;const E=C.props.name;if(!E)return C;const j=C.props.disabled,_=i||a||j;return S.cloneElement(C,{checked:v.includes(E),onCheckedChange:P=>x(E,P),disabled:_,name:E})});return s.jsx("div",{ref:t,className:y,...p,children:h()})});Xa.displayName="CheckboxGroupComponent";var ro="Checkbox",[cS,Gk]=ye(ro),[dS,Za]=cS(ro);function uS(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:o,disabled:a,form:i,name:l,onCheckedChange:c,required:u,value:f="on",internal_do_not_use_render:p}=e,[g,m]=be({prop:r,defaultProp:o??!1,onChange:c,caller:ro}),[b,v]=d.useState(null),[x,y]=d.useState(null),h=d.useRef(!1),C=b?!!i||!!b.closest("form"):!0,E={checked:g,disabled:a,setChecked:m,control:b,setControl:v,name:l,form:i,value:f,hasConsumerStoppedPropagationRef:h,required:u,defaultChecked:ct(o)?!1:o,isFormControl:C,bubbleInput:x,setBubbleInput:y};return s.jsx(dS,{scope:t,...E,children:fS(p)?p(E):n})}var Af="CheckboxTrigger",If=d.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},o)=>{const{control:a,value:i,disabled:l,checked:c,required:u,setControl:f,setChecked:p,hasConsumerStoppedPropagationRef:g,isFormControl:m,bubbleInput:b}=Za(Af,e),v=ae(o,f),x=d.useRef(c);return d.useEffect(()=>{const y=a==null?void 0:a.form;if(y){const h=()=>p(x.current);return y.addEventListener("reset",h),()=>y.removeEventListener("reset",h)}},[a,p]),s.jsx(q.button,{type:"button",role:"checkbox","aria-checked":ct(c)?"mixed":c,"aria-required":u,"data-state":Lf(c),"data-disabled":l?"":void 0,disabled:l,value:i,...n,ref:v,onKeyDown:F(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:F(r,y=>{p(h=>ct(h)?!0:!h),b&&m&&(g.current=y.isPropagationStopped(),g.current||y.stopPropagation())})})});If.displayName=Af;var Ja=d.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:o,defaultChecked:a,required:i,disabled:l,value:c,onCheckedChange:u,form:f,...p}=e;return s.jsx(uS,{__scopeCheckbox:r,checked:o,defaultChecked:a,disabled:l,required:i,onCheckedChange:u,name:n,form:f,value:c,internal_do_not_use_render:({isFormControl:g})=>s.jsxs(s.Fragment,{children:[s.jsx(If,{...p,ref:t,__scopeCheckbox:r}),g&&s.jsx($f,{__scopeCheckbox:r})]})})});Ja.displayName=ro;var Mf="CheckboxIndicator",Of=d.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...o}=e,a=Za(Mf,r);return s.jsx(Ce,{present:n||ct(a.checked)||a.checked===!0,children:s.jsx(q.span,{"data-state":Lf(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Of.displayName=Mf;var Df="CheckboxBubbleInput",$f=d.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:i,required:l,disabled:c,name:u,value:f,form:p,bubbleInput:g,setBubbleInput:m}=Za(Df,e),b=ae(r,m),v=On(a),x=An(n);d.useEffect(()=>{const h=g;if(!h)return;const C=window.HTMLInputElement.prototype,j=Object.getOwnPropertyDescriptor(C,"checked").set,_=!o.current;if(v!==a&&j){const P=new Event("click",{bubbles:_});h.indeterminate=ct(a),j.call(h,ct(a)?!1:a),h.dispatchEvent(P)}},[g,v,a,o]);const y=d.useRef(ct(a)?!1:a);return s.jsx(q.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??y.current,required:l,disabled:c,name:u,value:f,form:p,...t,tabIndex:-1,ref:b,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});$f.displayName=Df;function fS(e){return typeof e=="function"}function ct(e){return e==="indeterminate"}function Lf(e){return ct(e)?"indeterminate":e?"checked":"unchecked"}const Ff=d.forwardRef(({className:e,...t},r)=>s.jsx(Ja,{ref:r,className:k("h-4 w-4 shrink-0 rounded-xs shadow disabled:cursor-not-allowed bg-[var(--fill-input-neutral-idle)] border border-[var(--border-input-neutral-idle)] hover:border-[var(--border-input-neutral-hover)] hover:bg-[var(--fill-input-neutral-hover)] ","active:border-[var(--border-input-neutral-active)] active:bg-[var(--fill-input-neutral-active)] disabled:border-[var(--border-input-neutral-disabled)] disabled:bg-[var(--fill-input-neutral-disabled)] ","hover:disabled:border-[var(--border-input-neutral-disabled)] hover:disabled:bg-[var(--fill-input-neutral-disabled)] ","data-[state=checked]:border-[var(--border-input-emphasis-idle)] data-[state=checked]:bg-[var(--fill-input-emphasis-idle)] hover:data-[state=checked]:border-[var(--border-input-emphasis-hover)] hover:data-[state=checked]:bg-[var(--fill-input-emphasis-hover)] active:data-[state=checked]:border-[var(--border-input-emphasis-active)] active:data-[state=checked]:bg-[var(--fill-input-emphasis-active)] disabled:data-[state=checked]:border-[var(--border-input-emphasis-disabled)] disabled:data-[state=checked]:bg-[var(--fill-input-emphasis-disabled)] ",e),...t,children:s.jsx(Of,{className:k("flex items-center justify-center text-current"),children:t.checked==="indeterminate"?s.jsx(ov,{className:"h-4 w-4 stroke-[var(--icon-input-emphasis-idle)]"}):s.jsx(rr,{className:"h-4 w-4 stroke-[var(--icon-input-emphasis-idle)]"})})}));Ff.displayName=Ja.displayName;const Qa=({disabled:e,error:t,name:r="checkbox",checked:n,onCheckedChange:o,label:a,description:i,labelWrapperClassName:l,labelClassName:c,descriptionClassName:u,checkboxClassName:f,wrapperClassName:p})=>s.jsxs(Fa,{htmlFor:r,className:k("group/checkbox-item 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":!e,"cursor-not-allowed":e,"border border-destructive":t},p),children:[s.jsx(Ff,{id:r,disabled:e||t,checked:n,onCheckedChange:o,className:k("mt-0.5",f)}),s.jsx(za,{label:a,description:i,disabled:e,labelClassName:c,descriptionClassName:u,labelWrapperClassName:l})]});Qa.displayName="CheckboxGroupItemComponent";const pS=Mt(Xa),je=e=>{const{className:t,disabled:r=!1,readOnly:n=!1,methods:o,onSubmit:a=()=>{},...i}=e,{handleSubmit:l}=o,c=k("qodo qodo-form","flex flex-col gap-6",t);return s.jsx(Mu,{methods:o,disabled:r,readOnly:n,children:s.jsx("form",{className:c,onSubmit:l(a),...i})})};je.Button=h0;je.Input=rC;je.Select=lS;je.Combobox=oC;je.RadioGroup=bC;je.RadioGroupItem=qa;je.Group=mf;je.Textarea=SC;je.Divider=yC;je.Title=wC;je.TagsInput=NC;je.CheckboxGroup=pS;je.Checkbox=Qa;function mS(e){return e==null?[]:Array.isArray(e)?e:[e]}var gS=e=>Array.from(Array(e).keys()),Ai=e=>(e==null?void 0:e.constructor.name)==="Array",vS=(e,t)=>{if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!es(e[r],t[r]))return!1;return!0},es=(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(Ai(e)&&Ai(t))return vS(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(!es(e[a],t[a]))return!1}return!0},hS=e=>e!=null&&typeof e=="object",sn=e=>typeof e=="string",hr=e=>typeof e=="function",xS=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),bS=e=>Object.prototype.toString.call(e),Vf=Function.prototype.toString,yS=Vf.call(Object),wS=e=>{if(!hS(e)||bS(e)!="[object Object]"||ES(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const r=xS(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Vf.call(r)==yS},CS=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,SS=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,ES=e=>CS(e)||SS(e),RS=e=>e(),kS=(...e)=>(...t)=>{e.forEach(function(r){r==null||r(...t)})},NS=e=>Number.isNaN(e),jS=e=>NS(e)?0:e,PS=(e,t,r)=>{const n=jS(e),o=n>=t,a=r==null||n<=r;return o&&a};function Bf(e){if(!wS(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]=Bf(o))}return r}function Ii(...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 TS(e,t){if(e==null)throw new Error(t())}var Gf=e=>typeof e=="object"&&e!==null,We=e=>e?"":void 0,_S=9,AS=e=>Gf(e)&&e.nodeType===_S,IS=e=>Gf(e)&&e===e.window;function MS(e){if(!e)return!1;const t=e.getRootNode();return Wf(t)===e}function OS(e){return AS(e)?e:IS(e)?e.document:(e==null?void 0:e.ownerDocument)??document}function Wf(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 DS=(...e)=>e.map(t=>{var r;return(r=t==null?void 0:t.trim)==null?void 0:r.call(t)}).filter(Boolean).join(" "),$S=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Mi=e=>{const t={};let r;for(;r=$S.exec(e);)t[r[1]]=r[2];return t},LS=(e,t)=>{if(sn(e)){if(sn(t))return`${e};${t}`;e=Mi(e)}else sn(t)&&(t=Mi(t));return Object.assign({},e??{},t??{})};function Be(...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]=kS(r[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=DS(t[o],r[o]);continue}if(o==="style"){t[o]=LS(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 FS(e,t,r){let n=[],o;return a=>{const i=e(a);return(i.length!==n.length||i.some((c,u)=>!es(n[u],c)))&&(n=i,o=t(i,a)),o}}var Ut=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Ut||{}),To="__init__";function VS(e){const t=()=>{var i;return((i=e.getRootNode)==null?void 0:i.call(e))??document},r=()=>OS(t());return{...e,getRootNode:t,getDoc:r,getWin:()=>r().defaultView??window,getActiveElement:()=>Wf(t()),isActiveElement:MS,getById:i=>t().getElementById(i)}}function BS(e){return new Proxy({},{get(t,r){return r==="style"?n=>e({style:n}).style:e}})}var GS=()=>e=>Array.from(new Set(e)),zf=typeof globalThis.document<"u"?S.useLayoutEffect:S.useEffect;function yn(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 c=S.useRef(l.current);zf(()=>{c.current=l.current},[o,e().value]);const u=p=>{var b,v;const g=c.current,m=hr(p)?p(g):p;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:m,prev:g}),i||a(m),r(m,g)||(v=(b=e()).onChange)==null||v.call(b,m,g)};function f(){return i?e().value:o}return{initial:n,ref:l,get:f,set(p){(e().sync?jr.flushSync:RS)(()=>u(p))},invoke(p,g){var m,b;(b=(m=e()).onChange)==null||b.call(m,p,g)},hash(p){var g,m;return((m=(g=e()).hash)==null?void 0:m.call(g,p))??String(p)}}}yn.cleanup=e=>{S.useEffect(()=>e,[])};yn.ref=e=>{const t=S.useRef(e);return{get:()=>t.current,set:r=>{t.current=r}}};function WS(e){const t=S.useRef(e);return{get(r){return t.current[r]},set(r,n){t.current[r]=n}}}var zS=(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 qS(e,t={}){var re,te,Q,V;const r=S.useMemo(()=>{const{id:O,ids:I,getRootNode:D}=t;return VS({id:O,ids:I,getRootNode:D})},[t]),n=(...O)=>{e.debug&&console.log(...O)},o=((re=e.props)==null?void 0:re.call(e,{props:Bf(t),scope:r}))??t,a=US(o),i=(te=e.context)==null?void 0:te.call(e,{prop:a,bindable:yn,scope:r,flush:Oi,getContext(){return c},getComputed(){return j},getRefs(){return v},getEvent(){return m()}}),l=qf(i),c={get(O){var I;return(I=l.current)==null?void 0:I[O].ref.current},set(O,I){var D;(D=l.current)==null||D[O].set(I)},initial(O){var I;return(I=l.current)==null?void 0:I[O].initial},hash(O){var D,R;const I=(D=l.current)==null?void 0:D[O].get();return(R=l.current)==null?void 0:R[O].hash(I)}},u=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}}),b=()=>({..._,matches(...O){return O.includes(_.ref.current)},hasTag(O){var I,D;return!!((D=(I=e.states[_.ref.current])==null?void 0:I.tags)!=null&&D.includes(O))}}),v=WS(((Q=e.refs)==null?void 0:Q.call(e,{prop:a,context:c}))??{}),x=()=>({state:b(),context:c,event:m(),prop:a,send:U,action:y,guard:h,track:zS,refs:v,computed:j,flush:Oi,scope:r,choose:E}),y=O=>{const I=hr(O)?O(x()):O;if(!I)return;const D=I.map(R=>{var B,J;const M=(J=(B=e.implementations)==null?void 0:B.actions)==null?void 0:J[R];return M||Ii(`[zag-js] No implementation found for action "${JSON.stringify(R)}"`),M});for(const R of D)R==null||R(x())},h=O=>{var I,D;return hr(O)?O(x()):(D=(I=e.implementations)==null?void 0:I.guards)==null?void 0:D[O](x())},C=O=>{const I=hr(O)?O(x()):O;if(!I)return;const D=I.map(M=>{var J,T;const B=(T=(J=e.implementations)==null?void 0:J.effects)==null?void 0:T[M];return B||Ii(`[zag-js] No implementation found for effect "${JSON.stringify(M)}"`),B}),R=[];for(const M of D){const B=M==null?void 0:M(x());B&&R.push(B)}return()=>R.forEach(M=>M==null?void 0:M())},E=O=>mS(O).find(I=>{let D=!I.guard;return sn(I.guard)?D=!!h(I.guard):hr(I.guard)&&(D=I.guard(x())),D}),j=O=>{TS(e.computed,()=>"[zag-js] No computed object found on machine");const I=e.computed[O];return I({context:c,event:m(),prop:a,refs:v,scope:r,computed:j})},_=yn(()=>({defaultValue:e.initialState({prop:a}),onChange(O,I){var R,M,B,J;if(I){const T=u.current.get(I);T==null||T(),u.current.delete(I)}I&&y((R=e.states[I])==null?void 0:R.exit),y((M=f.current)==null?void 0:M.actions);const D=C((B=e.states[O])==null?void 0:B.effects);if(D&&u.current.set(O,D),I===To){y(e.entry);const T=C(e.effects);T&&u.current.set(To,T)}y((J=e.states[O])==null?void 0:J.entry)}})),P=S.useRef(void 0),N=S.useRef(Ut.NotStarted);zf(()=>{queueMicrotask(()=>{const D=N.current===Ut.Started;N.current=Ut.Started,n(D?"rehydrating...":"initializing...");const R=P.current??_.initial;_.invoke(R,D?_.get():To)});const O=u.current,I=_.ref.current;return()=>{n("unmounting..."),P.current=I,N.current=Ut.Stopped,O.forEach(D=>D==null?void 0:D()),u.current=new Map,f.current=null,queueMicrotask(()=>{y(e.exit)})}},[]);const W=()=>"ref"in _?_.ref.current:_.get(),U=O=>{queueMicrotask(()=>{var J,T;if(N.current!==Ut.Started)return;p.current=g.current,g.current=O;let I=W();const D=((J=e.states[I].on)==null?void 0:J[O.type])??((T=e.on)==null?void 0:T[O.type]),R=E(D);if(!R)return;f.current=R;const M=R.target??I;n("transition",O.type,R.target||I,`(${R.actions})`);const B=M!==I;B?jr.flushSync(()=>_.set(M)):R.reenter&&!B?_.invoke(I,I):y(R.actions??[])})};return(V=e.watch)==null||V.call(e,x()),{state:b(),send:U,context:c,prop:a,scope:r,refs:v,computed:j,event:m(),getStatus:()=>N.current}}function qf(e){const t=S.useRef(e);return t.current=e,t}function US(e){const t=qf(e);return function(n){return t.current[n]}}function Oi(e){queueMicrotask(()=>{jr.flushSync(()=>e())})}var HS=BS(e=>e);function KS(...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 YS(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 _o=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),c=YS(l);return S.cloneElement(l,{...Be(i,l.props),ref:n?KS(n,c):c})}));return t.displayName=e.displayName||e.name,t},XS=()=>{const e=new Map;return new Proxy(_o,{apply(t,r,n){return _o(n[0])},get(t,r){const n=r;return e.has(n)||e.set(n,_o(n)),e.get(n)}})},Xe=XS();function ZS(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Br(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 c(){var f;const u=S.useContext(l);if(!u&&r){const p=new Error(a??ZS(n,o));throw p.name="ContextError",(f=Error.captureStackTrace)==null||f.call(Error,p,c),p}return u}return[l.Provider,c,l]}const[JS,ot]=Br({name:"StepsContext",hookName:"useStepsContext",providerName:"<StepsProvider />"}),Uf=S.forwardRef((e,t)=>{const r=ot(),n=Be(r.getContentProps({index:r.count}),e);return s.jsx(Xe.div,{...n,ref:t})});Uf.displayName="StepsCompletedContent";const ts=()=>(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}]),Hf=S.forwardRef((e,t)=>{const[r,n]=ts()(e,["index"]),o=ot(),a=Be(o.getContentProps(r),n);return s.jsx(Xe.div,{...a,ref:t})});Hf.displayName="StepsContent";const[QS,rs]=Br({name:"StepsItemPropsContext",hookName:"useStepsItemPropsContext",providerName:"<StepsItemPropsProvider />"}),Kf=S.forwardRef((e,t)=>{const r=ot(),n=rs(),o=Be(r.getIndicatorProps(n),e);return s.jsx(Xe.div,{...o,ref:t})});Kf.displayName="StepsIndicator";const[eE,Wk]=Br({name:"StepsItemContext",hookName:"useStepsItemContext",providerName:"<StepsItem />"}),Yf=S.forwardRef((e,t)=>{const[r,n]=ts()(e,["index"]),o=ot(),a=Be(o.getItemProps(r),n),i=o.getItemState(r);return s.jsx(QS,{value:r,children:s.jsx(eE,{value:i,children:s.jsx(Xe.div,{...a,ref:t})})})});Yf.displayName="StepsItem";const Xf=S.forwardRef((e,t)=>{const r=ot(),n=Be(r.getListProps(),e);return s.jsx(Xe.div,{...n,ref:t})});Xf.displayName="StepsList";const Zf=S.forwardRef((e,t)=>{const r=ot(),n=Be(r.getNextTriggerProps(),e);return s.jsx(Xe.button,{...n,ref:t})});Zf.displayName="StepsNextTrigger";const Jf=S.forwardRef((e,t)=>{const r=ot(),n=Be(r.getPrevTriggerProps(),e);return s.jsx(Xe.button,{...n,ref:t})});Jf.displayName="StepsPrevTrigger";var xr=(e,t=[])=>({parts:(...r)=>{if(tE(t))return xr(e,r);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...r)=>xr(e,[...t,...r]),omit:(...r)=>xr(e,t.filter(n=>!r.includes(n))),rename:r=>xr(r,t),keys:()=>t,build:()=>[...new Set(t)].reduce((r,n)=>Object.assign(r,{[n]:{selector:[`&[data-scope="${Wt(e)}"][data-part="${Wt(n)}"]`,`& [data-scope="${Wt(e)}"][data-part="${Wt(n)}"]`].join(", "),attrs:{"data-scope":Wt(e),"data-part":Wt(n)}}}),{})}),Wt=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),tE=e=>e.length===0,rE=xr("steps").parts("root","list","item","trigger","indicator","separator","content","nextTrigger","prevTrigger","progress"),ze=rE.build(),nE=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`steps:${e.id}`},oE=e=>{var t;return((t=e.ids)==null?void 0:t.list)??`steps:${e.id}:list`},Di=(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}`},aE=(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 sE(e,t){const{context:r,send:n,computed:o,prop:a,scope:i}=e,l=r.get("step"),c=a("count"),u=o("percent"),f=o("hasNextStep"),p=o("hasPrevStep"),g=y=>({triggerId:Di(i,y.index),contentId:aE(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===c-1}),m=()=>{n({type:"STEP.NEXT",src:"next.trigger.click"})},b=()=>{n({type:"STEP.PREV",src:"prev.trigger.click"})},v=()=>{n({type:"STEP.RESET",src:"reset.trigger.click"})},x=y=>{n({type:"STEP.SET",value:y,src:"api.setValue"})};return{value:l,count:c,percent:u,hasNextStep:f,hasPrevStep:p,isCompleted:o("completed"),goToNextStep:m,goToPrevStep:b,resetStep:v,getItemState:g,setStep:x,getRootProps(){return t.element({...ze.root.attrs,id:nE(i),dir:a("dir"),"data-orientation":a("orientation"),style:{"--percent":`${u}%`}})},getListProps(){const h=gS(c).map((C,E)=>Di(i,E));return t.element({...ze.list.attrs,dir:a("dir"),id:oE(i),role:"tablist","aria-owns":h.join(" "),"aria-orientation":a("orientation"),"data-orientation":a("orientation")})},getItemProps(y){const h=g(y);return t.element({...ze.item.attrs,dir:a("dir"),"aria-current":h.current?"step":void 0,"data-orientation":a("orientation")})},getTriggerProps(y){const h=g(y);return t.button({...ze.trigger.attrs,id:h.triggerId,role:"tab",dir:a("dir"),tabIndex:!a("linear")||h.current?0:-1,"aria-selected":h.current,"aria-controls":h.contentId,"data-state":h.current?"open":"closed","data-orientation":a("orientation"),"data-complete":We(h.completed),"data-current":We(h.current),"data-incomplete":We(h.incomplete),onClick(C){C.defaultPrevented||a("linear")||n({type:"STEP.SET",value:y.index,src:"trigger.click"})}})},getContentProps(y){const h=g(y);return t.element({...ze.content.attrs,dir:a("dir"),id:h.contentId,role:"tabpanel",tabIndex:0,hidden:!h.current,"data-state":h.current?"open":"closed","data-orientation":a("orientation"),"aria-labelledby":h.triggerId})},getIndicatorProps(y){const h=g(y);return t.element({...ze.indicator.attrs,dir:a("dir"),"aria-hidden":!0,"data-complete":We(h.completed),"data-current":We(h.current),"data-incomplete":We(h.incomplete)})},getSeparatorProps(y){const h=g(y);return t.element({...ze.separator.attrs,dir:a("dir"),"data-orientation":a("orientation"),"data-complete":We(h.completed),"data-current":We(h.current),"data-incomplete":We(h.incomplete)})},getNextTriggerProps(){return t.button({...ze.nextTrigger.attrs,dir:a("dir"),type:"button",disabled:!f,onClick(y){y.defaultPrevented||m()}})},getPrevTriggerProps(){return t.button({dir:a("dir"),...ze.prevTrigger.attrs,type:"button",disabled:!p,onClick(y){y.defaultPrevented||b()}})},getProgressProps(){return t.element({dir:a("dir"),...ze.progress.attrs,role:"progressbar","aria-valuenow":u,"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":`${u}% complete`,"data-complete":We(u===100)})}}}var iE={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:FS(({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}){lE(t("count"),e.get("step"))}}}},lE=(e,t)=>{if(!PS(t,0,e))throw new RangeError(`[zag-js/steps] step index ${t} is out of bounds`)};GS()(["count","dir","getRootNode","id","ids","linear","onStepChange","onStepComplete","orientation","step","defaultStep"]);const[zk,cE]=Br({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[qk,dE]=Br({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}});function uE(e){const t=S.useId(),{getRootNode:r}=cE(),{dir:n}=dE(),o={id:t,dir:n,getRootNode:r,...e},a=qS(iE,o);return sE(a,HS)}const Qf=S.forwardRef((e,t)=>{const[r,n]=ts()(e,["defaultStep","id","ids","count","linear","onStepChange","onStepComplete","orientation","step"]),o=uE(r),a=Be(o.getRootProps(),n);return s.jsx(JS,{value:o,children:s.jsx(Xe.div,{...a,ref:t})})});Qf.displayName="StepsRoot";const ep=S.forwardRef((e,t)=>{const r=ot(),n=rs(),o=Be(r.getSeparatorProps(n),e);return s.jsx(Xe.div,{...o,ref:t})});ep.displayName="StepsSeparator";const tp=S.forwardRef((e,t)=>{const r=ot(),n=rs(),o=Be(r.getTriggerProps(n),e);return s.jsx(Xe.button,{...o,ref:t})});tp.displayName="StepsTrigger";function fE(e){return Lu({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 rp=S.createContext(void 0),pE=({children:e,step:t})=>s.jsx(rp.Provider,{value:{step:t},children:e}),np=()=>{const e=S.useContext(rp);if(!e)throw new Error("useSteps must be used within a StepsProvider");return e},mE=({className:e,step:t,...r})=>{const n=k("qodo qodo-steps","flex flex-col gap-4",e);return s.jsx(pE,{step:t??0,children:s.jsx(Qf,{className:n,step:t,...r})})},gE=({className:e,...t})=>{const r=k("flex flex-row gap-4",e);return s.jsx(Xf,{className:r,...t})},vE=({className:e,...t})=>{const r=k("flex flex-row items-center gap-4",e);return s.jsx(Yf,{className:r,...t})},hE=({className:e,...t})=>{const r=k("flex flex-row items-center gap-4 text-purple-muted-100 text-sm",e);return s.jsx(tp,{className:r,...t})},xE=({index:e,className:t,...r})=>{const{step:n}=np(),o=e===n,a=e<n,i=k("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=k({"text-white":o,"text-purple-muted-300":!a&&e!==n});return s.jsx(Kf,{className:i,...r,children:a?s.jsx(fE,{className:"text-green-400"}):s.jsx("span",{className:l,children:e+1})})},bE=({index:e,className:t,...r})=>{const{step:n}=np(),o=e<n,a=k("min-w-12 h-px",o?"bg-green-400":"bg-gray-400",t);return s.jsx(ep,{className:a,...r})},yE=({className:e,...t})=>{const r=k(e);return s.jsx(Hf,{className:r,...t})},wE=({className:e,...t})=>{const r=k(e);return s.jsx(Uf,{className:r,...t})},CE=({className:e,...t})=>{const r=k("bg-primary text-white px-4 py-2 rounded-md",e);return s.jsx(Jf,{className:r,...t})},SE=({className:e,...t})=>{const r=k("bg-primary text-white px-4 py-2 rounded-md",e);return s.jsx(Zf,{className:r,...t})},EE={Root:mE,List:gE,Item:vE,Trigger:hE,Indicator:xE,Separator:bE,Content:yE,CompletedContent:wE,PrevTrigger:CE,NextTrigger:SE},Gr=({children:e,content:t,providerProps:r={},triggerProps:n={},contentProps:o={}})=>s.jsx(Zu,{...r,children:s.jsxs(Ju,{children:[s.jsx(Qu,{...n,children:e}),t&&s.jsx(ef,{...o,children:t})]})});/**
|
|
209
|
+
Defaulting to \`null\`.`}var Xy=_d,Zy=Id;function Jy({className:e,value:t,...r}){return s.jsx(Xy,{"data-slot":"progress",className:R("qodo qodo-progress bg-primary/20 relative h-2 w-full overflow-hidden rounded-full dark:bg-primary/20",e),...r,children:s.jsx(Zy,{"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 Od({className:e,...t}){return s.jsx("div",{className:R("qodo qodo-skeleton animate-pulse rounded-md bg-neutral-900/10 dark:bg-neutral-50/10",e),...t})}var zn="Switch",[Qy,BR]=ye(zn),[ew,tw]=Qy(zn),Dd=d.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:a,required:i,disabled:l,value:c="on",onCheckedChange:u,form:f,...p}=e,[g,m]=d.useState(null),b=ae(t,C=>m(C)),v=d.useRef(!1),x=g?f||!!g.closest("form"):!0,[y,h]=be({prop:o,defaultProp:a??!1,onChange:u,caller:zn});return s.jsxs(ew,{scope:r,checked:y,disabled:l,children:[s.jsx(q.button,{type:"button",role:"switch","aria-checked":y,"aria-required":i,"data-state":Vd(y),"data-disabled":l?"":void 0,disabled:l,value:c,...p,ref:b,onClick:F(e.onClick,C=>{h(E=>!E),x&&(v.current=C.isPropagationStopped(),v.current||C.stopPropagation())})}),x&&s.jsx(Fd,{control:g,bubbles:!v.current,name:n,value:c,checked:y,required:i,disabled:l,form:f,style:{transform:"translateX(-100%)"}})]})});Dd.displayName=zn;var $d="SwitchThumb",Ld=d.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=tw($d,r);return s.jsx(q.span,{"data-state":Vd(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});Ld.displayName=$d;var rw="SwitchBubbleInput",Fd=d.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{const i=d.useRef(null),l=ae(i,a),c=On(r),u=An(t);return d.useEffect(()=>{const f=i.current;if(!f)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(c!==r&&m){const b=new Event("click",{bubbles:n});m.call(f,r),f.dispatchEvent(b)}},[c,r,n]),s.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:l,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Fd.displayName=rw;function Vd(e){return e?"checked":"unchecked"}var nw=Dd,ow=Ld;const aw=At("qodo qodo-switch peer inline-flex shrink-0 items-center rounded-full border transition-all outline-none shadow-lg p-0.5 disabled:cursor-not-allowed",{variants:{size:{small:"h-5 w-8",large:"h-6 w-10"}},defaultVariants:{size:"small"}}),sw=At("pointer-events-none block rounded-full ring-0 transition-transform shadow-lg",{variants:{size:{small:"h-[14px] w-[14px] data-[state=checked]:translate-x-[12px]",large:"h-[18px] w-[18px] data-[state=checked]:translate-x-[16px]"}},defaultVariants:{size:"small"}});function iw({className:e,size:t,...r}){return s.jsx(nw,{"data-slot":"switch",className:R(aw({size:t}),"data-[state=unchecked]:border-[var(--border-input-neutral-idle)] data-[state=unchecked]:bg-[var(--fill-input-neutral-idle)]","data-[state=unchecked]:hover:border-[var(--border-input-neutral-hover)] data-[state=unchecked]:hover:bg-[var(--fill-input-neutral-hover)]","data-[state=unchecked]:active:border-[var(--border-input-neutral-active)] data-[state=unchecked]:active:bg-[var(--fill-input-neutral-active)]","data-[state=unchecked]:disabled:border-[var(--border-input-neutral-disabled)] data-[state=unchecked]:disabled:bg-[var(--fill-input-neutral-disabled)]","data-[state=checked]:border-[var(--color-purple-700)] data-[state=checked]:bg-[var(--fill-input-emphasis-idle)]","data-[state=checked]:hover:border-[var(--color-purple-600)] data-[state=checked]:hover:bg-[var(--fill-input-emphasis-hover)]","data-[state=checked]:active:border-[var(--color-purple-600)] data-[state=checked]:active:bg-[var(--fill-input-emphasis-active)]","data-[state=checked]:disabled:border-[var(--fill-input-emphasis-disabled)] data-[state=checked]:disabled:bg-[var(--fill-input-emphasis-disabled)]",e),...r,children:s.jsx(ow,{"data-slot":"switch-thumb",className:R(sw({size:t}),"data-[state=unchecked]:bg-[var(--icon-input-neutral-idle)]","data-[state=unchecked]:hover:bg-[var(--icon-input-neutral-hover)]","data-[state=unchecked]:active:bg-[var(--icon-input-neutral-active)]","data-[state=unchecked]:disabled:bg-[var(--icon-input-neutral-disabled)]","data-[state=checked]:bg-[var(--icon-input-emphasis-idle)]","data-[state=checked]:hover:bg-[var(--icon-input-emphasis-hover)]","data-[state=checked]:active:bg-[var(--icon-input-emphasis-active)]","data-[state=checked]:disabled:bg-[var(--icon-input-emphasis-disabled)]","data-[state=unchecked]:translate-x-0")})})}var Bd="Toggle",ja=d.forwardRef((e,t)=>{const{pressed:r,defaultPressed:n,onPressedChange:o,...a}=e,[i,l]=be({prop:r,onChange:o,defaultProp:n??!1,caller:Bd});return s.jsx(q.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)})})});ja.displayName=Bd;var lw=ja;const Gd=At("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 cw({className:e,variant:t,size:r,...n}){return s.jsx(lw,{"data-slot":"toggle",className:R(Gd({variant:t,size:r,className:e})),...n})}var ko="rovingFocusGroup.onEntryFocus",dw={bubbles:!1,cancelable:!0},$r="RovingFocusGroup",[Ho,Wd,uw]=Rn($r),[fw,xt]=ye($r,[uw]),[pw,mw]=fw($r),zd=d.forwardRef((e,t)=>s.jsx(Ho.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx(Ho.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(gw,{...e,ref:t})})}));zd.displayName=$r;var gw=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...p}=e,g=d.useRef(null),m=ae(t,g),b=It(a),[v,x]=be({prop:i,defaultProp:l??null,onChange:c,caller:$r}),[y,h]=d.useState(!1),C=De(u),E=Wd(r),j=d.useRef(!1),[_,P]=d.useState(0);return d.useEffect(()=>{const N=g.current;if(N)return N.addEventListener(ko,C),()=>N.removeEventListener(ko,C)},[C]),s.jsx(pw,{scope:r,orientation:n,dir:b,loop:o,currentTabStopId:v,onItemFocus:d.useCallback(N=>x(N),[x]),onItemShiftTab:d.useCallback(()=>h(!0),[]),onFocusableItemAdd:d.useCallback(()=>P(N=>N+1),[]),onFocusableItemRemove:d.useCallback(()=>P(N=>N-1),[]),children:s.jsx(q.div,{tabIndex:y||_===0?-1:0,"data-orientation":n,...p,ref:m,style:{outline:"none",...e.style},onMouseDown:F(e.onMouseDown,()=>{j.current=!0}),onFocus:F(e.onFocus,N=>{const W=!j.current;if(N.target===N.currentTarget&&W&&!y){const U=new CustomEvent(ko,dw);if(N.currentTarget.dispatchEvent(U),!U.defaultPrevented){const re=E().filter(I=>I.focusable),te=re.find(I=>I.active),Q=re.find(I=>I.id===v),O=[te,Q,...re].filter(Boolean).map(I=>I.ref.current);Hd(O,f)}}j.current=!1}),onBlur:F(e.onBlur,()=>h(!1))})})}),qd="RovingFocusGroupItem",Ud=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:a,children:i,...l}=e,c=me(),u=a||c,f=mw(qd,r),p=f.currentTabStopId===u,g=Wd(r),{onFocusableItemAdd:m,onFocusableItemRemove:b,currentTabStopId:v}=f;return d.useEffect(()=>{if(n)return m(),()=>b()},[n,m,b]),s.jsx(Ho.ItemSlot,{scope:r,id:u,focusable:n,active:o,children:s.jsx(q.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...l,ref:t,onMouseDown:F(e.onMouseDown,x=>{n?f.onItemFocus(u):x.preventDefault()}),onFocus:F(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:F(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){f.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const y=xw(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(E=>E.focusable).map(E=>E.ref.current);if(y==="last")C.reverse();else if(y==="prev"||y==="next"){y==="prev"&&C.reverse();const E=C.indexOf(x.currentTarget);C=f.loop?bw(C,E+1):C.slice(E+1)}setTimeout(()=>Hd(C))}}),children:typeof i=="function"?i({isCurrentTabStop:p,hasTabStop:v!=null}):i})})});Ud.displayName=qd;var vw={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function hw(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function xw(e,t,r){const n=hw(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return vw[n]}function Hd(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function bw(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var qn=zd,Un=Ud,bt="ToggleGroup",[Kd,GR]=ye(bt,[xt]),Yd=xt(),Pa=S.forwardRef((e,t)=>{const{type:r,...n}=e;if(r==="single"){const o=n;return s.jsx(yw,{...o,ref:t})}if(r==="multiple"){const o=n;return s.jsx(ww,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${bt}\``)});Pa.displayName=bt;var[Xd,Zd]=Kd(bt),yw=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,l]=be({prop:r,defaultProp:n??"",onChange:o,caller:bt});return s.jsx(Xd,{scope:e.__scopeToggleGroup,type:"single",value:S.useMemo(()=>i?[i]:[],[i]),onItemActivate:l,onItemDeactivate:S.useCallback(()=>l(""),[l]),children:s.jsx(Jd,{...a,ref:t})})}),ww=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,l]=be({prop:r,defaultProp:n??[],onChange:o,caller:bt}),c=S.useCallback(f=>l((p=[])=>[...p,f]),[l]),u=S.useCallback(f=>l((p=[])=>p.filter(g=>g!==f)),[l]);return s.jsx(Xd,{scope:e.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:c,onItemDeactivate:u,children:s.jsx(Jd,{...a,ref:t})})});Pa.displayName=bt;var[Cw,Sw]=Kd(bt),Jd=S.forwardRef((e,t)=>{const{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:o=!0,orientation:a,dir:i,loop:l=!0,...c}=e,u=Yd(r),f=It(i),p={role:"group",dir:f,...c};return s.jsx(Cw,{scope:r,rovingFocus:o,disabled:n,children:o?s.jsx(qn,{asChild:!0,...u,orientation:a,dir:f,loop:l,children:s.jsx(q.div,{...p,ref:t})}):s.jsx(q.div,{...p,ref:t})})}),gn="ToggleGroupItem",Qd=S.forwardRef((e,t)=>{const r=Zd(gn,e.__scopeToggleGroup),n=Sw(gn,e.__scopeToggleGroup),o=Yd(e.__scopeToggleGroup),a=r.value.includes(e.value),i=n.disabled||e.disabled,l={...e,pressed:a,disabled:i},c=S.useRef(null);return n.rovingFocus?s.jsx(Un,{asChild:!0,...o,focusable:!i,active:a,ref:c,children:s.jsx(fi,{...l,ref:t})}):s.jsx(fi,{...l,ref:t})});Qd.displayName=gn;var fi=S.forwardRef((e,t)=>{const{__scopeToggleGroup:r,value:n,...o}=e,a=Zd(gn,r),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=a.type==="single"?i:void 0;return s.jsx(ja,{...l,...o,ref:t,onPressedChange:c=>{c?a.onItemActivate(n):a.onItemDeactivate(n)}})}),Ew=Pa,kw=Qd;const eu=d.createContext({size:"default",variant:"default"});function Rw({className:e,variant:t,size:r,children:n,...o}){return s.jsx(Ew,{"data-slot":"toggle-group","data-variant":t,"data-size":r,className:R("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(eu.Provider,{value:{variant:t,size:r},children:n})})}function Nw({className:e,children:t,variant:r,size:n,...o}){const a=d.useContext(eu);return s.jsx(kw,{"data-slot":"toggle-group-item","data-variant":a.variant||r,"data-size":a.size||n,className:R(Gd({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 Hn="Collapsible",[jw,tu]=ye(Hn),[Pw,Ta]=jw(Hn),ru=d.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:a,onOpenChange:i,...l}=e,[c,u]=be({prop:n,defaultProp:o??!1,onChange:i,caller:Hn});return s.jsx(Pw,{scope:r,disabled:a,contentId:me(),open:c,onOpenToggle:d.useCallback(()=>u(f=>!f),[u]),children:s.jsx(q.div,{"data-state":Aa(c),"data-disabled":a?"":void 0,...l,ref:t})})});ru.displayName=Hn;var nu="CollapsibleTrigger",ou=d.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=Ta(nu,r);return s.jsx(q.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Aa(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:F(e.onClick,o.onOpenToggle)})});ou.displayName=nu;var _a="CollapsibleContent",au=d.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Ta(_a,e.__scopeCollapsible);return s.jsx(Ce,{present:r||o.open,children:({present:a})=>s.jsx(Tw,{...n,ref:t,present:a})})});au.displayName=_a;var Tw=d.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...a}=e,i=Ta(_a,r),[l,c]=d.useState(n),u=d.useRef(null),f=ae(t,u),p=d.useRef(0),g=p.current,m=d.useRef(0),b=m.current,v=i.open||l,x=d.useRef(v),y=d.useRef(void 0);return d.useEffect(()=>{const h=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(h)},[]),we(()=>{const h=u.current;if(h){y.current=y.current||{transitionDuration:h.style.transitionDuration,animationName:h.style.animationName},h.style.transitionDuration="0s",h.style.animationName="none";const C=h.getBoundingClientRect();p.current=C.height,m.current=C.width,x.current||(h.style.transitionDuration=y.current.transitionDuration,h.style.animationName=y.current.animationName),c(n)}},[i.open,n]),s.jsx(q.div,{"data-state":Aa(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!v,...a,ref:f,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:v&&o})});function Aa(e){return e?"open":"closed"}var _w=ru,Aw=ou,Iw=au,Ve="Accordion",Mw=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Ia,Ow,Dw]=Rn(Ve),[Kn,WR]=ye(Ve,[Dw,tu]),Ma=tu(),su=S.forwardRef((e,t)=>{const{type:r,...n}=e,o=n,a=n;return s.jsx(Ia.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?s.jsx(Vw,{...a,ref:t}):s.jsx(Fw,{...o,ref:t})})});su.displayName=Ve;var[iu,$w]=Kn(Ve),[lu,Lw]=Kn(Ve,{collapsible:!1}),Fw=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},collapsible:a=!1,...i}=e,[l,c]=be({prop:r,defaultProp:n??"",onChange:o,caller:Ve});return s.jsx(iu,{scope:e.__scopeAccordion,value:S.useMemo(()=>l?[l]:[],[l]),onItemOpen:c,onItemClose:S.useCallback(()=>a&&c(""),[a,c]),children:s.jsx(lu,{scope:e.__scopeAccordion,collapsible:a,children:s.jsx(cu,{...i,ref:t})})})}),Vw=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,l]=be({prop:r,defaultProp:n??[],onChange:o,caller:Ve}),c=S.useCallback(f=>l((p=[])=>[...p,f]),[l]),u=S.useCallback(f=>l((p=[])=>p.filter(g=>g!==f)),[l]);return s.jsx(iu,{scope:e.__scopeAccordion,value:i,onItemOpen:c,onItemClose:u,children:s.jsx(lu,{scope:e.__scopeAccordion,collapsible:!0,children:s.jsx(cu,{...a,ref:t})})})}),[Bw,Yn]=Kn(Ve),cu=S.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:o,orientation:a="vertical",...i}=e,l=S.useRef(null),c=ae(l,t),u=Ow(r),p=It(o)==="ltr",g=F(e.onKeyDown,m=>{var N;if(!Mw.includes(m.key))return;const b=m.target,v=u().filter(W=>{var U;return!((U=W.ref.current)!=null&&U.disabled)}),x=v.findIndex(W=>W.ref.current===b),y=v.length;if(x===-1)return;m.preventDefault();let h=x;const C=0,E=y-1,j=()=>{h=x+1,h>E&&(h=C)},_=()=>{h=x-1,h<C&&(h=E)};switch(m.key){case"Home":h=C;break;case"End":h=E;break;case"ArrowRight":a==="horizontal"&&(p?j():_());break;case"ArrowDown":a==="vertical"&&j();break;case"ArrowLeft":a==="horizontal"&&(p?_():j());break;case"ArrowUp":a==="vertical"&&_();break}const P=h%y;(N=v[P].ref.current)==null||N.focus()});return s.jsx(Bw,{scope:r,disabled:n,direction:o,orientation:a,children:s.jsx(Ia.Slot,{scope:r,children:s.jsx(q.div,{...i,"data-orientation":a,ref:c,onKeyDown:n?void 0:g})})})}),vn="AccordionItem",[Gw,Oa]=Kn(vn),du=S.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...o}=e,a=Yn(vn,r),i=$w(vn,r),l=Ma(r),c=me(),u=n&&i.value.includes(n)||!1,f=a.disabled||e.disabled;return s.jsx(Gw,{scope:r,open:u,disabled:f,triggerId:c,children:s.jsx(_w,{"data-orientation":a.orientation,"data-state":vu(u),...l,...o,ref:t,disabled:f,open:u,onOpenChange:p=>{p?i.onItemOpen(n):i.onItemClose(n)}})})});du.displayName=vn;var uu="AccordionHeader",fu=S.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Yn(Ve,r),a=Oa(uu,r);return s.jsx(q.h3,{"data-orientation":o.orientation,"data-state":vu(a.open),"data-disabled":a.disabled?"":void 0,...n,ref:t})});fu.displayName=uu;var Ko="AccordionTrigger",pu=S.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Yn(Ve,r),a=Oa(Ko,r),i=Lw(Ko,r),l=Ma(r);return s.jsx(Ia.ItemSlot,{scope:r,children:s.jsx(Aw,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...l,...n,ref:t})})});pu.displayName=Ko;var mu="AccordionContent",gu=S.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Yn(Ve,r),a=Oa(mu,r),i=Ma(r);return s.jsx(Iw,{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}})});gu.displayName=mu;function vu(e){return e?"open":"closed"}var Ww=su,zw=du,qw=fu,Uw=pu,Hw=gu;const Da=d.createContext({variant:"default"});function Kw({variant:e="default",...t}){return s.jsx(Da.Provider,{value:{variant:e},children:s.jsx(Ww,{"data-slot":"accordion",...t})})}function Yw({className:e,...t}){const{variant:r}=d.useContext(Da);return s.jsx(zw,{"data-slot":"accordion-item",className:R("qodo qodo-accordion-item","text-[var(--text-interactive-neutral-idle)] text-base font-medium leading-6","hover:text-[var(--text-interactive-neutral-hover)]",{"border-b border-[var(--color-neutral-600)]":r==="default","border border-[var(--color-neutral-600)] mb-2 px-4 rounded-lg":r==="outlined","bg-[var(--fill-interactive-neutral-idle)] mb-2 px-2 rounded-lg":r==="filled"},e),...t})}function Xw({className:e,children:t,iconPosition:r="right",...n}){const{variant:o}=d.useContext(Da);return s.jsx(qw,{className:"flex",children:s.jsxs(Uw,{"data-slot":"accordion-trigger",className:R("qodo qodo-accordion-trigger","flex flex-1 items-start justify-between gap-4 rounded-md","text-left text-sm font-medium transition-all outline-none","text-text-interactive-neutral-idle cursor-pointer","hover:text-[var(--text-interactive-neutral-hover)]","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","disabled:pointer-events-none disabled:opacity-50","[&[data-state=open]>svg]:rotate-180","dark:focus-visible:border-ring dark:focus-visible:ring-ring/50",{"py-4":o!=="filled","py-2":o==="filled","flex-row-reverse justify-end gap-2":r==="left"},e),...n,children:[t,s.jsx(En,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200 dark:text-muted-foreground"})]})})}function Zw({className:e,children:t,...r}){return s.jsx(Hw,{"data-slot":"accordion-content",className:R("qodo qodo-accordion-content","overflow-hidden text-sm text-foreground","data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down","dark:text-foreground"),...r,children:s.jsx("div",{className:R("pt-0 pb-4","text-text-interactive-neutral-idle font-normal text-sm",e),children:t})})}var Xn="Tabs",[Jw,zR]=ye(Xn,[xt]),hu=xt(),[Qw,$a]=Jw(Xn),xu=d.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:l,activationMode:c="automatic",...u}=e,f=It(l),[p,g]=be({prop:n,onChange:o,defaultProp:a??"",caller:Xn});return s.jsx(Qw,{scope:r,baseId:me(),value:p,onValueChange:g,orientation:i,dir:f,activationMode:c,children:s.jsx(q.div,{dir:f,"data-orientation":i,...u,ref:t})})});xu.displayName=Xn;var bu="TabsList",yu=d.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...o}=e,a=$a(bu,r),i=hu(r);return s.jsx(qn,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:n,children:s.jsx(q.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});yu.displayName=bu;var wu="TabsTrigger",Cu=d.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:o=!1,...a}=e,i=$a(wu,r),l=hu(r),c=ku(i.baseId,n),u=Ru(i.baseId,n),f=n===i.value;return s.jsx(Un,{asChild:!0,...l,focusable:!o,active:f,children:s.jsx(q.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...a,ref:t,onMouseDown:F(e.onMouseDown,p=>{!o&&p.button===0&&p.ctrlKey===!1?i.onValueChange(n):p.preventDefault()}),onKeyDown:F(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&i.onValueChange(n)}),onFocus:F(e.onFocus,()=>{const p=i.activationMode!=="manual";!f&&!o&&p&&i.onValueChange(n)})})})});Cu.displayName=wu;var Su="TabsContent",Eu=d.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:o,children:a,...i}=e,l=$a(Su,r),c=ku(l.baseId,n),u=Ru(l.baseId,n),f=n===l.value,p=d.useRef(f);return d.useEffect(()=>{const g=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(g)},[]),s.jsx(Ce,{present:o||f,children:({present:g})=>s.jsx(q.div,{"data-state":f?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!g,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:g&&a})})});Eu.displayName=Su;function ku(e,t){return`${e}-trigger-${t}`}function Ru(e,t){return`${e}-content-${t}`}var e0=xu,t0=yu,r0=Cu,n0=Eu;function o0({className:e,...t}){return s.jsx(e0,{"data-slot":"tabs",className:R("qodo qodo-tabs flex flex-col gap-2",e),...t})}function a0({className:e,...t}){return s.jsx(t0,{"data-slot":"tabs-list",className:R("inline-flex w-full items-end justify-start gap-4",e),...t})}function s0({className:e,...t}){return s.jsx(r0,{"data-slot":"tabs-trigger",className:R("text-[var(--text-interactive-neutral-idle)] hover:text-[var(--text-interactive-neutral-hover)] data-[state=active]:text-[var(--text-interactive-emphasis-active)] focus-visible:ring-ring/50 focus-visible:outline-ring inline-flex items-center justify-center gap-1.5 border-b border-transparent py-4 text-xs font-normal whitespace-nowrap transition-[color,border-color] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed data-[state=active]:border-[var(--color-purple-400)] relative -mb-px tracking-[0.01em] leading-[150%] cursor-pointer [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function i0({className:e,...t}){return s.jsx(n0,{"data-slot":"tabs-content",className:R("flex-1 outline-none",e),...t})}const Nu=At("qodo qodo-typography",{variants:{variant:{h1:"scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl",h2:"scroll-m-20 text-3xl font-semibold tracking-tight first:mt-0",h3:"scroll-m-20 text-2xl font-semibold tracking-tight",h4:"scroll-m-20 text-xl font-semibold tracking-tight",h5:"scroll-m-20 text-lg font-semibold tracking-tight",h6:"scroll-m-20 text-base font-semibold tracking-tight",p:"leading-7 [&:not(:first-child)]:mt-6",lead:"text-xl text-muted-foreground dark:text-muted-foreground",large:"text-lg font-semibold",small:"text-sm font-medium leading-none",muted:"text-sm text-muted-foreground dark:text-muted-foreground",body:"text-base leading-relaxed",caption:"text-xs text-muted-foreground dark:text-muted-foreground",code:"font-plex-mono relative rounded bg-muted px-[0.3rem] py-[0.2rem] text-sm font-semibold dark:bg-muted","code-inline":"font-plex-mono relative rounded bg-muted px-[0.3rem] py-[0.2rem] text-xs dark:bg-muted","code-block":"font-plex-mono block w-full rounded-lg bg-muted p-4 text-sm leading-relaxed dark:bg-muted overflow-x-auto",blockquote:"mt-6 border-l-2 pl-6 italic text-muted-foreground dark:text-muted-foreground",list:"my-6 ml-6 list-disc [&>li]:mt-2","list-ordered":"my-6 ml-6 list-decimal [&>li]:mt-2"}},defaultVariants:{variant:"p"}}),ju=d.forwardRef(({className:e,variant:t,as:r,...n},o)=>{const a=r||l0(t)||"p";return d.createElement(a,{className:R(Nu({variant:t,className:e})),ref:o,...n})});ju.displayName="Typography";function l0(e){switch(e){case"list":return"ul";case"list-ordered":return"ol";case"code-inline":return"code";case"code-block":return"pre";case"lead":case"large":case"small":case"muted":case"body":case"caption":return"p";default:return e||"p"}}var c0=e=>e.type==="checkbox",vr=e=>e instanceof Date,La=e=>e==null;const Pu=e=>typeof e=="object";var _t=e=>!La(e)&&!Array.isArray(e)&&Pu(e)&&!vr(e),d0=e=>_t(e)&&e.target?c0(e.target)?e.target.checked:e.target.value:e,u0=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,f0=(e,t)=>e.has(u0(t)),p0=e=>{const t=e.constructor&&e.constructor.prototype;return _t(t)&&t.hasOwnProperty("isPrototypeOf")},m0=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Tu(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(!(m0&&(e instanceof Blob||n))&&(r||_t(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!p0(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=Tu(e[o]));else return e;return t}var _u=e=>/^\w*$/.test(e),Yo=e=>e===void 0,g0=e=>Array.isArray(e)?e.filter(Boolean):[],Au=e=>g0(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ne=(e,t,r)=>{if(!t||!_t(e))return r;const n=(_u(t)?[t]:Au(t)).reduce((o,a)=>La(o)?o:o[a],e);return Yo(n)||n===e?Yo(e[t])?r:e[t]:n},Ro=e=>typeof e=="boolean",pi=(e,t,r)=>{let n=-1;const o=_u(t)?[t]:Au(t),a=o.length,i=a-1;for(;++n<a;){const l=o[n];let c=r;if(n!==i){const u=e[l];c=_t(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=c,e=e[l]}};const mi={BLUR:"blur",CHANGE:"change"},gi={all:"all"},Fa=S.createContext(null);Fa.displayName="HookFormContext";const lr=()=>S.useContext(Fa),v0=e=>{const{children:t,...r}=e;return S.createElement(Fa.Provider,{value:r},t)};var h0=(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]!==gi.all&&(t._proxyFormState[i]=!n||gi.all),r&&(r[i]=!0),e[i]}});return o};const Iu=typeof window<"u"?S.useLayoutEffect:S.useEffect;function Mu(e){const t=lr(),{control:r=t.control,disabled:n,name:o,exact:a}=e||{},[i,l]=S.useState(r._formState),c=S.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Iu(()=>r._subscribe({name:o,formState:c.current,exact:a,callback:u=>{!n&&l({...r._formState,...u})}}),[o,n,a]),S.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),S.useMemo(()=>h0(i,r,c.current,!1),[i,r])}var x0=e=>typeof e=="string",b0=(e,t,r,n,o)=>x0(e)?Ne(r,e,o):Array.isArray(e)?e.map(a=>Ne(r,a)):r,vi=e=>La(e)||!Pu(e);function Ou(e,t,r=new WeakSet){if(vi(e)||vi(t))return e===t;if(vr(e)&&vr(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(vr(i)&&vr(l)||_t(i)&&_t(l)||Array.isArray(i)&&Array.isArray(l)?!Ou(i,l,r):i!==l)return!1}}return!0}function y0(e){const t=lr(),{control:r=t.control,name:n,defaultValue:o,disabled:a,exact:i,compute:l}=e||{},c=S.useRef(o),u=S.useRef(l),f=S.useRef(void 0);u.current=l;const p=S.useMemo(()=>r._getWatch(n,c.current),[r,n]),[g,m]=S.useState(u.current?u.current(p):p);return Iu(()=>r._subscribe({name:n,formState:{values:!0},exact:i,callback:b=>{if(!a){const v=b0(n,r._names,b.values||r._formValues,!1,c.current);if(u.current){const x=u.current(v);Ou(x,f.current)||(m(x),f.current=x)}else m(v)}}}),[r,a,n,i]),S.useEffect(()=>r._removeUnmounted()),g}function w0(e){const t=lr(),{name:r,disabled:n,control:o=t.control,shouldUnregister:a,defaultValue:i}=e,l=f0(o._names.array,r),c=S.useMemo(()=>Ne(o._formValues,r,Ne(o._defaultValues,r,i)),[o,r,i]),u=y0({control:o,name:r,defaultValue:c,exact:!0}),f=Mu({control:o,name:r,exact:!0}),p=S.useRef(e),g=S.useRef(o.register(r,{...e.rules,value:u,...Ro(e.disabled)?{disabled:e.disabled}:{}}));p.current=e;const m=S.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Ne(f.errors,r)},isDirty:{enumerable:!0,get:()=>!!Ne(f.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!Ne(f.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!Ne(f.validatingFields,r)},error:{enumerable:!0,get:()=>Ne(f.errors,r)}}),[f,r]),b=S.useCallback(h=>g.current.onChange({target:{value:d0(h),name:r},type:mi.CHANGE}),[r]),v=S.useCallback(()=>g.current.onBlur({target:{value:Ne(o._formValues,r),name:r},type:mi.BLUR}),[r,o._formValues]),x=S.useCallback(h=>{const C=Ne(o._fields,r);C&&h&&(C._f.ref={focus:()=>h.focus&&h.focus(),select:()=>h.select&&h.select(),setCustomValidity:E=>h.setCustomValidity(E),reportValidity:()=>h.reportValidity()})},[o._fields,r]),y=S.useMemo(()=>({name:r,value:u,...Ro(n)||f.disabled?{disabled:f.disabled||n}:{},onChange:b,onBlur:v,ref:x}),[r,n,f.disabled,b,v,x,u]);return S.useEffect(()=>{const h=o._options.shouldUnregister||a;o.register(r,{...p.current.rules,...Ro(p.current.disabled)?{disabled:p.current.disabled}:{}});const C=(E,j)=>{const _=Ne(o._fields,E);_&&_._f&&(_._f.mount=j)};if(C(r,!0),h){const E=Tu(Ne(o._options.defaultValues,r));pi(o._defaultValues,r,E),Yo(Ne(o._formValues,r))&&pi(o._formValues,r,E)}return!l&&o.register(r),()=>{(l?h&&!o._state.action:h)?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 Du=e=>e.render(w0(e)),$u=S.createContext(void 0),Lu=e=>{const{methods:t,disabled:r,readOnly:n,children:o}=e;return s.jsx($u.Provider,{value:{disabled:r,readOnly:n},children:s.jsx(v0,{...t,children:o})})},Fu=()=>{const e=S.useContext($u),t=lr();if(!e||!t)throw new Error("formContext must be used within a FormProvider");return{...e,...t}},C0=({type:e="button",variant:t="outline",...r})=>{const n=()=>e==="submit"||e==="reset"?"default":t;return s.jsx(et,{type:e,variant:n(),...r})};var Vu={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},hi=S.createContext&&S.createContext(Vu),S0=["attr","size","title"];function E0(e,t){if(e==null)return{};var r=k0(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 k0(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 hn(){return hn=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},hn.apply(this,arguments)}function xi(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 xn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xi(Object(r),!0).forEach(function(n){R0(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function R0(e,t,r){return t=N0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function N0(e){var t=j0(e,"string");return typeof t=="symbol"?t:t+""}function j0(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 Bu(e){return e&&e.map((t,r)=>S.createElement(t.tag,xn({key:r},t.attr),Bu(t.child)))}function Gu(e){return t=>S.createElement(P0,hn({attr:xn({},e.attr)},t),Bu(e.child))}function P0(e){var t=r=>{var{attr:n,size:o,title:a}=e,i=E0(e,S0),l=o||r.size||"1em",c;return r.className&&(c=r.className),e.className&&(c=(c?c+" ":"")+e.className),S.createElement("svg",hn({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,i,{className:c,style:xn(xn({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 hi!==void 0?S.createElement(hi.Consumer,null,r=>t(r)):t(Vu)}function T0(e){return Gu({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 _0="Label",Wu=d.forwardRef((e,t)=>s.jsx(q.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())}}));Wu.displayName=_0;var A0=Wu;function Va({className:e,...t}){return s.jsx(A0,{"data-slot":"label",className:R("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 zu=d.createContext({}),I0=({...e})=>s.jsx(zu.Provider,{value:{name:e.name},children:s.jsx(Du,{...e})}),Zn=()=>{const e=d.useContext(zu),t=d.useContext(qu),{getFieldState:r}=lr(),n=Mu({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}},qu=d.createContext({});function M0({className:e,...t}){const r=d.useId();return s.jsx(qu.Provider,{value:{id:r},children:s.jsx("div",{"data-slot":"form-item",className:R("qodo qodo-form-item grid gap-2",e),...t})})}function O0({className:e,...t}){const{formItemId:r}=Zn();return s.jsx(Va,{"data-slot":"form-label",className:R("data-[error=true]:text-destructive font-normal text-sm",e),htmlFor:r,...t})}function D0({...e}){const{error:t,formItemId:r,formDescriptionId:n,formMessageId:o}=Zn();return s.jsx(Cv,{"data-slot":"form-control",id:r,"aria-describedby":t?`${n} ${o}`:`${n}`,"aria-invalid":!!t,...e})}function $0({className:e,...t}){const{formDescriptionId:r}=Zn();return s.jsx("p",{"data-slot":"form-description",id:r,className:R("text-purple-muted-300 text-sm",e),...t})}function L0({className:e,...t}){const{error:r,formMessageId:n}=Zn(),o=r?String((r==null?void 0:r.message)??""):t.children;return o?s.jsx("p",{"data-slot":"form-message",id:n,className:R("text-destructive text-sm",e),...t,children:o}):null}var[Jn,qR]=ye("Tooltip",[mt]),Qn=mt(),Uu="TooltipProvider",F0=700,Xo="tooltip.open",[V0,Ba]=Jn(Uu),Hu=e=>{const{__scopeTooltip:t,delayDuration:r=F0,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,i=d.useRef(!0),l=d.useRef(!1),c=d.useRef(0);return d.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),s.jsx(V0,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:d.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:d.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:d.useCallback(u=>{l.current=u},[]),disableHoverableContent:o,children:a})};Hu.displayName=Uu;var kr="Tooltip",[B0,Lr]=Jn(kr),Ku=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:l}=e,c=Ba(kr,e.__scopeTooltip),u=Qn(t),[f,p]=d.useState(null),g=me(),m=d.useRef(0),b=i??c.disableHoverableContent,v=l??c.delayDuration,x=d.useRef(!1),[y,h]=be({prop:n,defaultProp:o??!1,onChange:P=>{P?(c.onOpen(),document.dispatchEvent(new CustomEvent(Xo))):c.onClose(),a==null||a(P)},caller:kr}),C=d.useMemo(()=>y?x.current?"delayed-open":"instant-open":"closed",[y]),E=d.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x.current=!1,h(!0)},[h]),j=d.useCallback(()=>{window.clearTimeout(m.current),m.current=0,h(!1)},[h]),_=d.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{x.current=!0,h(!0),m.current=0},v)},[v,h]);return d.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),s.jsx(Ar,{...u,children:s.jsx(B0,{scope:t,contentId:g,open:y,stateAttribute:C,trigger:f,onTriggerChange:p,onTriggerEnter:d.useCallback(()=>{c.isOpenDelayedRef.current?_():E()},[c.isOpenDelayedRef,_,E]),onTriggerLeave:d.useCallback(()=>{b?j():(window.clearTimeout(m.current),m.current=0)},[j,b]),onOpen:E,onClose:j,disableHoverableContent:b,children:r})})};Ku.displayName=kr;var Zo="TooltipTrigger",Yu=d.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Lr(Zo,r),a=Ba(Zo,r),i=Qn(r),l=d.useRef(null),c=ae(t,l,o.onTriggerChange),u=d.useRef(!1),f=d.useRef(!1),p=d.useCallback(()=>u.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),s.jsx(Ir,{asChild:!0,...i,children:s.jsx(q.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:c,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(),u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:F(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:F(e.onBlur,o.onClose),onClick:F(e.onClick,o.onClose)})})});Yu.displayName=Zo;var Ga="TooltipPortal",[G0,W0]=Jn(Ga,{forceMount:void 0}),Xu=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,a=Lr(Ga,t);return s.jsx(G0,{scope:t,forceMount:r,children:s.jsx(Ce,{present:r||a.open,children:s.jsx(sr,{asChild:!0,container:o,children:n})})})};Xu.displayName=Ga;var Qt="TooltipContent",Zu=d.forwardRef((e,t)=>{const r=W0(Qt,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,i=Lr(Qt,e.__scopeTooltip);return s.jsx(Ce,{present:n||i.open,children:i.disableHoverableContent?s.jsx(Ju,{side:o,...a,ref:t}):s.jsx(z0,{side:o,...a,ref:t})})}),z0=d.forwardRef((e,t)=>{const r=Lr(Qt,e.__scopeTooltip),n=Ba(Qt,e.__scopeTooltip),o=d.useRef(null),a=ae(t,o),[i,l]=d.useState(null),{trigger:c,onClose:u}=r,f=o.current,{onPointerInTransitChange:p}=n,g=d.useCallback(()=>{l(null),p(!1)},[p]),m=d.useCallback((b,v)=>{const x=b.currentTarget,y={x:b.clientX,y:b.clientY},h=K0(y,x.getBoundingClientRect()),C=Y0(y,h),E=X0(v.getBoundingClientRect()),j=J0([...C,...E]);l(j),p(!0)},[p]);return d.useEffect(()=>()=>g(),[g]),d.useEffect(()=>{if(c&&f){const b=x=>m(x,f),v=x=>m(x,c);return c.addEventListener("pointerleave",b),f.addEventListener("pointerleave",v),()=>{c.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",v)}}},[c,f,m,g]),d.useEffect(()=>{if(i){const b=v=>{const x=v.target,y={x:v.clientX,y:v.clientY},h=(c==null?void 0:c.contains(x))||(f==null?void 0:f.contains(x)),C=!Z0(y,i);h?g():C&&(g(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,f,i,u,g]),s.jsx(Ju,{...e,ref:a})}),[q0,U0]=Jn(kr,{isInside:!1}),H0=Ev("TooltipContent"),Ju=d.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...l}=e,c=Lr(Qt,r),u=Qn(r),{onClose:f}=c;return d.useEffect(()=>(document.addEventListener(Xo,f),()=>document.removeEventListener(Xo,f)),[f]),d.useEffect(()=>{if(c.trigger){const p=g=>{const m=g.target;m!=null&&m.contains(c.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[c.trigger,f]),s.jsx(nr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:s.jsxs(In,{"data-state":c.stateAttribute,...u,...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(H0,{children:n}),s.jsx(q0,{scope:r,isInside:!0,children:s.jsx(vx,{id:c.contentId,role:"tooltip",children:o||n})})]})})});Zu.displayName=Qt;var Qu="TooltipArrow",ef=d.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Qn(r);return U0(Qu,r).isInside?null:s.jsx(Mn,{...o,...n,ref:t})});ef.displayName=Qu;function K0(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 Y0(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 X0(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 Z0(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],c=t[i],u=l.x,f=l.y,p=c.x,g=c.y;f>n!=g>n&&r<(p-u)*(n-f)/(g-f)+u&&(o=!o)}return o}function J0(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),Q0(t)}function Q0(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 eC=Hu,tC=Ku,rC=Yu,nC=Xu,oC=Zu,aC=ef;function tf({delayDuration:e=0,...t}){return s.jsx(eC,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function rf({...e}){return s.jsx(tf,{children:s.jsx(tC,{"data-slot":"tooltip",...e})})}function nf({...e}){return s.jsx(rC,{"data-slot":"tooltip-trigger",...e})}function of({className:e,sideOffset:t=0,children:r,disableArrow:n=!1,...o}){return s.jsx(nC,{children:s.jsxs(oC,{"data-slot":"tooltip-content",sideOffset:t,className:R("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(aC,{className:"bg-purple-muted-700 fill-purple-muted-700 z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const Ot=e=>t=>{const{name:r,label:n,description:o,tooltip:a,required:i=!1,...l}=t,{control:c,disabled:u,readOnly:f}=Fu(),p=()=>a?s.jsxs(rf,{children:[s.jsx(nf,{asChild:!0,children:s.jsx("span",{children:s.jsx(T0,{size:16})})}),s.jsx(of,{children:s.jsx("p",{children:a})})]}):s.jsx(s.Fragment,{}),g=()=>o?s.jsx($0,{children:o}):s.jsx(s.Fragment,{});return s.jsx(I0,{control:c,name:r,render:({field:m,fieldState:b})=>s.jsxs(M0,{className:"flex flex-col gap-1.5",children:[n&&s.jsx(O0,{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(D0,{children:s.jsx(e,{...m,disabled:u,...l,readOnly:f,error:!!b.error})}),!!o&&g(),s.jsx(L0,{})]})})},sC=S.forwardRef((e,t)=>s.jsx(Pr,{...e,ref:t})),iC=S.forwardRef((e,t)=>Ot(sC)({...e,ref:t})),lC=S.forwardRef((e,t)=>{const{options:r=[],onChange:n=()=>{},searchPlaceholder:o,onSearchChange:a,...i}=e,l=c=>{n({target:{value:c}})};return s.jsx(ka,{ref:t,options:r,onValueChange:l,searchPlaceholder:o,onSearchChange:a,...i})}),cC=Ot(lC);var Wa="Radio",[dC,af]=ye(Wa),[uC,fC]=dC(Wa),sf=d.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:o=!1,required:a,disabled:i,value:l="on",onCheck:c,form:u,...f}=e,[p,g]=d.useState(null),m=ae(t,x=>g(x)),b=d.useRef(!1),v=p?u||!!p.closest("form"):!0;return s.jsxs(uC,{scope:r,checked:o,disabled:i,children:[s.jsx(q.button,{type:"button",role:"radio","aria-checked":o,"data-state":uf(o),"data-disabled":i?"":void 0,disabled:i,value:l,...f,ref:m,onClick:F(e.onClick,x=>{o||c==null||c(),v&&(b.current=x.isPropagationStopped(),b.current||x.stopPropagation())})}),v&&s.jsx(df,{control:p,bubbles:!b.current,name:n,value:l,checked:o,required:a,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});sf.displayName=Wa;var lf="RadioIndicator",cf=d.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,a=fC(lf,r);return s.jsx(Ce,{present:n||a.checked,children:s.jsx(q.span,{"data-state":uf(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});cf.displayName=lf;var pC="RadioBubbleInput",df=d.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{const i=d.useRef(null),l=ae(i,a),c=On(r),u=An(t);return d.useEffect(()=>{const f=i.current;if(!f)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(c!==r&&m){const b=new Event("click",{bubbles:n});m.call(f,r),f.dispatchEvent(b)}},[c,r,n]),s.jsx(q.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:l,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});df.displayName=pC;function uf(e){return e?"checked":"unchecked"}var mC=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],eo="RadioGroup",[gC,UR]=ye(eo,[xt,af]),ff=xt(),pf=af(),[vC,hC]=gC(eo),mf=d.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:a,required:i=!1,disabled:l=!1,orientation:c,dir:u,loop:f=!0,onValueChange:p,...g}=e,m=ff(r),b=It(u),[v,x]=be({prop:a,defaultProp:o??null,onChange:p,caller:eo});return s.jsx(vC,{scope:r,name:n,required:i,disabled:l,value:v,onValueChange:x,children:s.jsx(qn,{asChild:!0,...m,orientation:c,dir:b,loop:f,children:s.jsx(q.div,{role:"radiogroup","aria-required":i,"aria-orientation":c,"data-disabled":l?"":void 0,dir:b,...g,ref:t})})})});mf.displayName=eo;var gf="RadioGroupItem",vf=d.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...o}=e,a=hC(gf,r),i=a.disabled||n,l=ff(r),c=pf(r),u=d.useRef(null),f=ae(t,u),p=a.value===o.value,g=d.useRef(!1);return d.useEffect(()=>{const m=v=>{mC.includes(v.key)&&(g.current=!0)},b=()=>g.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",b)}},[]),s.jsx(Un,{asChild:!0,...l,focusable:!i,active:p,children:s.jsx(sf,{disabled:i,required:a.required,checked:p,...c,...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=u.current)==null||m.click())})})})});vf.displayName=gf;var xC="RadioGroupIndicator",hf=d.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=pf(r);return s.jsx(cf,{...o,...n,ref:t})});hf.displayName=xC;var bC=mf,yC=vf,wC=hf;function CC({className:e,...t}){const{readOnly:r,...n}=t;return s.jsx(bC,{"data-slot":"radio-group","data-readonly":r||void 0,disabled:n.disabled||r,className:R("qodo qodo-radio-group grid gap-3 group",e),...n})}function SC({className:e,...t}){return s.jsx(yC,{"data-slot":"radio-group-item",className:R("qodo qodo-radio-group-item cursor-pointer border-[var(--border-input-neutral-idle)] bg-[var(--fill-input-neutral-idle)] 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]","aria-checked:border-[var(--border-input-emphasis-active)] hover:aria-checked:border-[var(--border-input-emphasis-active)]","group-data-[readonly]:opacity-100 group-data-[readonly]:cursor-default","data-disabled:cursor-not-allowed data-disabled:opacity-50","aria-disabled:cursor-not-allowed aria-disabled:opacity-50","mt-[2px] mr-0",e),...t,children:s.jsx(wC,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:s.jsx(Kg,{className:"stroke-transparent fill-[var(--icon-input-emphasis-active)] absolute top-1/2 left-1/2 size-3 -translate-x-1/2 -translate-y-1/2"})})})}const za=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o,disabled:a=!1,readOnly:i=!1,className:l,direction:c="horizontal",dir:u="ltr",name:f,onChange:p,...g}=e,m=v=>{i||(p==null||p({target:{value:v}}),o==null||o(v))},b=R("qodo qodo-custom-radio-group","flex",{"flex-row gap-6":c==="horizontal","flex-col gap-3":c==="vertical"},l);return s.jsx(CC,{name:f,ref:t,value:r,defaultValue:n,onValueChange:m,disabled:a||i,readOnly:i,className:b,dir:u,...g})});za.displayName="BaseRadioGroupComponent";const qa=({label:e,description:t,disabled:r=!1,labelClassName:n,descriptionClassName:o,labelWrapperClassName:a})=>s.jsxs("div",{className:R("flex flex-col gap-2",a),children:[e&&s.jsx("div",{className:R("text-[var(--text-bg-neutral-mid)] font-normal text-sm","group-has-[button:disabled]/radio-item:opacity-70","group-has-[button:disabled]/checkbox-item:opacity-70",{"opacity-70":r},n),children:e}),t&&s.jsx("div",{className:R("text-sm text-[var(--text-bg-neutral-mild)] font-normal",o),children:t})]});qa.displayName="LabelWithDescription";const Ua=({value:e="",disabled:t,error:r,name:n="radio",label:o,description:a,wrapperClassName:i,labelClassName:l,descriptionClassName:c,labelWrapperClassName:u})=>{const f=`${n}-${e}`;return s.jsxs(Va,{htmlFor:f,className:R("group/radio-item flex items-start p-4 rounded-lg gap-2 transition-all duration-200","font-normal leading-5 cursor-pointer","has-[button:disabled]:cursor-not-allowed has-[button:disabled]:hover:bg-transparent",{"cursor-pointer":!t,"!cursor-not-allowed hover:!bg-transparent":t,"border border-destructive":r},i),children:[s.jsx(SC,{value:e,id:f,disabled:t||r}),s.jsx(qa,{label:o,description:a,disabled:t,labelClassName:l,descriptionClassName:c,labelWrapperClassName:u})]},e)};Ua.displayName="RadioGroupItemComponent";const EC=Ot(za),kC=e=>s.jsx("hr",{className:"w-full h-px border-[var(--base-sidebar-border)]",...e}),RC=({children:e,description:t,className:r})=>s.jsxs("div",{className:R("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})]}),xf=S.forwardRef(({direction:e="horizontal",className:t,...r},n)=>{const o=R("flex flex-row gap-6",{"flex-col":e==="vertical"},t);return s.jsx("div",{ref:n,className:o,...r})});xf.displayName="FormGroup";function NC({className:e,rows:t,...r}){return s.jsx("textarea",{"data-slot":"textarea",rows:t,className:R("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 jC=S.forwardRef(({variant:e="default",className:t,...r},n)=>{const o=Ot(NC);return s.jsx(o,{...r,ref:n,className:R({"font-plex-mono text-sm leading-relaxed rounded dark:bg-fill-input-neutral-idle px-3 py-2 border-0":e==="code"},t)})}),bf=({label:e,id:t,onRemoveTag:r,disabled:n,className:o,variant:a="default"})=>s.jsxs(Jt,{variant:a,disabled:n,size:"sm",className:R("flex items-center gap-1 px-2 py-0.5","font-normal whitespace-nowrap",o),children:[e,r&&s.jsx(et,{type:"button",variant:"ghost",size:"icon",className:"p-0 w-[10px] h-[10px] text-inherit disabled:text-inherit",onClick:i=>{i.stopPropagation(),r==null||r(t)},"aria-label":`Remove ${e}`,disabled:n,children:s.jsx(kn,{className:"w-[10px] h-[10px]"})})]}),PC=({label:e,id:t,onClick:r,onDeleteSuggestion:n,deleteText:o,className:a,tagClassName:i,tagVariant:l})=>s.jsx("div",{onClick:r,className:R("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(bf,{label:e,id:t,className:i,variant:l}),n&&s.jsx(et,{type:"button",variant:"ghost",className:"p-0 text-xs font-normal h-[10px]",onMouseDown:c=>c.preventDefault(),onClick:c=>{c.stopPropagation(),n==null||n(t)},"aria-label":`${o} ${e}`,children:o||s.jsx(pv,{className:"h-4 w-4"})})]})}),No={BACKSPACE:"Backspace",ESCAPE:"Escape",ENTER:"Enter"},TC=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},yf=({value:e=[],variant:t="default",placeholder:r="Type to add a tag...",deleteText:n="Delete",suggestions:o=[],allowCreate:a=!0,maxTags:i=100,disabled:l=!1,className:c,suggestionWrapperClassName:u,suggestionClassName:f,tagClassName:p,tagInputIcon:g,onDeleteSuggestion:m,onBlur:b,normalizeTags:v=TC,onChange:x=()=>{},onAddTag:y=()=>{},onRemoveTag:h=()=>{},onResetTags:C=()=>{}})=>{const[E,j]=S.useState(""),[_,P]=S.useState(!1),N=S.useRef(null),W=S.useRef(null),U=S.useRef(null),[re,te]=S.useState();S.useEffect(()=>{W.current&&te(W.current.offsetWidth)},[]);const Q=e.length>=i,V=L=>{if(Q||e.some(K=>K.id===L.id))return;const A=[...e,L];x(A),y(L)},O=L=>{const A=e.filter(K=>K.id!==L);x(A),h(L)},I=()=>{x==null||x([]),C()},D=L=>{const A=L.target.value;j(A),P(!0)},k=()=>{const L=E.trim().toLowerCase();if(!L)return[];const A=new Set(e.map(K=>K.id));return o.filter(K=>K.label.toLowerCase().includes(L)&&!A.has(K.id))},M=L=>v?v(L):L,B=()=>{const L=E.trim();if(!L)return;const A=M(L);if(!A)return;if(e.some(ee=>ee.id===A)){j(""),P(!1);return}const K=o.find(ee=>ee.id===A||M(ee.label)===A);K?V(K):a&&V({id:A,label:A}),j(""),P(!1)},J=L=>{const A=L.key===No.BACKSPACE&&!E&&e.length>0,K=L.key===No.ENTER&&E,ee=L.key===No.ESCAPE;K?(L.preventDefault(),B(),U.current&&(U.current.scrollLeft=U.current.scrollWidth)):A?O(e[e.length-1].id):ee&&P(!1)},T=()=>{if(E&&k().length>0)return s.jsx(Ea,{className:"p-0 border-transparent bg-[var(--fill-interactive-neutral-idle)] gap-2",align:"start",style:{width:re??void 0},onOpenAutoFocus:L=>L.preventDefault(),onCloseAutoFocus:L=>L.preventDefault(),onMouseDown:L=>L.preventDefault(),children:s.jsx("div",{className:R("max-h-[200px] overflow-y-auto flex flex-col gap-1 p-1",u),children:k().map(L=>s.jsx(PC,{label:L.label,id:L.id,onDeleteSuggestion:m,deleteText:n,className:f,tagClassName:p,tagVariant:t,onClick:()=>{var A;V(L),j(""),P(!1),(A=N.current)==null||A.focus()}},L.id))})})},G=()=>g||s.jsx(uv,{className:"h-4 w-4 stroke-[var(--icon-bg-neutral-mild)]"}),Z=()=>e.map(L=>s.jsx(bf,{label:L.label,id:L.id,onRemoveTag:O,disabled:l,className:p,variant:t},L.id)),z=()=>e.length===0?s.jsx(s.Fragment,{}):s.jsx(kn,{className:"h-4 w-4 hover:cursor-pointer stroke-[var(--icon-input-neutral-idle)] hover:stroke-[var(--icon-input-neutral-hover)]",onClick:I});return s.jsx("div",{className:R("w-full",c),children:s.jsxs(Ca,{open:_&&!l,onOpenChange:P,modal:!1,children:[s.jsx(Sa,{className:"w-full",children:s.jsxs("div",{ref:W,tabIndex:-1,className:R("flex items-center gap-2 border border-[var(--border-tag-neutral-idle)] bg-purple-muted-800 py-0.5 px-3 rounded-md scrollbar-thin",{"opacity-60":l}),onClick:L=>{var A;L.stopPropagation(),P(!0),(A=N.current)==null||A.focus()},children:[G(),s.jsxs("div",{ref:U,className:"flex items-center gap-2 w-full whitespace-normal overflow-x-auto",children:[Z(),s.jsx(Pr,{ref:N,value:E,onChange:D,onClick:L=>L.stopPropagation(),onFocus:()=>P(!0),onBlur:b,onKeyDown:J,placeholder:r,disabled:l||Q,className:R("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")})]}),z()]})}),T()]})})};function _C(e){const{control:t}=lr();return s.jsx(Du,{name:e.name,control:t,render:({field:r})=>s.jsx(yf,{...e,value:r.value,onChange:r.onChange,onBlur:r.onBlur})})}const AC=Ot(_C),IC=12,bi={SINGLE:"single",MULTIPLE:"multiple"},yi={LTR:"ltr"};var wf=typeof global=="object"&&global&&global.Object===Object&&global,MC=typeof self=="object"&&self&&self.Object===Object&&self,yt=wf||MC||Function("return this")(),bn=yt.Symbol,Cf=Object.prototype,OC=Cf.hasOwnProperty,DC=Cf.toString,mr=bn?bn.toStringTag:void 0;function $C(e){var t=OC.call(e,mr),r=e[mr];try{e[mr]=void 0;var n=!0}catch{}var o=DC.call(e);return n&&(t?e[mr]=r:delete e[mr]),o}var LC=Object.prototype,FC=LC.toString;function VC(e){return FC.call(e)}var BC="[object Null]",GC="[object Undefined]",wi=bn?bn.toStringTag:void 0;function Fr(e){return e==null?e===void 0?GC:BC:wi&&wi in Object(e)?$C(e):VC(e)}function Ha(e){return e!=null&&typeof e=="object"}var WC=Array.isArray;function Sf(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var zC="[object AsyncFunction]",qC="[object Function]",UC="[object GeneratorFunction]",HC="[object Proxy]";function Ef(e){if(!Sf(e))return!1;var t=Fr(e);return t==qC||t==UC||t==zC||t==HC}var jo=yt["__core-js_shared__"],Ci=(function(){var e=/[^.]+$/.exec(jo&&jo.keys&&jo.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function KC(e){return!!Ci&&Ci in e}var YC=Function.prototype,XC=YC.toString;function Dt(e){if(e!=null){try{return XC.call(e)}catch{}try{return e+""}catch{}}return""}var ZC=/[\\^$.*+?()[\]{}|]/g,JC=/^\[object .+?Constructor\]$/,QC=Function.prototype,e1=Object.prototype,t1=QC.toString,r1=e1.hasOwnProperty,n1=RegExp("^"+t1.call(r1).replace(ZC,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function o1(e){if(!Sf(e)||KC(e))return!1;var t=Ef(e)?n1:JC;return t.test(Dt(e))}function a1(e,t){return e==null?void 0:e[t]}function Vr(e,t){var r=a1(e,t);return o1(r)?r:void 0}var Jo=Vr(yt,"WeakMap"),s1=9007199254740991;function kf(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=s1}function i1(e){return e!=null&&kf(e.length)&&!Ef(e)}var l1=Object.prototype;function Rf(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||l1;return e===r}var c1="[object Arguments]";function Si(e){return Ha(e)&&Fr(e)==c1}var Nf=Object.prototype,d1=Nf.hasOwnProperty,u1=Nf.propertyIsEnumerable,f1=Si((function(){return arguments})())?Si:function(e){return Ha(e)&&d1.call(e,"callee")&&!u1.call(e,"callee")};function p1(){return!1}var jf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ei=jf&&typeof module=="object"&&module&&!module.nodeType&&module,m1=Ei&&Ei.exports===jf,ki=m1?yt.Buffer:void 0,g1=ki?ki.isBuffer:void 0,v1=g1||p1,h1="[object Arguments]",x1="[object Array]",b1="[object Boolean]",y1="[object Date]",w1="[object Error]",C1="[object Function]",S1="[object Map]",E1="[object Number]",k1="[object Object]",R1="[object RegExp]",N1="[object Set]",j1="[object String]",P1="[object WeakMap]",T1="[object ArrayBuffer]",_1="[object DataView]",A1="[object Float32Array]",I1="[object Float64Array]",M1="[object Int8Array]",O1="[object Int16Array]",D1="[object Int32Array]",$1="[object Uint8Array]",L1="[object Uint8ClampedArray]",F1="[object Uint16Array]",V1="[object Uint32Array]",pe={};pe[A1]=pe[I1]=pe[M1]=pe[O1]=pe[D1]=pe[$1]=pe[L1]=pe[F1]=pe[V1]=!0;pe[h1]=pe[x1]=pe[T1]=pe[b1]=pe[_1]=pe[y1]=pe[w1]=pe[C1]=pe[S1]=pe[E1]=pe[k1]=pe[R1]=pe[N1]=pe[j1]=pe[P1]=!1;function B1(e){return Ha(e)&&kf(e.length)&&!!pe[Fr(e)]}function G1(e){return function(t){return e(t)}}var Pf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Cr=Pf&&typeof module=="object"&&module&&!module.nodeType&&module,W1=Cr&&Cr.exports===Pf,Po=W1&&wf.process,Ri=(function(){try{var e=Cr&&Cr.require&&Cr.require("util").types;return e||Po&&Po.binding&&Po.binding("util")}catch{}})(),Ni=Ri&&Ri.isTypedArray,z1=Ni?G1(Ni):B1;function q1(e,t){return function(r){return e(t(r))}}var U1=q1(Object.keys,Object),H1=Object.prototype,K1=H1.hasOwnProperty;function Y1(e){if(!Rf(e))return U1(e);var t=[];for(var r in Object(e))K1.call(e,r)&&r!="constructor"&&t.push(r);return t}var Qo=Vr(yt,"Map"),ea=Vr(yt,"DataView"),ta=Vr(yt,"Promise"),ra=Vr(yt,"Set"),ji="[object Map]",X1="[object Object]",Pi="[object Promise]",Ti="[object Set]",_i="[object WeakMap]",Ai="[object DataView]",Z1=Dt(ea),J1=Dt(Qo),Q1=Dt(ta),eS=Dt(ra),tS=Dt(Jo),kt=Fr;(ea&&kt(new ea(new ArrayBuffer(1)))!=Ai||Qo&&kt(new Qo)!=ji||ta&&kt(ta.resolve())!=Pi||ra&&kt(new ra)!=Ti||Jo&&kt(new Jo)!=_i)&&(kt=function(e){var t=Fr(e),r=t==X1?e.constructor:void 0,n=r?Dt(r):"";if(n)switch(n){case Z1:return Ai;case J1:return ji;case Q1:return Pi;case eS:return Ti;case tS:return _i}return t});var rS="[object Map]",nS="[object Set]",oS=Object.prototype,aS=oS.hasOwnProperty;function cr(e){if(e==null)return!0;if(i1(e)&&(WC(e)||typeof e=="string"||typeof e.splice=="function"||v1(e)||z1(e)||f1(e)))return!e.length;var t=kt(e);if(t==rS||t==nS)return!e.size;if(Rf(e))return!Y1(e).length;for(var r in e)if(aS.call(e,r))return!1;return!0}function to(e){return!e.children||e.children.length===0?[e.value]:e.children.flatMap(t=>to(t))}function Ka(e){const t=[e.value];return e.children&&e.children.forEach(r=>{t.push(...Ka(r))}),t}function Ya(e,t){return cr(e.children)?!1:to(e).every(n=>t.has(n))}function sS(e,t){return cr(e.children)?!1:to(e).some(n=>t.has(n))}function Tf(e,t){for(const r of e){if(r.value===t)return r;if(r.children){const n=Tf(r.children,t);if(n)return n}}return null}function Xa(e,t){const r=new Map;for(const n of e){const o=t(n);o&&r.set(o[0],o[1]),n.children&&Xa(n.children,t).forEach((i,l)=>r.set(l,i))}return r}function _f(e,t){e.forEach(r=>{cr(r.children)||(Ya(r,t)?t.add(r.value):t.delete(r.value),r.children&&_f(r.children,t))})}const iS=e=>e?Array.isArray(e)?e:[e]:[],lS=e=>Xa(e,t=>[t.value,t.label]),cS=e=>Xa(e,t=>t.icon?[t.value,t.icon]:null);function dS(e,t){Ka(e).forEach(n=>t.delete(n))}function uS(e,t){Ka(e).forEach(n=>t.add(n))}function Af(e,t){const r=new Set(t);return e.flatMap(n=>!cr(n.children)&&n.children?Ya(n,r)?[n.value]:Af(n.children,t):r.has(n.value)?[n.value]:[])}function fS(e){return e&&e>1?e*IC:0}function If({option:e,selected:t,onSelect:r,nestLevel:n=0,disabled:o=!1,dir:a=yi.LTR}){const i=!cr(e.children),l=t.has(e.value),c=`${fS(n)}px`,u=Ya(e,t),p=sS(e,t)&&!u,g=l||u,m=()=>{if(n!==0)return s.jsx(Xg,{className:"w-4 text-[var(--text-interactive-neutral-idle)]"})},b=()=>{if(e.icon)return s.jsx("div",{className:"flex-shrink-0 [&>svg]:text-[var(--text-interactive-neutral-idle)]!",children:e.icon})},v=()=>p?s.jsx(Jg,{className:"w-2 h-2 flex-shrink-0 transition-opacity text-[var(--text-interactive-neutral-idle)]"}):s.jsx(rr,{className:R("h-4 w-4 flex-shrink-0 transition-opacity text-[var(--text-interactive-neutral-idle)] opacity-0",{"opacity-100":g})}),x=()=>{if(i)return e.children.map(h=>s.jsx(If,{option:h,selected:t,onSelect:r,nestLevel:n+1,dir:a},h.value))},y=()=>s.jsxs("div",{className:R("flex items-center w-full gap-2 flex-row",{"flex-row-reverse":a===yi.LTR}),style:{paddingLeft:c},children:[s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[m(),b(),s.jsx("span",{className:"flex-1 text-[var(--text-interactive-neutral-active)]",children:e.label})]}),v()]});return s.jsxs("div",{children:[s.jsx(gd,{disabled:e.disabled||o,onSelect:()=>r(e.value,i),className:R("text-[var(--text-interactive-neutral-idle)] hover:text-[var(--text-interactive-neutral-hover)]! cursor-pointer disabled:cursor-not-allowed","focus:text-[var(--text-interactive-neutral-active)] data-[selected=true]:text-[var(--text-interactive-neutral-hover)]!",{"bg-[var(--fill-interactive-neutral-idle)]":g}),children:y()}),x()]})}function Mf({value:e,options:t=[],onSelect:r,disabled:n=!1,mode:o=bi.SINGLE,placeholder:a="Select...",inputPlaceholder:i="Search...",emptyState:l="No option found.",triggerClassName:c,triggerWrapperClassName:u,badgeClassName:f,badgeVariant:p="text",searchable:g=!1,toggleIcon:m=s.jsx(En,{}),dir:b="ltr",...v}){const[x,y]=S.useState(0),[h,C]=S.useState(!1),E=S.useRef(null),j=o===bi.MULTIPLE,[_,P]=S.useState(e!==void 0?e:j?[]:""),N=iS(_),W=new Set(N);S.useEffect(()=>{E.current&&y(E.current.offsetWidth)},[_]);const U=lS(t),re=cS(t);S.useEffect(()=>{e!==void 0&&P(j?e||[]:e||"")},[e,j]);function te(D,k){if(!j){P(D),r==null||r(D),C(!1);return}P(M=>{const B=Array.isArray(M)?M:[],J=new Set(B),T=Tf(t,D);if(!T)return B;k?Q(T,J):V(D,J);const G=Array.from(J);return r==null||r(G),G})}function Q(D,k){to(D).every(J=>k.has(J))?dS(D,k):uS(D,k)}function V(D,k){k.has(D)?k.delete(D):k.add(D),_f(t,k)}const O=()=>{const D=Af(t,N);return D.length===0?s.jsx(Jt,{variant:p,size:"md",className:R("text-purple-muted-300",f),children:a}):D.map(M=>{const B=re.get(M),J=U.get(M)||M;return s.jsx(Jt,{variant:p,size:"md",className:R("text-[var(--text-bg-neutral-mid)]",f),children:s.jsxs("div",{className:"flex items-center gap-1",children:[B&&s.jsx("div",{className:"flex-shrink-0",children:B}),s.jsx("span",{children:J})]})},M)})},I=()=>{if(g)return s.jsx(ud,{className:"placeholder:text-[var(--text-bg-neutral-mid)] text-[var(--text-interactive-neutral-active)]",placeholder:i})};return s.jsxs(Ca,{open:h,onOpenChange:n?void 0:C,children:[s.jsx(Sa,{asChild:!0,disabled:n,children:s.jsxs("div",{className:R("flex items-center gap-1.5 justify-between py-1 px-3 w-[100%] border border-[var(--border-interactive-neutral-idle)] bg-[var(--fill-input-neutral-idle)] rounded-sm scrollbar-thin","aria-invalid:!border-destructive aria-invalid:!ring-destructive/20 dark:aria-invalid:!ring-destructive/40",{"cursor-pointer hover:border-[var(--border-input-neutral-hover)] hover:bg-[var(--fill-input-neutral-hover)]":!n,"cursor-not-allowed opacity-75 ":n},u),ref:E,"aria-disabled":n,...v,children:[s.jsx("div",{className:R("flex justify-start text-start w-[100%] whitespace-nowrap overflow-x-auto gap-1.5",c),children:O()}),s.jsx("div",{className:"[&>svg]:text-[var(--icon-input-neutral-idle)] [&>svg]:hover:text-[var(--icon-input-neutral-hover)] [&>svg]:w-4 [&>svg]:h-4",children:m})]})}),s.jsx(Ea,{className:"p-0 border bg-[var(--fill-interactive-neutral-idle)] border-[var(--border-interactive-neutral-idle)] [&>svg]:text-purple-muted-300",style:{width:x??"auto"},children:s.jsxs(dd,{className:"bg-[var(--fill-interactive-neutral-idle)]",children:[I(),s.jsxs(fd,{children:[s.jsx(pd,{children:l}),s.jsx(md,{children:t.map(D=>s.jsx(If,{disabled:n,option:D,selected:W,onSelect:te,dir:b},D.value))})]})]})})]})}const Of=S.forwardRef(e=>{const{options:t,onChange:r,readOnly:n,value:o,disabled:a,mode:i,...l}=e,c=u=>{n||r&&r({target:{value:u}})};return s.jsx(Mf,{options:t,value:o,disabled:a,...l,onSelect:c,mode:i})});Of.displayName="BaseSelectComponent";const pS=Ot(Of),Za=S.forwardRef((e,t)=>{const{value:r=[],defaultValue:n=[],onValueChange:o,disabled:a=!1,readOnly:i=!1,className:l,direction:c="vertical",onChange:u,children:f,...p}=e,[g,m]=S.useState(cr(r)?n:r),b=c==="horizontal",v=r!==void 0?r:g,x=(C,E)=>{if(i)return;const j=E?[...v,C]:v.filter(_=>_!==C);r===void 0&&m(j),u==null||u({target:{value:j}}),o==null||o(j)},y=R("qodo qodo-custom-checkbox-group","flex",{"flex-row gap-6":b,"flex-col gap-3":!b},l),h=()=>S.Children.map(f,C=>{if(!S.isValidElement(C))return C;const E=C.props.name;if(!E)return C;const j=C.props.disabled,_=i||a||j;return S.cloneElement(C,{checked:v.includes(E),onCheckedChange:P=>x(E,P),disabled:_,name:E})});return s.jsx("div",{ref:t,className:y,...p,children:h()})});Za.displayName="CheckboxGroupComponent";var ro="Checkbox",[mS,HR]=ye(ro),[gS,Ja]=mS(ro);function vS(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:o,disabled:a,form:i,name:l,onCheckedChange:c,required:u,value:f="on",internal_do_not_use_render:p}=e,[g,m]=be({prop:r,defaultProp:o??!1,onChange:c,caller:ro}),[b,v]=d.useState(null),[x,y]=d.useState(null),h=d.useRef(!1),C=b?!!i||!!b.closest("form"):!0,E={checked:g,disabled:a,setChecked:m,control:b,setControl:v,name:l,form:i,value:f,hasConsumerStoppedPropagationRef:h,required:u,defaultChecked:ct(o)?!1:o,isFormControl:C,bubbleInput:x,setBubbleInput:y};return s.jsx(gS,{scope:t,...E,children:hS(p)?p(E):n})}var Df="CheckboxTrigger",$f=d.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},o)=>{const{control:a,value:i,disabled:l,checked:c,required:u,setControl:f,setChecked:p,hasConsumerStoppedPropagationRef:g,isFormControl:m,bubbleInput:b}=Ja(Df,e),v=ae(o,f),x=d.useRef(c);return d.useEffect(()=>{const y=a==null?void 0:a.form;if(y){const h=()=>p(x.current);return y.addEventListener("reset",h),()=>y.removeEventListener("reset",h)}},[a,p]),s.jsx(q.button,{type:"button",role:"checkbox","aria-checked":ct(c)?"mixed":c,"aria-required":u,"data-state":Gf(c),"data-disabled":l?"":void 0,disabled:l,value:i,...n,ref:v,onKeyDown:F(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:F(r,y=>{p(h=>ct(h)?!0:!h),b&&m&&(g.current=y.isPropagationStopped(),g.current||y.stopPropagation())})})});$f.displayName=Df;var Qa=d.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:o,defaultChecked:a,required:i,disabled:l,value:c,onCheckedChange:u,form:f,...p}=e;return s.jsx(vS,{__scopeCheckbox:r,checked:o,defaultChecked:a,disabled:l,required:i,onCheckedChange:u,name:n,form:f,value:c,internal_do_not_use_render:({isFormControl:g})=>s.jsxs(s.Fragment,{children:[s.jsx($f,{...p,ref:t,__scopeCheckbox:r}),g&&s.jsx(Bf,{__scopeCheckbox:r})]})})});Qa.displayName=ro;var Lf="CheckboxIndicator",Ff=d.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...o}=e,a=Ja(Lf,r);return s.jsx(Ce,{present:n||ct(a.checked)||a.checked===!0,children:s.jsx(q.span,{"data-state":Gf(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Ff.displayName=Lf;var Vf="CheckboxBubbleInput",Bf=d.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:i,required:l,disabled:c,name:u,value:f,form:p,bubbleInput:g,setBubbleInput:m}=Ja(Vf,e),b=ae(r,m),v=On(a),x=An(n);d.useEffect(()=>{const h=g;if(!h)return;const C=window.HTMLInputElement.prototype,j=Object.getOwnPropertyDescriptor(C,"checked").set,_=!o.current;if(v!==a&&j){const P=new Event("click",{bubbles:_});h.indeterminate=ct(a),j.call(h,ct(a)?!1:a),h.dispatchEvent(P)}},[g,v,a,o]);const y=d.useRef(ct(a)?!1:a);return s.jsx(q.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??y.current,required:l,disabled:c,name:u,value:f,form:p,...t,tabIndex:-1,ref:b,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Bf.displayName=Vf;function hS(e){return typeof e=="function"}function ct(e){return e==="indeterminate"}function Gf(e){return ct(e)?"indeterminate":e?"checked":"unchecked"}const Wf=d.forwardRef(({className:e,...t},r)=>s.jsx(Qa,{ref:r,className:R("h-4 w-4 shrink-0 rounded-xs shadow disabled:cursor-not-allowed bg-[var(--fill-input-neutral-idle)] border border-[var(--border-input-neutral-idle)] hover:border-[var(--border-input-neutral-hover)] hover:bg-[var(--fill-input-neutral-hover)] ","active:border-[var(--border-input-neutral-active)] active:bg-[var(--fill-input-neutral-active)] disabled:border-[var(--border-input-neutral-disabled)] disabled:bg-[var(--fill-input-neutral-disabled)] ","hover:disabled:border-[var(--border-input-neutral-disabled)] hover:disabled:bg-[var(--fill-input-neutral-disabled)] ","data-[state=checked]:border-[var(--border-input-emphasis-idle)] data-[state=checked]:bg-[var(--fill-input-emphasis-idle)] hover:data-[state=checked]:border-[var(--border-input-emphasis-hover)] hover:data-[state=checked]:bg-[var(--fill-input-emphasis-hover)] active:data-[state=checked]:border-[var(--border-input-emphasis-active)] active:data-[state=checked]:bg-[var(--fill-input-emphasis-active)] disabled:data-[state=checked]:border-[var(--border-input-emphasis-disabled)] disabled:data-[state=checked]:bg-[var(--fill-input-emphasis-disabled)] ",e),...t,children:s.jsx(Ff,{className:R("flex items-center justify-center text-current"),children:t.checked==="indeterminate"?s.jsx(lv,{className:"h-4 w-4 stroke-[var(--icon-input-emphasis-idle)]"}):s.jsx(rr,{className:"h-4 w-4 stroke-[var(--icon-input-emphasis-idle)]"})})}));Wf.displayName=Qa.displayName;const es=({disabled:e,error:t,name:r="checkbox",checked:n,onCheckedChange:o,label:a,description:i,labelWrapperClassName:l,labelClassName:c,descriptionClassName:u,checkboxClassName:f,wrapperClassName:p})=>s.jsxs(Va,{htmlFor:r,className:R("group/checkbox-item 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":!e,"cursor-not-allowed":e,"border border-destructive":t},p),children:[s.jsx(Wf,{id:r,disabled:e||t,checked:n,onCheckedChange:o,className:R("mt-0.5",f)}),s.jsx(qa,{label:a,description:i,disabled:e,labelClassName:c,descriptionClassName:u,labelWrapperClassName:l})]});es.displayName="CheckboxGroupItemComponent";const xS=Ot(Za),je=e=>{const{className:t,disabled:r=!1,readOnly:n=!1,methods:o,onSubmit:a=()=>{},...i}=e,{handleSubmit:l}=o,c=R("qodo qodo-form","flex flex-col gap-6",t);return s.jsx(Lu,{methods:o,disabled:r,readOnly:n,children:s.jsx("form",{className:c,onSubmit:l(a),...i})})};je.Button=C0;je.Input=iC;je.Select=pS;je.Combobox=cC;je.RadioGroup=EC;je.RadioGroupItem=Ua;je.Group=xf;je.Textarea=jC;je.Divider=kC;je.Title=RC;je.TagsInput=AC;je.CheckboxGroup=xS;je.Checkbox=es;function bS(e){return e==null?[]:Array.isArray(e)?e:[e]}var yS=e=>Array.from(Array(e).keys()),Ii=e=>(e==null?void 0:e.constructor.name)==="Array",wS=(e,t)=>{if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!ts(e[r],t[r]))return!1;return!0},ts=(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(Ii(e)&&Ii(t))return wS(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(!ts(e[a],t[a]))return!1}return!0},CS=e=>e!=null&&typeof e=="object",sn=e=>typeof e=="string",hr=e=>typeof e=="function",SS=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),ES=e=>Object.prototype.toString.call(e),zf=Function.prototype.toString,kS=zf.call(Object),RS=e=>{if(!CS(e)||ES(e)!="[object Object]"||PS(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const r=SS(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&zf.call(r)==kS},NS=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,jS=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,PS=e=>NS(e)||jS(e),TS=e=>e(),_S=(...e)=>(...t)=>{e.forEach(function(r){r==null||r(...t)})},AS=e=>Number.isNaN(e),IS=e=>AS(e)?0:e,MS=(e,t,r)=>{const n=IS(e),o=n>=t,a=r==null||n<=r;return o&&a};function qf(e){if(!RS(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]=qf(o))}return r}function Mi(...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 OS(e,t){if(e==null)throw new Error(t())}var Uf=e=>typeof e=="object"&&e!==null,We=e=>e?"":void 0,DS=9,$S=e=>Uf(e)&&e.nodeType===DS,LS=e=>Uf(e)&&e===e.window;function FS(e){if(!e)return!1;const t=e.getRootNode();return Hf(t)===e}function VS(e){return $S(e)?e:LS(e)?e.document:(e==null?void 0:e.ownerDocument)??document}function Hf(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 BS=(...e)=>e.map(t=>{var r;return(r=t==null?void 0:t.trim)==null?void 0:r.call(t)}).filter(Boolean).join(" "),GS=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Oi=e=>{const t={};let r;for(;r=GS.exec(e);)t[r[1]]=r[2];return t},WS=(e,t)=>{if(sn(e)){if(sn(t))return`${e};${t}`;e=Oi(e)}else sn(t)&&(t=Oi(t));return Object.assign({},e??{},t??{})};function Be(...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]=_S(r[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=BS(t[o],r[o]);continue}if(o==="style"){t[o]=WS(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 zS(e,t,r){let n=[],o;return a=>{const i=e(a);return(i.length!==n.length||i.some((c,u)=>!ts(n[u],c)))&&(n=i,o=t(i,a)),o}}var Ht=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Ht||{}),To="__init__";function qS(e){const t=()=>{var i;return((i=e.getRootNode)==null?void 0:i.call(e))??document},r=()=>VS(t());return{...e,getRootNode:t,getDoc:r,getWin:()=>r().defaultView??window,getActiveElement:()=>Hf(t()),isActiveElement:FS,getById:i=>t().getElementById(i)}}function US(e){return new Proxy({},{get(t,r){return r==="style"?n=>e({style:n}).style:e}})}var HS=()=>e=>Array.from(new Set(e)),Kf=typeof globalThis.document<"u"?S.useLayoutEffect:S.useEffect;function yn(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 c=S.useRef(l.current);Kf(()=>{c.current=l.current},[o,e().value]);const u=p=>{var b,v;const g=c.current,m=hr(p)?p(g):p;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:m,prev:g}),i||a(m),r(m,g)||(v=(b=e()).onChange)==null||v.call(b,m,g)};function f(){return i?e().value:o}return{initial:n,ref:l,get:f,set(p){(e().sync?jr.flushSync:TS)(()=>u(p))},invoke(p,g){var m,b;(b=(m=e()).onChange)==null||b.call(m,p,g)},hash(p){var g,m;return((m=(g=e()).hash)==null?void 0:m.call(g,p))??String(p)}}}yn.cleanup=e=>{S.useEffect(()=>e,[])};yn.ref=e=>{const t=S.useRef(e);return{get:()=>t.current,set:r=>{t.current=r}}};function KS(e){const t=S.useRef(e);return{get(r){return t.current[r]},set(r,n){t.current[r]=n}}}var YS=(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 XS(e,t={}){var re,te,Q,V;const r=S.useMemo(()=>{const{id:O,ids:I,getRootNode:D}=t;return qS({id:O,ids:I,getRootNode:D})},[t]),n=(...O)=>{e.debug&&console.log(...O)},o=((re=e.props)==null?void 0:re.call(e,{props:qf(t),scope:r}))??t,a=ZS(o),i=(te=e.context)==null?void 0:te.call(e,{prop:a,bindable:yn,scope:r,flush:Di,getContext(){return c},getComputed(){return j},getRefs(){return v},getEvent(){return m()}}),l=Yf(i),c={get(O){var I;return(I=l.current)==null?void 0:I[O].ref.current},set(O,I){var D;(D=l.current)==null||D[O].set(I)},initial(O){var I;return(I=l.current)==null?void 0:I[O].initial},hash(O){var D,k;const I=(D=l.current)==null?void 0:D[O].get();return(k=l.current)==null?void 0:k[O].hash(I)}},u=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}}),b=()=>({..._,matches(...O){return O.includes(_.ref.current)},hasTag(O){var I,D;return!!((D=(I=e.states[_.ref.current])==null?void 0:I.tags)!=null&&D.includes(O))}}),v=KS(((Q=e.refs)==null?void 0:Q.call(e,{prop:a,context:c}))??{}),x=()=>({state:b(),context:c,event:m(),prop:a,send:U,action:y,guard:h,track:YS,refs:v,computed:j,flush:Di,scope:r,choose:E}),y=O=>{const I=hr(O)?O(x()):O;if(!I)return;const D=I.map(k=>{var B,J;const M=(J=(B=e.implementations)==null?void 0:B.actions)==null?void 0:J[k];return M||Mi(`[zag-js] No implementation found for action "${JSON.stringify(k)}"`),M});for(const k of D)k==null||k(x())},h=O=>{var I,D;return hr(O)?O(x()):(D=(I=e.implementations)==null?void 0:I.guards)==null?void 0:D[O](x())},C=O=>{const I=hr(O)?O(x()):O;if(!I)return;const D=I.map(M=>{var J,T;const B=(T=(J=e.implementations)==null?void 0:J.effects)==null?void 0:T[M];return B||Mi(`[zag-js] No implementation found for effect "${JSON.stringify(M)}"`),B}),k=[];for(const M of D){const B=M==null?void 0:M(x());B&&k.push(B)}return()=>k.forEach(M=>M==null?void 0:M())},E=O=>bS(O).find(I=>{let D=!I.guard;return sn(I.guard)?D=!!h(I.guard):hr(I.guard)&&(D=I.guard(x())),D}),j=O=>{OS(e.computed,()=>"[zag-js] No computed object found on machine");const I=e.computed[O];return I({context:c,event:m(),prop:a,refs:v,scope:r,computed:j})},_=yn(()=>({defaultValue:e.initialState({prop:a}),onChange(O,I){var k,M,B,J;if(I){const T=u.current.get(I);T==null||T(),u.current.delete(I)}I&&y((k=e.states[I])==null?void 0:k.exit),y((M=f.current)==null?void 0:M.actions);const D=C((B=e.states[O])==null?void 0:B.effects);if(D&&u.current.set(O,D),I===To){y(e.entry);const T=C(e.effects);T&&u.current.set(To,T)}y((J=e.states[O])==null?void 0:J.entry)}})),P=S.useRef(void 0),N=S.useRef(Ht.NotStarted);Kf(()=>{queueMicrotask(()=>{const D=N.current===Ht.Started;N.current=Ht.Started,n(D?"rehydrating...":"initializing...");const k=P.current??_.initial;_.invoke(k,D?_.get():To)});const O=u.current,I=_.ref.current;return()=>{n("unmounting..."),P.current=I,N.current=Ht.Stopped,O.forEach(D=>D==null?void 0:D()),u.current=new Map,f.current=null,queueMicrotask(()=>{y(e.exit)})}},[]);const W=()=>"ref"in _?_.ref.current:_.get(),U=O=>{queueMicrotask(()=>{var J,T;if(N.current!==Ht.Started)return;p.current=g.current,g.current=O;let I=W();const D=((J=e.states[I].on)==null?void 0:J[O.type])??((T=e.on)==null?void 0:T[O.type]),k=E(D);if(!k)return;f.current=k;const M=k.target??I;n("transition",O.type,k.target||I,`(${k.actions})`);const B=M!==I;B?jr.flushSync(()=>_.set(M)):k.reenter&&!B?_.invoke(I,I):y(k.actions??[])})};return(V=e.watch)==null||V.call(e,x()),{state:b(),send:U,context:c,prop:a,scope:r,refs:v,computed:j,event:m(),getStatus:()=>N.current}}function Yf(e){const t=S.useRef(e);return t.current=e,t}function ZS(e){const t=Yf(e);return function(n){return t.current[n]}}function Di(e){queueMicrotask(()=>{jr.flushSync(()=>e())})}var JS=US(e=>e);function QS(...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 eE(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 _o=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),c=eE(l);return S.cloneElement(l,{...Be(i,l.props),ref:n?QS(n,c):c})}));return t.displayName=e.displayName||e.name,t},tE=()=>{const e=new Map;return new Proxy(_o,{apply(t,r,n){return _o(n[0])},get(t,r){const n=r;return e.has(n)||e.set(n,_o(n)),e.get(n)}})},Xe=tE();function rE(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Br(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 c(){var f;const u=S.useContext(l);if(!u&&r){const p=new Error(a??rE(n,o));throw p.name="ContextError",(f=Error.captureStackTrace)==null||f.call(Error,p,c),p}return u}return[l.Provider,c,l]}const[nE,ot]=Br({name:"StepsContext",hookName:"useStepsContext",providerName:"<StepsProvider />"}),Xf=S.forwardRef((e,t)=>{const r=ot(),n=Be(r.getContentProps({index:r.count}),e);return s.jsx(Xe.div,{...n,ref:t})});Xf.displayName="StepsCompletedContent";const rs=()=>(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}]),Zf=S.forwardRef((e,t)=>{const[r,n]=rs()(e,["index"]),o=ot(),a=Be(o.getContentProps(r),n);return s.jsx(Xe.div,{...a,ref:t})});Zf.displayName="StepsContent";const[oE,ns]=Br({name:"StepsItemPropsContext",hookName:"useStepsItemPropsContext",providerName:"<StepsItemPropsProvider />"}),Jf=S.forwardRef((e,t)=>{const r=ot(),n=ns(),o=Be(r.getIndicatorProps(n),e);return s.jsx(Xe.div,{...o,ref:t})});Jf.displayName="StepsIndicator";const[aE,KR]=Br({name:"StepsItemContext",hookName:"useStepsItemContext",providerName:"<StepsItem />"}),Qf=S.forwardRef((e,t)=>{const[r,n]=rs()(e,["index"]),o=ot(),a=Be(o.getItemProps(r),n),i=o.getItemState(r);return s.jsx(oE,{value:r,children:s.jsx(aE,{value:i,children:s.jsx(Xe.div,{...a,ref:t})})})});Qf.displayName="StepsItem";const ep=S.forwardRef((e,t)=>{const r=ot(),n=Be(r.getListProps(),e);return s.jsx(Xe.div,{...n,ref:t})});ep.displayName="StepsList";const tp=S.forwardRef((e,t)=>{const r=ot(),n=Be(r.getNextTriggerProps(),e);return s.jsx(Xe.button,{...n,ref:t})});tp.displayName="StepsNextTrigger";const rp=S.forwardRef((e,t)=>{const r=ot(),n=Be(r.getPrevTriggerProps(),e);return s.jsx(Xe.button,{...n,ref:t})});rp.displayName="StepsPrevTrigger";var xr=(e,t=[])=>({parts:(...r)=>{if(sE(t))return xr(e,r);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...r)=>xr(e,[...t,...r]),omit:(...r)=>xr(e,t.filter(n=>!r.includes(n))),rename:r=>xr(r,t),keys:()=>t,build:()=>[...new Set(t)].reduce((r,n)=>Object.assign(r,{[n]:{selector:[`&[data-scope="${zt(e)}"][data-part="${zt(n)}"]`,`& [data-scope="${zt(e)}"][data-part="${zt(n)}"]`].join(", "),attrs:{"data-scope":zt(e),"data-part":zt(n)}}}),{})}),zt=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),sE=e=>e.length===0,iE=xr("steps").parts("root","list","item","trigger","indicator","separator","content","nextTrigger","prevTrigger","progress"),ze=iE.build(),lE=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`steps:${e.id}`},cE=e=>{var t;return((t=e.ids)==null?void 0:t.list)??`steps:${e.id}:list`},$i=(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}`},dE=(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 uE(e,t){const{context:r,send:n,computed:o,prop:a,scope:i}=e,l=r.get("step"),c=a("count"),u=o("percent"),f=o("hasNextStep"),p=o("hasPrevStep"),g=y=>({triggerId:$i(i,y.index),contentId:dE(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===c-1}),m=()=>{n({type:"STEP.NEXT",src:"next.trigger.click"})},b=()=>{n({type:"STEP.PREV",src:"prev.trigger.click"})},v=()=>{n({type:"STEP.RESET",src:"reset.trigger.click"})},x=y=>{n({type:"STEP.SET",value:y,src:"api.setValue"})};return{value:l,count:c,percent:u,hasNextStep:f,hasPrevStep:p,isCompleted:o("completed"),goToNextStep:m,goToPrevStep:b,resetStep:v,getItemState:g,setStep:x,getRootProps(){return t.element({...ze.root.attrs,id:lE(i),dir:a("dir"),"data-orientation":a("orientation"),style:{"--percent":`${u}%`}})},getListProps(){const h=yS(c).map((C,E)=>$i(i,E));return t.element({...ze.list.attrs,dir:a("dir"),id:cE(i),role:"tablist","aria-owns":h.join(" "),"aria-orientation":a("orientation"),"data-orientation":a("orientation")})},getItemProps(y){const h=g(y);return t.element({...ze.item.attrs,dir:a("dir"),"aria-current":h.current?"step":void 0,"data-orientation":a("orientation")})},getTriggerProps(y){const h=g(y);return t.button({...ze.trigger.attrs,id:h.triggerId,role:"tab",dir:a("dir"),tabIndex:!a("linear")||h.current?0:-1,"aria-selected":h.current,"aria-controls":h.contentId,"data-state":h.current?"open":"closed","data-orientation":a("orientation"),"data-complete":We(h.completed),"data-current":We(h.current),"data-incomplete":We(h.incomplete),onClick(C){C.defaultPrevented||a("linear")||n({type:"STEP.SET",value:y.index,src:"trigger.click"})}})},getContentProps(y){const h=g(y);return t.element({...ze.content.attrs,dir:a("dir"),id:h.contentId,role:"tabpanel",tabIndex:0,hidden:!h.current,"data-state":h.current?"open":"closed","data-orientation":a("orientation"),"aria-labelledby":h.triggerId})},getIndicatorProps(y){const h=g(y);return t.element({...ze.indicator.attrs,dir:a("dir"),"aria-hidden":!0,"data-complete":We(h.completed),"data-current":We(h.current),"data-incomplete":We(h.incomplete)})},getSeparatorProps(y){const h=g(y);return t.element({...ze.separator.attrs,dir:a("dir"),"data-orientation":a("orientation"),"data-complete":We(h.completed),"data-current":We(h.current),"data-incomplete":We(h.incomplete)})},getNextTriggerProps(){return t.button({...ze.nextTrigger.attrs,dir:a("dir"),type:"button",disabled:!f,onClick(y){y.defaultPrevented||m()}})},getPrevTriggerProps(){return t.button({dir:a("dir"),...ze.prevTrigger.attrs,type:"button",disabled:!p,onClick(y){y.defaultPrevented||b()}})},getProgressProps(){return t.element({dir:a("dir"),...ze.progress.attrs,role:"progressbar","aria-valuenow":u,"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":`${u}% complete`,"data-complete":We(u===100)})}}}var fE={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:zS(({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}){pE(t("count"),e.get("step"))}}}},pE=(e,t)=>{if(!MS(t,0,e))throw new RangeError(`[zag-js/steps] step index ${t} is out of bounds`)};HS()(["count","dir","getRootNode","id","ids","linear","onStepChange","onStepComplete","orientation","step","defaultStep"]);const[YR,mE]=Br({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[XR,gE]=Br({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}});function vE(e){const t=S.useId(),{getRootNode:r}=mE(),{dir:n}=gE(),o={id:t,dir:n,getRootNode:r,...e},a=XS(fE,o);return uE(a,JS)}const np=S.forwardRef((e,t)=>{const[r,n]=rs()(e,["defaultStep","id","ids","count","linear","onStepChange","onStepComplete","orientation","step"]),o=vE(r),a=Be(o.getRootProps(),n);return s.jsx(nE,{value:o,children:s.jsx(Xe.div,{...a,ref:t})})});np.displayName="StepsRoot";const op=S.forwardRef((e,t)=>{const r=ot(),n=ns(),o=Be(r.getSeparatorProps(n),e);return s.jsx(Xe.div,{...o,ref:t})});op.displayName="StepsSeparator";const ap=S.forwardRef((e,t)=>{const r=ot(),n=ns(),o=Be(r.getTriggerProps(n),e);return s.jsx(Xe.button,{...o,ref:t})});ap.displayName="StepsTrigger";function hE(e){return Gu({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 sp=S.createContext(void 0),xE=({children:e,step:t})=>s.jsx(sp.Provider,{value:{step:t},children:e}),ip=()=>{const e=S.useContext(sp);if(!e)throw new Error("useSteps must be used within a StepsProvider");return e},bE=({className:e,step:t,...r})=>{const n=R("qodo qodo-steps","flex flex-col gap-4",e);return s.jsx(xE,{step:t??0,children:s.jsx(np,{className:n,step:t,...r})})},yE=({className:e,...t})=>{const r=R("flex flex-row gap-4",e);return s.jsx(ep,{className:r,...t})},wE=({className:e,...t})=>{const r=R("flex flex-row items-center gap-4",e);return s.jsx(Qf,{className:r,...t})},CE=({className:e,...t})=>{const r=R("flex flex-row items-center gap-4 text-purple-muted-100 text-sm",e);return s.jsx(ap,{className:r,...t})},SE=({index:e,className:t,...r})=>{const{step:n}=ip(),o=e===n,a=e<n,i=R("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=R({"text-white":o,"text-purple-muted-300":!a&&e!==n});return s.jsx(Jf,{className:i,...r,children:a?s.jsx(hE,{className:"text-green-400"}):s.jsx("span",{className:l,children:e+1})})},EE=({index:e,className:t,...r})=>{const{step:n}=ip(),o=e<n,a=R("min-w-12 h-px",o?"bg-green-400":"bg-gray-400",t);return s.jsx(op,{className:a,...r})},kE=({className:e,...t})=>{const r=R(e);return s.jsx(Zf,{className:r,...t})},RE=({className:e,...t})=>{const r=R(e);return s.jsx(Xf,{className:r,...t})},NE=({className:e,...t})=>{const r=R("bg-primary text-white px-4 py-2 rounded-md",e);return s.jsx(rp,{className:r,...t})},jE=({className:e,...t})=>{const r=R("bg-primary text-white px-4 py-2 rounded-md",e);return s.jsx(tp,{className:r,...t})},PE={Root:bE,List:yE,Item:wE,Trigger:CE,Indicator:SE,Separator:EE,Content:kE,CompletedContent:RE,PrevTrigger:NE,NextTrigger:jE},Gr=({children:e,content:t,providerProps:r={},triggerProps:n={},contentProps:o={}})=>s.jsx(tf,{...r,children:s.jsxs(rf,{children:[s.jsx(nf,{...n,children:e}),t&&s.jsx(of,{...o,children:t})]})});/**
|
|
210
210
|
* react-table
|
|
211
211
|
*
|
|
212
212
|
* Copyright (c) TanStack
|
|
@@ -215,5 +215,5 @@ Defaulting to \`null\`.`}var Uy=Pd,Hy=_d;function Ky({className:e,value:t,...r})
|
|
|
215
215
|
* LICENSE.md file in the root directory of this source tree.
|
|
216
216
|
*
|
|
217
217
|
* @license MIT
|
|
218
|
-
*/function $i(e,t){return e?RE(e)?d.createElement(e,t):e:null}function RE(e){return kE(e)||typeof e=="function"||NE(e)}function kE(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function NE(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}const op=d.forwardRef(({className:e,wrapperClassName:t,...r},n)=>s.jsx("div",{"data-table-scroll-container":!0,className:k("max-h-[100%] min-h-0 overflow-auto rounded-lg border border-purple-muted-600",t),children:s.jsx("table",{ref:n,className:k("w-full caption-bottom text-sm",e),...r})}));op.displayName="Table";const ap=d.forwardRef(({className:e,...t},r)=>s.jsx("thead",{ref:r,className:k("sticky top-0 z-10 b-0 [&>tr]:hover:bg-transparent",e),...t}));ap.displayName="TableHeader";const sp=d.forwardRef(({className:e,...t},r)=>s.jsx("tbody",{ref:r,className:k("[&_tr:last-child]:border-0 [&_tr:first-child]:border-top-0",e),...t}));sp.displayName="TableBody";const jE=d.forwardRef(({className:e,...t},r)=>s.jsx("tfoot",{ref:r,className:k("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));jE.displayName="TableFooter";const Qe=d.forwardRef(({className:e,...t},r)=>s.jsx("tr",{ref:r,className:k("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}));Qe.displayName="TableRow";const ip=d.forwardRef(({className:e,...t},r)=>s.jsx("th",{ref:r,className:k("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));ip.displayName="TableHead";const lt=d.forwardRef(({className:e,...t},r)=>s.jsx("td",{ref:r,className:k("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));lt.displayName="TableCell";const PE=d.forwardRef(({className:e,...t},r)=>s.jsx("caption",{ref:r,className:k("mt-4 text-sm text-muted-foreground",e),...t}));PE.displayName="TableCaption";const TE=({title:e="No results"})=>s.jsx("div",{className:"grid place-items-center text-foreground h-full w-full p-14",children:e}),_E=({columnsCount:e,rowsCount:t=8})=>s.jsx(s.Fragment,{children:Array.from({length:t}).map((r,n)=>s.jsx(Qe,{children:Array.from({length:e}).map((o,a)=>s.jsx(lt,{children:s.jsx(Id,{className:"h-5.5 w-full"})},`loading-cell-${a}`))},`loading-row-${n}`))}),AE=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)"})})})]}),Li=({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(AE,{className:"mb-6"}),s.jsx("h4",{className:"mb-1 text-foreground",children:e}),s.jsx("p",{className:"text-purple-muted-300",children:t})]}),lp=({className:e,...t})=>s.jsx("nav",{role:"navigation","aria-label":"pagination",className:k("qodo qodo-pagination mx-auto flex w-full justify-center",e),...t});lp.displayName="Pagination";const cp=d.forwardRef(({className:e,...t},r)=>s.jsx("ul",{ref:r,className:k("flex flex-row items-center gap-1",e),...t}));cp.displayName="PaginationContent";const br=d.forwardRef(({className:e,...t},r)=>s.jsx("li",{ref:r,className:k("",e),...t}));br.displayName="PaginationItem";const dp=({className:e,isActive:t,size:r="icon",...n})=>s.jsx("a",{"aria-current":t?"page":void 0,className:k(il({variant:t?"outline":"ghost",size:r}),e),...n});dp.displayName="PaginationLink";const up=({className:e,...t})=>s.jsxs("span",{"aria-hidden":!0,className:k("flex h-9 w-9 items-center justify-center",e),...t,children:[s.jsx(ol,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"More pages"})]});up.displayName="PaginationEllipsis";const IE=({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",b="hover:bg-purple-muted-600 hover:text-purple-muted-300 dark:hover:bg-purple-muted-600 dark:hover:text-purple-muted-300",v="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:k(n===1||t?"pointer-events-none opacity-50":"cursor-pointer",x,m,t&&y),next:k(n===r||t?"pointer-events-none opacity-50":"cursor-pointer",x,m,t&&y),link:h=>k(x,t?"cursor-not-allowed":"cursor-pointer",m,!t&&b,h&&v,t&&y)}},[n,r,t]),l=S.useCallback(m=>{if(t)return;const b=m-1;e.setPagination(v=>({...v,pageIndex:b}))},[e,t]),c=S.useCallback(()=>{t||n<=1||l(n-1)},[n,l,t]),u=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},(v,x)=>x+1);const b=[];return n<=4?b.push(1,2,3,4,5,"ellipsis",m):n>=m-3?b.push(1,"ellipsis",m-4,m-3,m-2,m-1,m):b.push(1,"ellipsis",n-1,n,n+1,"ellipsis",m),b},[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,b)=>m==="ellipsis"?s.jsx(br,{children:s.jsx(up,{})},`ellipsis-${b}`):s.jsx(br,{className:"flex items-center justify-center",children:s.jsx(dp,{onClick:()=>l(m),isActive:m===n,className:i.link(m===n),children:m})},`${m}-${b}-pagination-item`),[l,n,i]);return r<2&&o<2?s.jsx(s.Fragment,{}):s.jsx(lp,{className:"dark:bg-transparent",children:s.jsxs(cp,{children:[s.jsx(br,{children:s.jsx(et,{variant:"ghost",size:"icon",className:i.previous,onClick:c,children:s.jsx($g,{})})}),p.map(g),s.jsx(br,{children:s.jsx(et,{variant:"ghost",size:"icon",className:i.next,onClick:u,children:s.jsx(nl,{onClick:u})})})]})})},ME=({columnsCount:e,message:t="End of results"})=>s.jsx(Qe,{className:"hover:bg-transparent border-b-0",children:s.jsx(lt,{colSpan:e,className:"text-center py-3 border-b-0",children:s.jsx("div",{className:"text-xs text-purple-muted-400/60",role:"status","aria-live":"polite",children:t})})});function OE({enabled:e,onLoadMore:t,hasMore:r,isLoading:n,threshold:o,findScrollableContainer:a}){const i=S.useRef(null),[l,c]=S.useState(!1),[u,f]=S.useState(!0),p=S.useRef(null),g=S.useRef(!1),m=r!==void 0?r:u,b=S.useCallback(async()=>{if(!(!t||g.current||!m)){g.current=!0,c(!0);try{const v=await Promise.resolve(t());v===!1?f(!1):v===!0&&f(!0)}catch(v){console.error("[useInfiniteScroll] Error loading more data:",v)}finally{g.current=!1,c(!1)}}},[t,m]);return S.useEffect(()=>{if(!e||!t)return;const v=i.current;if(!v)return;p.current&&(p.current.disconnect(),p.current=null);const x=requestAnimationFrame(()=>{const y=a();p.current=new IntersectionObserver(h=>{const[C]=h;C.isIntersecting&&!n&&!g.current&&b()},{root:y,rootMargin:`${o}px`,threshold:0}),p.current.observe(v)});return()=>{cancelAnimationFrame(x),p.current&&(p.current.disconnect(),p.current=null)}},[e,t,m,n,o,b,a]),{loadMoreRef:i,isLoadingMore:l,hasMore:m}}const DE=150,yr={PAGINATION:"pagination",INFINITE_SCROLL:"infinite-scroll"},$E=600,Fi=(e,t)=>{const r=t.columnDef.minSize,n=t.columnDef.maxSize,o={};return e!==DE&&(o.width=`${e}px`),r!==void 0&&(o.minWidth=`${r}px`),n!==void 0&&(o.maxWidth=`${n}px`),o},LE=({table:e,emptyStateComponent:t,noResultsComponent:r,errorComponent:n,isLoading:o=!1,isError:a=!1,onRowClick:i,emptyStateTitle:l="There's nothing to show",emptyStateDescription:c="No items to display",noResultsTitle:u="No results",wrapperClassName:f,loadingRowsCount:p=8,activeRowId:g,paginationMode:m=yr.PAGINATION,onLoadMore:b,hasMore:v,loadMoreThreshold:x=$E,endOfResultsMessage:y})=>{const h=e.getVisibleFlatColumns().length,C=m===yr.PAGINATION&&e.options.manualPagination&&e.options.onPaginationChange,E=e.getRowModel().rows.length===0,j=e.getCoreRowModel().rows.length===0&&!o,_=!o&&(a||j||E),P="hover:bg-transparent cursor-default",N=S.useRef(null),W=S.useCallback(()=>N.current?N.current.querySelector("[data-table-scroll-container]")||N.current:null,[]),{loadMoreRef:U,hasMore:re}=OE({enabled:m===yr.INFINITE_SCROLL,onLoadMore:b,hasMore:v,isLoading:o,threshold:x,findScrollableContainer:W}),te=()=>e.getHeaderGroups().map(V=>s.jsx(Qe,{children:V.headers.map(O=>s.jsx(ip,{className:"text-[#A1A1AA]",style:Fi(O.getSize(),O.column),children:O.isPlaceholder?void 0:$i(O.column.columnDef.header,O.getContext())},O.id))},V.id)),Q=()=>{if(o)return s.jsx(_E,{rowsCount:p,columnsCount:h});if(a)return s.jsx(Qe,{className:P,children:s.jsx(lt,{colSpan:h,children:(n==null?void 0:n())||s.jsx(Li,{title:l,description:c})})});if(j)return s.jsx(Qe,{className:P,children:s.jsx(lt,{colSpan:h,children:(t==null?void 0:t())||s.jsx(Li,{title:l,description:c})})});if(E)return s.jsx(Qe,{className:P,children:s.jsx(lt,{colSpan:h,children:(r==null?void 0:r())||s.jsx(TE,{title:u})})});const V=e.getRowModel().rows.map(O=>{var R;const I=(R=O.original)==null?void 0:R.id,D=O.getIsSelected()||!!g&&g===I;return s.jsx(Qe,{"data-state":D?"selected":void 0,onClick:()=>i==null?void 0:i(O.original),className:"group",children:O.getVisibleCells().map(M=>s.jsx(lt,{className:"text-[#FAFAFA] whitespace-nowrap",style:Fi(M.column.getSize(),M.column),children:$i(M.column.columnDef.cell,M.getContext())},M.id))},O.id)});return m===yr.INFINITE_SCROLL&&V.length>0?s.jsxs(s.Fragment,{children:[V,s.jsx(Qe,{className:"hover:bg-transparent border-0 h-0",children:s.jsx(lt,{colSpan:h,className:"h-0 p-0 border-0 overflow-hidden",children:s.jsx("div",{ref:U,className:"h-px w-full"})})}),!re&&s.jsx(ME,{columnsCount:h,message:y})]}):V};return s.jsxs("div",{className:k("qodo qodo-table","flex flex-col h-full w-full"),children:[s.jsx("div",{ref:N,className:"flex-1 min-h-0",children:s.jsxs(op,{wrapperClassName:f,className:k({"h-[100%]":_}),children:[s.jsx(ap,{children:te()}),s.jsx(sp,{children:Q()})]})}),C&&s.jsx("footer",{className:"pt-4 pb-2 border-t border-purple-muted-600/20 flex-shrink-0",children:s.jsx(IE,{table:e,isLoading:o})})]})},na=e=>{const{children:t,...r}=e,n=t&&t!==0?t:"-";return s.jsx("div",{...r,children:n})},FE=e=>{const{variant:t,children:r}=e,n=r||t;return s.jsx(Zt,{...e,children:n})},VE=e=>{const{children:t,...r}=e;if(typeof t!="number")return console.error("NumberCell must be a number"),s.jsx(na,{...r,children:"-"});const n=t>1e5?"compact":"standard",o=new Intl.NumberFormat("en-US",{notation:n}).format(t);return s.jsx(na,{...r,children:o})},BE=({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(Gr,{contentProps:{className:"max-w-[200px]"},content:r,children:s.jsx(Zg,{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(Ig,{className:k("ml-2 h-4 w-4",{invisible:!n})})]}):s.jsx("span",{children:i})};var oa=["Enter"," "],GE=["ArrowDown","PageUp","Home"],fp=["ArrowUp","PageDown","End"],WE=[...GE,...fp],zE={ltr:[...oa,"ArrowRight"],rtl:[...oa,"ArrowLeft"]},qE={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Wr="Menu",[kr,UE,HE]=kn(Wr),[Dt,pp]=ye(Wr,[HE,mt,xt]),zr=mt(),mp=xt(),[gp,wt]=Dt(Wr),[KE,qr]=Dt(Wr),vp=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:o,onOpenChange:a,modal:i=!0}=e,l=zr(t),[c,u]=d.useState(null),f=d.useRef(!1),p=De(a),g=At(o);return d.useEffect(()=>{const m=()=>{f.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>f.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),s.jsx(Ar,{...l,children:s.jsx(gp,{scope:t,open:r,onOpenChange:p,content:c,onContentChange:u,children:s.jsx(KE,{scope:t,onClose:d.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:g,modal:i,children:n})})})};vp.displayName=Wr;var YE="MenuAnchor",ns=d.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=zr(r);return s.jsx(Ir,{...o,...n,ref:t})});ns.displayName=YE;var os="MenuPortal",[XE,hp]=Dt(os,{forceMount:void 0}),xp=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:o}=e,a=wt(os,t);return s.jsx(XE,{scope:t,forceMount:r,children:s.jsx(Ce,{present:r||a.open,children:s.jsx(sr,{asChild:!0,container:o,children:n})})})};xp.displayName=os;var Ie="MenuContent",[ZE,as]=Dt(Ie),bp=d.forwardRef((e,t)=>{const r=hp(Ie,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,a=wt(Ie,e.__scopeMenu),i=qr(Ie,e.__scopeMenu);return s.jsx(kr.Provider,{scope:e.__scopeMenu,children:s.jsx(Ce,{present:n||a.open,children:s.jsx(kr.Slot,{scope:e.__scopeMenu,children:i.modal?s.jsx(JE,{...o,ref:t}):s.jsx(QE,{...o,ref:t})})})})}),JE=d.forwardRef((e,t)=>{const r=wt(Ie,e.__scopeMenu),n=d.useRef(null),o=ae(t,n);return d.useEffect(()=>{const a=n.current;if(a)return Dn(a)},[]),s.jsx(ss,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:F(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),QE=d.forwardRef((e,t)=>{const r=wt(Ie,e.__scopeMenu);return s.jsx(ss,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),eR=dt("MenuContent.ScrollLock"),ss=d.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:g,onDismiss:m,disableOutsideScroll:b,...v}=e,x=wt(Ie,r),y=qr(Ie,r),h=zr(r),C=mp(r),E=UE(r),[j,_]=d.useState(null),P=d.useRef(null),N=ae(t,P,x.onContentChange),W=d.useRef(0),U=d.useRef(""),re=d.useRef(0),te=d.useRef(null),Q=d.useRef("right"),V=d.useRef(0),O=b?Mr:d.Fragment,I=b?{as:eR,allowPinchZoom:!0}:void 0,D=M=>{var A,K;const B=U.current+M,J=E().filter(ee=>!ee.disabled),T=document.activeElement,G=(A=J.find(ee=>ee.ref.current===T))==null?void 0:A.textValue,Z=J.map(ee=>ee.textValue),z=fR(Z,B,G),L=(K=J.find(ee=>ee.textValue===z))==null?void 0:K.ref.current;(function ee(oe){U.current=oe,window.clearTimeout(W.current),oe!==""&&(W.current=window.setTimeout(()=>ee(""),1e3))})(B),L&&setTimeout(()=>L.focus())};d.useEffect(()=>()=>window.clearTimeout(W.current),[]),Nn();const R=d.useCallback(M=>{var J,T;return Q.current===((J=te.current)==null?void 0:J.side)&&mR(M,(T=te.current)==null?void 0:T.area)},[]);return s.jsx(ZE,{scope:r,searchRef:U,onItemEnter:d.useCallback(M=>{R(M)&&M.preventDefault()},[R]),onItemLeave:d.useCallback(M=>{var B;R(M)||((B=P.current)==null||B.focus(),_(null))},[R]),onTriggerLeave:d.useCallback(M=>{R(M)&&M.preventDefault()},[R]),pointerGraceTimerRef:re,onPointerGraceIntentChange:d.useCallback(M=>{te.current=M},[]),children:s.jsx(O,{...I,children:s.jsx(Tr,{asChild:!0,trapped:o,onMountAutoFocus:F(a,M=>{var B;M.preventDefault(),(B=P.current)==null||B.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:s.jsx(nr,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:g,onDismiss:m,children:s.jsx(qn,{asChild:!0,...C,dir:y.dir,orientation:"vertical",loop:n,currentTabStopId:j,onCurrentTabStopIdChange:_,onEntryFocus:F(c,M=>{y.isUsingKeyboardRef.current||M.preventDefault()}),preventScrollOnEntryFocus:!0,children:s.jsx(In,{role:"menu","aria-orientation":"vertical","data-state":Dp(x.open),"data-radix-menu-content":"",dir:y.dir,...h,...v,ref:N,style:{outline:"none",...v.style},onKeyDown:F(v.onKeyDown,M=>{const J=M.target.closest("[data-radix-menu-content]")===M.currentTarget,T=M.ctrlKey||M.altKey||M.metaKey,G=M.key.length===1;J&&(M.key==="Tab"&&M.preventDefault(),!T&&G&&D(M.key));const Z=P.current;if(M.target!==Z||!WE.includes(M.key))return;M.preventDefault();const L=E().filter(A=>!A.disabled).map(A=>A.ref.current);fp.includes(M.key)&&L.reverse(),dR(L)}),onBlur:F(e.onBlur,M=>{M.currentTarget.contains(M.target)||(window.clearTimeout(W.current),U.current="")}),onPointerMove:F(e.onPointerMove,Nr(M=>{const B=M.target,J=V.current!==M.clientX;if(M.currentTarget.contains(B)&&J){const T=M.clientX>V.current?"right":"left";Q.current=T,V.current=M.clientX}}))})})})})})})});bp.displayName=Ie;var tR="MenuGroup",is=d.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return s.jsx(q.div,{role:"group",...n,ref:t})});is.displayName=tR;var rR="MenuLabel",yp=d.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return s.jsx(q.div,{...n,ref:t})});yp.displayName=rR;var wn="MenuItem",Vi="menu.itemSelect",no=d.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...o}=e,a=d.useRef(null),i=qr(wn,e.__scopeMenu),l=as(wn,e.__scopeMenu),c=ae(t,a),u=d.useRef(!1),f=()=>{const p=a.current;if(!r&&p){const g=new CustomEvent(Vi,{bubbles:!0,cancelable:!0});p.addEventListener(Vi,m=>n==null?void 0:n(m),{once:!0}),cl(p,g),g.defaultPrevented?u.current=!1:i.onClose()}};return s.jsx(wp,{...o,ref:c,disabled:r,onClick:F(e.onClick,f),onPointerDown:p=>{var g;(g=e.onPointerDown)==null||g.call(e,p),u.current=!0},onPointerUp:F(e.onPointerUp,p=>{var g;u.current||(g=p.currentTarget)==null||g.click()}),onKeyDown:F(e.onKeyDown,p=>{const g=l.searchRef.current!=="";r||g&&p.key===" "||oa.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});no.displayName=wn;var wp=d.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:o,...a}=e,i=as(wn,r),l=mp(r),c=d.useRef(null),u=ae(t,c),[f,p]=d.useState(!1),[g,m]=d.useState("");return d.useEffect(()=>{const b=c.current;b&&m((b.textContent??"").trim())},[a.children]),s.jsx(kr.ItemSlot,{scope:r,disabled:n,textValue:o??g,children:s.jsx(Un,{asChild:!0,...l,focusable:!n,children:s.jsx(q.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...a,ref:u,onPointerMove:F(e.onPointerMove,Nr(b=>{n?i.onItemLeave(b):(i.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:F(e.onPointerLeave,Nr(b=>i.onItemLeave(b))),onFocus:F(e.onFocus,()=>p(!0)),onBlur:F(e.onBlur,()=>p(!1))})})})}),nR="MenuCheckboxItem",Cp=d.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...o}=e;return s.jsx(Np,{scope:e.__scopeMenu,checked:r,children:s.jsx(no,{role:"menuitemcheckbox","aria-checked":Cn(r)?"mixed":r,...o,ref:t,"data-state":ds(r),onSelect:F(o.onSelect,()=>n==null?void 0:n(Cn(r)?!0:!r),{checkForDefaultPrevented:!1})})})});Cp.displayName=nR;var Sp="MenuRadioGroup",[oR,aR]=Dt(Sp,{value:void 0,onValueChange:()=>{}}),Ep=d.forwardRef((e,t)=>{const{value:r,onValueChange:n,...o}=e,a=De(n);return s.jsx(oR,{scope:e.__scopeMenu,value:r,onValueChange:a,children:s.jsx(is,{...o,ref:t})})});Ep.displayName=Sp;var Rp="MenuRadioItem",kp=d.forwardRef((e,t)=>{const{value:r,...n}=e,o=aR(Rp,e.__scopeMenu),a=r===o.value;return s.jsx(Np,{scope:e.__scopeMenu,checked:a,children:s.jsx(no,{role:"menuitemradio","aria-checked":a,...n,ref:t,"data-state":ds(a),onSelect:F(n.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,r)},{checkForDefaultPrevented:!1})})})});kp.displayName=Rp;var ls="MenuItemIndicator",[Np,sR]=Dt(ls,{checked:!1}),jp=d.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...o}=e,a=sR(ls,r);return s.jsx(Ce,{present:n||Cn(a.checked)||a.checked===!0,children:s.jsx(q.span,{...o,ref:t,"data-state":ds(a.checked)})})});jp.displayName=ls;var iR="MenuSeparator",Pp=d.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return s.jsx(q.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});Pp.displayName=iR;var lR="MenuArrow",Tp=d.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=zr(r);return s.jsx(Mn,{...o,...n,ref:t})});Tp.displayName=lR;var cs="MenuSub",[cR,_p]=Dt(cs),Ap=e=>{const{__scopeMenu:t,children:r,open:n=!1,onOpenChange:o}=e,a=wt(cs,t),i=zr(t),[l,c]=d.useState(null),[u,f]=d.useState(null),p=De(o);return d.useEffect(()=>(a.open===!1&&p(!1),()=>p(!1)),[a.open,p]),s.jsx(Ar,{...i,children:s.jsx(gp,{scope:t,open:n,onOpenChange:p,content:u,onContentChange:f,children:s.jsx(cR,{scope:t,contentId:me(),triggerId:me(),trigger:l,onTriggerChange:c,children:r})})})};Ap.displayName=cs;var wr="MenuSubTrigger",Ip=d.forwardRef((e,t)=>{const r=wt(wr,e.__scopeMenu),n=qr(wr,e.__scopeMenu),o=_p(wr,e.__scopeMenu),a=as(wr,e.__scopeMenu),i=d.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=a,u={__scopeMenu:e.__scopeMenu},f=d.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return d.useEffect(()=>f,[f]),d.useEffect(()=>{const p=l.current;return()=>{window.clearTimeout(p),c(null)}},[l,c]),s.jsx(ns,{asChild:!0,...u,children:s.jsx(wp,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":o.contentId,"data-state":Dp(r.open),...e,ref:tt(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,Nr(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,Nr(p=>{var m,b;f();const g=(m=r.content)==null?void 0:m.getBoundingClientRect();if(g){const v=(b=r.content)==null?void 0:b.dataset.side,x=v==="right",y=x?-5:5,h=g[x?"left":"right"],C=g[x?"right":"left"];a.onPointerGraceIntentChange({area:[{x:p.clientX+y,y:p.clientY},{x:h,y:g.top},{x:C,y:g.top},{x:C,y:g.bottom},{x:h,y:g.bottom}],side:v}),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===" "||zE[n.dir].includes(p.key)&&(r.onOpenChange(!0),(m=r.content)==null||m.focus(),p.preventDefault())})})})});Ip.displayName=wr;var Mp="MenuSubContent",Op=d.forwardRef((e,t)=>{const r=hp(Ie,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,a=wt(Ie,e.__scopeMenu),i=qr(Ie,e.__scopeMenu),l=_p(Mp,e.__scopeMenu),c=d.useRef(null),u=ae(t,c);return s.jsx(kr.Provider,{scope:e.__scopeMenu,children:s.jsx(Ce,{present:n||a.open,children:s.jsx(kr.Slot,{scope:e.__scopeMenu,children:s.jsx(ss,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var p;i.isUsingKeyboardRef.current&&((p=c.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=qE[i.dir].includes(f.key);p&&g&&(a.onOpenChange(!1),(m=l.trigger)==null||m.focus(),f.preventDefault())})})})})})});Op.displayName=Mp;function Dp(e){return e?"open":"closed"}function Cn(e){return e==="indeterminate"}function ds(e){return Cn(e)?"indeterminate":e?"checked":"unchecked"}function dR(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function uR(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function fR(e,t,r){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let i=uR(e,Math.max(a,0));o.length===1&&(i=i.filter(u=>u!==r));const c=i.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return c!==r?c:void 0}function pR(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],c=t[i],u=l.x,f=l.y,p=c.x,g=c.y;f>n!=g>n&&r<(p-u)*(n-f)/(g-f)+u&&(o=!o)}return o}function mR(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return pR(r,t)}function Nr(e){return t=>t.pointerType==="mouse"?e(t):void 0}var gR=vp,vR=ns,hR=xp,xR=bp,bR=is,yR=yp,wR=no,CR=Cp,SR=Ep,ER=kp,RR=jp,kR=Pp,NR=Tp,jR=Ap,PR=Ip,TR=Op,oo="DropdownMenu",[_R,Uk]=ye(oo,[pp]),Se=pp(),[AR,$p]=_R(oo),Lp=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:o,defaultOpen:a,onOpenChange:i,modal:l=!0}=e,c=Se(t),u=d.useRef(null),[f,p]=be({prop:o,defaultProp:a??!1,onChange:i,caller:oo});return s.jsx(AR,{scope:t,triggerId:me(),triggerRef:u,contentId:me(),open:f,onOpenChange:p,onOpenToggle:d.useCallback(()=>p(g=>!g),[p]),modal:l,children:s.jsx(gR,{...c,open:f,onOpenChange:p,dir:n,modal:l,children:r})})};Lp.displayName=oo;var Fp="DropdownMenuTrigger",Vp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...o}=e,a=$p(Fp,r),i=Se(r);return s.jsx(vR,{asChild:!0,...i,children:s.jsx(q.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:tt(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())})})})});Vp.displayName=Fp;var IR="DropdownMenuPortal",Bp=e=>{const{__scopeDropdownMenu:t,...r}=e,n=Se(t);return s.jsx(hR,{...n,...r})};Bp.displayName=IR;var Gp="DropdownMenuContent",Wp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=$p(Gp,r),a=Se(r),i=d.useRef(!1);return s.jsx(xR,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...n,ref:t,onCloseAutoFocus:F(e.onCloseAutoFocus,l=>{var c;i.current||(c=o.triggerRef.current)==null||c.focus(),i.current=!1,l.preventDefault()}),onInteractOutside:F(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,f=c.button===2||u;(!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)"}})});Wp.displayName=Gp;var MR="DropdownMenuGroup",zp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Se(r);return s.jsx(bR,{...o,...n,ref:t})});zp.displayName=MR;var OR="DropdownMenuLabel",qp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Se(r);return s.jsx(yR,{...o,...n,ref:t})});qp.displayName=OR;var DR="DropdownMenuItem",Up=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Se(r);return s.jsx(wR,{...o,...n,ref:t})});Up.displayName=DR;var $R="DropdownMenuCheckboxItem",Hp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Se(r);return s.jsx(CR,{...o,...n,ref:t})});Hp.displayName=$R;var LR="DropdownMenuRadioGroup",Kp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Se(r);return s.jsx(SR,{...o,...n,ref:t})});Kp.displayName=LR;var FR="DropdownMenuRadioItem",Yp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Se(r);return s.jsx(ER,{...o,...n,ref:t})});Yp.displayName=FR;var VR="DropdownMenuItemIndicator",Xp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Se(r);return s.jsx(RR,{...o,...n,ref:t})});Xp.displayName=VR;var BR="DropdownMenuSeparator",Zp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Se(r);return s.jsx(kR,{...o,...n,ref:t})});Zp.displayName=BR;var GR="DropdownMenuArrow",WR=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Se(r);return s.jsx(NR,{...o,...n,ref:t})});WR.displayName=GR;var zR=e=>{const{__scopeDropdownMenu:t,children:r,open:n,onOpenChange:o,defaultOpen:a}=e,i=Se(t),[l,c]=be({prop:n,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return s.jsx(jR,{...i,open:l,onOpenChange:c,children:r})},qR="DropdownMenuSubTrigger",Jp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Se(r);return s.jsx(PR,{...o,...n,ref:t})});Jp.displayName=qR;var UR="DropdownMenuSubContent",Qp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Se(r);return s.jsx(TR,{...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)"}})});Qp.displayName=UR;var HR=Lp,KR=Vp,em=Bp,tm=Wp,YR=zp,rm=qp,nm=Up,om=Hp,XR=Kp,am=Yp,sm=Xp,im=Zp,ZR=zR,lm=Jp,cm=Qp;const JR=HR,QR=KR,ek=YR,tk=em,rk=ZR,nk=XR,dm=d.forwardRef(({className:e,inset:t,children:r,...n},o)=>s.jsxs(lm,{ref:o,className:k("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 hover:text-[var(--text-interactive-neutral-hover)] hover:bg-[var(--fill-interactive-neutral-hover)] active:bg-[var(--fill-interactive-emphasis-active)] [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n,children:[r,s.jsx(nl,{className:"ml-auto"})]}));dm.displayName=lm.displayName;const um=d.forwardRef(({className:e,...t},r)=>s.jsx(cm,{ref:r,className:k("z-50 min-w-[8rem] overflow-hidden cursor-pointer rounded-sm border 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","text-[var(--text-interactive-neutral-idle)] bg-[var(--fill-interactive-neutral-idle)] border-[var(--border-interactive-neutral-idle)] px-1 py-1",e),...t}));um.displayName=cm.displayName;const fm=d.forwardRef(({className:e,sideOffset:t=4,...r},n)=>s.jsx(em,{children:s.jsx(tm,{ref:n,sideOffset:t,className:k("qodo qodo-dropdown-menu-content z-50 min-w-[8rem] overflow-hidden rounded-sm border text-[var(--text-interactive-neutral-idle)] bg-[var(--fill-interactive-neutral-idle)] border-[var(--border-interactive-neutral-idle)] px-1 py-1 ","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 [&_svg]:text-inherit dark:[&_svg]:text-inherit",e),...r})}));fm.displayName=tm.displayName;const us=d.forwardRef(({className:e,inset:t,...r},n)=>s.jsx(nm,{ref:n,className:k("w-full qodo qodo-dropdown-menu-item relative flex select-none items-center gap-2 rounded-xs px-2 py-1.5 text-sm outline-none transition-colors focus:bg-[var(--fill-interactive-neutral-hover)] active:bg-[var(--fill-interactive-emphasis-active)] data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0 focus:text-[var(--text-interactive-neutral-hover)] active:text-[var(--text-interactive-emphasis-active)] cursor-pointer data-[disabled]:cursor-default",t&&"pl-8",e),...r}));us.displayName=nm.displayName;const pm=d.forwardRef(({className:e,children:t,checked:r,...n},o)=>s.jsxs(om,{ref:o,className:k("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:text-[var(--text-interactive-neutral-hover)] active:text-[var(--text-interactive-emphasis-active)] data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-[var(--fill-interactive-neutral-hover)] active:bg-[var(--fill-interactive-emphasis-active)] 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(sm,{children:s.jsx(rr,{className:"h-4 w-4"})})}),t]}));pm.displayName=om.displayName;const mm=d.forwardRef(({className:e,children:t,...r},n)=>s.jsxs(am,{ref:n,className:k("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-[var(--fill-interactive-neutral-hover)] active:bg-[var(--fill-interactive-emphasis-active)] data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:text-[var(--text-interactive-neutral-hover)] active:text-[var(--text-interactive-emphasis-active)] 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(sm,{children:s.jsx(rr,{className:"h-[18px] w-[18px]"})})}),t]}));mm.displayName=am.displayName;const fs=d.forwardRef(({className:e,inset:t,...r},n)=>s.jsx(rm,{ref:n,className:k("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));fs.displayName=rm.displayName;const Ct=d.forwardRef(({className:e,...t},r)=>s.jsx(im,{ref:r,className:k("-mx-1 my-1 h-px bg-purple-muted-500",e),...t}));Ct.displayName=im.displayName;const gm=({className:e,...t})=>s.jsx("span",{className:k("ml-auto text-xs tracking-widest [&>svg]:size-4 self-end",e),...t});gm.displayName="DropdownMenuEndAndornment";const ok=({radioItem:e})=>s.jsxs(mm,{className:"m-0 rounded-none gap-2 pl-3 pr-9 py-1.5",value:e.value,disabled:e.disabled,onSelect:t=>t.preventDefault(),children:[e.icon,e.label]}),ak=({radioGroupItem:e})=>s.jsxs(s.Fragment,{children:[s.jsx(nk,{value:e.value,onValueChange:e.onValueChange,children:e.radioItems.map((t,r)=>s.jsx(ok,{radioItem:t},`item-${r}`))}),e.separator&&s.jsx(Ct,{})]}),sk=({actionItem:e})=>s.jsxs("div",{className:"w-full [&>button]:w-full",children:[s.jsx(Gr,{content:e.tooltip,providerProps:{delayDuration:200},children:s.jsx(us,{className:"m-0 rounded-xs py-1.5 px-3 outline-none text-text-interactive-neutral-idle",disabled:e.disabled||e.loading,onClick:e.onClick,onSelect:e.onSelect,children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[e.loading&&s.jsx(al,{className:"h-4 w-4 motion-preset-spin motion-duration-1000"}),!e.loading&&e.icon,e.label,e.endAndornment&&s.jsx(gm,{children:e.endAndornment})]})})}),e.separator&&s.jsx(Ct,{})]}),ik=({checkboxItem:e})=>s.jsxs(pm,{className:"gap-2 m-0 rounded-none py-1.5 pl-3 pr-9 outline-none",checked:e.checked,onCheckedChange:e.onSelect,disabled:e.disabled,onSelect:t=>t.preventDefault(),children:[e.icon,e.label]}),lk=({checkboxGroupItem:e})=>s.jsxs(s.Fragment,{children:[s.jsx(ek,{children:e.checkboxes.map((t,r)=>s.jsx(ik,{checkboxItem:t},`item-${r}`))}),e.separator&&s.jsx(Ct,{})]}),ck=({subMenuItem:e})=>s.jsxs(s.Fragment,{children:[s.jsxs(rk,{children:[s.jsxs(dm,{disabled:e.disabled,className:"m-0 rounded-none py-1.5 pl-3 pr-1",children:[e.icon,e.label]}),s.jsx(tk,{children:s.jsx(um,{children:e.subItems.map((t,r)=>vm(t,r))})})]}),e.separator&&s.jsx(Ct,{})]}),dk=({menuItem:e})=>s.jsx(fs,{className:"text-purple-muted-300 px-3 font-normal",children:e.label}),uk=()=>s.jsx(Ct,{}),vm=(e,t)=>{switch(e.type){case"ActionMenuItem":return s.jsx(sk,{actionItem:e},`item-${t}`);case"CheckboxGroup":return s.jsx(lk,{checkboxGroupItem:e},`item-${t}`);case"RadioGroup":return s.jsx(ak,{radioGroupItem:e},`item-${t}`);case"SubMenuItem":return s.jsx(ck,{subMenuItem:e},`item-${t}`);case"MenuLabel":return s.jsx(dk,{menuItem:e},`item-${t}`);case"Separator":return s.jsx(uk,{},`item-${t}`);default:return null}},fk={s:"min-w-[140px]",m:"min-w-[249px]",l:"min-w-[257px]"},pk=({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})]}),mk=({header:e})=>e?s.jsxs(s.Fragment,{children:[s.jsx(fs,{className:"text-purple-100 font-normal px-3",children:e.type==="MenuTitleHeader"&&s.jsx(pk,{header:e})}),s.jsx(Ct,{className:"bg-purple-muted-500"})]}):null,gk=({footer:e})=>e?s.jsxs(s.Fragment,{children:[s.jsx(Ct,{className:"bg-purple-muted-500"}),s.jsxs(us,{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,hm=({menuItems:e,header:t,footer:r,triggerElement:n,size:o="s",asChild:a=!1,side:i="bottom",modal:l=!1,disabled:c=!1,className:u=""})=>{const f=tl(fk,{[o]:o,className:u},!1);return s.jsx("div",{className:k("qodo qodo-dropdown"),children:s.jsxs(JR,{modal:l,children:[s.jsx(QR,{asChild:a,className:"select-none outline-none flex items-center",disabled:c,children:n}),s.jsxs(fm,{side:i,align:"end",className:f,children:[s.jsx(mk,{header:t}),e.filter(p=>!p.isHidden).map((p,g)=>vm(p,g)),s.jsx(gk,{footer:r})]})]})})},vk=({triggerAriaLabel:e="Open actions menu",className:t,...r})=>s.jsx(et,{variant:"ghost",size:"icon","aria-label":e,className:k("flex items-center justify-center h-4 w-4",t),...r,children:s.jsx(ol,{className:"h-4 w-4"})}),hk=({menuItems:e=[],triggerElement:t=vk,triggerProps:r={},className:n,size:o="s",asChild:a=!1,side:i="bottom",modal:l=!1})=>s.jsx("div",{className:n,onClick:c=>c.stopPropagation(),children:s.jsx(hm,{triggerElement:s.jsx(t,{className:k("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})}),xk={"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"},Bi={SMALL:"small",LARGE:"large"},bk=({containerClassName:e,className:t,searchSize:r=Bi.SMALL,disabled:n=!1,disableFilterIcon:o=!0,...a})=>{const i=r===Bi.LARGE?"pl-12 py-3 pr-4 h-[45px]":"pl-9 py-1.5 pr-2 h-[33px]",l=k("absolute top-1/2 h-4 w-4 -translate-y-1/2",n?"text-purple-muted-600":"text-purple-muted-400"),c=k("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:k("qodo qodo-search-input","relative",e),children:[s.jsx(sl,{className:k(l,"left-3")}),s.jsx(Pr,{className:k(i,c,t),disabled:n,...a,...xk}),!o&&s.jsx(Qg,{className:k(l,"right-3")})]})},yk=/^(([^<>()[\]\\.,;:\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,}))$/,wk=e=>e.split(/[,\s]+/).map(t=>t.trim()).filter(Boolean),Ck=(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())},Sk=(e,t)=>e.map(r=>{const n=yk.test(r),o=n?Ck(r,t==null?void 0:t.domains):void 0;return{email:r,isValid:n&&o!==!1,isDomainValid:o}}),Ek=(e,t,r)=>{const n=Sk(e,r),o=[...t];for(const a of n)o.some(l=>l.email===a.email)||o.push(a);return o},Rk=({onChange:e=()=>{},organization:t})=>{const[r,n]=S.useState([]),o=S.useCallback(u=>{e(u)},[e]),a=S.useCallback(u=>{n(u),o(u)},[o]),i=S.useCallback(u=>{const f=wk(u);if(f.length===0)return;const p=Ek(f,r,t);a(p)},[r,a,t]),l=S.useCallback(()=>{a([])},[a]),c=S.useCallback(u=>{const f=r.filter(p=>p.email!==u);a(f)},[r,a]);return{emails:r,setEmails:a,addTokens:i,removeToken:c,clearAll:l,notify:o}},kk=e=>{const{draft:t,setDraft:r,addTokens:n,allSelected:o,setAllSelected:a,clearAll:i,emails:l,setEmails:c,notify:u}=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);c(g),r(p.email),u(g);return}if(f.key==="Enter"){f.preventDefault(),t.trim()&&(n(t),r(""));return}[",",";"," "].includes(f.key)&&(f.preventDefault(),t.trim()&&(n(t),r("")))}},Nk=({email:e,isValid:t,onRemove:r})=>{const n=o=>{o.stopPropagation(),r(e)};return s.jsxs(Zt,{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(Rn,{size:12})})]})},jk=({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),b=m.filter(x=>!x.email.includes("@")||x.isDomainValid===void 0),v=m.filter(x=>x.isDomainValid===!1);return{formatErrors:b,domainErrors:v,totalInvalidCount:m.length}},[r]),c=m=>{m.preventDefault(),m.stopPropagation()},u=m=>{c(m),t()},f=m=>{c(m)},p=m=>{m.stopPropagation()},g=(m,b)=>b.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,":"]}),b.map((v,x)=>s.jsx("p",{className:"break-all",children:v.email},`${m}-${x}-${v.email}`))]});return s.jsxs(s.Fragment,{children:[e&&s.jsx("button",{type:"button",onClick:u,className:"absolute right-3 top-1/2 -translate-y-1/2 hover:text-purple-muted-100",children:s.jsx(uv,{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(Gr,{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(pv,{className:"size-[18px]"})})})})]})},Pk=({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:c="Invalid email",invalidDomainError:u="Email domain is not allowed"})=>{const f=S.useRef(null),p=S.useRef(null),[g,m]=S.useState(""),[b,v]=S.useState(!1),{emails:x,setEmails:y,addTokens:h,removeToken:C,clearAll:E,notify:j}=Rk({onChange:e,organization:o}),_=kk({draft:g,setDraft:m,addTokens:h,allSelected:b,setAllSelected:v,clearAll:E,emails:x,setEmails:y,notify:j}),P=()=>{var J;const B=((J=o==null?void 0:o.domains)==null?void 0:J[0])||"example.com";return r({domain:B})},N=S.useCallback(B=>{m(B.target.value)},[]),W=S.useCallback(()=>{g.trim()&&(h(g),m("")),v(!1)},[g,h]),U=S.useCallback(B=>{const J=B.clipboardData.getData("text");J&&(B.preventDefault(),h(J),m(""))},[h]),re=S.useCallback(()=>{var B;(B=p.current)==null||B.focus()},[p]),te=S.useCallback(()=>{v(!1)},[]),Q=S.useCallback(B=>{var T;const J=B.relatedTarget;J&&((T=f.current)!=null&&T.contains(J))||g.trim()&&(h(g),m(""))},[g,h]),V=x.length>0,O=!V&&g.length===0,I=V||g.length>0,D=k("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",V?"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),R=k("inline-flex items-center gap-1 no-scrollbar",V?"w-max":"w-full",i),M=k("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(Gr,{triggerProps:{asChild:!0},content:t?n:void 0,children:s.jsxs("div",{ref:f,className:M,onClick:re,onFocus:te,onBlur:Q,children:[s.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-purple-muted-400",children:s.jsx(rv,{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:R,children:[x.map((B,J)=>s.jsx(Nk,{email:B.email,isValid:B.isValid,onRemove:C},`email-${J}-${B.email}`)),s.jsx("input",{ref:p,value:g,onChange:N,onKeyDown:_,onBlur:W,onPaste:U,className:D,placeholder:O?P():"",disabled:t})]})}),s.jsx(jk,{hasContent:I,onClearAll:E,emails:x,invalidEmailError:c,invalidDomainError:u})]})})},rn={DEFAULT:"default",PRIMARY:"primary",ACTIVE:"active"};function Tk({title:e,description:t,caption:r,additionalContent:n,titleClassName:o,descriptionClassName:a,variant:i=rn.DEFAULT,className:l,icon:c,iconClassName:u}){const f=k("px-6 py-4 gap-1 flex flex-row items-center gap-4","border-[var(--border-panel-neutral)] rounded-md fill-[var(--fill-panel-neutral)]",{"px-4":!!c},l),p=k("p-0 m-0 text-xs","text-[var(--color-text-bg-neutral-mild)] dark:text-[var(--color-text-bg-neutral-mild)] font-normal",o),g=k("w-8 h-8 flex items-center justify-center","bg-purple-muted-600 rounded-full p-2.5",u),m=k("text-xl font-medium p-0 m-0 leading-5",{"text-muted-foreground dark:text-white":i===rn.DEFAULT,"text-purple-300 dark:text-purple-300":i===rn.PRIMARY,"text-[var(--color-text-tag-positive-idle)] dark:text-[var(--color-text-tag-positive-idle)]":i===rn.ACTIVE},a);return s.jsxs(Ed,{className:f,children:[c&&s.jsx("div",{className:g,children:c}),s.jsxs("div",{className:"flex flex-col gap-1 w-full",children:[s.jsx(Rd,{className:"m-0 p-0 gap-0",children:s.jsx(kd,{className:p,children:e})}),s.jsxs(jd,{className:"m-0 p-0 flex flex-col gap-2",children:[t&&s.jsx(Nd,{className:m,children:t}),r&&s.jsx("span",{className:"text-xs text-foreground dark:text-foreground tracking-[0.12px]",children:r}),n]})]})]})}exports.Accordion=zw;exports.AccordionContent=Hw;exports.AccordionItem=qw;exports.AccordionTrigger=Uw;exports.ActionsCell=hk;exports.Badge=Zt;exports.BadgeCell=FE;exports.BaseCell=na;exports.Button=et;exports.Card=Ed;exports.CardAction=Ly;exports.CardContent=jd;exports.CardDescription=Nd;exports.CardFooter=Fy;exports.CardHeader=Rd;exports.CardTitle=kd;exports.Checkbox=Qa;exports.CheckboxGroup=Xa;exports.ClassHelper=tl;exports.Combobox=Ra;exports.Dialog=my;exports.DialogClose=vy;exports.DialogContent=hy;exports.DialogDescription=wy;exports.DialogFooter=by;exports.DialogHeader=xy;exports.DialogOverlay=id;exports.DialogPortal=sd;exports.DialogTitle=yy;exports.DialogTrigger=gy;exports.Dropdown=hm;exports.EmailChipsInput=Pk;exports.Form=je;exports.FormProvider=Mu;exports.Input=Pr;exports.InsightCard=Tk;exports.NumberCell=VE;exports.PAGINATION_MODE=yr;exports.Progress=Ky;exports.RadioGroup=Wa;exports.RadioGroupItem=qa;exports.SearchInput=bk;exports.Select=Tf;exports.SelectContent=Nc;exports.SelectGroup=Nb;exports.SelectItem=Pc;exports.SelectLabel=jc;exports.SelectScrollDownButton=va;exports.SelectScrollUpButton=ga;exports.SelectSeparator=Tc;exports.SelectTrigger=kc;exports.SelectV1=kb;exports.SelectValue=jb;exports.Skeleton=Id;exports.SortableHeaderCell=BE;exports.Steps=EE;exports.Switch=nw;exports.Table=LE;exports.Tabs=e0;exports.TabsContent=n0;exports.TabsList=t0;exports.TabsTrigger=r0;exports.TagsInput=vf;exports.Toggle=aw;exports.ToggleGroup=Cw;exports.ToggleGroupItem=Sw;exports.Tooltip=Gr;exports.borderRadius=Gm;exports.cn=k;exports.colors=Vm;exports.spacing=Bm;exports.typography=Wm;exports.useFormContext=Ou;
|
|
218
|
+
*/function Li(e,t){return e?TE(e)?d.createElement(e,t):e:null}function TE(e){return _E(e)||typeof e=="function"||AE(e)}function _E(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function AE(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}const lp=d.forwardRef(({className:e,wrapperClassName:t,...r},n)=>s.jsx("div",{"data-table-scroll-container":!0,className:R("max-h-[100%] min-h-0 overflow-auto rounded-lg border border-purple-muted-600",t),children:s.jsx("table",{ref:n,className:R("w-full caption-bottom text-sm",e),...r})}));lp.displayName="Table";const cp=d.forwardRef(({className:e,...t},r)=>s.jsx("thead",{ref:r,className:R("sticky top-0 z-10 b-0 [&>tr]:hover:bg-transparent",e),...t}));cp.displayName="TableHeader";const dp=d.forwardRef(({className:e,...t},r)=>s.jsx("tbody",{ref:r,className:R("[&_tr:last-child]:border-0 [&_tr:first-child]:border-top-0",e),...t}));dp.displayName="TableBody";const IE=d.forwardRef(({className:e,...t},r)=>s.jsx("tfoot",{ref:r,className:R("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));IE.displayName="TableFooter";const Qe=d.forwardRef(({className:e,...t},r)=>s.jsx("tr",{ref:r,className:R("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}));Qe.displayName="TableRow";const up=d.forwardRef(({className:e,...t},r)=>s.jsx("th",{ref:r,className:R("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));up.displayName="TableHead";const lt=d.forwardRef(({className:e,...t},r)=>s.jsx("td",{ref:r,className:R("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));lt.displayName="TableCell";const ME=d.forwardRef(({className:e,...t},r)=>s.jsx("caption",{ref:r,className:R("mt-4 text-sm text-muted-foreground",e),...t}));ME.displayName="TableCaption";const OE=({title:e="No results"})=>s.jsx("div",{className:"grid place-items-center text-foreground h-full w-full p-14",children:e}),DE=({columnsCount:e,rowsCount:t=8})=>s.jsx(s.Fragment,{children:Array.from({length:t}).map((r,n)=>s.jsx(Qe,{children:Array.from({length:e}).map((o,a)=>s.jsx(lt,{children:s.jsx(Od,{className:"h-5.5 w-full"})},`loading-cell-${a}`))},`loading-row-${n}`))}),$E=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)"})})})]}),Fi=({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($E,{className:"mb-6"}),s.jsx("h4",{className:"mb-1 text-foreground",children:e}),s.jsx("p",{className:"text-purple-muted-300",children:t})]}),fp=({className:e,...t})=>s.jsx("nav",{role:"navigation","aria-label":"pagination",className:R("qodo qodo-pagination mx-auto flex w-full justify-center",e),...t});fp.displayName="Pagination";const pp=d.forwardRef(({className:e,...t},r)=>s.jsx("ul",{ref:r,className:R("flex flex-row items-center gap-1",e),...t}));pp.displayName="PaginationContent";const br=d.forwardRef(({className:e,...t},r)=>s.jsx("li",{ref:r,className:R("",e),...t}));br.displayName="PaginationItem";const mp=({className:e,isActive:t,size:r="icon",...n})=>s.jsx("a",{"aria-current":t?"page":void 0,className:R(cl({variant:t?"outline":"ghost",size:r}),e),...n});mp.displayName="PaginationLink";const gp=({className:e,...t})=>s.jsxs("span",{"aria-hidden":!0,className:R("flex h-9 w-9 items-center justify-center",e),...t,children:[s.jsx(sl,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"More pages"})]});gp.displayName="PaginationEllipsis";const LE=({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",b="hover:bg-purple-muted-600 hover:text-purple-muted-300 dark:hover:bg-purple-muted-600 dark:hover:text-purple-muted-300",v="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:R(n===1||t?"pointer-events-none opacity-50":"cursor-pointer",x,m,t&&y),next:R(n===r||t?"pointer-events-none opacity-50":"cursor-pointer",x,m,t&&y),link:h=>R(x,t?"cursor-not-allowed":"cursor-pointer",m,!t&&b,h&&v,t&&y)}},[n,r,t]),l=S.useCallback(m=>{if(t)return;const b=m-1;e.setPagination(v=>({...v,pageIndex:b}))},[e,t]),c=S.useCallback(()=>{t||n<=1||l(n-1)},[n,l,t]),u=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},(v,x)=>x+1);const b=[];return n<=4?b.push(1,2,3,4,5,"ellipsis",m):n>=m-3?b.push(1,"ellipsis",m-4,m-3,m-2,m-1,m):b.push(1,"ellipsis",n-1,n,n+1,"ellipsis",m),b},[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,b)=>m==="ellipsis"?s.jsx(br,{children:s.jsx(gp,{})},`ellipsis-${b}`):s.jsx(br,{className:"flex items-center justify-center",children:s.jsx(mp,{onClick:()=>l(m),isActive:m===n,className:i.link(m===n),children:m})},`${m}-${b}-pagination-item`),[l,n,i]);return r<2&&o<2?s.jsx(s.Fragment,{}):s.jsx(fp,{className:"dark:bg-transparent",children:s.jsxs(pp,{children:[s.jsx(br,{children:s.jsx(et,{variant:"ghost",size:"icon",className:i.previous,onClick:c,children:s.jsx(Bg,{})})}),p.map(g),s.jsx(br,{children:s.jsx(et,{variant:"ghost",size:"icon",className:i.next,onClick:u,children:s.jsx(al,{onClick:u})})})]})})},FE=({columnsCount:e,message:t="End of results"})=>s.jsx(Qe,{className:"hover:bg-transparent border-b-0",children:s.jsx(lt,{colSpan:e,className:"text-center py-3 border-b-0",children:s.jsx("div",{className:"text-xs text-purple-muted-400/60",role:"status","aria-live":"polite",children:t})})});function VE({enabled:e,onLoadMore:t,hasMore:r,isLoading:n,threshold:o,findScrollableContainer:a}){const i=S.useRef(null),[l,c]=S.useState(!1),[u,f]=S.useState(!0),p=S.useRef(null),g=S.useRef(!1),m=r!==void 0?r:u,b=S.useCallback(async()=>{if(!(!t||g.current||!m)){g.current=!0,c(!0);try{const v=await Promise.resolve(t());v===!1?f(!1):v===!0&&f(!0)}catch(v){console.error("[useInfiniteScroll] Error loading more data:",v)}finally{g.current=!1,c(!1)}}},[t,m]);return S.useEffect(()=>{if(!e||!t)return;const v=i.current;if(!v)return;p.current&&(p.current.disconnect(),p.current=null);const x=requestAnimationFrame(()=>{const y=a();p.current=new IntersectionObserver(h=>{const[C]=h;C.isIntersecting&&!n&&!g.current&&b()},{root:y,rootMargin:`${o}px`,threshold:0}),p.current.observe(v)});return()=>{cancelAnimationFrame(x),p.current&&(p.current.disconnect(),p.current=null)}},[e,t,m,n,o,b,a]),{loadMoreRef:i,isLoadingMore:l,hasMore:m}}const BE=150,yr={PAGINATION:"pagination",INFINITE_SCROLL:"infinite-scroll"},GE=600,Vi=(e,t)=>{const r=t.columnDef.minSize,n=t.columnDef.maxSize,o={};return e!==BE&&(o.width=`${e}px`),r!==void 0&&(o.minWidth=`${r}px`),n!==void 0&&(o.maxWidth=`${n}px`),o},WE=({table:e,emptyStateComponent:t,noResultsComponent:r,errorComponent:n,isLoading:o=!1,isError:a=!1,onRowClick:i,emptyStateTitle:l="There's nothing to show",emptyStateDescription:c="No items to display",noResultsTitle:u="No results",wrapperClassName:f,loadingRowsCount:p=8,activeRowId:g,paginationMode:m=yr.PAGINATION,onLoadMore:b,hasMore:v,loadMoreThreshold:x=GE,endOfResultsMessage:y})=>{const h=e.getVisibleFlatColumns().length,C=m===yr.PAGINATION&&e.options.manualPagination&&e.options.onPaginationChange,E=e.getRowModel().rows.length===0,j=e.getCoreRowModel().rows.length===0&&!o,_=!o&&(a||j||E),P="hover:bg-transparent cursor-default",N=S.useRef(null),W=S.useCallback(()=>N.current?N.current.querySelector("[data-table-scroll-container]")||N.current:null,[]),{loadMoreRef:U,hasMore:re}=VE({enabled:m===yr.INFINITE_SCROLL,onLoadMore:b,hasMore:v,isLoading:o,threshold:x,findScrollableContainer:W}),te=()=>e.getHeaderGroups().map(V=>s.jsx(Qe,{children:V.headers.map(O=>s.jsx(up,{className:"text-[#A1A1AA]",style:Vi(O.getSize(),O.column),children:O.isPlaceholder?void 0:Li(O.column.columnDef.header,O.getContext())},O.id))},V.id)),Q=()=>{if(o)return s.jsx(DE,{rowsCount:p,columnsCount:h});if(a)return s.jsx(Qe,{className:P,children:s.jsx(lt,{colSpan:h,children:(n==null?void 0:n())||s.jsx(Fi,{title:l,description:c})})});if(j)return s.jsx(Qe,{className:P,children:s.jsx(lt,{colSpan:h,children:(t==null?void 0:t())||s.jsx(Fi,{title:l,description:c})})});if(E)return s.jsx(Qe,{className:P,children:s.jsx(lt,{colSpan:h,children:(r==null?void 0:r())||s.jsx(OE,{title:u})})});const V=e.getRowModel().rows.map(O=>{var k;const I=(k=O.original)==null?void 0:k.id,D=O.getIsSelected()||!!g&&g===I;return s.jsx(Qe,{"data-state":D?"selected":void 0,onClick:()=>i==null?void 0:i(O.original),className:"group",children:O.getVisibleCells().map(M=>s.jsx(lt,{className:"text-[#FAFAFA] whitespace-nowrap",style:Vi(M.column.getSize(),M.column),children:Li(M.column.columnDef.cell,M.getContext())},M.id))},O.id)});return m===yr.INFINITE_SCROLL&&V.length>0?s.jsxs(s.Fragment,{children:[V,s.jsx(Qe,{className:"hover:bg-transparent border-0 h-0",children:s.jsx(lt,{colSpan:h,className:"h-0 p-0 border-0 overflow-hidden",children:s.jsx("div",{ref:U,className:"h-px w-full"})})}),!re&&s.jsx(FE,{columnsCount:h,message:y})]}):V};return s.jsxs("div",{className:R("qodo qodo-table","flex flex-col h-full w-full"),children:[s.jsx("div",{ref:N,className:"flex-1 min-h-0",children:s.jsxs(lp,{wrapperClassName:f,className:R({"h-[100%]":_}),children:[s.jsx(cp,{children:te()}),s.jsx(dp,{children:Q()})]})}),C&&s.jsx("footer",{className:"pt-4 pb-2 border-t border-purple-muted-600/20 flex-shrink-0",children:s.jsx(LE,{table:e,isLoading:o})})]})},na=e=>{const{children:t,...r}=e,n=t&&t!==0?t:"-";return s.jsx("div",{...r,children:n})},zE=e=>{const{variant:t,children:r}=e,n=r||t;return s.jsx(Jt,{...e,children:n})},qE=e=>{const{children:t,...r}=e;if(typeof t!="number")return console.error("NumberCell must be a number"),s.jsx(na,{...r,children:"-"});const n=t>1e5?"compact":"standard",o=new Intl.NumberFormat("en-US",{notation:n}).format(t);return s.jsx(na,{...r,children:o})},UE=({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(Gr,{contentProps:{className:"max-w-[200px]"},content:r,children:s.jsx(tv,{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($g,{className:R("ml-2 h-4 w-4",{invisible:!n})})]}):s.jsx("span",{children:i})};var oa=["Enter"," "],HE=["ArrowDown","PageUp","Home"],vp=["ArrowUp","PageDown","End"],KE=[...HE,...vp],YE={ltr:[...oa,"ArrowRight"],rtl:[...oa,"ArrowLeft"]},XE={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Wr="Menu",[Rr,ZE,JE]=Rn(Wr),[$t,hp]=ye(Wr,[JE,mt,xt]),zr=mt(),xp=xt(),[bp,wt]=$t(Wr),[QE,qr]=$t(Wr),yp=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:o,onOpenChange:a,modal:i=!0}=e,l=zr(t),[c,u]=d.useState(null),f=d.useRef(!1),p=De(a),g=It(o);return d.useEffect(()=>{const m=()=>{f.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>f.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),s.jsx(Ar,{...l,children:s.jsx(bp,{scope:t,open:r,onOpenChange:p,content:c,onContentChange:u,children:s.jsx(QE,{scope:t,onClose:d.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:g,modal:i,children:n})})})};yp.displayName=Wr;var ek="MenuAnchor",os=d.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=zr(r);return s.jsx(Ir,{...o,...n,ref:t})});os.displayName=ek;var as="MenuPortal",[tk,wp]=$t(as,{forceMount:void 0}),Cp=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:o}=e,a=wt(as,t);return s.jsx(tk,{scope:t,forceMount:r,children:s.jsx(Ce,{present:r||a.open,children:s.jsx(sr,{asChild:!0,container:o,children:n})})})};Cp.displayName=as;var Ie="MenuContent",[rk,ss]=$t(Ie),Sp=d.forwardRef((e,t)=>{const r=wp(Ie,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,a=wt(Ie,e.__scopeMenu),i=qr(Ie,e.__scopeMenu);return s.jsx(Rr.Provider,{scope:e.__scopeMenu,children:s.jsx(Ce,{present:n||a.open,children:s.jsx(Rr.Slot,{scope:e.__scopeMenu,children:i.modal?s.jsx(nk,{...o,ref:t}):s.jsx(ok,{...o,ref:t})})})})}),nk=d.forwardRef((e,t)=>{const r=wt(Ie,e.__scopeMenu),n=d.useRef(null),o=ae(t,n);return d.useEffect(()=>{const a=n.current;if(a)return Dn(a)},[]),s.jsx(is,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:F(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),ok=d.forwardRef((e,t)=>{const r=wt(Ie,e.__scopeMenu);return s.jsx(is,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),ak=dt("MenuContent.ScrollLock"),is=d.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:g,onDismiss:m,disableOutsideScroll:b,...v}=e,x=wt(Ie,r),y=qr(Ie,r),h=zr(r),C=xp(r),E=ZE(r),[j,_]=d.useState(null),P=d.useRef(null),N=ae(t,P,x.onContentChange),W=d.useRef(0),U=d.useRef(""),re=d.useRef(0),te=d.useRef(null),Q=d.useRef("right"),V=d.useRef(0),O=b?Mr:d.Fragment,I=b?{as:ak,allowPinchZoom:!0}:void 0,D=M=>{var A,K;const B=U.current+M,J=E().filter(ee=>!ee.disabled),T=document.activeElement,G=(A=J.find(ee=>ee.ref.current===T))==null?void 0:A.textValue,Z=J.map(ee=>ee.textValue),z=hk(Z,B,G),L=(K=J.find(ee=>ee.textValue===z))==null?void 0:K.ref.current;(function ee(oe){U.current=oe,window.clearTimeout(W.current),oe!==""&&(W.current=window.setTimeout(()=>ee(""),1e3))})(B),L&&setTimeout(()=>L.focus())};d.useEffect(()=>()=>window.clearTimeout(W.current),[]),Nn();const k=d.useCallback(M=>{var J,T;return Q.current===((J=te.current)==null?void 0:J.side)&&bk(M,(T=te.current)==null?void 0:T.area)},[]);return s.jsx(rk,{scope:r,searchRef:U,onItemEnter:d.useCallback(M=>{k(M)&&M.preventDefault()},[k]),onItemLeave:d.useCallback(M=>{var B;k(M)||((B=P.current)==null||B.focus(),_(null))},[k]),onTriggerLeave:d.useCallback(M=>{k(M)&&M.preventDefault()},[k]),pointerGraceTimerRef:re,onPointerGraceIntentChange:d.useCallback(M=>{te.current=M},[]),children:s.jsx(O,{...I,children:s.jsx(Tr,{asChild:!0,trapped:o,onMountAutoFocus:F(a,M=>{var B;M.preventDefault(),(B=P.current)==null||B.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:s.jsx(nr,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:g,onDismiss:m,children:s.jsx(qn,{asChild:!0,...C,dir:y.dir,orientation:"vertical",loop:n,currentTabStopId:j,onCurrentTabStopIdChange:_,onEntryFocus:F(c,M=>{y.isUsingKeyboardRef.current||M.preventDefault()}),preventScrollOnEntryFocus:!0,children:s.jsx(In,{role:"menu","aria-orientation":"vertical","data-state":Vp(x.open),"data-radix-menu-content":"",dir:y.dir,...h,...v,ref:N,style:{outline:"none",...v.style},onKeyDown:F(v.onKeyDown,M=>{const J=M.target.closest("[data-radix-menu-content]")===M.currentTarget,T=M.ctrlKey||M.altKey||M.metaKey,G=M.key.length===1;J&&(M.key==="Tab"&&M.preventDefault(),!T&&G&&D(M.key));const Z=P.current;if(M.target!==Z||!KE.includes(M.key))return;M.preventDefault();const L=E().filter(A=>!A.disabled).map(A=>A.ref.current);vp.includes(M.key)&&L.reverse(),gk(L)}),onBlur:F(e.onBlur,M=>{M.currentTarget.contains(M.target)||(window.clearTimeout(W.current),U.current="")}),onPointerMove:F(e.onPointerMove,Nr(M=>{const B=M.target,J=V.current!==M.clientX;if(M.currentTarget.contains(B)&&J){const T=M.clientX>V.current?"right":"left";Q.current=T,V.current=M.clientX}}))})})})})})})});Sp.displayName=Ie;var sk="MenuGroup",ls=d.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return s.jsx(q.div,{role:"group",...n,ref:t})});ls.displayName=sk;var ik="MenuLabel",Ep=d.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return s.jsx(q.div,{...n,ref:t})});Ep.displayName=ik;var wn="MenuItem",Bi="menu.itemSelect",no=d.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...o}=e,a=d.useRef(null),i=qr(wn,e.__scopeMenu),l=ss(wn,e.__scopeMenu),c=ae(t,a),u=d.useRef(!1),f=()=>{const p=a.current;if(!r&&p){const g=new CustomEvent(Bi,{bubbles:!0,cancelable:!0});p.addEventListener(Bi,m=>n==null?void 0:n(m),{once:!0}),ul(p,g),g.defaultPrevented?u.current=!1:i.onClose()}};return s.jsx(kp,{...o,ref:c,disabled:r,onClick:F(e.onClick,f),onPointerDown:p=>{var g;(g=e.onPointerDown)==null||g.call(e,p),u.current=!0},onPointerUp:F(e.onPointerUp,p=>{var g;u.current||(g=p.currentTarget)==null||g.click()}),onKeyDown:F(e.onKeyDown,p=>{const g=l.searchRef.current!=="";r||g&&p.key===" "||oa.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});no.displayName=wn;var kp=d.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:o,...a}=e,i=ss(wn,r),l=xp(r),c=d.useRef(null),u=ae(t,c),[f,p]=d.useState(!1),[g,m]=d.useState("");return d.useEffect(()=>{const b=c.current;b&&m((b.textContent??"").trim())},[a.children]),s.jsx(Rr.ItemSlot,{scope:r,disabled:n,textValue:o??g,children:s.jsx(Un,{asChild:!0,...l,focusable:!n,children:s.jsx(q.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...a,ref:u,onPointerMove:F(e.onPointerMove,Nr(b=>{n?i.onItemLeave(b):(i.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:F(e.onPointerLeave,Nr(b=>i.onItemLeave(b))),onFocus:F(e.onFocus,()=>p(!0)),onBlur:F(e.onBlur,()=>p(!1))})})})}),lk="MenuCheckboxItem",Rp=d.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...o}=e;return s.jsx(_p,{scope:e.__scopeMenu,checked:r,children:s.jsx(no,{role:"menuitemcheckbox","aria-checked":Cn(r)?"mixed":r,...o,ref:t,"data-state":us(r),onSelect:F(o.onSelect,()=>n==null?void 0:n(Cn(r)?!0:!r),{checkForDefaultPrevented:!1})})})});Rp.displayName=lk;var Np="MenuRadioGroup",[ck,dk]=$t(Np,{value:void 0,onValueChange:()=>{}}),jp=d.forwardRef((e,t)=>{const{value:r,onValueChange:n,...o}=e,a=De(n);return s.jsx(ck,{scope:e.__scopeMenu,value:r,onValueChange:a,children:s.jsx(ls,{...o,ref:t})})});jp.displayName=Np;var Pp="MenuRadioItem",Tp=d.forwardRef((e,t)=>{const{value:r,...n}=e,o=dk(Pp,e.__scopeMenu),a=r===o.value;return s.jsx(_p,{scope:e.__scopeMenu,checked:a,children:s.jsx(no,{role:"menuitemradio","aria-checked":a,...n,ref:t,"data-state":us(a),onSelect:F(n.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,r)},{checkForDefaultPrevented:!1})})})});Tp.displayName=Pp;var cs="MenuItemIndicator",[_p,uk]=$t(cs,{checked:!1}),Ap=d.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...o}=e,a=uk(cs,r);return s.jsx(Ce,{present:n||Cn(a.checked)||a.checked===!0,children:s.jsx(q.span,{...o,ref:t,"data-state":us(a.checked)})})});Ap.displayName=cs;var fk="MenuSeparator",Ip=d.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return s.jsx(q.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});Ip.displayName=fk;var pk="MenuArrow",Mp=d.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=zr(r);return s.jsx(Mn,{...o,...n,ref:t})});Mp.displayName=pk;var ds="MenuSub",[mk,Op]=$t(ds),Dp=e=>{const{__scopeMenu:t,children:r,open:n=!1,onOpenChange:o}=e,a=wt(ds,t),i=zr(t),[l,c]=d.useState(null),[u,f]=d.useState(null),p=De(o);return d.useEffect(()=>(a.open===!1&&p(!1),()=>p(!1)),[a.open,p]),s.jsx(Ar,{...i,children:s.jsx(bp,{scope:t,open:n,onOpenChange:p,content:u,onContentChange:f,children:s.jsx(mk,{scope:t,contentId:me(),triggerId:me(),trigger:l,onTriggerChange:c,children:r})})})};Dp.displayName=ds;var wr="MenuSubTrigger",$p=d.forwardRef((e,t)=>{const r=wt(wr,e.__scopeMenu),n=qr(wr,e.__scopeMenu),o=Op(wr,e.__scopeMenu),a=ss(wr,e.__scopeMenu),i=d.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=a,u={__scopeMenu:e.__scopeMenu},f=d.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return d.useEffect(()=>f,[f]),d.useEffect(()=>{const p=l.current;return()=>{window.clearTimeout(p),c(null)}},[l,c]),s.jsx(os,{asChild:!0,...u,children:s.jsx(kp,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":o.contentId,"data-state":Vp(r.open),...e,ref:tt(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,Nr(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,Nr(p=>{var m,b;f();const g=(m=r.content)==null?void 0:m.getBoundingClientRect();if(g){const v=(b=r.content)==null?void 0:b.dataset.side,x=v==="right",y=x?-5:5,h=g[x?"left":"right"],C=g[x?"right":"left"];a.onPointerGraceIntentChange({area:[{x:p.clientX+y,y:p.clientY},{x:h,y:g.top},{x:C,y:g.top},{x:C,y:g.bottom},{x:h,y:g.bottom}],side:v}),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===" "||YE[n.dir].includes(p.key)&&(r.onOpenChange(!0),(m=r.content)==null||m.focus(),p.preventDefault())})})})});$p.displayName=wr;var Lp="MenuSubContent",Fp=d.forwardRef((e,t)=>{const r=wp(Ie,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,a=wt(Ie,e.__scopeMenu),i=qr(Ie,e.__scopeMenu),l=Op(Lp,e.__scopeMenu),c=d.useRef(null),u=ae(t,c);return s.jsx(Rr.Provider,{scope:e.__scopeMenu,children:s.jsx(Ce,{present:n||a.open,children:s.jsx(Rr.Slot,{scope:e.__scopeMenu,children:s.jsx(is,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var p;i.isUsingKeyboardRef.current&&((p=c.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=XE[i.dir].includes(f.key);p&&g&&(a.onOpenChange(!1),(m=l.trigger)==null||m.focus(),f.preventDefault())})})})})})});Fp.displayName=Lp;function Vp(e){return e?"open":"closed"}function Cn(e){return e==="indeterminate"}function us(e){return Cn(e)?"indeterminate":e?"checked":"unchecked"}function gk(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function vk(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function hk(e,t,r){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let i=vk(e,Math.max(a,0));o.length===1&&(i=i.filter(u=>u!==r));const c=i.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return c!==r?c:void 0}function xk(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],c=t[i],u=l.x,f=l.y,p=c.x,g=c.y;f>n!=g>n&&r<(p-u)*(n-f)/(g-f)+u&&(o=!o)}return o}function bk(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return xk(r,t)}function Nr(e){return t=>t.pointerType==="mouse"?e(t):void 0}var yk=yp,wk=os,Ck=Cp,Sk=Sp,Ek=ls,kk=Ep,Rk=no,Nk=Rp,jk=jp,Pk=Tp,Tk=Ap,_k=Ip,Ak=Mp,Ik=Dp,Mk=$p,Ok=Fp,oo="DropdownMenu",[Dk,ZR]=ye(oo,[hp]),Se=hp(),[$k,Bp]=Dk(oo),Gp=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:o,defaultOpen:a,onOpenChange:i,modal:l=!0}=e,c=Se(t),u=d.useRef(null),[f,p]=be({prop:o,defaultProp:a??!1,onChange:i,caller:oo});return s.jsx($k,{scope:t,triggerId:me(),triggerRef:u,contentId:me(),open:f,onOpenChange:p,onOpenToggle:d.useCallback(()=>p(g=>!g),[p]),modal:l,children:s.jsx(yk,{...c,open:f,onOpenChange:p,dir:n,modal:l,children:r})})};Gp.displayName=oo;var Wp="DropdownMenuTrigger",zp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...o}=e,a=Bp(Wp,r),i=Se(r);return s.jsx(wk,{asChild:!0,...i,children:s.jsx(q.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:tt(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())})})})});zp.displayName=Wp;var Lk="DropdownMenuPortal",qp=e=>{const{__scopeDropdownMenu:t,...r}=e,n=Se(t);return s.jsx(Ck,{...n,...r})};qp.displayName=Lk;var Up="DropdownMenuContent",Hp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Bp(Up,r),a=Se(r),i=d.useRef(!1);return s.jsx(Sk,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...n,ref:t,onCloseAutoFocus:F(e.onCloseAutoFocus,l=>{var c;i.current||(c=o.triggerRef.current)==null||c.focus(),i.current=!1,l.preventDefault()}),onInteractOutside:F(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,f=c.button===2||u;(!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)"}})});Hp.displayName=Up;var Fk="DropdownMenuGroup",Kp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Se(r);return s.jsx(Ek,{...o,...n,ref:t})});Kp.displayName=Fk;var Vk="DropdownMenuLabel",Yp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Se(r);return s.jsx(kk,{...o,...n,ref:t})});Yp.displayName=Vk;var Bk="DropdownMenuItem",Xp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Se(r);return s.jsx(Rk,{...o,...n,ref:t})});Xp.displayName=Bk;var Gk="DropdownMenuCheckboxItem",Zp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Se(r);return s.jsx(Nk,{...o,...n,ref:t})});Zp.displayName=Gk;var Wk="DropdownMenuRadioGroup",Jp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Se(r);return s.jsx(jk,{...o,...n,ref:t})});Jp.displayName=Wk;var zk="DropdownMenuRadioItem",Qp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Se(r);return s.jsx(Pk,{...o,...n,ref:t})});Qp.displayName=zk;var qk="DropdownMenuItemIndicator",em=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Se(r);return s.jsx(Tk,{...o,...n,ref:t})});em.displayName=qk;var Uk="DropdownMenuSeparator",tm=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Se(r);return s.jsx(_k,{...o,...n,ref:t})});tm.displayName=Uk;var Hk="DropdownMenuArrow",Kk=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Se(r);return s.jsx(Ak,{...o,...n,ref:t})});Kk.displayName=Hk;var Yk=e=>{const{__scopeDropdownMenu:t,children:r,open:n,onOpenChange:o,defaultOpen:a}=e,i=Se(t),[l,c]=be({prop:n,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return s.jsx(Ik,{...i,open:l,onOpenChange:c,children:r})},Xk="DropdownMenuSubTrigger",rm=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Se(r);return s.jsx(Mk,{...o,...n,ref:t})});rm.displayName=Xk;var Zk="DropdownMenuSubContent",nm=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Se(r);return s.jsx(Ok,{...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)"}})});nm.displayName=Zk;var Jk=Gp,Qk=zp,om=qp,am=Hp,eR=Kp,sm=Yp,im=Xp,lm=Zp,tR=Jp,cm=Qp,dm=em,um=tm,rR=Yk,fm=rm,pm=nm;const nR=Jk,oR=Qk,aR=eR,sR=om,iR=rR,lR=tR,mm=d.forwardRef(({className:e,inset:t,children:r,...n},o)=>s.jsxs(fm,{ref:o,className:R("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 hover:text-[var(--text-interactive-neutral-hover)] hover:bg-[var(--fill-interactive-neutral-hover)] active:bg-[var(--fill-interactive-emphasis-active)] [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n,children:[r,s.jsx(al,{className:"ml-auto"})]}));mm.displayName=fm.displayName;const gm=d.forwardRef(({className:e,...t},r)=>s.jsx(pm,{ref:r,className:R("z-50 min-w-[8rem] overflow-hidden cursor-pointer rounded-sm border 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","text-[var(--text-interactive-neutral-idle)] bg-[var(--fill-interactive-neutral-idle)] border-[var(--border-interactive-neutral-idle)] px-1 py-1",e),...t}));gm.displayName=pm.displayName;const vm=d.forwardRef(({className:e,sideOffset:t=4,...r},n)=>s.jsx(om,{children:s.jsx(am,{ref:n,sideOffset:t,className:R("qodo qodo-dropdown-menu-content z-50 min-w-[8rem] overflow-hidden rounded-sm border text-[var(--text-interactive-neutral-idle)] bg-[var(--fill-interactive-neutral-idle)] border-[var(--border-interactive-neutral-idle)] px-1 py-1 ","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 [&_svg]:text-inherit dark:[&_svg]:text-inherit",e),...r})}));vm.displayName=am.displayName;const fs=d.forwardRef(({className:e,inset:t,...r},n)=>s.jsx(im,{ref:n,className:R("w-full qodo qodo-dropdown-menu-item relative flex select-none items-center gap-2 rounded-xs px-2 py-1.5 text-sm outline-none transition-colors focus:bg-[var(--fill-interactive-neutral-hover)] active:bg-[var(--fill-interactive-emphasis-active)] data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0 focus:text-[var(--text-interactive-neutral-hover)] active:text-[var(--text-interactive-emphasis-active)] cursor-pointer data-[disabled]:cursor-default",t&&"pl-8",e),...r}));fs.displayName=im.displayName;const hm=d.forwardRef(({className:e,children:t,checked:r,...n},o)=>s.jsxs(lm,{ref:o,className:R("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:text-[var(--text-interactive-neutral-hover)] active:text-[var(--text-interactive-emphasis-active)] data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-[var(--fill-interactive-neutral-hover)] active:bg-[var(--fill-interactive-emphasis-active)] 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(dm,{children:s.jsx(rr,{className:"h-4 w-4"})})}),t]}));hm.displayName=lm.displayName;const xm=d.forwardRef(({className:e,children:t,...r},n)=>s.jsxs(cm,{ref:n,className:R("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-[var(--fill-interactive-neutral-hover)] active:bg-[var(--fill-interactive-emphasis-active)] data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:text-[var(--text-interactive-neutral-hover)] active:text-[var(--text-interactive-emphasis-active)] 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(dm,{children:s.jsx(rr,{className:"h-[18px] w-[18px]"})})}),t]}));xm.displayName=cm.displayName;const ps=d.forwardRef(({className:e,inset:t,...r},n)=>s.jsx(sm,{ref:n,className:R("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));ps.displayName=sm.displayName;const Ct=d.forwardRef(({className:e,...t},r)=>s.jsx(um,{ref:r,className:R("-mx-1 my-1 h-px bg-purple-muted-500",e),...t}));Ct.displayName=um.displayName;const bm=({className:e,...t})=>s.jsx("span",{className:R("ml-auto text-xs tracking-widest [&>svg]:size-4 self-end",e),...t});bm.displayName="DropdownMenuEndAndornment";const cR=({radioItem:e})=>s.jsxs(xm,{className:"m-0 rounded-none gap-2 pl-3 pr-9 py-1.5",value:e.value,disabled:e.disabled,onSelect:t=>t.preventDefault(),children:[e.icon,e.label]}),dR=({radioGroupItem:e})=>s.jsxs(s.Fragment,{children:[s.jsx(lR,{value:e.value,onValueChange:e.onValueChange,children:e.radioItems.map((t,r)=>s.jsx(cR,{radioItem:t},`item-${r}`))}),e.separator&&s.jsx(Ct,{})]}),uR=({actionItem:e})=>s.jsxs("div",{className:"w-full [&>button]:w-full",children:[s.jsx(Gr,{content:e.tooltip,providerProps:{delayDuration:200},children:s.jsx(fs,{className:"m-0 rounded-xs py-1.5 px-3 outline-none text-text-interactive-neutral-idle",disabled:e.disabled||e.loading,onClick:e.onClick,onSelect:e.onSelect,children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[e.loading&&s.jsx(il,{className:"h-4 w-4 motion-preset-spin motion-duration-1000"}),!e.loading&&e.icon,e.label,e.endAndornment&&s.jsx(bm,{children:e.endAndornment})]})})}),e.separator&&s.jsx(Ct,{})]}),fR=({checkboxItem:e})=>s.jsxs(hm,{className:"gap-2 m-0 rounded-none py-1.5 pl-3 pr-9 outline-none",checked:e.checked,onCheckedChange:e.onSelect,disabled:e.disabled,onSelect:t=>t.preventDefault(),children:[e.icon,e.label]}),pR=({checkboxGroupItem:e})=>s.jsxs(s.Fragment,{children:[s.jsx(aR,{children:e.checkboxes.map((t,r)=>s.jsx(fR,{checkboxItem:t},`item-${r}`))}),e.separator&&s.jsx(Ct,{})]}),mR=({subMenuItem:e})=>s.jsxs(s.Fragment,{children:[s.jsxs(iR,{children:[s.jsxs(mm,{disabled:e.disabled,className:"m-0 rounded-none py-1.5 pl-3 pr-1",children:[e.icon,e.label]}),s.jsx(sR,{children:s.jsx(gm,{children:e.subItems.map((t,r)=>ym(t,r))})})]}),e.separator&&s.jsx(Ct,{})]}),gR=({menuItem:e})=>s.jsx(ps,{className:"text-purple-muted-300 px-3 font-normal",children:e.label}),vR=()=>s.jsx(Ct,{}),ym=(e,t)=>{switch(e.type){case"ActionMenuItem":return s.jsx(uR,{actionItem:e},`item-${t}`);case"CheckboxGroup":return s.jsx(pR,{checkboxGroupItem:e},`item-${t}`);case"RadioGroup":return s.jsx(dR,{radioGroupItem:e},`item-${t}`);case"SubMenuItem":return s.jsx(mR,{subMenuItem:e},`item-${t}`);case"MenuLabel":return s.jsx(gR,{menuItem:e},`item-${t}`);case"Separator":return s.jsx(vR,{},`item-${t}`);default:return null}},hR={s:"min-w-[140px]",m:"min-w-[249px]",l:"min-w-[257px]"},xR=({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})]}),bR=({header:e})=>e?s.jsxs(s.Fragment,{children:[s.jsx(ps,{className:"text-purple-100 font-normal px-3",children:e.type==="MenuTitleHeader"&&s.jsx(xR,{header:e})}),s.jsx(Ct,{className:"bg-purple-muted-500"})]}):null,yR=({footer:e})=>e?s.jsxs(s.Fragment,{children:[s.jsx(Ct,{className:"bg-purple-muted-500"}),s.jsxs(fs,{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,wm=({menuItems:e,header:t,footer:r,triggerElement:n,size:o="s",asChild:a=!1,side:i="bottom",modal:l=!1,disabled:c=!1,className:u=""})=>{const f=nl(hR,{[o]:o,className:u},!1);return s.jsx("div",{className:R("qodo qodo-dropdown"),children:s.jsxs(nR,{modal:l,children:[s.jsx(oR,{asChild:a,className:"select-none outline-none flex items-center",disabled:c,children:n}),s.jsxs(vm,{side:i,align:"end",className:f,children:[s.jsx(bR,{header:t}),e.filter(p=>!p.isHidden).map((p,g)=>ym(p,g)),s.jsx(yR,{footer:r})]})]})})},wR=({triggerAriaLabel:e="Open actions menu",className:t,...r})=>s.jsx(et,{variant:"ghost",size:"icon","aria-label":e,className:R("flex items-center justify-center h-4 w-4",t),...r,children:s.jsx(sl,{className:"h-4 w-4"})}),CR=({menuItems:e=[],triggerElement:t=wR,triggerProps:r={},className:n,size:o="s",asChild:a=!1,side:i="bottom",modal:l=!1})=>s.jsx("div",{className:n,onClick:c=>c.stopPropagation(),children:s.jsx(wm,{triggerElement:s.jsx(t,{className:R("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})}),SR={"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"},Gi={SMALL:"small",LARGE:"large"},ER=({containerClassName:e,className:t,searchSize:r=Gi.SMALL,disabled:n=!1,disableFilterIcon:o=!0,...a})=>{const i=r===Gi.LARGE?"pl-12 py-3 pr-4 h-[45px]":"pl-9 py-1.5 pr-2 h-[33px]",l=R("absolute top-1/2 h-4 w-4 -translate-y-1/2",n?"text-purple-muted-600":"text-purple-muted-400"),c=R("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:R("qodo qodo-search-input","relative",e),children:[s.jsx(ll,{className:R(l,"left-3")}),s.jsx(Pr,{className:R(i,c,t),disabled:n,...a,...SR}),!o&&s.jsx(nv,{className:R(l,"right-3")})]})},kR=/^(([^<>()[\]\\.,;:\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,}))$/,RR=e=>e.split(/[,\s]+/).map(t=>t.trim()).filter(Boolean),NR=(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())},jR=(e,t)=>e.map(r=>{const n=kR.test(r),o=n?NR(r,t==null?void 0:t.domains):void 0;return{email:r,isValid:n&&o!==!1,isDomainValid:o}}),PR=(e,t,r)=>{const n=jR(e,r),o=[...t];for(const a of n)o.some(l=>l.email===a.email)||o.push(a);return o},TR=({onChange:e=()=>{},organization:t})=>{const[r,n]=S.useState([]),o=S.useCallback(u=>{e(u)},[e]),a=S.useCallback(u=>{n(u),o(u)},[o]),i=S.useCallback(u=>{const f=RR(u);if(f.length===0)return;const p=PR(f,r,t);a(p)},[r,a,t]),l=S.useCallback(()=>{a([])},[a]),c=S.useCallback(u=>{const f=r.filter(p=>p.email!==u);a(f)},[r,a]);return{emails:r,setEmails:a,addTokens:i,removeToken:c,clearAll:l,notify:o}},_R=e=>{const{draft:t,setDraft:r,addTokens:n,allSelected:o,setAllSelected:a,clearAll:i,emails:l,setEmails:c,notify:u}=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);c(g),r(p.email),u(g);return}if(f.key==="Enter"){f.preventDefault(),t.trim()&&(n(t),r(""));return}[",",";"," "].includes(f.key)&&(f.preventDefault(),t.trim()&&(n(t),r("")))}},AR=({email:e,isValid:t,onRemove:r})=>{const n=o=>{o.stopPropagation(),r(e)};return s.jsxs(Jt,{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(kn,{size:12})})]})},IR=({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),b=m.filter(x=>!x.email.includes("@")||x.isDomainValid===void 0),v=m.filter(x=>x.isDomainValid===!1);return{formatErrors:b,domainErrors:v,totalInvalidCount:m.length}},[r]),c=m=>{m.preventDefault(),m.stopPropagation()},u=m=>{c(m),t()},f=m=>{c(m)},p=m=>{m.stopPropagation()},g=(m,b)=>b.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,":"]}),b.map((v,x)=>s.jsx("p",{className:"break-all",children:v.email},`${m}-${x}-${v.email}`))]});return s.jsxs(s.Fragment,{children:[e&&s.jsx("button",{type:"button",onClick:u,className:"absolute right-3 top-1/2 -translate-y-1/2 hover:text-purple-muted-100",children:s.jsx(gv,{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(Gr,{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(hv,{className:"size-[18px]"})})})})]})},MR=({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:c="Invalid email",invalidDomainError:u="Email domain is not allowed"})=>{const f=S.useRef(null),p=S.useRef(null),[g,m]=S.useState(""),[b,v]=S.useState(!1),{emails:x,setEmails:y,addTokens:h,removeToken:C,clearAll:E,notify:j}=TR({onChange:e,organization:o}),_=_R({draft:g,setDraft:m,addTokens:h,allSelected:b,setAllSelected:v,clearAll:E,emails:x,setEmails:y,notify:j}),P=()=>{var J;const B=((J=o==null?void 0:o.domains)==null?void 0:J[0])||"example.com";return r({domain:B})},N=S.useCallback(B=>{m(B.target.value)},[]),W=S.useCallback(()=>{g.trim()&&(h(g),m("")),v(!1)},[g,h]),U=S.useCallback(B=>{const J=B.clipboardData.getData("text");J&&(B.preventDefault(),h(J),m(""))},[h]),re=S.useCallback(()=>{var B;(B=p.current)==null||B.focus()},[p]),te=S.useCallback(()=>{v(!1)},[]),Q=S.useCallback(B=>{var T;const J=B.relatedTarget;J&&((T=f.current)!=null&&T.contains(J))||g.trim()&&(h(g),m(""))},[g,h]),V=x.length>0,O=!V&&g.length===0,I=V||g.length>0,D=R("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",V?"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=R("inline-flex items-center gap-1 no-scrollbar",V?"w-max":"w-full",i),M=R("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(Gr,{triggerProps:{asChild:!0},content:t?n:void 0,children:s.jsxs("div",{ref:f,className:M,onClick:re,onFocus:te,onBlur:Q,children:[s.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-purple-muted-400",children:s.jsx(sv,{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((B,J)=>s.jsx(AR,{email:B.email,isValid:B.isValid,onRemove:C},`email-${J}-${B.email}`)),s.jsx("input",{ref:p,value:g,onChange:N,onKeyDown:_,onBlur:W,onPaste:U,className:D,placeholder:O?P():"",disabled:t})]})}),s.jsx(IR,{hasContent:I,onClearAll:E,emails:x,invalidEmailError:c,invalidDomainError:u})]})})},rn={DEFAULT:"default",PRIMARY:"primary",ACTIVE:"active"},Wi={SM:"sm",MD:"md"};function OR({title:e,description:t,caption:r,additionalContent:n,titleClassName:o,descriptionClassName:a,variant:i=rn.DEFAULT,className:l,icon:c,iconClassName:u,size:f=Wi.SM}){const p=R("p-4 flex flex-row items-center gap-4","border-[var(--border-panel-neutral)] dark:border-[var(--border-panel-neutral)] rounded-md fill-[var(--fill-panel-neutral)]",{"px-6 gap-6":f===Wi.MD},l),g=R("p-0 m-0 text-xs","text-[var(--color-text-bg-neutral-mild)] dark:text-[var(--color-text-bg-neutral-mild)] font-normal",o),m=R("w-8 h-8 flex items-center justify-center","bg-purple-muted-600 rounded-full p-2.5",u),b=R("text-xl font-medium p-0 m-0 leading-5",{"text-muted-foreground dark:text-white":i===rn.DEFAULT,"text-purple-300 dark:text-purple-300":i===rn.PRIMARY,"text-[var(--color-text-tag-positive-idle)] dark:text-[var(--color-text-tag-positive-idle)]":i===rn.ACTIVE},a);return s.jsxs(Rd,{className:p,children:[c&&s.jsx("div",{className:m,children:c}),s.jsxs("div",{className:"flex flex-col gap-1 w-full",children:[s.jsx(Nd,{className:"m-0 p-0 gap-0",children:s.jsx(jd,{className:g,children:e})}),s.jsxs(Td,{className:"m-0 p-0 flex flex-col gap-2",children:[t&&s.jsx(Pd,{className:b,children:t}),r&&s.jsx("span",{className:"text-xs text-foreground dark:text-foreground tracking-[0.12px]",children:r}),n]})]})]})}exports.Accordion=Kw;exports.AccordionContent=Zw;exports.AccordionItem=Yw;exports.AccordionTrigger=Xw;exports.ActionsCell=CR;exports.Badge=Jt;exports.BadgeCell=zE;exports.BaseCell=na;exports.Button=et;exports.Card=Rd;exports.CardAction=Gy;exports.CardContent=Td;exports.CardDescription=Pd;exports.CardFooter=Wy;exports.CardHeader=Nd;exports.CardTitle=jd;exports.Checkbox=es;exports.CheckboxGroup=Za;exports.ClassHelper=nl;exports.Combobox=ka;exports.Dialog=xy;exports.DialogClose=yy;exports.DialogContent=wy;exports.DialogDescription=ky;exports.DialogFooter=Sy;exports.DialogHeader=Cy;exports.DialogOverlay=cd;exports.DialogPortal=ld;exports.DialogTitle=Ey;exports.DialogTrigger=by;exports.Dropdown=wm;exports.EmailChipsInput=MR;exports.Form=je;exports.FormProvider=Lu;exports.Input=Pr;exports.InsightCard=OR;exports.NumberCell=qE;exports.PAGINATION_MODE=yr;exports.Progress=Jy;exports.RadioGroup=za;exports.RadioGroupItem=Ua;exports.SearchInput=ER;exports.Select=Mf;exports.SelectContent=Pc;exports.SelectGroup=_b;exports.SelectItem=_c;exports.SelectLabel=Tc;exports.SelectScrollDownButton=va;exports.SelectScrollUpButton=ga;exports.SelectSeparator=Ac;exports.SelectTrigger=jc;exports.SelectV1=Tb;exports.SelectValue=Ab;exports.Skeleton=Od;exports.SortableHeaderCell=UE;exports.Steps=PE;exports.Switch=iw;exports.Table=WE;exports.Tabs=o0;exports.TabsContent=i0;exports.TabsList=a0;exports.TabsTrigger=s0;exports.TagsInput=yf;exports.Toggle=cw;exports.ToggleGroup=Rw;exports.ToggleGroupItem=Nw;exports.Tooltip=Gr;exports.Typography=ju;exports.borderRadius=Um;exports.cn=R;exports.colors=zm;exports.spacing=qm;exports.typography=Hm;exports.typographyVariants=Nu;exports.useFormContext=Fu;
|
|
219
219
|
//# sourceMappingURL=index.cjs.js.map
|