cemtrik-dependencies 1.0.80 → 1.0.81

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 +13 -13
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(z,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):(z=typeof globalThis<"u"?globalThis:z||self,a(z.MyApp={},z.React,z.ReactDOM))})(this,function(z,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 E=yr(a),Ct=(e,n=!1)=>{function t(o){if(typeof o!="object"||o===null)return o;const l=Array.isArray(o)?[]:{};for(const i in o)o.hasOwnProperty(i)&&!n&&(l[i]=t(o[i]));return l}return e.map(o=>t(o))},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,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(l=>{l.some(s=>s.getAttribute===void 0?!1:s.getAttribute("id")===e)||n()},[n,e]);a.useEffect(()=>{const l=i=>{const s=i.composedPath();s===void 0||t||(r&&(s[0].getAttribute=()=>e),o(s))};return window.addEventListener("click",l),()=>{window.removeEventListener("click",l)}},[o,t,r,e])},jr=()=>{const[e,n]=a.useState({}),[t,r]=a.useState({}),[o,l]=a.useState([]),i=h=>b=>{b.preventDefault(),b.stopPropagation(),h(e)},s=(h,b,p)=>{const{checked:v,value:g,name:x,type:C,id:y}=h.target,T={radio:y,checkbox:v};n({...e,[x]:T[C]??g}),b({...p,[x]:T[C]??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"}))),l(p),p.length>0},[]);return{handleSubmit:i,handleChange:s,setValuesDefault:u,validateFields:c,errors:o,model:e,handleError:(h,b)=>{b.forEach(p=>r(v=>({...v,[p]:h}))),l(b)},messageError:t,setModel:n}},Ir=e=>{const[n,t]=a.useState(!0),[r,o]=a.useState(!1),l=a.useCallback((i,s)=>{const u=e.match(/[0-9]+/g);if(u===null)return;const[c]=u;s=Math.min(window.innerWidth,window.outerWidth);const m=i?s>=Number(c):s<=Number(c);o(m)},[e]);return a.useEffect(()=>{const i=/\(min-width:\s?[0-9]+px\)/gi.test(e),s=/\(max-width:\s?[0-9]+px\)/gi.test(e);if(!i&&!s&&t(!1),!i&&!s)return;const u=Math.min(window.innerWidth,window.outerWidth);l(i,u)},[e,l]),a.useEffect(()=>{if(!n)return;const i=Math.min(window.innerWidth,window.outerWidth);function s(){const u=/min-width/gi.test(e);l(u,i)}return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[n,e,l]),r},Tt=()=>{const[e,n]=a.useState({width:0,height:0});return a.useEffect(()=>{const t=()=>{const r=Math.min(window.innerWidth,window.outerWidth),o=Math.min(window.innerHeight,window.outerHeight);n({width:r,height:o})};return requestAnimationFrame(()=>t()),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),e};function Nr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ot={exports:{}},Ve={};/**
1
+ (function(z,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):(z=typeof globalThis<"u"?globalThis:z||self,a(z.MyApp={},z.React,z.ReactDOM))})(this,function(z,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 E=yr(a),Ct=(e,n=!1)=>{function t(o){if(typeof o!="object"||o===null)return o;const l=Array.isArray(o)?[]:{};for(const i in o)o.hasOwnProperty(i)&&!n&&(l[i]=t(o[i]));return l}return e.map(o=>t(o))},cn=e=>/^(?:[^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*|"[^\n"]+")@(?:[^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,63}$/i.test(e);function F(...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(l=>{l.some(s=>s.getAttribute===void 0?!1:s.getAttribute("id")===e)||n()},[n,e]);a.useEffect(()=>{const l=i=>{const s=i.composedPath();s===void 0||t||(r&&(s[0].getAttribute=()=>e),o(s))};return window.addEventListener("click",l),()=>{window.removeEventListener("click",l)}},[o,t,r,e])},jr=()=>{const[e,n]=a.useState({}),[t,r]=a.useState({}),[o,l]=a.useState([]),i=h=>b=>{b.preventDefault(),b.stopPropagation(),h(e)},s=(h,b,p)=>{const{checked:v,value:g,name:x,type:C,id:y}=h.target,T={radio:y,checkbox:v};n({...e,[x]:T[C]??g}),b({...p,[x]:T[C]??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"}))),l(p),p.length>0},[]);return{handleSubmit:i,handleChange:s,setValuesDefault:u,validateFields:c,errors:o,model:e,handleError:(h,b)=>{b.forEach(p=>r(v=>({...v,[p]:h}))),l(b)},messageError:t,setModel:n}},Nr=e=>{const[n,t]=a.useState(!0),[r,o]=a.useState(!1),l=a.useCallback((i,s)=>{const u=e.match(/[0-9]+/g);if(u===null)return;const[c]=u;s=Math.min(window.innerWidth,window.outerWidth);const m=i?s>=Number(c):s<=Number(c);o(m)},[e]);return a.useEffect(()=>{const i=/\(min-width:\s?[0-9]+px\)/gi.test(e),s=/\(max-width:\s?[0-9]+px\)/gi.test(e);if(!i&&!s&&t(!1),!i&&!s)return;const u=Math.min(window.innerWidth,window.outerWidth);l(i,u)},[e,l]),a.useEffect(()=>{if(!n)return;const i=Math.min(window.innerWidth,window.outerWidth);function s(){const u=/min-width/gi.test(e);l(u,i)}return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[n,e,l]),r},Tt=()=>{const[e,n]=a.useState({width:0,height:0});return a.useEffect(()=>{const t=()=>{const r=Math.min(window.innerWidth,window.outerWidth),o=Math.min(window.innerHeight,window.outerHeight);n({width:r,height:o})};return requestAnimationFrame(()=>t()),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),e};function Ir(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
  *
@@ -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 $r(){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"),l=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),m=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 C=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(d){{for(var S=arguments.length,O=new Array(S>1?S-1:0),_=1;_<S;_++)O[_-1]=arguments[_];T("error",d,O)}}function T(d,S,O){{var _=C.ReactDebugCurrentFrame,X=_.getStackAddendum();X!==""&&(S+="%s",O=O.concat([X]));var re=O.map(function(Z){return String(Z)});re.unshift("Warning: "+S),Function.prototype.apply.call(console[d],console,re)}}var I=!1,F=!1,P=!1,R=!1,Y=!1,D;D=Symbol.for("react.module.reference");function M(d){return!!(typeof d=="string"||typeof d=="function"||d===r||d===l||Y||d===o||d===c||d===m||R||d===p||I||F||P||typeof d=="object"&&d!==null&&(d.$$typeof===b||d.$$typeof===h||d.$$typeof===i||d.$$typeof===s||d.$$typeof===u||d.$$typeof===D||d.getModuleId!==void 0))}function B(d,S,O){var _=d.displayName;if(_)return _;var X=S.displayName||S.name||"";return X!==""?O+"("+X+")":O}function G(d){return d.displayName||"Context"}function J(d){if(d==null)return null;if(typeof d.tag=="number"&&y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case r:return"Fragment";case t:return"Portal";case l:return"Profiler";case o:return"StrictMode";case c:return"Suspense";case m:return"SuspenseList"}if(typeof d=="object")switch(d.$$typeof){case s:var S=d;return G(S)+".Consumer";case i:var O=d;return G(O._context)+".Provider";case u:return B(d,d.render,"ForwardRef");case h:var _=d.displayName||null;return _!==null?_:J(d.type)||"Memo";case b:{var X=d,re=X._payload,Z=X._init;try{return J(Z(re))}catch{return null}}}return null}var ae=Object.assign,w=0,L,k,Q,U,ne,fe,ge;function Se(){}Se.__reactDisabledLog=!0;function be(){{if(w===0){L=console.log,k=console.info,Q=console.warn,U=console.error,ne=console.group,fe=console.groupCollapsed,ge=console.groupEnd;var d={configurable:!0,enumerable:!0,value:Se,writable:!0};Object.defineProperties(console,{info:d,log:d,warn:d,error:d,group:d,groupCollapsed:d,groupEnd:d})}w++}}function Ae(){{if(w--,w===0){var d={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ae({},d,{value:L}),info:ae({},d,{value:k}),warn:ae({},d,{value:Q}),error:ae({},d,{value:U}),group:ae({},d,{value:ne}),groupCollapsed:ae({},d,{value:fe}),groupEnd:ae({},d,{value:ge})})}w<0&&y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var $=C.ReactCurrentDispatcher,H;function ie(d,S,O){{if(H===void 0)try{throw Error()}catch(X){var _=X.stack.trim().match(/\n( *(at )?)/);H=_&&_[1]||""}return`
18
- `+H+d}}var A=!1,q;{var W=typeof WeakMap=="function"?WeakMap:Map;q=new W}function pe(d,S){if(!d||A)return"";{var O=q.get(d);if(O!==void 0)return O}var _;A=!0;var X=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var re;re=$.current,$.current=null,be();try{if(S){var Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch(Ne){_=Ne}Reflect.construct(d,[],Z)}else{try{Z.call()}catch(Ne){_=Ne}d.call(Z.prototype)}}else{try{throw Error()}catch(Ne){_=Ne}d()}}catch(Ne){if(Ne&&_&&typeof Ne.stack=="string"){for(var V=Ne.stack.split(`
19
- `),xe=_.stack.split(`
20
- `),de=V.length-1,me=xe.length-1;de>=1&&me>=0&&V[de]!==xe[me];)me--;for(;de>=1&&me>=0;de--,me--)if(V[de]!==xe[me]){if(de!==1||me!==1)do if(de--,me--,me<0||V[de]!==xe[me]){var ye=`
21
- `+V[de].replace(" at new "," at ");return d.displayName&&ye.includes("<anonymous>")&&(ye=ye.replace("<anonymous>",d.displayName)),typeof d=="function"&&q.set(d,ye),ye}while(de>=1&&me>=0);break}}}finally{A=!1,$.current=re,Ae(),Error.prepareStackTrace=X}var He=d?d.displayName||d.name:"",wr=He?ie(He):"";return typeof d=="function"&&q.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 ie(d);switch(d){case c:return ie("Suspense");case m:return ie("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 _=d,X=_._payload,re=_._init;try{return yt(re(X),S,O)}catch{}}}return""}var Et=Object.prototype.hasOwnProperty,ar={},ur=C.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 Hs(d,S,O,_,X){{var re=Function.call.bind(Et);for(var Z in d)if(re(d,Z)){var V=void 0;try{if(typeof d[Z]!="function"){var xe=Error((_||"React class")+": "+O+" type `"+Z+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof d[Z]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw xe.name="Invariant Violation",xe}V=d[Z](S,Z,_,O,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(de){V=de}V&&!(V 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).",_||"React class",O,Z,typeof V),St(null)),V instanceof Error&&!(V.message in ar)&&(ar[V.message]=!0,St(X),y("Failed %s type: %s",O,V.message),St(null))}}}var Vs=Array.isArray;function rn(d){return Vs(d)}function Ys(d){{var S=typeof Symbol=="function"&&Symbol.toStringTag,O=S&&d[Symbol.toStringTag]||d.constructor.name||"Object";return O}}function qs(d){try{return cr(d),!1}catch{return!0}}function cr(d){return""+d}function dr(d){if(qs(d))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ys(d)),cr(d)}var ot=C.ReactCurrentOwner,Zs={key:!0,ref:!0,__self:!0,__source:!0},fr,mr,on;on={};function Gs(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 Ks(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 Js(d,S){if(typeof d.ref=="string"&&ot.current&&S&&ot.current.stateNode!==S){var O=J(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',J(ot.current.type),d.ref),on[O]=!0)}}function Qs(d,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(d,"key",{get:O,configurable:!0})}}function Xs(d,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(d,"ref",{get:O,configurable:!0})}}var ea=function(d,S,O,_,X,re,Z){var V={$$typeof:n,type:d,key:S,ref:O,props:Z,_owner:re};return V._store={},Object.defineProperty(V._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(V,"_self",{configurable:!1,enumerable:!1,writable:!1,value:_}),Object.defineProperty(V,"_source",{configurable:!1,enumerable:!1,writable:!1,value:X}),Object.freeze&&(Object.freeze(V.props),Object.freeze(V)),V};function ta(d,S,O,_,X){{var re,Z={},V=null,xe=null;O!==void 0&&(dr(O),V=""+O),Ks(S)&&(dr(S.key),V=""+S.key),Gs(S)&&(xe=S.ref,Js(S,X));for(re in S)Et.call(S,re)&&!Zs.hasOwnProperty(re)&&(Z[re]=S[re]);if(d&&d.defaultProps){var de=d.defaultProps;for(re in de)Z[re]===void 0&&(Z[re]=de[re])}if(V||xe){var me=typeof d=="function"?d.displayName||d.name||"Unknown":d;V&&Qs(Z,me),xe&&Xs(Z,me)}return ea(d,V,xe,X,_,ot.current,Z)}}var ln=C.ReactCurrentOwner,pr=C.ReactDebugCurrentFrame;function Ue(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=J(ln.current.type);if(d)return`
17
+ */var fn;function $r(){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"),l=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),m=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 C=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(d){{for(var S=arguments.length,O=new Array(S>1?S-1:0),L=1;L<S;L++)O[L-1]=arguments[L];T("error",d,O)}}function T(d,S,O){{var L=C.ReactDebugCurrentFrame,ee=L.getStackAddendum();ee!==""&&(S+="%s",O=O.concat([ee]));var re=O.map(function(G){return String(G)});re.unshift("Warning: "+S),Function.prototype.apply.call(console[d],console,re)}}var N=!1,I=!1,P=!1,R=!1,Y=!1,D;D=Symbol.for("react.module.reference");function M(d){return!!(typeof d=="string"||typeof d=="function"||d===r||d===l||Y||d===o||d===c||d===m||R||d===p||N||I||P||typeof d=="object"&&d!==null&&(d.$$typeof===b||d.$$typeof===h||d.$$typeof===i||d.$$typeof===s||d.$$typeof===u||d.$$typeof===D||d.getModuleId!==void 0))}function B(d,S,O){var L=d.displayName;if(L)return L;var ee=S.displayName||S.name||"";return ee!==""?O+"("+ee+")":O}function K(d){return d.displayName||"Context"}function X(d){if(d==null)return null;if(typeof d.tag=="number"&&y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case r:return"Fragment";case t:return"Portal";case l:return"Profiler";case o:return"StrictMode";case c:return"Suspense";case m:return"SuspenseList"}if(typeof d=="object")switch(d.$$typeof){case s:var S=d;return K(S)+".Consumer";case i:var O=d;return K(O._context)+".Provider";case u:return B(d,d.render,"ForwardRef");case h:var L=d.displayName||null;return L!==null?L:X(d.type)||"Memo";case b:{var ee=d,re=ee._payload,G=ee._init;try{return X(G(re))}catch{return null}}}return null}var ae=Object.assign,w=0,_,$,U,H,J,me,pe;function Se(){}Se.__reactDisabledLog=!0;function be(){{if(w===0){_=console.log,$=console.info,U=console.warn,H=console.error,J=console.group,me=console.groupCollapsed,pe=console.groupEnd;var d={configurable:!0,enumerable:!0,value:Se,writable:!0};Object.defineProperties(console,{info:d,log:d,warn:d,error:d,group:d,groupCollapsed:d,groupEnd:d})}w++}}function Ae(){{if(w--,w===0){var d={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ae({},d,{value:_}),info:ae({},d,{value:$}),warn:ae({},d,{value:U}),error:ae({},d,{value:H}),group:ae({},d,{value:J}),groupCollapsed:ae({},d,{value:me}),groupEnd:ae({},d,{value:pe})})}w<0&&y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var k=C.ReactCurrentDispatcher,V;function ie(d,S,O){{if(V===void 0)try{throw Error()}catch(ee){var L=ee.stack.trim().match(/\n( *(at )?)/);V=L&&L[1]||""}return`
18
+ `+V+d}}var A=!1,Z;{var W=typeof WeakMap=="function"?WeakMap:Map;Z=new W}function he(d,S){if(!d||A)return"";{var O=Z.get(d);if(O!==void 0)return O}var L;A=!0;var ee=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var re;re=k.current,k.current=null,be();try{if(S){var G=function(){throw Error()};if(Object.defineProperty(G.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(G,[])}catch(Ie){L=Ie}Reflect.construct(d,[],G)}else{try{G.call()}catch(Ie){L=Ie}d.call(G.prototype)}}else{try{throw Error()}catch(Ie){L=Ie}d()}}catch(Ie){if(Ie&&L&&typeof Ie.stack=="string"){for(var q=Ie.stack.split(`
19
+ `),xe=L.stack.split(`
20
+ `),de=q.length-1,fe=xe.length-1;de>=1&&fe>=0&&q[de]!==xe[fe];)fe--;for(;de>=1&&fe>=0;de--,fe--)if(q[de]!==xe[fe]){if(de!==1||fe!==1)do if(de--,fe--,fe<0||q[de]!==xe[fe]){var ye=`
21
+ `+q[de].replace(" at new "," at ");return d.displayName&&ye.includes("<anonymous>")&&(ye=ye.replace("<anonymous>",d.displayName)),typeof d=="function"&&Z.set(d,ye),ye}while(de>=1&&fe>=0);break}}}finally{A=!1,k.current=re,Ae(),Error.prepareStackTrace=ee}var He=d?d.displayName||d.name:"",wr=He?ie(He):"";return typeof d=="function"&&Z.set(d,wr),wr}function ve(d,S,O){return he(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 he(d,We(d));if(typeof d=="string")return ie(d);switch(d){case c:return ie("Suspense");case m:return ie("SuspenseList")}if(typeof d=="object")switch(d.$$typeof){case u:return ve(d.render);case h:return yt(d.type,S,O);case b:{var L=d,ee=L._payload,re=L._init;try{return yt(re(ee),S,O)}catch{}}}return""}var Et=Object.prototype.hasOwnProperty,ar={},ur=C.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 Hs(d,S,O,L,ee){{var re=Function.call.bind(Et);for(var G in d)if(re(d,G)){var q=void 0;try{if(typeof d[G]!="function"){var xe=Error((L||"React class")+": "+O+" type `"+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof d[G]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw xe.name="Invariant Violation",xe}q=d[G](S,G,L,O,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(de){q=de}q&&!(q instanceof Error)&&(St(ee),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).",L||"React class",O,G,typeof q),St(null)),q instanceof Error&&!(q.message in ar)&&(ar[q.message]=!0,St(ee),y("Failed %s type: %s",O,q.message),St(null))}}}var Vs=Array.isArray;function rn(d){return Vs(d)}function Ys(d){{var S=typeof Symbol=="function"&&Symbol.toStringTag,O=S&&d[Symbol.toStringTag]||d.constructor.name||"Object";return O}}function qs(d){try{return cr(d),!1}catch{return!0}}function cr(d){return""+d}function dr(d){if(qs(d))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ys(d)),cr(d)}var lt=C.ReactCurrentOwner,Zs={key:!0,ref:!0,__self:!0,__source:!0},fr,mr,on;on={};function Gs(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 Ks(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 Js(d,S){if(typeof d.ref=="string"&&lt.current&&S&&lt.current.stateNode!==S){var O=X(lt.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',X(lt.current.type),d.ref),on[O]=!0)}}function Qs(d,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(d,"key",{get:O,configurable:!0})}}function Xs(d,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(d,"ref",{get:O,configurable:!0})}}var ea=function(d,S,O,L,ee,re,G){var q={$$typeof:n,type:d,key:S,ref:O,props:G,_owner:re};return q._store={},Object.defineProperty(q._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(q,"_self",{configurable:!1,enumerable:!1,writable:!1,value:L}),Object.defineProperty(q,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ee}),Object.freeze&&(Object.freeze(q.props),Object.freeze(q)),q};function ta(d,S,O,L,ee){{var re,G={},q=null,xe=null;O!==void 0&&(dr(O),q=""+O),Ks(S)&&(dr(S.key),q=""+S.key),Gs(S)&&(xe=S.ref,Js(S,ee));for(re in S)Et.call(S,re)&&!Zs.hasOwnProperty(re)&&(G[re]=S[re]);if(d&&d.defaultProps){var de=d.defaultProps;for(re in de)G[re]===void 0&&(G[re]=de[re])}if(q||xe){var fe=typeof d=="function"?d.displayName||d.name||"Unknown":d;q&&Qs(G,fe),xe&&Xs(G,fe)}return ea(d,q,xe,ee,L,lt.current,G)}}var ln=C.ReactCurrentOwner,pr=C.ReactDebugCurrentFrame;function Ue(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=X(ln.current.type);if(d)return`
22
22
 
23
23
  Check the render method of \``+d+"`."}return""}}function na(d){return""}var vr={};function ra(d){{var S=hr();if(!S){var O=typeof d=="string"?d:d.displayName||d.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=ra(S);if(vr[O])return;vr[O]=!0;var _="";d&&d._owner&&d._owner!==ln.current&&(_=" It was passed a child from "+J(d._owner.type)+"."),Ue(d),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,_),Ue(null)}}function br(d,S){{if(typeof d!="object")return;if(rn(d))for(var O=0;O<d.length;O++){var _=d[O];an(_)&&gr(_,S)}else if(an(d))d._store&&(d._store.validated=!0);else if(d){var X=x(d);if(typeof X=="function"&&X!==d.entries)for(var re=X.call(d),Z;!(Z=re.next()).done;)an(Z.value)&&gr(Z.value,S)}}}function oa(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 _=J(S);Hs(O,d.props,"prop",_,d)}else if(S.PropTypes!==void 0&&!sn){sn=!0;var X=J(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 la(d){{for(var S=Object.keys(d.props),O=0;O<S.length;O++){var _=S[O];if(_!=="children"&&_!=="key"){Ue(d),y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",_),Ue(null);break}}d.ref!==null&&(Ue(d),y("Invalid attribute `ref` supplied to `React.Fragment`."),Ue(null))}}function xr(d,S,O,_,X,re){{var Z=M(d);if(!Z){var V="";(d===void 0||typeof d=="object"&&d!==null&&Object.keys(d).length===0)&&(V+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var xe=na();xe?V+=xe:V+=hr();var de;d===null?de="null":rn(d)?de="array":d!==void 0&&d.$$typeof===n?(de="<"+(J(d.type)||"Unknown")+" />",V=" Did you accidentally export a JSX literal instead of a component?"):de=typeof d,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,V)}var me=ta(d,S,O,X,re);if(me==null)return me;if(Z){var ye=S.children;if(ye!==void 0)if(_)if(rn(ye)){for(var He=0;He<ye.length;He++)br(ye[He],d);Object.freeze&&Object.freeze(ye)}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(ye,d)}return d===r?la(me):oa(me),me}}function ia(d,S,O){return xr(d,S,O,!0)}function sa(d,S,O){return xr(d,S,O,!1)}var aa=sa,ua=ia;Ye.Fragment=r,Ye.jsx=aa,Ye.jsxs=ua}()),Ye}process.env.NODE_ENV==="production"?Ot.exports=Fr():Ot.exports=$r();var f=Ot.exports;function qe(e,n,t){let r=t.initialDeps??[],o;return()=>{var l,i,s,u;let c;t.key&&((l=t.debug)!=null&&l.call(t))&&(c=Date.now());const m=e();if(!(m.length!==r.length||m.some((p,v)=>r[v]!==p)))return o;r=m;let b;if(t.key&&((i=t.debug)!=null&&i.call(t))&&(b=Date.now()),o=n(...m),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=(C,y)=>{for(C=String(C);C.length<y;)C=" "+C;return C};console.info(`%c⏱ ${x(v,5)} /${x(p,5)} ms`,`
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=ra(S);if(vr[O])return;vr[O]=!0;var L="";d&&d._owner&&d._owner!==ln.current&&(L=" It was passed a child from "+X(d._owner.type)+"."),Ue(d),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,L),Ue(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 ee=x(d);if(typeof ee=="function"&&ee!==d.entries)for(var re=ee.call(d),G;!(G=re.next()).done;)an(G.value)&&gr(G.value,S)}}}function oa(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=X(S);Hs(O,d.props,"prop",L,d)}else if(S.PropTypes!==void 0&&!sn){sn=!0;var ee=X(S);y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ee||"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 la(d){{for(var S=Object.keys(d.props),O=0;O<S.length;O++){var L=S[O];if(L!=="children"&&L!=="key"){Ue(d),y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",L),Ue(null);break}}d.ref!==null&&(Ue(d),y("Invalid attribute `ref` supplied to `React.Fragment`."),Ue(null))}}function xr(d,S,O,L,ee,re){{var G=M(d);if(!G){var q="";(d===void 0||typeof d=="object"&&d!==null&&Object.keys(d).length===0)&&(q+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var xe=na();xe?q+=xe:q+=hr();var de;d===null?de="null":rn(d)?de="array":d!==void 0&&d.$$typeof===n?(de="<"+(X(d.type)||"Unknown")+" />",q=" Did you accidentally export a JSX literal instead of a component?"):de=typeof d,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,q)}var fe=ta(d,S,O,ee,re);if(fe==null)return fe;if(G){var ye=S.children;if(ye!==void 0)if(L)if(rn(ye)){for(var He=0;He<ye.length;He++)br(ye[He],d);Object.freeze&&Object.freeze(ye)}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(ye,d)}return d===r?la(fe):oa(fe),fe}}function ia(d,S,O){return xr(d,S,O,!0)}function sa(d,S,O){return xr(d,S,O,!1)}var aa=sa,ua=ia;Ye.Fragment=r,Ye.jsx=aa,Ye.jsxs=ua}()),Ye}process.env.NODE_ENV==="production"?Ot.exports=Fr():Ot.exports=$r();var f=Ot.exports;function qe(e,n,t){let r=t.initialDeps??[],o;return()=>{var l,i,s,u;let c;t.key&&((l=t.debug)!=null&&l.call(t))&&(c=Date.now());const m=e();if(!(m.length!==r.length||m.some((p,v)=>r[v]!==p)))return o;r=m;let b;if(t.key&&((i=t.debug)!=null&&i.call(t))&&(b=Date.now()),o=n(...m),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=(C,y)=>{for(C=String(C);C.length<y;)C=" "+C;return C};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 kr=(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=i=>{const{width:s,height:u}=i;n({width:Math.round(s),height:Math.round(u)})};if(o(t.getBoundingClientRect()),!r.ResizeObserver)return()=>{};const l=new r.ResizeObserver(i=>{const s=i[0];if(s!=null&&s.borderBoxSize){const u=s.borderBoxSize[0];if(u){o({width:u.inlineSize,height:u.blockSize});return}}o(t.getBoundingClientRect())});return l.observe(t,{box:"border-box"}),()=>{l.unobserve(t)}},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 l=Lr?()=>{}:Pr(r,()=>{n(o,!1)},e.options.isScrollingResetDelay),i=c=>()=>{o=t[e.options.horizontal?"scrollLeft":"scrollTop"],l(),n(o,c)},s=i(!0),u=i(!1);return u(),t.addEventListener("scroll",s,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,l;const i=e+n;(l=(o=r.scrollElement)==null?void 0:o.scrollTo)==null||l.call(o,{[r.options.horizontal?"left":"top"]:i,behavior:t})};class 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(l=>{this._measureElement(l.target,l)})}));return{disconnect:()=>{var o;return(o=r())==null?void 0:o.disconnect()},observe:o=>{var l;return(l=r())==null?void 0:l.observe(o,{box:"border-box"})},unobserve:o=>{var l;return(l=r())==null?void 0:l.unobserve(o)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([r,o])=>{typeof o>"u"&&delete t[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey: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,l;const{startIndex:i,endIndex:s}=this.range??{startIndex:void 0,endIndex:void 0},u=this.calculateRange();(t||i!==(u==null?void 0:u.startIndex)||s!==(u==null?void 0:u.endIndex))&&((l=(o=this.options).onChange)==null||l.call(o,this,r))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.notify(!1,!1);return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(o,l)=>{this.scrollAdjustments=0,this.scrollDirection=l?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o;const i=this.isScrolling;this.isScrolling=l,this.notify(i!==l,l)}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(t,r)=>{const o=new Map,l=new Map;for(let i=r-1;i>=0;i--){const s=t[i];if(o.has(s.lane))continue;const u=l.get(s.lane);if(u==null||s.end>u.end?l.set(s.lane,s):s.end<u.end&&o.set(s.lane,!0),o.size===this.options.lanes)break}return l.size===this.options.lanes?Array.from(l.values()).sort((i,s)=>i.end===s.end?i.index-s.index:i.end-s.end)[0]:void 0},this.getMeasurementOptions=qe(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(t,r,o,l,i)=>(this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:r,scrollMargin:o,getItemKey:l,enabled:i}),{key:!1}),this.getMeasurements=qe(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:r,scrollMargin:o,getItemKey:l,enabled:i},s)=>{var u;if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(h=>{this.itemSizeCache.set(h.key,h.size)}));const c=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const m=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=l(h),P=this.elementsCache.get(F);if(!I){P&&(this.observer.unobserve(P),this.elementsCache.delete(F));return}P!==I&&(P&&this.observer.unobserve(P),this.observer.observe(I),this.elementsCache.set(F,I)),I.isConnected&&this.resizeItem(h,this.options.measureElement(I,void 0,this))});const p=l(h),v=this.options.lanes===1?m[h-1]:this.getFurthestMeasurement(m,h),g=v?v.end+this.options.gap:r+o,x=s.get(p),C=typeof x=="number"?x:this.options.estimateSize(h),y=g+C,T=v?v.lane:h%this.options.lanes;m[h]={index:h,start:g,size:C,end:y,key:p,lane:T,measureElement:b}}return this.measurementsCache=m,m},{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,l)=>r===null?[]:t({startIndex:r.startIndex,endIndex:r.endIndex,overscan:o,count:l}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=t=>{const r=this.options.indexAttribute,o=t.getAttribute(r);return o?parseInt(o,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(t,r)=>{const o=this.indexFromElement(t),l=this.getMeasurements()[o];if(!l||!t.isConnected){this.elementsCache.forEach((s,u)=>{s===t&&(this.observer.unobserve(t),this.elementsCache.delete(u))});return}const i=this.elementsCache.get(l.key);i!==t&&(i&&this.observer.unobserve(i),this.observer.observe(t),this.elementsCache.set(l.key,t)),this.resizeItem(o,this.options.measureElement(t,r,this))},this.resizeItem=(t,r)=>{const o=this.getMeasurements()[t];if(!o)return;const l=this.itemSizeCache.get(o.key)??o.size,i=r-l;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,i,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",i),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,r)),this.notify(!0,!1))},this.measureElement=t=>{t&&this._measureElement(t,void 0)},this.getVirtualItems=qe(()=>[this.getIndexes(),this.getMeasurements()],(t,r)=>{const o=[];for(let l=0,i=t.length;l<i;l++){const s=t[l],u=r[s];o.push(u)}return o},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const r=this.getMeasurements();if(r.length!==0)return jt(r[pn(0,r.length-1,o=>jt(r[o]).start,t)])},this.getOffsetForAlignment=(t,r)=>{const o=this.getSize(),l=this.getScrollOffset();r==="auto"&&(t<=l?r="start":t>=l+o?r="end":r="start"),r==="start"?t=t:r==="end"?t=t-o:r==="center"&&(t=t-o/2);const i=this.options.horizontal?"scrollWidth":"scrollHeight",u=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-o;return Math.max(Math.min(u,t),0)},this.getOffsetForIndex=(t,r="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const o=this.getMeasurements()[t];if(!o)return;const l=this.getSize(),i=this.getScrollOffset();if(r==="auto")if(o.end>=i+l-this.options.scrollPaddingEnd)r="end";else if(o.start<=i+this.options.scrollPaddingStart)r="start";else return[i,r];const s=r==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,r),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(t,{align:r="start",behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(t,r),{adjustments:void 0,behavior:o})},this.scrollToIndex=(t,{align:r="auto",behavior:o}={})=>{t=Math.max(0,Math.min(t,this.options.count-1)),this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const l=this.getOffsetForIndex(t,r);if(!l)return;const[i,s]=l;this._scrollToOffset(i,{adjustments:void 0,behavior:o}),o!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(t))){const[c]=jt(this.getOffsetForIndex(t,s));kr(c,this.getScrollOffset())||this.scrollToIndex(t,{align:s,behavior:o})}else this.scrollToIndex(t,{align:s,behavior:o})}))},this.scrollBy=(t,{behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+t,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var t;const r=this.getMeasurements();let o;return r.length===0?o=this.options.paddingStart:o=this.options.lanes===1?((t=r[r.length-1])==null?void 0:t.end)??0:Math.max(...r.slice(-this.options.lanes).map(l=>l.end)),o-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(t,{adjustments:r,behavior:o})=>{this.options.scrollToFn(t,{behavior:o,adjustments:r},this)},this.measure=()=>{var t,r;this.itemSizeCache=new Map,(r=(t=this.options).onChange)==null||r.call(t,this,!1)},this.setOptions(n)}}const pn=(e,n,t,r)=>{for(;e<=n;){const o=(e+n)/2|0,l=t(o);if(l<r)e=o+1;else if(l>r)n=o-1;else return o}return e>0?e-1:0};function Wr({measurements:e,outerSize:n,scrollOffset:t}){const r=e.length-1,l=pn(0,r,s=>e[s].start,t);let i=l;for(;i<r&&e[i].end<t+n;)i++;return{startIndex:l,endIndex:i}}const Ur=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Hr(e){const n=E.useReducer(()=>({}),{})[1],t={...e,onChange:(o,l)=>{var i;l?un.flushSync(n):n(),(i=e.onChange)==null||i.call(e,o,l)}},[r]=E.useState(()=>new zr(t));return r.setOptions(t),E.useEffect(()=>r._didMount(),[]),Ur(()=>r._willUpdate()),r}function Vr(e){return Hr({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 Zr=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"}},Te=new Zr,ee=(e,n)=>{Te.isServer?a.useEffect(e,n):a.useLayoutEffect(e,n)};function Ee(e){let n=a.useRef(e);return ee(()=>{n.current=e},[e]),n}function Nt(e,n){let[t,r]=a.useState(e),o=Ee(e);return ee(()=>r(o.current),[o,r,...n]),t}let j=function(e){let n=Ee(e);return a.useCallback((...t)=>n.current(...t),[n])};function hn(e,n,t){let[r,o]=a.useState(t),l=e!==void 0,i=a.useRef(l),s=a.useRef(!1),u=a.useRef(!1);return l&&!i.current&&!s.current?(s.current=!0,i.current=l,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!l&&i.current&&!u.current&&(u.current=!0,i.current=l,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[l?e:r,j(c=>(l||o(c),n==null?void 0:n(c)))]}function lt(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(n=>setTimeout(()=>{throw n}))}function we(){let e=[],n={addEventListener(t,r,o,l){return t.addEventListener(r,o,l),n.add(()=>t.removeEventListener(r,o,l))},requestAnimationFrame(...t){let r=requestAnimationFrame(...t);return n.add(()=>cancelAnimationFrame(r))},nextFrame(...t){return n.requestAnimationFrame(()=>n.requestAnimationFrame(...t))},setTimeout(...t){let r=setTimeout(...t);return n.add(()=>clearTimeout(r))},microTask(...t){let r={current:!0};return lt(()=>{r.current&&t[0]()}),n.add(()=>{r.current=!1})},style(t,r,o){let l=t.style.getPropertyValue(r);return Object.assign(t.style,{[r]:o}),this.add(()=>{Object.assign(t.style,{[r]:l})})},group(t){let r=we();return t(r),this.add(()=>r.dispose())},add(t){return e.push(t),()=>{let r=e.indexOf(t);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let t of e.splice(0))t()}};return n}function Oe(){let[e]=a.useState(we);return a.useEffect(()=>()=>e.dispose(),[e]),e}function Gr(){let e=typeof document>"u";return"useSyncExternalStore"in E?(n=>n.useSyncExternalStore)(E)(()=>()=>{},()=>!1,()=>!e):!1}function Be(){let e=Gr(),[n,t]=E.useState(Te.isHandoffComplete);return n&&Te.isHandoffComplete===!1&&t(!1),E.useEffect(()=>{n!==!0&&t(!0)},[n]),E.useEffect(()=>Te.handoff(),[]),e?!1:n}var vn;let ve=(vn=a.useId)!=null?vn:function(){let e=Be(),[n,t]=a.useState(e?()=>Te.nextId():null);return ee(()=>{n===null&&t(Te.nextId())},[n]),n!=null?""+n:void 0};function se(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,se),r}function it(e){return Te.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 je=(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))(je||{}),gn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(gn||{}),Kr=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Kr||{});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 $t=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))($t||{});function kt(e,n=0){var t;return e===((t=it(e))==null?void 0:t.body)?!1:se(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=it(e);we().nextFrame(()=>{n&&!kt(n.activeElement,0)&&Fe(e)})}var Jr=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Jr||{});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 Qr=["textarea","input"].join(",");function Xr(e){var n,t;return(t=(n=e==null?void 0:e.matches)==null?void 0:n.call(e,Qr))!=null?t:!1}function Pt(e,n=t=>t){return e.slice().sort((t,r)=>{let o=n(t),l=n(r);if(o===null||l===null)return 0;let i=o.compareDocumentPosition(l);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function eo(e,n){return Ze(bn(),n,{relativeTo:e})}function Ze(e,n,{sorted:t=!0,relativeTo:r=null,skipElements:o=[]}={}){let l=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,i=Array.isArray(e)?t?Pt(e):e:bn(e);o.length>0&&i.length>1&&(i=i.filter(p=>!o.includes(p))),r=r??l.activeElement;let s=(()=>{if(n&5)return 1;if(n&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(n&1)return 0;if(n&2)return Math.max(0,i.indexOf(r))-1;if(n&4)return Math.max(0,i.indexOf(r))+1;if(n&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=n&32?{preventScroll:!0}:{},m=0,h=i.length,b;do{if(m>=h||m+h<=0)return 0;let p=u+m;if(n&16)p=(p+h)%h;else{if(p<0)return 3;if(p>=h)return 1}b=i[p],b==null||b.focus(c),m+=s}while(b!==l.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=Ee(n);a.useEffect(()=>{function o(l){r.current(l)}return document.addEventListener(e,o,t),()=>document.removeEventListener(e,o,t)},[e,t])}function En(e,n,t){let r=Ee(n);a.useEffect(()=>{function o(l){r.current(l)}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(i,s){if(!r.current||i.defaultPrevented)return;let u=s(i);if(u===null||!u.getRootNode().contains(u)||!u.isConnected)return;let c=function m(h){return typeof h=="function"?m(h()):Array.isArray(h)||h instanceof Set?h:[h]}(e);for(let m of c){if(m===null)continue;let h=m instanceof HTMLElement?m:m.current;if(h!=null&&h.contains(u)||i.composed&&i.composedPath().includes(h))return}return!kt(u,$t.Loose)&&u.tabIndex!==-1&&i.preventDefault(),n(i,u)}let l=a.useRef(null);st("pointerdown",i=>{var s,u;r.current&&(l.current=((u=(s=i.composedPath)==null?void 0:s.call(i))==null?void 0:u[0])||i.target)},!0),st("mousedown",i=>{var s,u;r.current&&(l.current=((u=(s=i.composedPath)==null?void 0:s.call(i))==null?void 0:u[0])||i.target)},!0),st("click",i=>{yn()||l.current&&(o(i,()=>l.current),l.current=null)},!0),st("touchend",i=>o(i,()=>i.target instanceof HTMLElement?i.target:null),!0),En("blur",i=>o(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function De(...e){return a.useMemo(()=>it(...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),l=a.useRef(t);a.useEffect(()=>{o.current=n,l.current=t},[n,t]),ee(()=>{if(!e||!r)return;let i=it(e);if(!i)return;let s=o.current,u=l.current,c=Object.assign(h=>s(h),{acceptNode:s}),m=i.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,c,!1);for(;m.nextNode();)u(m.currentNode)},[e,r,o,l])}function Ge(e,n){let t=a.useRef([]),r=j(e);a.useEffect(()=>{let o=[...t.current];for(let[l,i]of n.entries())if(t.current[l]!==i){let s=r(n,o);return t.current=n,s}},[r,...n])}function at(...e){return Array.from(new Set(e.flatMap(n=>typeof n=="string"?n.split(" "):[]))).filter(Boolean).join(" ")}var $e=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))($e||{}),ke=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(ke||{});function oe({ourProps:e,theirProps:n,slot:t,defaultTag:r,features:o,visible:l=!0,name:i,mergeRefs:s}){s=s??ro;let u=In(n,e);if(l)return ut(u,t,r,i,s);let c=o??0;if(c&2){let{static:m=!1,...h}=u;if(m)return ut(h,t,r,i,s)}if(c&1){let{unmount:m=!0,...h}=u;return se(m?0:1,{0(){return null},1(){return ut({...h,hidden:!0,style:{display:"none"}},t,r,i,s)}})}return ut(u,t,r,i,s)}function ut(e,n={},t,r,o){let{as:l=t,children:i,refName:s="ref",...u}=Dt(e,["unmount","static"]),c=e.ref!==void 0?{[s]:e.ref}:{},m=typeof i=="function"?i(n):i;"className"in u&&u.className&&typeof u.className=="function"&&(u.className=u.className(n));let h={};if(n){let b=!1,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(l===a.Fragment&&Object.keys(ct(u)).length>0){if(!a.isValidElement(m)||Array.isArray(m)&&m.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 kr=(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=i=>{const{width:s,height:u}=i;n({width:Math.round(s),height:Math.round(u)})};if(o(t.getBoundingClientRect()),!r.ResizeObserver)return()=>{};const l=new r.ResizeObserver(i=>{const s=i[0];if(s!=null&&s.borderBoxSize){const u=s.borderBoxSize[0];if(u){o({width:u.inlineSize,height:u.blockSize});return}}o(t.getBoundingClientRect())});return l.observe(t,{box:"border-box"}),()=>{l.unobserve(t)}},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 l=Lr?()=>{}:Pr(r,()=>{n(o,!1)},e.options.isScrollingResetDelay),i=c=>()=>{o=t[e.options.horizontal?"scrollLeft":"scrollTop"],l(),n(o,c)},s=i(!0),u=i(!1);return u(),t.addEventListener("scroll",s,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,l;const i=e+n;(l=(o=r.scrollElement)==null?void 0:o.scrollTo)==null||l.call(o,{[r.options.horizontal?"left":"top"]:i,behavior:t})};class 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(l=>{this._measureElement(l.target,l)})}));return{disconnect:()=>{var o;return(o=r())==null?void 0:o.disconnect()},observe:o=>{var l;return(l=r())==null?void 0:l.observe(o,{box:"border-box"})},unobserve:o=>{var l;return(l=r())==null?void 0:l.unobserve(o)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([r,o])=>{typeof o>"u"&&delete t[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey: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,l;const{startIndex:i,endIndex:s}=this.range??{startIndex:void 0,endIndex:void 0},u=this.calculateRange();(t||i!==(u==null?void 0:u.startIndex)||s!==(u==null?void 0:u.endIndex))&&((l=(o=this.options).onChange)==null||l.call(o,this,r))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.notify(!1,!1);return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(o,l)=>{this.scrollAdjustments=0,this.scrollDirection=l?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o;const i=this.isScrolling;this.isScrolling=l,this.notify(i!==l,l)}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(t,r)=>{const o=new Map,l=new Map;for(let i=r-1;i>=0;i--){const s=t[i];if(o.has(s.lane))continue;const u=l.get(s.lane);if(u==null||s.end>u.end?l.set(s.lane,s):s.end<u.end&&o.set(s.lane,!0),o.size===this.options.lanes)break}return l.size===this.options.lanes?Array.from(l.values()).sort((i,s)=>i.end===s.end?i.index-s.index:i.end-s.end)[0]:void 0},this.getMeasurementOptions=qe(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(t,r,o,l,i)=>(this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:r,scrollMargin:o,getItemKey:l,enabled:i}),{key:!1}),this.getMeasurements=qe(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:r,scrollMargin:o,getItemKey:l,enabled:i},s)=>{var u;if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(h=>{this.itemSizeCache.set(h.key,h.size)}));const c=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const m=this.measurementsCache.slice(0,c);for(let h=c;h<t;h++){let b=(u=this.measurementsCache[h])==null?void 0:u.measureElement;b||(b=N=>{const I=l(h),P=this.elementsCache.get(I);if(!N){P&&(this.observer.unobserve(P),this.elementsCache.delete(I));return}P!==N&&(P&&this.observer.unobserve(P),this.observer.observe(N),this.elementsCache.set(I,N)),N.isConnected&&this.resizeItem(h,this.options.measureElement(N,void 0,this))});const p=l(h),v=this.options.lanes===1?m[h-1]:this.getFurthestMeasurement(m,h),g=v?v.end+this.options.gap:r+o,x=s.get(p),C=typeof x=="number"?x:this.options.estimateSize(h),y=g+C,T=v?v.lane:h%this.options.lanes;m[h]={index:h,start:g,size:C,end:y,key:p,lane:T,measureElement:b}}return this.measurementsCache=m,m},{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,l)=>r===null?[]:t({startIndex:r.startIndex,endIndex:r.endIndex,overscan:o,count:l}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=t=>{const r=this.options.indexAttribute,o=t.getAttribute(r);return o?parseInt(o,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(t,r)=>{const o=this.indexFromElement(t),l=this.getMeasurements()[o];if(!l||!t.isConnected){this.elementsCache.forEach((s,u)=>{s===t&&(this.observer.unobserve(t),this.elementsCache.delete(u))});return}const i=this.elementsCache.get(l.key);i!==t&&(i&&this.observer.unobserve(i),this.observer.observe(t),this.elementsCache.set(l.key,t)),this.resizeItem(o,this.options.measureElement(t,r,this))},this.resizeItem=(t,r)=>{const o=this.getMeasurements()[t];if(!o)return;const l=this.itemSizeCache.get(o.key)??o.size,i=r-l;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,i,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",i),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,r)),this.notify(!0,!1))},this.measureElement=t=>{t&&this._measureElement(t,void 0)},this.getVirtualItems=qe(()=>[this.getIndexes(),this.getMeasurements()],(t,r)=>{const o=[];for(let l=0,i=t.length;l<i;l++){const s=t[l],u=r[s];o.push(u)}return o},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const r=this.getMeasurements();if(r.length!==0)return jt(r[pn(0,r.length-1,o=>jt(r[o]).start,t)])},this.getOffsetForAlignment=(t,r)=>{const o=this.getSize(),l=this.getScrollOffset();r==="auto"&&(t<=l?r="start":t>=l+o?r="end":r="start"),r==="start"?t=t:r==="end"?t=t-o:r==="center"&&(t=t-o/2);const i=this.options.horizontal?"scrollWidth":"scrollHeight",u=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-o;return Math.max(Math.min(u,t),0)},this.getOffsetForIndex=(t,r="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const o=this.getMeasurements()[t];if(!o)return;const l=this.getSize(),i=this.getScrollOffset();if(r==="auto")if(o.end>=i+l-this.options.scrollPaddingEnd)r="end";else if(o.start<=i+this.options.scrollPaddingStart)r="start";else return[i,r];const s=r==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,r),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(t,{align:r="start",behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(t,r),{adjustments:void 0,behavior:o})},this.scrollToIndex=(t,{align:r="auto",behavior:o}={})=>{t=Math.max(0,Math.min(t,this.options.count-1)),this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const l=this.getOffsetForIndex(t,r);if(!l)return;const[i,s]=l;this._scrollToOffset(i,{adjustments:void 0,behavior:o}),o!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(t))){const[c]=jt(this.getOffsetForIndex(t,s));kr(c,this.getScrollOffset())||this.scrollToIndex(t,{align:s,behavior:o})}else this.scrollToIndex(t,{align:s,behavior:o})}))},this.scrollBy=(t,{behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+t,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var t;const r=this.getMeasurements();let o;return r.length===0?o=this.options.paddingStart:o=this.options.lanes===1?((t=r[r.length-1])==null?void 0:t.end)??0:Math.max(...r.slice(-this.options.lanes).map(l=>l.end)),o-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(t,{adjustments:r,behavior:o})=>{this.options.scrollToFn(t,{behavior:o,adjustments:r},this)},this.measure=()=>{var t,r;this.itemSizeCache=new Map,(r=(t=this.options).onChange)==null||r.call(t,this,!1)},this.setOptions(n)}}const pn=(e,n,t,r)=>{for(;e<=n;){const o=(e+n)/2|0,l=t(o);if(l<r)e=o+1;else if(l>r)n=o-1;else return o}return e>0?e-1:0};function Wr({measurements:e,outerSize:n,scrollOffset:t}){const r=e.length-1,l=pn(0,r,s=>e[s].start,t);let i=l;for(;i<r&&e[i].end<t+n;)i++;return{startIndex:l,endIndex:i}}const Ur=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Hr(e){const n=E.useReducer(()=>({}),{})[1],t={...e,onChange:(o,l)=>{var i;l?un.flushSync(n):n(),(i=e.onChange)==null||i.call(e,o,l)}},[r]=E.useState(()=>new zr(t));return r.setOptions(t),E.useEffect(()=>r._didMount(),[]),Ur(()=>r._willUpdate()),r}function Vr(e){return Hr({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,Nt=(e,n,t)=>(qr(e,typeof n!="symbol"?n+"":n,t),t);let Zr=class{constructor(){Nt(this,"current",this.detect()),Nt(this,"handoffState","pending"),Nt(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"}},Te=new Zr,te=(e,n)=>{Te.isServer?a.useEffect(e,n):a.useLayoutEffect(e,n)};function Ee(e){let n=a.useRef(e);return te(()=>{n.current=e},[e]),n}function It(e,n){let[t,r]=a.useState(e),o=Ee(e);return te(()=>r(o.current),[o,r,...n]),t}let j=function(e){let n=Ee(e);return a.useCallback((...t)=>n.current(...t),[n])};function hn(e,n,t){let[r,o]=a.useState(t),l=e!==void 0,i=a.useRef(l),s=a.useRef(!1),u=a.useRef(!1);return l&&!i.current&&!s.current?(s.current=!0,i.current=l,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!l&&i.current&&!u.current&&(u.current=!0,i.current=l,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[l?e:r,j(c=>(l||o(c),n==null?void 0:n(c)))]}function it(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(n=>setTimeout(()=>{throw n}))}function we(){let e=[],n={addEventListener(t,r,o,l){return t.addEventListener(r,o,l),n.add(()=>t.removeEventListener(r,o,l))},requestAnimationFrame(...t){let r=requestAnimationFrame(...t);return n.add(()=>cancelAnimationFrame(r))},nextFrame(...t){return n.requestAnimationFrame(()=>n.requestAnimationFrame(...t))},setTimeout(...t){let r=setTimeout(...t);return n.add(()=>clearTimeout(r))},microTask(...t){let r={current:!0};return it(()=>{r.current&&t[0]()}),n.add(()=>{r.current=!1})},style(t,r,o){let l=t.style.getPropertyValue(r);return Object.assign(t.style,{[r]:o}),this.add(()=>{Object.assign(t.style,{[r]:l})})},group(t){let r=we();return t(r),this.add(()=>r.dispose())},add(t){return e.push(t),()=>{let r=e.indexOf(t);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let t of e.splice(0))t()}};return n}function Oe(){let[e]=a.useState(we);return a.useEffect(()=>()=>e.dispose(),[e]),e}function Gr(){let e=typeof document>"u";return"useSyncExternalStore"in E?(n=>n.useSyncExternalStore)(E)(()=>()=>{},()=>!1,()=>!e):!1}function Be(){let e=Gr(),[n,t]=E.useState(Te.isHandoffComplete);return n&&Te.isHandoffComplete===!1&&t(!1),E.useEffect(()=>{n!==!0&&t(!0)},[n]),E.useEffect(()=>Te.handoff(),[]),e?!1:n}var vn;let ge=(vn=a.useId)!=null?vn:function(){let e=Be(),[n,t]=a.useState(e?()=>Te.nextId():null);return te(()=>{n===null&&t(Te.nextId())},[n]),n!=null?""+n:void 0};function se(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,se),r}function st(e){return Te.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 je=(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))(je||{}),gn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(gn||{}),Kr=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Kr||{});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 $t=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))($t||{});function kt(e,n=0){var t;return e===((t=st(e))==null?void 0:t.body)?!1:se(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=st(e);we().nextFrame(()=>{n&&!kt(n.activeElement,0)&&Fe(e)})}var Jr=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Jr||{});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 Qr=["textarea","input"].join(",");function Xr(e){var n,t;return(t=(n=e==null?void 0:e.matches)==null?void 0:n.call(e,Qr))!=null?t:!1}function Pt(e,n=t=>t){return e.slice().sort((t,r)=>{let o=n(t),l=n(r);if(o===null||l===null)return 0;let i=o.compareDocumentPosition(l);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function eo(e,n){return Ze(bn(),n,{relativeTo:e})}function Ze(e,n,{sorted:t=!0,relativeTo:r=null,skipElements:o=[]}={}){let l=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,i=Array.isArray(e)?t?Pt(e):e:bn(e);o.length>0&&i.length>1&&(i=i.filter(p=>!o.includes(p))),r=r??l.activeElement;let s=(()=>{if(n&5)return 1;if(n&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(n&1)return 0;if(n&2)return Math.max(0,i.indexOf(r))-1;if(n&4)return Math.max(0,i.indexOf(r))+1;if(n&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=n&32?{preventScroll:!0}:{},m=0,h=i.length,b;do{if(m>=h||m+h<=0)return 0;let p=u+m;if(n&16)p=(p+h)%h;else{if(p<0)return 3;if(p>=h)return 1}b=i[p],b==null||b.focus(c),m+=s}while(b!==l.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 at(e,n,t){let r=Ee(n);a.useEffect(()=>{function o(l){r.current(l)}return document.addEventListener(e,o,t),()=>document.removeEventListener(e,o,t)},[e,t])}function En(e,n,t){let r=Ee(n);a.useEffect(()=>{function o(l){r.current(l)}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(i,s){if(!r.current||i.defaultPrevented)return;let u=s(i);if(u===null||!u.getRootNode().contains(u)||!u.isConnected)return;let c=function m(h){return typeof h=="function"?m(h()):Array.isArray(h)||h instanceof Set?h:[h]}(e);for(let m of c){if(m===null)continue;let h=m instanceof HTMLElement?m:m.current;if(h!=null&&h.contains(u)||i.composed&&i.composedPath().includes(h))return}return!kt(u,$t.Loose)&&u.tabIndex!==-1&&i.preventDefault(),n(i,u)}let l=a.useRef(null);at("pointerdown",i=>{var s,u;r.current&&(l.current=((u=(s=i.composedPath)==null?void 0:s.call(i))==null?void 0:u[0])||i.target)},!0),at("mousedown",i=>{var s,u;r.current&&(l.current=((u=(s=i.composedPath)==null?void 0:s.call(i))==null?void 0:u[0])||i.target)},!0),at("click",i=>{yn()||l.current&&(o(i,()=>l.current),l.current=null)},!0),at("touchend",i=>o(i,()=>i.target instanceof HTMLElement?i.target:null),!0),En("blur",i=>o(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function De(...e){return a.useMemo(()=>st(...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 te(()=>{r(Sn(e))},[e.type,e.as]),te(()=>{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),l=a.useRef(t);a.useEffect(()=>{o.current=n,l.current=t},[n,t]),te(()=>{if(!e||!r)return;let i=st(e);if(!i)return;let s=o.current,u=l.current,c=Object.assign(h=>s(h),{acceptNode:s}),m=i.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,c,!1);for(;m.nextNode();)u(m.currentNode)},[e,r,o,l])}function Ge(e,n){let t=a.useRef([]),r=j(e);a.useEffect(()=>{let o=[...t.current];for(let[l,i]of n.entries())if(t.current[l]!==i){let s=r(n,o);return t.current=n,s}},[r,...n])}function ut(...e){return Array.from(new Set(e.flatMap(n=>typeof n=="string"?n.split(" "):[]))).filter(Boolean).join(" ")}var $e=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))($e||{}),ke=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(ke||{});function oe({ourProps:e,theirProps:n,slot:t,defaultTag:r,features:o,visible:l=!0,name:i,mergeRefs:s}){s=s??ro;let u=Nn(n,e);if(l)return ct(u,t,r,i,s);let c=o??0;if(c&2){let{static:m=!1,...h}=u;if(m)return ct(h,t,r,i,s)}if(c&1){let{unmount:m=!0,...h}=u;return se(m?0:1,{0(){return null},1(){return ct({...h,hidden:!0,style:{display:"none"}},t,r,i,s)}})}return ct(u,t,r,i,s)}function ct(e,n={},t,r,o){let{as:l=t,children:i,refName:s="ref",...u}=Dt(e,["unmount","static"]),c=e.ref!==void 0?{[s]:e.ref}:{},m=typeof i=="function"?i(n):i;"className"in u&&u.className&&typeof u.className=="function"&&(u.className=u.className(n));let h={};if(n){let b=!1,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(l===a.Fragment&&Object.keys(dt(u)).length>0){if(!a.isValidElement(m)||Array.isArray(m)&&m.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=m.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(m,Object.assign({},In(m.props,ct(Dt(u,["ref"]))),h,c,{ref:o(m.ref,c.ref)},v))}return a.createElement(l,Object.assign({},Dt(u,["ref"]),l!==a.Fragment&&c,l!==a.Fragment&&h),m)}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,...l){let i=t[r];for(let s of i){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;s(o,...l)}}});return n}function le(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 lo(e,n){var t;let{features:r=1,...o}=e,l={ref:n,"aria-hidden":(r&2)===2?!0:(t=o["aria-hidden"])!=null?t:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return oe({ourProps:l,theirProps:o,slot:{},defaultTag:oo,name:"Hidden"})}let Ke=le(lo),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 Je(){return a.useContext(Lt)}function _t({value:e,children:n}){return a.createElement(Lt.Provider,{value:e},n)}function io(e){function n(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",n))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",n),n())}let Ce=[];io(()=>{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 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 l=0;l<t.length;++l)if(!n.resolveDisabled(t[l],l,t))return l;return r}case 1:{for(let l=o-1;l>=0;--l)if(!n.resolveDisabled(t[l],l,t))return l;return r}case 2:{for(let l=o+1;l<t.length;++l)if(!n.resolveDisabled(t[l],l,t))return l;return r}case 3:{for(let l=t.length-1;l>=0;--l)if(!n.resolveDisabled(t[l],l,t))return l;return r}case 4:{for(let l=0;l<t.length;++l)if(n.resolveId(t[l],l,t)===e.id)return l;return r}case 5:return null;default:ao(e)}}function Nn(e={},n=null,t=[]){for(let[r,o]of Object.entries(e))$n(t,Fn(n,r),o);return t}function Fn(e,n){return e?e+"["+n+"]":n}function $n(e,n,t){if(Array.isArray(t))for(let[r,o]of t.entries())$n(e,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,""]):Nn(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((i,s)=>i.dataRef.current.order-s.dataRef.current.order):Pt(r,i=>i.dataRef.current.domRef.current),l=t?o.indexOf(t):null;return l===-1&&(l=null),{options:o,activeOptionIndex:l}}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,l,i;if((t=e.dataRef.current)!=null&&t.disabled||(r=e.dataRef.current)!=null&&r.optionsRef.current&&!((o=e.dataRef.current)!=null&&o.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let m=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=(l=n.trigger)!=null?l:2;return e.activeOptionIndex===m&&e.activationTrigger===h?e:{...e,activeOptionIndex:m,activationTrigger:h}}let s=Bt(e);if(s.activeOptionIndex===null){let m=s.options.findIndex(h=>!h.dataRef.current.disabled);m!==-1&&(s.activeOptionIndex=m)}let u=n.focus===te.Specific?n.idx:Rt(n,{resolveItems:()=>s.options,resolveActiveIndex:()=>s.activeOptionIndex,resolveId:m=>m.id,resolveDisabled:m=>m.dataRef.current.disabled}),c=(i=n.trigger)!=null?i:2;return e.activeOptionIndex===u&&e.activationTrigger===c?e:{...e,...s,activeOptionIndex:u,activationTrigger:c}},3:(e,n)=>{var t,r,o;if((t=e.dataRef.current)!=null&&t.virtual)return{...e,options:[...e.options,n.payload]};let l=n.payload,i=Bt(e,u=>(u.push(l),u));e.activeOptionIndex===null&&(r=e.dataRef.current)!=null&&r.isSelected(n.payload.dataRef.current.value)&&(i.activeOptionIndex=i.options.indexOf(l));let s={...e,...i,activationTrigger:2};return(o=e.dataRef.current)!=null&&o.__demoMode&&e.dataRef.current.value===void 0&&(s.activeOptionIndex=0),s},4:(e,n)=>{var t;if((t=e.dataRef.current)!=null&&t.virtual)return{...e,options:e.options.filter(o=>o.id!==n.id)};let r=Bt(e,o=>{let l=o.findIndex(i=>i.id===n.id);return l!==-1&&o.splice(l,1),o});return{...e,...r,activationTrigger:2}},5:(e,n)=>e.labelId===n.id?e:{...e,labelId:n.id},6:(e,n)=>e.activationTrigger===n.trigger?e:{...e,activationTrigger:n.trigger},7:(e,n)=>{var t;if(((t=e.virtual)==null?void 0:t.options)===n.options)return e;let r=e.activeOptionIndex;if(e.activeOptionIndex!==null){let o=n.options.indexOf(e.virtual.options[e.activeOptionIndex]);o!==-1?r=o:r=null}return{...e,activeOptionIndex:r,virtual:Object.assign({},e.virtual,{options:n.options})}}},zt=a.createContext(null);zt.displayName="ComboboxActionsContext";function Qe(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,Qe),t}return n}let kn=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]),l=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}),[i,s]=a.useState(0);return ee(()=>{s(u=>u+1)},[(n=t.virtual)==null?void 0:n.options]),a.createElement(kn.Provider,{value:l},a.createElement("div",{style:{position:"relative",width:"100%",height:`${l.getTotalSize()}px`},ref:u=>{if(u){if(typeof process<"u"&&process.env.JEST_WORKER_ID!==void 0||t.activationTrigger===0)return;t.activeOptionIndex!==null&&t.virtual.options.length>t.activeOptionIndex&&l.scrollToIndex(t.activeOptionIndex)}}},l.getVirtualItems().map(u=>{var c;return a.createElement(a.Fragment,{key:u.key},a.cloneElement((c=e.children)==null?void 0:c.call(e,{option:t.virtual.options[u.index],open:t.comboboxState===0}),{key:`${i}-${u.key}`,"data-index":u.index,"aria-setsize":t.virtual.options.length,"aria-posinset":u.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${u.start}px)`,overflowAnchor:"none"}}))})))}let 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 se(n.type,ho,e,n)}let bo=a.Fragment;function xo(e,n){let{value:t,defaultValue:r,onChange:o,form:l,name:i,by:s=null,disabled:u=!1,__demoMode:c=!1,nullable:m=!1,multiple:h=!1,immediate:b=!1,virtual:p=null,...v}=e,g=!1,x=null,[C=h?[]:void 0,y]=hn(t,o,r),[T,I]=a.useReducer(go,{dataRef:a.createRef(),comboboxState:c?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),F=a.useRef(!1),P=a.useRef({static:!1,hold:!1}),R=a.useRef(null),Y=a.useRef(null),D=a.useRef(null),M=a.useRef(null),B=j(typeof s=="string"?(A,q)=>{let W=s;return(A==null?void 0:A[W])===(q==null?void 0:q[W])}:s??((A,q)=>A===q)),G=j(A=>T.options.findIndex(q=>B(q.dataRef.current.value,A))),J=a.useCallback(A=>se(w.mode,{1:()=>C.some(q=>B(q,A)),0:()=>B(C,A)}),[C]),ae=j(A=>T.activeOptionIndex===G(A)),w=a.useMemo(()=>({...T,immediate:g,optionsPropsRef:P,labelRef:R,inputRef:Y,buttonRef:D,optionsRef:M,value:C,defaultValue:r,disabled:u,mode:h?1:0,virtual:T.virtual,get activeOptionIndex(){if(F.current&&T.activeOptionIndex===null&&T.options.length>0){let A=T.options.findIndex(q=>!q.dataRef.current.disabled);if(A!==-1)return A}return T.activeOptionIndex},calculateIndex:G,compare:B,isSelected:J,isActive:ae,nullable:m,__demoMode:c}),[C,r,u,h,m,c,T,x]);ee(()=>{},[x,void 0]),ee(()=>{T.dataRef.current=w},[w]),Mt([w.buttonRef,w.inputRef,w.optionsRef],()=>Ae.closeCombobox(),w.comboboxState===0);let L=a.useMemo(()=>{var A,q,W;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]:(W=(q=w.options[w.activeOptionIndex])==null?void 0:q.dataRef.current.value)!=null?W:null,value:C}},[w,u,C]),k=j(()=>{if(w.activeOptionIndex!==null){if(w.virtual)Se(w.virtual.options[w.activeOptionIndex]);else{let{dataRef:A}=w.options[w.activeOptionIndex];Se(A.current.value)}Ae.goToOption(te.Specific,w.activeOptionIndex)}}),Q=j(()=>{I({type:0}),F.current=!0}),U=j(()=>{I({type:1}),F.current=!1}),ne=j((A,q,W)=>(F.current=!1,A===te.Specific?I({type:2,focus:te.Specific,idx:q,trigger:W}):I({type:2,focus:A,trigger:W}))),fe=j((A,q)=>(I({type:3,payload:{id:A,dataRef:q}}),()=>{w.isActive(q.current.value)&&(F.current=!0),I({type:4,id:A})})),ge=j(A=>(I({type:5,id:A}),()=>I({type:5,id:null}))),Se=j(A=>se(w.mode,{0(){return y==null?void 0:y(A)},1(){let q=w.value.slice(),W=q.findIndex(pe=>B(pe,A));return W===-1?q.push(A):q.splice(W,1),y==null?void 0:y(q)}})),be=j(A=>{I({type:6,trigger:A})}),Ae=a.useMemo(()=>({onChange:Se,registerOption:fe,registerLabel:ge,goToOption:ne,closeCombobox:U,openCombobox:Q,setActivationTrigger:be,selectActiveOption:k}),[]),$=n===null?{}:{ref:n},H=a.useRef(null),ie=Oe();return a.useEffect(()=>{H.current&&r!==void 0&&ie.addEventListener(H.current,"reset",()=>{y==null||y(r)})},[H,y]),a.createElement(zt.Provider,{value:Ae},a.createElement(Wt.Provider,{value:w},a.createElement(_t,{value:se(w.comboboxState,{0:ce.Open,1:ce.Closed})},i!=null&&C!=null&&Nn({[i]:C}).map(([A,q],W)=>a.createElement(Ke,{features:ze.Hidden,ref:W===0?pe=>{var he;H.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:l,disabled:u,name:A,value:q})})),oe({ourProps:$,theirProps:v,slot:L,defaultTag:bo,name:"Combobox"}))))}let wo="input";function yo(e,n){var t,r,o,l,i;let s=ve(),{id:u=`headlessui-combobox-input-${s}`,onChange:c,displayValue:m,type:h="text",...b}=e,p=Le("Combobox.Input"),v=Qe("Combobox.Input"),g=ue(p.inputRef,n),x=De(p.inputRef),C=a.useRef(!1),y=Oe(),T=j(()=>{v.onChange(null),p.optionsRef.current&&(p.optionsRef.current.scrollTop=0),v.goToOption(te.Nothing)}),I=function(){var w;return typeof m=="function"&&p.value!==void 0?(w=m(p.value))!=null?w:"":typeof p.value=="string"?p.value:""}();Ge(([w,L],[k,Q])=>{if(C.current)return;let U=p.inputRef.current;U&&((Q===0&&L===1||w!==k)&&(U.value=w),requestAnimationFrame(()=>{if(C.current||!U||(x==null?void 0:x.activeElement)!==U)return;let{selectionStart:ne,selectionEnd:fe}=U;Math.abs((fe??0)-(ne??0))===0&&ne===0&&U.setSelectionRange(U.value.length,U.value.length)}))},[I,p.comboboxState,x]),Ge(([w],[L])=>{if(w===0&&L===1){if(C.current)return;let k=p.inputRef.current;if(!k)return;let Q=k.value,{selectionStart:U,selectionEnd:ne,selectionDirection:fe}=k;k.value="",k.value=Q,fe!==null?k.setSelectionRange(U,ne,fe):k.setSelectionRange(U,ne)}},[p.comboboxState]);let F=a.useRef(!1),P=j(()=>{F.current=!0}),R=j(()=>{y.nextFrame(()=>{F.current=!1})}),Y=j(w=>{switch(C.current=!0,w.key){case K.Enter:if(C.current=!1,p.comboboxState!==0||F.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 C.current=!1,w.preventDefault(),w.stopPropagation(),se(p.comboboxState,{0:()=>v.goToOption(te.Next),1:()=>v.openCombobox()});case K.ArrowUp:return C.current=!1,w.preventDefault(),w.stopPropagation(),se(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 C.current=!1,w.preventDefault(),w.stopPropagation(),v.goToOption(te.First);case K.PageUp:return C.current=!1,w.preventDefault(),w.stopPropagation(),v.goToOption(te.First);case K.End:if(w.shiftKey)break;return C.current=!1,w.preventDefault(),w.stopPropagation(),v.goToOption(te.Last);case K.PageDown:return C.current=!1,w.preventDefault(),w.stopPropagation(),v.goToOption(te.Last);case K.Escape:return C.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(C.current=!1,p.comboboxState!==0)return;p.mode===0&&p.activationTrigger!==1&&v.selectActiveOption(),v.closeCombobox();break}}),D=j(w=>{c==null||c(w),p.nullable&&p.mode===0&&w.target.value===""&&T(),v.openCombobox()}),M=j(w=>{var L,k,Q;let U=(L=w.relatedTarget)!=null?L:Ce.find(ne=>ne!==w.currentTarget);if(C.current=!1,!((k=p.optionsRef.current)!=null&&k.contains(U))&&!((Q=p.buttonRef.current)!=null&&Q.contains(U))&&p.comboboxState===0)return w.preventDefault(),p.mode===0&&(p.nullable&&p.value===null?T():p.activationTrigger!==1&&v.selectActiveOption()),v.closeCombobox()}),B=j(w=>{var L,k,Q;let U=(L=w.relatedTarget)!=null?L:Ce.find(ne=>ne!==w.currentTarget);(k=p.buttonRef.current)!=null&&k.contains(U)||(Q=p.optionsRef.current)!=null&&Q.contains(U)||p.disabled||p.immediate&&p.comboboxState!==0&&(v.openCombobox(),y.nextFrame(()=>{v.setActivationTrigger(1)}))}),G=Nt(()=>{if(p.labelId)return[p.labelId].join(" ")},[p.labelId]),J=a.useMemo(()=>({open:p.comboboxState===0,disabled:p.disabled}),[p]),ae={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 L;return!((L=p.virtual)!=null&&L.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":G,"aria-autocomplete":"list",defaultValue:(i=(l=e.defaultValue)!=null?l:p.defaultValue!==void 0?m==null?void 0:m(p.defaultValue):null)!=null?i:p.defaultValue,disabled:p.disabled,onCompositionStart:P,onCompositionEnd:R,onKeyDown:Y,onChange:D,onFocus:B,onBlur:M};return oe({ourProps:ae,theirProps:b,slot:J,defaultTag:wo,name:"Combobox.Input"})}let Eo="button";function So(e,n){var t;let r=Le("Combobox.Button"),o=Qe("Combobox.Button"),l=ue(r.buttonRef,n),i=ve(),{id:s=`headlessui-combobox-button-${i}`,...u}=e,c=Oe(),m=j(g=>{switch(g.key){case K.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 K.ArrowUp:return g.preventDefault(),g.stopPropagation(),r.comboboxState===1&&(o.openCombobox(),c.nextFrame(()=>{r.value||o.goToOption(te.Last)})),c.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(),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=Nt(()=>{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:l,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:m};return oe({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,l=Le("Combobox.Label"),i=Qe("Combobox.Label"),s=ue(l.labelRef,n);ee(()=>i.registerLabel(r),[r]);let u=j(()=>{var m;return(m=l.inputRef.current)==null?void 0:m.focus({preventScroll:!0})}),c=a.useMemo(()=>({open:l.comboboxState===0,disabled:l.disabled}),[l]);return oe({ourProps:{ref:s,id:r,onClick:u},theirProps:o,slot:c,defaultTag:Co,name:"Combobox.Label"})}let Oo="ul",jo=$e.RenderStrategy|$e.Static;function Io(e,n){let t=ve(),{id:r=`headlessui-combobox-options-${t}`,hold:o=!1,...l}=e,i=Le("Combobox.Options"),s=ue(i.optionsRef,n),u=Je(),c=u!==null?(u&ce.Open)===ce.Open:i.comboboxState===0;ee(()=>{var p;i.optionsPropsRef.current.static=(p=e.static)!=null?p:!1},[i.optionsPropsRef,e.static]),ee(()=>{i.optionsPropsRef.current.hold=o},[i.optionsPropsRef,o]),jn({container:i.optionsRef.current,enabled:i.comboboxState===0,accept(p){return p.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:p.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(p){p.setAttribute("role","none")}});let m=Nt(()=>{var p,v;return(v=i.labelId)!=null?v:(p=i.buttonRef.current)==null?void 0:p.id},[i.labelId,i.buttonRef.current]),h=a.useMemo(()=>({open:i.comboboxState===0,option:void 0}),[i]),b={"aria-labelledby":m,role:"listbox","aria-multiselectable":i.mode===1?!0:void 0,id:r,ref:s};return i.virtual&&i.comboboxState===0&&Object.assign(l,{children:a.createElement(vo,null,l.children)}),oe({ourProps:b,theirProps:l,slot:h,defaultTag:Oo,features:jo,visible:c,name:"Combobox.Options"})}let No="li";function Fo(e,n){var t;let r=ve(),{id:o=`headlessui-combobox-option-${r}`,disabled:l=!1,value:i,order:s=null,...u}=e,c=Le("Combobox.Option"),m=Qe("Combobox.Option"),h=c.virtual?c.activeOptionIndex===c.calculateIndex(i):c.activeOptionIndex===null?!1:((t=c.options[c.activeOptionIndex])==null?void 0:t.id)===o,b=c.isSelected(i),p=a.useRef(null),v=Ee({disabled:l,value:i,domRef:p,order:s}),g=a.useContext(kn),x=ue(n,p,g?g.measureElement:null),C=j(()=>m.onChange(i));ee(()=>m.registerOption(o,v),[v,o]);let y=a.useRef(!(c.virtual||c.__demoMode));ee(()=>{if(!c.virtual||!c.__demoMode)return;let M=we();return M.requestAnimationFrame(()=>{y.current=!0}),M.dispose},[c.virtual,c.__demoMode]),ee(()=>{if(!y.current||c.comboboxState!==0||!h||c.activationTrigger===0)return;let M=we();return M.requestAnimationFrame(()=>{var B,G;(G=(B=p.current)==null?void 0:B.scrollIntoView)==null||G.call(B,{block:"nearest"})}),M.dispose},[p,h,c.comboboxState,c.activationTrigger,c.activeOptionIndex]);let T=j(M=>{var B;if(l||(B=c.virtual)!=null&&B.disabled(i))return M.preventDefault();C(),yn()||requestAnimationFrame(()=>{var G;return(G=c.inputRef.current)==null?void 0:G.focus({preventScroll:!0})}),c.mode===0&&requestAnimationFrame(()=>m.closeCombobox())}),I=j(()=>{var M;if(l||(M=c.virtual)!=null&&M.disabled(i))return m.goToOption(te.Nothing);let B=c.calculateIndex(i);m.goToOption(te.Specific,B)}),F=On(),P=j(M=>F.update(M)),R=j(M=>{var B;if(!F.wasMoved(M)||l||(B=c.virtual)!=null&&B.disabled(i)||h)return;let G=c.calculateIndex(i);m.goToOption(te.Specific,G,0)}),Y=j(M=>{var B;F.wasMoved(M)&&(l||(B=c.virtual)!=null&&B.disabled(i)||h&&(c.optionsPropsRef.current.hold||m.goToOption(te.Nothing)))}),D=a.useMemo(()=>({active:h,selected:b,disabled:l}),[h,b,l]);return oe({ourProps:{id:o,ref:x,role:"option",tabIndex:l===!0?void 0:-1,"aria-disabled":l===!0?!0:void 0,"aria-selected":b,disabled:void 0,onClick:T,onFocus:I,onPointerEnter:P,onMouseEnter:P,onPointerMove:R,onMouseMove:R,onPointerLeave:Y,onMouseLeave:Y},theirProps:u,slot:D,defaultTag:No,name:"Combobox.Option"})}let $o=le(xo),ko=le(So),Po=le(yo),Mo=le(To),Ao=le(Io),Do=le(Fo),Ie=Object.assign($o,{Input:Po,Button:ko,Label:Mo,Options:Ao,Option:Do});function Pn(e,n,t,r){let o=Ee(t);a.useEffect(()=>{e=e??window;function l(i){o.current(i)}return e.addEventListener(n,l,r),()=>e.removeEventListener(n,l,r)},[e,n,r])}function 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,lt(()=>{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:l,features:i=30,...s}=e;Be()||(i=1);let u=De(t);Wo({ownerDocument:u},!!(i&16));let c=Uo({ownerDocument:u,container:t,initialFocus:o},!!(i&2));Ho({ownerDocument:u,container:t,containers:l,previousActiveElement:c},!!(i&8));let m=Lo(),h=j(g=>{let x=t.current;x&&(C=>C())(()=>{se(m.current,{[et.Forwards]:()=>{Ze(x,je.First,{skipElements:[g.relatedTarget]})},[et.Backwards]:()=>{Ze(x,je.Last,{skipElements:[g.relatedTarget]})}})})}),b=Oe(),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(l);t.current instanceof HTMLElement&&x.add(t.current);let C=g.relatedTarget;C instanceof HTMLElement&&C.dataset.headlessuiFocusGuard!=="true"&&(Ln(x,C)||(p.current?Ze(t.current,se(m.current,{[et.Forwards]:()=>je.Next,[et.Backwards]:()=>je.Previous})|je.WrapAround,{relativeTo:g.target}):g.target instanceof HTMLElement&&Fe(g.target)))}};return a.createElement(a.Fragment,null,!!(i&4)&&a.createElement(Ke,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:ze.Focusable}),oe({ourProps:v,theirProps:s,defaultTag:_o,name:"FocusTrap"}),!!(i&4)&&a.createElement(Ke,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:ze.Focusable}))}let Bo=le(Ro),tt=Object.assign(Bo,{features:Dn});function zo(e=!0){let n=a.useRef(Ce.slice());return Ge(([t],[r])=>{r===!0&&t===!1&&lt(()=>{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);Ge(()=>{n||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&Fe(t())},[n]),Mn(()=>{n&&Fe(t())})}function Uo({ownerDocument:e,container:n,initialFocus:t},r){let o=a.useRef(null),l=Xe();return Ge(()=>{if(!r)return;let i=n.current;i&&lt(()=>{if(!l.current)return;let s=e==null?void 0:e.activeElement;if(t!=null&&t.current){if((t==null?void 0:t.current)===s){o.current=s;return}}else if(i.contains(s)){o.current=s;return}t!=null&&t.current?Fe(t.current):Ze(i,je.First)===gn.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),o.current=e==null?void 0:e.activeElement})},[r]),o}function Ho({ownerDocument:e,container:n,containers:t,previousActiveElement:r},o){let l=Xe();Pn(e==null?void 0:e.defaultView,"focus",i=>{if(!o||!l.current)return;let s=An(t);n.current instanceof HTMLElement&&s.add(n.current);let u=r.current;if(!u)return;let c=i.target;c&&c instanceof HTMLElement?Ln(s,c)?(r.current=c,Fe(c)):(i.preventDefault(),i.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 Ut(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,l]=a.useState(()=>{if(!n&&t!==null||Te.isServer)return null;let i=r==null?void 0:r.getElementById("headlessui-portal-root");if(i)return i;if(r===null)return null;let s=r.createElement("div");return s.setAttribute("id","headlessui-portal-root"),r.body.appendChild(s)});return a.useEffect(()=>{o!==null&&(r!=null&&r.body.contains(o)||r==null||r.body.appendChild(o))},[o,r]),a.useEffect(()=>{n||t!==null&&l(t.current)},[t,l,n]),o}let qo=a.Fragment;function Zo(e,n){let t=e,r=a.useRef(null),o=ue(no(m=>{r.current=m}),n),l=De(r),i=Yo(r),[s]=a.useState(()=>{var m;return Te.isServer?null:(m=l==null?void 0:l.createElement("div"))!=null?m:null}),u=a.useContext(Ht),c=Be();return ee(()=>{!i||!s||i.contains(s)||(s.setAttribute("data-headlessui-portal",""),i.appendChild(s))},[i,s]),ee(()=>{if(s&&u)return u.register(s)},[u,s]),Mn(()=>{var m;!i||!s||(s instanceof Node&&i.contains(s)&&i.removeChild(s),i.childNodes.length<=0&&((m=i.parentElement)==null||m.removeChild(i)))}),c?!i||!s?null:un.createPortal(oe({ourProps:{ref:o},theirProps:t,defaultTag:qo,name:"Portal"}),s):null}let Go=a.Fragment,Rn=a.createContext(null);function Ko(e,n){let{target:t,...r}=e,o={ref:ue(n)};return a.createElement(Rn.Provider,{value:t},oe({ourProps:o,theirProps:r,defaultTag:Go,name:"Popover.Group"}))}let Ht=a.createContext(null);function Jo(){let e=a.useContext(Ht),n=a.useRef([]),t=j(l=>(n.current.push(l),e&&e.register(l),()=>r(l))),r=j(l=>{let i=n.current.indexOf(l);i!==-1&&n.current.splice(i,1),e&&e.unregister(l)}),o=a.useMemo(()=>({register:t,unregister:r,portals:n}),[t,r,n]);return[n,a.useMemo(()=>function({children:l}){return a.createElement(Ht.Provider,{value:o},l)},[o])]}let Qo=le(Zo),Xo=le(Ko),Vt=Object.assign(Qo,{Group:Xo});function el(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}const tl=typeof Object.is=="function"?Object.is:el,{useState:nl,useEffect:rl,useLayoutEffect:ol,useDebugValue:ll}=E;function il(e,n,t){const r=n(),[{inst:o},l]=nl({inst:{value:r,getSnapshot:n}});return ol(()=>{o.value=r,o.getSnapshot=n,Yt(o)&&l({inst:o})},[e,r,n]),rl(()=>(Yt(o)&&l({inst:o}),e(()=>{Yt(o)&&l({inst:o})})),[e]),ll(r),r}function Yt(e){const n=e.getSnapshot,t=e.value;try{const r=n();return!tl(t,r)}catch{return!0}}function sl(e,n,t){return n()}const al=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ul=!al,cl=ul?sl:il,dl="useSyncExternalStore"in E?(e=>e.useSyncExternalStore)(E):cl;function fl(e){return dl(e.subscribe,e.getSnapshot,e.getSnapshot)}function ml(e,n){let t=e(),r=new Set;return{getSnapshot(){return t},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...l){let i=n[o].call(t,...l);i&&(t=i,r.forEach(s=>s()))}}}function pl(){let e;return{before({doc:n}){var t;let r=n.documentElement;e=((t=n.defaultView)!=null?t:window).innerWidth-r.clientWidth},after({doc:n,d:t}){let r=n.documentElement,o=r.clientWidth-r.offsetWidth,l=e-o;t.style(r,"paddingRight",`${l}px`)}}}function hl(){return wn()?{before({doc:e,d:n,meta:t}){function r(o){return t.containers.flatMap(l=>l()).some(l=>l.contains(o))}n.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let s=we();s.style(e.documentElement,"scrollBehavior","auto"),n.add(()=>n.microTask(()=>s.dispose()))}let l=(o=window.scrollY)!=null?o:window.pageYOffset,i=null;n.addEventListener(e,"click",s=>{if(s.target instanceof HTMLElement)try{let u=s.target.closest("a");if(!u)return;let{hash:c}=new URL(u.href),m=e.querySelector(c);m&&!r(m)&&(i=m)}catch{}},!0),n.addEventListener(e,"touchstart",s=>{if(s.target instanceof HTMLElement)if(r(s.target)){let u=s.target;for(;u.parentElement&&r(u.parentElement);)u=u.parentElement;n.style(u,"overscrollBehavior","contain")}else n.style(s.target,"touchAction","none")}),n.addEventListener(e,"touchmove",s=>{if(s.target instanceof HTMLElement)if(r(s.target)){let u=s.target;for(;u.parentElement&&u.dataset.headlessuiPortal!==""&&!(u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth);)u=u.parentElement;u.dataset.headlessuiPortal===""&&s.preventDefault()}else s.preventDefault()},{passive:!1}),n.add(()=>{var s;let u=(s=window.scrollY)!=null?s:window.pageYOffset;l!==u&&window.scrollTo(0,l),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})}}:{}}function vl(){return{before({doc:e,d:n}){n.style(e.documentElement,"overflow","hidden")}}}function gl(e){let n={};for(let t of e)Object.assign(n,t(n));return n}let _e=ml(()=>new Map,{PUSH(e,n){var t;let r=(t=this.get(e))!=null?t:{doc:e,count:0,d:we(),meta:new Set};return r.count++,r.meta.add(n),this.set(e,r),this},POP(e,n){let t=this.get(e);return t&&(t.count--,t.meta.delete(n)),this},SCROLL_PREVENT({doc:e,d:n,meta:t}){let r={doc:e,d:n,meta:gl(t)},o=[hl(),pl(),vl()];o.forEach(({before:l})=>l==null?void 0:l(r)),o.forEach(({after:l})=>l==null?void 0:l(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});_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 bl(e,n,t){let r=fl(_e),o=e?r.get(e):void 0,l=o?o.count>0:!1;return ee(()=>{if(!(!e||!n))return _e.dispatch("PUSH",e,t),()=>_e.dispatch("POP",e,t)},[n,e]),l}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 i;if(!r)return;let s=(i=nt.get(r))!=null?i:1;if(s===1?nt.delete(r):nt.set(r,s-1),s!==1)return;let 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 l=(t=nt.get(r))!=null?t:0;return nt.set(r,l+1),l!==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 xl({defaultContainers:e=[],portals:n,mainTreeNodeRef:t}={}){var r;let o=a.useRef((r=t==null?void 0:t.current)!=null?r:null),l=De(o),i=j(()=>{var s,u,c;let m=[];for(let h of e)h!==null&&(h instanceof HTMLElement?m.push(h):"current"in h&&h.current instanceof HTMLElement&&m.push(h.current));if(n!=null&&n.current)for(let h of n.current)m.push(h);for(let h of(s=l==null?void 0:l.querySelectorAll("html > *, body > *"))!=null?s:[])h!==document.body&&h!==document.head&&h instanceof HTMLElement&&h.id!=="headlessui-portal-root"&&(h.contains(o.current)||h.contains((c=(u=o.current)==null?void 0:u.getRootNode())==null?void 0:c.host)||m.some(b=>h.contains(b))||m.push(h));return m});return{resolveContainers:i,contains:j(s=>i().some(u=>u.contains(s))),mainTreeNodeRef:o,MainTreeNode:a.useMemo(()=>function(){return t!=null?null:a.createElement(Ke,{features:ze.Hidden,ref:o})},[o,t])}}let Zt=a.createContext(()=>{});Zt.displayName="StackContext";var Gt=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Gt||{});function wl(){return a.useContext(Zt)}function yl({children:e,onUpdate:n,type:t,element:r,enabled:o}){let l=wl(),i=j((...s)=>{n==null||n(...s),l(...s)});return ee(()=>{let s=o===void 0||o===!0;return s&&i(0,t,r),()=>{s&&i(1,t,r)}},[i,t,r,o]),a.createElement(Zt.Provider,{value:i},e)}let 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 Un(){let[e,n]=a.useState([]);return[e.length>0?e.join(" "):void 0,a.useMemo(()=>function(t){let r=j(l=>(n(i=>[...i,l]),()=>n(i=>{let s=i.slice(),u=s.indexOf(l);return u!==-1&&s.splice(u,1),s}))),o=a.useMemo(()=>({register:r,slot:t.slot,name:t.name,props:t.props}),[r,t.slot,t.name,t.props]);return a.createElement(zn.Provider,{value:o},t.children)},[n])]}let El="p";function Sl(e,n){let t=ve(),{id:r=`headlessui-description-${t}`,...o}=e,l=Wn(),i=ue(n);ee(()=>l.register(r),[r,l.register]);let s={ref:i,...l.props,id:r};return oe({ourProps:s,theirProps:o,slot:l.slot||{},defaultTag:El,name:l.name||"Description"})}let Cl=le(Sl),Hn=Object.assign(Cl,{});var Tl=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Tl||{}),Ol=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(Ol||{});let jl={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 Il(e,n,t=()=>[document.body]){bl(e,n,r=>{var o;return{containers:[...(o=r.containers)!=null?o:[],t]}})}function Nl(e,n){return se(n.type,jl,e,n)}let Fl="div",$l=$e.RenderStrategy|$e.Static;function kl(e,n){let t=ve(),{id:r=`headlessui-dialog-${t}`,open:o,onClose:l,initialFocus:i,role:s="dialog",__demoMode:u=!1,...c}=e,[m,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=Je();o===void 0&&p!==null&&(o=(p&ce.Open)===ce.Open);let v=a.useRef(null),g=ue(v,n),x=De(v),C=e.hasOwnProperty("open")||p!==null,y=e.hasOwnProperty("onClose");if(!C&&!y)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!C)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 l!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${l}`);let T=o?0:1,[I,F]=a.useReducer(Nl,{titleId:null,descriptionId:null,panelRef:a.createRef()}),P=j(()=>l(!1)),R=j(W=>F({type:0,id:W})),Y=Be()?u?!1:T===0:!1,D=m>1,M=a.useContext(ft)!==null,[B,G]=Jo(),J={get current(){var W;return(W=I.panelRef.current)!=null?W:v.current}},{resolveContainers:ae,mainTreeNodeRef:w,MainTreeNode:L}=xl({portals:B,defaultContainers:[J]}),k=D?"parent":"leaf",Q=p!==null?(p&ce.Closing)===ce.Closing:!1,U=M||Q?!1:Y,ne=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(w.current)&&he instanceof HTMLElement))!=null?pe:null},[w]);Bn(ne,U);let fe=D?!0:Y,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(w.current)&&he instanceof HTMLElement))!=null?pe:null},[w]);Bn(ge,fe),Mt(ae,W=>{W.preventDefault(),P()},!(!Y||D));let be=!(D||T!==0);Pn(x==null?void 0:x.defaultView,"keydown",W=>{be&&(W.defaultPrevented||W.key===K.Escape&&(W.preventDefault(),W.stopPropagation(),P()))}),Il(x,!(Q||T!==0||M),ae),a.useEffect(()=>{if(T!==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&&P()}});return W.observe(v.current),()=>W.disconnect()},[T,v,P]);let[$,H]=Un(),ie=a.useMemo(()=>[{dialogState:T,close:P,setTitleId:R},I],[T,I,P,R]),A=a.useMemo(()=>({open:T===0}),[T]),q={ref:g,id:r,role:s,"aria-modal":T===0?!0:void 0,"aria-labelledby":I.titleId,"aria-describedby":$};return a.createElement(yl,{type:"Dialog",enabled:T===0,element:v,onUpdate:j((W,pe)=>{pe==="Dialog"&&se(W,{[Gt.Add]:()=>h(he=>he+1),[Gt.Remove]:()=>h(he=>he-1)})})},a.createElement(Ut,{force:!0},a.createElement(Vt,null,a.createElement(ft.Provider,{value:ie},a.createElement(Vt.Group,{target:v},a.createElement(Ut,{force:!1},a.createElement(H,{slot:A,name:"Dialog.Description"},a.createElement(tt,{initialFocus:i,containers:ae,features:Y?se(k,{parent:tt.features.RestoreFocus,leaf:tt.features.All&~tt.features.FocusLock}):tt.features.None},a.createElement(G,null,oe({ourProps:q,theirProps:c,slot:A,defaultTag:Fl,features:$l,visible:T===0,name:"Dialog"}))))))))),a.createElement(L,null))}let Pl="div";function Ml(e,n){let t=ve(),{id:r=`headlessui-dialog-overlay-${t}`,...o}=e,[{dialogState:l,close:i}]=rt("Dialog.Overlay"),s=ue(n),u=j(m=>{if(m.target===m.currentTarget){if(dt(m.currentTarget))return m.preventDefault();m.preventDefault(),m.stopPropagation(),i()}}),c=a.useMemo(()=>({open:l===0}),[l]);return oe({ourProps:{ref:s,id:r,"aria-hidden":!0,onClick:u},theirProps:o,slot:c,defaultTag:Pl,name:"Dialog.Overlay"})}let Al="div";function Dl(e,n){let t=ve(),{id:r=`headlessui-dialog-backdrop-${t}`,...o}=e,[{dialogState:l},i]=rt("Dialog.Backdrop"),s=ue(n);a.useEffect(()=>{if(i.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[i.panelRef]);let u=a.useMemo(()=>({open:l===0}),[l]);return a.createElement(Ut,{force:!0},a.createElement(Vt,null,oe({ourProps:{ref:s,id:r,"aria-hidden":!0},theirProps:o,slot:u,defaultTag:Al,name:"Dialog.Backdrop"})))}let Ll="div";function _l(e,n){let t=ve(),{id:r=`headlessui-dialog-panel-${t}`,...o}=e,[{dialogState:l},i]=rt("Dialog.Panel"),s=ue(n,i.panelRef),u=a.useMemo(()=>({open:l===0}),[l]),c=j(m=>{m.stopPropagation()});return oe({ourProps:{ref:s,id:r,onClick:c},theirProps:o,slot:u,defaultTag:Ll,name:"Dialog.Panel"})}let Rl="h2";function Bl(e,n){let t=ve(),{id:r=`headlessui-dialog-title-${t}`,...o}=e,[{dialogState:l,setTitleId:i}]=rt("Dialog.Title"),s=ue(n);a.useEffect(()=>(i(r),()=>i(null)),[r,i]);let u=a.useMemo(()=>({open:l===0}),[l]);return oe({ourProps:{ref:s,id:r},theirProps:o,slot:u,defaultTag:Rl,name:"Dialog.Title"})}let zl=le(kl),Wl=le(Dl),Ul=le(_l),Hl=le(Ml),Vl=le(Bl),Vn=Object.assign(zl,{Backdrop:Wl,Panel:Ul,Overlay:Hl,Title:Vl,Description:Hn}),Yn=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function qn(e){var n,t;let r=(n=e.innerText)!=null?n:"",o=e.cloneNode(!0);if(!(o instanceof HTMLElement))return r;let l=!1;for(let s of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),l=!0;let i=l?(t=o.innerText)!=null?t:"":r;return Yn.test(i)&&(i=i.replace(Yn,"")),i}function Yl(e){let n=e.getAttribute("aria-label");if(typeof n=="string")return n.trim();let t=e.getAttribute("aria-labelledby");if(t){let r=t.split(" ").map(o=>{let l=document.getElementById(o);if(l){let i=l.getAttribute("aria-label");return typeof i=="string"?i.trim():qn(l).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return qn(e).trim()}function ql(e){let n=a.useRef(""),t=a.useRef("");return j(()=>{let r=e.current;if(!r)return"";let o=r.innerText;if(n.current===o)return t.current;let l=Yl(r).trim().toLowerCase();return n.current=o,t.current=l,l})}var Zl=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Zl||{}),Gl=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Gl||{}),Kl=(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))(Kl||{});function Kt(e,n=t=>t){let t=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,r=Pt(n(e.items.slice()),l=>l.dataRef.current.domRef.current),o=t?r.indexOf(t):null;return o===-1&&(o=null),{items:r,activeItemIndex:o}}let Jl={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=Kt(e),o=Rt(n,{resolveItems:()=>r.items,resolveActiveIndex:()=>r.activeItemIndex,resolveId:l=>l.id,resolveDisabled:l=>l.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeItemIndex:o,activationTrigger:(t=n.trigger)!=null?t:1}},3:(e,n)=>{let t=e.searchQuery!==""?0:1,r=e.searchQuery+n.value.toLowerCase(),o=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+t).concat(e.items.slice(0,e.activeItemIndex+t)):e.items).find(i=>{var s;return((s=i.dataRef.current.textValue)==null?void 0:s.startsWith(r))&&!i.dataRef.current.disabled}),l=o?e.items.indexOf(o):-1;return l===-1||l===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:l,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,n)=>{let t=Kt(e,r=>[...r,{id:n.id,dataRef:n.dataRef}]);return{...e,...t}},6:(e,n)=>{let t=Kt(e,r=>{let o=r.findIndex(l=>l.id===n.id);return o!==-1&&r.splice(o,1),r});return{...e,...t,activationTrigger:1}}},Jt=a.createContext(null);Jt.displayName="MenuContext";function mt(e){let n=a.useContext(Jt);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 Ql(e,n){return se(n.type,Jl,e,n)}let Xl=a.Fragment;function ei(e,n){let{__demoMode:t=!1,...r}=e,o=a.useReducer(Ql,{__demoMode:t,menuState:t?0:1,buttonRef:a.createRef(),itemsRef:a.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:l,itemsRef:i,buttonRef:s},u]=o,c=ue(n);Mt([s,i],(p,v)=>{var g;u({type:1}),kt(v,$t.Loose)||(p.preventDefault(),(g=s.current)==null||g.focus())},l===0);let m=j(()=>{u({type:1})}),h=a.useMemo(()=>({open:l===0,close:m}),[l,m]),b={ref:c};return a.createElement(Jt.Provider,{value:o},a.createElement(_t,{value:se(l,{0:ce.Open,1:ce.Closed})},oe({ourProps:b,theirProps:r,slot:h,defaultTag:Xl,name:"Menu"})))}let ti="button";function ni(e,n){var t;let r=ve(),{id:o=`headlessui-menu-button-${r}`,...l}=e,[i,s]=mt("Menu.Button"),u=ue(i.buttonRef,n),c=Oe(),m=j(g=>{switch(g.key){case K.Space:case K.Enter:case K.ArrowDown:g.preventDefault(),g.stopPropagation(),s({type:0}),c.nextFrame(()=>s({type:2,focus:te.First}));break;case K.ArrowUp:g.preventDefault(),g.stopPropagation(),s({type:0}),c.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||(i.menuState===0?(s({type:1}),c.nextFrame(()=>{var x;return(x=i.buttonRef.current)==null?void 0:x.focus({preventScroll:!0})})):(g.preventDefault(),s({type:0})))}),p=a.useMemo(()=>({open:i.menuState===0}),[i]),v={ref:u,id:o,type:At(e,i.buttonRef),"aria-haspopup":"menu","aria-controls":(t=i.itemsRef.current)==null?void 0:t.id,"aria-expanded":i.menuState===0,onKeyDown:m,onKeyUp:h,onClick:b};return oe({ourProps:v,theirProps:l,slot:p,defaultTag:ti,name:"Menu.Button"})}let ri="div",oi=$e.RenderStrategy|$e.Static;function li(e,n){var t,r;let o=ve(),{id:l=`headlessui-menu-items-${o}`,...i}=e,[s,u]=mt("Menu.Items"),c=ue(s.itemsRef,n),m=De(s.itemsRef),h=Oe(),b=Je(),p=b!==null?(b&ce.Open)===ce.Open:s.menuState===0;a.useEffect(()=>{let y=s.itemsRef.current;y&&s.menuState===0&&y!==(m==null?void 0:m.activeElement)&&y.focus({preventScroll:!0})},[s.menuState,s.itemsRef,m]),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:F}=s.items[s.activeItemIndex];(I=(T=F.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}),we().nextFrame(()=>{var F;return(F=s.buttonRef.current)==null?void 0:F.focus({preventScroll:!0})});break;case K.Tab:y.preventDefault(),y.stopPropagation(),u({type:1}),we().nextFrame(()=>{eo(s.buttonRef.current,y.shiftKey?je.Previous:je.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]),C={"aria-activedescendant":s.activeItemIndex===null||(t=s.items[s.activeItemIndex])==null?void 0:t.id,"aria-labelledby":(r=s.buttonRef.current)==null?void 0:r.id,id:l,onKeyDown:v,onKeyUp:g,role:"menu",tabIndex:0,ref:c};return oe({ourProps:C,theirProps:i,slot:x,defaultTag:ri,features:oi,visible:p,name:"Menu.Items"})}let ii=a.Fragment;function si(e,n){let t=ve(),{id:r=`headlessui-menu-item-${t}`,disabled:o=!1,...l}=e,[i,s]=mt("Menu.Item"),u=i.activeItemIndex!==null?i.items[i.activeItemIndex].id===r:!1,c=a.useRef(null),m=ue(n,c);ee(()=>{if(i.__demoMode||i.menuState!==0||!u||i.activationTrigger===0)return;let F=we();return F.requestAnimationFrame(()=>{var P,R;(R=(P=c.current)==null?void 0:P.scrollIntoView)==null||R.call(P,{block:"nearest"})}),F.dispose},[i.__demoMode,c,u,i.menuState,i.activationTrigger,i.activeItemIndex]);let h=ql(c),b=a.useRef({disabled:o,domRef:c,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(F=>{if(o)return F.preventDefault();s({type:1}),xn(i.buttonRef.current)}),g=j(()=>{if(o)return s({type:2,focus:te.Nothing});s({type:2,focus:te.Specific,id:r})}),x=On(),C=j(F=>x.update(F)),y=j(F=>{x.wasMoved(F)&&(o||u||s({type:2,focus:te.Specific,id:r,trigger:0}))}),T=j(F=>{x.wasMoved(F)&&(o||u&&s({type:2,focus:te.Nothing}))}),I=a.useMemo(()=>({active:u,disabled:o,close:p}),[u,o,p]);return oe({ourProps:{id:r,ref:m,role:"menuitem",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,disabled:void 0,onClick:v,onFocus:g,onPointerEnter:C,onMouseEnter:C,onPointerMove:y,onMouseMove:y,onPointerLeave:T,onMouseLeave:T},theirProps:l,slot:I,defaultTag:ii,name:"Menu.Item"})}let ai=le(ei),ui=le(ni),ci=le(li),di=le(si),pt=Object.assign(ai,{Button:ui,Items:ci,Item:di}),Zn=a.createContext(null);function Gn(){let e=a.useContext(Zn);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,Gn),n}return e}function fi(){let[e,n]=a.useState([]);return[e.length>0?e.join(" "):void 0,a.useMemo(()=>function(t){let r=j(l=>(n(i=>[...i,l]),()=>n(i=>{let s=i.slice(),u=s.indexOf(l);return u!==-1&&s.splice(u,1),s}))),o=a.useMemo(()=>({register:r,slot:t.slot,name:t.name,props:t.props}),[r,t.slot,t.name,t.props]);return a.createElement(Zn.Provider,{value:o},t.children)},[n])]}let mi="label";function pi(e,n){let t=ve(),{id:r=`headlessui-label-${t}`,passive:o=!1,...l}=e,i=Gn(),s=ue(n);ee(()=>i.register(r),[r,i.register]);let u={ref:s,...i.props,id:r};return o&&("onClick"in u&&(delete u.htmlFor,delete u.onClick),"onClick"in l&&delete l.onClick),oe({ourProps:u,theirProps:l,slot:i.slot||{},defaultTag:mi,name:i.name||"Label"})}let hi=le(pi),vi=Object.assign(hi,{});function gi(e=0){let[n,t]=a.useState(e),r=Xe(),o=a.useCallback(u=>{r.current&&t(c=>c|u)},[n,r]),l=a.useCallback(u=>!!(n&u),[n]),i=a.useCallback(u=>{r.current&&t(c=>c&~u)},[t,r]),s=a.useCallback(u=>{r.current&&t(c=>c^u)},[t]);return{flags:n,addFlag:o,hasFlag:l,removeFlag:i,toggleFlag:s}}let Qt=a.createContext(null);Qt.displayName="GroupContext";let bi=a.Fragment;function xi(e){var n;let[t,r]=a.useState(null),[o,l]=fi(),[i,s]=Un(),u=a.useMemo(()=>({switch:t,setSwitch:r,labelledby:o,describedby:i}),[t,r,o,i]),c={},m=e;return a.createElement(s,{name:"Switch.Description"},a.createElement(l,{name:"Switch.Label",props:{htmlFor:(n=u.switch)==null?void 0:n.id,onClick(h){t&&(h.currentTarget.tagName==="LABEL"&&h.preventDefault(),t.click(),t.focus({preventScroll:!0}))}}},a.createElement(Qt.Provider,{value:u},oe({ourProps:c,theirProps:m,defaultTag:bi,name:"Switch.Group"}))))}let wi="button";function yi(e,n){var t;let r=ve(),{id:o=`headlessui-switch-${r}`,checked:l,defaultChecked:i=!1,onChange:s,disabled:u=!1,name:c,value:m,form:h,...b}=e,p=a.useContext(Qt),v=a.useRef(null),g=ue(v,n,p===null?null:p.setSwitch),[x,C]=hn(l,s,i),y=j(()=>C==null?void 0:C(!x)),T=j(D=>{if(dt(D.currentTarget))return D.preventDefault();D.preventDefault(),y()}),I=j(D=>{D.key===K.Space?(D.preventDefault(),y()):D.key===K.Enter&&uo(D.currentTarget)}),F=j(D=>D.preventDefault()),P=a.useMemo(()=>({checked:x}),[x]),R={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:F},Y=Oe();return a.useEffect(()=>{var D;let M=(D=v.current)==null?void 0:D.closest("form");M&&i!==void 0&&Y.addEventListener(M,"reset",()=>{C(i)})},[v,C]),a.createElement(a.Fragment,null,c!=null&&x&&a.createElement(Ke,{features:ze.Hidden,...ct({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:u,form:h,checked:x,name:c,value:m})}),oe({ourProps:R,theirProps:b,slot:P,defaultTag:wi,name:"Switch"}))}let Ei=le(yi),Si=xi,Ci=Object.assign(Ei,{Group:Si,Label:vi,Description:Hn});function Ti(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 Oi(e,n){let t=we();if(!e)return t.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[l,i]=[r,o].map(u=>{let[c=0]=u.split(",").filter(Boolean).map(m=>m.includes("ms")?parseFloat(m):parseFloat(m)*1e3).sort((m,h)=>h-m);return c}),s=l+i;if(s!==0){t.group(c=>{c.setTimeout(()=>{n(),c.dispose()},s),c.addEventListener(e,"transitionrun",m=>{m.target===m.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 ji(e,n,t,r){let o=t?"enter":"leave",l=we(),i=r!==void 0?Ti(r):()=>{};o==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let s=se(o,{enter:()=>n.enter,leave:()=>n.leave}),u=se(o,{enter:()=>n.enterTo,leave:()=>n.leaveTo}),c=se(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),l.nextFrame(()=>{en(e,...n.base,...s,...c),Xt(e,...n.base,...s,...u),Oi(e,()=>(en(e,...n.base,...s),Xt(e,...n.base,...n.entered),i()))}),l.dispose}function Ii({immediate:e,container:n,direction:t,classes:r,onStart:o,onStop:l}){let i=Xe(),s=Oe(),u=Ee(t);ee(()=>{e&&(u.current="enter")},[e]),ee(()=>{let c=we();s.add(c.dispose);let m=n.current;if(m&&u.current!=="idle"&&i.current)return c.dispose(),o.current(u.current),c.add(ji(m,r.current,u.current==="enter",()=>{c.dispose(),l.current(u.current)})),c.dispose},[t])}function Pe(e=""){return e.split(/\s+/).filter(n=>n.length>1)}let ht=a.createContext(null);ht.displayName="TransitionContext";var Ni=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Ni||{});function Fi(){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 $i(){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 Kn(e,n){let t=Ee(e),r=a.useRef([]),o=Xe(),l=Oe(),i=j((p,v=ke.Hidden)=>{let g=r.current.findIndex(({el:x})=>x===p);g!==-1&&(se(v,{[ke.Unmount](){r.current.splice(g,1)},[ke.Hidden](){r.current[g].state="hidden"}}),l.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"}),()=>i(p,ke.Unmount)}),u=a.useRef([]),c=a.useRef(Promise.resolve()),m=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(m.current[v].map(([C,y])=>y)).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(m.current[v].splice(0).map(([x,C])=>C)).then(()=>{var x;(x=u.current.shift())==null||x()}).then(()=>g(v))});return a.useMemo(()=>({children:r,register:s,unregister:i,onStart:h,onStop:b,wait:c,chains:m}),[s,i,r,h,b,m,c])}function ki(){}let Pi=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Jn(e){var n;let t={};for(let r of Pi)t[r]=(n=e[r])!=null?n:ki;return t}function Mi(e){let n=a.useRef(Jn(e));return a.useEffect(()=>{n.current=Jn(e)},[e]),n}let Ai="div",Qn=$e.RenderStrategy;function Di(e,n){var t,r;let{beforeEnter:o,afterEnter:l,beforeLeave:i,afterLeave:s,enter:u,enterFrom:c,enterTo:m,entered:h,leave:b,leaveFrom:p,leaveTo:v,...g}=e,x=a.useRef(null),C=ue(x,n),y=(t=g.unmount)==null||t?ke.Unmount:ke.Hidden,{show:T,appear:I,initial:F}=Fi(),[P,R]=a.useState(T?"visible":"hidden"),Y=$i(),{register:D,unregister:M}=Y;a.useEffect(()=>D(x),[D,x]),a.useEffect(()=>{if(y===ke.Hidden&&x.current){if(T&&P!=="visible"){R("visible");return}return se(P,{hidden:()=>M(x),visible:()=>D(x)})}},[P,x,D,M,T,y]);let B=Ee({base:Pe(g.className),enter:Pe(u),enterFrom:Pe(c),enterTo:Pe(m),entered:Pe(h),leave:Pe(b),leaveFrom:Pe(p),leaveTo:Pe(v)}),G=Mi({beforeEnter:o,afterEnter:l,beforeLeave:i,afterLeave:s}),J=Be();a.useEffect(()=>{if(J&&P==="visible"&&x.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[x,P,J]);let ae=F&&!I,w=I&&T&&F,L=!J||ae?"idle":T?"enter":"leave",k=gi(0),Q=j(be=>se(be,{enter:()=>{k.addFlag(ce.Opening),G.current.beforeEnter()},leave:()=>{k.addFlag(ce.Closing),G.current.beforeLeave()},idle:()=>{}})),U=j(be=>se(be,{enter:()=>{k.removeFlag(ce.Opening),G.current.afterEnter()},leave:()=>{k.removeFlag(ce.Closing),G.current.afterLeave()},idle:()=>{}})),ne=Kn(()=>{R("hidden"),M(x)},Y),fe=a.useRef(!1);Ii({immediate:w,container:x,classes:B,direction:L,onStart:Ee(be=>{fe.current=!0,ne.onStart(x,be,Q)}),onStop:Ee(be=>{fe.current=!1,ne.onStop(x,be,U),be==="leave"&&!gt(ne)&&(R("hidden"),M(x))})});let ge=g,Se={ref:C};return w?ge={...ge,className:at(g.className,...B.current.enter,...B.current.enterFrom)}:fe.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:se(P,{visible:ce.Open,hidden:ce.Closed})|k.flags},oe({ourProps:Se,theirProps:ge,defaultTag:Ai,features:Qn,visible:P==="visible",name:"Transition.Child"})))}function Li(e,n){let{show:t,appear:r=!1,unmount:o=!0,...l}=e,i=a.useRef(null),s=ue(i,n);Be();let u=Je();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,m]=a.useState(t?"visible":"hidden"),h=Kn(()=>{m("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)m("visible");else if(!gt(h))m("hidden");else{let T=i.current;if(!T)return;let I=T.getBoundingClientRect();I.x===0&&I.y===0&&I.width===0&&I.height===0&&m("hidden")}},[t,h]);let x={unmount:o},C=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},oe({ourProps:{...x,as:a.Fragment,children:a.createElement(Xn,{ref:s,...x,...l,beforeEnter:C,beforeLeave:y})},theirProps:{},defaultTag:a.Fragment,features:Qn,visible:c==="visible",name:"Transition"})))}function _i(e,n){let t=a.useContext(ht)!==null,r=Je()!==null;return a.createElement(a.Fragment,null,!t&&r?a.createElement(tn,{ref:n,...e}):a.createElement(Xn,{ref:n,...e}))}let tn=le(Li),Xn=le(Di),Ri=le(_i),Re=Object.assign(tn,{Child:Ri,Root:tn});function Bi({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M18 10a.75.75 0 0 1-.75.75H4.66l2.1 1.95a.75.75 0 1 1-1.02 1.1l-3.5-3.25a.75.75 0 0 1 0-1.1l3.5-3.25a.75.75 0 1 1 1.02 1.1l-2.1 1.95h12.59A.75.75 0 0 1 18 10Z",clipRule:"evenodd"}))}const zi=E.forwardRef(Bi);function Wi({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M2 10a.75.75 0 0 1 .75-.75h12.59l-2.1-1.95a.75.75 0 1 1 1.02-1.1l3.5 3.25a.75.75 0 0 1 0 1.1l-3.5 3.25a.75.75 0 1 1-1.02-1.1l2.1-1.95H2.75A.75.75 0 0 1 2 10Z",clipRule:"evenodd"}))}const Ui=E.forwardRef(Wi);function Hi({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"}))}const Vi=E.forwardRef(Hi);function Yi({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const qi=E.forwardRef(Yi);function Zi({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M9.47 6.47a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 1 1-1.06 1.06L10 8.06l-3.72 3.72a.75.75 0 0 1-1.06-1.06l4.25-4.25Z",clipRule:"evenodd"}))}const Gi=E.forwardRef(Zi);function Ki({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-8-5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0v-4.5A.75.75 0 0 1 10 5Zm0 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const er=E.forwardRef(Ki);function Ji({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const Qi=E.forwardRef(Ji);function Xi({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z",clipRule:"evenodd"}))}const es=E.forwardRef(Xi);function ts({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM8.28 7.22a.75.75 0 0 0-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 1 0 1.06 1.06L10 11.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L11.06 10l1.72-1.72a.75.75 0 0 0-1.06-1.06L10 8.94 8.28 7.22Z",clipRule:"evenodd"}))}const ns=E.forwardRef(ts),bt={warning:{color:"bg-yellow-50",icon:f.jsx(Qi,{className:"h-5 w-5 text-yellow-400","aria-hidden":"true"}),colorTitle:"text-yellow-800",colorText:"text-yellow-700"},error:{color:"bg-red-50",icon:f.jsx(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:f.jsx(Vi,{className:"h-5 w-5 text-green-400","aria-hidden":"true"}),colorTitle:"text-green-800",colorText:"text-green-700"},info:{color:"bg-blue-50",icon:f.jsx(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:l})=>{const{width:i}=Tt(),[s,u]=a.useState(!1);return a.useEffect(()=>r?(tr=window.setTimeout(()=>{u(!1),l({type:"ALERT",payload:{title:"",message:"",typeAlert:"",active:!1}})},o),u(!0)):(u(!1),()=>window.clearTimeout(tr)),[r,l,o]),f.jsx("div",{className:"fixed top-2.5 w-80 3xs:w-96 z-50",style:{left:`calc(50% - ${i<=470?"160px":"192px"})`},children:f.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:f.jsxs("div",{className:N("rounded-md p-4 text-center",bt[e].color),children:[f.jsxs("div",{className:"flex justify-center flex-shrink-0",children:[bt[e].icon,f.jsx("h3",{className:N("text-sm font-medium ml-3",bt[e].colorTitle),children:n})]}),f.jsx("div",{className:N("mt-2 text-sm",bt[e].colorText),children:f.jsx("p",{children:t})})]})})})};function os({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))}const ls=E.forwardRef(os);function is({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M10.5 3.75a6.75 6.75 0 1 0 0 13.5 6.75 6.75 0 0 0 0-13.5ZM2.25 10.5a8.25 8.25 0 1 1 14.59 5.28l4.69 4.69a.75.75 0 1 1-1.06 1.06l-4.69-4.69A8.25 8.25 0 0 1 2.25 10.5Z",clipRule:"evenodd"}))}const ss=E.forwardRef(is);function as({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{d:"M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-8.4 8.4a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32l8.4-8.4Z"}),E.createElement("path",{d:"M5.25 5.25a3 3 0 0 0-3 3v10.5a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3V13.5a.75.75 0 0 0-1.5 0v5.25a1.5 1.5 0 0 1-1.5 1.5H5.25a1.5 1.5 0 0 1-1.5-1.5V8.25a1.5 1.5 0 0 1 1.5-1.5h5.25a.75.75 0 0 0 0-1.5H5.25Z"}))}const us=E.forwardRef(as);function cs({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M1.5 6a2.25 2.25 0 0 1 2.25-2.25h16.5A2.25 2.25 0 0 1 22.5 6v12a2.25 2.25 0 0 1-2.25 2.25H3.75A2.25 2.25 0 0 1 1.5 18V6ZM3 16.06V18c0 .414.336.75.75.75h16.5A.75.75 0 0 0 21 18v-1.94l-2.69-2.689a1.5 1.5 0 0 0-2.12 0l-.88.879.97.97a.75.75 0 1 1-1.06 1.06l-5.16-5.159a1.5 1.5 0 0 0-2.12 0L3 16.061Zm10.125-7.81a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0Z",clipRule:"evenodd"}))}const ds=E.forwardRef(cs);function fs({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M16.5 4.478v.227a48.816 48.816 0 0 1 3.878.512.75.75 0 1 1-.256 1.478l-.209-.035-1.005 13.07a3 3 0 0 1-2.991 2.77H8.084a3 3 0 0 1-2.991-2.77L4.087 6.66l-.209.035a.75.75 0 0 1-.256-1.478A48.567 48.567 0 0 1 7.5 4.705v-.227c0-1.564 1.213-2.9 2.816-2.951a52.662 52.662 0 0 1 3.369 0c1.603.051 2.815 1.387 2.815 2.951Zm-6.136-1.452a51.196 51.196 0 0 1 3.273 0C14.39 3.05 15 3.684 15 4.478v.113a49.488 49.488 0 0 0-6 0v-.113c0-.794.609-1.428 1.364-1.452Zm-.355 5.945a.75.75 0 1 0-1.5.058l.347 9a.75.75 0 1 0 1.499-.058l-.346-9Zm5.48.058a.75.75 0 1 0-1.498-.058l-.347 9a.75.75 0 0 0 1.5.058l.345-9Z",clipRule:"evenodd"}))}const ms=E.forwardRef(fs);function ps({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"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 hs=E.forwardRef(ps);function vs({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const gs=E.forwardRef(vs),bs=({src:e,alt:n,width:t,height:r,className:o="",classNameIcon:l="",isIcon:i=!0,acronym:s=""})=>{function u(){if(typeof s!="string")return s;const c=s.toLowerCase(),m=c.split(" "),h=m[m.length-1];return c.charAt(0)+h.charAt(0)}return f.jsx(f.Fragment,{children:e?f.jsx("img",{src:e,alt:n,width:t,height:r,className:N(o!==""&&o),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s"},onLoad:c=>c.currentTarget.style.filter="none","data-testid":"img"}):i?f.jsx(hs,{className:N("bg-white text-default-5",l!==""?l:"w-7 h-7")}):f.jsx("div",{className:N("bg-gray-200 text-default-5 rounded-full font-bold uppercase flex justify-center items-center",l!==""?l:"w-7 h-7"),children:u()})})},xs=({steps:e,onClick:n})=>{const[t,r]=a.useState(0),o=l=>{r(l),n(l)};return f.jsx("nav",{className:"flex items-center justify-center w-full","aria-label":"Progress","data-testid":"bullets",children:f.jsx("ol",{role:"list",className:"flex items-center space-x-5",children:new Array(e).fill(1).map((l,i)=>f.jsx("li",{children:t!==i?f.jsx("div",{className:"cursor-pointer block h-2.5 w-2.5 rounded-full bg-gray-500 hover:bg-gray-600",onClick:()=>o(i),"data-testid":`step-${i}`,children:f.jsx("span",{className:"sr-only",children:"step"})}):f.jsxs("div",{className:"relative flex items-center justify-center cursor-pointer","aria-current":"step",children:[f.jsx("span",{className:"absolute flex h-5 w-5 p-px","aria-hidden":"true",children:f.jsx("span",{className:"h-full w-full rounded-full bg-gray-300"})}),f.jsx("span",{className:"relative block h-2.5 w-2.5 rounded-full bg-gray-500","aria-hidden":"true"}),f.jsx("span",{className:"sr-only",children:"step"})]})},i))})})};var nr={exports:{}};/*!
31
+ `));let b=m.props,p=typeof(b==null?void 0:b.className)=="function"?(...g)=>ut(b==null?void 0:b.className(...g),u.className):ut(b==null?void 0:b.className,u.className),v=p?{className:p}:{};return a.cloneElement(m,Object.assign({},Nn(m.props,dt(Dt(u,["ref"]))),h,c,{ref:o(m.ref,c.ref)},v))}return a.createElement(l,Object.assign({},Dt(u,["ref"]),l!==a.Fragment&&c,l!==a.Fragment&&h),m)}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 Nn(...e){if(e.length===0)return{};if(e.length===1)return e[0];let n={},t={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(t[o]!=null||(t[o]=[]),t[o].push(r[o])):n[o]=r[o];if(n.disabled||n["aria-disabled"])return Object.assign(n,Object.fromEntries(Object.keys(t).map(r=>[r,void 0])));for(let r in t)Object.assign(n,{[r](o,...l){let i=t[r];for(let s of i){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;s(o,...l)}}});return n}function le(e){var n;return Object.assign(a.forwardRef(e),{displayName:(n=e.displayName)!=null?n:e.name})}function dt(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 lo(e,n){var t;let{features:r=1,...o}=e,l={ref:n,"aria-hidden":(r&2)===2?!0:(t=o["aria-hidden"])!=null?t:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return oe({ourProps:l,theirProps:o,slot:{},defaultTag:oo,name:"Hidden"})}let Ke=le(lo),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 Je(){return a.useContext(Lt)}function _t({value:e,children:n}){return a.createElement(Lt.Provider,{value:e},n)}function io(e){function n(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",n))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",n),n())}let Ce=[];io(()=>{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 ft(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 ne=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(ne||{});function 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 l=0;l<t.length;++l)if(!n.resolveDisabled(t[l],l,t))return l;return r}case 1:{for(let l=o-1;l>=0;--l)if(!n.resolveDisabled(t[l],l,t))return l;return r}case 2:{for(let l=o+1;l<t.length;++l)if(!n.resolveDisabled(t[l],l,t))return l;return r}case 3:{for(let l=t.length-1;l>=0;--l)if(!n.resolveDisabled(t[l],l,t))return l;return r}case 4:{for(let l=0;l<t.length;++l)if(n.resolveId(t[l],l,t)===e.id)return l;return r}case 5:return null;default:ao(e)}}function In(e={},n=null,t=[]){for(let[r,o]of Object.entries(e))$n(t,Fn(n,r),o);return t}function Fn(e,n){return e?e+"["+n+"]":n}function $n(e,n,t){if(Array.isArray(t))for(let[r,o]of t.entries())$n(e,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,""]):In(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 Q=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Q||{}),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((i,s)=>i.dataRef.current.order-s.dataRef.current.order):Pt(r,i=>i.dataRef.current.domRef.current),l=t?o.indexOf(t):null;return l===-1&&(l=null),{options:o,activeOptionIndex:l}}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,l,i;if((t=e.dataRef.current)!=null&&t.disabled||(r=e.dataRef.current)!=null&&r.optionsRef.current&&!((o=e.dataRef.current)!=null&&o.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let m=n.focus===ne.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=(l=n.trigger)!=null?l:2;return e.activeOptionIndex===m&&e.activationTrigger===h?e:{...e,activeOptionIndex:m,activationTrigger:h}}let s=Bt(e);if(s.activeOptionIndex===null){let m=s.options.findIndex(h=>!h.dataRef.current.disabled);m!==-1&&(s.activeOptionIndex=m)}let u=n.focus===ne.Specific?n.idx:Rt(n,{resolveItems:()=>s.options,resolveActiveIndex:()=>s.activeOptionIndex,resolveId:m=>m.id,resolveDisabled:m=>m.dataRef.current.disabled}),c=(i=n.trigger)!=null?i:2;return e.activeOptionIndex===u&&e.activationTrigger===c?e:{...e,...s,activeOptionIndex:u,activationTrigger:c}},3:(e,n)=>{var t,r,o;if((t=e.dataRef.current)!=null&&t.virtual)return{...e,options:[...e.options,n.payload]};let l=n.payload,i=Bt(e,u=>(u.push(l),u));e.activeOptionIndex===null&&(r=e.dataRef.current)!=null&&r.isSelected(n.payload.dataRef.current.value)&&(i.activeOptionIndex=i.options.indexOf(l));let s={...e,...i,activationTrigger:2};return(o=e.dataRef.current)!=null&&o.__demoMode&&e.dataRef.current.value===void 0&&(s.activeOptionIndex=0),s},4:(e,n)=>{var t;if((t=e.dataRef.current)!=null&&t.virtual)return{...e,options:e.options.filter(o=>o.id!==n.id)};let r=Bt(e,o=>{let l=o.findIndex(i=>i.id===n.id);return l!==-1&&o.splice(l,1),o});return{...e,...r,activationTrigger:2}},5:(e,n)=>e.labelId===n.id?e:{...e,labelId:n.id},6:(e,n)=>e.activationTrigger===n.trigger?e:{...e,activationTrigger:n.trigger},7:(e,n)=>{var t;if(((t=e.virtual)==null?void 0:t.options)===n.options)return e;let r=e.activeOptionIndex;if(e.activeOptionIndex!==null){let o=n.options.indexOf(e.virtual.options[e.activeOptionIndex]);o!==-1?r=o:r=null}return{...e,activeOptionIndex:r,virtual:Object.assign({},e.virtual,{options:n.options})}}},zt=a.createContext(null);zt.displayName="ComboboxActionsContext";function Qe(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,Qe),t}return n}let kn=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]),l=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}),[i,s]=a.useState(0);return te(()=>{s(u=>u+1)},[(n=t.virtual)==null?void 0:n.options]),a.createElement(kn.Provider,{value:l},a.createElement("div",{style:{position:"relative",width:"100%",height:`${l.getTotalSize()}px`},ref:u=>{if(u){if(typeof process<"u"&&process.env.JEST_WORKER_ID!==void 0||t.activationTrigger===0)return;t.activeOptionIndex!==null&&t.virtual.options.length>t.activeOptionIndex&&l.scrollToIndex(t.activeOptionIndex)}}},l.getVirtualItems().map(u=>{var c;return a.createElement(a.Fragment,{key:u.key},a.cloneElement((c=e.children)==null?void 0:c.call(e,{option:t.virtual.options[u.index],open:t.comboboxState===0}),{key:`${i}-${u.key}`,"data-index":u.index,"aria-setsize":t.virtual.options.length,"aria-posinset":u.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${u.start}px)`,overflowAnchor:"none"}}))})))}let 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 se(n.type,ho,e,n)}let bo=a.Fragment;function xo(e,n){let{value:t,defaultValue:r,onChange:o,form:l,name:i,by:s=null,disabled:u=!1,__demoMode:c=!1,nullable:m=!1,multiple:h=!1,immediate:b=!1,virtual:p=null,...v}=e,g=!1,x=null,[C=h?[]:void 0,y]=hn(t,o,r),[T,N]=a.useReducer(go,{dataRef:a.createRef(),comboboxState:c?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),I=a.useRef(!1),P=a.useRef({static:!1,hold:!1}),R=a.useRef(null),Y=a.useRef(null),D=a.useRef(null),M=a.useRef(null),B=j(typeof s=="string"?(A,Z)=>{let W=s;return(A==null?void 0:A[W])===(Z==null?void 0:Z[W])}:s??((A,Z)=>A===Z)),K=j(A=>T.options.findIndex(Z=>B(Z.dataRef.current.value,A))),X=a.useCallback(A=>se(w.mode,{1:()=>C.some(Z=>B(Z,A)),0:()=>B(C,A)}),[C]),ae=j(A=>T.activeOptionIndex===K(A)),w=a.useMemo(()=>({...T,immediate:g,optionsPropsRef:P,labelRef:R,inputRef:Y,buttonRef:D,optionsRef:M,value:C,defaultValue:r,disabled:u,mode:h?1:0,virtual:T.virtual,get activeOptionIndex(){if(I.current&&T.activeOptionIndex===null&&T.options.length>0){let A=T.options.findIndex(Z=>!Z.dataRef.current.disabled);if(A!==-1)return A}return T.activeOptionIndex},calculateIndex:K,compare:B,isSelected:X,isActive:ae,nullable:m,__demoMode:c}),[C,r,u,h,m,c,T,x]);te(()=>{},[x,void 0]),te(()=>{T.dataRef.current=w},[w]),Mt([w.buttonRef,w.inputRef,w.optionsRef],()=>Ae.closeCombobox(),w.comboboxState===0);let _=a.useMemo(()=>{var A,Z,W;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]:(W=(Z=w.options[w.activeOptionIndex])==null?void 0:Z.dataRef.current.value)!=null?W:null,value:C}},[w,u,C]),$=j(()=>{if(w.activeOptionIndex!==null){if(w.virtual)Se(w.virtual.options[w.activeOptionIndex]);else{let{dataRef:A}=w.options[w.activeOptionIndex];Se(A.current.value)}Ae.goToOption(ne.Specific,w.activeOptionIndex)}}),U=j(()=>{N({type:0}),I.current=!0}),H=j(()=>{N({type:1}),I.current=!1}),J=j((A,Z,W)=>(I.current=!1,A===ne.Specific?N({type:2,focus:ne.Specific,idx:Z,trigger:W}):N({type:2,focus:A,trigger:W}))),me=j((A,Z)=>(N({type:3,payload:{id:A,dataRef:Z}}),()=>{w.isActive(Z.current.value)&&(I.current=!0),N({type:4,id:A})})),pe=j(A=>(N({type:5,id:A}),()=>N({type:5,id:null}))),Se=j(A=>se(w.mode,{0(){return y==null?void 0:y(A)},1(){let Z=w.value.slice(),W=Z.findIndex(he=>B(he,A));return W===-1?Z.push(A):Z.splice(W,1),y==null?void 0:y(Z)}})),be=j(A=>{N({type:6,trigger:A})}),Ae=a.useMemo(()=>({onChange:Se,registerOption:me,registerLabel:pe,goToOption:J,closeCombobox:H,openCombobox:U,setActivationTrigger:be,selectActiveOption:$}),[]),k=n===null?{}:{ref:n},V=a.useRef(null),ie=Oe();return a.useEffect(()=>{V.current&&r!==void 0&&ie.addEventListener(V.current,"reset",()=>{y==null||y(r)})},[V,y]),a.createElement(zt.Provider,{value:Ae},a.createElement(Wt.Provider,{value:w},a.createElement(_t,{value:se(w.comboboxState,{0:ce.Open,1:ce.Closed})},i!=null&&C!=null&&In({[i]:C}).map(([A,Z],W)=>a.createElement(Ke,{features:ze.Hidden,ref:W===0?he=>{var ve;V.current=(ve=he==null?void 0:he.closest("form"))!=null?ve:null}:void 0,...dt({key:A,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:l,disabled:u,name:A,value:Z})})),oe({ourProps:k,theirProps:v,slot:_,defaultTag:bo,name:"Combobox"}))))}let wo="input";function yo(e,n){var t,r,o,l,i;let s=ge(),{id:u=`headlessui-combobox-input-${s}`,onChange:c,displayValue:m,type:h="text",...b}=e,p=Le("Combobox.Input"),v=Qe("Combobox.Input"),g=ue(p.inputRef,n),x=De(p.inputRef),C=a.useRef(!1),y=Oe(),T=j(()=>{v.onChange(null),p.optionsRef.current&&(p.optionsRef.current.scrollTop=0),v.goToOption(ne.Nothing)}),N=function(){var w;return typeof m=="function"&&p.value!==void 0?(w=m(p.value))!=null?w:"":typeof p.value=="string"?p.value:""}();Ge(([w,_],[$,U])=>{if(C.current)return;let H=p.inputRef.current;H&&((U===0&&_===1||w!==$)&&(H.value=w),requestAnimationFrame(()=>{if(C.current||!H||(x==null?void 0:x.activeElement)!==H)return;let{selectionStart:J,selectionEnd:me}=H;Math.abs((me??0)-(J??0))===0&&J===0&&H.setSelectionRange(H.value.length,H.value.length)}))},[N,p.comboboxState,x]),Ge(([w],[_])=>{if(w===0&&_===1){if(C.current)return;let $=p.inputRef.current;if(!$)return;let U=$.value,{selectionStart:H,selectionEnd:J,selectionDirection:me}=$;$.value="",$.value=U,me!==null?$.setSelectionRange(H,J,me):$.setSelectionRange(H,J)}},[p.comboboxState]);let I=a.useRef(!1),P=j(()=>{I.current=!0}),R=j(()=>{y.nextFrame(()=>{I.current=!1})}),Y=j(w=>{switch(C.current=!0,w.key){case Q.Enter:if(C.current=!1,p.comboboxState!==0||I.current)return;if(w.preventDefault(),w.stopPropagation(),p.activeOptionIndex===null){v.closeCombobox();return}v.selectActiveOption(),p.mode===0&&v.closeCombobox();break;case Q.ArrowDown:return C.current=!1,w.preventDefault(),w.stopPropagation(),se(p.comboboxState,{0:()=>v.goToOption(ne.Next),1:()=>v.openCombobox()});case Q.ArrowUp:return C.current=!1,w.preventDefault(),w.stopPropagation(),se(p.comboboxState,{0:()=>v.goToOption(ne.Previous),1:()=>{v.openCombobox(),y.nextFrame(()=>{p.value||v.goToOption(ne.Last)})}});case Q.Home:if(w.shiftKey)break;return C.current=!1,w.preventDefault(),w.stopPropagation(),v.goToOption(ne.First);case Q.PageUp:return C.current=!1,w.preventDefault(),w.stopPropagation(),v.goToOption(ne.First);case Q.End:if(w.shiftKey)break;return C.current=!1,w.preventDefault(),w.stopPropagation(),v.goToOption(ne.Last);case Q.PageDown:return C.current=!1,w.preventDefault(),w.stopPropagation(),v.goToOption(ne.Last);case Q.Escape:return C.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 Q.Tab:if(C.current=!1,p.comboboxState!==0)return;p.mode===0&&p.activationTrigger!==1&&v.selectActiveOption(),v.closeCombobox();break}}),D=j(w=>{c==null||c(w),p.nullable&&p.mode===0&&w.target.value===""&&T(),v.openCombobox()}),M=j(w=>{var _,$,U;let H=(_=w.relatedTarget)!=null?_:Ce.find(J=>J!==w.currentTarget);if(C.current=!1,!(($=p.optionsRef.current)!=null&&$.contains(H))&&!((U=p.buttonRef.current)!=null&&U.contains(H))&&p.comboboxState===0)return w.preventDefault(),p.mode===0&&(p.nullable&&p.value===null?T():p.activationTrigger!==1&&v.selectActiveOption()),v.closeCombobox()}),B=j(w=>{var _,$,U;let H=(_=w.relatedTarget)!=null?_:Ce.find(J=>J!==w.currentTarget);($=p.buttonRef.current)!=null&&$.contains(H)||(U=p.optionsRef.current)!=null&&U.contains(H)||p.disabled||p.immediate&&p.comboboxState!==0&&(v.openCombobox(),y.nextFrame(()=>{v.setActivationTrigger(1)}))}),K=It(()=>{if(p.labelId)return[p.labelId].join(" ")},[p.labelId]),X=a.useMemo(()=>({open:p.comboboxState===0,disabled:p.disabled}),[p]),ae={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 _;return!((_=p.virtual)!=null&&_.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":K,"aria-autocomplete":"list",defaultValue:(i=(l=e.defaultValue)!=null?l:p.defaultValue!==void 0?m==null?void 0:m(p.defaultValue):null)!=null?i:p.defaultValue,disabled:p.disabled,onCompositionStart:P,onCompositionEnd:R,onKeyDown:Y,onChange:D,onFocus:B,onBlur:M};return oe({ourProps:ae,theirProps:b,slot:X,defaultTag:wo,name:"Combobox.Input"})}let Eo="button";function So(e,n){var t;let r=Le("Combobox.Button"),o=Qe("Combobox.Button"),l=ue(r.buttonRef,n),i=ge(),{id:s=`headlessui-combobox-button-${i}`,...u}=e,c=Oe(),m=j(g=>{switch(g.key){case Q.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 Q.ArrowUp:return g.preventDefault(),g.stopPropagation(),r.comboboxState===1&&(o.openCombobox(),c.nextFrame(()=>{r.value||o.goToOption(ne.Last)})),c.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})});case Q.Escape:return r.comboboxState!==0?void 0:(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(ft(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=It(()=>{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:l,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:m};return oe({ourProps:v,theirProps:u,slot:p,defaultTag:Eo,name:"Combobox.Button"})}let Co="label";function To(e,n){let t=ge(),{id:r=`headlessui-combobox-label-${t}`,...o}=e,l=Le("Combobox.Label"),i=Qe("Combobox.Label"),s=ue(l.labelRef,n);te(()=>i.registerLabel(r),[r]);let u=j(()=>{var m;return(m=l.inputRef.current)==null?void 0:m.focus({preventScroll:!0})}),c=a.useMemo(()=>({open:l.comboboxState===0,disabled:l.disabled}),[l]);return oe({ourProps:{ref:s,id:r,onClick:u},theirProps:o,slot:c,defaultTag:Co,name:"Combobox.Label"})}let Oo="ul",jo=$e.RenderStrategy|$e.Static;function No(e,n){let t=ge(),{id:r=`headlessui-combobox-options-${t}`,hold:o=!1,...l}=e,i=Le("Combobox.Options"),s=ue(i.optionsRef,n),u=Je(),c=u!==null?(u&ce.Open)===ce.Open:i.comboboxState===0;te(()=>{var p;i.optionsPropsRef.current.static=(p=e.static)!=null?p:!1},[i.optionsPropsRef,e.static]),te(()=>{i.optionsPropsRef.current.hold=o},[i.optionsPropsRef,o]),jn({container:i.optionsRef.current,enabled:i.comboboxState===0,accept(p){return p.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:p.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(p){p.setAttribute("role","none")}});let m=It(()=>{var p,v;return(v=i.labelId)!=null?v:(p=i.buttonRef.current)==null?void 0:p.id},[i.labelId,i.buttonRef.current]),h=a.useMemo(()=>({open:i.comboboxState===0,option:void 0}),[i]),b={"aria-labelledby":m,role:"listbox","aria-multiselectable":i.mode===1?!0:void 0,id:r,ref:s};return i.virtual&&i.comboboxState===0&&Object.assign(l,{children:a.createElement(vo,null,l.children)}),oe({ourProps:b,theirProps:l,slot:h,defaultTag:Oo,features:jo,visible:c,name:"Combobox.Options"})}let Io="li";function Fo(e,n){var t;let r=ge(),{id:o=`headlessui-combobox-option-${r}`,disabled:l=!1,value:i,order:s=null,...u}=e,c=Le("Combobox.Option"),m=Qe("Combobox.Option"),h=c.virtual?c.activeOptionIndex===c.calculateIndex(i):c.activeOptionIndex===null?!1:((t=c.options[c.activeOptionIndex])==null?void 0:t.id)===o,b=c.isSelected(i),p=a.useRef(null),v=Ee({disabled:l,value:i,domRef:p,order:s}),g=a.useContext(kn),x=ue(n,p,g?g.measureElement:null),C=j(()=>m.onChange(i));te(()=>m.registerOption(o,v),[v,o]);let y=a.useRef(!(c.virtual||c.__demoMode));te(()=>{if(!c.virtual||!c.__demoMode)return;let M=we();return M.requestAnimationFrame(()=>{y.current=!0}),M.dispose},[c.virtual,c.__demoMode]),te(()=>{if(!y.current||c.comboboxState!==0||!h||c.activationTrigger===0)return;let M=we();return M.requestAnimationFrame(()=>{var B,K;(K=(B=p.current)==null?void 0:B.scrollIntoView)==null||K.call(B,{block:"nearest"})}),M.dispose},[p,h,c.comboboxState,c.activationTrigger,c.activeOptionIndex]);let T=j(M=>{var B;if(l||(B=c.virtual)!=null&&B.disabled(i))return M.preventDefault();C(),yn()||requestAnimationFrame(()=>{var K;return(K=c.inputRef.current)==null?void 0:K.focus({preventScroll:!0})}),c.mode===0&&requestAnimationFrame(()=>m.closeCombobox())}),N=j(()=>{var M;if(l||(M=c.virtual)!=null&&M.disabled(i))return m.goToOption(ne.Nothing);let B=c.calculateIndex(i);m.goToOption(ne.Specific,B)}),I=On(),P=j(M=>I.update(M)),R=j(M=>{var B;if(!I.wasMoved(M)||l||(B=c.virtual)!=null&&B.disabled(i)||h)return;let K=c.calculateIndex(i);m.goToOption(ne.Specific,K,0)}),Y=j(M=>{var B;I.wasMoved(M)&&(l||(B=c.virtual)!=null&&B.disabled(i)||h&&(c.optionsPropsRef.current.hold||m.goToOption(ne.Nothing)))}),D=a.useMemo(()=>({active:h,selected:b,disabled:l}),[h,b,l]);return oe({ourProps:{id:o,ref:x,role:"option",tabIndex:l===!0?void 0:-1,"aria-disabled":l===!0?!0:void 0,"aria-selected":b,disabled:void 0,onClick:T,onFocus:N,onPointerEnter:P,onMouseEnter:P,onPointerMove:R,onMouseMove:R,onPointerLeave:Y,onMouseLeave:Y},theirProps:u,slot:D,defaultTag:Io,name:"Combobox.Option"})}let $o=le(xo),ko=le(So),Po=le(yo),Mo=le(To),Ao=le(No),Do=le(Fo),Ne=Object.assign($o,{Input:Po,Button:ko,Label:Mo,Options:Ao,Option:Do});function Pn(e,n,t,r){let o=Ee(t);a.useEffect(()=>{e=e??window;function l(i){o.current(i)}return e.addEventListener(n,l,r),()=>e.removeEventListener(n,l,r)},[e,n,r])}function Xe(){let e=a.useRef(!1);return te(()=>(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:l,features:i=30,...s}=e;Be()||(i=1);let u=De(t);Wo({ownerDocument:u},!!(i&16));let c=Uo({ownerDocument:u,container:t,initialFocus:o},!!(i&2));Ho({ownerDocument:u,container:t,containers:l,previousActiveElement:c},!!(i&8));let m=Lo(),h=j(g=>{let x=t.current;x&&(C=>C())(()=>{se(m.current,{[et.Forwards]:()=>{Ze(x,je.First,{skipElements:[g.relatedTarget]})},[et.Backwards]:()=>{Ze(x,je.Last,{skipElements:[g.relatedTarget]})}})})}),b=Oe(),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(l);t.current instanceof HTMLElement&&x.add(t.current);let C=g.relatedTarget;C instanceof HTMLElement&&C.dataset.headlessuiFocusGuard!=="true"&&(Ln(x,C)||(p.current?Ze(t.current,se(m.current,{[et.Forwards]:()=>je.Next,[et.Backwards]:()=>je.Previous})|je.WrapAround,{relativeTo:g.target}):g.target instanceof HTMLElement&&Fe(g.target)))}};return a.createElement(a.Fragment,null,!!(i&4)&&a.createElement(Ke,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:ze.Focusable}),oe({ourProps:v,theirProps:s,defaultTag:_o,name:"FocusTrap"}),!!(i&4)&&a.createElement(Ke,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:ze.Focusable}))}let Bo=le(Ro),tt=Object.assign(Bo,{features:Dn});function zo(e=!0){let n=a.useRef(Ce.slice());return Ge(([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);Ge(()=>{n||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&Fe(t())},[n]),Mn(()=>{n&&Fe(t())})}function Uo({ownerDocument:e,container:n,initialFocus:t},r){let o=a.useRef(null),l=Xe();return Ge(()=>{if(!r)return;let i=n.current;i&&it(()=>{if(!l.current)return;let s=e==null?void 0:e.activeElement;if(t!=null&&t.current){if((t==null?void 0:t.current)===s){o.current=s;return}}else if(i.contains(s)){o.current=s;return}t!=null&&t.current?Fe(t.current):Ze(i,je.First)===gn.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),o.current=e==null?void 0:e.activeElement})},[r]),o}function Ho({ownerDocument:e,container:n,containers:t,previousActiveElement:r},o){let l=Xe();Pn(e==null?void 0:e.defaultView,"focus",i=>{if(!o||!l.current)return;let s=An(t);n.current instanceof HTMLElement&&s.add(n.current);let u=r.current;if(!u)return;let c=i.target;c&&c instanceof HTMLElement?Ln(s,c)?(r.current=c,Fe(c)):(i.preventDefault(),i.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 Ut(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,l]=a.useState(()=>{if(!n&&t!==null||Te.isServer)return null;let i=r==null?void 0:r.getElementById("headlessui-portal-root");if(i)return i;if(r===null)return null;let s=r.createElement("div");return s.setAttribute("id","headlessui-portal-root"),r.body.appendChild(s)});return a.useEffect(()=>{o!==null&&(r!=null&&r.body.contains(o)||r==null||r.body.appendChild(o))},[o,r]),a.useEffect(()=>{n||t!==null&&l(t.current)},[t,l,n]),o}let qo=a.Fragment;function Zo(e,n){let t=e,r=a.useRef(null),o=ue(no(m=>{r.current=m}),n),l=De(r),i=Yo(r),[s]=a.useState(()=>{var m;return Te.isServer?null:(m=l==null?void 0:l.createElement("div"))!=null?m:null}),u=a.useContext(Ht),c=Be();return te(()=>{!i||!s||i.contains(s)||(s.setAttribute("data-headlessui-portal",""),i.appendChild(s))},[i,s]),te(()=>{if(s&&u)return u.register(s)},[u,s]),Mn(()=>{var m;!i||!s||(s instanceof Node&&i.contains(s)&&i.removeChild(s),i.childNodes.length<=0&&((m=i.parentElement)==null||m.removeChild(i)))}),c?!i||!s?null:un.createPortal(oe({ourProps:{ref:o},theirProps:t,defaultTag:qo,name:"Portal"}),s):null}let Go=a.Fragment,Rn=a.createContext(null);function Ko(e,n){let{target:t,...r}=e,o={ref:ue(n)};return a.createElement(Rn.Provider,{value:t},oe({ourProps:o,theirProps:r,defaultTag:Go,name:"Popover.Group"}))}let Ht=a.createContext(null);function Jo(){let e=a.useContext(Ht),n=a.useRef([]),t=j(l=>(n.current.push(l),e&&e.register(l),()=>r(l))),r=j(l=>{let i=n.current.indexOf(l);i!==-1&&n.current.splice(i,1),e&&e.unregister(l)}),o=a.useMemo(()=>({register:t,unregister:r,portals:n}),[t,r,n]);return[n,a.useMemo(()=>function({children:l}){return a.createElement(Ht.Provider,{value:o},l)},[o])]}let Qo=le(Zo),Xo=le(Ko),Vt=Object.assign(Qo,{Group:Xo});function el(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}const tl=typeof Object.is=="function"?Object.is:el,{useState:nl,useEffect:rl,useLayoutEffect:ol,useDebugValue:ll}=E;function il(e,n,t){const r=n(),[{inst:o},l]=nl({inst:{value:r,getSnapshot:n}});return ol(()=>{o.value=r,o.getSnapshot=n,Yt(o)&&l({inst:o})},[e,r,n]),rl(()=>(Yt(o)&&l({inst:o}),e(()=>{Yt(o)&&l({inst:o})})),[e]),ll(r),r}function Yt(e){const n=e.getSnapshot,t=e.value;try{const r=n();return!tl(t,r)}catch{return!0}}function sl(e,n,t){return n()}const al=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ul=!al,cl=ul?sl:il,dl="useSyncExternalStore"in E?(e=>e.useSyncExternalStore)(E):cl;function fl(e){return dl(e.subscribe,e.getSnapshot,e.getSnapshot)}function ml(e,n){let t=e(),r=new Set;return{getSnapshot(){return t},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...l){let i=n[o].call(t,...l);i&&(t=i,r.forEach(s=>s()))}}}function pl(){let e;return{before({doc:n}){var t;let r=n.documentElement;e=((t=n.defaultView)!=null?t:window).innerWidth-r.clientWidth},after({doc:n,d:t}){let r=n.documentElement,o=r.clientWidth-r.offsetWidth,l=e-o;t.style(r,"paddingRight",`${l}px`)}}}function hl(){return wn()?{before({doc:e,d:n,meta:t}){function r(o){return t.containers.flatMap(l=>l()).some(l=>l.contains(o))}n.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let s=we();s.style(e.documentElement,"scrollBehavior","auto"),n.add(()=>n.microTask(()=>s.dispose()))}let l=(o=window.scrollY)!=null?o:window.pageYOffset,i=null;n.addEventListener(e,"click",s=>{if(s.target instanceof HTMLElement)try{let u=s.target.closest("a");if(!u)return;let{hash:c}=new URL(u.href),m=e.querySelector(c);m&&!r(m)&&(i=m)}catch{}},!0),n.addEventListener(e,"touchstart",s=>{if(s.target instanceof HTMLElement)if(r(s.target)){let u=s.target;for(;u.parentElement&&r(u.parentElement);)u=u.parentElement;n.style(u,"overscrollBehavior","contain")}else n.style(s.target,"touchAction","none")}),n.addEventListener(e,"touchmove",s=>{if(s.target instanceof HTMLElement)if(r(s.target)){let u=s.target;for(;u.parentElement&&u.dataset.headlessuiPortal!==""&&!(u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth);)u=u.parentElement;u.dataset.headlessuiPortal===""&&s.preventDefault()}else s.preventDefault()},{passive:!1}),n.add(()=>{var s;let u=(s=window.scrollY)!=null?s:window.pageYOffset;l!==u&&window.scrollTo(0,l),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})}}:{}}function vl(){return{before({doc:e,d:n}){n.style(e.documentElement,"overflow","hidden")}}}function gl(e){let n={};for(let t of e)Object.assign(n,t(n));return n}let _e=ml(()=>new Map,{PUSH(e,n){var t;let r=(t=this.get(e))!=null?t:{doc:e,count:0,d:we(),meta:new Set};return r.count++,r.meta.add(n),this.set(e,r),this},POP(e,n){let t=this.get(e);return t&&(t.count--,t.meta.delete(n)),this},SCROLL_PREVENT({doc:e,d:n,meta:t}){let r={doc:e,d:n,meta:gl(t)},o=[hl(),pl(),vl()];o.forEach(({before:l})=>l==null?void 0:l(r)),o.forEach(({after:l})=>l==null?void 0:l(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});_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 bl(e,n,t){let r=fl(_e),o=e?r.get(e):void 0,l=o?o.count>0:!1;return te(()=>{if(!(!e||!n))return _e.dispatch("PUSH",e,t),()=>_e.dispatch("POP",e,t)},[n,e]),l}let qt=new Map,nt=new Map;function Bn(e,n=!0){te(()=>{var t;if(!n)return;let r=typeof e=="function"?e():e.current;if(!r)return;function o(){var i;if(!r)return;let s=(i=nt.get(r))!=null?i: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 l=(t=nt.get(r))!=null?t:0;return nt.set(r,l+1),l!==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 xl({defaultContainers:e=[],portals:n,mainTreeNodeRef:t}={}){var r;let o=a.useRef((r=t==null?void 0:t.current)!=null?r:null),l=De(o),i=j(()=>{var s,u,c;let m=[];for(let h of e)h!==null&&(h instanceof HTMLElement?m.push(h):"current"in h&&h.current instanceof HTMLElement&&m.push(h.current));if(n!=null&&n.current)for(let h of n.current)m.push(h);for(let h of(s=l==null?void 0:l.querySelectorAll("html > *, body > *"))!=null?s:[])h!==document.body&&h!==document.head&&h instanceof HTMLElement&&h.id!=="headlessui-portal-root"&&(h.contains(o.current)||h.contains((c=(u=o.current)==null?void 0:u.getRootNode())==null?void 0:c.host)||m.some(b=>h.contains(b))||m.push(h));return m});return{resolveContainers:i,contains:j(s=>i().some(u=>u.contains(s))),mainTreeNodeRef:o,MainTreeNode:a.useMemo(()=>function(){return t!=null?null:a.createElement(Ke,{features:ze.Hidden,ref:o})},[o,t])}}let Zt=a.createContext(()=>{});Zt.displayName="StackContext";var Gt=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Gt||{});function wl(){return a.useContext(Zt)}function yl({children:e,onUpdate:n,type:t,element:r,enabled:o}){let l=wl(),i=j((...s)=>{n==null||n(...s),l(...s)});return te(()=>{let s=o===void 0||o===!0;return s&&i(0,t,r),()=>{s&&i(1,t,r)}},[i,t,r,o]),a.createElement(Zt.Provider,{value:i},e)}let 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 Un(){let[e,n]=a.useState([]);return[e.length>0?e.join(" "):void 0,a.useMemo(()=>function(t){let r=j(l=>(n(i=>[...i,l]),()=>n(i=>{let s=i.slice(),u=s.indexOf(l);return u!==-1&&s.splice(u,1),s}))),o=a.useMemo(()=>({register:r,slot:t.slot,name:t.name,props:t.props}),[r,t.slot,t.name,t.props]);return a.createElement(zn.Provider,{value:o},t.children)},[n])]}let El="p";function Sl(e,n){let t=ge(),{id:r=`headlessui-description-${t}`,...o}=e,l=Wn(),i=ue(n);te(()=>l.register(r),[r,l.register]);let s={ref:i,...l.props,id:r};return oe({ourProps:s,theirProps:o,slot:l.slot||{},defaultTag:El,name:l.name||"Description"})}let Cl=le(Sl),Hn=Object.assign(Cl,{});var Tl=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Tl||{}),Ol=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(Ol||{});let jl={0(e,n){return e.titleId===n.id?e:{...e,titleId:n.id}}},mt=a.createContext(null);mt.displayName="DialogContext";function rt(e){let n=a.useContext(mt);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 Nl(e,n,t=()=>[document.body]){bl(e,n,r=>{var o;return{containers:[...(o=r.containers)!=null?o:[],t]}})}function Il(e,n){return se(n.type,jl,e,n)}let Fl="div",$l=$e.RenderStrategy|$e.Static;function kl(e,n){let t=ge(),{id:r=`headlessui-dialog-${t}`,open:o,onClose:l,initialFocus:i,role:s="dialog",__demoMode:u=!1,...c}=e,[m,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=Je();o===void 0&&p!==null&&(o=(p&ce.Open)===ce.Open);let v=a.useRef(null),g=ue(v,n),x=De(v),C=e.hasOwnProperty("open")||p!==null,y=e.hasOwnProperty("onClose");if(!C&&!y)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!C)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 l!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${l}`);let T=o?0:1,[N,I]=a.useReducer(Il,{titleId:null,descriptionId:null,panelRef:a.createRef()}),P=j(()=>l(!1)),R=j(W=>I({type:0,id:W})),Y=Be()?u?!1:T===0:!1,D=m>1,M=a.useContext(mt)!==null,[B,K]=Jo(),X={get current(){var W;return(W=N.panelRef.current)!=null?W:v.current}},{resolveContainers:ae,mainTreeNodeRef:w,MainTreeNode:_}=xl({portals:B,defaultContainers:[X]}),$=D?"parent":"leaf",U=p!==null?(p&ce.Closing)===ce.Closing:!1,H=M||U?!1:Y,J=a.useCallback(()=>{var W,he;return(he=Array.from((W=x==null?void 0:x.querySelectorAll("body > *"))!=null?W:[]).find(ve=>ve.id==="headlessui-portal-root"?!1:ve.contains(w.current)&&ve instanceof HTMLElement))!=null?he:null},[w]);Bn(J,H);let me=D?!0:Y,pe=a.useCallback(()=>{var W,he;return(he=Array.from((W=x==null?void 0:x.querySelectorAll("[data-headlessui-portal]"))!=null?W:[]).find(ve=>ve.contains(w.current)&&ve instanceof HTMLElement))!=null?he:null},[w]);Bn(pe,me),Mt(ae,W=>{W.preventDefault(),P()},!(!Y||D));let be=!(D||T!==0);Pn(x==null?void 0:x.defaultView,"keydown",W=>{be&&(W.defaultPrevented||W.key===Q.Escape&&(W.preventDefault(),W.stopPropagation(),P()))}),Nl(x,!(U||T!==0||M),ae),a.useEffect(()=>{if(T!==0||!v.current)return;let W=new ResizeObserver(he=>{for(let ve of he){let We=ve.target.getBoundingClientRect();We.x===0&&We.y===0&&We.width===0&&We.height===0&&P()}});return W.observe(v.current),()=>W.disconnect()},[T,v,P]);let[k,V]=Un(),ie=a.useMemo(()=>[{dialogState:T,close:P,setTitleId:R},N],[T,N,P,R]),A=a.useMemo(()=>({open:T===0}),[T]),Z={ref:g,id:r,role:s,"aria-modal":T===0?!0:void 0,"aria-labelledby":N.titleId,"aria-describedby":k};return a.createElement(yl,{type:"Dialog",enabled:T===0,element:v,onUpdate:j((W,he)=>{he==="Dialog"&&se(W,{[Gt.Add]:()=>h(ve=>ve+1),[Gt.Remove]:()=>h(ve=>ve-1)})})},a.createElement(Ut,{force:!0},a.createElement(Vt,null,a.createElement(mt.Provider,{value:ie},a.createElement(Vt.Group,{target:v},a.createElement(Ut,{force:!1},a.createElement(V,{slot:A,name:"Dialog.Description"},a.createElement(tt,{initialFocus:i,containers:ae,features:Y?se($,{parent:tt.features.RestoreFocus,leaf:tt.features.All&~tt.features.FocusLock}):tt.features.None},a.createElement(K,null,oe({ourProps:Z,theirProps:c,slot:A,defaultTag:Fl,features:$l,visible:T===0,name:"Dialog"}))))))))),a.createElement(_,null))}let Pl="div";function Ml(e,n){let t=ge(),{id:r=`headlessui-dialog-overlay-${t}`,...o}=e,[{dialogState:l,close:i}]=rt("Dialog.Overlay"),s=ue(n),u=j(m=>{if(m.target===m.currentTarget){if(ft(m.currentTarget))return m.preventDefault();m.preventDefault(),m.stopPropagation(),i()}}),c=a.useMemo(()=>({open:l===0}),[l]);return oe({ourProps:{ref:s,id:r,"aria-hidden":!0,onClick:u},theirProps:o,slot:c,defaultTag:Pl,name:"Dialog.Overlay"})}let Al="div";function Dl(e,n){let t=ge(),{id:r=`headlessui-dialog-backdrop-${t}`,...o}=e,[{dialogState:l},i]=rt("Dialog.Backdrop"),s=ue(n);a.useEffect(()=>{if(i.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[i.panelRef]);let u=a.useMemo(()=>({open:l===0}),[l]);return a.createElement(Ut,{force:!0},a.createElement(Vt,null,oe({ourProps:{ref:s,id:r,"aria-hidden":!0},theirProps:o,slot:u,defaultTag:Al,name:"Dialog.Backdrop"})))}let Ll="div";function _l(e,n){let t=ge(),{id:r=`headlessui-dialog-panel-${t}`,...o}=e,[{dialogState:l},i]=rt("Dialog.Panel"),s=ue(n,i.panelRef),u=a.useMemo(()=>({open:l===0}),[l]),c=j(m=>{m.stopPropagation()});return oe({ourProps:{ref:s,id:r,onClick:c},theirProps:o,slot:u,defaultTag:Ll,name:"Dialog.Panel"})}let Rl="h2";function Bl(e,n){let t=ge(),{id:r=`headlessui-dialog-title-${t}`,...o}=e,[{dialogState:l,setTitleId:i}]=rt("Dialog.Title"),s=ue(n);a.useEffect(()=>(i(r),()=>i(null)),[r,i]);let u=a.useMemo(()=>({open:l===0}),[l]);return oe({ourProps:{ref:s,id:r},theirProps:o,slot:u,defaultTag:Rl,name:"Dialog.Title"})}let zl=le(kl),Wl=le(Dl),Ul=le(_l),Hl=le(Ml),Vl=le(Bl),Vn=Object.assign(zl,{Backdrop:Wl,Panel:Ul,Overlay:Hl,Title:Vl,Description:Hn}),Yn=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function qn(e){var n,t;let r=(n=e.innerText)!=null?n:"",o=e.cloneNode(!0);if(!(o instanceof HTMLElement))return r;let l=!1;for(let s of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),l=!0;let i=l?(t=o.innerText)!=null?t:"":r;return Yn.test(i)&&(i=i.replace(Yn,"")),i}function Yl(e){let n=e.getAttribute("aria-label");if(typeof n=="string")return n.trim();let t=e.getAttribute("aria-labelledby");if(t){let r=t.split(" ").map(o=>{let l=document.getElementById(o);if(l){let i=l.getAttribute("aria-label");return typeof i=="string"?i.trim():qn(l).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return qn(e).trim()}function ql(e){let n=a.useRef(""),t=a.useRef("");return j(()=>{let r=e.current;if(!r)return"";let o=r.innerText;if(n.current===o)return t.current;let l=Yl(r).trim().toLowerCase();return n.current=o,t.current=l,l})}var Zl=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Zl||{}),Gl=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Gl||{}),Kl=(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))(Kl||{});function Kt(e,n=t=>t){let t=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,r=Pt(n(e.items.slice()),l=>l.dataRef.current.domRef.current),o=t?r.indexOf(t):null;return o===-1&&(o=null),{items:r,activeItemIndex:o}}let Jl={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=Kt(e),o=Rt(n,{resolveItems:()=>r.items,resolveActiveIndex:()=>r.activeItemIndex,resolveId:l=>l.id,resolveDisabled:l=>l.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeItemIndex:o,activationTrigger:(t=n.trigger)!=null?t:1}},3:(e,n)=>{let t=e.searchQuery!==""?0:1,r=e.searchQuery+n.value.toLowerCase(),o=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+t).concat(e.items.slice(0,e.activeItemIndex+t)):e.items).find(i=>{var s;return((s=i.dataRef.current.textValue)==null?void 0:s.startsWith(r))&&!i.dataRef.current.disabled}),l=o?e.items.indexOf(o):-1;return l===-1||l===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:l,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,n)=>{let t=Kt(e,r=>[...r,{id:n.id,dataRef:n.dataRef}]);return{...e,...t}},6:(e,n)=>{let t=Kt(e,r=>{let o=r.findIndex(l=>l.id===n.id);return o!==-1&&r.splice(o,1),r});return{...e,...t,activationTrigger:1}}},Jt=a.createContext(null);Jt.displayName="MenuContext";function pt(e){let n=a.useContext(Jt);if(n===null){let t=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,pt),t}return n}function Ql(e,n){return se(n.type,Jl,e,n)}let Xl=a.Fragment;function ei(e,n){let{__demoMode:t=!1,...r}=e,o=a.useReducer(Ql,{__demoMode:t,menuState:t?0:1,buttonRef:a.createRef(),itemsRef:a.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:l,itemsRef:i,buttonRef:s},u]=o,c=ue(n);Mt([s,i],(p,v)=>{var g;u({type:1}),kt(v,$t.Loose)||(p.preventDefault(),(g=s.current)==null||g.focus())},l===0);let m=j(()=>{u({type:1})}),h=a.useMemo(()=>({open:l===0,close:m}),[l,m]),b={ref:c};return a.createElement(Jt.Provider,{value:o},a.createElement(_t,{value:se(l,{0:ce.Open,1:ce.Closed})},oe({ourProps:b,theirProps:r,slot:h,defaultTag:Xl,name:"Menu"})))}let ti="button";function ni(e,n){var t;let r=ge(),{id:o=`headlessui-menu-button-${r}`,...l}=e,[i,s]=pt("Menu.Button"),u=ue(i.buttonRef,n),c=Oe(),m=j(g=>{switch(g.key){case Q.Space:case Q.Enter:case Q.ArrowDown:g.preventDefault(),g.stopPropagation(),s({type:0}),c.nextFrame(()=>s({type:2,focus:ne.First}));break;case Q.ArrowUp:g.preventDefault(),g.stopPropagation(),s({type:0}),c.nextFrame(()=>s({type:2,focus:ne.Last}));break}}),h=j(g=>{switch(g.key){case Q.Space:g.preventDefault();break}}),b=j(g=>{if(ft(g.currentTarget))return g.preventDefault();e.disabled||(i.menuState===0?(s({type:1}),c.nextFrame(()=>{var x;return(x=i.buttonRef.current)==null?void 0:x.focus({preventScroll:!0})})):(g.preventDefault(),s({type:0})))}),p=a.useMemo(()=>({open:i.menuState===0}),[i]),v={ref:u,id:o,type:At(e,i.buttonRef),"aria-haspopup":"menu","aria-controls":(t=i.itemsRef.current)==null?void 0:t.id,"aria-expanded":i.menuState===0,onKeyDown:m,onKeyUp:h,onClick:b};return oe({ourProps:v,theirProps:l,slot:p,defaultTag:ti,name:"Menu.Button"})}let ri="div",oi=$e.RenderStrategy|$e.Static;function li(e,n){var t,r;let o=ge(),{id:l=`headlessui-menu-items-${o}`,...i}=e,[s,u]=pt("Menu.Items"),c=ue(s.itemsRef,n),m=De(s.itemsRef),h=Oe(),b=Je(),p=b!==null?(b&ce.Open)===ce.Open:s.menuState===0;a.useEffect(()=>{let y=s.itemsRef.current;y&&s.menuState===0&&y!==(m==null?void 0:m.activeElement)&&y.focus({preventScroll:!0})},[s.menuState,s.itemsRef,m]),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,N;switch(h.dispose(),y.key){case Q.Space:if(s.searchQuery!=="")return y.preventDefault(),y.stopPropagation(),u({type:3,value:y.key});case Q.Enter:if(y.preventDefault(),y.stopPropagation(),u({type:1}),s.activeItemIndex!==null){let{dataRef:I}=s.items[s.activeItemIndex];(N=(T=I.current)==null?void 0:T.domRef.current)==null||N.click()}xn(s.buttonRef.current);break;case Q.ArrowDown:return y.preventDefault(),y.stopPropagation(),u({type:2,focus:ne.Next});case Q.ArrowUp:return y.preventDefault(),y.stopPropagation(),u({type:2,focus:ne.Previous});case Q.Home:case Q.PageUp:return y.preventDefault(),y.stopPropagation(),u({type:2,focus:ne.First});case Q.End:case Q.PageDown:return y.preventDefault(),y.stopPropagation(),u({type:2,focus:ne.Last});case Q.Escape:y.preventDefault(),y.stopPropagation(),u({type:1}),we().nextFrame(()=>{var I;return(I=s.buttonRef.current)==null?void 0:I.focus({preventScroll:!0})});break;case Q.Tab:y.preventDefault(),y.stopPropagation(),u({type:1}),we().nextFrame(()=>{eo(s.buttonRef.current,y.shiftKey?je.Previous:je.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 Q.Space:y.preventDefault();break}}),x=a.useMemo(()=>({open:s.menuState===0}),[s]),C={"aria-activedescendant":s.activeItemIndex===null||(t=s.items[s.activeItemIndex])==null?void 0:t.id,"aria-labelledby":(r=s.buttonRef.current)==null?void 0:r.id,id:l,onKeyDown:v,onKeyUp:g,role:"menu",tabIndex:0,ref:c};return oe({ourProps:C,theirProps:i,slot:x,defaultTag:ri,features:oi,visible:p,name:"Menu.Items"})}let ii=a.Fragment;function si(e,n){let t=ge(),{id:r=`headlessui-menu-item-${t}`,disabled:o=!1,...l}=e,[i,s]=pt("Menu.Item"),u=i.activeItemIndex!==null?i.items[i.activeItemIndex].id===r:!1,c=a.useRef(null),m=ue(n,c);te(()=>{if(i.__demoMode||i.menuState!==0||!u||i.activationTrigger===0)return;let I=we();return I.requestAnimationFrame(()=>{var P,R;(R=(P=c.current)==null?void 0:P.scrollIntoView)==null||R.call(P,{block:"nearest"})}),I.dispose},[i.__demoMode,c,u,i.menuState,i.activationTrigger,i.activeItemIndex]);let h=ql(c),b=a.useRef({disabled:o,domRef:c,get textValue(){return h()}});te(()=>{b.current.disabled=o},[b,o]),te(()=>(s({type:5,id:r,dataRef:b}),()=>s({type:6,id:r})),[b,r]);let p=j(()=>{s({type:1})}),v=j(I=>{if(o)return I.preventDefault();s({type:1}),xn(i.buttonRef.current)}),g=j(()=>{if(o)return s({type:2,focus:ne.Nothing});s({type:2,focus:ne.Specific,id:r})}),x=On(),C=j(I=>x.update(I)),y=j(I=>{x.wasMoved(I)&&(o||u||s({type:2,focus:ne.Specific,id:r,trigger:0}))}),T=j(I=>{x.wasMoved(I)&&(o||u&&s({type:2,focus:ne.Nothing}))}),N=a.useMemo(()=>({active:u,disabled:o,close:p}),[u,o,p]);return oe({ourProps:{id:r,ref:m,role:"menuitem",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,disabled:void 0,onClick:v,onFocus:g,onPointerEnter:C,onMouseEnter:C,onPointerMove:y,onMouseMove:y,onPointerLeave:T,onMouseLeave:T},theirProps:l,slot:N,defaultTag:ii,name:"Menu.Item"})}let ai=le(ei),ui=le(ni),ci=le(li),di=le(si),ht=Object.assign(ai,{Button:ui,Items:ci,Item:di}),Zn=a.createContext(null);function Gn(){let e=a.useContext(Zn);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,Gn),n}return e}function fi(){let[e,n]=a.useState([]);return[e.length>0?e.join(" "):void 0,a.useMemo(()=>function(t){let r=j(l=>(n(i=>[...i,l]),()=>n(i=>{let s=i.slice(),u=s.indexOf(l);return u!==-1&&s.splice(u,1),s}))),o=a.useMemo(()=>({register:r,slot:t.slot,name:t.name,props:t.props}),[r,t.slot,t.name,t.props]);return a.createElement(Zn.Provider,{value:o},t.children)},[n])]}let mi="label";function pi(e,n){let t=ge(),{id:r=`headlessui-label-${t}`,passive:o=!1,...l}=e,i=Gn(),s=ue(n);te(()=>i.register(r),[r,i.register]);let u={ref:s,...i.props,id:r};return o&&("onClick"in u&&(delete u.htmlFor,delete u.onClick),"onClick"in l&&delete l.onClick),oe({ourProps:u,theirProps:l,slot:i.slot||{},defaultTag:mi,name:i.name||"Label"})}let hi=le(pi),vi=Object.assign(hi,{});function gi(e=0){let[n,t]=a.useState(e),r=Xe(),o=a.useCallback(u=>{r.current&&t(c=>c|u)},[n,r]),l=a.useCallback(u=>!!(n&u),[n]),i=a.useCallback(u=>{r.current&&t(c=>c&~u)},[t,r]),s=a.useCallback(u=>{r.current&&t(c=>c^u)},[t]);return{flags:n,addFlag:o,hasFlag:l,removeFlag:i,toggleFlag:s}}let Qt=a.createContext(null);Qt.displayName="GroupContext";let bi=a.Fragment;function xi(e){var n;let[t,r]=a.useState(null),[o,l]=fi(),[i,s]=Un(),u=a.useMemo(()=>({switch:t,setSwitch:r,labelledby:o,describedby:i}),[t,r,o,i]),c={},m=e;return a.createElement(s,{name:"Switch.Description"},a.createElement(l,{name:"Switch.Label",props:{htmlFor:(n=u.switch)==null?void 0:n.id,onClick(h){t&&(h.currentTarget.tagName==="LABEL"&&h.preventDefault(),t.click(),t.focus({preventScroll:!0}))}}},a.createElement(Qt.Provider,{value:u},oe({ourProps:c,theirProps:m,defaultTag:bi,name:"Switch.Group"}))))}let wi="button";function yi(e,n){var t;let r=ge(),{id:o=`headlessui-switch-${r}`,checked:l,defaultChecked:i=!1,onChange:s,disabled:u=!1,name:c,value:m,form:h,...b}=e,p=a.useContext(Qt),v=a.useRef(null),g=ue(v,n,p===null?null:p.setSwitch),[x,C]=hn(l,s,i),y=j(()=>C==null?void 0:C(!x)),T=j(D=>{if(ft(D.currentTarget))return D.preventDefault();D.preventDefault(),y()}),N=j(D=>{D.key===Q.Space?(D.preventDefault(),y()):D.key===Q.Enter&&uo(D.currentTarget)}),I=j(D=>D.preventDefault()),P=a.useMemo(()=>({checked:x}),[x]),R={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:N,onKeyPress:I},Y=Oe();return a.useEffect(()=>{var D;let M=(D=v.current)==null?void 0:D.closest("form");M&&i!==void 0&&Y.addEventListener(M,"reset",()=>{C(i)})},[v,C]),a.createElement(a.Fragment,null,c!=null&&x&&a.createElement(Ke,{features:ze.Hidden,...dt({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:u,form:h,checked:x,name:c,value:m})}),oe({ourProps:R,theirProps:b,slot:P,defaultTag:wi,name:"Switch"}))}let Ei=le(yi),Si=xi,Ci=Object.assign(Ei,{Group:Si,Label:vi,Description:Hn});function Ti(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 Oi(e,n){let t=we();if(!e)return t.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[l,i]=[r,o].map(u=>{let[c=0]=u.split(",").filter(Boolean).map(m=>m.includes("ms")?parseFloat(m):parseFloat(m)*1e3).sort((m,h)=>h-m);return c}),s=l+i;if(s!==0){t.group(c=>{c.setTimeout(()=>{n(),c.dispose()},s),c.addEventListener(e,"transitionrun",m=>{m.target===m.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 ji(e,n,t,r){let o=t?"enter":"leave",l=we(),i=r!==void 0?Ti(r):()=>{};o==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let s=se(o,{enter:()=>n.enter,leave:()=>n.leave}),u=se(o,{enter:()=>n.enterTo,leave:()=>n.leaveTo}),c=se(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),l.nextFrame(()=>{en(e,...n.base,...s,...c),Xt(e,...n.base,...s,...u),Oi(e,()=>(en(e,...n.base,...s),Xt(e,...n.base,...n.entered),i()))}),l.dispose}function Ni({immediate:e,container:n,direction:t,classes:r,onStart:o,onStop:l}){let i=Xe(),s=Oe(),u=Ee(t);te(()=>{e&&(u.current="enter")},[e]),te(()=>{let c=we();s.add(c.dispose);let m=n.current;if(m&&u.current!=="idle"&&i.current)return c.dispose(),o.current(u.current),c.add(ji(m,r.current,u.current==="enter",()=>{c.dispose(),l.current(u.current)})),c.dispose},[t])}function Pe(e=""){return e.split(/\s+/).filter(n=>n.length>1)}let vt=a.createContext(null);vt.displayName="TransitionContext";var Ii=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Ii||{});function Fi(){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}function $i(){let e=a.useContext(gt);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let gt=a.createContext(null);gt.displayName="NestingContext";function bt(e){return"children"in e?bt(e.children):e.current.filter(({el:n})=>n.current!==null).filter(({state:n})=>n==="visible").length>0}function Kn(e,n){let t=Ee(e),r=a.useRef([]),o=Xe(),l=Oe(),i=j((p,v=ke.Hidden)=>{let g=r.current.findIndex(({el:x})=>x===p);g!==-1&&(se(v,{[ke.Unmount](){r.current.splice(g,1)},[ke.Hidden](){r.current[g].state="hidden"}}),l.microTask(()=>{var x;!bt(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"}),()=>i(p,ke.Unmount)}),u=a.useRef([]),c=a.useRef(Promise.resolve()),m=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(m.current[v].map(([C,y])=>y)).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(m.current[v].splice(0).map(([x,C])=>C)).then(()=>{var x;(x=u.current.shift())==null||x()}).then(()=>g(v))});return a.useMemo(()=>({children:r,register:s,unregister:i,onStart:h,onStop:b,wait:c,chains:m}),[s,i,r,h,b,m,c])}function ki(){}let Pi=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Jn(e){var n;let t={};for(let r of Pi)t[r]=(n=e[r])!=null?n:ki;return t}function Mi(e){let n=a.useRef(Jn(e));return a.useEffect(()=>{n.current=Jn(e)},[e]),n}let Ai="div",Qn=$e.RenderStrategy;function Di(e,n){var t,r;let{beforeEnter:o,afterEnter:l,beforeLeave:i,afterLeave:s,enter:u,enterFrom:c,enterTo:m,entered:h,leave:b,leaveFrom:p,leaveTo:v,...g}=e,x=a.useRef(null),C=ue(x,n),y=(t=g.unmount)==null||t?ke.Unmount:ke.Hidden,{show:T,appear:N,initial:I}=Fi(),[P,R]=a.useState(T?"visible":"hidden"),Y=$i(),{register:D,unregister:M}=Y;a.useEffect(()=>D(x),[D,x]),a.useEffect(()=>{if(y===ke.Hidden&&x.current){if(T&&P!=="visible"){R("visible");return}return se(P,{hidden:()=>M(x),visible:()=>D(x)})}},[P,x,D,M,T,y]);let B=Ee({base:Pe(g.className),enter:Pe(u),enterFrom:Pe(c),enterTo:Pe(m),entered:Pe(h),leave:Pe(b),leaveFrom:Pe(p),leaveTo:Pe(v)}),K=Mi({beforeEnter:o,afterEnter:l,beforeLeave:i,afterLeave:s}),X=Be();a.useEffect(()=>{if(X&&P==="visible"&&x.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[x,P,X]);let ae=I&&!N,w=N&&T&&I,_=!X||ae?"idle":T?"enter":"leave",$=gi(0),U=j(be=>se(be,{enter:()=>{$.addFlag(ce.Opening),K.current.beforeEnter()},leave:()=>{$.addFlag(ce.Closing),K.current.beforeLeave()},idle:()=>{}})),H=j(be=>se(be,{enter:()=>{$.removeFlag(ce.Opening),K.current.afterEnter()},leave:()=>{$.removeFlag(ce.Closing),K.current.afterLeave()},idle:()=>{}})),J=Kn(()=>{R("hidden"),M(x)},Y),me=a.useRef(!1);Ni({immediate:w,container:x,classes:B,direction:_,onStart:Ee(be=>{me.current=!0,J.onStart(x,be,U)}),onStop:Ee(be=>{me.current=!1,J.onStop(x,be,H),be==="leave"&&!bt(J)&&(R("hidden"),M(x))})});let pe=g,Se={ref:C};return w?pe={...pe,className:ut(g.className,...B.current.enter,...B.current.enterFrom)}:me.current&&(pe.className=ut(g.className,(r=x.current)==null?void 0:r.className),pe.className===""&&delete pe.className),a.createElement(gt.Provider,{value:J},a.createElement(_t,{value:se(P,{visible:ce.Open,hidden:ce.Closed})|$.flags},oe({ourProps:Se,theirProps:pe,defaultTag:Ai,features:Qn,visible:P==="visible",name:"Transition.Child"})))}function Li(e,n){let{show:t,appear:r=!1,unmount:o=!0,...l}=e,i=a.useRef(null),s=ue(i,n);Be();let u=Je();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,m]=a.useState(t?"visible":"hidden"),h=Kn(()=>{m("hidden")}),[b,p]=a.useState(!0),v=a.useRef([t]);te(()=>{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)m("visible");else if(!bt(h))m("hidden");else{let T=i.current;if(!T)return;let N=T.getBoundingClientRect();N.x===0&&N.y===0&&N.width===0&&N.height===0&&m("hidden")}},[t,h]);let x={unmount:o},C=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(gt.Provider,{value:h},a.createElement(vt.Provider,{value:g},oe({ourProps:{...x,as:a.Fragment,children:a.createElement(Xn,{ref:s,...x,...l,beforeEnter:C,beforeLeave:y})},theirProps:{},defaultTag:a.Fragment,features:Qn,visible:c==="visible",name:"Transition"})))}function _i(e,n){let t=a.useContext(vt)!==null,r=Je()!==null;return a.createElement(a.Fragment,null,!t&&r?a.createElement(tn,{ref:n,...e}):a.createElement(Xn,{ref:n,...e}))}let tn=le(Li),Xn=le(Di),Ri=le(_i),Re=Object.assign(tn,{Child:Ri,Root:tn});function Bi({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M18 10a.75.75 0 0 1-.75.75H4.66l2.1 1.95a.75.75 0 1 1-1.02 1.1l-3.5-3.25a.75.75 0 0 1 0-1.1l3.5-3.25a.75.75 0 1 1 1.02 1.1l-2.1 1.95h12.59A.75.75 0 0 1 18 10Z",clipRule:"evenodd"}))}const zi=E.forwardRef(Bi);function Wi({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M2 10a.75.75 0 0 1 .75-.75h12.59l-2.1-1.95a.75.75 0 1 1 1.02-1.1l3.5 3.25a.75.75 0 0 1 0 1.1l-3.5 3.25a.75.75 0 1 1-1.02-1.1l2.1-1.95H2.75A.75.75 0 0 1 2 10Z",clipRule:"evenodd"}))}const Ui=E.forwardRef(Wi);function Hi({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"}))}const Vi=E.forwardRef(Hi);function Yi({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const qi=E.forwardRef(Yi);function Zi({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M9.47 6.47a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 1 1-1.06 1.06L10 8.06l-3.72 3.72a.75.75 0 0 1-1.06-1.06l4.25-4.25Z",clipRule:"evenodd"}))}const Gi=E.forwardRef(Zi);function Ki({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-8-5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0v-4.5A.75.75 0 0 1 10 5Zm0 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const er=E.forwardRef(Ki);function Ji({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const Qi=E.forwardRef(Ji);function Xi({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z",clipRule:"evenodd"}))}const es=E.forwardRef(Xi);function ts({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM8.28 7.22a.75.75 0 0 0-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 1 0 1.06 1.06L10 11.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L11.06 10l1.72-1.72a.75.75 0 0 0-1.06-1.06L10 8.94 8.28 7.22Z",clipRule:"evenodd"}))}const ns=E.forwardRef(ts),xt={warning:{color:"bg-yellow-50",icon:f.jsx(Qi,{className:"h-5 w-5 text-yellow-400","aria-hidden":"true"}),colorTitle:"text-yellow-800",colorText:"text-yellow-700"},error:{color:"bg-red-50",icon:f.jsx(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:f.jsx(Vi,{className:"h-5 w-5 text-green-400","aria-hidden":"true"}),colorTitle:"text-green-800",colorText:"text-green-700"},info:{color:"bg-blue-50",icon:f.jsx(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:l})=>{const{width:i}=Tt(),[s,u]=a.useState(!1);return a.useEffect(()=>r?(tr=window.setTimeout(()=>{u(!1),l({type:"ALERT",payload:{title:"",message:"",typeAlert:"",active:!1}})},o),u(!0)):(u(!1),()=>window.clearTimeout(tr)),[r,l,o]),f.jsx("div",{className:"fixed top-2.5 w-80 3xs:w-96 z-50",style:{left:`calc(50% - ${i<=470?"160px":"192px"})`},children:f.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:f.jsxs("div",{className:F("rounded-md p-4 text-center",xt[e].color),children:[f.jsxs("div",{className:"flex justify-center flex-shrink-0",children:[xt[e].icon,f.jsx("h3",{className:F("text-sm font-medium ml-3",xt[e].colorTitle),children:n})]}),f.jsx("div",{className:F("mt-2 text-sm",xt[e].colorText),children:f.jsx("p",{children:t})})]})})})};function os({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))}const ls=E.forwardRef(os);function is({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M10.5 3.75a6.75 6.75 0 1 0 0 13.5 6.75 6.75 0 0 0 0-13.5ZM2.25 10.5a8.25 8.25 0 1 1 14.59 5.28l4.69 4.69a.75.75 0 1 1-1.06 1.06l-4.69-4.69A8.25 8.25 0 0 1 2.25 10.5Z",clipRule:"evenodd"}))}const ss=E.forwardRef(is);function as({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{d:"M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-8.4 8.4a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32l8.4-8.4Z"}),E.createElement("path",{d:"M5.25 5.25a3 3 0 0 0-3 3v10.5a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3V13.5a.75.75 0 0 0-1.5 0v5.25a1.5 1.5 0 0 1-1.5 1.5H5.25a1.5 1.5 0 0 1-1.5-1.5V8.25a1.5 1.5 0 0 1 1.5-1.5h5.25a.75.75 0 0 0 0-1.5H5.25Z"}))}const us=E.forwardRef(as);function cs({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M1.5 6a2.25 2.25 0 0 1 2.25-2.25h16.5A2.25 2.25 0 0 1 22.5 6v12a2.25 2.25 0 0 1-2.25 2.25H3.75A2.25 2.25 0 0 1 1.5 18V6ZM3 16.06V18c0 .414.336.75.75.75h16.5A.75.75 0 0 0 21 18v-1.94l-2.69-2.689a1.5 1.5 0 0 0-2.12 0l-.88.879.97.97a.75.75 0 1 1-1.06 1.06l-5.16-5.159a1.5 1.5 0 0 0-2.12 0L3 16.061Zm10.125-7.81a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0Z",clipRule:"evenodd"}))}const ds=E.forwardRef(cs);function fs({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M16.5 4.478v.227a48.816 48.816 0 0 1 3.878.512.75.75 0 1 1-.256 1.478l-.209-.035-1.005 13.07a3 3 0 0 1-2.991 2.77H8.084a3 3 0 0 1-2.991-2.77L4.087 6.66l-.209.035a.75.75 0 0 1-.256-1.478A48.567 48.567 0 0 1 7.5 4.705v-.227c0-1.564 1.213-2.9 2.816-2.951a52.662 52.662 0 0 1 3.369 0c1.603.051 2.815 1.387 2.815 2.951Zm-6.136-1.452a51.196 51.196 0 0 1 3.273 0C14.39 3.05 15 3.684 15 4.478v.113a49.488 49.488 0 0 0-6 0v-.113c0-.794.609-1.428 1.364-1.452Zm-.355 5.945a.75.75 0 1 0-1.5.058l.347 9a.75.75 0 1 0 1.499-.058l-.346-9Zm5.48.058a.75.75 0 1 0-1.498-.058l-.347 9a.75.75 0 0 0 1.5.058l.345-9Z",clipRule:"evenodd"}))}const ms=E.forwardRef(fs);function ps({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"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 hs=E.forwardRef(ps);function vs({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const gs=E.forwardRef(vs),bs=({src:e,alt:n,width:t,height:r,className:o="",classNameIcon:l="",isIcon:i=!0,acronym:s=""})=>{function u(){if(typeof s!="string")return s;const c=s.toLowerCase(),m=c.split(" "),h=m[m.length-1];return c.charAt(0)+h.charAt(0)}return f.jsx(f.Fragment,{children:e?f.jsx("img",{src:e,alt:n,width:t,height:r,className:F(o!==""&&o),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s"},onLoad:c=>c.currentTarget.style.filter="none","data-testid":"img"}):i?f.jsx(hs,{className:F("bg-white text-default-5",l!==""?l:"w-7 h-7")}):f.jsx("div",{className:F("bg-gray-200 text-default-5 rounded-full font-bold uppercase flex justify-center items-center",l!==""?l:"w-7 h-7"),children:u()})})},xs=({steps:e,onClick:n})=>{const[t,r]=a.useState(0),o=l=>{r(l),n(l)};return f.jsx("nav",{className:"flex items-center justify-center w-full","aria-label":"Progress","data-testid":"bullets",children:f.jsx("ol",{role:"list",className:"flex items-center space-x-5",children:new Array(e).fill(1).map((l,i)=>f.jsx("li",{children:t!==i?f.jsx("div",{className:"cursor-pointer block h-2.5 w-2.5 rounded-full bg-gray-500 hover:bg-gray-600",onClick:()=>o(i),"data-testid":`step-${i}`,children:f.jsx("span",{className:"sr-only",children:"step"})}):f.jsxs("div",{className:"relative flex items-center justify-center cursor-pointer","aria-current":"step",children:[f.jsx("span",{className:"absolute flex h-5 w-5 p-px","aria-hidden":"true",children:f.jsx("span",{className:"h-full w-full rounded-full bg-gray-300"})}),f.jsx("span",{className:"relative block h-2.5 w-2.5 rounded-full bg-gray-500","aria-hidden":"true"}),f.jsx("span",{className:"sr-only",children:"step"})]})},i))})})};var 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 l="",i=0;i<arguments.length;i++){var s=arguments[i];s&&(l=o(l,r(s)))}return l}function r(l){if(typeof l=="string"||typeof l=="number")return l;if(typeof l!="object")return"";if(Array.isArray(l))return t.apply(null,l);if(l.toString!==Object.prototype.toString&&!l.toString.toString().includes("[native code]"))return l.toString();var i="";for(var s in l)n.call(l,s)&&l[s]&&(i=o(i,s));return i}function o(l,i){return i?l?l+" "+i:l+i:l}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(nr);var ws=nr.exports;const Me=Nr(ws),rr=({className:e="text-sm w-full rounded-md",children:n,icon:t=null,edge:r=null,disabled:o=!1,type:l="button",onClick:i,id:s})=>{const u=Me({"ml-2":r==="start"&&t!==null,"mr-2":r==="end"&&t!==null});return f.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:l,onClick:i,disabled:o,"data-testid":`button-outline-${s}`,id:`button-outline-${s}`,children:[r==="start"&&t!==null&&f.jsx("span",{children:t}),f.jsx("span",{className:N("flex",u),id:s,children:n}),r==="end"&&t!==null&&f.jsx("span",{children:t})]})},or=({children:e,className:n="",icon:t=null,edge:r=null,disabled:o=!1,type:l="button",onClick:i,id:s})=>{const u=Me({"ml-2":r==="start"&&t!==null,"mr-2":r==="end"&&t!==null});return f.jsxs("button",{className:`${n} flex justify-center items-center`,edge:r,type:l,onClick:i,disabled:o,"data-testid":`button-${s}`,children:[r==="start"&&t!==null&&f.jsx("span",{children:t}),f.jsx("span",{className:u,children:e}),r==="end"&&t!==null&&f.jsx("span",{children:t})]})},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:l=!1,type:i="button",onClick:s,id:u,outline:c="0px 0px 0px 2px #6366F1, 0px 0px 0px 2px #FFF, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameContainer:m=""})=>{const[h,b]=a.useState(!1),p=Me({"ml-2":o==="start"&&r!==null,"mr-2":o==="end"&&r!==null}),v=()=>{s&&s()};return f.jsx("div",{className:N("rounded-md p-0.5",m!==""&&m),style:{boxShadow:h?c:"0px 0px 0px 0px #6366F1, 0px 0px 0px 0px #FFF, 0px 0px 0px 0px rgba(0, 0, 0, 0.05)",transition:"box-shadow .1s ease-in-out"},"data-testid":"container-button",children:f.jsxs("button",{className:N("flex justify-center items-center text-sm leading-6 shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",l&&"text-white bg-gray-300 rounded focus:outline-none cursor-default",l?n.replace(/\bbg-\w+\b/g,""):n),type:i,onClick:v,onFocus:()=>b(!0),onBlur:()=>b(!1),disabled:l,"data-testid":`button-solid-${u}`,children:[o==="start"&&r!==null&&f.jsx("span",{className:"flex",children:r}),f.jsx("span",{className:N(t.length===0&&p,t.length!==0&&t),children:e}),o==="end"&&r!==null&&f.jsx("span",{children:r})]})})},ys=({label:e=null,checked:n=!1,onChange:t,id:r,className:o="",classNameCheckbox:l="h-4 w-4",style:i={},disabled:s=!1})=>{const[u,c]=a.useState(!1);return a.useEffect(()=>{c(n)},[n]),f.jsxs("div",{className:"flex items-center",style:i,"data-testid":`container-check-${r}`,children:[f.jsx("input",{checked:u,id:`${e}-${r}`,value:r,"aria-describedby":"comments-description",type:"checkbox",onChange:t,className:N("cursor-pointer rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",l!==""&&l),"data-testid":`checkbox-${r}`,disabled:s}),e!==null?f.jsx("label",{htmlFor:`${e}-${r}`,className:`ml-2.5 font-normal cursor-pointer ${o}`,id:`label-${r}`,"data-testid":"label",children:e}):null]})};function Es({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Ss=E.forwardRef(Es);function Cs({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const Ts=E.forwardRef(Cs);function Os({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const js=E.forwardRef(Os);function Is({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const Ns=E.forwardRef(Is);function Fs({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}const $s=E.forwardRef(Fs);function lr({children:e,className:n="sm:max-w-sm w-11/12 sm:my-8",style:t={},classNameContainer:r="",isOpen:o=!1,setIsOpen:l,showIconSuccess:i=!0,showButton:s=!0}){return f.jsxs(f.Fragment,{children:[f.jsx("style",{children:`
35
+ */(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var l="",i=0;i<arguments.length;i++){var s=arguments[i];s&&(l=o(l,r(s)))}return l}function r(l){if(typeof l=="string"||typeof l=="number")return l;if(typeof l!="object")return"";if(Array.isArray(l))return t.apply(null,l);if(l.toString!==Object.prototype.toString&&!l.toString.toString().includes("[native code]"))return l.toString();var i="";for(var s in l)n.call(l,s)&&l[s]&&(i=o(i,s));return i}function o(l,i){return i?l?l+" "+i:l+i:l}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(nr);var ws=nr.exports;const Me=Ir(ws),rr=({className:e="text-sm w-full rounded-md",children:n,icon:t=null,edge:r=null,disabled:o=!1,type:l="button",onClick:i,id:s})=>{const u=Me({"ml-2":r==="start"&&t!==null,"mr-2":r==="end"&&t!==null});return f.jsxs("button",{className:F("flex justify-center items-center bg-white px-3 py-7px font-medium leading-6 text-white shadow-sm ring-1 ring-inset ring-gray-300 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 bg-gray-50",e),type:l,onClick:i,disabled:o,"data-testid":`button-outline-${s}`,id:`button-outline-${s}`,children:[r==="start"&&t!==null&&f.jsx("span",{children:t}),f.jsx("span",{className:F("flex",u),id:s,children:n}),r==="end"&&t!==null&&f.jsx("span",{children:t})]})},or=({children:e,className:n="",icon:t=null,edge:r=null,disabled:o=!1,type:l="button",onClick:i,id:s})=>{const u=Me({"ml-2":r==="start"&&t!==null,"mr-2":r==="end"&&t!==null});return f.jsxs("button",{className:`${n} flex justify-center items-center`,edge:r,type:l,onClick:i,disabled:o,"data-testid":`button-${s}`,children:[r==="start"&&t!==null&&f.jsx("span",{children:t}),f.jsx("span",{className:u,children:e}),r==="end"&&t!==null&&f.jsx("span",{children:t})]})},wt=({children:e,classNameButton:n="bg-indigo-600 hover:bg-indigo-700 focus-visible:outline-indigo-600 shadow-indigo-500 rounded font-semibold px-3 py-1.5 text-white w-full",classNameText:t="",icon:r=null,edge:o=null,disabled:l=!1,type:i="button",onClick:s,id:u,outline:c="0px 0px 0px 2px #6366F1, 0px 0px 0px 2px #FFF, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameContainer:m=""})=>{const[h,b]=a.useState(!1),p=Me({"ml-2":o==="start"&&r!==null,"mr-2":o==="end"&&r!==null}),v=()=>{s&&s()};return f.jsx("div",{className:F("rounded-md p-0.5",m!==""&&m),style:{boxShadow:h?c:"0px 0px 0px 0px #6366F1, 0px 0px 0px 0px #FFF, 0px 0px 0px 0px rgba(0, 0, 0, 0.05)",transition:"box-shadow .1s ease-in-out"},"data-testid":"container-button",children:f.jsxs("button",{className:F("flex justify-center items-center text-sm leading-6 shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",l&&"text-white bg-gray-300 rounded focus:outline-none cursor-default",l?n.replace(/\bbg-\w+\b/g,""):n),type:i,onClick:v,onFocus:()=>b(!0),onBlur:()=>b(!1),disabled:l,"data-testid":`button-solid-${u}`,children:[o==="start"&&r!==null&&f.jsx("span",{className:"flex",children:r}),f.jsx("span",{className:F(t.length===0&&p,t.length!==0&&t),children:e}),o==="end"&&r!==null&&f.jsx("span",{children:r})]})})},ys=({label:e=null,checked:n=!1,onChange:t,id:r,className:o="",classNameCheckbox:l="h-4 w-4",style:i={},disabled:s=!1})=>{const[u,c]=a.useState(!1);return a.useEffect(()=>{c(n)},[n]),f.jsxs("div",{className:"flex items-center",style:i,"data-testid":`container-check-${r}`,children:[f.jsx("input",{checked:u,id:`${e}-${r}`,value:r,"aria-describedby":"comments-description",type:"checkbox",onChange:t,className:F("cursor-pointer rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",l!==""&&l),"data-testid":`checkbox-${r}`,disabled:s}),e!==null?f.jsx("label",{htmlFor:`${e}-${r}`,className:`ml-2.5 font-normal cursor-pointer ${o}`,id:`label-${r}`,"data-testid":"label",children:e}):null]})};function Es({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Ss=E.forwardRef(Es);function Cs({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const Ts=E.forwardRef(Cs);function Os({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const js=E.forwardRef(Os);function Ns({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"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 Is=E.forwardRef(Ns);function Fs({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}const $s=E.forwardRef(Fs);function lr({children:e,className:n="sm:max-w-sm w-11/12 sm:my-8",style:t={},classNameContainer:r="",isOpen:o=!1,setIsOpen:l,showIconSuccess:i=!0,showButton:s=!0}){return f.jsxs(f.Fragment,{children:[f.jsx("style",{children:`
36
36
  .bg-opacity-35 {
37
37
  opacity: .35;
38
38
  }
39
- `}),f.jsx(Re,{show:o,as:a.Fragment,children:f.jsxs(Vn,{as:"div",className:"relative z-50 relative",onClose:l,"data-testid":"modal",children:[f.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:f.jsx("div",{className:"fixed inset-0 bg-opacity-35 bg-gray-900 transition-opacity","data-testid":"window-close",onClick:()=>l(!1)})}),f.jsx("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:f.jsx("div",{className:"flex min-h-full items-center justify-center xs:p-2 p-4 text-center sm:items-center sm:p-0",children:f.jsx(Re.Child,{as:a.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:f.jsxs(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),style:t,children:[i&&f.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100",children:f.jsx(Ss,{className:"h-6 w-6 text-green-600","aria-hidden":"true"})}),f.jsx("div",{className:N(r!==""&&r),"data-testid":"content",children:e}),s&&f.jsx("div",{className:"mt-5 sm:mt-6",children:f.jsx(xt,{id:"close-modal",onClick:()=>l(!1),children:"Cerrar"})}),f.jsx("button",{className:"opacity-0 absolute"})]})})})})]})})]})}const ks=({isOpenModalConfirmation:e,setIsOpenModalConfirmation:n,close:t,title:r="¿Estás seguro de abandonar la creación de la acción?",description:o="La información se perderá si no creas la acción",classNameTitle:l="",classNameDescription:i=""})=>{const s=()=>{n(!1),t()};return f.jsxs(lr,{isOpen:e,setIsOpen:()=>n(),showButton:!1,showIconSuccess:!1,children:[f.jsx("p",{className:N("text-center text-sm",l!==""&&l),children:r}),f.jsx("p",{className:N("text-center text-sm",i!==""&&i),children:o}),f.jsxs("div",{className:"flex w-full justify-center mt-5",children:[f.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"}),f.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"})]})]})},Ps=({className:e="",style:n={}})=>f.jsx("div",{className:N("w-px",e!==""&&e),style:n}),Ms=({onClick:e,id:n="",className:t=""})=>f.jsxs("div",{className:N("flex items-center text-default-5",t!==""&&t),"data-testid":n,children:[f.jsx(ls,{className:"w-3 h-3 3xs:w-4 3xs:h-4 stroke-current cursor-pointer","data-testid":"chevron-left-icon",onClick:e}),f.jsx("span",{onClick:e,className:"text-sm cursor-pointer","data-testid":"go-back",children:"Volver"})]}),nn=({placeholder:e="",label:n="",htmlFor:t,type:r="text",name:o,handleChange:l,onClick:i=()=>{},value:s,isReadOnly:u=!1,isError:c=!1,helperText:m="",autocomplete:h="on",id:b,classNameLabel:p="",classNameContainerInput:v="",classNameContainer:g="",className:x="",icon:C=null,onKeyDown:y,onFocus:T,min:I,max:F})=>{const[P,R]=a.useState(!1),Y=Me({"ring-red-300 focus:ring-red-300 text-red-900":c||P,"focus:ring-indigo-600 text-gray-500":!c&&!P}),D=M=>{if(l&&l(M),r!=="email")return;const{value:B}=M.target,G=cn(B);R(!G)};return f.jsxs("div",{"data-testid":`container-input-${b}`,className:g,children:[n!==""&&f.jsx("label",{htmlFor:t,className:N("block text-sm font-medium leading-6",p!==""?p:"text-gray-700"),"data-testid":`label-${b}`,children:n}),f.jsxs("div",{className:N("relative mt-1 rounded-md",v!==""&&v),children:[f.jsx("input",{id:b,name:o,type:r,autoComplete:h,placeholder:e,onChange:D,onClick:i,onKeyDown:y,onFocus:T,value:s,readOnly:u,"data-testid":`input-${b}`,min:I,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",Y,x!==""&&x)}),C!==null&&f.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:C}),c&&C===null&&f.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:f.jsx(er,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),m.length===0||!c?null:f.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${b}`,children:m})]})};function wt({className:e="w-6 h-6",color:n="#3730a3"}){return f.jsxs("svg",{className:N("fill-current animate-spin",e),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:n,strokeWidth:"4",fill:"none"}),f.jsx("path",{fill:n,d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}function As(){return f.jsxs("div",{className:"fixed top-0 left-0 right-0 bottom-0 w-full h-screen overflow-hidden bg-stone-600 opacity-75 flex flex-col items-center justify-center","data-testid":"spinner",style:{zIndex:60},children:[f.jsx("div",{className:"inline-block h-12 w-12 animate-[spinner-grow_0.75s_linear_infinite] rounded-full bg-current align-[-0.125em] opacity-0 motion-reduce:animate-[spinner-grow_1.5s_linear_infinite]",role:"status"}),f.jsx(wt,{className:"w-8 h-8 animate-spin"})]})}const ir=({height:e="36px",style:n={},label:t="",onChange:r,isReadOnly:o=!1,isError:l=!1,helperText:i="",name:s,id:u,className:c="",classNameLabel:m="",classNameInput:h="",options:b,value:p=-1,defaultValue:v={value:-1,label:"",iconStart:null,iconEnd:null},defaultLabel:g="label",defaultId:x="value",bgOptionSelect:C="bg-indigo-600",isSearch:y=!1,loading:T=!1,isTest:I=!1})=>{const[F,P]=a.useState(""),[R,Y]=a.useState(v),[D,M]=a.useState(!1);a.useEffect(()=>{if(p===-1||(b==null?void 0:b.length)===0)return;const w=b==null?void 0:b.find(L=>L[x]===p);w&&Y(w)},[p,b,x]),a.useEffect(()=>{p==="clear"&&(R.value!==v.value||R.label!==v.label||I)&&Y(v)},[v,I,R,p]);const B=F===""?b:b.filter(w=>w[g].toLowerCase().includes(F.toLowerCase())),G=Me({"ring-red-300 focus:ring-red-300 text-red-900":l&&!o,"text-gray-500":!l,"focus:ring-indigo-600":!l&&!o}),J=Me({"text-red-400":l&&!o,"text-gray-400":!l}),ae=w=>{Y(w),r({target:{value:w,checked:!1,name:s,type:void 0,id:w[x]}})};return f.jsxs(Ie,{as:"div",value:R,onChange:ae,children:[f.jsx(Ie.Label,{className:N("block text-sm font-medium leading-6 text-gray-500 mb-0.5",m!==""&&m),children:t}),f.jsxs("div",{className:N("relative",c!==""&&c),children:[f.jsxs(Ie.Button,{className:"w-full","data-testid":`listbox-button-${u}`,children:[R.iconStart&&f.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-2",children:R.iconStart}),f.jsx(Ie.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",!l&&!o&&"ring-inset focus:ring-inset focus:ring-2 focus:ring-indigo-600",o&&"focus:ring-gray-300",G,h!==""&&h),onChange:w=>P(w.target.value),displayValue:w=>{var L;return(L=w[g])==null?void 0:L.trim()},autoComplete:"false",readOnly:!y||o,style:{height:e,...n},"data-testid":"input-search",onClick:()=>M(o?!1:!D),onBlur:()=>M(!1)})]}),R.iconEnd&&f.jsx("span",{className:"absolute inset-y-0 right-4 flex items-center pr-4",children:R.iconEnd}),f.jsx(Ie.Button,{className:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",onClick:()=>M(o?!1:!D),"data-testid":"arrow-button",children:D?f.jsx(Gi,{className:N("h-5 w-5",J),"aria-hidden":"true"}):f.jsx(qi,{className:N("h-5 w-5",J),"aria-hidden":"true"})}),!o&&f.jsx(f.Fragment,{children:T?f.jsx(Ie.Options,{className:"absolute z-10 mt-1 max-h-60 w-full rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none flex justify-center items-center py-2",children:f.jsx(wt,{})}):(B??[]).length>0?f.jsx(Ie.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:B.map((w,L)=>f.jsx(Ie.Option,{value:w,className:N(w[x]===R[x]?`${C} text-white`:"text-gray-900",`relative cursor-default select-none p-2 hover:text-white hover:${C}`),"data-testid":`select-${u}-${w[x]}`,children:f.jsxs("div",{className:"flex justify-between items-center",children:[f.jsxs("div",{className:"flex items-center",children:[w.iconStart&&f.jsx("span",{className:"mr-2","aria-hidden":"true",children:w.iconStart}),f.jsx("span",{className:"block font-normal break-all",children:w[g]})]}),w.iconEnd&&f.jsx("span",{className:"ml-2","aria-hidden":"true",children:w.iconEnd})]})},L))}):f.jsx(Ie.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm py-0.5 overflow-x-hidden flex justify-center items-center py-2",children:f.jsx("p",{"data-testid":"empty-options",children:"Sin opciones"})})})]}),i.length>0&&l&&f.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${u}`,children:i})]})},Ds=({placeholder:e="",label:n="",htmlFor:t,name:r,handleChange:o,onClick:l=()=>{},value:i,valueSelect:s,isReadOnly:u=!1,isError:c=!1,helperText:m="",autocomplete:h="on",id:b,classNameLabel:p="",classNameContainer:v="",className:g="",onKeyDown:x,options:C,idSelect:y,isMarginLeft:T=!0,classNameSelect:I="w-20",type:F="text"})=>{const{width:P}=Tt(),R=Me({"ring-red-300 focus:ring-red-300 text-red-900":c,"focus:ring-indigo-600 text-gray-500":!c});return f.jsxs("div",{"data-testid":`container-input-${b}`,className:v,children:[n!==""&&f.jsx("label",{htmlFor:t,className:N("block text-sm font-medium leading-6",p!==""?p:"text-gray-700"),"data-testid":`label-${b}`,children:n}),f.jsxs("div",{className:"relative mt-1 rounded-md shadow-sm",children:[f.jsx("div",{className:"absolute inset-y-0 -top-0.5 flex items-center",style:{left:"2px"},children:f.jsx(ir,{name:y,onChange:Y=>o(Y),id:y,options:C,value:s,isReadOnly:u,className:I,height:P<=640?"28px":"32px",classNameInput:N(T&&"ml-3.5"),style:{paddingRight:0,boxShadow:"none"},isDisabledFocus:!0})}),f.jsx("input",{id:b,name:r,type:F,autoComplete:h,placeholder:e,readOnly:u,"data-testid":`input-${b}`,onClick:l,onKeyDown:x,onChange:Y=>o(Y),value:i,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",R,g!==""&&g)}),c&&f.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:f.jsx(er,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),m.length===0||!c?null:f.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${b}`,children:m})]})},Ls=({setValuesDefault:e,status:n=!1,isReadOnly:t=!1,handleClick:r,text:o=""})=>{const[l,i]=a.useState(!1);a.useEffect(()=>{i(n),e("status",n)},[n,e]);const s=()=>{i(!l),e("status",!l),r&&r()};return f.jsxs("div",{className:"flex",children:[f.jsxs(Ci,{checked:l,onChange:s,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",l?"bg-success-1":"bg-gray-200"),"data-testid":"switch",disabled:t,children:[f.jsx("span",{className:"sr-only",children:"Use setting"}),f.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",l?"translate-x-full":"translate-x-0")})]}),o!==""?f.jsx("p",{className:"text-sm font-medium text-gray-500 ml-2 self-end",children:o}):f.jsx("p",{className:"text-sm font-medium text-gray-500 ml-2 self-end","data-testid":"text-switch",children:l?"Activo":"Inactivo"})]})};function _s({label:e="",id:n,htmlFor:t="",classNameLabel:r="",className:o="",rows:l=4,name:i,placeholder:s="",helperText:u="",isReadOnly:c=!1,isError:m=!1,onChange:h,value:b,idInput:p,nameInput:v,placeholderInput:g="",isReadOnlyInput:x=!1,valueInput:C,infoTop:y=null,infoBottom:T=null,classNameInfoTop:I="h-4",classNameInfoBottom:F="h-2",isInputTitle:P=!1,scrollHeightTest:R=!1,hiddenBorder:Y=!1}){const D=a.useRef(null),[M,B]=a.useState(0);a.useEffect(()=>{const{current:J}=D;J===null||R||B(J.scrollHeight)},[D,b,R]),a.useEffect(()=>{R&&B(800)},[R]);const G=Me({"ring-red-300 focus:ring-red-300 text-red-900":m,"focus:ring-indigo-600 text-gray-700":!m});return f.jsxs(f.Fragment,{children:[e!==""&&f.jsx("label",{htmlFor:t,className:N("leading-6 block text-sm",r!==""&&r),children:e}),f.jsxs("div",{className:"relative overflow-x-hidden",children:[y!==null&&f.jsx("div",{className:"absolute top-2 left-3 w-full",children:y}),f.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",G),children:[y!==null&&f.jsx("div",{className:"py-2","aria-hidden":"true",children:f.jsx("div",{className:"py-px",children:f.jsx("div",{className:I})})}),P&&f.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:C,onChange:h,rows:2,readOnly:x}),f.jsx("textarea",{style:{height:M>0?M:"auto"},placeholder:s,rows:l,name:i,id:n,className:N(P||Y?"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",G,o!==""&&o),readOnly:c,onChange:h,value:b,"data-testid":`textarea-${n}`,ref:D}),T!==null&&f.jsx("div",{className:"py-2","aria-hidden":"true",children:f.jsx("div",{className:"py-px",children:f.jsx("div",{className:F})})})]}),T!==null&&f.jsx("div",{className:"absolute bottom-2 left-3 w-full",children:T})]}),u.length>0&&m&&f.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${n}`,children:u})]})}const Rs=({className:e="",children:n,message:t=""})=>{const[r,o]=a.useState(!1),l=()=>{t!==""&&o(!0)},i=()=>{o(!1)};return f.jsx("div",{className:"relative",children:f.jsxs("div",{onMouseLeave:i.bind(null,r),"data-testid":"container-tooltip",children:[f.jsx("div",{className:`
39
+ `}),f.jsx(Re,{show:o,as:a.Fragment,children:f.jsxs(Vn,{as:"div",className:"relative z-50 relative",onClose:l,"data-testid":"modal",children:[f.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:f.jsx("div",{className:"fixed inset-0 bg-opacity-35 bg-gray-900 transition-opacity","data-testid":"window-close",onClick:()=>l(!1)})}),f.jsx("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:f.jsx("div",{className:"flex min-h-full items-center justify-center xs:p-2 p-4 text-center sm:items-center sm:p-0",children:f.jsx(Re.Child,{as:a.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:f.jsxs(Vn.Panel,{className:F("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),style:t,children:[i&&f.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100",children:f.jsx(Ss,{className:"h-6 w-6 text-green-600","aria-hidden":"true"})}),f.jsx("div",{className:F(r!==""&&r),"data-testid":"content",children:e}),s&&f.jsx("div",{className:"mt-5 sm:mt-6",children:f.jsx(wt,{id:"close-modal",onClick:()=>l(!1),children:"Cerrar"})}),f.jsx("button",{className:"opacity-0 absolute"})]})})})})]})})]})}const ks=({isOpenModalConfirmation:e,setIsOpenModalConfirmation:n,close:t,title:r="¿Estás seguro de abandonar la creación de la acción?",description:o="La información se perderá si no creas la acción",classNameTitle:l="",classNameDescription:i=""})=>{const s=()=>{n(!1),t()};return f.jsxs(lr,{isOpen:e,setIsOpen:()=>n(),showButton:!1,showIconSuccess:!1,children:[f.jsx("p",{className:F("text-center text-sm",l!==""&&l),children:r}),f.jsx("p",{className:F("text-center text-sm",i!==""&&i),children:o}),f.jsxs("div",{className:"flex w-full justify-center mt-5",children:[f.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"}),f.jsx(wt,{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"})]})]})},Ps=({className:e="",style:n={}})=>f.jsx("div",{className:F("w-px",e!==""&&e),style:n}),Ms=({onClick:e,id:n="",className:t=""})=>f.jsxs("div",{className:F("flex items-center text-default-5",t!==""&&t),"data-testid":n,children:[f.jsx(ls,{className:"w-3 h-3 3xs:w-4 3xs:h-4 stroke-current cursor-pointer","data-testid":"chevron-left-icon",onClick:e}),f.jsx("span",{onClick:e,className:"text-sm cursor-pointer","data-testid":"go-back",children:"Volver"})]}),nn=({placeholder:e="",label:n="",htmlFor:t,type:r="text",name:o,handleChange:l,onClick:i=()=>{},value:s,isReadOnly:u=!1,isError:c=!1,helperText:m="",autocomplete:h="on",id:b,classNameLabel:p="",classNameContainerInput:v="",classNameContainer:g="",className:x="",icon:C=null,onKeyDown:y,onFocus:T,min:N,max:I})=>{const[P,R]=a.useState(!1),Y=Me({"ring-red-300 focus:ring-red-300 text-red-900":c||P,"focus:ring-indigo-600 text-gray-500":!c&&!P}),D=M=>{if(l&&l(M),r!=="email")return;const{value:B}=M.target,K=cn(B);R(!K)};return f.jsxs("div",{"data-testid":`container-input-${b}`,className:g,children:[n!==""&&f.jsx("label",{htmlFor:t,className:F("block text-sm font-medium leading-6",p!==""?p:"text-gray-700"),"data-testid":`label-${b}`,children:n}),f.jsxs("div",{className:F("relative mt-1 rounded-md",v!==""&&v),children:[f.jsx("input",{id:b,name:o,type:r,autoComplete:h,placeholder:e,onChange:D,onClick:i,onKeyDown:y,onFocus:T,value:s,readOnly:u,"data-testid":`input-${b}`,min:N,className:F("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",Y,x!==""&&x)}),C!==null&&f.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:C}),c&&C===null&&f.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:f.jsx(er,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),m.length===0||!c?null:f.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${b}`,children:m})]})};function ot({className:e="w-6 h-6",color:n="#3730a3"}){return f.jsxs("svg",{className:F("fill-current animate-spin",e),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:n,strokeWidth:"4",fill:"none"}),f.jsx("path",{fill:n,d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}function As(){return f.jsxs("div",{className:"fixed top-0 left-0 right-0 bottom-0 w-full h-screen overflow-hidden bg-stone-600 opacity-75 flex flex-col items-center justify-center","data-testid":"spinner",style:{zIndex:60},children:[f.jsx("div",{className:"inline-block h-12 w-12 animate-[spinner-grow_0.75s_linear_infinite] rounded-full bg-current align-[-0.125em] opacity-0 motion-reduce:animate-[spinner-grow_1.5s_linear_infinite]",role:"status"}),f.jsx(ot,{className:"w-8 h-8 animate-spin"})]})}const ir=({height:e="36px",style:n={},label:t="",onChange:r,isReadOnly:o=!1,isError:l=!1,helperText:i="",name:s,id:u,className:c="",classNameLabel:m="",classNameInput:h="",options:b,value:p=-1,defaultValue:v={value:-1,label:"",iconStart:null,iconEnd:null},defaultLabel:g="label",defaultId:x="value",bgOptionSelect:C="bg-indigo-600",isSearch:y=!1,loading:T=!1,isTest:N=!1})=>{const[I,P]=a.useState(""),[R,Y]=a.useState(v),[D,M]=a.useState(!1);a.useEffect(()=>{if(p===-1||(b==null?void 0:b.length)===0)return;const w=b==null?void 0:b.find(_=>_[x]===p);w&&Y(w)},[p,b,x]),a.useEffect(()=>{p==="clear"&&(R.value!==v.value||R.label!==v.label||N)&&Y(v)},[v,N,R,p]);const B=I===""?b:b.filter(w=>w[g].toLowerCase().includes(I.toLowerCase())),K=Me({"ring-red-300 focus:ring-red-300 text-red-900":l&&!o,"text-gray-500":!l,"focus:ring-indigo-600":!l&&!o}),X=Me({"text-red-400":l&&!o,"text-gray-400":!l}),ae=w=>{Y(w),r({target:{value:w,checked:!1,name:s,type:void 0,id:w[x]}})};return f.jsxs(Ne,{as:"div",value:R,onChange:ae,children:[f.jsx(Ne.Label,{className:F("block text-sm font-medium leading-6 text-gray-500 mb-0.5",m!==""&&m),children:t}),f.jsxs("div",{className:F("relative",c!==""&&c),children:[f.jsxs(Ne.Button,{className:"w-full","data-testid":`listbox-button-${u}`,children:[R.iconStart&&f.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-2",children:R.iconStart}),f.jsx(Ne.Input,{className:F("w-full rounded-md border-0 bg-white py-1.5 pr-10 text-gray-900 shadow-sm ring-1 ring-gray-300 sm:text-sm sm:leading-6 truncate block",!l&&!o&&"ring-inset focus:ring-inset focus:ring-2 focus:ring-indigo-600",o&&"focus:ring-gray-300",K,h!==""&&h),onChange:w=>P(w.target.value),displayValue:w=>{var _;return(_=w[g])==null?void 0:_.trim()},autoComplete:"false",readOnly:!y||o,style:{height:e,...n},"data-testid":"input-search",onClick:()=>M(o?!1:!D),onBlur:()=>M(!1)})]}),R.iconEnd&&f.jsx("span",{className:"absolute inset-y-0 right-4 flex items-center pr-4",children:R.iconEnd}),f.jsx(Ne.Button,{className:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",onClick:()=>M(o?!1:!D),"data-testid":"arrow-button",children:D?f.jsx(Gi,{className:F("h-5 w-5",X),"aria-hidden":"true"}):f.jsx(qi,{className:F("h-5 w-5",X),"aria-hidden":"true"})}),!o&&f.jsx(f.Fragment,{children:T?f.jsx(Ne.Options,{className:"absolute z-10 mt-1 max-h-60 w-full rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none flex justify-center items-center py-2",children:f.jsx(ot,{})}):(B??[]).length>0?f.jsx(Ne.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:B.map((w,_)=>f.jsx(Ne.Option,{value:w,className:F(w[x]===R[x]?`${C} text-white`:"text-gray-900",`relative cursor-default select-none p-2 hover:text-white hover:${C}`),"data-testid":`select-${u}-${w[x]}`,children:f.jsxs("div",{className:"flex justify-between items-center",children:[f.jsxs("div",{className:"flex items-center",children:[w.iconStart&&f.jsx("span",{className:"mr-2","aria-hidden":"true",children:w.iconStart}),f.jsx("span",{className:"block font-normal break-all",children:w[g]})]}),w.iconEnd&&f.jsx("span",{className:"ml-2","aria-hidden":"true",children:w.iconEnd})]})},_))}):f.jsx(Ne.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm py-0.5 overflow-x-hidden flex justify-center items-center py-2",children:f.jsx("p",{"data-testid":"empty-options",children:"Sin opciones"})})})]}),i.length>0&&l&&f.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${u}`,children:i})]})},Ds=({placeholder:e="",label:n="",htmlFor:t,name:r,handleChange:o,onClick:l=()=>{},value:i,valueSelect:s,isReadOnly:u=!1,isError:c=!1,helperText:m="",autocomplete:h="on",id:b,classNameLabel:p="",classNameContainer:v="",className:g="",onKeyDown:x,options:C,idSelect:y,isMarginLeft:T=!0,classNameSelect:N="w-20",type:I="text"})=>{const{width:P}=Tt(),R=Me({"ring-red-300 focus:ring-red-300 text-red-900":c,"focus:ring-indigo-600 text-gray-500":!c});return f.jsxs("div",{"data-testid":`container-input-${b}`,className:v,children:[n!==""&&f.jsx("label",{htmlFor:t,className:F("block text-sm font-medium leading-6",p!==""?p:"text-gray-700"),"data-testid":`label-${b}`,children:n}),f.jsxs("div",{className:"relative mt-1 rounded-md shadow-sm",children:[f.jsx("div",{className:"absolute inset-y-0 -top-0.5 flex items-center",style:{left:"2px"},children:f.jsx(ir,{name:y,onChange:Y=>o(Y),id:y,options:C,value:s,isReadOnly:u,className:N,height:P<=640?"28px":"32px",classNameInput:F(T&&"ml-3.5"),style:{paddingRight:0,boxShadow:"none"},isDisabledFocus:!0})}),f.jsx("input",{id:b,name:r,type:I,autoComplete:h,placeholder:e,readOnly:u,"data-testid":`input-${b}`,onClick:l,onKeyDown:x,onChange:Y=>o(Y),value:i,className:F("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",R,g!==""&&g)}),c&&f.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:f.jsx(er,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),m.length===0||!c?null:f.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${b}`,children:m})]})},Ls=({setValuesDefault:e,status:n=!1,isReadOnly:t=!1,handleClick:r,text:o=""})=>{const[l,i]=a.useState(!1);a.useEffect(()=>{i(n),e("status",n)},[n,e]);const s=()=>{i(!l),e("status",!l),r&&r()};return f.jsxs("div",{className:"flex",children:[f.jsxs(Ci,{checked:l,onChange:s,className:F("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",l?"bg-success-1":"bg-gray-200"),"data-testid":"switch",disabled:t,children:[f.jsx("span",{className:"sr-only",children:"Use setting"}),f.jsx("span",{"aria-hidden":"true",className:F("pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",l?"translate-x-full":"translate-x-0")})]}),o!==""?f.jsx("p",{className:"text-sm font-medium text-gray-500 ml-2 self-end",children:o}):f.jsx("p",{className:"text-sm font-medium text-gray-500 ml-2 self-end","data-testid":"text-switch",children:l?"Activo":"Inactivo"})]})};function _s({label:e="",id:n,htmlFor:t="",classNameLabel:r="",className:o="",rows:l=4,name:i,placeholder:s="",helperText:u="",isReadOnly:c=!1,isError:m=!1,onChange:h,value:b,idInput:p,nameInput:v,placeholderInput:g="",isReadOnlyInput:x=!1,valueInput:C,infoTop:y=null,infoBottom:T=null,classNameInfoTop:N="h-4",classNameInfoBottom:I="h-2",isInputTitle:P=!1,scrollHeightTest:R=!1,hiddenBorder:Y=!1}){const D=a.useRef(null),[M,B]=a.useState(0);a.useEffect(()=>{const{current:X}=D;X===null||R||B(X.scrollHeight)},[D,b,R]),a.useEffect(()=>{R&&B(800)},[R]);const K=Me({"ring-red-300 focus:ring-red-300 text-red-900":m,"focus:ring-indigo-600 text-gray-700":!m});return f.jsxs(f.Fragment,{children:[e!==""&&f.jsx("label",{htmlFor:t,className:F("leading-6 block text-sm",r!==""&&r),children:e}),f.jsxs("div",{className:"relative overflow-x-hidden",children:[y!==null&&f.jsx("div",{className:"absolute top-2 left-3 w-full",children:y}),f.jsxs("div",{className:F("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",K),children:[y!==null&&f.jsx("div",{className:"py-2","aria-hidden":"true",children:f.jsx("div",{className:"py-px",children:f.jsx("div",{className:N})})}),P&&f.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:C,onChange:h,rows:2,readOnly:x}),f.jsx("textarea",{style:{height:M>0?M:"auto"},placeholder:s,rows:l,name:i,id:n,className:F(P||Y?"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",K,o!==""&&o),readOnly:c,onChange:h,value:b,"data-testid":`textarea-${n}`,ref:D}),T!==null&&f.jsx("div",{className:"py-2","aria-hidden":"true",children:f.jsx("div",{className:"py-px",children:f.jsx("div",{className:I})})})]}),T!==null&&f.jsx("div",{className:"absolute bottom-2 left-3 w-full",children:T})]}),u.length>0&&m&&f.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${n}`,children:u})]})}const Rs=({className:e="",children:n,message:t=""})=>{const[r,o]=a.useState(!1),l=()=>{t!==""&&o(!0)},i=()=>{o(!1)};return f.jsx("div",{className:"relative",children:f.jsxs("div",{onMouseLeave:i.bind(null,r),"data-testid":"container-tooltip",children:[f.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:l.bind(null,r),onMouseLeave:i.bind(null,r),"data-testid":"open-tooltip",children:n}),f.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:f.jsx("div",{className:N("absolute z-20 px-4 mt-0 sm:px-0",e!==""&&e),children:f.jsx("div",{className:"bg-white p-2 text-center rounded-lg shadow-lg ring-1 ring-black ring-opacity-5",onMouseEnter:l.bind(null,r),onMouseLeave:i.bind(null,r),"data-testid":"message",children:t})})})]})})},Bs=({children:e,data:n,className:t="",classNameTooltip:r="w-full",classNameMenu:o="",classNameMenuItems:l="",classNameContainerSearch:i="px-5",isSelectMultiple:s=!1,optionsSelect:u,propObject:c="name",propId:m="id",textNewItem:h="",defaultId:b=null,loading:p=!1,search:v=null,searchPlaceHolder:g="Buscar...",valueSearch:x=void 0,idsOptionSelect:C=null,isComponent:y,hiddenMenu:T=!1,id:I,onClick:F=()=>{},isRelative:P=!0,isMaxWidth:R=!1,isTag:Y=!1,isClear:D=!1,clear:M=null,applyButton:B=null,applyButtonText:G="Aplicar",tagsParent:J=[],isReadOnly:ae,isDisabledApplyButton:w=!0,isOpenMenu:L=void 0})=>{const[k,Q]=a.useState(new Set),[U,ne]=a.useState(new Map);a.useEffect(()=>{C!==null&&Q(new Set(new Set(C)))},[C]),a.useEffect(()=>{if(J.length===0)return;const $=new Map;J.forEach(H=>$.set(H.id,H)),ne($)},[J]),a.useEffect(()=>{D&&(Q(new Set),ne(new Map),M&&M())},[M,D]);const fe=$=>{let H=new Map(U),ie=new Set(k),A=null;if(b!==null&&($[m]===b&&(A=crypto.randomUUID()),A!==null&&($[m]=A),A!==null&&($[c]=$[c].replace(h,"").trim())),ie.has($[m])?ie.delete($[m]):ie.add($[m]),H.has($[m])?H.delete($[m]):H.set($[m],$),!s){const q=Array.from(ie),W=Array.from(H);q.shift(),W.shift(),ie=ie.size===2?new Set(q):ie,H=H.size===2?new Map(W):H}u($,Array.from(ie),A!==null),Q(ie),ne(H)},ge=$=>{F($===!0?-1:I)},Se=$=>{const H=new Set(k),ie=new Map(U);H.delete($[m]),ie.delete($[m]),u($,Array.from(H)),Q(H),ne(ie)},be=()=>{if(k.size===0)return;const $=new Set(k),H=new Map(U);$.clear(),H.clear(),u(null,Array.from($)),Q($),ne(H)};function Ae($){if(typeof $!="string")return $;const H=$.toLowerCase();return H.charAt(0).toUpperCase()+H.slice(1)}return f.jsxs(pt,{as:"div",className:N("inline-block text-left",P&&"relative",o!==""&&o),onClick:()=>ge(!0),"data-testid":`menu-${I}`,id:I,children:[f.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:l.bind(null,r),onMouseLeave:i.bind(null,r),"data-testid":"open-tooltip",children:n}),f.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:f.jsx("div",{className:F("absolute z-20 px-4 mt-0 sm:px-0",e!==""&&e),children:f.jsx("div",{className:"bg-white p-2 text-center rounded-lg shadow-lg ring-1 ring-black ring-opacity-5",onMouseEnter:l.bind(null,r),onMouseLeave:i.bind(null,r),"data-testid":"message",children:t})})})]})})},Bs=({children:e,data:n,className:t="",classNameTooltip:r="w-full",classNameMenu:o="",classNameMenuItems:l="",classNameContainerSearch:i="px-5",isSelectMultiple:s=!1,optionsSelect:u,propObject:c="name",propId:m="id",textNewItem:h="",defaultId:b=null,loading:p=!1,search:v=null,searchPlaceHolder:g="Buscar...",valueSearch:x=void 0,idsOptionSelect:C=null,isComponent:y,hiddenMenu:T=!1,id:N,onClick:I=()=>{},isRelative:P=!0,isMaxWidth:R=!1,isTag:Y=!1,isClear:D=!1,clear:M=null,applyButton:B=null,applyButtonText:K="Aplicar",tagsParent:X=[],isReadOnly:ae,isDisabledApplyButton:w=!0,isOpenMenu:_=void 0})=>{const[$,U]=a.useState(new Set),[H,J]=a.useState(new Map);a.useEffect(()=>{C!==null&&U(new Set(new Set(C)))},[C]),a.useEffect(()=>{if(X.length===0)return;const k=new Map;X.forEach(V=>k.set(V.id,V)),J(k)},[X]),a.useEffect(()=>{D&&(U(new Set),J(new Map),M&&M())},[M,D]);const me=k=>{let V=new Map(H),ie=new Set($),A=null;if(b!==null&&(k[m]===b&&(A=crypto.randomUUID()),A!==null&&(k[m]=A),A!==null&&(k[c]=k[c].replace(h,"").trim())),ie.has(k[m])?ie.delete(k[m]):ie.add(k[m]),V.has(k[m])?V.delete(k[m]):V.set(k[m],k),!s){const Z=Array.from(ie),W=Array.from(V);Z.shift(),W.shift(),ie=ie.size===2?new Set(Z):ie,V=V.size===2?new Map(W):V}u(k,Array.from(ie),A!==null),U(ie),J(V)},pe=k=>{I(k===!0?-1:N)},Se=k=>{const V=new Set($),ie=new Map(H);V.delete(k[m]),ie.delete(k[m]),u(k,Array.from(V)),U(V),J(ie)},be=()=>{if($.size===0)return;const k=new Set($),V=new Map(H);k.clear(),V.clear(),u(null,Array.from(k)),U(k),J(V)};function Ae(k){if(typeof k!="string")return k;const V=k.toLowerCase();return V.charAt(0).toUpperCase()+V.slice(1)}return f.jsxs(ht,{as:"div",className:F("inline-block text-left",P&&"relative",o!==""&&o),onClick:()=>pe(!0),"data-testid":`menu-${N}`,id:N,children:[f.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
- `}),f.jsx(pt.Button,{as:"div",onClick:()=>ge(T),"data-testid":`menu-button-${I}`,children:e}),f.jsx("div",{className:N("absolute right-0 z-20",r,T&&"hidden",p&&"w-full"),children:f.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:L,children:f.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":l===""&&"w-max",l!==""&&l),children:p?f.jsx("div",{className:"flex justify-center py-4",children:f.jsx(wt,{})}):f.jsxs("div",{className:N(!y&&"pb-1",t!==""&&t,R&&"w-custom"),"data-testid":"dropdown-menu",children:[f.jsxs("div",{className:"sticky top-0 bg-white w-full",children:[B!==null&&f.jsxs("div",{className:N("pt-1.5 flex justify-between items-center",i),children:[f.jsx(ms,{className:N("w-5 h-5 text-gray-400",k.size>0?"opacity-1 cursor-pointer":"opacity-0"),onClick:be}),f.jsx(xt,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 font-medium px-5 py-1.5 rounded-md",outline:k.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:k.size===0&&w,onClick:()=>B({id:I,items:Array.from(U.values())}),children:G})]}),v!==null&&f.jsx("div",{className:N("py-2 w-full",i),children:f.jsx(nn,{htmlFor:"search",id:`dropdown-search-${I}`,name:"search",type:"text",placeholder:g,handleChange:$=>v($,I),icon:g!==""&&f.jsx(ss,{className:"w-4 h-4 text-indigo-300"}),className:"pl-5 pr-4 h-8",classNameContainerInput:"w-full",value:x,onKeyDown:$=>$.key===" "&&$.stopPropagation()})})]}),Y&&!ae&&f.jsx("div",{className:"flex flex-wrap ml-7 pt-1",children:Array.from(U).map(($,H)=>f.jsx("div",{className:"mr-1",children:f.jsxs("span",{className:"inline-flex items-center gap-x-0.5 rounded-md bg-gray-100 px-2 py-1 text-xs font-medium text-gray-600 mb-1",children:[$[1][c],f.jsx("button",{type:"button",className:"p-0.5 rounded-sm bg-gray-100 hover:bg-gray-300",onClick:()=>Se($[1]),"data-testid":`tag-${$[0]}`,children:f.jsx(gs,{className:"h-2.5 w-2.5 stroke-gray-700/50 group-hover:stroke-gray-700/75"})})]})},$))}),f.jsx("div",{className:"divide-y divide-gray-100",children:(ae?[]:n).map(($,H)=>f.jsx("div",{className:N(!y&&"py-1"),children:y?f.jsx("div",{onClick:ie=>{ie.preventDefault(),u()},"data-testid":`item-component-${H}`,children:$}):f.jsx(pt.Item,{children:f.jsx("span",{className:N(k.has($[m])&&"blue text-white",!k.has($[m])&&"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-${H}`,onClick:ie=>{ie.preventDefault(),fe($)},children:Ae($[c])})})},H))})]})})})})]})},sr=50,zs=({total:e,handleNext:n,handlePrev:t,handleSelectPage:r,page:o=null})=>{const[l,i]=a.useState(1),[s,u]=a.useState([]),[c,m]=a.useState([]),h=Math.ceil(e/sr);a.useEffect(()=>{const g=[];for(let x=1;x<=h;x++)g.push(x);m(g)},[h]),a.useEffect(()=>{let g=[];const x="...",C="... ",y=" ...";if(c.length<6)g=c;else if(l>=1&&l<=3)g=[1,2,3,4,x,c.length];else if(l===4)g=[...c.slice(0,5),x,c.length];else if(l>4&&l<c.length-2){const T=c.slice(l-2,l),I=c.slice(l,l+1);g=[1,C,...T,...I,y,c.length]}else if(l>c.length-3){const T=c.slice(c.length-4);g=[1,C,...T]}u(g)},[l,c]),a.useEffect(()=>{o!==null&&o!==l&&i(o)},[o,l]);const b=g=>{i(g),r(g)},p=()=>{i(l===1?l:l-1),l>1&&t(l-1)},v=()=>{l===c.length?i(l):i(l+1),l<c.length&&n(l+1)};return f.jsxs("nav",{className:"flex items-center justify-between border-t border-gray-200 px-4 sm:px-0",children:[f.jsx("div",{className:"-mt-px flex w-0 flex-1",children:f.jsxs("span",{className:"inline-flex items-center border-t-2 border-transparent pr-1 pt-4 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700 cursor-pointer",onClick:p,"data-testid":"prev",children:[f.jsx(zi,{className:"mr-3 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Anterior"]})}),f.jsx("div",{className:"hidden md:-mt-px md:flex",children:s.map((g,x)=>f.jsx(or,{className:N("inline-flex items-center border-t-2 px-4 pt-4 text-sm font-medium",l===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))}),f.jsx("div",{className:"-mt-px flex w-0 flex-1 justify-end",children:f.jsxs("span",{className:"inline-flex items-center border-t-2 border-transparent pl-1 pt-4 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700 cursor-pointer",onClick:v,"data-testid":"next",children:["Siguiente",f.jsx(Ui,{className:"ml-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]})})]})},Ws=({setForm:e,setValuesDefault:n,className:t="",classNameContainer:r="",classNameContainerImg:o="",src:l=null,alt:i=null,width:s,height:u})=>{const c=m=>{const{files:h}=m.target,[b]=h,p=new FileReader;p.readAsDataURL(b),p.onload=function(){e(v=>({...v,photo:p.result})),n("photo",p.result)}};return f.jsxs("div",{className:N("col-span-full",r!==""&&r),children:[f.jsx("label",{htmlFor:"cover-photo",className:"block text-sm font-medium leading-6 text-gray-500",children:"Logo (Opcional)"}),f.jsxs("div",{className:N("mt-2 flex justify-center rounded-lg border-2 border-dotted border-gray-300 cursor-pointer relative",l===null&&"px-9 pt-6 pb-2.5",o!==""&&o),children:[l?f.jsx("img",{src:l,alt:i,width:s,height:u,className:N(t!==""&&t),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s",objectFit:"cover",height:u},onLoad:m=>m.currentTarget.style.filter="none","data-testid":"img"}):f.jsxs("div",{className:"text-center",children:[f.jsx(ds,{"aria-hidden":"true",className:"mx-auto h-12 w-12 text-gray-300"}),f.jsxs("div",{className:"mt-4 flex text-sm leading-6 text-gray-600",children:[f.jsx("label",{htmlFor:"file-upload",className:"relative cursor-pointer rounded-md bg-white font-semibold text-indigo-600 focus-within:outline-none focus-within:ring-2 focus-within:ring-indigo-600 focus-within:ring-offset-2 hover:text-indigo-500",children:f.jsx("span",{children:"Upload a file"})}),f.jsx("p",{className:"pl-1",children:"or drag and drop"})]}),f.jsx("p",{className:"text-xs leading-5 text-gray-600",children:"PNG, JPG, GIF up to 10MB"})]}),f.jsx("input",{id:"file-upload",name:"file-upload",type:"file",className:"absolute w-full h-full opacity-0 cursor-pointer",onChange:c})]})]})},Us=({openDefault:e=!1,setForm:n,setValuesDefault:t,title:r,type:o,data:l,dataSelect:i,setData:s,Component:u,id:c,defaultData:m,dispatch:h,isAdd:b=!0,search:p=null,isPadding:v=!0,isReadOnly:g=!1,isEdit:x=!1,deleteItem:C=null,validateAdd:y=null})=>{const[T,I]=a.useState(!1),[F,P]=a.useState(!1),[R,Y]=a.useState(!1),[D,M]=a.useState("");a.useEffect(()=>{I(e),P(x),Y(g)},[e,x,g]);const B=({e:w,index:L})=>{const k=Ct(l),{name:Q,value:U}=w.target;!(y===null?!1:y({value:U,copyData:k,index:L}))&&(k[L][Q]=U),s(k),t(c,k),n(fe=>({...fe,[c]:k}))},G=()=>{if(l.some(L=>Object.values(L).some(U=>U.value===-1))||l.length===0)return h({type:"ALERT",payload:{title:"",message:"Todos los campos son requeridos",typeAlert:"warning",active:!0}});n(L=>({...L,data:l})),t(c,l),s([...l,m])},J=({index:w,item:L})=>{if(w===l.length-1)return;const k=Ct(l);k.splice(w,1),n(Q=>({...Q,copyData:k})),t(c,k),s(k),C&&C({index:w,item:L,data:k})},ae=()=>{P(!F),Y(!1)};return f.jsxs("div",{className:"divide-y divide-gray-200 rounded-lg bg-white shadow mt-7",children:[f.jsxs("div",{className:"px-4 py-3.5 sm:px-6 flex justify-between items-center cursor-pointer",onClick:()=>I(!T),"data-testid":`open-accordion-${c}`,children:[f.jsx("p",{className:"text-gray-500 uppercase text-xs font-bold",children:r}),f.jsxs("div",{className:"flex items-center",children:[p&&f.jsx(nn,{htmlFor:"search",id:"search",name:"search",type:"text",autoComplete:"search",placeholder:"Buscar...",handleChange:w=>{p(w),M(w.target.value)},icon:f.jsx(Ns,{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:D,onClick:w=>w.stopPropagation(),onFocus:()=>I(!0)}),T?f.jsx(js,{className:"w-5 h-5 text-default-5"}):f.jsx(Ts,{className:"w-5 h-5 text-default-5"})]})]}),f.jsx(Re,{as:a.Fragment,show:T,enter:"transition duration-[400ms]",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-200 transition ease-in-out",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:f.jsxs("div",{className:N("sm:mt-2.5 py-3.5 relative",v&&"px-4 sm:p-6"),children:[F&&f.jsx(us,{className:"w-5 h-5 text-gray-400 cursor-pointer absolute right-4",onClick:ae,"data-testid":`edit-role-${c}`}),l.map((w,L)=>f.jsxs("div",{className:N("flex flex-col 3xs:flex-row mb-4",v&&"ml-0 3xs:ml-3"),children:[f.jsx(u,{item:w,index:L,handleChange:B,readOnly:R,dataSelect:i}),b&&!R&&f.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",L===l.length-1&&"3xs:opacity-0"),children:f.jsx($s,{className:N("w-6 h-4",L!==l.length-1&&"cursor-pointer"),style:{color:"#637381"},strokeWidth:2.5,onClick:()=>J({index:L,item:w}),"data-testid":`delete-item-${L}-${c}`})})]},L)),b&&!R&&f.jsx("p",{className:"text-secondary-2 text-sm font-medium ml-3 cursor-pointer",onClick:G,"data-testid":`add-item-${c}`,children:`+ Añadir ${o}`})]})})]})};z.Accordion=Us,z.Alert=rs,z.Avatar=bs,z.Bullets=xs,z.ButtonOutline=rr,z.ButtonPagination=or,z.ButtonSolid=xt,z.Checkbox=ys,z.ConfirmationAbandoningCreation=ks,z.CoverPhoto=Ws,z.Divider=Ps,z.Dropdown=Bs,z.GoBack=Ms,z.Input=nn,z.InputDropdown=Ds,z.MESSAGE_ABORT_CONTROLLER=Cr,z.MESSAGE_SIGNAL_ABORTED_WITHOUT_REASON=Tr,z.Modal=lr,z.Pagination=zs,z.Select=ir,z.Spinner=As,z.SpinnerIcon=wt,z.Switch=Ls,z.Textarea=_s,z.Tooltip=Rs,z.classNames=N,z.copyOptions=Ct,z.generateAvatarInitials=Er,z.isPromise=Sr,z.rowsPerPage=sr,z.useCloseModal=Or,z.useForm=jr,z.useMediaQuery=Ir,z.useWindowDimensions=Tt,z.validateEmail=cn,Object.defineProperty(z,Symbol.toStringTag,{value:"Module"})});
58
+ `}),f.jsx(ht.Button,{as:"div",onClick:()=>pe(T),"data-testid":`menu-button-${N}`,children:e}),f.jsx("div",{className:F("absolute right-0 z-20",r,T&&"hidden",p&&"w-full"),children:f.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:_,children:f.jsx(ht.Items,{className:F("mt-1 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",p?"w-full":l===""&&"w-max",l!==""&&l),children:p?f.jsx("div",{className:"flex justify-center py-4",children:f.jsx(ot,{})}):f.jsxs("div",{className:F(!y&&"pb-1",t!==""&&t,R&&"w-custom"),"data-testid":"dropdown-menu",children:[f.jsxs("div",{className:"sticky top-0 bg-white w-full",children:[B!==null&&f.jsxs("div",{className:F("pt-1.5 flex justify-between items-center",i),children:[f.jsx(ms,{className:F("w-5 h-5 text-gray-400",$.size>0?"opacity-1 cursor-pointer":"opacity-0"),onClick:be}),f.jsx(wt,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 font-medium px-5 py-1.5 rounded-md",outline:$.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:$.size===0&&w,onClick:()=>B({id:N,items:Array.from(H.values())}),children:K})]}),v!==null&&f.jsx("div",{className:F("py-2 w-full",i),children:f.jsx(nn,{htmlFor:"search",id:`dropdown-search-${N}`,name:"search",type:"text",placeholder:g,handleChange:k=>v(k,N),icon:g!==""&&f.jsx(ss,{className:"w-4 h-4 text-indigo-300"}),className:"pl-5 pr-4 h-8",classNameContainerInput:"w-full",value:x,onKeyDown:k=>k.key===" "&&k.stopPropagation()})})]}),Y&&!ae&&f.jsx("div",{className:"flex flex-wrap ml-7 pt-1",children:Array.from(H).map((k,V)=>f.jsx("div",{className:"mr-1",children:f.jsxs("span",{className:"inline-flex items-center gap-x-0.5 rounded-md bg-gray-100 px-2 py-1 text-xs font-medium text-gray-600 mb-1",children:[k[1][c],f.jsx("button",{type:"button",className:"p-0.5 rounded-sm bg-gray-100 hover:bg-gray-300",onClick:()=>Se(k[1]),"data-testid":`tag-${k[0]}`,children:f.jsx(gs,{className:"h-2.5 w-2.5 stroke-gray-700/50 group-hover:stroke-gray-700/75"})})]})},k))}),f.jsx("div",{className:"divide-y divide-gray-100",children:(ae?[]:n).map((k,V)=>f.jsx("div",{className:F(!y&&"py-1"),children:y?f.jsx("div",{onClick:ie=>{ie.preventDefault(),u()},"data-testid":`item-component-${V}`,children:k}):f.jsx(ht.Item,{children:f.jsx("span",{className:F($.has(k[m])&&"blue text-white",!$.has(k[m])&&"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-${V}`,onClick:ie=>{ie.preventDefault(),me(k)},children:Ae(k[c])})})},V))})]})})})})]})},sr=50,zs=({total:e,handleNext:n,handlePrev:t,handleSelectPage:r,page:o=null})=>{const[l,i]=a.useState(1),[s,u]=a.useState([]),[c,m]=a.useState([]),h=Math.ceil(e/sr);a.useEffect(()=>{const g=[];for(let x=1;x<=h;x++)g.push(x);m(g)},[h]),a.useEffect(()=>{let g=[];const x="...",C="... ",y=" ...";if(c.length<6)g=c;else if(l>=1&&l<=3)g=[1,2,3,4,x,c.length];else if(l===4)g=[...c.slice(0,5),x,c.length];else if(l>4&&l<c.length-2){const T=c.slice(l-2,l),N=c.slice(l,l+1);g=[1,C,...T,...N,y,c.length]}else if(l>c.length-3){const T=c.slice(c.length-4);g=[1,C,...T]}u(g)},[l,c]),a.useEffect(()=>{o!==null&&o!==l&&i(o)},[o,l]);const b=g=>{i(g),r(g)},p=()=>{i(l===1?l:l-1),l>1&&t(l-1)},v=()=>{l===c.length?i(l):i(l+1),l<c.length&&n(l+1)};return f.jsxs("nav",{className:"flex items-center justify-between border-t border-gray-200 px-4 sm:px-0",children:[f.jsx("div",{className:"-mt-px flex w-0 flex-1",children:f.jsxs("span",{className:"inline-flex items-center border-t-2 border-transparent pr-1 pt-4 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700 cursor-pointer",onClick:p,"data-testid":"prev",children:[f.jsx(zi,{className:"mr-3 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Anterior"]})}),f.jsx("div",{className:"hidden md:-mt-px md:flex",children:s.map((g,x)=>f.jsx(or,{className:F("inline-flex items-center border-t-2 px-4 pt-4 text-sm font-medium",l===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))}),f.jsx("div",{className:"-mt-px flex w-0 flex-1 justify-end",children:f.jsxs("span",{className:"inline-flex items-center border-t-2 border-transparent pl-1 pt-4 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700 cursor-pointer",onClick:v,"data-testid":"next",children:["Siguiente",f.jsx(Ui,{className:"ml-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]})})]})},Ws=({setForm:e,setValuesDefault:n,className:t="",classNameContainer:r="",classNameContainerImg:o="",src:l=null,alt:i=null,width:s,height:u})=>{const c=m=>{const{files:h}=m.target,[b]=h,p=new FileReader;p.readAsDataURL(b),p.onload=function(){e(v=>({...v,photo:p.result})),n("photo",p.result)}};return f.jsxs("div",{className:F("col-span-full",r!==""&&r),children:[f.jsx("label",{htmlFor:"cover-photo",className:"block text-sm font-medium leading-6 text-gray-500",children:"Logo (Opcional)"}),f.jsxs("div",{className:F("mt-2 flex justify-center rounded-lg border-2 border-dotted border-gray-300 cursor-pointer relative",l===null&&"px-9 pt-6 pb-2.5",o!==""&&o),children:[l?f.jsx("img",{src:l,alt:i,width:s,height:u,className:F(t!==""&&t),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s",objectFit:"cover",height:u},onLoad:m=>m.currentTarget.style.filter="none","data-testid":"img"}):f.jsxs("div",{className:"text-center",children:[f.jsx(ds,{"aria-hidden":"true",className:"mx-auto h-12 w-12 text-gray-300"}),f.jsxs("div",{className:"mt-4 flex text-sm leading-6 text-gray-600",children:[f.jsx("label",{htmlFor:"file-upload",className:"relative cursor-pointer rounded-md bg-white font-semibold text-indigo-600 focus-within:outline-none focus-within:ring-2 focus-within:ring-indigo-600 focus-within:ring-offset-2 hover:text-indigo-500",children:f.jsx("span",{children:"Upload a file"})}),f.jsx("p",{className:"pl-1",children:"or drag and drop"})]}),f.jsx("p",{className:"text-xs leading-5 text-gray-600",children:"PNG, JPG, GIF up to 10MB"})]}),f.jsx("input",{id:"file-upload",name:"file-upload",type:"file",className:"absolute w-full h-full opacity-0 cursor-pointer",onChange:c})]})]})},Us=({openDefault:e=!1,setForm:n,setValuesDefault:t,title:r,type:o,data:l,dataSelect:i,setData:s,Component:u,id:c,defaultData:m,dispatch:h,isAdd:b=!0,search:p=null,isPadding:v=!0,isReadOnly:g=!1,isEdit:x=!1,deleteItem:C=null,validateAdd:y=null,loading:T=!1})=>{const[N,I]=a.useState(!1),[P,R]=a.useState(!1),[Y,D]=a.useState(!1),[M,B]=a.useState("");a.useEffect(()=>{I(e),R(x),D(g)},[e,x,g]);const K=({e:_,index:$})=>{const U=Ct(l),{name:H,value:J}=_.target;!(y===null?!1:y({value:J,copyData:U,index:$}))&&(U[$][H]=J),s(U),t(c,U),n(pe=>({...pe,[c]:U}))},X=()=>{if(l.some($=>Object.values($).some(J=>J.value===-1))||l.length===0)return h({type:"ALERT",payload:{title:"",message:"Todos los campos son requeridos",typeAlert:"warning",active:!0}});n($=>({...$,data:l})),t(c,l),s([...l,m])},ae=({index:_,item:$})=>{if(_===l.length-1)return;const U=Ct(l);U.splice(_,1),n(H=>({...H,copyData:U})),t(c,U),s(U),C&&C({index:_,item:$,data:U})},w=()=>{R(!P),D(!1)};return f.jsxs("div",{className:"divide-y divide-gray-200 rounded-lg bg-white shadow mt-7",children:[f.jsxs("div",{className:"px-4 py-3.5 sm:px-6 flex justify-between items-center cursor-pointer",onClick:()=>I(!N),"data-testid":`open-accordion-${c}`,children:[f.jsx("p",{className:"text-gray-500 uppercase text-xs font-bold",children:r}),f.jsxs("div",{className:"flex items-center",children:[p&&f.jsx(nn,{htmlFor:"search",id:"search",name:"search",type:"text",autoComplete:"search",placeholder:"Buscar...",handleChange:_=>{p(_),B(_.target.value)},icon:f.jsx(Is,{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:M,onClick:_=>_.stopPropagation(),onFocus:()=>I(!0)}),N?f.jsx(js,{className:"w-5 h-5 text-default-5"}):f.jsx(Ts,{className:"w-5 h-5 text-default-5"})]})]}),f.jsx(Re,{as:a.Fragment,show:N,enter:"transition duration-[400ms]",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-200 transition ease-in-out",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:f.jsxs("div",{className:F("sm:mt-2.5 py-3.5 relative",v&&"px-4 sm:p-6"),children:[P&&f.jsx(us,{className:"w-5 h-5 text-gray-400 cursor-pointer absolute right-4",onClick:w,"data-testid":`edit-role-${c}`}),T?f.jsx("div",{className:"flex justify-center mt-5",children:f.jsx(ot,{})}):l.map((_,$)=>f.jsxs("div",{className:F("flex flex-col 3xs:flex-row mb-4",v&&"ml-0 3xs:ml-3"),children:[f.jsx(u,{item:_,index:$,handleChange:K,readOnly:Y,dataSelect:i}),b&&!Y&&f.jsx("div",{style:{backgroundColor:"#B0B8BF",width:"25px",height:"25px"},className:F("rounded-full flex justify-center items-center mt-4 3xs:mt-7 ml-2 3xs:ml-5 self-start 3xs:self-center",$===l.length-1&&"3xs:opacity-0"),children:f.jsx($s,{className:F("w-6 h-4",$!==l.length-1&&"cursor-pointer"),style:{color:"#637381"},strokeWidth:2.5,onClick:()=>ae({index:$,item:_}),"data-testid":`delete-item-${$}-${c}`})})]},$)),b&&!Y&&f.jsx("p",{className:"text-secondary-2 text-sm font-medium ml-3 cursor-pointer",onClick:X,"data-testid":`add-item-${c}`,children:`+ Añadir ${o}`})]})})]})};z.Accordion=Us,z.Alert=rs,z.Avatar=bs,z.Bullets=xs,z.ButtonOutline=rr,z.ButtonPagination=or,z.ButtonSolid=wt,z.Checkbox=ys,z.ConfirmationAbandoningCreation=ks,z.CoverPhoto=Ws,z.Divider=Ps,z.Dropdown=Bs,z.GoBack=Ms,z.Input=nn,z.InputDropdown=Ds,z.MESSAGE_ABORT_CONTROLLER=Cr,z.MESSAGE_SIGNAL_ABORTED_WITHOUT_REASON=Tr,z.Modal=lr,z.Pagination=zs,z.Select=ir,z.Spinner=As,z.SpinnerIcon=ot,z.Switch=Ls,z.Textarea=_s,z.Tooltip=Rs,z.classNames=F,z.copyOptions=Ct,z.generateAvatarInitials=Er,z.isPromise=Sr,z.rowsPerPage=sr,z.useCloseModal=Or,z.useForm=jr,z.useMediaQuery=Nr,z.useWindowDimensions=Tt,z.validateEmail=cn,Object.defineProperty(z,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cemtrik-dependencies",
3
- "version": "1.0.80",
3
+ "version": "1.0.81",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "dev": "vite",