cemtrik-dependencies 1.0.43 → 1.0.45

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 +15 -15
  2. package/package.json +4 -3
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(_,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):(_=typeof globalThis<"u"?globalThis:_||self,a(_.MyApp={},_.React,_.ReactDOM))})(this,function(_,a,un){"use strict";function yr(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 T=yr(a),Tt=e=>{function n(r){if(typeof r!="object"||r===null)return r;const o=Array.isArray(r)?[]:{};for(const i in r)r.hasOwnProperty(i)&&(o[i]=n(r[i]));return o}return e.map(r=>n(r))},cn=e=>/^(?:[^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*|"[^\n"]+")@(?:[^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,63}$/i.test(e);function N(...e){return e.filter(Boolean).join(" ")}const Er=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},Sr=e=>typeof e!="string"&&Promise.resolve(e)instanceof Promise,Tr="The user aborted a request.",Cr="signal is aborted without reason",Or=({id:e,close:n,isPathsTest:t=!1})=>{const r=a.useCallback(o=>{o.some(l=>l.getAttribute===void 0?!1:l.getAttribute("id")===e)||n()},[n,e]);a.useEffect(()=>{const o=i=>{const l=i.composedPath();l===void 0||t||r(l)};return window.addEventListener("click",o),()=>{window.removeEventListener("click",o)}},[r,t])},jr=()=>{const[e,n]=a.useState({}),[t,r]=a.useState({}),[o,i]=a.useState([]),l=h=>b=>{b.preventDefault(),b.stopPropagation(),h(e)},s=(h,b,p)=>{const{checked:v,value:g,name:x,type:E,id:w}=h.target,C={radio:w,checkbox:v};n({...e,[x]:C[E]??g}),b({...p,[x]:C[E]??g})},u=a.useCallback((h,b)=>{n(p=>({...p,[h]:b}))},[]),c=a.useCallback((h,b)=>{const p=b.filter(v=>h[v]===""||h[v]===void 0);return p.forEach(v=>r(g=>({...g,[v]:"Este campo es requerido"}))),i(p),p.length>0},[]);return{handleSubmit:l,handleChange:s,setValuesDefault:u,validateFields:c,errors:o,model:e,handleError:(h,b)=>{b.forEach(p=>r(v=>({...v,[p]:h}))),i(b)},messageError:t,setModel:n}},Ir=e=>{const[n,t]=a.useState(!0),[r,o]=a.useState(!1),i=a.useCallback((l,s)=>{const u=e.match(/[0-9]+/g);if(u===null)return;const[c]=u;s=Math.min(window.innerWidth,window.outerWidth);const f=l?s>=Number(c):s<=Number(c);o(f)},[e]);return a.useEffect(()=>{const l=/\(min-width:\s?[0-9]+px\)/gi.test(e),s=/\(max-width:\s?[0-9]+px\)/gi.test(e);if(!l&&!s&&t(!1),!l&&!s)return;const u=Math.min(window.innerWidth,window.outerWidth);i(l,u)},[e,i]),a.useEffect(()=>{if(!n)return;const l=Math.min(window.innerWidth,window.outerWidth);function s(){const u=/min-width/gi.test(e);i(u,l)}return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[n,e,i]),r},Ct=()=>{const[e,n]=a.useState({width:0,height:0});return a.useEffect(()=>{const t=Math.min(window.innerWidth,window.outerWidth),r=Math.min(window.innerHeight,window.outerHeight);n({width:t,height:r})},[]),a.useEffect(()=>{let t=Math.min(window.innerWidth,window.outerWidth),r=Math.min(window.innerHeight,window.outerHeight);const o=()=>{t=Math.min(window.innerWidth,window.outerWidth),r=Math.min(window.innerHeight,window.outerHeight),n({width:t,height:r})};return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),e};function $r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ot={exports:{}},Ve={};/**
1
+ (function(L,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):(L=typeof globalThis<"u"?globalThis:L||self,a(L.MyApp={},L.React,L.ReactDOM))})(this,function(L,a,un){"use strict";function yr(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 C=yr(a),Ct=(e,n=!1)=>{function t(o){if(typeof o!="object"||o===null)return o;const i=Array.isArray(o)?[]:{};for(const l in o)o.hasOwnProperty(l)&&!n&&(i[l]=t(o[l]));return i}return e.map(o=>t(o))},cn=e=>/^(?:[^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*|"[^\n"]+")@(?:[^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,63}$/i.test(e);function k(...e){return e.filter(Boolean).join(" ")}const Er=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},Sr=e=>typeof e!="string"&&Promise.resolve(e)instanceof Promise,Cr="The user aborted a request.",Tr="signal is aborted without reason",Or=({id:e,close:n,isPathsTest:t=!1,isTest:r=!1})=>{const o=a.useCallback(i=>{i.some(s=>s.getAttribute===void 0?!1:s.getAttribute("id")===e)||n()},[n,e]);a.useEffect(()=>{const i=l=>{const s=l.composedPath();s===void 0||t||(r&&(s[0].getAttribute=()=>e),o(s))};return window.addEventListener("click",i),()=>{window.removeEventListener("click",i)}},[o,t,r,e])},jr=()=>{const[e,n]=a.useState({}),[t,r]=a.useState({}),[o,i]=a.useState([]),l=h=>b=>{b.preventDefault(),b.stopPropagation(),h(e)},s=(h,b,p)=>{const{checked:v,value:g,name:x,type:E,id:y}=h.target,T={radio:y,checkbox:v};n({...e,[x]:T[E]??g}),b({...p,[x]:T[E]??g})},u=a.useCallback((h,b)=>{n(p=>({...p,[h]:b}))},[]),d=a.useCallback((h,b)=>{const p=b.filter(v=>h[v]===""||h[v]===void 0);return p.forEach(v=>r(g=>({...g,[v]:"Este campo es requerido"}))),i(p),p.length>0},[]);return{handleSubmit:l,handleChange:s,setValuesDefault:u,validateFields:d,errors:o,model:e,handleError:(h,b)=>{b.forEach(p=>r(v=>({...v,[p]:h}))),i(b)},messageError:t,setModel:n}},Ir=e=>{const[n,t]=a.useState(!0),[r,o]=a.useState(!1),i=a.useCallback((l,s)=>{const u=e.match(/[0-9]+/g);if(u===null)return;const[d]=u;s=Math.min(window.innerWidth,window.outerWidth);const f=l?s>=Number(d):s<=Number(d);o(f)},[e]);return a.useEffect(()=>{const l=/\(min-width:\s?[0-9]+px\)/gi.test(e),s=/\(max-width:\s?[0-9]+px\)/gi.test(e);if(!l&&!s&&t(!1),!l&&!s)return;const u=Math.min(window.innerWidth,window.outerWidth);i(l,u)},[e,i]),a.useEffect(()=>{if(!n)return;const l=Math.min(window.innerWidth,window.outerWidth);function s(){const u=/min-width/gi.test(e);i(u,l)}return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[n,e,i]),r},Tt=()=>{const[e,n]=a.useState({width:0,height:0});return a.useEffect(()=>{const t=Math.min(window.innerWidth,window.outerWidth),r=Math.min(window.innerHeight,window.outerHeight);n({width:t,height:r})},[]),a.useEffect(()=>{let t=Math.min(window.innerWidth,window.outerWidth),r=Math.min(window.innerHeight,window.outerHeight);const o=()=>{t=Math.min(window.innerWidth,window.outerWidth),r=Math.min(window.innerHeight,window.outerHeight),n({width:t,height:r})};return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),e};function $r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ot={exports:{}},Ve={};/**
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=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,i={key:!0,ref:!0,__self:!0,__source:!0};function l(s,u,c){var f,h={},b=null,p=null;c!==void 0&&(b=""+c),u.key!==void 0&&(b=""+u.key),u.ref!==void 0&&(p=u.ref);for(f in u)r.call(u,f)&&!i.hasOwnProperty(f)&&(h[f]=u[f]);if(s&&s.defaultProps)for(f in u=s.defaultProps,u)h[f]===void 0&&(h[f]=u[f]);return{$$typeof:n,type:s,key:b,ref:p,props:h,_owner:o.current}}return Ve.Fragment=t,Ve.jsx=l,Ve.jsxs=l,Ve}var Ye={};/**
9
+ */var dn;function kr(){if(dn)return Ve;dn=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,i={key:!0,ref:!0,__self:!0,__source:!0};function l(s,u,d){var f,h={},b=null,p=null;d!==void 0&&(b=""+d),u.key!==void 0&&(b=""+u.key),u.ref!==void 0&&(p=u.ref);for(f in u)r.call(u,f)&&!i.hasOwnProperty(f)&&(h[f]=u[f]);if(s&&s.defaultProps)for(f in u=s.defaultProps,u)h[f]===void 0&&(h[f]=u[f]);return{$$typeof:n,type:s,key:b,ref:p,props:h,_owner:o.current}}return Ve.Fragment=t,Ve.jsx=l,Ve.jsxs=l,Ve}var Ye={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,31 +14,31 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var fn;function kr(){return fn||(fn=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"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),v=Symbol.iterator,g="@@iterator";function x(d){if(d===null||typeof d!="object")return null;var S=v&&d[v]||d[g];return typeof S=="function"?S:null}var E=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),L=1;L<S;L++)O[L-1]=arguments[L];C("error",d,O)}}function C(d,S,O){{var L=E.ReactDebugCurrentFrame,J=L.getStackAddendum();J!==""&&(S+="%s",O=O.concat([J]));var re=O.map(function(Y){return String(Y)});re.unshift("Warning: "+S),Function.prototype.apply.call(console[d],console,re)}}var I=!1,F=!1,k=!1,U=!1,q=!1,A;A=Symbol.for("react.module.reference");function M(d){return!!(typeof d=="string"||typeof d=="function"||d===r||d===i||q||d===o||d===c||d===f||U||d===p||I||F||k||typeof d=="object"&&d!==null&&(d.$$typeof===b||d.$$typeof===h||d.$$typeof===l||d.$$typeof===s||d.$$typeof===u||d.$$typeof===A||d.getModuleId!==void 0))}function R(d,S,O){var L=d.displayName;if(L)return L;var J=S.displayName||S.name||"";return J!==""?O+"("+J+")":O}function K(d){return d.displayName||"Context"}function z(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 i:return"Profiler";case o:return"StrictMode";case c:return"Suspense";case f:return"SuspenseList"}if(typeof d=="object")switch(d.$$typeof){case s:var S=d;return K(S)+".Consumer";case l:var O=d;return K(O._context)+".Provider";case u:return R(d,d.render,"ForwardRef");case h:var L=d.displayName||null;return L!==null?L:z(d.type)||"Memo";case b:{var J=d,re=J._payload,Y=J._init;try{return z(Y(re))}catch{return null}}}return null}var $=Object.assign,y=0,oe,B,ie,Q,te,me,ge;function Te(){}Te.__reactDisabledLog=!0;function be(){{if(y===0){oe=console.log,B=console.info,ie=console.warn,Q=console.error,te=console.group,me=console.groupCollapsed,ge=console.groupEnd;var d={configurable:!0,enumerable:!0,value:Te,writable:!0};Object.defineProperties(console,{info:d,log:d,warn:d,error:d,group:d,groupCollapsed:d,groupEnd:d})}y++}}function P(){{if(y--,y===0){var d={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:$({},d,{value:oe}),info:$({},d,{value:B}),warn:$({},d,{value:ie}),error:$({},d,{value:Q}),group:$({},d,{value:te}),groupCollapsed:$({},d,{value:me}),groupEnd:$({},d,{value:ge})})}y<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Z=E.ReactCurrentDispatcher,ne;function we(d,S,O){{if(ne===void 0)try{throw Error()}catch(J){var L=J.stack.trim().match(/\n( *(at )?)/);ne=L&&L[1]||""}return`
18
- `+ne+d}}var D=!1,V;{var W=typeof WeakMap=="function"?WeakMap:Map;V=new W}function pe(d,S){if(!d||D)return"";{var O=V.get(d);if(O!==void 0)return O}var L;D=!0;var J=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var re;re=Z.current,Z.current=null,be();try{if(S){var Y=function(){throw Error()};if(Object.defineProperty(Y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Y,[])}catch(Fe){L=Fe}Reflect.construct(d,[],Y)}else{try{Y.call()}catch(Fe){L=Fe}d.call(Y.prototype)}}else{try{throw Error()}catch(Fe){L=Fe}d()}}catch(Fe){if(Fe&&L&&typeof Fe.stack=="string"){for(var H=Fe.stack.split(`
19
- `),xe=L.stack.split(`
20
- `),de=H.length-1,fe=xe.length-1;de>=1&&fe>=0&&H[de]!==xe[fe];)fe--;for(;de>=1&&fe>=0;de--,fe--)if(H[de]!==xe[fe]){if(de!==1||fe!==1)do if(de--,fe--,fe<0||H[de]!==xe[fe]){var Ee=`
21
- `+H[de].replace(" at new "," at ");return d.displayName&&Ee.includes("<anonymous>")&&(Ee=Ee.replace("<anonymous>",d.displayName)),typeof d=="function"&&V.set(d,Ee),Ee}while(de>=1&&fe>=0);break}}}finally{D=!1,Z.current=re,P(),Error.prepareStackTrace=J}var Ue=d?d.displayName||d.name:"",wr=Ue?we(Ue):"";return typeof d=="function"&&V.set(d,wr),wr}function he(d,S,O){return pe(d,!1)}function We(d){var S=d.prototype;return!!(S&&S.isReactComponent)}function yt(d,S,O){if(d==null)return"";if(typeof d=="function")return pe(d,We(d));if(typeof d=="string")return we(d);switch(d){case c:return we("Suspense");case f:return we("SuspenseList")}if(typeof d=="object")switch(d.$$typeof){case u:return he(d.render);case h:return yt(d.type,S,O);case b:{var L=d,J=L._payload,re=L._init;try{return yt(re(J),S,O)}catch{}}}return""}var Et=Object.prototype.hasOwnProperty,ar={},ur=E.ReactDebugCurrentFrame;function St(d){if(d){var S=d._owner,O=yt(d.type,d._source,S?S.type:null);ur.setExtraStackFrame(O)}else ur.setExtraStackFrame(null)}function Rs(d,S,O,L,J){{var re=Function.call.bind(Et);for(var Y in d)if(re(d,Y)){var H=void 0;try{if(typeof d[Y]!="function"){var xe=Error((L||"React class")+": "+O+" type `"+Y+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof d[Y]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw xe.name="Invariant Violation",xe}H=d[Y](S,Y,L,O,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(de){H=de}H&&!(H instanceof Error)&&(St(J),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",O,Y,typeof H),St(null)),H instanceof Error&&!(H.message in ar)&&(ar[H.message]=!0,St(J),w("Failed %s type: %s",O,H.message),St(null))}}}var Bs=Array.isArray;function rn(d){return Bs(d)}function zs(d){{var S=typeof Symbol=="function"&&Symbol.toStringTag,O=S&&d[Symbol.toStringTag]||d.constructor.name||"Object";return O}}function Ws(d){try{return cr(d),!1}catch{return!0}}function cr(d){return""+d}function dr(d){if(Ws(d))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",zs(d)),cr(d)}var ot=E.ReactCurrentOwner,Hs={key:!0,ref:!0,__self:!0,__source:!0},fr,mr,on;on={};function Us(d){if(Et.call(d,"ref")){var S=Object.getOwnPropertyDescriptor(d,"ref").get;if(S&&S.isReactWarning)return!1}return d.ref!==void 0}function Vs(d){if(Et.call(d,"key")){var S=Object.getOwnPropertyDescriptor(d,"key").get;if(S&&S.isReactWarning)return!1}return d.key!==void 0}function Ys(d,S){if(typeof d.ref=="string"&&ot.current&&S&&ot.current.stateNode!==S){var O=z(ot.current.type);on[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',z(ot.current.type),d.ref),on[O]=!0)}}function qs(d,S){{var O=function(){fr||(fr=!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 Gs(d,S){{var O=function(){mr||(mr=!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 Ks=function(d,S,O,L,J,re,Y){var H={$$typeof:n,type:d,key:S,ref:O,props:Y,_owner:re};return H._store={},Object.defineProperty(H._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(H,"_self",{configurable:!1,enumerable:!1,writable:!1,value:L}),Object.defineProperty(H,"_source",{configurable:!1,enumerable:!1,writable:!1,value:J}),Object.freeze&&(Object.freeze(H.props),Object.freeze(H)),H};function Zs(d,S,O,L,J){{var re,Y={},H=null,xe=null;O!==void 0&&(dr(O),H=""+O),Vs(S)&&(dr(S.key),H=""+S.key),Us(S)&&(xe=S.ref,Ys(S,J));for(re in S)Et.call(S,re)&&!Hs.hasOwnProperty(re)&&(Y[re]=S[re]);if(d&&d.defaultProps){var de=d.defaultProps;for(re in de)Y[re]===void 0&&(Y[re]=de[re])}if(H||xe){var fe=typeof d=="function"?d.displayName||d.name||"Unknown":d;H&&qs(Y,fe),xe&&Gs(Y,fe)}return Ks(d,H,xe,J,L,ot.current,Y)}}var ln=E.ReactCurrentOwner,pr=E.ReactDebugCurrentFrame;function He(d){if(d){var S=d._owner,O=yt(d.type,d._source,S?S.type:null);pr.setExtraStackFrame(O)}else pr.setExtraStackFrame(null)}var sn;sn=!1;function an(d){return typeof d=="object"&&d!==null&&d.$$typeof===n}function hr(){{if(ln.current){var d=z(ln.current.type);if(d)return`
17
+ */var fn;function Fr(){return fn||(fn=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"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),v=Symbol.iterator,g="@@iterator";function x(c){if(c===null||typeof c!="object")return null;var S=v&&c[v]||c[g];return typeof S=="function"?S:null}var E=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(c){{for(var S=arguments.length,O=new Array(S>1?S-1:0),D=1;D<S;D++)O[D-1]=arguments[D];T("error",c,O)}}function T(c,S,O){{var D=E.ReactDebugCurrentFrame,X=D.getStackAddendum();X!==""&&(S+="%s",O=O.concat([X]));var oe=O.map(function(Y){return String(Y)});oe.unshift("Warning: "+S),Function.prototype.apply.call(console[c],console,oe)}}var I=!1,$=!1,P=!1,_=!1,q=!1,M;M=Symbol.for("react.module.reference");function F(c){return!!(typeof c=="string"||typeof c=="function"||c===r||c===i||q||c===o||c===d||c===f||_||c===p||I||$||P||typeof c=="object"&&c!==null&&(c.$$typeof===b||c.$$typeof===h||c.$$typeof===l||c.$$typeof===s||c.$$typeof===u||c.$$typeof===M||c.getModuleId!==void 0))}function R(c,S,O){var D=c.displayName;if(D)return D;var X=S.displayName||S.name||"";return X!==""?O+"("+X+")":O}function Q(c){return c.displayName||"Context"}function z(c){if(c==null)return null;if(typeof c.tag=="number"&&y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case r:return"Fragment";case t:return"Portal";case i:return"Profiler";case o:return"StrictMode";case d:return"Suspense";case f:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case s:var S=c;return Q(S)+".Consumer";case l:var O=c;return Q(O._context)+".Provider";case u:return R(c,c.render,"ForwardRef");case h:var D=c.displayName||null;return D!==null?D:z(c.type)||"Memo";case b:{var X=c,oe=X._payload,Y=X._init;try{return z(Y(oe))}catch{return null}}}return null}var B=Object.assign,w=0,G,W,ie,J,ne,me,ge;function Ce(){}Ce.__reactDisabledLog=!0;function be(){{if(w===0){G=console.log,W=console.info,ie=console.warn,J=console.error,ne=console.group,me=console.groupCollapsed,ge=console.groupEnd;var c={configurable:!0,enumerable:!0,value:Ce,writable:!0};Object.defineProperties(console,{info:c,log:c,warn:c,error:c,group:c,groupCollapsed:c,groupEnd:c})}w++}}function N(){{if(w--,w===0){var c={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:B({},c,{value:G}),info:B({},c,{value:W}),warn:B({},c,{value:ie}),error:B({},c,{value:J}),group:B({},c,{value:ne}),groupCollapsed:B({},c,{value:me}),groupEnd:B({},c,{value:ge})})}w<0&&y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Z=E.ReactCurrentDispatcher,re;function we(c,S,O){{if(re===void 0)try{throw Error()}catch(X){var D=X.stack.trim().match(/\n( *(at )?)/);re=D&&D[1]||""}return`
18
+ `+re+c}}var A=!1,V;{var H=typeof WeakMap=="function"?WeakMap:Map;V=new H}function pe(c,S){if(!c||A)return"";{var O=V.get(c);if(O!==void 0)return O}var D;A=!0;var X=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var oe;oe=Z.current,Z.current=null,be();try{if(S){var Y=function(){throw Error()};if(Object.defineProperty(Y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Y,[])}catch(ke){D=ke}Reflect.construct(c,[],Y)}else{try{Y.call()}catch(ke){D=ke}c.call(Y.prototype)}}else{try{throw Error()}catch(ke){D=ke}c()}}catch(ke){if(ke&&D&&typeof ke.stack=="string"){for(var U=ke.stack.split(`
19
+ `),xe=D.stack.split(`
20
+ `),de=U.length-1,fe=xe.length-1;de>=1&&fe>=0&&U[de]!==xe[fe];)fe--;for(;de>=1&&fe>=0;de--,fe--)if(U[de]!==xe[fe]){if(de!==1||fe!==1)do if(de--,fe--,fe<0||U[de]!==xe[fe]){var Ee=`
21
+ `+U[de].replace(" at new "," at ");return c.displayName&&Ee.includes("<anonymous>")&&(Ee=Ee.replace("<anonymous>",c.displayName)),typeof c=="function"&&V.set(c,Ee),Ee}while(de>=1&&fe>=0);break}}}finally{A=!1,Z.current=oe,N(),Error.prepareStackTrace=X}var Ue=c?c.displayName||c.name:"",wr=Ue?we(Ue):"";return typeof c=="function"&&V.set(c,wr),wr}function he(c,S,O){return pe(c,!1)}function We(c){var S=c.prototype;return!!(S&&S.isReactComponent)}function yt(c,S,O){if(c==null)return"";if(typeof c=="function")return pe(c,We(c));if(typeof c=="string")return we(c);switch(c){case d:return we("Suspense");case f:return we("SuspenseList")}if(typeof c=="object")switch(c.$$typeof){case u:return he(c.render);case h:return yt(c.type,S,O);case b:{var D=c,X=D._payload,oe=D._init;try{return yt(oe(X),S,O)}catch{}}}return""}var Et=Object.prototype.hasOwnProperty,ar={},ur=E.ReactDebugCurrentFrame;function St(c){if(c){var S=c._owner,O=yt(c.type,c._source,S?S.type:null);ur.setExtraStackFrame(O)}else ur.setExtraStackFrame(null)}function Rs(c,S,O,D,X){{var oe=Function.call.bind(Et);for(var Y in c)if(oe(c,Y)){var U=void 0;try{if(typeof c[Y]!="function"){var xe=Error((D||"React class")+": "+O+" type `"+Y+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof c[Y]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw xe.name="Invariant Violation",xe}U=c[Y](S,Y,D,O,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(de){U=de}U&&!(U instanceof Error)&&(St(X),y("%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,Y,typeof U),St(null)),U instanceof Error&&!(U.message in ar)&&(ar[U.message]=!0,St(X),y("Failed %s type: %s",O,U.message),St(null))}}}var Bs=Array.isArray;function rn(c){return Bs(c)}function zs(c){{var S=typeof Symbol=="function"&&Symbol.toStringTag,O=S&&c[Symbol.toStringTag]||c.constructor.name||"Object";return O}}function Ws(c){try{return cr(c),!1}catch{return!0}}function cr(c){return""+c}function dr(c){if(Ws(c))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",zs(c)),cr(c)}var ot=E.ReactCurrentOwner,Hs={key:!0,ref:!0,__self:!0,__source:!0},fr,mr,on;on={};function Us(c){if(Et.call(c,"ref")){var S=Object.getOwnPropertyDescriptor(c,"ref").get;if(S&&S.isReactWarning)return!1}return c.ref!==void 0}function Vs(c){if(Et.call(c,"key")){var S=Object.getOwnPropertyDescriptor(c,"key").get;if(S&&S.isReactWarning)return!1}return c.key!==void 0}function Ys(c,S){if(typeof c.ref=="string"&&ot.current&&S&&ot.current.stateNode!==S){var O=z(ot.current.type);on[O]||(y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',z(ot.current.type),c.ref),on[O]=!0)}}function qs(c,S){{var O=function(){fr||(fr=!0,y("%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(c,"key",{get:O,configurable:!0})}}function Gs(c,S){{var O=function(){mr||(mr=!0,y("%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(c,"ref",{get:O,configurable:!0})}}var Ks=function(c,S,O,D,X,oe,Y){var U={$$typeof:n,type:c,key:S,ref:O,props:Y,_owner:oe};return U._store={},Object.defineProperty(U._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(U,"_self",{configurable:!1,enumerable:!1,writable:!1,value:D}),Object.defineProperty(U,"_source",{configurable:!1,enumerable:!1,writable:!1,value:X}),Object.freeze&&(Object.freeze(U.props),Object.freeze(U)),U};function Zs(c,S,O,D,X){{var oe,Y={},U=null,xe=null;O!==void 0&&(dr(O),U=""+O),Vs(S)&&(dr(S.key),U=""+S.key),Us(S)&&(xe=S.ref,Ys(S,X));for(oe in S)Et.call(S,oe)&&!Hs.hasOwnProperty(oe)&&(Y[oe]=S[oe]);if(c&&c.defaultProps){var de=c.defaultProps;for(oe in de)Y[oe]===void 0&&(Y[oe]=de[oe])}if(U||xe){var fe=typeof c=="function"?c.displayName||c.name||"Unknown":c;U&&qs(Y,fe),xe&&Gs(Y,fe)}return Ks(c,U,xe,X,D,ot.current,Y)}}var ln=E.ReactCurrentOwner,pr=E.ReactDebugCurrentFrame;function He(c){if(c){var S=c._owner,O=yt(c.type,c._source,S?S.type:null);pr.setExtraStackFrame(O)}else pr.setExtraStackFrame(null)}var sn;sn=!1;function an(c){return typeof c=="object"&&c!==null&&c.$$typeof===n}function hr(){{if(ln.current){var c=z(ln.current.type);if(c)return`
22
22
 
23
- Check the render method of \``+d+"`."}return""}}function Qs(d){return""}var vr={};function Js(d){{var S=hr();if(!S){var O=typeof d=="string"?d:d.displayName||d.name;O&&(S=`
23
+ Check the render method of \``+c+"`."}return""}}function Qs(c){return""}var vr={};function Js(c){{var S=hr();if(!S){var O=typeof c=="string"?c:c.displayName||c.name;O&&(S=`
24
24
 
25
- Check the top-level render call using <`+O+">.")}return S}}function gr(d,S){{if(!d._store||d._store.validated||d.key!=null)return;d._store.validated=!0;var O=Js(S);if(vr[O])return;vr[O]=!0;var L="";d&&d._owner&&d._owner!==ln.current&&(L=" It was passed a child from "+z(d._owner.type)+"."),He(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,L),He(null)}}function br(d,S){{if(typeof d!="object")return;if(rn(d))for(var O=0;O<d.length;O++){var L=d[O];an(L)&&gr(L,S)}else if(an(d))d._store&&(d._store.validated=!0);else if(d){var J=x(d);if(typeof J=="function"&&J!==d.entries)for(var re=J.call(d),Y;!(Y=re.next()).done;)an(Y.value)&&gr(Y.value,S)}}}function Xs(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 L=z(S);Rs(O,d.props,"prop",L,d)}else if(S.PropTypes!==void 0&&!sn){sn=!0;var J=z(S);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",J||"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 ea(d){{for(var S=Object.keys(d.props),O=0;O<S.length;O++){var L=S[O];if(L!=="children"&&L!=="key"){He(d),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",L),He(null);break}}d.ref!==null&&(He(d),w("Invalid attribute `ref` supplied to `React.Fragment`."),He(null))}}function xr(d,S,O,L,J,re){{var Y=M(d);if(!Y){var H="";(d===void 0||typeof d=="object"&&d!==null&&Object.keys(d).length===0)&&(H+=" 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=Qs();xe?H+=xe:H+=hr();var de;d===null?de="null":rn(d)?de="array":d!==void 0&&d.$$typeof===n?(de="<"+(z(d.type)||"Unknown")+" />",H=" Did you accidentally export a JSX literal instead of a component?"):de=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",de,H)}var fe=Zs(d,S,O,J,re);if(fe==null)return fe;if(Y){var Ee=S.children;if(Ee!==void 0)if(L)if(rn(Ee)){for(var Ue=0;Ue<Ee.length;Ue++)br(Ee[Ue],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 br(Ee,d)}return d===r?ea(fe):Xs(fe),fe}}function ta(d,S,O){return xr(d,S,O,!0)}function na(d,S,O){return xr(d,S,O,!1)}var ra=na,oa=ta;Ye.Fragment=r,Ye.jsx=ra,Ye.jsxs=oa}()),Ye}process.env.NODE_ENV==="production"?Ot.exports=Fr():Ot.exports=kr();var m=Ot.exports;function qe(e,n,t){let r=t.initialDeps??[],o;return()=>{var i,l,s,u;let c;t.key&&((i=t.debug)!=null&&i.call(t))&&(c=Date.now());const f=e();if(!(f.length!==r.length||f.some((p,v)=>r[v]!==p)))return o;r=f;let b;if(t.key&&((l=t.debug)!=null&&l.call(t))&&(b=Date.now()),o=n(...f),t.key&&((s=t.debug)!=null&&s.call(t))){const p=Math.round((Date.now()-c)*100)/100,v=Math.round((Date.now()-b)*100)/100,g=v/16,x=(E,w)=>{for(E=String(E);E.length<w;)E=" "+E;return E};console.info(`%c⏱ ${x(v,5)} /${x(p,5)} ms`,`
25
+ Check the top-level render call using <`+O+">.")}return S}}function gr(c,S){{if(!c._store||c._store.validated||c.key!=null)return;c._store.validated=!0;var O=Js(S);if(vr[O])return;vr[O]=!0;var D="";c&&c._owner&&c._owner!==ln.current&&(D=" It was passed a child from "+z(c._owner.type)+"."),He(c),y('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),He(null)}}function br(c,S){{if(typeof c!="object")return;if(rn(c))for(var O=0;O<c.length;O++){var D=c[O];an(D)&&gr(D,S)}else if(an(c))c._store&&(c._store.validated=!0);else if(c){var X=x(c);if(typeof X=="function"&&X!==c.entries)for(var oe=X.call(c),Y;!(Y=oe.next()).done;)an(Y.value)&&gr(Y.value,S)}}}function Xs(c){{var S=c.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=z(S);Rs(O,c.props,"prop",D,c)}else if(S.PropTypes!==void 0&&!sn){sn=!0;var X=z(S);y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",X||"Unknown")}typeof S.getDefaultProps=="function"&&!S.getDefaultProps.isReactClassApproved&&y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ea(c){{for(var S=Object.keys(c.props),O=0;O<S.length;O++){var D=S[O];if(D!=="children"&&D!=="key"){He(c),y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",D),He(null);break}}c.ref!==null&&(He(c),y("Invalid attribute `ref` supplied to `React.Fragment`."),He(null))}}function xr(c,S,O,D,X,oe){{var Y=F(c);if(!Y){var U="";(c===void 0||typeof c=="object"&&c!==null&&Object.keys(c).length===0)&&(U+=" 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=Qs();xe?U+=xe:U+=hr();var de;c===null?de="null":rn(c)?de="array":c!==void 0&&c.$$typeof===n?(de="<"+(z(c.type)||"Unknown")+" />",U=" Did you accidentally export a JSX literal instead of a component?"):de=typeof c,y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",de,U)}var fe=Zs(c,S,O,X,oe);if(fe==null)return fe;if(Y){var Ee=S.children;if(Ee!==void 0)if(D)if(rn(Ee)){for(var Ue=0;Ue<Ee.length;Ue++)br(Ee[Ue],c);Object.freeze&&Object.freeze(Ee)}else y("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 br(Ee,c)}return c===r?ea(fe):Xs(fe),fe}}function ta(c,S,O){return xr(c,S,O,!0)}function na(c,S,O){return xr(c,S,O,!1)}var ra=na,oa=ta;Ye.Fragment=r,Ye.jsx=ra,Ye.jsxs=oa}()),Ye}process.env.NODE_ENV==="production"?Ot.exports=kr():Ot.exports=Fr();var m=Ot.exports;function qe(e,n,t){let r=t.initialDeps??[],o;return()=>{var i,l,s,u;let d;t.key&&((i=t.debug)!=null&&i.call(t))&&(d=Date.now());const f=e();if(!(f.length!==r.length||f.some((p,v)=>r[v]!==p)))return o;r=f;let b;if(t.key&&((l=t.debug)!=null&&l.call(t))&&(b=Date.now()),o=n(...f),t.key&&((s=t.debug)!=null&&s.call(t))){const p=Math.round((Date.now()-d)*100)/100,v=Math.round((Date.now()-b)*100)/100,g=v/16,x=(E,y)=>{for(E=String(E);E.length<y;)E=" "+E;return E};console.info(`%c⏱ ${x(v,5)} /${x(p,5)} ms`,`
26
26
  font-size: .6rem;
27
27
  font-weight: bold;
28
- color: hsl(${Math.max(0,Math.min(120-120*g,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 jt(e,n){if(e===void 0)throw new Error("Unexpected undefined");return e}const Nr=(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)}},Mr=e=>e,Ar=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},Dr=(e,n)=>{const t=e.scrollElement;if(!t)return;const r=e.targetWindow;if(!r)return;const o=l=>{const{width:s,height:u}=l;n({width:Math.round(s),height:Math.round(u)})};if(o(t.getBoundingClientRect()),!r.ResizeObserver)return()=>{};const i=new r.ResizeObserver(l=>{const s=l[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 i.observe(t,{box:"border-box"}),()=>{i.unobserve(t)}},mn={passive:!0},Lr=typeof window>"u"?!0:"onscrollend"in window,_r=(e,n)=>{const t=e.scrollElement;if(!t)return;const r=e.targetWindow;if(!r)return;let o=0;const i=Lr?()=>{}:Pr(r,()=>{n(o,!1)},e.options.isScrollingResetDelay),l=c=>()=>{o=t[e.options.horizontal?"scrollLeft":"scrollTop"],i(),n(o,c)},s=l(!0),u=l(!1);return u(),t.addEventListener("scroll",s,mn),t.addEventListener("scrollend",u,mn),()=>{t.removeEventListener("scroll",s),t.removeEventListener("scrollend",u)}},Rr=(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"])},Br=(e,{adjustments:n=0,behavior:t},r)=>{var o,i;const l=e+n;(i=(o=r.scrollElement)==null?void 0:o.scrollTo)==null||i.call(o,{[r.options.horizontal?"left":"top"]:l,behavior:t})};class zr{constructor(n){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let t=null;const r=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(o=>{o.forEach(i=>{this._measureElement(i.target,i)})}));return{disconnect:()=>{var o;return(o=r())==null?void 0:o.disconnect()},observe:o=>{var i;return(i=r())==null?void 0:i.observe(o,{box:"border-box"})},unobserve:o=>{var i;return(i=r())==null?void 0:i.unobserve(o)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([r,o])=>{typeof o>"u"&&delete t[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Mr,rangeExtractor:Ar,onChange:()=>{},measureElement:Rr,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...t}},this.notify=(t,r)=>{var o,i;const{startIndex:l,endIndex:s}=this.range??{startIndex:void 0,endIndex:void 0},u=this.calculateRange();(t||l!==(u==null?void 0:u.startIndex)||s!==(u==null?void 0:u.endIndex))&&((i=(o=this.options).onChange)==null||i.call(o,this,r))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.notify(!1,!1);return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(o,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o;const l=this.isScrolling;this.isScrolling=i,this.notify(l!==i,i)}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(t,r)=>{const o=new Map,i=new Map;for(let l=r-1;l>=0;l--){const s=t[l];if(o.has(s.lane))continue;const u=i.get(s.lane);if(u==null||s.end>u.end?i.set(s.lane,s):s.end<u.end&&o.set(s.lane,!0),o.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((l,s)=>l.end===s.end?l.index-s.index:l.end-s.end)[0]:void 0},this.getMeasurementOptions=qe(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(t,r,o,i,l)=>(this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:r,scrollMargin:o,getItemKey:i,enabled:l}),{key:!1}),this.getMeasurements=qe(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:r,scrollMargin:o,getItemKey:i,enabled:l},s)=>{var u;if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(h=>{this.itemSizeCache.set(h.key,h.size)}));const c=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const f=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=I=>{const F=i(h),k=this.elementsCache.get(F);if(!I){k&&(this.observer.unobserve(k),this.elementsCache.delete(F));return}k!==I&&(k&&this.observer.unobserve(k),this.observer.observe(I),this.elementsCache.set(F,I)),I.isConnected&&this.resizeItem(h,this.options.measureElement(I,void 0,this))});const p=i(h),v=this.options.lanes===1?f[h-1]:this.getFurthestMeasurement(f,h),g=v?v.end+this.options.gap:r+o,x=s.get(p),E=typeof x=="number"?x:this.options.estimateSize(h),w=g+E,C=v?v.lane:h%this.options.lanes;f[h]={index:h,start:g,size:E,end:w,key:p,lane:C,measureElement:b}}return this.measurementsCache=f,f},{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?Wr({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,i)=>r===null?[]:t({startIndex:r.startIndex,endIndex:r.endIndex,overscan:o,count:i}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=t=>{const r=this.options.indexAttribute,o=t.getAttribute(r);return o?parseInt(o,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(t,r)=>{const o=this.indexFromElement(t),i=this.getMeasurements()[o];if(!i||!t.isConnected){this.elementsCache.forEach((s,u)=>{s===t&&(this.observer.unobserve(t),this.elementsCache.delete(u))});return}const l=this.elementsCache.get(i.key);l!==t&&(l&&this.observer.unobserve(l),this.observer.observe(t),this.elementsCache.set(i.key,t)),this.resizeItem(o,this.options.measureElement(t,r,this))},this.resizeItem=(t,r)=>{const o=this.getMeasurements()[t];if(!o)return;const i=this.itemSizeCache.get(o.key)??o.size,l=r-i;l!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,l,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",l),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=l,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,r)),this.notify(!0,!1))},this.measureElement=t=>{t&&this._measureElement(t,void 0)},this.getVirtualItems=qe(()=>[this.getIndexes(),this.getMeasurements()],(t,r)=>{const o=[];for(let i=0,l=t.length;i<l;i++){const s=t[i],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 jt(r[pn(0,r.length-1,o=>jt(r[o]).start,t)])},this.getOffsetForAlignment=(t,r)=>{const o=this.getSize(),i=this.getScrollOffset();r==="auto"&&(t<=i?r="start":t>=i+o?r="end":r="start"),r==="start"?t=t:r==="end"?t=t-o:r==="center"&&(t=t-o/2);const l=this.options.horizontal?"scrollWidth":"scrollHeight",u=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[l]:this.scrollElement[l]: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 i=this.getSize(),l=this.getScrollOffset();if(r==="auto")if(o.end>=l+i-this.options.scrollPaddingEnd)r="end";else if(o.start<=l+this.options.scrollPaddingStart)r="start";else return[l,r];const s=r==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,r),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(t,{align:r="start",behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(t,r),{adjustments:void 0,behavior:o})},this.scrollToIndex=(t,{align:r="auto",behavior:o}={})=>{t=Math.max(0,Math.min(t,this.options.count-1)),this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const i=this.getOffsetForIndex(t,r);if(!i)return;const[l,s]=i;this._scrollToOffset(l,{adjustments:void 0,behavior:o}),o!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(t))){const[c]=jt(this.getOffsetForIndex(t,s));Nr(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(i=>i.end)),o-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(t,{adjustments:r,behavior:o})=>{this.options.scrollToFn(t,{behavior:o,adjustments:r},this)},this.measure=()=>{var t,r;this.itemSizeCache=new Map,(r=(t=this.options).onChange)==null||r.call(t,this,!1)},this.setOptions(n)}}const pn=(e,n,t,r)=>{for(;e<=n;){const o=(e+n)/2|0,i=t(o);if(i<r)e=o+1;else if(i>r)n=o-1;else return o}return e>0?e-1:0};function Wr({measurements:e,outerSize:n,scrollOffset:t}){const r=e.length-1,i=pn(0,r,s=>e[s].start,t);let l=i;for(;l<r&&e[l].end<t+n;)l++;return{startIndex:i,endIndex:l}}const Hr=typeof document<"u"?T.useLayoutEffect:T.useEffect;function Ur(e){const n=T.useReducer(()=>({}),{})[1],t={...e,onChange:(o,i)=>{var l;i?un.flushSync(n):n(),(l=e.onChange)==null||l.call(e,o,i)}},[r]=T.useState(()=>new zr(t));return r.setOptions(t),T.useEffect(()=>r._didMount(),[]),Hr(()=>r._willUpdate()),r}function Vr(e){return Ur({observeElementRect:Dr,observeElementOffset:_r,scrollToFn:Br,...e})}var Yr=Object.defineProperty,qr=(e,n,t)=>n in e?Yr(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,It=(e,n,t)=>(qr(e,typeof n!="symbol"?n+"":n,t),t);let Gr=class{constructor(){It(this,"current",this.detect()),It(this,"handoffState","pending"),It(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 Gr,X=(e,n)=>{Oe.isServer?a.useEffect(e,n):a.useLayoutEffect(e,n)};function Se(e){let n=a.useRef(e);return X(()=>{n.current=e},[e]),n}function $t(e,n){let[t,r]=a.useState(e),o=Se(e);return X(()=>r(o.current),[o,r,...n]),t}let j=function(e){let n=Se(e);return a.useCallback((...t)=>n.current(...t),[n])};function hn(e,n,t){let[r,o]=a.useState(t),i=e!==void 0,l=a.useRef(i),s=a.useRef(!1),u=a.useRef(!1);return i&&!l.current&&!s.current?(s.current=!0,l.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!i&&l.current&&!u.current&&(u.current=!0,l.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[i?e:r,j(c=>(i||o(c),n==null?void 0:n(c)))]}function it(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(n=>setTimeout(()=>{throw n}))}function ye(){let e=[],n={addEventListener(t,r,o,i){return t.addEventListener(r,o,i),n.add(()=>t.removeEventListener(r,o,i))},requestAnimationFrame(...t){let r=requestAnimationFrame(...t);return n.add(()=>cancelAnimationFrame(r))},nextFrame(...t){return n.requestAnimationFrame(()=>n.requestAnimationFrame(...t))},setTimeout(...t){let r=setTimeout(...t);return n.add(()=>clearTimeout(r))},microTask(...t){let r={current:!0};return it(()=>{r.current&&t[0]()}),n.add(()=>{r.current=!1})},style(t,r,o){let i=t.style.getPropertyValue(r);return Object.assign(t.style,{[r]:o}),this.add(()=>{Object.assign(t.style,{[r]:i})})},group(t){let r=ye();return t(r),this.add(()=>r.dispose())},add(t){return e.push(t),()=>{let r=e.indexOf(t);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let t of e.splice(0))t()}};return n}function je(){let[e]=a.useState(ye);return a.useEffect(()=>()=>e.dispose(),[e]),e}function Kr(){let e=typeof document>"u";return"useSyncExternalStore"in T?(n=>n.useSyncExternalStore)(T)(()=>()=>{},()=>!1,()=>!e):!1}function Be(){let e=Kr(),[n,t]=T.useState(Oe.isHandoffComplete);return n&&Oe.isHandoffComplete===!1&&t(!1),T.useEffect(()=>{n!==!0&&t(!0)},[n]),T.useEffect(()=>Oe.handoff(),[]),e?!1:n}var vn;let ve=(vn=a.useId)!=null?vn:function(){let e=Be(),[n,t]=a.useState(e?()=>Oe.nextId():null);return X(()=>{n===null&&t(Oe.nextId())},[n]),n!=null?""+n:void 0};function ae(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,ae),r}function lt(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 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||{}),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 Nt(e,n=0){var t;return e===((t=lt(e))==null?void 0:t.body)?!1:ae(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=lt(e);ye().nextFrame(()=>{n&&!Nt(n.activeElement,0)&&ke(e)})}var Qr=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Qr||{});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 ke(e){e==null||e.focus({preventScroll:!0})}let Jr=["textarea","input"].join(",");function Xr(e){var n,t;return(t=(n=e==null?void 0:e.matches)==null?void 0:n.call(e,Jr))!=null?t:!1}function Pt(e,n=t=>t){return e.slice().sort((t,r)=>{let o=n(t),i=n(r);if(o===null||i===null)return 0;let l=o.compareDocumentPosition(i);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function eo(e,n){return Ge(bn(),n,{relativeTo:e})}function Ge(e,n,{sorted:t=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,l=Array.isArray(e)?t?Pt(e):e:bn(e);o.length>0&&l.length>1&&(l=l.filter(p=>!o.includes(p))),r=r??i.activeElement;let s=(()=>{if(n&5)return 1;if(n&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(n&1)return 0;if(n&2)return Math.max(0,l.indexOf(r))-1;if(n&4)return Math.max(0,l.indexOf(r))+1;if(n&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=n&32?{preventScroll:!0}:{},f=0,h=l.length,b;do{if(f>=h||f+h<=0)return 0;let p=u+f;if(n&16)p=(p+h)%h;else{if(p<0)return 3;if(p>=h)return 1}b=l[p],b==null||b.focus(c),f+=s}while(b!==i.activeElement);return n&6&&Xr(b)&&b.select(),2}function wn(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function to(){return/Android/gi.test(window.navigator.userAgent)}function yn(){return wn()||to()}function st(e,n,t){let r=Se(n);a.useEffect(()=>{function o(i){r.current(i)}return document.addEventListener(e,o,t),()=>document.removeEventListener(e,o,t)},[e,t])}function En(e,n,t){let r=Se(n);a.useEffect(()=>{function o(i){r.current(i)}return window.addEventListener(e,o,t),()=>window.removeEventListener(e,o,t)},[e,t])}function Mt(e,n,t=!0){let r=a.useRef(!1);a.useEffect(()=>{requestAnimationFrame(()=>{r.current=t})},[t]);function o(l,s){if(!r.current||l.defaultPrevented)return;let u=s(l);if(u===null||!u.getRootNode().contains(u)||!u.isConnected)return;let c=function f(h){return typeof h=="function"?f(h()):Array.isArray(h)||h instanceof Set?h:[h]}(e);for(let f of c){if(f===null)continue;let h=f instanceof HTMLElement?f:f.current;if(h!=null&&h.contains(u)||l.composed&&l.composedPath().includes(h))return}return!Nt(u,kt.Loose)&&u.tabIndex!==-1&&l.preventDefault(),n(l,u)}let i=a.useRef(null);st("pointerdown",l=>{var s,u;r.current&&(i.current=((u=(s=l.composedPath)==null?void 0:s.call(l))==null?void 0:u[0])||l.target)},!0),st("mousedown",l=>{var s,u;r.current&&(i.current=((u=(s=l.composedPath)==null?void 0:s.call(l))==null?void 0:u[0])||l.target)},!0),st("click",l=>{yn()||i.current&&(o(l,()=>i.current),i.current=null)},!0),st("touchend",l=>o(l,()=>l.target instanceof HTMLElement?l.target:null),!0),En("blur",l=>o(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function De(...e){return a.useMemo(()=>lt(...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 At(e,n){let[t,r]=a.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 no(e,n=!0){return Object.assign(e,{[Tn]:n})}function ue(...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[Tn]))?void 0:t}function Cn(e){return[e.screenX,e.screenY]}function On(){let e=a.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=a.useRef(n),i=a.useRef(t);a.useEffect(()=>{o.current=n,i.current=t},[n,t]),X(()=>{if(!e||!r)return;let l=lt(e);if(!l)return;let s=o.current,u=i.current,c=Object.assign(h=>s(h),{acceptNode:s}),f=l.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,c,!1);for(;f.nextNode();)u(f.currentNode)},[e,r,o,i])}function Ke(e,n){let t=a.useRef([]),r=j(e);a.useEffect(()=>{let o=[...t.current];for(let[i,l]of n.entries())if(t.current[i]!==l){let s=r(n,o);return t.current=n,s}},[r,...n])}function at(...e){return Array.from(new Set(e.flatMap(n=>typeof n=="string"?n.split(" "):[]))).filter(Boolean).join(" ")}var Ne=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Ne||{}),Pe=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Pe||{});function le({ourProps:e,theirProps:n,slot:t,defaultTag:r,features:o,visible:i=!0,name:l,mergeRefs:s}){s=s??ro;let u=In(n,e);if(i)return ut(u,t,r,l,s);let c=o??0;if(c&2){let{static:f=!1,...h}=u;if(f)return ut(h,t,r,l,s)}if(c&1){let{unmount:f=!0,...h}=u;return ae(f?0:1,{0(){return null},1(){return ut({...h,hidden:!0,style:{display:"none"}},t,r,l,s)}})}return ut(u,t,r,l,s)}function ut(e,n={},t,r,o){let{as:i=t,children:l,refName:s="ref",...u}=Dt(e,["unmount","static"]),c=e.ref!==void 0?{[s]:e.ref}:{},f=typeof l=="function"?l(n):l;"className"in u&&u.className&&typeof u.className=="function"&&(u.className=u.className(n));let h={};if(n){let b=!1,p=[];for(let[v,g]of Object.entries(n))typeof g=="boolean"&&(b=!0),g===!0&&p.push(v);b&&(h["data-headlessui-state"]=p.join(" "))}if(i===a.Fragment&&Object.keys(ct(u)).length>0){if(!a.isValidElement(f)||Array.isArray(f)&&f.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(g=>` - ${g}`).join(`
28
+ color: hsl(${Math.max(0,Math.min(120-120*g,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 jt(e,n){if(e===void 0)throw new Error("Unexpected undefined");return e}const Nr=(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)}},Mr=e=>e,Ar=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},Dr=(e,n)=>{const t=e.scrollElement;if(!t)return;const r=e.targetWindow;if(!r)return;const o=l=>{const{width:s,height:u}=l;n({width:Math.round(s),height:Math.round(u)})};if(o(t.getBoundingClientRect()),!r.ResizeObserver)return()=>{};const i=new r.ResizeObserver(l=>{const s=l[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 i.observe(t,{box:"border-box"}),()=>{i.unobserve(t)}},mn={passive:!0},Lr=typeof window>"u"?!0:"onscrollend"in window,_r=(e,n)=>{const t=e.scrollElement;if(!t)return;const r=e.targetWindow;if(!r)return;let o=0;const i=Lr?()=>{}:Pr(r,()=>{n(o,!1)},e.options.isScrollingResetDelay),l=d=>()=>{o=t[e.options.horizontal?"scrollLeft":"scrollTop"],i(),n(o,d)},s=l(!0),u=l(!1);return u(),t.addEventListener("scroll",s,mn),t.addEventListener("scrollend",u,mn),()=>{t.removeEventListener("scroll",s),t.removeEventListener("scrollend",u)}},Rr=(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"])},Br=(e,{adjustments:n=0,behavior:t},r)=>{var o,i;const l=e+n;(i=(o=r.scrollElement)==null?void 0:o.scrollTo)==null||i.call(o,{[r.options.horizontal?"left":"top"]:l,behavior:t})};class zr{constructor(n){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let t=null;const r=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(o=>{o.forEach(i=>{this._measureElement(i.target,i)})}));return{disconnect:()=>{var o;return(o=r())==null?void 0:o.disconnect()},observe:o=>{var i;return(i=r())==null?void 0:i.observe(o,{box:"border-box"})},unobserve:o=>{var i;return(i=r())==null?void 0:i.unobserve(o)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([r,o])=>{typeof o>"u"&&delete t[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Mr,rangeExtractor:Ar,onChange:()=>{},measureElement:Rr,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...t}},this.notify=(t,r)=>{var o,i;const{startIndex:l,endIndex:s}=this.range??{startIndex:void 0,endIndex:void 0},u=this.calculateRange();(t||l!==(u==null?void 0:u.startIndex)||s!==(u==null?void 0:u.endIndex))&&((i=(o=this.options).onChange)==null||i.call(o,this,r))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.notify(!1,!1);return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(o,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o;const l=this.isScrolling;this.isScrolling=i,this.notify(l!==i,i)}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(t,r)=>{const o=new Map,i=new Map;for(let l=r-1;l>=0;l--){const s=t[l];if(o.has(s.lane))continue;const u=i.get(s.lane);if(u==null||s.end>u.end?i.set(s.lane,s):s.end<u.end&&o.set(s.lane,!0),o.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((l,s)=>l.end===s.end?l.index-s.index:l.end-s.end)[0]:void 0},this.getMeasurementOptions=qe(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(t,r,o,i,l)=>(this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:r,scrollMargin:o,getItemKey:i,enabled:l}),{key:!1}),this.getMeasurements=qe(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:r,scrollMargin:o,getItemKey:i,enabled:l},s)=>{var u;if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(h=>{this.itemSizeCache.set(h.key,h.size)}));const d=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const f=this.measurementsCache.slice(0,d);for(let h=d;h<t;h++){let b=(u=this.measurementsCache[h])==null?void 0:u.measureElement;b||(b=I=>{const $=i(h),P=this.elementsCache.get($);if(!I){P&&(this.observer.unobserve(P),this.elementsCache.delete($));return}P!==I&&(P&&this.observer.unobserve(P),this.observer.observe(I),this.elementsCache.set($,I)),I.isConnected&&this.resizeItem(h,this.options.measureElement(I,void 0,this))});const p=i(h),v=this.options.lanes===1?f[h-1]:this.getFurthestMeasurement(f,h),g=v?v.end+this.options.gap:r+o,x=s.get(p),E=typeof x=="number"?x:this.options.estimateSize(h),y=g+E,T=v?v.lane:h%this.options.lanes;f[h]={index:h,start:g,size:E,end:y,key:p,lane:T,measureElement:b}}return this.measurementsCache=f,f},{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?Wr({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,i)=>r===null?[]:t({startIndex:r.startIndex,endIndex:r.endIndex,overscan:o,count:i}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=t=>{const r=this.options.indexAttribute,o=t.getAttribute(r);return o?parseInt(o,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(t,r)=>{const o=this.indexFromElement(t),i=this.getMeasurements()[o];if(!i||!t.isConnected){this.elementsCache.forEach((s,u)=>{s===t&&(this.observer.unobserve(t),this.elementsCache.delete(u))});return}const l=this.elementsCache.get(i.key);l!==t&&(l&&this.observer.unobserve(l),this.observer.observe(t),this.elementsCache.set(i.key,t)),this.resizeItem(o,this.options.measureElement(t,r,this))},this.resizeItem=(t,r)=>{const o=this.getMeasurements()[t];if(!o)return;const i=this.itemSizeCache.get(o.key)??o.size,l=r-i;l!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,l,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",l),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=l,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,r)),this.notify(!0,!1))},this.measureElement=t=>{t&&this._measureElement(t,void 0)},this.getVirtualItems=qe(()=>[this.getIndexes(),this.getMeasurements()],(t,r)=>{const o=[];for(let i=0,l=t.length;i<l;i++){const s=t[i],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 jt(r[pn(0,r.length-1,o=>jt(r[o]).start,t)])},this.getOffsetForAlignment=(t,r)=>{const o=this.getSize(),i=this.getScrollOffset();r==="auto"&&(t<=i?r="start":t>=i+o?r="end":r="start"),r==="start"?t=t:r==="end"?t=t-o:r==="center"&&(t=t-o/2);const l=this.options.horizontal?"scrollWidth":"scrollHeight",u=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[l]:this.scrollElement[l]: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 i=this.getSize(),l=this.getScrollOffset();if(r==="auto")if(o.end>=l+i-this.options.scrollPaddingEnd)r="end";else if(o.start<=l+this.options.scrollPaddingStart)r="start";else return[l,r];const s=r==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,r),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(t,{align:r="start",behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(t,r),{adjustments:void 0,behavior:o})},this.scrollToIndex=(t,{align:r="auto",behavior:o}={})=>{t=Math.max(0,Math.min(t,this.options.count-1)),this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const i=this.getOffsetForIndex(t,r);if(!i)return;const[l,s]=i;this._scrollToOffset(l,{adjustments:void 0,behavior:o}),o!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(t))){const[d]=jt(this.getOffsetForIndex(t,s));Nr(d,this.getScrollOffset())||this.scrollToIndex(t,{align:s,behavior:o})}else this.scrollToIndex(t,{align:s,behavior:o})}))},this.scrollBy=(t,{behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+t,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var t;const r=this.getMeasurements();let o;return r.length===0?o=this.options.paddingStart:o=this.options.lanes===1?((t=r[r.length-1])==null?void 0:t.end)??0:Math.max(...r.slice(-this.options.lanes).map(i=>i.end)),o-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(t,{adjustments:r,behavior:o})=>{this.options.scrollToFn(t,{behavior:o,adjustments:r},this)},this.measure=()=>{var t,r;this.itemSizeCache=new Map,(r=(t=this.options).onChange)==null||r.call(t,this,!1)},this.setOptions(n)}}const pn=(e,n,t,r)=>{for(;e<=n;){const o=(e+n)/2|0,i=t(o);if(i<r)e=o+1;else if(i>r)n=o-1;else return o}return e>0?e-1:0};function Wr({measurements:e,outerSize:n,scrollOffset:t}){const r=e.length-1,i=pn(0,r,s=>e[s].start,t);let l=i;for(;l<r&&e[l].end<t+n;)l++;return{startIndex:i,endIndex:l}}const Hr=typeof document<"u"?C.useLayoutEffect:C.useEffect;function Ur(e){const n=C.useReducer(()=>({}),{})[1],t={...e,onChange:(o,i)=>{var l;i?un.flushSync(n):n(),(l=e.onChange)==null||l.call(e,o,i)}},[r]=C.useState(()=>new zr(t));return r.setOptions(t),C.useEffect(()=>r._didMount(),[]),Hr(()=>r._willUpdate()),r}function Vr(e){return Ur({observeElementRect:Dr,observeElementOffset:_r,scrollToFn:Br,...e})}var Yr=Object.defineProperty,qr=(e,n,t)=>n in e?Yr(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,It=(e,n,t)=>(qr(e,typeof n!="symbol"?n+"":n,t),t);let Gr=class{constructor(){It(this,"current",this.detect()),It(this,"handoffState","pending"),It(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 Gr,ee=(e,n)=>{Oe.isServer?a.useEffect(e,n):a.useLayoutEffect(e,n)};function Se(e){let n=a.useRef(e);return ee(()=>{n.current=e},[e]),n}function $t(e,n){let[t,r]=a.useState(e),o=Se(e);return ee(()=>r(o.current),[o,r,...n]),t}let j=function(e){let n=Se(e);return a.useCallback((...t)=>n.current(...t),[n])};function hn(e,n,t){let[r,o]=a.useState(t),i=e!==void 0,l=a.useRef(i),s=a.useRef(!1),u=a.useRef(!1);return i&&!l.current&&!s.current?(s.current=!0,l.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!i&&l.current&&!u.current&&(u.current=!0,l.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[i?e:r,j(d=>(i||o(d),n==null?void 0:n(d)))]}function it(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(n=>setTimeout(()=>{throw n}))}function ye(){let e=[],n={addEventListener(t,r,o,i){return t.addEventListener(r,o,i),n.add(()=>t.removeEventListener(r,o,i))},requestAnimationFrame(...t){let r=requestAnimationFrame(...t);return n.add(()=>cancelAnimationFrame(r))},nextFrame(...t){return n.requestAnimationFrame(()=>n.requestAnimationFrame(...t))},setTimeout(...t){let r=setTimeout(...t);return n.add(()=>clearTimeout(r))},microTask(...t){let r={current:!0};return it(()=>{r.current&&t[0]()}),n.add(()=>{r.current=!1})},style(t,r,o){let i=t.style.getPropertyValue(r);return Object.assign(t.style,{[r]:o}),this.add(()=>{Object.assign(t.style,{[r]:i})})},group(t){let r=ye();return t(r),this.add(()=>r.dispose())},add(t){return e.push(t),()=>{let r=e.indexOf(t);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let t of e.splice(0))t()}};return n}function je(){let[e]=a.useState(ye);return a.useEffect(()=>()=>e.dispose(),[e]),e}function Kr(){let e=typeof document>"u";return"useSyncExternalStore"in C?(n=>n.useSyncExternalStore)(C)(()=>()=>{},()=>!1,()=>!e):!1}function Be(){let e=Kr(),[n,t]=C.useState(Oe.isHandoffComplete);return n&&Oe.isHandoffComplete===!1&&t(!1),C.useEffect(()=>{n!==!0&&t(!0)},[n]),C.useEffect(()=>Oe.handoff(),[]),e?!1:n}var vn;let ve=(vn=a.useId)!=null?vn:function(){let e=Be(),[n,t]=a.useState(e?()=>Oe.nextId():null);return ee(()=>{n===null&&t(Oe.nextId())},[n]),n!=null?""+n:void 0};function ae(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,ae),r}function lt(e){return Oe.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let kt=["[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||{}),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(kt)).sort((n,t)=>Math.sign((n.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var Ft=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Ft||{});function Nt(e,n=0){var t;return e===((t=lt(e))==null?void 0:t.body)?!1:ae(n,{0(){return e.matches(kt)},1(){let r=e;for(;r!==null;){if(r.matches(kt))return!0;r=r.parentElement}return!1}})}function xn(e){let n=lt(e);ye().nextFrame(()=>{n&&!Nt(n.activeElement,0)&&Fe(e)})}var Qr=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Qr||{});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 Fe(e){e==null||e.focus({preventScroll:!0})}let Jr=["textarea","input"].join(",");function Xr(e){var n,t;return(t=(n=e==null?void 0:e.matches)==null?void 0:n.call(e,Jr))!=null?t:!1}function Pt(e,n=t=>t){return e.slice().sort((t,r)=>{let o=n(t),i=n(r);if(o===null||i===null)return 0;let l=o.compareDocumentPosition(i);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function eo(e,n){return Ge(bn(),n,{relativeTo:e})}function Ge(e,n,{sorted:t=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,l=Array.isArray(e)?t?Pt(e):e:bn(e);o.length>0&&l.length>1&&(l=l.filter(p=>!o.includes(p))),r=r??i.activeElement;let s=(()=>{if(n&5)return 1;if(n&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(n&1)return 0;if(n&2)return Math.max(0,l.indexOf(r))-1;if(n&4)return Math.max(0,l.indexOf(r))+1;if(n&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=n&32?{preventScroll:!0}:{},f=0,h=l.length,b;do{if(f>=h||f+h<=0)return 0;let p=u+f;if(n&16)p=(p+h)%h;else{if(p<0)return 3;if(p>=h)return 1}b=l[p],b==null||b.focus(d),f+=s}while(b!==i.activeElement);return n&6&&Xr(b)&&b.select(),2}function wn(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function to(){return/Android/gi.test(window.navigator.userAgent)}function yn(){return wn()||to()}function st(e,n,t){let r=Se(n);a.useEffect(()=>{function o(i){r.current(i)}return document.addEventListener(e,o,t),()=>document.removeEventListener(e,o,t)},[e,t])}function En(e,n,t){let r=Se(n);a.useEffect(()=>{function o(i){r.current(i)}return window.addEventListener(e,o,t),()=>window.removeEventListener(e,o,t)},[e,t])}function Mt(e,n,t=!0){let r=a.useRef(!1);a.useEffect(()=>{requestAnimationFrame(()=>{r.current=t})},[t]);function o(l,s){if(!r.current||l.defaultPrevented)return;let u=s(l);if(u===null||!u.getRootNode().contains(u)||!u.isConnected)return;let d=function f(h){return typeof h=="function"?f(h()):Array.isArray(h)||h instanceof Set?h:[h]}(e);for(let f of d){if(f===null)continue;let h=f instanceof HTMLElement?f:f.current;if(h!=null&&h.contains(u)||l.composed&&l.composedPath().includes(h))return}return!Nt(u,Ft.Loose)&&u.tabIndex!==-1&&l.preventDefault(),n(l,u)}let i=a.useRef(null);st("pointerdown",l=>{var s,u;r.current&&(i.current=((u=(s=l.composedPath)==null?void 0:s.call(l))==null?void 0:u[0])||l.target)},!0),st("mousedown",l=>{var s,u;r.current&&(i.current=((u=(s=l.composedPath)==null?void 0:s.call(l))==null?void 0:u[0])||l.target)},!0),st("click",l=>{yn()||i.current&&(o(l,()=>i.current),i.current=null)},!0),st("touchend",l=>o(l,()=>l.target instanceof HTMLElement?l.target:null),!0),En("blur",l=>o(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function De(...e){return a.useMemo(()=>lt(...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 At(e,n){let[t,r]=a.useState(()=>Sn(e));return ee(()=>{r(Sn(e))},[e.type,e.as]),ee(()=>{t||n.current&&n.current instanceof HTMLButtonElement&&!n.current.hasAttribute("type")&&r("button")},[t,n]),t}let Cn=Symbol();function no(e,n=!0){return Object.assign(e,{[Cn]:n})}function ue(...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[Cn]))?void 0:t}function Tn(e){return[e.screenX,e.screenY]}function On(){let e=a.useRef([-1,-1]);return{wasMoved(n){let t=Tn(n);return e.current[0]===t[0]&&e.current[1]===t[1]?!1:(e.current=t,!0)},update(n){e.current=Tn(n)}}}function jn({container:e,accept:n,walk:t,enabled:r=!0}){let o=a.useRef(n),i=a.useRef(t);a.useEffect(()=>{o.current=n,i.current=t},[n,t]),ee(()=>{if(!e||!r)return;let l=lt(e);if(!l)return;let s=o.current,u=i.current,d=Object.assign(h=>s(h),{acceptNode:s}),f=l.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,d,!1);for(;f.nextNode();)u(f.currentNode)},[e,r,o,i])}function Ke(e,n){let t=a.useRef([]),r=j(e);a.useEffect(()=>{let o=[...t.current];for(let[i,l]of n.entries())if(t.current[i]!==l){let s=r(n,o);return t.current=n,s}},[r,...n])}function at(...e){return Array.from(new Set(e.flatMap(n=>typeof n=="string"?n.split(" "):[]))).filter(Boolean).join(" ")}var Ne=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Ne||{}),Pe=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Pe||{});function le({ourProps:e,theirProps:n,slot:t,defaultTag:r,features:o,visible:i=!0,name:l,mergeRefs:s}){s=s??ro;let u=In(n,e);if(i)return ut(u,t,r,l,s);let d=o??0;if(d&2){let{static:f=!1,...h}=u;if(f)return ut(h,t,r,l,s)}if(d&1){let{unmount:f=!0,...h}=u;return ae(f?0:1,{0(){return null},1(){return ut({...h,hidden:!0,style:{display:"none"}},t,r,l,s)}})}return ut(u,t,r,l,s)}function ut(e,n={},t,r,o){let{as:i=t,children:l,refName:s="ref",...u}=Dt(e,["unmount","static"]),d=e.ref!==void 0?{[s]:e.ref}:{},f=typeof l=="function"?l(n):l;"className"in u&&u.className&&typeof u.className=="function"&&(u.className=u.className(n));let h={};if(n){let b=!1,p=[];for(let[v,g]of Object.entries(n))typeof g=="boolean"&&(b=!0),g===!0&&p.push(v);b&&(h["data-headlessui-state"]=p.join(" "))}if(i===a.Fragment&&Object.keys(ct(u)).length>0){if(!a.isValidElement(f)||Array.isArray(f)&&f.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(g=>` - ${g}`).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(g=>` - ${g}`).join(`
30
30
  `)].join(`
31
- `));let b=f.props,p=typeof(b==null?void 0:b.className)=="function"?(...g)=>at(b==null?void 0:b.className(...g),u.className):at(b==null?void 0:b.className,u.className),v=p?{className:p}:{};return a.cloneElement(f,Object.assign({},In(f.props,ct(Dt(u,["ref"]))),h,c,{ref:o(f.ref,c.ref)},v))}return a.createElement(i,Object.assign({},Dt(u,["ref"]),i!==a.Fragment&&c,i!==a.Fragment&&h),f)}function ro(...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 In(...e){if(e.length===0)return{};if(e.length===1)return e[0];let n={},t={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(t[o]!=null||(t[o]=[]),t[o].push(r[o])):n[o]=r[o];if(n.disabled||n["aria-disabled"])return Object.assign(n,Object.fromEntries(Object.keys(t).map(r=>[r,void 0])));for(let r in t)Object.assign(n,{[r](o,...i){let l=t[r];for(let s of l){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;s(o,...i)}}});return n}function se(e){var n;return Object.assign(a.forwardRef(e),{displayName:(n=e.displayName)!=null?n:e.name})}function ct(e){let n=Object.assign({},e);for(let t in n)n[t]===void 0&&delete n[t];return n}function Dt(e,n=[]){let t=Object.assign({},e);for(let r of n)r in t&&delete t[r];return t}let oo="div";var ze=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(ze||{});function io(e,n){var t;let{features:r=1,...o}=e,i={ref:n,"aria-hidden":(r&2)===2?!0:(t=o["aria-hidden"])!=null?t:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return le({ourProps:i,theirProps:o,slot:{},defaultTag:oo,name:"Hidden"})}let Ze=se(io),Lt=a.createContext(null);Lt.displayName="OpenClosedContext";var ce=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ce||{});function Qe(){return a.useContext(Lt)}function _t({value:e,children:n}){return a.createElement(Lt.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 Ce=[];lo(()=>{function e(n){n.target instanceof HTMLElement&&n.target!==document.body&&Ce[0]!==n.target&&(Ce.unshift(n.target),Ce=Ce.filter(t=>t!=null&&t.isConnected),Ce.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 dt(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&&so(t)?!1:r}function so(e){if(!e)return!1;let n=e.previousElementSibling;for(;n!==null;){if(n instanceof HTMLLegendElement)return!1;n=n.previousElementSibling}return!0}function ao(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 Rt(e,n){let t=n.resolveItems();if(t.length<=0)return null;let r=n.resolveActiveIndex(),o=r??-1;switch(e.focus){case 0:{for(let i=0;i<t.length;++i)if(!n.resolveDisabled(t[i],i,t))return i;return r}case 1:{for(let i=o-1;i>=0;--i)if(!n.resolveDisabled(t[i],i,t))return i;return r}case 2:{for(let i=o+1;i<t.length;++i)if(!n.resolveDisabled(t[i],i,t))return i;return r}case 3:{for(let i=t.length-1;i>=0;--i)if(!n.resolveDisabled(t[i],i,t))return i;return r}case 4:{for(let i=0;i<t.length;++i)if(n.resolveId(t[i],i,t)===e.id)return i;return r}case 5:return null;default:ao(e)}}function $n(e={},n=null,t=[]){for(let[r,o]of Object.entries(e))kn(t,Fn(n,r),o);return t}function Fn(e,n){return e?e+"["+n+"]":n}function kn(e,n,t){if(Array.isArray(t))for(let[r,o]of t.entries())kn(e,Fn(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,""]):$n(t,n,e)}function uo(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 G=(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))(G||{}),co=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(co||{}),fo=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(fo||{}),mo=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(mo||{}),po=(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))(po||{});function Bt(e,n=t=>t){let t=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=n(e.options.slice()),o=r.length>0&&r[0].dataRef.current.order!==null?r.sort((l,s)=>l.dataRef.current.order-s.dataRef.current.order):Pt(r,l=>l.dataRef.current.domRef.current),i=t?o.indexOf(t):null;return i===-1&&(i=null),{options:o,activeOptionIndex:i}}let ho={1(e){var n;return(n=e.dataRef.current)!=null&&n.disabled||e.comboboxState===1?e:{...e,activeOptionIndex:null,comboboxState:1}},0(e){var n,t;if((n=e.dataRef.current)!=null&&n.disabled||e.comboboxState===0)return e;if((t=e.dataRef.current)!=null&&t.value){let r=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(r!==-1)return{...e,activeOptionIndex:r,comboboxState:0}}return{...e,comboboxState:0}},2(e,n){var t,r,o,i,l;if((t=e.dataRef.current)!=null&&t.disabled||(r=e.dataRef.current)!=null&&r.optionsRef.current&&!((o=e.dataRef.current)!=null&&o.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let f=n.focus===ee.Specific?n.idx:Rt(n,{resolveItems:()=>e.virtual.options,resolveActiveIndex:()=>{var b,p;return(p=(b=e.activeOptionIndex)!=null?b:e.virtual.options.findIndex(v=>!e.virtual.disabled(v)))!=null?p:null},resolveDisabled:e.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),h=(i=n.trigger)!=null?i:2;return e.activeOptionIndex===f&&e.activationTrigger===h?e:{...e,activeOptionIndex:f,activationTrigger:h}}let s=Bt(e);if(s.activeOptionIndex===null){let f=s.options.findIndex(h=>!h.dataRef.current.disabled);f!==-1&&(s.activeOptionIndex=f)}let u=n.focus===ee.Specific?n.idx:Rt(n,{resolveItems:()=>s.options,resolveActiveIndex:()=>s.activeOptionIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled}),c=(l=n.trigger)!=null?l: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 i=n.payload,l=Bt(e,u=>(u.push(i),u));e.activeOptionIndex===null&&(r=e.dataRef.current)!=null&&r.isSelected(n.payload.dataRef.current.value)&&(l.activeOptionIndex=l.options.indexOf(i));let s={...e,...l,activationTrigger:2};return(o=e.dataRef.current)!=null&&o.__demoMode&&e.dataRef.current.value===void 0&&(s.activeOptionIndex=0),s},4:(e,n)=>{var t;if((t=e.dataRef.current)!=null&&t.virtual)return{...e,options:e.options.filter(o=>o.id!==n.id)};let r=Bt(e,o=>{let i=o.findIndex(l=>l.id===n.id);return i!==-1&&o.splice(i,1),o});return{...e,...r,activationTrigger:2}},5:(e,n)=>e.labelId===n.id?e:{...e,labelId:n.id},6:(e,n)=>e.activationTrigger===n.trigger?e:{...e,activationTrigger:n.trigger},7:(e,n)=>{var t;if(((t=e.virtual)==null?void 0:t.options)===n.options)return e;let r=e.activeOptionIndex;if(e.activeOptionIndex!==null){let o=n.options.indexOf(e.virtual.options[e.activeOptionIndex]);o!==-1?r=o:r=null}return{...e,activeOptionIndex:r,virtual:Object.assign({},e.virtual,{options:n.options})}}},zt=a.createContext(null);zt.displayName="ComboboxActionsContext";function Je(e){let n=a.useContext(zt);if(n===null){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Je),t}return n}let Nn=a.createContext(null);function vo(e){var n;let t=Le("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]),i=Vr({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}),[l,s]=a.useState(0);return X(()=>{s(u=>u+1)},[(n=t.virtual)==null?void 0:n.options]),a.createElement(Nn.Provider,{value:i},a.createElement("div",{style:{position:"relative",width:"100%",height:`${i.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&&i.scrollToIndex(t.activeOptionIndex)}}},i.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:`${l}-${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 Wt=a.createContext(null);Wt.displayName="ComboboxDataContext";function Le(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,Le),t}return n}function go(e,n){return ae(n.type,ho,e,n)}let bo=a.Fragment;function xo(e,n){let{value:t,defaultValue:r,onChange:o,form:i,name:l,by:s=null,disabled:u=!1,__demoMode:c=!1,nullable:f=!1,multiple:h=!1,immediate:b=!1,virtual:p=null,...v}=e,g=!1,x=null,[E=h?[]:void 0,w]=hn(t,o,r),[C,I]=a.useReducer(go,{dataRef:a.createRef(),comboboxState:c?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),F=a.useRef(!1),k=a.useRef({static:!1,hold:!1}),U=a.useRef(null),q=a.useRef(null),A=a.useRef(null),M=a.useRef(null),R=j(typeof s=="string"?(D,V)=>{let W=s;return(D==null?void 0:D[W])===(V==null?void 0:V[W])}:s??((D,V)=>D===V)),K=j(D=>C.options.findIndex(V=>R(V.dataRef.current.value,D))),z=a.useCallback(D=>ae(y.mode,{1:()=>E.some(V=>R(V,D)),0:()=>R(E,D)}),[E]),$=j(D=>C.activeOptionIndex===K(D)),y=a.useMemo(()=>({...C,immediate:g,optionsPropsRef:k,labelRef:U,inputRef:q,buttonRef:A,optionsRef:M,value:E,defaultValue:r,disabled:u,mode:h?1:0,virtual:C.virtual,get activeOptionIndex(){if(F.current&&C.activeOptionIndex===null&&C.options.length>0){let D=C.options.findIndex(V=>!V.dataRef.current.disabled);if(D!==-1)return D}return C.activeOptionIndex},calculateIndex:K,compare:R,isSelected:z,isActive:$,nullable:f,__demoMode:c}),[E,r,u,h,f,c,C,x]);X(()=>{},[x,void 0]),X(()=>{C.dataRef.current=y},[y]),Mt([y.buttonRef,y.inputRef,y.optionsRef],()=>P.closeCombobox(),y.comboboxState===0);let oe=a.useMemo(()=>{var D,V,W;return{open:y.comboboxState===0,disabled:u,activeIndex:y.activeOptionIndex,activeOption:y.activeOptionIndex===null?null:y.virtual?y.virtual.options[(D=y.activeOptionIndex)!=null?D:0]:(W=(V=y.options[y.activeOptionIndex])==null?void 0:V.dataRef.current.value)!=null?W:null,value:E}},[y,u,E]),B=j(()=>{if(y.activeOptionIndex!==null){if(y.virtual)Te(y.virtual.options[y.activeOptionIndex]);else{let{dataRef:D}=y.options[y.activeOptionIndex];Te(D.current.value)}P.goToOption(ee.Specific,y.activeOptionIndex)}}),ie=j(()=>{I({type:0}),F.current=!0}),Q=j(()=>{I({type:1}),F.current=!1}),te=j((D,V,W)=>(F.current=!1,D===ee.Specific?I({type:2,focus:ee.Specific,idx:V,trigger:W}):I({type:2,focus:D,trigger:W}))),me=j((D,V)=>(I({type:3,payload:{id:D,dataRef:V}}),()=>{y.isActive(V.current.value)&&(F.current=!0),I({type:4,id:D})})),ge=j(D=>(I({type:5,id:D}),()=>I({type:5,id:null}))),Te=j(D=>ae(y.mode,{0(){return w==null?void 0:w(D)},1(){let V=y.value.slice(),W=V.findIndex(pe=>R(pe,D));return W===-1?V.push(D):V.splice(W,1),w==null?void 0:w(V)}})),be=j(D=>{I({type:6,trigger:D})}),P=a.useMemo(()=>({onChange:Te,registerOption:me,registerLabel:ge,goToOption:te,closeCombobox:Q,openCombobox:ie,setActivationTrigger:be,selectActiveOption:B}),[]),Z=n===null?{}:{ref:n},ne=a.useRef(null),we=je();return a.useEffect(()=>{ne.current&&r!==void 0&&we.addEventListener(ne.current,"reset",()=>{w==null||w(r)})},[ne,w]),a.createElement(zt.Provider,{value:P},a.createElement(Wt.Provider,{value:y},a.createElement(_t,{value:ae(y.comboboxState,{0:ce.Open,1:ce.Closed})},l!=null&&E!=null&&$n({[l]:E}).map(([D,V],W)=>a.createElement(Ze,{features:ze.Hidden,ref:W===0?pe=>{var he;ne.current=(he=pe==null?void 0:pe.closest("form"))!=null?he:null}:void 0,...ct({key:D,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:i,disabled:u,name:D,value:V})})),le({ourProps:Z,theirProps:v,slot:oe,defaultTag:bo,name:"Combobox"}))))}let wo="input";function yo(e,n){var t,r,o,i,l;let s=ve(),{id:u=`headlessui-combobox-input-${s}`,onChange:c,displayValue:f,type:h="text",...b}=e,p=Le("Combobox.Input"),v=Je("Combobox.Input"),g=ue(p.inputRef,n),x=De(p.inputRef),E=a.useRef(!1),w=je(),C=j(()=>{v.onChange(null),p.optionsRef.current&&(p.optionsRef.current.scrollTop=0),v.goToOption(ee.Nothing)}),I=function(){var y;return typeof f=="function"&&p.value!==void 0?(y=f(p.value))!=null?y:"":typeof p.value=="string"?p.value:""}();Ke(([y,oe],[B,ie])=>{if(E.current)return;let Q=p.inputRef.current;Q&&((ie===0&&oe===1||y!==B)&&(Q.value=y),requestAnimationFrame(()=>{if(E.current||!Q||(x==null?void 0:x.activeElement)!==Q)return;let{selectionStart:te,selectionEnd:me}=Q;Math.abs((me??0)-(te??0))===0&&te===0&&Q.setSelectionRange(Q.value.length,Q.value.length)}))},[I,p.comboboxState,x]),Ke(([y],[oe])=>{if(y===0&&oe===1){if(E.current)return;let B=p.inputRef.current;if(!B)return;let ie=B.value,{selectionStart:Q,selectionEnd:te,selectionDirection:me}=B;B.value="",B.value=ie,me!==null?B.setSelectionRange(Q,te,me):B.setSelectionRange(Q,te)}},[p.comboboxState]);let F=a.useRef(!1),k=j(()=>{F.current=!0}),U=j(()=>{w.nextFrame(()=>{F.current=!1})}),q=j(y=>{switch(E.current=!0,y.key){case G.Enter:if(E.current=!1,p.comboboxState!==0||F.current)return;if(y.preventDefault(),y.stopPropagation(),p.activeOptionIndex===null){v.closeCombobox();return}v.selectActiveOption(),p.mode===0&&v.closeCombobox();break;case G.ArrowDown:return E.current=!1,y.preventDefault(),y.stopPropagation(),ae(p.comboboxState,{0:()=>v.goToOption(ee.Next),1:()=>v.openCombobox()});case G.ArrowUp:return E.current=!1,y.preventDefault(),y.stopPropagation(),ae(p.comboboxState,{0:()=>v.goToOption(ee.Previous),1:()=>{v.openCombobox(),w.nextFrame(()=>{p.value||v.goToOption(ee.Last)})}});case G.Home:if(y.shiftKey)break;return E.current=!1,y.preventDefault(),y.stopPropagation(),v.goToOption(ee.First);case G.PageUp:return E.current=!1,y.preventDefault(),y.stopPropagation(),v.goToOption(ee.First);case G.End:if(y.shiftKey)break;return E.current=!1,y.preventDefault(),y.stopPropagation(),v.goToOption(ee.Last);case G.PageDown:return E.current=!1,y.preventDefault(),y.stopPropagation(),v.goToOption(ee.Last);case G.Escape:return E.current=!1,p.comboboxState!==0?void 0:(y.preventDefault(),p.optionsRef.current&&!p.optionsPropsRef.current.static&&y.stopPropagation(),p.nullable&&p.mode===0&&p.value===null&&C(),v.closeCombobox());case G.Tab:if(E.current=!1,p.comboboxState!==0)return;p.mode===0&&p.activationTrigger!==1&&v.selectActiveOption(),v.closeCombobox();break}}),A=j(y=>{c==null||c(y),p.nullable&&p.mode===0&&y.target.value===""&&C(),v.openCombobox()}),M=j(y=>{var oe,B,ie;let Q=(oe=y.relatedTarget)!=null?oe:Ce.find(te=>te!==y.currentTarget);if(E.current=!1,!((B=p.optionsRef.current)!=null&&B.contains(Q))&&!((ie=p.buttonRef.current)!=null&&ie.contains(Q))&&p.comboboxState===0)return y.preventDefault(),p.mode===0&&(p.nullable&&p.value===null?C():p.activationTrigger!==1&&v.selectActiveOption()),v.closeCombobox()}),R=j(y=>{var oe,B,ie;let Q=(oe=y.relatedTarget)!=null?oe:Ce.find(te=>te!==y.currentTarget);(B=p.buttonRef.current)!=null&&B.contains(Q)||(ie=p.optionsRef.current)!=null&&ie.contains(Q)||p.disabled||p.immediate&&p.comboboxState!==0&&(v.openCombobox(),w.nextFrame(()=>{v.setActivationTrigger(1)}))}),K=$t(()=>{if(p.labelId)return[p.labelId].join(" ")},[p.labelId]),z=a.useMemo(()=>({open:p.comboboxState===0,disabled:p.disabled}),[p]),$={ref:g,id:u,role:"combobox",type:h,"aria-controls":(t=p.optionsRef.current)==null?void 0:t.id,"aria-expanded":p.comboboxState===0,"aria-activedescendant":p.activeOptionIndex===null?void 0:p.virtual?(r=p.options.find(y=>{var oe;return!((oe=p.virtual)!=null&&oe.disabled(y.dataRef.current.value))&&p.compare(y.dataRef.current.value,p.virtual.options[p.activeOptionIndex])}))==null?void 0:r.id:(o=p.options[p.activeOptionIndex])==null?void 0:o.id,"aria-labelledby":K,"aria-autocomplete":"list",defaultValue:(l=(i=e.defaultValue)!=null?i:p.defaultValue!==void 0?f==null?void 0:f(p.defaultValue):null)!=null?l:p.defaultValue,disabled:p.disabled,onCompositionStart:k,onCompositionEnd:U,onKeyDown:q,onChange:A,onFocus:R,onBlur:M};return le({ourProps:$,theirProps:b,slot:z,defaultTag:wo,name:"Combobox.Input"})}let Eo="button";function So(e,n){var t;let r=Le("Combobox.Button"),o=Je("Combobox.Button"),i=ue(r.buttonRef,n),l=ve(),{id:s=`headlessui-combobox-button-${l}`,...u}=e,c=je(),f=j(g=>{switch(g.key){case G.ArrowDown:return g.preventDefault(),g.stopPropagation(),r.comboboxState===1&&o.openCombobox(),c.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})});case G.ArrowUp:return g.preventDefault(),g.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 G.Escape:return r.comboboxState!==0?void 0:(g.preventDefault(),r.optionsRef.current&&!r.optionsPropsRef.current.static&&g.stopPropagation(),o.closeCombobox(),c.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})}));default:return}}),h=j(g=>{if(dt(g.currentTarget))return g.preventDefault();r.comboboxState===0?o.closeCombobox():(g.preventDefault(),o.openCombobox()),c.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})})}),b=$t(()=>{if(r.labelId)return[r.labelId,s].join(" ")},[r.labelId,s]),p=a.useMemo(()=>({open:r.comboboxState===0,disabled:r.disabled,value:r.value}),[r]),v={ref:i,id:s,type:At(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:f};return le({ourProps:v,theirProps:u,slot:p,defaultTag:Eo,name:"Combobox.Button"})}let To="label";function Co(e,n){let t=ve(),{id:r=`headlessui-combobox-label-${t}`,...o}=e,i=Le("Combobox.Label"),l=Je("Combobox.Label"),s=ue(i.labelRef,n);X(()=>l.registerLabel(r),[r]);let u=j(()=>{var f;return(f=i.inputRef.current)==null?void 0:f.focus({preventScroll:!0})}),c=a.useMemo(()=>({open:i.comboboxState===0,disabled:i.disabled}),[i]);return le({ourProps:{ref:s,id:r,onClick:u},theirProps:o,slot:c,defaultTag:To,name:"Combobox.Label"})}let Oo="ul",jo=Ne.RenderStrategy|Ne.Static;function Io(e,n){let t=ve(),{id:r=`headlessui-combobox-options-${t}`,hold:o=!1,...i}=e,l=Le("Combobox.Options"),s=ue(l.optionsRef,n),u=Qe(),c=u!==null?(u&ce.Open)===ce.Open:l.comboboxState===0;X(()=>{var p;l.optionsPropsRef.current.static=(p=e.static)!=null?p:!1},[l.optionsPropsRef,e.static]),X(()=>{l.optionsPropsRef.current.hold=o},[l.optionsPropsRef,o]),jn({container:l.optionsRef.current,enabled:l.comboboxState===0,accept(p){return p.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:p.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(p){p.setAttribute("role","none")}});let f=$t(()=>{var p,v;return(v=l.labelId)!=null?v:(p=l.buttonRef.current)==null?void 0:p.id},[l.labelId,l.buttonRef.current]),h=a.useMemo(()=>({open:l.comboboxState===0,option:void 0}),[l]),b={"aria-labelledby":f,role:"listbox","aria-multiselectable":l.mode===1?!0:void 0,id:r,ref:s};return l.virtual&&l.comboboxState===0&&Object.assign(i,{children:a.createElement(vo,null,i.children)}),le({ourProps:b,theirProps:i,slot:h,defaultTag:Oo,features:jo,visible:c,name:"Combobox.Options"})}let $o="li";function Fo(e,n){var t;let r=ve(),{id:o=`headlessui-combobox-option-${r}`,disabled:i=!1,value:l,order:s=null,...u}=e,c=Le("Combobox.Option"),f=Je("Combobox.Option"),h=c.virtual?c.activeOptionIndex===c.calculateIndex(l):c.activeOptionIndex===null?!1:((t=c.options[c.activeOptionIndex])==null?void 0:t.id)===o,b=c.isSelected(l),p=a.useRef(null),v=Se({disabled:i,value:l,domRef:p,order:s}),g=a.useContext(Nn),x=ue(n,p,g?g.measureElement:null),E=j(()=>f.onChange(l));X(()=>f.registerOption(o,v),[v,o]);let w=a.useRef(!(c.virtual||c.__demoMode));X(()=>{if(!c.virtual||!c.__demoMode)return;let M=ye();return M.requestAnimationFrame(()=>{w.current=!0}),M.dispose},[c.virtual,c.__demoMode]),X(()=>{if(!w.current||c.comboboxState!==0||!h||c.activationTrigger===0)return;let M=ye();return M.requestAnimationFrame(()=>{var R,K;(K=(R=p.current)==null?void 0:R.scrollIntoView)==null||K.call(R,{block:"nearest"})}),M.dispose},[p,h,c.comboboxState,c.activationTrigger,c.activeOptionIndex]);let C=j(M=>{var R;if(i||(R=c.virtual)!=null&&R.disabled(l))return M.preventDefault();E(),yn()||requestAnimationFrame(()=>{var K;return(K=c.inputRef.current)==null?void 0:K.focus({preventScroll:!0})}),c.mode===0&&requestAnimationFrame(()=>f.closeCombobox())}),I=j(()=>{var M;if(i||(M=c.virtual)!=null&&M.disabled(l))return f.goToOption(ee.Nothing);let R=c.calculateIndex(l);f.goToOption(ee.Specific,R)}),F=On(),k=j(M=>F.update(M)),U=j(M=>{var R;if(!F.wasMoved(M)||i||(R=c.virtual)!=null&&R.disabled(l)||h)return;let K=c.calculateIndex(l);f.goToOption(ee.Specific,K,0)}),q=j(M=>{var R;F.wasMoved(M)&&(i||(R=c.virtual)!=null&&R.disabled(l)||h&&(c.optionsPropsRef.current.hold||f.goToOption(ee.Nothing)))}),A=a.useMemo(()=>({active:h,selected:b,disabled:i}),[h,b,i]);return le({ourProps:{id:o,ref:x,role:"option",tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0?!0:void 0,"aria-selected":b,disabled:void 0,onClick:C,onFocus:I,onPointerEnter:k,onMouseEnter:k,onPointerMove:U,onMouseMove:U,onPointerLeave:q,onMouseLeave:q},theirProps:u,slot:A,defaultTag:$o,name:"Combobox.Option"})}let ko=se(xo),No=se(So),Po=se(yo),Mo=se(Co),Ao=se(Io),Do=se(Fo),$e=Object.assign(ko,{Input:Po,Button:No,Label:Mo,Options:Ao,Option:Do});function Pn(e,n,t,r){let o=Se(t);a.useEffect(()=>{e=e??window;function i(l){o.current(l)}return e.addEventListener(n,i,r),()=>e.removeEventListener(n,i,r)},[e,n,r])}function Xe(){let e=a.useRef(!1);return X(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Mn(e){let n=j(e),t=a.useRef(!1);a.useEffect(()=>(t.current=!1,()=>{t.current=!0,it(()=>{t.current&&n()})}),[n])}var et=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(et||{});function Lo(){let e=a.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 Ro(e,n){let t=a.useRef(null),r=ue(t,n),{initialFocus:o,containers:i,features:l=30,...s}=e;Be()||(l=1);let u=De(t);Wo({ownerDocument:u},!!(l&16));let c=Ho({ownerDocument:u,container:t,initialFocus:o},!!(l&2));Uo({ownerDocument:u,container:t,containers:i,previousActiveElement:c},!!(l&8));let f=Lo(),h=j(g=>{let x=t.current;x&&(E=>E())(()=>{ae(f.current,{[et.Forwards]:()=>{Ge(x,Ie.First,{skipElements:[g.relatedTarget]})},[et.Backwards]:()=>{Ge(x,Ie.Last,{skipElements:[g.relatedTarget]})}})})}),b=je(),p=a.useRef(!1),v={ref:r,onKeyDown(g){g.key=="Tab"&&(p.current=!0,b.requestAnimationFrame(()=>{p.current=!1}))},onBlur(g){let x=An(i);t.current instanceof HTMLElement&&x.add(t.current);let E=g.relatedTarget;E instanceof HTMLElement&&E.dataset.headlessuiFocusGuard!=="true"&&(Ln(x,E)||(p.current?Ge(t.current,ae(f.current,{[et.Forwards]:()=>Ie.Next,[et.Backwards]:()=>Ie.Previous})|Ie.WrapAround,{relativeTo:g.target}):g.target instanceof HTMLElement&&ke(g.target)))}};return a.createElement(a.Fragment,null,!!(l&4)&&a.createElement(Ze,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:ze.Focusable}),le({ourProps:v,theirProps:s,defaultTag:_o,name:"FocusTrap"}),!!(l&4)&&a.createElement(Ze,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:ze.Focusable}))}let Bo=se(Ro),tt=Object.assign(Bo,{features:Dn});function zo(e=!0){let n=a.useRef(Ce.slice());return Ke(([t],[r])=>{r===!0&&t===!1&&it(()=>{n.current.splice(0)}),r===!1&&t===!0&&(n.current=Ce.slice())},[e,Ce,n]),j(()=>{var t;return(t=n.current.find(r=>r!=null&&r.isConnected))!=null?t:null})}function Wo({ownerDocument:e},n){let t=zo(n);Ke(()=>{n||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&ke(t())},[n]),Mn(()=>{n&&ke(t())})}function Ho({ownerDocument:e,container:n,initialFocus:t},r){let o=a.useRef(null),i=Xe();return Ke(()=>{if(!r)return;let l=n.current;l&&it(()=>{if(!i.current)return;let s=e==null?void 0:e.activeElement;if(t!=null&&t.current){if((t==null?void 0:t.current)===s){o.current=s;return}}else if(l.contains(s)){o.current=s;return}t!=null&&t.current?ke(t.current):Ge(l,Ie.First)===gn.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),o.current=e==null?void 0:e.activeElement})},[r]),o}function Uo({ownerDocument:e,container:n,containers:t,previousActiveElement:r},o){let i=Xe();Pn(e==null?void 0:e.defaultView,"focus",l=>{if(!o||!i.current)return;let s=An(t);n.current instanceof HTMLElement&&s.add(n.current);let u=r.current;if(!u)return;let c=l.target;c&&c instanceof HTMLElement?Ln(s,c)?(r.current=c,ke(c)):(l.preventDefault(),l.stopPropagation(),ke(u)):ke(r.current)},!0)}function Ln(e,n){for(let t of e)if(t.contains(n))return!0;return!1}let _n=a.createContext(!1);function Vo(){return a.useContext(_n)}function Ht(e){return a.createElement(_n.Provider,{value:e.force},e.children)}function Yo(e){let n=Vo(),t=a.useContext(Rn),r=De(e),[o,i]=a.useState(()=>{if(!n&&t!==null||Oe.isServer)return null;let l=r==null?void 0:r.getElementById("headlessui-portal-root");if(l)return l;if(r===null)return null;let s=r.createElement("div");return s.setAttribute("id","headlessui-portal-root"),r.body.appendChild(s)});return a.useEffect(()=>{o!==null&&(r!=null&&r.body.contains(o)||r==null||r.body.appendChild(o))},[o,r]),a.useEffect(()=>{n||t!==null&&i(t.current)},[t,i,n]),o}let qo=a.Fragment;function Go(e,n){let t=e,r=a.useRef(null),o=ue(no(f=>{r.current=f}),n),i=De(r),l=Yo(r),[s]=a.useState(()=>{var f;return Oe.isServer?null:(f=i==null?void 0:i.createElement("div"))!=null?f:null}),u=a.useContext(Ut),c=Be();return X(()=>{!l||!s||l.contains(s)||(s.setAttribute("data-headlessui-portal",""),l.appendChild(s))},[l,s]),X(()=>{if(s&&u)return u.register(s)},[u,s]),Mn(()=>{var f;!l||!s||(s instanceof Node&&l.contains(s)&&l.removeChild(s),l.childNodes.length<=0&&((f=l.parentElement)==null||f.removeChild(l)))}),c?!l||!s?null:un.createPortal(le({ourProps:{ref:o},theirProps:t,defaultTag:qo,name:"Portal"}),s):null}let Ko=a.Fragment,Rn=a.createContext(null);function Zo(e,n){let{target:t,...r}=e,o={ref:ue(n)};return a.createElement(Rn.Provider,{value:t},le({ourProps:o,theirProps:r,defaultTag:Ko,name:"Popover.Group"}))}let Ut=a.createContext(null);function Qo(){let e=a.useContext(Ut),n=a.useRef([]),t=j(i=>(n.current.push(i),e&&e.register(i),()=>r(i))),r=j(i=>{let l=n.current.indexOf(i);l!==-1&&n.current.splice(l,1),e&&e.unregister(i)}),o=a.useMemo(()=>({register:t,unregister:r,portals:n}),[t,r,n]);return[n,a.useMemo(()=>function({children:i}){return a.createElement(Ut.Provider,{value:o},i)},[o])]}let Jo=se(Go),Xo=se(Zo),Vt=Object.assign(Jo,{Group:Xo});function ei(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}const ti=typeof Object.is=="function"?Object.is:ei,{useState:ni,useEffect:ri,useLayoutEffect:oi,useDebugValue:ii}=T;function li(e,n,t){const r=n(),[{inst:o},i]=ni({inst:{value:r,getSnapshot:n}});return oi(()=>{o.value=r,o.getSnapshot=n,Yt(o)&&i({inst:o})},[e,r,n]),ri(()=>(Yt(o)&&i({inst:o}),e(()=>{Yt(o)&&i({inst:o})})),[e]),ii(r),r}function Yt(e){const n=e.getSnapshot,t=e.value;try{const r=n();return!ti(t,r)}catch{return!0}}function si(e,n,t){return n()}const ai=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ui=!ai,ci=ui?si:li,di="useSyncExternalStore"in T?(e=>e.useSyncExternalStore)(T):ci;function fi(e){return di(e.subscribe,e.getSnapshot,e.getSnapshot)}function mi(e,n){let t=e(),r=new Set;return{getSnapshot(){return t},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...i){let l=n[o].call(t,...i);l&&(t=l,r.forEach(s=>s()))}}}function pi(){let e;return{before({doc:n}){var t;let r=n.documentElement;e=((t=n.defaultView)!=null?t:window).innerWidth-r.clientWidth},after({doc:n,d:t}){let r=n.documentElement,o=r.clientWidth-r.offsetWidth,i=e-o;t.style(r,"paddingRight",`${i}px`)}}}function hi(){return wn()?{before({doc:e,d:n,meta:t}){function r(o){return t.containers.flatMap(i=>i()).some(i=>i.contains(o))}n.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let s=ye();s.style(e.documentElement,"scrollBehavior","auto"),n.add(()=>n.microTask(()=>s.dispose()))}let i=(o=window.scrollY)!=null?o:window.pageYOffset,l=null;n.addEventListener(e,"click",s=>{if(s.target instanceof HTMLElement)try{let u=s.target.closest("a");if(!u)return;let{hash:c}=new URL(u.href),f=e.querySelector(c);f&&!r(f)&&(l=f)}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;i!==u&&window.scrollTo(0,i),l&&l.isConnected&&(l.scrollIntoView({block:"nearest"}),l=null)})})}}:{}}function vi(){return{before({doc:e,d:n}){n.style(e.documentElement,"overflow","hidden")}}}function gi(e){let n={};for(let t of e)Object.assign(n,t(n));return n}let _e=mi(()=>new Map,{PUSH(e,n){var t;let r=(t=this.get(e))!=null?t:{doc:e,count:0,d:ye(),meta:new Set};return r.count++,r.meta.add(n),this.set(e,r),this},POP(e,n){let t=this.get(e);return t&&(t.count--,t.meta.delete(n)),this},SCROLL_PREVENT({doc:e,d:n,meta:t}){let r={doc:e,d:n,meta:gi(t)},o=[hi(),pi(),vi()];o.forEach(({before:i})=>i==null?void 0:i(r)),o.forEach(({after:i})=>i==null?void 0:i(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});_e.subscribe(()=>{let e=_e.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)&&_e.dispatch(t.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",t),t.count===0&&_e.dispatch("TEARDOWN",t)}});function bi(e,n,t){let r=fi(_e),o=e?r.get(e):void 0,i=o?o.count>0:!1;return X(()=>{if(!(!e||!n))return _e.dispatch("PUSH",e,t),()=>_e.dispatch("POP",e,t)},[n,e]),i}let qt=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 l;if(!r)return;let s=(l=nt.get(r))!=null?l:1;if(s===1?nt.delete(r):nt.set(r,s-1),s!==1)return;let u=qt.get(r);u&&(u["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",u["aria-hidden"]),r.inert=u.inert,qt.delete(r))}let i=(t=nt.get(r))!=null?t:0;return nt.set(r,i+1),i!==0||(qt.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),o},[e,n])}function xi({defaultContainers:e=[],portals:n,mainTreeNodeRef:t}={}){var r;let o=a.useRef((r=t==null?void 0:t.current)!=null?r:null),i=De(o),l=j(()=>{var s,u,c;let f=[];for(let h of e)h!==null&&(h instanceof HTMLElement?f.push(h):"current"in h&&h.current instanceof HTMLElement&&f.push(h.current));if(n!=null&&n.current)for(let h of n.current)f.push(h);for(let h of(s=i==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?s:[])h!==document.body&&h!==document.head&&h instanceof HTMLElement&&h.id!=="headlessui-portal-root"&&(h.contains(o.current)||h.contains((c=(u=o.current)==null?void 0:u.getRootNode())==null?void 0:c.host)||f.some(b=>h.contains(b))||f.push(h));return f});return{resolveContainers:l,contains:j(s=>l().some(u=>u.contains(s))),mainTreeNodeRef:o,MainTreeNode:a.useMemo(()=>function(){return t!=null?null:a.createElement(Ze,{features:ze.Hidden,ref:o})},[o,t])}}let Gt=a.createContext(()=>{});Gt.displayName="StackContext";var Kt=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Kt||{});function wi(){return a.useContext(Gt)}function yi({children:e,onUpdate:n,type:t,element:r,enabled:o}){let i=wi(),l=j((...s)=>{n==null||n(...s),i(...s)});return X(()=>{let s=o===void 0||o===!0;return s&&l(0,t,r),()=>{s&&l(1,t,r)}},[l,t,r,o]),a.createElement(Gt.Provider,{value:l},e)}let zn=a.createContext(null);function Wn(){let e=a.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 Hn(){let[e,n]=a.useState([]);return[e.length>0?e.join(" "):void 0,a.useMemo(()=>function(t){let r=j(i=>(n(l=>[...l,i]),()=>n(l=>{let s=l.slice(),u=s.indexOf(i);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(zn.Provider,{value:o},t.children)},[n])]}let Ei="p";function Si(e,n){let t=ve(),{id:r=`headlessui-description-${t}`,...o}=e,i=Wn(),l=ue(n);X(()=>i.register(r),[r,i.register]);let s={ref:l,...i.props,id:r};return le({ourProps:s,theirProps:o,slot:i.slot||{},defaultTag:Ei,name:i.name||"Description"})}let Ti=se(Si),Un=Object.assign(Ti,{});var Ci=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ci||{}),Oi=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(Oi||{});let ji={0(e,n){return e.titleId===n.id?e:{...e,titleId:n.id}}},ft=a.createContext(null);ft.displayName="DialogContext";function rt(e){let n=a.useContext(ft);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 Ii(e,n,t=()=>[document.body]){bi(e,n,r=>{var o;return{containers:[...(o=r.containers)!=null?o:[],t]}})}function $i(e,n){return ae(n.type,ji,e,n)}let Fi="div",ki=Ne.RenderStrategy|Ne.Static;function Ni(e,n){let t=ve(),{id:r=`headlessui-dialog-${t}`,open:o,onClose:i,initialFocus:l,role:s="dialog",__demoMode:u=!1,...c}=e,[f,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 p=Qe();o===void 0&&p!==null&&(o=(p&ce.Open)===ce.Open);let v=a.useRef(null),g=ue(v,n),x=De(v),E=e.hasOwnProperty("open")||p!==null,w=e.hasOwnProperty("onClose");if(!E&&!w)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!E)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!w)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof o!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${o}`);if(typeof i!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${i}`);let C=o?0:1,[I,F]=a.useReducer($i,{titleId:null,descriptionId:null,panelRef:a.createRef()}),k=j(()=>i(!1)),U=j(W=>F({type:0,id:W})),q=Be()?u?!1:C===0:!1,A=f>1,M=a.useContext(ft)!==null,[R,K]=Qo(),z={get current(){var W;return(W=I.panelRef.current)!=null?W:v.current}},{resolveContainers:$,mainTreeNodeRef:y,MainTreeNode:oe}=xi({portals:R,defaultContainers:[z]}),B=A?"parent":"leaf",ie=p!==null?(p&ce.Closing)===ce.Closing:!1,Q=M||ie?!1:q,te=a.useCallback(()=>{var W,pe;return(pe=Array.from((W=x==null?void 0:x.querySelectorAll("body > *"))!=null?W:[]).find(he=>he.id==="headlessui-portal-root"?!1:he.contains(y.current)&&he instanceof HTMLElement))!=null?pe:null},[y]);Bn(te,Q);let me=A?!0:q,ge=a.useCallback(()=>{var W,pe;return(pe=Array.from((W=x==null?void 0:x.querySelectorAll("[data-headlessui-portal]"))!=null?W:[]).find(he=>he.contains(y.current)&&he instanceof HTMLElement))!=null?pe:null},[y]);Bn(ge,me),Mt($,W=>{W.preventDefault(),k()},!(!q||A));let be=!(A||C!==0);Pn(x==null?void 0:x.defaultView,"keydown",W=>{be&&(W.defaultPrevented||W.key===G.Escape&&(W.preventDefault(),W.stopPropagation(),k()))}),Ii(x,!(ie||C!==0||M),$),a.useEffect(()=>{if(C!==0||!v.current)return;let W=new ResizeObserver(pe=>{for(let he of pe){let We=he.target.getBoundingClientRect();We.x===0&&We.y===0&&We.width===0&&We.height===0&&k()}});return W.observe(v.current),()=>W.disconnect()},[C,v,k]);let[Z,ne]=Hn(),we=a.useMemo(()=>[{dialogState:C,close:k,setTitleId:U},I],[C,I,k,U]),D=a.useMemo(()=>({open:C===0}),[C]),V={ref:g,id:r,role:s,"aria-modal":C===0?!0:void 0,"aria-labelledby":I.titleId,"aria-describedby":Z};return a.createElement(yi,{type:"Dialog",enabled:C===0,element:v,onUpdate:j((W,pe)=>{pe==="Dialog"&&ae(W,{[Kt.Add]:()=>h(he=>he+1),[Kt.Remove]:()=>h(he=>he-1)})})},a.createElement(Ht,{force:!0},a.createElement(Vt,null,a.createElement(ft.Provider,{value:we},a.createElement(Vt.Group,{target:v},a.createElement(Ht,{force:!1},a.createElement(ne,{slot:D,name:"Dialog.Description"},a.createElement(tt,{initialFocus:l,containers:$,features:q?ae(B,{parent:tt.features.RestoreFocus,leaf:tt.features.All&~tt.features.FocusLock}):tt.features.None},a.createElement(K,null,le({ourProps:V,theirProps:c,slot:D,defaultTag:Fi,features:ki,visible:C===0,name:"Dialog"}))))))))),a.createElement(oe,null))}let Pi="div";function Mi(e,n){let t=ve(),{id:r=`headlessui-dialog-overlay-${t}`,...o}=e,[{dialogState:i,close:l}]=rt("Dialog.Overlay"),s=ue(n),u=j(f=>{if(f.target===f.currentTarget){if(dt(f.currentTarget))return f.preventDefault();f.preventDefault(),f.stopPropagation(),l()}}),c=a.useMemo(()=>({open:i===0}),[i]);return le({ourProps:{ref:s,id:r,"aria-hidden":!0,onClick:u},theirProps:o,slot:c,defaultTag:Pi,name:"Dialog.Overlay"})}let Ai="div";function Di(e,n){let t=ve(),{id:r=`headlessui-dialog-backdrop-${t}`,...o}=e,[{dialogState:i},l]=rt("Dialog.Backdrop"),s=ue(n);a.useEffect(()=>{if(l.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[l.panelRef]);let u=a.useMemo(()=>({open:i===0}),[i]);return a.createElement(Ht,{force:!0},a.createElement(Vt,null,le({ourProps:{ref:s,id:r,"aria-hidden":!0},theirProps:o,slot:u,defaultTag:Ai,name:"Dialog.Backdrop"})))}let Li="div";function _i(e,n){let t=ve(),{id:r=`headlessui-dialog-panel-${t}`,...o}=e,[{dialogState:i},l]=rt("Dialog.Panel"),s=ue(n,l.panelRef),u=a.useMemo(()=>({open:i===0}),[i]),c=j(f=>{f.stopPropagation()});return le({ourProps:{ref:s,id:r,onClick:c},theirProps:o,slot:u,defaultTag:Li,name:"Dialog.Panel"})}let Ri="h2";function Bi(e,n){let t=ve(),{id:r=`headlessui-dialog-title-${t}`,...o}=e,[{dialogState:i,setTitleId:l}]=rt("Dialog.Title"),s=ue(n);a.useEffect(()=>(l(r),()=>l(null)),[r,l]);let u=a.useMemo(()=>({open:i===0}),[i]);return le({ourProps:{ref:s,id:r},theirProps:o,slot:u,defaultTag:Ri,name:"Dialog.Title"})}let zi=se(Ni),Wi=se(Di),Hi=se(_i),Ui=se(Mi),Vi=se(Bi),Vn=Object.assign(zi,{Backdrop:Wi,Panel:Hi,Overlay:Ui,Title:Vi,Description:Un}),Yn=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function qn(e){var n,t;let r=(n=e.innerText)!=null?n:"",o=e.cloneNode(!0);if(!(o instanceof HTMLElement))return r;let i=!1;for(let s of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),i=!0;let l=i?(t=o.innerText)!=null?t:"":r;return Yn.test(l)&&(l=l.replace(Yn,"")),l}function Yi(e){let n=e.getAttribute("aria-label");if(typeof n=="string")return n.trim();let t=e.getAttribute("aria-labelledby");if(t){let r=t.split(" ").map(o=>{let i=document.getElementById(o);if(i){let l=i.getAttribute("aria-label");return typeof l=="string"?l.trim():qn(i).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return qn(e).trim()}function qi(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 i=Yi(r).trim().toLowerCase();return n.current=o,t.current=i,i})}var Gi=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Gi||{}),Ki=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Ki||{}),Zi=(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))(Zi||{});function Zt(e,n=t=>t){let t=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,r=Pt(n(e.items.slice()),i=>i.dataRef.current.domRef.current),o=t?r.indexOf(t):null;return o===-1&&(o=null),{items:r,activeItemIndex:o}}let Qi={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=Rt(n,{resolveItems:()=>r.items,resolveActiveIndex:()=>r.activeItemIndex,resolveId:i=>i.id,resolveDisabled:i=>i.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeItemIndex:o,activationTrigger:(t=n.trigger)!=null?t:1}},3:(e,n)=>{let t=e.searchQuery!==""?0:1,r=e.searchQuery+n.value.toLowerCase(),o=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+t).concat(e.items.slice(0,e.activeItemIndex+t)):e.items).find(l=>{var s;return((s=l.dataRef.current.textValue)==null?void 0:s.startsWith(r))&&!l.dataRef.current.disabled}),i=o?e.items.indexOf(o):-1;return i===-1||i===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:i,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,n)=>{let t=Zt(e,r=>[...r,{id:n.id,dataRef:n.dataRef}]);return{...e,...t}},6:(e,n)=>{let t=Zt(e,r=>{let o=r.findIndex(i=>i.id===n.id);return o!==-1&&r.splice(o,1),r});return{...e,...t,activationTrigger:1}}},Qt=a.createContext(null);Qt.displayName="MenuContext";function mt(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,mt),t}return n}function Ji(e,n){return ae(n.type,Qi,e,n)}let Xi=a.Fragment;function el(e,n){let{__demoMode:t=!1,...r}=e,o=a.useReducer(Ji,{__demoMode:t,menuState:t?0:1,buttonRef:a.createRef(),itemsRef:a.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:i,itemsRef:l,buttonRef:s},u]=o,c=ue(n);Mt([s,l],(p,v)=>{var g;u({type:1}),Nt(v,kt.Loose)||(p.preventDefault(),(g=s.current)==null||g.focus())},i===0);let f=j(()=>{u({type:1})}),h=a.useMemo(()=>({open:i===0,close:f}),[i,f]),b={ref:c};return a.createElement(Qt.Provider,{value:o},a.createElement(_t,{value:ae(i,{0:ce.Open,1:ce.Closed})},le({ourProps:b,theirProps:r,slot:h,defaultTag:Xi,name:"Menu"})))}let tl="button";function nl(e,n){var t;let r=ve(),{id:o=`headlessui-menu-button-${r}`,...i}=e,[l,s]=mt("Menu.Button"),u=ue(l.buttonRef,n),c=je(),f=j(g=>{switch(g.key){case G.Space:case G.Enter:case G.ArrowDown:g.preventDefault(),g.stopPropagation(),s({type:0}),c.nextFrame(()=>s({type:2,focus:ee.First}));break;case G.ArrowUp:g.preventDefault(),g.stopPropagation(),s({type:0}),c.nextFrame(()=>s({type:2,focus:ee.Last}));break}}),h=j(g=>{switch(g.key){case G.Space:g.preventDefault();break}}),b=j(g=>{if(dt(g.currentTarget))return g.preventDefault();e.disabled||(l.menuState===0?(s({type:1}),c.nextFrame(()=>{var x;return(x=l.buttonRef.current)==null?void 0:x.focus({preventScroll:!0})})):(g.preventDefault(),s({type:0})))}),p=a.useMemo(()=>({open:l.menuState===0}),[l]),v={ref:u,id:o,type:At(e,l.buttonRef),"aria-haspopup":"menu","aria-controls":(t=l.itemsRef.current)==null?void 0:t.id,"aria-expanded":l.menuState===0,onKeyDown:f,onKeyUp:h,onClick:b};return le({ourProps:v,theirProps:i,slot:p,defaultTag:tl,name:"Menu.Button"})}let rl="div",ol=Ne.RenderStrategy|Ne.Static;function il(e,n){var t,r;let o=ve(),{id:i=`headlessui-menu-items-${o}`,...l}=e,[s,u]=mt("Menu.Items"),c=ue(s.itemsRef,n),f=De(s.itemsRef),h=je(),b=Qe(),p=b!==null?(b&ce.Open)===ce.Open:s.menuState===0;a.useEffect(()=>{let w=s.itemsRef.current;w&&s.menuState===0&&w!==(f==null?void 0:f.activeElement)&&w.focus({preventScroll:!0})},[s.menuState,s.itemsRef,f]),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 v=j(w=>{var C,I;switch(h.dispose(),w.key){case G.Space:if(s.searchQuery!=="")return w.preventDefault(),w.stopPropagation(),u({type:3,value:w.key});case G.Enter:if(w.preventDefault(),w.stopPropagation(),u({type:1}),s.activeItemIndex!==null){let{dataRef:F}=s.items[s.activeItemIndex];(I=(C=F.current)==null?void 0:C.domRef.current)==null||I.click()}xn(s.buttonRef.current);break;case G.ArrowDown:return w.preventDefault(),w.stopPropagation(),u({type:2,focus:ee.Next});case G.ArrowUp:return w.preventDefault(),w.stopPropagation(),u({type:2,focus:ee.Previous});case G.Home:case G.PageUp:return w.preventDefault(),w.stopPropagation(),u({type:2,focus:ee.First});case G.End:case G.PageDown:return w.preventDefault(),w.stopPropagation(),u({type:2,focus:ee.Last});case G.Escape:w.preventDefault(),w.stopPropagation(),u({type:1}),ye().nextFrame(()=>{var F;return(F=s.buttonRef.current)==null?void 0:F.focus({preventScroll:!0})});break;case G.Tab:w.preventDefault(),w.stopPropagation(),u({type:1}),ye().nextFrame(()=>{eo(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}}),g=j(w=>{switch(w.key){case G.Space:w.preventDefault();break}}),x=a.useMemo(()=>({open:s.menuState===0}),[s]),E={"aria-activedescendant":s.activeItemIndex===null||(t=s.items[s.activeItemIndex])==null?void 0:t.id,"aria-labelledby":(r=s.buttonRef.current)==null?void 0:r.id,id:i,onKeyDown:v,onKeyUp:g,role:"menu",tabIndex:0,ref:c};return le({ourProps:E,theirProps:l,slot:x,defaultTag:rl,features:ol,visible:p,name:"Menu.Items"})}let ll=a.Fragment;function sl(e,n){let t=ve(),{id:r=`headlessui-menu-item-${t}`,disabled:o=!1,...i}=e,[l,s]=mt("Menu.Item"),u=l.activeItemIndex!==null?l.items[l.activeItemIndex].id===r:!1,c=a.useRef(null),f=ue(n,c);X(()=>{if(l.__demoMode||l.menuState!==0||!u||l.activationTrigger===0)return;let F=ye();return F.requestAnimationFrame(()=>{var k,U;(U=(k=c.current)==null?void 0:k.scrollIntoView)==null||U.call(k,{block:"nearest"})}),F.dispose},[l.__demoMode,c,u,l.menuState,l.activationTrigger,l.activeItemIndex]);let h=qi(c),b=a.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 p=j(()=>{s({type:1})}),v=j(F=>{if(o)return F.preventDefault();s({type:1}),xn(l.buttonRef.current)}),g=j(()=>{if(o)return s({type:2,focus:ee.Nothing});s({type:2,focus:ee.Specific,id:r})}),x=On(),E=j(F=>x.update(F)),w=j(F=>{x.wasMoved(F)&&(o||u||s({type:2,focus:ee.Specific,id:r,trigger:0}))}),C=j(F=>{x.wasMoved(F)&&(o||u&&s({type:2,focus:ee.Nothing}))}),I=a.useMemo(()=>({active:u,disabled:o,close:p}),[u,o,p]);return le({ourProps:{id:r,ref:f,role:"menuitem",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,disabled:void 0,onClick:v,onFocus:g,onPointerEnter:E,onMouseEnter:E,onPointerMove:w,onMouseMove:w,onPointerLeave:C,onMouseLeave:C},theirProps:i,slot:I,defaultTag:ll,name:"Menu.Item"})}let al=se(el),ul=se(nl),cl=se(il),dl=se(sl),pt=Object.assign(al,{Button:ul,Items:cl,Item:dl}),Gn=a.createContext(null);function Kn(){let e=a.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,Kn),n}return e}function fl(){let[e,n]=a.useState([]);return[e.length>0?e.join(" "):void 0,a.useMemo(()=>function(t){let r=j(i=>(n(l=>[...l,i]),()=>n(l=>{let s=l.slice(),u=s.indexOf(i);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(Gn.Provider,{value:o},t.children)},[n])]}let ml="label";function pl(e,n){let t=ve(),{id:r=`headlessui-label-${t}`,passive:o=!1,...i}=e,l=Kn(),s=ue(n);X(()=>l.register(r),[r,l.register]);let u={ref:s,...l.props,id:r};return o&&("onClick"in u&&(delete u.htmlFor,delete u.onClick),"onClick"in i&&delete i.onClick),le({ourProps:u,theirProps:i,slot:l.slot||{},defaultTag:ml,name:l.name||"Label"})}let hl=se(pl),vl=Object.assign(hl,{});function gl(e=0){let[n,t]=a.useState(e),r=Xe(),o=a.useCallback(u=>{r.current&&t(c=>c|u)},[n,r]),i=a.useCallback(u=>!!(n&u),[n]),l=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:i,removeFlag:l,toggleFlag:s}}let Jt=a.createContext(null);Jt.displayName="GroupContext";let bl=a.Fragment;function xl(e){var n;let[t,r]=a.useState(null),[o,i]=fl(),[l,s]=Hn(),u=a.useMemo(()=>({switch:t,setSwitch:r,labelledby:o,describedby:l}),[t,r,o,l]),c={},f=e;return a.createElement(s,{name:"Switch.Description"},a.createElement(i,{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(Jt.Provider,{value:u},le({ourProps:c,theirProps:f,defaultTag:bl,name:"Switch.Group"}))))}let wl="button";function yl(e,n){var t;let r=ve(),{id:o=`headlessui-switch-${r}`,checked:i,defaultChecked:l=!1,onChange:s,disabled:u=!1,name:c,value:f,form:h,...b}=e,p=a.useContext(Jt),v=a.useRef(null),g=ue(v,n,p===null?null:p.setSwitch),[x,E]=hn(i,s,l),w=j(()=>E==null?void 0:E(!x)),C=j(A=>{if(dt(A.currentTarget))return A.preventDefault();A.preventDefault(),w()}),I=j(A=>{A.key===G.Space?(A.preventDefault(),w()):A.key===G.Enter&&uo(A.currentTarget)}),F=j(A=>A.preventDefault()),k=a.useMemo(()=>({checked:x}),[x]),U={id:o,ref:g,role:"switch",type:At(e,v),tabIndex:e.tabIndex===-1?0:(t=e.tabIndex)!=null?t:0,"aria-checked":x,"aria-labelledby":p==null?void 0:p.labelledby,"aria-describedby":p==null?void 0:p.describedby,disabled:u,onClick:C,onKeyUp:I,onKeyPress:F},q=je();return a.useEffect(()=>{var A;let M=(A=v.current)==null?void 0:A.closest("form");M&&l!==void 0&&q.addEventListener(M,"reset",()=>{E(l)})},[v,E]),a.createElement(a.Fragment,null,c!=null&&x&&a.createElement(Ze,{features:ze.Hidden,...ct({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:u,form:h,checked:x,name:c,value:f})}),le({ourProps:U,theirProps:b,slot:k,defaultTag:wl,name:"Switch"}))}let El=se(yl),Sl=xl,Tl=Object.assign(El,{Group:Sl,Label:vl,Description:Un});function Cl(e){let n={called:!1};return(...t)=>{if(!n.called)return n.called=!0,e(...t)}}function Xt(e,...n){e&&n.length>0&&e.classList.add(...n)}function en(e,...n){e&&n.length>0&&e.classList.remove(...n)}function Ol(e,n){let t=ye();if(!e)return t.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[i,l]=[r,o].map(u=>{let[c=0]=u.split(",").filter(Boolean).map(f=>f.includes("ms")?parseFloat(f):parseFloat(f)*1e3).sort((f,h)=>h-f);return c}),s=i+l;if(s!==0){t.group(c=>{c.setTimeout(()=>{n(),c.dispose()},s),c.addEventListener(e,"transitionrun",f=>{f.target===f.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 jl(e,n,t,r){let o=t?"enter":"leave",i=ye(),l=r!==void 0?Cl(r):()=>{};o==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let s=ae(o,{enter:()=>n.enter,leave:()=>n.leave}),u=ae(o,{enter:()=>n.enterTo,leave:()=>n.leaveTo}),c=ae(o,{enter:()=>n.enterFrom,leave:()=>n.leaveFrom});return en(e,...n.base,...n.enter,...n.enterTo,...n.enterFrom,...n.leave,...n.leaveFrom,...n.leaveTo,...n.entered),Xt(e,...n.base,...s,...c),i.nextFrame(()=>{en(e,...n.base,...s,...c),Xt(e,...n.base,...s,...u),Ol(e,()=>(en(e,...n.base,...s),Xt(e,...n.base,...n.entered),l()))}),i.dispose}function Il({immediate:e,container:n,direction:t,classes:r,onStart:o,onStop:i}){let l=Xe(),s=je(),u=Se(t);X(()=>{e&&(u.current="enter")},[e]),X(()=>{let c=ye();s.add(c.dispose);let f=n.current;if(f&&u.current!=="idle"&&l.current)return c.dispose(),o.current(u.current),c.add(jl(f,r.current,u.current==="enter",()=>{c.dispose(),i.current(u.current)})),c.dispose},[t])}function Me(e=""){return e.split(/\s+/).filter(n=>n.length>1)}let ht=a.createContext(null);ht.displayName="TransitionContext";var $l=(e=>(e.Visible="visible",e.Hidden="hidden",e))($l||{});function Fl(){let e=a.useContext(ht);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function kl(){let e=a.useContext(vt);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let vt=a.createContext(null);vt.displayName="NestingContext";function gt(e){return"children"in e?gt(e.children):e.current.filter(({el:n})=>n.current!==null).filter(({state:n})=>n==="visible").length>0}function Zn(e,n){let t=Se(e),r=a.useRef([]),o=Xe(),i=je(),l=j((p,v=Pe.Hidden)=>{let g=r.current.findIndex(({el:x})=>x===p);g!==-1&&(ae(v,{[Pe.Unmount](){r.current.splice(g,1)},[Pe.Hidden](){r.current[g].state="hidden"}}),i.microTask(()=>{var x;!gt(r)&&o.current&&((x=t.current)==null||x.call(t))}))}),s=j(p=>{let v=r.current.find(({el:g})=>g===p);return v?v.state!=="visible"&&(v.state="visible"):r.current.push({el:p,state:"visible"}),()=>l(p,Pe.Unmount)}),u=a.useRef([]),c=a.useRef(Promise.resolve()),f=a.useRef({enter:[],leave:[],idle:[]}),h=j((p,v,g)=>{u.current.splice(0),n&&(n.chains.current[v]=n.chains.current[v].filter(([x])=>x!==p)),n==null||n.chains.current[v].push([p,new Promise(x=>{u.current.push(x)})]),n==null||n.chains.current[v].push([p,new Promise(x=>{Promise.all(f.current[v].map(([E,w])=>w)).then(()=>x())})]),v==="enter"?c.current=c.current.then(()=>n==null?void 0:n.wait.current).then(()=>g(v)):g(v)}),b=j((p,v,g)=>{Promise.all(f.current[v].splice(0).map(([x,E])=>E)).then(()=>{var x;(x=u.current.shift())==null||x()}).then(()=>g(v))});return a.useMemo(()=>({children:r,register:s,unregister:l,onStart:h,onStop:b,wait:c,chains:f}),[s,l,r,h,b,f,c])}function Nl(){}let Pl=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Qn(e){var n;let t={};for(let r of Pl)t[r]=(n=e[r])!=null?n:Nl;return t}function Ml(e){let n=a.useRef(Qn(e));return a.useEffect(()=>{n.current=Qn(e)},[e]),n}let Al="div",Jn=Ne.RenderStrategy;function Dl(e,n){var t,r;let{beforeEnter:o,afterEnter:i,beforeLeave:l,afterLeave:s,enter:u,enterFrom:c,enterTo:f,entered:h,leave:b,leaveFrom:p,leaveTo:v,...g}=e,x=a.useRef(null),E=ue(x,n),w=(t=g.unmount)==null||t?Pe.Unmount:Pe.Hidden,{show:C,appear:I,initial:F}=Fl(),[k,U]=a.useState(C?"visible":"hidden"),q=kl(),{register:A,unregister:M}=q;a.useEffect(()=>A(x),[A,x]),a.useEffect(()=>{if(w===Pe.Hidden&&x.current){if(C&&k!=="visible"){U("visible");return}return ae(k,{hidden:()=>M(x),visible:()=>A(x)})}},[k,x,A,M,C,w]);let R=Se({base:Me(g.className),enter:Me(u),enterFrom:Me(c),enterTo:Me(f),entered:Me(h),leave:Me(b),leaveFrom:Me(p),leaveTo:Me(v)}),K=Ml({beforeEnter:o,afterEnter:i,beforeLeave:l,afterLeave:s}),z=Be();a.useEffect(()=>{if(z&&k==="visible"&&x.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[x,k,z]);let $=F&&!I,y=I&&C&&F,oe=!z||$?"idle":C?"enter":"leave",B=gl(0),ie=j(be=>ae(be,{enter:()=>{B.addFlag(ce.Opening),K.current.beforeEnter()},leave:()=>{B.addFlag(ce.Closing),K.current.beforeLeave()},idle:()=>{}})),Q=j(be=>ae(be,{enter:()=>{B.removeFlag(ce.Opening),K.current.afterEnter()},leave:()=>{B.removeFlag(ce.Closing),K.current.afterLeave()},idle:()=>{}})),te=Zn(()=>{U("hidden"),M(x)},q),me=a.useRef(!1);Il({immediate:y,container:x,classes:R,direction:oe,onStart:Se(be=>{me.current=!0,te.onStart(x,be,ie)}),onStop:Se(be=>{me.current=!1,te.onStop(x,be,Q),be==="leave"&&!gt(te)&&(U("hidden"),M(x))})});let ge=g,Te={ref:E};return y?ge={...ge,className:at(g.className,...R.current.enter,...R.current.enterFrom)}:me.current&&(ge.className=at(g.className,(r=x.current)==null?void 0:r.className),ge.className===""&&delete ge.className),a.createElement(vt.Provider,{value:te},a.createElement(_t,{value:ae(k,{visible:ce.Open,hidden:ce.Closed})|B.flags},le({ourProps:Te,theirProps:ge,defaultTag:Al,features:Jn,visible:k==="visible",name:"Transition.Child"})))}function Ll(e,n){let{show:t,appear:r=!1,unmount:o=!0,...i}=e,l=a.useRef(null),s=ue(l,n);Be();let u=Qe();if(t===void 0&&u!==null&&(t=(u&ce.Open)===ce.Open),![!0,!1].includes(t))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,f]=a.useState(t?"visible":"hidden"),h=Zn(()=>{f("hidden")}),[b,p]=a.useState(!0),v=a.useRef([t]);X(()=>{b!==!1&&v.current[v.current.length-1]!==t&&(v.current.push(t),p(!1))},[v,t]);let g=a.useMemo(()=>({show:t,appear:r,initial:b}),[t,r,b]);a.useEffect(()=>{if(t)f("visible");else if(!gt(h))f("hidden");else{let C=l.current;if(!C)return;let I=C.getBoundingClientRect();I.x===0&&I.y===0&&I.width===0&&I.height===0&&f("hidden")}},[t,h]);let x={unmount:o},E=j(()=>{var C;b&&p(!1),(C=e.beforeEnter)==null||C.call(e)}),w=j(()=>{var C;b&&p(!1),(C=e.beforeLeave)==null||C.call(e)});return a.createElement(vt.Provider,{value:h},a.createElement(ht.Provider,{value:g},le({ourProps:{...x,as:a.Fragment,children:a.createElement(Xn,{ref:s,...x,...i,beforeEnter:E,beforeLeave:w})},theirProps:{},defaultTag:a.Fragment,features:Jn,visible:c==="visible",name:"Transition"})))}function _l(e,n){let t=a.useContext(ht)!==null,r=Qe()!==null;return a.createElement(a.Fragment,null,!t&&r?a.createElement(tn,{ref:n,...e}):a.createElement(Xn,{ref:n,...e}))}let tn=se(Ll),Xn=se(Dl),Rl=se(_l),Re=Object.assign(tn,{Child:Rl,Root:tn});function Bl({title:e,titleId:n,...t},r){return T.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?T.createElement("title",{id:n},e):null,T.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 zl=T.forwardRef(Bl);function Wl({title:e,titleId:n,...t},r){return T.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?T.createElement("title",{id:n},e):null,T.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 Hl=T.forwardRef(Wl);function Ul({title:e,titleId:n,...t},r){return T.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?T.createElement("title",{id:n},e):null,T.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 Vl=T.forwardRef(Ul);function Yl({title:e,titleId:n,...t},r){return T.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?T.createElement("title",{id:n},e):null,T.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 ql=T.forwardRef(Yl);function Gl({title:e,titleId:n,...t},r){return T.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?T.createElement("title",{id:n},e):null,T.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 Kl=T.forwardRef(Gl);function Zl({title:e,titleId:n,...t},r){return T.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?T.createElement("title",{id:n},e):null,T.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=T.forwardRef(Zl);function Ql({title:e,titleId:n,...t},r){return T.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?T.createElement("title",{id:n},e):null,T.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 Jl=T.forwardRef(Ql);function Xl({title:e,titleId:n,...t},r){return T.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?T.createElement("title",{id:n},e):null,T.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 es=T.forwardRef(Xl);function ts({title:e,titleId:n,...t},r){return T.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?T.createElement("title",{id:n},e):null,T.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 ns=T.forwardRef(ts),bt={warning:{color:"bg-yellow-50",icon:m.jsx(Jl,{className:"h-5 w-5 text-yellow-400","aria-hidden":"true"}),colorTitle:"text-yellow-800",colorText:"text-yellow-700"},error:{color:"bg-red-50",icon:m.jsx(ns,{className:"h-5 w-5 text-red-400","aria-hidden":"true"}),colorTitle:"text-red-800",colorText:"text-red-700"},success:{color:"bg-green-50",icon:m.jsx(Vl,{className:"h-5 w-5 text-green-400","aria-hidden":"true"}),colorTitle:"text-green-800",colorText:"text-green-700"},info:{color:"bg-blue-50",icon:m.jsx(es,{className:"h-5 w-5 text-blue-400","aria-hidden":"true"}),colorTitle:"text-blue-800",colorText:"text-blue-700"}};let tr;const rs=({type:e="info",title:n,message:t,active:r=!1,time:o=1e3,dispatch:i})=>{const{width:l}=Ct(),[s,u]=a.useState(!1);return a.useEffect(()=>r?(tr=window.setTimeout(()=>{i({type:"ALERT",payload:{title:"",message:"",typeAlert:"",active:!1}})},o),u(!0)):()=>window.clearTimeout(tr),[r,i,o]),m.jsx("div",{className:"fixed top-2.5 w-80 3xs:w-96 z-50",style:{left:`calc(50% - ${l<=470?"160px":"192px"})`},children:m.jsx(Re,{as:a.Fragment,show:s,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:m.jsxs("div",{className:N("rounded-md p-4 text-center",bt[e].color),children:[m.jsxs("div",{className:"flex justify-center flex-shrink-0",children:[bt[e].icon,m.jsx("h3",{className:N("text-sm font-medium ml-3",bt[e].colorTitle),children:n})]}),m.jsx("div",{className:N("mt-2 text-sm",bt[e].colorText),children:m.jsx("p",{children:t})})]})})})};function os({title:e,titleId:n,...t},r){return T.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?T.createElement("title",{id:n},e):null,T.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 is=T.forwardRef(os);function ls({title:e,titleId:n,...t},r){return T.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?T.createElement("title",{id:n},e):null,T.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=T.forwardRef(ls);function as({title:e,titleId:n,...t},r){return T.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?T.createElement("title",{id:n},e):null,T.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"}),T.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=T.forwardRef(as);function cs({title:e,titleId:n,...t},r){return T.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?T.createElement("title",{id:n},e):null,T.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 ds=T.forwardRef(cs);function fs({title:e,titleId:n,...t},r){return T.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?T.createElement("title",{id:n},e):null,T.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 ms=T.forwardRef(fs),ps=({src:e,alt:n,width:t,height:r,className:o="",classNameIcon:i="",isIcon:l=!0,acronym:s=""})=>{function u(){if(typeof s!="string")return s;const c=s.toLowerCase(),f=c.split(" "),h=f[f.length-1];return c.charAt(0)+h.charAt(0)}return m.jsx(m.Fragment,{children:e?m.jsx("img",{src:e,alt:n,width:t,height:r,className:N(o!==""&&o),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s"},onLoad:c=>c.currentTarget.style.filter="none"}):l?m.jsx(ds,{className:N("bg-white text-default-5",i!==""?i:"w-7 h-7")}):m.jsx("div",{className:N("bg-gray-200 text-default-5 rounded-full font-bold uppercase flex justify-center items-center",i!==""?i:"w-7 h-7"),children:u()})})},hs=({steps:e,onClick:n})=>{const[t,r]=a.useState(0),o=i=>{r(i),n(i)};return m.jsx("nav",{className:"flex items-center justify-center w-full","aria-label":"Progress","data-testid":"bullets",children:m.jsx("ol",{role:"list",className:"flex items-center space-x-5",children:new Array(e).fill(1).map((i,l)=>m.jsx("li",{children:t!==l?m.jsx("div",{className:"cursor-pointer block h-2.5 w-2.5 rounded-full bg-gray-500 hover:bg-gray-600",onClick:()=>o(l),"data-testid":`step-${l}`,children:m.jsx("span",{className:"sr-only",children:"step"})}):m.jsxs("div",{className:"relative flex items-center justify-center cursor-pointer","aria-current":"step",children:[m.jsx("span",{className:"absolute flex h-5 w-5 p-px","aria-hidden":"true",children:m.jsx("span",{className:"h-full w-full rounded-full bg-gray-300"})}),m.jsx("span",{className:"relative block h-2.5 w-2.5 rounded-full bg-gray-500","aria-hidden":"true"}),m.jsx("span",{className:"sr-only",children:"step"})]})},l))})})};var nr={exports:{}};/*!
31
+ `));let b=f.props,p=typeof(b==null?void 0:b.className)=="function"?(...g)=>at(b==null?void 0:b.className(...g),u.className):at(b==null?void 0:b.className,u.className),v=p?{className:p}:{};return a.cloneElement(f,Object.assign({},In(f.props,ct(Dt(u,["ref"]))),h,d,{ref:o(f.ref,d.ref)},v))}return a.createElement(i,Object.assign({},Dt(u,["ref"]),i!==a.Fragment&&d,i!==a.Fragment&&h),f)}function ro(...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 In(...e){if(e.length===0)return{};if(e.length===1)return e[0];let n={},t={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(t[o]!=null||(t[o]=[]),t[o].push(r[o])):n[o]=r[o];if(n.disabled||n["aria-disabled"])return Object.assign(n,Object.fromEntries(Object.keys(t).map(r=>[r,void 0])));for(let r in t)Object.assign(n,{[r](o,...i){let l=t[r];for(let s of l){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;s(o,...i)}}});return n}function se(e){var n;return Object.assign(a.forwardRef(e),{displayName:(n=e.displayName)!=null?n:e.name})}function ct(e){let n=Object.assign({},e);for(let t in n)n[t]===void 0&&delete n[t];return n}function Dt(e,n=[]){let t=Object.assign({},e);for(let r of n)r in t&&delete t[r];return t}let oo="div";var ze=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(ze||{});function io(e,n){var t;let{features:r=1,...o}=e,i={ref:n,"aria-hidden":(r&2)===2?!0:(t=o["aria-hidden"])!=null?t:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return le({ourProps:i,theirProps:o,slot:{},defaultTag:oo,name:"Hidden"})}let Ze=se(io),Lt=a.createContext(null);Lt.displayName="OpenClosedContext";var ce=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ce||{});function Qe(){return a.useContext(Lt)}function _t({value:e,children:n}){return a.createElement(Lt.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 dt(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&&so(t)?!1:r}function so(e){if(!e)return!1;let n=e.previousElementSibling;for(;n!==null;){if(n instanceof HTMLLegendElement)return!1;n=n.previousElementSibling}return!0}function ao(e){throw new Error("Unexpected object: "+e)}var te=(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))(te||{});function Rt(e,n){let t=n.resolveItems();if(t.length<=0)return null;let r=n.resolveActiveIndex(),o=r??-1;switch(e.focus){case 0:{for(let i=0;i<t.length;++i)if(!n.resolveDisabled(t[i],i,t))return i;return r}case 1:{for(let i=o-1;i>=0;--i)if(!n.resolveDisabled(t[i],i,t))return i;return r}case 2:{for(let i=o+1;i<t.length;++i)if(!n.resolveDisabled(t[i],i,t))return i;return r}case 3:{for(let i=t.length-1;i>=0;--i)if(!n.resolveDisabled(t[i],i,t))return i;return r}case 4:{for(let i=0;i<t.length;++i)if(n.resolveId(t[i],i,t)===e.id)return i;return r}case 5:return null;default:ao(e)}}function $n(e={},n=null,t=[]){for(let[r,o]of Object.entries(e))Fn(t,kn(n,r),o);return t}function kn(e,n){return e?e+"["+n+"]":n}function Fn(e,n,t){if(Array.isArray(t))for(let[r,o]of t.entries())Fn(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,""]):$n(t,n,e)}function uo(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 K=(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))(K||{}),co=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(co||{}),fo=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(fo||{}),mo=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(mo||{}),po=(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))(po||{});function Bt(e,n=t=>t){let t=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=n(e.options.slice()),o=r.length>0&&r[0].dataRef.current.order!==null?r.sort((l,s)=>l.dataRef.current.order-s.dataRef.current.order):Pt(r,l=>l.dataRef.current.domRef.current),i=t?o.indexOf(t):null;return i===-1&&(i=null),{options:o,activeOptionIndex:i}}let ho={1(e){var n;return(n=e.dataRef.current)!=null&&n.disabled||e.comboboxState===1?e:{...e,activeOptionIndex:null,comboboxState:1}},0(e){var n,t;if((n=e.dataRef.current)!=null&&n.disabled||e.comboboxState===0)return e;if((t=e.dataRef.current)!=null&&t.value){let r=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(r!==-1)return{...e,activeOptionIndex:r,comboboxState:0}}return{...e,comboboxState:0}},2(e,n){var t,r,o,i,l;if((t=e.dataRef.current)!=null&&t.disabled||(r=e.dataRef.current)!=null&&r.optionsRef.current&&!((o=e.dataRef.current)!=null&&o.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let f=n.focus===te.Specific?n.idx:Rt(n,{resolveItems:()=>e.virtual.options,resolveActiveIndex:()=>{var b,p;return(p=(b=e.activeOptionIndex)!=null?b:e.virtual.options.findIndex(v=>!e.virtual.disabled(v)))!=null?p:null},resolveDisabled:e.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),h=(i=n.trigger)!=null?i:2;return e.activeOptionIndex===f&&e.activationTrigger===h?e:{...e,activeOptionIndex:f,activationTrigger:h}}let s=Bt(e);if(s.activeOptionIndex===null){let f=s.options.findIndex(h=>!h.dataRef.current.disabled);f!==-1&&(s.activeOptionIndex=f)}let u=n.focus===te.Specific?n.idx:Rt(n,{resolveItems:()=>s.options,resolveActiveIndex:()=>s.activeOptionIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled}),d=(l=n.trigger)!=null?l:2;return e.activeOptionIndex===u&&e.activationTrigger===d?e:{...e,...s,activeOptionIndex:u,activationTrigger:d}},3:(e,n)=>{var t,r,o;if((t=e.dataRef.current)!=null&&t.virtual)return{...e,options:[...e.options,n.payload]};let i=n.payload,l=Bt(e,u=>(u.push(i),u));e.activeOptionIndex===null&&(r=e.dataRef.current)!=null&&r.isSelected(n.payload.dataRef.current.value)&&(l.activeOptionIndex=l.options.indexOf(i));let s={...e,...l,activationTrigger:2};return(o=e.dataRef.current)!=null&&o.__demoMode&&e.dataRef.current.value===void 0&&(s.activeOptionIndex=0),s},4:(e,n)=>{var t;if((t=e.dataRef.current)!=null&&t.virtual)return{...e,options:e.options.filter(o=>o.id!==n.id)};let r=Bt(e,o=>{let i=o.findIndex(l=>l.id===n.id);return i!==-1&&o.splice(i,1),o});return{...e,...r,activationTrigger:2}},5:(e,n)=>e.labelId===n.id?e:{...e,labelId:n.id},6:(e,n)=>e.activationTrigger===n.trigger?e:{...e,activationTrigger:n.trigger},7:(e,n)=>{var t;if(((t=e.virtual)==null?void 0:t.options)===n.options)return e;let r=e.activeOptionIndex;if(e.activeOptionIndex!==null){let o=n.options.indexOf(e.virtual.options[e.activeOptionIndex]);o!==-1?r=o:r=null}return{...e,activeOptionIndex:r,virtual:Object.assign({},e.virtual,{options:n.options})}}},zt=a.createContext(null);zt.displayName="ComboboxActionsContext";function Je(e){let n=a.useContext(zt);if(n===null){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Je),t}return n}let Nn=a.createContext(null);function vo(e){var n;let t=Le("VirtualProvider"),[r,o]=a.useMemo(()=>{let u=t.optionsRef.current;if(!u)return[0,0];let d=window.getComputedStyle(u);return[parseFloat(d.paddingBlockStart||d.paddingTop),parseFloat(d.paddingBlockEnd||d.paddingBottom)]},[t.optionsRef.current]),i=Vr({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}),[l,s]=a.useState(0);return ee(()=>{s(u=>u+1)},[(n=t.virtual)==null?void 0:n.options]),a.createElement(Nn.Provider,{value:i},a.createElement("div",{style:{position:"relative",width:"100%",height:`${i.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&&i.scrollToIndex(t.activeOptionIndex)}}},i.getVirtualItems().map(u=>{var d;return a.createElement(a.Fragment,{key:u.key},a.cloneElement((d=e.children)==null?void 0:d.call(e,{option:t.virtual.options[u.index],open:t.comboboxState===0}),{key:`${l}-${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 Wt=a.createContext(null);Wt.displayName="ComboboxDataContext";function Le(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,Le),t}return n}function go(e,n){return ae(n.type,ho,e,n)}let bo=a.Fragment;function xo(e,n){let{value:t,defaultValue:r,onChange:o,form:i,name:l,by:s=null,disabled:u=!1,__demoMode:d=!1,nullable:f=!1,multiple:h=!1,immediate:b=!1,virtual:p=null,...v}=e,g=!1,x=null,[E=h?[]:void 0,y]=hn(t,o,r),[T,I]=a.useReducer(go,{dataRef:a.createRef(),comboboxState:d?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),$=a.useRef(!1),P=a.useRef({static:!1,hold:!1}),_=a.useRef(null),q=a.useRef(null),M=a.useRef(null),F=a.useRef(null),R=j(typeof s=="string"?(A,V)=>{let H=s;return(A==null?void 0:A[H])===(V==null?void 0:V[H])}:s??((A,V)=>A===V)),Q=j(A=>T.options.findIndex(V=>R(V.dataRef.current.value,A))),z=a.useCallback(A=>ae(w.mode,{1:()=>E.some(V=>R(V,A)),0:()=>R(E,A)}),[E]),B=j(A=>T.activeOptionIndex===Q(A)),w=a.useMemo(()=>({...T,immediate:g,optionsPropsRef:P,labelRef:_,inputRef:q,buttonRef:M,optionsRef:F,value:E,defaultValue:r,disabled:u,mode:h?1:0,virtual:T.virtual,get activeOptionIndex(){if($.current&&T.activeOptionIndex===null&&T.options.length>0){let A=T.options.findIndex(V=>!V.dataRef.current.disabled);if(A!==-1)return A}return T.activeOptionIndex},calculateIndex:Q,compare:R,isSelected:z,isActive:B,nullable:f,__demoMode:d}),[E,r,u,h,f,d,T,x]);ee(()=>{},[x,void 0]),ee(()=>{T.dataRef.current=w},[w]),Mt([w.buttonRef,w.inputRef,w.optionsRef],()=>N.closeCombobox(),w.comboboxState===0);let G=a.useMemo(()=>{var A,V,H;return{open:w.comboboxState===0,disabled:u,activeIndex:w.activeOptionIndex,activeOption:w.activeOptionIndex===null?null:w.virtual?w.virtual.options[(A=w.activeOptionIndex)!=null?A:0]:(H=(V=w.options[w.activeOptionIndex])==null?void 0:V.dataRef.current.value)!=null?H:null,value:E}},[w,u,E]),W=j(()=>{if(w.activeOptionIndex!==null){if(w.virtual)Ce(w.virtual.options[w.activeOptionIndex]);else{let{dataRef:A}=w.options[w.activeOptionIndex];Ce(A.current.value)}N.goToOption(te.Specific,w.activeOptionIndex)}}),ie=j(()=>{I({type:0}),$.current=!0}),J=j(()=>{I({type:1}),$.current=!1}),ne=j((A,V,H)=>($.current=!1,A===te.Specific?I({type:2,focus:te.Specific,idx:V,trigger:H}):I({type:2,focus:A,trigger:H}))),me=j((A,V)=>(I({type:3,payload:{id:A,dataRef:V}}),()=>{w.isActive(V.current.value)&&($.current=!0),I({type:4,id:A})})),ge=j(A=>(I({type:5,id:A}),()=>I({type:5,id:null}))),Ce=j(A=>ae(w.mode,{0(){return y==null?void 0:y(A)},1(){let V=w.value.slice(),H=V.findIndex(pe=>R(pe,A));return H===-1?V.push(A):V.splice(H,1),y==null?void 0:y(V)}})),be=j(A=>{I({type:6,trigger:A})}),N=a.useMemo(()=>({onChange:Ce,registerOption:me,registerLabel:ge,goToOption:ne,closeCombobox:J,openCombobox:ie,setActivationTrigger:be,selectActiveOption:W}),[]),Z=n===null?{}:{ref:n},re=a.useRef(null),we=je();return a.useEffect(()=>{re.current&&r!==void 0&&we.addEventListener(re.current,"reset",()=>{y==null||y(r)})},[re,y]),a.createElement(zt.Provider,{value:N},a.createElement(Wt.Provider,{value:w},a.createElement(_t,{value:ae(w.comboboxState,{0:ce.Open,1:ce.Closed})},l!=null&&E!=null&&$n({[l]:E}).map(([A,V],H)=>a.createElement(Ze,{features:ze.Hidden,ref:H===0?pe=>{var he;re.current=(he=pe==null?void 0:pe.closest("form"))!=null?he:null}:void 0,...ct({key:A,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:i,disabled:u,name:A,value:V})})),le({ourProps:Z,theirProps:v,slot:G,defaultTag:bo,name:"Combobox"}))))}let wo="input";function yo(e,n){var t,r,o,i,l;let s=ve(),{id:u=`headlessui-combobox-input-${s}`,onChange:d,displayValue:f,type:h="text",...b}=e,p=Le("Combobox.Input"),v=Je("Combobox.Input"),g=ue(p.inputRef,n),x=De(p.inputRef),E=a.useRef(!1),y=je(),T=j(()=>{v.onChange(null),p.optionsRef.current&&(p.optionsRef.current.scrollTop=0),v.goToOption(te.Nothing)}),I=function(){var w;return typeof f=="function"&&p.value!==void 0?(w=f(p.value))!=null?w:"":typeof p.value=="string"?p.value:""}();Ke(([w,G],[W,ie])=>{if(E.current)return;let J=p.inputRef.current;J&&((ie===0&&G===1||w!==W)&&(J.value=w),requestAnimationFrame(()=>{if(E.current||!J||(x==null?void 0:x.activeElement)!==J)return;let{selectionStart:ne,selectionEnd:me}=J;Math.abs((me??0)-(ne??0))===0&&ne===0&&J.setSelectionRange(J.value.length,J.value.length)}))},[I,p.comboboxState,x]),Ke(([w],[G])=>{if(w===0&&G===1){if(E.current)return;let W=p.inputRef.current;if(!W)return;let ie=W.value,{selectionStart:J,selectionEnd:ne,selectionDirection:me}=W;W.value="",W.value=ie,me!==null?W.setSelectionRange(J,ne,me):W.setSelectionRange(J,ne)}},[p.comboboxState]);let $=a.useRef(!1),P=j(()=>{$.current=!0}),_=j(()=>{y.nextFrame(()=>{$.current=!1})}),q=j(w=>{switch(E.current=!0,w.key){case K.Enter:if(E.current=!1,p.comboboxState!==0||$.current)return;if(w.preventDefault(),w.stopPropagation(),p.activeOptionIndex===null){v.closeCombobox();return}v.selectActiveOption(),p.mode===0&&v.closeCombobox();break;case K.ArrowDown:return E.current=!1,w.preventDefault(),w.stopPropagation(),ae(p.comboboxState,{0:()=>v.goToOption(te.Next),1:()=>v.openCombobox()});case K.ArrowUp:return E.current=!1,w.preventDefault(),w.stopPropagation(),ae(p.comboboxState,{0:()=>v.goToOption(te.Previous),1:()=>{v.openCombobox(),y.nextFrame(()=>{p.value||v.goToOption(te.Last)})}});case K.Home:if(w.shiftKey)break;return E.current=!1,w.preventDefault(),w.stopPropagation(),v.goToOption(te.First);case K.PageUp:return E.current=!1,w.preventDefault(),w.stopPropagation(),v.goToOption(te.First);case K.End:if(w.shiftKey)break;return E.current=!1,w.preventDefault(),w.stopPropagation(),v.goToOption(te.Last);case K.PageDown:return E.current=!1,w.preventDefault(),w.stopPropagation(),v.goToOption(te.Last);case K.Escape:return E.current=!1,p.comboboxState!==0?void 0:(w.preventDefault(),p.optionsRef.current&&!p.optionsPropsRef.current.static&&w.stopPropagation(),p.nullable&&p.mode===0&&p.value===null&&T(),v.closeCombobox());case K.Tab:if(E.current=!1,p.comboboxState!==0)return;p.mode===0&&p.activationTrigger!==1&&v.selectActiveOption(),v.closeCombobox();break}}),M=j(w=>{d==null||d(w),p.nullable&&p.mode===0&&w.target.value===""&&T(),v.openCombobox()}),F=j(w=>{var G,W,ie;let J=(G=w.relatedTarget)!=null?G:Te.find(ne=>ne!==w.currentTarget);if(E.current=!1,!((W=p.optionsRef.current)!=null&&W.contains(J))&&!((ie=p.buttonRef.current)!=null&&ie.contains(J))&&p.comboboxState===0)return w.preventDefault(),p.mode===0&&(p.nullable&&p.value===null?T():p.activationTrigger!==1&&v.selectActiveOption()),v.closeCombobox()}),R=j(w=>{var G,W,ie;let J=(G=w.relatedTarget)!=null?G:Te.find(ne=>ne!==w.currentTarget);(W=p.buttonRef.current)!=null&&W.contains(J)||(ie=p.optionsRef.current)!=null&&ie.contains(J)||p.disabled||p.immediate&&p.comboboxState!==0&&(v.openCombobox(),y.nextFrame(()=>{v.setActivationTrigger(1)}))}),Q=$t(()=>{if(p.labelId)return[p.labelId].join(" ")},[p.labelId]),z=a.useMemo(()=>({open:p.comboboxState===0,disabled:p.disabled}),[p]),B={ref:g,id:u,role:"combobox",type:h,"aria-controls":(t=p.optionsRef.current)==null?void 0:t.id,"aria-expanded":p.comboboxState===0,"aria-activedescendant":p.activeOptionIndex===null?void 0:p.virtual?(r=p.options.find(w=>{var G;return!((G=p.virtual)!=null&&G.disabled(w.dataRef.current.value))&&p.compare(w.dataRef.current.value,p.virtual.options[p.activeOptionIndex])}))==null?void 0:r.id:(o=p.options[p.activeOptionIndex])==null?void 0:o.id,"aria-labelledby":Q,"aria-autocomplete":"list",defaultValue:(l=(i=e.defaultValue)!=null?i:p.defaultValue!==void 0?f==null?void 0:f(p.defaultValue):null)!=null?l:p.defaultValue,disabled:p.disabled,onCompositionStart:P,onCompositionEnd:_,onKeyDown:q,onChange:M,onFocus:R,onBlur:F};return le({ourProps:B,theirProps:b,slot:z,defaultTag:wo,name:"Combobox.Input"})}let Eo="button";function So(e,n){var t;let r=Le("Combobox.Button"),o=Je("Combobox.Button"),i=ue(r.buttonRef,n),l=ve(),{id:s=`headlessui-combobox-button-${l}`,...u}=e,d=je(),f=j(g=>{switch(g.key){case K.ArrowDown:return g.preventDefault(),g.stopPropagation(),r.comboboxState===1&&o.openCombobox(),d.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})});case K.ArrowUp:return g.preventDefault(),g.stopPropagation(),r.comboboxState===1&&(o.openCombobox(),d.nextFrame(()=>{r.value||o.goToOption(te.Last)})),d.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})});case K.Escape:return r.comboboxState!==0?void 0:(g.preventDefault(),r.optionsRef.current&&!r.optionsPropsRef.current.static&&g.stopPropagation(),o.closeCombobox(),d.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})}));default:return}}),h=j(g=>{if(dt(g.currentTarget))return g.preventDefault();r.comboboxState===0?o.closeCombobox():(g.preventDefault(),o.openCombobox()),d.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})})}),b=$t(()=>{if(r.labelId)return[r.labelId,s].join(" ")},[r.labelId,s]),p=a.useMemo(()=>({open:r.comboboxState===0,disabled:r.disabled,value:r.value}),[r]),v={ref:i,id:s,type:At(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:f};return le({ourProps:v,theirProps:u,slot:p,defaultTag:Eo,name:"Combobox.Button"})}let Co="label";function To(e,n){let t=ve(),{id:r=`headlessui-combobox-label-${t}`,...o}=e,i=Le("Combobox.Label"),l=Je("Combobox.Label"),s=ue(i.labelRef,n);ee(()=>l.registerLabel(r),[r]);let u=j(()=>{var f;return(f=i.inputRef.current)==null?void 0:f.focus({preventScroll:!0})}),d=a.useMemo(()=>({open:i.comboboxState===0,disabled:i.disabled}),[i]);return le({ourProps:{ref:s,id:r,onClick:u},theirProps:o,slot:d,defaultTag:Co,name:"Combobox.Label"})}let Oo="ul",jo=Ne.RenderStrategy|Ne.Static;function Io(e,n){let t=ve(),{id:r=`headlessui-combobox-options-${t}`,hold:o=!1,...i}=e,l=Le("Combobox.Options"),s=ue(l.optionsRef,n),u=Qe(),d=u!==null?(u&ce.Open)===ce.Open:l.comboboxState===0;ee(()=>{var p;l.optionsPropsRef.current.static=(p=e.static)!=null?p:!1},[l.optionsPropsRef,e.static]),ee(()=>{l.optionsPropsRef.current.hold=o},[l.optionsPropsRef,o]),jn({container:l.optionsRef.current,enabled:l.comboboxState===0,accept(p){return p.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:p.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(p){p.setAttribute("role","none")}});let f=$t(()=>{var p,v;return(v=l.labelId)!=null?v:(p=l.buttonRef.current)==null?void 0:p.id},[l.labelId,l.buttonRef.current]),h=a.useMemo(()=>({open:l.comboboxState===0,option:void 0}),[l]),b={"aria-labelledby":f,role:"listbox","aria-multiselectable":l.mode===1?!0:void 0,id:r,ref:s};return l.virtual&&l.comboboxState===0&&Object.assign(i,{children:a.createElement(vo,null,i.children)}),le({ourProps:b,theirProps:i,slot:h,defaultTag:Oo,features:jo,visible:d,name:"Combobox.Options"})}let $o="li";function ko(e,n){var t;let r=ve(),{id:o=`headlessui-combobox-option-${r}`,disabled:i=!1,value:l,order:s=null,...u}=e,d=Le("Combobox.Option"),f=Je("Combobox.Option"),h=d.virtual?d.activeOptionIndex===d.calculateIndex(l):d.activeOptionIndex===null?!1:((t=d.options[d.activeOptionIndex])==null?void 0:t.id)===o,b=d.isSelected(l),p=a.useRef(null),v=Se({disabled:i,value:l,domRef:p,order:s}),g=a.useContext(Nn),x=ue(n,p,g?g.measureElement:null),E=j(()=>f.onChange(l));ee(()=>f.registerOption(o,v),[v,o]);let y=a.useRef(!(d.virtual||d.__demoMode));ee(()=>{if(!d.virtual||!d.__demoMode)return;let F=ye();return F.requestAnimationFrame(()=>{y.current=!0}),F.dispose},[d.virtual,d.__demoMode]),ee(()=>{if(!y.current||d.comboboxState!==0||!h||d.activationTrigger===0)return;let F=ye();return F.requestAnimationFrame(()=>{var R,Q;(Q=(R=p.current)==null?void 0:R.scrollIntoView)==null||Q.call(R,{block:"nearest"})}),F.dispose},[p,h,d.comboboxState,d.activationTrigger,d.activeOptionIndex]);let T=j(F=>{var R;if(i||(R=d.virtual)!=null&&R.disabled(l))return F.preventDefault();E(),yn()||requestAnimationFrame(()=>{var Q;return(Q=d.inputRef.current)==null?void 0:Q.focus({preventScroll:!0})}),d.mode===0&&requestAnimationFrame(()=>f.closeCombobox())}),I=j(()=>{var F;if(i||(F=d.virtual)!=null&&F.disabled(l))return f.goToOption(te.Nothing);let R=d.calculateIndex(l);f.goToOption(te.Specific,R)}),$=On(),P=j(F=>$.update(F)),_=j(F=>{var R;if(!$.wasMoved(F)||i||(R=d.virtual)!=null&&R.disabled(l)||h)return;let Q=d.calculateIndex(l);f.goToOption(te.Specific,Q,0)}),q=j(F=>{var R;$.wasMoved(F)&&(i||(R=d.virtual)!=null&&R.disabled(l)||h&&(d.optionsPropsRef.current.hold||f.goToOption(te.Nothing)))}),M=a.useMemo(()=>({active:h,selected:b,disabled:i}),[h,b,i]);return le({ourProps:{id:o,ref:x,role:"option",tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0?!0:void 0,"aria-selected":b,disabled:void 0,onClick:T,onFocus:I,onPointerEnter:P,onMouseEnter:P,onPointerMove:_,onMouseMove:_,onPointerLeave:q,onMouseLeave:q},theirProps:u,slot:M,defaultTag:$o,name:"Combobox.Option"})}let Fo=se(xo),No=se(So),Po=se(yo),Mo=se(To),Ao=se(Io),Do=se(ko),$e=Object.assign(Fo,{Input:Po,Button:No,Label:Mo,Options:Ao,Option:Do});function Pn(e,n,t,r){let o=Se(t);a.useEffect(()=>{e=e??window;function i(l){o.current(l)}return e.addEventListener(n,i,r),()=>e.removeEventListener(n,i,r)},[e,n,r])}function Xe(){let e=a.useRef(!1);return ee(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Mn(e){let n=j(e),t=a.useRef(!1);a.useEffect(()=>(t.current=!1,()=>{t.current=!0,it(()=>{t.current&&n()})}),[n])}var et=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(et||{});function Lo(){let e=a.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 Ro(e,n){let t=a.useRef(null),r=ue(t,n),{initialFocus:o,containers:i,features:l=30,...s}=e;Be()||(l=1);let u=De(t);Wo({ownerDocument:u},!!(l&16));let d=Ho({ownerDocument:u,container:t,initialFocus:o},!!(l&2));Uo({ownerDocument:u,container:t,containers:i,previousActiveElement:d},!!(l&8));let f=Lo(),h=j(g=>{let x=t.current;x&&(E=>E())(()=>{ae(f.current,{[et.Forwards]:()=>{Ge(x,Ie.First,{skipElements:[g.relatedTarget]})},[et.Backwards]:()=>{Ge(x,Ie.Last,{skipElements:[g.relatedTarget]})}})})}),b=je(),p=a.useRef(!1),v={ref:r,onKeyDown(g){g.key=="Tab"&&(p.current=!0,b.requestAnimationFrame(()=>{p.current=!1}))},onBlur(g){let x=An(i);t.current instanceof HTMLElement&&x.add(t.current);let E=g.relatedTarget;E instanceof HTMLElement&&E.dataset.headlessuiFocusGuard!=="true"&&(Ln(x,E)||(p.current?Ge(t.current,ae(f.current,{[et.Forwards]:()=>Ie.Next,[et.Backwards]:()=>Ie.Previous})|Ie.WrapAround,{relativeTo:g.target}):g.target instanceof HTMLElement&&Fe(g.target)))}};return a.createElement(a.Fragment,null,!!(l&4)&&a.createElement(Ze,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:ze.Focusable}),le({ourProps:v,theirProps:s,defaultTag:_o,name:"FocusTrap"}),!!(l&4)&&a.createElement(Ze,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:ze.Focusable}))}let Bo=se(Ro),tt=Object.assign(Bo,{features:Dn});function zo(e=!0){let n=a.useRef(Te.slice());return Ke(([t],[r])=>{r===!0&&t===!1&&it(()=>{n.current.splice(0)}),r===!1&&t===!0&&(n.current=Te.slice())},[e,Te,n]),j(()=>{var t;return(t=n.current.find(r=>r!=null&&r.isConnected))!=null?t:null})}function Wo({ownerDocument:e},n){let t=zo(n);Ke(()=>{n||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&Fe(t())},[n]),Mn(()=>{n&&Fe(t())})}function Ho({ownerDocument:e,container:n,initialFocus:t},r){let o=a.useRef(null),i=Xe();return Ke(()=>{if(!r)return;let l=n.current;l&&it(()=>{if(!i.current)return;let s=e==null?void 0:e.activeElement;if(t!=null&&t.current){if((t==null?void 0:t.current)===s){o.current=s;return}}else if(l.contains(s)){o.current=s;return}t!=null&&t.current?Fe(t.current):Ge(l,Ie.First)===gn.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),o.current=e==null?void 0:e.activeElement})},[r]),o}function Uo({ownerDocument:e,container:n,containers:t,previousActiveElement:r},o){let i=Xe();Pn(e==null?void 0:e.defaultView,"focus",l=>{if(!o||!i.current)return;let s=An(t);n.current instanceof HTMLElement&&s.add(n.current);let u=r.current;if(!u)return;let d=l.target;d&&d instanceof HTMLElement?Ln(s,d)?(r.current=d,Fe(d)):(l.preventDefault(),l.stopPropagation(),Fe(u)):Fe(r.current)},!0)}function Ln(e,n){for(let t of e)if(t.contains(n))return!0;return!1}let _n=a.createContext(!1);function Vo(){return a.useContext(_n)}function Ht(e){return a.createElement(_n.Provider,{value:e.force},e.children)}function Yo(e){let n=Vo(),t=a.useContext(Rn),r=De(e),[o,i]=a.useState(()=>{if(!n&&t!==null||Oe.isServer)return null;let l=r==null?void 0:r.getElementById("headlessui-portal-root");if(l)return l;if(r===null)return null;let s=r.createElement("div");return s.setAttribute("id","headlessui-portal-root"),r.body.appendChild(s)});return a.useEffect(()=>{o!==null&&(r!=null&&r.body.contains(o)||r==null||r.body.appendChild(o))},[o,r]),a.useEffect(()=>{n||t!==null&&i(t.current)},[t,i,n]),o}let qo=a.Fragment;function Go(e,n){let t=e,r=a.useRef(null),o=ue(no(f=>{r.current=f}),n),i=De(r),l=Yo(r),[s]=a.useState(()=>{var f;return Oe.isServer?null:(f=i==null?void 0:i.createElement("div"))!=null?f:null}),u=a.useContext(Ut),d=Be();return ee(()=>{!l||!s||l.contains(s)||(s.setAttribute("data-headlessui-portal",""),l.appendChild(s))},[l,s]),ee(()=>{if(s&&u)return u.register(s)},[u,s]),Mn(()=>{var f;!l||!s||(s instanceof Node&&l.contains(s)&&l.removeChild(s),l.childNodes.length<=0&&((f=l.parentElement)==null||f.removeChild(l)))}),d?!l||!s?null:un.createPortal(le({ourProps:{ref:o},theirProps:t,defaultTag:qo,name:"Portal"}),s):null}let Ko=a.Fragment,Rn=a.createContext(null);function Zo(e,n){let{target:t,...r}=e,o={ref:ue(n)};return a.createElement(Rn.Provider,{value:t},le({ourProps:o,theirProps:r,defaultTag:Ko,name:"Popover.Group"}))}let Ut=a.createContext(null);function Qo(){let e=a.useContext(Ut),n=a.useRef([]),t=j(i=>(n.current.push(i),e&&e.register(i),()=>r(i))),r=j(i=>{let l=n.current.indexOf(i);l!==-1&&n.current.splice(l,1),e&&e.unregister(i)}),o=a.useMemo(()=>({register:t,unregister:r,portals:n}),[t,r,n]);return[n,a.useMemo(()=>function({children:i}){return a.createElement(Ut.Provider,{value:o},i)},[o])]}let Jo=se(Go),Xo=se(Zo),Vt=Object.assign(Jo,{Group:Xo});function ei(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}const ti=typeof Object.is=="function"?Object.is:ei,{useState:ni,useEffect:ri,useLayoutEffect:oi,useDebugValue:ii}=C;function li(e,n,t){const r=n(),[{inst:o},i]=ni({inst:{value:r,getSnapshot:n}});return oi(()=>{o.value=r,o.getSnapshot=n,Yt(o)&&i({inst:o})},[e,r,n]),ri(()=>(Yt(o)&&i({inst:o}),e(()=>{Yt(o)&&i({inst:o})})),[e]),ii(r),r}function Yt(e){const n=e.getSnapshot,t=e.value;try{const r=n();return!ti(t,r)}catch{return!0}}function si(e,n,t){return n()}const ai=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ui=!ai,ci=ui?si:li,di="useSyncExternalStore"in C?(e=>e.useSyncExternalStore)(C):ci;function fi(e){return di(e.subscribe,e.getSnapshot,e.getSnapshot)}function mi(e,n){let t=e(),r=new Set;return{getSnapshot(){return t},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...i){let l=n[o].call(t,...i);l&&(t=l,r.forEach(s=>s()))}}}function pi(){let e;return{before({doc:n}){var t;let r=n.documentElement;e=((t=n.defaultView)!=null?t:window).innerWidth-r.clientWidth},after({doc:n,d:t}){let r=n.documentElement,o=r.clientWidth-r.offsetWidth,i=e-o;t.style(r,"paddingRight",`${i}px`)}}}function hi(){return wn()?{before({doc:e,d:n,meta:t}){function r(o){return t.containers.flatMap(i=>i()).some(i=>i.contains(o))}n.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let s=ye();s.style(e.documentElement,"scrollBehavior","auto"),n.add(()=>n.microTask(()=>s.dispose()))}let i=(o=window.scrollY)!=null?o:window.pageYOffset,l=null;n.addEventListener(e,"click",s=>{if(s.target instanceof HTMLElement)try{let u=s.target.closest("a");if(!u)return;let{hash:d}=new URL(u.href),f=e.querySelector(d);f&&!r(f)&&(l=f)}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;i!==u&&window.scrollTo(0,i),l&&l.isConnected&&(l.scrollIntoView({block:"nearest"}),l=null)})})}}:{}}function vi(){return{before({doc:e,d:n}){n.style(e.documentElement,"overflow","hidden")}}}function gi(e){let n={};for(let t of e)Object.assign(n,t(n));return n}let _e=mi(()=>new Map,{PUSH(e,n){var t;let r=(t=this.get(e))!=null?t:{doc:e,count:0,d:ye(),meta:new Set};return r.count++,r.meta.add(n),this.set(e,r),this},POP(e,n){let t=this.get(e);return t&&(t.count--,t.meta.delete(n)),this},SCROLL_PREVENT({doc:e,d:n,meta:t}){let r={doc:e,d:n,meta:gi(t)},o=[hi(),pi(),vi()];o.forEach(({before:i})=>i==null?void 0:i(r)),o.forEach(({after:i})=>i==null?void 0:i(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});_e.subscribe(()=>{let e=_e.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)&&_e.dispatch(t.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",t),t.count===0&&_e.dispatch("TEARDOWN",t)}});function bi(e,n,t){let r=fi(_e),o=e?r.get(e):void 0,i=o?o.count>0:!1;return ee(()=>{if(!(!e||!n))return _e.dispatch("PUSH",e,t),()=>_e.dispatch("POP",e,t)},[n,e]),i}let qt=new Map,nt=new Map;function Bn(e,n=!0){ee(()=>{var t;if(!n)return;let r=typeof e=="function"?e():e.current;if(!r)return;function o(){var l;if(!r)return;let s=(l=nt.get(r))!=null?l:1;if(s===1?nt.delete(r):nt.set(r,s-1),s!==1)return;let u=qt.get(r);u&&(u["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",u["aria-hidden"]),r.inert=u.inert,qt.delete(r))}let i=(t=nt.get(r))!=null?t:0;return nt.set(r,i+1),i!==0||(qt.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),o},[e,n])}function xi({defaultContainers:e=[],portals:n,mainTreeNodeRef:t}={}){var r;let o=a.useRef((r=t==null?void 0:t.current)!=null?r:null),i=De(o),l=j(()=>{var s,u,d;let f=[];for(let h of e)h!==null&&(h instanceof HTMLElement?f.push(h):"current"in h&&h.current instanceof HTMLElement&&f.push(h.current));if(n!=null&&n.current)for(let h of n.current)f.push(h);for(let h of(s=i==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?s:[])h!==document.body&&h!==document.head&&h instanceof HTMLElement&&h.id!=="headlessui-portal-root"&&(h.contains(o.current)||h.contains((d=(u=o.current)==null?void 0:u.getRootNode())==null?void 0:d.host)||f.some(b=>h.contains(b))||f.push(h));return f});return{resolveContainers:l,contains:j(s=>l().some(u=>u.contains(s))),mainTreeNodeRef:o,MainTreeNode:a.useMemo(()=>function(){return t!=null?null:a.createElement(Ze,{features:ze.Hidden,ref:o})},[o,t])}}let Gt=a.createContext(()=>{});Gt.displayName="StackContext";var Kt=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Kt||{});function wi(){return a.useContext(Gt)}function yi({children:e,onUpdate:n,type:t,element:r,enabled:o}){let i=wi(),l=j((...s)=>{n==null||n(...s),i(...s)});return ee(()=>{let s=o===void 0||o===!0;return s&&l(0,t,r),()=>{s&&l(1,t,r)}},[l,t,r,o]),a.createElement(Gt.Provider,{value:l},e)}let zn=a.createContext(null);function Wn(){let e=a.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 Hn(){let[e,n]=a.useState([]);return[e.length>0?e.join(" "):void 0,a.useMemo(()=>function(t){let r=j(i=>(n(l=>[...l,i]),()=>n(l=>{let s=l.slice(),u=s.indexOf(i);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(zn.Provider,{value:o},t.children)},[n])]}let Ei="p";function Si(e,n){let t=ve(),{id:r=`headlessui-description-${t}`,...o}=e,i=Wn(),l=ue(n);ee(()=>i.register(r),[r,i.register]);let s={ref:l,...i.props,id:r};return le({ourProps:s,theirProps:o,slot:i.slot||{},defaultTag:Ei,name:i.name||"Description"})}let Ci=se(Si),Un=Object.assign(Ci,{});var Ti=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ti||{}),Oi=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(Oi||{});let ji={0(e,n){return e.titleId===n.id?e:{...e,titleId:n.id}}},ft=a.createContext(null);ft.displayName="DialogContext";function rt(e){let n=a.useContext(ft);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 Ii(e,n,t=()=>[document.body]){bi(e,n,r=>{var o;return{containers:[...(o=r.containers)!=null?o:[],t]}})}function $i(e,n){return ae(n.type,ji,e,n)}let ki="div",Fi=Ne.RenderStrategy|Ne.Static;function Ni(e,n){let t=ve(),{id:r=`headlessui-dialog-${t}`,open:o,onClose:i,initialFocus:l,role:s="dialog",__demoMode:u=!1,...d}=e,[f,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 p=Qe();o===void 0&&p!==null&&(o=(p&ce.Open)===ce.Open);let v=a.useRef(null),g=ue(v,n),x=De(v),E=e.hasOwnProperty("open")||p!==null,y=e.hasOwnProperty("onClose");if(!E&&!y)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!E)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!y)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof o!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${o}`);if(typeof i!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${i}`);let T=o?0:1,[I,$]=a.useReducer($i,{titleId:null,descriptionId:null,panelRef:a.createRef()}),P=j(()=>i(!1)),_=j(H=>$({type:0,id:H})),q=Be()?u?!1:T===0:!1,M=f>1,F=a.useContext(ft)!==null,[R,Q]=Qo(),z={get current(){var H;return(H=I.panelRef.current)!=null?H:v.current}},{resolveContainers:B,mainTreeNodeRef:w,MainTreeNode:G}=xi({portals:R,defaultContainers:[z]}),W=M?"parent":"leaf",ie=p!==null?(p&ce.Closing)===ce.Closing:!1,J=F||ie?!1:q,ne=a.useCallback(()=>{var H,pe;return(pe=Array.from((H=x==null?void 0:x.querySelectorAll("body > *"))!=null?H:[]).find(he=>he.id==="headlessui-portal-root"?!1:he.contains(w.current)&&he instanceof HTMLElement))!=null?pe:null},[w]);Bn(ne,J);let me=M?!0:q,ge=a.useCallback(()=>{var H,pe;return(pe=Array.from((H=x==null?void 0:x.querySelectorAll("[data-headlessui-portal]"))!=null?H:[]).find(he=>he.contains(w.current)&&he instanceof HTMLElement))!=null?pe:null},[w]);Bn(ge,me),Mt(B,H=>{H.preventDefault(),P()},!(!q||M));let be=!(M||T!==0);Pn(x==null?void 0:x.defaultView,"keydown",H=>{be&&(H.defaultPrevented||H.key===K.Escape&&(H.preventDefault(),H.stopPropagation(),P()))}),Ii(x,!(ie||T!==0||F),B),a.useEffect(()=>{if(T!==0||!v.current)return;let H=new ResizeObserver(pe=>{for(let he of pe){let We=he.target.getBoundingClientRect();We.x===0&&We.y===0&&We.width===0&&We.height===0&&P()}});return H.observe(v.current),()=>H.disconnect()},[T,v,P]);let[Z,re]=Hn(),we=a.useMemo(()=>[{dialogState:T,close:P,setTitleId:_},I],[T,I,P,_]),A=a.useMemo(()=>({open:T===0}),[T]),V={ref:g,id:r,role:s,"aria-modal":T===0?!0:void 0,"aria-labelledby":I.titleId,"aria-describedby":Z};return a.createElement(yi,{type:"Dialog",enabled:T===0,element:v,onUpdate:j((H,pe)=>{pe==="Dialog"&&ae(H,{[Kt.Add]:()=>h(he=>he+1),[Kt.Remove]:()=>h(he=>he-1)})})},a.createElement(Ht,{force:!0},a.createElement(Vt,null,a.createElement(ft.Provider,{value:we},a.createElement(Vt.Group,{target:v},a.createElement(Ht,{force:!1},a.createElement(re,{slot:A,name:"Dialog.Description"},a.createElement(tt,{initialFocus:l,containers:B,features:q?ae(W,{parent:tt.features.RestoreFocus,leaf:tt.features.All&~tt.features.FocusLock}):tt.features.None},a.createElement(Q,null,le({ourProps:V,theirProps:d,slot:A,defaultTag:ki,features:Fi,visible:T===0,name:"Dialog"}))))))))),a.createElement(G,null))}let Pi="div";function Mi(e,n){let t=ve(),{id:r=`headlessui-dialog-overlay-${t}`,...o}=e,[{dialogState:i,close:l}]=rt("Dialog.Overlay"),s=ue(n),u=j(f=>{if(f.target===f.currentTarget){if(dt(f.currentTarget))return f.preventDefault();f.preventDefault(),f.stopPropagation(),l()}}),d=a.useMemo(()=>({open:i===0}),[i]);return le({ourProps:{ref:s,id:r,"aria-hidden":!0,onClick:u},theirProps:o,slot:d,defaultTag:Pi,name:"Dialog.Overlay"})}let Ai="div";function Di(e,n){let t=ve(),{id:r=`headlessui-dialog-backdrop-${t}`,...o}=e,[{dialogState:i},l]=rt("Dialog.Backdrop"),s=ue(n);a.useEffect(()=>{if(l.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[l.panelRef]);let u=a.useMemo(()=>({open:i===0}),[i]);return a.createElement(Ht,{force:!0},a.createElement(Vt,null,le({ourProps:{ref:s,id:r,"aria-hidden":!0},theirProps:o,slot:u,defaultTag:Ai,name:"Dialog.Backdrop"})))}let Li="div";function _i(e,n){let t=ve(),{id:r=`headlessui-dialog-panel-${t}`,...o}=e,[{dialogState:i},l]=rt("Dialog.Panel"),s=ue(n,l.panelRef),u=a.useMemo(()=>({open:i===0}),[i]),d=j(f=>{f.stopPropagation()});return le({ourProps:{ref:s,id:r,onClick:d},theirProps:o,slot:u,defaultTag:Li,name:"Dialog.Panel"})}let Ri="h2";function Bi(e,n){let t=ve(),{id:r=`headlessui-dialog-title-${t}`,...o}=e,[{dialogState:i,setTitleId:l}]=rt("Dialog.Title"),s=ue(n);a.useEffect(()=>(l(r),()=>l(null)),[r,l]);let u=a.useMemo(()=>({open:i===0}),[i]);return le({ourProps:{ref:s,id:r},theirProps:o,slot:u,defaultTag:Ri,name:"Dialog.Title"})}let zi=se(Ni),Wi=se(Di),Hi=se(_i),Ui=se(Mi),Vi=se(Bi),Vn=Object.assign(zi,{Backdrop:Wi,Panel:Hi,Overlay:Ui,Title:Vi,Description:Un}),Yn=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function qn(e){var n,t;let r=(n=e.innerText)!=null?n:"",o=e.cloneNode(!0);if(!(o instanceof HTMLElement))return r;let i=!1;for(let s of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),i=!0;let l=i?(t=o.innerText)!=null?t:"":r;return Yn.test(l)&&(l=l.replace(Yn,"")),l}function Yi(e){let n=e.getAttribute("aria-label");if(typeof n=="string")return n.trim();let t=e.getAttribute("aria-labelledby");if(t){let r=t.split(" ").map(o=>{let i=document.getElementById(o);if(i){let l=i.getAttribute("aria-label");return typeof l=="string"?l.trim():qn(i).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return qn(e).trim()}function qi(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 i=Yi(r).trim().toLowerCase();return n.current=o,t.current=i,i})}var Gi=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Gi||{}),Ki=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Ki||{}),Zi=(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))(Zi||{});function Zt(e,n=t=>t){let t=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,r=Pt(n(e.items.slice()),i=>i.dataRef.current.domRef.current),o=t?r.indexOf(t):null;return o===-1&&(o=null),{items:r,activeItemIndex:o}}let Qi={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=Rt(n,{resolveItems:()=>r.items,resolveActiveIndex:()=>r.activeItemIndex,resolveId:i=>i.id,resolveDisabled:i=>i.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeItemIndex:o,activationTrigger:(t=n.trigger)!=null?t:1}},3:(e,n)=>{let t=e.searchQuery!==""?0:1,r=e.searchQuery+n.value.toLowerCase(),o=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+t).concat(e.items.slice(0,e.activeItemIndex+t)):e.items).find(l=>{var s;return((s=l.dataRef.current.textValue)==null?void 0:s.startsWith(r))&&!l.dataRef.current.disabled}),i=o?e.items.indexOf(o):-1;return i===-1||i===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:i,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,n)=>{let t=Zt(e,r=>[...r,{id:n.id,dataRef:n.dataRef}]);return{...e,...t}},6:(e,n)=>{let t=Zt(e,r=>{let o=r.findIndex(i=>i.id===n.id);return o!==-1&&r.splice(o,1),r});return{...e,...t,activationTrigger:1}}},Qt=a.createContext(null);Qt.displayName="MenuContext";function mt(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,mt),t}return n}function Ji(e,n){return ae(n.type,Qi,e,n)}let Xi=a.Fragment;function el(e,n){let{__demoMode:t=!1,...r}=e,o=a.useReducer(Ji,{__demoMode:t,menuState:t?0:1,buttonRef:a.createRef(),itemsRef:a.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:i,itemsRef:l,buttonRef:s},u]=o,d=ue(n);Mt([s,l],(p,v)=>{var g;u({type:1}),Nt(v,Ft.Loose)||(p.preventDefault(),(g=s.current)==null||g.focus())},i===0);let f=j(()=>{u({type:1})}),h=a.useMemo(()=>({open:i===0,close:f}),[i,f]),b={ref:d};return a.createElement(Qt.Provider,{value:o},a.createElement(_t,{value:ae(i,{0:ce.Open,1:ce.Closed})},le({ourProps:b,theirProps:r,slot:h,defaultTag:Xi,name:"Menu"})))}let tl="button";function nl(e,n){var t;let r=ve(),{id:o=`headlessui-menu-button-${r}`,...i}=e,[l,s]=mt("Menu.Button"),u=ue(l.buttonRef,n),d=je(),f=j(g=>{switch(g.key){case K.Space:case K.Enter:case K.ArrowDown:g.preventDefault(),g.stopPropagation(),s({type:0}),d.nextFrame(()=>s({type:2,focus:te.First}));break;case K.ArrowUp:g.preventDefault(),g.stopPropagation(),s({type:0}),d.nextFrame(()=>s({type:2,focus:te.Last}));break}}),h=j(g=>{switch(g.key){case K.Space:g.preventDefault();break}}),b=j(g=>{if(dt(g.currentTarget))return g.preventDefault();e.disabled||(l.menuState===0?(s({type:1}),d.nextFrame(()=>{var x;return(x=l.buttonRef.current)==null?void 0:x.focus({preventScroll:!0})})):(g.preventDefault(),s({type:0})))}),p=a.useMemo(()=>({open:l.menuState===0}),[l]),v={ref:u,id:o,type:At(e,l.buttonRef),"aria-haspopup":"menu","aria-controls":(t=l.itemsRef.current)==null?void 0:t.id,"aria-expanded":l.menuState===0,onKeyDown:f,onKeyUp:h,onClick:b};return le({ourProps:v,theirProps:i,slot:p,defaultTag:tl,name:"Menu.Button"})}let rl="div",ol=Ne.RenderStrategy|Ne.Static;function il(e,n){var t,r;let o=ve(),{id:i=`headlessui-menu-items-${o}`,...l}=e,[s,u]=mt("Menu.Items"),d=ue(s.itemsRef,n),f=De(s.itemsRef),h=je(),b=Qe(),p=b!==null?(b&ce.Open)===ce.Open:s.menuState===0;a.useEffect(()=>{let y=s.itemsRef.current;y&&s.menuState===0&&y!==(f==null?void 0:f.activeElement)&&y.focus({preventScroll:!0})},[s.menuState,s.itemsRef,f]),jn({container:s.itemsRef.current,enabled:s.menuState===0,accept(y){return y.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:y.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(y){y.setAttribute("role","none")}});let v=j(y=>{var T,I;switch(h.dispose(),y.key){case K.Space:if(s.searchQuery!=="")return y.preventDefault(),y.stopPropagation(),u({type:3,value:y.key});case K.Enter:if(y.preventDefault(),y.stopPropagation(),u({type:1}),s.activeItemIndex!==null){let{dataRef:$}=s.items[s.activeItemIndex];(I=(T=$.current)==null?void 0:T.domRef.current)==null||I.click()}xn(s.buttonRef.current);break;case K.ArrowDown:return y.preventDefault(),y.stopPropagation(),u({type:2,focus:te.Next});case K.ArrowUp:return y.preventDefault(),y.stopPropagation(),u({type:2,focus:te.Previous});case K.Home:case K.PageUp:return y.preventDefault(),y.stopPropagation(),u({type:2,focus:te.First});case K.End:case K.PageDown:return y.preventDefault(),y.stopPropagation(),u({type:2,focus:te.Last});case K.Escape:y.preventDefault(),y.stopPropagation(),u({type:1}),ye().nextFrame(()=>{var $;return($=s.buttonRef.current)==null?void 0:$.focus({preventScroll:!0})});break;case K.Tab:y.preventDefault(),y.stopPropagation(),u({type:1}),ye().nextFrame(()=>{eo(s.buttonRef.current,y.shiftKey?Ie.Previous:Ie.Next)});break;default:y.key.length===1&&(u({type:3,value:y.key}),h.setTimeout(()=>u({type:4}),350));break}}),g=j(y=>{switch(y.key){case K.Space:y.preventDefault();break}}),x=a.useMemo(()=>({open:s.menuState===0}),[s]),E={"aria-activedescendant":s.activeItemIndex===null||(t=s.items[s.activeItemIndex])==null?void 0:t.id,"aria-labelledby":(r=s.buttonRef.current)==null?void 0:r.id,id:i,onKeyDown:v,onKeyUp:g,role:"menu",tabIndex:0,ref:d};return le({ourProps:E,theirProps:l,slot:x,defaultTag:rl,features:ol,visible:p,name:"Menu.Items"})}let ll=a.Fragment;function sl(e,n){let t=ve(),{id:r=`headlessui-menu-item-${t}`,disabled:o=!1,...i}=e,[l,s]=mt("Menu.Item"),u=l.activeItemIndex!==null?l.items[l.activeItemIndex].id===r:!1,d=a.useRef(null),f=ue(n,d);ee(()=>{if(l.__demoMode||l.menuState!==0||!u||l.activationTrigger===0)return;let $=ye();return $.requestAnimationFrame(()=>{var P,_;(_=(P=d.current)==null?void 0:P.scrollIntoView)==null||_.call(P,{block:"nearest"})}),$.dispose},[l.__demoMode,d,u,l.menuState,l.activationTrigger,l.activeItemIndex]);let h=qi(d),b=a.useRef({disabled:o,domRef:d,get textValue(){return h()}});ee(()=>{b.current.disabled=o},[b,o]),ee(()=>(s({type:5,id:r,dataRef:b}),()=>s({type:6,id:r})),[b,r]);let p=j(()=>{s({type:1})}),v=j($=>{if(o)return $.preventDefault();s({type:1}),xn(l.buttonRef.current)}),g=j(()=>{if(o)return s({type:2,focus:te.Nothing});s({type:2,focus:te.Specific,id:r})}),x=On(),E=j($=>x.update($)),y=j($=>{x.wasMoved($)&&(o||u||s({type:2,focus:te.Specific,id:r,trigger:0}))}),T=j($=>{x.wasMoved($)&&(o||u&&s({type:2,focus:te.Nothing}))}),I=a.useMemo(()=>({active:u,disabled:o,close:p}),[u,o,p]);return le({ourProps:{id:r,ref:f,role:"menuitem",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,disabled:void 0,onClick:v,onFocus:g,onPointerEnter:E,onMouseEnter:E,onPointerMove:y,onMouseMove:y,onPointerLeave:T,onMouseLeave:T},theirProps:i,slot:I,defaultTag:ll,name:"Menu.Item"})}let al=se(el),ul=se(nl),cl=se(il),dl=se(sl),pt=Object.assign(al,{Button:ul,Items:cl,Item:dl}),Gn=a.createContext(null);function Kn(){let e=a.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,Kn),n}return e}function fl(){let[e,n]=a.useState([]);return[e.length>0?e.join(" "):void 0,a.useMemo(()=>function(t){let r=j(i=>(n(l=>[...l,i]),()=>n(l=>{let s=l.slice(),u=s.indexOf(i);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(Gn.Provider,{value:o},t.children)},[n])]}let ml="label";function pl(e,n){let t=ve(),{id:r=`headlessui-label-${t}`,passive:o=!1,...i}=e,l=Kn(),s=ue(n);ee(()=>l.register(r),[r,l.register]);let u={ref:s,...l.props,id:r};return o&&("onClick"in u&&(delete u.htmlFor,delete u.onClick),"onClick"in i&&delete i.onClick),le({ourProps:u,theirProps:i,slot:l.slot||{},defaultTag:ml,name:l.name||"Label"})}let hl=se(pl),vl=Object.assign(hl,{});function gl(e=0){let[n,t]=a.useState(e),r=Xe(),o=a.useCallback(u=>{r.current&&t(d=>d|u)},[n,r]),i=a.useCallback(u=>!!(n&u),[n]),l=a.useCallback(u=>{r.current&&t(d=>d&~u)},[t,r]),s=a.useCallback(u=>{r.current&&t(d=>d^u)},[t]);return{flags:n,addFlag:o,hasFlag:i,removeFlag:l,toggleFlag:s}}let Jt=a.createContext(null);Jt.displayName="GroupContext";let bl=a.Fragment;function xl(e){var n;let[t,r]=a.useState(null),[o,i]=fl(),[l,s]=Hn(),u=a.useMemo(()=>({switch:t,setSwitch:r,labelledby:o,describedby:l}),[t,r,o,l]),d={},f=e;return a.createElement(s,{name:"Switch.Description"},a.createElement(i,{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(Jt.Provider,{value:u},le({ourProps:d,theirProps:f,defaultTag:bl,name:"Switch.Group"}))))}let wl="button";function yl(e,n){var t;let r=ve(),{id:o=`headlessui-switch-${r}`,checked:i,defaultChecked:l=!1,onChange:s,disabled:u=!1,name:d,value:f,form:h,...b}=e,p=a.useContext(Jt),v=a.useRef(null),g=ue(v,n,p===null?null:p.setSwitch),[x,E]=hn(i,s,l),y=j(()=>E==null?void 0:E(!x)),T=j(M=>{if(dt(M.currentTarget))return M.preventDefault();M.preventDefault(),y()}),I=j(M=>{M.key===K.Space?(M.preventDefault(),y()):M.key===K.Enter&&uo(M.currentTarget)}),$=j(M=>M.preventDefault()),P=a.useMemo(()=>({checked:x}),[x]),_={id:o,ref:g,role:"switch",type:At(e,v),tabIndex:e.tabIndex===-1?0:(t=e.tabIndex)!=null?t:0,"aria-checked":x,"aria-labelledby":p==null?void 0:p.labelledby,"aria-describedby":p==null?void 0:p.describedby,disabled:u,onClick:T,onKeyUp:I,onKeyPress:$},q=je();return a.useEffect(()=>{var M;let F=(M=v.current)==null?void 0:M.closest("form");F&&l!==void 0&&q.addEventListener(F,"reset",()=>{E(l)})},[v,E]),a.createElement(a.Fragment,null,d!=null&&x&&a.createElement(Ze,{features:ze.Hidden,...ct({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:u,form:h,checked:x,name:d,value:f})}),le({ourProps:_,theirProps:b,slot:P,defaultTag:wl,name:"Switch"}))}let El=se(yl),Sl=xl,Cl=Object.assign(El,{Group:Sl,Label:vl,Description:Un});function Tl(e){let n={called:!1};return(...t)=>{if(!n.called)return n.called=!0,e(...t)}}function Xt(e,...n){e&&n.length>0&&e.classList.add(...n)}function en(e,...n){e&&n.length>0&&e.classList.remove(...n)}function Ol(e,n){let t=ye();if(!e)return t.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[i,l]=[r,o].map(u=>{let[d=0]=u.split(",").filter(Boolean).map(f=>f.includes("ms")?parseFloat(f):parseFloat(f)*1e3).sort((f,h)=>h-f);return d}),s=i+l;if(s!==0){t.group(d=>{d.setTimeout(()=>{n(),d.dispose()},s),d.addEventListener(e,"transitionrun",f=>{f.target===f.currentTarget&&d.dispose()})});let u=t.addEventListener(e,"transitionend",d=>{d.target===d.currentTarget&&(n(),u())})}else n();return t.add(()=>n()),t.dispose}function jl(e,n,t,r){let o=t?"enter":"leave",i=ye(),l=r!==void 0?Tl(r):()=>{};o==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let s=ae(o,{enter:()=>n.enter,leave:()=>n.leave}),u=ae(o,{enter:()=>n.enterTo,leave:()=>n.leaveTo}),d=ae(o,{enter:()=>n.enterFrom,leave:()=>n.leaveFrom});return en(e,...n.base,...n.enter,...n.enterTo,...n.enterFrom,...n.leave,...n.leaveFrom,...n.leaveTo,...n.entered),Xt(e,...n.base,...s,...d),i.nextFrame(()=>{en(e,...n.base,...s,...d),Xt(e,...n.base,...s,...u),Ol(e,()=>(en(e,...n.base,...s),Xt(e,...n.base,...n.entered),l()))}),i.dispose}function Il({immediate:e,container:n,direction:t,classes:r,onStart:o,onStop:i}){let l=Xe(),s=je(),u=Se(t);ee(()=>{e&&(u.current="enter")},[e]),ee(()=>{let d=ye();s.add(d.dispose);let f=n.current;if(f&&u.current!=="idle"&&l.current)return d.dispose(),o.current(u.current),d.add(jl(f,r.current,u.current==="enter",()=>{d.dispose(),i.current(u.current)})),d.dispose},[t])}function Me(e=""){return e.split(/\s+/).filter(n=>n.length>1)}let ht=a.createContext(null);ht.displayName="TransitionContext";var $l=(e=>(e.Visible="visible",e.Hidden="hidden",e))($l||{});function kl(){let e=a.useContext(ht);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function Fl(){let e=a.useContext(vt);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let vt=a.createContext(null);vt.displayName="NestingContext";function gt(e){return"children"in e?gt(e.children):e.current.filter(({el:n})=>n.current!==null).filter(({state:n})=>n==="visible").length>0}function Zn(e,n){let t=Se(e),r=a.useRef([]),o=Xe(),i=je(),l=j((p,v=Pe.Hidden)=>{let g=r.current.findIndex(({el:x})=>x===p);g!==-1&&(ae(v,{[Pe.Unmount](){r.current.splice(g,1)},[Pe.Hidden](){r.current[g].state="hidden"}}),i.microTask(()=>{var x;!gt(r)&&o.current&&((x=t.current)==null||x.call(t))}))}),s=j(p=>{let v=r.current.find(({el:g})=>g===p);return v?v.state!=="visible"&&(v.state="visible"):r.current.push({el:p,state:"visible"}),()=>l(p,Pe.Unmount)}),u=a.useRef([]),d=a.useRef(Promise.resolve()),f=a.useRef({enter:[],leave:[],idle:[]}),h=j((p,v,g)=>{u.current.splice(0),n&&(n.chains.current[v]=n.chains.current[v].filter(([x])=>x!==p)),n==null||n.chains.current[v].push([p,new Promise(x=>{u.current.push(x)})]),n==null||n.chains.current[v].push([p,new Promise(x=>{Promise.all(f.current[v].map(([E,y])=>y)).then(()=>x())})]),v==="enter"?d.current=d.current.then(()=>n==null?void 0:n.wait.current).then(()=>g(v)):g(v)}),b=j((p,v,g)=>{Promise.all(f.current[v].splice(0).map(([x,E])=>E)).then(()=>{var x;(x=u.current.shift())==null||x()}).then(()=>g(v))});return a.useMemo(()=>({children:r,register:s,unregister:l,onStart:h,onStop:b,wait:d,chains:f}),[s,l,r,h,b,f,d])}function Nl(){}let Pl=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Qn(e){var n;let t={};for(let r of Pl)t[r]=(n=e[r])!=null?n:Nl;return t}function Ml(e){let n=a.useRef(Qn(e));return a.useEffect(()=>{n.current=Qn(e)},[e]),n}let Al="div",Jn=Ne.RenderStrategy;function Dl(e,n){var t,r;let{beforeEnter:o,afterEnter:i,beforeLeave:l,afterLeave:s,enter:u,enterFrom:d,enterTo:f,entered:h,leave:b,leaveFrom:p,leaveTo:v,...g}=e,x=a.useRef(null),E=ue(x,n),y=(t=g.unmount)==null||t?Pe.Unmount:Pe.Hidden,{show:T,appear:I,initial:$}=kl(),[P,_]=a.useState(T?"visible":"hidden"),q=Fl(),{register:M,unregister:F}=q;a.useEffect(()=>M(x),[M,x]),a.useEffect(()=>{if(y===Pe.Hidden&&x.current){if(T&&P!=="visible"){_("visible");return}return ae(P,{hidden:()=>F(x),visible:()=>M(x)})}},[P,x,M,F,T,y]);let R=Se({base:Me(g.className),enter:Me(u),enterFrom:Me(d),enterTo:Me(f),entered:Me(h),leave:Me(b),leaveFrom:Me(p),leaveTo:Me(v)}),Q=Ml({beforeEnter:o,afterEnter:i,beforeLeave:l,afterLeave:s}),z=Be();a.useEffect(()=>{if(z&&P==="visible"&&x.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[x,P,z]);let B=$&&!I,w=I&&T&&$,G=!z||B?"idle":T?"enter":"leave",W=gl(0),ie=j(be=>ae(be,{enter:()=>{W.addFlag(ce.Opening),Q.current.beforeEnter()},leave:()=>{W.addFlag(ce.Closing),Q.current.beforeLeave()},idle:()=>{}})),J=j(be=>ae(be,{enter:()=>{W.removeFlag(ce.Opening),Q.current.afterEnter()},leave:()=>{W.removeFlag(ce.Closing),Q.current.afterLeave()},idle:()=>{}})),ne=Zn(()=>{_("hidden"),F(x)},q),me=a.useRef(!1);Il({immediate:w,container:x,classes:R,direction:G,onStart:Se(be=>{me.current=!0,ne.onStart(x,be,ie)}),onStop:Se(be=>{me.current=!1,ne.onStop(x,be,J),be==="leave"&&!gt(ne)&&(_("hidden"),F(x))})});let ge=g,Ce={ref:E};return w?ge={...ge,className:at(g.className,...R.current.enter,...R.current.enterFrom)}:me.current&&(ge.className=at(g.className,(r=x.current)==null?void 0:r.className),ge.className===""&&delete ge.className),a.createElement(vt.Provider,{value:ne},a.createElement(_t,{value:ae(P,{visible:ce.Open,hidden:ce.Closed})|W.flags},le({ourProps:Ce,theirProps:ge,defaultTag:Al,features:Jn,visible:P==="visible",name:"Transition.Child"})))}function Ll(e,n){let{show:t,appear:r=!1,unmount:o=!0,...i}=e,l=a.useRef(null),s=ue(l,n);Be();let u=Qe();if(t===void 0&&u!==null&&(t=(u&ce.Open)===ce.Open),![!0,!1].includes(t))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[d,f]=a.useState(t?"visible":"hidden"),h=Zn(()=>{f("hidden")}),[b,p]=a.useState(!0),v=a.useRef([t]);ee(()=>{b!==!1&&v.current[v.current.length-1]!==t&&(v.current.push(t),p(!1))},[v,t]);let g=a.useMemo(()=>({show:t,appear:r,initial:b}),[t,r,b]);a.useEffect(()=>{if(t)f("visible");else if(!gt(h))f("hidden");else{let T=l.current;if(!T)return;let I=T.getBoundingClientRect();I.x===0&&I.y===0&&I.width===0&&I.height===0&&f("hidden")}},[t,h]);let x={unmount:o},E=j(()=>{var T;b&&p(!1),(T=e.beforeEnter)==null||T.call(e)}),y=j(()=>{var T;b&&p(!1),(T=e.beforeLeave)==null||T.call(e)});return a.createElement(vt.Provider,{value:h},a.createElement(ht.Provider,{value:g},le({ourProps:{...x,as:a.Fragment,children:a.createElement(Xn,{ref:s,...x,...i,beforeEnter:E,beforeLeave:y})},theirProps:{},defaultTag:a.Fragment,features:Jn,visible:d==="visible",name:"Transition"})))}function _l(e,n){let t=a.useContext(ht)!==null,r=Qe()!==null;return a.createElement(a.Fragment,null,!t&&r?a.createElement(tn,{ref:n,...e}):a.createElement(Xn,{ref:n,...e}))}let tn=se(Ll),Xn=se(Dl),Rl=se(_l),Re=Object.assign(tn,{Child:Rl,Root:tn});function Bl({title:e,titleId:n,...t},r){return C.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?C.createElement("title",{id:n},e):null,C.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 zl=C.forwardRef(Bl);function Wl({title:e,titleId:n,...t},r){return C.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?C.createElement("title",{id:n},e):null,C.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 Hl=C.forwardRef(Wl);function Ul({title:e,titleId:n,...t},r){return C.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?C.createElement("title",{id:n},e):null,C.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 Vl=C.forwardRef(Ul);function Yl({title:e,titleId:n,...t},r){return C.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?C.createElement("title",{id:n},e):null,C.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 ql=C.forwardRef(Yl);function Gl({title:e,titleId:n,...t},r){return C.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?C.createElement("title",{id:n},e):null,C.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 Kl=C.forwardRef(Gl);function Zl({title:e,titleId:n,...t},r){return C.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?C.createElement("title",{id:n},e):null,C.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=C.forwardRef(Zl);function Ql({title:e,titleId:n,...t},r){return C.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?C.createElement("title",{id:n},e):null,C.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 Jl=C.forwardRef(Ql);function Xl({title:e,titleId:n,...t},r){return C.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?C.createElement("title",{id:n},e):null,C.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 es=C.forwardRef(Xl);function ts({title:e,titleId:n,...t},r){return C.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?C.createElement("title",{id:n},e):null,C.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 ns=C.forwardRef(ts),bt={warning:{color:"bg-yellow-50",icon:m.jsx(Jl,{className:"h-5 w-5 text-yellow-400","aria-hidden":"true"}),colorTitle:"text-yellow-800",colorText:"text-yellow-700"},error:{color:"bg-red-50",icon:m.jsx(ns,{className:"h-5 w-5 text-red-400","aria-hidden":"true"}),colorTitle:"text-red-800",colorText:"text-red-700"},success:{color:"bg-green-50",icon:m.jsx(Vl,{className:"h-5 w-5 text-green-400","aria-hidden":"true"}),colorTitle:"text-green-800",colorText:"text-green-700"},info:{color:"bg-blue-50",icon:m.jsx(es,{className:"h-5 w-5 text-blue-400","aria-hidden":"true"}),colorTitle:"text-blue-800",colorText:"text-blue-700"}};let tr;const rs=({type:e="info",title:n,message:t,active:r=!1,time:o=1e3,dispatch:i})=>{const{width:l}=Tt(),[s,u]=a.useState(!1);return a.useEffect(()=>r?(tr=window.setTimeout(()=>{u(!1),i({type:"ALERT",payload:{title:"",message:"",typeAlert:"",active:!1}})},o),u(!0)):(u(!1),()=>window.clearTimeout(tr)),[r,i,o]),m.jsx("div",{className:"fixed top-2.5 w-80 3xs:w-96 z-50",style:{left:`calc(50% - ${l<=470?"160px":"192px"})`},children:m.jsx(Re,{as:a.Fragment,show:s,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:m.jsxs("div",{className:k("rounded-md p-4 text-center",bt[e].color),children:[m.jsxs("div",{className:"flex justify-center flex-shrink-0",children:[bt[e].icon,m.jsx("h3",{className:k("text-sm font-medium ml-3",bt[e].colorTitle),children:n})]}),m.jsx("div",{className:k("mt-2 text-sm",bt[e].colorText),children:m.jsx("p",{children:t})})]})})})};function os({title:e,titleId:n,...t},r){return C.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?C.createElement("title",{id:n},e):null,C.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 is=C.forwardRef(os);function ls({title:e,titleId:n,...t},r){return C.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?C.createElement("title",{id:n},e):null,C.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=C.forwardRef(ls);function as({title:e,titleId:n,...t},r){return C.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?C.createElement("title",{id:n},e):null,C.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"}),C.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=C.forwardRef(as);function cs({title:e,titleId:n,...t},r){return C.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?C.createElement("title",{id:n},e):null,C.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 ds=C.forwardRef(cs);function fs({title:e,titleId:n,...t},r){return C.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?C.createElement("title",{id:n},e):null,C.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 ms=C.forwardRef(fs),ps=({src:e,alt:n,width:t,height:r,className:o="",classNameIcon:i="",isIcon:l=!0,acronym:s=""})=>m.jsx(m.Fragment,{children:e?m.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:u=>u.currentTarget.style.filter="none","data-testid":"img"}):l?m.jsx(ds,{className:k("bg-white text-default-5",i!==""?i:"w-7 h-7")}):m.jsx("div",{className:k("bg-gray-200 text-default-5 rounded-full font-bold uppercase flex justify-center items-center",i!==""?i:"w-7 h-7")})}),hs=({steps:e,onClick:n})=>{const[t,r]=a.useState(0),o=i=>{r(i),n(i)};return m.jsx("nav",{className:"flex items-center justify-center w-full","aria-label":"Progress","data-testid":"bullets",children:m.jsx("ol",{role:"list",className:"flex items-center space-x-5",children:new Array(e).fill(1).map((i,l)=>m.jsx("li",{children:t!==l?m.jsx("div",{className:"cursor-pointer block h-2.5 w-2.5 rounded-full bg-gray-500 hover:bg-gray-600",onClick:()=>o(l),"data-testid":`step-${l}`,children:m.jsx("span",{className:"sr-only",children:"step"})}):m.jsxs("div",{className:"relative flex items-center justify-center cursor-pointer","aria-current":"step",children:[m.jsx("span",{className:"absolute flex h-5 w-5 p-px","aria-hidden":"true",children:m.jsx("span",{className:"h-full w-full rounded-full bg-gray-300"})}),m.jsx("span",{className:"relative block h-2.5 w-2.5 rounded-full bg-gray-500","aria-hidden":"true"}),m.jsx("span",{className:"sr-only",children:"step"})]})},l))})})};var nr={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 i="",l=0;l<arguments.length;l++){var s=arguments[l];s&&(i=o(i,r(s)))}return i}function r(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return t.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var l="";for(var s in i)n.call(i,s)&&i[s]&&(l=o(l,s));return l}function o(i,l){return l?i?i+" "+l:i+l:i}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(nr);var vs=nr.exports;const Ae=$r(vs),rr=({className:e="text-sm w-full rounded-md",children:n,icon:t=null,edge:r=null,disabled:o=!1,type:i="button",onClick:l,id:s})=>{const u=Ae({"ml-2":r==="start"&&t!==null,"mr-2":r==="end"&&t!==null});return m.jsxs("button",{className:N("flex justify-center items-center bg-white px-3 py-7px font-medium leading-6 text-white shadow-sm ring-1 ring-inset ring-gray-300 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 bg-gray-50",e),type:i,onClick:l,disabled:o,"data-testid":`button-outline-${s}`,id:`button-outline-${s}`,children:[r==="start"&&t!==null&&m.jsx("span",{children:t}),m.jsx("span",{className:N("flex",u),id:s,children:n}),r==="end"&&t!==null&&m.jsx("span",{children:t})]})},or=({children:e,className:n="",icon:t=null,edge:r=null,disabled:o=!1,type:i="button",onClick:l,id:s})=>{const u=Ae({"ml-2":r==="start"&&t!==null,"mr-2":r==="end"&&t!==null});return m.jsxs("button",{className:`${n} flex justify-center items-center`,edge:r,type:i,onClick:l,disabled:o,"data-testid":`button-${s}`,children:[r==="start"&&t!==null&&m.jsx("span",{children:t}),m.jsx("span",{className:u,children:e}),r==="end"&&t!==null&&m.jsx("span",{children:t})]})},xt=({children:e,classNameButton:n="bg-indigo-600 hover:bg-indigo-700 focus-visible:outline-indigo-600 shadow-indigo-500 rounded font-semibold px-3 py-1.5 text-white w-full",classNameText:t="",icon:r=null,edge:o=null,disabled:i=!1,type:l="button",onClick:s,id:u,outline:c="0px 0px 0px 2px #6366F1, 0px 0px 0px 2px #FFF, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameContainer:f=""})=>{const[h,b]=a.useState(!1),p=Ae({"ml-2":o==="start"&&r!==null,"mr-2":o==="end"&&r!==null}),v=()=>{s&&s()};return m.jsx("div",{className:N("rounded-md p-0.5",f!==""&&f),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:m.jsxs("button",{className:N("flex justify-center items-center text-sm leading-6 shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",i&&"text-white bg-gray-300 rounded focus:outline-none cursor-default",i?n.replace(/\bbg-\w+\b/g,""):n),type:l,onClick:v,onFocus:()=>b(!0),onBlur:()=>b(!1),disabled:i,"data-testid":`button-solid-${u}`,children:[o==="start"&&r!==null&&m.jsx("span",{className:"flex",children:r}),m.jsx("span",{className:N(t.length===0&&p,t.length!==0&&t),children:e}),o==="end"&&r!==null&&m.jsx("span",{children:r})]})})},gs=({label:e=null,checked:n=!1,onChange:t,id:r,className:o="",classNameCheckbox:i="h-4 w-4",style:l={},disabled:s=!1})=>{const[u,c]=a.useState(!1);return a.useEffect(()=>{c(n)},[n]),m.jsxs("div",{className:"flex items-center",style:l,"data-testid":`container-check-${r}`,children:[m.jsx("input",{checked:u,id:`${e}-${r}`,value:r,"aria-describedby":"comments-description",type:"checkbox",onChange:t,className:N("cursor-pointer rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",i!==""&&i),"data-testid":`checkbox-${r}`,disabled:s}),e!==null?m.jsx("label",{htmlFor:`${e}-${r}`,className:`ml-2.5 font-normal cursor-pointer ${o}`,id:`label-${r}`,"data-testid":"label",children:e}):null]})};function bs({title:e,titleId:n,...t},r){return T.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?T.createElement("title",{id:n},e):null,T.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const xs=T.forwardRef(bs);function ws({title:e,titleId:n,...t},r){return T.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?T.createElement("title",{id:n},e):null,T.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const ys=T.forwardRef(ws);function Es({title:e,titleId:n,...t},r){return T.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?T.createElement("title",{id:n},e):null,T.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const Ss=T.forwardRef(Es);function Ts({title:e,titleId:n,...t},r){return T.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?T.createElement("title",{id:n},e):null,T.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 Cs=T.forwardRef(Ts);function Os({title:e,titleId:n,...t},r){return T.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?T.createElement("title",{id:n},e):null,T.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 js=T.forwardRef(Os);function ir({children:e,className:n="sm:max-w-sm w-11/12 sm:my-8",classNameContainer:t="",isOpen:r=!1,setIsOpen:o,showIconSuccess:i=!0,showButton:l=!0}){return m.jsxs(m.Fragment,{children:[m.jsx("style",{children:`
35
+ */(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var i="",l=0;l<arguments.length;l++){var s=arguments[l];s&&(i=o(i,r(s)))}return i}function r(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return t.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var l="";for(var s in i)n.call(i,s)&&i[s]&&(l=o(l,s));return l}function o(i,l){return l?i?i+" "+l:i+l:i}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(nr);var vs=nr.exports;const Ae=$r(vs),rr=({className:e="text-sm w-full rounded-md",children:n,icon:t=null,edge:r=null,disabled:o=!1,type:i="button",onClick:l,id:s})=>{const u=Ae({"ml-2":r==="start"&&t!==null,"mr-2":r==="end"&&t!==null});return m.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:i,onClick:l,disabled:o,"data-testid":`button-outline-${s}`,id:`button-outline-${s}`,children:[r==="start"&&t!==null&&m.jsx("span",{children:t}),m.jsx("span",{className:k("flex",u),id:s,children:n}),r==="end"&&t!==null&&m.jsx("span",{children:t})]})},or=({children:e,className:n="",icon:t=null,edge:r=null,disabled:o=!1,type:i="button",onClick:l,id:s})=>{const u=Ae({"ml-2":r==="start"&&t!==null,"mr-2":r==="end"&&t!==null});return m.jsxs("button",{className:`${n} flex justify-center items-center`,edge:r,type:i,onClick:l,disabled:o,"data-testid":`button-${s}`,children:[r==="start"&&t!==null&&m.jsx("span",{children:t}),m.jsx("span",{className:u,children:e}),r==="end"&&t!==null&&m.jsx("span",{children:t})]})},xt=({children:e,classNameButton:n="bg-indigo-600 hover:bg-indigo-700 focus-visible:outline-indigo-600 shadow-indigo-500 rounded font-semibold px-3 py-1.5 text-white w-full",classNameText:t="",icon:r=null,edge:o=null,disabled:i=!1,type:l="button",onClick:s,id:u,outline:d="0px 0px 0px 2px #6366F1, 0px 0px 0px 2px #FFF, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameContainer:f=""})=>{const[h,b]=a.useState(!1),p=Ae({"ml-2":o==="start"&&r!==null,"mr-2":o==="end"&&r!==null}),v=()=>{s&&s()};return m.jsx("div",{className:k("rounded-md p-0.5",f!==""&&f),style:{boxShadow:h?d:"0px 0px 0px 0px #6366F1, 0px 0px 0px 0px #FFF, 0px 0px 0px 0px rgba(0, 0, 0, 0.05)",transition:"box-shadow .1s ease-in-out"},"data-testid":"container-button",children:m.jsxs("button",{className:k("flex justify-center items-center text-sm leading-6 shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",i&&"text-white bg-gray-300 rounded focus:outline-none cursor-default",i?n.replace(/\bbg-\w+\b/g,""):n),type:l,onClick:v,onFocus:()=>b(!0),onBlur:()=>b(!1),disabled:i,"data-testid":`button-solid-${u}`,children:[o==="start"&&r!==null&&m.jsx("span",{className:"flex",children:r}),m.jsx("span",{className:k(t.length===0&&p,t.length!==0&&t),children:e}),o==="end"&&r!==null&&m.jsx("span",{children:r})]})})},gs=({label:e=null,checked:n=!1,onChange:t,id:r,className:o="",classNameCheckbox:i="h-4 w-4",style:l={},disabled:s=!1})=>{const[u,d]=a.useState(!1);return a.useEffect(()=>{d(n)},[n]),m.jsxs("div",{className:"flex items-center",style:l,"data-testid":`container-check-${r}`,children:[m.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",i!==""&&i),"data-testid":`checkbox-${r}`,disabled:s}),e!==null?m.jsx("label",{htmlFor:`${e}-${r}`,className:`ml-2.5 font-normal cursor-pointer ${o}`,id:`label-${r}`,"data-testid":"label",children:e}):null]})};function bs({title:e,titleId:n,...t},r){return C.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?C.createElement("title",{id:n},e):null,C.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const xs=C.forwardRef(bs);function ws({title:e,titleId:n,...t},r){return C.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?C.createElement("title",{id:n},e):null,C.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const ys=C.forwardRef(ws);function Es({title:e,titleId:n,...t},r){return C.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?C.createElement("title",{id:n},e):null,C.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const Ss=C.forwardRef(Es);function Cs({title:e,titleId:n,...t},r){return C.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?C.createElement("title",{id:n},e):null,C.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 Ts=C.forwardRef(Cs);function Os({title:e,titleId:n,...t},r){return C.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?C.createElement("title",{id:n},e):null,C.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 js=C.forwardRef(Os);function ir({children:e,className:n="sm:max-w-sm w-11/12 sm:my-8",classNameContainer:t="",isOpen:r=!1,setIsOpen:o,showIconSuccess:i=!0,showButton:l=!0}){return m.jsxs(m.Fragment,{children:[m.jsx("style",{children:`
36
36
  .bg-opacity-35 {
37
37
  opacity: .35;
38
38
  }
39
- `}),m.jsx(Re.Root,{show:r,as:a.Fragment,children:m.jsxs(Vn,{as:"div",className:"relative z-50 relative",onClose:o,"data-testid":"modal",children:[m.jsx(Re.Child,{as:a.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:m.jsx("div",{className:"fixed inset-0 bg-opacity-35 bg-gray-900 transition-opacity","data-testid":"window-close",onClick:()=>o(!1)})}),m.jsx("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:m.jsx("div",{className:"flex min-h-full items-center justify-center xs:p-2 p-4 text-center sm:items-center sm:p-0",children:m.jsx(Re.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:m.jsxs(Vn.Panel,{className:N("relative transform rounded-lg bg-white px-4 pb-3 pt-5 text-left shadow-xl transition-all sm:w-full sm:pt-3 sm:px-3",n!==""&&n),children:[i&&m.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100",children:m.jsx(xs,{className:"h-6 w-6 text-green-600","aria-hidden":"true"})}),m.jsx("div",{className:N(t!==""&&t),"data-testid":"content",children:e}),l&&m.jsx("div",{className:"mt-5 sm:mt-6",children:m.jsx(xt,{id:"close-modal",onClick:()=>o(!1),children:"Cerrar"})}),m.jsx("button",{className:"opacity-0 absolute"})]})})})})]})})]})}const Is=({isOpenModalConfirmation:e,setIsOpenModalConfirmation:n,close:t,title:r="¿Estás seguro de abandonar la creación de la acción?",description:o="La información se perderá si no creas la acción",classNameTitle:i="",classNameDescription:l=""})=>{const s=()=>{n(!1),t()};return m.jsxs(ir,{isOpen:e,setIsOpen:()=>n(),showButton:!1,showIconSuccess:!1,children:[m.jsx("p",{className:N("text-center text-sm",i!==""&&i),children:r}),m.jsx("p",{className:N("text-center text-sm",l!==""&&l),children:o}),m.jsxs("div",{className:"flex w-full justify-center mt-5",children:[m.jsx(rr,{className:"rounded-md bg-white text-gray-500 text-sm shadow-sm ring-1 ring-inset ring-gray-300 bg-gray-50 w-24 h-9 mr-6",onClick:()=>n(),id:"cancel",children:"Cancelar"}),m.jsx(xt,{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"})]})]})},$s=({className:e="",style:n={}})=>m.jsx("div",{className:N("w-px",e!==""&&e),style:n}),Fs=({onClick:e,id:n="",className:t=""})=>m.jsxs("div",{className:N("flex items-center text-default-5",t!==""&&t),"data-testid":n,children:[m.jsx(is,{className:"w-3 h-3 3xs:w-4 3xs:h-4 stroke-current cursor-pointer","data-testid":"chevron-left-icon",onClick:e}),m.jsx("span",{onClick:e,className:"text-sm cursor-pointer","data-testid":"go-back",children:"Volver"})]}),nn=({placeholder:e="",label:n="",htmlFor:t,type:r="text",name:o,handleChange:i,onClick:l=()=>{},value:s,isReadOnly:u=!1,isError:c=!1,helperText:f="",autocomplete:h="on",id:b,classNameLabel:p="",classNameContainerInput:v="",classNameContainer:g="",className:x="",icon:E=null,onKeyDown:w,onFocus:C})=>{const[I,F]=a.useState(!1),k=Ae({"ring-red-300 focus:ring-red-300 text-red-900":c||I,"focus:ring-indigo-600 text-gray-500":!c&&!I}),U=q=>{if(i&&i(q),r!=="email")return;const{value:A}=q.target,M=cn(A);F(!M)};return m.jsxs("div",{"data-testid":`container-input-${b}`,className:g,children:[n!==""&&m.jsx("label",{htmlFor:t,className:N("block text-sm font-medium leading-6",p!==""?p:"text-gray-700"),"data-testid":`label-${b}`,children:n}),m.jsxs("div",{className:N("relative mt-1 rounded-md",v!==""&&v),children:[m.jsx("input",{id:b,name:o,type:r,autoComplete:h,placeholder:e,onChange:U,onClick:l,onKeyDown:w,onFocus:C,value:s,readOnly:u,"data-testid":`input-${b}`,className:N("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",k,x!==""&&x)}),E!==null&&m.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:E}),c&&E===null&&m.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:m.jsx(er,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),f.length===0||!c?null:m.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${b}`,children:f})]})};function wt({className:e="w-6 h-6",color:n="#3730a3"}){return m.jsxs("svg",{className:N("fill-current animate-spin",e),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:n,strokeWidth:"4",fill:"none"}),m.jsx("path",{fill:n,d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}function ks(){return m.jsxs("div",{className:"fixed top-0 left-0 right-0 bottom-0 w-full h-screen overflow-hidden bg-stone-600 opacity-75 flex flex-col items-center justify-center","data-testid":"spinner",style:{zIndex:60},children:[m.jsx("div",{className:"inline-block h-12 w-12 animate-[spinner-grow_0.75s_linear_infinite] rounded-full bg-current align-[-0.125em] opacity-0 motion-reduce:animate-[spinner-grow_1.5s_linear_infinite]",role:"status"}),m.jsx(wt,{className:"w-8 h-8 animate-spin"})]})}const lr=({height:e="36px",style:n={},label:t="",onChange:r,isReadOnly:o=!1,isError:i=!1,helperText:l="",name:s,id:u,className:c="",classNameLabel:f="",classNameInput:h="",options:b,value:p=-1,defaultValue:v={value:-1,label:"",iconStart:null,iconEnd:null},defaultLabel:g="label",defaultId:x="value",bgOptionSelect:E="bg-indigo-600",isSearch:w=!1,loading:C=!1})=>{const[I,F]=a.useState(""),[k,U]=a.useState(v),[q,A]=a.useState(!1);a.useEffect(()=>{if(p===-1||(b==null?void 0:b.length)===0)return;const $=b==null?void 0:b.find(y=>y[x]===p);$&&U($)},[p,b,x]),a.useEffect(()=>{p==="clear"&&(k.value!==v.value||k.label!==v.label)&&U(v)},[v,k,p]);const M=I===""?b:b.filter($=>$[g].toLowerCase().includes(I.toLowerCase())),R=Ae({"ring-red-300 focus:ring-red-300 text-red-900":i&&!o,"text-gray-500":!i,"focus:ring-indigo-600":!i&&!o}),K=Ae({"text-red-400":i&&!o,"text-gray-400":!i}),z=$=>{U($),r({target:{value:$,checked:!1,name:s,type:void 0,id:$[x]}})};return m.jsxs($e,{as:"div",value:k,onChange:z,children:[m.jsx($e.Label,{className:N("block text-sm font-medium leading-6 text-gray-500 mb-0.5",f!==""&&f),children:t}),m.jsxs("div",{className:N("relative",c!==""&&c),children:[m.jsxs($e.Button,{className:"w-full","data-testid":`listbox-button-${u}`,children:[k.iconStart&&m.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-2",children:k.iconStart}),m.jsx($e.Input,{className:N("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&&!o&&"ring-inset focus:ring-inset focus:ring-2 focus:ring-indigo-600",o&&"focus:ring-gray-300",R,h!==""&&h),onChange:$=>F($.target.value),displayValue:$=>{var y;return(y=$[g])==null?void 0:y.trim()},autoComplete:"false",readOnly:!w||o,style:{height:e,...n},"data-testid":"input-search",onClick:()=>A(o?!1:!q),onBlur:()=>A(!1)})]}),k.iconEnd&&m.jsx("span",{className:"absolute inset-y-0 right-4 flex items-center pr-4",children:k.iconEnd}),m.jsx($e.Button,{className:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",onClick:()=>A(o?!1:!q),"data-testid":"arrow-button",children:q?m.jsx(Kl,{className:N("h-5 w-5",K),"aria-hidden":"true"}):m.jsx(ql,{className:N("h-5 w-5",K),"aria-hidden":"true"})}),!o&&m.jsx(m.Fragment,{children:C?m.jsx($e.Options,{className:"absolute z-10 mt-1 max-h-60 w-full rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none flex justify-center items-center py-2",children:m.jsx(wt,{})}):(M??[]).length>0?m.jsx($e.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",children:M.map(($,y)=>m.jsx($e.Option,{value:$,className:N($[x]===k[x]?`${E} text-white`:"text-gray-900",`relative cursor-default select-none p-2 hover:text-white hover:${E}`),"data-testid":`select-${u}-${$[x]}`,children:m.jsxs("div",{className:"flex justify-between items-center",children:[m.jsxs("div",{className:"flex items-center",children:[$.iconStart&&m.jsx("span",{className:"mr-2","aria-hidden":"true",children:$.iconStart}),m.jsx("span",{className:"block font-normal break-all",children:$[g]})]}),$.iconEnd&&m.jsx("span",{className:"ml-2","aria-hidden":"true",children:$.iconEnd})]})},y))}):m.jsx($e.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm py-0.5 overflow-x-hidden flex justify-center items-center py-2",children:m.jsx("p",{"data-testid":"empty-options",children:"Sin opciones"})})})]}),l.length>0&&i&&m.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${u}`,children:l})]})},Ns=({placeholder:e="",label:n="",htmlFor:t,name:r,handleChange:o,onClick:i=()=>{},value:l,valueSelect:s,isReadOnly:u=!1,isError:c=!1,helperText:f="",autocomplete:h="on",id:b,classNameLabel:p="",classNameContainer:v="",className:g="",onKeyDown:x,options:E,idSelect:w})=>{const{width:C}=Ct(),I=Ae({"ring-red-300 focus:ring-red-300 text-red-900":c,"focus:ring-indigo-600 text-gray-500":!c});return m.jsxs("div",{"data-testid":`container-input-${b}`,className:v,children:[n!==""&&m.jsx("label",{htmlFor:t,className:N("block text-sm font-medium leading-6",p!==""?p:"text-gray-700"),"data-testid":`label-${b}`,children:n}),m.jsxs("div",{className:"relative mt-1 rounded-md shadow-sm",children:[m.jsx("div",{className:"absolute inset-y-0 -top-0.5 flex items-center",style:{left:"2px"},children:m.jsx(lr,{name:w,onChange:F=>o(F),id:w,options:E,value:s,isReadOnly:u,className:"w-20",height:C<=640?"28px":"32px",classNameInput:"ml-3.5",style:{paddingRight:0,width:"45px",boxShadow:"none"},isDisabledFocus:!0})}),m.jsx("input",{id:b,name:r,type:"text",autoComplete:h,placeholder:e,readOnly:u,"data-testid":`input-${b}`,onClick:i,onKeyDown:x,onChange:F=>o(F),value:l,className:N("block w-full rounded-md border-0 py-1.5 pl-20 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",I,g!==""&&g)}),c&&m.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:m.jsx(er,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),f.length===0||!c?null:m.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${b}`,children:f})]})},Ps=({setValuesDefault:e,status:n=!1})=>{const[t,r]=a.useState(!1);a.useEffect(()=>{r(n)},[n]);const o=()=>{r(!t),e("status",!t)};return m.jsxs("div",{className:"flex",children:[m.jsxs(Tl,{checked:t,onChange:o,className:N("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",t?"bg-success-1":"bg-gray-200"),children:[m.jsx("span",{className:"sr-only",children:"Use setting"}),m.jsx("span",{"aria-hidden":"true",className:N("pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",t?"translate-x-full":"translate-x-0")})]}),m.jsx("p",{className:"text-sm font-medium text-gray-500 ml-2 self-end",children:t?"Activo":"Inactivo"})]})};function Ms({label:e="",id:n,htmlFor:t="",classNameLabel:r="",className:o="",rows:i=4,name:l,placeholder:s="",helperText:u="",isReadOnly:c=!1,isError:f=!1,onChange:h,value:b,idInput:p,nameInput:v,placeholderInput:g="",isReadOnlyInput:x=!1,valueInput:E,infoTop:w=null,infoBottom:C=null,classNameInfoTop:I="h-4",classNameInfoBottom:F="h-2",isInputTitle:k=!1,scrollHeightTest:U=!1}){const q=a.useRef(null),[A,M]=a.useState(0);a.useEffect(()=>{const{current:K}=q;K===null||U||M(K.scrollHeight)},[q,b,U]),a.useEffect(()=>{U&&M(800)},[U]);const R=Ae({"ring-red-300 focus:ring-red-300 text-red-900":f,"focus:ring-indigo-600 text-gray-700":!f});return m.jsxs(m.Fragment,{children:[e!==""&&m.jsx("label",{htmlFor:t,className:N("leading-6 block text-sm",r!==""&&r),children:e}),m.jsxs("div",{className:"relative overflow-x-hidden",children:[w!==null&&m.jsx("div",{className:"absolute top-2 left-3 w-full",children:w}),m.jsxs("div",{className:N("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",R),children:[w!==null&&m.jsx("div",{className:"py-2","aria-hidden":"true",children:m.jsx("div",{className:"py-px",children:m.jsx("div",{className:I})})}),k&&m.jsx("textarea",{name:v,id:p,className:"block w-full resize-none border-0 bg-transparent py-1.5 text-gray-400 placeholder:text-gray-400 focus:ring-0 text-sm",placeholder:g,value:E,onChange:h,rows:2,readOnly:x}),m.jsx("textarea",{style:{height:A>0?A:"auto"},placeholder:s,rows:i,name:l,id:n,className:N(k?"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",R,o!==""&&o),readOnly:c,onChange:h,value:b,"data-testid":`textarea-${n}`,ref:q}),C!==null&&m.jsx("div",{className:"py-2","aria-hidden":"true",children:m.jsx("div",{className:"py-px",children:m.jsx("div",{className:F})})})]}),C!==null&&m.jsx("div",{className:"absolute bottom-2 left-3 w-full",children:C})]}),u.length>0&&f&&m.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${n}`,children:u})]})}const As=({className:e="",children:n,message:t=""})=>{const[r,o]=a.useState(!1),i=()=>{t!==""&&o(!0)},l=()=>{o(!1)};return m.jsx("div",{className:"relative",children:m.jsxs("div",{onMouseLeave:l.bind(null,r),"data-testid":"container-tooltip",children:[m.jsx("div",{className:`
39
+ `}),m.jsx(Re.Root,{show:r,as:a.Fragment,children:m.jsxs(Vn,{as:"div",className:"relative z-50 relative",onClose:o,"data-testid":"modal",children:[m.jsx(Re.Child,{as:a.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:m.jsx("div",{className:"fixed inset-0 bg-opacity-35 bg-gray-900 transition-opacity","data-testid":"window-close",onClick:()=>o(!1)})}),m.jsx("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:m.jsx("div",{className:"flex min-h-full items-center justify-center xs:p-2 p-4 text-center sm:items-center sm:p-0",children:m.jsx(Re.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:m.jsxs(Vn.Panel,{className:k("relative transform rounded-lg bg-white px-4 pb-3 pt-5 text-left shadow-xl transition-all sm:w-full sm:pt-3 sm:px-3",n!==""&&n),children:[i&&m.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100",children:m.jsx(xs,{className:"h-6 w-6 text-green-600","aria-hidden":"true"})}),m.jsx("div",{className:k(t!==""&&t),"data-testid":"content",children:e}),l&&m.jsx("div",{className:"mt-5 sm:mt-6",children:m.jsx(xt,{id:"close-modal",onClick:()=>o(!1),children:"Cerrar"})}),m.jsx("button",{className:"opacity-0 absolute"})]})})})})]})})]})}const Is=({isOpenModalConfirmation:e,setIsOpenModalConfirmation:n,close:t,title:r="¿Estás seguro de abandonar la creación de la acción?",description:o="La información se perderá si no creas la acción",classNameTitle:i="",classNameDescription:l=""})=>{const s=()=>{n(!1),t()};return m.jsxs(ir,{isOpen:e,setIsOpen:()=>n(),showButton:!1,showIconSuccess:!1,children:[m.jsx("p",{className:k("text-center text-sm",i!==""&&i),children:r}),m.jsx("p",{className:k("text-center text-sm",l!==""&&l),children:o}),m.jsxs("div",{className:"flex w-full justify-center mt-5",children:[m.jsx(rr,{className:"rounded-md bg-white text-gray-500 text-sm shadow-sm ring-1 ring-inset ring-gray-300 bg-gray-50 w-24 h-9 mr-6",onClick:()=>n(),id:"cancel",children:"Cancelar"}),m.jsx(xt,{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"})]})]})},$s=({className:e="",style:n={}})=>m.jsx("div",{className:k("w-px",e!==""&&e),style:n}),ks=({onClick:e,id:n="",className:t=""})=>m.jsxs("div",{className:k("flex items-center text-default-5",t!==""&&t),"data-testid":n,children:[m.jsx(is,{className:"w-3 h-3 3xs:w-4 3xs:h-4 stroke-current cursor-pointer","data-testid":"chevron-left-icon",onClick:e}),m.jsx("span",{onClick:e,className:"text-sm cursor-pointer","data-testid":"go-back",children:"Volver"})]}),nn=({placeholder:e="",label:n="",htmlFor:t,type:r="text",name:o,handleChange:i,onClick:l=()=>{},value:s,isReadOnly:u=!1,isError:d=!1,helperText:f="",autocomplete:h="on",id:b,classNameLabel:p="",classNameContainerInput:v="",classNameContainer:g="",className:x="",icon:E=null,onKeyDown:y,onFocus:T})=>{const[I,$]=a.useState(!1),P=Ae({"ring-red-300 focus:ring-red-300 text-red-900":d||I,"focus:ring-indigo-600 text-gray-500":!d&&!I}),_=q=>{if(i&&i(q),r!=="email")return;const{value:M}=q.target,F=cn(M);$(!F)};return m.jsxs("div",{"data-testid":`container-input-${b}`,className:g,children:[n!==""&&m.jsx("label",{htmlFor:t,className:k("block text-sm font-medium leading-6",p!==""?p:"text-gray-700"),"data-testid":`label-${b}`,children:n}),m.jsxs("div",{className:k("relative mt-1 rounded-md",v!==""&&v),children:[m.jsx("input",{id:b,name:o,type:r,autoComplete:h,placeholder:e,onChange:_,onClick:l,onKeyDown:y,onFocus:T,value:s,readOnly:u,"data-testid":`input-${b}`,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",P,x!==""&&x)}),E!==null&&m.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:E}),d&&E===null&&m.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:m.jsx(er,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),f.length===0||!d?null:m.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${b}`,children:f})]})};function wt({className:e="w-6 h-6",color:n="#3730a3"}){return m.jsxs("svg",{className:k("fill-current animate-spin",e),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:n,strokeWidth:"4",fill:"none"}),m.jsx("path",{fill:n,d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}function Fs(){return m.jsxs("div",{className:"fixed top-0 left-0 right-0 bottom-0 w-full h-screen overflow-hidden bg-stone-600 opacity-75 flex flex-col items-center justify-center","data-testid":"spinner",style:{zIndex:60},children:[m.jsx("div",{className:"inline-block h-12 w-12 animate-[spinner-grow_0.75s_linear_infinite] rounded-full bg-current align-[-0.125em] opacity-0 motion-reduce:animate-[spinner-grow_1.5s_linear_infinite]",role:"status"}),m.jsx(wt,{className:"w-8 h-8 animate-spin"})]})}const lr=({height:e="36px",style:n={},label:t="",onChange:r,isReadOnly:o=!1,isError:i=!1,helperText:l="",name:s,id:u,className:d="",classNameLabel:f="",classNameInput:h="",options:b,value:p=-1,defaultValue:v={value:-1,label:"",iconStart:null,iconEnd:null},defaultLabel:g="label",defaultId:x="value",bgOptionSelect:E="bg-indigo-600",isSearch:y=!1,loading:T=!1,isTest:I=!1})=>{const[$,P]=a.useState(""),[_,q]=a.useState(v),[M,F]=a.useState(!1);a.useEffect(()=>{if(p===-1||(b==null?void 0:b.length)===0)return;const w=b==null?void 0:b.find(G=>G[x]===p);w&&q(w)},[p,b,x]),a.useEffect(()=>{p==="clear"&&(_.value!==v.value||_.label!==v.label||I)&&q(v)},[v,I,_,p]);const R=$===""?b:b.filter(w=>w[g].toLowerCase().includes($.toLowerCase())),Q=Ae({"ring-red-300 focus:ring-red-300 text-red-900":i&&!o,"text-gray-500":!i,"focus:ring-indigo-600":!i&&!o}),z=Ae({"text-red-400":i&&!o,"text-gray-400":!i}),B=w=>{q(w),r({target:{value:w,checked:!1,name:s,type:void 0,id:w[x]}})};return m.jsxs($e,{as:"div",value:_,onChange:B,children:[m.jsx($e.Label,{className:k("block text-sm font-medium leading-6 text-gray-500 mb-0.5",f!==""&&f),children:t}),m.jsxs("div",{className:k("relative",d!==""&&d),children:[m.jsxs($e.Button,{className:"w-full","data-testid":`listbox-button-${u}`,children:[_.iconStart&&m.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-2",children:_.iconStart}),m.jsx($e.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&&!o&&"ring-inset focus:ring-inset focus:ring-2 focus:ring-indigo-600",o&&"focus:ring-gray-300",Q,h!==""&&h),onChange:w=>P(w.target.value),displayValue:w=>{var G;return(G=w[g])==null?void 0:G.trim()},autoComplete:"false",readOnly:!y||o,style:{height:e,...n},"data-testid":"input-search",onClick:()=>F(o?!1:!M),onBlur:()=>F(!1)})]}),_.iconEnd&&m.jsx("span",{className:"absolute inset-y-0 right-4 flex items-center pr-4",children:_.iconEnd}),m.jsx($e.Button,{className:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",onClick:()=>F(o?!1:!M),"data-testid":"arrow-button",children:M?m.jsx(Kl,{className:k("h-5 w-5",z),"aria-hidden":"true"}):m.jsx(ql,{className:k("h-5 w-5",z),"aria-hidden":"true"})}),!o&&m.jsx(m.Fragment,{children:T?m.jsx($e.Options,{className:"absolute z-10 mt-1 max-h-60 w-full rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none flex justify-center items-center py-2",children:m.jsx(wt,{})}):(R??[]).length>0?m.jsx($e.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",children:R.map((w,G)=>m.jsx($e.Option,{value:w,className:k(w[x]===_[x]?`${E} text-white`:"text-gray-900",`relative cursor-default select-none p-2 hover:text-white hover:${E}`),"data-testid":`select-${u}-${w[x]}`,children:m.jsxs("div",{className:"flex justify-between items-center",children:[m.jsxs("div",{className:"flex items-center",children:[w.iconStart&&m.jsx("span",{className:"mr-2","aria-hidden":"true",children:w.iconStart}),m.jsx("span",{className:"block font-normal break-all",children:w[g]})]}),w.iconEnd&&m.jsx("span",{className:"ml-2","aria-hidden":"true",children:w.iconEnd})]})},G))}):m.jsx($e.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm py-0.5 overflow-x-hidden flex justify-center items-center py-2",children:m.jsx("p",{"data-testid":"empty-options",children:"Sin opciones"})})})]}),l.length>0&&i&&m.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${u}`,children:l})]})},Ns=({placeholder:e="",label:n="",htmlFor:t,name:r,handleChange:o,onClick:i=()=>{},value:l,valueSelect:s,isReadOnly:u=!1,isError:d=!1,helperText:f="",autocomplete:h="on",id:b,classNameLabel:p="",classNameContainer:v="",className:g="",onKeyDown:x,options:E,idSelect:y})=>{const{width:T}=Tt(),I=Ae({"ring-red-300 focus:ring-red-300 text-red-900":d,"focus:ring-indigo-600 text-gray-500":!d});return m.jsxs("div",{"data-testid":`container-input-${b}`,className:v,children:[n!==""&&m.jsx("label",{htmlFor:t,className:k("block text-sm font-medium leading-6",p!==""?p:"text-gray-700"),"data-testid":`label-${b}`,children:n}),m.jsxs("div",{className:"relative mt-1 rounded-md shadow-sm",children:[m.jsx("div",{className:"absolute inset-y-0 -top-0.5 flex items-center",style:{left:"2px"},children:m.jsx(lr,{name:y,onChange:$=>o($),id:y,options:E,value:s,isReadOnly:u,className:"w-20",height:T<=640?"28px":"32px",classNameInput:"ml-3.5",style:{paddingRight:0,width:"45px",boxShadow:"none"},isDisabledFocus:!0})}),m.jsx("input",{id:b,name:r,type:"text",autoComplete:h,placeholder:e,readOnly:u,"data-testid":`input-${b}`,onClick:i,onKeyDown:x,onChange:$=>o($),value:l,className:k("block w-full rounded-md border-0 py-1.5 pl-20 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",I,g!==""&&g)}),d&&m.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:m.jsx(er,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),f.length===0||!d?null:m.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${b}`,children:f})]})},Ps=({setValuesDefault:e,status:n=!1})=>{const[t,r]=a.useState(!1);a.useEffect(()=>{r(n),e(!1)},[n,e]);const o=()=>{r(!t),e("status",!t)};return m.jsxs("div",{className:"flex",children:[m.jsxs(Cl,{checked:t,onChange:o,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",t?"bg-success-1":"bg-gray-200"),"data-testid":"switch",children:[m.jsx("span",{className:"sr-only",children:"Use setting"}),m.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",t?"translate-x-full":"translate-x-0")})]}),m.jsx("p",{className:"text-sm font-medium text-gray-500 ml-2 self-end","data-testid":"text-switch",children:t?"Activo":"Inactivo"})]})};function Ms({label:e="",id:n,htmlFor:t="",classNameLabel:r="",className:o="",rows:i=4,name:l,placeholder:s="",helperText:u="",isReadOnly:d=!1,isError:f=!1,onChange:h,value:b,idInput:p,nameInput:v,placeholderInput:g="",isReadOnlyInput:x=!1,valueInput:E,infoTop:y=null,infoBottom:T=null,classNameInfoTop:I="h-4",classNameInfoBottom:$="h-2",isInputTitle:P=!1,scrollHeightTest:_=!1}){const q=a.useRef(null),[M,F]=a.useState(0);a.useEffect(()=>{const{current:Q}=q;Q===null||_||F(Q.scrollHeight)},[q,b,_]),a.useEffect(()=>{_&&F(800)},[_]);const R=Ae({"ring-red-300 focus:ring-red-300 text-red-900":f,"focus:ring-indigo-600 text-gray-700":!f});return m.jsxs(m.Fragment,{children:[e!==""&&m.jsx("label",{htmlFor:t,className:k("leading-6 block text-sm",r!==""&&r),children:e}),m.jsxs("div",{className:"relative overflow-x-hidden",children:[y!==null&&m.jsx("div",{className:"absolute top-2 left-3 w-full",children:y}),m.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",R),children:[y!==null&&m.jsx("div",{className:"py-2","aria-hidden":"true",children:m.jsx("div",{className:"py-px",children:m.jsx("div",{className:I})})}),P&&m.jsx("textarea",{name:v,id:p,className:"block w-full resize-none border-0 bg-transparent py-1.5 text-gray-400 placeholder:text-gray-400 focus:ring-0 text-sm",placeholder:g,value:E,onChange:h,rows:2,readOnly:x}),m.jsx("textarea",{style:{height:M>0?M:"auto"},placeholder:s,rows:i,name:l,id:n,className:k(P?"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",R,o!==""&&o),readOnly:d,onChange:h,value:b,"data-testid":`textarea-${n}`,ref:q}),T!==null&&m.jsx("div",{className:"py-2","aria-hidden":"true",children:m.jsx("div",{className:"py-px",children:m.jsx("div",{className:$})})})]}),T!==null&&m.jsx("div",{className:"absolute bottom-2 left-3 w-full",children:T})]}),u.length>0&&f&&m.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${n}`,children:u})]})}const As=({className:e="",children:n,message:t=""})=>{const[r,o]=a.useState(!1),i=()=>{t!==""&&o(!0)},l=()=>{o(!1)};return m.jsx("div",{className:"relative",children:m.jsxs("div",{onMouseLeave:l.bind(null,r),"data-testid":"container-tooltip",children:[m.jsx("div",{className:`
40
40
  ${r?"":"text-opacity-90"}
41
- text-white group bg-orange-700 rounded-md inline-flex items-center text-base font-medium hover:text-opacity-100 focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,onMouseEnter:i.bind(null,r),onMouseLeave:l.bind(null,r),"data-testid":"open-tooltip",children:n}),m.jsx(Re,{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:r,children:m.jsx("div",{className:N("absolute z-20 px-4 mt-0 sm:px-0",e!==""&&e),children:m.jsx("div",{className:"bg-white p-2 text-center rounded-lg shadow-lg ring-1 ring-black ring-opacity-5",onMouseEnter:i.bind(null,r),onMouseLeave:l.bind(null,r),"data-testid":"message",children:t})})})]})})},Ds=({children:e,data:n,className:t="",classNameTooltip:r="w-full",classNameMenu:o="",classNameMenuItems:i="",classNameContainerSearch:l="px-5",isSelectMultiple:s=!1,optionsSelect:u,propObject:c="name",propId:f="id",textNewItem:h="",defaultId:b=null,loading:p=!1,search:v=null,searchPlaceHolder:g="Buscar...",valueSearch:x=void 0,idsOptionSelect:E=null,isComponent:w,hiddenMenu:C=!1,id:I,onClick:F=()=>{},isRelative:k=!0,isMaxWidth:U=!1,isTag:q=!1,isClear:A=!1,clear:M=null,applyButton:R=null,applyButtonText:K="Aplicar",tagsParent:z=[],isReadOnly:$,isDisabledApplyButton:y=!0,isOpenMenu:oe=void 0})=>{const[B,ie]=a.useState(new Set),[Q,te]=a.useState(new Map);a.useEffect(()=>{E!==null&&ie(new Set(new Set(E)))},[E]),a.useEffect(()=>{if(z.length===0)return;const P=new Map;z.forEach(Z=>P.set(Z.id,Z)),te(P)},[z]),a.useEffect(()=>{A&&(ie(new Set),te(new Map),M&&M())},[M,A]);const me=P=>{let Z=new Map(Q),ne=new Set(B),we=null;if(b!==null&&(P[f]===b&&(we=crypto.randomUUID()),we!==null&&(P[f]=we),we!==null&&(P[c]=P[c].replace(h,"").trim())),ne.has(P[f])?ne.delete(P[f]):ne.add(P[f]),Z.has(P[f])?Z.delete(P[f]):Z.set(P[f],P),!s){const D=Array.from(ne),V=Array.from(Z);D.shift(),V.shift(),ne=ne.size===2?new Set(D):ne,Z=Z.size===2?new Map(V):Z}u(P,Array.from(ne),we!==null),ie(ne),te(Z)},ge=P=>{F(P===!0?-1:I)},Te=P=>{const Z=new Set(B),ne=new Map(Q);Z.delete(P[f]),ne.delete(P[f]),u(P,Array.from(Z)),ie(Z),te(ne)};function be(P){if(typeof P!="string")return P;const Z=P.toLowerCase();return Z.charAt(0).toUpperCase()+Z.slice(1)}return m.jsxs(pt,{as:"div",className:N("inline-block text-left",k&&"relative",o!==""&&o),onClick:()=>ge(!0),"data-testid":`menu-${I}`,id:I,children:[m.jsx("style",{children:`
41
+ text-white group bg-orange-700 rounded-md inline-flex items-center text-base font-medium hover:text-opacity-100 focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,onMouseEnter:i.bind(null,r),onMouseLeave:l.bind(null,r),"data-testid":"open-tooltip",children:n}),m.jsx(Re,{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:r,children:m.jsx("div",{className:k("absolute z-20 px-4 mt-0 sm:px-0",e!==""&&e),children:m.jsx("div",{className:"bg-white p-2 text-center rounded-lg shadow-lg ring-1 ring-black ring-opacity-5",onMouseEnter:i.bind(null,r),onMouseLeave:l.bind(null,r),"data-testid":"message",children:t})})})]})})},Ds=({children:e,data:n,className:t="",classNameTooltip:r="w-full",classNameMenu:o="",classNameMenuItems:i="",classNameContainerSearch:l="px-5",isSelectMultiple:s=!1,optionsSelect:u,propObject:d="name",propId:f="id",textNewItem:h="",defaultId:b=null,loading:p=!1,search:v=null,searchPlaceHolder:g="Buscar...",valueSearch:x=void 0,idsOptionSelect:E=null,isComponent:y,hiddenMenu:T=!1,id:I,onClick:$=()=>{},isRelative:P=!0,isMaxWidth:_=!1,isTag:q=!1,isClear:M=!1,clear:F=null,applyButton:R=null,applyButtonText:Q="Aplicar",tagsParent:z=[],isReadOnly:B,isDisabledApplyButton:w=!0,isOpenMenu:G=void 0})=>{const[W,ie]=a.useState(new Set),[J,ne]=a.useState(new Map);a.useEffect(()=>{E!==null&&ie(new Set(new Set(E)))},[E]),a.useEffect(()=>{if(z.length===0)return;const N=new Map;z.forEach(Z=>N.set(Z.id,Z)),ne(N)},[z]),a.useEffect(()=>{M&&(ie(new Set),ne(new Map),F&&F())},[F,M]);const me=N=>{let Z=new Map(J),re=new Set(W),we=null;if(b!==null&&(N[f]===b&&(we=crypto.randomUUID()),we!==null&&(N[f]=we),we!==null&&(N[d]=N[d].replace(h,"").trim())),re.has(N[f])?re.delete(N[f]):re.add(N[f]),Z.has(N[f])?Z.delete(N[f]):Z.set(N[f],N),!s){const A=Array.from(re),V=Array.from(Z);A.shift(),V.shift(),re=re.size===2?new Set(A):re,Z=Z.size===2?new Map(V):Z}u(N,Array.from(re),we!==null),ie(re),ne(Z)},ge=N=>{$(N===!0?-1:I)},Ce=N=>{const Z=new Set(W),re=new Map(J);Z.delete(N[f]),re.delete(N[f]),u(N,Array.from(Z)),ie(Z),ne(re)};function be(N){if(typeof N!="string")return N;const Z=N.toLowerCase();return Z.charAt(0).toUpperCase()+Z.slice(1)}return m.jsxs(pt,{as:"div",className:k("inline-block text-left",P&&"relative",o!==""&&o),onClick:()=>ge(!0),"data-testid":`menu-${I}`,id:I,children:[m.jsx("style",{children:`
42
42
  .blue {
43
43
  background-color: #3758F9;
44
44
  }
@@ -55,4 +55,4 @@ Check the top-level render call using <`+O+">.")}return S}}function gr(d,S){{if(
55
55
  width: 414px;
56
56
  }
57
57
  }
58
- `}),m.jsx(pt.Button,{as:"div",onClick:()=>ge(C),"data-testid":`menu-button-${I}`,children:e}),m.jsx("div",{className:N("absolute right-0 z-10",r,C&&"hidden",p&&"w-full"),children:m.jsx(Re,{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:oe,children:m.jsx(pt.Items,{className:N("mt-1 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",p?"w-full":i===""&&"w-max",i!==""&&i),children:p?m.jsx("div",{className:"flex justify-center py-4",children:m.jsx(wt,{})}):m.jsxs("div",{className:N(!w&&"pb-1","divide-y divide-gray-100",t!==""&&t,U&&"w-custom"),"data-testid":"dropdown-menu",children:[m.jsxs("div",{className:"flex justify-between items-center sticky top-0 bg-white w-full",children:[v!==null&&m.jsx("div",{className:N("py-2 w-full",l),children:m.jsx(nn,{htmlFor:"search",id:`dropdown-search-${I}`,name:"search",type:"text",placeholder:g,handleChange:P=>v(P,I),icon:g!==""&&m.jsx(ss,{className:"w-4 h-4 text-indigo-300"}),className:"pl-5 pr-4 h-8",classNameContainerInput:"w-full",value:x,onKeyDown:P=>P.key===" "&&P.stopPropagation()})}),R!==null&&m.jsx("div",{className:"pl-1 pr-2 pt-1.5",children:m.jsx(xt,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 font-medium px-5 py-1.5 rounded-md",outline:B.size===0&&y?"":"0px 0px 0px 2px #3758F9, 0px 0px 0px 2px #243BBD, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameText:"text-sm text-white text-center",id:"apply",disabled:B.size===0&&y,onClick:()=>R({id:I,items:Array.from(Q.values())}),children:K})})]}),q&&!$&&m.jsx("div",{className:"flex flex-wrap ml-7 pt-1",children:Array.from(Q).map((P,Z)=>m.jsx("div",{className:N(Z>0&&"ml-1"),children:m.jsxs("span",{className:"inline-flex items-center gap-x-0.5 rounded-md bg-gray-100 px-2 py-1 text-xs font-medium text-gray-600 mb-1",children:[P[1][c],m.jsx("button",{type:"button",className:"p-0.5 rounded-sm bg-gray-100 hover:bg-gray-300",onClick:()=>Te(P[1]),"data-testid":`tag-${P[0]}`,children:m.jsx(ms,{className:"h-2.5 w-2.5 stroke-gray-700/50 group-hover:stroke-gray-700/75"})})]})},P))}),($?[]:n).map((P,Z)=>m.jsx("div",{className:N(!w&&"py-1"),children:w?m.jsx("div",{onClick:ne=>{ne.preventDefault(),u()},"data-testid":`item-component-${Z}`,children:P}):m.jsx(pt.Item,{children:m.jsx("span",{className:N(B.has(P[f])&&"blue text-white",!B.has(P[f])&&"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-${Z}`,onClick:ne=>{ne.preventDefault(),me(P)},children:be(P[c])})})},Z))]})})})})]})},sr=50,Ls=({total:e,handleNext:n,handlePrev:t,handleSelectPage:r,page:o=null})=>{const[i,l]=a.useState(1),[s,u]=a.useState([]),[c,f]=a.useState([]),h=Math.ceil(e/sr);a.useEffect(()=>{const g=[];for(let x=1;x<=h;x++)g.push(x);f(g)},[h]),a.useEffect(()=>{let g=[];const x="...",E="... ",w=" ...";if(c.length<6)g=c;else if(i>=1&&i<=3)g=[1,2,3,4,x,c.length];else if(i===4)g=[...c.slice(0,5),x,c.length];else if(i>4&&i<c.length-2){const C=c.slice(i-2,i),I=c.slice(i,i+1);g=[1,E,...C,...I,w,c.length]}else if(i>c.length-3){const C=c.slice(c.length-4);g=[1,E,...C]}u(g)},[i,c]),a.useEffect(()=>{o!==null&&o!==i&&l(o)},[o,i]);const b=g=>{l(g),r(g)},p=()=>{l(i===1?i:i-1),i>1&&t(i-1)},v=()=>{i===c.length?l(i):l(i+1),i<c.length&&n(i+1)};return m.jsxs("nav",{className:"flex items-center justify-between border-t border-gray-200 px-4 sm:px-0",children:[m.jsx("div",{className:"-mt-px flex w-0 flex-1",children:m.jsxs("span",{className:"inline-flex items-center border-t-2 border-transparent pr-1 pt-4 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700 cursor-pointer",onClick:p,"data-testid":"prev",children:[m.jsx(zl,{className:"mr-3 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Anterior"]})}),m.jsx("div",{className:"hidden md:-mt-px md:flex",children:s.map((g,x)=>m.jsx(or,{className:N("inline-flex items-center border-t-2 px-4 pt-4 text-sm font-medium",i===g?"border-indigo-500 text-indigo-600":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700"),"aria-current":"page",onClick:()=>g!=="..."&&g!==" ..."&&g!=="... "&&b(g),id:`page-${x+1}`,children:g},x))}),m.jsx("div",{className:"-mt-px flex w-0 flex-1 justify-end",children:m.jsxs("span",{className:"inline-flex items-center border-t-2 border-transparent pl-1 pt-4 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700 cursor-pointer",onClick:v,"data-testid":"next",children:["Siguiente",m.jsx(Hl,{className:"ml-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]})})]})},_s=({openDefault:e=!1,setForm:n,setValuesDefault:t,title:r,type:o,data:i,dataSelect:l,setData:s,Component:u,id:c,defaultData:f,dispatch:h,isAdd:b=!0,search:p=null,isPadding:v=!0,isReadOnly:g=!1,isEdit:x=!1})=>{const[E,w]=a.useState(!1),[C,I]=a.useState(!1),[F,k]=a.useState(!1),[U,q]=a.useState("");a.useEffect(()=>{w(e),I(x),k(g)},[e,x,g]);const A=({e:z,index:$})=>{const y=Tt(i),{name:oe,value:B}=z.target;y[$][oe]=B,s(y),t(c,y),n(ie=>({...ie,[c]:y}))},M=()=>{if(i.some($=>Object.values($).some(B=>B.value===-1))||i.length===0)return h({type:"ALERT",payload:{title:"",message:"Todos los campos son requeridos",typeAlert:"warning",active:!0}});n($=>({...$,data:i})),t(c,i),s([...i,f])},R=z=>{if(z===i.length-1)return;const $=Tt(i);$.splice(z,1),n(y=>({...y,copyData:$})),t(c,$),s($)},K=()=>{I(!C),k(!1)};return m.jsxs("div",{className:"divide-y divide-gray-200 rounded-lg bg-white shadow mt-7",children:[m.jsxs("div",{className:"px-4 py-3.5 sm:px-6 flex justify-between items-center cursor-pointer",onClick:()=>w(!E),"data-testid":`open-accordion-${c}`,children:[m.jsx("p",{className:"text-gray-500 uppercase text-xs font-bold",children:r}),m.jsxs("div",{className:"flex items-center",children:[p&&m.jsx(nn,{htmlFor:"search",id:"search",name:"search",type:"text",autoComplete:"search",placeholder:"Buscar...",handleChange:z=>{p(z),q(z.target.value)},icon:m.jsx(Cs,{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:U,onClick:z=>z.stopPropagation(),onFocus:()=>w(!0)}),E?m.jsx(Ss,{className:"w-5 h-5 text-default-5"}):m.jsx(ys,{className:"w-5 h-5 text-default-5"})]})]}),m.jsx(Re,{as:a.Fragment,show:E,enter:"transition duration-[400ms]",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-200 transition ease-in-out",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:m.jsxs("div",{className:N("sm:mt-2.5 py-3.5 relative",v&&"px-4 sm:p-6"),children:[C&&m.jsx(us,{className:"w-5 h-5 text-gray-400 cursor-pointer absolute right-4",onClick:K,"data-testid":`edit-role-${c}`}),i.map((z,$)=>m.jsxs("div",{className:N("flex flex-col 3xs:flex-row mb-4",v&&"ml-0 3xs:ml-3"),children:[m.jsx(u,{item:z,index:$,handleChange:A,readOnly:F,dataSelect:l}),b&&!F&&m.jsx("div",{style:{backgroundColor:"#B0B8BF",width:"25px",height:"25px"},className:N("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&&"3xs:opacity-0"),children:m.jsx(js,{className:N("w-6 h-4",$!==i.length-1&&"cursor-pointer"),style:{color:"#637381"},strokeWidth:2.5,onClick:()=>R($),"data-testid":`delete-item-${$}-${c}`})})]},$)),b&&!F&&m.jsx("p",{className:"text-secondary-2 text-sm font-medium ml-3 cursor-pointer",onClick:M,"data-testid":`add-item-${c}`,children:`+ Añadir ${o}`})]})})]})};_.Accordion=_s,_.Alert=rs,_.Avatar=ps,_.Bullets=hs,_.ButtonOutline=rr,_.ButtonPagination=or,_.ButtonSolid=xt,_.Checkbox=gs,_.ConfirmationAbandoningCreation=Is,_.Divider=$s,_.Dropdown=Ds,_.GoBack=Fs,_.Input=nn,_.InputDropdown=Ns,_.MESSAGE_ABORT_CONTROLLER=Tr,_.MESSAGE_SIGNAL_ABORTED_WITHOUT_REASON=Cr,_.Modal=ir,_.Pagination=Ls,_.Select=lr,_.Spinner=ks,_.SpinnerIcon=wt,_.Switch=Ps,_.Textarea=Ms,_.Tooltip=As,_.classNames=N,_.copyOptions=Tt,_.generateAvatarInitials=Er,_.isPromise=Sr,_.rowsPerPage=sr,_.useCloseModal=Or,_.useForm=jr,_.useMediaQuery=Ir,_.useWindowDimensions=Ct,_.validateEmail=cn,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})});
58
+ `}),m.jsx(pt.Button,{as:"div",onClick:()=>ge(T),"data-testid":`menu-button-${I}`,children:e}),m.jsx("div",{className:k("absolute right-0 z-10",r,T&&"hidden",p&&"w-full"),children:m.jsx(Re,{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:G,children:m.jsx(pt.Items,{className:k("mt-1 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",p?"w-full":i===""&&"w-max",i!==""&&i),children:p?m.jsx("div",{className:"flex justify-center py-4",children:m.jsx(wt,{})}):m.jsxs("div",{className:k(!y&&"pb-1","divide-y divide-gray-100",t!==""&&t,_&&"w-custom"),"data-testid":"dropdown-menu",children:[m.jsxs("div",{className:"flex justify-between items-center sticky top-0 bg-white w-full",children:[v!==null&&m.jsx("div",{className:k("py-2 w-full",l),children:m.jsx(nn,{htmlFor:"search",id:`dropdown-search-${I}`,name:"search",type:"text",placeholder:g,handleChange:N=>v(N,I),icon:g!==""&&m.jsx(ss,{className:"w-4 h-4 text-indigo-300"}),className:"pl-5 pr-4 h-8",classNameContainerInput:"w-full",value:x,onKeyDown:N=>N.key===" "&&N.stopPropagation()})}),R!==null&&m.jsx("div",{className:"pl-1 pr-2 pt-1.5",children:m.jsx(xt,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 font-medium px-5 py-1.5 rounded-md",outline:W.size===0&&w?"":"0px 0px 0px 2px #3758F9, 0px 0px 0px 2px #243BBD, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameText:"text-sm text-white text-center",id:"apply",disabled:W.size===0&&w,onClick:()=>R({id:I,items:Array.from(J.values())}),children:Q})})]}),q&&!B&&m.jsx("div",{className:"flex flex-wrap ml-7 pt-1",children:Array.from(J).map((N,Z)=>m.jsx("div",{className:k(Z>0&&"ml-1"),children:m.jsxs("span",{className:"inline-flex items-center gap-x-0.5 rounded-md bg-gray-100 px-2 py-1 text-xs font-medium text-gray-600 mb-1",children:[N[1][d],m.jsx("button",{type:"button",className:"p-0.5 rounded-sm bg-gray-100 hover:bg-gray-300",onClick:()=>Ce(N[1]),"data-testid":`tag-${N[0]}`,children:m.jsx(ms,{className:"h-2.5 w-2.5 stroke-gray-700/50 group-hover:stroke-gray-700/75"})})]})},N))}),(B?[]:n).map((N,Z)=>m.jsx("div",{className:k(!y&&"py-1"),children:y?m.jsx("div",{onClick:re=>{re.preventDefault(),u()},"data-testid":`item-component-${Z}`,children:N}):m.jsx(pt.Item,{children:m.jsx("span",{className:k(W.has(N[f])&&"blue text-white",!W.has(N[f])&&"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-${Z}`,onClick:re=>{re.preventDefault(),me(N)},children:be(N[d])})})},Z))]})})})})]})},sr=50,Ls=({total:e,handleNext:n,handlePrev:t,handleSelectPage:r,page:o=null})=>{const[i,l]=a.useState(1),[s,u]=a.useState([]),[d,f]=a.useState([]),h=Math.ceil(e/sr);a.useEffect(()=>{const g=[];for(let x=1;x<=h;x++)g.push(x);f(g)},[h]),a.useEffect(()=>{let g=[];const x="...",E="... ",y=" ...";if(d.length<6)g=d;else if(i>=1&&i<=3)g=[1,2,3,4,x,d.length];else if(i===4)g=[...d.slice(0,5),x,d.length];else if(i>4&&i<d.length-2){const T=d.slice(i-2,i),I=d.slice(i,i+1);g=[1,E,...T,...I,y,d.length]}else if(i>d.length-3){const T=d.slice(d.length-4);g=[1,E,...T]}u(g)},[i,d]),a.useEffect(()=>{o!==null&&o!==i&&l(o)},[o,i]);const b=g=>{l(g),r(g)},p=()=>{l(i===1?i:i-1),i>1&&t(i-1)},v=()=>{i===d.length?l(i):l(i+1),i<d.length&&n(i+1)};return m.jsxs("nav",{className:"flex items-center justify-between border-t border-gray-200 px-4 sm:px-0",children:[m.jsx("div",{className:"-mt-px flex w-0 flex-1",children:m.jsxs("span",{className:"inline-flex items-center border-t-2 border-transparent pr-1 pt-4 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700 cursor-pointer",onClick:p,"data-testid":"prev",children:[m.jsx(zl,{className:"mr-3 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Anterior"]})}),m.jsx("div",{className:"hidden md:-mt-px md:flex",children:s.map((g,x)=>m.jsx(or,{className:k("inline-flex items-center border-t-2 px-4 pt-4 text-sm font-medium",i===g?"border-indigo-500 text-indigo-600":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700"),"aria-current":"page",onClick:()=>g!=="..."&&g!==" ..."&&g!=="... "&&b(g),id:`page-${x+1}`,children:g},x))}),m.jsx("div",{className:"-mt-px flex w-0 flex-1 justify-end",children:m.jsxs("span",{className:"inline-flex items-center border-t-2 border-transparent pl-1 pt-4 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700 cursor-pointer",onClick:v,"data-testid":"next",children:["Siguiente",m.jsx(Hl,{className:"ml-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]})})]})},_s=({openDefault:e=!1,setForm:n,setValuesDefault:t,title:r,type:o,data:i,dataSelect:l,setData:s,Component:u,id:d,defaultData:f,dispatch:h,isAdd:b=!0,search:p=null,isPadding:v=!0,isReadOnly:g=!1,isEdit:x=!1})=>{const[E,y]=a.useState(!1),[T,I]=a.useState(!1),[$,P]=a.useState(!1),[_,q]=a.useState("");a.useEffect(()=>{y(e),I(x),P(g)},[e,x,g]);const M=({e:z,index:B})=>{const w=Ct(i),{name:G,value:W}=z.target;w[B][G]=W,s(w),t(d,w),n(ie=>({...ie,[d]:w}))},F=()=>{if(i.some(B=>Object.values(B).some(W=>W.value===-1))||i.length===0)return h({type:"ALERT",payload:{title:"",message:"Todos los campos son requeridos",typeAlert:"warning",active:!0}});n(B=>({...B,data:i})),t(d,i),s([...i,f])},R=z=>{if(z===i.length-1)return;const B=Ct(i);B.splice(z,1),n(w=>({...w,copyData:B})),t(d,B),s(B)},Q=()=>{I(!T),P(!1)};return m.jsxs("div",{className:"divide-y divide-gray-200 rounded-lg bg-white shadow mt-7",children:[m.jsxs("div",{className:"px-4 py-3.5 sm:px-6 flex justify-between items-center cursor-pointer",onClick:()=>y(!E),"data-testid":`open-accordion-${d}`,children:[m.jsx("p",{className:"text-gray-500 uppercase text-xs font-bold",children:r}),m.jsxs("div",{className:"flex items-center",children:[p&&m.jsx(nn,{htmlFor:"search",id:"search",name:"search",type:"text",autoComplete:"search",placeholder:"Buscar...",handleChange:z=>{p(z),q(z.target.value)},icon:m.jsx(Ts,{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:_,onClick:z=>z.stopPropagation(),onFocus:()=>y(!0)}),E?m.jsx(Ss,{className:"w-5 h-5 text-default-5"}):m.jsx(ys,{className:"w-5 h-5 text-default-5"})]})]}),m.jsx(Re,{as:a.Fragment,show:E,enter:"transition duration-[400ms]",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-200 transition ease-in-out",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:m.jsxs("div",{className:k("sm:mt-2.5 py-3.5 relative",v&&"px-4 sm:p-6"),children:[T&&m.jsx(us,{className:"w-5 h-5 text-gray-400 cursor-pointer absolute right-4",onClick:Q,"data-testid":`edit-role-${d}`}),i.map((z,B)=>m.jsxs("div",{className:k("flex flex-col 3xs:flex-row mb-4",v&&"ml-0 3xs:ml-3"),children:[m.jsx(u,{item:z,index:B,handleChange:M,readOnly:$,dataSelect:l}),b&&!$&&m.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",B===i.length-1&&"3xs:opacity-0"),children:m.jsx(js,{className:k("w-6 h-4",B!==i.length-1&&"cursor-pointer"),style:{color:"#637381"},strokeWidth:2.5,onClick:()=>R(B),"data-testid":`delete-item-${B}-${d}`})})]},B)),b&&!$&&m.jsx("p",{className:"text-secondary-2 text-sm font-medium ml-3 cursor-pointer",onClick:F,"data-testid":`add-item-${d}`,children:`+ Añadir ${o}`})]})})]})};L.Accordion=_s,L.Alert=rs,L.Avatar=ps,L.Bullets=hs,L.ButtonOutline=rr,L.ButtonPagination=or,L.ButtonSolid=xt,L.Checkbox=gs,L.ConfirmationAbandoningCreation=Is,L.Divider=$s,L.Dropdown=Ds,L.GoBack=ks,L.Input=nn,L.InputDropdown=Ns,L.MESSAGE_ABORT_CONTROLLER=Cr,L.MESSAGE_SIGNAL_ABORTED_WITHOUT_REASON=Tr,L.Modal=ir,L.Pagination=Ls,L.Select=lr,L.Spinner=Fs,L.SpinnerIcon=wt,L.Switch=Ps,L.Textarea=Ms,L.Tooltip=As,L.classNames=k,L.copyOptions=Ct,L.generateAvatarInitials=Er,L.isPromise=Sr,L.rowsPerPage=sr,L.useCloseModal=Or,L.useForm=jr,L.useMediaQuery=Ir,L.useWindowDimensions=Tt,L.validateEmail=cn,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cemtrik-dependencies",
3
- "version": "1.0.43",
3
+ "version": "1.0.45",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -12,8 +12,6 @@
12
12
  "coverage": "jest --coverage",
13
13
  "prepare": "husky install"
14
14
  },
15
- "dependencies": {
16
- },
17
15
  "peerDependencies": {
18
16
  "@headlessui/react": "^1.7.15",
19
17
  "@heroicons/react": "^2.0.18",
@@ -41,13 +39,16 @@
41
39
  "eslint-plugin-import": "^2.27.5",
42
40
  "eslint-plugin-prettier": "^4.2.1",
43
41
  "eslint-plugin-react": "^7.32.2",
42
+ "eslint-plugin-react-hooks": "^4.6.2",
44
43
  "globals": "^15.9.0",
45
44
  "husky": "^8.0.0",
46
45
  "identity-obj-proxy": "^3.0.0",
46
+ "install": "^0.13.0",
47
47
  "jest": "^29.5.0",
48
48
  "jest-environment-jsdom": "^29.5.0",
49
49
  "jest-transform-stub": "^2.0.0",
50
50
  "lint-staged": "^13.2.2",
51
+ "npm": "^10.8.2",
51
52
  "postcss": "^8.3.5",
52
53
  "postcss-loader": "^6.1.1",
53
54
  "prettier": "^2.8.8",