cemtrik-dependencies 1.0.204 → 1.0.205

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 +11 -11
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(Se,g){typeof exports=="object"&&typeof module<"u"?g(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],g):(Se=typeof globalThis<"u"?globalThis:Se||self,g(Se.MyApp={},Se.React,Se.ReactDOM))})(this,function(Se,g,Sr){"use strict";function ts(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return o.default=e,Object.freeze(o)}const Z=ts(g),eo=(e,o=!1)=>{function r(u){if(typeof u!="object"||u===null)return u;const f=Array.isArray(u)?[]:{};for(const a in u)u.hasOwnProperty(a)&&!o&&(f[a]=r(u[a]));return f}return e.map(u=>r(u))},pi=e=>/^(?:[^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*|"[^\n"]+")@(?:[^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,63}$/i.test(e);function ae(...e){return e.filter(Boolean).join(" ")}const ns=e=>{const o=e.split(" ");let r=e.slice(0,2);return o.length>1&&(r=`${e.at(0)}${o[o.length-1].slice(0,1)}`),r};function rs({items:e,key:o}){const r=e.reduce((n,u)=>(n[u[o]]||(n[u[o]]=[]),n[u[o]].push(u),n),{});return Object.values(r).sort((n,u)=>{const f=n[0][o],a=u[0][o];return f===""&&a!==""?1:a===""&&f!==""?-1:String(f).localeCompare(String(a))})}const os=e=>typeof e!="string"&&Promise.resolve(e)instanceof Promise,is="The user aborted a request.",ls="signal is aborted without reason",mi=({id:e,close:o})=>{g.useEffect(()=>{const r=n=>{const u=document.getElementById(e);u&&(u.contains(n.target)||o())};return document.addEventListener("click",r,!0),()=>{document.removeEventListener("click",r,!0)}},[e,o])},ss=()=>{const e=g.useRef({}),[o,r]=g.useState({}),[n,u]=g.useState({}),[f,a]=g.useState([]);g.useEffect(()=>{e.current={}},[]);const m=P=>C=>{C.preventDefault(),C.stopPropagation(),P(o)},v=(P,C,M)=>{const{checked:R,value:L,name:B,type:_,id:z}=P.target,X={radio:z,checkbox:R};e.current={...M,...e.current,[B]:X[_]??L},r({...e.current,[B]:X[_]??L}),C({...e.current,[B]:X[_]??L})},x=g.useCallback((P,C)=>{e.current={...e.current,[P]:C},r(M=>({...M,[P]:C}))},[]),E=g.useCallback((P,C)=>{const M=C.filter(R=>P[R]===""||P[R]===void 0);return M.forEach(R=>u(L=>({...L,[R]:"Este campo es requerido"}))),a(M),M.length>0},[]);return{handleSubmit:m,handleChange:v,setValuesDefault:x,validateFields:E,errors:f,model:o,handleError:(P,C)=>{C.forEach(M=>u(R=>({...R,[M]:P}))),a(C)},messageError:n,setModel:r}},as=e=>{const[o,r]=g.useState(!0),[n,u]=g.useState(!1),f=g.useCallback((a,m)=>{const v=e.match(/[0-9]+/g);if(v===null)return;const[x]=v;m=Math.min(window.innerWidth,window.outerWidth);const E=a?m>=Number(x):m<=Number(x);u(E)},[e]);return g.useEffect(()=>{const a=/\(min-width:\s?[0-9]+px\)/gi.test(e),m=/\(max-width:\s?[0-9]+px\)/gi.test(e);if(!a&&!m&&r(!1),!a&&!m)return;const v=Math.min(window.innerWidth,window.outerWidth);f(a,v)},[e,f]),g.useEffect(()=>{if(!o)return;const a=Math.min(window.innerWidth,window.outerWidth);function m(){const v=/min-width/gi.test(e);f(v,a)}return window.addEventListener("resize",m),()=>window.removeEventListener("resize",m)},[o,e,f]),n},hi=()=>{const[e,o]=g.useState({width:0,height:0});return g.useEffect(()=>{const r=()=>{const n=Math.min(window.innerWidth,window.outerWidth),u=Math.min(window.innerHeight,window.outerHeight);o({width:n,height:u})};return requestAnimationFrame(()=>r()),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[]),e};var us=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function cs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var to={exports:{}},_n={};/**
1
+ (function(Se,g){typeof exports=="object"&&typeof module<"u"?g(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],g):(Se=typeof globalThis<"u"?globalThis:Se||self,g(Se.MyApp={},Se.React,Se.ReactDOM))})(this,function(Se,g,Sr){"use strict";function ts(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return o.default=e,Object.freeze(o)}const Z=ts(g),eo=(e,o=!1)=>{function r(u){if(typeof u!="object"||u===null)return u;const f=Array.isArray(u)?[]:{};for(const a in u)u.hasOwnProperty(a)&&!o&&(f[a]=r(u[a]));return f}return e.map(u=>r(u))},pi=e=>/^(?:[^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*|"[^\n"]+")@(?:[^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,63}$/i.test(e);function se(...e){return e.filter(Boolean).join(" ")}const ns=e=>{const o=e.split(" ");let r=e.slice(0,2);return o.length>1&&(r=`${e.at(0)}${o[o.length-1].slice(0,1)}`),r};function rs({items:e,key:o}){const r=e.reduce((n,u)=>(n[u[o]]||(n[u[o]]=[]),n[u[o]].push(u),n),{});return Object.values(r).sort((n,u)=>{const f=n[0][o],a=u[0][o];return f===""&&a!==""?1:a===""&&f!==""?-1:String(f).localeCompare(String(a))})}const os=e=>typeof e!="string"&&Promise.resolve(e)instanceof Promise,is="The user aborted a request.",ls="signal is aborted without reason",mi=({id:e,close:o})=>{g.useEffect(()=>{const r=n=>{const u=document.getElementById(e);u&&(u.contains(n.target)||o())};return document.addEventListener("click",r,!0),()=>{document.removeEventListener("click",r,!0)}},[e,o])},ss=()=>{const e=g.useRef({}),[o,r]=g.useState({}),[n,u]=g.useState({}),[f,a]=g.useState([]);g.useEffect(()=>{e.current={}},[]);const m=P=>C=>{C.preventDefault(),C.stopPropagation(),P(o)},v=(P,C,M)=>{const{checked:R,value:L,name:B,type:_,id:z}=P.target,X={radio:z,checkbox:R};e.current={...M,...e.current,[B]:X[_]??L},r({...e.current,[B]:X[_]??L}),C({...e.current,[B]:X[_]??L})},x=g.useCallback((P,C)=>{e.current={...e.current,[P]:C},r(M=>({...M,[P]:C}))},[]),E=g.useCallback((P,C)=>{const M=C.filter(R=>P[R]===""||P[R]===void 0);return M.forEach(R=>u(L=>({...L,[R]:"Este campo es requerido"}))),a(M),M.length>0},[]);return{handleSubmit:m,handleChange:v,setValuesDefault:x,validateFields:E,errors:f,model:o,handleError:(P,C)=>{C.forEach(M=>u(R=>({...R,[M]:P}))),a(C)},messageError:n,setModel:r}},as=e=>{const[o,r]=g.useState(!0),[n,u]=g.useState(!1),f=g.useCallback((a,m)=>{const v=e.match(/[0-9]+/g);if(v===null)return;const[x]=v;m=Math.min(window.innerWidth,window.outerWidth);const E=a?m>=Number(x):m<=Number(x);u(E)},[e]);return g.useEffect(()=>{const a=/\(min-width:\s?[0-9]+px\)/gi.test(e),m=/\(max-width:\s?[0-9]+px\)/gi.test(e);if(!a&&!m&&r(!1),!a&&!m)return;const v=Math.min(window.innerWidth,window.outerWidth);f(a,v)},[e,f]),g.useEffect(()=>{if(!o)return;const a=Math.min(window.innerWidth,window.outerWidth);function m(){const v=/min-width/gi.test(e);f(v,a)}return window.addEventListener("resize",m),()=>window.removeEventListener("resize",m)},[o,e,f]),n},hi=()=>{const[e,o]=g.useState({width:0,height:0});return g.useEffect(()=>{const r=()=>{const n=Math.min(window.innerWidth,window.outerWidth),u=Math.min(window.innerHeight,window.outerHeight);o({width:n,height:u})};return requestAnimationFrame(()=>r()),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[]),e};var us=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function cs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var to={exports:{}},_n={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -28,11 +28,11 @@ Check the top-level render call using <`+Q+">.")}return H}}function Ln(j,H){{if(
28
28
  color: hsl(${Math.max(0,Math.min(120-120*R,120))}deg 100% 31%);`,r==null?void 0:r.key)}return(v=r==null?void 0:r.onChange)==null||v.call(r,u),u}}function no(e,o){if(e===void 0)throw new Error("Unexpected undefined");return e}const ps=(e,o)=>Math.abs(e-o)<1,ms=(e,o,r)=>{let n;return function(...u){e.clearTimeout(n),n=e.setTimeout(()=>o.apply(this,u),r)}},hs=e=>e,vs=e=>{const o=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let u=o;u<=r;u++)n.push(u);return n},gs=(e,o)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;const u=a=>{const{width:m,height:v}=a;o({width:Math.round(m),height:Math.round(v)})};if(u(r.getBoundingClientRect()),!n.ResizeObserver)return()=>{};const f=new n.ResizeObserver(a=>{const m=a[0];if(m!=null&&m.borderBoxSize){const v=m.borderBoxSize[0];if(v){u({width:v.inlineSize,height:v.blockSize});return}}u(r.getBoundingClientRect())});return f.observe(r,{box:"border-box"}),()=>{f.unobserve(r)}},bi={passive:!0},bs=typeof window>"u"?!0:"onscrollend"in window,xs=(e,o)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;let u=0;const f=bs?()=>{}:ms(n,()=>{o(u,!1)},e.options.isScrollingResetDelay),a=x=>()=>{u=r[e.options.horizontal?"scrollLeft":"scrollTop"],f(),o(u,x)},m=a(!0),v=a(!1);return v(),r.addEventListener("scroll",m,bi),r.addEventListener("scrollend",v,bi),()=>{r.removeEventListener("scroll",m),r.removeEventListener("scrollend",v)}},ys=(e,o,r)=>{if(o!=null&&o.borderBoxSize){const n=o.borderBoxSize[0];if(n)return Math.round(n[r.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[r.options.horizontal?"width":"height"])},ws=(e,{adjustments:o=0,behavior:r},n)=>{var u,f;const a=e+o;(f=(u=n.scrollElement)==null?void 0:u.scrollTo)==null||f.call(u,{[n.options.horizontal?"left":"top"]:a,behavior:r})};class Es{constructor(o){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 r=null;const n=()=>r||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:r=new this.targetWindow.ResizeObserver(u=>{u.forEach(f=>{this._measureElement(f.target,f)})}));return{disconnect:()=>{var u;return(u=n())==null?void 0:u.disconnect()},observe:u=>{var f;return(f=n())==null?void 0:f.observe(u,{box:"border-box"})},unobserve:u=>{var f;return(f=n())==null?void 0:f.unobserve(u)}}})(),this.range=null,this.setOptions=r=>{Object.entries(r).forEach(([n,u])=>{typeof u>"u"&&delete r[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:hs,rangeExtractor:vs,onChange:()=>{},measureElement:ys,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...r}},this.notify=(r,n)=>{var u,f;const{startIndex:a,endIndex:m}=this.range??{startIndex:void 0,endIndex:void 0},v=this.calculateRange();(r||a!==(v==null?void 0:v.startIndex)||m!==(v==null?void 0:v.endIndex))&&((f=(u=this.options).onChange)==null||f.call(u,this,n))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(r=>r()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var r;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.notify(!1,!1);return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((r=this.scrollElement)==null?void 0:r.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,u=>{this.scrollRect=u,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(u,f)=>{this.scrollAdjustments=0,this.scrollDirection=f?this.getScrollOffset()<u?"forward":"backward":null,this.scrollOffset=u;const a=this.isScrolling;this.isScrolling=f,this.notify(a!==f,f)}))}},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=(r,n)=>{const u=new Map,f=new Map;for(let a=n-1;a>=0;a--){const m=r[a];if(u.has(m.lane))continue;const v=f.get(m.lane);if(v==null||m.end>v.end?f.set(m.lane,m):m.end<v.end&&u.set(m.lane,!0),u.size===this.options.lanes)break}return f.size===this.options.lanes?Array.from(f.values()).sort((a,m)=>a.end===m.end?a.index-m.index:a.end-m.end)[0]:void 0},this.getMeasurementOptions=zn(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(r,n,u,f,a)=>(this.pendingMeasuredCacheIndexes=[],{count:r,paddingStart:n,scrollMargin:u,getItemKey:f,enabled:a}),{key:!1}),this.getMeasurements=zn(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:r,paddingStart:n,scrollMargin:u,getItemKey:f,enabled:a},m)=>{var v;if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(k=>{this.itemSizeCache.set(k.key,k.size)}));const x=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const E=this.measurementsCache.slice(0,x);for(let k=x;k<r;k++){let P=(v=this.measurementsCache[k])==null?void 0:v.measureElement;P||(P=X=>{const ee=f(k),ue=this.elementsCache.get(ee);if(!X){ue&&(this.observer.unobserve(ue),this.elementsCache.delete(ee));return}ue!==X&&(ue&&this.observer.unobserve(ue),this.observer.observe(X),this.elementsCache.set(ee,X)),X.isConnected&&this.resizeItem(k,this.options.measureElement(X,void 0,this))});const C=f(k),M=this.options.lanes===1?E[k-1]:this.getFurthestMeasurement(E,k),R=M?M.end+this.options.gap:n+u,L=m.get(C),B=typeof L=="number"?L:this.options.estimateSize(k),_=R+B,z=M?M.lane:k%this.options.lanes;E[k]={index:k,start:R,size:B,end:_,key:C,lane:z,measureElement:P}}return this.measurementsCache=E,E},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=zn(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(r,n,u)=>this.range=r.length>0&&n>0?Ss({measurements:r,outerSize:n,scrollOffset:u}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=zn(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(r,n,u,f)=>n===null?[]:r({startIndex:n.startIndex,endIndex:n.endIndex,overscan:u,count:f}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=r=>{const n=this.options.indexAttribute,u=r.getAttribute(n);return u?parseInt(u,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this._measureElement=(r,n)=>{const u=this.indexFromElement(r),f=this.getMeasurements()[u];if(!f||!r.isConnected){this.elementsCache.forEach((m,v)=>{m===r&&(this.observer.unobserve(r),this.elementsCache.delete(v))});return}const a=this.elementsCache.get(f.key);a!==r&&(a&&this.observer.unobserve(a),this.observer.observe(r),this.elementsCache.set(f.key,r)),this.resizeItem(u,this.options.measureElement(r,n,this))},this.resizeItem=(r,n)=>{const u=this.getMeasurements()[r];if(!u)return;const f=this.itemSizeCache.get(u.key)??u.size,a=n-f;a!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(u,a,this):u.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",a),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=a,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(u.index),this.itemSizeCache=new Map(this.itemSizeCache.set(u.key,n)),this.notify(!0,!1))},this.measureElement=r=>{r&&this._measureElement(r,void 0)},this.getVirtualItems=zn(()=>[this.getIndexes(),this.getMeasurements()],(r,n)=>{const u=[];for(let f=0,a=r.length;f<a;f++){const m=r[f],v=n[m];u.push(v)}return u},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=r=>{const n=this.getMeasurements();if(n.length!==0)return no(n[xi(0,n.length-1,u=>no(n[u]).start,r)])},this.getOffsetForAlignment=(r,n)=>{const u=this.getSize(),f=this.getScrollOffset();n==="auto"&&(r<=f?n="start":r>=f+u?n="end":n="start"),n==="start"?r=r:n==="end"?r=r-u:n==="center"&&(r=r-u/2);const a=this.options.horizontal?"scrollWidth":"scrollHeight",v=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[a]:this.scrollElement[a]:0)-u;return Math.max(Math.min(v,r),0)},this.getOffsetForIndex=(r,n="auto")=>{r=Math.max(0,Math.min(r,this.options.count-1));const u=this.getMeasurements()[r];if(!u)return;const f=this.getSize(),a=this.getScrollOffset();if(n==="auto")if(u.end>=a+f-this.options.scrollPaddingEnd)n="end";else if(u.start<=a+this.options.scrollPaddingStart)n="start";else return[a,n];const m=n==="end"?u.end+this.options.scrollPaddingEnd:u.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(m,n),n]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(r,{align:n="start",behavior:u}={})=>{this.cancelScrollToIndex(),u==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(r,n),{adjustments:void 0,behavior:u})},this.scrollToIndex=(r,{align:n="auto",behavior:u}={})=>{r=Math.max(0,Math.min(r,this.options.count-1)),this.cancelScrollToIndex(),u==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const f=this.getOffsetForIndex(r,n);if(!f)return;const[a,m]=f;this._scrollToOffset(a,{adjustments:void 0,behavior:u}),u!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(r))){const[x]=no(this.getOffsetForIndex(r,m));ps(x,this.getScrollOffset())||this.scrollToIndex(r,{align:m,behavior:u})}else this.scrollToIndex(r,{align:m,behavior:u})}))},this.scrollBy=(r,{behavior:n}={})=>{this.cancelScrollToIndex(),n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+r,{adjustments:void 0,behavior:n})},this.getTotalSize=()=>{var r;const n=this.getMeasurements();let u;return n.length===0?u=this.options.paddingStart:u=this.options.lanes===1?((r=n[n.length-1])==null?void 0:r.end)??0:Math.max(...n.slice(-this.options.lanes).map(f=>f.end)),u-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(r,{adjustments:n,behavior:u})=>{this.options.scrollToFn(r,{behavior:u,adjustments:n},this)},this.measure=()=>{var r,n;this.itemSizeCache=new Map,(n=(r=this.options).onChange)==null||n.call(r,this,!1)},this.setOptions(o)}}const xi=(e,o,r,n)=>{for(;e<=o;){const u=(e+o)/2|0,f=r(u);if(f<n)e=u+1;else if(f>n)o=u-1;else return u}return e>0?e-1:0};function Ss({measurements:e,outerSize:o,scrollOffset:r}){const n=e.length-1,f=xi(0,n,m=>e[m].start,r);let a=f;for(;a<n&&e[a].end<r+o;)a++;return{startIndex:f,endIndex:a}}const Cs=typeof document<"u"?Z.useLayoutEffect:Z.useEffect;function js(e){const o=Z.useReducer(()=>({}),{})[1],r={...e,onChange:(u,f)=>{var a;f?Sr.flushSync(o):o(),(a=e.onChange)==null||a.call(e,u,f)}},[n]=Z.useState(()=>new Es(r));return n.setOptions(r),Z.useEffect(()=>n._didMount(),[]),Cs(()=>n._willUpdate()),n}function Ts(e){return js({observeElementRect:gs,observeElementOffset:xs,scrollToFn:ws,...e})}var Ns=Object.defineProperty,Os=(e,o,r)=>o in e?Ns(e,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[o]=r,ro=(e,o,r)=>(Os(e,typeof o!="symbol"?o+"":o,r),r);let ks=class{constructor(){ro(this,"current",this.detect()),ro(this,"handoffState","pending"),ro(this,"currentId",0)}set(o){this.current!==o&&(this.handoffState="pending",this.currentId=0,this.current=o)}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"}},tn=new ks,ot=(e,o)=>{tn.isServer?g.useEffect(e,o):g.useLayoutEffect(e,o)};function Vt(e){let o=g.useRef(e);return ot(()=>{o.current=e},[e]),o}function oo(e,o){let[r,n]=g.useState(e),u=Vt(e);return ot(()=>n(u.current),[u,n,...o]),r}let ie=function(e){let o=Vt(e);return g.useCallback((...r)=>o.current(...r),[o])};function yi(e,o,r){let[n,u]=g.useState(r),f=e!==void 0,a=g.useRef(f),m=g.useRef(!1),v=g.useRef(!1);return f&&!a.current&&!m.current?(m.current=!0,a.current=f,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.")):!f&&a.current&&!v.current&&(v.current=!0,a.current=f,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.")),[f?e:n,ie(x=>(f||u(x),o==null?void 0:o(x)))]}function Cr(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(o=>setTimeout(()=>{throw o}))}function Wt(){let e=[],o={addEventListener(r,n,u,f){return r.addEventListener(n,u,f),o.add(()=>r.removeEventListener(n,u,f))},requestAnimationFrame(...r){let n=requestAnimationFrame(...r);return o.add(()=>cancelAnimationFrame(n))},nextFrame(...r){return o.requestAnimationFrame(()=>o.requestAnimationFrame(...r))},setTimeout(...r){let n=setTimeout(...r);return o.add(()=>clearTimeout(n))},microTask(...r){let n={current:!0};return Cr(()=>{n.current&&r[0]()}),o.add(()=>{n.current=!1})},style(r,n,u){let f=r.style.getPropertyValue(n);return Object.assign(r.style,{[n]:u}),this.add(()=>{Object.assign(r.style,{[n]:f})})},group(r){let n=Wt();return r(n),this.add(()=>n.dispose())},add(r){return e.push(r),()=>{let n=e.indexOf(r);if(n>=0)for(let u of e.splice(n,1))u()}},dispose(){for(let r of e.splice(0))r()}};return o}function nn(){let[e]=g.useState(Wt);return g.useEffect(()=>()=>e.dispose(),[e]),e}function Is(){let e=typeof document>"u";return"useSyncExternalStore"in Z?(o=>o.useSyncExternalStore)(Z)(()=>()=>{},()=>!1,()=>!e):!1}function Mn(){let e=Is(),[o,r]=Z.useState(tn.isHandoffComplete);return o&&tn.isHandoffComplete===!1&&r(!1),Z.useEffect(()=>{o!==!0&&r(!0)},[o]),Z.useEffect(()=>tn.handoff(),[]),e?!1:o}var wi;let Dt=(wi=g.useId)!=null?wi:function(){let e=Mn(),[o,r]=g.useState(e?()=>tn.nextId():null);return ot(()=>{o===null&&r(tn.nextId())},[o]),o!=null?""+o:void 0};function xt(e,o,...r){if(e in o){let u=o[e];return typeof u=="function"?u(...r):u}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(o).map(u=>`"${u}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,xt),n}function jr(e){return tn.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let io=["[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 rn=(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))(rn||{}),Ei=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Ei||{}),Ms=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Ms||{});function Si(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(io)).sort((o,r)=>Math.sign((o.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var lo=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(lo||{});function so(e,o=0){var r;return e===((r=jr(e))==null?void 0:r.body)?!1:xt(o,{0(){return e.matches(io)},1(){let n=e;for(;n!==null;){if(n.matches(io))return!0;n=n.parentElement}return!1}})}function Ci(e){let o=jr(e);Wt().nextFrame(()=>{o&&!so(o.activeElement,0)&&fn(e)})}var Ps=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Ps||{});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 fn(e){e==null||e.focus({preventScroll:!0})}let Fs=["textarea","input"].join(",");function Rs(e){var o,r;return(r=(o=e==null?void 0:e.matches)==null?void 0:o.call(e,Fs))!=null?r:!1}function ao(e,o=r=>r){return e.slice().sort((r,n)=>{let u=o(r),f=o(n);if(u===null||f===null)return 0;let a=u.compareDocumentPosition(f);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Ls(e,o){return Wn(Si(),o,{relativeTo:e})}function Wn(e,o,{sorted:r=!0,relativeTo:n=null,skipElements:u=[]}={}){let f=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,a=Array.isArray(e)?r?ao(e):e:Si(e);u.length>0&&a.length>1&&(a=a.filter(C=>!u.includes(C))),n=n??f.activeElement;let m=(()=>{if(o&5)return 1;if(o&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),v=(()=>{if(o&1)return 0;if(o&2)return Math.max(0,a.indexOf(n))-1;if(o&4)return Math.max(0,a.indexOf(n))+1;if(o&8)return a.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),x=o&32?{preventScroll:!0}:{},E=0,k=a.length,P;do{if(E>=k||E+k<=0)return 0;let C=v+E;if(o&16)C=(C+k)%k;else{if(C<0)return 3;if(C>=k)return 1}P=a[C],P==null||P.focus(x),E+=m}while(P!==f.activeElement);return o&6&&Rs(P)&&P.select(),2}function ji(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function As(){return/Android/gi.test(window.navigator.userAgent)}function Ti(){return ji()||As()}function Tr(e,o,r){let n=Vt(o);g.useEffect(()=>{function u(f){n.current(f)}return document.addEventListener(e,u,r),()=>document.removeEventListener(e,u,r)},[e,r])}function Ni(e,o,r){let n=Vt(o);g.useEffect(()=>{function u(f){n.current(f)}return window.addEventListener(e,u,r),()=>window.removeEventListener(e,u,r)},[e,r])}function uo(e,o,r=!0){let n=g.useRef(!1);g.useEffect(()=>{requestAnimationFrame(()=>{n.current=r})},[r]);function u(a,m){if(!n.current||a.defaultPrevented)return;let v=m(a);if(v===null||!v.getRootNode().contains(v)||!v.isConnected)return;let x=function E(k){return typeof k=="function"?E(k()):Array.isArray(k)||k instanceof Set?k:[k]}(e);for(let E of x){if(E===null)continue;let k=E instanceof HTMLElement?E:E.current;if(k!=null&&k.contains(v)||a.composed&&a.composedPath().includes(k))return}return!so(v,lo.Loose)&&v.tabIndex!==-1&&a.preventDefault(),o(a,v)}let f=g.useRef(null);Tr("pointerdown",a=>{var m,v;n.current&&(f.current=((v=(m=a.composedPath)==null?void 0:m.call(a))==null?void 0:v[0])||a.target)},!0),Tr("mousedown",a=>{var m,v;n.current&&(f.current=((v=(m=a.composedPath)==null?void 0:m.call(a))==null?void 0:v[0])||a.target)},!0),Tr("click",a=>{Ti()||f.current&&(u(a,()=>f.current),f.current=null)},!0),Tr("touchend",a=>u(a,()=>a.target instanceof HTMLElement?a.target:null),!0),Ni("blur",a=>u(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Sn(...e){return g.useMemo(()=>jr(...e),[...e])}function Oi(e){var o;if(e.type)return e.type;let r=(o=e.as)!=null?o:"button";if(typeof r=="string"&&r.toLowerCase()==="button")return"button"}function co(e,o){let[r,n]=g.useState(()=>Oi(e));return ot(()=>{n(Oi(e))},[e.type,e.as]),ot(()=>{r||o.current&&o.current instanceof HTMLButtonElement&&!o.current.hasAttribute("type")&&n("button")},[r,o]),r}let ki=Symbol();function Ds(e,o=!0){return Object.assign(e,{[ki]:o})}function Et(...e){let o=g.useRef(e);g.useEffect(()=>{o.current=e},[e]);let r=ie(n=>{for(let u of o.current)u!=null&&(typeof u=="function"?u(n):u.current=n)});return e.every(n=>n==null||(n==null?void 0:n[ki]))?void 0:r}function Ii(e){return[e.screenX,e.screenY]}function Mi(){let e=g.useRef([-1,-1]);return{wasMoved(o){let r=Ii(o);return e.current[0]===r[0]&&e.current[1]===r[1]?!1:(e.current=r,!0)},update(o){e.current=Ii(o)}}}function Pi({container:e,accept:o,walk:r,enabled:n=!0}){let u=g.useRef(o),f=g.useRef(r);g.useEffect(()=>{u.current=o,f.current=r},[o,r]),ot(()=>{if(!e||!n)return;let a=jr(e);if(!a)return;let m=u.current,v=f.current,x=Object.assign(k=>m(k),{acceptNode:m}),E=a.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,x,!1);for(;E.nextNode();)v(E.currentNode)},[e,n,u,f])}function Hn(e,o){let r=g.useRef([]),n=ie(e);g.useEffect(()=>{let u=[...r.current];for(let[f,a]of o.entries())if(r.current[f]!==a){let m=n(o,u);return r.current=o,m}},[n,...o])}function Nr(...e){return Array.from(new Set(e.flatMap(o=>typeof o=="string"?o.split(" "):[]))).filter(Boolean).join(" ")}var pn=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(pn||{}),mn=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(mn||{});function ht({ourProps:e,theirProps:o,slot:r,defaultTag:n,features:u,visible:f=!0,name:a,mergeRefs:m}){m=m??$s;let v=Fi(o,e);if(f)return Or(v,r,n,a,m);let x=u??0;if(x&2){let{static:E=!1,...k}=v;if(E)return Or(k,r,n,a,m)}if(x&1){let{unmount:E=!0,...k}=v;return xt(E?0:1,{0(){return null},1(){return Or({...k,hidden:!0,style:{display:"none"}},r,n,a,m)}})}return Or(v,r,n,a,m)}function Or(e,o={},r,n,u){let{as:f=r,children:a,refName:m="ref",...v}=fo(e,["unmount","static"]),x=e.ref!==void 0?{[m]:e.ref}:{},E=typeof a=="function"?a(o):a;"className"in v&&v.className&&typeof v.className=="function"&&(v.className=v.className(o));let k={};if(o){let P=!1,C=[];for(let[M,R]of Object.entries(o))typeof R=="boolean"&&(P=!0),R===!0&&C.push(M);P&&(k["data-headlessui-state"]=C.join(" "))}if(f===g.Fragment&&Object.keys(kr(v)).length>0){if(!g.isValidElement(E)||Array.isArray(E)&&E.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(v).map(R=>` - ${R}`).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(R=>` - ${R}`).join(`
30
30
  `)].join(`
31
- `));let P=E.props,C=typeof(P==null?void 0:P.className)=="function"?(...R)=>Nr(P==null?void 0:P.className(...R),v.className):Nr(P==null?void 0:P.className,v.className),M=C?{className:C}:{};return g.cloneElement(E,Object.assign({},Fi(E.props,kr(fo(v,["ref"]))),k,x,{ref:u(E.ref,x.ref)},M))}return g.createElement(f,Object.assign({},fo(v,["ref"]),f!==g.Fragment&&x,f!==g.Fragment&&k),E)}function $s(...e){return e.every(o=>o==null)?void 0:o=>{for(let r of e)r!=null&&(typeof r=="function"?r(o):r.current=o)}}function Fi(...e){if(e.length===0)return{};if(e.length===1)return e[0];let o={},r={};for(let n of e)for(let u in n)u.startsWith("on")&&typeof n[u]=="function"?(r[u]!=null||(r[u]=[]),r[u].push(n[u])):o[u]=n[u];if(o.disabled||o["aria-disabled"])return Object.assign(o,Object.fromEntries(Object.keys(r).map(n=>[n,void 0])));for(let n in r)Object.assign(o,{[n](u,...f){let a=r[n];for(let m of a){if((u instanceof Event||(u==null?void 0:u.nativeEvent)instanceof Event)&&u.defaultPrevented)return;m(u,...f)}}});return o}function vt(e){var o;return Object.assign(g.forwardRef(e),{displayName:(o=e.displayName)!=null?o:e.name})}function kr(e){let o=Object.assign({},e);for(let r in o)o[r]===void 0&&delete o[r];return o}function fo(e,o=[]){let r=Object.assign({},e);for(let n of o)n in r&&delete r[n];return r}let _s="div";var Pn=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Pn||{});function Bs(e,o){var r;let{features:n=1,...u}=e,f={ref:o,"aria-hidden":(n&2)===2?!0:(r=u["aria-hidden"])!=null?r:void 0,hidden:(n&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",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return ht({ourProps:f,theirProps:u,slot:{},defaultTag:_s,name:"Hidden"})}let Un=vt(Bs),po=g.createContext(null);po.displayName="OpenClosedContext";var jt=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(jt||{});function Vn(){return g.useContext(po)}function mo({value:e,children:o}){return g.createElement(po.Provider,{value:e},o)}function zs(e){function o(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",o))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",o),o())}let Kt=[];zs(()=>{function e(o){o.target instanceof HTMLElement&&o.target!==document.body&&Kt[0]!==o.target&&(Kt.unshift(o.target),Kt=Kt.filter(r=>r!=null&&r.isConnected),Kt.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 Ir(e){let o=e.parentElement,r=null;for(;o&&!(o instanceof HTMLFieldSetElement);)o instanceof HTMLLegendElement&&(r=o),o=o.parentElement;let n=(o==null?void 0:o.getAttribute("disabled"))==="";return n&&Ws(r)?!1:n}function Ws(e){if(!e)return!1;let o=e.previousElementSibling;for(;o!==null;){if(o instanceof HTMLLegendElement)return!1;o=o.previousElementSibling}return!0}function Hs(e){throw new Error("Unexpected object: "+e)}var it=(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))(it||{});function ho(e,o){let r=o.resolveItems();if(r.length<=0)return null;let n=o.resolveActiveIndex(),u=n??-1;switch(e.focus){case 0:{for(let f=0;f<r.length;++f)if(!o.resolveDisabled(r[f],f,r))return f;return n}case 1:{for(let f=u-1;f>=0;--f)if(!o.resolveDisabled(r[f],f,r))return f;return n}case 2:{for(let f=u+1;f<r.length;++f)if(!o.resolveDisabled(r[f],f,r))return f;return n}case 3:{for(let f=r.length-1;f>=0;--f)if(!o.resolveDisabled(r[f],f,r))return f;return n}case 4:{for(let f=0;f<r.length;++f)if(o.resolveId(r[f],f,r)===e.id)return f;return n}case 5:return null;default:Hs(e)}}function Ri(e={},o=null,r=[]){for(let[n,u]of Object.entries(e))Ai(r,Li(o,n),u);return r}function Li(e,o){return e?e+"["+o+"]":o}function Ai(e,o,r){if(Array.isArray(r))for(let[n,u]of r.entries())Ai(e,Li(o,n.toString()),u);else r instanceof Date?e.push([o,r.toISOString()]):typeof r=="boolean"?e.push([o,r?"1":"0"]):typeof r=="string"?e.push([o,r]):typeof r=="number"?e.push([o,`${r}`]):r==null?e.push([o,""]):Ri(r,o,e)}function Us(e){var o,r;let n=(o=e==null?void 0:e.form)!=null?o:e.closest("form");if(n){for(let u of n.elements)if(u!==e&&(u.tagName==="INPUT"&&u.type==="submit"||u.tagName==="BUTTON"&&u.type==="submit"||u.nodeName==="INPUT"&&u.type==="image")){u.click();return}(r=n.requestSubmit)==null||r.call(n)}}var Xe=(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))(Xe||{}),Vs=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Vs||{}),Zs=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Zs||{}),Ys=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(Ys||{}),Gs=(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))(Gs||{});function vo(e,o=r=>r){let r=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,n=o(e.options.slice()),u=n.length>0&&n[0].dataRef.current.order!==null?n.sort((a,m)=>a.dataRef.current.order-m.dataRef.current.order):ao(n,a=>a.dataRef.current.domRef.current),f=r?u.indexOf(r):null;return f===-1&&(f=null),{options:u,activeOptionIndex:f}}let qs={1(e){var o;return(o=e.dataRef.current)!=null&&o.disabled||e.comboboxState===1?e:{...e,activeOptionIndex:null,comboboxState:1}},0(e){var o,r;if((o=e.dataRef.current)!=null&&o.disabled||e.comboboxState===0)return e;if((r=e.dataRef.current)!=null&&r.value){let n=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(n!==-1)return{...e,activeOptionIndex:n,comboboxState:0}}return{...e,comboboxState:0}},2(e,o){var r,n,u,f,a;if((r=e.dataRef.current)!=null&&r.disabled||(n=e.dataRef.current)!=null&&n.optionsRef.current&&!((u=e.dataRef.current)!=null&&u.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let E=o.focus===it.Specific?o.idx:ho(o,{resolveItems:()=>e.virtual.options,resolveActiveIndex:()=>{var P,C;return(C=(P=e.activeOptionIndex)!=null?P:e.virtual.options.findIndex(M=>!e.virtual.disabled(M)))!=null?C:null},resolveDisabled:e.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),k=(f=o.trigger)!=null?f:2;return e.activeOptionIndex===E&&e.activationTrigger===k?e:{...e,activeOptionIndex:E,activationTrigger:k}}let m=vo(e);if(m.activeOptionIndex===null){let E=m.options.findIndex(k=>!k.dataRef.current.disabled);E!==-1&&(m.activeOptionIndex=E)}let v=o.focus===it.Specific?o.idx:ho(o,{resolveItems:()=>m.options,resolveActiveIndex:()=>m.activeOptionIndex,resolveId:E=>E.id,resolveDisabled:E=>E.dataRef.current.disabled}),x=(a=o.trigger)!=null?a:2;return e.activeOptionIndex===v&&e.activationTrigger===x?e:{...e,...m,activeOptionIndex:v,activationTrigger:x}},3:(e,o)=>{var r,n,u;if((r=e.dataRef.current)!=null&&r.virtual)return{...e,options:[...e.options,o.payload]};let f=o.payload,a=vo(e,v=>(v.push(f),v));e.activeOptionIndex===null&&(n=e.dataRef.current)!=null&&n.isSelected(o.payload.dataRef.current.value)&&(a.activeOptionIndex=a.options.indexOf(f));let m={...e,...a,activationTrigger:2};return(u=e.dataRef.current)!=null&&u.__demoMode&&e.dataRef.current.value===void 0&&(m.activeOptionIndex=0),m},4:(e,o)=>{var r;if((r=e.dataRef.current)!=null&&r.virtual)return{...e,options:e.options.filter(u=>u.id!==o.id)};let n=vo(e,u=>{let f=u.findIndex(a=>a.id===o.id);return f!==-1&&u.splice(f,1),u});return{...e,...n,activationTrigger:2}},5:(e,o)=>e.labelId===o.id?e:{...e,labelId:o.id},6:(e,o)=>e.activationTrigger===o.trigger?e:{...e,activationTrigger:o.trigger},7:(e,o)=>{var r;if(((r=e.virtual)==null?void 0:r.options)===o.options)return e;let n=e.activeOptionIndex;if(e.activeOptionIndex!==null){let u=o.options.indexOf(e.virtual.options[e.activeOptionIndex]);u!==-1?n=u:n=null}return{...e,activeOptionIndex:n,virtual:Object.assign({},e.virtual,{options:o.options})}}},go=g.createContext(null);go.displayName="ComboboxActionsContext";function Zn(e){let o=g.useContext(go);if(o===null){let r=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Zn),r}return o}let Di=g.createContext(null);function Ks(e){var o;let r=Cn("VirtualProvider"),[n,u]=g.useMemo(()=>{let v=r.optionsRef.current;if(!v)return[0,0];let x=window.getComputedStyle(v);return[parseFloat(x.paddingBlockStart||x.paddingTop),parseFloat(x.paddingBlockEnd||x.paddingBottom)]},[r.optionsRef.current]),f=Ts({scrollPaddingStart:n,scrollPaddingEnd:u,count:r.virtual.options.length,estimateSize(){return 40},getScrollElement(){var v;return(v=r.optionsRef.current)!=null?v:null},overscan:12}),[a,m]=g.useState(0);return ot(()=>{m(v=>v+1)},[(o=r.virtual)==null?void 0:o.options]),g.createElement(Di.Provider,{value:f},g.createElement("div",{style:{position:"relative",width:"100%",height:`${f.getTotalSize()}px`},ref:v=>{if(v){if(typeof process<"u"&&process.env.JEST_WORKER_ID!==void 0||r.activationTrigger===0)return;r.activeOptionIndex!==null&&r.virtual.options.length>r.activeOptionIndex&&f.scrollToIndex(r.activeOptionIndex)}}},f.getVirtualItems().map(v=>{var x;return g.createElement(g.Fragment,{key:v.key},g.cloneElement((x=e.children)==null?void 0:x.call(e,{option:r.virtual.options[v.index],open:r.comboboxState===0}),{key:`${a}-${v.key}`,"data-index":v.index,"aria-setsize":r.virtual.options.length,"aria-posinset":v.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${v.start}px)`,overflowAnchor:"none"}}))})))}let bo=g.createContext(null);bo.displayName="ComboboxDataContext";function Cn(e){let o=g.useContext(bo);if(o===null){let r=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Cn),r}return o}function Xs(e,o){return xt(o.type,qs,e,o)}let Js=g.Fragment;function Qs(e,o){let{value:r,defaultValue:n,onChange:u,form:f,name:a,by:m=null,disabled:v=!1,__demoMode:x=!1,nullable:E=!1,multiple:k=!1,immediate:P=!1,virtual:C=null,...M}=e,R=!1,L=null,[B=k?[]:void 0,_]=yi(r,u,n),[z,X]=g.useReducer(Xs,{dataRef:g.createRef(),comboboxState:x?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),ee=g.useRef(!1),ue=g.useRef({static:!1,hold:!1}),we=g.useRef(null),Oe=g.useRef(null),be=g.useRef(null),y=g.useRef(null),he=ie(typeof m=="string"?(re,Ce)=>{let V=m;return(re==null?void 0:re[V])===(Ce==null?void 0:Ce[V])}:m??((re,Ce)=>re===Ce)),Pe=ie(re=>z.options.findIndex(Ce=>he(Ce.dataRef.current.value,re))),Ze=g.useCallback(re=>xt(Y.mode,{1:()=>B.some(Ce=>he(Ce,re)),0:()=>he(B,re)}),[B]),Ye=ie(re=>z.activeOptionIndex===Pe(re)),Y=g.useMemo(()=>({...z,immediate:R,optionsPropsRef:ue,labelRef:we,inputRef:Oe,buttonRef:be,optionsRef:y,value:B,defaultValue:n,disabled:v,mode:k?1:0,virtual:z.virtual,get activeOptionIndex(){if(ee.current&&z.activeOptionIndex===null&&z.options.length>0){let re=z.options.findIndex(Ce=>!Ce.dataRef.current.disabled);if(re!==-1)return re}return z.activeOptionIndex},calculateIndex:Pe,compare:he,isSelected:Ze,isActive:Ye,nullable:E,__demoMode:x}),[B,n,v,k,E,x,z,L]);ot(()=>{},[L,void 0]),ot(()=>{z.dataRef.current=Y},[Y]),uo([Y.buttonRef,Y.inputRef,Y.optionsRef],()=>St.closeCombobox(),Y.comboboxState===0);let Je=g.useMemo(()=>{var re,Ce,V;return{open:Y.comboboxState===0,disabled:v,activeIndex:Y.activeOptionIndex,activeOption:Y.activeOptionIndex===null?null:Y.virtual?Y.virtual.options[(re=Y.activeOptionIndex)!=null?re:0]:(V=(Ce=Y.options[Y.activeOptionIndex])==null?void 0:Ce.dataRef.current.value)!=null?V:null,value:B}},[Y,v,B]),Re=ie(()=>{if(Y.activeOptionIndex!==null){if(Y.virtual)lt(Y.virtual.options[Y.activeOptionIndex]);else{let{dataRef:re}=Y.options[Y.activeOptionIndex];lt(re.current.value)}St.goToOption(it.Specific,Y.activeOptionIndex)}}),q=ie(()=>{X({type:0}),ee.current=!0}),te=ie(()=>{X({type:1}),ee.current=!1}),ve=ie((re,Ce,V)=>(ee.current=!1,re===it.Specific?X({type:2,focus:it.Specific,idx:Ce,trigger:V}):X({type:2,focus:re,trigger:V}))),$e=ie((re,Ce)=>(X({type:3,payload:{id:re,dataRef:Ce}}),()=>{Y.isActive(Ce.current.value)&&(ee.current=!0),X({type:4,id:re})})),We=ie(re=>(X({type:5,id:re}),()=>X({type:5,id:null}))),lt=ie(re=>xt(Y.mode,{0(){return _==null?void 0:_(re)},1(){let Ce=Y.value.slice(),V=Ce.findIndex(Ee=>he(Ee,re));return V===-1?Ce.push(re):Ce.splice(V,1),_==null?void 0:_(Ce)}})),tt=ie(re=>{X({type:6,trigger:re})}),St=g.useMemo(()=>({onChange:lt,registerOption:$e,registerLabel:We,goToOption:ve,closeCombobox:te,openCombobox:q,setActivationTrigger:tt,selectActiveOption:Re}),[]),Lt=o===null?{}:{ref:o},ge=g.useRef(null),st=nn();return g.useEffect(()=>{ge.current&&n!==void 0&&st.addEventListener(ge.current,"reset",()=>{_==null||_(n)})},[ge,_]),g.createElement(go.Provider,{value:St},g.createElement(bo.Provider,{value:Y},g.createElement(mo,{value:xt(Y.comboboxState,{0:jt.Open,1:jt.Closed})},a!=null&&B!=null&&Ri({[a]:B}).map(([re,Ce],V)=>g.createElement(Un,{features:Pn.Hidden,ref:V===0?Ee=>{var ke;ge.current=(ke=Ee==null?void 0:Ee.closest("form"))!=null?ke:null}:void 0,...kr({key:re,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:f,disabled:v,name:re,value:Ce})})),ht({ourProps:Lt,theirProps:M,slot:Je,defaultTag:Js,name:"Combobox"}))))}let ea="input";function ta(e,o){var r,n,u,f,a;let m=Dt(),{id:v=`headlessui-combobox-input-${m}`,onChange:x,displayValue:E,type:k="text",...P}=e,C=Cn("Combobox.Input"),M=Zn("Combobox.Input"),R=Et(C.inputRef,o),L=Sn(C.inputRef),B=g.useRef(!1),_=nn(),z=ie(()=>{M.onChange(null),C.optionsRef.current&&(C.optionsRef.current.scrollTop=0),M.goToOption(it.Nothing)}),X=function(){var Y;return typeof E=="function"&&C.value!==void 0?(Y=E(C.value))!=null?Y:"":typeof C.value=="string"?C.value:""}();Hn(([Y,Je],[Re,q])=>{if(B.current)return;let te=C.inputRef.current;te&&((q===0&&Je===1||Y!==Re)&&(te.value=Y),requestAnimationFrame(()=>{if(B.current||!te||(L==null?void 0:L.activeElement)!==te)return;let{selectionStart:ve,selectionEnd:$e}=te;Math.abs(($e??0)-(ve??0))===0&&ve===0&&te.setSelectionRange(te.value.length,te.value.length)}))},[X,C.comboboxState,L]),Hn(([Y],[Je])=>{if(Y===0&&Je===1){if(B.current)return;let Re=C.inputRef.current;if(!Re)return;let q=Re.value,{selectionStart:te,selectionEnd:ve,selectionDirection:$e}=Re;Re.value="",Re.value=q,$e!==null?Re.setSelectionRange(te,ve,$e):Re.setSelectionRange(te,ve)}},[C.comboboxState]);let ee=g.useRef(!1),ue=ie(()=>{ee.current=!0}),we=ie(()=>{_.nextFrame(()=>{ee.current=!1})}),Oe=ie(Y=>{switch(B.current=!0,Y.key){case Xe.Enter:if(B.current=!1,C.comboboxState!==0||ee.current)return;if(Y.preventDefault(),Y.stopPropagation(),C.activeOptionIndex===null){M.closeCombobox();return}M.selectActiveOption(),C.mode===0&&M.closeCombobox();break;case Xe.ArrowDown:return B.current=!1,Y.preventDefault(),Y.stopPropagation(),xt(C.comboboxState,{0:()=>M.goToOption(it.Next),1:()=>M.openCombobox()});case Xe.ArrowUp:return B.current=!1,Y.preventDefault(),Y.stopPropagation(),xt(C.comboboxState,{0:()=>M.goToOption(it.Previous),1:()=>{M.openCombobox(),_.nextFrame(()=>{C.value||M.goToOption(it.Last)})}});case Xe.Home:if(Y.shiftKey)break;return B.current=!1,Y.preventDefault(),Y.stopPropagation(),M.goToOption(it.First);case Xe.PageUp:return B.current=!1,Y.preventDefault(),Y.stopPropagation(),M.goToOption(it.First);case Xe.End:if(Y.shiftKey)break;return B.current=!1,Y.preventDefault(),Y.stopPropagation(),M.goToOption(it.Last);case Xe.PageDown:return B.current=!1,Y.preventDefault(),Y.stopPropagation(),M.goToOption(it.Last);case Xe.Escape:return B.current=!1,C.comboboxState!==0?void 0:(Y.preventDefault(),C.optionsRef.current&&!C.optionsPropsRef.current.static&&Y.stopPropagation(),C.nullable&&C.mode===0&&C.value===null&&z(),M.closeCombobox());case Xe.Tab:if(B.current=!1,C.comboboxState!==0)return;C.mode===0&&C.activationTrigger!==1&&M.selectActiveOption(),M.closeCombobox();break}}),be=ie(Y=>{x==null||x(Y),C.nullable&&C.mode===0&&Y.target.value===""&&z(),M.openCombobox()}),y=ie(Y=>{var Je,Re,q;let te=(Je=Y.relatedTarget)!=null?Je:Kt.find(ve=>ve!==Y.currentTarget);if(B.current=!1,!((Re=C.optionsRef.current)!=null&&Re.contains(te))&&!((q=C.buttonRef.current)!=null&&q.contains(te))&&C.comboboxState===0)return Y.preventDefault(),C.mode===0&&(C.nullable&&C.value===null?z():C.activationTrigger!==1&&M.selectActiveOption()),M.closeCombobox()}),he=ie(Y=>{var Je,Re,q;let te=(Je=Y.relatedTarget)!=null?Je:Kt.find(ve=>ve!==Y.currentTarget);(Re=C.buttonRef.current)!=null&&Re.contains(te)||(q=C.optionsRef.current)!=null&&q.contains(te)||C.disabled||C.immediate&&C.comboboxState!==0&&(M.openCombobox(),_.nextFrame(()=>{M.setActivationTrigger(1)}))}),Pe=oo(()=>{if(C.labelId)return[C.labelId].join(" ")},[C.labelId]),Ze=g.useMemo(()=>({open:C.comboboxState===0,disabled:C.disabled}),[C]),Ye={ref:R,id:v,role:"combobox",type:k,"aria-controls":(r=C.optionsRef.current)==null?void 0:r.id,"aria-expanded":C.comboboxState===0,"aria-activedescendant":C.activeOptionIndex===null?void 0:C.virtual?(n=C.options.find(Y=>{var Je;return!((Je=C.virtual)!=null&&Je.disabled(Y.dataRef.current.value))&&C.compare(Y.dataRef.current.value,C.virtual.options[C.activeOptionIndex])}))==null?void 0:n.id:(u=C.options[C.activeOptionIndex])==null?void 0:u.id,"aria-labelledby":Pe,"aria-autocomplete":"list",defaultValue:(a=(f=e.defaultValue)!=null?f:C.defaultValue!==void 0?E==null?void 0:E(C.defaultValue):null)!=null?a:C.defaultValue,disabled:C.disabled,onCompositionStart:ue,onCompositionEnd:we,onKeyDown:Oe,onChange:be,onFocus:he,onBlur:y};return ht({ourProps:Ye,theirProps:P,slot:Ze,defaultTag:ea,name:"Combobox.Input"})}let na="button";function ra(e,o){var r;let n=Cn("Combobox.Button"),u=Zn("Combobox.Button"),f=Et(n.buttonRef,o),a=Dt(),{id:m=`headlessui-combobox-button-${a}`,...v}=e,x=nn(),E=ie(R=>{switch(R.key){case Xe.ArrowDown:return R.preventDefault(),R.stopPropagation(),n.comboboxState===1&&u.openCombobox(),x.nextFrame(()=>{var L;return(L=n.inputRef.current)==null?void 0:L.focus({preventScroll:!0})});case Xe.ArrowUp:return R.preventDefault(),R.stopPropagation(),n.comboboxState===1&&(u.openCombobox(),x.nextFrame(()=>{n.value||u.goToOption(it.Last)})),x.nextFrame(()=>{var L;return(L=n.inputRef.current)==null?void 0:L.focus({preventScroll:!0})});case Xe.Escape:return n.comboboxState!==0?void 0:(R.preventDefault(),n.optionsRef.current&&!n.optionsPropsRef.current.static&&R.stopPropagation(),u.closeCombobox(),x.nextFrame(()=>{var L;return(L=n.inputRef.current)==null?void 0:L.focus({preventScroll:!0})}));default:return}}),k=ie(R=>{if(Ir(R.currentTarget))return R.preventDefault();n.comboboxState===0?u.closeCombobox():(R.preventDefault(),u.openCombobox()),x.nextFrame(()=>{var L;return(L=n.inputRef.current)==null?void 0:L.focus({preventScroll:!0})})}),P=oo(()=>{if(n.labelId)return[n.labelId,m].join(" ")},[n.labelId,m]),C=g.useMemo(()=>({open:n.comboboxState===0,disabled:n.disabled,value:n.value}),[n]),M={ref:f,id:m,type:co(e,n.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(r=n.optionsRef.current)==null?void 0:r.id,"aria-expanded":n.comboboxState===0,"aria-labelledby":P,disabled:n.disabled,onClick:k,onKeyDown:E};return ht({ourProps:M,theirProps:v,slot:C,defaultTag:na,name:"Combobox.Button"})}let oa="label";function ia(e,o){let r=Dt(),{id:n=`headlessui-combobox-label-${r}`,...u}=e,f=Cn("Combobox.Label"),a=Zn("Combobox.Label"),m=Et(f.labelRef,o);ot(()=>a.registerLabel(n),[n]);let v=ie(()=>{var E;return(E=f.inputRef.current)==null?void 0:E.focus({preventScroll:!0})}),x=g.useMemo(()=>({open:f.comboboxState===0,disabled:f.disabled}),[f]);return ht({ourProps:{ref:m,id:n,onClick:v},theirProps:u,slot:x,defaultTag:oa,name:"Combobox.Label"})}let la="ul",sa=pn.RenderStrategy|pn.Static;function aa(e,o){let r=Dt(),{id:n=`headlessui-combobox-options-${r}`,hold:u=!1,...f}=e,a=Cn("Combobox.Options"),m=Et(a.optionsRef,o),v=Vn(),x=v!==null?(v&jt.Open)===jt.Open:a.comboboxState===0;ot(()=>{var C;a.optionsPropsRef.current.static=(C=e.static)!=null?C:!1},[a.optionsPropsRef,e.static]),ot(()=>{a.optionsPropsRef.current.hold=u},[a.optionsPropsRef,u]),Pi({container:a.optionsRef.current,enabled:a.comboboxState===0,accept(C){return C.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:C.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(C){C.setAttribute("role","none")}});let E=oo(()=>{var C,M;return(M=a.labelId)!=null?M:(C=a.buttonRef.current)==null?void 0:C.id},[a.labelId,a.buttonRef.current]),k=g.useMemo(()=>({open:a.comboboxState===0,option:void 0}),[a]),P={"aria-labelledby":E,role:"listbox","aria-multiselectable":a.mode===1?!0:void 0,id:n,ref:m};return a.virtual&&a.comboboxState===0&&Object.assign(f,{children:g.createElement(Ks,null,f.children)}),ht({ourProps:P,theirProps:f,slot:k,defaultTag:la,features:sa,visible:x,name:"Combobox.Options"})}let ua="li";function ca(e,o){var r;let n=Dt(),{id:u=`headlessui-combobox-option-${n}`,disabled:f=!1,value:a,order:m=null,...v}=e,x=Cn("Combobox.Option"),E=Zn("Combobox.Option"),k=x.virtual?x.activeOptionIndex===x.calculateIndex(a):x.activeOptionIndex===null?!1:((r=x.options[x.activeOptionIndex])==null?void 0:r.id)===u,P=x.isSelected(a),C=g.useRef(null),M=Vt({disabled:f,value:a,domRef:C,order:m}),R=g.useContext(Di),L=Et(o,C,R?R.measureElement:null),B=ie(()=>E.onChange(a));ot(()=>E.registerOption(u,M),[M,u]);let _=g.useRef(!(x.virtual||x.__demoMode));ot(()=>{if(!x.virtual||!x.__demoMode)return;let y=Wt();return y.requestAnimationFrame(()=>{_.current=!0}),y.dispose},[x.virtual,x.__demoMode]),ot(()=>{if(!_.current||x.comboboxState!==0||!k||x.activationTrigger===0)return;let y=Wt();return y.requestAnimationFrame(()=>{var he,Pe;(Pe=(he=C.current)==null?void 0:he.scrollIntoView)==null||Pe.call(he,{block:"nearest"})}),y.dispose},[C,k,x.comboboxState,x.activationTrigger,x.activeOptionIndex]);let z=ie(y=>{var he;if(f||(he=x.virtual)!=null&&he.disabled(a))return y.preventDefault();B(),Ti()||requestAnimationFrame(()=>{var Pe;return(Pe=x.inputRef.current)==null?void 0:Pe.focus({preventScroll:!0})}),x.mode===0&&requestAnimationFrame(()=>E.closeCombobox())}),X=ie(()=>{var y;if(f||(y=x.virtual)!=null&&y.disabled(a))return E.goToOption(it.Nothing);let he=x.calculateIndex(a);E.goToOption(it.Specific,he)}),ee=Mi(),ue=ie(y=>ee.update(y)),we=ie(y=>{var he;if(!ee.wasMoved(y)||f||(he=x.virtual)!=null&&he.disabled(a)||k)return;let Pe=x.calculateIndex(a);E.goToOption(it.Specific,Pe,0)}),Oe=ie(y=>{var he;ee.wasMoved(y)&&(f||(he=x.virtual)!=null&&he.disabled(a)||k&&(x.optionsPropsRef.current.hold||E.goToOption(it.Nothing)))}),be=g.useMemo(()=>({active:k,selected:P,disabled:f}),[k,P,f]);return ht({ourProps:{id:u,ref:L,role:"option",tabIndex:f===!0?void 0:-1,"aria-disabled":f===!0?!0:void 0,"aria-selected":P,disabled:void 0,onClick:z,onFocus:X,onPointerEnter:ue,onMouseEnter:ue,onPointerMove:we,onMouseMove:we,onPointerLeave:Oe,onMouseLeave:Oe},theirProps:v,slot:be,defaultTag:ua,name:"Combobox.Option"})}let da=vt(Qs),fa=vt(ra),pa=vt(ta),ma=vt(ia),ha=vt(aa),va=vt(ca),on=Object.assign(da,{Input:pa,Button:fa,Label:ma,Options:ha,Option:va});function $i(e,o,r,n){let u=Vt(r);g.useEffect(()=>{e=e??window;function f(a){u.current(a)}return e.addEventListener(o,f,n),()=>e.removeEventListener(o,f,n)},[e,o,n])}function Yn(){let e=g.useRef(!1);return ot(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function _i(e){let o=ie(e),r=g.useRef(!1);g.useEffect(()=>(r.current=!1,()=>{r.current=!0,Cr(()=>{r.current&&o()})}),[o])}var Gn=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Gn||{});function ga(){let e=g.useRef(0);return Ni("keydown",o=>{o.key==="Tab"&&(e.current=o.shiftKey?1:0)},!0),e}function Bi(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let o=new Set;for(let r of e.current)r.current instanceof HTMLElement&&o.add(r.current);return o}let ba="div";var zi=(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))(zi||{});function xa(e,o){let r=g.useRef(null),n=Et(r,o),{initialFocus:u,containers:f,features:a=30,...m}=e;Mn()||(a=1);let v=Sn(r);Ea({ownerDocument:v},!!(a&16));let x=Sa({ownerDocument:v,container:r,initialFocus:u},!!(a&2));Ca({ownerDocument:v,container:r,containers:f,previousActiveElement:x},!!(a&8));let E=ga(),k=ie(R=>{let L=r.current;L&&(B=>B())(()=>{xt(E.current,{[Gn.Forwards]:()=>{Wn(L,rn.First,{skipElements:[R.relatedTarget]})},[Gn.Backwards]:()=>{Wn(L,rn.Last,{skipElements:[R.relatedTarget]})}})})}),P=nn(),C=g.useRef(!1),M={ref:n,onKeyDown(R){R.key=="Tab"&&(C.current=!0,P.requestAnimationFrame(()=>{C.current=!1}))},onBlur(R){let L=Bi(f);r.current instanceof HTMLElement&&L.add(r.current);let B=R.relatedTarget;B instanceof HTMLElement&&B.dataset.headlessuiFocusGuard!=="true"&&(Wi(L,B)||(C.current?Wn(r.current,xt(E.current,{[Gn.Forwards]:()=>rn.Next,[Gn.Backwards]:()=>rn.Previous})|rn.WrapAround,{relativeTo:R.target}):R.target instanceof HTMLElement&&fn(R.target)))}};return g.createElement(g.Fragment,null,!!(a&4)&&g.createElement(Un,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:k,features:Pn.Focusable}),ht({ourProps:M,theirProps:m,defaultTag:ba,name:"FocusTrap"}),!!(a&4)&&g.createElement(Un,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:k,features:Pn.Focusable}))}let ya=vt(xa),qn=Object.assign(ya,{features:zi});function wa(e=!0){let o=g.useRef(Kt.slice());return Hn(([r],[n])=>{n===!0&&r===!1&&Cr(()=>{o.current.splice(0)}),n===!1&&r===!0&&(o.current=Kt.slice())},[e,Kt,o]),ie(()=>{var r;return(r=o.current.find(n=>n!=null&&n.isConnected))!=null?r:null})}function Ea({ownerDocument:e},o){let r=wa(o);Hn(()=>{o||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&fn(r())},[o]),_i(()=>{o&&fn(r())})}function Sa({ownerDocument:e,container:o,initialFocus:r},n){let u=g.useRef(null),f=Yn();return Hn(()=>{if(!n)return;let a=o.current;a&&Cr(()=>{if(!f.current)return;let m=e==null?void 0:e.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===m){u.current=m;return}}else if(a.contains(m)){u.current=m;return}r!=null&&r.current?fn(r.current):Wn(a,rn.First)===Ei.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),u.current=e==null?void 0:e.activeElement})},[n]),u}function Ca({ownerDocument:e,container:o,containers:r,previousActiveElement:n},u){let f=Yn();$i(e==null?void 0:e.defaultView,"focus",a=>{if(!u||!f.current)return;let m=Bi(r);o.current instanceof HTMLElement&&m.add(o.current);let v=n.current;if(!v)return;let x=a.target;x&&x instanceof HTMLElement?Wi(m,x)?(n.current=x,fn(x)):(a.preventDefault(),a.stopPropagation(),fn(v)):fn(n.current)},!0)}function Wi(e,o){for(let r of e)if(r.contains(o))return!0;return!1}let Hi=g.createContext(!1);function ja(){return g.useContext(Hi)}function xo(e){return g.createElement(Hi.Provider,{value:e.force},e.children)}function Ta(e){let o=ja(),r=g.useContext(Ui),n=Sn(e),[u,f]=g.useState(()=>{if(!o&&r!==null||tn.isServer)return null;let a=n==null?void 0:n.getElementById("headlessui-portal-root");if(a)return a;if(n===null)return null;let m=n.createElement("div");return m.setAttribute("id","headlessui-portal-root"),n.body.appendChild(m)});return g.useEffect(()=>{u!==null&&(n!=null&&n.body.contains(u)||n==null||n.body.appendChild(u))},[u,n]),g.useEffect(()=>{o||r!==null&&f(r.current)},[r,f,o]),u}let Na=g.Fragment;function Oa(e,o){let r=e,n=g.useRef(null),u=Et(Ds(E=>{n.current=E}),o),f=Sn(n),a=Ta(n),[m]=g.useState(()=>{var E;return tn.isServer?null:(E=f==null?void 0:f.createElement("div"))!=null?E:null}),v=g.useContext(yo),x=Mn();return ot(()=>{!a||!m||a.contains(m)||(m.setAttribute("data-headlessui-portal",""),a.appendChild(m))},[a,m]),ot(()=>{if(m&&v)return v.register(m)},[v,m]),_i(()=>{var E;!a||!m||(m instanceof Node&&a.contains(m)&&a.removeChild(m),a.childNodes.length<=0&&((E=a.parentElement)==null||E.removeChild(a)))}),x?!a||!m?null:Sr.createPortal(ht({ourProps:{ref:u},theirProps:r,defaultTag:Na,name:"Portal"}),m):null}let ka=g.Fragment,Ui=g.createContext(null);function Ia(e,o){let{target:r,...n}=e,u={ref:Et(o)};return g.createElement(Ui.Provider,{value:r},ht({ourProps:u,theirProps:n,defaultTag:ka,name:"Popover.Group"}))}let yo=g.createContext(null);function Ma(){let e=g.useContext(yo),o=g.useRef([]),r=ie(f=>(o.current.push(f),e&&e.register(f),()=>n(f))),n=ie(f=>{let a=o.current.indexOf(f);a!==-1&&o.current.splice(a,1),e&&e.unregister(f)}),u=g.useMemo(()=>({register:r,unregister:n,portals:o}),[r,n,o]);return[o,g.useMemo(()=>function({children:f}){return g.createElement(yo.Provider,{value:u},f)},[u])]}let Pa=vt(Oa),Fa=vt(Ia),wo=Object.assign(Pa,{Group:Fa});function Ra(e,o){return e===o&&(e!==0||1/e===1/o)||e!==e&&o!==o}const La=typeof Object.is=="function"?Object.is:Ra,{useState:Aa,useEffect:Da,useLayoutEffect:$a,useDebugValue:_a}=Z;function Ba(e,o,r){const n=o(),[{inst:u},f]=Aa({inst:{value:n,getSnapshot:o}});return $a(()=>{u.value=n,u.getSnapshot=o,Eo(u)&&f({inst:u})},[e,n,o]),Da(()=>(Eo(u)&&f({inst:u}),e(()=>{Eo(u)&&f({inst:u})})),[e]),_a(n),n}function Eo(e){const o=e.getSnapshot,r=e.value;try{const n=o();return!La(r,n)}catch{return!0}}function za(e,o,r){return o()}const Wa=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ha=!Wa,Ua=Ha?za:Ba,Va="useSyncExternalStore"in Z?(e=>e.useSyncExternalStore)(Z):Ua;function Za(e){return Va(e.subscribe,e.getSnapshot,e.getSnapshot)}function Ya(e,o){let r=e(),n=new Set;return{getSnapshot(){return r},subscribe(u){return n.add(u),()=>n.delete(u)},dispatch(u,...f){let a=o[u].call(r,...f);a&&(r=a,n.forEach(m=>m()))}}}function Ga(){let e;return{before({doc:o}){var r;let n=o.documentElement;e=((r=o.defaultView)!=null?r:window).innerWidth-n.clientWidth},after({doc:o,d:r}){let n=o.documentElement,u=n.clientWidth-n.offsetWidth,f=e-u;r.style(n,"paddingRight",`${f}px`)}}}function qa(){return ji()?{before({doc:e,d:o,meta:r}){function n(u){return r.containers.flatMap(f=>f()).some(f=>f.contains(u))}o.microTask(()=>{var u;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let m=Wt();m.style(e.documentElement,"scrollBehavior","auto"),o.add(()=>o.microTask(()=>m.dispose()))}let f=(u=window.scrollY)!=null?u:window.pageYOffset,a=null;o.addEventListener(e,"click",m=>{if(m.target instanceof HTMLElement)try{let v=m.target.closest("a");if(!v)return;let{hash:x}=new URL(v.href),E=e.querySelector(x);E&&!n(E)&&(a=E)}catch{}},!0),o.addEventListener(e,"touchstart",m=>{if(m.target instanceof HTMLElement)if(n(m.target)){let v=m.target;for(;v.parentElement&&n(v.parentElement);)v=v.parentElement;o.style(v,"overscrollBehavior","contain")}else o.style(m.target,"touchAction","none")}),o.addEventListener(e,"touchmove",m=>{if(m.target instanceof HTMLElement)if(n(m.target)){let v=m.target;for(;v.parentElement&&v.dataset.headlessuiPortal!==""&&!(v.scrollHeight>v.clientHeight||v.scrollWidth>v.clientWidth);)v=v.parentElement;v.dataset.headlessuiPortal===""&&m.preventDefault()}else m.preventDefault()},{passive:!1}),o.add(()=>{var m;let v=(m=window.scrollY)!=null?m:window.pageYOffset;f!==v&&window.scrollTo(0,f),a&&a.isConnected&&(a.scrollIntoView({block:"nearest"}),a=null)})})}}:{}}function Ka(){return{before({doc:e,d:o}){o.style(e.documentElement,"overflow","hidden")}}}function Xa(e){let o={};for(let r of e)Object.assign(o,r(o));return o}let jn=Ya(()=>new Map,{PUSH(e,o){var r;let n=(r=this.get(e))!=null?r:{doc:e,count:0,d:Wt(),meta:new Set};return n.count++,n.meta.add(o),this.set(e,n),this},POP(e,o){let r=this.get(e);return r&&(r.count--,r.meta.delete(o)),this},SCROLL_PREVENT({doc:e,d:o,meta:r}){let n={doc:e,d:o,meta:Xa(r)},u=[qa(),Ga(),Ka()];u.forEach(({before:f})=>f==null?void 0:f(n)),u.forEach(({after:f})=>f==null?void 0:f(n))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});jn.subscribe(()=>{let e=jn.getSnapshot(),o=new Map;for(let[r]of e)o.set(r,r.documentElement.style.overflow);for(let r of e.values()){let n=o.get(r.doc)==="hidden",u=r.count!==0;(u&&!n||!u&&n)&&jn.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),r.count===0&&jn.dispatch("TEARDOWN",r)}});function Ja(e,o,r){let n=Za(jn),u=e?n.get(e):void 0,f=u?u.count>0:!1;return ot(()=>{if(!(!e||!o))return jn.dispatch("PUSH",e,r),()=>jn.dispatch("POP",e,r)},[o,e]),f}let So=new Map,Kn=new Map;function Vi(e,o=!0){ot(()=>{var r;if(!o)return;let n=typeof e=="function"?e():e.current;if(!n)return;function u(){var a;if(!n)return;let m=(a=Kn.get(n))!=null?a:1;if(m===1?Kn.delete(n):Kn.set(n,m-1),m!==1)return;let v=So.get(n);v&&(v["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",v["aria-hidden"]),n.inert=v.inert,So.delete(n))}let f=(r=Kn.get(n))!=null?r:0;return Kn.set(n,f+1),f!==0||(So.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0),u},[e,o])}function Qa({defaultContainers:e=[],portals:o,mainTreeNodeRef:r}={}){var n;let u=g.useRef((n=r==null?void 0:r.current)!=null?n:null),f=Sn(u),a=ie(()=>{var m,v,x;let E=[];for(let k of e)k!==null&&(k instanceof HTMLElement?E.push(k):"current"in k&&k.current instanceof HTMLElement&&E.push(k.current));if(o!=null&&o.current)for(let k of o.current)E.push(k);for(let k of(m=f==null?void 0:f.querySelectorAll("html > *, body > *"))!=null?m:[])k!==document.body&&k!==document.head&&k instanceof HTMLElement&&k.id!=="headlessui-portal-root"&&(k.contains(u.current)||k.contains((x=(v=u.current)==null?void 0:v.getRootNode())==null?void 0:x.host)||E.some(P=>k.contains(P))||E.push(k));return E});return{resolveContainers:a,contains:ie(m=>a().some(v=>v.contains(m))),mainTreeNodeRef:u,MainTreeNode:g.useMemo(()=>function(){return r!=null?null:g.createElement(Un,{features:Pn.Hidden,ref:u})},[u,r])}}let Co=g.createContext(()=>{});Co.displayName="StackContext";var jo=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(jo||{});function eu(){return g.useContext(Co)}function tu({children:e,onUpdate:o,type:r,element:n,enabled:u}){let f=eu(),a=ie((...m)=>{o==null||o(...m),f(...m)});return ot(()=>{let m=u===void 0||u===!0;return m&&a(0,r,n),()=>{m&&a(1,r,n)}},[a,r,n,u]),g.createElement(Co.Provider,{value:a},e)}let Zi=g.createContext(null);function Yi(){let e=g.useContext(Zi);if(e===null){let o=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(o,Yi),o}return e}function Gi(){let[e,o]=g.useState([]);return[e.length>0?e.join(" "):void 0,g.useMemo(()=>function(r){let n=ie(f=>(o(a=>[...a,f]),()=>o(a=>{let m=a.slice(),v=m.indexOf(f);return v!==-1&&m.splice(v,1),m}))),u=g.useMemo(()=>({register:n,slot:r.slot,name:r.name,props:r.props}),[n,r.slot,r.name,r.props]);return g.createElement(Zi.Provider,{value:u},r.children)},[o])]}let nu="p";function ru(e,o){let r=Dt(),{id:n=`headlessui-description-${r}`,...u}=e,f=Yi(),a=Et(o);ot(()=>f.register(n),[n,f.register]);let m={ref:a,...f.props,id:n};return ht({ourProps:m,theirProps:u,slot:f.slot||{},defaultTag:nu,name:f.name||"Description"})}let ou=vt(ru),qi=Object.assign(ou,{});var iu=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(iu||{}),lu=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(lu||{});let su={0(e,o){return e.titleId===o.id?e:{...e,titleId:o.id}}},Mr=g.createContext(null);Mr.displayName="DialogContext";function Xn(e){let o=g.useContext(Mr);if(o===null){let r=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Xn),r}return o}function au(e,o,r=()=>[document.body]){Ja(e,o,n=>{var u;return{containers:[...(u=n.containers)!=null?u:[],r]}})}function uu(e,o){return xt(o.type,su,e,o)}let cu="div",du=pn.RenderStrategy|pn.Static;function fu(e,o){let r=Dt(),{id:n=`headlessui-dialog-${r}`,open:u,onClose:f,initialFocus:a,role:m="dialog",__demoMode:v=!1,...x}=e,[E,k]=g.useState(0),P=g.useRef(!1);m=function(){return m==="dialog"||m==="alertdialog"?m:(P.current||(P.current=!0,console.warn(`Invalid role [${m}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let C=Vn();u===void 0&&C!==null&&(u=(C&jt.Open)===jt.Open);let M=g.useRef(null),R=Et(M,o),L=Sn(M),B=e.hasOwnProperty("open")||C!==null,_=e.hasOwnProperty("onClose");if(!B&&!_)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!B)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!_)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof u!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${u}`);if(typeof f!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${f}`);let z=u?0:1,[X,ee]=g.useReducer(uu,{titleId:null,descriptionId:null,panelRef:g.createRef()}),ue=ie(()=>f(!1)),we=ie(V=>ee({type:0,id:V})),Oe=Mn()?v?!1:z===0:!1,be=E>1,y=g.useContext(Mr)!==null,[he,Pe]=Ma(),Ze={get current(){var V;return(V=X.panelRef.current)!=null?V:M.current}},{resolveContainers:Ye,mainTreeNodeRef:Y,MainTreeNode:Je}=Qa({portals:he,defaultContainers:[Ze]}),Re=be?"parent":"leaf",q=C!==null?(C&jt.Closing)===jt.Closing:!1,te=y||q?!1:Oe,ve=g.useCallback(()=>{var V,Ee;return(Ee=Array.from((V=L==null?void 0:L.querySelectorAll("body > *"))!=null?V:[]).find(ke=>ke.id==="headlessui-portal-root"?!1:ke.contains(Y.current)&&ke instanceof HTMLElement))!=null?Ee:null},[Y]);Vi(ve,te);let $e=be?!0:Oe,We=g.useCallback(()=>{var V,Ee;return(Ee=Array.from((V=L==null?void 0:L.querySelectorAll("[data-headlessui-portal]"))!=null?V:[]).find(ke=>ke.contains(Y.current)&&ke instanceof HTMLElement))!=null?Ee:null},[Y]);Vi(We,$e),uo(Ye,V=>{V.preventDefault(),ue()},!(!Oe||be));let tt=!(be||z!==0);$i(L==null?void 0:L.defaultView,"keydown",V=>{tt&&(V.defaultPrevented||V.key===Xe.Escape&&(V.preventDefault(),V.stopPropagation(),ue()))}),au(L,!(q||z!==0||y),Ye),g.useEffect(()=>{if(z!==0||!M.current)return;let V=new ResizeObserver(Ee=>{for(let ke of Ee){let Fe=ke.target.getBoundingClientRect();Fe.x===0&&Fe.y===0&&Fe.width===0&&Fe.height===0&&ue()}});return V.observe(M.current),()=>V.disconnect()},[z,M,ue]);let[Lt,ge]=Gi(),st=g.useMemo(()=>[{dialogState:z,close:ue,setTitleId:we},X],[z,X,ue,we]),re=g.useMemo(()=>({open:z===0}),[z]),Ce={ref:R,id:n,role:m,"aria-modal":z===0?!0:void 0,"aria-labelledby":X.titleId,"aria-describedby":Lt};return g.createElement(tu,{type:"Dialog",enabled:z===0,element:M,onUpdate:ie((V,Ee)=>{Ee==="Dialog"&&xt(V,{[jo.Add]:()=>k(ke=>ke+1),[jo.Remove]:()=>k(ke=>ke-1)})})},g.createElement(xo,{force:!0},g.createElement(wo,null,g.createElement(Mr.Provider,{value:st},g.createElement(wo.Group,{target:M},g.createElement(xo,{force:!1},g.createElement(ge,{slot:re,name:"Dialog.Description"},g.createElement(qn,{initialFocus:a,containers:Ye,features:Oe?xt(Re,{parent:qn.features.RestoreFocus,leaf:qn.features.All&~qn.features.FocusLock}):qn.features.None},g.createElement(Pe,null,ht({ourProps:Ce,theirProps:x,slot:re,defaultTag:cu,features:du,visible:z===0,name:"Dialog"}))))))))),g.createElement(Je,null))}let pu="div";function mu(e,o){let r=Dt(),{id:n=`headlessui-dialog-overlay-${r}`,...u}=e,[{dialogState:f,close:a}]=Xn("Dialog.Overlay"),m=Et(o),v=ie(E=>{if(E.target===E.currentTarget){if(Ir(E.currentTarget))return E.preventDefault();E.preventDefault(),E.stopPropagation(),a()}}),x=g.useMemo(()=>({open:f===0}),[f]);return ht({ourProps:{ref:m,id:n,"aria-hidden":!0,onClick:v},theirProps:u,slot:x,defaultTag:pu,name:"Dialog.Overlay"})}let hu="div";function vu(e,o){let r=Dt(),{id:n=`headlessui-dialog-backdrop-${r}`,...u}=e,[{dialogState:f},a]=Xn("Dialog.Backdrop"),m=Et(o);g.useEffect(()=>{if(a.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[a.panelRef]);let v=g.useMemo(()=>({open:f===0}),[f]);return g.createElement(xo,{force:!0},g.createElement(wo,null,ht({ourProps:{ref:m,id:n,"aria-hidden":!0},theirProps:u,slot:v,defaultTag:hu,name:"Dialog.Backdrop"})))}let gu="div";function bu(e,o){let r=Dt(),{id:n=`headlessui-dialog-panel-${r}`,...u}=e,[{dialogState:f},a]=Xn("Dialog.Panel"),m=Et(o,a.panelRef),v=g.useMemo(()=>({open:f===0}),[f]),x=ie(E=>{E.stopPropagation()});return ht({ourProps:{ref:m,id:n,onClick:x},theirProps:u,slot:v,defaultTag:gu,name:"Dialog.Panel"})}let xu="h2";function yu(e,o){let r=Dt(),{id:n=`headlessui-dialog-title-${r}`,...u}=e,[{dialogState:f,setTitleId:a}]=Xn("Dialog.Title"),m=Et(o);g.useEffect(()=>(a(n),()=>a(null)),[n,a]);let v=g.useMemo(()=>({open:f===0}),[f]);return ht({ourProps:{ref:m,id:n},theirProps:u,slot:v,defaultTag:xu,name:"Dialog.Title"})}let wu=vt(fu),Eu=vt(vu),Su=vt(bu),Cu=vt(mu),ju=vt(yu),Ki=Object.assign(wu,{Backdrop:Eu,Panel:Su,Overlay:Cu,Title:ju,Description:qi}),Xi=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Ji(e){var o,r;let n=(o=e.innerText)!=null?o:"",u=e.cloneNode(!0);if(!(u instanceof HTMLElement))return n;let f=!1;for(let m of u.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))m.remove(),f=!0;let a=f?(r=u.innerText)!=null?r:"":n;return Xi.test(a)&&(a=a.replace(Xi,"")),a}function Tu(e){let o=e.getAttribute("aria-label");if(typeof o=="string")return o.trim();let r=e.getAttribute("aria-labelledby");if(r){let n=r.split(" ").map(u=>{let f=document.getElementById(u);if(f){let a=f.getAttribute("aria-label");return typeof a=="string"?a.trim():Ji(f).trim()}return null}).filter(Boolean);if(n.length>0)return n.join(", ")}return Ji(e).trim()}function Nu(e){let o=g.useRef(""),r=g.useRef("");return ie(()=>{let n=e.current;if(!n)return"";let u=n.innerText;if(o.current===u)return r.current;let f=Tu(n).trim().toLowerCase();return o.current=u,r.current=f,f})}var Ou=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ou||{}),ku=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(ku||{}),Iu=(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))(Iu||{});function To(e,o=r=>r){let r=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,n=ao(o(e.items.slice()),f=>f.dataRef.current.domRef.current),u=r?n.indexOf(r):null;return u===-1&&(u=null),{items:n,activeItemIndex:u}}let Mu={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,o)=>{var r;let n=To(e),u=ho(o,{resolveItems:()=>n.items,resolveActiveIndex:()=>n.activeItemIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled});return{...e,...n,searchQuery:"",activeItemIndex:u,activationTrigger:(r=o.trigger)!=null?r:1}},3:(e,o)=>{let r=e.searchQuery!==""?0:1,n=e.searchQuery+o.value.toLowerCase(),u=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+r).concat(e.items.slice(0,e.activeItemIndex+r)):e.items).find(a=>{var m;return((m=a.dataRef.current.textValue)==null?void 0:m.startsWith(n))&&!a.dataRef.current.disabled}),f=u?e.items.indexOf(u):-1;return f===-1||f===e.activeItemIndex?{...e,searchQuery:n}:{...e,searchQuery:n,activeItemIndex:f,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,o)=>{let r=To(e,n=>[...n,{id:o.id,dataRef:o.dataRef}]);return{...e,...r}},6:(e,o)=>{let r=To(e,n=>{let u=n.findIndex(f=>f.id===o.id);return u!==-1&&n.splice(u,1),n});return{...e,...r,activationTrigger:1}}},No=g.createContext(null);No.displayName="MenuContext";function Pr(e){let o=g.useContext(No);if(o===null){let r=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Pr),r}return o}function Pu(e,o){return xt(o.type,Mu,e,o)}let Fu=g.Fragment;function Ru(e,o){let{__demoMode:r=!1,...n}=e,u=g.useReducer(Pu,{__demoMode:r,menuState:r?0:1,buttonRef:g.createRef(),itemsRef:g.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:f,itemsRef:a,buttonRef:m},v]=u,x=Et(o);uo([m,a],(C,M)=>{var R;v({type:1}),so(M,lo.Loose)||(C.preventDefault(),(R=m.current)==null||R.focus())},f===0);let E=ie(()=>{v({type:1})}),k=g.useMemo(()=>({open:f===0,close:E}),[f,E]),P={ref:x};return g.createElement(No.Provider,{value:u},g.createElement(mo,{value:xt(f,{0:jt.Open,1:jt.Closed})},ht({ourProps:P,theirProps:n,slot:k,defaultTag:Fu,name:"Menu"})))}let Lu="button";function Au(e,o){var r;let n=Dt(),{id:u=`headlessui-menu-button-${n}`,...f}=e,[a,m]=Pr("Menu.Button"),v=Et(a.buttonRef,o),x=nn(),E=ie(R=>{switch(R.key){case Xe.Space:case Xe.Enter:case Xe.ArrowDown:R.preventDefault(),R.stopPropagation(),m({type:0}),x.nextFrame(()=>m({type:2,focus:it.First}));break;case Xe.ArrowUp:R.preventDefault(),R.stopPropagation(),m({type:0}),x.nextFrame(()=>m({type:2,focus:it.Last}));break}}),k=ie(R=>{switch(R.key){case Xe.Space:R.preventDefault();break}}),P=ie(R=>{if(Ir(R.currentTarget))return R.preventDefault();e.disabled||(a.menuState===0?(m({type:1}),x.nextFrame(()=>{var L;return(L=a.buttonRef.current)==null?void 0:L.focus({preventScroll:!0})})):(R.preventDefault(),m({type:0})))}),C=g.useMemo(()=>({open:a.menuState===0}),[a]),M={ref:v,id:u,type:co(e,a.buttonRef),"aria-haspopup":"menu","aria-controls":(r=a.itemsRef.current)==null?void 0:r.id,"aria-expanded":a.menuState===0,onKeyDown:E,onKeyUp:k,onClick:P};return ht({ourProps:M,theirProps:f,slot:C,defaultTag:Lu,name:"Menu.Button"})}let Du="div",$u=pn.RenderStrategy|pn.Static;function _u(e,o){var r,n;let u=Dt(),{id:f=`headlessui-menu-items-${u}`,...a}=e,[m,v]=Pr("Menu.Items"),x=Et(m.itemsRef,o),E=Sn(m.itemsRef),k=nn(),P=Vn(),C=P!==null?(P&jt.Open)===jt.Open:m.menuState===0;g.useEffect(()=>{let _=m.itemsRef.current;_&&m.menuState===0&&_!==(E==null?void 0:E.activeElement)&&_.focus({preventScroll:!0})},[m.menuState,m.itemsRef,E]),Pi({container:m.itemsRef.current,enabled:m.menuState===0,accept(_){return _.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:_.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(_){_.setAttribute("role","none")}});let M=ie(_=>{var z,X;switch(k.dispose(),_.key){case Xe.Space:if(m.searchQuery!=="")return _.preventDefault(),_.stopPropagation(),v({type:3,value:_.key});case Xe.Enter:if(_.preventDefault(),_.stopPropagation(),v({type:1}),m.activeItemIndex!==null){let{dataRef:ee}=m.items[m.activeItemIndex];(X=(z=ee.current)==null?void 0:z.domRef.current)==null||X.click()}Ci(m.buttonRef.current);break;case Xe.ArrowDown:return _.preventDefault(),_.stopPropagation(),v({type:2,focus:it.Next});case Xe.ArrowUp:return _.preventDefault(),_.stopPropagation(),v({type:2,focus:it.Previous});case Xe.Home:case Xe.PageUp:return _.preventDefault(),_.stopPropagation(),v({type:2,focus:it.First});case Xe.End:case Xe.PageDown:return _.preventDefault(),_.stopPropagation(),v({type:2,focus:it.Last});case Xe.Escape:_.preventDefault(),_.stopPropagation(),v({type:1}),Wt().nextFrame(()=>{var ee;return(ee=m.buttonRef.current)==null?void 0:ee.focus({preventScroll:!0})});break;case Xe.Tab:_.preventDefault(),_.stopPropagation(),v({type:1}),Wt().nextFrame(()=>{Ls(m.buttonRef.current,_.shiftKey?rn.Previous:rn.Next)});break;default:_.key.length===1&&(v({type:3,value:_.key}),k.setTimeout(()=>v({type:4}),350));break}}),R=ie(_=>{switch(_.key){case Xe.Space:_.preventDefault();break}}),L=g.useMemo(()=>({open:m.menuState===0}),[m]),B={"aria-activedescendant":m.activeItemIndex===null||(r=m.items[m.activeItemIndex])==null?void 0:r.id,"aria-labelledby":(n=m.buttonRef.current)==null?void 0:n.id,id:f,onKeyDown:M,onKeyUp:R,role:"menu",tabIndex:0,ref:x};return ht({ourProps:B,theirProps:a,slot:L,defaultTag:Du,features:$u,visible:C,name:"Menu.Items"})}let Bu=g.Fragment;function zu(e,o){let r=Dt(),{id:n=`headlessui-menu-item-${r}`,disabled:u=!1,...f}=e,[a,m]=Pr("Menu.Item"),v=a.activeItemIndex!==null?a.items[a.activeItemIndex].id===n:!1,x=g.useRef(null),E=Et(o,x);ot(()=>{if(a.__demoMode||a.menuState!==0||!v||a.activationTrigger===0)return;let ee=Wt();return ee.requestAnimationFrame(()=>{var ue,we;(we=(ue=x.current)==null?void 0:ue.scrollIntoView)==null||we.call(ue,{block:"nearest"})}),ee.dispose},[a.__demoMode,x,v,a.menuState,a.activationTrigger,a.activeItemIndex]);let k=Nu(x),P=g.useRef({disabled:u,domRef:x,get textValue(){return k()}});ot(()=>{P.current.disabled=u},[P,u]),ot(()=>(m({type:5,id:n,dataRef:P}),()=>m({type:6,id:n})),[P,n]);let C=ie(()=>{m({type:1})}),M=ie(ee=>{if(u)return ee.preventDefault();m({type:1}),Ci(a.buttonRef.current)}),R=ie(()=>{if(u)return m({type:2,focus:it.Nothing});m({type:2,focus:it.Specific,id:n})}),L=Mi(),B=ie(ee=>L.update(ee)),_=ie(ee=>{L.wasMoved(ee)&&(u||v||m({type:2,focus:it.Specific,id:n,trigger:0}))}),z=ie(ee=>{L.wasMoved(ee)&&(u||v&&m({type:2,focus:it.Nothing}))}),X=g.useMemo(()=>({active:v,disabled:u,close:C}),[v,u,C]);return ht({ourProps:{id:n,ref:E,role:"menuitem",tabIndex:u===!0?void 0:-1,"aria-disabled":u===!0?!0:void 0,disabled:void 0,onClick:M,onFocus:R,onPointerEnter:B,onMouseEnter:B,onPointerMove:_,onMouseMove:_,onPointerLeave:z,onMouseLeave:z},theirProps:f,slot:X,defaultTag:Bu,name:"Menu.Item"})}let Wu=vt(Ru),Hu=vt(Au),Uu=vt(_u),Vu=vt(zu),Fr=Object.assign(Wu,{Button:Hu,Items:Uu,Item:Vu}),Qi=g.createContext(null);function el(){let e=g.useContext(Qi);if(e===null){let o=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(o,el),o}return e}function Zu(){let[e,o]=g.useState([]);return[e.length>0?e.join(" "):void 0,g.useMemo(()=>function(r){let n=ie(f=>(o(a=>[...a,f]),()=>o(a=>{let m=a.slice(),v=m.indexOf(f);return v!==-1&&m.splice(v,1),m}))),u=g.useMemo(()=>({register:n,slot:r.slot,name:r.name,props:r.props}),[n,r.slot,r.name,r.props]);return g.createElement(Qi.Provider,{value:u},r.children)},[o])]}let Yu="label";function Gu(e,o){let r=Dt(),{id:n=`headlessui-label-${r}`,passive:u=!1,...f}=e,a=el(),m=Et(o);ot(()=>a.register(n),[n,a.register]);let v={ref:m,...a.props,id:n};return u&&("onClick"in v&&(delete v.htmlFor,delete v.onClick),"onClick"in f&&delete f.onClick),ht({ourProps:v,theirProps:f,slot:a.slot||{},defaultTag:Yu,name:a.name||"Label"})}let qu=vt(Gu),Ku=Object.assign(qu,{});function Xu(e=0){let[o,r]=g.useState(e),n=Yn(),u=g.useCallback(v=>{n.current&&r(x=>x|v)},[o,n]),f=g.useCallback(v=>!!(o&v),[o]),a=g.useCallback(v=>{n.current&&r(x=>x&~v)},[r,n]),m=g.useCallback(v=>{n.current&&r(x=>x^v)},[r]);return{flags:o,addFlag:u,hasFlag:f,removeFlag:a,toggleFlag:m}}let Oo=g.createContext(null);Oo.displayName="GroupContext";let Ju=g.Fragment;function Qu(e){var o;let[r,n]=g.useState(null),[u,f]=Zu(),[a,m]=Gi(),v=g.useMemo(()=>({switch:r,setSwitch:n,labelledby:u,describedby:a}),[r,n,u,a]),x={},E=e;return g.createElement(m,{name:"Switch.Description"},g.createElement(f,{name:"Switch.Label",props:{htmlFor:(o=v.switch)==null?void 0:o.id,onClick(k){r&&(k.currentTarget.tagName==="LABEL"&&k.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},g.createElement(Oo.Provider,{value:v},ht({ourProps:x,theirProps:E,defaultTag:Ju,name:"Switch.Group"}))))}let ec="button";function tc(e,o){var r;let n=Dt(),{id:u=`headlessui-switch-${n}`,checked:f,defaultChecked:a=!1,onChange:m,disabled:v=!1,name:x,value:E,form:k,...P}=e,C=g.useContext(Oo),M=g.useRef(null),R=Et(M,o,C===null?null:C.setSwitch),[L,B]=yi(f,m,a),_=ie(()=>B==null?void 0:B(!L)),z=ie(be=>{if(Ir(be.currentTarget))return be.preventDefault();be.preventDefault(),_()}),X=ie(be=>{be.key===Xe.Space?(be.preventDefault(),_()):be.key===Xe.Enter&&Us(be.currentTarget)}),ee=ie(be=>be.preventDefault()),ue=g.useMemo(()=>({checked:L}),[L]),we={id:u,ref:R,role:"switch",type:co(e,M),tabIndex:e.tabIndex===-1?0:(r=e.tabIndex)!=null?r:0,"aria-checked":L,"aria-labelledby":C==null?void 0:C.labelledby,"aria-describedby":C==null?void 0:C.describedby,disabled:v,onClick:z,onKeyUp:X,onKeyPress:ee},Oe=nn();return g.useEffect(()=>{var be;let y=(be=M.current)==null?void 0:be.closest("form");y&&a!==void 0&&Oe.addEventListener(y,"reset",()=>{B(a)})},[M,B]),g.createElement(g.Fragment,null,x!=null&&L&&g.createElement(Un,{features:Pn.Hidden,...kr({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:v,form:k,checked:L,name:x,value:E})}),ht({ourProps:we,theirProps:P,slot:ue,defaultTag:ec,name:"Switch"}))}let nc=vt(tc),rc=Qu,oc=Object.assign(nc,{Group:rc,Label:Ku,Description:qi});function ic(e){let o={called:!1};return(...r)=>{if(!o.called)return o.called=!0,e(...r)}}function ko(e,...o){e&&o.length>0&&e.classList.add(...o)}function Io(e,...o){e&&o.length>0&&e.classList.remove(...o)}function lc(e,o){let r=Wt();if(!e)return r.dispose;let{transitionDuration:n,transitionDelay:u}=getComputedStyle(e),[f,a]=[n,u].map(v=>{let[x=0]=v.split(",").filter(Boolean).map(E=>E.includes("ms")?parseFloat(E):parseFloat(E)*1e3).sort((E,k)=>k-E);return x}),m=f+a;if(m!==0){r.group(x=>{x.setTimeout(()=>{o(),x.dispose()},m),x.addEventListener(e,"transitionrun",E=>{E.target===E.currentTarget&&x.dispose()})});let v=r.addEventListener(e,"transitionend",x=>{x.target===x.currentTarget&&(o(),v())})}else o();return r.add(()=>o()),r.dispose}function sc(e,o,r,n){let u=r?"enter":"leave",f=Wt(),a=n!==void 0?ic(n):()=>{};u==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let m=xt(u,{enter:()=>o.enter,leave:()=>o.leave}),v=xt(u,{enter:()=>o.enterTo,leave:()=>o.leaveTo}),x=xt(u,{enter:()=>o.enterFrom,leave:()=>o.leaveFrom});return Io(e,...o.base,...o.enter,...o.enterTo,...o.enterFrom,...o.leave,...o.leaveFrom,...o.leaveTo,...o.entered),ko(e,...o.base,...m,...x),f.nextFrame(()=>{Io(e,...o.base,...m,...x),ko(e,...o.base,...m,...v),lc(e,()=>(Io(e,...o.base,...m),ko(e,...o.base,...o.entered),a()))}),f.dispose}function ac({immediate:e,container:o,direction:r,classes:n,onStart:u,onStop:f}){let a=Yn(),m=nn(),v=Vt(r);ot(()=>{e&&(v.current="enter")},[e]),ot(()=>{let x=Wt();m.add(x.dispose);let E=o.current;if(E&&v.current!=="idle"&&a.current)return x.dispose(),u.current(v.current),x.add(sc(E,n.current,v.current==="enter",()=>{x.dispose(),f.current(v.current)})),x.dispose},[r])}function hn(e=""){return e.split(/\s+/).filter(o=>o.length>1)}let Rr=g.createContext(null);Rr.displayName="TransitionContext";var uc=(e=>(e.Visible="visible",e.Hidden="hidden",e))(uc||{});function cc(){let e=g.useContext(Rr);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function dc(){let e=g.useContext(Lr);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Lr=g.createContext(null);Lr.displayName="NestingContext";function Ar(e){return"children"in e?Ar(e.children):e.current.filter(({el:o})=>o.current!==null).filter(({state:o})=>o==="visible").length>0}function tl(e,o){let r=Vt(e),n=g.useRef([]),u=Yn(),f=nn(),a=ie((C,M=mn.Hidden)=>{let R=n.current.findIndex(({el:L})=>L===C);R!==-1&&(xt(M,{[mn.Unmount](){n.current.splice(R,1)},[mn.Hidden](){n.current[R].state="hidden"}}),f.microTask(()=>{var L;!Ar(n)&&u.current&&((L=r.current)==null||L.call(r))}))}),m=ie(C=>{let M=n.current.find(({el:R})=>R===C);return M?M.state!=="visible"&&(M.state="visible"):n.current.push({el:C,state:"visible"}),()=>a(C,mn.Unmount)}),v=g.useRef([]),x=g.useRef(Promise.resolve()),E=g.useRef({enter:[],leave:[],idle:[]}),k=ie((C,M,R)=>{v.current.splice(0),o&&(o.chains.current[M]=o.chains.current[M].filter(([L])=>L!==C)),o==null||o.chains.current[M].push([C,new Promise(L=>{v.current.push(L)})]),o==null||o.chains.current[M].push([C,new Promise(L=>{Promise.all(E.current[M].map(([B,_])=>_)).then(()=>L())})]),M==="enter"?x.current=x.current.then(()=>o==null?void 0:o.wait.current).then(()=>R(M)):R(M)}),P=ie((C,M,R)=>{Promise.all(E.current[M].splice(0).map(([L,B])=>B)).then(()=>{var L;(L=v.current.shift())==null||L()}).then(()=>R(M))});return g.useMemo(()=>({children:n,register:m,unregister:a,onStart:k,onStop:P,wait:x,chains:E}),[m,a,n,k,P,E,x])}function fc(){}let pc=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function nl(e){var o;let r={};for(let n of pc)r[n]=(o=e[n])!=null?o:fc;return r}function mc(e){let o=g.useRef(nl(e));return g.useEffect(()=>{o.current=nl(e)},[e]),o}let hc="div",rl=pn.RenderStrategy;function vc(e,o){var r,n;let{beforeEnter:u,afterEnter:f,beforeLeave:a,afterLeave:m,enter:v,enterFrom:x,enterTo:E,entered:k,leave:P,leaveFrom:C,leaveTo:M,...R}=e,L=g.useRef(null),B=Et(L,o),_=(r=R.unmount)==null||r?mn.Unmount:mn.Hidden,{show:z,appear:X,initial:ee}=cc(),[ue,we]=g.useState(z?"visible":"hidden"),Oe=dc(),{register:be,unregister:y}=Oe;g.useEffect(()=>be(L),[be,L]),g.useEffect(()=>{if(_===mn.Hidden&&L.current){if(z&&ue!=="visible"){we("visible");return}return xt(ue,{hidden:()=>y(L),visible:()=>be(L)})}},[ue,L,be,y,z,_]);let he=Vt({base:hn(R.className),enter:hn(v),enterFrom:hn(x),enterTo:hn(E),entered:hn(k),leave:hn(P),leaveFrom:hn(C),leaveTo:hn(M)}),Pe=mc({beforeEnter:u,afterEnter:f,beforeLeave:a,afterLeave:m}),Ze=Mn();g.useEffect(()=>{if(Ze&&ue==="visible"&&L.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[L,ue,Ze]);let Ye=ee&&!X,Y=X&&z&&ee,Je=!Ze||Ye?"idle":z?"enter":"leave",Re=Xu(0),q=ie(tt=>xt(tt,{enter:()=>{Re.addFlag(jt.Opening),Pe.current.beforeEnter()},leave:()=>{Re.addFlag(jt.Closing),Pe.current.beforeLeave()},idle:()=>{}})),te=ie(tt=>xt(tt,{enter:()=>{Re.removeFlag(jt.Opening),Pe.current.afterEnter()},leave:()=>{Re.removeFlag(jt.Closing),Pe.current.afterLeave()},idle:()=>{}})),ve=tl(()=>{we("hidden"),y(L)},Oe),$e=g.useRef(!1);ac({immediate:Y,container:L,classes:he,direction:Je,onStart:Vt(tt=>{$e.current=!0,ve.onStart(L,tt,q)}),onStop:Vt(tt=>{$e.current=!1,ve.onStop(L,tt,te),tt==="leave"&&!Ar(ve)&&(we("hidden"),y(L))})});let We=R,lt={ref:B};return Y?We={...We,className:Nr(R.className,...he.current.enter,...he.current.enterFrom)}:$e.current&&(We.className=Nr(R.className,(n=L.current)==null?void 0:n.className),We.className===""&&delete We.className),g.createElement(Lr.Provider,{value:ve},g.createElement(mo,{value:xt(ue,{visible:jt.Open,hidden:jt.Closed})|Re.flags},ht({ourProps:lt,theirProps:We,defaultTag:hc,features:rl,visible:ue==="visible",name:"Transition.Child"})))}function gc(e,o){let{show:r,appear:n=!1,unmount:u=!0,...f}=e,a=g.useRef(null),m=Et(a,o);Mn();let v=Vn();if(r===void 0&&v!==null&&(r=(v&jt.Open)===jt.Open),![!0,!1].includes(r))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[x,E]=g.useState(r?"visible":"hidden"),k=tl(()=>{E("hidden")}),[P,C]=g.useState(!0),M=g.useRef([r]);ot(()=>{P!==!1&&M.current[M.current.length-1]!==r&&(M.current.push(r),C(!1))},[M,r]);let R=g.useMemo(()=>({show:r,appear:n,initial:P}),[r,n,P]);g.useEffect(()=>{if(r)E("visible");else if(!Ar(k))E("hidden");else{let z=a.current;if(!z)return;let X=z.getBoundingClientRect();X.x===0&&X.y===0&&X.width===0&&X.height===0&&E("hidden")}},[r,k]);let L={unmount:u},B=ie(()=>{var z;P&&C(!1),(z=e.beforeEnter)==null||z.call(e)}),_=ie(()=>{var z;P&&C(!1),(z=e.beforeLeave)==null||z.call(e)});return g.createElement(Lr.Provider,{value:k},g.createElement(Rr.Provider,{value:R},ht({ourProps:{...L,as:g.Fragment,children:g.createElement(ol,{ref:m,...L,...f,beforeEnter:B,beforeLeave:_})},theirProps:{},defaultTag:g.Fragment,features:rl,visible:x==="visible",name:"Transition"})))}function bc(e,o){let r=g.useContext(Rr)!==null,n=Vn()!==null;return g.createElement(g.Fragment,null,!r&&n?g.createElement(Mo,{ref:o,...e}):g.createElement(ol,{ref:o,...e}))}let Mo=vt(gc),ol=vt(vc),xc=vt(bc),vn=Object.assign(Mo,{Child:xc,Root:Mo});function yc({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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 wc=Z.forwardRef(yc);function Ec({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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 Sc=Z.forwardRef(Ec);function Cc({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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 jc=Z.forwardRef(Cc);function Tc({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.createElement("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z",clipRule:"evenodd"}))}const Nc=Z.forwardRef(Tc);function Oc({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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 Po=Z.forwardRef(Oc);function kc({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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 il=Z.forwardRef(kc);function Ic({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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 Mc=Z.forwardRef(Ic);function Pc({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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 Fc=Z.forwardRef(Pc);function Rc({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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 Lc=Z.forwardRef(Rc),Ac={warning:{color:"bg-yellow-50",icon:w.jsx(Mc,{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:w.jsx(Lc,{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:w.jsx(jc,{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:w.jsx(Fc,{className:"h-5 w-5 text-blue-400","aria-hidden":"true"}),colorTitle:"text-blue-800",colorText:"text-blue-700"}},Dc=({type:e="info",title:o,message:r,active:n=!1,time:u=1e3,onClose:f})=>{const[a,m]=g.useState(!1),v=g.useRef(null);g.useEffect(()=>(n&&(m(!0),v.current=setTimeout(()=>{m(!1),f&&f()},u)),()=>clearTimeout(v.current)),[n,u,f]);const x=Ac[e];return a?w.jsx("div",{className:"fixed top-2.5 left-1/2 transform -translate-x-1/2 w-80 3xs:w-96 z-50",children:w.jsx(vn,{as:g.Fragment,show:a,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:w.jsxs("div",{className:ae("rounded-md p-4 text-center",x.color),children:[w.jsxs("div",{className:"flex justify-center flex-shrink-0",children:[x.icon,w.jsx("h3",{className:ae("text-sm font-medium ml-3",x.colorTitle),children:o})]}),w.jsx("div",{className:ae("mt-2 text-sm",x.colorText),children:w.jsx("p",{children:r})})]})})}):null};function $c({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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 _c=Z.forwardRef($c);function Bc({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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 zc=Z.forwardRef(Bc);function Wc({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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"}),Z.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 Hc=Z.forwardRef(Wc);function Uc({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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 Vc=Z.forwardRef(Uc);function Zc({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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 Yc=Z.forwardRef(Zc);function Gc({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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 qc=Z.forwardRef(Gc),Kc=({src:e,alt:o,width:r,height:n,className:u="",classNameIcon:f="",isIcon:a=!0,acronym:m=""})=>{function v(){if(typeof m!="string")return m;const x=m.toLowerCase(),E=x.split(" "),k=E[E.length-1];return x.charAt(0)+k.charAt(0)}return w.jsx(w.Fragment,{children:e?w.jsx("img",{src:e,alt:o,width:r,height:n,className:ae(u!==""&&u),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s"},onLoad:x=>x.currentTarget.style.filter="none","data-testid":"img"}):a?w.jsx(Yc,{className:ae("bg-white text-default-4",f!==""?f:"w-7 h-7")}):w.jsx("div",{className:ae("bg-gray-200 text-default-4 rounded-full font-bold uppercase flex justify-center items-center",f!==""?f:"w-7 h-7"),children:v()})})},Xc=({steps:e,onClick:o})=>{const[r,n]=g.useState(0),u=f=>{n(f),o(f)};return w.jsx("nav",{className:"flex items-center justify-center w-full","aria-label":"Progress","data-testid":"bullets",children:w.jsx("ol",{role:"list",className:"flex items-center space-x-5",children:new Array(e).fill(1).map((f,a)=>w.jsx("li",{children:r!==a?w.jsx("div",{className:"cursor-pointer block h-2.5 w-2.5 rounded-full bg-gray-500 hover:bg-gray-600",onClick:()=>u(a),"data-testid":`step-${a}`,children:w.jsx("span",{className:"sr-only",children:"step"})}):w.jsxs("div",{className:"relative flex items-center justify-center cursor-pointer","aria-current":"step",children:[w.jsx("span",{className:"absolute flex h-5 w-5 p-px","aria-hidden":"true",children:w.jsx("span",{className:"h-full w-full rounded-full bg-gray-300"})}),w.jsx("span",{className:"relative block h-2.5 w-2.5 rounded-full bg-gray-500","aria-hidden":"true"}),w.jsx("span",{className:"sr-only",children:"step"})]})},a))})})};var ll={exports:{}};/*!
31
+ `));let P=E.props,C=typeof(P==null?void 0:P.className)=="function"?(...R)=>Nr(P==null?void 0:P.className(...R),v.className):Nr(P==null?void 0:P.className,v.className),M=C?{className:C}:{};return g.cloneElement(E,Object.assign({},Fi(E.props,kr(fo(v,["ref"]))),k,x,{ref:u(E.ref,x.ref)},M))}return g.createElement(f,Object.assign({},fo(v,["ref"]),f!==g.Fragment&&x,f!==g.Fragment&&k),E)}function $s(...e){return e.every(o=>o==null)?void 0:o=>{for(let r of e)r!=null&&(typeof r=="function"?r(o):r.current=o)}}function Fi(...e){if(e.length===0)return{};if(e.length===1)return e[0];let o={},r={};for(let n of e)for(let u in n)u.startsWith("on")&&typeof n[u]=="function"?(r[u]!=null||(r[u]=[]),r[u].push(n[u])):o[u]=n[u];if(o.disabled||o["aria-disabled"])return Object.assign(o,Object.fromEntries(Object.keys(r).map(n=>[n,void 0])));for(let n in r)Object.assign(o,{[n](u,...f){let a=r[n];for(let m of a){if((u instanceof Event||(u==null?void 0:u.nativeEvent)instanceof Event)&&u.defaultPrevented)return;m(u,...f)}}});return o}function vt(e){var o;return Object.assign(g.forwardRef(e),{displayName:(o=e.displayName)!=null?o:e.name})}function kr(e){let o=Object.assign({},e);for(let r in o)o[r]===void 0&&delete o[r];return o}function fo(e,o=[]){let r=Object.assign({},e);for(let n of o)n in r&&delete r[n];return r}let _s="div";var Pn=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Pn||{});function Bs(e,o){var r;let{features:n=1,...u}=e,f={ref:o,"aria-hidden":(n&2)===2?!0:(r=u["aria-hidden"])!=null?r:void 0,hidden:(n&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",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return ht({ourProps:f,theirProps:u,slot:{},defaultTag:_s,name:"Hidden"})}let Un=vt(Bs),po=g.createContext(null);po.displayName="OpenClosedContext";var jt=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(jt||{});function Vn(){return g.useContext(po)}function mo({value:e,children:o}){return g.createElement(po.Provider,{value:e},o)}function zs(e){function o(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",o))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",o),o())}let Kt=[];zs(()=>{function e(o){o.target instanceof HTMLElement&&o.target!==document.body&&Kt[0]!==o.target&&(Kt.unshift(o.target),Kt=Kt.filter(r=>r!=null&&r.isConnected),Kt.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 Ir(e){let o=e.parentElement,r=null;for(;o&&!(o instanceof HTMLFieldSetElement);)o instanceof HTMLLegendElement&&(r=o),o=o.parentElement;let n=(o==null?void 0:o.getAttribute("disabled"))==="";return n&&Ws(r)?!1:n}function Ws(e){if(!e)return!1;let o=e.previousElementSibling;for(;o!==null;){if(o instanceof HTMLLegendElement)return!1;o=o.previousElementSibling}return!0}function Hs(e){throw new Error("Unexpected object: "+e)}var it=(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))(it||{});function ho(e,o){let r=o.resolveItems();if(r.length<=0)return null;let n=o.resolveActiveIndex(),u=n??-1;switch(e.focus){case 0:{for(let f=0;f<r.length;++f)if(!o.resolveDisabled(r[f],f,r))return f;return n}case 1:{for(let f=u-1;f>=0;--f)if(!o.resolveDisabled(r[f],f,r))return f;return n}case 2:{for(let f=u+1;f<r.length;++f)if(!o.resolveDisabled(r[f],f,r))return f;return n}case 3:{for(let f=r.length-1;f>=0;--f)if(!o.resolveDisabled(r[f],f,r))return f;return n}case 4:{for(let f=0;f<r.length;++f)if(o.resolveId(r[f],f,r)===e.id)return f;return n}case 5:return null;default:Hs(e)}}function Ri(e={},o=null,r=[]){for(let[n,u]of Object.entries(e))Ai(r,Li(o,n),u);return r}function Li(e,o){return e?e+"["+o+"]":o}function Ai(e,o,r){if(Array.isArray(r))for(let[n,u]of r.entries())Ai(e,Li(o,n.toString()),u);else r instanceof Date?e.push([o,r.toISOString()]):typeof r=="boolean"?e.push([o,r?"1":"0"]):typeof r=="string"?e.push([o,r]):typeof r=="number"?e.push([o,`${r}`]):r==null?e.push([o,""]):Ri(r,o,e)}function Us(e){var o,r;let n=(o=e==null?void 0:e.form)!=null?o:e.closest("form");if(n){for(let u of n.elements)if(u!==e&&(u.tagName==="INPUT"&&u.type==="submit"||u.tagName==="BUTTON"&&u.type==="submit"||u.nodeName==="INPUT"&&u.type==="image")){u.click();return}(r=n.requestSubmit)==null||r.call(n)}}var Xe=(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))(Xe||{}),Vs=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Vs||{}),Zs=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Zs||{}),Ys=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(Ys||{}),Gs=(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))(Gs||{});function vo(e,o=r=>r){let r=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,n=o(e.options.slice()),u=n.length>0&&n[0].dataRef.current.order!==null?n.sort((a,m)=>a.dataRef.current.order-m.dataRef.current.order):ao(n,a=>a.dataRef.current.domRef.current),f=r?u.indexOf(r):null;return f===-1&&(f=null),{options:u,activeOptionIndex:f}}let qs={1(e){var o;return(o=e.dataRef.current)!=null&&o.disabled||e.comboboxState===1?e:{...e,activeOptionIndex:null,comboboxState:1}},0(e){var o,r;if((o=e.dataRef.current)!=null&&o.disabled||e.comboboxState===0)return e;if((r=e.dataRef.current)!=null&&r.value){let n=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(n!==-1)return{...e,activeOptionIndex:n,comboboxState:0}}return{...e,comboboxState:0}},2(e,o){var r,n,u,f,a;if((r=e.dataRef.current)!=null&&r.disabled||(n=e.dataRef.current)!=null&&n.optionsRef.current&&!((u=e.dataRef.current)!=null&&u.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let E=o.focus===it.Specific?o.idx:ho(o,{resolveItems:()=>e.virtual.options,resolveActiveIndex:()=>{var P,C;return(C=(P=e.activeOptionIndex)!=null?P:e.virtual.options.findIndex(M=>!e.virtual.disabled(M)))!=null?C:null},resolveDisabled:e.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),k=(f=o.trigger)!=null?f:2;return e.activeOptionIndex===E&&e.activationTrigger===k?e:{...e,activeOptionIndex:E,activationTrigger:k}}let m=vo(e);if(m.activeOptionIndex===null){let E=m.options.findIndex(k=>!k.dataRef.current.disabled);E!==-1&&(m.activeOptionIndex=E)}let v=o.focus===it.Specific?o.idx:ho(o,{resolveItems:()=>m.options,resolveActiveIndex:()=>m.activeOptionIndex,resolveId:E=>E.id,resolveDisabled:E=>E.dataRef.current.disabled}),x=(a=o.trigger)!=null?a:2;return e.activeOptionIndex===v&&e.activationTrigger===x?e:{...e,...m,activeOptionIndex:v,activationTrigger:x}},3:(e,o)=>{var r,n,u;if((r=e.dataRef.current)!=null&&r.virtual)return{...e,options:[...e.options,o.payload]};let f=o.payload,a=vo(e,v=>(v.push(f),v));e.activeOptionIndex===null&&(n=e.dataRef.current)!=null&&n.isSelected(o.payload.dataRef.current.value)&&(a.activeOptionIndex=a.options.indexOf(f));let m={...e,...a,activationTrigger:2};return(u=e.dataRef.current)!=null&&u.__demoMode&&e.dataRef.current.value===void 0&&(m.activeOptionIndex=0),m},4:(e,o)=>{var r;if((r=e.dataRef.current)!=null&&r.virtual)return{...e,options:e.options.filter(u=>u.id!==o.id)};let n=vo(e,u=>{let f=u.findIndex(a=>a.id===o.id);return f!==-1&&u.splice(f,1),u});return{...e,...n,activationTrigger:2}},5:(e,o)=>e.labelId===o.id?e:{...e,labelId:o.id},6:(e,o)=>e.activationTrigger===o.trigger?e:{...e,activationTrigger:o.trigger},7:(e,o)=>{var r;if(((r=e.virtual)==null?void 0:r.options)===o.options)return e;let n=e.activeOptionIndex;if(e.activeOptionIndex!==null){let u=o.options.indexOf(e.virtual.options[e.activeOptionIndex]);u!==-1?n=u:n=null}return{...e,activeOptionIndex:n,virtual:Object.assign({},e.virtual,{options:o.options})}}},go=g.createContext(null);go.displayName="ComboboxActionsContext";function Zn(e){let o=g.useContext(go);if(o===null){let r=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Zn),r}return o}let Di=g.createContext(null);function Ks(e){var o;let r=Cn("VirtualProvider"),[n,u]=g.useMemo(()=>{let v=r.optionsRef.current;if(!v)return[0,0];let x=window.getComputedStyle(v);return[parseFloat(x.paddingBlockStart||x.paddingTop),parseFloat(x.paddingBlockEnd||x.paddingBottom)]},[r.optionsRef.current]),f=Ts({scrollPaddingStart:n,scrollPaddingEnd:u,count:r.virtual.options.length,estimateSize(){return 40},getScrollElement(){var v;return(v=r.optionsRef.current)!=null?v:null},overscan:12}),[a,m]=g.useState(0);return ot(()=>{m(v=>v+1)},[(o=r.virtual)==null?void 0:o.options]),g.createElement(Di.Provider,{value:f},g.createElement("div",{style:{position:"relative",width:"100%",height:`${f.getTotalSize()}px`},ref:v=>{if(v){if(typeof process<"u"&&process.env.JEST_WORKER_ID!==void 0||r.activationTrigger===0)return;r.activeOptionIndex!==null&&r.virtual.options.length>r.activeOptionIndex&&f.scrollToIndex(r.activeOptionIndex)}}},f.getVirtualItems().map(v=>{var x;return g.createElement(g.Fragment,{key:v.key},g.cloneElement((x=e.children)==null?void 0:x.call(e,{option:r.virtual.options[v.index],open:r.comboboxState===0}),{key:`${a}-${v.key}`,"data-index":v.index,"aria-setsize":r.virtual.options.length,"aria-posinset":v.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${v.start}px)`,overflowAnchor:"none"}}))})))}let bo=g.createContext(null);bo.displayName="ComboboxDataContext";function Cn(e){let o=g.useContext(bo);if(o===null){let r=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Cn),r}return o}function Xs(e,o){return xt(o.type,qs,e,o)}let Js=g.Fragment;function Qs(e,o){let{value:r,defaultValue:n,onChange:u,form:f,name:a,by:m=null,disabled:v=!1,__demoMode:x=!1,nullable:E=!1,multiple:k=!1,immediate:P=!1,virtual:C=null,...M}=e,R=!1,L=null,[B=k?[]:void 0,_]=yi(r,u,n),[z,X]=g.useReducer(Xs,{dataRef:g.createRef(),comboboxState:x?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),ee=g.useRef(!1),ue=g.useRef({static:!1,hold:!1}),we=g.useRef(null),Oe=g.useRef(null),be=g.useRef(null),y=g.useRef(null),he=ie(typeof m=="string"?(re,Ce)=>{let V=m;return(re==null?void 0:re[V])===(Ce==null?void 0:Ce[V])}:m??((re,Ce)=>re===Ce)),Pe=ie(re=>z.options.findIndex(Ce=>he(Ce.dataRef.current.value,re))),Ze=g.useCallback(re=>xt(Y.mode,{1:()=>B.some(Ce=>he(Ce,re)),0:()=>he(B,re)}),[B]),Ye=ie(re=>z.activeOptionIndex===Pe(re)),Y=g.useMemo(()=>({...z,immediate:R,optionsPropsRef:ue,labelRef:we,inputRef:Oe,buttonRef:be,optionsRef:y,value:B,defaultValue:n,disabled:v,mode:k?1:0,virtual:z.virtual,get activeOptionIndex(){if(ee.current&&z.activeOptionIndex===null&&z.options.length>0){let re=z.options.findIndex(Ce=>!Ce.dataRef.current.disabled);if(re!==-1)return re}return z.activeOptionIndex},calculateIndex:Pe,compare:he,isSelected:Ze,isActive:Ye,nullable:E,__demoMode:x}),[B,n,v,k,E,x,z,L]);ot(()=>{},[L,void 0]),ot(()=>{z.dataRef.current=Y},[Y]),uo([Y.buttonRef,Y.inputRef,Y.optionsRef],()=>St.closeCombobox(),Y.comboboxState===0);let Je=g.useMemo(()=>{var re,Ce,V;return{open:Y.comboboxState===0,disabled:v,activeIndex:Y.activeOptionIndex,activeOption:Y.activeOptionIndex===null?null:Y.virtual?Y.virtual.options[(re=Y.activeOptionIndex)!=null?re:0]:(V=(Ce=Y.options[Y.activeOptionIndex])==null?void 0:Ce.dataRef.current.value)!=null?V:null,value:B}},[Y,v,B]),Re=ie(()=>{if(Y.activeOptionIndex!==null){if(Y.virtual)lt(Y.virtual.options[Y.activeOptionIndex]);else{let{dataRef:re}=Y.options[Y.activeOptionIndex];lt(re.current.value)}St.goToOption(it.Specific,Y.activeOptionIndex)}}),q=ie(()=>{X({type:0}),ee.current=!0}),te=ie(()=>{X({type:1}),ee.current=!1}),ve=ie((re,Ce,V)=>(ee.current=!1,re===it.Specific?X({type:2,focus:it.Specific,idx:Ce,trigger:V}):X({type:2,focus:re,trigger:V}))),$e=ie((re,Ce)=>(X({type:3,payload:{id:re,dataRef:Ce}}),()=>{Y.isActive(Ce.current.value)&&(ee.current=!0),X({type:4,id:re})})),We=ie(re=>(X({type:5,id:re}),()=>X({type:5,id:null}))),lt=ie(re=>xt(Y.mode,{0(){return _==null?void 0:_(re)},1(){let Ce=Y.value.slice(),V=Ce.findIndex(Ee=>he(Ee,re));return V===-1?Ce.push(re):Ce.splice(V,1),_==null?void 0:_(Ce)}})),tt=ie(re=>{X({type:6,trigger:re})}),St=g.useMemo(()=>({onChange:lt,registerOption:$e,registerLabel:We,goToOption:ve,closeCombobox:te,openCombobox:q,setActivationTrigger:tt,selectActiveOption:Re}),[]),Lt=o===null?{}:{ref:o},ge=g.useRef(null),st=nn();return g.useEffect(()=>{ge.current&&n!==void 0&&st.addEventListener(ge.current,"reset",()=>{_==null||_(n)})},[ge,_]),g.createElement(go.Provider,{value:St},g.createElement(bo.Provider,{value:Y},g.createElement(mo,{value:xt(Y.comboboxState,{0:jt.Open,1:jt.Closed})},a!=null&&B!=null&&Ri({[a]:B}).map(([re,Ce],V)=>g.createElement(Un,{features:Pn.Hidden,ref:V===0?Ee=>{var ke;ge.current=(ke=Ee==null?void 0:Ee.closest("form"))!=null?ke:null}:void 0,...kr({key:re,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:f,disabled:v,name:re,value:Ce})})),ht({ourProps:Lt,theirProps:M,slot:Je,defaultTag:Js,name:"Combobox"}))))}let ea="input";function ta(e,o){var r,n,u,f,a;let m=Dt(),{id:v=`headlessui-combobox-input-${m}`,onChange:x,displayValue:E,type:k="text",...P}=e,C=Cn("Combobox.Input"),M=Zn("Combobox.Input"),R=Et(C.inputRef,o),L=Sn(C.inputRef),B=g.useRef(!1),_=nn(),z=ie(()=>{M.onChange(null),C.optionsRef.current&&(C.optionsRef.current.scrollTop=0),M.goToOption(it.Nothing)}),X=function(){var Y;return typeof E=="function"&&C.value!==void 0?(Y=E(C.value))!=null?Y:"":typeof C.value=="string"?C.value:""}();Hn(([Y,Je],[Re,q])=>{if(B.current)return;let te=C.inputRef.current;te&&((q===0&&Je===1||Y!==Re)&&(te.value=Y),requestAnimationFrame(()=>{if(B.current||!te||(L==null?void 0:L.activeElement)!==te)return;let{selectionStart:ve,selectionEnd:$e}=te;Math.abs(($e??0)-(ve??0))===0&&ve===0&&te.setSelectionRange(te.value.length,te.value.length)}))},[X,C.comboboxState,L]),Hn(([Y],[Je])=>{if(Y===0&&Je===1){if(B.current)return;let Re=C.inputRef.current;if(!Re)return;let q=Re.value,{selectionStart:te,selectionEnd:ve,selectionDirection:$e}=Re;Re.value="",Re.value=q,$e!==null?Re.setSelectionRange(te,ve,$e):Re.setSelectionRange(te,ve)}},[C.comboboxState]);let ee=g.useRef(!1),ue=ie(()=>{ee.current=!0}),we=ie(()=>{_.nextFrame(()=>{ee.current=!1})}),Oe=ie(Y=>{switch(B.current=!0,Y.key){case Xe.Enter:if(B.current=!1,C.comboboxState!==0||ee.current)return;if(Y.preventDefault(),Y.stopPropagation(),C.activeOptionIndex===null){M.closeCombobox();return}M.selectActiveOption(),C.mode===0&&M.closeCombobox();break;case Xe.ArrowDown:return B.current=!1,Y.preventDefault(),Y.stopPropagation(),xt(C.comboboxState,{0:()=>M.goToOption(it.Next),1:()=>M.openCombobox()});case Xe.ArrowUp:return B.current=!1,Y.preventDefault(),Y.stopPropagation(),xt(C.comboboxState,{0:()=>M.goToOption(it.Previous),1:()=>{M.openCombobox(),_.nextFrame(()=>{C.value||M.goToOption(it.Last)})}});case Xe.Home:if(Y.shiftKey)break;return B.current=!1,Y.preventDefault(),Y.stopPropagation(),M.goToOption(it.First);case Xe.PageUp:return B.current=!1,Y.preventDefault(),Y.stopPropagation(),M.goToOption(it.First);case Xe.End:if(Y.shiftKey)break;return B.current=!1,Y.preventDefault(),Y.stopPropagation(),M.goToOption(it.Last);case Xe.PageDown:return B.current=!1,Y.preventDefault(),Y.stopPropagation(),M.goToOption(it.Last);case Xe.Escape:return B.current=!1,C.comboboxState!==0?void 0:(Y.preventDefault(),C.optionsRef.current&&!C.optionsPropsRef.current.static&&Y.stopPropagation(),C.nullable&&C.mode===0&&C.value===null&&z(),M.closeCombobox());case Xe.Tab:if(B.current=!1,C.comboboxState!==0)return;C.mode===0&&C.activationTrigger!==1&&M.selectActiveOption(),M.closeCombobox();break}}),be=ie(Y=>{x==null||x(Y),C.nullable&&C.mode===0&&Y.target.value===""&&z(),M.openCombobox()}),y=ie(Y=>{var Je,Re,q;let te=(Je=Y.relatedTarget)!=null?Je:Kt.find(ve=>ve!==Y.currentTarget);if(B.current=!1,!((Re=C.optionsRef.current)!=null&&Re.contains(te))&&!((q=C.buttonRef.current)!=null&&q.contains(te))&&C.comboboxState===0)return Y.preventDefault(),C.mode===0&&(C.nullable&&C.value===null?z():C.activationTrigger!==1&&M.selectActiveOption()),M.closeCombobox()}),he=ie(Y=>{var Je,Re,q;let te=(Je=Y.relatedTarget)!=null?Je:Kt.find(ve=>ve!==Y.currentTarget);(Re=C.buttonRef.current)!=null&&Re.contains(te)||(q=C.optionsRef.current)!=null&&q.contains(te)||C.disabled||C.immediate&&C.comboboxState!==0&&(M.openCombobox(),_.nextFrame(()=>{M.setActivationTrigger(1)}))}),Pe=oo(()=>{if(C.labelId)return[C.labelId].join(" ")},[C.labelId]),Ze=g.useMemo(()=>({open:C.comboboxState===0,disabled:C.disabled}),[C]),Ye={ref:R,id:v,role:"combobox",type:k,"aria-controls":(r=C.optionsRef.current)==null?void 0:r.id,"aria-expanded":C.comboboxState===0,"aria-activedescendant":C.activeOptionIndex===null?void 0:C.virtual?(n=C.options.find(Y=>{var Je;return!((Je=C.virtual)!=null&&Je.disabled(Y.dataRef.current.value))&&C.compare(Y.dataRef.current.value,C.virtual.options[C.activeOptionIndex])}))==null?void 0:n.id:(u=C.options[C.activeOptionIndex])==null?void 0:u.id,"aria-labelledby":Pe,"aria-autocomplete":"list",defaultValue:(a=(f=e.defaultValue)!=null?f:C.defaultValue!==void 0?E==null?void 0:E(C.defaultValue):null)!=null?a:C.defaultValue,disabled:C.disabled,onCompositionStart:ue,onCompositionEnd:we,onKeyDown:Oe,onChange:be,onFocus:he,onBlur:y};return ht({ourProps:Ye,theirProps:P,slot:Ze,defaultTag:ea,name:"Combobox.Input"})}let na="button";function ra(e,o){var r;let n=Cn("Combobox.Button"),u=Zn("Combobox.Button"),f=Et(n.buttonRef,o),a=Dt(),{id:m=`headlessui-combobox-button-${a}`,...v}=e,x=nn(),E=ie(R=>{switch(R.key){case Xe.ArrowDown:return R.preventDefault(),R.stopPropagation(),n.comboboxState===1&&u.openCombobox(),x.nextFrame(()=>{var L;return(L=n.inputRef.current)==null?void 0:L.focus({preventScroll:!0})});case Xe.ArrowUp:return R.preventDefault(),R.stopPropagation(),n.comboboxState===1&&(u.openCombobox(),x.nextFrame(()=>{n.value||u.goToOption(it.Last)})),x.nextFrame(()=>{var L;return(L=n.inputRef.current)==null?void 0:L.focus({preventScroll:!0})});case Xe.Escape:return n.comboboxState!==0?void 0:(R.preventDefault(),n.optionsRef.current&&!n.optionsPropsRef.current.static&&R.stopPropagation(),u.closeCombobox(),x.nextFrame(()=>{var L;return(L=n.inputRef.current)==null?void 0:L.focus({preventScroll:!0})}));default:return}}),k=ie(R=>{if(Ir(R.currentTarget))return R.preventDefault();n.comboboxState===0?u.closeCombobox():(R.preventDefault(),u.openCombobox()),x.nextFrame(()=>{var L;return(L=n.inputRef.current)==null?void 0:L.focus({preventScroll:!0})})}),P=oo(()=>{if(n.labelId)return[n.labelId,m].join(" ")},[n.labelId,m]),C=g.useMemo(()=>({open:n.comboboxState===0,disabled:n.disabled,value:n.value}),[n]),M={ref:f,id:m,type:co(e,n.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(r=n.optionsRef.current)==null?void 0:r.id,"aria-expanded":n.comboboxState===0,"aria-labelledby":P,disabled:n.disabled,onClick:k,onKeyDown:E};return ht({ourProps:M,theirProps:v,slot:C,defaultTag:na,name:"Combobox.Button"})}let oa="label";function ia(e,o){let r=Dt(),{id:n=`headlessui-combobox-label-${r}`,...u}=e,f=Cn("Combobox.Label"),a=Zn("Combobox.Label"),m=Et(f.labelRef,o);ot(()=>a.registerLabel(n),[n]);let v=ie(()=>{var E;return(E=f.inputRef.current)==null?void 0:E.focus({preventScroll:!0})}),x=g.useMemo(()=>({open:f.comboboxState===0,disabled:f.disabled}),[f]);return ht({ourProps:{ref:m,id:n,onClick:v},theirProps:u,slot:x,defaultTag:oa,name:"Combobox.Label"})}let la="ul",sa=pn.RenderStrategy|pn.Static;function aa(e,o){let r=Dt(),{id:n=`headlessui-combobox-options-${r}`,hold:u=!1,...f}=e,a=Cn("Combobox.Options"),m=Et(a.optionsRef,o),v=Vn(),x=v!==null?(v&jt.Open)===jt.Open:a.comboboxState===0;ot(()=>{var C;a.optionsPropsRef.current.static=(C=e.static)!=null?C:!1},[a.optionsPropsRef,e.static]),ot(()=>{a.optionsPropsRef.current.hold=u},[a.optionsPropsRef,u]),Pi({container:a.optionsRef.current,enabled:a.comboboxState===0,accept(C){return C.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:C.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(C){C.setAttribute("role","none")}});let E=oo(()=>{var C,M;return(M=a.labelId)!=null?M:(C=a.buttonRef.current)==null?void 0:C.id},[a.labelId,a.buttonRef.current]),k=g.useMemo(()=>({open:a.comboboxState===0,option:void 0}),[a]),P={"aria-labelledby":E,role:"listbox","aria-multiselectable":a.mode===1?!0:void 0,id:n,ref:m};return a.virtual&&a.comboboxState===0&&Object.assign(f,{children:g.createElement(Ks,null,f.children)}),ht({ourProps:P,theirProps:f,slot:k,defaultTag:la,features:sa,visible:x,name:"Combobox.Options"})}let ua="li";function ca(e,o){var r;let n=Dt(),{id:u=`headlessui-combobox-option-${n}`,disabled:f=!1,value:a,order:m=null,...v}=e,x=Cn("Combobox.Option"),E=Zn("Combobox.Option"),k=x.virtual?x.activeOptionIndex===x.calculateIndex(a):x.activeOptionIndex===null?!1:((r=x.options[x.activeOptionIndex])==null?void 0:r.id)===u,P=x.isSelected(a),C=g.useRef(null),M=Vt({disabled:f,value:a,domRef:C,order:m}),R=g.useContext(Di),L=Et(o,C,R?R.measureElement:null),B=ie(()=>E.onChange(a));ot(()=>E.registerOption(u,M),[M,u]);let _=g.useRef(!(x.virtual||x.__demoMode));ot(()=>{if(!x.virtual||!x.__demoMode)return;let y=Wt();return y.requestAnimationFrame(()=>{_.current=!0}),y.dispose},[x.virtual,x.__demoMode]),ot(()=>{if(!_.current||x.comboboxState!==0||!k||x.activationTrigger===0)return;let y=Wt();return y.requestAnimationFrame(()=>{var he,Pe;(Pe=(he=C.current)==null?void 0:he.scrollIntoView)==null||Pe.call(he,{block:"nearest"})}),y.dispose},[C,k,x.comboboxState,x.activationTrigger,x.activeOptionIndex]);let z=ie(y=>{var he;if(f||(he=x.virtual)!=null&&he.disabled(a))return y.preventDefault();B(),Ti()||requestAnimationFrame(()=>{var Pe;return(Pe=x.inputRef.current)==null?void 0:Pe.focus({preventScroll:!0})}),x.mode===0&&requestAnimationFrame(()=>E.closeCombobox())}),X=ie(()=>{var y;if(f||(y=x.virtual)!=null&&y.disabled(a))return E.goToOption(it.Nothing);let he=x.calculateIndex(a);E.goToOption(it.Specific,he)}),ee=Mi(),ue=ie(y=>ee.update(y)),we=ie(y=>{var he;if(!ee.wasMoved(y)||f||(he=x.virtual)!=null&&he.disabled(a)||k)return;let Pe=x.calculateIndex(a);E.goToOption(it.Specific,Pe,0)}),Oe=ie(y=>{var he;ee.wasMoved(y)&&(f||(he=x.virtual)!=null&&he.disabled(a)||k&&(x.optionsPropsRef.current.hold||E.goToOption(it.Nothing)))}),be=g.useMemo(()=>({active:k,selected:P,disabled:f}),[k,P,f]);return ht({ourProps:{id:u,ref:L,role:"option",tabIndex:f===!0?void 0:-1,"aria-disabled":f===!0?!0:void 0,"aria-selected":P,disabled:void 0,onClick:z,onFocus:X,onPointerEnter:ue,onMouseEnter:ue,onPointerMove:we,onMouseMove:we,onPointerLeave:Oe,onMouseLeave:Oe},theirProps:v,slot:be,defaultTag:ua,name:"Combobox.Option"})}let da=vt(Qs),fa=vt(ra),pa=vt(ta),ma=vt(ia),ha=vt(aa),va=vt(ca),on=Object.assign(da,{Input:pa,Button:fa,Label:ma,Options:ha,Option:va});function $i(e,o,r,n){let u=Vt(r);g.useEffect(()=>{e=e??window;function f(a){u.current(a)}return e.addEventListener(o,f,n),()=>e.removeEventListener(o,f,n)},[e,o,n])}function Yn(){let e=g.useRef(!1);return ot(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function _i(e){let o=ie(e),r=g.useRef(!1);g.useEffect(()=>(r.current=!1,()=>{r.current=!0,Cr(()=>{r.current&&o()})}),[o])}var Gn=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Gn||{});function ga(){let e=g.useRef(0);return Ni("keydown",o=>{o.key==="Tab"&&(e.current=o.shiftKey?1:0)},!0),e}function Bi(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let o=new Set;for(let r of e.current)r.current instanceof HTMLElement&&o.add(r.current);return o}let ba="div";var zi=(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))(zi||{});function xa(e,o){let r=g.useRef(null),n=Et(r,o),{initialFocus:u,containers:f,features:a=30,...m}=e;Mn()||(a=1);let v=Sn(r);Ea({ownerDocument:v},!!(a&16));let x=Sa({ownerDocument:v,container:r,initialFocus:u},!!(a&2));Ca({ownerDocument:v,container:r,containers:f,previousActiveElement:x},!!(a&8));let E=ga(),k=ie(R=>{let L=r.current;L&&(B=>B())(()=>{xt(E.current,{[Gn.Forwards]:()=>{Wn(L,rn.First,{skipElements:[R.relatedTarget]})},[Gn.Backwards]:()=>{Wn(L,rn.Last,{skipElements:[R.relatedTarget]})}})})}),P=nn(),C=g.useRef(!1),M={ref:n,onKeyDown(R){R.key=="Tab"&&(C.current=!0,P.requestAnimationFrame(()=>{C.current=!1}))},onBlur(R){let L=Bi(f);r.current instanceof HTMLElement&&L.add(r.current);let B=R.relatedTarget;B instanceof HTMLElement&&B.dataset.headlessuiFocusGuard!=="true"&&(Wi(L,B)||(C.current?Wn(r.current,xt(E.current,{[Gn.Forwards]:()=>rn.Next,[Gn.Backwards]:()=>rn.Previous})|rn.WrapAround,{relativeTo:R.target}):R.target instanceof HTMLElement&&fn(R.target)))}};return g.createElement(g.Fragment,null,!!(a&4)&&g.createElement(Un,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:k,features:Pn.Focusable}),ht({ourProps:M,theirProps:m,defaultTag:ba,name:"FocusTrap"}),!!(a&4)&&g.createElement(Un,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:k,features:Pn.Focusable}))}let ya=vt(xa),qn=Object.assign(ya,{features:zi});function wa(e=!0){let o=g.useRef(Kt.slice());return Hn(([r],[n])=>{n===!0&&r===!1&&Cr(()=>{o.current.splice(0)}),n===!1&&r===!0&&(o.current=Kt.slice())},[e,Kt,o]),ie(()=>{var r;return(r=o.current.find(n=>n!=null&&n.isConnected))!=null?r:null})}function Ea({ownerDocument:e},o){let r=wa(o);Hn(()=>{o||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&fn(r())},[o]),_i(()=>{o&&fn(r())})}function Sa({ownerDocument:e,container:o,initialFocus:r},n){let u=g.useRef(null),f=Yn();return Hn(()=>{if(!n)return;let a=o.current;a&&Cr(()=>{if(!f.current)return;let m=e==null?void 0:e.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===m){u.current=m;return}}else if(a.contains(m)){u.current=m;return}r!=null&&r.current?fn(r.current):Wn(a,rn.First)===Ei.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),u.current=e==null?void 0:e.activeElement})},[n]),u}function Ca({ownerDocument:e,container:o,containers:r,previousActiveElement:n},u){let f=Yn();$i(e==null?void 0:e.defaultView,"focus",a=>{if(!u||!f.current)return;let m=Bi(r);o.current instanceof HTMLElement&&m.add(o.current);let v=n.current;if(!v)return;let x=a.target;x&&x instanceof HTMLElement?Wi(m,x)?(n.current=x,fn(x)):(a.preventDefault(),a.stopPropagation(),fn(v)):fn(n.current)},!0)}function Wi(e,o){for(let r of e)if(r.contains(o))return!0;return!1}let Hi=g.createContext(!1);function ja(){return g.useContext(Hi)}function xo(e){return g.createElement(Hi.Provider,{value:e.force},e.children)}function Ta(e){let o=ja(),r=g.useContext(Ui),n=Sn(e),[u,f]=g.useState(()=>{if(!o&&r!==null||tn.isServer)return null;let a=n==null?void 0:n.getElementById("headlessui-portal-root");if(a)return a;if(n===null)return null;let m=n.createElement("div");return m.setAttribute("id","headlessui-portal-root"),n.body.appendChild(m)});return g.useEffect(()=>{u!==null&&(n!=null&&n.body.contains(u)||n==null||n.body.appendChild(u))},[u,n]),g.useEffect(()=>{o||r!==null&&f(r.current)},[r,f,o]),u}let Na=g.Fragment;function Oa(e,o){let r=e,n=g.useRef(null),u=Et(Ds(E=>{n.current=E}),o),f=Sn(n),a=Ta(n),[m]=g.useState(()=>{var E;return tn.isServer?null:(E=f==null?void 0:f.createElement("div"))!=null?E:null}),v=g.useContext(yo),x=Mn();return ot(()=>{!a||!m||a.contains(m)||(m.setAttribute("data-headlessui-portal",""),a.appendChild(m))},[a,m]),ot(()=>{if(m&&v)return v.register(m)},[v,m]),_i(()=>{var E;!a||!m||(m instanceof Node&&a.contains(m)&&a.removeChild(m),a.childNodes.length<=0&&((E=a.parentElement)==null||E.removeChild(a)))}),x?!a||!m?null:Sr.createPortal(ht({ourProps:{ref:u},theirProps:r,defaultTag:Na,name:"Portal"}),m):null}let ka=g.Fragment,Ui=g.createContext(null);function Ia(e,o){let{target:r,...n}=e,u={ref:Et(o)};return g.createElement(Ui.Provider,{value:r},ht({ourProps:u,theirProps:n,defaultTag:ka,name:"Popover.Group"}))}let yo=g.createContext(null);function Ma(){let e=g.useContext(yo),o=g.useRef([]),r=ie(f=>(o.current.push(f),e&&e.register(f),()=>n(f))),n=ie(f=>{let a=o.current.indexOf(f);a!==-1&&o.current.splice(a,1),e&&e.unregister(f)}),u=g.useMemo(()=>({register:r,unregister:n,portals:o}),[r,n,o]);return[o,g.useMemo(()=>function({children:f}){return g.createElement(yo.Provider,{value:u},f)},[u])]}let Pa=vt(Oa),Fa=vt(Ia),wo=Object.assign(Pa,{Group:Fa});function Ra(e,o){return e===o&&(e!==0||1/e===1/o)||e!==e&&o!==o}const La=typeof Object.is=="function"?Object.is:Ra,{useState:Aa,useEffect:Da,useLayoutEffect:$a,useDebugValue:_a}=Z;function Ba(e,o,r){const n=o(),[{inst:u},f]=Aa({inst:{value:n,getSnapshot:o}});return $a(()=>{u.value=n,u.getSnapshot=o,Eo(u)&&f({inst:u})},[e,n,o]),Da(()=>(Eo(u)&&f({inst:u}),e(()=>{Eo(u)&&f({inst:u})})),[e]),_a(n),n}function Eo(e){const o=e.getSnapshot,r=e.value;try{const n=o();return!La(r,n)}catch{return!0}}function za(e,o,r){return o()}const Wa=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ha=!Wa,Ua=Ha?za:Ba,Va="useSyncExternalStore"in Z?(e=>e.useSyncExternalStore)(Z):Ua;function Za(e){return Va(e.subscribe,e.getSnapshot,e.getSnapshot)}function Ya(e,o){let r=e(),n=new Set;return{getSnapshot(){return r},subscribe(u){return n.add(u),()=>n.delete(u)},dispatch(u,...f){let a=o[u].call(r,...f);a&&(r=a,n.forEach(m=>m()))}}}function Ga(){let e;return{before({doc:o}){var r;let n=o.documentElement;e=((r=o.defaultView)!=null?r:window).innerWidth-n.clientWidth},after({doc:o,d:r}){let n=o.documentElement,u=n.clientWidth-n.offsetWidth,f=e-u;r.style(n,"paddingRight",`${f}px`)}}}function qa(){return ji()?{before({doc:e,d:o,meta:r}){function n(u){return r.containers.flatMap(f=>f()).some(f=>f.contains(u))}o.microTask(()=>{var u;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let m=Wt();m.style(e.documentElement,"scrollBehavior","auto"),o.add(()=>o.microTask(()=>m.dispose()))}let f=(u=window.scrollY)!=null?u:window.pageYOffset,a=null;o.addEventListener(e,"click",m=>{if(m.target instanceof HTMLElement)try{let v=m.target.closest("a");if(!v)return;let{hash:x}=new URL(v.href),E=e.querySelector(x);E&&!n(E)&&(a=E)}catch{}},!0),o.addEventListener(e,"touchstart",m=>{if(m.target instanceof HTMLElement)if(n(m.target)){let v=m.target;for(;v.parentElement&&n(v.parentElement);)v=v.parentElement;o.style(v,"overscrollBehavior","contain")}else o.style(m.target,"touchAction","none")}),o.addEventListener(e,"touchmove",m=>{if(m.target instanceof HTMLElement)if(n(m.target)){let v=m.target;for(;v.parentElement&&v.dataset.headlessuiPortal!==""&&!(v.scrollHeight>v.clientHeight||v.scrollWidth>v.clientWidth);)v=v.parentElement;v.dataset.headlessuiPortal===""&&m.preventDefault()}else m.preventDefault()},{passive:!1}),o.add(()=>{var m;let v=(m=window.scrollY)!=null?m:window.pageYOffset;f!==v&&window.scrollTo(0,f),a&&a.isConnected&&(a.scrollIntoView({block:"nearest"}),a=null)})})}}:{}}function Ka(){return{before({doc:e,d:o}){o.style(e.documentElement,"overflow","hidden")}}}function Xa(e){let o={};for(let r of e)Object.assign(o,r(o));return o}let jn=Ya(()=>new Map,{PUSH(e,o){var r;let n=(r=this.get(e))!=null?r:{doc:e,count:0,d:Wt(),meta:new Set};return n.count++,n.meta.add(o),this.set(e,n),this},POP(e,o){let r=this.get(e);return r&&(r.count--,r.meta.delete(o)),this},SCROLL_PREVENT({doc:e,d:o,meta:r}){let n={doc:e,d:o,meta:Xa(r)},u=[qa(),Ga(),Ka()];u.forEach(({before:f})=>f==null?void 0:f(n)),u.forEach(({after:f})=>f==null?void 0:f(n))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});jn.subscribe(()=>{let e=jn.getSnapshot(),o=new Map;for(let[r]of e)o.set(r,r.documentElement.style.overflow);for(let r of e.values()){let n=o.get(r.doc)==="hidden",u=r.count!==0;(u&&!n||!u&&n)&&jn.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),r.count===0&&jn.dispatch("TEARDOWN",r)}});function Ja(e,o,r){let n=Za(jn),u=e?n.get(e):void 0,f=u?u.count>0:!1;return ot(()=>{if(!(!e||!o))return jn.dispatch("PUSH",e,r),()=>jn.dispatch("POP",e,r)},[o,e]),f}let So=new Map,Kn=new Map;function Vi(e,o=!0){ot(()=>{var r;if(!o)return;let n=typeof e=="function"?e():e.current;if(!n)return;function u(){var a;if(!n)return;let m=(a=Kn.get(n))!=null?a:1;if(m===1?Kn.delete(n):Kn.set(n,m-1),m!==1)return;let v=So.get(n);v&&(v["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",v["aria-hidden"]),n.inert=v.inert,So.delete(n))}let f=(r=Kn.get(n))!=null?r:0;return Kn.set(n,f+1),f!==0||(So.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0),u},[e,o])}function Qa({defaultContainers:e=[],portals:o,mainTreeNodeRef:r}={}){var n;let u=g.useRef((n=r==null?void 0:r.current)!=null?n:null),f=Sn(u),a=ie(()=>{var m,v,x;let E=[];for(let k of e)k!==null&&(k instanceof HTMLElement?E.push(k):"current"in k&&k.current instanceof HTMLElement&&E.push(k.current));if(o!=null&&o.current)for(let k of o.current)E.push(k);for(let k of(m=f==null?void 0:f.querySelectorAll("html > *, body > *"))!=null?m:[])k!==document.body&&k!==document.head&&k instanceof HTMLElement&&k.id!=="headlessui-portal-root"&&(k.contains(u.current)||k.contains((x=(v=u.current)==null?void 0:v.getRootNode())==null?void 0:x.host)||E.some(P=>k.contains(P))||E.push(k));return E});return{resolveContainers:a,contains:ie(m=>a().some(v=>v.contains(m))),mainTreeNodeRef:u,MainTreeNode:g.useMemo(()=>function(){return r!=null?null:g.createElement(Un,{features:Pn.Hidden,ref:u})},[u,r])}}let Co=g.createContext(()=>{});Co.displayName="StackContext";var jo=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(jo||{});function eu(){return g.useContext(Co)}function tu({children:e,onUpdate:o,type:r,element:n,enabled:u}){let f=eu(),a=ie((...m)=>{o==null||o(...m),f(...m)});return ot(()=>{let m=u===void 0||u===!0;return m&&a(0,r,n),()=>{m&&a(1,r,n)}},[a,r,n,u]),g.createElement(Co.Provider,{value:a},e)}let Zi=g.createContext(null);function Yi(){let e=g.useContext(Zi);if(e===null){let o=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(o,Yi),o}return e}function Gi(){let[e,o]=g.useState([]);return[e.length>0?e.join(" "):void 0,g.useMemo(()=>function(r){let n=ie(f=>(o(a=>[...a,f]),()=>o(a=>{let m=a.slice(),v=m.indexOf(f);return v!==-1&&m.splice(v,1),m}))),u=g.useMemo(()=>({register:n,slot:r.slot,name:r.name,props:r.props}),[n,r.slot,r.name,r.props]);return g.createElement(Zi.Provider,{value:u},r.children)},[o])]}let nu="p";function ru(e,o){let r=Dt(),{id:n=`headlessui-description-${r}`,...u}=e,f=Yi(),a=Et(o);ot(()=>f.register(n),[n,f.register]);let m={ref:a,...f.props,id:n};return ht({ourProps:m,theirProps:u,slot:f.slot||{},defaultTag:nu,name:f.name||"Description"})}let ou=vt(ru),qi=Object.assign(ou,{});var iu=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(iu||{}),lu=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(lu||{});let su={0(e,o){return e.titleId===o.id?e:{...e,titleId:o.id}}},Mr=g.createContext(null);Mr.displayName="DialogContext";function Xn(e){let o=g.useContext(Mr);if(o===null){let r=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Xn),r}return o}function au(e,o,r=()=>[document.body]){Ja(e,o,n=>{var u;return{containers:[...(u=n.containers)!=null?u:[],r]}})}function uu(e,o){return xt(o.type,su,e,o)}let cu="div",du=pn.RenderStrategy|pn.Static;function fu(e,o){let r=Dt(),{id:n=`headlessui-dialog-${r}`,open:u,onClose:f,initialFocus:a,role:m="dialog",__demoMode:v=!1,...x}=e,[E,k]=g.useState(0),P=g.useRef(!1);m=function(){return m==="dialog"||m==="alertdialog"?m:(P.current||(P.current=!0,console.warn(`Invalid role [${m}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let C=Vn();u===void 0&&C!==null&&(u=(C&jt.Open)===jt.Open);let M=g.useRef(null),R=Et(M,o),L=Sn(M),B=e.hasOwnProperty("open")||C!==null,_=e.hasOwnProperty("onClose");if(!B&&!_)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!B)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!_)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof u!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${u}`);if(typeof f!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${f}`);let z=u?0:1,[X,ee]=g.useReducer(uu,{titleId:null,descriptionId:null,panelRef:g.createRef()}),ue=ie(()=>f(!1)),we=ie(V=>ee({type:0,id:V})),Oe=Mn()?v?!1:z===0:!1,be=E>1,y=g.useContext(Mr)!==null,[he,Pe]=Ma(),Ze={get current(){var V;return(V=X.panelRef.current)!=null?V:M.current}},{resolveContainers:Ye,mainTreeNodeRef:Y,MainTreeNode:Je}=Qa({portals:he,defaultContainers:[Ze]}),Re=be?"parent":"leaf",q=C!==null?(C&jt.Closing)===jt.Closing:!1,te=y||q?!1:Oe,ve=g.useCallback(()=>{var V,Ee;return(Ee=Array.from((V=L==null?void 0:L.querySelectorAll("body > *"))!=null?V:[]).find(ke=>ke.id==="headlessui-portal-root"?!1:ke.contains(Y.current)&&ke instanceof HTMLElement))!=null?Ee:null},[Y]);Vi(ve,te);let $e=be?!0:Oe,We=g.useCallback(()=>{var V,Ee;return(Ee=Array.from((V=L==null?void 0:L.querySelectorAll("[data-headlessui-portal]"))!=null?V:[]).find(ke=>ke.contains(Y.current)&&ke instanceof HTMLElement))!=null?Ee:null},[Y]);Vi(We,$e),uo(Ye,V=>{V.preventDefault(),ue()},!(!Oe||be));let tt=!(be||z!==0);$i(L==null?void 0:L.defaultView,"keydown",V=>{tt&&(V.defaultPrevented||V.key===Xe.Escape&&(V.preventDefault(),V.stopPropagation(),ue()))}),au(L,!(q||z!==0||y),Ye),g.useEffect(()=>{if(z!==0||!M.current)return;let V=new ResizeObserver(Ee=>{for(let ke of Ee){let Fe=ke.target.getBoundingClientRect();Fe.x===0&&Fe.y===0&&Fe.width===0&&Fe.height===0&&ue()}});return V.observe(M.current),()=>V.disconnect()},[z,M,ue]);let[Lt,ge]=Gi(),st=g.useMemo(()=>[{dialogState:z,close:ue,setTitleId:we},X],[z,X,ue,we]),re=g.useMemo(()=>({open:z===0}),[z]),Ce={ref:R,id:n,role:m,"aria-modal":z===0?!0:void 0,"aria-labelledby":X.titleId,"aria-describedby":Lt};return g.createElement(tu,{type:"Dialog",enabled:z===0,element:M,onUpdate:ie((V,Ee)=>{Ee==="Dialog"&&xt(V,{[jo.Add]:()=>k(ke=>ke+1),[jo.Remove]:()=>k(ke=>ke-1)})})},g.createElement(xo,{force:!0},g.createElement(wo,null,g.createElement(Mr.Provider,{value:st},g.createElement(wo.Group,{target:M},g.createElement(xo,{force:!1},g.createElement(ge,{slot:re,name:"Dialog.Description"},g.createElement(qn,{initialFocus:a,containers:Ye,features:Oe?xt(Re,{parent:qn.features.RestoreFocus,leaf:qn.features.All&~qn.features.FocusLock}):qn.features.None},g.createElement(Pe,null,ht({ourProps:Ce,theirProps:x,slot:re,defaultTag:cu,features:du,visible:z===0,name:"Dialog"}))))))))),g.createElement(Je,null))}let pu="div";function mu(e,o){let r=Dt(),{id:n=`headlessui-dialog-overlay-${r}`,...u}=e,[{dialogState:f,close:a}]=Xn("Dialog.Overlay"),m=Et(o),v=ie(E=>{if(E.target===E.currentTarget){if(Ir(E.currentTarget))return E.preventDefault();E.preventDefault(),E.stopPropagation(),a()}}),x=g.useMemo(()=>({open:f===0}),[f]);return ht({ourProps:{ref:m,id:n,"aria-hidden":!0,onClick:v},theirProps:u,slot:x,defaultTag:pu,name:"Dialog.Overlay"})}let hu="div";function vu(e,o){let r=Dt(),{id:n=`headlessui-dialog-backdrop-${r}`,...u}=e,[{dialogState:f},a]=Xn("Dialog.Backdrop"),m=Et(o);g.useEffect(()=>{if(a.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[a.panelRef]);let v=g.useMemo(()=>({open:f===0}),[f]);return g.createElement(xo,{force:!0},g.createElement(wo,null,ht({ourProps:{ref:m,id:n,"aria-hidden":!0},theirProps:u,slot:v,defaultTag:hu,name:"Dialog.Backdrop"})))}let gu="div";function bu(e,o){let r=Dt(),{id:n=`headlessui-dialog-panel-${r}`,...u}=e,[{dialogState:f},a]=Xn("Dialog.Panel"),m=Et(o,a.panelRef),v=g.useMemo(()=>({open:f===0}),[f]),x=ie(E=>{E.stopPropagation()});return ht({ourProps:{ref:m,id:n,onClick:x},theirProps:u,slot:v,defaultTag:gu,name:"Dialog.Panel"})}let xu="h2";function yu(e,o){let r=Dt(),{id:n=`headlessui-dialog-title-${r}`,...u}=e,[{dialogState:f,setTitleId:a}]=Xn("Dialog.Title"),m=Et(o);g.useEffect(()=>(a(n),()=>a(null)),[n,a]);let v=g.useMemo(()=>({open:f===0}),[f]);return ht({ourProps:{ref:m,id:n},theirProps:u,slot:v,defaultTag:xu,name:"Dialog.Title"})}let wu=vt(fu),Eu=vt(vu),Su=vt(bu),Cu=vt(mu),ju=vt(yu),Ki=Object.assign(wu,{Backdrop:Eu,Panel:Su,Overlay:Cu,Title:ju,Description:qi}),Xi=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Ji(e){var o,r;let n=(o=e.innerText)!=null?o:"",u=e.cloneNode(!0);if(!(u instanceof HTMLElement))return n;let f=!1;for(let m of u.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))m.remove(),f=!0;let a=f?(r=u.innerText)!=null?r:"":n;return Xi.test(a)&&(a=a.replace(Xi,"")),a}function Tu(e){let o=e.getAttribute("aria-label");if(typeof o=="string")return o.trim();let r=e.getAttribute("aria-labelledby");if(r){let n=r.split(" ").map(u=>{let f=document.getElementById(u);if(f){let a=f.getAttribute("aria-label");return typeof a=="string"?a.trim():Ji(f).trim()}return null}).filter(Boolean);if(n.length>0)return n.join(", ")}return Ji(e).trim()}function Nu(e){let o=g.useRef(""),r=g.useRef("");return ie(()=>{let n=e.current;if(!n)return"";let u=n.innerText;if(o.current===u)return r.current;let f=Tu(n).trim().toLowerCase();return o.current=u,r.current=f,f})}var Ou=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ou||{}),ku=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(ku||{}),Iu=(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))(Iu||{});function To(e,o=r=>r){let r=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,n=ao(o(e.items.slice()),f=>f.dataRef.current.domRef.current),u=r?n.indexOf(r):null;return u===-1&&(u=null),{items:n,activeItemIndex:u}}let Mu={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,o)=>{var r;let n=To(e),u=ho(o,{resolveItems:()=>n.items,resolveActiveIndex:()=>n.activeItemIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled});return{...e,...n,searchQuery:"",activeItemIndex:u,activationTrigger:(r=o.trigger)!=null?r:1}},3:(e,o)=>{let r=e.searchQuery!==""?0:1,n=e.searchQuery+o.value.toLowerCase(),u=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+r).concat(e.items.slice(0,e.activeItemIndex+r)):e.items).find(a=>{var m;return((m=a.dataRef.current.textValue)==null?void 0:m.startsWith(n))&&!a.dataRef.current.disabled}),f=u?e.items.indexOf(u):-1;return f===-1||f===e.activeItemIndex?{...e,searchQuery:n}:{...e,searchQuery:n,activeItemIndex:f,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,o)=>{let r=To(e,n=>[...n,{id:o.id,dataRef:o.dataRef}]);return{...e,...r}},6:(e,o)=>{let r=To(e,n=>{let u=n.findIndex(f=>f.id===o.id);return u!==-1&&n.splice(u,1),n});return{...e,...r,activationTrigger:1}}},No=g.createContext(null);No.displayName="MenuContext";function Pr(e){let o=g.useContext(No);if(o===null){let r=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Pr),r}return o}function Pu(e,o){return xt(o.type,Mu,e,o)}let Fu=g.Fragment;function Ru(e,o){let{__demoMode:r=!1,...n}=e,u=g.useReducer(Pu,{__demoMode:r,menuState:r?0:1,buttonRef:g.createRef(),itemsRef:g.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:f,itemsRef:a,buttonRef:m},v]=u,x=Et(o);uo([m,a],(C,M)=>{var R;v({type:1}),so(M,lo.Loose)||(C.preventDefault(),(R=m.current)==null||R.focus())},f===0);let E=ie(()=>{v({type:1})}),k=g.useMemo(()=>({open:f===0,close:E}),[f,E]),P={ref:x};return g.createElement(No.Provider,{value:u},g.createElement(mo,{value:xt(f,{0:jt.Open,1:jt.Closed})},ht({ourProps:P,theirProps:n,slot:k,defaultTag:Fu,name:"Menu"})))}let Lu="button";function Au(e,o){var r;let n=Dt(),{id:u=`headlessui-menu-button-${n}`,...f}=e,[a,m]=Pr("Menu.Button"),v=Et(a.buttonRef,o),x=nn(),E=ie(R=>{switch(R.key){case Xe.Space:case Xe.Enter:case Xe.ArrowDown:R.preventDefault(),R.stopPropagation(),m({type:0}),x.nextFrame(()=>m({type:2,focus:it.First}));break;case Xe.ArrowUp:R.preventDefault(),R.stopPropagation(),m({type:0}),x.nextFrame(()=>m({type:2,focus:it.Last}));break}}),k=ie(R=>{switch(R.key){case Xe.Space:R.preventDefault();break}}),P=ie(R=>{if(Ir(R.currentTarget))return R.preventDefault();e.disabled||(a.menuState===0?(m({type:1}),x.nextFrame(()=>{var L;return(L=a.buttonRef.current)==null?void 0:L.focus({preventScroll:!0})})):(R.preventDefault(),m({type:0})))}),C=g.useMemo(()=>({open:a.menuState===0}),[a]),M={ref:v,id:u,type:co(e,a.buttonRef),"aria-haspopup":"menu","aria-controls":(r=a.itemsRef.current)==null?void 0:r.id,"aria-expanded":a.menuState===0,onKeyDown:E,onKeyUp:k,onClick:P};return ht({ourProps:M,theirProps:f,slot:C,defaultTag:Lu,name:"Menu.Button"})}let Du="div",$u=pn.RenderStrategy|pn.Static;function _u(e,o){var r,n;let u=Dt(),{id:f=`headlessui-menu-items-${u}`,...a}=e,[m,v]=Pr("Menu.Items"),x=Et(m.itemsRef,o),E=Sn(m.itemsRef),k=nn(),P=Vn(),C=P!==null?(P&jt.Open)===jt.Open:m.menuState===0;g.useEffect(()=>{let _=m.itemsRef.current;_&&m.menuState===0&&_!==(E==null?void 0:E.activeElement)&&_.focus({preventScroll:!0})},[m.menuState,m.itemsRef,E]),Pi({container:m.itemsRef.current,enabled:m.menuState===0,accept(_){return _.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:_.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(_){_.setAttribute("role","none")}});let M=ie(_=>{var z,X;switch(k.dispose(),_.key){case Xe.Space:if(m.searchQuery!=="")return _.preventDefault(),_.stopPropagation(),v({type:3,value:_.key});case Xe.Enter:if(_.preventDefault(),_.stopPropagation(),v({type:1}),m.activeItemIndex!==null){let{dataRef:ee}=m.items[m.activeItemIndex];(X=(z=ee.current)==null?void 0:z.domRef.current)==null||X.click()}Ci(m.buttonRef.current);break;case Xe.ArrowDown:return _.preventDefault(),_.stopPropagation(),v({type:2,focus:it.Next});case Xe.ArrowUp:return _.preventDefault(),_.stopPropagation(),v({type:2,focus:it.Previous});case Xe.Home:case Xe.PageUp:return _.preventDefault(),_.stopPropagation(),v({type:2,focus:it.First});case Xe.End:case Xe.PageDown:return _.preventDefault(),_.stopPropagation(),v({type:2,focus:it.Last});case Xe.Escape:_.preventDefault(),_.stopPropagation(),v({type:1}),Wt().nextFrame(()=>{var ee;return(ee=m.buttonRef.current)==null?void 0:ee.focus({preventScroll:!0})});break;case Xe.Tab:_.preventDefault(),_.stopPropagation(),v({type:1}),Wt().nextFrame(()=>{Ls(m.buttonRef.current,_.shiftKey?rn.Previous:rn.Next)});break;default:_.key.length===1&&(v({type:3,value:_.key}),k.setTimeout(()=>v({type:4}),350));break}}),R=ie(_=>{switch(_.key){case Xe.Space:_.preventDefault();break}}),L=g.useMemo(()=>({open:m.menuState===0}),[m]),B={"aria-activedescendant":m.activeItemIndex===null||(r=m.items[m.activeItemIndex])==null?void 0:r.id,"aria-labelledby":(n=m.buttonRef.current)==null?void 0:n.id,id:f,onKeyDown:M,onKeyUp:R,role:"menu",tabIndex:0,ref:x};return ht({ourProps:B,theirProps:a,slot:L,defaultTag:Du,features:$u,visible:C,name:"Menu.Items"})}let Bu=g.Fragment;function zu(e,o){let r=Dt(),{id:n=`headlessui-menu-item-${r}`,disabled:u=!1,...f}=e,[a,m]=Pr("Menu.Item"),v=a.activeItemIndex!==null?a.items[a.activeItemIndex].id===n:!1,x=g.useRef(null),E=Et(o,x);ot(()=>{if(a.__demoMode||a.menuState!==0||!v||a.activationTrigger===0)return;let ee=Wt();return ee.requestAnimationFrame(()=>{var ue,we;(we=(ue=x.current)==null?void 0:ue.scrollIntoView)==null||we.call(ue,{block:"nearest"})}),ee.dispose},[a.__demoMode,x,v,a.menuState,a.activationTrigger,a.activeItemIndex]);let k=Nu(x),P=g.useRef({disabled:u,domRef:x,get textValue(){return k()}});ot(()=>{P.current.disabled=u},[P,u]),ot(()=>(m({type:5,id:n,dataRef:P}),()=>m({type:6,id:n})),[P,n]);let C=ie(()=>{m({type:1})}),M=ie(ee=>{if(u)return ee.preventDefault();m({type:1}),Ci(a.buttonRef.current)}),R=ie(()=>{if(u)return m({type:2,focus:it.Nothing});m({type:2,focus:it.Specific,id:n})}),L=Mi(),B=ie(ee=>L.update(ee)),_=ie(ee=>{L.wasMoved(ee)&&(u||v||m({type:2,focus:it.Specific,id:n,trigger:0}))}),z=ie(ee=>{L.wasMoved(ee)&&(u||v&&m({type:2,focus:it.Nothing}))}),X=g.useMemo(()=>({active:v,disabled:u,close:C}),[v,u,C]);return ht({ourProps:{id:n,ref:E,role:"menuitem",tabIndex:u===!0?void 0:-1,"aria-disabled":u===!0?!0:void 0,disabled:void 0,onClick:M,onFocus:R,onPointerEnter:B,onMouseEnter:B,onPointerMove:_,onMouseMove:_,onPointerLeave:z,onMouseLeave:z},theirProps:f,slot:X,defaultTag:Bu,name:"Menu.Item"})}let Wu=vt(Ru),Hu=vt(Au),Uu=vt(_u),Vu=vt(zu),Fr=Object.assign(Wu,{Button:Hu,Items:Uu,Item:Vu}),Qi=g.createContext(null);function el(){let e=g.useContext(Qi);if(e===null){let o=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(o,el),o}return e}function Zu(){let[e,o]=g.useState([]);return[e.length>0?e.join(" "):void 0,g.useMemo(()=>function(r){let n=ie(f=>(o(a=>[...a,f]),()=>o(a=>{let m=a.slice(),v=m.indexOf(f);return v!==-1&&m.splice(v,1),m}))),u=g.useMemo(()=>({register:n,slot:r.slot,name:r.name,props:r.props}),[n,r.slot,r.name,r.props]);return g.createElement(Qi.Provider,{value:u},r.children)},[o])]}let Yu="label";function Gu(e,o){let r=Dt(),{id:n=`headlessui-label-${r}`,passive:u=!1,...f}=e,a=el(),m=Et(o);ot(()=>a.register(n),[n,a.register]);let v={ref:m,...a.props,id:n};return u&&("onClick"in v&&(delete v.htmlFor,delete v.onClick),"onClick"in f&&delete f.onClick),ht({ourProps:v,theirProps:f,slot:a.slot||{},defaultTag:Yu,name:a.name||"Label"})}let qu=vt(Gu),Ku=Object.assign(qu,{});function Xu(e=0){let[o,r]=g.useState(e),n=Yn(),u=g.useCallback(v=>{n.current&&r(x=>x|v)},[o,n]),f=g.useCallback(v=>!!(o&v),[o]),a=g.useCallback(v=>{n.current&&r(x=>x&~v)},[r,n]),m=g.useCallback(v=>{n.current&&r(x=>x^v)},[r]);return{flags:o,addFlag:u,hasFlag:f,removeFlag:a,toggleFlag:m}}let Oo=g.createContext(null);Oo.displayName="GroupContext";let Ju=g.Fragment;function Qu(e){var o;let[r,n]=g.useState(null),[u,f]=Zu(),[a,m]=Gi(),v=g.useMemo(()=>({switch:r,setSwitch:n,labelledby:u,describedby:a}),[r,n,u,a]),x={},E=e;return g.createElement(m,{name:"Switch.Description"},g.createElement(f,{name:"Switch.Label",props:{htmlFor:(o=v.switch)==null?void 0:o.id,onClick(k){r&&(k.currentTarget.tagName==="LABEL"&&k.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},g.createElement(Oo.Provider,{value:v},ht({ourProps:x,theirProps:E,defaultTag:Ju,name:"Switch.Group"}))))}let ec="button";function tc(e,o){var r;let n=Dt(),{id:u=`headlessui-switch-${n}`,checked:f,defaultChecked:a=!1,onChange:m,disabled:v=!1,name:x,value:E,form:k,...P}=e,C=g.useContext(Oo),M=g.useRef(null),R=Et(M,o,C===null?null:C.setSwitch),[L,B]=yi(f,m,a),_=ie(()=>B==null?void 0:B(!L)),z=ie(be=>{if(Ir(be.currentTarget))return be.preventDefault();be.preventDefault(),_()}),X=ie(be=>{be.key===Xe.Space?(be.preventDefault(),_()):be.key===Xe.Enter&&Us(be.currentTarget)}),ee=ie(be=>be.preventDefault()),ue=g.useMemo(()=>({checked:L}),[L]),we={id:u,ref:R,role:"switch",type:co(e,M),tabIndex:e.tabIndex===-1?0:(r=e.tabIndex)!=null?r:0,"aria-checked":L,"aria-labelledby":C==null?void 0:C.labelledby,"aria-describedby":C==null?void 0:C.describedby,disabled:v,onClick:z,onKeyUp:X,onKeyPress:ee},Oe=nn();return g.useEffect(()=>{var be;let y=(be=M.current)==null?void 0:be.closest("form");y&&a!==void 0&&Oe.addEventListener(y,"reset",()=>{B(a)})},[M,B]),g.createElement(g.Fragment,null,x!=null&&L&&g.createElement(Un,{features:Pn.Hidden,...kr({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:v,form:k,checked:L,name:x,value:E})}),ht({ourProps:we,theirProps:P,slot:ue,defaultTag:ec,name:"Switch"}))}let nc=vt(tc),rc=Qu,oc=Object.assign(nc,{Group:rc,Label:Ku,Description:qi});function ic(e){let o={called:!1};return(...r)=>{if(!o.called)return o.called=!0,e(...r)}}function ko(e,...o){e&&o.length>0&&e.classList.add(...o)}function Io(e,...o){e&&o.length>0&&e.classList.remove(...o)}function lc(e,o){let r=Wt();if(!e)return r.dispose;let{transitionDuration:n,transitionDelay:u}=getComputedStyle(e),[f,a]=[n,u].map(v=>{let[x=0]=v.split(",").filter(Boolean).map(E=>E.includes("ms")?parseFloat(E):parseFloat(E)*1e3).sort((E,k)=>k-E);return x}),m=f+a;if(m!==0){r.group(x=>{x.setTimeout(()=>{o(),x.dispose()},m),x.addEventListener(e,"transitionrun",E=>{E.target===E.currentTarget&&x.dispose()})});let v=r.addEventListener(e,"transitionend",x=>{x.target===x.currentTarget&&(o(),v())})}else o();return r.add(()=>o()),r.dispose}function sc(e,o,r,n){let u=r?"enter":"leave",f=Wt(),a=n!==void 0?ic(n):()=>{};u==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let m=xt(u,{enter:()=>o.enter,leave:()=>o.leave}),v=xt(u,{enter:()=>o.enterTo,leave:()=>o.leaveTo}),x=xt(u,{enter:()=>o.enterFrom,leave:()=>o.leaveFrom});return Io(e,...o.base,...o.enter,...o.enterTo,...o.enterFrom,...o.leave,...o.leaveFrom,...o.leaveTo,...o.entered),ko(e,...o.base,...m,...x),f.nextFrame(()=>{Io(e,...o.base,...m,...x),ko(e,...o.base,...m,...v),lc(e,()=>(Io(e,...o.base,...m),ko(e,...o.base,...o.entered),a()))}),f.dispose}function ac({immediate:e,container:o,direction:r,classes:n,onStart:u,onStop:f}){let a=Yn(),m=nn(),v=Vt(r);ot(()=>{e&&(v.current="enter")},[e]),ot(()=>{let x=Wt();m.add(x.dispose);let E=o.current;if(E&&v.current!=="idle"&&a.current)return x.dispose(),u.current(v.current),x.add(sc(E,n.current,v.current==="enter",()=>{x.dispose(),f.current(v.current)})),x.dispose},[r])}function hn(e=""){return e.split(/\s+/).filter(o=>o.length>1)}let Rr=g.createContext(null);Rr.displayName="TransitionContext";var uc=(e=>(e.Visible="visible",e.Hidden="hidden",e))(uc||{});function cc(){let e=g.useContext(Rr);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function dc(){let e=g.useContext(Lr);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Lr=g.createContext(null);Lr.displayName="NestingContext";function Ar(e){return"children"in e?Ar(e.children):e.current.filter(({el:o})=>o.current!==null).filter(({state:o})=>o==="visible").length>0}function tl(e,o){let r=Vt(e),n=g.useRef([]),u=Yn(),f=nn(),a=ie((C,M=mn.Hidden)=>{let R=n.current.findIndex(({el:L})=>L===C);R!==-1&&(xt(M,{[mn.Unmount](){n.current.splice(R,1)},[mn.Hidden](){n.current[R].state="hidden"}}),f.microTask(()=>{var L;!Ar(n)&&u.current&&((L=r.current)==null||L.call(r))}))}),m=ie(C=>{let M=n.current.find(({el:R})=>R===C);return M?M.state!=="visible"&&(M.state="visible"):n.current.push({el:C,state:"visible"}),()=>a(C,mn.Unmount)}),v=g.useRef([]),x=g.useRef(Promise.resolve()),E=g.useRef({enter:[],leave:[],idle:[]}),k=ie((C,M,R)=>{v.current.splice(0),o&&(o.chains.current[M]=o.chains.current[M].filter(([L])=>L!==C)),o==null||o.chains.current[M].push([C,new Promise(L=>{v.current.push(L)})]),o==null||o.chains.current[M].push([C,new Promise(L=>{Promise.all(E.current[M].map(([B,_])=>_)).then(()=>L())})]),M==="enter"?x.current=x.current.then(()=>o==null?void 0:o.wait.current).then(()=>R(M)):R(M)}),P=ie((C,M,R)=>{Promise.all(E.current[M].splice(0).map(([L,B])=>B)).then(()=>{var L;(L=v.current.shift())==null||L()}).then(()=>R(M))});return g.useMemo(()=>({children:n,register:m,unregister:a,onStart:k,onStop:P,wait:x,chains:E}),[m,a,n,k,P,E,x])}function fc(){}let pc=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function nl(e){var o;let r={};for(let n of pc)r[n]=(o=e[n])!=null?o:fc;return r}function mc(e){let o=g.useRef(nl(e));return g.useEffect(()=>{o.current=nl(e)},[e]),o}let hc="div",rl=pn.RenderStrategy;function vc(e,o){var r,n;let{beforeEnter:u,afterEnter:f,beforeLeave:a,afterLeave:m,enter:v,enterFrom:x,enterTo:E,entered:k,leave:P,leaveFrom:C,leaveTo:M,...R}=e,L=g.useRef(null),B=Et(L,o),_=(r=R.unmount)==null||r?mn.Unmount:mn.Hidden,{show:z,appear:X,initial:ee}=cc(),[ue,we]=g.useState(z?"visible":"hidden"),Oe=dc(),{register:be,unregister:y}=Oe;g.useEffect(()=>be(L),[be,L]),g.useEffect(()=>{if(_===mn.Hidden&&L.current){if(z&&ue!=="visible"){we("visible");return}return xt(ue,{hidden:()=>y(L),visible:()=>be(L)})}},[ue,L,be,y,z,_]);let he=Vt({base:hn(R.className),enter:hn(v),enterFrom:hn(x),enterTo:hn(E),entered:hn(k),leave:hn(P),leaveFrom:hn(C),leaveTo:hn(M)}),Pe=mc({beforeEnter:u,afterEnter:f,beforeLeave:a,afterLeave:m}),Ze=Mn();g.useEffect(()=>{if(Ze&&ue==="visible"&&L.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[L,ue,Ze]);let Ye=ee&&!X,Y=X&&z&&ee,Je=!Ze||Ye?"idle":z?"enter":"leave",Re=Xu(0),q=ie(tt=>xt(tt,{enter:()=>{Re.addFlag(jt.Opening),Pe.current.beforeEnter()},leave:()=>{Re.addFlag(jt.Closing),Pe.current.beforeLeave()},idle:()=>{}})),te=ie(tt=>xt(tt,{enter:()=>{Re.removeFlag(jt.Opening),Pe.current.afterEnter()},leave:()=>{Re.removeFlag(jt.Closing),Pe.current.afterLeave()},idle:()=>{}})),ve=tl(()=>{we("hidden"),y(L)},Oe),$e=g.useRef(!1);ac({immediate:Y,container:L,classes:he,direction:Je,onStart:Vt(tt=>{$e.current=!0,ve.onStart(L,tt,q)}),onStop:Vt(tt=>{$e.current=!1,ve.onStop(L,tt,te),tt==="leave"&&!Ar(ve)&&(we("hidden"),y(L))})});let We=R,lt={ref:B};return Y?We={...We,className:Nr(R.className,...he.current.enter,...he.current.enterFrom)}:$e.current&&(We.className=Nr(R.className,(n=L.current)==null?void 0:n.className),We.className===""&&delete We.className),g.createElement(Lr.Provider,{value:ve},g.createElement(mo,{value:xt(ue,{visible:jt.Open,hidden:jt.Closed})|Re.flags},ht({ourProps:lt,theirProps:We,defaultTag:hc,features:rl,visible:ue==="visible",name:"Transition.Child"})))}function gc(e,o){let{show:r,appear:n=!1,unmount:u=!0,...f}=e,a=g.useRef(null),m=Et(a,o);Mn();let v=Vn();if(r===void 0&&v!==null&&(r=(v&jt.Open)===jt.Open),![!0,!1].includes(r))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[x,E]=g.useState(r?"visible":"hidden"),k=tl(()=>{E("hidden")}),[P,C]=g.useState(!0),M=g.useRef([r]);ot(()=>{P!==!1&&M.current[M.current.length-1]!==r&&(M.current.push(r),C(!1))},[M,r]);let R=g.useMemo(()=>({show:r,appear:n,initial:P}),[r,n,P]);g.useEffect(()=>{if(r)E("visible");else if(!Ar(k))E("hidden");else{let z=a.current;if(!z)return;let X=z.getBoundingClientRect();X.x===0&&X.y===0&&X.width===0&&X.height===0&&E("hidden")}},[r,k]);let L={unmount:u},B=ie(()=>{var z;P&&C(!1),(z=e.beforeEnter)==null||z.call(e)}),_=ie(()=>{var z;P&&C(!1),(z=e.beforeLeave)==null||z.call(e)});return g.createElement(Lr.Provider,{value:k},g.createElement(Rr.Provider,{value:R},ht({ourProps:{...L,as:g.Fragment,children:g.createElement(ol,{ref:m,...L,...f,beforeEnter:B,beforeLeave:_})},theirProps:{},defaultTag:g.Fragment,features:rl,visible:x==="visible",name:"Transition"})))}function bc(e,o){let r=g.useContext(Rr)!==null,n=Vn()!==null;return g.createElement(g.Fragment,null,!r&&n?g.createElement(Mo,{ref:o,...e}):g.createElement(ol,{ref:o,...e}))}let Mo=vt(gc),ol=vt(vc),xc=vt(bc),vn=Object.assign(Mo,{Child:xc,Root:Mo});function yc({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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 wc=Z.forwardRef(yc);function Ec({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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 Sc=Z.forwardRef(Ec);function Cc({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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 jc=Z.forwardRef(Cc);function Tc({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.createElement("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z",clipRule:"evenodd"}))}const Nc=Z.forwardRef(Tc);function Oc({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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 Po=Z.forwardRef(Oc);function kc({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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 il=Z.forwardRef(kc);function Ic({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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 Mc=Z.forwardRef(Ic);function Pc({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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 Fc=Z.forwardRef(Pc);function Rc({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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 Lc=Z.forwardRef(Rc),Ac={warning:{color:"bg-yellow-50",icon:w.jsx(Mc,{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:w.jsx(Lc,{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:w.jsx(jc,{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:w.jsx(Fc,{className:"h-5 w-5 text-blue-400","aria-hidden":"true"}),colorTitle:"text-blue-800",colorText:"text-blue-700"}},Dc=({type:e="info",title:o,message:r,active:n=!1,time:u=1e3,onClose:f})=>{const[a,m]=g.useState(!1),v=g.useRef(null);g.useEffect(()=>(n&&(m(!0),v.current=setTimeout(()=>{m(!1),f&&f()},u)),()=>clearTimeout(v.current)),[n,u,f]);const x=Ac[e];return a?w.jsx("div",{className:"fixed top-2.5 left-1/2 transform -translate-x-1/2 w-80 3xs:w-96 z-50",children:w.jsx(vn,{as:g.Fragment,show:a,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:w.jsxs("div",{className:se("rounded-md p-4 text-center",x.color),children:[w.jsxs("div",{className:"flex justify-center flex-shrink-0",children:[x.icon,w.jsx("h3",{className:se("text-sm font-medium ml-3",x.colorTitle),children:o})]}),w.jsx("div",{className:se("mt-2 text-sm",x.colorText),children:w.jsx("p",{children:r})})]})})}):null};function $c({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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 _c=Z.forwardRef($c);function Bc({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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 zc=Z.forwardRef(Bc);function Wc({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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"}),Z.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 Hc=Z.forwardRef(Wc);function Uc({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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 Vc=Z.forwardRef(Uc);function Zc({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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 Yc=Z.forwardRef(Zc);function Gc({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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 qc=Z.forwardRef(Gc),Kc=({src:e,alt:o,width:r,height:n,className:u="",classNameIcon:f="",isIcon:a=!0,acronym:m=""})=>{function v(){if(typeof m!="string")return m;const x=m.toLowerCase(),E=x.split(" "),k=E[E.length-1];return x.charAt(0)+k.charAt(0)}return w.jsx(w.Fragment,{children:e?w.jsx("img",{src:e,alt:o,width:r,height:n,className:se(u!==""&&u),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s"},onLoad:x=>x.currentTarget.style.filter="none","data-testid":"img"}):a?w.jsx(Yc,{className:se("bg-white text-default-4",f!==""?f:"w-7 h-7")}):w.jsx("div",{className:se("bg-gray-200 text-default-4 rounded-full font-bold uppercase flex justify-center items-center",f!==""?f:"w-7 h-7"),children:v()})})},Xc=({steps:e,onClick:o})=>{const[r,n]=g.useState(0),u=f=>{n(f),o(f)};return w.jsx("nav",{className:"flex items-center justify-center w-full","aria-label":"Progress","data-testid":"bullets",children:w.jsx("ol",{role:"list",className:"flex items-center space-x-5",children:new Array(e).fill(1).map((f,a)=>w.jsx("li",{children:r!==a?w.jsx("div",{className:"cursor-pointer block h-2.5 w-2.5 rounded-full bg-gray-500 hover:bg-gray-600",onClick:()=>u(a),"data-testid":`step-${a}`,children:w.jsx("span",{className:"sr-only",children:"step"})}):w.jsxs("div",{className:"relative flex items-center justify-center cursor-pointer","aria-current":"step",children:[w.jsx("span",{className:"absolute flex h-5 w-5 p-px","aria-hidden":"true",children:w.jsx("span",{className:"h-full w-full rounded-full bg-gray-300"})}),w.jsx("span",{className:"relative block h-2.5 w-2.5 rounded-full bg-gray-500","aria-hidden":"true"}),w.jsx("span",{className:"sr-only",children:"step"})]})},a))})})};var ll={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 o={}.hasOwnProperty;function r(){for(var f="",a=0;a<arguments.length;a++){var m=arguments[a];m&&(f=u(f,n(m)))}return f}function n(f){if(typeof f=="string"||typeof f=="number")return f;if(typeof f!="object")return"";if(Array.isArray(f))return r.apply(null,f);if(f.toString!==Object.prototype.toString&&!f.toString.toString().includes("[native code]"))return f.toString();var a="";for(var m in f)o.call(f,m)&&f[m]&&(a=u(a,m));return a}function u(f,a){return a?f?f+" "+a:f+a:f}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(ll);var Jc=ll.exports;const Zt=cs(Jc),sl=({className:e="text-sm w-full rounded-md",children:o,icon:r=null,edge:n=null,disabled:u=!1,type:f="button",onClick:a,id:m})=>{const v=Zt({"ml-2":n==="start"&&r!==null,"mr-2":n==="end"&&r!==null});return w.jsxs("button",{className:ae("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-primary-7 bg-gray-50",e),type:f,onClick:a,disabled:u,"data-testid":`button-outline-${m}`,id:`button-outline-${m}`,children:[n==="start"&&r!==null&&w.jsx("span",{children:r}),w.jsx("span",{className:ae("flex",v),id:m,children:o}),n==="end"&&r!==null&&w.jsx("span",{children:r})]})},Qc=({children:e,className:o="",icon:r=null,edge:n=null,disabled:u=!1,type:f="button",onClick:a,id:m})=>{const v=Zt({"ml-2":n==="start"&&r!==null,"mr-2":n==="end"&&r!==null});return w.jsxs("button",{className:`${o} flex justify-center items-center`,edge:n,type:f,onClick:a,disabled:u,"data-testid":`button-${m}`,children:[n==="start"&&r!==null&&w.jsx("span",{children:r}),w.jsx("span",{className:v,children:e}),n==="end"&&r!==null&&w.jsx("span",{children:r})]})},Jn=({children:e,classNameButton:o="bg-primary-7 hover:bg-primary-8 focus-visible:outline-primary-7 shadow-primary-6 rounded font-semibold px-3 py-1.5 text-white w-full",classNameText:r="",icon:n=null,edge:u=null,disabled:f=!1,type:a="button",onClick:m,id:v,outline:x="0px 0px 0px 2px #6366F1, 0px 0px 0px 2px #FFF, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameContainer:E=""})=>{const[k,P]=g.useState(!1),C=Zt({"ml-2":u==="start"&&n!==null,"mr-2":u==="end"&&n!==null}),M=()=>{m&&m()};return w.jsx("div",{className:ae("rounded-md p-0.5",E!==""&&E),style:{boxShadow:k?x:"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:w.jsxs("button",{className:ae("flex justify-center items-center text-sm leading-6 shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",f&&"text-white bg-gray-300 rounded focus:outline-none cursor-default",f?o.replace(/\bbg-\w+\b/g,""):o),type:a,onClick:M,onFocus:()=>P(!0),onBlur:()=>P(!1),disabled:f,"data-testid":`button-solid-${v}`,children:[u==="start"&&n!==null&&w.jsx("span",{className:"flex",children:n}),w.jsx("span",{className:ae(r.length===0&&C,r.length!==0&&r),children:e}),u==="end"&&n!==null&&w.jsx("span",{children:n})]})})},ed=({label:e=null,checked:o=!1,onChange:r,id:n,className:u="",classNameCheckbox:f="h-4 w-4",style:a={},disabled:m=!1})=>{const[v,x]=g.useState(!1);return g.useEffect(()=>{x(o)},[o]),w.jsxs("div",{className:"flex items-center",style:a,"data-testid":`container-check-${n}`,children:[w.jsx("input",{checked:v,id:`${e}-${n}`,value:n,"aria-describedby":"comments-description",type:"checkbox",onChange:r,className:ae("cursor-pointer rounded border-gray-300 text-primary-7 focus:ring-primary-7",f!==""&&f),"data-testid":`checkbox-${n}`,disabled:m}),e!==null?w.jsx("label",{htmlFor:`${e}-${n}`,className:`ml-2.5 font-normal cursor-pointer ${u}`,id:`label-${n}`,"data-testid":"label",children:e}):null]})};function td({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const nd=Z.forwardRef(td);function rd({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const al=Z.forwardRef(rd);function od({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const id=Z.forwardRef(od);function ld({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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 sd=Z.forwardRef(ld);function ad({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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 ud=Z.forwardRef(ad);function ul({children:e,className:o="sm:max-w-sm w-11/12 sm:my-8",classNameContainer:r="",isOpen:n=!1,setIsOpen:u,showIconSuccess:f=!0,showButton:a=!0,style:m={}}){return w.jsx(vn,{show:n,as:g.Fragment,children:w.jsxs(Ki,{as:"div",className:"z-50 relative",onClose:u,"data-testid":"modal",children:[w.jsx(vn.Child,{as:g.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-5",leave:"ease-in duration-200",leaveFrom:"opacity-5",leaveTo:"opacity-0",children:w.jsx("div",{className:"fixed inset-0 bg-opacity-40 bg-gray-900 transition-opacity","data-testid":"window-close",onClick:()=>u(!1)})}),w.jsx("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:w.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:w.jsx(vn.Child,{as:g.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:w.jsxs(Ki.Panel,{className:ae("relative transform rounded-lg bg-white px-4 pb-3 pt-5 text-left transition-all sm:w-full sm:pt-3 sm:px-3",o!==""&&o),style:m,children:[f&&w.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100",children:w.jsx(nd,{className:"h-6 w-6 text-green-600","aria-hidden":"true"})}),w.jsx("div",{className:ae(r!==""&&r),"data-testid":"content",children:e}),a&&w.jsx("div",{className:"mt-5 sm:mt-6",children:w.jsx(Jn,{id:"close-modal",onClick:()=>u(!1),children:"Cerrar"})}),w.jsx("button",{className:"opacity-0 absolute"})]})})})})]})})}const cd=({isOpenModalConfirmation:e,setIsOpenModalConfirmation:o,close:r,title:n="¿Estás seguro de abandonar la creación de la acción?",description:u="La información se perderá si no creas la acción",classNameTitle:f="",classNameDescription:a=""})=>{const m=()=>{o(!1),r()};return w.jsxs(ul,{isOpen:e,setIsOpen:()=>o(),showButton:!1,showIconSuccess:!1,children:[w.jsx("p",{className:ae("text-center text-sm",f!==""&&f),children:n}),w.jsx("p",{className:ae("text-center text-sm",a!==""&&a),children:u}),w.jsxs("div",{className:"flex w-full justify-center mt-5",children:[w.jsx(sl,{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:()=>o(),id:"cancel",children:"Cancelar"}),w.jsx(Jn,{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:m,id:"confirmation",children:"Aceptar"})]})]})},dd=({className:e="",style:o={}})=>w.jsx("div",{className:ae("w-px",e!==""&&e),style:o}),fd=({onClick:e,id:o="",className:r=""})=>w.jsxs("div",{className:ae("flex items-center text-default-4",r!==""&&r),"data-testid":o,children:[w.jsx(_c,{className:"w-3 h-3 3xs:w-4 3xs:h-4 stroke-current cursor-pointer","data-testid":"chevron-left-icon",onClick:e}),w.jsx("span",{onClick:e,className:"text-sm cursor-pointer","data-testid":"go-back",children:"Volver"})]});var Fo={exports:{}};(function(e,o){(function(r,n){n(o,g,Sr)})(us,function(r,n,u){function f(t){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(l,i,s.get?s:{enumerable:!0,get:()=>t[i]})}}return l.default=t,Object.freeze(l)}const a=f(n),m=(t,l=!1)=>{function i(s){if(typeof s!="object"||s===null)return s;const c=Array.isArray(s)?[]:{};for(const d in s)s.hasOwnProperty(d)&&!l&&(c[d]=i(s[d]));return c}return t.map(s=>i(s))},v=t=>/^(?:[^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*|"[^\n"]+")@(?:[^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,63}$/i.test(t);function x(...t){return t.filter(Boolean).join(" ")}const E=t=>{const l=t.split(" ");let i=t.slice(0,2);return l.length>1&&(i=`${t.at(0)}${l[l.length-1].slice(0,1)}`),i},k=t=>typeof t!="string"&&Promise.resolve(t)instanceof Promise,P="The user aborted a request.",C="signal is aborted without reason",M=({id:t,close:l,isPathsTest:i=!1,isTest:s=!1})=>{const c=n.useCallback(d=>{d.some(p=>p.getAttribute===void 0?!1:p.getAttribute("id")===t)||l()},[l,t]);n.useEffect(()=>{const d=p=>{const h=p.composedPath();h===void 0||i||(s&&(h[0].getAttribute=()=>t),c(h))};return window.addEventListener("click",d),()=>{window.removeEventListener("click",d)}},[c,i,s,t])},R=()=>{const t=n.useRef({}),[l,i]=n.useState({}),[s,c]=n.useState({}),[d,p]=n.useState([]);n.useEffect(()=>{t.current={}},[]);const h=I=>A=>{A.preventDefault(),A.stopPropagation(),I(l)},b=(I,A,O)=>{const{checked:D,value:F,name:$,type:U,id:W}=I.target,J={radio:W,checkbox:D};t.current={...O,...t.current,[$]:J[U]??F},i({...t.current,[$]:J[U]??F}),A({...t.current,[$]:J[U]??F})},S=n.useCallback((I,A)=>{t.current={...t.current,[I]:A},i(O=>({...O,[I]:A}))},[]),N=n.useCallback((I,A)=>{const O=A.filter(D=>I[D]===""||I[D]===void 0);return O.forEach(D=>c(F=>({...F,[D]:"Este campo es requerido"}))),p(O),O.length>0},[]);return{handleSubmit:h,handleChange:b,setValuesDefault:S,validateFields:N,errors:d,model:l,handleError:(I,A)=>{A.forEach(O=>c(D=>({...D,[O]:I}))),p(A)},messageError:s,setModel:i}},L=t=>{const[l,i]=n.useState(!0),[s,c]=n.useState(!1),d=n.useCallback((p,h)=>{const b=t.match(/[0-9]+/g);if(b===null)return;const[S]=b;h=Math.min(window.innerWidth,window.outerWidth);const N=p?h>=Number(S):h<=Number(S);c(N)},[t]);return n.useEffect(()=>{const p=/\(min-width:\s?[0-9]+px\)/gi.test(t),h=/\(max-width:\s?[0-9]+px\)/gi.test(t);if(!p&&!h&&i(!1),!p&&!h)return;const b=Math.min(window.innerWidth,window.outerWidth);d(p,b)},[t,d]),n.useEffect(()=>{if(!l)return;const p=Math.min(window.innerWidth,window.outerWidth);function h(){const b=/min-width/gi.test(t);d(b,p)}return window.addEventListener("resize",h),()=>window.removeEventListener("resize",h)},[l,t,d]),s},B=()=>{const[t,l]=n.useState({width:0,height:0});return n.useEffect(()=>{const i=()=>{const s=Math.min(window.innerWidth,window.outerWidth),c=Math.min(window.innerHeight,window.outerHeight);l({width:s,height:c})};return requestAnimationFrame(()=>i()),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[]),t};function _(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var z={exports:{}},X={};/**
35
+ */(function(e){(function(){var o={}.hasOwnProperty;function r(){for(var f="",a=0;a<arguments.length;a++){var m=arguments[a];m&&(f=u(f,n(m)))}return f}function n(f){if(typeof f=="string"||typeof f=="number")return f;if(typeof f!="object")return"";if(Array.isArray(f))return r.apply(null,f);if(f.toString!==Object.prototype.toString&&!f.toString.toString().includes("[native code]"))return f.toString();var a="";for(var m in f)o.call(f,m)&&f[m]&&(a=u(a,m));return a}function u(f,a){return a?f?f+" "+a:f+a:f}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(ll);var Jc=ll.exports;const Zt=cs(Jc),sl=({className:e="text-sm w-full rounded-md",children:o,icon:r=null,edge:n=null,disabled:u=!1,type:f="button",onClick:a,id:m})=>{const v=Zt({"ml-2":n==="start"&&r!==null,"mr-2":n==="end"&&r!==null});return w.jsxs("button",{className:se("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-primary-7 bg-gray-50",e),type:f,onClick:a,disabled:u,"data-testid":`button-outline-${m}`,id:`button-outline-${m}`,children:[n==="start"&&r!==null&&w.jsx("span",{children:r}),w.jsx("span",{className:se("flex",v),id:m,children:o}),n==="end"&&r!==null&&w.jsx("span",{children:r})]})},Qc=({children:e,className:o="",icon:r=null,edge:n=null,disabled:u=!1,type:f="button",onClick:a,id:m})=>{const v=Zt({"ml-2":n==="start"&&r!==null,"mr-2":n==="end"&&r!==null});return w.jsxs("button",{className:`${o} flex justify-center items-center`,edge:n,type:f,onClick:a,disabled:u,"data-testid":`button-${m}`,children:[n==="start"&&r!==null&&w.jsx("span",{children:r}),w.jsx("span",{className:v,children:e}),n==="end"&&r!==null&&w.jsx("span",{children:r})]})},Jn=({children:e,classNameButton:o="bg-primary-7 hover:bg-primary-8 focus-visible:outline-primary-7 shadow-primary-6 rounded font-semibold px-3 py-1.5 text-white w-full",classNameText:r="",icon:n=null,edge:u=null,disabled:f=!1,type:a="button",onClick:m,id:v,outline:x="0px 0px 0px 2px #6366F1, 0px 0px 0px 2px #FFF, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameContainer:E=""})=>{const[k,P]=g.useState(!1),C=Zt({"ml-2":u==="start"&&n!==null,"mr-2":u==="end"&&n!==null}),M=()=>{m&&m()};return w.jsx("div",{className:se("rounded-md p-0.5",E!==""&&E),style:{boxShadow:k?x:"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:w.jsxs("button",{className:se("flex justify-center items-center text-sm leading-6 shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",f&&"text-white bg-gray-300 rounded focus:outline-none cursor-default",f?o.replace(/\bbg-\w+\b/g,""):o),type:a,onClick:M,onFocus:()=>P(!0),onBlur:()=>P(!1),disabled:f,"data-testid":`button-solid-${v}`,children:[u==="start"&&n!==null&&w.jsx("span",{className:"flex",children:n}),w.jsx("span",{className:se(r.length===0&&C,r.length!==0&&r),children:e}),u==="end"&&n!==null&&w.jsx("span",{children:n})]})})},ed=({label:e=null,checked:o=!1,onChange:r,id:n,className:u="",classNameCheckbox:f="h-4 w-4",style:a={},disabled:m=!1})=>{const[v,x]=g.useState(!1);return g.useEffect(()=>{x(o)},[o]),w.jsxs("div",{className:"flex items-center",style:a,"data-testid":`container-check-${n}`,children:[w.jsx("input",{checked:v,id:`${e}-${n}`,value:n,"aria-describedby":"comments-description",type:"checkbox",onChange:r,className:se("cursor-pointer rounded border-gray-300 text-primary-7 focus:ring-primary-7",f!==""&&f),"data-testid":`checkbox-${n}`,disabled:m}),e!==null?w.jsx("label",{htmlFor:`${e}-${n}`,className:`ml-2.5 font-normal cursor-pointer ${u}`,id:`label-${n}`,"data-testid":"label",children:e}):null]})};function td({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const nd=Z.forwardRef(td);function rd({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const al=Z.forwardRef(rd);function od({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const id=Z.forwardRef(od);function ld({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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 sd=Z.forwardRef(ld);function ad({title:e,titleId:o,...r},n){return Z.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:n,"aria-labelledby":o},r),e?Z.createElement("title",{id:o},e):null,Z.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 ud=Z.forwardRef(ad);function ul({children:e,className:o="sm:max-w-sm w-11/12 sm:my-8",classNameContainer:r="",isOpen:n=!1,setIsOpen:u,showIconSuccess:f=!0,showButton:a=!0,style:m={}}){return w.jsx(vn,{show:n,as:g.Fragment,children:w.jsxs(Ki,{as:"div",className:"z-50 relative",onClose:u,"data-testid":"modal",children:[w.jsx(vn.Child,{as:g.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-5",leave:"ease-in duration-200",leaveFrom:"opacity-5",leaveTo:"opacity-0",children:w.jsx("div",{className:"fixed inset-0 bg-opacity-40 bg-gray-900 transition-opacity","data-testid":"window-close",onClick:()=>u(!1)})}),w.jsx("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:w.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:w.jsx(vn.Child,{as:g.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:w.jsxs(Ki.Panel,{className:se("relative transform rounded-lg bg-white px-4 pb-3 pt-5 text-left transition-all sm:w-full sm:pt-3 sm:px-3",o!==""&&o),style:m,children:[f&&w.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100",children:w.jsx(nd,{className:"h-6 w-6 text-green-600","aria-hidden":"true"})}),w.jsx("div",{className:se(r!==""&&r),"data-testid":"content",children:e}),a&&w.jsx("div",{className:"mt-5 sm:mt-6",children:w.jsx(Jn,{id:"close-modal",onClick:()=>u(!1),children:"Cerrar"})}),w.jsx("button",{className:"opacity-0 absolute"})]})})})})]})})}const cd=({isOpenModalConfirmation:e,setIsOpenModalConfirmation:o,close:r,title:n="¿Estás seguro de abandonar la creación de la acción?",description:u="La información se perderá si no creas la acción",classNameTitle:f="",classNameDescription:a=""})=>{const m=()=>{o(!1),r()};return w.jsxs(ul,{isOpen:e,setIsOpen:()=>o(),showButton:!1,showIconSuccess:!1,children:[w.jsx("p",{className:se("text-center text-sm",f!==""&&f),children:n}),w.jsx("p",{className:se("text-center text-sm",a!==""&&a),children:u}),w.jsxs("div",{className:"flex w-full justify-center mt-5",children:[w.jsx(sl,{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:()=>o(),id:"cancel",children:"Cancelar"}),w.jsx(Jn,{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:m,id:"confirmation",children:"Aceptar"})]})]})},dd=({className:e="",style:o={}})=>w.jsx("div",{className:se("w-px",e!==""&&e),style:o}),fd=({onClick:e,id:o="",className:r=""})=>w.jsxs("div",{className:se("flex items-center text-default-4",r!==""&&r),"data-testid":o,children:[w.jsx(_c,{className:"w-3 h-3 3xs:w-4 3xs:h-4 stroke-current cursor-pointer","data-testid":"chevron-left-icon",onClick:e}),w.jsx("span",{onClick:e,className:"text-sm cursor-pointer","data-testid":"go-back",children:"Volver"})]});var Fo={exports:{}};(function(e,o){(function(r,n){n(o,g,Sr)})(us,function(r,n,u){function f(t){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(l,i,s.get?s:{enumerable:!0,get:()=>t[i]})}}return l.default=t,Object.freeze(l)}const a=f(n),m=(t,l=!1)=>{function i(s){if(typeof s!="object"||s===null)return s;const c=Array.isArray(s)?[]:{};for(const d in s)s.hasOwnProperty(d)&&!l&&(c[d]=i(s[d]));return c}return t.map(s=>i(s))},v=t=>/^(?:[^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*|"[^\n"]+")@(?:[^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,63}$/i.test(t);function x(...t){return t.filter(Boolean).join(" ")}const E=t=>{const l=t.split(" ");let i=t.slice(0,2);return l.length>1&&(i=`${t.at(0)}${l[l.length-1].slice(0,1)}`),i},k=t=>typeof t!="string"&&Promise.resolve(t)instanceof Promise,P="The user aborted a request.",C="signal is aborted without reason",M=({id:t,close:l,isPathsTest:i=!1,isTest:s=!1})=>{const c=n.useCallback(d=>{d.some(p=>p.getAttribute===void 0?!1:p.getAttribute("id")===t)||l()},[l,t]);n.useEffect(()=>{const d=p=>{const h=p.composedPath();h===void 0||i||(s&&(h[0].getAttribute=()=>t),c(h))};return window.addEventListener("click",d),()=>{window.removeEventListener("click",d)}},[c,i,s,t])},R=()=>{const t=n.useRef({}),[l,i]=n.useState({}),[s,c]=n.useState({}),[d,p]=n.useState([]);n.useEffect(()=>{t.current={}},[]);const h=I=>A=>{A.preventDefault(),A.stopPropagation(),I(l)},b=(I,A,O)=>{const{checked:D,value:F,name:$,type:U,id:W}=I.target,J={radio:W,checkbox:D};t.current={...O,...t.current,[$]:J[U]??F},i({...t.current,[$]:J[U]??F}),A({...t.current,[$]:J[U]??F})},S=n.useCallback((I,A)=>{t.current={...t.current,[I]:A},i(O=>({...O,[I]:A}))},[]),N=n.useCallback((I,A)=>{const O=A.filter(D=>I[D]===""||I[D]===void 0);return O.forEach(D=>c(F=>({...F,[D]:"Este campo es requerido"}))),p(O),O.length>0},[]);return{handleSubmit:h,handleChange:b,setValuesDefault:S,validateFields:N,errors:d,model:l,handleError:(I,A)=>{A.forEach(O=>c(D=>({...D,[O]:I}))),p(A)},messageError:s,setModel:i}},L=t=>{const[l,i]=n.useState(!0),[s,c]=n.useState(!1),d=n.useCallback((p,h)=>{const b=t.match(/[0-9]+/g);if(b===null)return;const[S]=b;h=Math.min(window.innerWidth,window.outerWidth);const N=p?h>=Number(S):h<=Number(S);c(N)},[t]);return n.useEffect(()=>{const p=/\(min-width:\s?[0-9]+px\)/gi.test(t),h=/\(max-width:\s?[0-9]+px\)/gi.test(t);if(!p&&!h&&i(!1),!p&&!h)return;const b=Math.min(window.innerWidth,window.outerWidth);d(p,b)},[t,d]),n.useEffect(()=>{if(!l)return;const p=Math.min(window.innerWidth,window.outerWidth);function h(){const b=/min-width/gi.test(t);d(b,p)}return window.addEventListener("resize",h),()=>window.removeEventListener("resize",h)},[l,t,d]),s},B=()=>{const[t,l]=n.useState({width:0,height:0});return n.useEffect(()=>{const i=()=>{const s=Math.min(window.innerWidth,window.outerWidth),c=Math.min(window.innerHeight,window.outerHeight);l({width:s,height:c})};return requestAnimationFrame(()=>i()),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[]),t};function _(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var z={exports:{}},X={};/**
36
36
  * @license React
37
37
  * react-jsx-runtime.production.min.js
38
38
  *
@@ -48,7 +48,7 @@ Check the top-level render call using <`+Q+">.")}return H}}function Ln(j,H){{if(
48
48
  *
49
49
  * This source code is licensed under the MIT license found in the
50
50
  * LICENSE file in the root directory of this source tree.
51
- */var Oe;function be(){return Oe||(Oe=1,process.env.NODE_ENV!=="production"&&function(){var t=n,l=Symbol.for("react.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),h=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),O=Symbol.for("react.offscreen"),D=Symbol.iterator,F="@@iterator";function $(T){if(T===null||typeof T!="object")return null;var G=D&&T[D]||T[F];return typeof G=="function"?G:null}var U=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function W(T){{for(var G=arguments.length,oe=new Array(G>1?G-1:0),Ie=1;Ie<G;Ie++)oe[Ie-1]=arguments[Ie];J("error",T,oe)}}function J(T,G,oe){{var Ie=U.ReactDebugCurrentFrame,rt=Ie.getStackAddendum();rt!==""&&(G+="%s",oe=oe.concat([rt]));var pt=oe.map(function(Ke){return String(Ke)});pt.unshift("Warning: "+G),Function.prototype.apply.call(console[T],console,pt)}}var de=!1,se=!1,xe=!1,qe=!1,He=!1,ye;ye=Symbol.for("react.module.reference");function Te(T){return!!(typeof T=="string"||typeof T=="function"||T===s||T===d||He||T===c||T===S||T===N||qe||T===O||de||se||xe||typeof T=="object"&&T!==null&&(T.$$typeof===A||T.$$typeof===I||T.$$typeof===p||T.$$typeof===h||T.$$typeof===b||T.$$typeof===ye||T.getModuleId!==void 0))}function Me(T,G,oe){var Ie=T.displayName;if(Ie)return Ie;var rt=G.displayName||G.name||"";return rt!==""?oe+"("+rt+")":oe}function Be(T){return T.displayName||"Context"}function ct(T){if(T==null)return null;if(typeof T.tag=="number"&&W("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof T=="function")return T.displayName||T.name||null;if(typeof T=="string")return T;switch(T){case s:return"Fragment";case i:return"Portal";case d:return"Profiler";case c:return"StrictMode";case S:return"Suspense";case N:return"SuspenseList"}if(typeof T=="object")switch(T.$$typeof){case h:var G=T;return Be(G)+".Consumer";case p:var oe=T;return Be(oe._context)+".Provider";case b:return Me(T,T.render,"ForwardRef");case I:var Ie=T.displayName||null;return Ie!==null?Ie:ct(T.type)||"Memo";case A:{var rt=T,pt=rt._payload,Ke=rt._init;try{return ct(Ke(pt))}catch{return null}}}return null}var mt=Object.assign,K=0,dt,ze,bt,ce,Ue,ut,Nt;function Rt(){}Rt.__reactDisabledLog=!0;function wt(){{if(K===0){dt=console.log,ze=console.info,bt=console.warn,ce=console.error,Ue=console.group,ut=console.groupCollapsed,Nt=console.groupEnd;var T={configurable:!0,enumerable:!0,value:Rt,writable:!0};Object.defineProperties(console,{info:T,log:T,warn:T,error:T,group:T,groupCollapsed:T,groupEnd:T})}K++}}function De(){{if(K--,K===0){var T={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:mt({},T,{value:dt}),info:mt({},T,{value:ze}),warn:mt({},T,{value:bt}),error:mt({},T,{value:ce}),group:mt({},T,{value:Ue}),groupCollapsed:mt({},T,{value:ut}),groupEnd:mt({},T,{value:Nt})})}K<0&&W("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Ct=U.ReactCurrentDispatcher,et;function At(T,G,oe){{if(et===void 0)try{throw Error()}catch(rt){var Ie=rt.stack.trim().match(/\n( *(at )?)/);et=Ie&&Ie[1]||""}return`
51
+ */var Oe;function be(){return Oe||(Oe=1,process.env.NODE_ENV!=="production"&&function(){var t=n,l=Symbol.for("react.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),h=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),O=Symbol.for("react.offscreen"),D=Symbol.iterator,F="@@iterator";function $(T){if(T===null||typeof T!="object")return null;var G=D&&T[D]||T[F];return typeof G=="function"?G:null}var U=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function W(T){{for(var G=arguments.length,oe=new Array(G>1?G-1:0),Ie=1;Ie<G;Ie++)oe[Ie-1]=arguments[Ie];J("error",T,oe)}}function J(T,G,oe){{var Ie=U.ReactDebugCurrentFrame,rt=Ie.getStackAddendum();rt!==""&&(G+="%s",oe=oe.concat([rt]));var pt=oe.map(function(Ke){return String(Ke)});pt.unshift("Warning: "+G),Function.prototype.apply.call(console[T],console,pt)}}var de=!1,ae=!1,xe=!1,qe=!1,He=!1,ye;ye=Symbol.for("react.module.reference");function Te(T){return!!(typeof T=="string"||typeof T=="function"||T===s||T===d||He||T===c||T===S||T===N||qe||T===O||de||ae||xe||typeof T=="object"&&T!==null&&(T.$$typeof===A||T.$$typeof===I||T.$$typeof===p||T.$$typeof===h||T.$$typeof===b||T.$$typeof===ye||T.getModuleId!==void 0))}function Me(T,G,oe){var Ie=T.displayName;if(Ie)return Ie;var rt=G.displayName||G.name||"";return rt!==""?oe+"("+rt+")":oe}function Be(T){return T.displayName||"Context"}function ct(T){if(T==null)return null;if(typeof T.tag=="number"&&W("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof T=="function")return T.displayName||T.name||null;if(typeof T=="string")return T;switch(T){case s:return"Fragment";case i:return"Portal";case d:return"Profiler";case c:return"StrictMode";case S:return"Suspense";case N:return"SuspenseList"}if(typeof T=="object")switch(T.$$typeof){case h:var G=T;return Be(G)+".Consumer";case p:var oe=T;return Be(oe._context)+".Provider";case b:return Me(T,T.render,"ForwardRef");case I:var Ie=T.displayName||null;return Ie!==null?Ie:ct(T.type)||"Memo";case A:{var rt=T,pt=rt._payload,Ke=rt._init;try{return ct(Ke(pt))}catch{return null}}}return null}var mt=Object.assign,K=0,dt,ze,bt,ce,Ue,ut,Nt;function Rt(){}Rt.__reactDisabledLog=!0;function wt(){{if(K===0){dt=console.log,ze=console.info,bt=console.warn,ce=console.error,Ue=console.group,ut=console.groupCollapsed,Nt=console.groupEnd;var T={configurable:!0,enumerable:!0,value:Rt,writable:!0};Object.defineProperties(console,{info:T,log:T,warn:T,error:T,group:T,groupCollapsed:T,groupEnd:T})}K++}}function De(){{if(K--,K===0){var T={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:mt({},T,{value:dt}),info:mt({},T,{value:ze}),warn:mt({},T,{value:bt}),error:mt({},T,{value:ce}),group:mt({},T,{value:Ue}),groupCollapsed:mt({},T,{value:ut}),groupEnd:mt({},T,{value:Nt})})}K<0&&W("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Ct=U.ReactCurrentDispatcher,et;function At(T,G,oe){{if(et===void 0)try{throw Error()}catch(rt){var Ie=rt.stack.trim().match(/\n( *(at )?)/);et=Ie&&Ie[1]||""}return`
52
52
  `+et+T}}var le=!1,Ne;{var nt=typeof WeakMap=="function"?WeakMap:Map;Ne=new nt}function zt(T,G){if(!T||le)return"";{var oe=Ne.get(T);if(oe!==void 0)return oe}var Ie;le=!0;var rt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var pt;pt=Ct.current,Ct.current=null,wt();try{if(G){var Ke=function(){throw Error()};if(Object.defineProperty(Ke.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ke,[])}catch(dn){Ie=dn}Reflect.construct(T,[],Ke)}else{try{Ke.call()}catch(dn){Ie=dn}T.call(Ke.prototype)}}else{try{throw Error()}catch(dn){Ie=dn}T()}}catch(dn){if(dn&&Ie&&typeof dn.stack=="string"){for(var Ge=dn.stack.split(`
53
53
  `),Bt=Ie.stack.split(`
54
54
  `),kt=Ge.length-1,It=Bt.length-1;kt>=1&&It>=0&&Ge[kt]!==Bt[It];)It--;for(;kt>=1&&It>=0;kt--,It--)if(Ge[kt]!==Bt[It]){if(kt!==1||It!==1)do if(kt--,It--,It<0||Ge[kt]!==Bt[It]){var Ut=`
@@ -59,14 +59,14 @@ Check the render method of \``+T+"`."}return""}}function E0(T){return""}var Kl={
59
59
  Check the top-level render call using <`+oe+">.")}return G}}function Xl(T,G){{if(!T._store||T._store.validated||T.key!=null)return;T._store.validated=!0;var oe=S0(G);if(Kl[oe])return;Kl[oe]=!0;var Ie="";T&&T._owner&&T._owner!==ci.current&&(Ie=" It was passed a child from "+ct(T._owner.type)+"."),Dn(T),W('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',oe,Ie),Dn(null)}}function Jl(T,G){{if(typeof T!="object")return;if(ai(T))for(var oe=0;oe<T.length;oe++){var Ie=T[oe];fi(Ie)&&Xl(Ie,G)}else if(fi(T))T._store&&(T._store.validated=!0);else if(T){var rt=$(T);if(typeof rt=="function"&&rt!==T.entries)for(var pt=rt.call(T),Ke;!(Ke=pt.next()).done;)fi(Ke.value)&&Xl(Ke.value,G)}}}function C0(T){{var G=T.type;if(G==null||typeof G=="string")return;var oe;if(typeof G=="function")oe=G.propTypes;else if(typeof G=="object"&&(G.$$typeof===b||G.$$typeof===I))oe=G.propTypes;else return;if(oe){var Ie=ct(G);c0(oe,T.props,"prop",Ie,T)}else if(G.PropTypes!==void 0&&!di){di=!0;var rt=ct(G);W("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",rt||"Unknown")}typeof G.getDefaultProps=="function"&&!G.getDefaultProps.isReactClassApproved&&W("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function j0(T){{for(var G=Object.keys(T.props),oe=0;oe<G.length;oe++){var Ie=G[oe];if(Ie!=="children"&&Ie!=="key"){Dn(T),W("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Ie),Dn(null);break}}T.ref!==null&&(Dn(T),W("Invalid attribute `ref` supplied to `React.Fragment`."),Dn(null))}}function Ql(T,G,oe,Ie,rt,pt){{var Ke=Te(T);if(!Ke){var Ge="";(T===void 0||typeof T=="object"&&T!==null&&Object.keys(T).length===0)&&(Ge+=" 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 Bt=E0();Bt?Ge+=Bt:Ge+=ql();var kt;T===null?kt="null":ai(T)?kt="array":T!==void 0&&T.$$typeof===l?(kt="<"+(ct(T.type)||"Unknown")+" />",Ge=" Did you accidentally export a JSX literal instead of a component?"):kt=typeof T,W("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",kt,Ge)}var It=w0(T,G,oe,rt,pt);if(It==null)return It;if(Ke){var Ut=G.children;if(Ut!==void 0)if(Ie)if(ai(Ut)){for(var $n=0;$n<Ut.length;$n++)Jl(Ut[$n],T);Object.freeze&&Object.freeze(Ut)}else W("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Jl(Ut,T)}return T===s?j0(It):C0(It),It}}function T0(T,G,oe){return Ql(T,G,oe,!0)}function N0(T,G,oe){return Ql(T,G,oe,!1)}var O0=N0,k0=T0;we.Fragment=s,we.jsx=O0,we.jsxs=k0}()),we}process.env.NODE_ENV==="production"?z.exports=ue():z.exports=be();var y=z.exports;function he(t,l,i){let s=i.initialDeps??[],c;return()=>{var d,p,h,b;let S;i.key&&(d=i.debug)!=null&&d.call(i)&&(S=Date.now());const N=t();if(!(N.length!==s.length||N.some((A,O)=>s[O]!==A)))return c;s=N;let I;if(i.key&&(p=i.debug)!=null&&p.call(i)&&(I=Date.now()),c=l(...N),i.key&&(h=i.debug)!=null&&h.call(i)){const A=Math.round((Date.now()-S)*100)/100,O=Math.round((Date.now()-I)*100)/100,D=O/16,F=($,U)=>{for($=String($);$.length<U;)$=" "+$;return $};console.info(`%c⏱ ${F(O,5)} /${F(A,5)} ms`,`
60
60
  font-size: .6rem;
61
61
  font-weight: bold;
62
- color: hsl(${Math.max(0,Math.min(120-120*D,120))}deg 100% 31%);`,i==null?void 0:i.key)}return(b=i==null?void 0:i.onChange)==null||b.call(i,c),c}}function Pe(t,l){if(t===void 0)throw new Error("Unexpected undefined");return t}const Ze=(t,l)=>Math.abs(t-l)<1,Ye=(t,l,i)=>{let s;return function(...c){t.clearTimeout(s),s=t.setTimeout(()=>l.apply(this,c),i)}},Y=t=>t,Je=t=>{const l=Math.max(t.startIndex-t.overscan,0),i=Math.min(t.endIndex+t.overscan,t.count-1),s=[];for(let c=l;c<=i;c++)s.push(c);return s},Re=(t,l)=>{const i=t.scrollElement;if(!i)return;const s=t.targetWindow;if(!s)return;const c=p=>{const{width:h,height:b}=p;l({width:Math.round(h),height:Math.round(b)})};if(c(i.getBoundingClientRect()),!s.ResizeObserver)return()=>{};const d=new s.ResizeObserver(p=>{const h=p[0];if(h!=null&&h.borderBoxSize){const b=h.borderBoxSize[0];if(b){c({width:b.inlineSize,height:b.blockSize});return}}c(i.getBoundingClientRect())});return d.observe(i,{box:"border-box"}),()=>{d.unobserve(i)}},q={passive:!0},te=typeof window>"u"?!0:"onscrollend"in window,ve=(t,l)=>{const i=t.scrollElement;if(!i)return;const s=t.targetWindow;if(!s)return;let c=0;const d=te?()=>{}:Ye(s,()=>{l(c,!1)},t.options.isScrollingResetDelay),p=S=>()=>{c=i[t.options.horizontal?"scrollLeft":"scrollTop"],d(),l(c,S)},h=p(!0),b=p(!1);return b(),i.addEventListener("scroll",h,q),i.addEventListener("scrollend",b,q),()=>{i.removeEventListener("scroll",h),i.removeEventListener("scrollend",b)}},$e=(t,l,i)=>{if(l!=null&&l.borderBoxSize){const s=l.borderBoxSize[0];if(s)return Math.round(s[i.options.horizontal?"inlineSize":"blockSize"])}return Math.round(t.getBoundingClientRect()[i.options.horizontal?"width":"height"])},We=(t,{adjustments:l=0,behavior:i},s)=>{var c,d;const p=t+l;(d=(c=s.scrollElement)==null?void 0:c.scrollTo)==null||d.call(c,{[s.options.horizontal?"left":"top"]:p,behavior:i})};class lt{constructor(l){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 i=null;const s=()=>i||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:i=new this.targetWindow.ResizeObserver(c=>{c.forEach(d=>{this._measureElement(d.target,d)})}));return{disconnect:()=>{var c;return(c=s())==null?void 0:c.disconnect()},observe:c=>{var d;return(d=s())==null?void 0:d.observe(c,{box:"border-box"})},unobserve:c=>{var d;return(d=s())==null?void 0:d.unobserve(c)}}})(),this.range=null,this.setOptions=i=>{Object.entries(i).forEach(([s,c])=>{typeof c>"u"&&delete i[s]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Y,rangeExtractor:Je,onChange:()=>{},measureElement:$e,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...i}},this.notify=(i,s)=>{var c,d;const{startIndex:p,endIndex:h}=this.range??{startIndex:void 0,endIndex:void 0},b=this.calculateRange();(i||p!==(b==null?void 0:b.startIndex)||h!==(b==null?void 0:b.endIndex))&&((d=(c=this.options).onChange)==null||d.call(c,this,s))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(i=>i()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var i;const s=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==s){if(this.cleanup(),!s){this.notify(!1,!1);return}this.scrollElement=s,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((i=this.scrollElement)==null?void 0:i.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,c=>{this.scrollRect=c,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(c,d)=>{this.scrollAdjustments=0,this.scrollDirection=d?this.getScrollOffset()<c?"forward":"backward":null,this.scrollOffset=c;const p=this.isScrolling;this.isScrolling=d,this.notify(p!==d,d)}))}},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=(i,s)=>{const c=new Map,d=new Map;for(let p=s-1;p>=0;p--){const h=i[p];if(c.has(h.lane))continue;const b=d.get(h.lane);if(b==null||h.end>b.end?d.set(h.lane,h):h.end<b.end&&c.set(h.lane,!0),c.size===this.options.lanes)break}return d.size===this.options.lanes?Array.from(d.values()).sort((p,h)=>p.end===h.end?p.index-h.index:p.end-h.end)[0]:void 0},this.getMeasurementOptions=he(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(i,s,c,d,p)=>(this.pendingMeasuredCacheIndexes=[],{count:i,paddingStart:s,scrollMargin:c,getItemKey:d,enabled:p}),{key:!1}),this.getMeasurements=he(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:i,paddingStart:s,scrollMargin:c,getItemKey:d,enabled:p},h)=>{var b;if(!p)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(I=>{this.itemSizeCache.set(I.key,I.size)}));const S=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const N=this.measurementsCache.slice(0,S);for(let I=S;I<i;I++){let A=(b=this.measurementsCache[I])==null?void 0:b.measureElement;A||(A=de=>{const se=d(I),xe=this.elementsCache.get(se);if(!de){xe&&(this.observer.unobserve(xe),this.elementsCache.delete(se));return}xe!==de&&(xe&&this.observer.unobserve(xe),this.observer.observe(de),this.elementsCache.set(se,de)),de.isConnected&&this.resizeItem(I,this.options.measureElement(de,void 0,this))});const O=d(I),D=this.options.lanes===1?N[I-1]:this.getFurthestMeasurement(N,I),F=D?D.end+this.options.gap:s+c,$=h.get(O),U=typeof $=="number"?$:this.options.estimateSize(I),W=F+U,J=D?D.lane:I%this.options.lanes;N[I]={index:I,start:F,size:U,end:W,key:O,lane:J,measureElement:A}}return this.measurementsCache=N,N},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=he(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(i,s,c)=>this.range=i.length>0&&s>0?St({measurements:i,outerSize:s,scrollOffset:c}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=he(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(i,s,c,d)=>s===null?[]:i({startIndex:s.startIndex,endIndex:s.endIndex,overscan:c,count:d}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=i=>{const s=this.options.indexAttribute,c=i.getAttribute(s);return c?parseInt(c,10):(console.warn(`Missing attribute name '${s}={index}' on measured element.`),-1)},this._measureElement=(i,s)=>{const c=this.indexFromElement(i),d=this.getMeasurements()[c];if(!d||!i.isConnected){this.elementsCache.forEach((h,b)=>{h===i&&(this.observer.unobserve(i),this.elementsCache.delete(b))});return}const p=this.elementsCache.get(d.key);p!==i&&(p&&this.observer.unobserve(p),this.observer.observe(i),this.elementsCache.set(d.key,i)),this.resizeItem(c,this.options.measureElement(i,s,this))},this.resizeItem=(i,s)=>{const c=this.getMeasurements()[i];if(!c)return;const d=this.itemSizeCache.get(c.key)??c.size,p=s-d;p!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(c,p,this):c.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",p),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=p,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(c.index),this.itemSizeCache=new Map(this.itemSizeCache.set(c.key,s)),this.notify(!0,!1))},this.measureElement=i=>{i&&this._measureElement(i,void 0)},this.getVirtualItems=he(()=>[this.getIndexes(),this.getMeasurements()],(i,s)=>{const c=[];for(let d=0,p=i.length;d<p;d++){const h=i[d],b=s[h];c.push(b)}return c},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=i=>{const s=this.getMeasurements();if(s.length!==0)return Pe(s[tt(0,s.length-1,c=>Pe(s[c]).start,i)])},this.getOffsetForAlignment=(i,s)=>{const c=this.getSize(),d=this.getScrollOffset();s==="auto"&&(i<=d?s="start":i>=d+c?s="end":s="start"),s==="start"?i=i:s==="end"?i=i-c:s==="center"&&(i=i-c/2);const p=this.options.horizontal?"scrollWidth":"scrollHeight",h=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[p]:this.scrollElement[p]:0)-c;return Math.max(Math.min(h,i),0)},this.getOffsetForIndex=(i,s="auto")=>{i=Math.max(0,Math.min(i,this.options.count-1));const c=this.getMeasurements()[i];if(!c)return;const d=this.getSize(),p=this.getScrollOffset();if(s==="auto")if(c.end>=p+d-this.options.scrollPaddingEnd)s="end";else if(c.start<=p+this.options.scrollPaddingStart)s="start";else return[p,s];const h=s==="end"?c.end+this.options.scrollPaddingEnd:c.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(h,s),s]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(i,{align:s="start",behavior:c}={})=>{this.cancelScrollToIndex(),c==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(i,s),{adjustments:void 0,behavior:c})},this.scrollToIndex=(i,{align:s="auto",behavior:c}={})=>{i=Math.max(0,Math.min(i,this.options.count-1)),this.cancelScrollToIndex(),c==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const d=this.getOffsetForIndex(i,s);if(!d)return;const[p,h]=d;this._scrollToOffset(p,{adjustments:void 0,behavior:c}),c!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(i))){const[b]=Pe(this.getOffsetForIndex(i,h));Ze(b,this.getScrollOffset())||this.scrollToIndex(i,{align:h,behavior:c})}else this.scrollToIndex(i,{align:h,behavior:c})}))},this.scrollBy=(i,{behavior:s}={})=>{this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+i,{adjustments:void 0,behavior:s})},this.getTotalSize=()=>{var i;const s=this.getMeasurements();let c;return s.length===0?c=this.options.paddingStart:c=this.options.lanes===1?((i=s[s.length-1])==null?void 0:i.end)??0:Math.max(...s.slice(-this.options.lanes).map(d=>d.end)),c-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(i,{adjustments:s,behavior:c})=>{this.options.scrollToFn(i,{behavior:c,adjustments:s},this)},this.measure=()=>{var i,s;this.itemSizeCache=new Map,(s=(i=this.options).onChange)==null||s.call(i,this,!1)},this.setOptions(l)}}const tt=(t,l,i,s)=>{for(;t<=l;){const c=(t+l)/2|0,d=i(c);if(d<s)t=c+1;else if(d>s)l=c-1;else return c}return t>0?t-1:0};function St({measurements:t,outerSize:l,scrollOffset:i}){const s=t.length-1,c=tt(0,s,p=>t[p].start,i);let d=c;for(;d<s&&t[d].end<i+l;)d++;return{startIndex:c,endIndex:d}}const Lt=typeof document<"u"?a.useLayoutEffect:a.useEffect;function ge(t){const l=a.useReducer(()=>({}),{})[1],i={...t,onChange:(c,d)=>{var p;d?u.flushSync(l):l(),(p=t.onChange)==null||p.call(t,c,d)}},[s]=a.useState(()=>new lt(i));return s.setOptions(i),a.useEffect(()=>s._didMount(),[]),Lt(()=>s._willUpdate()),s}function st(t){return ge({observeElementRect:Re,observeElementOffset:ve,scrollToFn:We,...t})}var re=Object.defineProperty,Ce=(t,l,i)=>l in t?re(t,l,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[l]=i,V=(t,l,i)=>(Ce(t,typeof l!="symbol"?l+"":l,i),i);let Ee=class{constructor(){V(this,"current",this.detect()),V(this,"handoffState","pending"),V(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}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"}},ke=new Ee,Fe=(t,l)=>{ke.isServer?n.useEffect(t,l):n.useLayoutEffect(t,l)};function Mt(t){let l=n.useRef(t);return Fe(()=>{l.current=t},[t]),l}function Yt(t,l){let[i,s]=n.useState(t),c=Mt(t);return Fe(()=>s(c.current),[c,s,...l]),i}let ne=function(t){let l=Mt(t);return n.useCallback((...i)=>l.current(...i),[l])};function tr(t,l,i){let[s,c]=n.useState(i),d=t!==void 0,p=n.useRef(d),h=n.useRef(!1),b=n.useRef(!1);return d&&!p.current&&!h.current?(h.current=!0,p.current=d,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.")):!d&&p.current&&!b.current&&(b.current=!0,p.current=d,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.")),[d?t:s,ne(S=>(d||c(S),l==null?void 0:l(S)))]}function sn(t){typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t).catch(l=>setTimeout(()=>{throw l}))}function _t(){let t=[],l={addEventListener(i,s,c,d){return i.addEventListener(s,c,d),l.add(()=>i.removeEventListener(s,c,d))},requestAnimationFrame(...i){let s=requestAnimationFrame(...i);return l.add(()=>cancelAnimationFrame(s))},nextFrame(...i){return l.requestAnimationFrame(()=>l.requestAnimationFrame(...i))},setTimeout(...i){let s=setTimeout(...i);return l.add(()=>clearTimeout(s))},microTask(...i){let s={current:!0};return sn(()=>{s.current&&i[0]()}),l.add(()=>{s.current=!1})},style(i,s,c){let d=i.style.getPropertyValue(s);return Object.assign(i.style,{[s]:c}),this.add(()=>{Object.assign(i.style,{[s]:d})})},group(i){let s=_t();return i(s),this.add(()=>s.dispose())},add(i){return t.push(i),()=>{let s=t.indexOf(i);if(s>=0)for(let c of t.splice(s,1))c()}},dispose(){for(let i of t.splice(0))i()}};return l}function Gt(){let[t]=n.useState(_t);return n.useEffect(()=>()=>t.dispose(),[t]),t}function nr(){let t=typeof document>"u";return"useSyncExternalStore"in a?(l=>l.useSyncExternalStore)(a)(()=>()=>{},()=>!1,()=>!t):!1}function gn(){let t=nr(),[l,i]=a.useState(ke.isHandoffComplete);return l&&ke.isHandoffComplete===!1&&i(!1),a.useEffect(()=>{l!==!0&&i(!0)},[l]),a.useEffect(()=>ke.handoff(),[]),t?!1:l}var $r;let Pt=($r=n.useId)!=null?$r:function(){let t=gn(),[l,i]=n.useState(t?()=>ke.nextId():null);return Fe(()=>{l===null&&i(ke.nextId())},[l]),l!=null?""+l:void 0};function ft(t,l,...i){if(t in l){let c=l[t];return typeof c=="function"?c(...i):c}let s=new Error(`Tried to handle "${t}" but there is no handler defined. Only defined handlers are: ${Object.keys(l).map(c=>`"${c}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(s,ft),s}function Xt(t){return ke.isServer?null:t instanceof Node?t.ownerDocument:t!=null&&t.hasOwnProperty("current")&&t.current instanceof Node?t.current.ownerDocument:document}let rr=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(t=>`${t}:not([tabindex='-1'])`).join(",");var Ht=(t=>(t[t.First=1]="First",t[t.Previous=2]="Previous",t[t.Next=4]="Next",t[t.Last=8]="Last",t[t.WrapAround=16]="WrapAround",t[t.NoScroll=32]="NoScroll",t))(Ht||{}),or=(t=>(t[t.Error=0]="Error",t[t.Overflow=1]="Overflow",t[t.Success=2]="Success",t[t.Underflow=3]="Underflow",t))(or||{}),ir=(t=>(t[t.Previous=-1]="Previous",t[t.Next=1]="Next",t))(ir||{});function _r(t=document.body){return t==null?[]:Array.from(t.querySelectorAll(rr)).sort((l,i)=>Math.sign((l.tabIndex||Number.MAX_SAFE_INTEGER)-(i.tabIndex||Number.MAX_SAFE_INTEGER)))}var lr=(t=>(t[t.Strict=0]="Strict",t[t.Loose=1]="Loose",t))(lr||{});function sr(t,l=0){var i;return t===((i=Xt(t))==null?void 0:i.body)?!1:ft(l,{0(){return t.matches(rr)},1(){let s=t;for(;s!==null;){if(s.matches(rr))return!0;s=s.parentElement}return!1}})}function Br(t){let l=Xt(t);_t().nextFrame(()=>{l&&!sr(l.activeElement,0)&&Jt(t)})}var $o=(t=>(t[t.Keyboard=0]="Keyboard",t[t.Mouse=1]="Mouse",t))($o||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",t=>{t.metaKey||t.altKey||t.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",t=>{t.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:t.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Jt(t){t==null||t.focus({preventScroll:!0})}let _o=["textarea","input"].join(",");function ar(t){var l,i;return(i=(l=t==null?void 0:t.matches)==null?void 0:l.call(t,_o))!=null?i:!1}function Fn(t,l=i=>i){return t.slice().sort((i,s)=>{let c=l(i),d=l(s);if(c===null||d===null)return 0;let p=c.compareDocumentPosition(d);return p&Node.DOCUMENT_POSITION_FOLLOWING?-1:p&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function bn(t,l){return an(_r(),l,{relativeTo:t})}function an(t,l,{sorted:i=!0,relativeTo:s=null,skipElements:c=[]}={}){let d=Array.isArray(t)?t.length>0?t[0].ownerDocument:document:t.ownerDocument,p=Array.isArray(t)?i?Fn(t):t:_r(t);c.length>0&&p.length>1&&(p=p.filter(O=>!c.includes(O))),s=s??d.activeElement;let h=(()=>{if(l&5)return 1;if(l&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),b=(()=>{if(l&1)return 0;if(l&2)return Math.max(0,p.indexOf(s))-1;if(l&4)return Math.max(0,p.indexOf(s))+1;if(l&8)return p.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),S=l&32?{preventScroll:!0}:{},N=0,I=p.length,A;do{if(N>=I||N+I<=0)return 0;let O=b+N;if(l&16)O=(O+I)%I;else{if(O<0)return 3;if(O>=I)return 1}A=p[O],A==null||A.focus(S),N+=h}while(A!==d.activeElement);return l&6&&ar(A)&&A.select(),2}function Rn(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function zr(){return/Android/gi.test(window.navigator.userAgent)}function Wr(){return Rn()||zr()}function Tn(t,l,i){let s=Mt(l);n.useEffect(()=>{function c(d){s.current(d)}return document.addEventListener(t,c,i),()=>document.removeEventListener(t,c,i)},[t,i])}function Hr(t,l,i){let s=Mt(l);n.useEffect(()=>{function c(d){s.current(d)}return window.addEventListener(t,c,i),()=>window.removeEventListener(t,c,i)},[t,i])}function Ln(t,l,i=!0){let s=n.useRef(!1);n.useEffect(()=>{requestAnimationFrame(()=>{s.current=i})},[i]);function c(p,h){if(!s.current||p.defaultPrevented)return;let b=h(p);if(b===null||!b.getRootNode().contains(b)||!b.isConnected)return;let S=function N(I){return typeof I=="function"?N(I()):Array.isArray(I)||I instanceof Set?I:[I]}(t);for(let N of S){if(N===null)continue;let I=N instanceof HTMLElement?N:N.current;if(I!=null&&I.contains(b)||p.composed&&p.composedPath().includes(I))return}return!sr(b,lr.Loose)&&b.tabIndex!==-1&&p.preventDefault(),l(p,b)}let d=n.useRef(null);Tn("pointerdown",p=>{var h,b;s.current&&(d.current=((b=(h=p.composedPath)==null?void 0:h.call(p))==null?void 0:b[0])||p.target)},!0),Tn("mousedown",p=>{var h,b;s.current&&(d.current=((b=(h=p.composedPath)==null?void 0:h.call(p))==null?void 0:b[0])||p.target)},!0),Tn("click",p=>{Wr()||d.current&&(c(p,()=>d.current),d.current=null)},!0),Tn("touchend",p=>c(p,()=>p.target instanceof HTMLElement?p.target:null),!0),Hr("blur",p=>c(p,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Qt(...t){return n.useMemo(()=>Xt(...t),[...t])}function Ur(t){var l;if(t.type)return t.type;let i=(l=t.as)!=null?l:"button";if(typeof i=="string"&&i.toLowerCase()==="button")return"button"}function ur(t,l){let[i,s]=n.useState(()=>Ur(t));return Fe(()=>{s(Ur(t))},[t.type,t.as]),Fe(()=>{i||l.current&&l.current instanceof HTMLButtonElement&&!l.current.hasAttribute("type")&&s("button")},[i,l]),i}let cr=Symbol();function Bo(t,l=!0){return Object.assign(t,{[cr]:l})}function yt(...t){let l=n.useRef(t);n.useEffect(()=>{l.current=t},[t]);let i=ne(s=>{for(let c of l.current)c!=null&&(typeof c=="function"?c(s):c.current=s)});return t.every(s=>s==null||(s==null?void 0:s[cr]))?void 0:i}function Vr(t){return[t.screenX,t.screenY]}function Zr(){let t=n.useRef([-1,-1]);return{wasMoved(l){let i=Vr(l);return t.current[0]===i[0]&&t.current[1]===i[1]?!1:(t.current=i,!0)},update(l){t.current=Vr(l)}}}function j({container:t,accept:l,walk:i,enabled:s=!0}){let c=n.useRef(l),d=n.useRef(i);n.useEffect(()=>{c.current=l,d.current=i},[l,i]),Fe(()=>{if(!t||!s)return;let p=Xt(t);if(!p)return;let h=c.current,b=d.current,S=Object.assign(I=>h(I),{acceptNode:h}),N=p.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,S,!1);for(;N.nextNode();)b(N.currentNode)},[t,s,c,d])}function H(t,l){let i=n.useRef([]),s=ne(t);n.useEffect(()=>{let c=[...i.current];for(let[d,p]of l.entries())if(i.current[d]!==p){let h=s(l,c);return i.current=l,h}},[s,...l])}function Q(...t){return Array.from(new Set(t.flatMap(l=>typeof l=="string"?l.split(" "):[]))).filter(Boolean).join(" ")}var pe=(t=>(t[t.None=0]="None",t[t.RenderStrategy=1]="RenderStrategy",t[t.Static=2]="Static",t))(pe||{}),Le=(t=>(t[t.Unmount=0]="Unmount",t[t.Hidden=1]="Hidden",t))(Le||{});function me({ourProps:t,theirProps:l,slot:i,defaultTag:s,features:c,visible:d=!0,name:p,mergeRefs:h}){h=h??_e;let b=Ft(l,t);if(d)return Ae(b,i,s,p,h);let S=c??0;if(S&2){let{static:N=!1,...I}=b;if(N)return Ae(I,i,s,p,h)}if(S&1){let{unmount:N=!0,...I}=b;return ft(N?0:1,{0(){return null},1(){return Ae({...I,hidden:!0,style:{display:"none"}},i,s,p,h)}})}return Ae(b,i,s,p,h)}function Ae(t,l={},i,s,c){let{as:d=i,children:p,refName:h="ref",...b}=$t(t,["unmount","static"]),S=t.ref!==void 0?{[h]:t.ref}:{},N=typeof p=="function"?p(l):p;"className"in b&&b.className&&typeof b.className=="function"&&(b.className=b.className(l));let I={};if(l){let A=!1,O=[];for(let[D,F]of Object.entries(l))typeof F=="boolean"&&(A=!0),F===!0&&O.push(D);A&&(I["data-headlessui-state"]=O.join(" "))}if(d===n.Fragment&&Object.keys(gt(b)).length>0){if(!n.isValidElement(N)||Array.isArray(N)&&N.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${s} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(b).map(F=>` - ${F}`).join(`
62
+ color: hsl(${Math.max(0,Math.min(120-120*D,120))}deg 100% 31%);`,i==null?void 0:i.key)}return(b=i==null?void 0:i.onChange)==null||b.call(i,c),c}}function Pe(t,l){if(t===void 0)throw new Error("Unexpected undefined");return t}const Ze=(t,l)=>Math.abs(t-l)<1,Ye=(t,l,i)=>{let s;return function(...c){t.clearTimeout(s),s=t.setTimeout(()=>l.apply(this,c),i)}},Y=t=>t,Je=t=>{const l=Math.max(t.startIndex-t.overscan,0),i=Math.min(t.endIndex+t.overscan,t.count-1),s=[];for(let c=l;c<=i;c++)s.push(c);return s},Re=(t,l)=>{const i=t.scrollElement;if(!i)return;const s=t.targetWindow;if(!s)return;const c=p=>{const{width:h,height:b}=p;l({width:Math.round(h),height:Math.round(b)})};if(c(i.getBoundingClientRect()),!s.ResizeObserver)return()=>{};const d=new s.ResizeObserver(p=>{const h=p[0];if(h!=null&&h.borderBoxSize){const b=h.borderBoxSize[0];if(b){c({width:b.inlineSize,height:b.blockSize});return}}c(i.getBoundingClientRect())});return d.observe(i,{box:"border-box"}),()=>{d.unobserve(i)}},q={passive:!0},te=typeof window>"u"?!0:"onscrollend"in window,ve=(t,l)=>{const i=t.scrollElement;if(!i)return;const s=t.targetWindow;if(!s)return;let c=0;const d=te?()=>{}:Ye(s,()=>{l(c,!1)},t.options.isScrollingResetDelay),p=S=>()=>{c=i[t.options.horizontal?"scrollLeft":"scrollTop"],d(),l(c,S)},h=p(!0),b=p(!1);return b(),i.addEventListener("scroll",h,q),i.addEventListener("scrollend",b,q),()=>{i.removeEventListener("scroll",h),i.removeEventListener("scrollend",b)}},$e=(t,l,i)=>{if(l!=null&&l.borderBoxSize){const s=l.borderBoxSize[0];if(s)return Math.round(s[i.options.horizontal?"inlineSize":"blockSize"])}return Math.round(t.getBoundingClientRect()[i.options.horizontal?"width":"height"])},We=(t,{adjustments:l=0,behavior:i},s)=>{var c,d;const p=t+l;(d=(c=s.scrollElement)==null?void 0:c.scrollTo)==null||d.call(c,{[s.options.horizontal?"left":"top"]:p,behavior:i})};class lt{constructor(l){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 i=null;const s=()=>i||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:i=new this.targetWindow.ResizeObserver(c=>{c.forEach(d=>{this._measureElement(d.target,d)})}));return{disconnect:()=>{var c;return(c=s())==null?void 0:c.disconnect()},observe:c=>{var d;return(d=s())==null?void 0:d.observe(c,{box:"border-box"})},unobserve:c=>{var d;return(d=s())==null?void 0:d.unobserve(c)}}})(),this.range=null,this.setOptions=i=>{Object.entries(i).forEach(([s,c])=>{typeof c>"u"&&delete i[s]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Y,rangeExtractor:Je,onChange:()=>{},measureElement:$e,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...i}},this.notify=(i,s)=>{var c,d;const{startIndex:p,endIndex:h}=this.range??{startIndex:void 0,endIndex:void 0},b=this.calculateRange();(i||p!==(b==null?void 0:b.startIndex)||h!==(b==null?void 0:b.endIndex))&&((d=(c=this.options).onChange)==null||d.call(c,this,s))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(i=>i()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var i;const s=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==s){if(this.cleanup(),!s){this.notify(!1,!1);return}this.scrollElement=s,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((i=this.scrollElement)==null?void 0:i.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,c=>{this.scrollRect=c,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(c,d)=>{this.scrollAdjustments=0,this.scrollDirection=d?this.getScrollOffset()<c?"forward":"backward":null,this.scrollOffset=c;const p=this.isScrolling;this.isScrolling=d,this.notify(p!==d,d)}))}},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=(i,s)=>{const c=new Map,d=new Map;for(let p=s-1;p>=0;p--){const h=i[p];if(c.has(h.lane))continue;const b=d.get(h.lane);if(b==null||h.end>b.end?d.set(h.lane,h):h.end<b.end&&c.set(h.lane,!0),c.size===this.options.lanes)break}return d.size===this.options.lanes?Array.from(d.values()).sort((p,h)=>p.end===h.end?p.index-h.index:p.end-h.end)[0]:void 0},this.getMeasurementOptions=he(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(i,s,c,d,p)=>(this.pendingMeasuredCacheIndexes=[],{count:i,paddingStart:s,scrollMargin:c,getItemKey:d,enabled:p}),{key:!1}),this.getMeasurements=he(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:i,paddingStart:s,scrollMargin:c,getItemKey:d,enabled:p},h)=>{var b;if(!p)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(I=>{this.itemSizeCache.set(I.key,I.size)}));const S=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const N=this.measurementsCache.slice(0,S);for(let I=S;I<i;I++){let A=(b=this.measurementsCache[I])==null?void 0:b.measureElement;A||(A=de=>{const ae=d(I),xe=this.elementsCache.get(ae);if(!de){xe&&(this.observer.unobserve(xe),this.elementsCache.delete(ae));return}xe!==de&&(xe&&this.observer.unobserve(xe),this.observer.observe(de),this.elementsCache.set(ae,de)),de.isConnected&&this.resizeItem(I,this.options.measureElement(de,void 0,this))});const O=d(I),D=this.options.lanes===1?N[I-1]:this.getFurthestMeasurement(N,I),F=D?D.end+this.options.gap:s+c,$=h.get(O),U=typeof $=="number"?$:this.options.estimateSize(I),W=F+U,J=D?D.lane:I%this.options.lanes;N[I]={index:I,start:F,size:U,end:W,key:O,lane:J,measureElement:A}}return this.measurementsCache=N,N},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=he(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(i,s,c)=>this.range=i.length>0&&s>0?St({measurements:i,outerSize:s,scrollOffset:c}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=he(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(i,s,c,d)=>s===null?[]:i({startIndex:s.startIndex,endIndex:s.endIndex,overscan:c,count:d}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=i=>{const s=this.options.indexAttribute,c=i.getAttribute(s);return c?parseInt(c,10):(console.warn(`Missing attribute name '${s}={index}' on measured element.`),-1)},this._measureElement=(i,s)=>{const c=this.indexFromElement(i),d=this.getMeasurements()[c];if(!d||!i.isConnected){this.elementsCache.forEach((h,b)=>{h===i&&(this.observer.unobserve(i),this.elementsCache.delete(b))});return}const p=this.elementsCache.get(d.key);p!==i&&(p&&this.observer.unobserve(p),this.observer.observe(i),this.elementsCache.set(d.key,i)),this.resizeItem(c,this.options.measureElement(i,s,this))},this.resizeItem=(i,s)=>{const c=this.getMeasurements()[i];if(!c)return;const d=this.itemSizeCache.get(c.key)??c.size,p=s-d;p!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(c,p,this):c.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",p),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=p,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(c.index),this.itemSizeCache=new Map(this.itemSizeCache.set(c.key,s)),this.notify(!0,!1))},this.measureElement=i=>{i&&this._measureElement(i,void 0)},this.getVirtualItems=he(()=>[this.getIndexes(),this.getMeasurements()],(i,s)=>{const c=[];for(let d=0,p=i.length;d<p;d++){const h=i[d],b=s[h];c.push(b)}return c},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=i=>{const s=this.getMeasurements();if(s.length!==0)return Pe(s[tt(0,s.length-1,c=>Pe(s[c]).start,i)])},this.getOffsetForAlignment=(i,s)=>{const c=this.getSize(),d=this.getScrollOffset();s==="auto"&&(i<=d?s="start":i>=d+c?s="end":s="start"),s==="start"?i=i:s==="end"?i=i-c:s==="center"&&(i=i-c/2);const p=this.options.horizontal?"scrollWidth":"scrollHeight",h=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[p]:this.scrollElement[p]:0)-c;return Math.max(Math.min(h,i),0)},this.getOffsetForIndex=(i,s="auto")=>{i=Math.max(0,Math.min(i,this.options.count-1));const c=this.getMeasurements()[i];if(!c)return;const d=this.getSize(),p=this.getScrollOffset();if(s==="auto")if(c.end>=p+d-this.options.scrollPaddingEnd)s="end";else if(c.start<=p+this.options.scrollPaddingStart)s="start";else return[p,s];const h=s==="end"?c.end+this.options.scrollPaddingEnd:c.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(h,s),s]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(i,{align:s="start",behavior:c}={})=>{this.cancelScrollToIndex(),c==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(i,s),{adjustments:void 0,behavior:c})},this.scrollToIndex=(i,{align:s="auto",behavior:c}={})=>{i=Math.max(0,Math.min(i,this.options.count-1)),this.cancelScrollToIndex(),c==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const d=this.getOffsetForIndex(i,s);if(!d)return;const[p,h]=d;this._scrollToOffset(p,{adjustments:void 0,behavior:c}),c!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(i))){const[b]=Pe(this.getOffsetForIndex(i,h));Ze(b,this.getScrollOffset())||this.scrollToIndex(i,{align:h,behavior:c})}else this.scrollToIndex(i,{align:h,behavior:c})}))},this.scrollBy=(i,{behavior:s}={})=>{this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+i,{adjustments:void 0,behavior:s})},this.getTotalSize=()=>{var i;const s=this.getMeasurements();let c;return s.length===0?c=this.options.paddingStart:c=this.options.lanes===1?((i=s[s.length-1])==null?void 0:i.end)??0:Math.max(...s.slice(-this.options.lanes).map(d=>d.end)),c-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(i,{adjustments:s,behavior:c})=>{this.options.scrollToFn(i,{behavior:c,adjustments:s},this)},this.measure=()=>{var i,s;this.itemSizeCache=new Map,(s=(i=this.options).onChange)==null||s.call(i,this,!1)},this.setOptions(l)}}const tt=(t,l,i,s)=>{for(;t<=l;){const c=(t+l)/2|0,d=i(c);if(d<s)t=c+1;else if(d>s)l=c-1;else return c}return t>0?t-1:0};function St({measurements:t,outerSize:l,scrollOffset:i}){const s=t.length-1,c=tt(0,s,p=>t[p].start,i);let d=c;for(;d<s&&t[d].end<i+l;)d++;return{startIndex:c,endIndex:d}}const Lt=typeof document<"u"?a.useLayoutEffect:a.useEffect;function ge(t){const l=a.useReducer(()=>({}),{})[1],i={...t,onChange:(c,d)=>{var p;d?u.flushSync(l):l(),(p=t.onChange)==null||p.call(t,c,d)}},[s]=a.useState(()=>new lt(i));return s.setOptions(i),a.useEffect(()=>s._didMount(),[]),Lt(()=>s._willUpdate()),s}function st(t){return ge({observeElementRect:Re,observeElementOffset:ve,scrollToFn:We,...t})}var re=Object.defineProperty,Ce=(t,l,i)=>l in t?re(t,l,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[l]=i,V=(t,l,i)=>(Ce(t,typeof l!="symbol"?l+"":l,i),i);let Ee=class{constructor(){V(this,"current",this.detect()),V(this,"handoffState","pending"),V(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}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"}},ke=new Ee,Fe=(t,l)=>{ke.isServer?n.useEffect(t,l):n.useLayoutEffect(t,l)};function Mt(t){let l=n.useRef(t);return Fe(()=>{l.current=t},[t]),l}function Yt(t,l){let[i,s]=n.useState(t),c=Mt(t);return Fe(()=>s(c.current),[c,s,...l]),i}let ne=function(t){let l=Mt(t);return n.useCallback((...i)=>l.current(...i),[l])};function tr(t,l,i){let[s,c]=n.useState(i),d=t!==void 0,p=n.useRef(d),h=n.useRef(!1),b=n.useRef(!1);return d&&!p.current&&!h.current?(h.current=!0,p.current=d,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.")):!d&&p.current&&!b.current&&(b.current=!0,p.current=d,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.")),[d?t:s,ne(S=>(d||c(S),l==null?void 0:l(S)))]}function sn(t){typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t).catch(l=>setTimeout(()=>{throw l}))}function _t(){let t=[],l={addEventListener(i,s,c,d){return i.addEventListener(s,c,d),l.add(()=>i.removeEventListener(s,c,d))},requestAnimationFrame(...i){let s=requestAnimationFrame(...i);return l.add(()=>cancelAnimationFrame(s))},nextFrame(...i){return l.requestAnimationFrame(()=>l.requestAnimationFrame(...i))},setTimeout(...i){let s=setTimeout(...i);return l.add(()=>clearTimeout(s))},microTask(...i){let s={current:!0};return sn(()=>{s.current&&i[0]()}),l.add(()=>{s.current=!1})},style(i,s,c){let d=i.style.getPropertyValue(s);return Object.assign(i.style,{[s]:c}),this.add(()=>{Object.assign(i.style,{[s]:d})})},group(i){let s=_t();return i(s),this.add(()=>s.dispose())},add(i){return t.push(i),()=>{let s=t.indexOf(i);if(s>=0)for(let c of t.splice(s,1))c()}},dispose(){for(let i of t.splice(0))i()}};return l}function Gt(){let[t]=n.useState(_t);return n.useEffect(()=>()=>t.dispose(),[t]),t}function nr(){let t=typeof document>"u";return"useSyncExternalStore"in a?(l=>l.useSyncExternalStore)(a)(()=>()=>{},()=>!1,()=>!t):!1}function gn(){let t=nr(),[l,i]=a.useState(ke.isHandoffComplete);return l&&ke.isHandoffComplete===!1&&i(!1),a.useEffect(()=>{l!==!0&&i(!0)},[l]),a.useEffect(()=>ke.handoff(),[]),t?!1:l}var $r;let Pt=($r=n.useId)!=null?$r:function(){let t=gn(),[l,i]=n.useState(t?()=>ke.nextId():null);return Fe(()=>{l===null&&i(ke.nextId())},[l]),l!=null?""+l:void 0};function ft(t,l,...i){if(t in l){let c=l[t];return typeof c=="function"?c(...i):c}let s=new Error(`Tried to handle "${t}" but there is no handler defined. Only defined handlers are: ${Object.keys(l).map(c=>`"${c}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(s,ft),s}function Xt(t){return ke.isServer?null:t instanceof Node?t.ownerDocument:t!=null&&t.hasOwnProperty("current")&&t.current instanceof Node?t.current.ownerDocument:document}let rr=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(t=>`${t}:not([tabindex='-1'])`).join(",");var Ht=(t=>(t[t.First=1]="First",t[t.Previous=2]="Previous",t[t.Next=4]="Next",t[t.Last=8]="Last",t[t.WrapAround=16]="WrapAround",t[t.NoScroll=32]="NoScroll",t))(Ht||{}),or=(t=>(t[t.Error=0]="Error",t[t.Overflow=1]="Overflow",t[t.Success=2]="Success",t[t.Underflow=3]="Underflow",t))(or||{}),ir=(t=>(t[t.Previous=-1]="Previous",t[t.Next=1]="Next",t))(ir||{});function _r(t=document.body){return t==null?[]:Array.from(t.querySelectorAll(rr)).sort((l,i)=>Math.sign((l.tabIndex||Number.MAX_SAFE_INTEGER)-(i.tabIndex||Number.MAX_SAFE_INTEGER)))}var lr=(t=>(t[t.Strict=0]="Strict",t[t.Loose=1]="Loose",t))(lr||{});function sr(t,l=0){var i;return t===((i=Xt(t))==null?void 0:i.body)?!1:ft(l,{0(){return t.matches(rr)},1(){let s=t;for(;s!==null;){if(s.matches(rr))return!0;s=s.parentElement}return!1}})}function Br(t){let l=Xt(t);_t().nextFrame(()=>{l&&!sr(l.activeElement,0)&&Jt(t)})}var $o=(t=>(t[t.Keyboard=0]="Keyboard",t[t.Mouse=1]="Mouse",t))($o||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",t=>{t.metaKey||t.altKey||t.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",t=>{t.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:t.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Jt(t){t==null||t.focus({preventScroll:!0})}let _o=["textarea","input"].join(",");function ar(t){var l,i;return(i=(l=t==null?void 0:t.matches)==null?void 0:l.call(t,_o))!=null?i:!1}function Fn(t,l=i=>i){return t.slice().sort((i,s)=>{let c=l(i),d=l(s);if(c===null||d===null)return 0;let p=c.compareDocumentPosition(d);return p&Node.DOCUMENT_POSITION_FOLLOWING?-1:p&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function bn(t,l){return an(_r(),l,{relativeTo:t})}function an(t,l,{sorted:i=!0,relativeTo:s=null,skipElements:c=[]}={}){let d=Array.isArray(t)?t.length>0?t[0].ownerDocument:document:t.ownerDocument,p=Array.isArray(t)?i?Fn(t):t:_r(t);c.length>0&&p.length>1&&(p=p.filter(O=>!c.includes(O))),s=s??d.activeElement;let h=(()=>{if(l&5)return 1;if(l&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),b=(()=>{if(l&1)return 0;if(l&2)return Math.max(0,p.indexOf(s))-1;if(l&4)return Math.max(0,p.indexOf(s))+1;if(l&8)return p.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),S=l&32?{preventScroll:!0}:{},N=0,I=p.length,A;do{if(N>=I||N+I<=0)return 0;let O=b+N;if(l&16)O=(O+I)%I;else{if(O<0)return 3;if(O>=I)return 1}A=p[O],A==null||A.focus(S),N+=h}while(A!==d.activeElement);return l&6&&ar(A)&&A.select(),2}function Rn(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function zr(){return/Android/gi.test(window.navigator.userAgent)}function Wr(){return Rn()||zr()}function Tn(t,l,i){let s=Mt(l);n.useEffect(()=>{function c(d){s.current(d)}return document.addEventListener(t,c,i),()=>document.removeEventListener(t,c,i)},[t,i])}function Hr(t,l,i){let s=Mt(l);n.useEffect(()=>{function c(d){s.current(d)}return window.addEventListener(t,c,i),()=>window.removeEventListener(t,c,i)},[t,i])}function Ln(t,l,i=!0){let s=n.useRef(!1);n.useEffect(()=>{requestAnimationFrame(()=>{s.current=i})},[i]);function c(p,h){if(!s.current||p.defaultPrevented)return;let b=h(p);if(b===null||!b.getRootNode().contains(b)||!b.isConnected)return;let S=function N(I){return typeof I=="function"?N(I()):Array.isArray(I)||I instanceof Set?I:[I]}(t);for(let N of S){if(N===null)continue;let I=N instanceof HTMLElement?N:N.current;if(I!=null&&I.contains(b)||p.composed&&p.composedPath().includes(I))return}return!sr(b,lr.Loose)&&b.tabIndex!==-1&&p.preventDefault(),l(p,b)}let d=n.useRef(null);Tn("pointerdown",p=>{var h,b;s.current&&(d.current=((b=(h=p.composedPath)==null?void 0:h.call(p))==null?void 0:b[0])||p.target)},!0),Tn("mousedown",p=>{var h,b;s.current&&(d.current=((b=(h=p.composedPath)==null?void 0:h.call(p))==null?void 0:b[0])||p.target)},!0),Tn("click",p=>{Wr()||d.current&&(c(p,()=>d.current),d.current=null)},!0),Tn("touchend",p=>c(p,()=>p.target instanceof HTMLElement?p.target:null),!0),Hr("blur",p=>c(p,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Qt(...t){return n.useMemo(()=>Xt(...t),[...t])}function Ur(t){var l;if(t.type)return t.type;let i=(l=t.as)!=null?l:"button";if(typeof i=="string"&&i.toLowerCase()==="button")return"button"}function ur(t,l){let[i,s]=n.useState(()=>Ur(t));return Fe(()=>{s(Ur(t))},[t.type,t.as]),Fe(()=>{i||l.current&&l.current instanceof HTMLButtonElement&&!l.current.hasAttribute("type")&&s("button")},[i,l]),i}let cr=Symbol();function Bo(t,l=!0){return Object.assign(t,{[cr]:l})}function yt(...t){let l=n.useRef(t);n.useEffect(()=>{l.current=t},[t]);let i=ne(s=>{for(let c of l.current)c!=null&&(typeof c=="function"?c(s):c.current=s)});return t.every(s=>s==null||(s==null?void 0:s[cr]))?void 0:i}function Vr(t){return[t.screenX,t.screenY]}function Zr(){let t=n.useRef([-1,-1]);return{wasMoved(l){let i=Vr(l);return t.current[0]===i[0]&&t.current[1]===i[1]?!1:(t.current=i,!0)},update(l){t.current=Vr(l)}}}function j({container:t,accept:l,walk:i,enabled:s=!0}){let c=n.useRef(l),d=n.useRef(i);n.useEffect(()=>{c.current=l,d.current=i},[l,i]),Fe(()=>{if(!t||!s)return;let p=Xt(t);if(!p)return;let h=c.current,b=d.current,S=Object.assign(I=>h(I),{acceptNode:h}),N=p.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,S,!1);for(;N.nextNode();)b(N.currentNode)},[t,s,c,d])}function H(t,l){let i=n.useRef([]),s=ne(t);n.useEffect(()=>{let c=[...i.current];for(let[d,p]of l.entries())if(i.current[d]!==p){let h=s(l,c);return i.current=l,h}},[s,...l])}function Q(...t){return Array.from(new Set(t.flatMap(l=>typeof l=="string"?l.split(" "):[]))).filter(Boolean).join(" ")}var pe=(t=>(t[t.None=0]="None",t[t.RenderStrategy=1]="RenderStrategy",t[t.Static=2]="Static",t))(pe||{}),Le=(t=>(t[t.Unmount=0]="Unmount",t[t.Hidden=1]="Hidden",t))(Le||{});function me({ourProps:t,theirProps:l,slot:i,defaultTag:s,features:c,visible:d=!0,name:p,mergeRefs:h}){h=h??_e;let b=Ft(l,t);if(d)return Ae(b,i,s,p,h);let S=c??0;if(S&2){let{static:N=!1,...I}=b;if(N)return Ae(I,i,s,p,h)}if(S&1){let{unmount:N=!0,...I}=b;return ft(N?0:1,{0(){return null},1(){return Ae({...I,hidden:!0,style:{display:"none"}},i,s,p,h)}})}return Ae(b,i,s,p,h)}function Ae(t,l={},i,s,c){let{as:d=i,children:p,refName:h="ref",...b}=$t(t,["unmount","static"]),S=t.ref!==void 0?{[h]:t.ref}:{},N=typeof p=="function"?p(l):p;"className"in b&&b.className&&typeof b.className=="function"&&(b.className=b.className(l));let I={};if(l){let A=!1,O=[];for(let[D,F]of Object.entries(l))typeof F=="boolean"&&(A=!0),F===!0&&O.push(D);A&&(I["data-headlessui-state"]=O.join(" "))}if(d===n.Fragment&&Object.keys(gt(b)).length>0){if(!n.isValidElement(N)||Array.isArray(N)&&N.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${s} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(b).map(F=>` - ${F}`).join(`
63
63
  `),"","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(F=>` - ${F}`).join(`
64
64
  `)].join(`
65
- `));let A=N.props,O=typeof(A==null?void 0:A.className)=="function"?(...F)=>Q(A==null?void 0:A.className(...F),b.className):Q(A==null?void 0:A.className,b.className),D=O?{className:O}:{};return n.cloneElement(N,Object.assign({},Ft(N.props,gt($t(b,["ref"]))),I,S,{ref:c(N.ref,S.ref)},D))}return n.createElement(d,Object.assign({},$t(b,["ref"]),d!==n.Fragment&&S,d!==n.Fragment&&I),N)}function _e(...t){return t.every(l=>l==null)?void 0:l=>{for(let i of t)i!=null&&(typeof i=="function"?i(l):i.current=l)}}function Ft(...t){if(t.length===0)return{};if(t.length===1)return t[0];let l={},i={};for(let s of t)for(let c in s)c.startsWith("on")&&typeof s[c]=="function"?(i[c]!=null||(i[c]=[]),i[c].push(s[c])):l[c]=s[c];if(l.disabled||l["aria-disabled"])return Object.assign(l,Object.fromEntries(Object.keys(i).map(s=>[s,void 0])));for(let s in i)Object.assign(l,{[s](c,...d){let p=i[s];for(let h of p){if((c instanceof Event||(c==null?void 0:c.nativeEvent)instanceof Event)&&c.defaultPrevented)return;h(c,...d)}}});return l}function je(t){var l;return Object.assign(n.forwardRef(t),{displayName:(l=t.displayName)!=null?l:t.name})}function gt(t){let l=Object.assign({},t);for(let i in l)l[i]===void 0&&delete l[i];return l}function $t(t,l=[]){let i=Object.assign({},t);for(let s of l)s in i&&delete i[s];return i}let xn="div";var un=(t=>(t[t.None=1]="None",t[t.Focusable=2]="Focusable",t[t.Hidden=4]="Hidden",t))(un||{});function qt(t,l){var i;let{features:s=1,...c}=t,d={ref:l,"aria-hidden":(s&2)===2?!0:(i=c["aria-hidden"])!=null?i:void 0,hidden:(s&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",...(s&4)===4&&(s&2)!==2&&{display:"none"}}};return me({ourProps:d,theirProps:c,slot:{},defaultTag:xn,name:"Hidden"})}let dr=je(qt),zo=n.createContext(null);zo.displayName="OpenClosedContext";var Tt=(t=>(t[t.Open=1]="Open",t[t.Closed=2]="Closed",t[t.Closing=4]="Closing",t[t.Opening=8]="Opening",t))(Tt||{});function fr(){return n.useContext(zo)}function Wo({value:t,children:l}){return n.createElement(zo.Provider,{value:t},l)}function Nd(t){function l(){document.readyState!=="loading"&&(t(),document.removeEventListener("DOMContentLoaded",l))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",l),l())}let en=[];Nd(()=>{function t(l){l.target instanceof HTMLElement&&l.target!==document.body&&en[0]!==l.target&&(en.unshift(l.target),en=en.filter(i=>i!=null&&i.isConnected),en.splice(10))}window.addEventListener("click",t,{capture:!0}),window.addEventListener("mousedown",t,{capture:!0}),window.addEventListener("focus",t,{capture:!0}),document.body.addEventListener("click",t,{capture:!0}),document.body.addEventListener("mousedown",t,{capture:!0}),document.body.addEventListener("focus",t,{capture:!0})});function Yr(t){let l=t.parentElement,i=null;for(;l&&!(l instanceof HTMLFieldSetElement);)l instanceof HTMLLegendElement&&(i=l),l=l.parentElement;let s=(l==null?void 0:l.getAttribute("disabled"))==="";return s&&Od(i)?!1:s}function Od(t){if(!t)return!1;let l=t.previousElementSibling;for(;l!==null;){if(l instanceof HTMLLegendElement)return!1;l=l.previousElementSibling}return!0}function kd(t){throw new Error("Unexpected object: "+t)}var at=(t=>(t[t.First=0]="First",t[t.Previous=1]="Previous",t[t.Next=2]="Next",t[t.Last=3]="Last",t[t.Specific=4]="Specific",t[t.Nothing=5]="Nothing",t))(at||{});function Ho(t,l){let i=l.resolveItems();if(i.length<=0)return null;let s=l.resolveActiveIndex(),c=s??-1;switch(t.focus){case 0:{for(let d=0;d<i.length;++d)if(!l.resolveDisabled(i[d],d,i))return d;return s}case 1:{for(let d=c-1;d>=0;--d)if(!l.resolveDisabled(i[d],d,i))return d;return s}case 2:{for(let d=c+1;d<i.length;++d)if(!l.resolveDisabled(i[d],d,i))return d;return s}case 3:{for(let d=i.length-1;d>=0;--d)if(!l.resolveDisabled(i[d],d,i))return d;return s}case 4:{for(let d=0;d<i.length;++d)if(l.resolveId(i[d],d,i)===t.id)return d;return s}case 5:return null;default:kd(t)}}function fl(t={},l=null,i=[]){for(let[s,c]of Object.entries(t))ml(i,pl(l,s),c);return i}function pl(t,l){return t?t+"["+l+"]":l}function ml(t,l,i){if(Array.isArray(i))for(let[s,c]of i.entries())ml(t,pl(l,s.toString()),c);else i instanceof Date?t.push([l,i.toISOString()]):typeof i=="boolean"?t.push([l,i?"1":"0"]):typeof i=="string"?t.push([l,i]):typeof i=="number"?t.push([l,`${i}`]):i==null?t.push([l,""]):fl(i,l,t)}function Id(t){var l,i;let s=(l=t==null?void 0:t.form)!=null?l:t.closest("form");if(s){for(let c of s.elements)if(c!==t&&(c.tagName==="INPUT"&&c.type==="submit"||c.tagName==="BUTTON"&&c.type==="submit"||c.nodeName==="INPUT"&&c.type==="image")){c.click();return}(i=s.requestSubmit)==null||i.call(s)}}var Qe=(t=>(t.Space=" ",t.Enter="Enter",t.Escape="Escape",t.Backspace="Backspace",t.Delete="Delete",t.ArrowLeft="ArrowLeft",t.ArrowUp="ArrowUp",t.ArrowRight="ArrowRight",t.ArrowDown="ArrowDown",t.Home="Home",t.End="End",t.PageUp="PageUp",t.PageDown="PageDown",t.Tab="Tab",t))(Qe||{}),Md=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(Md||{}),Pd=(t=>(t[t.Single=0]="Single",t[t.Multi=1]="Multi",t))(Pd||{}),Fd=(t=>(t[t.Pointer=0]="Pointer",t[t.Focus=1]="Focus",t[t.Other=2]="Other",t))(Fd||{}),Rd=(t=>(t[t.OpenCombobox=0]="OpenCombobox",t[t.CloseCombobox=1]="CloseCombobox",t[t.GoToOption=2]="GoToOption",t[t.RegisterOption=3]="RegisterOption",t[t.UnregisterOption=4]="UnregisterOption",t[t.RegisterLabel=5]="RegisterLabel",t[t.SetActivationTrigger=6]="SetActivationTrigger",t[t.UpdateVirtualOptions=7]="UpdateVirtualOptions",t))(Rd||{});function Uo(t,l=i=>i){let i=t.activeOptionIndex!==null?t.options[t.activeOptionIndex]:null,s=l(t.options.slice()),c=s.length>0&&s[0].dataRef.current.order!==null?s.sort((p,h)=>p.dataRef.current.order-h.dataRef.current.order):Fn(s,p=>p.dataRef.current.domRef.current),d=i?c.indexOf(i):null;return d===-1&&(d=null),{options:c,activeOptionIndex:d}}let Ld={1(t){var l;return(l=t.dataRef.current)!=null&&l.disabled||t.comboboxState===1?t:{...t,activeOptionIndex:null,comboboxState:1}},0(t){var l,i;if((l=t.dataRef.current)!=null&&l.disabled||t.comboboxState===0)return t;if((i=t.dataRef.current)!=null&&i.value){let s=t.dataRef.current.calculateIndex(t.dataRef.current.value);if(s!==-1)return{...t,activeOptionIndex:s,comboboxState:0}}return{...t,comboboxState:0}},2(t,l){var i,s,c,d,p;if((i=t.dataRef.current)!=null&&i.disabled||(s=t.dataRef.current)!=null&&s.optionsRef.current&&!((c=t.dataRef.current)!=null&&c.optionsPropsRef.current.static)&&t.comboboxState===1)return t;if(t.virtual){let N=l.focus===at.Specific?l.idx:Ho(l,{resolveItems:()=>t.virtual.options,resolveActiveIndex:()=>{var A,O;return(O=(A=t.activeOptionIndex)!=null?A:t.virtual.options.findIndex(D=>!t.virtual.disabled(D)))!=null?O:null},resolveDisabled:t.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),I=(d=l.trigger)!=null?d:2;return t.activeOptionIndex===N&&t.activationTrigger===I?t:{...t,activeOptionIndex:N,activationTrigger:I}}let h=Uo(t);if(h.activeOptionIndex===null){let N=h.options.findIndex(I=>!I.dataRef.current.disabled);N!==-1&&(h.activeOptionIndex=N)}let b=l.focus===at.Specific?l.idx:Ho(l,{resolveItems:()=>h.options,resolveActiveIndex:()=>h.activeOptionIndex,resolveId:N=>N.id,resolveDisabled:N=>N.dataRef.current.disabled}),S=(p=l.trigger)!=null?p:2;return t.activeOptionIndex===b&&t.activationTrigger===S?t:{...t,...h,activeOptionIndex:b,activationTrigger:S}},3:(t,l)=>{var i,s,c;if((i=t.dataRef.current)!=null&&i.virtual)return{...t,options:[...t.options,l.payload]};let d=l.payload,p=Uo(t,b=>(b.push(d),b));t.activeOptionIndex===null&&(s=t.dataRef.current)!=null&&s.isSelected(l.payload.dataRef.current.value)&&(p.activeOptionIndex=p.options.indexOf(d));let h={...t,...p,activationTrigger:2};return(c=t.dataRef.current)!=null&&c.__demoMode&&t.dataRef.current.value===void 0&&(h.activeOptionIndex=0),h},4:(t,l)=>{var i;if((i=t.dataRef.current)!=null&&i.virtual)return{...t,options:t.options.filter(c=>c.id!==l.id)};let s=Uo(t,c=>{let d=c.findIndex(p=>p.id===l.id);return d!==-1&&c.splice(d,1),c});return{...t,...s,activationTrigger:2}},5:(t,l)=>t.labelId===l.id?t:{...t,labelId:l.id},6:(t,l)=>t.activationTrigger===l.trigger?t:{...t,activationTrigger:l.trigger},7:(t,l)=>{var i;if(((i=t.virtual)==null?void 0:i.options)===l.options)return t;let s=t.activeOptionIndex;if(t.activeOptionIndex!==null){let c=l.options.indexOf(t.virtual.options[t.activeOptionIndex]);c!==-1?s=c:s=null}return{...t,activeOptionIndex:s,virtual:Object.assign({},t.virtual,{options:l.options})}}},Vo=n.createContext(null);Vo.displayName="ComboboxActionsContext";function pr(t){let l=n.useContext(Vo);if(l===null){let i=new Error(`<${t} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(i,pr),i}return l}let hl=n.createContext(null);function Ad(t){var l;let i=Nn("VirtualProvider"),[s,c]=n.useMemo(()=>{let b=i.optionsRef.current;if(!b)return[0,0];let S=window.getComputedStyle(b);return[parseFloat(S.paddingBlockStart||S.paddingTop),parseFloat(S.paddingBlockEnd||S.paddingBottom)]},[i.optionsRef.current]),d=st({scrollPaddingStart:s,scrollPaddingEnd:c,count:i.virtual.options.length,estimateSize(){return 40},getScrollElement(){var b;return(b=i.optionsRef.current)!=null?b:null},overscan:12}),[p,h]=n.useState(0);return Fe(()=>{h(b=>b+1)},[(l=i.virtual)==null?void 0:l.options]),n.createElement(hl.Provider,{value:d},n.createElement("div",{style:{position:"relative",width:"100%",height:`${d.getTotalSize()}px`},ref:b=>{if(b){if(typeof process<"u"&&process.env.JEST_WORKER_ID!==void 0||i.activationTrigger===0)return;i.activeOptionIndex!==null&&i.virtual.options.length>i.activeOptionIndex&&d.scrollToIndex(i.activeOptionIndex)}}},d.getVirtualItems().map(b=>{var S;return n.createElement(n.Fragment,{key:b.key},n.cloneElement((S=t.children)==null?void 0:S.call(t,{option:i.virtual.options[b.index],open:i.comboboxState===0}),{key:`${p}-${b.key}`,"data-index":b.index,"aria-setsize":i.virtual.options.length,"aria-posinset":b.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${b.start}px)`,overflowAnchor:"none"}}))})))}let Zo=n.createContext(null);Zo.displayName="ComboboxDataContext";function Nn(t){let l=n.useContext(Zo);if(l===null){let i=new Error(`<${t} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(i,Nn),i}return l}function Dd(t,l){return ft(l.type,Ld,t,l)}let $d=n.Fragment;function _d(t,l){let{value:i,defaultValue:s,onChange:c,form:d,name:p,by:h=null,disabled:b=!1,__demoMode:S=!1,nullable:N=!1,multiple:I=!1,immediate:A=!1,virtual:O=null,...D}=t,F=!1,$=null,[U=I?[]:void 0,W]=tr(i,c,s),[J,de]=n.useReducer(Dd,{dataRef:n.createRef(),comboboxState:S?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),se=n.useRef(!1),xe=n.useRef({static:!1,hold:!1}),qe=n.useRef(null),He=n.useRef(null),ye=n.useRef(null),Te=n.useRef(null),Me=ne(typeof h=="string"?(le,Ne)=>{let nt=h;return(le==null?void 0:le[nt])===(Ne==null?void 0:Ne[nt])}:h??((le,Ne)=>le===Ne)),Be=ne(le=>J.options.findIndex(Ne=>Me(Ne.dataRef.current.value,le))),ct=n.useCallback(le=>ft(K.mode,{1:()=>U.some(Ne=>Me(Ne,le)),0:()=>Me(U,le)}),[U]),mt=ne(le=>J.activeOptionIndex===Be(le)),K=n.useMemo(()=>({...J,immediate:F,optionsPropsRef:xe,labelRef:qe,inputRef:He,buttonRef:ye,optionsRef:Te,value:U,defaultValue:s,disabled:b,mode:I?1:0,virtual:J.virtual,get activeOptionIndex(){if(se.current&&J.activeOptionIndex===null&&J.options.length>0){let le=J.options.findIndex(Ne=>!Ne.dataRef.current.disabled);if(le!==-1)return le}return J.activeOptionIndex},calculateIndex:Be,compare:Me,isSelected:ct,isActive:mt,nullable:N,__demoMode:S}),[U,s,b,I,N,S,J,$]);Fe(()=>{},[$,void 0]),Fe(()=>{J.dataRef.current=K},[K]),Ln([K.buttonRef,K.inputRef,K.optionsRef],()=>De.closeCombobox(),K.comboboxState===0);let dt=n.useMemo(()=>{var le,Ne,nt;return{open:K.comboboxState===0,disabled:b,activeIndex:K.activeOptionIndex,activeOption:K.activeOptionIndex===null?null:K.virtual?K.virtual.options[(le=K.activeOptionIndex)!=null?le:0]:(nt=(Ne=K.options[K.activeOptionIndex])==null?void 0:Ne.dataRef.current.value)!=null?nt:null,value:U}},[K,b,U]),ze=ne(()=>{if(K.activeOptionIndex!==null){if(K.virtual)Rt(K.virtual.options[K.activeOptionIndex]);else{let{dataRef:le}=K.options[K.activeOptionIndex];Rt(le.current.value)}De.goToOption(at.Specific,K.activeOptionIndex)}}),bt=ne(()=>{de({type:0}),se.current=!0}),ce=ne(()=>{de({type:1}),se.current=!1}),Ue=ne((le,Ne,nt)=>(se.current=!1,le===at.Specific?de({type:2,focus:at.Specific,idx:Ne,trigger:nt}):de({type:2,focus:le,trigger:nt}))),ut=ne((le,Ne)=>(de({type:3,payload:{id:le,dataRef:Ne}}),()=>{K.isActive(Ne.current.value)&&(se.current=!0),de({type:4,id:le})})),Nt=ne(le=>(de({type:5,id:le}),()=>de({type:5,id:null}))),Rt=ne(le=>ft(K.mode,{0(){return W==null?void 0:W(le)},1(){let Ne=K.value.slice(),nt=Ne.findIndex(zt=>Me(zt,le));return nt===-1?Ne.push(le):Ne.splice(nt,1),W==null?void 0:W(Ne)}})),wt=ne(le=>{de({type:6,trigger:le})}),De=n.useMemo(()=>({onChange:Rt,registerOption:ut,registerLabel:Nt,goToOption:Ue,closeCombobox:ce,openCombobox:bt,setActivationTrigger:wt,selectActiveOption:ze}),[]),Ct=l===null?{}:{ref:l},et=n.useRef(null),At=Gt();return n.useEffect(()=>{et.current&&s!==void 0&&At.addEventListener(et.current,"reset",()=>{W==null||W(s)})},[et,W]),n.createElement(Vo.Provider,{value:De},n.createElement(Zo.Provider,{value:K},n.createElement(Wo,{value:ft(K.comboboxState,{0:Tt.Open,1:Tt.Closed})},p!=null&&U!=null&&fl({[p]:U}).map(([le,Ne],nt)=>n.createElement(dr,{features:un.Hidden,ref:nt===0?zt=>{var An;et.current=(An=zt==null?void 0:zt.closest("form"))!=null?An:null}:void 0,...gt({key:le,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:d,disabled:b,name:le,value:Ne})})),me({ourProps:Ct,theirProps:D,slot:dt,defaultTag:$d,name:"Combobox"}))))}let Bd="input";function zd(t,l){var i,s,c,d,p;let h=Pt(),{id:b=`headlessui-combobox-input-${h}`,onChange:S,displayValue:N,type:I="text",...A}=t,O=Nn("Combobox.Input"),D=pr("Combobox.Input"),F=yt(O.inputRef,l),$=Qt(O.inputRef),U=n.useRef(!1),W=Gt(),J=ne(()=>{D.onChange(null),O.optionsRef.current&&(O.optionsRef.current.scrollTop=0),D.goToOption(at.Nothing)}),de=function(){var K;return typeof N=="function"&&O.value!==void 0?(K=N(O.value))!=null?K:"":typeof O.value=="string"?O.value:""}();H(([K,dt],[ze,bt])=>{if(U.current)return;let ce=O.inputRef.current;ce&&((bt===0&&dt===1||K!==ze)&&(ce.value=K),requestAnimationFrame(()=>{if(U.current||!ce||($==null?void 0:$.activeElement)!==ce)return;let{selectionStart:Ue,selectionEnd:ut}=ce;Math.abs((ut??0)-(Ue??0))===0&&Ue===0&&ce.setSelectionRange(ce.value.length,ce.value.length)}))},[de,O.comboboxState,$]),H(([K],[dt])=>{if(K===0&&dt===1){if(U.current)return;let ze=O.inputRef.current;if(!ze)return;let bt=ze.value,{selectionStart:ce,selectionEnd:Ue,selectionDirection:ut}=ze;ze.value="",ze.value=bt,ut!==null?ze.setSelectionRange(ce,Ue,ut):ze.setSelectionRange(ce,Ue)}},[O.comboboxState]);let se=n.useRef(!1),xe=ne(()=>{se.current=!0}),qe=ne(()=>{W.nextFrame(()=>{se.current=!1})}),He=ne(K=>{switch(U.current=!0,K.key){case Qe.Enter:if(U.current=!1,O.comboboxState!==0||se.current)return;if(K.preventDefault(),K.stopPropagation(),O.activeOptionIndex===null){D.closeCombobox();return}D.selectActiveOption(),O.mode===0&&D.closeCombobox();break;case Qe.ArrowDown:return U.current=!1,K.preventDefault(),K.stopPropagation(),ft(O.comboboxState,{0:()=>D.goToOption(at.Next),1:()=>D.openCombobox()});case Qe.ArrowUp:return U.current=!1,K.preventDefault(),K.stopPropagation(),ft(O.comboboxState,{0:()=>D.goToOption(at.Previous),1:()=>{D.openCombobox(),W.nextFrame(()=>{O.value||D.goToOption(at.Last)})}});case Qe.Home:if(K.shiftKey)break;return U.current=!1,K.preventDefault(),K.stopPropagation(),D.goToOption(at.First);case Qe.PageUp:return U.current=!1,K.preventDefault(),K.stopPropagation(),D.goToOption(at.First);case Qe.End:if(K.shiftKey)break;return U.current=!1,K.preventDefault(),K.stopPropagation(),D.goToOption(at.Last);case Qe.PageDown:return U.current=!1,K.preventDefault(),K.stopPropagation(),D.goToOption(at.Last);case Qe.Escape:return U.current=!1,O.comboboxState!==0?void 0:(K.preventDefault(),O.optionsRef.current&&!O.optionsPropsRef.current.static&&K.stopPropagation(),O.nullable&&O.mode===0&&O.value===null&&J(),D.closeCombobox());case Qe.Tab:if(U.current=!1,O.comboboxState!==0)return;O.mode===0&&O.activationTrigger!==1&&D.selectActiveOption(),D.closeCombobox();break}}),ye=ne(K=>{S==null||S(K),O.nullable&&O.mode===0&&K.target.value===""&&J(),D.openCombobox()}),Te=ne(K=>{var dt,ze,bt;let ce=(dt=K.relatedTarget)!=null?dt:en.find(Ue=>Ue!==K.currentTarget);if(U.current=!1,!((ze=O.optionsRef.current)!=null&&ze.contains(ce))&&!((bt=O.buttonRef.current)!=null&&bt.contains(ce))&&O.comboboxState===0)return K.preventDefault(),O.mode===0&&(O.nullable&&O.value===null?J():O.activationTrigger!==1&&D.selectActiveOption()),D.closeCombobox()}),Me=ne(K=>{var dt,ze,bt;let ce=(dt=K.relatedTarget)!=null?dt:en.find(Ue=>Ue!==K.currentTarget);(ze=O.buttonRef.current)!=null&&ze.contains(ce)||(bt=O.optionsRef.current)!=null&&bt.contains(ce)||O.disabled||O.immediate&&O.comboboxState!==0&&(D.openCombobox(),W.nextFrame(()=>{D.setActivationTrigger(1)}))}),Be=Yt(()=>{if(O.labelId)return[O.labelId].join(" ")},[O.labelId]),ct=n.useMemo(()=>({open:O.comboboxState===0,disabled:O.disabled}),[O]),mt={ref:F,id:b,role:"combobox",type:I,"aria-controls":(i=O.optionsRef.current)==null?void 0:i.id,"aria-expanded":O.comboboxState===0,"aria-activedescendant":O.activeOptionIndex===null?void 0:O.virtual?(s=O.options.find(K=>{var dt;return!((dt=O.virtual)!=null&&dt.disabled(K.dataRef.current.value))&&O.compare(K.dataRef.current.value,O.virtual.options[O.activeOptionIndex])}))==null?void 0:s.id:(c=O.options[O.activeOptionIndex])==null?void 0:c.id,"aria-labelledby":Be,"aria-autocomplete":"list",defaultValue:(p=(d=t.defaultValue)!=null?d:O.defaultValue!==void 0?N==null?void 0:N(O.defaultValue):null)!=null?p:O.defaultValue,disabled:O.disabled,onCompositionStart:xe,onCompositionEnd:qe,onKeyDown:He,onChange:ye,onFocus:Me,onBlur:Te};return me({ourProps:mt,theirProps:A,slot:ct,defaultTag:Bd,name:"Combobox.Input"})}let Wd="button";function Hd(t,l){var i;let s=Nn("Combobox.Button"),c=pr("Combobox.Button"),d=yt(s.buttonRef,l),p=Pt(),{id:h=`headlessui-combobox-button-${p}`,...b}=t,S=Gt(),N=ne(F=>{switch(F.key){case Qe.ArrowDown:return F.preventDefault(),F.stopPropagation(),s.comboboxState===1&&c.openCombobox(),S.nextFrame(()=>{var $;return($=s.inputRef.current)==null?void 0:$.focus({preventScroll:!0})});case Qe.ArrowUp:return F.preventDefault(),F.stopPropagation(),s.comboboxState===1&&(c.openCombobox(),S.nextFrame(()=>{s.value||c.goToOption(at.Last)})),S.nextFrame(()=>{var $;return($=s.inputRef.current)==null?void 0:$.focus({preventScroll:!0})});case Qe.Escape:return s.comboboxState!==0?void 0:(F.preventDefault(),s.optionsRef.current&&!s.optionsPropsRef.current.static&&F.stopPropagation(),c.closeCombobox(),S.nextFrame(()=>{var $;return($=s.inputRef.current)==null?void 0:$.focus({preventScroll:!0})}));default:return}}),I=ne(F=>{if(Yr(F.currentTarget))return F.preventDefault();s.comboboxState===0?c.closeCombobox():(F.preventDefault(),c.openCombobox()),S.nextFrame(()=>{var $;return($=s.inputRef.current)==null?void 0:$.focus({preventScroll:!0})})}),A=Yt(()=>{if(s.labelId)return[s.labelId,h].join(" ")},[s.labelId,h]),O=n.useMemo(()=>({open:s.comboboxState===0,disabled:s.disabled,value:s.value}),[s]),D={ref:d,id:h,type:ur(t,s.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(i=s.optionsRef.current)==null?void 0:i.id,"aria-expanded":s.comboboxState===0,"aria-labelledby":A,disabled:s.disabled,onClick:I,onKeyDown:N};return me({ourProps:D,theirProps:b,slot:O,defaultTag:Wd,name:"Combobox.Button"})}let Ud="label";function Vd(t,l){let i=Pt(),{id:s=`headlessui-combobox-label-${i}`,...c}=t,d=Nn("Combobox.Label"),p=pr("Combobox.Label"),h=yt(d.labelRef,l);Fe(()=>p.registerLabel(s),[s]);let b=ne(()=>{var N;return(N=d.inputRef.current)==null?void 0:N.focus({preventScroll:!0})}),S=n.useMemo(()=>({open:d.comboboxState===0,disabled:d.disabled}),[d]);return me({ourProps:{ref:h,id:s,onClick:b},theirProps:c,slot:S,defaultTag:Ud,name:"Combobox.Label"})}let Zd="ul",Yd=pe.RenderStrategy|pe.Static;function Gd(t,l){let i=Pt(),{id:s=`headlessui-combobox-options-${i}`,hold:c=!1,...d}=t,p=Nn("Combobox.Options"),h=yt(p.optionsRef,l),b=fr(),S=b!==null?(b&Tt.Open)===Tt.Open:p.comboboxState===0;Fe(()=>{var O;p.optionsPropsRef.current.static=(O=t.static)!=null?O:!1},[p.optionsPropsRef,t.static]),Fe(()=>{p.optionsPropsRef.current.hold=c},[p.optionsPropsRef,c]),j({container:p.optionsRef.current,enabled:p.comboboxState===0,accept(O){return O.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:O.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(O){O.setAttribute("role","none")}});let N=Yt(()=>{var O,D;return(D=p.labelId)!=null?D:(O=p.buttonRef.current)==null?void 0:O.id},[p.labelId,p.buttonRef.current]),I=n.useMemo(()=>({open:p.comboboxState===0,option:void 0}),[p]),A={"aria-labelledby":N,role:"listbox","aria-multiselectable":p.mode===1?!0:void 0,id:s,ref:h};return p.virtual&&p.comboboxState===0&&Object.assign(d,{children:n.createElement(Ad,null,d.children)}),me({ourProps:A,theirProps:d,slot:I,defaultTag:Zd,features:Yd,visible:S,name:"Combobox.Options"})}let qd="li";function Kd(t,l){var i;let s=Pt(),{id:c=`headlessui-combobox-option-${s}`,disabled:d=!1,value:p,order:h=null,...b}=t,S=Nn("Combobox.Option"),N=pr("Combobox.Option"),I=S.virtual?S.activeOptionIndex===S.calculateIndex(p):S.activeOptionIndex===null?!1:((i=S.options[S.activeOptionIndex])==null?void 0:i.id)===c,A=S.isSelected(p),O=n.useRef(null),D=Mt({disabled:d,value:p,domRef:O,order:h}),F=n.useContext(hl),$=yt(l,O,F?F.measureElement:null),U=ne(()=>N.onChange(p));Fe(()=>N.registerOption(c,D),[D,c]);let W=n.useRef(!(S.virtual||S.__demoMode));Fe(()=>{if(!S.virtual||!S.__demoMode)return;let Te=_t();return Te.requestAnimationFrame(()=>{W.current=!0}),Te.dispose},[S.virtual,S.__demoMode]),Fe(()=>{if(!W.current||S.comboboxState!==0||!I||S.activationTrigger===0)return;let Te=_t();return Te.requestAnimationFrame(()=>{var Me,Be;(Be=(Me=O.current)==null?void 0:Me.scrollIntoView)==null||Be.call(Me,{block:"nearest"})}),Te.dispose},[O,I,S.comboboxState,S.activationTrigger,S.activeOptionIndex]);let J=ne(Te=>{var Me;if(d||(Me=S.virtual)!=null&&Me.disabled(p))return Te.preventDefault();U(),Wr()||requestAnimationFrame(()=>{var Be;return(Be=S.inputRef.current)==null?void 0:Be.focus({preventScroll:!0})}),S.mode===0&&requestAnimationFrame(()=>N.closeCombobox())}),de=ne(()=>{var Te;if(d||(Te=S.virtual)!=null&&Te.disabled(p))return N.goToOption(at.Nothing);let Me=S.calculateIndex(p);N.goToOption(at.Specific,Me)}),se=Zr(),xe=ne(Te=>se.update(Te)),qe=ne(Te=>{var Me;if(!se.wasMoved(Te)||d||(Me=S.virtual)!=null&&Me.disabled(p)||I)return;let Be=S.calculateIndex(p);N.goToOption(at.Specific,Be,0)}),He=ne(Te=>{var Me;se.wasMoved(Te)&&(d||(Me=S.virtual)!=null&&Me.disabled(p)||I&&(S.optionsPropsRef.current.hold||N.goToOption(at.Nothing)))}),ye=n.useMemo(()=>({active:I,selected:A,disabled:d}),[I,A,d]);return me({ourProps:{id:c,ref:$,role:"option",tabIndex:d===!0?void 0:-1,"aria-disabled":d===!0?!0:void 0,"aria-selected":A,disabled:void 0,onClick:J,onFocus:de,onPointerEnter:xe,onMouseEnter:xe,onPointerMove:qe,onMouseMove:qe,onPointerLeave:He,onMouseLeave:He},theirProps:b,slot:ye,defaultTag:qd,name:"Combobox.Option"})}let Xd=je(_d),Jd=je(Hd),Qd=je(zd),ef=je(Vd),tf=je(Gd),nf=je(Kd),cn=Object.assign(Xd,{Input:Qd,Button:Jd,Label:ef,Options:tf,Option:nf});function vl(t,l,i,s){let c=Mt(i);n.useEffect(()=>{t=t??window;function d(p){c.current(p)}return t.addEventListener(l,d,s),()=>t.removeEventListener(l,d,s)},[t,l,s])}function mr(){let t=n.useRef(!1);return Fe(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function gl(t){let l=ne(t),i=n.useRef(!1);n.useEffect(()=>(i.current=!1,()=>{i.current=!0,sn(()=>{i.current&&l()})}),[l])}var hr=(t=>(t[t.Forwards=0]="Forwards",t[t.Backwards=1]="Backwards",t))(hr||{});function rf(){let t=n.useRef(0);return Hr("keydown",l=>{l.key==="Tab"&&(t.current=l.shiftKey?1:0)},!0),t}function bl(t){if(!t)return new Set;if(typeof t=="function")return new Set(t());let l=new Set;for(let i of t.current)i.current instanceof HTMLElement&&l.add(i.current);return l}let of="div";var xl=(t=>(t[t.None=1]="None",t[t.InitialFocus=2]="InitialFocus",t[t.TabLock=4]="TabLock",t[t.FocusLock=8]="FocusLock",t[t.RestoreFocus=16]="RestoreFocus",t[t.All=30]="All",t))(xl||{});function lf(t,l){let i=n.useRef(null),s=yt(i,l),{initialFocus:c,containers:d,features:p=30,...h}=t;gn()||(p=1);let b=Qt(i);uf({ownerDocument:b},!!(p&16));let S=cf({ownerDocument:b,container:i,initialFocus:c},!!(p&2));df({ownerDocument:b,container:i,containers:d,previousActiveElement:S},!!(p&8));let N=rf(),I=ne(F=>{let $=i.current;$&&(U=>U())(()=>{ft(N.current,{[hr.Forwards]:()=>{an($,Ht.First,{skipElements:[F.relatedTarget]})},[hr.Backwards]:()=>{an($,Ht.Last,{skipElements:[F.relatedTarget]})}})})}),A=Gt(),O=n.useRef(!1),D={ref:s,onKeyDown(F){F.key=="Tab"&&(O.current=!0,A.requestAnimationFrame(()=>{O.current=!1}))},onBlur(F){let $=bl(d);i.current instanceof HTMLElement&&$.add(i.current);let U=F.relatedTarget;U instanceof HTMLElement&&U.dataset.headlessuiFocusGuard!=="true"&&(yl($,U)||(O.current?an(i.current,ft(N.current,{[hr.Forwards]:()=>Ht.Next,[hr.Backwards]:()=>Ht.Previous})|Ht.WrapAround,{relativeTo:F.target}):F.target instanceof HTMLElement&&Jt(F.target)))}};return n.createElement(n.Fragment,null,!!(p&4)&&n.createElement(dr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:I,features:un.Focusable}),me({ourProps:D,theirProps:h,defaultTag:of,name:"FocusTrap"}),!!(p&4)&&n.createElement(dr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:I,features:un.Focusable}))}let sf=je(lf),vr=Object.assign(sf,{features:xl});function af(t=!0){let l=n.useRef(en.slice());return H(([i],[s])=>{s===!0&&i===!1&&sn(()=>{l.current.splice(0)}),s===!1&&i===!0&&(l.current=en.slice())},[t,en,l]),ne(()=>{var i;return(i=l.current.find(s=>s!=null&&s.isConnected))!=null?i:null})}function uf({ownerDocument:t},l){let i=af(l);H(()=>{l||(t==null?void 0:t.activeElement)===(t==null?void 0:t.body)&&Jt(i())},[l]),gl(()=>{l&&Jt(i())})}function cf({ownerDocument:t,container:l,initialFocus:i},s){let c=n.useRef(null),d=mr();return H(()=>{if(!s)return;let p=l.current;p&&sn(()=>{if(!d.current)return;let h=t==null?void 0:t.activeElement;if(i!=null&&i.current){if((i==null?void 0:i.current)===h){c.current=h;return}}else if(p.contains(h)){c.current=h;return}i!=null&&i.current?Jt(i.current):an(p,Ht.First)===or.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),c.current=t==null?void 0:t.activeElement})},[s]),c}function df({ownerDocument:t,container:l,containers:i,previousActiveElement:s},c){let d=mr();vl(t==null?void 0:t.defaultView,"focus",p=>{if(!c||!d.current)return;let h=bl(i);l.current instanceof HTMLElement&&h.add(l.current);let b=s.current;if(!b)return;let S=p.target;S&&S instanceof HTMLElement?yl(h,S)?(s.current=S,Jt(S)):(p.preventDefault(),p.stopPropagation(),Jt(b)):Jt(s.current)},!0)}function yl(t,l){for(let i of t)if(i.contains(l))return!0;return!1}let wl=n.createContext(!1);function ff(){return n.useContext(wl)}function Yo(t){return n.createElement(wl.Provider,{value:t.force},t.children)}function pf(t){let l=ff(),i=n.useContext(El),s=Qt(t),[c,d]=n.useState(()=>{if(!l&&i!==null||ke.isServer)return null;let p=s==null?void 0:s.getElementById("headlessui-portal-root");if(p)return p;if(s===null)return null;let h=s.createElement("div");return h.setAttribute("id","headlessui-portal-root"),s.body.appendChild(h)});return n.useEffect(()=>{c!==null&&(s!=null&&s.body.contains(c)||s==null||s.body.appendChild(c))},[c,s]),n.useEffect(()=>{l||i!==null&&d(i.current)},[i,d,l]),c}let mf=n.Fragment;function hf(t,l){let i=t,s=n.useRef(null),c=yt(Bo(N=>{s.current=N}),l),d=Qt(s),p=pf(s),[h]=n.useState(()=>{var N;return ke.isServer?null:(N=d==null?void 0:d.createElement("div"))!=null?N:null}),b=n.useContext(Go),S=gn();return Fe(()=>{!p||!h||p.contains(h)||(h.setAttribute("data-headlessui-portal",""),p.appendChild(h))},[p,h]),Fe(()=>{if(h&&b)return b.register(h)},[b,h]),gl(()=>{var N;!p||!h||(h instanceof Node&&p.contains(h)&&p.removeChild(h),p.childNodes.length<=0&&((N=p.parentElement)==null||N.removeChild(p)))}),S?!p||!h?null:u.createPortal(me({ourProps:{ref:c},theirProps:i,defaultTag:mf,name:"Portal"}),h):null}let vf=n.Fragment,El=n.createContext(null);function gf(t,l){let{target:i,...s}=t,c={ref:yt(l)};return n.createElement(El.Provider,{value:i},me({ourProps:c,theirProps:s,defaultTag:vf,name:"Popover.Group"}))}let Go=n.createContext(null);function bf(){let t=n.useContext(Go),l=n.useRef([]),i=ne(d=>(l.current.push(d),t&&t.register(d),()=>s(d))),s=ne(d=>{let p=l.current.indexOf(d);p!==-1&&l.current.splice(p,1),t&&t.unregister(d)}),c=n.useMemo(()=>({register:i,unregister:s,portals:l}),[i,s,l]);return[l,n.useMemo(()=>function({children:d}){return n.createElement(Go.Provider,{value:c},d)},[c])]}let xf=je(hf),yf=je(gf),qo=Object.assign(xf,{Group:yf});function wf(t,l){return t===l&&(t!==0||1/t===1/l)||t!==t&&l!==l}const Ef=typeof Object.is=="function"?Object.is:wf,{useState:Sf,useEffect:Cf,useLayoutEffect:jf,useDebugValue:Tf}=a;function Nf(t,l,i){const s=l(),[{inst:c},d]=Sf({inst:{value:s,getSnapshot:l}});return jf(()=>{c.value=s,c.getSnapshot=l,Ko(c)&&d({inst:c})},[t,s,l]),Cf(()=>(Ko(c)&&d({inst:c}),t(()=>{Ko(c)&&d({inst:c})})),[t]),Tf(s),s}function Ko(t){const l=t.getSnapshot,i=t.value;try{const s=l();return!Ef(i,s)}catch{return!0}}function Of(t,l,i){return l()}const kf=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",If=!kf,Mf=If?Of:Nf,Pf="useSyncExternalStore"in a?(t=>t.useSyncExternalStore)(a):Mf;function Ff(t){return Pf(t.subscribe,t.getSnapshot,t.getSnapshot)}function Rf(t,l){let i=t(),s=new Set;return{getSnapshot(){return i},subscribe(c){return s.add(c),()=>s.delete(c)},dispatch(c,...d){let p=l[c].call(i,...d);p&&(i=p,s.forEach(h=>h()))}}}function Lf(){let t;return{before({doc:l}){var i;let s=l.documentElement;t=((i=l.defaultView)!=null?i:window).innerWidth-s.clientWidth},after({doc:l,d:i}){let s=l.documentElement,c=s.clientWidth-s.offsetWidth,d=t-c;i.style(s,"paddingRight",`${d}px`)}}}function Af(){return Rn()?{before({doc:t,d:l,meta:i}){function s(c){return i.containers.flatMap(d=>d()).some(d=>d.contains(c))}l.microTask(()=>{var c;if(window.getComputedStyle(t.documentElement).scrollBehavior!=="auto"){let h=_t();h.style(t.documentElement,"scrollBehavior","auto"),l.add(()=>l.microTask(()=>h.dispose()))}let d=(c=window.scrollY)!=null?c:window.pageYOffset,p=null;l.addEventListener(t,"click",h=>{if(h.target instanceof HTMLElement)try{let b=h.target.closest("a");if(!b)return;let{hash:S}=new URL(b.href),N=t.querySelector(S);N&&!s(N)&&(p=N)}catch{}},!0),l.addEventListener(t,"touchstart",h=>{if(h.target instanceof HTMLElement)if(s(h.target)){let b=h.target;for(;b.parentElement&&s(b.parentElement);)b=b.parentElement;l.style(b,"overscrollBehavior","contain")}else l.style(h.target,"touchAction","none")}),l.addEventListener(t,"touchmove",h=>{if(h.target instanceof HTMLElement)if(s(h.target)){let b=h.target;for(;b.parentElement&&b.dataset.headlessuiPortal!==""&&!(b.scrollHeight>b.clientHeight||b.scrollWidth>b.clientWidth);)b=b.parentElement;b.dataset.headlessuiPortal===""&&h.preventDefault()}else h.preventDefault()},{passive:!1}),l.add(()=>{var h;let b=(h=window.scrollY)!=null?h:window.pageYOffset;d!==b&&window.scrollTo(0,d),p&&p.isConnected&&(p.scrollIntoView({block:"nearest"}),p=null)})})}}:{}}function Df(){return{before({doc:t,d:l}){l.style(t.documentElement,"overflow","hidden")}}}function $f(t){let l={};for(let i of t)Object.assign(l,i(l));return l}let On=Rf(()=>new Map,{PUSH(t,l){var i;let s=(i=this.get(t))!=null?i:{doc:t,count:0,d:_t(),meta:new Set};return s.count++,s.meta.add(l),this.set(t,s),this},POP(t,l){let i=this.get(t);return i&&(i.count--,i.meta.delete(l)),this},SCROLL_PREVENT({doc:t,d:l,meta:i}){let s={doc:t,d:l,meta:$f(i)},c=[Af(),Lf(),Df()];c.forEach(({before:d})=>d==null?void 0:d(s)),c.forEach(({after:d})=>d==null?void 0:d(s))},SCROLL_ALLOW({d:t}){t.dispose()},TEARDOWN({doc:t}){this.delete(t)}});On.subscribe(()=>{let t=On.getSnapshot(),l=new Map;for(let[i]of t)l.set(i,i.documentElement.style.overflow);for(let i of t.values()){let s=l.get(i.doc)==="hidden",c=i.count!==0;(c&&!s||!c&&s)&&On.dispatch(i.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",i),i.count===0&&On.dispatch("TEARDOWN",i)}});function _f(t,l,i){let s=Ff(On),c=t?s.get(t):void 0,d=c?c.count>0:!1;return Fe(()=>{if(!(!t||!l))return On.dispatch("PUSH",t,i),()=>On.dispatch("POP",t,i)},[l,t]),d}let Xo=new Map,gr=new Map;function Sl(t,l=!0){Fe(()=>{var i;if(!l)return;let s=typeof t=="function"?t():t.current;if(!s)return;function c(){var p;if(!s)return;let h=(p=gr.get(s))!=null?p:1;if(h===1?gr.delete(s):gr.set(s,h-1),h!==1)return;let b=Xo.get(s);b&&(b["aria-hidden"]===null?s.removeAttribute("aria-hidden"):s.setAttribute("aria-hidden",b["aria-hidden"]),s.inert=b.inert,Xo.delete(s))}let d=(i=gr.get(s))!=null?i:0;return gr.set(s,d+1),d!==0||(Xo.set(s,{"aria-hidden":s.getAttribute("aria-hidden"),inert:s.inert}),s.setAttribute("aria-hidden","true"),s.inert=!0),c},[t,l])}function Bf({defaultContainers:t=[],portals:l,mainTreeNodeRef:i}={}){var s;let c=n.useRef((s=i==null?void 0:i.current)!=null?s:null),d=Qt(c),p=ne(()=>{var h,b,S;let N=[];for(let I of t)I!==null&&(I instanceof HTMLElement?N.push(I):"current"in I&&I.current instanceof HTMLElement&&N.push(I.current));if(l!=null&&l.current)for(let I of l.current)N.push(I);for(let I of(h=d==null?void 0:d.querySelectorAll("html > *, body > *"))!=null?h:[])I!==document.body&&I!==document.head&&I instanceof HTMLElement&&I.id!=="headlessui-portal-root"&&(I.contains(c.current)||I.contains((S=(b=c.current)==null?void 0:b.getRootNode())==null?void 0:S.host)||N.some(A=>I.contains(A))||N.push(I));return N});return{resolveContainers:p,contains:ne(h=>p().some(b=>b.contains(h))),mainTreeNodeRef:c,MainTreeNode:n.useMemo(()=>function(){return i!=null?null:n.createElement(dr,{features:un.Hidden,ref:c})},[c,i])}}let Jo=n.createContext(()=>{});Jo.displayName="StackContext";var Qo=(t=>(t[t.Add=0]="Add",t[t.Remove=1]="Remove",t))(Qo||{});function zf(){return n.useContext(Jo)}function Wf({children:t,onUpdate:l,type:i,element:s,enabled:c}){let d=zf(),p=ne((...h)=>{l==null||l(...h),d(...h)});return Fe(()=>{let h=c===void 0||c===!0;return h&&p(0,i,s),()=>{h&&p(1,i,s)}},[p,i,s,c]),n.createElement(Jo.Provider,{value:p},t)}let Cl=n.createContext(null);function jl(){let t=n.useContext(Cl);if(t===null){let l=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(l,jl),l}return t}function Tl(){let[t,l]=n.useState([]);return[t.length>0?t.join(" "):void 0,n.useMemo(()=>function(i){let s=ne(d=>(l(p=>[...p,d]),()=>l(p=>{let h=p.slice(),b=h.indexOf(d);return b!==-1&&h.splice(b,1),h}))),c=n.useMemo(()=>({register:s,slot:i.slot,name:i.name,props:i.props}),[s,i.slot,i.name,i.props]);return n.createElement(Cl.Provider,{value:c},i.children)},[l])]}let Hf="p";function Uf(t,l){let i=Pt(),{id:s=`headlessui-description-${i}`,...c}=t,d=jl(),p=yt(l);Fe(()=>d.register(s),[s,d.register]);let h={ref:p,...d.props,id:s};return me({ourProps:h,theirProps:c,slot:d.slot||{},defaultTag:Hf,name:d.name||"Description"})}let Vf=je(Uf),Nl=Object.assign(Vf,{});var Zf=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(Zf||{}),Yf=(t=>(t[t.SetTitleId=0]="SetTitleId",t))(Yf||{});let Gf={0(t,l){return t.titleId===l.id?t:{...t,titleId:l.id}}},Gr=n.createContext(null);Gr.displayName="DialogContext";function br(t){let l=n.useContext(Gr);if(l===null){let i=new Error(`<${t} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(i,br),i}return l}function qf(t,l,i=()=>[document.body]){_f(t,l,s=>{var c;return{containers:[...(c=s.containers)!=null?c:[],i]}})}function Kf(t,l){return ft(l.type,Gf,t,l)}let Xf="div",Jf=pe.RenderStrategy|pe.Static;function Qf(t,l){let i=Pt(),{id:s=`headlessui-dialog-${i}`,open:c,onClose:d,initialFocus:p,role:h="dialog",__demoMode:b=!1,...S}=t,[N,I]=n.useState(0),A=n.useRef(!1);h=function(){return h==="dialog"||h==="alertdialog"?h:(A.current||(A.current=!0,console.warn(`Invalid role [${h}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let O=fr();c===void 0&&O!==null&&(c=(O&Tt.Open)===Tt.Open);let D=n.useRef(null),F=yt(D,l),$=Qt(D),U=t.hasOwnProperty("open")||O!==null,W=t.hasOwnProperty("onClose");if(!U&&!W)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!U)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!W)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof c!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${c}`);if(typeof d!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${d}`);let J=c?0:1,[de,se]=n.useReducer(Kf,{titleId:null,descriptionId:null,panelRef:n.createRef()}),xe=ne(()=>d(!1)),qe=ne(le=>se({type:0,id:le})),He=gn()?b?!1:J===0:!1,ye=N>1,Te=n.useContext(Gr)!==null,[Me,Be]=bf(),ct={get current(){var le;return(le=de.panelRef.current)!=null?le:D.current}},{resolveContainers:mt,mainTreeNodeRef:K,MainTreeNode:dt}=Bf({portals:Me,defaultContainers:[ct]}),ze=ye?"parent":"leaf",bt=O!==null?(O&Tt.Closing)===Tt.Closing:!1,ce=Te||bt?!1:He,Ue=n.useCallback(()=>{var le,Ne;return(Ne=Array.from((le=$==null?void 0:$.querySelectorAll("body > *"))!=null?le:[]).find(nt=>nt.id==="headlessui-portal-root"?!1:nt.contains(K.current)&&nt instanceof HTMLElement))!=null?Ne:null},[K]);Sl(Ue,ce);let ut=ye?!0:He,Nt=n.useCallback(()=>{var le,Ne;return(Ne=Array.from((le=$==null?void 0:$.querySelectorAll("[data-headlessui-portal]"))!=null?le:[]).find(nt=>nt.contains(K.current)&&nt instanceof HTMLElement))!=null?Ne:null},[K]);Sl(Nt,ut),Ln(mt,le=>{le.preventDefault(),xe()},!(!He||ye));let Rt=!(ye||J!==0);vl($==null?void 0:$.defaultView,"keydown",le=>{Rt&&(le.defaultPrevented||le.key===Qe.Escape&&(le.preventDefault(),le.stopPropagation(),xe()))}),qf($,!(bt||J!==0||Te),mt),n.useEffect(()=>{if(J!==0||!D.current)return;let le=new ResizeObserver(Ne=>{for(let nt of Ne){let zt=nt.target.getBoundingClientRect();zt.x===0&&zt.y===0&&zt.width===0&&zt.height===0&&xe()}});return le.observe(D.current),()=>le.disconnect()},[J,D,xe]);let[wt,De]=Tl(),Ct=n.useMemo(()=>[{dialogState:J,close:xe,setTitleId:qe},de],[J,de,xe,qe]),et=n.useMemo(()=>({open:J===0}),[J]),At={ref:F,id:s,role:h,"aria-modal":J===0?!0:void 0,"aria-labelledby":de.titleId,"aria-describedby":wt};return n.createElement(Wf,{type:"Dialog",enabled:J===0,element:D,onUpdate:ne((le,Ne)=>{Ne==="Dialog"&&ft(le,{[Qo.Add]:()=>I(nt=>nt+1),[Qo.Remove]:()=>I(nt=>nt-1)})})},n.createElement(Yo,{force:!0},n.createElement(qo,null,n.createElement(Gr.Provider,{value:Ct},n.createElement(qo.Group,{target:D},n.createElement(Yo,{force:!1},n.createElement(De,{slot:et,name:"Dialog.Description"},n.createElement(vr,{initialFocus:p,containers:mt,features:He?ft(ze,{parent:vr.features.RestoreFocus,leaf:vr.features.All&~vr.features.FocusLock}):vr.features.None},n.createElement(Be,null,me({ourProps:At,theirProps:S,slot:et,defaultTag:Xf,features:Jf,visible:J===0,name:"Dialog"}))))))))),n.createElement(dt,null))}let ep="div";function tp(t,l){let i=Pt(),{id:s=`headlessui-dialog-overlay-${i}`,...c}=t,[{dialogState:d,close:p}]=br("Dialog.Overlay"),h=yt(l),b=ne(N=>{if(N.target===N.currentTarget){if(Yr(N.currentTarget))return N.preventDefault();N.preventDefault(),N.stopPropagation(),p()}}),S=n.useMemo(()=>({open:d===0}),[d]);return me({ourProps:{ref:h,id:s,"aria-hidden":!0,onClick:b},theirProps:c,slot:S,defaultTag:ep,name:"Dialog.Overlay"})}let np="div";function rp(t,l){let i=Pt(),{id:s=`headlessui-dialog-backdrop-${i}`,...c}=t,[{dialogState:d},p]=br("Dialog.Backdrop"),h=yt(l);n.useEffect(()=>{if(p.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[p.panelRef]);let b=n.useMemo(()=>({open:d===0}),[d]);return n.createElement(Yo,{force:!0},n.createElement(qo,null,me({ourProps:{ref:h,id:s,"aria-hidden":!0},theirProps:c,slot:b,defaultTag:np,name:"Dialog.Backdrop"})))}let op="div";function ip(t,l){let i=Pt(),{id:s=`headlessui-dialog-panel-${i}`,...c}=t,[{dialogState:d},p]=br("Dialog.Panel"),h=yt(l,p.panelRef),b=n.useMemo(()=>({open:d===0}),[d]),S=ne(N=>{N.stopPropagation()});return me({ourProps:{ref:h,id:s,onClick:S},theirProps:c,slot:b,defaultTag:op,name:"Dialog.Panel"})}let lp="h2";function sp(t,l){let i=Pt(),{id:s=`headlessui-dialog-title-${i}`,...c}=t,[{dialogState:d,setTitleId:p}]=br("Dialog.Title"),h=yt(l);n.useEffect(()=>(p(s),()=>p(null)),[s,p]);let b=n.useMemo(()=>({open:d===0}),[d]);return me({ourProps:{ref:h,id:s},theirProps:c,slot:b,defaultTag:lp,name:"Dialog.Title"})}let ap=je(Qf),up=je(rp),cp=je(ip),dp=je(tp),fp=je(sp),Ol=Object.assign(ap,{Backdrop:up,Panel:cp,Overlay:dp,Title:fp,Description:Nl}),kl=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Il(t){var l,i;let s=(l=t.innerText)!=null?l:"",c=t.cloneNode(!0);if(!(c instanceof HTMLElement))return s;let d=!1;for(let h of c.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))h.remove(),d=!0;let p=d?(i=c.innerText)!=null?i:"":s;return kl.test(p)&&(p=p.replace(kl,"")),p}function pp(t){let l=t.getAttribute("aria-label");if(typeof l=="string")return l.trim();let i=t.getAttribute("aria-labelledby");if(i){let s=i.split(" ").map(c=>{let d=document.getElementById(c);if(d){let p=d.getAttribute("aria-label");return typeof p=="string"?p.trim():Il(d).trim()}return null}).filter(Boolean);if(s.length>0)return s.join(", ")}return Il(t).trim()}function mp(t){let l=n.useRef(""),i=n.useRef("");return ne(()=>{let s=t.current;if(!s)return"";let c=s.innerText;if(l.current===c)return i.current;let d=pp(s).trim().toLowerCase();return l.current=c,i.current=d,d})}var hp=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(hp||{}),vp=(t=>(t[t.Pointer=0]="Pointer",t[t.Other=1]="Other",t))(vp||{}),gp=(t=>(t[t.OpenMenu=0]="OpenMenu",t[t.CloseMenu=1]="CloseMenu",t[t.GoToItem=2]="GoToItem",t[t.Search=3]="Search",t[t.ClearSearch=4]="ClearSearch",t[t.RegisterItem=5]="RegisterItem",t[t.UnregisterItem=6]="UnregisterItem",t))(gp||{});function ei(t,l=i=>i){let i=t.activeItemIndex!==null?t.items[t.activeItemIndex]:null,s=Fn(l(t.items.slice()),d=>d.dataRef.current.domRef.current),c=i?s.indexOf(i):null;return c===-1&&(c=null),{items:s,activeItemIndex:c}}let bp={1(t){return t.menuState===1?t:{...t,activeItemIndex:null,menuState:1}},0(t){return t.menuState===0?t:{...t,__demoMode:!1,menuState:0}},2:(t,l)=>{var i;let s=ei(t),c=Ho(l,{resolveItems:()=>s.items,resolveActiveIndex:()=>s.activeItemIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled});return{...t,...s,searchQuery:"",activeItemIndex:c,activationTrigger:(i=l.trigger)!=null?i:1}},3:(t,l)=>{let i=t.searchQuery!==""?0:1,s=t.searchQuery+l.value.toLowerCase(),c=(t.activeItemIndex!==null?t.items.slice(t.activeItemIndex+i).concat(t.items.slice(0,t.activeItemIndex+i)):t.items).find(p=>{var h;return((h=p.dataRef.current.textValue)==null?void 0:h.startsWith(s))&&!p.dataRef.current.disabled}),d=c?t.items.indexOf(c):-1;return d===-1||d===t.activeItemIndex?{...t,searchQuery:s}:{...t,searchQuery:s,activeItemIndex:d,activationTrigger:1}},4(t){return t.searchQuery===""?t:{...t,searchQuery:"",searchActiveItemIndex:null}},5:(t,l)=>{let i=ei(t,s=>[...s,{id:l.id,dataRef:l.dataRef}]);return{...t,...i}},6:(t,l)=>{let i=ei(t,s=>{let c=s.findIndex(d=>d.id===l.id);return c!==-1&&s.splice(c,1),s});return{...t,...i,activationTrigger:1}}},ti=n.createContext(null);ti.displayName="MenuContext";function qr(t){let l=n.useContext(ti);if(l===null){let i=new Error(`<${t} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(i,qr),i}return l}function xp(t,l){return ft(l.type,bp,t,l)}let yp=n.Fragment;function wp(t,l){let{__demoMode:i=!1,...s}=t,c=n.useReducer(xp,{__demoMode:i,menuState:i?0:1,buttonRef:n.createRef(),itemsRef:n.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:d,itemsRef:p,buttonRef:h},b]=c,S=yt(l);Ln([h,p],(O,D)=>{var F;b({type:1}),sr(D,lr.Loose)||(O.preventDefault(),(F=h.current)==null||F.focus())},d===0);let N=ne(()=>{b({type:1})}),I=n.useMemo(()=>({open:d===0,close:N}),[d,N]),A={ref:S};return n.createElement(ti.Provider,{value:c},n.createElement(Wo,{value:ft(d,{0:Tt.Open,1:Tt.Closed})},me({ourProps:A,theirProps:s,slot:I,defaultTag:yp,name:"Menu"})))}let Ep="button";function Sp(t,l){var i;let s=Pt(),{id:c=`headlessui-menu-button-${s}`,...d}=t,[p,h]=qr("Menu.Button"),b=yt(p.buttonRef,l),S=Gt(),N=ne(F=>{switch(F.key){case Qe.Space:case Qe.Enter:case Qe.ArrowDown:F.preventDefault(),F.stopPropagation(),h({type:0}),S.nextFrame(()=>h({type:2,focus:at.First}));break;case Qe.ArrowUp:F.preventDefault(),F.stopPropagation(),h({type:0}),S.nextFrame(()=>h({type:2,focus:at.Last}));break}}),I=ne(F=>{switch(F.key){case Qe.Space:F.preventDefault();break}}),A=ne(F=>{if(Yr(F.currentTarget))return F.preventDefault();t.disabled||(p.menuState===0?(h({type:1}),S.nextFrame(()=>{var $;return($=p.buttonRef.current)==null?void 0:$.focus({preventScroll:!0})})):(F.preventDefault(),h({type:0})))}),O=n.useMemo(()=>({open:p.menuState===0}),[p]),D={ref:b,id:c,type:ur(t,p.buttonRef),"aria-haspopup":"menu","aria-controls":(i=p.itemsRef.current)==null?void 0:i.id,"aria-expanded":p.menuState===0,onKeyDown:N,onKeyUp:I,onClick:A};return me({ourProps:D,theirProps:d,slot:O,defaultTag:Ep,name:"Menu.Button"})}let Cp="div",jp=pe.RenderStrategy|pe.Static;function Tp(t,l){var i,s;let c=Pt(),{id:d=`headlessui-menu-items-${c}`,...p}=t,[h,b]=qr("Menu.Items"),S=yt(h.itemsRef,l),N=Qt(h.itemsRef),I=Gt(),A=fr(),O=A!==null?(A&Tt.Open)===Tt.Open:h.menuState===0;n.useEffect(()=>{let W=h.itemsRef.current;W&&h.menuState===0&&W!==(N==null?void 0:N.activeElement)&&W.focus({preventScroll:!0})},[h.menuState,h.itemsRef,N]),j({container:h.itemsRef.current,enabled:h.menuState===0,accept(W){return W.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:W.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(W){W.setAttribute("role","none")}});let D=ne(W=>{var J,de;switch(I.dispose(),W.key){case Qe.Space:if(h.searchQuery!=="")return W.preventDefault(),W.stopPropagation(),b({type:3,value:W.key});case Qe.Enter:if(W.preventDefault(),W.stopPropagation(),b({type:1}),h.activeItemIndex!==null){let{dataRef:se}=h.items[h.activeItemIndex];(de=(J=se.current)==null?void 0:J.domRef.current)==null||de.click()}Br(h.buttonRef.current);break;case Qe.ArrowDown:return W.preventDefault(),W.stopPropagation(),b({type:2,focus:at.Next});case Qe.ArrowUp:return W.preventDefault(),W.stopPropagation(),b({type:2,focus:at.Previous});case Qe.Home:case Qe.PageUp:return W.preventDefault(),W.stopPropagation(),b({type:2,focus:at.First});case Qe.End:case Qe.PageDown:return W.preventDefault(),W.stopPropagation(),b({type:2,focus:at.Last});case Qe.Escape:W.preventDefault(),W.stopPropagation(),b({type:1}),_t().nextFrame(()=>{var se;return(se=h.buttonRef.current)==null?void 0:se.focus({preventScroll:!0})});break;case Qe.Tab:W.preventDefault(),W.stopPropagation(),b({type:1}),_t().nextFrame(()=>{bn(h.buttonRef.current,W.shiftKey?Ht.Previous:Ht.Next)});break;default:W.key.length===1&&(b({type:3,value:W.key}),I.setTimeout(()=>b({type:4}),350));break}}),F=ne(W=>{switch(W.key){case Qe.Space:W.preventDefault();break}}),$=n.useMemo(()=>({open:h.menuState===0}),[h]),U={"aria-activedescendant":h.activeItemIndex===null||(i=h.items[h.activeItemIndex])==null?void 0:i.id,"aria-labelledby":(s=h.buttonRef.current)==null?void 0:s.id,id:d,onKeyDown:D,onKeyUp:F,role:"menu",tabIndex:0,ref:S};return me({ourProps:U,theirProps:p,slot:$,defaultTag:Cp,features:jp,visible:O,name:"Menu.Items"})}let Np=n.Fragment;function Op(t,l){let i=Pt(),{id:s=`headlessui-menu-item-${i}`,disabled:c=!1,...d}=t,[p,h]=qr("Menu.Item"),b=p.activeItemIndex!==null?p.items[p.activeItemIndex].id===s:!1,S=n.useRef(null),N=yt(l,S);Fe(()=>{if(p.__demoMode||p.menuState!==0||!b||p.activationTrigger===0)return;let se=_t();return se.requestAnimationFrame(()=>{var xe,qe;(qe=(xe=S.current)==null?void 0:xe.scrollIntoView)==null||qe.call(xe,{block:"nearest"})}),se.dispose},[p.__demoMode,S,b,p.menuState,p.activationTrigger,p.activeItemIndex]);let I=mp(S),A=n.useRef({disabled:c,domRef:S,get textValue(){return I()}});Fe(()=>{A.current.disabled=c},[A,c]),Fe(()=>(h({type:5,id:s,dataRef:A}),()=>h({type:6,id:s})),[A,s]);let O=ne(()=>{h({type:1})}),D=ne(se=>{if(c)return se.preventDefault();h({type:1}),Br(p.buttonRef.current)}),F=ne(()=>{if(c)return h({type:2,focus:at.Nothing});h({type:2,focus:at.Specific,id:s})}),$=Zr(),U=ne(se=>$.update(se)),W=ne(se=>{$.wasMoved(se)&&(c||b||h({type:2,focus:at.Specific,id:s,trigger:0}))}),J=ne(se=>{$.wasMoved(se)&&(c||b&&h({type:2,focus:at.Nothing}))}),de=n.useMemo(()=>({active:b,disabled:c,close:O}),[b,c,O]);return me({ourProps:{id:s,ref:N,role:"menuitem",tabIndex:c===!0?void 0:-1,"aria-disabled":c===!0?!0:void 0,disabled:void 0,onClick:D,onFocus:F,onPointerEnter:U,onMouseEnter:U,onPointerMove:W,onMouseMove:W,onPointerLeave:J,onMouseLeave:J},theirProps:d,slot:de,defaultTag:Np,name:"Menu.Item"})}let kp=je(wp),Ip=je(Sp),Mp=je(Tp),Pp=je(Op),Kr=Object.assign(kp,{Button:Ip,Items:Mp,Item:Pp}),Ml=n.createContext(null);function Pl(){let t=n.useContext(Ml);if(t===null){let l=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(l,Pl),l}return t}function Fp(){let[t,l]=n.useState([]);return[t.length>0?t.join(" "):void 0,n.useMemo(()=>function(i){let s=ne(d=>(l(p=>[...p,d]),()=>l(p=>{let h=p.slice(),b=h.indexOf(d);return b!==-1&&h.splice(b,1),h}))),c=n.useMemo(()=>({register:s,slot:i.slot,name:i.name,props:i.props}),[s,i.slot,i.name,i.props]);return n.createElement(Ml.Provider,{value:c},i.children)},[l])]}let Rp="label";function Lp(t,l){let i=Pt(),{id:s=`headlessui-label-${i}`,passive:c=!1,...d}=t,p=Pl(),h=yt(l);Fe(()=>p.register(s),[s,p.register]);let b={ref:h,...p.props,id:s};return c&&("onClick"in b&&(delete b.htmlFor,delete b.onClick),"onClick"in d&&delete d.onClick),me({ourProps:b,theirProps:d,slot:p.slot||{},defaultTag:Rp,name:p.name||"Label"})}let Ap=je(Lp),Dp=Object.assign(Ap,{});function $p(t=0){let[l,i]=n.useState(t),s=mr(),c=n.useCallback(b=>{s.current&&i(S=>S|b)},[l,s]),d=n.useCallback(b=>!!(l&b),[l]),p=n.useCallback(b=>{s.current&&i(S=>S&~b)},[i,s]),h=n.useCallback(b=>{s.current&&i(S=>S^b)},[i]);return{flags:l,addFlag:c,hasFlag:d,removeFlag:p,toggleFlag:h}}let ni=n.createContext(null);ni.displayName="GroupContext";let _p=n.Fragment;function Bp(t){var l;let[i,s]=n.useState(null),[c,d]=Fp(),[p,h]=Tl(),b=n.useMemo(()=>({switch:i,setSwitch:s,labelledby:c,describedby:p}),[i,s,c,p]),S={},N=t;return n.createElement(h,{name:"Switch.Description"},n.createElement(d,{name:"Switch.Label",props:{htmlFor:(l=b.switch)==null?void 0:l.id,onClick(I){i&&(I.currentTarget.tagName==="LABEL"&&I.preventDefault(),i.click(),i.focus({preventScroll:!0}))}}},n.createElement(ni.Provider,{value:b},me({ourProps:S,theirProps:N,defaultTag:_p,name:"Switch.Group"}))))}let zp="button";function Wp(t,l){var i;let s=Pt(),{id:c=`headlessui-switch-${s}`,checked:d,defaultChecked:p=!1,onChange:h,disabled:b=!1,name:S,value:N,form:I,...A}=t,O=n.useContext(ni),D=n.useRef(null),F=yt(D,l,O===null?null:O.setSwitch),[$,U]=tr(d,h,p),W=ne(()=>U==null?void 0:U(!$)),J=ne(ye=>{if(Yr(ye.currentTarget))return ye.preventDefault();ye.preventDefault(),W()}),de=ne(ye=>{ye.key===Qe.Space?(ye.preventDefault(),W()):ye.key===Qe.Enter&&Id(ye.currentTarget)}),se=ne(ye=>ye.preventDefault()),xe=n.useMemo(()=>({checked:$}),[$]),qe={id:c,ref:F,role:"switch",type:ur(t,D),tabIndex:t.tabIndex===-1?0:(i=t.tabIndex)!=null?i:0,"aria-checked":$,"aria-labelledby":O==null?void 0:O.labelledby,"aria-describedby":O==null?void 0:O.describedby,disabled:b,onClick:J,onKeyUp:de,onKeyPress:se},He=Gt();return n.useEffect(()=>{var ye;let Te=(ye=D.current)==null?void 0:ye.closest("form");Te&&p!==void 0&&He.addEventListener(Te,"reset",()=>{U(p)})},[D,U]),n.createElement(n.Fragment,null,S!=null&&$&&n.createElement(dr,{features:un.Hidden,...gt({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:b,form:I,checked:$,name:S,value:N})}),me({ourProps:qe,theirProps:A,slot:xe,defaultTag:zp,name:"Switch"}))}let Hp=je(Wp),Up=Bp,Vp=Object.assign(Hp,{Group:Up,Label:Dp,Description:Nl});function Zp(t){let l={called:!1};return(...i)=>{if(!l.called)return l.called=!0,t(...i)}}function ri(t,...l){t&&l.length>0&&t.classList.add(...l)}function oi(t,...l){t&&l.length>0&&t.classList.remove(...l)}function Yp(t,l){let i=_t();if(!t)return i.dispose;let{transitionDuration:s,transitionDelay:c}=getComputedStyle(t),[d,p]=[s,c].map(b=>{let[S=0]=b.split(",").filter(Boolean).map(N=>N.includes("ms")?parseFloat(N):parseFloat(N)*1e3).sort((N,I)=>I-N);return S}),h=d+p;if(h!==0){i.group(S=>{S.setTimeout(()=>{l(),S.dispose()},h),S.addEventListener(t,"transitionrun",N=>{N.target===N.currentTarget&&S.dispose()})});let b=i.addEventListener(t,"transitionend",S=>{S.target===S.currentTarget&&(l(),b())})}else l();return i.add(()=>l()),i.dispose}function Gp(t,l,i,s){let c=i?"enter":"leave",d=_t(),p=s!==void 0?Zp(s):()=>{};c==="enter"&&(t.removeAttribute("hidden"),t.style.display="");let h=ft(c,{enter:()=>l.enter,leave:()=>l.leave}),b=ft(c,{enter:()=>l.enterTo,leave:()=>l.leaveTo}),S=ft(c,{enter:()=>l.enterFrom,leave:()=>l.leaveFrom});return oi(t,...l.base,...l.enter,...l.enterTo,...l.enterFrom,...l.leave,...l.leaveFrom,...l.leaveTo,...l.entered),ri(t,...l.base,...h,...S),d.nextFrame(()=>{oi(t,...l.base,...h,...S),ri(t,...l.base,...h,...b),Yp(t,()=>(oi(t,...l.base,...h),ri(t,...l.base,...l.entered),p()))}),d.dispose}function qp({immediate:t,container:l,direction:i,classes:s,onStart:c,onStop:d}){let p=mr(),h=Gt(),b=Mt(i);Fe(()=>{t&&(b.current="enter")},[t]),Fe(()=>{let S=_t();h.add(S.dispose);let N=l.current;if(N&&b.current!=="idle"&&p.current)return S.dispose(),c.current(b.current),S.add(Gp(N,s.current,b.current==="enter",()=>{S.dispose(),d.current(b.current)})),S.dispose},[i])}function yn(t=""){return t.split(/\s+/).filter(l=>l.length>1)}let Xr=n.createContext(null);Xr.displayName="TransitionContext";var Kp=(t=>(t.Visible="visible",t.Hidden="hidden",t))(Kp||{});function Xp(){let t=n.useContext(Xr);if(t===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}function Jp(){let t=n.useContext(Jr);if(t===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}let Jr=n.createContext(null);Jr.displayName="NestingContext";function Qr(t){return"children"in t?Qr(t.children):t.current.filter(({el:l})=>l.current!==null).filter(({state:l})=>l==="visible").length>0}function Fl(t,l){let i=Mt(t),s=n.useRef([]),c=mr(),d=Gt(),p=ne((O,D=Le.Hidden)=>{let F=s.current.findIndex(({el:$})=>$===O);F!==-1&&(ft(D,{[Le.Unmount](){s.current.splice(F,1)},[Le.Hidden](){s.current[F].state="hidden"}}),d.microTask(()=>{var $;!Qr(s)&&c.current&&(($=i.current)==null||$.call(i))}))}),h=ne(O=>{let D=s.current.find(({el:F})=>F===O);return D?D.state!=="visible"&&(D.state="visible"):s.current.push({el:O,state:"visible"}),()=>p(O,Le.Unmount)}),b=n.useRef([]),S=n.useRef(Promise.resolve()),N=n.useRef({enter:[],leave:[],idle:[]}),I=ne((O,D,F)=>{b.current.splice(0),l&&(l.chains.current[D]=l.chains.current[D].filter(([$])=>$!==O)),l==null||l.chains.current[D].push([O,new Promise($=>{b.current.push($)})]),l==null||l.chains.current[D].push([O,new Promise($=>{Promise.all(N.current[D].map(([U,W])=>W)).then(()=>$())})]),D==="enter"?S.current=S.current.then(()=>l==null?void 0:l.wait.current).then(()=>F(D)):F(D)}),A=ne((O,D,F)=>{Promise.all(N.current[D].splice(0).map(([$,U])=>U)).then(()=>{var $;($=b.current.shift())==null||$()}).then(()=>F(D))});return n.useMemo(()=>({children:s,register:h,unregister:p,onStart:I,onStop:A,wait:S,chains:N}),[h,p,s,I,A,N,S])}function Qp(){}let em=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Rl(t){var l;let i={};for(let s of em)i[s]=(l=t[s])!=null?l:Qp;return i}function tm(t){let l=n.useRef(Rl(t));return n.useEffect(()=>{l.current=Rl(t)},[t]),l}let nm="div",Ll=pe.RenderStrategy;function rm(t,l){var i,s;let{beforeEnter:c,afterEnter:d,beforeLeave:p,afterLeave:h,enter:b,enterFrom:S,enterTo:N,entered:I,leave:A,leaveFrom:O,leaveTo:D,...F}=t,$=n.useRef(null),U=yt($,l),W=(i=F.unmount)==null||i?Le.Unmount:Le.Hidden,{show:J,appear:de,initial:se}=Xp(),[xe,qe]=n.useState(J?"visible":"hidden"),He=Jp(),{register:ye,unregister:Te}=He;n.useEffect(()=>ye($),[ye,$]),n.useEffect(()=>{if(W===Le.Hidden&&$.current){if(J&&xe!=="visible"){qe("visible");return}return ft(xe,{hidden:()=>Te($),visible:()=>ye($)})}},[xe,$,ye,Te,J,W]);let Me=Mt({base:yn(F.className),enter:yn(b),enterFrom:yn(S),enterTo:yn(N),entered:yn(I),leave:yn(A),leaveFrom:yn(O),leaveTo:yn(D)}),Be=tm({beforeEnter:c,afterEnter:d,beforeLeave:p,afterLeave:h}),ct=gn();n.useEffect(()=>{if(ct&&xe==="visible"&&$.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[$,xe,ct]);let mt=se&&!de,K=de&&J&&se,dt=!ct||mt?"idle":J?"enter":"leave",ze=$p(0),bt=ne(wt=>ft(wt,{enter:()=>{ze.addFlag(Tt.Opening),Be.current.beforeEnter()},leave:()=>{ze.addFlag(Tt.Closing),Be.current.beforeLeave()},idle:()=>{}})),ce=ne(wt=>ft(wt,{enter:()=>{ze.removeFlag(Tt.Opening),Be.current.afterEnter()},leave:()=>{ze.removeFlag(Tt.Closing),Be.current.afterLeave()},idle:()=>{}})),Ue=Fl(()=>{qe("hidden"),Te($)},He),ut=n.useRef(!1);qp({immediate:K,container:$,classes:Me,direction:dt,onStart:Mt(wt=>{ut.current=!0,Ue.onStart($,wt,bt)}),onStop:Mt(wt=>{ut.current=!1,Ue.onStop($,wt,ce),wt==="leave"&&!Qr(Ue)&&(qe("hidden"),Te($))})});let Nt=F,Rt={ref:U};return K?Nt={...Nt,className:Q(F.className,...Me.current.enter,...Me.current.enterFrom)}:ut.current&&(Nt.className=Q(F.className,(s=$.current)==null?void 0:s.className),Nt.className===""&&delete Nt.className),n.createElement(Jr.Provider,{value:Ue},n.createElement(Wo,{value:ft(xe,{visible:Tt.Open,hidden:Tt.Closed})|ze.flags},me({ourProps:Rt,theirProps:Nt,defaultTag:nm,features:Ll,visible:xe==="visible",name:"Transition.Child"})))}function om(t,l){let{show:i,appear:s=!1,unmount:c=!0,...d}=t,p=n.useRef(null),h=yt(p,l);gn();let b=fr();if(i===void 0&&b!==null&&(i=(b&Tt.Open)===Tt.Open),![!0,!1].includes(i))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[S,N]=n.useState(i?"visible":"hidden"),I=Fl(()=>{N("hidden")}),[A,O]=n.useState(!0),D=n.useRef([i]);Fe(()=>{A!==!1&&D.current[D.current.length-1]!==i&&(D.current.push(i),O(!1))},[D,i]);let F=n.useMemo(()=>({show:i,appear:s,initial:A}),[i,s,A]);n.useEffect(()=>{if(i)N("visible");else if(!Qr(I))N("hidden");else{let J=p.current;if(!J)return;let de=J.getBoundingClientRect();de.x===0&&de.y===0&&de.width===0&&de.height===0&&N("hidden")}},[i,I]);let $={unmount:c},U=ne(()=>{var J;A&&O(!1),(J=t.beforeEnter)==null||J.call(t)}),W=ne(()=>{var J;A&&O(!1),(J=t.beforeLeave)==null||J.call(t)});return n.createElement(Jr.Provider,{value:I},n.createElement(Xr.Provider,{value:F},me({ourProps:{...$,as:n.Fragment,children:n.createElement(Al,{ref:h,...$,...d,beforeEnter:U,beforeLeave:W})},theirProps:{},defaultTag:n.Fragment,features:Ll,visible:S==="visible",name:"Transition"})))}function im(t,l){let i=n.useContext(Xr)!==null,s=fr()!==null;return n.createElement(n.Fragment,null,!i&&s?n.createElement(ii,{ref:l,...t}):n.createElement(Al,{ref:l,...t}))}let ii=je(om),Al=je(rm),lm=je(im),kn=Object.assign(ii,{Child:lm,Root:ii});function sm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 am=a.forwardRef(sm);function um({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 cm=a.forwardRef(um);function dm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 fm=a.forwardRef(dm);function pm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 mm=a.forwardRef(pm);function hm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 vm=a.forwardRef(hm);function gm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 Dl=a.forwardRef(gm);function bm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 xm=a.forwardRef(bm);function ym({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 wm=a.forwardRef(ym);function Em({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 Sm=a.forwardRef(Em),Cm={warning:{color:"bg-yellow-50",icon:y.jsx(xm,{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:y.jsx(Sm,{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:y.jsx(fm,{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:y.jsx(wm,{className:"h-5 w-5 text-blue-400","aria-hidden":"true"}),colorTitle:"text-blue-800",colorText:"text-blue-700"}},jm=({type:t="info",title:l,message:i,active:s=!1,time:c=1e3,onClose:d})=>{const[p,h]=n.useState(!1),b=n.useRef(null);n.useEffect(()=>(s&&(h(!0),b.current=setTimeout(()=>{h(!1),d&&d()},c)),()=>clearTimeout(b.current)),[s,c,d]);const S=Cm[t];return p?y.jsx("div",{className:"fixed top-2.5 left-1/2 transform -translate-x-1/2 w-80 3xs:w-96 z-50",children:y.jsx(kn,{as:n.Fragment,show:p,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:y.jsxs("div",{className:x("rounded-md p-4 text-center",S.color),children:[y.jsxs("div",{className:"flex justify-center flex-shrink-0",children:[S.icon,y.jsx("h3",{className:x("text-sm font-medium ml-3",S.colorTitle),children:l})]}),y.jsx("div",{className:x("mt-2 text-sm",S.colorText),children:y.jsx("p",{children:i})})]})})}):null};function Tm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 Nm=a.forwardRef(Tm);function Om({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 km=a.forwardRef(Om);function Im({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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"}),a.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 Mm=a.forwardRef(Im);function Pm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 Fm=a.forwardRef(Pm);function Rm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 Lm=a.forwardRef(Rm);function Am({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 Dm=a.forwardRef(Am),$m=({src:t,alt:l,width:i,height:s,className:c="",classNameIcon:d="",isIcon:p=!0,acronym:h=""})=>{function b(){if(typeof h!="string")return h;const S=h.toLowerCase(),N=S.split(" "),I=N[N.length-1];return S.charAt(0)+I.charAt(0)}return y.jsx(y.Fragment,{children:t?y.jsx("img",{src:t,alt:l,width:i,height:s,className:x(c!==""&&c),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s"},onLoad:S=>S.currentTarget.style.filter="none","data-testid":"img"}):p?y.jsx(Lm,{className:x("bg-white text-default-5",d!==""?d:"w-7 h-7")}):y.jsx("div",{className:x("bg-gray-200 text-default-5 rounded-full font-bold uppercase flex justify-center items-center",d!==""?d:"w-7 h-7"),children:b()})})},_m=({steps:t,onClick:l})=>{const[i,s]=n.useState(0),c=d=>{s(d),l(d)};return y.jsx("nav",{className:"flex items-center justify-center w-full","aria-label":"Progress","data-testid":"bullets",children:y.jsx("ol",{role:"list",className:"flex items-center space-x-5",children:new Array(t).fill(1).map((d,p)=>y.jsx("li",{children:i!==p?y.jsx("div",{className:"cursor-pointer block h-2.5 w-2.5 rounded-full bg-gray-500 hover:bg-gray-600",onClick:()=>c(p),"data-testid":`step-${p}`,children:y.jsx("span",{className:"sr-only",children:"step"})}):y.jsxs("div",{className:"relative flex items-center justify-center cursor-pointer","aria-current":"step",children:[y.jsx("span",{className:"absolute flex h-5 w-5 p-px","aria-hidden":"true",children:y.jsx("span",{className:"h-full w-full rounded-full bg-gray-300"})}),y.jsx("span",{className:"relative block h-2.5 w-2.5 rounded-full bg-gray-500","aria-hidden":"true"}),y.jsx("span",{className:"sr-only",children:"step"})]})},p))})})};var $l={exports:{}};/*!
65
+ `));let A=N.props,O=typeof(A==null?void 0:A.className)=="function"?(...F)=>Q(A==null?void 0:A.className(...F),b.className):Q(A==null?void 0:A.className,b.className),D=O?{className:O}:{};return n.cloneElement(N,Object.assign({},Ft(N.props,gt($t(b,["ref"]))),I,S,{ref:c(N.ref,S.ref)},D))}return n.createElement(d,Object.assign({},$t(b,["ref"]),d!==n.Fragment&&S,d!==n.Fragment&&I),N)}function _e(...t){return t.every(l=>l==null)?void 0:l=>{for(let i of t)i!=null&&(typeof i=="function"?i(l):i.current=l)}}function Ft(...t){if(t.length===0)return{};if(t.length===1)return t[0];let l={},i={};for(let s of t)for(let c in s)c.startsWith("on")&&typeof s[c]=="function"?(i[c]!=null||(i[c]=[]),i[c].push(s[c])):l[c]=s[c];if(l.disabled||l["aria-disabled"])return Object.assign(l,Object.fromEntries(Object.keys(i).map(s=>[s,void 0])));for(let s in i)Object.assign(l,{[s](c,...d){let p=i[s];for(let h of p){if((c instanceof Event||(c==null?void 0:c.nativeEvent)instanceof Event)&&c.defaultPrevented)return;h(c,...d)}}});return l}function je(t){var l;return Object.assign(n.forwardRef(t),{displayName:(l=t.displayName)!=null?l:t.name})}function gt(t){let l=Object.assign({},t);for(let i in l)l[i]===void 0&&delete l[i];return l}function $t(t,l=[]){let i=Object.assign({},t);for(let s of l)s in i&&delete i[s];return i}let xn="div";var un=(t=>(t[t.None=1]="None",t[t.Focusable=2]="Focusable",t[t.Hidden=4]="Hidden",t))(un||{});function qt(t,l){var i;let{features:s=1,...c}=t,d={ref:l,"aria-hidden":(s&2)===2?!0:(i=c["aria-hidden"])!=null?i:void 0,hidden:(s&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",...(s&4)===4&&(s&2)!==2&&{display:"none"}}};return me({ourProps:d,theirProps:c,slot:{},defaultTag:xn,name:"Hidden"})}let dr=je(qt),zo=n.createContext(null);zo.displayName="OpenClosedContext";var Tt=(t=>(t[t.Open=1]="Open",t[t.Closed=2]="Closed",t[t.Closing=4]="Closing",t[t.Opening=8]="Opening",t))(Tt||{});function fr(){return n.useContext(zo)}function Wo({value:t,children:l}){return n.createElement(zo.Provider,{value:t},l)}function Nd(t){function l(){document.readyState!=="loading"&&(t(),document.removeEventListener("DOMContentLoaded",l))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",l),l())}let en=[];Nd(()=>{function t(l){l.target instanceof HTMLElement&&l.target!==document.body&&en[0]!==l.target&&(en.unshift(l.target),en=en.filter(i=>i!=null&&i.isConnected),en.splice(10))}window.addEventListener("click",t,{capture:!0}),window.addEventListener("mousedown",t,{capture:!0}),window.addEventListener("focus",t,{capture:!0}),document.body.addEventListener("click",t,{capture:!0}),document.body.addEventListener("mousedown",t,{capture:!0}),document.body.addEventListener("focus",t,{capture:!0})});function Yr(t){let l=t.parentElement,i=null;for(;l&&!(l instanceof HTMLFieldSetElement);)l instanceof HTMLLegendElement&&(i=l),l=l.parentElement;let s=(l==null?void 0:l.getAttribute("disabled"))==="";return s&&Od(i)?!1:s}function Od(t){if(!t)return!1;let l=t.previousElementSibling;for(;l!==null;){if(l instanceof HTMLLegendElement)return!1;l=l.previousElementSibling}return!0}function kd(t){throw new Error("Unexpected object: "+t)}var at=(t=>(t[t.First=0]="First",t[t.Previous=1]="Previous",t[t.Next=2]="Next",t[t.Last=3]="Last",t[t.Specific=4]="Specific",t[t.Nothing=5]="Nothing",t))(at||{});function Ho(t,l){let i=l.resolveItems();if(i.length<=0)return null;let s=l.resolveActiveIndex(),c=s??-1;switch(t.focus){case 0:{for(let d=0;d<i.length;++d)if(!l.resolveDisabled(i[d],d,i))return d;return s}case 1:{for(let d=c-1;d>=0;--d)if(!l.resolveDisabled(i[d],d,i))return d;return s}case 2:{for(let d=c+1;d<i.length;++d)if(!l.resolveDisabled(i[d],d,i))return d;return s}case 3:{for(let d=i.length-1;d>=0;--d)if(!l.resolveDisabled(i[d],d,i))return d;return s}case 4:{for(let d=0;d<i.length;++d)if(l.resolveId(i[d],d,i)===t.id)return d;return s}case 5:return null;default:kd(t)}}function fl(t={},l=null,i=[]){for(let[s,c]of Object.entries(t))ml(i,pl(l,s),c);return i}function pl(t,l){return t?t+"["+l+"]":l}function ml(t,l,i){if(Array.isArray(i))for(let[s,c]of i.entries())ml(t,pl(l,s.toString()),c);else i instanceof Date?t.push([l,i.toISOString()]):typeof i=="boolean"?t.push([l,i?"1":"0"]):typeof i=="string"?t.push([l,i]):typeof i=="number"?t.push([l,`${i}`]):i==null?t.push([l,""]):fl(i,l,t)}function Id(t){var l,i;let s=(l=t==null?void 0:t.form)!=null?l:t.closest("form");if(s){for(let c of s.elements)if(c!==t&&(c.tagName==="INPUT"&&c.type==="submit"||c.tagName==="BUTTON"&&c.type==="submit"||c.nodeName==="INPUT"&&c.type==="image")){c.click();return}(i=s.requestSubmit)==null||i.call(s)}}var Qe=(t=>(t.Space=" ",t.Enter="Enter",t.Escape="Escape",t.Backspace="Backspace",t.Delete="Delete",t.ArrowLeft="ArrowLeft",t.ArrowUp="ArrowUp",t.ArrowRight="ArrowRight",t.ArrowDown="ArrowDown",t.Home="Home",t.End="End",t.PageUp="PageUp",t.PageDown="PageDown",t.Tab="Tab",t))(Qe||{}),Md=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(Md||{}),Pd=(t=>(t[t.Single=0]="Single",t[t.Multi=1]="Multi",t))(Pd||{}),Fd=(t=>(t[t.Pointer=0]="Pointer",t[t.Focus=1]="Focus",t[t.Other=2]="Other",t))(Fd||{}),Rd=(t=>(t[t.OpenCombobox=0]="OpenCombobox",t[t.CloseCombobox=1]="CloseCombobox",t[t.GoToOption=2]="GoToOption",t[t.RegisterOption=3]="RegisterOption",t[t.UnregisterOption=4]="UnregisterOption",t[t.RegisterLabel=5]="RegisterLabel",t[t.SetActivationTrigger=6]="SetActivationTrigger",t[t.UpdateVirtualOptions=7]="UpdateVirtualOptions",t))(Rd||{});function Uo(t,l=i=>i){let i=t.activeOptionIndex!==null?t.options[t.activeOptionIndex]:null,s=l(t.options.slice()),c=s.length>0&&s[0].dataRef.current.order!==null?s.sort((p,h)=>p.dataRef.current.order-h.dataRef.current.order):Fn(s,p=>p.dataRef.current.domRef.current),d=i?c.indexOf(i):null;return d===-1&&(d=null),{options:c,activeOptionIndex:d}}let Ld={1(t){var l;return(l=t.dataRef.current)!=null&&l.disabled||t.comboboxState===1?t:{...t,activeOptionIndex:null,comboboxState:1}},0(t){var l,i;if((l=t.dataRef.current)!=null&&l.disabled||t.comboboxState===0)return t;if((i=t.dataRef.current)!=null&&i.value){let s=t.dataRef.current.calculateIndex(t.dataRef.current.value);if(s!==-1)return{...t,activeOptionIndex:s,comboboxState:0}}return{...t,comboboxState:0}},2(t,l){var i,s,c,d,p;if((i=t.dataRef.current)!=null&&i.disabled||(s=t.dataRef.current)!=null&&s.optionsRef.current&&!((c=t.dataRef.current)!=null&&c.optionsPropsRef.current.static)&&t.comboboxState===1)return t;if(t.virtual){let N=l.focus===at.Specific?l.idx:Ho(l,{resolveItems:()=>t.virtual.options,resolveActiveIndex:()=>{var A,O;return(O=(A=t.activeOptionIndex)!=null?A:t.virtual.options.findIndex(D=>!t.virtual.disabled(D)))!=null?O:null},resolveDisabled:t.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),I=(d=l.trigger)!=null?d:2;return t.activeOptionIndex===N&&t.activationTrigger===I?t:{...t,activeOptionIndex:N,activationTrigger:I}}let h=Uo(t);if(h.activeOptionIndex===null){let N=h.options.findIndex(I=>!I.dataRef.current.disabled);N!==-1&&(h.activeOptionIndex=N)}let b=l.focus===at.Specific?l.idx:Ho(l,{resolveItems:()=>h.options,resolveActiveIndex:()=>h.activeOptionIndex,resolveId:N=>N.id,resolveDisabled:N=>N.dataRef.current.disabled}),S=(p=l.trigger)!=null?p:2;return t.activeOptionIndex===b&&t.activationTrigger===S?t:{...t,...h,activeOptionIndex:b,activationTrigger:S}},3:(t,l)=>{var i,s,c;if((i=t.dataRef.current)!=null&&i.virtual)return{...t,options:[...t.options,l.payload]};let d=l.payload,p=Uo(t,b=>(b.push(d),b));t.activeOptionIndex===null&&(s=t.dataRef.current)!=null&&s.isSelected(l.payload.dataRef.current.value)&&(p.activeOptionIndex=p.options.indexOf(d));let h={...t,...p,activationTrigger:2};return(c=t.dataRef.current)!=null&&c.__demoMode&&t.dataRef.current.value===void 0&&(h.activeOptionIndex=0),h},4:(t,l)=>{var i;if((i=t.dataRef.current)!=null&&i.virtual)return{...t,options:t.options.filter(c=>c.id!==l.id)};let s=Uo(t,c=>{let d=c.findIndex(p=>p.id===l.id);return d!==-1&&c.splice(d,1),c});return{...t,...s,activationTrigger:2}},5:(t,l)=>t.labelId===l.id?t:{...t,labelId:l.id},6:(t,l)=>t.activationTrigger===l.trigger?t:{...t,activationTrigger:l.trigger},7:(t,l)=>{var i;if(((i=t.virtual)==null?void 0:i.options)===l.options)return t;let s=t.activeOptionIndex;if(t.activeOptionIndex!==null){let c=l.options.indexOf(t.virtual.options[t.activeOptionIndex]);c!==-1?s=c:s=null}return{...t,activeOptionIndex:s,virtual:Object.assign({},t.virtual,{options:l.options})}}},Vo=n.createContext(null);Vo.displayName="ComboboxActionsContext";function pr(t){let l=n.useContext(Vo);if(l===null){let i=new Error(`<${t} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(i,pr),i}return l}let hl=n.createContext(null);function Ad(t){var l;let i=Nn("VirtualProvider"),[s,c]=n.useMemo(()=>{let b=i.optionsRef.current;if(!b)return[0,0];let S=window.getComputedStyle(b);return[parseFloat(S.paddingBlockStart||S.paddingTop),parseFloat(S.paddingBlockEnd||S.paddingBottom)]},[i.optionsRef.current]),d=st({scrollPaddingStart:s,scrollPaddingEnd:c,count:i.virtual.options.length,estimateSize(){return 40},getScrollElement(){var b;return(b=i.optionsRef.current)!=null?b:null},overscan:12}),[p,h]=n.useState(0);return Fe(()=>{h(b=>b+1)},[(l=i.virtual)==null?void 0:l.options]),n.createElement(hl.Provider,{value:d},n.createElement("div",{style:{position:"relative",width:"100%",height:`${d.getTotalSize()}px`},ref:b=>{if(b){if(typeof process<"u"&&process.env.JEST_WORKER_ID!==void 0||i.activationTrigger===0)return;i.activeOptionIndex!==null&&i.virtual.options.length>i.activeOptionIndex&&d.scrollToIndex(i.activeOptionIndex)}}},d.getVirtualItems().map(b=>{var S;return n.createElement(n.Fragment,{key:b.key},n.cloneElement((S=t.children)==null?void 0:S.call(t,{option:i.virtual.options[b.index],open:i.comboboxState===0}),{key:`${p}-${b.key}`,"data-index":b.index,"aria-setsize":i.virtual.options.length,"aria-posinset":b.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${b.start}px)`,overflowAnchor:"none"}}))})))}let Zo=n.createContext(null);Zo.displayName="ComboboxDataContext";function Nn(t){let l=n.useContext(Zo);if(l===null){let i=new Error(`<${t} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(i,Nn),i}return l}function Dd(t,l){return ft(l.type,Ld,t,l)}let $d=n.Fragment;function _d(t,l){let{value:i,defaultValue:s,onChange:c,form:d,name:p,by:h=null,disabled:b=!1,__demoMode:S=!1,nullable:N=!1,multiple:I=!1,immediate:A=!1,virtual:O=null,...D}=t,F=!1,$=null,[U=I?[]:void 0,W]=tr(i,c,s),[J,de]=n.useReducer(Dd,{dataRef:n.createRef(),comboboxState:S?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),ae=n.useRef(!1),xe=n.useRef({static:!1,hold:!1}),qe=n.useRef(null),He=n.useRef(null),ye=n.useRef(null),Te=n.useRef(null),Me=ne(typeof h=="string"?(le,Ne)=>{let nt=h;return(le==null?void 0:le[nt])===(Ne==null?void 0:Ne[nt])}:h??((le,Ne)=>le===Ne)),Be=ne(le=>J.options.findIndex(Ne=>Me(Ne.dataRef.current.value,le))),ct=n.useCallback(le=>ft(K.mode,{1:()=>U.some(Ne=>Me(Ne,le)),0:()=>Me(U,le)}),[U]),mt=ne(le=>J.activeOptionIndex===Be(le)),K=n.useMemo(()=>({...J,immediate:F,optionsPropsRef:xe,labelRef:qe,inputRef:He,buttonRef:ye,optionsRef:Te,value:U,defaultValue:s,disabled:b,mode:I?1:0,virtual:J.virtual,get activeOptionIndex(){if(ae.current&&J.activeOptionIndex===null&&J.options.length>0){let le=J.options.findIndex(Ne=>!Ne.dataRef.current.disabled);if(le!==-1)return le}return J.activeOptionIndex},calculateIndex:Be,compare:Me,isSelected:ct,isActive:mt,nullable:N,__demoMode:S}),[U,s,b,I,N,S,J,$]);Fe(()=>{},[$,void 0]),Fe(()=>{J.dataRef.current=K},[K]),Ln([K.buttonRef,K.inputRef,K.optionsRef],()=>De.closeCombobox(),K.comboboxState===0);let dt=n.useMemo(()=>{var le,Ne,nt;return{open:K.comboboxState===0,disabled:b,activeIndex:K.activeOptionIndex,activeOption:K.activeOptionIndex===null?null:K.virtual?K.virtual.options[(le=K.activeOptionIndex)!=null?le:0]:(nt=(Ne=K.options[K.activeOptionIndex])==null?void 0:Ne.dataRef.current.value)!=null?nt:null,value:U}},[K,b,U]),ze=ne(()=>{if(K.activeOptionIndex!==null){if(K.virtual)Rt(K.virtual.options[K.activeOptionIndex]);else{let{dataRef:le}=K.options[K.activeOptionIndex];Rt(le.current.value)}De.goToOption(at.Specific,K.activeOptionIndex)}}),bt=ne(()=>{de({type:0}),ae.current=!0}),ce=ne(()=>{de({type:1}),ae.current=!1}),Ue=ne((le,Ne,nt)=>(ae.current=!1,le===at.Specific?de({type:2,focus:at.Specific,idx:Ne,trigger:nt}):de({type:2,focus:le,trigger:nt}))),ut=ne((le,Ne)=>(de({type:3,payload:{id:le,dataRef:Ne}}),()=>{K.isActive(Ne.current.value)&&(ae.current=!0),de({type:4,id:le})})),Nt=ne(le=>(de({type:5,id:le}),()=>de({type:5,id:null}))),Rt=ne(le=>ft(K.mode,{0(){return W==null?void 0:W(le)},1(){let Ne=K.value.slice(),nt=Ne.findIndex(zt=>Me(zt,le));return nt===-1?Ne.push(le):Ne.splice(nt,1),W==null?void 0:W(Ne)}})),wt=ne(le=>{de({type:6,trigger:le})}),De=n.useMemo(()=>({onChange:Rt,registerOption:ut,registerLabel:Nt,goToOption:Ue,closeCombobox:ce,openCombobox:bt,setActivationTrigger:wt,selectActiveOption:ze}),[]),Ct=l===null?{}:{ref:l},et=n.useRef(null),At=Gt();return n.useEffect(()=>{et.current&&s!==void 0&&At.addEventListener(et.current,"reset",()=>{W==null||W(s)})},[et,W]),n.createElement(Vo.Provider,{value:De},n.createElement(Zo.Provider,{value:K},n.createElement(Wo,{value:ft(K.comboboxState,{0:Tt.Open,1:Tt.Closed})},p!=null&&U!=null&&fl({[p]:U}).map(([le,Ne],nt)=>n.createElement(dr,{features:un.Hidden,ref:nt===0?zt=>{var An;et.current=(An=zt==null?void 0:zt.closest("form"))!=null?An:null}:void 0,...gt({key:le,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:d,disabled:b,name:le,value:Ne})})),me({ourProps:Ct,theirProps:D,slot:dt,defaultTag:$d,name:"Combobox"}))))}let Bd="input";function zd(t,l){var i,s,c,d,p;let h=Pt(),{id:b=`headlessui-combobox-input-${h}`,onChange:S,displayValue:N,type:I="text",...A}=t,O=Nn("Combobox.Input"),D=pr("Combobox.Input"),F=yt(O.inputRef,l),$=Qt(O.inputRef),U=n.useRef(!1),W=Gt(),J=ne(()=>{D.onChange(null),O.optionsRef.current&&(O.optionsRef.current.scrollTop=0),D.goToOption(at.Nothing)}),de=function(){var K;return typeof N=="function"&&O.value!==void 0?(K=N(O.value))!=null?K:"":typeof O.value=="string"?O.value:""}();H(([K,dt],[ze,bt])=>{if(U.current)return;let ce=O.inputRef.current;ce&&((bt===0&&dt===1||K!==ze)&&(ce.value=K),requestAnimationFrame(()=>{if(U.current||!ce||($==null?void 0:$.activeElement)!==ce)return;let{selectionStart:Ue,selectionEnd:ut}=ce;Math.abs((ut??0)-(Ue??0))===0&&Ue===0&&ce.setSelectionRange(ce.value.length,ce.value.length)}))},[de,O.comboboxState,$]),H(([K],[dt])=>{if(K===0&&dt===1){if(U.current)return;let ze=O.inputRef.current;if(!ze)return;let bt=ze.value,{selectionStart:ce,selectionEnd:Ue,selectionDirection:ut}=ze;ze.value="",ze.value=bt,ut!==null?ze.setSelectionRange(ce,Ue,ut):ze.setSelectionRange(ce,Ue)}},[O.comboboxState]);let ae=n.useRef(!1),xe=ne(()=>{ae.current=!0}),qe=ne(()=>{W.nextFrame(()=>{ae.current=!1})}),He=ne(K=>{switch(U.current=!0,K.key){case Qe.Enter:if(U.current=!1,O.comboboxState!==0||ae.current)return;if(K.preventDefault(),K.stopPropagation(),O.activeOptionIndex===null){D.closeCombobox();return}D.selectActiveOption(),O.mode===0&&D.closeCombobox();break;case Qe.ArrowDown:return U.current=!1,K.preventDefault(),K.stopPropagation(),ft(O.comboboxState,{0:()=>D.goToOption(at.Next),1:()=>D.openCombobox()});case Qe.ArrowUp:return U.current=!1,K.preventDefault(),K.stopPropagation(),ft(O.comboboxState,{0:()=>D.goToOption(at.Previous),1:()=>{D.openCombobox(),W.nextFrame(()=>{O.value||D.goToOption(at.Last)})}});case Qe.Home:if(K.shiftKey)break;return U.current=!1,K.preventDefault(),K.stopPropagation(),D.goToOption(at.First);case Qe.PageUp:return U.current=!1,K.preventDefault(),K.stopPropagation(),D.goToOption(at.First);case Qe.End:if(K.shiftKey)break;return U.current=!1,K.preventDefault(),K.stopPropagation(),D.goToOption(at.Last);case Qe.PageDown:return U.current=!1,K.preventDefault(),K.stopPropagation(),D.goToOption(at.Last);case Qe.Escape:return U.current=!1,O.comboboxState!==0?void 0:(K.preventDefault(),O.optionsRef.current&&!O.optionsPropsRef.current.static&&K.stopPropagation(),O.nullable&&O.mode===0&&O.value===null&&J(),D.closeCombobox());case Qe.Tab:if(U.current=!1,O.comboboxState!==0)return;O.mode===0&&O.activationTrigger!==1&&D.selectActiveOption(),D.closeCombobox();break}}),ye=ne(K=>{S==null||S(K),O.nullable&&O.mode===0&&K.target.value===""&&J(),D.openCombobox()}),Te=ne(K=>{var dt,ze,bt;let ce=(dt=K.relatedTarget)!=null?dt:en.find(Ue=>Ue!==K.currentTarget);if(U.current=!1,!((ze=O.optionsRef.current)!=null&&ze.contains(ce))&&!((bt=O.buttonRef.current)!=null&&bt.contains(ce))&&O.comboboxState===0)return K.preventDefault(),O.mode===0&&(O.nullable&&O.value===null?J():O.activationTrigger!==1&&D.selectActiveOption()),D.closeCombobox()}),Me=ne(K=>{var dt,ze,bt;let ce=(dt=K.relatedTarget)!=null?dt:en.find(Ue=>Ue!==K.currentTarget);(ze=O.buttonRef.current)!=null&&ze.contains(ce)||(bt=O.optionsRef.current)!=null&&bt.contains(ce)||O.disabled||O.immediate&&O.comboboxState!==0&&(D.openCombobox(),W.nextFrame(()=>{D.setActivationTrigger(1)}))}),Be=Yt(()=>{if(O.labelId)return[O.labelId].join(" ")},[O.labelId]),ct=n.useMemo(()=>({open:O.comboboxState===0,disabled:O.disabled}),[O]),mt={ref:F,id:b,role:"combobox",type:I,"aria-controls":(i=O.optionsRef.current)==null?void 0:i.id,"aria-expanded":O.comboboxState===0,"aria-activedescendant":O.activeOptionIndex===null?void 0:O.virtual?(s=O.options.find(K=>{var dt;return!((dt=O.virtual)!=null&&dt.disabled(K.dataRef.current.value))&&O.compare(K.dataRef.current.value,O.virtual.options[O.activeOptionIndex])}))==null?void 0:s.id:(c=O.options[O.activeOptionIndex])==null?void 0:c.id,"aria-labelledby":Be,"aria-autocomplete":"list",defaultValue:(p=(d=t.defaultValue)!=null?d:O.defaultValue!==void 0?N==null?void 0:N(O.defaultValue):null)!=null?p:O.defaultValue,disabled:O.disabled,onCompositionStart:xe,onCompositionEnd:qe,onKeyDown:He,onChange:ye,onFocus:Me,onBlur:Te};return me({ourProps:mt,theirProps:A,slot:ct,defaultTag:Bd,name:"Combobox.Input"})}let Wd="button";function Hd(t,l){var i;let s=Nn("Combobox.Button"),c=pr("Combobox.Button"),d=yt(s.buttonRef,l),p=Pt(),{id:h=`headlessui-combobox-button-${p}`,...b}=t,S=Gt(),N=ne(F=>{switch(F.key){case Qe.ArrowDown:return F.preventDefault(),F.stopPropagation(),s.comboboxState===1&&c.openCombobox(),S.nextFrame(()=>{var $;return($=s.inputRef.current)==null?void 0:$.focus({preventScroll:!0})});case Qe.ArrowUp:return F.preventDefault(),F.stopPropagation(),s.comboboxState===1&&(c.openCombobox(),S.nextFrame(()=>{s.value||c.goToOption(at.Last)})),S.nextFrame(()=>{var $;return($=s.inputRef.current)==null?void 0:$.focus({preventScroll:!0})});case Qe.Escape:return s.comboboxState!==0?void 0:(F.preventDefault(),s.optionsRef.current&&!s.optionsPropsRef.current.static&&F.stopPropagation(),c.closeCombobox(),S.nextFrame(()=>{var $;return($=s.inputRef.current)==null?void 0:$.focus({preventScroll:!0})}));default:return}}),I=ne(F=>{if(Yr(F.currentTarget))return F.preventDefault();s.comboboxState===0?c.closeCombobox():(F.preventDefault(),c.openCombobox()),S.nextFrame(()=>{var $;return($=s.inputRef.current)==null?void 0:$.focus({preventScroll:!0})})}),A=Yt(()=>{if(s.labelId)return[s.labelId,h].join(" ")},[s.labelId,h]),O=n.useMemo(()=>({open:s.comboboxState===0,disabled:s.disabled,value:s.value}),[s]),D={ref:d,id:h,type:ur(t,s.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(i=s.optionsRef.current)==null?void 0:i.id,"aria-expanded":s.comboboxState===0,"aria-labelledby":A,disabled:s.disabled,onClick:I,onKeyDown:N};return me({ourProps:D,theirProps:b,slot:O,defaultTag:Wd,name:"Combobox.Button"})}let Ud="label";function Vd(t,l){let i=Pt(),{id:s=`headlessui-combobox-label-${i}`,...c}=t,d=Nn("Combobox.Label"),p=pr("Combobox.Label"),h=yt(d.labelRef,l);Fe(()=>p.registerLabel(s),[s]);let b=ne(()=>{var N;return(N=d.inputRef.current)==null?void 0:N.focus({preventScroll:!0})}),S=n.useMemo(()=>({open:d.comboboxState===0,disabled:d.disabled}),[d]);return me({ourProps:{ref:h,id:s,onClick:b},theirProps:c,slot:S,defaultTag:Ud,name:"Combobox.Label"})}let Zd="ul",Yd=pe.RenderStrategy|pe.Static;function Gd(t,l){let i=Pt(),{id:s=`headlessui-combobox-options-${i}`,hold:c=!1,...d}=t,p=Nn("Combobox.Options"),h=yt(p.optionsRef,l),b=fr(),S=b!==null?(b&Tt.Open)===Tt.Open:p.comboboxState===0;Fe(()=>{var O;p.optionsPropsRef.current.static=(O=t.static)!=null?O:!1},[p.optionsPropsRef,t.static]),Fe(()=>{p.optionsPropsRef.current.hold=c},[p.optionsPropsRef,c]),j({container:p.optionsRef.current,enabled:p.comboboxState===0,accept(O){return O.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:O.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(O){O.setAttribute("role","none")}});let N=Yt(()=>{var O,D;return(D=p.labelId)!=null?D:(O=p.buttonRef.current)==null?void 0:O.id},[p.labelId,p.buttonRef.current]),I=n.useMemo(()=>({open:p.comboboxState===0,option:void 0}),[p]),A={"aria-labelledby":N,role:"listbox","aria-multiselectable":p.mode===1?!0:void 0,id:s,ref:h};return p.virtual&&p.comboboxState===0&&Object.assign(d,{children:n.createElement(Ad,null,d.children)}),me({ourProps:A,theirProps:d,slot:I,defaultTag:Zd,features:Yd,visible:S,name:"Combobox.Options"})}let qd="li";function Kd(t,l){var i;let s=Pt(),{id:c=`headlessui-combobox-option-${s}`,disabled:d=!1,value:p,order:h=null,...b}=t,S=Nn("Combobox.Option"),N=pr("Combobox.Option"),I=S.virtual?S.activeOptionIndex===S.calculateIndex(p):S.activeOptionIndex===null?!1:((i=S.options[S.activeOptionIndex])==null?void 0:i.id)===c,A=S.isSelected(p),O=n.useRef(null),D=Mt({disabled:d,value:p,domRef:O,order:h}),F=n.useContext(hl),$=yt(l,O,F?F.measureElement:null),U=ne(()=>N.onChange(p));Fe(()=>N.registerOption(c,D),[D,c]);let W=n.useRef(!(S.virtual||S.__demoMode));Fe(()=>{if(!S.virtual||!S.__demoMode)return;let Te=_t();return Te.requestAnimationFrame(()=>{W.current=!0}),Te.dispose},[S.virtual,S.__demoMode]),Fe(()=>{if(!W.current||S.comboboxState!==0||!I||S.activationTrigger===0)return;let Te=_t();return Te.requestAnimationFrame(()=>{var Me,Be;(Be=(Me=O.current)==null?void 0:Me.scrollIntoView)==null||Be.call(Me,{block:"nearest"})}),Te.dispose},[O,I,S.comboboxState,S.activationTrigger,S.activeOptionIndex]);let J=ne(Te=>{var Me;if(d||(Me=S.virtual)!=null&&Me.disabled(p))return Te.preventDefault();U(),Wr()||requestAnimationFrame(()=>{var Be;return(Be=S.inputRef.current)==null?void 0:Be.focus({preventScroll:!0})}),S.mode===0&&requestAnimationFrame(()=>N.closeCombobox())}),de=ne(()=>{var Te;if(d||(Te=S.virtual)!=null&&Te.disabled(p))return N.goToOption(at.Nothing);let Me=S.calculateIndex(p);N.goToOption(at.Specific,Me)}),ae=Zr(),xe=ne(Te=>ae.update(Te)),qe=ne(Te=>{var Me;if(!ae.wasMoved(Te)||d||(Me=S.virtual)!=null&&Me.disabled(p)||I)return;let Be=S.calculateIndex(p);N.goToOption(at.Specific,Be,0)}),He=ne(Te=>{var Me;ae.wasMoved(Te)&&(d||(Me=S.virtual)!=null&&Me.disabled(p)||I&&(S.optionsPropsRef.current.hold||N.goToOption(at.Nothing)))}),ye=n.useMemo(()=>({active:I,selected:A,disabled:d}),[I,A,d]);return me({ourProps:{id:c,ref:$,role:"option",tabIndex:d===!0?void 0:-1,"aria-disabled":d===!0?!0:void 0,"aria-selected":A,disabled:void 0,onClick:J,onFocus:de,onPointerEnter:xe,onMouseEnter:xe,onPointerMove:qe,onMouseMove:qe,onPointerLeave:He,onMouseLeave:He},theirProps:b,slot:ye,defaultTag:qd,name:"Combobox.Option"})}let Xd=je(_d),Jd=je(Hd),Qd=je(zd),ef=je(Vd),tf=je(Gd),nf=je(Kd),cn=Object.assign(Xd,{Input:Qd,Button:Jd,Label:ef,Options:tf,Option:nf});function vl(t,l,i,s){let c=Mt(i);n.useEffect(()=>{t=t??window;function d(p){c.current(p)}return t.addEventListener(l,d,s),()=>t.removeEventListener(l,d,s)},[t,l,s])}function mr(){let t=n.useRef(!1);return Fe(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function gl(t){let l=ne(t),i=n.useRef(!1);n.useEffect(()=>(i.current=!1,()=>{i.current=!0,sn(()=>{i.current&&l()})}),[l])}var hr=(t=>(t[t.Forwards=0]="Forwards",t[t.Backwards=1]="Backwards",t))(hr||{});function rf(){let t=n.useRef(0);return Hr("keydown",l=>{l.key==="Tab"&&(t.current=l.shiftKey?1:0)},!0),t}function bl(t){if(!t)return new Set;if(typeof t=="function")return new Set(t());let l=new Set;for(let i of t.current)i.current instanceof HTMLElement&&l.add(i.current);return l}let of="div";var xl=(t=>(t[t.None=1]="None",t[t.InitialFocus=2]="InitialFocus",t[t.TabLock=4]="TabLock",t[t.FocusLock=8]="FocusLock",t[t.RestoreFocus=16]="RestoreFocus",t[t.All=30]="All",t))(xl||{});function lf(t,l){let i=n.useRef(null),s=yt(i,l),{initialFocus:c,containers:d,features:p=30,...h}=t;gn()||(p=1);let b=Qt(i);uf({ownerDocument:b},!!(p&16));let S=cf({ownerDocument:b,container:i,initialFocus:c},!!(p&2));df({ownerDocument:b,container:i,containers:d,previousActiveElement:S},!!(p&8));let N=rf(),I=ne(F=>{let $=i.current;$&&(U=>U())(()=>{ft(N.current,{[hr.Forwards]:()=>{an($,Ht.First,{skipElements:[F.relatedTarget]})},[hr.Backwards]:()=>{an($,Ht.Last,{skipElements:[F.relatedTarget]})}})})}),A=Gt(),O=n.useRef(!1),D={ref:s,onKeyDown(F){F.key=="Tab"&&(O.current=!0,A.requestAnimationFrame(()=>{O.current=!1}))},onBlur(F){let $=bl(d);i.current instanceof HTMLElement&&$.add(i.current);let U=F.relatedTarget;U instanceof HTMLElement&&U.dataset.headlessuiFocusGuard!=="true"&&(yl($,U)||(O.current?an(i.current,ft(N.current,{[hr.Forwards]:()=>Ht.Next,[hr.Backwards]:()=>Ht.Previous})|Ht.WrapAround,{relativeTo:F.target}):F.target instanceof HTMLElement&&Jt(F.target)))}};return n.createElement(n.Fragment,null,!!(p&4)&&n.createElement(dr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:I,features:un.Focusable}),me({ourProps:D,theirProps:h,defaultTag:of,name:"FocusTrap"}),!!(p&4)&&n.createElement(dr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:I,features:un.Focusable}))}let sf=je(lf),vr=Object.assign(sf,{features:xl});function af(t=!0){let l=n.useRef(en.slice());return H(([i],[s])=>{s===!0&&i===!1&&sn(()=>{l.current.splice(0)}),s===!1&&i===!0&&(l.current=en.slice())},[t,en,l]),ne(()=>{var i;return(i=l.current.find(s=>s!=null&&s.isConnected))!=null?i:null})}function uf({ownerDocument:t},l){let i=af(l);H(()=>{l||(t==null?void 0:t.activeElement)===(t==null?void 0:t.body)&&Jt(i())},[l]),gl(()=>{l&&Jt(i())})}function cf({ownerDocument:t,container:l,initialFocus:i},s){let c=n.useRef(null),d=mr();return H(()=>{if(!s)return;let p=l.current;p&&sn(()=>{if(!d.current)return;let h=t==null?void 0:t.activeElement;if(i!=null&&i.current){if((i==null?void 0:i.current)===h){c.current=h;return}}else if(p.contains(h)){c.current=h;return}i!=null&&i.current?Jt(i.current):an(p,Ht.First)===or.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),c.current=t==null?void 0:t.activeElement})},[s]),c}function df({ownerDocument:t,container:l,containers:i,previousActiveElement:s},c){let d=mr();vl(t==null?void 0:t.defaultView,"focus",p=>{if(!c||!d.current)return;let h=bl(i);l.current instanceof HTMLElement&&h.add(l.current);let b=s.current;if(!b)return;let S=p.target;S&&S instanceof HTMLElement?yl(h,S)?(s.current=S,Jt(S)):(p.preventDefault(),p.stopPropagation(),Jt(b)):Jt(s.current)},!0)}function yl(t,l){for(let i of t)if(i.contains(l))return!0;return!1}let wl=n.createContext(!1);function ff(){return n.useContext(wl)}function Yo(t){return n.createElement(wl.Provider,{value:t.force},t.children)}function pf(t){let l=ff(),i=n.useContext(El),s=Qt(t),[c,d]=n.useState(()=>{if(!l&&i!==null||ke.isServer)return null;let p=s==null?void 0:s.getElementById("headlessui-portal-root");if(p)return p;if(s===null)return null;let h=s.createElement("div");return h.setAttribute("id","headlessui-portal-root"),s.body.appendChild(h)});return n.useEffect(()=>{c!==null&&(s!=null&&s.body.contains(c)||s==null||s.body.appendChild(c))},[c,s]),n.useEffect(()=>{l||i!==null&&d(i.current)},[i,d,l]),c}let mf=n.Fragment;function hf(t,l){let i=t,s=n.useRef(null),c=yt(Bo(N=>{s.current=N}),l),d=Qt(s),p=pf(s),[h]=n.useState(()=>{var N;return ke.isServer?null:(N=d==null?void 0:d.createElement("div"))!=null?N:null}),b=n.useContext(Go),S=gn();return Fe(()=>{!p||!h||p.contains(h)||(h.setAttribute("data-headlessui-portal",""),p.appendChild(h))},[p,h]),Fe(()=>{if(h&&b)return b.register(h)},[b,h]),gl(()=>{var N;!p||!h||(h instanceof Node&&p.contains(h)&&p.removeChild(h),p.childNodes.length<=0&&((N=p.parentElement)==null||N.removeChild(p)))}),S?!p||!h?null:u.createPortal(me({ourProps:{ref:c},theirProps:i,defaultTag:mf,name:"Portal"}),h):null}let vf=n.Fragment,El=n.createContext(null);function gf(t,l){let{target:i,...s}=t,c={ref:yt(l)};return n.createElement(El.Provider,{value:i},me({ourProps:c,theirProps:s,defaultTag:vf,name:"Popover.Group"}))}let Go=n.createContext(null);function bf(){let t=n.useContext(Go),l=n.useRef([]),i=ne(d=>(l.current.push(d),t&&t.register(d),()=>s(d))),s=ne(d=>{let p=l.current.indexOf(d);p!==-1&&l.current.splice(p,1),t&&t.unregister(d)}),c=n.useMemo(()=>({register:i,unregister:s,portals:l}),[i,s,l]);return[l,n.useMemo(()=>function({children:d}){return n.createElement(Go.Provider,{value:c},d)},[c])]}let xf=je(hf),yf=je(gf),qo=Object.assign(xf,{Group:yf});function wf(t,l){return t===l&&(t!==0||1/t===1/l)||t!==t&&l!==l}const Ef=typeof Object.is=="function"?Object.is:wf,{useState:Sf,useEffect:Cf,useLayoutEffect:jf,useDebugValue:Tf}=a;function Nf(t,l,i){const s=l(),[{inst:c},d]=Sf({inst:{value:s,getSnapshot:l}});return jf(()=>{c.value=s,c.getSnapshot=l,Ko(c)&&d({inst:c})},[t,s,l]),Cf(()=>(Ko(c)&&d({inst:c}),t(()=>{Ko(c)&&d({inst:c})})),[t]),Tf(s),s}function Ko(t){const l=t.getSnapshot,i=t.value;try{const s=l();return!Ef(i,s)}catch{return!0}}function Of(t,l,i){return l()}const kf=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",If=!kf,Mf=If?Of:Nf,Pf="useSyncExternalStore"in a?(t=>t.useSyncExternalStore)(a):Mf;function Ff(t){return Pf(t.subscribe,t.getSnapshot,t.getSnapshot)}function Rf(t,l){let i=t(),s=new Set;return{getSnapshot(){return i},subscribe(c){return s.add(c),()=>s.delete(c)},dispatch(c,...d){let p=l[c].call(i,...d);p&&(i=p,s.forEach(h=>h()))}}}function Lf(){let t;return{before({doc:l}){var i;let s=l.documentElement;t=((i=l.defaultView)!=null?i:window).innerWidth-s.clientWidth},after({doc:l,d:i}){let s=l.documentElement,c=s.clientWidth-s.offsetWidth,d=t-c;i.style(s,"paddingRight",`${d}px`)}}}function Af(){return Rn()?{before({doc:t,d:l,meta:i}){function s(c){return i.containers.flatMap(d=>d()).some(d=>d.contains(c))}l.microTask(()=>{var c;if(window.getComputedStyle(t.documentElement).scrollBehavior!=="auto"){let h=_t();h.style(t.documentElement,"scrollBehavior","auto"),l.add(()=>l.microTask(()=>h.dispose()))}let d=(c=window.scrollY)!=null?c:window.pageYOffset,p=null;l.addEventListener(t,"click",h=>{if(h.target instanceof HTMLElement)try{let b=h.target.closest("a");if(!b)return;let{hash:S}=new URL(b.href),N=t.querySelector(S);N&&!s(N)&&(p=N)}catch{}},!0),l.addEventListener(t,"touchstart",h=>{if(h.target instanceof HTMLElement)if(s(h.target)){let b=h.target;for(;b.parentElement&&s(b.parentElement);)b=b.parentElement;l.style(b,"overscrollBehavior","contain")}else l.style(h.target,"touchAction","none")}),l.addEventListener(t,"touchmove",h=>{if(h.target instanceof HTMLElement)if(s(h.target)){let b=h.target;for(;b.parentElement&&b.dataset.headlessuiPortal!==""&&!(b.scrollHeight>b.clientHeight||b.scrollWidth>b.clientWidth);)b=b.parentElement;b.dataset.headlessuiPortal===""&&h.preventDefault()}else h.preventDefault()},{passive:!1}),l.add(()=>{var h;let b=(h=window.scrollY)!=null?h:window.pageYOffset;d!==b&&window.scrollTo(0,d),p&&p.isConnected&&(p.scrollIntoView({block:"nearest"}),p=null)})})}}:{}}function Df(){return{before({doc:t,d:l}){l.style(t.documentElement,"overflow","hidden")}}}function $f(t){let l={};for(let i of t)Object.assign(l,i(l));return l}let On=Rf(()=>new Map,{PUSH(t,l){var i;let s=(i=this.get(t))!=null?i:{doc:t,count:0,d:_t(),meta:new Set};return s.count++,s.meta.add(l),this.set(t,s),this},POP(t,l){let i=this.get(t);return i&&(i.count--,i.meta.delete(l)),this},SCROLL_PREVENT({doc:t,d:l,meta:i}){let s={doc:t,d:l,meta:$f(i)},c=[Af(),Lf(),Df()];c.forEach(({before:d})=>d==null?void 0:d(s)),c.forEach(({after:d})=>d==null?void 0:d(s))},SCROLL_ALLOW({d:t}){t.dispose()},TEARDOWN({doc:t}){this.delete(t)}});On.subscribe(()=>{let t=On.getSnapshot(),l=new Map;for(let[i]of t)l.set(i,i.documentElement.style.overflow);for(let i of t.values()){let s=l.get(i.doc)==="hidden",c=i.count!==0;(c&&!s||!c&&s)&&On.dispatch(i.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",i),i.count===0&&On.dispatch("TEARDOWN",i)}});function _f(t,l,i){let s=Ff(On),c=t?s.get(t):void 0,d=c?c.count>0:!1;return Fe(()=>{if(!(!t||!l))return On.dispatch("PUSH",t,i),()=>On.dispatch("POP",t,i)},[l,t]),d}let Xo=new Map,gr=new Map;function Sl(t,l=!0){Fe(()=>{var i;if(!l)return;let s=typeof t=="function"?t():t.current;if(!s)return;function c(){var p;if(!s)return;let h=(p=gr.get(s))!=null?p:1;if(h===1?gr.delete(s):gr.set(s,h-1),h!==1)return;let b=Xo.get(s);b&&(b["aria-hidden"]===null?s.removeAttribute("aria-hidden"):s.setAttribute("aria-hidden",b["aria-hidden"]),s.inert=b.inert,Xo.delete(s))}let d=(i=gr.get(s))!=null?i:0;return gr.set(s,d+1),d!==0||(Xo.set(s,{"aria-hidden":s.getAttribute("aria-hidden"),inert:s.inert}),s.setAttribute("aria-hidden","true"),s.inert=!0),c},[t,l])}function Bf({defaultContainers:t=[],portals:l,mainTreeNodeRef:i}={}){var s;let c=n.useRef((s=i==null?void 0:i.current)!=null?s:null),d=Qt(c),p=ne(()=>{var h,b,S;let N=[];for(let I of t)I!==null&&(I instanceof HTMLElement?N.push(I):"current"in I&&I.current instanceof HTMLElement&&N.push(I.current));if(l!=null&&l.current)for(let I of l.current)N.push(I);for(let I of(h=d==null?void 0:d.querySelectorAll("html > *, body > *"))!=null?h:[])I!==document.body&&I!==document.head&&I instanceof HTMLElement&&I.id!=="headlessui-portal-root"&&(I.contains(c.current)||I.contains((S=(b=c.current)==null?void 0:b.getRootNode())==null?void 0:S.host)||N.some(A=>I.contains(A))||N.push(I));return N});return{resolveContainers:p,contains:ne(h=>p().some(b=>b.contains(h))),mainTreeNodeRef:c,MainTreeNode:n.useMemo(()=>function(){return i!=null?null:n.createElement(dr,{features:un.Hidden,ref:c})},[c,i])}}let Jo=n.createContext(()=>{});Jo.displayName="StackContext";var Qo=(t=>(t[t.Add=0]="Add",t[t.Remove=1]="Remove",t))(Qo||{});function zf(){return n.useContext(Jo)}function Wf({children:t,onUpdate:l,type:i,element:s,enabled:c}){let d=zf(),p=ne((...h)=>{l==null||l(...h),d(...h)});return Fe(()=>{let h=c===void 0||c===!0;return h&&p(0,i,s),()=>{h&&p(1,i,s)}},[p,i,s,c]),n.createElement(Jo.Provider,{value:p},t)}let Cl=n.createContext(null);function jl(){let t=n.useContext(Cl);if(t===null){let l=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(l,jl),l}return t}function Tl(){let[t,l]=n.useState([]);return[t.length>0?t.join(" "):void 0,n.useMemo(()=>function(i){let s=ne(d=>(l(p=>[...p,d]),()=>l(p=>{let h=p.slice(),b=h.indexOf(d);return b!==-1&&h.splice(b,1),h}))),c=n.useMemo(()=>({register:s,slot:i.slot,name:i.name,props:i.props}),[s,i.slot,i.name,i.props]);return n.createElement(Cl.Provider,{value:c},i.children)},[l])]}let Hf="p";function Uf(t,l){let i=Pt(),{id:s=`headlessui-description-${i}`,...c}=t,d=jl(),p=yt(l);Fe(()=>d.register(s),[s,d.register]);let h={ref:p,...d.props,id:s};return me({ourProps:h,theirProps:c,slot:d.slot||{},defaultTag:Hf,name:d.name||"Description"})}let Vf=je(Uf),Nl=Object.assign(Vf,{});var Zf=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(Zf||{}),Yf=(t=>(t[t.SetTitleId=0]="SetTitleId",t))(Yf||{});let Gf={0(t,l){return t.titleId===l.id?t:{...t,titleId:l.id}}},Gr=n.createContext(null);Gr.displayName="DialogContext";function br(t){let l=n.useContext(Gr);if(l===null){let i=new Error(`<${t} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(i,br),i}return l}function qf(t,l,i=()=>[document.body]){_f(t,l,s=>{var c;return{containers:[...(c=s.containers)!=null?c:[],i]}})}function Kf(t,l){return ft(l.type,Gf,t,l)}let Xf="div",Jf=pe.RenderStrategy|pe.Static;function Qf(t,l){let i=Pt(),{id:s=`headlessui-dialog-${i}`,open:c,onClose:d,initialFocus:p,role:h="dialog",__demoMode:b=!1,...S}=t,[N,I]=n.useState(0),A=n.useRef(!1);h=function(){return h==="dialog"||h==="alertdialog"?h:(A.current||(A.current=!0,console.warn(`Invalid role [${h}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let O=fr();c===void 0&&O!==null&&(c=(O&Tt.Open)===Tt.Open);let D=n.useRef(null),F=yt(D,l),$=Qt(D),U=t.hasOwnProperty("open")||O!==null,W=t.hasOwnProperty("onClose");if(!U&&!W)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!U)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!W)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof c!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${c}`);if(typeof d!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${d}`);let J=c?0:1,[de,ae]=n.useReducer(Kf,{titleId:null,descriptionId:null,panelRef:n.createRef()}),xe=ne(()=>d(!1)),qe=ne(le=>ae({type:0,id:le})),He=gn()?b?!1:J===0:!1,ye=N>1,Te=n.useContext(Gr)!==null,[Me,Be]=bf(),ct={get current(){var le;return(le=de.panelRef.current)!=null?le:D.current}},{resolveContainers:mt,mainTreeNodeRef:K,MainTreeNode:dt}=Bf({portals:Me,defaultContainers:[ct]}),ze=ye?"parent":"leaf",bt=O!==null?(O&Tt.Closing)===Tt.Closing:!1,ce=Te||bt?!1:He,Ue=n.useCallback(()=>{var le,Ne;return(Ne=Array.from((le=$==null?void 0:$.querySelectorAll("body > *"))!=null?le:[]).find(nt=>nt.id==="headlessui-portal-root"?!1:nt.contains(K.current)&&nt instanceof HTMLElement))!=null?Ne:null},[K]);Sl(Ue,ce);let ut=ye?!0:He,Nt=n.useCallback(()=>{var le,Ne;return(Ne=Array.from((le=$==null?void 0:$.querySelectorAll("[data-headlessui-portal]"))!=null?le:[]).find(nt=>nt.contains(K.current)&&nt instanceof HTMLElement))!=null?Ne:null},[K]);Sl(Nt,ut),Ln(mt,le=>{le.preventDefault(),xe()},!(!He||ye));let Rt=!(ye||J!==0);vl($==null?void 0:$.defaultView,"keydown",le=>{Rt&&(le.defaultPrevented||le.key===Qe.Escape&&(le.preventDefault(),le.stopPropagation(),xe()))}),qf($,!(bt||J!==0||Te),mt),n.useEffect(()=>{if(J!==0||!D.current)return;let le=new ResizeObserver(Ne=>{for(let nt of Ne){let zt=nt.target.getBoundingClientRect();zt.x===0&&zt.y===0&&zt.width===0&&zt.height===0&&xe()}});return le.observe(D.current),()=>le.disconnect()},[J,D,xe]);let[wt,De]=Tl(),Ct=n.useMemo(()=>[{dialogState:J,close:xe,setTitleId:qe},de],[J,de,xe,qe]),et=n.useMemo(()=>({open:J===0}),[J]),At={ref:F,id:s,role:h,"aria-modal":J===0?!0:void 0,"aria-labelledby":de.titleId,"aria-describedby":wt};return n.createElement(Wf,{type:"Dialog",enabled:J===0,element:D,onUpdate:ne((le,Ne)=>{Ne==="Dialog"&&ft(le,{[Qo.Add]:()=>I(nt=>nt+1),[Qo.Remove]:()=>I(nt=>nt-1)})})},n.createElement(Yo,{force:!0},n.createElement(qo,null,n.createElement(Gr.Provider,{value:Ct},n.createElement(qo.Group,{target:D},n.createElement(Yo,{force:!1},n.createElement(De,{slot:et,name:"Dialog.Description"},n.createElement(vr,{initialFocus:p,containers:mt,features:He?ft(ze,{parent:vr.features.RestoreFocus,leaf:vr.features.All&~vr.features.FocusLock}):vr.features.None},n.createElement(Be,null,me({ourProps:At,theirProps:S,slot:et,defaultTag:Xf,features:Jf,visible:J===0,name:"Dialog"}))))))))),n.createElement(dt,null))}let ep="div";function tp(t,l){let i=Pt(),{id:s=`headlessui-dialog-overlay-${i}`,...c}=t,[{dialogState:d,close:p}]=br("Dialog.Overlay"),h=yt(l),b=ne(N=>{if(N.target===N.currentTarget){if(Yr(N.currentTarget))return N.preventDefault();N.preventDefault(),N.stopPropagation(),p()}}),S=n.useMemo(()=>({open:d===0}),[d]);return me({ourProps:{ref:h,id:s,"aria-hidden":!0,onClick:b},theirProps:c,slot:S,defaultTag:ep,name:"Dialog.Overlay"})}let np="div";function rp(t,l){let i=Pt(),{id:s=`headlessui-dialog-backdrop-${i}`,...c}=t,[{dialogState:d},p]=br("Dialog.Backdrop"),h=yt(l);n.useEffect(()=>{if(p.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[p.panelRef]);let b=n.useMemo(()=>({open:d===0}),[d]);return n.createElement(Yo,{force:!0},n.createElement(qo,null,me({ourProps:{ref:h,id:s,"aria-hidden":!0},theirProps:c,slot:b,defaultTag:np,name:"Dialog.Backdrop"})))}let op="div";function ip(t,l){let i=Pt(),{id:s=`headlessui-dialog-panel-${i}`,...c}=t,[{dialogState:d},p]=br("Dialog.Panel"),h=yt(l,p.panelRef),b=n.useMemo(()=>({open:d===0}),[d]),S=ne(N=>{N.stopPropagation()});return me({ourProps:{ref:h,id:s,onClick:S},theirProps:c,slot:b,defaultTag:op,name:"Dialog.Panel"})}let lp="h2";function sp(t,l){let i=Pt(),{id:s=`headlessui-dialog-title-${i}`,...c}=t,[{dialogState:d,setTitleId:p}]=br("Dialog.Title"),h=yt(l);n.useEffect(()=>(p(s),()=>p(null)),[s,p]);let b=n.useMemo(()=>({open:d===0}),[d]);return me({ourProps:{ref:h,id:s},theirProps:c,slot:b,defaultTag:lp,name:"Dialog.Title"})}let ap=je(Qf),up=je(rp),cp=je(ip),dp=je(tp),fp=je(sp),Ol=Object.assign(ap,{Backdrop:up,Panel:cp,Overlay:dp,Title:fp,Description:Nl}),kl=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Il(t){var l,i;let s=(l=t.innerText)!=null?l:"",c=t.cloneNode(!0);if(!(c instanceof HTMLElement))return s;let d=!1;for(let h of c.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))h.remove(),d=!0;let p=d?(i=c.innerText)!=null?i:"":s;return kl.test(p)&&(p=p.replace(kl,"")),p}function pp(t){let l=t.getAttribute("aria-label");if(typeof l=="string")return l.trim();let i=t.getAttribute("aria-labelledby");if(i){let s=i.split(" ").map(c=>{let d=document.getElementById(c);if(d){let p=d.getAttribute("aria-label");return typeof p=="string"?p.trim():Il(d).trim()}return null}).filter(Boolean);if(s.length>0)return s.join(", ")}return Il(t).trim()}function mp(t){let l=n.useRef(""),i=n.useRef("");return ne(()=>{let s=t.current;if(!s)return"";let c=s.innerText;if(l.current===c)return i.current;let d=pp(s).trim().toLowerCase();return l.current=c,i.current=d,d})}var hp=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(hp||{}),vp=(t=>(t[t.Pointer=0]="Pointer",t[t.Other=1]="Other",t))(vp||{}),gp=(t=>(t[t.OpenMenu=0]="OpenMenu",t[t.CloseMenu=1]="CloseMenu",t[t.GoToItem=2]="GoToItem",t[t.Search=3]="Search",t[t.ClearSearch=4]="ClearSearch",t[t.RegisterItem=5]="RegisterItem",t[t.UnregisterItem=6]="UnregisterItem",t))(gp||{});function ei(t,l=i=>i){let i=t.activeItemIndex!==null?t.items[t.activeItemIndex]:null,s=Fn(l(t.items.slice()),d=>d.dataRef.current.domRef.current),c=i?s.indexOf(i):null;return c===-1&&(c=null),{items:s,activeItemIndex:c}}let bp={1(t){return t.menuState===1?t:{...t,activeItemIndex:null,menuState:1}},0(t){return t.menuState===0?t:{...t,__demoMode:!1,menuState:0}},2:(t,l)=>{var i;let s=ei(t),c=Ho(l,{resolveItems:()=>s.items,resolveActiveIndex:()=>s.activeItemIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled});return{...t,...s,searchQuery:"",activeItemIndex:c,activationTrigger:(i=l.trigger)!=null?i:1}},3:(t,l)=>{let i=t.searchQuery!==""?0:1,s=t.searchQuery+l.value.toLowerCase(),c=(t.activeItemIndex!==null?t.items.slice(t.activeItemIndex+i).concat(t.items.slice(0,t.activeItemIndex+i)):t.items).find(p=>{var h;return((h=p.dataRef.current.textValue)==null?void 0:h.startsWith(s))&&!p.dataRef.current.disabled}),d=c?t.items.indexOf(c):-1;return d===-1||d===t.activeItemIndex?{...t,searchQuery:s}:{...t,searchQuery:s,activeItemIndex:d,activationTrigger:1}},4(t){return t.searchQuery===""?t:{...t,searchQuery:"",searchActiveItemIndex:null}},5:(t,l)=>{let i=ei(t,s=>[...s,{id:l.id,dataRef:l.dataRef}]);return{...t,...i}},6:(t,l)=>{let i=ei(t,s=>{let c=s.findIndex(d=>d.id===l.id);return c!==-1&&s.splice(c,1),s});return{...t,...i,activationTrigger:1}}},ti=n.createContext(null);ti.displayName="MenuContext";function qr(t){let l=n.useContext(ti);if(l===null){let i=new Error(`<${t} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(i,qr),i}return l}function xp(t,l){return ft(l.type,bp,t,l)}let yp=n.Fragment;function wp(t,l){let{__demoMode:i=!1,...s}=t,c=n.useReducer(xp,{__demoMode:i,menuState:i?0:1,buttonRef:n.createRef(),itemsRef:n.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:d,itemsRef:p,buttonRef:h},b]=c,S=yt(l);Ln([h,p],(O,D)=>{var F;b({type:1}),sr(D,lr.Loose)||(O.preventDefault(),(F=h.current)==null||F.focus())},d===0);let N=ne(()=>{b({type:1})}),I=n.useMemo(()=>({open:d===0,close:N}),[d,N]),A={ref:S};return n.createElement(ti.Provider,{value:c},n.createElement(Wo,{value:ft(d,{0:Tt.Open,1:Tt.Closed})},me({ourProps:A,theirProps:s,slot:I,defaultTag:yp,name:"Menu"})))}let Ep="button";function Sp(t,l){var i;let s=Pt(),{id:c=`headlessui-menu-button-${s}`,...d}=t,[p,h]=qr("Menu.Button"),b=yt(p.buttonRef,l),S=Gt(),N=ne(F=>{switch(F.key){case Qe.Space:case Qe.Enter:case Qe.ArrowDown:F.preventDefault(),F.stopPropagation(),h({type:0}),S.nextFrame(()=>h({type:2,focus:at.First}));break;case Qe.ArrowUp:F.preventDefault(),F.stopPropagation(),h({type:0}),S.nextFrame(()=>h({type:2,focus:at.Last}));break}}),I=ne(F=>{switch(F.key){case Qe.Space:F.preventDefault();break}}),A=ne(F=>{if(Yr(F.currentTarget))return F.preventDefault();t.disabled||(p.menuState===0?(h({type:1}),S.nextFrame(()=>{var $;return($=p.buttonRef.current)==null?void 0:$.focus({preventScroll:!0})})):(F.preventDefault(),h({type:0})))}),O=n.useMemo(()=>({open:p.menuState===0}),[p]),D={ref:b,id:c,type:ur(t,p.buttonRef),"aria-haspopup":"menu","aria-controls":(i=p.itemsRef.current)==null?void 0:i.id,"aria-expanded":p.menuState===0,onKeyDown:N,onKeyUp:I,onClick:A};return me({ourProps:D,theirProps:d,slot:O,defaultTag:Ep,name:"Menu.Button"})}let Cp="div",jp=pe.RenderStrategy|pe.Static;function Tp(t,l){var i,s;let c=Pt(),{id:d=`headlessui-menu-items-${c}`,...p}=t,[h,b]=qr("Menu.Items"),S=yt(h.itemsRef,l),N=Qt(h.itemsRef),I=Gt(),A=fr(),O=A!==null?(A&Tt.Open)===Tt.Open:h.menuState===0;n.useEffect(()=>{let W=h.itemsRef.current;W&&h.menuState===0&&W!==(N==null?void 0:N.activeElement)&&W.focus({preventScroll:!0})},[h.menuState,h.itemsRef,N]),j({container:h.itemsRef.current,enabled:h.menuState===0,accept(W){return W.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:W.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(W){W.setAttribute("role","none")}});let D=ne(W=>{var J,de;switch(I.dispose(),W.key){case Qe.Space:if(h.searchQuery!=="")return W.preventDefault(),W.stopPropagation(),b({type:3,value:W.key});case Qe.Enter:if(W.preventDefault(),W.stopPropagation(),b({type:1}),h.activeItemIndex!==null){let{dataRef:ae}=h.items[h.activeItemIndex];(de=(J=ae.current)==null?void 0:J.domRef.current)==null||de.click()}Br(h.buttonRef.current);break;case Qe.ArrowDown:return W.preventDefault(),W.stopPropagation(),b({type:2,focus:at.Next});case Qe.ArrowUp:return W.preventDefault(),W.stopPropagation(),b({type:2,focus:at.Previous});case Qe.Home:case Qe.PageUp:return W.preventDefault(),W.stopPropagation(),b({type:2,focus:at.First});case Qe.End:case Qe.PageDown:return W.preventDefault(),W.stopPropagation(),b({type:2,focus:at.Last});case Qe.Escape:W.preventDefault(),W.stopPropagation(),b({type:1}),_t().nextFrame(()=>{var ae;return(ae=h.buttonRef.current)==null?void 0:ae.focus({preventScroll:!0})});break;case Qe.Tab:W.preventDefault(),W.stopPropagation(),b({type:1}),_t().nextFrame(()=>{bn(h.buttonRef.current,W.shiftKey?Ht.Previous:Ht.Next)});break;default:W.key.length===1&&(b({type:3,value:W.key}),I.setTimeout(()=>b({type:4}),350));break}}),F=ne(W=>{switch(W.key){case Qe.Space:W.preventDefault();break}}),$=n.useMemo(()=>({open:h.menuState===0}),[h]),U={"aria-activedescendant":h.activeItemIndex===null||(i=h.items[h.activeItemIndex])==null?void 0:i.id,"aria-labelledby":(s=h.buttonRef.current)==null?void 0:s.id,id:d,onKeyDown:D,onKeyUp:F,role:"menu",tabIndex:0,ref:S};return me({ourProps:U,theirProps:p,slot:$,defaultTag:Cp,features:jp,visible:O,name:"Menu.Items"})}let Np=n.Fragment;function Op(t,l){let i=Pt(),{id:s=`headlessui-menu-item-${i}`,disabled:c=!1,...d}=t,[p,h]=qr("Menu.Item"),b=p.activeItemIndex!==null?p.items[p.activeItemIndex].id===s:!1,S=n.useRef(null),N=yt(l,S);Fe(()=>{if(p.__demoMode||p.menuState!==0||!b||p.activationTrigger===0)return;let ae=_t();return ae.requestAnimationFrame(()=>{var xe,qe;(qe=(xe=S.current)==null?void 0:xe.scrollIntoView)==null||qe.call(xe,{block:"nearest"})}),ae.dispose},[p.__demoMode,S,b,p.menuState,p.activationTrigger,p.activeItemIndex]);let I=mp(S),A=n.useRef({disabled:c,domRef:S,get textValue(){return I()}});Fe(()=>{A.current.disabled=c},[A,c]),Fe(()=>(h({type:5,id:s,dataRef:A}),()=>h({type:6,id:s})),[A,s]);let O=ne(()=>{h({type:1})}),D=ne(ae=>{if(c)return ae.preventDefault();h({type:1}),Br(p.buttonRef.current)}),F=ne(()=>{if(c)return h({type:2,focus:at.Nothing});h({type:2,focus:at.Specific,id:s})}),$=Zr(),U=ne(ae=>$.update(ae)),W=ne(ae=>{$.wasMoved(ae)&&(c||b||h({type:2,focus:at.Specific,id:s,trigger:0}))}),J=ne(ae=>{$.wasMoved(ae)&&(c||b&&h({type:2,focus:at.Nothing}))}),de=n.useMemo(()=>({active:b,disabled:c,close:O}),[b,c,O]);return me({ourProps:{id:s,ref:N,role:"menuitem",tabIndex:c===!0?void 0:-1,"aria-disabled":c===!0?!0:void 0,disabled:void 0,onClick:D,onFocus:F,onPointerEnter:U,onMouseEnter:U,onPointerMove:W,onMouseMove:W,onPointerLeave:J,onMouseLeave:J},theirProps:d,slot:de,defaultTag:Np,name:"Menu.Item"})}let kp=je(wp),Ip=je(Sp),Mp=je(Tp),Pp=je(Op),Kr=Object.assign(kp,{Button:Ip,Items:Mp,Item:Pp}),Ml=n.createContext(null);function Pl(){let t=n.useContext(Ml);if(t===null){let l=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(l,Pl),l}return t}function Fp(){let[t,l]=n.useState([]);return[t.length>0?t.join(" "):void 0,n.useMemo(()=>function(i){let s=ne(d=>(l(p=>[...p,d]),()=>l(p=>{let h=p.slice(),b=h.indexOf(d);return b!==-1&&h.splice(b,1),h}))),c=n.useMemo(()=>({register:s,slot:i.slot,name:i.name,props:i.props}),[s,i.slot,i.name,i.props]);return n.createElement(Ml.Provider,{value:c},i.children)},[l])]}let Rp="label";function Lp(t,l){let i=Pt(),{id:s=`headlessui-label-${i}`,passive:c=!1,...d}=t,p=Pl(),h=yt(l);Fe(()=>p.register(s),[s,p.register]);let b={ref:h,...p.props,id:s};return c&&("onClick"in b&&(delete b.htmlFor,delete b.onClick),"onClick"in d&&delete d.onClick),me({ourProps:b,theirProps:d,slot:p.slot||{},defaultTag:Rp,name:p.name||"Label"})}let Ap=je(Lp),Dp=Object.assign(Ap,{});function $p(t=0){let[l,i]=n.useState(t),s=mr(),c=n.useCallback(b=>{s.current&&i(S=>S|b)},[l,s]),d=n.useCallback(b=>!!(l&b),[l]),p=n.useCallback(b=>{s.current&&i(S=>S&~b)},[i,s]),h=n.useCallback(b=>{s.current&&i(S=>S^b)},[i]);return{flags:l,addFlag:c,hasFlag:d,removeFlag:p,toggleFlag:h}}let ni=n.createContext(null);ni.displayName="GroupContext";let _p=n.Fragment;function Bp(t){var l;let[i,s]=n.useState(null),[c,d]=Fp(),[p,h]=Tl(),b=n.useMemo(()=>({switch:i,setSwitch:s,labelledby:c,describedby:p}),[i,s,c,p]),S={},N=t;return n.createElement(h,{name:"Switch.Description"},n.createElement(d,{name:"Switch.Label",props:{htmlFor:(l=b.switch)==null?void 0:l.id,onClick(I){i&&(I.currentTarget.tagName==="LABEL"&&I.preventDefault(),i.click(),i.focus({preventScroll:!0}))}}},n.createElement(ni.Provider,{value:b},me({ourProps:S,theirProps:N,defaultTag:_p,name:"Switch.Group"}))))}let zp="button";function Wp(t,l){var i;let s=Pt(),{id:c=`headlessui-switch-${s}`,checked:d,defaultChecked:p=!1,onChange:h,disabled:b=!1,name:S,value:N,form:I,...A}=t,O=n.useContext(ni),D=n.useRef(null),F=yt(D,l,O===null?null:O.setSwitch),[$,U]=tr(d,h,p),W=ne(()=>U==null?void 0:U(!$)),J=ne(ye=>{if(Yr(ye.currentTarget))return ye.preventDefault();ye.preventDefault(),W()}),de=ne(ye=>{ye.key===Qe.Space?(ye.preventDefault(),W()):ye.key===Qe.Enter&&Id(ye.currentTarget)}),ae=ne(ye=>ye.preventDefault()),xe=n.useMemo(()=>({checked:$}),[$]),qe={id:c,ref:F,role:"switch",type:ur(t,D),tabIndex:t.tabIndex===-1?0:(i=t.tabIndex)!=null?i:0,"aria-checked":$,"aria-labelledby":O==null?void 0:O.labelledby,"aria-describedby":O==null?void 0:O.describedby,disabled:b,onClick:J,onKeyUp:de,onKeyPress:ae},He=Gt();return n.useEffect(()=>{var ye;let Te=(ye=D.current)==null?void 0:ye.closest("form");Te&&p!==void 0&&He.addEventListener(Te,"reset",()=>{U(p)})},[D,U]),n.createElement(n.Fragment,null,S!=null&&$&&n.createElement(dr,{features:un.Hidden,...gt({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:b,form:I,checked:$,name:S,value:N})}),me({ourProps:qe,theirProps:A,slot:xe,defaultTag:zp,name:"Switch"}))}let Hp=je(Wp),Up=Bp,Vp=Object.assign(Hp,{Group:Up,Label:Dp,Description:Nl});function Zp(t){let l={called:!1};return(...i)=>{if(!l.called)return l.called=!0,t(...i)}}function ri(t,...l){t&&l.length>0&&t.classList.add(...l)}function oi(t,...l){t&&l.length>0&&t.classList.remove(...l)}function Yp(t,l){let i=_t();if(!t)return i.dispose;let{transitionDuration:s,transitionDelay:c}=getComputedStyle(t),[d,p]=[s,c].map(b=>{let[S=0]=b.split(",").filter(Boolean).map(N=>N.includes("ms")?parseFloat(N):parseFloat(N)*1e3).sort((N,I)=>I-N);return S}),h=d+p;if(h!==0){i.group(S=>{S.setTimeout(()=>{l(),S.dispose()},h),S.addEventListener(t,"transitionrun",N=>{N.target===N.currentTarget&&S.dispose()})});let b=i.addEventListener(t,"transitionend",S=>{S.target===S.currentTarget&&(l(),b())})}else l();return i.add(()=>l()),i.dispose}function Gp(t,l,i,s){let c=i?"enter":"leave",d=_t(),p=s!==void 0?Zp(s):()=>{};c==="enter"&&(t.removeAttribute("hidden"),t.style.display="");let h=ft(c,{enter:()=>l.enter,leave:()=>l.leave}),b=ft(c,{enter:()=>l.enterTo,leave:()=>l.leaveTo}),S=ft(c,{enter:()=>l.enterFrom,leave:()=>l.leaveFrom});return oi(t,...l.base,...l.enter,...l.enterTo,...l.enterFrom,...l.leave,...l.leaveFrom,...l.leaveTo,...l.entered),ri(t,...l.base,...h,...S),d.nextFrame(()=>{oi(t,...l.base,...h,...S),ri(t,...l.base,...h,...b),Yp(t,()=>(oi(t,...l.base,...h),ri(t,...l.base,...l.entered),p()))}),d.dispose}function qp({immediate:t,container:l,direction:i,classes:s,onStart:c,onStop:d}){let p=mr(),h=Gt(),b=Mt(i);Fe(()=>{t&&(b.current="enter")},[t]),Fe(()=>{let S=_t();h.add(S.dispose);let N=l.current;if(N&&b.current!=="idle"&&p.current)return S.dispose(),c.current(b.current),S.add(Gp(N,s.current,b.current==="enter",()=>{S.dispose(),d.current(b.current)})),S.dispose},[i])}function yn(t=""){return t.split(/\s+/).filter(l=>l.length>1)}let Xr=n.createContext(null);Xr.displayName="TransitionContext";var Kp=(t=>(t.Visible="visible",t.Hidden="hidden",t))(Kp||{});function Xp(){let t=n.useContext(Xr);if(t===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}function Jp(){let t=n.useContext(Jr);if(t===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}let Jr=n.createContext(null);Jr.displayName="NestingContext";function Qr(t){return"children"in t?Qr(t.children):t.current.filter(({el:l})=>l.current!==null).filter(({state:l})=>l==="visible").length>0}function Fl(t,l){let i=Mt(t),s=n.useRef([]),c=mr(),d=Gt(),p=ne((O,D=Le.Hidden)=>{let F=s.current.findIndex(({el:$})=>$===O);F!==-1&&(ft(D,{[Le.Unmount](){s.current.splice(F,1)},[Le.Hidden](){s.current[F].state="hidden"}}),d.microTask(()=>{var $;!Qr(s)&&c.current&&(($=i.current)==null||$.call(i))}))}),h=ne(O=>{let D=s.current.find(({el:F})=>F===O);return D?D.state!=="visible"&&(D.state="visible"):s.current.push({el:O,state:"visible"}),()=>p(O,Le.Unmount)}),b=n.useRef([]),S=n.useRef(Promise.resolve()),N=n.useRef({enter:[],leave:[],idle:[]}),I=ne((O,D,F)=>{b.current.splice(0),l&&(l.chains.current[D]=l.chains.current[D].filter(([$])=>$!==O)),l==null||l.chains.current[D].push([O,new Promise($=>{b.current.push($)})]),l==null||l.chains.current[D].push([O,new Promise($=>{Promise.all(N.current[D].map(([U,W])=>W)).then(()=>$())})]),D==="enter"?S.current=S.current.then(()=>l==null?void 0:l.wait.current).then(()=>F(D)):F(D)}),A=ne((O,D,F)=>{Promise.all(N.current[D].splice(0).map(([$,U])=>U)).then(()=>{var $;($=b.current.shift())==null||$()}).then(()=>F(D))});return n.useMemo(()=>({children:s,register:h,unregister:p,onStart:I,onStop:A,wait:S,chains:N}),[h,p,s,I,A,N,S])}function Qp(){}let em=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Rl(t){var l;let i={};for(let s of em)i[s]=(l=t[s])!=null?l:Qp;return i}function tm(t){let l=n.useRef(Rl(t));return n.useEffect(()=>{l.current=Rl(t)},[t]),l}let nm="div",Ll=pe.RenderStrategy;function rm(t,l){var i,s;let{beforeEnter:c,afterEnter:d,beforeLeave:p,afterLeave:h,enter:b,enterFrom:S,enterTo:N,entered:I,leave:A,leaveFrom:O,leaveTo:D,...F}=t,$=n.useRef(null),U=yt($,l),W=(i=F.unmount)==null||i?Le.Unmount:Le.Hidden,{show:J,appear:de,initial:ae}=Xp(),[xe,qe]=n.useState(J?"visible":"hidden"),He=Jp(),{register:ye,unregister:Te}=He;n.useEffect(()=>ye($),[ye,$]),n.useEffect(()=>{if(W===Le.Hidden&&$.current){if(J&&xe!=="visible"){qe("visible");return}return ft(xe,{hidden:()=>Te($),visible:()=>ye($)})}},[xe,$,ye,Te,J,W]);let Me=Mt({base:yn(F.className),enter:yn(b),enterFrom:yn(S),enterTo:yn(N),entered:yn(I),leave:yn(A),leaveFrom:yn(O),leaveTo:yn(D)}),Be=tm({beforeEnter:c,afterEnter:d,beforeLeave:p,afterLeave:h}),ct=gn();n.useEffect(()=>{if(ct&&xe==="visible"&&$.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[$,xe,ct]);let mt=ae&&!de,K=de&&J&&ae,dt=!ct||mt?"idle":J?"enter":"leave",ze=$p(0),bt=ne(wt=>ft(wt,{enter:()=>{ze.addFlag(Tt.Opening),Be.current.beforeEnter()},leave:()=>{ze.addFlag(Tt.Closing),Be.current.beforeLeave()},idle:()=>{}})),ce=ne(wt=>ft(wt,{enter:()=>{ze.removeFlag(Tt.Opening),Be.current.afterEnter()},leave:()=>{ze.removeFlag(Tt.Closing),Be.current.afterLeave()},idle:()=>{}})),Ue=Fl(()=>{qe("hidden"),Te($)},He),ut=n.useRef(!1);qp({immediate:K,container:$,classes:Me,direction:dt,onStart:Mt(wt=>{ut.current=!0,Ue.onStart($,wt,bt)}),onStop:Mt(wt=>{ut.current=!1,Ue.onStop($,wt,ce),wt==="leave"&&!Qr(Ue)&&(qe("hidden"),Te($))})});let Nt=F,Rt={ref:U};return K?Nt={...Nt,className:Q(F.className,...Me.current.enter,...Me.current.enterFrom)}:ut.current&&(Nt.className=Q(F.className,(s=$.current)==null?void 0:s.className),Nt.className===""&&delete Nt.className),n.createElement(Jr.Provider,{value:Ue},n.createElement(Wo,{value:ft(xe,{visible:Tt.Open,hidden:Tt.Closed})|ze.flags},me({ourProps:Rt,theirProps:Nt,defaultTag:nm,features:Ll,visible:xe==="visible",name:"Transition.Child"})))}function om(t,l){let{show:i,appear:s=!1,unmount:c=!0,...d}=t,p=n.useRef(null),h=yt(p,l);gn();let b=fr();if(i===void 0&&b!==null&&(i=(b&Tt.Open)===Tt.Open),![!0,!1].includes(i))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[S,N]=n.useState(i?"visible":"hidden"),I=Fl(()=>{N("hidden")}),[A,O]=n.useState(!0),D=n.useRef([i]);Fe(()=>{A!==!1&&D.current[D.current.length-1]!==i&&(D.current.push(i),O(!1))},[D,i]);let F=n.useMemo(()=>({show:i,appear:s,initial:A}),[i,s,A]);n.useEffect(()=>{if(i)N("visible");else if(!Qr(I))N("hidden");else{let J=p.current;if(!J)return;let de=J.getBoundingClientRect();de.x===0&&de.y===0&&de.width===0&&de.height===0&&N("hidden")}},[i,I]);let $={unmount:c},U=ne(()=>{var J;A&&O(!1),(J=t.beforeEnter)==null||J.call(t)}),W=ne(()=>{var J;A&&O(!1),(J=t.beforeLeave)==null||J.call(t)});return n.createElement(Jr.Provider,{value:I},n.createElement(Xr.Provider,{value:F},me({ourProps:{...$,as:n.Fragment,children:n.createElement(Al,{ref:h,...$,...d,beforeEnter:U,beforeLeave:W})},theirProps:{},defaultTag:n.Fragment,features:Ll,visible:S==="visible",name:"Transition"})))}function im(t,l){let i=n.useContext(Xr)!==null,s=fr()!==null;return n.createElement(n.Fragment,null,!i&&s?n.createElement(ii,{ref:l,...t}):n.createElement(Al,{ref:l,...t}))}let ii=je(om),Al=je(rm),lm=je(im),kn=Object.assign(ii,{Child:lm,Root:ii});function sm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 am=a.forwardRef(sm);function um({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 cm=a.forwardRef(um);function dm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 fm=a.forwardRef(dm);function pm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 mm=a.forwardRef(pm);function hm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 vm=a.forwardRef(hm);function gm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 Dl=a.forwardRef(gm);function bm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 xm=a.forwardRef(bm);function ym({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 wm=a.forwardRef(ym);function Em({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 Sm=a.forwardRef(Em),Cm={warning:{color:"bg-yellow-50",icon:y.jsx(xm,{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:y.jsx(Sm,{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:y.jsx(fm,{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:y.jsx(wm,{className:"h-5 w-5 text-blue-400","aria-hidden":"true"}),colorTitle:"text-blue-800",colorText:"text-blue-700"}},jm=({type:t="info",title:l,message:i,active:s=!1,time:c=1e3,onClose:d})=>{const[p,h]=n.useState(!1),b=n.useRef(null);n.useEffect(()=>(s&&(h(!0),b.current=setTimeout(()=>{h(!1),d&&d()},c)),()=>clearTimeout(b.current)),[s,c,d]);const S=Cm[t];return p?y.jsx("div",{className:"fixed top-2.5 left-1/2 transform -translate-x-1/2 w-80 3xs:w-96 z-50",children:y.jsx(kn,{as:n.Fragment,show:p,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:y.jsxs("div",{className:x("rounded-md p-4 text-center",S.color),children:[y.jsxs("div",{className:"flex justify-center flex-shrink-0",children:[S.icon,y.jsx("h3",{className:x("text-sm font-medium ml-3",S.colorTitle),children:l})]}),y.jsx("div",{className:x("mt-2 text-sm",S.colorText),children:y.jsx("p",{children:i})})]})})}):null};function Tm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 Nm=a.forwardRef(Tm);function Om({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 km=a.forwardRef(Om);function Im({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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"}),a.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 Mm=a.forwardRef(Im);function Pm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 Fm=a.forwardRef(Pm);function Rm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 Lm=a.forwardRef(Rm);function Am({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 Dm=a.forwardRef(Am),$m=({src:t,alt:l,width:i,height:s,className:c="",classNameIcon:d="",isIcon:p=!0,acronym:h=""})=>{function b(){if(typeof h!="string")return h;const S=h.toLowerCase(),N=S.split(" "),I=N[N.length-1];return S.charAt(0)+I.charAt(0)}return y.jsx(y.Fragment,{children:t?y.jsx("img",{src:t,alt:l,width:i,height:s,className:x(c!==""&&c),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s"},onLoad:S=>S.currentTarget.style.filter="none","data-testid":"img"}):p?y.jsx(Lm,{className:x("bg-white text-default-5",d!==""?d:"w-7 h-7")}):y.jsx("div",{className:x("bg-gray-200 text-default-5 rounded-full font-bold uppercase flex justify-center items-center",d!==""?d:"w-7 h-7"),children:b()})})},_m=({steps:t,onClick:l})=>{const[i,s]=n.useState(0),c=d=>{s(d),l(d)};return y.jsx("nav",{className:"flex items-center justify-center w-full","aria-label":"Progress","data-testid":"bullets",children:y.jsx("ol",{role:"list",className:"flex items-center space-x-5",children:new Array(t).fill(1).map((d,p)=>y.jsx("li",{children:i!==p?y.jsx("div",{className:"cursor-pointer block h-2.5 w-2.5 rounded-full bg-gray-500 hover:bg-gray-600",onClick:()=>c(p),"data-testid":`step-${p}`,children:y.jsx("span",{className:"sr-only",children:"step"})}):y.jsxs("div",{className:"relative flex items-center justify-center cursor-pointer","aria-current":"step",children:[y.jsx("span",{className:"absolute flex h-5 w-5 p-px","aria-hidden":"true",children:y.jsx("span",{className:"h-full w-full rounded-full bg-gray-300"})}),y.jsx("span",{className:"relative block h-2.5 w-2.5 rounded-full bg-gray-500","aria-hidden":"true"}),y.jsx("span",{className:"sr-only",children:"step"})]})},p))})})};var $l={exports:{}};/*!
66
66
  Copyright (c) 2018 Jed Watson.
67
67
  Licensed under the MIT License (MIT), see
68
68
  http://jedwatson.github.io/classnames
69
- */(function(t){(function(){var l={}.hasOwnProperty;function i(){for(var d="",p=0;p<arguments.length;p++){var h=arguments[p];h&&(d=c(d,s(h)))}return d}function s(d){if(typeof d=="string"||typeof d=="number")return d;if(typeof d!="object")return"";if(Array.isArray(d))return i.apply(null,d);if(d.toString!==Object.prototype.toString&&!d.toString.toString().includes("[native code]"))return d.toString();var p="";for(var h in d)l.call(d,h)&&d[h]&&(p=c(p,h));return p}function c(d,p){return p?d?d+" "+p:d+p:d}t.exports?(i.default=i,t.exports=i):window.classNames=i})()})($l);var Bm=$l.exports;const wn=_(Bm),_l=({className:t="text-sm w-full rounded-md",children:l,icon:i=null,edge:s=null,disabled:c=!1,type:d="button",onClick:p,id:h})=>{const b=wn({"ml-2":s==="start"&&i!==null,"mr-2":s==="end"&&i!==null});return y.jsxs("button",{className:x("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",t),type:d,onClick:p,disabled:c,"data-testid":`button-outline-${h}`,id:`button-outline-${h}`,children:[s==="start"&&i!==null&&y.jsx("span",{children:i}),y.jsx("span",{className:x("flex",b),id:h,children:l}),s==="end"&&i!==null&&y.jsx("span",{children:i})]})},Bl=({children:t,className:l="",icon:i=null,edge:s=null,disabled:c=!1,type:d="button",onClick:p,id:h})=>{const b=wn({"ml-2":s==="start"&&i!==null,"mr-2":s==="end"&&i!==null});return y.jsxs("button",{className:`${l} flex justify-center items-center`,edge:s,type:d,onClick:p,disabled:c,"data-testid":`button-${h}`,children:[s==="start"&&i!==null&&y.jsx("span",{children:i}),y.jsx("span",{className:b,children:t}),s==="end"&&i!==null&&y.jsx("span",{children:i})]})},xr=({children:t,classNameButton:l="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:i="",icon:s=null,edge:c=null,disabled:d=!1,type:p="button",onClick:h,id:b,outline:S="0px 0px 0px 2px #6366F1, 0px 0px 0px 2px #FFF, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameContainer:N=""})=>{const[I,A]=n.useState(!1),O=wn({"ml-2":c==="start"&&s!==null,"mr-2":c==="end"&&s!==null}),D=()=>{h&&h()};return y.jsx("div",{className:x("rounded-md p-0.5",N!==""&&N),style:{boxShadow:I?S:"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:y.jsxs("button",{className:x("flex justify-center items-center text-sm leading-6 shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",d&&"text-white bg-gray-300 rounded focus:outline-none cursor-default",d?l.replace(/\bbg-\w+\b/g,""):l),type:p,onClick:D,onFocus:()=>A(!0),onBlur:()=>A(!1),disabled:d,"data-testid":`button-solid-${b}`,children:[c==="start"&&s!==null&&y.jsx("span",{className:"flex",children:s}),y.jsx("span",{className:x(i.length===0&&O,i.length!==0&&i),children:t}),c==="end"&&s!==null&&y.jsx("span",{children:s})]})})},zm=({label:t=null,checked:l=!1,onChange:i,id:s,className:c="",classNameCheckbox:d="h-4 w-4",style:p={},disabled:h=!1})=>{const[b,S]=n.useState(!1);return n.useEffect(()=>{S(l)},[l]),y.jsxs("div",{className:"flex items-center",style:p,"data-testid":`container-check-${s}`,children:[y.jsx("input",{checked:b,id:`${t}-${s}`,value:s,"aria-describedby":"comments-description",type:"checkbox",onChange:i,className:x("cursor-pointer rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",d!==""&&d),"data-testid":`checkbox-${s}`,disabled:h}),t!==null?y.jsx("label",{htmlFor:`${t}-${s}`,className:`ml-2.5 font-normal cursor-pointer ${c}`,id:`label-${s}`,"data-testid":"label",children:t}):null]})};function Wm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Hm=a.forwardRef(Wm);function Um({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const Vm=a.forwardRef(Um);function Zm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const Ym=a.forwardRef(Zm);function Gm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 qm=a.forwardRef(Gm);function Km({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 Xm=a.forwardRef(Km);function zl({children:t,className:l="sm:max-w-sm w-11/12 sm:my-8",classNameContainer:i="",isOpen:s=!1,setIsOpen:c,showIconSuccess:d=!0,showButton:p=!0,style:h={}}){return y.jsx(kn,{show:s,as:n.Fragment,children:y.jsxs(Ol,{as:"div",className:"relative z-50 relative",onClose:c,"data-testid":"modal",children:[y.jsx(kn.Child,{as:n.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-5",leave:"ease-in duration-200",leaveFrom:"opacity-5",leaveTo:"opacity-0",children:y.jsx("div",{className:"fixed inset-0 bg-opacity-40 bg-gray-900 transition-opacity","data-testid":"window-close",onClick:()=>c(!1)})}),y.jsx("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:y.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:y.jsx(kn.Child,{as:n.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:y.jsxs(Ol.Panel,{className:x("relative transform rounded-lg bg-white px-4 pb-3 pt-5 text-left transition-all sm:w-full sm:pt-3 sm:px-3",l!==""&&l),style:h,children:[d&&y.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100",children:y.jsx(Hm,{className:"h-6 w-6 text-green-600","aria-hidden":"true"})}),y.jsx("div",{className:x(i!==""&&i),"data-testid":"content",children:t}),p&&y.jsx("div",{className:"mt-5 sm:mt-6",children:y.jsx(xr,{id:"close-modal",onClick:()=>c(!1),children:"Cerrar"})}),y.jsx("button",{className:"opacity-0 absolute"})]})})})})]})})}const Jm=({isOpenModalConfirmation:t,setIsOpenModalConfirmation:l,close:i,title:s="¿Estás seguro de abandonar la creación de la acción?",description:c="La información se perderá si no creas la acción",classNameTitle:d="",classNameDescription:p=""})=>{const h=()=>{l(!1),i()};return y.jsxs(zl,{isOpen:t,setIsOpen:()=>l(),showButton:!1,showIconSuccess:!1,children:[y.jsx("p",{className:x("text-center text-sm",d!==""&&d),children:s}),y.jsx("p",{className:x("text-center text-sm",p!==""&&p),children:c}),y.jsxs("div",{className:"flex w-full justify-center mt-5",children:[y.jsx(_l,{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:()=>l(),id:"cancel",children:"Cancelar"}),y.jsx(xr,{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:h,id:"confirmation",children:"Aceptar"})]})]})},Qm=({className:t="",style:l={}})=>y.jsx("div",{className:x("w-px",t!==""&&t),style:l}),e0=({onClick:t,id:l="",className:i=""})=>y.jsxs("div",{className:x("flex items-center text-default-5",i!==""&&i),"data-testid":l,children:[y.jsx(Nm,{className:"w-3 h-3 3xs:w-4 3xs:h-4 stroke-current cursor-pointer","data-testid":"chevron-left-icon",onClick:t}),y.jsx("span",{onClick:t,className:"text-sm cursor-pointer","data-testid":"go-back",children:"Volver"})]}),li=({className:t="",classNameContainer:l="",children:i,message:s="",style:c={}})=>{const[d,p]=n.useState(!1),[h,b]=n.useState({top:0,left:0}),S=n.useRef(null),N=()=>{if(s==="")return;const O=S.current.getBoundingClientRect();b({top:O.bottom+window.scrollY,left:O.left+window.scrollX}),p(!0)},I=()=>{p(!1)},A=y.jsx(kn,{as:n.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:d,children:y.jsx("div",{className:x("absolute z-40 px-4 mt-0 sm:px-0",t!==""&&t),style:{top:h.top,left:h.left,position:"absolute"},children:y.jsx("div",{className:"bg-white p-2 text-center rounded-lg shadow-lg ring-1 ring-black ring-opacity-5",onMouseEnter:N,onMouseLeave:I,"data-testid":"message",children:s})})});return y.jsxs(y.Fragment,{children:[y.jsx("div",{ref:S,className:x("inline-block",l!==""&&l),onMouseEnter:N,onMouseLeave:I,"data-testid":"container-tooltip",style:c,children:i}),typeof window<"u"&&u.createPortal(A,document.body)]})},si=({placeholder:t="",label:l="",htmlFor:i,type:s="text",name:c,handleChange:d,onClick:p=()=>{},value:h,isReadOnly:b=!1,isError:S=!1,helperText:N="",autocomplete:I="off",id:A,classNameLabel:O="",classNameContainerInput:D="",classNameContainer:F="",className:$="",icon:U=null,onKeyDown:W,onFocus:J,min:de,max:se,maxWidth:xe=5e3})=>{const[qe,He]=n.useState(!1),ye=wn({"ring-red-300 focus:ring-red-300 text-red-900":S||qe,"focus:ring-indigo-600 text-gray-500":!S&&!qe}),Te=Me=>{if(d&&d(Me),s!=="email")return;const{value:Be}=Me.target,ct=v(Be);He(!ct)};return y.jsxs("div",{"data-testid":`container-input-${A}`,className:F,children:[l!==""&&y.jsx("label",{htmlFor:i,className:x("block text-sm font-medium leading-6",O!==""?O:"text-gray-700"),"data-testid":`label-${A}`,children:l}),y.jsxs("div",{className:x("relative mt-1 rounded-md",D!==""&&D),children:[y.jsx(li,{className:"text-sm",classNameContainer:"w-full",message:h,children:y.jsx("input",{id:A,name:c,type:s,autoComplete:I,placeholder:t,onChange:Te,onClick:p,onKeyDown:W,onFocus:J,value:h,readOnly:b,"data-testid":`input-${A}`,min:de,className:x("block w-full rounded-md border-0 py-1.5 shadow-sm placeholder-gray-300 ring-1 ring-gray-300 ring-inset focus:ring-1 focus:ring-inset text-sm sm:leading-6 truncate",ye,$!==""&&$),style:{maxWidth:`${xe}px`}})}),U!==null&&y.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:U}),S&&U===null&&y.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:y.jsx(Dl,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),N.length===0||!S?null:y.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${A}`,children:N})]})};function yr({className:t="w-6 h-6",color:l="#3730a3"}){return y.jsxs("svg",{className:x("fill-current animate-spin",t),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[y.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:l,strokeWidth:"4",fill:"none"}),y.jsx("path",{fill:l,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 t0(){return y.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:[y.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"}),y.jsx(yr,{className:"w-8 h-8 animate-spin"})]})}const Wl=({height:t="36px",style:l={},styleMenu:i={},label:s="",onChange:c,isReadOnly:d=!1,isError:p=!1,helperText:h="",name:b,id:S,className:N="",classNameLabel:I="",classNameInput:A="",options:O,value:D=-1,defaultValue:F={value:-1,label:"",iconStart:null,iconEnd:null},defaultLabel:$="label",defaultId:U="value",bgOptionSelect:W="bg-indigo-600",isSearch:J=!1,loading:de=!1,isSingleOptionAndFirstLoad:se=!0,isTest:xe=!1})=>{const[qe,He]=n.useState(""),[ye,Te]=n.useState(F),[Me,Be]=n.useState(!1),[ct,mt]=n.useState(!0);n.useEffect(()=>{if((O==null?void 0:O.length)!==1||!ct)return;mt(!1);const[ce]=O,Ue=ce[U],ut=ce[$];Te({value:Ue,label:ut}),se&&c({target:{value:ce,checked:!1,name:b,type:void 0,id:ce[U]}})},[O,U,$,c,b,ct,se]),n.useEffect(()=>{if(D===-1||(O==null?void 0:O.length)===0)return;const ce=O==null?void 0:O.find(Ue=>Ue[U]===D);ce&&Te(ce)},[D,O,U]),n.useEffect(()=>{D==="clear"&&(ye[U]!==F[U]||ye[$]!==F[$]||xe)&&Te(F)},[F,xe,ye,D,U,$]);const K=qe===""?O:O.filter(ce=>ce[$].normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().includes(qe.toLowerCase())),dt=wn({"ring-red-300 focus:ring-red-300 text-red-900":p&&!d,"text-gray-500":!p,"focus:ring-indigo-600":!p&&!d}),ze=wn({"text-red-400":p&&!d,"text-gray-400":!p}),bt=ce=>{Te(ce),c({target:{value:ce,checked:!1,name:b,type:void 0,id:ce[U]}})};return y.jsxs(cn,{as:"div",value:ye,children:[y.jsx(cn.Label,{className:x("block text-sm font-medium leading-6 text-gray-500 mb-0.5",I!==""&&I),children:s}),y.jsxs("div",{className:x("relative",N!==""&&N),children:[y.jsx(li,{className:"text-sm",classNameContainer:"w-full",message:ye[$],children:y.jsxs(cn.Button,{className:"w-full","data-testid":`listbox-button-${S}`,children:[ye.iconStart&&y.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-2",children:ye.iconStart}),y.jsx(cn.Input,{className:x("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",!p&&!d&&"ring-inset focus:ring-inset focus:ring-2 focus:ring-indigo-600",d&&"focus:ring-gray-300",dt,A!==""&&A),onChange:ce=>He(ce.target.value.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),displayValue:ce=>{var Ue;return(Ue=ce[$])==null?void 0:Ue.trim()},autoComplete:"off",readOnly:!J||d,style:{height:t,...l},"data-testid":"input-search",onClick:()=>Be(d?!1:!Me),onBlur:()=>Be(!1)})]})}),ye.iconEnd&&y.jsx("span",{className:"absolute inset-y-0 right-4 flex items-center pr-4",children:ye.iconEnd}),!d&&y.jsx(cn.Button,{className:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",onClick:()=>Be(d?!1:!Me),"data-testid":"arrow-button",children:Me?y.jsx(vm,{className:x("h-5 w-5",ze),"aria-hidden":"true"}):y.jsx(mm,{className:x("h-5 w-5",ze),"aria-hidden":"true"})}),!d&&y.jsx(y.Fragment,{children:de?y.jsx(cn.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:y.jsx(yr,{})}):(K??[]).length>0?y.jsx(cn.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm py-0.5 overflow-x-hidden",style:i,children:K.map((ce,Ue)=>y.jsx(cn.Option,{value:ce,className:x(ce[U]===ye[U]?`${W} text-white`:"text-gray-900",`relative cursor-default select-none p-2 hover:text-white hover:${W}`),"data-testid":`select-${S}-${ce[U]}`,onClick:()=>bt(ce),children:y.jsxs("div",{className:"flex justify-between items-center",children:[y.jsxs("div",{className:"flex items-center",children:[ce.iconStart&&y.jsx("span",{className:"mr-2","aria-hidden":"true",children:ce.iconStart}),y.jsx("span",{className:"font-normal hyphens-auto break-words overflow-hidden",children:ce[$]})]}),ce.iconEnd&&y.jsx("span",{className:"ml-2","aria-hidden":"true",children:ce.iconEnd})]})},Ue))}):y.jsx(cn.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:y.jsx("p",{"data-testid":"empty-options",children:"Sin opciones"})})})]}),h.length>0&&p&&y.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${S}`,children:h})]})},n0=({placeholder:t="",label:l="",htmlFor:i,name:s,handleChange:c,onClick:d=()=>{},value:p,valueSelect:h,isReadOnly:b=!1,isError:S=!1,helperText:N="",autocomplete:I="on",id:A,classNameLabel:O="",classNameContainer:D="",className:F="",onKeyDown:$,options:U,idSelect:W,isMarginLeft:J=!0,classNameSelect:de="w-20",type:se="text"})=>{const{width:xe}=B(),qe=wn({"ring-red-300 focus:ring-red-300 text-red-900":S,"focus:ring-indigo-600 text-gray-500":!S});return y.jsxs(y.Fragment,{children:[y.jsx("style",{children:`
69
+ */(function(t){(function(){var l={}.hasOwnProperty;function i(){for(var d="",p=0;p<arguments.length;p++){var h=arguments[p];h&&(d=c(d,s(h)))}return d}function s(d){if(typeof d=="string"||typeof d=="number")return d;if(typeof d!="object")return"";if(Array.isArray(d))return i.apply(null,d);if(d.toString!==Object.prototype.toString&&!d.toString.toString().includes("[native code]"))return d.toString();var p="";for(var h in d)l.call(d,h)&&d[h]&&(p=c(p,h));return p}function c(d,p){return p?d?d+" "+p:d+p:d}t.exports?(i.default=i,t.exports=i):window.classNames=i})()})($l);var Bm=$l.exports;const wn=_(Bm),_l=({className:t="text-sm w-full rounded-md",children:l,icon:i=null,edge:s=null,disabled:c=!1,type:d="button",onClick:p,id:h})=>{const b=wn({"ml-2":s==="start"&&i!==null,"mr-2":s==="end"&&i!==null});return y.jsxs("button",{className:x("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",t),type:d,onClick:p,disabled:c,"data-testid":`button-outline-${h}`,id:`button-outline-${h}`,children:[s==="start"&&i!==null&&y.jsx("span",{children:i}),y.jsx("span",{className:x("flex",b),id:h,children:l}),s==="end"&&i!==null&&y.jsx("span",{children:i})]})},Bl=({children:t,className:l="",icon:i=null,edge:s=null,disabled:c=!1,type:d="button",onClick:p,id:h})=>{const b=wn({"ml-2":s==="start"&&i!==null,"mr-2":s==="end"&&i!==null});return y.jsxs("button",{className:`${l} flex justify-center items-center`,edge:s,type:d,onClick:p,disabled:c,"data-testid":`button-${h}`,children:[s==="start"&&i!==null&&y.jsx("span",{children:i}),y.jsx("span",{className:b,children:t}),s==="end"&&i!==null&&y.jsx("span",{children:i})]})},xr=({children:t,classNameButton:l="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:i="",icon:s=null,edge:c=null,disabled:d=!1,type:p="button",onClick:h,id:b,outline:S="0px 0px 0px 2px #6366F1, 0px 0px 0px 2px #FFF, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameContainer:N=""})=>{const[I,A]=n.useState(!1),O=wn({"ml-2":c==="start"&&s!==null,"mr-2":c==="end"&&s!==null}),D=()=>{h&&h()};return y.jsx("div",{className:x("rounded-md p-0.5",N!==""&&N),style:{boxShadow:I?S:"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:y.jsxs("button",{className:x("flex justify-center items-center text-sm leading-6 shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",d&&"text-white bg-gray-300 rounded focus:outline-none cursor-default",d?l.replace(/\bbg-\w+\b/g,""):l),type:p,onClick:D,onFocus:()=>A(!0),onBlur:()=>A(!1),disabled:d,"data-testid":`button-solid-${b}`,children:[c==="start"&&s!==null&&y.jsx("span",{className:"flex",children:s}),y.jsx("span",{className:x(i.length===0&&O,i.length!==0&&i),children:t}),c==="end"&&s!==null&&y.jsx("span",{children:s})]})})},zm=({label:t=null,checked:l=!1,onChange:i,id:s,className:c="",classNameCheckbox:d="h-4 w-4",style:p={},disabled:h=!1})=>{const[b,S]=n.useState(!1);return n.useEffect(()=>{S(l)},[l]),y.jsxs("div",{className:"flex items-center",style:p,"data-testid":`container-check-${s}`,children:[y.jsx("input",{checked:b,id:`${t}-${s}`,value:s,"aria-describedby":"comments-description",type:"checkbox",onChange:i,className:x("cursor-pointer rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",d!==""&&d),"data-testid":`checkbox-${s}`,disabled:h}),t!==null?y.jsx("label",{htmlFor:`${t}-${s}`,className:`ml-2.5 font-normal cursor-pointer ${c}`,id:`label-${s}`,"data-testid":"label",children:t}):null]})};function Wm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Hm=a.forwardRef(Wm);function Um({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const Vm=a.forwardRef(Um);function Zm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const Ym=a.forwardRef(Zm);function Gm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 qm=a.forwardRef(Gm);function Km({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 Xm=a.forwardRef(Km);function zl({children:t,className:l="sm:max-w-sm w-11/12 sm:my-8",classNameContainer:i="",isOpen:s=!1,setIsOpen:c,showIconSuccess:d=!0,showButton:p=!0,style:h={}}){return y.jsx(kn,{show:s,as:n.Fragment,children:y.jsxs(Ol,{as:"div",className:"relative z-50 relative",onClose:c,"data-testid":"modal",children:[y.jsx(kn.Child,{as:n.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-5",leave:"ease-in duration-200",leaveFrom:"opacity-5",leaveTo:"opacity-0",children:y.jsx("div",{className:"fixed inset-0 bg-opacity-40 bg-gray-900 transition-opacity","data-testid":"window-close",onClick:()=>c(!1)})}),y.jsx("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:y.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:y.jsx(kn.Child,{as:n.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:y.jsxs(Ol.Panel,{className:x("relative transform rounded-lg bg-white px-4 pb-3 pt-5 text-left transition-all sm:w-full sm:pt-3 sm:px-3",l!==""&&l),style:h,children:[d&&y.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100",children:y.jsx(Hm,{className:"h-6 w-6 text-green-600","aria-hidden":"true"})}),y.jsx("div",{className:x(i!==""&&i),"data-testid":"content",children:t}),p&&y.jsx("div",{className:"mt-5 sm:mt-6",children:y.jsx(xr,{id:"close-modal",onClick:()=>c(!1),children:"Cerrar"})}),y.jsx("button",{className:"opacity-0 absolute"})]})})})})]})})}const Jm=({isOpenModalConfirmation:t,setIsOpenModalConfirmation:l,close:i,title:s="¿Estás seguro de abandonar la creación de la acción?",description:c="La información se perderá si no creas la acción",classNameTitle:d="",classNameDescription:p=""})=>{const h=()=>{l(!1),i()};return y.jsxs(zl,{isOpen:t,setIsOpen:()=>l(),showButton:!1,showIconSuccess:!1,children:[y.jsx("p",{className:x("text-center text-sm",d!==""&&d),children:s}),y.jsx("p",{className:x("text-center text-sm",p!==""&&p),children:c}),y.jsxs("div",{className:"flex w-full justify-center mt-5",children:[y.jsx(_l,{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:()=>l(),id:"cancel",children:"Cancelar"}),y.jsx(xr,{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:h,id:"confirmation",children:"Aceptar"})]})]})},Qm=({className:t="",style:l={}})=>y.jsx("div",{className:x("w-px",t!==""&&t),style:l}),e0=({onClick:t,id:l="",className:i=""})=>y.jsxs("div",{className:x("flex items-center text-default-5",i!==""&&i),"data-testid":l,children:[y.jsx(Nm,{className:"w-3 h-3 3xs:w-4 3xs:h-4 stroke-current cursor-pointer","data-testid":"chevron-left-icon",onClick:t}),y.jsx("span",{onClick:t,className:"text-sm cursor-pointer","data-testid":"go-back",children:"Volver"})]}),li=({className:t="",classNameContainer:l="",children:i,message:s="",style:c={}})=>{const[d,p]=n.useState(!1),[h,b]=n.useState({top:0,left:0}),S=n.useRef(null),N=()=>{if(s==="")return;const O=S.current.getBoundingClientRect();b({top:O.bottom+window.scrollY,left:O.left+window.scrollX}),p(!0)},I=()=>{p(!1)},A=y.jsx(kn,{as:n.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:d,children:y.jsx("div",{className:x("absolute z-40 px-4 mt-0 sm:px-0",t!==""&&t),style:{top:h.top,left:h.left,position:"absolute"},children:y.jsx("div",{className:"bg-white p-2 text-center rounded-lg shadow-lg ring-1 ring-black ring-opacity-5",onMouseEnter:N,onMouseLeave:I,"data-testid":"message",children:s})})});return y.jsxs(y.Fragment,{children:[y.jsx("div",{ref:S,className:x("inline-block",l!==""&&l),onMouseEnter:N,onMouseLeave:I,"data-testid":"container-tooltip",style:c,children:i}),typeof window<"u"&&u.createPortal(A,document.body)]})},si=({placeholder:t="",label:l="",htmlFor:i,type:s="text",name:c,handleChange:d,onClick:p=()=>{},value:h,isReadOnly:b=!1,isError:S=!1,helperText:N="",autocomplete:I="off",id:A,classNameLabel:O="",classNameContainerInput:D="",classNameContainer:F="",className:$="",icon:U=null,onKeyDown:W,onFocus:J,min:de,max:ae,maxWidth:xe=5e3})=>{const[qe,He]=n.useState(!1),ye=wn({"ring-red-300 focus:ring-red-300 text-red-900":S||qe,"focus:ring-indigo-600 text-gray-500":!S&&!qe}),Te=Me=>{if(d&&d(Me),s!=="email")return;const{value:Be}=Me.target,ct=v(Be);He(!ct)};return y.jsxs("div",{"data-testid":`container-input-${A}`,className:F,children:[l!==""&&y.jsx("label",{htmlFor:i,className:x("block text-sm font-medium leading-6",O!==""?O:"text-gray-700"),"data-testid":`label-${A}`,children:l}),y.jsxs("div",{className:x("relative mt-1 rounded-md",D!==""&&D),children:[y.jsx(li,{className:"text-sm",classNameContainer:"w-full",message:h,children:y.jsx("input",{id:A,name:c,type:s,autoComplete:I,placeholder:t,onChange:Te,onClick:p,onKeyDown:W,onFocus:J,value:h,readOnly:b,"data-testid":`input-${A}`,min:de,className:x("block w-full rounded-md border-0 py-1.5 shadow-sm placeholder-gray-300 ring-1 ring-gray-300 ring-inset focus:ring-1 focus:ring-inset text-sm sm:leading-6 truncate",ye,$!==""&&$),style:{maxWidth:`${xe}px`}})}),U!==null&&y.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:U}),S&&U===null&&y.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:y.jsx(Dl,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),N.length===0||!S?null:y.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${A}`,children:N})]})};function yr({className:t="w-6 h-6",color:l="#3730a3"}){return y.jsxs("svg",{className:x("fill-current animate-spin",t),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[y.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:l,strokeWidth:"4",fill:"none"}),y.jsx("path",{fill:l,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 t0(){return y.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:[y.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"}),y.jsx(yr,{className:"w-8 h-8 animate-spin"})]})}const Wl=({height:t="36px",style:l={},styleMenu:i={},label:s="",onChange:c,isReadOnly:d=!1,isError:p=!1,helperText:h="",name:b,id:S,className:N="",classNameLabel:I="",classNameInput:A="",options:O,value:D=-1,defaultValue:F={value:-1,label:"",iconStart:null,iconEnd:null},defaultLabel:$="label",defaultId:U="value",bgOptionSelect:W="bg-indigo-600",isSearch:J=!1,loading:de=!1,isSingleOptionAndFirstLoad:ae=!0,isTest:xe=!1})=>{const[qe,He]=n.useState(""),[ye,Te]=n.useState(F),[Me,Be]=n.useState(!1),[ct,mt]=n.useState(!0);n.useEffect(()=>{if((O==null?void 0:O.length)!==1||!ct)return;mt(!1);const[ce]=O,Ue=ce[U],ut=ce[$];Te({value:Ue,label:ut}),ae&&c({target:{value:ce,checked:!1,name:b,type:void 0,id:ce[U]}})},[O,U,$,c,b,ct,ae]),n.useEffect(()=>{if(D===-1||(O==null?void 0:O.length)===0)return;const ce=O==null?void 0:O.find(Ue=>Ue[U]===D);ce&&Te(ce)},[D,O,U]),n.useEffect(()=>{D==="clear"&&(ye[U]!==F[U]||ye[$]!==F[$]||xe)&&Te(F)},[F,xe,ye,D,U,$]);const K=qe===""?O:O.filter(ce=>ce[$].normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().includes(qe.toLowerCase())),dt=wn({"ring-red-300 focus:ring-red-300 text-red-900":p&&!d,"text-gray-500":!p,"focus:ring-indigo-600":!p&&!d}),ze=wn({"text-red-400":p&&!d,"text-gray-400":!p}),bt=ce=>{Te(ce),c({target:{value:ce,checked:!1,name:b,type:void 0,id:ce[U]}})};return y.jsxs(cn,{as:"div",value:ye,children:[y.jsx(cn.Label,{className:x("block text-sm font-medium leading-6 text-gray-500 mb-0.5",I!==""&&I),children:s}),y.jsxs("div",{className:x("relative",N!==""&&N),children:[y.jsx(li,{className:"text-sm",classNameContainer:"w-full",message:ye[$],children:y.jsxs(cn.Button,{className:"w-full","data-testid":`listbox-button-${S}`,children:[ye.iconStart&&y.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-2",children:ye.iconStart}),y.jsx(cn.Input,{className:x("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",!p&&!d&&"ring-inset focus:ring-inset focus:ring-2 focus:ring-indigo-600",d&&"focus:ring-gray-300",dt,A!==""&&A),onChange:ce=>He(ce.target.value.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),displayValue:ce=>{var Ue;return(Ue=ce[$])==null?void 0:Ue.trim()},autoComplete:"off",readOnly:!J||d,style:{height:t,...l},"data-testid":"input-search",onClick:()=>Be(d?!1:!Me),onBlur:()=>Be(!1)})]})}),ye.iconEnd&&y.jsx("span",{className:"absolute inset-y-0 right-4 flex items-center pr-4",children:ye.iconEnd}),!d&&y.jsx(cn.Button,{className:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",onClick:()=>Be(d?!1:!Me),"data-testid":"arrow-button",children:Me?y.jsx(vm,{className:x("h-5 w-5",ze),"aria-hidden":"true"}):y.jsx(mm,{className:x("h-5 w-5",ze),"aria-hidden":"true"})}),!d&&y.jsx(y.Fragment,{children:de?y.jsx(cn.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:y.jsx(yr,{})}):(K??[]).length>0?y.jsx(cn.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm py-0.5 overflow-x-hidden",style:i,children:K.map((ce,Ue)=>y.jsx(cn.Option,{value:ce,className:x(ce[U]===ye[U]?`${W} text-white`:"text-gray-900",`relative cursor-default select-none p-2 hover:text-white hover:${W}`),"data-testid":`select-${S}-${ce[U]}`,onClick:()=>bt(ce),children:y.jsxs("div",{className:"flex justify-between items-center",children:[y.jsxs("div",{className:"flex items-center",children:[ce.iconStart&&y.jsx("span",{className:"mr-2","aria-hidden":"true",children:ce.iconStart}),y.jsx("span",{className:"font-normal hyphens-auto break-words overflow-hidden",children:ce[$]})]}),ce.iconEnd&&y.jsx("span",{className:"ml-2","aria-hidden":"true",children:ce.iconEnd})]})},Ue))}):y.jsx(cn.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:y.jsx("p",{"data-testid":"empty-options",children:"Sin opciones"})})})]}),h.length>0&&p&&y.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${S}`,children:h})]})},n0=({placeholder:t="",label:l="",htmlFor:i,name:s,handleChange:c,onClick:d=()=>{},value:p,valueSelect:h,isReadOnly:b=!1,isError:S=!1,helperText:N="",autocomplete:I="on",id:A,classNameLabel:O="",classNameContainer:D="",className:F="",onKeyDown:$,options:U,idSelect:W,isMarginLeft:J=!0,classNameSelect:de="w-20",type:ae="text"})=>{const{width:xe}=B(),qe=wn({"ring-red-300 focus:ring-red-300 text-red-900":S,"focus:ring-indigo-600 text-gray-500":!S});return y.jsxs(y.Fragment,{children:[y.jsx("style",{children:`
70
70
  input[type="number"]::-webkit-inner-spin-button,
71
71
  input[type="number"]::-webkit-outer-spin-button {
72
72
  -webkit-appearance: none;
@@ -75,7 +75,7 @@ Check the top-level render call using <`+oe+">.")}return G}}function Xl(T,G){{if
75
75
  input[type="number"] {
76
76
  -moz-appearance: textfield;
77
77
  }
78
- `}),y.jsxs("div",{"data-testid":`container-input-${A}`,className:D,children:[l!==""&&y.jsx("label",{htmlFor:i,className:x("block text-sm font-medium leading-6",O!==""?O:"text-gray-700"),"data-testid":`label-${A}`,children:l}),y.jsxs("div",{className:"relative mt-1 rounded-md shadow-sm",children:[y.jsx("div",{className:"absolute inset-y-0 -top-0.5 flex items-center",style:{left:"2px"},children:y.jsx(Wl,{name:W,onChange:He=>c(He),id:W,options:U,value:h,isReadOnly:b,className:de,height:xe<=640?"28px":"32px",classNameInput:x(J&&"ml-3.5"),style:{paddingRight:0,boxShadow:"none"},isDisabledFocus:!0})}),y.jsx("input",{id:A,name:s,type:se,autoComplete:I,placeholder:t,readOnly:b,"data-testid":`input-${A}`,onClick:d,onKeyDown:$,onChange:He=>c(He),value:p,className:x("block w-full rounded-md border-0 py-1.5 pl-24 shadow-sm placeholder-gray-300 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-1 focus:ring-inset text-sm sm:leading-6",qe,F!==""&&F)}),S&&y.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:y.jsx(Dl,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),N.length===0||!S?null:y.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${A}`,children:N})]})]})},r0=({setValuesDefault:t,status:l=!1,isReadOnly:i=!1,handleClick:s,text:c="",updateStatus:d=!1,id:p="",isHiddenText:h=!1,setForm:b,handleChange:S,textActive:N="Activo",textInactive:I="Inactivo"})=>{const[A,O]=n.useState(!1);n.useEffect(()=>{O(l),t("status",l),b(F=>({...F,status:l}))},[l,t,d,b]);const D=()=>{O(!A),t("status",!A),b(F=>({...F,status:!A})),S({target:{checked:!A,value:!A,name:"status",type:"",id:""}}),s&&s()};return y.jsxs("div",{className:"flex",children:[y.jsxs(Vp,{checked:A,onChange:D,className:x("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",A?"bg-success-1":"bg-gray-200"),"data-testid":`switch-${p}`,disabled:i,children:[y.jsx("span",{className:"sr-only",children:"Use setting"}),y.jsx("span",{"aria-hidden":"true",className:x("pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",A?"translate-x-full":"translate-x-0")})]}),c!==""?y.jsx("p",{className:x("text-sm font-medium text-gray-500 ml-2 self-end",h&&"hidden"),children:c}):y.jsx("p",{className:x("text-sm font-medium text-gray-500 ml-2 self-end",h&&"hidden"),"data-testid":"text-switch",children:A?N:I})]})};function o0({label:t="",id:l,htmlFor:i="",classNameLabel:s="",className:c="",rows:d=4,name:p,placeholder:h="",helperText:b="",isReadOnly:S=!1,isError:N=!1,onChange:I,value:A,idInput:O,nameInput:D,placeholderInput:F="",isReadOnlyInput:$=!1,valueInput:U,infoTop:W=null,infoBottom:J=null,classNameInfoTop:de="h-4",classNameInfoBottom:se="h-2",isInputTitle:xe=!1,hiddenBorder:qe=!1}){const He=wn({"ring-red-300 focus:ring-red-300 text-red-900":N,"focus:ring-indigo-600 text-gray-700":!N});return y.jsxs(y.Fragment,{children:[t!==""&&y.jsx("label",{htmlFor:i,className:x("leading-6 block text-sm",s!==""&&s),children:t}),y.jsxs("div",{className:"relative overflow-x-hidden",children:[W!==null&&y.jsx("div",{className:"absolute top-2 left-3 w-full",children:W}),y.jsxs("div",{className:x("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",He),children:[W!==null&&y.jsx("div",{className:"py-2","aria-hidden":"true",children:y.jsx("div",{className:"py-px",children:y.jsx("div",{className:de})})}),xe&&y.jsx("textarea",{name:D,id:O,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:F,value:U,onChange:I,rows:2,readOnly:$}),y.jsx("textarea",{placeholder:h,rows:d,name:p,id:l,className:x(xe||qe?"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",He,c!==""&&c),readOnly:S,onChange:I,value:A,"data-testid":`textarea-${l}`}),J!==null&&y.jsx("div",{className:"py-2","aria-hidden":"true",children:y.jsx("div",{className:"py-px",children:y.jsx("div",{className:se})})})]}),J!==null&&y.jsx("div",{className:"absolute bottom-2 left-3 w-full",children:J})]}),b.length>0&&N&&y.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${l}`,children:b})]})}const i0=({children:t,data:l,className:i="",classNameTooltip:s="w-full",classNameMenu:c="",classNameMenuItems:d="",classNameContainerSearch:p="px-5",isSelectMultiple:h=!1,optionsSelect:b,propObject:S="name",propId:N="id",textNewItem:I="",defaultId:A=null,loading:O=!1,search:D=null,searchPlaceHolder:F="Buscar...",valueSearch:$=void 0,idsOptionSelect:U=null,isComponent:W,isSticky:J=!1,hiddenMenu:de=!1,id:se,onClick:xe=()=>{},isRelative:qe=!0,isMaxWidth:He=!1,isTag:ye=!1,isClear:Te=!1,clear:Me=null,applyButton:Be=null,applyButtonText:ct="Aplicar",tagsParent:mt=[],isClearTagsParent:K=!1,isReadOnly:dt,isDisabledApplyButton:ze=!0,isOpenMenu:bt=void 0})=>{const ce=n.useRef(null),Ue=n.useRef(null),[ut,Nt]=n.useState(new Set),[Rt,wt]=n.useState(new Map),[De,Ct]=n.useState({}),[et,At]=n.useState(!1);n.useEffect(()=>{U!==null&&Nt(new Set(new Set(U)))},[U]),n.useEffect(()=>{K&&wt(new Map)},[K]),n.useEffect(()=>{if(mt.length===0)return;const fe=new Map;mt.forEach(Ve=>fe.set(Ve.id,Ve)),wt(fe)},[mt]),n.useEffect(()=>{Te&&(Nt(new Set),wt(new Map),Me&&Me())},[Me,Te]),n.useEffect(()=>{const fe=()=>{if(!Ue.current)return;const Ve=Ue.current.getBoundingClientRect();Ct({position:"absolute",top:Ve.bottom+window.scrollY,left:Ve.left+window.scrollX,zIndex:10,width:Ve.width})};return fe(),window.addEventListener("scroll",fe,!0),window.addEventListener("resize",fe),()=>{window.removeEventListener("scroll",fe,!0),window.removeEventListener("resize",fe)}},[et]),n.useEffect(()=>{const fe=()=>{document.body.dispatchEvent(new MouseEvent("click",{bubbles:!0}))};return window.addEventListener("scroll",fe,!0),()=>window.removeEventListener("scroll",fe,!0)},[]);const le=fe=>{let Ve=new Map(Rt),Ot=new Set(ut),En=null;if(A!==null&&(fe[N]===A&&(En=crypto.randomUUID()),En!==null&&(fe[N]=En),En!==null&&(fe[S]=fe[S].replace(I,"").trim())),Ot.has(fe[N])?Ot.delete(fe[N]):Ot.add(fe[N]),Ve.has(fe[N])?Ve.delete(fe[N]):Ve.set(fe[N],fe),!h){const wr=Array.from(Ot),In=Array.from(Ve);wr.shift(),In.shift(),Ot=Ot.size===2?new Set(wr):Ot,Ve=Ve.size===2?new Map(In):Ve}b(fe,Array.from(Ot),En!==null),Nt(Ot),wt(Ve)},Ne=fe=>{xe(fe===!0?-1:se),At(!et)},nt=fe=>{const Ve=new Set(ut),Ot=new Map(Rt);Ve.delete(fe[N]),Ot.delete(fe[N]),b(fe,Array.from(Ve)),Nt(Ve),wt(Ot)},zt=()=>{if(ut.size===0)return;const fe=new Set(ut),Ve=new Map(Rt);fe.clear(),Ve.clear(),b(null,Array.from(fe)),Nt(fe),wt(Ve)};function An(fe){if(typeof fe!="string")return fe;const Ve=fe.toLowerCase();return Ve.charAt(0).toUpperCase()+Ve.slice(1)}return y.jsxs(Kr,{as:"div",className:x("inline-block text-left",qe&&"relative",c!==""&&c),onClick:()=>Ne(!0),"data-testid":`menu-${se}`,id:se,ref:ce,children:[y.jsx("style",{children:`
78
+ `}),y.jsxs("div",{"data-testid":`container-input-${A}`,className:D,children:[l!==""&&y.jsx("label",{htmlFor:i,className:x("block text-sm font-medium leading-6",O!==""?O:"text-gray-700"),"data-testid":`label-${A}`,children:l}),y.jsxs("div",{className:"relative mt-1 rounded-md shadow-sm",children:[y.jsx("div",{className:"absolute inset-y-0 -top-0.5 flex items-center",style:{left:"2px"},children:y.jsx(Wl,{name:W,onChange:He=>c(He),id:W,options:U,value:h,isReadOnly:b,className:de,height:xe<=640?"28px":"32px",classNameInput:x(J&&"ml-3.5"),style:{paddingRight:0,boxShadow:"none"},isDisabledFocus:!0})}),y.jsx("input",{id:A,name:s,type:ae,autoComplete:I,placeholder:t,readOnly:b,"data-testid":`input-${A}`,onClick:d,onKeyDown:$,onChange:He=>c(He),value:p,className:x("block w-full rounded-md border-0 py-1.5 pl-24 shadow-sm placeholder-gray-300 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-1 focus:ring-inset text-sm sm:leading-6",qe,F!==""&&F)}),S&&y.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:y.jsx(Dl,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),N.length===0||!S?null:y.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${A}`,children:N})]})]})},r0=({setValuesDefault:t,status:l=!1,isReadOnly:i=!1,handleClick:s,text:c="",updateStatus:d=!1,id:p="",isHiddenText:h=!1,setForm:b,handleChange:S,textActive:N="Activo",textInactive:I="Inactivo"})=>{const[A,O]=n.useState(!1);n.useEffect(()=>{O(l),t("status",l),b(F=>({...F,status:l}))},[l,t,d,b]);const D=()=>{O(!A),t("status",!A),b(F=>({...F,status:!A})),S({target:{checked:!A,value:!A,name:"status",type:"",id:""}}),s&&s()};return y.jsxs("div",{className:"flex",children:[y.jsxs(Vp,{checked:A,onChange:D,className:x("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",A?"bg-success-1":"bg-gray-200"),"data-testid":`switch-${p}`,disabled:i,children:[y.jsx("span",{className:"sr-only",children:"Use setting"}),y.jsx("span",{"aria-hidden":"true",className:x("pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",A?"translate-x-full":"translate-x-0")})]}),c!==""?y.jsx("p",{className:x("text-sm font-medium text-gray-500 ml-2 self-end",h&&"hidden"),children:c}):y.jsx("p",{className:x("text-sm font-medium text-gray-500 ml-2 self-end",h&&"hidden"),"data-testid":"text-switch",children:A?N:I})]})};function o0({label:t="",id:l,htmlFor:i="",classNameLabel:s="",className:c="",rows:d=4,name:p,placeholder:h="",helperText:b="",isReadOnly:S=!1,isError:N=!1,onChange:I,value:A,idInput:O,nameInput:D,placeholderInput:F="",isReadOnlyInput:$=!1,valueInput:U,infoTop:W=null,infoBottom:J=null,classNameInfoTop:de="h-4",classNameInfoBottom:ae="h-2",isInputTitle:xe=!1,hiddenBorder:qe=!1}){const He=wn({"ring-red-300 focus:ring-red-300 text-red-900":N,"focus:ring-indigo-600 text-gray-700":!N});return y.jsxs(y.Fragment,{children:[t!==""&&y.jsx("label",{htmlFor:i,className:x("leading-6 block text-sm",s!==""&&s),children:t}),y.jsxs("div",{className:"relative overflow-x-hidden",children:[W!==null&&y.jsx("div",{className:"absolute top-2 left-3 w-full",children:W}),y.jsxs("div",{className:x("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",He),children:[W!==null&&y.jsx("div",{className:"py-2","aria-hidden":"true",children:y.jsx("div",{className:"py-px",children:y.jsx("div",{className:de})})}),xe&&y.jsx("textarea",{name:D,id:O,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:F,value:U,onChange:I,rows:2,readOnly:$}),y.jsx("textarea",{placeholder:h,rows:d,name:p,id:l,className:x(xe||qe?"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",He,c!==""&&c),readOnly:S,onChange:I,value:A,"data-testid":`textarea-${l}`}),J!==null&&y.jsx("div",{className:"py-2","aria-hidden":"true",children:y.jsx("div",{className:"py-px",children:y.jsx("div",{className:ae})})})]}),J!==null&&y.jsx("div",{className:"absolute bottom-2 left-3 w-full",children:J})]}),b.length>0&&N&&y.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${l}`,children:b})]})}const i0=({children:t,data:l,className:i="",classNameTooltip:s="w-full",classNameMenu:c="",classNameMenuItems:d="",classNameContainerSearch:p="px-5",isSelectMultiple:h=!1,optionsSelect:b,propObject:S="name",propId:N="id",textNewItem:I="",defaultId:A=null,loading:O=!1,search:D=null,searchPlaceHolder:F="Buscar...",valueSearch:$=void 0,idsOptionSelect:U=null,isComponent:W,isSticky:J=!1,hiddenMenu:de=!1,id:ae,onClick:xe=()=>{},isRelative:qe=!0,isMaxWidth:He=!1,isTag:ye=!1,isClear:Te=!1,clear:Me=null,applyButton:Be=null,applyButtonText:ct="Aplicar",tagsParent:mt=[],isClearTagsParent:K=!1,isReadOnly:dt,isDisabledApplyButton:ze=!0,isOpenMenu:bt=void 0})=>{const ce=n.useRef(null),Ue=n.useRef(null),[ut,Nt]=n.useState(new Set),[Rt,wt]=n.useState(new Map),[De,Ct]=n.useState({}),[et,At]=n.useState(!1);n.useEffect(()=>{U!==null&&Nt(new Set(new Set(U)))},[U]),n.useEffect(()=>{K&&wt(new Map)},[K]),n.useEffect(()=>{if(mt.length===0)return;const fe=new Map;mt.forEach(Ve=>fe.set(Ve.id,Ve)),wt(fe)},[mt]),n.useEffect(()=>{Te&&(Nt(new Set),wt(new Map),Me&&Me())},[Me,Te]),n.useEffect(()=>{const fe=()=>{if(!Ue.current)return;const Ve=Ue.current.getBoundingClientRect();Ct({position:"absolute",top:Ve.bottom+window.scrollY,left:Ve.left+window.scrollX,zIndex:10,width:Ve.width})};return fe(),window.addEventListener("scroll",fe,!0),window.addEventListener("resize",fe),()=>{window.removeEventListener("scroll",fe,!0),window.removeEventListener("resize",fe)}},[et]),n.useEffect(()=>{const fe=()=>{document.body.dispatchEvent(new MouseEvent("click",{bubbles:!0}))};return window.addEventListener("scroll",fe,!0),()=>window.removeEventListener("scroll",fe,!0)},[]);const le=fe=>{let Ve=new Map(Rt),Ot=new Set(ut),En=null;if(A!==null&&(fe[N]===A&&(En=crypto.randomUUID()),En!==null&&(fe[N]=En),En!==null&&(fe[S]=fe[S].replace(I,"").trim())),Ot.has(fe[N])?Ot.delete(fe[N]):Ot.add(fe[N]),Ve.has(fe[N])?Ve.delete(fe[N]):Ve.set(fe[N],fe),!h){const wr=Array.from(Ot),In=Array.from(Ve);wr.shift(),In.shift(),Ot=Ot.size===2?new Set(wr):Ot,Ve=Ve.size===2?new Map(In):Ve}b(fe,Array.from(Ot),En!==null),Nt(Ot),wt(Ve)},Ne=fe=>{xe(fe===!0?-1:ae),At(!et)},nt=fe=>{const Ve=new Set(ut),Ot=new Map(Rt);Ve.delete(fe[N]),Ot.delete(fe[N]),b(fe,Array.from(Ve)),Nt(Ve),wt(Ot)},zt=()=>{if(ut.size===0)return;const fe=new Set(ut),Ve=new Map(Rt);fe.clear(),Ve.clear(),b(null,Array.from(fe)),Nt(fe),wt(Ve)};function An(fe){if(typeof fe!="string")return fe;const Ve=fe.toLowerCase();return Ve.charAt(0).toUpperCase()+Ve.slice(1)}return y.jsxs(Kr,{as:"div",className:x("inline-block text-left",qe&&"relative",c!==""&&c),onClick:()=>Ne(!0),"data-testid":`menu-${ae}`,id:ae,ref:ce,children:[y.jsx("style",{children:`
79
79
  .blue {
80
80
  background-color: #3758F9;
81
81
  }
@@ -92,7 +92,7 @@ Check the top-level render call using <`+oe+">.")}return G}}function Xl(T,G){{if
92
92
  width: 414px;
93
93
  }
94
94
  }
95
- `}),y.jsx(Kr.Button,{as:"div",onClick:()=>Ne(de),"data-testid":`menu-button-${se}`,ref:Ue,children:t}),u.createPortal(y.jsx("div",{style:De,className:x(s,de&&"hidden",O&&"w-full"),children:y.jsx(kn,{as:n.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:bt,children:y.jsx(Kr.Items,{className:x("mt-1 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",O?"w-full":d===""&&"w-max",d!==""&&d),children:O?y.jsx("div",{className:"flex justify-center py-4",children:y.jsx(yr,{})}):y.jsxs("div",{className:x(!W&&"pb-1",i!==""&&i,He&&"w-custom"),"data-testid":"dropdown-menu",children:[y.jsxs("div",{className:"sticky top-0 bg-white w-full",children:[D!==null&&y.jsx("div",{className:x("py-2 w-full",p),children:y.jsx(si,{htmlFor:"search",id:`dropdown-search-${se}`,name:"search",type:"text",placeholder:F,handleChange:fe=>D(fe,se),icon:F!==""&&y.jsx(km,{className:"w-4 h-4 text-indigo-300"}),className:"pl-5 pr-4 h-8",classNameContainerInput:"w-full",value:$,onKeyDown:fe=>fe.key===" "&&fe.stopPropagation(),autocomplete:"off"})}),Be!==null&&y.jsxs("div",{className:x("pt-1.5 justify-end flex items-center",p),children:[y.jsx(xr,{classNameButton:x("bg-gray-400 hover:bg-gray-400 font-medium px-2 py-1.5 rounded-md",ut.size>0?"opacity-1 cursor-pointer":"opacity-0 cursor-default"),outline:"",classNameText:"text-xs text-white text-center",id:"delete",onClick:zt,children:"Descartar"}),y.jsx(xr,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 font-medium px-2 py-1.5 rounded-md",outline:ut.size===0&&ze?"":"0px 0px 0px 2px #3758F9, 0px 0px 0px 2px #243BBD, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameText:"text-xs text-white text-center",id:"apply",disabled:ut.size===0&&ze,onClick:()=>Be({id:se,items:Array.from(Rt.values())}),children:ct})]})]}),ye&&!dt&&y.jsx("div",{className:"flex flex-wrap ml-7 pt-1",children:Array.from(Rt).map((fe,Ve)=>y.jsx("div",{className:"mr-1",children:y.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:[fe[1][S],y.jsx("button",{type:"button",className:"p-0.5 rounded-sm bg-gray-100 hover:bg-gray-300",onClick:()=>nt(fe[1]),"data-testid":`tag-${fe[0]}`,children:y.jsx(Dm,{className:"h-2.5 w-2.5 stroke-gray-700/50 group-hover:stroke-gray-700/75"})})]})},fe))}),y.jsx("div",{className:"divide-y divide-gray-100",children:(dt?[]:l).map((fe,Ve)=>y.jsx("div",{className:x(!W&&"py-1",J&&Ve===0&&"sticky top-0"),children:W?y.jsx("div",{onClick:Ot=>{Ot.preventDefault(),b()},"data-testid":`item-component-${Ve}`,children:fe}):y.jsx(Kr.Item,{children:y.jsx("span",{className:x(ut.has(fe[N])&&"blue text-white",!ut.has(fe[N])&&"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-${Ve}`,onClick:Ot=>{Ot.preventDefault(),le(fe)},children:An(fe[S])})})},Ve))})]})})})}),document.body)]})},Hl=50,l0=({total:t,handleNext:l,handlePrev:i,handleSelectPage:s,page:c=null})=>{const[d,p]=n.useState(1),[h,b]=n.useState([]),[S,N]=n.useState([]),I=Math.ceil(t/Hl);n.useEffect(()=>{const F=[];for(let $=1;$<=I;$++)F.push($);N(F)},[I]),n.useEffect(()=>{let F=[];const $="...",U="... ",W=" ...";if(S.length<6)F=S;else if(d>=1&&d<=3)F=[1,2,3,4,$,S.length];else if(d===4)F=[...S.slice(0,5),$,S.length];else if(d>4&&d<S.length-2){const J=S.slice(d-2,d),de=S.slice(d,d+1);F=[1,U,...J,...de,W,S.length]}else if(d>S.length-3){const J=S.slice(S.length-4);F=[1,U,...J]}b(F)},[d,S]),n.useEffect(()=>{c!==null&&c!==d&&p(c)},[c,d]);const A=F=>{p(F),s(F)},O=()=>{p(d===1?d:d-1),d>1&&i(d-1)},D=()=>{d===S.length?p(d):p(d+1),d<S.length&&l(d+1)};return y.jsxs("nav",{className:"flex items-center justify-between border-t border-gray-200 px-4 sm:px-0",children:[y.jsx("div",{className:"-mt-px flex w-0 flex-1",children:y.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:O,"data-testid":"prev",children:[y.jsx(am,{className:"mr-3 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Anterior"]})}),y.jsx("div",{className:"hidden md:-mt-px md:flex",children:h.map((F,$)=>y.jsx(Bl,{className:x("inline-flex items-center border-t-2 px-4 pt-4 text-sm font-medium",d===F?"border-indigo-500 text-indigo-600":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700"),"aria-current":"page",onClick:()=>F!=="..."&&F!==" ..."&&F!=="... "&&A(F),id:`page-${$+1}`,children:F},$))}),y.jsx("div",{className:"-mt-px flex w-0 flex-1 justify-end",children:y.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:D,"data-testid":"next",children:["Siguiente",y.jsx(cm,{className:"ml-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]})})]})},s0=({setForm:t,setValuesDefault:l,className:i="",classNameContainer:s="",classNameContainerImg:c="",src:d=null,alt:p=null,width:h,height:b})=>{const S=N=>{const{files:I}=N.target,[A]=I,O=new FileReader;O.readAsDataURL(A),O.onload=function(){t(D=>({...D,photo:O.result})),l("photo",O.result)}};return y.jsxs("div",{className:x("col-span-full",s!==""&&s),children:[y.jsx("label",{htmlFor:"cover-photo",className:"block text-sm font-medium leading-6 text-gray-500",children:"Logo (Opcional)"}),y.jsxs("div",{className:x("mt-2 flex justify-center rounded-lg border-2 border-dotted border-gray-300 cursor-pointer relative",d===null&&"px-9 pt-6 pb-2.5",c!==""&&c),children:[d?y.jsx("img",{src:d,alt:p,width:h,height:b,className:x(i!==""&&i),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s",objectFit:"contain",height:b},onLoad:N=>N.currentTarget.style.filter="none","data-testid":"img"}):y.jsxs("div",{className:"text-center",children:[y.jsx(Fm,{"aria-hidden":"true",className:"mx-auto h-12 w-12 text-gray-300"}),y.jsxs("div",{className:"mt-4 flex text-sm leading-6 text-gray-600",children:[y.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:y.jsx("span",{children:"Upload a file"})}),y.jsx("p",{className:"pl-1",children:"or drag and drop"})]}),y.jsx("p",{className:"text-xs leading-5 text-gray-600",children:"PNG, JPG, GIF up to 10MB"})]}),y.jsx("input",{id:"file-upload",name:"file-upload",type:"file",className:"absolute w-full h-full opacity-0 cursor-pointer",onChange:S})]})]})},a0=({children:t,openDefault:l=!1,setForm:i,setValuesDefault:s,title:c,type:d,data:p,setData:h,id:b,defaultData:S,dispatch:N,isAdd:I=!0,search:A=null,isPadding:O=!0,isReadOnly:D=!1,isEdit:F=!1,deleteItem:$=null,validateAdd:U=null,loading:W=!1,internalEdit:J=!0,isDataEmpty:de=!0,typeProp:se="value",setAdd:xe=null,hasNoRecords:qe=!0,tabs:He=null,selectTab:ye=null})=>{const[Te,Me]=n.useState(!1),[Be,ct]=n.useState(!1),[,mt]=n.useState(!1),[K,dt]=n.useState(""),[ze,bt]=n.useState(1);n.useEffect(()=>{Me(l),mt(D)},[l,D]);const ce=({e:De,index:Ct})=>{const et=m(p),{name:At,value:le}=De.target;!(U!==null&&U({value:le,copyData:et,index:Ct}))&&(et[Ct][At]=le),h(et),s(b,et),i(Ne=>({...Ne,[b]:et}))},Ue=()=>{if(p.some(De=>Object.values(De).some(Ct=>Ct[se]===-1))||p.length===0)return N({type:"ALERT",payload:{title:"",message:"Todos los campos son requeridos",typeAlert:"warning",active:!0}});i(De=>({...De,data:p})),s(b,p),h([...p,S]),xe&&xe([...p,S])},ut=({index:De,item:Ct})=>{if(p.length===1&&!F)return;const et=m(p);et.splice(De,1),i(At=>({...At,data:et})),s(b,et),h(et),$&&$({index:De,item:Ct,data:et}),De===p.length-1&&F&&et.length===0&&(i(At=>({...At,data:et})),s(b,et),h([...et,S]))},Nt=()=>{ct(!Be),mt(!1)},Rt=()=>{if(p.length>1)return;if(p.length===0)return!0;const[De]=p,{rol:Ct,privileges:et,limitedPrivileges:At,...le}=De;return Object.values(le).every(Ne=>Object.values(Ne)[0]===-1)},wt=({tab:De})=>{bt(De.id),ye&&ye({tab:De})};return y.jsxs("div",{className:"divide-y divide-gray-200 rounded-lg bg-white shadow mt-7",children:[y.jsxs("div",{className:"px-4 py-3.5 sm:px-6 flex justify-between items-center cursor-pointer",onClick:()=>Me(!Te),"data-testid":`open-accordion-${b}`,children:[y.jsx("p",{className:"text-gray-500 uppercase text-xs font-bold",children:c}),y.jsxs("div",{className:"flex items-center",children:[A&&y.jsx(si,{htmlFor:"search",id:"search",name:"search",type:"text",autoComplete:"search",placeholder:"Buscar...",handleChange:De=>{A(De),dt(De.target.value)},icon:y.jsx(qm,{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:K,onClick:De=>De.stopPropagation(),onFocus:()=>Me(!0)}),Te?y.jsx(Ym,{className:"w-5 h-5 text-default-5"}):y.jsx(Vm,{className:"w-5 h-5 text-default-5"})]})]}),y.jsx(kn,{as:n.Fragment,show:Te,enter:"transition duration-[400ms]",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-200 transition ease-in-out",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:y.jsxs("div",{children:[He&&y.jsx("nav",{className:"flex justify-center border-b border-gray-200","aria-label":"Tabs",children:He.map(De=>y.jsx("span",{className:x(ze===De.id?"border-indigo-500 text-gray-900":"border-gray-300 text-gray-500 hover:border-indigo-500","whitespace-nowrap border-b-2 py-2.5 px-2 text-sm font-medium cursor-pointer"),"aria-current":ze===De.id?"page":void 0,onClick:()=>wt({tab:De}),"data-testid":`tab-${De.id}`,children:De.name},De.name))}),y.jsxs("div",{className:x("sm:mt-2.5 py-3.5 relative",O&&He===null&&"px-4 sm:p-6",O&&He!==null&&"px-4 sm:px-6 sm:pb-6 sm:pt-2.5"),children:[J&&!Be&&y.jsx(Mm,{className:"w-5 h-5 text-gray-400 cursor-pointer absolute right-4",onClick:Nt,"data-testid":`edit-role-${b}`}),W&&y.jsx("div",{className:"flex justify-center mt-5",children:y.jsx(yr,{})}),de&&Rt()&&qe&&!W&&(J?!Be:!F)&&y.jsx("p",{className:"text-gray-800 text-center","data-testid":"records-empty",children:"No hay registros para mostrar"}),!W&&p.map((De,Ct)=>y.jsxs("div",{className:x("flex flex-col 3xs:flex-row mb-4",O&&"ml-0 3xs:ml-3"),children:[typeof t=="function"?t({item:De,index:Ct,handleChange:ce,isEdit:J?Be:F}):t,I&&(J?Be:F)&&y.jsx("div",{style:{backgroundColor:"#B0B8BF",width:"25px",height:"25px"},className:x("rounded-full flex justify-center items-center mt-4 3xs:mt-7 ml-2 3xs:ml-5 self-start 3xs:self-center",p.length===1&&!F&&"opacity-0"),children:y.jsx(Xm,{className:x("w-6 h-4",(p.length>1||F)&&"cursor-pointer"),style:{color:"#637381"},strokeWidth:2.5,onClick:()=>ut({index:Ct,item:De}),"data-testid":`delete-item-${Ct}-${b}`})})]},Ct)),I&&(J?Be:F)&&!W&&y.jsx("p",{className:"text-secondary-2 text-sm font-medium ml-3 cursor-pointer",onClick:Ue,"data-testid":`add-item-${b}`,style:{width:"fit-content"},children:`+ Añadir ${d}`})]})]})})]})},u0=({src:t,alt:l,width:i,height:s,className:c="",priority:d=!1,style:p={},id:h=""})=>{const[b,S]=n.useState(!1),N={filter:b?"none":"blur(10px)",transition:"filter 0.3s ease-out",objectFit:"cover",...i?{width:i}:{},...s?{height:s}:{},...p};return y.jsx("img",{src:t,alt:l,...i?{width:i}:{},...s?{height:s}:{},className:x(c!==""&&c),loading:d?"eager":"lazy",decoding:"async",style:N,onLoad:()=>S(!0),"data-testid":`image-${h}`})};r.Accordion=a0,r.Alert=jm,r.Avatar=$m,r.Bullets=_m,r.ButtonOutline=_l,r.ButtonPagination=Bl,r.ButtonSolid=xr,r.Checkbox=zm,r.ConfirmationAbandoningCreation=Jm,r.CoverPhoto=s0,r.Divider=Qm,r.Dropdown=i0,r.GoBack=e0,r.Image=u0,r.Input=si,r.InputDropdown=n0,r.MESSAGE_ABORT_CONTROLLER=P,r.MESSAGE_SIGNAL_ABORTED_WITHOUT_REASON=C,r.Modal=zl,r.Pagination=l0,r.Select=Wl,r.Spinner=t0,r.SpinnerIcon=yr,r.Switch=r0,r.Textarea=o0,r.Tooltip=li,r.classNames=x,r.copyOptions=m,r.generateAvatarInitials=E,r.isPromise=k,r.rowsPerPage=Hl,r.useCloseModal=M,r.useForm=R,r.useMediaQuery=L,r.useWindowDimensions=B,r.validateEmail=v,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})})})(Fo,Fo.exports);var ln=Fo.exports;const Ro=({className:e="",classNameContainer:o="",children:r,message:n="",style:u={}})=>{const[f,a]=g.useState(!1),[m,v]=g.useState({top:0,left:0}),x=g.useRef(null),E=()=>{if(n==="")return;const C=x.current.getBoundingClientRect();v({top:C.bottom+window.scrollY,left:C.left+window.scrollX}),a(!0)},k=()=>{a(!1)},P=w.jsx(vn,{as:g.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:f,children:w.jsx("div",{className:ln.classNames("absolute z-40 px-4 mt-0 sm:px-0",e!==""&&e),style:{top:m.top,left:m.left,position:"absolute"},children:w.jsx("div",{className:"bg-white p-2 text-center rounded-lg shadow-lg ring-1 ring-black ring-opacity-5",onMouseEnter:E,onMouseLeave:k,"data-testid":"message",children:typeof n=="object"?"":n})})});return w.jsxs(w.Fragment,{children:[w.jsx("div",{ref:x,className:ln.classNames("inline-block",o!==""&&o),onMouseEnter:E,onMouseLeave:k,"data-testid":"container-tooltip",style:u,children:r}),typeof window<"u"&&Sr.createPortal(P,document.body)]})},Lo=({placeholder:e="",label:o="",htmlFor:r,type:n="text",name:u,handleChange:f,onClick:a=()=>{},value:m,isReadOnly:v=!1,isError:x=!1,helperText:E="",autocomplete:k="off",id:P,classNameLabel:C="",classNameContainerInput:M="",classNameContainer:R="",className:L="",icon:B=null,onKeyDown:_,onFocus:z,min:X,max:ee,maxWidth:ue=5e3})=>{const[we,Oe]=g.useState(!1),be=Zt({"ring-red-300 focus:ring-red-300 text-red-900":x||we,"focus:ring-primary-7 text-gray-500":!x&&!we}),y=he=>{if(f&&f(he),n!=="email")return;const{value:Pe}=he.target,Ze=pi(Pe);Oe(!Ze)};return w.jsxs("div",{"data-testid":`container-input-${P}`,className:R,children:[o!==""&&w.jsx("label",{htmlFor:r,className:ae("block text-sm font-medium leading-6",!C.includes("mb-")&&"mb-0.5",C!==""?C:"text-gray-700"),"data-testid":`label-${P}`,children:o}),w.jsxs("div",{className:ae("relative rounded-md",M!==""&&M),children:[w.jsx(Ro,{className:"text-sm",classNameContainer:"w-full",message:n==="password"?"":m,children:w.jsx("input",{id:P,name:u,type:n,autoComplete:k,placeholder:e,onChange:y,onClick:a,onKeyDown:_,onFocus:z,value:m,readOnly:v,"data-testid":`input-${P}`,min:X,className:ae("block w-full rounded-md border-0 py-1.5 shadow-sm placeholder-gray-300 ring-1 ring-gray-300 ring-inset focus:ring-1 focus:ring-inset text-sm sm:leading-6 truncate",be,L!==""&&L),style:{maxWidth:`${ue}px`}})}),B!==null&&w.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:B}),x&&B===null&&w.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:w.jsx(il,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),E.length===0||!x?null:w.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${P}`,children:E})]})};function Qn({className:e="w-6 h-6"}){return w.jsxs("svg",{className:ae("fill-current animate-spin",e),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[w.jsx("circle",{className:"opacity-25 stroke-current text-primary-9",cx:"12",cy:"12",r:"10",strokeWidth:"4",fill:"none"}),w.jsx("path",{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 pd(){return w.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:[w.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"}),w.jsx(Qn,{className:"w-8 h-8 animate-spin text-primary-9"})]})}const cl=({height:e="36px",style:o={},styleMenu:r={},label:n="",onChange:u,isReadOnly:f=!1,isError:a=!1,helperText:m="",name:v,id:x,className:E="",classNameLabel:k="",classNameInput:P="",options:C,value:M=-1,defaultValue:R={value:-1,label:"",iconStart:null,iconEnd:null},defaultLabel:L="label",defaultId:B="value",bgOptionSelect:_="bg-primary-7",isSearch:z=!1,loading:X=!1,isSingleOptionAndFirstLoad:ee=!0,isTest:ue=!1})=>{const we=g.useRef(!0),[Oe,be]=g.useState(""),[y,he]=g.useState(R),[Pe,Ze]=g.useState(!1);g.useEffect(()=>{if((C==null?void 0:C.length)!==1||!we.current)return;we.current=!1;const[q]=C,te=q[B],ve=q[L];he({value:te,label:ve}),ee&&u({target:{value:q,checked:!1,name:v,type:void 0,id:q[B]}})},[C,B,L,u,v,ee]),g.useEffect(()=>{if(M===-1||(C==null?void 0:C.length)===0)return;const q=C==null?void 0:C.find(te=>te[B]===M);q&&he(q)},[M,C,B]),g.useEffect(()=>{M==="clear"&&(y[B]!==R[B]||y[L]!==R[L]||ue)&&he(R)},[R,ue,y,M,B,L]);const Ye=Oe===""?C:C.filter(q=>q[L].normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().includes(Oe.toLowerCase())),Y=Zt({"ring-red-300 focus:ring-red-300 text-red-900":a&&!f,"text-gray-500":!a,"focus:ring-primary-7":!a&&!f}),Je=Zt({"text-red-400":a&&!f,"text-gray-400":!a}),Re=q=>{he(q),u({target:{value:q,checked:!1,name:v,type:void 0,id:q[B]}})};return w.jsxs(on,{as:"div",value:y,children:[w.jsx(on.Label,{className:ae("block text-sm font-medium leading-6 text-gray-500 mb-0.5",k!==""&&k),children:n}),w.jsxs("div",{className:ae("relative",E!==""&&E),children:[w.jsx(Ro,{className:"text-sm",classNameContainer:"w-full",message:y[L],children:w.jsxs(on.Button,{className:"w-full","data-testid":`listbox-button-${x}`,children:[y.iconStart&&w.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-2",children:y.iconStart}),w.jsx(on.Input,{className:ae("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",!a&&!f&&"ring-inset focus:ring-inset focus:ring-2 focus:ring-primary-7",f&&"focus:ring-gray-300",Y,P!==""&&P),onChange:q=>be(q.target.value.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),displayValue:q=>{var te;return(te=q[L])==null?void 0:te.trim()},autoComplete:"off",readOnly:!z||f,style:{height:e,...o},"data-testid":"input-search",onClick:()=>Ze(f?!1:!Pe),onBlur:()=>Ze(!1)})]})}),y.iconEnd&&w.jsx("span",{className:"absolute inset-y-0 right-4 flex items-center pr-4",children:y.iconEnd}),!f&&w.jsx(on.Button,{className:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",onClick:()=>Ze(f?!1:!Pe),"data-testid":"arrow-button",children:w.jsx(Po,{className:ae("h-5 w-5 ml-auto transition-transform","transform",Pe&&"rotate-180",Je)})}),!f&&w.jsx(w.Fragment,{children:X?w.jsx(on.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:w.jsx(Qn,{})}):(Ye??[]).length>0?w.jsx(on.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm py-0.5 overflow-x-hidden",style:r,children:Ye.map((q,te)=>w.jsx(on.Option,{value:q,className:ae(q[B]===y[B]?`${_} text-white`:"text-gray-900",`relative cursor-default select-none p-2 hover:text-white hover:${_}`),"data-testid":`select-${x}-${q[B]}`,onClick:()=>Re(q),children:w.jsxs("div",{className:"flex justify-between items-center",children:[w.jsxs("div",{className:"flex items-center",children:[q.iconStart&&w.jsx("span",{className:"mr-2","aria-hidden":"true",children:q.iconStart}),w.jsx("span",{className:"font-normal hyphens-auto break-words overflow-hidden",children:q[L]})]}),q.iconEnd&&w.jsx("span",{className:"ml-2","aria-hidden":"true",children:q.iconEnd})]})},te))}):w.jsx(on.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:w.jsx("p",{"data-testid":"empty-options",children:"Sin opciones"})})})]}),m.length>0&&a&&w.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${x}`,children:m})]})},md=({placeholder:e="",label:o="",htmlFor:r,name:n,handleChange:u,onClick:f=()=>{},value:a,valueSelect:m,isReadOnly:v=!1,isError:x=!1,helperText:E="",autocomplete:k="on",id:P,classNameLabel:C="",classNameContainer:M="",className:R="",onKeyDown:L,options:B,idSelect:_,isMarginLeft:z=!0,classNameSelect:X="w-20",type:ee="text"})=>{const{width:ue}=hi(),we=Zt({"ring-red-300 focus:ring-red-300 text-red-900":x,"focus:ring-primary-7 text-gray-500":!x});return w.jsxs(w.Fragment,{children:[w.jsx("style",{children:`
95
+ `}),y.jsx(Kr.Button,{as:"div",onClick:()=>Ne(de),"data-testid":`menu-button-${ae}`,ref:Ue,children:t}),u.createPortal(y.jsx("div",{style:De,className:x(s,de&&"hidden",O&&"w-full"),children:y.jsx(kn,{as:n.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:bt,children:y.jsx(Kr.Items,{className:x("mt-1 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",O?"w-full":d===""&&"w-max",d!==""&&d),children:O?y.jsx("div",{className:"flex justify-center py-4",children:y.jsx(yr,{})}):y.jsxs("div",{className:x(!W&&"pb-1",i!==""&&i,He&&"w-custom"),"data-testid":"dropdown-menu",children:[y.jsxs("div",{className:"sticky top-0 bg-white w-full",children:[D!==null&&y.jsx("div",{className:x("py-2 w-full",p),children:y.jsx(si,{htmlFor:"search",id:`dropdown-search-${ae}`,name:"search",type:"text",placeholder:F,handleChange:fe=>D(fe,ae),icon:F!==""&&y.jsx(km,{className:"w-4 h-4 text-indigo-300"}),className:"pl-5 pr-4 h-8",classNameContainerInput:"w-full",value:$,onKeyDown:fe=>fe.key===" "&&fe.stopPropagation(),autocomplete:"off"})}),Be!==null&&y.jsxs("div",{className:x("pt-1.5 justify-end flex items-center",p),children:[y.jsx(xr,{classNameButton:x("bg-gray-400 hover:bg-gray-400 font-medium px-2 py-1.5 rounded-md",ut.size>0?"opacity-1 cursor-pointer":"opacity-0 cursor-default"),outline:"",classNameText:"text-xs text-white text-center",id:"delete",onClick:zt,children:"Descartar"}),y.jsx(xr,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 font-medium px-2 py-1.5 rounded-md",outline:ut.size===0&&ze?"":"0px 0px 0px 2px #3758F9, 0px 0px 0px 2px #243BBD, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameText:"text-xs text-white text-center",id:"apply",disabled:ut.size===0&&ze,onClick:()=>Be({id:ae,items:Array.from(Rt.values())}),children:ct})]})]}),ye&&!dt&&y.jsx("div",{className:"flex flex-wrap ml-7 pt-1",children:Array.from(Rt).map((fe,Ve)=>y.jsx("div",{className:"mr-1",children:y.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:[fe[1][S],y.jsx("button",{type:"button",className:"p-0.5 rounded-sm bg-gray-100 hover:bg-gray-300",onClick:()=>nt(fe[1]),"data-testid":`tag-${fe[0]}`,children:y.jsx(Dm,{className:"h-2.5 w-2.5 stroke-gray-700/50 group-hover:stroke-gray-700/75"})})]})},fe))}),y.jsx("div",{className:"divide-y divide-gray-100",children:(dt?[]:l).map((fe,Ve)=>y.jsx("div",{className:x(!W&&"py-1",J&&Ve===0&&"sticky top-0"),children:W?y.jsx("div",{onClick:Ot=>{Ot.preventDefault(),b()},"data-testid":`item-component-${Ve}`,children:fe}):y.jsx(Kr.Item,{children:y.jsx("span",{className:x(ut.has(fe[N])&&"blue text-white",!ut.has(fe[N])&&"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-${Ve}`,onClick:Ot=>{Ot.preventDefault(),le(fe)},children:An(fe[S])})})},Ve))})]})})})}),document.body)]})},Hl=50,l0=({total:t,handleNext:l,handlePrev:i,handleSelectPage:s,page:c=null})=>{const[d,p]=n.useState(1),[h,b]=n.useState([]),[S,N]=n.useState([]),I=Math.ceil(t/Hl);n.useEffect(()=>{const F=[];for(let $=1;$<=I;$++)F.push($);N(F)},[I]),n.useEffect(()=>{let F=[];const $="...",U="... ",W=" ...";if(S.length<6)F=S;else if(d>=1&&d<=3)F=[1,2,3,4,$,S.length];else if(d===4)F=[...S.slice(0,5),$,S.length];else if(d>4&&d<S.length-2){const J=S.slice(d-2,d),de=S.slice(d,d+1);F=[1,U,...J,...de,W,S.length]}else if(d>S.length-3){const J=S.slice(S.length-4);F=[1,U,...J]}b(F)},[d,S]),n.useEffect(()=>{c!==null&&c!==d&&p(c)},[c,d]);const A=F=>{p(F),s(F)},O=()=>{p(d===1?d:d-1),d>1&&i(d-1)},D=()=>{d===S.length?p(d):p(d+1),d<S.length&&l(d+1)};return y.jsxs("nav",{className:"flex items-center justify-between border-t border-gray-200 px-4 sm:px-0",children:[y.jsx("div",{className:"-mt-px flex w-0 flex-1",children:y.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:O,"data-testid":"prev",children:[y.jsx(am,{className:"mr-3 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Anterior"]})}),y.jsx("div",{className:"hidden md:-mt-px md:flex",children:h.map((F,$)=>y.jsx(Bl,{className:x("inline-flex items-center border-t-2 px-4 pt-4 text-sm font-medium",d===F?"border-indigo-500 text-indigo-600":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700"),"aria-current":"page",onClick:()=>F!=="..."&&F!==" ..."&&F!=="... "&&A(F),id:`page-${$+1}`,children:F},$))}),y.jsx("div",{className:"-mt-px flex w-0 flex-1 justify-end",children:y.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:D,"data-testid":"next",children:["Siguiente",y.jsx(cm,{className:"ml-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]})})]})},s0=({setForm:t,setValuesDefault:l,className:i="",classNameContainer:s="",classNameContainerImg:c="",src:d=null,alt:p=null,width:h,height:b})=>{const S=N=>{const{files:I}=N.target,[A]=I,O=new FileReader;O.readAsDataURL(A),O.onload=function(){t(D=>({...D,photo:O.result})),l("photo",O.result)}};return y.jsxs("div",{className:x("col-span-full",s!==""&&s),children:[y.jsx("label",{htmlFor:"cover-photo",className:"block text-sm font-medium leading-6 text-gray-500",children:"Logo (Opcional)"}),y.jsxs("div",{className:x("mt-2 flex justify-center rounded-lg border-2 border-dotted border-gray-300 cursor-pointer relative",d===null&&"px-9 pt-6 pb-2.5",c!==""&&c),children:[d?y.jsx("img",{src:d,alt:p,width:h,height:b,className:x(i!==""&&i),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s",objectFit:"contain",height:b},onLoad:N=>N.currentTarget.style.filter="none","data-testid":"img"}):y.jsxs("div",{className:"text-center",children:[y.jsx(Fm,{"aria-hidden":"true",className:"mx-auto h-12 w-12 text-gray-300"}),y.jsxs("div",{className:"mt-4 flex text-sm leading-6 text-gray-600",children:[y.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:y.jsx("span",{children:"Upload a file"})}),y.jsx("p",{className:"pl-1",children:"or drag and drop"})]}),y.jsx("p",{className:"text-xs leading-5 text-gray-600",children:"PNG, JPG, GIF up to 10MB"})]}),y.jsx("input",{id:"file-upload",name:"file-upload",type:"file",className:"absolute w-full h-full opacity-0 cursor-pointer",onChange:S})]})]})},a0=({children:t,openDefault:l=!1,setForm:i,setValuesDefault:s,title:c,type:d,data:p,setData:h,id:b,defaultData:S,dispatch:N,isAdd:I=!0,search:A=null,isPadding:O=!0,isReadOnly:D=!1,isEdit:F=!1,deleteItem:$=null,validateAdd:U=null,loading:W=!1,internalEdit:J=!0,isDataEmpty:de=!0,typeProp:ae="value",setAdd:xe=null,hasNoRecords:qe=!0,tabs:He=null,selectTab:ye=null})=>{const[Te,Me]=n.useState(!1),[Be,ct]=n.useState(!1),[,mt]=n.useState(!1),[K,dt]=n.useState(""),[ze,bt]=n.useState(1);n.useEffect(()=>{Me(l),mt(D)},[l,D]);const ce=({e:De,index:Ct})=>{const et=m(p),{name:At,value:le}=De.target;!(U!==null&&U({value:le,copyData:et,index:Ct}))&&(et[Ct][At]=le),h(et),s(b,et),i(Ne=>({...Ne,[b]:et}))},Ue=()=>{if(p.some(De=>Object.values(De).some(Ct=>Ct[ae]===-1))||p.length===0)return N({type:"ALERT",payload:{title:"",message:"Todos los campos son requeridos",typeAlert:"warning",active:!0}});i(De=>({...De,data:p})),s(b,p),h([...p,S]),xe&&xe([...p,S])},ut=({index:De,item:Ct})=>{if(p.length===1&&!F)return;const et=m(p);et.splice(De,1),i(At=>({...At,data:et})),s(b,et),h(et),$&&$({index:De,item:Ct,data:et}),De===p.length-1&&F&&et.length===0&&(i(At=>({...At,data:et})),s(b,et),h([...et,S]))},Nt=()=>{ct(!Be),mt(!1)},Rt=()=>{if(p.length>1)return;if(p.length===0)return!0;const[De]=p,{rol:Ct,privileges:et,limitedPrivileges:At,...le}=De;return Object.values(le).every(Ne=>Object.values(Ne)[0]===-1)},wt=({tab:De})=>{bt(De.id),ye&&ye({tab:De})};return y.jsxs("div",{className:"divide-y divide-gray-200 rounded-lg bg-white shadow mt-7",children:[y.jsxs("div",{className:"px-4 py-3.5 sm:px-6 flex justify-between items-center cursor-pointer",onClick:()=>Me(!Te),"data-testid":`open-accordion-${b}`,children:[y.jsx("p",{className:"text-gray-500 uppercase text-xs font-bold",children:c}),y.jsxs("div",{className:"flex items-center",children:[A&&y.jsx(si,{htmlFor:"search",id:"search",name:"search",type:"text",autoComplete:"search",placeholder:"Buscar...",handleChange:De=>{A(De),dt(De.target.value)},icon:y.jsx(qm,{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:K,onClick:De=>De.stopPropagation(),onFocus:()=>Me(!0)}),Te?y.jsx(Ym,{className:"w-5 h-5 text-default-5"}):y.jsx(Vm,{className:"w-5 h-5 text-default-5"})]})]}),y.jsx(kn,{as:n.Fragment,show:Te,enter:"transition duration-[400ms]",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-200 transition ease-in-out",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:y.jsxs("div",{children:[He&&y.jsx("nav",{className:"flex justify-center border-b border-gray-200","aria-label":"Tabs",children:He.map(De=>y.jsx("span",{className:x(ze===De.id?"border-indigo-500 text-gray-900":"border-gray-300 text-gray-500 hover:border-indigo-500","whitespace-nowrap border-b-2 py-2.5 px-2 text-sm font-medium cursor-pointer"),"aria-current":ze===De.id?"page":void 0,onClick:()=>wt({tab:De}),"data-testid":`tab-${De.id}`,children:De.name},De.name))}),y.jsxs("div",{className:x("sm:mt-2.5 py-3.5 relative",O&&He===null&&"px-4 sm:p-6",O&&He!==null&&"px-4 sm:px-6 sm:pb-6 sm:pt-2.5"),children:[J&&!Be&&y.jsx(Mm,{className:"w-5 h-5 text-gray-400 cursor-pointer absolute right-4",onClick:Nt,"data-testid":`edit-role-${b}`}),W&&y.jsx("div",{className:"flex justify-center mt-5",children:y.jsx(yr,{})}),de&&Rt()&&qe&&!W&&(J?!Be:!F)&&y.jsx("p",{className:"text-gray-800 text-center","data-testid":"records-empty",children:"No hay registros para mostrar"}),!W&&p.map((De,Ct)=>y.jsxs("div",{className:x("flex flex-col 3xs:flex-row mb-4",O&&"ml-0 3xs:ml-3"),children:[typeof t=="function"?t({item:De,index:Ct,handleChange:ce,isEdit:J?Be:F}):t,I&&(J?Be:F)&&y.jsx("div",{style:{backgroundColor:"#B0B8BF",width:"25px",height:"25px"},className:x("rounded-full flex justify-center items-center mt-4 3xs:mt-7 ml-2 3xs:ml-5 self-start 3xs:self-center",p.length===1&&!F&&"opacity-0"),children:y.jsx(Xm,{className:x("w-6 h-4",(p.length>1||F)&&"cursor-pointer"),style:{color:"#637381"},strokeWidth:2.5,onClick:()=>ut({index:Ct,item:De}),"data-testid":`delete-item-${Ct}-${b}`})})]},Ct)),I&&(J?Be:F)&&!W&&y.jsx("p",{className:"text-secondary-2 text-sm font-medium ml-3 cursor-pointer",onClick:Ue,"data-testid":`add-item-${b}`,style:{width:"fit-content"},children:`+ Añadir ${d}`})]})]})})]})},u0=({src:t,alt:l,width:i,height:s,className:c="",priority:d=!1,style:p={},id:h=""})=>{const[b,S]=n.useState(!1),N={filter:b?"none":"blur(10px)",transition:"filter 0.3s ease-out",objectFit:"cover",...i?{width:i}:{},...s?{height:s}:{},...p};return y.jsx("img",{src:t,alt:l,...i?{width:i}:{},...s?{height:s}:{},className:x(c!==""&&c),loading:d?"eager":"lazy",decoding:"async",style:N,onLoad:()=>S(!0),"data-testid":`image-${h}`})};r.Accordion=a0,r.Alert=jm,r.Avatar=$m,r.Bullets=_m,r.ButtonOutline=_l,r.ButtonPagination=Bl,r.ButtonSolid=xr,r.Checkbox=zm,r.ConfirmationAbandoningCreation=Jm,r.CoverPhoto=s0,r.Divider=Qm,r.Dropdown=i0,r.GoBack=e0,r.Image=u0,r.Input=si,r.InputDropdown=n0,r.MESSAGE_ABORT_CONTROLLER=P,r.MESSAGE_SIGNAL_ABORTED_WITHOUT_REASON=C,r.Modal=zl,r.Pagination=l0,r.Select=Wl,r.Spinner=t0,r.SpinnerIcon=yr,r.Switch=r0,r.Textarea=o0,r.Tooltip=li,r.classNames=x,r.copyOptions=m,r.generateAvatarInitials=E,r.isPromise=k,r.rowsPerPage=Hl,r.useCloseModal=M,r.useForm=R,r.useMediaQuery=L,r.useWindowDimensions=B,r.validateEmail=v,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})})})(Fo,Fo.exports);var ln=Fo.exports;const Ro=({className:e="",classNameContainer:o="",children:r,message:n="",style:u={}})=>{const[f,a]=g.useState(!1),[m,v]=g.useState({top:0,left:0}),x=g.useRef(null),E=()=>{if(n==="")return;const C=x.current.getBoundingClientRect();v({top:C.bottom+window.scrollY,left:C.left+window.scrollX}),a(!0)},k=()=>{a(!1)},P=w.jsx(vn,{as:g.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:f,children:w.jsx("div",{className:ln.classNames("absolute z-40 px-4 mt-0 sm:px-0",e!==""&&e),style:{top:m.top,left:m.left,position:"absolute"},children:w.jsx("div",{className:"bg-white p-2 text-center rounded-lg shadow-lg ring-1 ring-black ring-opacity-5",onMouseEnter:E,onMouseLeave:k,"data-testid":"message",children:typeof n=="object"?"":n})})});return w.jsxs(w.Fragment,{children:[w.jsx("div",{ref:x,className:ln.classNames("inline-block",o!==""&&o),onMouseEnter:E,onMouseLeave:k,"data-testid":"container-tooltip",style:u,children:r}),typeof window<"u"&&Sr.createPortal(P,document.body)]})},Lo=({placeholder:e="",label:o="",htmlFor:r,type:n="text",name:u,handleChange:f,onClick:a=()=>{},value:m,isReadOnly:v=!1,isError:x=!1,helperText:E="",autocomplete:k="off",id:P,classNameLabel:C="",classNameContainerInput:M="",classNameContainer:R="",className:L="",icon:B=null,onKeyDown:_,onFocus:z,min:X,max:ee,maxWidth:ue=5e3})=>{const[we,Oe]=g.useState(!1),be=Zt({"ring-red-300 focus:ring-red-300 text-red-900":x||we,"focus:ring-primary-7 text-gray-500":!x&&!we}),y=he=>{if(f&&f(he),n!=="email")return;const{value:Pe}=he.target,Ze=pi(Pe);Oe(!Ze)};return w.jsxs("div",{"data-testid":`container-input-${P}`,className:R,children:[o!==""&&w.jsx("label",{htmlFor:r,className:se("block text-sm font-medium leading-6",!C.includes("mb-")&&"mb-0.5",C!==""?C:"text-gray-700"),"data-testid":`label-${P}`,children:o}),w.jsxs("div",{className:se("relative rounded-md",M!==""&&M),children:[w.jsx(Ro,{className:"text-sm",classNameContainer:"w-full",message:n==="password"?"":m,children:w.jsx("input",{id:P,name:u,type:n,autoComplete:k,placeholder:e,onChange:y,onClick:a,onKeyDown:_,onFocus:z,value:m,readOnly:v,"data-testid":`input-${P}`,min:X,className:se("block w-full rounded-md border-0 py-1.5 shadow-sm placeholder-gray-300 ring-1 ring-gray-300 ring-inset focus:ring-1 focus:ring-inset text-sm sm:leading-6 truncate",be,L!==""&&L),style:{maxWidth:`${ue}px`}})}),B!==null&&w.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:B}),x&&B===null&&w.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:w.jsx(il,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),E.length===0||!x?null:w.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${P}`,children:E})]})};function Qn({className:e="w-6 h-6",colorSpinner:o="text-primary-9"}){return w.jsxs("svg",{className:se("fill-current animate-spin",e,o),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[w.jsx("circle",{className:se("opacity-25 stroke-current",o),cx:"12",cy:"12",r:"10",strokeWidth:"4",fill:"none"}),w.jsx("path",{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 pd(){return w.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:[w.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"}),w.jsx(Qn,{className:"w-8 h-8 animate-spin text-primary-9"})]})}const cl=({height:e="36px",style:o={},styleMenu:r={},label:n="",onChange:u,isReadOnly:f=!1,isError:a=!1,helperText:m="",name:v,id:x,className:E="",classNameLabel:k="",classNameInput:P="",options:C,value:M=-1,defaultValue:R={value:-1,label:"",iconStart:null,iconEnd:null},defaultLabel:L="label",defaultId:B="value",bgOptionSelect:_="bg-primary-7",isSearch:z=!1,loading:X=!1,isSingleOptionAndFirstLoad:ee=!0,isTest:ue=!1})=>{const we=g.useRef(!0),[Oe,be]=g.useState(""),[y,he]=g.useState(R),[Pe,Ze]=g.useState(!1);g.useEffect(()=>{if((C==null?void 0:C.length)!==1||!we.current)return;we.current=!1;const[q]=C,te=q[B],ve=q[L];he({value:te,label:ve}),ee&&u({target:{value:q,checked:!1,name:v,type:void 0,id:q[B]}})},[C,B,L,u,v,ee]),g.useEffect(()=>{if(M===-1||(C==null?void 0:C.length)===0)return;const q=C==null?void 0:C.find(te=>te[B]===M);q&&he(q)},[M,C,B]),g.useEffect(()=>{M==="clear"&&(y[B]!==R[B]||y[L]!==R[L]||ue)&&he(R)},[R,ue,y,M,B,L]);const Ye=Oe===""?C:C.filter(q=>q[L].normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().includes(Oe.toLowerCase())),Y=Zt({"ring-red-300 focus:ring-red-300 text-red-900":a&&!f,"text-gray-500":!a,"focus:ring-primary-7":!a&&!f}),Je=Zt({"text-red-400":a&&!f,"text-gray-400":!a}),Re=q=>{he(q),u({target:{value:q,checked:!1,name:v,type:void 0,id:q[B]}})};return w.jsxs(on,{as:"div",value:y,children:[w.jsx(on.Label,{className:se("block text-sm font-medium leading-6 text-gray-500 mb-0.5",k!==""&&k),children:n}),w.jsxs("div",{className:se("relative",E!==""&&E),children:[w.jsx(Ro,{className:"text-sm",classNameContainer:"w-full",message:y[L],children:w.jsxs(on.Button,{className:"w-full","data-testid":`listbox-button-${x}`,children:[y.iconStart&&w.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-2",children:y.iconStart}),w.jsx(on.Input,{className:se("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",!a&&!f&&"ring-inset focus:ring-inset focus:ring-2 focus:ring-primary-7",f&&"focus:ring-gray-300",Y,P!==""&&P),onChange:q=>be(q.target.value.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),displayValue:q=>{var te;return(te=q[L])==null?void 0:te.trim()},autoComplete:"off",readOnly:!z||f,style:{height:e,...o},"data-testid":"input-search",onClick:()=>Ze(f?!1:!Pe),onBlur:()=>Ze(!1)})]})}),y.iconEnd&&w.jsx("span",{className:"absolute inset-y-0 right-4 flex items-center pr-4",children:y.iconEnd}),!f&&w.jsx(on.Button,{className:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",onClick:()=>Ze(f?!1:!Pe),"data-testid":"arrow-button",children:w.jsx(Po,{className:se("h-5 w-5 ml-auto transition-transform","transform",Pe&&"rotate-180",Je)})}),!f&&w.jsx(w.Fragment,{children:X?w.jsx(on.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:w.jsx(Qn,{})}):(Ye??[]).length>0?w.jsx(on.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm py-0.5 overflow-x-hidden",style:r,children:Ye.map((q,te)=>w.jsx(on.Option,{value:q,className:se(q[B]===y[B]?`${_} text-white`:"text-gray-900",`relative cursor-default select-none p-2 hover:text-white hover:${_}`),"data-testid":`select-${x}-${q[B]}`,onClick:()=>Re(q),children:w.jsxs("div",{className:"flex justify-between items-center",children:[w.jsxs("div",{className:"flex items-center",children:[q.iconStart&&w.jsx("span",{className:"mr-2","aria-hidden":"true",children:q.iconStart}),w.jsx("span",{className:"font-normal hyphens-auto break-words overflow-hidden",children:q[L]})]}),q.iconEnd&&w.jsx("span",{className:"ml-2","aria-hidden":"true",children:q.iconEnd})]})},te))}):w.jsx(on.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:w.jsx("p",{"data-testid":"empty-options",children:"Sin opciones"})})})]}),m.length>0&&a&&w.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${x}`,children:m})]})},md=({placeholder:e="",label:o="",htmlFor:r,name:n,handleChange:u,onClick:f=()=>{},value:a,valueSelect:m,isReadOnly:v=!1,isError:x=!1,helperText:E="",autocomplete:k="on",id:P,classNameLabel:C="",classNameContainer:M="",className:R="",onKeyDown:L,options:B,idSelect:_,isMarginLeft:z=!0,classNameSelect:X="w-20",type:ee="text"})=>{const{width:ue}=hi(),we=Zt({"ring-red-300 focus:ring-red-300 text-red-900":x,"focus:ring-primary-7 text-gray-500":!x});return w.jsxs(w.Fragment,{children:[w.jsx("style",{children:`
96
96
  input[type="number"]::-webkit-inner-spin-button,
97
97
  input[type="number"]::-webkit-outer-spin-button {
98
98
  -webkit-appearance: none;
@@ -101,7 +101,7 @@ Check the top-level render call using <`+oe+">.")}return G}}function Xl(T,G){{if
101
101
  input[type="number"] {
102
102
  -moz-appearance: textfield;
103
103
  }
104
- `}),w.jsxs("div",{"data-testid":`container-input-${P}`,className:M,children:[o!==""&&w.jsx("label",{htmlFor:r,className:ae("block text-sm font-medium leading-6",C!==""?C:"text-gray-700"),"data-testid":`label-${P}`,children:o}),w.jsxs("div",{className:"relative mt-1 rounded-md shadow-sm",children:[w.jsx("div",{className:"absolute inset-y-0 -top-0.5 flex items-center",style:{left:"2px"},children:w.jsx(cl,{name:_,onChange:Oe=>u(Oe),id:_,options:B,value:m,isReadOnly:v,className:X,height:ue<=640?"28px":"32px",classNameInput:ae(z&&"ml-3.5"),style:{paddingRight:0,boxShadow:"none"},isDisabledFocus:!0})}),w.jsx("input",{id:P,name:n,type:ee,autoComplete:k,placeholder:e,readOnly:v,"data-testid":`input-${P}`,onClick:f,onKeyDown:L,onChange:Oe=>u(Oe),value:a,className:ae("block w-full rounded-md border-0 py-1.5 pl-24 shadow-sm placeholder-gray-300 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-1 focus:ring-inset text-sm sm:leading-6",we,R!==""&&R)}),x&&w.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:w.jsx(il,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),E.length===0||!x?null:w.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${P}`,children:E})]})]})},hd=({setValuesDefault:e,status:o=!1,isReadOnly:r=!1,handleClick:n,text:u="",updateStatus:f=!1,id:a="",isHiddenText:m=!1,setForm:v,handleChange:x,textActive:E="Activo",textInactive:k="Inactivo"})=>{const[P,C]=g.useState(!1);g.useEffect(()=>{C(o),e("status",o),v(R=>({...R,status:o}))},[o,e,f,v]);const M=()=>{C(!P),e("status",!P),v(R=>({...R,status:!P})),x({target:{checked:!P,value:!P,name:"status",type:"",id:""}}),n&&n()};return w.jsxs("div",{className:"flex",children:[w.jsxs(oc,{checked:P,onChange:M,className:ae("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-5 focus:ring-offset-2 mt-1",P?"bg-success-5":"bg-gray-200"),"data-testid":`switch-${a}`,disabled:r,children:[w.jsx("span",{className:"sr-only",children:"Use setting"}),w.jsx("span",{"aria-hidden":"true",className:ae("pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",P?"translate-x-full":"translate-x-0")})]}),u!==""?w.jsx("p",{className:ae("text-sm font-medium text-gray-500 ml-2 self-end",m&&"hidden"),children:u}):w.jsx("p",{className:ae("text-sm font-medium text-gray-500 ml-2 self-end",m&&"hidden"),"data-testid":"text-switch",children:P?E:k})]})};function vd({label:e="",id:o,htmlFor:r="",classNameLabel:n="",className:u="",rows:f=4,name:a,placeholder:m="",helperText:v="",isReadOnly:x=!1,isError:E=!1,onChange:k,value:P,idInput:C,nameInput:M,placeholderInput:R="",isReadOnlyInput:L=!1,valueInput:B,infoTop:_=null,infoBottom:z=null,classNameInfoTop:X="h-4",classNameInfoBottom:ee="h-2",isInputTitle:ue=!1,hiddenBorder:we=!1}){const Oe=Zt({"ring-red-300 focus:ring-red-300 text-red-900":E,"focus:ring-primary-7 text-gray-700":!E});return w.jsxs(w.Fragment,{children:[e!==""&&w.jsx("label",{htmlFor:r,className:ae("leading-6 block text-sm",n!==""&&n),children:e}),w.jsxs("div",{className:"relative overflow-x-hidden",children:[_!==null&&w.jsx("div",{className:"absolute top-2 left-3 w-full",children:_}),w.jsxs("div",{className:ae("overflow-hidden rounded-md shadow-sm ring-1 ring-inset ring-gray-300 focus-within:ring-2 focus-within:ring-primary-7 placeholder:text-gray-400 bg-white",Oe),children:[_!==null&&w.jsx("div",{className:"py-2","aria-hidden":"true",children:w.jsx("div",{className:"py-px",children:w.jsx("div",{className:X})})}),ue&&w.jsx("textarea",{name:M,id:C,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:R,value:B,onChange:k,rows:2,readOnly:L}),w.jsx("textarea",{placeholder:m,rows:f,name:a,id:o,className:ae(ue||we?"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",Oe,u!==""&&u),readOnly:x,onChange:k,value:P,"data-testid":`textarea-${o}`}),z!==null&&w.jsx("div",{className:"py-2","aria-hidden":"true",children:w.jsx("div",{className:"py-px",children:w.jsx("div",{className:ee})})})]}),z!==null&&w.jsx("div",{className:"absolute bottom-2 left-3 w-full",children:z})]}),v.length>0&&E&&w.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${o}`,children:v})]})}const gd=({children:e,data:o,className:r="",classNameTooltip:n="w-full",classNameMenu:u="",classNameMenuItems:f="",classNameContainerSearch:a="px-5",isSelectMultiple:m=!1,optionsSelect:v,propObject:x="name",propId:E="id",textNewItem:k="",defaultId:P=null,loading:C=!1,search:M=null,searchPlaceHolder:R="Buscar...",valueSearch:L=void 0,idsOptionSelect:B=null,isComponent:_,isSticky:z=!1,hiddenMenu:X=!1,id:ee,onClick:ue=()=>{},isRelative:we=!0,isMaxWidth:Oe=!1,isTag:be=!1,isClear:y=!1,clear:he=null,applyButton:Pe=null,applyButtonText:Ze="Aplicar",tagsParent:Ye=[],isClearTagsParent:Y=!1,isReadOnly:Je,isDisabledApplyButton:Re=!0,isOpenMenu:q=void 0,onScroll:te=null})=>{const ve=g.useRef(null),$e=g.useRef(null),[We,lt]=g.useState(new Set),[tt,St]=g.useState(new Map);g.useEffect(()=>{B!==null&&lt(new Set(new Set(B)))},[B]),g.useEffect(()=>{Y&&St(new Map)},[Y]),g.useEffect(()=>{if(Ye.length===0)return;const V=new Map;Ye.forEach(Ee=>V.set(Ee.id,Ee)),St(V)},[Ye]),g.useEffect(()=>{y&&(lt(new Set),St(new Map),he&&he())},[he,y]);const Lt=V=>{let Ee=new Map(tt),ke=new Set(We),Fe=null;if(P!==null&&(V[E]===P&&(Fe=crypto.randomUUID()),Fe!==null&&(V[E]=Fe),Fe!==null&&(V[x]=V[x].replace(k,"").trim())),ke.has(V[E])?ke.delete(V[E]):ke.add(V[E]),Ee.has(V[E])?Ee.delete(V[E]):Ee.set(V[E],V),!m){const Mt=Array.from(ke),Yt=Array.from(Ee);Mt.shift(),Yt.shift(),ke=ke.size===2?new Set(Mt):ke,Ee=Ee.size===2?new Map(Yt):Ee}v(V,Array.from(ke),Fe!==null),lt(ke),St(Ee)},ge=V=>{ue(V===!0?-1:ee)},st=V=>{const Ee=new Set(We),ke=new Map(tt);Ee.delete(V[E]),ke.delete(V[E]),v(V,Array.from(Ee)),lt(Ee),St(ke)},re=()=>{if(We.size===0)return;const V=new Set(We),Ee=new Map(tt);V.clear(),Ee.clear(),v(null,Array.from(V)),lt(V),St(Ee)};function Ce(V){if(typeof V!="string")return V;const Ee=V.toLowerCase();return Ee.charAt(0).toUpperCase()+Ee.slice(1)}return w.jsxs(Fr,{as:"div",className:ae("inline-block text-left",we&&"relative",u!==""&&u),onClick:()=>ge(!0),"data-testid":`menu-${ee}`,id:ee,ref:ve,children:[w.jsx("style",{children:`
104
+ `}),w.jsxs("div",{"data-testid":`container-input-${P}`,className:M,children:[o!==""&&w.jsx("label",{htmlFor:r,className:se("block text-sm font-medium leading-6",C!==""?C:"text-gray-700"),"data-testid":`label-${P}`,children:o}),w.jsxs("div",{className:"relative mt-1 rounded-md shadow-sm",children:[w.jsx("div",{className:"absolute inset-y-0 -top-0.5 flex items-center",style:{left:"2px"},children:w.jsx(cl,{name:_,onChange:Oe=>u(Oe),id:_,options:B,value:m,isReadOnly:v,className:X,height:ue<=640?"28px":"32px",classNameInput:se(z&&"ml-3.5"),style:{paddingRight:0,boxShadow:"none"},isDisabledFocus:!0})}),w.jsx("input",{id:P,name:n,type:ee,autoComplete:k,placeholder:e,readOnly:v,"data-testid":`input-${P}`,onClick:f,onKeyDown:L,onChange:Oe=>u(Oe),value:a,className:se("block w-full rounded-md border-0 py-1.5 pl-24 shadow-sm placeholder-gray-300 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-1 focus:ring-inset text-sm sm:leading-6",we,R!==""&&R)}),x&&w.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:w.jsx(il,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),E.length===0||!x?null:w.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${P}`,children:E})]})]})},hd=({setValuesDefault:e,status:o=!1,isReadOnly:r=!1,handleClick:n,text:u="",updateStatus:f=!1,id:a="",isHiddenText:m=!1,setForm:v,handleChange:x,textActive:E="Activo",textInactive:k="Inactivo"})=>{const[P,C]=g.useState(!1);g.useEffect(()=>{C(o),e("status",o),v(R=>({...R,status:o}))},[o,e,f,v]);const M=()=>{C(!P),e("status",!P),v(R=>({...R,status:!P})),x({target:{checked:!P,value:!P,name:"status",type:"",id:""}}),n&&n()};return w.jsxs("div",{className:"flex",children:[w.jsxs(oc,{checked:P,onChange:M,className:se("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-5 focus:ring-offset-2 mt-1",P?"bg-success-5":"bg-gray-200"),"data-testid":`switch-${a}`,disabled:r,children:[w.jsx("span",{className:"sr-only",children:"Use setting"}),w.jsx("span",{"aria-hidden":"true",className:se("pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",P?"translate-x-full":"translate-x-0")})]}),u!==""?w.jsx("p",{className:se("text-sm font-medium text-gray-500 ml-2 self-end",m&&"hidden"),children:u}):w.jsx("p",{className:se("text-sm font-medium text-gray-500 ml-2 self-end",m&&"hidden"),"data-testid":"text-switch",children:P?E:k})]})};function vd({label:e="",id:o,htmlFor:r="",classNameLabel:n="",className:u="",rows:f=4,name:a,placeholder:m="",helperText:v="",isReadOnly:x=!1,isError:E=!1,onChange:k,value:P,idInput:C,nameInput:M,placeholderInput:R="",isReadOnlyInput:L=!1,valueInput:B,infoTop:_=null,infoBottom:z=null,classNameInfoTop:X="h-4",classNameInfoBottom:ee="h-2",isInputTitle:ue=!1,hiddenBorder:we=!1}){const Oe=Zt({"ring-red-300 focus:ring-red-300 text-red-900":E,"focus:ring-primary-7 text-gray-700":!E});return w.jsxs(w.Fragment,{children:[e!==""&&w.jsx("label",{htmlFor:r,className:se("leading-6 block text-sm",n!==""&&n),children:e}),w.jsxs("div",{className:"relative overflow-x-hidden",children:[_!==null&&w.jsx("div",{className:"absolute top-2 left-3 w-full",children:_}),w.jsxs("div",{className:se("overflow-hidden rounded-md shadow-sm ring-1 ring-inset ring-gray-300 focus-within:ring-2 focus-within:ring-primary-7 placeholder:text-gray-400 bg-white",Oe),children:[_!==null&&w.jsx("div",{className:"py-2","aria-hidden":"true",children:w.jsx("div",{className:"py-px",children:w.jsx("div",{className:X})})}),ue&&w.jsx("textarea",{name:M,id:C,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:R,value:B,onChange:k,rows:2,readOnly:L}),w.jsx("textarea",{placeholder:m,rows:f,name:a,id:o,className:se(ue||we?"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",Oe,u!==""&&u),readOnly:x,onChange:k,value:P,"data-testid":`textarea-${o}`}),z!==null&&w.jsx("div",{className:"py-2","aria-hidden":"true",children:w.jsx("div",{className:"py-px",children:w.jsx("div",{className:ee})})})]}),z!==null&&w.jsx("div",{className:"absolute bottom-2 left-3 w-full",children:z})]}),v.length>0&&E&&w.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${o}`,children:v})]})}const gd=({children:e,data:o,className:r="",classNameTooltip:n="w-full",classNameMenu:u="",classNameMenuItems:f="",classNameContainerSearch:a="px-5",isSelectMultiple:m=!1,optionsSelect:v,propObject:x="name",propId:E="id",textNewItem:k="",defaultId:P=null,loading:C=!1,search:M=null,searchPlaceHolder:R="Buscar...",valueSearch:L=void 0,idsOptionSelect:B=null,isComponent:_,isSticky:z=!1,hiddenMenu:X=!1,id:ee,onClick:ue=()=>{},isRelative:we=!0,isMaxWidth:Oe=!1,isTag:be=!1,isClear:y=!1,clear:he=null,applyButton:Pe=null,applyButtonText:Ze="Aplicar",tagsParent:Ye=[],isClearTagsParent:Y=!1,isReadOnly:Je,isDisabledApplyButton:Re=!0,isOpenMenu:q=void 0,onScroll:te=null})=>{const ve=g.useRef(null),$e=g.useRef(null),[We,lt]=g.useState(new Set),[tt,St]=g.useState(new Map);g.useEffect(()=>{B!==null&&lt(new Set(new Set(B)))},[B]),g.useEffect(()=>{Y&&St(new Map)},[Y]),g.useEffect(()=>{if(Ye.length===0)return;const V=new Map;Ye.forEach(Ee=>V.set(Ee.id,Ee)),St(V)},[Ye]),g.useEffect(()=>{y&&(lt(new Set),St(new Map),he&&he())},[he,y]);const Lt=V=>{let Ee=new Map(tt),ke=new Set(We),Fe=null;if(P!==null&&(V[E]===P&&(Fe=crypto.randomUUID()),Fe!==null&&(V[E]=Fe),Fe!==null&&(V[x]=V[x].replace(k,"").trim())),ke.has(V[E])?ke.delete(V[E]):ke.add(V[E]),Ee.has(V[E])?Ee.delete(V[E]):Ee.set(V[E],V),!m){const Mt=Array.from(ke),Yt=Array.from(Ee);Mt.shift(),Yt.shift(),ke=ke.size===2?new Set(Mt):ke,Ee=Ee.size===2?new Map(Yt):Ee}v(V,Array.from(ke),Fe!==null),lt(ke),St(Ee)},ge=V=>{ue(V===!0?-1:ee)},st=V=>{const Ee=new Set(We),ke=new Map(tt);Ee.delete(V[E]),ke.delete(V[E]),v(V,Array.from(Ee)),lt(Ee),St(ke)},re=()=>{if(We.size===0)return;const V=new Set(We),Ee=new Map(tt);V.clear(),Ee.clear(),v(null,Array.from(V)),lt(V),St(Ee)};function Ce(V){if(typeof V!="string")return V;const Ee=V.toLowerCase();return Ee.charAt(0).toUpperCase()+Ee.slice(1)}return w.jsxs(Fr,{as:"div",className:se("inline-block text-left",we&&"relative",u!==""&&u),onClick:()=>ge(!0),"data-testid":`menu-${ee}`,id:ee,ref:ve,children:[w.jsx("style",{children:`
105
105
  .blue {
106
106
  background-color: #3758F9;
107
107
  }
@@ -118,4 +118,4 @@ Check the top-level render call using <`+oe+">.")}return G}}function Xl(T,G){{if
118
118
  width: 414px;
119
119
  }
120
120
  }
121
- `}),w.jsx(Fr.Button,{as:"div",onClick:()=>ge(X),"data-testid":`menu-button-${ee}`,ref:$e,children:e}),!Je&&w.jsx("div",{className:ae("absolute right-0 z-20",n,X&&"hidden",C&&"w-full"),children:w.jsx(vn,{as:g.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:q,children:w.jsx(Fr.Items,{className:ae("mt-1 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",C?"w-full":f===""&&"w-max",f!==""&&f),children:C?w.jsx("div",{className:"flex justify-center py-4",children:w.jsx(Qn,{})}):w.jsxs("div",{className:ae(!_&&"pb-1",r!==""&&r,Oe&&"w-custom"),"data-testid":"dropdown-menu",onScroll:te,children:[w.jsxs("div",{className:"sticky top-0 bg-white w-full",children:[M!==null&&w.jsx("div",{className:ae("py-2 w-full",a),children:w.jsx(Lo,{htmlFor:"search",id:`dropdown-search-${ee}`,name:"search",type:"text",placeholder:R,handleChange:V=>M(V,ee),icon:R!==""&&w.jsx(zc,{className:"w-4 h-4 text-primary-4"}),className:"pl-5 pr-4 h-8",classNameContainerInput:"w-full",value:L,onKeyDown:V=>V.key===" "&&V.stopPropagation(),autocomplete:"off"})}),Pe!==null&&w.jsxs("div",{className:ae("pt-1.5 justify-end flex items-center",a),children:[w.jsx(Jn,{classNameButton:ae("bg-gray-400 hover:bg-gray-400 font-medium px-2 py-1.5 rounded-md",We.size>0?"opacity-1 cursor-pointer":"opacity-0 cursor-default"),outline:"",classNameText:"text-xs text-white text-center",id:"delete",onClick:re,children:"Descartar"}),w.jsx(Jn,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 font-medium px-2 py-1.5 rounded-md",outline:We.size===0&&Re?"":"0px 0px 0px 2px #3758F9, 0px 0px 0px 2px #243BBD, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameText:"text-xs text-white text-center",id:"apply",disabled:We.size===0&&Re,onClick:()=>Pe({id:ee,items:Array.from(tt.values())}),children:Ze})]})]}),be&&w.jsx("div",{className:"flex flex-wrap ml-7 pt-1",children:Array.from(tt).map((V,Ee)=>w.jsx("div",{className:"mr-1",children:w.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:[V[1][x],w.jsx("button",{type:"button",className:"p-0.5 rounded-sm bg-gray-100 hover:bg-gray-300",onClick:()=>st(V[1]),"data-testid":`tag-${V[0]}`,children:w.jsx(qc,{className:"h-2.5 w-2.5 stroke-gray-700/50 group-hover:stroke-gray-700/75"})})]})},V))}),w.jsx("div",{className:"divide-y divide-gray-100",children:o.map((V,Ee)=>w.jsx("div",{className:ae(!_&&"py-1",z&&Ee===0&&"sticky top-0"),children:_?w.jsx("div",{onClick:ke=>{ke.preventDefault(),v()},"data-testid":`item-component-${Ee}`,children:V}):w.jsx(Fr.Item,{children:w.jsx("span",{className:ae(We.has(V[E])&&"blue text-white",!We.has(V[E])&&"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-${Ee}`,onClick:ke=>{ke.preventDefault(),Lt(V)},children:Ce(V[x])})})},Ee))})]})})})})]})},Ao=50,bd=({total:e,handleNext:o,handlePrev:r,handleSelectPage:n,page:u=null,pageSize:f=Ao})=>{const[a,m]=g.useState(1),[v,x]=g.useState([]),[E,k]=g.useState([]),[P,C]=g.useState(""),M=Math.ceil(e/f);g.useEffect(()=>{const z=[];for(let X=1;X<=M;X++)z.push(X);k(z)},[M]),g.useEffect(()=>{let z=[];const X="...",ee="... ",ue=" ...";if(E.length<6)z=E;else if(a>=1&&a<=3)z=[1,2,3,4,X,E.length];else if(a===4)z=[...E.slice(0,5),X,E.length];else if(a>4&&a<E.length-2){const we=E.slice(a-2,a),Oe=E.slice(a,a+1);z=[1,ee,...we,...Oe,ue,E.length]}else if(a>E.length-3){const we=E.slice(E.length-4);z=[1,ee,...we]}x(z)},[a,E]),g.useEffect(()=>{u!==null&&u!==a&&m(u)},[u,a]);const R=z=>{C(""),m(z),n(z)},L=()=>{C(""),a>1&&m(a-1),a>1&&r(a-1)},B=()=>{C(""),a<E.length&&m(a+1),a<E.length&&o(a+1)},_=z=>{const{value:X}=z.target;if(!/^\d*$/.test(X))return;const ee=Math.ceil(e/Ao);X>ee||C(X)};return g.useEffect(()=>{const z=setTimeout(()=>{const X=Number(P);!isNaN(X)&&X>=1&&X<=M&&(n(X),m(X))},500);return()=>clearTimeout(z)},[P,M,n]),w.jsxs("nav",{className:"flex items-center justify-between border-t border-gray-200 px-4 sm:px-0",children:[w.jsx("div",{className:"-mt-px flex w-0 flex-1",children:w.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:L,"data-testid":"prev",children:[w.jsx(wc,{className:"mr-3 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Anterior"]})}),w.jsxs("div",{className:"hidden md:-mt-px md:flex",children:[w.jsxs("div",{children:[w.jsx("span",{className:"text-sm text-gray-500 font-medium mr-1",children:"Ir a"}),w.jsx("div",{className:"inline-flex items-center border-t-2 pr-2 pt-1 text-sm font-medium border-transparent text-gray-500",style:{width:"45px"},children:w.jsx(ln.Input,{htmlFor:"",id:"pager",name:"pager",handleChange:_,value:P,className:"pl-1.5 pr-1 h-7"})})]}),v.map((z,X)=>w.jsx(ln.ButtonPagination,{className:ln.classNames("inline-flex items-center border-t-2 px-4 pt-4 text-sm font-medium",a===z?"border-primary-6 text-primary-7":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700"),"aria-current":"page",onClick:()=>z!=="..."&&z!==" ..."&&z!=="... "&&R(z),id:`page-${X+1}`,children:z},X))]}),w.jsx("div",{className:"-mt-px flex w-0 flex-1 justify-end",children:w.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:B,"data-testid":"next",children:["Siguiente",w.jsx(Sc,{className:"ml-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]})})]})},xd=({setForm:e,setValuesDefault:o,className:r="",classNameContainer:n="",classNameContainerImg:u="",src:f=null,alt:a=null,width:m,height:v,title:x="Logo (Opcional)",fileFormatsDescription:E="PNG, JPG, GIF up to 10MB"})=>{const k=f===null?"":f.split("."),P=C=>{const{files:M}=C.target,[R]=M,L=new FileReader;L.readAsDataURL(R),L.onload=function(){R.type.startsWith("image/")?(e(_=>({..._,photo:L.result})),o("photo",L.result)):(e(_=>({..._,photo:"https://cdn.pixabay.com/photo/2017/03/08/21/21/file-2127833_1280.png"})),o("photo",L.result))}};return w.jsxs("div",{className:ae("col-span-full",n!==""&&n),children:[w.jsx("label",{htmlFor:"cover-photo",className:"block text-sm font-medium leading-6 text-gray-500",children:x}),w.jsxs("div",{className:ae("mt-2 flex justify-center rounded-lg border-2 border-dotted border-gray-300 cursor-pointer relative",u!==""&&u),children:[f?w.jsx("img",{src:/(jpg|png|jpe?g|gif|webp|svg)$/i.test(k[k.length-1])||f.startsWith("data:image/")?f:"https://cdn.pixabay.com/photo/2017/03/08/21/21/file-2127833_1280.png",alt:a,width:m,height:v,className:ae(r!==""&&r),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s",objectFit:"contain",height:v},onLoad:C=>C.currentTarget.style.filter="none","data-testid":"img"}):w.jsxs("div",{className:"text-center",children:[w.jsx(Vc,{"aria-hidden":"true",className:"mx-auto h-12 w-12 text-gray-300"}),w.jsxs("div",{className:"mt-4 flex text-sm leading-6 text-gray-600",children:[w.jsx("label",{htmlFor:"file-upload",className:"relative cursor-pointer rounded-md bg-white font-semibold text-primary-7 focus-within:outline-none focus-within:ring-2 focus-within:ring-primary-7 focus-within:ring-offset-2 hover:text-primary-6",children:w.jsx("span",{children:"Subir un archivo"})}),w.jsx("p",{className:"pl-1",children:"o arrástralo y suéltalo aquí"})]}),w.jsx("p",{className:"text-xs leading-5 text-gray-600",children:E})]}),w.jsx("input",{id:"file-upload",name:"file-upload",type:"file",className:"absolute w-full h-full opacity-0 cursor-pointer",onChange:P})]})]})},yd=({children:e,openDefault:o=!1,setForm:r,setValuesDefault:n,title:u,type:f,data:a,setData:m,id:v,defaultData:x,showAlert:E,isAdd:k=!0,search:P=null,isPadding:C=!0,isReadOnly:M=!1,isEdit:R=!1,deleteItem:L=null,validateAdd:B=null,loading:_=!1,internalEdit:z=!0,isDataEmpty:X=!0,typeProp:ee="value",setAdd:ue=null,hasNoRecords:we=!0,tabs:Oe=null,selectTab:be=null,className:y="mt-7"})=>{const[Pe,Ze]=g.useState(!1),[Ye,Y]=g.useState(!1),[,Je]=g.useState(!1),[Re,q]=g.useState(""),[te,ve]=g.useState(1);g.useEffect(()=>{Ze(o),Je(M)},[o,M]);const $e=({e:ge,index:st})=>{const re=eo(a),{name:Ce,value:V}=ge.target;!(B===null?!1:B({value:V,copyData:re,index:st}))&&(re[st][Ce]=V),m(re),n(v,re),r(ke=>({...ke,[v]:re}))},We=()=>{if(a.some(st=>Object.values(st).some(V=>V[ee]===-1))||a.length===0)return E({title:"",message:"Todos los campos son requeridos",type:"warning"});r(st=>({...st,data:a})),n(v,a),m([...a,x]),ue&&ue([...a,x])},lt=({index:ge,item:st})=>{if(a.length===1&&!R)return;let re=eo(a);re.length===1&&(re=[x]),re.length>1&&re.splice(ge,1),r(Ce=>({...Ce,data:re})),n(v,re),m(re),L&&L({index:ge,item:st,data:re}),ge===a.length-1&&R&&re.length===0&&(r(Ce=>({...Ce,data:re})),n(v,re),m([...re,x]))},tt=()=>{Y(!Ye),Je(!1)},St=()=>{if(a.length>1)return;if(a.length===0)return!0;const[ge]=a;return!ge||typeof ge!="object"?!0:Object.keys(ge).filter(Ce=>{const V=ge[Ce];return V&&typeof V=="object"&&"value"in V}).every(Ce=>ge[Ce].value===-1)},Lt=({tab:ge})=>{ve(ge.id),be&&be({tab:ge})};return w.jsxs("div",{className:ae("divide-y divide-gray-200 rounded-lg bg-white shadow",y),children:[w.jsxs("div",{className:"px-4 py-3.5 sm:px-6 flex justify-between items-center cursor-pointer",onClick:()=>Ze(!Pe),"data-testid":`open-accordion-${v}`,children:[typeof u=="string"?w.jsx("p",{className:"text-gray-500 uppercase text-xs font-bold",children:u}):u,w.jsxs("div",{className:"flex items-center",children:[P&&w.jsx(Lo,{htmlFor:"search",id:"search",name:"search",type:"text",autoComplete:"search",placeholder:"Buscar...",handleChange:ge=>{P(ge),q(ge.target.value)},icon:w.jsx(sd,{className:"w-6 h-6 text-primary-4"}),className:"h-9",classNameContainerInput:"w-52 2xs:w-64 max-w-64 mr-8 hidden sm:block",value:Re,onClick:ge=>ge.stopPropagation(),onFocus:()=>Ze(!0)}),Pe?w.jsx(id,{className:"w-5 h-5 text-default-4"}):w.jsx(al,{className:"w-5 h-5 text-default-4"})]})]}),w.jsx(vn,{as:g.Fragment,show:Pe,enter:"transition duration-[400ms]",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-200 transition ease-in-out",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:w.jsxs("div",{children:[Oe&&w.jsx("nav",{className:"flex justify-center border-b border-gray-200","aria-label":"Tabs",children:Oe.map(ge=>w.jsx("span",{className:ae(te===ge.id?"border-primary-6 text-gray-900":"border-gray-300 text-gray-500 hover:border-primary-6","whitespace-nowrap border-b-2 py-2.5 px-2 text-sm font-medium cursor-pointer"),"aria-current":te===ge.id?"page":void 0,onClick:()=>Lt({tab:ge}),"data-testid":`tab-${ge.id}`,children:ge.name},ge.name))}),w.jsxs("div",{className:ae("sm:mt-2.5 py-3.5 relative",C&&Oe===null&&"px-4 sm:p-6",C&&Oe!==null&&"px-4 sm:px-6 sm:pb-6 sm:pt-2.5"),children:[z&&!Ye&&w.jsx(Hc,{className:"w-5 h-5 text-gray-400 cursor-pointer absolute right-4",onClick:tt,"data-testid":`edit-role-${v}`}),_&&w.jsx("div",{className:"flex justify-center mt-5",children:w.jsx(Qn,{})}),X&&St()&&we&&!_&&(z?!Ye:!R)&&w.jsx("p",{className:"text-gray-800 text-center","data-testid":"records-empty",children:"No hay registros para mostrar"}),!_&&a.map((ge,st)=>w.jsxs("div",{className:ae("flex flex-col 3xs:flex-row mb-4",C&&"ml-0 3xs:ml-3"),children:[typeof e=="function"?e({item:ge,index:st,handleChange:$e,isEdit:z?Ye:R}):e,k&&(z?Ye:R)&&w.jsx("div",{style:{backgroundColor:"#B0B8BF",width:"25px",height:"25px"},className:ae("rounded-full flex justify-center items-center mt-4 3xs:mt-7 ml-2 3xs:ml-5 self-start 3xs:self-center",a.length===1&&!R&&"opacity-0"),children:w.jsx(ud,{className:ae("w-6 h-4",(a.length>1||R)&&"cursor-pointer"),style:{color:"#637381"},strokeWidth:2.5,onClick:()=>lt({index:st,item:ge}),"data-testid":`delete-item-${st}-${v}`})})]},st)),k&&(z?Ye:R)&&!_&&w.jsx("p",{className:"text-secondary-2 text-sm font-medium ml-3 cursor-pointer",onClick:We,"data-testid":`add-item-${v}`,style:{width:"fit-content"},children:`+ Añadir ${f}`})]})]})})]})},wd=({src:e,alt:o,width:r,height:n,className:u="",priority:f=!1,style:a={},id:m="",onClick:v=null})=>{const[x,E]=g.useState(!1),k={filter:x?"none":"blur(10px)",transition:"filter 0.3s ease-out",objectFit:"cover",...r?{width:r}:{},...n?{height:n}:{},...a};return w.jsx("img",{src:e,alt:o,...r?{width:r}:{},...n?{height:n}:{},className:ae(u!==""&&u),loading:f?"eager":"lazy",decoding:"async",style:k,onLoad:()=>E(!0),"data-testid":`image-${m}`,onClick:v})},Ed=["icon-analytics-alt-1","icon-bell-remove","icon-calculator-alt","icon-cart-full","icon-cloud-sun","icon-coding","icon-cottage-alt","icon-flag-alt","icon-gallery","icon-grow","icon-head-idea","icon-idea-share","icon-highlight-alt","icon-invention","icon-Jurisdiction","icon-layout-2","icon-lock","icon-map-alt","icon-megaphone","icon-personal-data","icon-personal-file","icon-phone-ring","icon-pie-chart-dollar","icon-pointer-right","icon-portfolio","icon-presentation-chart-line","icon-pyramid","icon-puzzle","icon-revenue","icon-rocket-growth-2","icon-ruler-pencil","icon-save","icon-search-home","icon-shoe-print","icon-strategy","icon-target","icon-time-settings","icon-vector-1","icon-user-alt-3","icon-world-2","icon-write","icon-website-money","icon-website","icon-alarm-clock","icon-arc","icon-bot","icon-control-panel","icon-corner","icon-dashboard","icon-full-battery","icon-help","icon-networking-startup","icon-share-alt","icon-thumbnail","icon-ux","icon-travel","icon-music","icon-heart","icon-book-mark","icon-map-pin","icon-star","icon-microphone","icon-clipboard-document","icon-arrow-down-tray"];function Sd({value:e,onChange:o,disabled:r,id:n,label:u="",classNameLabel:f="",helperText:a="",isError:m=!1,isReadOnly:v=!1,name:x}){const[E,k]=g.useState(!1),P=g.useRef(null);g.useEffect(()=>{function M(R){E&&P.current&&!P.current.contains(R.target)&&k(!1)}return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[E]);const C=Zt({"border-red-300 focus:border-red-300 text-red-900":m&&!v,"text-gray-500":!m,"focus:border-primary-7":!m&&!v});return w.jsxs(w.Fragment,{children:[u!==""&&w.jsx("p",{className:ln.classNames("block text-sm font-medium leading-6",f!==""?f:"text-gray-700"),"data-testid":`label-${n}`,children:u}),w.jsxs("div",{style:{position:"relative",width:"100%"},className:ln.classNames("border rounded-md",C),ref:P,children:[w.jsxs("div",{className:"flex items-center gap-2 dropdown-trigger border border-default-2 rounded-md p-1.5",onClick:()=>!r&&k(!E),style:{cursor:r?"not-allowed":"pointer"},title:e||"Selecciona un icono","data-testid":"open",children:[w.jsx("div",{className:"rounded border border-default-2 p-1 h-6 w-6 bg-default-2 flex items-center justify-center",children:e&&w.jsx("i",{className:ln.classNames(e,"text-normal block")})}),w.jsx("div",{className:"truncate",style:{width:"136px"},children:e}),w.jsx(al,{className:ln.classNames("h-5 w-5 ml-auto transition-transform",{"transform rotate-180":E})})]}),E&&w.jsx("div",{className:"openIconSelect absolute z-10 bg-white p-3 rounded-lg",style:{top:48,left:"0",width:"100%",maxWidth:500,border:"1px solid #ccc",boxShadow:"0 2px 8px rgba(0,0,0,0.15)",maxHeight:300,overflowY:"auto"},children:w.jsx("div",{className:"grid w-full",style:{gridTemplateColumns:"repeat(auto-fill, minmax(30px, 1fr))",gap:12},children:Ed.map(M=>w.jsx("button",{type:"button",className:"icon-picker-btn",style:{width:"100%",aspectRatio:"1",borderRadius:4,border:e===M?"2px solid #007bff":"1px solid #eee",background:"#f9f9f9",display:"flex",alignItems:"center",justifyContent:"center",fontSize:20,color:e===M?"#007bff":"#333",outline:"none",cursor:"pointer"},onClick:()=>{o({target:{value:M,checked:!1,name:x,id:n}}),k(!1)},title:M,children:w.jsx("i",{className:M})},M))})})]}),a.length>0&&m&&w.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${n}`,children:a})]})}const Dr=(e,o,r)=>{const n=r*o,u=n*(1-Math.abs(e/60%2-1)),f=r-n;let a,m,v;return e<60?[a,m,v]=[n,u,0]:e<120?[a,m,v]=[u,n,0]:e<180?[a,m,v]=[0,n,u]:e<240?[a,m,v]=[0,u,n]:e<300?[a,m,v]=[u,0,n]:[a,m,v]=[n,0,u],[Math.round((a+f)*255),Math.round((m+f)*255),Math.round((v+f)*255)]},Do=(e,o,r)=>{e/=255,o/=255,r/=255;const n=Math.max(e,o,r),u=Math.min(e,o,r),f=n-u;let a;const m=n,v=n===0?0:f/n;if(n===u)a=0;else{switch(n){case e:a=(o-r)/f+(o<r?6:0);break;case o:a=(r-e)/f+2;break;case r:a=(e-o)/f+4;break}a*=60}return[a,v,m]},er=(e,o,r)=>"#"+[e,o,r].map(n=>n.toString(16).padStart(2,"0")).join("").toUpperCase(),dl=e=>/^#[0-9A-Fa-f]{6}$/.test(e)?[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16)]:[255,0,0];function Cd({value:e,onChange:o,disabled:r,label:n="",classNameLabel:u="",helperText:f="",isError:a=!1,isReadOnly:m=!1,name:v}){const x=g.useRef(!0),E=g.useRef(null),k=g.useRef(null),[P,C]=g.useState(!1),[M,R]=g.useState([182.2,.849,.494]),[L,B]=g.useState(e),_=g.useCallback(q=>{o({target:{value:q,name:v}})},[v,o]);g.useEffect(()=>{if(e&&/^#[0-9A-Fa-f]{6}$/.test(e)){const q=dl(e);R(Do(...q)),B(e.toUpperCase())}},[e]);const[z,X,ee]=M,[ue,we,Oe]=Dr(z,X,ee),be=er(ue,we,Oe);g.useEffect(()=>{B(be)},[be]),g.useEffect(()=>{!x.current||m||(x.current=!1,_(be))},[be,_,m]),g.useEffect(()=>{function q(ve){if(!E.current||!E.current._dragging)return;const $e=E.current.getBoundingClientRect();let We=(ve.touches?ve.touches[0].clientX:ve.clientX)-$e.left,lt=(ve.touches?ve.touches[0].clientY:ve.clientY)-$e.top;We=Math.max(0,Math.min($e.width,We)),lt=Math.max(0,Math.min($e.height,lt));const tt=We/$e.width,St=1-lt/$e.height;R([z,tt,St]);const[Lt,ge,st]=Dr(z,tt,St),re=er(Lt,ge,st);B(re),_(re)}function te(){E.current&&(E.current._dragging=!1),window.removeEventListener("mousemove",q),window.removeEventListener("mouseup",te),window.removeEventListener("touchmove",q),window.removeEventListener("touchend",te)}return E.current&&E.current._dragging&&(window.addEventListener("mousemove",q),window.addEventListener("mouseup",te),window.addEventListener("touchmove",q),window.addEventListener("touchend",te)),()=>{window.removeEventListener("mousemove",q),window.removeEventListener("mouseup",te),window.removeEventListener("touchmove",q),window.removeEventListener("touchend",te)}},[_,z]),g.useEffect(()=>{function q(te){P&&k.current&&!k.current.contains(te.target)&&C(!1)}return document.addEventListener("mousedown",q),()=>document.removeEventListener("mousedown",q)},[P]);const y=q=>{if(!E.current)return;const te=E.current.getBoundingClientRect();let ve=(q.touches?q.touches[0].clientX:q.clientX)-te.left,$e=(q.touches?q.touches[0].clientY:q.clientY)-te.top;ve=Math.max(0,Math.min(te.width,ve)),$e=Math.max(0,Math.min(te.height,$e));const We=ve/te.width,lt=1-$e/te.height;R([z,We,lt]);const[tt,St,Lt]=Dr(z,We,lt),ge=er(tt,St,Lt);B(ge),_(ge)},he=q=>{r||(E.current&&(E.current._dragging=!0),y(q))},Pe=()=>{E.current&&(E.current._dragging=!1)},Ze=q=>{const te=Number(q.target.value);R([te,X,ee]);const[ve,$e,We]=Dr(te,X,ee),lt=er(ve,$e,We);B(lt),_(lt)},Ye=q=>{const te=q.target.value;if(B(te),/^#[0-9A-Fa-f]{6}$/.test(te)){const ve=dl(te);R(Do(...ve)),_(te.toUpperCase())}},Y=(q,te)=>{const ve=[ue,we,Oe];ve[q]=Math.max(0,Math.min(255,Number(te)||0)),R(Do(...ve));const $e=er(...ve);B($e),_($e)},Je=X*180,Re=(1-ee)*180;return w.jsxs(w.Fragment,{children:[n&&w.jsx("p",{className:Zt("block text-sm font-medium leading-6",u||"text-gray-700"),children:n}),w.jsxs("div",{style:{position:"relative",display:"inline-block"},ref:k,className:"w-full",children:[w.jsxs("div",{className:"flex items-center gap-2 mb-2 dropdown-trigger rounded-md border p-2 border-default-2 w-full",onClick:()=>!r&&C(!P),children:[w.jsx("div",{className:"rounded border border-default-2 flex-shrink-0 w-6 h-6",style:{backgroundColor:m?"":be}}),w.jsx("input",{type:"text",className:"px-2 py-1 border-b border-t-0 border-l-0 border-r-0 border-default-7 text-xs focus:border-default-5 focus:ring-0 w-full",value:m?"":L,disabled:r,onChange:Ye,readOnly:m}),w.jsx(Po,{className:Zt("h-5 w-5 ml-2 transition-transform",{"transform rotate-180":P&&!m})})]}),P&&!m&&w.jsxs("div",{className:"openSketch absolute z-20 top-14 left-0 bg-white border border-default-5 rounded-md p-4 shadow-md w-full",children:[w.jsxs("div",{className:"relative rounded mb-2 cursor-crosshair",ref:E,style:{backgroundColor:`hsl(${z}, 100%, 50%)`,height:"200px"},onMouseDown:he,onMouseMove:q=>E.current&&E.current._dragging&&y(q),onMouseUp:Pe,onMouseLeave:Pe,onTouchStart:he,onTouchMove:q=>E.current&&E.current._dragging&&y(q),onTouchEnd:Pe,children:[w.jsx("div",{style:{position:"absolute",inset:0,background:"linear-gradient(to right, #fff, transparent)",borderRadius:"inherit",pointerEvents:"none"}}),w.jsx("div",{style:{position:"absolute",inset:0,background:"linear-gradient(to top, #000, transparent)",borderRadius:"inherit",pointerEvents:"none"}}),w.jsx("div",{className:"absolute w-4 h-4 rounded-full border-2 border-white shadow",style:{left:`calc(${Je}px - 8px)`,top:`calc(${Re}px - 8px)`,background:be,pointerEvents:"none"}})]}),w.jsx("input",{type:"range",min:0,max:359,value:z,onChange:Ze,className:"w-full mb-2",style:{background:"linear-gradient(to right, red, yellow, lime, cyan, blue, magenta, red)"},disabled:r}),w.jsx("div",{className:"flex gap-2 mb-2",children:["R","G","B"].map((q,te)=>w.jsxs("div",{children:[w.jsx("label",{className:"text-center block",children:q}),w.jsx("input",{type:"number",min:0,max:255,className:"w-14 px-2 py-1 border border-gray-300 rounded text-sm",value:[ue,we,Oe][te],onChange:ve=>Y(te,ve.target.value),disabled:r,placeholder:q})]},te))})]})]}),f&&a&&w.jsx("p",{className:"text-red-600 text-sm text-left mt-1",children:f})]})}const jd=["#FFCEC7","#2ecc71","#3498db","#9b59b6","#34495e","#1abc9c","#e74c3c","#7f8c8d","#f1c40f","#e67e22","#000000"],Td=({className:e="",label:o="",onChange:r,name:n,id:u,value:f="#FFCEC7"})=>{const[a,m]=g.useState(!1),[v,x]=g.useState("#FFCEC7");mi({id:"menu-colors",close:()=>m(!1)}),g.useEffect(()=>{x(f)},[f]);const E=k=>{x(k),m(!1),r({target:{value:k,checked:!1,name:n,type:void 0,id:u}})};return w.jsxs("div",{className:ae("relative",e!==""&&e),children:[o&&w.jsx("p",{className:"text-sm font-medium leading-6 text-gray-500 mb-0.5",children:o}),w.jsxs("div",{className:"flex justify-center items-center bg-gray-100 px-3 rounded-md h-10 w-20 gap-4 cursor-pointer",onClick:()=>m(!a),id:"menu-colors","data-testid":"menu-colors",children:[w.jsx("div",{style:{width:"18px",height:"18px",backgroundColor:v},className:"rounded-full"}),w.jsx(Po,{className:ae("h-5 w-5 transition-transform",a&&"transform rotate-180")})]}),w.jsx(vn,{show:a,enter:"transition-opacity duration-75",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-opacity duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",id:"menu-colors",className:"absolute top-full",children:w.jsx("div",{id:"menu-colors",className:"bg-gray-100 shadow grid gap-2 p-2 mt-2 rounded",style:{gridTemplateColumns:"repeat(auto-fill, minmax(17px, 1fr))",maxWidth:"180px"},children:jd.map((k,P)=>w.jsx("div",{style:{width:"17px",height:"17px",backgroundColor:k},className:"rounded-full cursor-pointer flex justify-center items-center",onClick:()=>E(k),"data-testid":`color-${P}`,children:v===k&&w.jsx(Nc,{className:"w-3 h-3 text-white",stroke:"2"})},P))})})]})};Se.Accordion=yd,Se.Alert=Dc,Se.Avatar=Kc,Se.Bullets=Xc,Se.ButtonOutline=sl,Se.ButtonPagination=Qc,Se.ButtonSolid=Jn,Se.Checkbox=ed,Se.ConfirmationAbandoningCreation=cd,Se.CoverPhoto=xd,Se.Divider=dd,Se.Dropdown=gd,Se.GoBack=fd,Se.IconSelectPicker=Sd,Se.Image=wd,Se.Input=Lo,Se.InputDropdown=md,Se.MESSAGE_ABORT_CONTROLLER=is,Se.MESSAGE_SIGNAL_ABORTED_WITHOUT_REASON=ls,Se.Modal=ul,Se.Pagination=bd,Se.Select=cl,Se.SelectColor=Td,Se.SketchColorPicker=Cd,Se.Spinner=pd,Se.SpinnerIcon=Qn,Se.Switch=hd,Se.Textarea=vd,Se.Tooltip=Ro,Se.classNames=ae,Se.copyOptions=eo,Se.generateAvatarInitials=ns,Se.groupBy=rs,Se.isPromise=os,Se.rowsPerPage=Ao,Se.useCloseModal=mi,Se.useForm=ss,Se.useMediaQuery=as,Se.useWindowDimensions=hi,Se.validateEmail=pi,Object.defineProperty(Se,Symbol.toStringTag,{value:"Module"})});
121
+ `}),w.jsx(Fr.Button,{as:"div",onClick:()=>ge(X),"data-testid":`menu-button-${ee}`,ref:$e,children:e}),!Je&&w.jsx("div",{className:se("absolute right-0 z-20",n,X&&"hidden",C&&"w-full"),children:w.jsx(vn,{as:g.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:q,children:w.jsx(Fr.Items,{className:se("mt-1 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",C?"w-full":f===""&&"w-max",f!==""&&f),children:C?w.jsx("div",{className:"flex justify-center py-4",children:w.jsx(Qn,{})}):w.jsxs("div",{className:se(!_&&"pb-1",r!==""&&r,Oe&&"w-custom"),"data-testid":"dropdown-menu",onScroll:te,children:[w.jsxs("div",{className:"sticky top-0 bg-white w-full",children:[M!==null&&w.jsx("div",{className:se("py-2 w-full",a),children:w.jsx(Lo,{htmlFor:"search",id:`dropdown-search-${ee}`,name:"search",type:"text",placeholder:R,handleChange:V=>M(V,ee),icon:R!==""&&w.jsx(zc,{className:"w-4 h-4 text-primary-4"}),className:"pl-5 pr-4 h-8",classNameContainerInput:"w-full",value:L,onKeyDown:V=>V.key===" "&&V.stopPropagation(),autocomplete:"off"})}),Pe!==null&&w.jsxs("div",{className:se("pt-1.5 justify-end flex items-center",a),children:[w.jsx(Jn,{classNameButton:se("bg-gray-400 hover:bg-gray-400 font-medium px-2 py-1.5 rounded-md",We.size>0?"opacity-1 cursor-pointer":"opacity-0 cursor-default"),outline:"",classNameText:"text-xs text-white text-center",id:"delete",onClick:re,children:"Descartar"}),w.jsx(Jn,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 font-medium px-2 py-1.5 rounded-md",outline:We.size===0&&Re?"":"0px 0px 0px 2px #3758F9, 0px 0px 0px 2px #243BBD, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameText:"text-xs text-white text-center",id:"apply",disabled:We.size===0&&Re,onClick:()=>Pe({id:ee,items:Array.from(tt.values())}),children:Ze})]})]}),be&&w.jsx("div",{className:"flex flex-wrap ml-7 pt-1",children:Array.from(tt).map((V,Ee)=>w.jsx("div",{className:"mr-1",children:w.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:[V[1][x],w.jsx("button",{type:"button",className:"p-0.5 rounded-sm bg-gray-100 hover:bg-gray-300",onClick:()=>st(V[1]),"data-testid":`tag-${V[0]}`,children:w.jsx(qc,{className:"h-2.5 w-2.5 stroke-gray-700/50 group-hover:stroke-gray-700/75"})})]})},V))}),w.jsx("div",{className:"divide-y divide-gray-100",children:o.map((V,Ee)=>w.jsx("div",{className:se(!_&&"py-1",z&&Ee===0&&"sticky top-0"),children:_?w.jsx("div",{onClick:ke=>{ke.preventDefault(),v()},"data-testid":`item-component-${Ee}`,children:V}):w.jsx(Fr.Item,{children:w.jsx("span",{className:se(We.has(V[E])&&"blue text-white",!We.has(V[E])&&"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-${Ee}`,onClick:ke=>{ke.preventDefault(),Lt(V)},children:Ce(V[x])})})},Ee))})]})})})})]})},Ao=50,bd=({total:e,handleNext:o,handlePrev:r,handleSelectPage:n,page:u=null,pageSize:f=Ao})=>{const[a,m]=g.useState(1),[v,x]=g.useState([]),[E,k]=g.useState([]),[P,C]=g.useState(""),M=Math.ceil(e/f);g.useEffect(()=>{const z=[];for(let X=1;X<=M;X++)z.push(X);k(z)},[M]),g.useEffect(()=>{let z=[];const X="...",ee="... ",ue=" ...";if(E.length<6)z=E;else if(a>=1&&a<=3)z=[1,2,3,4,X,E.length];else if(a===4)z=[...E.slice(0,5),X,E.length];else if(a>4&&a<E.length-2){const we=E.slice(a-2,a),Oe=E.slice(a,a+1);z=[1,ee,...we,...Oe,ue,E.length]}else if(a>E.length-3){const we=E.slice(E.length-4);z=[1,ee,...we]}x(z)},[a,E]),g.useEffect(()=>{u!==null&&u!==a&&m(u)},[u,a]);const R=z=>{C(""),m(z),n(z)},L=()=>{C(""),a>1&&m(a-1),a>1&&r(a-1)},B=()=>{C(""),a<E.length&&m(a+1),a<E.length&&o(a+1)},_=z=>{const{value:X}=z.target;if(!/^\d*$/.test(X))return;const ee=Math.ceil(e/Ao);X>ee||C(X)};return g.useEffect(()=>{const z=setTimeout(()=>{const X=Number(P);!isNaN(X)&&X>=1&&X<=M&&(n(X),m(X))},500);return()=>clearTimeout(z)},[P,M,n]),w.jsxs("nav",{className:"flex items-center justify-between border-t border-gray-200 px-4 sm:px-0",children:[w.jsx("div",{className:"-mt-px flex w-0 flex-1",children:w.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:L,"data-testid":"prev",children:[w.jsx(wc,{className:"mr-3 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Anterior"]})}),w.jsxs("div",{className:"hidden md:-mt-px md:flex",children:[w.jsxs("div",{children:[w.jsx("span",{className:"text-sm text-gray-500 font-medium mr-1",children:"Ir a"}),w.jsx("div",{className:"inline-flex items-center border-t-2 pr-2 pt-1 text-sm font-medium border-transparent text-gray-500",style:{width:"45px"},children:w.jsx(ln.Input,{htmlFor:"",id:"pager",name:"pager",handleChange:_,value:P,className:"pl-1.5 pr-1 h-7"})})]}),v.map((z,X)=>w.jsx(ln.ButtonPagination,{className:ln.classNames("inline-flex items-center border-t-2 px-4 pt-4 text-sm font-medium",a===z?"border-primary-6 text-primary-7":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700"),"aria-current":"page",onClick:()=>z!=="..."&&z!==" ..."&&z!=="... "&&R(z),id:`page-${X+1}`,children:z},X))]}),w.jsx("div",{className:"-mt-px flex w-0 flex-1 justify-end",children:w.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:B,"data-testid":"next",children:["Siguiente",w.jsx(Sc,{className:"ml-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]})})]})},xd=({setForm:e,setValuesDefault:o,className:r="",classNameContainer:n="",classNameContainerImg:u="",src:f=null,alt:a=null,width:m,height:v,title:x="Logo (Opcional)",fileFormatsDescription:E="PNG, JPG, GIF up to 10MB"})=>{const k=f===null?"":f.split("."),P=C=>{const{files:M}=C.target,[R]=M,L=new FileReader;L.readAsDataURL(R),L.onload=function(){R.type.startsWith("image/")?(e(_=>({..._,photo:L.result})),o("photo",L.result)):(e(_=>({..._,photo:"https://cdn.pixabay.com/photo/2017/03/08/21/21/file-2127833_1280.png"})),o("photo",L.result))}};return w.jsxs("div",{className:se("col-span-full",n!==""&&n),children:[w.jsx("label",{htmlFor:"cover-photo",className:"block text-sm font-medium leading-6 text-gray-500",children:x}),w.jsxs("div",{className:se("mt-2 flex justify-center rounded-lg border-2 border-dotted border-gray-300 cursor-pointer relative",u!==""&&u),children:[f?w.jsx("img",{src:/(jpg|png|jpe?g|gif|webp|svg)$/i.test(k[k.length-1])||f.startsWith("data:image/")?f:"https://cdn.pixabay.com/photo/2017/03/08/21/21/file-2127833_1280.png",alt:a,width:m,height:v,className:se(r!==""&&r),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s",objectFit:"contain",height:v},onLoad:C=>C.currentTarget.style.filter="none","data-testid":"img"}):w.jsxs("div",{className:"text-center",children:[w.jsx(Vc,{"aria-hidden":"true",className:"mx-auto h-12 w-12 text-gray-300"}),w.jsxs("div",{className:"mt-4 flex text-sm leading-6 text-gray-600",children:[w.jsx("label",{htmlFor:"file-upload",className:"relative cursor-pointer rounded-md bg-white font-semibold text-primary-7 focus-within:outline-none focus-within:ring-2 focus-within:ring-primary-7 focus-within:ring-offset-2 hover:text-primary-6",children:w.jsx("span",{children:"Subir un archivo"})}),w.jsx("p",{className:"pl-1",children:"o arrástralo y suéltalo aquí"})]}),w.jsx("p",{className:"text-xs leading-5 text-gray-600",children:E})]}),w.jsx("input",{id:"file-upload",name:"file-upload",type:"file",className:"absolute w-full h-full opacity-0 cursor-pointer",onChange:P})]})]})},yd=({children:e,openDefault:o=!1,setForm:r,setValuesDefault:n,title:u,type:f,data:a,setData:m,id:v,defaultData:x,showAlert:E,isAdd:k=!0,search:P=null,isPadding:C=!0,isReadOnly:M=!1,isEdit:R=!1,deleteItem:L=null,validateAdd:B=null,loading:_=!1,internalEdit:z=!0,isDataEmpty:X=!0,typeProp:ee="value",setAdd:ue=null,hasNoRecords:we=!0,tabs:Oe=null,selectTab:be=null,className:y="mt-7"})=>{const[Pe,Ze]=g.useState(!1),[Ye,Y]=g.useState(!1),[,Je]=g.useState(!1),[Re,q]=g.useState(""),[te,ve]=g.useState(1);g.useEffect(()=>{Ze(o),Je(M)},[o,M]);const $e=({e:ge,index:st})=>{const re=eo(a),{name:Ce,value:V}=ge.target;!(B===null?!1:B({value:V,copyData:re,index:st}))&&(re[st][Ce]=V),m(re),n(v,re),r(ke=>({...ke,[v]:re}))},We=()=>{if(a.some(st=>Object.values(st).some(V=>V[ee]===-1))||a.length===0)return E({title:"",message:"Todos los campos son requeridos",type:"warning"});r(st=>({...st,data:a})),n(v,a),m([...a,x]),ue&&ue([...a,x])},lt=({index:ge,item:st})=>{if(a.length===1&&!R)return;let re=eo(a);re.length===1&&(re=[x]),re.length>1&&re.splice(ge,1),r(Ce=>({...Ce,data:re})),n(v,re),m(re),L&&L({index:ge,item:st,data:re}),ge===a.length-1&&R&&re.length===0&&(r(Ce=>({...Ce,data:re})),n(v,re),m([...re,x]))},tt=()=>{Y(!Ye),Je(!1)},St=()=>{if(a.length>1)return;if(a.length===0)return!0;const[ge]=a;return!ge||typeof ge!="object"?!0:Object.keys(ge).filter(Ce=>{const V=ge[Ce];return V&&typeof V=="object"&&"value"in V}).every(Ce=>ge[Ce].value===-1)},Lt=({tab:ge})=>{ve(ge.id),be&&be({tab:ge})};return w.jsxs("div",{className:se("divide-y divide-gray-200 rounded-lg bg-white shadow",y),children:[w.jsxs("div",{className:"px-4 py-3.5 sm:px-6 flex justify-between items-center cursor-pointer",onClick:()=>Ze(!Pe),"data-testid":`open-accordion-${v}`,children:[typeof u=="string"?w.jsx("p",{className:"text-gray-500 uppercase text-xs font-bold",children:u}):u,w.jsxs("div",{className:"flex items-center",children:[P&&w.jsx(Lo,{htmlFor:"search",id:"search",name:"search",type:"text",autoComplete:"search",placeholder:"Buscar...",handleChange:ge=>{P(ge),q(ge.target.value)},icon:w.jsx(sd,{className:"w-6 h-6 text-primary-4"}),className:"h-9",classNameContainerInput:"w-52 2xs:w-64 max-w-64 mr-8 hidden sm:block",value:Re,onClick:ge=>ge.stopPropagation(),onFocus:()=>Ze(!0)}),Pe?w.jsx(id,{className:"w-5 h-5 text-default-4"}):w.jsx(al,{className:"w-5 h-5 text-default-4"})]})]}),w.jsx(vn,{as:g.Fragment,show:Pe,enter:"transition duration-[400ms]",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-200 transition ease-in-out",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:w.jsxs("div",{children:[Oe&&w.jsx("nav",{className:"flex justify-center border-b border-gray-200","aria-label":"Tabs",children:Oe.map(ge=>w.jsx("span",{className:se(te===ge.id?"border-primary-6 text-gray-900":"border-gray-300 text-gray-500 hover:border-primary-6","whitespace-nowrap border-b-2 py-2.5 px-2 text-sm font-medium cursor-pointer"),"aria-current":te===ge.id?"page":void 0,onClick:()=>Lt({tab:ge}),"data-testid":`tab-${ge.id}`,children:ge.name},ge.name))}),w.jsxs("div",{className:se("sm:mt-2.5 py-3.5 relative",C&&Oe===null&&"px-4 sm:p-6",C&&Oe!==null&&"px-4 sm:px-6 sm:pb-6 sm:pt-2.5"),children:[z&&!Ye&&w.jsx(Hc,{className:"w-5 h-5 text-gray-400 cursor-pointer absolute right-4",onClick:tt,"data-testid":`edit-role-${v}`}),_&&w.jsx("div",{className:"flex justify-center mt-5",children:w.jsx(Qn,{})}),X&&St()&&we&&!_&&(z?!Ye:!R)&&w.jsx("p",{className:"text-gray-800 text-center","data-testid":"records-empty",children:"No hay registros para mostrar"}),!_&&a.map((ge,st)=>w.jsxs("div",{className:se("flex flex-col 3xs:flex-row mb-4",C&&"ml-0 3xs:ml-3"),children:[typeof e=="function"?e({item:ge,index:st,handleChange:$e,isEdit:z?Ye:R}):e,k&&(z?Ye:R)&&w.jsx("div",{style:{backgroundColor:"#B0B8BF",width:"25px",height:"25px"},className:se("rounded-full flex justify-center items-center mt-4 3xs:mt-7 ml-2 3xs:ml-5 self-start 3xs:self-center",a.length===1&&!R&&"opacity-0"),children:w.jsx(ud,{className:se("w-6 h-4",(a.length>1||R)&&"cursor-pointer"),style:{color:"#637381"},strokeWidth:2.5,onClick:()=>lt({index:st,item:ge}),"data-testid":`delete-item-${st}-${v}`})})]},st)),k&&(z?Ye:R)&&!_&&w.jsx("p",{className:"text-secondary-2 text-sm font-medium ml-3 cursor-pointer",onClick:We,"data-testid":`add-item-${v}`,style:{width:"fit-content"},children:`+ Añadir ${f}`})]})]})})]})},wd=({src:e,alt:o,width:r,height:n,className:u="",priority:f=!1,style:a={},id:m="",onClick:v=null})=>{const[x,E]=g.useState(!1),k={filter:x?"none":"blur(10px)",transition:"filter 0.3s ease-out",objectFit:"cover",...r?{width:r}:{},...n?{height:n}:{},...a};return w.jsx("img",{src:e,alt:o,...r?{width:r}:{},...n?{height:n}:{},className:se(u!==""&&u),loading:f?"eager":"lazy",decoding:"async",style:k,onLoad:()=>E(!0),"data-testid":`image-${m}`,onClick:v})},Ed=["icon-analytics-alt-1","icon-bell-remove","icon-calculator-alt","icon-cart-full","icon-cloud-sun","icon-coding","icon-cottage-alt","icon-flag-alt","icon-gallery","icon-grow","icon-head-idea","icon-idea-share","icon-highlight-alt","icon-invention","icon-Jurisdiction","icon-layout-2","icon-lock","icon-map-alt","icon-megaphone","icon-personal-data","icon-personal-file","icon-phone-ring","icon-pie-chart-dollar","icon-pointer-right","icon-portfolio","icon-presentation-chart-line","icon-pyramid","icon-puzzle","icon-revenue","icon-rocket-growth-2","icon-ruler-pencil","icon-save","icon-search-home","icon-shoe-print","icon-strategy","icon-target","icon-time-settings","icon-vector-1","icon-user-alt-3","icon-world-2","icon-write","icon-website-money","icon-website","icon-alarm-clock","icon-arc","icon-bot","icon-control-panel","icon-corner","icon-dashboard","icon-full-battery","icon-help","icon-networking-startup","icon-share-alt","icon-thumbnail","icon-ux","icon-travel","icon-music","icon-heart","icon-book-mark","icon-map-pin","icon-star","icon-microphone","icon-clipboard-document","icon-arrow-down-tray"];function Sd({value:e,onChange:o,disabled:r,id:n,label:u="",classNameLabel:f="",helperText:a="",isError:m=!1,isReadOnly:v=!1,name:x}){const[E,k]=g.useState(!1),P=g.useRef(null);g.useEffect(()=>{function M(R){E&&P.current&&!P.current.contains(R.target)&&k(!1)}return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[E]);const C=Zt({"border-red-300 focus:border-red-300 text-red-900":m&&!v,"text-gray-500":!m,"focus:border-primary-7":!m&&!v});return w.jsxs(w.Fragment,{children:[u!==""&&w.jsx("p",{className:ln.classNames("block text-sm font-medium leading-6",f!==""?f:"text-gray-700"),"data-testid":`label-${n}`,children:u}),w.jsxs("div",{style:{position:"relative",width:"100%"},className:ln.classNames("border rounded-md",C),ref:P,children:[w.jsxs("div",{className:"flex items-center gap-2 dropdown-trigger border border-default-2 rounded-md p-1.5",onClick:()=>!r&&k(!E),style:{cursor:r?"not-allowed":"pointer"},title:e||"Selecciona un icono","data-testid":"open",children:[w.jsx("div",{className:"rounded border border-default-2 p-1 h-6 w-6 bg-default-2 flex items-center justify-center",children:e&&w.jsx("i",{className:ln.classNames(e,"text-normal block")})}),w.jsx("div",{className:"truncate",style:{width:"136px"},children:e}),w.jsx(al,{className:ln.classNames("h-5 w-5 ml-auto transition-transform",{"transform rotate-180":E})})]}),E&&w.jsx("div",{className:"openIconSelect absolute z-10 bg-white p-3 rounded-lg",style:{top:48,left:"0",width:"100%",maxWidth:500,border:"1px solid #ccc",boxShadow:"0 2px 8px rgba(0,0,0,0.15)",maxHeight:300,overflowY:"auto"},children:w.jsx("div",{className:"grid w-full",style:{gridTemplateColumns:"repeat(auto-fill, minmax(30px, 1fr))",gap:12},children:Ed.map(M=>w.jsx("button",{type:"button",className:"icon-picker-btn",style:{width:"100%",aspectRatio:"1",borderRadius:4,border:e===M?"2px solid #007bff":"1px solid #eee",background:"#f9f9f9",display:"flex",alignItems:"center",justifyContent:"center",fontSize:20,color:e===M?"#007bff":"#333",outline:"none",cursor:"pointer"},onClick:()=>{o({target:{value:M,checked:!1,name:x,id:n}}),k(!1)},title:M,children:w.jsx("i",{className:M})},M))})})]}),a.length>0&&m&&w.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${n}`,children:a})]})}const Dr=(e,o,r)=>{const n=r*o,u=n*(1-Math.abs(e/60%2-1)),f=r-n;let a,m,v;return e<60?[a,m,v]=[n,u,0]:e<120?[a,m,v]=[u,n,0]:e<180?[a,m,v]=[0,n,u]:e<240?[a,m,v]=[0,u,n]:e<300?[a,m,v]=[u,0,n]:[a,m,v]=[n,0,u],[Math.round((a+f)*255),Math.round((m+f)*255),Math.round((v+f)*255)]},Do=(e,o,r)=>{e/=255,o/=255,r/=255;const n=Math.max(e,o,r),u=Math.min(e,o,r),f=n-u;let a;const m=n,v=n===0?0:f/n;if(n===u)a=0;else{switch(n){case e:a=(o-r)/f+(o<r?6:0);break;case o:a=(r-e)/f+2;break;case r:a=(e-o)/f+4;break}a*=60}return[a,v,m]},er=(e,o,r)=>"#"+[e,o,r].map(n=>n.toString(16).padStart(2,"0")).join("").toUpperCase(),dl=e=>/^#[0-9A-Fa-f]{6}$/.test(e)?[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16)]:[255,0,0];function Cd({value:e,onChange:o,disabled:r,label:n="",classNameLabel:u="",helperText:f="",isError:a=!1,isReadOnly:m=!1,name:v}){const x=g.useRef(!0),E=g.useRef(null),k=g.useRef(null),[P,C]=g.useState(!1),[M,R]=g.useState([182.2,.849,.494]),[L,B]=g.useState(e),_=g.useCallback(q=>{o({target:{value:q,name:v}})},[v,o]);g.useEffect(()=>{if(e&&/^#[0-9A-Fa-f]{6}$/.test(e)){const q=dl(e);R(Do(...q)),B(e.toUpperCase())}},[e]);const[z,X,ee]=M,[ue,we,Oe]=Dr(z,X,ee),be=er(ue,we,Oe);g.useEffect(()=>{B(be)},[be]),g.useEffect(()=>{!x.current||m||(x.current=!1,_(be))},[be,_,m]),g.useEffect(()=>{function q(ve){if(!E.current||!E.current._dragging)return;const $e=E.current.getBoundingClientRect();let We=(ve.touches?ve.touches[0].clientX:ve.clientX)-$e.left,lt=(ve.touches?ve.touches[0].clientY:ve.clientY)-$e.top;We=Math.max(0,Math.min($e.width,We)),lt=Math.max(0,Math.min($e.height,lt));const tt=We/$e.width,St=1-lt/$e.height;R([z,tt,St]);const[Lt,ge,st]=Dr(z,tt,St),re=er(Lt,ge,st);B(re),_(re)}function te(){E.current&&(E.current._dragging=!1),window.removeEventListener("mousemove",q),window.removeEventListener("mouseup",te),window.removeEventListener("touchmove",q),window.removeEventListener("touchend",te)}return E.current&&E.current._dragging&&(window.addEventListener("mousemove",q),window.addEventListener("mouseup",te),window.addEventListener("touchmove",q),window.addEventListener("touchend",te)),()=>{window.removeEventListener("mousemove",q),window.removeEventListener("mouseup",te),window.removeEventListener("touchmove",q),window.removeEventListener("touchend",te)}},[_,z]),g.useEffect(()=>{function q(te){P&&k.current&&!k.current.contains(te.target)&&C(!1)}return document.addEventListener("mousedown",q),()=>document.removeEventListener("mousedown",q)},[P]);const y=q=>{if(!E.current)return;const te=E.current.getBoundingClientRect();let ve=(q.touches?q.touches[0].clientX:q.clientX)-te.left,$e=(q.touches?q.touches[0].clientY:q.clientY)-te.top;ve=Math.max(0,Math.min(te.width,ve)),$e=Math.max(0,Math.min(te.height,$e));const We=ve/te.width,lt=1-$e/te.height;R([z,We,lt]);const[tt,St,Lt]=Dr(z,We,lt),ge=er(tt,St,Lt);B(ge),_(ge)},he=q=>{r||(E.current&&(E.current._dragging=!0),y(q))},Pe=()=>{E.current&&(E.current._dragging=!1)},Ze=q=>{const te=Number(q.target.value);R([te,X,ee]);const[ve,$e,We]=Dr(te,X,ee),lt=er(ve,$e,We);B(lt),_(lt)},Ye=q=>{const te=q.target.value;if(B(te),/^#[0-9A-Fa-f]{6}$/.test(te)){const ve=dl(te);R(Do(...ve)),_(te.toUpperCase())}},Y=(q,te)=>{const ve=[ue,we,Oe];ve[q]=Math.max(0,Math.min(255,Number(te)||0)),R(Do(...ve));const $e=er(...ve);B($e),_($e)},Je=X*180,Re=(1-ee)*180;return w.jsxs(w.Fragment,{children:[n&&w.jsx("p",{className:Zt("block text-sm font-medium leading-6",u||"text-gray-700"),children:n}),w.jsxs("div",{style:{position:"relative",display:"inline-block"},ref:k,className:"w-full",children:[w.jsxs("div",{className:"flex items-center gap-2 mb-2 dropdown-trigger rounded-md border p-2 border-default-2 w-full",onClick:()=>!r&&C(!P),children:[w.jsx("div",{className:"rounded border border-default-2 flex-shrink-0 w-6 h-6",style:{backgroundColor:m?"":be}}),w.jsx("input",{type:"text",className:"px-2 py-1 border-b border-t-0 border-l-0 border-r-0 border-default-7 text-xs focus:border-default-5 focus:ring-0 w-full",value:m?"":L,disabled:r,onChange:Ye,readOnly:m}),w.jsx(Po,{className:Zt("h-5 w-5 ml-2 transition-transform",{"transform rotate-180":P&&!m})})]}),P&&!m&&w.jsxs("div",{className:"openSketch absolute z-20 top-14 left-0 bg-white border border-default-5 rounded-md p-4 shadow-md w-full",children:[w.jsxs("div",{className:"relative rounded mb-2 cursor-crosshair",ref:E,style:{backgroundColor:`hsl(${z}, 100%, 50%)`,height:"200px"},onMouseDown:he,onMouseMove:q=>E.current&&E.current._dragging&&y(q),onMouseUp:Pe,onMouseLeave:Pe,onTouchStart:he,onTouchMove:q=>E.current&&E.current._dragging&&y(q),onTouchEnd:Pe,children:[w.jsx("div",{style:{position:"absolute",inset:0,background:"linear-gradient(to right, #fff, transparent)",borderRadius:"inherit",pointerEvents:"none"}}),w.jsx("div",{style:{position:"absolute",inset:0,background:"linear-gradient(to top, #000, transparent)",borderRadius:"inherit",pointerEvents:"none"}}),w.jsx("div",{className:"absolute w-4 h-4 rounded-full border-2 border-white shadow",style:{left:`calc(${Je}px - 8px)`,top:`calc(${Re}px - 8px)`,background:be,pointerEvents:"none"}})]}),w.jsx("input",{type:"range",min:0,max:359,value:z,onChange:Ze,className:"w-full mb-2",style:{background:"linear-gradient(to right, red, yellow, lime, cyan, blue, magenta, red)"},disabled:r}),w.jsx("div",{className:"flex gap-2 mb-2",children:["R","G","B"].map((q,te)=>w.jsxs("div",{children:[w.jsx("label",{className:"text-center block",children:q}),w.jsx("input",{type:"number",min:0,max:255,className:"w-14 px-2 py-1 border border-gray-300 rounded text-sm",value:[ue,we,Oe][te],onChange:ve=>Y(te,ve.target.value),disabled:r,placeholder:q})]},te))})]})]}),f&&a&&w.jsx("p",{className:"text-red-600 text-sm text-left mt-1",children:f})]})}const jd=["#FFCEC7","#2ecc71","#3498db","#9b59b6","#34495e","#1abc9c","#e74c3c","#7f8c8d","#f1c40f","#e67e22","#000000"],Td=({className:e="",label:o="",onChange:r,name:n,id:u,value:f="#FFCEC7"})=>{const[a,m]=g.useState(!1),[v,x]=g.useState("#FFCEC7");mi({id:"menu-colors",close:()=>m(!1)}),g.useEffect(()=>{x(f)},[f]);const E=k=>{x(k),m(!1),r({target:{value:k,checked:!1,name:n,type:void 0,id:u}})};return w.jsxs("div",{className:se("relative",e!==""&&e),children:[o&&w.jsx("p",{className:"text-sm font-medium leading-6 text-gray-500 mb-0.5",children:o}),w.jsxs("div",{className:"flex justify-center items-center bg-gray-100 px-3 rounded-md h-10 w-20 gap-4 cursor-pointer",onClick:()=>m(!a),id:"menu-colors","data-testid":"menu-colors",children:[w.jsx("div",{style:{width:"18px",height:"18px",backgroundColor:v},className:"rounded-full"}),w.jsx(Po,{className:se("h-5 w-5 transition-transform",a&&"transform rotate-180")})]}),w.jsx(vn,{show:a,enter:"transition-opacity duration-75",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-opacity duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",id:"menu-colors",className:"absolute top-full",children:w.jsx("div",{id:"menu-colors",className:"bg-gray-100 shadow grid gap-2 p-2 mt-2 rounded",style:{gridTemplateColumns:"repeat(auto-fill, minmax(17px, 1fr))",maxWidth:"180px"},children:jd.map((k,P)=>w.jsx("div",{style:{width:"17px",height:"17px",backgroundColor:k},className:"rounded-full cursor-pointer flex justify-center items-center",onClick:()=>E(k),"data-testid":`color-${P}`,children:v===k&&w.jsx(Nc,{className:"w-3 h-3 text-white",stroke:"2"})},P))})})]})};Se.Accordion=yd,Se.Alert=Dc,Se.Avatar=Kc,Se.Bullets=Xc,Se.ButtonOutline=sl,Se.ButtonPagination=Qc,Se.ButtonSolid=Jn,Se.Checkbox=ed,Se.ConfirmationAbandoningCreation=cd,Se.CoverPhoto=xd,Se.Divider=dd,Se.Dropdown=gd,Se.GoBack=fd,Se.IconSelectPicker=Sd,Se.Image=wd,Se.Input=Lo,Se.InputDropdown=md,Se.MESSAGE_ABORT_CONTROLLER=is,Se.MESSAGE_SIGNAL_ABORTED_WITHOUT_REASON=ls,Se.Modal=ul,Se.Pagination=bd,Se.Select=cl,Se.SelectColor=Td,Se.SketchColorPicker=Cd,Se.Spinner=pd,Se.SpinnerIcon=Qn,Se.Switch=hd,Se.Textarea=vd,Se.Tooltip=Ro,Se.classNames=se,Se.copyOptions=eo,Se.generateAvatarInitials=ns,Se.groupBy=rs,Se.isPromise=os,Se.rowsPerPage=Ao,Se.useCloseModal=mi,Se.useForm=ss,Se.useMediaQuery=as,Se.useWindowDimensions=hi,Se.validateEmail=pi,Object.defineProperty(Se,Symbol.toStringTag,{value:"Module"})});