cemtrik-dependencies 1.0.155 → 1.0.157

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +30 -30
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(z,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):(z=typeof globalThis<"u"?globalThis:z||self,u(z.MyApp={},z.React,z.ReactDOM))})(this,function(z,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 l=Array.isArray(o)?[]:{};for(const i in o)o.hasOwnProperty(i)&&!n&&(l[i]=t(o[i]));return l}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,isPathsTest:t=!1,isTest:r=!1})=>{const o=u.useCallback(l=>{l.some(s=>s.getAttribute===void 0?!1:s.getAttribute("id")===e)||n()},[n,e]);u.useEffect(()=>{const l=i=>{const s=i.composedPath();s===void 0||t||(r&&(s[0].getAttribute=()=>e),o(s))};return window.addEventListener("click",l),()=>{window.removeEventListener("click",l)}},[o,t,r,e])},Or=()=>{const e=u.useRef({}),[n,t]=u.useState({}),[r,o]=u.useState({}),[l,i]=u.useState([]);u.useEffect(()=>{e.current={}},[]);const s=b=>m=>{m.preventDefault(),m.stopPropagation(),b(n)},a=(b,m,g)=>{const{checked:v,value:x,name:y,type:w,id:C}=b.target,I={radio:C,checkbox:v};e.current={...g,...e.current,[y]:I[w]??x},t({...e.current,[y]:I[w]??x}),m({...e.current,[y]:I[w]??x})},c=u.useCallback((b,m)=>{e.current={...e.current,[b]:m},t(g=>({...g,[b]:m}))},[]),p=u.useCallback((b,m)=>{const g=m.filter(v=>b[v]===""||b[v]===void 0);return g.forEach(v=>o(x=>({...x,[v]:"Este campo es requerido"}))),i(g),g.length>0},[]);return{handleSubmit:s,handleChange:a,setValuesDefault:c,validateFields:p,errors:l,model:n,handleError:(b,m)=>{m.forEach(g=>o(v=>({...v,[g]:b}))),i(m)},messageError:r,setModel:t}},jr=e=>{const[n,t]=u.useState(!0),[r,o]=u.useState(!1),l=u.useCallback((i,s)=>{const a=e.match(/[0-9]+/g);if(a===null)return;const[c]=a;s=Math.min(window.innerWidth,window.outerWidth);const p=i?s>=Number(c):s<=Number(c);o(p)},[e]);return u.useEffect(()=>{const i=/\(min-width:\s?[0-9]+px\)/gi.test(e),s=/\(max-width:\s?[0-9]+px\)/gi.test(e);if(!i&&!s&&t(!1),!i&&!s)return;const a=Math.min(window.innerWidth,window.outerWidth);l(i,a)},[e,l]),u.useEffect(()=>{if(!n)return;const i=Math.min(window.innerWidth,window.outerWidth);function s(){const a=/min-width/gi.test(e);l(a,i)}return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[n,e,l]),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:{}},Ve={};/**
1
+ (function(R,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],a):(R=typeof globalThis<"u"?globalThis:R||self,a(R.MyApp={},R.React,R.ReactDOM))})(this,function(R,a,ft){"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(a),Ot=(e,n=!1)=>{function t(o){if(typeof o!="object"||o===null)return o;const l=Array.isArray(o)?[]:{};for(const i in o)o.hasOwnProperty(i)&&!n&&(l[i]=t(o[i]));return l}return e.map(o=>t(o))},dn=e=>/^(?:[^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*|"[^\n"]+")@(?:[^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,63}$/i.test(e);function k(...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,isPathsTest:t=!1,isTest:r=!1})=>{const o=a.useCallback(l=>{l.some(s=>s.getAttribute===void 0?!1:s.getAttribute("id")===e)||n()},[n,e]);a.useEffect(()=>{const l=i=>{const s=i.composedPath();s===void 0||t||(r&&(s[0].getAttribute=()=>e),o(s))};return window.addEventListener("click",l),()=>{window.removeEventListener("click",l)}},[o,t,r,e])},Or=()=>{const e=a.useRef({}),[n,t]=a.useState({}),[r,o]=a.useState({}),[l,i]=a.useState([]);a.useEffect(()=>{e.current={}},[]);const s=b=>m=>{m.preventDefault(),m.stopPropagation(),b(n)},u=(b,m,g)=>{const{checked:v,value:x,name:y,type:w,id:C}=b.target,N={radio:C,checkbox:v};e.current={...g,...e.current,[y]:N[w]??x},t({...e.current,[y]:N[w]??x}),m({...e.current,[y]:N[w]??x})},c=a.useCallback((b,m)=>{e.current={...e.current,[b]:m},t(g=>({...g,[b]:m}))},[]),p=a.useCallback((b,m)=>{const g=m.filter(v=>b[v]===""||b[v]===void 0);return g.forEach(v=>o(x=>({...x,[v]:"Este campo es requerido"}))),i(g),g.length>0},[]);return{handleSubmit:s,handleChange:u,setValuesDefault:c,validateFields:p,errors:l,model:n,handleError:(b,m)=>{m.forEach(g=>o(v=>({...v,[g]:b}))),i(m)},messageError:r,setModel:t}},jr=e=>{const[n,t]=a.useState(!0),[r,o]=a.useState(!1),l=a.useCallback((i,s)=>{const u=e.match(/[0-9]+/g);if(u===null)return;const[c]=u;s=Math.min(window.innerWidth,window.outerWidth);const p=i?s>=Number(c):s<=Number(c);o(p)},[e]);return a.useEffect(()=>{const i=/\(min-width:\s?[0-9]+px\)/gi.test(e),s=/\(max-width:\s?[0-9]+px\)/gi.test(e);if(!i&&!s&&t(!1),!i&&!s)return;const u=Math.min(window.innerWidth,window.outerWidth);l(i,u)},[e,l]),a.useEffect(()=>{if(!n)return;const i=Math.min(window.innerWidth,window.outerWidth);function s(){const u=/min-width/gi.test(e);l(u,i)}return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[n,e,l]),r},fn=()=>{const[e,n]=a.useState({width:0,height:0});return a.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 jt={exports:{}},Ze={};/**
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 Ve;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,l={key:!0,ref:!0,__self:!0,__source:!0};function i(s,a,c){var p,h={},b=null,m=null;c!==void 0&&(b=""+c),a.key!==void 0&&(b=""+a.key),a.ref!==void 0&&(m=a.ref);for(p in a)r.call(a,p)&&!l.hasOwnProperty(p)&&(h[p]=a[p]);if(s&&s.defaultProps)for(p in a=s.defaultProps,a)h[p]===void 0&&(h[p]=a[p]);return{$$typeof:n,type:s,key:b,ref:m,props:h,_owner:o.current}}return Ve.Fragment=t,Ve.jsx=i,Ve.jsxs=i,Ve}var Ye={};/**
9
+ */var mn;function Fr(){if(mn)return Ze;mn=1;var e=a,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,l={key:!0,ref:!0,__self:!0,__source:!0};function i(s,u,c){var p,h={},b=null,m=null;c!==void 0&&(b=""+c),u.key!==void 0&&(b=""+u.key),u.ref!==void 0&&(m=u.ref);for(p in u)r.call(u,p)&&!l.hasOwnProperty(p)&&(h[p]=u[p]);if(s&&s.defaultProps)for(p in u=s.defaultProps,u)h[p]===void 0&&(h[p]=u[p]);return{$$typeof:n,type:s,key:b,ref:m,props:h,_owner:o.current}}return Ze.Fragment=t,Ze.jsx=i,Ze.jsxs=i,Ze}var Ke={};/**
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 kr(){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"),l=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),g=Symbol.iterator,v="@@iterator";function x(d){if(d===null||typeof d!="object")return null;var S=g&&d[g]||d[v];return typeof S=="function"?S:null}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(d){{for(var S=arguments.length,N=new Array(S>1?S-1:0),L=1;L<S;L++)N[L-1]=arguments[L];C("error",d,N)}}function C(d,S,N){{var L=y.ReactDebugCurrentFrame,Q=L.getStackAddendum();Q!==""&&(S+="%s",N=N.concat([Q]));var re=N.map(function(Z){return String(Z)});re.unshift("Warning: "+S),Function.prototype.apply.call(console[d],console,re)}}var I=!1,P=!1,A=!1,G=!1,U=!1,D;D=Symbol.for("react.module.reference");function B(d){return!!(typeof d=="string"||typeof d=="function"||d===r||d===l||U||d===o||d===c||d===p||G||d===m||I||P||A||typeof d=="object"&&d!==null&&(d.$$typeof===b||d.$$typeof===h||d.$$typeof===i||d.$$typeof===s||d.$$typeof===a||d.$$typeof===D||d.getModuleId!==void 0))}function R(d,S,N){var L=d.displayName;if(L)return L;var Q=S.displayName||S.name||"";return Q!==""?N+"("+Q+")":N}function q(d){return d.displayName||"Context"}function K(d){if(d==null)return null;if(typeof d.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case r:return"Fragment";case t:return"Portal";case l:return"Profiler";case o:return"StrictMode";case c:return"Suspense";case p:return"SuspenseList"}if(typeof d=="object")switch(d.$$typeof){case s:var S=d;return q(S)+".Consumer";case i:var N=d;return q(N._context)+".Provider";case a:return R(d,d.render,"ForwardRef");case h:var L=d.displayName||null;return L!==null?L:K(d.type)||"Memo";case b:{var Q=d,re=Q._payload,Z=Q._init;try{return K(Z(re))}catch{return null}}}return null}var ae=Object.assign,T=0,te,H,oe,k,W,le,fe;function ye(){}ye.__reactDisabledLog=!0;function ge(){{if(T===0){te=console.log,H=console.info,oe=console.warn,k=console.error,W=console.group,le=console.groupCollapsed,fe=console.groupEnd;var d={configurable:!0,enumerable:!0,value:ye,writable:!0};Object.defineProperties(console,{info:d,log:d,warn:d,error:d,group:d,groupCollapsed:d,groupEnd:d})}T++}}function Ce(){{if(T--,T===0){var d={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ae({},d,{value:te}),info:ae({},d,{value:H}),warn:ae({},d,{value:oe}),error:ae({},d,{value:k}),group:ae({},d,{value:W}),groupCollapsed:ae({},d,{value:le}),groupEnd:ae({},d,{value:fe})})}T<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var V=y.ReactCurrentDispatcher,ne;function j(d,S,N){{if(ne===void 0)try{throw Error()}catch(Q){var L=Q.stack.trim().match(/\n( *(at )?)/);ne=L&&L[1]||""}return`
18
- `+ne+d}}var O=!1,M;{var _=typeof WeakMap=="function"?WeakMap:Map;M=new _}function ce(d,S){if(!d||O)return"";{var N=M.get(d);if(N!==void 0)return N}var L;O=!0;var Q=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var re;re=V.current,V.current=null,ge();try{if(S){var Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch(ke){L=ke}Reflect.construct(d,[],Z)}else{try{Z.call()}catch(ke){L=ke}d.call(Z.prototype)}}else{try{throw Error()}catch(ke){L=ke}d()}}catch(ke){if(ke&&L&&typeof ke.stack=="string"){for(var Y=ke.stack.split(`
19
- `),xe=L.stack.split(`
20
- `),he=Y.length-1,ve=xe.length-1;he>=1&&ve>=0&&Y[he]!==xe[ve];)ve--;for(;he>=1&&ve>=0;he--,ve--)if(Y[he]!==xe[ve]){if(he!==1||ve!==1)do if(he--,ve--,ve<0||Y[he]!==xe[ve]){var Ee=`
21
- `+Y[he].replace(" at new "," at ");return d.displayName&&Ee.includes("<anonymous>")&&(Ee=Ee.replace("<anonymous>",d.displayName)),typeof d=="function"&&M.set(d,Ee),Ee}while(he>=1&&ve>=0);break}}}finally{O=!1,V.current=re,Ce(),Error.prepareStackTrace=Q}var He=d?d.displayName||d.name:"",xr=He?j(He):"";return typeof d=="function"&&M.set(d,xr),xr}function pe(d,S,N){return ce(d,!1)}function We(d){var S=d.prototype;return!!(S&&S.isReactComponent)}function wt(d,S,N){if(d==null)return"";if(typeof d=="function")return ce(d,We(d));if(typeof d=="string")return j(d);switch(d){case c:return j("Suspense");case p:return j("SuspenseList")}if(typeof d=="object")switch(d.$$typeof){case a:return pe(d.render);case h:return wt(d.type,S,N);case b:{var L=d,Q=L._payload,re=L._init;try{return wt(re(Q),S,N)}catch{}}}return""}var yt=Object.prototype.hasOwnProperty,sr={},ar=y.ReactDebugCurrentFrame;function Et(d){if(d){var S=d._owner,N=wt(d.type,d._source,S?S.type:null);ar.setExtraStackFrame(N)}else ar.setExtraStackFrame(null)}function Ws(d,S,N,L,Q){{var re=Function.call.bind(yt);for(var Z in d)if(re(d,Z)){var Y=void 0;try{if(typeof d[Z]!="function"){var xe=Error((L||"React class")+": "+N+" type `"+Z+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof d[Z]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw xe.name="Invariant Violation",xe}Y=d[Z](S,Z,L,N,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(he){Y=he}Y&&!(Y 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",N,Z,typeof Y),Et(null)),Y instanceof Error&&!(Y.message in sr)&&(sr[Y.message]=!0,Et(Q),w("Failed %s type: %s",N,Y.message),Et(null))}}}var Us=Array.isArray;function rn(d){return Us(d)}function Hs(d){{var S=typeof Symbol=="function"&&Symbol.toStringTag,N=S&&d[Symbol.toStringTag]||d.constructor.name||"Object";return N}}function Vs(d){try{return ur(d),!1}catch{return!0}}function ur(d){return""+d}function cr(d){if(Vs(d))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Hs(d)),ur(d)}var it=y.ReactCurrentOwner,Ys={key:!0,ref:!0,__self:!0,__source:!0},dr,fr,on;on={};function qs(d){if(yt.call(d,"ref")){var S=Object.getOwnPropertyDescriptor(d,"ref").get;if(S&&S.isReactWarning)return!1}return d.ref!==void 0}function Gs(d){if(yt.call(d,"key")){var S=Object.getOwnPropertyDescriptor(d,"key").get;if(S&&S.isReactWarning)return!1}return d.key!==void 0}function Zs(d,S){if(typeof d.ref=="string"&&it.current&&S&&it.current.stateNode!==S){var N=K(it.current.type);on[N]||(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',K(it.current.type),d.ref),on[N]=!0)}}function Ks(d,S){{var N=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))};N.isReactWarning=!0,Object.defineProperty(d,"key",{get:N,configurable:!0})}}function Js(d,S){{var N=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))};N.isReactWarning=!0,Object.defineProperty(d,"ref",{get:N,configurable:!0})}}var Qs=function(d,S,N,L,Q,re,Z){var Y={$$typeof:n,type:d,key:S,ref:N,props:Z,_owner:re};return Y._store={},Object.defineProperty(Y._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Y,"_self",{configurable:!1,enumerable:!1,writable:!1,value:L}),Object.defineProperty(Y,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Q}),Object.freeze&&(Object.freeze(Y.props),Object.freeze(Y)),Y};function Xs(d,S,N,L,Q){{var re,Z={},Y=null,xe=null;N!==void 0&&(cr(N),Y=""+N),Gs(S)&&(cr(S.key),Y=""+S.key),qs(S)&&(xe=S.ref,Zs(S,Q));for(re in S)yt.call(S,re)&&!Ys.hasOwnProperty(re)&&(Z[re]=S[re]);if(d&&d.defaultProps){var he=d.defaultProps;for(re in he)Z[re]===void 0&&(Z[re]=he[re])}if(Y||xe){var ve=typeof d=="function"?d.displayName||d.name||"Unknown":d;Y&&Ks(Z,ve),xe&&Js(Z,ve)}return Qs(d,Y,xe,Q,L,it.current,Z)}}var ln=y.ReactCurrentOwner,mr=y.ReactDebugCurrentFrame;function Ue(d){if(d){var S=d._owner,N=wt(d.type,d._source,S?S.type:null);mr.setExtraStackFrame(N)}else mr.setExtraStackFrame(null)}var sn;sn=!1;function an(d){return typeof d=="object"&&d!==null&&d.$$typeof===n}function pr(){{if(ln.current){var d=K(ln.current.type);if(d)return`
17
+ */var pn;function kr(){return pn||(pn=1,process.env.NODE_ENV!=="production"&&function(){var e=a,n=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),g=Symbol.iterator,v="@@iterator";function x(d){if(d===null||typeof d!="object")return null;var S=g&&d[g]||d[v];return typeof S=="function"?S:null}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(d){{for(var S=arguments.length,O=new Array(S>1?S-1:0),D=1;D<S;D++)O[D-1]=arguments[D];C("error",d,O)}}function C(d,S,O){{var D=y.ReactDebugCurrentFrame,ee=D.getStackAddendum();ee!==""&&(S+="%s",O=O.concat([ee]));var ie=O.map(function(K){return String(K)});ie.unshift("Warning: "+S),Function.prototype.apply.call(console[d],console,ie)}}var N=!1,I=!1,M=!1,Z=!1,U=!1,A;A=Symbol.for("react.module.reference");function _(d){return!!(typeof d=="string"||typeof d=="function"||d===r||d===l||U||d===o||d===c||d===p||Z||d===m||N||I||M||typeof d=="object"&&d!==null&&(d.$$typeof===b||d.$$typeof===h||d.$$typeof===i||d.$$typeof===s||d.$$typeof===u||d.$$typeof===A||d.getModuleId!==void 0))}function L(d,S,O){var D=d.displayName;if(D)return D;var ee=S.displayName||S.name||"";return ee!==""?O+"("+ee+")":O}function G(d){return d.displayName||"Context"}function J(d){if(d==null)return null;if(typeof d.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case r:return"Fragment";case t:return"Portal";case l:return"Profiler";case o:return"StrictMode";case c:return"Suspense";case p:return"SuspenseList"}if(typeof d=="object")switch(d.$$typeof){case s:var S=d;return G(S)+".Consumer";case i:var O=d;return G(O._context)+".Provider";case u:return L(d,d.render,"ForwardRef");case h:var D=d.displayName||null;return D!==null?D:J(d.type)||"Memo";case b:{var ee=d,ie=ee._payload,K=ee._init;try{return J(K(ie))}catch{return null}}}return null}var ce=Object.assign,T=0,re,H,se,P,W,X,ve;function ye(){}ye.__reactDisabledLog=!0;function fe(){{if(T===0){re=console.log,H=console.info,se=console.warn,P=console.error,W=console.group,X=console.groupCollapsed,ve=console.groupEnd;var d={configurable:!0,enumerable:!0,value:ye,writable:!0};Object.defineProperties(console,{info:d,log:d,warn:d,error:d,group:d,groupCollapsed:d,groupEnd:d})}T++}}function Ne(){{if(T--,T===0){var d={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ce({},d,{value:re}),info:ce({},d,{value:H}),warn:ce({},d,{value:se}),error:ce({},d,{value:P}),group:ce({},d,{value:W}),groupCollapsed:ce({},d,{value:X}),groupEnd:ce({},d,{value:ve})})}T<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var V=y.ReactCurrentDispatcher,oe;function le(d,S,O){{if(oe===void 0)try{throw Error()}catch(ee){var D=ee.stack.trim().match(/\n( *(at )?)/);oe=D&&D[1]||""}return`
18
+ `+oe+d}}var $=!1,B;{var z=typeof WeakMap=="function"?WeakMap:Map;B=new z}function me(d,S){if(!d||$)return"";{var O=B.get(d);if(O!==void 0)return O}var D;$=!0;var ee=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ie;ie=V.current,V.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($e){D=$e}Reflect.construct(d,[],K)}else{try{K.call()}catch($e){D=$e}d.call(K.prototype)}}else{try{throw Error()}catch($e){D=$e}d()}}catch($e){if($e&&D&&typeof $e.stack=="string"){for(var q=$e.stack.split(`
19
+ `),Se=D.stack.split(`
20
+ `),be=q.length-1,we=Se.length-1;be>=1&&we>=0&&q[be]!==Se[we];)we--;for(;be>=1&&we>=0;be--,we--)if(q[be]!==Se[we]){if(be!==1||we!==1)do if(be--,we--,we<0||q[be]!==Se[we]){var Ce=`
21
+ `+q[be].replace(" at new "," at ");return d.displayName&&Ce.includes("<anonymous>")&&(Ce=Ce.replace("<anonymous>",d.displayName)),typeof d=="function"&&B.set(d,Ce),Ce}while(be>=1&&we>=0);break}}}finally{$=!1,V.current=ie,Ne(),Error.prepareStackTrace=ee}var Ge=d?d.displayName||d.name:"",xr=Ge?le(Ge):"";return typeof d=="function"&&B.set(d,xr),xr}function xe(d,S,O){return me(d,!1)}function F(d){var S=d.prototype;return!!(S&&S.isReactComponent)}function Y(d,S,O){if(d==null)return"";if(typeof d=="function")return me(d,F(d));if(typeof d=="string")return le(d);switch(d){case c:return le("Suspense");case p:return le("SuspenseList")}if(typeof d=="object")switch(d.$$typeof){case u:return xe(d.render);case h:return Y(d.type,S,O);case b:{var D=d,ee=D._payload,ie=D._init;try{return Y(ie(ee),S,O)}catch{}}}return""}var ge=Object.prototype.hasOwnProperty,Re={},ct=y.ReactDebugCurrentFrame;function He(d){if(d){var S=d._owner,O=Y(d.type,d._source,S?S.type:null);ct.setExtraStackFrame(O)}else ct.setExtraStackFrame(null)}function Ws(d,S,O,D,ee){{var ie=Function.call.bind(ge);for(var K in d)if(ie(d,K)){var q=void 0;try{if(typeof d[K]!="function"){var Se=Error((D||"React class")+": "+O+" type `"+K+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof d[K]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Se.name="Invariant Violation",Se}q=d[K](S,K,D,O,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(be){q=be}q&&!(q instanceof Error)&&(He(ee),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).",D||"React class",O,K,typeof q),He(null)),q instanceof Error&&!(q.message in Re)&&(Re[q.message]=!0,He(ee),w("Failed %s type: %s",O,q.message),He(null))}}}var Us=Array.isArray;function ln(d){return Us(d)}function Hs(d){{var S=typeof Symbol=="function"&&Symbol.toStringTag,O=S&&d[Symbol.toStringTag]||d.constructor.name||"Object";return O}}function Vs(d){try{return ur(d),!1}catch{return!0}}function ur(d){return""+d}function cr(d){if(Vs(d))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Hs(d)),ur(d)}var dt=y.ReactCurrentOwner,Ys={key:!0,ref:!0,__self:!0,__source:!0},dr,fr,sn;sn={};function qs(d){if(ge.call(d,"ref")){var S=Object.getOwnPropertyDescriptor(d,"ref").get;if(S&&S.isReactWarning)return!1}return d.ref!==void 0}function Gs(d){if(ge.call(d,"key")){var S=Object.getOwnPropertyDescriptor(d,"key").get;if(S&&S.isReactWarning)return!1}return d.key!==void 0}function Zs(d,S){if(typeof d.ref=="string"&&dt.current&&S&&dt.current.stateNode!==S){var O=J(dt.current.type);sn[O]||(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',J(dt.current.type),d.ref),sn[O]=!0)}}function Ks(d,S){{var O=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))};O.isReactWarning=!0,Object.defineProperty(d,"key",{get:O,configurable:!0})}}function Js(d,S){{var O=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))};O.isReactWarning=!0,Object.defineProperty(d,"ref",{get:O,configurable:!0})}}var Qs=function(d,S,O,D,ee,ie,K){var q={$$typeof:n,type:d,key:S,ref:O,props:K,_owner:ie};return q._store={},Object.defineProperty(q._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(q,"_self",{configurable:!1,enumerable:!1,writable:!1,value:D}),Object.defineProperty(q,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ee}),Object.freeze&&(Object.freeze(q.props),Object.freeze(q)),q};function Xs(d,S,O,D,ee){{var ie,K={},q=null,Se=null;O!==void 0&&(cr(O),q=""+O),Gs(S)&&(cr(S.key),q=""+S.key),qs(S)&&(Se=S.ref,Zs(S,ee));for(ie in S)ge.call(S,ie)&&!Ys.hasOwnProperty(ie)&&(K[ie]=S[ie]);if(d&&d.defaultProps){var be=d.defaultProps;for(ie in be)K[ie]===void 0&&(K[ie]=be[ie])}if(q||Se){var we=typeof d=="function"?d.displayName||d.name||"Unknown":d;q&&Ks(K,we),Se&&Js(K,we)}return Qs(d,q,Se,ee,D,dt.current,K)}}var an=y.ReactCurrentOwner,mr=y.ReactDebugCurrentFrame;function qe(d){if(d){var S=d._owner,O=Y(d.type,d._source,S?S.type:null);mr.setExtraStackFrame(O)}else mr.setExtraStackFrame(null)}var un;un=!1;function cn(d){return typeof d=="object"&&d!==null&&d.$$typeof===n}function pr(){{if(an.current){var d=J(an.current.type);if(d)return`
22
22
 
23
- Check the render method of \``+d+"`."}return""}}function ea(d){return""}var hr={};function ta(d){{var S=pr();if(!S){var N=typeof d=="string"?d:d.displayName||d.name;N&&(S=`
23
+ Check the render method of \``+d+"`."}return""}}function ea(d){return""}var hr={};function ta(d){{var S=pr();if(!S){var O=typeof d=="string"?d:d.displayName||d.name;O&&(S=`
24
24
 
25
- Check the top-level render call using <`+N+">.")}return S}}function vr(d,S){{if(!d._store||d._store.validated||d.key!=null)return;d._store.validated=!0;var N=ta(S);if(hr[N])return;hr[N]=!0;var L="";d&&d._owner&&d._owner!==ln.current&&(L=" It was passed a child from "+K(d._owner.type)+"."),Ue(d),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',N,L),Ue(null)}}function gr(d,S){{if(typeof d!="object")return;if(rn(d))for(var N=0;N<d.length;N++){var L=d[N];an(L)&&vr(L,S)}else if(an(d))d._store&&(d._store.validated=!0);else if(d){var Q=x(d);if(typeof Q=="function"&&Q!==d.entries)for(var re=Q.call(d),Z;!(Z=re.next()).done;)an(Z.value)&&vr(Z.value,S)}}}function na(d){{var S=d.type;if(S==null||typeof S=="string")return;var N;if(typeof S=="function")N=S.propTypes;else if(typeof S=="object"&&(S.$$typeof===a||S.$$typeof===h))N=S.propTypes;else return;if(N){var L=K(S);Ws(N,d.props,"prop",L,d)}else if(S.PropTypes!==void 0&&!sn){sn=!0;var Q=K(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(d){{for(var S=Object.keys(d.props),N=0;N<S.length;N++){var L=S[N];if(L!=="children"&&L!=="key"){Ue(d),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",L),Ue(null);break}}d.ref!==null&&(Ue(d),w("Invalid attribute `ref` supplied to `React.Fragment`."),Ue(null))}}function br(d,S,N,L,Q,re){{var Z=B(d);if(!Z){var Y="";(d===void 0||typeof d=="object"&&d!==null&&Object.keys(d).length===0)&&(Y+=" 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 xe=ea();xe?Y+=xe:Y+=pr();var he;d===null?he="null":rn(d)?he="array":d!==void 0&&d.$$typeof===n?(he="<"+(K(d.type)||"Unknown")+" />",Y=" Did you accidentally export a JSX literal instead of a component?"):he=typeof d,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",he,Y)}var ve=Xs(d,S,N,Q,re);if(ve==null)return ve;if(Z){var Ee=S.children;if(Ee!==void 0)if(L)if(rn(Ee)){for(var He=0;He<Ee.length;He++)gr(Ee[He],d);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,d)}return d===r?ra(ve):na(ve),ve}}function oa(d,S,N){return br(d,S,N,!0)}function la(d,S,N){return br(d,S,N,!1)}var ia=la,sa=oa;Ye.Fragment=r,Ye.jsx=ia,Ye.jsxs=sa}()),Ye}process.env.NODE_ENV==="production"?Ct.exports=Fr():Ct.exports=kr();var f=Ct.exports;function qe(e,n,t){let r=t.initialDeps??[],o;return()=>{var l,i,s,a;let c;t.key&&((l=t.debug)!=null&&l.call(t))&&(c=Date.now());const p=e();if(!(p.length!==r.length||p.some((m,g)=>r[g]!==m)))return o;r=p;let b;if(t.key&&((i=t.debug)!=null&&i.call(t))&&(b=Date.now()),o=n(...p),t.key&&((s=t.debug)!=null&&s.call(t))){const m=Math.round((Date.now()-c)*100)/100,g=Math.round((Date.now()-b)*100)/100,v=g/16,x=(y,w)=>{for(y=String(y);y.length<w;)y=" "+y;return y};console.info(`%c⏱ ${x(g,5)} /${x(m,5)} ms`,`
25
+ Check the top-level render call using <`+O+">.")}return S}}function vr(d,S){{if(!d._store||d._store.validated||d.key!=null)return;d._store.validated=!0;var O=ta(S);if(hr[O])return;hr[O]=!0;var D="";d&&d._owner&&d._owner!==an.current&&(D=" It was passed a child from "+J(d._owner.type)+"."),qe(d),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',O,D),qe(null)}}function gr(d,S){{if(typeof d!="object")return;if(ln(d))for(var O=0;O<d.length;O++){var D=d[O];cn(D)&&vr(D,S)}else if(cn(d))d._store&&(d._store.validated=!0);else if(d){var ee=x(d);if(typeof ee=="function"&&ee!==d.entries)for(var ie=ee.call(d),K;!(K=ie.next()).done;)cn(K.value)&&vr(K.value,S)}}}function na(d){{var S=d.type;if(S==null||typeof S=="string")return;var O;if(typeof S=="function")O=S.propTypes;else if(typeof S=="object"&&(S.$$typeof===u||S.$$typeof===h))O=S.propTypes;else return;if(O){var D=J(S);Ws(O,d.props,"prop",D,d)}else if(S.PropTypes!==void 0&&!un){un=!0;var ee=J(S);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ee||"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(d){{for(var S=Object.keys(d.props),O=0;O<S.length;O++){var D=S[O];if(D!=="children"&&D!=="key"){qe(d),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",D),qe(null);break}}d.ref!==null&&(qe(d),w("Invalid attribute `ref` supplied to `React.Fragment`."),qe(null))}}function br(d,S,O,D,ee,ie){{var K=_(d);if(!K){var q="";(d===void 0||typeof d=="object"&&d!==null&&Object.keys(d).length===0)&&(q+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Se=ea();Se?q+=Se:q+=pr();var be;d===null?be="null":ln(d)?be="array":d!==void 0&&d.$$typeof===n?(be="<"+(J(d.type)||"Unknown")+" />",q=" Did you accidentally export a JSX literal instead of a component?"):be=typeof d,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",be,q)}var we=Xs(d,S,O,ee,ie);if(we==null)return we;if(K){var Ce=S.children;if(Ce!==void 0)if(D)if(ln(Ce)){for(var Ge=0;Ge<Ce.length;Ge++)gr(Ce[Ge],d);Object.freeze&&Object.freeze(Ce)}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(Ce,d)}return d===r?ra(we):na(we),we}}function oa(d,S,O){return br(d,S,O,!0)}function la(d,S,O){return br(d,S,O,!1)}var ia=la,sa=oa;Ke.Fragment=r,Ke.jsx=ia,Ke.jsxs=sa}()),Ke}process.env.NODE_ENV==="production"?jt.exports=Fr():jt.exports=kr();var f=jt.exports;function Je(e,n,t){let r=t.initialDeps??[],o;return()=>{var l,i,s,u;let c;t.key&&((l=t.debug)!=null&&l.call(t))&&(c=Date.now());const p=e();if(!(p.length!==r.length||p.some((m,g)=>r[g]!==m)))return o;r=p;let b;if(t.key&&((i=t.debug)!=null&&i.call(t))&&(b=Date.now()),o=n(...p),t.key&&((s=t.debug)!=null&&s.call(t))){const m=Math.round((Date.now()-c)*100)/100,g=Math.round((Date.now()-b)*100)/100,v=g/16,x=(y,w)=>{for(y=String(y);y.length<w;)y=" "+y;return y};console.info(`%c⏱ ${x(g,5)} /${x(m,5)} ms`,`
26
26
  font-size: .6rem;
27
27
  font-weight: bold;
28
- color: hsl(${Math.max(0,Math.min(120-120*v,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 Ir=(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,_r=(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=c=>()=>{o=t[e.options.horizontal?"scrollLeft":"scrollTop"],l(),n(o,c)},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)}},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,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: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,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=qe(()=>[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=qe(()=>[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 c=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const p=this.measurementsCache.slice(0,c);for(let h=c;h<t;h++){let b=(a=this.measurementsCache[h])==null?void 0:a.measureElement;b||(b=I=>{const P=l(h),A=this.elementsCache.get(P);if(!I){A&&(this.observer.unobserve(A),this.elementsCache.delete(P));return}A!==I&&(A&&this.observer.unobserve(A),this.observer.observe(I),this.elementsCache.set(P,I)),I.isConnected&&this.resizeItem(h,this.options.measureElement(I,void 0,this))});const m=l(h),g=this.options.lanes===1?p[h-1]:this.getFurthestMeasurement(p,h),v=g?g.end+this.options.gap:r+o,x=s.get(m),y=typeof x=="number"?x:this.options.estimateSize(h),w=v+y,C=g?g.lane:h%this.options.lanes;p[h]={index:h,start:v,size:y,end:w,key:m,lane:C,measureElement:b}}return this.measurementsCache=p,p},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=qe(()=>[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=qe(()=>[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=qe(()=>[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[c]=Ot(this.getOffsetForIndex(t,s));Ir(c,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:_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 F=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,F(c=>(l||o(c),n==null?void 0:n(c)))]}function st(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(n=>setTimeout(()=>{throw n}))}function we(){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 st(()=>{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=we();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(we);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 Be(){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 be=(vn=u.useId)!=null?vn:function(){let e=Be(),[n,t]=u.useState(e?()=>Oe.nextId():null);return X(()=>{n===null&&t(Oe.nextId())},[n]),n!=null?""+n:void 0};function ue(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,ue),r}function at(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 kt=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(kt||{});function It(e,n=0){var t;return e===((t=at(e))==null?void 0:t.body)?!1:ue(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=at(e);we().nextFrame(()=>{n&&!It(n.activeElement,0)&&Ie(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 Ie(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 Ge(bn(),n,{relativeTo:e})}function Ge(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(m=>!o.includes(m))),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")})(),c=n&32?{preventScroll:!0}:{},p=0,h=i.length,b;do{if(p>=h||p+h<=0)return 0;let m=a+p;if(n&16)m=(m+h)%h;else{if(m<0)return 3;if(m>=h)return 1}b=i[m],b==null||b.focus(c),p+=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 ut(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 c=function p(h){return typeof h=="function"?p(h()):Array.isArray(h)||h instanceof Set?h:[h]}(e);for(let p of c){if(p===null)continue;let h=p instanceof HTMLElement?p:p.current;if(h!=null&&h.contains(a)||i.composed&&i.composedPath().includes(h))return}return!It(a,kt.Loose)&&a.tabIndex!==-1&&i.preventDefault(),n(i,a)}let l=u.useRef(null);ut("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),ut("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),ut("click",i=>{yn()||l.current&&(o(i,()=>l.current),l.current=null)},!0),ut("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 De(...e){return u.useMemo(()=>at(...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 de(...e){let n=u.useRef(e);u.useEffect(()=>{n.current=e},[e]);let t=F(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=at(e);if(!i)return;let s=o.current,a=l.current,c=Object.assign(h=>s(h),{acceptNode:s}),p=i.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,c,!1);for(;p.nextNode();)a(p.currentNode)},[e,r,o,l])}function Ze(e,n){let t=u.useRef([]),r=F(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 ct(...e){return Array.from(new Set(e.flatMap(n=>typeof n=="string"?n.split(" "):[]))).filter(Boolean).join(" ")}var $e=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))($e||{}),Pe=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Pe||{});function ie({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 dt(a,t,r,i,s);let c=o??0;if(c&2){let{static:p=!1,...h}=a;if(p)return dt(h,t,r,i,s)}if(c&1){let{unmount:p=!0,...h}=a;return ue(p?0:1,{0(){return null},1(){return dt({...h,hidden:!0,style:{display:"none"}},t,r,i,s)}})}return dt(a,t,r,i,s)}function dt(e,n={},t,r,o){let{as:l=t,children:i,refName:s="ref",...a}=At(e,["unmount","static"]),c=e.ref!==void 0?{[s]:e.ref}:{},p=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,m=[];for(let[g,v]of Object.entries(n))typeof v=="boolean"&&(b=!0),v===!0&&m.push(g);b&&(h["data-headlessui-state"]=m.join(" "))}if(l===u.Fragment&&Object.keys(ft(a)).length>0){if(!u.isValidElement(p)||Array.isArray(p)&&p.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(v=>` - ${v}`).join(`
28
+ color: hsl(${Math.max(0,Math.min(120-120*v,120))}deg 100% 31%);`,t==null?void 0:t.key)}return(u=t==null?void 0:t.onChange)==null||u.call(t,o),o}}function Nt(e,n){if(e===void 0)throw new Error("Unexpected undefined");return e}const Ir=(e,n)=>Math.abs(e-n)<1,Pr=(e,n,t)=>{let r;return function(...o){e.clearTimeout(r),r=e.setTimeout(()=>n.apply(this,o),t)}},$r=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:u}=i;n({width:Math.round(s),height:Math.round(u)})};if(o(t.getBoundingClientRect()),!r.ResizeObserver)return()=>{};const l=new r.ResizeObserver(i=>{const s=i[0];if(s!=null&&s.borderBoxSize){const u=s.borderBoxSize[0];if(u){o({width:u.inlineSize,height:u.blockSize});return}}o(t.getBoundingClientRect())});return l.observe(t,{box:"border-box"}),()=>{l.unobserve(t)}},hn={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?()=>{}:Pr(r,()=>{n(o,!1)},e.options.isScrollingResetDelay),i=c=>()=>{o=t[e.options.horizontal?"scrollLeft":"scrollTop"],l(),n(o,c)},s=i(!0),u=i(!1);return u(),t.addEventListener("scroll",s,hn),t.addEventListener("scrollend",u,hn),()=>{t.removeEventListener("scroll",s),t.removeEventListener("scrollend",u)}},_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:$r,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},u=this.calculateRange();(t||i!==(u==null?void 0:u.startIndex)||s!==(u==null?void 0:u.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 u=l.get(s.lane);if(u==null||s.end>u.end?l.set(s.lane,s):s.end<u.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=Je(()=>[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=Je(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:r,scrollMargin:o,getItemKey:l,enabled:i},s)=>{var u;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 c=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const p=this.measurementsCache.slice(0,c);for(let h=c;h<t;h++){let b=(u=this.measurementsCache[h])==null?void 0:u.measureElement;b||(b=N=>{const I=l(h),M=this.elementsCache.get(I);if(!N){M&&(this.observer.unobserve(M),this.elementsCache.delete(I));return}M!==N&&(M&&this.observer.unobserve(M),this.observer.observe(N),this.elementsCache.set(I,N)),N.isConnected&&this.resizeItem(h,this.options.measureElement(N,void 0,this))});const m=l(h),g=this.options.lanes===1?p[h-1]:this.getFurthestMeasurement(p,h),v=g?g.end+this.options.gap:r+o,x=s.get(m),y=typeof x=="number"?x:this.options.estimateSize(h),w=v+y,C=g?g.lane:h%this.options.lanes;p[h]={index:h,start:v,size:y,end:w,key:m,lane:C,measureElement:b}}return this.measurementsCache=p,p},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Je(()=>[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=Je(()=>[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,u)=>{s===t&&(this.observer.unobserve(t),this.elementsCache.delete(u))});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=Je(()=>[this.getIndexes(),this.getMeasurements()],(t,r)=>{const o=[];for(let l=0,i=t.length;l<i;l++){const s=t[l],u=r[s];o.push(u)}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 Nt(r[vn(0,r.length-1,o=>Nt(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",u=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-o;return Math.max(Math.min(u,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[c]=Nt(this.getOffsetForIndex(t,s));Ir(c,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 vn=(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=vn(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?ft.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,Ft=(e,n,t)=>(Yr(e,typeof n!="symbol"?n+"":n,t),t);let qr=class{constructor(){Ft(this,"current",this.detect()),Ft(this,"handoffState","pending"),Ft(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"}},Fe=new qr,te=(e,n)=>{Fe.isServer?a.useEffect(e,n):a.useLayoutEffect(e,n)};function Oe(e){let n=a.useRef(e);return te(()=>{n.current=e},[e]),n}function kt(e,n){let[t,r]=a.useState(e),o=Oe(e);return te(()=>r(o.current),[o,r,...n]),t}let j=function(e){let n=Oe(e);return a.useCallback((...t)=>n.current(...t),[n])};function gn(e,n,t){let[r,o]=a.useState(t),l=e!==void 0,i=a.useRef(l),s=a.useRef(!1),u=a.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&&!u.current&&(u.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,j(c=>(l||o(c),n==null?void 0:n(c)))]}function mt(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(n=>setTimeout(()=>{throw n}))}function Te(){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 mt(()=>{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=Te();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 ke(){let[e]=a.useState(Te);return a.useEffect(()=>()=>e.dispose(),[e]),e}function Gr(){let e=typeof document>"u";return"useSyncExternalStore"in E?(n=>n.useSyncExternalStore)(E)(()=>()=>{},()=>!1,()=>!e):!1}function Ve(){let e=Gr(),[n,t]=E.useState(Fe.isHandoffComplete);return n&&Fe.isHandoffComplete===!1&&t(!1),E.useEffect(()=>{n!==!0&&t(!0)},[n]),E.useEffect(()=>Fe.handoff(),[]),e?!1:n}var bn;let Ee=(bn=a.useId)!=null?bn:function(){let e=Ve(),[n,t]=a.useState(e?()=>Fe.nextId():null);return te(()=>{n===null&&t(Fe.nextId())},[n]),n!=null?""+n:void 0};function de(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,de),r}function pt(e){return Fe.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let It=["[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 Ie=(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))(Ie||{}),xn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(xn||{}),Zr=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Zr||{});function wn(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(It)).sort((n,t)=>Math.sign((n.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var Pt=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Pt||{});function $t(e,n=0){var t;return e===((t=pt(e))==null?void 0:t.body)?!1:de(n,{0(){return e.matches(It)},1(){let r=e;for(;r!==null;){if(r.matches(It))return!0;r=r.parentElement}return!1}})}function yn(e){let n=pt(e);Te().nextFrame(()=>{n&&!$t(n.activeElement,0)&&Me(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 Me(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 Mt(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 Qe(wn(),n,{relativeTo:e})}function Qe(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?Mt(e):e:wn(e);o.length>0&&i.length>1&&(i=i.filter(m=>!o.includes(m))),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")})(),u=(()=>{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")})(),c=n&32?{preventScroll:!0}:{},p=0,h=i.length,b;do{if(p>=h||p+h<=0)return 0;let m=u+p;if(n&16)m=(m+h)%h;else{if(m<0)return 3;if(m>=h)return 1}b=i[m],b==null||b.focus(c),p+=s}while(b!==l.activeElement);return n&6&&Qr(b)&&b.select(),2}function En(){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 Sn(){return En()||eo()}function ht(e,n,t){let r=Oe(n);a.useEffect(()=>{function o(l){r.current(l)}return document.addEventListener(e,o,t),()=>document.removeEventListener(e,o,t)},[e,t])}function Tn(e,n,t){let r=Oe(n);a.useEffect(()=>{function o(l){r.current(l)}return window.addEventListener(e,o,t),()=>window.removeEventListener(e,o,t)},[e,t])}function At(e,n,t=!0){let r=a.useRef(!1);a.useEffect(()=>{requestAnimationFrame(()=>{r.current=t})},[t]);function o(i,s){if(!r.current||i.defaultPrevented)return;let u=s(i);if(u===null||!u.getRootNode().contains(u)||!u.isConnected)return;let c=function p(h){return typeof h=="function"?p(h()):Array.isArray(h)||h instanceof Set?h:[h]}(e);for(let p of c){if(p===null)continue;let h=p instanceof HTMLElement?p:p.current;if(h!=null&&h.contains(u)||i.composed&&i.composedPath().includes(h))return}return!$t(u,Pt.Loose)&&u.tabIndex!==-1&&i.preventDefault(),n(i,u)}let l=a.useRef(null);ht("pointerdown",i=>{var s,u;r.current&&(l.current=((u=(s=i.composedPath)==null?void 0:s.call(i))==null?void 0:u[0])||i.target)},!0),ht("mousedown",i=>{var s,u;r.current&&(l.current=((u=(s=i.composedPath)==null?void 0:s.call(i))==null?void 0:u[0])||i.target)},!0),ht("click",i=>{Sn()||l.current&&(o(i,()=>l.current),l.current=null)},!0),ht("touchend",i=>o(i,()=>i.target instanceof HTMLElement?i.target:null),!0),Tn("blur",i=>o(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Be(...e){return a.useMemo(()=>pt(...e),[...e])}function Cn(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 Dt(e,n){let[t,r]=a.useState(()=>Cn(e));return te(()=>{r(Cn(e))},[e.type,e.as]),te(()=>{t||n.current&&n.current instanceof HTMLButtonElement&&!n.current.hasAttribute("type")&&r("button")},[t,n]),t}let On=Symbol();function to(e,n=!0){return Object.assign(e,{[On]:n})}function pe(...e){let n=a.useRef(e);a.useEffect(()=>{n.current=e},[e]);let t=j(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[On]))?void 0:t}function jn(e){return[e.screenX,e.screenY]}function Nn(){let e=a.useRef([-1,-1]);return{wasMoved(n){let t=jn(n);return e.current[0]===t[0]&&e.current[1]===t[1]?!1:(e.current=t,!0)},update(n){e.current=jn(n)}}}function Fn({container:e,accept:n,walk:t,enabled:r=!0}){let o=a.useRef(n),l=a.useRef(t);a.useEffect(()=>{o.current=n,l.current=t},[n,t]),te(()=>{if(!e||!r)return;let i=pt(e);if(!i)return;let s=o.current,u=l.current,c=Object.assign(h=>s(h),{acceptNode:s}),p=i.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,c,!1);for(;p.nextNode();)u(p.currentNode)},[e,r,o,l])}function Xe(e,n){let t=a.useRef([]),r=j(e);a.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 vt(...e){return Array.from(new Set(e.flatMap(n=>typeof n=="string"?n.split(" "):[]))).filter(Boolean).join(" ")}var Ae=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Ae||{}),De=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(De||{});function ae({ourProps:e,theirProps:n,slot:t,defaultTag:r,features:o,visible:l=!0,name:i,mergeRefs:s}){s=s??no;let u=kn(n,e);if(l)return gt(u,t,r,i,s);let c=o??0;if(c&2){let{static:p=!1,...h}=u;if(p)return gt(h,t,r,i,s)}if(c&1){let{unmount:p=!0,...h}=u;return de(p?0:1,{0(){return null},1(){return gt({...h,hidden:!0,style:{display:"none"}},t,r,i,s)}})}return gt(u,t,r,i,s)}function gt(e,n={},t,r,o){let{as:l=t,children:i,refName:s="ref",...u}=Lt(e,["unmount","static"]),c=e.ref!==void 0?{[s]:e.ref}:{},p=typeof i=="function"?i(n):i;"className"in u&&u.className&&typeof u.className=="function"&&(u.className=u.className(n));let h={};if(n){let b=!1,m=[];for(let[g,v]of Object.entries(n))typeof v=="boolean"&&(b=!0),v===!0&&m.push(g);b&&(h["data-headlessui-state"]=m.join(" "))}if(l===a.Fragment&&Object.keys(bt(u)).length>0){if(!a.isValidElement(p)||Array.isArray(p)&&p.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(u).map(v=>` - ${v}`).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(v=>` - ${v}`).join(`
30
30
  `)].join(`
31
- `));let b=p.props,m=typeof(b==null?void 0:b.className)=="function"?(...v)=>ct(b==null?void 0:b.className(...v),a.className):ct(b==null?void 0:b.className,a.className),g=m?{className:m}:{};return u.cloneElement(p,Object.assign({},Nn(p.props,ft(At(a,["ref"]))),h,c,{ref:o(p.ref,c.ref)},g))}return u.createElement(l,Object.assign({},At(a,["ref"]),l!==u.Fragment&&c,l!==u.Fragment&&h),p)}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 se(e){var n;return Object.assign(u.forwardRef(e),{displayName:(n=e.displayName)!=null?n:e.name})}function ft(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 ze=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(ze||{});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 ie({ourProps:l,theirProps:o,slot:{},defaultTag:ro,name:"Hidden"})}let Ke=se(oo),Dt=u.createContext(null);Dt.displayName="OpenClosedContext";var me=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(me||{});function Je(){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 mt(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 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))In(t,kn(n,r),o);return t}function kn(e,n){return e?e+"["+n+"]":n}function In(e,n,t){if(Array.isArray(t))for(let[r,o]of t.entries())In(e,kn(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 p=n.focus===ee.Specific?n.idx:Lt(n,{resolveItems:()=>e.virtual.options,resolveActiveIndex:()=>{var b,m;return(m=(b=e.activeOptionIndex)!=null?b:e.virtual.options.findIndex(g=>!e.virtual.disabled(g)))!=null?m:null},resolveDisabled:e.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),h=(l=n.trigger)!=null?l:2;return e.activeOptionIndex===p&&e.activationTrigger===h?e:{...e,activeOptionIndex:p,activationTrigger:h}}let s=Rt(e);if(s.activeOptionIndex===null){let p=s.options.findIndex(h=>!h.dataRef.current.disabled);p!==-1&&(s.activeOptionIndex=p)}let a=n.focus===ee.Specific?n.idx:Lt(n,{resolveItems:()=>s.options,resolveActiveIndex:()=>s.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled}),c=(i=n.trigger)!=null?i:2;return e.activeOptionIndex===a&&e.activationTrigger===c?e:{...e,...s,activeOptionIndex:a,activationTrigger:c}},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 Qe(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,Qe),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 c=window.getComputedStyle(a);return[parseFloat(c.paddingBlockStart||c.paddingTop),parseFloat(c.paddingBlockEnd||c.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 c;return u.createElement(u.Fragment,{key:a.key},u.cloneElement((c=e.children)==null?void 0:c.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 ue(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:c=!1,nullable:p=!1,multiple:h=!1,immediate:b=!1,virtual:m=null,...g}=e,v=!1,x=null,[y=h?[]:void 0,w]=hn(t,o,r),[C,I]=u.useReducer(vo,{dataRef:u.createRef(),comboboxState:c?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),P=u.useRef(!1),A=u.useRef({static:!1,hold:!1}),G=u.useRef(null),U=u.useRef(null),D=u.useRef(null),B=u.useRef(null),R=F(typeof s=="string"?(O,M)=>{let _=s;return(O==null?void 0:O[_])===(M==null?void 0:M[_])}:s??((O,M)=>O===M)),q=F(O=>C.options.findIndex(M=>R(M.dataRef.current.value,O))),K=u.useCallback(O=>ue(T.mode,{1:()=>y.some(M=>R(M,O)),0:()=>R(y,O)}),[y]),ae=F(O=>C.activeOptionIndex===q(O)),T=u.useMemo(()=>({...C,immediate:v,optionsPropsRef:A,labelRef:G,inputRef:U,buttonRef:D,optionsRef:B,value:y,defaultValue:r,disabled:a,mode:h?1:0,virtual:C.virtual,get activeOptionIndex(){if(P.current&&C.activeOptionIndex===null&&C.options.length>0){let O=C.options.findIndex(M=>!M.dataRef.current.disabled);if(O!==-1)return O}return C.activeOptionIndex},calculateIndex:q,compare:R,isSelected:K,isActive:ae,nullable:p,__demoMode:c}),[y,r,a,h,p,c,C,x]);X(()=>{},[x,void 0]),X(()=>{C.dataRef.current=T},[T]),Pt([T.buttonRef,T.inputRef,T.optionsRef],()=>Ce.closeCombobox(),T.comboboxState===0);let te=u.useMemo(()=>{var O,M,_;return{open:T.comboboxState===0,disabled:a,activeIndex:T.activeOptionIndex,activeOption:T.activeOptionIndex===null?null:T.virtual?T.virtual.options[(O=T.activeOptionIndex)!=null?O:0]:(_=(M=T.options[T.activeOptionIndex])==null?void 0:M.dataRef.current.value)!=null?_:null,value:y}},[T,a,y]),H=F(()=>{if(T.activeOptionIndex!==null){if(T.virtual)ye(T.virtual.options[T.activeOptionIndex]);else{let{dataRef:O}=T.options[T.activeOptionIndex];ye(O.current.value)}Ce.goToOption(ee.Specific,T.activeOptionIndex)}}),oe=F(()=>{I({type:0}),P.current=!0}),k=F(()=>{I({type:1}),P.current=!1}),W=F((O,M,_)=>(P.current=!1,O===ee.Specific?I({type:2,focus:ee.Specific,idx:M,trigger:_}):I({type:2,focus:O,trigger:_}))),le=F((O,M)=>(I({type:3,payload:{id:O,dataRef:M}}),()=>{T.isActive(M.current.value)&&(P.current=!0),I({type:4,id:O})})),fe=F(O=>(I({type:5,id:O}),()=>I({type:5,id:null}))),ye=F(O=>ue(T.mode,{0(){return w==null?void 0:w(O)},1(){let M=T.value.slice(),_=M.findIndex(ce=>R(ce,O));return _===-1?M.push(O):M.splice(_,1),w==null?void 0:w(M)}})),ge=F(O=>{I({type:6,trigger:O})}),Ce=u.useMemo(()=>({onChange:ye,registerOption:le,registerLabel:fe,goToOption:W,closeCombobox:k,openCombobox:oe,setActivationTrigger:ge,selectActiveOption:H}),[]),V=n===null?{}:{ref:n},ne=u.useRef(null),j=je();return u.useEffect(()=>{ne.current&&r!==void 0&&j.addEventListener(ne.current,"reset",()=>{w==null||w(r)})},[ne,w]),u.createElement(Bt.Provider,{value:Ce},u.createElement(zt.Provider,{value:T},u.createElement(_t,{value:ue(T.comboboxState,{0:me.Open,1:me.Closed})},i!=null&&y!=null&&Fn({[i]:y}).map(([O,M],_)=>u.createElement(Ke,{features:ze.Hidden,ref:_===0?ce=>{var pe;ne.current=(pe=ce==null?void 0:ce.closest("form"))!=null?pe:null}:void 0,...ft({key:O,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:l,disabled:a,name:O,value:M})})),ie({ourProps:V,theirProps:g,slot:te,defaultTag:go,name:"Combobox"}))))}let xo="input";function wo(e,n){var t,r,o,l,i;let s=be(),{id:a=`headlessui-combobox-input-${s}`,onChange:c,displayValue:p,type:h="text",...b}=e,m=_e("Combobox.Input"),g=Qe("Combobox.Input"),v=de(m.inputRef,n),x=De(m.inputRef),y=u.useRef(!1),w=je(),C=F(()=>{g.onChange(null),m.optionsRef.current&&(m.optionsRef.current.scrollTop=0),g.goToOption(ee.Nothing)}),I=function(){var T;return typeof p=="function"&&m.value!==void 0?(T=p(m.value))!=null?T:"":typeof m.value=="string"?m.value:""}();Ze(([T,te],[H,oe])=>{if(y.current)return;let k=m.inputRef.current;k&&((oe===0&&te===1||T!==H)&&(k.value=T),requestAnimationFrame(()=>{if(y.current||!k||(x==null?void 0:x.activeElement)!==k)return;let{selectionStart:W,selectionEnd:le}=k;Math.abs((le??0)-(W??0))===0&&W===0&&k.setSelectionRange(k.value.length,k.value.length)}))},[I,m.comboboxState,x]),Ze(([T],[te])=>{if(T===0&&te===1){if(y.current)return;let H=m.inputRef.current;if(!H)return;let oe=H.value,{selectionStart:k,selectionEnd:W,selectionDirection:le}=H;H.value="",H.value=oe,le!==null?H.setSelectionRange(k,W,le):H.setSelectionRange(k,W)}},[m.comboboxState]);let P=u.useRef(!1),A=F(()=>{P.current=!0}),G=F(()=>{w.nextFrame(()=>{P.current=!1})}),U=F(T=>{switch(y.current=!0,T.key){case J.Enter:if(y.current=!1,m.comboboxState!==0||P.current)return;if(T.preventDefault(),T.stopPropagation(),m.activeOptionIndex===null){g.closeCombobox();return}g.selectActiveOption(),m.mode===0&&g.closeCombobox();break;case J.ArrowDown:return y.current=!1,T.preventDefault(),T.stopPropagation(),ue(m.comboboxState,{0:()=>g.goToOption(ee.Next),1:()=>g.openCombobox()});case J.ArrowUp:return y.current=!1,T.preventDefault(),T.stopPropagation(),ue(m.comboboxState,{0:()=>g.goToOption(ee.Previous),1:()=>{g.openCombobox(),w.nextFrame(()=>{m.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,m.comboboxState!==0?void 0:(T.preventDefault(),m.optionsRef.current&&!m.optionsPropsRef.current.static&&T.stopPropagation(),m.nullable&&m.mode===0&&m.value===null&&C(),g.closeCombobox());case J.Tab:if(y.current=!1,m.comboboxState!==0)return;m.mode===0&&m.activationTrigger!==1&&g.selectActiveOption(),g.closeCombobox();break}}),D=F(T=>{c==null||c(T),m.nullable&&m.mode===0&&T.target.value===""&&C(),g.openCombobox()}),B=F(T=>{var te,H,oe;let k=(te=T.relatedTarget)!=null?te:Te.find(W=>W!==T.currentTarget);if(y.current=!1,!((H=m.optionsRef.current)!=null&&H.contains(k))&&!((oe=m.buttonRef.current)!=null&&oe.contains(k))&&m.comboboxState===0)return T.preventDefault(),m.mode===0&&(m.nullable&&m.value===null?C():m.activationTrigger!==1&&g.selectActiveOption()),g.closeCombobox()}),R=F(T=>{var te,H,oe;let k=(te=T.relatedTarget)!=null?te:Te.find(W=>W!==T.currentTarget);(H=m.buttonRef.current)!=null&&H.contains(k)||(oe=m.optionsRef.current)!=null&&oe.contains(k)||m.disabled||m.immediate&&m.comboboxState!==0&&(g.openCombobox(),w.nextFrame(()=>{g.setActivationTrigger(1)}))}),q=Nt(()=>{if(m.labelId)return[m.labelId].join(" ")},[m.labelId]),K=u.useMemo(()=>({open:m.comboboxState===0,disabled:m.disabled}),[m]),ae={ref:v,id:a,role:"combobox",type:h,"aria-controls":(t=m.optionsRef.current)==null?void 0:t.id,"aria-expanded":m.comboboxState===0,"aria-activedescendant":m.activeOptionIndex===null?void 0:m.virtual?(r=m.options.find(T=>{var te;return!((te=m.virtual)!=null&&te.disabled(T.dataRef.current.value))&&m.compare(T.dataRef.current.value,m.virtual.options[m.activeOptionIndex])}))==null?void 0:r.id:(o=m.options[m.activeOptionIndex])==null?void 0:o.id,"aria-labelledby":q,"aria-autocomplete":"list",defaultValue:(i=(l=e.defaultValue)!=null?l:m.defaultValue!==void 0?p==null?void 0:p(m.defaultValue):null)!=null?i:m.defaultValue,disabled:m.disabled,onCompositionStart:A,onCompositionEnd:G,onKeyDown:U,onChange:D,onFocus:R,onBlur:B};return ie({ourProps:ae,theirProps:b,slot:K,defaultTag:xo,name:"Combobox.Input"})}let yo="button";function Eo(e,n){var t;let r=_e("Combobox.Button"),o=Qe("Combobox.Button"),l=de(r.buttonRef,n),i=be(),{id:s=`headlessui-combobox-button-${i}`,...a}=e,c=je(),p=F(v=>{switch(v.key){case J.ArrowDown:return v.preventDefault(),v.stopPropagation(),r.comboboxState===1&&o.openCombobox(),c.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})});case J.ArrowUp:return v.preventDefault(),v.stopPropagation(),r.comboboxState===1&&(o.openCombobox(),c.nextFrame(()=>{r.value||o.goToOption(ee.Last)})),c.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})});case J.Escape:return r.comboboxState!==0?void 0:(v.preventDefault(),r.optionsRef.current&&!r.optionsPropsRef.current.static&&v.stopPropagation(),o.closeCombobox(),c.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})}));default:return}}),h=F(v=>{if(mt(v.currentTarget))return v.preventDefault();r.comboboxState===0?o.closeCombobox():(v.preventDefault(),o.openCombobox()),c.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})})}),b=Nt(()=>{if(r.labelId)return[r.labelId,s].join(" ")},[r.labelId,s]),m=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:p};return ie({ourProps:g,theirProps:a,slot:m,defaultTag:yo,name:"Combobox.Button"})}let So="label";function To(e,n){let t=be(),{id:r=`headlessui-combobox-label-${t}`,...o}=e,l=_e("Combobox.Label"),i=Qe("Combobox.Label"),s=de(l.labelRef,n);X(()=>i.registerLabel(r),[r]);let a=F(()=>{var p;return(p=l.inputRef.current)==null?void 0:p.focus({preventScroll:!0})}),c=u.useMemo(()=>({open:l.comboboxState===0,disabled:l.disabled}),[l]);return ie({ourProps:{ref:s,id:r,onClick:a},theirProps:o,slot:c,defaultTag:So,name:"Combobox.Label"})}let Co="ul",Oo=$e.RenderStrategy|$e.Static;function jo(e,n){let t=be(),{id:r=`headlessui-combobox-options-${t}`,hold:o=!1,...l}=e,i=_e("Combobox.Options"),s=de(i.optionsRef,n),a=Je(),c=a!==null?(a&me.Open)===me.Open:i.comboboxState===0;X(()=>{var m;i.optionsPropsRef.current.static=(m=e.static)!=null?m:!1},[i.optionsPropsRef,e.static]),X(()=>{i.optionsPropsRef.current.hold=o},[i.optionsPropsRef,o]),jn({container:i.optionsRef.current,enabled:i.comboboxState===0,accept(m){return m.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:m.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(m){m.setAttribute("role","none")}});let p=Nt(()=>{var m,g;return(g=i.labelId)!=null?g:(m=i.buttonRef.current)==null?void 0:m.id},[i.labelId,i.buttonRef.current]),h=u.useMemo(()=>({open:i.comboboxState===0,option:void 0}),[i]),b={"aria-labelledby":p,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)}),ie({ourProps:b,theirProps:l,slot:h,defaultTag:Co,features:Oo,visible:c,name:"Combobox.Options"})}let No="li";function Fo(e,n){var t;let r=be(),{id:o=`headlessui-combobox-option-${r}`,disabled:l=!1,value:i,order:s=null,...a}=e,c=_e("Combobox.Option"),p=Qe("Combobox.Option"),h=c.virtual?c.activeOptionIndex===c.calculateIndex(i):c.activeOptionIndex===null?!1:((t=c.options[c.activeOptionIndex])==null?void 0:t.id)===o,b=c.isSelected(i),m=u.useRef(null),g=Se({disabled:l,value:i,domRef:m,order:s}),v=u.useContext($n),x=de(n,m,v?v.measureElement:null),y=F(()=>p.onChange(i));X(()=>p.registerOption(o,g),[g,o]);let w=u.useRef(!(c.virtual||c.__demoMode));X(()=>{if(!c.virtual||!c.__demoMode)return;let B=we();return B.requestAnimationFrame(()=>{w.current=!0}),B.dispose},[c.virtual,c.__demoMode]),X(()=>{if(!w.current||c.comboboxState!==0||!h||c.activationTrigger===0)return;let B=we();return B.requestAnimationFrame(()=>{var R,q;(q=(R=m.current)==null?void 0:R.scrollIntoView)==null||q.call(R,{block:"nearest"})}),B.dispose},[m,h,c.comboboxState,c.activationTrigger,c.activeOptionIndex]);let C=F(B=>{var R;if(l||(R=c.virtual)!=null&&R.disabled(i))return B.preventDefault();y(),yn()||requestAnimationFrame(()=>{var q;return(q=c.inputRef.current)==null?void 0:q.focus({preventScroll:!0})}),c.mode===0&&requestAnimationFrame(()=>p.closeCombobox())}),I=F(()=>{var B;if(l||(B=c.virtual)!=null&&B.disabled(i))return p.goToOption(ee.Nothing);let R=c.calculateIndex(i);p.goToOption(ee.Specific,R)}),P=On(),A=F(B=>P.update(B)),G=F(B=>{var R;if(!P.wasMoved(B)||l||(R=c.virtual)!=null&&R.disabled(i)||h)return;let q=c.calculateIndex(i);p.goToOption(ee.Specific,q,0)}),U=F(B=>{var R;P.wasMoved(B)&&(l||(R=c.virtual)!=null&&R.disabled(i)||h&&(c.optionsPropsRef.current.hold||p.goToOption(ee.Nothing)))}),D=u.useMemo(()=>({active:h,selected:b,disabled:l}),[h,b,l]);return ie({ourProps:{id:o,ref:x,role:"option",tabIndex:l===!0?void 0:-1,"aria-disabled":l===!0?!0:void 0,"aria-selected":b,disabled:void 0,onClick:C,onFocus:I,onPointerEnter:A,onMouseEnter:A,onPointerMove:G,onMouseMove:G,onPointerLeave:U,onMouseLeave:U},theirProps:a,slot:D,defaultTag:No,name:"Combobox.Option"})}let ko=se(bo),Io=se(Eo),$o=se(wo),Po=se(To),Mo=se(jo),Ao=se(Fo),Fe=Object.assign(ko,{Input:$o,Button:Io,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 Xe(){let e=u.useRef(!1);return X(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Mn(e){let n=F(e),t=u.useRef(!1);u.useEffect(()=>(t.current=!1,()=>{t.current=!0,st(()=>{t.current&&n()})}),[n])}var et=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(et||{});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=de(t,n),{initialFocus:o,containers:l,features:i=30,...s}=e;Be()||(i=1);let a=De(t);zo({ownerDocument:a},!!(i&16));let c=Wo({ownerDocument:a,container:t,initialFocus:o},!!(i&2));Uo({ownerDocument:a,container:t,containers:l,previousActiveElement:c},!!(i&8));let p=Do(),h=F(v=>{let x=t.current;x&&(y=>y())(()=>{ue(p.current,{[et.Forwards]:()=>{Ge(x,Ne.First,{skipElements:[v.relatedTarget]})},[et.Backwards]:()=>{Ge(x,Ne.Last,{skipElements:[v.relatedTarget]})}})})}),b=je(),m=u.useRef(!1),g={ref:r,onKeyDown(v){v.key=="Tab"&&(m.current=!0,b.requestAnimationFrame(()=>{m.current=!1}))},onBlur(v){let x=An(l);t.current instanceof HTMLElement&&x.add(t.current);let y=v.relatedTarget;y instanceof HTMLElement&&y.dataset.headlessuiFocusGuard!=="true"&&(_n(x,y)||(m.current?Ge(t.current,ue(p.current,{[et.Forwards]:()=>Ne.Next,[et.Backwards]:()=>Ne.Previous})|Ne.WrapAround,{relativeTo:v.target}):v.target instanceof HTMLElement&&Ie(v.target)))}};return u.createElement(u.Fragment,null,!!(i&4)&&u.createElement(Ke,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:ze.Focusable}),ie({ourProps:g,theirProps:s,defaultTag:_o,name:"FocusTrap"}),!!(i&4)&&u.createElement(Ke,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:ze.Focusable}))}let Ro=se(Lo),tt=Object.assign(Ro,{features:Dn});function Bo(e=!0){let n=u.useRef(Te.slice());return Ze(([t],[r])=>{r===!0&&t===!1&&st(()=>{n.current.splice(0)}),r===!1&&t===!0&&(n.current=Te.slice())},[e,Te,n]),F(()=>{var t;return(t=n.current.find(r=>r!=null&&r.isConnected))!=null?t:null})}function zo({ownerDocument:e},n){let t=Bo(n);Ze(()=>{n||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&Ie(t())},[n]),Mn(()=>{n&&Ie(t())})}function Wo({ownerDocument:e,container:n,initialFocus:t},r){let o=u.useRef(null),l=Xe();return Ze(()=>{if(!r)return;let i=n.current;i&&st(()=>{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?Ie(t.current):Ge(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=Xe();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 c=i.target;c&&c instanceof HTMLElement?_n(s,c)?(r.current=c,Ie(c)):(i.preventDefault(),i.stopPropagation(),Ie(a)):Ie(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=De(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=de(to(p=>{r.current=p}),n),l=De(r),i=Vo(r),[s]=u.useState(()=>{var p;return Oe.isServer?null:(p=l==null?void 0:l.createElement("div"))!=null?p:null}),a=u.useContext(Ut),c=Be();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 p;!i||!s||(s instanceof Node&&i.contains(s)&&i.removeChild(s),i.childNodes.length<=0&&((p=i.parentElement)==null||p.removeChild(i)))}),c?!i||!s?null:St.createPortal(ie({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:de(n)};return u.createElement(Rn.Provider,{value:t},ie({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=F(l=>(n.current.push(l),e&&e.register(l),()=>r(l))),r=F(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=se(qo),Qo=se(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=we();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:c}=new URL(a.href),p=e.querySelector(c);p&&!r(p)&&(i=p)}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 Le=fl(()=>new Map,{PUSH(e,n){var t;let r=(t=this.get(e))!=null?t:{doc:e,count:0,d:we(),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)}});Le.subscribe(()=>{let e=Le.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)&&Le.dispatch(t.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",t),t.count===0&&Le.dispatch("TEARDOWN",t)}});function gl(e,n,t){let r=dl(Le),o=e?r.get(e):void 0,l=o?o.count>0:!1;return X(()=>{if(!(!e||!n))return Le.dispatch("PUSH",e,t),()=>Le.dispatch("POP",e,t)},[n,e]),l}let Yt=new Map,nt=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=nt.get(r))!=null?i:1;if(s===1?nt.delete(r):nt.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=nt.get(r))!=null?t:0;return nt.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=De(o),i=F(()=>{var s,a,c;let p=[];for(let h of e)h!==null&&(h instanceof HTMLElement?p.push(h):"current"in h&&h.current instanceof HTMLElement&&p.push(h.current));if(n!=null&&n.current)for(let h of n.current)p.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((c=(a=o.current)==null?void 0:a.getRootNode())==null?void 0:c.host)||p.some(b=>h.contains(b))||p.push(h));return p});return{resolveContainers:i,contains:F(s=>i().some(a=>a.contains(s))),mainTreeNodeRef:o,MainTreeNode:u.useMemo(()=>function(){return t!=null?null:u.createElement(Ke,{features:ze.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=F((...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=F(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=be(),{id:r=`headlessui-description-${t}`,...o}=e,l=Wn(),i=de(n);X(()=>l.register(r),[r,l.register]);let s={ref:i,...l.props,id:r};return ie({ourProps:s,theirProps:o,slot:l.slot||{},defaultTag:yl,name:l.name||"Description"})}let Sl=se(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}}},pt=u.createContext(null);pt.displayName="DialogContext";function rt(e){let n=u.useContext(pt);if(n===null){let t=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,rt),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 ue(n.type,Ol,e,n)}let Fl="div",kl=$e.RenderStrategy|$e.Static;function Il(e,n){let t=be(),{id:r=`headlessui-dialog-${t}`,open:o,onClose:l,initialFocus:i,role:s="dialog",__demoMode:a=!1,...c}=e,[p,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 m=Je();o===void 0&&m!==null&&(o=(m&me.Open)===me.Open);let g=u.useRef(null),v=de(g,n),x=De(g),y=e.hasOwnProperty("open")||m!==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 C=o?0:1,[I,P]=u.useReducer(Nl,{titleId:null,descriptionId:null,panelRef:u.createRef()}),A=F(()=>l(!1)),G=F(_=>P({type:0,id:_})),U=Be()?a?!1:C===0:!1,D=p>1,B=u.useContext(pt)!==null,[R,q]=Ko(),K={get current(){var _;return(_=I.panelRef.current)!=null?_:g.current}},{resolveContainers:ae,mainTreeNodeRef:T,MainTreeNode:te}=bl({portals:R,defaultContainers:[K]}),H=D?"parent":"leaf",oe=m!==null?(m&me.Closing)===me.Closing:!1,k=B||oe?!1:U,W=u.useCallback(()=>{var _,ce;return(ce=Array.from((_=x==null?void 0:x.querySelectorAll("body > *"))!=null?_:[]).find(pe=>pe.id==="headlessui-portal-root"?!1:pe.contains(T.current)&&pe instanceof HTMLElement))!=null?ce:null},[T]);Bn(W,k);let le=D?!0:U,fe=u.useCallback(()=>{var _,ce;return(ce=Array.from((_=x==null?void 0:x.querySelectorAll("[data-headlessui-portal]"))!=null?_:[]).find(pe=>pe.contains(T.current)&&pe instanceof HTMLElement))!=null?ce:null},[T]);Bn(fe,le),Pt(ae,_=>{_.preventDefault(),A()},!(!U||D));let ge=!(D||C!==0);Pn(x==null?void 0:x.defaultView,"keydown",_=>{ge&&(_.defaultPrevented||_.key===J.Escape&&(_.preventDefault(),_.stopPropagation(),A()))}),jl(x,!(oe||C!==0||B),ae),u.useEffect(()=>{if(C!==0||!g.current)return;let _=new ResizeObserver(ce=>{for(let pe of ce){let We=pe.target.getBoundingClientRect();We.x===0&&We.y===0&&We.width===0&&We.height===0&&A()}});return _.observe(g.current),()=>_.disconnect()},[C,g,A]);let[V,ne]=Un(),j=u.useMemo(()=>[{dialogState:C,close:A,setTitleId:G},I],[C,I,A,G]),O=u.useMemo(()=>({open:C===0}),[C]),M={ref:v,id:r,role:s,"aria-modal":C===0?!0:void 0,"aria-labelledby":I.titleId,"aria-describedby":V};return u.createElement(wl,{type:"Dialog",enabled:C===0,element:g,onUpdate:F((_,ce)=>{ce==="Dialog"&&ue(_,{[Gt.Add]:()=>h(pe=>pe+1),[Gt.Remove]:()=>h(pe=>pe-1)})})},u.createElement(Wt,{force:!0},u.createElement(Ht,null,u.createElement(pt.Provider,{value:j},u.createElement(Ht.Group,{target:g},u.createElement(Wt,{force:!1},u.createElement(ne,{slot:O,name:"Dialog.Description"},u.createElement(tt,{initialFocus:i,containers:ae,features:U?ue(H,{parent:tt.features.RestoreFocus,leaf:tt.features.All&~tt.features.FocusLock}):tt.features.None},u.createElement(q,null,ie({ourProps:M,theirProps:c,slot:O,defaultTag:Fl,features:kl,visible:C===0,name:"Dialog"}))))))))),u.createElement(te,null))}let $l="div";function Pl(e,n){let t=be(),{id:r=`headlessui-dialog-overlay-${t}`,...o}=e,[{dialogState:l,close:i}]=rt("Dialog.Overlay"),s=de(n),a=F(p=>{if(p.target===p.currentTarget){if(mt(p.currentTarget))return p.preventDefault();p.preventDefault(),p.stopPropagation(),i()}}),c=u.useMemo(()=>({open:l===0}),[l]);return ie({ourProps:{ref:s,id:r,"aria-hidden":!0,onClick:a},theirProps:o,slot:c,defaultTag:$l,name:"Dialog.Overlay"})}let Ml="div";function Al(e,n){let t=be(),{id:r=`headlessui-dialog-backdrop-${t}`,...o}=e,[{dialogState:l},i]=rt("Dialog.Backdrop"),s=de(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,ie({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=be(),{id:r=`headlessui-dialog-panel-${t}`,...o}=e,[{dialogState:l},i]=rt("Dialog.Panel"),s=de(n,i.panelRef),a=u.useMemo(()=>({open:l===0}),[l]),c=F(p=>{p.stopPropagation()});return ie({ourProps:{ref:s,id:r,onClick:c},theirProps:o,slot:a,defaultTag:Dl,name:"Dialog.Panel"})}let Ll="h2";function Rl(e,n){let t=be(),{id:r=`headlessui-dialog-title-${t}`,...o}=e,[{dialogState:l,setTitleId:i}]=rt("Dialog.Title"),s=de(n);u.useEffect(()=>(i(r),()=>i(null)),[r,i]);let a=u.useMemo(()=>({open:l===0}),[l]);return ie({ourProps:{ref:s,id:r},theirProps:o,slot:a,defaultTag:Ll,name:"Dialog.Title"})}let Bl=se(Il),zl=se(Al),Wl=se(_l),Ul=se(Pl),Hl=se(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 F(()=>{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=Lt(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 ht(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,ht),t}return n}function Jl(e,n){return ue(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,c=de(n);Pt([s,i],(m,g)=>{var v;a({type:1}),It(g,kt.Loose)||(m.preventDefault(),(v=s.current)==null||v.focus())},l===0);let p=F(()=>{a({type:1})}),h=u.useMemo(()=>({open:l===0,close:p}),[l,p]),b={ref:c};return u.createElement(Kt.Provider,{value:o},u.createElement(_t,{value:ue(l,{0:me.Open,1:me.Closed})},ie({ourProps:b,theirProps:r,slot:h,defaultTag:Ql,name:"Menu"})))}let ei="button";function ti(e,n){var t;let r=be(),{id:o=`headlessui-menu-button-${r}`,...l}=e,[i,s]=ht("Menu.Button"),a=de(i.buttonRef,n),c=je(),p=F(v=>{switch(v.key){case J.Space:case J.Enter:case J.ArrowDown:v.preventDefault(),v.stopPropagation(),s({type:0}),c.nextFrame(()=>s({type:2,focus:ee.First}));break;case J.ArrowUp:v.preventDefault(),v.stopPropagation(),s({type:0}),c.nextFrame(()=>s({type:2,focus:ee.Last}));break}}),h=F(v=>{switch(v.key){case J.Space:v.preventDefault();break}}),b=F(v=>{if(mt(v.currentTarget))return v.preventDefault();e.disabled||(i.menuState===0?(s({type:1}),c.nextFrame(()=>{var x;return(x=i.buttonRef.current)==null?void 0:x.focus({preventScroll:!0})})):(v.preventDefault(),s({type:0})))}),m=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:p,onKeyUp:h,onClick:b};return ie({ourProps:g,theirProps:l,slot:m,defaultTag:ei,name:"Menu.Button"})}let ni="div",ri=$e.RenderStrategy|$e.Static;function oi(e,n){var t,r;let o=be(),{id:l=`headlessui-menu-items-${o}`,...i}=e,[s,a]=ht("Menu.Items"),c=de(s.itemsRef,n),p=De(s.itemsRef),h=je(),b=Je(),m=b!==null?(b&me.Open)===me.Open:s.menuState===0;u.useEffect(()=>{let w=s.itemsRef.current;w&&s.menuState===0&&w!==(p==null?void 0:p.activeElement)&&w.focus({preventScroll:!0})},[s.menuState,s.itemsRef,p]),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=F(w=>{var C,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:P}=s.items[s.activeItemIndex];(I=(C=P.current)==null?void 0:C.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}),we().nextFrame(()=>{var P;return(P=s.buttonRef.current)==null?void 0:P.focus({preventScroll:!0})});break;case J.Tab:w.preventDefault(),w.stopPropagation(),a({type:1}),we().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}}),v=F(w=>{switch(w.key){case J.Space:w.preventDefault();break}}),x=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:v,role:"menu",tabIndex:0,ref:c};return ie({ourProps:y,theirProps:i,slot:x,defaultTag:ni,features:ri,visible:m,name:"Menu.Items"})}let li=u.Fragment;function ii(e,n){let t=be(),{id:r=`headlessui-menu-item-${t}`,disabled:o=!1,...l}=e,[i,s]=ht("Menu.Item"),a=i.activeItemIndex!==null?i.items[i.activeItemIndex].id===r:!1,c=u.useRef(null),p=de(n,c);X(()=>{if(i.__demoMode||i.menuState!==0||!a||i.activationTrigger===0)return;let P=we();return P.requestAnimationFrame(()=>{var A,G;(G=(A=c.current)==null?void 0:A.scrollIntoView)==null||G.call(A,{block:"nearest"})}),P.dispose},[i.__demoMode,c,a,i.menuState,i.activationTrigger,i.activeItemIndex]);let h=Yl(c),b=u.useRef({disabled:o,domRef:c,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 m=F(()=>{s({type:1})}),g=F(P=>{if(o)return P.preventDefault();s({type:1}),xn(i.buttonRef.current)}),v=F(()=>{if(o)return s({type:2,focus:ee.Nothing});s({type:2,focus:ee.Specific,id:r})}),x=On(),y=F(P=>x.update(P)),w=F(P=>{x.wasMoved(P)&&(o||a||s({type:2,focus:ee.Specific,id:r,trigger:0}))}),C=F(P=>{x.wasMoved(P)&&(o||a&&s({type:2,focus:ee.Nothing}))}),I=u.useMemo(()=>({active:a,disabled:o,close:m}),[a,o,m]);return ie({ourProps:{id:r,ref:p,role:"menuitem",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,disabled:void 0,onClick:g,onFocus:v,onPointerEnter:y,onMouseEnter:y,onPointerMove:w,onMouseMove:w,onPointerLeave:C,onMouseLeave:C},theirProps:l,slot:I,defaultTag:li,name:"Menu.Item"})}let si=se(Xl),ai=se(ti),ui=se(oi),ci=se(ii),vt=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=F(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=be(),{id:r=`headlessui-label-${t}`,passive:o=!1,...l}=e,i=Zn(),s=de(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),ie({ourProps:a,theirProps:l,slot:i.slot||{},defaultTag:fi,name:i.name||"Label"})}let pi=se(mi),hi=Object.assign(pi,{});function vi(e=0){let[n,t]=u.useState(e),r=Xe(),o=u.useCallback(a=>{r.current&&t(c=>c|a)},[n,r]),l=u.useCallback(a=>!!(n&a),[n]),i=u.useCallback(a=>{r.current&&t(c=>c&~a)},[t,r]),s=u.useCallback(a=>{r.current&&t(c=>c^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]),c={},p=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},ie({ourProps:c,theirProps:p,defaultTag:gi,name:"Switch.Group"}))))}let xi="button";function wi(e,n){var t;let r=be(),{id:o=`headlessui-switch-${r}`,checked:l,defaultChecked:i=!1,onChange:s,disabled:a=!1,name:c,value:p,form:h,...b}=e,m=u.useContext(Jt),g=u.useRef(null),v=de(g,n,m===null?null:m.setSwitch),[x,y]=hn(l,s,i),w=F(()=>y==null?void 0:y(!x)),C=F(D=>{if(mt(D.currentTarget))return D.preventDefault();D.preventDefault(),w()}),I=F(D=>{D.key===J.Space?(D.preventDefault(),w()):D.key===J.Enter&&ao(D.currentTarget)}),P=F(D=>D.preventDefault()),A=u.useMemo(()=>({checked:x}),[x]),G={id:o,ref:v,role:"switch",type:Mt(e,g),tabIndex:e.tabIndex===-1?0:(t=e.tabIndex)!=null?t:0,"aria-checked":x,"aria-labelledby":m==null?void 0:m.labelledby,"aria-describedby":m==null?void 0:m.describedby,disabled:a,onClick:C,onKeyUp:I,onKeyPress:P},U=je();return u.useEffect(()=>{var D;let B=(D=g.current)==null?void 0:D.closest("form");B&&i!==void 0&&U.addEventListener(B,"reset",()=>{y(i)})},[g,y]),u.createElement(u.Fragment,null,c!=null&&x&&u.createElement(Ke,{features:ze.Hidden,...ft({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:a,form:h,checked:x,name:c,value:p})}),ie({ourProps:G,theirProps:b,slot:A,defaultTag:xi,name:"Switch"}))}let yi=se(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=we();if(!e)return t.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[l,i]=[r,o].map(a=>{let[c=0]=a.split(",").filter(Boolean).map(p=>p.includes("ms")?parseFloat(p):parseFloat(p)*1e3).sort((p,h)=>h-p);return c}),s=l+i;if(s!==0){t.group(c=>{c.setTimeout(()=>{n(),c.dispose()},s),c.addEventListener(e,"transitionrun",p=>{p.target===p.currentTarget&&c.dispose()})});let a=t.addEventListener(e,"transitionend",c=>{c.target===c.currentTarget&&(n(),a())})}else n();return t.add(()=>n()),t.dispose}function Oi(e,n,t,r){let o=t?"enter":"leave",l=we(),i=r!==void 0?Ti(r):()=>{};o==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let s=ue(o,{enter:()=>n.enter,leave:()=>n.leave}),a=ue(o,{enter:()=>n.enterTo,leave:()=>n.leaveTo}),c=ue(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,...c),l.nextFrame(()=>{Xt(e,...n.base,...s,...c),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=Xe(),s=je(),a=Se(t);X(()=>{e&&(a.current="enter")},[e]),X(()=>{let c=we();s.add(c.dispose);let p=n.current;if(p&&a.current!=="idle"&&i.current)return c.dispose(),o.current(a.current),c.add(Oi(p,r.current,a.current==="enter",()=>{c.dispose(),l.current(a.current)})),c.dispose},[t])}function Me(e=""){return e.split(/\s+/).filter(n=>n.length>1)}let gt=u.createContext(null);gt.displayName="TransitionContext";var Ni=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Ni||{});function Fi(){let e=u.useContext(gt);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function ki(){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}let bt=u.createContext(null);bt.displayName="NestingContext";function xt(e){return"children"in e?xt(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=Xe(),l=je(),i=F((m,g=Pe.Hidden)=>{let v=r.current.findIndex(({el:x})=>x===m);v!==-1&&(ue(g,{[Pe.Unmount](){r.current.splice(v,1)},[Pe.Hidden](){r.current[v].state="hidden"}}),l.microTask(()=>{var x;!xt(r)&&o.current&&((x=t.current)==null||x.call(t))}))}),s=F(m=>{let g=r.current.find(({el:v})=>v===m);return g?g.state!=="visible"&&(g.state="visible"):r.current.push({el:m,state:"visible"}),()=>i(m,Pe.Unmount)}),a=u.useRef([]),c=u.useRef(Promise.resolve()),p=u.useRef({enter:[],leave:[],idle:[]}),h=F((m,g,v)=>{a.current.splice(0),n&&(n.chains.current[g]=n.chains.current[g].filter(([x])=>x!==m)),n==null||n.chains.current[g].push([m,new Promise(x=>{a.current.push(x)})]),n==null||n.chains.current[g].push([m,new Promise(x=>{Promise.all(p.current[g].map(([y,w])=>w)).then(()=>x())})]),g==="enter"?c.current=c.current.then(()=>n==null?void 0:n.wait.current).then(()=>v(g)):v(g)}),b=F((m,g,v)=>{Promise.all(p.current[g].splice(0).map(([x,y])=>y)).then(()=>{var x;(x=a.current.shift())==null||x()}).then(()=>v(g))});return u.useMemo(()=>({children:r,register:s,unregister:i,onStart:h,onStop:b,wait:c,chains:p}),[s,i,r,h,b,p,c])}function Ii(){}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:Ii;return t}function Pi(e){let n=u.useRef(Jn(e));return u.useEffect(()=>{n.current=Jn(e)},[e]),n}let Mi="div",Qn=$e.RenderStrategy;function Ai(e,n){var t,r;let{beforeEnter:o,afterEnter:l,beforeLeave:i,afterLeave:s,enter:a,enterFrom:c,enterTo:p,entered:h,leave:b,leaveFrom:m,leaveTo:g,...v}=e,x=u.useRef(null),y=de(x,n),w=(t=v.unmount)==null||t?Pe.Unmount:Pe.Hidden,{show:C,appear:I,initial:P}=Fi(),[A,G]=u.useState(C?"visible":"hidden"),U=ki(),{register:D,unregister:B}=U;u.useEffect(()=>D(x),[D,x]),u.useEffect(()=>{if(w===Pe.Hidden&&x.current){if(C&&A!=="visible"){G("visible");return}return ue(A,{hidden:()=>B(x),visible:()=>D(x)})}},[A,x,D,B,C,w]);let R=Se({base:Me(v.className),enter:Me(a),enterFrom:Me(c),enterTo:Me(p),entered:Me(h),leave:Me(b),leaveFrom:Me(m),leaveTo:Me(g)}),q=Pi({beforeEnter:o,afterEnter:l,beforeLeave:i,afterLeave:s}),K=Be();u.useEffect(()=>{if(K&&A==="visible"&&x.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[x,A,K]);let ae=P&&!I,T=I&&C&&P,te=!K||ae?"idle":C?"enter":"leave",H=vi(0),oe=F(ge=>ue(ge,{enter:()=>{H.addFlag(me.Opening),q.current.beforeEnter()},leave:()=>{H.addFlag(me.Closing),q.current.beforeLeave()},idle:()=>{}})),k=F(ge=>ue(ge,{enter:()=>{H.removeFlag(me.Opening),q.current.afterEnter()},leave:()=>{H.removeFlag(me.Closing),q.current.afterLeave()},idle:()=>{}})),W=Kn(()=>{G("hidden"),B(x)},U),le=u.useRef(!1);ji({immediate:T,container:x,classes:R,direction:te,onStart:Se(ge=>{le.current=!0,W.onStart(x,ge,oe)}),onStop:Se(ge=>{le.current=!1,W.onStop(x,ge,k),ge==="leave"&&!xt(W)&&(G("hidden"),B(x))})});let fe=v,ye={ref:y};return T?fe={...fe,className:ct(v.className,...R.current.enter,...R.current.enterFrom)}:le.current&&(fe.className=ct(v.className,(r=x.current)==null?void 0:r.className),fe.className===""&&delete fe.className),u.createElement(bt.Provider,{value:W},u.createElement(_t,{value:ue(A,{visible:me.Open,hidden:me.Closed})|H.flags},ie({ourProps:ye,theirProps:fe,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=de(i,n);Be();let a=Je();if(t===void 0&&a!==null&&(t=(a&me.Open)===me.Open),![!0,!1].includes(t))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,p]=u.useState(t?"visible":"hidden"),h=Kn(()=>{p("hidden")}),[b,m]=u.useState(!0),g=u.useRef([t]);X(()=>{b!==!1&&g.current[g.current.length-1]!==t&&(g.current.push(t),m(!1))},[g,t]);let v=u.useMemo(()=>({show:t,appear:r,initial:b}),[t,r,b]);u.useEffect(()=>{if(t)p("visible");else if(!xt(h))p("hidden");else{let C=i.current;if(!C)return;let I=C.getBoundingClientRect();I.x===0&&I.y===0&&I.width===0&&I.height===0&&p("hidden")}},[t,h]);let x={unmount:o},y=F(()=>{var C;b&&m(!1),(C=e.beforeEnter)==null||C.call(e)}),w=F(()=>{var C;b&&m(!1),(C=e.beforeLeave)==null||C.call(e)});return u.createElement(bt.Provider,{value:h},u.createElement(gt.Provider,{value:v},ie({ourProps:{...x,as:u.Fragment,children:u.createElement(Xn,{ref:s,...x,...l,beforeEnter:y,beforeLeave:w})},theirProps:{},defaultTag:u.Fragment,features:Qn,visible:c==="visible",name:"Transition"})))}function _i(e,n){let t=u.useContext(gt)!==null,r=Je()!==null;return u.createElement(u.Fragment,null,!t&&r?u.createElement(en,{ref:n,...e}):u.createElement(Xn,{ref:n,...e}))}let en=se(Di),Xn=se(Ai),Li=se(_i),Re=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:f.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:f.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:f.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:f.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 c=ns[e];return i?f.jsx("div",{className:"fixed top-2.5 left-1/2 transform -translate-x-1/2 w-80 3xs:w-96 z-50",children:f.jsx(Re,{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:f.jsxs("div",{className:$("rounded-md p-4 text-center",c.color),children:[f.jsxs("div",{className:"flex justify-center flex-shrink-0",children:[c.icon,f.jsx("h3",{className:$("text-sm font-medium ml-3",c.colorTitle),children:n})]}),f.jsx("div",{className:$("mt-2 text-sm",c.colorText),children:f.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 c=s.toLowerCase(),p=c.split(" "),h=p[p.length-1];return c.charAt(0)+h.charAt(0)}return f.jsx(f.Fragment,{children:e?f.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:c=>c.currentTarget.style.filter="none","data-testid":"img"}):i?f.jsx(ms,{className:$("bg-white text-default-5",l!==""?l:"w-7 h-7")}):f.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 f.jsx("nav",{className:"flex items-center justify-center w-full","aria-label":"Progress","data-testid":"bullets",children:f.jsx("ol",{role:"list",className:"flex items-center space-x-5",children:new Array(e).fill(1).map((l,i)=>f.jsx("li",{children:t!==i?f.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:f.jsx("span",{className:"sr-only",children:"step"})}):f.jsxs("div",{className:"relative flex items-center justify-center cursor-pointer","aria-current":"step",children:[f.jsx("span",{className:"absolute flex h-5 w-5 p-px","aria-hidden":"true",children:f.jsx("span",{className:"h-full w-full rounded-full bg-gray-300"})}),f.jsx("span",{className:"relative block h-2.5 w-2.5 rounded-full bg-gray-500","aria-hidden":"true"}),f.jsx("span",{className:"sr-only",children:"step"})]})},i))})})};var tr={exports:{}};/*!
31
+ `));let b=p.props,m=typeof(b==null?void 0:b.className)=="function"?(...v)=>vt(b==null?void 0:b.className(...v),u.className):vt(b==null?void 0:b.className,u.className),g=m?{className:m}:{};return a.cloneElement(p,Object.assign({},kn(p.props,bt(Lt(u,["ref"]))),h,c,{ref:o(p.ref,c.ref)},g))}return a.createElement(l,Object.assign({},Lt(u,["ref"]),l!==a.Fragment&&c,l!==a.Fragment&&h),p)}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 kn(...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(a.forwardRef(e),{displayName:(n=e.displayName)!=null?n:e.name})}function bt(e){let n=Object.assign({},e);for(let t in n)n[t]===void 0&&delete n[t];return n}function Lt(e,n=[]){let t=Object.assign({},e);for(let r of n)r in t&&delete t[r];return t}let ro="div";var Ye=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Ye||{});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 et=ue(oo),_t=a.createContext(null);_t.displayName="OpenClosedContext";var he=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(he||{});function tt(){return a.useContext(_t)}function Rt({value:e,children:n}){return a.createElement(_t.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 je=[];lo(()=>{function e(n){n.target instanceof HTMLElement&&n.target!==document.body&&je[0]!==n.target&&(je.unshift(n.target),je=je.filter(t=>t!=null&&t.isConnected),je.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 xt(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 ne=(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))(ne||{});function Bt(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 In(e={},n=null,t=[]){for(let[r,o]of Object.entries(e))$n(t,Pn(n,r),o);return t}function Pn(e,n){return e?e+"["+n+"]":n}function $n(e,n,t){if(Array.isArray(t))for(let[r,o]of t.entries())$n(e,Pn(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,""]):In(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 Q=(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))(Q||{}),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 zt(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):Mt(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 p=n.focus===ne.Specific?n.idx:Bt(n,{resolveItems:()=>e.virtual.options,resolveActiveIndex:()=>{var b,m;return(m=(b=e.activeOptionIndex)!=null?b:e.virtual.options.findIndex(g=>!e.virtual.disabled(g)))!=null?m:null},resolveDisabled:e.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),h=(l=n.trigger)!=null?l:2;return e.activeOptionIndex===p&&e.activationTrigger===h?e:{...e,activeOptionIndex:p,activationTrigger:h}}let s=zt(e);if(s.activeOptionIndex===null){let p=s.options.findIndex(h=>!h.dataRef.current.disabled);p!==-1&&(s.activeOptionIndex=p)}let u=n.focus===ne.Specific?n.idx:Bt(n,{resolveItems:()=>s.options,resolveActiveIndex:()=>s.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled}),c=(i=n.trigger)!=null?i:2;return e.activeOptionIndex===u&&e.activationTrigger===c?e:{...e,...s,activeOptionIndex:u,activationTrigger:c}},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=zt(e,u=>(u.push(l),u));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=zt(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})}}},Wt=a.createContext(null);Wt.displayName="ComboboxActionsContext";function nt(e){let n=a.useContext(Wt);if(n===null){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,nt),t}return n}let Mn=a.createContext(null);function ho(e){var n;let t=ze("VirtualProvider"),[r,o]=a.useMemo(()=>{let u=t.optionsRef.current;if(!u)return[0,0];let c=window.getComputedStyle(u);return[parseFloat(c.paddingBlockStart||c.paddingTop),parseFloat(c.paddingBlockEnd||c.paddingBottom)]},[t.optionsRef.current]),l=Hr({scrollPaddingStart:r,scrollPaddingEnd:o,count:t.virtual.options.length,estimateSize(){return 40},getScrollElement(){var u;return(u=t.optionsRef.current)!=null?u:null},overscan:12}),[i,s]=a.useState(0);return te(()=>{s(u=>u+1)},[(n=t.virtual)==null?void 0:n.options]),a.createElement(Mn.Provider,{value:l},a.createElement("div",{style:{position:"relative",width:"100%",height:`${l.getTotalSize()}px`},ref:u=>{if(u){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(u=>{var c;return a.createElement(a.Fragment,{key:u.key},a.cloneElement((c=e.children)==null?void 0:c.call(e,{option:t.virtual.options[u.index],open:t.comboboxState===0}),{key:`${i}-${u.key}`,"data-index":u.index,"aria-setsize":t.virtual.options.length,"aria-posinset":u.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${u.start}px)`,overflowAnchor:"none"}}))})))}let Ut=a.createContext(null);Ut.displayName="ComboboxDataContext";function ze(e){let n=a.useContext(Ut);if(n===null){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,ze),t}return n}function vo(e,n){return de(n.type,po,e,n)}let go=a.Fragment;function bo(e,n){let{value:t,defaultValue:r,onChange:o,form:l,name:i,by:s=null,disabled:u=!1,__demoMode:c=!1,nullable:p=!1,multiple:h=!1,immediate:b=!1,virtual:m=null,...g}=e,v=!1,x=null,[y=h?[]:void 0,w]=gn(t,o,r),[C,N]=a.useReducer(vo,{dataRef:a.createRef(),comboboxState:c?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),I=a.useRef(!1),M=a.useRef({static:!1,hold:!1}),Z=a.useRef(null),U=a.useRef(null),A=a.useRef(null),_=a.useRef(null),L=j(typeof s=="string"?($,B)=>{let z=s;return($==null?void 0:$[z])===(B==null?void 0:B[z])}:s??(($,B)=>$===B)),G=j($=>C.options.findIndex(B=>L(B.dataRef.current.value,$))),J=a.useCallback($=>de(T.mode,{1:()=>y.some(B=>L(B,$)),0:()=>L(y,$)}),[y]),ce=j($=>C.activeOptionIndex===G($)),T=a.useMemo(()=>({...C,immediate:v,optionsPropsRef:M,labelRef:Z,inputRef:U,buttonRef:A,optionsRef:_,value:y,defaultValue:r,disabled:u,mode:h?1:0,virtual:C.virtual,get activeOptionIndex(){if(I.current&&C.activeOptionIndex===null&&C.options.length>0){let $=C.options.findIndex(B=>!B.dataRef.current.disabled);if($!==-1)return $}return C.activeOptionIndex},calculateIndex:G,compare:L,isSelected:J,isActive:ce,nullable:p,__demoMode:c}),[y,r,u,h,p,c,C,x]);te(()=>{},[x,void 0]),te(()=>{C.dataRef.current=T},[T]),At([T.buttonRef,T.inputRef,T.optionsRef],()=>Ne.closeCombobox(),T.comboboxState===0);let re=a.useMemo(()=>{var $,B,z;return{open:T.comboboxState===0,disabled:u,activeIndex:T.activeOptionIndex,activeOption:T.activeOptionIndex===null?null:T.virtual?T.virtual.options[($=T.activeOptionIndex)!=null?$:0]:(z=(B=T.options[T.activeOptionIndex])==null?void 0:B.dataRef.current.value)!=null?z:null,value:y}},[T,u,y]),H=j(()=>{if(T.activeOptionIndex!==null){if(T.virtual)ye(T.virtual.options[T.activeOptionIndex]);else{let{dataRef:$}=T.options[T.activeOptionIndex];ye($.current.value)}Ne.goToOption(ne.Specific,T.activeOptionIndex)}}),se=j(()=>{N({type:0}),I.current=!0}),P=j(()=>{N({type:1}),I.current=!1}),W=j(($,B,z)=>(I.current=!1,$===ne.Specific?N({type:2,focus:ne.Specific,idx:B,trigger:z}):N({type:2,focus:$,trigger:z}))),X=j(($,B)=>(N({type:3,payload:{id:$,dataRef:B}}),()=>{T.isActive(B.current.value)&&(I.current=!0),N({type:4,id:$})})),ve=j($=>(N({type:5,id:$}),()=>N({type:5,id:null}))),ye=j($=>de(T.mode,{0(){return w==null?void 0:w($)},1(){let B=T.value.slice(),z=B.findIndex(me=>L(me,$));return z===-1?B.push($):B.splice(z,1),w==null?void 0:w(B)}})),fe=j($=>{N({type:6,trigger:$})}),Ne=a.useMemo(()=>({onChange:ye,registerOption:X,registerLabel:ve,goToOption:W,closeCombobox:P,openCombobox:se,setActivationTrigger:fe,selectActiveOption:H}),[]),V=n===null?{}:{ref:n},oe=a.useRef(null),le=ke();return a.useEffect(()=>{oe.current&&r!==void 0&&le.addEventListener(oe.current,"reset",()=>{w==null||w(r)})},[oe,w]),a.createElement(Wt.Provider,{value:Ne},a.createElement(Ut.Provider,{value:T},a.createElement(Rt,{value:de(T.comboboxState,{0:he.Open,1:he.Closed})},i!=null&&y!=null&&In({[i]:y}).map(([$,B],z)=>a.createElement(et,{features:Ye.Hidden,ref:z===0?me=>{var xe;oe.current=(xe=me==null?void 0:me.closest("form"))!=null?xe:null}:void 0,...bt({key:$,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:l,disabled:u,name:$,value:B})})),ae({ourProps:V,theirProps:g,slot:re,defaultTag:go,name:"Combobox"}))))}let xo="input";function wo(e,n){var t,r,o,l,i;let s=Ee(),{id:u=`headlessui-combobox-input-${s}`,onChange:c,displayValue:p,type:h="text",...b}=e,m=ze("Combobox.Input"),g=nt("Combobox.Input"),v=pe(m.inputRef,n),x=Be(m.inputRef),y=a.useRef(!1),w=ke(),C=j(()=>{g.onChange(null),m.optionsRef.current&&(m.optionsRef.current.scrollTop=0),g.goToOption(ne.Nothing)}),N=function(){var T;return typeof p=="function"&&m.value!==void 0?(T=p(m.value))!=null?T:"":typeof m.value=="string"?m.value:""}();Xe(([T,re],[H,se])=>{if(y.current)return;let P=m.inputRef.current;P&&((se===0&&re===1||T!==H)&&(P.value=T),requestAnimationFrame(()=>{if(y.current||!P||(x==null?void 0:x.activeElement)!==P)return;let{selectionStart:W,selectionEnd:X}=P;Math.abs((X??0)-(W??0))===0&&W===0&&P.setSelectionRange(P.value.length,P.value.length)}))},[N,m.comboboxState,x]),Xe(([T],[re])=>{if(T===0&&re===1){if(y.current)return;let H=m.inputRef.current;if(!H)return;let se=H.value,{selectionStart:P,selectionEnd:W,selectionDirection:X}=H;H.value="",H.value=se,X!==null?H.setSelectionRange(P,W,X):H.setSelectionRange(P,W)}},[m.comboboxState]);let I=a.useRef(!1),M=j(()=>{I.current=!0}),Z=j(()=>{w.nextFrame(()=>{I.current=!1})}),U=j(T=>{switch(y.current=!0,T.key){case Q.Enter:if(y.current=!1,m.comboboxState!==0||I.current)return;if(T.preventDefault(),T.stopPropagation(),m.activeOptionIndex===null){g.closeCombobox();return}g.selectActiveOption(),m.mode===0&&g.closeCombobox();break;case Q.ArrowDown:return y.current=!1,T.preventDefault(),T.stopPropagation(),de(m.comboboxState,{0:()=>g.goToOption(ne.Next),1:()=>g.openCombobox()});case Q.ArrowUp:return y.current=!1,T.preventDefault(),T.stopPropagation(),de(m.comboboxState,{0:()=>g.goToOption(ne.Previous),1:()=>{g.openCombobox(),w.nextFrame(()=>{m.value||g.goToOption(ne.Last)})}});case Q.Home:if(T.shiftKey)break;return y.current=!1,T.preventDefault(),T.stopPropagation(),g.goToOption(ne.First);case Q.PageUp:return y.current=!1,T.preventDefault(),T.stopPropagation(),g.goToOption(ne.First);case Q.End:if(T.shiftKey)break;return y.current=!1,T.preventDefault(),T.stopPropagation(),g.goToOption(ne.Last);case Q.PageDown:return y.current=!1,T.preventDefault(),T.stopPropagation(),g.goToOption(ne.Last);case Q.Escape:return y.current=!1,m.comboboxState!==0?void 0:(T.preventDefault(),m.optionsRef.current&&!m.optionsPropsRef.current.static&&T.stopPropagation(),m.nullable&&m.mode===0&&m.value===null&&C(),g.closeCombobox());case Q.Tab:if(y.current=!1,m.comboboxState!==0)return;m.mode===0&&m.activationTrigger!==1&&g.selectActiveOption(),g.closeCombobox();break}}),A=j(T=>{c==null||c(T),m.nullable&&m.mode===0&&T.target.value===""&&C(),g.openCombobox()}),_=j(T=>{var re,H,se;let P=(re=T.relatedTarget)!=null?re:je.find(W=>W!==T.currentTarget);if(y.current=!1,!((H=m.optionsRef.current)!=null&&H.contains(P))&&!((se=m.buttonRef.current)!=null&&se.contains(P))&&m.comboboxState===0)return T.preventDefault(),m.mode===0&&(m.nullable&&m.value===null?C():m.activationTrigger!==1&&g.selectActiveOption()),g.closeCombobox()}),L=j(T=>{var re,H,se;let P=(re=T.relatedTarget)!=null?re:je.find(W=>W!==T.currentTarget);(H=m.buttonRef.current)!=null&&H.contains(P)||(se=m.optionsRef.current)!=null&&se.contains(P)||m.disabled||m.immediate&&m.comboboxState!==0&&(g.openCombobox(),w.nextFrame(()=>{g.setActivationTrigger(1)}))}),G=kt(()=>{if(m.labelId)return[m.labelId].join(" ")},[m.labelId]),J=a.useMemo(()=>({open:m.comboboxState===0,disabled:m.disabled}),[m]),ce={ref:v,id:u,role:"combobox",type:h,"aria-controls":(t=m.optionsRef.current)==null?void 0:t.id,"aria-expanded":m.comboboxState===0,"aria-activedescendant":m.activeOptionIndex===null?void 0:m.virtual?(r=m.options.find(T=>{var re;return!((re=m.virtual)!=null&&re.disabled(T.dataRef.current.value))&&m.compare(T.dataRef.current.value,m.virtual.options[m.activeOptionIndex])}))==null?void 0:r.id:(o=m.options[m.activeOptionIndex])==null?void 0:o.id,"aria-labelledby":G,"aria-autocomplete":"list",defaultValue:(i=(l=e.defaultValue)!=null?l:m.defaultValue!==void 0?p==null?void 0:p(m.defaultValue):null)!=null?i:m.defaultValue,disabled:m.disabled,onCompositionStart:M,onCompositionEnd:Z,onKeyDown:U,onChange:A,onFocus:L,onBlur:_};return ae({ourProps:ce,theirProps:b,slot:J,defaultTag:xo,name:"Combobox.Input"})}let yo="button";function Eo(e,n){var t;let r=ze("Combobox.Button"),o=nt("Combobox.Button"),l=pe(r.buttonRef,n),i=Ee(),{id:s=`headlessui-combobox-button-${i}`,...u}=e,c=ke(),p=j(v=>{switch(v.key){case Q.ArrowDown:return v.preventDefault(),v.stopPropagation(),r.comboboxState===1&&o.openCombobox(),c.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})});case Q.ArrowUp:return v.preventDefault(),v.stopPropagation(),r.comboboxState===1&&(o.openCombobox(),c.nextFrame(()=>{r.value||o.goToOption(ne.Last)})),c.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})});case Q.Escape:return r.comboboxState!==0?void 0:(v.preventDefault(),r.optionsRef.current&&!r.optionsPropsRef.current.static&&v.stopPropagation(),o.closeCombobox(),c.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})}));default:return}}),h=j(v=>{if(xt(v.currentTarget))return v.preventDefault();r.comboboxState===0?o.closeCombobox():(v.preventDefault(),o.openCombobox()),c.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})})}),b=kt(()=>{if(r.labelId)return[r.labelId,s].join(" ")},[r.labelId,s]),m=a.useMemo(()=>({open:r.comboboxState===0,disabled:r.disabled,value:r.value}),[r]),g={ref:l,id:s,type:Dt(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:p};return ae({ourProps:g,theirProps:u,slot:m,defaultTag:yo,name:"Combobox.Button"})}let So="label";function To(e,n){let t=Ee(),{id:r=`headlessui-combobox-label-${t}`,...o}=e,l=ze("Combobox.Label"),i=nt("Combobox.Label"),s=pe(l.labelRef,n);te(()=>i.registerLabel(r),[r]);let u=j(()=>{var p;return(p=l.inputRef.current)==null?void 0:p.focus({preventScroll:!0})}),c=a.useMemo(()=>({open:l.comboboxState===0,disabled:l.disabled}),[l]);return ae({ourProps:{ref:s,id:r,onClick:u},theirProps:o,slot:c,defaultTag:So,name:"Combobox.Label"})}let Co="ul",Oo=Ae.RenderStrategy|Ae.Static;function jo(e,n){let t=Ee(),{id:r=`headlessui-combobox-options-${t}`,hold:o=!1,...l}=e,i=ze("Combobox.Options"),s=pe(i.optionsRef,n),u=tt(),c=u!==null?(u&he.Open)===he.Open:i.comboboxState===0;te(()=>{var m;i.optionsPropsRef.current.static=(m=e.static)!=null?m:!1},[i.optionsPropsRef,e.static]),te(()=>{i.optionsPropsRef.current.hold=o},[i.optionsPropsRef,o]),Fn({container:i.optionsRef.current,enabled:i.comboboxState===0,accept(m){return m.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:m.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(m){m.setAttribute("role","none")}});let p=kt(()=>{var m,g;return(g=i.labelId)!=null?g:(m=i.buttonRef.current)==null?void 0:m.id},[i.labelId,i.buttonRef.current]),h=a.useMemo(()=>({open:i.comboboxState===0,option:void 0}),[i]),b={"aria-labelledby":p,role:"listbox","aria-multiselectable":i.mode===1?!0:void 0,id:r,ref:s};return i.virtual&&i.comboboxState===0&&Object.assign(l,{children:a.createElement(ho,null,l.children)}),ae({ourProps:b,theirProps:l,slot:h,defaultTag:Co,features:Oo,visible:c,name:"Combobox.Options"})}let No="li";function Fo(e,n){var t;let r=Ee(),{id:o=`headlessui-combobox-option-${r}`,disabled:l=!1,value:i,order:s=null,...u}=e,c=ze("Combobox.Option"),p=nt("Combobox.Option"),h=c.virtual?c.activeOptionIndex===c.calculateIndex(i):c.activeOptionIndex===null?!1:((t=c.options[c.activeOptionIndex])==null?void 0:t.id)===o,b=c.isSelected(i),m=a.useRef(null),g=Oe({disabled:l,value:i,domRef:m,order:s}),v=a.useContext(Mn),x=pe(n,m,v?v.measureElement:null),y=j(()=>p.onChange(i));te(()=>p.registerOption(o,g),[g,o]);let w=a.useRef(!(c.virtual||c.__demoMode));te(()=>{if(!c.virtual||!c.__demoMode)return;let _=Te();return _.requestAnimationFrame(()=>{w.current=!0}),_.dispose},[c.virtual,c.__demoMode]),te(()=>{if(!w.current||c.comboboxState!==0||!h||c.activationTrigger===0)return;let _=Te();return _.requestAnimationFrame(()=>{var L,G;(G=(L=m.current)==null?void 0:L.scrollIntoView)==null||G.call(L,{block:"nearest"})}),_.dispose},[m,h,c.comboboxState,c.activationTrigger,c.activeOptionIndex]);let C=j(_=>{var L;if(l||(L=c.virtual)!=null&&L.disabled(i))return _.preventDefault();y(),Sn()||requestAnimationFrame(()=>{var G;return(G=c.inputRef.current)==null?void 0:G.focus({preventScroll:!0})}),c.mode===0&&requestAnimationFrame(()=>p.closeCombobox())}),N=j(()=>{var _;if(l||(_=c.virtual)!=null&&_.disabled(i))return p.goToOption(ne.Nothing);let L=c.calculateIndex(i);p.goToOption(ne.Specific,L)}),I=Nn(),M=j(_=>I.update(_)),Z=j(_=>{var L;if(!I.wasMoved(_)||l||(L=c.virtual)!=null&&L.disabled(i)||h)return;let G=c.calculateIndex(i);p.goToOption(ne.Specific,G,0)}),U=j(_=>{var L;I.wasMoved(_)&&(l||(L=c.virtual)!=null&&L.disabled(i)||h&&(c.optionsPropsRef.current.hold||p.goToOption(ne.Nothing)))}),A=a.useMemo(()=>({active:h,selected:b,disabled:l}),[h,b,l]);return ae({ourProps:{id:o,ref:x,role:"option",tabIndex:l===!0?void 0:-1,"aria-disabled":l===!0?!0:void 0,"aria-selected":b,disabled:void 0,onClick:C,onFocus:N,onPointerEnter:M,onMouseEnter:M,onPointerMove:Z,onMouseMove:Z,onPointerLeave:U,onMouseLeave:U},theirProps:u,slot:A,defaultTag:No,name:"Combobox.Option"})}let ko=ue(bo),Io=ue(Eo),Po=ue(wo),$o=ue(To),Mo=ue(jo),Ao=ue(Fo),Pe=Object.assign(ko,{Input:Po,Button:Io,Label:$o,Options:Mo,Option:Ao});function An(e,n,t,r){let o=Oe(t);a.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 rt(){let e=a.useRef(!1);return te(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Dn(e){let n=j(e),t=a.useRef(!1);a.useEffect(()=>(t.current=!1,()=>{t.current=!0,mt(()=>{t.current&&n()})}),[n])}var ot=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(ot||{});function Do(){let e=a.useRef(0);return Tn("keydown",n=>{n.key==="Tab"&&(e.current=n.shiftKey?1:0)},!0),e}function Ln(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 _n=(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))(_n||{});function _o(e,n){let t=a.useRef(null),r=pe(t,n),{initialFocus:o,containers:l,features:i=30,...s}=e;Ve()||(i=1);let u=Be(t);zo({ownerDocument:u},!!(i&16));let c=Wo({ownerDocument:u,container:t,initialFocus:o},!!(i&2));Uo({ownerDocument:u,container:t,containers:l,previousActiveElement:c},!!(i&8));let p=Do(),h=j(v=>{let x=t.current;x&&(y=>y())(()=>{de(p.current,{[ot.Forwards]:()=>{Qe(x,Ie.First,{skipElements:[v.relatedTarget]})},[ot.Backwards]:()=>{Qe(x,Ie.Last,{skipElements:[v.relatedTarget]})}})})}),b=ke(),m=a.useRef(!1),g={ref:r,onKeyDown(v){v.key=="Tab"&&(m.current=!0,b.requestAnimationFrame(()=>{m.current=!1}))},onBlur(v){let x=Ln(l);t.current instanceof HTMLElement&&x.add(t.current);let y=v.relatedTarget;y instanceof HTMLElement&&y.dataset.headlessuiFocusGuard!=="true"&&(Rn(x,y)||(m.current?Qe(t.current,de(p.current,{[ot.Forwards]:()=>Ie.Next,[ot.Backwards]:()=>Ie.Previous})|Ie.WrapAround,{relativeTo:v.target}):v.target instanceof HTMLElement&&Me(v.target)))}};return a.createElement(a.Fragment,null,!!(i&4)&&a.createElement(et,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:Ye.Focusable}),ae({ourProps:g,theirProps:s,defaultTag:Lo,name:"FocusTrap"}),!!(i&4)&&a.createElement(et,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:Ye.Focusable}))}let Ro=ue(_o),lt=Object.assign(Ro,{features:_n});function Bo(e=!0){let n=a.useRef(je.slice());return Xe(([t],[r])=>{r===!0&&t===!1&&mt(()=>{n.current.splice(0)}),r===!1&&t===!0&&(n.current=je.slice())},[e,je,n]),j(()=>{var t;return(t=n.current.find(r=>r!=null&&r.isConnected))!=null?t:null})}function zo({ownerDocument:e},n){let t=Bo(n);Xe(()=>{n||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&Me(t())},[n]),Dn(()=>{n&&Me(t())})}function Wo({ownerDocument:e,container:n,initialFocus:t},r){let o=a.useRef(null),l=rt();return Xe(()=>{if(!r)return;let i=n.current;i&&mt(()=>{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?Me(t.current):Qe(i,Ie.First)===xn.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=rt();An(e==null?void 0:e.defaultView,"focus",i=>{if(!o||!l.current)return;let s=Ln(t);n.current instanceof HTMLElement&&s.add(n.current);let u=r.current;if(!u)return;let c=i.target;c&&c instanceof HTMLElement?Rn(s,c)?(r.current=c,Me(c)):(i.preventDefault(),i.stopPropagation(),Me(u)):Me(r.current)},!0)}function Rn(e,n){for(let t of e)if(t.contains(n))return!0;return!1}let Bn=a.createContext(!1);function Ho(){return a.useContext(Bn)}function Ht(e){return a.createElement(Bn.Provider,{value:e.force},e.children)}function Vo(e){let n=Ho(),t=a.useContext(zn),r=Be(e),[o,l]=a.useState(()=>{if(!n&&t!==null||Fe.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 a.useEffect(()=>{o!==null&&(r!=null&&r.body.contains(o)||r==null||r.body.appendChild(o))},[o,r]),a.useEffect(()=>{n||t!==null&&l(t.current)},[t,l,n]),o}let Yo=a.Fragment;function qo(e,n){let t=e,r=a.useRef(null),o=pe(to(p=>{r.current=p}),n),l=Be(r),i=Vo(r),[s]=a.useState(()=>{var p;return Fe.isServer?null:(p=l==null?void 0:l.createElement("div"))!=null?p:null}),u=a.useContext(Vt),c=Ve();return te(()=>{!i||!s||i.contains(s)||(s.setAttribute("data-headlessui-portal",""),i.appendChild(s))},[i,s]),te(()=>{if(s&&u)return u.register(s)},[u,s]),Dn(()=>{var p;!i||!s||(s instanceof Node&&i.contains(s)&&i.removeChild(s),i.childNodes.length<=0&&((p=i.parentElement)==null||p.removeChild(i)))}),c?!i||!s?null:ft.createPortal(ae({ourProps:{ref:o},theirProps:t,defaultTag:Yo,name:"Portal"}),s):null}let Go=a.Fragment,zn=a.createContext(null);function Zo(e,n){let{target:t,...r}=e,o={ref:pe(n)};return a.createElement(zn.Provider,{value:t},ae({ourProps:o,theirProps:r,defaultTag:Go,name:"Popover.Group"}))}let Vt=a.createContext(null);function Ko(){let e=a.useContext(Vt),n=a.useRef([]),t=j(l=>(n.current.push(l),e&&e.register(l),()=>r(l))),r=j(l=>{let i=n.current.indexOf(l);i!==-1&&n.current.splice(i,1),e&&e.unregister(l)}),o=a.useMemo(()=>({register:t,unregister:r,portals:n}),[t,r,n]);return[n,a.useMemo(()=>function({children:l}){return a.createElement(Vt.Provider,{value:o},l)},[o])]}let Jo=ue(qo),Qo=ue(Zo),Yt=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,qt(o)&&l({inst:o})},[e,r,n]),nl(()=>(qt(o)&&l({inst:o}),e(()=>{qt(o)&&l({inst:o})})),[e]),ol(r),r}function qt(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 En()?{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=Te();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 u=s.target.closest("a");if(!u)return;let{hash:c}=new URL(u.href),p=e.querySelector(c);p&&!r(p)&&(i=p)}catch{}},!0),n.addEventListener(e,"touchstart",s=>{if(s.target instanceof HTMLElement)if(r(s.target)){let u=s.target;for(;u.parentElement&&r(u.parentElement);)u=u.parentElement;n.style(u,"overscrollBehavior","contain")}else n.style(s.target,"touchAction","none")}),n.addEventListener(e,"touchmove",s=>{if(s.target instanceof HTMLElement)if(r(s.target)){let u=s.target;for(;u.parentElement&&u.dataset.headlessuiPortal!==""&&!(u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth);)u=u.parentElement;u.dataset.headlessuiPortal===""&&s.preventDefault()}else s.preventDefault()},{passive:!1}),n.add(()=>{var s;let u=(s=window.scrollY)!=null?s:window.pageYOffset;l!==u&&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 We=fl(()=>new Map,{PUSH(e,n){var t;let r=(t=this.get(e))!=null?t:{doc:e,count:0,d:Te(),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)}});We.subscribe(()=>{let e=We.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)&&We.dispatch(t.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",t),t.count===0&&We.dispatch("TEARDOWN",t)}});function gl(e,n,t){let r=dl(We),o=e?r.get(e):void 0,l=o?o.count>0:!1;return te(()=>{if(!(!e||!n))return We.dispatch("PUSH",e,t),()=>We.dispatch("POP",e,t)},[n,e]),l}let Gt=new Map,it=new Map;function Wn(e,n=!0){te(()=>{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=it.get(r))!=null?i:1;if(s===1?it.delete(r):it.set(r,s-1),s!==1)return;let u=Gt.get(r);u&&(u["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",u["aria-hidden"]),r.inert=u.inert,Gt.delete(r))}let l=(t=it.get(r))!=null?t:0;return it.set(r,l+1),l!==0||(Gt.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=a.useRef((r=t==null?void 0:t.current)!=null?r:null),l=Be(o),i=j(()=>{var s,u,c;let p=[];for(let h of e)h!==null&&(h instanceof HTMLElement?p.push(h):"current"in h&&h.current instanceof HTMLElement&&p.push(h.current));if(n!=null&&n.current)for(let h of n.current)p.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((c=(u=o.current)==null?void 0:u.getRootNode())==null?void 0:c.host)||p.some(b=>h.contains(b))||p.push(h));return p});return{resolveContainers:i,contains:j(s=>i().some(u=>u.contains(s))),mainTreeNodeRef:o,MainTreeNode:a.useMemo(()=>function(){return t!=null?null:a.createElement(et,{features:Ye.Hidden,ref:o})},[o,t])}}let Zt=a.createContext(()=>{});Zt.displayName="StackContext";var Kt=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Kt||{});function xl(){return a.useContext(Zt)}function wl({children:e,onUpdate:n,type:t,element:r,enabled:o}){let l=xl(),i=j((...s)=>{n==null||n(...s),l(...s)});return te(()=>{let s=o===void 0||o===!0;return s&&i(0,t,r),()=>{s&&i(1,t,r)}},[i,t,r,o]),a.createElement(Zt.Provider,{value:i},e)}let Un=a.createContext(null);function Hn(){let e=a.useContext(Un);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,Hn),n}return e}function Vn(){let[e,n]=a.useState([]);return[e.length>0?e.join(" "):void 0,a.useMemo(()=>function(t){let r=j(l=>(n(i=>[...i,l]),()=>n(i=>{let s=i.slice(),u=s.indexOf(l);return u!==-1&&s.splice(u,1),s}))),o=a.useMemo(()=>({register:r,slot:t.slot,name:t.name,props:t.props}),[r,t.slot,t.name,t.props]);return a.createElement(Un.Provider,{value:o},t.children)},[n])]}let yl="p";function El(e,n){let t=Ee(),{id:r=`headlessui-description-${t}`,...o}=e,l=Hn(),i=pe(n);te(()=>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),Yn=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}}},wt=a.createContext(null);wt.displayName="DialogContext";function st(e){let n=a.useContext(wt);if(n===null){let t=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,st),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 de(n.type,Ol,e,n)}let Fl="div",kl=Ae.RenderStrategy|Ae.Static;function Il(e,n){let t=Ee(),{id:r=`headlessui-dialog-${t}`,open:o,onClose:l,initialFocus:i,role:s="dialog",__demoMode:u=!1,...c}=e,[p,h]=a.useState(0),b=a.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 m=tt();o===void 0&&m!==null&&(o=(m&he.Open)===he.Open);let g=a.useRef(null),v=pe(g,n),x=Be(g),y=e.hasOwnProperty("open")||m!==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 C=o?0:1,[N,I]=a.useReducer(Nl,{titleId:null,descriptionId:null,panelRef:a.createRef()}),M=j(()=>l(!1)),Z=j(z=>I({type:0,id:z})),U=Ve()?u?!1:C===0:!1,A=p>1,_=a.useContext(wt)!==null,[L,G]=Ko(),J={get current(){var z;return(z=N.panelRef.current)!=null?z:g.current}},{resolveContainers:ce,mainTreeNodeRef:T,MainTreeNode:re}=bl({portals:L,defaultContainers:[J]}),H=A?"parent":"leaf",se=m!==null?(m&he.Closing)===he.Closing:!1,P=_||se?!1:U,W=a.useCallback(()=>{var z,me;return(me=Array.from((z=x==null?void 0:x.querySelectorAll("body > *"))!=null?z:[]).find(xe=>xe.id==="headlessui-portal-root"?!1:xe.contains(T.current)&&xe instanceof HTMLElement))!=null?me:null},[T]);Wn(W,P);let X=A?!0:U,ve=a.useCallback(()=>{var z,me;return(me=Array.from((z=x==null?void 0:x.querySelectorAll("[data-headlessui-portal]"))!=null?z:[]).find(xe=>xe.contains(T.current)&&xe instanceof HTMLElement))!=null?me:null},[T]);Wn(ve,X),At(ce,z=>{z.preventDefault(),M()},!(!U||A));let fe=!(A||C!==0);An(x==null?void 0:x.defaultView,"keydown",z=>{fe&&(z.defaultPrevented||z.key===Q.Escape&&(z.preventDefault(),z.stopPropagation(),M()))}),jl(x,!(se||C!==0||_),ce),a.useEffect(()=>{if(C!==0||!g.current)return;let z=new ResizeObserver(me=>{for(let xe of me){let F=xe.target.getBoundingClientRect();F.x===0&&F.y===0&&F.width===0&&F.height===0&&M()}});return z.observe(g.current),()=>z.disconnect()},[C,g,M]);let[V,oe]=Vn(),le=a.useMemo(()=>[{dialogState:C,close:M,setTitleId:Z},N],[C,N,M,Z]),$=a.useMemo(()=>({open:C===0}),[C]),B={ref:v,id:r,role:s,"aria-modal":C===0?!0:void 0,"aria-labelledby":N.titleId,"aria-describedby":V};return a.createElement(wl,{type:"Dialog",enabled:C===0,element:g,onUpdate:j((z,me)=>{me==="Dialog"&&de(z,{[Kt.Add]:()=>h(xe=>xe+1),[Kt.Remove]:()=>h(xe=>xe-1)})})},a.createElement(Ht,{force:!0},a.createElement(Yt,null,a.createElement(wt.Provider,{value:le},a.createElement(Yt.Group,{target:g},a.createElement(Ht,{force:!1},a.createElement(oe,{slot:$,name:"Dialog.Description"},a.createElement(lt,{initialFocus:i,containers:ce,features:U?de(H,{parent:lt.features.RestoreFocus,leaf:lt.features.All&~lt.features.FocusLock}):lt.features.None},a.createElement(G,null,ae({ourProps:B,theirProps:c,slot:$,defaultTag:Fl,features:kl,visible:C===0,name:"Dialog"}))))))))),a.createElement(re,null))}let Pl="div";function $l(e,n){let t=Ee(),{id:r=`headlessui-dialog-overlay-${t}`,...o}=e,[{dialogState:l,close:i}]=st("Dialog.Overlay"),s=pe(n),u=j(p=>{if(p.target===p.currentTarget){if(xt(p.currentTarget))return p.preventDefault();p.preventDefault(),p.stopPropagation(),i()}}),c=a.useMemo(()=>({open:l===0}),[l]);return ae({ourProps:{ref:s,id:r,"aria-hidden":!0,onClick:u},theirProps:o,slot:c,defaultTag:Pl,name:"Dialog.Overlay"})}let Ml="div";function Al(e,n){let t=Ee(),{id:r=`headlessui-dialog-backdrop-${t}`,...o}=e,[{dialogState:l},i]=st("Dialog.Backdrop"),s=pe(n);a.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 u=a.useMemo(()=>({open:l===0}),[l]);return a.createElement(Ht,{force:!0},a.createElement(Yt,null,ae({ourProps:{ref:s,id:r,"aria-hidden":!0},theirProps:o,slot:u,defaultTag:Ml,name:"Dialog.Backdrop"})))}let Dl="div";function Ll(e,n){let t=Ee(),{id:r=`headlessui-dialog-panel-${t}`,...o}=e,[{dialogState:l},i]=st("Dialog.Panel"),s=pe(n,i.panelRef),u=a.useMemo(()=>({open:l===0}),[l]),c=j(p=>{p.stopPropagation()});return ae({ourProps:{ref:s,id:r,onClick:c},theirProps:o,slot:u,defaultTag:Dl,name:"Dialog.Panel"})}let _l="h2";function Rl(e,n){let t=Ee(),{id:r=`headlessui-dialog-title-${t}`,...o}=e,[{dialogState:l,setTitleId:i}]=st("Dialog.Title"),s=pe(n);a.useEffect(()=>(i(r),()=>i(null)),[r,i]);let u=a.useMemo(()=>({open:l===0}),[l]);return ae({ourProps:{ref:s,id:r},theirProps:o,slot:u,defaultTag:_l,name:"Dialog.Title"})}let Bl=ue(Il),zl=ue(Al),Wl=ue(Ll),Ul=ue($l),Hl=ue(Rl),qn=Object.assign(Bl,{Backdrop:zl,Panel:Wl,Overlay:Ul,Title:Hl,Description:Yn}),Gn=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Zn(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 Gn.test(i)&&(i=i.replace(Gn,"")),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():Zn(l).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return Zn(e).trim()}function Yl(e){let n=a.useRef(""),t=a.useRef("");return j(()=>{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 Jt(e,n=t=>t){let t=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,r=Mt(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=Jt(e),o=Bt(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=Jt(e,r=>[...r,{id:n.id,dataRef:n.dataRef}]);return{...e,...t}},6:(e,n)=>{let t=Jt(e,r=>{let o=r.findIndex(l=>l.id===n.id);return o!==-1&&r.splice(o,1),r});return{...e,...t,activationTrigger:1}}},Qt=a.createContext(null);Qt.displayName="MenuContext";function yt(e){let n=a.useContext(Qt);if(n===null){let t=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,yt),t}return n}function Jl(e,n){return de(n.type,Kl,e,n)}let Ql=a.Fragment;function Xl(e,n){let{__demoMode:t=!1,...r}=e,o=a.useReducer(Jl,{__demoMode:t,menuState:t?0:1,buttonRef:a.createRef(),itemsRef:a.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:l,itemsRef:i,buttonRef:s},u]=o,c=pe(n);At([s,i],(m,g)=>{var v;u({type:1}),$t(g,Pt.Loose)||(m.preventDefault(),(v=s.current)==null||v.focus())},l===0);let p=j(()=>{u({type:1})}),h=a.useMemo(()=>({open:l===0,close:p}),[l,p]),b={ref:c};return a.createElement(Qt.Provider,{value:o},a.createElement(Rt,{value:de(l,{0:he.Open,1:he.Closed})},ae({ourProps:b,theirProps:r,slot:h,defaultTag:Ql,name:"Menu"})))}let ei="button";function ti(e,n){var t;let r=Ee(),{id:o=`headlessui-menu-button-${r}`,...l}=e,[i,s]=yt("Menu.Button"),u=pe(i.buttonRef,n),c=ke(),p=j(v=>{switch(v.key){case Q.Space:case Q.Enter:case Q.ArrowDown:v.preventDefault(),v.stopPropagation(),s({type:0}),c.nextFrame(()=>s({type:2,focus:ne.First}));break;case Q.ArrowUp:v.preventDefault(),v.stopPropagation(),s({type:0}),c.nextFrame(()=>s({type:2,focus:ne.Last}));break}}),h=j(v=>{switch(v.key){case Q.Space:v.preventDefault();break}}),b=j(v=>{if(xt(v.currentTarget))return v.preventDefault();e.disabled||(i.menuState===0?(s({type:1}),c.nextFrame(()=>{var x;return(x=i.buttonRef.current)==null?void 0:x.focus({preventScroll:!0})})):(v.preventDefault(),s({type:0})))}),m=a.useMemo(()=>({open:i.menuState===0}),[i]),g={ref:u,id:o,type:Dt(e,i.buttonRef),"aria-haspopup":"menu","aria-controls":(t=i.itemsRef.current)==null?void 0:t.id,"aria-expanded":i.menuState===0,onKeyDown:p,onKeyUp:h,onClick:b};return ae({ourProps:g,theirProps:l,slot:m,defaultTag:ei,name:"Menu.Button"})}let ni="div",ri=Ae.RenderStrategy|Ae.Static;function oi(e,n){var t,r;let o=Ee(),{id:l=`headlessui-menu-items-${o}`,...i}=e,[s,u]=yt("Menu.Items"),c=pe(s.itemsRef,n),p=Be(s.itemsRef),h=ke(),b=tt(),m=b!==null?(b&he.Open)===he.Open:s.menuState===0;a.useEffect(()=>{let w=s.itemsRef.current;w&&s.menuState===0&&w!==(p==null?void 0:p.activeElement)&&w.focus({preventScroll:!0})},[s.menuState,s.itemsRef,p]),Fn({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=j(w=>{var C,N;switch(h.dispose(),w.key){case Q.Space:if(s.searchQuery!=="")return w.preventDefault(),w.stopPropagation(),u({type:3,value:w.key});case Q.Enter:if(w.preventDefault(),w.stopPropagation(),u({type:1}),s.activeItemIndex!==null){let{dataRef:I}=s.items[s.activeItemIndex];(N=(C=I.current)==null?void 0:C.domRef.current)==null||N.click()}yn(s.buttonRef.current);break;case Q.ArrowDown:return w.preventDefault(),w.stopPropagation(),u({type:2,focus:ne.Next});case Q.ArrowUp:return w.preventDefault(),w.stopPropagation(),u({type:2,focus:ne.Previous});case Q.Home:case Q.PageUp:return w.preventDefault(),w.stopPropagation(),u({type:2,focus:ne.First});case Q.End:case Q.PageDown:return w.preventDefault(),w.stopPropagation(),u({type:2,focus:ne.Last});case Q.Escape:w.preventDefault(),w.stopPropagation(),u({type:1}),Te().nextFrame(()=>{var I;return(I=s.buttonRef.current)==null?void 0:I.focus({preventScroll:!0})});break;case Q.Tab:w.preventDefault(),w.stopPropagation(),u({type:1}),Te().nextFrame(()=>{Xr(s.buttonRef.current,w.shiftKey?Ie.Previous:Ie.Next)});break;default:w.key.length===1&&(u({type:3,value:w.key}),h.setTimeout(()=>u({type:4}),350));break}}),v=j(w=>{switch(w.key){case Q.Space:w.preventDefault();break}}),x=a.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:v,role:"menu",tabIndex:0,ref:c};return ae({ourProps:y,theirProps:i,slot:x,defaultTag:ni,features:ri,visible:m,name:"Menu.Items"})}let li=a.Fragment;function ii(e,n){let t=Ee(),{id:r=`headlessui-menu-item-${t}`,disabled:o=!1,...l}=e,[i,s]=yt("Menu.Item"),u=i.activeItemIndex!==null?i.items[i.activeItemIndex].id===r:!1,c=a.useRef(null),p=pe(n,c);te(()=>{if(i.__demoMode||i.menuState!==0||!u||i.activationTrigger===0)return;let I=Te();return I.requestAnimationFrame(()=>{var M,Z;(Z=(M=c.current)==null?void 0:M.scrollIntoView)==null||Z.call(M,{block:"nearest"})}),I.dispose},[i.__demoMode,c,u,i.menuState,i.activationTrigger,i.activeItemIndex]);let h=Yl(c),b=a.useRef({disabled:o,domRef:c,get textValue(){return h()}});te(()=>{b.current.disabled=o},[b,o]),te(()=>(s({type:5,id:r,dataRef:b}),()=>s({type:6,id:r})),[b,r]);let m=j(()=>{s({type:1})}),g=j(I=>{if(o)return I.preventDefault();s({type:1}),yn(i.buttonRef.current)}),v=j(()=>{if(o)return s({type:2,focus:ne.Nothing});s({type:2,focus:ne.Specific,id:r})}),x=Nn(),y=j(I=>x.update(I)),w=j(I=>{x.wasMoved(I)&&(o||u||s({type:2,focus:ne.Specific,id:r,trigger:0}))}),C=j(I=>{x.wasMoved(I)&&(o||u&&s({type:2,focus:ne.Nothing}))}),N=a.useMemo(()=>({active:u,disabled:o,close:m}),[u,o,m]);return ae({ourProps:{id:r,ref:p,role:"menuitem",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,disabled:void 0,onClick:g,onFocus:v,onPointerEnter:y,onMouseEnter:y,onPointerMove:w,onMouseMove:w,onPointerLeave:C,onMouseLeave:C},theirProps:l,slot:N,defaultTag:li,name:"Menu.Item"})}let si=ue(Xl),ai=ue(ti),ui=ue(oi),ci=ue(ii),Et=Object.assign(si,{Button:ai,Items:ui,Item:ci}),Kn=a.createContext(null);function Jn(){let e=a.useContext(Kn);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,Jn),n}return e}function di(){let[e,n]=a.useState([]);return[e.length>0?e.join(" "):void 0,a.useMemo(()=>function(t){let r=j(l=>(n(i=>[...i,l]),()=>n(i=>{let s=i.slice(),u=s.indexOf(l);return u!==-1&&s.splice(u,1),s}))),o=a.useMemo(()=>({register:r,slot:t.slot,name:t.name,props:t.props}),[r,t.slot,t.name,t.props]);return a.createElement(Kn.Provider,{value:o},t.children)},[n])]}let fi="label";function mi(e,n){let t=Ee(),{id:r=`headlessui-label-${t}`,passive:o=!1,...l}=e,i=Jn(),s=pe(n);te(()=>i.register(r),[r,i.register]);let u={ref:s,...i.props,id:r};return o&&("onClick"in u&&(delete u.htmlFor,delete u.onClick),"onClick"in l&&delete l.onClick),ae({ourProps:u,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]=a.useState(e),r=rt(),o=a.useCallback(u=>{r.current&&t(c=>c|u)},[n,r]),l=a.useCallback(u=>!!(n&u),[n]),i=a.useCallback(u=>{r.current&&t(c=>c&~u)},[t,r]),s=a.useCallback(u=>{r.current&&t(c=>c^u)},[t]);return{flags:n,addFlag:o,hasFlag:l,removeFlag:i,toggleFlag:s}}let Xt=a.createContext(null);Xt.displayName="GroupContext";let gi=a.Fragment;function bi(e){var n;let[t,r]=a.useState(null),[o,l]=di(),[i,s]=Vn(),u=a.useMemo(()=>({switch:t,setSwitch:r,labelledby:o,describedby:i}),[t,r,o,i]),c={},p=e;return a.createElement(s,{name:"Switch.Description"},a.createElement(l,{name:"Switch.Label",props:{htmlFor:(n=u.switch)==null?void 0:n.id,onClick(h){t&&(h.currentTarget.tagName==="LABEL"&&h.preventDefault(),t.click(),t.focus({preventScroll:!0}))}}},a.createElement(Xt.Provider,{value:u},ae({ourProps:c,theirProps:p,defaultTag:gi,name:"Switch.Group"}))))}let xi="button";function wi(e,n){var t;let r=Ee(),{id:o=`headlessui-switch-${r}`,checked:l,defaultChecked:i=!1,onChange:s,disabled:u=!1,name:c,value:p,form:h,...b}=e,m=a.useContext(Xt),g=a.useRef(null),v=pe(g,n,m===null?null:m.setSwitch),[x,y]=gn(l,s,i),w=j(()=>y==null?void 0:y(!x)),C=j(A=>{if(xt(A.currentTarget))return A.preventDefault();A.preventDefault(),w()}),N=j(A=>{A.key===Q.Space?(A.preventDefault(),w()):A.key===Q.Enter&&ao(A.currentTarget)}),I=j(A=>A.preventDefault()),M=a.useMemo(()=>({checked:x}),[x]),Z={id:o,ref:v,role:"switch",type:Dt(e,g),tabIndex:e.tabIndex===-1?0:(t=e.tabIndex)!=null?t:0,"aria-checked":x,"aria-labelledby":m==null?void 0:m.labelledby,"aria-describedby":m==null?void 0:m.describedby,disabled:u,onClick:C,onKeyUp:N,onKeyPress:I},U=ke();return a.useEffect(()=>{var A;let _=(A=g.current)==null?void 0:A.closest("form");_&&i!==void 0&&U.addEventListener(_,"reset",()=>{y(i)})},[g,y]),a.createElement(a.Fragment,null,c!=null&&x&&a.createElement(et,{features:Ye.Hidden,...bt({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:u,form:h,checked:x,name:c,value:p})}),ae({ourProps:Z,theirProps:b,slot:M,defaultTag:xi,name:"Switch"}))}let yi=ue(wi),Ei=bi,Si=Object.assign(yi,{Group:Ei,Label:hi,Description:Yn});function Ti(e){let n={called:!1};return(...t)=>{if(!n.called)return n.called=!0,e(...t)}}function en(e,...n){e&&n.length>0&&e.classList.add(...n)}function tn(e,...n){e&&n.length>0&&e.classList.remove(...n)}function Ci(e,n){let t=Te();if(!e)return t.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[l,i]=[r,o].map(u=>{let[c=0]=u.split(",").filter(Boolean).map(p=>p.includes("ms")?parseFloat(p):parseFloat(p)*1e3).sort((p,h)=>h-p);return c}),s=l+i;if(s!==0){t.group(c=>{c.setTimeout(()=>{n(),c.dispose()},s),c.addEventListener(e,"transitionrun",p=>{p.target===p.currentTarget&&c.dispose()})});let u=t.addEventListener(e,"transitionend",c=>{c.target===c.currentTarget&&(n(),u())})}else n();return t.add(()=>n()),t.dispose}function Oi(e,n,t,r){let o=t?"enter":"leave",l=Te(),i=r!==void 0?Ti(r):()=>{};o==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let s=de(o,{enter:()=>n.enter,leave:()=>n.leave}),u=de(o,{enter:()=>n.enterTo,leave:()=>n.leaveTo}),c=de(o,{enter:()=>n.enterFrom,leave:()=>n.leaveFrom});return tn(e,...n.base,...n.enter,...n.enterTo,...n.enterFrom,...n.leave,...n.leaveFrom,...n.leaveTo,...n.entered),en(e,...n.base,...s,...c),l.nextFrame(()=>{tn(e,...n.base,...s,...c),en(e,...n.base,...s,...u),Ci(e,()=>(tn(e,...n.base,...s),en(e,...n.base,...n.entered),i()))}),l.dispose}function ji({immediate:e,container:n,direction:t,classes:r,onStart:o,onStop:l}){let i=rt(),s=ke(),u=Oe(t);te(()=>{e&&(u.current="enter")},[e]),te(()=>{let c=Te();s.add(c.dispose);let p=n.current;if(p&&u.current!=="idle"&&i.current)return c.dispose(),o.current(u.current),c.add(Oi(p,r.current,u.current==="enter",()=>{c.dispose(),l.current(u.current)})),c.dispose},[t])}function Le(e=""){return e.split(/\s+/).filter(n=>n.length>1)}let St=a.createContext(null);St.displayName="TransitionContext";var Ni=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Ni||{});function Fi(){let e=a.useContext(St);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function ki(){let e=a.useContext(Tt);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Tt=a.createContext(null);Tt.displayName="NestingContext";function Ct(e){return"children"in e?Ct(e.children):e.current.filter(({el:n})=>n.current!==null).filter(({state:n})=>n==="visible").length>0}function Qn(e,n){let t=Oe(e),r=a.useRef([]),o=rt(),l=ke(),i=j((m,g=De.Hidden)=>{let v=r.current.findIndex(({el:x})=>x===m);v!==-1&&(de(g,{[De.Unmount](){r.current.splice(v,1)},[De.Hidden](){r.current[v].state="hidden"}}),l.microTask(()=>{var x;!Ct(r)&&o.current&&((x=t.current)==null||x.call(t))}))}),s=j(m=>{let g=r.current.find(({el:v})=>v===m);return g?g.state!=="visible"&&(g.state="visible"):r.current.push({el:m,state:"visible"}),()=>i(m,De.Unmount)}),u=a.useRef([]),c=a.useRef(Promise.resolve()),p=a.useRef({enter:[],leave:[],idle:[]}),h=j((m,g,v)=>{u.current.splice(0),n&&(n.chains.current[g]=n.chains.current[g].filter(([x])=>x!==m)),n==null||n.chains.current[g].push([m,new Promise(x=>{u.current.push(x)})]),n==null||n.chains.current[g].push([m,new Promise(x=>{Promise.all(p.current[g].map(([y,w])=>w)).then(()=>x())})]),g==="enter"?c.current=c.current.then(()=>n==null?void 0:n.wait.current).then(()=>v(g)):v(g)}),b=j((m,g,v)=>{Promise.all(p.current[g].splice(0).map(([x,y])=>y)).then(()=>{var x;(x=u.current.shift())==null||x()}).then(()=>v(g))});return a.useMemo(()=>({children:r,register:s,unregister:i,onStart:h,onStop:b,wait:c,chains:p}),[s,i,r,h,b,p,c])}function Ii(){}let Pi=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Xn(e){var n;let t={};for(let r of Pi)t[r]=(n=e[r])!=null?n:Ii;return t}function $i(e){let n=a.useRef(Xn(e));return a.useEffect(()=>{n.current=Xn(e)},[e]),n}let Mi="div",er=Ae.RenderStrategy;function Ai(e,n){var t,r;let{beforeEnter:o,afterEnter:l,beforeLeave:i,afterLeave:s,enter:u,enterFrom:c,enterTo:p,entered:h,leave:b,leaveFrom:m,leaveTo:g,...v}=e,x=a.useRef(null),y=pe(x,n),w=(t=v.unmount)==null||t?De.Unmount:De.Hidden,{show:C,appear:N,initial:I}=Fi(),[M,Z]=a.useState(C?"visible":"hidden"),U=ki(),{register:A,unregister:_}=U;a.useEffect(()=>A(x),[A,x]),a.useEffect(()=>{if(w===De.Hidden&&x.current){if(C&&M!=="visible"){Z("visible");return}return de(M,{hidden:()=>_(x),visible:()=>A(x)})}},[M,x,A,_,C,w]);let L=Oe({base:Le(v.className),enter:Le(u),enterFrom:Le(c),enterTo:Le(p),entered:Le(h),leave:Le(b),leaveFrom:Le(m),leaveTo:Le(g)}),G=$i({beforeEnter:o,afterEnter:l,beforeLeave:i,afterLeave:s}),J=Ve();a.useEffect(()=>{if(J&&M==="visible"&&x.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[x,M,J]);let ce=I&&!N,T=N&&C&&I,re=!J||ce?"idle":C?"enter":"leave",H=vi(0),se=j(fe=>de(fe,{enter:()=>{H.addFlag(he.Opening),G.current.beforeEnter()},leave:()=>{H.addFlag(he.Closing),G.current.beforeLeave()},idle:()=>{}})),P=j(fe=>de(fe,{enter:()=>{H.removeFlag(he.Opening),G.current.afterEnter()},leave:()=>{H.removeFlag(he.Closing),G.current.afterLeave()},idle:()=>{}})),W=Qn(()=>{Z("hidden"),_(x)},U),X=a.useRef(!1);ji({immediate:T,container:x,classes:L,direction:re,onStart:Oe(fe=>{X.current=!0,W.onStart(x,fe,se)}),onStop:Oe(fe=>{X.current=!1,W.onStop(x,fe,P),fe==="leave"&&!Ct(W)&&(Z("hidden"),_(x))})});let ve=v,ye={ref:y};return T?ve={...ve,className:vt(v.className,...L.current.enter,...L.current.enterFrom)}:X.current&&(ve.className=vt(v.className,(r=x.current)==null?void 0:r.className),ve.className===""&&delete ve.className),a.createElement(Tt.Provider,{value:W},a.createElement(Rt,{value:de(M,{visible:he.Open,hidden:he.Closed})|H.flags},ae({ourProps:ye,theirProps:ve,defaultTag:Mi,features:er,visible:M==="visible",name:"Transition.Child"})))}function Di(e,n){let{show:t,appear:r=!1,unmount:o=!0,...l}=e,i=a.useRef(null),s=pe(i,n);Ve();let u=tt();if(t===void 0&&u!==null&&(t=(u&he.Open)===he.Open),![!0,!1].includes(t))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,p]=a.useState(t?"visible":"hidden"),h=Qn(()=>{p("hidden")}),[b,m]=a.useState(!0),g=a.useRef([t]);te(()=>{b!==!1&&g.current[g.current.length-1]!==t&&(g.current.push(t),m(!1))},[g,t]);let v=a.useMemo(()=>({show:t,appear:r,initial:b}),[t,r,b]);a.useEffect(()=>{if(t)p("visible");else if(!Ct(h))p("hidden");else{let C=i.current;if(!C)return;let N=C.getBoundingClientRect();N.x===0&&N.y===0&&N.width===0&&N.height===0&&p("hidden")}},[t,h]);let x={unmount:o},y=j(()=>{var C;b&&m(!1),(C=e.beforeEnter)==null||C.call(e)}),w=j(()=>{var C;b&&m(!1),(C=e.beforeLeave)==null||C.call(e)});return a.createElement(Tt.Provider,{value:h},a.createElement(St.Provider,{value:v},ae({ourProps:{...x,as:a.Fragment,children:a.createElement(tr,{ref:s,...x,...l,beforeEnter:y,beforeLeave:w})},theirProps:{},defaultTag:a.Fragment,features:er,visible:c==="visible",name:"Transition"})))}function Li(e,n){let t=a.useContext(St)!==null,r=tt()!==null;return a.createElement(a.Fragment,null,!t&&r?a.createElement(nn,{ref:n,...e}):a.createElement(tr,{ref:n,...e}))}let nn=ue(Di),tr=ue(Ai),_i=ue(Li),Ue=Object.assign(nn,{Child:_i,Root:nn});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 nr=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:f.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:f.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:f.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:f.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]=a.useState(!1),u=a.useRef(null);a.useEffect(()=>(r&&(s(!0),u.current=setTimeout(()=>{s(!1),l&&l()},o)),()=>clearTimeout(u.current)),[r,o,l]);const c=ns[e];return i?f.jsx("div",{className:"fixed top-2.5 left-1/2 transform -translate-x-1/2 w-80 3xs:w-96 z-50",children:f.jsx(Ue,{as:a.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:f.jsxs("div",{className:k("rounded-md p-4 text-center",c.color),children:[f.jsxs("div",{className:"flex justify-center flex-shrink-0",children:[c.icon,f.jsx("h3",{className:k("text-sm font-medium ml-3",c.colorTitle),children:n})]}),f.jsx("div",{className:k("mt-2 text-sm",c.colorText),children:f.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 u(){if(typeof s!="string")return s;const c=s.toLowerCase(),p=c.split(" "),h=p[p.length-1];return c.charAt(0)+h.charAt(0)}return f.jsx(f.Fragment,{children:e?f.jsx("img",{src:e,alt:n,width:t,height:r,className:k(o!==""&&o),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s"},onLoad:c=>c.currentTarget.style.filter="none","data-testid":"img"}):i?f.jsx(ms,{className:k("bg-white text-default-5",l!==""?l:"w-7 h-7")}):f.jsx("div",{className:k("bg-gray-200 text-default-5 rounded-full font-bold uppercase flex justify-center items-center",l!==""?l:"w-7 h-7"),children:u()})})},gs=({steps:e,onClick:n})=>{const[t,r]=a.useState(0),o=l=>{r(l),n(l)};return f.jsx("nav",{className:"flex items-center justify-center w-full","aria-label":"Progress","data-testid":"bullets",children:f.jsx("ol",{role:"list",className:"flex items-center space-x-5",children:new Array(e).fill(1).map((l,i)=>f.jsx("li",{children:t!==i?f.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:f.jsx("span",{className:"sr-only",children:"step"})}):f.jsxs("div",{className:"relative flex items-center justify-center cursor-pointer","aria-current":"step",children:[f.jsx("span",{className:"absolute flex h-5 w-5 p-px","aria-hidden":"true",children:f.jsx("span",{className:"h-full w-full rounded-full bg-gray-300"})}),f.jsx("span",{className:"relative block h-2.5 w-2.5 rounded-full bg-gray-500","aria-hidden":"true"}),f.jsx("span",{className:"sr-only",children:"step"})]})},i))})})};var rr={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 Ae=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=Ae({"ml-2":r==="start"&&t!==null,"mr-2":r==="end"&&t!==null});return f.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&&f.jsx("span",{children:t}),f.jsx("span",{className:$("flex",a),id:s,children:n}),r==="end"&&t!==null&&f.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=Ae({"ml-2":r==="start"&&t!==null,"mr-2":r==="end"&&t!==null});return f.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&&f.jsx("span",{children:t}),f.jsx("span",{className:a,children:e}),r==="end"&&t!==null&&f.jsx("span",{children:t})]})},ot=({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:c="0px 0px 0px 2px #6366F1, 0px 0px 0px 2px #FFF, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameContainer:p=""})=>{const[h,b]=u.useState(!1),m=Ae({"ml-2":o==="start"&&r!==null,"mr-2":o==="end"&&r!==null}),g=()=>{s&&s()};return f.jsx("div",{className:$("rounded-md p-0.5",p!==""&&p),style:{boxShadow:h?c:"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:f.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&&f.jsx("span",{className:"flex",children:r}),f.jsx("span",{className:$(t.length===0&&m,t.length!==0&&t),children:e}),o==="end"&&r!==null&&f.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,c]=u.useState(!1);return u.useEffect(()=>{c(n)},[n]),f.jsxs("div",{className:"flex items-center",style:i,"data-testid":`container-check-${r}`,children:[f.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?f.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 f.jsx(Re,{show:r,as:u.Fragment,children:f.jsxs(Vn,{as:"div",className:"relative z-50 relative",onClose:o,"data-testid":"modal",children:[f.jsx(Re.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:f.jsx("div",{className:"fixed inset-0 bg-opacity-40 bg-gray-900 transition-opacity","data-testid":"window-close",onClick:()=>o(!1)})}),f.jsx("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:f.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:f.jsx(Re.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:f.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&&f.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100",children:f.jsx(ys,{className:"h-6 w-6 text-green-600","aria-hidden":"true"})}),f.jsx("div",{className:$(t!==""&&t),"data-testid":"content",children:e}),i&&f.jsx("div",{className:"mt-5 sm:mt-6",children:f.jsx(ot,{id:"close-modal",onClick:()=>o(!1),children:"Cerrar"})}),f.jsx("button",{className:"opacity-0 absolute"})]})})})})]})})}const ks=({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 f.jsxs(or,{isOpen:e,setIsOpen:()=>n(),showButton:!1,showIconSuccess:!1,children:[f.jsx("p",{className:$("text-center text-sm",l!==""&&l),children:r}),f.jsx("p",{className:$("text-center text-sm",i!==""&&i),children:o}),f.jsxs("div",{className:"flex w-full justify-center mt-5",children:[f.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"}),f.jsx(ot,{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"})]})]})},Is=({className:e="",style:n={}})=>f.jsx("div",{className:$("w-px",e!==""&&e),style:n}),$s=({onClick:e,id:n="",className:t=""})=>f.jsxs("div",{className:$("flex items-center text-default-5",t!==""&&t),"data-testid":n,children:[f.jsx(ls,{className:"w-3 h-3 3xs:w-4 3xs:h-4 stroke-current cursor-pointer","data-testid":"chevron-left-icon",onClick:e}),f.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}),c=u.useRef(null),p=()=>{if(r==="")return;const m=c.current.getBoundingClientRect();a({top:m.bottom+window.scrollY,left:m.left+window.scrollX}),i(!0)},h=()=>{i(!1)},b=f.jsx(Re,{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:f.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:f.jsx("div",{className:"bg-white p-2 text-center rounded-lg shadow-lg ring-1 ring-black ring-opacity-5",onMouseEnter:p,onMouseLeave:h,"data-testid":"message",children:r})})});return f.jsxs(f.Fragment,{children:[f.jsx("div",{ref:c,className:$("inline-block",n!==""&&n),onMouseEnter:p,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:c=!1,helperText:p="",autocomplete:h="off",id:b,classNameLabel:m="",classNameContainerInput:g="",classNameContainer:v="",className:x="",icon:y=null,onKeyDown:w,onFocus:C,min:I,max:P,maxWidth:A=5e3})=>{const[G,U]=u.useState(!1),D=Ae({"ring-red-300 focus:ring-red-300 text-red-900":c||G,"focus:ring-indigo-600 text-gray-500":!c&&!G}),B=R=>{if(l&&l(R),r!=="email")return;const{value:q}=R.target,K=un(q);U(!K)};return f.jsxs("div",{"data-testid":`container-input-${b}`,className:v,children:[n!==""&&f.jsx("label",{htmlFor:t,className:$("block text-sm font-medium leading-6",m!==""?m:"text-gray-700"),"data-testid":`label-${b}`,children:n}),f.jsxs("div",{className:$("relative mt-1 rounded-md",g!==""&&g),children:[f.jsx(tn,{className:"text-sm",classNameContainer:"w-full",message:s,children:f.jsx("input",{id:b,name:o,type:r,autoComplete:h,placeholder:e,onChange:B,onClick:i,onKeyDown:w,onFocus:C,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",D,x!==""&&x),style:{maxWidth:`${A}px`}})}),y!==null&&f.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:y}),c&&y===null&&f.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:f.jsx(er,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),p.length===0||!c?null:f.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${b}`,children:p})]})};function lt({className:e="w-6 h-6",color:n="#3730a3"}){return f.jsxs("svg",{className:$("fill-current animate-spin",e),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:n,strokeWidth:"4",fill:"none"}),f.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 f.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:[f.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"}),f.jsx(lt,{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:c,className:p="",classNameLabel:h="",classNameInput:b="",options:m,value:g=-1,defaultValue:v={value:-1,label:"",iconStart:null,iconEnd:null},defaultLabel:x="label",defaultId:y="value",bgOptionSelect:w="bg-indigo-600",isSearch:C=!1,loading:I=!1,isSingleOptionAndFirstLoad:P=!0,isTest:A=!1})=>{const[G,U]=u.useState(""),[D,B]=u.useState(v),[R,q]=u.useState(!1),[K,ae]=u.useState(!0);u.useEffect(()=>{if((m==null?void 0:m.length)!==1||!K)return;ae(!1);const[k]=m,W=k[y],le=k[x];B({value:W,label:le}),P&&o({target:{value:k,checked:!1,name:a,type:void 0,id:k[y]}})},[m,y,x,o,a,K,P]),u.useEffect(()=>{if(g===-1||(m==null?void 0:m.length)===0)return;const k=m==null?void 0:m.find(W=>W[y]===g);k&&B(k)},[g,m,y]),u.useEffect(()=>{g==="clear"&&(D[y]!==v[y]||D[x]!==v[x]||A)&&B(v)},[v,A,D,g,y,x]);const T=G===""?m:m.filter(k=>k[x].normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().includes(G.toLowerCase())),te=Ae({"ring-red-300 focus:ring-red-300 text-red-900":i&&!l,"text-gray-500":!i,"focus:ring-indigo-600":!i&&!l}),H=Ae({"text-red-400":i&&!l,"text-gray-400":!i}),oe=k=>{B(k),o({target:{value:k,checked:!1,name:a,type:void 0,id:k[y]}})};return f.jsxs(Fe,{as:"div",value:D,children:[f.jsx(Fe.Label,{className:$("block text-sm font-medium leading-6 text-gray-500 mb-0.5",h!==""&&h),children:r}),f.jsxs("div",{className:$("relative",p!==""&&p),children:[f.jsx(tn,{className:"text-sm",classNameContainer:"w-full",message:D[x],children:f.jsxs(Fe.Button,{className:"w-full","data-testid":`listbox-button-${c}`,children:[D.iconStart&&f.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-2",children:D.iconStart}),f.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",te,b!==""&&b),onChange:k=>U(k.target.value.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),displayValue:k=>{var W;return(W=k[x])==null?void 0:W.trim()},autoComplete:"off",readOnly:!C||l,style:{height:e,...n},"data-testid":"input-search",onClick:()=>q(l?!1:!R),onBlur:()=>q(!1)})]})}),D.iconEnd&&f.jsx("span",{className:"absolute inset-y-0 right-4 flex items-center pr-4",children:D.iconEnd}),!l&&f.jsx(Fe.Button,{className:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",onClick:()=>q(l?!1:!R),"data-testid":"arrow-button",children:R?f.jsx(Gi,{className:$("h-5 w-5",H),"aria-hidden":"true"}):f.jsx(Yi,{className:$("h-5 w-5",H),"aria-hidden":"true"})}),!l&&f.jsx(f.Fragment,{children:I?f.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:f.jsx(lt,{})}):(T??[]).length>0?f.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:T.map((k,W)=>f.jsx(Fe.Option,{value:k,className:$(k[y]===D[y]?`${w} text-white`:"text-gray-900",`relative cursor-default select-none p-2 hover:text-white hover:${w}`),"data-testid":`select-${c}-${k[y]}`,onClick:()=>oe(k),children:f.jsxs("div",{className:"flex justify-between items-center",children:[f.jsxs("div",{className:"flex items-center",children:[k.iconStart&&f.jsx("span",{className:"mr-2","aria-hidden":"true",children:k.iconStart}),f.jsx("span",{className:"font-normal hyphens-auto break-words overflow-hidden",children:k[x]})]}),k.iconEnd&&f.jsx("span",{className:"ml-2","aria-hidden":"true",children:k.iconEnd})]})},W))}):f.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:f.jsx("p",{"data-testid":"empty-options",children:"Sin opciones"})})})]}),s.length>0&&i&&f.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${c}`,children:s})]})},Ms=({placeholder:e="",label:n="",htmlFor:t,name:r,handleChange:o,onClick:l=()=>{},value:i,valueSelect:s,isReadOnly:a=!1,isError:c=!1,helperText:p="",autocomplete:h="on",id:b,classNameLabel:m="",classNameContainer:g="",className:v="",onKeyDown:x,options:y,idSelect:w,isMarginLeft:C=!0,classNameSelect:I="w-20",type:P="text"})=>{const{width:A}=cn(),G=Ae({"ring-red-300 focus:ring-red-300 text-red-900":c,"focus:ring-indigo-600 text-gray-500":!c});return f.jsxs(f.Fragment,{children:[f.jsx("style",{children:`
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})()})(rr);var bs=rr.exports;const _e=Nr(bs),or=({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 u=_e({"ml-2":r==="start"&&t!==null,"mr-2":r==="end"&&t!==null});return f.jsxs("button",{className:k("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&&f.jsx("span",{children:t}),f.jsx("span",{className:k("flex",u),id:s,children:n}),r==="end"&&t!==null&&f.jsx("span",{children:t})]})},lr=({children:e,className:n="",icon:t=null,edge:r=null,disabled:o=!1,type:l="button",onClick:i,id:s})=>{const u=_e({"ml-2":r==="start"&&t!==null,"mr-2":r==="end"&&t!==null});return f.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&&f.jsx("span",{children:t}),f.jsx("span",{className:u,children:e}),r==="end"&&t!==null&&f.jsx("span",{children:t})]})},at=({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:u,outline:c="0px 0px 0px 2px #6366F1, 0px 0px 0px 2px #FFF, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameContainer:p=""})=>{const[h,b]=a.useState(!1),m=_e({"ml-2":o==="start"&&r!==null,"mr-2":o==="end"&&r!==null}),g=()=>{s&&s()};return f.jsx("div",{className:k("rounded-md p-0.5",p!==""&&p),style:{boxShadow:h?c:"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:f.jsxs("button",{className:k("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-${u}`,children:[o==="start"&&r!==null&&f.jsx("span",{className:"flex",children:r}),f.jsx("span",{className:k(t.length===0&&m,t.length!==0&&t),children:e}),o==="end"&&r!==null&&f.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[u,c]=a.useState(!1);return a.useEffect(()=>{c(n)},[n]),f.jsxs("div",{className:"flex items-center",style:i,"data-testid":`container-check-${r}`,children:[f.jsx("input",{checked:u,id:`${e}-${r}`,value:r,"aria-describedby":"comments-description",type:"checkbox",onChange:t,className:k("cursor-pointer rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",l!==""&&l),"data-testid":`checkbox-${r}`,disabled:s}),e!==null?f.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 ir({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 f.jsx(Ue,{show:r,as:a.Fragment,children:f.jsxs(qn,{as:"div",className:"relative z-50 relative",onClose:o,"data-testid":"modal",children:[f.jsx(Ue.Child,{as:a.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-5",leave:"ease-in duration-200",leaveFrom:"opacity-5",leaveTo:"opacity-0",children:f.jsx("div",{className:"fixed inset-0 bg-opacity-40 bg-gray-900 transition-opacity","data-testid":"window-close",onClick:()=>o(!1)})}),f.jsx("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:f.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:f.jsx(Ue.Child,{as:a.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:f.jsxs(qn.Panel,{className:k("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&&f.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100",children:f.jsx(ys,{className:"h-6 w-6 text-green-600","aria-hidden":"true"})}),f.jsx("div",{className:k(t!==""&&t),"data-testid":"content",children:e}),i&&f.jsx("div",{className:"mt-5 sm:mt-6",children:f.jsx(at,{id:"close-modal",onClick:()=>o(!1),children:"Cerrar"})}),f.jsx("button",{className:"opacity-0 absolute"})]})})})})]})})}const ks=({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 f.jsxs(ir,{isOpen:e,setIsOpen:()=>n(),showButton:!1,showIconSuccess:!1,children:[f.jsx("p",{className:k("text-center text-sm",l!==""&&l),children:r}),f.jsx("p",{className:k("text-center text-sm",i!==""&&i),children:o}),f.jsxs("div",{className:"flex w-full justify-center mt-5",children:[f.jsx(or,{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"}),f.jsx(at,{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"})]})]})},Is=({className:e="",style:n={}})=>f.jsx("div",{className:k("w-px",e!==""&&e),style:n}),Ps=({onClick:e,id:n="",className:t=""})=>f.jsxs("div",{className:k("flex items-center text-default-5",t!==""&&t),"data-testid":n,children:[f.jsx(ls,{className:"w-3 h-3 3xs:w-4 3xs:h-4 stroke-current cursor-pointer","data-testid":"chevron-left-icon",onClick:e}),f.jsx("span",{onClick:e,className:"text-sm cursor-pointer","data-testid":"go-back",children:"Volver"})]}),rn=({className:e="",classNameContainer:n="",children:t,message:r="",style:o={}})=>{const[l,i]=a.useState(!1),[s,u]=a.useState({top:0,left:0}),c=a.useRef(null),p=()=>{if(r==="")return;const m=c.current.getBoundingClientRect();u({top:m.bottom+window.scrollY,left:m.left+window.scrollX}),i(!0)},h=()=>{i(!1)},b=f.jsx(Ue,{as:a.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:f.jsx("div",{className:k("absolute z-40 px-4 mt-0 sm:px-0",e!==""&&e),style:{top:s.top,left:s.left,position:"absolute"},children:f.jsx("div",{className:"bg-white p-2 text-center rounded-lg shadow-lg ring-1 ring-black ring-opacity-5",onMouseEnter:p,onMouseLeave:h,"data-testid":"message",children:r})})});return f.jsxs(f.Fragment,{children:[f.jsx("div",{ref:c,className:k("inline-block",n!==""&&n),onMouseEnter:p,onMouseLeave:h,"data-testid":"container-tooltip",style:o,children:t}),typeof window<"u"&&ft.createPortal(b,document.body)]})},on=({placeholder:e="",label:n="",htmlFor:t,type:r="text",name:o,handleChange:l,onClick:i=()=>{},value:s,isReadOnly:u=!1,isError:c=!1,helperText:p="",autocomplete:h="off",id:b,classNameLabel:m="",classNameContainerInput:g="",classNameContainer:v="",className:x="",icon:y=null,onKeyDown:w,onFocus:C,min:N,max:I,maxWidth:M=5e3})=>{const[Z,U]=a.useState(!1),A=_e({"ring-red-300 focus:ring-red-300 text-red-900":c||Z,"focus:ring-indigo-600 text-gray-500":!c&&!Z}),_=L=>{if(l&&l(L),r!=="email")return;const{value:G}=L.target,J=dn(G);U(!J)};return f.jsxs("div",{"data-testid":`container-input-${b}`,className:v,children:[n!==""&&f.jsx("label",{htmlFor:t,className:k("block text-sm font-medium leading-6",m!==""?m:"text-gray-700"),"data-testid":`label-${b}`,children:n}),f.jsxs("div",{className:k("relative mt-1 rounded-md",g!==""&&g),children:[f.jsx(rn,{className:"text-sm",classNameContainer:"w-full",message:s,children:f.jsx("input",{id:b,name:o,type:r,autoComplete:h,placeholder:e,onChange:_,onClick:i,onKeyDown:w,onFocus:C,value:s,readOnly:u,"data-testid":`input-${b}`,min:N,className:k("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",A,x!==""&&x),style:{maxWidth:`${M}px`}})}),y!==null&&f.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:y}),c&&y===null&&f.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:f.jsx(nr,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),p.length===0||!c?null:f.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${b}`,children:p})]})};function ut({className:e="w-6 h-6",color:n="#3730a3"}){return f.jsxs("svg",{className:k("fill-current animate-spin",e),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:n,strokeWidth:"4",fill:"none"}),f.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 $s(){return f.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:[f.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"}),f.jsx(ut,{className:"w-8 h-8 animate-spin"})]})}const sr=({height:e="36px",style:n={},styleMenu:t={},label:r="",onChange:o,isReadOnly:l=!1,isError:i=!1,helperText:s="",name:u,id:c,className:p="",classNameLabel:h="",classNameInput:b="",options:m,value:g=-1,defaultValue:v={value:-1,label:"",iconStart:null,iconEnd:null},defaultLabel:x="label",defaultId:y="value",bgOptionSelect:w="bg-indigo-600",isSearch:C=!1,loading:N=!1,isSingleOptionAndFirstLoad:I=!0,isTest:M=!1})=>{const[Z,U]=a.useState(""),[A,_]=a.useState(v),[L,G]=a.useState(!1),[J,ce]=a.useState(!0);a.useEffect(()=>{if((m==null?void 0:m.length)!==1||!J)return;ce(!1);const[P]=m,W=P[y],X=P[x];_({value:W,label:X}),I&&o({target:{value:P,checked:!1,name:u,type:void 0,id:P[y]}})},[m,y,x,o,u,J,I]),a.useEffect(()=>{if(g===-1||(m==null?void 0:m.length)===0)return;const P=m==null?void 0:m.find(W=>W[y]===g);P&&_(P)},[g,m,y]),a.useEffect(()=>{g==="clear"&&(A[y]!==v[y]||A[x]!==v[x]||M)&&_(v)},[v,M,A,g,y,x]);const T=Z===""?m:m.filter(P=>P[x].normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().includes(Z.toLowerCase())),re=_e({"ring-red-300 focus:ring-red-300 text-red-900":i&&!l,"text-gray-500":!i,"focus:ring-indigo-600":!i&&!l}),H=_e({"text-red-400":i&&!l,"text-gray-400":!i}),se=P=>{_(P),o({target:{value:P,checked:!1,name:u,type:void 0,id:P[y]}})};return f.jsxs(Pe,{as:"div",value:A,children:[f.jsx(Pe.Label,{className:k("block text-sm font-medium leading-6 text-gray-500 mb-0.5",h!==""&&h),children:r}),f.jsxs("div",{className:k("relative",p!==""&&p),children:[f.jsx(rn,{className:"text-sm",classNameContainer:"w-full",message:A[x],children:f.jsxs(Pe.Button,{className:"w-full","data-testid":`listbox-button-${c}`,children:[A.iconStart&&f.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-2",children:A.iconStart}),f.jsx(Pe.Input,{className:k("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",re,b!==""&&b),onChange:P=>U(P.target.value.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),displayValue:P=>{var W;return(W=P[x])==null?void 0:W.trim()},autoComplete:"off",readOnly:!C||l,style:{height:e,...n},"data-testid":"input-search",onClick:()=>G(l?!1:!L),onBlur:()=>G(!1)})]})}),A.iconEnd&&f.jsx("span",{className:"absolute inset-y-0 right-4 flex items-center pr-4",children:A.iconEnd}),!l&&f.jsx(Pe.Button,{className:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",onClick:()=>G(l?!1:!L),"data-testid":"arrow-button",children:L?f.jsx(Gi,{className:k("h-5 w-5",H),"aria-hidden":"true"}):f.jsx(Yi,{className:k("h-5 w-5",H),"aria-hidden":"true"})}),!l&&f.jsx(f.Fragment,{children:N?f.jsx(Pe.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:f.jsx(ut,{})}):(T??[]).length>0?f.jsx(Pe.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:T.map((P,W)=>f.jsx(Pe.Option,{value:P,className:k(P[y]===A[y]?`${w} text-white`:"text-gray-900",`relative cursor-default select-none p-2 hover:text-white hover:${w}`),"data-testid":`select-${c}-${P[y]}`,onClick:()=>se(P),children:f.jsxs("div",{className:"flex justify-between items-center",children:[f.jsxs("div",{className:"flex items-center",children:[P.iconStart&&f.jsx("span",{className:"mr-2","aria-hidden":"true",children:P.iconStart}),f.jsx("span",{className:"font-normal hyphens-auto break-words overflow-hidden",children:P[x]})]}),P.iconEnd&&f.jsx("span",{className:"ml-2","aria-hidden":"true",children:P.iconEnd})]})},W))}):f.jsx(Pe.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:f.jsx("p",{"data-testid":"empty-options",children:"Sin opciones"})})})]}),s.length>0&&i&&f.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${c}`,children:s})]})},Ms=({placeholder:e="",label:n="",htmlFor:t,name:r,handleChange:o,onClick:l=()=>{},value:i,valueSelect:s,isReadOnly:u=!1,isError:c=!1,helperText:p="",autocomplete:h="on",id:b,classNameLabel:m="",classNameContainer:g="",className:v="",onKeyDown:x,options:y,idSelect:w,isMarginLeft:C=!0,classNameSelect:N="w-20",type:I="text"})=>{const{width:M}=fn(),Z=_e({"ring-red-300 focus:ring-red-300 text-red-900":c,"focus:ring-indigo-600 text-gray-500":!c});return f.jsxs(f.Fragment,{children:[f.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,21 +41,21 @@ Check the top-level render call using <`+N+">.")}return S}}function vr(d,S){{if(
41
41
  input[type="number"] {
42
42
  -moz-appearance: textfield;
43
43
  }
44
- `}),f.jsxs("div",{"data-testid":`container-input-${b}`,className:g,children:[n!==""&&f.jsx("label",{htmlFor:t,className:$("block text-sm font-medium leading-6",m!==""?m:"text-gray-700"),"data-testid":`label-${b}`,children:n}),f.jsxs("div",{className:"relative mt-1 rounded-md shadow-sm",children:[f.jsx("div",{className:"absolute inset-y-0 -top-0.5 flex items-center",style:{left:"2px"},children:f.jsx(lr,{name:w,onChange:U=>o(U),id:w,options:y,value:s,isReadOnly:a,className:I,height:A<=640?"28px":"32px",classNameInput:$(C&&"ml-3.5"),style:{paddingRight:0,boxShadow:"none"},isDisabledFocus:!0})}),f.jsx("input",{id:b,name:r,type:P,autoComplete:h,placeholder:e,readOnly:a,"data-testid":`input-${b}`,onClick:l,onKeyDown:x,onChange:U=>o(U),value:i,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,v!==""&&v)}),c&&f.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:f.jsx(er,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),p.length===0||!c?null:f.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${b}`,children:p})]})]})},As=({setValuesDefault:e,status:n=!1,isReadOnly:t=!1,handleClick:r,text:o="",updateStatus:l=!1,id:i="",isHiddenText:s=!1,setForm:a,handleChange:c,textActive:p="Activo",textInactive:h="Inactivo"})=>{const[b,m]=u.useState(!1);u.useEffect(()=>{m(n),e("status",n),a(v=>({...v,status:n}))},[n,e,l,a]);const g=()=>{m(!b),e("status",!b),a(v=>({...v,status:!b})),c({target:{checked:!b,value:!b,name:"status",type:"",id:""}}),r&&r()};return f.jsxs("div",{className:"flex",children:[f.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-${i}`,disabled:t,children:[f.jsx("span",{className:"sr-only",children:"Use setting"}),f.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!==""?f.jsx("p",{className:$("text-sm font-medium text-gray-500 ml-2 self-end",s&&"hidden"),children:o}):f.jsx("p",{className:$("text-sm font-medium text-gray-500 ml-2 self-end",s&&"hidden"),"data-testid":"text-switch",children:b?p:h})]})};function Ds({label:e="",id:n,htmlFor:t="",classNameLabel:r="",className:o="",rows:l=4,name:i,placeholder:s="",helperText:a="",isReadOnly:c=!1,isError:p=!1,onChange:h,value:b,idInput:m,nameInput:g,placeholderInput:v="",isReadOnlyInput:x=!1,valueInput:y,infoTop:w=null,infoBottom:C=null,classNameInfoTop:I="h-4",classNameInfoBottom:P="h-2",isInputTitle:A=!1,hiddenBorder:G=!1}){const U=Ae({"ring-red-300 focus:ring-red-300 text-red-900":p,"focus:ring-indigo-600 text-gray-700":!p});return f.jsxs(f.Fragment,{children:[e!==""&&f.jsx("label",{htmlFor:t,className:$("leading-6 block text-sm",r!==""&&r),children:e}),f.jsxs("div",{className:"relative overflow-x-hidden",children:[w!==null&&f.jsx("div",{className:"absolute top-2 left-3 w-full",children:w}),f.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&&f.jsx("div",{className:"py-2","aria-hidden":"true",children:f.jsx("div",{className:"py-px",children:f.jsx("div",{className:I})})}),A&&f.jsx("textarea",{name:g,id:m,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:v,value:y,onChange:h,rows:2,readOnly:x}),f.jsx("textarea",{placeholder:s,rows:l,name:i,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:c,onChange:h,value:b,"data-testid":`textarea-${n}`}),C!==null&&f.jsx("div",{className:"py-2","aria-hidden":"true",children:f.jsx("div",{className:"py-px",children:f.jsx("div",{className:P})})})]}),C!==null&&f.jsx("div",{className:"absolute bottom-2 left-3 w-full",children:C})]}),a.length>0&&p&&f.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:l="",classNameContainerSearch:i="px-5",isSelectMultiple:s=!1,optionsSelect:a,propObject:c="name",propId:p="id",textNewItem:h="",defaultId:b=null,loading:m=!1,search:g=null,searchPlaceHolder:v="Buscar...",valueSearch:x=void 0,idsOptionSelect:y=null,isComponent:w,isSticky:C=!1,hiddenMenu:I=!1,id:P,onClick:A=()=>{},isRelative:G=!0,isMaxWidth:U=!1,isTag:D=!1,isClear:B=!1,clear:R=null,applyButton:q=null,applyButtonText:K="Aplicar",tagsParent:ae=[],isClearTagsParent:T=!1,isReadOnly:te,isDisabledApplyButton:H=!0,isOpenMenu:oe=void 0})=>{const[k,W]=u.useState(new Set),[le,fe]=u.useState(new Map);u.useEffect(()=>{y!==null&&W(new Set(new Set(y)))},[y]),u.useEffect(()=>{T&&fe(new Map)},[T]),u.useEffect(()=>{if(ae.length===0)return;const j=new Map;ae.forEach(O=>j.set(O.id,O)),fe(j)},[ae]),u.useEffect(()=>{B&&(W(new Set),fe(new Map),R&&R())},[R,B]);const ye=j=>{let O=new Map(le),M=new Set(k),_=null;if(b!==null&&(j[p]===b&&(_=crypto.randomUUID()),_!==null&&(j[p]=_),_!==null&&(j[c]=j[c].replace(h,"").trim())),M.has(j[p])?M.delete(j[p]):M.add(j[p]),O.has(j[p])?O.delete(j[p]):O.set(j[p],j),!s){const ce=Array.from(M),pe=Array.from(O);ce.shift(),pe.shift(),M=M.size===2?new Set(ce):M,O=O.size===2?new Map(pe):O}a(j,Array.from(M),_!==null),W(M),fe(O)},ge=j=>{A(j===!0?-1:P)},Ce=j=>{const O=new Set(k),M=new Map(le);O.delete(j[p]),M.delete(j[p]),a(j,Array.from(O)),W(O),fe(M)},V=()=>{if(k.size===0)return;const j=new Set(k),O=new Map(le);j.clear(),O.clear(),a(null,Array.from(j)),W(j),fe(O)};function ne(j){if(typeof j!="string")return j;const O=j.toLowerCase();return O.charAt(0).toUpperCase()+O.slice(1)}return f.jsxs(vt,{as:"div",className:$("inline-block text-left",G&&"relative",o!==""&&o),onClick:()=>ge(!0),"data-testid":`menu-${P}`,id:P,children:[f.jsx("style",{children:`
45
- .blue {
46
- background-color: #3758F9;
47
- }
48
- .w-custom {
49
- width: 320px;
50
- }
51
- @media(min-width: 375px) {
52
- .w-custom {
53
- width: 375px;
54
- }
55
- }
56
- @media(min-width: 500px) {
57
- .w-custom {
58
- width: 414px;
59
- }
60
- }
61
- `}),f.jsx(vt.Button,{as:"div",onClick:()=>ge(I),"data-testid":`menu-button-${P}`,children:e}),f.jsx("div",{className:$("absolute right-0 z-20",r,I&&"hidden",m&&"w-full"),children:f.jsx(Re,{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:oe,children:f.jsx(vt.Items,{className:$("mt-1 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",m?"w-full":l===""&&"w-max",l!==""&&l),children:m?f.jsx("div",{className:"flex justify-center py-4",children:f.jsx(lt,{})}):f.jsxs("div",{className:$(!w&&"pb-1",t!==""&&t,U&&"w-custom"),"data-testid":"dropdown-menu",children:[f.jsxs("div",{className:"sticky top-0 bg-white w-full",children:[g!==null&&f.jsx("div",{className:$("py-2 w-full",i),children:f.jsx(nn,{htmlFor:"search",id:`dropdown-search-${P}`,name:"search",type:"text",placeholder:v,handleChange:j=>g(j,P),icon:v!==""&&f.jsx(ss,{className:"w-4 h-4 text-indigo-300"}),className:"pl-5 pr-4 h-8",classNameContainerInput:"w-full",value:x,onKeyDown:j=>j.key===" "&&j.stopPropagation(),autocomplete:"off"})}),q!==null&&f.jsxs("div",{className:$("pt-1.5 justify-end flex items-center",i),children:[f.jsx(ot,{classNameButton:$("bg-gray-400 hover:bg-gray-400 font-medium px-2 py-1.5 rounded-md",k.size>0?"opacity-1 cursor-pointer":"opacity-0 cursor-default"),outline:"",classNameText:"text-xs text-white text-center",id:"delete",onClick:V,children:"Descartar"}),f.jsx(ot,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 font-medium px-2 py-1.5 rounded-md",outline:k.size===0&&H?"":"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:k.size===0&&H,onClick:()=>q({id:P,items:Array.from(le.values())}),children:K})]})]}),D&&!te&&f.jsx("div",{className:"flex flex-wrap ml-7 pt-1",children:Array.from(le).map((j,O)=>f.jsx("div",{className:"mr-1",children:f.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:[j[1][c],f.jsx("button",{type:"button",className:"p-0.5 rounded-sm bg-gray-100 hover:bg-gray-300",onClick:()=>Ce(j[1]),"data-testid":`tag-${j[0]}`,children:f.jsx(hs,{className:"h-2.5 w-2.5 stroke-gray-700/50 group-hover:stroke-gray-700/75"})})]})},j))}),f.jsx("div",{className:"divide-y divide-gray-100",children:(te?[]:n).map((j,O)=>f.jsx("div",{className:$(!w&&"py-1",C&&O===0&&"sticky top-0"),children:w?f.jsx("div",{onClick:M=>{M.preventDefault(),a()},"data-testid":`item-component-${O}`,children:j}):f.jsx(vt.Item,{children:f.jsx("span",{className:$(k.has(j[p])&&"blue text-white",!k.has(j[p])&&"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-${O}`,onClick:M=>{M.preventDefault(),ye(j)},children:ne(j[c])})})},O))})]})})})})]})},ir=50,Ls=({total:e,handleNext:n,handlePrev:t,handleSelectPage:r,page:o=null})=>{const[l,i]=u.useState(1),[s,a]=u.useState([]),[c,p]=u.useState([]),h=Math.ceil(e/ir);u.useEffect(()=>{const v=[];for(let x=1;x<=h;x++)v.push(x);p(v)},[h]),u.useEffect(()=>{let v=[];const x="...",y="... ",w=" ...";if(c.length<6)v=c;else if(l>=1&&l<=3)v=[1,2,3,4,x,c.length];else if(l===4)v=[...c.slice(0,5),x,c.length];else if(l>4&&l<c.length-2){const C=c.slice(l-2,l),I=c.slice(l,l+1);v=[1,y,...C,...I,w,c.length]}else if(l>c.length-3){const C=c.slice(c.length-4);v=[1,y,...C]}a(v)},[l,c]),u.useEffect(()=>{o!==null&&o!==l&&i(o)},[o,l]);const b=v=>{i(v),r(v)},m=()=>{i(l===1?l:l-1),l>1&&t(l-1)},g=()=>{l===c.length?i(l):i(l+1),l<c.length&&n(l+1)};return f.jsxs("nav",{className:"flex items-center justify-between border-t border-gray-200 px-4 sm:px-0",children:[f.jsx("div",{className:"-mt-px flex w-0 flex-1",children:f.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:m,"data-testid":"prev",children:[f.jsx(Bi,{className:"mr-3 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Anterior"]})}),f.jsx("div",{className:"hidden md:-mt-px md:flex",children:s.map((v,x)=>f.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!=="... "&&b(v),id:`page-${x+1}`,children:v},x))}),f.jsx("div",{className:"-mt-px flex w-0 flex-1 justify-end",children:f.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:g,"data-testid":"next",children:["Siguiente",f.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 c=p=>{const{files:h}=p.target,[b]=h,m=new FileReader;m.readAsDataURL(b),m.onload=function(){e(g=>({...g,photo:m.result})),n("photo",m.result)}};return f.jsxs("div",{className:$("col-span-full",r!==""&&r),children:[f.jsx("label",{htmlFor:"cover-photo",className:"block text-sm font-medium leading-6 text-gray-500",children:"Logo (Opcional)"}),f.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?f.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:p=>p.currentTarget.style.filter="none","data-testid":"img"}):f.jsxs("div",{className:"text-center",children:[f.jsx(ds,{"aria-hidden":"true",className:"mx-auto h-12 w-12 text-gray-300"}),f.jsxs("div",{className:"mt-4 flex text-sm leading-6 text-gray-600",children:[f.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:f.jsx("span",{children:"Upload a file"})}),f.jsx("p",{className:"pl-1",children:"or drag and drop"})]}),f.jsx("p",{className:"text-xs leading-5 text-gray-600",children:"PNG, JPG, GIF up to 10MB"})]}),f.jsx("input",{id:"file-upload",name:"file-upload",type:"file",className:"absolute w-full h-full opacity-0 cursor-pointer",onChange:c})]})]})},Bs=({children:e,openDefault:n=!1,setForm:t,setValuesDefault:r,title:o,type:l,data:i,setData:s,id:a,defaultData:c,dispatch:p,isAdd:h=!0,search:b=null,isPadding:m=!0,isReadOnly:g=!1,isEdit:v=!1,deleteItem:x=null,validateAdd:y=null,loading:w=!1,internalEdit:C=!0,isDataEmpty:I=!0,typeProp:P="value",setAdd:A=null,hasNoRecords:G=!0,tabs:U=null,selectTab:D=null})=>{const[R,q]=u.useState(!1),[K,ae]=u.useState(!1),[,T]=u.useState(!1),[te,H]=u.useState(""),[oe,k]=u.useState(1);u.useEffect(()=>{q(n),T(g)},[n,g]);const W=({e:V,index:ne})=>{const j=Tt(i),{name:O,value:M}=V.target;!(y===null?!1:y({value:M,copyData:j,index:ne}))&&(j[ne][O]=M),s(j),r(a,j),t(ce=>({...ce,[a]:j}))},le=()=>{if(i.some(ne=>Object.values(ne).some(M=>M[P]===-1))||i.length===0)return p({type:"ALERT",payload:{title:"",message:"Todos los campos son requeridos",typeAlert:"warning",active:!0}});t(ne=>({...ne,data:i})),r(a,i),s([...i,c]),A&&A([...i,c])},fe=({index:V,item:ne})=>{if(i.length===1&&!v)return;const j=Tt(i);j.splice(V,1),t(O=>({...O,data:j})),r(a,j),s(j),x&&x({index:V,item:ne,data:j}),V===i.length-1&&v&&j.length===0&&(t(O=>({...O,data:j})),r(a,j),s([...j,c]))},ye=()=>{ae(!K),T(!1)},ge=()=>{if(i.length>1)return;if(i.length===0)return!0;const[V]=i,{rol:ne,privileges:j,limitedPrivileges:O,...M}=V;return Object.values(M).every(ce=>Object.values(ce)[0]===-1)},Ce=({tab:V})=>{k(V.id),D&&D({tab:V})};return f.jsxs("div",{className:"divide-y divide-gray-200 rounded-lg bg-white shadow mt-7",children:[f.jsxs("div",{className:"px-4 py-3.5 sm:px-6 flex justify-between items-center cursor-pointer",onClick:()=>q(!R),"data-testid":`open-accordion-${a}`,children:[f.jsx("p",{className:"text-gray-500 uppercase text-xs font-bold",children:o}),f.jsxs("div",{className:"flex items-center",children:[b&&f.jsx(nn,{htmlFor:"search",id:"search",name:"search",type:"text",autoComplete:"search",placeholder:"Buscar...",handleChange:V=>{b(V),H(V.target.value)},icon:f.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:V=>V.stopPropagation(),onFocus:()=>q(!0)}),R?f.jsx(Cs,{className:"w-5 h-5 text-default-5"}):f.jsx(Ss,{className:"w-5 h-5 text-default-5"})]})]}),f.jsx(Re,{as:u.Fragment,show:R,enter:"transition duration-[400ms]",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-200 transition ease-in-out",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:f.jsxs("div",{children:[U&&f.jsx("nav",{className:"flex justify-center border-b border-gray-200","aria-label":"Tabs",children:U.map(V=>f.jsx("span",{className:$(oe===V.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":oe===V.id?"page":void 0,onClick:()=>Ce({tab:V}),"data-testid":`tab-${V.id}`,children:V.name},V.name))}),f.jsxs("div",{className:$("sm:mt-2.5 py-3.5 relative",m&&U===null&&"px-4 sm:p-6",m&&U!==null&&"px-4 sm:px-6 sm:pb-6 sm:pt-2.5"),children:[C&&!K&&f.jsx(us,{className:"w-5 h-5 text-gray-400 cursor-pointer absolute right-4",onClick:ye,"data-testid":`edit-role-${a}`}),w&&f.jsx("div",{className:"flex justify-center mt-5",children:f.jsx(lt,{})}),I&&ge()&&G&&!w&&(C?!K:!v)&&f.jsx("p",{className:"text-gray-800 text-center","data-testid":"records-empty",children:"No hay registros para mostrar"}),!w&&i.map((V,ne)=>f.jsxs("div",{className:$("flex flex-col 3xs:flex-row mb-4",m&&"ml-0 3xs:ml-3"),children:[typeof e=="function"?e({item:V,index:ne,handleChange:W,isEdit:C?K:v}):e,h&&(C?K:v)&&f.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&&!v&&"opacity-0"),children:f.jsx(Fs,{className:$("w-6 h-4",(i.length>1||v)&&"cursor-pointer"),style:{color:"#637381"},strokeWidth:2.5,onClick:()=>fe({index:ne,item:V}),"data-testid":`delete-item-${ne}-${a}`})})]},ne)),h&&(C?K:v)&&!w&&f.jsx("p",{className:"text-secondary-2 text-sm font-medium ml-3 cursor-pointer",onClick:le,"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,c]=u.useState(!1),p={filter:a?"none":"blur(10px)",transition:"filter 0.3s ease-out",objectFit:"cover",...t?{width:t}:{},...r?{height:r}:{},...i};return f.jsx("img",{src:e,alt:n,...t?{width:t}:{},...r?{height:r}:{},className:$(o!==""&&o),loading:l?"eager":"lazy",decoding:"async",style:p,onLoad:()=>c(!0),"data-testid":`image-${s}`})};z.Accordion=Bs,z.Alert=rs,z.Avatar=vs,z.Bullets=gs,z.ButtonOutline=nr,z.ButtonPagination=rr,z.ButtonSolid=ot,z.Checkbox=xs,z.ConfirmationAbandoningCreation=ks,z.CoverPhoto=Rs,z.Divider=Is,z.Dropdown=_s,z.GoBack=$s,z.Image=zs,z.Input=nn,z.InputDropdown=Ms,z.MESSAGE_ABORT_CONTROLLER=Sr,z.MESSAGE_SIGNAL_ABORTED_WITHOUT_REASON=Tr,z.Modal=or,z.Pagination=Ls,z.Select=lr,z.Spinner=Ps,z.SpinnerIcon=lt,z.Switch=As,z.Textarea=Ds,z.Tooltip=tn,z.classNames=$,z.copyOptions=Tt,z.generateAvatarInitials=yr,z.isPromise=Er,z.rowsPerPage=ir,z.useCloseModal=Cr,z.useForm=Or,z.useMediaQuery=jr,z.useWindowDimensions=cn,z.validateEmail=un,Object.defineProperty(z,Symbol.toStringTag,{value:"Module"})});
44
+ `}),f.jsxs("div",{"data-testid":`container-input-${b}`,className:g,children:[n!==""&&f.jsx("label",{htmlFor:t,className:k("block text-sm font-medium leading-6",m!==""?m:"text-gray-700"),"data-testid":`label-${b}`,children:n}),f.jsxs("div",{className:"relative mt-1 rounded-md shadow-sm",children:[f.jsx("div",{className:"absolute inset-y-0 -top-0.5 flex items-center",style:{left:"2px"},children:f.jsx(sr,{name:w,onChange:U=>o(U),id:w,options:y,value:s,isReadOnly:u,className:N,height:M<=640?"28px":"32px",classNameInput:k(C&&"ml-3.5"),style:{paddingRight:0,boxShadow:"none"},isDisabledFocus:!0})}),f.jsx("input",{id:b,name:r,type:I,autoComplete:h,placeholder:e,readOnly:u,"data-testid":`input-${b}`,onClick:l,onKeyDown:x,onChange:U=>o(U),value:i,className:k("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",Z,v!==""&&v)}),c&&f.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:f.jsx(nr,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),p.length===0||!c?null:f.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${b}`,children:p})]})]})},As=({setValuesDefault:e,status:n=!1,isReadOnly:t=!1,handleClick:r,text:o="",updateStatus:l=!1,id:i="",isHiddenText:s=!1,setForm:u,handleChange:c,textActive:p="Activo",textInactive:h="Inactivo"})=>{const[b,m]=a.useState(!1);a.useEffect(()=>{m(n),e("status",n),u(v=>({...v,status:n}))},[n,e,l,u]);const g=()=>{m(!b),e("status",!b),u(v=>({...v,status:!b})),c({target:{checked:!b,value:!b,name:"status",type:"",id:""}}),r&&r()};return f.jsxs("div",{className:"flex",children:[f.jsxs(Si,{checked:b,onChange:g,className:k("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-${i}`,disabled:t,children:[f.jsx("span",{className:"sr-only",children:"Use setting"}),f.jsx("span",{"aria-hidden":"true",className:k("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!==""?f.jsx("p",{className:k("text-sm font-medium text-gray-500 ml-2 self-end",s&&"hidden"),children:o}):f.jsx("p",{className:k("text-sm font-medium text-gray-500 ml-2 self-end",s&&"hidden"),"data-testid":"text-switch",children:b?p:h})]})};function Ds({label:e="",id:n,htmlFor:t="",classNameLabel:r="",className:o="",rows:l=4,name:i,placeholder:s="",helperText:u="",isReadOnly:c=!1,isError:p=!1,onChange:h,value:b,idInput:m,nameInput:g,placeholderInput:v="",isReadOnlyInput:x=!1,valueInput:y,infoTop:w=null,infoBottom:C=null,classNameInfoTop:N="h-4",classNameInfoBottom:I="h-2",isInputTitle:M=!1,hiddenBorder:Z=!1}){const U=_e({"ring-red-300 focus:ring-red-300 text-red-900":p,"focus:ring-indigo-600 text-gray-700":!p});return f.jsxs(f.Fragment,{children:[e!==""&&f.jsx("label",{htmlFor:t,className:k("leading-6 block text-sm",r!==""&&r),children:e}),f.jsxs("div",{className:"relative overflow-x-hidden",children:[w!==null&&f.jsx("div",{className:"absolute top-2 left-3 w-full",children:w}),f.jsxs("div",{className:k("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&&f.jsx("div",{className:"py-2","aria-hidden":"true",children:f.jsx("div",{className:"py-px",children:f.jsx("div",{className:N})})}),M&&f.jsx("textarea",{name:g,id:m,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:v,value:y,onChange:h,rows:2,readOnly:x}),f.jsx("textarea",{placeholder:s,rows:l,name:i,id:n,className:k(M||Z?"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:c,onChange:h,value:b,"data-testid":`textarea-${n}`}),C!==null&&f.jsx("div",{className:"py-2","aria-hidden":"true",children:f.jsx("div",{className:"py-px",children:f.jsx("div",{className:I})})})]}),C!==null&&f.jsx("div",{className:"absolute bottom-2 left-3 w-full",children:C})]}),u.length>0&&p&&f.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${n}`,children:u})]})}const Ls=({children:e,data:n,className:t="",classNameTooltip:r="w-full",classNameMenu:o="",classNameMenuItems:l="",classNameContainerSearch:i="px-5",isSelectMultiple:s=!1,optionsSelect:u,propObject:c="name",propId:p="id",textNewItem:h="",defaultId:b=null,loading:m=!1,search:g=null,searchPlaceHolder:v="Buscar...",valueSearch:x=void 0,idsOptionSelect:y=null,isComponent:w,isSticky:C=!1,hiddenMenu:N=!1,id:I,onClick:M=()=>{},isRelative:Z=!0,isMaxWidth:U=!1,isTag:A=!1,isClear:_=!1,clear:L=null,applyButton:G=null,applyButtonText:J="Aplicar",tagsParent:ce=[],isClearTagsParent:T=!1,isReadOnly:re,isDisabledApplyButton:H=!0,isOpenMenu:se=void 0})=>{const P=a.useRef(null),W=a.useRef(null),[X,ve]=a.useState(new Set),[ye,fe]=a.useState(new Map),[Ne,V]=a.useState({}),[oe,le]=a.useState(!1);a.useEffect(()=>{y!==null&&ve(new Set(new Set(y)))},[y]),a.useEffect(()=>{T&&fe(new Map)},[T]),a.useEffect(()=>{if(ce.length===0)return;const F=new Map;ce.forEach(Y=>F.set(Y.id,Y)),fe(F)},[ce]),a.useEffect(()=>{_&&(ve(new Set),fe(new Map),L&&L())},[L,_]),a.useEffect(()=>{const F=()=>{if(!W.current)return;const Y=W.current.getBoundingClientRect();V({position:"absolute",top:Y.bottom+window.scrollY,left:Y.left+window.scrollX,zIndex:10,width:Y.width})};return F(),window.addEventListener("scroll",F,!0),window.addEventListener("resize",F),()=>{window.removeEventListener("scroll",F,!0),window.removeEventListener("resize",F)}},[oe]),a.useEffect(()=>{const F=()=>{document.body.dispatchEvent(new MouseEvent("click",{bubbles:!0}))};return window.addEventListener("scroll",F,!0),()=>window.removeEventListener("scroll",F,!0)},[]);const $=F=>{let Y=new Map(ye),ge=new Set(X),Re=null;if(b!==null&&(F[p]===b&&(Re=crypto.randomUUID()),Re!==null&&(F[p]=Re),Re!==null&&(F[c]=F[c].replace(h,"").trim())),ge.has(F[p])?ge.delete(F[p]):ge.add(F[p]),Y.has(F[p])?Y.delete(F[p]):Y.set(F[p],F),!s){const ct=Array.from(ge),He=Array.from(Y);ct.shift(),He.shift(),ge=ge.size===2?new Set(ct):ge,Y=Y.size===2?new Map(He):Y}u(F,Array.from(ge),Re!==null),ve(ge),fe(Y)},B=F=>{M(F===!0?-1:I),le(!oe)},z=F=>{const Y=new Set(X),ge=new Map(ye);Y.delete(F[p]),ge.delete(F[p]),u(F,Array.from(Y)),ve(Y),fe(ge)},me=()=>{if(X.size===0)return;const F=new Set(X),Y=new Map(ye);F.clear(),Y.clear(),u(null,Array.from(F)),ve(F),fe(Y)};function xe(F){if(typeof F!="string")return F;const Y=F.toLowerCase();return Y.charAt(0).toUpperCase()+Y.slice(1)}return f.jsxs(Et,{as:"div",className:k("inline-block text-left",Z&&"relative",o!==""&&o),onClick:()=>B(!0),"data-testid":`menu-${I}`,id:I,ref:P,children:[f.jsx("style",{children:`
45
+ .blue {
46
+ background-color: #3758F9;
47
+ }
48
+ .w-custom {
49
+ width: 320px;
50
+ }
51
+ @media(min-width: 375px) {
52
+ .w-custom {
53
+ width: 375px;
54
+ }
55
+ }
56
+ @media(min-width: 500px) {
57
+ .w-custom {
58
+ width: 414px;
59
+ }
60
+ }
61
+ `}),f.jsx(Et.Button,{as:"div",onClick:()=>B(N),"data-testid":`menu-button-${I}`,ref:W,children:e}),ft.createPortal(f.jsx("div",{style:Ne,className:k(r,N&&"hidden",m&&"w-full"),children:f.jsx(Ue,{as:a.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:se,children:f.jsx(Et.Items,{className:k("mt-1 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",m?"w-full":l===""&&"w-max",l!==""&&l),children:m?f.jsx("div",{className:"flex justify-center py-4",children:f.jsx(ut,{})}):f.jsxs("div",{className:k(!w&&"pb-1",t!==""&&t,U&&"w-custom"),"data-testid":"dropdown-menu",children:[f.jsxs("div",{className:"sticky top-0 bg-white w-full",children:[g!==null&&f.jsx("div",{className:k("py-2 w-full",i),children:f.jsx(on,{htmlFor:"search",id:`dropdown-search-${I}`,name:"search",type:"text",placeholder:v,handleChange:F=>g(F,I),icon:v!==""&&f.jsx(ss,{className:"w-4 h-4 text-indigo-300"}),className:"pl-5 pr-4 h-8",classNameContainerInput:"w-full",value:x,onKeyDown:F=>F.key===" "&&F.stopPropagation(),autocomplete:"off"})}),G!==null&&f.jsxs("div",{className:k("pt-1.5 justify-end flex items-center",i),children:[f.jsx(at,{classNameButton:k("bg-gray-400 hover:bg-gray-400 font-medium px-2 py-1.5 rounded-md",X.size>0?"opacity-1 cursor-pointer":"opacity-0 cursor-default"),outline:"",classNameText:"text-xs text-white text-center",id:"delete",onClick:me,children:"Descartar"}),f.jsx(at,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 font-medium px-2 py-1.5 rounded-md",outline:X.size===0&&H?"":"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:X.size===0&&H,onClick:()=>G({id:I,items:Array.from(ye.values())}),children:J})]})]}),A&&!re&&f.jsx("div",{className:"flex flex-wrap ml-7 pt-1",children:Array.from(ye).map((F,Y)=>f.jsx("div",{className:"mr-1",children:f.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:[F[1][c],f.jsx("button",{type:"button",className:"p-0.5 rounded-sm bg-gray-100 hover:bg-gray-300",onClick:()=>z(F[1]),"data-testid":`tag-${F[0]}`,children:f.jsx(hs,{className:"h-2.5 w-2.5 stroke-gray-700/50 group-hover:stroke-gray-700/75"})})]})},F))}),f.jsx("div",{className:"divide-y divide-gray-100",children:(re?[]:n).map((F,Y)=>f.jsx("div",{className:k(!w&&"py-1",C&&Y===0&&"sticky top-0"),children:w?f.jsx("div",{onClick:ge=>{ge.preventDefault(),u()},"data-testid":`item-component-${Y}`,children:F}):f.jsx(Et.Item,{children:f.jsx("span",{className:k(X.has(F[p])&&"blue text-white",!X.has(F[p])&&"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-${Y}`,onClick:ge=>{ge.preventDefault(),$(F)},children:xe(F[c])})})},Y))})]})})})}),document.body)]})},ar=50,_s=({total:e,handleNext:n,handlePrev:t,handleSelectPage:r,page:o=null})=>{const[l,i]=a.useState(1),[s,u]=a.useState([]),[c,p]=a.useState([]),h=Math.ceil(e/ar);a.useEffect(()=>{const v=[];for(let x=1;x<=h;x++)v.push(x);p(v)},[h]),a.useEffect(()=>{let v=[];const x="...",y="... ",w=" ...";if(c.length<6)v=c;else if(l>=1&&l<=3)v=[1,2,3,4,x,c.length];else if(l===4)v=[...c.slice(0,5),x,c.length];else if(l>4&&l<c.length-2){const C=c.slice(l-2,l),N=c.slice(l,l+1);v=[1,y,...C,...N,w,c.length]}else if(l>c.length-3){const C=c.slice(c.length-4);v=[1,y,...C]}u(v)},[l,c]),a.useEffect(()=>{o!==null&&o!==l&&i(o)},[o,l]);const b=v=>{i(v),r(v)},m=()=>{i(l===1?l:l-1),l>1&&t(l-1)},g=()=>{l===c.length?i(l):i(l+1),l<c.length&&n(l+1)};return f.jsxs("nav",{className:"flex items-center justify-between border-t border-gray-200 px-4 sm:px-0",children:[f.jsx("div",{className:"-mt-px flex w-0 flex-1",children:f.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:m,"data-testid":"prev",children:[f.jsx(Bi,{className:"mr-3 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Anterior"]})}),f.jsx("div",{className:"hidden md:-mt-px md:flex",children:s.map((v,x)=>f.jsx(lr,{className:k("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!=="... "&&b(v),id:`page-${x+1}`,children:v},x))}),f.jsx("div",{className:"-mt-px flex w-0 flex-1 justify-end",children:f.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:g,"data-testid":"next",children:["Siguiente",f.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:u})=>{const c=p=>{const{files:h}=p.target,[b]=h,m=new FileReader;m.readAsDataURL(b),m.onload=function(){e(g=>({...g,photo:m.result})),n("photo",m.result)}};return f.jsxs("div",{className:k("col-span-full",r!==""&&r),children:[f.jsx("label",{htmlFor:"cover-photo",className:"block text-sm font-medium leading-6 text-gray-500",children:"Logo (Opcional)"}),f.jsxs("div",{className:k("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?f.jsx("img",{src:l,alt:i,width:s,height:u,className:k(t!==""&&t),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s",objectFit:"contain",height:u},onLoad:p=>p.currentTarget.style.filter="none","data-testid":"img"}):f.jsxs("div",{className:"text-center",children:[f.jsx(ds,{"aria-hidden":"true",className:"mx-auto h-12 w-12 text-gray-300"}),f.jsxs("div",{className:"mt-4 flex text-sm leading-6 text-gray-600",children:[f.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:f.jsx("span",{children:"Upload a file"})}),f.jsx("p",{className:"pl-1",children:"or drag and drop"})]}),f.jsx("p",{className:"text-xs leading-5 text-gray-600",children:"PNG, JPG, GIF up to 10MB"})]}),f.jsx("input",{id:"file-upload",name:"file-upload",type:"file",className:"absolute w-full h-full opacity-0 cursor-pointer",onChange:c})]})]})},Bs=({children:e,openDefault:n=!1,setForm:t,setValuesDefault:r,title:o,type:l,data:i,setData:s,id:u,defaultData:c,dispatch:p,isAdd:h=!0,search:b=null,isPadding:m=!0,isReadOnly:g=!1,isEdit:v=!1,deleteItem:x=null,validateAdd:y=null,loading:w=!1,internalEdit:C=!0,isDataEmpty:N=!0,typeProp:I="value",setAdd:M=null,hasNoRecords:Z=!0,tabs:U=null,selectTab:A=null})=>{const[L,G]=a.useState(!1),[J,ce]=a.useState(!1),[,T]=a.useState(!1),[re,H]=a.useState(""),[se,P]=a.useState(1);a.useEffect(()=>{G(n),T(g)},[n,g]);const W=({e:V,index:oe})=>{const le=Ot(i),{name:$,value:B}=V.target;!(y===null?!1:y({value:B,copyData:le,index:oe}))&&(le[oe][$]=B),s(le),r(u,le),t(me=>({...me,[u]:le}))},X=()=>{if(i.some(oe=>Object.values(oe).some(B=>B[I]===-1))||i.length===0)return p({type:"ALERT",payload:{title:"",message:"Todos los campos son requeridos",typeAlert:"warning",active:!0}});t(oe=>({...oe,data:i})),r(u,i),s([...i,c]),M&&M([...i,c])},ve=({index:V,item:oe})=>{if(i.length===1&&!v)return;const le=Ot(i);le.splice(V,1),t($=>({...$,data:le})),r(u,le),s(le),x&&x({index:V,item:oe,data:le}),V===i.length-1&&v&&le.length===0&&(t($=>({...$,data:le})),r(u,le),s([...le,c]))},ye=()=>{ce(!J),T(!1)},fe=()=>{if(i.length>1)return;if(i.length===0)return!0;const[V]=i,{rol:oe,privileges:le,limitedPrivileges:$,...B}=V;return Object.values(B).every(me=>Object.values(me)[0]===-1)},Ne=({tab:V})=>{P(V.id),A&&A({tab:V})};return f.jsxs("div",{className:"divide-y divide-gray-200 rounded-lg bg-white shadow mt-7",children:[f.jsxs("div",{className:"px-4 py-3.5 sm:px-6 flex justify-between items-center cursor-pointer",onClick:()=>G(!L),"data-testid":`open-accordion-${u}`,children:[f.jsx("p",{className:"text-gray-500 uppercase text-xs font-bold",children:o}),f.jsxs("div",{className:"flex items-center",children:[b&&f.jsx(on,{htmlFor:"search",id:"search",name:"search",type:"text",autoComplete:"search",placeholder:"Buscar...",handleChange:V=>{b(V),H(V.target.value)},icon:f.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:re,onClick:V=>V.stopPropagation(),onFocus:()=>G(!0)}),L?f.jsx(Cs,{className:"w-5 h-5 text-default-5"}):f.jsx(Ss,{className:"w-5 h-5 text-default-5"})]})]}),f.jsx(Ue,{as:a.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:f.jsxs("div",{children:[U&&f.jsx("nav",{className:"flex justify-center border-b border-gray-200","aria-label":"Tabs",children:U.map(V=>f.jsx("span",{className:k(se===V.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":se===V.id?"page":void 0,onClick:()=>Ne({tab:V}),"data-testid":`tab-${V.id}`,children:V.name},V.name))}),f.jsxs("div",{className:k("sm:mt-2.5 py-3.5 relative",m&&U===null&&"px-4 sm:p-6",m&&U!==null&&"px-4 sm:px-6 sm:pb-6 sm:pt-2.5"),children:[C&&!J&&f.jsx(us,{className:"w-5 h-5 text-gray-400 cursor-pointer absolute right-4",onClick:ye,"data-testid":`edit-role-${u}`}),w&&f.jsx("div",{className:"flex justify-center mt-5",children:f.jsx(ut,{})}),N&&fe()&&Z&&!w&&(C?!J:!v)&&f.jsx("p",{className:"text-gray-800 text-center","data-testid":"records-empty",children:"No hay registros para mostrar"}),!w&&i.map((V,oe)=>f.jsxs("div",{className:k("flex flex-col 3xs:flex-row mb-4",m&&"ml-0 3xs:ml-3"),children:[typeof e=="function"?e({item:V,index:oe,handleChange:W,isEdit:C?J:v}):e,h&&(C?J:v)&&f.jsx("div",{style:{backgroundColor:"#B0B8BF",width:"25px",height:"25px"},className:k("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&&!v&&"opacity-0"),children:f.jsx(Fs,{className:k("w-6 h-4",(i.length>1||v)&&"cursor-pointer"),style:{color:"#637381"},strokeWidth:2.5,onClick:()=>ve({index:oe,item:V}),"data-testid":`delete-item-${oe}-${u}`})})]},oe)),h&&(C?J:v)&&!w&&f.jsx("p",{className:"text-secondary-2 text-sm font-medium ml-3 cursor-pointer",onClick:X,"data-testid":`add-item-${u}`,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[u,c]=a.useState(!1),p={filter:u?"none":"blur(10px)",transition:"filter 0.3s ease-out",objectFit:"cover",...t?{width:t}:{},...r?{height:r}:{},...i};return f.jsx("img",{src:e,alt:n,...t?{width:t}:{},...r?{height:r}:{},className:k(o!==""&&o),loading:l?"eager":"lazy",decoding:"async",style:p,onLoad:()=>c(!0),"data-testid":`image-${s}`})};R.Accordion=Bs,R.Alert=rs,R.Avatar=vs,R.Bullets=gs,R.ButtonOutline=or,R.ButtonPagination=lr,R.ButtonSolid=at,R.Checkbox=xs,R.ConfirmationAbandoningCreation=ks,R.CoverPhoto=Rs,R.Divider=Is,R.Dropdown=Ls,R.GoBack=Ps,R.Image=zs,R.Input=on,R.InputDropdown=Ms,R.MESSAGE_ABORT_CONTROLLER=Sr,R.MESSAGE_SIGNAL_ABORTED_WITHOUT_REASON=Tr,R.Modal=ir,R.Pagination=_s,R.Select=sr,R.Spinner=$s,R.SpinnerIcon=ut,R.Switch=As,R.Textarea=Ds,R.Tooltip=rn,R.classNames=k,R.copyOptions=Ot,R.generateAvatarInitials=yr,R.isPromise=Er,R.rowsPerPage=ar,R.useCloseModal=Cr,R.useForm=Or,R.useMediaQuery=jr,R.useWindowDimensions=fn,R.validateEmail=dn,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cemtrik-dependencies",
3
- "version": "1.0.155",
3
+ "version": "1.0.157",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "dev": "vite",