PageSourceSearch

https://alectolegal.com/_next/static/chunks/0o8me704mz2xs.js

js alectolegal.com collected 2026-10-08 21:32:49 UTC 200,773 bytes, 4 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,35889,e=>{"use strict";var t=e.i(71645),n=e.i(14189),o=e.i(35696),r=e.i(55743),i=e.i(94316),s=e.i(1893),l=e.i(20);let a=(0,t.createContext)(null);a.displayName="DescriptionContext";let u=Object.assign((0,l.forwardRefWithAs)(function(e,n){let u=(0,t.useId)(),c=(0,s.useDisabled)(),{id:d=`headlessui-description-${u}`,...f}=e,p=function e(){let n=(0,t.useContext)(a);if(null===n){let t=Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,e),t}return n}(),m=(0,i.useSyncRefs)(n);(0,o.useIsoMorphicEffect)(()=>p.register(d),[d,p.register]);let v=(0,r.useSlot)({...p.slot,disabled:c||!1}),h={ref:m,...p.props,id:d};return(0,l.useRender)()({ourProps:h,theirProps:f,slot:v,defaultTag:"p",name:p.name||"Description"})}),{});e.s(["Description",0,u,"useDescribedBy",0,function(){var e,n;return null!=(n=null==(e=(0,t.useContext)(a))?void 0:e.value)?n:void 0},"useDescriptions",0,function(){let[e,o]=(0,t.useState)([]);return[e.length>0?e.join(" "):void 0,(0,t.useMemo)(()=>function(e){let r=(0,n.useEvent)(e=>(o(t=>[...t,e]),()=>o(t=>{let n=t.slice(),o=n.indexOf(e);return -1!==o&&n.splice(o,1),n}))),i=(0,t.useMemo)(()=>({register:r,slot:e.slot,name:e.name,props:e.props,value:e.value}),[r,e.slot,e.name,e.props,e.value]);return t.default.createElement(a.Provider,{value:i},e.children)},[o])]}])},42803,22678,e=>{"use strict";var t=e.i(71645);let n=(0,t.createContext)(void 0);function o(){return(0,t.useContext)(n)}e.s(["IdProvider",0,function({id:e,children:o}){return t.default.createElement(n.Provider,{value:e},o)},"useProvidedId",0,o],42803);var r=e.i(14189),i=e.i(35696),s=e.i(55743),l=e.i(94316),a=e.i(1893),u=e.i(13581),c=e.i(20);let d=(0,t.createContext)(null);function f(){let e=(0,t.useContext)(d);if(null===e){let e=Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,f),e}return e}function p(e){var n,o,r;let i=null!=(o=null==(n=(0,t.useContext)(d))?void 0:n.value)?o:void 0;return(null!=(r=null==e?void 0:e.length)?r:0)>0?[i,...e].filter(Boolean).join(" "):i}d.displayName="LabelContext";let m=Object.assign((0,c.forwardRefWithAs)(function(e,n){var d;let p=(0,t.useId)(),m=f(),v=o(),h=(0,a.useDisabled)(),{id:b=`headlessui-label-${p}`,htmlFor:g=null!=v?v:null==(d=m.props)?void 0:d.htmlFor,passive:y=!1,...E}=e,S=(0,l.useSyncRefs)(n);(0,i.useIsoMorphicEffect)(()=>m.register(b),[b,m.register]);let x=(0,r.useEvent)(e=>{let t=e.currentTarget;if(!(e.target!==e.currentTarget&&u.isInteractiveElement(e.target))&&(u.isHTMLLabelElement(t)&&e.preventDefault(),m.props&&"onClick"in m.props&&"function"==typeof m.props.onClick&&m.props.onClick(e),u.isHTMLLabelElement(t))){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute("disabled");if("true"===t||""===t)return;let n=e.getAttribute("aria-disabled");if("true"===n||""===n)return;(u.isHTMLInputElement(e)&&("file"===e.type||"radio"===e.type||"checkbox"===e.type)||"radio"===e.role||"checkbox"===e.role||"switch"===e.role)&&e.click(),e.focus({preventScroll:!0})}}}),R=(0,s.useSlot)({...m.slot,disabled:h||!1}),w={ref:S,...m.props,id:b,htmlFor:g,onClick:x};return y&&("onClick"in w&&(delete w.htmlFor,delete w.onClick),"onClick"in E&&delete E.onClick),(0,c.useRender)()({ourProps:w,theirProps:E,slot:R,defaultTag:g?"label":"div",name:m.name||"Label"})}),{});e.s(["Label",0,m,"useLabelContext",0,f,"useLabelledBy",0,p,"useLabels",0,function({inherit:e=!1}={}){let n=p(),[o,i]=(0,t.useState)([]),s=e?[n,...o].filter(Boolean):o;return[s.length>0?s.join(" "):void 0,(0,t.useMemo)(()=>function(e){let n=(0,r.useEvent)(e=>(i(t=>[...t,e]),()=>i(t=>{let n=t.slice(),o=n.indexOf(e);return -1!==o&&n.splice(o,1),n}))),o=(0,t.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 t.default.createElement(d.Provider,{value:o},e.children)},[i])]}],22678)},26599,e=>{"use strict";var t=e.i(71645),n=e.i(68578),o=e.i(14189);e.s(["useOnUnmount",0,function(e){let r=(0,o.useEvent)(e),i=(0,t.useRef)(!1);(0,t.useEffect)(()=>(i.current=!1,()=>{i.current=!0,(0,n.microTask)(()=>{i.current&&r()})}),[r])}])},5083,e=>{"use strict";var t=e.i(71645),n=e.i(2155);e.s(["useOwnerDocument",0,function(...e){return(0,t.useMemo)(()=>(0,n.getOwnerDocument)(...e),[...e])},"useRootDocument",0,function(...e){return(0,t.useMemo)(()=>(0,n.getRootNode)(...e),[...e])}])},35307,96629,e=>{"use strict";var t=e.i(71645),n=e.i(74080),o=e.i(46725),r=e.i(14189),i=e.i(26599),s=e.i(5083),l=e.i(94316);let a=(0,t.createContext)(!1);function u(){return(0,t.useContext)(a)}e.s(["ForcePortalRoot",0,function(e){return t.default.createElement(a.Provider,{value:e.force},e.children)},"usePortalRoot",0,u],96629);var c=e.i(80758),d=e.i(20);let f=t.Fragment,p=(0,d.forwardRefWithAs)(function(e,r){let{ownerDocument:a=null,...p}=e,m=(0,t.useRef)(null),b=(0,l.useSyncRefs)((0,l.optionalRef)(e=>{m.current=e}),r),g=(0,s.useOwnerDocument)(m.current),y=function(e){let n=u(),o=(0,t.useContext)(v),[r,i]=(0,t.useState)(()=>{var t;if(!n&&null!==o)return null!=(t=o.current)?t:null;if(c.env.isServer)return null;let r=null==e?void 0:e.getElementById("headlessui-portal-root");
1if(r)return r;if(null===e)return null;let i=e.createElement("div");return i.setAttribute("id","headlessui-portal-root"),e.body.appendChild(i)});return(0,t.useEffect)(()=>{null!==r&&(null!=e&&e.body.contains(r)||null==e||e.body.appendChild(r))},[r,e]),(0,t.useEffect)(()=>{n||null!==o&&i(o.current)},[o,i,n]),r}(null!=a?a:g),E=(0,t.useContext)(h),S=(0,o.useDisposables)(),x=(0,d.useRender)();return(0,i.useOnUnmount)(()=>{var e;y&&y.childNodes.length<=0&&(null==(e=y.parentElement)||e.removeChild(y))}),y?(0,n.createPortal)(t.default.createElement("div",{"data-headlessui-portal":"",ref:e=>{S.dispose(),E&&e&&S.add(E.register(e))}},x({ourProps:{ref:b},theirProps:p,slot:{},defaultTag:f,name:"Portal"})),y):null}),m=t.Fragment,v=(0,t.createContext)(null),h=(0,t.createContext)(null),b=(0,d.forwardRefWithAs)(function(e,n){let o=(0,l.useSyncRefs)(n),{enabled:r=!0,ownerDocument:i,...s}=e,a=(0,d.useRender)();return r?t.default.createElement(p,{...s,ownerDocument:i,ref:o}):a({ourProps:{ref:o},theirProps:s,slot:{},defaultTag:f,name:"Portal"})}),g=(0,d.forwardRefWithAs)(function(e,n){let{target:o,...r}=e,i={ref:(0,l.useSyncRefs)(n)},s=(0,d.useRender)();return t.default.createElement(v.Provider,{value:o},s({ourProps:i,theirProps:r,defaultTag:m,name:"Popover.Group"}))}),y=Object.assign(b,{Group:g});e.s(["Portal",0,y,"PortalGroup",0,g,"useNestedPortals",0,function(){let e=(0,t.useContext)(h),n=(0,t.useRef)([]),o=(0,r.useEvent)(t=>(n.current.push(t),e&&e.register(t),()=>i(t))),i=(0,r.useEvent)(t=>{let o=n.current.indexOf(t);-1!==o&&n.current.splice(o,1),e&&e.unregister(t)}),s=(0,t.useMemo)(()=>({register:o,unregister:i,portals:n}),[o,i,n]);return[n,(0,t.useMemo)(()=>function({children:e}){return t.default.createElement(h.Provider,{value:s},e)},[s])]}],35307)},3269,14520,e=>{"use strict";var t=e.i(71645),n=e.i(74080),o=e.i(14189);e.s(["useControllable",0,function(e,r,i){let[s,l]=(0,t.useState)(i),a=void 0!==e,u=(0,t.useRef)(a),c=(0,t.useRef)(!1),d=(0,t.useRef)(!1);return!a||u.current||c.current?a||!u.current||d.current||(d.current=!0,u.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.")):(c.current=!0,u.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?e:s,(0,o.useEvent)(e=>(a||(0,n.flushSync)(()=>l(e)),null==r?void 0:r(e)))]}],3269),e.s(["useDefaultValue",0,function(e){let[n]=(0,t.useState)(e);return n}],14520)},2788,e=>{"use strict";let t;var n=e.i(20),o=((t=o||{})[t.None=1]="None",t[t.Focusable=2]="Focusable",t[t.Hidden=4]="Hidden",t);let r=(0,n.forwardRefWithAs)(function(e,t){var o;let{features:r=1,...i}=e,s={ref:t,"aria-hidden":(2&r)==2||(null!=(o=i["aria-hidden"])?o:void 0),hidden:(4&r)==4||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",...(4&r)==4&&(2&r)!=2&&{display:"none"}}};return(0,n.useRender)()({ourProps:s,theirProps:i,slot:{},defaultTag:"span",name:"Hidden"})});e.s(["Hidden",0,r,"HiddenFeatures",0,o])},40721,94421,e=>{"use strict";var t=e.i(71645),n=e.i(74080),o=e.i(46725);function r(e={},n=null,o=[]){for(let[s,l]of Object.entries(e))!function e(n,o,s){if
1(Array.isArray(s))for(let[t,r]of s.entries())e(n,i(o,t.toString()),r);else s instanceof Date?n.push([o,s.toISOString()]):"boolean"==typeof s?n.push([o,s?"1":"0"]):"string"==typeof s?n.push([o,s]):"number"==typeof s?n.push([o,`${s}`]):null==s?n.push([o,""]):function(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);return null===t||null===Object.getPrototypeOf(t)}(s)&&!(0,t.isValidElement)(s)&&r(s,o,n)}(o,i(n,s),l);return o}function i(e,t){return e?e+"["+t+"]":t}e.s(["attemptSubmit",0,function(e){var t,n;let o=null!=(t=null==e?void 0:e.form)?t:e.closest("form");if(o){for(let t of o.elements)if(t!==e&&("INPUT"===t.tagName&&"submit"===t.type||"BUTTON"===t.tagName&&"submit"===t.type||"INPUT"===t.nodeName&&"image"===t.type))return void t.click();null==(n=o.requestSubmit)||n.call(o)}},"objectToFormEntries",0,r],94421);var s=e.i(20),l=e.i(2788);let a=(0,t.createContext)(null);function u({children:e}){let o=(0,t.useContext)(a);if(!o)return t.default.createElement(t.default.Fragment,null,e);let{target:r}=o;return r?(0,n.createPortal)(t.default.createElement(t.default.Fragment,null,e),r):null}function c({setForm:e,formId:n}){return(0,t.useEffect)(()=>{if(n){let t=document.getElementById(n);t&&e(t)}},[e,n]),n?null:t.default.createElement(l.Hidden,{features:l.HiddenFeatures.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let n=t.closest("form");n&&e(n)}})}e.s(["FormFields",0,function({data:e,form:n,disabled:i,onReset:a,overrides:d}){let[f,p]=(0,t.useState)(null),m=(0,o.useDisposables)();return(0,t.useEffect)(()=>{if(a&&f)return m.addEventListener(f,"reset",a)},[f,n,a]),t.default.createElement(u,null,t.default.createElement(c,{setForm:p,formId:n}),r(e).map(([e,o])=>t.default.createElement(l.Hidden,{features:l.HiddenFeatures.Hidden,...(0,s.compact)({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:n,disabled:i,name:e,value:o,...d})})))},"FormFieldsProvider",0,function(e){let[n,o]=(0,t.useState)(null);return t.default.createElement(a.Provider,{value:{target:n}},e.children,t.default.createElement(l.Hidden,{features:l.HiddenFeatures.Hidden,ref:o}))}],40721)},24489,e=>{"use strict";var t=e.i(29427),n=e.i(71330),o=e.i(71645),r=e.i(94487),i=e.i(3269),s=e.i(14520),l=e.i(46725),a=e.i(14189),u=e.i(55743),c=e.i(1893),d=e.i(40721),f=e.i(42803),p=e.i(33538),m=e.i(94421),v=e.i(20),h=e.i(35889),b=e.i(98348),g=e.i(22678);let y=(0,v.forwardRefWithAs)(function(e,y){let E=(0,o.useId)(),S=(0,f.useProvidedId)(),x=(0,c.useDisabled)(),{id:R=S||`headlessui-checkbox-${E}`,disabled:w=x||!1,autoFocus:P=!1,checked:I,defaultChecked:F,onChange:O,name:T,value:C,form:M,indeterminate:D=!1,tabIndex:k=0,...A}=e,L=(0,s.useDefaultValue)(F),[N,B]=(0,i.useControllable)(I,O,null!=L&&L),H=(0,g.useLabelledBy)(),W=(0,h.useDescribedBy)(),_=(0,l.useDisposables)(),[V,K]=(0,o.useState)(!1),z=(0,a.useEvent)(()=>{K(!0),null==B||B(!N),_.nextFrame(()=>{K(!1)})}),$=(0,a.useEvent)(e=>{if((0,p.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),z()}),j=(0,a.useEvent)(e=>{e.key===b.Keys.Space?(e.preventDefault(),z()):e.key===b.Keys.Enter&&(0,m.attemptSubmit)(e.currentTarget)}),G=(0,a.useEvent)(e=>e.preventDefault()),{isFocusVisible:U,focusProps:q}=(0,t.useFocusRing)({autoFocus:P}),{isHovered:Q,hoverProps:Y}=(0,n.useHover)({isDisabled:w}),{pressed:X,pressProps:J}=(0,r.useActivePress)({disabled:w}),Z=(0,v.mergeProps)({ref:y,id:R,role:"checkbox","aria-checked":D?"mixed":N?"true":"false","aria-labelledby":H,"aria-describedby":W,"aria-disabled":!!w||void 0,indeterminate:D?"true":void 0,tabIndex:w?void 0:k,onKeyUp:w?void 0:j,onKeyPress:w?void 0:G,onClick:w?void 0:$},q,Y,J),ee=(0,u.useSlot)({checked:N,disabled:w,hover:Q,focus:U,active:X,indeterminate:D,changing:V,autofocus:P}),et=(0,o.useCallback)(()=>{if(void 0!==L)return null==B?void 0:B(L)},[B,L]),en=(0,v.useRender)();return o.default.createElement(o.default.Fragment,null,null!=T&&o.default.createElement(d.FormFields,{disabled:w,data:{[T]:C||"on"},overrides:{type:"checkbox",checked:N},form:M,onReset:et}),en({ourProps:Z,theirProps:A,slot:ee,defaultTag:"span",name:"Checkbox"}))});e.s(["Checkbox",0,y])},26962,e=>{"use strict";var t=e.i(71645),n=e.i(74175),o=e.i(20),r=e.i(29717);let i=(0,o.forwardRefWithAs)(function(e,i){let s=(0,n.useClose)();return t.default.createElement(r.Button,{ref:i,...(0,o.mergeProps)({onClick:s},e)})});e.s(["CloseButton",0,i])},36289,e=>{"use strict";var t=e.i(71645);function n(e,t){return null!==e&&null!==t&&"object"==typeof e&&"object"==typeof t&&"id"in e&&"id"in t?e.id===t.id:e===t}e.s(["useByComparator",0,function(e=n){return(0,t.useCallback)((t,n)=>"string"==typeof e?(null==t?void 0:t[e])===(null==n?void 0:n[e]):e(t,n),[e])}])},14595,(e,t,n)=>{"use strict";var o=e.r(71645),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=o.useSyncExternalStore,s=o.useRef,l=o.useEffect,a=o.useMemo,u=o.useDebugValue;n.useSyncExternalStoreWithSelector=function(e,t,n,o,c){var d=s(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;var p=i(e,(d=a(function(){function e(e){if(!l){if(l=!0,i=e,e=o(e),void 0!==c&&f.hasValue){var t=f.value;if(c(t,e))return s=t}return s=e}if(t=s,r(i,e))return t;var n=o(e);return void 0!==c&&c(t,n)?(i=e,t):(i=e,s=n)}var i,s,l=!1,a=void 0===n?null:n;return[function(){return e(t())},null===a?void 0:function(){return e(a())}]},[t,n,o,c]))[0],d[1]);return l(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}},13027,(e,t,n)=>{"use strict";
1t.exports=e.r(14595)},29644,25720,41650,40407,e=>{"use strict";let t;var n,o,r,i=e.i(71645);class s extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return void 0===t&&(t=this.factory(e),this.set(e,t)),t}}var l=e.i(44508),a=e.i(80758),u=Object.defineProperty,c=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},d=(e,t,n)=>(c(e,t,"read from private field"),n?n.call(e):t.get(e)),f=(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)},p=(e,t,n,o)=>(c(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n);class m{constructor(e){f(this,n,{}),f(this,o,new s(()=>new Set)),f(this,r,new Set),((e,t,n)=>{let o;return(o="symbol"!=typeof t?t+"":t)in e?u(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n})(this,"disposables",(0,l.disposables)()),p(this,n,e),a.env.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return d(this,n)}subscribe(e,t){if(a.env.isServer)return()=>{};let o={selector:e,callback:t,current:e(d(this,n))};return d(this,r).add(o),this.disposables.add(()=>{d(this,r).delete(o)})}on(e,t){return a.env.isServer?()=>{}:(d(this,o).get(e).add(t),this.disposables.add(()=>{d(this,o).get(e).delete(t)}))}send(e){let t=this.reduce(d(this,n),e);if(t!==d(this,n)){for(let e of(p(this,n,t),d(this,r))){let t=e.selector(d(this,n));v(e.current,t)||(e.current=t,e.callback(t))}for(let t of d(this,o).get(e.type))t(d(this,n),e)}}}function v(e,t){return!!Object.is(e,t)||"object"==typeof e&&null!==e&&"object"==typeof t&&null!==t&&(Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&h(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size===t.size&&h(e.entries(),t.entries()):!!(b(e)&&b(t))&&h(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()))}function h(e,t){for(;;){let n=e.next(),o=t.next();if(n.done&&o.done)return!0;if(n.done||o.done||!Object.is(n.value,o.value))return!1}}function b(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);return null===t||null===Object.getPrototypeOf(t)}n=new WeakMap,o=new WeakMap,r=new WeakMap,e.s(["Machine",0,m,"batch",0,function(e){let[t,n]=e(),o=(0,l.disposables)();return(...e)=>{t(...e),o.dispose(),o.microTask(n)}},"shallowEqual",0,v],25720);var g=e.i(97701),y=Object.defineProperty,E=(e,t,n)=>{let o;return(o="symbol"!=typeof t?t+"":t)in e?y(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n,n},S=((t=S||{})[t.Push=0]="Push",t[t.Pop=1]="Pop",t);let x={0(e,t){let n=t.id,o=e.stack,r=e.stack.indexOf(n);if(-1!==r){let t=e.stack.slice();return t.splice(r,1),t.push(n),o=t,{...e,stack:o}}return{...e,stack:[...e.stack,n]}},1(e,t){let n=t.id,o=e.stack.indexOf(n);if(-1===o)return e;let r=e.stack.slice();return r.splice(o,1),{...e,stack:r}}};class R extends m{constructor(){super(...arguments),E(this,"actions",{push:e=>this.send({type:0,id:e}),pop:e=>this.send({type:1,id:e})}),E(this,"selectors",{isTop:(e,t)=>e.stack[e.stack.length-1]===t,inStack:(e,t)=>e.stack.includes(t)})}static new(){return new R({stack:[]})}reduce(e,t){return(0,g.match)(t.type,x,e,t)}}let w=new s(()=>R.new());e.s(["ActionTypes",0,S,"stackMachines",0,w],41650);var P=e.i(13027),I=e.i(14189);function F(e,t,n=v){return(0,P.useSyncExternalStoreWithSelector)((0,I.useEvent)(t=>e.subscribe(O,t)),(0,I.useEvent)(()=>e.state),(0,I.useEvent)(()=>e.state),(0,I.useEvent)(t),n)}function O(e){return e}e.s(["useSlice",0,F],40407);var T=e.i(35696);e.s(["useIsTopLayer",0,function(e,t){let n=(0,i.useId)(),o=w.get(t),[r,s]=F(o,(0,i.useCallback)(e=>[o.selectors.isTop(e,n),o.selectors.inStack(e,n)],[o,n]));return(0,T.useIsoMorphicEffect)(()=>{if(e)return o.actions.push(n),()=>o.actions.pop(n)},[o,e,n]),!!e&&(!s||r)}],29644)},84653,e=>{"use strict";var t=e.i(44508),n=e.i(2155),o=e.i(29644),r=e.i(35696);let i=new Map,s=new Map;function l(e){var t;let n=null!=(t=s.get(e))?t:0;return s.set(e,n+1),0!==n||(i.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0),()=>(function(e){var t;let n=null!=(t=s.get(e))?t:1;if(1===n?s.delete(e):s.set(e,n-1),1!==n)return;let o=i.get(e);o&&(null===o["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",o["aria-hidden"]),e.inert=o.inert,i.delete(e))})(e)}e.s(["useInertOthers",0,function(e,{allowed:i,disallowed:s}={}){let a=(0,o.useIsTopLayer)(e,"inert-others");(0,r.useIsoMorphicEffect)(()=>{var e,o;if(!a)return;let r=(0,t.disposables)();for(let t of null!=(e=null==s?void 0:s())?e:[])t&&r.add(l(t));let u=null!=(o=null==i?void 0:i())?o:[];for(let e of u){if(!e)continue;let t=(0,n.getOwnerDocument)(e);if(!t)continue;let o=e.parentElement;for(;o&&o!==t.body;){for(let e of o.children)u.some(t=>e.contains(t))||r.add(l(e));o=o.parentElement}}return r.dispose},[a,i,s])}])},52265,e=>{"use strict";let t,n,o,r,i;var s=e.i(44508),l=e.i(13581),a=e.i(97701),u=e.i(2155);let c=["[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(","),d=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var f=((t=f||{})[t.First=1]="First",t[t.Previous=2]="Previous",t[t.Next=4]="Next",t[t.Last=8]="Last",t[t.WrapAround=16]="WrapAround",t[t.NoScroll=32]="NoScroll",t[t.AutoFocus=64]="AutoFocus",t),p=((n=p||{})[n.Error=0]="Error",n[n.Overflow=1]="Overflow",n[n.Success=2]="Success",n[n.Underflow=3]="Underflow",n),m=((o=m||{})[o.Previous=-1]="Previous",o[o.Next=1]="Next",o);function v(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(c)).sort((e,t)=>
1Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var h=((r=h||{})[r.Strict=0]="Strict",r[r.Loose=1]="Loose",r);function b(e,t=0){var n;return e!==(null==(n=(0,u.getOwnerDocument)(e))?void 0:n.body)&&(0,a.match)(t,{0:()=>e.matches(c),1(){let t=e;for(;null!==t;){if(t.matches(c))return!0;t=t.parentElement}return!1}})}var g=((i=g||{})[i.Keyboard=0]="Keyboard",i[i.Mouse=1]="Mouse",i);function y(e){null==e||e.focus({preventScroll:!0})}function E(e,t=e=>e){return e.slice().sort((e,n)=>{let o=t(e),r=t(n);if(null===o||null===r)return 0;let i=o.compareDocumentPosition(r);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function S(e,t,{sorted:n=!0,relativeTo:o=null,skipElements:r=[]}={}){var i,s,l;let a=Array.isArray(e)?e.length>0?(0,u.getRootNode)(e[0]):document:(0,u.getRootNode)(e),c=Array.isArray(e)?n?E(e):e:64&t?function(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(d)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}(e):v(e);r.length>0&&c.length>1&&(c=c.filter(e=>!r.some(t=>null!=t&&"current"in t?(null==t?void 0:t.current)===e:t===e))),o=null!=o?o:null==a?void 0:a.activeElement;let f=(()=>{if(5&t)return 1;if(10&t)return -1;throw Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),p=(()=>
1{if(1&t)return 0;if(2&t)return Math.max(0,c.indexOf(o))-1;if(4&t)return Math.max(0,c.indexOf(o))+1;if(8&t)return c.length-1;throw Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),m=32&t?{preventScroll:!0}:{},h=0,b=c.length,g;do{if(h>=b||h+b<=0)return 0;let e=p+h;if(16&t)e=(e+b)%b;else{if(e<0)return 3;if(e>=b)return 1}null==(g=c[e])||g.focus(m),h+=f}while(g!==(0,u.getActiveElement)(g))return 6&t&&null!=(l=null==(s=null==(i=g)?void 0:i.matches)?void 0:s.call(i,"textarea,input"))&&l&&g.select(),2}"u">typeof window&&"u">typeof document&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0)),e.s(["Focus",0,f,"FocusResult",0,p,"FocusableMode",0,h,"focusElement",0,y,"focusFrom",0,function(e,t,n=null===e?document.body:(0,u.getRootNode)(e)){return S(v(n),t,{relativeTo:e})},"focusIn",0,S,"focusableSelector",0,c,"getFocusableElements",0,v,"isFocusableElement",0,b,"restoreFocusIfNecessary",0,function(e){(0,s.disposables)().nextFrame(()=>{let t=(0,u.getActiveElement)(e);t&&l.isHTMLorSVGElement(t)&&!b(t,0)&&y(e)})},"sortByDomNode",0,E])},1141,e=>{"use strict";var t=e.i(71645),n=e.i(41444);e.s(["useWindowEvent",0,function(e,o,r,i){let s=(0,n.useLatestValue)(r);(0,t.useEffect)(()=>{if(e)return window.addEventListener(o,t,i),()=>window.removeEventListener(o,t,i);function t(e){s.current(e)}},[e,o,i])}])},93456,e=>{"use strict";var t=e.i(71645),n=e.i(41444);e.s(["useEventListener",0,function(e,o,r,i){let s=(0,n.useLatestValue)(r);(0,t.useEffect)(()=>{function t(e){s.current(e)}return(e=null!=e?e:window).addEventListener(o,t,i),()=>e.removeEventListener(o,t,i)},[e,o,i])}])},77891,9507,22357,52744,1852,e=>{"use strict";let t,n;var o,r,i=e.i(71645),s=e.i(44508),l=e.i(13581),a=e.i(41444);e.s(["useOnDisappear",0,function(e,t,n){let o=(0,a.useLatestValue)(e=>{let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&n()});(0,i.useEffect)(()=>{if(!e)return;let n=null===t?null:l.isHTMLElement(t)?t:t.current;if(!n)return;let r=(0,s.disposables)();if("u">typeof ResizeObserver){let e=new ResizeObserver(()=>o.current(n));e.observe(n),r.add(()=>e.disconnect())}if("u">typeof IntersectionObserver){let e=new IntersectionObserver(()=>o.current(n));e.observe(n),r.add(()=>e.disconnect())}return()=>r.dispose()},[t,o,e])}],77891);var u=e.i(52265);function c(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function d(){return c()||/Android/gi.test(window.navigator.userAgent)}function f(e,t,n,o){let r=(0,a.useLatestValue)(n);(0,i.useEffect)(()=>{if(e)return document.addEventListener(t,n,o),()=>document.removeEventListener(t,n,o);function n(e){r.current(e)}},[e,t,o])}e.s(["isIOS",0,c,"isMobile",0,d],9507),e.s(["useDocumentEvent",0,f],22357);var p=e.i(1141);e.s(["useOutsideClick",0,function(e,t,n){let o=(0,a.useLatestValue)(n),r=(0,i.useCallback)(function(e,n){if(e.defaultPrevented)return;let r=n(e);if(null!==r&&r.getRootNode().contains(r)&&r.isConnected){for(let n of function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(t))if(null!==n&&(n.contains(r)||e.composed&&e.composedPath().includes(n)))return;return(0,u.isFocusableElement)(r,u.FocusableMode.Loose)||-1===r.tabIndex||e.preventDefault(),o.current(e,r)}},[o,t]),s=(0,i.useRef)(null);f(e,"pointerdown",e=>{var t,n;d()||(s.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)},!0),f(e,"pointerup",e=>{if(d()||!s.current)return;let t=s.current;return s.current=null,r(e,()=>t)},!0);let c=(0,i.useRef)({x:0,y:0});f(e,"touchstart",e=>{c.current.x=e.touches[0].clientX,c.current.y=e.touches[0].clientY},!0),f(e,"touchend",e=>{let t={x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY};if(!(Math.abs(t.x-c.current.x)>=30||Math.abs(t.y-c.current.y)>=30))return r(e,()=>l.isHTMLorSVGElement(e.target)?e.target:null)},!0),(0,p.useWindowEvent)(e,"blur",e=>r(e,()=>l.isHTMLIframeElement(window.document.activeElement)?window.document.activeElement:null),!0)}],52744);var m=e.i(35696);function v(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let h=(o=()=>new Map,r={PUSH(e,t){var n;let o=null!=(n=this.get(e))?n:{doc:e,count:0,d:(0,s.disposables)(),meta:new Set,computedMeta:{}};return o.count++,o.meta.add(t),o.computedMeta=v(o.meta),this.set(e,o),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t),n.computedMeta=v(n.meta)),this},SCROLL_PREVENT(e){let t,n={doc:e.doc,d:e.d,meta:()=>e.computedMeta},o=[c()?{before({doc:e,d:t,meta:n}
1){function o(e){for(let t of n().containers)for(let n of t())if(n.contains(e))return!0;return!1}t.microTask(()=>{var n;if("auto"!==window.getComputedStyle(e.documentElement).scrollBehavior){let n=(0,s.disposables)();n.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>n.dispose()))}let r=null!=(n=window.scrollY)?n:window.pageYOffset,i=null;t.addEventListener(e,"click",t=>{if(l.isHTMLorSVGElement(t.target))try{let n=t.target.closest("a");if(!n)return;let{hash:r}=new URL(n.href),s=e.querySelector(r);l.isHTMLorSVGElement(s)&&!o(s)&&(i=s)}catch{}},!0),t.group(n=>{t.addEventListener(e,"touchstart",e=>{if(n.dispose(),l.isHTMLorSVGElement(e.target)&&l.hasInlineStyle(e.target))if(o(e.target)){let t=e.target;for(;t.parentElement&&o(t.parentElement);)t=t.parentElement;n.style(t,"overscrollBehavior","contain")}else n.style(e.target,"touchAction","none")})}),t.addEventListener(e,"touchmove",e=>{if(l.isHTMLorSVGElement(e.target)&&!l.isHTMLInputElement(e.target))if(o(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(()=>{var e;r!==(null!=(e=window.scrollY)?e:window.pageYOffset)&&window.scrollTo(0,r),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})}}:{},{before({doc:e}){var n;let o=e.documentElement;t=Math.max(0,(null!=(n=e.defaultView)?n:window).innerWidth-o.clientWidth)},after({doc:e,d:n}){let o=e.documentElement,r=Math.max(0,o.clientWidth-o.offsetWidth),i=Math.max(0,t-r);n.style(o,"paddingRight",`${i}px`)}},{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}];o.forEach(({before:e})=>null==e?void 0:e(n)),o.forEach(({after:e})=>null==e?void 0:e(n))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}},t=o(),n=new Set,{getSnapshot:()=>t,subscribe:e=>(n.add(e),()=>n.delete(e)),dispatch(e,...o){let i=r[e].call(t,...o);i&&(t=i,n.forEach(e=>e()))}});h.subscribe(()=>{let e=h.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let e="hidden"===t.get(n.doc),o=0!==n.count;(o&&!e||!o&&e)&&h.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),0===n.count&&h.dispatch("TEARDOWN",n)}});var b=e.i(29644);e.s(["useScrollLock",0,function(e,t,n=()=>[document.body]){!function(e,t,n=()=>({containers:[]})){let o=(0,i.useSyncExternalStore)(h.subscribe,h.getSnapshot,h.getSnapshot),r=t?o.get(t):void 0;r&&r.count,(0,m.useIsoMorphicEffect)(()=>{if(!(!t||!e))return h.dispatch("PUSH",t,n),()=>h.dispatch("POP",t,n)},[e,t])}((0,b.useIsTopLayer)(e,"scroll-lock"),t,e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],n]}})}],1852)},40143,e=>{"use strict";var t=e.i(71645),n=e.i(2155),o=e.i(35696);e.s(["useTreeWalker",0,function(e,{container:r,accept:i,walk:s}){let l=(0,t.useRef)(i),a=(0,t.useRef)(s);(0,t.useEffect)(()=>{l.current=i,a.current=s},[i,s]),(0,o.useIsoMorphicEffect)(()=>{if(!r||!e)return;let t=(0,n.getOwnerDocument)(r);if(!t)return;let o=l.current,i=a.current,s=Object.assign(e=>o(e),{acceptNode:o}),u=t.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,s,!1);for(;u.nextNode();)i(u.currentNode)},[r,e,l,a])}])},92704,19751,e=>{"use strict";var t=e.i(71645),n=e.i(44508),o=e.i(35696);function r(e){if(null===e)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}e.s(["useElementSize",0,function(e,i,s=!1){let[l,a]=(0,t.useState)(()=>r(i));return(0,o.useIsoMorphicEffect)(()=>{if(!i||!e)return;let t=(0,n.disposables)();return t.requestAnimationFrame(function e(){t.requestAnimationFrame(e),a(e=>{let t=r(i);return t.width===e.width&&t.height===e.height?e:t})}),()=>{t.dispose()}},[i,e]),s?{width:`${l.width}px`,height:`${l.height}px`}:l}],92704);let i=Math.min,s=Math.max,l=Math.round,a=Math.floor,u=e=>({x:e,y:e}),c={left:"right",right:"left",bottom:"top",top:"bottom"},d={start:"end",end:"start"};function f(e,t){return"function"==typeof e?e(t):e}function p(e){return e.split("-")[0]}function m(e){return e.split("-")[1]}function v(e){return"x"===e?"y":"x"}function h(e){return"y"===e?"height":"width"}let b=new Set(["top","bottom"]);function g(e){return b.has(p(e))?"y":"x"}function y(e){return e.replace(/start|end/g,e=>d[e])}let E=["left","right"],S=["right","left"],x=["top","bottom"],R=["bottom","top"];function w(e){return e.replace(/left|right|bottom|top/g,e=>c[e])}function P(e){let{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function I(e,t,n){let o,{reference:r,floating:i}=e,s=g(t),l=v(g(t)),a=h(l),u=p(t),c="y"===s,d=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,b=r[a]/2-i[a]/2;switch(u){case"top":o={x:d,y:r.y-i.height};break;case"bottom":o={x:d,y:r.y+r.height};break;case"right":o={x:r.x+r.width,y:f};break;case"left":o={x:r.x-i.width,y:f};break;default:o={x:r.x,y:r.y}}switch(m(t)){case"start":o[l]-=b*(n&&c?-1:1);break;case"end":o[l]+=b*(n&&c?-1:1)}return o}async function F(e,t){var n,o;void 0===t&&(t={});let{x:r,y:i,platform:s,rects:l,elements:a,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:m=!1,padding:v=0}=f(t,e),h="number"!=typeof(o=v)?{top:0,right:0,bottom:0,left:0,...o}
1:{top:o,right:o,bottom:o,left:o},b=a[m?"floating"===p?"reference":"floating":p],g=P(await s.getClippingRect({element:null==(n=await (null==s.isElement?void 0:s.isElement(b)))||n?b:b.contextElement||await (null==s.getDocumentElement?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:u})),y="floating"===p?{x:r,y:i,width:l.floating.width,height:l.floating.height}:l.reference,E=await (null==s.getOffsetParent?void 0:s.getOffsetParent(a.floating)),S=await (null==s.isElement?void 0:s.isElement(E))&&await (null==s.getScale?void 0:s.getScale(E))||{x:1,y:1},x=P(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:E,strategy:u}):y);return{top:(g.top-x.top+h.top)/S.y,bottom:(x.bottom-g.bottom+h.bottom)/S.y,left:(g.left-x.left+h.left)/S.x,right:(x.right-g.right+h.right)/S.x}}let O=async(e,t,n)=>{let{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,l=i.filter(Boolean),a=await (null==s.isRTL?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:c,y:d}=I(u,o,a),f=o,p={},m=0;for(let n=0;n<l.length;n++){var v;let{name:i,fn:h}=l[n],{x:b,y:g,data:y,reset:E}=await h({x:c,y:d,initialPlacement:o,placement:f,strategy:r,middlewareData:p,rects:u,platform:{...s,detectOverflow:null!=(v=s.detectOverflow)?v:F},elements:{reference:e,floating:t}});c=null!=b?b:c,d=null!=g?g:d,p={...p,[i]:{...p[i],...y}},E&&m<=50&&(m++,"object"==typeof E&&(E.placement&&(f=E.placement),E.rects&&(u=!0===E.rects?await s.getElementRects({reference:e,floating:t,strategy:r}):E.rects),{x:c,y:d}=I(u,f,a)),n=-1)}return{x:c,y:d,placement:f,strategy:r,middlewareData:p}},T=new Set(["left","top"]);async function C(e,t){let{placement:n,platform:o,elements:r}=e,i=await (null==o.isRTL?void 0:o.isRTL(r.floating)),s=p(n),l=m(n),a="y"===g(n),u=T.has(s)?-1:1,c=i&&a?-1:1,d=f(t,e),{mainAxis:v,crossAxis:h,alignmentAxis:b}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof b&&(h="end"===l?-1*b:b),a?{x:h*c,y:v*u}:{x:v*u,y:h*c}}function M(){return"u">typeof window}function D(e){return L(e)?(e.nodeName||"").toLowerCase():"#document"}function k(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function A(e){var t;return null==(t=(L(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function L(e){return!!M()&&(e instanceof Node||e instanceof k(e).Node)}function N(e){return!!M()&&(e instanceof Element||e instanceof k(e).Element)}function B(e){return!!M()&&(e instanceof HTMLElement||e instanceof k(e).HTMLElement)}function H(e){return!(!M()||"u"<typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof k(e).ShadowRoot)}let W=new Set(["inline","contents"]);function _(e){let{overflow:t,overflowX:n,overflowY:o,display:r}=X(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!W.has(r)}let V=new Set(["table","td","th"]),K=[":popover-open",":modal"];function z(e){return K.some(t=>{try{return e.matches(t)}catch(e){return!1}})}let $=["transform","translate","scale","rotate","perspective"],j=["transform","translate","scale","rotate","perspective","filter"],G=["paint","layout","strict","content"];function U(e){let t=q(),n=N(e)?X(e):e;return $.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||j.some(e=>(n.willChange||"").includes(e))||G.some(e=>(n.contain||"").includes(e))}function q(){return!("u"<typeof CSS)&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let Q=new Set(["html","body","#document"]);function Y(e){return Q.has(D(e))}function X(e){return k(e).getComputedStyle(e)}function J(e){return N(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Z(e){if("html"===D(e))return e;let t=e.assignedSlot||e.parentNode||H(e)&&e.host||A(e);return H(t)?t.host:t}function ee(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);let r=function e(t){let n=Z(t);return Y(n)?t.ownerDocument?t.ownerDocument.body:t.body:B(n)&&_(n)?n:e(n)}(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),s=k(r);if(i){let e=et(s);
1return t.concat(s,s.visualViewport||[],_(r)?r:[],e&&n?ee(e):[])}return t.concat(r,ee(r,[],n))}function et(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function en(e){let t=X(e),n=parseFloat(t.width)||0,o=parseFloat(t.height)||0,r=B(e),i=r?e.offsetWidth:n,s=r?e.offsetHeight:o,a=l(n)!==i||l(o)!==s;return a&&(n=i,o=s),{width:n,height:o,$:a}}function eo(e){return N(e)?e:e.contextElement}function er(e){let t=eo(e);if(!B(t))return u(1);let n=t.getBoundingClientRect(),{width:o,height:r,$:i}=en(t),s=(i?l(n.width):n.width)/o,a=(i?l(n.height):n.height)/r;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}let ei=u(0);function es(e){let t=k(e);return q()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ei}function el(e,t,n,o){var r;void 0===t&&(t=!1),void 0===n&&(n=!1);let i=e.getBoundingClientRect(),s=eo(e),l=u(1);t&&(o?N(o)&&(l=er(o)):l=er(e));let a=(void 0===(r=n)&&(r=!1),o&&(!r||o===k(s))&&r)?es(s):u(0),c=(i.left+a.x)/l.x,d=(i.top+a.y)/l.y,f=i.width/l.x,p=i.height/l.y;if(s){let e=k(s),t=o&&N(o)?k(o):o,n=e,r=et(n);for(;r&&o&&t!==n;){let e=er(r),t=r.getBoundingClientRect(),o=X(r),i=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,s=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;c*=e.x,d*=e.y,f*=e.x,p*=e.y,c+=i,d+=s,r=et(n=k(r))}}return P({width:f,height:p,x:c,y:d})}function ea(e,t){let n=J(e).scrollLeft;return t?t.left+n:el(A(e)).left+n}function eu(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ea(e,n),y:n.top+t.scrollTop}}let ec=new Set(["absolute","fixed"]);function ed(e,t,n){var o;let r;if("viewport"===t)r=function(e,t){let n=k(e),o=A(e),r=n.visualViewport,i=o.clientWidth,s=o.clientHeight,l=0,a=0;if(r){i=r.width,s=r.height;let e=q();(!e||e&&"fixed"===t)&&(l=r.offsetLeft,a=r.offsetTop)}let u=ea(o);if(u<=0){let e=o.ownerDocument,t=e.body,n=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,s=Math.abs(o.clientWidth-t.clientWidth-r);s<=25&&(i-=s)}else u<=25&&(i+=u);return{width:i,height:s,x:l,y:a}}(e,n);else if("document"===t){let t,n,i,l,a,u,c;o=A(e),t=A(o),n=J(o),i=o.ownerDocument.body,l=s(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),a=s(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight),u=-n.scrollLeft+ea(o),c=-n.scrollTop,"rtl"===X(i).direction&&(u+=s(t.clientWidth,i.clientWidth)-l),r={width:l,height:a,x:u,y:c}}else if(N(t)){let e,o,i,s,l,a;o=(e=el(t,!0,"fixed"===n)).top+t.clientTop,i=e.left+t.clientLeft,s=B(t)?er(t):u(1),l=t.clientWidth*s.x,a=t.clientHeight*s.y,r={width:l,height:a,x:i*s.x,y:o*s.y}}else{let n=es(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return P(r)}function ef(e){return"static"===X(e).position}function ep(e,t){if(!B(e)||"fixed"===X(e).position)return null;if(t)return t(e);let n=e.offsetParent;return A(e)===n&&(n=n.ownerDocument.body),n}function em(e,t){var n;let o=k(e);if(z(e))return o;if(!B(e)){let t=Z(e);for(;t&&!Y(t);){if(N(t)&&!ef(t))return t;t=Z(t)}return o}let r=ep(e,t);for(;r&&(n=r,V.has(D(n)))&&ef(r);)r=ep(r,t);return r&&Y(r)&&ef(r)&&!U(r)?o:r||function(e){let t=Z(e);for(;B(t)&&!Y(t);){if(U(t))return t;if(z(t))break;t=Z(t)}return null}(e)||o}let ev=async function(e){let t=this.getOffsetParent||em,n=this.getDimensions,o=await n(e.floating);return{reference:function(e,t,n){let o=B(t),r=A(t),i="fixed"===n,s=el(e,!0,i,t),l={scrollLeft:0,scrollTop:0},a=u(0);if(o||!o&&!i)if(("body"!==D(t)||_(r))&&(l=J(t)),o){let e=el(t,!0,i,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else r&&(a.x=ea(r));i&&!o&&r&&(a.x=ea(r));let c=!r||o||i?u(0):eu(r,l);return{x:s.left+l.scrollLeft-a.x-c.x,y:s.top+l.scrollTop-a.y-c.y,width:s.width,height:s.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},eh={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e,i="fixed"===r,s=A(o),l=!!t&&z(t.floating);if(o===s||l&&i)return n;let a={scrollLeft:0,scrollTop:0},c=u(1),d=u(0),f=B(o);if((f||!f&&!i)&&(("body"!==D(o)||_(s))&&(a=J(o)),B(o))){let e=el(o);c=er(o),d.x=e.x+o.clientLeft,d.y=e.y+o.clientTop}let p=!s||f||i?u(0):eu(s,a);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+d.x+p.x,y:n.y*c.y-a.scrollTop*c.y+d.y+p.y}},getDocumentElement:A,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e,l=[..."clippingAncestors"===n?z(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let o=ee(e,[],!1).filter(e=>N(e)&&"body"!==D(e)),r=null,i="fixed"===X(e).position,s=i?Z(e):e;for(;N(s)&&!Y(s);){let t=X(s),n=U(s);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&!!r&&ec.has(r.position)||_(s)&&!n&&function e(t,n){let o=Z(t);return!(o===n||!N(o)||Y(o))&&("fixed"===X(o).position||e(o,n))}(e,s))?o=o.filter(e=>e!==s):r=t,s=Z(s)}return t.set(e,o),o}(t,this._c):[].concat(n),o],a=l[0],u=l.reduce((e,n)=>{let o=ed(t,n,r);return e.top=s(o.top,e.top),e.right=i(o.right,e.right),e.bottom=i(o.bottom,e.bottom),e.left=s(o.left,e.left),e},ed(t,a,r));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},getOffsetParent:em,getElementRects:ev,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=en(e);return{width:t,height:n}},getScale:er,isElement:N,isRTL:function(e){return"rtl"===X(e).direction}};function eb(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function eg(e,t,n,o){let r;void 0===o&&(o={});let{ancestorScroll:l=!0,ancestorResize:u=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:d="function"==typeof IntersectionObserver,animationFrame:f=!1}=o,p=eo(e),m=l||u?[...p?ee(p):[],...ee(t)]:[];
1m.forEach(e=>{l&&e.addEventListener("scroll",n,{passive:!0}),u&&e.addEventListener("resize",n)});let v=p&&d?function(e,t){let n,o=null,r=A(e);function l(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return!function u(c,d){void 0===c&&(c=!1),void 0===d&&(d=1),l();let f=e.getBoundingClientRect(),{left:p,top:m,width:v,height:h}=f;if(c||t(),!v||!h)return;let b={rootMargin:-a(m)+"px "+-a(r.clientWidth-(p+v))+"px "+-a(r.clientHeight-(m+h))+"px "+-a(p)+"px",threshold:s(0,i(1,d))||1},g=!0;function y(t){let o=t[0].intersectionRatio;if(o!==d){if(!g)return u();o?u(!1,o):n=setTimeout(()=>{u(!1,1e-7)},1e3)}1!==o||eb(f,e.getBoundingClientRect())||u(),g=!1}try{o=new IntersectionObserver(y,{...b,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(y,b)}o.observe(e)}(!0),l}(p,n):null,h=-1,b=null;c&&(b=new ResizeObserver(e=>{let[o]=e;o&&o.target===p&&b&&(b.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;null==(e=b)||e.observe(t)})),n()}),p&&!f&&b.observe(p),b.observe(t));let g=f?el(e):null;return f&&function t(){let o=el(e);g&&!eb(g,o)&&n(),g=o,r=requestAnimationFrame(t)}(),n(),()=>{var e;m.forEach(e=>{l&&e.removeEventListener("scroll",n),u&&e.removeEventListener("resize",n)}),null==v||v(),null==(e=b)||e.disconnect(),b=null,f&&cancelAnimationFrame(r)}}var ey=e.i(74080),eE="u">typeof document?t.useLayoutEffect:function(){};function eS(e,t){let n,o,r;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(o=n;0!=o--;)if(!eS(e[o],t[o]))return!1;return!0}if((n=(r=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(o=n;0!=o--;)if(!({}).hasOwnProperty.call(t,r[o]))return!1;for(o=n;0!=o--;){let n=r[o];if(("_owner"!==n||!e.$$typeof)&&!eS(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function ex(e){return"u"<typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function eR(e,t){let n=ex(e);return Math.round(t*n)/n}function ew(e){let n=t.useRef(e);return eE(()=>{n.current=e}),n}let eP=(e,t)=>{var n;return{...(void 0===(n=e)&&(n=0),{name:"offset",options:n,async fn(e){var t,o;let{x:r,y:i,placement:s,middlewareData:l}=e,a=await C(e,n);return s===(null==(t=l.offset)?void 0:t.placement)&&null!=(o=l.arrow)&&o.alignmentOffset?{}:{x:r+a.x,y:i+a.y,data:{...a,placement:s}}}}),options:[e,t]}};e.i(47167);var eI="u"<typeof Element;eI||Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,eI||Element.prototype.getRootNode;let eF={...t},eO=eF.useInsertionEffect||(e=>e());function eT(e){let n=t.useRef(()=>{});return eO(()=>{n.current=e}),t.useCallback(function(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];return null==n.current?void 0:n.current(...t)},[])}var eC="u">typeof document?t.useLayoutEffect:t.useEffect;let eM=!1,eD=0,ek=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+eD++,eA=eF.useId||function(){let[e,n]=t.useState(()=>eM?ek():void 0);return eC(()=>{null==e&&n(ek())},[]),t.useEffect(()=>{eM=!0},[]),e},eL=t.createContext(null),eN=t.createContext(null),eB="active",eH="selected";function eW(e,t,n){let o=new Map,r="item"===n,i=e;if(r&&e){let{[eB]:t,[eH]:n,...o}=e;i=o}return{..."floating"===n&&{tabIndex:-1,"data-floating-ui-focusable":""},...i,...t.map(t=>{let o=t?t[n]:null;return"function"==typeof o?e?o(e):null:o}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,i]=t;if(!(r&&[eB,eH].includes(n)))if(0===n.indexOf("on")){if(o.has(n)||o.set(n,[]),"function"==typeof i){var s;null==(s=o.get(n))||s.push(i),e[n]=function(){for(var e,t=arguments.length,r=Array(t),i=0;i<t;i++)r[i]=arguments[i];return null==(e=o.get(n))?void 0:e.map(e=>e(...r)).find(e=>void 0!==e)}}}else e[n]=i}),e),{})}}function e_(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}var eV=e.i(46725),eK=e.i(14189),ez=e.i(13581);let e$=(0,t.createContext)({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});e$.displayName="FloatingContext";let ej=(0,t.createContext)(null);function eG(e,n,r){let i=(0,eV.useDisposables)(),s=(0,eK.useEvent)((e,t)=>{if(null==e)return[r,null];if("number"==typeof e)return[e,null];if("string"==typeof e){if(!t)return[r,null];let n=eU(e,t);return[n,o=>{let r=function e(t){let n=/var\((.*)\)/.exec(t);if(n){let t=n[1].indexOf(",");if(-1===t)return[n[1]];
1let o=n[1].slice(0,t).trim(),r=n[1].slice(t+1).trim();return r?[o,...e(r)]:[o]}return[]}(e);{let s=r.map(e=>window.getComputedStyle(t).getPropertyValue(e));i.requestAnimationFrame(function l(){i.nextFrame(l);let a=!1;for(let[e,n]of r.entries()){let o=window.getComputedStyle(t).getPropertyValue(n);if(s[e]!==o){s[e]=o,a=!0;break}}if(!a)return;let u=eU(e,t);n!==u&&(o(u),n=u)})}return i.dispose}]}return[r,null]}),l=(0,t.useMemo)(()=>s(e,n)[0],[e,n]),[a=l,u]=(0,t.useState)();return(0,o.useIsoMorphicEffect)(()=>{let[t,o]=s(e,n);if(u(t),o)return o(u)},[e,n]),a}function eU(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 o=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),o}ej.displayName="PlacementContext",e.s(["FloatingProvider",0,function({children:e,enabled:n=!0}){var r,a,u,c,d,b,P,I,T,C,M,D,k,A,L,B;let H,W,_,V,K,z,$,j,G,U,[q,Q]=(0,t.useState)(null),[Y,X]=(0,t.useState)(0),J=(0,t.useRef)(null),[Z,ee]=(0,t.useState)(null);M=Z,(0,o.useIsoMorphicEffect)(()=>{if(!M)return;let e=new MutationObserver(()=>{let e=window.getComputedStyle(M).maxHeight,t=parseFloat(e);if(isNaN(t))return;let n=parseInt(e);isNaN(n)||t!==n&&(M.style.maxHeight=`${Math.ceil(t)}px`)});return e.observe(M,{attributes:!0,attributeFilter:["style"]}),()=>{e.disconnect()}},[M]);let et=n&&null!==q&&null!==Z,{to:en="bottom",gap:eo=0,offset:er=0,padding:ei=0,inner:es}=(D=q,k=Z,H=eG(null!=(A=null==D?void 0:D.gap)?A:"var(--anchor-gap, 0)",k),W=eG(null!=(L=null==D?void 0:D.offset)?L:"var(--anchor-offset, 0)",k),_=eG(null!=(B=null==D?void 0:D.padding)?B:"var(--anchor-padding, 0)",k),{...D,gap:H,offset:W,padding:_}),[el,ea="center"]=en.split(" ");(0,o.useIsoMorphicEffect)(()=>{et&&X(0)},[et]);let{refs:eu,floatingStyles:ec,context:ed}=function(e){void 0===e&&(e={});let{nodeId:n}=e,o=function(e){var n;let{open:o=!1,onOpenChange:r,elements:i}=e,s=eA(),l=t.useRef({}),[a]=t.useState(()=>{let e;return e=new Map,{emit(t,n){var o;null==(o=e.get(t))||o.forEach(e=>e(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var o;e.set(t,(null==(o=e.get(t))?void 0:o.filter(e=>e!==n))||[])}}}),u=null!=((null==(n=t.useContext(eL))?void 0:n.id)||null),[c,d]=t.useState(i.reference),f=eT((e,t,n)=>{l.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:n,nested:u}),null==r||r(e,t,n)}),p=t.useMemo(()=>({setPositionReference:d}),[]),m=t.useMemo(()=>({reference:c||i.reference||null,floating:i.floating||null,domReference:i.reference}),[c,i.reference,i.floating]);return t.useMemo(()=>({dataRef:l,open:o,onOpenChange:f,elements:m,events:a,floatingId:s,refs:p}),[o,f,m,a,s,p])}({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||o,i=r.elements,[s,l]=t.useState(null),[a,u]=t.useState(null),c=(null==i?void 0:i.domReference)||s,d=t.useRef(null),f=t.useContext(eN);eC(()=>{c&&(d.current=c)},[c]);let p=function(e){void 0===e&&(e={});let{placement:n="bottom",strategy:o="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:l}={},transform:a=!0,whileElementsMounted:u,open:c}=e,[d,f]=t.useState({x:0,y:0,strategy:o,placement:n,middlewareData:{},isPositioned:!1}),[p,m]=t.useState(r);eS(p,r)||m(r);let[v,h]=t.useState(null),[b,g]=t.useState(null),y=t.useCallback(e=>{e!==R.current&&(R.current=e,h(e))},[]),E=t.useCallback(e=>{e!==w.current&&(w.current=e,g(e))},[]),S=s||v,x=l||b,R=t.useRef(null),w=t.useRef(null),P=t.useRef(d),I=null!=u,F=ew(u),T=ew(i),C=ew(c),M=t.useCallback(()=>{var e,t;let r,i,s;if(!R.current||!w.current)return;let l={placement:n,strategy:o,middleware:p};T.current&&(l.platform=T.current),(e=R.current,t=w.current,r=new Map,s={...(i={platform:eh,...l}).platform,_c:r},O(e,t,{...i,platform:s})).then(e=>{let t={...e,isPositioned:!1!==C.current};D.current&&!eS(P.current,t)&&(P.current=t,ey.flushSync(()=>{f(t)}))})},[p,n,o,T,C]);eE(()=>{!1===c&&P.current.isPositioned&&(P.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[c]);let D=t.useRef(!1);eE(()=>(D.current=!0,()=>{D.current=!1}),[]),eE(()=>{if(S&&(R.current=S),x&&(w.current=x),S&&x){if(F.current)return F.current(S,x,M);M()}},[S,x,M,F,I]);let k=t.useMemo(()=>({reference:R,floating:w,setReference:y,setFloating:E}),[y,E]),A=t.useMemo(()=>({reference:S,floating:x}),[S,x]),L=t.useMemo(()=>{let e={position:o,left:0,top:0};if(!A.floating)return e;let t=eR(A.floating,d.x),n=eR(A.floating,d.y);return a?{...e,transform:"translate("+t+"px, "+n+"px)",...ex(A.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:t,top:n}},[o,a,A.floating,d.x,d.y]);return t.useMemo(()=>({...d,update:M,refs:k,elements:A,floatingStyles:L}),[d,M,k,A,L])}({...e,elements:{...i,...a&&{reference:a}}}),m=t.useCallback(e=>{let t=N(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;u(t),p.refs.setReference(t)},[p.refs]),v=t.useCallback(e=>{(N(e)||null===e)&&(d.current=e,l(e)),(N(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!N(e))&&p.refs.setReference(e)},[p.refs]),h=t.useMemo(()=>({...p.refs,setReference:v,setPositionReference:m,domReference:d}),[p.refs,v,m]),b=t.useMemo(()=>({...p.elements,domReference:c}),[p.elements,c]),g=t.useMemo(()=>({...p,...r,refs:h,elements:b,nodeId:n}),[p,h,b,n,r]);return eC(()=>{r.dataRef.current.floatingContext=g;let e=null==f?void 0:f.nodesRef.current.find(e=>e.id===n);e&&(e.context=g)}),t.useMemo(()=>({...p,context:g,refs:h,elements:b}),[p,h,b,g])}({open:et,placement:"selection"===el?"center"===ea?"bottom":`bottom-${ea}`:"center"===ea?`${el}`:`${el}-${ea}`,strategy:"absolute",transform:!1,middleware:[eP({mainAxis:"selection"===el?0:eo,crossAxis:er}),{...{name:"shift",options:u=r={padding:ei},async fn(e){let{x:t,y:n,placement:o,platform:r}=e,{mainAxis:l=!0,crossAxis:a=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...d}=f(u,e),m={x:t,y:n},h=await r.detectOverflow(e,d),b=g(p(o)),y=v(b),E=m[y],S=m[b];if(l){let e="y"===y?"top":"left",t="y"===y?"bottom":"right",n=E+h[e],o=E-h[t];E=s(n,i(E,o))}if(a){let e="y"===b?"top":"left",t="y"===b?"bottom":"right",n=S+h[e],o=S-h[t];S=s(n,i(S,o))}let x=c.fn({...e,[y]:E,[b]:S});return{...x,data:{x:x.x-t,y:x.y-n,enabled:{[y]:l,[b]:a}}}}},options:[r,a]},"selection"!==el&&{...{name:"flip",options:b=c={padding:ei},async fn(e){var t,n,o,r,i,s,l,a;let u,c,d,{placement:P,middlewareData:I,rects:F,initialPlacement:O,platform:T,elements:C}=e,{mainAxis:M=!0,crossAxis:D=!0,fallbackPlacements:k,fallbackStrategy:A="bestFit",fallbackAxisSideDirection:L="none",flipAlignment:N=!0,...B}=f(b,e);if(null!=(t=I.arrow)&&t.alignmentOffset)return{};let H=p(P),W=g(O),_=p(O)===O,V=await (null==T.isRTL?void 0:T.isRTL(C.floating)),K=k||(_||!N?[w(O)]:(u=w(O),[y(O),u,y(u)])),z="none"!==L;!k&&z&&K.push(...(c=m(O),d=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?S:E;return t?E:S;case"left":case"right":return t?x:R;default:return[]}}(p(O),"start"===L,V),c&&(d=d.map(e=>e+"-"+c),N&&(d=d.concat(d.map(y)))),d));let $=[O,...K],j=await T.detectOverflow(e,B),G=[],U=(null==(n=I.flip)?void 0:n.overflows)||[];
1if(M&&G.push(j[H]),D){let e,t,n,o,r=(s=P,l=F,void 0===(a=V)&&(a=!1),e=m(s),n=h(t=v(g(s))),o="x"===t?e===(a?"end":"start")?"right":"left":"start"===e?"bottom":"top",l.reference[n]>l.floating[n]&&(o=w(o)),[o,w(o)]);G.push(j[r[0]],j[r[1]])}if(U=[...U,{placement:P,overflows:G}],!G.every(e=>e<=0)){let e=((null==(o=I.flip)?void 0:o.index)||0)+1,t=$[e];if(t&&("alignment"!==D||W===g(t)||U.every(e=>g(e.placement)!==W||e.overflows[0]>0)))return{data:{index:e,overflows:U},reset:{placement:t}};let n=null==(r=U.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:r.placement;if(!n)switch(A){case"bestFit":{let e=null==(i=U.filter(e=>{if(z){let t=g(e.placement);return t===W||"y"===t}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])?void 0:i[0];e&&(n=e);break}case"initialPlacement":n=O}if(P!==n)return{reset:{placement:n}}}return{}}},options:[c,d]},"selection"===el&&es?{name:"inner",options:V={...es,padding:ei,overflowRef:J,offset:Y,minItemsVisible:4,referenceOverflowThreshold:ei,onF
1allbackChange(e){var t,n;if(!e)return;let o=ed.elements.floating;if(!o)return;let r=parseFloat(getComputedStyle(o).scrollPaddingBottom)||0,i=Math.min(4,o.childElementCount),s=0,l=0;for(let e of null!=(n=null==(t=ed.elements.floating)?void 0:t.childNodes)?n:[])if(ez.isHTMLElement(e)){let t=e.offsetTop,n=t+e.clientHeight+r,a=o.scrollTop,u=a+o.clientHeight;if(t>=a&&n<=u)i--;else{l=Math.max(0,Math.min(n,u)-Math.max(t,a)),s=e.clientHeight;break}}i>=1&&X(e=>{let t=s*i-l+r;return e>=t?e:t})}},async fn(e){let{listRef:t,overflowRef:n,onFallbackChange:o,offset:r=0,index:a=0,minItemsVisible:u=4,referenceOverflowThreshold:c=0,scrollRef:d,...p}=f(V,e),{rects:m,elements:{floating:v}}=e,h=t.current[a],b=(null==d?void 0:d.current)||v,g=v.clientTop||b.clientTop,y=0!==v.clientTop,E=0!==b.clientTop,S=v===b;if(!h)return{};let x={...e,...await eP(-h.offsetTop-v.clientTop-m.reference.height/2-h.offsetHeight/2-r).fn(e)},R=await F(e_(x,b.scrollHeight+g+v.clientTop),p),w=await F(x,{...p,elementContext:"reference"}),P=s(0,R.top),I=x.y+P,O=(b.scrollHeight>b.clientHeight?e=>e:l)(s(0,b.scrollHeight+(y&&S||E?2*g:0)-P-s(0,R.bottom)));if(b.style.maxHeight=O+"px",b.scrollTop=P,o){let e=b.offsetHeight<h.offsetHeight*i(u,t.current.length)-1||w.top>=-c||w.bottom>=-c;ey.flushSync(()=>o(e))}return n&&(n.current=await F(e_({...x,y:I},b.offsetHeight+g+v.clientTop),p)),{y:I}}}:null,{...{name:"size",options:T=P={padding:ei,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)`})}},async fn(e){var t,n;let o,r,{placement:l,rects:a,platform:u,elements:c}=e,{apply:d=()=>{},...v}=f(T,e),h=await u.detectOverflow(e,v),b=p(l),y=m(l),E="y"===g(l),{width:S,height:x}=a.floating;"top"===b||"bottom"===b?(o=b,r=y===(await (null==u.isRTL?void 0:u.isRTL(c.floating))?"start":"end")?"left":"right"):(r=b,o="end"===y?"top":"bottom");let R=x-h.top-h.bottom,w=S-h.left-h.right,P=i(x-h[o],R),I=i(S-h[r],w),F=!e.middlewareData.shift,O=P,C=I;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(C=w),null!=(n=e.middlewareData.shift)&&n.enabled.y&&(O=R),F&&!y){let e=s(h.left,0),t=s(h.right,0),n=s(h.top,0),o=s(h.bottom,0);E?C=S-2*(0!==e||0!==t?e+t:s(h.left,h.right)):O=x-2*(0!==n||0!==o?n+o:s(h.top,h.bottom))}await d({...e,availableWidth:C,availableHeight:O});let M=await u.getDimensions(c.floating);return S!==M.width||x!==M.height?{reset:{rects:!0}}:{}}},options:[P,I]}].filter(Boolean),whileElementsMounted:eg}),[ef=el,ep=ea]=ed.placement.split("-");"selection"===el&&(ef="selection");let em=(0,t.useMemo)(()=>({anchor:[ef,ep].filter(Boolean).join(" ")}),[ef,ep]),{getReferenceProps:ev,getFloatingProps:eb}=(K=(C=[function(e,n){let{open:o,elements:r}=e,{enabled:i=!0,overflowRef:s,scrollRef:l,onChange:a}=n,u=eT(a),c=t.useRef(!1),d=t.useRef(null),f=t.useRef(null);t.useEffect(()=>{if(!i)return;function e(e){if(e.ctrlKey||!t||null==s.current)return;let n=e.deltaY,o=s.current.top>=-.5,r=s.current.bottom>=-.5,i=t.scrollHeight-t.clientHeight,l=n<0?-1:1,a=n<0?"max":"min";if(!(t.scrollHeight<=t.clientHeight))if(!o&&n>0||!r&&n<0)e.preventDefault(),ey.flushSync(()=>{u(e=>e+Math[a](n,i*l))});else{let e;/firefox/i.test((e=navigator.userAgentData)&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent)&&(t.scrollTop+=n)}}let t=(null==l?void 0:l.current)||r.floating;if(o&&t)return t.addEventListener("wheel",e),requestAnimationFrame(()=>{d.current=t.scrollTop,null!=s.current&&(f.current={...s.current})}),()=>{d.current=null,f.current=null,t.removeEventListener("wheel",e)}},[i,o,r.floating,s,l,u]);let p=t.useMemo(()=>({onKeyDown(){c.current=!0},onWheel(){c.current=!1},onPointerMove(){c.current=!1},onScroll(){let e=(null==l?void 0:l.current)||r.floating;if(s.current&&e&&c.current){if(null!==d.current){let t=e.scrollTop-d.current;(s.current.bottom<-.5&&t<-1||s.current.top<-.5&&t>1)&&ey.flushSync(()=>u(e=>e+t))}requestAnimationFrame(()=>{d.current=e.scrollTop})}}}),[r.floating,u,s,l]);return t.useMemo(()=>i?{floating:p}:{},[i,p])}
1(ed,{overflowRef:J,onChange:X})]).map(e=>null==e?void 0:e.reference),z=C.map(e=>null==e?void 0:e.floating),$=C.map(e=>null==e?void 0:e.item),j=t.useCallback(e=>eW(e,C,"reference"),K),G=t.useCallback(e=>eW(e,C,"floating"),z),U=t.useCallback(e=>eW(e,C,"item"),$),t.useMemo(()=>({getReferenceProps:j,getFloatingProps:G,getItemProps:U}),[j,G,U])),eI=(0,eK.useEvent)(e=>{ee(e),eu.setFloating(e)});return t.createElement(ej.Provider,{value:Q},t.createElement(e$.Provider,{value:{setFloating:eI,setReference:eu.setReference,styles:ec,getReferenceProps:ev,getFloatingProps:eb,slot:em}},e))},"useFloatingPanel",0,function(e=null){!1===e&&(e=null),"string"==typeof e&&(e={to:e});let n=(0,t.useContext)(ej),r=(0,t.useMemo)(()=>e,[JSON.stringify(e,(e,t)=>{var n;return null!=(n=null==t?void 0:t.outerHTML)?n:t})]);(0,o.useIsoMorphicEffect)(()=>{null==n||n(null!=r?r:null)},[n,r]);let i=(0,t.useContext)(e$);return(0,t.useMemo)(()=>[i.setFloating,e?i.styles:{}],[i.setFloating,e,i.styles])},"useFloatingPanelProps",0,function(){let{getFloatingProps:e,slot:n}=(0,t.useContext)(e$);return(0,t.useCallback)((...t)=>Object.assign({},e(...t),{"data-anchor":n.anchor}),[e,n])},"useFloatingReference",0,function(){return(0,t.useContext)(e$).setReference},"useFloatingReferenceProps",0,function(){return(0,t.useContext)(e$).getReferenceProps},"useResolvedAnchor",0,function(e){return(0,t.useMemo)(()=>e?"string"==typeof e?{to:e}:e:null,[e])}],19751)},4016,e=>{"use strict";var t=e.i(71645);let n=t.default.forwardRef(function({children:e,freeze:n},r){let i=o(n,e);return(0,t.isValidElement)(i)?(0,t.cloneElement)(i,{ref:r}):t.default.createElement(t.default.Fragment,null,i)});function o(e,n){let[o,r]=(0,t.useState)(n);return e||o===n||r(n),e?o:n}e.s(["Frozen",0,n,"useFrozenData",0,o])},33633,3935,e=>{"use strict";var t=e.i(71645),n=e.i(14189);e.s(["useWatch",0,function(e,o){let r=(0,t.useRef)([]),i=(0,n.useEvent)(e);(0,t.useEffect)(()=>{let e=[...r.current];for(let[t,n]of o.entries())if(r.current[t]!==n){let t=i(o,e);return r.current=o,t}},[i,...o])}],33633);var o=e.i(13581),r=e.i(52265);let i=[];function s(){"loading"!==document.readyState&&((()=>{function e(e){if(!o.isHTMLorSVGElement(e.target)||e.target===document.body||i[0]===e.target)return;let t=e.target;t=t.closest(r.focusableSelector),i.unshift(null!=t?t:e.target),(i=i.filter(e=>null!=e&&e.isConnected)).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})})(),document.removeEventListener("DOMContentLoaded",s))}"u">typeof window&&"u">typeof document&&(document.addEventListener("DOMContentLoaded",s),s()),e.s(["history",()=>i],3935)},88374,63516,57138,71616,65659,67310,e=>{"use strict";let t,n,o;var r=e.i(71645),i=((t=i||{})[t.Left=0]="Left",t[t.Right=2]="Right",t);e.s(["MouseButton",0,i],63516);var s=e.i(33538),l=e.i(14189);e.s(["useHandleToggle",0,function(e){let t=(0,r.useRef)(null);return{onPointerDown:(0,l.useEvent)(n=>{t.current=n.pointerType,(0,s.isDisabledReactIssue7711)(n.currentTarget)||"mouse"!==n.pointerType||n.button!==i.Left||(n.preventDefault(),e(n))}),onClick:(0,l.useEvent)(n=>{"mouse"!==t.current&&((0,s.isDisabledReactIssue7711)(n.currentTarget)||e(n))})}}],88374);var a=e.i(13581),u=e.i(22357),c=((n=c||{})[n.Ignore=0]="Ignore",n[n.Select=1]="Select",n[n.Close=2]="Close",n);function d(e){return[e.screenX,e.screenY]}e.s(["Action",0,{Ignore:{kind:0},Select:e=>({kind:1,target:e}),Close:{kind:2}},"useQuickRelease",0,function(e,{trigger:t,action:n,close:o,select:i}){let s=(0,r.useRef)(null),l=(0,r.useRef)(null),c=(0,r.useRef)(null);(0,u.useDocumentEvent)(e&&null!==t,"pointerdown",e=>{a.isNode(null==e?void 0:e.target)&&null!=t&&t.contains(e.target)&&(l.current=e.x,c.current=e.y,s.current=e.timeStamp)}),(0,u.useDocumentEvent)(e&&null!==t,"pointerup",e=>{var t,r;let u=s.current;if(null===u||(s.current=null,!a.isHTMLorSVGElement(e.target))||5>Math.abs(e.x-(null!=(t=l.current)?t:e.x))&&5>
1Math.abs(e.y-(null!=(r=c.current)?r:e.y)))return;let d=n(e);switch(d.kind){case 0:return;case 1:e.timeStamp-u>200&&(i(d.target),o());break;case 2:o()}},{capture:!0})}],57138),e.s(["useTrackedPointer",0,function(){let e=(0,r.useRef)([-1,-1]);return{wasMoved(t){let n=d(t);return(e.current[0]!==n[0]||e.current[1]!==n[1])&&(e.current=n,!0)},update(t){e.current=d(t)}}}],71616);var f=((o=f||{})[o.First=0]="First",o[o.Previous=1]="Previous",o[o.Next=2]="Next",o[o.Last=3]="Last",o[o.Specific=4]="Specific",o[o.Nothing=5]="Nothing",o);e.s(["Focus",0,f,"calculateActiveIndex",0,function(e,t){let n=t.resolveItems();if(n.length<=0)return null;let o=t.resolveActiveIndex(),r=null!=o?o:-1;switch(e.focus){case 0:for(let e=0;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return o;case 1:-1===r&&(r=n.length);for(let e=r-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return o;case 2:for(let e=r+1;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return o;case 3:for(let e=n.length-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return o;case 4:for(let o=0;o<n.length;++o)if(t.resolveId(n[o],o,n)===e.id)return o;return o;case 5:return null;default:throw Error("Unexpected object: "+e)}}],65659);var p=e.i(44508);function m(e){let t=e.getBoundingClientRect();return`${t.x},${t.y}`}e.s(["ElementPositionState",0,{Idle:{kind:"Idle"},Tracked:e=>({kind:"Tracked",position:e}),Moved:{kind:"Moved"}},"computeVisualPosition",0,m,"detectMovement",0,function(e,t,n){let o=(0,p.disposables)();if("Tracked"===t.kind){let r=function(){i!==m(e)&&(o.dispose(),n())},{position:i}=t,s=new ResizeObserver(r);s.observe(e),o.add(()=>s.disconnect()),o.addEventListener(window,"scroll",r,{passive:!0}),o.addEventListener(window,"resize",r)}return()=>o.dispose()}],67310)},62630,e=>{"use strict";let t,n,o,r;var i=e.i(29427),s=e.i(71330),l=e.i(71645),a=e.i(74080);function u(e,t,n){let o,r=n.initialDeps??[],i=!0;function s(){var s,l,a;let u,c;n.key&&(null==(s=n.debug)?void 0:s.call(n))&&(u=Date.now());let d=e();if(!(d.length!==r.length||d.some((e,t)=>r[t]!==e)))return o;if(r=d,n.key&&(null==(l=n.debug)?void 0:l.call(n))&&(c=Date.now()),o=t(...d),n.key&&(null==(a=n.debug)?void 0:a.call(n))){let e=Math.round((Date.now()-u)*100)/100,t=Math.round((Date.now()-c)*100)/100,o=t/16,r=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${r(t,5)} /${r(e,5)} ms`,`
2            font-size: .6rem;
3            font-weight: bold;
4            color: hsl(${Math.max(0,Math.min(120-120*o,120))}deg 100% 31%);`,null==n?void 0:n.key)}return(null==n?void 0:n.onChange)&&!(i&&n.skipInitialOnChange)&&n.onChange(o),i=!1,o}return s.updateDeps=e=>{r=e},s}function c(e,t){if(void 0!==e)return e;throw Error(`Unexpected undefined${t?`: ${t}`:""}`)}e.i(47167);let d=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},f=e=>e,p=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),o=[];for(let e=t;e<=n;e++)o.push(e);return o},m=(e,t)=>{let n=e.scrollElement;if(!n)return;let o=e.targetWindow;if(!o)return;let r=e=>{let{width:n,height:o}=e;t({width:Math.round(n),height:Math.round(o)})};if(r(d(n)),!o.ResizeObserver)return()=>{};let i=new o.ResizeObserver(t=>{let o=()=>{let e=t[0];if(null==e?void 0:e.borderBoxSize){let t=e.borderBoxSize[0];if(t)return void r({width:t.inlineSize,height:t.blockSize})}r(d(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},v={passive:!0},h="u"<typeof window||"onscrollend"in window,b=(e,t)=>{var n,o;let r,i=e.scrollElement;if(!i)return;let s=e.targetWindow;if(!s)return;let l=0,a=e.options.useScrollendEvent&&h?()=>void 0:(n=()=>{t(l,!1)},o=e.options.isScrollingResetDelay,function(...e){s.clearTimeout(r),r=s.setTimeout(()=>n.apply(this,e),o)}),u=n=>()=>{let{horizontal:o,isRtl:r}=e.options;l=o?i.scrollLeft*(r&&-1||1):i.scrollTop,a(),t(l,n)},c=u(!0),d=u(!1);i.addEventListener("scroll",c,v);let f=e.options.useScrollendEvent&&h;return f&&i.addEventListener("scrollend",d,v),()=>{i.removeEventListener("scroll",c),f&&i.removeEventListener("scrollend",d)}},g=(e,t,n)=>{if(null==t?void 0: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"]}
vendor: 3,053 bytes, line 4
4,y=(e,{adjustments:t=0,behavior:n},o)=>{var r,i;null==(i=null==(r=o.scrollElement)?void 0:r.scrollTo)||i.call(r,{[o.options.horizontal?"left":"top"]:e+t,behavior:n})};class E{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=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.observer=(()=>{let e=null,t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{this._measureElement(e.target,e)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}):null);return{disconnect:()=>{var n;null==(n=t())||n.disconnect(),e=null},observe:e=>{var n;return null==(n=t())?void 0:n.observe(e,{box:"border-box"})},unobserve:e=>{var n;return null==(n=t())?void 0:n.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,n])=>{void 0===n&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:f,rangeExtractor:p,onChange:()=>{},measureElement:g,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;null==(n=(t=this.options).onChange)||n.call(t,this,e)},this.maybeNotify=u(()=>(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.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;let t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.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.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}}
4,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??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{let n=new Map,o=new Map;for(let r=t-1;r>=0;r--){let t=e[r];if(n.has(t.lane))continue;let i=o.get(t.lane);if(null==i||t.end>i.end?o.set(t.lane,t):t.end<i.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=u(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(e,t,n,o,r,i)=>(void 0!==this.prevLanes&&this.prevLanes!==i&&(this.lanesChangedFlag=!0),this.prevLanes=i,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:o,enabled:r,lanes:i}),{key:!1}),this.getMeasurements=u(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:n,getItemKey:o,enabled:r,lanes:i},s)=>{if(!r)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=[]),0!==this.measurementsCache.length||this.lanesSettling||(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let l=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1);let a=this.measurementsCache.slice(0,l),u=Array(i).fill(void 0);for(let e=0;e<l;e++){let t=a[e];t&&(u[t.lane]=e)}for(let r=l;r<e;r++){let e,i,l=o(r),c=this.laneAssignments.get(r);if(void 0!==c&&this.options.lanes>1){let o=u[e=c],r=void 0!==o?a[o]:void 0;i=r?r.end+this.options.gap:t+n}else{let o=1===this.options.lanes?a[r-1]:this.getFurthestMeasurement(a,r);i=o?o.end+this.options.gap:t+n,e=o?o.lane:r%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(r,e)}let d=s.get(l),f="number"==typeof d?d:this.options.estimateSize(r),p=i+f;a[r]={index:r,start:i,size:f,end:p,key:l,lane:e},u[e]=r}return this.measurementsCache=a,a},{key:!1,debug:()=>this.options.debug}),this.calculateRange=u(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,o)=>this.range=e.length>0&&t>0?function({measurements:e,outerSize:t,scrollOffset:n,lanes:o}){let r=e.length-1;if(e.length<=o)return{startIndex:0,endIndex:r};let i=S(0,r,t=>e[t].start,n),s=i;if(1===o)for(;s<r&&e[s].end<n+t;)s++;else if(o>1){let l=Array(o).fill(0);for(;s<r&&l.some(e=>e<n+t);){let t=e[s];l[t.lane]=t.end,s++}let a=Array(o).fill(n+t);for(;i>=0&&a.some(e=>e>=n);){let t=e[i];a[t.lane]=t.start,i--}i=Math.max(0,i-i%o),s=Math.min(r,s+(o-1-s%o))}return{startIndex:i,endIndex:s}}({measurements:e,outerSize:t,scrollOffset:n,lanes:o}):null,{key:!1,debug:()=>this.options.debug}
4),this.getVirtualIndexes=u(()=>{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,o,r)=>null===o||null===r?[]:e({startIndex:o,endIndex:r,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._measureElement=(e,t)=>{let n=this.indexFromElement(e),o=this.measurementsCache[n];if(!o)return;let r=o.key,i=this.elementsCache.get(r);i!==e&&(i&&this.observer.unobserve(i),this.observer.observe(e),this.elementsCache.set(r,e)),e.isConnected&&this.resizeItem(n,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{let n=this.measurementsCache[e];if(!n)return;let o=t-(this.itemSizeCache.get(n.key)??n.size);0!==o&&((void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(n,o,this):n.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,t)),this.notify(!1))},this.measureElement=e=>{e?this._measureElement(e,void 0):this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))})},this.getVirtualItems=u(()=>
4[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let o=0,r=e.length;o<r;o++){let r=t[e[o]];n.push(r)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(0!==t.length)return c(t[S(0,t.length-1,e=>c(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 o=this.getSize(),r=this.getScrollOffset();return"auto"===t&&(t=e>=r+o?"end":"start"),"center"===t?e+=(n-o)/2:"end"===t&&(e-=o),Math.max(Math.min(this.getMaxScrollOffset(),e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.measurementsCache[e];if(!n)return;let o=this.getSize(),r=this.getScrollOffset();if("auto"===t)if(n.end>=r+o-this.options.scrollPaddingEnd)t="end";else{if(!(n.start<=r+this.options.scrollPaddingStart))return[r,t];t="start"}if("end"===t&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let i="end"===t?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,t,n.size),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(e,{align:t="start",behavior:n}={})=>{"smooth"===n&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:n})},this.scrollToIndex=(e,{align:t="auto",behavior:n}={})=>{"smooth"===n&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),e=Math.max(0,Math.min(e,this.options.count-1)),this.currentScrollToIndex=e;let o=0,r=t=>{if(!this.targetWindow)return;let o=this.getOffsetForIndex(e,t);if(!o)return void console.warn("Failed to get offset for index:",e);let[r,s]=o;this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.targetWindow.requestAnimationFrame(()=>{let t=()=>{if(this.currentScrollToIndex!==e)return;let t=this.getScrollOffset(),n=this.getOffsetForIndex(e,s);n?1.01>Math.abs(n[0]-t)||i(s):console.warn("Failed to get offset for index:",e)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(t):t()})},i=t=>{this.targetWindow&&this.currentScrollToIndex===e&&(++o<10?this.targetWindow.requestAnimationFrame(()=>r(t)):console.warn(`Failed to scroll to index ${e} after 10 attempts.`))};r(t)},this.scrollBy=(e,{behavior:t}={})=>{"smooth"===t&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adju
4stments:void 0,behavior:t})},this.getTotalSize=()=>{var e;let t,n=this.getMeasurements();if(0===n.length)t=this.options.paddingStart;else if(1===this.options.lanes)t=(null==(e=n[n.length-1])?void 0:e.end)??0;else{let e=Array(this.options.lanes).fill(null),o=n.length-1;for(;o>=0&&e.some(e=>null===e);){let t=n[o];null===e[t.lane]&&(e[t.lane]=t.end),o--}t=Math.max(...e.filter(e=>null!==e))}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)}}let S=(e,t,n,o)=>{for(;e<=t;){let r=(e+t)/2|0,i=n(r);if(i<o)e=r+1;else{if(!(i>o))return r;t=r-1}}return e>0?e-1:0},x="u">typeof document?l.useLayoutEffect:l.useEffect;var R=e.i(94487),w=e.i(36289),P=e.i(3269),I=e.i(14520),F=e.i(46725),O=e.i(92704),T=e.i(14189),C=e.i(88374),M=e.i(84653),D=e.i(35696),k=e.i(41444),A=e.i(77891),L=e.i(52744),N=e.i(5083),B=e.i(57138),H=e.i(13581),W=e.i(2155),_=e.i(93456);function V(e){let t=(0,l.useRef)({value:"",selectionStart:null,selectionEnd:null});return(0,_.useEventListener)(e,"blur",e=>{let n=e.target;H.isHTMLInputElement(n)&&(t.current={value:n.value,selectionStart:n.selectionStart,selectionEnd:n.selectionEnd})}),(0,T.useEvent)(()=>{if(!(0,W.isActiveElement)(e)&&H.isHTMLInputElement(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:o}=t.current;null!==n&&null!==o&&e.setSelectionRange(n,o)}t.current={value:"",selectionStart:null,selectionEnd:null}}})}var K=e.i(44279),z=e.i(1852),$=e.i(55743),j=e.i(94316),G=e.i(71616),U=e.i(83733),q=e.i(40143),Q=e.i(33633),Y=e.i(1893),X=e.i(19751),J=e.i(40721),Z=e.i(4016),ee=e.i(42803),et=e.i(33137),en=e.i(41650),eo=e.i(40407),er=e.i(3935),ei=e.i(6
45659),es=e.i(44508),el=e.i(97701),ea=e.i(9507),eu=e.i(20),ec=e.i(35889),ed=e.i(98348),ef=e.i(22678),ep=e.i(63516),em=e.i(35307),ev=e.i(25720),eh=e.i(67310),eb=e.i(52265),eg=Object.defineProperty,ey=(e,t,n)=>{let o;return(o="symbol"!=typeof t?t+"":t)in e?eg(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n,n},eE=((t=eE||{})[t.Open=0]="Open",t[t.Closed=1]="Closed",t),eS=((n=eS||{})[n.Single=0]="Single",n[n.Multi=1]="Multi",n),ex=((o=ex||{})[o.Pointer=0]="Pointer",o[o.Focus=1]="Focus",o[o.Other=2]="Other",o),eR=((r=eR||{})[r.OpenCombobox=0]="OpenCombobox",r[r.CloseCombobox=1]="CloseCombobox",r[r.GoToOption=2]="GoToOption",r[r.SetTyping=3]="SetTyping",r[r.RegisterOption=4]="RegisterOption",r[r.UnregisterOption=5]="UnregisterOption",r[r.DefaultToFirstOption=6]="DefaultToFirstOption",r[r.SetActivationTrigger=7]="SetActivationTrigger",r[r.UpdateVirtualConfiguration=8]="UpdateVirtualConfiguration",r[r.SetInputElement=9]="SetInputElement",r[r.SetButtonElement=10]="SetButtonElement",r[r.SetOptionsElement=11]="SetOptionsElement",r[r.MarkInputAsMoved=12]="MarkInputAsMoved",r);function ew(e,t=e=>e){let n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,o=t(e.options.slice()),r=o.length>0&&null!==o[0].dataRef.current.order?o.sort((e,t)=>e.dataRef.current.order-t.dataRef.current.order):(0,eb.sortByDomNode)(o,e=>e.dataRef.current.domRef.current),i=n?r.indexOf(n):null;return -1===i&&(i=null),{options:r,activeOptionIndex:i}}let eP={1(e){var t;if(null!=(t=e.dataRef.current)&&t.disabled||1===e.comboboxState)return e;let n=e.inputElement?eh.ElementPositionState.Tracked((0,eh.computeVisualPosition)(e.inputElement)):e.inputPositionState;return{...e,activeOptionIndex:null,comboboxState:1,isTyping:!1,activationTrigger:2,inputPositionState:n,__demoMode:!1}},0(e){var t,n;if(null!=(t=e.dataRef.current)&&t.disabled||0===e.comboboxState)return e;if(null!=(n=e.dataRef.current)&&n.value){let t=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(-1!==t)return{...e,activeOptionIndex:t,comboboxState:0,__demoMode:!1,inputPositionState:eh.ElementPositionState.Idle}}return{...e,comboboxState:0,inputPositionState:eh.ElementPositionState.Idle,__demoMode:!1}},3:(e,t)=>e.isTyping===t.isTyping?e:{...e,isTyping:t.isTyping},2(e,t){var n,o,r,i;if(null!=(n=e.dataRef.current)&&n.disabled||e.optionsElement&&!(null!=(o=e.dataRef.current)&&o.optionsPropsRef.current.static)&&1===e.comboboxState)return e;if(e.virtual){let{options:n,disabled:o}=e.virtual,i=t.focus===ei.Focus.Specific?t.idx:(0,ei.calculateActiveIndex)(t,{resolveItems:()=>n,resolveActiveIndex:()=>{var t,r;return null!=(r=null!=(t=e.activeOptionIndex)?t:n.findIndex(e=>!o(e)))?r:null},resolveDisabled:o,resolveId(){throw Error("Function not implemented.")}}),s=null!=(r=t.trigger)?r:2;return e.activeOptionIndex===i&&e.activationTrigger===s?e:{...e,activeOptionIndex:i,activationTrigger:s,isTyping:!1,__demoMode:!1}}let s=ew(e);if(null===s.activeOptionIndex){let e=s.options.findIndex(e=>!e.dataRef.current.disabled);-1!==e&&(s.activeOptionIndex=e)}let l=t.focus===ei.Focus.Specific?t.idx:(0,ei.calculateActiveIndex)(t,{resolveItems:()=>s.options,resolveActiveIndex:()=>s.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled}),a=null!=(i=t.trigger)?i:2;return e.activeOptionIndex===l&&e.activationTrigger===a?e:{...e,...s,isTyping:!1,activeOptionIndex:l,activationTrigger:a,__demoMode:!1}},4:(e,t)=>{var n,o,r,i;if(null!=(n=e.dataRef.current)&&n.virtual)return{...e,options:[...e.options,t.payload]};let s=t.payload,l=ew(e,e=>(e.push(s),e));null===e.activeOptionIndex&&null!=(r=(o=e.dataRef.current).isSelected)&&r.call(o,t.payload.dataRef.current.value)&&(l.activeOptionIndex=l.options.indexOf(s));let a={...e,...l,activationTrigger:2};return null!=(i=e.dataRef.current)&&i.__demoMode&&void 0===e.dataRef.current.value&&(a.activeOptionIndex=0),a},5:(e,t)=>{var n;if(null!=(n=e.dataRef.current)&&n.virtual)return{...e,options:e.options.filter(e=>e.id!==t.id)};let o=ew(e,e=>{let n=e.findIndex(e=>e.id===t.id);return -1!==n&&e.splice(n,1),e});return{...e,...o,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)=>
4{var n,o;if(null===e.virtual)return{...e,virtual:{options:t.options,disabled:null!=(n=t.disabled)?n:()=>!1}};if(e.virtual.options===t.options&&e.virtual.disabled===t.disabled)return e;let r=e.activeOptionIndex;if(null!==e.activeOptionIndex){let n=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);r=-1!==n?n:null}return{...e,activeOptionIndex:r,virtual:{options:t.options,disabled:null!=(o=t.disabled)?o:()=>!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=>"Tracked"!==e.inputPositionState.kind?e:{...e,inputPositionState:eh.ElementPositionState.Moved}};class eI extends ev.Machine{constructor(e){super(e),ey(this,"actions",{onChange:e=>{let{onChange:t,compare:n,mode:o,value:r}=this.state.dataRef.current;return(0,el.match)(o,{0:()=>null==t?void 0:t(e),1:()=>{let o=r.slice(),i=o.findIndex(t=>n(t,e));return -1===i?o.push(e):o.splice(i,1),null==t?void 0:t(o)}})},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}),null==(t=(e=this.state.dataRef.current).onClose)||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(null!==e){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:ei.Focus.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})}}),ey(this,"selectors",{activeDescendantId:e=>{var t,n;let o=this.selectors.activeOptionIndex(e);if(null!==o)return e.virtual?null==(n=e.options.find(t=>!t.dataRef.current.disabled&&e.dataRef.current.compare(t.dataRef.current.value,e.virtual.options[o])))?void 0:n.id:null==(t=e.options[o])?void 0:t.id},activeOptionIndex:e=>{if(e.defaultToFirstOption&&null===e.activeOptionIndex&&(e.virtual?e.virtual.options.length>0:e.options.length>0)){if(e.virtual){let{options:t,disabled:n}=e.virtual,o=t.findIndex(e=>{var t;return!(null!=(t=null==n?void 0:n(e))&&t)});if(-1!==o)return o}let t=e.options.findIndex(e=>!e.dataRef.current.disabled);if(-1!==t)return t}return e.activeOptionIndex},activeOption:e=>{var t,n;let o=this.selectors.activeOptionIndex(e);return null===o?null:e.virtual?e.virtual.options[null!=o?o:0]:null!=(n=null==(t=e.options[o])?void 0:t.dataRef.current.value)?n:null},isActive:(e,t,n)=>{var o;let r=this.selectors.activeOptionIndex(e);return null!==r&&(e.virtual?r===e.dataRef.current.calculateIndex(t):(null==(o=e.options[r])?void 0:o.id)===n)},shouldScrollIntoView:(e,t,n)=>!(e.virtual||e.__demoMode||0!==e.comboboxState||0===e.activationTrigger||!this.selectors.isActive(e,t,n)),didInputMove:e=>"Moved"===e.inputPositionState.kind});{let e=this.state.id,t=en.stackMachines.get(null);this.disposables.add(t.on(en.ActionTypes.Push,n=>{t.selectors.isTop(n,e)||0!==this.state.comboboxState||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((0,eh.detectMovement)(t.inputElement,t.inputPositionState,()=>{this.send({type:12})})))})})}static new({id:e,virtual:t=null,__demoMode:n=!1}){var o;return new eI({id:e,dataRef:{current:{}},comboboxState:+!n,isTyping:!1,options:[],virtual:t?{options:t.options,disabled:null!=(o=t.disabled)?o:()=>!1}:null,activeOptionIndex:null,activationTrigger:2,inputElement:null,buttonElement:null,optionsElement:null,__demoMode:n,inputPositionState:eh.ElementPositionState.Idle})}reduce(e,t){return(0,el.match)(t.type,eP,e,t)}}var eF=e.i(26599);let eO=(0,l.createContext)(null);function eT(e){let t=(0,l.useContext)(eO);if(null===t){let t=Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,eC),t}return t}function eC({id:e,virtual:t=null,__demoMode:n=!1}){let o=(0,l.useMemo)(()=>eI.new({id:e,virtual:t,__demoMode:n}),[]);return(0,eF.useOnUnmount)(()=>o.dispose()),o}let eM=(0,l.createContext)(null);function eD(e){let t=(0,l.useContext)(eM);if(null===t){let t=Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,eD),t}return t}eM.displayName="ComboboxDataContext";let ek=(0,l.createContext)(null);function eA(e){let t=eT("VirtualProvider"),{options:n}=eD("VirtualProvider").virtual,o=(0,eo.useSlice)(t,e=>e.optionsElement),[r,i]=(0,l.useMemo)(()=>
4{if(!o)return[0,0];let e=window.getComputedStyle(o);return[parseFloat(e.paddingBlockStart||e.paddingTop),parseFloat(e.paddingBlockEnd||e.paddingBottom)]},[o]),s=function({useFlushSync:e=!0,...t}){let n=l.useReducer(()=>({}),{})[1],o={...t,onChange:(o,r)=>{var i;e&&r?(0,a.flushSync)(n):n(),null==(i=t.onChange)||i.call(t,o,r)}},[r]=l.useState(()=>new E(o));return r.setOptions(o),x(()=>r._didMount(),[]),x(()=>r._willUpdate()),r}({observeElementRect:m,observeElementOffset:b,scrollToFn:y,...{enabled:0!==n.length,scrollPaddingStart:r,scrollPaddingEnd:i,count:n.length,estimateSize:()=>40,getScrollElement:()=>t.state.optionsElement,overscan:12}}),[u,c]=(0,l.useState)(0);(0,D.useIsoMorphicEffect)(()=>{c(e=>e+1)},[n]);let d=s.getVirtualItems(),f=(0,eo.useSlice)(t,e=>e.activationTrigger===ex.Pointer),p=(0,eo.useSlice)(t,t.selectors.activeOptionIndex);return 0===d.length?null:l.default.createElement(ek.Provider,{value:s},l.default.createElement("div",{style:{position:"relative",width:"100%",height:`${s.getTotalSize()}px`},ref:e=>{e&&(f||null!==p&&n.length>p&&s.scrollToIndex(p))}},d.map(t=>{var o;return l.default.createElement(l.Fragment,{key:t.key},l.default.cloneElement(null==(o=e.children)?void 0:o.call(e,{...e.slot,option:n[t.index]}),{key:`${u}-${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"}}))})))}let eL=l.Fragment,eN=eu.RenderFeatures.RenderStrategy|eu.RenderFeatures.Static,eB=(0,eu.forwardRefWithAs)(function(e,t){let n=(0,l.useId)(),o=(0,Y.useDisabled)(),{value:r,defaultValue:i,onChange:s,form:a,name:u,by:c,invalid:d=!1,disabled:f=o||!1,onClose:p,__demoMode:m=!1,multiple:v=!1,immediate:h=!1,virtual:b=null,nullable:g,...y}=e,E=(0,I.useDefaultValue)(i),[S=v?[]:void 0,x]=(0,P.useControllable)(r,s,E),R=eC({id:n,virtual:b,__demoMode:m}),F=(0,l.useRef)({static:!1,hold:!1}),O=(0,w.useByComparator)(c),C=(0,T.useEvent)(e=>b?null===c?b.options.indexOf(e):b.options.findIndex(t=>O(t,e)):R.state.options.findIndex(t=>O(t.dataRef.current.value,e))),M=(0,l.useCallback)(e=>(0,el.match)(N.mode,{[eS.Multi]:()=>S.some(t=>O(t,e)),[eS.Single]:()=>O(S,e)}),[S]),k=(0,eo.useSlice)(R,e=>e.virtual),A=(0,T.useEvent)(()=>null==p?void 0:p()),N=(0,l.useMemo)(()=>({__demoMode:m,immediate:h,optionsPropsRef:F,value:S,defaultValue:E,disabled:f,invalid:d,mode:v?eS.Multi:eS.Single,virtual:b?k:null,onChange:x,isSelected:M,calculateIndex:C,compare:O,onClose:A}),[m,h,F,S,E,f,d,v,b,k,x,M,C,O,A]);(0,D.useIsoMorphicEffect)(()=>{var e;b&&R.send({type:eR.UpdateVirtualConfiguration,options:b.options,disabled:null!=(e=b.disabled)?e:null})},[b,null==b?void 0:b.options,null==b?void 0:b.disabled]),(0,D.useIsoMorphicEffect)(()=>{R.state.dataRef.current=N},[N]);let[B,H,W,_]=(0,eo.useSlice)(R,e=>[e.comboboxState,e.buttonElement,e.inputElement,e.optionsElement]),V=en.stackMachines.get(null),K=(0,eo.useSlice)(V,(0,l.useCallback)(e=>V.selectors.isTop(e,n),[V,n]));(0,L.useOutsideClick)(K,[H,W,_],()=>R.actions.closeCombobox());let z=(0,eo.useSlice)(R,R.selectors.activeOptionIndex),j=(0,eo.useSlice)(R,R.selectors.activeOption),G=(0,$.useSlot)({open:B===eE.Open,disabled:f,invalid:d,activeIndex:z,activeOption:j,value:S}),[U,q]=(0,ef.useLabels)(),Q=(0,l.useCallback)(()=>{if(void 0!==E)return null==x?void 0:x(E)},[x,E]),Z=(0,eu.useRender)();return l.default.createElement(q,{value:U,props:{htmlFor:null==W?void 0:W.id},slot:{open:B===eE.Open,disabled:f}},l.default.createElement(X.FloatingProvider,null,l.default.createElement(eM.Provider,{value:N},l.default.createElement(eO.Provider,{value:R},l.default.createElement(et.OpenClosedProvider,{value:(0,el.match)(B,{[eE.Open]:et.State.Open,[eE.Closed]:et.State.Closed})},null!=u&&l.default.createElement(J.FormFields,{disabled:f,data:null!=S?{[u]:S}:{},form:a,onReset:Q}),Z({ourProps:null===t?{}:{ref:t},theirProps:y,slot:G,defaultTag:eL,name:"Combobox"}))))))}),eH=(0,eu.forwardRefWithAs)(function(e,t){let n=eT("Combobox.Button"),o=eD("Combobox.Button"),[r,u]=(0,l.useState)(null),c=(0,j.useSyncRefs)(t,u,n.actions.setButtonElement),d=(0,l.useId)(),{id:f=`headlessui-combobox-button-${d}`,disabled:p=o.disabled||!1,autoFocus:m=!1,...v}=e,[h,b,g]=(0,eo.useSlice)(n,e=>[e.comboboxState,e.inputElement,e.optionsElement]),y=V(b),E=h===eE.Open;(0,B.useQuickRelease)(E,{trigger:r,action:(0,l.useCallback)(e=>{if(null!=r&&r.contains(e.target)||null!=b&&b.contains(e.target))return B.Action.Ignore;let t=e.target.closest('[role="option"]:not([data-disabled])');return H.isHTMLElement(t)?B.Action.Select(t):null!=g&&g.contains(e.target)?B.Action.Ignore:B.Action.Close},[r,b,g]),close:n.actions.closeCombobox,select:n.actions.selectActiveOption});let S=(0,T.useEvent)(e=>{switch(e.key){case ed.Keys.Space:case ed.Keys.Enter:e.preventDefault(),e.stopPropagation(),n.state.comboboxState===eE.Closed&&(0,a.flushSync)(()=>n.actions.openCombobox()),y();return;case ed.Keys.ArrowDown:e.preventDefault(),e.stopPropagation(),n.state.comboboxState===eE.Closed&&((0,a.flushSync)(()=>n.actions.openCombobox()),n.state.dataRef.current.value||n.actions.goToOption({focus:ei.Focus.First})),y();return;case ed.Keys.ArrowUp:e.preventDefault(),e.stopPropagation(),n.state.comboboxState===eE.Closed&&((0,a.flushSync)(()=>n.actions.openCombobox()),n.state.dataRef.current.value||n.actions.goToOption({focus:ei.Focus.Last})),y();return;case ed.Keys.Escape:if(n.state.comboboxState!==eE.Open)return;e.preventDefault(),n.state.optionsElement&&!o.optionsPropsRef.current.static&&e.stopPropagation(),(0,a.flushSync)(()=>n.actions.closeCombobox()),y();return;default:return}}),x=(0,C.useHandleToggle)(()=>{n.state.comboboxState===eE.Open?n.actions.closeCombobox():n.actions.openCombobox(),y()}),w=(0,ef.useLabelledBy)([f]),{isFocusVisible:P,focusProps:I}=(0,i.useFocusRing)({autoFocus:m}),{isHovered:F,hoverProps:O}=(0,s.useHover)({isDisabled:p}),{pressed:M,pressProps:D}=(0,R.useActivePress)({disabled:p}),k=(0,$.useSlot)({open:h===eE.Open,active:M||h===eE.Open,disabled:p,invalid:o.invalid,value:o.value,hover:F,focus:P}),A=(0,eu.mergeProps)({ref:c,id:f,type:(0,K.useResolveButtonType)(e,r),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":null==g?void 0:g.id,"aria-expanded":h===eE.Open,"aria-labelledby":w,disabled:p||void 0,autoFocus:m,onKeyDown:S},x,I,O,D);return(0,eu.useRender)()({ourProps:A,theirProps:v,slot:k,defaultTag:"button",name:"Combobox.Button"})}),eW=(0,eu.forwardRefWithAs)(function(e,t){var n,o;let r=eT("Combobox.Input"),u=eD("Combobox.Input"),c=(0,l.useId)(),d=(0,ee.useProvidedId)(),{id:f=d||`headlessui-combobox-input-${c}
4`,onChange:p,displayValue:m,disabled:v=u.disabled||!1,autoFocus:h=!1,type:b="text",...g}=e,y=(0,l.useRef)(null),E=(0,j.useSyncRefs)(y,t,(0,X.useFloatingReference)(),r.actions.setInputElement),[S,x]=(0,eo.useSlice)(r,e=>[e.comboboxState,e.isTyping]),R=(0,F.useDisposables)(),w=(0,T.useEvent)(()=>{r.actions.onChange(null),r.state.optionsElement&&(r.state.optionsElement.scrollTop=0),r.actions.goToOption({focus:ei.Focus.Nothing})}),P=(0,l.useMemo)(()=>{var e;return"function"==typeof m&&void 0!==u.value?null!=(e=m(u.value))?e:"":"string"==typeof u.value?u.value:""},[u.value,m]);(0,Q.useWatch)(([e,t],[n,o])=>{if(r.state.isTyping)return;let i=y.current;i&&((o===eE.Open&&t===eE.Closed||e!==n)&&(i.value=e),requestAnimationFrame(()=>{if(r.state.isTyping||!i||(0,W.isActiveElement)(i))return;let{selectionStart:e,selectionEnd:t}=i;0===Math.abs((null!=t?t:0)-(null!=e?e:0))&&0===e&&i.setSelectionRange(i.value.length,i.value.length)}))},[P,S,x]),(0,Q.useWatch)(([e],[t])=>{if(e===eE.Open&&t===eE.Closed){if(r.state.isTyping)return;let e=y.current;if(!e)return;let t=e.value,{selectionStart:n,selectionEnd:o,selectionDirection:i}=e;e.value="",e.value=t,null!==i?e.setSelectionRange(n,o,i):e.setSelectionRange(n,o)}},[S]);let I=(0,l.useRef)(!1),O=(0,T.useEvent)(()=>{I.current=!0}),C=(0,T.useEvent)(()=>{R.nextFrame(()=>{I.current=!1})}),M=(0,T.useEvent)(e=>{switch(r.actions.setIsTyping(!0),e.key){case ed.Keys.Enter:if(r.state.comboboxState!==eE.Open||I.current)return;if(e.preventDefault(),e.stopPropagation(),null===r.selectors.activeOptionIndex(r.state))return void r.actions.closeCombobox();r.actions.selectActiveOption(),u.mode===eS.Single&&r.actions.closeCombobox();break;case ed.Keys.ArrowDown:return e.preventDefault(),e.stopPropagation(),(0,el.match)(r.state.comboboxState,{[eE.Open]:()=>r.actions.goToOption({focus:ei.Focus.Next}),[eE.Closed]:()=>r.actions.openCombobox()});case ed.Keys.ArrowUp:return e.preventDefault(),e.stopPropagation(),(0,el.match)(r.state.comboboxState,{[eE.Open]:()=>r.actions.goToOption({focus:ei.Focus.Previous}),[eE.Closed]:()=>{(0,a.flushSync)(()=>r.actions.openCombobox()),u.value||r.actions.goToOption({focus:ei.Focus.Last})}});case ed.Keys.Home:if(r.state.comboboxState===eE.Closed||e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),r.actions.goToOption({focus:ei.Focus.First});case ed.Keys.PageUp:return e.preventDefault(),e.stopPropagation(),r.actions.goToOption({focus:ei.Focus.First});case ed.Keys.End:if(r.state.comboboxState===eE.Closed||e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),r.actions.goToOption({focus:ei.Focus.Last});case ed.Keys.PageDown:return e.preventDefault(),e.stopPropagation(),r.actions.goToOption({focus:ei.Focus.Last});case ed.Keys.Escape:return r.state.comboboxState!==eE.Open?void 0:(e.preventDefault(),r.state.optionsElement&&!u.optionsPropsRef.current.static&&e.stopPropagation(),u.mode===eS.Single&&null===u.value&&w(),r.actions.closeCombobox());case ed.Keys.Tab:if(r.actions.setIsTyping(!1),r.state.comboboxState!==eE.Open)return;u.mode===eS.Single&&r.state.activationTrigger!==ex.Focus&&r.actions.selectActiveOption(),r.actions.closeCombobox()}}),D=(0,T.useEvent)(e=>{null==p||p(e),u.mode===eS.Single&&""===e.target.value&&w(),r.actions.openCombobox()}),k=(0,T.useEvent)(e=>{var t,n,o;let i=null!=(t=e.relatedTarget)?t:er.history.find(t=>t!==e.currentTarget);if(!(null!=(n=r.state.optionsElement)&&n.contains(i))&&!(null!=(o=r.state.buttonElement)&&o.contains(i))&&r.state.comboboxState===eE.Open)return e.preventDefault(),u.mode===eS.Single&&null===u.value&&w(),r.actions.closeCombobox()}),A=(0,T.useEvent)(e=>{var t,n,o;let i=null!=(t=e.relatedTarget)?t:er.history.find(t=>t!==e.currentTarget);null!=(n=r.state.buttonElement)&&n.contains(i)||null!=(o=r.state.optionsElement)&&o.contains(i)||u.disabled||u.immediate&&r.state.comboboxState!==eE.Open&&R.microTask(()=>{(0,a.flushSync)(()=>r.actions.openCombobox()),r.actions.setActivationTrigger(ex.Focus)})}),L=(0,ef.useLabelledBy)(),N=(0,ec.useDescribedBy)(),{isFocused:B,focusProps:H}=(0,i.useFocusRing)({autoFocus:h}),{isHovered:_,hoverProps:V}=(0,s.useHover)({isDisabled:v}),K=(0,eo.useSlice)(r,e=>e.optionsElement),z=(0,$.useSlot)({open:S===eE.Open,disabled:v,invalid:u.invalid,hover:_,focus:B,autofocus:h}),G=(0,eu.mergeProps)({ref:E,id:f,role:"combobox",type:b,"aria-controls":null==K?void 0:K.id,"aria-expanded":S===eE.Open,"aria-activedescendant":(0,eo.useSlice)(r,r.selectors.activeDescendantId),"aria-labelledby":L,"aria-describedby":N,"aria-autocomplete":"list",defaultValue:null!=(o=null!=(n=e.defaultValue)?n:void 0!==u.defaultValue?null==m?void 0:m(u.defaultValue):null)?o:u.defaultValue,disabled:v||void 0,autoFocus:h,onCompositionStart:O,onCompositionEnd:C,onKeyDown:M,onChange:D,onFocus:A,onBlur:k},H,V);return(0,eu.useRender)()({ourProps:G,theirProps:g,slot:z,defaultTag:"input",name:"Combobox.Input"})}),e_=ef.Label,eV=(0,eu.forwardRefWithAs)(function(e,t){var n,o,r;let i=(0,l.useId)(),{id:s=`headlessui-combobox-options-${i}`,hold:a=!1,anchor:u,portal:c=!1,modal:d=!0,transition:f=!1,...p}=e,m=eT("Combobox.Options"),v=eD("Combobox.Options"),h=(0,X.useResolvedAnchor)(u);h&&(c=!0);let[b,g]=(0,X.useFloatingPanel)(h),[y,E]=(0,l.useState)(null),S=(0,X.useFloatingPanelProps)(),x=(0,j.use
4SyncRefs)(t,h?b:null,m.actions.setOptionsElement,E),[R,w,P,I,F]=(0,eo.useSlice)(m,e=>[e.comboboxState,e.inputElement,e.buttonElement,e.optionsElement,e.activationTrigger]),C=(0,N.useOwnerDocument)(w||P),k=(0,N.useOwnerDocument)(I),L=(0,et.useOpenClosed)(),[B,H]=(0,U.useTransition)(f,y,null!==L?(L&et.State.Open)===et.State.Open:R===eE.Open);(0,A.useOnDisappear)(B,w,m.actions.closeCombobox);let W=!v.__demoMode&&d&&R===eE.Open;(0,z.useScrollLock)(W,k);let _=!v.__demoMode&&d&&R===eE.Open;(0,M.useInertOthers)(_,{allowed:(0,l.useCallback)(()=>[w,P,I],[w,P,I])});let V=!(0,eo.useSlice)(m,m.selectors.didInputMove)&&B;(0,D.useIsoMorphicEffect)(()=>{var t;v.optionsPropsRef.current.static=null!=(t=e.static)&&t},[v.optionsPropsRef,e.static]),(0,D.useIsoMorphicEffect)(()=>{v.optionsPropsRef.current.hold=a},[v.optionsPropsRef,a]),(0,q.useTreeWalker)(R===eE.Open,{container:I,accept:e=>"option"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let K=(0,ef.useLabelledBy)([null==P?void 0:P.id]),G=(0,$.useSlot)({open:R===eE.Open,option:void 0}),Q=(0,T.useEvent)(()=>{m.actions.setActivationTrigger(ex.Pointer)}),Y=(0,T.useEvent)(e=>{e.preventDefault(),m.actions.setActivationTrigger(ex.Pointer)}),J=(0,eu.mergeProps)(h?S():{},{"aria-labelledby":K,role:"listbox","aria-multiselectable":v.mode===eS.Multi||void 0,id:s,ref:x,style:{...p.style,...g,"--input-width":(0,O.useElementSize)(B,w,!0).width,"--button-width":(0,O.useElementSize)(B,P,!0).width},onWheel:F===ex.Pointer?void 0:Q,onMouseDown:Y,...(0,U.transitionDataAttributes)(H)}),ee=B&&R===eE.Closed&&!e.static,en=(0,Z.useFrozenData)(ee,null==(n=v.virtual)?void 0:n.options),er=(0,Z.useFrozenData)(ee,v.value),ei=(0,l.useCallback)(e=>v.compare(er,e),[v.compare,er]),es=(0,l.useMemo)(()=>{if(!v.virtual)return v;if(void 0===en)throw Error("Missing `options` in virtual mode");return en!==v.virtual.options?{...v,virtual:{...v.virtual,options:en}}:v},[v,en,null==(o=v.virtual)?void 0:o.options]);v.virtual&&Object.assign(p,{children:l.default.createElement(eM.Provider,{value:es},l.default.createElement(eA,{slot:G},p.children))});let el=(0,eu.useRender)(),ea=(0,l.useMemo)(()=>v.mode===eS.Multi?v:{...v,isSelected:ei},[v,ei]);return l.default.createElement(em.Portal,{enabled:!!c&&(e.static||B),ownerDocument:C},l.default.createElement(eM.Provider,{value:ea},el({ourProps:J,theirProps:{...p,children:l.default.createElement(Z.Frozen,{freeze:ee},"function"==typeof p.children?null==(r=p.children)?void 0:r.call(p,G):p.children)},slot:G,defaultTag:"div",features:eN,visible:V,name:"Combobox.Options"}
4)))}),eK=(0,eu.forwardRefWithAs)(function(e,t){var n,o,r;let i=eD("Combobox.Option"),s=eT("Combobox.Option"),a=(0,l.useId)(),{id:u=`headlessui-combobox-option-${a}`,value:c,disabled:d=null!=(r=null==(o=null==(n=i.virtual)?void 0:n.disabled)?void 0:o.call(n,c))&&r,order:f=null,...p}=e,[m]=(0,eo.useSlice)(s,e=>[e.inputElement]),v=V(m),h=(0,eo.useSlice)(s,(0,l.useCallback)(e=>s.selectors.isActive(e,c,u),[c,u])),b=i.isSelected(c),g=(0,l.useRef)(null),y=(0,k.useLatestValue)({disabled:d,value:c,domRef:g,order:f}),E=(0,l.useContext)(ek),S=(0,j.useSyncRefs)(t,g,E?E.measureElement:null),x=(0,T.useEvent)(()=>{s.actions.setIsTyping(!1),s.actions.onChange(c)});(0,D.useIsoMorphicEffect)(()=>s.actions.registerOption(u,y),[y,u]);let R=(0,eo.useSlice)(s,(0,l.useCallback)(e=>s.selectors.shouldScrollIntoView(e,c,u),[c,u]));(0,D.useIsoMorphicEffect)(()=>{if(R)return(0,es.disposables)().requestAnimationFrame(()=>{var e,t;null==(t=null==(e=g.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})},[R,g]);let w=(0,T.useEvent)(e=>{e.preventDefault(),e.button===ep.MouseButton.Left&&(d||(x(),(0,ea.isMobile)()||requestAnimationFrame(()=>v()),i.mode===eS.Single&&s.actions.closeCombobox()))}),P=(0,T.useEvent)(()=>{if(d)return s.actions.goToOption({focus:ei.Focus.Nothing});let e=i.calculateIndex(c);s.actions.goToOption({focus:ei.Focus.Specific,idx:e})}),I=(0,G.useTrackedPointer)(),F=(0,T.useEvent)(e=>I.update(e)),O=(0,T.useEvent)(e=>{if(!I.wasMoved(e)||d||h&&s.state.activationTrigger===ex.Pointer)return;let t=i.calculateIndex(c);s.actions.goToOption({focus:ei.Focus.Specific,idx:t},ex.Pointer)}),C=(0,T.useEvent)(e=>{I.wasMoved(e)&&(d||h&&(i.optionsPropsRef.current.hold||s.state.activationTrigger===ex.Pointer&&s.actions.goToOption({focus:ei.Focus.Nothing})))}),M=(0,$.useSlot)({active:h,focus:h,selected:b,disabled:d});return(0,eu.useRender)()({ourProps:{id:u,ref:S,role:"option",tabIndex:!0===d?void 0:-1,"aria-disabled":!0===d||void 0,"aria-selected":b,disabled:void 0,onMouseDown:w,onFocus:P,onPointerEnter:F,onMouseEnter:F,onPointerMove:O,onMouseMove:O,onPointerLeave:C,onMouseLeave:C},theirProps:p,slot:M,defaultTag:"div",name:"Combobox.Option"})}),ez=Object.assign(eB,{Input:eW,Button:eH,Label:e_,Options:eV,Option:eK});e.s(["Combobox",0,ez,"ComboboxButton",0,eH,"ComboboxInput",0,eW,"ComboboxLabel",0,e_,"ComboboxOption",0,eK,"ComboboxOptions",0,eV],62630)},76481,e=>{"use strict";var t=e.i(29427),n=e.i(71330),o=e.i(71645),r=e.i(94487),i=e.i(55743),s=e.i(20);let l=o.Fragment,a=(0,s.forwardRefWithAs)(function(e,o){let{...a}=e,{isFocusVisible:u,focusProps:c}=(0,t.useFocusRing)(),{isHovered:d,hoverProps:f}=(0,n.useHover)({isDisabled:!1}),{pressed:p,pressProps:m}=(0,r.useActivePress)({disabled:!1}),v=(0,s.mergeProps)({ref:o},c,f,m),h=(0,i.useSlot)({hover:d,focus:u,active:p});return(0,s.useRender)()({ourProps:v,theirProps:a,slot:h,defaultTag:l,name:"DataInteractive"})});e.s(["DataInteractive",0,a])},85935,e=>{"use strict";var t=e.i(71645),n=e.i(2788),o=e.i(13581),r=e.i(2155),i=e.i(14189);let s=(0,t.createContext)(null);function l(e=null){var n;return null!=(n=(0,t.useContext)(s))?n:e}e.s(["MainTreeProvider",0,function({children:e,node:i}){let[a,u]=(0,t.useState)(null),c=l(null!=i?i:a);return t.default.createElement(s.Provider,{value:c},e,null===c&&t.default.createElement(n.Hidden,{features:n.HiddenFeatures.Hidden,ref:e=>{var t,n;if(e){for(let i of null!=(n=null==(t=(0,r.getOwnerDocument)(e))?void 0:t.querySelectorAll("html > *, body > *"))?n:[])if(i!==document.body&&i!==document.head&&o.isElement(i)&&null!=i&&i.contains(e)){u(i);break}}}}))},"useMainTreeNode",0,l,"useRootContainers",0,function({defaultContainers:e=[],portals:t,mainTreeNode:n}={}){let s=(0,i.useEvent)(()=>{var i,s;let l=(0,r.getOwnerDocument)(n),a=[];for(let t of e)null!==t&&(o.isElement(t)?a.push(t):"current"in t&&o.isElement(t.current)&&a.push(t.current));if(null!=t&&t.current)for(let e of t.current)a.push(e);for(let e of null!=(i=null==l?void 0:l.querySelectorAll("html > *, body > *"))?i:[])e!==document.body&&e!==document.head&&o.isElement(e)&&"headlessui-portal-root"!==e.id&&(n&&(e.contains(n)||e.contains(null==(s=null==n?void 0:n.getRootNode())?void 0:s.host))||a.some(t=>e.contains(t))||a.push(e));return a});
4return{resolveContainers:s,contains:(0,i.useEvent)(e=>s().some(t=>t.contains(e)))}}])},78677,e=>{"use strict";var t=e.i(71645),n=e.i(80758);e.s(["useServerHandoffComplete",0,function(){let e,o=(e="u"<typeof document,"useSyncExternalStore"in t&&(0,t.useSyncExternalStore)(()=>()=>{},()=>!1,()=>!e)),[r,i]=t.useState(n.env.isHandoffComplete);return r&&!1===n.env.isHandoffComplete&&i(!1),t.useEffect(()=>{!0!==r&&i(!0)},[r]),t.useEffect(()=>n.env.handoff(),[]),!o&&r}])},53521,e=>{"use strict";var t=e.i(71645),n=e.i(35696);e.s(["useIsMounted",0,function(){let e=(0,t.useRef)(!1);return(0,n.useIsoMorphicEffect)(()=>(e.current=!0,()=>{e.current=!1}),[]),e}])},61130,e=>{"use strict";let t;var n=e.i(71645),o=e.i(1141),r=((t=r||{})[t.Forwards=0]="Forwards",t[t.Backwards=1]="Backwards",t);e.s(["Direction",0,r,"useTabDirection",0,function(){let e=(0,n.useRef)(0);return(0,o.useWindowEvent)(!0,"keydown",t=>{"Tab"===t.key&&(e.current=+!!t.shiftKey)},!0),e}])},42925,e=>{"use strict";let t;var n=e.i(71645),o=e.i(46725),r=e.i(14189),i=e.i(93456),s=e.i(53521),l=e.i(29644),a=e.i(26599),u=e.i(5083),c=e.i(78677),d=e.i(94316),f=e.i(61130),p=e.i(33633),m=e.i(2788),v=e.i(3935),h=e.i(13581),b=e.i(52265),g=e.i(97701),y=e.i(68578),E=e.i(2155),S=e.i(20);function x(e){if(!e)return new Set;if("function"==typeof e)return new Set(e());let t=new Set;for(let n of e.current)h.isElement(n.current)&&t.add(n.current);return t}var R=((t=R||{})[t.None=0]="None",t[t.InitialFocus=1]="InitialFocus",t[t.TabLock=2]="TabLock",t[t.FocusLock=4]="FocusLock",t[t.RestoreFocus=8]="RestoreFocus",t[t.AutoFocus=16]="AutoFocus",t);let w=Object.assign((0,S.forwardRefWithAs)(function(e,t){let R=(0,n.useRef)(null),w=(0,d.useSyncRefs)(R,t),{initialFocus:I,initialFocusFallback:F,containers:O,features:T=15,...C}=e;(0,c.useServerHandoffComplete)()||(T=0);let M=(0,u.useOwnerDocument)(R.current);!function(e,{ownerDocument:t}){let o=!!(8&e),i=function(e=!0){let t=(0,n.useRef)(v.history.slice());return(0,p.useWatch)(([e],[n])=>{!0===n&&!1===e&&(0,y.microTask)(()=>{t.current.splice(0)}),!1===n&&!0===e&&(t.current=v.history.slice())},[e,v.history,t]),(0,r.useEvent)(()=>{var e;return null!=(e=t.current.find(e=>null!=e&&e.isConnected))?e:null})}(o);(0,p.useWatch)(()=>{o||(0,E.isActiveElement)(null==t?void 0:t.body)&&(0,b.focusElement)(i())},[o]),(0,a.useOnUnmount)(()=>{o&&(0,b.focusElement)(i())})}(T,{ownerDocument:M});let D=function(e,{ownerDocument:t,container:o,initialFocus:r,initialFocusFallback:i}){let a=(0,n.useRef)(null),u=(0,l.useIsTopLayer)(!!(1&e),"focus-trap#initial-focus"),c=(0,s.useIsMounted)();return(0,p.useWatch)(()=>{if(0===e)return;if(!u){null!=i&&i.current&&(0,b.focusElement)(i.current);return}let n=o.current;n&&(0,y.microTask)(()=>{if(!c.current)return;let o=null==t?void 0:t.activeElement;if(null!=r&&r.current){if((null==r?void 0:r.current)===o){a.current=o;return}}else if(n.contains(o)){a.current=o;return}if(null!=r&&r.current)(0,b.focusElement)(r.current);else{if(16&e){if((0,b.focusIn)(n,b.Focus.First|b.Focus.AutoFocus)!==b.FocusResult.Error)return}else if((0,b.focusIn)(n,b.Focus.First)!==b.FocusResult.Error)return;if(null!=i&&i.current&&((0,b.focusElement)(i.current),(null==t?void 0:t.activeElement)===i.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}a.current=null==t?void 0:t.activeElement})},[i,u,e]),a}(T,{ownerDocument:M,container:R,initialFocus:I,initialFocusFallback:F});!function(e,{ownerDocument:t,container:n,containers:o,previousActiveElement:r}){let l=(0,s.useIsMounted)(),a=!!(4&e);(0,i.useEventListener)(null==t?void 0:t.defaultView,"focus",e=>{if(!a||!l.current)return;let t=x(o);h.isHTMLElement(n.current)&&t.add(n.current);let i=r.current;if(!i)return;let s=e.target;h.isHTMLElement(s)?P(t,s)?(r.current=s,(0,b.focusElement)(s)):(e.preventDefault(),e.stopPropagation(),(0,b.focusElement)(i)):(0,b.focusElement)(r.current)},!0)}(T,{ownerDocument:M,container:R,containers:O,previousActiveElement:D});let k=(0,f.useTabDirection)(),A=(0,r.useEvent)(e=>{if(!h.isHTMLElement(R.current))return;let t=R.current;(0,g.match)(k.current,{[f.Direction.Forwards]:()=>{(0,b.focusIn)(t,b.Focus.First,{skipElements:[e.relatedTarget,F]})},[f.Direction.Backwards]:()=>{(0,b.focusIn)(t,b.Focus.Last,{skipElements:[e.relatedTarget,F]})}})}
4),L=(0,l.useIsTopLayer)(!!(2&T),"focus-trap#tab-lock"),N=(0,o.useDisposables)(),B=(0,n.useRef)(!1),H=(0,S.useRender)();return n.default.createElement(n.default.Fragment,null,L&&n.default.createElement(m.Hidden,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:A,features:m.HiddenFeatures.Focusable}),H({ourProps:{ref:w,onKeyDown(e){"Tab"==e.key&&(B.current=!0,N.requestAnimationFrame(()=>{B.current=!1}))},onBlur(e){if(!(4&T))return;let t=x(O);h.isHTMLElement(R.current)&&t.add(R.current);let n=e.relatedTarget;h.isHTMLorSVGElement(n)&&"true"!==n.dataset.headlessuiFocusGuard&&(P(t,n)||(B.current?(0,b.focusIn)(R.current,(0,g.match)(k.current,{[f.Direction.Forwards]:()=>b.Focus.Next,[f.Direction.Backwards]:()=>b.Focus.Previous})|b.Focus.WrapAround,{relativeTo:e.target}):h.isHTMLorSVGElement(e.target)&&(0,b.focusElement)(e.target)))}},theirProps:C,defaultTag:"div",name:"FocusTrap"}),L&&n.default.createElement(m.Hidden,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:A,features:m.HiddenFeatures.Focusable}))}),{features:R});function P(e,t){for(let n of e)if(n.contains(t))return!0;return!1}e.s(["FocusTrap",0,w,"FocusTrapFeatures",0,R])},54056,e=>{"use strict";let t;var n=e.i(71645),o=e.i(46725),r=e.i(14189),i=e.i(53521),s=e.i(35696),l=e.i(41444),a=e.i(78677),u=e.i(94316),c=e.i(83733),d=e.i(33137),f=e.i(32607),p=e.i(97701),m=e.i(20);function v(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||!(0,m.isFragment)(null!=(t=e.as)?t:S)||1===n.default.Children.count(e.children)}let h=(0,n.createContext)(null);h.displayName="TransitionContext";var b=((t=b||{}).Visible="visible",t.Hidden="hidden",t);let g=(0,n.createContext)(null);function y(e){return"children"in e?y(e.children):e.current.filter(({el:e})=>null!==e.current).filter(({state:e})=>"visible"===e).length>0}function E(e,t){let s=(0,l.useLatestValue)(e),a=(0,n.useRef)([]),u=(0,i.useIsMounted)(),c=(0,o.useDisposables)(),d=(0,r.useEvent)((e,t=m.RenderStrategy.Hidden)=>{let n=a.current.findIndex(({el:t})=>t===e);-1!==n&&((0,p.match)(t,{[m.RenderStrategy.Unmount](){a.current.splice(n,1)},[m.RenderStrategy.Hidden](){a.current[n].state="hidden"}}),c.microTask(()=>{var e;!y(a)&&u.current&&(null==(e=s.current)||e.call(s))}))}),f=(0,r.useEvent)(e=>{let t=a.current.find(({el:t})=>t===e);return t?"visible"!==t.state&&(t.state="visible"):a.current.push({el:e,state:"visible"}),()=>d(e,m.RenderStrategy.Unmount)}),v=(0,n.useRef)([]),h=(0,n.useRef)(Promise.resolve()),b=(0,n.useRef)({enter:[],leave:[]}),g=(0,r.useEvent)((e,n,o)=>{v.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter(([t])=>t!==e)),null==t||t.chains.current[n].push([e,new Promise(e=>{v.current.push(e)})]),null==t||t.chains.current[n].push([e,new Promise(e=>{Promise.all(b.current[n].map(([e,t])=>t)).then(()=>e())}
4)]),"enter"===n?h.current=h.current.then(()=>null==t?void 0:t.wait.current).then(()=>o(n)):o(n)}),E=(0,r.useEvent)((e,t,n)=>{Promise.all(b.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;null==(e=v.current.shift())||e()}).then(()=>n(t))});return(0,n.useMemo)(()=>({children:a,register:f,unregister:d,onStart:g,onStop:E,wait:h,chains:b}),[f,d,a,g,E,b,h])}g.displayName="NestingContext";let S=n.Fragment,x=m.RenderFeatures.RenderStrategy,R=(0,m.forwardRefWithAs)(function(e,t){let{show:o,appear:i=!1,unmount:l=!0,...c}=e,f=(0,n.useRef)(null),p=v(e),b=(0,u.useSyncRefs)(...p?[f,t]:null===t?[]:[t]);(0,a.useServerHandoffComplete)();let S=(0,d.useOpenClosed)();if(void 0===o&&null!==S&&(o=(S&d.State.Open)===d.State.Open),void 0===o)throw Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[R,P]=(0,n.useState)(o?"visible":"hidden"),I=E(()=>{o||P("hidden")}),[F,O]=(0,n.useState)(!0),T=(0,n.useRef)([o]);(0,s.useIsoMorphicEffect)(()=>{!1!==F&&T.current[T.current.length-1]!==o&&(T.current.push(o),O(!1))},[T,o]);let C=(0,n.useMemo)(()=>({show:o,appear:i,initial:F}),[o,i,F]);(0,s.useIsoMorphicEffect)(()=>{o?P("visible"):y(I)||null===f.current||P("hidden")},[o,I]);let M={unmount:l},D=(0,r.useEvent)(()=>{var t;F&&O(!1),null==(t=e.beforeEnter)||t.call(e)}),k=(0,r.useEvent)(()=>{var t;F&&O(!1),null==(t=e.beforeLeave)||t.call(e)}),A=(0,m.useRender)();return n.default.createElement(g.Provider,{value:I},n.default.createElement(h.Provider,{value:C},A({ourProps:{...M,as:n.Fragment,children:n.default.createElement(w,{ref:b,...M,...c,beforeEnter:D,beforeLeave:k})},theirProps:{},defaultTag:n.Fragment,features:x,visible:"visible"===R,name:"Transition"})))}),w=(0,m.forwardRefWithAs)(function(e,t){var o,i;let{transition:l=!0,beforeEnter:b,afterEnter:R,beforeLeave:w,afterLeave:P,enter:I,enterFrom:F,enterTo:O,entered:T,leave:C,leaveFrom:M,leaveTo:D,...k}=e,[A,L]=(0,n.useState)(null),N=(0,n.useRef)(null),B=v(e),H=(0,u.useSyncRefs)(...B?[N,t,L]:null===t?[]:[t]),W=null==(o=k.unmount)||o?m.RenderStrategy.Unmount:m.RenderStrategy.Hidden,{show:_,appear:V,initial:K}=function(){let e=(0,n.useContext)(h);if(null===e)throw Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[z,$]=(0,n.useState)(_?"visible":"hidden"),j=function(){let e=(0,n.useContext)(g);if(null===e)throw Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:G,unregister:U}=j;(0,s.useIsoMorphicEffect)(()=>G(N),[G,N]),(0,s.useIsoMorphicEffect)(()=>{if(W===m.RenderStrategy.Hidden&&N.current)return _&&"visible"!==z?void $("visible"):(0,p.match)(z,{hidden:()=>U(N),visible:()=>G(N)})},[z,N,G,U,_,W]);let q=(0,a.useServerHandoffComplete)();(0,s.useIsoMorphicEffect)(()=>{if(B&&q&&"visible"===z&&null===N.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[N,z,q,B]);let Q=K&&!V,Y=V&&_&&K,X=(0,n.useRef)(!1),J=E(()=>{X.current||($("hidden"),U(N))},j),Z=(0,r.useEvent)(e=>{X.current=!0,J.onStart(N,e?"enter":"leave",e=>{"enter"===e?null==b||b():"leave"===e&&(null==w||w())})}),ee=(0,r.useEvent)(e=>{let t=e?"enter":"leave";X.current=!1,J.onStop(N,t,e=>{"enter"===e?null==R||R():"leave"===e&&(null==P||P())}),"leave"!==t||y(J)||($("hidden"),U(N))});(0,n.useEffect)(()=>{B&&l||(Z(_),ee(_))},[_,B,l]);let et=!(!l||!B||!q||Q),[,en]=(0,c.useTransition)(et,A,_,{start:Z,end:ee}),eo=(0,m.compact)({ref:H,className:(null==(i=(0,f.classNames)(k.className,Y&&I,Y&&F,en.enter&&I,en.enter&&en.closed&&F,en.enter&&!en.closed&&O,en.leave&&C,en.leave&&!en.closed&&M,en.leave&&en.closed&&D,!en.transition&&_&&T))?void 0:i.trim())||void 0,...(0,c.transitionDataAttributes)(en)}),er=0;"visible"===z&&(er|=d.State.Open),"hidden"===z&&(er|=d.State.Closed),_&&"hidden"===z&&(er|=d.State.Opening),_||"visible"!==z||(er|=d.State.Closing);let ei=(0,m.useRender)();return n.default.createElement(g.Provider,{value:J},n.default.createElement(d.OpenClosedProvider,{value:er},ei({ourProps:eo,theirProps:k,defaultTag:S,features:x,visible:"visible"===z,name:"Transition.Child"})))}),P=(0,m.forwardRefWithAs)(function(e,t){let o=null!==(0,n.useContext)(h),r=null!==(0,d.useOpenClosed)();return n.default.createElement(n.default.Fragment,null,!o&&r?n.default.createElement(R,{ref:t,...e}):n.default.createElement(w,{ref:t,...e}))}),I=Object.assign(R,{Child:P,Root:R});e.s(["Transition",0,I,"TransitionChild",0,P])},54878,e=>{"use strict";let t,n;var o=e.i(71645),r=e.i(98348),i=e.i(93456),s=e.i(29644),l=e.i(14189),a=e.i(84653),u=e.i(35696),c=e.i(77891),d=e.i(52744),f=e.i(5083),p=e.i(85935),m=e.i(1852),v=e.i(78677),h=e.i(55743),b=e.i(94316),g=e.i(74175),y=e.i(33137),E=e.i(96629),S=e.i(41650),x=e.i(40407),R=e.i(97701),w=e.i(20),P=e.i(35889),I=e.i(42925),F=e.i(35307),O=e.i(54056),T=((t=T||{})[t.Open=0]="Open",t[t.Closed=1]="Closed",t),C=((n=C||{})[n.SetTitleId=0]="SetTitleId",n);let M={0:(e,t)=>e.titleId===t.id?e:{...e,titleId:t.id}},D=(0,o.createContext)(null);function k(e){let t=(0,o.useContext)(D);if(null===t){let t=Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,k),t}return t}function A(e,t){return(0,R.match)(t.type,M,e,t)}D.displayName="DialogContext";let L=(0,w.forwardRefWithAs)(function(e,t){let n=(0,o.useId)(),{id:R=`headlessui-dialog-${n}`,open:O,onClose:T,initialFocus:C,role:M="dialog",autoFocus:k=!0,__demoMode:L=!1,unmount:H=!1,...W}=e,_=(0,o.useRef)(!1);
4M="dialog"===M||"alertdialog"===M?M:(_.current||(_.current=!0,console.warn(`Invalid role [${M}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog");let V=(0,y.useOpenClosed)();void 0===O&&null!==V&&(O=(V&y.State.Open)===y.State.Open);let K=(0,o.useRef)(null),z=(0,b.useSyncRefs)(K,t),$=(0,f.useOwnerDocument)(K.current),j=+!O,[G,U]=(0,o.useReducer)(A,{titleId:null,descriptionId:null,panelRef:(0,o.createRef)()}),q=(0,l.useEvent)(()=>T(!1)),Q=(0,l.useEvent)(e=>U({type:0,id:e})),Y=!!(0,v.useServerHandoffComplete)()&&0===j,[X,J]=(0,F.useNestedPortals)(),Z=(0,p.useMainTreeNode)(),{resolveContainers:ee}=(0,p.useRootContainers)({mainTreeNode:Z,portals:X,defaultContainers:[{get current(){var et;return null!=(et=G.panelRef.current)?et:K.current}}]}),en=null!==V&&(V&y.State.Closing)===y.State.Closing;(0,a.useInertOthers)(!L&&!en&&Y,{allowed:(0,l.useEvent)(()=>{var e,t;return[null!=(t=null==(e=K.current)?void 0:e.closest("[data-headlessui-portal]"))?t:null]}),disallowed:(0,l.useEvent)(()=>{var e;return[null!=(e=null==Z?void 0:Z.closest("body > *:not(#headlessui-portal-root)"))?e:null]})});let eo=S.stackMachines.get(null);(0,u.useIsoMorphicEffect)(()=>{if(Y)return eo.actions.push(R),()=>eo.actions.pop(R)},[eo,R,Y]);let er=(0,x.useSlice)(eo,(0,o.useCallback)(e=>eo.selectors.isTop(e,R),[eo,R]));(0,d.useOutsideClick)(er,ee,e=>{e.preventDefault(),q()}),function(e,t="u">typeof document?document.defaultView:null,n){let o=(0,s.useIsTopLayer)(e,"escape");(0,i.useEventListener)(t,"keydown",e=>{o&&(e.defaultPrevented||e.key===r.Keys.Escape&&n(e))})}(er,null==$?void 0:$.defaultView,e=>{e.preventDefault(),e.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur(),q()}),(0,m.useScrollLock)(!L&&!en&&Y,$,ee),(0,c.useOnDisappear)(Y,K,q);let[ei,es]=(0,P.useDescriptions)(),el=(0,o.useMemo)(()=>[{dialogState:j,close:q,setTitleId:Q,unmount:H},G],[j,q,Q,H,G]),ea=(0,h.useSlot)({open:0===j}),eu={ref:z,id:R,role:M,tabIndex:-1,"aria-modal":L?void 0:0===j||void 0,"aria-labelledby":G.titleId,"aria-describedby":ei,unmount:H},ec=!function(){var e;let[t]=(0,o.useState)(()=>"u">typeof window&&"function"==typeof window.matchMedia?window.matchMedia("(pointer: coarse)"):null),[n,r]=(0,o.useState)(null!=(e=null==t?void 0:t.matches)&&e);return(0,u.useIsoMorphicEffect)(()=>{if(t)return t.addEventListener("change",e),()=>t.removeEventListener("change",e);function e(e){r(e.matches)}},[t]),n}(),ed=I.FocusTrapFeatures.None;Y&&!L&&(ed|=I.FocusTrapFeatures.RestoreFocus,ed|=I.FocusTrapFeatures.TabLock,k&&(ed|=I.FocusTrapFeatures.AutoFocus),ec&&(ed|=I.FocusTrapFeatures.InitialFocus));let ef=(0,w.useRender)();return o.default.createElement(y.ResetOpenClosedProvider,null,o.default.createElement(E.ForcePortalRoot,{force:!0},o.default.createElement(F.Portal,null,o.default.createElement(D.Provider,{value:el},o.default.createElement(F.PortalGroup,{target:K},o.default.createElement(E.ForcePortalRoot,{force:!1},o.default.createElement(es,{slot:ea},o.default.createElement(J,null,o.default.createElement(I.FocusTrap,{initialFocus:C,initialFocusFallback:K,containers:ee,features:ed},o.default.createElement(g.CloseProvider,{value:q},ef({ourProps:eu,theirProps:W,slot:ea,defaultTag:N,features:B,visible:0===j,name:"Dialog"})))))))))))}),N="div",B=w.RenderFeatures.RenderStrategy|w.RenderFeatures.Static,H=(0,w.forwardRefWithAs)(function(e,t){let{transition:n=!1,open:r,...i}=e,s=(0,y.useOpenClosed)(),l=e.hasOwnProperty("open")||null!==s,a=e.hasOwnProperty("onClose");if(!l&&!a)throw Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!l)throw Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!a)throw Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!s&&"boolean"!=typeof e.open)throw Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if("function"!=typeof e.onClose)throw Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return(void 0!==r||n)&&!i.static?o.default.createElement(p.MainTreeProvider,null,o.default.createElement(O.Transition,{show:r,transition:n,unmount:i.unmount},o.default.createElement(L,{ref:t,...i}))):o.default.createElement(p.MainTreeProvider,null,o.default.createElement(L,{ref:t,open:r,...i}))}),W=(0,w.forwardRefWithAs)(function(e,t){let n=(0,o.useId)(),{id:r=`headlessui-dialog-panel-${n}`,transition:i=!1,...s}=e,[{dialogState:a,unmount:u},c]=k("Dialog.Panel"),d=(0,b.useSyncRefs)(t,c.panelRef),f=(0,h.useSlot)({open:0===a}),p=(0,l.useEvent)(e=>{e.stopPropagation()}),m=i?O.TransitionChild:o.Fragment,v=(0,w.useRender)();return o.default.createElement(m,{...i?{unmount:u}:{}},v({ourProps:{ref:d,id:r,onClick:p},theirProps:s,slot:f,defaultTag:"div",name:"Dialog.Panel"}))}),_=(0,w.forwardRefWithAs)(function(e,t){let{transition:n=!1,...r}=e,[{dialogState:i,unmount:s}]=k("Dialog.Backdrop"),l=(0,h.useSlot)({open:0===i}),a=n?O.TransitionChild:o.Fragment,u=(0,w.useRender)();return o.default.createElement(a,{...n?{unmount:s}:{}},u({ourProps:{ref:t,"aria-hidden":!0},theirProps:r,slot:l,defaultTag:"div",name:"Dialog.Backdrop"}))}),V=(0,w.forwardRefWithAs)(function(e,t){let n=(0,o.useId)(),{id:r=`headlessui-dialog-title-${n}`,...i}=e,[{dialogState:s,setTitleId:l}]=k("Dialog.Title"),a=(0,b.useSyncRefs)(t);(0,o.useEffect)(()=>(l(r),()=>l(null)),[r,l]);let u=(0,h.useSlot)({open:0===s});return(0,w.useRender)()({ourProps:{ref:a,id:r},theirProps:i,slot:u,defaultTag:"h2",name:"Dialog.Title"})}),K=P.Description,z=Object.assign(H,{Panel:W,Title:V,Description:P.Description});e.s(["Dialog",0,z,"DialogBackdrop",0,_,"DialogDescription",0,K,"DialogPanel",0,W,"DialogTitle",0,V],54878)},39100,e=>{"use strict";var t=e.i(71645),n=e.i(55743),o=e.i(1893),r=e.i(40721),i=e.i(42803),s=e.i(20),l=e.i(35889),a=e.i(22678);let u=(0,s.forwardRefWithAs)(function(e,u){let c=`headlessui-control-${(0,t.useId)()}`,[d,f]=(0,a.useLabels)(),[p,m]=(0,l.useDescriptions)(),v=(0,o.useDisabled)(),{disabled:h=v||!1,...b}
4=e,g=(0,n.useSlot)({disabled:h}),y=(0,s.useRender)();return t.default.createElement(o.DisabledProvider,{value:h},t.default.createElement(f,{value:d},t.default.createElement(m,{value:p},t.default.createElement(i.IdProvider,{id:c},y({ourProps:{ref:u,disabled:h||void 0,"aria-disabled":h||void 0},theirProps:{...b,children:t.default.createElement(r.FormFieldsProvider,null,"function"==typeof b.children?b.children(g):b.children)},slot:g,defaultTag:"div",name:"Field"})))))});e.s(["Field",0,u])},98631,e=>{"use strict";var t=e.i(71645),n=e.i(13581),o=e.i(55743),r=e.i(94316),i=e.i(1893),s=e.i(20),l=e.i(22678);let a="fieldset",u=(0,s.forwardRefWithAs)(function(e,u){var c;let d=(0,i.useDisabled)(),{disabled:f=d||!1,...p}=e,[m,v]=function(e){let o="string"==typeof e?e:void 0,[r,i]=(0,t.useState)(o);return[null!=o?o:r,(0,t.useCallback)(e=>{o||n.isHTMLElement(e)&&i(e.tagName.toLowerCase())},[o])]}(null!=(c=e.as)?c:a),h=(0,r.useSyncRefs)(u,v),[b,g]=(0,l.useLabels)(),y=(0,o.useSlot)({disabled:f}),E="fieldset"===m?{ref:h,"aria-labelledby":b,disabled:f||void 0}:{ref:h,role:"group","aria-labelledby":b,"aria-disabled":f||void 0},S=(0,s.useRender)();return t.default.createElement(i.DisabledProvider,{value:f},t.default.createElement(g,null,S({ourProps:E,theirProps:p,slot:y,defaultTag:a,name:"Fieldset"})))});e.s(["Fieldset",0,u],98631)},13589,e=>{"use strict";var t=e.i(29427),n=e.i(71330),o=e.i(71645),r=e.i(55743),i=e.i(1893),s=e.i(42803),l=e.i(20),a=e.i(35889),u=e.i(22678);let c=(0,l.forwardRefWithAs)(function(e,c){let d=(0,o.useId)(),f=(0,s.useProvidedId)(),p=(0,i.useDisabled)(),{id:m=f||`headlessui-input-${d}`,disabled:v=p||!1,autoFocus:h=!1,invalid:b=!1,...g}=e,y=(0,u.useLabelledBy)(),E=(0,a.useDescribedBy)(),{isFocused:S,focusProps:x}=(0,t.useFocusRing)({autoFocus:h}),{isHovered:R,hoverProps:w}=(0,n.useHover)({isDisabled:v}),P=(0,l.mergeProps)({ref:c,id:m,"aria-labelledby":y,"aria-describedby":E,"aria-invalid":b?"true":void 0,disabled:v||void 0,autoFocus:h},x,w),I=(0,r.useSlot)({disabled:v,invalid:b,hover:R,focus:S,autofocus:h});return(0,l.useRender)()({ourProps:P,theirProps:g,slot:I,defaultTag:"input",name:"Input"})});e.s(["Input",0,c])},58246,e=>{"use strict";var t=e.i(71645),n=e.i(20),o=e.i(22678);o.Label;let r=(0,n.forwardRefWithAs)(function(e,n){return t.default.createElement(o.Label,{as:"div",ref:n,...e})});e.s(["Legend",0,r])},49578,e=>{"use strict";var t=e.i(71645),n=e.i(13581);let o=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function r(e){var t,r;let i=null!=(t=e.innerText)?t:"",s=e.cloneNode(!0);if(!n.isHTMLElement(s))return i;let l=!1;for(let e of s.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))e.remove(),l=!0;let a=l?null!=(r=s.innerText)?r:"":i;return o.test(a)&&(a=a.replace(o,"")),a}var i=e.i(14189);e.s(["useTextValue",0,function(e){let n=(0,t.useRef)(""),o=(0,t.useRef)("");return(0,i.useEvent)(()=>{let t=e.current;if(!t)return"";let i=t.innerText;if(n.current===i)return o.current;let s=(function(e){let t=e.getAttribute("aria-label");if("string"==typeof t)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"string"==typeof e?e.trim():r(t).trim()}return null}).filter(Boolean);if(e.length>0)return e.join(", ")}return r(e).trim()})(t).trim().toLowerCase();return n.current=i,o.current=s,s})}],49578)},95470,e=>{"use strict";let t,n,o,r;var i=e.i(29427),s=e.i(71330),l=e.i(71645),a=e.i(74080),u=e.i(94487),c=e.i(36289),d=e.i(3269),f=e.i(14520),p=e.i(46725),m=e.i(92704),v=e.i(14189),h=e.i(88374),b=e.i(84653),g=e.i(35696),y=e.i(41444),E=e.i(77891),S=e.i(52744),x=e.i(5083),R=e.i(57138),w=e.i(44279),P=e.i(1852),I=e.i(55743),F=e.i(94316),O=e.i(49578),T=e.i(71616),C=e.i(83733),M=e.i(1893),D=e.i(19751),k=e.i(40721),A=e.i(4016),L=e.i(42803),N=e.i(33137),B=e.i(41650),H=e.i(40407),W=e.i(65659),_=e.i(44508),V=e.i(13581),K=e.i(52265),z=e.i(94421),$=e.i(97701),j=e.i(2155),G=e.i(20),U=e.i(35889),q=e.i(98348),Q=e.i(22678),Y=e.i(35307),X=e.i(25720),J=e.i(67310),Z=Object.defineProperty,ee=(e,t,n
4)=>{let o;return(o="symbol"!=typeof t?t+"":t)in e?Z(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n,n},et=((t=et||{})[t.Open=0]="Open",t[t.Closed=1]="Closed",t),en=((n=en||{})[n.Single=0]="Single",n[n.Multi=1]="Multi",n),eo=((o=eo||{})[o.Pointer=0]="Pointer",o[o.Other=1]="Other",o),er=((r=er||{})[r.OpenListbox=0]="OpenListbox",r[r.CloseListbox=1]="CloseListbox",r[r.GoToOption=2]="GoToOption",r[r.Search=3]="Search",r[r.ClearSearch=4]="ClearSearch",r[r.SelectOption=5]="SelectOption",r[r.RegisterOptions=6]="RegisterOptions",r[r.UnregisterOptions=7]="UnregisterOptions",r[r.SetButtonElement=8]="SetButtonElement",r[r.SetOptionsElement=9]="SetOptionsElement",r[r.SortOptions=10]="SortOptions",r[r.MarkButtonAsMoved=11]="MarkButtonAsMoved",r);function ei(e,t=e=>e){let n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,o=(0,K.sortByDomNode)(t(e.options.slice()),e=>e.dataRef.current.domRef.current),r=n?o.indexOf(n):null;return -1===r&&(r=null),{options:o,activeOptionIndex:r}}let es={1(e){if(e.dataRef.current.disabled||1===e.listboxState)return e;let t=e.buttonElement?J.ElementPositionState.Tracked((0,J.computeVisualPosition)(e.buttonElement)):e.buttonPositionState;return{...e,activeOptionIndex:null,pendingFocus:{focus:W.Focus.Nothing},listboxState:1,__demoMode:!1,buttonPositionState:t}},0(e,t){if(e.dataRef.current.disabled||0===e.listboxState)return e;let n=e.activeOptionIndex,{isSelected:o}=e.dataRef.current,r=e.options.findIndex(e=>o(e.dataRef.current.value));return -1!==r&&(n=r),{...e,frozenValue:!1,pendingFocus:t.focus,listboxState:0,activeOptionIndex:n,__demoMode:!1,buttonPositionState:J.ElementPositionState.Idle}},2(e,t){var n,o,r,i,s;if(e.dataRef.current.disabled||1===e.listboxState)return e;let l={...e,searchQuery:"",activationTrigger:null!=(n=t.trigger)?n:1,__demoMode:!1};if(t.focus===W.Focus.Nothing)return{...l,activeOptionIndex:null};if(t.focus===W.Focus.Specific)return{...l,activeOptionIndex:e.options.findIndex(e=>e.id===t.id)};if(t.focus===W.Focus.Previous){let n=e.activeOptionIndex;if(null!==n){let i=e.options[n].dataRef.current.domRef,s=(0,W.calculateActiveIndex)(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==s){let t=e.options[s].dataRef.current.domRef;if((null==(o=i.current)?void 0:o.previousElementSibling)===t.current||(null==(r=t.current)?void 0:r.previousElementSibling)===null)return{...l,activeOptionIndex:s}}}}else if(t.focus===W.Focus.Next){let n=e.activeOptionIndex;if(null!==n){let o=e.options[n].dataRef.current.domRef,r=(0,W.calculateActiveIndex)(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==r){let t=e.options[r].dataRef.current.domRef;if((null==(i=o.current)?void 0:i.nextElementSibling)===t.current||(null==(s=t.current)?void 0:s.nextElementSibling)===null)return{...l,activeOptionIndex:r}}}}let a=ei(e),u=(0,W.calculateActiveIndex)(t,{resolveItems:()=>a.options,resolveActiveIndex:()=>a.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...l,...a,activeOptionIndex:u}},3:(e,t)=>{if(e.dataRef.current.disabled||1===e.listboxState)return e;let n=+(""===e.searchQuery),o=e.searchQuery+t.value.toLowerCase(),r=(null!==e.activeOptionIndex?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find(e=>{var t;return!e.dataRef.current.disabled&&(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(o))}),i=r?e.options.indexOf(r):-1;return -1===i||i===e.activeOptionIndex?{...e,searchQuery:o}:{...e,searchQuery:o,activeOptionIndex:i,activationTrigger:1}},4:e=>e.dataRef.current.disabled||1===e.listboxState||""===e.searchQuery?e:{...e,searchQuery:""},5:e=>0===e.dataRef.current.mode?{...e,frozenValue:!0}:{...e},6:(e,t)=>{let n=e.options.concat(t.options),o=e.activeOptionIndex;if(e.pendingFocus.focus!==W.Focus.Nothing&&(o=(0,W.calculateActiveIndex)(e.pendingFocus,{resolveItems:()=>n,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled})),null===e.activeOptionIndex){let{isSelected:t}=e.dataRef.current;if(t){let e=n.findIndex(e=>null==t?void 0:t(e.dataRef.current.value));-1!==e&&(o=e)}}return{...e,options:n,activeOptionIndex:o,pendingFocus:{focus:W.Focus.Nothing},pendingShouldSort:!0}},7:(e,t)=>{let n=e.options,o=[],r=new Set(t.options);for(let[e,t]of n.entries())if(r.has(t.id)&&(o.push(e),r.delete(t.id),0===r.size))break;if(o.length>0)for(let e of(n=n.slice(),o.reverse()))n.splice(e,1);return{...e,options:n,activationTrigger:1}},8:(e,t)=>
4e.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,...ei(e),pendingShouldSort:!1}:e,11:e=>"Tracked"!==e.buttonPositionState.kind?e:{...e,buttonPositionState:J.ElementPositionState.Moved}};class el extends X.Machine{constructor(e){super(e),ee(this,"actions",{onChange:e=>{let{onChange:t,compare:n,mode:o,value:r}=this.state.dataRef.current;return(0,$.match)(o,{0:()=>null==t?void 0:t(e),1:()=>{let o=r.slice(),i=o.findIndex(t=>n(t,e));return -1===i?o.push(e):o.splice(i,1),null==t?void 0:t(o)}})},registerOption:(0,X.batch)(()=>{let e=[],t=new Set;return[(n,o)=>{t.has(o)||(t.add(o),e.push({id:n,dataRef:o}))},()=>(t.clear(),this.send({type:6,options:e.splice(0)}))]}),unregisterOption:(0,X.batch)(()=>{let e=[];return[t=>e.push(t),()=>{this.send({type:7,options:e.splice(0)})}]}),goToOption:(0,X.batch)(()=>{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(null!==this.state.activeOptionIndex){let{dataRef:e}=this.state.options[this.state.activeOptionIndex];this.actions.selectOption(e.current.value)}else 0===this.state.dataRef.current.mode&&(this.actions.closeListbox(),null==(e=this.state.buttonElement)||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})}}),ee(this,"selectors",{activeDescendantId(e){var t;let n=e.activeOptionIndex,o=e.options;return null===n||null==(t=o[n])?void 0:t.id},isActive(e,t){var n;let o=e.activeOptionIndex,r=e.options;return null!==o&&(null==(n=r[o])?void 0:n.id)===t},hasFrozenValue:e=>e.frozenValue,shouldScrollIntoView(e,t){return!e.__demoMode&&0===e.listboxState&&0!==e.activationTrigger&&this.isActive(e,t)},didButtonMove:e=>"Moved"===e.buttonPositionState.kind}),this.on(6,()=>{requestAnimationFrame(()=>{this.send({type:10})})});{let e=this.state.id,t=B.stackMachines.get(null);this.disposables.add(t.on(B.ActionTypes.Push,n=>{t.selectors.isTop(n,e)||0!==this.state.listboxState||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((0,J.detectMovement)(t.buttonElement,t.buttonPositionState,()=>{this.send({type:11})})))})}),this.on(5,(e,t)=>{var n;this.actions.onChange(t.value),0===this.state.dataRef.current.mode&&(this.actions.closeListbox(),null==(n=this.state.buttonElement)||n.focus({preventScroll:!0}))})}static new({id:e,__demoMode:t=!1}){return new el({id:e,dataRef:{current:{}},listboxState:+!t,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,buttonElement:null,optionsElement:null,pendingShouldSort:!1,pendingFocus:{focus:W.Focus.Nothing},frozenValue:!1,__demoMode:t,buttonPositionState:J.ElementPositionState.Idle})}reduce(e,t){return(0,$.match)(t.type,es,e,t)}}var ea=e.i(26599);let eu=(0,l.createContext)(null);function ec(e){let t=(0,l.useContext)(eu);if(null===t){let t=Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,ed),t}return t}function ed({id:e,__demoMode:t=!1}){let n=(0,l.useMemo)(()=>el.new({id:e,__demoMode:t}),[]);return(0,ea.useOnUnmount)(()=>n.dispose()),n}let ef=(0,l.createContext)(null);function ep(e){let t=(0,l.useContext)(ef);if(null===t){let t=Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,ep),t}return t}ef.displayName="ListboxDataContext";let em=l.Fragment,ev=(0,l.createContext)(!1),eh=G.RenderFeatures.RenderStrategy|G.RenderFeatures.Static,eb=l.Fragment,eg=(0,G.forwardRefWithAs)(function(e,t){let n=(0,l.useId)(),o=(0,M.useDisabled)(),{value:r,defaultValue:i,form:s,name:a,onChange:u,by:p,invalid:m=!1,disabled:v=o||!1,horizontal:h=!1,multiple:b=!1,__demoMode:y=!1,...E}=e,x=(0,F.useSyncRefs)(t),R=(0,f.useDefaultValue)(i),[w=b?[]:void 0,P]=(0,d.useControllable)(r,u,R),O=ed({id:n,__demoMode:y}),T=(0,l.useRef)({static:!1,hold:!1}),C=(0,l.useRef)(new Map),A=(0,c.useByComparator)(p),L=(0,l.useCallback)(e=>(0,$.match)(W.mode,{[en.Multi]:()=>w.some(t=>A(t,e)),[en.Single]:()=>A(w,e)}),[w]),W=(0,I.useSlot)({value:w,disabled:v,invalid:m,mode:b?en.Multi:en.Single,orientation:h?"horizontal":"vertical",onChange:P,compare:A,isSelected:L,optionsPropsRef:T,listRef:C});(0,g.useIsoMorphicEffect)(()=>{O.state.dataRef.current=W},[W]);let _=(0,H.useSlice)(O,e=>e.listboxState),V=B.stackMachines.get(null),z=(0,H.useSlice)(V,(0,l.useCallback)(e=>V.selectors.isTop(e,n),[V,n])),[j,U]=(0,H.useSlice)(O,e=>[e.buttonElement,e.optionsElement]);(0,S.useOutsideClick)(z,[j,U],(e,t)=>{O.send({type:er.CloseListbox}),(0,K.isFocusableElement)(t,K.FocusableMode.Loose)||(e.preventDefault(),null==j||j.focus())});let q=(0,I.useSlot)({open:_===et.Open,disabled:v,invalid:m,value:w}),[Y,X]=(0,Q.useLabels)({inherit:!0}),J=(0,l.useCallback)(()=>
4{if(void 0!==R)return null==P?void 0:P(R)},[P,R]),Z=(0,G.useRender)();return l.default.createElement(X,{value:Y,props:{htmlFor:null==j?void 0:j.id},slot:{open:_===et.Open,disabled:v}},l.default.createElement(D.FloatingProvider,null,l.default.createElement(eu.Provider,{value:O},l.default.createElement(ef.Provider,{value:W},l.default.createElement(N.OpenClosedProvider,{value:(0,$.match)(_,{[et.Open]:N.State.Open,[et.Closed]:N.State.Closed})},null!=a&&null!=w&&l.default.createElement(k.FormFields,{disabled:v,data:{[a]:w},form:s,onReset:J}),Z({ourProps:{ref:x},theirProps:E,slot:q,defaultTag:em,name:"Listbox"}))))))}),ey=(0,G.forwardRefWithAs)(function(e,t){let n=(0,l.useId)(),o=(0,L.useProvidedId)(),r=ep("Listbox.Button"),c=ec("Listbox.Button"),{id:d=o||`headlessui-listbox-button-${n}`,disabled:f=r.disabled||!1,autoFocus:p=!1,...m}=e,b=(0,F.useSyncRefs)(t,(0,D.useFloatingReference)(),c.actions.setButtonElement),g=(0,D.useFloatingReferenceProps)(),[y,E,S]=(0,H.useSlice)(c,e=>[e.listboxState,e.buttonElement,e.optionsElement]),x=y===et.Open;(0,R.useQuickRelease)(x,{trigger:E,action:(0,l.useCallback)(e=>{if(null!=E&&E.contains(e.target))return R.Action.Ignore;let t=e.target.closest('[role="option"]:not([data-disabled])');return V.isHTMLElement(t)?R.Action.Select(t):null!=S&&S.contains(e.target)?R.Action.Ignore:R.Action.Close},[E,S]),close:c.actions.closeListbox,select:c.actions.selectActiveOption});let P=(0,v.useEvent)(e=>{switch(e.key){case q.Keys.Enter:(0,z.attemptSubmit)(e.currentTarget);break;case q.Keys.Space:case q.Keys.ArrowDown:e.preventDefault(),c.actions.openListbox({focus:r.value?W.Focus.Nothing:W.Focus.First});break;case q.Keys.ArrowUp:e.preventDefault(),c.actions.openListbox({focus:r.value?W.Focus.Nothing:W.Focus.Last})}}),O=(0,v.useEvent)(e=>{e.key===q.Keys.Space&&e.preventDefault()}),T=(0,h.useHandleToggle)(e=>{var t;c.state.listboxState===et.Open?((0,a.flushSync)(()=>c.actions.closeListbox()),null==(t=c.state.buttonElement)||t.focus({preventScroll:!0})):(e.preventDefault(),c.actions.openListbox({focus:W.Focus.Nothing}))}),C=(0,v.useEvent)(e=>e.preventDefault()),M=(0,Q.useLabelledBy)([d]),k=(0,U.useDescribedBy)(),{isFocusVisible:A,focusProps:N}=(0,i.useFocusRing)({autoFocus:p}),{isHovered:B,hoverProps:_}=(0,s.useHover)({isDisabled:f}),{pressed:K,pressProps:$}=(0,u.useActivePress)({disabled:f}),j=(0,I.useSlot)({open:y===et.Open,active:K||y===et.Open,disabled:f,invalid:r.invalid,value:r.value,hover:B,focus:A,autofocus:p}),Y=(0,H.useSlice)(c,e=>e.listboxState===et.Open),X=(0,G.mergeProps)(g(),{ref:b,id:d,type:(0,w.useResolveButtonType)(e,E),"aria-haspopup":"listbox","aria-controls":null==S?void 0:S.id,"aria-expanded":Y,"aria-labelledby":M,"aria-describedby":k,disabled:f||void 0,autoFocus:p,onKeyDown:P,onKeyUp:O,onKeyPress:C},T,N,_,$);return(0,G.useRender)()({ourProps:X,theirProps:m,slot:j,defaultTag:"button",name:"Listbox.Button"})}),eE=Q.Label,eS=(0,G.forwardRefWithAs)(function(e,t){let n=(0,l.useId)(),{id:o=`headlessui-listbox-options-${n}`,anchor:r,portal:i=!1,modal:s=!0,transition:u=!1,...c}=e,d=(0,D.useResolvedAnchor)(r),[f,h]=(0,l.useState)(null);d&&(i=!0);let g=ep("Listbox.Options"),y=ec("Listbox.Options"),[S,R,w,O]=(0,H.useSlice)(y,e=>[e.listboxState,e.buttonElement,e.optionsElement,e.__demoMode]),T=(0,x.useOwnerDocument)(R),M=(0,x.useOwnerDocument)(w),k=(0,N.useOpenClosed)(),[L,B]=(0,C.useTransition)(u,f,null!==k?(k&N.State.Open)===N.State.Open:S===et.Open);(0,E.useOnDisappear)(L,R,y.actions.closeListbox);let _=!O&&s&&S===et.Open;(0,P.useScrollLock)(_,M);let V=!O&&s&&S===et.Open;(0,b.useInertOthers)(V,{allowed:(0,l.useCallback)(()=>[R,w],[R,w])});let z=!(0,H.useSlice)(y,y.selectors.didButtonMove)&&L,U=(0,H.useSlice)(y,y.selectors.hasFrozenValue)&&!e.static,Q=(0,A.useFrozenData)(U,g.value),X=(0,l.useCallback)(e=>g.compare(Q,e),[g.compare,Q]),J=(0,H.useSlice)(y,e=>{var t;if(null==d||!(null!=(t=null==d?void 0:d.to)&&t.includes("selection")))return null;let n=e.options.findIndex(e=>X(e.dataRef.current.value));return -1===n&&(n=0),n}),Z=(()=>
4{if(null==d)return;if(null===J)return{...d,inner:void 0};let e=Array.from(g.listRef.current.values());return{...d,inner:{listRef:{current:e},index:J}}})(),[ee,eo]=(0,D.useFloatingPanel)(Z),er=(0,D.useFloatingPanelProps)(),ei=(0,F.useSyncRefs)(t,d?ee:null,y.actions.setOptionsElement,h),es=(0,p.useDisposables)();(0,l.useEffect)(()=>{w&&S===et.Open&&((0,j.isActiveElement)(w)||null==w||w.focus({preventScroll:!0}))},[S,w]);let el=(0,v.useEvent)(e=>{var t;switch(es.dispose(),e.key){case q.Keys.Space:if(""!==y.state.searchQuery)return e.preventDefault(),e.stopPropagation(),y.actions.search(e.key);case q.Keys.Enter:e.preventDefault(),e.stopPropagation(),y.actions.selectActiveOption();break;case(0,$.match)(g.orientation,{vertical:q.Keys.ArrowDown,horizontal:q.Keys.ArrowRight}):return e.preventDefault(),e.stopPropagation(),y.actions.goToOption({focus:W.Focus.Next});case(0,$.match)(g.orientation,{vertical:q.Keys.ArrowUp,horizontal:q.Keys.ArrowLeft}):return e.preventDefault(),e.stopPropagation(),y.actions.goToOption({focus:W.Focus.Previous});case q.Keys.Home:case q.Keys.PageUp:return e.preventDefault(),e.stopPropagation(),y.actions.goToOption({focus:W.Focus.First});case q.Keys.End:case q.Keys.PageDown:return e.preventDefault(),e.stopPropagation(),y.actions.goToOption({focus:W.Focus.Last});case q.Keys.Escape:e.preventDefault(),e.stopPropagation(),(0,a.flushSync)(()=>y.actions.closeListbox()),null==(t=y.state.buttonElement)||t.focus({preventScroll:!0});return;case q.Keys.Tab:e.preventDefault(),e.stopPropagation(),(0,a.flushSync)(()=>y.actions.closeListbox()),(0,K.focusFrom)(y.state.buttonElement,e.shiftKey?K.Focus.Previous:K.Focus.Next);break;default:1===e.key.length&&(y.actions.search(e.key),es.setTimeout(()=>y.actions.clearSearch(),350))}}),ea=(0,H.useSlice)(y,e=>{var t;return null==(t=e.buttonElement)?void 0:t.id}),eu=(0,I.useSlot)({open:S===et.Open}),ed=(0,G.mergeProps)(d?er():{},{id:o,ref:ei,"aria-activedescendant":(0,H.useSlice)(y,y.selectors.activeDescendantId),"aria-multiselectable":g.mode===en.Multi||void 0,"aria-labelledby":ea,"aria-orientation":g.orientation,onKeyDown:el,role:"listbox",tabIndex:S===et.Open?0:void 0,style:{...c.style,...eo,"--button-width":(0,m.useElementSize)(L,R,!0).width},...(0,C.transitionDataAttributes)(B)}),em=(0,G.useRender)(),ev=(0,l.useMemo)(()=>g.mode===en.Multi?g:{...g,isSelected:X},[g,X]);return l.default.createElement(Y.Portal,{enabled:!!i&&(e.static||L),ownerDocument:T},l.default.createElement(ef.Provider,{value:ev},em({ourProps:ed,theirProps:c,slot:eu,defaultTag:"div",features:eh,visible:z,name:"Listbox.Options"}
4)))}),ex=(0,G.forwardRefWithAs)(function(e,t){let n=(0,l.useId)(),{id:o=`headlessui-listbox-option-${n}`,disabled:r=!1,value:i,...s}=e,a=!0===(0,l.useContext)(ev),u=ep("Listbox.Option"),c=ec("Listbox.Option"),d=(0,H.useSlice)(c,e=>c.selectors.isActive(e,o)),f=u.isSelected(i),p=(0,l.useRef)(null),m=(0,O.useTextValue)(p),h=(0,y.useLatestValue)({disabled:r,value:i,domRef:p,get textValue(){return m()}}),b=(0,F.useSyncRefs)(t,p,e=>{e?u.listRef.current.set(o,e):u.listRef.current.delete(o)}),E=(0,H.useSlice)(c,e=>c.selectors.shouldScrollIntoView(e,o));(0,g.useIsoMorphicEffect)(()=>{if(E)return(0,_.disposables)().requestAnimationFrame(()=>{var e,t;null==(t=null==(e=p.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})},[E,p]),(0,g.useIsoMorphicEffect)(()=>{if(!a)return c.actions.registerOption(o,h),()=>c.actions.unregisterOption(o)},[h,o,a]);let S=(0,v.useEvent)(e=>{if(r)return e.preventDefault();c.actions.selectOption(i)}),x=(0,v.useEvent)(()=>{if(r)return c.actions.goToOption({focus:W.Focus.Nothing});c.actions.goToOption({focus:W.Focus.Specific,id:o})}),R=(0,T.useTrackedPointer)(),w=(0,v.useEvent)(e=>R.update(e)),P=(0,v.useEvent)(e=>{R.wasMoved(e)&&(r||d&&c.state.activationTrigger===eo.Pointer||c.actions.goToOption({focus:W.Focus.Specific,id:o},eo.Pointer))}),C=(0,v.useEvent)(e=>{R.wasMoved(e)&&(r||d&&c.state.activationTrigger===eo.Pointer&&c.actions.goToOption({focus:W.Focus.Nothing}))}),M=(0,I.useSlot)({active:d,focus:d,selected:f,disabled:r,selectedOption:f&&a}),D=a?{}:{id:o,ref:b,role:"option",tabIndex:!0===r?void 0:-1,"aria-disabled":!0===r||void 0,"aria-selected":f,disabled:void 0,onClick:S,onFocus:x,onPointerEnter:w,onMouseEnter:w,onPointerMove:P,onMouseMove:P,onPointerLeave:C,onMouseLeave:C},k=(0,G.useRender)();return!f&&a?null:k({ourProps:D,theirProps:s,slot:M,defaultTag:"div",name:"Listbox.Option"})}),eR=(0,G.forwardRefWithAs)(function(e,t){let{options:n,placeholder:o,...r}=e,i={ref:(0,F.useSyncRefs)(t)},s=ep("ListboxSelectedOption"),a=(0,I.useSlot)({}),u=void 0===s.value||null===s.value||s.mode===en.Multi&&Array.isArray(s.value)&&0===s.value.length,c=(0,G.useRender)();return l.default.createElement(ev.Provider,{value:!0},c({ourProps:i,theirProps:{...r,children:l.default.createElement(l.default.Fragment,null,o&&u?o:n)},slot:a,defaultTag:eb,name:"ListboxSelectedOption"}))}),ew=Object.assign(eg,{Button:ey,Label:eE,Options:eS,Option:ex,SelectedOption:eR});e.s(["Listbox",0,ew,"ListboxButton",0,ey,"ListboxLabel",0,eE,"ListboxOption",0,ex,"ListboxOptions",0,eS,"ListboxSelectedOption",0,eR],95470)},89895,e=>{"use strict";let t,n,o;var r=e.i(29427),i=e.i(71330),s=e.i(71645),l=e.i(74080),a=e.i(94487),u=e.i(46725),c=e.i(92704),d=e.i(14189),f=e.i(88374),p=e.i(84653),m=e.i(35696),v=e.i(77891),h=e.i(52744),b=e.i(5083),g=e.i(57138),y=e.i(44279),E=e.i(1852),S=e.i(55743),x=e.i(94316),R=e.i(49578),w=e.i(71616),P=e.i(83733),I=e.i(40143),F=e.i(19751),O=e.i(33137),T=e.i(41650),C=e.i(40407),M=e.i(65659),D=e.i(44508),k=e.i(13581),A=e.i(52265),L=e.i(97701),N=e.i(2155),B=e.i(20),H=e.i(35889),W=e.i(98348),_=e.i(22678),V=e.i(35307),K=e.i(25720),z=e.i(67310),$=Object.defineProperty,j=(e,t,n)=>{let o;return(o="symbol"!=typeof t?t+"":t)in e?$(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n,n},G=((t=G||{})[t.Open=0]="Open",t[t.Closed=1]="Closed",t),U=((n=U||{})[n.Pointer=0]="Pointer",n[n.Other=1]="Other",n),q=((o=q||{})[o.OpenMenu=0]="OpenMenu",o[o.CloseMenu=1]="CloseMenu",o[o.GoToItem=2]="GoToItem",o[o.Search=3]="Search",o[o.ClearSearch=4]="ClearSearch",o[o.RegisterItems=5]="RegisterItems",o[o.UnregisterItems=6]="UnregisterItems",o[o.SetButtonElement=7]="SetButtonElement",o[o.SetItemsElement=8]="SetItemsElement",o[o.SortItems=9]="SortItems",o[o.MarkButtonAsMoved=10]="MarkButtonAsMoved",o);function Q(e,t=e=>e){let n=null!==e.activeItemIndex?e.items[e.activeItemIndex]:null,o=(0,A.sortByDomNode)(t(e.items.slice()),e=>e.dataRef.current.domRef.current),r=n?o.indexOf(n):null;return -1===r&&(r=null),{items:o,activeItemIndex:r}}let Y={1(e){if(1===e.menuState)return e;let t=e.buttonElement?z.ElementPositionState.Tracked((0,z.computeVisualPosition)(e.buttonElement)):e.buttonPositionState;return{...e,activeItemIndex:null,pendingFocus:{focus:M.Focus.Nothing},menuState:1,buttonPositionState:t}},0:(e,t)=>0===e.menuState?e:{...e,__demoMode:!1,pendingFocus:t.focus,menuState:0,buttonPositionState:z.ElementPositionState.Idle},2:(e,t)=>{var n,o,r,i,s;if(1===e.menuState)return e;let l={...e,searchQuery:"",activationTrigger:null!=(n=t.trigger)?n:1,__demoMode:!1};if(t.focus===M.Focus.Nothing)return{...l,activeItemIndex:null};if(t.focus===M.Focus.Specific)return{...l,activeItemIndex:e.items.findIndex(e=>e.id===t.id)};if(t.focus===M.Focus.Previous){let n=e.activeItemIndex;if(null!==n){let i=e.items[n].dataRef.current.domRef,s=(0,M.calculateActiveIndex)(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==s){let t=e.items[s].dataRef.current.domRef;if((null==(o=i.current)?void 0:o.previousElementSibling)===t.current||(null==(r=t.current)?void 0:r.previousElementSibling)===null)return{...l,activeItemIndex:s}}}}else if(t.focus===M.Focus.Next){let n=e.activeItemIndex;if(null!==n){let o=e.items[n].dataRef.current.domRef,r=(0,M.calculateActiveIndex)(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==r){let t=e.items[r].dataRef.current.domRef;if((null==(i=o.current)?void 0:i.nextElementSibling)===t.current||(null==(s=t.current)?void 0:s.nextElementSibling)===null)return{...l,activeItemIndex:r}}}}let a=Q(e),u=(0,M.calculateActiveIndex)(t,{resolveItems:()=>a.items,resolveActiveIndex:()=>a.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...l,...a,activeItemIndex:u}},3:(e,t)=>
4{let n=+(""===e.searchQuery),o=e.searchQuery+t.value.toLowerCase(),r=(null!==e.activeItemIndex?e.items.slice(e.activeItemIndex+n).concat(e.items.slice(0,e.activeItemIndex+n)):e.items).find(e=>{var t;return(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(o))&&!e.dataRef.current.disabled}),i=r?e.items.indexOf(r):-1;return -1===i||i===e.activeItemIndex?{...e,searchQuery:o}:{...e,searchQuery:o,activeItemIndex:i,activationTrigger:1}},4:e=>""===e.searchQuery?e:{...e,searchQuery:"",searchActiveItemIndex:null},5:(e,t)=>{let n=e.items.concat(t.items.map(e=>e)),o=e.activeItemIndex;return e.pendingFocus.focus!==M.Focus.Nothing&&(o=(0,M.calculateActiveIndex)(e.pendingFocus,{resolveItems:()=>n,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled})),{...e,items:n,activeItemIndex:o,pendingFocus:{focus:M.Focus.Nothing},pendingShouldSort:!0}},6:(e,t)=>{let n=e.items,o=[],r=new Set(t.items);for(let[e,t]of n.entries())if(r.has(t.id)&&(o.push(e),r.delete(t.id),0===r.size))break;if(o.length>0)for(let e of(n=n.slice(),o.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,...Q(e),pendingShouldSort:!1}:e,10:e=>"Tracked"!==e.buttonPositionState.kind?e:{...e,buttonPositionState:z.ElementPositionState.Moved}};class X extends K.Machine{constructor(e){super(e),j(this,"actions",{registerItem:(0,K.batch)(()=>{let e=[],t=new Set;return[(n,o)=>{t.has(o)||(t.add(o),e.push({id:n,dataRef:o}))},()=>(t.clear(),this.send({type:5,items:e.splice(0)}))]}),unregisterItem:(0,K.batch)(()=>{let e=[];return[t=>e.push(t),()=>this.send({type:6,items:e.splice(0)})]})}),j(this,"selectors",{activeDescendantId(e){var t;let n=e.activeItemIndex,o=e.items;return null===n||null==(t=o[n])?void 0:t.id},isActive(e,t){var n;let o=e.activeItemIndex,r=e.items;return null!==o&&(null==(n=r[o])?void 0:n.id)===t},shouldScrollIntoView(e,t){return!e.__demoMode&&0===e.menuState&&0!==e.activationTrigger&&this.isActive(e,t)},didButtonMove:e=>"Moved"===e.buttonPositionState.kind}),this.on(5,()=>{this.disposables.requestAnimationFrame(()=>{this.send({type:9})})});{let e=this.state.id,t=T.stackMachines.get(null);this.disposables.add(t.on(T.ActionTypes.Push,n=>{t.selectors.isTop(n,e)||0!==this.state.menuState||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((0,z.detectMovement)(t.buttonElement,t.buttonPositionState,()=>{this.send({type:10})})))})})}static new({id:e,__demoMode:t=!1}){return new X({id:e,__demoMode:t,menuState:+!t,buttonElement:null,itemsElement:null,items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1,pendingShouldSort:!1,pendingFocus:{focus:M.Focus.Nothing},buttonPositionState:z.ElementPositionState.Idle})}reduce(e,t){return(0,L.match)(t.type,Y,e,t)}}var J=e.i(26599);let Z=(0,s.createContext)(null);function ee(e){let t=(0,s.useContext)(Z);if(null===t){let t=Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,et),t}return t}function et({id:e,__demoMode:t=!1}){let n=(0,s.useMemo)(()=>X.new({id:e,__demoMode:t}),[]);return(0,J.useOnUnmount)(()=>n.dispose()),n}let en=s.Fragment,eo=B.RenderFeatures.RenderStrategy|B.RenderFeatures.Static,er=s.Fragment,ei=(0,B.forwardRefWithAs)(function(e,t){let n=(0,s.useId)(),{__demoMode:o=!1,...r}=e,i=et({id:n,__demoMode:o}),[l,a,u]=(0,C.useSlice)(i,e=>[e.menuState,e.itemsElement,e.buttonElement]),c=(0,x.useSyncRefs)(t),f=T.stackMachines.get(null),p=(0,C.useSlice)(f,(0,s.useCallback)(e=>f.selectors.isTop(e,n),[f,n]));(0,h.useOutsideClick)(p,[u,a],(e,t)=>{var n;i.send({type:q.CloseMenu}),(0,A.isFocusableElement)(t,A.FocusableMode.Loose)||(e.preventDefault(),null==(n=i.state.buttonElement)||n.focus())});let m=(0,d.useEvent)(()=>{i.send({type:q.CloseMenu})}),v=(0,S.useSlot)({open:l===G.Open,close:m}),b=(0,B.useRender)();return s.default.createElement(F.FloatingProvider,null,s.default.createElement(Z.Provider,{value:i},s.default.createElement(O.OpenClosedProvider,{value:(0,L.match)(l,{[G.Open]:O.State.Open,[G.Closed]:O.State.Closed})},b({ourProps:{ref:c},theirProps:r,slot:v,defaultTag:en,name:"Menu"}))))}),es=(0,B.forwardRefWithAs)(function(e,t){let n=ee("Menu.Button"),o=(0,s.useId)(),{id:u=`headlessui-menu-button-${o}`,disabled:c=!1,autoFocus:p=!1,...m}=e,v=(0,s.useRef)(null),h=(0,F.useFloatingReferenceProps)(),b=(0,x.useSyncRefs)(t,v,(0,F.useFloatingReference)(),(0,d.useEvent)(e=>n.send({type:q.SetButtonElement,element:e}))),E=(0,d.useEvent)(e=>{switch(e.key){case W.Keys.Space:case W.Keys.Enter:case W.Keys.ArrowDown:e.preventDefault(),e.stopPropagation(),n.send({type:q.OpenMenu,focus:{focus:M.Focus.First}});break;case W.Keys.ArrowUp:e.preventDefault(),e.stopPropagation(),n.send({type:q.OpenMenu,focus:{focus:M.Focus.Last}})}}),R=(0,d.useEvent)(e=>{e.key===W.Keys.Space&&e.preventDefault()}),[w,P,I]=(0,C.useSlice)(n,e=>[e.menuState,e.buttonElement,e.itemsElement]),O=w===G.Open;(0,g.useQuickRelease)(O,{trigger:P,action:(0,s.useCallback)(e=>{if(null!=P&&P.contains(e.target))return g.Action.Ignore;let t=e.target.closest('[role="menuitem"]:not([data-disabled])');return k.isHTMLElement(t)?g.Action.Select(t):null!=I&&I.contains(e.target)?g.Action.Ignore:g.Action.Close},[P,I]),close:(0,s.useCallback)(()=>n.send({type:q.CloseMenu}),[]),select:(0,s.useCallback)(e=>e.click(),[])});let T=(0,f.useHandleToggle)(e=>{var t;c||(w===G.Open?((0,l.flushSync)(()=>n.send({type:q.CloseMenu}
4)),null==(t=v.current)||t.focus({preventScroll:!0})):(e.preventDefault(),n.send({type:q.OpenMenu,focus:{focus:M.Focus.Nothing},trigger:U.Pointer})))}),{isFocusVisible:D,focusProps:A}=(0,r.useFocusRing)({autoFocus:p}),{isHovered:L,hoverProps:N}=(0,i.useHover)({isDisabled:c}),{pressed:H,pressProps:_}=(0,a.useActivePress)({disabled:c}),V=(0,S.useSlot)({open:w===G.Open,active:H||w===G.Open,disabled:c,hover:L,focus:D,autofocus:p}),K=(0,B.mergeProps)(h(),{ref:b,id:u,type:(0,y.useResolveButtonType)(e,v.current),"aria-haspopup":"menu","aria-controls":null==I?void 0:I.id,"aria-expanded":w===G.Open,disabled:c||void 0,autoFocus:p,onKeyDown:E,onKeyUp:R},T,A,N,_);return(0,B.useRender)()({ourProps:K,theirProps:m,slot:V,defaultTag:"button",name:"Menu.Button"})}),el=(0,B.forwardRefWithAs)(function(e,t){let n=(0,s.useId)(),{id:o=`headlessui-menu-items-${n}`,anchor:r,portal:i=!1,modal:a=!0,transition:f=!1,...m}=e,h=(0,F.useResolvedAnchor)(r),g=ee("Menu.Items"),[y,R]=(0,F.useFloatingPanel)(h),w=(0,F.useFloatingPanelProps)(),[T,D]=(0,s.useState)(null),k=(0,x.useSyncRefs)(t,h?y:null,(0,d.useEvent)(e=>g.send({type:q.SetItemsElement,element:e})),D),[L,H]=(0,C.useSlice)(g,e=>[e.menuState,e.buttonElement]),_=(0,b.useOwnerDocument)(H),K=(0,b.useOwnerDocument)(T);h&&(i=!0);let z=(0,O.useOpenClosed)(),[$,j]=(0,P.useTransition)(f,T,null!==z?(z&O.State.Open)===O.State.Open:L===G.Open);(0,v.useOnDisappear)($,H,()=>{g.send({type:q.CloseMenu})});let U=(0,C.useSlice)(g,e=>e.__demoMode),Q=!U&&a&&L===G.Open;
4(0,E.useScrollLock)(Q,K);let Y=!U&&a&&L===G.Open;(0,p.useInertOthers)(Y,{allowed:(0,s.useCallback)(()=>[H,T],[H,T])});let X=!(0,C.useSlice)(g,g.selectors.didButtonMove)&&$;(0,s.useEffect)(()=>{T&&L===G.Open&&((0,N.isActiveElement)(T)||T.focus({preventScroll:!0}))},[L,T]),(0,I.useTreeWalker)(L===G.Open,{container:T,accept:e=>"menuitem"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let J=(0,u.useDisposables)(),Z=(0,d.useEvent)(e=>{var t,n,o;switch(J.dispose(),e.key){case W.Keys.Space:if(""!==g.state.searchQuery)return e.preventDefault(),e.stopPropagation(),g.send({type:q.Search,value:e.key});case W.Keys.Enter:if(e.preventDefault(),e.stopPropagation(),null!==g.state.activeItemIndex){let{dataRef:e}=g.state.items[g.state.activeItemIndex];null==(n=null==(t=e.current)?void 0:t.domRef.current)||n.click()}g.send({type:q.CloseMenu}),(0,A.restoreFocusIfNecessary)(g.state.buttonElement);break;case W.Keys.ArrowDown:return e.preventDefault(),e.stopPropagation(),g.send({type:q.GoToItem,focus:M.Focus.Next});case W.Keys.ArrowUp:return e.preventDefault(),e.stopPropagation(),g.send({type:q.GoToItem,focus:M.Focus.Previous});case W.Keys.Home:case W.Keys.PageUp:return e.preventDefault(),e.stopPropagation(),g.send({type:q.GoToItem,focus:M.Focus.First});case W.Keys.End:case W.Keys.PageDown:return e.preventDefault(),e.stopPropagation(),g.send({type:q.GoToItem,focus:M.Focus.Last});case W.Keys.Escape:e.preventDefault(),e.stopPropagation(),(0,l.flushSync)(()=>g.send({type:q.CloseMenu})),null==(o=g.state.buttonElement)||o.focus({preventScroll:!0});break;case W.Keys.Tab:e.preventDefault(),e.stopPropagation(),(0,l.flushSync)(()=>g.send({type:q.CloseMenu})),(0,A.focusFrom)(g.state.buttonElement,e.shiftKey?A.Focus.Previous:A.Focus.Next);break;default:1===e.key.length&&(g.send({type:q.Search,value:e.key}),J.setTimeout(()=>g.send({type:q.ClearSearch}),350))}}),et=(0,d.useEvent)(e=>{e.key===W.Keys.Space&&e.preventDefault()}),en=(0,S.useSlot)({open:L===G.Open}),er=(0,B.mergeProps)(h?w():{},{"aria-activedescendant":(0,C.useSlice)(g,g.selectors.activeDescendantId),"aria-labelledby":(0,C.useSlice)(g,e=>{var t;return null==(t=e.buttonElement)?void 0:t.id}),id:o,onKeyDown:Z,onKeyUp:et,role:"menu",tabIndex:L===G.Open?0:void 0,ref:k,style:{...m.style,...R,"--button-width":(0,c.useElementSize)($,H,!0).width},...(0,P.transitionDataAttributes)(j)}),ei=(0,B.useRender)();return s.default.createElement(V.Portal,{enabled:!!i&&(e.static||$),ownerDocument:_},ei({ourProps:er,theirProps:m,slot:en,defaultTag:"div",features:eo,visible:X,name:"Menu.Items"}))}),ea=(0,B.forwardRefWithAs)(function(e,t){let n=(0,s.useId)(),{id:o=`headlessui-menu-item-${n}`,disabled:r=!1,...i}=e,l=ee("Menu.Item"),a=(0,C.useSlice)(l,e=>l.selectors.isActive(e,o)),u=(0,s.useRef)(null),c=(0,x.useSyncRefs)(t,u),f=(0,C.useSlice)(l,e=>l.selectors.shouldScrollIntoView(e,o));(0,m.useIsoMorphicEffect)(()=>{if(f)return(0,D.disposables)().requestAnimationFrame(()=>{var e,t;null==(t=null==(e=u.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})},[f,u]);let p=(0,R.useTextValue)(u),v=(0,s.useRef)({disabled:r,domRef:u,get textValue(){return p()}});(0,m.useIsoMorphicEffect)(()=>{v.current.disabled=r},[v,r]),(0,m.useIsoMorphicEffect)(()=>(l.actions.registerItem(o,v),()=>l.actions.unregisterItem(o)),[v,o]);let h=(0,d.useEvent)(()=>{l.send({type:q.CloseMenu})}),b=(0,d.useEvent)(e=>{if(r)return e.preventDefault();l.send({type:q.CloseMenu}),(0,A.restoreFocusIfNecessary)(l.state.buttonElement)}),g=(0,d.useEvent)(()=>{if(r)return l.send({type:q.GoToItem,focus:M.Focus.Nothing});l.send({type:q.GoToItem,focus:M.Focus.Specific,id:o})}),y=(0,w.useTrackedPointer)(),E=(0,d.useEvent)(e=>y.update(e)),P=(0,d.useEvent)(e=>{y.wasMoved(e)&&(r||a||l.send({type:q.GoToItem,focus:M.Focus.Specific,id:o,trigger:U.Pointer}))}),I=(0,d.useEvent)(e=>{y.wasMoved(e)&&(r||a&&l.state.activationTrigger===U.Pointer&&l.send({type:q.GoToItem,focus:M.Focus.Nothing}))}),[F,O]=(0,_.useLabels)(),[T,k]=(0,H.useDescriptions)(),L=(0,S.useSlot)({active:a,focus:a,disabled:r,close:h}),N=(0,B.useRender)();return s.default.createElement(O,null,s.default.createElement(k,null,N({ourProps:{id:o,ref:c,role:"menuitem",tabIndex:!0===r?void 0:-1,"aria-disabled":!0===r||void 0,"aria-labelledby":F,"aria-describedby":T,disabled:void 0,onClick:b,onFocus:g,onPointerEnter:E,onMouseEnter:E,onPointerMove:P,onMouseMove:P,onPointerLeave:I,onMouseLeave:I},theirProps:i,slot:L,defaultTag:er,name:"Menu.Item"})))}),eu=(0,B.forwardRefWithAs)(function(e,t){let[n,o]=(0,_.useLabels)(),r=(0,B.useRender)();return s.default.createElement(o,null,r({ourProps:{ref:t,"aria-labelledby":n,role:"group"},theirProps:e,slot:{},defaultTag:"div",name:"Menu.Section"}))}),ec=(0,B.forwardRefWithAs)(function(e,t){let n=(0,s.useId)(),{id:o=`headlessui-menu-heading-${n}`,...r}=e,i=(0,_.useLabelContext)();(0,m.useIsoMorphicEffect)(()=>i.register(o),[o,i.register]);let l={id:o,ref:t,role:"presentation",...i.props};return(0,B.useRender)()({ourProps:l,theirProps:r,slot:{},defaultTag:"header",name:"Menu.Heading"})}),ed=(0,B.forwardRefWithAs)(function(e,t){return(0,B.useRender)()({ourProps:{ref:t,role:"separator"},theirProps:e,slot:{},defaultTag:"div",name:"Menu.Separator"})}
4),ef=Object.assign(ei,{Button:es,Items:el,Item:ea,Section:eu,Heading:ec,Separator:ed});e.s(["Menu",0,ef,"MenuButton",0,es,"MenuHeading",0,ec,"MenuItem",0,ea,"MenuItems",0,el,"MenuSection",0,eu,"MenuSeparator",0,ed],89895)},98307,e=>{"use strict";let t,n;var o=e.i(29427),r=e.i(71330),i=e.i(71645),s=e.i(94487),l=e.i(92704),a=e.i(14189),u=e.i(93456),c=e.i(35696),d=e.i(41444),f=e.i(77891),p=e.i(52744),m=e.i(5083),v=e.i(44279),h=e.i(85935),b=e.i(1852),g=e.i(55743),y=e.i(94316),E=e.i(61130),S=e.i(83733),x=e.i(74175),R=e.i(19751),w=e.i(2788),P=e.i(33137),I=e.i(40407),F=e.i(33538),O=e.i(13581),T=e.i(52265),C=e.i(97701),M=e.i(2155),D=e.i(20),k=e.i(98348),A=e.i(35307),L=e.i(25720),N=e.i(41650),B=Object.defineProperty,H=(e,t,n)=>{let o;return(o="symbol"!=typeof t?t+"":t)in e?B(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n,n},W=((t=W||{})[t.Open=0]="Open",t[t.Closed=1]="Closed",t),_=((n=_||{})[n.OpenPopover=0]="OpenPopover",n[n.ClosePopover=1]="ClosePopover",n[n.SetButton=2]="SetButton",n[n.SetButtonId=3]="SetButtonId",n[n.SetPanel=4]="SetPanel",n[n.SetPanelId=5]="SetPanelId",n);let V={0:e=>0===e.popoverState?e:{...e,popoverState:0,__demoMode:!1},1:e=>1===e.popoverState?e:{...e,popoverState:1,__demoMode:!1},2:(e,t)=>e.button===t.button?e:{...e,button:t.button},3:(e,t)=>
4e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId},4:(e,t)=>e.panel===t.panel?e:{...e,panel:t.panel},5:(e,t)=>e.panelId===t.panelId?e:{...e,panelId:t.panelId}};class K extends L.Machine{constructor(e){super(e),H(this,"actions",{close:()=>this.send({type:1}),refocusableClose:e=>{this.actions.close();let t=e?O.isHTMLElement(e)?e:"current"in e&&O.isHTMLElement(e.current)?e.current:this.state.button:this.state.button;null==t||t.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})}),H(this,"selectors",{isPortalled:e=>{var t;if(!e.button||!e.panel)return!1;let n=null!=(t=(0,M.getOwnerDocument)(e.button))?t:document;for(let t of n.querySelectorAll("body > *"))if(Number(null==t?void 0:t.contains(e.button))^Number(null==t?void 0:t.contains(e.panel)))return!0;let o=(0,T.getFocusableElements)(n),r=o.indexOf(e.button),i=(r+o.length-1)%o.length,s=(r+1)%o.length,l=o[i],a=o[s];return!e.panel.contains(l)&&!e.panel.contains(a)}});{let e=this.state.id,t=N.stackMachines.get(null);this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}}static new({id:e,__demoMode:t=!1}){return new K({id:e,__demoMode:t,popoverState:+!t,buttons:{current:[]},button:null,buttonId:null,panel:null,panelId:null,beforePanelSentinel:{current:null},afterPanelSentinel:{current:null},afterButtonSentinel:{current:null}})}reduce(e,t){return(0,C.match)(t.type,V,e,t)}}var z=e.i(26599);let $=(0,i.createContext)(null);function j(e){let t=(0,i.useContext)($);if(null===t){let t=Error(`<${e} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,j),t}return t}let G=(0,i.createContext)(null);function U(){return(0,i.useContext)(G)}G.displayName="PopoverGroupContext";let q=(0,i.createContext)(null);q.displayName="PopoverPanelContext";let Q=D.RenderFeatures.RenderStrategy|D.RenderFeatures.Static;function Y(e,t){let n=(0,i.useId)(),{id:o=`headlessui-popover-backdrop-${n}`,transition:r=!1,...s}=e,l=j("Popover.Backdrop"),u=(0,I.useSlice)(l,(0,i.useCallback)(e=>e.popoverState,[])),[c,d]=(0,i.useState)(null),f=(0,y.useSyncRefs)(t,d),p=(0,P.useOpenClosed)(),[m,v]=(0,S.useTransition)(r,c,null!==p?(p&P.State.Open)===P.State.Open:u===W.Open),h=(0,a.useEvent)(e=>{if((0,F.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();l.actions.close()}),b=(0,g.useSlot)({open:u===W.Open}),E={ref:f,id:o,"aria-hidden":!0,onClick:h,...(0,S.transitionDataAttributes)(v)};return(0,D.useRender)()({ourProps:E,theirProps:s,slot:b,defaultTag:"div",features:Q,visible:m,name:"Popover.Backdrop"})}let X=D.RenderFeatures.RenderStrategy|D.RenderFeatures.Static,J=(0,D.forwardRefWithAs)(function(e,t){var n;let o=(0,i.useId)(),{__demoMode:r=!1,...s}=e,l=function({id:e,__demoMode:t=!1}){let n=(0,i.useMemo)(()=>K.new({id:e,__demoMode:t}),[]);return(0,z.useOnUnmount)(()=>n.dispose()),n}({id:o,__demoMode:r}),c=(0,i.useRef)(null),f=(0,y.useSyncRefs)(t,(0,y.optionalRef)(e=>{c.current=e})),[v,b,E,S,w]=(0,I.useSlice)(l,(0,i.useCallback)(e=>[e.popoverState,e.button,e.panel,e.buttonId,e.panelId],[])),F=(0,m.useRootDocument)(null!=(n=c.current)?n:b),k=(0,d.useLatestValue)(S),L=(0,d.useLatestValue)(w),N=(0,i.useMemo)(()=>({buttonId:k,panelId:L,close:l.actions.close}),[k,L,l]),B=U(),H=null==B?void 0:B.registerPopover,_=(0,a.useEvent)(()=>{var e,t;let n=(0,M.getActiveElement)(null!=(e=c.current)?e:b);return null!=(t=null==B?void 0:B.isFocusWithinPopoverGroup())?t:n&&((null==b?void 0:b.contains(n))||(null==E?void 0:E.contains(n)))});(0,i.useEffect)(()=>null==H?void 0:H(N),[H,N]);let[V,j]=(0,A.useNestedPortals)(),G=(0,h.useMainTreeNode)(b),Q=(0,h.useRootContainers)({mainTreeNode:G,portals:V,defaultContainers:[{get current(){return l.state.button}},{get current(){return l.state.panel}}]});(0,u.useEventListener)(F,"focus",e=>{var t,n,o,r,i,s;e.target!==window&&O.isHTMLorSVGElement(e.target)&&l.state.popoverState===W.Open&&(_()||l.state.button&&l.state.panel&&(Q.contains(e.target)||null!=(n=null==(t=l.state.beforePanelSentinel.current)?void 0:t.contains)&&n.call(t,e.target)||null!=(r=null==(o=l.state.afterPanelSentinel.current)?void 0:o.contains)&&r.call(o,e.target)||null!=(s=null==(i=l.state.afterButtonSentinel.current)?void 0:i.contains)&&s.call(i,e.target)||l.actions.close()))},!0);let Y=v===W.Open;(0,p.useOutsideClick)(Y,Q.resolveContainers,(e,t)=>{l.actions.close(),(0,T.isFocusableElement)(t,T.FocusableMode.Loose)||(e.preventDefault(),null==b||b.focu
4s())});let X=(0,g.useSlot)({open:v===W.Open,close:l.actions.refocusableClose}),J=(0,I.useSlice)(l,(0,i.useCallback)(e=>(0,C.match)(e.popoverState,{[W.Open]:P.State.Open,[W.Closed]:P.State.Closed}),[])),Z=(0,D.useRender)();return i.default.createElement(h.MainTreeProvider,{node:G},i.default.createElement(R.FloatingProvider,null,i.default.createElement(q.Provider,{value:null},i.default.createElement($.Provider,{value:l},i.default.createElement(x.CloseProvider,{value:l.actions.refocusableClose},i.default.createElement(P.OpenClosedProvider,{value:J},i.default.createElement(j,null,Z({ourProps:{ref:f},theirProps:s,slot:X,defaultTag:"div",name:"Popover"}))))))))}),Z=(0,D.forwardRefWithAs)(function(e,t){let n=(0,i.useId)(),{id:l=`headlessui-popover-button-${n}`,disabled:u=!1,autoFocus:c=!1,...d}=e,f=j("Popover.Button"),[p,m,h,b,S,x,P]=(0,I.useSlice)(f,(0,i.useCallback)(e=>[e.popoverState,f.selectors.isPortalled(e),e.button,e.buttonId,e.panel,e.panelId,e.afterButtonSentinel],[])),A=(0,i.useRef)(null),L=`headlessui-focus-sentinel-${(0,i.useId)()}`,N=U(),B=null==N?void 0:N.closeOthers,H=null!==(0,i.useContext)(q);(0,i.useEffect)(()=>{if(!H)return f.actions.setButtonId(l),()=>f.actions.setButtonId(null)},[H,l,f]);let[_]=(0,i.useState)(()=>Symbol()),V=(0,y.useSyncRefs)(A,t,(0,R.useFloatingReference)(),(0,a.useEvent)(e=>{if(!H){if(e)f.state.buttons.current.push(_);else{let e=f.state.buttons.current.indexOf(_);-1!==e&&f.state.buttons.current.splice(e,1)}f.state.buttons.current.length>1&&console.warn("You are already using a <Popover.Button /> but only 1 <Popover.Button /> is supported."),e&&f.actions.setButton(e)}})),K=(0,y.useSyncRefs)(A,t),z=(0,a.useEvent)(e=>{var t,n,o;if(H){if(f.state.popoverState===W.Closed)return;switch(e.key){case k.Keys.Space:case k.Keys.Enter:e.preventDefault(),null==(n=(t=e.target).click)||n.call(t),f.actions.close(),null==(o=f.state.button)||o.focus()}}else switch(e.key){case k.Keys.Space:case k.Keys.Enter:e.preventDefault(),e.stopPropagation(),f.state.popoverState===W.Closed?(null==B||B(f.state.buttonId),f.actions.open()):f.actions.close();break;case k.Keys.Escape:if(f.state.popoverState!==W.Open)return null==B?void 0:B(f.state.buttonId);if(!A.current)return;let r=(0,M.getActiveElement)(A.current);if(r&&!A.current.contains(r))return;e.preventDefault(),e.stopPropagation(),f.actions.close()}}),$=(0,a.useEvent)(e=>{H||e.key===k.Keys.Space&&e.preventDefault()}),G=(0,a.useEvent)(e=>{var t,n;(0,F.isDisabledReactIssue7711)(e.currentTarget)||u||(H?(f.actions.close(),null==(t=f.state.button)||t.focus()):(e.preventDefault(),e.stopPropagation(),f.state.popoverState===W.Closed?(null==B||B(f.state.buttonId),f.actions.open()):f.actions.close(),null==(n=f.state.button)||n.focus()))}),Q=(0,a.useEvent)(e=>{e.preventDefault(),e.stopPropagation()}),{isFocusVisible:Y,focusProps:X}=(0,o.useFocusRing)({autoFocus:c}),{isHovered:J,hoverProps:Z}=(0,r.useHover)({isDisabled:u}),{pressed:ee,pressProps:et}=(0,s.useActivePress)({disabled:u}),en=p===W.Open,eo=(0,g.useSlot)({open:en,active:ee||en,disabled:u,hover:J,focus:Y,autofocus:c}),er=(0,v.useResolveButtonType)(e,h),ei=H?(0,D.mergeProps)({ref:K,type:er,onKeyDown:z,onClick:G,disabled:u||void 0,autoFocus:c},X,Z,et):(0,D.mergeProps)({ref:V,id:b,type:er,"aria-expanded":p===W.Open,"aria-controls":S?x:void 0,disabled:u||void 0,autoFocus:c,onKeyDown:z,onKeyUp:$,onClick:G,onMouseDown:Q},X,Z,et),es=(0,E.useTabDirection)(),el=(0,a.useEvent)(()=>{if(!O.isHTMLElement(f.state.panel))return;let e=f.state.panel;(0,C.match)(es.current,{[E.Direction.Forwards]:()=>(0,T.focusIn)(e,T.Focus.First),[E.Direction.Backwards]:()=>(0,T.focusIn)(e,T.Focus.Last)})===T.FocusResult.Error&&(0,T.focusIn)((0,T.getFocusableElements)((0,M.getRootNode)(f.state.button)).filter(e=>"true"!==e.dataset.headlessuiFocusGuard),(0,C.match)(es.current,{[E.Direction.Forwards]:T.Focus.Next,[E.Direction.Backwards]:T.Focus.Previous}),{relativeTo:f.state.button})}),ea=(0,D.useRender)();return i.default.createElement(i.default.Fragment,null,ea({ourProps:ei,theirProps:d,slot:eo,defaultTag:"button",name:"Popover.Button"}),en&&!H&&m&&i.default.createElement(w.Hidden,{id:L,ref:P,features:w.HiddenFeatures.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:el}))}),ee=(0,D.forwardRefWithAs)(Y),et=(0,D.forwardRefWithAs)(Y),en=(0,D.forwardRefWithAs)(function(e,t){let n=(0,i.useId)(),{id:o=`headlessui-popover-panel-${n}`,focus:r=!1,anchor:s,portal:u=!1,modal:d=!1,transition:p=!1,...v}=e,h=j("Popover.Panel"),F=(0,I.useSlice)(h,h.selectors.isPortalled),[O,L,N,B,H]=(0,I.useSlice)(h,(0,i.useCallback)(e=>[e.popoverState,e.button,e.__demoMode,e.beforePanelSentinel,e.afterPanelSentinel],[])),_=`headlessui-focus-sentinel-before-${n}`,V=`headlessui-focus-sentinel-after-${n}`,K=(0,i.useRef)(null),z=(0,R.useResolvedAnchor)(s),[$,G]=(0,R.useFloatingPanel)(z),U=(0,R.useFloatingPanelProps)();z&&(u=!0);let[Q,Y]=(0,i.useState)(null),J=(0,y.useSyncRefs)(K,t,z?$:null,h.actions.setPanel,Y),Z=(0,m.useOwnerDocument)(L),ee=(0,m.useOwnerDocument)(K.current);(0,c.useIsoMorphicEffect)(()=>(h.actions.setPanelId(o),()=>h.actions.setPanelId(null)),[o,h]);let et=(0,P.useOpenClosed)(),[en,eo]=(0,S.useTransition)(p,Q,null!==et?(et&P.State.Open)===P.State.Open:O===W.Open);(0,f.useOnDisappear)(en,L,h.actions.close),(0,b.useScrollLock)(!N&&d&&en,ee);let er=(0,a.useEvent)(e=>{var t;if(e.key===k.Keys.Escape){if(h.state.popoverState!==W.Open||!K.current)return;let n=(0,M.getActiveElement)(K.current);if(n&&!K.current.contains(n))return;e.preventDefault(),e.stopPropagation(),h.actions.close(),null==(t=h.state.button)||t.focu
4s()}});(0,i.useEffect)(()=>{var t;e.static||O===W.Closed&&(null==(t=e.unmount)||t)&&h.actions.setPanel(null)},[O,e.unmount,e.static,h]),(0,i.useEffect)(()=>{if(N||!r||O!==W.Open||!K.current)return;let e=(0,M.getActiveElement)(K.current);K.current.contains(e)||(0,T.focusIn)(K.current,T.Focus.First)},[N,r,K.current,O]);let ei=(0,g.useSlot)({open:O===W.Open,close:h.actions.refocusableClose}),es=(0,D.mergeProps)(z?U():{},{ref:J,id:o,onKeyDown:er,onBlur:r&&O===W.Open?e=>{var t,n,o,r,i;let s=e.relatedTarget;s&&K.current&&(null!=(t=K.current)&&t.contains(s)||(h.actions.close(),(null!=(o=null==(n=B.current)?void 0:n.contains)&&o.call(n,s)||null!=(i=null==(r=H.current)?void 0:r.contains)&&i.call(r,s))&&s.focus({preventScroll:!0})))}:void 0,tabIndex:-1,style:{...v.style,...G,"--button-width":(0,l.useElementSize)(en,L,!0).width},...(0,S.transitionDataAttributes)(eo)}),el=(0,E.useTabDirection)(),ea=(0,a.useEvent)(()=>{let e=K.current;e&&(0,C.match)(el.current,{[E.Direction.Forwards]:()=>{var t;(0,T.focusIn)(e,T.Focus.First)===T.FocusResult.Error&&(null==(t=h.state.afterPanelSentinel.current)||t.focus())},[E.Direction.Backwards]:()=>{var e;null==(e=h.state.button)||e.focus({preventScroll:!0})}})}),eu=(0,a.useEvent)(()=>{let e=K.current;e&&(0,C.match)(el.current,{[E.Direction.Forwards]:()=>{var e;if(!h.state.button)return;let t=null!=(e=(0,M.getRootNode)(h.state.button))?e:document.body,n=(0,T.getFocusableElements)(t),o=n.indexOf(h.state.button),r=n.slice(0,o+1),i=[...n.slice(o+1),...r];for(let e of i.slice())if("true"===e.dataset.headlessuiFocusGuard||null!=Q&&Q.contains(e)){let t=i.indexOf(e);-1!==t&&i.splice(t,1)}(0,T.focusIn)(i,T.Focus.First,{sorted:!1})},[E.Direction.Backwards]:()=>{var t;(0,T.focusIn)(e,T.Focus.Previous)===T.FocusResult.Error&&(null==(t=h.state.button)||t.focus())}})}),ec=(0,D.useRender)();return i.default.createElement(P.ResetOpenClosedProvider,null,i.default.createElement(q.Provider,{value:o},i.default.createElement(x.CloseProvider,{value:h.actions.refocusableClose},i.default.createElement(A.Portal,{enabled:!!u&&(e.static||en),ownerDocument:Z},en&&F&&i.default.createElement(w.Hidden,{id:_,ref:B,features:w.HiddenFeatures.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:ea}),ec({ourProps:es,theirProps:v,slot:ei,defaultTag:"div",features:X,visible:en,name:"Popover.Panel"}),en&&F&&i.default.createElement(w.Hidden,{id:V,ref:H,features:w.HiddenFeatures.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:eu})))))}),eo=(0,D.forwardRefWithAs)(function(e,t){let n=(0,i.useRef)(null),o=(0,y.useSyncRefs)(n,t),[r,s]=(0,i.useState)([]),l=(0,a.useEvent)(e=>{s(t=>{let n=t.indexOf(e);if(-1!==n){let e=t.slice();return e.splice(n,1),e}return t})}),u=(0,a.useEvent)(e=>(s(t=>[...t,e]),()=>l(e))),c=(0,a.useEvent)(()=>{var e;let t=(0,M.getRootNode)(n.current);if(!t)return!1;let o=(0,M.getActiveElement)(n.current);return!!(null!=(e=n.current)&&e.contains(o))||r.some(e=>{var n,r;return(null==(n=t.getElementById(e.buttonId.current))?void 0:n.contains(o))||(null==(r=t.getElementById(e.panelId.current))?void 0:r.contains(o))})}),d=(0,a.useEvent)(e=>{for(let t of r)t.buttonId.current!==e&&t.close()}),f=(0,i.useMemo)(()=>({registerPopover:u,unregisterPopover:l,isFocusWithinPopoverGroup:c,closeOthers:d}),[u,l,c,d]),p=(0,g.useSlot)({}),m=(0,D.useRender)();return i.default.createElement(h.MainTreeProvider,null,i.default.createElement(G.Provider,{value:f},m({ourProps:{ref:o},theirProps:e,slot:p,defaultTag:"div",name:"Popover.Group"})))}),er=Object.assign(J,{Button:Z,Backdrop:et,Overlay:ee,Panel:en,Group:eo});e.s(["Popover",0,er,"PopoverBackdrop",0,et,"PopoverButton",0,Z,"PopoverGroup",0,eo,"PopoverOverlay",0,ee,"PopoverPanel",0,en],98307)},53501,e=>{"use strict";let t;var n=e.i(29427),o=e.i(71330),r=e.i(71645),i=e.i(36289),s=e.i(3269),l=e.i(14520),a=e.i(14189),u=e.i(35696),c=e.i(41444),d=e.i(55743),f=e.i(94316),p=e.i(1893),m=e.i(40721),v=e.i(42803),h=e.i(33538),b=e.i(52265),g=e.i(94421),y=e.i(97701),E=e.i(2155),S=e.i(20),x=e.i(35889),R=e.i(98348),w=e.i(22678),P=((t=P||{})[t.RegisterOption=0]="RegisterOption",t[t.UnregisterOption=1]="UnregisterOption",t);let I={0(e,t){let n=[...e.options,{id:t.id,element:t.element,propsRef:t.propsRef}];return{...e,options:(0,b.sortByDomNode)(n,e=>e.element.current)}},1(e,t){let n=e.options.slice(),o=e.options.findIndex(e=>e.id===t.id);return -1===o?e:(n.splice(o,1),{...e,options:n})}},F=(0,r.createContext)(null);function O(e){let t=(0,r.useContext)(F);if(null===t){let t=Error(`<${e} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,O),t}return t}F.displayName="RadioGroupDataContext";let T=(0,r.createContext)(null);function C(e){let t=(0,r.useContext)(T);if(null===t){let t=Error(`<${e} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,C),t}return t}function M(e,t){return(0,y.match)(t.type,I,e,t)}T.displayName="RadioGroupActionsContext";let D=(0,S.forwardRefWithAs)(function(e,t){let n=(0,r.useId)(),o=(0,p.useDisabled)(),{id:u=`headlessui-radiogroup-${n}`,value:c,form:v,name:h,onChange:y,by:P,disabled:I=o||!1,defaultValue:O,tabIndex:C=0,...D}=e,k=(0,i.useByComparator)(P),[A,L]=(0,r.useReducer)(M,{options:[]}),N=A.options,[B,H]=(0,w.useLabels)(),[W,_]=(0,x.useDescriptions)(),V=(0,r.useRef)(null),K=(0,f.useSyncRefs)(V,t),z=(0,l.useDefaultValue)(O),[$,j]=(0,s.useControllable)(c,y,z),G=(0,r.useMemo)(()=>N.find(e=>!e.propsRef.current.disabled),[N]),U=(0,r.useMemo)(()=>N.some(e=>k(e.propsRef.current.value,$)),[N,$]),q=(0,a.useEvent)(e=>{var t;if(I||k(e,$))return!1;let n=null==(t=N.find(t=>k(t.propsRef.current.value,e)))?void 0:t.propsRef.current;return(null==n||!n.disabled)&&(null==j||j(e),!0)}),Q=(0,a.useEvent)(e=>{if(!V.current)return;let t=N.filter(e=>!1===e.propsRef.current.disabled).map(e=>e.element.current);switch(e.key){case R.Keys.Enter:(0,g.attemptSubmit)(e.currentTarget);break;case R.Keys.ArrowLeft:case R.Keys.ArrowUp:if(e.preventDefault(),e.stopPropagation(),(0,b.focusIn)(t,b.Focus.Previous|b.Focus.WrapAround)===b.FocusResult.Success){let e=N.find(e=>(0,E.isActiveElement)(e.element.current));e&&q(e.propsRef.current.value)}break;case R.Keys.ArrowRight:case R.Keys.ArrowDown:if(e.preventDefault(),e.stopPropagation(),(0,b.focusIn)(t,b.Focus.Next|b.Focus.WrapAround)===b.FocusResult.Success){let e=N.find(e=>(0,E.isActiveElement)(e.element.current));e&&q(e.propsRef.current.value)}break;case R.Keys.Space:{e.preventDefault(),e.stopPropagation();let t=N.find(e=>(0,E.isActiveElement)(e.element.current));t&&q(t.propsRef.current.value)}}}),Y=(0,a.useEvent)(e=>(L({type:0,...e}),()=>L({type:1,id:e.id}))),X=(0,r.useMemo)(()=>({value:$,firstOption:G,containsCheckedOption:U,disabled:I,compare:k,tabIndex:C,...A}),[$,G,U,I,k,C,A]),J=(0,r.useMemo)(()=>({registerOption:Y,change:q}),[Y,q]),Z=(0,d.useSlot)({value:$}),ee=(0,r.useCallback)(()=>
4{if(void 0!==z)return q(z)},[q,z]),et=(0,S.useRender)();return r.default.createElement(_,{name:"RadioGroup.Description"},r.default.createElement(H,{name:"RadioGroup.Label"},r.default.createElement(T.Provider,{value:J},r.default.createElement(F.Provider,{value:X},null!=h&&r.default.createElement(m.FormFields,{disabled:I,data:{[h]:$||"on"},overrides:{type:"radio",checked:null!=$},form:v,onReset:ee}),et({ourProps:{ref:K,id:u,role:"radiogroup","aria-labelledby":B,"aria-describedby":W,onKeyDown:Q},theirProps:D,slot:Z,defaultTag:"div",name:"RadioGroup"})))))}),k=(0,S.forwardRefWithAs)(function(e,t){var i;let s=O("RadioGroup.Option"),l=C("RadioGroup.Option"),p=(0,r.useId)(),{id:m=`headlessui-radiogroup-option-${p}`,value:v,disabled:b=s.disabled||!1,autoFocus:g=!1,...y}=e,E=(0,r.useRef)(null),R=(0,f.useSyncRefs)(E,t),[P,I]=(0,w.useLabels)(),[F,T]=(0,x.useDescriptions)(),M=(0,c.useLatestValue)({value:v,disabled:b});(0,u.useIsoMorphicEffect)(()=>l.registerOption({id:m,element:E,propsRef:M}),[m,l,E,M]);let D=(0,a.useEvent)(e=>{var t;if((0,h.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();l.change(v)&&(null==(t=E.current)||t.focus())}),k=(null==(i=s.firstOption)?void 0:i.id)===m,{isFocusVisible:A,focusProps:L}=(0,n.useFocusRing)({autoFocus:g}),{isHovered:N,hoverProps:B}=(0,o.useHover)({isDisabled:b}),H=s.compare(s.value,v),W=(0,S.mergeProps)({ref:R,id:m,role:"radio","aria-checked":H?"true":"false","aria-labelledby":P,"aria-describedby":F,"aria-disabled":!!b||void 0,tabIndex:b?-1:H||!s.containsCheckedOption&&k?s.tabIndex:-1,onClick:b?void 0:D,autoFocus:g},L,B),_=(0,d.useSlot)({checked:H,disabled:b,active:A,hover:N,focus:A,autofocus:g}),V=(0,S.useRender)();return r.default.createElement(T,{name:"RadioGroup.Description"},r.default.createElement(I,{name:"RadioGroup.Label"},V({ourProps:W,theirProps:y,slot:_,defaultTag:"div",name:"RadioGroup.Option"})))}),A=(0,S.forwardRefWithAs)(function(e,t){var i;let s=O("Radio"),l=C("Radio"),m=(0,r.useId)(),b=(0,v.useProvidedId)(),g=(0,p.useDisabled)(),{id:y=b||`headlessui-radio-${m}`,value:E,disabled:R=s.disabled||g||!1,autoFocus:P=!1,...I}=e,F=(0,r.useRef)(null),T=(0,f.useSyncRefs)(F,t),M=(0,w.useLabelledBy)(),D=(0,x.useDescribedBy)(),k=(0,c.useLatestValue)({value:E,disabled:R});(0,u.useIsoMorphicEffect)(()=>l.registerOption({id:y,element:F,propsRef:k}),[y,l,F,k]);let A=(0,a.useEvent)(e=>{var t;if((0,h.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();l.change(E)&&(null==(t=F.current)||t.focus())}),{isFocusVisible:L,focusProps:N}=(0,n.useFocusRing)({autoFocus:P}),{isHovered:B,hoverProps:H}=(0,o.useHover)({isDisabled:R}),W=(null==(i=s.firstOption)?void 0:i.id)===y,_=s.compare(s.value,E),V=(0,S.mergeProps)({ref:T,id:y,role:"radio","aria-checked":_?"true":"false","aria-labelledby":M,"aria-describedby":D,"aria-disabled":!!R||void 0,tabIndex:R?-1:_||!s.containsCheckedOption&&W?s.tabIndex:-1,autoFocus:P,onClick:R?void 0:A},N,H),K=(0,d.useSlot)({checked:_,disabled:R,hover:B,focus:L,autofocus:P});return(0,S.useRender)()({ourProps:V,theirProps:I,slot:K,defaultTag:"span",name:"Radio"})}),L=w.Label,N=x.Description,B=Object.assign(D,{Option:k,Radio:A,Label:L,Description:N});e.s(["Radio",0,A,"RadioGroup",0,B,"RadioGroupDescription",0,N,"RadioGroupLabel",0,L,"RadioGroupOption",0,k])},62499,e=>{"use strict";var t=e.i(29427),n=e.i(71330),o=e.i(94487),r=e.i(71645),i=e.i(55743),s=e.i(1893),l=e.i(42803),a=e.i(20),u=e.i(35889),c=e.i(22678);let d=(0,a.forwardRefWithAs)(function(e,d){let f=(0,r.useId)(),p=(0,l.useProvidedId)(),m=(0,s.useDisabled)(),{id:v=p||`headlessui-select-${f}`,disabled:h=m||!1,invalid:b=!1,autoFocus:g=!1,...y}=e,E=(0,c.useLabelledBy)(),S=(0,u.useDescribedBy)(),{isFocusVisible:x,focusProps:R}=(0,t.useFocusRing)({autoFocus:g}),{isHovered:w,hoverProps:P}=(0,n.useHover)({isDisabled:h}),{pressed:I,pressProps:F}=(0,o.useActivePress)({disabled:h}),O=(0,a.mergeProps)({ref:d,id:v,"aria-labelledby":E,"aria-describedby":S,"aria-invalid":b?"true":void 0,disabled:h||void 0,autoFocus:g},R,P,F),T=(0,i.useSlot)({disabled:h,invalid:b,hover:w,focus:x,active:I,autofocus:g});return(0,a.useRender)()({ourProps:O,theirProps:y,slot:T,defaultTag:"select",name:"Select"})});e.s(["Select",0,d])},68497,e=>{"use strict";var t=e.i(29427),n=e.i(71330),o=e.i(71645),r=e.i(94487),i=e.i(3269),s=e.i(14520),l=e.i(46725),a=e.i(14189),u=e.i(44279),c=e.i(55743),d=e.i(94316),f=e.i(1893),p=e.i(40721),m=e.i(42803),v=e.i(33538),h=e.i(13581),b=e.i(94421),g=e.i(20),y=e.i(35889),E=e.i(98348),S=e.i(22678);let x=(0,o.createContext)(null);x.displayName="GroupContext";let R=o.Fragment,w=(0,g.forwardRefWithAs)(function(e,h){var R;let w=(0,o.useId)(),P=(0,m.useProvidedId)(),I=(0,f.useDisabled)(),{id:F=P||`headlessui-switch-${w}`,disabled:O=I||!1,checked:T,defaultChecked:C,onChange:M,name:D,value:k,form:A,autoFocus:L=!1,...
4N}=e,B=(0,o.useContext)(x),[H,W]=(0,o.useState)(null),_=(0,o.useRef)(null),V=(0,d.useSyncRefs)(_,h,null===B?null:B.setSwitch,W),K=(0,s.useDefaultValue)(C),[z,$]=(0,i.useControllable)(T,M,null!=K&&K),j=(0,l.useDisposables)(),[G,U]=(0,o.useState)(!1),q=(0,a.useEvent)(()=>{U(!0),null==$||$(!z),j.nextFrame(()=>{U(!1)})}),Q=(0,a.useEvent)(e=>{if((0,v.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),q()}),Y=(0,a.useEvent)(e=>{e.key===E.Keys.Space?(e.preventDefault(),q()):e.key===E.Keys.Enter&&(0,b.attemptSubmit)(e.currentTarget)}),X=(0,a.useEvent)(e=>e.preventDefault()),J=(0,S.useLabelledBy)(),Z=(0,y.useDescribedBy)(),{isFocusVisible:ee,focusProps:et}=(0,t.useFocusRing)({autoFocus:L}),{isHovered:en,hoverProps:eo}=(0,n.useHover)({isDisabled:O}),{pressed:er,pressProps:ei}=(0,r.useActivePress)({disabled:O}),es=(0,c.useSlot)({checked:z,disabled:O,hover:en,focus:ee,active:er,autofocus:L,changing:G}),el=(0,g.mergeProps)({id:F,ref:V,role:"switch",type:(0,u.useResolveButtonType)(e,H),tabIndex:-1===e.tabIndex?0:null!=(R=e.tabIndex)?R:0,"aria-checked":z,"aria-labelledby":J,"aria-describedby":Z,disabled:O||void 0,autoFocus:L,onClick:Q,onKeyUp:Y,onKeyPress:X},et,eo,ei),ea=(0,o.useCallback)(()=>{if(void 0!==K)return null==$?void 0:$(K)},[$,K]),eu=(0,g.useRender)();return o.default.createElement(o.default.Fragment,null,null!=D&&o.default.createElement(p.FormFields,{disabled:O,data:{[D]:k||"on"},overrides:{type:"checkbox",checked:z},form:A,onReset:ea}),eu({ourProps:el,theirProps:N,slot:es,defaultTag:"button",name:"Switch"}))}),P=function(e){var t;let[n,r]=(0,o.useState)(null),[i,s]=(0,S.useLabels)(),[l,a]=(0,y.useDescriptions)(),u=(0,o.useMemo)(()=>({switch:n,setSwitch:r}),[n,r]),c=(0,g.useRender)();return o.default.createElement(a,{name:"Switch.Description",value:l},o.default.createElement(s,{name:"Switch.Label",value:i,props:{htmlFor:null==(t=u.switch)?void 0:t.id,onClick(e){n&&(h.isHTMLLabelElement(e.currentTarget)&&e.preventDefault(),n.click(),n.focus({preventScroll:!0}))}}},o.default.createElement(x.Provider,{value:u},c({ourProps:{},theirProps:e,slot:{},defaultTag:R,name:"Switch.Group"}))))},I=S.Label,F=y.Description,O=Object.assign(w,{Group:P,Label:I,Description:F});e.s(["Switch",0,O,"SwitchDescription",0,F,"SwitchGroup",0,P,"SwitchLabel",0,I])},70554,e=>{"use strict";let t,n,o;var r=e.i(29427),i=e.i(71330),s=e.i(71645),l=e.i(94487),a=e.i(14189),u=e.i(35696),c=e.i(41444),d=e.i(44279),f=e.i(55743),p=e.i(94316),m=e.i(53521),v=e.i(2788);function h({onFocus:e}){let[t,n]=(0,s.useState)(!0),o=(0,m.useIsMounted)();return t?s.default.createElement(v.Hidden,{as:"button",type:"button",features:v.HiddenFeatures.Focusable,onFocus:t=>{t.preventDefault();let r,i=50;r=requestAnimationFrame(function t(){if(i--<=0){r&&cancelAnimationFrame(r);return}if(e()){if(cancelAnimationFrame(r),!o.current)return;n(!1);return}r=requestAnimationFrame(t)})}}):null}var b=e.i(52265),g=e.i(97701),y=e.i(68578),E=e.i(2155),S=e.i(20);let x=s.createContext(null);function R({children:e}){let t=s.useRef({groups:new Map,get(e,t){var n;let o=this.groups.get(e);o||(o=new Map,this.groups.set(e,o));let r=null!=(n=o.get(t))?n:0;return o.set(t,r+1),[Array.from(o.keys()).indexOf(t),function(){let e=o.get(t);e>1?o.set(t,e-1):o.delete(t)}]}});return s.createElement(x.Provider,{value:t},e)}function w(e){let t=s.useContext(x);if(!t)throw Error("You must wrap your component in a <StableCollection>");let n=s.useId(),[o,r]=t.current.get(e,n);return s.useEffect(()=>r,[]),o}var P=e.i(98348),I=((t=I||{})[t.Forwards=0]="Forwards",t[t.Backwards=1]="Backwards",t),F=((n=F||{})[n.Less=-1]="Less",n[n.Equal=0]="Equal",n[n.Greater=1]="Greater",n),O=((o=O||{})[o.SetSelectedIndex=0]="SetSelectedIndex",o[o.RegisterTab=1]="RegisterTab",o[o.UnregisterTab=2]="UnregisterTab",o[o.RegisterPanel=3]="RegisterPanel",o[o.UnregisterPanel=4]="UnregisterPanel",o);let T={0(e,t){var n;let o=(0,b.sortByDomNode)(e.tabs,e=>e.current),r=(0,b.sortByDomNode)(e.panels,e=>e.current),i=o.filter(e=>{var t;return!(null!=(t=e.current)&&t.hasAttribute("disabled"))}),s={...e,tabs:o,panels:r};if(t.index<0||t.index>o.length-1){let n=(0,g.match)(Math.sign(t.index-e.selectedIndex),{[-1]:()=>1,0:()=>(0,g.match)(Math.sign(t.index),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0});if(0===i.length)return s;let r=(0,g.match)(n,{0:()=>o.indexOf(i[0]),1:()=>o.indexOf(i[i.length-1])});return{...s,selectedIndex:-1===r?e.selectedIndex:r}}let l=o.slice(0,t.index),a=[...o.slice(t.index),...l].find(e=>i.includes(e));if(!a)return s;let u=null!=(n=o.indexOf(a))?n:e.selectedIndex;return -1===u&&(u=e.selectedIndex),{...s,selectedIndex:u}},1(e,t){if(e.tabs.includes(t.tab))return e;let n=e.tabs[e.selectedIndex],o=(0,b.sortByDomNode)([...e.tabs,t.tab],e=>e.current),r=e.selectedIndex;return e.info.current.isControlled||-1===(r=o.indexOf(n))&&(r=e.selectedIndex),{...e,tabs:o,selectedIndex:r}},2:(e,t)=>({...e,tabs:e.tabs.filter(e=>e!==t.tab)}),3:(e,t)=>
4e.panels.includes(t.panel)?e:{...e,panels:(0,b.sortByDomNode)([...e.panels,t.panel],e=>e.current)},4:(e,t)=>({...e,panels:e.panels.filter(e=>e!==t.panel)})},C=(0,s.createContext)(null);function M(e){let t=(0,s.useContext)(C);if(null===t){let t=Error(`<${e} /> is missing a parent <Tab.Group /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,M),t}return t}C.displayName="TabsDataContext";let D=(0,s.createContext)(null);function k(e){let t=(0,s.useContext)(D);if(null===t){let t=Error(`<${e} /> is missing a parent <Tab.Group /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,k),t}return t}function A(e,t){return(0,g.match)(t.type,T,e,t)}D.displayName="TabsActionsContext";let L=S.RenderFeatures.RenderStrategy|S.RenderFeatures.Static,N=(0,S.forwardRefWithAs)(function(e,t){var n,o;let c=(0,s.useId)(),{id:m=`headlessui-tabs-tab-${c}`,disabled:v=!1,autoFocus:h=!1,...x}=e,{orientation:R,activation:I,selectedIndex:F,tabs:O,panels:T}=M("Tab"),C=k("Tab"),D=M("Tab"),[A,L]=(0,s.useState)(null),N=(0,s.useRef)(null),B=(0,p.useSyncRefs)(N,t,L);(0,u.useIsoMorphicEffect)(()=>C.registerTab(N),[C,N]);let H=w("tabs"),W=O.indexOf(N);-1===W&&(W=H);let _=W===F,V=(0,a.useEvent)(e=>{let t=e();if(t===b.FocusResult.Success&&"auto"===I){let e=(0,E.getActiveElement)(N.current),t=D.tabs.findIndex(t=>t.current===e);-1!==t&&C.change(t)}return t}),K=(0,a.useEvent)(e=>{let t=O.map(e=>e.current).filter(Boolean);if(e.key===P.Keys.Space||e.key===P.Keys.Enter){e.preventDefault(),e.stopPropagation(),C.change(W);return}switch(e.key){case P.Keys.Home:case P.Keys.PageUp:return e.preventDefault(),e.stopPropagation(),V(()=>(0,b.focusIn)(t,b.Focus.First));case P.Keys.End:case P.Keys.PageDown:return e.preventDefault(),e.stopPropagation(),V(()=>(0,b.focusIn)(t,b.Focus.Last))}if(V(()=>(0,g.match)(R,{vertical:()=>e.key===P.Keys.ArrowUp?(0,b.focusIn)(t,b.Focus.Previous|b.Focus.WrapAround):e.key===P.Keys.ArrowDown?(0,b.focusIn)(t,b.Focus.Next|b.Focus.WrapAround):b.FocusResult.Error,horizontal:()=>e.key===P.Keys.ArrowLeft?(0,b.focusIn)(t,b.Focus.Previous|b.Focus.WrapAround):e.key===P.Keys.ArrowRight?(0,b.focusIn)(t,b.Focus.Next|b.Focus.WrapAround):b.FocusResult.Error}))===b.FocusResult.Success)return e.preventDefault()}),z=(0,s.useRef)(!1),$=(0,a.useEvent)(()=>{var e;z.current||(z.current=!0,null==(e=N.current)||e.focus({preventScroll:!0}),C.change(W),(0,y.microTask)(()=>{z.current=!1}))}),j=(0,a.useEvent)(e=>{e.preventDefault()}),{isFocusVisible:G,focusProps:U}=(0,r.useFocusRing)({autoFocus:h}),{isHovered:q,hoverProps:Q}=(0,i.useHover)({isDisabled:v}),{pressed:Y,pressProps:X}=(0,l.useActivePress)({disabled:v}),J=(0,f.useSlot)({selected:_,hover:q,active:Y,focus:G,autofocus:h,disabled:v}),Z=(0,S.mergeProps)({ref:B,onKeyDown:K,onMouseDown:j,onClick:$,id:m,role:"tab",type:(0,d.useResolveButtonType)(e,A),"aria-controls":null==(o=null==(n=T[W])?void 0:n.current)?void 0:o.id,"aria-selected":_,tabIndex:_?0:-1,disabled:v||void 0,autoFocus:h},U,Q,X);return(0,S.useRender)()({ourProps:Z,theirProps:x,slot:J,defaultTag:"button",name:"Tabs.Tab"})}),B=(0,S.forwardRefWithAs)(function(e,t){let{defaultIndex:n=0,vertical:o=!1,manual:r=!1,onChange:i,selectedIndex:l=null,...d}=e,m=o?"vertical":"horizontal",v=r?"manual":"auto",g=null!==l,y=(0,c.useLatestValue)({isControlled:g}),E=(0,p.useSyncRefs)(t),[x,w]=(0,s.useReducer)(A,{info:y,selectedIndex:null!=l?l:n,tabs:[],panels:[]}),P=(0,f.useSlot)({selectedIndex:x.selectedIndex}),I=(0,c.useLatestValue)(i||(()=>{})),F=(0,c.useLatestValue)(x.tabs),O=(0,s.useMemo)(()=>({orientation:m,activation:v,...x}),[m,v,x]),T=(0,a.useEvent)(e=>(w({type:1,tab:e}),()=>w({type:2,tab:e}))),M=(0,a.useEvent)(e=>(w({type:3,panel:e}),()=>w({type:4,panel:e}))),k=(0,a.useEvent)(e=>{L.current!==e&&I.current(e),g||w({type:0,index:e})}),L=(0,c.useLatestValue)(g?e.selectedIndex:x.selectedIndex),N=(0,s.useMemo)(()=>({registerTab:T,registerPanel:M,change:k}),[]);(0,u.useIsoMorphicEffect)(()=>{w({type:0,index:null!=l?l:n})},[l]),(0,u.useIsoMorphicEffect)(()=>{if(void 0===L.current||x.tabs.length<=0)return;let e=(0,b.sortByDomNode)(x.tabs,e=>e.current);e.some((e,t)=>x.tabs[t]!==e)&&k(e.indexOf(x.tabs[L.current]))});let B=(0,S.useRender)();return s.default.createElement(R,null,s.default.createElement(D.Provider,{value:N},s.default.createElement(C.Provider,{value:O},O.tabs.length<=0&&s.default.createElement(h,{onFocus:()=>{var e,t;for(let n of F.current)if((null==(e=n.current)?void 0:e.tabIndex)===0)return null==(t=n.current)||t.focu
4s(),!0;return!1}}),B({ourProps:{ref:E},theirProps:d,slot:P,defaultTag:"div",name:"Tabs"}))))}),H=(0,S.forwardRefWithAs)(function(e,t){let{orientation:n,selectedIndex:o}=M("Tab.List"),r=(0,p.useSyncRefs)(t),i=(0,f.useSlot)({selectedIndex:o});return(0,S.useRender)()({ourProps:{ref:r,role:"tablist","aria-orientation":n},theirProps:e,slot:i,defaultTag:"div",name:"Tabs.List"})}),W=(0,S.forwardRefWithAs)(function(e,t){let{selectedIndex:n}=M("Tab.Panels"),o=(0,p.useSyncRefs)(t),r=(0,f.useSlot)({selectedIndex:n});return(0,S.useRender)()({ourProps:{ref:o},theirProps:e,slot:r,defaultTag:"div",name:"Tabs.Panels"})}),_=(0,S.forwardRefWithAs)(function(e,t){var n,o,i,l;let a=(0,s.useId)(),{id:c=`headlessui-tabs-panel-${a}`,tabIndex:d=0,...m}=e,{selectedIndex:h,tabs:b,panels:g}=M("Tab.Panel"),y=k("Tab.Panel"),E=(0,s.useRef)(null),x=(0,p.useSyncRefs)(E,t);(0,u.useIsoMorphicEffect)(()=>y.registerPanel(E),[y,E]);let R=w("panels"),P=g.indexOf(E);-1===P&&(P=R);let I=P===h,{isFocusVisible:F,focusProps:O}=(0,r.useFocusRing)(),T=(0,f.useSlot)({selected:I,focus:F}),C=(0,S.mergeProps)({ref:x,id:c,role:"tabpanel","aria-labelledby":null==(o=null==(n=b[P])?void 0:n.current)?void 0:o.id,tabIndex:I?d:-1},O),D=(0,S.useRender)();return I||null!=(i=m.unmount)&&!i||null!=(l=m.static)&&l?D({ourProps:C,theirProps:m,slot:T,defaultTag:"div",features:L,visible:I,name:"Tabs.Panel"}):s.default.createElement(v.Hidden,{"aria-hidden":"true",...C})}),V=Object.assign(N,{Group:B,List:H,Panels:W,Panel:_});e.s(["Tab",0,V,"TabGroup",0,B,"TabList",0,H,"TabPanel",0,_,"TabPanels",0,W],70554)},54324,e=>{"use strict";var t=e.i(29427),n=e.i(71330),o=e.i(71645),r=e.i(55743),i=e.i(1893),s=e.i(42803),l=e.i(20),a=e.i(35889),u=e.i(22678);let c=(0,l.forwardRefWithAs)(function(e,c){let d=(0,o.useId)(),f=(0,s.useProvidedId)(),p=(0,i.useDisabled)(),{id:m=f||`headlessui-textarea-${d}`,disabled:v=p||!1,autoFocus:h=!1,invalid:b=!1,...g}=e,y=(0,u.useLabelledBy)(),E=(0,a.useDescribedBy)(),{isFocused:S,focusProps:x}=(0,t.useFocusRing)({autoFocus:h}),{isHovered:R,hoverProps:w}=(0,n.useHover)({isDisabled:v}),P=(0,l.mergeProps)({ref:c,id:m,"aria-labelledby":y,"aria-describedby":E,"aria-invalid":b?"true":void 0,disabled:v||void 0,autoFocus:h},x,w),I=(0,r.useSlot)({disabled:v,invalid:b,hover:R,focus:S,autofocus:h});return(0,l.useRender)()({ourProps:P,theirProps:g,slot:I,defaultTag:"textarea",name:"Textarea"})});e.s(["Textarea",0,c])}]);

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.