PageSourceSearch

https://cdn.holded.com/frontend-next-gen/app-components-tailwind-tailwind.GpQq0WAW.js

js holded.com collected 2026-09-24 09:12:25 UTC 249,737 bytes, 8 lines download raw bytes

1import{o as e,t}from"./rolldown-runtime.DAXXjFlN.js";import{nn as n}from"./vendor-datadog.CbXwTgUc.js";import{t as r}from"./vendor-react-react-cjs-jsx-runtime.BfiOPkxk.js";import{t as i}from"./app-theme-dsm-Icon.XXxHe72V.js";import{o as a}from"./app-hooks-useBoolean-LocalizationProvider.BXNw5IM4.js";import{t as o}from"./vendor-react-dom-react-dom-cjs-react-dom.By_lltW1.js";import{At as s,kt as c}from"./account-application-demo-checkout.oilVSmvE.js";import{D as l,E as u,Ht as d,It as f,Kt as p,S as m,Vt as h,X as g,bt as _,h as v,ht as y,kt as b,lt as x,mt as S,n as C,qt as w,s as T,ut as E,xt as D}from"./vendor-datefns.D54m-q0k.js";import{Cd as O,To as k,ao as A,bs as j,ja as M,oo as ee,ru as te,ys as ne}from"./vendor-fortawesome.4BqgzknP.js";import{t as re}from"./vendor-react-i18next-dist-es-useTranslation.py8bq3XP.js";import{t as N}from"./app-shared-utils-useNumberFormatter.DnZU_gDq.js";import{t as ie}from"./app-utils-search-search.DANLnN4k.js";import{t as ae}from"./vendor-react-number-format-react-number-format-dist-react-number-format.es.DkMti8C_.js";import{n as oe,t as se}from"./app-utils-color-color.CZAEzO56.js";import{n as ce}from"./app-utils-avatar-avatar.DXhZUTQu.js";var P=e(n(),1),F=e(o(),1),I=r(),le={title1:`text-title1 font-medium`,title2:`text-title2 font-bold tracking-title2`,title3:`text-title3 font-medium tracking-title3`,subtitle1:`text-subtitle1 font-medium tracking-subtitle1`,subtitle2:`text-subtitle2 font-medium tracking-subtitle2`,subtitle3:`text-subtitle3 font-medium tracking-subtitle3`,bodyBig:`text-bodyBig font-normal tracking-bodyBig`,bodyNormal:`text-bodyNormal font-normal tracking-bodyNormal`,bodySmall:`text-bodySmall font-normal tracking-bodySmall`,allCaps:`text-allCaps font-medium tracking-allCaps uppercase`,micro:`text-micro font-normal tracking-micro`,microCaps:`text-micro font-normal uppercase tracking-allCaps`},ue={title1:`h1`,title2:`h2`,title3:`h3`,subtitle1:`p`,subtitle2:`p`,subtitle3:`p`,bodyBig:`p`,bodyNormal:`p`,bodySmall:`p`,allCaps:`span`,micro:`span`,microCaps:`span`},L=({as:e,variant:t=`bodyNormal`,children:n,className:r=``,...i})=>(0,I.jsx)(e||ue[t],{className:`${le[t]} ${r}`,...i,children:n}),de={info:{container:`border-blue-200 bg-blue-50 text-blue-800`,icon:`text-blue-500`,iconPath:`M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z`},success:{container:`border-green-200 bg-green-50 text-green-800`,icon:`text-green-500`,iconPath:`M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z`},warning:{container:`border-yellow-200 bg-yellow-50 text-yellow-800`,icon:`text-yellow-500`,iconPath:`M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z`},error:{container:`border-red-200 bg-red-50 text-red-800`,icon:`text-red-500`,iconPath:`M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z`}},fe=({variant:e=`info`,title:t,children:n,onDismiss:r,...i})=>{let a=de[e];return(0,I.jsxs)(`div`,{className:`flex items-start gap-3 rounded-lg border p-4 ${a.container}`,role:`alert`,...i,children:[(0,I.jsx)(`svg`,{className:`h-5 w-5 shrink-0 ${a.icon}`,fill:`none`,stroke:`currentColor`,strokeWidth:2,viewBox:`0 0 24 24`,children:(0,I.jsx)(`path`,{d:a.iconPath,strokeLinecap:`round`,strokeLinejoin:`round`})}),(0,I.jsxs)(`div`,{className:`flex-1`,children:[t&&(0,I.jsx)(L,{variant:`subtitle2`,children:t}),(0,I.jsx)(`div`,{className:`text-bodyNormal`,children:n})]}),r&&(0,I.jsx)(`button`,{className:`shrink-0 rounded p-0.5 opacity-60 hover:opacity-100`,type:`button`,onClick:r,children:(0,I.jsx)(`svg`,{className:`h-4 w-4`,fill:`none`,stroke:`currentColor`,strokeWidth:2,viewBox:`0 0 24 24`,children:(0,I.jsx)(`path`,{d:`M6 18L18 6M6 6l12 12`,strokeLinecap:`round`,strokeLinejoin:`round`})})})]})},pe=typeof document<`u`?P.useLayoutEffect:()=>{},me=e=>e?.ownerDocument??document,he=e=>e&&`window`in e&&e.window===e?e:me(e).defaultView||window;function ge(e){return typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`number`}function _e(e){return ge(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&`host`in e}var ve=!1;function ye(){return ve}function be(e,t){if(!ye())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n=n.tagName===`SLOT`&&n.assignedSlot?n.assignedSlot.parentNode:_e(n)?n.host:n.parentNode}return!1}var xe=(e=document)=>{if(!ye())return e.activeElement;let t=e.activeElement;for(;t&&`shadowRoot`in t&&t.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t};function Se(e){if(ye()&&e.target instanceof Element&&e.target.shadowRoot){if(`composedPath`in e)return e.composedPath()[0]??null;if(`composedPath`in e.nativeEvent)return e.nativeEvent.composedPath()[0]??null}return e.target}function Ce(e){if(Te())e.focus({preventScroll:!0});else{let t=Ee(e);e.focus(),De(t)}}var we=null;function Te(){if(we==null){we=!1;try{document.createElement(`div`).focus({get preventScroll(){return we=!0,!0}})}catch{}}return we}function Ee(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function De(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function Oe(e){if(typeof window>`u`||window.navigator==null)return!1;let t=window.navigator.userAgentData?.brands;return Array.isArray(t)&&t.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function ke(e){return typeof window<`u`&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function Ae(e){let t=null;return()=>(t??=e(),t)}var je=Ae(function(){return ke(/^Mac/i)}),Me=Ae(function(){return ke(/^iPad/i)||je()&&navigator.maxTouchPoints>1}
vendor: 8,018 bytes, line 1
1),Ne=Ae(function(){return Oe(/AppleWebKit/i)&&!Pe()}),Pe=Ae(function(){return Oe(/Chrome/i)}),Fe=Ae(function(){return Oe(/Android/i)}),Ie=Ae(function(){return Oe(/Firefox/i)});function Le(e,t,n=!0){var r;let{metaKey:i,ctrlKey:a,altKey:o,shiftKey:s}=t;Ie()&&(r=window.event)!=null&&r.type?.startsWith(`key`)&&e.target===`_blank`&&(je()?i=!0:a=!0);let c=Ne()&&je()&&!Me()?new KeyboardEvent(`keydown`,{keyIdentifier:`Enter`,metaKey:i,ctrlKey:a,altKey:o,shiftKey:s}):new MouseEvent(`click`,{metaKey:i,ctrlKey:a,altKey:o,shiftKey:s,detail:1,bubbles:!0,cancelable:!0});Le.isOpening=n,Ce(e),e.dispatchEvent(c),Le.isOpening=!1}Le.isOpening=!1;function Re(){let e=(0,P.useRef)(new Map),t=(0,P.useCallback)((t,n,r,i)=>{let a=i?.once?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:a,options:i}),t.addEventListener(n,a,i)},[]),n=(0,P.useCallback)((t,n,r,i)=>{let a=e.current.get(r)?.fn||r;t.removeEventListener(n,a,i),e.current.delete(r)},[]),r=(0,P.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return(0,P.useEffect)(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function ze(e){return e.pointerType===``&&e.isTrusted?!0:Fe()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function Be(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function Ve(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function He(e){let t=(0,P.useRef)({isFocused:!1,observer:null});return pe(()=>{let e=t.current;return()=>{e.observer&&=(e.observer.disconnect(),null)}},[]),(0,P.useCallback)(n=>{let r=Se(n);if(r instanceof HTMLButtonElement||r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement){t.current.isFocused=!0;let n=r;n.addEventListener(`focusout`,r=>{if(t.current.isFocused=!1,n.disabled){let t=Be(r);e?.(t)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&n.disabled){var e;(e=t.current.observer)==null||e.disconnect();let r=n===xe()?null:xe();n.dispatchEvent(new FocusEvent(`blur`,{relatedTarget:r})),n.dispatchEvent(new FocusEvent(`focusout`,{bubbles:!0,relatedTarget:r}))}}),t.current.observer.observe(n,{attributes:!0,attributeFilter:[`disabled`]})}},[e])}var Ue=null,We=new Set,Ge=new Map,Ke=!1,qe=!1,Je={Tab:!0,Escape:!0};function Ye(e,t){for(let n of We)n(e,t)}function Xe(e){return!(e.metaKey||!je()&&e.altKey||e.ctrlKey||e.key===`Control`||e.key===`Shift`||e.key===`Meta`)}function Ze(e){Ke=!0,!Le.isOpening&&Xe(e)&&(Ue=`keyboard`,Ye(`keyboard`,e))}function Qe(e){Ue=`pointer`,`pointerType`in e&&e.pointerType,(e.type===`mousedown`||e.type===`pointerdown`)&&(Ke=!0,Ye(`pointer`,e))}function $e(e){!Le.isOpening&&ze(e)&&(Ke=!0,Ue=`virtual`)}function et(e){Se(e)===window||Se(e)===document||!e.isTrusted||(!Ke&&!qe&&(Ue=`virtual`,Ye(`virtual`,e)),Ke=!1,qe=!1)}function tt(){Ke=!1,qe=!0}function nt(e){if(typeof window>`u`||typeof document>`u`||Ge.get(he(e)))return;let t=he(e),n=me(e),r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Ke=!0,r.apply(this,arguments)},n.addEventListener(`keydown`,Ze,!0),n.addEventListener(`keyup`,Ze,!0),n.addEventListener(`click`,$e,!0),t.addEventListener(`focus`,et,!0),t.addEventListener(`blur`,tt,!1),typeof PointerEvent<`u`&&(n.addEventListener(`pointerdown`,Qe,!0),n.addEventListener(`pointermove`,Qe,!0),n.addEventListener(`pointerup`,Qe,!0)),t.addEventListener(`beforeunload`,()=>{rt(e)},{once:!0}),Ge.set(t,{focus:r})}var rt=(e,t)=>{let n=he(e),r=me(e);t&&r.removeEventListener(`DOMContentLoaded`,t),Ge.has(n)&&(n.HTMLElement.prototype.focus=Ge.get(n).focus,r.removeEventListener(`keydown`,Ze,!0),r.removeEventListener(`keyup`,Ze,!0),r.removeEventListener(`click`,$e,!0),n.removeEventListener(`focus`,et,!0),n.removeEventListener(`blur`,tt,!1),typeof PointerEvent<`u`&&(r.removeEventListener(`pointerdown`,Qe,!0),r.removeEventListener(`pointermove`,Qe,!0),r.removeEventListener(`pointerup`,Qe,!0)),Ge.delete(n))};function it(e){let t=me(e),n;return t.readyState===`loading`?(n=()=>{nt(e)},t.addEventListener(`DOMContentLoaded`,n)):nt(e),()=>rt(e,n)}typeof document<`u`&&it();function at(){return Ue!==`pointer`}var ot=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function st(e,t,n){let r=me(n?Se(n):void 0),i=n?Se(n):void 0,a=typeof window<`u`?he(i).HTMLInputElement:HTMLInputElement,o=typeof window<`u`?he(i).HTMLTextAreaElement:HTMLTextAreaElement,s=typeof window<`u`?he(i).HTMLElement:HTMLElement,c=typeof window<`u`?he(i).KeyboardEvent:KeyboardEvent,l=xe(r);return e=e||l instanceof a&&!ot.has(l.type)||l instanceof o||l instanceof s&&l.isContentEditable,!(e&&t===`keyboard`&&n instanceof c&&!Je[n.key])}function ct(e,t,n){nt(),(0,P.useEffect)(()=>{if(n?.enabled===!1)return;let t=(t,r)=>{st(!!n?.isTextInput,t,r)&&e(at())};return We.add(t),()=>{We.delete(t)}},t)}function lt(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e,a=(0,P.useCallback)(e=>{if(Se(e)===e.currentTarget)return r&&r(e),i&&i(!1),!0},[r,i]),o=He(a),s=(0,P.useCallback)(e=>{let t=Se(e),r=me(t),a=r?xe(r):xe();t===e.currentTarget&&t===a&&(n&&n(e),i&&i(!0),o(e))},[i,n,o]);return{focusProps:{onFocus:!t&&(n||i||r)?s:void 0,onBlur:!t&&(r||i)?a:void 0}}}function ut(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,a=(0,P.useRef)({isFocusWithin:!1}),{addGlobalListener:o,removeAllGlobalListeners:s}=Re(),c=(0,P.useCallback)(e=>{be(e.currentTarget,Se(e))&&a.current.isFocusWithin&&!be(e.currentTarget,e.relatedTarget)&&(a.current.isFocusWithin=!1,s(),n&&n(e),i&&i(!1))},[n,i,a,s]),l=He(c),u=(0,P.useCallback)(e=>{if(!be(e.currentTarget,Se(e)))return;let t=Se(e),n=me(t),s=xe(n);if(!a.current.isFocusWithin&&s===t){r&&r(e),i&&i(!0),a.current.isFocusWithin=!0,l(e);let t=e.currentTarget;o(n,`focus`,e=>{let r=Se(e);if(a.current.isFocusWithin&&!be(t,r)){let e=new n.defaultView.FocusEvent(`blur`,{relatedTarget:r});Ve(e,t);let i=Be(e);c(i)}},{capture:!0})}},[r,i,l,o,c]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:c}}}var dt=!1,ft=0;function pt(){dt=!0,setTimeout(()=>{dt=!1},50)}function mt(e){e.pointerType===`touch`&&pt()}function ht(){if(!(typeof document>`u`))return ft===0&&typeof PointerEvent<`u`&&document.addEventListener(`pointerup`,mt),ft++,()=>{ft--,!(ft>0)&&typeof PointerEvent<`u`&&document.removeEventListener(`pointerup`,mt)}}function gt(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[a,o]=(0,P.useState)(!1),s=(0,P.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:``,target:null}).current;(0,P.useEffect)(ht,[]);let{addGlobalListener:c,removeAllGlobalListeners:l}=Re(),{hoverProps:u,triggerHoverEnd:d}=(0,P.useMemo)(()=>{let e=(e,r)=>{if(s.pointerType=r,i||r===`touch`||s.isHovered||!be(e.currentTarget,Se(e)))return;s.isHovered=!0;let l=e.currentTarget;s.target=l,c(me(Se(e)),`pointerover`,e=>{s.isHovered&&s.target&&!be(s.target,Se(e))&&a(e,e.pointerType)},{capture:!0}),t&&t({type:`hoverstart`,target:l,pointerType:r}),n&&n(!0),o(!0)},a=(e,t)=>{let i=s.target;s.pointerType=``,s.target=null,!(t===`touch`||!s.isHovered||!i)&&(s.isHovered=!1,l(),r&&r({type:`hoverend`,target:i,pointerType:t}),n&&n(!1),o(!1))},u={};return typeof PointerEvent<`u`&&(u.onPointerEnter=t=>{dt&&t.pointerType===`mouse`||e(t,t.pointerType)},u.onPointerLeave=e=>{!i&&be(e.currentTarget,Se(e))&&a(e,e.pointerType)}),{hoverProps:u,triggerHoverEnd:a}},[t,n,r,i,s,c,l]);return(0,P.useEffect)(()=>{i&&d({currentTarget:s.target},s.pointerType)},[i]),{hoverProps:u,isHovered:a}}function _t(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=(0,P.useRef)({isFocused:!1,isFocusVisible:t||at()}),[a,o]=(0,P.useState)(!1),[s,c]=(0,P.useState)(()=>i.current.isFocused&&i.current.isFocusVisible),l=(0,P.useCallback)(()=>
1c(i.current.isFocused&&i.current.isFocusVisible),[]),u=(0,P.useCallback)(e=>{i.current.isFocused=e,i.current.isFocusVisible=at(),o(e),l()},[l]);ct(e=>{i.current.isFocusVisible=e,l()},[n,a],{enabled:a,isTextInput:n});let{focusProps:d}=lt({isDisabled:r,onFocusChange:u}),{focusWithinProps:f}=ut({isDisabled:!r,onFocusWithinChange:u});return{isFocused:a,isFocusVisible:s,focusProps:r?f:d}}var vt=Object.defineProperty,yt=(e,t,n)=>t in e?vt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bt=(e,t,n)=>(yt(e,typeof t==`symbol`?t:t+``,n),n),xt=new class{constructor(){bt(this,`current`,this.detect()),bt(this,`handoffState`,`pending`),bt(this,`currentId`,0)}set(e){this.current!==e&&(this.handoffState=`pending`,this.currentId=0,this.current=e)}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`}};function St(e){return xt.isServer?null:e==null?document:e?.ownerDocument??document}function Ct(e){return xt.isServer?null:e==null?document:(e?.getRootNode)?.call(e)??document}function wt(e){return Ct(e)?.activeElement??null}function Tt(e){return wt(e)===e}function Et(e){typeof queueMicrotask==`function`?queueMicrotask(e):Promise.resolve().then(e).catch(e=>setTimeout(()=>{throw e}))}function Dt(){let e=[],t={addEventListener(e,n,r,i){return e.addEventListener(n,r,i),t.add(()=>e.removeEventListener(n,r,i))},requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add(()=>cancelAnimationFrame(n))},nextFrame(...e){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...e))},setTimeout(...e){let n=setTimeout(...e);return t.add(()=>clearTimeout(n))},microTask(...e){let n={current:!0};return Et(()=>{n.current&&e[0]()}),t.add(()=>{n.current=!1})},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add(()=>{Object.assign(e.style,{[t]:r})})},group(e){let t=Dt();return e(t),this.add(()=>t.dispose())},add(t){return e.includes(t)||e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}},dispose(){for(let t of e.splice(0))t()}};return t}function Ot(){let[e]=(0,P.useState)(Dt);return(0,P.useEffect)(()=>()=>e.dispose(),[e]),e}var R=(e,t)=>{xt.isServer?(0,P.useEffect)(e,t):(0,P.useLayoutEffect)(e,t)};function kt(e){let t=(0,P.useRef)(e);return R(()=>{t.current=e},[e]),t}var z=function(e){let t=kt(e);return P.useCallback((...e)=>t.current(...e),[t])};function At(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function jt(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function Mt({disabled:e=!1}={}){let t=(0,P.useRef)(null),[n,r]=(0,P.useState)(!1),i=Ot(),a=z(()=>{t.current=null,r(!1),i.dispose()}),o=z(e=>{if(i.dispose(),t.current===null){t.current=e.currentTarget,r(!0);{let n=St(e.currentTarget);i.addEventListener(n,`pointerup`,a,!1),i.addEventListener(n,`pointermove`,e=>{if(t.current){let n=At(e);r(jt(n,t.current.getBoundingClientRect()))}},!1),i.addEventListener(n,`pointercancel`,a,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:o,onPointerUp:a,onClick:a}}}function B(e){return(0,P.useMemo)(()=>e,Object.values(e))}var Nt=(0,P.createContext)(void 0);function Pt(){return(0,P.useContext)(Nt)}function Ft(...e){return Array.from(new Set(e.flatMap(e=>typeof e==`string`?e.split(` `):[]))).filter(Boolean).join(` `)}function V(e,t,...n){if(e in t){let r=t[e];return typeof r==`function`?r(...n):r}let r=Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(e=>`"${e}"`).join(`, `)}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,V),r}var It=(e=>(e[e.None=0]=`None`,e[e.RenderStrategy=1]=`RenderStrategy`,e[e.Static=2]=`Static`,e))(It||{}),Lt=(e=>(e[e.Unmount=0]=`Unmount`,e[e.Hidden=1]=`Hidden`,e))(Lt||{});function H(){let e=Bt();return(0,P.useCallback)(t=>Rt({mergeRefs:e,...t}),[e])}function Rt({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:a=!0,name:o,mergeRefs:s}){s??=Vt;
1let c=Ht(t,e);if(a)return zt(c,n,r,o,s);let l=i??0;if(l&2){let{static:e=!1,...t}=c;if(e)return zt(t,n,r,o,s)}if(l&1){let{unmount:e=!0,...t}=c;return V(+!e,{0(){return null},1(){return zt({...t,hidden:!0,style:{display:`none`}},n,r,o,s)}})}return zt(c,n,r,o,s)}function zt(e,t={},n,r,i){let{as:a=n,children:o,refName:s=`ref`,...c}=Gt(e,[`unmount`,`static`]),l=e.ref===void 0?{}:{[s]:e.ref},u=typeof o==`function`?o(t):o;u=qt(u),`className`in c&&c.className&&typeof c.className==`function`&&(c.className=c.className(t)),c[`aria-labelledby`]&&c[`aria-labelledby`]===c.id&&(c[`aria-labelledby`]=void 0);let d={};if(t){let e=!1,n=[];for(let[r,i]of Object.entries(t))typeof i==`boolean`&&(e=!0),i===!0&&n.push(r.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`));if(e){d[`data-headlessui-state`]=n.join(` `);for(let e of n)d[`data-${e}`]=``}}if(Jt(a)&&(Object.keys(Wt(c)).length>0||Object.keys(Wt(d)).length>0))if(!(0,P.isValidElement)(u)||Array.isArray(u)&&u.length>1||Yt(u)){if(Object.keys(Wt(c)).length>0)throw Error([`Passing props on "Fragment"!`,``,`The current component <${r} /> is rendering a "Fragment".`,`However we need to passthrough the following props:`,Object.keys(Wt(c)).concat(Object.keys(Wt(d))).map(e=>`  - ${e}`).join(`
2`),``,`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(e=>`  - ${e}`).join(`
3`)].join(`
4`))}else{let e=u.props?.className,t=typeof e==`function`?(...t)=>Ft(e(...t),c.className):Ft(e,c.className),n=t?{className:t}:{},r=Ht(u.props,Wt(Gt(c,[`ref`])));for(let e in d)e in r&&delete d[e];return(0,P.cloneElement)(u,Object.assign({},r,d,l,{ref:i(Kt(u),l.ref)},n))}return(0,P.createElement)(a,Object.assign({},Gt(c,[`ref`]),!Jt(a)&&l,!Jt(a)&&d),u)}function Bt(){let e=(0,P.useRef)([]),t=(0,P.useCallback)(t=>{for(let n of e.current)n!=null&&(typeof n==`function`?n(t):n.current=t)},[]);return(...n)=>{if(!n.every(e=>e==null))return e.current=n,t}}function Vt(...e){return e.every(e=>e==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n==`function`?n(t):n.current=t)}}function Ht(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith(`on`)&&typeof r[e]==`function`?(n[e]??(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t[`aria-disabled`])for(let e in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(e)&&(n[e]=[e=>(e?.preventDefault)?.call(e)]);for(let e in n)Object.assign(t,{[e](t,...r){let i=n[e];for(let e of i){if((t instanceof Event||t?.nativeEvent instanceof Event)&&t.defaultPrevented)return;e(t,...r)}}});return t}function Ut(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith(`on`)&&typeof r[e]==`function`?(n[e]??(n[e]=[]),n[e].push(r[e])):t[e]=r[e];for(let e in n)Object.assign(t,{[e](...t){let r=n[e];for(let e of r)e?.(...t)}});return t}function U(e){return Object.assign((0,P.forwardRef)(e),{displayName:e.displayName??e.name})}function Wt(e){let t=Object.assign({},e);for(let e in t)t[e]===void 0&&delete t[e];return t}function Gt(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}function Kt(e){return`19.2.4`.split(`.`)[0]>=`19`?e.props.ref:e.ref}function qt(e){if(e!=null&&e.$$typeof===Symbol.for(`react.lazy`)){let t=e._payload;if(t!=null&&t.status===`fulfilled`)return qt(t.value)}return e}function Jt(e){return e===P.Fragment||e===Symbol.for(`react.fragment`)}function Yt(e){return Jt(e.type)}function Xt(e,t,n){let[r,i]=(0,P.useState)(n),a=e!==void 0,o=(0,P.useRef)(a),s=(0,P.useRef)(!1),c=(0,P.useRef)(!1);return a&&!o.current&&!s.current?(s.current=!0,o.current=a,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.`)):!a&&o.current&&!c.current&&(c.current=!0,o.current=a,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.`)),[a?e:r,z(e=>(a||(0,F.flushSync)(()=>i(e)),t?.(e)))]}function Zt(e){let[t]=(0,P.useState)(e);return t}function Qt(e={},t=null,n=[]){for(let[r,i]of Object.entries(e))en(n,$t(t,r),i);return n}function $t(e,t){return e?e+`[`+t+`]`:t}
4function en(e,t,n){if(Array.isArray(n))for(let[r,i]of n.entries())en(e,$t(t,r.toString()),i);else n instanceof Date?e.push([t,n.toISOString()]):typeof n==`boolean`?e.push([t,n?`1`:`0`]):typeof n==`string`?e.push([t,n]):typeof n==`number`?e.push([t,`${n}`]):n==null?e.push([t,``]):nn(n)&&!(0,P.isValidElement)(n)&&Qt(n,t,e)}function tn(e){var t;let n=e?.form??e.closest(`form`);if(n){for(let t of n.elements)if(t!==e&&(t.tagName===`INPUT`&&t.type===`submit`||t.tagName===`BUTTON`&&t.type===`submit`||t.nodeName===`INPUT`&&t.type===`image`)){t.click();return}(t=n.requestSubmit)==null||t.call(n)}}function nn(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}var rn=`span`,an=(e=>(e[e.None=1]=`None`,e[e.Focusable=2]=`Focusable`,e[e.Hidden=4]=`Hidden`,e))(an||{});function on(e,t){let{features:n=1,...r}=e,i={ref:t,"aria-hidden":(n&2)==2?!0:r[`aria-hidden`]??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 H()({ourProps:i,theirProps:r,slot:{},defaultTag:rn,name:`Hidden`})}var sn=U(on),cn=(0,P.createContext)(null);function ln({children:e}){let t=(0,P.useContext)(cn);if(!t)return P.createElement(P.Fragment,null,e);let{target:n}=t;return n?(0,F.createPortal)(P.createElement(P.Fragment,null,e),n):null}function un({data:e,form:t,disabled:n,onReset:r,overrides:i}){let[a,o]=(0,P.useState)(null),s=Ot();return(0,P.useEffect)(()=>{if(r&&a)return s.addEventListener(a,`reset`,r)},[a,t,r]),P.createElement(ln,null,P.createElement(dn,{setForm:o,formId:t}),Qt(e).map(([e,r])=>P.createElement(sn,{features:an.Hidden,...Wt({key:e,as:`input`,type:`hidden`,hidden:!0,readOnly:!0,form:t,disabled:n,name:e,value:r,...i})})))}function dn({setForm:e,formId:t}){return(0,P.useEffect)(()=>{if(t){let n=document.getElementById(t);n&&e(n)}},[e,t]),t?null:P.createElement(sn,{features:an.Hidden,as:`input`,type:`hidden`,hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let n=t.closest(`form`);n&&e(n)}})}var fn=(0,P.createContext)(void 0);function pn(){return(0,P.useContext)(fn)}function mn(e){return typeof e!=`object`||!e?!1:`nodeType`in e}function hn(e){return mn(e)&&`tagName`in e}function gn(e){return hn(e)&&`accessKey`in e}function _n(e){return hn(e)&&`tabIndex`in e}function vn(e){return hn(e)&&`style`in e}function yn(e){return gn(e)&&e.nodeName===`IFRAME`}function bn(e){return gn(e)&&e.nodeName===`INPUT`}function xn(e){return gn(e)&&e.nodeName===`LABEL`}function Sn(e){return gn(e)&&e.nodeName===`FIELDSET`}function Cn(e){return gn(e)&&e.nodeName===`LEGEND`}function wn(e){return hn(e)?e.matches(`a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]`):!1}function Tn(e){let t=e.parentElement,n=null;for(;t&&!Sn(t);)Cn(t)&&(n=t),t=t.parentElement;let r=t?.getAttribute(`disabled`)===``;return r&&En(n)?!1:r}function En(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(Cn(t))return!1;t=t.previousElementSibling}return!0}var Dn=Symbol();function On(e,t=!0){return Object.assign(e,{[Dn]:t})}function W(...e){let t=(0,P.useRef)(e);(0,P.useEffect)(()=>{t.current=e},[e]);let n=z(e=>{for(let n of t.current)n!=null&&(typeof n==`function`?n(e):n.current=e)});return e.every(e=>e==null||e?.[Dn])?void 0:n}var kn=(0,P.createContext)(null);kn.displayName=`DescriptionContext`;function An(){let e=(0,P.useContext)(kn);if(e===null){let e=Error(`You used a <Description /> component, but it is not inside a relevant parent.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,An),e}return e}function jn(){return(0,P.useContext)(kn)?.value??void 0}function Mn(){let[e,t]=(0,P.useState)([]);return[e.length>0?e.join(` `):void 0,(0,P.useMemo)(()=>function(e){let n=z(e=>(t(t=>[...t,e]),()=>t(t=>{let n=t.slice(),r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}))),r=(0,P.useMemo)(()=>({register:n,slot:e.slot,name:e.name,props:e.props,value:e.value}),[n,e.slot,e.name,e.props,e.value]);return P.createElement(kn.Provider,{value:r},e.children)},[t])]}var Nn=`p`;function Pn(e,t){let n=(0,P.useId)(),r=Pt(),{id:i=`headlessui-description-${n}`,...a}=e,o=An(),s=W(t);R(()=>o.register(i),[i,o.register]);let c=B({...o.slot,disabled:r||!1}),l={ref:s,...o.props,id:i};return H()({ourProps:l,theirProps:a,slot:c,defaultTag:Nn,name:o.name||`Description`})}var Fn=U(Pn),In=Object.assign(Fn,{}),G=(e=>(e.Space=` `,e.Enter=`Enter`,e.Escape=`Escape`,e.Backspace=`Backspace`,e.Delete=`Delete`,e.ArrowLeft=`ArrowLeft`,e.ArrowUp=`ArrowUp`,e.ArrowRight=`ArrowRight`,e.ArrowDown=`ArrowDown`,e.Home=`Home`,e.End=`End`,e.PageUp=`PageUp`,e.PageDown=`PageDown`,e.Tab=`Tab`,e))(G||{}),Ln=(0,P.createContext)(null);Ln.displayName=`LabelContext`;function Rn(){let e=(0,P.useContext)(Ln);if(e===null){let e=Error(`You used a <Label /> component, but it is not inside a relevant parent.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Rn),e}return e}function zn(e){let t=(0,P.useContext)(Ln)?.value??void 0;return(e?.length??0)>
40?[t,...e].filter(Boolean).join(` `):t}function Bn({inherit:e=!1}={}){let t=zn(),[n,r]=(0,P.useState)([]),i=e?[t,...n].filter(Boolean):n;return[i.length>0?i.join(` `):void 0,(0,P.useMemo)(()=>function(e){let t=z(e=>(r(t=>[...t,e]),()=>r(t=>{let n=t.slice(),r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}))),n=(0,P.useMemo)(()=>({register:t,slot:e.slot,name:e.name,props:e.props,value:e.value}),[t,e.slot,e.name,e.props,e.value]);return P.createElement(Ln.Provider,{value:n},e.children)},[r])]}var Vn=`label`;function Hn(e,t){let n=(0,P.useId)(),r=Rn(),i=pn(),a=Pt(),{id:o=`headlessui-label-${n}`,htmlFor:s=i??r.props?.htmlFor,passive:c=!1,...l}=e,u=W(t);R(()=>r.register(o),[o,r.register]);let d=z(e=>{let t=e.currentTarget;if(!(e.target!==e.currentTarget&&wn(e.target))&&(xn(t)&&e.preventDefault(),r.props&&`onClick`in r.props&&typeof r.props.onClick==`function`&&r.props.onClick(e),xn(t))){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute(`disabled`);if(t===`true`||t===``)return;let n=e.getAttribute(`aria-disabled`);if(n===`true`||n===``)return;(bn(e)&&(e.type===`file`||e.type===`radio`||e.type===`checkbox`)||e.role===`radio`||e.role===`checkbox`||e.role===`switch`)&&e.click(),e.focus({preventScroll:!0})}}}),f=B({...r.slot,disabled:a||!1}),p={ref:u,...r.props,id:o,htmlFor:s,onClick:d};return c&&(`onClick`in p&&(delete p.htmlFor,delete p.onClick),`onClick`in l&&delete l.onClick),H()({ourProps:p,theirProps:l,slot:f,defaultTag:s?Vn:`div`,name:r.name||`Label`})}var Un=U(Hn),Wn=Object.assign(Un,{}),Gn=(0,P.createContext)(()=>{});function Kn(){return(0,P.useContext)(Gn)}function qn({value:e,children:t}){return P.createElement(Gn.Provider,{value:e},t)}function Jn(e,t,n){let r=n.initialDeps??[],i,a=!0;function o(){let o;n.key&&n.debug?.call(n)&&(o=Date.now());let s=e();if(!(s.length!==r.length||s.some((e,t)=>r[t]!==e)))return i;r=s;let c;if(n.key&&n.debug?.call(n)&&(c=Date.now()),i=t(...s),n.key&&n.debug?.call(n)){let e=Math.round((Date.now()-o)*100)/100,t=Math.round((Date.now()-c)*100)/100,r=t/16,i=(e,t)=>{for(e=String(e);e.length<t;)e=` `+e;return e};console.info(`%c⏱ ${i(t,5)} /${i(e,5)} ms`,`
5            font-size: .6rem;
6            font-weight: bold;
7            color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1,i}return o.updateDeps=e=>{r=e},o}function Yn(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var Xn=(e,t)=>Math.abs(e-t)<1.01,Zn=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},Qn=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},$n=e=>e,er=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let e=t;e<=n;e++)r.push(e);return r},tr=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(Qn(n)),!r.ResizeObserver)return()=>{};let a=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(e?.borderBoxSize){let t=e.borderBoxSize[0];if(t){i({width:t.inlineSize,height:t.blockSize});return}}i(Qn(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:`border-box`}),()=>{a.unobserve(n)}},nr={passive:!0},rr=typeof window>`u`?!0:`onscrollend`in window,ir=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=0,a=e.options.useScrollendEvent&&rr?()=>void 0:Zn(r,()=>{t(i,!1)},e.options.isScrollingResetDelay),o=r=>()=>{let{horizontal:o,isRtl:s}=e.options;i=o?n.scrollLeft*(s&&-1||1):n.scrollTop,a(),t(i,r)},s=o(!0),c=o(!1);n.addEventListener(`scroll`,s,nr);let l=e.options.useScrollendEvent&&rr;return l&&n.addEventListener(`scrollend`,c,nr),()=>{n.removeEventListener(`scroll`,s),l&&n.removeEventListener(`scrollend`,c)}},ar=(e,t,n)=>{if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]}
7,or=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;let o=e+t;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:o,behavior:n})},sr=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var e;return((e=this.targetWindow?.performance)?.now)?.call(e)??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,n=this.indexFromElement(t);if(!t.isConnected){this.observer.unobserve(t);return}this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}));return{disconnect:()=>{var n;(n=t())==null||n.disconnect(),e=null},observe:e=>t()?.observe(e,{box:`border-box`}),unobserve:e=>t()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,n])=>{n===void 0&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:$n,rangeExtractor:er,onChange:()=>{},measureElement:ar,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=Jn(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}this.scrollElement=e,this.scrollElement&&`ownerDocument`in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?`forward`:`backward`:null,this.scrollOffset=e,this.isScrolling=t,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,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=(e,t)=>{let n=new Map,r=new Map;for(let i=t-1;i>=0;i--){let t=e[i];if(n.has(t.lane))continue;let a=r.get(t.lane);if(a==null||t.end>a.end?r.set(t.lane,t):t.end<a.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort((e,t)=>
7e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=Jn(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(e,t,n,r,i,a)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a}),{key:!1}),this.getMeasurements=Jn(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a},o)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let s=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1);let c=this.measurementsCache.slice(0,s),l=Array(a).fill(void 0);for(let e=0;e<s;e++){let t=c[e];t&&(l[t.lane]=e)}for(let i=s;i<e;i++){let e=r(i),a=this.laneAssignments.get(i),s,u;if(a!==void 0&&this.options.lanes>1){s=a;let e=l[s],r=e===void 0?void 0:c[e];u=r?r.end+this.options.gap:t+n}else{let e=this.options.lanes===1?c[i-1]:this.getFurthestMeasurement(c,i);u=e?e.end+this.options.gap:t+n,s=e?e.lane:i%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(i,s)}let d=o.get(e),f=typeof d==`number`?d:this.options.estimateSize(i),p=u+f;c[i]={index:i,start:u,size:f,end:p,key:e,lane:s},l[s]=i}return this.measurementsCache=c,c},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Jn(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>this.range=e.length>0&&t>0?lr({measurements:e,outerSize:t,scrollOffset:n,lanes:r}):null,{key:!1,debug:()=>this.options.debug}
7),this.getVirtualIndexes=Jn(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{if(!this.scrollState||this.scrollState.behavior!==`smooth`)return!0;let t=this.scrollState.index??this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index;if(t!==void 0&&this.range){let n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,t-n),i=Math.min(this.options.count-1,t+n);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}let t=this.indexFromElement(e),n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{let n=this.measurementsCache[e];if(!n)return;let r=t-(this.itemSizeCache.get(n.key)??n.size);r!==0&&(this.scrollState?.behavior!==`smooth`&&(this.shouldAdjustScrollPositionOnItemSizeChange===void 0?n.start<this.getScrollOffset()+this.scrollAdjustments:this.shouldAdjustScrollPositionOnItemSizeChange(n,r,this))&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,t)),this.notify(!1))},this.getVirtualItems=Jn(()=>
7[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;r<i;r++){let i=t[e[r]];n.push(i)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length!==0)return Yn(t[cr(0,t.length-1,e=>Yn(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if(`scrollHeight`in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if(t===`auto`)if(i.end>=r+n-this.options.scrollPaddingEnd)t=`end`;else if(i.start<=r+this.options.scrollPaddingStart)t=`start`;else return[r,t];if(t===`end`&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let a=t===`end`?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,i.size),t]},this.scrollToOffset=(e,{align:t=`start`,behavior:n=`auto`}={})=>{let r=this.getOffsetForAlignment(e,t),i=this.now();this.scrollState={index:null,align:t,behavior:n,startedAt:i,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t=`auto`,behavior:n=`auto`}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,a]=r,o=this.now();this.scrollState={index:e,align:a,behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t=`auto`}={})=>{let n=this.getScrollOffset()+e,r=this.now();this.scrollState={index:null,align:`start`,behavior:t,startedAt:r,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1)t=e[e.length-1]?.end??0;else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId??=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()})}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=this.scrollState.index==null?void 0:this.getOffsetForIndex(this.scrollState.index,this.scrollState.align),t=e?e[0]:this.scrollState.lastTargetOffset,n=t!==this.scrollState.lastTargetOffset;if(!n&&Xn(t,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.scrollState=null;return}}else this.scrollState.stableFrames=0,n&&(this.scrollState.lastTargetOffset=t,this.scrollState.behavior=`auto`,this._scrollToOffset(t,{adjustments:void 0,behavior:`auto`}));this.scheduleScrollReconcile()}},cr=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(a<r)e=i+1;else if(a>r)t=i-1;else return i}return e>0?e-1:0};function lr({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){let i=e.length-1,a=t=>e[t].start;if(e.length<=r)return{startIndex:0,endIndex:i};let o=cr(0,i,a,n),s=o;if(r===1)for(;s<i&&e[s].end<n+t;)s++;else if(r>1){let a=Array(r).fill(0);for(;s<i&&a.some(e=>e<n+t);){let t=e[s];a[t.lane]=t.end,s++}let c=Array(r).fill(n+t);for(;o>=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(i,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}var ur=typeof document<`u`?P.useLayoutEffect:P.useEffect;function dr({useFlushSync:e=!0,...t}){let n=P.useReducer(()=>({}),{}
7)[1],r={...t,onChange:(r,i)=>{var a;e&&i?(0,F.flushSync)(n):n(),(a=t.onChange)==null||a.call(t,r,i)}},[i]=P.useState(()=>new sr(r));return i.setOptions(r),ur(()=>i._didMount(),[]),ur(()=>i._willUpdate()),i}function fr(e){return dr({observeElementRect:tr,observeElementOffset:ir,scrollToFn:or,...e})}function pr(e,t){return e!==null&&t!==null&&typeof e==`object`&&typeof t==`object`&&`id`in e&&`id`in t?e.id===t.id:e===t}function mr(e=pr){return(0,P.useCallback)((t,n)=>{if(typeof e==`string`){let r=e;return t?.[r]===n?.[r]}return e(t,n)},[e])}function hr(e){if(e===null)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}function gr(e,t,n=!1){let[r,i]=(0,P.useState)(()=>hr(t));return R(()=>{if(!t||!e)return;let n=Dt();return n.requestAnimationFrame(function e(){n.requestAnimationFrame(e),i(e=>{let n=hr(t);return n.width===e.width&&n.height===e.height?e:n})}),()=>{n.dispose()}},[t,e]),n?{width:`${r.width}px`,height:`${r.height}px`}:r}var _r=(e=>(e[e.Left=0]=`Left`,e[e.Right=2]=`Right`,e))(_r||{});function vr(e){let t=(0,P.useRef)(null);return{onPointerDown:z(n=>{t.current=n.pointerType,!Tn(n.currentTarget)&&n.pointerType===`mouse`&&n.button===_r.Left&&(n.preventDefault(),e(n))}),onClick:z(n=>{t.current!==`mouse`&&(Tn(n.currentTarget)||e(n))})}}var yr=class extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return t===void 0&&(t=this.factory(e),this.set(e,t)),t}},br=Object.defineProperty,xr=(e,t,n)=>t in e?br(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Sr=(e,t,n)=>(xr(e,typeof t==`symbol`?t:t+``,n),n),Cr=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},wr=(e,t,n)=>(Cr(e,t,`read from private field`),n?n.call(e):t.get(e)),Tr=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},Er=(e,t,n,r)=>(Cr(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),Dr,Or,kr,Ar=class{constructor(e){Tr(this,Dr,{}),Tr(this,Or,new yr(()=>new Set)),Tr(this,kr,new Set),Sr(this,`disposables`,Dt()),Er(this,Dr,e),xt.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return wr(this,Dr)}subscribe(e,t){if(xt.isServer)return()=>{};let n={selector:e,callback:t,current:e(wr(this,Dr))};return wr(this,kr).add(n),this.disposables.add(()=>{wr(this,kr).delete(n)})}on(e,t){return xt.isServer?()=>{}:(wr(this,Or).get(e).add(t),this.disposables.add(()=>{wr(this,Or).get(e).delete(t)}))}send(e){let t=this.reduce(wr(this,Dr),e);if(t!==wr(this,Dr)){Er(this,Dr,t);for(let e of wr(this,kr)){let t=e.selector(wr(this,Dr));jr(e.current,t)||(e.current=t,e.callback(t))}for(let t of wr(this,Or).get(e.type))t(wr(this,Dr),e)}}};Dr=new WeakMap,Or=new WeakMap,kr=new WeakMap;function jr(e,t){return Object.is(e,t)?!0:typeof e!=`object`||!e||typeof t!=`object`||!t?!1:Array.isArray(e)&&Array.isArray(t)?e.length===t.length?Mr(e[Symbol.iterator](),t[Symbol.iterator]()):!1:e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size===t.size?Mr(e.entries(),t.entries()):!1:Nr(e)&&Nr(t)?Mr(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()):!1}function Mr(e,t){do{let n=e.next(),r=t.next();if(n.done&&r.done)return!0;if(n.done||r.done||!Object.is(n.value,r.value))return!1}while(!0)}function Nr(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}function Pr(e){let[t,n]=e(),r=Dt();return(...e)=>{t(...e),r.dispose(),r.microTask(n)}}var Fr=Object.defineProperty,Ir=(e,t,n)=>t in e?Fr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lr=(e,t,n)=>(Ir(e,typeof t==`symbol`?t:t+``,n),n),Rr=(e=>(e[e.Push=0]=`Push`,e[e.Pop=1]=`Pop`,e))(Rr||{}),zr={0(e,t){let n=t.id,r=e.stack,i=e.stack.indexOf(n);if(i!==-1){let t=e.stack.slice();return t.splice(i,1),t.push(n),r=t,{...e,stack:r}}return{...e,stack:[...e.stack,n]}},1(e,t){let n=t.id,r=e.stack.indexOf(n);if(r===-1)return e;let i=e.stack.slice();return i.splice(r,1),{...e,stack:i}}},Br=class e extends Ar{constructor(){super(...arguments),Lr(this,`actions`,{push:e=>this.send({type:0,id:e}),pop:e=>this.send({type:1,id:e})}),Lr(this,`selectors`,{isTop:(e,t)=>e.stack[e.stack.length-1]===t,inStack:(e,t)=>e.stack.includes(t)})}static new(){return new e({stack:[]})}reduce(e,t){return V(t.type,zr,e,t)}},Vr=new yr(()=>Br.new()),Hr=t((e=>{var t=n();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=t.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),Ur=t(((e,t)=>{t.exports=Hr()}))();function K(e,t,n=jr){return(0,Ur.useSyncExternalStoreWithSelector)(z(t=>e.subscribe(Wr,t)),z(()=>e.state),z(()=>e.state),z(t),n)}function Wr(e){return e}function Gr(e,t){let n=(0,P.useId)(),r=Vr.get(t),[i,a]=K(r,(0,P.useCallback)(e=>[r.selectors.isTop(e,n),r.selectors.inStack(e,n)],[r,n]));return R(()=>
7{if(e)return r.actions.push(n),()=>r.actions.pop(n)},[r,e,n]),e?a?i:!0:!1}var Kr=new Map,qr=new Map;function Jr(e){let t=qr.get(e)??0;return qr.set(e,t+1),t===0?(Kr.set(e,{"aria-hidden":e.getAttribute(`aria-hidden`),inert:e.inert}),e.setAttribute(`aria-hidden`,`true`),e.inert=!0,()=>Yr(e)):()=>Yr(e)}function Yr(e){let t=qr.get(e)??1;if(t===1?qr.delete(e):qr.set(e,t-1),t!==1)return;let n=Kr.get(e);n&&(n[`aria-hidden`]===null?e.removeAttribute(`aria-hidden`):e.setAttribute(`aria-hidden`,n[`aria-hidden`]),e.inert=n.inert,Kr.delete(e))}function Xr(e,{allowed:t,disallowed:n}={}){let r=Gr(e,`inert-others`);R(()=>{if(!r)return;let e=Dt();for(let t of n?.()??[])t&&e.add(Jr(t));let i=t?.()??[];for(let t of i){if(!t)continue;let n=St(t);if(!n)continue;let r=t.parentElement;for(;r&&r!==n.body;){for(let t of r.children)i.some(e=>t.contains(e))||e.add(Jr(t));r=r.parentElement}}return e.dispose},[r,t,n])}function Zr(e,t,n){let r=kt(e=>{let t=e.getBoundingClientRect();t.x===0&&t.y===0&&t.width===0&&t.height===0&&n()});(0,P.useEffect)(()=>{if(!e)return;let n=t===null?null:gn(t)?t:t.current;if(!n)return;let i=Dt();if(typeof ResizeObserver<`u`){let e=new ResizeObserver(()=>r.current(n));e.observe(n),i.add(()=>e.disconnect())}if(typeof IntersectionObserver<`u`){let e=new IntersectionObserver(()=>r.current(n));e.observe(n),i.add(()=>e.disconnect())}return()=>i.dispose()},[t,r,e])}var Qr=[`[contentEditable=true]`,`[tabindex]`,`a[href]`,`area[href]`,`button:not([disabled])`,`iframe`,`input:not([disabled])`,`select:not([disabled])`,`details>summary`,`textarea:not([disabled])`].map(e=>`${e}:not([tabindex='-1'])`).join(`,`),$r=[`[data-autofocus]`].map(e=>`${e}:not([tabindex='-1'])`).join(`,`),q=(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[e.AutoFocus=64]=`AutoFocus`,e))(q||{}),ei=(e=>(e[e.Error=0]=`Error`,e[e.Overflow=1]=`Overflow`,e[e.Success=2]=`Success`,e[e.Underflow=3]=`Underflow`,e))(ei||{}),ti=(e=>(e[e.Previous=-1]=`Previous`,e[e.Next=1]=`Next`,e))(ti||{});function ni(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Qr)).sort((e,t)=>Math.sign((e.tabIndex||2**53-1)-(t.tabIndex||2**53-1)))}function ri(e=document.body){return e==null?[]:Array.from(e.querySelectorAll($r)).sort((e,t)=>Math.sign((e.tabIndex||2**53-1)-(t.tabIndex||2**53-1)))}var ii=(e=>(e[e.Strict=0]=`Strict`,e[e.Loose=1]=`Loose`,e))(ii||{});function ai(e,t=0){return e===St(e)?.body?!1:V(t,{0(){return e.matches(Qr)},1(){let t=e;for(;t!==null;){if(t.matches(Qr))return!0;t=t.parentElement}return!1}})}function oi(e){Dt().nextFrame(()=>{let t=wt(e);t&&_n(t)&&!ai(t,0)&&ci(e)})}var si=(e=>(e[e.Keyboard=0]=`Keyboard`,e[e.Mouse=1]=`Mouse`,e))(si||{});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 ci(e){e?.focus({preventScroll:!0})}var li=[`textarea`,`input`].join(`,`);function ui(e){return(e?.matches)?.call(e,li)??!1}function di(e,t=e=>e){return e.slice().sort((e,n)=>{let r=t(e),i=t(n);if(r===null||i===null)return 0;let a=r.compareDocumentPosition(i);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function fi(e,t,n=e===null?document.body:Ct(e)){return J(ni(n),t,{relativeTo:e})}function J(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){let a=Array.isArray(e)?e.length>0?Ct(e[0]):document:Ct(e),o=Array.isArray(e)?n?di(e):e:t&64?ri(e):ni(e);i.length>0&&o.length>1&&(o=o.filter(e=>!i.some(t=>t!=null&&`current`in t?t?.current===e:t===e))),r??=a?.activeElement;let s=(()=>{if(t&5)return 1;if(t&10)return-1;throw Error(`Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last`)})(),c=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,o.indexOf(r))-1;if(t&4)return Math.max(0,o.indexOf(r))+1;if(t&8)return o.length-1;throw Error(`Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last`)})(),l=t&32?{preventScroll:!0}:{},u=0,d=o.length,f;do{if(u>=d||u+d<=0)return 0;let e=c+u;if(t&16)e=(e+d)%d;else{if(e<0)return 3;if(e>=d)return 1}f=o[e],f?.focus(l),u+=s}while(f!==wt(f));return t&6&&ui(f)&&f.select(),2}function pi(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function mi(){return/Android/gi.test(window.navigator.userAgent)}function hi(){return pi()||mi()}function gi(e,t,n,r){let i=kt(n);(0,P.useEffect)(()=>
7{if(!e)return;function n(e){i.current(e)}return document.addEventListener(t,n,r),()=>document.removeEventListener(t,n,r)},[e,t,r])}function _i(e,t,n,r){let i=kt(n);(0,P.useEffect)(()=>{if(!e)return;function n(e){i.current(e)}return window.addEventListener(t,n,r),()=>window.removeEventListener(t,n,r)},[e,t,r])}var vi=30;function yi(e,t,n){let r=kt(n),i=(0,P.useCallback)(function(e,n){if(e.defaultPrevented)return;let i=n(e);if(i===null||!i.getRootNode().contains(i)||!i.isConnected)return;let a=function e(t){return typeof t==`function`?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(t);for(let t of a)if(t!==null&&(t.contains(i)||e.composed&&e.composedPath().includes(t)))return;return!ai(i,ii.Loose)&&i.tabIndex!==-1&&e.preventDefault(),r.current(e,i)},[r,t]),a=(0,P.useRef)(null);gi(e,`pointerdown`,e=>{hi()||(a.current=e.composedPath?.call(e)?.[0]||e.target)},!0),gi(e,`pointerup`,e=>{if(hi()||!a.current)return;let t=a.current;return a.current=null,i(e,()=>t)},!0);let o=(0,P.useRef)({x:0,y:0});gi(e,`touchstart`,e=>{o.current.x=e.touches[0].clientX,o.current.y=e.touches[0].clientY},!0),gi(e,`touchend`,e=>{let t={x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY};if(!(Math.abs(t.x-o.current.x)>=vi||Math.abs(t.y-o.current.y)>=vi))return i(e,()=>_n(e.target)?e.target:null)},!0),_i(e,`blur`,e=>i(e,()=>yn(window.document.activeElement)?window.document.activeElement:null),!0)}function bi(...e){return(0,P.useMemo)(()=>St(...e),[...e])}function xi(...e){return(0,P.useMemo)(()=>Ct(...e),[...e])}var Si=(e=>(e[e.Ignore=0]=`Ignore`,e[e.Select=1]=`Select`,e[e.Close=2]=`Close`,e))(Si||{}),Ci={Ignore:{kind:0},Select:e=>({kind:1,target:e}),Close:{kind:2}},wi=200,Ti=5;function Ei(e,{trigger:t,action:n,close:r,select:i}){let a=(0,P.useRef)(null),o=(0,P.useRef)(null),s=(0,P.useRef)(null);gi(e&&t!==null,`pointerdown`,e=>{mn(e?.target)&&t!=null&&t.contains(e.target)&&(o.current=e.x,s.current=e.y,a.current=e.timeStamp)}),gi(e&&t!==null,`pointerup`,e=>{let t=a.current;if(t===null||(a.current=null,!_n(e.target))||Math.abs(e.x-(o.current??e.x))<Ti&&Math.abs(e.y-(s.current??e.y))<Ti)return;let c=n(e);switch(c.kind){case 0:return;case 1:e.timeStamp-t>wi&&(i(c.target),r());break;case 2:r();break}},{capture:!0})}function Di(e,t,n,r){let i=kt(n);(0,P.useEffect)(()=>{e??=window;function n(e){i.current(e)}return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)},[e,t,r])}function Oi(e){let t=(0,P.useRef)({value:``,selectionStart:null,selectionEnd:null});return Di(e,`blur`,e=>{let n=e.target;bn(n)&&(t.current={value:n.value,selectionStart:n.selectionStart,selectionEnd:n.selectionEnd})}),z(()=>{if(!Tt(e)&&bn(e)&&e.isConnected){if(e.focus({preventScroll:!0}),e.value!==t.current.value)e.setSelectionRange(e.value.length,e.value.length);else{let{selectionStart:n,selectionEnd:r}=t.current;n!==null&&r!==null&&e.setSelectionRange(n,r)}t.current={value:``,selectionStart:null,selectionEnd:null}}})}function ki(e,t){return(0,P.useMemo)(()=>{if(e.type)return e.type;let n=e.as??`button`;if(typeof n==`string`&&n.toLowerCase()===`button`||t?.tagName===`BUTTON`&&!t.hasAttribute(`type`))return`button`},[e.type,e.as,t])}function Ai(e){return(0,P.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot)}function ji(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(e){return r.add(e),()=>r.delete(e)},dispatch(e,...i){let a=t[e].call(n,...i);a&&(n=a,r.forEach(e=>e()))}}}function Mi(){let e;return{before({doc:t}){let n=t.documentElement,r=t.defaultView??window;e=Math.max(0,r.innerWidth-n.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,i=Math.max(0,r.clientWidth-r.offsetWidth),a=Math.max(0,e-i);n.style(r,`paddingRight`,`${a}px`)}}}function Ni(){return pi()?{before({doc:e,d:t,meta:n}){function r(e){for(let t of n().containers)for(let n of t())if(n.contains(e))return!0;return!1}t.microTask(()=>{if(window.getComputedStyle(e.documentElement).scrollBehavior!==`auto`){let n=Dt();n.style(e.documentElement,`scrollBehavior`,`auto`),t.add(()=>t.microTask(()=>n.dispose()))}let n=window.scrollY??window.pageYOffset,i=null;t.addEventListener(e,`click`,t=>{if(_n(t.target))try{let n=t.target.closest(`a`);if(!n)return;let{hash:a}=new URL(n.href),o=e.querySelector(a);_n(o)&&!r(o)&&(i=o)}catch{}},!0),t.group(n=>{t.addEventListener(e,`touchstart`,e=>{if(n.dispose(),_n(e.target)&&vn(e.target))if(r(e.target)){let t=e.target;for(;t.parentElement&&r(t.parentElement);)t=t.parentElement;n.style(t,`overscrollBehavior`,`contain`)}else n.style(e.target,`touchAction`,`none`)})}),t.addEventListener(e,`touchmove`,e=>{if(_n(e.target)){if(bn(e.target))return;if(r(e.target)){let t=e.target;for(;t.parentElement&&t.dataset.headlessuiPortal!==``&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;t.dataset.headlessuiPortal===``&&e.preventDefault()}else e.preventDefault()}},{passive:!1}),t.add(()=>{let e=window.scrollY??window.pageYOffset;n!==e&&window.scrollTo(0,n),i&&i.isConnected&&(i.scrollIntoView({block:`nearest`}),i=null)})})}}:{}}function Pi(){return{before({doc:e,d:t}){t.style(e.documentElement,`overflow`,`hidden`)}}}function Fi(e){let t={};for(let n of e)Object.assign(t,n(t));return t}var Ii=ji(()=>new Map,{PUSH(e,t){let n=this.get(e)??{doc:e,count:0,d:Dt(),meta:new Set,computedMeta:{}};return n.count++,n.meta.add(t),n.computedMeta=Fi(n.meta),this.set(e,n),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t),n.computedMeta=Fi(n.meta)),this},SCROLL_PREVENT(e){let t={doc:e.doc,d:e.d,meta(){return e.computedMeta}},n=[Ni(),Mi(),Pi()];
7n.forEach(({before:e})=>e?.(t)),n.forEach(({after:e})=>e?.(t))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Ii.subscribe(()=>{let e=Ii.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let e=t.get(n.doc)===`hidden`,r=n.count!==0;(r&&!e||!r&&e)&&Ii.dispatch(n.count>0?`SCROLL_PREVENT`:`SCROLL_ALLOW`,n),n.count===0&&Ii.dispatch(`TEARDOWN`,n)}});function Li(e,t,n=()=>({containers:[]})){let r=Ai(Ii),i=t?r.get(t):void 0,a=i?i.count>0:!1;return R(()=>{if(!(!t||!e))return Ii.dispatch(`PUSH`,t,n),()=>Ii.dispatch(`POP`,t,n)},[e,t]),a}function Ri(e,t,n=()=>[document.body]){Li(Gr(e,`scroll-lock`),t,e=>({containers:[...e.containers??[],n]}))}function zi(e){return[e.screenX,e.screenY]}function Bi(){let e=(0,P.useRef)([-1,-1]);return{wasMoved(t){let n=zi(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=zi(t)}}}function Vi(e=0){let[t,n]=(0,P.useState)(e);return{flags:t,setFlag:(0,P.useCallback)(e=>n(e),[]),addFlag:(0,P.useCallback)(e=>n(t=>t|e),[]),hasFlag:(0,P.useCallback)(e=>(t&e)===e,[t]),removeFlag:(0,P.useCallback)(e=>n(t=>t&~e),[]),toggleFlag:(0,P.useCallback)(e=>n(t=>t^e),[])}}typeof process<`u`&&typeof globalThis<`u`&&typeof Element<`u`&&(process==null?void 0:{})?.NODE_ENV===`test`&&(Element==null?void 0:Element.prototype)?.getAnimations===void 0&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.",``,`Example usage:`,"```js",`import { mockAnimationsApi } from 'jsdom-testing-mocks'`,`mockAnimationsApi()`,"```"].join(`
8`)),[]});var Hi=(e=>(e[e.None=0]=`None`,e[e.Closed=1]=`Closed`,e[e.Enter=2]=`Enter`,e[e.Leave=4]=`Leave`,e))(Hi||{});function Ui(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]=``);return t}function Wi(e,t,n,r){let[i,a]=(0,P.useState)(n),{hasFlag:o,addFlag:s,removeFlag:c}=Vi(e&&i?3:0),l=(0,P.useRef)(!1),u=(0,P.useRef)(!1);return R(()=>{var i;if(e){if(n&&a(!0),!t){n&&s(3);return}return(i=r?.start)==null||i.call(r,n),Gi(t,{inFlight:l,prepare(){u.current?u.current=!1:u.current=l.current,l.current=!0,!u.current&&(n?(s(3),c(4)):(s(4),c(2)))},run(){u.current?n?(c(3),s(4)):(c(4),s(3)):n?c(1):s(1)},done(){var e;u.current&&Ji(t)||(l.current=!1,c(7),n||a(!1),(e=r?.end)==null||e.call(r,n))}})}},[e,n,t,Ot()]),e?[i,{closed:o(1),enter:o(2),leave:o(4),transition:o(2)||o(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function Gi(e,{prepare:t,run:n,done:r,inFlight:i}){let a=Dt();return qi(e,{prepare:t,inFlight:i}),a.nextFrame(()=>{n(),a.requestAnimationFrame(()=>{a.add(Ki(e,r))})}),a.dispose}function Ki(e,t){let n=Dt();if(!e)return n.dispose;let r=!1;n.add(()=>{r=!0});let i=e.getAnimations?.call(e).filter(e=>e instanceof CSSTransition)??[];return i.length===0?(t(),n.dispose):(Promise.allSettled(i.map(e=>e.finished)).then(()=>{r||t()}),n.dispose)}function qi(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition=`none`,n(),e.offsetHeight,e.style.transition=r}function Ji(e){return(e.getAnimations?.call(e)??[]).some(e=>e instanceof CSSTransition&&e.playState!==`finished`)}function Yi(e,{container:t,accept:n,walk:r}){let i=(0,P.useRef)(n),a=(0,P.useRef)(r);(0,P.useEffect)(()=>{i.current=n,a.current=r},[n,r]),R(()=>{if(!t||!e)return;let n=St(t);if(!n)return;let r=i.current,o=a.current,s=Object.assign(e=>r(e),{acceptNode:r}),c=n.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,s,!1);for(;c.nextNode();)o(c.currentNode)},[t,e,i,a])}function Xi(e,t){let n=(0,P.useRef)([]),r=z(e);(0,P.useEffect)(()=>{let e=[...n.current];for(let[i,a]of t.entries())if(n.current[i]!==a){let i=r(t,e);return n.current=t,i}},[r,...t])}function Zi(){return typeof window<`u`}function Qi(e){return ta(e)?(e.nodeName||``).toLowerCase():`#document`}function $i(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ea(e){return((ta(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function ta(e){return Zi()?e instanceof Node||e instanceof $i(e).Node:!1}function na(e){return Zi()?e instanceof Element||e instanceof $i(e).Element:!1}function ra(e){return Zi()?e instanceof HTMLElement||e instanceof $i(e).HTMLElement:!1}function ia(e){return!Zi()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof $i(e).ShadowRoot}function aa(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=ga(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function oa(e){return/^(table|td|th)$/.test(Qi(e))}function sa(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var ca=/transform|translate|scale|rotate|perspective|filter/,la=/paint|layout|strict|content/,ua=e=>!!e&&e!==`none`,da;function fa(e){let t=na(e)?ga(e):e;return ua(t.transform)||ua(t.translate)||ua(t.scale)||ua(t.rotate)||ua(t.perspective)||!ma()&&(ua(t.backdropFilter)||ua(t.filter))||ca.test(t.willChange||``)||la.test(t.contain||``)}function pa(e){let t=va(e);for(;ra(t)&&!ha(t);){if(fa(t))return t;if(sa(t))return null;t=va(t)}return null}function ma(){return da??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),da}function ha(e){return/^(html|body|#document)$/.test(Qi(e))}function ga(e){return $i(e).getComputedStyle(e)}function _a(e){return na(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function va(e){if(Qi(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ia(e)&&e.host||ea(e);return ia(t)?t.host:t}function ya(e){let t=va(e);return ha(t)?e.ownerDocument?e.ownerDocument.body:e.body:ra(t)&&aa(t)?t:ya(t)}function ba(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=ya(e),i=r===e.ownerDocument?.body,a=$i(r);if(i){let e=xa(a);
vendor: 8,187 bytes, line 8
8return t.concat(a,a.visualViewport||[],aa(r)?r:[],e&&n?ba(e):[])}else return t.concat(r,ba(r,[],n))}function xa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Sa(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}var Ca=Math.min,wa=Math.max,Ta=Math.round,Ea=Math.floor,Da=e=>({x:e,y:e}),Oa={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function ka(e,t,n){return wa(e,Ca(t,n))}function Aa(e,t){return typeof e==`function`?e(t):e}function ja(e){return e.split(`-`)[0]}function Ma(e){return e.split(`-`)[1]}function Na(e){return e===`x`?`y`:`x`}function Pa(e){return e===`y`?`height`:`width`}function Fa(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Ia(e){return Na(Fa(e))}function La(e,t,n){n===void 0&&(n=!1);let r=Ma(e),i=Ia(e),a=Pa(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Ka(o)),[o,Ka(o)]}function Ra(e){let t=Ka(e);return[za(e),t,za(t)]}function za(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Ba=[`left`,`right`],Va=[`right`,`left`],Ha=[`top`,`bottom`],Ua=[`bottom`,`top`];function Wa(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Va:Ba:t?Ba:Va;case`left`:case`right`:return t?Ha:Ua;default:return[]}}function Ga(e,t,n,r){let i=Ma(e),a=Wa(ja(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(za)))),a}function Ka(e){let t=ja(e);return Oa[t]+e.slice(t.length)}function qa(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ja(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:qa(e)}function Ya(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Xa(e,t,n){let{reference:r,floating:i}=e,a=Fa(t),o=Ia(t),s=Pa(o),c=ja(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Ma(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function Za(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Aa(t,e),p=Ja(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Ya(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Ya(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Qa=50,$a=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Za},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Xa(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Qa&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Xa(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},eo=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Aa(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=ja(r),_=Fa(o),v=ja(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Ka(o)]:Ra(o)),x=p!==`none`;!d&&x&&b.push(...Ga(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=La(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==Fa(t))||T.every(e=>Fa(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Fa(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}},to=new Set([`left`,`top`]);async function no(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ja(n),s=Ma(n),c=Fa(n)===`y`,l=to.has(o)?-1:1,u=a&&c?-1:1,d=Aa(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var ro=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await no(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},io=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Aa(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Fa(ja(i)),p=Na(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=ka(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=ka(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},ao=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Aa(e,t),u=await o.detectOverflow(t,l),d=ja(i),f=Ma(i),p=Fa(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Ca(h-u[g],v),x=Ca(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=wa(u.left,0),t=wa(u.right,0),n=wa(u.top,0),r=wa(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:wa(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:wa(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function oo(e){let t=ga(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=ra(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Ta(n)!==a||Ta(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function so(e){return na(e)?e:e.contextElement}function co(e){let t=so(e);if(!ra(t))return Da(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=oo(t),o=(a?Ta(n.width):n.width)/r,s=(a?Ta(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var lo=Da(0);function uo(e){let t=$i(e);
vendor: 5,771 bytes, line 8
8return!ma()||!t.visualViewport?lo:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function fo(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==$i(e)?!1:t}function po(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=so(e),o=Da(1);t&&(r?na(r)&&(o=co(r)):o=co(e));let s=fo(a,n,r)?uo(a):Da(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=$i(a),t=r&&na(r)?$i(r):r,n=e,i=xa(n);for(;i&&r&&t!==n;){let e=co(i),t=i.getBoundingClientRect(),r=ga(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=$i(i),i=xa(n)}}return Ya({width:u,height:d,x:c,y:l})}function mo(e,t){let n=_a(e).scrollLeft;return t?t.left+n:po(ea(e)).left+n}function ho(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-mo(e,n),y:n.top+t.scrollTop}}function go(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=ea(r),s=t?sa(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Da(1),u=Da(0),d=ra(r);if((d||!d&&!a)&&((Qi(r)!==`body`||aa(o))&&(c=_a(r)),d)){let e=po(r);l=co(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?ho(o,c):Da(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function _o(e){return Array.from(e.getClientRects())}function vo(e){let t=ea(e),n=_a(e),r=e.ownerDocument.body,i=wa(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=wa(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+mo(e),s=-n.scrollTop;return ga(r).direction===`rtl`&&(o+=wa(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var yo=25;function bo(e,t){let n=$i(e),r=ea(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=ma();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=mo(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=yo&&(a-=o)}else l<=yo&&(a+=l);return{width:a,height:o,x:s,y:c}}function xo(e,t){let n=po(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=ra(e)?co(e):Da(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function So(e,t,n){let r;if(t===`viewport`)r=bo(e,n);else if(t===`document`)r=vo(ea(e));else if(na(t))r=xo(t,n);else{let n=uo(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Ya(r)}function Co(e,t){let n=va(e);return n===t||!na(n)||ha(n)?!1:ga(n).position===`fixed`||Co(n,t)}function wo(e,t){let n=t.get(e);if(n)return n;let r=ba(e,[],!1).filter(e=>na(e)&&Qi(e)!==`body`),i=null,a=ga(e).position===`fixed`,o=a?va(e):e;for(;na(o)&&!ha(o);){let t=ga(o),n=fa(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||aa(o)&&!n&&Co(e,o))?r=r.filter(e=>e!==o):i=t,o=va(o)}return t.set(e,r),r}function To(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?sa(t)?[]:wo(t,this._c):[].concat(n),r],o=So(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=So(t,a[e],i);s=wa(n.top,s),c=Ca(n.right,c),l=Ca(n.bottom,l),u=wa(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Eo(e){let{width:t,height:n}=oo(e);return{width:t,height:n}}function Do(e,t,n){let r=ra(t),i=ea(t),a=n===`fixed`,o=po(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Da(0);function l(){c.x=mo(i)}if(r||!r&&!a)if((Qi(t)!==`body`||aa(i))&&(s=_a(t)),r){let e=po(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?ho(i,s):Da(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Oo(e){return ga(e).position===`static`}function ko(e,t){if(!ra(e)||ga(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return ea(e)===n&&(n=n.ownerDocument.body),n}function Ao(e,t){let n=$i(e);if(sa(e))return n;if(!ra(e)){let t=va(e);for(;t&&!ha(t);){if(na(t)&&!Oo(t))return t;t=va(t)}return n}let r=ko(e,t);for(;r&&oa(r)&&Oo(r);)r=ko(r,t);return r&&ha(r)&&Oo(r)&&!fa(r)?n:r||pa(e)||n}var jo=async function(e){let t=this.getOffsetParent||Ao,n=this.getDimensions,r=await n(e.floating);return{reference:Do(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Mo(e){return ga(e).direction===`rtl`}var No={convertOffsetParentRelativeRectToViewportRelativeRect:go,getDocumentElement:ea,getClippingRect:To,getOffsetParent:Ao,getElementRects:jo,getClientRects:_o,getDimensions:Eo,getScale:co,isElement:na,isRTL:Mo};function Po(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Fo(e,t){let n=null,r,i=ea(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Ea(d),h=Ea(i.clientWidth-(u+f)),g=Ea(i.clientHeight-(d+p)),_=Ea(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:wa(0,Ca(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Po(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Io(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=so(e),u=i||a?[...l?ba(l):[],...t?ba(t):[]]:[];
8u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Fo(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?po(e):null;c&&g();function g(){let t=po(e);h&&!Po(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Lo=Za,Ro=ro,zo=io,Bo=eo,Vo=ao,Ho=(e,t,n)=>{let r=new Map,i={platform:No,...n},a={...i.platform,_c:r};return $a(e,t,{...i,platform:a})},Uo=typeof document<`u`?P.useLayoutEffect:function(){};function Wo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Wo(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Wo(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Go(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ko(e,t){let n=Go(e);return Math.round(t*n)/n}function qo(e){let t=P.useRef(e);return Uo(()=>{t.current=e}),t}function Jo(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=P.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=P.useState(r);Wo(f,r)||p(r);let[m,h]=P.useState(null),[g,_]=P.useState(null),v=P.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=P.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=P.useRef(null),C=P.useRef(null),w=P.useRef(u),T=c!=null,E=qo(c),D=qo(i),O=qo(l),k=P.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),Ho(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!Wo(w.current,t)&&(w.current=t,F.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);Uo(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=P.useRef(!1);Uo(()=>(A.current=!0,()=>{A.current=!1}),[]),Uo(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=P.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=P.useMemo(()=>({reference:b,floating:x}),[b,x]),ee=P.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=Ko(M.floating,u.x),r=Ko(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Go(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return P.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:ee}),[u,k,j,M,ee])}var Yo=(e,t)=>{let n=Ro(e);return{name:n.name,fn:n.fn,options:[e,t]}},Xo=(e,t)=>{let n=zo(e);return{name:n.name,fn:n.fn,options:[e,t]}},Zo=(e,t)=>{let n=Bo(e);return{name:n.name,fn:n.fn,options:[e,t]}},Qo=(e,t)=>{let n=Vo(e);return{name:n.name,fn:n.fn,options:[e,t]}},$o={...P},es=$o.useInsertionEffect||(e=>e());function ts(e){let t=P.useRef(()=>{});return es(()=>{t.current=e}),P.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}var ns=`ArrowUp`,rs=`ArrowDown`,is=`ArrowLeft`,as=`ArrowRight`,os=typeof document<`u`?P.useLayoutEffect:P.useEffect,ss=[is,as],cs=[ns,rs];[...ss,...cs];var ls=!1,us=0,ds=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+us++;function fs(){let[e,t]=P.useState(()=>ls?ds():void 0);return os(()=>{e??t(ds())},[]),P.useEffect(()=>{ls=!0},[]),e}var ps=$o.useId||fs;function ms(){let e=new Map;return{emit(t,n){var r;
8(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){e.set(t,e.get(t)?.filter(e=>e!==n)||[])}}}var hs=P.createContext(null),gs=P.createContext(null),_s=()=>P.useContext(hs)?.id||null,vs=()=>P.useContext(gs),ys=`data-floating-ui-focusable`;function bs(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=ps(),a=P.useRef({}),[o]=P.useState(()=>ms()),s=_s()!=null,[c,l]=P.useState(r.reference),u=ts((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=P.useMemo(()=>({setPositionReference:l}),[]),f=P.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return P.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function xs(e){e===void 0&&(e={});let{nodeId:t}=e,n=bs({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[a,o]=P.useState(null),[s,c]=P.useState(null),l=i?.domReference||a,u=P.useRef(null),d=vs();os(()=>{l&&(u.current=l)},[l]);let f=Jo({...e,elements:{...i,...s&&{reference:s}}}),p=P.useCallback(e=>{let t=na(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c(t),f.refs.setReference(t)},[f.refs]),m=P.useCallback(e=>{(na(e)||e===null)&&(u.current=e,o(e)),(na(f.refs.reference.current)||f.refs.reference.current===null||e!==null&&!na(e))&&f.refs.setReference(e)},[f.refs]),h=P.useMemo(()=>({...f.refs,setReference:m,setPositionReference:p,domReference:u}),[f.refs,m,p]),g=P.useMemo(()=>({...f.elements,domReference:l}),[f.elements,l]),_=P.useMemo(()=>({...f,...r,refs:h,elements:g,nodeId:t}),[f,h,g,t,r]);return os(()=>{r.dataRef.current.floatingContext=_;let e=d?.nodesRef.current.find(e=>e.id===t);e&&(e.context=_)}),P.useMemo(()=>({...f,context:_,refs:h,elements:g}),[f,h,g,_])}var Ss=`active`,Cs=`selected`;function ws(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[Ss]:t,[Cs]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[ys]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[Ss,Cs].includes(n)))if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}),e),{})}}function Ts(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=P.useCallback(t=>ws(t,e,`reference`),t),a=P.useCallback(t=>ws(t,e,`floating`),n),o=P.useCallback(t=>ws(t,e,`item`),r);return P.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}function Es(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}var Ds=e=>({name:`inner`,options:e,async fn(t){let{listRef:n,overflowRef:r,onFallbackChange:i,offset:a=0,index:o=0,minItemsVisible:s=4,referenceOverflowThreshold:c=0,scrollRef:l,...u}=Aa(e,t),{rects:d,elements:{floating:f}}=t,p=n.current[o],m=l?.current||f,h=f.clientTop||m.clientTop,g=f.clientTop!==0,_=m.clientTop!==0,v=f===m;if(!p)return{};let y={...t,...await Yo(-p.offsetTop-f.clientTop-d.reference.height/2-p.offsetHeight/2-a).fn(t)},b=await Lo(Es(y,m.scrollHeight+h+f.clientTop),u),x=await Lo(y,{...u,elementContext:`reference`}),S=wa(0,b.top),C=y.y+S,w=(m.scrollHeight>m.clientHeight?e=>e:Ta)(wa(0,m.scrollHeight+(g&&v||_?h*2:0)-S-wa(0,b.bottom)));if(m.style.maxHeight=w+`px`,m.scrollTop=S,i){let e=m.offsetHeight<p.offsetHeight*Ca(s,n.current.length)-1||x.top>=-c||x.bottom>=-c;F.flushSync(()=>i(e))}return r&&(r.current=await Lo(Es({...y,y:C},m.offsetHeight+h+f.clientTop),u)),{y:C}}});function Os(e,t){let{open:n,elements:r}=e,{enabled:i=!0,overflowRef:a,scrollRef:o,onChange:s}=t,c=ts(s),l=P.useRef(!1),u=P.useRef(null),d=P.useRef(null);P.useEffect(()=>{if(!i)return;function e(e){if(e.ctrlKey||!t||a.current==null)return;let n=e.deltaY,r=a.current.top>=-.5,i=a.current.bottom>=-.5,o=t.scrollHeight-t.clientHeight,s=n<0?-1:1,l=n<0?`max`:`min`;t.scrollHeight<=t.clientHeight||(!r&&n>0||!i&&n<0?(e.preventDefault(),F.flushSync(()=>{c(e=>e+Math[l](n,o*s))})):/firefox/i.test(Sa())&&(t.scrollTop+=n))}let t=o?.current||r.floating;if(n&&t)return t.addEventListener(`wheel`,e),requestAnimationFrame(()=>{u.current=t.scrollTop,a.current!=null&&(d.current={...a.current})}),()=>{u.current=null,d.current=null,t.removeEventListener(`wheel`,e)}},[i,n,r.floating,a,o,c]);let f=P.useMemo(()=>({onKeyDown(){l.current=!0},onWheel(){l.current=!1},onPointerMove(){l.current=!1},onScroll(){let e=o?.current||r.floating;if(!(!a.current||!e||!l.current)){if(u.current!==null){let t=e.scrollTop-u.current;(a.current.bottom<-.5&&t<-1||a.current.top<-.5&&t>1)&&F.flushSync(()=>c(e=>e+t))}requestAnimationFrame(()=>{u.current=e.scrollTop})}}}),[r.floating,c,a,o]);return P.useMemo(()=>i?{floating:f}:{},[i,f])}var ks=(0,P.createContext)({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});ks.displayName=`FloatingContext`;var As=(0,P.createContext)(null);As.displayName=`PlacementContext`;function js(e){return(0,P.useMemo)(()=>e?typeof e==`string`?{to:e}:e:null,[e])}function Ms(){return(0,P.useContext)(ks).setReference}function Ns(){return(0,P.useContext)(ks).getReferenceProps}function Ps(){let{getFloatingProps:e,slot:t}=(0,P.useContext)(ks);return(0,P.useCallback)((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor}),[e,t])}function Fs(e=null){e===!1&&(e=null),typeof e==`string`&&(e={to:e});let t=(0,P.useContext)(As),n=(0,P.useMemo)(()=>e,[JSON.stringify(e,(e,t)=>t?.outerHTML??t)]);R(()=>{t?.(n??null)},[t,n]);let r=(0,P.useContext)(ks);return(0,P.useMemo)(()=>[r.setFloating,e?r.styles:{}],[r.setFloating,e,r.styles])}var Is=4;function Ls({children:e,enabled:t=!0}
8){let[n,r]=(0,P.useState)(null),[i,a]=(0,P.useState)(0),o=(0,P.useRef)(null),[s,c]=(0,P.useState)(null);Rs(s);let l=t&&n!==null&&s!==null,{to:u=`bottom`,gap:d=0,offset:f=0,padding:p=0,inner:m}=zs(n,s),[h,g=`center`]=u.split(` `);R(()=>{l&&a(0)},[l]);let{refs:_,floatingStyles:v,context:y}=xs({open:l,placement:h===`selection`?g===`center`?`bottom`:`bottom-${g}`:g===`center`?`${h}`:`${h}-${g}`,strategy:`absolute`,transform:!1,middleware:[Yo({mainAxis:h===`selection`?0:d,crossAxis:f}),Xo({padding:p}),h!==`selection`&&Zo({padding:p}),h===`selection`&&m?Ds({...m,padding:p,overflowRef:o,offset:i,minItemsVisible:Is,referenceOverflowThreshold:p,onFallbackChange(e){if(!e)return;let t=y.elements.floating;if(!t)return;let n=parseFloat(getComputedStyle(t).scrollPaddingBottom)||0,r=Math.min(Is,t.childElementCount),i=0,o=0;for(let e of y.elements.floating?.childNodes??[])if(gn(e)){let a=e.offsetTop,s=a+e.clientHeight+n,c=t.scrollTop,l=c+t.clientHeight;if(a>=c&&s<=l)r--;else{o=Math.max(0,Math.min(s,l)-Math.max(a,c)),i=e.clientHeight;break}}r>=1&&a(e=>{let t=i*r-o+n;return e>=t?e:t})}}):null,Qo({padding:p,apply({availableWidth:e,availableHeight:t,elements:n}){Object.assign(n.floating.style,{overflow:`auto`,maxWidth:`${e}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${t}px)`})}})].filter(Boolean),whileElementsMounted:Io}),[b=h,x=g]=y.placement.split(`-`);h===`selection`&&(b=`selection`);let S=(0,P.useMemo)(()=>({anchor:[b,x].filter(Boolean).join(` `)}),[b,x]),{getReferenceProps:C,getFloatingProps:w}=Ts([Os(y,{overflowRef:o,onChange:a})]),T=z(e=>{c(e),_.setFloating(e)});return P.createElement(As.Provider,{value:r},P.createElement(ks.Provider,{value:{setFloating:T,setReference:_.setReference,styles:v,getReferenceProps:C,getFloatingProps:w,slot:S}},e))}function Rs(e){R(()=>{if(!e)return;let t=new MutationObserver(()=>{let t=window.getComputedStyle(e).maxHeight,n=parseFloat(t);if(isNaN(n))return;let r=parseInt(t);isNaN(r)||n!==r&&(e.style.maxHeight=`${Math.ceil(n)}px`)});return t.observe(e,{attributes:!0,attributeFilter:[`style`]}),()=>{t.disconnect()}},[e])}function zs(e,t){let n=Bs(e?.gap??`var(--anchor-gap, 0)`,t),r=Bs(e?.offset??`var(--anchor-offset, 0)`,t),i=Bs(e?.padding??`var(--anchor-padding, 0)`,t);return{...e,gap:n,offset:r,padding:i}}function Bs(e,t,n=void 0){let r=Ot(),i=z((e,t)=>{if(e==null)return[n,null];if(typeof e==`number`)return[e,null];if(typeof e==`string`){if(!t)return[n,null];let i=Hs(e,t);return[i,n=>{let a=Vs(e);{let o=a.map(e=>window.getComputedStyle(t).getPropertyValue(e));r.requestAnimationFrame(function s(){r.nextFrame(s);let c=!1;for(let[e,n]of a.entries()){let r=window.getComputedStyle(t).getPropertyValue(n);if(o[e]!==r){o[e]=r,c=!0;break}}if(!c)return;let l=Hs(e,t);i!==l&&(n(l),i=l)})}return r.dispose}]}return[n,null]}),a=(0,P.useMemo)(()=>i(e,t)[0],[e,t]),[o=a,s]=(0,P.useState)();return R(()=>{let[n,r]=i(e,t);if(s(n),r)return r(s)},[e,t]),o}function Vs(e){let t=/var\((.*)\)/.exec(e);if(t){let e=t[1].indexOf(`,`);if(e===-1)return[t[1]];let n=t[1].slice(0,e).trim(),r=t[1].slice(e+1).trim();return r?[n,...Vs(r)]:[n]}return[]}function Hs(e,t){let n=document.createElement(`div`);t.appendChild(n),n.style.setProperty(`margin-top`,`0px`,`important`),n.style.setProperty(`margin-top`,e,`important`);let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}function Us({children:e,freeze:t},n){let r=Gs(t,e);return(0,P.isValidElement)(r)?(0,P.cloneElement)(r,{ref:n}):P.createElement(P.Fragment,null,r)}var Ws=P.forwardRef(Us);function Gs(e,t){let[n,r]=(0,P.useState)(t);return!e&&n!==t&&r(t),e?n:t}var Ks=(0,P.createContext)(null);Ks.displayName=`OpenClosedContext`;var Y=(e=>(e[e.Open=1]=`Open`,e[e.Closed=2]=`Closed`,e[e.Closing=4]=`Closing`,e[e.Opening=8]=`Opening`,e))(Y||{});function qs(){return(0,P.useContext)(Ks)}function Js({value:e,children:t}){return P.createElement(Ks.Provider,{value:e},t)}function Ys({children:e}){return P.createElement(Ks.Provider,{value:null},e)}function Xs(e){function t(){document.readyState!==`loading`&&(e(),document.removeEventListener(`DOMContentLoaded`,t))}typeof window<`u`&&typeof document<`u`&&(document.addEventListener(`DOMContentLoaded`,t),t())}var Zs=[];Xs(()=>{function e(e){if(!_n(e.target)||e.target===document.body||Zs[0]===e.target)return;let t=e.target;t=t.closest(Qr),Zs.unshift(t??e.target),Zs=Zs.filter(e=>e!=null&&e.isConnected),Zs.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 Qs(e){throw Error(`Unexpected object: `+e)}var X=(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))(X||{});function $s(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=r??-1;switch(e.focus){case 0:for(let e=0;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 1:i===-1&&(i=n.length);for(let e=i-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=i+1;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 3:for(let e=n.length-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 4:for(let r=0;r<n.length;++r)if(t.resolveId(n[r],r,n)===e.id)return r;return r;case 5:return null;default:Qs(e)}}function ec(e){let t=z(e),n=(0,P.useRef)(!1);(0,P.useEffect)(()=>(n.current=!1,()=>{n.current=!0,Et(()=>{n.current&&t()})}),[t])}function tc(){let e=typeof document>`u`;return`useSyncExternalStore`in P?(e=>e.useSyncExternalStore)(P)(()=>()=>{},()=>!1,()=>!e):!1}function nc(){let e=tc(),[t,n]=P.useState(xt.isHandoffComplete);return t&&xt.isHandoffComplete===!1&&n(!1),P.useEffect(()=>{t!==!0&&n(!0)},[t]),P.useEffect(()=>xt.handoff(),[]),e?!1:t}var rc=(0,P.createContext)(!1);function ic(){return(0,P.useContext)(rc)}function ac(e){return P.createElement(rc.Provider,{value:e.force},e.children)}function oc(e){let t=ic(),n=(0,P.useContext)(dc),[r,i]=(0,P.useState)(()=>
8{if(!t&&n!==null)return n.current??null;if(xt.isServer)return null;let r=e?.getElementById(`headlessui-portal-root`);if(r)return r;if(e===null)return null;let i=e.createElement(`div`);return i.setAttribute(`id`,`headlessui-portal-root`),e.body.appendChild(i)});return(0,P.useEffect)(()=>{r!==null&&(e!=null&&e.body.contains(r)||e==null||e.body.appendChild(r))},[r,e]),(0,P.useEffect)(()=>{t||n!==null&&i(n.current)},[n,i,t]),r}var sc=P.Fragment,cc=U(function(e,t){let{ownerDocument:n=null,...r}=e,i=(0,P.useRef)(null),a=W(On(e=>{i.current=e}),t),o=bi(i.current),s=oc(n??o),c=(0,P.useContext)(pc),l=Ot(),u=nc(),d=H();return ec(()=>{var e;s&&s.childNodes.length<=0&&((e=s.parentElement)==null||e.removeChild(s))}),!s||!u?null:(0,F.createPortal)(P.createElement(`div`,{"data-headlessui-portal":``,ref:e=>{l.dispose(),c&&e&&l.add(c.register(e))}},d({ourProps:{ref:a},theirProps:r,slot:{},defaultTag:sc,name:`Portal`})),s)});function lc(e,t){let n=W(t),{enabled:r=!0,ownerDocument:i,...a}=e,o=H();return r?P.createElement(cc,{...a,ownerDocument:i,ref:n}):o({ourProps:{ref:n},theirProps:a,slot:{},defaultTag:sc,name:`Portal`})}var uc=P.Fragment,dc=(0,P.createContext)(null);function fc(e,t){let{target:n,...r}=e,i={ref:W(t)},a=H();return P.createElement(dc.Provider,{value:n},a({ourProps:i,theirProps:r,defaultTag:uc,name:`Popover.Group`}))}var pc=(0,P.createContext)(null);function mc(){let e=(0,P.useContext)(pc),t=(0,P.useRef)([]),n=z(n=>(t.current.push(n),e&&e.register(n),()=>r(n))),r=z(n=>{let r=t.current.indexOf(n);r!==-1&&t.current.splice(r,1),e&&e.unregister(n)}),i=(0,P.useMemo)(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,(0,P.useMemo)(()=>function({children:e}){return P.createElement(pc.Provider,{value:i},e)},[i])]}var hc=U(lc),gc=U(fc),_c=Object.assign(hc,{Group:gc}),vc={Idle:{kind:`Idle`},Tracked:e=>({kind:`Tracked`,position:e}),Moved:{kind:`Moved`}};function yc(e){let t=e.getBoundingClientRect();return`${t.x},${t.y}`}function bc(e,t,n){let r=Dt();if(t.kind===`Tracked`){let i=function(){a!==yc(e)&&(r.dispose(),n())},{position:a}=t,o=new ResizeObserver(i);o.observe(e),r.add(()=>o.disconnect()),r.addEventListener(window,`scroll`,i,{passive:!0}),r.addEventListener(window,`resize`,i)}return()=>r.dispose()}var xc=Object.defineProperty,Sc=(e,t,n)=>t in e?xc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cc=(e,t,n)=>(Sc(e,typeof t==`symbol`?t:t+``,n),n),Z=(e=>(e[e.Open=0]=`Open`,e[e.Closed=1]=`Closed`,e))(Z||{}),wc=(e=>(e[e.Single=0]=`Single`,e[e.Multi=1]=`Multi`,e))(wc||{}),Tc=(e=>(e[e.Pointer=0]=`Pointer`,e[e.Focus=1]=`Focus`,e[e.Other=2]=`Other`,e))(Tc||{}),Ec=(e=>(e[e.OpenCombobox=0]=`OpenCombobox`,e[e.CloseCombobox=1]=`CloseCombobox`,e[e.GoToOption=2]=`GoToOption`,e[e.SetTyping=3]=`SetTyping`,e[e.RegisterOption=4]=`RegisterOption`,e[e.UnregisterOption=5]=`UnregisterOption`,e[e.DefaultToFirstOption=6]=`DefaultToFirstOption`,e[e.SetActivationTrigger=7]=`SetActivationTrigger`,e[e.UpdateVirtualConfiguration=8]=`UpdateVirtualConfiguration`,e[e.SetInputElement=9]=`SetInputElement`,e[e.SetButtonElement=10]=`SetButtonElement`,e[e.SetOptionsElement=11]=`SetOptionsElement`,e[e.MarkInputAsMoved=12]=`MarkInputAsMoved`,e))(Ec||{});function Dc(e,t=e=>e){let n=e.activeOptionIndex===null?null:e.options[e.activeOptionIndex],r=t(e.options.slice()),i=r.length>0&&r[0].dataRef.current.order!==null?r.sort((e,t)=>e.dataRef.current.order-t.dataRef.current.order):di(r,e=>e.dataRef.current.domRef.current),a=n?i.indexOf(n):null;return a===-1&&(a=null),{options:i,activeOptionIndex:a}}var Oc={1(e){var t;if((t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===1)return e;let n=e.inputElement?vc.Tracked(yc(e.inputElement)):e.inputPositionState;return{...e,activeOptionIndex:null,comboboxState:1,isTyping:!1,activationTrigger:2,inputPositionState:n,__demoMode:!1}},0(e){var t,n;if((t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===0)return e;if((n=e.dataRef.current)!=null&&n.value){let t=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(t!==-1)return{...e,activeOptionIndex:t,comboboxState:0,__demoMode:!1,inputPositionState:vc.Idle}}return{...e,comboboxState:0,inputPositionState:vc.Idle,__demoMode:!1}},3(e,t){return e.isTyping===t.isTyping?e:{...e,isTyping:t.isTyping}},2(e,t){var n,r;if((n=e.dataRef.current)!=null&&n.disabled||e.optionsElement&&!((r=e.dataRef.current)!=null&&r.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let{options:n,disabled:r}=e.virtual,i=t.focus===X.Specific?t.idx:$s(t,{resolveItems:()=>n,resolveActiveIndex:()=>e.activeOptionIndex??n.findIndex(e=>!r(e))??null,resolveDisabled:r,resolveId(){throw Error(`Function not implemented.`)}}),a=t.trigger??2;return e.activeOptionIndex===i&&e.activationTrigger===a?e:{...e,activeOptionIndex:i,activationTrigger:a,isTyping:!1,__demoMode:!1}}let i=Dc(e);if(i.activeOptionIndex===null){let e=i.options.findIndex(e=>!e.dataRef.current.disabled);e!==-1&&(i.activeOptionIndex=e)}let a=t.focus===X.Specific?t.idx:$s(t,{resolveItems:()=>i.options,resolveActiveIndex:()=>i.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled}),o=t.trigger??2;return e.activeOptionIndex===a&&e.activationTrigger===o?e:{...e,...i,isTyping:!1,activeOptionIndex:a,activationTrigger:o,__demoMode:!1}},4:(e,t)=>{var n,r,i,a;if((n=e.dataRef.current)!=null&&n.virtual)return{...e,options:[...e.options,t.payload]};let o=t.payload,s=Dc(e,e=>(e.push(o),e));e.activeOptionIndex===null&&(i=(r=e.dataRef.current).isSelected)!=null&&i.call(r,t.payload.dataRef.current.value)&&(s.activeOptionIndex=s.options.indexOf(o));let c={...e,...s,activationTrigger:2};return(a=e.dataRef.current)!=null&&a.__demoMode&&e.dataRef.current.value===void 0&&(c.activeOptionIndex=0),c},5:(e,t)=>{var n;if((n=e.dataRef.current)!=null&&n.virtual)return{...e,options:e.options.filter(e=>e.id!==t.id)};let r=Dc(e,e=>{let n=e.findIndex(e=>e.id===t.id);return n!==-1&&e.splice(n,1),e});return{...e,...r,activationTrigger:2}},6:(e,t)=>e.defaultToFirstOption===t.value?e:{...e,defaultToFirstOption:t.value},7:(e,t)=>e.activationTrigger===t.trigger?e:{...e,activationTrigger:t.trigger},8:(e,t)=>
8{if(e.virtual===null)return{...e,virtual:{options:t.options,disabled:t.disabled??(()=>!1)}};if(e.virtual.options===t.options&&e.virtual.disabled===t.disabled)return e;let n=e.activeOptionIndex;if(e.activeOptionIndex!==null){let r=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);n=r===-1?null:r}return{...e,activeOptionIndex:n,virtual:{options:t.options,disabled:t.disabled??(()=>!1)}}},9:(e,t)=>e.inputElement===t.element?e:{...e,inputElement:t.element},10:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},11:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element},12(e){return e.inputPositionState.kind===`Tracked`?{...e,inputPositionState:vc.Moved}:e}},kc=class e extends Ar{constructor(e){super(e),Cc(this,`actions`,{onChange:e=>{let{onChange:t,compare:n,mode:r,value:i}=this.state.dataRef.current;return V(r,{0:()=>t?.(e),1:()=>{let r=i.slice(),a=r.findIndex(t=>n(t,e));return a===-1?r.push(e):r.splice(a,1),t?.(r)}})},registerOption:(e,t)=>(this.send({type:4,payload:{id:e,dataRef:t}}),()=>{this.state.activeOptionIndex===this.state.dataRef.current.calculateIndex(t.current.value)&&this.send({type:6,value:!0}),this.send({type:5,id:e})}),goToOption:(e,t)=>(this.send({type:6,value:!1}),this.send({type:2,...e,trigger:t})),setIsTyping:e=>{this.send({type:3,isTyping:e})},closeCombobox:()=>{var e,t;this.send({type:1}),this.send({type:6,value:!1}),(t=(e=this.state.dataRef.current).onClose)==null||t.call(e)},openCombobox:()=>{this.send({type:0}),this.send({type:6,value:!0})},setActivationTrigger:e=>{this.send({type:7,trigger:e})},selectActiveOption:()=>{let e=this.selectors.activeOptionIndex(this.state);if(e!==null){if(this.actions.setIsTyping(!1),this.state.virtual)this.actions.onChange(this.state.virtual.options[e]);else{let{dataRef:t}=this.state.options[e];this.actions.onChange(t.current.value)}this.actions.goToOption({focus:X.Specific,idx:e})}},setInputElement:e=>{this.send({type:9,element:e})},setButtonElement:e=>{this.send({type:10,element:e})},setOptionsElement:e=>{this.send({type:11,element:e})}}),Cc(this,`selectors`,{activeDescendantId:e=>{let t=this.selectors.activeOptionIndex(e);if(t!==null)return e.virtual?e.options.find(n=>!n.dataRef.current.disabled&&e.dataRef.current.compare(n.dataRef.current.value,e.virtual.options[t]))?.id:e.options[t]?.id},activeOptionIndex:e=>{if(e.defaultToFirstOption&&e.activeOptionIndex===null&&(e.virtual?e.virtual.options.length>0:e.options.length>0)){if(e.virtual){let{options:t,disabled:n}=e.virtual,r=t.findIndex(e=>{var t;return!((t=n?.(e))!=null&&t)});if(r!==-1)return r}let t=e.options.findIndex(e=>!e.dataRef.current.disabled);if(t!==-1)return t}return e.activeOptionIndex},activeOption:e=>{let t=this.selectors.activeOptionIndex(e);return t===null?null:e.virtual?e.virtual.options[t??0]:e.options[t]?.dataRef.current.value??null},isActive:(e,t,n)=>{let r=this.selectors.activeOptionIndex(e);return r===null?!1:e.virtual?r===e.dataRef.current.calculateIndex(t):e.options[r]?.id===n},shouldScrollIntoView:(e,t,n)=>!(e.virtual||e.__demoMode||e.comboboxState!==0||e.activationTrigger===0||!this.selectors.isActive(e,t,n)),didInputMove(e){return e.inputPositionState.kind===`Moved`}});{let e=this.state.id,t=Vr.get(null);this.disposables.add(t.on(Rr.Push,n=>{!t.selectors.isTop(n,e)&&this.state.comboboxState===0&&this.actions.closeCombobox()})),this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}this.disposables.group(e=>{this.on(1,t=>{t.inputElement&&(e.dispose(),e.add(bc(t.inputElement,t.inputPositionState,()=>{this.send({type:12})})))})})}static new({id:t,virtual:n=null,__demoMode:r=!1}){return new e({id:t,dataRef:{current:{}},comboboxState:+!r,isTyping:!1,options:[],virtual:n?{options:n.options,disabled:n.disabled??(()=>!1)}:null,activeOptionIndex:null,activationTrigger:2,inputElement:null,buttonElement:null,optionsElement:null,__demoMode:r,inputPositionState:vc.Idle})}reduce(e,t){return V(t.type,Oc,e,t)}},Ac=(0,P.createContext)(null);function jc(e){let t=(0,P.useContext)(Ac);if(t===null){let t=Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Mc),t}return t}function Mc({id:e,virtual:t=null,__demoMode:n=!1}){let r=(0,P.useMemo)(()=>kc.new({id:e,virtual:t,__demoMode:n}),[]);return ec(()=>r.dispose()),r}var Nc=(0,P.createContext)(null);Nc.displayName=`ComboboxDataContext`;function Pc(e){let t=(0,P.useContext)(Nc);if(t===null){let t=Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Pc),t}return t}var Fc=(0,P.createContext)(null);function Ic(e){let t=jc(`VirtualProvider`),{options:n}=Pc(`VirtualProvider`).virtual,r=K(t,e=>e.optionsElement),[i,a]=(0,P.useMemo)(()=>{let e=r;if(!e)return[0,0];let t=window.getComputedStyle(e);return[parseFloat(t.paddingBlockStart||t.paddingTop),parseFloat(t.paddingBlockEnd||t.paddingBottom)]},[r]),o=fr({enabled:n.length!==0,scrollPaddingStart:i,scrollPaddingEnd:a,count:n.length,estimateSize(){return 40},getScrollElement(){return t.state.optionsElement},overscan:12}),[s,c]=(0,P.useState)(0);R(()=>{c(e=>e+1)},[n]);let l=o.getVirtualItems(),u=K(t,e=>e.activationTrigger===Tc.Pointer),d=K(t,t.selectors.activeOptionIndex);return l.length===0?null:P.createElement(Fc.Provider,{value:o},P.createElement(`div`,{style:{position:`relative`,width:`100%`,height:`${o.getTotalSize()}px`},ref:e=>{e&&(u||d!==null&&n.length>d&&o.scrollToIndex(d))}},l.map(t=>P.createElement(P.Fragment,{key:t.key},P.cloneElement(e.children?.call(e,{...e.slot,option:n[t.index]}),{key:`${s}-${t.key}`,"data-index":t.index,"aria-setsize":n.length,"aria-posinset":t.index+1,style:{position:`absolute`,top:0,left:0,transform:`translateY(${t.start}px)`,overflowAnchor:`none`}})))))}var Lc=P.Fragment;function Rc(e,t){let n=(0,P.useId)(),r=Pt(),{value:i,defaultValue:a,onChange:o,form:s,name:c,by:l,invalid:u=!1,disabled:d=r||!1,onClose:f,__demoMode:p=!1,multiple:m=!1,immediate:h=!1,virtual:g=null,nullable:_,...v}=e,y=Zt(a),[b=m?[]:void 0,x]=Xt(i,o,y),S=Mc({id:n,virtual:g,__demoMode:p}),C=(0,P.useRef)({static:!1,hold:!1}),w=mr(l),T=z(e=>g?l===null?g.options.indexOf(e):g.options.findIndex(t=>w(t,e)):S.state.options.findIndex(t=>w(t.dataRef.current.value,e))),E=(0,P.useCallback)(e=>V(k.mode,{[wc.Multi]:()=>b.some(t=>w(t,e)),[wc.Single]:()=>w(b,e)}),[b]),D=K(S,e=>e.virtual),O=z(()=>f?.()),k=(0,P.useMemo)(()=>({__demoMode:p,immediate:h,optionsPropsRef:C,value:b,defaultValue:y,disabled:d,invalid:u,mode:m?wc.Multi:wc.Single,virtual:g?D:null,onChange:x,isSelected:E,calculateIndex:T,compare:w,onClose:O}),[p,h,C,b,y,d,u,m,g,D,x,E,T,w,O]);R(()=>{g&&S.send({type:Ec.UpdateVirtualConfiguration,options:g.options,disabled:g.disabled??null})},[g,g?.options,g?.disabled]),R(()=>{S.state.dataRef.current=k},[k]);let[A,j,M,ee]=K(S,e=>[e.comboboxState,e.buttonElement,e.inputElement,e.optionsElement]),te=Vr.get(null);yi(K(te,(0,P.useCallback)(e=>te.selectors.isTop(e,n),[te,n])),[j,M,ee],()=>S.actions.closeCombobox());let ne=K(S,S.selectors.activeOptionIndex),re=K(S,S.selectors.activeOption),N=B({open:A===Z.Open,disabled:d,invalid:u,activeIndex:ne,activeOption:re,value:b}),[ie,ae]=Bn(),oe=t===null?{}:{ref:t},se=(0,P.useCallback)(()=>
8{if(y!==void 0)return x?.(y)},[x,y]),ce=H();return P.createElement(ae,{value:ie,props:{htmlFor:M?.id},slot:{open:A===Z.Open,disabled:d}},P.createElement(Ls,null,P.createElement(Nc.Provider,{value:k},P.createElement(Ac.Provider,{value:S},P.createElement(Js,{value:V(A,{[Z.Open]:Y.Open,[Z.Closed]:Y.Closed})},c!=null&&P.createElement(un,{disabled:d,data:b==null?{}:{[c]:b},form:s,onReset:se}),ce({ourProps:oe,theirProps:v,slot:N,defaultTag:Lc,name:`Combobox`}))))))}var zc=`input`;function Bc(e,t){let n=jc(`Combobox.Input`),r=Pc(`Combobox.Input`),i=(0,P.useId)(),a=pn(),{id:o=a||`headlessui-combobox-input-${i}`,onChange:s,displayValue:c,disabled:l=r.disabled||!1,autoFocus:u=!1,type:d=`text`,...f}=e,p=(0,P.useRef)(null),m=W(p,t,Ms(),n.actions.setInputElement),[h,g]=K(n,e=>[e.comboboxState,e.isTyping]),_=Ot(),v=z(()=>{n.actions.onChange(null),n.state.optionsElement&&(n.state.optionsElement.scrollTop=0),n.actions.goToOption({focus:X.Nothing})});Xi(([e,t],[r,i])=>{if(n.state.isTyping)return;let a=p.current;a&&((i===Z.Open&&t===Z.Closed||e!==r)&&(a.value=e),requestAnimationFrame(()=>{if(n.state.isTyping||!a||Tt(a))return;let{selectionStart:e,selectionEnd:t}=a;Math.abs((t??0)-(e??0))===0&&e===0&&a.setSelectionRange(a.value.length,a.value.length)}))},[(0,P.useMemo)(()=>typeof c==`function`&&r.value!==void 0?c(r.value)??``:typeof r.value==`string`?r.value:``,[r.value,c]),h,g]),Xi(([e],[t])=>{if(e===Z.Open&&t===Z.Closed){if(n.state.isTyping)return;let e=p.current;if(!e)return;let t=e.value,{selectionStart:r,selectionEnd:i,selectionDirection:a}=e;e.value=``,e.value=t,a===null?e.setSelectionRange(r,i):e.setSelectionRange(r,i,a)}},[h]);let y=(0,P.useRef)(!1),b=z(()=>{y.current=!0}),x=z(()=>{_.nextFrame(()=>{y.current=!1})}),S=z(e=>{switch(n.actions.setIsTyping(!0),e.key){case G.Enter:if(n.state.comboboxState!==Z.Open||y.current)return;if(e.preventDefault(),e.stopPropagation(),n.selectors.activeOptionIndex(n.state)===null){n.actions.closeCombobox();return}n.actions.selectActiveOption(),r.mode===wc.Single&&n.actions.closeCombobox();break;case G.ArrowDown:return e.preventDefault(),e.stopPropagation(),V(n.state.comboboxState,{[Z.Open]:()=>n.actions.goToOption({focus:X.Next}),[Z.Closed]:()=>n.actions.openCombobox()});case G.ArrowUp:return e.preventDefault(),e.stopPropagation(),V(n.state.comboboxState,{[Z.Open]:()=>n.actions.goToOption({focus:X.Previous}),[Z.Closed]:()=>{(0,F.flushSync)(()=>n.actions.openCombobox()),r.value||n.actions.goToOption({focus:X.Last})}});case G.Home:if(n.state.comboboxState===Z.Closed||e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),n.actions.goToOption({focus:X.First});case G.PageUp:return e.preventDefault(),e.stopPropagation(),n.actions.goToOption({focus:X.First});case G.End:if(n.state.comboboxState===Z.Closed||e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),n.actions.goToOption({focus:X.Last});case G.PageDown:return e.preventDefault(),e.stopPropagation(),n.actions.goToOption({focus:X.Last});case G.Escape:return n.state.comboboxState===Z.Open?(e.preventDefault(),n.state.optionsElement&&!r.optionsPropsRef.current.static&&e.stopPropagation(),r.mode===wc.Single&&r.value===null&&v(),n.actions.closeCombobox()):void 0;case G.Tab:if(n.actions.setIsTyping(!1),n.state.comboboxState!==Z.Open)return;r.mode===wc.Single&&n.state.activationTrigger!==Tc.Focus&&n.actions.selectActiveOption(),n.actions.closeCombobox();break}}),C=z(e=>{s?.(e),r.mode===wc.Single&&e.target.value===``&&v(),n.actions.openCombobox()}),w=z(e=>{var t,i;let a=e.relatedTarget??Zs.find(t=>t!==e.currentTarget);if(!((t=n.state.optionsElement)!=null&&t.contains(a))&&!((i=n.state.buttonElement)!=null&&i.contains(a))&&n.state.comboboxState===Z.Open)return e.preventDefault(),r.mode===wc.Single&&r.value===null&&v(),n.actions.closeCombobox()}),T=z(e=>{var t,i;let a=e.relatedTarget??Zs.find(t=>t!==e.currentTarget);(t=n.state.buttonElement)!=null&&t.contains(a)||(i=n.state.optionsElement)!=null&&i.contains(a)||r.disabled||r.immediate&&n.state.comboboxState!==Z.Open&&_.microTask(()=>{(0,F.flushSync)(()=>n.actions.openCombobox()),n.actions.setActivationTrigger(Tc.Focus)})}),E=zn(),D=jn(),{isFocused:O,focusProps:k}
8=_t({autoFocus:u}),{isHovered:A,hoverProps:j}=gt({isDisabled:l}),M=K(n,e=>e.optionsElement),ee=B({open:h===Z.Open,disabled:l,invalid:r.invalid,hover:A,focus:O,autofocus:u}),te=Ut({ref:m,id:o,role:`combobox`,type:d,"aria-controls":M?.id,"aria-expanded":h===Z.Open,"aria-activedescendant":K(n,n.selectors.activeDescendantId),"aria-labelledby":E,"aria-describedby":D,"aria-autocomplete":`list`,defaultValue:e.defaultValue??(r.defaultValue===void 0?null:c?.(r.defaultValue))??r.defaultValue,disabled:l||void 0,autoFocus:u,onCompositionStart:b,onCompositionEnd:x,onKeyDown:S,onChange:C,onFocus:T,onBlur:w},k,j);return H()({ourProps:te,theirProps:f,slot:ee,defaultTag:zc,name:`Combobox.Input`})}var Vc=`button`;function Hc(e,t){let n=jc(`Combobox.Button`),r=Pc(`Combobox.Button`),[i,a]=(0,P.useState)(null),o=W(t,a,n.actions.setButtonElement),s=(0,P.useId)(),{id:c=`headlessui-combobox-button-${s}`,disabled:l=r.disabled||!1,autoFocus:u=!1,...d}=e,[f,p,m]=K(n,e=>[e.comboboxState,e.inputElement,e.optionsElement]),h=Oi(p);Ei(f===Z.Open,{trigger:i,action:(0,P.useCallback)(e=>{if(i!=null&&i.contains(e.target)||p!=null&&p.contains(e.target))return Ci.Ignore;let t=e.target.closest(`[role="option"]:not([data-disabled])`);return gn(t)?Ci.Select(t):m!=null&&m.contains(e.target)?Ci.Ignore:Ci.Close},[i,p,m]),close:n.actions.closeCombobox,select:n.actions.selectActiveOption});let g=z(e=>{switch(e.key){case G.Space:case G.Enter:e.preventDefault(),e.stopPropagation(),n.state.comboboxState===Z.Closed&&(0,F.flushSync)(()=>n.actions.openCombobox()),h();return;case G.ArrowDown:e.preventDefault(),e.stopPropagation(),n.state.comboboxState===Z.Closed&&((0,F.flushSync)(()=>n.actions.openCombobox()),n.state.dataRef.current.value||n.actions.goToOption({focus:X.First})),h();return;case G.ArrowUp:e.preventDefault(),e.stopPropagation(),n.state.comboboxState===Z.Closed&&((0,F.flushSync)(()=>n.actions.openCombobox()),n.state.dataRef.current.value||n.actions.goToOption({focus:X.Last})),h();return;case G.Escape:if(n.state.comboboxState!==Z.Open)return;e.preventDefault(),n.state.optionsElement&&!r.optionsPropsRef.current.static&&e.stopPropagation(),(0,F.flushSync)(()=>n.actions.closeCombobox()),h();return;default:return}}),_=vr(()=>{n.state.comboboxState===Z.Open?n.actions.closeCombobox():n.actions.openCombobox(),h()}),v=zn([c]),{isFocusVisible:y,focusProps:b}=_t({autoFocus:u}),{isHovered:x,hoverProps:S}=gt({isDisabled:l}),{pressed:C,pressProps:w}=Mt({disabled:l}),T=B({open:f===Z.Open,active:C||f===Z.Open,disabled:l,invalid:r.invalid,value:r.value,hover:x,focus:y}),E=Ut({ref:o,id:c,type:ki(e,i),tabIndex:-1,"aria-haspopup":`listbox`,"aria-controls":m?.id,"aria-expanded":f===Z.Open,"aria-labelledby":v,disabled:l||void 0,autoFocus:u,onKeyDown:g},_,b,S,w);return H()({ourProps:E,theirProps:d,slot:T,defaultTag:Vc,name:`Combobox.Button`})}var Uc=`div`,Wc=It.RenderStrategy|It.Static;function Gc(e,t){let n=(0,P.useId)(),{id:r=`headlessui-combobox-options-${n}`,hold:i=!1,anchor:a,portal:o=!1,modal:s=!0,transition:c=!1,...l}=e,u=jc(`Combobox.Options`),d=Pc(`Combobox.Options`),f=js(a);f&&(o=!0);let[p,m]=Fs(f),[h,g]=(0,P.useState)(null),_=Ps(),v=W(t,f?p:null,u.actions.setOptionsElement,g),[y,b,x,S,C]=K(u,e=>[e.comboboxState,e.inputElement,e.buttonElement,e.optionsElement,e.activationTrigger]),w=bi(b||x),T=bi(S),E=qs(),[D,O]=Wi(c,h,E===null?y===Z.Open:(E&Y.Open)===Y.Open);Zr(D,b,u.actions.closeCombobox),Ri(d.__demoMode?!1:s&&y===Z.Open,T),Xr(d.__demoMode?!1:s&&y===Z.Open,{allowed:(0,P.useCallback)(()=>[b,x,S],[b,x,S])});let k=K(u,u.selectors.didInputMove)?!1:D;R(()=>{d.optionsPropsRef.current.static=e.static??!1},[d.optionsPropsRef,e.static]),R(()=>{d.optionsPropsRef.current.hold=i},[d.optionsPropsRef,i]),Yi(y===Z.Open,{container:S,accept(e){return e.getAttribute(`role`)===`option`?NodeFilter.FILTER_REJECT:e.hasAttribute(`role`)?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(e){e.setAttribute(`role`,`none`)}});let A=zn([x?.id]),j=B({open:y===Z.Open,option:void 0}),M=z(()=>{u.actions.setActivationTrigger(Tc.Pointer)}),ee=z(e=>{e.preventDefault(),u.actions.setActivationTrigger(Tc.Pointer)}),te=Ut(f?_():{},{"aria-labelledby":A,role:`listbox`,"aria-multiselectable":d.mode===wc.Multi?!0:void 0,id:r,ref:v,style:{...l.style,...m,"--input-width":gr(D,b,!0).width,"--button-width":gr(D,x,!0).width},onWheel:C===Tc.Pointer?void 0:M,onMouseDown:ee,...Ui(O)}),ne=D&&y===Z.Closed&&!e.static,re=Gs(ne,d.virtual?.options),N=Gs(ne,d.value),ie=(0,P.useCallback)(e=>d.compare(N,e),[d.compare,N]),ae=(0,P.useMemo)(()=>
8{if(!d.virtual)return d;if(re===void 0)throw Error("Missing `options` in virtual mode");return re===d.virtual.options?d:{...d,virtual:{...d.virtual,options:re}}},[d,re,d.virtual?.options]);d.virtual&&Object.assign(l,{children:P.createElement(Nc.Provider,{value:ae},P.createElement(Ic,{slot:j},l.children))});let oe=H(),se=(0,P.useMemo)(()=>d.mode===wc.Multi?d:{...d,isSelected:ie},[d,ie]);return P.createElement(_c,{enabled:o?e.static||D:!1,ownerDocument:w},P.createElement(Nc.Provider,{value:se},oe({ourProps:te,theirProps:{...l,children:P.createElement(Ws,{freeze:ne},typeof l.children==`function`?l.children?.call(l,j):l.children)},slot:j,defaultTag:Uc,features:Wc,visible:k,name:`Combobox.Options`})))}var Kc=`div`;function qc(e,t){var n;let r=Pc(`Combobox.Option`),i=jc(`Combobox.Option`),a=(0,P.useId)(),{id:o=`headlessui-combobox-option-${a}`,value:s,disabled:c=((n=r.virtual)?.disabled)?.call(n,s)??!1,order:l=null,...u}=e,[d]=K(i,e=>[e.inputElement]),f=Oi(d),p=K(i,(0,P.useCallback)(e=>i.selectors.isActive(e,s,o),[s,o])),m=r.isSelected(s),h=(0,P.useRef)(null),g=kt({disabled:c,value:s,domRef:h,order:l}),_=(0,P.useContext)(Fc),v=W(t,h,_?_.measureElement:null),y=z(()=>{i.actions.setIsTyping(!1),i.actions.onChange(s)});R(()=>i.actions.registerOption(o,g),[g,o]);let b=K(i,(0,P.useCallback)(e=>i.selectors.shouldScrollIntoView(e,s,o),[s,o]));R(()=>{if(b)return Dt().requestAnimationFrame(()=>{var e,t;(t=(e=h.current)?.scrollIntoView)==null||t.call(e,{block:`nearest`})})},[b,h]);let x=z(e=>{e.preventDefault(),e.button===_r.Left&&(c||(y(),hi()||requestAnimationFrame(()=>f()),r.mode===wc.Single&&i.actions.closeCombobox()))}),S=z(()=>{if(c)return i.actions.goToOption({focus:X.Nothing});let e=r.calculateIndex(s);i.actions.goToOption({focus:X.Specific,idx:e})}),C=Bi(),w=z(e=>C.update(e)),T=z(e=>{if(!C.wasMoved(e)||c||p&&i.state.activationTrigger===Tc.Pointer)return;let t=r.calculateIndex(s);i.actions.goToOption({focus:X.Specific,idx:t},Tc.Pointer)}),E=z(e=>{C.wasMoved(e)&&(c||p&&(r.optionsPropsRef.current.hold||i.state.activationTrigger===Tc.Pointer&&i.actions.goToOption({focus:X.Nothing})))}),D=B({active:p,focus:p,selected:m,disabled:c}),O={id:o,ref:v,role:`option`,tabIndex:c===!0?void 0:-1,"aria-disabled":c===!0?!0:void 0,"aria-selected":m,disabled:void 0,onMouseDown:x,onFocus:S,onPointerEnter:w,onMouseEnter:w,onPointerMove:T,onMouseMove:T,onPointerLeave:E,onMouseLeave:E};return H()({ourProps:O,theirProps:u,slot:D,defaultTag:Kc,name:`Combobox.Option`})}var Jc=U(Rc),Yc=U(Hc),Xc=U(Bc),Zc=Wn,Qc=U(Gc),$c=U(qc),el=Object.assign(Jc,{Input:Xc,Button:Yc,Label:Zc,Options:Qc,Option:$c});function tl(e,t=typeof document<`u`?document.defaultView:null,n){let r=Gr(e,`escape`);Di(t,`keydown`,e=>{r&&(e.defaultPrevented||e.key===G.Escape&&n(e))})}function nl(){let[e]=(0,P.useState)(()=>typeof window<`u`&&typeof window.matchMedia==`function`?window.matchMedia(`(pointer: coarse)`):null),[t,n]=(0,P.useState)(e?.matches??!1);return R(()=>{if(!e)return;function t(e){n(e.matches)}return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[e]),t}function rl({defaultContainers:e=[],portals:t,mainTreeNode:n}={}){let r=z(()=>{let r=St(n),i=[];for(let t of e)t!==null&&(hn(t)?i.push(t):`current`in t&&hn(t.current)&&i.push(t.current));if(t!=null&&t.current)for(let e of t.current)i.push(e);for(let e of r?.querySelectorAll(`html > *, body > *`)??[])e!==document.body&&e!==document.head&&hn(e)&&e.id!==`headlessui-portal-root`&&(n&&(e.contains(n)||e.contains(n?.getRootNode()?.host))||i.some(t=>e.contains(t))||i.push(e));return i});
8return{resolveContainers:r,contains:z(e=>r().some(t=>t.contains(e)))}}var il=(0,P.createContext)(null);function al({children:e,node:t}){let[n,r]=(0,P.useState)(null),i=ol(t??n);return P.createElement(il.Provider,{value:i},e,i===null&&P.createElement(sn,{features:an.Hidden,ref:e=>{if(e){for(let t of St(e)?.querySelectorAll(`html > *, body > *`)??[])if(t!==document.body&&t!==document.head&&hn(t)&&t!=null&&t.contains(e)){r(t);break}}}}))}function ol(e=null){return(0,P.useContext)(il)??e}function sl(){let e=(0,P.useRef)(!1);return R(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var cl=(e=>(e[e.Forwards=0]=`Forwards`,e[e.Backwards=1]=`Backwards`,e))(cl||{});function ll(){let e=(0,P.useRef)(0);return _i(!0,`keydown`,t=>{t.key===`Tab`&&(e.current=+!!t.shiftKey)},!0),e}function ul(e){if(!e)return new Set;if(typeof e==`function`)return new Set(e());let t=new Set;for(let n of e.current)hn(n.current)&&t.add(n.current);return t}var dl=`div`,fl=(e=>(e[e.None=0]=`None`,e[e.InitialFocus=1]=`InitialFocus`,e[e.TabLock=2]=`TabLock`,e[e.FocusLock=4]=`FocusLock`,e[e.RestoreFocus=8]=`RestoreFocus`,e[e.AutoFocus=16]=`AutoFocus`,e))(fl||{});function pl(e,t){let n=(0,P.useRef)(null),r=W(n,t),{initialFocus:i,initialFocusFallback:a,containers:o,features:s=15,...c}=e;nc()||(s=0);let l=bi(n.current);_l(s,{ownerDocument:l});let u=vl(s,{ownerDocument:l,container:n,initialFocus:i,initialFocusFallback:a});yl(s,{ownerDocument:l,container:n,containers:o,previousActiveElement:u});let d=ll(),f=z(e=>{if(!gn(n.current))return;let t=n.current;(e=>e())(()=>{V(d.current,{[cl.Forwards]:()=>{J(t,q.First,{skipElements:[e.relatedTarget,a]})},[cl.Backwards]:()=>{J(t,q.Last,{skipElements:[e.relatedTarget,a]})}})})}),p=Gr(!!(s&2),`focus-trap#tab-lock`),m=Ot(),h=(0,P.useRef)(!1),g={ref:r,onKeyDown(e){e.key==`Tab`&&(h.current=!0,m.requestAnimationFrame(()=>{h.current=!1}))},onBlur(e){if(!(s&4))return;let t=ul(o);gn(n.current)&&t.add(n.current);let r=e.relatedTarget;_n(r)&&r.dataset.headlessuiFocusGuard!==`true`&&(bl(t,r)||(h.current?J(n.current,V(d.current,{[cl.Forwards]:()=>q.Next,[cl.Backwards]:()=>q.Previous})|q.WrapAround,{relativeTo:e.target}):_n(e.target)&&ci(e.target)))}},_=H();return P.createElement(P.Fragment,null,p&&P.createElement(sn,{as:`button`,type:`button`,"data-headlessui-focus-guard":!0,onFocus:f,features:an.Focusable}),_({ourProps:g,theirProps:c,defaultTag:dl,name:`FocusTrap`}),p&&P.createElement(sn,{as:`button`,type:`button`,"data-headlessui-focus-guard":!0,onFocus:f,features:an.Focusable}))}var ml=U(pl),hl=Object.assign(ml,{features:fl});function gl(e=!0){let t=(0,P.useRef)(Zs.slice());return Xi(([e],[n])=>{n===!0&&e===!1&&Et(()=>{t.current.splice(0)}),n===!1&&e===!0&&(t.current=Zs.slice())},[e,Zs,t]),z(()=>t.current.find(e=>e!=null&&e.isConnected)??null)}function _l(e,{ownerDocument:t}){let n=!!(e&8),r=gl(n);Xi(()=>{n||Tt(t?.body)&&ci(r())},[n]),ec(()=>{n&&ci(r())})}function vl(e,{ownerDocument:t,container:n,initialFocus:r,initialFocusFallback:i}){let a=(0,P.useRef)(null),o=Gr(!!(e&1),`focus-trap#initial-focus`),s=sl();return Xi(()=>{if(e===0)return;if(!o){i!=null&&i.current&&ci(i.current);return}let c=n.current;c&&Et(()=>{if(!s.current)return;let n=t?.activeElement;if(r!=null&&r.current){if(r?.current===n){a.current=n;return}}else if(c.contains(n)){a.current=n;return}if(r!=null&&r.current)ci(r.current);else{if(e&16){if(J(c,q.First|q.AutoFocus)!==ei.Error)return}else if(J(c,q.First)!==ei.Error)return;if(i!=null&&i.current&&(ci(i.current),t?.activeElement===i.current))return;console.warn(`There are no focusable elements inside the <FocusTrap />`)}a.current=t?.activeElement})},[i,o,e]),a}function yl(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:i}){let a=sl(),o=!!(e&4);Di(t?.defaultView,`focus`,e=>{if(!o||!a.current)return;let t=ul(r);gn(n.current)&&t.add(n.current);let s=i.current;if(!s)return;let c=e.target;gn(c)?bl(t,c)?(i.current=c,ci(c)):(e.preventDefault(),e.stopPropagation(),ci(s)):ci(i.current)},!0)}function bl(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function xl(e){return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||!Jt(e.as??kl)||P.Children.count(e.children)===1}var Sl=(0,P.createContext)(null);
8Sl.displayName=`TransitionContext`;var Cl=(e=>(e.Visible=`visible`,e.Hidden=`hidden`,e))(Cl||{});function wl(){let e=(0,P.useContext)(Sl);if(e===null)throw Error(`A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.`);return e}function Tl(){let e=(0,P.useContext)(El);if(e===null)throw Error(`A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.`);return e}var El=(0,P.createContext)(null);El.displayName=`NestingContext`;function Dl(e){return`children`in e?Dl(e.children):e.current.filter(({el:e})=>e.current!==null).filter(({state:e})=>e===`visible`).length>0}function Ol(e,t){let n=kt(e),r=(0,P.useRef)([]),i=sl(),a=Ot(),o=z((e,t=Lt.Hidden)=>{let o=r.current.findIndex(({el:t})=>t===e);o!==-1&&(V(t,{[Lt.Unmount](){r.current.splice(o,1)},[Lt.Hidden](){r.current[o].state=`hidden`}}),a.microTask(()=>{var e;!Dl(r)&&i.current&&((e=n.current)==null||e.call(n))}))}),s=z(e=>{let t=r.current.find(({el:t})=>t===e);return t?t.state!==`visible`&&(t.state=`visible`):r.current.push({el:e,state:`visible`}),()=>o(e,Lt.Unmount)}),c=(0,P.useRef)([]),l=(0,P.useRef)(Promise.resolve()),u=(0,P.useRef)({enter:[],leave:[]}),d=z((e,n,r)=>{c.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter(([t])=>t!==e)),t?.chains.current[n].push([e,new Promise(e=>{c.current.push(e)})]),t?.chains.current[n].push([e,new Promise(e=>{Promise.all(u.current[n].map(([e,t])=>t)).then(()=>e())})]),n===`enter`?l.current=l.current.then(()=>t?.wait.current).then(()=>r(n)):r(n)}),f=z((e,t,n)=>{Promise.all(u.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;(e=c.current.shift())==null||e()}).then(()=>n(t))});return(0,P.useMemo)(()=>({children:r,register:s,unregister:o,onStart:d,onStop:f,wait:l,chains:u}),[s,o,r,d,f,u,l])}var kl=P.Fragment,Al=It.RenderStrategy;function jl(e,t){var n;let{transition:r=!0,beforeEnter:i,afterEnter:a,beforeLeave:o,afterLeave:s,enter:c,enterFrom:l,enterTo:u,entered:d,leave:f,leaveFrom:p,leaveTo:m,...h}=e,[g,_]=(0,P.useState)(null),v=(0,P.useRef)(null),y=xl(e),b=W(...y?[v,t,_]:t===null?[]:[t]),x=(n=h.unmount)==null||n?Lt.Unmount:Lt.Hidden,{show:S,appear:C,initial:w}=wl(),[T,E]=(0,P.useState)(S?`visible`:`hidden`),D=Tl(),{register:O,unregister:k}=D;R(()=>O(v),[O,v]),R(()=>{if(x===Lt.Hidden&&v.current){if(S&&T!==`visible`){E(`visible`);return}return V(T,{hidden:()=>k(v),visible:()=>O(v)})}},[T,v,O,k,S,x]);let A=nc();R(()=>{if(y&&A&&T===`visible`&&v.current===null)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[v,T,A,y]);let j=w&&!C,M=C&&S&&w,ee=(0,P.useRef)(!1),te=Ol(()=>{ee.current||(E(`hidden`),k(v))},D),ne=z(e=>{ee.current=!0;let t=e?`enter`:`leave`;te.onStart(v,t,e=>{e===`enter`?i?.():e===`leave`&&o?.()})}),re=z(e=>{let t=e?`enter`:`leave`;ee.current=!1,te.onStop(v,t,e=>{e===`enter`?a?.():e===`leave`&&s?.()}),t===`leave`&&!Dl(te)&&(E(`hidden`),k(v))});(0,P.useEffect)(()=>{y&&r||(ne(S),re(S))},[S,y,r]);let[,N]=Wi(!(!r||!y||!A||j),g,S,{start:ne,end:re}),ie=Wt({ref:b,className:Ft(h.className,M&&c,M&&l,N.enter&&c,N.enter&&N.closed&&l,N.enter&&!N.closed&&u,N.leave&&f,N.leave&&!N.closed&&p,N.leave&&N.closed&&m,!N.transition&&S&&d)?.trim()||void 0,...Ui(N)}),ae=0;T===`visible`&&(ae|=Y.Open),T===`hidden`&&(ae|=Y.Closed),S&&T===`hidden`&&(ae|=Y.Opening),!S&&T===`visible`&&(ae|=Y.Closing);let oe=H();return P.createElement(El.Provider,{value:te},P.createElement(Js,{value:ae},oe({ourProps:ie,theirProps:h,defaultTag:kl,features:Al,visible:T===`visible`,name:`Transition.Child`})))}function Ml(e,t){let{show:n,appear:r=!1,unmount:i=!0,...a}=e,o=(0,P.useRef)(null),s=W(...xl(e)?[o,t]:t===null?[]:[t]);nc();let c=qs();if(n===void 0&&c!==null&&(n=(c&Y.Open)===Y.Open),n===void 0)throw Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[l,u]=(0,P.useState)(n?`visible`:`hidden`),d=Ol(()=>{n||u(`hidden`)}),[f,p]=(0,P.useState)(!0),m=(0,P.useRef)([n]);R(()=>{f!==!1&&m.current[m.current.length-1]!==n&&(m.current.push(n),p(!1))},[m,n]);let h=(0,P.useMemo)(()=>({show:n,appear:r,initial:f}),[n,r,f]);R(()=>{n?u(`visible`):!Dl(d)&&o.current!==null&&u(`hidden`)},[n,d]);let g={unmount:i},_=z(()=>{var t;f&&p(!1),(t=e.beforeEnter)==null||t.call(e)}),v=z(()=>{var t;f&&p(!1),(t=e.beforeLeave)==null||t.call(e)}),y=H();return P.createElement(El.Provider,{value:d},P.createElement(Sl.Provider,{value:h},y({ourProps:{...g,as:P.Fragment,children:P.createElement(Fl,{ref:s,...g,...a,beforeEnter:_,beforeLeave:v})},theirProps:{},defaultTag:P.Fragment,features:Al,visible:l===`visible`,name:`Transition`})))}function Nl(e,t){let n=(0,P.useContext)(Sl)!==null,r=qs()!==null;return P.createElement(P.Fragment,null,!n&&r?P.createElement(Pl,{ref:t,...e}):P.createElement(Fl,{ref:t,...e}))}var Pl=U(Ml),Fl=U(jl),Il=U(Nl),Ll=Object.assign(Pl,{Child:Il,Root:Pl}),Rl=(e=>(e[e.Open=0]=`Open`,e[e.Closed=1]=`Closed`,e))(Rl||{}),zl=(e=>(e[e.SetTitleId=0]=`SetTitleId`,e))(zl||{}),Bl={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Vl=(0,P.createContext)(null);Vl.displayName=`DialogContext`;function Hl(e){let t=(0,P.useContext)(Vl);if(t===null){let t=Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Hl),t}return t}function Ul(e,t){return V(t.type,Bl,e,t)}var Wl=U(function(e,t){let n=(0,P.useId)(),{id:r=`headlessui-dialog-${n}`,open:i,onClose:a,initialFocus:o,role:s=`dialog`,autoFocus:c=!0,__demoMode:l=!1,unmount:u=!1,...d}=e,f=(0,P.useRef)(!1);s=function(){return s===`dialog`||s===`alertdialog`?s:(f.current||(f.current=!0,
8console.warn(`Invalid role [${s}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),`dialog`)}();let p=qs();i===void 0&&p!==null&&(i=(p&Y.Open)===Y.Open);let m=(0,P.useRef)(null),h=W(m,t),g=bi(m.current),_=+!i,[v,y]=(0,P.useReducer)(Ul,{titleId:null,descriptionId:null,panelRef:(0,P.createRef)()}),b=z(()=>a(!1)),x=z(e=>y({type:0,id:e})),S=nc()?_===0:!1,[C,w]=mc(),T={get current(){return v.panelRef.current??m.current}},E=ol(),{resolveContainers:D}=rl({mainTreeNode:E,portals:C,defaultContainers:[T]}),O=p===null?!1:(p&Y.Closing)===Y.Closing;Xr(l||O?!1:S,{allowed:z(()=>[m.current?.closest(`[data-headlessui-portal]`)??null]),disallowed:z(()=>[E?.closest(`body > *:not(#headlessui-portal-root)`)??null])});let k=Vr.get(null);R(()=>{if(S)return k.actions.push(r),()=>k.actions.pop(r)},[k,r,S]);let A=K(k,(0,P.useCallback)(e=>k.selectors.isTop(e,r),[k,r]));yi(A,D,e=>{e.preventDefault(),b()}),tl(A,g?.defaultView,e=>{e.preventDefault(),e.stopPropagation(),document.activeElement&&`blur`in document.activeElement&&typeof document.activeElement.blur==`function`&&document.activeElement.blur(),b()}),Ri(l||O?!1:S,g,D),Zr(S,m,b);let[j,M]=Mn(),ee=(0,P.useMemo)(()=>[{dialogState:_,close:b,setTitleId:x,unmount:u},v],[_,b,x,u,v]),te=B({open:_===0}),ne={ref:h,id:r,role:s,tabIndex:-1,"aria-modal":l?void 0:_===0?!0:void 0,"aria-labelledby":v.titleId,"aria-describedby":j,unmount:u},re=!nl(),N=fl.None;S&&!l&&(N|=fl.RestoreFocus,N|=fl.TabLock,c&&(N|=fl.AutoFocus),re&&(N|=fl.InitialFocus));let ie=H();return P.createElement(Ys,null,P.createElement(ac,{force:!0},P.createElement(_c,null,P.createElement(Vl.Provider,{value:ee},P.createElement(gc,{target:m},P.createElement(ac,{force:!1},P.createElement(M,{slot:te},P.createElement(w,null,P.createElement(hl,{initialFocus:o,initialFocusFallback:m,containers:D,features:N},P.createElement(qn,{value:b},ie({ourProps:ne,theirProps:d,slot:te,defaultTag:Gl,features:Kl,visible:_===0,name:`Dialog`})))))))))))}),Gl=`div`,Kl=It.RenderStrategy|It.Static;function ql(e,t){let{transition:n=!1,open:r,...i}=e,a=qs(),o=e.hasOwnProperty(`open`)||a!==null,s=e.hasOwnProperty(`onClose`);if(!o&&!s)throw Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!o)throw Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!s)throw Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!a&&typeof e.open!=`boolean`)throw Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if(typeof e.onClose!=`function`)throw Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return(r!==void 0||n)&&!i.static?P.createElement(al,null,P.createElement(Ll,{show:r,transition:n,unmount:i.unmount},P.createElement(Wl,{ref:t,...i}))):P.createElement(al,null,P.createElement(Wl,{ref:t,open:r,...i}))}var Jl=`div`;function Yl(e,t){let n=(0,P.useId)(),{id:r=`headlessui-dialog-panel-${n}`,transition:i=!1,...a}=e,[{dialogState:o,unmount:s},c]=Hl(`Dialog.Panel`),l=W(t,c.panelRef),u=B({open:o===0}),d={ref:l,id:r,onClick:z(e=>{e.stopPropagation()})},f=i?Il:P.Fragment,p=i?{unmount:s}:{},m=H();return P.createElement(f,{...p},m({ourProps:d,theirProps:a,slot:u,defaultTag:Jl,name:`Dialog.Panel`}))}var Xl=`div`;function Zl(e,t){let{transition:n=!1,...r}=e,[{dialogState:i,unmount:a}]=Hl(`Dialog.Backdrop`),o=B({open:i===0}),s={ref:t,"aria-hidden":!0},c=n?Il:P.Fragment,l=n?{unmount:a}:{},u=H();return P.createElement(c,{...l},u({ourProps:s,theirProps:r,slot:o,defaultTag:Xl,name:`Dialog.Backdrop`}))}var Ql=`h2`;function $l(e,t){let n=(0,P.useId)(),{id:r=`headlessui-dialog-title-${n}`,...i}=e,[{dialogState:a,setTitleId:o}]=Hl(`Dialog.Title`),s=W(t);(0,P.useEffect)(()=>(o(r),()=>o(null)),[r,o]);let c=B({open:a===0}),l={ref:s,id:r};return H()({ourProps:l,theirProps:i,slot:c,defaultTag:Ql,name:`Dialog.Title`})}var eu=U(ql),tu=U(Yl),nu=U(Zl),ru=U($l),iu=Object.assign(eu,{Panel:tu,Title:ru,Description:In}),au=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function ou(e){let t=e.innerText??``,n=e.cloneNode(!0);if(!gn(n))return t;let r=!1;for(let e of n.querySelectorAll(`[hidden],[aria-hidden],[role="img"]`))e.remove(),r=!0;let i=r?n.innerText??``:t;return au.test(i)&&(i=i.replace(au,``)),i}function su(e){let t=e.getAttribute(`aria-label`);if(typeof t==`string`)return t.trim();let n=e.getAttribute(`aria-labelledby`);if(n){let e=n.split(` `).map(e=>{let t=document.getElementById(e);if(t){let e=t.getAttribute(`aria-label`);return typeof e==`string`?e.trim():ou(t).trim()}return null}
8).filter(Boolean);if(e.length>0)return e.join(`, `)}return ou(e).trim()}function cu(e){let t=(0,P.useRef)(``),n=(0,P.useRef)(``);return z(()=>{let r=e.current;if(!r)return``;let i=r.innerText;if(t.current===i)return n.current;let a=su(r).trim().toLowerCase();return t.current=i,n.current=a,a})}var lu=Object.defineProperty,uu=(e,t,n)=>t in e?lu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,du=(e,t,n)=>(uu(e,typeof t==`symbol`?t:t+``,n),n),fu=(e=>(e[e.Open=0]=`Open`,e[e.Closed=1]=`Closed`,e))(fu||{}),pu=(e=>(e[e.Single=0]=`Single`,e[e.Multi=1]=`Multi`,e))(pu||{}),mu=(e=>(e[e.Pointer=0]=`Pointer`,e[e.Other=1]=`Other`,e))(mu||{}),hu=(e=>(e[e.OpenListbox=0]=`OpenListbox`,e[e.CloseListbox=1]=`CloseListbox`,e[e.GoToOption=2]=`GoToOption`,e[e.Search=3]=`Search`,e[e.ClearSearch=4]=`ClearSearch`,e[e.SelectOption=5]=`SelectOption`,e[e.RegisterOptions=6]=`RegisterOptions`,e[e.UnregisterOptions=7]=`UnregisterOptions`,e[e.SetButtonElement=8]=`SetButtonElement`,e[e.SetOptionsElement=9]=`SetOptionsElement`,e[e.SortOptions=10]=`SortOptions`,e[e.MarkButtonAsMoved=11]=`MarkButtonAsMoved`,e))(hu||{});function gu(e,t=e=>e){let n=e.activeOptionIndex===null?null:e.options[e.activeOptionIndex],r=di(t(e.options.slice()),e=>e.dataRef.current.domRef.current),i=n?r.indexOf(n):null;return i===-1&&(i=null),{options:r,activeOptionIndex:i}}var _u={1(e){if(e.dataRef.current.disabled||e.listboxState===1)return e;let t=e.buttonElement?vc.Tracked(yc(e.buttonElement)):e.buttonPositionState;return{...e,activeOptionIndex:null,pendingFocus:{focus:X.Nothing},listboxState:1,__demoMode:!1,buttonPositionState:t}},0(e,t){if(e.dataRef.current.disabled||e.listboxState===0)return e;let n=e.activeOptionIndex,{isSelected:r}=e.dataRef.current,i=e.options.findIndex(e=>r(e.dataRef.current.value));return i!==-1&&(n=i),{...e,frozenValue:!1,pendingFocus:t.focus,listboxState:0,activeOptionIndex:n,__demoMode:!1,buttonPositionState:vc.Idle}},2(e,t){if(e.dataRef.current.disabled||e.listboxState===1)return e;let n={...e,searchQuery:``,activationTrigger:t.trigger??1,__demoMode:!1};if(t.focus===X.Nothing)return{...n,activeOptionIndex:null};if(t.focus===X.Specific)return{...n,activeOptionIndex:e.options.findIndex(e=>e.id===t.id)};if(t.focus===X.Previous){let r=e.activeOptionIndex;if(r!==null){let i=e.options[r].dataRef.current.domRef,a=$s(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(a!==null){let t=e.options[a].dataRef.current.domRef;if(i.current?.previousElementSibling===t.current||t.current?.previousElementSibling===null)return{...n,activeOptionIndex:a}}}}else if(t.focus===X.Next){let r=e.activeOptionIndex;if(r!==null){let i=e.options[r].dataRef.current.domRef,a=$s(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(a!==null){let t=e.options[a].dataRef.current.domRef;if(i.current?.nextElementSibling===t.current||t.current?.nextElementSibling===null)return{...n,activeOptionIndex:a}}}}let r=gu(e),i=$s(t,{resolveItems:()=>r.options,resolveActiveIndex:()=>r.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...n,...r,activeOptionIndex:i}},3:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let n=+(e.searchQuery===``),r=e.searchQuery+t.value.toLowerCase(),i=(e.activeOptionIndex===null?e.options:e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n))).find(e=>!e.dataRef.current.disabled&&e.dataRef.current.textValue?.startsWith(r)),a=i?e.options.indexOf(i):-1;return a===-1||a===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:a,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===``?e:{...e,searchQuery:``}},5(e){return e.dataRef.current.mode===0?{...e,frozenValue:!0}:{...e}},6:(e,t)=>{let n=e.options.concat(t.options),r=e.activeOptionIndex;if(e.pendingFocus.focus!==X.Nothing&&(r=$s(e.pendingFocus,{resolveItems:()=>n,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled})),e.activeOptionIndex===null){let{isSelected:t}=e.dataRef.current;if(t){let e=n.findIndex(e=>t?.(e.dataRef.current.value));e!==-1&&(r=e)}}return{...e,options:n,activeOptionIndex:r,pendingFocus:{focus:X.Nothing},pendingShouldSort:!0}},7:(e,t)=>{let n=e.options,r=[],i=new Set(t.options);for(let[e,t]of n.entries())if(i.has(t.id)&&(r.push(e),i.delete(t.id),i.size===0))break;if(r.length>0){n=n.slice();for(let e of r.reverse())n.splice(e,1)}return{...e,options:n,activationTrigger:1}},8:(e,t)=>
8e.buttonElement===t.element?e:{...e,buttonElement:t.element},9:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element},10:e=>e.pendingShouldSort?{...e,...gu(e),pendingShouldSort:!1}:e,11(e){return e.buttonPositionState.kind===`Tracked`?{...e,buttonPositionState:vc.Moved}:e}},vu=class e extends Ar{constructor(e){super(e),du(this,`actions`,{onChange:e=>{let{onChange:t,compare:n,mode:r,value:i}=this.state.dataRef.current;return V(r,{0:()=>t?.(e),1:()=>{let r=i.slice(),a=r.findIndex(t=>n(t,e));return a===-1?r.push(e):r.splice(a,1),t?.(r)}})},registerOption:Pr(()=>{let e=[],t=new Set;return[(n,r)=>{t.has(r)||(t.add(r),e.push({id:n,dataRef:r}))},()=>(t.clear(),this.send({type:6,options:e.splice(0)}))]}),unregisterOption:Pr(()=>{let e=[];return[t=>e.push(t),()=>{this.send({type:7,options:e.splice(0)})}]}),goToOption:Pr(()=>{let e=null;return[(t,n)=>{e={type:2,...t,trigger:n}},()=>e&&this.send(e)]}),closeListbox:()=>{this.send({type:1})},openListbox:e=>{this.send({type:0,focus:e})},selectActiveOption:()=>{var e;if(this.state.activeOptionIndex!==null){let{dataRef:e}=this.state.options[this.state.activeOptionIndex];this.actions.selectOption(e.current.value)}else this.state.dataRef.current.mode===0&&(this.actions.closeListbox(),(e=this.state.buttonElement)==null||e.focus({preventScroll:!0}))},selectOption:e=>{this.send({type:5,value:e})},search:e=>{this.send({type:3,value:e})},clearSearch:()=>{this.send({type:4})},setButtonElement:e=>{this.send({type:8,element:e})},setOptionsElement:e=>{this.send({type:9,element:e})}}),du(this,`selectors`,{activeDescendantId(e){var t;let n=e.activeOptionIndex,r=e.options;return n===null||(t=r[n])==null?void 0:t.id},isActive(e,t){let n=e.activeOptionIndex,r=e.options;return n===null?!1:r[n]?.id===t},hasFrozenValue(e){return e.frozenValue},shouldScrollIntoView(e,t){return e.__demoMode||e.listboxState!==0||e.activationTrigger===0?!1:this.isActive(e,t)},didButtonMove(e){return e.buttonPositionState.kind===`Moved`}}),this.on(6,()=>{requestAnimationFrame(()=>{this.send({type:10})})});{let e=this.state.id,t=Vr.get(null);this.disposables.add(t.on(Rr.Push,n=>{!t.selectors.isTop(n,e)&&this.state.listboxState===0&&this.actions.closeListbox()})),this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}this.disposables.group(e=>{this.on(1,t=>{t.buttonElement&&(e.dispose(),e.add(bc(t.buttonElement,t.buttonPositionState,()=>{this.send({type:11})})))})}),this.on(5,(e,t)=>{var n;this.actions.onChange(t.value),this.state.dataRef.current.mode===0&&(this.actions.closeListbox(),(n=this.state.buttonElement)==null||n.focus({preventScroll:!0}))})}static new({id:t,__demoMode:n=!1}){return new e({id:t,dataRef:{current:{}},listboxState:+!n,options:[],searchQuery:``,activeOptionIndex:null,activationTrigger:1,buttonElement:null,optionsElement:null,pendingShouldSort:!1,pendingFocus:{focus:X.Nothing},frozenValue:!1,__demoMode:n,buttonPositionState:vc.Idle})}reduce(e,t){return V(t.type,_u,e,t)}},yu=(0,P.createContext)(null);function bu(e){let t=(0,P.useContext)(yu);if(t===null){let t=Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,xu),t}return t}function xu({id:e,__demoMode:t=!1}){let n=(0,P.useMemo)(()=>vu.new({id:e,__demoMode:t}),[]);return ec(()=>n.dispose()),n}var Su=(0,P.createContext)(null);Su.displayName=`ListboxDataContext`;function Cu(e){let t=(0,P.useContext)(Su);if(t===null){let t=Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Cu),t}return t}var wu=P.Fragment;function Tu(e,t){let n=(0,P.useId)(),r=Pt(),{value:i,defaultValue:a,form:o,name:s,onChange:c,by:l,invalid:u=!1,disabled:d=r||!1,horizontal:f=!1,multiple:p=!1,__demoMode:m=!1,...h}=e,g=f?`horizontal`:`vertical`,_=W(t),v=Zt(a),[y=p?[]:void 0,b]=Xt(i,c,v),x=xu({id:n,__demoMode:m}),S=(0,P.useRef)({static:!1,hold:!1}),C=(0,P.useRef)(new Map),w=mr(l),T=(0,P.useCallback)(e=>V(E.mode,{[pu.Multi]:()=>y.some(t=>w(t,e)),[pu.Single]:()=>w(y,e)}),[y]),E=B({value:y,disabled:d,invalid:u,mode:p?pu.Multi:pu.Single,orientation:g,onChange:b,compare:w,isSelected:T,optionsPropsRef:S,listRef:C});R(()=>{x.state.dataRef.current=E},[E]);let D=K(x,e=>e.listboxState),O=Vr.get(null),k=K(O,(0,P.useCallback)(e=>O.selectors.isTop(e,n),[O,n])),[A,j]=K(x,e=>[e.buttonElement,e.optionsElement]);yi(k,[A,j],(e,t)=>{x.send({type:hu.CloseListbox}),ai(t,ii.Loose)||(e.preventDefault(),A?.focus())});let M=B({open:D===fu.Open,disabled:d,invalid:u,value:y}),[ee,te]=Bn({inherit:!0}),ne={ref:_},re=(0,P.useCallback)(()=>
8{if(v!==void 0)return b?.(v)},[b,v]),N=H();return P.createElement(te,{value:ee,props:{htmlFor:A?.id},slot:{open:D===fu.Open,disabled:d}},P.createElement(Ls,null,P.createElement(yu.Provider,{value:x},P.createElement(Su.Provider,{value:E},P.createElement(Js,{value:V(D,{[fu.Open]:Y.Open,[fu.Closed]:Y.Closed})},s!=null&&y!=null&&P.createElement(un,{disabled:d,data:{[s]:y},form:o,onReset:re}),N({ourProps:ne,theirProps:h,slot:M,defaultTag:wu,name:`Listbox`}))))))}var Eu=`button`;function Du(e,t){let n=(0,P.useId)(),r=pn(),i=Cu(`Listbox.Button`),a=bu(`Listbox.Button`),{id:o=r||`headlessui-listbox-button-${n}`,disabled:s=i.disabled||!1,autoFocus:c=!1,...l}=e,u=W(t,Ms(),a.actions.setButtonElement),d=Ns(),[f,p,m]=K(a,e=>[e.listboxState,e.buttonElement,e.optionsElement]);Ei(f===fu.Open,{trigger:p,action:(0,P.useCallback)(e=>{if(p!=null&&p.contains(e.target))return Ci.Ignore;let t=e.target.closest(`[role="option"]:not([data-disabled])`);return gn(t)?Ci.Select(t):m!=null&&m.contains(e.target)?Ci.Ignore:Ci.Close},[p,m]),close:a.actions.closeListbox,select:a.actions.selectActiveOption});let h=z(e=>{switch(e.key){case G.Enter:tn(e.currentTarget);break;case G.Space:case G.ArrowDown:e.preventDefault(),a.actions.openListbox({focus:i.value?X.Nothing:X.First});break;case G.ArrowUp:e.preventDefault(),a.actions.openListbox({focus:i.value?X.Nothing:X.Last});break}}),g=z(e=>{switch(e.key){case G.Space:e.preventDefault();break}}),_=vr(e=>{var t;a.state.listboxState===fu.Open?((0,F.flushSync)(()=>a.actions.closeListbox()),(t=a.state.buttonElement)==null||t.focus({preventScroll:!0})):(e.preventDefault(),a.actions.openListbox({focus:X.Nothing}))}),v=z(e=>e.preventDefault()),y=zn([o]),b=jn(),{isFocusVisible:x,focusProps:S}=_t({autoFocus:c}),{isHovered:C,hoverProps:w}=gt({isDisabled:s}),{pressed:T,pressProps:E}=Mt({disabled:s}),D=B({open:f===fu.Open,active:T||f===fu.Open,disabled:s,invalid:i.invalid,value:i.value,hover:C,focus:x,autofocus:c}),O=K(a,e=>e.listboxState===fu.Open),k=Ut(d(),{ref:u,id:o,type:ki(e,p),"aria-haspopup":`listbox`,"aria-controls":m?.id,"aria-expanded":O,"aria-labelledby":y,"aria-describedby":b,disabled:s||void 0,autoFocus:c,onKeyDown:h,onKeyUp:g,onKeyPress:v},_,S,w,E);return H()({ourProps:k,theirProps:l,slot:D,defaultTag:Eu,name:`Listbox.Button`})}var Ou=(0,P.createContext)(!1),ku=`div`,Au=It.RenderStrategy|It.Static;function ju(e,t){let n=(0,P.useId)(),{id:r=`headlessui-listbox-options-${n}`,anchor:i,portal:a=!1,modal:o=!0,transition:s=!1,...c}=e,l=js(i),[u,d]=(0,P.useState)(null);l&&(a=!0);let f=Cu(`Listbox.Options`),p=bu(`Listbox.Options`),[m,h,g,_]=K(p,e=>[e.listboxState,e.buttonElement,e.optionsElement,e.__demoMode]),v=bi(h),y=bi(g),b=qs(),[x,S]=Wi(s,u,b===null?m===fu.Open:(b&Y.Open)===Y.Open);Zr(x,h,p.actions.closeListbox),Ri(_?!1:o&&m===fu.Open,y),Xr(_?!1:o&&m===fu.Open,{allowed:(0,P.useCallback)(()=>[h,g],[h,g])});let C=K(p,p.selectors.didButtonMove)?!1:x,w=Gs(K(p,p.selectors.hasFrozenValue)&&!e.static,f.value),T=(0,P.useCallback)(e=>f.compare(w,e),[f.compare,w]),E=K(p,e=>{var t;if(l==null||!((t=l?.to)!=null&&t.includes(`selection`)))return null;let n=e.options.findIndex(e=>T(e.dataRef.current.value));return n===-1&&(n=0),n}),[D,O]=Fs((()=>{if(l==null)return;if(E===null)return{...l,inner:void 0};let e=Array.from(f.listRef.current.values());return{...l,inner:{listRef:{current:e},index:E}}})()),k=Ps(),A=W(t,l?D:null,p.actions.setOptionsElement,d),j=Ot();(0,P.useEffect)(()=>{let e=g;e&&m===fu.Open&&(Tt(e)||e==null||e.focus({preventScroll:!0}))},[m,g]);let M=z(e=>{var t;switch(j.dispose(),e.key){case G.Space:if(p.state.searchQuery!==``)return e.preventDefault(),e.stopPropagation(),p.actions.search(e.key);case G.Enter:e.preventDefault(),e.stopPropagation(),p.actions.selectActiveOption();break;case V(f.orientation,{vertical:G.ArrowDown,horizontal:G.ArrowRight}):return e.preventDefault(),e.stopPropagation(),p.actions.goToOption({focus:X.Next});case V(f.orientation,{vertical:G.ArrowUp,horizontal:G.ArrowLeft}):return e.preventDefault(),e.stopPropagation(),p.actions.goToOption({focus:X.Previous});case G.Home:case G.PageUp:return e.preventDefault(),e.stopPropagation(),p.actions.goToOption({focus:X.First});case G.End:case G.PageDown:return e.preventDefault(),e.stopPropagation(),p.actions.goToOption({focus:X.Last});case G.Escape:e.preventDefault(),e.stopPropagation(),(0,F.flushSync)(()=>p.actions.closeListbox()),(t=p.state.buttonElement)==null||t.focus({preventScroll:!0});return;case G.Tab:e.preventDefault(),e.stopPropagation(),(0,F.flushSync)(()=>p.actions.closeListbox()),fi(p.state.buttonElement,e.shiftKey?q.Previous:q.Next);break;default:e.key.length===1&&(p.actions.search(e.key),j.setTimeout(()=>p.actions.clearSearch(),350));break}}),ee=K(p,e=>e.buttonElement?.id),te=B({open:m===fu.Open}),ne=Ut(l?k():{},{id:r,ref:A,"aria-activedescendant":K(p,p.selectors.activeDescendantId),"aria-multiselectable":f.mode===pu.Multi?!0:void 0,"aria-labelledby":ee,"aria-orientation":f.orientation,onKeyDown:M,role:`listbox`,tabIndex:m===fu.Open?0:void 0,style:{...c.style,...O,"--button-width":gr(x,h,!0).width},...Ui(S)}),re=H(),N=(0,P.useMemo)(()=>f.mode===pu.Multi?f:{...f,isSelected:T},[f,T]);return P.createElement(_c,{enabled:a?e.static||x:!1,ownerDocument:v},P.createElement(Su.Provider,{value:N},re({ourProps:ne,theirProps:c,slot:te,defaultTag:ku,features:Au,visible:C,name:`Listbox.Options`})))}var Mu=`div`;function Nu(e,t){let n=(0,P.useId)(),{id:r=`headlessui-listbox-option-${n}`,disabled:i=!1,value:a,...o}=e,s=(0,P.useContext)(Ou)===!0,c=Cu(`Listbox.Option`),l=bu(`Listbox.Option`),u=K(l,e=>l.selectors.isActive(e,r)),d=c.isSelected(a),f=(0,P.useRef)(null),p=cu(f),m=kt({disabled:i,value:a,domRef:f,get textValue(){return p()}}),h=W(t,f,e=>{e?c.listRef.current.set(r,e):c.listRef.current.delete(r)}),g=K(l,e=>l.selectors.shouldScrollIntoView(e,r));R(()=>
8{if(g)return Dt().requestAnimationFrame(()=>{var e,t;(t=(e=f.current)?.scrollIntoView)==null||t.call(e,{block:`nearest`})})},[g,f]),R(()=>{if(!s)return l.actions.registerOption(r,m),()=>l.actions.unregisterOption(r)},[m,r,s]);let _=z(e=>{if(i)return e.preventDefault();l.actions.selectOption(a)}),v=z(()=>{if(i)return l.actions.goToOption({focus:X.Nothing});l.actions.goToOption({focus:X.Specific,id:r})}),y=Bi(),b=z(e=>y.update(e)),x=z(e=>{y.wasMoved(e)&&(i||u&&l.state.activationTrigger===mu.Pointer||l.actions.goToOption({focus:X.Specific,id:r},mu.Pointer))}),S=z(e=>{y.wasMoved(e)&&(i||u&&l.state.activationTrigger===mu.Pointer&&l.actions.goToOption({focus:X.Nothing}))}),C=B({active:u,focus:u,selected:d,disabled:i,selectedOption:d&&s}),w=s?{}:{id:r,ref:h,role:`option`,tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0?!0:void 0,"aria-selected":d,disabled:void 0,onClick:_,onFocus:v,onPointerEnter:b,onMouseEnter:b,onPointerMove:x,onMouseMove:x,onPointerLeave:S,onMouseLeave:S},T=H();return!d&&s?null:T({ourProps:w,theirProps:o,slot:C,defaultTag:Mu,name:`Listbox.Option`})}var Pu=P.Fragment;function Fu(e,t){let{options:n,placeholder:r,...i}=e,a={ref:W(t)},o=Cu(`ListboxSelectedOption`),s=B({}),c=o.value===void 0||o.value===null||o.mode===pu.Multi&&Array.isArray(o.value)&&o.value.length===0,l=H();return P.createElement(Ou.Provider,{value:!0},l({ourProps:a,theirProps:{...i,children:P.createElement(P.Fragment,null,r&&c?r:n)},slot:s,defaultTag:Pu,name:`ListboxSelectedOption`}))}var Iu=U(Tu),Lu=U(Du),Ru=Wn,zu=U(ju),Bu=U(Nu),Vu=U(Fu),Hu=Object.assign(Iu,{Button:Lu,Label:Ru,Options:zu,Option:Bu,SelectedOption:Vu}),Uu=Object.defineProperty,Wu=(e,t,n)=>t in e?Uu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gu=(e,t,n)=>(Wu(e,typeof t==`symbol`?t:t+``,n),n),Ku=(e=>(e[e.Open=0]=`Open`,e[e.Closed=1]=`Closed`,e))(Ku||{}),qu=(e=>(e[e.Pointer=0]=`Pointer`,e[e.Other=1]=`Other`,e))(qu||{}),Q=(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.RegisterItems=5]=`RegisterItems`,e[e.UnregisterItems=6]=`UnregisterItems`,e[e.SetButtonElement=7]=`SetButtonElement`,e[e.SetItemsElement=8]=`SetItemsElement`,e[e.SortItems=9]=`SortItems`,e[e.MarkButtonAsMoved=10]=`MarkButtonAsMoved`,e))(Q||{});function Ju(e,t=e=>e){let n=e.activeItemIndex===null?null:e.items[e.activeItemIndex],r=di(t(e.items.slice()),e=>e.dataRef.current.domRef.current),i=n?r.indexOf(n):null;return i===-1&&(i=null),{items:r,activeItemIndex:i}}var Yu={1(e){if(e.menuState===1)return e;let t=e.buttonElement?vc.Tracked(yc(e.buttonElement)):e.buttonPositionState;return{...e,activeItemIndex:null,pendingFocus:{focus:X.Nothing},menuState:1,buttonPositionState:t}},0(e,t){return e.menuState===0?e:{...e,__demoMode:!1,pendingFocus:t.focus,menuState:0,buttonPositionState:vc.Idle}},2:(e,t)=>{if(e.menuState===1)return e;let n={...e,searchQuery:``,activationTrigger:t.trigger??1,__demoMode:!1};if(t.focus===X.Nothing)return{...n,activeItemIndex:null};if(t.focus===X.Specific)return{...n,activeItemIndex:e.items.findIndex(e=>e.id===t.id)};if(t.focus===X.Previous){let r=e.activeItemIndex;if(r!==null){let i=e.items[r].dataRef.current.domRef,a=$s(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(a!==null){let t=e.items[a].dataRef.current.domRef;if(i.current?.previousElementSibling===t.current||t.current?.previousElementSibling===null)return{...n,activeItemIndex:a}}}}else if(t.focus===X.Next){let r=e.activeItemIndex;if(r!==null){let i=e.items[r].dataRef.current.domRef,a=$s(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(a!==null){let t=e.items[a].dataRef.current.domRef;if(i.current?.nextElementSibling===t.current||t.current?.nextElementSibling===null)return{...n,activeItemIndex:a}}}}let r=Ju(e),i=$s(t,{resolveItems:()=>r.items,resolveActiveIndex:()=>r.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...n,...r,activeItemIndex:i}},3:(e,t)=>
8{let n=+(e.searchQuery===``),r=e.searchQuery+t.value.toLowerCase(),i=(e.activeItemIndex===null?e.items:e.items.slice(e.activeItemIndex+n).concat(e.items.slice(0,e.activeItemIndex+n))).find(e=>e.dataRef.current.textValue?.startsWith(r)&&!e.dataRef.current.disabled),a=i?e.items.indexOf(i):-1;return a===-1||a===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:a,activationTrigger:1}},4(e){return e.searchQuery===``?e:{...e,searchQuery:``,searchActiveItemIndex:null}},5:(e,t)=>{let n=e.items.concat(t.items.map(e=>e)),r=e.activeItemIndex;return e.pendingFocus.focus!==X.Nothing&&(r=$s(e.pendingFocus,{resolveItems:()=>n,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled})),{...e,items:n,activeItemIndex:r,pendingFocus:{focus:X.Nothing},pendingShouldSort:!0}},6:(e,t)=>{let n=e.items,r=[],i=new Set(t.items);for(let[e,t]of n.entries())if(i.has(t.id)&&(r.push(e),i.delete(t.id),i.size===0))break;if(r.length>0){n=n.slice();for(let e of r.reverse())n.splice(e,1)}return{...e,items:n,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.itemsElement===t.element?e:{...e,itemsElement:t.element},9:e=>e.pendingShouldSort?{...e,...Ju(e),pendingShouldSort:!1}:e,10(e){return e.buttonPositionState.kind===`Tracked`?{...e,buttonPositionState:vc.Moved}:e}},Xu=class e extends Ar{constructor(e){super(e),Gu(this,`actions`,{registerItem:Pr(()=>{let e=[],t=new Set;return[(n,r)=>{t.has(r)||(t.add(r),e.push({id:n,dataRef:r}))},()=>(t.clear(),this.send({type:5,items:e.splice(0)}))]}),unregisterItem:Pr(()=>{let e=[];return[t=>e.push(t),()=>this.send({type:6,items:e.splice(0)})]})}),Gu(this,`selectors`,{activeDescendantId(e){var t;let n=e.activeItemIndex,r=e.items;return n===null||(t=r[n])==null?void 0:t.id},isActive(e,t){let n=e.activeItemIndex,r=e.items;return n===null?!1:r[n]?.id===t},shouldScrollIntoView(e,t){return e.__demoMode||e.menuState!==0||e.activationTrigger===0?!1:this.isActive(e,t)},didButtonMove(e){return e.buttonPositionState.kind===`Moved`}}),this.on(5,()=>{this.disposables.requestAnimationFrame(()=>{this.send({type:9})})});{let e=this.state.id,t=Vr.get(null);this.disposables.add(t.on(Rr.Push,n=>{!t.selectors.isTop(n,e)&&this.state.menuState===0&&this.send({type:1})})),this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}this.disposables.group(e=>{this.on(1,t=>{t.buttonElement&&(e.dispose(),e.add(bc(t.buttonElement,t.buttonPositionState,()=>{this.send({type:10})})))})})}static new({id:t,__demoMode:n=!1}){return new e({id:t,__demoMode:n,menuState:+!n,buttonElement:null,itemsElement:null,items:[],searchQuery:``,activeItemIndex:null,activationTrigger:1,pendingShouldSort:!1,pendingFocus:{focus:X.Nothing},buttonPositionState:vc.Idle})}reduce(e,t){return V(t.type,Yu,e,t)}},Zu=(0,P.createContext)(null);function Qu(e){let t=(0,P.useContext)(Zu);if(t===null){let t=Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,$u),t}return t}function $u({id:e,__demoMode:t=!1}){let n=(0,P.useMemo)(()=>Xu.new({id:e,__demoMode:t}),[]);return ec(()=>n.dispose()),n}var ed=P.Fragment;function td(e,t){let n=(0,P.useId)(),{__demoMode:r=!1,...i}=e,a=$u({id:n,__demoMode:r}),[o,s,c]=K(a,e=>[e.menuState,e.itemsElement,e.buttonElement]),l=W(t),u=Vr.get(null);yi(K(u,(0,P.useCallback)(e=>u.selectors.isTop(e,n),[u,n])),[c,s],(e,t)=>{var n;a.send({type:Q.CloseMenu}),ai(t,ii.Loose)||(e.preventDefault(),(n=a.state.buttonElement)==null||n.focus())});let d=z(()=>{a.send({type:Q.CloseMenu})}),f=B({open:o===Ku.Open,close:d}),p={ref:l},m=H();return P.createElement(Ls,null,P.createElement(Zu.Provider,{value:a},P.createElement(Js,{value:V(o,{[Ku.Open]:Y.Open,[Ku.Closed]:Y.Closed})},m({ourProps:p,theirProps:i,slot:f,defaultTag:ed,name:`Menu`}))))}var nd=`button`;function rd(e,t){let n=Qu(`Menu.Button`),r=(0,P.useId)(),{id:i=`headlessui-menu-button-${r}`,disabled:a=!1,autoFocus:o=!1,...s}=e,c=(0,P.useRef)(null),l=Ns(),u=W(t,c,Ms(),z(e=>n.send({type:Q.SetButtonElement,element:e}))),d=z(e=>{switch(e.key){case G.Space:case G.Enter:case G.ArrowDown:e.preventDefault(),e.stopPropagation(),n.send({type:Q.OpenMenu,focus:{focus:X.First}});break;case G.ArrowUp:e.preventDefault(),e.stopPropagation(),n.send({type:Q.OpenMenu,focus:{focus:X.Last}}
8);break}}),f=z(e=>{switch(e.key){case G.Space:e.preventDefault();break}}),[p,m,h]=K(n,e=>[e.menuState,e.buttonElement,e.itemsElement]);Ei(p===Ku.Open,{trigger:m,action:(0,P.useCallback)(e=>{if(m!=null&&m.contains(e.target))return Ci.Ignore;let t=e.target.closest(`[role="menuitem"]:not([data-disabled])`);return gn(t)?Ci.Select(t):h!=null&&h.contains(e.target)?Ci.Ignore:Ci.Close},[m,h]),close:(0,P.useCallback)(()=>n.send({type:Q.CloseMenu}),[]),select:(0,P.useCallback)(e=>e.click(),[])});let g=vr(e=>{var t;a||(p===Ku.Open?((0,F.flushSync)(()=>n.send({type:Q.CloseMenu})),(t=c.current)==null||t.focus({preventScroll:!0})):(e.preventDefault(),n.send({type:Q.OpenMenu,focus:{focus:X.Nothing},trigger:qu.Pointer})))}),{isFocusVisible:_,focusProps:v}=_t({autoFocus:o}),{isHovered:y,hoverProps:b}=gt({isDisabled:a}),{pressed:x,pressProps:S}=Mt({disabled:a}),C=B({open:p===Ku.Open,active:x||p===Ku.Open,disabled:a,hover:y,focus:_,autofocus:o}),w=Ut(l(),{ref:u,id:i,type:ki(e,c.current),"aria-haspopup":`menu`,"aria-controls":h?.id,"aria-expanded":p===Ku.Open,disabled:a||void 0,autoFocus:o,onKeyDown:d,onKeyUp:f},g,v,b,S);return H()({ourProps:w,theirProps:s,slot:C,defaultTag:nd,name:`Menu.Button`})}var id=`div`,ad=It.RenderStrategy|It.Static;function od(e,t){let n=(0,P.useId)(),{id:r=`headlessui-menu-items-${n}`,anchor:i,portal:a=!1,modal:o=!0,transition:s=!1,...c}=e,l=js(i),u=Qu(`Menu.Items`),[d,f]=Fs(l),p=Ps(),[m,h]=(0,P.useState)(null),g=W(t,l?d:null,z(e=>u.send({type:Q.SetItemsElement,element:e})),h),[_,v]=K(u,e=>[e.menuState,e.buttonElement]),y=bi(v),b=bi(m);l&&(a=!0);let x=qs(),[S,C]=Wi(s,m,x===null?_===Ku.Open:(x&Y.Open)===Y.Open);Zr(S,v,()=>{u.send({type:Q.CloseMenu})});let w=K(u,e=>e.__demoMode);Ri(w?!1:o&&_===Ku.Open,b),Xr(w?!1:o&&_===Ku.Open,{allowed:(0,P.useCallback)(()=>[v,m],[v,m])});let T=K(u,u.selectors.didButtonMove)?!1:S;(0,P.useEffect)(()=>{let e=m;e&&_===Ku.Open&&(Tt(e)||e.focus({preventScroll:!0}))},[_,m]),Yi(_===Ku.Open,{container:m,accept(e){return e.getAttribute(`role`)===`menuitem`?NodeFilter.FILTER_REJECT:e.hasAttribute(`role`)?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(e){e.setAttribute(`role`,`none`)}});let E=Ot(),D=z(e=>{var t,n;switch(E.dispose(),e.key){case G.Space:if(u.state.searchQuery!==``)return e.preventDefault(),e.stopPropagation(),u.send({type:Q.Search,value:e.key});case G.Enter:if(e.preventDefault(),e.stopPropagation(),u.state.activeItemIndex!==null){let{dataRef:e}=u.state.items[u.state.activeItemIndex];(t=e.current?.domRef.current)==null||t.click()}u.send({type:Q.CloseMenu}),oi(u.state.buttonElement);break;case G.ArrowDown:return e.preventDefault(),e.stopPropagation(),u.send({type:Q.GoToItem,focus:X.Next});case G.ArrowUp:return e.preventDefault(),e.stopPropagation(),u.send({type:Q.GoToItem,focus:X.Previous});case G.Home:case G.PageUp:return e.preventDefault(),e.stopPropagation(),u.send({type:Q.GoToItem,focus:X.First});case G.End:case G.PageDown:return e.preventDefault(),e.stopPropagation(),u.send({type:Q.GoToItem,focus:X.Last});case G.Escape:e.preventDefault(),e.stopPropagation(),(0,F.flushSync)(()=>u.send({type:Q.CloseMenu})),(n=u.state.buttonElement)==null||n.focus({preventScroll:!0});break;case G.Tab:e.preventDefault(),e.stopPropagation(),(0,F.flushSync)(()=>u.send({type:Q.CloseMenu})),fi(u.state.buttonElement,e.shiftKey?q.Previous:q.Next);break;default:e.key.length===1&&(u.send({type:Q.Search,value:e.key}),E.setTimeout(()=>u.send({type:Q.ClearSearch}),350));break}}),O=z(e=>{switch(e.key){case G.Space:e.preventDefault();break}}),k=B({open:_===Ku.Open}),A=Ut(l?p():{},{"aria-activedescendant":K(u,u.selectors.activeDescendantId),"aria-labelledby":K(u,e=>e.buttonElement?.id),id:r,onKeyDown:D,onKeyUp:O,role:`menu`,tabIndex:_===Ku.Open?0:void 0,ref:g,style:{...c.style,...f,"--button-width":gr(S,v,!0).width},...Ui(C)}),j=H();return P.createElement(_c,{enabled:a?e.static||S:!1,ownerDocument:y},j({ourProps:A,theirProps:c,slot:k,defaultTag:id,features:ad,visible:T,name:`Menu.Items`}))}var sd=P.Fragment;function cd(e,t){let n=(0,P.useId)(),{id:r=`headlessui-menu-item-${n}`,disabled:i=!1,...a}=e,o=Qu(`Menu.Item`),s=K(o,e=>o.selectors.isActive(e,r)),c=(0,P.useRef)(null),l=W(t,c),u=K(o,e=>o.selectors.shouldScrollIntoView(e,r));R(()=>
8{if(u)return Dt().requestAnimationFrame(()=>{var e,t;(t=(e=c.current)?.scrollIntoView)==null||t.call(e,{block:`nearest`})})},[u,c]);let d=cu(c),f=(0,P.useRef)({disabled:i,domRef:c,get textValue(){return d()}});R(()=>{f.current.disabled=i},[f,i]),R(()=>(o.actions.registerItem(r,f),()=>o.actions.unregisterItem(r)),[f,r]);let p=z(()=>{o.send({type:Q.CloseMenu})}),m=z(e=>{if(i)return e.preventDefault();o.send({type:Q.CloseMenu}),oi(o.state.buttonElement)}),h=z(()=>{if(i)return o.send({type:Q.GoToItem,focus:X.Nothing});o.send({type:Q.GoToItem,focus:X.Specific,id:r})}),g=Bi(),_=z(e=>g.update(e)),v=z(e=>{g.wasMoved(e)&&(i||s||o.send({type:Q.GoToItem,focus:X.Specific,id:r,trigger:qu.Pointer}))}),y=z(e=>{g.wasMoved(e)&&(i||s&&o.state.activationTrigger===qu.Pointer&&o.send({type:Q.GoToItem,focus:X.Nothing}))}),[b,x]=Bn(),[S,C]=Mn(),w=B({active:s,focus:s,disabled:i,close:p}),T={id:r,ref:l,role:`menuitem`,tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0?!0:void 0,"aria-labelledby":b,"aria-describedby":S,disabled:void 0,onClick:m,onFocus:h,onPointerEnter:_,onMouseEnter:_,onPointerMove:v,onMouseMove:v,onPointerLeave:y,onMouseLeave:y},E=H();return P.createElement(x,null,P.createElement(C,null,E({ourProps:T,theirProps:a,slot:w,defaultTag:sd,name:`Menu.Item`})))}var ld=`div`;function ud(e,t){let[n,r]=Bn(),i=e,a={ref:t,"aria-labelledby":n,role:`group`},o=H();return P.createElement(r,null,o({ourProps:a,theirProps:i,slot:{},defaultTag:ld,name:`Menu.Section`}))}var dd=`header`;function fd(e,t){let n=(0,P.useId)(),{id:r=`headlessui-menu-heading-${n}`,...i}=e,a=Rn();R(()=>a.register(r),[r,a.register]);let o={id:r,ref:t,role:`presentation`,...a.props};return H()({ourProps:o,theirProps:i,slot:{},defaultTag:dd,name:`Menu.Heading`})}var pd=`div`;function md(e,t){let n=e,r={ref:t,role:`separator`};return H()({ourProps:r,theirProps:n,slot:{},defaultTag:pd,name:`Menu.Separator`})}var hd=U(td),gd=U(rd),_d=U(od),vd=U(cd),yd=U(ud),bd=U(fd),xd=U(md),Sd=Object.assign(hd,{Button:gd,Items:_d,Item:vd,Section:yd,Heading:bd,Separator:xd}),Cd=Object.defineProperty,wd=(e,t,n)=>t in e?Cd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Td=(e,t,n)=>(wd(e,typeof t==`symbol`?t:t+``,n),n),Ed=(e=>(e[e.Open=0]=`Open`,e[e.Closed=1]=`Closed`,e))(Ed||{}),Dd=(e=>(e[e.OpenPopover=0]=`OpenPopover`,e[e.ClosePopover=1]=`ClosePopover`,e[e.SetButton=2]=`SetButton`,e[e.SetButtonId=3]=`SetButtonId`,e[e.SetPanel=4]=`SetPanel`,e[e.SetPanelId=5]=`SetPanelId`,e))(Dd||{}),Od={0:e=>e.popoverState===0?e:{...e,popoverState:0,__demoMode:!1},1(e){return e.popoverState===1?e:{...e,popoverState:1,__demoMode:!1}},2(e,t){return e.button===t.button?e:{...e,button:t.button}},3(e,t){return e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId}},4(e,t){return e.panel===t.panel?e:{...e,panel:t.panel}},5(e,t){return e.panelId===t.panelId?e:{...e,panelId:t.panelId}}},kd=class e extends Ar{constructor(e){super(e),Td(this,`actions`,{close:()=>this.send({type:1}),refocusableClose:e=>{this.actions.close(),(e?gn(e)?e:`current`in e&&gn(e.current)?e.current:this.state.button:this.state.button)?.focus()},open:()=>this.send({type:0}),setButtonId:e=>this.send({type:3,buttonId:e}),setButton:e=>this.send({type:2,button:e}),setPanelId:e=>this.send({type:5,panelId:e}),setPanel:e=>this.send({type:4,panel:e})}),Td(this,`selectors`,{isPortalled:e=>{if(!e.button||!e.panel)return!1;let t=St(e.button)??document;for(let n of t.querySelectorAll(`body > *`))if(Number(n?.contains(e.button))^Number(n?.contains(e.panel)))return!0;let n=ni(t),r=n.indexOf(e.button),i=(r+n.length-1)%n.length,a=(r+1)%n.length,o=n[i],s=n[a];return!e.panel.contains(o)&&!e.panel.contains(s)}});{let e=this.state.id,t=Vr.get(null);this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}}static new({id:t,__demoMode:n=!1}){return new e({id:t,__demoMode:n,popoverState:+!n,buttons:{current:[]},button:null,buttonId:null,panel:null,panelId:null,beforePanelSentinel:{current:null},afterPanelSentinel:{current:null},afterButtonSentinel:{current:null}})}reduce(e,t){return V(t.type,Od,e,t)}},Ad=(0,P.createContext)(null);function jd(e){let t=(0,P.useContext)(Ad);if(t===null){let t=Error(`<${e} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,jd),t}return t}function Md({id:e,__demoMode:t=!1}){let n=(0,P.useMemo)(()=>kd.new({id:e,__demoMode:t}),[]);return ec(()=>n.dispose()),n}var Nd=(0,P.createContext)(null);Nd.displayName=`PopoverGroupContext`;function Pd(){return(0,P.useContext)(Nd)}var Fd=(0,P.createContext)(null);Fd.displayName=`PopoverPanelContext`;function Id(){return(0,P.useContext)(Fd)}var Ld=`div`;function Rd(e,t){let n=(0,P.useId)(),{__demoMode:r=!1,...i}=e,a=Md({id:n,__demoMode:r}),o=(0,P.useRef)(null),s=W(t,On(e=>{o.current=e})),[c,l,u,d,f]=K(a,(0,P.useCallback)(e=>[e.popoverState,e.button,e.panel,e.buttonId,e.panelId],[])),p=xi(o.current??l),m=kt(d),h=kt(f),g=(0,P.useMemo)(()=>({buttonId:m,panelId:h,close:a.actions.close}),[m,h,a]),_=Pd(),v=_?.registerPopover,y=z(()=>{let e=wt(o.current??l);return _?.isFocusWithinPopoverGroup()??(e&&(l?.contains(e)||u?.contains(e)))});(0,P.useEffect)(()=>v?.(g),[v,g]);let[b,x]=mc(),S=ol(l),C=rl({mainTreeNode:S,portals:b,defaultContainers:[{get current(){return a.state.button}},{get current(){return a.state.panel}}]});Di(p,`focus`,e=>{var t,n,r,i,o,s;e.target!==window&&_n(e.target)&&a.state.popoverState===Ed.Open&&(y()||a.state.button&&a.state.panel&&(C.contains(e.target)||(n=(t=a.state.beforePanelSentinel.current)?.contains)!=null&&n.call(t,e.target)||(i=(r=a.state.afterPanelSentinel.current)?.contains)!=null&&i.call(r,e.target)||(s=(o=a.state.afterButtonSentinel.current)?.contains)!=null&&s.call(o,e.target)||a.actions.close()))},!0),yi(c===Ed.Open,C.resolveContainers,(e,t)=>{a.actions.close(),ai(t,ii.Loose)||(e.preventDefault(),l?.focus())});let w=B({open:c===Ed.Open,close:a.actions.refocusableClose}),T=K(a,(0,P.useCallback)(e=>V(e.popoverState,{[Ed.Open]:Y.Open,[Ed.Closed]:Y.Closed}),[])),E={ref:s},D=H();return P.createElement(al,{node:S},P.createElement(Ls,null,P.createElement(Fd.Provider,{value:null},P.createElement(Ad.Provider,{value:a},P.createElement(qn,{value:a.actions.refocusableClose},P.createElement(Js,{value:T},P.createElement(x,null,D({ourProps:E,theirProps:i,slot:w,defaultTag:Ld,name:`Popover`}))))))))}var zd=`button`;function Bd(e,t){let n=(0,P.useId)(),{id:r=`headlessui-popover-button-${n}`,disabled:i=!1,autoFocus:a=!1,...o}=e,s=jd(`Popover.Button`),[c,l,u,d,f,p,m]=K(s,(0,P.useCallback)(e=>[e.popoverState,s.selectors.isPortalled(e),e.button,e.buttonId,e.panel,e.panelId,e.afterButtonSentinel],[])),h=(0,P.useRef)(null),g=`headlessui-focus-sentinel-${(0,P.useId)()}`,_=Pd()?.closeOthers,v=Id()!==null;(0,P.useEffect)(()=>
8{if(!v)return s.actions.setButtonId(r),()=>s.actions.setButtonId(null)},[v,r,s]);let[y]=(0,P.useState)(()=>Symbol()),b=W(h,t,Ms(),z(e=>{if(!v){if(e)s.state.buttons.current.push(y);else{let e=s.state.buttons.current.indexOf(y);e!==-1&&s.state.buttons.current.splice(e,1)}s.state.buttons.current.length>1&&console.warn(`You are already using a <Popover.Button /> but only 1 <Popover.Button /> is supported.`),e&&s.actions.setButton(e)}})),x=W(h,t),S=z(e=>{var t,n,r;if(v){if(s.state.popoverState===Ed.Closed)return;switch(e.key){case G.Space:case G.Enter:e.preventDefault(),(n=(t=e.target).click)==null||n.call(t),s.actions.close(),(r=s.state.button)==null||r.focus();break}}else switch(e.key){case G.Space:case G.Enter:e.preventDefault(),e.stopPropagation(),s.state.popoverState===Ed.Closed?(_?.(s.state.buttonId),s.actions.open()):s.actions.close();break;case G.Escape:if(s.state.popoverState!==Ed.Open)return _?.(s.state.buttonId);if(!h.current)return;let t=wt(h.current);if(t&&!h.current.contains(t))return;e.preventDefault(),e.stopPropagation(),s.actions.close();break}}),C=z(e=>{v||e.key===G.Space&&e.preventDefault()}),w=z(e=>{var t,n;Tn(e.currentTarget)||i||(v?(s.actions.close(),(t=s.state.button)==null||t.focus()):(e.preventDefault(),e.stopPropagation(),s.state.popoverState===Ed.Closed?(_?.(s.state.buttonId),s.actions.open()):s.actions.close(),(n=s.state.button)==null||n.focus()))}),T=z(e=>{e.preventDefault(),e.stopPropagation()}),{isFocusVisible:E,focusProps:D}=_t({autoFocus:a}),{isHovered:O,hoverProps:k}=gt({isDisabled:i}),{pressed:A,pressProps:j}=Mt({disabled:i}),M=c===Ed.Open,ee=B({open:M,active:A||M,disabled:i,hover:O,focus:E,autofocus:a}),te=ki(e,u),ne=Ut(v?{ref:x,type:te,onKeyDown:S,onClick:w,disabled:i||void 0,autoFocus:a}:{ref:b,id:d,type:te,"aria-expanded":c===Ed.Open,"aria-controls":f?p:void 0,disabled:i||void 0,autoFocus:a,onKeyDown:S,onKeyUp:C,onClick:w,onMouseDown:T},D,k,j),re=ll(),N=z(()=>{if(!gn(s.state.panel))return;let e=s.state.panel;function t(){V(re.current,{[cl.Forwards]:()=>J(e,q.First),[cl.Backwards]:()=>J(e,q.Last)})===ei.Error&&J(ni(Ct(s.state.button)).filter(e=>e.dataset.headlessuiFocusGuard!==`true`),V(re.current,{[cl.Forwards]:q.Next,[cl.Backwards]:q.Previous}),{relativeTo:s.state.button})}t()}),ie=H();return P.createElement(P.Fragment,null,ie({ourProps:ne,theirProps:o,slot:ee,defaultTag:zd,name:`Popover.Button`}),M&&!v&&l&&P.createElement(sn,{id:g,ref:m,features:an.Focusable,"data-headlessui-focus-guard":!0,as:`button`,type:`button`,onFocus:N}))}var Vd=`div`,Hd=It.RenderStrategy|It.Static;function Ud(e,t){let n=(0,P.useId)(),{id:r=`headlessui-popover-backdrop-${n}`,transition:i=!1,...a}=e,o=jd(`Popover.Backdrop`),s=K(o,(0,P.useCallback)(e=>e.popoverState,[])),[c,l]=(0,P.useState)(null),u=W(t,l),d=qs(),[f,p]=Wi(i,c,d===null?s===Ed.Open:(d&Y.Open)===Y.Open),m=z(e=>{if(Tn(e.currentTarget))return e.preventDefault();o.actions.close()}),h=B({open:s===Ed.Open}),g={ref:u,id:r,"aria-hidden":!0,onClick:m,...Ui(p)};return H()({ourProps:g,theirProps:a,slot:h,defaultTag:Vd,features:Hd,visible:f,name:`Popover.Backdrop`})}var Wd=`div`,Gd=It.RenderStrategy|It.Static;function Kd(e,t){let n=(0,P.useId)(),{id:r=`headlessui-popover-panel-${n}`,focus:i=!1,anchor:a,portal:o=!1,modal:s=!1,transition:c=!1,...l}=e,u=jd(`Popover.Panel`),d=K(u,u.selectors.isPortalled),[f,p,m,h,g]=K(u,(0,P.useCallback)(e=>[e.popoverState,e.button,e.__demoMode,e.beforePanelSentinel,e.afterPanelSentinel],[])),_=`headlessui-focus-sentinel-before-${n}`,v=`headlessui-focus-sentinel-after-${n}`,y=(0,P.useRef)(null),b=js(a),[x,S]=Fs(b),C=Ps();b&&(o=!0);let[w,T]=(0,P.useState)(null),E=W(y,t,b?x:null,u.actions.setPanel,T),D=bi(p),O=bi(y.current);R(()=>(u.actions.setPanelId(r),()=>u.actions.setPanelId(null)),[r,u]);let k=qs(),[A,j]=Wi(c,w,k===null?f===Ed.Open:(k&Y.Open)===Y.Open);Zr(A,p,u.actions.close),Ri(m?!1:s&&A,O);let M=z(e=>{var t;switch(e.key){case G.Escape:if(u.state.popoverState!==Ed.Open||!y.current)return;let n=wt(y.current);if(n&&!y.current.contains(n))return;e.preventDefault(),e.stopPropagation(),u.actions.close(),(t=u.state.button)==null||t.focus();break}});(0,P.useEffect)(()=>{var t;e.static||f===Ed.Closed&&((t=e.unmount)==null||t)&&u.actions.setPanel(null)},[f,e.unmount,e.static,u]),(0,P.useEffect)(()=>
8{if(m||!i||f!==Ed.Open||!y.current)return;let e=wt(y.current);y.current.contains(e)||J(y.current,q.First)},[m,i,y.current,f]);let ee=B({open:f===Ed.Open,close:u.actions.refocusableClose}),te=Ut(b?C():{},{ref:E,id:r,onKeyDown:M,onBlur:i&&f===Ed.Open?e=>{var t,n,r,i,a;let o=e.relatedTarget;o&&y.current&&((t=y.current)!=null&&t.contains(o)||(u.actions.close(),((r=(n=h.current)?.contains)!=null&&r.call(n,o)||(a=(i=g.current)?.contains)!=null&&a.call(i,o))&&o.focus({preventScroll:!0})))}:void 0,tabIndex:-1,style:{...l.style,...S,"--button-width":gr(A,p,!0).width},...Ui(j)}),ne=ll(),re=z(()=>{let e=y.current;if(!e)return;function t(){V(ne.current,{[cl.Forwards]:()=>{var t;J(e,q.First)===ei.Error&&((t=u.state.afterPanelSentinel.current)==null||t.focus())},[cl.Backwards]:()=>{var e;(e=u.state.button)==null||e.focus({preventScroll:!0})}})}t()}),N=z(()=>{let e=y.current;if(!e)return;function t(){V(ne.current,{[cl.Forwards]:()=>{if(!u.state.button)return;let e=ni(Ct(u.state.button)??document.body),t=e.indexOf(u.state.button),n=e.slice(0,t+1),r=[...e.slice(t+1),...n];for(let e of r.slice())if(e.dataset.headlessuiFocusGuard===`true`||w!=null&&w.contains(e)){let t=r.indexOf(e);t!==-1&&r.splice(t,1)}J(r,q.First,{sorted:!1})},[cl.Backwards]:()=>{var t;J(e,q.Previous)===ei.Error&&((t=u.state.button)==null||t.focus())}})}t()}),ie=H();return P.createElement(Ys,null,P.createElement(Fd.Provider,{value:r},P.createElement(qn,{value:u.actions.refocusableClose},P.createElement(_c,{enabled:o?e.static||A:!1,ownerDocument:D},A&&d&&P.createElement(sn,{id:_,ref:h,features:an.Focusable,"data-headlessui-focus-guard":!0,as:`button`,type:`button`,onFocus:re}),ie({ourProps:te,theirProps:l,slot:ee,defaultTag:Wd,features:Gd,visible:A,name:`Popover.Panel`}),A&&d&&P.createElement(sn,{id:v,ref:g,features:an.Focusable,"data-headlessui-focus-guard":!0,as:`button`,type:`button`,onFocus:N})))))}var qd=`div`;function Jd(e,t){let n=(0,P.useRef)(null),r=W(n,t),[i,a]=(0,P.useState)([]),o=z(e=>{a(t=>{let n=t.indexOf(e);if(n!==-1){let e=t.slice();return e.splice(n,1),e}return t})}),s=z(e=>(a(t=>[...t,e]),()=>o(e))),c=z(()=>{var e;let t=Ct(n.current);if(!t)return!1;let r=wt(n.current);return(e=n.current)!=null&&e.contains(r)?!0:i.some(e=>t.getElementById(e.buttonId.current)?.contains(r)||t.getElementById(e.panelId.current)?.contains(r))}),l=z(e=>{for(let t of i)t.buttonId.current!==e&&t.close()}),u=(0,P.useMemo)(()=>({registerPopover:s,unregisterPopover:o,isFocusWithinPopoverGroup:c,closeOthers:l}),[s,o,c,l]),d=B({}),f=e,p={ref:r},m=H();return P.createElement(al,null,P.createElement(Nd.Provider,{value:u},m({ourProps:p,theirProps:f,slot:d,defaultTag:qd,name:`Popover.Group`})))}var Yd=U(Rd),Xd=U(Bd),Zd=U(Ud),Qd=U(Ud),$d=U(Kd),ef=U(Jd),tf=Object.assign(Yd,{Button:Xd,Backdrop:Qd,Overlay:Zd,Panel:$d,Group:ef}),nf=(e=>(e[e.RegisterOption=0]=`RegisterOption`,e[e.UnregisterOption=1]=`UnregisterOption`,e))(nf||{}),rf={0(e,t){let n=[...e.options,{id:t.id,element:t.element,propsRef:t.propsRef}];return{...e,options:di(n,e=>e.element.current)}},1(e,t){let n=e.options.slice(),r=e.options.findIndex(e=>e.id===t.id);return r===-1?e:(n.splice(r,1),{...e,options:n})}},af=(0,P.createContext)(null);af.displayName=`RadioGroupDataContext`;function of(e){let t=(0,P.useContext)(af);if(t===null){let t=Error(`<${e} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,of),t}return t}var sf=(0,P.createContext)(null);sf.displayName=`RadioGroupActionsContext`;function cf(e){let t=(0,P.useContext)(sf);if(t===null){let t=Error(`<${e} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,cf),t}return t}function lf(e,t){return V(t.type,rf,e,t)}var uf=`div`;function df(e,t){let n=(0,P.useId)(),r=Pt(),{id:i=`headlessui-radiogroup-${n}`,value:a,form:o,name:s,onChange:c,by:l,disabled:u=r||!1,defaultValue:d,tabIndex:f=0,...p}=e,m=mr(l),[h,g]=(0,P.useReducer)(lf,{options:[]}),_=h.options,[v,y]=Bn(),[b,x]=Mn(),S=(0,P.useRef)(null),C=W(S,t),w=Zt(d),[T,E]=Xt(a,c,w),D=(0,P.useMemo)(()=>_.find(e=>!e.propsRef.current.disabled),[_]),O=(0,P.useMemo)(()=>_.some(e=>m(e.propsRef.current.value,T)),[_,T]),k=z(e=>{if(u||m(e,T))return!1;let t=_.find(t=>m(t.propsRef.current.value,e))?.propsRef.current;return t!=null&&t.disabled?!1:(E?.(e),!0)}),A=z(e=>
8{if(!S.current)return;let t=_.filter(e=>e.propsRef.current.disabled===!1).map(e=>e.element.current);switch(e.key){case G.Enter:tn(e.currentTarget);break;case G.ArrowLeft:case G.ArrowUp:if(e.preventDefault(),e.stopPropagation(),J(t,q.Previous|q.WrapAround)===ei.Success){let e=_.find(e=>Tt(e.element.current));e&&k(e.propsRef.current.value)}break;case G.ArrowRight:case G.ArrowDown:if(e.preventDefault(),e.stopPropagation(),J(t,q.Next|q.WrapAround)===ei.Success){let e=_.find(e=>Tt(e.element.current));e&&k(e.propsRef.current.value)}break;case G.Space:{e.preventDefault(),e.stopPropagation();let t=_.find(e=>Tt(e.element.current));t&&k(t.propsRef.current.value)}break}}),j=z(e=>(g({type:0,...e}),()=>g({type:1,id:e.id}))),M=(0,P.useMemo)(()=>({value:T,firstOption:D,containsCheckedOption:O,disabled:u,compare:m,tabIndex:f,...h}),[T,D,O,u,m,f,h]),ee=(0,P.useMemo)(()=>({registerOption:j,change:k}),[j,k]),te={ref:C,id:i,role:`radiogroup`,"aria-labelledby":v,"aria-describedby":b,onKeyDown:A},ne=B({value:T}),re=(0,P.useCallback)(()=>{if(w!==void 0)return k(w)},[k,w]),N=H();return P.createElement(x,{name:`RadioGroup.Description`},P.createElement(y,{name:`RadioGroup.Label`},P.createElement(sf.Provider,{value:ee},P.createElement(af.Provider,{value:M},s!=null&&P.createElement(un,{disabled:u,data:{[s]:T||`on`},overrides:{type:`radio`,checked:T!=null},form:o,onReset:re}),N({ourProps:te,theirProps:p,slot:ne,defaultTag:uf,name:`RadioGroup`})))))}var ff=`div`;function pf(e,t){let n=of(`RadioGroup.Option`),r=cf(`RadioGroup.Option`),i=(0,P.useId)(),{id:a=`headlessui-radiogroup-option-${i}`,value:o,disabled:s=n.disabled||!1,autoFocus:c=!1,...l}=e,u=(0,P.useRef)(null),d=W(u,t),[f,p]=Bn(),[m,h]=Mn(),g=kt({value:o,disabled:s});R(()=>r.registerOption({id:a,element:u,propsRef:g}),[a,r,u,g]);let _=z(e=>{var t;if(Tn(e.currentTarget))return e.preventDefault();r.change(o)&&((t=u.current)==null||t.focus())}),v=n.firstOption?.id===a,{isFocusVisible:y,focusProps:b}=_t({autoFocus:c}),{isHovered:x,hoverProps:S}=gt({isDisabled:s}),C=n.compare(n.value,o),w=Ut({ref:d,id:a,role:`radio`,"aria-checked":C?`true`:`false`,"aria-labelledby":f,"aria-describedby":m,"aria-disabled":s?!0:void 0,tabIndex:s?-1:C||!n.containsCheckedOption&&v?n.tabIndex:-1,onClick:s?void 0:_,autoFocus:c},b,S),T=B({checked:C,disabled:s,active:y,hover:x,focus:y,autofocus:c}),E=H();return P.createElement(h,{name:`RadioGroup.Description`},P.createElement(p,{name:`RadioGroup.Label`},E({ourProps:w,theirProps:l,slot:T,defaultTag:ff,name:`RadioGroup.Option`})))}var mf=`span`;function hf(e,t){let n=of(`Radio`),r=cf(`Radio`),i=(0,P.useId)(),a=pn(),o=Pt(),{id:s=a||`headlessui-radio-${i}`,value:c,disabled:l=n.disabled||o||!1,autoFocus:u=!1,...d}=e,f=(0,P.useRef)(null),p=W(f,t),m=zn(),h=jn(),g=kt({value:c,disabled:l});R(()=>r.registerOption({id:s,element:f,propsRef:g}),[s,r,f,g]);let _=z(e=>{var t;if(Tn(e.currentTarget))return e.preventDefault();r.change(c)&&((t=f.current)==null||t.focus())}),{isFocusVisible:v,focusProps:y}=_t({autoFocus:u}),{isHovered:b,hoverProps:x}=gt({isDisabled:l}),S=n.firstOption?.id===s,C=n.compare(n.value,c),w=Ut({ref:p,id:s,role:`radio`,"aria-checked":C?`true`:`false`,"aria-labelledby":m,"aria-describedby":h,"aria-disabled":l?!0:void 0,tabIndex:l?-1:C||!n.containsCheckedOption&&S?n.tabIndex:-1,autoFocus:u,onClick:l?void 0:_},y,x),T=B({checked:C,disabled:l,hover:b,focus:v,autofocus:u});return H()({ourProps:w,theirProps:d,slot:T,defaultTag:mf,name:`Radio`})}var gf=U(df),_f=U(pf),vf=U(hf),yf=Object.assign(gf,{Option:_f,Radio:vf,Label:Wn,Description:In}),bf=(0,P.createContext)(null);bf.displayName=`GroupContext`;var xf=P.Fragment;function Sf(e){let[t,n]=(0,P.useState)(null),[r,i]=Bn(),[a,o]=Mn(),s=(0,P.useMemo)(()=>({switch:t,setSwitch:n}),[t,n]),c={},l=e,u=H();return P.createElement(o,{name:`Switch.Description`,value:a},P.createElement(i,{name:`Switch.Label`,value:r,props:{htmlFor:s.switch?.id,onClick(e){t&&(xn(e.currentTarget)&&e.preventDefault(),t.click(),t.focus({preventScroll:!0}))}}},P.createElement(bf.Provider,{value:s},u({ourProps:c,theirProps:l,slot:{},defaultTag:xf,name:`Switch.Group`}))))}var Cf=`button`;function wf(e,t){let n=(0,P.useId)(),r=pn(),i=Pt(),{id:a=r||`headlessui-switch-${n}`,disabled:o=i||!1,checked:s,defaultChecked:c,onChange:l,name:u,value:d,form:f,autoF
8ocus:p=!1,...m}=e,h=(0,P.useContext)(bf),[g,_]=(0,P.useState)(null),v=W((0,P.useRef)(null),t,h===null?null:h.setSwitch,_),y=Zt(c),[b,x]=Xt(s,l,y??!1),S=Ot(),[C,w]=(0,P.useState)(!1),T=z(()=>{w(!0),x?.(!b),S.nextFrame(()=>{w(!1)})}),E=z(e=>{if(Tn(e.currentTarget))return e.preventDefault();e.preventDefault(),T()}),D=z(e=>{e.key===G.Space?(e.preventDefault(),T()):e.key===G.Enter&&tn(e.currentTarget)}),O=z(e=>e.preventDefault()),k=zn(),A=jn(),{isFocusVisible:j,focusProps:M}=_t({autoFocus:p}),{isHovered:ee,hoverProps:te}=gt({isDisabled:o}),{pressed:ne,pressProps:re}=Mt({disabled:o}),N=B({checked:b,disabled:o,hover:ee,focus:j,active:ne,autofocus:p,changing:C}),ie=Ut({id:a,ref:v,role:`switch`,type:ki(e,g),tabIndex:e.tabIndex===-1?0:e.tabIndex??0,"aria-checked":b,"aria-labelledby":k,"aria-describedby":A,disabled:o||void 0,autoFocus:p,onClick:E,onKeyUp:D,onKeyPress:O},M,te,re),ae=(0,P.useCallback)(()=>{if(y!==void 0)return x?.(y)},[x,y]),oe=H();return P.createElement(P.Fragment,null,u!=null&&P.createElement(un,{disabled:o,data:{[u]:d||`on`},overrides:{type:`checkbox`,checked:b},form:f,onReset:ae}),oe({ourProps:ie,theirProps:m,slot:N,defaultTag:Cf,name:`Switch`}))}var Tf=U(wf),Ef=Object.assign(Tf,{Group:Sf,Label:Wn,Description:In});function Df({onFocus:e}){let[t,n]=(0,P.useState)(!0),r=sl();return t?P.createElement(sn,{as:`button`,type:`button`,features:an.Focusable,onFocus:t=>{t.preventDefault();let i,a=50;function o(){if(a--<=0){i&&cancelAnimationFrame(i);return}if(e()){if(cancelAnimationFrame(i),!r.current)return;n(!1);return}i=requestAnimationFrame(o)}i=requestAnimationFrame(o)}}):null}var Of=P.createContext(null);function kf(){return{groups:new Map,get(e,t){let n=this.groups.get(e);n||(n=new Map,this.groups.set(e,n));let r=n.get(t)??0;n.set(t,r+1);let i=Array.from(n.keys()).indexOf(t);function a(){let e=n.get(t);e>1?n.set(t,e-1):n.delete(t)}return[i,a]}}}function Af({children:e}){let t=P.useRef(kf());return P.createElement(Of.Provider,{value:t},e)}function jf(e){let t=P.useContext(Of);if(!t)throw Error(`You must wrap your component in a <StableCollection>`);let n=P.useId(),[r,i]=t.current.get(e,n);return P.useEffect(()=>i,[]),r}var Mf=(e=>(e[e.Forwards=0]=`Forwards`,e[e.Backwards=1]=`Backwards`,e))(Mf||{}),Nf=(e=>(e[e.Less=-1]=`Less`,e[e.Equal=0]=`Equal`,e[e.Greater=1]=`Greater`,e))(Nf||{}),Pf=(e=>(e[e.SetSelectedIndex=0]=`SetSelectedIndex`,e[e.RegisterTab=1]=`RegisterTab`,e[e.UnregisterTab=2]=`UnregisterTab`,e[e.RegisterPanel=3]=`RegisterPanel`,e[e.UnregisterPanel=4]=`UnregisterPanel`,e))(Pf||{}),Ff={0(e,t){let n=di(e.tabs,e=>e.current),r=di(e.panels,e=>e.current),i=n.filter(e=>{var t;return!((t=e.current)!=null&&t.hasAttribute(`disabled`))}),a={...e,tabs:n,panels:r};if(t.index<0||t.index>n.length-1){let r=V(Math.sign(t.index-e.selectedIndex),{[-1]:()=>1,0:()=>V(Math.sign(t.index),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0});if(i.length===0)return a;let o=V(r,{0:()=>n.indexOf(i[0]),1:()=>n.indexOf(i[i.length-1])});return{...a,selectedIndex:o===-1?e.selectedIndex:o}}let o=n.slice(0,t.index),s=[...n.slice(t.index),...o].find(e=>i.includes(e));if(!s)return a;let c=n.indexOf(s)??e.selectedIndex;return c===-1&&(c=e.selectedIndex),{...a,selectedIndex:c}},1(e,t){if(e.tabs.includes(t.tab))return e;let n=e.tabs[e.selectedIndex],r=di([...e.tabs,t.tab],e=>e.current),i=e.selectedIndex;return e.info.current.isControlled||(i=r.indexOf(n),i===-1&&(i=e.selectedIndex)),{...e,tabs:r,selectedIndex:i}},2(e,t){return{...e,tabs:e.tabs.filter(e=>e!==t.tab)}},3(e,t){return e.panels.includes(t.panel)?e:{...e,panels:di([...e.panels,t.panel],e=>e.current)}},4(e,t){return{...e,panels:e.panels.filter(e=>e!==t.panel)}}},If=(0,P.createContext)(null);If.displayName=`TabsDataContext`;function Lf(e){let t=(0,P.useContext)(If);if(t===null){let t=Error(`<${e} /> is missing a parent <Tab.Group /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Lf),t}return t}var Rf=(0,P.createContext)(null);Rf.displayName=`TabsActionsContext`;function zf(e){let t=(0,P.useContext)(Rf);if(t===null){let t=Error(`<${e} /> is missing a parent <Tab.Group /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,zf),t}return t}function Bf(e,t){return V(t.type,Ff,e,t)}var Vf=`div`;function Hf(e,t){let{defaultIndex:n=0,vertical:r=!1,manual:i=!1,onChange:a,selectedIndex:o=null,...s}=e,c=r?`vertical`:`horizontal`,l=i?`manual`:`auto`,u=o!==null,d=kt({isControlled:u}),f=W(t),[p,m]=(0,P.useReducer)(Bf,{info:d,selectedIndex:o??n,tabs:[],panels:[]}),h=B({selectedIndex:p.selectedIndex}),g=kt(a||(()=>{})),_=kt(p.tabs),v=(0,P.useMemo)(()=>({orientation:c,activation:l,...p}),[c,l,p]),y=z(e=>(m({type:1,tab:e}),()=>m({type:2,tab:e}))),b=z(e=>(m({type:3,panel:e}),()=>m({type:4,panel:e}))),x=z(e=>{S.current!==e&&g.current(e),u||m({type:0,index:e})}),S=kt(u?e.selectedIndex:p.selectedIndex),C=(0,P.useMemo)(()=>({registerTab:y,registerPanel:b,change:x}),[]);R(()=>{m({type:0,index:o??n})},[o]),R(()=>
8{if(S.current===void 0||p.tabs.length<=0)return;let e=di(p.tabs,e=>e.current);e.some((e,t)=>p.tabs[t]!==e)&&x(e.indexOf(p.tabs[S.current]))});let w={ref:f},T=H();return P.createElement(Af,null,P.createElement(Rf.Provider,{value:C},P.createElement(If.Provider,{value:v},v.tabs.length<=0&&P.createElement(Df,{onFocus:()=>{var e;for(let t of _.current)if(t.current?.tabIndex===0)return(e=t.current)==null||e.focus(),!0;return!1}}),T({ourProps:w,theirProps:s,slot:h,defaultTag:Vf,name:`Tabs`}))))}var Uf=`div`;function Wf(e,t){let{orientation:n,selectedIndex:r}=Lf(`Tab.List`),i=W(t),a=B({selectedIndex:r}),o=e,s={ref:i,role:`tablist`,"aria-orientation":n};return H()({ourProps:s,theirProps:o,slot:a,defaultTag:Uf,name:`Tabs.List`})}var Gf=`button`;function Kf(e,t){let n=(0,P.useId)(),{id:r=`headlessui-tabs-tab-${n}`,disabled:i=!1,autoFocus:a=!1,...o}=e,{orientation:s,activation:c,selectedIndex:l,tabs:u,panels:d}=Lf(`Tab`),f=zf(`Tab`),p=Lf(`Tab`),[m,h]=(0,P.useState)(null),g=(0,P.useRef)(null),_=W(g,t,h);R(()=>f.registerTab(g),[f,g]);let v=jf(`tabs`),y=u.indexOf(g);y===-1&&(y=v);let b=y===l,x=z(e=>{let t=e();if(t===ei.Success&&c===`auto`){let e=wt(g.current),t=p.tabs.findIndex(t=>t.current===e);t!==-1&&f.change(t)}return t}),S=z(e=>{let t=u.map(e=>e.current).filter(Boolean);if(e.key===G.Space||e.key===G.Enter){e.preventDefault(),e.stopPropagation(),f.change(y);return}switch(e.key){case G.Home:case G.PageUp:return e.preventDefault(),e.stopPropagation(),x(()=>J(t,q.First));case G.End:case G.PageDown:return e.preventDefault(),e.stopPropagation(),x(()=>J(t,q.Last))}if(x(()=>V(s,{vertical(){return e.key===G.ArrowUp?J(t,q.Previous|q.WrapAround):e.key===G.ArrowDown?J(t,q.Next|q.WrapAround):ei.Error},horizontal(){return e.key===G.ArrowLeft?J(t,q.Previous|q.WrapAround):e.key===G.ArrowRight?J(t,q.Next|q.WrapAround):ei.Error}}))===ei.Success)return e.preventDefault()}),C=(0,P.useRef)(!1),w=z(()=>{var e;C.current||(C.current=!0,(e=g.current)==null||e.focus({preventScroll:!0}),f.change(y),Et(()=>{C.current=!1}))}),T=z(e=>{e.preventDefault()}),{isFocusVisible:E,focusProps:D}=_t({autoFocus:a}),{isHovered:O,hoverProps:k}=gt({isDisabled:i}),{pressed:A,pressProps:j}=Mt({disabled:i}),M=B({selected:b,hover:O,active:A,focus:E,autofocus:a,disabled:i}),ee=Ut({ref:_,onKeyDown:S,onMouseDown:T,onClick:w,id:r,role:`tab`,type:ki(e,m),"aria-controls":d[y]?.current?.id,"aria-selected":b,tabIndex:b?0:-1,disabled:i||void 0,autoFocus:a},D,k,j);return H()({ourProps:ee,theirProps:o,slot:M,defaultTag:Gf,name:`Tabs.Tab`})}var qf=`div`;function Jf(e,t){let{selectedIndex:n}=Lf(`Tab.Panels`),r=W(t),i=B({selectedIndex:n}),a=e,o={ref:r};return H()({ourProps:o,theirProps:a,slot:i,defaultTag:qf,name:`Tabs.Panels`})}var Yf=`div`,Xf=It.RenderStrategy|It.Static;function Zf(e,t){var n,r;let i=(0,P.useId)(),{id:a=`headlessui-tabs-panel-${i}`,tabIndex:o=0,...s}=e,{selectedIndex:c,tabs:l,panels:u}=Lf(`Tab.Panel`),d=zf(`Tab.Panel`),f=(0,P.useRef)(null),p=W(f,t);R(()=>d.registerPanel(f),[d,f]);let m=jf(`panels`),h=u.indexOf(f);h===-1&&(h=m);let g=h===c,{isFocusVisible:_,focusProps:v}=_t(),y=B({selected:g,focus:_}),b=Ut({ref:p,id:a,role:`tabpanel`,"aria-labelledby":l[h]?.current?.id,tabIndex:g?o:-1},v),x=H();return!g&&((n=s.unmount)==null||n)&&!((r=s.static)!=null&&r)?P.createElement(sn,{"aria-hidden":`true`,...b}):x({ourProps:b,theirProps:s,slot:y,defaultTag:Yf,features:Xf,visible:g,name:`Tabs.Panel`})}var Qf=U(Kf),$f=U(Hf),ep=U(Wf),tp=U(Jf),np=U(Zf),rp=Object.assign(Qf,{Group:$f,List:ep,Panels:tp,Panel:np}),ip=`__autocomplete-create-option__`,ap=(0,P.forwardRef)(({options:e,value:t,onChange:n,placeholder:r,noResultsText:a,emptyText:o,onCreate:s,createText:c,id:l,clearable:u=!0,isLoading:d=!1,renderOption:f,startAdornment:p},m)=>{let[h,g]=(0,P.useState)(``),_=h.trim(),v=s!==void 0&&_!==``,y=e=>{if(e===ip){g(``),s?.(_);return}n(e??``)},b=ie(e,h,({label:e})=>e),x=e.length===0?o??a:a,S=e.find(e=>e.value===t),C=()=>{n(``),g(``)};return(0,I.jsx)(`div`,{ref:m,className:`w-full`,children:(0,I.jsx)(el,{immediate:!0,value:t,onChange:y,children:(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsxs)(`div`,{className:`relative`,children:[p&&(0,I.jsx)(`span`,{className:`pointer-events-none absolute inset-y-0 left-3 flex items-center`,children:p}),(0,I.jsx)(Xc,{displayValue:()=>S?.label??``,id:l,placeholder:r,className:[`w-full rounded-input border border-gray-300 bg-white py-2 pr-10 text-bodyNormal text-gray-900`,p?`pl-10`:`pl-3`,`placeholder:text-gray-400`,`focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500`].join(` `),onChange:e=>g(e.target.value)}),d?(0,I.jsx)(`span`,{className:`pointer-events-none absolute inset-y-0 right-6 flex items-center pr-1`,children:(0,I.jsx)(`output`,{"aria-label":`Loading`,className:`size-4 animate-spin rounded-full border-2 border-gray-200 border-t-gray-400`})}):t&&u&&(0,I.jsx)(`button`,{"aria-label":`Clear selection`,className:`absolute inset-y-0 right-6 flex cursor-pointer items-center pr-1`,type:`button`,onClick:C,onPointerDown:e=>{e.preventDefault(),C()},children:(0,I.jsx)(i,{className:`text-gray-400 hover:text-gray-600`,fontSize:`small`,variant:O})}),(0,I.jsx)(Yc,{className:`absolute inset-y-0 right-0 flex items-center pr-2`,children:(0,I.jsx)(`svg`,{className:`size-4 text-gray-400`,fill:`currentColor`,viewBox:`0 0 20 20`,children:(0,I.jsx)(`path`,{clipRule:`evenodd`,d:`M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z`,fillRule:`evenodd`})})})]}),(0,I.jsxs)(Qc,{anchor:`bottom start`,modal:!1,className:[`z-[1400] max-h-60 w-[var(--input-width)] overflow-auto rounded-card border border-gray-200 bg-white py-1 shadow-lg`,`focus:outline-none`,`[--anchor-gap:4px] [--anchor-padding:0px]`].join(` `),children:[b.length===0&&!v?(0,I.jsx)(L,{className:`px-3 py-2 text-gray-500`,children:x}):b.map(e=>(0,I.jsxs)($c,{className:`group relative cursor-pointer px-3 py-2 text-bodyNormal text-gray-900 data-[focus]:bg-blue-100 data-[selected]:font-medium`,value:e.value,children:[(0,I.jsx)(`span`,{children:f?f(e):e.label}),(0,I.jsx)(`span`,{className:`absolute inset-y-0 right-0 hidden items-center pr-3 text-blue-500 group-data-[selected]:flex`,children:(0,I.jsx)(`svg`,{className:`size-4`,fill:`currentColor`,viewBox:`0 0 20 20`,children:(0,I.jsx)(`path`,{clipRule:`evenodd`,d:`M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z`,fillRule:`evenodd`})})})]},e.value)),v&&(0,I.jsxs)($c,{className:`flex cursor-pointer items-center gap-2 px-3 py-2 text-bodyNormal text-blue-600 data-[focus]:bg-blue-100`,value:ip,children:[(0,I.jsx)(`svg`,{className:`size-4`,fill:`currentColor`,viewBox:`0 0 20 20`,children:(0,I.jsx)(`path`,{d:`M10.75 4.75a.75.75 0 0 0-1.5 0v4.5h-4.5a.75.75 0 0 0 0 1.5h4.5v4.5a.75.75 0 0 0 1.5 0v-4.5h4.5a.75.75 0 0 0 0-1.5h-4.5v-4.5Z`})}),(0,I.jsx)(`span`,{children:`${c} "${_}"`})]})]})]})})})}),op=(0,P.forwardRef)(({label:e,noResultsText:t,...n},r)=>{let{t:i}=re(`shared`),a=(0,P.useId)();return(0,I.jsxs)(`div`,{ref:r,className:`flex w-full flex-col gap-1`,children:[e&&(0,I.jsx)(L,{as:`label`,className:`block text-gray-700`,htmlFor:a,variant:`subt
8itle2`,children:e}),(0,I.jsx)(ap,{id:a,noResultsText:t||i(e=>e[`list.no.results`]),...n})]})}),sp={xs:`h-6 w-6 text-allCaps font-semibold tracking-allCaps`,sm:`h-8 w-8 text-bodySmall font-semibold`,md:`h-10 w-10 text-bodyNormal font-semibold`,lg:`h-14 w-14 text-bodyBig font-semibold`},cp={xs:`rounded-input`,sm:`rounded-card`,md:`rounded-lg`,lg:`rounded-xl`},lp=({src:e,alt:t,sizeClass:n,shapeClass:r,className:i,fallback:a})=>{let[o,s]=(0,P.useState)(`loading`);return o===`failed`?(0,I.jsx)(I.Fragment,{children:a}):(0,I.jsxs)(`span`,{className:`relative inline-block shrink-0 ${n} ${r} ${i}`,children:[o===`loading`&&(0,I.jsx)(`span`,{"aria-hidden":!0,className:`absolute inset-0 animate-pulse bg-gray-200 ${r}`}),(0,I.jsx)(`img`,{alt:t,src:e,title:t,className:[`h-full w-full object-cover transition-opacity`,r,o===`loaded`?`opacity-100`:`opacity-0`].filter(Boolean).join(` `),onError:()=>s(`failed`),onLoad:()=>s(`loaded`)})]})},up=({text:e,src:t,background:n,textColor:r,size:i=`md`,shape:a=`circular`,className:o=``})=>{let s=sp[i],l=a===`circular`?`rounded-full`:cp[i],u=c(e),d=(0,I.jsx)(`span`,{className:`inline-flex shrink-0 items-center justify-center bg-blue-600 uppercase leading-none text-white ${s} ${l} ${o}`,style:n||r?{backgroundColor:n,color:r}:void 0,title:e,children:u});return t?(0,I.jsx)(lp,{alt:e,className:o,fallback:d,shapeClass:l,sizeClass:s,src:t},t):d},dp={top:`bottom-full left-1/2 -translate-x-1/2 mb-2`,bottom:`top-full left-1/2 -translate-x-1/2 mt-2`,left:`right-full top-1/2 -translate-y-1/2 mr-2`,right:`left-full top-1/2 -translate-y-1/2 ml-2`},fp={top:`top-full left-1/2 -translate-x-1/2 border-t-gray-900`,bottom:`bottom-full left-1/2 -translate-x-1/2 border-b-gray-900`,left:`left-full top-1/2 -translate-y-1/2 border-l-gray-900`,right:`right-full top-1/2 -translate-y-1/2 border-r-gray-900`},pp=({content:e,placement:t=`top`,delayDuration:n=0,children:r})=>{let[i,a]=(0,P.useState)(!1),o=(0,P.useRef)(void 0),s=(0,P.useRef)(void 0),c=()=>{clearTimeout(s.current),n>0?o.current=setTimeout(()=>a(!0),n):a(!0)},l=()=>{clearTimeout(o.current),s.current=setTimeout(()=>a(!1),100)};return(0,P.useEffect)(()=>()=>{clearTimeout(o.current),clearTimeout(s.current)},[]),(0,I.jsxs)(`div`,{className:`relative inline-flex`,onBlur:l,onFocus:c,onMouseEnter:c,onMouseLeave:l,children:[r,i&&(0,I.jsxs)(`div`,{className:`absolute z-50 whitespace-nowrap rounded-md bg-gray-900 px-2.5 py-1.5 shadow-lg ${dp[t]}`,role:`tooltip`,children:[(0,I.jsx)(L,{className:`text-white`,variant:`bodySmall`,children:e}),(0,I.jsx)(`span`,{"aria-hidden":`true`,className:`absolute size-0 border-4 border-transparent ${fp[t]}`})]})]})},mp={xs:{overlap:`-ml-1`,avatarSize:`xs`,counter:`h-5 w-5 text-xs`},sm:{overlap:`-ml-1.5`,avatarSize:`sm`,counter:`h-8 w-8 text-bodySmall`},md:{overlap:`-ml-2`,avatarSize:`md`,counter:`h-10 w-10 text-bodyNormal`},lg:{overlap:`-ml-3`,avatarSize:`lg`,counter:`h-14 w-14 text-bodyBig`}},hp=({avatars:e,max:t=5,size:n=`md`,className:r=``})=>{let i=mp[n],a=e.slice(0,t),o=e.length-t;return(0,I.jsxs)(`div`,{className:`flex items-center ${r}`,children:[a.map((e,t)=>(0,I.jsx)(pp,{content:e.name,placement:`bottom`,children:(0,I.jsx)(`div`,{className:`${t>0?i.overlap:``} cursor-default ring-2 ring-white rounded-full`,children:(0,I.jsx)(up,{className:e.color,size:i.avatarSize,src:e.src,text:e.name})})},e.id)),o>0&&(0,I.jsx)(pp,{placement:`bottom`,content:(0,I.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:e.slice(t).map(e=>(0,I.jsxs)(`div`,{className:`flex cursor-default items-center gap-2`,children:[(0,I.jsx)(up,{className:e.color,size:i.avatarSize,src:e.src,text:e.name}),(0,I.jsx)(`span`,{children:e.name})]},e.id))}),children:(0,I.jsxs)(`span`,{className:`${i.overlap} inline-flex items-center justify-center rounded-full bg-gray-200 font-semibold text-gray-600 ring-2 ring-white cursor-default ${i.counter}`,children:[`+`,o]})})]})},gp={gray:`bg-gray-100 text-gray-700`,blue:`bg-blue-100 text-blue-700`,green:`bg-green-100 text-green-700`,yellow:`bg-yellow-100 text-yellow-700`,red:`bg-red-100 text-red-700`},_p=({variant:e=`gray`,children:t,className:n=``})=>(0,I.jsx)(L,{as:`span`,className:`inline-flex items-center rounded-full px-2.5 py-0.5 ${gp[e]} ${n}
8`,variant:`subtitle3`,children:t}),vp={info:`bg-gradient-to-br from-blue-50 to-blue-100 border-blue-200`,success:`bg-gradient-to-br from-green-50 to-green-100 border-green-200`,warning:`bg-gradient-to-br from-yellow-50 to-yellow-100 border-yellow-200`,error:`bg-gradient-to-br from-red-50 to-red-100 border-red-200`},yp={info:`text-blue-900`,success:`text-green-900`,warning:`text-yellow-900`,error:`text-red-900`},bp=({variant:e=`info`,icon:t,title:n,description:r,children:i,className:a=``})=>{let o=n||r||i;return(0,I.jsxs)(`div`,{className:`py-4 px-5 rounded-[14px] border flex items-center gap-[14px] ${vp[e]} ${a}`,children:[t&&(0,I.jsx)(`div`,{className:`shrink-0`,children:t}),o&&(0,I.jsxs)(`div`,{className:`flex-1 flex flex-col gap-0.5`,children:[n&&(0,I.jsx)(L,{className:`m-0 ${yp[e]}`,variant:`subtitle2`,children:n}),r&&(0,I.jsx)(L,{className:`text-gray-500 m-0`,variant:`bodySmall`,children:r}),i]})]})},xp=({as:e,href:t,children:n,external:r=!1,variant:i=`bodyNormal`,className:a=``,...o})=>{let s=e||`a`,c=!e||e===`a`;return(0,I.jsxs)(s,{className:`cursor-pointer inline-flex items-center gap-1 text-blue-600 hover:text-blue-800 hover:underline ${le[i]} ${a}`,...o,...c&&t?{href:t}:{},...r?{target:`_blank`,rel:`noopener noreferrer`}:{},children:[n,r&&(0,I.jsx)(`svg`,{className:`h-3.5 w-3.5`,fill:`none`,stroke:`currentColor`,strokeWidth:2,viewBox:`0 0 24 24`,children:(0,I.jsx)(`path`,{d:`M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14`,strokeLinecap:`round`,strokeLinejoin:`round`})})]})},Sp=`bodyNormal`,Cp=({items:e,className:t=``})=>(0,I.jsx)(`nav`,{className:`flex min-w-0 items-center gap-2 ${t}`,children:e.map((t,n)=>{let r=n===e.length-1;return(0,I.jsxs)(L,{as:`span`,className:`flex min-w-0 items-center gap-2 text-gray-400`,variant:Sp,children:[n>0&&(0,I.jsx)(`span`,{"aria-hidden":!0,children:`/`}),t.content?t.content:t.to?(0,I.jsx)(xp,{as:t.as,className:`min-w-0 text-gray-500 hover:text-gray-700`,title:t.label,to:t.to,variant:Sp,children:(0,I.jsx)(`span`,{className:`truncate`,children:t.label})}):(0,I.jsx)(L,{as:`span`,className:r?`truncate font-semibold text-gray-900`:`truncate`,title:t.label,variant:Sp,children:t.label})]},t.key)})}),wp={sm:`h-4 w-4 border-2`,md:`h-8 w-8 border-[3px]`,lg:`h-12 w-12 border-4`},Tp=({size:e=`md`,className:t=``})=>(0,I.jsx)(`output`,{"aria-label":`Loading`,className:`inline-flex animate-spin rounded-full border-gray-300 border-t-blue-600 ${wp[e]} ${t}`}),Ep={primary:`bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800`,dark:`bg-gray-900 text-white hover:bg-gray-800 active:bg-gray-700`,secondary:`bg-gray-100 text-gray-800 hover:bg-gray-200 active:bg-gray-300`,outline:`border border-gray-300 bg-white text-gray-700 hover:bg-gray-50 active:bg-gray-100`,opportunity:`border border-blue-300 bg-blue-100 text-blue-700 hover:bg-blue-200 active:bg-blue-300`,ghost:`text-gray-700 hover:bg-gray-100 active:bg-gray-200`,"ghost-danger":`text-red-600 hover:bg-red-50 hover:text-red-700 active:bg-red-100`,danger:`bg-red-600 text-white hover:bg-red-700 active:bg-red-800`,success:`bg-emerald-600 text-white hover:bg-emerald-700 active:bg-emerald-800`},Dp={xs:`px-3 py-1`,sm:`px-3 py-1.5`,md:`px-4 py-2`,lg:`px-5 py-2.5`},Op={xs:`subtitle3`,sm:`subtitle3`,md:`subtitle2`,lg:`subtitle1`},kp=({as:e,variant:t=`primary`,size:n=`md`,loading:r=!1,startIcon:a,children:o,disabled:s=!1,className:c=``,...l})=>{let u=e||`button`,d=u===`button`;return(0,I.jsxs)(u,{className:`cursor-pointer inline-flex items-center justify-center gap-2 rounded-lg transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 ${Ep[t]} ${Dp[n]} ${c}`,disabled:s||r,...d?{type:`button`}:{},...l,children:[r&&(0,I.jsx)(Tp,{size:`sm`}),a&&(0,I.jsx)(i,{variant:a}),(0,I.jsx)(L,{as:`span`,variant:Op[n],children:o})]})},Ap=[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],jp=(e,t)=>new Date(e,t+1,0).getDate(),Mp=(e,t)=>new Date(e,t,1).getDay(),Np=(e,t)=>e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),Pp=({value:e,onCh
8ange:t})=>{let n=new Date,[r,i]=(0,P.useState)(()=>new Date(e.getFullYear(),e.getMonth(),1)),a=r.getFullYear(),o=r.getMonth(),s=jp(a,o),c=Mp(a,o),l=r.toLocaleString(`default`,{month:`long`}),u=()=>i(new Date(a,o-1,1)),d=()=>i(new Date(a,o+1,1)),f=e=>{t(new Date(a,o,e))},p=[];for(let e of Array.from({length:c},(e,t)=>t))p.push(-(e+1));for(let e of Array.from({length:s},(e,t)=>t+1))p.push(e);return(0,I.jsxs)(`div`,{className:`w-72 rounded-lg border border-gray-200 bg-white p-4 shadow-sm`,children:[(0,I.jsxs)(`div`,{className:`mb-3 flex items-center justify-between`,children:[(0,I.jsx)(`button`,{className:`rounded-md p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-700`,type:`button`,onClick:u,children:(0,I.jsx)(`svg`,{className:`h-4 w-4`,fill:`none`,stroke:`currentColor`,strokeWidth:2,viewBox:`0 0 24 24`,children:(0,I.jsx)(`path`,{d:`M15.75 19.5L8.25 12l7.5-7.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}),(0,I.jsxs)(L,{className:`font-semibold text-gray-900`,children:[l,` `,a]}),(0,I.jsx)(`button`,{className:`rounded-md p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-700`,type:`button`,onClick:d,children:(0,I.jsx)(`svg`,{className:`h-4 w-4`,fill:`none`,stroke:`currentColor`,strokeWidth:2,viewBox:`0 0 24 24`,children:(0,I.jsx)(`path`,{d:`M8.25 4.5l7.5 7.5-7.5 7.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})})]}),(0,I.jsxs)(`div`,{className:`grid grid-cols-7 gap-0`,children:[Ap.map(e=>(0,I.jsx)(L,{as:`div`,className:`py-1 text-center text-gray-400`,variant:`subtitle3`,children:e},e)),p.map(t=>{if(t<1)return(0,I.jsx)(`div`,{className:`p-1`},`empty-${t}`);let r=new Date(a,o,t),i=Np(r,n);return(0,I.jsx)(`button`,{type:`button`,className:`mx-auto flex h-8 w-8 items-center justify-center rounded-full text-bodyNormal transition-colors ${Np(r,e)?`bg-blue-600 font-semibold text-white`:i?`bg-blue-100 font-semibold text-blue-700`:`text-gray-700 hover:bg-gray-100`}`,onClick:()=>f(t),children:t},t)})]})]})},Fp=({title:e,children:t,footer:n,className:r=``})=>(0,I.jsxs)(`div`,{className:`overflow-hidden rounded-xl border border-gray-200 bg-white shadow-sm ${r}`,children:[e&&(0,I.jsx)(`div`,{className:`border-b border-gray-200 px-6 py-4`,children:(0,I.jsx)(L,{as:`h3`,className:`text-gray-900`,variant:`subtitle1`,children:e})}),(0,I.jsx)(`div`,{className:`px-6 py-4 text-bodyNormal text-gray-700`,children:t}),n&&(0,I.jsx)(`div`,{className:`border-t border-gray-200 bg-gray-50 px-6 py-3 text-bodySmall text-gray-600`,children:n})]}),Ip={sm:{wrapper:`size-5 sm:size-4`,input:`size-5 sm:size-4`,icon:`size-3.5 sm:size-2.5`},md:{wrapper:`size-6 sm:size-5`,input:`size-6 sm:size-5`,icon:`size-4 sm:size-3.5`}},Lp={sm:`bodySmall`,md:`bodyNormal`},Rp=(0,P.forwardRef)(({label:e,size:t=`md`,checked:n,onChange:r,disabled:i=!1,className:a,...o},s)=>{let c=Ip[t];return(0,I.jsxs)(`label`,{className:`flex items-start gap-2 ${i?`cursor-not-allowed`:`cursor-pointer`} ${a??``}`,children:[(0,I.jsxs)(`span`,{className:`relative flex shrink-0 items-center justify-center ${c.wrapper}`,children:[(0,I.jsx)(`input`,{ref:s,checked:n,disabled:i,type:`checkbox`,className:[`${c.input} cursor-pointer appearance-none rounded border`,`focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1`,`checked:border-blue-500 checked:bg-blue-500`,i?`cursor-not-allowed border-gray-200 bg-gray-100`:`border-gray-300 bg-white`].join(` `),onChange:e=>r(e.target.checked),...o}),n&&(0,I.jsx)(`svg`,{className:`pointer-events-none absolute stroke-white ${c.icon}`,fill:`none`,viewBox:`0 0 14 14`,children:(0,I.jsx)(`path`,{d:`M3 8l3 3 5-7`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2})})]}),e&&(0,I.jsx)(L,{className:i?`text-gray-400`:`text-gray-800`,variant:Lp[t],children:e})]})}),zp=({title:e,children:t,defaultOpen:n=!1})=>{let[r,i]=(0,P.useState)(n);return(0,I.jsxs)(`div`,{className:`overflow-hidden rounded-card border border-gray-200 bg-white`,children:[(0,I.jsxs)(`button`,{className:`flex w-full items-center justify-between px-4 py-3 text-left hover:bg-gray-50`,type:`button`,onClick:()=>i(e=>!e),children:[(0,I.jsx)(L,{className:`text-gray-900`,variant:`subt
8itle2`,children:e}),(0,I.jsx)(`svg`,{className:`h-5 w-5 shrink-0 text-gray-500 transition-transform duration-200 ${r?`rotate-180`:``}`,fill:`none`,stroke:`currentColor`,strokeWidth:2,viewBox:`0 0 24 24`,children:(0,I.jsx)(`path`,{d:`M19 9l-7 7-7-7`,strokeLinecap:`round`,strokeLinejoin:`round`})})]}),(0,I.jsx)(`div`,{className:`overflow-hidden transition-all duration-200 ${r?`max-h-96 opacity-100`:`max-h-0 opacity-0`}`,children:(0,I.jsx)(`div`,{className:`border-t border-gray-200 px-4 py-3 text-bodyNormal text-gray-700`,children:t})})]})},Bp={sm:`max-w-screen-sm`,md:`max-w-screen-md`,lg:`max-w-screen-lg`,xl:`max-w-screen-xl`},Vp=({children:e,className:t=``,size:n=`lg`})=>(0,I.jsx)(`div`,{className:`mx-auto w-full px-4 ${Bp[n]} ${t}`,children:e}),Hp=(0,P.forwardRef)(({value:e,onChange:t,error:n=!1,placeholder:r,disabled:a=!1,id:o,onBlur:s,locale:c,clearable:l=!1},u)=>{let d=n?`border-red-500 focus:border-red-500`:`border-gray-200 hover:border-gray-300 focus:border-blue-500`,f=l&&!!e&&!a,p=()=>t(null);return(0,I.jsxs)(tf,{className:`relative`,children:[(0,I.jsxs)(Xd,{ref:u,disabled:a,id:o,className:[`flex w-full items-center gap-2 rounded-input border px-3 py-2 text-bodyNormal text-left focus:outline-none`,d,a?`cursor-not-allowed bg-gray-100 text-gray-400`:`bg-white`,e?`text-gray-900`:`text-gray-400`,f?`pr-8`:``].join(` `),onBlur:s,children:[(0,I.jsx)(i,{variant:M}),(0,I.jsx)(`span`,{children:e?g(e,`dd MMM yyyy`,{locale:c}):r??``})]}),f&&(0,I.jsx)(`button`,{"aria-label":`Clear date`,className:`absolute inset-y-0 right-2.5 flex cursor-pointer items-center`,type:`button`,onClick:p,onPointerDown:e=>{e.preventDefault(),p()},children:(0,I.jsx)(i,{className:`text-gray-400 hover:text-gray-600`,fontSize:`small`,variant:O})}),(0,I.jsx)($d,{anchor:`bottom start`,className:`z-50 mt-1`,children:({close:n})=>(0,I.jsx)(Pp,{value:e??new Date,onChange:e=>{t(e),n()}})})]})}),Up=({children:e,htmlFor:t})=>(0,I.jsx)(L,{as:`label`,className:`text-gray-700`,htmlFor:t,variant:`subtitle2`,children:e}),Wp=(0,P.forwardRef)(({label:e,helperText:t,error:n=!1,id:r,...i},a)=>{let o=(0,P.useId)(),s=r??o;return(0,I.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[e&&(0,I.jsx)(Up,{htmlFor:s,children:e}),(0,I.jsx)(Hp,{ref:a,...i,error:n,id:s}),t&&(0,I.jsx)(L,{className:`text-bodySmall ${n?`text-red-500`:`text-gray-500`}`,variant:`bodySmall`,children:t})]})}),Gp=(0,P.forwardRef)(({value:e,onChange:t,error:n=!1,placeholder:r,disabled:a=!1,id:o,onBlur:s,locale:c},l)=>{let u=n?`border-red-500 focus:border-red-500`:`border-gray-200 hover:border-gray-300 focus:border-blue-500`,d=n=>{let r=e??n;t(v(n,{hours:r.getHours(),minutes:r.getMinutes(),seconds:0,milliseconds:0}))},f=n=>{if(!n)return;let[r,i]=n.split(`:`).map(Number);t(v(e??new Date,{hours:r,minutes:i,seconds:0,milliseconds:0}))};return(0,I.jsxs)(tf,{className:`relative`,children:[(0,I.jsxs)(Xd,{ref:l,disabled:a,id:o,className:[`flex w-full items-center gap-2 rounded-input border px-3 py-2 text-bodyNormal text-left focus:outline-none`,u,a?`cursor-not-allowed bg-gray-100 text-gray-400`:`bg-white`,e?`text-gray-900`:`text-gray-400`].join(` `),onBlur:s,children:[(0,I.jsx)(i,{variant:M}),(0,I.jsx)(`span`,{children:e?g(e,`dd MMM yyyy HH:mm`,{locale:c}):r??``})]}),(0,I.jsxs)($d,{anchor:`bottom start`,className:`z-50 mt-1 flex flex-col gap-2`,children:[(0,I.jsx)(Pp,{value:e??new Date,onChange:d}),(0,I.jsx)(`div`,{className:`w-72 rounded-lg border border-gray-200 bg-white px-4 py-3 shadow-sm`,children:(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`div`,{className:`text-gray-400`,children:(0,I.jsx)(i,{variant:k})}),(0,I.jsx)(`input`,{className:`w-full rounded-input border border-gray-200 px-2 py-1 text-bodyNormal text-gray-900 focus:border-blue-500 focus:outline-none`,type:`time`,value:e?g(e,`HH:mm`):``,onChange:e=>f(e.target.value)})]})})]})]})}),Kp=(0,P.forwardRef)(({label:e,helperText:t,error:n=!1,id:r,...i},a)=>{let o=(0,P.useId)(),s=r??o;return(0,I.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[e&&(0,I.jsx)(Up,{htmlFor:s,children:e}),(0,I.jsx)(Gp,{ref:a,...i,error:n,id:s}),t&&(0,I.jsx)(L,{className:`text-bodySmall ${n?`text-red-500`:`text-gray-500`}`,variant:`bodySmall`,children:t})]})}),qp=({items:e})=>
8(0,I.jsx)(`dl`,{className:`divide-y divide-gray-200 rounded-lg border border-gray-200 bg-white`,children:e.map(e=>(0,I.jsxs)(`div`,{className:`grid grid-cols-3 gap-4 px-6 py-3`,children:[(0,I.jsx)(L,{as:`dt`,className:`text-gray-500`,variant:`subtitle2`,children:e.term}),(0,I.jsx)(`dd`,{className:`col-span-2 text-bodyNormal text-gray-900`,children:e.description})]},e.term))}),Jp={xs:`max-w-[420px]`,sm:`max-w-[600px]`,md:`max-w-[800px]`,lg:`max-w-[1280px]`,xl:`max-w-[1280px]`},Yp=({title:e,subtitle:t,onClose:n,onReturn:r})=>(0,I.jsxs)(`div`,{className:`flex gap-2 border-b border-gray-200 px-6 py-4 ${t?`items-start`:`items-center`}`,children:[r&&(0,I.jsx)(`button`,{"aria-label":`back`,className:`cursor-pointer rounded-md p-1 text-gray-500 hover:bg-gray-100 hover:text-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500`,type:`button`,onClick:r,children:(0,I.jsx)(`svg`,{className:`h-5 w-5`,fill:`none`,stroke:`currentColor`,strokeWidth:1.5,viewBox:`0 0 24 24`,children:(0,I.jsx)(`path`,{d:`M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18`,strokeLinecap:`round`,strokeLinejoin:`round`})})}),e&&(0,I.jsxs)(`div`,{className:`flex flex-1 flex-col gap-1`,children:[(0,I.jsx)(L,{className:`text-gray-900`,variant:`title3`,children:e}),t&&(0,I.jsx)(L,{className:`text-gray-400`,variant:`bodySmall`,children:t})]}),n&&(0,I.jsx)(`button`,{"aria-label":`close`,className:`ml-auto cursor-pointer rounded-md p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-blue-500`,type:`button`,onClick:n,children:(0,I.jsx)(`svg`,{className:`h-5 w-5`,fill:`none`,stroke:`currentColor`,strokeWidth:1.5,viewBox:`0 0 24 24`,children:(0,I.jsx)(`path`,{d:`M6 18L18 6M6 6l12 12`,strokeLinecap:`round`,strokeLinejoin:`round`})})})]}),Xp=({open:e,onClose:t,title:n,subtitle:r,size:i=`xs`,onReturn:a,zIndex:o=1300,children:s})=>(0,I.jsxs)(iu,{className:`relative`,open:e,style:{zIndex:o},onClose:t,children:[(0,I.jsx)(nu,{className:`fixed inset-0 bg-black/30 transition-opacity`}),(0,I.jsx)(`div`,{className:`fixed inset-0 flex items-end justify-center p-0 sm:items-start sm:overflow-y-auto sm:p-4 sm:pt-16`,children:(0,I.jsxs)(tu,{className:`flex max-h-[85dvh] w-full flex-col rounded-t-xl bg-white shadow-xl transition-[max-width] duration-300 ease-in-out sm:rounded-xl ${Jp[i]}`,children:[n!==void 0&&(0,I.jsx)(Yp,{subtitle:r,title:n,onClose:t,onReturn:a}),(0,I.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-y-auto`,children:s})]})})]}),Zp=({children:e,className:t=``})=>(0,I.jsx)(`div`,{className:`sticky bottom-0 flex items-center justify-end gap-2 rounded-b-xl border-t border-gray-200 bg-white px-6 py-4 ${t}`,children:e}),Qp=({children:e,className:t=``})=>(0,I.jsx)(`div`,{className:`px-6 py-4 ${t}`,children:e}),$p=({label:e,className:t=``})=>e?(0,I.jsxs)(`div`,{className:`relative flex items-center ${t}`,children:[(0,I.jsx)(`div`,{className:`flex-1 border-t border-gray-200`}),(0,I.jsx)(L,{className:`px-3 text-gray-500`,variant:`bodySmall`,children:e}),(0,I.jsx)(`div`,{className:`flex-1 border-t border-gray-200`})]}):(0,I.jsx)(`hr`,{className:`border-t border-gray-200 ${t}`}),em={sm:`max-w-[424px]`,md:`max-w-[540px]`,lg:`max-w-[min(840px,92vw)]`},tm=({open:e,onClose:t,title:n,size:r=`sm`,children:i})=>(0,I.jsxs)(iu,{className:`relative z-1300`,open:e,onClose:t,children:[(0,I.jsx)(nu,{transition:!0,className:`fixed inset-0 bg-black/30 transition-opacity duration-300 data-[closed]:opacity-0`}),(0,I.jsx)(`div`,{className:`fixed inset-y-0 right-0 flex w-full justify-end`,children:(0,I.jsxs)(tu,{transition:!0,className:`flex h-full w-full flex-col bg-white shadow-xl transition-transform duration-300 ease-in-out data-[closed]:translate-x-full ${em[r]}`,children:[n!==void 0&&(0,I.jsx)(Yp,{title:n,onClose:t}),(0,I.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:i})]})})]}),nm=({items:e,trigger:t})=>(0,I.jsxs)(Sd,{as:`div`,className:`relative inline-block text-left`,children:[(0,I.jsx)(gd,{className:`cursor-pointer inline-flex items-center gap-2 rounded-md bg-white px-4 py-2 text-bodyNormal font-medium text-gray-700 shadow-sm ring-1 ring-gray-300 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2`,children:t??(0,I.jsxs)(I.Fragment,{children:[`Options`,(0,I.jsx)(`svg`,{className:`h-4 w-4 text-gray-500`,fill:`none`,stroke:`currentColor`,strokeWidth:2,viewBox:`0 0 24 24`,children:(0,I.jsx)(`path`,{d:`M19.5 8.25l-7.5 7.5-7.5-7.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})]})}),(0,I.jsx)(_d,{anchor:`bottom start`,className:`z-50 mt-1 w-48 origin-top-left rounded-md bg-white py-1 shadow-lg ring-1 ring-black/5 focus:outline-none`,children:e.map(e=>(0,I.jsx)(vd,{disabled:e.disabled,children:({active:t,disabled:n})=>
8(0,I.jsx)(`button`,{disabled:n,type:`button`,className:`cursor-pointer flex w-full items-center px-4 py-2 text-left text-bodyNormal ${t?`bg-blue-50 text-blue-700`:`text-gray-700`} ${n?`cursor-not-allowed opacity-50`:``}`,onClick:e.onClick,children:e.label})},e.label))})]}),rm=`😀.😃.😄.😁.😆.😅.🤣.😂.🙂.🙃.😉.😊.😇.🥰.😍.🤩.😘.😗.😚.😙.🥲.😋.😛.😜.🤪.😝.🤑.🤗.🤭.🤫.🤔.🤐.🤨.😐.😑.😶.😏.😒.🙄.😬.🤥.😌.😔.😪.🤤.😴.😷.🤒.🤕.🤢.🤮.🤧.🥵.🥶.🥴.😵.🤯.🤠.🥳.🥸.😎.🤓.🧐.😕.😟.☹️.😮.😯.😲.😳.🥺.😦.😧.😨.😰.😥.😢.😭.😱.😖.😣.😞.😓.😩.😫.🥱.😤.😡.😠.🤬`.split(`.`),im=({value:e,onSelect:t})=>(0,I.jsxs)(`div`,{className:`w-80 rounded-lg border border-gray-200 bg-white p-3 shadow-sm`,children:[e&&(0,I.jsxs)(`div`,{className:`mb-3 flex items-center gap-2 rounded-md bg-gray-50 px-3 py-2`,children:[(0,I.jsx)(L,{className:`text-gray-500`,variant:`bodySmall`,children:`Selected:`}),(0,I.jsx)(`span`,{className:`text-title2`,children:e})]}),(0,I.jsx)(`div`,{className:`grid max-h-56 grid-cols-8 gap-0.5 overflow-y-auto`,children:rm.map(n=>(0,I.jsx)(`button`,{type:`button`,className:`flex h-9 w-9 items-center justify-center rounded-md text-title3 transition-colors hover:bg-gray-100 ${e===n?`bg-blue-100 ring-2 ring-blue-400`:``}`,onClick:()=>t(n),children:n},n))})]}),am=({show:e,children:t,className:n=``})=>(0,I.jsx)(`div`,{className:`transition-all duration-500 ${e?`translate-y-0 opacity-100`:`translate-y-1 opacity-0`} ${n}`,children:t}),om=({legend:e,children:t,disabled:n=!1})=>(0,I.jsxs)(`fieldset`,{className:[`rounded-card border border-gray-200 p-4`,n?`opacity-60`:``].join(` `),disabled:n,children:[e&&(0,I.jsx)(L,{as:`legend`,className:`px-2 text-gray-700`,variant:`subtitle2`,children:e}),t]}),sm={ghost:`rounded-button text-gray-700 hover:bg-gray-100 active:bg-gray-200 focus:ring-blue-500`,"ghost-light":`rounded-button text-white hover:bg-white/20 active:bg-white/30 focus:ring-white`,segment:`text-gray-500 hover:bg-gray-50 focus:ring-blue-500`},cm={xs:`size-5`,sm:`size-6`,md:`size-8`,lg:`size-7.5`},lm=(0,P.forwardRef)(({variant:e=`ghost`,size:t=`sm`,children:n,disabled:r=!1,className:i=``,...a},o)=>(0,I.jsx)(`button`,{ref:o,className:`cursor-pointer inline-flex items-center justify-center shrink-0 transition-colors focus:outline-none focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50 ${sm[e]} ${cm[t]} ${i}`,disabled:r,type:`button`,...a,children:n})),um={md:{input:`px-3 py-2 text-bodyNormal`,transition:``},lg:{input:`h-11 px-3 py-2 text-sm`,transition:`transition-colors`}},dm={left:`text-left`,center:`text-center`,right:`text-right`},fm={default:`border-gray-200 focus:border-blue-500`,ghost:`border-transparent transition-all hover:border-gray-200 hover:bg-gray-50 focus:border-blue-500 focus:bg-white`},pm={default:`border-gray-200 focus-within:border-blue-500`,ghost:`border-transparent transition-all hover:border-gray-200 hover:bg-gray-50 focus-within:border-blue-500 focus-within:bg-white`},mm=`[appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none`,hm=(0,P.forwardRef)(({type:e=`text`,placeholder:t,disabled:n=!1,error:r=!1,size:i=`md`,variant:a=`default`,align:o=`left`,startAdornment:s,endAdornment:c,className:l,value:u,onChange:d,...f},p)=>{let m=um[i],h=!!(s||c),g=r?`border-red-500 focus-within:border-red-500`:pm[a],_=(0,I.jsx)(`input`,{ref:p,disabled:n,placeholder:t,type:e,value:u,className:[`block text-gray-900 placeholder:text-gray-400`,m.input,m.transition,dm[o],`focus:outline-none`,`disabled:cursor-not-allowed disabled:bg-gray-100 disabled:text-gray-400`,h?`w-full flex-1`:`w-full rounded-input border`,!h&&(r?`border-red-500 focus:border-red-500`:fm[a]),e===`number`&&mm,l].filter(
8Boolean).join(` `),onChange:d,...f});return h?(0,I.jsxs)(`div`,{className:`flex items-center overflow-hidden rounded-input border ${g}`,children:[s&&(0,I.jsx)(`div`,{className:`flex items-center border-r border-gray-200 bg-gray-50`,children:s}),_,c&&(0,I.jsx)(`div`,{className:`flex items-center pr-2`,children:c})]}):_}),gm=(0,P.forwardRef)(({label:e,helperText:t,error:n=!1,currency:r,precision:i,value:a,onChange:o,onBlur:s,placeholder:c=`0`,disabled:l=!1,name:u,id:d},f)=>{let p=(0,P.useId)(),m=d??p,{decimalSeparator:h,thousandsSeparator:g,getCurrencySymbol:_,getCurrencyPosition:v,getCurrencyPrecision:y}=N(),b=i??(r?y(r):2),x=r?_(r):void 0,S=r?v(r):void 0;return(0,I.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[e&&(0,I.jsx)(Up,{htmlFor:m,children:e}),(0,I.jsxs)(`div`,{className:`flex items-center rounded-input border ${n?`border-red-500 focus-within:border-red-500`:`border-gray-200 focus-within:border-blue-500`}`,children:[x&&S===`start`&&(0,I.jsx)(`span`,{className:`pl-3 text-bodyNormal text-gray-500`,children:x}),(0,I.jsx)(ae,{fixedDecimalScale:!0,valueIsNumericString:!0,className:`block w-full px-3 py-2 text-bodyNormal text-gray-900 placeholder:text-gray-400 focus:outline-none disabled:cursor-not-allowed disabled:bg-gray-100 disabled:text-gray-400`,decimalScale:b,decimalSeparator:h,disabled:l,getInputRef:f,id:m,name:u,placeholder:c,thousandSeparator:g,value:a,onBlur:s,onValueChange:e=>o(e.value)}),x&&S===`end`&&(0,I.jsx)(`span`,{className:`pr-3 text-bodyNormal text-gray-500`,children:x})]}),t&&(0,I.jsx)(L,{className:`text-bodySmall ${n?`text-red-500`:`text-gray-500`}`,variant:`bodySmall`,children:t})]})}),_m=(e,t)=>{if(t<=7)return Array.from({length:t},(e,t)=>t+1);let n=[1];e>3&&n.push(`ellipsis-start`);let r=Math.max(2,e-1),i=Math.min(t-1,e+1);for(let e of Array.from({length:i-r+1},(e,t)=>r+t))n.push(e);return e<t-2&&n.push(`ellipsis-end`),n.push(t),n},vm=({totalPages:e,currentPage:t,onChange:n})=>{let r=t=>{t<1||t>e||n(t)},i=_m(t,e);return(0,I.jsxs)(`nav`,{"aria-label":`Pagination`,className:`flex items-center gap-1`,children:[(0,I.jsxs)(`button`,{className:`cursor-pointer inline-flex items-center rounded-md px-3 py-2 text-bodyNormal font-medium text-gray-700 hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-40`,disabled:t===1,type:`button`,onClick:()=>r(t-1),children:[(0,I.jsx)(`svg`,{className:`mr-1 h-4 w-4`,fill:`none`,stroke:`currentColor`,strokeWidth:2,viewBox:`0 0 24 24`,children:(0,I.jsx)(`path`,{d:`M15.75 19.5L8.25 12l7.5-7.5`,strokeLinecap:`round`,strokeLinejoin:`round`})}),`Prev`]}),i.map(e=>typeof e==`string`?(0,I.jsx)(L,{className:`px-2 py-2 text-gray-400`,children:`...`},e):(0,I.jsx)(`button`,{type:`button`,className:`cursor-pointer min-w-[36px] rounded-md px-3 py-2 text-bodyNormal font-medium ${e===t?`bg-blue-600 text-white`:`text-gray-700 hover:bg-gray-100`}`,onClick:()=>r(e),children:e},e)),(0,I.jsxs)(`button`,{className:`cursor-pointer inline-flex items-center rounded-md px-3 py-2 text-bodyNormal font-medium text-gray-700 hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-40`,disabled:t===e,type:`button`,onClick:()=>r(t+1),children:[`Next`,(0,I.jsx)(`svg`,{className:`ml-1 h-4 w-4`,fill:`none`,stroke:`currentColor`,strokeWidth:2,viewBox:`0 0 24 24`,children:(0,I.jsx)(`path`,{d:`M8.25 4.5l7.5 7.5-7.5 7.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})]})]})},ym={md:{gap:`gap-1`,helperText:`text-bodySmall`},lg:{gap:`gap-1.5`,helperText:`text-xs`}},bm=(0,P.forwardRef)(({label:e,helperText:t,error:n=!1,size:r=`md`,id:i,...a},o)=>{let s=(0,P.useId)(),c=i??s,l=ym[r];return(0,I.jsxs)(`div`,{className:`flex w-full flex-col ${l.gap}`,children:[e?typeof e==`string`?(0,I.jsx)(Up,{htmlFor:c,children:e}):(0,I.jsx)(`div`,{className:`block`,children:e({labelProps:{htmlFor:c}})}):null,(0,I.jsx)(hm,{ref:o,error:n,id:c,size:r,...a}),t&&(0,I.jsx)(L,{className:`${l.helperText} ${n?`text-red-500`:`text-gray-500`}`,variant:`bodySmall`,children:t})]})}),xm=(0,P.forwardRef)(({revealDataRef:e,...t},n)=>{let{value:r,toggle:o}=a(!1);return(0,I.jsx)(bm,{ref:n,type:r?`text`:`password`,endAdornment:(0,I.jsx)(`button`,{className:`curs
8or-pointer text-gray-500 hover:text-gray-700 focus:outline-none`,"data-ref":e,tabIndex:-1,type:`button`,onClick:o,children:(0,I.jsx)(i,{fontSize:`small`,variant:r?j:ne})}),...t})}),$={Day:`day`,Week:`week`,Month:`month`,Quarter:`quarter`},Sm=(e,t)=>{switch(t){case $.Day:return g(e,`EEEE, MMM d, yyyy`);case $.Week:{let t=d(e,{weekStartsOn:1}),n=E(e,{weekStartsOn:1});return`${g(t,`MMM d`)} – ${g(n,`MMM d, yyyy`)}`}case $.Month:return g(e,`MMMM yyyy`);case $.Quarter:{let t=y(e),n=x(e);return`${g(t,`MMM`)} – ${g(n,`MMM yyyy`)}`}}},Cm=(e,t,n)=>{let r=n===`prev`;switch(t){case $.Day:return r?m(e,1):w(e,1);case $.Week:return r?C(e,1):f(e,1);case $.Month:return r?T(e,1):p(e,1);case $.Quarter:return r?T(e,3):p(e,3)}},wm=e=>{let t=new Date;switch(e){case $.Day:return t;case $.Week:return d(t,{weekStartsOn:1});case $.Month:return S(t);case $.Quarter:return y(t)}},Tm=(e,t)=>{switch(t){case $.Day:return{start:h(e),end:D(e)};case $.Week:return{start:d(e,{weekStartsOn:1}),end:E(e,{weekStartsOn:1})};case $.Month:return{start:S(e),end:_(e)};case $.Quarter:return{start:y(e),end:x(e)}}},Em=(e,t)=>{let n=new Date;switch(t){case $.Day:return b(e,n);case $.Week:return l(e,n,{weekStartsOn:1});case $.Month:return u(e,n);case $.Quarter:return u(y(e),y(n))}},Dm=({period:e,todayLabel:t,onChange:n})=>{let[r,a]=(0,P.useState)(wm(e)),o=t=>{a(n=>Cm(n,e,t))},s=()=>{a(wm(e))},c=Em(r,e);return(0,P.useEffect)(()=>{a(wm(e))},[e]),(0,P.useEffect)(()=>{n?.(Tm(r,e))},[r,e,n]),(0,I.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,I.jsx)(kp,{"aria-label":`Previous period`,size:`sm`,variant:`ghost`,onClick:()=>o(`prev`),children:(0,I.jsx)(i,{fontSize:`small`,variant:A})}),(0,I.jsx)(L,{className:`w-44 text-center text-gray-700`,variant:`subtitle2`,children:Sm(r,e)}),(0,I.jsx)(kp,{"aria-label":`Next period`,size:`sm`,variant:`ghost`,onClick:()=>o(`next`),children:(0,I.jsx)(i,{fontSize:`small`,variant:ee})}),(0,I.jsx)(`div`,{className:`mx-1 h-4 w-px bg-gray-200`}),(0,I.jsx)(kp,{disabled:c,size:`sm`,variant:`ghost`,onClick:s,children:t})]})},Om=[{code:`+34`,flag:`🇪🇸`,country:`ES`},{code:`+1`,flag:`🇺🇸`,country:`US`},{code:`+44`,flag:`🇬🇧`,country:`GB`},{code:`+33`,flag:`🇫🇷`,country:`FR`},{code:`+49`,flag:`🇩🇪`,country:`DE`},{code:`+39`,flag:`🇮🇹`,country:`IT`},{code:`+351`,flag:`🇵🇹`,country:`PT`},{code:`+52`,flag:`🇲🇽`,country:`MX`},{code:`+55`,flag:`🇧🇷`,country:`BR`},{code:`+81`,flag:`🇯🇵`,country:`JP`}],km=(0,P.forwardRef)(({label:e,value:t,onChange:n,countryCode:r=`+34`,id:i},a)=>{let o=(0,P.useId)(),s=i??o,[c,l]=(0,P.useState)(()=>Om.find(e=>e.code===r)??Om[0]),u=t.startsWith(c.code)?t.slice(c.code.length):t;return(0,I.jsxs)(`div`,{className:`w-full`,children:[e&&(0,I.jsx)(L,{as:`label`,className:`mb-1 block text-gray-700`,htmlFor:s,variant:`subtitle2`,children:e}),(0,I.jsxs)(`div`,{className:`flex`,children:[(0,I.jsx)(Hu,{value:c.code,onChange:e=>{let t=Om.find(t=>t.code===e);t&&(l(t),n(`${e}${u}`))},children:(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsxs)(Lu,{className:[`flex items-center gap-1 rounded-l-input border border-r-0 border-gray-300 bg-gray-50 px-3 py-2 text-bodyNormal`,`focus:outline-none focus:ring-2 focus:ring-blue-500 focus:z-10`].join(` `),children:[(0,I.jsx)(`span`,{children:c.flag}),(0,I.jsx)(`span`,{className:`text-gray-700`,children:c.code}),(0,I.jsx)(`svg`,{className:`size-3 text-gray-400`,fill:`currentColor`,viewBox:`0 0 20 20`,children:(0,I.jsx)(`path`,{clipRule:`evenodd`,d:`M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z`,fillRule:`evenodd`})})]}),(0,I.jsx)(zu,{className:`absolute z-10 mt-1 max-h-48 w-40 overflow-auto rounded-card border border-gray-200 bg-white py-1 shadow-lg focus:outline-none`,children:Om.map(e=>(0,I.jsxs)(Bu,{className:`flex cursor-pointer items-center gap-2 px-3 py-1.5 text-bodyNormal text-gray-900 data-[focus]:bg-blue-100 data-[selected]:font-medium`,value:e.code,children:[(0,I.jsx)(`span`,{children:e.flag}),(0,I.jsx)(`span`,{children:e.code}),(0,I.jsx)(`span`,{className:`text-gray-400`,children:e.country})]},e.code))})]})}),(0,I.jsx)(`input`,{ref:a,id:s,placeholder:`612 345 678`,type:`tel`,value:u,className:[`block w-full min-w-0 rounded-r-input border border-gray-300 px-3 py-2 text-bodyNormal text-gray-900 placeholder:text-gray-400`,`focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 focus:z-10`].join(` `),onChange:e=>{n(`${c.code}${e.target.value}`)}})]})]})}),Am=({trigger:e,children:t,anchor:n=`bottom start`,panelClassName:r,className:i=``,triggerClassName:a=``})=>(0,I.jsxs)(tf,{className:`relative ${i}`,children:[(0,I.jsx)(Xd,{as:`div`,className:a,children:e}
8),(0,I.jsx)($d,{anchor:n,className:r??`z-50 mt-2 w-72 rounded-lg bg-white p-4 shadow-lg ring-1 ring-black/5`,children:t})]}),jm={primary:`bg-blue-600`,success:`bg-green-600`,warning:`bg-yellow-600`,danger:`bg-red-600`},Mm={sm:`h-1`,md:`h-2`,lg:`h-3`},Nm=({value:e,max:t=100,variant:n=`primary`,size:r=`md`,className:i=``,barClassName:a=``,showLabel:o=!1,label:s})=>{let c=Math.min(Math.max(e/t*100,0),100);return(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`div`,{className:`flex-1 overflow-hidden rounded-full bg-gray-200 ${Mm[r]} ${i}`,children:(0,I.jsx)(`div`,{className:`h-full rounded-full transition-all duration-300 ${jm[n]} ${a}`,style:{width:`${c}%`}})}),o&&(0,I.jsx)(L,{as:`span`,className:`text-gray-700`,variant:`subtitle3`,children:s||`${Math.round(c)}%`})]})},Pm=({label:e,options:t,value:n,onChange:r})=>(0,I.jsx)(`div`,{className:`w-full`,children:(0,I.jsxs)(yf,{value:n,onChange:r,children:[e&&(0,I.jsx)(L,{as:`label`,className:`mb-2 block text-gray-700`,variant:`subtitle2`,children:e}),(0,I.jsx)(`div`,{className:`flex flex-col gap-2`,children:t.map(e=>(0,I.jsxs)(vf,{className:`group flex cursor-pointer items-center gap-2`,value:e.value,children:[(0,I.jsx)(`span`,{className:[`flex size-5 items-center justify-center rounded-full border`,`group-data-[checked]:border-blue-500`,`border-gray-300 bg-white`].join(` `),children:(0,I.jsx)(`span`,{className:`size-2.5 rounded-full bg-blue-500 opacity-0 group-data-[checked]:opacity-100`})}),(0,I.jsx)(L,{className:`text-gray-700`,children:e.label})]},e.value))})]})}),Fm={sm:{wrapper:`h-8 px-2 py-1`,icon:`extraSmall`},md:{wrapper:`h-9 px-2.75 py-1.5`,icon:`small`}},Im=({value:e,onChange:t,placeholder:n,size:r=`md`,className:a=``,...o})=>{let s=Fm[r];return(0,I.jsxs)(`label`,{className:`flex items-center gap-2 rounded-input border border-transparent bg-gray-100 transition-colors focus-within:border-blue-500 focus-within:bg-white focus-within:ring-[3px] focus-within:ring-blue-500/15 ${s.wrapper} ${a}`.trim(),children:[(0,I.jsx)(`span`,{className:`text-gray-400`,children:(0,I.jsx)(i,{fontSize:s.icon,variant:te})}),(0,I.jsx)(`input`,{className:`min-w-0 flex-1 border-0 bg-transparent text-bodyNormal text-gray-900 outline-none placeholder:text-gray-400`,placeholder:n,t
8ype:`search`,value:e,onChange:e=>t(e.target.value),...o})]})},Lm=({items:e,value:t,onChange:n,fullWidth:r=!1,className:i})=>{let a=(0,P.useRef)(null),[o,s]=(0,P.useState)({left:0,width:0}),[c,l]=(0,P.useState)(!1),u=(0,P.useCallback)(()=>{let e=a.current;if(!e)return;let t=e.querySelector(`[data-active="true"]`);if(!t)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();s({left:r.left-n.left,width:r.width}),l(!0)},[]);return(0,P.useEffect)(()=>{u()},[t,u]),(0,I.jsxs)(`div`,{ref:a,className:`relative flex gap-1 rounded-xl bg-gray-100 p-1 ${r?`w-full`:`w-fit`} ${i??``}`,children:[(0,I.jsx)(`div`,{className:`absolute top-1 h-[calc(100%-8px)] rounded-lg bg-white shadow-sm ${c?`transition-all duration-200 ease-in-out`:``}`,style:{left:o.left,width:o.width}}),e.map(e=>{let i=e.value===t;return(0,I.jsxs)(`button`,{"aria-label":e.label,"data-active":i,type:`button`,className:`relative z-10 flex cursor-pointer items-center justify-center gap-2 rounded-lg px-3 py-2 text-bodySmall font-medium transition-colors duration-200 ${r?`flex-1`:``} ${i?`text-gray-900`:`text-gray-400 hover:text-gray-600`}`,onClick:()=>n(e.value),children:[e.icon,!e.icon&&(0,I.jsx)(`span`,{children:e.label})]},e.value)})]})},Rm={sm:`h-2`,md:`h-3`,lg:`h-4`},zm=(e,t)=>e.map((n,r)=>n.color??se(r,e.length,t)),Bm=({label:e,color:t})=>(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,I.jsx)(`span`,{className:`inline-block h-2.5 w-2.5 shrink-0 rounded-full`,style:{backgroundColor:t}}),(0,I.jsx)(L,{className:`text-gray-600`,variant:`bodySmall`,children:e})]}),Vm=({segments:e,hue:t,size:n=`md`,showLegend:r=!0,className:i=``,renderSegmentContent:a})=>{let o=e.reduce((e,t)=>e+t.value,0),s=zm(e,t);return(0,I.jsxs)(`div`,{className:`flex flex-col gap-2 ${i}`,children:[(0,I.jsx)(`div`,{className:`flex w-full rounded-full bg-gray-100 ${Rm[n]}`,children:e.map((e,t)=>{let n=o>0?e.value/o*100:0;if(n===0)return null;let r=s[t];return(0,I.jsx)(`div`,{className:`group relative h-full transition-all duration-300 ease-out first:rounded-l-full last:rounded-r-full`,style:{width:`${n}%`,backgroundColor:r},children:a?.({...e,color:r},t)},e.id)})}),r&&(0,I.jsx)(`div`,{className:`flex flex-wrap gap-x-4 gap-y-1`,children:e.map((e,t)=>(0,I.jsx)(Bm,{color:s[t],label:e.label},e.id))})]})},Hm={md:{button:`rounded-input py-2 text-bodyNormal`,option:`px-3 py-2 text-bodyNormal`,focusRing:`focus:ring-blue-500`,transition:``},lg:{button:`h-11 rounded-lg py-2 text-sm`,option:`px-3 py-2 text-sm`,focusRing:`focus:ring-blue-100`,transition:`transition-colors`}},Um={default:`border border-gray-300 bg-white`,ghost:`border-0 bg-transparent hover:bg-gray-100`},Wm=(0,P.forwardRef)(({options:e,value:t,onChange:n,placeholder:r,emptyText:i,size:a=`md`,variant:o=`default`,disabled:s,className:c,id:l},u)=>{let d=e.find(e=>e.value===t),f=Hm[a];return(0,I.jsx)(`div`,{ref:u,className:`w-full`,children:(0,I.jsxs)(Hu,{disabled:s,value:t,onChange:n,children:[(0,I.jsxs)(Lu,{id:l,className:[`relative w-full cursor-pointer pl-3 pr-10 text-left`,Um[o],`disabled:cursor-not-allowed disabled:bg-gray-100 disabled:text-gray-400`,f.button,f.transition,`focus:outline-none focus:ring-2 ${f.focusRing} focus:border-blue-500`,c].filter(Boolean).join(` `),children:[(0,I.jsx)(`span`,{className:`block min-h-[1.25em] ${d?`text-gray-900`:`text-gray-400`}`,children:d?.label??r}),(0,I.jsx)(`span`,{className:`pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2`,children:(0,I.jsx)(`svg`,{className:`size-4 text-gray-400`,fill:`currentColor`,viewBox:`0 0 20 20`,children:(0,I.jsx)(`path`,{clipRule:`evenodd`,d:`M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z`,fillRule:`evenodd`})})})]}),(0,I.jsx)(zu,{anchor:`bottom start`,className:[`z-[1400] max-h-60 w-[var(--button-width)] overflow-auto rounded-card border border-gray-200 bg-white py-1 shadow-lg`,`focus:outline-none`,`[--anchor-gap:4px] [--anchor-padding:0px]`].join(` `),children:e.length===0&&i?(0,I.jsx)(`div`,{className:`text-gray-400 ${f.option}`,children:i}):e.map(e=>(0,I.jsxs)(Bu,{className:`group relative cursor-pointer text-gray-900 data-[focus]:bg-blue-100 data-[selected]:font-medium ${f.option}`,value:e.value,children:[(0,I.jsxs)(`span`,{className:`flex items-center gap-2`,children:[e.icon,(0,I.jsx)(`span`,{children:e.label})]}),(0,I.jsx)(`span`,{className:`absolute inset-y-0 right-0 hidden items-center pr-3 text-blue-500 group-data-[selected]:flex`,children:(0,I.jsx)(`svg`,{className:`size-4`,fill:`currentColor`,viewBox:`0 0 20 20`,children:(0,I.jsx)(`path`,{clipRule:`evenodd`,d:`M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z`,fillRule:`evenodd`})})})]},e.value))})]})})}),Gm={md:`gap-1`,lg:`gap-1.5`},Km=(0,P.forwardRef)(({label:e,size:t=`md`,...n},r)=>{let i=(0,P.useId)();return(0,I.jsxs)(`div`,{ref:r,className:`flex w-full flex-col ${Gm[t]}`,children:[e&&(0,I.jsx)(L,{as:`label`,className:`block text-gray-700`,htmlFor:i,variant:`subt
8itle2`,children:e}),(0,I.jsx)(Wm,{id:i,size:t,...n})]})}),qm=({items:e,activeItem:t,onItemClick:n})=>(0,I.jsx)(`nav`,{className:`flex w-56 flex-col rounded-lg border border-gray-200 bg-white py-2 shadow-sm`,children:e.map(e=>{let r=e.label===t,i=(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:r?`text-blue-600`:`text-gray-400`,children:e.icon}),(0,I.jsx)(`span`,{children:e.label})]}),a=`mx-2 flex items-center gap-3 rounded-md px-3 py-2 text-bodyNormal font-medium transition-colors ${r?`bg-blue-50 text-blue-700`:`text-gray-700 hover:bg-gray-50 hover:text-gray-900`}`;return e.href?(0,I.jsx)(`a`,{className:a,href:e.href,onClick:()=>n(e.label),children:i},e.label):(0,I.jsx)(`button`,{className:a,type:`button`,onClick:()=>n(e.label),children:i},e.label)})}),Jm=({show:e,children:t,className:n=``,delay:r=0})=>{let[i,a]=(0,P.useState)(!1);return(0,P.useEffect)(()=>{let e=requestAnimationFrame(()=>a(!0));return()=>cancelAnimationFrame(e)},[]),(0,I.jsx)(`div`,{className:`transition-all duration-500 ease-out ${e??i?`translate-y-0 opacity-100`:`translate-y-1.5 opacity-0`} ${n}`,style:{transitionDelay:`${r}ms`},children:t})},Ym=({label:e,value:t,change:n,trend:r})=>(0,I.jsxs)(`div`,{className:`rounded-lg border border-gray-200 bg-white p-6`,children:[(0,I.jsx)(L,{className:`text-gray-500`,variant:`subtitle3`,children:e}),(0,I.jsx)(L,{as:`p`,className:`mt-1 text-gray-900`,variant:`title2`,children:t}),n&&(0,I.jsxs)(`div`,{className:`mt-2 flex items-center gap-1`,children:[r===`up`?(0,I.jsx)(`svg`,{className:`h-4 w-4 text-green-500`,fill:`none`,stroke:`currentColor`,strokeWidth:2,viewBox:`0 0 24 24`,children:(0,I.jsx)(`path`,{d:`M5 10l7-7m0 0l7 7m-7-7v18`,strokeLinecap:`round`,strokeLinejoin:`round`})}):(0,I.jsx)(`svg`,{className:`h-4 w-4 text-red-500`,fill:`none`,stroke:`currentColor`,strokeWidth:2,viewBox:`0 0 24 24`,children:(0,I.jsx)(`path`,{d:`M19 14l-7 7m0 0l-7-7m7 7V3`,strokeLinecap:`round`,strokeLinejoin:`round`})}),(0,I.jsx)(L,{as:`span`,className:r===`up`?`text-green-600`:`text-red-600`,variant:`subtitle3`,children:n})]})]}),Xm=(0,P.forwardRef)(({label:e,checked:t,onChange:n,disabled:r=!1},i)=>{let a=(0,P.useId)();return(0,I.jsxs)(`div`,{ref:i,className:`flex items-center gap-3`,children:[(0,I.jsx)(Ef,{checked:t,disabled:r,id:a,className:[`relative inline-flex h-6 w-11 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-blue-500 focus:ring-offset-2`,r?`cursor-not-allowed opacity-50`:``,t?`bg-blue-500`:`bg-gray-300`].join(` `),onChange:n,children:(0,I.jsx)(`span`,{"aria-hidden":`true`,className:[`pointer-events-none inline-block size-5 rounded-full bg-white shadow-base ring-0 transition duration-200 ease-in-out`,t?`translate-x-5`:`translate-x-0`].join(` `)})}),e&&(0,I.jsx)(L,{as:`label`,className:r?`text-gray-400`:`text-gray-700`,htmlFor:a,children:e})]})}),Zm=({columns:e,data:t,onRowClick:n,selectedId:r})=>(0,I.jsxs)(`table`,{className:`w-full border-separate border-spacing-0`,children:[(0,I.jsx)(`thead`,{children:(0,I.jsx)(`tr`,{children:e.map(e=>(0,I.jsx)(`th`,{className:`whitespace-nowrap border-b border-gray-200 bg-gray-100 py-3 pr-6 pl-4 first:pl-6 ${e.align===`right`?`text-right`:`text-left`}`,children:(0,I.jsx)(L,{className:`text-gray-500`,variant:`subtitle2`,children:e.header})},e.key))})}),(0,I.jsx)(`tbody`,{children:t.map(t=>{let i=t.id===r;return(0,I.jsx)(`tr`,{"aria-selected":r===void 0?void 0:i,className:`${n?`cursor-pointer transition-colors hover:bg-gray-50`:``} ${i?`bg-blue-50/50`:``}`,tabIndex:n?0:void 0,onClick:n?()=>n(t):void 0,onKeyDown:n?e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),n(t))}:void 0,children:e.map(e=>(0,I.jsx)(`td`,{className:`border-b border-gray-100 py-3 pr-6 pl-4 align-middle first:pl-6 ${e.align===`right`?`text-right`:``}`,children:e.render(t)},e.key))},t.id)})})]}),Qm=({children:e,className:t=``})=>(0,I.jsx)(`div`,{className:`overflow-hidden rounded-lg border border-gray-200 bg-white ${t}`,children:e}),$m=({tabs:e})=>(0,I.jsxs)($f,{children:[(0,I.jsx)(ep,{className:`flex gap-1 rounded-lg bg-gray-100 p-1`,children:e.map(e=>(0,I.jsx)(rp,{className:({selected:e})=>`cursor-pointer flex-1 rounded-md px-4 py-2 text-bodyNormal font-medium focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 ${e?`bg-white text-blue-700 shadow`:`text-gray-600 hover:bg-white/50 hover:text-gray-900`}`,children:e.label},e.label))}),(0,I.jsx)(tp,{className:`mt-3`,children:e.map(e=>(0,I.jsx)(np,{className:`rounded-lg bg-white p-4 text-bodyNormal text-gray-700 ring-1 ring-gray-200`,children:e.content},e.label))})]}
8),eh=(0,P.forwardRef)(({value:e,onChange:t,options:n=[],label:r,placeholder:a,addLabel:o,noResultsText:c,disablePortal:l=!1},u)=>{let{t:d}=re(`shared`),f=(0,P.useId)(),[p,m]=(0,P.useState)(``),[h,g]=(0,P.useState)(!1),[_,v]=(0,P.useState)({top:0,left:0,width:0}),y=(0,P.useRef)(null),b=(0,P.useRef)(null),x=(0,P.useRef)(null),S=p.trim(),C=s(p),w=e.map(s),T=n.filter(e=>!w.includes(s(e))),E=C===``?T:T.filter(e=>s(e).includes(C)),D=T.some(e=>s(e)===C),k=w.includes(C),A=C!==``&&!D&&!k,j=e=>o?o(e):d(e=>e[`tag.autocomplete.add`],{value:e}),M=n=>{let r=n.trim();if(!r||e.some(e=>s(e)===s(r))){m(``);return}t([...e,r]),m(``)},ee=n=>{t(e.filter(e=>e!==n))},te=t=>{t.key===`Enter`&&S?(t.preventDefault(),M(S)):t.key===`Backspace`&&!p&&e.length>0?(t.preventDefault(),ee(e[e.length-1])):t.key===`Escape`&&g(!1)},ne=e=>{let t=e.relatedTarget;y.current?.contains(t)||x.current?.contains(t)||g(!1)},N=A||E.length>0,ie=h&&(N||S!==``);return(0,P.useLayoutEffect)(()=>{if(!ie||l)return;let e=()=>{let e=y.current;if(!e)return;let t=e.getBoundingClientRect();v({top:t.bottom+4,left:t.left,width:t.width})};return e(),window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0)}},[ie,l,e.length]),(0,I.jsxs)(`div`,{ref:u,className:`flex w-full flex-col gap-1`,children:[r&&(0,I.jsx)(L,{as:`label`,className:`block text-gray-700`,htmlFor:f,variant:`subtitle2`,children:r}),(0,I.jsxs)(`div`,{ref:y,className:`relative`,onBlur:ne,children:[(0,I.jsxs)(`div`,{className:`flex min-h-[40px] flex-wrap items-center gap-1.5 rounded-input border border-gray-300 bg-white px-2 py-1.5 focus-within:border-blue-500 focus-within:ring-2 focus-within:ring-blue-500/10`,children:[e.map(e=>(0,I.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-blue-100 px-2.5 py-0.5 text-bodySmall font-medium text-blue-700`,children:[e,(0,I.jsx)(`button`,{className:`flex cursor-pointer opacity-70 hover:opacity-100`,type:`button`,onClick:t=>{t.stopPropagation(),ee(e)},children:(0,I.jsx)(i,{className:`text-[10px]`,variant:O})})]},e)),(0,I.jsx)(`input`,{ref:b,className:`min-w-[100px] flex-1 bg-transparent px-1 py-0.5 text-bodyNormal text-gray-900 placeholder:text-gray-400 focus:outline-none`,id:f,placeholder:e.length===0?a:``,type:`text`,value:p,onFocus:()=>g(!0),onKeyDown:te,onChange:e=>{m(e.target.value),g(!0)}})]}),ie&&(()=>{let e=(0,I.jsxs)(`ul`,{ref:x,className:l?`absolute left-0 right-0 top-full z-20 mt-1 max-h-60 overflow-auto rounded-card border border-gray-200 bg-white py-1 shadow-lg`:`fixed z-[1400] max-h-60 overflow-auto rounded-card border border-gray-200 bg-white py-1 shadow-lg`,style:l?void 0:{top:_.top,left:_.left,width:_.width},children:[A&&(0,I.jsx)(`li`,{children:(0,I.jsx)(`button`,{className:`w-full cursor-pointer px-3 py-2 text-left text-bodyNormal text-blue-600 hover:bg-blue-50`,type:`button`,onMouseDown:e=>e.preventDefault(),onClick:()=>{M(S),b.current?.focus()},children:j(S)})}),E.map(e=>(0,I.jsx)(`li`,{children:(0,I.jsx)(`button`,{className:`w-full cursor-pointer px-3 py-2 text-left text-bodyNormal text-gray-900 hover:bg-blue-100`,type:`button`,onMouseDown:e=>e.preventDefault(),onClick:()=>{M(e),b.current?.focus()},children:e})},e)),!N&&(0,I.jsx)(L,{className:`px-3 py-2 text-gray-500`,children:c??d(e=>e[`list.no.results`])})]});return l?e:(0,F.createPortal)(e,document.body)})()]})]})}),th=(0,P.forwardRef)(({label:e,placeholder:t,rows:n=4,disabled:r=!1,error:i,className:a,value:o,onChange:s,id:c,...l},u)=>{let d=(0,P.useId)(),f=c??d;return(0,I.jsxs)(`div`,{className:`w-full`,children:[e&&(0,I.jsx)(L,{as:`label`,className:`mb-1 block text-gray-700`,htmlFor:f,variant:`subtitle2`,children:e}),(0,I.jsx)(`textarea`,{ref:u,disabled:r,id:f,placeholder:t,rows:n,value:o,className:[`block w-full rounded-input border px-3 py-2 text-bodyNormal text-gray-900 placeholder:text-gray-400`,`focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500`,`disabled:cursor-not-allowed disabled:bg-gray-100 disabled:text-gray-400`,`resize-y`,i?`border-red-500 focus:ring-red-500 focus:border-red-500`:`border-gray-300`,a].filter(
8Boolean).join(` `),onChange:s,...l}),i&&(0,I.jsx)(L,{className:`mt-1 text-red-500`,variant:`bodySmall`,children:i})]})}),nh=({value:e,shift:t})=>e<<t|e>>>32-t,rh=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],ih=Array.from({length:64},(e,t)=>Math.floor(Math.abs(Math.sin(t+1))*2**32)>>>0),ah=Array.from({length:64},(e,t)=>t),oh=e=>Array.from({length:4},(t,n)=>(e>>>n*8&255).toString(16).padStart(2,`0`)).join(``),sh=(e,t,n)=>{let{a:r,b:i,c:a,d:o}=e,{f:s,g:c}=t<16?{f:i&a|~i&o,g:t}:t<32?{f:o&i|~o&a,g:(5*t+1)%16}:t<48?{f:i^a^o,g:(3*t+5)%16}:{f:a^(i|~o),g:7*t%16};return{a:o,d:a,c:i,b:i+nh({value:s+r+ih[t]+n[c]>>>0,shift:rh[t]})>>>0}},ch=(e,t,n)=>{let r=Array.from({length:16},(e,r)=>t.getUint32(n+r*4,!0)),{a:i,b:a,c:o,d:s}=ah.reduce((e,t)=>sh(e,t,r),e);return{a:e.a+i>>>0,b:e.b+a>>>0,c:e.c+o>>>0,d:e.d+s>>>0}},lh=e=>{let t=new TextEncoder().encode(e),n=t.length*8,r=Math.ceil((t.length+9)/64)*64,i=new Uint8Array(r);i.set(t),i[t.length]=128;let a=new DataView(i.buffer);a.setUint32(r-8,n>>>0,!0),a.setUint32(r-4,Math.floor(n/2**32),!0);let{a:o,b:s,c,d:l}=Array.from({length:r/64},(e,t)=>t*64).reduce((e,t)=>ch(e,a,t),{a:1732584193,b:4023233417,c:2562383102,d:271733878});return oh(o)+oh(s)+oh(c)+oh(l)},uh=[[/[áàâãªä]/g,`a`],[/[ÁÀÂÃÄ]/g,`A`],[/[íìîï]/g,`i`],[/[ÍÌÎÏ]/g,`I`],[/[éèêë]/g,`e`],[/[ÉÈÊË]/g,`E`],[/[óòôõºö]/g,`o`],[/[ÓÒÔÕÖ]/g,`O`],[/[úùûü]/g,`u`],[/[ÚÙÛÜ]/g,`U`],[/ç/g,`c`],[/Ç/g,`C`],[/ñ/g,`n`],[/Ñ/g,`N`],[/–/g,`-`],[/[‘’‹›‚]/g,` `],[/[“”«»„]/g,` `]],dh=32,fh=126,ph=e=>Array.from(new TextEncoder().encode(e),e=>e>=dh&&e<=fh?String.fromCharCode(e):` `).join(``),mh=e=>ph(uh.reduce((e,[t,n])=>e.replace(t,n),e)).replace(/[^a-zA-Z0-9\s]+/g,``).trim(),hh=e=>{let t=`#${lh(mh(e)).slice(0,6)}`;return{background:t,text:ce[oe(t)]}},gh=({name:e,avatarUrl:t,size:n=`md`,className:r=``})=>{let{background:i,text:a}=hh(e);return(0,I.jsx)(up,{background:i,className:r,shape:`rounded`,size:n,src:t,text:e,textColor:a})};export{xp as $,am as A,Wn as At,Kp as B,xm as C,Yc as Ct,hm as D,Xc as Dt,gm as E,Qc as Et,Xp as F,Vp as G,Wp as H,Zp as I,Fp as J,zp as K,Qp as L,nm as M,L as Mt,tm as N,lm as O,ia as Ot,$p as P,Cp as Q,Yp as R,Dm as S,tu as St,vm as T,el as Tt,Up as U,Gp as V,Hp as W,kp as X,Pp as Y,Tp as Z,Pm as _,Bu as _t,$m as a,op as at,km as b,nu as bt,Xm as c,yf as ct,qm as d,tf as dt,bp as et,Km as f,gd as ft,Im as g,zu as gt,Lm as h,_d as ht,eh as i,up as it,im as j,fe as jt,om as k,Kn as kt,Ym as l,Xd as lt,Vm as m,Sd as mt,hh as n,hp as nt,Qm as o,ap as ot,Wm as p,vd as pt,Rp as q,th as r,pp as rt,Zm as s,vf as st,gh as t,_p as tt,Jm as u,$d as ut,Nm as v,Hu as vt,bm as w,$c as wt,$ as x,iu as xt,Am as y,Lu as yt,qp as z};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.