cemtrik-dependencies 1.0.162 → 1.0.164
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +12 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(R,u){typeof exports=="object"&&typeof module<"u"?u(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],u):(R=typeof globalThis<"u"?globalThis:R||self,u(R.MyApp={},R.React,R.ReactDOM))})(this,function(R,u,St){"use strict";function wr(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const E=wr(u),Tt=(e,n=!1)=>{function t(o){if(typeof o!="object"||o===null)return o;const
|
|
1
|
+
(function(R,u){typeof exports=="object"&&typeof module<"u"?u(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],u):(R=typeof globalThis<"u"?globalThis:R||self,u(R.MyApp={},R.React,R.ReactDOM))})(this,function(R,u,St){"use strict";function wr(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const E=wr(u),Tt=(e,n=!1)=>{function t(o){if(typeof o!="object"||o===null)return o;const i=Array.isArray(o)?[]:{};for(const l in o)o.hasOwnProperty(l)&&!n&&(i[l]=t(o[l]));return i}return e.map(o=>t(o))},un=e=>/^(?:[^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*|"[^\n"]+")@(?:[^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,63}$/i.test(e);function $(...e){return e.filter(Boolean).join(" ")}const yr=e=>{const n=e.split(" ");let t=e.slice(0,2);return n.length>1&&(t=`${e.at(0)}${n[n.length-1].slice(0,1)}`),t},Er=e=>typeof e!="string"&&Promise.resolve(e)instanceof Promise,Sr="The user aborted a request.",Tr="signal is aborted without reason",Cr=({id:e,close:n})=>{u.useEffect(()=>{const t=r=>{const o=document.getElementById(e);o&&(o.contains(r.target)||n())};return document.addEventListener("click",t),()=>{document.removeEventListener("click",t)}},[e,n])},Or=()=>{const e=u.useRef({}),[n,t]=u.useState({}),[r,o]=u.useState({}),[i,l]=u.useState([]);u.useEffect(()=>{e.current={}},[]);const s=b=>p=>{p.preventDefault(),p.stopPropagation(),b(n)},a=(b,p,g)=>{const{checked:x,value:v,name:y,type:w,id:O}=b.target,I={radio:O,checkbox:x};e.current={...g,...e.current,[y]:I[w]??v},t({...e.current,[y]:I[w]??v}),p({...e.current,[y]:I[w]??v})},d=u.useCallback((b,p)=>{e.current={...e.current,[b]:p},t(g=>({...g,[b]:p}))},[]),c=u.useCallback((b,p)=>{const g=p.filter(x=>b[x]===""||b[x]===void 0);return g.forEach(x=>o(v=>({...v,[x]:"Este campo es requerido"}))),l(g),g.length>0},[]);return{handleSubmit:s,handleChange:a,setValuesDefault:d,validateFields:c,errors:i,model:n,handleError:(b,p)=>{p.forEach(g=>o(x=>({...x,[g]:b}))),l(p)},messageError:r,setModel:t}},jr=e=>{const[n,t]=u.useState(!0),[r,o]=u.useState(!1),i=u.useCallback((l,s)=>{const a=e.match(/[0-9]+/g);if(a===null)return;const[d]=a;s=Math.min(window.innerWidth,window.outerWidth);const c=l?s>=Number(d):s<=Number(d);o(c)},[e]);return u.useEffect(()=>{const l=/\(min-width:\s?[0-9]+px\)/gi.test(e),s=/\(max-width:\s?[0-9]+px\)/gi.test(e);if(!l&&!s&&t(!1),!l&&!s)return;const a=Math.min(window.innerWidth,window.outerWidth);i(l,a)},[e,i]),u.useEffect(()=>{if(!n)return;const l=Math.min(window.innerWidth,window.outerWidth);function s(){const a=/min-width/gi.test(e);i(a,l)}return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[n,e,i]),r},cn=()=>{const[e,n]=u.useState({width:0,height:0});return u.useEffect(()=>{const t=()=>{const r=Math.min(window.innerWidth,window.outerWidth),o=Math.min(window.innerHeight,window.outerHeight);n({width:r,height:o})};return requestAnimationFrame(()=>t()),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),e};function Nr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ct={exports:{}},Ye={};/**
|
|
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 dn;function Fr(){if(dn)return Ye;dn=1;var e=u,n=Symbol.for("react.element"),t=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,
|
|
9
|
+
*/var dn;function Fr(){if(dn)return Ye;dn=1;var e=u,n=Symbol.for("react.element"),t=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function l(s,a,d){var c,h={},b=null,p=null;d!==void 0&&(b=""+d),a.key!==void 0&&(b=""+a.key),a.ref!==void 0&&(p=a.ref);for(c in a)r.call(a,c)&&!i.hasOwnProperty(c)&&(h[c]=a[c]);if(s&&s.defaultProps)for(c in a=s.defaultProps,a)h[c]===void 0&&(h[c]=a[c]);return{$$typeof:n,type:s,key:b,ref:p,props:h,_owner:o.current}}return Ye.Fragment=t,Ye.jsx=l,Ye.jsxs=l,Ye}var qe={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,25 +14,25 @@
|
|
|
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 fn;function Ir(){return fn||(fn=1,process.env.NODE_ENV!=="production"&&function(){var e=u,n=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),
|
|
18
|
-
`+le+f}}var M=!1,C;{var F=typeof WeakMap=="function"?WeakMap:Map;C=new F}function W(f,S){if(!f||M)return"";{var j=C.get(f);if(j!==void 0)return j}var
|
|
19
|
-
`),we=
|
|
17
|
+
*/var fn;function Ir(){return fn||(fn=1,process.env.NODE_ENV!=="production"&&function(){var e=u,n=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),s=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),g=Symbol.iterator,x="@@iterator";function v(f){if(f===null||typeof f!="object")return null;var S=g&&f[g]||f[x];return typeof S=="function"?S:null}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(f){{for(var S=arguments.length,j=new Array(S>1?S-1:0),L=1;L<S;L++)j[L-1]=arguments[L];O("error",f,j)}}function O(f,S,j){{var L=y.ReactDebugCurrentFrame,Q=L.getStackAddendum();Q!==""&&(S+="%s",j=j.concat([Q]));var ie=j.map(function(K){return String(K)});ie.unshift("Warning: "+S),Function.prototype.apply.call(console[f],console,ie)}}var I=!1,k=!1,A=!1,G=!1,U=!1,B;B=Symbol.for("react.module.reference");function D(f){return!!(typeof f=="string"||typeof f=="function"||f===r||f===i||U||f===o||f===d||f===c||G||f===p||I||k||A||typeof f=="object"&&f!==null&&(f.$$typeof===b||f.$$typeof===h||f.$$typeof===l||f.$$typeof===s||f.$$typeof===a||f.$$typeof===B||f.getModuleId!==void 0))}function _(f,S,j){var L=f.displayName;if(L)return L;var Q=S.displayName||S.name||"";return Q!==""?j+"("+Q+")":j}function Y(f){return f.displayName||"Context"}function Z(f){if(f==null)return null;if(typeof f.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f;switch(f){case r:return"Fragment";case t:return"Portal";case i:return"Profiler";case o:return"StrictMode";case d:return"Suspense";case c:return"SuspenseList"}if(typeof f=="object")switch(f.$$typeof){case s:var S=f;return Y(S)+".Consumer";case l:var j=f;return Y(j._context)+".Provider";case a:return _(f,f.render,"ForwardRef");case h:var L=f.displayName||null;return L!==null?L:Z(f.type)||"Memo";case b:{var Q=f,ie=Q._payload,K=Q._init;try{return Z(K(ie))}catch{return null}}}return null}var se=Object.assign,T=0,te,q,P,z,ne,re,he;function be(){}be.__reactDisabledLog=!0;function fe(){{if(T===0){te=console.log,q=console.info,P=console.warn,z=console.error,ne=console.group,re=console.groupCollapsed,he=console.groupEnd;var f={configurable:!0,enumerable:!0,value:be,writable:!0};Object.defineProperties(console,{info:f,log:f,warn:f,error:f,group:f,groupCollapsed:f,groupEnd:f})}T++}}function Ce(){{if(T--,T===0){var f={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:se({},f,{value:te}),info:se({},f,{value:q}),warn:se({},f,{value:P}),error:se({},f,{value:z}),group:se({},f,{value:ne}),groupCollapsed:se({},f,{value:re}),groupEnd:se({},f,{value:he})})}T<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var H=y.ReactCurrentDispatcher,le;function oe(f,S,j){{if(le===void 0)try{throw Error()}catch(Q){var L=Q.stack.trim().match(/\n( *(at )?)/);le=L&&L[1]||""}return`
|
|
18
|
+
`+le+f}}var M=!1,C;{var F=typeof WeakMap=="function"?WeakMap:Map;C=new F}function W(f,S){if(!f||M)return"";{var j=C.get(f);if(j!==void 0)return j}var L;M=!0;var Q=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ie;ie=H.current,H.current=null,fe();try{if(S){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(ke){L=ke}Reflect.construct(f,[],K)}else{try{K.call()}catch(ke){L=ke}f.call(K.prototype)}}else{try{throw Error()}catch(ke){L=ke}f()}}catch(ke){if(ke&&L&&typeof ke.stack=="string"){for(var V=ke.stack.split(`
|
|
19
|
+
`),we=L.stack.split(`
|
|
20
20
|
`),ve=V.length-1,ge=we.length-1;ve>=1&&ge>=0&&V[ve]!==we[ge];)ge--;for(;ve>=1&&ge>=0;ve--,ge--)if(V[ve]!==we[ge]){if(ve!==1||ge!==1)do if(ve--,ge--,ge<0||V[ve]!==we[ge]){var Ee=`
|
|
21
|
-
`+V[ve].replace(" at new "," at ");return f.displayName&&Ee.includes("<anonymous>")&&(Ee=Ee.replace("<anonymous>",f.displayName)),typeof f=="function"&&C.set(f,Ee),Ee}while(ve>=1&&ge>=0);break}}}finally{M=!1,H.current=ie,Ce(),Error.prepareStackTrace=Q}var Ve=f?f.displayName||f.name:"",xr=Ve?oe(Ve):"";return typeof f=="function"&&C.set(f,xr),xr}function de(f,S,j){return W(f,!1)}function Ie(f){var S=f.prototype;return!!(S&&S.isReactComponent)}function ze(f,S,j){if(f==null)return"";if(typeof f=="function")return W(f,Ie(f));if(typeof f=="string")return oe(f);switch(f){case d:return oe("Suspense");case c:return oe("SuspenseList")}if(typeof f=="object")switch(f.$$typeof){case a:return de(f.render);case h:return ze(f.type,S,j);case b:{var
|
|
21
|
+
`+V[ve].replace(" at new "," at ");return f.displayName&&Ee.includes("<anonymous>")&&(Ee=Ee.replace("<anonymous>",f.displayName)),typeof f=="function"&&C.set(f,Ee),Ee}while(ve>=1&&ge>=0);break}}}finally{M=!1,H.current=ie,Ce(),Error.prepareStackTrace=Q}var Ve=f?f.displayName||f.name:"",xr=Ve?oe(Ve):"";return typeof f=="function"&&C.set(f,xr),xr}function de(f,S,j){return W(f,!1)}function Ie(f){var S=f.prototype;return!!(S&&S.isReactComponent)}function ze(f,S,j){if(f==null)return"";if(typeof f=="function")return W(f,Ie(f));if(typeof f=="string")return oe(f);switch(f){case d:return oe("Suspense");case c:return oe("SuspenseList")}if(typeof f=="object")switch(f.$$typeof){case a:return de(f.render);case h:return ze(f.type,S,j);case b:{var L=f,Q=L._payload,ie=L._init;try{return ze(ie(Q),S,j)}catch{}}}return""}var yt=Object.prototype.hasOwnProperty,sr={},ar=y.ReactDebugCurrentFrame;function Et(f){if(f){var S=f._owner,j=ze(f.type,f._source,S?S.type:null);ar.setExtraStackFrame(j)}else ar.setExtraStackFrame(null)}function Ws(f,S,j,L,Q){{var ie=Function.call.bind(yt);for(var K in f)if(ie(f,K)){var V=void 0;try{if(typeof f[K]!="function"){var we=Error((L||"React class")+": "+j+" type `"+K+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof f[K]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw we.name="Invariant Violation",we}V=f[K](S,K,L,j,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ve){V=ve}V&&!(V instanceof Error)&&(Et(Q),w("%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).",L||"React class",j,K,typeof V),Et(null)),V instanceof Error&&!(V.message in sr)&&(sr[V.message]=!0,Et(Q),w("Failed %s type: %s",j,V.message),Et(null))}}}var Us=Array.isArray;function rn(f){return Us(f)}function Hs(f){{var S=typeof Symbol=="function"&&Symbol.toStringTag,j=S&&f[Symbol.toStringTag]||f.constructor.name||"Object";return j}}function Vs(f){try{return ur(f),!1}catch{return!0}}function ur(f){return""+f}function cr(f){if(Vs(f))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Hs(f)),ur(f)}var st=y.ReactCurrentOwner,Ys={key:!0,ref:!0,__self:!0,__source:!0},dr,fr,on;on={};function qs(f){if(yt.call(f,"ref")){var S=Object.getOwnPropertyDescriptor(f,"ref").get;if(S&&S.isReactWarning)return!1}return f.ref!==void 0}function Gs(f){if(yt.call(f,"key")){var S=Object.getOwnPropertyDescriptor(f,"key").get;if(S&&S.isReactWarning)return!1}return f.key!==void 0}function Zs(f,S){if(typeof f.ref=="string"&&st.current&&S&&st.current.stateNode!==S){var j=Z(st.current.type);on[j]||(w('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',Z(st.current.type),f.ref),on[j]=!0)}}function Ks(f,S){{var j=function(){dr||(dr=!0,w("%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)",S))};j.isReactWarning=!0,Object.defineProperty(f,"key",{get:j,configurable:!0})}}function Js(f,S){{var j=function(){fr||(fr=!0,w("%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)",S))};j.isReactWarning=!0,Object.defineProperty(f,"ref",{get:j,configurable:!0})}}var Qs=function(f,S,j,L,Q,ie,K){var V={$$typeof:n,type:f,key:S,ref:j,props:K,_owner:ie};return V._store={},Object.defineProperty(V._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(V,"_self",{configurable:!1,enumerable:!1,writable:!1,value:L}),Object.defineProperty(V,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Q}),Object.freeze&&(Object.freeze(V.props),Object.freeze(V)),V};function Xs(f,S,j,L,Q){{var ie,K={},V=null,we=null;j!==void 0&&(cr(j),V=""+j),Gs(S)&&(cr(S.key),V=""+S.key),qs(S)&&(we=S.ref,Zs(S,Q));for(ie in S)yt.call(S,ie)&&!Ys.hasOwnProperty(ie)&&(K[ie]=S[ie]);if(f&&f.defaultProps){var ve=f.defaultProps;for(ie in ve)K[ie]===void 0&&(K[ie]=ve[ie])}if(V||we){var ge=typeof f=="function"?f.displayName||f.name||"Unknown":f;V&&Ks(K,ge),we&&Js(K,ge)}return Qs(f,V,we,Q,L,st.current,K)}}var ln=y.ReactCurrentOwner,mr=y.ReactDebugCurrentFrame;function He(f){if(f){var S=f._owner,j=ze(f.type,f._source,S?S.type:null);mr.setExtraStackFrame(j)}else mr.setExtraStackFrame(null)}var sn;sn=!1;function an(f){return typeof f=="object"&&f!==null&&f.$$typeof===n}function pr(){{if(ln.current){var f=Z(ln.current.type);if(f)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+f+"`."}return""}}function ea(f){return""}var hr={};function ta(f){{var S=pr();if(!S){var j=typeof f=="string"?f:f.displayName||f.name;j&&(S=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+j+">.")}return S}}function vr(f,S){{if(!f._store||f._store.validated||f.key!=null)return;f._store.validated=!0;var j=ta(S);if(hr[j])return;hr[j]=!0;var
|
|
25
|
+
Check the top-level render call using <`+j+">.")}return S}}function vr(f,S){{if(!f._store||f._store.validated||f.key!=null)return;f._store.validated=!0;var j=ta(S);if(hr[j])return;hr[j]=!0;var L="";f&&f._owner&&f._owner!==ln.current&&(L=" It was passed a child from "+Z(f._owner.type)+"."),He(f),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',j,L),He(null)}}function gr(f,S){{if(typeof f!="object")return;if(rn(f))for(var j=0;j<f.length;j++){var L=f[j];an(L)&&vr(L,S)}else if(an(f))f._store&&(f._store.validated=!0);else if(f){var Q=v(f);if(typeof Q=="function"&&Q!==f.entries)for(var ie=Q.call(f),K;!(K=ie.next()).done;)an(K.value)&&vr(K.value,S)}}}function na(f){{var S=f.type;if(S==null||typeof S=="string")return;var j;if(typeof S=="function")j=S.propTypes;else if(typeof S=="object"&&(S.$$typeof===a||S.$$typeof===h))j=S.propTypes;else return;if(j){var L=Z(S);Ws(j,f.props,"prop",L,f)}else if(S.PropTypes!==void 0&&!sn){sn=!0;var Q=Z(S);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Q||"Unknown")}typeof S.getDefaultProps=="function"&&!S.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ra(f){{for(var S=Object.keys(f.props),j=0;j<S.length;j++){var L=S[j];if(L!=="children"&&L!=="key"){He(f),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",L),He(null);break}}f.ref!==null&&(He(f),w("Invalid attribute `ref` supplied to `React.Fragment`."),He(null))}}function br(f,S,j,L,Q,ie){{var K=D(f);if(!K){var V="";(f===void 0||typeof f=="object"&&f!==null&&Object.keys(f).length===0)&&(V+=" 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 we=ea();we?V+=we:V+=pr();var ve;f===null?ve="null":rn(f)?ve="array":f!==void 0&&f.$$typeof===n?(ve="<"+(Z(f.type)||"Unknown")+" />",V=" Did you accidentally export a JSX literal instead of a component?"):ve=typeof f,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ve,V)}var ge=Xs(f,S,j,Q,ie);if(ge==null)return ge;if(K){var Ee=S.children;if(Ee!==void 0)if(L)if(rn(Ee)){for(var Ve=0;Ve<Ee.length;Ve++)gr(Ee[Ve],f);Object.freeze&&Object.freeze(Ee)}else w("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 gr(Ee,f)}return f===r?ra(ge):na(ge),ge}}function oa(f,S,j){return br(f,S,j,!0)}function la(f,S,j){return br(f,S,j,!1)}var ia=la,sa=oa;qe.Fragment=r,qe.jsx=ia,qe.jsxs=sa}()),qe}process.env.NODE_ENV==="production"?Ct.exports=Fr():Ct.exports=Ir();var m=Ct.exports;function Ge(e,n,t){let r=t.initialDeps??[],o;return()=>{var i,l,s,a;let d;t.key&&((i=t.debug)!=null&&i.call(t))&&(d=Date.now());const c=e();if(!(c.length!==r.length||c.some((p,g)=>r[g]!==p)))return o;r=c;let b;if(t.key&&((l=t.debug)!=null&&l.call(t))&&(b=Date.now()),o=n(...c),t.key&&((s=t.debug)!=null&&s.call(t))){const p=Math.round((Date.now()-d)*100)/100,g=Math.round((Date.now()-b)*100)/100,x=g/16,v=(y,w)=>{for(y=String(y);y.length<w;)y=" "+y;return y};console.info(`%c⏱ ${v(g,5)} /${v(p,5)} ms`,`
|
|
26
26
|
font-size: .6rem;
|
|
27
27
|
font-weight: bold;
|
|
28
|
-
color: hsl(${Math.max(0,Math.min(120-120*x,120))}deg 100% 31%);`,t==null?void 0:t.key)}return(a=t==null?void 0:t.onChange)==null||a.call(t,o),o}}function Ot(e,n){if(e===void 0)throw new Error("Unexpected undefined");return e}const kr=(e,n)=>Math.abs(e-n)<1,$r=(e,n,t)=>{let r;return function(...o){e.clearTimeout(r),r=e.setTimeout(()=>n.apply(this,o),t)}},Pr=e=>e,Mr=e=>{const n=Math.max(e.startIndex-e.overscan,0),t=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let o=n;o<=t;o++)r.push(o);return r},Ar=(e,n)=>{const t=e.scrollElement;if(!t)return;const r=e.targetWindow;if(!r)return;const o=i=>{const{width:s,height:a}=i;n({width:Math.round(s),height:Math.round(a)})};if(o(t.getBoundingClientRect()),!r.ResizeObserver)return()=>{};const l=new r.ResizeObserver(i=>{const s=i[0];if(s!=null&&s.borderBoxSize){const a=s.borderBoxSize[0];if(a){o({width:a.inlineSize,height:a.blockSize});return}}o(t.getBoundingClientRect())});return l.observe(t,{box:"border-box"}),()=>{l.unobserve(t)}},mn={passive:!0},Dr=typeof window>"u"?!0:"onscrollend"in window,Lr=(e,n)=>{const t=e.scrollElement;if(!t)return;const r=e.targetWindow;if(!r)return;let o=0;const l=Dr?()=>{}:$r(r,()=>{n(o,!1)},e.options.isScrollingResetDelay),i=d=>()=>{o=t[e.options.horizontal?"scrollLeft":"scrollTop"],l(),n(o,d)},s=i(!0),a=i(!1);return a(),t.addEventListener("scroll",s,mn),t.addEventListener("scrollend",a,mn),()=>{t.removeEventListener("scroll",s),t.removeEventListener("scrollend",a)}},_r=(e,n,t)=>{if(n!=null&&n.borderBoxSize){const r=n.borderBoxSize[0];if(r)return Math.round(r[t.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[t.options.horizontal?"width":"height"])},Rr=(e,{adjustments:n=0,behavior:t},r)=>{var o,l;const i=e+n;(l=(o=r.scrollElement)==null?void 0:o.scrollTo)==null||l.call(o,{[r.options.horizontal?"left":"top"]:i,behavior:t})};class Br{constructor(n){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let t=null;const r=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(o=>{o.forEach(l=>{this._measureElement(l.target,l)})}));return{disconnect:()=>{var o;return(o=r())==null?void 0:o.disconnect()},observe:o=>{var l;return(l=r())==null?void 0:l.observe(o,{box:"border-box"})},unobserve:o=>{var l;return(l=r())==null?void 0:l.unobserve(o)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([r,o])=>{typeof o>"u"&&delete t[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Pr,rangeExtractor:Mr,onChange:()=>{},measureElement:_r,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...t}},this.notify=(t,r)=>{var o,l;const{startIndex:i,endIndex:s}=this.range??{startIndex:void 0,endIndex:void 0},a=this.calculateRange();(t||i!==(a==null?void 0:a.startIndex)||s!==(a==null?void 0:a.endIndex))&&((l=(o=this.options).onChange)==null||l.call(o,this,r))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.notify(!1,!1);return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(o,l)=>{this.scrollAdjustments=0,this.scrollDirection=l?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o;const i=this.isScrolling;this.isScrolling=l,this.notify(i!==l,l)}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(t,r)=>{const o=new Map,l=new Map;for(let i=r-1;i>=0;i--){const s=t[i];if(o.has(s.lane))continue;const a=l.get(s.lane);if(a==null||s.end>a.end?l.set(s.lane,s):s.end<a.end&&o.set(s.lane,!0),o.size===this.options.lanes)break}return l.size===this.options.lanes?Array.from(l.values()).sort((i,s)=>i.end===s.end?i.index-s.index:i.end-s.end)[0]:void 0},this.getMeasurementOptions=Ge(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(t,r,o,l,i)=>(this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:r,scrollMargin:o,getItemKey:l,enabled:i}),{key:!1}),this.getMeasurements=Ge(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:r,scrollMargin:o,getItemKey:l,enabled:i},s)=>{var a;if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(h=>{this.itemSizeCache.set(h.key,h.size)}));const d=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,d);for(let h=d;h<t;h++){let b=(a=this.measurementsCache[h])==null?void 0:a.measureElement;b||(b=I=>{const k=l(h),A=this.elementsCache.get(k);if(!I){A&&(this.observer.unobserve(A),this.elementsCache.delete(k));return}A!==I&&(A&&this.observer.unobserve(A),this.observer.observe(I),this.elementsCache.set(k,I)),I.isConnected&&this.resizeItem(h,this.options.measureElement(I,void 0,this))});const p=l(h),g=this.options.lanes===1?c[h-1]:this.getFurthestMeasurement(c,h),x=g?g.end+this.options.gap:r+o,v=s.get(p),y=typeof v=="number"?v:this.options.estimateSize(h),w=x+y,O=g?g.lane:h%this.options.lanes;c[h]={index:h,start:x,size:y,end:w,key:p,lane:O,measureElement:b}}return this.measurementsCache=c,c},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Ge(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(t,r,o)=>this.range=t.length>0&&r>0?zr({measurements:t,outerSize:r,scrollOffset:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=Ge(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(t,r,o,l)=>r===null?[]:t({startIndex:r.startIndex,endIndex:r.endIndex,overscan:o,count:l}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=t=>{const r=this.options.indexAttribute,o=t.getAttribute(r);return o?parseInt(o,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(t,r)=>{const o=this.indexFromElement(t),l=this.getMeasurements()[o];if(!l||!t.isConnected){this.elementsCache.forEach((s,a)=>{s===t&&(this.observer.unobserve(t),this.elementsCache.delete(a))});return}const i=this.elementsCache.get(l.key);i!==t&&(i&&this.observer.unobserve(i),this.observer.observe(t),this.elementsCache.set(l.key,t)),this.resizeItem(o,this.options.measureElement(t,r,this))},this.resizeItem=(t,r)=>{const o=this.getMeasurements()[t];if(!o)return;const l=this.itemSizeCache.get(o.key)??o.size,i=r-l;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,i,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",i),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,r)),this.notify(!0,!1))},this.measureElement=t=>{t&&this._measureElement(t,void 0)},this.getVirtualItems=Ge(()=>[this.getIndexes(),this.getMeasurements()],(t,r)=>{const o=[];for(let l=0,i=t.length;l<i;l++){const s=t[l],a=r[s];o.push(a)}return o},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const r=this.getMeasurements();if(r.length!==0)return Ot(r[pn(0,r.length-1,o=>Ot(r[o]).start,t)])},this.getOffsetForAlignment=(t,r)=>{const o=this.getSize(),l=this.getScrollOffset();r==="auto"&&(t<=l?r="start":t>=l+o?r="end":r="start"),r==="start"?t=t:r==="end"?t=t-o:r==="center"&&(t=t-o/2);const i=this.options.horizontal?"scrollWidth":"scrollHeight",a=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-o;return Math.max(Math.min(a,t),0)},this.getOffsetForIndex=(t,r="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const o=this.getMeasurements()[t];if(!o)return;const l=this.getSize(),i=this.getScrollOffset();if(r==="auto")if(o.end>=i+l-this.options.scrollPaddingEnd)r="end";else if(o.start<=i+this.options.scrollPaddingStart)r="start";else return[i,r];const s=r==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,r),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(t,{align:r="start",behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(t,r),{adjustments:void 0,behavior:o})},this.scrollToIndex=(t,{align:r="auto",behavior:o}={})=>{t=Math.max(0,Math.min(t,this.options.count-1)),this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const l=this.getOffsetForIndex(t,r);if(!l)return;const[i,s]=l;this._scrollToOffset(i,{adjustments:void 0,behavior:o}),o!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(t))){const[d]=Ot(this.getOffsetForIndex(t,s));kr(d,this.getScrollOffset())||this.scrollToIndex(t,{align:s,behavior:o})}else this.scrollToIndex(t,{align:s,behavior:o})}))},this.scrollBy=(t,{behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+t,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var t;const r=this.getMeasurements();let o;return r.length===0?o=this.options.paddingStart:o=this.options.lanes===1?((t=r[r.length-1])==null?void 0:t.end)??0:Math.max(...r.slice(-this.options.lanes).map(l=>l.end)),o-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(t,{adjustments:r,behavior:o})=>{this.options.scrollToFn(t,{behavior:o,adjustments:r},this)},this.measure=()=>{var t,r;this.itemSizeCache=new Map,(r=(t=this.options).onChange)==null||r.call(t,this,!1)},this.setOptions(n)}}const pn=(e,n,t,r)=>{for(;e<=n;){const o=(e+n)/2|0,l=t(o);if(l<r)e=o+1;else if(l>r)n=o-1;else return o}return e>0?e-1:0};function zr({measurements:e,outerSize:n,scrollOffset:t}){const r=e.length-1,l=pn(0,r,s=>e[s].start,t);let i=l;for(;i<r&&e[i].end<t+n;)i++;return{startIndex:l,endIndex:i}}const Wr=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Ur(e){const n=E.useReducer(()=>({}),{})[1],t={...e,onChange:(o,l)=>{var i;l?St.flushSync(n):n(),(i=e.onChange)==null||i.call(e,o,l)}},[r]=E.useState(()=>new Br(t));return r.setOptions(t),E.useEffect(()=>r._didMount(),[]),Wr(()=>r._willUpdate()),r}function Hr(e){return Ur({observeElementRect:Ar,observeElementOffset:Lr,scrollToFn:Rr,...e})}var Vr=Object.defineProperty,Yr=(e,n,t)=>n in e?Vr(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,jt=(e,n,t)=>(Yr(e,typeof n!="symbol"?n+"":n,t),t);let qr=class{constructor(){jt(this,"current",this.detect()),jt(this,"handoffState","pending"),jt(this,"currentId",0)}set(n){this.current!==n&&(this.handoffState="pending",this.currentId=0,this.current=n)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Oe=new qr,X=(e,n)=>{Oe.isServer?u.useEffect(e,n):u.useLayoutEffect(e,n)};function Se(e){let n=u.useRef(e);return X(()=>{n.current=e},[e]),n}function Nt(e,n){let[t,r]=u.useState(e),o=Se(e);return X(()=>r(o.current),[o,r,...n]),t}let N=function(e){let n=Se(e);return u.useCallback((...t)=>n.current(...t),[n])};function hn(e,n,t){let[r,o]=u.useState(t),l=e!==void 0,i=u.useRef(l),s=u.useRef(!1),a=u.useRef(!1);return l&&!i.current&&!s.current?(s.current=!0,i.current=l,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!l&&i.current&&!a.current&&(a.current=!0,i.current=l,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[l?e:r,N(d=>(l||o(d),n==null?void 0:n(d)))]}function at(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(n=>setTimeout(()=>{throw n}))}function ye(){let e=[],n={addEventListener(t,r,o,l){return t.addEventListener(r,o,l),n.add(()=>t.removeEventListener(r,o,l))},requestAnimationFrame(...t){let r=requestAnimationFrame(...t);return n.add(()=>cancelAnimationFrame(r))},nextFrame(...t){return n.requestAnimationFrame(()=>n.requestAnimationFrame(...t))},setTimeout(...t){let r=setTimeout(...t);return n.add(()=>clearTimeout(r))},microTask(...t){let r={current:!0};return at(()=>{r.current&&t[0]()}),n.add(()=>{r.current=!1})},style(t,r,o){let l=t.style.getPropertyValue(r);return Object.assign(t.style,{[r]:o}),this.add(()=>{Object.assign(t.style,{[r]:l})})},group(t){let r=ye();return t(r),this.add(()=>r.dispose())},add(t){return e.push(t),()=>{let r=e.indexOf(t);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let t of e.splice(0))t()}};return n}function je(){let[e]=u.useState(ye);return u.useEffect(()=>()=>e.dispose(),[e]),e}function Gr(){let e=typeof document>"u";return"useSyncExternalStore"in E?(n=>n.useSyncExternalStore)(E)(()=>()=>{},()=>!1,()=>!e):!1}function We(){let e=Gr(),[n,t]=E.useState(Oe.isHandoffComplete);return n&&Oe.isHandoffComplete===!1&&t(!1),E.useEffect(()=>{n!==!0&&t(!0)},[n]),E.useEffect(()=>Oe.handoff(),[]),e?!1:n}var vn;let xe=(vn=u.useId)!=null?vn:function(){let e=We(),[n,t]=u.useState(e?()=>Oe.nextId():null);return X(()=>{n===null&&t(Oe.nextId())},[n]),n!=null?""+n:void 0};function ce(e,n,...t){if(e in n){let o=n[e];return typeof o=="function"?o(...t):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(n).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,ce),r}function ut(e){return Oe.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let Ft=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Ne=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Ne||{}),gn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(gn||{}),Zr=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Zr||{});function bn(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Ft)).sort((n,t)=>Math.sign((n.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var It=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(It||{});function kt(e,n=0){var t;return e===((t=ut(e))==null?void 0:t.body)?!1:ce(n,{0(){return e.matches(Ft)},1(){let r=e;for(;r!==null;){if(r.matches(Ft))return!0;r=r.parentElement}return!1}})}function xn(e){let n=ut(e);ye().nextFrame(()=>{n&&!kt(n.activeElement,0)&&$e(e)})}var Kr=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Kr||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function $e(e){e==null||e.focus({preventScroll:!0})}let Jr=["textarea","input"].join(",");function Qr(e){var n,t;return(t=(n=e==null?void 0:e.matches)==null?void 0:n.call(e,Jr))!=null?t:!1}function $t(e,n=t=>t){return e.slice().sort((t,r)=>{let o=n(t),l=n(r);if(o===null||l===null)return 0;let i=o.compareDocumentPosition(l);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Xr(e,n){return Ze(bn(),n,{relativeTo:e})}function Ze(e,n,{sorted:t=!0,relativeTo:r=null,skipElements:o=[]}={}){let l=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,i=Array.isArray(e)?t?$t(e):e:bn(e);o.length>0&&i.length>1&&(i=i.filter(p=>!o.includes(p))),r=r??l.activeElement;let s=(()=>{if(n&5)return 1;if(n&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),a=(()=>{if(n&1)return 0;if(n&2)return Math.max(0,i.indexOf(r))-1;if(n&4)return Math.max(0,i.indexOf(r))+1;if(n&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=n&32?{preventScroll:!0}:{},c=0,h=i.length,b;do{if(c>=h||c+h<=0)return 0;let p=a+c;if(n&16)p=(p+h)%h;else{if(p<0)return 3;if(p>=h)return 1}b=i[p],b==null||b.focus(d),c+=s}while(b!==l.activeElement);return n&6&&Qr(b)&&b.select(),2}function wn(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function eo(){return/Android/gi.test(window.navigator.userAgent)}function yn(){return wn()||eo()}function ct(e,n,t){let r=Se(n);u.useEffect(()=>{function o(l){r.current(l)}return document.addEventListener(e,o,t),()=>document.removeEventListener(e,o,t)},[e,t])}function En(e,n,t){let r=Se(n);u.useEffect(()=>{function o(l){r.current(l)}return window.addEventListener(e,o,t),()=>window.removeEventListener(e,o,t)},[e,t])}function Pt(e,n,t=!0){let r=u.useRef(!1);u.useEffect(()=>{requestAnimationFrame(()=>{r.current=t})},[t]);function o(i,s){if(!r.current||i.defaultPrevented)return;let a=s(i);if(a===null||!a.getRootNode().contains(a)||!a.isConnected)return;let d=function c(h){return typeof h=="function"?c(h()):Array.isArray(h)||h instanceof Set?h:[h]}(e);for(let c of d){if(c===null)continue;let h=c instanceof HTMLElement?c:c.current;if(h!=null&&h.contains(a)||i.composed&&i.composedPath().includes(h))return}return!kt(a,It.Loose)&&a.tabIndex!==-1&&i.preventDefault(),n(i,a)}let l=u.useRef(null);ct("pointerdown",i=>{var s,a;r.current&&(l.current=((a=(s=i.composedPath)==null?void 0:s.call(i))==null?void 0:a[0])||i.target)},!0),ct("mousedown",i=>{var s,a;r.current&&(l.current=((a=(s=i.composedPath)==null?void 0:s.call(i))==null?void 0:a[0])||i.target)},!0),ct("click",i=>{yn()||l.current&&(o(i,()=>l.current),l.current=null)},!0),ct("touchend",i=>o(i,()=>i.target instanceof HTMLElement?i.target:null),!0),En("blur",i=>o(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Le(...e){return u.useMemo(()=>ut(...e),[...e])}function Sn(e){var n;if(e.type)return e.type;let t=(n=e.as)!=null?n:"button";if(typeof t=="string"&&t.toLowerCase()==="button")return"button"}function Mt(e,n){let[t,r]=u.useState(()=>Sn(e));return X(()=>{r(Sn(e))},[e.type,e.as]),X(()=>{t||n.current&&n.current instanceof HTMLButtonElement&&!n.current.hasAttribute("type")&&r("button")},[t,n]),t}let Tn=Symbol();function to(e,n=!0){return Object.assign(e,{[Tn]:n})}function me(...e){let n=u.useRef(e);u.useEffect(()=>{n.current=e},[e]);let t=N(r=>{for(let o of n.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[Tn]))?void 0:t}function Cn(e){return[e.screenX,e.screenY]}function On(){let e=u.useRef([-1,-1]);return{wasMoved(n){let t=Cn(n);return e.current[0]===t[0]&&e.current[1]===t[1]?!1:(e.current=t,!0)},update(n){e.current=Cn(n)}}}function jn({container:e,accept:n,walk:t,enabled:r=!0}){let o=u.useRef(n),l=u.useRef(t);u.useEffect(()=>{o.current=n,l.current=t},[n,t]),X(()=>{if(!e||!r)return;let i=ut(e);if(!i)return;let s=o.current,a=l.current,d=Object.assign(h=>s(h),{acceptNode:s}),c=i.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,d,!1);for(;c.nextNode();)a(c.currentNode)},[e,r,o,l])}function Ke(e,n){let t=u.useRef([]),r=N(e);u.useEffect(()=>{let o=[...t.current];for(let[l,i]of n.entries())if(t.current[l]!==i){let s=r(n,o);return t.current=n,s}},[r,...n])}function dt(...e){return Array.from(new Set(e.flatMap(n=>typeof n=="string"?n.split(" "):[]))).filter(Boolean).join(" ")}var Pe=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Pe||{}),Me=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Me||{});function ae({ourProps:e,theirProps:n,slot:t,defaultTag:r,features:o,visible:l=!0,name:i,mergeRefs:s}){s=s??no;let a=Nn(n,e);if(l)return ft(a,t,r,i,s);let d=o??0;if(d&2){let{static:c=!1,...h}=a;if(c)return ft(h,t,r,i,s)}if(d&1){let{unmount:c=!0,...h}=a;return ce(c?0:1,{0(){return null},1(){return ft({...h,hidden:!0,style:{display:"none"}},t,r,i,s)}})}return ft(a,t,r,i,s)}function ft(e,n={},t,r,o){let{as:l=t,children:i,refName:s="ref",...a}=At(e,["unmount","static"]),d=e.ref!==void 0?{[s]:e.ref}:{},c=typeof i=="function"?i(n):i;"className"in a&&a.className&&typeof a.className=="function"&&(a.className=a.className(n));let h={};if(n){let b=!1,p=[];for(let[g,x]of Object.entries(n))typeof x=="boolean"&&(b=!0),x===!0&&p.push(g);b&&(h["data-headlessui-state"]=p.join(" "))}if(l===u.Fragment&&Object.keys(mt(a)).length>0){if(!u.isValidElement(c)||Array.isArray(c)&&c.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(a).map(x=>` - ${x}`).join(`
|
|
28
|
+
color: hsl(${Math.max(0,Math.min(120-120*x,120))}deg 100% 31%);`,t==null?void 0:t.key)}return(a=t==null?void 0:t.onChange)==null||a.call(t,o),o}}function Ot(e,n){if(e===void 0)throw new Error("Unexpected undefined");return e}const kr=(e,n)=>Math.abs(e-n)<1,$r=(e,n,t)=>{let r;return function(...o){e.clearTimeout(r),r=e.setTimeout(()=>n.apply(this,o),t)}},Pr=e=>e,Mr=e=>{const n=Math.max(e.startIndex-e.overscan,0),t=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let o=n;o<=t;o++)r.push(o);return r},Ar=(e,n)=>{const t=e.scrollElement;if(!t)return;const r=e.targetWindow;if(!r)return;const o=l=>{const{width:s,height:a}=l;n({width:Math.round(s),height:Math.round(a)})};if(o(t.getBoundingClientRect()),!r.ResizeObserver)return()=>{};const i=new r.ResizeObserver(l=>{const s=l[0];if(s!=null&&s.borderBoxSize){const a=s.borderBoxSize[0];if(a){o({width:a.inlineSize,height:a.blockSize});return}}o(t.getBoundingClientRect())});return i.observe(t,{box:"border-box"}),()=>{i.unobserve(t)}},mn={passive:!0},Dr=typeof window>"u"?!0:"onscrollend"in window,_r=(e,n)=>{const t=e.scrollElement;if(!t)return;const r=e.targetWindow;if(!r)return;let o=0;const i=Dr?()=>{}:$r(r,()=>{n(o,!1)},e.options.isScrollingResetDelay),l=d=>()=>{o=t[e.options.horizontal?"scrollLeft":"scrollTop"],i(),n(o,d)},s=l(!0),a=l(!1);return a(),t.addEventListener("scroll",s,mn),t.addEventListener("scrollend",a,mn),()=>{t.removeEventListener("scroll",s),t.removeEventListener("scrollend",a)}},Lr=(e,n,t)=>{if(n!=null&&n.borderBoxSize){const r=n.borderBoxSize[0];if(r)return Math.round(r[t.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[t.options.horizontal?"width":"height"])},Rr=(e,{adjustments:n=0,behavior:t},r)=>{var o,i;const l=e+n;(i=(o=r.scrollElement)==null?void 0:o.scrollTo)==null||i.call(o,{[r.options.horizontal?"left":"top"]:l,behavior:t})};class Br{constructor(n){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let t=null;const r=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(o=>{o.forEach(i=>{this._measureElement(i.target,i)})}));return{disconnect:()=>{var o;return(o=r())==null?void 0:o.disconnect()},observe:o=>{var i;return(i=r())==null?void 0:i.observe(o,{box:"border-box"})},unobserve:o=>{var i;return(i=r())==null?void 0:i.unobserve(o)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([r,o])=>{typeof o>"u"&&delete t[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Pr,rangeExtractor:Mr,onChange:()=>{},measureElement:Lr,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...t}},this.notify=(t,r)=>{var o,i;const{startIndex:l,endIndex:s}=this.range??{startIndex:void 0,endIndex:void 0},a=this.calculateRange();(t||l!==(a==null?void 0:a.startIndex)||s!==(a==null?void 0:a.endIndex))&&((i=(o=this.options).onChange)==null||i.call(o,this,r))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.notify(!1,!1);return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(o,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o;const l=this.isScrolling;this.isScrolling=i,this.notify(l!==i,i)}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(t,r)=>{const o=new Map,i=new Map;for(let l=r-1;l>=0;l--){const s=t[l];if(o.has(s.lane))continue;const a=i.get(s.lane);if(a==null||s.end>a.end?i.set(s.lane,s):s.end<a.end&&o.set(s.lane,!0),o.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((l,s)=>l.end===s.end?l.index-s.index:l.end-s.end)[0]:void 0},this.getMeasurementOptions=Ge(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(t,r,o,i,l)=>(this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:r,scrollMargin:o,getItemKey:i,enabled:l}),{key:!1}),this.getMeasurements=Ge(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:r,scrollMargin:o,getItemKey:i,enabled:l},s)=>{var a;if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(h=>{this.itemSizeCache.set(h.key,h.size)}));const d=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,d);for(let h=d;h<t;h++){let b=(a=this.measurementsCache[h])==null?void 0:a.measureElement;b||(b=I=>{const k=i(h),A=this.elementsCache.get(k);if(!I){A&&(this.observer.unobserve(A),this.elementsCache.delete(k));return}A!==I&&(A&&this.observer.unobserve(A),this.observer.observe(I),this.elementsCache.set(k,I)),I.isConnected&&this.resizeItem(h,this.options.measureElement(I,void 0,this))});const p=i(h),g=this.options.lanes===1?c[h-1]:this.getFurthestMeasurement(c,h),x=g?g.end+this.options.gap:r+o,v=s.get(p),y=typeof v=="number"?v:this.options.estimateSize(h),w=x+y,O=g?g.lane:h%this.options.lanes;c[h]={index:h,start:x,size:y,end:w,key:p,lane:O,measureElement:b}}return this.measurementsCache=c,c},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Ge(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(t,r,o)=>this.range=t.length>0&&r>0?zr({measurements:t,outerSize:r,scrollOffset:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=Ge(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(t,r,o,i)=>r===null?[]:t({startIndex:r.startIndex,endIndex:r.endIndex,overscan:o,count:i}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=t=>{const r=this.options.indexAttribute,o=t.getAttribute(r);return o?parseInt(o,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(t,r)=>{const o=this.indexFromElement(t),i=this.getMeasurements()[o];if(!i||!t.isConnected){this.elementsCache.forEach((s,a)=>{s===t&&(this.observer.unobserve(t),this.elementsCache.delete(a))});return}const l=this.elementsCache.get(i.key);l!==t&&(l&&this.observer.unobserve(l),this.observer.observe(t),this.elementsCache.set(i.key,t)),this.resizeItem(o,this.options.measureElement(t,r,this))},this.resizeItem=(t,r)=>{const o=this.getMeasurements()[t];if(!o)return;const i=this.itemSizeCache.get(o.key)??o.size,l=r-i;l!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,l,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",l),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=l,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,r)),this.notify(!0,!1))},this.measureElement=t=>{t&&this._measureElement(t,void 0)},this.getVirtualItems=Ge(()=>[this.getIndexes(),this.getMeasurements()],(t,r)=>{const o=[];for(let i=0,l=t.length;i<l;i++){const s=t[i],a=r[s];o.push(a)}return o},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const r=this.getMeasurements();if(r.length!==0)return Ot(r[pn(0,r.length-1,o=>Ot(r[o]).start,t)])},this.getOffsetForAlignment=(t,r)=>{const o=this.getSize(),i=this.getScrollOffset();r==="auto"&&(t<=i?r="start":t>=i+o?r="end":r="start"),r==="start"?t=t:r==="end"?t=t-o:r==="center"&&(t=t-o/2);const l=this.options.horizontal?"scrollWidth":"scrollHeight",a=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[l]:this.scrollElement[l]:0)-o;return Math.max(Math.min(a,t),0)},this.getOffsetForIndex=(t,r="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const o=this.getMeasurements()[t];if(!o)return;const i=this.getSize(),l=this.getScrollOffset();if(r==="auto")if(o.end>=l+i-this.options.scrollPaddingEnd)r="end";else if(o.start<=l+this.options.scrollPaddingStart)r="start";else return[l,r];const s=r==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,r),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(t,{align:r="start",behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(t,r),{adjustments:void 0,behavior:o})},this.scrollToIndex=(t,{align:r="auto",behavior:o}={})=>{t=Math.max(0,Math.min(t,this.options.count-1)),this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const i=this.getOffsetForIndex(t,r);if(!i)return;const[l,s]=i;this._scrollToOffset(l,{adjustments:void 0,behavior:o}),o!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(t))){const[d]=Ot(this.getOffsetForIndex(t,s));kr(d,this.getScrollOffset())||this.scrollToIndex(t,{align:s,behavior:o})}else this.scrollToIndex(t,{align:s,behavior:o})}))},this.scrollBy=(t,{behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+t,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var t;const r=this.getMeasurements();let o;return r.length===0?o=this.options.paddingStart:o=this.options.lanes===1?((t=r[r.length-1])==null?void 0:t.end)??0:Math.max(...r.slice(-this.options.lanes).map(i=>i.end)),o-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(t,{adjustments:r,behavior:o})=>{this.options.scrollToFn(t,{behavior:o,adjustments:r},this)},this.measure=()=>{var t,r;this.itemSizeCache=new Map,(r=(t=this.options).onChange)==null||r.call(t,this,!1)},this.setOptions(n)}}const pn=(e,n,t,r)=>{for(;e<=n;){const o=(e+n)/2|0,i=t(o);if(i<r)e=o+1;else if(i>r)n=o-1;else return o}return e>0?e-1:0};function zr({measurements:e,outerSize:n,scrollOffset:t}){const r=e.length-1,i=pn(0,r,s=>e[s].start,t);let l=i;for(;l<r&&e[l].end<t+n;)l++;return{startIndex:i,endIndex:l}}const Wr=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Ur(e){const n=E.useReducer(()=>({}),{})[1],t={...e,onChange:(o,i)=>{var l;i?St.flushSync(n):n(),(l=e.onChange)==null||l.call(e,o,i)}},[r]=E.useState(()=>new Br(t));return r.setOptions(t),E.useEffect(()=>r._didMount(),[]),Wr(()=>r._willUpdate()),r}function Hr(e){return Ur({observeElementRect:Ar,observeElementOffset:_r,scrollToFn:Rr,...e})}var Vr=Object.defineProperty,Yr=(e,n,t)=>n in e?Vr(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,jt=(e,n,t)=>(Yr(e,typeof n!="symbol"?n+"":n,t),t);let qr=class{constructor(){jt(this,"current",this.detect()),jt(this,"handoffState","pending"),jt(this,"currentId",0)}set(n){this.current!==n&&(this.handoffState="pending",this.currentId=0,this.current=n)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Oe=new qr,X=(e,n)=>{Oe.isServer?u.useEffect(e,n):u.useLayoutEffect(e,n)};function Se(e){let n=u.useRef(e);return X(()=>{n.current=e},[e]),n}function Nt(e,n){let[t,r]=u.useState(e),o=Se(e);return X(()=>r(o.current),[o,r,...n]),t}let N=function(e){let n=Se(e);return u.useCallback((...t)=>n.current(...t),[n])};function hn(e,n,t){let[r,o]=u.useState(t),i=e!==void 0,l=u.useRef(i),s=u.useRef(!1),a=u.useRef(!1);return i&&!l.current&&!s.current?(s.current=!0,l.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!i&&l.current&&!a.current&&(a.current=!0,l.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[i?e:r,N(d=>(i||o(d),n==null?void 0:n(d)))]}function at(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(n=>setTimeout(()=>{throw n}))}function ye(){let e=[],n={addEventListener(t,r,o,i){return t.addEventListener(r,o,i),n.add(()=>t.removeEventListener(r,o,i))},requestAnimationFrame(...t){let r=requestAnimationFrame(...t);return n.add(()=>cancelAnimationFrame(r))},nextFrame(...t){return n.requestAnimationFrame(()=>n.requestAnimationFrame(...t))},setTimeout(...t){let r=setTimeout(...t);return n.add(()=>clearTimeout(r))},microTask(...t){let r={current:!0};return at(()=>{r.current&&t[0]()}),n.add(()=>{r.current=!1})},style(t,r,o){let i=t.style.getPropertyValue(r);return Object.assign(t.style,{[r]:o}),this.add(()=>{Object.assign(t.style,{[r]:i})})},group(t){let r=ye();return t(r),this.add(()=>r.dispose())},add(t){return e.push(t),()=>{let r=e.indexOf(t);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let t of e.splice(0))t()}};return n}function je(){let[e]=u.useState(ye);return u.useEffect(()=>()=>e.dispose(),[e]),e}function Gr(){let e=typeof document>"u";return"useSyncExternalStore"in E?(n=>n.useSyncExternalStore)(E)(()=>()=>{},()=>!1,()=>!e):!1}function We(){let e=Gr(),[n,t]=E.useState(Oe.isHandoffComplete);return n&&Oe.isHandoffComplete===!1&&t(!1),E.useEffect(()=>{n!==!0&&t(!0)},[n]),E.useEffect(()=>Oe.handoff(),[]),e?!1:n}var vn;let xe=(vn=u.useId)!=null?vn:function(){let e=We(),[n,t]=u.useState(e?()=>Oe.nextId():null);return X(()=>{n===null&&t(Oe.nextId())},[n]),n!=null?""+n:void 0};function ce(e,n,...t){if(e in n){let o=n[e];return typeof o=="function"?o(...t):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(n).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,ce),r}function ut(e){return Oe.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let Ft=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Ne=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Ne||{}),gn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(gn||{}),Zr=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Zr||{});function bn(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Ft)).sort((n,t)=>Math.sign((n.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var It=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(It||{});function kt(e,n=0){var t;return e===((t=ut(e))==null?void 0:t.body)?!1:ce(n,{0(){return e.matches(Ft)},1(){let r=e;for(;r!==null;){if(r.matches(Ft))return!0;r=r.parentElement}return!1}})}function xn(e){let n=ut(e);ye().nextFrame(()=>{n&&!kt(n.activeElement,0)&&$e(e)})}var Kr=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Kr||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function $e(e){e==null||e.focus({preventScroll:!0})}let Jr=["textarea","input"].join(",");function Qr(e){var n,t;return(t=(n=e==null?void 0:e.matches)==null?void 0:n.call(e,Jr))!=null?t:!1}function $t(e,n=t=>t){return e.slice().sort((t,r)=>{let o=n(t),i=n(r);if(o===null||i===null)return 0;let l=o.compareDocumentPosition(i);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Xr(e,n){return Ze(bn(),n,{relativeTo:e})}function Ze(e,n,{sorted:t=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,l=Array.isArray(e)?t?$t(e):e:bn(e);o.length>0&&l.length>1&&(l=l.filter(p=>!o.includes(p))),r=r??i.activeElement;let s=(()=>{if(n&5)return 1;if(n&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),a=(()=>{if(n&1)return 0;if(n&2)return Math.max(0,l.indexOf(r))-1;if(n&4)return Math.max(0,l.indexOf(r))+1;if(n&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=n&32?{preventScroll:!0}:{},c=0,h=l.length,b;do{if(c>=h||c+h<=0)return 0;let p=a+c;if(n&16)p=(p+h)%h;else{if(p<0)return 3;if(p>=h)return 1}b=l[p],b==null||b.focus(d),c+=s}while(b!==i.activeElement);return n&6&&Qr(b)&&b.select(),2}function wn(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function eo(){return/Android/gi.test(window.navigator.userAgent)}function yn(){return wn()||eo()}function ct(e,n,t){let r=Se(n);u.useEffect(()=>{function o(i){r.current(i)}return document.addEventListener(e,o,t),()=>document.removeEventListener(e,o,t)},[e,t])}function En(e,n,t){let r=Se(n);u.useEffect(()=>{function o(i){r.current(i)}return window.addEventListener(e,o,t),()=>window.removeEventListener(e,o,t)},[e,t])}function Pt(e,n,t=!0){let r=u.useRef(!1);u.useEffect(()=>{requestAnimationFrame(()=>{r.current=t})},[t]);function o(l,s){if(!r.current||l.defaultPrevented)return;let a=s(l);if(a===null||!a.getRootNode().contains(a)||!a.isConnected)return;let d=function c(h){return typeof h=="function"?c(h()):Array.isArray(h)||h instanceof Set?h:[h]}(e);for(let c of d){if(c===null)continue;let h=c instanceof HTMLElement?c:c.current;if(h!=null&&h.contains(a)||l.composed&&l.composedPath().includes(h))return}return!kt(a,It.Loose)&&a.tabIndex!==-1&&l.preventDefault(),n(l,a)}let i=u.useRef(null);ct("pointerdown",l=>{var s,a;r.current&&(i.current=((a=(s=l.composedPath)==null?void 0:s.call(l))==null?void 0:a[0])||l.target)},!0),ct("mousedown",l=>{var s,a;r.current&&(i.current=((a=(s=l.composedPath)==null?void 0:s.call(l))==null?void 0:a[0])||l.target)},!0),ct("click",l=>{yn()||i.current&&(o(l,()=>i.current),i.current=null)},!0),ct("touchend",l=>o(l,()=>l.target instanceof HTMLElement?l.target:null),!0),En("blur",l=>o(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function _e(...e){return u.useMemo(()=>ut(...e),[...e])}function Sn(e){var n;if(e.type)return e.type;let t=(n=e.as)!=null?n:"button";if(typeof t=="string"&&t.toLowerCase()==="button")return"button"}function Mt(e,n){let[t,r]=u.useState(()=>Sn(e));return X(()=>{r(Sn(e))},[e.type,e.as]),X(()=>{t||n.current&&n.current instanceof HTMLButtonElement&&!n.current.hasAttribute("type")&&r("button")},[t,n]),t}let Tn=Symbol();function to(e,n=!0){return Object.assign(e,{[Tn]:n})}function me(...e){let n=u.useRef(e);u.useEffect(()=>{n.current=e},[e]);let t=N(r=>{for(let o of n.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[Tn]))?void 0:t}function Cn(e){return[e.screenX,e.screenY]}function On(){let e=u.useRef([-1,-1]);return{wasMoved(n){let t=Cn(n);return e.current[0]===t[0]&&e.current[1]===t[1]?!1:(e.current=t,!0)},update(n){e.current=Cn(n)}}}function jn({container:e,accept:n,walk:t,enabled:r=!0}){let o=u.useRef(n),i=u.useRef(t);u.useEffect(()=>{o.current=n,i.current=t},[n,t]),X(()=>{if(!e||!r)return;let l=ut(e);if(!l)return;let s=o.current,a=i.current,d=Object.assign(h=>s(h),{acceptNode:s}),c=l.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,d,!1);for(;c.nextNode();)a(c.currentNode)},[e,r,o,i])}function Ke(e,n){let t=u.useRef([]),r=N(e);u.useEffect(()=>{let o=[...t.current];for(let[i,l]of n.entries())if(t.current[i]!==l){let s=r(n,o);return t.current=n,s}},[r,...n])}function dt(...e){return Array.from(new Set(e.flatMap(n=>typeof n=="string"?n.split(" "):[]))).filter(Boolean).join(" ")}var Pe=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Pe||{}),Me=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Me||{});function ae({ourProps:e,theirProps:n,slot:t,defaultTag:r,features:o,visible:i=!0,name:l,mergeRefs:s}){s=s??no;let a=Nn(n,e);if(i)return ft(a,t,r,l,s);let d=o??0;if(d&2){let{static:c=!1,...h}=a;if(c)return ft(h,t,r,l,s)}if(d&1){let{unmount:c=!0,...h}=a;return ce(c?0:1,{0(){return null},1(){return ft({...h,hidden:!0,style:{display:"none"}},t,r,l,s)}})}return ft(a,t,r,l,s)}function ft(e,n={},t,r,o){let{as:i=t,children:l,refName:s="ref",...a}=At(e,["unmount","static"]),d=e.ref!==void 0?{[s]:e.ref}:{},c=typeof l=="function"?l(n):l;"className"in a&&a.className&&typeof a.className=="function"&&(a.className=a.className(n));let h={};if(n){let b=!1,p=[];for(let[g,x]of Object.entries(n))typeof x=="boolean"&&(b=!0),x===!0&&p.push(g);b&&(h["data-headlessui-state"]=p.join(" "))}if(i===u.Fragment&&Object.keys(mt(a)).length>0){if(!u.isValidElement(c)||Array.isArray(c)&&c.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(a).map(x=>` - ${x}`).join(`
|
|
29
29
|
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(x=>` - ${x}`).join(`
|
|
30
30
|
`)].join(`
|
|
31
|
-
`));let b=c.props,p=typeof(b==null?void 0:b.className)=="function"?(...x)=>dt(b==null?void 0:b.className(...x),a.className):dt(b==null?void 0:b.className,a.className),g=p?{className:p}:{};return u.cloneElement(c,Object.assign({},Nn(c.props,mt(At(a,["ref"]))),h,d,{ref:o(c.ref,d.ref)},g))}return u.createElement(l,Object.assign({},At(a,["ref"]),l!==u.Fragment&&d,l!==u.Fragment&&h),c)}function no(...e){return e.every(n=>n==null)?void 0:n=>{for(let t of e)t!=null&&(typeof t=="function"?t(n):t.current=n)}}function Nn(...e){if(e.length===0)return{};if(e.length===1)return e[0];let n={},t={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(t[o]!=null||(t[o]=[]),t[o].push(r[o])):n[o]=r[o];if(n.disabled||n["aria-disabled"])return Object.assign(n,Object.fromEntries(Object.keys(t).map(r=>[r,void 0])));for(let r in t)Object.assign(n,{[r](o,...l){let i=t[r];for(let s of i){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;s(o,...l)}}});return n}function ue(e){var n;return Object.assign(u.forwardRef(e),{displayName:(n=e.displayName)!=null?n:e.name})}function mt(e){let n=Object.assign({},e);for(let t in n)n[t]===void 0&&delete n[t];return n}function At(e,n=[]){let t=Object.assign({},e);for(let r of n)r in t&&delete t[r];return t}let ro="div";var Ue=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Ue||{});function oo(e,n){var t;let{features:r=1,...o}=e,l={ref:n,"aria-hidden":(r&2)===2?!0:(t=o["aria-hidden"])!=null?t:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return ae({ourProps:l,theirProps:o,slot:{},defaultTag:ro,name:"Hidden"})}let Je=ue(oo),Dt=u.createContext(null);Dt.displayName="OpenClosedContext";var pe=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(pe||{});function Qe(){return u.useContext(Dt)}function Lt({value:e,children:n}){return u.createElement(Dt.Provider,{value:e},n)}function lo(e){function n(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",n))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",n),n())}let Te=[];lo(()=>{function e(n){n.target instanceof HTMLElement&&n.target!==document.body&&Te[0]!==n.target&&(Te.unshift(n.target),Te=Te.filter(t=>t!=null&&t.isConnected),Te.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function pt(e){let n=e.parentElement,t=null;for(;n&&!(n instanceof HTMLFieldSetElement);)n instanceof HTMLLegendElement&&(t=n),n=n.parentElement;let r=(n==null?void 0:n.getAttribute("disabled"))==="";return r&&io(t)?!1:r}function io(e){if(!e)return!1;let n=e.previousElementSibling;for(;n!==null;){if(n instanceof HTMLLegendElement)return!1;n=n.previousElementSibling}return!0}function so(e){throw new Error("Unexpected object: "+e)}var ee=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(ee||{});function _t(e,n){let t=n.resolveItems();if(t.length<=0)return null;let r=n.resolveActiveIndex(),o=r??-1;switch(e.focus){case 0:{for(let l=0;l<t.length;++l)if(!n.resolveDisabled(t[l],l,t))return l;return r}case 1:{for(let l=o-1;l>=0;--l)if(!n.resolveDisabled(t[l],l,t))return l;return r}case 2:{for(let l=o+1;l<t.length;++l)if(!n.resolveDisabled(t[l],l,t))return l;return r}case 3:{for(let l=t.length-1;l>=0;--l)if(!n.resolveDisabled(t[l],l,t))return l;return r}case 4:{for(let l=0;l<t.length;++l)if(n.resolveId(t[l],l,t)===e.id)return l;return r}case 5:return null;default:so(e)}}function Fn(e={},n=null,t=[]){for(let[r,o]of Object.entries(e))kn(t,In(n,r),o);return t}function In(e,n){return e?e+"["+n+"]":n}function kn(e,n,t){if(Array.isArray(t))for(let[r,o]of t.entries())kn(e,In(n,r.toString()),o);else t instanceof Date?e.push([n,t.toISOString()]):typeof t=="boolean"?e.push([n,t?"1":"0"]):typeof t=="string"?e.push([n,t]):typeof t=="number"?e.push([n,`${t}`]):t==null?e.push([n,""]):Fn(t,n,e)}function ao(e){var n,t;let r=(n=e==null?void 0:e.form)!=null?n:e.closest("form");if(r){for(let o of r.elements)if(o!==e&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(t=r.requestSubmit)==null||t.call(r)}}var J=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(J||{}),uo=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(uo||{}),co=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(co||{}),fo=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(fo||{}),mo=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.RegisterOption=3]="RegisterOption",e[e.UnregisterOption=4]="UnregisterOption",e[e.RegisterLabel=5]="RegisterLabel",e[e.SetActivationTrigger=6]="SetActivationTrigger",e[e.UpdateVirtualOptions=7]="UpdateVirtualOptions",e))(mo||{});function Rt(e,n=t=>t){let t=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=n(e.options.slice()),o=r.length>0&&r[0].dataRef.current.order!==null?r.sort((i,s)=>i.dataRef.current.order-s.dataRef.current.order):$t(r,i=>i.dataRef.current.domRef.current),l=t?o.indexOf(t):null;return l===-1&&(l=null),{options:o,activeOptionIndex:l}}let po={1(e){var n;return(n=e.dataRef.current)!=null&&n.disabled||e.comboboxState===1?e:{...e,activeOptionIndex:null,comboboxState:1}},0(e){var n,t;if((n=e.dataRef.current)!=null&&n.disabled||e.comboboxState===0)return e;if((t=e.dataRef.current)!=null&&t.value){let r=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(r!==-1)return{...e,activeOptionIndex:r,comboboxState:0}}return{...e,comboboxState:0}},2(e,n){var t,r,o,l,i;if((t=e.dataRef.current)!=null&&t.disabled||(r=e.dataRef.current)!=null&&r.optionsRef.current&&!((o=e.dataRef.current)!=null&&o.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let c=n.focus===ee.Specific?n.idx:_t(n,{resolveItems:()=>e.virtual.options,resolveActiveIndex:()=>{var b,p;return(p=(b=e.activeOptionIndex)!=null?b:e.virtual.options.findIndex(g=>!e.virtual.disabled(g)))!=null?p:null},resolveDisabled:e.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),h=(l=n.trigger)!=null?l:2;return e.activeOptionIndex===c&&e.activationTrigger===h?e:{...e,activeOptionIndex:c,activationTrigger:h}}let s=Rt(e);if(s.activeOptionIndex===null){let c=s.options.findIndex(h=>!h.dataRef.current.disabled);c!==-1&&(s.activeOptionIndex=c)}let a=n.focus===ee.Specific?n.idx:_t(n,{resolveItems:()=>s.options,resolveActiveIndex:()=>s.activeOptionIndex,resolveId:c=>c.id,resolveDisabled:c=>c.dataRef.current.disabled}),d=(i=n.trigger)!=null?i:2;return e.activeOptionIndex===a&&e.activationTrigger===d?e:{...e,...s,activeOptionIndex:a,activationTrigger:d}},3:(e,n)=>{var t,r,o;if((t=e.dataRef.current)!=null&&t.virtual)return{...e,options:[...e.options,n.payload]};let l=n.payload,i=Rt(e,a=>(a.push(l),a));e.activeOptionIndex===null&&(r=e.dataRef.current)!=null&&r.isSelected(n.payload.dataRef.current.value)&&(i.activeOptionIndex=i.options.indexOf(l));let s={...e,...i,activationTrigger:2};return(o=e.dataRef.current)!=null&&o.__demoMode&&e.dataRef.current.value===void 0&&(s.activeOptionIndex=0),s},4:(e,n)=>{var t;if((t=e.dataRef.current)!=null&&t.virtual)return{...e,options:e.options.filter(o=>o.id!==n.id)};let r=Rt(e,o=>{let l=o.findIndex(i=>i.id===n.id);return l!==-1&&o.splice(l,1),o});return{...e,...r,activationTrigger:2}},5:(e,n)=>e.labelId===n.id?e:{...e,labelId:n.id},6:(e,n)=>e.activationTrigger===n.trigger?e:{...e,activationTrigger:n.trigger},7:(e,n)=>{var t;if(((t=e.virtual)==null?void 0:t.options)===n.options)return e;let r=e.activeOptionIndex;if(e.activeOptionIndex!==null){let o=n.options.indexOf(e.virtual.options[e.activeOptionIndex]);o!==-1?r=o:r=null}return{...e,activeOptionIndex:r,virtual:Object.assign({},e.virtual,{options:n.options})}}},Bt=u.createContext(null);Bt.displayName="ComboboxActionsContext";function Xe(e){let n=u.useContext(Bt);if(n===null){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Xe),t}return n}let $n=u.createContext(null);function ho(e){var n;let t=_e("VirtualProvider"),[r,o]=u.useMemo(()=>{let a=t.optionsRef.current;if(!a)return[0,0];let d=window.getComputedStyle(a);return[parseFloat(d.paddingBlockStart||d.paddingTop),parseFloat(d.paddingBlockEnd||d.paddingBottom)]},[t.optionsRef.current]),l=Hr({scrollPaddingStart:r,scrollPaddingEnd:o,count:t.virtual.options.length,estimateSize(){return 40},getScrollElement(){var a;return(a=t.optionsRef.current)!=null?a:null},overscan:12}),[i,s]=u.useState(0);return X(()=>{s(a=>a+1)},[(n=t.virtual)==null?void 0:n.options]),u.createElement($n.Provider,{value:l},u.createElement("div",{style:{position:"relative",width:"100%",height:`${l.getTotalSize()}px`},ref:a=>{if(a){if(typeof process<"u"&&process.env.JEST_WORKER_ID!==void 0||t.activationTrigger===0)return;t.activeOptionIndex!==null&&t.virtual.options.length>t.activeOptionIndex&&l.scrollToIndex(t.activeOptionIndex)}}},l.getVirtualItems().map(a=>{var d;return u.createElement(u.Fragment,{key:a.key},u.cloneElement((d=e.children)==null?void 0:d.call(e,{option:t.virtual.options[a.index],open:t.comboboxState===0}),{key:`${i}-${a.key}`,"data-index":a.index,"aria-setsize":t.virtual.options.length,"aria-posinset":a.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${a.start}px)`,overflowAnchor:"none"}}))})))}let zt=u.createContext(null);zt.displayName="ComboboxDataContext";function _e(e){let n=u.useContext(zt);if(n===null){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,_e),t}return n}function vo(e,n){return ce(n.type,po,e,n)}let go=u.Fragment;function bo(e,n){let{value:t,defaultValue:r,onChange:o,form:l,name:i,by:s=null,disabled:a=!1,__demoMode:d=!1,nullable:c=!1,multiple:h=!1,immediate:b=!1,virtual:p=null,...g}=e,x=!1,v=null,[y=h?[]:void 0,w]=hn(t,o,r),[O,I]=u.useReducer(vo,{dataRef:u.createRef(),comboboxState:d?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),k=u.useRef(!1),A=u.useRef({static:!1,hold:!1}),G=u.useRef(null),U=u.useRef(null),B=u.useRef(null),D=u.useRef(null),L=N(typeof s=="string"?(M,C)=>{let F=s;return(M==null?void 0:M[F])===(C==null?void 0:C[F])}:s??((M,C)=>M===C)),Y=N(M=>O.options.findIndex(C=>L(C.dataRef.current.value,M))),Z=u.useCallback(M=>ce(T.mode,{1:()=>y.some(C=>L(C,M)),0:()=>L(y,M)}),[y]),se=N(M=>O.activeOptionIndex===Y(M)),T=u.useMemo(()=>({...O,immediate:x,optionsPropsRef:A,labelRef:G,inputRef:U,buttonRef:B,optionsRef:D,value:y,defaultValue:r,disabled:a,mode:h?1:0,virtual:O.virtual,get activeOptionIndex(){if(k.current&&O.activeOptionIndex===null&&O.options.length>0){let M=O.options.findIndex(C=>!C.dataRef.current.disabled);if(M!==-1)return M}return O.activeOptionIndex},calculateIndex:Y,compare:L,isSelected:Z,isActive:se,nullable:c,__demoMode:d}),[y,r,a,h,c,d,O,v]);X(()=>{},[v,void 0]),X(()=>{O.dataRef.current=T},[T]),Pt([T.buttonRef,T.inputRef,T.optionsRef],()=>Ce.closeCombobox(),T.comboboxState===0);let te=u.useMemo(()=>{var M,C,F;return{open:T.comboboxState===0,disabled:a,activeIndex:T.activeOptionIndex,activeOption:T.activeOptionIndex===null?null:T.virtual?T.virtual.options[(M=T.activeOptionIndex)!=null?M:0]:(F=(C=T.options[T.activeOptionIndex])==null?void 0:C.dataRef.current.value)!=null?F:null,value:y}},[T,a,y]),q=N(()=>{if(T.activeOptionIndex!==null){if(T.virtual)be(T.virtual.options[T.activeOptionIndex]);else{let{dataRef:M}=T.options[T.activeOptionIndex];be(M.current.value)}Ce.goToOption(ee.Specific,T.activeOptionIndex)}}),P=N(()=>{I({type:0}),k.current=!0}),z=N(()=>{I({type:1}),k.current=!1}),ne=N((M,C,F)=>(k.current=!1,M===ee.Specific?I({type:2,focus:ee.Specific,idx:C,trigger:F}):I({type:2,focus:M,trigger:F}))),re=N((M,C)=>(I({type:3,payload:{id:M,dataRef:C}}),()=>{T.isActive(C.current.value)&&(k.current=!0),I({type:4,id:M})})),he=N(M=>(I({type:5,id:M}),()=>I({type:5,id:null}))),be=N(M=>ce(T.mode,{0(){return w==null?void 0:w(M)},1(){let C=T.value.slice(),F=C.findIndex(W=>L(W,M));return F===-1?C.push(M):C.splice(F,1),w==null?void 0:w(C)}})),fe=N(M=>{I({type:6,trigger:M})}),Ce=u.useMemo(()=>({onChange:be,registerOption:re,registerLabel:he,goToOption:ne,closeCombobox:z,openCombobox:P,setActivationTrigger:fe,selectActiveOption:q}),[]),H=n===null?{}:{ref:n},le=u.useRef(null),oe=je();return u.useEffect(()=>{le.current&&r!==void 0&&oe.addEventListener(le.current,"reset",()=>{w==null||w(r)})},[le,w]),u.createElement(Bt.Provider,{value:Ce},u.createElement(zt.Provider,{value:T},u.createElement(Lt,{value:ce(T.comboboxState,{0:pe.Open,1:pe.Closed})},i!=null&&y!=null&&Fn({[i]:y}).map(([M,C],F)=>u.createElement(Je,{features:Ue.Hidden,ref:F===0?W=>{var de;le.current=(de=W==null?void 0:W.closest("form"))!=null?de:null}:void 0,...mt({key:M,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:l,disabled:a,name:M,value:C})})),ae({ourProps:H,theirProps:g,slot:te,defaultTag:go,name:"Combobox"}))))}let xo="input";function wo(e,n){var t,r,o,l,i;let s=xe(),{id:a=`headlessui-combobox-input-${s}`,onChange:d,displayValue:c,type:h="text",...b}=e,p=_e("Combobox.Input"),g=Xe("Combobox.Input"),x=me(p.inputRef,n),v=Le(p.inputRef),y=u.useRef(!1),w=je(),O=N(()=>{g.onChange(null),p.optionsRef.current&&(p.optionsRef.current.scrollTop=0),g.goToOption(ee.Nothing)}),I=function(){var T;return typeof c=="function"&&p.value!==void 0?(T=c(p.value))!=null?T:"":typeof p.value=="string"?p.value:""}();Ke(([T,te],[q,P])=>{if(y.current)return;let z=p.inputRef.current;z&&((P===0&&te===1||T!==q)&&(z.value=T),requestAnimationFrame(()=>{if(y.current||!z||(v==null?void 0:v.activeElement)!==z)return;let{selectionStart:ne,selectionEnd:re}=z;Math.abs((re??0)-(ne??0))===0&&ne===0&&z.setSelectionRange(z.value.length,z.value.length)}))},[I,p.comboboxState,v]),Ke(([T],[te])=>{if(T===0&&te===1){if(y.current)return;let q=p.inputRef.current;if(!q)return;let P=q.value,{selectionStart:z,selectionEnd:ne,selectionDirection:re}=q;q.value="",q.value=P,re!==null?q.setSelectionRange(z,ne,re):q.setSelectionRange(z,ne)}},[p.comboboxState]);let k=u.useRef(!1),A=N(()=>{k.current=!0}),G=N(()=>{w.nextFrame(()=>{k.current=!1})}),U=N(T=>{switch(y.current=!0,T.key){case J.Enter:if(y.current=!1,p.comboboxState!==0||k.current)return;if(T.preventDefault(),T.stopPropagation(),p.activeOptionIndex===null){g.closeCombobox();return}g.selectActiveOption(),p.mode===0&&g.closeCombobox();break;case J.ArrowDown:return y.current=!1,T.preventDefault(),T.stopPropagation(),ce(p.comboboxState,{0:()=>g.goToOption(ee.Next),1:()=>g.openCombobox()});case J.ArrowUp:return y.current=!1,T.preventDefault(),T.stopPropagation(),ce(p.comboboxState,{0:()=>g.goToOption(ee.Previous),1:()=>{g.openCombobox(),w.nextFrame(()=>{p.value||g.goToOption(ee.Last)})}});case J.Home:if(T.shiftKey)break;return y.current=!1,T.preventDefault(),T.stopPropagation(),g.goToOption(ee.First);case J.PageUp:return y.current=!1,T.preventDefault(),T.stopPropagation(),g.goToOption(ee.First);case J.End:if(T.shiftKey)break;return y.current=!1,T.preventDefault(),T.stopPropagation(),g.goToOption(ee.Last);case J.PageDown:return y.current=!1,T.preventDefault(),T.stopPropagation(),g.goToOption(ee.Last);case J.Escape:return y.current=!1,p.comboboxState!==0?void 0:(T.preventDefault(),p.optionsRef.current&&!p.optionsPropsRef.current.static&&T.stopPropagation(),p.nullable&&p.mode===0&&p.value===null&&O(),g.closeCombobox());case J.Tab:if(y.current=!1,p.comboboxState!==0)return;p.mode===0&&p.activationTrigger!==1&&g.selectActiveOption(),g.closeCombobox();break}}),B=N(T=>{d==null||d(T),p.nullable&&p.mode===0&&T.target.value===""&&O(),g.openCombobox()}),D=N(T=>{var te,q,P;let z=(te=T.relatedTarget)!=null?te:Te.find(ne=>ne!==T.currentTarget);if(y.current=!1,!((q=p.optionsRef.current)!=null&&q.contains(z))&&!((P=p.buttonRef.current)!=null&&P.contains(z))&&p.comboboxState===0)return T.preventDefault(),p.mode===0&&(p.nullable&&p.value===null?O():p.activationTrigger!==1&&g.selectActiveOption()),g.closeCombobox()}),L=N(T=>{var te,q,P;let z=(te=T.relatedTarget)!=null?te:Te.find(ne=>ne!==T.currentTarget);(q=p.buttonRef.current)!=null&&q.contains(z)||(P=p.optionsRef.current)!=null&&P.contains(z)||p.disabled||p.immediate&&p.comboboxState!==0&&(g.openCombobox(),w.nextFrame(()=>{g.setActivationTrigger(1)}))}),Y=Nt(()=>{if(p.labelId)return[p.labelId].join(" ")},[p.labelId]),Z=u.useMemo(()=>({open:p.comboboxState===0,disabled:p.disabled}),[p]),se={ref:x,id:a,role:"combobox",type:h,"aria-controls":(t=p.optionsRef.current)==null?void 0:t.id,"aria-expanded":p.comboboxState===0,"aria-activedescendant":p.activeOptionIndex===null?void 0:p.virtual?(r=p.options.find(T=>{var te;return!((te=p.virtual)!=null&&te.disabled(T.dataRef.current.value))&&p.compare(T.dataRef.current.value,p.virtual.options[p.activeOptionIndex])}))==null?void 0:r.id:(o=p.options[p.activeOptionIndex])==null?void 0:o.id,"aria-labelledby":Y,"aria-autocomplete":"list",defaultValue:(i=(l=e.defaultValue)!=null?l:p.defaultValue!==void 0?c==null?void 0:c(p.defaultValue):null)!=null?i:p.defaultValue,disabled:p.disabled,onCompositionStart:A,onCompositionEnd:G,onKeyDown:U,onChange:B,onFocus:L,onBlur:D};return ae({ourProps:se,theirProps:b,slot:Z,defaultTag:xo,name:"Combobox.Input"})}let yo="button";function Eo(e,n){var t;let r=_e("Combobox.Button"),o=Xe("Combobox.Button"),l=me(r.buttonRef,n),i=xe(),{id:s=`headlessui-combobox-button-${i}`,...a}=e,d=je(),c=N(x=>{switch(x.key){case J.ArrowDown:return x.preventDefault(),x.stopPropagation(),r.comboboxState===1&&o.openCombobox(),d.nextFrame(()=>{var v;return(v=r.inputRef.current)==null?void 0:v.focus({preventScroll:!0})});case J.ArrowUp:return x.preventDefault(),x.stopPropagation(),r.comboboxState===1&&(o.openCombobox(),d.nextFrame(()=>{r.value||o.goToOption(ee.Last)})),d.nextFrame(()=>{var v;return(v=r.inputRef.current)==null?void 0:v.focus({preventScroll:!0})});case J.Escape:return r.comboboxState!==0?void 0:(x.preventDefault(),r.optionsRef.current&&!r.optionsPropsRef.current.static&&x.stopPropagation(),o.closeCombobox(),d.nextFrame(()=>{var v;return(v=r.inputRef.current)==null?void 0:v.focus({preventScroll:!0})}));default:return}}),h=N(x=>{if(pt(x.currentTarget))return x.preventDefault();r.comboboxState===0?o.closeCombobox():(x.preventDefault(),o.openCombobox()),d.nextFrame(()=>{var v;return(v=r.inputRef.current)==null?void 0:v.focus({preventScroll:!0})})}),b=Nt(()=>{if(r.labelId)return[r.labelId,s].join(" ")},[r.labelId,s]),p=u.useMemo(()=>({open:r.comboboxState===0,disabled:r.disabled,value:r.value}),[r]),g={ref:l,id:s,type:Mt(e,r.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(t=r.optionsRef.current)==null?void 0:t.id,"aria-expanded":r.comboboxState===0,"aria-labelledby":b,disabled:r.disabled,onClick:h,onKeyDown:c};return ae({ourProps:g,theirProps:a,slot:p,defaultTag:yo,name:"Combobox.Button"})}let So="label";function To(e,n){let t=xe(),{id:r=`headlessui-combobox-label-${t}`,...o}=e,l=_e("Combobox.Label"),i=Xe("Combobox.Label"),s=me(l.labelRef,n);X(()=>i.registerLabel(r),[r]);let a=N(()=>{var c;return(c=l.inputRef.current)==null?void 0:c.focus({preventScroll:!0})}),d=u.useMemo(()=>({open:l.comboboxState===0,disabled:l.disabled}),[l]);return ae({ourProps:{ref:s,id:r,onClick:a},theirProps:o,slot:d,defaultTag:So,name:"Combobox.Label"})}let Co="ul",Oo=Pe.RenderStrategy|Pe.Static;function jo(e,n){let t=xe(),{id:r=`headlessui-combobox-options-${t}`,hold:o=!1,...l}=e,i=_e("Combobox.Options"),s=me(i.optionsRef,n),a=Qe(),d=a!==null?(a&pe.Open)===pe.Open:i.comboboxState===0;X(()=>{var p;i.optionsPropsRef.current.static=(p=e.static)!=null?p:!1},[i.optionsPropsRef,e.static]),X(()=>{i.optionsPropsRef.current.hold=o},[i.optionsPropsRef,o]),jn({container:i.optionsRef.current,enabled:i.comboboxState===0,accept(p){return p.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:p.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(p){p.setAttribute("role","none")}});let c=Nt(()=>{var p,g;return(g=i.labelId)!=null?g:(p=i.buttonRef.current)==null?void 0:p.id},[i.labelId,i.buttonRef.current]),h=u.useMemo(()=>({open:i.comboboxState===0,option:void 0}),[i]),b={"aria-labelledby":c,role:"listbox","aria-multiselectable":i.mode===1?!0:void 0,id:r,ref:s};return i.virtual&&i.comboboxState===0&&Object.assign(l,{children:u.createElement(ho,null,l.children)}),ae({ourProps:b,theirProps:l,slot:h,defaultTag:Co,features:Oo,visible:d,name:"Combobox.Options"})}let No="li";function Fo(e,n){var t;let r=xe(),{id:o=`headlessui-combobox-option-${r}`,disabled:l=!1,value:i,order:s=null,...a}=e,d=_e("Combobox.Option"),c=Xe("Combobox.Option"),h=d.virtual?d.activeOptionIndex===d.calculateIndex(i):d.activeOptionIndex===null?!1:((t=d.options[d.activeOptionIndex])==null?void 0:t.id)===o,b=d.isSelected(i),p=u.useRef(null),g=Se({disabled:l,value:i,domRef:p,order:s}),x=u.useContext($n),v=me(n,p,x?x.measureElement:null),y=N(()=>c.onChange(i));X(()=>c.registerOption(o,g),[g,o]);let w=u.useRef(!(d.virtual||d.__demoMode));X(()=>{if(!d.virtual||!d.__demoMode)return;let D=ye();return D.requestAnimationFrame(()=>{w.current=!0}),D.dispose},[d.virtual,d.__demoMode]),X(()=>{if(!w.current||d.comboboxState!==0||!h||d.activationTrigger===0)return;let D=ye();return D.requestAnimationFrame(()=>{var L,Y;(Y=(L=p.current)==null?void 0:L.scrollIntoView)==null||Y.call(L,{block:"nearest"})}),D.dispose},[p,h,d.comboboxState,d.activationTrigger,d.activeOptionIndex]);let O=N(D=>{var L;if(l||(L=d.virtual)!=null&&L.disabled(i))return D.preventDefault();y(),yn()||requestAnimationFrame(()=>{var Y;return(Y=d.inputRef.current)==null?void 0:Y.focus({preventScroll:!0})}),d.mode===0&&requestAnimationFrame(()=>c.closeCombobox())}),I=N(()=>{var D;if(l||(D=d.virtual)!=null&&D.disabled(i))return c.goToOption(ee.Nothing);let L=d.calculateIndex(i);c.goToOption(ee.Specific,L)}),k=On(),A=N(D=>k.update(D)),G=N(D=>{var L;if(!k.wasMoved(D)||l||(L=d.virtual)!=null&&L.disabled(i)||h)return;let Y=d.calculateIndex(i);c.goToOption(ee.Specific,Y,0)}),U=N(D=>{var L;k.wasMoved(D)&&(l||(L=d.virtual)!=null&&L.disabled(i)||h&&(d.optionsPropsRef.current.hold||c.goToOption(ee.Nothing)))}),B=u.useMemo(()=>({active:h,selected:b,disabled:l}),[h,b,l]);return ae({ourProps:{id:o,ref:v,role:"option",tabIndex:l===!0?void 0:-1,"aria-disabled":l===!0?!0:void 0,"aria-selected":b,disabled:void 0,onClick:O,onFocus:I,onPointerEnter:A,onMouseEnter:A,onPointerMove:G,onMouseMove:G,onPointerLeave:U,onMouseLeave:U},theirProps:a,slot:B,defaultTag:No,name:"Combobox.Option"})}let Io=ue(bo),ko=ue(Eo),$o=ue(wo),Po=ue(To),Mo=ue(jo),Ao=ue(Fo),Fe=Object.assign(Io,{Input:$o,Button:ko,Label:Po,Options:Mo,Option:Ao});function Pn(e,n,t,r){let o=Se(t);u.useEffect(()=>{e=e??window;function l(i){o.current(i)}return e.addEventListener(n,l,r),()=>e.removeEventListener(n,l,r)},[e,n,r])}function et(){let e=u.useRef(!1);return X(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Mn(e){let n=N(e),t=u.useRef(!1);u.useEffect(()=>(t.current=!1,()=>{t.current=!0,at(()=>{t.current&&n()})}),[n])}var tt=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(tt||{});function Do(){let e=u.useRef(0);return En("keydown",n=>{n.key==="Tab"&&(e.current=n.shiftKey?1:0)},!0),e}function An(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let n=new Set;for(let t of e.current)t.current instanceof HTMLElement&&n.add(t.current);return n}let Lo="div";var Dn=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(Dn||{});function _o(e,n){let t=u.useRef(null),r=me(t,n),{initialFocus:o,containers:l,features:i=30,...s}=e;We()||(i=1);let a=Le(t);zo({ownerDocument:a},!!(i&16));let d=Wo({ownerDocument:a,container:t,initialFocus:o},!!(i&2));Uo({ownerDocument:a,container:t,containers:l,previousActiveElement:d},!!(i&8));let c=Do(),h=N(x=>{let v=t.current;v&&(y=>y())(()=>{ce(c.current,{[tt.Forwards]:()=>{Ze(v,Ne.First,{skipElements:[x.relatedTarget]})},[tt.Backwards]:()=>{Ze(v,Ne.Last,{skipElements:[x.relatedTarget]})}})})}),b=je(),p=u.useRef(!1),g={ref:r,onKeyDown(x){x.key=="Tab"&&(p.current=!0,b.requestAnimationFrame(()=>{p.current=!1}))},onBlur(x){let v=An(l);t.current instanceof HTMLElement&&v.add(t.current);let y=x.relatedTarget;y instanceof HTMLElement&&y.dataset.headlessuiFocusGuard!=="true"&&(Ln(v,y)||(p.current?Ze(t.current,ce(c.current,{[tt.Forwards]:()=>Ne.Next,[tt.Backwards]:()=>Ne.Previous})|Ne.WrapAround,{relativeTo:x.target}):x.target instanceof HTMLElement&&$e(x.target)))}};return u.createElement(u.Fragment,null,!!(i&4)&&u.createElement(Je,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:Ue.Focusable}),ae({ourProps:g,theirProps:s,defaultTag:Lo,name:"FocusTrap"}),!!(i&4)&&u.createElement(Je,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:Ue.Focusable}))}let Ro=ue(_o),nt=Object.assign(Ro,{features:Dn});function Bo(e=!0){let n=u.useRef(Te.slice());return Ke(([t],[r])=>{r===!0&&t===!1&&at(()=>{n.current.splice(0)}),r===!1&&t===!0&&(n.current=Te.slice())},[e,Te,n]),N(()=>{var t;return(t=n.current.find(r=>r!=null&&r.isConnected))!=null?t:null})}function zo({ownerDocument:e},n){let t=Bo(n);Ke(()=>{n||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&$e(t())},[n]),Mn(()=>{n&&$e(t())})}function Wo({ownerDocument:e,container:n,initialFocus:t},r){let o=u.useRef(null),l=et();return Ke(()=>{if(!r)return;let i=n.current;i&&at(()=>{if(!l.current)return;let s=e==null?void 0:e.activeElement;if(t!=null&&t.current){if((t==null?void 0:t.current)===s){o.current=s;return}}else if(i.contains(s)){o.current=s;return}t!=null&&t.current?$e(t.current):Ze(i,Ne.First)===gn.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),o.current=e==null?void 0:e.activeElement})},[r]),o}function Uo({ownerDocument:e,container:n,containers:t,previousActiveElement:r},o){let l=et();Pn(e==null?void 0:e.defaultView,"focus",i=>{if(!o||!l.current)return;let s=An(t);n.current instanceof HTMLElement&&s.add(n.current);let a=r.current;if(!a)return;let d=i.target;d&&d instanceof HTMLElement?Ln(s,d)?(r.current=d,$e(d)):(i.preventDefault(),i.stopPropagation(),$e(a)):$e(r.current)},!0)}function Ln(e,n){for(let t of e)if(t.contains(n))return!0;return!1}let _n=u.createContext(!1);function Ho(){return u.useContext(_n)}function Wt(e){return u.createElement(_n.Provider,{value:e.force},e.children)}function Vo(e){let n=Ho(),t=u.useContext(Rn),r=Le(e),[o,l]=u.useState(()=>{if(!n&&t!==null||Oe.isServer)return null;let i=r==null?void 0:r.getElementById("headlessui-portal-root");if(i)return i;if(r===null)return null;let s=r.createElement("div");return s.setAttribute("id","headlessui-portal-root"),r.body.appendChild(s)});return u.useEffect(()=>{o!==null&&(r!=null&&r.body.contains(o)||r==null||r.body.appendChild(o))},[o,r]),u.useEffect(()=>{n||t!==null&&l(t.current)},[t,l,n]),o}let Yo=u.Fragment;function qo(e,n){let t=e,r=u.useRef(null),o=me(to(c=>{r.current=c}),n),l=Le(r),i=Vo(r),[s]=u.useState(()=>{var c;return Oe.isServer?null:(c=l==null?void 0:l.createElement("div"))!=null?c:null}),a=u.useContext(Ut),d=We();return X(()=>{!i||!s||i.contains(s)||(s.setAttribute("data-headlessui-portal",""),i.appendChild(s))},[i,s]),X(()=>{if(s&&a)return a.register(s)},[a,s]),Mn(()=>{var c;!i||!s||(s instanceof Node&&i.contains(s)&&i.removeChild(s),i.childNodes.length<=0&&((c=i.parentElement)==null||c.removeChild(i)))}),d?!i||!s?null:St.createPortal(ae({ourProps:{ref:o},theirProps:t,defaultTag:Yo,name:"Portal"}),s):null}let Go=u.Fragment,Rn=u.createContext(null);function Zo(e,n){let{target:t,...r}=e,o={ref:me(n)};return u.createElement(Rn.Provider,{value:t},ae({ourProps:o,theirProps:r,defaultTag:Go,name:"Popover.Group"}))}let Ut=u.createContext(null);function Ko(){let e=u.useContext(Ut),n=u.useRef([]),t=N(l=>(n.current.push(l),e&&e.register(l),()=>r(l))),r=N(l=>{let i=n.current.indexOf(l);i!==-1&&n.current.splice(i,1),e&&e.unregister(l)}),o=u.useMemo(()=>({register:t,unregister:r,portals:n}),[t,r,n]);return[n,u.useMemo(()=>function({children:l}){return u.createElement(Ut.Provider,{value:o},l)},[o])]}let Jo=ue(qo),Qo=ue(Zo),Ht=Object.assign(Jo,{Group:Qo});function Xo(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}const el=typeof Object.is=="function"?Object.is:Xo,{useState:tl,useEffect:nl,useLayoutEffect:rl,useDebugValue:ol}=E;function ll(e,n,t){const r=n(),[{inst:o},l]=tl({inst:{value:r,getSnapshot:n}});return rl(()=>{o.value=r,o.getSnapshot=n,Vt(o)&&l({inst:o})},[e,r,n]),nl(()=>(Vt(o)&&l({inst:o}),e(()=>{Vt(o)&&l({inst:o})})),[e]),ol(r),r}function Vt(e){const n=e.getSnapshot,t=e.value;try{const r=n();return!el(t,r)}catch{return!0}}function il(e,n,t){return n()}const sl=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",al=!sl,ul=al?il:ll,cl="useSyncExternalStore"in E?(e=>e.useSyncExternalStore)(E):ul;function dl(e){return cl(e.subscribe,e.getSnapshot,e.getSnapshot)}function fl(e,n){let t=e(),r=new Set;return{getSnapshot(){return t},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...l){let i=n[o].call(t,...l);i&&(t=i,r.forEach(s=>s()))}}}function ml(){let e;return{before({doc:n}){var t;let r=n.documentElement;e=((t=n.defaultView)!=null?t:window).innerWidth-r.clientWidth},after({doc:n,d:t}){let r=n.documentElement,o=r.clientWidth-r.offsetWidth,l=e-o;t.style(r,"paddingRight",`${l}px`)}}}function pl(){return wn()?{before({doc:e,d:n,meta:t}){function r(o){return t.containers.flatMap(l=>l()).some(l=>l.contains(o))}n.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let s=ye();s.style(e.documentElement,"scrollBehavior","auto"),n.add(()=>n.microTask(()=>s.dispose()))}let l=(o=window.scrollY)!=null?o:window.pageYOffset,i=null;n.addEventListener(e,"click",s=>{if(s.target instanceof HTMLElement)try{let a=s.target.closest("a");if(!a)return;let{hash:d}=new URL(a.href),c=e.querySelector(d);c&&!r(c)&&(i=c)}catch{}},!0),n.addEventListener(e,"touchstart",s=>{if(s.target instanceof HTMLElement)if(r(s.target)){let a=s.target;for(;a.parentElement&&r(a.parentElement);)a=a.parentElement;n.style(a,"overscrollBehavior","contain")}else n.style(s.target,"touchAction","none")}),n.addEventListener(e,"touchmove",s=>{if(s.target instanceof HTMLElement)if(r(s.target)){let a=s.target;for(;a.parentElement&&a.dataset.headlessuiPortal!==""&&!(a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth);)a=a.parentElement;a.dataset.headlessuiPortal===""&&s.preventDefault()}else s.preventDefault()},{passive:!1}),n.add(()=>{var s;let a=(s=window.scrollY)!=null?s:window.pageYOffset;l!==a&&window.scrollTo(0,l),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})}}:{}}function hl(){return{before({doc:e,d:n}){n.style(e.documentElement,"overflow","hidden")}}}function vl(e){let n={};for(let t of e)Object.assign(n,t(n));return n}let Re=fl(()=>new Map,{PUSH(e,n){var t;let r=(t=this.get(e))!=null?t:{doc:e,count:0,d:ye(),meta:new Set};return r.count++,r.meta.add(n),this.set(e,r),this},POP(e,n){let t=this.get(e);return t&&(t.count--,t.meta.delete(n)),this},SCROLL_PREVENT({doc:e,d:n,meta:t}){let r={doc:e,d:n,meta:vl(t)},o=[pl(),ml(),hl()];o.forEach(({before:l})=>l==null?void 0:l(r)),o.forEach(({after:l})=>l==null?void 0:l(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Re.subscribe(()=>{let e=Re.getSnapshot(),n=new Map;for(let[t]of e)n.set(t,t.documentElement.style.overflow);for(let t of e.values()){let r=n.get(t.doc)==="hidden",o=t.count!==0;(o&&!r||!o&&r)&&Re.dispatch(t.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",t),t.count===0&&Re.dispatch("TEARDOWN",t)}});function gl(e,n,t){let r=dl(Re),o=e?r.get(e):void 0,l=o?o.count>0:!1;return X(()=>{if(!(!e||!n))return Re.dispatch("PUSH",e,t),()=>Re.dispatch("POP",e,t)},[n,e]),l}let Yt=new Map,rt=new Map;function Bn(e,n=!0){X(()=>{var t;if(!n)return;let r=typeof e=="function"?e():e.current;if(!r)return;function o(){var i;if(!r)return;let s=(i=rt.get(r))!=null?i:1;if(s===1?rt.delete(r):rt.set(r,s-1),s!==1)return;let a=Yt.get(r);a&&(a["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",a["aria-hidden"]),r.inert=a.inert,Yt.delete(r))}let l=(t=rt.get(r))!=null?t:0;return rt.set(r,l+1),l!==0||(Yt.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),o},[e,n])}function bl({defaultContainers:e=[],portals:n,mainTreeNodeRef:t}={}){var r;let o=u.useRef((r=t==null?void 0:t.current)!=null?r:null),l=Le(o),i=N(()=>{var s,a,d;let c=[];for(let h of e)h!==null&&(h instanceof HTMLElement?c.push(h):"current"in h&&h.current instanceof HTMLElement&&c.push(h.current));if(n!=null&&n.current)for(let h of n.current)c.push(h);for(let h of(s=l==null?void 0:l.querySelectorAll("html > *, body > *"))!=null?s:[])h!==document.body&&h!==document.head&&h instanceof HTMLElement&&h.id!=="headlessui-portal-root"&&(h.contains(o.current)||h.contains((d=(a=o.current)==null?void 0:a.getRootNode())==null?void 0:d.host)||c.some(b=>h.contains(b))||c.push(h));return c});return{resolveContainers:i,contains:N(s=>i().some(a=>a.contains(s))),mainTreeNodeRef:o,MainTreeNode:u.useMemo(()=>function(){return t!=null?null:u.createElement(Je,{features:Ue.Hidden,ref:o})},[o,t])}}let qt=u.createContext(()=>{});qt.displayName="StackContext";var Gt=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Gt||{});function xl(){return u.useContext(qt)}function wl({children:e,onUpdate:n,type:t,element:r,enabled:o}){let l=xl(),i=N((...s)=>{n==null||n(...s),l(...s)});return X(()=>{let s=o===void 0||o===!0;return s&&i(0,t,r),()=>{s&&i(1,t,r)}},[i,t,r,o]),u.createElement(qt.Provider,{value:i},e)}let zn=u.createContext(null);function Wn(){let e=u.useContext(zn);if(e===null){let n=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(n,Wn),n}return e}function Un(){let[e,n]=u.useState([]);return[e.length>0?e.join(" "):void 0,u.useMemo(()=>function(t){let r=N(l=>(n(i=>[...i,l]),()=>n(i=>{let s=i.slice(),a=s.indexOf(l);return a!==-1&&s.splice(a,1),s}))),o=u.useMemo(()=>({register:r,slot:t.slot,name:t.name,props:t.props}),[r,t.slot,t.name,t.props]);return u.createElement(zn.Provider,{value:o},t.children)},[n])]}let yl="p";function El(e,n){let t=xe(),{id:r=`headlessui-description-${t}`,...o}=e,l=Wn(),i=me(n);X(()=>l.register(r),[r,l.register]);let s={ref:i,...l.props,id:r};return ae({ourProps:s,theirProps:o,slot:l.slot||{},defaultTag:yl,name:l.name||"Description"})}let Sl=ue(El),Hn=Object.assign(Sl,{});var Tl=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Tl||{}),Cl=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(Cl||{});let Ol={0(e,n){return e.titleId===n.id?e:{...e,titleId:n.id}}},ht=u.createContext(null);ht.displayName="DialogContext";function ot(e){let n=u.useContext(ht);if(n===null){let t=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,ot),t}return n}function jl(e,n,t=()=>[document.body]){gl(e,n,r=>{var o;return{containers:[...(o=r.containers)!=null?o:[],t]}})}function Nl(e,n){return ce(n.type,Ol,e,n)}let Fl="div",Il=Pe.RenderStrategy|Pe.Static;function kl(e,n){let t=xe(),{id:r=`headlessui-dialog-${t}`,open:o,onClose:l,initialFocus:i,role:s="dialog",__demoMode:a=!1,...d}=e,[c,h]=u.useState(0),b=u.useRef(!1);s=function(){return s==="dialog"||s==="alertdialog"?s:(b.current||(b.current=!0,console.warn(`Invalid role [${s}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let p=Qe();o===void 0&&p!==null&&(o=(p&pe.Open)===pe.Open);let g=u.useRef(null),x=me(g,n),v=Le(g),y=e.hasOwnProperty("open")||p!==null,w=e.hasOwnProperty("onClose");if(!y&&!w)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!y)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!w)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof o!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${o}`);if(typeof l!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${l}`);let O=o?0:1,[I,k]=u.useReducer(Nl,{titleId:null,descriptionId:null,panelRef:u.createRef()}),A=N(()=>l(!1)),G=N(F=>k({type:0,id:F})),U=We()?a?!1:O===0:!1,B=c>1,D=u.useContext(ht)!==null,[L,Y]=Ko(),Z={get current(){var F;return(F=I.panelRef.current)!=null?F:g.current}},{resolveContainers:se,mainTreeNodeRef:T,MainTreeNode:te}=bl({portals:L,defaultContainers:[Z]}),q=B?"parent":"leaf",P=p!==null?(p&pe.Closing)===pe.Closing:!1,z=D||P?!1:U,ne=u.useCallback(()=>{var F,W;return(W=Array.from((F=v==null?void 0:v.querySelectorAll("body > *"))!=null?F:[]).find(de=>de.id==="headlessui-portal-root"?!1:de.contains(T.current)&&de instanceof HTMLElement))!=null?W:null},[T]);Bn(ne,z);let re=B?!0:U,he=u.useCallback(()=>{var F,W;return(W=Array.from((F=v==null?void 0:v.querySelectorAll("[data-headlessui-portal]"))!=null?F:[]).find(de=>de.contains(T.current)&&de instanceof HTMLElement))!=null?W:null},[T]);Bn(he,re),Pt(se,F=>{F.preventDefault(),A()},!(!U||B));let fe=!(B||O!==0);Pn(v==null?void 0:v.defaultView,"keydown",F=>{fe&&(F.defaultPrevented||F.key===J.Escape&&(F.preventDefault(),F.stopPropagation(),A()))}),jl(v,!(P||O!==0||D),se),u.useEffect(()=>{if(O!==0||!g.current)return;let F=new ResizeObserver(W=>{for(let de of W){let Ie=de.target.getBoundingClientRect();Ie.x===0&&Ie.y===0&&Ie.width===0&&Ie.height===0&&A()}});return F.observe(g.current),()=>F.disconnect()},[O,g,A]);let[H,le]=Un(),oe=u.useMemo(()=>[{dialogState:O,close:A,setTitleId:G},I],[O,I,A,G]),M=u.useMemo(()=>({open:O===0}),[O]),C={ref:x,id:r,role:s,"aria-modal":O===0?!0:void 0,"aria-labelledby":I.titleId,"aria-describedby":H};return u.createElement(wl,{type:"Dialog",enabled:O===0,element:g,onUpdate:N((F,W)=>{W==="Dialog"&&ce(F,{[Gt.Add]:()=>h(de=>de+1),[Gt.Remove]:()=>h(de=>de-1)})})},u.createElement(Wt,{force:!0},u.createElement(Ht,null,u.createElement(ht.Provider,{value:oe},u.createElement(Ht.Group,{target:g},u.createElement(Wt,{force:!1},u.createElement(le,{slot:M,name:"Dialog.Description"},u.createElement(nt,{initialFocus:i,containers:se,features:U?ce(q,{parent:nt.features.RestoreFocus,leaf:nt.features.All&~nt.features.FocusLock}):nt.features.None},u.createElement(Y,null,ae({ourProps:C,theirProps:d,slot:M,defaultTag:Fl,features:Il,visible:O===0,name:"Dialog"}))))))))),u.createElement(te,null))}let $l="div";function Pl(e,n){let t=xe(),{id:r=`headlessui-dialog-overlay-${t}`,...o}=e,[{dialogState:l,close:i}]=ot("Dialog.Overlay"),s=me(n),a=N(c=>{if(c.target===c.currentTarget){if(pt(c.currentTarget))return c.preventDefault();c.preventDefault(),c.stopPropagation(),i()}}),d=u.useMemo(()=>({open:l===0}),[l]);return ae({ourProps:{ref:s,id:r,"aria-hidden":!0,onClick:a},theirProps:o,slot:d,defaultTag:$l,name:"Dialog.Overlay"})}let Ml="div";function Al(e,n){let t=xe(),{id:r=`headlessui-dialog-backdrop-${t}`,...o}=e,[{dialogState:l},i]=ot("Dialog.Backdrop"),s=me(n);u.useEffect(()=>{if(i.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[i.panelRef]);let a=u.useMemo(()=>({open:l===0}),[l]);return u.createElement(Wt,{force:!0},u.createElement(Ht,null,ae({ourProps:{ref:s,id:r,"aria-hidden":!0},theirProps:o,slot:a,defaultTag:Ml,name:"Dialog.Backdrop"})))}let Dl="div";function Ll(e,n){let t=xe(),{id:r=`headlessui-dialog-panel-${t}`,...o}=e,[{dialogState:l},i]=ot("Dialog.Panel"),s=me(n,i.panelRef),a=u.useMemo(()=>({open:l===0}),[l]),d=N(c=>{c.stopPropagation()});return ae({ourProps:{ref:s,id:r,onClick:d},theirProps:o,slot:a,defaultTag:Dl,name:"Dialog.Panel"})}let _l="h2";function Rl(e,n){let t=xe(),{id:r=`headlessui-dialog-title-${t}`,...o}=e,[{dialogState:l,setTitleId:i}]=ot("Dialog.Title"),s=me(n);u.useEffect(()=>(i(r),()=>i(null)),[r,i]);let a=u.useMemo(()=>({open:l===0}),[l]);return ae({ourProps:{ref:s,id:r},theirProps:o,slot:a,defaultTag:_l,name:"Dialog.Title"})}let Bl=ue(kl),zl=ue(Al),Wl=ue(Ll),Ul=ue(Pl),Hl=ue(Rl),Vn=Object.assign(Bl,{Backdrop:zl,Panel:Wl,Overlay:Ul,Title:Hl,Description:Hn}),Yn=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function qn(e){var n,t;let r=(n=e.innerText)!=null?n:"",o=e.cloneNode(!0);if(!(o instanceof HTMLElement))return r;let l=!1;for(let s of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),l=!0;let i=l?(t=o.innerText)!=null?t:"":r;return Yn.test(i)&&(i=i.replace(Yn,"")),i}function Vl(e){let n=e.getAttribute("aria-label");if(typeof n=="string")return n.trim();let t=e.getAttribute("aria-labelledby");if(t){let r=t.split(" ").map(o=>{let l=document.getElementById(o);if(l){let i=l.getAttribute("aria-label");return typeof i=="string"?i.trim():qn(l).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return qn(e).trim()}function Yl(e){let n=u.useRef(""),t=u.useRef("");return N(()=>{let r=e.current;if(!r)return"";let o=r.innerText;if(n.current===o)return t.current;let l=Vl(r).trim().toLowerCase();return n.current=o,t.current=l,l})}var ql=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(ql||{}),Gl=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Gl||{}),Zl=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem",e))(Zl||{});function Zt(e,n=t=>t){let t=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,r=$t(n(e.items.slice()),l=>l.dataRef.current.domRef.current),o=t?r.indexOf(t):null;return o===-1&&(o=null),{items:r,activeItemIndex:o}}let Kl={1(e){return e.menuState===1?e:{...e,activeItemIndex:null,menuState:1}},0(e){return e.menuState===0?e:{...e,__demoMode:!1,menuState:0}},2:(e,n)=>{var t;let r=Zt(e),o=_t(n,{resolveItems:()=>r.items,resolveActiveIndex:()=>r.activeItemIndex,resolveId:l=>l.id,resolveDisabled:l=>l.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeItemIndex:o,activationTrigger:(t=n.trigger)!=null?t:1}},3:(e,n)=>{let t=e.searchQuery!==""?0:1,r=e.searchQuery+n.value.toLowerCase(),o=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+t).concat(e.items.slice(0,e.activeItemIndex+t)):e.items).find(i=>{var s;return((s=i.dataRef.current.textValue)==null?void 0:s.startsWith(r))&&!i.dataRef.current.disabled}),l=o?e.items.indexOf(o):-1;return l===-1||l===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:l,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,n)=>{let t=Zt(e,r=>[...r,{id:n.id,dataRef:n.dataRef}]);return{...e,...t}},6:(e,n)=>{let t=Zt(e,r=>{let o=r.findIndex(l=>l.id===n.id);return o!==-1&&r.splice(o,1),r});return{...e,...t,activationTrigger:1}}},Kt=u.createContext(null);Kt.displayName="MenuContext";function vt(e){let n=u.useContext(Kt);if(n===null){let t=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,vt),t}return n}function Jl(e,n){return ce(n.type,Kl,e,n)}let Ql=u.Fragment;function Xl(e,n){let{__demoMode:t=!1,...r}=e,o=u.useReducer(Jl,{__demoMode:t,menuState:t?0:1,buttonRef:u.createRef(),itemsRef:u.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:l,itemsRef:i,buttonRef:s},a]=o,d=me(n);Pt([s,i],(p,g)=>{var x;a({type:1}),kt(g,It.Loose)||(p.preventDefault(),(x=s.current)==null||x.focus())},l===0);let c=N(()=>{a({type:1})}),h=u.useMemo(()=>({open:l===0,close:c}),[l,c]),b={ref:d};return u.createElement(Kt.Provider,{value:o},u.createElement(Lt,{value:ce(l,{0:pe.Open,1:pe.Closed})},ae({ourProps:b,theirProps:r,slot:h,defaultTag:Ql,name:"Menu"})))}let ei="button";function ti(e,n){var t;let r=xe(),{id:o=`headlessui-menu-button-${r}`,...l}=e,[i,s]=vt("Menu.Button"),a=me(i.buttonRef,n),d=je(),c=N(x=>{switch(x.key){case J.Space:case J.Enter:case J.ArrowDown:x.preventDefault(),x.stopPropagation(),s({type:0}),d.nextFrame(()=>s({type:2,focus:ee.First}));break;case J.ArrowUp:x.preventDefault(),x.stopPropagation(),s({type:0}),d.nextFrame(()=>s({type:2,focus:ee.Last}));break}}),h=N(x=>{switch(x.key){case J.Space:x.preventDefault();break}}),b=N(x=>{if(pt(x.currentTarget))return x.preventDefault();e.disabled||(i.menuState===0?(s({type:1}),d.nextFrame(()=>{var v;return(v=i.buttonRef.current)==null?void 0:v.focus({preventScroll:!0})})):(x.preventDefault(),s({type:0})))}),p=u.useMemo(()=>({open:i.menuState===0}),[i]),g={ref:a,id:o,type:Mt(e,i.buttonRef),"aria-haspopup":"menu","aria-controls":(t=i.itemsRef.current)==null?void 0:t.id,"aria-expanded":i.menuState===0,onKeyDown:c,onKeyUp:h,onClick:b};return ae({ourProps:g,theirProps:l,slot:p,defaultTag:ei,name:"Menu.Button"})}let ni="div",ri=Pe.RenderStrategy|Pe.Static;function oi(e,n){var t,r;let o=xe(),{id:l=`headlessui-menu-items-${o}`,...i}=e,[s,a]=vt("Menu.Items"),d=me(s.itemsRef,n),c=Le(s.itemsRef),h=je(),b=Qe(),p=b!==null?(b&pe.Open)===pe.Open:s.menuState===0;u.useEffect(()=>{let w=s.itemsRef.current;w&&s.menuState===0&&w!==(c==null?void 0:c.activeElement)&&w.focus({preventScroll:!0})},[s.menuState,s.itemsRef,c]),jn({container:s.itemsRef.current,enabled:s.menuState===0,accept(w){return w.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:w.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(w){w.setAttribute("role","none")}});let g=N(w=>{var O,I;switch(h.dispose(),w.key){case J.Space:if(s.searchQuery!=="")return w.preventDefault(),w.stopPropagation(),a({type:3,value:w.key});case J.Enter:if(w.preventDefault(),w.stopPropagation(),a({type:1}),s.activeItemIndex!==null){let{dataRef:k}=s.items[s.activeItemIndex];(I=(O=k.current)==null?void 0:O.domRef.current)==null||I.click()}xn(s.buttonRef.current);break;case J.ArrowDown:return w.preventDefault(),w.stopPropagation(),a({type:2,focus:ee.Next});case J.ArrowUp:return w.preventDefault(),w.stopPropagation(),a({type:2,focus:ee.Previous});case J.Home:case J.PageUp:return w.preventDefault(),w.stopPropagation(),a({type:2,focus:ee.First});case J.End:case J.PageDown:return w.preventDefault(),w.stopPropagation(),a({type:2,focus:ee.Last});case J.Escape:w.preventDefault(),w.stopPropagation(),a({type:1}),ye().nextFrame(()=>{var k;return(k=s.buttonRef.current)==null?void 0:k.focus({preventScroll:!0})});break;case J.Tab:w.preventDefault(),w.stopPropagation(),a({type:1}),ye().nextFrame(()=>{Xr(s.buttonRef.current,w.shiftKey?Ne.Previous:Ne.Next)});break;default:w.key.length===1&&(a({type:3,value:w.key}),h.setTimeout(()=>a({type:4}),350));break}}),x=N(w=>{switch(w.key){case J.Space:w.preventDefault();break}}),v=u.useMemo(()=>({open:s.menuState===0}),[s]),y={"aria-activedescendant":s.activeItemIndex===null||(t=s.items[s.activeItemIndex])==null?void 0:t.id,"aria-labelledby":(r=s.buttonRef.current)==null?void 0:r.id,id:l,onKeyDown:g,onKeyUp:x,role:"menu",tabIndex:0,ref:d};return ae({ourProps:y,theirProps:i,slot:v,defaultTag:ni,features:ri,visible:p,name:"Menu.Items"})}let li=u.Fragment;function ii(e,n){let t=xe(),{id:r=`headlessui-menu-item-${t}`,disabled:o=!1,...l}=e,[i,s]=vt("Menu.Item"),a=i.activeItemIndex!==null?i.items[i.activeItemIndex].id===r:!1,d=u.useRef(null),c=me(n,d);X(()=>{if(i.__demoMode||i.menuState!==0||!a||i.activationTrigger===0)return;let k=ye();return k.requestAnimationFrame(()=>{var A,G;(G=(A=d.current)==null?void 0:A.scrollIntoView)==null||G.call(A,{block:"nearest"})}),k.dispose},[i.__demoMode,d,a,i.menuState,i.activationTrigger,i.activeItemIndex]);let h=Yl(d),b=u.useRef({disabled:o,domRef:d,get textValue(){return h()}});X(()=>{b.current.disabled=o},[b,o]),X(()=>(s({type:5,id:r,dataRef:b}),()=>s({type:6,id:r})),[b,r]);let p=N(()=>{s({type:1})}),g=N(k=>{if(o)return k.preventDefault();s({type:1}),xn(i.buttonRef.current)}),x=N(()=>{if(o)return s({type:2,focus:ee.Nothing});s({type:2,focus:ee.Specific,id:r})}),v=On(),y=N(k=>v.update(k)),w=N(k=>{v.wasMoved(k)&&(o||a||s({type:2,focus:ee.Specific,id:r,trigger:0}))}),O=N(k=>{v.wasMoved(k)&&(o||a&&s({type:2,focus:ee.Nothing}))}),I=u.useMemo(()=>({active:a,disabled:o,close:p}),[a,o,p]);return ae({ourProps:{id:r,ref:c,role:"menuitem",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,disabled:void 0,onClick:g,onFocus:x,onPointerEnter:y,onMouseEnter:y,onPointerMove:w,onMouseMove:w,onPointerLeave:O,onMouseLeave:O},theirProps:l,slot:I,defaultTag:li,name:"Menu.Item"})}let si=ue(Xl),ai=ue(ti),ui=ue(oi),ci=ue(ii),gt=Object.assign(si,{Button:ai,Items:ui,Item:ci}),Gn=u.createContext(null);function Zn(){let e=u.useContext(Gn);if(e===null){let n=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(n,Zn),n}return e}function di(){let[e,n]=u.useState([]);return[e.length>0?e.join(" "):void 0,u.useMemo(()=>function(t){let r=N(l=>(n(i=>[...i,l]),()=>n(i=>{let s=i.slice(),a=s.indexOf(l);return a!==-1&&s.splice(a,1),s}))),o=u.useMemo(()=>({register:r,slot:t.slot,name:t.name,props:t.props}),[r,t.slot,t.name,t.props]);return u.createElement(Gn.Provider,{value:o},t.children)},[n])]}let fi="label";function mi(e,n){let t=xe(),{id:r=`headlessui-label-${t}`,passive:o=!1,...l}=e,i=Zn(),s=me(n);X(()=>i.register(r),[r,i.register]);let a={ref:s,...i.props,id:r};return o&&("onClick"in a&&(delete a.htmlFor,delete a.onClick),"onClick"in l&&delete l.onClick),ae({ourProps:a,theirProps:l,slot:i.slot||{},defaultTag:fi,name:i.name||"Label"})}let pi=ue(mi),hi=Object.assign(pi,{});function vi(e=0){let[n,t]=u.useState(e),r=et(),o=u.useCallback(a=>{r.current&&t(d=>d|a)},[n,r]),l=u.useCallback(a=>!!(n&a),[n]),i=u.useCallback(a=>{r.current&&t(d=>d&~a)},[t,r]),s=u.useCallback(a=>{r.current&&t(d=>d^a)},[t]);return{flags:n,addFlag:o,hasFlag:l,removeFlag:i,toggleFlag:s}}let Jt=u.createContext(null);Jt.displayName="GroupContext";let gi=u.Fragment;function bi(e){var n;let[t,r]=u.useState(null),[o,l]=di(),[i,s]=Un(),a=u.useMemo(()=>({switch:t,setSwitch:r,labelledby:o,describedby:i}),[t,r,o,i]),d={},c=e;return u.createElement(s,{name:"Switch.Description"},u.createElement(l,{name:"Switch.Label",props:{htmlFor:(n=a.switch)==null?void 0:n.id,onClick(h){t&&(h.currentTarget.tagName==="LABEL"&&h.preventDefault(),t.click(),t.focus({preventScroll:!0}))}}},u.createElement(Jt.Provider,{value:a},ae({ourProps:d,theirProps:c,defaultTag:gi,name:"Switch.Group"}))))}let xi="button";function wi(e,n){var t;let r=xe(),{id:o=`headlessui-switch-${r}`,checked:l,defaultChecked:i=!1,onChange:s,disabled:a=!1,name:d,value:c,form:h,...b}=e,p=u.useContext(Jt),g=u.useRef(null),x=me(g,n,p===null?null:p.setSwitch),[v,y]=hn(l,s,i),w=N(()=>y==null?void 0:y(!v)),O=N(B=>{if(pt(B.currentTarget))return B.preventDefault();B.preventDefault(),w()}),I=N(B=>{B.key===J.Space?(B.preventDefault(),w()):B.key===J.Enter&&ao(B.currentTarget)}),k=N(B=>B.preventDefault()),A=u.useMemo(()=>({checked:v}),[v]),G={id:o,ref:x,role:"switch",type:Mt(e,g),tabIndex:e.tabIndex===-1?0:(t=e.tabIndex)!=null?t:0,"aria-checked":v,"aria-labelledby":p==null?void 0:p.labelledby,"aria-describedby":p==null?void 0:p.describedby,disabled:a,onClick:O,onKeyUp:I,onKeyPress:k},U=je();return u.useEffect(()=>{var B;let D=(B=g.current)==null?void 0:B.closest("form");D&&i!==void 0&&U.addEventListener(D,"reset",()=>{y(i)})},[g,y]),u.createElement(u.Fragment,null,d!=null&&v&&u.createElement(Je,{features:Ue.Hidden,...mt({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:a,form:h,checked:v,name:d,value:c})}),ae({ourProps:G,theirProps:b,slot:A,defaultTag:xi,name:"Switch"}))}let yi=ue(wi),Ei=bi,Si=Object.assign(yi,{Group:Ei,Label:hi,Description:Hn});function Ti(e){let n={called:!1};return(...t)=>{if(!n.called)return n.called=!0,e(...t)}}function Qt(e,...n){e&&n.length>0&&e.classList.add(...n)}function Xt(e,...n){e&&n.length>0&&e.classList.remove(...n)}function Ci(e,n){let t=ye();if(!e)return t.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[l,i]=[r,o].map(a=>{let[d=0]=a.split(",").filter(Boolean).map(c=>c.includes("ms")?parseFloat(c):parseFloat(c)*1e3).sort((c,h)=>h-c);return d}),s=l+i;if(s!==0){t.group(d=>{d.setTimeout(()=>{n(),d.dispose()},s),d.addEventListener(e,"transitionrun",c=>{c.target===c.currentTarget&&d.dispose()})});let a=t.addEventListener(e,"transitionend",d=>{d.target===d.currentTarget&&(n(),a())})}else n();return t.add(()=>n()),t.dispose}function Oi(e,n,t,r){let o=t?"enter":"leave",l=ye(),i=r!==void 0?Ti(r):()=>{};o==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let s=ce(o,{enter:()=>n.enter,leave:()=>n.leave}),a=ce(o,{enter:()=>n.enterTo,leave:()=>n.leaveTo}),d=ce(o,{enter:()=>n.enterFrom,leave:()=>n.leaveFrom});return Xt(e,...n.base,...n.enter,...n.enterTo,...n.enterFrom,...n.leave,...n.leaveFrom,...n.leaveTo,...n.entered),Qt(e,...n.base,...s,...d),l.nextFrame(()=>{Xt(e,...n.base,...s,...d),Qt(e,...n.base,...s,...a),Ci(e,()=>(Xt(e,...n.base,...s),Qt(e,...n.base,...n.entered),i()))}),l.dispose}function ji({immediate:e,container:n,direction:t,classes:r,onStart:o,onStop:l}){let i=et(),s=je(),a=Se(t);X(()=>{e&&(a.current="enter")},[e]),X(()=>{let d=ye();s.add(d.dispose);let c=n.current;if(c&&a.current!=="idle"&&i.current)return d.dispose(),o.current(a.current),d.add(Oi(c,r.current,a.current==="enter",()=>{d.dispose(),l.current(a.current)})),d.dispose},[t])}function Ae(e=""){return e.split(/\s+/).filter(n=>n.length>1)}let bt=u.createContext(null);bt.displayName="TransitionContext";var Ni=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Ni||{});function Fi(){let e=u.useContext(bt);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function Ii(){let e=u.useContext(xt);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let xt=u.createContext(null);xt.displayName="NestingContext";function wt(e){return"children"in e?wt(e.children):e.current.filter(({el:n})=>n.current!==null).filter(({state:n})=>n==="visible").length>0}function Kn(e,n){let t=Se(e),r=u.useRef([]),o=et(),l=je(),i=N((p,g=Me.Hidden)=>{let x=r.current.findIndex(({el:v})=>v===p);x!==-1&&(ce(g,{[Me.Unmount](){r.current.splice(x,1)},[Me.Hidden](){r.current[x].state="hidden"}}),l.microTask(()=>{var v;!wt(r)&&o.current&&((v=t.current)==null||v.call(t))}))}),s=N(p=>{let g=r.current.find(({el:x})=>x===p);return g?g.state!=="visible"&&(g.state="visible"):r.current.push({el:p,state:"visible"}),()=>i(p,Me.Unmount)}),a=u.useRef([]),d=u.useRef(Promise.resolve()),c=u.useRef({enter:[],leave:[],idle:[]}),h=N((p,g,x)=>{a.current.splice(0),n&&(n.chains.current[g]=n.chains.current[g].filter(([v])=>v!==p)),n==null||n.chains.current[g].push([p,new Promise(v=>{a.current.push(v)})]),n==null||n.chains.current[g].push([p,new Promise(v=>{Promise.all(c.current[g].map(([y,w])=>w)).then(()=>v())})]),g==="enter"?d.current=d.current.then(()=>n==null?void 0:n.wait.current).then(()=>x(g)):x(g)}),b=N((p,g,x)=>{Promise.all(c.current[g].splice(0).map(([v,y])=>y)).then(()=>{var v;(v=a.current.shift())==null||v()}).then(()=>x(g))});return u.useMemo(()=>({children:r,register:s,unregister:i,onStart:h,onStop:b,wait:d,chains:c}),[s,i,r,h,b,c,d])}function ki(){}let $i=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Jn(e){var n;let t={};for(let r of $i)t[r]=(n=e[r])!=null?n:ki;return t}function Pi(e){let n=u.useRef(Jn(e));return u.useEffect(()=>{n.current=Jn(e)},[e]),n}let Mi="div",Qn=Pe.RenderStrategy;function Ai(e,n){var t,r;let{beforeEnter:o,afterEnter:l,beforeLeave:i,afterLeave:s,enter:a,enterFrom:d,enterTo:c,entered:h,leave:b,leaveFrom:p,leaveTo:g,...x}=e,v=u.useRef(null),y=me(v,n),w=(t=x.unmount)==null||t?Me.Unmount:Me.Hidden,{show:O,appear:I,initial:k}=Fi(),[A,G]=u.useState(O?"visible":"hidden"),U=Ii(),{register:B,unregister:D}=U;u.useEffect(()=>B(v),[B,v]),u.useEffect(()=>{if(w===Me.Hidden&&v.current){if(O&&A!=="visible"){G("visible");return}return ce(A,{hidden:()=>D(v),visible:()=>B(v)})}},[A,v,B,D,O,w]);let L=Se({base:Ae(x.className),enter:Ae(a),enterFrom:Ae(d),enterTo:Ae(c),entered:Ae(h),leave:Ae(b),leaveFrom:Ae(p),leaveTo:Ae(g)}),Y=Pi({beforeEnter:o,afterEnter:l,beforeLeave:i,afterLeave:s}),Z=We();u.useEffect(()=>{if(Z&&A==="visible"&&v.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[v,A,Z]);let se=k&&!I,T=I&&O&&k,te=!Z||se?"idle":O?"enter":"leave",q=vi(0),P=N(fe=>ce(fe,{enter:()=>{q.addFlag(pe.Opening),Y.current.beforeEnter()},leave:()=>{q.addFlag(pe.Closing),Y.current.beforeLeave()},idle:()=>{}})),z=N(fe=>ce(fe,{enter:()=>{q.removeFlag(pe.Opening),Y.current.afterEnter()},leave:()=>{q.removeFlag(pe.Closing),Y.current.afterLeave()},idle:()=>{}})),ne=Kn(()=>{G("hidden"),D(v)},U),re=u.useRef(!1);ji({immediate:T,container:v,classes:L,direction:te,onStart:Se(fe=>{re.current=!0,ne.onStart(v,fe,P)}),onStop:Se(fe=>{re.current=!1,ne.onStop(v,fe,z),fe==="leave"&&!wt(ne)&&(G("hidden"),D(v))})});let he=x,be={ref:y};return T?he={...he,className:dt(x.className,...L.current.enter,...L.current.enterFrom)}:re.current&&(he.className=dt(x.className,(r=v.current)==null?void 0:r.className),he.className===""&&delete he.className),u.createElement(xt.Provider,{value:ne},u.createElement(Lt,{value:ce(A,{visible:pe.Open,hidden:pe.Closed})|q.flags},ae({ourProps:be,theirProps:he,defaultTag:Mi,features:Qn,visible:A==="visible",name:"Transition.Child"})))}function Di(e,n){let{show:t,appear:r=!1,unmount:o=!0,...l}=e,i=u.useRef(null),s=me(i,n);We();let a=Qe();if(t===void 0&&a!==null&&(t=(a&pe.Open)===pe.Open),![!0,!1].includes(t))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[d,c]=u.useState(t?"visible":"hidden"),h=Kn(()=>{c("hidden")}),[b,p]=u.useState(!0),g=u.useRef([t]);X(()=>{b!==!1&&g.current[g.current.length-1]!==t&&(g.current.push(t),p(!1))},[g,t]);let x=u.useMemo(()=>({show:t,appear:r,initial:b}),[t,r,b]);u.useEffect(()=>{if(t)c("visible");else if(!wt(h))c("hidden");else{let O=i.current;if(!O)return;let I=O.getBoundingClientRect();I.x===0&&I.y===0&&I.width===0&&I.height===0&&c("hidden")}},[t,h]);let v={unmount:o},y=N(()=>{var O;b&&p(!1),(O=e.beforeEnter)==null||O.call(e)}),w=N(()=>{var O;b&&p(!1),(O=e.beforeLeave)==null||O.call(e)});return u.createElement(xt.Provider,{value:h},u.createElement(bt.Provider,{value:x},ae({ourProps:{...v,as:u.Fragment,children:u.createElement(Xn,{ref:s,...v,...l,beforeEnter:y,beforeLeave:w})},theirProps:{},defaultTag:u.Fragment,features:Qn,visible:d==="visible",name:"Transition"})))}function Li(e,n){let t=u.useContext(bt)!==null,r=Qe()!==null;return u.createElement(u.Fragment,null,!t&&r?u.createElement(en,{ref:n,...e}):u.createElement(Xn,{ref:n,...e}))}let en=ue(Di),Xn=ue(Ai),_i=ue(Li),Be=Object.assign(en,{Child:_i,Root:en});function Ri({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M18 10a.75.75 0 0 1-.75.75H4.66l2.1 1.95a.75.75 0 1 1-1.02 1.1l-3.5-3.25a.75.75 0 0 1 0-1.1l3.5-3.25a.75.75 0 1 1 1.02 1.1l-2.1 1.95h12.59A.75.75 0 0 1 18 10Z",clipRule:"evenodd"}))}const Bi=E.forwardRef(Ri);function zi({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M2 10a.75.75 0 0 1 .75-.75h12.59l-2.1-1.95a.75.75 0 1 1 1.02-1.1l3.5 3.25a.75.75 0 0 1 0 1.1l-3.5 3.25a.75.75 0 1 1-1.02-1.1l2.1-1.95H2.75A.75.75 0 0 1 2 10Z",clipRule:"evenodd"}))}const Wi=E.forwardRef(zi);function Ui({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"}))}const Hi=E.forwardRef(Ui);function Vi({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const Yi=E.forwardRef(Vi);function qi({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M9.47 6.47a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 1 1-1.06 1.06L10 8.06l-3.72 3.72a.75.75 0 0 1-1.06-1.06l4.25-4.25Z",clipRule:"evenodd"}))}const Gi=E.forwardRef(qi);function Zi({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-8-5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0v-4.5A.75.75 0 0 1 10 5Zm0 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const er=E.forwardRef(Zi);function Ki({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const Ji=E.forwardRef(Ki);function Qi({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z",clipRule:"evenodd"}))}const Xi=E.forwardRef(Qi);function es({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM8.28 7.22a.75.75 0 0 0-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 1 0 1.06 1.06L10 11.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L11.06 10l1.72-1.72a.75.75 0 0 0-1.06-1.06L10 8.94 8.28 7.22Z",clipRule:"evenodd"}))}const ts=E.forwardRef(es),ns={warning:{color:"bg-yellow-50",icon:m.jsx(Ji,{className:"h-5 w-5 text-yellow-400","aria-hidden":"true"}),colorTitle:"text-yellow-800",colorText:"text-yellow-700"},error:{color:"bg-red-50",icon:m.jsx(ts,{className:"h-5 w-5 text-red-400","aria-hidden":"true"}),colorTitle:"text-red-800",colorText:"text-red-700"},success:{color:"bg-green-50",icon:m.jsx(Hi,{className:"h-5 w-5 text-green-400","aria-hidden":"true"}),colorTitle:"text-green-800",colorText:"text-green-700"},info:{color:"bg-blue-50",icon:m.jsx(Xi,{className:"h-5 w-5 text-blue-400","aria-hidden":"true"}),colorTitle:"text-blue-800",colorText:"text-blue-700"}},rs=({type:e="info",title:n,message:t,active:r=!1,time:o=1e3,onClose:l})=>{const[i,s]=u.useState(!1),a=u.useRef(null);u.useEffect(()=>(r&&(s(!0),a.current=setTimeout(()=>{s(!1),l&&l()},o)),()=>clearTimeout(a.current)),[r,o,l]);const d=ns[e];return i?m.jsx("div",{className:"fixed top-2.5 left-1/2 transform -translate-x-1/2 w-80 3xs:w-96 z-50",children:m.jsx(Be,{as:u.Fragment,show:i,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:m.jsxs("div",{className:$("rounded-md p-4 text-center",d.color),children:[m.jsxs("div",{className:"flex justify-center flex-shrink-0",children:[d.icon,m.jsx("h3",{className:$("text-sm font-medium ml-3",d.colorTitle),children:n})]}),m.jsx("div",{className:$("mt-2 text-sm",d.colorText),children:m.jsx("p",{children:t})})]})})}):null};function os({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))}const ls=E.forwardRef(os);function is({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M10.5 3.75a6.75 6.75 0 1 0 0 13.5 6.75 6.75 0 0 0 0-13.5ZM2.25 10.5a8.25 8.25 0 1 1 14.59 5.28l4.69 4.69a.75.75 0 1 1-1.06 1.06l-4.69-4.69A8.25 8.25 0 0 1 2.25 10.5Z",clipRule:"evenodd"}))}const ss=E.forwardRef(is);function as({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{d:"M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-8.4 8.4a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32l8.4-8.4Z"}),E.createElement("path",{d:"M5.25 5.25a3 3 0 0 0-3 3v10.5a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3V13.5a.75.75 0 0 0-1.5 0v5.25a1.5 1.5 0 0 1-1.5 1.5H5.25a1.5 1.5 0 0 1-1.5-1.5V8.25a1.5 1.5 0 0 1 1.5-1.5h5.25a.75.75 0 0 0 0-1.5H5.25Z"}))}const us=E.forwardRef(as);function cs({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M1.5 6a2.25 2.25 0 0 1 2.25-2.25h16.5A2.25 2.25 0 0 1 22.5 6v12a2.25 2.25 0 0 1-2.25 2.25H3.75A2.25 2.25 0 0 1 1.5 18V6ZM3 16.06V18c0 .414.336.75.75.75h16.5A.75.75 0 0 0 21 18v-1.94l-2.69-2.689a1.5 1.5 0 0 0-2.12 0l-.88.879.97.97a.75.75 0 1 1-1.06 1.06l-5.16-5.159a1.5 1.5 0 0 0-2.12 0L3 16.061Zm10.125-7.81a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0Z",clipRule:"evenodd"}))}const ds=E.forwardRef(cs);function fs({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M18.685 19.097A9.723 9.723 0 0 0 21.75 12c0-5.385-4.365-9.75-9.75-9.75S2.25 6.615 2.25 12a9.723 9.723 0 0 0 3.065 7.097A9.716 9.716 0 0 0 12 21.75a9.716 9.716 0 0 0 6.685-2.653Zm-12.54-1.285A7.486 7.486 0 0 1 12 15a7.486 7.486 0 0 1 5.855 2.812A8.224 8.224 0 0 1 12 20.25a8.224 8.224 0 0 1-5.855-2.438ZM15.75 9a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z",clipRule:"evenodd"}))}const ms=E.forwardRef(fs);function ps({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const hs=E.forwardRef(ps),vs=({src:e,alt:n,width:t,height:r,className:o="",classNameIcon:l="",isIcon:i=!0,acronym:s=""})=>{function a(){if(typeof s!="string")return s;const d=s.toLowerCase(),c=d.split(" "),h=c[c.length-1];return d.charAt(0)+h.charAt(0)}return m.jsx(m.Fragment,{children:e?m.jsx("img",{src:e,alt:n,width:t,height:r,className:$(o!==""&&o),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s"},onLoad:d=>d.currentTarget.style.filter="none","data-testid":"img"}):i?m.jsx(ms,{className:$("bg-white text-default-5",l!==""?l:"w-7 h-7")}):m.jsx("div",{className:$("bg-gray-200 text-default-5 rounded-full font-bold uppercase flex justify-center items-center",l!==""?l:"w-7 h-7"),children:a()})})},gs=({steps:e,onClick:n})=>{const[t,r]=u.useState(0),o=l=>{r(l),n(l)};return m.jsx("nav",{className:"flex items-center justify-center w-full","aria-label":"Progress","data-testid":"bullets",children:m.jsx("ol",{role:"list",className:"flex items-center space-x-5",children:new Array(e).fill(1).map((l,i)=>m.jsx("li",{children:t!==i?m.jsx("div",{className:"cursor-pointer block h-2.5 w-2.5 rounded-full bg-gray-500 hover:bg-gray-600",onClick:()=>o(i),"data-testid":`step-${i}`,children:m.jsx("span",{className:"sr-only",children:"step"})}):m.jsxs("div",{className:"relative flex items-center justify-center cursor-pointer","aria-current":"step",children:[m.jsx("span",{className:"absolute flex h-5 w-5 p-px","aria-hidden":"true",children:m.jsx("span",{className:"h-full w-full rounded-full bg-gray-300"})}),m.jsx("span",{className:"relative block h-2.5 w-2.5 rounded-full bg-gray-500","aria-hidden":"true"}),m.jsx("span",{className:"sr-only",children:"step"})]})},i))})})};var tr={exports:{}};/*!
|
|
31
|
+
`));let b=c.props,p=typeof(b==null?void 0:b.className)=="function"?(...x)=>dt(b==null?void 0:b.className(...x),a.className):dt(b==null?void 0:b.className,a.className),g=p?{className:p}:{};return u.cloneElement(c,Object.assign({},Nn(c.props,mt(At(a,["ref"]))),h,d,{ref:o(c.ref,d.ref)},g))}return u.createElement(i,Object.assign({},At(a,["ref"]),i!==u.Fragment&&d,i!==u.Fragment&&h),c)}function no(...e){return e.every(n=>n==null)?void 0:n=>{for(let t of e)t!=null&&(typeof t=="function"?t(n):t.current=n)}}function Nn(...e){if(e.length===0)return{};if(e.length===1)return e[0];let n={},t={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(t[o]!=null||(t[o]=[]),t[o].push(r[o])):n[o]=r[o];if(n.disabled||n["aria-disabled"])return Object.assign(n,Object.fromEntries(Object.keys(t).map(r=>[r,void 0])));for(let r in t)Object.assign(n,{[r](o,...i){let l=t[r];for(let s of l){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;s(o,...i)}}});return n}function ue(e){var n;return Object.assign(u.forwardRef(e),{displayName:(n=e.displayName)!=null?n:e.name})}function mt(e){let n=Object.assign({},e);for(let t in n)n[t]===void 0&&delete n[t];return n}function At(e,n=[]){let t=Object.assign({},e);for(let r of n)r in t&&delete t[r];return t}let ro="div";var Ue=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Ue||{});function oo(e,n){var t;let{features:r=1,...o}=e,i={ref:n,"aria-hidden":(r&2)===2?!0:(t=o["aria-hidden"])!=null?t:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return ae({ourProps:i,theirProps:o,slot:{},defaultTag:ro,name:"Hidden"})}let Je=ue(oo),Dt=u.createContext(null);Dt.displayName="OpenClosedContext";var pe=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(pe||{});function Qe(){return u.useContext(Dt)}function _t({value:e,children:n}){return u.createElement(Dt.Provider,{value:e},n)}function lo(e){function n(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",n))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",n),n())}let Te=[];lo(()=>{function e(n){n.target instanceof HTMLElement&&n.target!==document.body&&Te[0]!==n.target&&(Te.unshift(n.target),Te=Te.filter(t=>t!=null&&t.isConnected),Te.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function pt(e){let n=e.parentElement,t=null;for(;n&&!(n instanceof HTMLFieldSetElement);)n instanceof HTMLLegendElement&&(t=n),n=n.parentElement;let r=(n==null?void 0:n.getAttribute("disabled"))==="";return r&&io(t)?!1:r}function io(e){if(!e)return!1;let n=e.previousElementSibling;for(;n!==null;){if(n instanceof HTMLLegendElement)return!1;n=n.previousElementSibling}return!0}function so(e){throw new Error("Unexpected object: "+e)}var ee=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(ee||{});function Lt(e,n){let t=n.resolveItems();if(t.length<=0)return null;let r=n.resolveActiveIndex(),o=r??-1;switch(e.focus){case 0:{for(let i=0;i<t.length;++i)if(!n.resolveDisabled(t[i],i,t))return i;return r}case 1:{for(let i=o-1;i>=0;--i)if(!n.resolveDisabled(t[i],i,t))return i;return r}case 2:{for(let i=o+1;i<t.length;++i)if(!n.resolveDisabled(t[i],i,t))return i;return r}case 3:{for(let i=t.length-1;i>=0;--i)if(!n.resolveDisabled(t[i],i,t))return i;return r}case 4:{for(let i=0;i<t.length;++i)if(n.resolveId(t[i],i,t)===e.id)return i;return r}case 5:return null;default:so(e)}}function Fn(e={},n=null,t=[]){for(let[r,o]of Object.entries(e))kn(t,In(n,r),o);return t}function In(e,n){return e?e+"["+n+"]":n}function kn(e,n,t){if(Array.isArray(t))for(let[r,o]of t.entries())kn(e,In(n,r.toString()),o);else t instanceof Date?e.push([n,t.toISOString()]):typeof t=="boolean"?e.push([n,t?"1":"0"]):typeof t=="string"?e.push([n,t]):typeof t=="number"?e.push([n,`${t}`]):t==null?e.push([n,""]):Fn(t,n,e)}function ao(e){var n,t;let r=(n=e==null?void 0:e.form)!=null?n:e.closest("form");if(r){for(let o of r.elements)if(o!==e&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(t=r.requestSubmit)==null||t.call(r)}}var J=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(J||{}),uo=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(uo||{}),co=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(co||{}),fo=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(fo||{}),mo=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.RegisterOption=3]="RegisterOption",e[e.UnregisterOption=4]="UnregisterOption",e[e.RegisterLabel=5]="RegisterLabel",e[e.SetActivationTrigger=6]="SetActivationTrigger",e[e.UpdateVirtualOptions=7]="UpdateVirtualOptions",e))(mo||{});function Rt(e,n=t=>t){let t=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=n(e.options.slice()),o=r.length>0&&r[0].dataRef.current.order!==null?r.sort((l,s)=>l.dataRef.current.order-s.dataRef.current.order):$t(r,l=>l.dataRef.current.domRef.current),i=t?o.indexOf(t):null;return i===-1&&(i=null),{options:o,activeOptionIndex:i}}let po={1(e){var n;return(n=e.dataRef.current)!=null&&n.disabled||e.comboboxState===1?e:{...e,activeOptionIndex:null,comboboxState:1}},0(e){var n,t;if((n=e.dataRef.current)!=null&&n.disabled||e.comboboxState===0)return e;if((t=e.dataRef.current)!=null&&t.value){let r=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(r!==-1)return{...e,activeOptionIndex:r,comboboxState:0}}return{...e,comboboxState:0}},2(e,n){var t,r,o,i,l;if((t=e.dataRef.current)!=null&&t.disabled||(r=e.dataRef.current)!=null&&r.optionsRef.current&&!((o=e.dataRef.current)!=null&&o.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let c=n.focus===ee.Specific?n.idx:Lt(n,{resolveItems:()=>e.virtual.options,resolveActiveIndex:()=>{var b,p;return(p=(b=e.activeOptionIndex)!=null?b:e.virtual.options.findIndex(g=>!e.virtual.disabled(g)))!=null?p:null},resolveDisabled:e.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),h=(i=n.trigger)!=null?i:2;return e.activeOptionIndex===c&&e.activationTrigger===h?e:{...e,activeOptionIndex:c,activationTrigger:h}}let s=Rt(e);if(s.activeOptionIndex===null){let c=s.options.findIndex(h=>!h.dataRef.current.disabled);c!==-1&&(s.activeOptionIndex=c)}let a=n.focus===ee.Specific?n.idx:Lt(n,{resolveItems:()=>s.options,resolveActiveIndex:()=>s.activeOptionIndex,resolveId:c=>c.id,resolveDisabled:c=>c.dataRef.current.disabled}),d=(l=n.trigger)!=null?l:2;return e.activeOptionIndex===a&&e.activationTrigger===d?e:{...e,...s,activeOptionIndex:a,activationTrigger:d}},3:(e,n)=>{var t,r,o;if((t=e.dataRef.current)!=null&&t.virtual)return{...e,options:[...e.options,n.payload]};let i=n.payload,l=Rt(e,a=>(a.push(i),a));e.activeOptionIndex===null&&(r=e.dataRef.current)!=null&&r.isSelected(n.payload.dataRef.current.value)&&(l.activeOptionIndex=l.options.indexOf(i));let s={...e,...l,activationTrigger:2};return(o=e.dataRef.current)!=null&&o.__demoMode&&e.dataRef.current.value===void 0&&(s.activeOptionIndex=0),s},4:(e,n)=>{var t;if((t=e.dataRef.current)!=null&&t.virtual)return{...e,options:e.options.filter(o=>o.id!==n.id)};let r=Rt(e,o=>{let i=o.findIndex(l=>l.id===n.id);return i!==-1&&o.splice(i,1),o});return{...e,...r,activationTrigger:2}},5:(e,n)=>e.labelId===n.id?e:{...e,labelId:n.id},6:(e,n)=>e.activationTrigger===n.trigger?e:{...e,activationTrigger:n.trigger},7:(e,n)=>{var t;if(((t=e.virtual)==null?void 0:t.options)===n.options)return e;let r=e.activeOptionIndex;if(e.activeOptionIndex!==null){let o=n.options.indexOf(e.virtual.options[e.activeOptionIndex]);o!==-1?r=o:r=null}return{...e,activeOptionIndex:r,virtual:Object.assign({},e.virtual,{options:n.options})}}},Bt=u.createContext(null);Bt.displayName="ComboboxActionsContext";function Xe(e){let n=u.useContext(Bt);if(n===null){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Xe),t}return n}let $n=u.createContext(null);function ho(e){var n;let t=Le("VirtualProvider"),[r,o]=u.useMemo(()=>{let a=t.optionsRef.current;if(!a)return[0,0];let d=window.getComputedStyle(a);return[parseFloat(d.paddingBlockStart||d.paddingTop),parseFloat(d.paddingBlockEnd||d.paddingBottom)]},[t.optionsRef.current]),i=Hr({scrollPaddingStart:r,scrollPaddingEnd:o,count:t.virtual.options.length,estimateSize(){return 40},getScrollElement(){var a;return(a=t.optionsRef.current)!=null?a:null},overscan:12}),[l,s]=u.useState(0);return X(()=>{s(a=>a+1)},[(n=t.virtual)==null?void 0:n.options]),u.createElement($n.Provider,{value:i},u.createElement("div",{style:{position:"relative",width:"100%",height:`${i.getTotalSize()}px`},ref:a=>{if(a){if(typeof process<"u"&&process.env.JEST_WORKER_ID!==void 0||t.activationTrigger===0)return;t.activeOptionIndex!==null&&t.virtual.options.length>t.activeOptionIndex&&i.scrollToIndex(t.activeOptionIndex)}}},i.getVirtualItems().map(a=>{var d;return u.createElement(u.Fragment,{key:a.key},u.cloneElement((d=e.children)==null?void 0:d.call(e,{option:t.virtual.options[a.index],open:t.comboboxState===0}),{key:`${l}-${a.key}`,"data-index":a.index,"aria-setsize":t.virtual.options.length,"aria-posinset":a.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${a.start}px)`,overflowAnchor:"none"}}))})))}let zt=u.createContext(null);zt.displayName="ComboboxDataContext";function Le(e){let n=u.useContext(zt);if(n===null){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Le),t}return n}function vo(e,n){return ce(n.type,po,e,n)}let go=u.Fragment;function bo(e,n){let{value:t,defaultValue:r,onChange:o,form:i,name:l,by:s=null,disabled:a=!1,__demoMode:d=!1,nullable:c=!1,multiple:h=!1,immediate:b=!1,virtual:p=null,...g}=e,x=!1,v=null,[y=h?[]:void 0,w]=hn(t,o,r),[O,I]=u.useReducer(vo,{dataRef:u.createRef(),comboboxState:d?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),k=u.useRef(!1),A=u.useRef({static:!1,hold:!1}),G=u.useRef(null),U=u.useRef(null),B=u.useRef(null),D=u.useRef(null),_=N(typeof s=="string"?(M,C)=>{let F=s;return(M==null?void 0:M[F])===(C==null?void 0:C[F])}:s??((M,C)=>M===C)),Y=N(M=>O.options.findIndex(C=>_(C.dataRef.current.value,M))),Z=u.useCallback(M=>ce(T.mode,{1:()=>y.some(C=>_(C,M)),0:()=>_(y,M)}),[y]),se=N(M=>O.activeOptionIndex===Y(M)),T=u.useMemo(()=>({...O,immediate:x,optionsPropsRef:A,labelRef:G,inputRef:U,buttonRef:B,optionsRef:D,value:y,defaultValue:r,disabled:a,mode:h?1:0,virtual:O.virtual,get activeOptionIndex(){if(k.current&&O.activeOptionIndex===null&&O.options.length>0){let M=O.options.findIndex(C=>!C.dataRef.current.disabled);if(M!==-1)return M}return O.activeOptionIndex},calculateIndex:Y,compare:_,isSelected:Z,isActive:se,nullable:c,__demoMode:d}),[y,r,a,h,c,d,O,v]);X(()=>{},[v,void 0]),X(()=>{O.dataRef.current=T},[T]),Pt([T.buttonRef,T.inputRef,T.optionsRef],()=>Ce.closeCombobox(),T.comboboxState===0);let te=u.useMemo(()=>{var M,C,F;return{open:T.comboboxState===0,disabled:a,activeIndex:T.activeOptionIndex,activeOption:T.activeOptionIndex===null?null:T.virtual?T.virtual.options[(M=T.activeOptionIndex)!=null?M:0]:(F=(C=T.options[T.activeOptionIndex])==null?void 0:C.dataRef.current.value)!=null?F:null,value:y}},[T,a,y]),q=N(()=>{if(T.activeOptionIndex!==null){if(T.virtual)be(T.virtual.options[T.activeOptionIndex]);else{let{dataRef:M}=T.options[T.activeOptionIndex];be(M.current.value)}Ce.goToOption(ee.Specific,T.activeOptionIndex)}}),P=N(()=>{I({type:0}),k.current=!0}),z=N(()=>{I({type:1}),k.current=!1}),ne=N((M,C,F)=>(k.current=!1,M===ee.Specific?I({type:2,focus:ee.Specific,idx:C,trigger:F}):I({type:2,focus:M,trigger:F}))),re=N((M,C)=>(I({type:3,payload:{id:M,dataRef:C}}),()=>{T.isActive(C.current.value)&&(k.current=!0),I({type:4,id:M})})),he=N(M=>(I({type:5,id:M}),()=>I({type:5,id:null}))),be=N(M=>ce(T.mode,{0(){return w==null?void 0:w(M)},1(){let C=T.value.slice(),F=C.findIndex(W=>_(W,M));return F===-1?C.push(M):C.splice(F,1),w==null?void 0:w(C)}})),fe=N(M=>{I({type:6,trigger:M})}),Ce=u.useMemo(()=>({onChange:be,registerOption:re,registerLabel:he,goToOption:ne,closeCombobox:z,openCombobox:P,setActivationTrigger:fe,selectActiveOption:q}),[]),H=n===null?{}:{ref:n},le=u.useRef(null),oe=je();return u.useEffect(()=>{le.current&&r!==void 0&&oe.addEventListener(le.current,"reset",()=>{w==null||w(r)})},[le,w]),u.createElement(Bt.Provider,{value:Ce},u.createElement(zt.Provider,{value:T},u.createElement(_t,{value:ce(T.comboboxState,{0:pe.Open,1:pe.Closed})},l!=null&&y!=null&&Fn({[l]:y}).map(([M,C],F)=>u.createElement(Je,{features:Ue.Hidden,ref:F===0?W=>{var de;le.current=(de=W==null?void 0:W.closest("form"))!=null?de:null}:void 0,...mt({key:M,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:i,disabled:a,name:M,value:C})})),ae({ourProps:H,theirProps:g,slot:te,defaultTag:go,name:"Combobox"}))))}let xo="input";function wo(e,n){var t,r,o,i,l;let s=xe(),{id:a=`headlessui-combobox-input-${s}`,onChange:d,displayValue:c,type:h="text",...b}=e,p=Le("Combobox.Input"),g=Xe("Combobox.Input"),x=me(p.inputRef,n),v=_e(p.inputRef),y=u.useRef(!1),w=je(),O=N(()=>{g.onChange(null),p.optionsRef.current&&(p.optionsRef.current.scrollTop=0),g.goToOption(ee.Nothing)}),I=function(){var T;return typeof c=="function"&&p.value!==void 0?(T=c(p.value))!=null?T:"":typeof p.value=="string"?p.value:""}();Ke(([T,te],[q,P])=>{if(y.current)return;let z=p.inputRef.current;z&&((P===0&&te===1||T!==q)&&(z.value=T),requestAnimationFrame(()=>{if(y.current||!z||(v==null?void 0:v.activeElement)!==z)return;let{selectionStart:ne,selectionEnd:re}=z;Math.abs((re??0)-(ne??0))===0&&ne===0&&z.setSelectionRange(z.value.length,z.value.length)}))},[I,p.comboboxState,v]),Ke(([T],[te])=>{if(T===0&&te===1){if(y.current)return;let q=p.inputRef.current;if(!q)return;let P=q.value,{selectionStart:z,selectionEnd:ne,selectionDirection:re}=q;q.value="",q.value=P,re!==null?q.setSelectionRange(z,ne,re):q.setSelectionRange(z,ne)}},[p.comboboxState]);let k=u.useRef(!1),A=N(()=>{k.current=!0}),G=N(()=>{w.nextFrame(()=>{k.current=!1})}),U=N(T=>{switch(y.current=!0,T.key){case J.Enter:if(y.current=!1,p.comboboxState!==0||k.current)return;if(T.preventDefault(),T.stopPropagation(),p.activeOptionIndex===null){g.closeCombobox();return}g.selectActiveOption(),p.mode===0&&g.closeCombobox();break;case J.ArrowDown:return y.current=!1,T.preventDefault(),T.stopPropagation(),ce(p.comboboxState,{0:()=>g.goToOption(ee.Next),1:()=>g.openCombobox()});case J.ArrowUp:return y.current=!1,T.preventDefault(),T.stopPropagation(),ce(p.comboboxState,{0:()=>g.goToOption(ee.Previous),1:()=>{g.openCombobox(),w.nextFrame(()=>{p.value||g.goToOption(ee.Last)})}});case J.Home:if(T.shiftKey)break;return y.current=!1,T.preventDefault(),T.stopPropagation(),g.goToOption(ee.First);case J.PageUp:return y.current=!1,T.preventDefault(),T.stopPropagation(),g.goToOption(ee.First);case J.End:if(T.shiftKey)break;return y.current=!1,T.preventDefault(),T.stopPropagation(),g.goToOption(ee.Last);case J.PageDown:return y.current=!1,T.preventDefault(),T.stopPropagation(),g.goToOption(ee.Last);case J.Escape:return y.current=!1,p.comboboxState!==0?void 0:(T.preventDefault(),p.optionsRef.current&&!p.optionsPropsRef.current.static&&T.stopPropagation(),p.nullable&&p.mode===0&&p.value===null&&O(),g.closeCombobox());case J.Tab:if(y.current=!1,p.comboboxState!==0)return;p.mode===0&&p.activationTrigger!==1&&g.selectActiveOption(),g.closeCombobox();break}}),B=N(T=>{d==null||d(T),p.nullable&&p.mode===0&&T.target.value===""&&O(),g.openCombobox()}),D=N(T=>{var te,q,P;let z=(te=T.relatedTarget)!=null?te:Te.find(ne=>ne!==T.currentTarget);if(y.current=!1,!((q=p.optionsRef.current)!=null&&q.contains(z))&&!((P=p.buttonRef.current)!=null&&P.contains(z))&&p.comboboxState===0)return T.preventDefault(),p.mode===0&&(p.nullable&&p.value===null?O():p.activationTrigger!==1&&g.selectActiveOption()),g.closeCombobox()}),_=N(T=>{var te,q,P;let z=(te=T.relatedTarget)!=null?te:Te.find(ne=>ne!==T.currentTarget);(q=p.buttonRef.current)!=null&&q.contains(z)||(P=p.optionsRef.current)!=null&&P.contains(z)||p.disabled||p.immediate&&p.comboboxState!==0&&(g.openCombobox(),w.nextFrame(()=>{g.setActivationTrigger(1)}))}),Y=Nt(()=>{if(p.labelId)return[p.labelId].join(" ")},[p.labelId]),Z=u.useMemo(()=>({open:p.comboboxState===0,disabled:p.disabled}),[p]),se={ref:x,id:a,role:"combobox",type:h,"aria-controls":(t=p.optionsRef.current)==null?void 0:t.id,"aria-expanded":p.comboboxState===0,"aria-activedescendant":p.activeOptionIndex===null?void 0:p.virtual?(r=p.options.find(T=>{var te;return!((te=p.virtual)!=null&&te.disabled(T.dataRef.current.value))&&p.compare(T.dataRef.current.value,p.virtual.options[p.activeOptionIndex])}))==null?void 0:r.id:(o=p.options[p.activeOptionIndex])==null?void 0:o.id,"aria-labelledby":Y,"aria-autocomplete":"list",defaultValue:(l=(i=e.defaultValue)!=null?i:p.defaultValue!==void 0?c==null?void 0:c(p.defaultValue):null)!=null?l:p.defaultValue,disabled:p.disabled,onCompositionStart:A,onCompositionEnd:G,onKeyDown:U,onChange:B,onFocus:_,onBlur:D};return ae({ourProps:se,theirProps:b,slot:Z,defaultTag:xo,name:"Combobox.Input"})}let yo="button";function Eo(e,n){var t;let r=Le("Combobox.Button"),o=Xe("Combobox.Button"),i=me(r.buttonRef,n),l=xe(),{id:s=`headlessui-combobox-button-${l}`,...a}=e,d=je(),c=N(x=>{switch(x.key){case J.ArrowDown:return x.preventDefault(),x.stopPropagation(),r.comboboxState===1&&o.openCombobox(),d.nextFrame(()=>{var v;return(v=r.inputRef.current)==null?void 0:v.focus({preventScroll:!0})});case J.ArrowUp:return x.preventDefault(),x.stopPropagation(),r.comboboxState===1&&(o.openCombobox(),d.nextFrame(()=>{r.value||o.goToOption(ee.Last)})),d.nextFrame(()=>{var v;return(v=r.inputRef.current)==null?void 0:v.focus({preventScroll:!0})});case J.Escape:return r.comboboxState!==0?void 0:(x.preventDefault(),r.optionsRef.current&&!r.optionsPropsRef.current.static&&x.stopPropagation(),o.closeCombobox(),d.nextFrame(()=>{var v;return(v=r.inputRef.current)==null?void 0:v.focus({preventScroll:!0})}));default:return}}),h=N(x=>{if(pt(x.currentTarget))return x.preventDefault();r.comboboxState===0?o.closeCombobox():(x.preventDefault(),o.openCombobox()),d.nextFrame(()=>{var v;return(v=r.inputRef.current)==null?void 0:v.focus({preventScroll:!0})})}),b=Nt(()=>{if(r.labelId)return[r.labelId,s].join(" ")},[r.labelId,s]),p=u.useMemo(()=>({open:r.comboboxState===0,disabled:r.disabled,value:r.value}),[r]),g={ref:i,id:s,type:Mt(e,r.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(t=r.optionsRef.current)==null?void 0:t.id,"aria-expanded":r.comboboxState===0,"aria-labelledby":b,disabled:r.disabled,onClick:h,onKeyDown:c};return ae({ourProps:g,theirProps:a,slot:p,defaultTag:yo,name:"Combobox.Button"})}let So="label";function To(e,n){let t=xe(),{id:r=`headlessui-combobox-label-${t}`,...o}=e,i=Le("Combobox.Label"),l=Xe("Combobox.Label"),s=me(i.labelRef,n);X(()=>l.registerLabel(r),[r]);let a=N(()=>{var c;return(c=i.inputRef.current)==null?void 0:c.focus({preventScroll:!0})}),d=u.useMemo(()=>({open:i.comboboxState===0,disabled:i.disabled}),[i]);return ae({ourProps:{ref:s,id:r,onClick:a},theirProps:o,slot:d,defaultTag:So,name:"Combobox.Label"})}let Co="ul",Oo=Pe.RenderStrategy|Pe.Static;function jo(e,n){let t=xe(),{id:r=`headlessui-combobox-options-${t}`,hold:o=!1,...i}=e,l=Le("Combobox.Options"),s=me(l.optionsRef,n),a=Qe(),d=a!==null?(a&pe.Open)===pe.Open:l.comboboxState===0;X(()=>{var p;l.optionsPropsRef.current.static=(p=e.static)!=null?p:!1},[l.optionsPropsRef,e.static]),X(()=>{l.optionsPropsRef.current.hold=o},[l.optionsPropsRef,o]),jn({container:l.optionsRef.current,enabled:l.comboboxState===0,accept(p){return p.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:p.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(p){p.setAttribute("role","none")}});let c=Nt(()=>{var p,g;return(g=l.labelId)!=null?g:(p=l.buttonRef.current)==null?void 0:p.id},[l.labelId,l.buttonRef.current]),h=u.useMemo(()=>({open:l.comboboxState===0,option:void 0}),[l]),b={"aria-labelledby":c,role:"listbox","aria-multiselectable":l.mode===1?!0:void 0,id:r,ref:s};return l.virtual&&l.comboboxState===0&&Object.assign(i,{children:u.createElement(ho,null,i.children)}),ae({ourProps:b,theirProps:i,slot:h,defaultTag:Co,features:Oo,visible:d,name:"Combobox.Options"})}let No="li";function Fo(e,n){var t;let r=xe(),{id:o=`headlessui-combobox-option-${r}`,disabled:i=!1,value:l,order:s=null,...a}=e,d=Le("Combobox.Option"),c=Xe("Combobox.Option"),h=d.virtual?d.activeOptionIndex===d.calculateIndex(l):d.activeOptionIndex===null?!1:((t=d.options[d.activeOptionIndex])==null?void 0:t.id)===o,b=d.isSelected(l),p=u.useRef(null),g=Se({disabled:i,value:l,domRef:p,order:s}),x=u.useContext($n),v=me(n,p,x?x.measureElement:null),y=N(()=>c.onChange(l));X(()=>c.registerOption(o,g),[g,o]);let w=u.useRef(!(d.virtual||d.__demoMode));X(()=>{if(!d.virtual||!d.__demoMode)return;let D=ye();return D.requestAnimationFrame(()=>{w.current=!0}),D.dispose},[d.virtual,d.__demoMode]),X(()=>{if(!w.current||d.comboboxState!==0||!h||d.activationTrigger===0)return;let D=ye();return D.requestAnimationFrame(()=>{var _,Y;(Y=(_=p.current)==null?void 0:_.scrollIntoView)==null||Y.call(_,{block:"nearest"})}),D.dispose},[p,h,d.comboboxState,d.activationTrigger,d.activeOptionIndex]);let O=N(D=>{var _;if(i||(_=d.virtual)!=null&&_.disabled(l))return D.preventDefault();y(),yn()||requestAnimationFrame(()=>{var Y;return(Y=d.inputRef.current)==null?void 0:Y.focus({preventScroll:!0})}),d.mode===0&&requestAnimationFrame(()=>c.closeCombobox())}),I=N(()=>{var D;if(i||(D=d.virtual)!=null&&D.disabled(l))return c.goToOption(ee.Nothing);let _=d.calculateIndex(l);c.goToOption(ee.Specific,_)}),k=On(),A=N(D=>k.update(D)),G=N(D=>{var _;if(!k.wasMoved(D)||i||(_=d.virtual)!=null&&_.disabled(l)||h)return;let Y=d.calculateIndex(l);c.goToOption(ee.Specific,Y,0)}),U=N(D=>{var _;k.wasMoved(D)&&(i||(_=d.virtual)!=null&&_.disabled(l)||h&&(d.optionsPropsRef.current.hold||c.goToOption(ee.Nothing)))}),B=u.useMemo(()=>({active:h,selected:b,disabled:i}),[h,b,i]);return ae({ourProps:{id:o,ref:v,role:"option",tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0?!0:void 0,"aria-selected":b,disabled:void 0,onClick:O,onFocus:I,onPointerEnter:A,onMouseEnter:A,onPointerMove:G,onMouseMove:G,onPointerLeave:U,onMouseLeave:U},theirProps:a,slot:B,defaultTag:No,name:"Combobox.Option"})}let Io=ue(bo),ko=ue(Eo),$o=ue(wo),Po=ue(To),Mo=ue(jo),Ao=ue(Fo),Fe=Object.assign(Io,{Input:$o,Button:ko,Label:Po,Options:Mo,Option:Ao});function Pn(e,n,t,r){let o=Se(t);u.useEffect(()=>{e=e??window;function i(l){o.current(l)}return e.addEventListener(n,i,r),()=>e.removeEventListener(n,i,r)},[e,n,r])}function et(){let e=u.useRef(!1);return X(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Mn(e){let n=N(e),t=u.useRef(!1);u.useEffect(()=>(t.current=!1,()=>{t.current=!0,at(()=>{t.current&&n()})}),[n])}var tt=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(tt||{});function Do(){let e=u.useRef(0);return En("keydown",n=>{n.key==="Tab"&&(e.current=n.shiftKey?1:0)},!0),e}function An(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let n=new Set;for(let t of e.current)t.current instanceof HTMLElement&&n.add(t.current);return n}let _o="div";var Dn=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(Dn||{});function Lo(e,n){let t=u.useRef(null),r=me(t,n),{initialFocus:o,containers:i,features:l=30,...s}=e;We()||(l=1);let a=_e(t);zo({ownerDocument:a},!!(l&16));let d=Wo({ownerDocument:a,container:t,initialFocus:o},!!(l&2));Uo({ownerDocument:a,container:t,containers:i,previousActiveElement:d},!!(l&8));let c=Do(),h=N(x=>{let v=t.current;v&&(y=>y())(()=>{ce(c.current,{[tt.Forwards]:()=>{Ze(v,Ne.First,{skipElements:[x.relatedTarget]})},[tt.Backwards]:()=>{Ze(v,Ne.Last,{skipElements:[x.relatedTarget]})}})})}),b=je(),p=u.useRef(!1),g={ref:r,onKeyDown(x){x.key=="Tab"&&(p.current=!0,b.requestAnimationFrame(()=>{p.current=!1}))},onBlur(x){let v=An(i);t.current instanceof HTMLElement&&v.add(t.current);let y=x.relatedTarget;y instanceof HTMLElement&&y.dataset.headlessuiFocusGuard!=="true"&&(_n(v,y)||(p.current?Ze(t.current,ce(c.current,{[tt.Forwards]:()=>Ne.Next,[tt.Backwards]:()=>Ne.Previous})|Ne.WrapAround,{relativeTo:x.target}):x.target instanceof HTMLElement&&$e(x.target)))}};return u.createElement(u.Fragment,null,!!(l&4)&&u.createElement(Je,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:Ue.Focusable}),ae({ourProps:g,theirProps:s,defaultTag:_o,name:"FocusTrap"}),!!(l&4)&&u.createElement(Je,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:Ue.Focusable}))}let Ro=ue(Lo),nt=Object.assign(Ro,{features:Dn});function Bo(e=!0){let n=u.useRef(Te.slice());return Ke(([t],[r])=>{r===!0&&t===!1&&at(()=>{n.current.splice(0)}),r===!1&&t===!0&&(n.current=Te.slice())},[e,Te,n]),N(()=>{var t;return(t=n.current.find(r=>r!=null&&r.isConnected))!=null?t:null})}function zo({ownerDocument:e},n){let t=Bo(n);Ke(()=>{n||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&$e(t())},[n]),Mn(()=>{n&&$e(t())})}function Wo({ownerDocument:e,container:n,initialFocus:t},r){let o=u.useRef(null),i=et();return Ke(()=>{if(!r)return;let l=n.current;l&&at(()=>{if(!i.current)return;let s=e==null?void 0:e.activeElement;if(t!=null&&t.current){if((t==null?void 0:t.current)===s){o.current=s;return}}else if(l.contains(s)){o.current=s;return}t!=null&&t.current?$e(t.current):Ze(l,Ne.First)===gn.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),o.current=e==null?void 0:e.activeElement})},[r]),o}function Uo({ownerDocument:e,container:n,containers:t,previousActiveElement:r},o){let i=et();Pn(e==null?void 0:e.defaultView,"focus",l=>{if(!o||!i.current)return;let s=An(t);n.current instanceof HTMLElement&&s.add(n.current);let a=r.current;if(!a)return;let d=l.target;d&&d instanceof HTMLElement?_n(s,d)?(r.current=d,$e(d)):(l.preventDefault(),l.stopPropagation(),$e(a)):$e(r.current)},!0)}function _n(e,n){for(let t of e)if(t.contains(n))return!0;return!1}let Ln=u.createContext(!1);function Ho(){return u.useContext(Ln)}function Wt(e){return u.createElement(Ln.Provider,{value:e.force},e.children)}function Vo(e){let n=Ho(),t=u.useContext(Rn),r=_e(e),[o,i]=u.useState(()=>{if(!n&&t!==null||Oe.isServer)return null;let l=r==null?void 0:r.getElementById("headlessui-portal-root");if(l)return l;if(r===null)return null;let s=r.createElement("div");return s.setAttribute("id","headlessui-portal-root"),r.body.appendChild(s)});return u.useEffect(()=>{o!==null&&(r!=null&&r.body.contains(o)||r==null||r.body.appendChild(o))},[o,r]),u.useEffect(()=>{n||t!==null&&i(t.current)},[t,i,n]),o}let Yo=u.Fragment;function qo(e,n){let t=e,r=u.useRef(null),o=me(to(c=>{r.current=c}),n),i=_e(r),l=Vo(r),[s]=u.useState(()=>{var c;return Oe.isServer?null:(c=i==null?void 0:i.createElement("div"))!=null?c:null}),a=u.useContext(Ut),d=We();return X(()=>{!l||!s||l.contains(s)||(s.setAttribute("data-headlessui-portal",""),l.appendChild(s))},[l,s]),X(()=>{if(s&&a)return a.register(s)},[a,s]),Mn(()=>{var c;!l||!s||(s instanceof Node&&l.contains(s)&&l.removeChild(s),l.childNodes.length<=0&&((c=l.parentElement)==null||c.removeChild(l)))}),d?!l||!s?null:St.createPortal(ae({ourProps:{ref:o},theirProps:t,defaultTag:Yo,name:"Portal"}),s):null}let Go=u.Fragment,Rn=u.createContext(null);function Zo(e,n){let{target:t,...r}=e,o={ref:me(n)};return u.createElement(Rn.Provider,{value:t},ae({ourProps:o,theirProps:r,defaultTag:Go,name:"Popover.Group"}))}let Ut=u.createContext(null);function Ko(){let e=u.useContext(Ut),n=u.useRef([]),t=N(i=>(n.current.push(i),e&&e.register(i),()=>r(i))),r=N(i=>{let l=n.current.indexOf(i);l!==-1&&n.current.splice(l,1),e&&e.unregister(i)}),o=u.useMemo(()=>({register:t,unregister:r,portals:n}),[t,r,n]);return[n,u.useMemo(()=>function({children:i}){return u.createElement(Ut.Provider,{value:o},i)},[o])]}let Jo=ue(qo),Qo=ue(Zo),Ht=Object.assign(Jo,{Group:Qo});function Xo(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}const el=typeof Object.is=="function"?Object.is:Xo,{useState:tl,useEffect:nl,useLayoutEffect:rl,useDebugValue:ol}=E;function ll(e,n,t){const r=n(),[{inst:o},i]=tl({inst:{value:r,getSnapshot:n}});return rl(()=>{o.value=r,o.getSnapshot=n,Vt(o)&&i({inst:o})},[e,r,n]),nl(()=>(Vt(o)&&i({inst:o}),e(()=>{Vt(o)&&i({inst:o})})),[e]),ol(r),r}function Vt(e){const n=e.getSnapshot,t=e.value;try{const r=n();return!el(t,r)}catch{return!0}}function il(e,n,t){return n()}const sl=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",al=!sl,ul=al?il:ll,cl="useSyncExternalStore"in E?(e=>e.useSyncExternalStore)(E):ul;function dl(e){return cl(e.subscribe,e.getSnapshot,e.getSnapshot)}function fl(e,n){let t=e(),r=new Set;return{getSnapshot(){return t},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...i){let l=n[o].call(t,...i);l&&(t=l,r.forEach(s=>s()))}}}function ml(){let e;return{before({doc:n}){var t;let r=n.documentElement;e=((t=n.defaultView)!=null?t:window).innerWidth-r.clientWidth},after({doc:n,d:t}){let r=n.documentElement,o=r.clientWidth-r.offsetWidth,i=e-o;t.style(r,"paddingRight",`${i}px`)}}}function pl(){return wn()?{before({doc:e,d:n,meta:t}){function r(o){return t.containers.flatMap(i=>i()).some(i=>i.contains(o))}n.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let s=ye();s.style(e.documentElement,"scrollBehavior","auto"),n.add(()=>n.microTask(()=>s.dispose()))}let i=(o=window.scrollY)!=null?o:window.pageYOffset,l=null;n.addEventListener(e,"click",s=>{if(s.target instanceof HTMLElement)try{let a=s.target.closest("a");if(!a)return;let{hash:d}=new URL(a.href),c=e.querySelector(d);c&&!r(c)&&(l=c)}catch{}},!0),n.addEventListener(e,"touchstart",s=>{if(s.target instanceof HTMLElement)if(r(s.target)){let a=s.target;for(;a.parentElement&&r(a.parentElement);)a=a.parentElement;n.style(a,"overscrollBehavior","contain")}else n.style(s.target,"touchAction","none")}),n.addEventListener(e,"touchmove",s=>{if(s.target instanceof HTMLElement)if(r(s.target)){let a=s.target;for(;a.parentElement&&a.dataset.headlessuiPortal!==""&&!(a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth);)a=a.parentElement;a.dataset.headlessuiPortal===""&&s.preventDefault()}else s.preventDefault()},{passive:!1}),n.add(()=>{var s;let a=(s=window.scrollY)!=null?s:window.pageYOffset;i!==a&&window.scrollTo(0,i),l&&l.isConnected&&(l.scrollIntoView({block:"nearest"}),l=null)})})}}:{}}function hl(){return{before({doc:e,d:n}){n.style(e.documentElement,"overflow","hidden")}}}function vl(e){let n={};for(let t of e)Object.assign(n,t(n));return n}let Re=fl(()=>new Map,{PUSH(e,n){var t;let r=(t=this.get(e))!=null?t:{doc:e,count:0,d:ye(),meta:new Set};return r.count++,r.meta.add(n),this.set(e,r),this},POP(e,n){let t=this.get(e);return t&&(t.count--,t.meta.delete(n)),this},SCROLL_PREVENT({doc:e,d:n,meta:t}){let r={doc:e,d:n,meta:vl(t)},o=[pl(),ml(),hl()];o.forEach(({before:i})=>i==null?void 0:i(r)),o.forEach(({after:i})=>i==null?void 0:i(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Re.subscribe(()=>{let e=Re.getSnapshot(),n=new Map;for(let[t]of e)n.set(t,t.documentElement.style.overflow);for(let t of e.values()){let r=n.get(t.doc)==="hidden",o=t.count!==0;(o&&!r||!o&&r)&&Re.dispatch(t.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",t),t.count===0&&Re.dispatch("TEARDOWN",t)}});function gl(e,n,t){let r=dl(Re),o=e?r.get(e):void 0,i=o?o.count>0:!1;return X(()=>{if(!(!e||!n))return Re.dispatch("PUSH",e,t),()=>Re.dispatch("POP",e,t)},[n,e]),i}let Yt=new Map,rt=new Map;function Bn(e,n=!0){X(()=>{var t;if(!n)return;let r=typeof e=="function"?e():e.current;if(!r)return;function o(){var l;if(!r)return;let s=(l=rt.get(r))!=null?l:1;if(s===1?rt.delete(r):rt.set(r,s-1),s!==1)return;let a=Yt.get(r);a&&(a["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",a["aria-hidden"]),r.inert=a.inert,Yt.delete(r))}let i=(t=rt.get(r))!=null?t:0;return rt.set(r,i+1),i!==0||(Yt.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),o},[e,n])}function bl({defaultContainers:e=[],portals:n,mainTreeNodeRef:t}={}){var r;let o=u.useRef((r=t==null?void 0:t.current)!=null?r:null),i=_e(o),l=N(()=>{var s,a,d;let c=[];for(let h of e)h!==null&&(h instanceof HTMLElement?c.push(h):"current"in h&&h.current instanceof HTMLElement&&c.push(h.current));if(n!=null&&n.current)for(let h of n.current)c.push(h);for(let h of(s=i==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?s:[])h!==document.body&&h!==document.head&&h instanceof HTMLElement&&h.id!=="headlessui-portal-root"&&(h.contains(o.current)||h.contains((d=(a=o.current)==null?void 0:a.getRootNode())==null?void 0:d.host)||c.some(b=>h.contains(b))||c.push(h));return c});return{resolveContainers:l,contains:N(s=>l().some(a=>a.contains(s))),mainTreeNodeRef:o,MainTreeNode:u.useMemo(()=>function(){return t!=null?null:u.createElement(Je,{features:Ue.Hidden,ref:o})},[o,t])}}let qt=u.createContext(()=>{});qt.displayName="StackContext";var Gt=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Gt||{});function xl(){return u.useContext(qt)}function wl({children:e,onUpdate:n,type:t,element:r,enabled:o}){let i=xl(),l=N((...s)=>{n==null||n(...s),i(...s)});return X(()=>{let s=o===void 0||o===!0;return s&&l(0,t,r),()=>{s&&l(1,t,r)}},[l,t,r,o]),u.createElement(qt.Provider,{value:l},e)}let zn=u.createContext(null);function Wn(){let e=u.useContext(zn);if(e===null){let n=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(n,Wn),n}return e}function Un(){let[e,n]=u.useState([]);return[e.length>0?e.join(" "):void 0,u.useMemo(()=>function(t){let r=N(i=>(n(l=>[...l,i]),()=>n(l=>{let s=l.slice(),a=s.indexOf(i);return a!==-1&&s.splice(a,1),s}))),o=u.useMemo(()=>({register:r,slot:t.slot,name:t.name,props:t.props}),[r,t.slot,t.name,t.props]);return u.createElement(zn.Provider,{value:o},t.children)},[n])]}let yl="p";function El(e,n){let t=xe(),{id:r=`headlessui-description-${t}`,...o}=e,i=Wn(),l=me(n);X(()=>i.register(r),[r,i.register]);let s={ref:l,...i.props,id:r};return ae({ourProps:s,theirProps:o,slot:i.slot||{},defaultTag:yl,name:i.name||"Description"})}let Sl=ue(El),Hn=Object.assign(Sl,{});var Tl=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Tl||{}),Cl=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(Cl||{});let Ol={0(e,n){return e.titleId===n.id?e:{...e,titleId:n.id}}},ht=u.createContext(null);ht.displayName="DialogContext";function ot(e){let n=u.useContext(ht);if(n===null){let t=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,ot),t}return n}function jl(e,n,t=()=>[document.body]){gl(e,n,r=>{var o;return{containers:[...(o=r.containers)!=null?o:[],t]}})}function Nl(e,n){return ce(n.type,Ol,e,n)}let Fl="div",Il=Pe.RenderStrategy|Pe.Static;function kl(e,n){let t=xe(),{id:r=`headlessui-dialog-${t}`,open:o,onClose:i,initialFocus:l,role:s="dialog",__demoMode:a=!1,...d}=e,[c,h]=u.useState(0),b=u.useRef(!1);s=function(){return s==="dialog"||s==="alertdialog"?s:(b.current||(b.current=!0,console.warn(`Invalid role [${s}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let p=Qe();o===void 0&&p!==null&&(o=(p&pe.Open)===pe.Open);let g=u.useRef(null),x=me(g,n),v=_e(g),y=e.hasOwnProperty("open")||p!==null,w=e.hasOwnProperty("onClose");if(!y&&!w)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!y)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!w)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof o!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${o}`);if(typeof i!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${i}`);let O=o?0:1,[I,k]=u.useReducer(Nl,{titleId:null,descriptionId:null,panelRef:u.createRef()}),A=N(()=>i(!1)),G=N(F=>k({type:0,id:F})),U=We()?a?!1:O===0:!1,B=c>1,D=u.useContext(ht)!==null,[_,Y]=Ko(),Z={get current(){var F;return(F=I.panelRef.current)!=null?F:g.current}},{resolveContainers:se,mainTreeNodeRef:T,MainTreeNode:te}=bl({portals:_,defaultContainers:[Z]}),q=B?"parent":"leaf",P=p!==null?(p&pe.Closing)===pe.Closing:!1,z=D||P?!1:U,ne=u.useCallback(()=>{var F,W;return(W=Array.from((F=v==null?void 0:v.querySelectorAll("body > *"))!=null?F:[]).find(de=>de.id==="headlessui-portal-root"?!1:de.contains(T.current)&&de instanceof HTMLElement))!=null?W:null},[T]);Bn(ne,z);let re=B?!0:U,he=u.useCallback(()=>{var F,W;return(W=Array.from((F=v==null?void 0:v.querySelectorAll("[data-headlessui-portal]"))!=null?F:[]).find(de=>de.contains(T.current)&&de instanceof HTMLElement))!=null?W:null},[T]);Bn(he,re),Pt(se,F=>{F.preventDefault(),A()},!(!U||B));let fe=!(B||O!==0);Pn(v==null?void 0:v.defaultView,"keydown",F=>{fe&&(F.defaultPrevented||F.key===J.Escape&&(F.preventDefault(),F.stopPropagation(),A()))}),jl(v,!(P||O!==0||D),se),u.useEffect(()=>{if(O!==0||!g.current)return;let F=new ResizeObserver(W=>{for(let de of W){let Ie=de.target.getBoundingClientRect();Ie.x===0&&Ie.y===0&&Ie.width===0&&Ie.height===0&&A()}});return F.observe(g.current),()=>F.disconnect()},[O,g,A]);let[H,le]=Un(),oe=u.useMemo(()=>[{dialogState:O,close:A,setTitleId:G},I],[O,I,A,G]),M=u.useMemo(()=>({open:O===0}),[O]),C={ref:x,id:r,role:s,"aria-modal":O===0?!0:void 0,"aria-labelledby":I.titleId,"aria-describedby":H};return u.createElement(wl,{type:"Dialog",enabled:O===0,element:g,onUpdate:N((F,W)=>{W==="Dialog"&&ce(F,{[Gt.Add]:()=>h(de=>de+1),[Gt.Remove]:()=>h(de=>de-1)})})},u.createElement(Wt,{force:!0},u.createElement(Ht,null,u.createElement(ht.Provider,{value:oe},u.createElement(Ht.Group,{target:g},u.createElement(Wt,{force:!1},u.createElement(le,{slot:M,name:"Dialog.Description"},u.createElement(nt,{initialFocus:l,containers:se,features:U?ce(q,{parent:nt.features.RestoreFocus,leaf:nt.features.All&~nt.features.FocusLock}):nt.features.None},u.createElement(Y,null,ae({ourProps:C,theirProps:d,slot:M,defaultTag:Fl,features:Il,visible:O===0,name:"Dialog"}))))))))),u.createElement(te,null))}let $l="div";function Pl(e,n){let t=xe(),{id:r=`headlessui-dialog-overlay-${t}`,...o}=e,[{dialogState:i,close:l}]=ot("Dialog.Overlay"),s=me(n),a=N(c=>{if(c.target===c.currentTarget){if(pt(c.currentTarget))return c.preventDefault();c.preventDefault(),c.stopPropagation(),l()}}),d=u.useMemo(()=>({open:i===0}),[i]);return ae({ourProps:{ref:s,id:r,"aria-hidden":!0,onClick:a},theirProps:o,slot:d,defaultTag:$l,name:"Dialog.Overlay"})}let Ml="div";function Al(e,n){let t=xe(),{id:r=`headlessui-dialog-backdrop-${t}`,...o}=e,[{dialogState:i},l]=ot("Dialog.Backdrop"),s=me(n);u.useEffect(()=>{if(l.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[l.panelRef]);let a=u.useMemo(()=>({open:i===0}),[i]);return u.createElement(Wt,{force:!0},u.createElement(Ht,null,ae({ourProps:{ref:s,id:r,"aria-hidden":!0},theirProps:o,slot:a,defaultTag:Ml,name:"Dialog.Backdrop"})))}let Dl="div";function _l(e,n){let t=xe(),{id:r=`headlessui-dialog-panel-${t}`,...o}=e,[{dialogState:i},l]=ot("Dialog.Panel"),s=me(n,l.panelRef),a=u.useMemo(()=>({open:i===0}),[i]),d=N(c=>{c.stopPropagation()});return ae({ourProps:{ref:s,id:r,onClick:d},theirProps:o,slot:a,defaultTag:Dl,name:"Dialog.Panel"})}let Ll="h2";function Rl(e,n){let t=xe(),{id:r=`headlessui-dialog-title-${t}`,...o}=e,[{dialogState:i,setTitleId:l}]=ot("Dialog.Title"),s=me(n);u.useEffect(()=>(l(r),()=>l(null)),[r,l]);let a=u.useMemo(()=>({open:i===0}),[i]);return ae({ourProps:{ref:s,id:r},theirProps:o,slot:a,defaultTag:Ll,name:"Dialog.Title"})}let Bl=ue(kl),zl=ue(Al),Wl=ue(_l),Ul=ue(Pl),Hl=ue(Rl),Vn=Object.assign(Bl,{Backdrop:zl,Panel:Wl,Overlay:Ul,Title:Hl,Description:Hn}),Yn=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function qn(e){var n,t;let r=(n=e.innerText)!=null?n:"",o=e.cloneNode(!0);if(!(o instanceof HTMLElement))return r;let i=!1;for(let s of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),i=!0;let l=i?(t=o.innerText)!=null?t:"":r;return Yn.test(l)&&(l=l.replace(Yn,"")),l}function Vl(e){let n=e.getAttribute("aria-label");if(typeof n=="string")return n.trim();let t=e.getAttribute("aria-labelledby");if(t){let r=t.split(" ").map(o=>{let i=document.getElementById(o);if(i){let l=i.getAttribute("aria-label");return typeof l=="string"?l.trim():qn(i).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return qn(e).trim()}function Yl(e){let n=u.useRef(""),t=u.useRef("");return N(()=>{let r=e.current;if(!r)return"";let o=r.innerText;if(n.current===o)return t.current;let i=Vl(r).trim().toLowerCase();return n.current=o,t.current=i,i})}var ql=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(ql||{}),Gl=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Gl||{}),Zl=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem",e))(Zl||{});function Zt(e,n=t=>t){let t=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,r=$t(n(e.items.slice()),i=>i.dataRef.current.domRef.current),o=t?r.indexOf(t):null;return o===-1&&(o=null),{items:r,activeItemIndex:o}}let Kl={1(e){return e.menuState===1?e:{...e,activeItemIndex:null,menuState:1}},0(e){return e.menuState===0?e:{...e,__demoMode:!1,menuState:0}},2:(e,n)=>{var t;let r=Zt(e),o=Lt(n,{resolveItems:()=>r.items,resolveActiveIndex:()=>r.activeItemIndex,resolveId:i=>i.id,resolveDisabled:i=>i.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeItemIndex:o,activationTrigger:(t=n.trigger)!=null?t:1}},3:(e,n)=>{let t=e.searchQuery!==""?0:1,r=e.searchQuery+n.value.toLowerCase(),o=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+t).concat(e.items.slice(0,e.activeItemIndex+t)):e.items).find(l=>{var s;return((s=l.dataRef.current.textValue)==null?void 0:s.startsWith(r))&&!l.dataRef.current.disabled}),i=o?e.items.indexOf(o):-1;return i===-1||i===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:i,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,n)=>{let t=Zt(e,r=>[...r,{id:n.id,dataRef:n.dataRef}]);return{...e,...t}},6:(e,n)=>{let t=Zt(e,r=>{let o=r.findIndex(i=>i.id===n.id);return o!==-1&&r.splice(o,1),r});return{...e,...t,activationTrigger:1}}},Kt=u.createContext(null);Kt.displayName="MenuContext";function vt(e){let n=u.useContext(Kt);if(n===null){let t=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,vt),t}return n}function Jl(e,n){return ce(n.type,Kl,e,n)}let Ql=u.Fragment;function Xl(e,n){let{__demoMode:t=!1,...r}=e,o=u.useReducer(Jl,{__demoMode:t,menuState:t?0:1,buttonRef:u.createRef(),itemsRef:u.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:i,itemsRef:l,buttonRef:s},a]=o,d=me(n);Pt([s,l],(p,g)=>{var x;a({type:1}),kt(g,It.Loose)||(p.preventDefault(),(x=s.current)==null||x.focus())},i===0);let c=N(()=>{a({type:1})}),h=u.useMemo(()=>({open:i===0,close:c}),[i,c]),b={ref:d};return u.createElement(Kt.Provider,{value:o},u.createElement(_t,{value:ce(i,{0:pe.Open,1:pe.Closed})},ae({ourProps:b,theirProps:r,slot:h,defaultTag:Ql,name:"Menu"})))}let ei="button";function ti(e,n){var t;let r=xe(),{id:o=`headlessui-menu-button-${r}`,...i}=e,[l,s]=vt("Menu.Button"),a=me(l.buttonRef,n),d=je(),c=N(x=>{switch(x.key){case J.Space:case J.Enter:case J.ArrowDown:x.preventDefault(),x.stopPropagation(),s({type:0}),d.nextFrame(()=>s({type:2,focus:ee.First}));break;case J.ArrowUp:x.preventDefault(),x.stopPropagation(),s({type:0}),d.nextFrame(()=>s({type:2,focus:ee.Last}));break}}),h=N(x=>{switch(x.key){case J.Space:x.preventDefault();break}}),b=N(x=>{if(pt(x.currentTarget))return x.preventDefault();e.disabled||(l.menuState===0?(s({type:1}),d.nextFrame(()=>{var v;return(v=l.buttonRef.current)==null?void 0:v.focus({preventScroll:!0})})):(x.preventDefault(),s({type:0})))}),p=u.useMemo(()=>({open:l.menuState===0}),[l]),g={ref:a,id:o,type:Mt(e,l.buttonRef),"aria-haspopup":"menu","aria-controls":(t=l.itemsRef.current)==null?void 0:t.id,"aria-expanded":l.menuState===0,onKeyDown:c,onKeyUp:h,onClick:b};return ae({ourProps:g,theirProps:i,slot:p,defaultTag:ei,name:"Menu.Button"})}let ni="div",ri=Pe.RenderStrategy|Pe.Static;function oi(e,n){var t,r;let o=xe(),{id:i=`headlessui-menu-items-${o}`,...l}=e,[s,a]=vt("Menu.Items"),d=me(s.itemsRef,n),c=_e(s.itemsRef),h=je(),b=Qe(),p=b!==null?(b&pe.Open)===pe.Open:s.menuState===0;u.useEffect(()=>{let w=s.itemsRef.current;w&&s.menuState===0&&w!==(c==null?void 0:c.activeElement)&&w.focus({preventScroll:!0})},[s.menuState,s.itemsRef,c]),jn({container:s.itemsRef.current,enabled:s.menuState===0,accept(w){return w.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:w.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(w){w.setAttribute("role","none")}});let g=N(w=>{var O,I;switch(h.dispose(),w.key){case J.Space:if(s.searchQuery!=="")return w.preventDefault(),w.stopPropagation(),a({type:3,value:w.key});case J.Enter:if(w.preventDefault(),w.stopPropagation(),a({type:1}),s.activeItemIndex!==null){let{dataRef:k}=s.items[s.activeItemIndex];(I=(O=k.current)==null?void 0:O.domRef.current)==null||I.click()}xn(s.buttonRef.current);break;case J.ArrowDown:return w.preventDefault(),w.stopPropagation(),a({type:2,focus:ee.Next});case J.ArrowUp:return w.preventDefault(),w.stopPropagation(),a({type:2,focus:ee.Previous});case J.Home:case J.PageUp:return w.preventDefault(),w.stopPropagation(),a({type:2,focus:ee.First});case J.End:case J.PageDown:return w.preventDefault(),w.stopPropagation(),a({type:2,focus:ee.Last});case J.Escape:w.preventDefault(),w.stopPropagation(),a({type:1}),ye().nextFrame(()=>{var k;return(k=s.buttonRef.current)==null?void 0:k.focus({preventScroll:!0})});break;case J.Tab:w.preventDefault(),w.stopPropagation(),a({type:1}),ye().nextFrame(()=>{Xr(s.buttonRef.current,w.shiftKey?Ne.Previous:Ne.Next)});break;default:w.key.length===1&&(a({type:3,value:w.key}),h.setTimeout(()=>a({type:4}),350));break}}),x=N(w=>{switch(w.key){case J.Space:w.preventDefault();break}}),v=u.useMemo(()=>({open:s.menuState===0}),[s]),y={"aria-activedescendant":s.activeItemIndex===null||(t=s.items[s.activeItemIndex])==null?void 0:t.id,"aria-labelledby":(r=s.buttonRef.current)==null?void 0:r.id,id:i,onKeyDown:g,onKeyUp:x,role:"menu",tabIndex:0,ref:d};return ae({ourProps:y,theirProps:l,slot:v,defaultTag:ni,features:ri,visible:p,name:"Menu.Items"})}let li=u.Fragment;function ii(e,n){let t=xe(),{id:r=`headlessui-menu-item-${t}`,disabled:o=!1,...i}=e,[l,s]=vt("Menu.Item"),a=l.activeItemIndex!==null?l.items[l.activeItemIndex].id===r:!1,d=u.useRef(null),c=me(n,d);X(()=>{if(l.__demoMode||l.menuState!==0||!a||l.activationTrigger===0)return;let k=ye();return k.requestAnimationFrame(()=>{var A,G;(G=(A=d.current)==null?void 0:A.scrollIntoView)==null||G.call(A,{block:"nearest"})}),k.dispose},[l.__demoMode,d,a,l.menuState,l.activationTrigger,l.activeItemIndex]);let h=Yl(d),b=u.useRef({disabled:o,domRef:d,get textValue(){return h()}});X(()=>{b.current.disabled=o},[b,o]),X(()=>(s({type:5,id:r,dataRef:b}),()=>s({type:6,id:r})),[b,r]);let p=N(()=>{s({type:1})}),g=N(k=>{if(o)return k.preventDefault();s({type:1}),xn(l.buttonRef.current)}),x=N(()=>{if(o)return s({type:2,focus:ee.Nothing});s({type:2,focus:ee.Specific,id:r})}),v=On(),y=N(k=>v.update(k)),w=N(k=>{v.wasMoved(k)&&(o||a||s({type:2,focus:ee.Specific,id:r,trigger:0}))}),O=N(k=>{v.wasMoved(k)&&(o||a&&s({type:2,focus:ee.Nothing}))}),I=u.useMemo(()=>({active:a,disabled:o,close:p}),[a,o,p]);return ae({ourProps:{id:r,ref:c,role:"menuitem",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,disabled:void 0,onClick:g,onFocus:x,onPointerEnter:y,onMouseEnter:y,onPointerMove:w,onMouseMove:w,onPointerLeave:O,onMouseLeave:O},theirProps:i,slot:I,defaultTag:li,name:"Menu.Item"})}let si=ue(Xl),ai=ue(ti),ui=ue(oi),ci=ue(ii),gt=Object.assign(si,{Button:ai,Items:ui,Item:ci}),Gn=u.createContext(null);function Zn(){let e=u.useContext(Gn);if(e===null){let n=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(n,Zn),n}return e}function di(){let[e,n]=u.useState([]);return[e.length>0?e.join(" "):void 0,u.useMemo(()=>function(t){let r=N(i=>(n(l=>[...l,i]),()=>n(l=>{let s=l.slice(),a=s.indexOf(i);return a!==-1&&s.splice(a,1),s}))),o=u.useMemo(()=>({register:r,slot:t.slot,name:t.name,props:t.props}),[r,t.slot,t.name,t.props]);return u.createElement(Gn.Provider,{value:o},t.children)},[n])]}let fi="label";function mi(e,n){let t=xe(),{id:r=`headlessui-label-${t}`,passive:o=!1,...i}=e,l=Zn(),s=me(n);X(()=>l.register(r),[r,l.register]);let a={ref:s,...l.props,id:r};return o&&("onClick"in a&&(delete a.htmlFor,delete a.onClick),"onClick"in i&&delete i.onClick),ae({ourProps:a,theirProps:i,slot:l.slot||{},defaultTag:fi,name:l.name||"Label"})}let pi=ue(mi),hi=Object.assign(pi,{});function vi(e=0){let[n,t]=u.useState(e),r=et(),o=u.useCallback(a=>{r.current&&t(d=>d|a)},[n,r]),i=u.useCallback(a=>!!(n&a),[n]),l=u.useCallback(a=>{r.current&&t(d=>d&~a)},[t,r]),s=u.useCallback(a=>{r.current&&t(d=>d^a)},[t]);return{flags:n,addFlag:o,hasFlag:i,removeFlag:l,toggleFlag:s}}let Jt=u.createContext(null);Jt.displayName="GroupContext";let gi=u.Fragment;function bi(e){var n;let[t,r]=u.useState(null),[o,i]=di(),[l,s]=Un(),a=u.useMemo(()=>({switch:t,setSwitch:r,labelledby:o,describedby:l}),[t,r,o,l]),d={},c=e;return u.createElement(s,{name:"Switch.Description"},u.createElement(i,{name:"Switch.Label",props:{htmlFor:(n=a.switch)==null?void 0:n.id,onClick(h){t&&(h.currentTarget.tagName==="LABEL"&&h.preventDefault(),t.click(),t.focus({preventScroll:!0}))}}},u.createElement(Jt.Provider,{value:a},ae({ourProps:d,theirProps:c,defaultTag:gi,name:"Switch.Group"}))))}let xi="button";function wi(e,n){var t;let r=xe(),{id:o=`headlessui-switch-${r}`,checked:i,defaultChecked:l=!1,onChange:s,disabled:a=!1,name:d,value:c,form:h,...b}=e,p=u.useContext(Jt),g=u.useRef(null),x=me(g,n,p===null?null:p.setSwitch),[v,y]=hn(i,s,l),w=N(()=>y==null?void 0:y(!v)),O=N(B=>{if(pt(B.currentTarget))return B.preventDefault();B.preventDefault(),w()}),I=N(B=>{B.key===J.Space?(B.preventDefault(),w()):B.key===J.Enter&&ao(B.currentTarget)}),k=N(B=>B.preventDefault()),A=u.useMemo(()=>({checked:v}),[v]),G={id:o,ref:x,role:"switch",type:Mt(e,g),tabIndex:e.tabIndex===-1?0:(t=e.tabIndex)!=null?t:0,"aria-checked":v,"aria-labelledby":p==null?void 0:p.labelledby,"aria-describedby":p==null?void 0:p.describedby,disabled:a,onClick:O,onKeyUp:I,onKeyPress:k},U=je();return u.useEffect(()=>{var B;let D=(B=g.current)==null?void 0:B.closest("form");D&&l!==void 0&&U.addEventListener(D,"reset",()=>{y(l)})},[g,y]),u.createElement(u.Fragment,null,d!=null&&v&&u.createElement(Je,{features:Ue.Hidden,...mt({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:a,form:h,checked:v,name:d,value:c})}),ae({ourProps:G,theirProps:b,slot:A,defaultTag:xi,name:"Switch"}))}let yi=ue(wi),Ei=bi,Si=Object.assign(yi,{Group:Ei,Label:hi,Description:Hn});function Ti(e){let n={called:!1};return(...t)=>{if(!n.called)return n.called=!0,e(...t)}}function Qt(e,...n){e&&n.length>0&&e.classList.add(...n)}function Xt(e,...n){e&&n.length>0&&e.classList.remove(...n)}function Ci(e,n){let t=ye();if(!e)return t.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[i,l]=[r,o].map(a=>{let[d=0]=a.split(",").filter(Boolean).map(c=>c.includes("ms")?parseFloat(c):parseFloat(c)*1e3).sort((c,h)=>h-c);return d}),s=i+l;if(s!==0){t.group(d=>{d.setTimeout(()=>{n(),d.dispose()},s),d.addEventListener(e,"transitionrun",c=>{c.target===c.currentTarget&&d.dispose()})});let a=t.addEventListener(e,"transitionend",d=>{d.target===d.currentTarget&&(n(),a())})}else n();return t.add(()=>n()),t.dispose}function Oi(e,n,t,r){let o=t?"enter":"leave",i=ye(),l=r!==void 0?Ti(r):()=>{};o==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let s=ce(o,{enter:()=>n.enter,leave:()=>n.leave}),a=ce(o,{enter:()=>n.enterTo,leave:()=>n.leaveTo}),d=ce(o,{enter:()=>n.enterFrom,leave:()=>n.leaveFrom});return Xt(e,...n.base,...n.enter,...n.enterTo,...n.enterFrom,...n.leave,...n.leaveFrom,...n.leaveTo,...n.entered),Qt(e,...n.base,...s,...d),i.nextFrame(()=>{Xt(e,...n.base,...s,...d),Qt(e,...n.base,...s,...a),Ci(e,()=>(Xt(e,...n.base,...s),Qt(e,...n.base,...n.entered),l()))}),i.dispose}function ji({immediate:e,container:n,direction:t,classes:r,onStart:o,onStop:i}){let l=et(),s=je(),a=Se(t);X(()=>{e&&(a.current="enter")},[e]),X(()=>{let d=ye();s.add(d.dispose);let c=n.current;if(c&&a.current!=="idle"&&l.current)return d.dispose(),o.current(a.current),d.add(Oi(c,r.current,a.current==="enter",()=>{d.dispose(),i.current(a.current)})),d.dispose},[t])}function Ae(e=""){return e.split(/\s+/).filter(n=>n.length>1)}let bt=u.createContext(null);bt.displayName="TransitionContext";var Ni=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Ni||{});function Fi(){let e=u.useContext(bt);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function Ii(){let e=u.useContext(xt);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let xt=u.createContext(null);xt.displayName="NestingContext";function wt(e){return"children"in e?wt(e.children):e.current.filter(({el:n})=>n.current!==null).filter(({state:n})=>n==="visible").length>0}function Kn(e,n){let t=Se(e),r=u.useRef([]),o=et(),i=je(),l=N((p,g=Me.Hidden)=>{let x=r.current.findIndex(({el:v})=>v===p);x!==-1&&(ce(g,{[Me.Unmount](){r.current.splice(x,1)},[Me.Hidden](){r.current[x].state="hidden"}}),i.microTask(()=>{var v;!wt(r)&&o.current&&((v=t.current)==null||v.call(t))}))}),s=N(p=>{let g=r.current.find(({el:x})=>x===p);return g?g.state!=="visible"&&(g.state="visible"):r.current.push({el:p,state:"visible"}),()=>l(p,Me.Unmount)}),a=u.useRef([]),d=u.useRef(Promise.resolve()),c=u.useRef({enter:[],leave:[],idle:[]}),h=N((p,g,x)=>{a.current.splice(0),n&&(n.chains.current[g]=n.chains.current[g].filter(([v])=>v!==p)),n==null||n.chains.current[g].push([p,new Promise(v=>{a.current.push(v)})]),n==null||n.chains.current[g].push([p,new Promise(v=>{Promise.all(c.current[g].map(([y,w])=>w)).then(()=>v())})]),g==="enter"?d.current=d.current.then(()=>n==null?void 0:n.wait.current).then(()=>x(g)):x(g)}),b=N((p,g,x)=>{Promise.all(c.current[g].splice(0).map(([v,y])=>y)).then(()=>{var v;(v=a.current.shift())==null||v()}).then(()=>x(g))});return u.useMemo(()=>({children:r,register:s,unregister:l,onStart:h,onStop:b,wait:d,chains:c}),[s,l,r,h,b,c,d])}function ki(){}let $i=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Jn(e){var n;let t={};for(let r of $i)t[r]=(n=e[r])!=null?n:ki;return t}function Pi(e){let n=u.useRef(Jn(e));return u.useEffect(()=>{n.current=Jn(e)},[e]),n}let Mi="div",Qn=Pe.RenderStrategy;function Ai(e,n){var t,r;let{beforeEnter:o,afterEnter:i,beforeLeave:l,afterLeave:s,enter:a,enterFrom:d,enterTo:c,entered:h,leave:b,leaveFrom:p,leaveTo:g,...x}=e,v=u.useRef(null),y=me(v,n),w=(t=x.unmount)==null||t?Me.Unmount:Me.Hidden,{show:O,appear:I,initial:k}=Fi(),[A,G]=u.useState(O?"visible":"hidden"),U=Ii(),{register:B,unregister:D}=U;u.useEffect(()=>B(v),[B,v]),u.useEffect(()=>{if(w===Me.Hidden&&v.current){if(O&&A!=="visible"){G("visible");return}return ce(A,{hidden:()=>D(v),visible:()=>B(v)})}},[A,v,B,D,O,w]);let _=Se({base:Ae(x.className),enter:Ae(a),enterFrom:Ae(d),enterTo:Ae(c),entered:Ae(h),leave:Ae(b),leaveFrom:Ae(p),leaveTo:Ae(g)}),Y=Pi({beforeEnter:o,afterEnter:i,beforeLeave:l,afterLeave:s}),Z=We();u.useEffect(()=>{if(Z&&A==="visible"&&v.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[v,A,Z]);let se=k&&!I,T=I&&O&&k,te=!Z||se?"idle":O?"enter":"leave",q=vi(0),P=N(fe=>ce(fe,{enter:()=>{q.addFlag(pe.Opening),Y.current.beforeEnter()},leave:()=>{q.addFlag(pe.Closing),Y.current.beforeLeave()},idle:()=>{}})),z=N(fe=>ce(fe,{enter:()=>{q.removeFlag(pe.Opening),Y.current.afterEnter()},leave:()=>{q.removeFlag(pe.Closing),Y.current.afterLeave()},idle:()=>{}})),ne=Kn(()=>{G("hidden"),D(v)},U),re=u.useRef(!1);ji({immediate:T,container:v,classes:_,direction:te,onStart:Se(fe=>{re.current=!0,ne.onStart(v,fe,P)}),onStop:Se(fe=>{re.current=!1,ne.onStop(v,fe,z),fe==="leave"&&!wt(ne)&&(G("hidden"),D(v))})});let he=x,be={ref:y};return T?he={...he,className:dt(x.className,..._.current.enter,..._.current.enterFrom)}:re.current&&(he.className=dt(x.className,(r=v.current)==null?void 0:r.className),he.className===""&&delete he.className),u.createElement(xt.Provider,{value:ne},u.createElement(_t,{value:ce(A,{visible:pe.Open,hidden:pe.Closed})|q.flags},ae({ourProps:be,theirProps:he,defaultTag:Mi,features:Qn,visible:A==="visible",name:"Transition.Child"})))}function Di(e,n){let{show:t,appear:r=!1,unmount:o=!0,...i}=e,l=u.useRef(null),s=me(l,n);We();let a=Qe();if(t===void 0&&a!==null&&(t=(a&pe.Open)===pe.Open),![!0,!1].includes(t))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[d,c]=u.useState(t?"visible":"hidden"),h=Kn(()=>{c("hidden")}),[b,p]=u.useState(!0),g=u.useRef([t]);X(()=>{b!==!1&&g.current[g.current.length-1]!==t&&(g.current.push(t),p(!1))},[g,t]);let x=u.useMemo(()=>({show:t,appear:r,initial:b}),[t,r,b]);u.useEffect(()=>{if(t)c("visible");else if(!wt(h))c("hidden");else{let O=l.current;if(!O)return;let I=O.getBoundingClientRect();I.x===0&&I.y===0&&I.width===0&&I.height===0&&c("hidden")}},[t,h]);let v={unmount:o},y=N(()=>{var O;b&&p(!1),(O=e.beforeEnter)==null||O.call(e)}),w=N(()=>{var O;b&&p(!1),(O=e.beforeLeave)==null||O.call(e)});return u.createElement(xt.Provider,{value:h},u.createElement(bt.Provider,{value:x},ae({ourProps:{...v,as:u.Fragment,children:u.createElement(Xn,{ref:s,...v,...i,beforeEnter:y,beforeLeave:w})},theirProps:{},defaultTag:u.Fragment,features:Qn,visible:d==="visible",name:"Transition"})))}function _i(e,n){let t=u.useContext(bt)!==null,r=Qe()!==null;return u.createElement(u.Fragment,null,!t&&r?u.createElement(en,{ref:n,...e}):u.createElement(Xn,{ref:n,...e}))}let en=ue(Di),Xn=ue(Ai),Li=ue(_i),Be=Object.assign(en,{Child:Li,Root:en});function Ri({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M18 10a.75.75 0 0 1-.75.75H4.66l2.1 1.95a.75.75 0 1 1-1.02 1.1l-3.5-3.25a.75.75 0 0 1 0-1.1l3.5-3.25a.75.75 0 1 1 1.02 1.1l-2.1 1.95h12.59A.75.75 0 0 1 18 10Z",clipRule:"evenodd"}))}const Bi=E.forwardRef(Ri);function zi({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M2 10a.75.75 0 0 1 .75-.75h12.59l-2.1-1.95a.75.75 0 1 1 1.02-1.1l3.5 3.25a.75.75 0 0 1 0 1.1l-3.5 3.25a.75.75 0 1 1-1.02-1.1l2.1-1.95H2.75A.75.75 0 0 1 2 10Z",clipRule:"evenodd"}))}const Wi=E.forwardRef(zi);function Ui({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"}))}const Hi=E.forwardRef(Ui);function Vi({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const Yi=E.forwardRef(Vi);function qi({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M9.47 6.47a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 1 1-1.06 1.06L10 8.06l-3.72 3.72a.75.75 0 0 1-1.06-1.06l4.25-4.25Z",clipRule:"evenodd"}))}const Gi=E.forwardRef(qi);function Zi({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-8-5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0v-4.5A.75.75 0 0 1 10 5Zm0 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const er=E.forwardRef(Zi);function Ki({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const Ji=E.forwardRef(Ki);function Qi({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z",clipRule:"evenodd"}))}const Xi=E.forwardRef(Qi);function es({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM8.28 7.22a.75.75 0 0 0-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 1 0 1.06 1.06L10 11.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L11.06 10l1.72-1.72a.75.75 0 0 0-1.06-1.06L10 8.94 8.28 7.22Z",clipRule:"evenodd"}))}const ts=E.forwardRef(es),ns={warning:{color:"bg-yellow-50",icon:m.jsx(Ji,{className:"h-5 w-5 text-yellow-400","aria-hidden":"true"}),colorTitle:"text-yellow-800",colorText:"text-yellow-700"},error:{color:"bg-red-50",icon:m.jsx(ts,{className:"h-5 w-5 text-red-400","aria-hidden":"true"}),colorTitle:"text-red-800",colorText:"text-red-700"},success:{color:"bg-green-50",icon:m.jsx(Hi,{className:"h-5 w-5 text-green-400","aria-hidden":"true"}),colorTitle:"text-green-800",colorText:"text-green-700"},info:{color:"bg-blue-50",icon:m.jsx(Xi,{className:"h-5 w-5 text-blue-400","aria-hidden":"true"}),colorTitle:"text-blue-800",colorText:"text-blue-700"}},rs=({type:e="info",title:n,message:t,active:r=!1,time:o=1e3,onClose:i})=>{const[l,s]=u.useState(!1),a=u.useRef(null);u.useEffect(()=>(r&&(s(!0),a.current=setTimeout(()=>{s(!1),i&&i()},o)),()=>clearTimeout(a.current)),[r,o,i]);const d=ns[e];return l?m.jsx("div",{className:"fixed top-2.5 left-1/2 transform -translate-x-1/2 w-80 3xs:w-96 z-50",children:m.jsx(Be,{as:u.Fragment,show:l,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:m.jsxs("div",{className:$("rounded-md p-4 text-center",d.color),children:[m.jsxs("div",{className:"flex justify-center flex-shrink-0",children:[d.icon,m.jsx("h3",{className:$("text-sm font-medium ml-3",d.colorTitle),children:n})]}),m.jsx("div",{className:$("mt-2 text-sm",d.colorText),children:m.jsx("p",{children:t})})]})})}):null};function os({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))}const ls=E.forwardRef(os);function is({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M10.5 3.75a6.75 6.75 0 1 0 0 13.5 6.75 6.75 0 0 0 0-13.5ZM2.25 10.5a8.25 8.25 0 1 1 14.59 5.28l4.69 4.69a.75.75 0 1 1-1.06 1.06l-4.69-4.69A8.25 8.25 0 0 1 2.25 10.5Z",clipRule:"evenodd"}))}const ss=E.forwardRef(is);function as({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{d:"M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-8.4 8.4a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32l8.4-8.4Z"}),E.createElement("path",{d:"M5.25 5.25a3 3 0 0 0-3 3v10.5a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3V13.5a.75.75 0 0 0-1.5 0v5.25a1.5 1.5 0 0 1-1.5 1.5H5.25a1.5 1.5 0 0 1-1.5-1.5V8.25a1.5 1.5 0 0 1 1.5-1.5h5.25a.75.75 0 0 0 0-1.5H5.25Z"}))}const us=E.forwardRef(as);function cs({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M1.5 6a2.25 2.25 0 0 1 2.25-2.25h16.5A2.25 2.25 0 0 1 22.5 6v12a2.25 2.25 0 0 1-2.25 2.25H3.75A2.25 2.25 0 0 1 1.5 18V6ZM3 16.06V18c0 .414.336.75.75.75h16.5A.75.75 0 0 0 21 18v-1.94l-2.69-2.689a1.5 1.5 0 0 0-2.12 0l-.88.879.97.97a.75.75 0 1 1-1.06 1.06l-5.16-5.159a1.5 1.5 0 0 0-2.12 0L3 16.061Zm10.125-7.81a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0Z",clipRule:"evenodd"}))}const ds=E.forwardRef(cs);function fs({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M18.685 19.097A9.723 9.723 0 0 0 21.75 12c0-5.385-4.365-9.75-9.75-9.75S2.25 6.615 2.25 12a9.723 9.723 0 0 0 3.065 7.097A9.716 9.716 0 0 0 12 21.75a9.716 9.716 0 0 0 6.685-2.653Zm-12.54-1.285A7.486 7.486 0 0 1 12 15a7.486 7.486 0 0 1 5.855 2.812A8.224 8.224 0 0 1 12 20.25a8.224 8.224 0 0 1-5.855-2.438ZM15.75 9a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z",clipRule:"evenodd"}))}const ms=E.forwardRef(fs);function ps({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const hs=E.forwardRef(ps),vs=({src:e,alt:n,width:t,height:r,className:o="",classNameIcon:i="",isIcon:l=!0,acronym:s=""})=>{function a(){if(typeof s!="string")return s;const d=s.toLowerCase(),c=d.split(" "),h=c[c.length-1];return d.charAt(0)+h.charAt(0)}return m.jsx(m.Fragment,{children:e?m.jsx("img",{src:e,alt:n,width:t,height:r,className:$(o!==""&&o),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s"},onLoad:d=>d.currentTarget.style.filter="none","data-testid":"img"}):l?m.jsx(ms,{className:$("bg-white text-default-5",i!==""?i:"w-7 h-7")}):m.jsx("div",{className:$("bg-gray-200 text-default-5 rounded-full font-bold uppercase flex justify-center items-center",i!==""?i:"w-7 h-7"),children:a()})})},gs=({steps:e,onClick:n})=>{const[t,r]=u.useState(0),o=i=>{r(i),n(i)};return m.jsx("nav",{className:"flex items-center justify-center w-full","aria-label":"Progress","data-testid":"bullets",children:m.jsx("ol",{role:"list",className:"flex items-center space-x-5",children:new Array(e).fill(1).map((i,l)=>m.jsx("li",{children:t!==l?m.jsx("div",{className:"cursor-pointer block h-2.5 w-2.5 rounded-full bg-gray-500 hover:bg-gray-600",onClick:()=>o(l),"data-testid":`step-${l}`,children:m.jsx("span",{className:"sr-only",children:"step"})}):m.jsxs("div",{className:"relative flex items-center justify-center cursor-pointer","aria-current":"step",children:[m.jsx("span",{className:"absolute flex h-5 w-5 p-px","aria-hidden":"true",children:m.jsx("span",{className:"h-full w-full rounded-full bg-gray-300"})}),m.jsx("span",{className:"relative block h-2.5 w-2.5 rounded-full bg-gray-500","aria-hidden":"true"}),m.jsx("span",{className:"sr-only",children:"step"})]})},l))})})};var tr={exports:{}};/*!
|
|
32
32
|
Copyright (c) 2018 Jed Watson.
|
|
33
33
|
Licensed under the MIT License (MIT), see
|
|
34
34
|
http://jedwatson.github.io/classnames
|
|
35
|
-
*/(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var l="",i=0;i<arguments.length;i++){var s=arguments[i];s&&(l=o(l,r(s)))}return l}function r(l){if(typeof l=="string"||typeof l=="number")return l;if(typeof l!="object")return"";if(Array.isArray(l))return t.apply(null,l);if(l.toString!==Object.prototype.toString&&!l.toString.toString().includes("[native code]"))return l.toString();var i="";for(var s in l)n.call(l,s)&&l[s]&&(i=o(i,s));return i}function o(l,i){return i?l?l+" "+i:l+i:l}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(tr);var bs=tr.exports;const De=Nr(bs),nr=({className:e="text-sm w-full rounded-md",children:n,icon:t=null,edge:r=null,disabled:o=!1,type:l="button",onClick:i,id:s})=>{const a=De({"ml-2":r==="start"&&t!==null,"mr-2":r==="end"&&t!==null});return m.jsxs("button",{className:$("flex justify-center items-center bg-white px-3 py-7px font-medium leading-6 text-white shadow-sm ring-1 ring-inset ring-gray-300 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 bg-gray-50",e),type:l,onClick:i,disabled:o,"data-testid":`button-outline-${s}`,id:`button-outline-${s}`,children:[r==="start"&&t!==null&&m.jsx("span",{children:t}),m.jsx("span",{className:$("flex",a),id:s,children:n}),r==="end"&&t!==null&&m.jsx("span",{children:t})]})},rr=({children:e,className:n="",icon:t=null,edge:r=null,disabled:o=!1,type:l="button",onClick:i,id:s})=>{const a=De({"ml-2":r==="start"&&t!==null,"mr-2":r==="end"&&t!==null});return m.jsxs("button",{className:`${n} flex justify-center items-center`,edge:r,type:l,onClick:i,disabled:o,"data-testid":`button-${s}`,children:[r==="start"&&t!==null&&m.jsx("span",{children:t}),m.jsx("span",{className:a,children:e}),r==="end"&&t!==null&&m.jsx("span",{children:t})]})},lt=({children:e,classNameButton:n="bg-indigo-600 hover:bg-indigo-700 focus-visible:outline-indigo-600 shadow-indigo-500 rounded font-semibold px-3 py-1.5 text-white w-full",classNameText:t="",icon:r=null,edge:o=null,disabled:l=!1,type:i="button",onClick:s,id:a,outline:d="0px 0px 0px 2px #6366F1, 0px 0px 0px 2px #FFF, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameContainer:c=""})=>{const[h,b]=u.useState(!1),p=De({"ml-2":o==="start"&&r!==null,"mr-2":o==="end"&&r!==null}),g=()=>{s&&s()};return m.jsx("div",{className:$("rounded-md p-0.5",c!==""&&c),style:{boxShadow:h?d:"0px 0px 0px 0px #6366F1, 0px 0px 0px 0px #FFF, 0px 0px 0px 0px rgba(0, 0, 0, 0.05)",transition:"box-shadow .1s ease-in-out"},"data-testid":"container-button",children:m.jsxs("button",{className:$("flex justify-center items-center text-sm leading-6 shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",l&&"text-white bg-gray-300 rounded focus:outline-none cursor-default",l?n.replace(/\bbg-\w+\b/g,""):n),type:i,onClick:g,onFocus:()=>b(!0),onBlur:()=>b(!1),disabled:l,"data-testid":`button-solid-${a}`,children:[o==="start"&&r!==null&&m.jsx("span",{className:"flex",children:r}),m.jsx("span",{className:$(t.length===0&&p,t.length!==0&&t),children:e}),o==="end"&&r!==null&&m.jsx("span",{children:r})]})})},xs=({label:e=null,checked:n=!1,onChange:t,id:r,className:o="",classNameCheckbox:l="h-4 w-4",style:i={},disabled:s=!1})=>{const[a,d]=u.useState(!1);return u.useEffect(()=>{d(n)},[n]),m.jsxs("div",{className:"flex items-center",style:i,"data-testid":`container-check-${r}`,children:[m.jsx("input",{checked:a,id:`${e}-${r}`,value:r,"aria-describedby":"comments-description",type:"checkbox",onChange:t,className:$("cursor-pointer rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",l!==""&&l),"data-testid":`checkbox-${r}`,disabled:s}),e!==null?m.jsx("label",{htmlFor:`${e}-${r}`,className:`ml-2.5 font-normal cursor-pointer ${o}`,id:`label-${r}`,"data-testid":"label",children:e}):null]})};function ws({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const ys=E.forwardRef(ws);function Es({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const Ss=E.forwardRef(Es);function Ts({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const Cs=E.forwardRef(Ts);function Os({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const js=E.forwardRef(Os);function Ns({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}const Fs=E.forwardRef(Ns);function or({children:e,className:n="sm:max-w-sm w-11/12 sm:my-8",classNameContainer:t="",isOpen:r=!1,setIsOpen:o,showIconSuccess:l=!0,showButton:i=!0,style:s={}}){return m.jsx(Be,{show:r,as:u.Fragment,children:m.jsxs(Vn,{as:"div",className:"relative z-50 relative",onClose:o,"data-testid":"modal",children:[m.jsx(Be.Child,{as:u.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-5",leave:"ease-in duration-200",leaveFrom:"opacity-5",leaveTo:"opacity-0",children:m.jsx("div",{className:"fixed inset-0 bg-opacity-40 bg-gray-900 transition-opacity","data-testid":"window-close",onClick:()=>o(!1)})}),m.jsx("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:m.jsx("div",{className:"flex min-h-full items-center justify-center xs:p-2 p-4 text-center sm:items-center sm:p-0",children:m.jsx(Be.Child,{as:u.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:m.jsxs(Vn.Panel,{className:$("relative transform rounded-lg bg-white px-4 pb-3 pt-5 text-left transition-all sm:w-full sm:pt-3 sm:px-3",n!==""&&n),style:s,children:[l&&m.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100",children:m.jsx(ys,{className:"h-6 w-6 text-green-600","aria-hidden":"true"})}),m.jsx("div",{className:$(t!==""&&t),"data-testid":"content",children:e}),i&&m.jsx("div",{className:"mt-5 sm:mt-6",children:m.jsx(lt,{id:"close-modal",onClick:()=>o(!1),children:"Cerrar"})}),m.jsx("button",{className:"opacity-0 absolute"})]})})})})]})})}const Is=({isOpenModalConfirmation:e,setIsOpenModalConfirmation:n,close:t,title:r="¿Estás seguro de abandonar la creación de la acción?",description:o="La información se perderá si no creas la acción",classNameTitle:l="",classNameDescription:i=""})=>{const s=()=>{n(!1),t()};return m.jsxs(or,{isOpen:e,setIsOpen:()=>n(),showButton:!1,showIconSuccess:!1,children:[m.jsx("p",{className:$("text-center text-sm",l!==""&&l),children:r}),m.jsx("p",{className:$("text-center text-sm",i!==""&&i),children:o}),m.jsxs("div",{className:"flex w-full justify-center mt-5",children:[m.jsx(nr,{className:"rounded-md bg-white text-gray-500 text-sm shadow-sm ring-1 ring-inset ring-gray-300 bg-gray-50 w-24 h-9 mr-6",onClick:()=>n(),id:"cancel",children:"Cancelar"}),m.jsx(lt,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 focus-visible:outline-secondary-2 shadow-secondary-2 rounded py-1.5 text-white w-full px-5",outline:"0px 0px 0px 2px #3758F9, 0px 0px 0px 2px #243BBD, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",onClick:s,id:"confirmation",children:"Aceptar"})]})]})},ks=({className:e="",style:n={}})=>m.jsx("div",{className:$("w-px",e!==""&&e),style:n}),$s=({onClick:e,id:n="",className:t=""})=>m.jsxs("div",{className:$("flex items-center text-default-5",t!==""&&t),"data-testid":n,children:[m.jsx(ls,{className:"w-3 h-3 3xs:w-4 3xs:h-4 stroke-current cursor-pointer","data-testid":"chevron-left-icon",onClick:e}),m.jsx("span",{onClick:e,className:"text-sm cursor-pointer","data-testid":"go-back",children:"Volver"})]}),tn=({className:e="",classNameContainer:n="",children:t,message:r="",style:o={}})=>{const[l,i]=u.useState(!1),[s,a]=u.useState({top:0,left:0}),d=u.useRef(null),c=()=>{if(r==="")return;const p=d.current.getBoundingClientRect();a({top:p.bottom+window.scrollY,left:p.left+window.scrollX}),i(!0)},h=()=>{i(!1)},b=m.jsx(Be,{as:u.Fragment,enter:"transition ease-out duration-200",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-100 translate-y-0",leave:"transition ease-in duration-150",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-1",show:l,children:m.jsx("div",{className:$("absolute z-40 px-4 mt-0 sm:px-0",e!==""&&e),style:{top:s.top,left:s.left,position:"absolute"},children:m.jsx("div",{className:"bg-white p-2 text-center rounded-lg shadow-lg ring-1 ring-black ring-opacity-5",onMouseEnter:c,onMouseLeave:h,"data-testid":"message",children:r})})});return m.jsxs(m.Fragment,{children:[m.jsx("div",{ref:d,className:$("inline-block",n!==""&&n),onMouseEnter:c,onMouseLeave:h,"data-testid":"container-tooltip",style:o,children:t}),typeof window<"u"&&St.createPortal(b,document.body)]})},nn=({placeholder:e="",label:n="",htmlFor:t,type:r="text",name:o,handleChange:l,onClick:i=()=>{},value:s,isReadOnly:a=!1,isError:d=!1,helperText:c="",autocomplete:h="off",id:b,classNameLabel:p="",classNameContainerInput:g="",classNameContainer:x="",className:v="",icon:y=null,onKeyDown:w,onFocus:O,min:I,max:k,maxWidth:A=5e3})=>{const[G,U]=u.useState(!1),B=De({"ring-red-300 focus:ring-red-300 text-red-900":d||G,"focus:ring-indigo-600 text-gray-500":!d&&!G}),D=L=>{if(l&&l(L),r!=="email")return;const{value:Y}=L.target,Z=un(Y);U(!Z)};return m.jsxs("div",{"data-testid":`container-input-${b}`,className:x,children:[n!==""&&m.jsx("label",{htmlFor:t,className:$("block text-sm font-medium leading-6",p!==""?p:"text-gray-700"),"data-testid":`label-${b}`,children:n}),m.jsxs("div",{className:$("relative mt-1 rounded-md",g!==""&&g),children:[m.jsx(tn,{className:"text-sm",classNameContainer:"w-full",message:s,children:m.jsx("input",{id:b,name:o,type:r,autoComplete:h,placeholder:e,onChange:D,onClick:i,onKeyDown:w,onFocus:O,value:s,readOnly:a,"data-testid":`input-${b}`,min:I,className:$("block w-full rounded-md border-0 py-1.5 shadow-sm placeholder-gray-300 ring-1 ring-gray-300 ring-inset focus:ring-1 focus:ring-inset text-sm sm:leading-6 truncate",B,v!==""&&v),style:{maxWidth:`${A}px`}})}),y!==null&&m.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:y}),d&&y===null&&m.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:m.jsx(er,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),c.length===0||!d?null:m.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${b}`,children:c})]})};function it({className:e="w-6 h-6",color:n="#3730a3"}){return m.jsxs("svg",{className:$("fill-current animate-spin",e),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:n,strokeWidth:"4",fill:"none"}),m.jsx("path",{fill:n,d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}function Ps(){return m.jsxs("div",{className:"fixed top-0 left-0 right-0 bottom-0 w-full h-screen overflow-hidden bg-stone-600 opacity-75 flex flex-col items-center justify-center","data-testid":"spinner",style:{zIndex:60},children:[m.jsx("div",{className:"inline-block h-12 w-12 animate-[spinner-grow_0.75s_linear_infinite] rounded-full bg-current align-[-0.125em] opacity-0 motion-reduce:animate-[spinner-grow_1.5s_linear_infinite]",role:"status"}),m.jsx(it,{className:"w-8 h-8 animate-spin"})]})}const lr=({height:e="36px",style:n={},styleMenu:t={},label:r="",onChange:o,isReadOnly:l=!1,isError:i=!1,helperText:s="",name:a,id:d,className:c="",classNameLabel:h="",classNameInput:b="",options:p,value:g=-1,defaultValue:x={value:-1,label:"",iconStart:null,iconEnd:null},defaultLabel:v="label",defaultId:y="value",bgOptionSelect:w="bg-indigo-600",isSearch:O=!1,loading:I=!1,isSingleOptionAndFirstLoad:k=!0,isTest:A=!1})=>{const G=useRef(!0),[U,B]=u.useState(""),[D,L]=u.useState(x),[Y,Z]=u.useState(!1);u.useEffect(()=>{if((p==null?void 0:p.length)!==1||!G.current)return;G.current=!1;const[P]=p,z=P[y],ne=P[v];L({value:z,label:ne}),k&&o({target:{value:P,checked:!1,name:a,type:void 0,id:P[y]}})},[p,y,v,o,a,k]),u.useEffect(()=>{if(g===-1||(p==null?void 0:p.length)===0)return;const P=p==null?void 0:p.find(z=>z[y]===g);P&&L(P)},[g,p,y]),u.useEffect(()=>{g==="clear"&&(D[y]!==x[y]||D[v]!==x[v]||A)&&L(x)},[x,A,D,g,y,v]);const se=U===""?p:p.filter(P=>P[v].normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().includes(U.toLowerCase())),T=De({"ring-red-300 focus:ring-red-300 text-red-900":i&&!l,"text-gray-500":!i,"focus:ring-indigo-600":!i&&!l}),te=De({"text-red-400":i&&!l,"text-gray-400":!i}),q=P=>{L(P),o({target:{value:P,checked:!1,name:a,type:void 0,id:P[y]}})};return m.jsxs(Fe,{as:"div",value:D,children:[m.jsx(Fe.Label,{className:$("block text-sm font-medium leading-6 text-gray-500 mb-0.5",h!==""&&h),children:r}),m.jsxs("div",{className:$("relative",c!==""&&c),children:[m.jsx(tn,{className:"text-sm",classNameContainer:"w-full",message:D[v],children:m.jsxs(Fe.Button,{className:"w-full","data-testid":`listbox-button-${d}`,children:[D.iconStart&&m.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-2",children:D.iconStart}),m.jsx(Fe.Input,{className:$("w-full rounded-md border-0 bg-white py-1.5 pr-10 text-gray-900 shadow-sm ring-1 ring-gray-300 sm:text-sm sm:leading-6 truncate block",!i&&!l&&"ring-inset focus:ring-inset focus:ring-2 focus:ring-indigo-600",l&&"focus:ring-gray-300",T,b!==""&&b),onChange:P=>B(P.target.value.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),displayValue:P=>{var z;return(z=P[v])==null?void 0:z.trim()},autoComplete:"off",readOnly:!O||l,style:{height:e,...n},"data-testid":"input-search",onClick:()=>Z(l?!1:!Y),onBlur:()=>Z(!1)})]})}),D.iconEnd&&m.jsx("span",{className:"absolute inset-y-0 right-4 flex items-center pr-4",children:D.iconEnd}),!l&&m.jsx(Fe.Button,{className:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",onClick:()=>Z(l?!1:!Y),"data-testid":"arrow-button",children:Y?m.jsx(Gi,{className:$("h-5 w-5",te),"aria-hidden":"true"}):m.jsx(Yi,{className:$("h-5 w-5",te),"aria-hidden":"true"})}),!l&&m.jsx(m.Fragment,{children:I?m.jsx(Fe.Options,{className:"absolute z-10 mt-1 max-h-60 w-full rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none flex justify-center items-center py-2",children:m.jsx(it,{})}):(se??[]).length>0?m.jsx(Fe.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm py-0.5 overflow-x-hidden",style:t,children:se.map((P,z)=>m.jsx(Fe.Option,{value:P,className:$(P[y]===D[y]?`${w} text-white`:"text-gray-900",`relative cursor-default select-none p-2 hover:text-white hover:${w}`),"data-testid":`select-${d}-${P[y]}`,onClick:()=>q(P),children:m.jsxs("div",{className:"flex justify-between items-center",children:[m.jsxs("div",{className:"flex items-center",children:[P.iconStart&&m.jsx("span",{className:"mr-2","aria-hidden":"true",children:P.iconStart}),m.jsx("span",{className:"font-normal hyphens-auto break-words overflow-hidden",children:P[v]})]}),P.iconEnd&&m.jsx("span",{className:"ml-2","aria-hidden":"true",children:P.iconEnd})]})},z))}):m.jsx(Fe.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm py-0.5 overflow-x-hidden flex justify-center items-center py-2",children:m.jsx("p",{"data-testid":"empty-options",children:"Sin opciones"})})})]}),s.length>0&&i&&m.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${d}`,children:s})]})},Ms=({placeholder:e="",label:n="",htmlFor:t,name:r,handleChange:o,onClick:l=()=>{},value:i,valueSelect:s,isReadOnly:a=!1,isError:d=!1,helperText:c="",autocomplete:h="on",id:b,classNameLabel:p="",classNameContainer:g="",className:x="",onKeyDown:v,options:y,idSelect:w,isMarginLeft:O=!0,classNameSelect:I="w-20",type:k="text"})=>{const{width:A}=cn(),G=De({"ring-red-300 focus:ring-red-300 text-red-900":d,"focus:ring-indigo-600 text-gray-500":!d});return m.jsxs(m.Fragment,{children:[m.jsx("style",{children:`
|
|
35
|
+
*/(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var i="",l=0;l<arguments.length;l++){var s=arguments[l];s&&(i=o(i,r(s)))}return i}function r(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return t.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var l="";for(var s in i)n.call(i,s)&&i[s]&&(l=o(l,s));return l}function o(i,l){return l?i?i+" "+l:i+l:i}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(tr);var bs=tr.exports;const De=Nr(bs),nr=({className:e="text-sm w-full rounded-md",children:n,icon:t=null,edge:r=null,disabled:o=!1,type:i="button",onClick:l,id:s})=>{const a=De({"ml-2":r==="start"&&t!==null,"mr-2":r==="end"&&t!==null});return m.jsxs("button",{className:$("flex justify-center items-center bg-white px-3 py-7px font-medium leading-6 text-white shadow-sm ring-1 ring-inset ring-gray-300 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 bg-gray-50",e),type:i,onClick:l,disabled:o,"data-testid":`button-outline-${s}`,id:`button-outline-${s}`,children:[r==="start"&&t!==null&&m.jsx("span",{children:t}),m.jsx("span",{className:$("flex",a),id:s,children:n}),r==="end"&&t!==null&&m.jsx("span",{children:t})]})},rr=({children:e,className:n="",icon:t=null,edge:r=null,disabled:o=!1,type:i="button",onClick:l,id:s})=>{const a=De({"ml-2":r==="start"&&t!==null,"mr-2":r==="end"&&t!==null});return m.jsxs("button",{className:`${n} flex justify-center items-center`,edge:r,type:i,onClick:l,disabled:o,"data-testid":`button-${s}`,children:[r==="start"&&t!==null&&m.jsx("span",{children:t}),m.jsx("span",{className:a,children:e}),r==="end"&&t!==null&&m.jsx("span",{children:t})]})},lt=({children:e,classNameButton:n="bg-indigo-600 hover:bg-indigo-700 focus-visible:outline-indigo-600 shadow-indigo-500 rounded font-semibold px-3 py-1.5 text-white w-full",classNameText:t="",icon:r=null,edge:o=null,disabled:i=!1,type:l="button",onClick:s,id:a,outline:d="0px 0px 0px 2px #6366F1, 0px 0px 0px 2px #FFF, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameContainer:c=""})=>{const[h,b]=u.useState(!1),p=De({"ml-2":o==="start"&&r!==null,"mr-2":o==="end"&&r!==null}),g=()=>{s&&s()};return m.jsx("div",{className:$("rounded-md p-0.5",c!==""&&c),style:{boxShadow:h?d:"0px 0px 0px 0px #6366F1, 0px 0px 0px 0px #FFF, 0px 0px 0px 0px rgba(0, 0, 0, 0.05)",transition:"box-shadow .1s ease-in-out"},"data-testid":"container-button",children:m.jsxs("button",{className:$("flex justify-center items-center text-sm leading-6 shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",i&&"text-white bg-gray-300 rounded focus:outline-none cursor-default",i?n.replace(/\bbg-\w+\b/g,""):n),type:l,onClick:g,onFocus:()=>b(!0),onBlur:()=>b(!1),disabled:i,"data-testid":`button-solid-${a}`,children:[o==="start"&&r!==null&&m.jsx("span",{className:"flex",children:r}),m.jsx("span",{className:$(t.length===0&&p,t.length!==0&&t),children:e}),o==="end"&&r!==null&&m.jsx("span",{children:r})]})})},xs=({label:e=null,checked:n=!1,onChange:t,id:r,className:o="",classNameCheckbox:i="h-4 w-4",style:l={},disabled:s=!1})=>{const[a,d]=u.useState(!1);return u.useEffect(()=>{d(n)},[n]),m.jsxs("div",{className:"flex items-center",style:l,"data-testid":`container-check-${r}`,children:[m.jsx("input",{checked:a,id:`${e}-${r}`,value:r,"aria-describedby":"comments-description",type:"checkbox",onChange:t,className:$("cursor-pointer rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",i!==""&&i),"data-testid":`checkbox-${r}`,disabled:s}),e!==null?m.jsx("label",{htmlFor:`${e}-${r}`,className:`ml-2.5 font-normal cursor-pointer ${o}`,id:`label-${r}`,"data-testid":"label",children:e}):null]})};function ws({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const ys=E.forwardRef(ws);function Es({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const Ss=E.forwardRef(Es);function Ts({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const Cs=E.forwardRef(Ts);function Os({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const js=E.forwardRef(Os);function Ns({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}const Fs=E.forwardRef(Ns);function or({children:e,className:n="sm:max-w-sm w-11/12 sm:my-8",classNameContainer:t="",isOpen:r=!1,setIsOpen:o,showIconSuccess:i=!0,showButton:l=!0,style:s={}}){return m.jsx(Be,{show:r,as:u.Fragment,children:m.jsxs(Vn,{as:"div",className:"relative z-50 relative",onClose:o,"data-testid":"modal",children:[m.jsx(Be.Child,{as:u.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-5",leave:"ease-in duration-200",leaveFrom:"opacity-5",leaveTo:"opacity-0",children:m.jsx("div",{className:"fixed inset-0 bg-opacity-40 bg-gray-900 transition-opacity","data-testid":"window-close",onClick:()=>o(!1)})}),m.jsx("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:m.jsx("div",{className:"flex min-h-full items-center justify-center xs:p-2 p-4 text-center sm:items-center sm:p-0",children:m.jsx(Be.Child,{as:u.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:m.jsxs(Vn.Panel,{className:$("relative transform rounded-lg bg-white px-4 pb-3 pt-5 text-left transition-all sm:w-full sm:pt-3 sm:px-3",n!==""&&n),style:s,children:[i&&m.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100",children:m.jsx(ys,{className:"h-6 w-6 text-green-600","aria-hidden":"true"})}),m.jsx("div",{className:$(t!==""&&t),"data-testid":"content",children:e}),l&&m.jsx("div",{className:"mt-5 sm:mt-6",children:m.jsx(lt,{id:"close-modal",onClick:()=>o(!1),children:"Cerrar"})}),m.jsx("button",{className:"opacity-0 absolute"})]})})})})]})})}const Is=({isOpenModalConfirmation:e,setIsOpenModalConfirmation:n,close:t,title:r="¿Estás seguro de abandonar la creación de la acción?",description:o="La información se perderá si no creas la acción",classNameTitle:i="",classNameDescription:l=""})=>{const s=()=>{n(!1),t()};return m.jsxs(or,{isOpen:e,setIsOpen:()=>n(),showButton:!1,showIconSuccess:!1,children:[m.jsx("p",{className:$("text-center text-sm",i!==""&&i),children:r}),m.jsx("p",{className:$("text-center text-sm",l!==""&&l),children:o}),m.jsxs("div",{className:"flex w-full justify-center mt-5",children:[m.jsx(nr,{className:"rounded-md bg-white text-gray-500 text-sm shadow-sm ring-1 ring-inset ring-gray-300 bg-gray-50 w-24 h-9 mr-6",onClick:()=>n(),id:"cancel",children:"Cancelar"}),m.jsx(lt,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 focus-visible:outline-secondary-2 shadow-secondary-2 rounded py-1.5 text-white w-full px-5",outline:"0px 0px 0px 2px #3758F9, 0px 0px 0px 2px #243BBD, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",onClick:s,id:"confirmation",children:"Aceptar"})]})]})},ks=({className:e="",style:n={}})=>m.jsx("div",{className:$("w-px",e!==""&&e),style:n}),$s=({onClick:e,id:n="",className:t=""})=>m.jsxs("div",{className:$("flex items-center text-default-5",t!==""&&t),"data-testid":n,children:[m.jsx(ls,{className:"w-3 h-3 3xs:w-4 3xs:h-4 stroke-current cursor-pointer","data-testid":"chevron-left-icon",onClick:e}),m.jsx("span",{onClick:e,className:"text-sm cursor-pointer","data-testid":"go-back",children:"Volver"})]}),tn=({className:e="",classNameContainer:n="",children:t,message:r="",style:o={}})=>{const[i,l]=u.useState(!1),[s,a]=u.useState({top:0,left:0}),d=u.useRef(null),c=()=>{if(r==="")return;const p=d.current.getBoundingClientRect();a({top:p.bottom+window.scrollY,left:p.left+window.scrollX}),l(!0)},h=()=>{l(!1)},b=m.jsx(Be,{as:u.Fragment,enter:"transition ease-out duration-200",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-100 translate-y-0",leave:"transition ease-in duration-150",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-1",show:i,children:m.jsx("div",{className:$("absolute z-40 px-4 mt-0 sm:px-0",e!==""&&e),style:{top:s.top,left:s.left,position:"absolute"},children:m.jsx("div",{className:"bg-white p-2 text-center rounded-lg shadow-lg ring-1 ring-black ring-opacity-5",onMouseEnter:c,onMouseLeave:h,"data-testid":"message",children:r})})});return m.jsxs(m.Fragment,{children:[m.jsx("div",{ref:d,className:$("inline-block",n!==""&&n),onMouseEnter:c,onMouseLeave:h,"data-testid":"container-tooltip",style:o,children:t}),typeof window<"u"&&St.createPortal(b,document.body)]})},nn=({placeholder:e="",label:n="",htmlFor:t,type:r="text",name:o,handleChange:i,onClick:l=()=>{},value:s,isReadOnly:a=!1,isError:d=!1,helperText:c="",autocomplete:h="off",id:b,classNameLabel:p="",classNameContainerInput:g="",classNameContainer:x="",className:v="",icon:y=null,onKeyDown:w,onFocus:O,min:I,max:k,maxWidth:A=5e3})=>{const[G,U]=u.useState(!1),B=De({"ring-red-300 focus:ring-red-300 text-red-900":d||G,"focus:ring-indigo-600 text-gray-500":!d&&!G}),D=_=>{if(i&&i(_),r!=="email")return;const{value:Y}=_.target,Z=un(Y);U(!Z)};return m.jsxs("div",{"data-testid":`container-input-${b}`,className:x,children:[n!==""&&m.jsx("label",{htmlFor:t,className:$("block text-sm font-medium leading-6",p!==""?p:"text-gray-700"),"data-testid":`label-${b}`,children:n}),m.jsxs("div",{className:$("relative mt-1 rounded-md",g!==""&&g),children:[m.jsx(tn,{className:"text-sm",classNameContainer:"w-full",message:password==="password"?"":s,children:m.jsx("input",{id:b,name:o,type:r,autoComplete:h,placeholder:e,onChange:D,onClick:l,onKeyDown:w,onFocus:O,value:s,readOnly:a,"data-testid":`input-${b}`,min:I,className:$("block w-full rounded-md border-0 py-1.5 shadow-sm placeholder-gray-300 ring-1 ring-gray-300 ring-inset focus:ring-1 focus:ring-inset text-sm sm:leading-6 truncate",B,v!==""&&v),style:{maxWidth:`${A}px`}})}),y!==null&&m.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:y}),d&&y===null&&m.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:m.jsx(er,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),c.length===0||!d?null:m.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${b}`,children:c})]})};function it({className:e="w-6 h-6",color:n="#3730a3"}){return m.jsxs("svg",{className:$("fill-current animate-spin",e),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:n,strokeWidth:"4",fill:"none"}),m.jsx("path",{fill:n,d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}function Ps(){return m.jsxs("div",{className:"fixed top-0 left-0 right-0 bottom-0 w-full h-screen overflow-hidden bg-stone-600 opacity-75 flex flex-col items-center justify-center","data-testid":"spinner",style:{zIndex:60},children:[m.jsx("div",{className:"inline-block h-12 w-12 animate-[spinner-grow_0.75s_linear_infinite] rounded-full bg-current align-[-0.125em] opacity-0 motion-reduce:animate-[spinner-grow_1.5s_linear_infinite]",role:"status"}),m.jsx(it,{className:"w-8 h-8 animate-spin"})]})}const lr=({height:e="36px",style:n={},styleMenu:t={},label:r="",onChange:o,isReadOnly:i=!1,isError:l=!1,helperText:s="",name:a,id:d,className:c="",classNameLabel:h="",classNameInput:b="",options:p,value:g=-1,defaultValue:x={value:-1,label:"",iconStart:null,iconEnd:null},defaultLabel:v="label",defaultId:y="value",bgOptionSelect:w="bg-indigo-600",isSearch:O=!1,loading:I=!1,isSingleOptionAndFirstLoad:k=!0,isTest:A=!1})=>{const G=u.useRef(!0),[U,B]=u.useState(""),[D,_]=u.useState(x),[Y,Z]=u.useState(!1);u.useEffect(()=>{if((p==null?void 0:p.length)!==1||!G.current)return;G.current=!1;const[P]=p,z=P[y],ne=P[v];_({value:z,label:ne}),k&&o({target:{value:P,checked:!1,name:a,type:void 0,id:P[y]}})},[p,y,v,o,a,k]),u.useEffect(()=>{if(g===-1||(p==null?void 0:p.length)===0)return;const P=p==null?void 0:p.find(z=>z[y]===g);P&&_(P)},[g,p,y]),u.useEffect(()=>{g==="clear"&&(D[y]!==x[y]||D[v]!==x[v]||A)&&_(x)},[x,A,D,g,y,v]);const se=U===""?p:p.filter(P=>P[v].normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().includes(U.toLowerCase())),T=De({"ring-red-300 focus:ring-red-300 text-red-900":l&&!i,"text-gray-500":!l,"focus:ring-indigo-600":!l&&!i}),te=De({"text-red-400":l&&!i,"text-gray-400":!l}),q=P=>{_(P),o({target:{value:P,checked:!1,name:a,type:void 0,id:P[y]}})};return m.jsxs(Fe,{as:"div",value:D,children:[m.jsx(Fe.Label,{className:$("block text-sm font-medium leading-6 text-gray-500 mb-0.5",h!==""&&h),children:r}),m.jsxs("div",{className:$("relative",c!==""&&c),children:[m.jsx(tn,{className:"text-sm",classNameContainer:"w-full",message:D[v],children:m.jsxs(Fe.Button,{className:"w-full","data-testid":`listbox-button-${d}`,children:[D.iconStart&&m.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-2",children:D.iconStart}),m.jsx(Fe.Input,{className:$("w-full rounded-md border-0 bg-white py-1.5 pr-10 text-gray-900 shadow-sm ring-1 ring-gray-300 sm:text-sm sm:leading-6 truncate block",!l&&!i&&"ring-inset focus:ring-inset focus:ring-2 focus:ring-indigo-600",i&&"focus:ring-gray-300",T,b!==""&&b),onChange:P=>B(P.target.value.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),displayValue:P=>{var z;return(z=P[v])==null?void 0:z.trim()},autoComplete:"off",readOnly:!O||i,style:{height:e,...n},"data-testid":"input-search",onClick:()=>Z(i?!1:!Y),onBlur:()=>Z(!1)})]})}),D.iconEnd&&m.jsx("span",{className:"absolute inset-y-0 right-4 flex items-center pr-4",children:D.iconEnd}),!i&&m.jsx(Fe.Button,{className:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",onClick:()=>Z(i?!1:!Y),"data-testid":"arrow-button",children:Y?m.jsx(Gi,{className:$("h-5 w-5",te),"aria-hidden":"true"}):m.jsx(Yi,{className:$("h-5 w-5",te),"aria-hidden":"true"})}),!i&&m.jsx(m.Fragment,{children:I?m.jsx(Fe.Options,{className:"absolute z-10 mt-1 max-h-60 w-full rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none flex justify-center items-center py-2",children:m.jsx(it,{})}):(se??[]).length>0?m.jsx(Fe.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm py-0.5 overflow-x-hidden",style:t,children:se.map((P,z)=>m.jsx(Fe.Option,{value:P,className:$(P[y]===D[y]?`${w} text-white`:"text-gray-900",`relative cursor-default select-none p-2 hover:text-white hover:${w}`),"data-testid":`select-${d}-${P[y]}`,onClick:()=>q(P),children:m.jsxs("div",{className:"flex justify-between items-center",children:[m.jsxs("div",{className:"flex items-center",children:[P.iconStart&&m.jsx("span",{className:"mr-2","aria-hidden":"true",children:P.iconStart}),m.jsx("span",{className:"font-normal hyphens-auto break-words overflow-hidden",children:P[v]})]}),P.iconEnd&&m.jsx("span",{className:"ml-2","aria-hidden":"true",children:P.iconEnd})]})},z))}):m.jsx(Fe.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm py-0.5 overflow-x-hidden flex justify-center items-center py-2",children:m.jsx("p",{"data-testid":"empty-options",children:"Sin opciones"})})})]}),s.length>0&&l&&m.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${d}`,children:s})]})},Ms=({placeholder:e="",label:n="",htmlFor:t,name:r,handleChange:o,onClick:i=()=>{},value:l,valueSelect:s,isReadOnly:a=!1,isError:d=!1,helperText:c="",autocomplete:h="on",id:b,classNameLabel:p="",classNameContainer:g="",className:x="",onKeyDown:v,options:y,idSelect:w,isMarginLeft:O=!0,classNameSelect:I="w-20",type:k="text"})=>{const{width:A}=cn(),G=De({"ring-red-300 focus:ring-red-300 text-red-900":d,"focus:ring-indigo-600 text-gray-500":!d});return m.jsxs(m.Fragment,{children:[m.jsx("style",{children:`
|
|
36
36
|
input[type="number"]::-webkit-inner-spin-button,
|
|
37
37
|
input[type="number"]::-webkit-outer-spin-button {
|
|
38
38
|
-webkit-appearance: none;
|
|
@@ -41,7 +41,7 @@ Check the top-level render call using <`+j+">.")}return S}}function vr(f,S){{if(
|
|
|
41
41
|
input[type="number"] {
|
|
42
42
|
-moz-appearance: textfield;
|
|
43
43
|
}
|
|
44
|
-
`}),m.jsxs("div",{"data-testid":`container-input-${b}`,className:g,children:[n!==""&&m.jsx("label",{htmlFor:t,className:$("block text-sm font-medium leading-6",p!==""?p:"text-gray-700"),"data-testid":`label-${b}`,children:n}),m.jsxs("div",{className:"relative mt-1 rounded-md shadow-sm",children:[m.jsx("div",{className:"absolute inset-y-0 -top-0.5 flex items-center",style:{left:"2px"},children:m.jsx(lr,{name:w,onChange:U=>o(U),id:w,options:y,value:s,isReadOnly:a,className:I,height:A<=640?"28px":"32px",classNameInput:$(O&&"ml-3.5"),style:{paddingRight:0,boxShadow:"none"},isDisabledFocus:!0})}),m.jsx("input",{id:b,name:r,type:k,autoComplete:h,placeholder:e,readOnly:a,"data-testid":`input-${b}`,onClick:
|
|
44
|
+
`}),m.jsxs("div",{"data-testid":`container-input-${b}`,className:g,children:[n!==""&&m.jsx("label",{htmlFor:t,className:$("block text-sm font-medium leading-6",p!==""?p:"text-gray-700"),"data-testid":`label-${b}`,children:n}),m.jsxs("div",{className:"relative mt-1 rounded-md shadow-sm",children:[m.jsx("div",{className:"absolute inset-y-0 -top-0.5 flex items-center",style:{left:"2px"},children:m.jsx(lr,{name:w,onChange:U=>o(U),id:w,options:y,value:s,isReadOnly:a,className:I,height:A<=640?"28px":"32px",classNameInput:$(O&&"ml-3.5"),style:{paddingRight:0,boxShadow:"none"},isDisabledFocus:!0})}),m.jsx("input",{id:b,name:r,type:k,autoComplete:h,placeholder:e,readOnly:a,"data-testid":`input-${b}`,onClick:i,onKeyDown:v,onChange:U=>o(U),value:l,className:$("block w-full rounded-md border-0 py-1.5 pl-24 shadow-sm placeholder-gray-300 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-1 focus:ring-inset text-sm sm:leading-6",G,x!==""&&x)}),d&&m.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:m.jsx(er,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),c.length===0||!d?null:m.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${b}`,children:c})]})]})},As=({setValuesDefault:e,status:n=!1,isReadOnly:t=!1,handleClick:r,text:o="",updateStatus:i=!1,id:l="",isHiddenText:s=!1,setForm:a,handleChange:d,textActive:c="Activo",textInactive:h="Inactivo"})=>{const[b,p]=u.useState(!1);u.useEffect(()=>{p(n),e("status",n),a(x=>({...x,status:n}))},[n,e,i,a]);const g=()=>{p(!b),e("status",!b),a(x=>({...x,status:!b})),d({target:{checked:!b,value:!b,name:"status",type:"",id:""}}),r&&r()};return m.jsxs("div",{className:"flex",children:[m.jsxs(Si,{checked:b,onChange:g,className:$("group relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-success-1 focus:ring-offset-2 mt-1",b?"bg-success-1":"bg-gray-200"),"data-testid":`switch-${l}`,disabled:t,children:[m.jsx("span",{className:"sr-only",children:"Use setting"}),m.jsx("span",{"aria-hidden":"true",className:$("pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",b?"translate-x-full":"translate-x-0")})]}),o!==""?m.jsx("p",{className:$("text-sm font-medium text-gray-500 ml-2 self-end",s&&"hidden"),children:o}):m.jsx("p",{className:$("text-sm font-medium text-gray-500 ml-2 self-end",s&&"hidden"),"data-testid":"text-switch",children:b?c:h})]})};function Ds({label:e="",id:n,htmlFor:t="",classNameLabel:r="",className:o="",rows:i=4,name:l,placeholder:s="",helperText:a="",isReadOnly:d=!1,isError:c=!1,onChange:h,value:b,idInput:p,nameInput:g,placeholderInput:x="",isReadOnlyInput:v=!1,valueInput:y,infoTop:w=null,infoBottom:O=null,classNameInfoTop:I="h-4",classNameInfoBottom:k="h-2",isInputTitle:A=!1,hiddenBorder:G=!1}){const U=De({"ring-red-300 focus:ring-red-300 text-red-900":c,"focus:ring-indigo-600 text-gray-700":!c});return m.jsxs(m.Fragment,{children:[e!==""&&m.jsx("label",{htmlFor:t,className:$("leading-6 block text-sm",r!==""&&r),children:e}),m.jsxs("div",{className:"relative overflow-x-hidden",children:[w!==null&&m.jsx("div",{className:"absolute top-2 left-3 w-full",children:w}),m.jsxs("div",{className:$("overflow-hidden rounded-md shadow-sm ring-1 ring-inset ring-gray-300 focus-within:ring-2 focus-within:ring-indigo-600 placeholder:text-gray-400 bg-white",U),children:[w!==null&&m.jsx("div",{className:"py-2","aria-hidden":"true",children:m.jsx("div",{className:"py-px",children:m.jsx("div",{className:I})})}),A&&m.jsx("textarea",{name:g,id:p,className:"block w-full resize-none border-0 bg-transparent py-1.5 text-gray-400 placeholder:text-gray-400 focus:ring-0 text-sm",placeholder:x,value:y,onChange:h,rows:2,readOnly:v}),m.jsx("textarea",{placeholder:s,rows:i,name:l,id:n,className:$(A||G?"block w-full resize-none border-0 bg-transparent py-1.5 placeholder:text-gray-400 focus:ring-0":"block w-full rounded-md border-0 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset sm:leading-6",U,o!==""&&o),readOnly:d,onChange:h,value:b,"data-testid":`textarea-${n}`}),O!==null&&m.jsx("div",{className:"py-2","aria-hidden":"true",children:m.jsx("div",{className:"py-px",children:m.jsx("div",{className:k})})})]}),O!==null&&m.jsx("div",{className:"absolute bottom-2 left-3 w-full",children:O})]}),a.length>0&&c&&m.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${n}`,children:a})]})}const _s=({children:e,data:n,className:t="",classNameTooltip:r="w-full",classNameMenu:o="",classNameMenuItems:i="",classNameContainerSearch:l="px-5",isSelectMultiple:s=!1,optionsSelect:a,propObject:d="name",propId:c="id",textNewItem:h="",defaultId:b=null,loading:p=!1,search:g=null,searchPlaceHolder:x="Buscar...",valueSearch:v=void 0,idsOptionSelect:y=null,isComponent:w,isSticky:O=!1,hiddenMenu:I=!1,id:k,onClick:A=()=>{},isRelative:G=!0,isMaxWidth:U=!1,isTag:B=!1,isClear:D=!1,clear:_=null,applyButton:Y=null,applyButtonText:Z="Aplicar",tagsParent:se=[],isClearTagsParent:T=!1,isReadOnly:te,isDisabledApplyButton:q=!0,isOpenMenu:P=void 0})=>{const z=u.useRef(null),ne=u.useRef(null),[re,he]=u.useState(new Set),[be,fe]=u.useState(new Map);u.useEffect(()=>{y!==null&&he(new Set(new Set(y)))},[y]),u.useEffect(()=>{T&&fe(new Map)},[T]),u.useEffect(()=>{if(se.length===0)return;const C=new Map;se.forEach(F=>C.set(F.id,F)),fe(C)},[se]),u.useEffect(()=>{D&&(he(new Set),fe(new Map),_&&_())},[_,D]);const Ce=C=>{let F=new Map(be),W=new Set(re),de=null;if(b!==null&&(C[c]===b&&(de=crypto.randomUUID()),de!==null&&(C[c]=de),de!==null&&(C[d]=C[d].replace(h,"").trim())),W.has(C[c])?W.delete(C[c]):W.add(C[c]),F.has(C[c])?F.delete(C[c]):F.set(C[c],C),!s){const Ie=Array.from(W),ze=Array.from(F);Ie.shift(),ze.shift(),W=W.size===2?new Set(Ie):W,F=F.size===2?new Map(ze):F}a(C,Array.from(W),de!==null),he(W),fe(F)},H=C=>{A(C===!0?-1:k)},le=C=>{const F=new Set(re),W=new Map(be);F.delete(C[c]),W.delete(C[c]),a(C,Array.from(F)),he(F),fe(W)},oe=()=>{if(re.size===0)return;const C=new Set(re),F=new Map(be);C.clear(),F.clear(),a(null,Array.from(C)),he(C),fe(F)};function M(C){if(typeof C!="string")return C;const F=C.toLowerCase();return F.charAt(0).toUpperCase()+F.slice(1)}return m.jsxs(gt,{as:"div",className:$("inline-block text-left",G&&"relative",o!==""&&o),onClick:()=>H(!0),"data-testid":`menu-${k}`,id:k,ref:z,children:[m.jsx("style",{children:`
|
|
45
45
|
.blue {
|
|
46
46
|
background-color: #3758F9;
|
|
47
47
|
}
|
|
@@ -58,4 +58,4 @@ Check the top-level render call using <`+j+">.")}return S}}function vr(f,S){{if(
|
|
|
58
58
|
width: 414px;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
`}),m.jsx(gt.Button,{as:"div",onClick:()=>H(I),"data-testid":`menu-button-${k}`,ref:ne,children:e}),m.jsx("div",{className:$("absolute right-0 z-20",r,I&&"hidden",p&&"w-full"),children:m.jsx(Be,{as:u.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",show:P,children:m.jsx(gt.Items,{className:$("mt-1 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",p?"w-full":l===""&&"w-max",l!==""&&l),children:p?m.jsx("div",{className:"flex justify-center py-4",children:m.jsx(it,{})}):m.jsxs("div",{className:$(!w&&"pb-1",t!==""&&t,U&&"w-custom"),"data-testid":"dropdown-menu",children:[m.jsxs("div",{className:"sticky top-0 bg-white w-full",children:[g!==null&&m.jsx("div",{className:$("py-2 w-full",i),children:m.jsx(nn,{htmlFor:"search",id:`dropdown-search-${k}`,name:"search",type:"text",placeholder:x,handleChange:C=>g(C,k),icon:x!==""&&m.jsx(ss,{className:"w-4 h-4 text-indigo-300"}),className:"pl-5 pr-4 h-8",classNameContainerInput:"w-full",value:v,onKeyDown:C=>C.key===" "&&C.stopPropagation(),autocomplete:"off"})}),Y!==null&&m.jsxs("div",{className:$("pt-1.5 justify-end flex items-center",i),children:[m.jsx(lt,{classNameButton:$("bg-gray-400 hover:bg-gray-400 font-medium px-2 py-1.5 rounded-md",re.size>0?"opacity-1 cursor-pointer":"opacity-0 cursor-default"),outline:"",classNameText:"text-xs text-white text-center",id:"delete",onClick:oe,children:"Descartar"}),m.jsx(lt,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 font-medium px-2 py-1.5 rounded-md",outline:re.size===0&&q?"":"0px 0px 0px 2px #3758F9, 0px 0px 0px 2px #243BBD, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameText:"text-xs text-white text-center",id:"apply",disabled:re.size===0&&q,onClick:()=>Y({id:k,items:Array.from(be.values())}),children:Z})]})]}),B&&!te&&m.jsx("div",{className:"flex flex-wrap ml-7 pt-1",children:Array.from(be).map((C,F)=>m.jsx("div",{className:"mr-1",children:m.jsxs("span",{className:"inline-flex items-center gap-x-0.5 rounded-md bg-gray-100 px-2 py-1 text-xs font-medium text-gray-600 mb-1",children:[C[1][d],m.jsx("button",{type:"button",className:"p-0.5 rounded-sm bg-gray-100 hover:bg-gray-300",onClick:()=>le(C[1]),"data-testid":`tag-${C[0]}`,children:m.jsx(hs,{className:"h-2.5 w-2.5 stroke-gray-700/50 group-hover:stroke-gray-700/75"})})]})},C))}),m.jsx("div",{className:"divide-y divide-gray-100",children:(te?[]:n).map((C,F)=>m.jsx("div",{className:$(!w&&"py-1",O&&F===0&&"sticky top-0"),children:w?m.jsx("div",{onClick:W=>{W.preventDefault(),a()},"data-testid":`item-component-${F}`,children:C}):m.jsx(gt.Item,{children:m.jsx("span",{className:$(re.has(C[c])&&"blue text-white",!re.has(C[c])&&"text-gray-700 hover:bg-gray-100 hover:text-gray-900","block px-4 py-2 text-13 lg:text-sm cursor-pointer font-normal"),"data-testid":`item-${F}`,onClick:W=>{W.preventDefault(),Ce(C)},children:M(C[d])})})},F))})]})})})})]})},ir=50,_s=({total:e,handleNext:n,handlePrev:t,handleSelectPage:r,page:o=null,pageSize:l=ir})=>{const[i,s]=u.useState(1),[a,d]=u.useState([]),[c,h]=u.useState([]),b=Math.ceil(e/l);u.useEffect(()=>{const v=[];for(let y=1;y<=b;y++)v.push(y);h(v)},[b]),u.useEffect(()=>{let v=[];const y="...",w="... ",O=" ...";if(c.length<6)v=c;else if(i>=1&&i<=3)v=[1,2,3,4,y,c.length];else if(i===4)v=[...c.slice(0,5),y,c.length];else if(i>4&&i<c.length-2){const I=c.slice(i-2,i),k=c.slice(i,i+1);v=[1,w,...I,...k,O,c.length]}else if(i>c.length-3){const I=c.slice(c.length-4);v=[1,w,...I]}d(v)},[i,c]),u.useEffect(()=>{o!==null&&o!==i&&s(o)},[o,i]);const p=v=>{s(v),r(v)},g=()=>{s(i===1?i:i-1),i>1&&t(i-1)},x=()=>{i===c.length?s(i):s(i+1),i<c.length&&n(i+1)};return m.jsxs("nav",{className:"flex items-center justify-between border-t border-gray-200 px-4 sm:px-0",children:[m.jsx("div",{className:"-mt-px flex w-0 flex-1",children:m.jsxs("span",{className:"inline-flex items-center border-t-2 border-transparent pr-1 pt-4 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700 cursor-pointer",onClick:g,"data-testid":"prev",children:[m.jsx(Bi,{className:"mr-3 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Anterior"]})}),m.jsx("div",{className:"hidden md:-mt-px md:flex",children:a.map((v,y)=>m.jsx(rr,{className:$("inline-flex items-center border-t-2 px-4 pt-4 text-sm font-medium",i===v?"border-indigo-500 text-indigo-600":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700"),"aria-current":"page",onClick:()=>v!=="..."&&v!==" ..."&&v!=="... "&&p(v),id:`page-${y+1}`,children:v},y))}),m.jsx("div",{className:"-mt-px flex w-0 flex-1 justify-end",children:m.jsxs("span",{className:"inline-flex items-center border-t-2 border-transparent pl-1 pt-4 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700 cursor-pointer",onClick:x,"data-testid":"next",children:["Siguiente",m.jsx(Wi,{className:"ml-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]})})]})},Rs=({setForm:e,setValuesDefault:n,className:t="",classNameContainer:r="",classNameContainerImg:o="",src:l=null,alt:i=null,width:s,height:a})=>{const d=c=>{const{files:h}=c.target,[b]=h,p=new FileReader;p.readAsDataURL(b),p.onload=function(){e(g=>({...g,photo:p.result})),n("photo",p.result)}};return m.jsxs("div",{className:$("col-span-full",r!==""&&r),children:[m.jsx("label",{htmlFor:"cover-photo",className:"block text-sm font-medium leading-6 text-gray-500",children:"Logo (Opcional)"}),m.jsxs("div",{className:$("mt-2 flex justify-center rounded-lg border-2 border-dotted border-gray-300 cursor-pointer relative",l===null&&"px-9 pt-6 pb-2.5",o!==""&&o),children:[l?m.jsx("img",{src:l,alt:i,width:s,height:a,className:$(t!==""&&t),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s",objectFit:"contain",height:a},onLoad:c=>c.currentTarget.style.filter="none","data-testid":"img"}):m.jsxs("div",{className:"text-center",children:[m.jsx(ds,{"aria-hidden":"true",className:"mx-auto h-12 w-12 text-gray-300"}),m.jsxs("div",{className:"mt-4 flex text-sm leading-6 text-gray-600",children:[m.jsx("label",{htmlFor:"file-upload",className:"relative cursor-pointer rounded-md bg-white font-semibold text-indigo-600 focus-within:outline-none focus-within:ring-2 focus-within:ring-indigo-600 focus-within:ring-offset-2 hover:text-indigo-500",children:m.jsx("span",{children:"Upload a file"})}),m.jsx("p",{className:"pl-1",children:"or drag and drop"})]}),m.jsx("p",{className:"text-xs leading-5 text-gray-600",children:"PNG, JPG, GIF up to 10MB"})]}),m.jsx("input",{id:"file-upload",name:"file-upload",type:"file",className:"absolute w-full h-full opacity-0 cursor-pointer",onChange:d})]})]})},Bs=({children:e,openDefault:n=!1,setForm:t,setValuesDefault:r,title:o,type:l,data:i,setData:s,id:a,defaultData:d,showAlert:c,isAdd:h=!0,search:b=null,isPadding:p=!0,isReadOnly:g=!1,isEdit:x=!1,deleteItem:v=null,validateAdd:y=null,loading:w=!1,internalEdit:O=!0,isDataEmpty:I=!0,typeProp:k="value",setAdd:A=null,hasNoRecords:G=!0,tabs:U=null,selectTab:B=null})=>{const[L,Y]=u.useState(!1),[Z,se]=u.useState(!1),[,T]=u.useState(!1),[te,q]=u.useState(""),[P,z]=u.useState(1);u.useEffect(()=>{Y(n),T(g)},[n,g]);const ne=({e:H,index:le})=>{const oe=Tt(i),{name:M,value:C}=H.target;!(y===null?!1:y({value:C,copyData:oe,index:le}))&&(oe[le][M]=C),s(oe),r(a,oe),t(W=>({...W,[a]:oe}))},re=()=>{if(i.some(le=>Object.values(le).some(C=>C[k]===-1))||i.length===0)return c({title:"",message:"Todos los campos son requeridos",type:"warning"});t(le=>({...le,data:i})),r(a,i),s([...i,d]),A&&A([...i,d])},he=({index:H,item:le})=>{if(i.length===1&&!x)return;const oe=Tt(i);oe.splice(H,1),t(M=>({...M,data:oe})),r(a,oe),s(oe),v&&v({index:H,item:le,data:oe}),H===i.length-1&&x&&oe.length===0&&(t(M=>({...M,data:oe})),r(a,oe),s([...oe,d]))},be=()=>{se(!Z),T(!1)},fe=()=>{if(i.length>1)return;if(i.length===0)return!0;const[H]=i,{rol:le,privileges:oe,limitedPrivileges:M,...C}=H;return Object.values(C).every(W=>Object.values(W)[0]===-1)},Ce=({tab:H})=>{z(H.id),B&&B({tab:H})};return m.jsxs("div",{className:"divide-y divide-gray-200 rounded-lg bg-white shadow mt-7",children:[m.jsxs("div",{className:"px-4 py-3.5 sm:px-6 flex justify-between items-center cursor-pointer",onClick:()=>Y(!L),"data-testid":`open-accordion-${a}`,children:[m.jsx("p",{className:"text-gray-500 uppercase text-xs font-bold",children:o}),m.jsxs("div",{className:"flex items-center",children:[b&&m.jsx(nn,{htmlFor:"search",id:"search",name:"search",type:"text",autoComplete:"search",placeholder:"Buscar...",handleChange:H=>{b(H),q(H.target.value)},icon:m.jsx(js,{className:"w-6 h-6 text-indigo-300"}),className:"h-9",classNameContainerInput:"w-52 2xs:w-64 max-w-64 mr-8 hidden sm:block",value:te,onClick:H=>H.stopPropagation(),onFocus:()=>Y(!0)}),L?m.jsx(Cs,{className:"w-5 h-5 text-default-5"}):m.jsx(Ss,{className:"w-5 h-5 text-default-5"})]})]}),m.jsx(Be,{as:u.Fragment,show:L,enter:"transition duration-[400ms]",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-200 transition ease-in-out",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:m.jsxs("div",{children:[U&&m.jsx("nav",{className:"flex justify-center border-b border-gray-200","aria-label":"Tabs",children:U.map(H=>m.jsx("span",{className:$(P===H.id?"border-indigo-500 text-gray-900":"border-gray-300 text-gray-500 hover:border-indigo-500","whitespace-nowrap border-b-2 py-2.5 px-2 text-sm font-medium cursor-pointer"),"aria-current":P===H.id?"page":void 0,onClick:()=>Ce({tab:H}),"data-testid":`tab-${H.id}`,children:H.name},H.name))}),m.jsxs("div",{className:$("sm:mt-2.5 py-3.5 relative",p&&U===null&&"px-4 sm:p-6",p&&U!==null&&"px-4 sm:px-6 sm:pb-6 sm:pt-2.5"),children:[O&&!Z&&m.jsx(us,{className:"w-5 h-5 text-gray-400 cursor-pointer absolute right-4",onClick:be,"data-testid":`edit-role-${a}`}),w&&m.jsx("div",{className:"flex justify-center mt-5",children:m.jsx(it,{})}),I&&fe()&&G&&!w&&(O?!Z:!x)&&m.jsx("p",{className:"text-gray-800 text-center","data-testid":"records-empty",children:"No hay registros para mostrar"}),!w&&i.map((H,le)=>m.jsxs("div",{className:$("flex flex-col 3xs:flex-row mb-4",p&&"ml-0 3xs:ml-3"),children:[typeof e=="function"?e({item:H,index:le,handleChange:ne,isEdit:O?Z:x}):e,h&&(O?Z:x)&&m.jsx("div",{style:{backgroundColor:"#B0B8BF",width:"25px",height:"25px"},className:$("rounded-full flex justify-center items-center mt-4 3xs:mt-7 ml-2 3xs:ml-5 self-start 3xs:self-center",i.length===1&&!x&&"opacity-0"),children:m.jsx(Fs,{className:$("w-6 h-4",(i.length>1||x)&&"cursor-pointer"),style:{color:"#637381"},strokeWidth:2.5,onClick:()=>he({index:le,item:H}),"data-testid":`delete-item-${le}-${a}`})})]},le)),h&&(O?Z:x)&&!w&&m.jsx("p",{className:"text-secondary-2 text-sm font-medium ml-3 cursor-pointer",onClick:re,"data-testid":`add-item-${a}`,style:{width:"fit-content"},children:`+ Añadir ${l}`})]})]})})]})},zs=({src:e,alt:n,width:t,height:r,className:o="",priority:l=!1,style:i={},id:s=""})=>{const[a,d]=u.useState(!1),c={filter:a?"none":"blur(10px)",transition:"filter 0.3s ease-out",objectFit:"cover",...t?{width:t}:{},...r?{height:r}:{},...i};return m.jsx("img",{src:e,alt:n,...t?{width:t}:{},...r?{height:r}:{},className:$(o!==""&&o),loading:l?"eager":"lazy",decoding:"async",style:c,onLoad:()=>d(!0),"data-testid":`image-${s}`})};R.Accordion=Bs,R.Alert=rs,R.Avatar=vs,R.Bullets=gs,R.ButtonOutline=nr,R.ButtonPagination=rr,R.ButtonSolid=lt,R.Checkbox=xs,R.ConfirmationAbandoningCreation=Is,R.CoverPhoto=Rs,R.Divider=ks,R.Dropdown=Ls,R.GoBack=$s,R.Image=zs,R.Input=nn,R.InputDropdown=Ms,R.MESSAGE_ABORT_CONTROLLER=Sr,R.MESSAGE_SIGNAL_ABORTED_WITHOUT_REASON=Tr,R.Modal=or,R.Pagination=_s,R.Select=lr,R.Spinner=Ps,R.SpinnerIcon=it,R.Switch=As,R.Textarea=Ds,R.Tooltip=tn,R.classNames=$,R.copyOptions=Tt,R.generateAvatarInitials=yr,R.isPromise=Er,R.rowsPerPage=ir,R.useCloseModal=Cr,R.useForm=Or,R.useMediaQuery=jr,R.useWindowDimensions=cn,R.validateEmail=un,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
|
|
61
|
+
`}),m.jsx(gt.Button,{as:"div",onClick:()=>H(I),"data-testid":`menu-button-${k}`,ref:ne,children:e}),m.jsx("div",{className:$("absolute right-0 z-20",r,I&&"hidden",p&&"w-full"),children:m.jsx(Be,{as:u.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",show:P,children:m.jsx(gt.Items,{className:$("mt-1 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",p?"w-full":i===""&&"w-max",i!==""&&i),children:p?m.jsx("div",{className:"flex justify-center py-4",children:m.jsx(it,{})}):m.jsxs("div",{className:$(!w&&"pb-1",t!==""&&t,U&&"w-custom"),"data-testid":"dropdown-menu",children:[m.jsxs("div",{className:"sticky top-0 bg-white w-full",children:[g!==null&&m.jsx("div",{className:$("py-2 w-full",l),children:m.jsx(nn,{htmlFor:"search",id:`dropdown-search-${k}`,name:"search",type:"text",placeholder:x,handleChange:C=>g(C,k),icon:x!==""&&m.jsx(ss,{className:"w-4 h-4 text-indigo-300"}),className:"pl-5 pr-4 h-8",classNameContainerInput:"w-full",value:v,onKeyDown:C=>C.key===" "&&C.stopPropagation(),autocomplete:"off"})}),Y!==null&&m.jsxs("div",{className:$("pt-1.5 justify-end flex items-center",l),children:[m.jsx(lt,{classNameButton:$("bg-gray-400 hover:bg-gray-400 font-medium px-2 py-1.5 rounded-md",re.size>0?"opacity-1 cursor-pointer":"opacity-0 cursor-default"),outline:"",classNameText:"text-xs text-white text-center",id:"delete",onClick:oe,children:"Descartar"}),m.jsx(lt,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 font-medium px-2 py-1.5 rounded-md",outline:re.size===0&&q?"":"0px 0px 0px 2px #3758F9, 0px 0px 0px 2px #243BBD, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameText:"text-xs text-white text-center",id:"apply",disabled:re.size===0&&q,onClick:()=>Y({id:k,items:Array.from(be.values())}),children:Z})]})]}),B&&!te&&m.jsx("div",{className:"flex flex-wrap ml-7 pt-1",children:Array.from(be).map((C,F)=>m.jsx("div",{className:"mr-1",children:m.jsxs("span",{className:"inline-flex items-center gap-x-0.5 rounded-md bg-gray-100 px-2 py-1 text-xs font-medium text-gray-600 mb-1",children:[C[1][d],m.jsx("button",{type:"button",className:"p-0.5 rounded-sm bg-gray-100 hover:bg-gray-300",onClick:()=>le(C[1]),"data-testid":`tag-${C[0]}`,children:m.jsx(hs,{className:"h-2.5 w-2.5 stroke-gray-700/50 group-hover:stroke-gray-700/75"})})]})},C))}),m.jsx("div",{className:"divide-y divide-gray-100",children:(te?[]:n).map((C,F)=>m.jsx("div",{className:$(!w&&"py-1",O&&F===0&&"sticky top-0"),children:w?m.jsx("div",{onClick:W=>{W.preventDefault(),a()},"data-testid":`item-component-${F}`,children:C}):m.jsx(gt.Item,{children:m.jsx("span",{className:$(re.has(C[c])&&"blue text-white",!re.has(C[c])&&"text-gray-700 hover:bg-gray-100 hover:text-gray-900","block px-4 py-2 text-13 lg:text-sm cursor-pointer font-normal"),"data-testid":`item-${F}`,onClick:W=>{W.preventDefault(),Ce(C)},children:M(C[d])})})},F))})]})})})})]})},ir=50,Ls=({total:e,handleNext:n,handlePrev:t,handleSelectPage:r,page:o=null,pageSize:i=ir})=>{const[l,s]=u.useState(1),[a,d]=u.useState([]),[c,h]=u.useState([]),b=Math.ceil(e/i);u.useEffect(()=>{const v=[];for(let y=1;y<=b;y++)v.push(y);h(v)},[b]),u.useEffect(()=>{let v=[];const y="...",w="... ",O=" ...";if(c.length<6)v=c;else if(l>=1&&l<=3)v=[1,2,3,4,y,c.length];else if(l===4)v=[...c.slice(0,5),y,c.length];else if(l>4&&l<c.length-2){const I=c.slice(l-2,l),k=c.slice(l,l+1);v=[1,w,...I,...k,O,c.length]}else if(l>c.length-3){const I=c.slice(c.length-4);v=[1,w,...I]}d(v)},[l,c]),u.useEffect(()=>{o!==null&&o!==l&&s(o)},[o,l]);const p=v=>{s(v),r(v)},g=()=>{s(l===1?l:l-1),l>1&&t(l-1)},x=()=>{l===c.length?s(l):s(l+1),l<c.length&&n(l+1)};return m.jsxs("nav",{className:"flex items-center justify-between border-t border-gray-200 px-4 sm:px-0",children:[m.jsx("div",{className:"-mt-px flex w-0 flex-1",children:m.jsxs("span",{className:"inline-flex items-center border-t-2 border-transparent pr-1 pt-4 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700 cursor-pointer",onClick:g,"data-testid":"prev",children:[m.jsx(Bi,{className:"mr-3 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Anterior"]})}),m.jsx("div",{className:"hidden md:-mt-px md:flex",children:a.map((v,y)=>m.jsx(rr,{className:$("inline-flex items-center border-t-2 px-4 pt-4 text-sm font-medium",l===v?"border-indigo-500 text-indigo-600":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700"),"aria-current":"page",onClick:()=>v!=="..."&&v!==" ..."&&v!=="... "&&p(v),id:`page-${y+1}`,children:v},y))}),m.jsx("div",{className:"-mt-px flex w-0 flex-1 justify-end",children:m.jsxs("span",{className:"inline-flex items-center border-t-2 border-transparent pl-1 pt-4 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700 cursor-pointer",onClick:x,"data-testid":"next",children:["Siguiente",m.jsx(Wi,{className:"ml-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]})})]})},Rs=({setForm:e,setValuesDefault:n,className:t="",classNameContainer:r="",classNameContainerImg:o="",src:i=null,alt:l=null,width:s,height:a})=>{const d=c=>{const{files:h}=c.target,[b]=h,p=new FileReader;p.readAsDataURL(b),p.onload=function(){e(g=>({...g,photo:p.result})),n("photo",p.result)}};return m.jsxs("div",{className:$("col-span-full",r!==""&&r),children:[m.jsx("label",{htmlFor:"cover-photo",className:"block text-sm font-medium leading-6 text-gray-500",children:"Logo (Opcional)"}),m.jsxs("div",{className:$("mt-2 flex justify-center rounded-lg border-2 border-dotted border-gray-300 cursor-pointer relative",i===null&&"px-9 pt-6 pb-2.5",o!==""&&o),children:[i?m.jsx("img",{src:i,alt:l,width:s,height:a,className:$(t!==""&&t),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s",objectFit:"contain",height:a},onLoad:c=>c.currentTarget.style.filter="none","data-testid":"img"}):m.jsxs("div",{className:"text-center",children:[m.jsx(ds,{"aria-hidden":"true",className:"mx-auto h-12 w-12 text-gray-300"}),m.jsxs("div",{className:"mt-4 flex text-sm leading-6 text-gray-600",children:[m.jsx("label",{htmlFor:"file-upload",className:"relative cursor-pointer rounded-md bg-white font-semibold text-indigo-600 focus-within:outline-none focus-within:ring-2 focus-within:ring-indigo-600 focus-within:ring-offset-2 hover:text-indigo-500",children:m.jsx("span",{children:"Upload a file"})}),m.jsx("p",{className:"pl-1",children:"or drag and drop"})]}),m.jsx("p",{className:"text-xs leading-5 text-gray-600",children:"PNG, JPG, GIF up to 10MB"})]}),m.jsx("input",{id:"file-upload",name:"file-upload",type:"file",className:"absolute w-full h-full opacity-0 cursor-pointer",onChange:d})]})]})},Bs=({children:e,openDefault:n=!1,setForm:t,setValuesDefault:r,title:o,type:i,data:l,setData:s,id:a,defaultData:d,showAlert:c,isAdd:h=!0,search:b=null,isPadding:p=!0,isReadOnly:g=!1,isEdit:x=!1,deleteItem:v=null,validateAdd:y=null,loading:w=!1,internalEdit:O=!0,isDataEmpty:I=!0,typeProp:k="value",setAdd:A=null,hasNoRecords:G=!0,tabs:U=null,selectTab:B=null})=>{const[_,Y]=u.useState(!1),[Z,se]=u.useState(!1),[,T]=u.useState(!1),[te,q]=u.useState(""),[P,z]=u.useState(1);u.useEffect(()=>{Y(n),T(g)},[n,g]);const ne=({e:H,index:le})=>{const oe=Tt(l),{name:M,value:C}=H.target;!(y===null?!1:y({value:C,copyData:oe,index:le}))&&(oe[le][M]=C),s(oe),r(a,oe),t(W=>({...W,[a]:oe}))},re=()=>{if(l.some(le=>Object.values(le).some(C=>C[k]===-1))||l.length===0)return c({title:"",message:"Todos los campos son requeridos",type:"warning"});t(le=>({...le,data:l})),r(a,l),s([...l,d]),A&&A([...l,d])},he=({index:H,item:le})=>{if(l.length===1&&!x)return;const oe=Tt(l);oe.splice(H,1),t(M=>({...M,data:oe})),r(a,oe),s(oe),v&&v({index:H,item:le,data:oe}),H===l.length-1&&x&&oe.length===0&&(t(M=>({...M,data:oe})),r(a,oe),s([...oe,d]))},be=()=>{se(!Z),T(!1)},fe=()=>{if(l.length>1)return;if(l.length===0)return!0;const[H]=l,{rol:le,privileges:oe,limitedPrivileges:M,...C}=H;return Object.values(C).every(W=>Object.values(W)[0]===-1)},Ce=({tab:H})=>{z(H.id),B&&B({tab:H})};return m.jsxs("div",{className:"divide-y divide-gray-200 rounded-lg bg-white shadow mt-7",children:[m.jsxs("div",{className:"px-4 py-3.5 sm:px-6 flex justify-between items-center cursor-pointer",onClick:()=>Y(!_),"data-testid":`open-accordion-${a}`,children:[m.jsx("p",{className:"text-gray-500 uppercase text-xs font-bold",children:o}),m.jsxs("div",{className:"flex items-center",children:[b&&m.jsx(nn,{htmlFor:"search",id:"search",name:"search",type:"text",autoComplete:"search",placeholder:"Buscar...",handleChange:H=>{b(H),q(H.target.value)},icon:m.jsx(js,{className:"w-6 h-6 text-indigo-300"}),className:"h-9",classNameContainerInput:"w-52 2xs:w-64 max-w-64 mr-8 hidden sm:block",value:te,onClick:H=>H.stopPropagation(),onFocus:()=>Y(!0)}),_?m.jsx(Cs,{className:"w-5 h-5 text-default-5"}):m.jsx(Ss,{className:"w-5 h-5 text-default-5"})]})]}),m.jsx(Be,{as:u.Fragment,show:_,enter:"transition duration-[400ms]",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-200 transition ease-in-out",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:m.jsxs("div",{children:[U&&m.jsx("nav",{className:"flex justify-center border-b border-gray-200","aria-label":"Tabs",children:U.map(H=>m.jsx("span",{className:$(P===H.id?"border-indigo-500 text-gray-900":"border-gray-300 text-gray-500 hover:border-indigo-500","whitespace-nowrap border-b-2 py-2.5 px-2 text-sm font-medium cursor-pointer"),"aria-current":P===H.id?"page":void 0,onClick:()=>Ce({tab:H}),"data-testid":`tab-${H.id}`,children:H.name},H.name))}),m.jsxs("div",{className:$("sm:mt-2.5 py-3.5 relative",p&&U===null&&"px-4 sm:p-6",p&&U!==null&&"px-4 sm:px-6 sm:pb-6 sm:pt-2.5"),children:[O&&!Z&&m.jsx(us,{className:"w-5 h-5 text-gray-400 cursor-pointer absolute right-4",onClick:be,"data-testid":`edit-role-${a}`}),w&&m.jsx("div",{className:"flex justify-center mt-5",children:m.jsx(it,{})}),I&&fe()&&G&&!w&&(O?!Z:!x)&&m.jsx("p",{className:"text-gray-800 text-center","data-testid":"records-empty",children:"No hay registros para mostrar"}),!w&&l.map((H,le)=>m.jsxs("div",{className:$("flex flex-col 3xs:flex-row mb-4",p&&"ml-0 3xs:ml-3"),children:[typeof e=="function"?e({item:H,index:le,handleChange:ne,isEdit:O?Z:x}):e,h&&(O?Z:x)&&m.jsx("div",{style:{backgroundColor:"#B0B8BF",width:"25px",height:"25px"},className:$("rounded-full flex justify-center items-center mt-4 3xs:mt-7 ml-2 3xs:ml-5 self-start 3xs:self-center",l.length===1&&!x&&"opacity-0"),children:m.jsx(Fs,{className:$("w-6 h-4",(l.length>1||x)&&"cursor-pointer"),style:{color:"#637381"},strokeWidth:2.5,onClick:()=>he({index:le,item:H}),"data-testid":`delete-item-${le}-${a}`})})]},le)),h&&(O?Z:x)&&!w&&m.jsx("p",{className:"text-secondary-2 text-sm font-medium ml-3 cursor-pointer",onClick:re,"data-testid":`add-item-${a}`,style:{width:"fit-content"},children:`+ Añadir ${i}`})]})]})})]})},zs=({src:e,alt:n,width:t,height:r,className:o="",priority:i=!1,style:l={},id:s=""})=>{const[a,d]=u.useState(!1),c={filter:a?"none":"blur(10px)",transition:"filter 0.3s ease-out",objectFit:"cover",...t?{width:t}:{},...r?{height:r}:{},...l};return m.jsx("img",{src:e,alt:n,...t?{width:t}:{},...r?{height:r}:{},className:$(o!==""&&o),loading:i?"eager":"lazy",decoding:"async",style:c,onLoad:()=>d(!0),"data-testid":`image-${s}`})};R.Accordion=Bs,R.Alert=rs,R.Avatar=vs,R.Bullets=gs,R.ButtonOutline=nr,R.ButtonPagination=rr,R.ButtonSolid=lt,R.Checkbox=xs,R.ConfirmationAbandoningCreation=Is,R.CoverPhoto=Rs,R.Divider=ks,R.Dropdown=_s,R.GoBack=$s,R.Image=zs,R.Input=nn,R.InputDropdown=Ms,R.MESSAGE_ABORT_CONTROLLER=Sr,R.MESSAGE_SIGNAL_ABORTED_WITHOUT_REASON=Tr,R.Modal=or,R.Pagination=Ls,R.Select=lr,R.Spinner=Ps,R.SpinnerIcon=it,R.Switch=As,R.Textarea=Ds,R.Tooltip=tn,R.classNames=$,R.copyOptions=Tt,R.generateAvatarInitials=yr,R.isPromise=Er,R.rowsPerPage=ir,R.useCloseModal=Cr,R.useForm=Or,R.useMediaQuery=jr,R.useWindowDimensions=cn,R.validateEmail=un,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
|