@liip/liipgpt 3.5.1 → 3.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,7 @@ import{$ as e,At as t,B as n,Bt as r,Ct as i,D as a,Dt as o,E as s,Ft as c,G as
5
5
  `,` `)),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}var Nt=At({position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`,transform:`translateX(-100%)`}),Pt=typeof window<`u`?window:void 0;typeof window<`u`&&window.document,typeof window<`u`&&window.navigator,typeof window<`u`&&window.location;function Ft(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}new class{#e;#t;constructor(e={}){let{window:t=Pt,document:n=t?.document}=e;t!==void 0&&(this.#e=n,this.#t=o(e=>{let n=_e(t,`focusin`,e),r=_e(t,`focusout`,e);return()=>{n(),r()}}))}get current(){return this.#t?.(),this.#e?Ft(this.#e):null}};function It(e){return typeof e==`function`}var Lt=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return _(this.#t)}get(){let e=le(this.#t);if(e===void 0)throw Error(`Context "${this.#e}" not found`);return e}getOr(e){let t=le(this.#t);return t===void 0?e:t}set(e){return c(this.#t,e)}};function Rt(e,t){switch(e){case`post`:F(t);break;case`pre`:oe(t);break}}function zt(e,t,n,r={}){let{lazy:i=!1}=r,a=!i,o=Array.isArray(e)?[]:void 0;Rt(t,()=>{let t=Array.isArray(e)?e.map(e=>e()):e();if(!a){a=!0,o=t;return}let r=pe(()=>n(t,o));return o=t,r})}function Bt(e,t,n){let r=de(()=>{let i=!1;zt(e,t,(e,t)=>{if(i){r();return}let a=n(e,t);return i=!0,a},{lazy:!0})});F(()=>r)}function Z(e,t,n){zt(e,`post`,t,n)}function Vt(e,t,n){zt(e,`pre`,t,n)}Z.pre=Vt;function Ht(e,t){Bt(e,`post`,t)}function Ut(e,t){Bt(e,`pre`,t)}Ht.pre=Ut;function Wt(e){return It(e)?e():e}var Gt=class{#e={width:0,height:0};#t=!1;#n;#r;#i;#a=O(()=>(V(this.#s)?.(),this.getSize().width));#o=O(()=>(V(this.#s)?.(),this.getSize().height));#s=O(()=>{let e=Wt(this.#r);if(e)return o(t=>{if(!this.#i)return;let n=new this.#i.ResizeObserver(e=>{this.#t=!0;for(let t of e){let e=this.#n.box===`content-box`?t.contentBoxSize:t.borderBoxSize,n=Array.isArray(e)?e:[e];this.#e.width=n.reduce((e,t)=>Math.max(e,t.inlineSize),0),this.#e.height=n.reduce((e,t)=>Math.max(e,t.blockSize),0)}t()});return n.observe(e),()=>{this.#t=!1,n.disconnect()}})});constructor(e,t={box:`border-box`}){this.#i=t.window??Pt,this.#n=t,this.#r=e,this.#e={width:0,height:0}}calculateSize(){let e=Wt(this.#r);if(!e||!this.#i)return;let t=e.offsetWidth,n=e.offsetHeight;if(this.#n.box===`border-box`)return{width:t,height:n};let r=this.#i.getComputedStyle(e),i=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),a=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),o=parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),s=parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth);return{width:t-i-o,height:n-a-s}}getSize(){return this.#t?this.#e:this.calculateSize()??this.#e}get current(){return V(this.#s)?.(),this.getSize()}get width(){return V(this.#a)}get height(){return V(this.#o)}},Kt=class{#e=()=>void 0;#t=O(()=>this.#e());constructor(e,t){let n;t!==void 0&&(n=t),this.#e=()=>{try{return n}finally{n=e()}}}get current(){return V(this.#t)}};function qt(e,t){let n,r=null;return(...i)=>new Promise(a=>{r&&r(void 0),r=a,clearTimeout(n),n=setTimeout(async()=>{let t=await e(...i);r&&=(r(t),null)},t)})}function Jt(e,t){let n=0,r=null;return(...i)=>{let a=Date.now();return n&&a-n<t?r??Promise.resolve(void 0):(n=a,r=e(...i),r)}}function Yt(e,t,n={},r){let{lazy:a=!1,once:o=!1,initialValue:s,debounce:c,throttle:l}=n,u=i(xe(s)),d=i(!1),f=i(void 0),p=i(xe([])),m=()=>{V(p).forEach(e=>e()),K(p,[],!0)},h=e=>{K(p,[...V(p),e],!0)},g=async(e,n,r=!1)=>{try{K(d,!0),K(f,void 0),m();let i=new AbortController;h(()=>i.abort());let a=await t(e,n,{data:V(u),refetching:r,onCleanup:h,signal:i.signal});return K(u,a,!0),a}catch(e){e instanceof DOMException&&e.name===`AbortError`||K(f,e,!0);return}finally{K(d,!1)}},_=c?qt(g,c):l?Jt(g,l):g,v=Array.isArray(e)?e:[e],y;return r((t,n)=>{o&&y||(y=t,_(Array.isArray(e)?t:t[0],Array.isArray(e)?n:n?.[0]))},{lazy:a}),{get current(){return V(u)},get loading(){return V(d)},get error(){return V(f)},mutate:e=>{K(u,e,!0)},refetch:t=>{let n=v.map(e=>e());return _(Array.isArray(e)?n:n[0],Array.isArray(e)?n:n[0],t??!0)}}}function Xt(e,t,n){return Yt(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];Z(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}function Zt(e,t,n){return Yt(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];Z.pre(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}Xt.pre=Zt;function Qt(e){F(()=>()=>{e()})}function $t(e){F(()=>pe(()=>e()))}function en(e,t){return setTimeout(t,e)}function tn(e){te().then(e)}var nn=1,rn=9,an=11;function on(e){return Ve(e)&&e.nodeType===nn&&typeof e.nodeName==`string`}function sn(e){return Ve(e)&&e.nodeType===rn}function cn(e){return Ve(e)&&e.constructor?.name===`VisualViewport`}function ln(e){return Ve(e)&&e.nodeType!==void 0}function un(e){return ln(e)&&e.nodeType===an&&`host`in e}function dn(e,t){if(!e||!t||!on(e)||!on(t))return!1;let n=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(n&&un(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function fn(e){return sn(e)?e:cn(e)?e.document:e?.ownerDocument??document}function pn(e){return un(e)?pn(e.host):sn(e)?e.defaultView??window:on(e)?e.ownerDocument?.defaultView??window:window}function mn(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var hn=class{element;#e=O(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return V(this.#e)}set root(e){K(this.#e,e)}constructor(e){typeof e==`function`?this.element=Y(e):this.element=e}getDocument=()=>fn(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>mn(this.root);isActiveElement=e=>e===this.getActiveElement();getElementById(e){return this.root.getElementById(e)}querySelector=e=>this.root?this.root.querySelector(e):null;querySelectorAll=e=>this.root?this.root.querySelectorAll(e):[];setTimeout=(e,t)=>this.getWindow().setTimeout(e,t);clearTimeout=e=>this.getWindow().clearTimeout(e)};function gn(e,t){return{[fe()]:n=>Ke(e)?(e.current=n,pe(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e.current=null,t?.(null))}):(e(n),pe(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e(null),t?.(null))})}}function _n(e){return e?`true`:`false`}function vn(e){return e?`true`:void 0}function yn(e){return e?``:void 0}function bn(e){return e?!0:void 0}function xn(e){return e?`open`:`closed`}function Sn(e,t){return t?`mixed`:e?`true`:`false`}var Cn=class{#e;#t;attrs;constructor(e){this.#e=e.getVariant?e.getVariant():null,this.#t=this.#e?`data-${this.#e}-`:`data-${e.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(e.parts.map(e=>[e,this.getAttr(e)]))}getAttr(e,t){return t?`data-${t}-${e}`:`${this.#t}${e}`}selector(e,t){return`[${this.getAttr(e,t)}]`}};function wn(e){let t=new Cn(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var Tn=`ArrowDown`,En=`ArrowLeft`,Dn=`ArrowRight`,On=`ArrowUp`,kn=`CapsLock`,An=`Control`,jn=`Enter`,Mn=`Escape`,Nn=`Home`,Pn=`Meta`,Fn=`PageDown`,In=`PageUp`,Ln=`Shift`;function Rn(e){return window.getComputedStyle(e).getPropertyValue(`direction`)}var zn=[Tn,In,Nn],Bn=[On,Fn,`End`];[...zn,...Bn];function Vn(e=`ltr`,t=`horizontal`){return{horizontal:e===`rtl`?En:Dn,vertical:Tn}[t]}function Hn(e=`ltr`,t=`horizontal`){return{horizontal:e===`rtl`?Dn:En,vertical:On}[t]}function Un(e=`ltr`,t=`horizontal`){return[`ltr`,`rtl`].includes(e)||(e=`ltr`),[`horizontal`,`vertical`].includes(t)||(t=`horizontal`),{nextKey:Vn(e,t),prevKey:Hn(e,t)}}var Wn=typeof document<`u`,Gn=Kn();function Kn(){return Wn&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function qn(e){return e instanceof HTMLElement}function Jn(e){return e instanceof Element}function Yn(e){return e instanceof Element||e instanceof SVGElement}function Xn(e){return e.pointerType===`touch`}function Zn(e){return e!==null}function Qn(e){return e instanceof HTMLInputElement&&`select`in e}var $n=class{#e;#t=Qe(null);constructor(e){this.#e=e}getCandidateNodes(){return this.#e.rootNode.current?this.#e.candidateSelector?Array.from(this.#e.rootNode.current.querySelectorAll(this.#e.candidateSelector)):this.#e.candidateAttr?Array.from(this.#e.rootNode.current.querySelectorAll(`[${this.#e.candidateAttr}]:not([data-disabled])`)):[]:[]}focusFirstCandidate(){let e=this.getCandidateNodes();e.length&&e[0]?.focus()}handleKeydown(e,t,n=!1){let r=this.#e.rootNode.current;if(!r||!e)return;let i=this.getCandidateNodes();if(!i.length)return;let a=i.indexOf(e),{nextKey:o,prevKey:s}=Un(Rn(r),this.#e.orientation.current),c=this.#e.loop.current,l={[o]:a+1,[s]:a-1,[Nn]:0,End:i.length-1};if(n){let e=o===`ArrowDown`?Dn:Tn,t=s===`ArrowUp`?En:On;l[e]=a+1,l[t]=a-1}let u=l[t.key];if(u===void 0)return;t.preventDefault(),u<0&&c?u=i.length-1:u===i.length&&c&&(u=0);let d=i[u];if(d)return d.focus(),this.#t.current=d.id,this.#e.onCandidateFocus?.(d),d}getTabIndex(e){let t=this.getCandidateNodes(),n=this.#t.current!==null;return e&&!n&&t[0]===e?(this.#t.current=e.id,0):e?.id===this.#t.current?0:-1}setCurrentTabStopId(e){this.#t.current=e}focusCurrentTabStop(){let e=this.#t.current;if(!e)return;let t=this.#e.rootNode.current?.querySelector(`#${e}`);!t||!qn(t)||t.focus()}},er=class{#e;#t=null;constructor(e){this.#e=e,Qt(()=>this.#n())}#n(){this.#t&&=(window.cancelAnimationFrame(this.#t),null)}run(e){this.#n();let t=this.#e.ref.current;if(t){if(typeof t.getAnimations!=`function`){this.#r(e);return}this.#t=window.requestAnimationFrame(()=>{let n=t.getAnimations();if(n.length===0){this.#r(e);return}Promise.allSettled(n.map(e=>e.finished)).then(()=>{this.#r(e)})})}}#r(e){let t=()=>{e()};this.#e.afterTick?tn(t):t()}},tr=class{#e;#t;#n;#r=i(!1);constructor(e){this.#e=e,K(this.#r,e.open.current,!0),this.#t=e.enabled??!0,this.#n=new er({ref:this.#e.ref,afterTick:this.#e.open}),Z(()=>this.#e.open.current,e=>{e&&K(this.#r,!0),this.#t&&this.#n.run(()=>{e===this.#e.open.current&&(this.#e.open.current||K(this.#r,!1),this.#e.onComplete?.())})})}get shouldRender(){return V(this.#r)}};function Q(){}function $(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}var nr=wn({component:`dialog`,parts:[`content`,`trigger`,`overlay`,`title`,`description`,`close`,`cancel`,`action`]}),rr=new Lt(`Dialog.Root | AlertDialog.Root`),ir=class e{static create(t){let n=rr.getOr(null);return rr.set(new e(t,n))}opts;#e=i(null);get triggerNode(){return V(this.#e)}set triggerNode(e){K(this.#e,e,!0)}#t=i(null);get contentNode(){return V(this.#t)}set contentNode(e){K(this.#t,e,!0)}#n=i(null);get overlayNode(){return V(this.#n)}set overlayNode(e){K(this.#n,e,!0)}#r=i(null);get descriptionNode(){return V(this.#r)}set descriptionNode(e){K(this.#r,e,!0)}#i=i(void 0);get contentId(){return V(this.#i)}set contentId(e){K(this.#i,e,!0)}#a=i(void 0);get titleId(){return V(this.#a)}set titleId(e){K(this.#a,e,!0)}#o=i(void 0);get triggerId(){return V(this.#o)}set triggerId(e){K(this.#o,e,!0)}#s=i(void 0);get descriptionId(){return V(this.#s)}set descriptionId(e){K(this.#s,e,!0)}#c=i(null);get cancelNode(){return V(this.#c)}set cancelNode(e){K(this.#c,e,!0)}#l=i(0);get nestedOpenCount(){return V(this.#l)}set nestedOpenCount(e){K(this.#l,e,!0)}depth;parent;contentPresence;overlayPresence;constructor(e,t){this.opts=e,this.parent=t,this.depth=t?t.depth+1:0,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this),this.contentPresence=new tr({ref:Y(()=>this.contentNode),open:this.opts.open,enabled:!0,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new tr({ref:Y(()=>this.overlayNode),open:this.opts.open,enabled:!0}),Z(()=>this.opts.open.current,e=>{this.parent&&(e?this.parent.incrementNested():this.parent.decrementNested())},{lazy:!0}),Qt(()=>{this.opts.open.current&&this.parent?.decrementNested()})}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}getBitsAttr=e=>nr.getAttr(e,this.opts.variant.current);incrementNested(){this.nestedOpenCount++,this.parent?.incrementNested()}decrementNested(){this.nestedOpenCount!==0&&(this.nestedOpenCount--,this.parent?.decrementNested())}#u=O(()=>({"data-state":xn(this.opts.open.current)}));get sharedProps(){return V(this.#u)}set sharedProps(e){K(this.#u,e)}},ar=class e{static create(t){return new e(t,rr.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=gn(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(e){this.opts.disabled.current||e.button>0||this.root.handleClose()}onkeydown(e){this.opts.disabled.current||(e.key===` `||e.key===`Enter`)&&(e.preventDefault(),this.root.handleClose())}#e=O(()=>({id:this.opts.id.current,[this.root.getBitsAttr(this.opts.variant.current)]:``,onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return V(this.#e)}set props(e){K(this.#e,e)}},or=class e{static create(t){return new e(t,rr.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.root.titleId=this.opts.id.current,this.attachment=gn(this.opts.ref),Z.pre(()=>this.opts.id.current,e=>{this.root.titleId=e})}#e=O(()=>({id:this.opts.id.current,role:`heading`,"aria-level":this.opts.level.current,[this.root.getBitsAttr(`title`)]:``,...this.root.sharedProps,...this.attachment}));get props(){return V(this.#e)}set props(e){K(this.#e,e)}},sr=class e{static create(t){return new e(t,rr.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.root.descriptionId=this.opts.id.current,this.attachment=gn(this.opts.ref,e=>{this.root.descriptionNode=e}),Z.pre(()=>this.opts.id.current,e=>{this.root.descriptionId=e})}#e=O(()=>({id:this.opts.id.current,[this.root.getBitsAttr(`description`)]:``,...this.root.sharedProps,...this.attachment}));get props(){return V(this.#e)}set props(e){K(this.#e,e)}},cr=class e{static create(t){return new e(t,rr.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=gn(this.opts.ref,e=>{this.root.contentNode=e,this.root.contentId=e?.id})}#e=O(()=>({open:this.root.opts.open.current}));get snippetProps(){return V(this.#e)}set snippetProps(e){K(this.#e,e)}#t=O(()=>({id:this.opts.id.current,role:this.root.opts.variant.current===`alert-dialog`?`alertdialog`:`dialog`,"aria-modal":`true`,"aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.getBitsAttr(`content`)]:``,style:{pointerEvents:`auto`,outline:this.root.opts.variant.current===`alert-dialog`?`none`:void 0,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount,contain:`layout style`},tabindex:this.root.opts.variant.current===`alert-dialog`?-1:void 0,"data-nested-open":yn(this.root.nestedOpenCount>0),"data-nested":yn(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return V(this.#t)}set props(e){K(this.#t,e)}get shouldRender(){return this.root.contentPresence.shouldRender}},lr=class e{static create(t){return new e(t,rr.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=gn(this.opts.ref,e=>this.root.overlayNode=e)}#e=O(()=>({open:this.root.opts.open.current}));get snippetProps(){return V(this.#e)}set snippetProps(e){K(this.#e,e)}#t=O(()=>({id:this.opts.id.current,[this.root.getBitsAttr(`overlay`)]:``,style:{pointerEvents:`auto`,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount},"data-nested-open":yn(this.root.nestedOpenCount>0),"data-nested":yn(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return V(this.#t)}set props(e){K(this.#t,e)}get shouldRender(){return this.root.overlayPresence.shouldRender}},ur=B(`<div><!></div>`);function dr(e,t){let r=N();C(t,!0);let i=z(t,`id`,23,()=>$(r)),a=z(t,`ref`,15,null),o=z(t,`child`,7),s=z(t,`children`,7),c=z(t,`level`,7,2),u=H(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`ref`,`child`,`children`,`level`]),f=or.create({id:Y(()=>i()),level:Y(()=>c()),ref:Y(()=>a(),e=>a(e))}),p=O(()=>X(u,f.props));var h={get id(){return i()},set id(e=$(r)){i(e),x()},get ref(){return a()},set ref(e=null){a(e),x()},get child(){return o()},set child(e){o(e),x()},get children(){return s()},set children(e){s(e),x()},get level(){return c()},set level(e=2){c(e),x()}},g=m(),_=P(g),v=e=>{var t=m();S(P(t),o,()=>({props:V(p)})),l(e,t)},b=e=>{var t=ur();I(t,()=>({...V(p)})),S(L(t),()=>s()??d),A(t),l(e,t)};return n(_,e=>{o()?e(v):e(b,-1)}),l(e,g),y(h)}R(dr,{id:{},ref:{},child:{},children:{},level:{}},[],[],{mode:`open`});function fr(e,t){C(t,!0);let n=z(t,`children`,7);var r={get children(){return n()},set children(e){n(e),x()}},i=m();return Se(P(i),n,e=>{var t=m();S(P(t),()=>n()??d),l(e,t)}),l(e,i),y(r)}R(fr,{children:{}},[],[],{mode:`open`});var pr=new Lt(`BitsConfig`);function mr(){let e=new gr(null,{});return pr.getOr(e).opts}function hr(e){return pr.set(new gr(pr.getOr(null),e))}var gr=class{opts;constructor(e,t){let n=_r(e,t);this.opts={defaultPortalTo:n(e=>e.defaultPortalTo),defaultLocale:n(e=>e.defaultLocale)}}};function _r(e,t){return n=>Y(()=>{let r=n(t)?.current;if(r!==void 0)return r;if(e!==null)return n(e.opts)?.current})}function vr(e,t){return n=>{let r=mr();return Y(()=>{let i=n();if(i!==void 0)return i;let a=e(r).current;return a===void 0?t:a})}}var yr=vr(e=>e.defaultPortalTo,`body`);function br(e,r){C(r,!0);let i=z(r,`to`,7),a=z(r,`children`,7),o=z(r,`disabled`,7),s=yr(()=>i()),c=t(),f=O(p);function p(){if(!Wn||o())return null;let e=null;return e=typeof s.current==`string`?document.querySelector(s.current):s.current,e}let h;function g(){h&&=(j(h),null)}Z([()=>V(f),()=>o()],([e,t])=>{if(!e||t){g();return}return h=u(fr,{target:e,props:{children:a()},context:c}),()=>{g()}});var _={get to(){return i()},set to(e){i(e),x()},get children(){return a()},set children(e){a(e),x()},get disabled(){return o()},set disabled(e){o(e),x()}},v=m(),b=P(v),w=e=>{var t=m();S(P(t),()=>a()??d),l(e,t)};return n(b,e=>{o()&&e(w)}),l(e,v),y(_)}R(br,{to:{},children:{},disabled:{}},[],[],{mode:`open`});var xr=class{eventName;options;constructor(e,t={bubbles:!0,cancelable:!0}){this.eventName=e,this.options=t}createEvent(e){return new CustomEvent(this.eventName,{...this.options,detail:e})}dispatch(e,t){let n=this.createEvent(t);return e.dispatchEvent(n),n}listen(e,t,n){return _e(e,this.eventName,e=>{t(e)},n)}};function Sr(e,t=500){let n=null,r=(...r)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)};return r.destroy=()=>{n!==null&&(clearTimeout(n),n=null)},r}function Cr(e,t){return e===t||e.contains(t)}function wr(e){return e?.ownerDocument??document}function Tr(e,t){let{clientX:n,clientY:r}=e,i=t.getBoundingClientRect();return n<i.left||n>i.right||r<i.top||r>i.bottom}var Er=[jn,` `],Dr=[Tn,In,Nn],Or=[On,Fn,`End`],kr=[...Dr,...Or];[...Er],[...Er];function Ar(e){return e===`indeterminate`}function jr(e){return Ar(e)?`indeterminate`:e?`checked`:`unchecked`}function Mr(e){return e.pointerType===`mouse`}function Nr(e,{select:t=!1}={}){if(!e||!e.focus)return;let n=fn(e);if(n.activeElement===e)return;let r=n.activeElement;e.focus({preventScroll:!0}),e!==r&&Qn(e)&&t&&e.select()}function Pr(e,{select:t=!1}={},n){let r=n();for(let i of e)if(Nr(i,{select:t}),n()!==r)return!0}var Fr=i(!1),Ir=class e{static _refs=0;static _cleanup;constructor(){F(()=>(e._refs===0&&(e._cleanup=de(()=>{let e=[],t=e=>{K(Fr,!1)};return e.push(_e(document,`pointerdown`,t,{capture:!0}),_e(document,`pointermove`,t,{capture:!0}),_e(document,`keydown`,e=>{K(Fr,!0)},{capture:!0})),Et(...e)})),e._refs++,()=>{e._refs--,e._refs===0&&(K(Fr,!1),e._cleanup?.())}))}get current(){return V(Fr)}set current(e){K(Fr,e,!0)}},Lr=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`button:not([inert]):not([inert] *)`,`[tabindex]:not(slot):not([inert]):not([inert] *)`,`audio[controls]:not([inert]):not([inert] *)`,`video[controls]:not([inert]):not([inert] *)`,`[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)`,`details>summary:first-of-type:not([inert]):not([inert] *)`,`details:not([inert]):not([inert] *)`],Rr=Lr.join(`,`),zr=typeof Element>`u`,Br=zr?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Vr=!zr&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},Hr=function(e,t){t===void 0&&(t=!0);var n=e?.getAttribute?.call(e,`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):Hr(e.parentNode))},Ur=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},Wr=function(e,t,n){if(Hr(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Rr));return t&&Br.call(e,Rr)&&r.unshift(e),r=r.filter(n),r},Gr=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!Hr(a,!1))if(a.tagName===`SLOT`){var o=a.assignedElements(),s=Gr(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{Br.call(a,Rr)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!Hr(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=Gr(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}return r},Kr=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},qr=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Ur(e))&&!Kr(e)?0:e.tabIndex},Jr=function(e,t){var n=qr(e);return n<0&&t&&!Kr(e)?0:n},Yr=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Xr=function(e){return e.tagName===`INPUT`},Zr=function(e){return Xr(e)&&e.type===`hidden`},Qr=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},$r=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},ei=function(e){if(!e.name)return!0;var t=e.form||Vr(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var i=$r(r,e.form);return!i||i===e},ti=function(e){return Xr(e)&&e.type===`radio`},ni=function(e){return ti(e)&&!ei(e)},ri=function(e){var t=e&&Vr(e),n=t?.host,r=!1;if(t&&t!==e){var i,a,o;for(r=!!((i=n)!=null&&(a=i.ownerDocument)!=null&&a.contains(n)||e!=null&&(o=e.ownerDocument)!=null&&o.contains(e));!r&&n;){var s,c;t=Vr(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},ii=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},ai=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(e).visibility===`hidden`)return!0;var i=Br.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(Br.call(i,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var a=e;e;){var o=e.parentElement,s=Vr(e);if(o&&!o.shadowRoot&&r(o)===!0)return ii(e);e=e.assignedSlot?e.assignedSlot:!o&&s!==e.ownerDocument?s.host:o}e=a}if(ri(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return ii(e);return!1},oi=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return Br.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},si=function(e,t){return!(t.disabled||Zr(t)||ai(t,e)||Qr(t)||oi(t))},ci=function(e,t){return!(ni(t)||qr(t)<0||!si(e,t))},li=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},ui=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=Jr(a,i),s=i?ui(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(Yr).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},di=function(e,t){return t||={},ui(t.getShadowRoot?Gr([e],t.includeContainer,{filter:ci.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:li}):Wr(e,t.includeContainer,ci.bind(null,t)))},fi=function(e,t){return t||={},t.getShadowRoot?Gr([e],t.includeContainer,{filter:si.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):Wr(e,t.includeContainer,si.bind(null,t))},pi=function(e,t){if(t||={},!e)throw Error(`No node provided`);return Br.call(e,Rr)===!1?!1:ci(t,e)},mi=Lr.concat(`iframe:not([inert]):not([inert] *)`).join(`,`),hi=function(e,t){if(t||={},!e)throw Error(`No node provided`);return Br.call(e,mi)===!1?!1:si(t,e)};function gi(){return{getShadowRoot:!0,displayCheck:typeof ResizeObserver==`function`&&ResizeObserver.toString().includes(`[native code]`)?`full`:`none`}}function _i(e,t){if(!pi(e,gi()))return vi(e,t);let n=fn(e),r=di(n.body,gi());t===`prev`&&r.reverse();let i=r.indexOf(e);return i===-1?n.body:r.slice(i+1)[0]}function vi(e,t){let n=fn(e);if(!hi(e,gi()))return n.body;let r=fi(n.body,gi());t===`prev`&&r.reverse();let i=r.indexOf(e);return i===-1?n.body:r.slice(i+1).find(e=>pi(e,gi()))??n.body}function yi(e,t){return e.length===t.length?e.every((e,n)=>bi(e,t[n])):!1}function bi(e,t){return Number.isNaN(e)&&Number.isNaN(t)?!0:Array.isArray(e)&&Array.isArray(t)?yi(e,t):typeof e==`object`&&typeof t==`object`?xi(e,t):Object.is(e,t)}function xi(e,t){if(typeof e!=`object`||typeof t!=`object`||e===null||t===null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i of n)if(!r.includes(i)||!bi(e[i],t[i]))return!1;return!0}function Si(e,t,n=!0){if(!(e.length===0||t<0||t>=e.length))return e.length===1&&t===0?e[0]:t===e.length-1?n?e[0]:void 0:e[t+1]}function Ci(e,t,n=!0){if(!(e.length===0||t<0||t>=e.length))return e.length===1&&t===0?e[0]:t===0?n?e[e.length-1]:void 0:e[t-1]}function wi(e,t,n,r=!0){if(e.length===0||t<0||t>=e.length)return;let i=t+n;return i=r?(i%e.length+e.length)%e.length:Math.max(0,Math.min(i,e.length-1)),e[i]}function Ti(e,t,n,r=!0){if(e.length===0||t<0||t>=e.length)return;let i=t-n;return i=r?(i%e.length+e.length)%e.length:Math.max(0,Math.min(i,e.length-1)),e[i]}function Ei(e,t,n){let r=t.toLowerCase();if(r.endsWith(` `)){let i=r.slice(0,-1);if(e.filter(e=>e.toLowerCase().startsWith(i)).length<=1)return Ei(e,i,n);let a=n?.toLowerCase();if(a&&a.startsWith(i)&&a.charAt(i.length)===` `&&t.trim()===i)return n;let o=e.filter(e=>e.toLowerCase().startsWith(r));if(o.length>0){let t=n?e.indexOf(n):-1;return Di(o,Math.max(t,0)).find(e=>e!==n)||n}}let i=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,a=i.toLowerCase(),o=n?e.indexOf(n):-1,s=Di(e,Math.max(o,0));i.length===1&&(s=s.filter(e=>e!==n));let c=s.find(e=>e?.toLowerCase().startsWith(a));return c===n?void 0:c}function Di(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Oi={afterMs:1e4,onChange:Q};function ki(e,t){let{afterMs:n,onChange:r,getWindow:a}={...Oi,...t},o=null,s=i(xe(e));function c(){return a().setTimeout(()=>{K(s,e,!0),r?.(e)},n)}return F(()=>()=>{o&&a().clearTimeout(o)}),Y(()=>V(s),e=>{K(s,e,!0),r?.(e),o&&a().clearTimeout(o),o=c()})}var Ai=class{#e;#t;#n=O(()=>this.#e.onMatch?this.#e.onMatch:e=>e.focus());#r=O(()=>this.#e.getCurrentItem?this.#e.getCurrentItem:this.#e.getActiveElement);constructor(e){this.#e=e,this.#t=ki(``,{afterMs:1e3,getWindow:e.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(e,t){if(!t.length)return;this.#t.current=this.#t.current+e;let n=V(this.#r)(),r=t.find(e=>e===n)?.textContent?.trim()??``,i=Ei(t.map(e=>e.textContent?.trim()??``),this.#t.current,r),a=t.find(e=>e.textContent?.trim()===i);return a&&V(this.#n)(a),a}resetTypeahead(){this.#t.current=``}get search(){return this.#t.current}},ji=class{#e;#t;#n;#r=i(null);constructor(e){this.#e=e,this.#t=O(()=>this.#e.enabled()),this.#n=ki(!1,{afterMs:e.transitTimeout??300,onChange:e=>{V(this.#t)&&this.#e.setIsPointerInTransit?.(e)},getWindow:()=>pn(this.#e.triggerNode())}),Z([e.triggerNode,e.contentNode,e.enabled],([e,t,n])=>!e||!t||!n?void 0:Et(_e(e,`pointerleave`,e=>{this.#a(e,t)}),_e(t,`pointerleave`,t=>{this.#a(t,e)}))),Z(()=>V(this.#r),()=>{let t=t=>{if(!V(this.#r))return;let n=t.target;if(!Jn(n))return;let r={x:t.clientX,y:t.clientY},i=e.triggerNode()?.contains(n)||e.contentNode()?.contains(n),a=!Fi(r,V(this.#r));i?this.#i():a&&(this.#i(),e.onPointerExit())},n=fn(e.triggerNode()??e.contentNode());if(n)return _e(n,`pointermove`,t)})}#i(){K(this.#r,null),this.#n.current=!1}#a(e,t){let n=e.currentTarget;if(!qn(n))return;let r={x:e.clientX,y:e.clientY},i=Ni(r,Mi(r,n.getBoundingClientRect())),a=Pi(t.getBoundingClientRect()),o=Ii([...i,...a]);K(this.#r,o,!0),this.#n.current=!0}};function Mi(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function Ni(e,t,n=5){let r=n*1.5;switch(t){case`top`:return[{x:e.x-n,y:e.y+n},{x:e.x,y:e.y-r},{x:e.x+n,y:e.y+n}];case`bottom`:return[{x:e.x-n,y:e.y-n},{x:e.x,y:e.y+r},{x:e.x+n,y:e.y-n}];case`left`:return[{x:e.x+n,y:e.y-n},{x:e.x-r,y:e.y},{x:e.x+n,y:e.y+n}];case`right`:return[{x:e.x-n,y:e.y-n},{x:e.x+r,y:e.y},{x:e.x-n,y:e.y+n}]}}function Pi(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function Fi(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e].x,s=t[e].y,c=t[a].x,l=t[a].y;s>r!=l>r&&n<(c-o)*(r-s)/(l-s)+o&&(i=!i)}return i}function Ii(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),Li(t)}function Li(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Ri=`data-context-menu-trigger`,zi=`data-context-menu-content`,Bi=new Lt(`Menu.Root`),Vi=new Lt(`Menu.Root | Menu.Sub`),Hi=new Lt(`Menu.Content`),Ui=new Lt(`Menu.Group | Menu.RadioGroup`),Wi=new Lt(`Menu.RadioGroup`),Gi=new Lt(`Menu.CheckboxGroup`),Ki=new xr(`bitsmenuopen`,{bubbles:!1,cancelable:!0}),qi=wn({component:`menu`,parts:[`trigger`,`content`,`sub-trigger`,`item`,`group`,`group-heading`,`checkbox-group`,`checkbox-item`,`radio-group`,`radio-item`,`separator`,`sub-content`,`arrow`]}),Ji=class e{static create(t){let n=new e(t);return Bi.set(n)}opts;isUsingKeyboard=new Ir;#e=i(!1);get ignoreCloseAutoFocus(){return V(this.#e)}set ignoreCloseAutoFocus(e){K(this.#e,e,!0)}#t=i(!1);get isPointerInTransit(){return V(this.#t)}set isPointerInTransit(e){K(this.#t,e,!0)}constructor(e){this.opts=e}getBitsAttr=e=>qi.getAttr(e,this.opts.variant.current)},Yi=class e{static create(t,n){return Vi.set(new e(t,n,null))}opts;root;parentMenu;contentId=Y(()=>``);#e=i(null);get contentNode(){return V(this.#e)}set contentNode(e){K(this.#e,e,!0)}contentPresence;#t=i(null);get triggerNode(){return V(this.#t)}set triggerNode(e){K(this.#t,e,!0)}constructor(e,t,n){this.opts=e,this.root=t,this.parentMenu=n,this.contentPresence=new tr({ref:Y(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),n&&Z(()=>n.opts.open.current,()=>{n.opts.open.current||(this.opts.open.current=!1)})}toggleOpen(){this.opts.open.current=!this.opts.open.current}onOpen(){this.opts.open.current=!0}onClose(){this.opts.open.current=!1}},Xi=class e{static create(t){return Hi.set(new e(t,Vi.get()))}opts;parentMenu;rovingFocusGroup;domContext;attachment;#e=i(``);get search(){return V(this.#e)}set search(e){K(this.#e,e,!0)}#t=0;#n;#r=i(!1);get mounted(){return V(this.#r)}set mounted(e){K(this.#r,e,!0)}#i;constructor(e,t){this.opts=e,this.parentMenu=t,this.domContext=new hn(e.ref),this.attachment=gn(this.opts.ref,e=>{this.parentMenu.contentNode!==e&&(this.parentMenu.contentNode=e)}),t.contentId=e.id,this.#i=e.isSub??!1,this.onkeydown=this.onkeydown.bind(this),this.onblur=this.onblur.bind(this),this.onfocus=this.onfocus.bind(this),this.handleInteractOutside=this.handleInteractOutside.bind(this),new ji({contentNode:()=>this.parentMenu.contentNode,triggerNode:()=>this.parentMenu.triggerNode,enabled:()=>this.parentMenu.opts.open.current&&!!this.parentMenu.triggerNode?.hasAttribute(this.parentMenu.root.getBitsAttr(`sub-trigger`)),onPointerExit:()=>{this.parentMenu.opts.open.current=!1},setIsPointerInTransit:e=>{this.parentMenu.root.isPointerInTransit=e}}),this.#n=new Ai({getActiveElement:()=>this.domContext.getActiveElement(),getWindow:()=>this.domContext.getWindow()}).handleTypeaheadSearch,this.rovingFocusGroup=new $n({rootNode:Y(()=>this.parentMenu.contentNode),candidateAttr:this.parentMenu.root.getBitsAttr(`item`),loop:this.opts.loop,orientation:Y(()=>`vertical`)}),Z(()=>this.parentMenu.contentNode,e=>e?Ki.listen(e,()=>{tn(()=>{this.parentMenu.root.isUsingKeyboard.current&&this.rovingFocusGroup.focusFirstCandidate()})}):void 0),F(()=>{this.parentMenu.opts.open.current||this.domContext.getWindow().clearTimeout(this.#t)})}#a(){let e=this.parentMenu.contentNode;return e?Array.from(e.querySelectorAll(`[${this.parentMenu.root.getBitsAttr(`item`)}]:not([data-disabled])`)):[]}#o(){return this.parentMenu.root.isPointerInTransit}onCloseAutoFocus=e=>{this.opts.onCloseAutoFocus.current?.(e),!(e.defaultPrevented||this.#i)&&this.parentMenu.triggerNode&&pi(this.parentMenu.triggerNode)&&(e.preventDefault(),this.parentMenu.triggerNode.focus())};handleTabKeyDown(e){let t=this.parentMenu;for(;t.parentMenu!==null;)t=t.parentMenu;if(!t.triggerNode)return;e.preventDefault();let n=_i(t.triggerNode,e.shiftKey?`prev`:`next`);n?(this.parentMenu.root.ignoreCloseAutoFocus=!0,t.onClose(),tn(()=>{n.focus(),tn(()=>{this.parentMenu.root.ignoreCloseAutoFocus=!1})})):this.domContext.getDocument().body.focus()}onkeydown(e){if(e.defaultPrevented)return;if(e.key===`Tab`){this.handleTabKeyDown(e);return}let t=e.target,n=e.currentTarget;if(!qn(t)||!qn(n))return;let r=t.closest(`[${this.parentMenu.root.getBitsAttr(`content`)}]`)?.id===this.parentMenu.contentId.current,i=e.ctrlKey||e.altKey||e.metaKey,a=e.key.length===1;if(this.rovingFocusGroup.handleKeydown(t,e)||e.code===`Space`)return;let o=this.#a();r&&!i&&a&&this.#n(e.key,o),e.target?.id===this.parentMenu.contentId.current&&kr.includes(e.key)&&(e.preventDefault(),Or.includes(e.key)&&o.reverse(),Pr(o,{select:!1},()=>this.domContext.getActiveElement()))}onblur(e){Jn(e.currentTarget)&&Jn(e.target)&&(e.currentTarget.contains?.(e.target)||(this.domContext.getWindow().clearTimeout(this.#t),this.search=``))}onfocus(e){this.parentMenu.root.isUsingKeyboard.current&&tn(()=>this.rovingFocusGroup.focusFirstCandidate())}onItemEnter(){return this.#o()}onItemLeave(e){e.currentTarget.hasAttribute(this.parentMenu.root.getBitsAttr(`sub-trigger`))||this.#o()||this.parentMenu.root.isUsingKeyboard.current||(this.parentMenu.contentNode?.focus(),this.rovingFocusGroup.setCurrentTabStopId(``))}onTriggerLeave(){return!!this.#o()}handleInteractOutside(e){if(!Yn(e.target))return;let t=this.parentMenu.triggerNode?.id;if(e.target.id===t){e.preventDefault();return}e.target.closest(`#${t}`)&&e.preventDefault()}get shouldRender(){return this.parentMenu.contentPresence.shouldRender}#s=O(()=>({open:this.parentMenu.opts.open.current}));get snippetProps(){return V(this.#s)}set snippetProps(e){K(this.#s,e)}#c=O(()=>({id:this.opts.id.current,role:`menu`,"aria-orientation":`vertical`,[this.parentMenu.root.getBitsAttr(`content`)]:``,"data-state":xn(this.parentMenu.opts.open.current),onkeydown:this.onkeydown,onblur:this.onblur,onfocus:this.onfocus,dir:this.parentMenu.root.opts.dir.current,style:{pointerEvents:`auto`,contain:`layout style`},...this.attachment}));get props(){return V(this.#c)}set props(e){K(this.#c,e)}popperProps={onCloseAutoFocus:e=>this.onCloseAutoFocus(e)}},Zi=class{opts;content;attachment;#e=i(!1);constructor(e,t){this.opts=e,this.content=t,this.attachment=gn(this.opts.ref),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this),this.onfocus=this.onfocus.bind(this),this.onblur=this.onblur.bind(this)}onpointermove(e){if(!e.defaultPrevented&&Mr(e))if(this.opts.disabled.current)this.content.onItemLeave(e);else{if(this.content.onItemEnter())return;let t=e.currentTarget;if(!qn(t))return;t.focus()}}onpointerleave(e){e.defaultPrevented||Mr(e)&&this.content.onItemLeave(e)}onfocus(e){tn(()=>{e.defaultPrevented||this.opts.disabled.current||K(this.#e,!0)})}onblur(e){tn(()=>{e.defaultPrevented||K(this.#e,!1)})}#t=O(()=>({id:this.opts.id.current,tabindex:-1,role:`menuitem`,"aria-disabled":_n(this.opts.disabled.current),"data-disabled":yn(this.opts.disabled.current),"data-highlighted":V(this.#e)?``:void 0,[this.content.parentMenu.root.getBitsAttr(`item`)]:``,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,onfocus:this.onfocus,onblur:this.onblur,...this.attachment}));get props(){return V(this.#t)}set props(e){K(this.#t,e)}},Qi=class e{static create(t){return new e(t,new Zi(t,Hi.get()))}opts;item;root;#e=!1;constructor(e,t){this.opts=e,this.item=t,this.root=t.content.parentMenu.root,this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this)}#t(){if(this.item.opts.disabled.current)return;let e=new CustomEvent(`menuitemselect`,{bubbles:!0,cancelable:!0});if(this.opts.onSelect.current(e),e.defaultPrevented){this.item.content.parentMenu.root.isUsingKeyboard.current=!1;return}this.opts.closeOnSelect.current&&this.item.content.parentMenu.root.opts.onClose()}onkeydown(e){let t=this.item.content.search!==``;if(!(this.item.opts.disabled.current||t&&e.key===` `)&&Er.includes(e.key)){if(!qn(e.currentTarget))return;e.currentTarget.click(),e.preventDefault()}}onclick(e){this.item.opts.disabled.current||this.#t()}onpointerup(e){if(!e.defaultPrevented&&!this.#e){if(!qn(e.currentTarget))return;e.currentTarget?.click()}}onpointerdown(e){this.#e=!0}#n=O(()=>X(this.item.props,{onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown}));get props(){return V(this.#n)}set props(e){K(this.#n,e)}},$i=class e{static create(t,n){return new e(t,new Qi(t,new Zi(t,Hi.get())),n)}opts;item;group;constructor(e,t,n=null){this.opts=e,this.item=t,this.group=n,this.group&&(Z(()=>this.group.opts.value.current,e=>{this.opts.checked.current=e.includes(this.opts.value.current)}),Z(()=>this.opts.checked.current,e=>{e?this.group.addValue(this.opts.value.current):this.group.removeValue(this.opts.value.current)}))}toggleChecked(){this.opts.indeterminate.current?(this.opts.indeterminate.current=!1,this.opts.checked.current=!0):this.opts.checked.current=!this.opts.checked.current}#e=O(()=>({checked:this.opts.checked.current,indeterminate:this.opts.indeterminate.current}));get snippetProps(){return V(this.#e)}set snippetProps(e){K(this.#e,e)}#t=O(()=>({...this.item.props,role:`menuitemcheckbox`,"aria-checked":Sn(this.opts.checked.current,this.opts.indeterminate.current),"data-state":jr(this.opts.checked.current),[this.item.root.getBitsAttr(`checkbox-item`)]:``}));get props(){return V(this.#t)}set props(e){K(this.#t,e)}},ea=class e{static create(t){return Ui.set(new e(t,Bi.get()))}opts;root;attachment;#e=i(void 0);get groupHeadingId(){return V(this.#e)}set groupHeadingId(e){K(this.#e,e,!0)}constructor(e,t){this.opts=e,this.root=t,this.attachment=gn(this.opts.ref)}#t=O(()=>({id:this.opts.id.current,role:`group`,"aria-labelledby":this.groupHeadingId,[this.root.getBitsAttr(`group`)]:``,...this.attachment}));get props(){return V(this.#t)}set props(e){K(this.#t,e)}},ta=class e{static create(t){let n=Gi.getOr(null);if(n)return new e(t,n);let r=Wi.getOr(null);return r?new e(t,r):new e(t,Ui.get())}opts;group;attachment;constructor(e,t){this.opts=e,this.group=t,this.attachment=gn(this.opts.ref,e=>this.group.groupHeadingId=e?.id)}#e=O(()=>({id:this.opts.id.current,role:`group`,[this.group.root.getBitsAttr(`group-heading`)]:``,...this.attachment}));get props(){return V(this.#e)}set props(e){K(this.#e,e)}},na=class e{static create(t){return new e(t,Bi.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=gn(this.opts.ref)}#e=O(()=>({id:this.opts.id.current,role:`group`,[this.root.getBitsAttr(`separator`)]:``,...this.attachment}));get props(){return V(this.#e)}set props(e){K(this.#e,e)}},ra=class e{static create(t){return Ui.set(Wi.set(new e(t,Hi.get())))}opts;content;attachment;#e=i(null);get groupHeadingId(){return V(this.#e)}set groupHeadingId(e){K(this.#e,e,!0)}root;constructor(e,t){this.opts=e,this.content=t,this.root=t.parentMenu.root,this.attachment=gn(this.opts.ref)}setValue(e){this.opts.value.current=e}#t=O(()=>({id:this.opts.id.current,[this.root.getBitsAttr(`radio-group`)]:``,role:`group`,"aria-labelledby":this.groupHeadingId,...this.attachment}));get props(){return V(this.#t)}set props(e){K(this.#t,e)}},ia=class e{static create(t){let n=Wi.get();return new e(t,new Qi(t,new Zi(t,n.content)),n)}opts;item;group;attachment;#e=O(()=>this.group.opts.value.current===this.opts.value.current);get isChecked(){return V(this.#e)}set isChecked(e){K(this.#e,e)}constructor(e,t,n){this.opts=e,this.item=t,this.group=n,this.attachment=gn(this.opts.ref)}selectValue(){this.group.setValue(this.opts.value.current)}#t=O(()=>({[this.group.root.getBitsAttr(`radio-item`)]:``,...this.item.props,role:`menuitemradio`,"aria-checked":Sn(this.isChecked,!1),"data-state":jr(this.isChecked),...this.attachment}));get props(){return V(this.#t)}set props(e){K(this.#t,e)}},aa=class e{static create(t){return new e(t,Vi.get())}opts;parentMenu;attachment;constructor(e,t){this.opts=e,this.parentMenu=t,this.attachment=gn(this.opts.ref,e=>this.parentMenu.triggerNode=e)}onclick=e=>{this.opts.disabled.current||e.detail!==0||(this.parentMenu.toggleOpen(),e.preventDefault())};onpointerdown=e=>{if(!this.opts.disabled.current){if(e.pointerType===`touch`)return e.preventDefault();e.button===0&&e.ctrlKey===!1&&(this.parentMenu.toggleOpen(),this.parentMenu.opts.open.current||e.preventDefault())}};onpointerup=e=>{this.opts.disabled.current||e.pointerType===`touch`&&(e.preventDefault(),this.parentMenu.toggleOpen())};onkeydown=e=>{if(!this.opts.disabled.current){if(e.key===` `||e.key===`Enter`){this.parentMenu.toggleOpen(),e.preventDefault();return}e.key===`ArrowDown`&&(this.parentMenu.onOpen(),e.preventDefault())}};#e=O(()=>{if(this.parentMenu.opts.open.current&&this.parentMenu.contentId.current)return this.parentMenu.contentId.current});#t=O(()=>({id:this.opts.id.current,disabled:this.opts.disabled.current,"aria-haspopup":`menu`,"aria-expanded":_n(this.parentMenu.opts.open.current),"aria-controls":V(this.#e),"data-disabled":yn(this.opts.disabled.current),"data-state":xn(this.parentMenu.opts.open.current),[this.parentMenu.root.getBitsAttr(`trigger`)]:``,onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown,...this.attachment}));get props(){return V(this.#t)}set props(e){K(this.#t,e)}},oa=class e{static create(t){return Gi.set(new e(t,Hi.get()))}opts;content;root;attachment;#e=i(null);get groupHeadingId(){return V(this.#e)}set groupHeadingId(e){K(this.#e,e,!0)}constructor(e,t){this.opts=e,this.content=t,this.root=t.parentMenu.root,this.attachment=gn(this.opts.ref)}addValue(e){if(e&&!this.opts.value.current.includes(e)){let t=[...E(this.opts.value.current),e];if(this.opts.value.current=t,yi(this.opts.value.current,t))return;this.opts.onValueChange.current(t)}}removeValue(e){if(!e||this.opts.value.current.indexOf(e)===-1)return;let t=this.opts.value.current.filter(t=>t!==e);this.opts.value.current=t,!yi(this.opts.value.current,t)&&this.opts.onValueChange.current(t)}#t=O(()=>({id:this.opts.id.current,[this.root.getBitsAttr(`checkbox-group`)]:``,role:`group`,"aria-labelledby":this.groupHeadingId,...this.attachment}));get props(){return V(this.#t)}set props(e){K(this.#t,e)}};globalThis.bitsDismissableLayers??=new Map;var sa=class e{static create(t){return new e(t)}opts;#e;#t;#n={pointerdown:!1};#r=!1;#i=!1;#a=void 0;#o;#s=Q;constructor(e){this.opts=e,this.#t=e.interactOutsideBehavior,this.#e=e.onInteractOutside,this.#o=e.onFocusOutside,F(()=>{this.#a=wr(this.opts.ref.current)});let t=Q,n=()=>{this.#g(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),t()};Z([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return en(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#t),t(),t=this.#l())}),n}),Qt(()=>{this.#g.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),this.#s(),t()})}#c=e=>{e.defaultPrevented||this.opts.ref.current&&tn(()=>{!this.opts.ref.current||this.#h(e.target)||e.target&&!this.#i&&this.#o.current?.(e)})};#l(){return Et(_e(this.#a,`pointerdown`,Et(this.#f,this.#m),{capture:!0}),_e(this.#a,`pointerdown`,Et(this.#p,this.#d)),_e(this.#a,`focusin`,this.#c))}#u=e=>{let t=e;t.defaultPrevented&&(t=da(e)),this.#e.current(e)};#d=Sr(e=>{if(!this.opts.ref.current){this.#s();return}let t=this.opts.isValidEvent.current(e,this.opts.ref.current)||ua(e,this.opts.ref.current);if(!this.#r||this.#_()||!t){this.#s();return}let n=e;if(n.defaultPrevented&&(n=da(n)),this.#t.current!==`close`&&this.#t.current!==`defer-otherwise-close`){this.#s();return}e.pointerType===`touch`?(this.#s(),this.#s=_e(this.#a,`click`,this.#u,{once:!0})):this.#e.current(n)},10);#f=e=>{this.#n[e.type]=!0};#p=e=>{this.#n[e.type]=!1};#m=()=>{this.opts.ref.current&&(this.#r=la(this.opts.ref.current))};#h=e=>this.opts.ref.current?Cr(this.opts.ref.current,e):!1;#g=Sr(()=>{for(let e in this.#n)this.#n[e]=!1;this.#r=!1},20);#_(){return Object.values(this.#n).some(Boolean)}#v=()=>{this.#i=!0};#y=()=>{this.#i=!1};props={onfocuscapture:this.#v,onblurcapture:this.#y}};function ca(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([e,{current:t}])=>t===`close`||t===`ignore`)}function la(e){let t=[...globalThis.bitsDismissableLayers],n=ca(t);if(n)return n[0].opts.ref.current===e;let[r]=t[0];return r.opts.ref.current===e}function ua(e,t){let n=e.target;if(!Yn(n))return!1;let r=!!n.closest(`[${Ri}]`);if(`button`in e&&e.button>0&&!r)return!1;if(`button`in e&&e.button===0&&r)return!0;let i=!!t.closest(`[${zi}]`);return r&&i?!1:wr(n).documentElement.contains(n)&&!Cr(t,n)&&Tr(e,t)}function da(e){let t=e.currentTarget,n=e.target,r;r=e instanceof PointerEvent?new PointerEvent(e.type,e):new PointerEvent(`pointerdown`,e);let i=!1;return new Proxy(r,{get:(r,a)=>a===`currentTarget`?t:a===`target`?n:a===`preventDefault`?()=>{i=!0,typeof r.preventDefault==`function`&&r.preventDefault()}:a===`defaultPrevented`?i:a in r?r[a]:e[a]})}function fa(e,t){C(t,!0);let n=z(t,`interactOutsideBehavior`,7,`close`),r=z(t,`onInteractOutside`,7,Q),i=z(t,`onFocusOutside`,7,Q),a=z(t,`id`,7),o=z(t,`children`,7),s=z(t,`enabled`,7),c=z(t,`isValidEvent`,7,()=>!1),u=z(t,`ref`,7),f=sa.create({id:Y(()=>a()),interactOutsideBehavior:Y(()=>n()),onInteractOutside:Y(()=>r()),enabled:Y(()=>s()),onFocusOutside:Y(()=>i()),isValidEvent:Y(()=>c()),ref:u()});var p={get interactOutsideBehavior(){return n()},set interactOutsideBehavior(e=`close`){n(e),x()},get onInteractOutside(){return r()},set onInteractOutside(e=Q){r(e),x()},get onFocusOutside(){return i()},set onFocusOutside(e=Q){i(e),x()},get id(){return a()},set id(e){a(e),x()},get children(){return o()},set children(e){o(e),x()},get enabled(){return s()},set enabled(e){s(e),x()},get isValidEvent(){return c()},set isValidEvent(e=()=>!1){c(e),x()},get ref(){return u()},set ref(e){u(e),x()}},h=m();return S(P(h),()=>o()??d,()=>({props:f.props})),l(e,h),y(p)}R(fa,{interactOutsideBehavior:{},onInteractOutside:{},onFocusOutside:{},id:{},children:{},enabled:{},isValidEvent:{},ref:{}},[],[],{mode:`open`}),globalThis.bitsEscapeLayers??=new Map;var pa=class e{static create(t){return new e(t)}opts;domContext;constructor(e){this.opts=e,this.domContext=new hn(this.opts.ref);let t=Q;Z(()=>e.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),t=this.#e()),()=>{t(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>_e(this.domContext.getDocument(),`keydown`,this.#t,{passive:!1});#t=e=>{if(e.key!==`Escape`||!ma(this))return;let t=new KeyboardEvent(e.type,e);e.preventDefault();let n=this.opts.escapeKeydownBehavior.current;n!==`close`&&n!==`defer-otherwise-close`||this.opts.onEscapeKeydown.current(t)}};function ma(e){let t=[...globalThis.bitsEscapeLayers],n=t.findLast(([e,{current:t}])=>t===`close`||t===`ignore`);if(n)return n[0]===e;let[r]=t[0];return r===e}function ha(e,t){C(t,!0);let n=z(t,`escapeKeydownBehavior`,7,`close`),r=z(t,`onEscapeKeydown`,7,Q),i=z(t,`children`,7),a=z(t,`enabled`,7),o=z(t,`ref`,7);pa.create({escapeKeydownBehavior:Y(()=>n()),onEscapeKeydown:Y(()=>r()),enabled:Y(()=>a()),ref:o()});var s={get escapeKeydownBehavior(){return n()},set escapeKeydownBehavior(e=`close`){n(e),x()},get onEscapeKeydown(){return r()},set onEscapeKeydown(e=Q){r(e),x()},get children(){return i()},set children(e){i(e),x()},get enabled(){return a()},set enabled(e){a(e),x()},get ref(){return o()},set ref(e){o(e),x()}},c=m();return S(P(c),()=>i()??d),l(e,c),y(s)}R(ha,{escapeKeydownBehavior:{},onEscapeKeydown:{},children:{},enabled:{},ref:{}},[],[],{mode:`open`});var ga=class e{static instance;#e=Ze([]);#t=new WeakMap;#n=new WeakMap;static getInstance(){return this.instance||=new e,this.instance}register(e){let t=this.getActive();t&&t!==e&&t.pause();let n=document.activeElement;n&&n!==document.body&&this.#n.set(e,n),this.#e.current=this.#e.current.filter(t=>t!==e),this.#e.current.unshift(e)}unregister(e){this.#e.current=this.#e.current.filter(t=>t!==e);let t=this.getActive();t&&t.resume()}getActive(){return this.#e.current[0]}setFocusMemory(e,t){this.#t.set(e,t)}getFocusMemory(e){return this.#t.get(e)}isActiveScope(e){return this.getActive()===e}setPreFocusMemory(e,t){this.#n.set(e,t)}getPreFocusMemory(e){return this.#n.get(e)}clearPreFocusMemory(e){this.#n.delete(e)}},_a=class e{#e=!1;#t=null;#n=ga.getInstance();#r=[];#i;constructor(e){this.#i=e}get paused(){return this.#e}pause(){this.#e=!0}resume(){this.#e=!1}#a(){for(let e of this.#r)e();this.#r=[]}mount(e){this.#t&&this.unmount(),this.#t=e,this.#n.register(this),this.#c(),this.#o()}unmount(){this.#t&&=(this.#a(),this.#s(),this.#n.unregister(this),this.#n.clearPreFocusMemory(this),null)}#o(){if(!this.#t)return;let e=new CustomEvent(`focusScope.onOpenAutoFocus`,{bubbles:!1,cancelable:!0});this.#i.onOpenAutoFocus.current(e),e.defaultPrevented||requestAnimationFrame(()=>{if(!this.#t)return;let e=this.#u();e?(e.focus(),this.#n.setFocusMemory(this,e)):this.#t.focus()})}#s(){let e=new CustomEvent(`focusScope.onCloseAutoFocus`,{bubbles:!1,cancelable:!0});if(this.#i.onCloseAutoFocus.current?.(e),!e.defaultPrevented){let e=this.#n.getPreFocusMemory(this);if(e&&document.contains(e))try{e.focus()}catch{document.body.focus()}}}#c(){if(!this.#t||!this.#i.trap.current)return;let e=this.#t,t=e.ownerDocument;this.#r.push(_e(t,`focusin`,t=>{if(this.#e||!this.#n.isActiveScope(this))return;let n=t.target;if(n)if(e.contains(n))this.#n.setFocusMemory(this,n);else{let n=this.#n.getFocusMemory(this);if(n&&e.contains(n)&&hi(n))t.preventDefault(),n.focus();else{let t=this.#u(),n=this.#d()[0];(t||n||e).focus()}}},{capture:!0}),_e(e,`keydown`,e=>{if(!this.#i.loop||this.#e||e.key!==`Tab`||!this.#n.isActiveScope(this))return;let n=this.#l();if(n.length===0)return;let r=n[0],i=n[n.length-1];!e.shiftKey&&t.activeElement===i?(e.preventDefault(),r.focus()):e.shiftKey&&t.activeElement===r&&(e.preventDefault(),i.focus())}));let n=new MutationObserver(()=>{let t=this.#n.getFocusMemory(this);if(t&&!e.contains(t)){let t=this.#u(),n=this.#d()[0],r=t||n;r?(r.focus(),this.#n.setFocusMemory(this,r)):e.focus()}});n.observe(e,{childList:!0,subtree:!0}),this.#r.push(()=>n.disconnect())}#l(){return this.#t?di(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#u(){return this.#l()[0]||null}#d(){return this.#t?fi(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let n=null;return Z([()=>t.ref.current,()=>t.enabled.current],([r,i])=>{r&&i?(n||=new e(t),n.mount(r)):n&&=(n.unmount(),null)}),Qt(()=>{n?.unmount()}),{get props(){return{tabindex:-1}}}}};function va(e,t){C(t,!0);let n=z(t,`enabled`,7,!1),r=z(t,`trapFocus`,7,!1),i=z(t,`loop`,7,!1),a=z(t,`onCloseAutoFocus`,7,Q),o=z(t,`onOpenAutoFocus`,7,Q),s=z(t,`focusScope`,7),c=z(t,`ref`,7),u=_a.use({enabled:Y(()=>n()),trap:Y(()=>r()),loop:i(),onCloseAutoFocus:Y(()=>a()),onOpenAutoFocus:Y(()=>o()),ref:c()});var f={get enabled(){return n()},set enabled(e=!1){n(e),x()},get trapFocus(){return r()},set trapFocus(e=!1){r(e),x()},get loop(){return i()},set loop(e=!1){i(e),x()},get onCloseAutoFocus(){return a()},set onCloseAutoFocus(e=Q){a(e),x()},get onOpenAutoFocus(){return o()},set onOpenAutoFocus(e=Q){o(e),x()},get focusScope(){return s()},set focusScope(e){s(e),x()},get ref(){return c()},set ref(e){c(e),x()}},p=m();return S(P(p),()=>s()??d,()=>({props:u.props})),l(e,p),y(f)}R(va,{enabled:{},trapFocus:{},loop:{},onCloseAutoFocus:{},onOpenAutoFocus:{},focusScope:{},ref:{}},[],[],{mode:`open`}),globalThis.bitsTextSelectionLayers??=new Map;var ya=class e{static create(t){return new e(t)}opts;domContext;#e=Q;constructor(e){this.opts=e,this.domContext=new hn(e.ref);let t=Q;Z(()=>this.opts.enabled.current,e=>(e&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),t(),t=this.#t()),()=>{t(),this.#r(),globalThis.bitsTextSelectionLayers.delete(this)}))}#t(){return Et(_e(this.domContext.getDocument(),`pointerdown`,this.#n),_e(this.domContext.getDocument(),`pointerup`,$e(this.#r,this.opts.onPointerUp.current)))}#n=e=>{let t=this.opts.ref.current,n=e.target;!qn(t)||!qn(n)||!this.opts.enabled.current||!Ca(this)||!dn(t,n)||(this.opts.onPointerDown.current(e),!e.defaultPrevented&&(this.#e=xa(t,this.domContext.getDocument().body)))};#r=()=>{this.#e(),this.#e=Q}},ba=e=>e.style.userSelect||e.style.webkitUserSelect;function xa(e,t){let n=ba(t),r=ba(e);return Sa(t,`none`),Sa(e,`text`),()=>{Sa(t,n),Sa(e,r)}}function Sa(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function Ca(e){let t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;let n=t.at(-1);return n?n[0]===e:!1}function wa(e,t){C(t,!0);let n=z(t,`preventOverflowTextSelection`,7,!0),r=z(t,`onPointerDown`,7,Q),i=z(t,`onPointerUp`,7,Q),a=z(t,`id`,7),o=z(t,`children`,7),s=z(t,`enabled`,7),c=z(t,`ref`,7);ya.create({id:Y(()=>a()),onPointerDown:Y(()=>r()),onPointerUp:Y(()=>i()),enabled:Y(()=>s()&&n()),ref:c()});var u={get preventOverflowTextSelection(){return n()},set preventOverflowTextSelection(e=!0){n(e),x()},get onPointerDown(){return r()},set onPointerDown(e=Q){r(e),x()},get onPointerUp(){return i()},set onPointerUp(e=Q){i(e),x()},get id(){return a()},set id(e){a(e),x()},get children(){return o()},set children(e){o(e),x()},get enabled(){return s()},set enabled(e){s(e),x()},get ref(){return c()},set ref(e){c(e),x()}},f=m();return S(P(f),()=>o()??d),l(e,f),y(u)}R(wa,{preventOverflowTextSelection:{},onPointerDown:{},onPointerUp:{},id:{},children:{},enabled:{},ref:{}},[],[],{mode:`open`}),globalThis.bitsIdCounter??={current:0};function Ta(e=`bits`){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}var Ea=class{#e;#t=0;#n=i();#r;constructor(e){this.#e=e}#i(){--this.#t,this.#r&&this.#t<=0&&(this.#r(),K(this.#n,void 0),this.#r=void 0)}get(...e){return this.#t+=1,V(this.#n)===void 0&&(this.#r=de(()=>{K(this.#n,this.#e(...e),!0)})),F(()=>()=>{this.#i()}),V(this.#n)}},Da=new Ee,Oa=i(null),ka=null,Aa=null,ja=!1,Ma=Y(()=>{for(let e of Da.values())if(e)return!0;return!1}),Na=null,Pa=new Ea(()=>{function e(){document.body.setAttribute(`style`,V(Oa)??``),document.body.style.removeProperty(`--scrollbar-width`),Gn&&ka?.(),K(Oa,null)}function t(){Aa!==null&&(window.clearTimeout(Aa),Aa=null)}function n(e,n){t(),ja=!0,Na=Date.now();let r=Na,i=()=>{Aa=null,Na===r&&(Ia(Da)?ja=!1:(ja=!1,n()))},a=e===null?24:e;Aa=window.setTimeout(i,a)}function r(){V(Oa)===null&&Da.size===0&&!ja&&K(Oa,document.body.getAttribute(`style`),!0)}return Z(()=>Ma.current,()=>{if(!Ma.current)return;r(),ja=!1;let e=getComputedStyle(document.documentElement),t=getComputedStyle(document.body),n=e.scrollbarGutter?.includes(`stable`)||t.scrollbarGutter?.includes(`stable`),i=window.innerWidth-document.documentElement.clientWidth,a={padding:Number.parseInt(t.paddingRight??`0`,10)+i,margin:Number.parseInt(t.marginRight??`0`,10)};i>0&&!n&&(document.body.style.paddingRight=`${a.padding}px`,document.body.style.marginRight=`${a.margin}px`,document.body.style.setProperty(`--scrollbar-width`,`${i}px`)),document.body.style.overflow=`hidden`,Gn&&(ka=_e(document,`touchmove`,e=>{e.target===document.documentElement&&(e.touches.length>1||e.preventDefault())},{passive:!1})),tn(()=>{document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`})}),Qt(()=>()=>{ka?.()}),{get lockMap(){return Da},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:n,cancelPendingCleanup:t,ensureInitialStyleCaptured:r}}),Fa=class{#e=Ta();#t;#n=()=>null;#r;locked;constructor(e,t=()=>null){this.#t=e,this.#n=t,this.#r=Pa.get(),this.#r&&(this.#r.cancelPendingCleanup(),this.#r.ensureInitialStyleCaptured(),this.#r.lockMap.set(this.#e,this.#t??!1),this.locked=Y(()=>this.#r.lockMap.get(this.#e)??!1,e=>this.#r.lockMap.set(this.#e,e)),Qt(()=>{if(this.#r.lockMap.delete(this.#e),Ia(this.#r.lockMap))return;let e=this.#n();this.#r.scheduleCleanupIfNoNewLocks(e,()=>{this.#r.resetBodyStyle()})}))}};function Ia(e){for(let[t,n]of e)if(n)return!0;return!1}function La(e,t){C(t,!0);let n=z(t,`preventScroll`,7,!0),r=z(t,`restoreScrollDelay`,7,null);return n()&&new Fa(n(),()=>r()),y({get preventScroll(){return n()},set preventScroll(e=!0){n(e),x()},get restoreScrollDelay(){return r()},set restoreScrollDelay(e=null){r(e),x()}})}R(La,{preventScroll:{},restoreScrollDelay:{}},[],[],{mode:`open`});var Ra=B(`<div><!></div>`);function za(e,t){let r=N();C(t,!0);let i=z(t,`id`,23,()=>$(r)),a=z(t,`forceMount`,7,!1),o=z(t,`child`,7),s=z(t,`children`,7),c=z(t,`ref`,15,null),u=H(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`forceMount`,`child`,`children`,`ref`]),f=lr.create({id:Y(()=>i()),ref:Y(()=>c(),e=>c(e))}),p=O(()=>X(u,f.props));var h={get id(){return i()},set id(e=$(r)){i(e),x()},get forceMount(){return a()},set forceMount(e=!1){a(e),x()},get child(){return o()},set child(e){o(e),x()},get children(){return s()},set children(e){s(e),x()},get ref(){return c()},set ref(e=null){c(e),x()}},g=m(),_=P(g),v=e=>{var t=m(),r=P(t),i=e=>{var t=m(),n=P(t);{let e=O(()=>({props:X(V(p)),...f.snippetProps}));S(n,o,()=>V(e))}l(e,t)},a=e=>{var t=Ra();I(t,e=>({...e}),[()=>X(V(p))]),S(L(t),()=>s()??d,()=>f.snippetProps),A(t),l(e,t)};n(r,e=>{o()?e(i):e(a,-1)}),l(e,t)};return n(_,e=>{(f.shouldRender||a())&&e(v)}),l(e,g),y(h)}R(za,{id:{},forceMount:{},child:{},children:{},ref:{}},[],[],{mode:`open`});var Ba=B(`<input/>`),Va=B(`<input/>`);function Ha(e,t){C(t,!0);let r=z(t,`value`,15),i=H(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`value`]),a=O(()=>X(i,{"aria-hidden":`true`,tabindex:-1,style:Nt}));var o={get value(){return r()},set value(e){r(e),x()}},s=m(),c=P(s),u=e=>{var t=Ba();I(t,()=>({...V(a),value:r()}),void 0,void 0,void 0,void 0,!0),l(e,t)},d=e=>{var t=Va();I(t,()=>({...V(a)}),void 0,void 0,void 0,void 0,!0),me(t,r),l(e,t)};return n(c,e=>{V(a).type===`checkbox`?e(u):e(d,-1)}),l(e,s),y(o)}R(Ha,{value:{}},[],[],{mode:`open`});var Ua=wn({component:`collapsible`,parts:[`root`,`content`,`trigger`]}),Wa=new Lt(`Collapsible.Root`),Ga=class e{static create(t){return Wa.set(new e(t))}opts;attachment;#e=i(null);get contentNode(){return V(this.#e)}set contentNode(e){K(this.#e,e,!0)}contentPresence;#t=i(void 0);get contentId(){return V(this.#t)}set contentId(e){K(this.#t,e,!0)}constructor(e){this.opts=e,this.toggleOpen=this.toggleOpen.bind(this),this.attachment=gn(this.opts.ref),this.contentPresence=new tr({ref:Y(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}})}toggleOpen(){this.opts.open.current=!this.opts.open.current}#n=O(()=>({id:this.opts.id.current,"data-state":xn(this.opts.open.current),"data-disabled":yn(this.opts.disabled.current),[Ua.root]:``,...this.attachment}));get props(){return V(this.#n)}set props(e){K(this.#n,e)}},Ka=class e{static create(t){return new e(t,Wa.get())}opts;root;attachment;#e=O(()=>this.opts.hiddenUntilFound.current?this.root.opts.open.current:this.opts.forceMount.current||this.root.opts.open.current);get present(){return V(this.#e)}set present(e){K(this.#e,e)}#t;#n=i(!1);#r=i(0);#i=i(0);constructor(e,t){this.opts=e,this.root=t,K(this.#n,t.opts.open.current,!0),this.root.contentId=this.opts.id.current,this.attachment=gn(this.opts.ref,e=>this.root.contentNode=e),Z.pre(()=>this.opts.id.current,e=>{this.root.contentId=e}),oe(()=>{let e=requestAnimationFrame(()=>{K(this.#n,!1)});return()=>{cancelAnimationFrame(e)}}),Z.pre([()=>this.opts.ref.current,()=>this.opts.hiddenUntilFound.current],([e,t])=>!e||!t?void 0:_e(e,`beforematch`,()=>{this.root.opts.open.current||requestAnimationFrame(()=>{this.root.opts.open.current=!0})})),Z([()=>this.opts.ref.current,()=>this.present],([e])=>{e&&tn(()=>{if(!this.opts.ref.current)return;this.#t=this.#t||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();if(K(this.#i,t.height,!0),K(this.#r,t.width,!0),!V(this.#n)){let{animationName:t,transitionDuration:n}=this.#t;e.style.transitionDuration=n,e.style.animationName=t}})})}get shouldRender(){return this.root.contentPresence.shouldRender}#a=O(()=>({open:this.root.opts.open.current}));get snippetProps(){return V(this.#a)}set snippetProps(e){K(this.#a,e)}#o=O(()=>({id:this.opts.id.current,style:{"--bits-collapsible-content-height":V(this.#i)?`${V(this.#i)}px`:void 0,"--bits-collapsible-content-width":V(this.#r)?`${V(this.#r)}px`:void 0},hidden:this.opts.hiddenUntilFound.current&&!this.root.opts.open.current?`until-found`:void 0,"data-state":xn(this.root.opts.open.current),"data-disabled":yn(this.root.opts.disabled.current),[Ua.content]:``,...this.opts.hiddenUntilFound.current&&!this.shouldRender?{}:{hidden:this.opts.hiddenUntilFound.current?!this.shouldRender:this.opts.forceMount.current?void 0:!this.shouldRender},...this.attachment}));get props(){return V(this.#o)}set props(e){K(this.#o,e)}},qa=class e{static create(t){return new e(t,Wa.get())}opts;root;attachment;#e=O(()=>this.opts.disabled.current||this.root.opts.disabled.current);constructor(e,t){this.opts=e,this.root=t,this.attachment=gn(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(e){if(!V(this.#e)){if(e.button!==0)return e.preventDefault();this.root.toggleOpen()}}onkeydown(e){V(this.#e)||(e.key===` `||e.key===`Enter`)&&(e.preventDefault(),this.root.toggleOpen())}#t=O(()=>({id:this.opts.id.current,type:`button`,disabled:V(this.#e),"aria-controls":this.root.contentId,"aria-expanded":_n(this.root.opts.open.current),"data-state":xn(this.root.opts.open.current),"data-disabled":yn(V(this.#e)),[Ua.trigger]:``,onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return V(this.#t)}set props(e){K(this.#t,e)}},Ja=B(`<div><!></div>`);function Ya(e,t){let r=N();C(t,!0);let i=z(t,`children`,7),a=z(t,`child`,7),o=z(t,`id`,23,()=>$(r)),s=z(t,`ref`,15,null),c=z(t,`open`,15,!1),u=z(t,`disabled`,7,!1),f=z(t,`onOpenChange`,7,Q),p=z(t,`onOpenChangeComplete`,7,Q),h=H(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`children`,`child`,`id`,`ref`,`open`,`disabled`,`onOpenChange`,`onOpenChangeComplete`]),g=Ga.create({open:Y(()=>c(),e=>{c(e),f()(e)}),disabled:Y(()=>u()),id:Y(()=>o()),ref:Y(()=>s(),e=>s(e)),onOpenChangeComplete:Y(()=>p())}),_=O(()=>X(h,g.props));var v={get children(){return i()},set children(e){i(e),x()},get child(){return a()},set child(e){a(e),x()},get id(){return o()},set id(e=$(r)){o(e),x()},get ref(){return s()},set ref(e=null){s(e),x()},get open(){return c()},set open(e=!1){c(e),x()},get disabled(){return u()},set disabled(e=!1){u(e),x()},get onOpenChange(){return f()},set onOpenChange(e=Q){f(e),x()},get onOpenChangeComplete(){return p()},set onOpenChangeComplete(e=Q){p(e),x()}},b=m(),w=P(b),T=e=>{var t=m();S(P(t),a,()=>({props:V(_)})),l(e,t)},E=e=>{var t=Ja();I(t,()=>({...V(_)})),S(L(t),()=>i()??d),A(t),l(e,t)};return n(w,e=>{a()?e(T):e(E,-1)}),l(e,b),y(v)}R(Ya,{children:{},child:{},id:{},ref:{},open:{},disabled:{},onOpenChange:{},onOpenChangeComplete:{}},[],[],{mode:`open`});var Xa=B(`<div><!></div>`);function Za(e,t){let r=N();C(t,!0);let i=z(t,`child`,7),a=z(t,`ref`,15,null),o=z(t,`forceMount`,7,!1),s=z(t,`hiddenUntilFound`,7,!1),c=z(t,`children`,7),u=z(t,`id`,23,()=>$(r)),f=H(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`child`,`ref`,`forceMount`,`hiddenUntilFound`,`children`,`id`]),p=Ka.create({id:Y(()=>u()),forceMount:Y(()=>o()),hiddenUntilFound:Y(()=>s()),ref:Y(()=>a(),e=>a(e))}),h=O(()=>X(f,p.props));var g={get child(){return i()},set child(e){i(e),x()},get ref(){return a()},set ref(e=null){a(e),x()},get forceMount(){return o()},set forceMount(e=!1){o(e),x()},get hiddenUntilFound(){return s()},set hiddenUntilFound(e=!1){s(e),x()},get children(){return c()},set children(e){c(e),x()},get id(){return u()},set id(e=$(r)){u(e),x()}},_=m(),v=P(_),b=e=>{var t=m(),n=P(t);{let e=O(()=>({...p.snippetProps,props:V(h)}));S(n,i,()=>V(e))}l(e,t)},w=e=>{var t=Xa();I(t,()=>({...V(h)})),S(L(t),()=>c()??d),A(t),l(e,t)};return n(v,e=>{i()?e(b):e(w,-1)}),l(e,_),y(g)}R(Za,{child:{},ref:{},forceMount:{},hiddenUntilFound:{},children:{},id:{}},[],[],{mode:`open`});var Qa=B(`<button><!></button>`);function $a(e,t){let r=N();C(t,!0);let i=z(t,`children`,7),a=z(t,`child`,7),o=z(t,`ref`,15,null),s=z(t,`id`,23,()=>$(r)),c=z(t,`disabled`,7,!1),u=H(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`children`,`child`,`ref`,`id`,`disabled`]),f=qa.create({id:Y(()=>s()),ref:Y(()=>o(),e=>o(e)),disabled:Y(()=>c())}),p=O(()=>X(u,f.props));var h={get children(){return i()},set children(e){i(e),x()},get child(){return a()},set child(e){a(e),x()},get ref(){return o()},set ref(e=null){o(e),x()},get id(){return s()},set id(e=$(r)){s(e),x()},get disabled(){return c()},set disabled(e=!1){c(e),x()}},g=m(),_=P(g),v=e=>{var t=m();S(P(t),a,()=>({props:V(p)})),l(e,t)},b=e=>{var t=Qa();I(t,()=>({...V(p)})),S(L(t),()=>i()??d),A(t),l(e,t)};return n(_,e=>{a()?e(v):e(b,-1)}),l(e,g),y(h)}R($a,{children:{},child:{},ref:{},id:{},disabled:{}},[],[],{mode:`open`});var eo=[`top`,`right`,`bottom`,`left`],to=Math.min,no=Math.max,ro=Math.round,io=Math.floor,ao=e=>({x:e,y:e}),oo={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function so(e,t,n){return no(e,to(t,n))}function co(e,t){return typeof e==`function`?e(t):e}function lo(e){return e.split(`-`)[0]}function uo(e){return e.split(`-`)[1]}function fo(e){return e===`x`?`y`:`x`}function po(e){return e===`y`?`height`:`width`}function mo(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function ho(e){return fo(mo(e))}function go(e,t,n){n===void 0&&(n=!1);let r=uo(e),i=ho(e),a=po(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=To(o)),[o,To(o)]}function _o(e){let t=To(e);return[vo(e),t,vo(t)]}function vo(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var yo=[`left`,`right`],bo=[`right`,`left`],xo=[`top`,`bottom`],So=[`bottom`,`top`];function Co(e,t,n){switch(e){case`top`:case`bottom`:return n?t?bo:yo:t?yo:bo;case`left`:case`right`:return t?xo:So;default:return[]}}function wo(e,t,n,r){let i=uo(e),a=Co(lo(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(vo)))),a}function To(e){let t=lo(e);return oo[t]+e.slice(t.length)}function Eo(e){return{top:0,right:0,bottom:0,left:0,...e}}function Do(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Eo(e)}function Oo(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ko(e,t,n){let{reference:r,floating:i}=e,a=mo(t),o=ho(t),s=po(o),c=lo(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(uo(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function Ao(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=co(t,e),p=Do(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Oo(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Oo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var jo=50,Mo=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Ao},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ko(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<jo&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=ko(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},No=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=co(e,t)||{};if(l==null)return{};let d=Do(u),f={x:n,y:r},p=ho(i),m=po(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=to(d[_],T),D=to(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=so(O,A,k),M=!c.arrow&&uo(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),Po=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=co(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=lo(r),_=mo(o),v=lo(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[To(o)]:_o(o)),x=p!==`none`;!d&&x&&b.push(...wo(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=go(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==mo(t))||T.every(e=>mo(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=mo(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function Fo(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Io(e){return eo.some(t=>e[t]>=0)}var Lo=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=co(e,t);switch(i){case`referenceHidden`:{let e=Fo(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Io(e)}}}case`escaped`:{let e=Fo(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Io(e)}}}default:return{}}}}},Ro=new Set([`left`,`top`]);async function zo(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=lo(n),s=uo(n),c=mo(n)===`y`,l=Ro.has(o)?-1:1,u=a&&c?-1:1,d=co(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Bo=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await zo(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Vo=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=co(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=mo(lo(i)),p=fo(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=so(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=so(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Ho=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=co(e,t),u={x:n,y:r},d=mo(i),f=fo(d),p=u[f],m=u[d],h=co(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Ro.has(lo(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Uo=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=co(e,t),u=await o.detectOverflow(t,l),d=lo(i),f=uo(i),p=mo(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=to(h-u[g],v),x=to(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=no(u.left,0),t=no(u.right,0),n=no(u.top,0),r=no(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:no(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:no(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Wo(){return typeof window<`u`}function Go(e){return Jo(e)?(e.nodeName||``).toLowerCase():`#document`}function Ko(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function qo(e){return((Jo(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Jo(e){return Wo()?e instanceof Node||e instanceof Ko(e).Node:!1}function Yo(e){return Wo()?e instanceof Element||e instanceof Ko(e).Element:!1}function Xo(e){return Wo()?e instanceof HTMLElement||e instanceof Ko(e).HTMLElement:!1}function Zo(e){return!Wo()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Ko(e).ShadowRoot}function Qo(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=ls(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function $o(e){return/^(table|td|th)$/.test(Go(e))}function es(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var ts=/transform|translate|scale|rotate|perspective|filter/,ns=/paint|layout|strict|content/,rs=e=>!!e&&e!==`none`,is;function as(e){let t=Yo(e)?ls(e):e;return rs(t.transform)||rs(t.translate)||rs(t.scale)||rs(t.rotate)||rs(t.perspective)||!ss()&&(rs(t.backdropFilter)||rs(t.filter))||ts.test(t.willChange||``)||ns.test(t.contain||``)}function os(e){let t=ds(e);for(;Xo(t)&&!cs(t);){if(as(t))return t;if(es(t))return null;t=ds(t)}return null}function ss(){return is??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),is}function cs(e){return/^(html|body|#document)$/.test(Go(e))}function ls(e){return Ko(e).getComputedStyle(e)}function us(e){return Yo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ds(e){if(Go(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Zo(e)&&e.host||qo(e);return Zo(t)?t.host:t}function fs(e){let t=ds(e);return cs(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xo(t)&&Qo(t)?t:fs(t)}function ps(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=fs(e),i=r===e.ownerDocument?.body,a=Ko(r);if(i){let e=ms(a);return t.concat(a,a.visualViewport||[],Qo(r)?r:[],e&&n?ps(e):[])}else return t.concat(r,ps(r,[],n))}function ms(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function hs(e){let t=ls(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Xo(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=ro(n)!==a||ro(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function gs(e){return Yo(e)?e:e.contextElement}function _s(e){let t=gs(e);if(!Xo(t))return ao(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=hs(t),o=(a?ro(n.width):n.width)/r,s=(a?ro(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var vs=ao(0);function ys(e){let t=Ko(e);return!ss()||!t.visualViewport?vs:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function bs(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ko(e)?!1:t}function xs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=gs(e),o=ao(1);t&&(r?Yo(r)&&(o=_s(r)):o=_s(e));let s=bs(a,n,r)?ys(a):ao(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Ko(a),t=r&&Yo(r)?Ko(r):r,n=e,i=ms(n);for(;i&&r&&t!==n;){let e=_s(i),t=i.getBoundingClientRect(),r=ls(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Ko(i),i=ms(n)}}return Oo({width:u,height:d,x:c,y:l})}function Ss(e,t){let n=us(e).scrollLeft;return t?t.left+n:xs(qo(e)).left+n}function Cs(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ss(e,n),y:n.top+t.scrollTop}}function ws(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=qo(r),s=t?es(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=ao(1),u=ao(0),d=Xo(r);if((d||!d&&!a)&&((Go(r)!==`body`||Qo(o))&&(c=us(r)),d)){let e=xs(r);l=_s(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Cs(o,c):ao(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Ts(e){return Array.from(e.getClientRects())}function Es(e){let t=qo(e),n=us(e),r=e.ownerDocument.body,i=no(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=no(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Ss(e),s=-n.scrollTop;return ls(r).direction===`rtl`&&(o+=no(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Ds=25;function Os(e,t){let n=Ko(e),r=qo(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=ss();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Ss(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Ds&&(a-=o)}else l<=Ds&&(a+=l);return{width:a,height:o,x:s,y:c}}function ks(e,t){let n=xs(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Xo(e)?_s(e):ao(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function As(e,t,n){let r;if(t===`viewport`)r=Os(e,n);else if(t===`document`)r=Es(qo(e));else if(Yo(t))r=ks(t,n);else{let n=ys(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Oo(r)}function js(e,t){let n=ds(e);return n===t||!Yo(n)||cs(n)?!1:ls(n).position===`fixed`||js(n,t)}function Ms(e,t){let n=t.get(e);if(n)return n;let r=ps(e,[],!1).filter(e=>Yo(e)&&Go(e)!==`body`),i=null,a=ls(e).position===`fixed`,o=a?ds(e):e;for(;Yo(o)&&!cs(o);){let t=ls(o),n=as(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Qo(o)&&!n&&js(e,o))?r=r.filter(e=>e!==o):i=t,o=ds(o)}return t.set(e,r),r}function Ns(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?es(t)?[]:Ms(t,this._c):[].concat(n),r],o=As(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=As(t,a[e],i);s=no(n.top,s),c=to(n.right,c),l=to(n.bottom,l),u=no(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Ps(e){let{width:t,height:n}=hs(e);return{width:t,height:n}}function Fs(e,t,n){let r=Xo(t),i=qo(t),a=n===`fixed`,o=xs(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=ao(0);function l(){c.x=Ss(i)}if(r||!r&&!a)if((Go(t)!==`body`||Qo(i))&&(s=us(t)),r){let e=xs(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Cs(i,s):ao(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Is(e){return ls(e).position===`static`}function Ls(e,t){if(!Xo(e)||ls(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return qo(e)===n&&(n=n.ownerDocument.body),n}function Rs(e,t){let n=Ko(e);if(es(e))return n;if(!Xo(e)){let t=ds(e);for(;t&&!cs(t);){if(Yo(t)&&!Is(t))return t;t=ds(t)}return n}let r=Ls(e,t);for(;r&&$o(r)&&Is(r);)r=Ls(r,t);return r&&cs(r)&&Is(r)&&!as(r)?n:r||os(e)||n}var zs=async function(e){let t=this.getOffsetParent||Rs,n=this.getDimensions,r=await n(e.floating);return{reference:Fs(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Bs(e){return ls(e).direction===`rtl`}var Vs={convertOffsetParentRelativeRectToViewportRelativeRect:ws,getDocumentElement:qo,getClippingRect:Ns,getOffsetParent:Rs,getElementRects:zs,getClientRects:Ts,getDimensions:Ps,getScale:_s,isElement:Yo,isRTL:Bs};function Hs(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Us(e,t){let n=null,r,i=qo(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=io(d),h=io(i.clientWidth-(u+f)),g=io(i.clientHeight-(d+p)),_=io(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:no(0,to(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Hs(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Ws(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=gs(e),u=i||a?[...l?ps(l):[],...t?ps(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Us(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?xs(e):null;c&&g();function g(){let t=xs(e);h&&!Hs(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Gs=Bo,Ks=Vo,qs=Po,Js=Uo,Ys=Lo,Xs=No,Zs=Ho,Qs=(e,t,n)=>{let r=new Map,i={platform:Vs,...n},a={...i.platform,_c:r};return Mo(e,t,{...i,platform:a})};function $s(e){return typeof e==`function`?e():e}function ec(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tc(e,t){let n=ec(e);return Math.round(t*n)/n}function nc(e){return{[`--bits-${e}-content-transform-origin`]:`var(--bits-floating-transform-origin)`,[`--bits-${e}-content-available-width`]:`var(--bits-floating-available-width)`,[`--bits-${e}-content-available-height`]:`var(--bits-floating-available-height)`,[`--bits-${e}-anchor-width`]:`var(--bits-floating-anchor-width)`,[`--bits-${e}-anchor-height`]:`var(--bits-floating-anchor-height)`}}function rc(e){let t=e.whileElementsMounted,n=O(()=>$s(e.open)??!0),r=O(()=>$s(e.middleware)),a=O(()=>$s(e.transform)??!0),o=O(()=>$s(e.placement)??`bottom`),s=O(()=>$s(e.strategy)??`absolute`),c=O(()=>$s(e.sideOffset)??0),l=O(()=>$s(e.alignOffset)??0),u=e.reference,d=i(0),f=i(0),p=Ze(null),m=i(xe(V(s))),h=i(xe(V(o))),g=i(xe({})),_=i(!1),v=!1,y=O(()=>{let e=p.current?tc(p.current,V(d)):V(d),t=p.current?tc(p.current,V(f)):V(f);return V(a)?{position:V(m),left:`0`,top:`0`,transform:`translate(${e}px, ${t}px)`,...p.current&&ec(p.current)>=1.5&&{willChange:`transform`}}:{position:V(m),left:`${e}px`,top:`${t}px`}}),b;function x(){u.current===null||p.current===null||Qs(u.current,p.current,{middleware:V(r),placement:V(o),strategy:V(s)}).then(e=>{let t=u.current;if(ic(t)){K(g,{...V(g),hide:{...V(g).hide,referenceHidden:!0}},!0);return}if(!V(n)&&V(d)!==0&&V(f)!==0){let t=Math.max(Math.abs(V(c)),Math.abs(V(l)),15);if(e.x<=t&&e.y<=t)return}K(d,e.x,!0),K(f,e.y,!0),K(m,e.strategy,!0),K(h,e.placement,!0),K(g,e.middlewareData,!0),K(_,!0)})}function S(){typeof b==`function`&&(b(),b=void 0)}function C(){if(S(),t===void 0){x();return}V(n)&&(u.current===null||p.current===null||(b=t(u.current,p.current,x)))}function w(){!V(n)&&p.current===null&&K(_,!1)}function T(){return[V(r),V(o),V(s),V(c),V(l),V(n)]}return F(()=>{t===void 0&&V(n)&&x()}),F(C),F(()=>{if(t!==void 0){if(T(),!V(n)){v=!1;return}if(!V(_)){v=!1;return}if(!v){v=!0;return}x()}}),F(w),F(()=>S),{floating:p,reference:u,get strategy(){return V(m)},get placement(){return V(h)},get middlewareData(){return V(g)},get isPositioned(){return V(_)},get floatingStyles(){return V(y)},get update(){return x}}}function ic(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}var ac={top:`bottom`,right:`left`,bottom:`top`,left:`right`},oc=new Lt(`Floating.Root`),sc=new Lt(`Floating.Content`),cc=new Lt(`Floating.Root`),lc=class e{static create(t=!1){return t?cc.set(new e):oc.set(new e)}anchorNode=Ze(null);customAnchorNode=Ze(null);triggerNode=Ze(null);constructor(){F(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current==`string`?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}},uc=class e{static create(t,n=!1){return n?sc.set(new e(t,cc.get())):sc.set(new e(t,oc.get()))}opts;root;contentRef=Ze(null);wrapperRef=Ze(null);arrowRef=Ze(null);contentAttachment=gn(this.contentRef);wrapperAttachment=gn(this.wrapperRef);arrowAttachment=gn(this.arrowRef);arrowId=Ze(Ta());#e=O(()=>{if(typeof this.opts.style==`string`)return Tt(this.opts.style);if(!this.opts.style)return{}});#t=void 0;#n=new Gt(()=>this.arrowRef.current??void 0);#r=O(()=>this.#n?.width??0);#i=O(()=>this.#n?.height??0);#a=O(()=>this.opts.side?.current+(this.opts.align.current===`center`?``:`-${this.opts.align.current}`));#o=O(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#s=O(()=>V(this.#o).length>0);get hasExplicitBoundaries(){return V(this.#s)}set hasExplicitBoundaries(e){K(this.#s,e)}#c=O(()=>({padding:this.opts.collisionPadding.current,boundary:V(this.#o).filter(Zn),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return V(this.#c)}set detectOverflowOptions(e){K(this.#c,e)}#l=i(void 0);#u=i(void 0);#d=i(void 0);#f=i(void 0);#p=O(()=>[Gs({mainAxis:this.opts.sideOffset.current+V(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&Ks({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current===`partial`?Zs():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&qs({...this.detectOverflowOptions}),Js({...this.detectOverflowOptions,apply:({rects:e,availableWidth:t,availableHeight:n})=>{let{width:r,height:i}=e.reference;K(this.#l,t,!0),K(this.#u,n,!0),K(this.#d,r,!0),K(this.#f,i,!0)}}),this.arrowRef.current&&Xs({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),fc({arrowWidth:V(this.#r),arrowHeight:V(this.#i)}),this.opts.hideWhenDetached.current&&Ys({strategy:`referenceHidden`,...this.detectOverflowOptions})].filter(Boolean));get middleware(){return V(this.#p)}set middleware(e){K(this.#p,e)}floating;#m=O(()=>mc(this.floating.placement));get placedSide(){return V(this.#m)}set placedSide(e){K(this.#m,e)}#h=O(()=>hc(this.floating.placement));get placedAlign(){return V(this.#h)}set placedAlign(e){K(this.#h,e)}#g=O(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return V(this.#g)}set arrowX(e){K(this.#g,e)}#_=O(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return V(this.#_)}set arrowY(e){K(this.#_,e)}#v=O(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return V(this.#v)}set cannotCenterArrow(e){K(this.#v,e)}#y=i();get contentZIndex(){return V(this.#y)}set contentZIndex(e){K(this.#y,e,!0)}#b=O(()=>ac[this.placedSide]);get arrowBaseSide(){return V(this.#b)}set arrowBaseSide(e){K(this.#b,e)}#x=O(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":``,style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${V(this.#l)}px`,"--bits-floating-available-height":`${V(this.#u)}px`,"--bits-floating-anchor-width":`${V(this.#d)}px`,"--bits-floating-anchor-height":`${V(this.#f)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:`hidden`,"pointer-events":`none`},...V(this.#e)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return V(this.#x)}set wrapperProps(e){K(this.#x,e)}#S=O(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:At({...V(this.#e)}),...this.contentAttachment}));get props(){return V(this.#S)}set props(e){K(this.#S,e)}#C=O(()=>({position:`absolute`,left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[this.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[this.placedSide],visibility:this.cannotCenterArrow?`hidden`:void 0}));get arrowStyle(){return V(this.#C)}set arrowStyle(e){K(this.#C,e)}constructor(e,t){this.opts=e,this.root=t,this.#t=e.updatePositionStrategy,e.customAnchor&&(this.root.customAnchorNode.current=e.customAnchor.current),Z(()=>e.customAnchor.current,e=>{this.root.customAnchorNode.current=e}),this.floating=rc({strategy:()=>this.opts.strategy.current,placement:()=>V(this.#a),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...e)=>Ws(...e,{animationFrame:this.#t?.current===`always`}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),F(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),Z(()=>this.contentRef.current,e=>{if(!e||!this.opts.enabled.current)return;let t=pn(e),n=t.requestAnimationFrame(()=>{if(this.contentRef.current!==e||!this.opts.enabled.current)return;let n=t.getComputedStyle(e).zIndex;n!==this.contentZIndex&&(this.contentZIndex=n)});return()=>{t.cancelAnimationFrame(n)}}),F(()=>{this.floating.floating.current=this.wrapperRef.current})}},dc=class e{static create(t,n=!1){return n?new e(t,cc.get()):new e(t,oc.get())}opts;root;constructor(e,t){this.opts=e,this.root=t,e.virtualEl&&e.virtualEl.current?t.triggerNode=Je(e.virtualEl.current):t.triggerNode=e.ref}};function fc(e){return{name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=pc(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}}function pc(e){let[t,n=`center`]=e.split(`-`);return[t,n]}function mc(e){return pc(e)[0]}function hc(e){return pc(e)[1]}function gc(e,t){C(t,!0);let n=z(t,`children`,7),r=z(t,`tooltip`,7,!1);lc.create(r());var i={get children(){return n()},set children(e){n(e),x()},get tooltip(){return r()},set tooltip(e=!1){r(e),x()}},a=m();return S(P(a),()=>n()??d),l(e,a),y(i)}R(gc,{children:{},tooltip:{}},[],[],{mode:`open`});var _c=[En,Mn,Dn,Ln,kn,An,`Alt`,Pn,jn,`F1`,`F2`,`F3`,`F4`,`F5`,`F6`,`F7`,`F8`,`F9`,`F10`,`F11`,`F12`],vc=[Tn,In,Nn],yc=[On,Fn,`End`],bc=[...vc,...yc],xc=wn({component:`select`,parts:[`trigger`,`content`,`item`,`viewport`,`scroll-up-button`,`scroll-down-button`,`group`,`group-label`,`separator`,`arrow`,`input`,`content-wrapper`,`item-text`,`value`]}),Sc=new Lt(`Select.Root | Combobox.Root`);new Lt(`Select.Group | Combobox.Group`);var Cc=new Lt(`Select.Content | Combobox.Content`),wc=class{opts;#e=i(!1);get touchedInput(){return V(this.#e)}set touchedInput(e){K(this.#e,e,!0)}#t=i(null);get inputNode(){return V(this.#t)}set inputNode(e){K(this.#t,e,!0)}#n=i(null);get contentNode(){return V(this.#n)}set contentNode(e){K(this.#n,e,!0)}contentPresence;#r=i(null);get viewportNode(){return V(this.#r)}set viewportNode(e){K(this.#r,e,!0)}#i=i(null);get triggerNode(){return V(this.#i)}set triggerNode(e){K(this.#i,e,!0)}#a=i(``);get valueId(){return V(this.#a)}set valueId(e){K(this.#a,e,!0)}#o=i(null);get highlightedNode(){return V(this.#o)}set highlightedNode(e){K(this.#o,e,!0)}#s=O(()=>this.highlightedNode?this.highlightedNode.getAttribute(`data-value`):null);get highlightedValue(){return V(this.#s)}set highlightedValue(e){K(this.#s,e)}#c=O(()=>{if(this.highlightedNode)return this.highlightedNode.id});get highlightedId(){return V(this.#c)}set highlightedId(e){K(this.#c,e)}#l=O(()=>this.highlightedNode?this.highlightedNode.getAttribute(`data-label`):null);get highlightedLabel(){return V(this.#l)}set highlightedLabel(e){K(this.#l,e)}isUsingKeyboard=!1;isCombobox=!1;domContext=new hn(()=>null);constructor(e){this.opts=e,this.isCombobox=e.isCombobox,this.contentPresence=new tr({ref:Y(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),oe(()=>{this.opts.open.current||this.setHighlightedNode(null)})}setHighlightedNode(e,t=!1){this.highlightedNode=e,e&&(this.isUsingKeyboard||t)&&e.scrollIntoView({block:this.opts.scrollAlignment.current})}getCandidateNodes(){let e=this.contentNode;return e?Array.from(e.querySelectorAll(`[${this.getBitsAttr(`item`)}]:not([data-disabled])`)):[]}setHighlightedToFirstCandidate(e=!1){this.setHighlightedNode(null);let t=this.getCandidateNodes();if(t.length){if(this.viewportNode){let e=this.viewportNode.getBoundingClientRect();t=t.filter(t=>{if(!this.viewportNode)return!1;let n=t.getBoundingClientRect();return n.right<=e.right&&n.left>=e.left&&n.bottom<=e.bottom&&n.top>=e.top})}this.setHighlightedNode(t[0],e)}}getNodeByValue(e){return this.getCandidateNodes().find(t=>t.dataset.value===e)??null}setOpen(e){this.opts.open.current=e}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleOpen(){this.setOpen(!0)}handleClose(){this.setHighlightedNode(null),this.setOpen(!1)}toggleMenu(){this.toggleOpen()}getBitsAttr=e=>xc.getAttr(e,this.isCombobox?`combobox`:void 0)},Tc=class extends wc{opts;isMulti=!1;#e=O(()=>this.opts.value.current!==``);get hasValue(){return V(this.#e)}set hasValue(e){K(this.#e,e)}#t=O(()=>this.opts.items.current.length?this.opts.items.current.find(e=>e.value===this.opts.value.current)?.label??``:``);get currentLabel(){return V(this.#t)}set currentLabel(e){K(this.#t,e)}#n=O(()=>this.opts.items.current.length?this.opts.items.current.filter(e=>!e.disabled).map(e=>e.label):[]);get candidateLabels(){return V(this.#n)}set candidateLabels(e){K(this.#n,e)}#r=O(()=>!(this.isMulti||this.opts.items.current.length===0));get dataTypeaheadEnabled(){return V(this.#r)}set dataTypeaheadEnabled(e){K(this.#r,e)}constructor(e){super(e),this.opts=e,F(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),Z(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(e){return this.opts.value.current===e}toggleItem(e,t=e){let n=this.includesItem(e)?``:e;this.opts.value.current=n,n!==``&&(this.opts.inputValue.current=t)}setInitialHighlightedNode(){tn(()=>{if(!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current!==``){let e=this.getNodeByValue(this.opts.value.current);if(e){this.setHighlightedNode(e,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}},Ec=class extends wc{opts;isMulti=!0;#e=O(()=>this.opts.value.current.length>0);get hasValue(){return V(this.#e)}set hasValue(e){K(this.#e,e)}constructor(e){super(e),this.opts=e,F(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),Z(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(e){return this.opts.value.current.includes(e)}toggleItem(e,t=e){this.includesItem(e)?this.opts.value.current=this.opts.value.current.filter(t=>t!==e):this.opts.value.current=[...this.opts.value.current,e],this.opts.inputValue.current=t}setInitialHighlightedNode(){tn(()=>{if(this.domContext&&!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current.length&&this.opts.value.current[0]!==``){let e=this.getNodeByValue(this.opts.value.current[0]);if(e){this.setHighlightedNode(e,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}},Dc=class{static create(e){let{type:t,...n}=e,r=t===`single`?new Tc(n):new Ec(n);return Sc.set(r)}},Oc=class e{static create(t){return new e(t,Sc.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=gn(e.ref,e=>this.root.inputNode=e),this.root.domContext=new hn(e.ref),this.onkeydown=this.onkeydown.bind(this),this.oninput=this.oninput.bind(this),Z([()=>this.root.opts.value.current,()=>this.opts.clearOnDeselect.current],([e,t],[n])=>{t&&(Array.isArray(e)&&Array.isArray(n)?e.length===0&&n.length!==0&&(this.root.opts.inputValue.current=``):e===``&&n!==``&&(this.root.opts.inputValue.current=``))})}onkeydown(e){if(this.root.isUsingKeyboard=!0,e.key!==`Escape`){if((e.key===`ArrowUp`||e.key===`ArrowDown`)&&e.preventDefault(),!this.root.opts.open.current){if(_c.includes(e.key)||e.key===`Tab`||e.key===`Backspace`&&this.root.opts.inputValue.current===``||(this.root.handleOpen(),this.root.hasValue))return;let t=this.root.getCandidateNodes();if(!t.length)return;if(e.key===`ArrowDown`){let e=t[0];this.root.setHighlightedNode(e)}else if(e.key===`ArrowUp`){let e=t[t.length-1];this.root.setHighlightedNode(e)}return}if(e.key===`Tab`){this.root.handleClose();return}if(e.key===`Enter`&&!e.isComposing){e.preventDefault();let t=this.root.highlightedValue===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&t&&!this.root.isMulti){this.root.handleClose();return}this.root.highlightedValue&&this.root.highlightedNode&&this.root.highlightedNode.isConnected&&this.root.toggleItem(this.root.highlightedValue,this.root.highlightedLabel??void 0),!this.root.isMulti&&!t&&this.root.handleClose()}if(e.key===`ArrowUp`&&e.altKey&&this.root.handleClose(),bc.includes(e.key)){e.preventDefault();let t=this.root.getCandidateNodes(),n=this.root.highlightedNode,r=n?t.indexOf(n):-1,i=this.root.opts.loop.current,a;if(e.key===`ArrowDown`?a=Si(t,r,i):e.key===`ArrowUp`?a=Ci(t,r,i):e.key===`PageDown`?a=wi(t,r,10,i):e.key===`PageUp`?a=Ti(t,r,10,i):e.key===`Home`?a=t[0]:e.key===`End`&&(a=t[t.length-1]),!a)return;this.root.setHighlightedNode(a);return}_c.includes(e.key)||this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}oninput(e){this.root.opts.inputValue.current=e.currentTarget.value,this.root.setHighlightedToFirstCandidate()}#e=O(()=>({id:this.opts.id.current,role:`combobox`,disabled:this.root.opts.disabled.current?!0:void 0,"aria-activedescendant":this.root.highlightedId,"aria-autocomplete":`list`,"aria-expanded":_n(this.root.opts.open.current),"data-state":xn(this.root.opts.open.current),"data-disabled":yn(this.root.opts.disabled.current),onkeydown:this.onkeydown,oninput:this.oninput,[this.root.getBitsAttr(`input`)]:``,...this.attachment}));get props(){return V(this.#e)}set props(e){K(this.#e,e)}},kc=class e{static create(t){return new e(t,Sc.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=gn(e.ref),this.onkeydown=this.onkeydown.bind(this),this.onpointerdown=this.onpointerdown.bind(this)}onkeydown(e){this.root.domContext&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.root.domContext.getActiveElement()!==this.root.inputNode&&this.root.inputNode?.focus(),this.root.toggleMenu())}onpointerdown(e){this.root.opts.disabled.current||!this.root.domContext||(e.preventDefault(),this.root.domContext.getActiveElement()!==this.root.inputNode&&this.root.inputNode?.focus(),this.root.toggleMenu())}#e=O(()=>({id:this.opts.id.current,disabled:this.root.opts.disabled.current?!0:void 0,"aria-haspopup":`listbox`,"data-state":xn(this.root.opts.open.current),"data-disabled":yn(this.root.opts.disabled.current),[this.root.getBitsAttr(`trigger`)]:``,onpointerdown:this.onpointerdown,onkeydown:this.onkeydown,...this.attachment}));get props(){return V(this.#e)}set props(e){K(this.#e,e)}},Ac=class e{static create(t){return Cc.set(new e(t,Sc.get()))}opts;root;attachment;#e=i(!1);get isPositioned(){return V(this.#e)}set isPositioned(e){K(this.#e,e,!0)}domContext;constructor(e,t){this.opts=e,this.root=t,this.attachment=gn(e.ref,e=>this.root.contentNode=e),this.domContext=new hn(this.opts.ref),this.root.domContext===null&&(this.root.domContext=this.domContext),Qt(()=>{this.root.contentNode=null,this.isPositioned=!1}),Z(()=>this.root.opts.open.current,()=>{this.root.opts.open.current||(this.isPositioned=!1)}),this.onpointermove=this.onpointermove.bind(this)}onpointermove(e){this.root.isUsingKeyboard=!1}#t=O(()=>nc(this.root.isCombobox?`combobox`:`select`));onInteractOutside=e=>{if(e.target===this.root.triggerNode||e.target===this.root.inputNode){e.preventDefault();return}this.opts.onInteractOutside.current(e),!e.defaultPrevented&&this.root.handleClose()};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()};onOpenAutoFocus=e=>{e.preventDefault()};onCloseAutoFocus=e=>{e.preventDefault()};get shouldRender(){return this.root.contentPresence.shouldRender}#n=O(()=>({open:this.root.opts.open.current}));get snippetProps(){return V(this.#n)}set snippetProps(e){K(this.#n,e)}#r=O(()=>({id:this.opts.id.current,role:`listbox`,"aria-multiselectable":this.root.isMulti?`true`:void 0,"data-state":xn(this.root.opts.open.current),[this.root.getBitsAttr(`content`)]:``,style:{display:`flex`,flexDirection:`column`,outline:`none`,boxSizing:`border-box`,pointerEvents:`auto`,...V(this.#t)},onpointermove:this.onpointermove,...this.attachment}));get props(){return V(this.#r)}set props(e){K(this.#r,e)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus,trapFocus:!1,loop:!1,onPlaced:()=>{this.root.opts.open.current&&(this.isPositioned=!0)}}},jc=class e{static create(t){return new e(t,Sc.get())}opts;root;attachment;#e=O(()=>this.root.includesItem(this.opts.value.current));get isSelected(){return V(this.#e)}set isSelected(e){K(this.#e,e)}#t=O(()=>this.root.highlightedValue===this.opts.value.current);get isHighlighted(){return V(this.#t)}set isHighlighted(e){K(this.#t,e)}prevHighlighted=new Kt(()=>this.isHighlighted);#n=i(!1);get mounted(){return V(this.#n)}set mounted(e){K(this.#n,e,!0)}constructor(e,t){this.opts=e,this.root=t,this.attachment=gn(e.ref),Z([()=>this.isHighlighted,()=>this.prevHighlighted.current],()=>{this.isHighlighted?this.opts.onHighlight.current():this.prevHighlighted.current&&this.opts.onUnhighlight.current()}),Z(()=>this.mounted,()=>{this.mounted&&this.root.setInitialHighlightedNode()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onpointermove=this.onpointermove.bind(this)}handleSelect(){if(this.opts.disabled.current)return;let e=this.opts.value.current===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&e&&!this.root.isMulti){this.root.handleClose();return}this.root.toggleItem(this.opts.value.current,this.opts.label.current),!this.root.isMulti&&!e&&this.root.handleClose()}#r=O(()=>({selected:this.isSelected,highlighted:this.isHighlighted}));get snippetProps(){return V(this.#r)}set snippetProps(e){K(this.#r,e)}onpointerdown(e){e.preventDefault()}onpointerup(e){if(!(e.defaultPrevented||!this.opts.ref.current)){if(e.pointerType===`touch`&&!Gn){_e(this.opts.ref.current,`click`,()=>{this.handleSelect(),this.root.setHighlightedNode(this.opts.ref.current)},{once:!0});return}e.preventDefault(),this.handleSelect(),e.pointerType===`touch`&&this.root.setHighlightedNode(this.opts.ref.current)}}onpointermove(e){e.pointerType!==`touch`&&this.root.highlightedNode!==this.opts.ref.current&&this.root.setHighlightedNode(this.opts.ref.current)}#i=O(()=>({id:this.opts.id.current,role:`option`,"aria-selected":this.root.includesItem(this.opts.value.current)?`true`:void 0,"data-value":this.opts.value.current,"data-disabled":yn(this.opts.disabled.current),"data-highlighted":this.root.highlightedValue===this.opts.value.current&&!this.opts.disabled.current?``:void 0,"data-selected":this.root.includesItem(this.opts.value.current)?``:void 0,"data-label":this.opts.label.current,[this.root.getBitsAttr(`item`)]:``,onpointermove:this.onpointermove,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,...this.attachment}));get props(){return V(this.#i)}set props(e){K(this.#i,e)}},Mc=class e{static create(t){return new e(t,Sc.get())}opts;root;#e=O(()=>this.root.opts.name.current!==``);get shouldRender(){return V(this.#e)}set shouldRender(e){K(this.#e,e)}constructor(e,t){this.opts=e,this.root=t,this.onfocus=this.onfocus.bind(this)}onfocus(e){e.preventDefault(),this.root.isCombobox?this.root.inputNode?.focus():this.root.triggerNode?.focus()}#t=O(()=>({disabled:bn(this.root.opts.disabled.current),required:bn(this.root.opts.required.current),name:this.root.opts.name.current,value:this.opts.value.current,onfocus:this.onfocus}));get props(){return V(this.#t)}set props(e){K(this.#t,e)}},Nc=class e{static create(t){return new e(t,Cc.get())}opts;content;root;attachment;#e=i(0);get prevScrollTop(){return V(this.#e)}set prevScrollTop(e){K(this.#e,e,!0)}constructor(e,t){this.opts=e,this.content=t,this.root=t.root,this.attachment=gn(e.ref,e=>{this.root.viewportNode=e})}#t=O(()=>({id:this.opts.id.current,role:`presentation`,[this.root.getBitsAttr(`viewport`)]:``,style:{position:`relative`,flex:1,overflow:`auto`},...this.attachment}));get props(){return V(this.#t)}set props(e){K(this.#t,e)}},Pc=class{opts;content;root;attachment;autoScrollTimer=null;userScrollTimer=-1;isUserScrolling=!1;onAutoScroll=Q;#e=i(!1);get mounted(){return V(this.#e)}set mounted(e){K(this.#e,e,!0)}constructor(e,t){this.opts=e,this.content=t,this.root=t.root,this.attachment=gn(e.ref),Z([()=>this.mounted],()=>{if(!this.mounted){this.isUserScrolling=!1;return}this.isUserScrolling}),F(()=>{this.mounted||this.clearAutoScrollInterval()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this)}handleUserScroll(){this.content.domContext.clearTimeout(this.userScrollTimer),this.isUserScrolling=!0,this.userScrollTimer=this.content.domContext.setTimeout(()=>{this.isUserScrolling=!1},200)}clearAutoScrollInterval(){this.autoScrollTimer!==null&&(this.content.domContext.clearTimeout(this.autoScrollTimer),this.autoScrollTimer=null)}onpointerdown(e){if(this.autoScrollTimer!==null)return;let t=e=>{this.onAutoScroll(),this.autoScrollTimer=this.content.domContext.setTimeout(()=>t(e+1),this.opts.delay.current(e))};this.autoScrollTimer=this.content.domContext.setTimeout(()=>t(1),this.opts.delay.current(0))}onpointermove(e){this.onpointerdown(e)}onpointerleave(e){this.clearAutoScrollInterval()}#t=O(()=>({id:this.opts.id.current,"aria-hidden":vn(!0),style:{flexShrink:0},onpointerdown:this.onpointerdown,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return V(this.#t)}set props(e){K(this.#t,e)}},Fc=class e{static create(t){return new e(new Pc(t,Cc.get()))}scrollButtonState;content;root;#e=i(!1);get canScrollDown(){return V(this.#e)}set canScrollDown(e){K(this.#e,e,!0)}scrollIntoViewTimer=null;constructor(e){this.scrollButtonState=e,this.content=e.content,this.root=e.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,Z([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.root.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),_e(this.root.viewportNode,`scroll`,()=>this.handleScroll())}),Z([()=>this.root.opts.inputValue.current,()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{!this.root.viewportNode||!this.content.isPositioned||this.handleScroll(!0)}),Z(()=>this.scrollButtonState.mounted,()=>{this.scrollButtonState.mounted&&(this.scrollIntoViewTimer&&clearTimeout(this.scrollIntoViewTimer),this.scrollIntoViewTimer=en(5,()=>{this.root.highlightedNode?.scrollIntoView({block:this.root.opts.scrollAlignment.current})}))})}handleScroll=(e=!1)=>{if(e||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;let t=this.root.viewportNode.scrollHeight-this.root.viewportNode.clientHeight,n=Number.parseInt(getComputedStyle(this.root.viewportNode).paddingTop,10);this.canScrollDown=Math.ceil(this.root.viewportNode.scrollTop)<t-n};handleAutoScroll=()=>{let e=this.root.viewportNode,t=this.root.highlightedNode;!e||!t||(e.scrollTop+=t.offsetHeight)};#t=O(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr(`scroll-down-button`)]:``}));get props(){return V(this.#t)}set props(e){K(this.#t,e)}},Ic=class e{static create(t){return new e(new Pc(t,Cc.get()))}scrollButtonState;content;root;#e=i(!1);get canScrollUp(){return V(this.#e)}set canScrollUp(e){K(this.#e,e,!0)}constructor(e){this.scrollButtonState=e,this.content=e.content,this.root=e.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,Z([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.root.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),_e(this.root.viewportNode,`scroll`,()=>this.handleScroll())})}handleScroll=(e=!1)=>{if(e||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;let t=Number.parseInt(getComputedStyle(this.root.viewportNode).paddingTop,10);this.canScrollUp=this.root.viewportNode.scrollTop-t>.1};handleAutoScroll=()=>{!this.root.viewportNode||!this.root.highlightedNode||(this.root.viewportNode.scrollTop=this.root.viewportNode.scrollTop-this.root.highlightedNode.offsetHeight)};#t=O(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr(`scroll-up-button`)]:``}));get props(){return V(this.#t)}set props(e){K(this.#t,e)}};function Lc(e,t){C(t,!0);let r=z(t,`value`,15),i=z(t,`autocomplete`,7),a=Mc.create({value:Y(()=>r())});var o={get value(){return r()},set value(e){r(e),x()},get autocomplete(){return i()},set autocomplete(e){i(e),x()}},s=m(),c=P(s),u=e=>{Ha(e,ne(()=>a.props,{get autocomplete(){return i()},get value(){return r()},set value(e){r(e)}}))};return n(c,e=>{a.shouldRender&&e(u)}),l(e,s),y(o)}R(Lc,{value:{},autocomplete:{}},[],[],{mode:`open`});var Rc=B(`<!> <!>`,1);function zc(e,t){C(t,!0);let r=z(t,`value`,15),i=z(t,`onValueChange`,7,Q),a=z(t,`name`,7,``),o=z(t,`disabled`,7,!1),s=z(t,`type`,7),c=z(t,`open`,15,!1),u=z(t,`onOpenChange`,7,Q),f=z(t,`onOpenChangeComplete`,7,Q),p=z(t,`loop`,7,!1),g=z(t,`scrollAlignment`,7,`nearest`),_=z(t,`required`,7,!1),v=z(t,`items`,23,()=>[]),b=z(t,`allowDeselect`,7,!0),w=z(t,`inputValue`,7,``),T=z(t,`children`,7);r()===void 0&&r(s()===`single`?``:[]),Z.pre(()=>r(),()=>{r()===void 0&&r(s()===`single`?``:[])});let E=Dc.create({type:s(),value:Y(()=>r(),e=>{r(e),i()(e)}),disabled:Y(()=>o()),required:Y(()=>_()),open:Y(()=>c(),e=>{c(e),u()(e)}),loop:Y(()=>p()),scrollAlignment:Y(()=>g()),name:Y(()=>a()),isCombobox:!0,items:Y(()=>v()),allowDeselect:Y(()=>b()),inputValue:Y(()=>w(),e=>w(e)),onOpenChangeComplete:Y(()=>f())});var D={get value(){return r()},set value(e){r(e),x()},get onValueChange(){return i()},set onValueChange(e=Q){i(e),x()},get name(){return a()},set name(e=``){a(e),x()},get disabled(){return o()},set disabled(e=!1){o(e),x()},get type(){return s()},set type(e){s(e),x()},get open(){return c()},set open(e=!1){c(e),x()},get onOpenChange(){return u()},set onOpenChange(e=Q){u(e),x()},get onOpenChangeComplete(){return f()},set onOpenChangeComplete(e=Q){f(e),x()},get loop(){return p()},set loop(e=!1){p(e),x()},get scrollAlignment(){return g()},set scrollAlignment(e=`nearest`){g(e),x()},get required(){return _()},set required(e=!1){_(e),x()},get items(){return v()},set items(e=[]){v(e),x()},get allowDeselect(){return b()},set allowDeselect(e=!0){b(e),x()},get inputValue(){return w()},set inputValue(e=``){w(e),x()},get children(){return T()},set children(e){T(e),x()}},k=Rc(),A=P(k);gc(A,{children:(e,t)=>{var n=m();S(P(n),()=>T()??d),l(e,n)},$$slots:{default:!0}});var j=G(A,2),M=e=>{var t=m(),r=P(t),i=e=>{var t=m();h(P(t),16,()=>E.opts.value.current,e=>e,(e,t)=>{Lc(e,{get value(){return t}})}),l(e,t)};n(r,e=>{E.opts.value.current.length&&e(i)}),l(e,t)},N=O(()=>Array.isArray(E.opts.value.current)),ee=e=>{Lc(e,{get value(){return E.opts.value.current},set value(e){E.opts.value.current=e}})};return n(j,e=>{V(N)?e(M):e(ee,-1)}),l(e,k),y(D)}R(zc,{value:{},onValueChange:{},name:{},disabled:{},type:{},open:{},onOpenChange:{},onOpenChangeComplete:{},loop:{},scrollAlignment:{},required:{},items:{},allowDeselect:{},inputValue:{},children:{}},[],[],{mode:`open`});function Bc(e,t){C(t,!0);let n=z(t,`id`,7),r=z(t,`children`,7),i=z(t,`virtualEl`,7),a=z(t,`ref`,7),o=z(t,`tooltip`,7,!1);dc.create({id:Y(()=>n()),virtualEl:Y(()=>i()),ref:a()},o());var s={get id(){return n()},set id(e){n(e),x()},get children(){return r()},set children(e){r(e),x()},get virtualEl(){return i()},set virtualEl(e){i(e),x()},get ref(){return a()},set ref(e){a(e),x()},get tooltip(){return o()},set tooltip(e=!1){o(e),x()}},c=m();return S(P(c),()=>r()??d),l(e,c),y(s)}R(Bc,{id:{},children:{},virtualEl:{},ref:{},tooltip:{}},[],[],{mode:`open`});function Vc(e,t){C(t,!0);let n=z(t,`content`,7),r=z(t,`side`,7,`bottom`),i=z(t,`sideOffset`,7,0),a=z(t,`align`,7,`center`),o=z(t,`alignOffset`,7,0),s=z(t,`id`,7),c=z(t,`arrowPadding`,7,0),u=z(t,`avoidCollisions`,7,!0),f=z(t,`collisionBoundary`,23,()=>[]),p=z(t,`collisionPadding`,7,0),h=z(t,`hideWhenDetached`,7,!1),g=z(t,`onPlaced`,7,()=>{}),_=z(t,`sticky`,7,`partial`),v=z(t,`updatePositionStrategy`,7,`optimized`),b=z(t,`strategy`,7,`fixed`),w=z(t,`dir`,7,`ltr`),T=z(t,`style`,23,()=>({})),E=z(t,`wrapperId`,23,Ta),D=z(t,`customAnchor`,7,null),k=z(t,`enabled`,7),A=z(t,`tooltip`,7,!1),j=uc.create({side:Y(()=>r()),sideOffset:Y(()=>i()),align:Y(()=>a()),alignOffset:Y(()=>o()),id:Y(()=>s()),arrowPadding:Y(()=>c()),avoidCollisions:Y(()=>u()),collisionBoundary:Y(()=>f()),collisionPadding:Y(()=>p()),hideWhenDetached:Y(()=>h()),onPlaced:Y(()=>g()),sticky:Y(()=>_()),updatePositionStrategy:Y(()=>v()),strategy:Y(()=>b()),dir:Y(()=>w()),style:Y(()=>T()),enabled:Y(()=>k()),wrapperId:Y(()=>E()),customAnchor:Y(()=>D())},A()),M=O(()=>X(j.wrapperProps,{style:{pointerEvents:`auto`}}));var N={get content(){return n()},set content(e){n(e),x()},get side(){return r()},set side(e=`bottom`){r(e),x()},get sideOffset(){return i()},set sideOffset(e=0){i(e),x()},get align(){return a()},set align(e=`center`){a(e),x()},get alignOffset(){return o()},set alignOffset(e=0){o(e),x()},get id(){return s()},set id(e){s(e),x()},get arrowPadding(){return c()},set arrowPadding(e=0){c(e),x()},get avoidCollisions(){return u()},set avoidCollisions(e=!0){u(e),x()},get collisionBoundary(){return f()},set collisionBoundary(e=[]){f(e),x()},get collisionPadding(){return p()},set collisionPadding(e=0){p(e),x()},get hideWhenDetached(){return h()},set hideWhenDetached(e=!1){h(e),x()},get onPlaced(){return g()},set onPlaced(e=()=>{}){g(e),x()},get sticky(){return _()},set sticky(e=`partial`){_(e),x()},get updatePositionStrategy(){return v()},set updatePositionStrategy(e=`optimized`){v(e),x()},get strategy(){return b()},set strategy(e=`fixed`){b(e),x()},get dir(){return w()},set dir(e=`ltr`){w(e),x()},get style(){return T()},set style(e={}){T(e),x()},get wrapperId(){return E()},set wrapperId(e=Ta()){E(e),x()},get customAnchor(){return D()},set customAnchor(e=null){D(e),x()},get enabled(){return k()},set enabled(e){k(e),x()},get tooltip(){return A()},set tooltip(e=!1){A(e),x()}},ee=m();return S(P(ee),()=>n()??d,()=>({props:j.props,wrapperProps:V(M)})),l(e,ee),y(N)}R(Vc,{content:{},side:{},sideOffset:{},align:{},alignOffset:{},id:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},hideWhenDetached:{},onPlaced:{},sticky:{},updatePositionStrategy:{},strategy:{},dir:{},style:{},wrapperId:{},customAnchor:{},enabled:{},tooltip:{}},[],[],{mode:`open`});function Hc(e,t){C(t,!0);let n=z(t,`content`,7),r=z(t,`onPlaced`,7);ge(()=>{r()?.()});var i={get content(){return n()},set content(e){n(e),x()},get onPlaced(){return r()},set onPlaced(e){r(e),x()}},a=m();return S(P(a),()=>n()??d,()=>({props:{},wrapperProps:{}})),l(e,a),y(i)}R(Hc,{content:{},onPlaced:{}},[],[],{mode:`open`});var Uc=B(`<input/>`);function Wc(e,t){C(t,!0);let r=z(t,`id`,23,Ta),i=z(t,`ref`,15,null),a=z(t,`child`,7),o=z(t,`defaultValue`,7),s=z(t,`clearOnDeselect`,7,!1),c=H(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`ref`,`child`,`defaultValue`,`clearOnDeselect`]),u=Oc.create({id:Y(()=>r()),ref:Y(()=>i(),e=>i(e)),clearOnDeselect:Y(()=>s())});o()&&(u.root.opts.inputValue.current=o());let d=O(()=>X(c,u.props,{value:u.root.opts.inputValue.current}));var f={get id(){return r()},set id(e=Ta()){r(e),x()},get ref(){return i()},set ref(e=null){i(e),x()},get child(){return a()},set child(e){a(e),x()},get defaultValue(){return o()},set defaultValue(e){o(e),x()},get clearOnDeselect(){return s()},set clearOnDeselect(e=!1){s(e),x()}},p=m();return v(P(p),()=>Bc,(e,t)=>{t(e,{get id(){return r()},get ref(){return u.opts.ref},children:(e,t)=>{var r=m(),i=P(r),o=e=>{var t=m();S(P(t),a,()=>({props:V(d)})),l(e,t)},s=e=>{var t=Uc();I(t,()=>({...V(d)}),void 0,void 0,void 0,void 0,!0),l(e,t)};n(i,e=>{a()?e(o):e(s,-1)}),l(e,r)},$$slots:{default:!0}})}),l(e,p),y(f)}R(Wc,{id:{},ref:{},child:{},defaultValue:{},clearOnDeselect:{}},[],[],{mode:`open`});var Gc=B(`<button><!></button>`);function Kc(e,t){C(t,!0);let r=z(t,`id`,23,Ta),i=z(t,`ref`,15,null),a=z(t,`child`,7),o=z(t,`children`,7),s=z(t,`type`,7,`button`),c=H(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`ref`,`child`,`children`,`type`]),u=kc.create({id:Y(()=>r()),ref:Y(()=>i(),e=>i(e))}),f=O(()=>X(c,u.props,{type:s()}));var p={get id(){return r()},set id(e=Ta()){r(e),x()},get ref(){return i()},set ref(e=null){i(e),x()},get child(){return a()},set child(e){a(e),x()},get children(){return o()},set children(e){o(e),x()},get type(){return s()},set type(e=`button`){s(e),x()}},h=m(),g=P(h),_=e=>{var t=m();S(P(t),a,()=>({props:V(f)})),l(e,t)},v=e=>{var t=Gc();I(t,()=>({...V(f)})),S(L(t),()=>o()??d),A(t),l(e,t)};return n(g,e=>{a()?e(_):e(v,-1)}),l(e,h),y(p)}R(Kc,{id:{},ref:{},child:{},children:{},type:{}},[],[],{mode:`open`});function qc(e,t){C(t,!0);let r=z(t,`content`,7),i=z(t,`isStatic`,7,!1),a=z(t,`onPlaced`,7),o=H(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`content`,`isStatic`,`onPlaced`]);var s={get content(){return r()},set content(e){r(e),x()},get isStatic(){return i()},set isStatic(e=!1){i(e),x()},get onPlaced(){return a()},set onPlaced(e){a(e),x()}},c=m(),u=P(c),d=e=>{Hc(e,{get content(){return r()},get onPlaced(){return a()}})},f=e=>{Vc(e,ne({get content(){return r()},get onPlaced(){return a()}},()=>o))};return n(u,e=>{i()?e(d):e(f,-1)}),l(e,c),y(s)}R(qc,{content:{},isStatic:{},onPlaced:{}},[],[],{mode:`open`});var Jc=B(`<!> <!>`,1);function Yc(e,t){C(t,!0);let r=z(t,`popper`,7),i=z(t,`onEscapeKeydown`,7),a=z(t,`escapeKeydownBehavior`,7),o=z(t,`preventOverflowTextSelection`,7),s=z(t,`id`,7),c=z(t,`onPointerDown`,7),u=z(t,`onPointerUp`,7),f=z(t,`side`,7),p=z(t,`sideOffset`,7),h=z(t,`align`,7),g=z(t,`alignOffset`,7),_=z(t,`arrowPadding`,7),v=z(t,`avoidCollisions`,7),b=z(t,`collisionBoundary`,7),w=z(t,`collisionPadding`,7),T=z(t,`sticky`,7),E=z(t,`hideWhenDetached`,7),D=z(t,`updatePositionStrategy`,7),k=z(t,`strategy`,7),A=z(t,`dir`,7),j=z(t,`preventScroll`,7),M=z(t,`wrapperId`,7),N=z(t,`style`,7),ee=z(t,`onPlaced`,7),te=z(t,`onInteractOutside`,7),ne=z(t,`onCloseAutoFocus`,7),re=z(t,`onOpenAutoFocus`,7),F=z(t,`onFocusOutside`,7),ie=z(t,`interactOutsideBehavior`,7,`close`),ae=z(t,`loop`,7),oe=z(t,`trapFocus`,7,!0),I=z(t,`isValidEvent`,7,()=>!1),L=z(t,`customAnchor`,7,null),se=z(t,`isStatic`,7,!1),R=z(t,`enabled`,7),ce=z(t,`ref`,7),le=z(t,`tooltip`,7,!1),ue=z(t,`contentPointerEvents`,7,`auto`),de=H(t,`$$slots.$$events.$$legacy.$$host.popper.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.enabled.ref.tooltip.contentPointerEvents`.split(`.`));return qc(e,{get isStatic(){return se()},get id(){return s()},get side(){return f()},get sideOffset(){return p()},get align(){return h()},get alignOffset(){return g()},get arrowPadding(){return _()},get avoidCollisions(){return v()},get collisionBoundary(){return b()},get collisionPadding(){return w()},get sticky(){return T()},get hideWhenDetached(){return E()},get updatePositionStrategy(){return D()},get strategy(){return k()},get dir(){return A()},get wrapperId(){return M()},get style(){return N()},get onPlaced(){return ee()},get customAnchor(){return L()},get enabled(){return R()},get tooltip(){return le()},content:(e,f)=>{let p=()=>f?.().props,h=()=>f?.().wrapperProps;var g=Jc(),_=P(g),v=e=>{La(e,{get preventScroll(){return j()}})},y=e=>{La(e,{get preventScroll(){return j()}})};n(_,e=>{t.forceMount&&R()?e(v):t.forceMount||e(y,1)}),va(G(_,2),{get onOpenAutoFocus(){return re()},get onCloseAutoFocus(){return ne()},get loop(){return ae()},get enabled(){return R()},get trapFocus(){return oe()},get forceMount(){return t.forceMount},get ref(){return ce()},focusScope:(e,t)=>{let n=()=>t?.().props;ha(e,{get onEscapeKeydown(){return i()},get escapeKeydownBehavior(){return a()},get enabled(){return R()},get ref(){return ce()},children:(e,t)=>{fa(e,{get id(){return s()},get onInteractOutside(){return te()},get onFocusOutside(){return F()},get interactOutsideBehavior(){return ie()},get isValidEvent(){return I()},get enabled(){return R()},get ref(){return ce()},children:(e,t)=>{let i=()=>t?.().props;wa(e,{get id(){return s()},get preventOverflowTextSelection(){return o()},get onPointerDown(){return c()},get onPointerUp(){return u()},get enabled(){return R()},get ref(){return ce()},children:(e,t)=>{var a=m(),o=P(a);{let e=O(()=>({props:X(de,p(),i(),n(),{style:{pointerEvents:ue()}}),wrapperProps:h()}));S(o,()=>r()??d,()=>V(e))}l(e,a)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),l(e,g)},$$slots:{content:!0}}),y({get popper(){return r()},set popper(e){r(e),x()},get onEscapeKeydown(){return i()},set onEscapeKeydown(e){i(e),x()},get escapeKeydownBehavior(){return a()},set escapeKeydownBehavior(e){a(e),x()},get preventOverflowTextSelection(){return o()},set preventOverflowTextSelection(e){o(e),x()},get id(){return s()},set id(e){s(e),x()},get onPointerDown(){return c()},set onPointerDown(e){c(e),x()},get onPointerUp(){return u()},set onPointerUp(e){u(e),x()},get side(){return f()},set side(e){f(e),x()},get sideOffset(){return p()},set sideOffset(e){p(e),x()},get align(){return h()},set align(e){h(e),x()},get alignOffset(){return g()},set alignOffset(e){g(e),x()},get arrowPadding(){return _()},set arrowPadding(e){_(e),x()},get avoidCollisions(){return v()},set avoidCollisions(e){v(e),x()},get collisionBoundary(){return b()},set collisionBoundary(e){b(e),x()},get collisionPadding(){return w()},set collisionPadding(e){w(e),x()},get sticky(){return T()},set sticky(e){T(e),x()},get hideWhenDetached(){return E()},set hideWhenDetached(e){E(e),x()},get updatePositionStrategy(){return D()},set updatePositionStrategy(e){D(e),x()},get strategy(){return k()},set strategy(e){k(e),x()},get dir(){return A()},set dir(e){A(e),x()},get preventScroll(){return j()},set preventScroll(e){j(e),x()},get wrapperId(){return M()},set wrapperId(e){M(e),x()},get style(){return N()},set style(e){N(e),x()},get onPlaced(){return ee()},set onPlaced(e){ee(e),x()},get onInteractOutside(){return te()},set onInteractOutside(e){te(e),x()},get onCloseAutoFocus(){return ne()},set onCloseAutoFocus(e){ne(e),x()},get onOpenAutoFocus(){return re()},set onOpenAutoFocus(e){re(e),x()},get onFocusOutside(){return F()},set onFocusOutside(e){F(e),x()},get interactOutsideBehavior(){return ie()},set interactOutsideBehavior(e=`close`){ie(e),x()},get loop(){return ae()},set loop(e){ae(e),x()},get trapFocus(){return oe()},set trapFocus(e=!0){oe(e),x()},get isValidEvent(){return I()},set isValidEvent(e=()=>!1){I(e),x()},get customAnchor(){return L()},set customAnchor(e=null){L(e),x()},get isStatic(){return se()},set isStatic(e=!1){se(e),x()},get enabled(){return R()},set enabled(e){R(e),x()},get ref(){return ce()},set ref(e){ce(e),x()},get tooltip(){return le()},set tooltip(e=!1){le(e),x()},get contentPointerEvents(){return ue()},set contentPointerEvents(e=`auto`){ue(e),x()}})}R(Yc,{popper:{},onEscapeKeydown:{},escapeKeydownBehavior:{},preventOverflowTextSelection:{},id:{},onPointerDown:{},onPointerUp:{},side:{},sideOffset:{},align:{},alignOffset:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{},updatePositionStrategy:{},strategy:{},dir:{},preventScroll:{},wrapperId:{},style:{},onPlaced:{},onInteractOutside:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onFocusOutside:{},interactOutsideBehavior:{},loop:{},trapFocus:{},isValidEvent:{},customAnchor:{},isStatic:{},enabled:{},ref:{},tooltip:{},contentPointerEvents:{}},[],[],{mode:`open`});function Xc(e,t){C(t,!0);let r=z(t,`popper`,7),i=z(t,`open`,7),a=z(t,`onEscapeKeydown`,7),o=z(t,`escapeKeydownBehavior`,7),s=z(t,`preventOverflowTextSelection`,7),c=z(t,`id`,7),u=z(t,`onPointerDown`,7),d=z(t,`onPointerUp`,7),f=z(t,`side`,7),p=z(t,`sideOffset`,7),h=z(t,`align`,7),g=z(t,`alignOffset`,7),_=z(t,`arrowPadding`,7),v=z(t,`avoidCollisions`,7),b=z(t,`collisionBoundary`,7),S=z(t,`collisionPadding`,7),w=z(t,`sticky`,7),T=z(t,`hideWhenDetached`,7),E=z(t,`updatePositionStrategy`,7),D=z(t,`strategy`,7),O=z(t,`dir`,7),k=z(t,`preventScroll`,7),A=z(t,`wrapperId`,7),j=z(t,`style`,7),M=z(t,`onPlaced`,7),N=z(t,`onInteractOutside`,7),ee=z(t,`onCloseAutoFocus`,7),te=z(t,`onOpenAutoFocus`,7),re=z(t,`onFocusOutside`,7),F=z(t,`interactOutsideBehavior`,7,`close`),ie=z(t,`loop`,7),ae=z(t,`trapFocus`,7,!0),oe=z(t,`isValidEvent`,7,()=>!1),I=z(t,`customAnchor`,7,null),L=z(t,`isStatic`,7,!1),se=z(t,`ref`,7),R=z(t,`shouldRender`,7),ce=H(t,`$$slots.$$events.$$legacy.$$host.popper.open.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.ref.shouldRender`.split(`.`));var le={get popper(){return r()},set popper(e){r(e),x()},get open(){return i()},set open(e){i(e),x()},get onEscapeKeydown(){return a()},set onEscapeKeydown(e){a(e),x()},get escapeKeydownBehavior(){return o()},set escapeKeydownBehavior(e){o(e),x()},get preventOverflowTextSelection(){return s()},set preventOverflowTextSelection(e){s(e),x()},get id(){return c()},set id(e){c(e),x()},get onPointerDown(){return u()},set onPointerDown(e){u(e),x()},get onPointerUp(){return d()},set onPointerUp(e){d(e),x()},get side(){return f()},set side(e){f(e),x()},get sideOffset(){return p()},set sideOffset(e){p(e),x()},get align(){return h()},set align(e){h(e),x()},get alignOffset(){return g()},set alignOffset(e){g(e),x()},get arrowPadding(){return _()},set arrowPadding(e){_(e),x()},get avoidCollisions(){return v()},set avoidCollisions(e){v(e),x()},get collisionBoundary(){return b()},set collisionBoundary(e){b(e),x()},get collisionPadding(){return S()},set collisionPadding(e){S(e),x()},get sticky(){return w()},set sticky(e){w(e),x()},get hideWhenDetached(){return T()},set hideWhenDetached(e){T(e),x()},get updatePositionStrategy(){return E()},set updatePositionStrategy(e){E(e),x()},get strategy(){return D()},set strategy(e){D(e),x()},get dir(){return O()},set dir(e){O(e),x()},get preventScroll(){return k()},set preventScroll(e){k(e),x()},get wrapperId(){return A()},set wrapperId(e){A(e),x()},get style(){return j()},set style(e){j(e),x()},get onPlaced(){return M()},set onPlaced(e){M(e),x()},get onInteractOutside(){return N()},set onInteractOutside(e){N(e),x()},get onCloseAutoFocus(){return ee()},set onCloseAutoFocus(e){ee(e),x()},get onOpenAutoFocus(){return te()},set onOpenAutoFocus(e){te(e),x()},get onFocusOutside(){return re()},set onFocusOutside(e){re(e),x()},get interactOutsideBehavior(){return F()},set interactOutsideBehavior(e=`close`){F(e),x()},get loop(){return ie()},set loop(e){ie(e),x()},get trapFocus(){return ae()},set trapFocus(e=!0){ae(e),x()},get isValidEvent(){return oe()},set isValidEvent(e=()=>!1){oe(e),x()},get customAnchor(){return I()},set customAnchor(e=null){I(e),x()},get isStatic(){return L()},set isStatic(e=!1){L(e),x()},get ref(){return se()},set ref(e){se(e),x()},get shouldRender(){return R()},set shouldRender(e){R(e),x()}},ue=m(),de=P(ue),fe=e=>{Yc(e,ne({get popper(){return r()},get onEscapeKeydown(){return a()},get escapeKeydownBehavior(){return o()},get preventOverflowTextSelection(){return s()},get id(){return c()},get onPointerDown(){return u()},get onPointerUp(){return d()},get side(){return f()},get sideOffset(){return p()},get align(){return h()},get alignOffset(){return g()},get arrowPadding(){return _()},get avoidCollisions(){return v()},get collisionBoundary(){return b()},get collisionPadding(){return S()},get sticky(){return w()},get hideWhenDetached(){return T()},get updatePositionStrategy(){return E()},get strategy(){return D()},get dir(){return O()},get preventScroll(){return k()},get wrapperId(){return A()},get style(){return j()},get onPlaced(){return M()},get customAnchor(){return I()},get isStatic(){return L()},get enabled(){return i()},get onInteractOutside(){return N()},get onCloseAutoFocus(){return ee()},get onOpenAutoFocus(){return te()},get interactOutsideBehavior(){return F()},get loop(){return ie()},get trapFocus(){return ae()},get isValidEvent(){return oe()},get onFocusOutside(){return re()},forceMount:!1,get ref(){return se()}},()=>ce))};return n(de,e=>{R()&&e(fe)}),l(e,ue),y(le)}R(Xc,{popper:{},open:{},onEscapeKeydown:{},escapeKeydownBehavior:{},preventOverflowTextSelection:{},id:{},onPointerDown:{},onPointerUp:{},side:{},sideOffset:{},align:{},alignOffset:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{},updatePositionStrategy:{},strategy:{},dir:{},preventScroll:{},wrapperId:{},style:{},onPlaced:{},onInteractOutside:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onFocusOutside:{},interactOutsideBehavior:{},loop:{},trapFocus:{},isValidEvent:{},customAnchor:{},isStatic:{},ref:{},shouldRender:{}},[],[],{mode:`open`});function Zc(e,t){C(t,!0);let n=z(t,`popper`,7),r=z(t,`onEscapeKeydown`,7),i=z(t,`escapeKeydownBehavior`,7),a=z(t,`preventOverflowTextSelection`,7),o=z(t,`id`,7),s=z(t,`onPointerDown`,7),c=z(t,`onPointerUp`,7),l=z(t,`side`,7),u=z(t,`sideOffset`,7),d=z(t,`align`,7),f=z(t,`alignOffset`,7),p=z(t,`arrowPadding`,7),m=z(t,`avoidCollisions`,7),h=z(t,`collisionBoundary`,7),g=z(t,`collisionPadding`,7),_=z(t,`sticky`,7),v=z(t,`hideWhenDetached`,7),b=z(t,`updatePositionStrategy`,7),S=z(t,`strategy`,7),w=z(t,`dir`,7),T=z(t,`preventScroll`,7),E=z(t,`wrapperId`,7),D=z(t,`style`,7),O=z(t,`onPlaced`,7),k=z(t,`onInteractOutside`,7),A=z(t,`onCloseAutoFocus`,7),j=z(t,`onOpenAutoFocus`,7),M=z(t,`onFocusOutside`,7),N=z(t,`interactOutsideBehavior`,7,`close`),ee=z(t,`loop`,7),P=z(t,`trapFocus`,7,!0),te=z(t,`isValidEvent`,7,()=>!1),re=z(t,`customAnchor`,7,null),F=z(t,`isStatic`,7,!1),ie=z(t,`enabled`,7),ae=H(t,`$$slots.$$events.$$legacy.$$host.popper.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.enabled`.split(`.`));return Yc(e,ne({get popper(){return n()},get onEscapeKeydown(){return r()},get escapeKeydownBehavior(){return i()},get preventOverflowTextSelection(){return a()},get id(){return o()},get onPointerDown(){return s()},get onPointerUp(){return c()},get side(){return l()},get sideOffset(){return u()},get align(){return d()},get alignOffset(){return f()},get arrowPadding(){return p()},get avoidCollisions(){return m()},get collisionBoundary(){return h()},get collisionPadding(){return g()},get sticky(){return _()},get hideWhenDetached(){return v()},get updatePositionStrategy(){return b()},get strategy(){return S()},get dir(){return w()},get preventScroll(){return T()},get wrapperId(){return E()},get style(){return D()},get onPlaced(){return O()},get customAnchor(){return re()},get isStatic(){return F()},get enabled(){return ie()},get onInteractOutside(){return k()},get onCloseAutoFocus(){return A()},get onOpenAutoFocus(){return j()},get interactOutsideBehavior(){return N()},get loop(){return ee()},get trapFocus(){return P()},get isValidEvent(){return te()},get onFocusOutside(){return M()}},()=>ae,{forceMount:!0})),y({get popper(){return n()},set popper(e){n(e),x()},get onEscapeKeydown(){return r()},set onEscapeKeydown(e){r(e),x()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(e){i(e),x()},get preventOverflowTextSelection(){return a()},set preventOverflowTextSelection(e){a(e),x()},get id(){return o()},set id(e){o(e),x()},get onPointerDown(){return s()},set onPointerDown(e){s(e),x()},get onPointerUp(){return c()},set onPointerUp(e){c(e),x()},get side(){return l()},set side(e){l(e),x()},get sideOffset(){return u()},set sideOffset(e){u(e),x()},get align(){return d()},set align(e){d(e),x()},get alignOffset(){return f()},set alignOffset(e){f(e),x()},get arrowPadding(){return p()},set arrowPadding(e){p(e),x()},get avoidCollisions(){return m()},set avoidCollisions(e){m(e),x()},get collisionBoundary(){return h()},set collisionBoundary(e){h(e),x()},get collisionPadding(){return g()},set collisionPadding(e){g(e),x()},get sticky(){return _()},set sticky(e){_(e),x()},get hideWhenDetached(){return v()},set hideWhenDetached(e){v(e),x()},get updatePositionStrategy(){return b()},set updatePositionStrategy(e){b(e),x()},get strategy(){return S()},set strategy(e){S(e),x()},get dir(){return w()},set dir(e){w(e),x()},get preventScroll(){return T()},set preventScroll(e){T(e),x()},get wrapperId(){return E()},set wrapperId(e){E(e),x()},get style(){return D()},set style(e){D(e),x()},get onPlaced(){return O()},set onPlaced(e){O(e),x()},get onInteractOutside(){return k()},set onInteractOutside(e){k(e),x()},get onCloseAutoFocus(){return A()},set onCloseAutoFocus(e){A(e),x()},get onOpenAutoFocus(){return j()},set onOpenAutoFocus(e){j(e),x()},get onFocusOutside(){return M()},set onFocusOutside(e){M(e),x()},get interactOutsideBehavior(){return N()},set interactOutsideBehavior(e=`close`){N(e),x()},get loop(){return ee()},set loop(e){ee(e),x()},get trapFocus(){return P()},set trapFocus(e=!0){P(e),x()},get isValidEvent(){return te()},set isValidEvent(e=()=>!1){te(e),x()},get customAnchor(){return re()},set customAnchor(e=null){re(e),x()},get isStatic(){return F()},set isStatic(e=!1){F(e),x()},get enabled(){return ie()},set enabled(e){ie(e),x()}})}R(Zc,{popper:{},onEscapeKeydown:{},escapeKeydownBehavior:{},preventOverflowTextSelection:{},id:{},onPointerDown:{},onPointerUp:{},side:{},sideOffset:{},align:{},alignOffset:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{},updatePositionStrategy:{},strategy:{},dir:{},preventScroll:{},wrapperId:{},style:{},onPlaced:{},onInteractOutside:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onFocusOutside:{},interactOutsideBehavior:{},loop:{},trapFocus:{},isValidEvent:{},customAnchor:{},isStatic:{},enabled:{}},[],[],{mode:`open`});var Qc=B(`<div><div><!></div></div>`),$c=B(`<div><div><!></div></div>`);function el(e,t){let r=N();C(t,!0);let i=z(t,`id`,23,()=>$(r)),a=z(t,`ref`,15,null),o=z(t,`forceMount`,7,!1),s=z(t,`side`,7,`bottom`),c=z(t,`onInteractOutside`,7,Q),u=z(t,`onEscapeKeydown`,7,Q),f=z(t,`children`,7),p=z(t,`child`,7),h=z(t,`preventScroll`,7,!1),g=z(t,`style`,7),_=H(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`ref`,`forceMount`,`side`,`onInteractOutside`,`onEscapeKeydown`,`children`,`child`,`preventScroll`,`style`]),v=Ac.create({id:Y(()=>i()),ref:Y(()=>a(),e=>a(e)),onInteractOutside:Y(()=>c()),onEscapeKeydown:Y(()=>u())}),b=O(()=>X(_,v.props));var w={get id(){return i()},set id(e=$(r)){i(e),x()},get ref(){return a()},set ref(e=null){a(e),x()},get forceMount(){return o()},set forceMount(e=!1){o(e),x()},get side(){return s()},set side(e=`bottom`){s(e),x()},get onInteractOutside(){return c()},set onInteractOutside(e=Q){c(e),x()},get onEscapeKeydown(){return u()},set onEscapeKeydown(e=Q){u(e),x()},get children(){return f()},set children(e){f(e),x()},get child(){return p()},set child(e){p(e),x()},get preventScroll(){return h()},set preventScroll(e=!1){h(e),x()},get style(){return g()},set style(e){g(e),x()}},T=m(),E=P(T),D=e=>{Zc(e,ne(()=>V(b),()=>v.popperProps,{get ref(){return v.opts.ref},get side(){return s()},get enabled(){return v.root.opts.open.current},get id(){return i()},get preventScroll(){return h()},forceMount:!0,get shouldRender(){return v.shouldRender},popper:(e,t)=>{let r=()=>t?.().props,i=()=>t?.().wrapperProps,a=O(()=>X(r(),{style:v.props.style},{style:g()}));var o=m(),s=P(o),c=e=>{var t=m(),n=P(t);{let e=O(()=>({props:V(a),wrapperProps:i(),...v.snippetProps}));S(n,p,()=>V(e))}l(e,t)},u=e=>{var t=Qc();I(t,()=>({...i()}));var n=L(t);I(n,()=>({...V(a)})),S(L(n),()=>f()??d),A(n),A(t),l(e,t)};n(s,e=>{p()?e(c):e(u,-1)}),l(e,o)},$$slots:{popper:!0}}))},k=e=>{Xc(e,ne(()=>V(b),()=>v.popperProps,{get ref(){return v.opts.ref},get side(){return s()},get open(){return v.root.opts.open.current},get id(){return i()},get preventScroll(){return h()},forceMount:!1,get shouldRender(){return v.shouldRender},popper:(e,t)=>{let r=()=>t?.().props,i=()=>t?.().wrapperProps,a=O(()=>X(r(),{style:v.props.style},{style:g()}));var o=m(),s=P(o),c=e=>{var t=m(),n=P(t);{let e=O(()=>({props:V(a),wrapperProps:i(),...v.snippetProps}));S(n,p,()=>V(e))}l(e,t)},u=e=>{var t=$c();I(t,()=>({...i()}));var n=L(t);I(n,()=>({...V(a)})),S(L(n),()=>f()??d),A(n),A(t),l(e,t)};n(s,e=>{p()?e(c):e(u,-1)}),l(e,o)},$$slots:{popper:!0}}))};return n(E,e=>{o()?e(D):o()||e(k,1)}),l(e,T),y(w)}R(el,{id:{},ref:{},forceMount:{},side:{},onInteractOutside:{},onEscapeKeydown:{},children:{},child:{},preventScroll:{},style:{}},[],[],{mode:`open`});function tl(e,t){C(t,!0);let n=z(t,`mounted`,15,!1),r=z(t,`onMountedChange`,7,Q);return $t(()=>(n(!0),r()(!0),()=>{n(!1),r()(!1)})),y({get mounted(){return n()},set mounted(e=!1){n(e),x()},get onMountedChange(){return r()},set onMountedChange(e=Q){r(e),x()}})}R(tl,{mounted:{},onMountedChange:{}},[],[],{mode:`open`});var nl=B(`<div><!></div>`),rl=B(`<!> <!>`,1);function il(e,t){let r=N();C(t,!0);let i=z(t,`id`,23,()=>$(r)),a=z(t,`ref`,15,null),o=z(t,`value`,7),s=z(t,`label`,23,o),c=z(t,`disabled`,7,!1),u=z(t,`children`,7),f=z(t,`child`,7),p=z(t,`onHighlight`,7,Q),h=z(t,`onUnhighlight`,7,Q),g=H(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`ref`,`value`,`label`,`disabled`,`children`,`child`,`onHighlight`,`onUnhighlight`]),_=jc.create({id:Y(()=>i()),ref:Y(()=>a(),e=>a(e)),value:Y(()=>o()),disabled:Y(()=>c()),label:Y(()=>s()),onHighlight:Y(()=>p()),onUnhighlight:Y(()=>h())}),v=O(()=>X(g,_.props));var b={get id(){return i()},set id(e=$(r)){i(e),x()},get ref(){return a()},set ref(e=null){a(e),x()},get value(){return o()},set value(e){o(e),x()},get label(){return s()},set label(e=o){s(e),x()},get disabled(){return c()},set disabled(e=!1){c(e),x()},get children(){return u()},set children(e){u(e),x()},get child(){return f()},set child(e){f(e),x()},get onHighlight(){return p()},set onHighlight(e=Q){p(e),x()},get onUnhighlight(){return h()},set onUnhighlight(e=Q){h(e),x()}},w=rl(),T=P(w),E=e=>{var t=m(),n=P(t);{let e=O(()=>({props:V(v),..._.snippetProps}));S(n,f,()=>V(e))}l(e,t)},D=e=>{var t=nl();I(t,()=>({...V(v)})),S(L(t),()=>u()??d,()=>_.snippetProps),A(t),l(e,t)};return n(T,e=>{f()?e(E):e(D,-1)}),tl(G(T,2),{get mounted(){return _.mounted},set mounted(e){_.mounted=e}}),l(e,w),y(b)}R(il,{id:{},ref:{},value:{},label:{},disabled:{},children:{},child:{},onHighlight:{},onUnhighlight:{}},[],[],{mode:`open`});var al=B(`<div><!></div>`),ol={hash:`svelte-5vjl6o`,code:`
6
6
  /* Hide scrollbars cross browser and enable momentum scroll for touch devices */[data-select-viewport] {scrollbar-width:none !important;-ms-overflow-style:none !important;-webkit-overflow-scrolling:touch !important;}[data-combobox-viewport] {scrollbar-width:none !important;-ms-overflow-style:none !important;-webkit-overflow-scrolling:touch !important;}[data-combobox-viewport]::-webkit-scrollbar {display:none !important;}[data-select-viewport]::-webkit-scrollbar {display:none !important;}`};function sl(e,t){let r=N();C(t,!0),ue(e,ol);let i=z(t,`id`,23,()=>$(r)),a=z(t,`ref`,15,null),o=z(t,`children`,7),s=z(t,`child`,7),c=H(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`ref`,`children`,`child`]),u=Nc.create({id:Y(()=>i()),ref:Y(()=>a(),e=>a(e))}),f=O(()=>X(c,u.props));var p={get id(){return i()},set id(e=$(r)){i(e),x()},get ref(){return a()},set ref(e=null){a(e),x()},get children(){return o()},set children(e){o(e),x()},get child(){return s()},set child(e){s(e),x()}},h=m(),g=P(h),_=e=>{var t=m();S(P(t),s,()=>({props:V(f)})),l(e,t)},v=e=>{var t=al();I(t,()=>({...V(f)})),S(L(t),()=>o()??d),A(t),l(e,t)};return n(g,e=>{s()?e(_):e(v,-1)}),l(e,h),y(p)}R(sl,{id:{},ref:{},children:{},child:{}},[],[],{mode:`open`});var cl=B(`<div><!></div>`),ll=B(`<!> <!>`,1);function ul(e,t){let r=N();C(t,!0);let i=z(t,`id`,23,()=>$(r)),a=z(t,`ref`,15,null),o=z(t,`delay`,7,()=>50),s=z(t,`child`,7),c=z(t,`children`,7),u=H(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`ref`,`delay`,`child`,`children`]),f=Fc.create({id:Y(()=>i()),ref:Y(()=>a(),e=>a(e)),delay:Y(()=>o())}),p=O(()=>X(u,f.props));var h={get id(){return i()},set id(e=$(r)){i(e),x()},get ref(){return a()},set ref(e=null){a(e),x()},get delay(){return o()},set delay(e=()=>50){o(e),x()},get child(){return s()},set child(e){s(e),x()},get children(){return c()},set children(e){c(e),x()}},g=m(),_=P(g),v=e=>{var t=ll(),r=P(t);tl(r,{get mounted(){return f.scrollButtonState.mounted},set mounted(e){f.scrollButtonState.mounted=e}});var i=G(r,2),a=e=>{var t=m();S(P(t),s,()=>({props:u})),l(e,t)},o=e=>{var t=cl();I(t,()=>({...V(p)})),S(L(t),()=>c()??d),A(t),l(e,t)};n(i,e=>{s()?e(a):e(o,-1)}),l(e,t)};return n(_,e=>{f.canScrollDown&&e(v)}),l(e,g),y(h)}R(ul,{id:{},ref:{},delay:{},child:{},children:{}},[],[],{mode:`open`});var dl=B(`<div><!></div>`),fl=B(`<!> <!>`,1);function pl(e,t){let r=N();C(t,!0);let i=z(t,`id`,23,()=>$(r)),a=z(t,`ref`,15,null),o=z(t,`delay`,7,()=>50),s=z(t,`child`,7),c=z(t,`children`,7),u=H(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`ref`,`delay`,`child`,`children`]),f=Ic.create({id:Y(()=>i()),ref:Y(()=>a(),e=>a(e)),delay:Y(()=>o())}),p=O(()=>X(u,f.props));var h={get id(){return i()},set id(e=$(r)){i(e),x()},get ref(){return a()},set ref(e=null){a(e),x()},get delay(){return o()},set delay(e=()=>50){o(e),x()},get child(){return s()},set child(e){s(e),x()},get children(){return c()},set children(e){c(e),x()}},g=m(),_=P(g),v=e=>{var t=fl(),r=P(t);tl(r,{get mounted(){return f.scrollButtonState.mounted},set mounted(e){f.scrollButtonState.mounted=e}});var i=G(r,2),a=e=>{var t=m();S(P(t),s,()=>({props:u})),l(e,t)},o=e=>{var t=dl();I(t,()=>({...V(p)})),S(L(t),()=>c()??d),A(t),l(e,t)};n(i,e=>{s()?e(a):e(o,-1)}),l(e,t)};return n(_,e=>{f.canScrollUp&&e(v)}),l(e,g),y(h)}R(pl,{id:{},ref:{},delay:{},child:{},children:{}},[],[],{mode:`open`});var ml=B(`<div><!></div>`);function hl(e,t){let r=N();C(t,!0);let i=z(t,`child`,7),a=z(t,`children`,7),o=z(t,`ref`,15,null),s=z(t,`id`,23,()=>$(r)),c=z(t,`disabled`,7,!1),u=z(t,`onSelect`,7,Q),f=z(t,`closeOnSelect`,7,!0),p=H(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`child`,`children`,`ref`,`id`,`disabled`,`onSelect`,`closeOnSelect`]),h=Qi.create({id:Y(()=>s()),disabled:Y(()=>c()),onSelect:Y(()=>u()),ref:Y(()=>o(),e=>o(e)),closeOnSelect:Y(()=>f())}),g=O(()=>X(p,h.props));var _={get child(){return i()},set child(e){i(e),x()},get children(){return a()},set children(e){a(e),x()},get ref(){return o()},set ref(e=null){o(e),x()},get id(){return s()},set id(e=$(r)){s(e),x()},get disabled(){return c()},set disabled(e=!1){c(e),x()},get onSelect(){return u()},set onSelect(e=Q){u(e),x()},get closeOnSelect(){return f()},set closeOnSelect(e=!0){f(e),x()}},v=m(),b=P(v),w=e=>{var t=m();S(P(t),i,()=>({props:V(g)})),l(e,t)},T=e=>{var t=ml();I(t,()=>({...V(g)})),S(L(t),()=>a()??d),A(t),l(e,t)};return n(b,e=>{i()?e(w):e(T,-1)}),l(e,v),y(_)}R(hl,{child:{},children:{},ref:{},id:{},disabled:{},onSelect:{},closeOnSelect:{}},[],[],{mode:`open`});var gl=B(`<div><!></div>`);function _l(e,t){let r=N();C(t,!0);let i=z(t,`children`,7),a=z(t,`child`,7),o=z(t,`ref`,15,null),s=z(t,`id`,23,()=>$(r)),c=H(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`children`,`child`,`ref`,`id`]),u=ea.create({id:Y(()=>s()),ref:Y(()=>o(),e=>o(e))}),f=O(()=>X(c,u.props));var p={get children(){return i()},set children(e){i(e),x()},get child(){return a()},set child(e){a(e),x()},get ref(){return o()},set ref(e=null){o(e),x()},get id(){return s()},set id(e=$(r)){s(e),x()}},h=m(),g=P(h),_=e=>{var t=m();S(P(t),a,()=>({props:V(f)})),l(e,t)},v=e=>{var t=gl();I(t,()=>({...V(f)})),S(L(t),()=>i()??d),A(t),l(e,t)};return n(g,e=>{a()?e(_):e(v,-1)}),l(e,h),y(p)}R(_l,{children:{},child:{},ref:{},id:{}},[],[],{mode:`open`});var vl=B(`<div><!></div>`);function yl(e,t){let r=N();C(t,!0);let i=z(t,`children`,7),a=z(t,`child`,7),o=z(t,`ref`,15,null),s=z(t,`id`,23,()=>$(r)),c=H(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`children`,`child`,`ref`,`id`]),u=ta.create({id:Y(()=>s()),ref:Y(()=>o(),e=>o(e))}),f=O(()=>X(c,u.props));var p={get children(){return i()},set children(e){i(e),x()},get child(){return a()},set child(e){a(e),x()},get ref(){return o()},set ref(e=null){o(e),x()},get id(){return s()},set id(e=$(r)){s(e),x()}},h=m(),g=P(h),_=e=>{var t=m();S(P(t),a,()=>({props:V(f)})),l(e,t)},v=e=>{var t=vl();I(t,()=>({...V(f)})),S(L(t),()=>i()??d),A(t),l(e,t)};return n(g,e=>{a()?e(_):e(v,-1)}),l(e,h),y(p)}R(yl,{children:{},child:{},ref:{},id:{}},[],[],{mode:`open`});var bl=B(`<div><!></div>`);function xl(e,t){let r=N();C(t,!0);let i=z(t,`children`,7),a=z(t,`child`,7),o=z(t,`ref`,15,null),s=z(t,`value`,7),c=z(t,`onSelect`,7,Q),u=z(t,`id`,23,()=>$(r)),f=z(t,`disabled`,7,!1),p=z(t,`closeOnSelect`,7,!0),h=H(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`children`,`child`,`ref`,`value`,`onSelect`,`id`,`disabled`,`closeOnSelect`]),g=ia.create({value:Y(()=>s()),id:Y(()=>u()),disabled:Y(()=>f()),onSelect:Y(()=>_),ref:Y(()=>o(),e=>o(e)),closeOnSelect:Y(()=>p())});function _(e){c()(e),!e.defaultPrevented&&g.selectValue()}let v=O(()=>X(h,g.props));var b={get children(){return i()},set children(e){i(e),x()},get child(){return a()},set child(e){a(e),x()},get ref(){return o()},set ref(e=null){o(e),x()},get value(){return s()},set value(e){s(e),x()},get onSelect(){return c()},set onSelect(e=Q){c(e),x()},get id(){return u()},set id(e=$(r)){u(e),x()},get disabled(){return f()},set disabled(e=!1){f(e),x()},get closeOnSelect(){return p()},set closeOnSelect(e=!0){p(e),x()}},w=m(),T=P(w),E=e=>{var t=m();S(P(t),a,()=>({props:V(v),checked:g.isChecked})),l(e,t)},D=e=>{var t=bl();I(t,()=>({...V(v)})),S(L(t),()=>i()??d,()=>({checked:g.isChecked})),A(t),l(e,t)};return n(T,e=>{a()?e(E):e(D,-1)}),l(e,w),y(b)}R(xl,{children:{},child:{},ref:{},value:{},onSelect:{},id:{},disabled:{},closeOnSelect:{}},[],[],{mode:`open`});var Sl=B(`<div><!></div>`);function Cl(e,t){let r=N();C(t,!0);let i=z(t,`ref`,15,null),a=z(t,`id`,23,()=>$(r)),o=z(t,`child`,7),s=z(t,`children`,7),c=H(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`ref`,`id`,`child`,`children`]),u=na.create({id:Y(()=>a()),ref:Y(()=>i(),e=>i(e))}),f=O(()=>X(c,u.props));var p={get ref(){return i()},set ref(e=null){i(e),x()},get id(){return a()},set id(e=$(r)){a(e),x()},get child(){return o()},set child(e){o(e),x()},get children(){return s()},set children(e){s(e),x()}},h=m(),g=P(h),_=e=>{var t=m();S(P(t),o,()=>({props:V(f)})),l(e,t)},v=e=>{var t=Sl();I(t,()=>({...V(f)})),S(L(t),()=>s()??d),A(t),l(e,t)};return n(g,e=>{o()?e(_):e(v,-1)}),l(e,h),y(p)}R(Cl,{ref:{},id:{},child:{},children:{}},[],[],{mode:`open`});var wl=B(`<div><!></div>`);function Tl(e,t){let r=N();C(t,!0);let i=z(t,`id`,23,()=>$(r)),a=z(t,`children`,7),o=z(t,`child`,7),s=z(t,`ref`,15,null),c=z(t,`value`,15,``),u=z(t,`onValueChange`,7,Q),f=H(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`children`,`child`,`ref`,`value`,`onValueChange`]),p=ra.create({value:Y(()=>c(),e=>{c(e),u()(e)}),ref:Y(()=>s(),e=>s(e)),id:Y(()=>i())}),h=O(()=>X(f,p.props));var g={get id(){return i()},set id(e=$(r)){i(e),x()},get children(){return a()},set children(e){a(e),x()},get child(){return o()},set child(e){o(e),x()},get ref(){return s()},set ref(e=null){s(e),x()},get value(){return c()},set value(e=``){c(e),x()},get onValueChange(){return u()},set onValueChange(e=Q){u(e),x()}},_=m(),v=P(_),b=e=>{var t=m();S(P(t),o,()=>({props:V(h)})),l(e,t)},w=e=>{var t=wl();I(t,()=>({...V(h)})),S(L(t),()=>a()??d),A(t),l(e,t)};return n(v,e=>{o()?e(b):e(w,-1)}),l(e,_),y(g)}R(Tl,{id:{},children:{},child:{},ref:{},value:{},onValueChange:{}},[],[],{mode:`open`});var El=B(`<div><!></div>`);function Dl(e,t){let r=N();C(t,!0);let i=z(t,`child`,7),a=z(t,`children`,7),o=z(t,`ref`,15,null),s=z(t,`checked`,15,!1),c=z(t,`id`,23,()=>$(r)),u=z(t,`onCheckedChange`,7,Q),f=z(t,`disabled`,7,!1),p=z(t,`onSelect`,7,Q),h=z(t,`closeOnSelect`,7,!0),g=z(t,`indeterminate`,15,!1),_=z(t,`onIndeterminateChange`,7,Q),v=z(t,`value`,7,``),b=H(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`child`,`children`,`ref`,`checked`,`id`,`onCheckedChange`,`disabled`,`onSelect`,`closeOnSelect`,`indeterminate`,`onIndeterminateChange`,`value`]),w=Gi.getOr(null);w&&v()&&(w.opts.value.current.includes(v())?s(!0):s(!1)),Z.pre(()=>v(),()=>{w&&v()&&(w.opts.value.current.includes(v())?s(!0):s(!1))});let T=$i.create({checked:Y(()=>s(),e=>{e!==s()&&(s(e),u()(e))}),id:Y(()=>c()),disabled:Y(()=>f()),onSelect:Y(()=>E),ref:Y(()=>o(),e=>o(e)),closeOnSelect:Y(()=>h()),indeterminate:Y(()=>g(),e=>{e!==g()&&(g(e),_()(e))}),value:Y(()=>v())},w);function E(e){p()(e),!e.defaultPrevented&&T.toggleChecked()}let D=O(()=>X(b,T.props));var k={get child(){return i()},set child(e){i(e),x()},get children(){return a()},set children(e){a(e),x()},get ref(){return o()},set ref(e=null){o(e),x()},get checked(){return s()},set checked(e=!1){s(e),x()},get id(){return c()},set id(e=$(r)){c(e),x()},get onCheckedChange(){return u()},set onCheckedChange(e=Q){u(e),x()},get disabled(){return f()},set disabled(e=!1){f(e),x()},get onSelect(){return p()},set onSelect(e=Q){p(e),x()},get closeOnSelect(){return h()},set closeOnSelect(e=!0){h(e),x()},get indeterminate(){return g()},set indeterminate(e=!1){g(e),x()},get onIndeterminateChange(){return _()},set onIndeterminateChange(e=Q){_(e),x()},get value(){return v()},set value(e=``){v(e),x()}},j=m(),M=P(j),ee=e=>{var t=m();S(P(t),i,()=>({checked:s(),indeterminate:g(),props:V(D)})),l(e,t)},te=e=>{var t=El();I(t,()=>({...V(D)})),S(L(t),()=>a()??d,()=>({checked:s(),indeterminate:g()})),A(t),l(e,t)};return n(M,e=>{i()?e(ee):e(te,-1)}),l(e,j),y(k)}R(Dl,{child:{},children:{},ref:{},checked:{},id:{},onCheckedChange:{},disabled:{},onSelect:{},closeOnSelect:{},indeterminate:{},onIndeterminateChange:{},value:{}},[],[],{mode:`open`});var Ol=B(`<div><!></div>`);function kl(e,t){let r=N();C(t,!0);let i=z(t,`id`,23,()=>$(r)),a=z(t,`children`,7),o=z(t,`child`,7),s=z(t,`ref`,15,null),c=z(t,`value`,31,()=>xe([])),u=z(t,`onValueChange`,7,Q),f=H(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`children`,`child`,`ref`,`value`,`onValueChange`]),p=oa.create({value:Y(()=>E(c()),e=>{c(E(e)),u()(e)}),onValueChange:Y(()=>u()),ref:Y(()=>s(),e=>s(e)),id:Y(()=>i())}),h=O(()=>X(f,p.props));var g={get id(){return i()},set id(e=$(r)){i(e),x()},get children(){return a()},set children(e){a(e),x()},get child(){return o()},set child(e){o(e),x()},get ref(){return s()},set ref(e=null){s(e),x()},get value(){return c()},set value(e=[]){c(e),x()},get onValueChange(){return u()},set onValueChange(e=Q){u(e),x()}},_=m(),v=P(_),b=e=>{var t=m();S(P(t),o,()=>({props:V(h)})),l(e,t)},w=e=>{var t=Ol();I(t,()=>({...V(h)})),S(L(t),()=>a()??d),A(t),l(e,t)};return n(v,e=>{o()?e(b):e(w,-1)}),l(e,_),y(g)}R(kl,{id:{},children:{},child:{},ref:{},value:{},onValueChange:{}},[],[],{mode:`open`});function Al(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e<a;o=e++){let[a,s]=t[e]??[0,0],[c,l]=t[o]??[0,0];s>=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function jl(e,t){return e[0]>=t.left&&e[0]<=t.right&&e[1]>=t.top&&e[1]<=t.bottom}function Ml(e,t){let n=e.left+e.width/2,r=e.top+e.height/2,i=t.left+t.width/2,a=t.top+t.height/2,o=i-n,s=a-r;return Math.abs(o)>Math.abs(s)?o>0?`right`:`left`:s>0?`bottom`:`top`}var Nl=class{#e;#t;#n;#r=null;#i=null;#a=[];#o=null;#s=null;#c=null;#l(){this.#s!==null&&(cancelAnimationFrame(this.#s),this.#s=null)}#u(){this.#l(),this.#s=requestAnimationFrame(()=>{this.#s=null,!(!this.#r||!this.#i)&&(this.#m(),this.#e.onPointerExit())})}#d(){this.#c!==null&&(clearTimeout(this.#c),this.#c=null)}#f(){this.#n!==null&&(this.#d(),this.#c=window.setTimeout(()=>{this.#c=null,!(!this.#r||!this.#i)&&(this.#m(),this.#e.onPointerExit())},this.#n))}constructor(e){this.#e=e,this.#t=e.buffer??1;let t=e.transitIntentTimeout;this.#n=typeof t==`number`&&t>0?t:null,Z([e.triggerNode,e.contentNode,e.enabled],([e,t,n])=>{if(!e||!t||!n){this.#o=null,this.#m();return}return this.#o&&this.#o!==e&&this.#m(),this.#o=e,[_e(fn(e),`pointermove`,n=>{this.#p([n.clientX,n.clientY],e,t)}),_e(e,`pointerleave`,e=>{let n=e.relatedTarget;if(Jn(n)&&t.contains(n))return;let r=this.#e.ignoredTargets?.()??[];Jn(n)&&r.some(e=>e===n||e.contains(n))||(this.#a=Jn(n)&&r.length>0?r.filter(e=>n.contains(e)):[],this.#r=[e.clientX,e.clientY],this.#i=`content`,this.#u())}),_e(e,`pointerenter`,()=>{this.#m()}),_e(t,`pointerenter`,()=>{this.#m()}),_e(t,`pointerleave`,t=>{let n=t.relatedTarget;Jn(n)&&e.contains(n)||(this.#r=[t.clientX,t.clientY],this.#i=`trigger`,this.#u())})].reduce((e,t)=>()=>{e(),t()},()=>{})})}#p(e,t,n){if(!this.#r||!this.#i)return;this.#l(),this.#f();let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();if(this.#i===`content`&&jl(e,i)){this.#m();return}if(this.#i===`trigger`&&jl(e,r)){this.#m();return}if(this.#i===`content`&&this.#a.length>0)for(let t of this.#a){let n=t.getBoundingClientRect();if(jl(e,n))return;let i=Ml(r,n),a=this.#h(r,n,i);if(a&&Al(e,a))return}let a=Ml(r,i),o=this.#h(r,i,a);if(o&&Al(e,o))return;let s=this.#i===`content`?i:r;Al(e,this.#g(this.#r,s,a,this.#i))||(this.#m(),this.#e.onPointerExit())}#m(){this.#r=null,this.#i=null,this.#a=[],this.#l(),this.#d()}#h(e,t,n){let r=this.#t;switch(n){case`top`:return[[Math.min(e.left,t.left)-r,e.top],[Math.min(e.left,t.left)-r,t.bottom],[Math.max(e.right,t.right)+r,t.bottom],[Math.max(e.right,t.right)+r,e.top]];case`bottom`:return[[Math.min(e.left,t.left)-r,e.bottom],[Math.min(e.left,t.left)-r,t.top],[Math.max(e.right,t.right)+r,t.top],[Math.max(e.right,t.right)+r,e.bottom]];case`left`:return[[e.left,Math.min(e.top,t.top)-r],[t.right,Math.min(e.top,t.top)-r],[t.right,Math.max(e.bottom,t.bottom)+r],[e.left,Math.max(e.bottom,t.bottom)+r]];case`right`:return[[e.right,Math.min(e.top,t.top)-r],[t.left,Math.min(e.top,t.top)-r],[t.left,Math.max(e.bottom,t.bottom)+r],[e.right,Math.max(e.bottom,t.bottom)+r]]}}#g(e,t,n,r){let i=this.#t*4,[a,o]=e;switch(r===`trigger`?this.#_(n):n){case`top`:return[[a-i,o+i],[a+i,o+i],[t.right+i,t.bottom],[t.right+i,t.top],[t.left-i,t.top],[t.left-i,t.bottom]];case`bottom`:return[[a-i,o-i],[a+i,o-i],[t.right+i,t.top],[t.right+i,t.bottom],[t.left-i,t.bottom],[t.left-i,t.top]];case`left`:return[[a+i,o-i],[a+i,o+i],[t.right,t.bottom+i],[t.left,t.bottom+i],[t.left,t.top-i],[t.right,t.top-i]];case`right`:return[[a-i,o-i],[a-i,o+i],[t.left,t.bottom+i],[t.right,t.bottom+i],[t.right,t.top-i],[t.left,t.top-i]]}}#_(e){switch(e){case`top`:return`bottom`;case`bottom`:return`top`;case`left`:return`right`;case`right`:return`left`}}},Pl=wn({component:`popover`,parts:[`root`,`trigger`,`content`,`close`,`overlay`]}),Fl=new Lt(`Popover.Root`),Il=class e{static create(t){return Fl.set(new e(t))}opts;#e=i(null);get contentNode(){return V(this.#e)}set contentNode(e){K(this.#e,e,!0)}contentPresence;#t=i(null);get triggerNode(){return V(this.#t)}set triggerNode(e){K(this.#t,e,!0)}#n=i(null);get overlayNode(){return V(this.#n)}set overlayNode(e){K(this.#n,e,!0)}overlayPresence;#r=i(!1);get openedViaHover(){return V(this.#r)}set openedViaHover(e){K(this.#r,e,!0)}#i=i(!1);get hasInteractedWithContent(){return V(this.#i)}set hasInteractedWithContent(e){K(this.#i,e,!0)}#a=i(!1);get hoverCooldown(){return V(this.#a)}set hoverCooldown(e){K(this.#a,e,!0)}#o=i(0);get closeDelay(){return V(this.#o)}set closeDelay(e){K(this.#o,e,!0)}#s=null;#c=null;constructor(e){this.opts=e,this.contentPresence=new tr({ref:Y(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new tr({ref:Y(()=>this.overlayNode),open:this.opts.open}),Z(()=>this.opts.open.current,e=>{e||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#l())})}setDomContext(e){this.#c=e}#l(){this.#s!==null&&this.#c&&(this.#c.clearTimeout(this.#s),this.#s=null)}toggleOpen(){this.#l(),this.opts.open.current=!this.opts.open.current}handleClose(){this.#l(),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){this.#l(),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(this.#l(),this.closeDelay<=0?this.opts.open.current=!1:this.#c&&(this.#s=this.#c.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#s=null},this.closeDelay))))}cancelDelayedClose(){this.#l()}markInteraction(){this.hasInteractedWithContent=!0,this.#l()}},Ll=class e{static create(t){return new e(t,Fl.get())}opts;root;attachment;domContext;#e=null;#t=null;#n=i(!1);constructor(e,t){this.opts=e,this.root=t,this.attachment=gn(this.opts.ref,e=>this.root.triggerNode=e),this.domContext=new hn(e.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),Z(()=>this.opts.closeDelay.current,e=>{this.root.closeDelay=e})}#r(){this.#e!==null&&(this.domContext.clearTimeout(this.#e),this.#e=null)}#i(){this.#t!==null&&(this.domContext.clearTimeout(this.#t),this.#t=null)}#a(){this.#r(),this.#i()}onpointerenter(e){if(this.opts.disabled.current||!this.opts.openOnHover.current||Xn(e)||(K(this.#n,!0),this.#i(),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;let t=this.opts.openDelay.current;t<=0?this.root.handleHoverOpen():this.#e=this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),this.#e=null},t)}onpointerleave(e){this.opts.disabled.current||this.opts.openOnHover.current&&(Xn(e)||(K(this.#n,!1),this.#r(),this.root.hoverCooldown=!1))}onclick(e){if(!this.opts.disabled.current&&e.button===0){if(this.#a(),V(this.#n)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}V(this.#n)&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(e){this.opts.disabled.current||(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.#a(),this.root.toggleOpen())}#o(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#s=O(()=>({id:this.opts.id.current,"aria-haspopup":`dialog`,"aria-expanded":_n(this.root.opts.open.current),"data-state":xn(this.root.opts.open.current),"aria-controls":this.#o(),[Pl.trigger]:``,disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return V(this.#s)}set props(e){K(this.#s,e)}},Rl=class e{static create(t){return new e(t,Fl.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=gn(this.opts.ref,e=>this.root.contentNode=e),this.onpointerdown=this.onpointerdown.bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new Nl({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.root.handleDelayedHoverClose()}})}onpointerdown(e){this.root.markInteraction()}onfocusin(e){let t=e.target;Jn(t)&&pi(t)&&this.root.markInteraction()}onpointerenter(e){Xn(e)||this.root.cancelDelayedClose()}onpointerleave(e){Xn(e)}onInteractOutside=e=>{if(this.opts.onInteractOutside.current(e),e.defaultPrevented||!Jn(e.target))return;let t=e.target.closest(Pl.selector(`trigger`));if(!(t&&t===this.root.triggerNode)){if(this.opts.customAnchor.current){if(Jn(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(e.target))return}else if(typeof this.opts.customAnchor.current==`string`){let t=document.querySelector(this.opts.customAnchor.current);if(t&&t.contains(e.target))return}}this.root.handleClose()}};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()};get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}#e=O(()=>({open:this.root.opts.open.current}));get snippetProps(){return V(this.#e)}set snippetProps(e){K(this.#e,e)}#t=O(()=>({id:this.opts.id.current,tabindex:-1,"data-state":xn(this.root.opts.open.current),[Pl.content]:``,style:{pointerEvents:`auto`,contain:`layout style`},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return V(this.#t)}set props(e){K(this.#t,e)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}},zl=B(`<div><div><!></div></div>`),Bl=B(`<div><div><!></div></div>`);function Vl(e,t){let r=N();C(t,!0);let i=z(t,`child`,7),a=z(t,`children`,7),o=z(t,`ref`,15,null),s=z(t,`id`,23,()=>$(r)),c=z(t,`forceMount`,7,!1),u=z(t,`onOpenAutoFocus`,7,Q),f=z(t,`onCloseAutoFocus`,7,Q),p=z(t,`onEscapeKeydown`,7,Q),h=z(t,`onInteractOutside`,7,Q),g=z(t,`trapFocus`,7,!0),_=z(t,`preventScroll`,7,!1),v=z(t,`customAnchor`,7,null),b=z(t,`style`,7),w=H(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`child`,`children`,`ref`,`id`,`forceMount`,`onOpenAutoFocus`,`onCloseAutoFocus`,`onEscapeKeydown`,`onInteractOutside`,`trapFocus`,`preventScroll`,`customAnchor`,`style`]),T=Rl.create({id:Y(()=>s()),ref:Y(()=>o(),e=>o(e)),onInteractOutside:Y(()=>h()),onEscapeKeydown:Y(()=>p()),customAnchor:Y(()=>v())}),E=O(()=>X(w,T.props)),D=O(()=>g()&&T.shouldTrapFocus);function k(e){T.shouldTrapFocus||e.preventDefault(),u()(e)}var j={get child(){return i()},set child(e){i(e),x()},get children(){return a()},set children(e){a(e),x()},get ref(){return o()},set ref(e=null){o(e),x()},get id(){return s()},set id(e=$(r)){s(e),x()},get forceMount(){return c()},set forceMount(e=!1){c(e),x()},get onOpenAutoFocus(){return u()},set onOpenAutoFocus(e=Q){u(e),x()},get onCloseAutoFocus(){return f()},set onCloseAutoFocus(e=Q){f(e),x()},get onEscapeKeydown(){return p()},set onEscapeKeydown(e=Q){p(e),x()},get onInteractOutside(){return h()},set onInteractOutside(e=Q){h(e),x()},get trapFocus(){return g()},set trapFocus(e=!0){g(e),x()},get preventScroll(){return _()},set preventScroll(e=!1){_(e),x()},get customAnchor(){return v()},set customAnchor(e=null){v(e),x()},get style(){return b()},set style(e){b(e),x()}},M=m(),ee=P(M),te=e=>{Zc(e,ne(()=>V(E),()=>T.popperProps,{get ref(){return T.opts.ref},get enabled(){return T.root.opts.open.current},get id(){return s()},get trapFocus(){return V(D)},get preventScroll(){return _()},loop:!0,forceMount:!0,get customAnchor(){return v()},onOpenAutoFocus:k,get onCloseAutoFocus(){return f()},get shouldRender(){return T.shouldRender},popper:(e,t)=>{let r=()=>t?.().props,o=()=>t?.().wrapperProps,s=O(()=>X(r(),{style:nc(`popover`)},{style:b()}));var c=m(),u=P(c),f=e=>{var t=m(),n=P(t);{let e=O(()=>({props:V(s),wrapperProps:o(),...T.snippetProps}));S(n,i,()=>V(e))}l(e,t)},p=e=>{var t=zl();I(t,()=>({...o()}));var n=L(t);I(n,()=>({...V(s)})),S(L(n),()=>a()??d),A(n),A(t),l(e,t)};n(u,e=>{i()?e(f):e(p,-1)}),l(e,c)},$$slots:{popper:!0}}))},re=e=>{Xc(e,ne(()=>V(E),()=>T.popperProps,{get ref(){return T.opts.ref},get open(){return T.root.opts.open.current},get id(){return s()},get trapFocus(){return V(D)},get preventScroll(){return _()},loop:!0,forceMount:!1,get customAnchor(){return v()},onOpenAutoFocus:k,get onCloseAutoFocus(){return f()},get shouldRender(){return T.shouldRender},popper:(e,t)=>{let r=()=>t?.().props,o=()=>t?.().wrapperProps,s=O(()=>X(r(),{style:nc(`popover`)},{style:b()}));var c=m(),u=P(c),f=e=>{var t=m(),n=P(t);{let e=O(()=>({props:V(s),wrapperProps:o(),...T.snippetProps}));S(n,i,()=>V(e))}l(e,t)},p=e=>{var t=Bl();I(t,()=>({...o()}));var n=L(t);I(n,()=>({...V(s)})),S(L(n),()=>a()??d),A(n),A(t),l(e,t)};n(u,e=>{i()?e(f):e(p,-1)}),l(e,c)},$$slots:{popper:!0}}))};return n(ee,e=>{c()?e(te):c()||e(re,1)}),l(e,M),y(j)}R(Vl,{child:{},children:{},ref:{},id:{},forceMount:{},onOpenAutoFocus:{},onCloseAutoFocus:{},onEscapeKeydown:{},onInteractOutside:{},trapFocus:{},preventScroll:{},customAnchor:{},style:{}},[],[],{mode:`open`});var Hl=B(`<button><!></button>`);function Ul(e,t){let r=N();C(t,!0);let i=z(t,`children`,7),a=z(t,`child`,7),o=z(t,`id`,23,()=>$(r)),s=z(t,`ref`,15,null),c=z(t,`type`,7,`button`),u=z(t,`disabled`,7,!1),f=z(t,`openOnHover`,7,!1),p=z(t,`openDelay`,7,700),h=z(t,`closeDelay`,7,300),g=H(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`children`,`child`,`id`,`ref`,`type`,`disabled`,`openOnHover`,`openDelay`,`closeDelay`]),_=Ll.create({id:Y(()=>o()),ref:Y(()=>s(),e=>s(e)),disabled:Y(()=>!!u()),openOnHover:Y(()=>f()),openDelay:Y(()=>p()),closeDelay:Y(()=>h())}),v=O(()=>X(g,_.props,{type:c()}));return Bc(e,{get id(){return o()},get ref(){return _.opts.ref},children:(e,t)=>{var r=m(),o=P(r),s=e=>{var t=m();S(P(t),a,()=>({props:V(v)})),l(e,t)},c=e=>{var t=Hl();I(t,()=>({...V(v)})),S(L(t),()=>i()??d),A(t),l(e,t)};n(o,e=>{a()?e(s):e(c,-1)}),l(e,r)},$$slots:{default:!0}}),y({get children(){return i()},set children(e){i(e),x()},get child(){return a()},set child(e){a(e),x()},get id(){return o()},set id(e=$(r)){o(e),x()},get ref(){return s()},set ref(e=null){s(e),x()},get type(){return c()},set type(e=`button`){c(e),x()},get disabled(){return u()},set disabled(e=!1){u(e),x()},get openOnHover(){return f()},set openOnHover(e=!1){f(e),x()},get openDelay(){return p()},set openDelay(e=700){p(e),x()},get closeDelay(){return h()},set closeDelay(e=300){h(e),x()}})}R(Ul,{children:{},child:{},id:{},ref:{},type:{},disabled:{},openOnHover:{},openDelay:{},closeDelay:{}},[],[],{mode:`open`});function Wl(e,t){C(t,!0);let n=z(t,`open`,15,!1),r=z(t,`onOpenChange`,7,Q),i=z(t,`onOpenChangeComplete`,7,Q),a=z(t,`children`,7);ir.create({variant:Y(()=>`dialog`),open:Y(()=>n(),e=>{n(e),r()(e)}),onOpenChangeComplete:Y(()=>i())});var o={get open(){return n()},set open(e=!1){n(e),x()},get onOpenChange(){return r()},set onOpenChange(e=Q){r(e),x()},get onOpenChangeComplete(){return i()},set onOpenChangeComplete(e=Q){i(e),x()},get children(){return a()},set children(e){a(e),x()}},s=m();return S(P(s),()=>a()??d),l(e,s),y(o)}R(Wl,{open:{},onOpenChange:{},onOpenChangeComplete:{},children:{}},[],[],{mode:`open`});var Gl=B(`<button><!></button>`);function Kl(e,t){let r=N();C(t,!0);let i=z(t,`children`,7),a=z(t,`child`,7),o=z(t,`id`,23,()=>$(r)),s=z(t,`ref`,15,null),c=z(t,`disabled`,7,!1),u=H(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`children`,`child`,`id`,`ref`,`disabled`]),f=ar.create({variant:Y(()=>`close`),id:Y(()=>o()),ref:Y(()=>s(),e=>s(e)),disabled:Y(()=>!!c())}),p=O(()=>X(u,f.props));var h={get children(){return i()},set children(e){i(e),x()},get child(){return a()},set child(e){a(e),x()},get id(){return o()},set id(e=$(r)){o(e),x()},get ref(){return s()},set ref(e=null){s(e),x()},get disabled(){return c()},set disabled(e=!1){c(e),x()}},g=m(),_=P(g),v=e=>{var t=m();S(P(t),a,()=>({props:V(p)})),l(e,t)},b=e=>{var t=Gl();I(t,()=>({...V(p)})),S(L(t),()=>i()??d),A(t),l(e,t)};return n(_,e=>{a()?e(v):e(b,-1)}),l(e,g),y(h)}R(Kl,{children:{},child:{},id:{},ref:{},disabled:{}},[],[],{mode:`open`});var ql=B(`<!> <!>`,1),Jl=B(`<!> <div><!></div>`,1);function Yl(e,t){let r=N();C(t,!0);let i=z(t,`id`,23,()=>$(r)),a=z(t,`children`,7),o=z(t,`child`,7),s=z(t,`ref`,15,null),c=z(t,`forceMount`,7,!1),u=z(t,`onCloseAutoFocus`,7,Q),f=z(t,`onOpenAutoFocus`,7,Q),p=z(t,`onEscapeKeydown`,7,Q),h=z(t,`onInteractOutside`,7,Q),g=z(t,`trapFocus`,7,!0),_=z(t,`preventScroll`,7,!0),v=z(t,`restoreScrollDelay`,7,null),b=H(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`children`,`child`,`ref`,`forceMount`,`onCloseAutoFocus`,`onOpenAutoFocus`,`onEscapeKeydown`,`onInteractOutside`,`trapFocus`,`preventScroll`,`restoreScrollDelay`]),w=cr.create({id:Y(()=>i()),ref:Y(()=>s(),e=>s(e))}),T=O(()=>X(b,w.props));var E={get id(){return i()},set id(e=$(r)){i(e),x()},get children(){return a()},set children(e){a(e),x()},get child(){return o()},set child(e){o(e),x()},get ref(){return s()},set ref(e=null){s(e),x()},get forceMount(){return c()},set forceMount(e=!1){c(e),x()},get onCloseAutoFocus(){return u()},set onCloseAutoFocus(e=Q){u(e),x()},get onOpenAutoFocus(){return f()},set onOpenAutoFocus(e=Q){f(e),x()},get onEscapeKeydown(){return p()},set onEscapeKeydown(e=Q){p(e),x()},get onInteractOutside(){return h()},set onInteractOutside(e=Q){h(e),x()},get trapFocus(){return g()},set trapFocus(e=!0){g(e),x()},get preventScroll(){return _()},set preventScroll(e=!0){_(e),x()},get restoreScrollDelay(){return v()},set restoreScrollDelay(e=null){v(e),x()}},D=m(),k=P(D),j=e=>{va(e,{get ref(){return w.opts.ref},loop:!0,get trapFocus(){return g()},get enabled(){return w.root.opts.open.current},get onOpenAutoFocus(){return f()},get onCloseAutoFocus(){return u()},focusScope:(e,t)=>{let r=()=>t?.().props;ha(e,ne(()=>V(T),{get enabled(){return w.root.opts.open.current},get ref(){return w.opts.ref},onEscapeKeydown:e=>{p()(e),!e.defaultPrevented&&w.root.handleClose()},children:(e,t)=>{fa(e,ne(()=>V(T),{get ref(){return w.opts.ref},get enabled(){return w.root.opts.open.current},onInteractOutside:e=>{h()(e),!e.defaultPrevented&&w.root.handleClose()},children:(e,t)=>{wa(e,ne(()=>V(T),{get ref(){return w.opts.ref},get enabled(){return w.root.opts.open.current},children:(e,t)=>{var i=m(),s=P(i),c=e=>{var t=ql(),i=P(t),a=e=>{La(e,{get preventScroll(){return _()},get restoreScrollDelay(){return v()}})};n(i,e=>{w.root.opts.open.current&&e(a)});var s=G(i,2);{let e=O(()=>({props:X(V(T),r()),...w.snippetProps}));S(s,o,()=>V(e))}l(e,t)},u=e=>{var t=Jl(),n=P(t);La(n,{get preventScroll(){return _()}});var i=G(n,2);I(i,e=>({...e}),[()=>X(V(T),r())]),S(L(i),()=>a()??d),A(i),l(e,t)};n(s,e=>{o()?e(c):e(u,-1)}),l(e,i)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};return n(k,e=>{(w.shouldRender||c())&&e(j)}),l(e,D),y(E)}R(Yl,{id:{},children:{},child:{},ref:{},forceMount:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onEscapeKeydown:{},onInteractOutside:{},trapFocus:{},preventScroll:{},restoreScrollDelay:{}},[],[],{mode:`open`});function Xl(e,t){C(t,!0);let n=z(t,`open`,15,!1),r=z(t,`dir`,7,`ltr`),i=z(t,`onOpenChange`,7,Q),a=z(t,`onOpenChangeComplete`,7,Q),o=z(t,`_internal_variant`,7,`dropdown-menu`),s=z(t,`children`,7),c=Ji.create({variant:Y(()=>o()),dir:Y(()=>r()),onClose:()=>{n(!1),i()(!1)}});return Yi.create({open:Y(()=>n(),e=>{n(e),i()(e)}),onOpenChangeComplete:Y(()=>a())},c),gc(e,{children:(e,t)=>{var n=m();S(P(n),()=>s()??d),l(e,n)},$$slots:{default:!0}}),y({get open(){return n()},set open(e=!1){n(e),x()},get dir(){return r()},set dir(e=`ltr`){r(e),x()},get onOpenChange(){return i()},set onOpenChange(e=Q){i(e),x()},get onOpenChangeComplete(){return a()},set onOpenChangeComplete(e=Q){a(e),x()},get _internal_variant(){return o()},set _internal_variant(e=`dropdown-menu`){o(e),x()},get children(){return s()},set children(e){s(e),x()}})}R(Xl,{open:{},dir:{},onOpenChange:{},onOpenChangeComplete:{},_internal_variant:{},children:{}},[],[],{mode:`open`});var Zl=B(`<div><div><!></div></div>`),Ql=B(`<div><div><!></div></div>`);function $l(e,t){let r=N();C(t,!0);let i=z(t,`id`,23,()=>$(r)),a=z(t,`child`,7),o=z(t,`children`,7),s=z(t,`ref`,15,null),c=z(t,`loop`,7,!0),u=z(t,`onInteractOutside`,7,Q),f=z(t,`onEscapeKeydown`,7,Q),p=z(t,`onCloseAutoFocus`,7,Q),h=z(t,`forceMount`,7,!1),g=z(t,`trapFocus`,7,!1),_=z(t,`style`,7),v=H(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`child`,`children`,`ref`,`loop`,`onInteractOutside`,`onEscapeKeydown`,`onCloseAutoFocus`,`forceMount`,`trapFocus`,`style`]),b=Xi.create({id:Y(()=>i()),loop:Y(()=>c()),ref:Y(()=>s(),e=>s(e)),onCloseAutoFocus:Y(()=>p())}),w=O(()=>X(v,b.props));function T(e){if(b.handleInteractOutside(e),!e.defaultPrevented&&(u()(e),!e.defaultPrevented)){if(e.target&&e.target instanceof Element){let t=`[${b.parentMenu.root.getBitsAttr(`sub-content`)}]`;if(e.target.closest(t))return}b.parentMenu.onClose()}}function E(e){f()(e),!e.defaultPrevented&&b.parentMenu.onClose()}var D={get id(){return i()},set id(e=$(r)){i(e),x()},get child(){return a()},set child(e){a(e),x()},get children(){return o()},set children(e){o(e),x()},get ref(){return s()},set ref(e=null){s(e),x()},get loop(){return c()},set loop(e=!0){c(e),x()},get onInteractOutside(){return u()},set onInteractOutside(e=Q){u(e),x()},get onEscapeKeydown(){return f()},set onEscapeKeydown(e=Q){f(e),x()},get onCloseAutoFocus(){return p()},set onCloseAutoFocus(e=Q){p(e),x()},get forceMount(){return h()},set forceMount(e=!1){h(e),x()},get trapFocus(){return g()},set trapFocus(e=!1){g(e),x()},get style(){return _()},set style(e){_(e),x()}},k=m(),j=P(k),M=e=>{Zc(e,ne(()=>V(w),()=>b.popperProps,{get ref(){return b.opts.ref},get enabled(){return b.parentMenu.opts.open.current},onInteractOutside:T,onEscapeKeydown:E,get trapFocus(){return g()},get loop(){return c()},forceMount:!0,get id(){return i()},get shouldRender(){return b.shouldRender},popper:(e,t)=>{let r=()=>t?.().props,i=()=>t?.().wrapperProps,s=O(()=>X(r(),{style:nc(`dropdown-menu`)},{style:_()}));var c=m(),u=P(c),f=e=>{var t=m(),n=P(t);{let e=O(()=>({props:V(s),wrapperProps:i(),...b.snippetProps}));S(n,a,()=>V(e))}l(e,t)},p=e=>{var t=Zl();I(t,()=>({...i()}));var n=L(t);I(n,()=>({...V(s)})),S(L(n),()=>o()??d),A(n),A(t),l(e,t)};n(u,e=>{a()?e(f):e(p,-1)}),l(e,c)},$$slots:{popper:!0}}))},ee=e=>{Xc(e,ne(()=>V(w),()=>b.popperProps,{get ref(){return b.opts.ref},get open(){return b.parentMenu.opts.open.current},onInteractOutside:T,onEscapeKeydown:E,get trapFocus(){return g()},get loop(){return c()},forceMount:!1,get id(){return i()},get shouldRender(){return b.shouldRender},popper:(e,t)=>{let r=()=>t?.().props,i=()=>t?.().wrapperProps,s=O(()=>X(r(),{style:nc(`dropdown-menu`)},{style:_()}));var c=m(),u=P(c),f=e=>{var t=m(),n=P(t);{let e=O(()=>({props:V(s),wrapperProps:i(),...b.snippetProps}));S(n,a,()=>V(e))}l(e,t)},p=e=>{var t=Ql();I(t,()=>({...i()}));var n=L(t);I(n,()=>({...V(s)})),S(L(n),()=>o()??d),A(n),A(t),l(e,t)};n(u,e=>{a()?e(f):e(p,-1)}),l(e,c)},$$slots:{popper:!0}}))};return n(j,e=>{h()?e(M):h()||e(ee,1)}),l(e,k),y(D)}R($l,{id:{},child:{},children:{},ref:{},loop:{},onInteractOutside:{},onEscapeKeydown:{},onCloseAutoFocus:{},forceMount:{},trapFocus:{},style:{}},[],[],{mode:`open`});var eu=B(`<button><!></button>`);function tu(e,t){let r=N();C(t,!0);let i=z(t,`id`,23,()=>$(r)),a=z(t,`ref`,15,null),o=z(t,`child`,7),s=z(t,`children`,7),c=z(t,`disabled`,7,!1),u=z(t,`type`,7,`button`),f=H(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`ref`,`child`,`children`,`disabled`,`type`]),p=aa.create({id:Y(()=>i()),disabled:Y(()=>c()??!1),ref:Y(()=>a(),e=>a(e))}),h=O(()=>X(f,p.props,{type:u()}));return Bc(e,{get id(){return i()},get ref(){return p.opts.ref},children:(e,t)=>{var r=m(),i=P(r),a=e=>{var t=m();S(P(t),o,()=>({props:V(h)})),l(e,t)},c=e=>{var t=eu();I(t,()=>({...V(h)})),S(L(t),()=>s()??d),A(t),l(e,t)};n(i,e=>{o()?e(a):e(c,-1)}),l(e,r)},$$slots:{default:!0}}),y({get id(){return i()},set id(e=$(r)){i(e),x()},get ref(){return a()},set ref(e=null){a(e),x()},get child(){return o()},set child(e){o(e),x()},get children(){return s()},set children(e){s(e),x()},get disabled(){return c()},set disabled(e=!1){c(e),x()},get type(){return u()},set type(e=`button`){u(e),x()}})}R(tu,{id:{},ref:{},child:{},children:{},disabled:{},type:{}},[],[],{mode:`open`});var nu=wn({component:`label`,parts:[`root`]}),ru=class e{static create(t){return new e(t)}opts;attachment;constructor(e){this.opts=e,this.attachment=gn(this.opts.ref),this.onmousedown=this.onmousedown.bind(this)}onmousedown(e){e.detail>1&&e.preventDefault()}#e=O(()=>({id:this.opts.id.current,[nu.root]:``,onmousedown:this.onmousedown,...this.attachment}));get props(){return V(this.#e)}set props(e){K(this.#e,e)}},iu=B(`<label><!></label>`);function au(e,t){let r=N();C(t,!0);let i=z(t,`children`,7),a=z(t,`child`,7),o=z(t,`id`,23,()=>$(r)),s=z(t,`ref`,15,null),c=z(t,`for`,7),u=H(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`children`,`child`,`id`,`ref`,`for`]),f=ru.create({id:Y(()=>o()),ref:Y(()=>s(),e=>s(e))}),p=O(()=>X(u,f.props,{for:c()}));var h={get children(){return i()},set children(e){i(e),x()},get child(){return a()},set child(e){a(e),x()},get id(){return o()},set id(e=$(r)){o(e),x()},get ref(){return s()},set ref(e=null){s(e),x()},get for(){return c()},set for(e){c(e),x()}},g=m(),_=P(g),v=e=>{var t=m();S(P(t),a,()=>({props:V(p)})),l(e,t)},b=e=>{var t=iu();I(t,()=>({...V(p),for:c()})),S(L(t),()=>i()??d),A(t),l(e,t)};return n(_,e=>{a()?e(v):e(b,-1)}),l(e,g),y(h)}R(au,{children:{},child:{},id:{},ref:{},for:{}},[],[],{mode:`open`});function ou(e,t){C(t,!0);let n=z(t,`open`,15,!1),r=z(t,`onOpenChange`,7,Q),i=z(t,`onOpenChangeComplete`,7,Q),a=z(t,`children`,7);return Il.create({open:Y(()=>n(),e=>{n(e),r()(e)}),onOpenChangeComplete:Y(()=>i())}),gc(e,{children:(e,t)=>{var n=m();S(P(n),()=>a()??d),l(e,n)},$$slots:{default:!0}}),y({get open(){return n()},set open(e=!1){n(e),x()},get onOpenChange(){return r()},set onOpenChange(e=Q){r(e),x()},get onOpenChangeComplete(){return i()},set onOpenChangeComplete(e=Q){i(e),x()},get children(){return a()},set children(e){a(e),x()}})}R(ou,{open:{},onOpenChange:{},onOpenChangeComplete:{},children:{}},[],[],{mode:`open`});function su(e){return e<.5?8*e**4:-8*(e-1)**4+1}function cu(e){return e**4}function lu(e){return(e-1)**3*(1-e)+1}function uu(e){return--e*e*e*e*e+1}var du=e=>e;function fu(e){let t=e-1;return t*t*t+1}function pu(e){let t=typeof e==`string`&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||`px`]:[e,`px`]}function mu(e,{delay:t=0,duration:n=400,easing:r=du}={}){let i=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:r,css:e=>`opacity: ${e*i}`}}function hu(e,{delay:t=0,duration:n=400,easing:r=fu,x:i=0,y:a=0,opacity:o=0}={}){let s=getComputedStyle(e),c=+s.opacity,l=s.transform===`none`?``:s.transform,u=c*(1-o),[d,f]=pu(i),[p,m]=pu(a);return{delay:t,duration:n,easing:r,css:(e,t)=>`
7
7
  transform: ${l} translate(${(1-e)*d}${f}, ${(1-e)*p}${m});
8
- opacity: ${c-u*t}`}}var gu=B(`<div class="embed-alva embed-alva--question-box"><div class="embed-alva__body"><div class="embed-alva__row"><p class="embed-alva__description">Möchten Sie an Umfrage teilnehmen? <span class="embed-alva__time">Dauer: ca. 5 Minuten.</span></p> <a class="btn btn--primary" target="_blank" rel="noopener noreferrer"><span class="btn__label">Umfrage&nbsp;ausfüllen</span></a> <button class="embed-alva__close transition-colors"><span class="sr-only">Schliessen</span> <!></button></div></div></div>`);function _u(t,r){C(r,!0);let a=z(r,`belowScore`,7),o=i(void 0);oe(()=>{pe(()=>{K(o,vu.getContext(),!0)})});let s=()=>{vu.updateContext(e=>({...e,experimentState:`completed-without-survey`}))},c=()=>vu.updateContext(e=>({...e,experimentState:`completed`})),u={certainty:`https://forms.office.com/e/r2xanSsUsy`,uncertainty:`https://forms.office.com/e/5C9VAhrpWS`,control:`https://forms.office.com/e/i8Mf5t4QVZ`,"<unassigned>":``},d=(e,t)=>t.enabled?hu(e,t):{duration:0};var f={get belowScore(){return a()},set belowScore(e){a(e),x()}},p=m(),h=P(p),_=t=>{br(t,{get to(){return q.targets.surveyPortal},children:(t,r)=>{var i=m(),f=P(i),p=t=>{var r=m(),i=P(r),f=t=>{var n=gu(),r=L(n),i=L(r),f=G(L(i),2),p=G(f,2);J(G(L(p),2),{name:`dismiss`}),A(p),A(i),A(r),A(n),U(()=>W(f,`href`,u[V(o).assignedGroup])),e(`click`,f,c),e(`click`,p,s),g(5,n,()=>d,()=>({enabled:a(),duration:300,delay:1e3,y:30})),l(t,n)};n(i,e=>{(a()?V(o).nextShowCount===3:V(o).nextShowCount>=3)&&vu.currentContext.experimentState===`in-progress`&&e(f)}),l(t,r)};n(f,e=>{vu.currentContext.isDesktop&&V(o).experimentState===`in-progress`&&e(p)}),l(t,i)},$$slots:{default:!0}})};return n(h,e=>{q.targets.surveyPortal&&e(_)}),l(t,p),y(f)}w([`click`]),R(_u,{belowScore:{}},[],[],{mode:`open`});var vu=new ke({initialValue:{isDesktop:!!(new Oe(`(hover: hover) and (pointer: fine)`,!1).current||navigator.userAgentData?.mobile===!1),experimentState:`new`,assignedGroup:`<unassigned>`,nextLevel:`<unassigned>`,nextShowCount:-1}}),yu=e=>{let t=new Uint32Array(1);return crypto.getRandomValues(t),e[t[0]%e.length]},bu=()=>yu([`certainty`,`uncertainty`,`control`]),xu=()=>yu([`low`,`medium`,`high`]),Su=B(`<button class="debug-btn svelte-yb76lo">Reset</button>`),Cu=B(`<div class="debug-panel svelte-yb76lo"><pre class="svelte-yb76lo"><code class="svelte-yb76lo"> </code></pre> <!></div>`),wu=B(`<div class="debug svelte-yb76lo"><!> <button class="debug-toggle svelte-yb76lo"> </button></div>`),Tu=B(`<div class="embed-alva svelte-yb76lo"><div class="embed-alva__body svelte-yb76lo"><button class="embed-alva__close transition-colors svelte-yb76lo"><span class="sr-only svelte-yb76lo">Schliessen</span> <!></button> <p class="embed-alva__title svelte-yb76lo">Helfen Sie uns, Alva zu verbessern!</p> <p class="embed-alva__description svelte-yb76lo">Nehmen Sie an einer kurzen wissenschaftlichen Befragung teil (ca. 5 Min. im Anschluss an Ihre Nutzung). <br class="svelte-yb76lo"/> <a href="#experiment-info" class="embed-alva__link svelte-yb76lo">Mehr erfahren</a></p> <div class="embed-alva__actions svelte-yb76lo"><button class="btn btn--primary svelte-yb76lo"><span class="btn__label svelte-yb76lo">Ja, mitmachen</span></button> <button class="btn btn--secondary svelte-yb76lo"><span class="btn__label svelte-yb76lo">Nein, danke</span></button></div></div></div>`),Eu=B(`<!> <!>`,1),Du=B(`<!> <!>`,1),Ou={hash:`svelte-yb76lo`,code:`.chat-app .message--bot:has(+ .message--bot) {padding-bottom:0;}
8
+ opacity: ${c-u*t}`}}var gu=B(`<div class="embed-alva embed-alva--question-box"><div class="embed-alva__body"><div class="embed-alva__row"><p class="embed-alva__description">Möchten Sie an der Umfrage teilnehmen? <span class="embed-alva__time">Dauer: ca. 5 Minuten.</span></p> <a class="btn btn--primary" target="_blank" rel="noopener noreferrer"><span class="btn__label">Umfrage&nbsp;ausfüllen</span></a> <button class="embed-alva__close transition-colors"><span class="sr-only">Schliessen</span> <!></button></div></div></div>`);function _u(t,r){C(r,!0);let a=z(r,`belowScore`,7),o=i(void 0);oe(()=>{pe(()=>{K(o,vu.getContext(),!0)})});let s=()=>{vu.updateContext(e=>({...e,experimentState:`completed-without-survey`}))},c=()=>vu.updateContext(e=>({...e,experimentState:`completed`})),u={certainty:`https://forms.office.com/e/r2xanSsUsy`,uncertainty:`https://forms.office.com/e/5C9VAhrpWS`,control:`https://forms.office.com/e/i8Mf5t4QVZ`,"<unassigned>":``},d=(e,t)=>t.enabled?hu(e,t):{duration:0};var f={get belowScore(){return a()},set belowScore(e){a(e),x()}},p=m(),h=P(p),_=t=>{br(t,{get to(){return q.targets.surveyPortal},children:(t,r)=>{var i=m(),f=P(i),p=t=>{var r=m(),i=P(r),f=t=>{var n=gu(),r=L(n),i=L(r),f=G(L(i),2),p=G(f,2);J(G(L(p),2),{name:`dismiss`}),A(p),A(i),A(r),A(n),U(()=>W(f,`href`,u[V(o).assignedGroup])),e(`click`,f,c),e(`click`,p,s),g(5,n,()=>d,()=>({enabled:a(),duration:300,delay:1e3,y:30})),l(t,n)};n(i,e=>{(a()?V(o).nextShowCount===3:V(o).nextShowCount>=3)&&vu.currentContext.experimentState===`in-progress`&&e(f)}),l(t,r)};n(f,e=>{vu.currentContext.isDesktop&&V(o).experimentState===`in-progress`&&e(p)}),l(t,i)},$$slots:{default:!0}})};return n(h,e=>{q.targets.surveyPortal&&e(_)}),l(t,p),y(f)}w([`click`]),R(_u,{belowScore:{}},[],[],{mode:`open`});var vu=new ke({initialValue:{isDesktop:!!(new Oe(`(hover: hover) and (pointer: fine)`,!1).current||navigator.userAgentData?.mobile===!1),experimentState:`new`,assignedGroup:`<unassigned>`,nextLevel:`<unassigned>`,nextShowCount:-1}}),yu=e=>{let t=new Uint32Array(1);return crypto.getRandomValues(t),e[t[0]%e.length]},bu=()=>yu([`certainty`,`uncertainty`,`control`]),xu=()=>yu([`low`,`medium`,`high`]),Su=B(`<button class="debug-btn svelte-yb76lo">Reset</button>`),Cu=B(`<div class="debug-panel svelte-yb76lo"><pre class="svelte-yb76lo"><code class="svelte-yb76lo"> </code></pre> <!></div>`),wu=B(`<div class="debug svelte-yb76lo"><!> <button class="debug-toggle svelte-yb76lo"> </button></div>`),Tu=B(`<div class="embed-alva svelte-yb76lo"><div class="embed-alva__body svelte-yb76lo"><button class="embed-alva__close transition-colors svelte-yb76lo"><span class="sr-only svelte-yb76lo">Schliessen</span> <!></button> <p class="embed-alva__title svelte-yb76lo">Helfen Sie uns, Alva zu verbessern!</p> <p class="embed-alva__description svelte-yb76lo">Nehmen Sie an einer kurzen wissenschaftlichen Befragung teil (ca. 5 Min. im Anschluss an Ihre Nutzung). <br class="svelte-yb76lo"/> <a href="#experiment-info" class="embed-alva__link svelte-yb76lo">Mehr erfahren</a></p> <div class="embed-alva__actions svelte-yb76lo"><button class="btn btn--primary svelte-yb76lo"><span class="btn__label svelte-yb76lo">Ja, mitmachen</span></button> <button class="btn btn--secondary svelte-yb76lo"><span class="btn__label svelte-yb76lo">Nein, danke</span></button></div></div></div>`),Eu=B(`<!> <!>`,1),Du=B(`<!> <!>`,1),Ou={hash:`svelte-yb76lo`,code:`.chat-app .message--bot:has(+ .message--bot) {padding-bottom:0;}
9
9
  /* Alva init embed styles */
10
10
  /* Debug panel */.debug.svelte-yb76lo {display:flex;z-index:100000;position:fixed;top:0;left:20px;flex-direction:column;align-items:start;}.debug-panel.svelte-yb76lo {max-width:320px;padding:var(--spacer-10);border-radius:0 0 var(--spacer-6) 0;background-color:#68a518;color:var(--color-grey-0);font-size:var(--base-font-size-xs);}.debug-panel.svelte-yb76lo pre:where(.svelte-yb76lo) {margin:0;white-space:pre-wrap;word-break:break-word;}.debug-btn.svelte-yb76lo {width:100%;margin-top:var(--spacer-4);padding:var(--spacer-4) var(--spacer-10);border:1px solid var(--color-grey-0);border-radius:var(--spacer-4);background-color:#84cf23;color:var(--color-grey-0);font-size:var(--base-font-size-xs);}.debug-toggle.svelte-yb76lo {padding:var(--spacer-1) var(--spacer-10);border:none;border-radius:0 0 var(--spacer-4) var(--spacer-4);background-color:#68a518;color:var(--color-grey-0);font-size:var(--base-font-size-xs);line-height:var(--base-line-height-tight);}.embed-alva {padding:0;overflow:hidden;gap:2px;border-radius:var(--base-border-radius);background:var(--alva-gradient-card); /* stylelint-disable-line */background-position-x:0%;background-size:240%;transition:height 0.4s var(--default-transition-timing-function);&:after,
11
11
  &:before {display:none;}}.embed-alva--question-box {box-shadow:0 1.5rem 1rem -0.5rem rgb(245 245 245 / 0.7);font-size:var(--base-font-size-body);}.embed-alva--question-box .btn {margin-right:1.2rem;padding:0.5rem 1.3rem;}.embed-alva__row {display:flex;flex-direction:row;align-items:center;gap:10px;}.embed-alva__body {position:relative;padding:var(--spacer-r-24) var(--spacer-r-28);}.embed-alva__close {position:absolute;top:var(--spacer-8);right:var(--spacer-8);padding:var(--spacer-4);border:none;background:transparent;color:var(--anchor-color);&:hover {color:var(--anchor-hover-color);}}.embed-alva__time {opacity:0.8;}.embed-alva__title {margin:0 0 var(--spacer-4);
@@ -1 +1 @@
1
- import{n as e}from"./D35Ghe-e.js";var t=e=>e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`'`).replace(/\n/g,`&#10;`),n=(e,n)=>{if(n!==void 0){if(typeof n==`string`)return`${e}="${t(n)}"`;if(typeof n==`boolean`)return n?e:void 0}},r=(t,n)=>t.cdn.value?`https://cdn.jsdelivr.net/npm/@liip/liipgpt@${e}/${n}/liipgpt-${n}.iife.min.js`:`${t[`api-url`].value}/cdn/npm/@liip/liipgpt/${n}/liipgpt-${n}.iife.min.js`,i=(e,t)=>{let i=`<liipgpt-button ${[n(`lang`,e.lang.value),n(`force-theme`,e?.[`force-theme`]?.value),n(`api-url`,e[`api-url`].value)].filter(Boolean).join(` `)}</liipgpt-button>`;if(t){let t=`<script async src="${r(e,`button`)}"><\/script>\n${i}`;return e.CHAT_CONFIG_OVERRIDE.value&&(t=`<script>\n${e.CHAT_CONFIG_OVERRIDE.value}<\/script>\n`+t),e.onclosechat.value&&(t+=`\n<script>${e.onclosechat.value}<\/script>`),t}return i},a=(e,t=!1)=>{if(e[`show-link-button`].value)return i(e,t);let a=`<liipgpt-chat ${[n(`lang`,e.lang.value),n(`force-theme`,e?.[`force-theme`]?.value),n(`api-url`,e[`api-url`].value),n(`loader-background`,e[`loader-background`].value),n(`loader-color`,e[`loader-color`].value),n(`flyout`,e.flyout.value),n(`flyout-style`,e[`flyout-style`].value),n(`flyout-class`,e[`flyout-class`].value),n(`chat-class`,e[`chat-class`].value)].filter(Boolean).join(` `)}>${e[`custom-loader`].value?`<div slot="loader">${e[`custom-loader`].value}</div>`:``}</liipgpt-chat>`;if(t){let t=`<script async src="${r(e,`chat`)}"><\/script>\n${a}`;return e.CHAT_CONFIG_OVERRIDE.value&&(t=`<script>\n${e.CHAT_CONFIG_OVERRIDE.value}<\/script>\n`+t),e.onclosechat.value&&(t+=`\n<script>${e.onclosechat.value}<\/script>`),t}return a};export{r as n,a as t};
1
+ import{n as e}from"./CigDOVQy.js";var t=e=>e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`'`).replace(/\n/g,`&#10;`),n=(e,n)=>{if(n!==void 0){if(typeof n==`string`)return`${e}="${t(n)}"`;if(typeof n==`boolean`)return n?e:void 0}},r=(t,n)=>t.cdn.value?`https://cdn.jsdelivr.net/npm/@liip/liipgpt@${e}/${n}/liipgpt-${n}.iife.min.js`:`${t[`api-url`].value}/cdn/npm/@liip/liipgpt/${n}/liipgpt-${n}.iife.min.js`,i=(e,t)=>{let i=`<liipgpt-button ${[n(`lang`,e.lang.value),n(`force-theme`,e?.[`force-theme`]?.value),n(`api-url`,e[`api-url`].value)].filter(Boolean).join(` `)}</liipgpt-button>`;if(t){let t=`<script async src="${r(e,`button`)}"><\/script>\n${i}`;return e.CHAT_CONFIG_OVERRIDE.value&&(t=`<script>\n${e.CHAT_CONFIG_OVERRIDE.value}<\/script>\n`+t),e.onclosechat.value&&(t+=`\n<script>${e.onclosechat.value}<\/script>`),t}return i},a=(e,t=!1)=>{if(e[`show-link-button`].value)return i(e,t);let a=`<liipgpt-chat ${[n(`lang`,e.lang.value),n(`force-theme`,e?.[`force-theme`]?.value),n(`api-url`,e[`api-url`].value),n(`loader-background`,e[`loader-background`].value),n(`loader-color`,e[`loader-color`].value),n(`flyout`,e.flyout.value),n(`flyout-style`,e[`flyout-style`].value),n(`flyout-class`,e[`flyout-class`].value),n(`chat-class`,e[`chat-class`].value)].filter(Boolean).join(` `)}>${e[`custom-loader`].value?`<div slot="loader">${e[`custom-loader`].value}</div>`:``}</liipgpt-chat>`;if(t){let t=`<script async src="${r(e,`chat`)}"><\/script>\n${a}`;return e.CHAT_CONFIG_OVERRIDE.value&&(t=`<script>\n${e.CHAT_CONFIG_OVERRIDE.value}<\/script>\n`+t),e.onclosechat.value&&(t+=`\n<script>${e.onclosechat.value}<\/script>`),t}return a};export{r as n,a as t};
@@ -0,0 +1 @@
1
+ import{Ct as e,at as t,it as n,kt as r,r as i,rt as a,t as o,xt as s}from"./BdP-K7KO.js";var c=class{constructor(e,t){this.status=e,typeof t==`string`?this.body={message:t}:t?this.body=t:this.body={message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}},l=class{constructor(e,t){this.status=e,this.location=t}},u=class extends Error{constructor(e,t,n){super(n),this.status=e,this.text=t}};new URL(`sveltekit-internal://`);function d(e,t){return e===`/`||t===`ignore`?e:t===`never`?e.endsWith(`/`)?e.slice(0,-1):e:t===`always`&&!e.endsWith(`/`)?e+`/`:e}function f(e){return e.split(`%25`).map(decodeURI).join(`%25`)}function p(e){for(let t in e)e[t]=decodeURIComponent(e[t]);return e}function m({href:e}){return e.split(`#`)[0]}function h(e,t,n,r=!1){let i=new URL(e);Object.defineProperty(i,`searchParams`,{value:new Proxy(i.searchParams,{get(e,r){if(r===`get`||r===`getAll`||r===`has`)return(t,...i)=>(n(t),e[r](t,...i));t();let i=Reflect.get(e,r);return typeof i==`function`?i.bind(e):i}}),enumerable:!0,configurable:!0});let a=[`href`,`pathname`,`search`,`toString`,`toJSON`];r&&a.push(`hash`);for(let n of a)Object.defineProperty(i,n,{get(){return t(),e[n]},enumerable:!0,configurable:!0});return i}function g(...e){let t=5381;for(let n of e)if(typeof n==`string`){let e=n.length;for(;e;)t=t*33^n.charCodeAt(--e)}else if(ArrayBuffer.isView(n)){let e=new Uint8Array(n.buffer,n.byteOffset,n.byteLength),r=e.length;for(;r;)t=t*33^e[--r]}else throw TypeError(`value must be a string or TypedArray`);return(t>>>0).toString(36)}new TextEncoder,new TextDecoder;function _(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}var ee=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||`GET`)!==`GET`&&v.delete(b(e)),ee(e,t));var v=new Map;function y(e,t){let n=b(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:e,...t}=JSON.parse(r.textContent),i=r.getAttribute(`data-ttl`);return i&&v.set(n,{body:e,init:t,ttl:1e3*Number(i)}),r.getAttribute(`data-b64`)!==null&&(e=_(e)),Promise.resolve(new Response(e,t))}return window.fetch(e,t)}function te(e,t,n){if(v.size>0){let t=b(e,n),r=v.get(t);if(r){if(performance.now()<r.ttl&&[`default`,`force-cache`,`only-if-cached`,void 0].includes(n?.cache))return new Response(r.body,r.init);v.delete(t)}}return window.fetch(t,n)}function b(e,t){let n=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){let e=[];t.headers&&e.push([...new Headers(t.headers)].join(`,`)),t.body&&(typeof t.body==`string`||ArrayBuffer.isView(t.body))&&e.push(t.body),n+=`[data-hash="${g(...e)}"]`}return n}var ne=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function re(e){let t=[];return{pattern:e===`/`?/^\/$/:RegExp(`^${ae(e).map(e=>{let n=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(e);if(n)return t.push({name:n[1],matcher:n[2],optional:!1,rest:!0,chained:!0}),`(?:/([^]*))?`;let r=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(e);if(r)return t.push({name:r[1],matcher:r[2],optional:!0,rest:!1,chained:!0}),`(?:/([^/]+))?`;if(!e)return;let i=e.split(/\[(.+?)\](?!\])/);return`/`+i.map((e,n)=>{if(n%2){if(e.startsWith(`x+`))return se(String.fromCharCode(parseInt(e.slice(2),16)));if(e.startsWith(`u+`))return se(String.fromCharCode(...e.slice(2).split(`-`).map(e=>parseInt(e,16))));let[,r,a,o,s]=ne.exec(e);return t.push({name:o,matcher:s,optional:!!r,rest:!!a,chained:a?n===1&&i[0]===``:!1}),a?`([^]*?)`:r?`([^/]*)?`:`([^/]+?)`}return se(e)}).join(``)}).join(``)}/?$`),params:t}}function ie(e){return e!==``&&!/^\([^)]+\)$/.test(e)}function ae(e){return e.slice(1).split(`/`).filter(ie)}function oe(e,t,n){let r={},i=e.slice(1),a=i.filter(e=>e!==void 0),o=0;for(let e=0;e<t.length;e+=1){let s=t[e],c=i[e-o];if(s.chained&&s.rest&&o&&(c=i.slice(e-o,e+1).filter(e=>e).join(`/`),o=0),c===void 0)if(s.rest)c=``;else continue;if(!s.matcher||n[s.matcher](c)){r[s.name]=c;let n=t[e+1],l=i[e+1];n&&!n.rest&&n.optional&&l&&s.chained&&(o=0),!n&&!l&&Object.keys(r).length===a.length&&(o=0);continue}if(s.optional&&s.chained){o++;continue}return}if(!o)return r}function se(e){return e.normalize().replace(/[[\]]/g,`\\$&`).replace(/%/g,`%25`).replace(/\//g,`%2[Ff]`).replace(/\?/g,`%3[Ff]`).replace(/#/g,`%23`).replace(/[.*+?^${}()|\\]/g,`\\$&`)}function ce({nodes:e,server_loads:t,dictionary:n,matchers:r}){let i=new Set(t);return Object.entries(n).map(([t,[n,i,s]])=>{let{pattern:c,params:l}=re(t),u={id:t,exec:e=>{let t=c.exec(e);if(t)return oe(t,l,r)},errors:[1,...s||[]].map(t=>e[t]),layouts:[0,...i||[]].map(o),leaf:a(n)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function a(t){let n=t<0;return n&&(t=~t),[n,e[t]]}function o(t){return t===void 0?t:[i.has(t),e[t]]}}function le(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function ue(e,t,n=JSON.stringify){let r=n(t);try{sessionStorage[e]=r}catch{}}var x=globalThis.__sveltekit_1u8g3kn?.base??`/configurator`,de=globalThis.__sveltekit_1u8g3kn?.assets??x??``,fe=`1777282246927`,pe=`sveltekit:snapshot`,me=`sveltekit:scroll`,he=`sveltekit:states`,S=`sveltekit:history`,C=`sveltekit:navigation`,w={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},ge=location.origin;function _e(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){let e=document.getElementsByTagName(`base`);t=e.length?e[0].href:document.URL}return new URL(e,t)}function T(){return{x:pageXOffset,y:pageYOffset}}function E(e,t){return e.getAttribute(`data-sveltekit-${t}`)}var ve={...w,"":w.hover};function ye(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function be(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()===`A`&&e.hasAttribute(`href`))return e;e=ye(e)}}function xe(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){let e=location.hash.split(`#`)[1]||`/`;r.hash=`#${e}${r.hash}`}}catch{}let i=e instanceof SVGAElement?e.target.baseVal:e.target,a=!r||!!i||O(r,t,n)||(e.getAttribute(`rel`)||``).split(/\s+/).includes(`external`),o=r?.origin===ge&&e.hasAttribute(`download`);return{url:r,external:a,target:i,download:o}}function D(e){let t=null,n=null,r=null,i=null,a=null,o=null,s=e;for(;s&&s!==document.documentElement;)r===null&&(r=E(s,`preload-code`)),i===null&&(i=E(s,`preload-data`)),t===null&&(t=E(s,`keepfocus`)),n===null&&(n=E(s,`noscroll`)),a===null&&(a=E(s,`reload`)),o===null&&(o=E(s,`replacestate`)),s=ye(s);function c(e){switch(e){case``:case`true`:return!0;case`off`:case`false`:return!1;default:return}}return{preload_code:ve[r??`off`],preload_data:ve[i??`off`],keepfocus:c(t),noscroll:c(n),reload:c(a),replace_state:c(o)}}function Se(e){let t=r(e),n=!0;function i(){n=!0,t.update(e=>e)}function a(e){n=!1,t.set(e)}function o(e){let r;return t.subscribe(t=>{(r===void 0||n&&t!==r)&&e(r=t)})}return{notify:i,set:a,subscribe:o}}var Ce={v:()=>{}};function we(){let{set:e,subscribe:t}=r(!1);async function n(){clearTimeout(void 0);try{let t=await fetch(`${de}/_app/version.json`,{headers:{pragma:`no-cache`,"cache-control":`no-cache`}});if(!t.ok)return!1;let n=(await t.json()).version!==fe;return n&&(e(!0),Ce.v(),clearTimeout(void 0)),n}catch{return!1}}return{subscribe:t,check:n}}function O(e,t,n){return e.origin!==ge||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function Te(e){}var Ee=new Set([`load`,`prerender`,`csr`,`ssr`,`trailingSlash`,`config`]);new Set([...Ee,`entries`]);var De=new Set([...Ee]);new Set([...De,`actions`,`entries`]);function Oe(e){return e.filter(e=>e!=null)}function ke(e){return e instanceof c||e instanceof u?e.status:500}function Ae(e){return e instanceof u?e.text:`Internal Error`}var k,A,j,je=i.toString().includes(`$$`)||/function \w+\(\) \{\}/.test(i.toString()),Me=`a:`;je?(k={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(Me)},A={current:null},j={current:!1}):(k=new class{#e=e({});get data(){return a(this.#e)}set data(e){s(this.#e,e)}#t=e(null);get form(){return a(this.#t)}set form(e){s(this.#t,e)}#n=e(null);get error(){return a(this.#n)}set error(e){s(this.#n,e)}#r=e({});get params(){return a(this.#r)}set params(e){s(this.#r,e)}#i=e({id:null});get route(){return a(this.#i)}set route(e){s(this.#i,e)}#a=e({});get state(){return a(this.#a)}set state(e){s(this.#a,e)}#o=e(-1);get status(){return a(this.#o)}set status(e){s(this.#o,e)}#s=e(new URL(Me));get url(){return a(this.#s)}set url(e){s(this.#s,e)}},A=new class{#e=e(null);get current(){return a(this.#e)}set current(e){s(this.#e,e)}},j=new class{#e=e(!1);get current(){return a(this.#e)}set current(e){s(this.#e,e)}},Ce.v=()=>j.current=!0);function Ne(e){Object.assign(k,e)}var Pe={spanContext(){return Fe},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},Fe={traceId:``,spanId:``,traceFlags:0},{onMount:Ie,tick:Le}=o,Re=new Set([`icon`,`shortcut icon`,`apple-touch-icon`]),M=null,N=le(`sveltekit:scroll`)??{},P=le(`sveltekit:snapshot`)??{},F={url:Se({}),page:Se({}),navigating:r(null),updated:we()};function ze(e){N[e]=T()}function Be(e,t){let n=e+1;for(;N[n];)delete N[n],n+=1;for(n=t+1;P[n];)delete P[n],n+=1}function I(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function Ve(){if(`serviceWorker`in navigator){let e=await navigator.serviceWorker.getRegistration(x||`/`);e&&await e.update()}}function He(){}var Ue,We,L,R,Ge,z,B=[],V=[],H=null;function Ke(){H?.fork?.then(e=>e?.discard()),H=null}var U=new Map,qe=new Set,Je=new Set,W=new Set,G={branch:[],error:null,url:null,nav:null},Ye=!1,K=!1,Xe=!0,q=!1,J=!1,Ze=!1,Qe=!1,$e,Y,X,Z,et=new Set,tt=new Map;async function nt(e,t,n){globalThis.__sveltekit_1u8g3kn?.data&&globalThis.__sveltekit_1u8g3kn.data,document.URL!==location.href&&(location.href=location.href),z=e,await e.hooks.init?.(),Ue=ce(e),R=document.documentElement,Ge=t,We=e.nodes[0],L=e.nodes[1],We(),L(),Y=history.state?.[S],X=history.state?.[C],Y||(Y=X=Date.now(),history.replaceState({...history.state,[S]:Y,[C]:X},``));let r=N[Y];function i(){r&&(history.scrollRestoration=`manual`,scrollTo(r.x,r.y))}n?(i(),await jt(Ge,n)):(await Q({type:`enter`,url:_e(z.hash?Lt(new URL(location.href)):location.href),replace_state:!0}),i()),At()}function rt(){B.length=0,Qe=!1}function it(e){V.some(e=>e?.snapshot)&&(P[e]=V.map(e=>e?.snapshot?.capture()))}function at(e){P[e]?.forEach((e,t)=>{V[t]?.snapshot?.restore(e)})}function ot(){ze(Y),ue(me,N),it(X),ue(pe,P)}async function st(e,n,r,i){let a;n.invalidateAll&&Ke(),await Q({type:`goto`,url:_e(e),keepfocus:n.keepFocus,noscroll:n.noScroll,replace_state:n.replaceState,state:n.state,redirect_count:r,nav_token:i,accept:()=>{n.invalidateAll&&(Qe=!0,a=[...tt.keys()]),n.invalidate&&n.invalidate.forEach(kt)}}),n.invalidateAll&&t().then(t).then(()=>{tt.forEach(({resource:e},t)=>{a?.includes(t)&&e.refresh?.()})})}async function ct(e){if(e.id!==H?.id){Ke();let t={};et.add(t),H={id:e.id,token:t,promise:vt({...e,preload:t}).then(e=>(et.delete(t),e.type===`loaded`&&e.state.error&&Ke(),e)),fork:null}}return H.promise}async function lt(e){let t=(await St(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(e=>e[1]()))}async function ut(e,t,n){let r={params:G.params,route:{id:G.route?.id??null},url:new URL(location.href)};G={...e.state,nav:r};let i=document.querySelector(`style[data-sveltekit]`);if(i&&i.remove(),Object.assign(k,e.props.page),$e=new z.root({target:t,props:{...e.props,stores:F,components:V},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),at(X),n){let e={from:null,to:{...r,scroll:N[Y]??T()},willUnload:!1,type:`enter`,complete:Promise.resolve()};W.forEach(t=>t(e))}K=!0}async function dt({url:e,params:t,branch:n,errors:r,status:i,error:a,route:o,form:s}){let c=`never`;if(x&&(e.pathname===x||e.pathname===x+`/`))c=`always`;else for(let e of n)e?.slash!==void 0&&(c=e.slash);e.pathname=d(e.pathname,c),e.search=e.search;let l={type:`loaded`,state:{url:e,params:t,branch:n,error:a,route:o},props:{constructors:Oe(n).map(e=>e.node.component),page:It(k)}};s!==void 0&&(l.props.form=s);let u={},f=!k,p=0;for(let e=0;e<Math.max(n.length,G.branch.length);e+=1){let t=n[e],r=G.branch[e];t?.data!==r?.data&&(f=!0),t&&(u={...u,...t.data},f&&(l.props[`data_${p}`]=u),p+=1)}return(!G.url||e.href!==G.url.href||G.error!==a||s!==void 0&&s!==k.form||f)&&(l.props.page={error:a,params:t,route:{id:o?.id??null},state:{},status:i,url:new URL(e),form:s??null,data:f?u:k.data}),l}async function ft({loader:e,parent:t,url:n,params:r,route:i,server_data_node:a}){let o=null,s=!0,c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await e();if(l.universal?.load){function e(...e){for(let t of e){let{href:e}=new URL(t,n);c.dependencies.add(e)}}let u={tracing:{enabled:!1,root:Pe,current:Pe},route:new Proxy(i,{get:(e,t)=>(s&&(c.route=!0),e[t])}),params:new Proxy(r,{get:(e,t)=>(s&&c.params.add(t),e[t])}),data:a?.data??null,url:h(n,()=>{s&&(c.url=!0)},e=>{s&&c.search_params.add(e)},z.hash),async fetch(t,r){t instanceof Request&&(r={body:t.method===`GET`||t.method===`HEAD`?void 0:await t.blob(),cache:t.cache,credentials:t.credentials,headers:[...t.headers].length>0?t?.headers:void 0,integrity:t.integrity,keepalive:t.keepalive,method:t.method,mode:t.mode,redirect:t.redirect,referrer:t.referrer,referrerPolicy:t.referrerPolicy,signal:t.signal,...r});let{resolved:i,promise:a}=pt(t,r,n);return s&&e(i.href),a},setHeaders:()=>{},depends:e,parent(){return s&&(c.parent=!0),t()},untrack(e){s=!1;try{return e()}finally{s=!0}}};o=await l.universal.load.call(null,u)??null}return{node:l,loader:e,server:a,universal:l.universal?.load?{type:`data`,data:o,uses:c}:null,data:o??a?.data??null,slash:l.universal?.trailingSlash??a?.slash}}function pt(e,t,n){let r=e instanceof Request?e.url:e,i=new URL(r,n);return i.origin===n.origin&&(r=i.href.slice(n.origin.length)),{resolved:i,promise:K?te(r,i.href,t):y(r,t)}}function mt(e,t,n,r,i,a){if(Qe)return!0;if(!i)return!1;if(i.parent&&e||i.route&&t||i.url&&n)return!0;for(let e of i.search_params)if(r.has(e))return!0;for(let e of i.params)if(a[e]!==G.params[e])return!0;for(let e of i.dependencies)if(B.some(t=>t(new URL(e))))return!0;return!1}function ht(e,t){return e?.type===`data`?e:e?.type===`skip`?t??null:null}function gt(e,t){if(!e)return new Set(t.searchParams.keys());let n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(let r of n){let i=e.searchParams.getAll(r),a=t.searchParams.getAll(r);i.every(e=>a.includes(e))&&a.every(e=>i.includes(e))&&n.delete(r)}return n}function _t({error:e,url:t,route:n,params:r}){return{type:`loaded`,state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:It(k),constructors:[]}}}async function vt({id:e,invalidating:t,url:n,params:r,route:i,preload:a}){if(H?.id===e)return et.delete(H.token),H.promise;let{errors:o,layouts:s,leaf:u}=i,d=[...s,u];o.forEach(e=>e?.().catch(()=>{})),d.forEach(e=>e?.[1]().catch(()=>{}));let f=G.url?e!==wt(G.url):!1,p=G.route?i.id!==G.route.id:!1,m=gt(G.url,n),h=!1,g=d.map(async(e,t)=>{if(!e)return;let a=G.branch[t];return e[1]===a?.loader&&!mt(h,p,f,m,a.universal?.uses,r)?a:(h=!0,ft({loader:e[1],url:n,params:r,route:i,parent:async()=>{let e={};for(let n=0;n<t;n+=1)Object.assign(e,(await g[n])?.data);return e},server_data_node:ht(e[0]?{type:`skip`}:null,e[0]?a?.server:void 0)}))});for(let e of g)e.catch(()=>{});let _=[];for(let e=0;e<d.length;e+=1)if(d[e])try{_.push(await g[e])}catch(t){if(t instanceof l)return{type:`redirect`,location:t.location};if(et.has(a))return _t({error:await $(t,{params:r,url:n,route:{id:i.id}}),url:n,params:r,route:i});let s=ke(t),u;if((void 0)?.includes(t))s=t.status??s,u=t.error;else if(t instanceof c)u=t.body;else{if(await F.updated.check())return await Ve(),await I(n);u=await $(t,{params:r,url:n,route:{id:i.id}})}let d=await yt(e,_,o);return d?dt({url:n,params:r,branch:_.slice(0,d.idx).concat(d.node),errors:o,status:s,error:u,route:i}):await Et(n,{id:i.id},u,s)}else _.push(void 0);return dt({url:n,params:r,branch:_,errors:o,status:200,error:null,route:i,form:t?void 0:null})}async function yt(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)--r;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function bt({status:e,error:t,url:n,route:r}){let i={};try{return dt({url:n,params:i,branch:[await ft({loader:We,url:n,params:i,route:r,parent:()=>Promise.resolve({}),server_data_node:ht(null)}),{node:await L(),loader:L,universal:null,server:null,data:null}],status:e,error:t,errors:[],route:null})}catch(e){if(e instanceof l)return st(new URL(e.location,location.href),{},0);throw e}}async function xt(e){let t=e.href;if(U.has(t))return U.get(t);let n;try{let r=(async()=>{let t=await z.hooks.reroute({url:new URL(e),fetch:async(t,n)=>pt(t,n,e).promise})??e;if(typeof t==`string`){let n=new URL(e);z.hash?n.hash=t:n.pathname=t,t=n}return t})();U.set(t,r),n=await r}catch{U.delete(t);return}return n}async function St(e,t){if(e&&!O(e,x,z.hash)){let n=await xt(e);if(!n)return;let r=Ct(n);for(let n of Ue){let i=n.exec(r);if(i)return{id:wt(e),invalidating:t,route:n,params:p(i),url:e}}}}function Ct(e){return f(z.hash?e.hash.replace(/^#/,``).replace(/[?#].+/,``):e.pathname.slice(x.length))||`/`}function wt(e){return(z.hash?e.hash.replace(/^#/,``):e.pathname)+e.search}function Tt({url:e,type:t,intent:n,delta:r,event:i,scroll:a}){let o=!1,s=Ft(G,n,e,t,a??null);r!==void 0&&(s.navigation.delta=r),i!==void 0&&(s.navigation.event=i);let c={...s.navigation,cancel:()=>{o=!0,s.reject(Error(`navigation cancelled`))}};return q||qe.forEach(e=>e(c)),o?null:s}async function Q({type:e,url:r,popped:i,keepfocus:a,noscroll:o,replace_state:s,state:c={},redirect_count:l=0,nav_token:d={},accept:f=He,block:p=He,event:m}){let h=Z;Z=d;let g=await St(r,!1),_=e===`enter`?Ft(G,g,r,e):Tt({url:r,type:e,delta:i?.delta,intent:g,scroll:i?.scroll,event:m});if(!_){p(),Z===d&&(Z=h);return}let ee=Y,v=X;f(),q=!0,K&&_.navigation.type!==`enter`&&F.navigating.set(A.current=_.navigation);let y=g&&await vt(g);if(!y){if(O(r,x,z.hash))return await I(r,s);y=await Et(r,{id:null},await $(new u(404,`Not Found`,`Not found: ${r.pathname}`),{url:r,params:{},route:{id:null}}),404,s)}if(r=g?.url||r,Z!==d)return _.reject(Error(`navigation aborted`)),!1;if(y.type===`redirect`){if(l<20){await Q({type:e,url:new URL(y.location,r),popped:i,keepfocus:a,noscroll:o,replace_state:s,state:c,redirect_count:l+1,nav_token:d}),_.fulfil(void 0);return}y=await bt({status:500,error:await $(Error(`Redirect loop`),{url:r,params:{},route:{id:null}}),url:r,route:{id:null}})}else y.props.page.status>=400&&await F.updated.check()&&(await Ve(),await I(r,s));if(rt(),ze(ee),it(v),y.props.page.url.pathname!==r.pathname&&(r.pathname=y.props.page.url.pathname),c=i?i.state:c,!i){let e=s?0:1,t={[S]:Y+=e,[C]:X+=e,[he]:c};(s?history.replaceState:history.pushState).call(history,t,``,r),s||Be(Y,X)}let te=g&&H?.id===g.id?H.fork:null;H=null,y.props.page.state=c;let b;if(K){let e=(await Promise.all(Array.from(Je,e=>e(_.navigation)))).filter(e=>typeof e==`function`);if(e.length>0){function t(){e.forEach(e=>{W.delete(e)})}e.push(t),e.forEach(e=>{W.add(e)})}let t=_.navigation.to;G={...y.state,nav:{params:t.params,route:t.route,url:t.url}},y.props.page&&(y.props.page.url=r);let i=te&&await te;i?b=i.commit():(M=null,$e.$set(y.props),M&&Object.assign(y.props.page,M),Ne(y.props.page),b=n?.()),Ze=!0}else await ut(y,Ge,!1);let{activeElement:ne}=document;await b,await t(),await t();let re=null;if(Xe){let e=i?i.scroll:o?T():null;e?scrollTo(e.x,e.y):(re=r.hash&&document.getElementById(Rt(r)))?re.scrollIntoView():scrollTo(0,0)}let ie=document.activeElement!==ne&&document.activeElement!==document.body;!a&&!ie&&Pt(r,!re),Xe=!0,y.props.page&&(M&&Object.assign(y.props.page,M),Object.assign(k,y.props.page)),q=!1,e===`popstate`&&at(X),_.fulfil(void 0),_.navigation.to&&(_.navigation.to.scroll=T()),W.forEach(e=>e(_.navigation)),F.navigating.set(A.current=null)}async function Et(e,t,n,r,i){return e.origin===ge&&e.pathname===location.pathname&&!Ye?await bt({status:r,error:n,url:e,route:t}):await I(e,i)}function Dt(){let e,t={element:void 0,href:void 0},n;R.addEventListener(`mousemove`,t=>{let n=t.target;clearTimeout(e),e=setTimeout(()=>{a(n,w.hover)},20)});function r(e){e.defaultPrevented||a(e.composedPath()[0],w.tap)}R.addEventListener(`mousedown`,r),R.addEventListener(`touchstart`,r,{passive:!0});let i=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&(lt(new URL(t.target.href)),i.unobserve(t.target))},{threshold:0});async function a(e,r){let i=be(e,R),a=i===t.element&&i?.href===t.href&&r>=n;if(!i||a)return;let{url:o,external:s,download:c}=xe(i,x,z.hash);if(s||c)return;let l=D(i),u=o&&wt(G.url)===wt(o);if(!(l.reload||u))if(r<=l.preload_data){t={element:i,href:i.href},n=w.tap;let e=await St(o,!1);if(!e)return;ct(e)}else r<=l.preload_code&&(t={element:i,href:i.href},n=r,lt(o))}function o(){i.disconnect();for(let e of R.querySelectorAll(`a`)){let{url:t,external:n,download:r}=xe(e,x,z.hash);if(n||r)continue;let a=D(e);a.reload||(a.preload_code===w.viewport&&i.observe(e),a.preload_code===w.eager&&lt(t))}}W.add(o),o()}function $(e,t){if(e instanceof c)return e.body;let n=ke(e),r=Ae(e);return z.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Ot(e,t={}){return e=new URL(_e(e)),e.origin===ge?st(e,t,0):Promise.reject(Error(`goto: invalid URL`))}function kt(e){if(typeof e==`function`)B.push(e);else{let{href:t}=new URL(e,location.href);B.push(e=>e.href===t)}}function At(){history.scrollRestoration=`manual`,addEventListener(`beforeunload`,e=>{let t=!1;if(ot(),!q){let e=Ft(G,void 0,null,`leave`),n={...e.navigation,cancel:()=>{t=!0,e.reject(Error(`navigation cancelled`))}};qe.forEach(e=>e(n))}t?(e.preventDefault(),e.returnValue=``):history.scrollRestoration=`auto`}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&ot()}),navigator.connection?.saveData||Dt(),R.addEventListener(`click`,async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;let n=be(t.composedPath()[0],R);if(!n)return;let{url:r,external:i,target:a,download:o}=xe(n,x,z.hash);if(!r)return;if(a===`_parent`||a===`_top`){if(window.parent!==window)return}else if(a&&a!==`_self`)return;let s=D(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol===`https:`||r.protocol===`http:`)||o)return;let[c,l]=(z.hash?r.hash.replace(/^#/,``):r.href).split(`#`),u=c===m(location);if(i||s.reload&&(!u||!l)){Tt({url:r,type:`link`,event:t})?q=!0:t.preventDefault();return}if(l!==void 0&&u){let[,i]=G.url.href.split(`#`);if(i===l){if(t.preventDefault(),l===``||l===`top`&&n.ownerDocument.getElementById(`top`)===null)scrollTo({top:0});else{let e=n.ownerDocument.getElementById(decodeURIComponent(l));e&&(e.scrollIntoView(),e.focus())}return}if(J=!0,ze(Y),e(r),!s.replace_state)return;J=!1}t.preventDefault(),await new Promise(e=>{requestAnimationFrame(()=>{setTimeout(e,0)}),setTimeout(e,100)}),await Q({type:`link`,url:r,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??r.href===location.href,event:t})}),R.addEventListener(`submit`,e=>{if(e.defaultPrevented)return;let t=HTMLFormElement.prototype.cloneNode.call(e.target),n=e.submitter;if((n?.formTarget||t.target)===`_blank`||(n?.formMethod||t.method)!==`get`)return;let r=new URL(n?.hasAttribute(`formaction`)&&n?.formAction||t.action);if(O(r,x,!1))return;let i=e.target,a=D(i);if(a.reload)return;e.preventDefault(),e.stopPropagation();let o=new FormData(i,n);r.search=new URLSearchParams(o).toString(),Q({type:`form`,url:r,keepfocus:a.keepfocus,noscroll:a.noscroll,replace_state:a.replace_state??r.href===location.href,event:e})}),addEventListener(`popstate`,async t=>{if(!Nt)if(t.state?.[`sveltekit:history`]){let n=t.state[S];if(Z={},n===Y)return;let r=N[n],i=t.state[`sveltekit:states`]??{},a=new URL(t.state[`sveltekit:pageurl`]??location.href),o=t.state[C],s=G.url?m(location)===m(G.url):!1;if(o===X&&(Ze||s)){i!==k.state&&(k.state=i),e(a),N[Y]=T(),r&&scrollTo(r.x,r.y),Y=n;return}let c=n-Y;await Q({type:`popstate`,url:a,popped:{state:i,scroll:r,delta:c},accept:()=>{Y=n,X=o},block:()=>{history.go(-c)},nav_token:Z,event:t})}else J||(e(new URL(location.href)),z.hash&&location.reload())}),addEventListener(`hashchange`,()=>{J&&(J=!1,history.replaceState({...history.state,[S]:++Y,[C]:X},``,location.href))});for(let e of document.querySelectorAll(`link`))Re.has(e.rel)&&(e.href=e.href);addEventListener(`pageshow`,e=>{e.persisted&&F.navigating.set(A.current=null)});function e(e){G.url=k.url=e,F.page.set(It(k)),F.page.notify()}}async function jt(e,{status:t=200,error:n,node_ids:r,params:i,route:a,server_route:o,data:s,form:c}){Ye=!0;let u=new URL(location.href),d;({params:i={},route:a={id:null}}=await St(u,!1)||{}),d=Ue.find(({id:e})=>e===a.id);let f,p=!0;try{let e=r.map(async(t,n)=>{let r=s[n];return r?.uses&&(r.uses=Mt(r.uses)),ft({loader:z.nodes[t],url:u,params:i,route:a,parent:async()=>{let t={};for(let r=0;r<n;r+=1)Object.assign(t,(await e[r]).data);return t},server_data_node:ht(r)})}),o=await Promise.all(e);if(d){let e=d.layouts;for(let t=0;t<e.length;t++)e[t]||o.splice(t,0,void 0)}f=await dt({url:u,params:i,branch:o,status:t,error:n,errors:d?.errors,form:c,route:d??null})}catch(t){if(t instanceof l){await I(new URL(t.location,location.href));return}f=await bt({status:ke(t),error:await $(t,{url:u,params:i,route:a}),url:u,route:a}),e.textContent=``,p=!1}f.props.page&&(f.props.page.state={}),await ut(f,e,p)}function Mt(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}var Nt=!1;function Pt(e,t=!0){let n=document.querySelector(`[autofocus]`);if(n)n.focus();else{let n=Rt(e);if(n&&document.getElementById(n)){let{x:r,y:i}=T();setTimeout(()=>{let a=history.state;Nt=!0,location.replace(new URL(`#${n}`,location.href)),history.replaceState(a,``,e),t&&scrollTo(r,i),Nt=!1})}else{let e=document.body,t=e.getAttribute(`tabindex`);e.tabIndex=-1,e.focus({preventScroll:!0,focusVisible:!1}),t===null?e.removeAttribute(`tabindex`):e.setAttribute(`tabindex`,t)}let r=getSelection();if(r&&r.type!==`None`){let e=[];for(let t=0;t<r.rangeCount;t+=1)e.push(r.getRangeAt(t));setTimeout(()=>{if(r.rangeCount===e.length){for(let t=0;t<r.rangeCount;t+=1){let n=e[t],i=r.getRangeAt(t);if(n.commonAncestorContainer!==i.commonAncestorContainer||n.startContainer!==i.startContainer||n.endContainer!==i.endContainer||n.startOffset!==i.startOffset||n.endOffset!==i.endOffset)return}r.removeAllRanges()}})}}}function Ft(e,t,n,r,i=null){let a,o,s=new Promise((e,t)=>{a=e,o=t});return s.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:T()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:i},willUnload:!t,type:r,complete:s},fulfil:a,reject:o}}function It(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function Lt(e){let t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function Rt(e){let t;if(z.hash){let[,,n]=e.hash.split(`#`,3);t=n??``}else t=e.hash.slice(1);return decodeURIComponent(t)}export{k as a,A as i,nt as n,j as o,F as r,Te as s,Ot as t};
@@ -0,0 +1 @@
1
+ var e=`https://liipgpt.api.dev.genai.liip.ch/liipgpt`,t=`3.5.2`;export{t as n,e as t};