@gomusdev/web-components 4.14.3 → 4.14.4

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.
package/README.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.14.4 (2026-08-04)
4
+
5
+ ### Bug Fixes
6
+
7
+ * **order:** clear cart coupons after a completed order
8
+
3
9
  ## 4.14.3 (2026-08-04)
4
10
 
5
11
  ### Bug Fixes
@@ -36565,6 +36565,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
36565
36565
  cleanedUpToken = token();
36566
36566
  untrack(() => {
36567
36567
  cart.clearItems();
36568
+ cart.clearCoupons();
36568
36569
  if (shop.auth.isGuest()) shop.auth.signOut();
36569
36570
  });
36570
36571
  });
@@ -36564,6 +36564,7 @@ function Order($$anchor, $$props) {
36564
36564
  cleanedUpToken = token();
36565
36565
  untrack(() => {
36566
36566
  cart.clearItems();
36567
+ cart.clearCoupons();
36567
36568
  if (shop.auth.isGuest()) shop.auth.signOut();
36568
36569
  });
36569
36570
  });
@@ -81,5 +81,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
81
81
  `," ")),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}var Cm={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%)"},_C=Js(Cm),Om=typeof window<"u"?window:void 0,bN=typeof window<"u"?window.document:void 0,_N=typeof window<"u"?window.navigator:void 0,wN=typeof window<"u"?window.location:void 0;function wC(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}var kC=class extends Map{#e=new Map;#t=ae(0);#r=ae(0);#n=nn||-1;constructor(e){if(super(),e){for(var[t,r]of e)super.set(t,r);this.#r.v=super.size}}#i(e){return nn===this.#n?ae(e):Sn(e)}has(e){var t=this.#e,r=t.get(e);if(r===void 0)if(super.has(e))r=this.#i(0),t.set(e,r);else return d(this.#t),!1;return d(r),!0}forEach(e,t){this.#s(),super.forEach(e,t)}get(e){var t=this.#e,r=t.get(e);if(r===void 0)if(super.has(e))r=this.#i(0),t.set(e,r);else{d(this.#t);return}return d(r),super.get(e)}set(e,t){var r=this.#e,n=r.get(e),i=super.get(e),s=super.set(e,t),a=this.#t;if(n===void 0)n=this.#i(0),r.set(e,n),$(this.#r,super.size),Lr(a);else if(i!==t){Lr(n);var o=a.reactions===null?null:new Set(a.reactions);(o===null||!n.reactions?.every(l=>o.has(l)))&&Lr(a)}return s}delete(e){var t=this.#e,r=t.get(e),n=super.delete(e);return r!==void 0&&(t.delete(e),$(r,-1)),n&&($(this.#r,super.size),Lr(this.#t)),n}clear(){if(super.size!==0){super.clear();var e=this.#e;$(this.#r,0);for(var t of e.values())$(t,-1);Lr(this.#t),e.clear()}}#s(){d(this.#t);var e=this.#e;if(this.#r.v!==e.size){for(var t of super.keys())if(!e.has(t)){var r=this.#i(0);e.set(t,r)}}for([,r]of this.#e)d(r)}keys(){return d(this.#t),super.keys()}values(){return this.#s(),super.values()}entries(){return this.#s(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return d(this.#r),super.size}},SC=class{#e;#t;constructor(e={}){const{window:t=Om,document:r=t?.document}=e;t!==void 0&&(this.#e=r,this.#t=wl(n=>{const i=gt(t,"focusin",n),s=gt(t,"focusout",n);return()=>{i(),s()}}))}get current(){return this.#t?.(),this.#e?wC(this.#e):null}},kN=new SC;function EC(e){return typeof e=="function"}var Ft=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return Cb(this.#t)}get(){const e=Cd(this.#t);if(e===void 0)throw new Error(`Context "${this.#e}" not found`);return e}getOr(e){const t=Cd(this.#t);return t===void 0?e:t}set(e){return Ab(this.#t,e)}};function TC(e,t){switch(e){case"post":ve(t);break;case"pre":Ol(t);break}}function Hu(e,t,r,n={}){const{lazy:i=!1}=n;let s=!i,a=Array.isArray(e)?[]:void 0;TC(t,()=>{const o=Array.isArray(e)?e.map(c=>c()):e();if(!s){s=!0,a=o;return}const l=Re(()=>r(o,a));return a=o,l})}function Dm(e,t,r){const n=_s(()=>{let i=!1;Hu(e,t,(s,a)=>{if(i){n();return}const o=r(s,a);return i=!0,o},{lazy:!0})});ve(()=>n)}function it(e,t,r){Hu(e,"post",t,r)}function xC(e,t,r){Hu(e,"pre",t,r)}it.pre=xC;function AC(e,t){Dm(e,"post",t)}function CC(e,t){Dm(e,"pre",t)}AC.pre=CC;function Im(e){return EC(e)?e():e}var OC=class{#e={width:0,height:0};#t=!1;#r;#n;#i;#s=D(()=>(d(this.#a)?.(),this.getSize().width));#o=D(()=>(d(this.#a)?.(),this.getSize().height));#a=D(()=>{const e=Im(this.#n);if(e)return wl(t=>{if(!this.#i)return;const r=new this.#i.ResizeObserver(n=>{this.#t=!0;for(const i of n){const s=this.#r.box==="content-box"?i.contentBoxSize:i.borderBoxSize,a=Array.isArray(s)?s:[s];this.#e.width=a.reduce((o,l)=>Math.max(o,l.inlineSize),0),this.#e.height=a.reduce((o,l)=>Math.max(o,l.blockSize),0)}t()});return r.observe(e),()=>{this.#t=!1,r.disconnect()}})});constructor(e,t={box:"border-box"}){this.#i=t.window??Om,this.#r=t,this.#n=e,this.#e={width:0,height:0}}calculateSize(){const e=Im(this.#n);if(!e||!this.#i)return;const t=e.offsetWidth,r=e.offsetHeight;if(this.#r.box==="border-box")return{width:t,height:r};const n=this.#i.getComputedStyle(e),i=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),s=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),a=parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth),o=parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth);return{width:t-i-a,height:r-s-o}}getSize(){return this.#t?this.#e:this.calculateSize()??this.#e}get current(){return d(this.#a)?.(),this.getSize()}get width(){return d(this.#s)}get height(){return d(this.#o)}};function DC(e,t){let r,n=null;return(...i)=>new Promise(s=>{n&&n(void 0),n=s,clearTimeout(r),r=setTimeout(async()=>{const a=await e(...i);n&&(n(a),n=null)},t)})}function IC(e,t){let r=0,n=null;return(...i)=>{const s=Date.now();return r&&s-r<t?n??Promise.resolve(void 0):(r=s,n=e(...i),n)}}function Pm(e,t,r={},n){const{lazy:i=!1,once:s=!1,initialValue:a,debounce:o,throttle:l}=r;let c=ae(Me(a)),f=ae(!1),u=ae(void 0),p=ae(Me([]));const h=()=>{d(p).forEach(k=>k()),$(p,[],!0)},g=k=>{$(p,[...d(p),k],!0)},v=async(k,T,A=!1)=>{try{$(f,!0),$(u,void 0),h();const O=new AbortController;g(()=>O.abort());const F=await t(k,T,{data:d(c),refetching:A,onCleanup:g,signal:O.signal});return $(c,F,!0),F}catch(O){O instanceof DOMException&&O.name==="AbortError"||$(u,O,!0);return}finally{$(f,!1)}},m=o?DC(v,o):l?IC(v,l):v,y=Array.isArray(e)?e:[e];let E;return n((k,T)=>{s&&E||(E=k,m(Array.isArray(e)?k:k[0],Array.isArray(e)?T:T?.[0]))},{lazy:i}),{get current(){return d(c)},get loading(){return d(f)},get error(){return d(u)},mutate:k=>{$(c,k,!0)},refetch:k=>{const T=y.map(A=>A());return m(Array.isArray(e)?T:T[0],Array.isArray(e)?T:T[0],k??!0)}}}function PC(e,t,r){return Pm(e,t,r,(n,i)=>{const s=Array.isArray(e)?e:[e];it(()=>s.map(o=>o()),(o,l)=>{n(o,l??[])},i)})}function MC(e,t,r){return Pm(e,t,r,(n,i)=>{const s=Array.isArray(e)?e:[e],a=()=>s.map(o=>o());it.pre(a,(o,l)=>{n(o,l??[])},i)})}PC.pre=MC;function ii(e){ve(()=>()=>{e()})}function $C(e,t){return setTimeout(t,e)}function Qs(e){pf().then(e)}var FC=1,NC=9,RC=11;function Gu(e){return Gs(e)&&e.nodeType===FC&&typeof e.nodeName=="string"}function Mm(e){return Gs(e)&&e.nodeType===NC}function LC(e){return Gs(e)&&e.constructor?.name==="VisualViewport"}function zC(e){return Gs(e)&&e.nodeType!==void 0}function $m(e){return zC(e)&&e.nodeType===RC&&"host"in e}function qC(e,t){if(!e||!t||!Gu(e)||!Gu(t))return!1;const r=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(r&&$m(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function yo(e){return Mm(e)?e:LC(e)?e.document:e?.ownerDocument??document}function Fm(e){return $m(e)?Fm(e.host):Mm(e)?e.defaultView??window:Gu(e)?e.ownerDocument?.defaultView??window:window}function UC(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}var Bi=class{element;#e=D(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return d(this.#e)}set root(e){$(this.#e,e)}constructor(e){typeof e=="function"?this.element=z(e):this.element=e}getDocument=()=>yo(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>UC(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 et(e,t){return{[E_()]:r=>wm(e)?(e.current=r,Re(()=>t?.(r)),()=>{"isConnected"in r&&r.isConnected||(e.current=null,t?.(null))}):(e(r),Re(()=>t?.(r)),()=>{"isConnected"in r&&r.isConnected||(e(null),t?.(null))})}}function Tr(e){return e?"true":"false"}function Ku(e){return e?"true":void 0}function Ve(e){return e?"":void 0}function Nm(e){return e?"open":"closed"}function BC(e){return e==="starting"?{"data-starting-style":""}:e==="ending"?{"data-ending-style":""}:{}}var VC=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(t=>[t,this.getAttr(t)]))}getAttr(e,t){return t?`data-${t}-${e}`:`${this.#t}${e}`}selector(e,t){return`[${this.getAttr(e,t)}]`}};function bo(e){const t=new VC(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var Yu="ArrowDown",Rm="ArrowLeft",Lm="ArrowRight",Ju="ArrowUp",jC="Backspace",ZC="Enter",SN="Escape",EN=" ",TN="Tab",xN="a",AN="P",CN="A",ON="p",ln=typeof document<"u",zm=WC();function WC(){return ln&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function xr(e){return e instanceof HTMLElement}function si(e){return e instanceof Element}function HC(e){return e instanceof Element||e instanceof SVGElement}function _o(e){return!Number.isNaN(Number(e))&&!Number.isNaN(Number.parseFloat(e))}function Fn(e){return e===null}function wo(e){return e.pointerType==="touch"}function GC(e){return e!==null}var KC=class{#e;#t=null;#r=null;#n=0;constructor(e){this.#e=e,ii(()=>this.#i())}#i(){this.#t!==null&&(window.cancelAnimationFrame(this.#t),this.#t=null),this.#r?.disconnect(),this.#r=null,this.#n++}run(e){this.#i();const t=this.#e.ref.current;if(!t)return;if(typeof t.getAnimations!="function"){this.#s(e);return}const r=this.#n,n=()=>{r===this.#n&&this.#s(e)},i=()=>{if(r!==this.#n)return;const a=t.getAnimations();if(a.length===0){n();return}Promise.all(a.map(o=>o.finished)).then(()=>{n()}).catch(()=>{if(r===this.#n){if(t.getAnimations().some(o=>o.pending||o.playState!=="finished")){i();return}n()}})},s=()=>{this.#t=window.requestAnimationFrame(()=>{this.#t=null,i()})};if(!this.#e.afterTick.current){s();return}this.#t=window.requestAnimationFrame(()=>{this.#t=null;const a="data-starting-style";if(!t.hasAttribute(a)){s();return}this.#r=new MutationObserver(()=>{r===this.#n&&(t.hasAttribute(a)||(this.#r?.disconnect(),this.#r=null,s()))}),this.#r.observe(t,{attributes:!0,attributeFilter:[a]})})}#s(e){const t=()=>{e()};this.#e.afterTick?Qs(t):t()}},qm=class{#e;#t;#r;#n=ae(!1);#i=ae(void 0);#s=!1;#o=null;constructor(e){this.#e=e,$(this.#n,e.open.current,!0),this.#t=e.enabled??!0,this.#r=new KC({ref:this.#e.ref,afterTick:this.#e.open}),ii(()=>this.#a()),it(()=>this.#e.open.current,t=>{if(!this.#s){this.#s=!0;return}if(this.#a(),!t&&this.#e.shouldSkipExitAnimation?.()){$(this.#n,!1),$(this.#i,void 0),this.#e.onComplete?.();return}if(t&&$(this.#n,!0),$(this.#i,t?"starting":"ending",!0),t&&(this.#o=window.requestAnimationFrame(()=>{this.#o=null,this.#e.open.current&&$(this.#i,void 0)})),!this.#t){t||$(this.#n,!1),$(this.#i,void 0),this.#e.onComplete?.();return}this.#r.run(()=>{t===this.#e.open.current&&(this.#e.open.current||$(this.#n,!1),$(this.#i,void 0),this.#e.onComplete?.())})})}get shouldRender(){return d(this.#n)}get transitionStatus(){return d(this.#i)}#a(){this.#o!==null&&(window.cancelAnimationFrame(this.#o),this.#o=null)}};function Te(){}function Pe(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}var YC=new Ft("BitsConfig");function JC(){const e=new QC(null,{});return YC.getOr(e).opts}var QC=class{opts;constructor(e,t){const r=XC(e,t);this.opts={defaultPortalTo:r(n=>n.defaultPortalTo),defaultLocale:r(n=>n.defaultLocale)}}};function XC(e,t){return r=>z(()=>{const n=r(t)?.current;if(n!==void 0)return n;if(e!==null)return r(e.opts)?.current})}function Um(e,t){return r=>{const n=JC();return z(()=>{const i=r();if(i!==void 0)return i;const s=e(n).current;return s!==void 0?s:t})}}var Bm=Um(e=>e.defaultLocale,"en"),DN=Um(e=>e.defaultPortalTo,"body"),eO=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){const r=this.createEvent(t);return e.dispatchEvent(r),r}listen(e,t,r){const n=i=>{t(i)};return gt(e,this.eventName,n,r)}};function Vm(e,t=500){let r=null;const n=(...i)=>{r!==null&&clearTimeout(r),r=setTimeout(()=>{e(...i)},t)};return n.destroy=()=>{r!==null&&(clearTimeout(r),r=null)},n}function jm(e,t){return e===t||e.contains(t)}function Zm(e){return e?.ownerDocument??document}function tO(e,t){const{clientX:r,clientY:n}=e,i=t.getBoundingClientRect();return r<i.left||r>i.right||n<i.top||n>i.bottom}var Wm=["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] *)"],ko=Wm.join(","),Hm=typeof Element>"u",ai=Hm?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,So=!Hm&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Eo=function(t,r){var n;r===void 0&&(r=!0);var i=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert");return i===""||i==="true"||r&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Eo(t.parentNode))},rO=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},Gm=function(t,r,n){if(Eo(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(ko));return r&&ai.call(t,ko)&&i.unshift(t),i=i.filter(n),i},To=function(t,r,n){for(var i=[],s=Array.from(t);s.length;){var a=s.shift();if(!Eo(a,!1))if(a.tagName==="SLOT"){var o=a.assignedElements(),l=To(o.length?o:a.children,!0,n);n.flatten?i.push.apply(i,l):i.push({scopeParent:a,candidates:l})}else{ai.call(a,ko)&&n.filter(a)&&(r||!t.includes(a))&&i.push(a);var c=a.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(a),f=!Eo(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&f){var u=To(c===!0?a.children:c.children,!0,n);n.flatten?i.push.apply(i,u):i.push({scopeParent:a,candidates:u})}else s.unshift.apply(s,a.children)}}return i},Km=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Ym=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||rO(t))&&!Km(t)?0:t.tabIndex},nO=function(t,r){var n=Ym(t);return n<0&&r&&!Km(t)?0:n},iO=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},Jm=function(t){return t.tagName==="INPUT"},sO=function(t){return Jm(t)&&t.type==="hidden"},aO=function(t){return t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"})},oO=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},lO=function(t){if(!t.name)return!0;var r=t.form||So(t),n=function(o){return r.querySelectorAll('input[type="radio"][name="'+o+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=n(window.CSS.escape(t.name));else try{i=n(t.name)}catch(a){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",a.message),!1}var s=oO(i,t.form);return!s||s===t},uO=function(t){return Jm(t)&&t.type==="radio"},cO=function(t){return uO(t)&&!lO(t)},dO=function(t){var r,n=t&&So(t),i=(r=n)===null||r===void 0?void 0:r.host,s=!1;if(n&&n!==t){var a,o,l;for(s=!!((a=i)!==null&&a!==void 0&&(o=a.ownerDocument)!==null&&o!==void 0&&o.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&i;){var c,f,u;n=So(i),i=(c=n)===null||c===void 0?void 0:c.host,s=!!((f=i)!==null&&f!==void 0&&(u=f.ownerDocument)!==null&&u!==void 0&&u.contains(i))}}return s},Qm=function(t){var r=t.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},fO=function(t,r){var n=r.displayCheck,i=r.getShadowRoot;if(n==="full-native"&&"checkVisibility"in t)return!t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(t).visibility==="hidden")return!0;var s=ai.call(t,"details>summary:first-of-type")?t.parentElement:t;if(ai.call(s,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof i=="function"){for(var a=t;t;){var o=t.parentElement,l=So(t);if(o&&!o.shadowRoot&&i(o)===!0)return Qm(t);t.assignedSlot?t=t.assignedSlot:!o&&l!==t.ownerDocument?t=l.host:t=o}t=a}if(dO(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return Qm(t);return!1},hO=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n<r.children.length;n++){var i=r.children.item(n);if(i.tagName==="LEGEND")return ai.call(r,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}r=r.parentElement}return!1},xo=function(t,r){return!(r.disabled||sO(r)||fO(r,t)||aO(r)||hO(r))},Qu=function(t,r){return!(cO(r)||Ym(r)<0||!xo(t,r))},pO=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},Xm=function(t){var r=[],n=[];return t.forEach(function(i,s){var a=!!i.scopeParent,o=a?i.scopeParent:i,l=nO(o,a),c=a?Xm(i.candidates):o;l===0?a?r.push.apply(r,c):r.push(o):n.push({documentOrder:s,tabIndex:l,item:i,isScope:a,content:c})}),n.sort(iO).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(r)},mO=function(t,r){r=r||{};var n;return r.getShadowRoot?n=To([t],r.includeContainer,{filter:Qu.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:pO}):n=Gm(t,r.includeContainer,Qu.bind(null,r)),Xm(n)},vO=function(t,r){r=r||{};var n;return r.getShadowRoot?n=To([t],r.includeContainer,{filter:xo.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=Gm(t,r.includeContainer,xo.bind(null,r)),n},gO=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return ai.call(t,ko)===!1?!1:Qu(r,t)},yO=Wm.concat("iframe:not([inert]):not([inert] *)").join(","),bO=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return ai.call(t,yO)===!1?!1:xo(r,t)};function _O(e,t){if(t<=0)return[];const r=[];for(let n=0;n<e.length;n+=t)r.push(e.slice(n,n+t));return r}function Xu(e,t){return e>=0&&e<t.length}var wO="data-context-menu-trigger",kO="data-context-menu-content",IN=new Ft("Menu.Root"),PN=new Ft("Menu.Root | Menu.Sub"),MN=new Ft("Menu.Content"),$N=new Ft("Menu.Group | Menu.RadioGroup"),FN=new Ft("Menu.RadioGroup"),NN=new Ft("Menu.CheckboxGroup"),RN=new eO("bitsmenuopen",{bubbles:!1,cancelable:!0}),LN=bo({component:"menu",parts:["trigger","content","sub-trigger","item","group","group-heading","checkbox-group","checkbox-item","radio-group","radio-item","separator","sub-content","arrow"]});globalThis.bitsDismissableLayers??=new Map;var SO=class my{static create(t){return new my(t)}opts;#e;#t;#r={pointerdown:!1};#n=!1;#i=!1;#s=void 0;#o;#a=Te;constructor(t){this.opts=t,this.#t=t.interactOutsideBehavior,this.#e=t.onInteractOutside,this.#o=t.onFocusOutside,ve(()=>{this.#s=Zm(this.opts.ref.current)});let r=Te;const n=()=>{this.#v(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),r()};it([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return $C(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#t),r(),r=this.#u())}),n}),ii(()=>{this.#v.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),this.#a(),r()})}#l=t=>{t.defaultPrevented||this.opts.ref.current&&Qs(()=>{!this.opts.ref.current||this.#m(t.target)||t.target&&!this.#i&&this.#o.current?.(t)})};#u(){return Ys(gt(this.#s,"pointerdown",Ys(this.#h,this.#f),{capture:!0}),gt(this.#s,"pointerdown",Ys(this.#p,this.#d)),gt(this.#s,"focusin",this.#l))}#c=t=>{let r=t;r.defaultPrevented&&(r=ev(t)),this.#e.current(t)};#d=Vm(t=>{if(!this.opts.ref.current){this.#a();return}const r=this.opts.isValidEvent.current(t,this.opts.ref.current)||xO(t,this.opts.ref.current);if(!this.#n||this.#y()||!r){this.#a();return}let n=t;if(n.defaultPrevented&&(n=ev(n)),this.#t.current!=="close"&&this.#t.current!=="defer-otherwise-close"){this.#a();return}t.pointerType==="touch"?(this.#a(),this.#a=gt(this.#s,"click",this.#c,{once:!0})):this.#e.current(n)},10);#h=t=>{this.#r[t.type]=!0};#p=t=>{this.#r[t.type]=!1};#f=()=>{this.opts.ref.current&&(this.#n=TO(this.opts.ref.current))};#m=t=>this.opts.ref.current?jm(this.opts.ref.current,t):!1;#v=Vm(()=>{for(const t in this.#r)this.#r[t]=!1;this.#n=!1},20);#y(){return Object.values(this.#r).some(Boolean)}#w=()=>{this.#i=!0};#_=()=>{this.#i=!1};props={onfocuscapture:this.#w,onblurcapture:this.#_}};function EO(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([t,{current:r}])=>r==="close"||r==="ignore")}function TO(e){const t=[...globalThis.bitsDismissableLayers],r=EO(t);if(r)return r[0].opts.ref.current===e;const[n]=t[0];return n.opts.ref.current===e}function xO(e,t){const r=e.target;if(!HC(r))return!1;const n=!!r.closest(`[${wO}]`),i=!!t.closest(`[${kO}]`);return"button"in e&&e.button>0&&!n?!1:"button"in e&&e.button===0&&n&&i?!0:n&&i?!1:Zm(r).documentElement.contains(r)&&!jm(t,r)&&tO(e,t)}function ev(e){const t=e.currentTarget,r=e.target;let n;e instanceof PointerEvent?n=new PointerEvent(e.type,e):n=new PointerEvent("pointerdown",e);let i=!1;return new Proxy(n,{get:(s,a)=>a==="currentTarget"?t:a==="target"?r:a==="preventDefault"?()=>{i=!0,typeof s.preventDefault=="function"&&s.preventDefault()}:a==="defaultPrevented"?i:a in s?s[a]:e[a]})}function tv(e,t){ne(t,!0);let r=_(t,"interactOutsideBehavior",7,"close"),n=_(t,"onInteractOutside",7,Te),i=_(t,"onFocusOutside",7,Te),s=_(t,"id",7),a=_(t,"children",7),o=_(t,"enabled",7),l=_(t,"isValidEvent",7,()=>!1),c=_(t,"ref",7);const f=SO.create({id:z(()=>s()),interactOutsideBehavior:z(()=>r()),onInteractOutside:z(()=>n()),enabled:z(()=>o()),onFocusOutside:z(()=>i()),isValidEvent:z(()=>l()),ref:c()});var u={get interactOutsideBehavior(){return r()},set interactOutsideBehavior(g="close"){r(g),b()},get onInteractOutside(){return n()},set onInteractOutside(g=Te){n(g),b()},get onFocusOutside(){return i()},set onFocusOutside(g=Te){i(g),b()},get id(){return s()},set id(g){s(g),b()},get children(){return a()},set children(g){a(g),b()},get enabled(){return o()},set enabled(g){o(g),b()},get isValidEvent(){return l()},set isValidEvent(g=()=>!1){l(g),b()},get ref(){return c()},set ref(g){c(g),b()}},p=re(),h=U(p);return Se(h,()=>a()??qe,()=>({props:f.props})),x(e,p),ie(u)}se(tv,{interactOutsideBehavior:{},onInteractOutside:{},onFocusOutside:{},id:{},children:{},enabled:{},isValidEvent:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsEscapeLayers??=new Map;var AO=class vy{static create(t){return new vy(t)}opts;domContext;constructor(t){this.opts=t,this.domContext=new Bi(this.opts.ref);let r=Te;it(()=>t.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,t.escapeKeydownBehavior),r=this.#e()),()=>{r(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>gt(this.domContext.getDocument(),"keydown",this.#t,{passive:!1});#t=t=>{if(t.key!=="Escape"||!CO(this))return;const r=new KeyboardEvent(t.type,t);t.preventDefault();const n=this.opts.escapeKeydownBehavior.current;n!=="close"&&n!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(r)}};function CO(e){const t=[...globalThis.bitsEscapeLayers],r=t.findLast(([i,{current:s}])=>s==="close"||s==="ignore");if(r)return r[0]===e;const[n]=t[0];return n===e}function rv(e,t){ne(t,!0);let r=_(t,"escapeKeydownBehavior",7,"close"),n=_(t,"onEscapeKeydown",7,Te),i=_(t,"children",7),s=_(t,"enabled",7),a=_(t,"ref",7);AO.create({escapeKeydownBehavior:z(()=>r()),onEscapeKeydown:z(()=>n()),enabled:z(()=>s()),ref:a()});var o={get escapeKeydownBehavior(){return r()},set escapeKeydownBehavior(f="close"){r(f),b()},get onEscapeKeydown(){return n()},set onEscapeKeydown(f=Te){n(f),b()},get children(){return i()},set children(f){i(f),b()},get enabled(){return s()},set enabled(f){s(f),b()},get ref(){return a()},set ref(f){a(f),b()}},l=re(),c=U(l);return Se(c,()=>i()??qe),x(e,l),ie(o)}se(rv,{escapeKeydownBehavior:{},onEscapeKeydown:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"});var OO=class gy{static instance;#e=Er([]);#t=new WeakMap;#r=new WeakMap;static getInstance(){return this.instance||(this.instance=new gy),this.instance}register(t){const r=this.getActive();r&&r!==t&&r.pause();const n=document.activeElement;n&&n!==document.body&&this.#r.set(t,n),this.#e.current=this.#e.current.filter(i=>i!==t),this.#e.current.unshift(t)}unregister(t){this.#e.current=this.#e.current.filter(n=>n!==t);const r=this.getActive();r&&r.resume()}getActive(){return this.#e.current[0]}setFocusMemory(t,r){this.#t.set(t,r)}getFocusMemory(t){return this.#t.get(t)}isActiveScope(t){return this.getActive()===t}setPreFocusMemory(t,r){this.#r.set(t,r)}getPreFocusMemory(t){return this.#r.get(t)}clearPreFocusMemory(t){this.#r.delete(t)}},DO=class yy{#e=!1;#t=null;#r=OO.getInstance();#n=[];#i;constructor(t){this.#i=t}get paused(){return this.#e}pause(){this.#e=!0}resume(){this.#e=!1}#s(){for(const t of this.#n)t();this.#n=[]}mount(t){this.#t&&this.unmount(),this.#t=t,this.#r.register(this),this.#l(),this.#o()}unmount(){this.#t&&(this.#s(),this.#a(),this.#r.unregister(this),this.#r.clearPreFocusMemory(this),this.#t=null)}#o(){if(!this.#t)return;const t=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});this.#i.onOpenAutoFocus.current(t),t.defaultPrevented||requestAnimationFrame(()=>{if(!this.#t)return;const r=this.#c();r?(r.focus(),this.#r.setFocusMemory(this,r)):this.#t.focus()})}#a(){const t=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});if(this.#i.onCloseAutoFocus.current?.(t),!t.defaultPrevented){const r=this.#r.getPreFocusMemory(this);if(r&&document.contains(r))try{r.focus()}catch{document.body.focus()}}}#l(){if(!this.#t||!this.#i.trap.current)return;const t=this.#t,r=t.ownerDocument,n=a=>{if(this.#e||!this.#r.isActiveScope(this))return;const o=a.target;if(o)if(t.contains(o))this.#r.setFocusMemory(this,o);else{const l=this.#r.getFocusMemory(this);if(l&&t.contains(l)&&bO(l))a.preventDefault(),l.focus();else{const c=this.#c(),f=this.#d()[0];(c||f||t).focus()}}},i=a=>{if(!this.#i.loop||this.#e||a.key!=="Tab"||!this.#r.isActiveScope(this))return;const o=this.#u();if(o.length===0)return;const l=o[0],c=o[o.length-1];!a.shiftKey&&r.activeElement===c?(a.preventDefault(),l.focus()):a.shiftKey&&r.activeElement===l&&(a.preventDefault(),c.focus())};this.#n.push(gt(r,"focusin",n,{capture:!0}),gt(t,"keydown",i));const s=new MutationObserver(()=>{const a=this.#r.getFocusMemory(this);if(a&&!t.contains(a)){const o=this.#c(),l=this.#d()[0],c=o||l;c?(c.focus(),this.#r.setFocusMemory(this,c)):t.focus()}});s.observe(t,{childList:!0,subtree:!0}),this.#n.push(()=>s.disconnect())}#u(){return this.#t?mO(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#c(){return this.#u()[0]||null}#d(){return this.#t?vO(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let r=null;return it([()=>t.ref.current,()=>t.enabled.current],([n,i])=>{n&&i?(r||(r=new yy(t)),r.mount(n)):r&&(r.unmount(),r=null)}),ii(()=>{r?.unmount()}),{get props(){return{tabindex:-1}}}}};function nv(e,t){ne(t,!0);let r=_(t,"enabled",7,!1),n=_(t,"trapFocus",7,!1),i=_(t,"loop",7,!1),s=_(t,"onCloseAutoFocus",7,Te),a=_(t,"onOpenAutoFocus",7,Te),o=_(t,"focusScope",7),l=_(t,"ref",7);const c=DO.use({enabled:z(()=>r()),trap:z(()=>n()),loop:i(),onCloseAutoFocus:z(()=>s()),onOpenAutoFocus:z(()=>a()),ref:l()});var f={get enabled(){return r()},set enabled(h=!1){r(h),b()},get trapFocus(){return n()},set trapFocus(h=!1){n(h),b()},get loop(){return i()},set loop(h=!1){i(h),b()},get onCloseAutoFocus(){return s()},set onCloseAutoFocus(h=Te){s(h),b()},get onOpenAutoFocus(){return a()},set onOpenAutoFocus(h=Te){a(h),b()},get focusScope(){return o()},set focusScope(h){o(h),b()},get ref(){return l()},set ref(h){l(h),b()}},u=re(),p=U(u);return Se(p,()=>o()??qe,()=>({props:c.props})),x(e,u),ie(f)}se(nv,{enabled:{},trapFocus:{},loop:{},onCloseAutoFocus:{},onOpenAutoFocus:{},focusScope:{},ref:{}},[],[],{mode:"open"});var iv=()=>{};globalThis.bitsTextSelectionLayers??=new Map;var IO=class by{static create(t){return new by(t)}opts;domContext;#e=Te;#t=!1;#r=iv;#n=iv;constructor(t){this.opts=t,this.domContext=new Bi(t.ref);let r=Te;it(()=>[this.opts.enabled.current,this.opts.onPointerDown.current,this.opts.onPointerUp.current],([n,i,s])=>(this.#t=n,this.#r=i,this.#n=s,n&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),r(),r=this.#i()),()=>{this.#t=!1,r(),this.#a(),globalThis.bitsTextSelectionLayers.delete(this)}))}#i(){return Ys(gt(this.domContext.getDocument(),"pointerdown",this.#o),gt(this.domContext.getDocument(),"pointerup",km(this.#a,this.#s)))}#s=t=>{this.#n(t)};#o=t=>{const r=this.opts.ref.current,n=t.target;!xr(r)||!xr(n)||!this.#t||!MO(this)||!qC(r,n)||(this.#r(t),!t.defaultPrevented&&(this.#e=PO(r,this.domContext.getDocument().body)))};#a=()=>{this.#e(),this.#e=Te}},sv=e=>e.style.userSelect||e.style.webkitUserSelect;function PO(e,t){const r=sv(t),n=sv(e);return Ao(t,"none"),Ao(e,"text"),()=>{Ao(t,r),Ao(e,n)}}function Ao(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function MO(e){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const r=t.at(-1);return r?r[0]===e:!1}function av(e,t){ne(t,!0);let r=_(t,"preventOverflowTextSelection",7,!0),n=_(t,"onPointerDown",7,Te),i=_(t,"onPointerUp",7,Te),s=_(t,"id",7),a=_(t,"children",7),o=_(t,"enabled",7),l=_(t,"ref",7);IO.create({id:z(()=>s()),onPointerDown:z(()=>n()),onPointerUp:z(()=>i()),enabled:z(()=>o()&&r()),ref:l()});var c={get preventOverflowTextSelection(){return r()},set preventOverflowTextSelection(p=!0){r(p),b()},get onPointerDown(){return n()},set onPointerDown(p=Te){n(p),b()},get onPointerUp(){return i()},set onPointerUp(p=Te){i(p),b()},get id(){return s()},set id(p){s(p),b()},get children(){return a()},set children(p){a(p),b()},get enabled(){return o()},set enabled(p){o(p),b()},get ref(){return l()},set ref(p){l(p),b()}},f=re(),u=U(f);return Se(u,()=>a()??qe),x(e,f),ie(c)}se(av,{preventOverflowTextSelection:{},onPointerDown:{},onPointerUp:{},id:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsIdCounter??={current:0};function Nn(e="bits"){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}var $O=class{#e;#t=0;#r=ae();#n;constructor(e){this.#e=e}#i(){this.#t-=1,this.#n&&this.#t<=0&&(this.#n(),$(this.#r,void 0),this.#n=void 0)}get(...e){return this.#t+=1,d(this.#r)===void 0&&(this.#n=_s(()=>{$(this.#r,this.#e(...e),!0)})),ve(()=>()=>{this.#i()}),d(this.#r)}},Co=new kC,Oo=ae(null),ec=null,Xs=null,ea=!1,ov=z(()=>{for(const e of Co.values())if(e)return!0;return!1}),tc=null,FO=new $O(()=>{function e(){document.body.setAttribute("style",d(Oo)??""),document.body.style.removeProperty("--scrollbar-width"),zm&&ec?.(),$(Oo,null)}function t(){Xs!==null&&(window.clearTimeout(Xs),Xs=null)}function r(i,s){t(),ea=!0,tc=Date.now();const a=tc,o=()=>{Xs=null,tc===a&&(lv(Co)?ea=!1:(ea=!1,s()))},l=i===null?24:i;Xs=window.setTimeout(o,l)}function n(){d(Oo)===null&&Co.size===0&&!ea&&$(Oo,document.body.getAttribute("style"),!0)}return it(()=>ov.current,()=>{if(!ov.current)return;n(),ea=!1;const i=getComputedStyle(document.documentElement),s=getComputedStyle(document.body),a=i.scrollbarGutter?.includes("stable")||s.scrollbarGutter?.includes("stable"),o=window.innerWidth-document.documentElement.clientWidth,l={padding:Number.parseInt(s.paddingRight??"0",10)+o,margin:Number.parseInt(s.marginRight??"0",10)};o>0&&!a&&(document.body.style.paddingRight=`${l.padding}px`,document.body.style.marginRight=`${l.margin}px`,document.body.style.setProperty("--scrollbar-width",`${o}px`)),document.body.style.overflow="hidden",zm&&(ec=gt(document,"touchmove",c=>{c.target===document.documentElement&&(c.touches.length>1||c.preventDefault())},{passive:!1})),Qs(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),ii(()=>()=>{ec?.()}),{get lockMap(){return Co},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:r,cancelPendingCleanup:t,ensureInitialStyleCaptured:n}}),NO=class{#e=Nn();#t;#r=()=>null;#n;locked;constructor(e,t=()=>null){this.#t=e,this.#r=t,this.#n=FO.get(),this.#n&&(this.#n.cancelPendingCleanup(),this.#n.ensureInitialStyleCaptured(),this.#n.lockMap.set(this.#e,this.#t??!1),this.locked=z(()=>this.#n.lockMap.get(this.#e)??!1,r=>this.#n.lockMap.set(this.#e,r)),ii(()=>{if(this.#n.lockMap.delete(this.#e),lv(this.#n.lockMap))return;const r=this.#r();this.#n.scheduleCleanupIfNoNewLocks(r,()=>{this.#n.resetBodyStyle()})}))}};function lv(e){for(const[t,r]of e)if(r)return!0;return!1}function rc(e,t){ne(t,!0);let r=_(t,"preventScroll",7,!0),n=_(t,"restoreScrollDelay",7,null);return r()&&new NO(r(),()=>n()),ie({get preventScroll(){return r()},set preventScroll(i=!0){r(i),b()},get restoreScrollDelay(){return n()},set restoreScrollDelay(i=null){n(i),b()}})}se(rc,{preventScroll:{},restoreScrollDelay:{}},[],[],{mode:"open"});function RO(e){if(!ln||!e)return null;let t=e.querySelector("[data-bits-announcer]");const r=i=>{const s=e.createElement("div");return s.role="log",s.ariaLive=i,s.setAttribute("aria-relevant","additions"),s};if(!xr(t)){const i=e.createElement("div");i.style.cssText=_C,i.setAttribute("data-bits-announcer",""),i.appendChild(r("assertive")),i.appendChild(r("polite")),t=i,e.body.insertBefore(t,e.body.firstChild)}return{getLog:i=>{if(!xr(t))return null;const s=t.querySelector(`[aria-live="${i}"]`);return xr(s)?s:null}}}function Do(e){const t=RO(e);function r(n,i="assertive",s=7500){if(!t||!ln||!e)return;const a=t.getLog(i),o=e.createElement("div");return typeof n=="number"?n=n.toString():n===null?n="Empty":n=n.trim(),o.innerText=n,i==="assertive"?a?.replaceChildren(o):a?.appendChild(o),setTimeout(()=>{o.remove()},s)}return{announce:r}}var LO={defaultValue:void 0,granularity:"day"};function uv(e){const{defaultValue:t,granularity:r,minValue:n,maxValue:i}={...LO,...e};if(Array.isArray(t)&&t.length)return t[t.length-1];if(t&&!Array.isArray(t))return t;{let s=new Date;n&&s<n.toDate(Xt())?s=n.toDate(Xt()):i&&s>i.toDate(Xt())&&(s=i.toDate(Xt()));const a=s.getFullYear(),o=s.getMonth()+1,l=s.getDate();return["hour","minute","second"].includes(r??"day")?new Pi(a,o,l,0,0,0):new zs(a,o,l)}}function cv(e,t){let r;return t instanceof Mn?r=up(e):t instanceof Pi?r=lp(e):r=ao(e),r.calendar!==t.calendar?er(r,t.calendar):r}function Zt(e,t=Xt()){return e instanceof Mn?e.toDate():e.toDate(t)}function zO(e){if(e instanceof zs)return"date";if(e instanceof Pi)return"datetime";if(e instanceof Mn)return"zoneddatetime";throw new Error("Unknown date type")}function qO(e,t){switch(t){case"date":return ao(e);case"datetime":return lp(e);case"zoneddatetime":return up(e);default:throw new Error(`Unknown date type: ${t}`)}}function UO(e){return e instanceof Pi}function nc(e){return e instanceof Mn}function Io(e){return UO(e)||nc(e)}function ta(e){if(e instanceof Date){const t=e.getFullYear(),r=e.getMonth()+1;return new Date(t,r,0).getDate()}else return e.set({day:100}).day}function oi(e,t){return e.compare(t)<0}function BO(e,t){return e.compare(t)>0}function dv(e,t,r){const n=Wh(e,r);return t>n?e.subtract({days:n+7-t}):t===n?e:e.subtract({days:n-t})}function fv(e,t,r){const n=Wh(e,r),i=t===0?6:t-1;return n===i?e:n>i?e.add({days:7-n+i}):e.add({days:i-n})}var Po=["day","month","year"],Mo=["hour","minute","second","dayPeriod"],hv=["literal","timeZoneName"],ra=[...Po,...Mo],pv=[...ra,...hv],VO=[...Mo,...hv],zN=pv.filter(e=>e!=="literal"),qN=VO.filter(e=>e!=="literal"),jO=["ach","af","am","an","ar","ast","az","be","bg","bn","br","bs","ca","cak","ckb","cs","cy","da","de","dsb","el","en","eo","es","et","eu","fa","ff","fi","fr","fy","ga","gd","gl","he","hr","hsb","hu","ia","id","it","ja","ka","kk","kn","ko","lb","lo","lt","lv","meh","ml","ms","nl","nn","no","oc","pl","pt","rm","ro","ru","sc","scn","sk","sl","sr","sv","szl","tg","th","tr","uk","zh-CN","zh-TW"],ZO=["year","month","day"],ic={ach:{year:"mwaka",month:"dwe",day:"nino"},af:{year:"jjjj",month:"mm",day:"dd"},am:{year:"ዓዓዓዓ",month:"ሚሜ",day:"ቀቀ"},an:{year:"aaaa",month:"mm",day:"dd"},ar:{year:"سنة",month:"شهر",day:"يوم"},ast:{year:"aaaa",month:"mm",day:"dd"},az:{year:"iiii",month:"aa",day:"gg"},be:{year:"гггг",month:"мм",day:"дд"},bg:{year:"гггг",month:"мм",day:"дд"},bn:{year:"yyyy",month:"মিমি",day:"dd"},br:{year:"bbbb",month:"mm",day:"dd"},bs:{year:"gggg",month:"mm",day:"dd"},ca:{year:"aaaa",month:"mm",day:"dd"},cak:{year:"jjjj",month:"ii",day:"q'q'"},ckb:{year:"ساڵ",month:"مانگ",day:"ڕۆژ"},cs:{year:"rrrr",month:"mm",day:"dd"},cy:{year:"bbbb",month:"mm",day:"dd"},da:{year:"åååå",month:"mm",day:"dd"},de:{year:"jjjj",month:"mm",day:"tt"},dsb:{year:"llll",month:"mm",day:"źź"},el:{year:"εεεε",month:"μμ",day:"ηη"},en:{year:"yyyy",month:"mm",day:"dd"},eo:{year:"jjjj",month:"mm",day:"tt"},es:{year:"aaaa",month:"mm",day:"dd"},et:{year:"aaaa",month:"kk",day:"pp"},eu:{year:"uuuu",month:"hh",day:"ee"},fa:{year:"سال",month:"ماه",day:"روز"},ff:{year:"hhhh",month:"ll",day:"ññ"},fi:{year:"vvvv",month:"kk",day:"pp"},fr:{year:"aaaa",month:"mm",day:"jj"},fy:{year:"jjjj",month:"mm",day:"dd"},ga:{year:"bbbb",month:"mm",day:"ll"},gd:{year:"bbbb",month:"mm",day:"ll"},gl:{year:"aaaa",month:"mm",day:"dd"},he:{year:"שנה",month:"חודש",day:"יום"},hr:{year:"gggg",month:"mm",day:"dd"},hsb:{year:"llll",month:"mm",day:"dd"},hu:{year:"éééé",month:"hh",day:"nn"},ia:{year:"aaaa",month:"mm",day:"dd"},id:{year:"tttt",month:"bb",day:"hh"},it:{year:"aaaa",month:"mm",day:"gg"},ja:{year:" 年 ",month:"月",day:"日"},ka:{year:"წწწწ",month:"თთ",day:"რრ"},kk:{year:"жжжж",month:"аа",day:"кк"},kn:{year:"ವವವವ",month:"ಮಿಮೀ",day:"ದಿದಿ"},ko:{year:"연도",month:"월",day:"일"},lb:{year:"jjjj",month:"mm",day:"dd"},lo:{year:"ປປປປ",month:"ດດ",day:"ວວ"},lt:{year:"mmmm",month:"mm",day:"dd"},lv:{year:"gggg",month:"mm",day:"dd"},meh:{year:"aaaa",month:"mm",day:"dd"},ml:{year:"വർഷം",month:"മാസം",day:"തീയതി"},ms:{year:"tttt",month:"mm",day:"hh"},nl:{year:"jjjj",month:"mm",day:"dd"},nn:{year:"åååå",month:"mm",day:"dd"},no:{year:"åååå",month:"mm",day:"dd"},oc:{year:"aaaa",month:"mm",day:"jj"},pl:{year:"rrrr",month:"mm",day:"dd"},pt:{year:"aaaa",month:"mm",day:"dd"},rm:{year:"oooo",month:"mm",day:"dd"},ro:{year:"aaaa",month:"ll",day:"zz"},ru:{year:"гггг",month:"мм",day:"дд"},sc:{year:"aaaa",month:"mm",day:"dd"},scn:{year:"aaaa",month:"mm",day:"jj"},sk:{year:"rrrr",month:"mm",day:"dd"},sl:{year:"llll",month:"mm",day:"dd"},sr:{year:"гггг",month:"мм",day:"дд"},sv:{year:"åååå",month:"mm",day:"dd"},szl:{year:"rrrr",month:"mm",day:"dd"},tg:{year:"сссс",month:"мм",day:"рр"},th:{year:"ปปปป",month:"ดด",day:"วว"},tr:{year:"yyyy",month:"aa",day:"gg"},uk:{year:"рррр",month:"мм",day:"дд"},"zh-CN":{year:"年",month:"月",day:"日"},"zh-TW":{year:"年",month:"月",day:"日"}};function WO(e){if(mv(e))return ic[e];{const t=YO(e);return mv(t)?ic[t]:ic.en}}function sc(e,t,r){return HO(e)?WO(r)[e]:KO(e)?t:GO(e)?"––":""}function mv(e){return jO.includes(e)}function HO(e){return ZO.includes(e)}function GO(e){return e==="hour"||e==="minute"||e==="second"}function KO(e){return e==="era"||e==="dayPeriod"}function YO(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}function ac(e){const t=["hour","minute","second"],r=ra.map(n=>n==="dayPeriod"?[n,"AM"]:[n,null]).filter(([n])=>n==="literal"||n===null?!1:e==="day"?!t.includes(n):!0);return Object.fromEntries(r)}function JO(e){const{segmentValues:t,formatter:r,locale:n,dateRef:i}=e,s=Object.keys(t).reduce((o,l)=>{if(!gv(l))return o;if("hour"in t&&l==="dayPeriod"){const c=t[l];Fn(c)?o[l]=sc(l,"AM",n):o[l]=c}else o[l]=a(l);return o},{});function a(o){if("hour"in t){const l=t[o],c=typeof l=="string"&&l?.startsWith("0"),f=l!==null?Number.parseInt(l):null;if(l==="0"&&o!=="year")return"0";if(!Fn(l)&&!Fn(f)){const u=r.part(i.set({[o]:l}),o,{hourCycle:e.hourCycle===24?"h23":void 0}),p=e.hourCycle===12||e.hourCycle===void 0&&bv(n)===12;if(o==="hour"&&p){if(f>12){const h=f-12;return h===0?"12":h<10?`0${h}`:`${h}`}return f===0?"12":f<10?`0${f}`:`${f}`}return o==="year"?`${l}`:c&&u.length===1?`0${u}`:u}else return sc(o,"",n)}else{if($o(o)){const l=t[o],c=typeof l=="string"&&l?.startsWith("0");if(l==="0")return"0";if(Fn(l))return sc(o,"",n);{const f=r.part(i.set({[o]:l}),o);return o==="year"?`${l}`:c&&f.length===1?`0${f}`:f}}return""}}return s}function QO(e){const{granularity:t,dateRef:r,formatter:n,contentObj:i,hideTimeZone:s,hourCycle:a}=e;return n.toParts(r,eD(t,a)).map(o=>["literal","dayPeriod","timeZoneName",null].includes(o.type)||!gv(o.type)?{part:o.type,value:o.value}:{part:o.type,value:i[o.type]}).filter(o=>!(Fn(o.part)||Fn(o.value)||o.part==="timeZoneName"&&(!nc(r)||s)))}function XO(e){const t=JO(e);return{obj:t,arr:QO({contentObj:t,...e})}}function eD(e,t){const r={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short",hourCycle:t===24?"h23":void 0,hour12:t===24?!1:void 0};return e==="day"&&(delete r.second,delete r.hour,delete r.minute,delete r.timeZoneName),e==="hour"&&delete r.minute,e==="minute"&&delete r.second,r}function vv(){return ra.reduce((e,t)=>(e[t]={lastKeyZero:!1,hasLeftFocus:!0,updating:null},e),{})}function $o(e){return Po.includes(e)}function gv(e){return ra.includes(e)}function tD(e){return pv.includes(e)}function yv(e){return!ln||!e?[]:Fo(e).map(t=>t.dataset.segment).filter(t=>ra.includes(t))}function rD(e){const{segmentObj:t,fieldNode:r,dateRef:n}=e,i=yv(r);let s=n;for(const a of i)if("hour"in t){const o=t[a];if(Fn(o))continue;s=s.set({[a]:t[a]})}else if($o(a)){const o=t[a];if(Fn(o))continue;s=s.set({[a]:t[a]})}return s}function nD(e,t){const r=yv(t);for(const n of r)if("hour"in e){if(e[n]===null)return!1}else if($o(n)&&e[n]===null)return!1;return!0}function iD(e){return typeof e!="object"||e===null?!1:Object.entries(e).every(([t,r])=>(Mo.includes(t)||Po.includes(t))&&(t==="dayPeriod"?r==="AM"||r==="PM"||r===null:typeof r=="string"||typeof r=="number"||r===null))}function sD(e,t){return t||(Io(e)?"minute":"day")}function oc(e){return!!(["Enter","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Backspace"," "].includes(e)||_o(e))}function aD(e,t){if(!ln)return!1;const r=Fo(t);return r.length?r[0].id===e:!1}function oD(e){const{id:t,formatter:r,value:n,doc:i}=e;if(!ln)return;const s=r.selectedDate(n),a=i.getElementById(t);if(a)a.innerText=`Selected Date: ${s}`;else{const o=i.createElement("div");o.style.cssText=Js({display:"none"}),o.id=t,o.innerText=`Selected Date: ${s}`,i.body.appendChild(o)}}function lD(e,t){if(!ln)return;const r=t.getElementById(e);r&&t.body.removeChild(r)}function bv(e){return new Intl.DateTimeFormat(e,{hour:"numeric"}).formatToParts(new Date("2023-01-01T13:00:00")).find(t=>t.type==="hour")?.value==="1"?12:24}function na(e,t){const r=e.currentTarget;if(!xr(r))return;const{prev:n,next:i}=lc(r,t);if(e.key==="ArrowLeft"){if(!n)return;n.focus()}else if(e.key==="ArrowRight"){if(!i)return;i.focus()}}function uD(e,t){const r=t.indexOf(e);return r===t.length-1||r===-1?null:t[r+1]}function cD(e,t){const r=t.indexOf(e);return r===0||r===-1?null:t[r-1]}function lc(e,t){const r=Fo(t);return r.length?{next:uD(e,r),prev:cD(e,r)}:{next:null,prev:null}}function _v(e,t){const r=e.currentTarget;if(!xr(r))return;const{next:n}=lc(r,t);n&&n.focus()}function wv(e,t){const r=e.currentTarget;if(!xr(r))return;const{prev:n}=lc(r,t);n&&n.focus()}function ia(e){return e==="ArrowRight"||e==="ArrowLeft"}function Fo(e){return e?Array.from(e.querySelectorAll("[data-segment]")).filter(t=>{if(!xr(t))return!1;const r=t.dataset.segment;return r==="trigger"?!0:!(!tD(r)||r==="literal")}):[]}function dD(e){return Fo(e)[0]}var fD={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};function kv(e){let t=e.initialLocale;function r(h){t=h}function n(){return t}function i(h,g){return new hr(t,g).format(h)}function s(h,g=!0){return Io(h)&&g?i(Zt(h),{dateStyle:"long",timeStyle:"long"}):i(Zt(h),{dateStyle:"long"})}function a(h){return typeof e.monthFormat.current!="function"&&typeof e.yearFormat.current!="function"?new hr(t,{month:e.monthFormat.current,year:e.yearFormat.current}).format(h):`${typeof e.monthFormat.current=="function"?e.monthFormat.current(h.getMonth()+1):new hr(t,{month:e.monthFormat.current}).format(h)} ${typeof e.yearFormat.current=="function"?e.yearFormat.current(h.getFullYear()):new hr(t,{year:e.yearFormat.current}).format(h)}`}function o(h){return new hr(t,{month:"long"}).format(h)}function l(h){return new hr(t,{year:"numeric"}).format(h)}function c(h,g){return nc(h)?new hr(t,{...g,timeZone:h.timeZone}).formatToParts(Zt(h)):new hr(t,g).formatToParts(Zt(h))}function f(h,g="narrow"){return new hr(t,{weekday:g}).format(h)}function u(h,g=void 0){return new hr(t,{hour:"numeric",minute:"numeric",hourCycle:g===24?"h23":void 0}).formatToParts(h).find(v=>v.type==="dayPeriod")?.value==="PM"?"PM":"AM"}function p(h,g,v={}){const m=c(h,{...fD,...v}).find(y=>y.type===g);return m?m.value:""}return{setLocale:r,getLocale:n,fullMonth:o,fullYear:l,fullMonthAndYear:a,toParts:c,custom:i,part:p,dayPeriod:u,selectedDate:s,dayOfWeek:f}}function hD(e){return!(!xr(e)||!e.hasAttribute("data-bits-day"))}function Sv(e,t){const r=[];let n=e.add({days:1});const i=t;for(;n.compare(i)<0;)r.push(n),n=n.add({days:1});return r}function uc(e){const{dateObj:t,weekStartsOn:r,fixedWeeks:n,locale:i}=e,s=ta(t),a=Array.from({length:s},(v,m)=>t.set({day:m+1})),o=yu(t),l=eE(t),c=r!==void 0?dv(o,r,"en-US"):dv(o,0,i),f=r!==void 0?fv(l,r,"en-US"):fv(l,0,i),u=Sv(c.subtract({days:1}),o),p=Sv(l,f.add({days:1})),h=u.length+a.length+p.length;if(n&&h<42){const v=42-h;let m=p[p.length-1];m||(m=t.add({months:1}).set({day:1}));let y=v;p.length===0&&(y=v-1,p.push(m));const E=Array.from({length:y},(k,T)=>{const A=T+1;return m.add({days:A})});p.push(...E)}const g=u.concat(a,p);return{value:t,dates:g,weeks:_O(g,7)}}function sa(e){const{numberOfMonths:t,dateObj:r,...n}=e,i=[];if(!t||t===1)return i.push(uc({...n,dateObj:r})),i;i.push(uc({...n,dateObj:r}));for(let s=1;s<t;s++){const a=r.add({months:s});i.push(uc({...n,dateObj:a}))}return i}function cc(e){return e?Array.from(e.querySelectorAll("[data-bits-day]:not([data-disabled]):not([data-outside-visible-months])")).filter(t=>xr(t)):[]}function Ev(e,t){const r=e.getAttribute("data-value");r&&(t.current=cv(r,t.current))}function pD({node:e,add:t,placeholder:r,calendarNode:n,isPrevButtonDisabled:i,isNextButtonDisabled:s,months:a,numberOfMonths:o}){const l=cc(n);if(!l.length)return;const c=l.indexOf(e)+t;if(Xu(c,l)){const f=l[c];return Ev(f,r),f.focus()}if(c<0){if(i)return;const f=a[0]?.value;if(!f)return;r.current=f.subtract({months:o}),Qs(()=>{const u=cc(n);if(!u.length)return;const p=u.length-Math.abs(c);if(Xu(p,u)){const h=u[p];return Ev(h,r),h.focus()}})}if(c>=l.length){if(s)return;const f=a[0]?.value;if(!f)return;r.current=f.add({months:o}),Qs(()=>{const u=cc(n);if(!u.length)return;const p=c-l.length;if(Xu(p,u))return u[p].focus()})}}var Tv=[Yu,Ju,Rm,Lm],xv=[ZC," "];function mD({event:e,handleCellClick:t,shiftFocus:r,placeholderValue:n}){const i=e.target;if(!hD(i)||!Tv.includes(e.key)&&!xv.includes(e.key))return;e.preventDefault();const s={[Yu]:7,[Ju]:-7,[Rm]:-1,[Lm]:1};if(Tv.includes(e.key)){const a=s[e.key];a!==void 0&&r(i,a)}if(xv.includes(e.key)){const a=i.getAttribute("data-value");if(!a)return;t(e,cv(a,n))}}function vD({months:e,setMonths:t,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:s,fixedWeeks:a,setPlaceholder:o}){const l=e[0]?.value;if(l)if(n)o(l.add({months:r}));else{const c=l.add({months:1}),f=sa({dateObj:c,weekStartsOn:i,locale:s,fixedWeeks:a,numberOfMonths:r});o(c),t(f)}}function gD({months:e,setMonths:t,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:s,fixedWeeks:a,setPlaceholder:o}){const l=e[0]?.value;if(l)if(n)o(l.subtract({months:r}));else{const c=l.subtract({months:1}),f=sa({dateObj:c,weekStartsOn:i,locale:s,fixedWeeks:a,numberOfMonths:r});o(c),t(f)}}function yD({months:e,formatter:t,weekdayFormat:r}){if(!e.length)return[];const n=e[0].weeks[0];return n?n.map(i=>t.dayOfWeek(Zt(i),r)):[]}function bD(e){ve(()=>{const t=e.weekStartsOn.current,r=e.locale.current,n=e.fixedWeeks.current,i=e.numberOfMonths.current;Re(()=>{const s=e.placeholder.current;if(!s)return;const a={weekStartsOn:t,locale:r,fixedWeeks:n,numberOfMonths:i};e.setMonths(sa({...a,dateObj:s}))})})}function _D({calendarNode:e,label:t,accessibleHeadingId:r}){const n=yo(e),i=n.createElement("div");i.style.cssText=Js({border:"0px",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0px",position:"absolute",whiteSpace:"nowrap",width:"1px"});const s=n.createElement("div");return s.textContent=t,s.id=r,s.role="heading",s.ariaLevel="2",e.insertBefore(i,e.firstChild),i.appendChild(s),()=>{const a=n.getElementById(r);a&&(i.parentElement?.removeChild(i),a.remove())}}function wD({placeholder:e,getVisibleMonths:t,weekStartsOn:r,locale:n,fixedWeeks:i,numberOfMonths:s,setMonths:a}){ve(()=>{e.current,Re(()=>{t().some(o=>vu(o,e.current))||a(sa({weekStartsOn:r.current,locale:n.current,fixedWeeks:i.current,numberOfMonths:s.current,dateObj:e.current}))})})}function kD({maxValue:e,months:t,disabled:r}){if(!e||!t.length)return!1;if(r)return!0;const n=t[t.length-1]?.value;return n?BO(n.add({months:1}).set({day:1}),e):!1}function SD({minValue:e,months:t,disabled:r}){if(!e||!t.length)return!1;if(r)return!0;const n=t[0]?.value;return n?oi(n.subtract({months:1}).set({day:35}),e):!1}function ED({months:e,locale:t,formatter:r}){if(!e.length)return"";if(t!==r.getLocale()&&r.setLocale(t),e.length===1){const c=Zt(e[0].value);return`${r.fullMonthAndYear(c)}`}const n=Zt(e[0].value),i=Zt(e[e.length-1].value),s=r.fullMonth(n),a=r.fullMonth(i),o=r.fullYear(n),l=r.fullYear(i);return o===l?`${s} - ${a} ${l}`:`${s} ${o} - ${a} ${l}`}function TD({fullCalendarLabel:e,id:t,isInvalid:r,disabled:n,readonly:i}){return{id:t,role:"application","aria-label":e,"data-invalid":Ve(r),"data-disabled":Ve(n),"data-readonly":Ve(i)}}function xD(e){const t=yo(e.target).querySelector("[data-bits-day][data-focused]");t&&(e.preventDefault(),t?.focus())}function AD(e){if(!ln)return;const t=Array.from(e.querySelectorAll("[data-bits-day]:not([aria-disabled=true])"));if(t.length===0)return;const r=t[0],n=r?.getAttribute("data-value"),i=r?.getAttribute("data-type");if(!(!n||!i))return qO(n,i)}function CD({ref:e,placeholder:t,defaultPlaceholder:r,minValue:n,maxValue:i,isDateDisabled:s}){function a(o){return!!(s.current(o)||n.current&&oi(o,n.current)||i.current&&oi(i.current,o))}it(()=>e.current,()=>{e.current&&t.current&&Dn(t.current,r)&&a(r)&&(t.current=AD(e.current)??r)})}function OD(e,t){return!e||!t?e:Io(e)&&Io(t)?e.set({hour:t.hour,minute:t.minute,millisecond:t.millisecond,second:t.second}):e}var DD=bo({component:"calendar",parts:["root","grid","cell","next-button","prev-button","day","grid-body","grid-head","grid-row","head-cell","header","heading","month-select","year-select"]});function ID(e){const t=new Date().getFullYear(),r=Math.max(e.placeholderYear,t);let n,i;if(e.minValue)n=e.minValue.year;else{const a=r-100;n=e.placeholderYear<a?e.placeholderYear-10:a}e.maxValue?i=e.maxValue.year:i=r+10,n>i&&(n=i);const s=i-n+1;return Array.from({length:s},(a,o)=>n+o)}var Ar=new Ft("Calendar.Root | RangeCalender.Root"),Av=class _y{static create(t){return Ar.set(new _y(t))}opts;#e=D(()=>this.months.map(t=>t.value));get visibleMonths(){return d(this.#e)}set visibleMonths(t){$(this.#e,t)}formatter;accessibleHeadingId=Nn();domContext;attachment;#t=ae(Me([]));get months(){return d(this.#t)}set months(t){$(this.#t,t,!0)}announcer;constructor(t){this.opts=t,this.attachment=et(this.opts.ref),this.domContext=new Bi(t.ref),this.announcer=Do(null),this.formatter=kv({initialLocale:this.opts.locale.current,monthFormat:this.opts.monthFormat,yearFormat:this.opts.yearFormat}),this.setMonths=this.setMonths.bind(this),this.nextPage=this.nextPage.bind(this),this.prevPage=this.prevPage.bind(this),this.prevYear=this.prevYear.bind(this),this.nextYear=this.nextYear.bind(this),this.setYear=this.setYear.bind(this),this.setMonth=this.setMonth.bind(this),this.isOutsideVisibleMonths=this.isOutsideVisibleMonths.bind(this),this.isDateDisabled=this.isDateDisabled.bind(this),this.isDateSelected=this.isDateSelected.bind(this),this.shiftFocus=this.shiftFocus.bind(this),this.handleCellClick=this.handleCellClick.bind(this),this.handleMultipleUpdate=this.handleMultipleUpdate.bind(this),this.handleSingleUpdate=this.handleSingleUpdate.bind(this),this.onkeydown=this.onkeydown.bind(this),this.getBitsAttr=this.getBitsAttr.bind(this),En(()=>{this.announcer=Do(this.domContext.getDocument())}),this.months=sa({dateObj:this.opts.placeholder.current,weekStartsOn:this.opts.weekStartsOn.current,locale:this.opts.locale.current,fixedWeeks:this.opts.fixedWeeks.current,numberOfMonths:this.opts.numberOfMonths.current}),this.#s(),this.#o(),this.#a(),wD({placeholder:this.opts.placeholder,getVisibleMonths:()=>this.visibleMonths,weekStartsOn:this.opts.weekStartsOn,locale:this.opts.locale,fixedWeeks:this.opts.fixedWeeks,numberOfMonths:this.opts.numberOfMonths,setMonths:r=>this.months=r}),bD({fixedWeeks:this.opts.fixedWeeks,locale:this.opts.locale,numberOfMonths:this.opts.numberOfMonths,placeholder:this.opts.placeholder,setMonths:this.setMonths,weekStartsOn:this.opts.weekStartsOn}),it(()=>this.fullCalendarLabel,r=>{const n=this.domContext.getElementById(this.accessibleHeadingId);n&&(n.textContent=r)}),it(()=>this.opts.value.current,()=>{const r=this.opts.value.current;if(Array.isArray(r)&&r.length){const n=r[r.length-1];n&&this.opts.placeholder.current!==n&&(this.opts.placeholder.current=n)}else!Array.isArray(r)&&r&&this.opts.placeholder.current!==r&&(this.opts.placeholder.current=r)}),CD({placeholder:t.placeholder,defaultPlaceholder:t.defaultPlaceholder,isDateDisabled:t.isDateDisabled,maxValue:t.maxValue,minValue:t.minValue,ref:t.ref})}setMonths(t){this.months=t}#r=D(()=>yD({months:this.months,formatter:this.formatter,weekdayFormat:this.opts.weekdayFormat.current}));get weekdays(){return d(this.#r)}set weekdays(t){$(this.#r,t)}#n=D(()=>Re(()=>this.opts.placeholder.current.year));get initialPlaceholderYear(){return d(this.#n)}set initialPlaceholderYear(t){$(this.#n,t)}#i=D(()=>ID({minValue:this.opts.minValue.current,maxValue:this.opts.maxValue.current,placeholderYear:this.initialPlaceholderYear}));get defaultYears(){return d(this.#i)}set defaultYears(t){$(this.#i,t)}#s(){ve(()=>{if(Re(()=>this.opts.initialFocus.current)){const t=this.opts.ref.current?.querySelector("[data-focused]");t&&t.focus()}})}#o(){ve(()=>{if(this.opts.ref.current)return _D({calendarNode:this.opts.ref.current,label:this.fullCalendarLabel,accessibleHeadingId:this.accessibleHeadingId})})}#a(){Ol(()=>{this.formatter.getLocale()!==this.opts.locale.current&&this.formatter.setLocale(this.opts.locale.current)})}nextPage(){vD({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:t=>this.opts.placeholder.current=t,weekStartsOn:this.opts.weekStartsOn.current,months:this.months})}prevPage(){gD({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:t=>this.opts.placeholder.current=t,weekStartsOn:this.opts.weekStartsOn.current,months:this.months})}nextYear(){this.opts.placeholder.current=this.opts.placeholder.current.add({years:1})}prevYear(){this.opts.placeholder.current=this.opts.placeholder.current.subtract({years:1})}setYear(t){this.opts.placeholder.current=this.opts.placeholder.current.set({year:t})}setMonth(t){this.opts.placeholder.current=this.opts.placeholder.current.set({month:t})}#l=D(()=>kD({maxValue:this.opts.maxValue.current,months:this.months,disabled:this.opts.disabled.current}));get isNextButtonDisabled(){return d(this.#l)}set isNextButtonDisabled(t){$(this.#l,t)}#u=D(()=>SD({minValue:this.opts.minValue.current,months:this.months,disabled:this.opts.disabled.current}));get isPrevButtonDisabled(){return d(this.#u)}set isPrevButtonDisabled(t){$(this.#u,t)}#c=D(()=>{const t=this.opts.value.current,r=this.opts.isDateDisabled.current,n=this.opts.isDateUnavailable.current;if(Array.isArray(t)){if(!t.length)return!1;for(const i of t)if(r(i)||n(i))return!0}else{if(!t)return!1;if(r(t)||n(t))return!0}return!1});get isInvalid(){return d(this.#c)}set isInvalid(t){$(this.#c,t)}#d=D(()=>(this.opts.monthFormat.current,this.opts.yearFormat.current,ED({months:this.months,formatter:this.formatter,locale:this.opts.locale.current})));get headingValue(){return d(this.#d)}set headingValue(t){$(this.#d,t)}#h=D(()=>`${this.opts.calendarLabel.current} ${this.headingValue}`);get fullCalendarLabel(){return d(this.#h)}set fullCalendarLabel(t){$(this.#h,t)}isOutsideVisibleMonths(t){return!this.visibleMonths.some(r=>vu(t,r))}isDateDisabled(t){if(this.opts.isDateDisabled.current(t)||this.opts.disabled.current)return!0;const r=this.opts.minValue.current,n=this.opts.maxValue.current;return!!(r&&oi(t,r)||n&&oi(n,t))}isDateSelected(t){const r=this.opts.value.current;return Array.isArray(r)?r.some(n=>Dn(n,t)):r?Dn(r,t):!1}shiftFocus(t,r){return pD({node:t,add:r,placeholder:this.opts.placeholder,calendarNode:this.opts.ref.current,isPrevButtonDisabled:this.isPrevButtonDisabled,isNextButtonDisabled:this.isNextButtonDisabled,months:this.months,numberOfMonths:this.opts.numberOfMonths.current})}#p(t){if(this.opts.type.current!=="multiple"||!this.opts.maxDays.current)return!0;const r=t.length;return!(this.opts.maxDays.current&&r>this.opts.maxDays.current)}handleCellClick(t,r){if(this.opts.readonly.current||this.opts.isDateDisabled.current?.(r)||this.opts.isDateUnavailable.current?.(r))return;const n=this.opts.value.current;if(this.opts.type.current==="multiple")(Array.isArray(n)||n===void 0)&&(this.opts.value.current=this.handleMultipleUpdate(n,r));else if(!Array.isArray(n)){const i=this.handleSingleUpdate(n,r);i?this.announcer.announce(`Selected Date: ${this.formatter.selectedDate(i,!1)}`,"polite"):this.announcer.announce("Selected date is now empty.","polite",5e3),this.opts.value.current=OD(i,n),i!==void 0&&this.opts.onDateSelect?.current?.()}}handleMultipleUpdate(t,r){if(!t){const s=[r];return this.#p(s)?s:[r]}if(!Array.isArray(t))return;const n=t.findIndex(s=>Dn(s,r)),i=this.opts.preventDeselect.current;if(n===-1){const s=[...t,r];return this.#p(s)?s:[r]}else{if(i)return t;{const s=t.filter(a=>!Dn(a,r));if(!s.length){this.opts.placeholder.current=r;return}return s}}}handleSingleUpdate(t,r){if(Array.isArray(t),!t)return r;if(!this.opts.preventDeselect.current&&Dn(t,r)){this.opts.placeholder.current=r;return}return r}onkeydown(t){mD({event:t,handleCellClick:this.handleCellClick,shiftFocus:this.shiftFocus,placeholderValue:this.opts.placeholder.current})}#f=D(()=>({months:this.months,weekdays:this.weekdays}));get snippetProps(){return d(this.#f)}set snippetProps(t){$(this.#f,t)}getBitsAttr=t=>DD.getAttr(t);#m=D(()=>({...TD({fullCalendarLabel:this.fullCalendarLabel,id:this.opts.id.current,isInvalid:this.isInvalid,disabled:this.opts.disabled.current,readonly:this.opts.readonly.current}),[this.getBitsAttr("root")]:"",onkeydown:this.onkeydown,...this.attachment}));get props(){return d(this.#m)}set props(t){$(this.#m,t)}},PD=class wy{static create(t){return new wy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"aria-hidden":Ku(!0),"data-disabled":Ve(this.root.opts.disabled.current),"data-readonly":Ve(this.root.opts.readonly.current),[this.root.getBitsAttr("heading")]:"",...this.attachment}));get props(){return d(this.#e)}set props(t){$(this.#e,t)}},Cv=new Ft("Calendar.Cell | RangeCalendar.Cell"),MD=class ky{static create(t){return Cv.set(new ky(t,Ar.get()))}opts;root;#e=D(()=>Zt(this.opts.date.current));get cellDate(){return d(this.#e)}set cellDate(t){$(this.#e,t)}#t=D(()=>this.root.opts.isDateUnavailable.current(this.opts.date.current));get isUnavailable(){return d(this.#t)}set isUnavailable(t){$(this.#t,t)}#r=D(()=>K1(this.opts.date.current,Xt()));get isDateToday(){return d(this.#r)}set isDateToday(t){$(this.#r,t)}#n=D(()=>!vu(this.opts.date.current,this.opts.month.current));get isOutsideMonth(){return d(this.#n)}set isOutsideMonth(t){$(this.#n,t)}#i=D(()=>this.root.isOutsideVisibleMonths(this.opts.date.current));get isOutsideVisibleMonths(){return d(this.#i)}set isOutsideVisibleMonths(t){$(this.#i,t)}#s=D(()=>this.root.isDateDisabled(this.opts.date.current)||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current);get isDisabled(){return d(this.#s)}set isDisabled(t){$(this.#s,t)}#o=D(()=>Dn(this.opts.date.current,this.root.opts.placeholder.current));get isFocusedDate(){return d(this.#o)}set isFocusedDate(t){$(this.#o,t)}#a=D(()=>this.root.isDateSelected(this.opts.date.current));get isSelectedDate(){return d(this.#a)}set isSelectedDate(t){$(this.#a,t)}#l=D(()=>this.root.formatter.custom(this.cellDate,{weekday:"long",month:"long",day:"numeric",year:"numeric"}));get labelText(){return d(this.#l)}set labelText(t){$(this.#l,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#u=D(()=>({disabled:this.isDisabled,unavailable:this.isUnavailable,selected:this.isSelectedDate,day:`${this.opts.date.current.day}`}));get snippetProps(){return d(this.#u)}set snippetProps(t){$(this.#u,t)}#c=D(()=>this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current||this.isUnavailable);get ariaDisabled(){return d(this.#c)}set ariaDisabled(t){$(this.#c,t)}#d=D(()=>({"data-unavailable":Ve(this.isUnavailable),"data-today":this.isDateToday?"":void 0,"data-outside-month":this.isOutsideMonth?"":void 0,"data-outside-visible-months":this.isOutsideVisibleMonths?"":void 0,"data-focused":this.isFocusedDate?"":void 0,"data-selected":Ve(this.isSelectedDate),"data-value":this.opts.date.current.toString(),"data-type":zO(this.opts.date.current),"data-disabled":Ve(this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current)}));get sharedDataAttrs(){return d(this.#d)}set sharedDataAttrs(t){$(this.#d,t)}#h=D(()=>({id:this.opts.id.current,role:"gridcell","aria-selected":Tr(this.isSelectedDate),"aria-disabled":Tr(this.ariaDisabled),...this.sharedDataAttrs,[this.root.getBitsAttr("cell")]:"",...this.attachment}));get props(){return d(this.#h)}set props(t){$(this.#h,t)}},$D=class Sy{static create(t){return new Sy(t,Cv.get())}opts;cell;attachment;constructor(t,r){this.opts=t,this.cell=r,this.onclick=this.onclick.bind(this),this.attachment=et(this.opts.ref)}#e=D(()=>this.cell.isOutsideMonth&&this.cell.root.opts.disableDaysOutsideMonth.current||this.cell.isDisabled?void 0:this.cell.isFocusedDate?0:-1);onclick(t){this.cell.isDisabled||this.cell.root.handleCellClick(t,this.cell.opts.date.current)}#t=D(()=>({disabled:this.cell.isDisabled,unavailable:this.cell.isUnavailable,selected:this.cell.isSelectedDate,day:`${this.cell.opts.date.current.day}`}));get snippetProps(){return d(this.#t)}set snippetProps(t){$(this.#t,t)}#r=D(()=>({id:this.opts.id.current,role:"button","aria-label":this.cell.labelText,"aria-disabled":Tr(this.cell.ariaDisabled),...this.cell.sharedDataAttrs,tabindex:d(this.#e),[this.cell.root.getBitsAttr("day")]:"","data-bits-day":"",onclick:this.onclick,...this.attachment}));get props(){return d(this.#r)}set props(t){$(this.#r,t)}},FD=class Ey{static create(t){return new Ey(t,Ar.get())}opts;root;#e=D(()=>this.root.isNextButtonDisabled);get isDisabled(){return d(this.#e)}set isDisabled(t){$(this.#e,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=et(this.opts.ref)}onclick(t){this.isDisabled||this.root.nextPage()}#t=D(()=>({id:this.opts.id.current,role:"button",type:"button","aria-label":"Next","aria-disabled":Tr(this.isDisabled),"data-disabled":Ve(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("next-button")]:"",onclick:this.onclick,...this.attachment}));get props(){return d(this.#t)}set props(t){$(this.#t,t)}},ND=class Ty{static create(t){return new Ty(t,Ar.get())}opts;root;#e=D(()=>this.root.isPrevButtonDisabled);get isDisabled(){return d(this.#e)}set isDisabled(t){$(this.#e,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=et(this.opts.ref)}onclick(t){this.isDisabled||this.root.prevPage()}#t=D(()=>({id:this.opts.id.current,role:"button",type:"button","aria-label":"Previous","aria-disabled":Tr(this.isDisabled),"data-disabled":Ve(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("prev-button")]:"",onclick:this.onclick,...this.attachment}));get props(){return d(this.#t)}set props(t){$(this.#t,t)}},RD=class xy{static create(t){return new xy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,tabindex:-1,role:"grid","aria-readonly":Tr(this.root.opts.readonly.current),"aria-disabled":Tr(this.root.opts.disabled.current),"data-readonly":Ve(this.root.opts.readonly.current),"data-disabled":Ve(this.root.opts.disabled.current),[this.root.getBitsAttr("grid")]:"",...this.attachment}));get props(){return d(this.#e)}set props(t){$(this.#e,t)}},LD=class Ay{static create(t){return new Ay(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Ve(this.root.opts.disabled.current),"data-readonly":Ve(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-body")]:"",...this.attachment}));get props(){return d(this.#e)}set props(t){$(this.#e,t)}},zD=class Cy{static create(t){return new Cy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Ve(this.root.opts.disabled.current),"data-readonly":Ve(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-head")]:"",...this.attachment}));get props(){return d(this.#e)}set props(t){$(this.#e,t)}},qD=class Oy{static create(t){return new Oy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Ve(this.root.opts.disabled.current),"data-readonly":Ve(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-row")]:"",...this.attachment}));get props(){return d(this.#e)}set props(t){$(this.#e,t)}},UD=class Dy{static create(t){return new Dy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Ve(this.root.opts.disabled.current),"data-readonly":Ve(this.root.opts.readonly.current),[this.root.getBitsAttr("head-cell")]:"",...this.attachment}));get props(){return d(this.#e)}set props(t){$(this.#e,t)}},BD=class Iy{static create(t){return new Iy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Ve(this.root.opts.disabled.current),"data-readonly":Ve(this.root.opts.readonly.current),[this.root.getBitsAttr("header")]:"",...this.attachment}));get props(){return d(this.#e)}set props(t){$(this.#e,t)}},VD=new Set(["$$slots","$$events","$$legacy","$$host","child","children","id","ref","value","onValueChange","placeholder","onPlaceholderChange","weekdayFormat","weekStartsOn","pagedNavigation","isDateDisabled","isDateUnavailable","fixedWeeks","numberOfMonths","locale","calendarLabel","disabled","readonly","minValue","maxValue","preventDeselect","type","disableDaysOutsideMonth","initialFocus","maxDays","monthFormat","yearFormat"]),jD=B("<div><!></div>");function Ov(e,t){ne(t,!0);let r=_(t,"child",7),n=_(t,"children",7),i=_(t,"id",23,Nn),s=_(t,"ref",15,null),a=_(t,"value",15),o=_(t,"onValueChange",7,Te),l=_(t,"placeholder",15),c=_(t,"onPlaceholderChange",7,Te),f=_(t,"weekdayFormat",7,"narrow"),u=_(t,"weekStartsOn",7),p=_(t,"pagedNavigation",7,!1),h=_(t,"isDateDisabled",7,()=>!1),g=_(t,"isDateUnavailable",7,()=>!1),v=_(t,"fixedWeeks",7,!1),m=_(t,"numberOfMonths",7,1),y=_(t,"locale",7),E=_(t,"calendarLabel",7,"Event"),k=_(t,"disabled",7,!1),T=_(t,"readonly",7,!1),A=_(t,"minValue",7,void 0),O=_(t,"maxValue",7,void 0),F=_(t,"preventDeselect",7,!1),R=_(t,"type",7),Y=_(t,"disableDaysOutsideMonth",7,!0),N=_(t,"initialFocus",7,!1),X=_(t,"maxDays",7),q=_(t,"monthFormat",7,"long"),le=_(t,"yearFormat",7,"numeric"),he=He(t,VD);const j=uv({defaultValue:a(),minValue:A(),maxValue:O()});function oe(){l()===void 0&&l(j)}oe(),it.pre(()=>l(),()=>{oe()});function ee(){a()===void 0&&a(R()==="single"?void 0:[])}ee(),it.pre(()=>a(),()=>{ee()});const fe=Av.create({id:z(()=>i()),ref:z(()=>s(),L=>s(L)),weekdayFormat:z(()=>f()),weekStartsOn:z(()=>u()),pagedNavigation:z(()=>p()),isDateDisabled:z(()=>h()),isDateUnavailable:z(()=>g()),fixedWeeks:z(()=>v()),numberOfMonths:z(()=>m()),locale:Bm(()=>y()),calendarLabel:z(()=>E()),readonly:z(()=>T()),disabled:z(()=>k()),minValue:z(()=>A()),maxValue:z(()=>O()),disableDaysOutsideMonth:z(()=>Y()),initialFocus:z(()=>N()),maxDays:z(()=>X()),placeholder:z(()=>l(),L=>{l(L),c()(L)}),preventDeselect:z(()=>F()),value:z(()=>a(),L=>{a(L),o()(L)}),type:z(()=>R()),monthFormat:z(()=>q()),yearFormat:z(()=>le()),defaultPlaceholder:j}),ce=D(()=>Ke(he,fe.props));var de={get child(){return r()},set child(L){r(L),b()},get children(){return n()},set children(L){n(L),b()},get id(){return i()},set id(L=Nn()){i(L),b()},get ref(){return s()},set ref(L=null){s(L),b()},get value(){return a()},set value(L){a(L),b()},get onValueChange(){return o()},set onValueChange(L=Te){o(L),b()},get placeholder(){return l()},set placeholder(L){l(L),b()},get onPlaceholderChange(){return c()},set onPlaceholderChange(L=Te){c(L),b()},get weekdayFormat(){return f()},set weekdayFormat(L="narrow"){f(L),b()},get weekStartsOn(){return u()},set weekStartsOn(L){u(L),b()},get pagedNavigation(){return p()},set pagedNavigation(L=!1){p(L),b()},get isDateDisabled(){return h()},set isDateDisabled(L=()=>!1){h(L),b()},get isDateUnavailable(){return g()},set isDateUnavailable(L=()=>!1){g(L),b()},get fixedWeeks(){return v()},set fixedWeeks(L=!1){v(L),b()},get numberOfMonths(){return m()},set numberOfMonths(L=1){m(L),b()},get locale(){return y()},set locale(L){y(L),b()},get calendarLabel(){return E()},set calendarLabel(L="Event"){E(L),b()},get disabled(){return k()},set disabled(L=!1){k(L),b()},get readonly(){return T()},set readonly(L=!1){T(L),b()},get minValue(){return A()},set minValue(L=void 0){A(L),b()},get maxValue(){return O()},set maxValue(L=void 0){O(L),b()},get preventDeselect(){return F()},set preventDeselect(L=!1){F(L),b()},get type(){return R()},set type(L){R(L),b()},get disableDaysOutsideMonth(){return Y()},set disableDaysOutsideMonth(L=!0){Y(L),b()},get initialFocus(){return N()},set initialFocus(L=!1){N(L),b()},get maxDays(){return X()},set maxDays(L){X(L),b()},get monthFormat(){return q()},set monthFormat(L="long"){q(L),b()},get yearFormat(){return le()},set yearFormat(L="numeric"){le(L),b()}},G=re(),Q=U(G),P=L=>{var be=re(),Z=U(be);{let w=D(()=>({props:d(ce),...fe.snippetProps}));Se(Z,r,()=>d(w))}x(L,be)},te=L=>{var be=jD();Ue(be,()=>({...d(ce)}));var Z=M(be);Se(Z,()=>n()??qe,()=>fe.snippetProps),I(be),x(L,be)};return ue(Q,L=>{r()?L(P):L(te,-1)}),x(e,G),ie(de)}se(Ov,{child:{},children:{},id:{},ref:{},value:{},onValueChange:{},placeholder:{},onPlaceholderChange:{},weekdayFormat:{},weekStartsOn:{},pagedNavigation:{},isDateDisabled:{},isDateUnavailable:{},fixedWeeks:{},numberOfMonths:{},locale:{},calendarLabel:{},disabled:{},readonly:{},minValue:{},maxValue:{},preventDeselect:{},type:{},disableDaysOutsideMonth:{},initialFocus:{},maxDays:{},monthFormat:{},yearFormat:{}},[],[],{mode:"open"});var ZD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),WD=B("<div><!></div>");function dc(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Pe(r)),o=He(t,ZD);const l=$D.create({id:z(()=>a()),ref:z(()=>s(),v=>s(v))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get ref(){return s()},set ref(v=null){s(v),b()},get id(){return a()},set id(v=Pe(r)){a(v),b()}},u=re(),p=U(u),h=v=>{var m=re(),y=U(m);{let E=D(()=>({props:d(c),...l.snippetProps}));Se(y,i,()=>d(E))}x(v,m)},g=v=>{var m=WD();Ue(m,()=>({...d(c)}));var y=M(m),E=T=>{var A=re(),O=U(A);Se(O,()=>n()??qe,()=>l.snippetProps),x(T,A)},k=T=>{var A=Bt();J(()=>H(A,l.cell.opts.date.current.day)),x(T,A)};ue(y,T=>{n()?T(E):T(k,-1)}),I(m),x(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),x(e,u),ie(f)}se(dc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var HD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),GD=B("<table><!></table>");function fc(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Pe(r)),o=He(t,HD);const l=RD.create({id:z(()=>a()),ref:z(()=>s(),v=>s(v))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get ref(){return s()},set ref(v=null){s(v),b()},get id(){return a()},set id(v=Pe(r)){a(v),b()}},u=re(),p=U(u),h=v=>{var m=re(),y=U(m);Se(y,i,()=>({props:d(c)})),x(v,m)},g=v=>{var m=GD();Ue(m,()=>({...d(c)}));var y=M(m);Se(y,()=>n()??qe),I(m),x(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),x(e,u),ie(f)}se(fc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var KD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),YD=B("<tbody><!></tbody>");function hc(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Pe(r)),o=He(t,KD);const l=LD.create({id:z(()=>a()),ref:z(()=>s(),v=>s(v))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get ref(){return s()},set ref(v=null){s(v),b()},get id(){return a()},set id(v=Pe(r)){a(v),b()}},u=re(),p=U(u),h=v=>{var m=re(),y=U(m);Se(y,i,()=>({props:d(c)})),x(v,m)},g=v=>{var m=YD();Ue(m,()=>({...d(c)}));var y=M(m);Se(y,()=>n()??qe),I(m),x(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),x(e,u),ie(f)}se(hc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var JD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id","date","month"]),QD=B("<td><!></td>");function pc(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Pe(r)),o=_(t,"date",7),l=_(t,"month",7),c=He(t,JD);const f=MD.create({id:z(()=>a()),ref:z(()=>s(),y=>s(y)),date:z(()=>o()),month:z(()=>l())}),u=D(()=>Ke(c,f.props));var p={get children(){return n()},set children(y){n(y),b()},get child(){return i()},set child(y){i(y),b()},get ref(){return s()},set ref(y=null){s(y),b()},get id(){return a()},set id(y=Pe(r)){a(y),b()},get date(){return o()},set date(y){o(y),b()},get month(){return l()},set month(y){l(y),b()}},h=re(),g=U(h),v=y=>{var E=re(),k=U(E);{let T=D(()=>({props:d(u),...f.snippetProps}));Se(k,i,()=>d(T))}x(y,E)},m=y=>{var E=QD();Ue(E,()=>({...d(u)}));var k=M(E);Se(k,()=>n()??qe,()=>f.snippetProps),I(E),x(y,E)};return ue(g,y=>{i()?y(v):y(m,-1)}),x(e,h),ie(p)}se(pc,{children:{},child:{},ref:{},id:{},date:{},month:{}},[],[],{mode:"open"});var XD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),eI=B("<thead><!></thead>");function mc(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Pe(r)),o=He(t,XD);const l=zD.create({id:z(()=>a()),ref:z(()=>s(),v=>s(v))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get ref(){return s()},set ref(v=null){s(v),b()},get id(){return a()},set id(v=Pe(r)){a(v),b()}},u=re(),p=U(u),h=v=>{var m=re(),y=U(m);Se(y,i,()=>({props:d(c)})),x(v,m)},g=v=>{var m=eI();Ue(m,()=>({...d(c)}));var y=M(m);Se(y,()=>n()??qe),I(m),x(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),x(e,u),ie(f)}se(mc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var tI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),rI=B("<th><!></th>");function vc(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Pe(r)),o=He(t,tI);const l=UD.create({id:z(()=>a()),ref:z(()=>s(),v=>s(v))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get ref(){return s()},set ref(v=null){s(v),b()},get id(){return a()},set id(v=Pe(r)){a(v),b()}},u=re(),p=U(u),h=v=>{var m=re(),y=U(m);Se(y,i,()=>({props:d(c)})),x(v,m)},g=v=>{var m=rI();Ue(m,()=>({...d(c)}));var y=M(m);Se(y,()=>n()??qe),I(m),x(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),x(e,u),ie(f)}se(vc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var nI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),iI=B("<tr><!></tr>");function aa(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Pe(r)),o=He(t,nI);const l=qD.create({id:z(()=>a()),ref:z(()=>s(),v=>s(v))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get ref(){return s()},set ref(v=null){s(v),b()},get id(){return a()},set id(v=Pe(r)){a(v),b()}},u=re(),p=U(u),h=v=>{var m=re(),y=U(m);Se(y,i,()=>({props:d(c)})),x(v,m)},g=v=>{var m=iI();Ue(m,()=>({...d(c)}));var y=M(m);Se(y,()=>n()??qe),I(m),x(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),x(e,u),ie(f)}se(aa,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var sI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),aI=B("<header><!></header>");function gc(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Pe(r)),o=He(t,sI);const l=BD.create({id:z(()=>a()),ref:z(()=>s(),v=>s(v))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get ref(){return s()},set ref(v=null){s(v),b()},get id(){return a()},set id(v=Pe(r)){a(v),b()}},u=re(),p=U(u),h=v=>{var m=re(),y=U(m);Se(y,i,()=>({props:d(c)})),x(v,m)},g=v=>{var m=aI();Ue(m,()=>({...d(c)}));var y=M(m);Se(y,()=>n()??qe),I(m),x(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),x(e,u),ie(f)}se(gc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var oI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),lI=B("<div><!></div>");function yc(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Pe(r)),o=He(t,oI);const l=PD.create({id:z(()=>a()),ref:z(()=>s(),v=>s(v))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get ref(){return s()},set ref(v=null){s(v),b()},get id(){return a()},set id(v=Pe(r)){a(v),b()}},u=re(),p=U(u),h=v=>{var m=re(),y=U(m);Se(y,i,()=>({props:d(c),headingValue:l.root.headingValue})),x(v,m)},g=v=>{var m=lI();Ue(m,()=>({...d(c)}));var y=M(m),E=T=>{var A=re(),O=U(A);Se(O,()=>n()??qe,()=>({headingValue:l.root.headingValue})),x(T,A)},k=T=>{var A=Bt();J(()=>H(A,l.root.headingValue)),x(T,A)};ue(y,T=>{n()?T(E):T(k,-1)}),I(m),x(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),x(e,u),ie(f)}se(yc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var uI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]),cI=B("<button><!></button>");function bc(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"id",23,()=>Pe(r)),a=_(t,"ref",15,null),o=_(t,"tabindex",7,0),l=He(t,uI);const c=FD.create({id:z(()=>s()),ref:z(()=>a(),m=>a(m))}),f=D(()=>Ke(l,c.props,{tabindex:o()}));var u={get children(){return n()},set children(m){n(m),b()},get child(){return i()},set child(m){i(m),b()},get id(){return s()},set id(m=Pe(r)){s(m),b()},get ref(){return a()},set ref(m=null){a(m),b()},get tabindex(){return o()},set tabindex(m=0){o(m),b()}},p=re(),h=U(p),g=m=>{var y=re(),E=U(y);Se(E,i,()=>({props:d(f)})),x(m,y)},v=m=>{var y=cI();Ue(y,()=>({...d(f)}));var E=M(y);Se(E,()=>n()??qe),I(y),x(m,y)};return ue(h,m=>{i()?m(g):m(v,-1)}),x(e,p),ie(u)}se(bc,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var dI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]),fI=B("<button><!></button>");function _c(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"id",23,()=>Pe(r)),a=_(t,"ref",15,null),o=_(t,"tabindex",7,0),l=He(t,dI);const c=ND.create({id:z(()=>s()),ref:z(()=>a(),m=>a(m))}),f=D(()=>Ke(l,c.props,{tabindex:o()}));var u={get children(){return n()},set children(m){n(m),b()},get child(){return i()},set child(m){i(m),b()},get id(){return s()},set id(m=Pe(r)){s(m),b()},get ref(){return a()},set ref(m=null){a(m),b()},get tabindex(){return o()},set tabindex(m=0){o(m),b()}},p=re(),h=U(p),g=m=>{var y=re(),E=U(y);Se(E,i,()=>({props:d(f)})),x(m,y)},v=m=>{var y=fI();Ue(y,()=>({...d(f)}));var E=M(y);Se(E,()=>n()??qe),I(y),x(m,y)};return ue(h,m=>{i()?m(g):m(v,-1)}),x(e,p),ie(u)}se(_c,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var hI=new Set(["$$slots","$$events","$$legacy","$$host","value"]),Dv=B("<input/>");function Iv(e,t){ne(t,!0);let r=_(t,"value",15),n=He(t,hI);const i=D(()=>Ke(n,{"aria-hidden":"true",tabindex:-1,style:{...Cm,position:"absolute",top:"0",left:"0"}}));var s={get value(){return r()},set value(f){r(f),b()}},a=re(),o=U(a),l=f=>{var u=Dv();Ue(u,()=>({...d(i),value:r()}),void 0,void 0,void 0,void 0,!0),x(f,u)},c=f=>{var u=Dv();Ue(u,()=>({...d(i)}),void 0,void 0,void 0,void 0,!0),qa(u,r),x(f,u)};return ue(o,f=>{d(i).type==="checkbox"?f(l):f(c,-1)}),x(e,a),ie(s)}se(Iv,{value:{}},[],[],{mode:"open"});var pI=["top","right","bottom","left"],Rn=Math.min,tr=Math.max,No=Math.round,Ro=Math.floor,Yr=e=>({x:e,y:e}),mI={left:"right",right:"left",bottom:"top",top:"bottom"};function wc(e,t,r){return tr(e,Rn(t,r))}function un(e,t){return typeof e=="function"?e(t):e}function cn(e){return e.split("-")[0]}function Vi(e){return e.split("-")[1]}function kc(e){return e==="x"?"y":"x"}function Sc(e){return e==="y"?"height":"width"}function Jr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Ec(e){return kc(Jr(e))}function vI(e,t,r){r===void 0&&(r=!1);const n=Vi(e),i=Ec(e),s=Sc(i);let a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Lo(a)),[a,Lo(a)]}function gI(e){const t=Lo(e);return[Tc(e),t,Tc(t)]}function Tc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Pv=["left","right"],Mv=["right","left"],yI=["top","bottom"],bI=["bottom","top"];function _I(e,t,r){switch(e){case"top":case"bottom":return r?t?Mv:Pv:t?Pv:Mv;case"left":case"right":return t?yI:bI;default:return[]}}function wI(e,t,r,n){const i=Vi(e);let s=_I(cn(e),r==="start",n);return i&&(s=s.map(a=>a+"-"+i),t&&(s=s.concat(s.map(Tc)))),s}function Lo(e){const t=cn(e);return mI[t]+e.slice(t.length)}function kI(e){return{top:0,right:0,bottom:0,left:0,...e}}function $v(e){return typeof e!="number"?kI(e):{top:e,right:e,bottom:e,left:e}}function zo(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function Fv(e,t,r){let{reference:n,floating:i}=e;const s=Jr(t),a=Ec(t),o=Sc(a),l=cn(t),c=s==="y",f=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2,p=n[o]/2-i[o]/2;let h;switch(l){case"top":h={x:f,y:n.y-i.height};break;case"bottom":h={x:f,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:u};break;case"left":h={x:n.x-i.width,y:u};break;default:h={x:n.x,y:n.y}}switch(Vi(t)){case"start":h[a]-=p*(r&&c?-1:1);break;case"end":h[a]+=p*(r&&c?-1:1);break}return h}async function SI(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:s,rects:a,elements:o,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:p=!1,padding:h=0}=un(t,e),g=$v(h),v=o[p?u==="floating"?"reference":"floating":u],m=zo(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(v)))==null||r?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(o.floating)),boundary:c,rootBoundary:f,strategy:l})),y=u==="floating"?{x:n,y:i,width:a.floating.width,height:a.floating.height}:a.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(o.floating)),k=await(s.isElement==null?void 0:s.isElement(E))?await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1}:{x:1,y:1},T=zo(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:y,offsetParent:E,strategy:l}):y);return{top:(m.top-T.top+g.top)/k.y,bottom:(T.bottom-m.bottom+g.bottom)/k.y,left:(m.left-T.left+g.left)/k.x,right:(T.right-m.right+g.right)/k.x}}var EI=50,TI=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:a}=r,o=a.detectOverflow?a:{...a,detectOverflow:SI},l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:u}=Fv(c,n,l),p=n,h=0;const g={};for(let v=0;v<s.length;v++){const m=s[v];if(!m)continue;const{name:y,fn:E}=m,{x:k,y:T,data:A,reset:O}=await E({x:f,y:u,initialPlacement:n,placement:p,strategy:i,middlewareData:g,rects:c,platform:o,elements:{reference:e,floating:t}});f=k??f,u=T??u,g[y]={...g[y],...A},O&&h<EI&&(h++,typeof O=="object"&&(O.placement&&(p=O.placement),O.rects&&(c=O.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):O.rects),{x:f,y:u}=Fv(c,p,l)),v=-1)}return{x:f,y:u,placement:p,strategy:i,middlewareData:g}},xI=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:s,platform:a,elements:o,middlewareData:l}=t,{element:c,padding:f=0}=un(e,t)||{};if(c==null)return{};const u=$v(f),p={x:r,y:n},h=Ec(i),g=Sc(h),v=await a.getDimensions(c),m=h==="y",y=m?"top":"left",E=m?"bottom":"right",k=m?"clientHeight":"clientWidth",T=s.reference[g]+s.reference[h]-p[h]-s.floating[g],A=p[h]-s.reference[h],O=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let F=O?O[k]:0;(!F||!await(a.isElement==null?void 0:a.isElement(O)))&&(F=o.floating[k]||s.floating[g]);const R=T/2-A/2,Y=F/2-v[g]/2-1,N=Rn(u[y],Y),X=Rn(u[E],Y),q=N,le=F-v[g]-X,he=F/2-v[g]/2+R,j=wc(q,he,le),oe=!l.arrow&&Vi(i)!=null&&he!==j&&s.reference[g]/2-(he<q?N:X)-v[g]/2<0,ee=oe?he<q?he-q:he-le:0;return{[h]:p[h]+ee,data:{[h]:j,centerOffset:he-j-ee,...oe&&{alignmentOffset:ee}},reset:oe}}}),AI=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:s,rects:a,initialPlacement:o,platform:l,elements:c}=t,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...m}=un(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const y=cn(i),E=Jr(o),k=cn(o)===o,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),A=p||(k||!v?[Lo(o)]:gI(o)),O=g!=="none";!p&&O&&A.push(...wI(o,v,g,T));const F=[o,...A],R=await l.detectOverflow(t,m),Y=[];let N=((n=s.flip)==null?void 0:n.overflows)||[];if(f&&Y.push(R[y]),u){const he=vI(i,a,T);Y.push(R[he[0]],R[he[1]])}if(N=[...N,{placement:i,overflows:Y}],!Y.every(he=>he<=0)){var X,q;const he=(((X=s.flip)==null?void 0:X.index)||0)+1,j=F[he];if(j&&(!(u==="alignment"&&E!==Jr(j))||N.every(ee=>Jr(ee.placement)===E?ee.overflows[0]>0:!0)))return{data:{index:he,overflows:N},reset:{placement:j}};let oe=(q=N.filter(ee=>ee.overflows[0]<=0).sort((ee,fe)=>ee.overflows[1]-fe.overflows[1])[0])==null?void 0:q.placement;if(!oe)switch(h){case"bestFit":{var le;const ee=(le=N.filter(fe=>{if(O){const ce=Jr(fe.placement);return ce===E||ce==="y"}return!0}).map(fe=>[fe.placement,fe.overflows.filter(ce=>ce>0).reduce((ce,de)=>ce+de,0)]).sort((fe,ce)=>fe[1]-ce[1])[0])==null?void 0:le[0];ee&&(oe=ee);break}case"initialPlacement":oe=o;break}if(i!==oe)return{reset:{placement:oe}}}return{}}}};function Nv(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Rv(e){return pI.some(t=>e[t]>=0)}var CI=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:i="referenceHidden",...s}=un(e,t);switch(i){case"referenceHidden":{const a=Nv(await n.detectOverflow(t,{...s,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Rv(a)}}}case"escaped":{const a=Nv(await n.detectOverflow(t,{...s,altBoundary:!0}),r.floating);return{data:{escapedOffsets:a,escaped:Rv(a)}}}default:return{}}}}},Lv=new Set(["left","top"]);async function OI(e,t){const{placement:r,platform:n,elements:i}=e,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=cn(r),o=Vi(r),l=Jr(r)==="y",c=Lv.has(a)?-1:1,f=s&&l?-1:1,u=un(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return o&&typeof g=="number"&&(h=o==="end"?g*-1:g),l?{x:h*f,y:p*c}:{x:p*c,y:h*f}}var DI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:s,placement:a,middlewareData:o}=t,l=await OI(t,e);return a===((r=o.offset)==null?void 0:r.placement)&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:a}}}}},II=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i,platform:s}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:l={fn:y=>{let{x:E,y:k}=y;return{x:E,y:k}}},...c}=un(e,t),f={x:r,y:n},u=await s.detectOverflow(t,c),p=Jr(cn(i)),h=kc(p);let g=f[h],v=f[p];if(a){const y=h==="y"?"top":"left",E=h==="y"?"bottom":"right",k=g+u[y],T=g-u[E];g=wc(k,g,T)}if(o){const y=p==="y"?"top":"left",E=p==="y"?"bottom":"right",k=v+u[y],T=v-u[E];v=wc(k,v,T)}const m=l.fn({...t,[h]:g,[p]:v});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[h]:a,[p]:o}}}}}},PI=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:s,middlewareData:a}=t,{offset:o=0,mainAxis:l=!0,crossAxis:c=!0}=un(e,t),f={x:r,y:n},u=Jr(i),p=kc(u);let h=f[p],g=f[u];const v=un(o,t),m=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const k=p==="y"?"height":"width",T=s.reference[p]-s.floating[k]+m.mainAxis,A=s.reference[p]+s.reference[k]-m.mainAxis;h<T?h=T:h>A&&(h=A)}if(c){var y,E;const k=p==="y"?"width":"height",T=Lv.has(cn(i)),A=s.reference[u]-s.floating[k]+(T&&((y=a.offset)==null?void 0:y[u])||0)+(T?0:m.crossAxis),O=s.reference[u]+s.reference[k]+(T?0:((E=a.offset)==null?void 0:E[u])||0)-(T?m.crossAxis:0);g<A?g=A:g>O&&(g=O)}return{[p]:h,[u]:g}}}},MI=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:s,platform:a,elements:o}=t,{apply:l=()=>{},...c}=un(e,t),f=await a.detectOverflow(t,c),u=cn(i),p=Vi(i),h=Jr(i)==="y",{width:g,height:v}=s.floating;let m,y;u==="top"||u==="bottom"?(m=u,y=p===(await(a.isRTL==null?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(y=u,m=p==="end"?"top":"bottom");const E=v-f.top-f.bottom,k=g-f.left-f.right,T=Rn(v-f[m],E),A=Rn(g-f[y],k),O=!t.middlewareData.shift;let F=T,R=A;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(R=k),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(F=E),O&&!p){const N=tr(f.left,0),X=tr(f.right,0),q=tr(f.top,0),le=tr(f.bottom,0);h?R=g-2*(N!==0||X!==0?N+X:tr(f.left,f.right)):F=v-2*(q!==0||le!==0?q+le:tr(f.top,f.bottom))}await l({...t,availableWidth:R,availableHeight:F});const Y=await a.getDimensions(o.floating);return g!==Y.width||v!==Y.height?{reset:{rects:!0}}:{}}}};function qo(){return typeof window<"u"}function ji(e){return zv(e)?(e.nodeName||"").toLowerCase():"#document"}function rr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qr(e){var t;return(t=(zv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function zv(e){return qo()?e instanceof Node||e instanceof rr(e).Node:!1}function Cr(e){return qo()?e instanceof Element||e instanceof rr(e).Element:!1}function dn(e){return qo()?e instanceof HTMLElement||e instanceof rr(e).HTMLElement:!1}function qv(e){return!qo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof rr(e).ShadowRoot}function oa(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=Or(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&i!=="inline"&&i!=="contents"}function $I(e){return/^(table|td|th)$/.test(ji(e))}function Uo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var FI=/transform|translate|scale|rotate|perspective|filter/,NI=/paint|layout|strict|content/,li=e=>!!e&&e!=="none",xc;function Ac(e){const t=Cr(e)?Or(e):e;return li(t.transform)||li(t.translate)||li(t.scale)||li(t.rotate)||li(t.perspective)||!Cc()&&(li(t.backdropFilter)||li(t.filter))||FI.test(t.willChange||"")||NI.test(t.contain||"")}function RI(e){let t=Ln(e);for(;dn(t)&&!Zi(t);){if(Ac(t))return t;if(Uo(t))return null;t=Ln(t)}return null}function Cc(){return xc==null&&(xc=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),xc}function Zi(e){return/^(html|body|#document)$/.test(ji(e))}function Or(e){return rr(e).getComputedStyle(e)}function Bo(e){return Cr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ln(e){if(ji(e)==="html")return e;const t=e.assignedSlot||e.parentNode||qv(e)&&e.host||Qr(e);return qv(t)?t.host:t}function Uv(e){const t=Ln(e);return Zi(t)?e.ownerDocument?e.ownerDocument.body:e.body:dn(t)&&oa(t)?t:Uv(t)}function la(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=Uv(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),a=rr(i);if(s){const o=Oc(a);return t.concat(a,a.visualViewport||[],oa(i)?i:[],o&&r?la(o):[])}else return t.concat(i,la(i,[],r))}function Oc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Bv(e){const t=Or(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=dn(e),s=i?e.offsetWidth:r,a=i?e.offsetHeight:n,o=No(r)!==s||No(n)!==a;return o&&(r=s,n=a),{width:r,height:n,$:o}}function Dc(e){return Cr(e)?e:e.contextElement}function Wi(e){const t=Dc(e);if(!dn(t))return Yr(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:s}=Bv(t);let a=(s?No(r.width):r.width)/n,o=(s?No(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}var LI=Yr(0);function Vv(e){const t=rr(e);return!Cc()||!t.visualViewport?LI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function zI(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==rr(e)?!1:t}function ui(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),s=Dc(e);let a=Yr(1);t&&(n?Cr(n)&&(a=Wi(n)):a=Wi(e));const o=zI(s,r,n)?Vv(s):Yr(0);let l=(i.left+o.x)/a.x,c=(i.top+o.y)/a.y,f=i.width/a.x,u=i.height/a.y;if(s){const p=rr(s),h=n&&Cr(n)?rr(n):n;let g=p,v=Oc(g);for(;v&&n&&h!==g;){const m=Wi(v),y=v.getBoundingClientRect(),E=Or(v),k=y.left+(v.clientLeft+parseFloat(E.paddingLeft))*m.x,T=y.top+(v.clientTop+parseFloat(E.paddingTop))*m.y;l*=m.x,c*=m.y,f*=m.x,u*=m.y,l+=k,c+=T,g=rr(v),v=Oc(g)}}return zo({width:f,height:u,x:l,y:c})}function Vo(e,t){const r=Bo(e).scrollLeft;return t?t.left+r:ui(Qr(e)).left+r}function jv(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-Vo(e,r),y:r.top+t.scrollTop}}function qI(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const s=i==="fixed",a=Qr(n),o=t?Uo(t.floating):!1;if(n===a||o&&s)return r;let l={scrollLeft:0,scrollTop:0},c=Yr(1);const f=Yr(0),u=dn(n);if((u||!u&&!s)&&((ji(n)!=="body"||oa(a))&&(l=Bo(n)),u)){const h=ui(n);c=Wi(n),f.x=h.x+n.clientLeft,f.y=h.y+n.clientTop}const p=a&&!u&&!s?jv(a,l):Yr(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+f.x+p.x,y:r.y*c.y-l.scrollTop*c.y+f.y+p.y}}function UI(e){return Array.from(e.getClientRects())}function BI(e){const t=Qr(e),r=Bo(e),n=e.ownerDocument.body,i=tr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=tr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Vo(e);const o=-r.scrollTop;return Or(n).direction==="rtl"&&(a+=tr(t.clientWidth,n.clientWidth)-i),{width:i,height:s,x:a,y:o}}var Zv=25;function VI(e,t){const r=rr(e),n=Qr(e),i=r.visualViewport;let s=n.clientWidth,a=n.clientHeight,o=0,l=0;if(i){s=i.width,a=i.height;const f=Cc();(!f||f&&t==="fixed")&&(o=i.offsetLeft,l=i.offsetTop)}const c=Vo(n);if(c<=0){const f=n.ownerDocument,u=f.body,p=getComputedStyle(u),h=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(n.clientWidth-u.clientWidth-h);g<=Zv&&(s-=g)}else c<=Zv&&(s+=c);return{width:s,height:a,x:o,y:l}}function jI(e,t){const r=ui(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,s=dn(e)?Wi(e):Yr(1);return{width:e.clientWidth*s.x,height:e.clientHeight*s.y,x:i*s.x,y:n*s.y}}function Wv(e,t,r){let n;if(t==="viewport")n=VI(e,r);else if(t==="document")n=BI(Qr(e));else if(Cr(t))n=jI(t,r);else{const i=Vv(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return zo(n)}function Hv(e,t){const r=Ln(e);return r===t||!Cr(r)||Zi(r)?!1:Or(r).position==="fixed"||Hv(r,t)}function ZI(e,t){const r=t.get(e);if(r)return r;let n=la(e,[],!1).filter(o=>Cr(o)&&ji(o)!=="body"),i=null;const s=Or(e).position==="fixed";let a=s?Ln(e):e;for(;Cr(a)&&!Zi(a);){const o=Or(a),l=Ac(a);!l&&o.position==="fixed"&&(i=null),(s?!l&&!i:!l&&o.position==="static"&&i&&(i.position==="absolute"||i.position==="fixed")||oa(a)&&!l&&Hv(e,a))?n=n.filter(c=>c!==a):i=o,a=Ln(a)}return t.set(e,n),n}function WI(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const s=[...r==="clippingAncestors"?Uo(t)?[]:ZI(t,this._c):[].concat(r),n],a=Wv(t,s[0],i);let o=a.top,l=a.right,c=a.bottom,f=a.left;for(let u=1;u<s.length;u++){const p=Wv(t,s[u],i);o=tr(p.top,o),l=Rn(p.right,l),c=Rn(p.bottom,c),f=tr(p.left,f)}return{width:l-f,height:c-o,x:f,y:o}}function HI(e){const{width:t,height:r}=Bv(e);return{width:t,height:r}}function GI(e,t,r){const n=dn(t),i=Qr(t),s=r==="fixed",a=ui(e,!0,s,t);let o={scrollLeft:0,scrollTop:0};const l=Yr(0);function c(){l.x=Vo(i)}if(n||!n&&!s)if((ji(t)!=="body"||oa(i))&&(o=Bo(t)),n){const u=ui(t,!0,s,t);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else i&&c();s&&!n&&i&&c();const f=i&&!n&&!s?jv(i,o):Yr(0);return{x:a.left+o.scrollLeft-l.x-f.x,y:a.top+o.scrollTop-l.y-f.y,width:a.width,height:a.height}}function Ic(e){return Or(e).position==="static"}function Gv(e,t){if(!dn(e)||Or(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Qr(e)===r&&(r=r.ownerDocument.body),r}function Kv(e,t){const r=rr(e);if(Uo(e))return r;if(!dn(e)){let i=Ln(e);for(;i&&!Zi(i);){if(Cr(i)&&!Ic(i))return i;i=Ln(i)}return r}let n=Gv(e,t);for(;n&&$I(n)&&Ic(n);)n=Gv(n,t);return n&&Zi(n)&&Ic(n)&&!Ac(n)?r:n||RI(e)||r}var KI=async function(e){const t=this.getOffsetParent||Kv,r=this.getDimensions,n=await r(e.floating);return{reference:GI(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function YI(e){return Or(e).direction==="rtl"}var JI={convertOffsetParentRelativeRectToViewportRelativeRect:qI,getDocumentElement:Qr,getClippingRect:WI,getOffsetParent:Kv,getElementRects:KI,getClientRects:UI,getDimensions:HI,getScale:Wi,isElement:Cr,isRTL:YI};function Yv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function QI(e,t){let r=null,n;const i=Qr(e);function s(){var o;clearTimeout(n),(o=r)==null||o.disconnect(),r=null}function a(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:f,top:u,width:p,height:h}=c;if(o||t(),!p||!h)return;const g=Ro(u),v=Ro(i.clientWidth-(f+p)),m=Ro(i.clientHeight-(u+h)),y=Ro(f),E={rootMargin:-g+"px "+-v+"px "+-m+"px "+-y+"px",threshold:tr(0,Rn(1,l))||1};let k=!0;function T(A){const O=A[0].intersectionRatio;if(O!==l){if(!k)return a();O?a(!1,O):n=setTimeout(()=>{a(!1,1e-7)},1e3)}O===1&&!Yv(c,e.getBoundingClientRect())&&a(),k=!1}try{r=new IntersectionObserver(T,{...E,root:i.ownerDocument})}catch{r=new IntersectionObserver(T,E)}r.observe(e)}return a(!0),s}function XI(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Dc(e),f=i||s?[...c?la(c):[],...t?la(t):[]]:[];f.forEach(y=>{i&&y.addEventListener("scroll",r,{passive:!0}),s&&y.addEventListener("resize",r)});const u=c&&o?QI(c,r):null;let p=-1,h=null;a&&(h=new ResizeObserver(y=>{let[E]=y;E&&E.target===c&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var k;(k=h)==null||k.observe(t)})),r()}),c&&!l&&h.observe(c),t&&h.observe(t));let g,v=l?ui(e):null;l&&m();function m(){const y=ui(e);v&&!Yv(v,y)&&r(),v=y,g=requestAnimationFrame(m)}return r(),()=>{var y;f.forEach(E=>{i&&E.removeEventListener("scroll",r),s&&E.removeEventListener("resize",r)}),u?.(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(g)}}var eP=DI,tP=II,rP=AI,nP=MI,iP=CI,sP=xI,aP=PI,oP=(e,t,r)=>{const n=new Map,i={platform:JI,...r},s={...i.platform,_c:n};return TI(e,t,{...i,platform:s})};function ci(e){return typeof e=="function"?e():e}function Jv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Qv(e,t){const r=Jv(e);return Math.round(t*r)/r}function Xv(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 lP(e){const t=e.whileElementsMounted,r=D(()=>ci(e.open)??!0),n=D(()=>ci(e.middleware)),i=D(()=>ci(e.transform)??!0),s=D(()=>ci(e.placement)??"bottom"),a=D(()=>ci(e.strategy)??"absolute"),o=D(()=>ci(e.sideOffset)??0),l=D(()=>ci(e.alignOffset)??0),c=e.reference;let f=ae(0),u=ae(0);const p=Er(null);let h=ae(Me(d(a))),g=ae(Me(d(s))),v=ae(Me({})),m=ae(!1),y=!1,E=0;const k=D(()=>{const N=p.current?Qv(p.current,d(f)):d(f),X=p.current?Qv(p.current,d(u)):d(u);return d(i)?{position:d(h),left:"0",top:"0",transform:`translate(${N}px, ${X}px)`,...p.current&&Jv(p.current)>=1.5&&{willChange:"transform"}}:{position:d(h),left:`${N}px`,top:`${X}px`}});let T;function A(){if(c.current===null||p.current===null)return;const N=c.current,X=p.current,q=++E;oP(N,X,{middleware:d(n),placement:d(s),strategy:d(a)}).then(le=>{if(q===E&&!(c.current!==N||p.current!==X)){if(uP(N)){$(v,{...d(v),hide:{...d(v).hide,referenceHidden:!0}},!0);return}if(!d(r)&&d(f)!==0&&d(u)!==0){const he=Math.max(Math.abs(d(o)),Math.abs(d(l)),15);if(le.x<=he&&le.y<=he)return}$(f,le.x,!0),$(u,le.y,!0),$(h,le.strategy,!0),$(g,le.placement,!0),$(v,le.middlewareData,!0),$(m,!0)}})}function O(){typeof T=="function"&&(T(),T=void 0),E++}function F(){if(O(),t===void 0){A();return}d(r)&&(c.current===null||p.current===null||(T=t(c.current,p.current,A)))}function R(){!d(r)&&p.current===null&&$(m,!1)}function Y(){return[d(n),d(s),d(a),d(o),d(l),d(r)]}return ve(()=>{t===void 0&&d(r)&&A()}),ve(F),ve(()=>{if(t!==void 0){if(Y(),!d(r)){y=!1;return}if(!d(m)){y=!1;return}if(!y){y=!0;return}A()}}),ve(R),ve(()=>O),{floating:p,reference:c,get strategy(){return d(h)},get placement(){return d(g)},get middlewareData(){return d(v)},get isPositioned(){return d(m)},get floatingStyles(){return d(k)},get update(){return A}}}function uP(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}var cP={top:"bottom",right:"left",bottom:"top",left:"right"},Pc=new Ft("Floating.Root"),eg=new Ft("Floating.Content"),Mc=new Ft("Floating.Root"),dP=class fd{static create(t=!1){return t?Mc.set(new fd):Pc.set(new fd)}anchorNode=Er(null);customAnchorNode=Er(null);triggerNode=Er(null);constructor(){ve(()=>{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})}},fP=class hd{static create(t,r=!1){return r?eg.set(new hd(t,Mc.get())):eg.set(new hd(t,Pc.get()))}opts;root;contentRef=Er(null);wrapperRef=Er(null);arrowRef=Er(null);contentAttachment=et(this.contentRef);wrapperAttachment=et(this.wrapperRef);arrowAttachment=et(this.arrowRef);arrowId=Er(Nn());#e=D(()=>{if(typeof this.opts.style=="string")return Ks(this.opts.style);if(!this.opts.style)return{}});#t=void 0;#r=new OC(()=>this.arrowRef.current??void 0);#n=D(()=>this.#r?.width??0);#i=D(()=>this.#r?.height??0);#s=D(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#o=D(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#a=D(()=>d(this.#o).length>0);get hasExplicitBoundaries(){return d(this.#a)}set hasExplicitBoundaries(t){$(this.#a,t)}#l=D(()=>({padding:this.opts.collisionPadding.current,boundary:d(this.#o).filter(GC),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return d(this.#l)}set detectOverflowOptions(t){$(this.#l,t)}#u=ae(void 0);#c=ae(void 0);#d=ae(void 0);#h=ae(void 0);#p=D(()=>[eP({mainAxis:this.opts.sideOffset.current+d(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&tP({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?aP():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&rP({...this.detectOverflowOptions}),nP({...this.detectOverflowOptions,apply:({rects:t,availableWidth:r,availableHeight:n})=>{const{width:i,height:s}=t.reference;$(this.#u,r,!0),$(this.#c,n,!0),$(this.#d,i,!0),$(this.#h,s,!0)}}),this.arrowRef.current&&sP({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),pP({arrowWidth:d(this.#n),arrowHeight:d(this.#i)}),this.opts.hideWhenDetached.current&&iP({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return d(this.#p)}set middleware(t){$(this.#p,t)}floating;#f=D(()=>mP(this.floating.placement));get placedSide(){return d(this.#f)}set placedSide(t){$(this.#f,t)}#m=D(()=>vP(this.floating.placement));get placedAlign(){return d(this.#m)}set placedAlign(t){$(this.#m,t)}#v=D(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return d(this.#v)}set arrowX(t){$(this.#v,t)}#y=D(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return d(this.#y)}set arrowY(t){$(this.#y,t)}#w=D(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return d(this.#w)}set cannotCenterArrow(t){$(this.#w,t)}#_=ae();get contentZIndex(){return d(this.#_)}set contentZIndex(t){$(this.#_,t,!0)}#g=D(()=>cP[this.placedSide]);get arrowBaseSide(){return d(this.#g)}set arrowBaseSide(t){$(this.#g,t)}#k=D(()=>({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":`${d(this.#u)}px`,"--bits-floating-available-height":`${d(this.#c)}px`,"--bits-floating-anchor-width":`${d(this.#d)}px`,"--bits-floating-anchor-height":`${d(this.#h)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...d(this.#e)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return d(this.#k)}set wrapperProps(t){$(this.#k,t)}#b=D(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:Js({...d(this.#e)}),...this.contentAttachment}));get props(){return d(this.#b)}set props(t){$(this.#b,t)}#S=D(()=>({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 d(this.#S)}set arrowStyle(t){$(this.#S,t)}constructor(t,r){this.opts=t,this.root=r,this.#t=t.updatePositionStrategy,t.customAnchor&&(this.root.customAnchorNode.current=t.customAnchor.current),it(()=>t.customAnchor.current,n=>{this.root.customAnchorNode.current=n}),this.floating=lP({strategy:()=>this.opts.strategy.current,placement:()=>d(this.#s),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...n)=>XI(...n,{animationFrame:this.#t?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),ve(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),it(()=>this.contentRef.current,n=>{if(!n||!this.opts.enabled.current)return;const i=Fm(n),s=i.requestAnimationFrame(()=>{if(this.contentRef.current!==n||!this.opts.enabled.current)return;const a=i.getComputedStyle(n).zIndex;a!==this.contentZIndex&&(this.contentZIndex=a)});return()=>{i.cancelAnimationFrame(s)}}),ve(()=>{this.floating.floating.current=this.wrapperRef.current})}},hP=class pd{static create(t,r=!1){return r?new pd(t,Mc.get()):new pd(t,Pc.get())}opts;root;constructor(t,r){this.opts=t,this.root=r,t.virtualEl&&t.virtualEl.current?r.triggerNode=GA(t.virtualEl.current):r.triggerNode=t.ref}};function pP(e){return{name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:i}=t,s=i.arrow?.centerOffset!==0,a=s?0:e.arrowWidth,o=s?0:e.arrowHeight,[l,c]=$c(r),f={start:"0%",center:"50%",end:"100%"}[c],u=(i.arrow?.x??0)+a/2,p=(i.arrow?.y??0)+o/2;let h="",g="";return l==="bottom"?(h=s?f:`${u}px`,g=`${-o}px`):l==="top"?(h=s?f:`${u}px`,g=`${n.floating.height+o}px`):l==="right"?(h=`${-o}px`,g=s?f:`${p}px`):l==="left"&&(h=`${n.floating.width+o}px`,g=s?f:`${p}px`),{data:{x:h,y:g}}}}}function $c(e){const[t,r="center"]=e.split("-");return[t,r]}function mP(e){return $c(e)[0]}function vP(e){return $c(e)[1]}function tg(e,t){ne(t,!0);let r=_(t,"children",7),n=_(t,"tooltip",7,!1);dP.create(n());var i={get children(){return r()},set children(o){r(o),b()},get tooltip(){return n()},set tooltip(o=!1){n(o),b()}},s=re(),a=U(s);return Se(a,()=>r()??qe),x(e,s),ie(i)}se(tg,{children:{},tooltip:{}},[],[],{mode:"open"});function rg(e,t){ne(t,!0);let r=_(t,"id",7),n=_(t,"children",7),i=_(t,"virtualEl",7),s=_(t,"ref",7),a=_(t,"tooltip",7,!1);hP.create({id:z(()=>r()),virtualEl:z(()=>i()),ref:s()},a());var o={get id(){return r()},set id(f){r(f),b()},get children(){return n()},set children(f){n(f),b()},get virtualEl(){return i()},set virtualEl(f){i(f),b()},get ref(){return s()},set ref(f){s(f),b()},get tooltip(){return a()},set tooltip(f=!1){a(f),b()}},l=re(),c=U(l);return Se(c,()=>n()??qe),x(e,l),ie(o)}se(rg,{id:{},children:{},virtualEl:{},ref:{},tooltip:{}},[],[],{mode:"open"});function ng(e,t){ne(t,!0);let r=_(t,"content",7),n=_(t,"side",7,"bottom"),i=_(t,"sideOffset",7,0),s=_(t,"align",7,"center"),a=_(t,"alignOffset",7,0),o=_(t,"id",7),l=_(t,"arrowPadding",7,0),c=_(t,"avoidCollisions",7,!0),f=_(t,"collisionBoundary",23,()=>[]),u=_(t,"collisionPadding",7,0),p=_(t,"hideWhenDetached",7,!1),h=_(t,"onPlaced",7,()=>{}),g=_(t,"sticky",7,"partial"),v=_(t,"updatePositionStrategy",7,"optimized"),m=_(t,"strategy",7,"fixed"),y=_(t,"dir",7,"ltr"),E=_(t,"style",23,()=>({})),k=_(t,"wrapperId",23,Nn),T=_(t,"customAnchor",7,null),A=_(t,"enabled",7),O=_(t,"tooltip",7,!1);const F=fP.create({side:z(()=>n()),sideOffset:z(()=>i()),align:z(()=>s()),alignOffset:z(()=>a()),id:z(()=>o()),arrowPadding:z(()=>l()),avoidCollisions:z(()=>c()),collisionBoundary:z(()=>f()),collisionPadding:z(()=>u()),hideWhenDetached:z(()=>p()),onPlaced:z(()=>h()),sticky:z(()=>g()),updatePositionStrategy:z(()=>v()),strategy:z(()=>m()),dir:z(()=>y()),style:z(()=>E()),enabled:z(()=>A()),wrapperId:z(()=>k()),customAnchor:z(()=>T())},O()),R=D(()=>Ke(F.wrapperProps,{style:{pointerEvents:"auto"}}));var Y={get content(){return r()},set content(q){r(q),b()},get side(){return n()},set side(q="bottom"){n(q),b()},get sideOffset(){return i()},set sideOffset(q=0){i(q),b()},get align(){return s()},set align(q="center"){s(q),b()},get alignOffset(){return a()},set alignOffset(q=0){a(q),b()},get id(){return o()},set id(q){o(q),b()},get arrowPadding(){return l()},set arrowPadding(q=0){l(q),b()},get avoidCollisions(){return c()},set avoidCollisions(q=!0){c(q),b()},get collisionBoundary(){return f()},set collisionBoundary(q=[]){f(q),b()},get collisionPadding(){return u()},set collisionPadding(q=0){u(q),b()},get hideWhenDetached(){return p()},set hideWhenDetached(q=!1){p(q),b()},get onPlaced(){return h()},set onPlaced(q=()=>{}){h(q),b()},get sticky(){return g()},set sticky(q="partial"){g(q),b()},get updatePositionStrategy(){return v()},set updatePositionStrategy(q="optimized"){v(q),b()},get strategy(){return m()},set strategy(q="fixed"){m(q),b()},get dir(){return y()},set dir(q="ltr"){y(q),b()},get style(){return E()},set style(q={}){E(q),b()},get wrapperId(){return k()},set wrapperId(q=Nn()){k(q),b()},get customAnchor(){return T()},set customAnchor(q=null){T(q),b()},get enabled(){return A()},set enabled(q){A(q),b()},get tooltip(){return O()},set tooltip(q=!1){O(q),b()}},N=re(),X=U(N);return Se(X,()=>r()??qe,()=>({props:F.props,wrapperProps:d(R)})),x(e,N),ie(Y)}se(ng,{content:{},side:{},sideOffset:{},align:{},alignOffset:{},id:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},hideWhenDetached:{},onPlaced:{},sticky:{},updatePositionStrategy:{},strategy:{},dir:{},style:{},wrapperId:{},customAnchor:{},enabled:{},tooltip:{}},[],[],{mode:"open"});function ig(e,t){ne(t,!0);let r=_(t,"content",7),n=_(t,"onPlaced",7);En(()=>{n()?.()});var i={get content(){return r()},set content(o){r(o),b()},get onPlaced(){return n()},set onPlaced(o){n(o),b()}},s=re(),a=U(s);return Se(a,()=>r()??qe,()=>({props:{},wrapperProps:{}})),x(e,s),ie(i)}se(ig,{content:{},onPlaced:{}},[],[],{mode:"open"});var gP=new Set(["$$slots","$$events","$$legacy","$$host","content","isStatic","onPlaced"]);function sg(e,t){ne(t,!0);let r=_(t,"content",7),n=_(t,"isStatic",7,!1),i=_(t,"onPlaced",7),s=He(t,gP);var a={get content(){return r()},set content(u){r(u),b()},get isStatic(){return n()},set isStatic(u=!1){n(u),b()},get onPlaced(){return i()},set onPlaced(u){i(u),b()}},o=re(),l=U(o),c=u=>{ig(u,{get content(){return r()},get onPlaced(){return i()}})},f=u=>{ng(u,An({get content(){return r()},get onPlaced(){return i()}},()=>s))};return ue(l,u=>{n()?u(c):u(f,-1)}),x(e,o),ie(a)}se(sg,{content:{},isStatic:{},onPlaced:{}},[],[],{mode:"open"});var yP=new Set(["$$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"]),bP=B("<!> <!>",1);function Fc(e,t){ne(t,!0);let r=_(t,"popper",7),n=_(t,"onEscapeKeydown",7),i=_(t,"escapeKeydownBehavior",7),s=_(t,"preventOverflowTextSelection",7),a=_(t,"id",7),o=_(t,"onPointerDown",7),l=_(t,"onPointerUp",7),c=_(t,"side",7),f=_(t,"sideOffset",7),u=_(t,"align",7),p=_(t,"alignOffset",7),h=_(t,"arrowPadding",7),g=_(t,"avoidCollisions",7),v=_(t,"collisionBoundary",7),m=_(t,"collisionPadding",7),y=_(t,"sticky",7),E=_(t,"hideWhenDetached",7),k=_(t,"updatePositionStrategy",7),T=_(t,"strategy",7),A=_(t,"dir",7),O=_(t,"preventScroll",7),F=_(t,"wrapperId",7),R=_(t,"style",7),Y=_(t,"onPlaced",7),N=_(t,"onInteractOutside",7),X=_(t,"onCloseAutoFocus",7),q=_(t,"onOpenAutoFocus",7),le=_(t,"onFocusOutside",7),he=_(t,"interactOutsideBehavior",7,"close"),j=_(t,"loop",7),oe=_(t,"trapFocus",7,!0),ee=_(t,"isValidEvent",7,()=>!1),fe=_(t,"customAnchor",7,null),ce=_(t,"isStatic",7,!1),de=_(t,"enabled",7),G=_(t,"ref",7),Q=_(t,"tooltip",7,!1),P=_(t,"contentPointerEvents",7,"auto"),te=He(t,yP);const L=D(()=>O()??!0),be=D(()=>T()??(d(L)?"fixed":"absolute"));var Z={get popper(){return r()},set popper(w){r(w),b()},get onEscapeKeydown(){return n()},set onEscapeKeydown(w){n(w),b()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(w){i(w),b()},get preventOverflowTextSelection(){return s()},set preventOverflowTextSelection(w){s(w),b()},get id(){return a()},set id(w){a(w),b()},get onPointerDown(){return o()},set onPointerDown(w){o(w),b()},get onPointerUp(){return l()},set onPointerUp(w){l(w),b()},get side(){return c()},set side(w){c(w),b()},get sideOffset(){return f()},set sideOffset(w){f(w),b()},get align(){return u()},set align(w){u(w),b()},get alignOffset(){return p()},set alignOffset(w){p(w),b()},get arrowPadding(){return h()},set arrowPadding(w){h(w),b()},get avoidCollisions(){return g()},set avoidCollisions(w){g(w),b()},get collisionBoundary(){return v()},set collisionBoundary(w){v(w),b()},get collisionPadding(){return m()},set collisionPadding(w){m(w),b()},get sticky(){return y()},set sticky(w){y(w),b()},get hideWhenDetached(){return E()},set hideWhenDetached(w){E(w),b()},get updatePositionStrategy(){return k()},set updatePositionStrategy(w){k(w),b()},get strategy(){return T()},set strategy(w){T(w),b()},get dir(){return A()},set dir(w){A(w),b()},get preventScroll(){return O()},set preventScroll(w){O(w),b()},get wrapperId(){return F()},set wrapperId(w){F(w),b()},get style(){return R()},set style(w){R(w),b()},get onPlaced(){return Y()},set onPlaced(w){Y(w),b()},get onInteractOutside(){return N()},set onInteractOutside(w){N(w),b()},get onCloseAutoFocus(){return X()},set onCloseAutoFocus(w){X(w),b()},get onOpenAutoFocus(){return q()},set onOpenAutoFocus(w){q(w),b()},get onFocusOutside(){return le()},set onFocusOutside(w){le(w),b()},get interactOutsideBehavior(){return he()},set interactOutsideBehavior(w="close"){he(w),b()},get loop(){return j()},set loop(w){j(w),b()},get trapFocus(){return oe()},set trapFocus(w=!0){oe(w),b()},get isValidEvent(){return ee()},set isValidEvent(w=()=>!1){ee(w),b()},get customAnchor(){return fe()},set customAnchor(w=null){fe(w),b()},get isStatic(){return ce()},set isStatic(w=!1){ce(w),b()},get enabled(){return de()},set enabled(w){de(w),b()},get ref(){return G()},set ref(w){G(w),b()},get tooltip(){return Q()},set tooltip(w=!1){Q(w),b()},get contentPointerEvents(){return P()},set contentPointerEvents(w="auto"){P(w),b()}};return sg(e,{get isStatic(){return ce()},get id(){return a()},get side(){return c()},get sideOffset(){return f()},get align(){return u()},get alignOffset(){return p()},get arrowPadding(){return h()},get avoidCollisions(){return g()},get collisionBoundary(){return v()},get collisionPadding(){return m()},get sticky(){return y()},get hideWhenDetached(){return E()},get updatePositionStrategy(){return k()},get strategy(){return d(be)},get dir(){return A()},get wrapperId(){return F()},get style(){return R()},get onPlaced(){return Y()},get customAnchor(){return fe()},get enabled(){return de()},get tooltip(){return Q()},content:(_e,we)=>{let De=()=>we?.().props,Le=()=>we?.().wrapperProps;var je=bP(),bt=U(je),at=Rt=>{rc(Rt,{get preventScroll(){return d(L)}})},Nt=Rt=>{rc(Rt,{get preventScroll(){return d(L)}})};ue(bt,Rt=>{t.forceMount&&de()?Rt(at):t.forceMount||Rt(Nt,1)});var _t=V(bt,2);nv(_t,{get onOpenAutoFocus(){return q()},get onCloseAutoFocus(){return X()},get loop(){return j()},get enabled(){return de()},get trapFocus(){return oe()},get forceMount(){return t.forceMount},get ref(){return G()},focusScope:(nr,Ht)=>{let vr=()=>Ht?.().props;rv(nr,{get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get enabled(){return de()},get ref(){return G()},children:(Ir,Pr)=>{tv(Ir,{get id(){return a()},get onInteractOutside(){return N()},get onFocusOutside(){return le()},get interactOutsideBehavior(){return he()},get isValidEvent(){return ee()},get enabled(){return de()},get ref(){return G()},children:(Mr,gr)=>{let Xr=()=>gr?.().props;av(Mr,{get id(){return a()},get preventOverflowTextSelection(){return s()},get onPointerDown(){return o()},get onPointerUp(){return l()},get enabled(){return de()},get ref(){return G()},children:(en,xt)=>{var Un=re(),rs=U(Un);{let ns=D(()=>({props:Ke(te,De(),Xr(),vr(),{style:{pointerEvents:P()}}),wrapperProps:Le()}));Se(rs,()=>r()??qe,()=>d(ns))}x(en,Un)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),x(_e,je)},$$slots:{content:!0}}),ie(Z)}se(Fc,{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"});var _P=new Set(["$$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"]);function ag(e,t){ne(t,!0);let r=_(t,"popper",7),n=_(t,"open",7),i=_(t,"onEscapeKeydown",7),s=_(t,"escapeKeydownBehavior",7),a=_(t,"preventOverflowTextSelection",7),o=_(t,"id",7),l=_(t,"onPointerDown",7),c=_(t,"onPointerUp",7),f=_(t,"side",7),u=_(t,"sideOffset",7),p=_(t,"align",7),h=_(t,"alignOffset",7),g=_(t,"arrowPadding",7),v=_(t,"avoidCollisions",7),m=_(t,"collisionBoundary",7),y=_(t,"collisionPadding",7),E=_(t,"sticky",7),k=_(t,"hideWhenDetached",7),T=_(t,"updatePositionStrategy",7),A=_(t,"strategy",7),O=_(t,"dir",7),F=_(t,"preventScroll",7),R=_(t,"wrapperId",7),Y=_(t,"style",7),N=_(t,"onPlaced",7),X=_(t,"onInteractOutside",7),q=_(t,"onCloseAutoFocus",7),le=_(t,"onOpenAutoFocus",7),he=_(t,"onFocusOutside",7),j=_(t,"interactOutsideBehavior",7,"close"),oe=_(t,"loop",7),ee=_(t,"trapFocus",7,!0),fe=_(t,"isValidEvent",7,()=>!1),ce=_(t,"customAnchor",7,null),de=_(t,"isStatic",7,!1),G=_(t,"ref",7),Q=_(t,"shouldRender",7),P=He(t,_P);var te={get popper(){return r()},set popper(w){r(w),b()},get open(){return n()},set open(w){n(w),b()},get onEscapeKeydown(){return i()},set onEscapeKeydown(w){i(w),b()},get escapeKeydownBehavior(){return s()},set escapeKeydownBehavior(w){s(w),b()},get preventOverflowTextSelection(){return a()},set preventOverflowTextSelection(w){a(w),b()},get id(){return o()},set id(w){o(w),b()},get onPointerDown(){return l()},set onPointerDown(w){l(w),b()},get onPointerUp(){return c()},set onPointerUp(w){c(w),b()},get side(){return f()},set side(w){f(w),b()},get sideOffset(){return u()},set sideOffset(w){u(w),b()},get align(){return p()},set align(w){p(w),b()},get alignOffset(){return h()},set alignOffset(w){h(w),b()},get arrowPadding(){return g()},set arrowPadding(w){g(w),b()},get avoidCollisions(){return v()},set avoidCollisions(w){v(w),b()},get collisionBoundary(){return m()},set collisionBoundary(w){m(w),b()},get collisionPadding(){return y()},set collisionPadding(w){y(w),b()},get sticky(){return E()},set sticky(w){E(w),b()},get hideWhenDetached(){return k()},set hideWhenDetached(w){k(w),b()},get updatePositionStrategy(){return T()},set updatePositionStrategy(w){T(w),b()},get strategy(){return A()},set strategy(w){A(w),b()},get dir(){return O()},set dir(w){O(w),b()},get preventScroll(){return F()},set preventScroll(w){F(w),b()},get wrapperId(){return R()},set wrapperId(w){R(w),b()},get style(){return Y()},set style(w){Y(w),b()},get onPlaced(){return N()},set onPlaced(w){N(w),b()},get onInteractOutside(){return X()},set onInteractOutside(w){X(w),b()},get onCloseAutoFocus(){return q()},set onCloseAutoFocus(w){q(w),b()},get onOpenAutoFocus(){return le()},set onOpenAutoFocus(w){le(w),b()},get onFocusOutside(){return he()},set onFocusOutside(w){he(w),b()},get interactOutsideBehavior(){return j()},set interactOutsideBehavior(w="close"){j(w),b()},get loop(){return oe()},set loop(w){oe(w),b()},get trapFocus(){return ee()},set trapFocus(w=!0){ee(w),b()},get isValidEvent(){return fe()},set isValidEvent(w=()=>!1){fe(w),b()},get customAnchor(){return ce()},set customAnchor(w=null){ce(w),b()},get isStatic(){return de()},set isStatic(w=!1){de(w),b()},get ref(){return G()},set ref(w){G(w),b()},get shouldRender(){return Q()},set shouldRender(w){Q(w),b()}},L=re(),be=U(L),Z=w=>{Fc(w,An({get popper(){return r()},get onEscapeKeydown(){return i()},get escapeKeydownBehavior(){return s()},get preventOverflowTextSelection(){return a()},get id(){return o()},get onPointerDown(){return l()},get onPointerUp(){return c()},get side(){return f()},get sideOffset(){return u()},get align(){return p()},get alignOffset(){return h()},get arrowPadding(){return g()},get avoidCollisions(){return v()},get collisionBoundary(){return m()},get collisionPadding(){return y()},get sticky(){return E()},get hideWhenDetached(){return k()},get updatePositionStrategy(){return T()},get strategy(){return A()},get dir(){return O()},get preventScroll(){return F()},get wrapperId(){return R()},get style(){return Y()},get onPlaced(){return N()},get customAnchor(){return ce()},get isStatic(){return de()},get enabled(){return n()},get onInteractOutside(){return X()},get onCloseAutoFocus(){return q()},get onOpenAutoFocus(){return le()},get interactOutsideBehavior(){return j()},get loop(){return oe()},get trapFocus(){return ee()},get isValidEvent(){return fe()},get onFocusOutside(){return he()},forceMount:!1,get ref(){return G()}},()=>P))};return ue(be,w=>{Q()&&w(Z)}),x(e,L),ie(te)}se(ag,{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"});var wP=new Set(["$$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"]);function og(e,t){ne(t,!0);let r=_(t,"popper",7),n=_(t,"onEscapeKeydown",7),i=_(t,"escapeKeydownBehavior",7),s=_(t,"preventOverflowTextSelection",7),a=_(t,"id",7),o=_(t,"onPointerDown",7),l=_(t,"onPointerUp",7),c=_(t,"side",7),f=_(t,"sideOffset",7),u=_(t,"align",7),p=_(t,"alignOffset",7),h=_(t,"arrowPadding",7),g=_(t,"avoidCollisions",7),v=_(t,"collisionBoundary",7),m=_(t,"collisionPadding",7),y=_(t,"sticky",7),E=_(t,"hideWhenDetached",7),k=_(t,"updatePositionStrategy",7),T=_(t,"strategy",7),A=_(t,"dir",7),O=_(t,"preventScroll",7),F=_(t,"wrapperId",7),R=_(t,"style",7),Y=_(t,"onPlaced",7),N=_(t,"onInteractOutside",7),X=_(t,"onCloseAutoFocus",7),q=_(t,"onOpenAutoFocus",7),le=_(t,"onFocusOutside",7),he=_(t,"interactOutsideBehavior",7,"close"),j=_(t,"loop",7),oe=_(t,"trapFocus",7,!0),ee=_(t,"isValidEvent",7,()=>!1),fe=_(t,"customAnchor",7,null),ce=_(t,"isStatic",7,!1),de=_(t,"enabled",7),G=He(t,wP);var Q={get popper(){return r()},set popper(P){r(P),b()},get onEscapeKeydown(){return n()},set onEscapeKeydown(P){n(P),b()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(P){i(P),b()},get preventOverflowTextSelection(){return s()},set preventOverflowTextSelection(P){s(P),b()},get id(){return a()},set id(P){a(P),b()},get onPointerDown(){return o()},set onPointerDown(P){o(P),b()},get onPointerUp(){return l()},set onPointerUp(P){l(P),b()},get side(){return c()},set side(P){c(P),b()},get sideOffset(){return f()},set sideOffset(P){f(P),b()},get align(){return u()},set align(P){u(P),b()},get alignOffset(){return p()},set alignOffset(P){p(P),b()},get arrowPadding(){return h()},set arrowPadding(P){h(P),b()},get avoidCollisions(){return g()},set avoidCollisions(P){g(P),b()},get collisionBoundary(){return v()},set collisionBoundary(P){v(P),b()},get collisionPadding(){return m()},set collisionPadding(P){m(P),b()},get sticky(){return y()},set sticky(P){y(P),b()},get hideWhenDetached(){return E()},set hideWhenDetached(P){E(P),b()},get updatePositionStrategy(){return k()},set updatePositionStrategy(P){k(P),b()},get strategy(){return T()},set strategy(P){T(P),b()},get dir(){return A()},set dir(P){A(P),b()},get preventScroll(){return O()},set preventScroll(P){O(P),b()},get wrapperId(){return F()},set wrapperId(P){F(P),b()},get style(){return R()},set style(P){R(P),b()},get onPlaced(){return Y()},set onPlaced(P){Y(P),b()},get onInteractOutside(){return N()},set onInteractOutside(P){N(P),b()},get onCloseAutoFocus(){return X()},set onCloseAutoFocus(P){X(P),b()},get onOpenAutoFocus(){return q()},set onOpenAutoFocus(P){q(P),b()},get onFocusOutside(){return le()},set onFocusOutside(P){le(P),b()},get interactOutsideBehavior(){return he()},set interactOutsideBehavior(P="close"){he(P),b()},get loop(){return j()},set loop(P){j(P),b()},get trapFocus(){return oe()},set trapFocus(P=!0){oe(P),b()},get isValidEvent(){return ee()},set isValidEvent(P=()=>!1){ee(P),b()},get customAnchor(){return fe()},set customAnchor(P=null){fe(P),b()},get isStatic(){return ce()},set isStatic(P=!1){ce(P),b()},get enabled(){return de()},set enabled(P){de(P),b()}};return Fc(e,An({get popper(){return r()},get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get preventOverflowTextSelection(){return s()},get id(){return a()},get onPointerDown(){return o()},get onPointerUp(){return l()},get side(){return c()},get sideOffset(){return f()},get align(){return u()},get alignOffset(){return p()},get arrowPadding(){return h()},get avoidCollisions(){return g()},get collisionBoundary(){return v()},get collisionPadding(){return m()},get sticky(){return y()},get hideWhenDetached(){return E()},get updatePositionStrategy(){return k()},get strategy(){return T()},get dir(){return A()},get preventScroll(){return O()},get wrapperId(){return F()},get style(){return R()},get onPlaced(){return Y()},get customAnchor(){return fe()},get isStatic(){return ce()},get enabled(){return de()},get onInteractOutside(){return N()},get onCloseAutoFocus(){return X()},get onOpenAutoFocus(){return q()},get interactOutsideBehavior(){return he()},get loop(){return j()},get trapFocus(){return oe()},get isValidEvent(){return ee()},get onFocusOutside(){return le()}},()=>G,{forceMount:!0})),ie(Q)}se(og,{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 jo=bo({component:"date-field",parts:["input","label","segment"]}),Hi={day:{min:1,max:e=>{const t=e.segmentValues.month,r=e.value.current??e.placeholder.current;return ta(t?r.set({month:Number.parseInt(t)}):r)},cycle:1,padZero:!0},month:{min:1,max:12,cycle:1,padZero:!0,getAnnouncement:(e,t)=>t.placeholder.current?`${e} - ${t.formatter.fullMonth(Zt(t.placeholder.current.set({month:e})))}`:""},year:{min:1,max:9999,cycle:1,padZero:!1},hour:{min:e=>e.hourCycle.current===12?1:0,max:e=>e.hourCycle.current===24?23:e.hourCycle.current===12||bv(e.locale.current)===12?12:23,cycle:1,canBeZero:!0,padZero:!0},minute:{min:0,max:59,cycle:1,canBeZero:!0,padZero:!0},second:{min:0,max:59,cycle:1,canBeZero:!0,padZero:!0}},zn=new Ft("DateField.Root"),kP=class Py{static create(t,r){return zn.set(new Py(t,r))}value;placeholder;validate;minValue;maxValue;disabled;readonly;granularity;readonlySegments;hourCycle;locale;hideTimeZone;required;onInvalid;errorMessageId;isInvalidProp;descriptionId=Nn();formatter;initialSegments;#e=ae();get segmentValues(){return d(this.#e)}set segmentValues(t){$(this.#e,t,!0)}announcer;#t=D(()=>new Set(this.readonlySegments.current));get readonlySegmentsSet(){return d(this.#t)}set readonlySegmentsSet(t){$(this.#t,t)}segmentStates=vv();#r=ae(null);#n=ae(null);#i=ae(null);get descriptionNode(){return d(this.#i)}set descriptionNode(t){$(this.#i,t,!0)}#s=ae(null);get validationNode(){return d(this.#s)}set validationNode(t){$(this.#s,t,!0)}states=vv();#o=ae(null);get dayPeriodNode(){return d(this.#o)}set dayPeriodNode(t){$(this.#o,t,!0)}rangeRoot=void 0;#a=ae("");get name(){return d(this.#a)}set name(t){$(this.#a,t,!0)}domContext=new Bi(()=>null);constructor(t,r){this.rangeRoot=r,this.value=t.value,this.placeholder=r?r.opts.placeholder:t.placeholder,this.validate=r?Er(void 0):t.validate,this.minValue=r?r.opts.minValue:t.minValue,this.maxValue=r?r.opts.maxValue:t.maxValue,this.disabled=r?r.opts.disabled:t.disabled,this.readonly=r?r.opts.readonly:t.readonly,this.granularity=r?r.opts.granularity:t.granularity,this.readonlySegments=r?r.opts.readonlySegments:t.readonlySegments,this.hourCycle=r?r.opts.hourCycle:t.hourCycle,this.locale=r?r.opts.locale:t.locale,this.hideTimeZone=r?r.opts.hideTimeZone:t.hideTimeZone,this.required=r?r.opts.required:t.required,this.onInvalid=r?r.opts.onInvalid:t.onInvalid,this.errorMessageId=r?r.opts.errorMessageId:t.errorMessageId,this.isInvalidProp=t.isInvalidProp,this.formatter=kv({initialLocale:this.locale.current,monthFormat:z(()=>"long"),yearFormat:z(()=>"numeric")}),this.initialSegments=ac(this.inferredGranularity),this.segmentValues=this.initialSegments,this.announcer=Do(null),this.getFieldNode=this.getFieldNode.bind(this),this.updateSegment=this.updateSegment.bind(this),this.handleSegmentClick=this.handleSegmentClick.bind(this),this.getBaseSegmentAttrs=this.getBaseSegmentAttrs.bind(this),ve(()=>{Re(()=>{this.initialSegments=ac(this.inferredGranularity)})}),En(()=>{this.announcer=Do(this.domContext.getDocument())}),ii(()=>{r||lD(this.descriptionId,this.domContext.getDocument())}),ve(()=>{r||this.formatter.getLocale()!==this.locale.current&&this.formatter.setLocale(this.locale.current)}),ve(()=>{if(r)return;this.value.current&&oD({id:Re(()=>this.descriptionId),formatter:this.formatter,value:this.value.current,doc:this.domContext.getDocument()});const n=Re(()=>this.placeholder.current);this.value.current&&n!==this.value.current&&Re(()=>{this.value.current&&(this.placeholder.current=this.value.current)})}),this.value.current&&this.syncSegmentValues(this.value.current),ve(()=>{this.locale.current,this.value.current&&this.syncSegmentValues(this.value.current),this.#l()}),ve(()=>{this.value.current===void 0&&(this.segmentValues=ac(this.inferredGranularity))}),it(()=>this.validationStatus,()=>{this.validationStatus!==!1&&this.onInvalid.current?.(this.validationStatus.reason,this.validationStatus.message)})}setName(t){this.name=t}setFieldNode(t){$(this.#r,t,!0)}getFieldNode(){return this.rangeRoot?this.rangeRoot.fieldNode:d(this.#r)}setLabelNode(t){$(this.#n,t,!0)}getLabelNode(){return this.rangeRoot?this.rangeRoot.labelNode:d(this.#n)}#l(){this.states.day.updating=null,this.states.month.updating=null,this.states.year.updating=null,this.states.hour.updating=null,this.states.minute.updating=null,this.states.dayPeriod.updating=null}setValue(t){this.value.current=t}syncSegmentValues(t){const r=Po.map(n=>{const i=t[n];if(n==="month"){if(this.states.month.updating)return[n,this.states.month.updating];if(i<10)return[n,`0${i}`]}if(n==="day"){if(this.states.day.updating)return[n,this.states.day.updating];if(i<10)return[n,`0${i}`]}if(n==="year"){if(this.states.year.updating)return[n,this.states.year.updating];const s=4-`${i}`.length;if(s>0)return[n,`${"0".repeat(s)}${i}`]}return[n,`${i}`]});if("hour"in t){const n=Mo.map(s=>{if(s==="dayPeriod")return this.states.dayPeriod.updating?[s,this.states.dayPeriod.updating]:[s,this.formatter.dayPeriod(Zt(t))];if(s==="hour"){if(this.states.hour.updating)return[s,this.states.hour.updating];if(t[s]!==void 0&&t[s]<10)return[s,`0${t[s]}`];if(t[s]===0&&this.dayPeriodNode)return[s,"12"]}else if(s==="minute"){if(this.states.minute.updating)return[s,this.states.minute.updating];if(t[s]!==void 0&&t[s]<10)return[s,`0${t[s]}`]}else if(s==="second"){if(this.states.second.updating)return[s,this.states.second.updating];if(t[s]!==void 0&&t[s]<10)return[s,`0${t[s]}`]}return[s,`${t[s]}`]}),i=[...r,...n];this.segmentValues=Object.fromEntries(i),this.#l();return}this.segmentValues=Object.fromEntries(r)}#u=D(()=>{const t=this.value.current;if(!t)return!1;const r=this.validate.current?.(t);if(r)return{reason:"custom",message:r};const n=this.minValue.current;if(n&&oi(t,n))return{reason:"min"};const i=this.maxValue.current;return i&&oi(i,t)?{reason:"max"}:!1});get validationStatus(){return d(this.#u)}set validationStatus(t){$(this.#u,t)}#c=D(()=>this.validationStatus===!1?!1:(this.isInvalidProp.current,!0));get isInvalid(){return d(this.#c)}set isInvalid(t){$(this.#c,t)}#d=D(()=>{const t=this.granularity.current;return t||sD(this.placeholder.current,this.granularity.current)});get inferredGranularity(){return d(this.#d)}set inferredGranularity(t){$(this.#d,t)}#h=D(()=>this.value.current!==void 0?this.value.current:this.placeholder.current);get dateRef(){return d(this.#h)}set dateRef(t){$(this.#h,t)}#p=D(()=>XO({segmentValues:this.segmentValues,formatter:this.formatter,locale:this.locale.current,granularity:this.inferredGranularity,dateRef:this.dateRef,hideTimeZone:this.hideTimeZone.current,hourCycle:this.hourCycle.current}));get allSegmentContent(){return d(this.#p)}set allSegmentContent(t){$(this.#p,t)}#f=D(()=>this.allSegmentContent.arr);get segmentContents(){return d(this.#f)}set segmentContents(t){$(this.#f,t)}sharedSegmentAttrs={role:"spinbutton",contenteditable:"true",tabindex:0,spellcheck:!1,inputmode:"numeric",autocorrect:"off",enterkeyhint:"next",style:{caretColor:"transparent"},onbeforeinput:t=>{(!t.data||t.data.length<=1)&&t.preventDefault()}};#m(t){return`${t} ${this.getLabelNode()?.id??""}`}updateSegment(t,r){const n=this.disabled.current,i=this.readonly.current,s=this.readonlySegmentsSet;if(n||i||s.has(t))return;const a=this.segmentValues;let o=a;const l=this.placeholder.current;if(iD(a)){const c=a[t],f=r;if(t==="month"){const u=f(c);if(this.states.month.updating=u,u!==null&&a.day!==null){const p=ta(Zt(l.set({month:Number.parseInt(u)})));Number.parseInt(a.day)>p&&(a.day=`${p}`)}o={...a,[t]:u}}else if(t==="dayPeriod"){const u=f(c);this.states.dayPeriod.updating=u;const p=this.value.current;if(p&&"hour"in p){const h=p.hour;u==="AM"?h>=12&&(a.hour=`${h-12}`):u==="PM"&&h<12&&(a.hour=`${h+12}`)}o={...a,[t]:u}}else if(t==="hour"){const u=f(c);if(this.states.hour.updating=u,u!==null&&a.dayPeriod!==null){const p=this.formatter.dayPeriod(Zt(l.set({hour:Number.parseInt(u)})),this.hourCycle.current);(p==="AM"||p==="PM")&&(a.dayPeriod=p)}o={...a,[t]:u}}else if(t==="minute"){const u=f(c);this.states.minute.updating=u,o={...a,[t]:u}}else if(t==="second"){const u=f(c);this.states.second.updating=u,o={...a,[t]:u}}else if(t==="year"){const u=f(c);this.states.year.updating=u,o={...a,[t]:u}}else if(t==="day"){const u=f(c);this.states.day.updating=u,o={...a,[t]:u}}else{const u=f(c);o={...a,[t]:u}}}else if($o(t)){const c=a[t],f=r,u=f(c);if(t==="month"&&u!==null&&a.day!==null){this.states.month.updating=u;const p=ta(Zt(l.set({month:Number.parseInt(u)})));Number.parseInt(a.day)>p&&(a.day=`${p}`),o={...a,[t]:u}}else if(t==="year"){const p=f(c);this.states.year.updating=p,o={...a,[t]:p}}else if(t==="day"){const p=f(c);this.states.day.updating=p,o={...a,[t]:p}}else o={...a,[t]:u}}this.segmentValues=o,nD(o,d(this.#r))?this.setValue(rD({segmentObj:o,fieldNode:d(this.#r),dateRef:this.placeholder.current})):(this.setValue(void 0),this.segmentValues=o)}handleSegmentClick(t){this.disabled.current&&t.preventDefault()}getBaseSegmentAttrs(t,r){const n=this.readonlySegmentsSet.has(t),i={"aria-invalid":Ku(this.isInvalid),"aria-disabled":Tr(this.disabled.current),"aria-readonly":Tr(this.readonly.current||n),"data-invalid":Ve(this.isInvalid),"data-disabled":Ve(this.disabled.current),"data-readonly":Ve(this.readonly.current||n),"data-segment":`${t}`,[jo.segment]:""};if(t==="literal")return i;const s=this.descriptionNode?.id,a=aD(r,d(this.#r))&&s,o=this.errorMessageId?.current,l=a?`${s} ${this.isInvalid&&o?o:""}`:void 0,c=!(this.readonly.current||n||this.disabled.current);return{...i,"aria-labelledby":this.#m(r),contenteditable:c?"true":void 0,"aria-describedby":l,tabindex:this.disabled.current?void 0:0}}},SP=class My{static create(t){return new My(t,zn.get())}opts;root;domContext;attachment;constructor(t,r){this.opts=t,this.root=r,this.domContext=new Bi(t.ref),this.root.domContext=this.domContext,this.attachment=et(t.ref,n=>this.root.setFieldNode(n)),it(()=>this.opts.name.current,n=>{this.root.setName(n)})}#e=D(()=>{if(ln&&this.domContext.getElementById(this.root.descriptionId))return this.root.descriptionId});#t=D(()=>({id:this.opts.id.current,role:"group","aria-labelledby":this.root.getLabelNode()?.id??void 0,"aria-describedby":d(this.#e),"aria-disabled":Tr(this.root.disabled.current),"data-invalid":this.root.isInvalid?"":void 0,"data-disabled":Ve(this.root.disabled.current),[jo.input]:"",...this.attachment}));get props(){return d(this.#t)}set props(t){$(this.#t,t)}},EP=class $y{static create(){return new $y(zn.get())}root;#e=D(()=>this.root.name!=="");get shouldRender(){return d(this.#e)}set shouldRender(t){$(this.#e,t)}#t=D(()=>this.root.value.current?this.root.value.current.toString():"");get isoValue(){return d(this.#t)}set isoValue(t){$(this.#t,t)}constructor(t){this.root=t}#r=D(()=>({name:this.root.name,value:this.isoValue,required:this.root.required.current}));get props(){return d(this.#r)}set props(t){$(this.#r,t)}},TP=class Fy{static create(t){return new Fy(t,zn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=et(t.ref,n=>this.root.setLabelNode(n))}onclick(t){if(this.root.disabled.current)return;const r=dD(this.root.getFieldNode());r&&r.focus()}#e=D(()=>({id:this.opts.id.current,"data-invalid":Ve(this.root.isInvalid),"data-disabled":Ve(this.root.disabled.current),[jo.label]:"",onclick:this.onclick,...this.attachment}));get props(){return d(this.#e)}set props(t){$(this.#e,t)}},Gi=class{opts;root;announcer;part;config;attachment;constructor(e,t,r,n){this.opts=e,this.root=t,this.part=r,this.config=n,this.announcer=t.announcer,this.onkeydown=this.onkeydown.bind(this),this.onfocusout=this.onfocusout.bind(this),this.attachment=et(e.ref)}#e(){return typeof this.config.max=="function"?this.config.max(this.root):this.config.max}#t(){return typeof this.config.min=="function"?this.config.min(this.root):this.config.min}#r(e){return this.config.getAnnouncement?this.config.getAnnouncement(e,this.root):e}#n(e,t=!0){const r=String(e);return t&&this.config.padZero&&r.length===1?`0${e}`:r}onkeydown(e){const t=this.root.value.current??this.root.placeholder.current;if(!(e.ctrlKey||e.metaKey||this.root.disabled.current)&&!((this.part==="hour"||this.part==="minute"||this.part==="second")&&!(this.part in t))&&(e.key!=="Tab"&&e.preventDefault(),!!oc(e.key))){if(Nc(e.key)){this.#i(t);return}if(Rc(e.key)){this.#s(t);return}if(_o(e.key)){this.#o(e);return}if(Lc(e.key)){this.#a(e);return}ia(e.key)&&na(e,this.root.getFieldNode())}}#i(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!1),this.root.updateSegment(this.part,r=>{if(r===null){const i=e[this.part];return this.announcer.announce(this.#r(i)),this.#n(i)}const n=e.set({[this.part]:Number.parseInt(r)}).cycle(this.part,this.config.cycle)[this.part];return this.announcer.announce(this.#r(n)),this.#n(n)})}#s(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!1),this.root.updateSegment(this.part,r=>{if(r===null){const i=e[this.part];return this.announcer.announce(this.#r(i)),this.#n(i)}const n=e.set({[this.part]:Number.parseInt(r)}).cycle(this.part,-this.config.cycle)[this.part];return this.announcer.announce(this.#r(n)),this.#n(n)})}#o(e){const t=Number.parseInt(e.key);let r=!1;const n=this.#e(),i=Math.floor(n/10),s=t===0,a=this.part;this.root.updateSegment(this.part,o=>{if(a in this.root.states&&this.root.states[a].hasLeftFocus&&(o=null,this.root.states[a].hasLeftFocus=!1),o===null)return s?(a in this.root.states&&(this.root.states[a].lastKeyZero=!0),this.announcer.announce("0"),"0"):(a in this.root.states&&(this.root.states[a].lastKeyZero||t>i)&&(r=!0),a in this.root.states&&(this.root.states[a].lastKeyZero=!1),r&&String(t).length===1?(this.announcer.announce(t),`0${t}`):`${t}`);if(a in this.root.states&&this.root.states[a].lastKeyZero)return t!==0?(r=!0,this.root.states[a].lastKeyZero=!1,`0${t}`):this.part==="hour"&&t===0&&this.root.hourCycle.current===24?(r=!0,this.root.states[a].lastKeyZero=!1,"00"):(this.part==="minute"||this.part==="second")&&t===0?(r=!0,this.root.states[a].lastKeyZero=!1,"00"):o;const l=Number.parseInt(o+t.toString());return l>n?(r=!0,`0${t}`):(r=!0,`${l}`)}),r&&_v(e,this.root.getFieldNode())}#a(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!1);let r=!1;this.root.updateSegment(this.part,n=>{if(n===null)return r=!0,this.announcer.announce(null),null;if(n.length===2&&n.startsWith("0"))return this.announcer.announce(null),null;const i=n.toString();if(i.length===1)return this.announcer.announce(null),null;const s=Number.parseInt(i.slice(0,-1));return this.announcer.announce(this.#r(s)),`${s}`}),r&&wv(e,this.root.getFieldNode())}onfocusout(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!0),this.config.padZero&&this.root.updateSegment(this.part,r=>r&&r.length===1?`0${r}`:r)}getSegmentProps(){const e=this.root.segmentValues,t=this.root.placeholder.current,r=e[this.part]===null;let n=t;e[this.part]&&(n=t.set({[this.part]:Number.parseInt(e[this.part])}));const i=n[this.part],s=this.#t(),a=this.#e();let o=r?"Empty":`${i}`;return this.part==="hour"&&"dayPeriod"in e&&e.dayPeriod&&(o=r?"Empty":`${i} ${e.dayPeriod}`),{"aria-label":`${this.part}, `,"aria-valuemin":s,"aria-valuemax":a,"aria-valuenow":i,"aria-valuetext":o}}#l=D(()=>({...this.root.sharedSegmentAttrs,id:this.opts.id.current,...this.getSegmentProps(),onkeydown:this.onkeydown,onfocusout:this.onfocusout,onclick:this.root.handleSegmentClick,...this.root.getBaseSegmentAttrs(this.part,this.opts.id.current),...this.attachment}));get props(){return d(this.#l)}set props(e){$(this.#l,e)}},xP=class extends Gi{#e=[];#t=0;constructor(e,t){super(e,t,"year",Hi.year)}onkeydown(e){if(!(e.ctrlKey||e.metaKey||this.root.disabled.current)&&(e.key!=="Tab"&&e.preventDefault(),!!oc(e.key))){if(Nc(e.key)){this.#r(),super.onkeydown(e);return}if(Rc(e.key)){this.#r(),super.onkeydown(e);return}if(_o(e.key)){this.#i(e);return}if(Lc(e.key)){this.#s(e);return}ia(e.key)&&na(e,this.root.getFieldNode())}}#r(){this.#t=0}#n(){this.#t++}#i(e){this.#e.push(e.key);let t=!1;const r=Number.parseInt(e.key);this.root.updateSegment("year",n=>{if(this.root.states.year.hasLeftFocus&&(n=null,this.root.states.year.hasLeftFocus=!1),n===null)return this.announcer.announce(r),`000${r}`;const i=n.toString()+r.toString(),s=Number.parseInt(i);if(String(s).length<4)return this.#t>0&&this.#e.length<=this.#t&&i.length<=4?(this.announcer.announce(s),i):(this.announcer.announce(s),lg(s));this.announcer.announce(s),t=!0;const a=`${s}`;return a.length>4?a.slice(0,4):a}),(this.#e.length===4||this.#e.length===this.#t)&&(t=!0),t&&_v(e,this.root.getFieldNode())}#s(e){this.#e=[],this.#n();let t=!1;this.root.updateSegment("year",r=>{if(this.root.states.year.hasLeftFocus=!1,r===null)return t=!0,this.announcer.announce(null),null;const n=r.toString();if(n.length===1)return this.announcer.announce(null),null;const i=n.slice(0,-1);return this.announcer.announce(i),`${i}`}),t&&wv(e,this.root.getFieldNode())}onfocusout(e){this.root.states.year.hasLeftFocus=!0,this.#e=[],this.#r(),this.root.updateSegment("year",t=>t&&t.length!==4?lg(Number.parseInt(t)):t)}},AP=class extends Gi{constructor(e,t){super(e,t,"day",Hi.day)}},CP=class extends Gi{constructor(e,t){super(e,t,"month",Hi.month)}},OP=class extends Gi{constructor(e,t){super(e,t,"hour",Hi.hour)}onkeydown(e){if(_o(e.key)){const t=this.root.updateSegment.bind(this.root);this.root.updateSegment=(r,n)=>{const i=t(r,n);return r==="hour"&&"hour"in this.root.segmentValues&&this.root.segmentValues.hour==="0"&&this.root.dayPeriodNode&&this.root.hourCycle.current!==24&&(this.root.segmentValues.hour="12"),i}}super.onkeydown(e),this.root.updateSegment=this.root.updateSegment.bind(this.root)}},DP=class extends Gi{constructor(e,t){super(e,t,"minute",Hi.minute)}},IP=class extends Gi{constructor(e,t){super(e,t,"second",Hi.second)}},PP=class Ny{static create(t){return new Ny(t,zn.get())}opts;root;attachment;#e;constructor(t,r){this.opts=t,this.root=r,this.#e=this.root.announcer,this.onkeydown=this.onkeydown.bind(this),this.attachment=et(t.ref,n=>this.root.dayPeriodNode=n)}onkeydown(t){if(!(t.ctrlKey||t.metaKey||this.root.disabled.current)&&(t.key!=="Tab"&&t.preventDefault(),!!NP(t.key))){if(Nc(t.key)||Rc(t.key)){this.root.updateSegment("dayPeriod",r=>{if(r==="AM")return this.#e.announce("PM"),"PM";const n="AM";return this.#e.announce(n),n});return}Lc(t.key)&&(this.root.states.dayPeriod.hasLeftFocus=!1,this.root.updateSegment("dayPeriod",()=>(this.#e.announce("AM"),"AM"))),t.key==="A"||t.key,this.root.updateSegment("dayPeriod",()=>{const r=t.key==="A"||t.key==="a"?"AM":"PM";return this.#e.announce(r),r}),ia(t.key)&&na(t,this.root.getFieldNode())}}#t=D(()=>{const t=this.root.segmentValues;if(!("dayPeriod"in t))return;const r=0,n=12,i=t.dayPeriod==="AM"?0:12,s=t.dayPeriod??"AM";return{...this.root.sharedSegmentAttrs,id:this.opts.id.current,inputmode:"text","aria-label":"AM/PM","aria-valuemin":r,"aria-valuemax":n,"aria-valuenow":i,"aria-valuetext":s,onkeydown:this.onkeydown,onclick:this.root.handleSegmentClick,...this.root.getBaseSegmentAttrs("dayPeriod",this.opts.id.current),...this.attachment}});get props(){return d(this.#t)}set props(t){$(this.#t,t)}},MP=class Ry{static create(t){return new Ry(t,zn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(t.ref)}#e=D(()=>({id:this.opts.id.current,"aria-hidden":Ku(!0),...this.root.getBaseSegmentAttrs("literal",this.opts.id.current),...this.attachment}));get props(){return d(this.#e)}set props(t){$(this.#e,t)}},$P=class Ly{static create(t){return new Ly(t,zn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.onkeydown=this.onkeydown.bind(this),this.attachment=et(t.ref)}onkeydown(t){t.key!=="Tab"&&t.preventDefault(),!this.root.disabled.current&&ia(t.key)&&na(t,this.root.getFieldNode())}#e=D(()=>({role:"textbox",id:this.opts.id.current,"aria-label":"timezone, ",style:{caretColor:"transparent"},onkeydown:this.onkeydown,...this.root.getBaseSegmentAttrs("timeZoneName",this.opts.id.current),"data-readonly":Ve(!0),...this.attachment}));get props(){return d(this.#e)}set props(t){$(this.#e,t)}},FP=class{static create(e,t){const r=zn.get();switch(e){case"day":return new AP(t,r);case"month":return new CP(t,r);case"year":return new xP(t,r);case"hour":return new OP(t,r);case"minute":return new DP(t,r);case"second":return new IP(t,r);case"dayPeriod":return new PP(t,r);case"literal":return new MP(t,r);case"timeZoneName":return new $P(t,r)}}};function NP(e){return oc(e)||e==="A"||e==="P"||e==="a"||e==="p"}function Nc(e){return e===Ju}function Rc(e){return e===Yu}function Lc(e){return e===jC}function lg(e){const t=4-String(e).length;return`${"0".repeat(t)}${e}`}function ug(e,t){ne(t,!1);const r=EP.create();Jl();var n=re(),i=U(n),s=a=>{Iv(a,An(()=>r.props))};ue(i,a=>{r.shouldRender&&a(s)}),x(e,n),ie()}se(ug,{},[],[],{mode:"open"});var RP=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","name","children","child"]),LP=B("<div><!></div>"),zP=B("<!> <!>",1);function cg(e,t){const r=mt();ne(t,!0);let n=_(t,"id",23,()=>Pe(r)),i=_(t,"ref",15,null),s=_(t,"name",7,""),a=_(t,"children",7),o=_(t,"child",7),l=He(t,RP);const c=SP.create({id:z(()=>n()),ref:z(()=>i(),m=>i(m)),name:z(()=>s())}),f=D(()=>Ke(l,c.props));var u={get id(){return n()},set id(m=Pe(r)){n(m),b()},get ref(){return i()},set ref(m=null){i(m),b()},get name(){return s()},set name(m=""){s(m),b()},get children(){return a()},set children(m){a(m),b()},get child(){return o()},set child(m){o(m),b()}},p=zP(),h=U(p),g=m=>{var y=re(),E=U(y);Se(E,o,()=>({props:d(f),segments:c.root.segmentContents})),x(m,y)},v=m=>{var y=LP();Ue(y,()=>({...d(f)}));var E=M(y);Se(E,()=>a()??qe,()=>({segments:c.root.segmentContents})),I(y),x(m,y)};return ue(h,m=>{o()?m(g):m(v,-1)}),ug(V(h,2),{}),x(e,p),ie(u)}se(cg,{id:{},ref:{},name:{},children:{},child:{}},[],[],{mode:"open"});var qP=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","children","child"]),UP=B("<div><!></div>");function dg(e,t){const r=mt();ne(t,!0);let n=_(t,"id",23,()=>Pe(r)),i=_(t,"ref",15,null),s=_(t,"children",7),a=_(t,"child",7),o=He(t,qP);const l=TP.create({id:z(()=>n()),ref:z(()=>i(),v=>i(v))}),c=D(()=>Ke(o,l.props));var f={get id(){return n()},set id(v=Pe(r)){n(v),b()},get ref(){return i()},set ref(v=null){i(v),b()},get children(){return s()},set children(v){s(v),b()},get child(){return a()},set child(v){a(v),b()}},u=re(),p=U(u),h=v=>{var m=re(),y=U(m);Se(y,a,()=>({props:d(c)})),x(v,m)},g=v=>{var m=UP();Ue(m,()=>({...d(c)}));var y=M(m);Se(y,()=>s()??qe),I(m),x(v,m)};return ue(p,v=>{a()?v(h):v(g,-1)}),x(e,u),ie(f)}se(dg,{id:{},ref:{},children:{},child:{}},[],[],{mode:"open"});var BP=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","children","child","part"]),VP=B("<span><!></span>");function fg(e,t){const r=mt();ne(t,!0);let n=_(t,"id",23,()=>Pe(r)),i=_(t,"ref",15,null),s=_(t,"children",7),a=_(t,"child",7),o=_(t,"part",7),l=He(t,BP);const c=FP.create(o(),{id:z(()=>n()),ref:z(()=>i(),m=>i(m))}),f=D(()=>Ke(l,c.props));var u={get id(){return n()},set id(m=Pe(r)){n(m),b()},get ref(){return i()},set ref(m=null){i(m),b()},get children(){return s()},set children(m){s(m),b()},get child(){return a()},set child(m){a(m),b()},get part(){return o()},set part(m){o(m),b()}},p=re(),h=U(p),g=m=>{var y=re(),E=U(y);Se(E,a,()=>({props:d(f)})),x(m,y)},v=m=>{var y=VP();Ue(y,()=>({...d(f)}));var E=M(y);Se(E,()=>s()??qe),I(y),x(m,y)};return ue(h,m=>{a()?m(g):m(v,-1)}),x(e,p),ie(u)}se(fg,{id:{},ref:{},children:{},child:{},part:{}},[],[],{mode:"open"});var hg=new Ft("DatePicker.Root"),jP=class zy{static create(t){return hg.set(new zy(t))}opts;constructor(t){this.opts=t}};function zc(e,t){const[r,n]=e;let i=!1;const s=t.length;for(let a=0,o=s-1;a<s;o=a++){const[l,c]=t[a]??[0,0],[f,u]=t[o]??[0,0];c>=n!=u>=n&&r<=(f-l)*(n-c)/(u-c)+l&&(i=!i)}return i}function qc(e,t){return e[0]>=t.left&&e[0]<=t.right&&e[1]>=t.top&&e[1]<=t.bottom}function pg(e,t){const r=e.left+e.width/2,n=e.top+e.height/2,i=t.left+t.width/2,s=t.top+t.height/2,a=i-r,o=s-n;return Math.abs(a)>Math.abs(o)?a>0?"right":"left":o>0?"bottom":"top"}var ZP=class{#e;#t;#r;#n=null;#i=null;#s=[];#o=null;#a=null;#l=null;#u(){this.#a!==null&&(cancelAnimationFrame(this.#a),this.#a=null)}#c(){this.#u(),this.#a=requestAnimationFrame(()=>{this.#a=null,!(!this.#n||!this.#i)&&(this.#f(),this.#e.onPointerExit())})}#d(){this.#l!==null&&(clearTimeout(this.#l),this.#l=null)}#h(){this.#r!==null&&(this.#d(),this.#l=window.setTimeout(()=>{this.#l=null,!(!this.#n||!this.#i)&&(this.#f(),this.#e.onPointerExit())},this.#r))}constructor(e){this.#e=e,this.#t=e.buffer??1;const t=e.transitIntentTimeout;this.#r=typeof t=="number"&&t>0?t:null,it([e.triggerNode,e.contentNode,e.enabled],([r,n,i])=>{if(!r||!n||!i){this.#o=null,this.#f();return}this.#o&&this.#o!==r&&this.#f(),this.#o=r;const s=yo(r),a=u=>{this.#p([u.clientX,u.clientY],r,n)},o=u=>{const p=u.relatedTarget;if(si(p)&&n.contains(p))return;const h=this.#e.ignoredTargets?.()??[];si(p)&&h.some(g=>g===p||g.contains(p))||(this.#s=si(p)&&h.length>0?h.filter(g=>p.contains(g)):[],this.#n=[u.clientX,u.clientY],this.#i="content",this.#c())},l=()=>{this.#f()},c=()=>{this.#f()},f=u=>{const p=u.relatedTarget;si(p)&&r.contains(p)||(this.#n=[u.clientX,u.clientY],this.#i="trigger",this.#c())};return[gt(s,"pointermove",a),gt(r,"pointerleave",o),gt(r,"pointerenter",l),gt(n,"pointerenter",c),gt(n,"pointerleave",f)].reduce((u,p)=>()=>{u(),p()},()=>{})})}#p(e,t,r){if(!this.#n||!this.#i)return;this.#u(),this.#h();const n=t.getBoundingClientRect(),i=r.getBoundingClientRect();if(this.#i==="content"&&qc(e,i)){this.#f();return}if(this.#i==="trigger"&&qc(e,n)){this.#f();return}if(this.#i==="content"&&this.#s.length>0)for(const l of this.#s){const c=l.getBoundingClientRect();if(qc(e,c))return;const f=pg(n,c),u=this.#m(n,c,f);if(u&&zc(e,u))return}const s=pg(n,i),a=this.#m(n,i,s);if(a&&zc(e,a))return;const o=this.#i==="content"?i:n;zc(e,this.#v(this.#n,o,s,this.#i))||(this.#f(),this.#e.onPointerExit())}#f(){this.#n=null,this.#i=null,this.#s=[],this.#u(),this.#d()}#m(e,t,r){const n=this.#t;switch(r){case"top":return[[Math.min(e.left,t.left)-n,e.top],[Math.min(e.left,t.left)-n,t.bottom],[Math.max(e.right,t.right)+n,t.bottom],[Math.max(e.right,t.right)+n,e.top]];case"bottom":return[[Math.min(e.left,t.left)-n,e.bottom],[Math.min(e.left,t.left)-n,t.top],[Math.max(e.right,t.right)+n,t.top],[Math.max(e.right,t.right)+n,e.bottom]];case"left":return[[e.left,Math.min(e.top,t.top)-n],[t.right,Math.min(e.top,t.top)-n],[t.right,Math.max(e.bottom,t.bottom)+n],[e.left,Math.max(e.bottom,t.bottom)+n]];case"right":return[[e.right,Math.min(e.top,t.top)-n],[t.left,Math.min(e.top,t.top)-n],[t.left,Math.max(e.bottom,t.bottom)+n],[e.right,Math.max(e.bottom,t.bottom)+n]]}}#v(e,t,r,n){const i=this.#t*4,[s,a]=e;switch(n==="trigger"?this.#y(r):r){case"top":return[[s-i,a+i],[s+i,a+i],[t.right+i,t.bottom],[t.right+i,t.top],[t.left-i,t.top],[t.left-i,t.bottom]];case"bottom":return[[s-i,a-i],[s+i,a-i],[t.right+i,t.top],[t.right+i,t.bottom],[t.left-i,t.bottom],[t.left-i,t.top]];case"left":return[[s+i,a-i],[s+i,a+i],[t.right,t.bottom+i],[t.left,t.bottom+i],[t.left,t.top-i],[t.right,t.top-i]];case"right":return[[s-i,a-i],[s-i,a+i],[t.left,t.bottom+i],[t.right,t.bottom+i],[t.right,t.top-i],[t.left,t.top-i]]}}#y(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}},Uc=bo({component:"popover",parts:["root","trigger","content","close","overlay"]}),Bc=new Ft("Popover.Root"),WP=class qy{static create(t){return Bc.set(new qy(t))}opts;#e=ae(null);get contentNode(){return d(this.#e)}set contentNode(t){$(this.#e,t,!0)}contentPresence;#t=ae(null);get triggerNode(){return d(this.#t)}set triggerNode(t){$(this.#t,t,!0)}#r=ae(null);get overlayNode(){return d(this.#r)}set overlayNode(t){$(this.#r,t,!0)}overlayPresence;#n=ae(!1);get openedViaHover(){return d(this.#n)}set openedViaHover(t){$(this.#n,t,!0)}#i=ae(!1);get hasInteractedWithContent(){return d(this.#i)}set hasInteractedWithContent(t){$(this.#i,t,!0)}#s=ae(!1);get hoverCooldown(){return d(this.#s)}set hoverCooldown(t){$(this.#s,t,!0)}#o=ae(0);get closeDelay(){return d(this.#o)}set closeDelay(t){$(this.#o,t,!0)}#a=null;#l=null;constructor(t){this.opts=t,this.contentPresence=new qm({ref:z(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new qm({ref:z(()=>this.overlayNode),open:this.opts.open}),it(()=>this.opts.open.current,r=>{r||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#u())})}setDomContext(t){this.#l=t}#u(){this.#a!==null&&this.#l&&(this.#l.clearTimeout(this.#a),this.#a=null)}toggleOpen(){this.#u(),this.opts.open.current=!this.opts.open.current}handleClose(){this.#u(),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){this.#u(),!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.#u(),this.closeDelay<=0?this.opts.open.current=!1:this.#l&&(this.#a=this.#l.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#a=null},this.closeDelay))))}cancelDelayedClose(){this.#u()}markInteraction(){this.hasInteractedWithContent=!0,this.#u()}},HP=class Uy{static create(t){return new Uy(t,Bc.get())}opts;root;attachment;domContext;#e=null;#t=null;#r=ae(!1);constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref,n=>this.root.triggerNode=n),this.domContext=new Bi(t.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),it(()=>this.opts.closeDelay.current,n=>{this.root.closeDelay=n})}#n(){this.#e!==null&&(this.domContext.clearTimeout(this.#e),this.#e=null)}#i(){this.#t!==null&&(this.domContext.clearTimeout(this.#t),this.#t=null)}#s(){this.#n(),this.#i()}onpointerenter(t){if(this.opts.disabled.current||!this.opts.openOnHover.current||wo(t)||($(this.#r,!0),this.#i(),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;const r=this.opts.openDelay.current;r<=0?this.root.handleHoverOpen():this.#e=this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),this.#e=null},r)}onpointerleave(t){this.opts.disabled.current||this.opts.openOnHover.current&&(wo(t)||($(this.#r,!1),this.#n(),this.root.hoverCooldown=!1))}onclick(t){if(!this.opts.disabled.current&&t.button===0){if(this.#s(),d(this.#r)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}d(this.#r)&&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(t){this.opts.disabled.current||(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this.#s(),this.root.toggleOpen())}#o(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#a=D(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":Tr(this.root.opts.open.current),"data-state":Nm(this.root.opts.open.current),"aria-controls":this.#o(),[Uc.trigger]:"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return d(this.#a)}set props(t){$(this.#a,t)}},GP=class By{static create(t){return new By(t,Bc.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref,n=>this.root.contentNode=n),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 ZP({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(t){this.root.markInteraction()}onfocusin(t){const r=t.target;si(r)&&gO(r)&&this.root.markInteraction()}onpointerenter(t){wo(t)||this.root.cancelDelayedClose()}onpointerleave(t){wo(t)}onInteractOutside=t=>{if(this.opts.onInteractOutside.current(t),t.defaultPrevented||!si(t.target))return;const r=t.target.closest(Uc.selector("trigger"));if(!(r&&r===this.root.triggerNode)){if(this.opts.customAnchor.current){if(si(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(t.target))return}else if(typeof this.opts.customAnchor.current=="string"){const n=document.querySelector(this.opts.customAnchor.current);if(n&&n.contains(t.target))return}}this.root.handleClose()}};onEscapeKeydown=t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()};get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}#e=D(()=>({open:this.root.opts.open.current}));get snippetProps(){return d(this.#e)}set snippetProps(t){$(this.#e,t)}#t=D(()=>({id:this.opts.id.current,tabindex:-1,"data-state":Nm(this.root.opts.open.current),...BC(this.root.contentPresence.transitionStatus),[Uc.content]:"",style:{pointerEvents:"auto",contain:"layout style"},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return d(this.#t)}set props(t){$(this.#t,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}};function mg(e,t){ne(t,!0);let r=_(t,"open",15,!1),n=_(t,"onOpenChange",7,Te),i=_(t,"onOpenChangeComplete",7,Te),s=_(t,"value",15),a=_(t,"onValueChange",7,Te),o=_(t,"placeholder",15),l=_(t,"onPlaceholderChange",7,Te),c=_(t,"isDateUnavailable",7,()=>!1),f=_(t,"validate",7,Te),u=_(t,"onInvalid",7,Te),p=_(t,"minValue",7),h=_(t,"maxValue",7),g=_(t,"disabled",7,!1),v=_(t,"readonly",7,!1),m=_(t,"granularity",7),y=_(t,"readonlySegments",23,()=>[]),E=_(t,"hourCycle",7),k=_(t,"locale",7),T=_(t,"hideTimeZone",7,!1),A=_(t,"required",7,!1),O=_(t,"calendarLabel",7,"Event"),F=_(t,"disableDaysOutsideMonth",7,!0),R=_(t,"preventDeselect",7,!1),Y=_(t,"pagedNavigation",7,!1),N=_(t,"weekStartsOn",7),X=_(t,"weekdayFormat",7,"narrow"),q=_(t,"isDateDisabled",7,()=>!1),le=_(t,"fixedWeeks",7,!1),he=_(t,"numberOfMonths",7,1),j=_(t,"closeOnDateSelect",7,!0),oe=_(t,"initialFocus",7,!1),ee=_(t,"errorMessageId",7),fe=_(t,"children",7),ce=_(t,"monthFormat",7,"long"),de=_(t,"yearFormat",7,"numeric");const G=uv({granularity:m(),defaultValue:s(),minValue:p(),maxValue:h()});function Q(){o()===void 0&&o(G)}Q(),it.pre(()=>o(),()=>{Q()});function P(){j()&&r(!1)}const te=jP.create({open:z(()=>r(),w=>{r(w),n()(w)}),value:z(()=>s(),w=>{s(w),a()(w)}),placeholder:z(()=>o(),w=>{o(w),l()(w)}),isDateUnavailable:z(()=>c()),minValue:z(()=>p()),maxValue:z(()=>h()),disabled:z(()=>g()),readonly:z(()=>v()),granularity:z(()=>m()),readonlySegments:z(()=>y()),hourCycle:z(()=>E()),locale:Bm(()=>k()),hideTimeZone:z(()=>T()),required:z(()=>A()),calendarLabel:z(()=>O()),disableDaysOutsideMonth:z(()=>F()),preventDeselect:z(()=>R()),pagedNavigation:z(()=>Y()),weekStartsOn:z(()=>N()),weekdayFormat:z(()=>X()),isDateDisabled:z(()=>q()),fixedWeeks:z(()=>le()),numberOfMonths:z(()=>he()),initialFocus:z(()=>oe()),onDateSelect:z(()=>P),defaultPlaceholder:G,monthFormat:z(()=>ce()),yearFormat:z(()=>de())});WP.create({open:te.opts.open,onOpenChangeComplete:z(()=>i())}),kP.create({value:te.opts.value,disabled:te.opts.disabled,readonly:te.opts.readonly,readonlySegments:te.opts.readonlySegments,validate:z(()=>f()),onInvalid:z(()=>u()),minValue:te.opts.minValue,maxValue:te.opts.maxValue,granularity:te.opts.granularity,hideTimeZone:te.opts.hideTimeZone,hourCycle:te.opts.hourCycle,locale:te.opts.locale,required:te.opts.required,placeholder:te.opts.placeholder,errorMessageId:z(()=>ee()),isInvalidProp:z(()=>{})});var L={get open(){return r()},set open(w=!1){r(w),b()},get onOpenChange(){return n()},set onOpenChange(w=Te){n(w),b()},get onOpenChangeComplete(){return i()},set onOpenChangeComplete(w=Te){i(w),b()},get value(){return s()},set value(w){s(w),b()},get onValueChange(){return a()},set onValueChange(w=Te){a(w),b()},get placeholder(){return o()},set placeholder(w){o(w),b()},get onPlaceholderChange(){return l()},set onPlaceholderChange(w=Te){l(w),b()},get isDateUnavailable(){return c()},set isDateUnavailable(w=()=>!1){c(w),b()},get validate(){return f()},set validate(w=Te){f(w),b()},get onInvalid(){return u()},set onInvalid(w=Te){u(w),b()},get minValue(){return p()},set minValue(w){p(w),b()},get maxValue(){return h()},set maxValue(w){h(w),b()},get disabled(){return g()},set disabled(w=!1){g(w),b()},get readonly(){return v()},set readonly(w=!1){v(w),b()},get granularity(){return m()},set granularity(w){m(w),b()},get readonlySegments(){return y()},set readonlySegments(w=[]){y(w),b()},get hourCycle(){return E()},set hourCycle(w){E(w),b()},get locale(){return k()},set locale(w){k(w),b()},get hideTimeZone(){return T()},set hideTimeZone(w=!1){T(w),b()},get required(){return A()},set required(w=!1){A(w),b()},get calendarLabel(){return O()},set calendarLabel(w="Event"){O(w),b()},get disableDaysOutsideMonth(){return F()},set disableDaysOutsideMonth(w=!0){F(w),b()},get preventDeselect(){return R()},set preventDeselect(w=!1){R(w),b()},get pagedNavigation(){return Y()},set pagedNavigation(w=!1){Y(w),b()},get weekStartsOn(){return N()},set weekStartsOn(w){N(w),b()},get weekdayFormat(){return X()},set weekdayFormat(w="narrow"){X(w),b()},get isDateDisabled(){return q()},set isDateDisabled(w=()=>!1){q(w),b()},get fixedWeeks(){return le()},set fixedWeeks(w=!1){le(w),b()},get numberOfMonths(){return he()},set numberOfMonths(w=1){he(w),b()},get closeOnDateSelect(){return j()},set closeOnDateSelect(w=!0){j(w),b()},get initialFocus(){return oe()},set initialFocus(w=!1){oe(w),b()},get errorMessageId(){return ee()},set errorMessageId(w){ee(w),b()},get children(){return fe()},set children(w){fe(w),b()},get monthFormat(){return ce()},set monthFormat(w="long"){ce(w),b()},get yearFormat(){return de()},set yearFormat(w="numeric"){de(w),b()}},be=re(),Z=U(be);return $e(Z,()=>tg,(w,_e)=>{_e(w,{children:(we,De)=>{var Le=re(),je=U(Le);Se(je,()=>fe()??qe),x(we,Le)},$$slots:{default:!0}})}),x(e,be),ie(L)}se(mg,{open:{},onOpenChange:{},onOpenChangeComplete:{},value:{},onValueChange:{},placeholder:{},onPlaceholderChange:{},isDateUnavailable:{},validate:{},onInvalid:{},minValue:{},maxValue:{},disabled:{},readonly:{},granularity:{},readonlySegments:{},hourCycle:{},locale:{},hideTimeZone:{},required:{},calendarLabel:{},disableDaysOutsideMonth:{},preventDeselect:{},pagedNavigation:{},weekStartsOn:{},weekdayFormat:{},isDateDisabled:{},fixedWeeks:{},numberOfMonths:{},closeOnDateSelect:{},initialFocus:{},errorMessageId:{},children:{},monthFormat:{},yearFormat:{}},[],[],{mode:"open"});var KP=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref"]),YP=B("<div><!></div>");function vg(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"id",23,()=>Pe(r)),a=_(t,"ref",15,null),o=He(t,KP);const l=hg.get(),c=Av.create({id:z(()=>s()),ref:z(()=>a(),m=>a(m)),calendarLabel:l.opts.calendarLabel,fixedWeeks:l.opts.fixedWeeks,isDateDisabled:l.opts.isDateDisabled,isDateUnavailable:l.opts.isDateUnavailable,locale:l.opts.locale,numberOfMonths:l.opts.numberOfMonths,pagedNavigation:l.opts.pagedNavigation,preventDeselect:l.opts.preventDeselect,readonly:l.opts.readonly,type:z(()=>"single"),weekStartsOn:l.opts.weekStartsOn,weekdayFormat:l.opts.weekdayFormat,disabled:l.opts.disabled,disableDaysOutsideMonth:l.opts.disableDaysOutsideMonth,maxValue:l.opts.maxValue,minValue:l.opts.minValue,placeholder:l.opts.placeholder,value:l.opts.value,onDateSelect:l.opts.onDateSelect,initialFocus:l.opts.initialFocus,defaultPlaceholder:l.opts.defaultPlaceholder,maxDays:z(()=>{}),monthFormat:l.opts.monthFormat,yearFormat:l.opts.yearFormat}),f=D(()=>Ke(o,c.props));var u={get children(){return n()},set children(m){n(m),b()},get child(){return i()},set child(m){i(m),b()},get id(){return s()},set id(m=Pe(r)){s(m),b()},get ref(){return a()},set ref(m=null){a(m),b()}},p=re(),h=U(p),g=m=>{var y=re(),E=U(y);{let k=D(()=>({props:d(f),...c.snippetProps}));Se(E,i,()=>d(k))}x(m,y)},v=m=>{var y=YP();Ue(y,()=>({...d(f)}));var E=M(y);Se(E,()=>n()??qe,()=>c.snippetProps),I(y),x(m,y)};return ue(h,m=>{i()?m(g):m(v,-1)}),x(e,p),ie(u)}se(vg,{children:{},child:{},id:{},ref:{}},[],[],{mode:"open"});var JP=new Set(["$$slots","$$events","$$legacy","$$host","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor","style"]),gg=B("<div><div><!></div></div>");function yg(e,t){const r=mt();ne(t,!0);let n=_(t,"child",7),i=_(t,"children",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Pe(r)),o=_(t,"forceMount",7,!1),l=_(t,"onOpenAutoFocus",7,Te),c=_(t,"onCloseAutoFocus",7,Te),f=_(t,"onEscapeKeydown",7,Te),u=_(t,"onInteractOutside",7,Te),p=_(t,"trapFocus",7,!0),h=_(t,"preventScroll",7,!1),g=_(t,"customAnchor",7,null),v=_(t,"style",7),m=He(t,JP);const y=GP.create({id:z(()=>a()),ref:z(()=>s(),N=>s(N)),onInteractOutside:z(()=>u()),onEscapeKeydown:z(()=>f()),customAnchor:z(()=>g())}),E=D(()=>Ke(m,y.props)),k=D(()=>p()&&y.shouldTrapFocus);function T(N){y.shouldTrapFocus||N.preventDefault(),l()(N)}var A={get child(){return n()},set child(N){n(N),b()},get children(){return i()},set children(N){i(N),b()},get ref(){return s()},set ref(N=null){s(N),b()},get id(){return a()},set id(N=Pe(r)){a(N),b()},get forceMount(){return o()},set forceMount(N=!1){o(N),b()},get onOpenAutoFocus(){return l()},set onOpenAutoFocus(N=Te){l(N),b()},get onCloseAutoFocus(){return c()},set onCloseAutoFocus(N=Te){c(N),b()},get onEscapeKeydown(){return f()},set onEscapeKeydown(N=Te){f(N),b()},get onInteractOutside(){return u()},set onInteractOutside(N=Te){u(N),b()},get trapFocus(){return p()},set trapFocus(N=!0){p(N),b()},get preventScroll(){return h()},set preventScroll(N=!1){h(N),b()},get customAnchor(){return g()},set customAnchor(N=null){g(N),b()},get style(){return v()},set style(N){v(N),b()}},O=re(),F=U(O),R=N=>{og(N,An(()=>d(E),()=>y.popperProps,{get ref(){return y.opts.ref},get enabled(){return y.root.opts.open.current},get id(){return a()},get trapFocus(){return d(k)},get preventScroll(){return h()},loop:!0,forceMount:!0,get customAnchor(){return g()},onOpenAutoFocus:T,get onCloseAutoFocus(){return c()},get shouldRender(){return y.shouldRender},popper:(q,le)=>{let he=()=>le?.().props,j=()=>le?.().wrapperProps;const oe=D(()=>Ke(he(),{style:Xv("popover")},{style:v()}));var ee=re(),fe=U(ee),ce=G=>{var Q=re(),P=U(Q);{let te=D(()=>({props:d(oe),wrapperProps:j(),...y.snippetProps}));Se(P,n,()=>d(te))}x(G,Q)},de=G=>{var Q=gg();Ue(Q,()=>({...j()}));var P=M(Q);Ue(P,()=>({...d(oe)}));var te=M(P);Se(te,()=>i()??qe),I(P),I(Q),x(G,Q)};ue(fe,G=>{n()?G(ce):G(de,-1)}),x(q,ee)},$$slots:{popper:!0}}))},Y=N=>{ag(N,An(()=>d(E),()=>y.popperProps,{get ref(){return y.opts.ref},get open(){return y.root.opts.open.current},get id(){return a()},get trapFocus(){return d(k)},get preventScroll(){return h()},loop:!0,forceMount:!1,get customAnchor(){return g()},onOpenAutoFocus:T,get onCloseAutoFocus(){return c()},get shouldRender(){return y.shouldRender},popper:(q,le)=>{let he=()=>le?.().props,j=()=>le?.().wrapperProps;const oe=D(()=>Ke(he(),{style:Xv("popover")},{style:v()}));var ee=re(),fe=U(ee),ce=G=>{var Q=re(),P=U(Q);{let te=D(()=>({props:d(oe),wrapperProps:j(),...y.snippetProps}));Se(P,n,()=>d(te))}x(G,Q)},de=G=>{var Q=gg();Ue(Q,()=>({...j()}));var P=M(Q);Ue(P,()=>({...d(oe)}));var te=M(P);Se(te,()=>i()??qe),I(P),I(Q),x(G,Q)};ue(fe,G=>{n()?G(ce):G(de,-1)}),x(q,ee)},$$slots:{popper:!0}}))};return ue(F,N=>{o()?N(R):o()||N(Y,1)}),x(e,O),ie(A)}se(yg,{child:{},children:{},ref:{},id:{},forceMount:{},onOpenAutoFocus:{},onCloseAutoFocus:{},onEscapeKeydown:{},onInteractOutside:{},trapFocus:{},preventScroll:{},customAnchor:{},style:{}},[],[],{mode:"open"});var QP=new Set(["$$slots","$$events","$$legacy","$$host","ref","onOpenAutoFocus"]);function bg(e,t){ne(t,!0);let r=_(t,"ref",15,null),n=_(t,"onOpenAutoFocus",7),i=He(t,QP);const s=D(()=>Ke({onOpenAutoFocus:n()},{onOpenAutoFocus:xD}));var a={get ref(){return r()},set ref(o=null){r(o),b()},get onOpenAutoFocus(){return n()},set onOpenAutoFocus(o){n(o),b()}};return yg(e,An(()=>d(s),()=>i,{get ref(){return r()},set ref(o){r(o)}})),ie(a)}se(bg,{ref:{},onOpenAutoFocus:{}},[],[],{mode:"open"});var XP=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]),eM=B("<button><!></button>");function _g(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"id",23,()=>Pe(r)),a=_(t,"ref",15,null),o=_(t,"type",7,"button"),l=_(t,"disabled",7,!1),c=_(t,"openOnHover",7,!1),f=_(t,"openDelay",7,700),u=_(t,"closeDelay",7,300),p=He(t,XP);const h=HP.create({id:z(()=>s()),ref:z(()=>a(),m=>a(m)),disabled:z(()=>!!l()),openOnHover:z(()=>c()),openDelay:z(()=>f()),closeDelay:z(()=>u())}),g=D(()=>Ke(p,h.props,{type:o()}));var v={get children(){return n()},set children(m){n(m),b()},get child(){return i()},set child(m){i(m),b()},get id(){return s()},set id(m=Pe(r)){s(m),b()},get ref(){return a()},set ref(m=null){a(m),b()},get type(){return o()},set type(m="button"){o(m),b()},get disabled(){return l()},set disabled(m=!1){l(m),b()},get openOnHover(){return c()},set openOnHover(m=!1){c(m),b()},get openDelay(){return f()},set openDelay(m=700){f(m),b()},get closeDelay(){return u()},set closeDelay(m=300){u(m),b()}};return rg(e,{get id(){return s()},get ref(){return h.opts.ref},children:(m,y)=>{var E=re(),k=U(E),T=O=>{var F=re(),R=U(F);Se(R,i,()=>({props:d(g)})),x(O,F)},A=O=>{var F=eM();Ue(F,()=>({...d(g)}));var R=M(F);Se(R,()=>n()??qe),I(F),x(O,F)};ue(k,O=>{i()?O(T):O(A,-1)}),x(m,E)},$$slots:{default:!0}}),ie(v)}se(_g,{children:{},child:{},id:{},ref:{},type:{},disabled:{},openOnHover:{},openDelay:{},closeDelay:{}},[],[],{mode:"open"});var tM=new Set(["$$slots","$$events","$$legacy","$$host","ref","onkeydown"]);function wg(e,t){ne(t,!0);let r=_(t,"ref",15,null),n=_(t,"onkeydown",7),i=He(t,tM);function s(l){if(ia(l.key)){const c=l.currentTarget.closest(jo.selector("input"));if(!c)return;na(l,c)}}const a=D(()=>Ke({onkeydown:n()},{onkeydown:s}));var o={get ref(){return r()},set ref(l=null){r(l),b()},get onkeydown(){return n()},set onkeydown(l){n(l),b()}};return _g(e,An(()=>i,{"data-segment":"trigger"},()=>d(a),{get ref(){return r()},set ref(l){r(l)}})),ie(o)}se(wg,{ref:{},onkeydown:{}},[],[],{mode:"open"});var Vc=B("<!> <!>",1),kg=B("<!> <!> <!>",1);function Sg(e,t){ne(t,!0);let r=_(t,"dateString",15),n=_(t,"labelClass",7),i=_(t,"inputClass",7),s=_(t,"labelText",7),a=ae(Me(Ii(Xt())));const o="go-"+Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);ve(()=>{r(d(a).toString())});var l={get dateString(){return r()},set dateString(u){r(u),b()},get labelClass(){return n()},set labelClass(u){n(u),b()},get inputClass(){return i()},set inputClass(u){i(u),b()},get labelText(){return s()},set labelText(u){s(u),b()}},c=re(),f=U(c);{let u=D(()=>S.locale||"de");$e(f,()=>mg,(p,h)=>{h(p,{get locale(){return d(u)},weekStartsOn:1,isDateDisabled:g=>g.compare(Ii(Xt()))<0,get value(){return d(a)},set value(g){$(a,g,!0)},children:(g,v)=>{var m=kg(),y=U(m);$e(y,()=>dg,(T,A)=>{A(T,{get id(){return o},get class(){return`go-datepicker-label ${n()??""}`},children:(O,F)=>{var R=re(),Y=U(R),N=X=>{var q=re(),le=U(q);Se(le,s),x(X,q)};ue(Y,X=>{s()&&X(N)}),x(O,R)},$$slots:{default:!0}})});var E=V(y,2);{const T=(A,O)=>{let F=()=>O?.().segments;var R=Vc(),Y=U(R);Ne(Y,17,F,sn,(X,q)=>{let le=()=>d(q).part,he=()=>d(q).value;var j=re(),oe=U(j);$e(oe,()=>fg,(ee,fe)=>{fe(ee,{get part(){return le()},children:(ce,de)=>{Ot();var G=Bt();J(()=>H(G,he())),x(ce,G)},$$slots:{default:!0}})}),x(X,j)});var N=V(Y,2);$e(N,()=>wg,(X,q)=>{q(X,{get"aria-labelledby"(){return o},class:"go-calendar-button"})}),x(A,R)};$e(E,()=>cg,(A,O)=>{O(A,{get class(){return`go-datepicker-input ${i()??""}`},children:T,$$slots:{default:!0}})})}var k=V(E,2);$e(k,()=>bg,(T,A)=>{A(T,{children:(O,F)=>{var R=re(),Y=U(R);{const N=(X,q)=>{let le=()=>q?.().months,he=()=>q?.().weekdays;var j=Vc(),oe=U(j);$e(oe,()=>gc,(fe,ce)=>{ce(fe,{children:(de,G)=>{var Q=kg(),P=U(Q);$e(P,()=>_c,(be,Z)=>{Z(be,{class:"go-datepicker-previous"})});var te=V(P,2);$e(te,()=>yc,(be,Z)=>{Z(be,{class:"go-datepicker-selected-month"})});var L=V(te,2);$e(L,()=>bc,(be,Z)=>{Z(be,{class:"go-datepicker-next"})}),x(de,Q)},$$slots:{default:!0}})});var ee=V(oe,2);Ne(ee,16,le,fe=>fe,(fe,ce)=>{var de=re(),G=U(de);$e(G,()=>fc,(Q,P)=>{P(Q,{children:(te,L)=>{var be=Vc(),Z=U(be);$e(Z,()=>mc,(_e,we)=>{we(_e,{children:(De,Le)=>{var je=re(),bt=U(je);$e(bt,()=>aa,(at,Nt)=>{Nt(at,{children:(_t,Rt)=>{var nr=re(),Ht=U(nr);Ne(Ht,17,he,sn,(vr,Ir)=>{var Pr=re(),yn=U(Pr);$e(yn,()=>vc,(Mr,gr)=>{gr(Mr,{children:(Xr,en)=>{Ot();var xt=Bt();J(()=>H(xt,d(Ir))),x(Xr,xt)},$$slots:{default:!0}})}),x(vr,Pr)}),x(_t,nr)},$$slots:{default:!0}})}),x(De,je)},$$slots:{default:!0}})});var w=V(Z,2);$e(w,()=>hc,(_e,we)=>{we(_e,{children:(De,Le)=>{var je=re(),bt=U(je);Ne(bt,16,()=>ce.weeks,at=>at,(at,Nt)=>{var _t=re(),Rt=U(_t);$e(Rt,()=>aa,(nr,Ht)=>{Ht(nr,{children:(vr,Ir)=>{var Pr=re(),yn=U(Pr);Ne(yn,16,()=>Nt,Mr=>Mr,(Mr,gr,Xr,en)=>{var xt=re(),Un=U(xt);$e(Un,()=>pc,(rs,ns)=>{ns(rs,{get date(){return gr},get month(){return ce.value},children:(fa,td)=>{var mi=re(),is=U(mi);$e(is,()=>dc,(yr,Bn)=>{Bn(yr,{})}),x(fa,mi)},$$slots:{default:!0}})}),x(Mr,xt)}),x(vr,Pr)},$$slots:{default:!0}})}),x(at,_t)}),x(De,je)},$$slots:{default:!0}})}),x(te,be)},$$slots:{default:!0}})}),x(fe,de)}),x(X,j)};$e(Y,()=>vg,(X,q)=>{q(X,{children:N,$$slots:{default:!0}})})}x(O,R)},$$slots:{default:!0}})}),x(g,m)},$$slots:{default:!0}})})}return x(e,c),ie(l)}se(Sg,{dateString:{},labelClass:{},inputClass:{},labelText:{}},[],[],{mode:"open"});var rM=new Set(["$$slots","$$events","$$legacy","$$host","field","describedByIds","labelClass","inputClass","host"]),nM=B('<span class="go-field-star" aria-hidden="true">*</span>'),iM=B(" <!>",1),sM=B("<label><!></label> <input/>",1),aM=B("<label><!></label> <textarea></textarea>",1),oM=B('<figure role="status" aria-live="polite"><img class="go-file-preview"/> <figcaption class="go-file-preview-caption"> </figcaption></figure>'),lM=B("<label><!></label> <input/> <!>",1),uM=B('<label><input/> <span class="go-checkbox-label"><!></span></label>'),cM=B('<img src="" alt=""/> <option> </option>',1),dM=B('<option disabled="" hidden="" selected=""> </option> <!>',1),fM=B("<!>",1),hM=B("<label><!></label> <select><!></select>",1),pM=B('<img style="width: 60px" aria-hidden="true"/>'),mM=B('<span class="go-payment-mode-icons"></span>'),vM=B('<span class="go-payment-mode-name"> </span>'),gM=B('<label><input type="radio"/> <!></label>'),yM=B('<fieldset role="radiogroup"><legend><!></legend> <!></fieldset>'),bM=B("<label> <input/></label>"),_M=B("<fieldset><legend><!></legend> <!></fieldset>");function Eg(e,t){ne(t,!0);const r=j=>{Ot();var oe=iM(),ee=U(oe),fe=V(ee),ce=de=>{var G=nM();x(de,G)};ue(fe,de=>{u().required&&de(ce)}),J(()=>H(ee,`${d(R)??""} `)),x(j,oe)},n=j=>{var oe=sM(),ee=U(oe);r(M(ee)),I(ee);var fe=V(ee,2);Ue(fe,()=>({...d(F),...m,class:g(),placeholder:u().placeholder,type:u().type,name:u().key}),void 0,void 0,void 0,void 0,!0),J(()=>{St(ee,1,dr(h())),me(ee,"for",d(A))}),qa(fe,()=>u().value,ce=>u(u().value=ce,!0)),x(j,oe)},i=j=>{var oe=aM(),ee=U(oe);r(M(ee)),I(ee);var fe=V(ee,2);Qb(fe),Ue(fe,()=>({...d(F),...m,class:g(),placeholder:u().placeholder,name:u().key})),J(()=>{St(ee,1,dr(h())),me(ee,"for",d(A))}),qa(fe,()=>u().value,ce=>u(u().value=ce,!0)),x(j,oe)},s=j=>{var oe=lM(),ee=U(oe);r(M(ee)),I(ee);var fe=V(ee,2),ce=Q=>{const P=Q.currentTarget.files;u(u().value=P&&P[0]?P[0]:null,!0),d(E)?d(E).validateField(u()):u().validate()};Ue(fe,()=>({...d(F),...m,class:g(),type:"file",accept:"image/*",name:u().key,onchange:ce}),void 0,void 0,void 0,void 0,!0);var de=V(fe,2),G=Q=>{var P=oM(),te=M(P),L=V(te,2),be=M(L,!0);I(L),I(P),J(Z=>{me(P,"data-field-preview",u().key),me(te,"src",d(N)),me(te,"alt",Z),H(be,u().value.name)},[()=>S.t("forms.file.preview_alt")||"User uploaded photo"]),x(Q,P)};ue(de,Q=>{d(N)&&u().value instanceof File&&Q(G)}),J(()=>{St(ee,1,dr(h())),me(ee,"for",d(A))}),x(j,oe)},a=j=>{var oe=uM(),ee=M(oe);Ue(ee,()=>({...d(F),...m,name:u().key,type:"checkbox",value:"true"}),void 0,void 0,void 0,void 0,!0);var fe=V(ee,2);r(M(fe)),I(fe),I(oe),J(()=>{St(oe,1,dr(h())),me(oe,"for",d(A))}),j_(ee,()=>u().value===!0,ce=>{u(u().value=ce,!0)}),x(j,oe)},o=j=>{var oe=hM(),ee=U(oe);r(M(ee)),I(ee);var fe=V(ee,2);Ue(fe,()=>({...d(F),...m,name:u().key,class:g()})),B_(fe,()=>{var ce=M(fe),de=fM(),G=U(de),Q=P=>{var te=dM(),L=U(te),be=M(L,!0);I(L),L.value=L.__value="";var Z=V(L,2);Ne(Z,17,()=>u().options(),w=>w.value,(w,_e)=>{var we=cM(),De=V(U(we),2),Le=M(De,!0);I(De);var je={};J(()=>{H(Le,d(_e).label),je!==(je=d(_e).value)&&(De.value=(De.__value=d(_e).value)??"")}),x(w,we)}),J(w=>H(be,w),[()=>S.t("common.choose")]),x(P,te)};ue(G,P=>{u().options&&P(Q)}),x(ce,de)}),J(()=>{St(ee,1,dr(h())),me(ee,"for",d(A))}),M_(fe,()=>u().value,ce=>u(u().value=ce,!0)),x(j,oe)},l=j=>{Sg(j,{get labelClass(){return h()},get inputClass(){return g()},get labelText(){return r},get dateString(){return u().value},set dateString(oe){u(u().value=oe,!0)}})},c=j=>{const oe=D(()=>S.payment_modes?Object.values(S.payment_modes):[]);var ee=yM(),fe=M(ee);r(M(fe)),I(fe);var ce=V(fe,2);Ne(ce,17,()=>d(oe),de=>de.id,(de,G)=>{var Q=gM(),P=M(Q);Is(P);var te=V(P,2),L=Z=>{var w=mM();Ne(w,20,()=>d(G).icons,_e=>_e,(_e,we)=>{const De=D(()=>Y+we+".svg");var Le=pM();J(()=>{St(Le,1,dr(we)),me(Le,"src",d(De)),me(Le,"alt",we+" icon")}),x(_e,Le)}),I(w),x(Z,w)},be=Z=>{var w=vM(),_e=M(w,!0);I(w),J(()=>H(_e,d(G).name)),x(Z,w)};ue(te,Z=>{d(G).icons.length>0?Z(L):Z(be,-1)}),I(Q),J((Z,w,_e)=>{me(P,"name",u().key),Ul(P,Z),L_(P,w),me(P,"hidden",d(oe).length===1),me(P,"aria-label",_e)},[()=>String(d(G).id),()=>u().value===String(d(G).id),()=>S.t(`cart.paymentMode.ariaLabel.${d(G).name.toLowerCase()}`)]),pt("change",P,()=>{u(u().value=String(d(G).id),!0)}),x(de,Q)}),I(ee),J(()=>{me(ee,"aria-required",u().required),me(ee,"aria-invalid",u().errors.length>0)}),x(j,ee)},f=j=>{var oe=_M(),ee=M(oe);r(M(ee)),I(ee);var fe=V(ee,2),ce=de=>{var G=re(),Q=U(G);Ne(Q,17,()=>u().options(),P=>P.value,(P,te)=>{var L=bM(),be=M(L),Z=V(be);Ue(Z,()=>({...d(F),...m,class:g(),type:"radio"}),void 0,void 0,void 0,void 0,!0),I(L),J(()=>{St(L,1,dr(h())),me(L,"for",d(A)+d(te).value),H(be,`${d(te).label??""} `)}),qa(Z,()=>u().value,w=>u(u().value=w,!0)),x(P,L)}),x(de,G)};ue(fe,de=>{u().options&&de(ce)}),I(oe),x(j,oe)};let u=_(t,"field",15),p=_(t,"describedByIds",7),h=_(t,"labelClass",7),g=_(t,"inputClass",7),v=_(t,"host",7),m=He(t,rM);const y=Ni(v()),E=D(()=>y.value),k={input:n,text:n,email:n,password:n,search:n,tel:n,url:n,number:n,checkbox:a,select:o,radio:f,date:l,file:s,textarea:i,paymentMode:c},T=D(()=>k[u().type]);let A=D(()=>t.id||`go-field-${Math.random().toString(36).substring(2,9)}`);function O(){u().type!=="checkbox"&&u().value&&(d(E)?d(E).validateField(u()):u().validate())}const F=D(()=>({id:d(A),"aria-describedby":p(),"aria-required":u().required,"aria-invalid":u().errors.length>0,autocomplete:u().autocomplete,onblur:O}));let R=D(()=>S.t(u().label)||u().label);const Y="https://cdn.shop.platform.gomus.de/";ve(()=>{if(u().type!=="paymentMode")return;const j=S.payment_modes?Object.values(S.payment_modes):[];j.length===1&&u().value===""&&u(u().value=String(j[0].id),!0)});let N=ae(null);ve(()=>{const j=u().value;if(j instanceof File&&j.type.startsWith("image/")){const oe=URL.createObjectURL(j);return $(N,oe,!0),()=>{URL.revokeObjectURL(oe),$(N,null)}}$(N,null)});var X={get field(){return u()},set field(j){u(j),b()},get describedByIds(){return p()},set describedByIds(j){p(j),b()},get labelClass(){return h()},set labelClass(j){h(j),b()},get inputClass(){return g()},set inputClass(j){g(j),b()},get host(){return v()},set host(j){v(j),b()}},q=re(),le=U(q),he=j=>{var oe=re(),ee=U(oe);Se(ee,()=>d(T)),x(j,oe)};return ue(le,j=>{d(T)&&j(he)}),x(e,q),ie(X)}cr(["change"]),se(Eg,{field:{},describedByIds:{},labelClass:{},inputClass:{},host:{}},[],[],{mode:"open"});var wM=B("<span> </span>"),kM=B("<li> </li>"),SM=B('<ul class="go-field-errors"></ul>'),EM=B("<!> <!> <!>",1);function TM(e,t){ne(t,!0);let r=_(t,"key",7),n=_(t,"required",7,!1),i=_(t,"labelClass",7),s=_(t,"inputClass",7),a=ae(Me(Pt.createField(r(),n())));const o=Ni(t.$$host),l=D(()=>o.value),c=()=>d(a);let f=D(()=>d(a)?[...d(a).errors,...d(a).apiErrors].map(F=>S.t(F)):[]),u=D(()=>d(a)?.description),p=D(()=>d(f).length>0),h=D(()=>`go-description-${r()}-${Math.floor(Math.random()*100)}`),g=D(()=>`go-errors-${r()}-${Math.floor(Math.random()*100)}`),v=D(()=>[d(u)&&d(h),d(p)&&d(g)].filter(Boolean).join(" ")||void 0);ve(()=>{t.$$host.classList.toggle("go-field",!0),t.$$host.classList.toggle("is-invalid",d(f).length>0)}),t.$$host.dataset.testid=r(),ve(()=>{d(a)&&(d(a).mounted=!0,d(a).value,Re(()=>{d(a)?.errors.length&&d(l).validateField(d(a))}))});var m={getField:c,get key(){return r()},set key(F){r(F),b()},get required(){return n()},set required(F=!1){n(F),b()},get labelClass(){return i()},set labelClass(F){i(F),b()},get inputClass(){return s()},set inputClass(F){s(F),b()}},y=EM(),E=U(y);Eg(E,{get describedByIds(){return d(v)},get labelClass(){return i()},get inputClass(){return s()},host:t.$$host,get field(){return d(a)},set field(F){$(a,F,!0)}});var k=V(E,2),T=F=>{var R=wM(),Y=M(R,!0);I(R),J(()=>{me(R,"id",d(h)),H(Y,d(a).description)}),x(F,R)};ue(k,F=>{d(u)&&F(T)});var A=V(k,2),O=F=>{var R=SM();Ne(R,21,()=>d(f),sn,(Y,N)=>{var X=kM(),q=M(X,!0);I(X),J(()=>H(q,d(N))),x(Y,X)}),I(R),J(()=>me(R,"id",d(g))),x(F,R)};return ue(A,F=>{d(p)&&F(O)}),x(e,y),ie(m)}customElements.define("go-field",se(TM,{key:{attribute:"key",reflect:!0,type:"String"},required:{attribute:"required",reflect:!0,type:"Boolean"},labelClass:{attribute:"label-class",reflect:!0,type:"String"},inputClass:{attribute:"input-class",reflect:!0,type:"String"}},[],["getField"]));var xM=B("<go-field></go-field>",2);function AM(e,t){ne(t,!0);let r=Ni(t.$$host),n=D(()=>r.value),i=D(()=>d(n)?Pt.getFormFields(d(n)?.formId):[]);var s=re(),a=U(s);Ne(a,17,()=>d(i),o=>o.key,(o,l)=>{var c=xM();J(()=>xn(c,"key",d(l).key)),J(()=>xn(c,"required",d(l).required)),x(o,c)}),x(e,s),ie()}customElements.define("go-all-fields",se(AM,{},[],[]));var CM=B('<p aria-hidden="true"> </p>'),OM=B("<li> </li>"),DM=B('<ul class="go-error-feedback-api-errors"></ul>'),IM=B('<div><p aria-live="assertive" class="sr-only"><!></p> <!> <!></div>');function PM(e,t){ne(t,!0);const r=Ni(t.$$host),n=D(()=>r.value);ve(()=>{d(n)?.form?.addEventListener("go-after-validation",()=>{$(a,Nu(d(n)?.fields),!0)})});let i=ae(0);setInterval(()=>{$(i,Nu(d(n)?.fields)||0,!0)},100);let s=D(()=>d(i)+(d(n)?.apiErrors?.length||0)),a=ae(-1);ve(()=>{t.$$host.classList.toggle("is-invalid",d(s)>0),t.$$host.classList.toggle("go-feedback",!0),t.$$host.setAttribute("data-num-errors",d(s).toString())});var o=IM(),l=M(o),c=M(l),f=m=>{var y=Bt();J(E=>H(y,E),[()=>S.t("forms.errorSummary",{count:d(a)})]),x(m,y)};ue(c,m=>{d(a)>0&&m(f)}),I(l);var u=V(l,2),p=m=>{var y=CM(),E=M(y,!0);I(y),J(k=>H(E,k),[()=>S.t("forms.errorSummary",{count:d(i)})]),x(m,y)};ue(u,m=>{d(i)>0&&m(p)});var h=V(u,2),g=m=>{var y=DM();Ne(y,21,()=>d(n)?.apiErrors,sn,(E,k)=>{var T=OM(),A=M(T,!0);I(T),J(()=>H(A,d(k))),x(E,T)}),I(y),x(m,y)},v=D(()=>d(n)&&Xl(d(n).apiErrors)&&d(n).apiErrors.length>0);ue(h,m=>{d(v)&&m(g)}),I(o),x(e,o),ie()}customElements.define("go-errors-feedback",se(PM,{},[],[]));var MM=B('<div class="go-form-feedback"><!></div>');function $M(e,t){var r=MM(),n=M(r);C_(n,t,"default",{},null),I(r),x(e,r)}customElements.define("go-form-feedback",se($M,{},["default"],[]));function FM(e,t){ne(t,!0);let r=_(t,"buttonClass",7,"");return En(()=>{Hr(t.$$host,"button",{type:"submit",class:r()})}),ie({get buttonClass(){return r()},set buttonClass(n=""){r(n),b()}})}customElements.define("go-submit",se(FM,{buttonClass:{attribute:"button-class",reflect:!0,type:"String"}},[],[]));var NM=B('<div aria-live="assertive"> </div>');function RM(e,t){ne(t,!0);const r=Ni(t.$$host),n=D(()=>r.value);var i=re(),s=U(i),a=o=>{var l=NM();let c;var f=M(l,!0);I(l),J(()=>{c=St(l,1,"go-success-feedback go-feedback",null,c,{"is-successful":d(n).successMessage}),H(f,d(n)?.successMessage)}),x(o,l)};ue(s,o=>{d(n)?.successMessage&&o(a)}),x(e,i),ie()}customElements.define("go-success-feedback",se(RM,{},[],[]));var mr="INUMBER",Ki="IOP1",Yi="IOP2",Ji="IOP3",fn="IVAR",di="IVARNAME",Qi="IFUNCALL",Zo="IFUNDEF",Wt="IEXPR",jc="IEXPREVAL",fi="IMEMBER",Wo="IENDSTATEMENT",Xi="IARRAY";function Fe(e,t){this.type=e,this.value=t??0}Fe.prototype.toString=function(){switch(this.type){case mr:case Ki:case Yi:case Ji:case fn:case di:case Wo:return this.value;case Qi:return"CALL "+this.value;case Zo:return"DEF "+this.value;case Xi:return"ARRAY "+this.value;case fi:return"."+this.value;default:return"Invalid Instruction"}};function Ho(e){return new Fe(Ki,e)}function hn(e){return new Fe(Yi,e)}function Tg(e){return new Fe(Ji,e)}function Zc(e,t,r,n,i){for(var s=[],a=[],o,l,c,f,u=0;u<e.length;u++){var p=e[u],h=p.type;if(h===mr||h===di)Array.isArray(p.value)?s.push.apply(s,Zc(p.value.map(function(g){return new Fe(mr,g)}).concat(new Fe(Xi,p.value.length)),t,r,n,i)):s.push(p);else if(h===fn&&i.hasOwnProperty(p.value))p=new Fe(mr,i[p.value]),s.push(p);else if(h===Yi&&s.length>1)l=s.pop(),o=s.pop(),f=r[p.value],p=new Fe(mr,f(o.value,l.value)),s.push(p);else if(h===Ji&&s.length>2)c=s.pop(),l=s.pop(),o=s.pop(),p.value==="?"?s.push(o.value?l.value:c.value):(f=n[p.value],p=new Fe(mr,f(o.value,l.value,c.value)),s.push(p));else if(h===Ki&&s.length>0)o=s.pop(),f=t[p.value],p=new Fe(mr,f(o.value)),s.push(p);else if(h===Wt){for(;s.length>0;)a.push(s.shift());a.push(new Fe(Wt,Zc(p.value,t,r,n,i)))}else if(h===fi&&s.length>0)o=s.pop(),s.push(new Fe(mr,o.value[p.value]));else{for(;s.length>0;)a.push(s.shift());a.push(p)}}for(;s.length>0;)a.push(s.shift());return a}function xg(e,t,r){for(var n=[],i=0;i<e.length;i++){var s=e[i],a=s.type;if(a===fn&&s.value===t)for(var o=0;o<r.tokens.length;o++){var l=r.tokens[o],c;l.type===Ki?c=Ho(l.value):l.type===Yi?c=hn(l.value):l.type===Ji?c=Tg(l.value):c=new Fe(l.type,l.value),n.push(c)}else a===Wt?n.push(new Fe(Wt,xg(s.value,t,r))):n.push(s)}return n}function hi(e,t,r){var n=[],i,s,a,o,l,c;if(Wc(e))return pn(e,r);for(var f=e.length,u=0;u<f;u++){var p=e[u],h=p.type;if(h===mr||h===di)n.push(p.value);else if(h===Yi)s=n.pop(),i=n.pop(),p.value==="and"?n.push(i?!!hi(s,t,r):!1):p.value==="or"?n.push(i?!0:!!hi(s,t,r)):p.value==="="?(o=t.binaryOps[p.value],n.push(o(i,hi(s,t,r),r))):(o=t.binaryOps[p.value],n.push(o(pn(i,r),pn(s,r))));else if(h===Ji)a=n.pop(),s=n.pop(),i=n.pop(),p.value==="?"?n.push(hi(i?s:a,t,r)):(o=t.ternaryOps[p.value],n.push(o(pn(i,r),pn(s,r),pn(a,r))));else if(h===fn)if(p.value in t.functions)n.push(t.functions[p.value]);else if(p.value in t.unaryOps&&t.parser.isOperatorEnabled(p.value))n.push(t.unaryOps[p.value]);else{var g=r[p.value];if(g!==void 0)n.push(g);else throw new Error("undefined variable: "+p.value)}else if(h===Ki)i=n.pop(),o=t.unaryOps[p.value],n.push(o(pn(i,r)));else if(h===Qi){for(c=p.value,l=[];c-- >0;)l.unshift(pn(n.pop(),r));if(o=n.pop(),o.apply&&o.call)n.push(o.apply(void 0,l));else throw new Error(o+" is not a function")}else if(h===Zo)n.push((function(){for(var v=n.pop(),m=[],y=p.value;y-- >0;)m.unshift(n.pop());var E=n.pop(),k=function(){for(var T=Object.assign({},r),A=0,O=m.length;A<O;A++)T[m[A]]=arguments[A];return hi(v,t,T)};return Object.defineProperty(k,"name",{value:E,writable:!1}),r[E]=k,k})());else if(h===Wt)n.push(LM(p,t));else if(h===jc)n.push(p);else if(h===fi)i=n.pop(),n.push(i[p.value]);else if(h===Wo)n.pop();else if(h===Xi){for(c=p.value,l=[];c-- >0;)l.unshift(n.pop());n.push(l)}else throw new Error("invalid Expression")}if(n.length>1)throw new Error("invalid Expression (parity)");return n[0]===0?0:pn(n[0],r)}function LM(e,t,r){return Wc(e)?e:{type:jc,value:function(n){return hi(e.value,t,n)}}}function Wc(e){return e&&e.type===jc}function pn(e,t){return Wc(e)?e.value(t):e}function Hc(e,t){for(var r=[],n,i,s,a,o,l,c=0;c<e.length;c++){var f=e[c],u=f.type;if(u===mr)typeof f.value=="number"&&f.value<0?r.push("("+f.value+")"):Array.isArray(f.value)?r.push("["+f.value.map(Ag).join(", ")+"]"):r.push(Ag(f.value));else if(u===Yi)i=r.pop(),n=r.pop(),a=f.value,t?a==="^"?r.push("Math.pow("+n+", "+i+")"):a==="and"?r.push("(!!"+n+" && !!"+i+")"):a==="or"?r.push("(!!"+n+" || !!"+i+")"):a==="||"?r.push("(function(a,b){ return Array.isArray(a) && Array.isArray(b) ? a.concat(b) : String(a) + String(b); }(("+n+"),("+i+")))"):a==="=="?r.push("("+n+" === "+i+")"):a==="!="?r.push("("+n+" !== "+i+")"):a==="["?r.push(n+"[("+i+") | 0]"):r.push("("+n+" "+a+" "+i+")"):a==="["?r.push(n+"["+i+"]"):r.push("("+n+" "+a+" "+i+")");else if(u===Ji)if(s=r.pop(),i=r.pop(),n=r.pop(),a=f.value,a==="?")r.push("("+n+" ? "+i+" : "+s+")");else throw new Error("invalid Expression");else if(u===fn||u===di)r.push(f.value);else if(u===Ki)n=r.pop(),a=f.value,a==="-"||a==="+"?r.push("("+a+n+")"):t?a==="not"?r.push("(!"+n+")"):a==="!"?r.push("fac("+n+")"):r.push(a+"("+n+")"):a==="!"?r.push("("+n+"!)"):r.push("("+a+" "+n+")");else if(u===Qi){for(l=f.value,o=[];l-- >0;)o.unshift(r.pop());a=r.pop(),r.push(a+"("+o.join(", ")+")")}else if(u===Zo){for(i=r.pop(),l=f.value,o=[];l-- >0;)o.unshift(r.pop());n=r.pop(),t?r.push("("+n+" = function("+o.join(", ")+") { return "+i+" })"):r.push("("+n+"("+o.join(", ")+") = "+i+")")}else if(u===fi)n=r.pop(),r.push(n+"."+f.value);else if(u===Xi){for(l=f.value,o=[];l-- >0;)o.unshift(r.pop());r.push("["+o.join(", ")+"]")}else if(u===Wt)r.push("("+Hc(f.value,t)+")");else if(u!==Wo)throw new Error("invalid Expression")}return r.length>1&&(t?r=[r.join(",")]:r=[r.join(";")]),String(r[0])}function Ag(e){return typeof e=="string"?JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"):e}function es(e,t){for(var r=0;r<e.length;r++)if(e[r]===t)return!0;return!1}function Gc(e,t,r){r=r||{};for(var n=!!r.withMembers,i=null,s=0;s<e.length;s++){var a=e[s];a.type===fn||a.type===di?!n&&!es(t,a.value)?t.push(a.value):(i!==null&&(es(t,i)||t.push(i)),i=a.value):a.type===fi&&n&&i!==null?i+="."+a.value:a.type===Wt?Gc(a.value,t,r):i!==null&&(es(t,i)||t.push(i),i=null)}i!==null&&!es(t,i)&&t.push(i)}function Dr(e,t){this.tokens=e,this.parser=t,this.unaryOps=t.unaryOps,this.binaryOps=t.binaryOps,this.ternaryOps=t.ternaryOps,this.functions=t.functions}Dr.prototype.simplify=function(e){return e=e||{},new Dr(Zc(this.tokens,this.unaryOps,this.binaryOps,this.ternaryOps,e),this.parser)},Dr.prototype.substitute=function(e,t){return t instanceof Dr||(t=this.parser.parse(String(t))),new Dr(xg(this.tokens,e,t),this.parser)},Dr.prototype.evaluate=function(e){return e=e||{},hi(this.tokens,this,e)},Dr.prototype.toString=function(){return Hc(this.tokens,!1)},Dr.prototype.symbols=function(e){e=e||{};var t=[];return Gc(this.tokens,t,e),t},Dr.prototype.variables=function(e){e=e||{};var t=[];Gc(this.tokens,t,e);var r=this.functions;return t.filter(function(n){return!(n in r)})},Dr.prototype.toJSFunction=function(e,t){var r=this,n=new Function(e,"with(this.functions) with (this.ternaryOps) with (this.binaryOps) with (this.unaryOps) { return "+Hc(this.simplify(t).tokens,!0)+"; }");return function(){return n.apply(r,arguments)}};var ua="TEOF",Ge="TOP",Go="TNUMBER",Cg="TSTRING",mn="TPAREN",ts="TBRACKET",Ko="TCOMMA",Kc="TNAME",Yc="TSEMICOLON";function Og(e,t,r){this.type=e,this.value=t,this.index=r}Og.prototype.toString=function(){return this.type+": "+this.value};function st(e,t){this.pos=0,this.current=null,this.unaryOps=e.unaryOps,this.binaryOps=e.binaryOps,this.ternaryOps=e.ternaryOps,this.consts=e.consts,this.expression=t,this.savedPosition=0,this.savedCurrent=null,this.options=e.options,this.parser=e}st.prototype.newToken=function(e,t,r){return new Og(e,t,r??this.pos)},st.prototype.save=function(){this.savedPosition=this.pos,this.savedCurrent=this.current},st.prototype.restore=function(){this.pos=this.savedPosition,this.current=this.savedCurrent},st.prototype.next=function(){if(this.pos>=this.expression.length)return this.newToken(ua,"EOF");if(this.isWhitespace()||this.isComment())return this.next();if(this.isRadixInteger()||this.isNumber()||this.isOperator()||this.isString()||this.isParen()||this.isBracket()||this.isComma()||this.isSemicolon()||this.isNamedOp()||this.isConst()||this.isName())return this.current;this.parseError('Unknown character "'+this.expression.charAt(this.pos)+'"')},st.prototype.isString=function(){var e=!1,t=this.pos,r=this.expression.charAt(t);if(r==="'"||r==='"')for(var n=this.expression.indexOf(r,t+1);n>=0&&this.pos<this.expression.length;){if(this.pos=n+1,this.expression.charAt(n-1)!=="\\"){var i=this.expression.substring(t+1,n);this.current=this.newToken(Cg,this.unescape(i),t),e=!0;break}n=this.expression.indexOf(r,n+1)}return e},st.prototype.isParen=function(){var e=this.expression.charAt(this.pos);return e==="("||e===")"?(this.current=this.newToken(mn,e),this.pos++,!0):!1},st.prototype.isBracket=function(){var e=this.expression.charAt(this.pos);return(e==="["||e==="]")&&this.isOperatorEnabled("[")?(this.current=this.newToken(ts,e),this.pos++,!0):!1},st.prototype.isComma=function(){return this.expression.charAt(this.pos)===","?(this.current=this.newToken(Ko,","),this.pos++,!0):!1},st.prototype.isSemicolon=function(){return this.expression.charAt(this.pos)===";"?(this.current=this.newToken(Yc,";"),this.pos++,!0):!1},st.prototype.isConst=function(){for(var e=this.pos,t=e;t<this.expression.length;t++){var r=this.expression.charAt(t);if(r.toUpperCase()===r.toLowerCase()&&(t===this.pos||r!=="_"&&r!=="."&&(r<"0"||r>"9")))break}if(t>e){var n=this.expression.substring(e,t);if(n in this.consts)return this.current=this.newToken(Go,this.consts[n]),this.pos+=n.length,!0}return!1},st.prototype.isNamedOp=function(){for(var e=this.pos,t=e;t<this.expression.length;t++){var r=this.expression.charAt(t);if(r.toUpperCase()===r.toLowerCase()&&(t===this.pos||r!=="_"&&(r<"0"||r>"9")))break}if(t>e){var n=this.expression.substring(e,t);if(this.isOperatorEnabled(n)&&(n in this.binaryOps||n in this.unaryOps||n in this.ternaryOps))return this.current=this.newToken(Ge,n),this.pos+=n.length,!0}return!1},st.prototype.isName=function(){for(var e=this.pos,t=e,r=!1;t<this.expression.length;t++){var n=this.expression.charAt(t);if(n.toUpperCase()===n.toLowerCase()){if(t===this.pos&&(n==="$"||n==="_")){n==="_"&&(r=!0);continue}else if(t===this.pos||!r||n!=="_"&&(n<"0"||n>"9"))break}else r=!0}if(r){var i=this.expression.substring(e,t);return this.current=this.newToken(Kc,i),this.pos+=i.length,!0}return!1},st.prototype.isWhitespace=function(){for(var e=!1,t=this.expression.charAt(this.pos);(t===" "||t===" "||t===`
82
82
  `||t==="\r")&&(e=!0,this.pos++,!(this.pos>=this.expression.length));)t=this.expression.charAt(this.pos);return e};var zM=/^[0-9a-f]{4}$/i;st.prototype.unescape=function(e){var t=e.indexOf("\\");if(t<0)return e;for(var r=e.substring(0,t);t>=0;){var n=e.charAt(++t);switch(n){case"'":r+="'";break;case'"':r+='"';break;case"\\":r+="\\";break;case"/":r+="/";break;case"b":r+="\b";break;case"f":r+="\f";break;case"n":r+=`
83
83
  `;break;case"r":r+="\r";break;case"t":r+=" ";break;case"u":var i=e.substring(t+1,t+5);zM.test(i)||this.parseError("Illegal escape sequence: \\u"+i),r+=String.fromCharCode(parseInt(i,16)),t+=4;break;default:throw this.parseError('Illegal escape sequence: "\\'+n+'"')}++t;var s=e.indexOf("\\",t);r+=e.substring(t,s<0?e.length:s),t=s}return r},st.prototype.isComment=function(){return this.expression.charAt(this.pos)==="/"&&this.expression.charAt(this.pos+1)==="*"?(this.pos=this.expression.indexOf("*/",this.pos)+2,this.pos===1&&(this.pos=this.expression.length),!0):!1},st.prototype.isRadixInteger=function(){var e=this.pos;if(e>=this.expression.length-2||this.expression.charAt(e)!=="0")return!1;++e;var t,r;if(this.expression.charAt(e)==="x")t=16,r=/^[0-9a-f]$/i,++e;else if(this.expression.charAt(e)==="b")t=2,r=/^[01]$/i,++e;else return!1;for(var n=!1,i=e;e<this.expression.length;){var s=this.expression.charAt(e);if(r.test(s))e++,n=!0;else break}return n&&(this.current=this.newToken(Go,parseInt(this.expression.substring(i,e),t)),this.pos=e),n},st.prototype.isNumber=function(){for(var e=!1,t=this.pos,r=t,n=t,i=!1,s=!1,a;t<this.expression.length&&(a=this.expression.charAt(t),a>="0"&&a<="9"||!i&&a===".");)a==="."?i=!0:s=!0,t++,e=s;if(e&&(n=t),a==="e"||a==="E"){t++;for(var o=!0,l=!1;t<this.expression.length;){if(a=this.expression.charAt(t),o&&(a==="+"||a==="-"))o=!1;else if(a>="0"&&a<="9")l=!0,o=!1;else break;t++}l||(t=n)}return e?(this.current=this.newToken(Go,parseFloat(this.expression.substring(r,t))),this.pos=t):this.pos=n,e},st.prototype.isOperator=function(){var e=this.pos,t=this.expression.charAt(this.pos);if(t==="+"||t==="-"||t==="*"||t==="/"||t==="%"||t==="^"||t==="?"||t===":"||t===".")this.current=this.newToken(Ge,t);else if(t==="∙"||t==="•")this.current=this.newToken(Ge,"*");else if(t===">")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ge,">="),this.pos++):this.current=this.newToken(Ge,">");else if(t==="<")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ge,"<="),this.pos++):this.current=this.newToken(Ge,"<");else if(t==="|")if(this.expression.charAt(this.pos+1)==="|")this.current=this.newToken(Ge,"||"),this.pos++;else return!1;else if(t==="=")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ge,"=="),this.pos++):this.current=this.newToken(Ge,t);else if(t==="!")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ge,"!="),this.pos++):this.current=this.newToken(Ge,t);else return!1;return this.pos++,this.isOperatorEnabled(this.current.value)?!0:(this.pos=e,!1)},st.prototype.isOperatorEnabled=function(e){return this.parser.isOperatorEnabled(e)},st.prototype.getCoordinates=function(){var e=0,t,r=-1;do e++,t=this.pos-r,r=this.expression.indexOf(`
84
- `,r+1);while(r>=0&&r<this.pos);return{line:e,column:t}},st.prototype.parseError=function(e){var t=this.getCoordinates();throw new Error("parse error ["+t.line+":"+t.column+"]: "+e)};function Ye(e,t,r){this.parser=e,this.tokens=t,this.current=null,this.nextToken=null,this.next(),this.savedCurrent=null,this.savedNextToken=null,this.allowMemberAccess=r.allowMemberAccess!==!1}Ye.prototype.next=function(){return this.current=this.nextToken,this.nextToken=this.tokens.next()},Ye.prototype.tokenMatches=function(e,t){return typeof t>"u"?!0:Array.isArray(t)?es(t,e.value):typeof t=="function"?t(e):e.value===t},Ye.prototype.save=function(){this.savedCurrent=this.current,this.savedNextToken=this.nextToken,this.tokens.save()},Ye.prototype.restore=function(){this.tokens.restore(),this.current=this.savedCurrent,this.nextToken=this.savedNextToken},Ye.prototype.accept=function(e,t){return this.nextToken.type===e&&this.tokenMatches(this.nextToken,t)?(this.next(),!0):!1},Ye.prototype.expect=function(e,t){if(!this.accept(e,t)){var r=this.tokens.getCoordinates();throw new Error("parse error ["+r.line+":"+r.column+"]: Expected "+(t||e))}},Ye.prototype.parseAtom=function(e){var t=this.tokens.unaryOps;function r(i){return i.value in t}if(this.accept(Kc)||this.accept(Ge,r))e.push(new Fe(fn,this.current.value));else if(this.accept(Go))e.push(new Fe(mr,this.current.value));else if(this.accept(Cg))e.push(new Fe(mr,this.current.value));else if(this.accept(mn,"("))this.parseExpression(e),this.expect(mn,")");else if(this.accept(ts,"["))if(this.accept(ts,"]"))e.push(new Fe(Xi,0));else{var n=this.parseArrayList(e);e.push(new Fe(Xi,n))}else throw new Error("unexpected "+this.nextToken)},Ye.prototype.parseExpression=function(e){var t=[];this.parseUntilEndStatement(e,t)||(this.parseVariableAssignmentExpression(t),!this.parseUntilEndStatement(e,t)&&this.pushExpression(e,t))},Ye.prototype.pushExpression=function(e,t){for(var r=0,n=t.length;r<n;r++)e.push(t[r])},Ye.prototype.parseUntilEndStatement=function(e,t){return this.accept(Yc)?(this.nextToken&&this.nextToken.type!==ua&&!(this.nextToken.type===mn&&this.nextToken.value===")")&&t.push(new Fe(Wo)),this.nextToken.type!==ua&&this.parseExpression(t),e.push(new Fe(Wt,t)),!0):!1},Ye.prototype.parseArrayList=function(e){for(var t=0;!this.accept(ts,"]");)for(this.parseExpression(e),++t;this.accept(Ko);)this.parseExpression(e),++t;return t},Ye.prototype.parseVariableAssignmentExpression=function(e){for(this.parseConditionalExpression(e);this.accept(Ge,"=");){var t=e.pop(),r=[],n=e.length-1;if(t.type===Qi){if(!this.tokens.isOperatorEnabled("()="))throw new Error("function definition is not permitted");for(var i=0,s=t.value+1;i<s;i++){var a=n-i;e[a].type===fn&&(e[a]=new Fe(di,e[a].value))}this.parseVariableAssignmentExpression(r),e.push(new Fe(Wt,r)),e.push(new Fe(Zo,t.value));continue}if(t.type!==fn&&t.type!==fi)throw new Error("expected variable for assignment");this.parseVariableAssignmentExpression(r),e.push(new Fe(di,t.value)),e.push(new Fe(Wt,r)),e.push(hn("="))}},Ye.prototype.parseConditionalExpression=function(e){for(this.parseOrExpression(e);this.accept(Ge,"?");){var t=[],r=[];this.parseConditionalExpression(t),this.expect(Ge,":"),this.parseConditionalExpression(r),e.push(new Fe(Wt,t)),e.push(new Fe(Wt,r)),e.push(Tg("?"))}},Ye.prototype.parseOrExpression=function(e){for(this.parseAndExpression(e);this.accept(Ge,"or");){var t=[];this.parseAndExpression(t),e.push(new Fe(Wt,t)),e.push(hn("or"))}},Ye.prototype.parseAndExpression=function(e){for(this.parseComparison(e);this.accept(Ge,"and");){var t=[];this.parseComparison(t),e.push(new Fe(Wt,t)),e.push(hn("and"))}};var qM=["==","!=","<","<=",">=",">","in"];Ye.prototype.parseComparison=function(e){for(this.parseAddSub(e);this.accept(Ge,qM);){var t=this.current;this.parseAddSub(e),e.push(hn(t.value))}};var UM=["+","-","||"];Ye.prototype.parseAddSub=function(e){for(this.parseTerm(e);this.accept(Ge,UM);){var t=this.current;this.parseTerm(e),e.push(hn(t.value))}};var BM=["*","/","%"];Ye.prototype.parseTerm=function(e){for(this.parseFactor(e);this.accept(Ge,BM);){var t=this.current;this.parseFactor(e),e.push(hn(t.value))}},Ye.prototype.parseFactor=function(e){var t=this.tokens.unaryOps;function r(i){return i.value in t}if(this.save(),this.accept(Ge,r)){if(this.current.value!=="-"&&this.current.value!=="+"){if(this.nextToken.type===mn&&this.nextToken.value==="("){this.restore(),this.parseExponential(e);return}else if(this.nextToken.type===Yc||this.nextToken.type===Ko||this.nextToken.type===ua||this.nextToken.type===mn&&this.nextToken.value===")"){this.restore(),this.parseAtom(e);return}}var n=this.current;this.parseFactor(e),e.push(Ho(n.value))}else this.parseExponential(e)},Ye.prototype.parseExponential=function(e){for(this.parsePostfixExpression(e);this.accept(Ge,"^");)this.parseFactor(e),e.push(hn("^"))},Ye.prototype.parsePostfixExpression=function(e){for(this.parseFunctionCall(e);this.accept(Ge,"!");)e.push(Ho("!"))},Ye.prototype.parseFunctionCall=function(e){var t=this.tokens.unaryOps;function r(s){return s.value in t}if(this.accept(Ge,r)){var n=this.current;this.parseAtom(e),e.push(Ho(n.value))}else for(this.parseMemberExpression(e);this.accept(mn,"(");)if(this.accept(mn,")"))e.push(new Fe(Qi,0));else{var i=this.parseArgumentList(e);e.push(new Fe(Qi,i))}},Ye.prototype.parseArgumentList=function(e){for(var t=0;!this.accept(mn,")");)for(this.parseExpression(e),++t;this.accept(Ko);)this.parseExpression(e),++t;return t},Ye.prototype.parseMemberExpression=function(e){for(this.parseAtom(e);this.accept(Ge,".")||this.accept(ts,"[");){var t=this.current;if(t.value==="."){if(!this.allowMemberAccess)throw new Error('unexpected ".", member access is not permitted');this.expect(Kc),e.push(new Fe(fi,this.current.value))}else if(t.value==="["){if(!this.tokens.isOperatorEnabled("["))throw new Error('unexpected "[]", arrays are disabled');this.parseExpression(e),this.expect(ts,"]"),e.push(hn("["))}else throw new Error("unexpected symbol: "+t.value)}};function VM(e,t){return Number(e)+Number(t)}function jM(e,t){return e-t}function ZM(e,t){return e*t}function WM(e,t){return e/t}function HM(e,t){return e%t}function GM(e,t){return Array.isArray(e)&&Array.isArray(t)?e.concat(t):""+e+t}function KM(e,t){return e===t}function YM(e,t){return e!==t}function JM(e,t){return e>t}function QM(e,t){return e<t}function XM(e,t){return e>=t}function e$(e,t){return e<=t}function t$(e,t){return!!(e&&t)}function r$(e,t){return!!(e||t)}function n$(e,t){return es(t,e)}function i$(e){return(Math.exp(e)-Math.exp(-e))/2}function s$(e){return(Math.exp(e)+Math.exp(-e))/2}function a$(e){return e===1/0?1:e===-1/0?-1:(Math.exp(e)-Math.exp(-e))/(Math.exp(e)+Math.exp(-e))}function o$(e){return e===-1/0?e:Math.log(e+Math.sqrt(e*e+1))}function l$(e){return Math.log(e+Math.sqrt(e*e-1))}function u$(e){return Math.log((1+e)/(1-e))/2}function Dg(e){return Math.log(e)*Math.LOG10E}function c$(e){return-e}function d$(e){return!e}function f$(e){return e<0?Math.ceil(e):Math.floor(e)}function h$(e){return Math.random()*(e||1)}function Ig(e){return Qc(e+1)}function p$(e){return isFinite(e)&&e===Math.round(e)}var m$=4.7421875,Jc=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];function Qc(e){var t,r;if(p$(e)){if(e<=0)return isFinite(e)?1/0:NaN;if(e>171)return 1/0;for(var n=e-2,i=e-1;n>1;)i*=n,n--;return i===0&&(i=1),i}if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*Qc(1-e));if(e>=171.35)return 1/0;if(e>85){var s=e*e,a=s*e,o=a*e,l=o*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*s)-139/(51840*a)-571/(2488320*o)+163879/(209018880*l)+5246819/(75246796800*l*e))}--e,r=Jc[0];for(var c=1;c<Jc.length;++c)r+=Jc[c]/(e+c);return t=e+m$+.5,Math.sqrt(2*Math.PI)*Math.pow(t,e+.5)*Math.exp(-t)*r}function v$(e){return Array.isArray(e)?e.length:String(e).length}function Pg(){for(var e=0,t=0,r=0;r<arguments.length;r++){var n=Math.abs(arguments[r]),i;t<n?(i=t/n,e=e*i*i+1,t=n):n>0?(i=n/t,e+=i*i):e+=n}return t===1/0?1/0:t*Math.sqrt(e)}function Mg(e,t,r){return e?t:r}function g$(e,t){return typeof t>"u"||+t==0?Math.round(e):(e=+e,t=-+t,isNaN(e)||!(typeof t=="number"&&t%1===0)?NaN:(e=e.toString().split("e"),e=Math.round(+(e[0]+"e"+(e[1]?+e[1]-t:-t))),e=e.toString().split("e"),+(e[0]+"e"+(e[1]?+e[1]+t:t))))}function y$(e,t,r){return r&&(r[e]=t),t}function b$(e,t){return e[t|0]}function _$(e){return arguments.length===1&&Array.isArray(e)?Math.max.apply(Math,e):Math.max.apply(Math,arguments)}function w$(e){return arguments.length===1&&Array.isArray(e)?Math.min.apply(Math,e):Math.min.apply(Math,arguments)}function k$(e,t){if(typeof e!="function")throw new Error("First argument to map is not a function");if(!Array.isArray(t))throw new Error("Second argument to map is not an array");return t.map(function(r,n){return e(r,n)})}function S$(e,t,r){if(typeof e!="function")throw new Error("First argument to fold is not a function");if(!Array.isArray(r))throw new Error("Second argument to fold is not an array");return r.reduce(function(n,i,s){return e(n,i,s)},t)}function E$(e,t){if(typeof e!="function")throw new Error("First argument to filter is not a function");if(!Array.isArray(t))throw new Error("Second argument to filter is not an array");return t.filter(function(r,n){return e(r,n)})}function T$(e,t){if(!(Array.isArray(t)||typeof t=="string"))throw new Error("Second argument to indexOf is not a string or array");return t.indexOf(e)}function x$(e,t){if(!Array.isArray(t))throw new Error("Second argument to join is not an array");return t.join(e)}function A$(e){return(e>0)-(e<0)||+e}var $g=1/3;function C$(e){return e<0?-Math.pow(-e,$g):Math.pow(e,$g)}function O$(e){return Math.exp(e)-1}function D$(e){return Math.log(1+e)}function I$(e){return Math.log(e)/Math.LN2}function pi(e){this.options=e||{},this.unaryOps={sin:Math.sin,cos:Math.cos,tan:Math.tan,asin:Math.asin,acos:Math.acos,atan:Math.atan,sinh:Math.sinh||i$,cosh:Math.cosh||s$,tanh:Math.tanh||a$,asinh:Math.asinh||o$,acosh:Math.acosh||l$,atanh:Math.atanh||u$,sqrt:Math.sqrt,cbrt:Math.cbrt||C$,log:Math.log,log2:Math.log2||I$,ln:Math.log,lg:Math.log10||Dg,log10:Math.log10||Dg,expm1:Math.expm1||O$,log1p:Math.log1p||D$,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,trunc:Math.trunc||f$,"-":c$,"+":Number,exp:Math.exp,not:d$,length:v$,"!":Ig,sign:Math.sign||A$},this.binaryOps={"+":VM,"-":jM,"*":ZM,"/":WM,"%":HM,"^":Math.pow,"||":GM,"==":KM,"!=":YM,">":JM,"<":QM,">=":XM,"<=":e$,and:t$,or:r$,in:n$,"=":y$,"[":b$},this.ternaryOps={"?":Mg},this.functions={random:h$,fac:Ig,min:w$,max:_$,hypot:Math.hypot||Pg,pyt:Math.hypot||Pg,pow:Math.pow,atan2:Math.atan2,if:Mg,gamma:Qc,roundTo:g$,map:k$,fold:S$,filter:E$,indexOf:T$,join:x$},this.consts={E:Math.E,PI:Math.PI,true:!0,false:!1}}pi.prototype.parse=function(e){var t=[],r=new Ye(this,new st(this,e),{allowMemberAccess:this.options.allowMemberAccess});return r.parseExpression(t),r.expect(ua,"EOF"),new Dr(t,this)},pi.prototype.evaluate=function(e,t){return this.parse(e).evaluate(t)};var Fg=new pi;pi.parse=function(e){return Fg.parse(e)},pi.evaluate=function(e,t){return Fg.parse(e).evaluate(t)};var Ng={"+":"add","-":"subtract","*":"multiply","/":"divide","%":"remainder","^":"power","!":"factorial","<":"comparison",">":"comparison","<=":"comparison",">=":"comparison","==":"comparison","!=":"comparison","||":"concatenate",and:"logical",or:"logical",not:"logical","?":"conditional",":":"conditional","=":"assignment","[":"array","()=":"fndef"};function P$(e){return Ng.hasOwnProperty(e)?Ng[e]:e}pi.prototype.isOperatorEnabled=function(e){var t=P$(e),r=this.options.operators||{};return!(t in r)||!!r[t]};var M$=/\b[$A-Za-z_][$\w]*(?:(?:\?\.)|\.)[$A-Za-z_][$\w]*(?:(?:\?\.)[$A-Za-z_][$\w]*|(?:\.)[$A-Za-z_][$\w]*)*/g,$$=/\b([$A-Za-z_][$\w]*(?:\.[$A-Za-z_][$\w]*)*)\.length\b/g,F$=/(__optional\("[^"]+"\))\.length\b/g,N$=new pi({allowMemberAccess:!0,operators:{assignment:!1,fndef:!1}}),Rg=new Map;function R$(e){return e.replace(M$,t=>t.includes("?.")?`__optional("${t.replace(/\?\./g,".")}")`:t).replace($$,(t,r)=>`__length(${r})`).replace(F$,(t,r)=>`__length(${r})`).replaceAll("!==","!=").replaceAll("===","==").replaceAll("&&"," and ").replaceAll("||"," or ").replace(/!\s*(?!=)/g,"not ")}function L$(e){const t=Rg.get(e);if(t)return t;const r=N$.parse(R$(e));return Rg.set(e,r),r}function z$(e,t){if(e==null||typeof e!="string")return e;const r={data:t,undefined:void 0,null:null};r.__optional=n=>n.split(".").reduce((i,s)=>{if(i!=null)return i[s]},r),r.__length=n=>{if(n!=null){if(typeof n=="string"||Array.isArray(n))return n.length;if(typeof n=="object"&&"length"in n){const i=n.length;return typeof i=="number"?i:void 0}}};try{const n=L$(e);for(const i of n.symbols()){if(r[i]!==void 0)continue;const s=globalThis[i];typeof s=="function"&&(r[i]=s)}return n.evaluate(r)}catch(n){console.error(`Error while evaluating when (${e}) in go-if: ${n.message}`)}}var Lg=["ticket:timeslot","ticket:day","ticket:annual","event:admission","event:admission:day","event:admission:timeslot","event:price","events:admission","events:admission:day","events:admission:timeslot","events:price","coupon","tour"],q$=7200*1e3;function Xc(e,{id:t,quantity:r,time:n}){if(!(r>0))throw new Error("(go.cart.addItem) 'quantity' must be a positive number");if(!e)throw new Error(`(go.cart.addItem) ticket ${t} not available (sold out or unknown)`);const i=rt(e,{quantity:r,time:n??e.selectedTime}),{max:s}=S.capacityManager.capacity(S.cart,i,ei());if(r>s)throw new Error(`(go.cart.addItem) only ${s} left for ticket ${t}`);return S.cart.addItem(i),i.uuid}async function vn(e,t){if(!e.withContent)return;const r=t.map(n=>n.id).filter(n=>typeof n=="number");if(r.length)try{const n=await S.asyncFetch(()=>S.ticketsContent(r))??[],i=new Map(n.map(s=>[s.id,s.content]));for(const s of t){if(typeof s.id!="number")continue;const a=i.get(s.id);a&&(s.content=a)}}catch{}}function Yo(e,t){S.capacityManager.addQuotas(t),e.timeslotTicketIds=[...e.timeslotTicketIds,...Object.values(t).flatMap(r=>r.ticket_ids)]}function Jo(e,t,r){const n=Date.parse(r);return e.filter(i=>{const s=i.start_time.slice(0,10),a=Date.parse(i.start_time);return s===t&&a>=n&&a<=n+q$&&(i.seats?.available??0)>0})}async function Qo(e){if(!e?.selectedDate)return;const{quotas:t}=await S.asyncFetch(()=>S.ticketsAndQuotas({by_bookable:!0,valid_at:e.selectedDate.toString(),"by_ticket_types[]":["time_slot"],"by_museum_ids[]":e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_ticket_ids[]":e.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds}));Yo(e,t)}async function zg(e,t){const{tickets:r,quotas:n}=await S.asyncFetch(()=>S.ticketsAndQuotas({by_bookable:!0,by_ticket_type:"time_slot",...e}));return S.capacityManager.addQuotas(n),Bs(Vs(r,t),t)}var U$={name:"ticket:timeslot",calendarEndpoint:"tickets",apiToken:"time_slot",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:e=>!!e.selectedDate,isTicketsVisible:e=>!!(e.selectedDate&&e.selectedTimeslot),async addToCart(e){const{id:t,quantity:r,time:n}=e;if(!n)throw new Error("(go.cart.addItem) ticket:timeslot requires a 'time'");const i=(await zg({valid_at:n.slice(0,10),"by_ticket_ids[]":[t]},n))[0];return Xc(i,{id:t,quantity:r,time:n})},async loadTimeslots(e){if(!e?.selectedDate)return;const{quotas:t}=await S.asyncFetch(()=>S.ticketsAndQuotas({by_bookable:!0,valid_at:e.selectedDate.toString(),by_ticket_type:"time_slot","by_museum_ids[]":e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_ticket_ids[]":e.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds}));Yo(e,t)},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTimeslot)return;const r=await zg({valid_at:t.selectedDate.toString(),"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds??t.ticketGroupIds},t.selectedTimeslot);await vn(e,r);for(const n of r)e.preCart.addItem(rt(n,{time:t.selectedTime}))}};async function qg(e){const{tickets:t,quotas:r}=await S.asyncFetch(()=>S.ticketsAndQuotas({by_bookable:!0,"by_ticket_types[]":["normal"],...e}));return S.capacityManager.addQuotas(r),Du(t)}var B$={name:"ticket:day",calendarEndpoint:"tickets",apiToken:"normal",requires:[{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:e=>!!e.selectedDate,async loadTimeslots(){},async addToCart(e){const{id:t,quantity:r,date:n}=e;if(!n)throw new Error("(go.cart.addItem) ticket:day requires a 'date'");const i=(await qg({valid_at:n,"by_ticket_ids[]":[t]}))[0];return Xc(i,{id:t,quantity:r})},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate)return;const r=await qg({valid_at:t.selectedDate.toString(),"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds??t.ticketGroupIds});await vn(e,r);for(const n of r)e.preCart.addItem(rt(n,{time:n.selectedTime}))}};async function Ug(e){const t=await S.asyncFetch(()=>S.tickets({by_bookable:!0,"by_ticket_types[]":["annual"],...e}));return Object.values(t).map(r=>Us(r))}var V$={name:"ticket:annual",calendarEndpoint:null,apiToken:"annual",requires:[],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:()=>!0,async loadTimeslots(){},async addToCart(e){const{id:t,quantity:r}=e,n=(await Ug({"by_ticket_ids[]":[t]}))[0];return Xc(n,{id:t,quantity:r})},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t)return;const r=await Ug({"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds??t.ticketGroupIds});await vn(e,r);for(const n of r)e.preCart.addItem(rt(n))}},j$={name:"event:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:e=>!!e.selectedDate,isTicketsVisible:e=>!!(e.selectedDate&&e.selectedTimeslot),async loadTimeslots(e){if(!e?.eventIds?.length||!e.selectedDate)return;const t=await S.asyncFetch(()=>S.getEvent(e.eventIds[0]));if(!t.tickets?.length)return;const{quotas:r}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":t.tickets,by_bookable:!0,valid_at:e.selectedDate.toString()}));Yo(e,r)},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||!t.selectedDate)return;const r=await S.asyncFetch(()=>S.getEvent(t.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,by_bookable:!0,valid_at:t.selectedDate.toString()}));S.capacityManager.addQuotas(i);const s=Bs(Vs(n,t.selectedTime),t.selectedTime);await vn(e,s);for(const a of s)e.preCart.addItem(rt(a,{time:t.selectedTime}))}},Z$={name:"event:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:e=>!!e.selectedDate,async loadTimeslots(){},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||!t.selectedDate)return;const r=await S.asyncFetch(()=>S.getEvent(t.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:t.selectedDate.toString()}));S.capacityManager.addQuotas(i);const s=Du(n);await vn(e,s);for(const a of s)e.preCart.addItem(rt(a,{time:a.selectedTime}))}},W$={name:"event:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:e=>!!e.selectedDate,isTicketsVisible:e=>!!(e.selectedDate&&e.selectedTimeslot),async loadTimeslots(e){if(!e?.eventIds?.length||!e.selectedDate)return;const t=await S.asyncFetch(()=>S.getEvent(e.eventIds[0]));if(!t.tickets?.length)return;const{quotas:r}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":t.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:e.selectedDate.toString()}));Yo(e,r)},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||!t.selectedDate||!t.selectedTimeslot)return;const r=await S.asyncFetch(()=>S.getEvent(t.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:t.selectedDate.toString()}));S.capacityManager.addQuotas(i);const s=Bs(Vs(n,t.selectedTime),t.selectedTime);await vn(e,s);for(const a of s)e.preCart.addItem(rt(a,{time:t.selectedTime}))}},H$={name:"event:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"segment",field:"dateId"}],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:e=>!!e.eventIds?.length,loadTimeslots:async()=>{},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||e.dateId===void 0)return;const r=await S.asyncFetch(()=>S.getEventDetailsOnDate(t.eventIds[0],e.dateId));if(r.prices?.length){for(const n of r.prices){const i=Pu(n,r.id,{event_title:r.event_title});e.preCart.addItem(rt(i,{time:r.start_time}))}r.seats&&S.capacityManager.addSeats(r.id,r.seats)}}},G$={name:"events:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Qo(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Jo(await S.asyncFetch(()=>S.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime);for(const n of r){if(!n.event_id||!n.start_time)continue;const i=await S.asyncFetch(()=>S.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:s,quotas:a}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,by_bookable:!0,valid_at:n.start_time.slice(0,10)}));S.capacityManager.addQuotas(a);const o=Bs(Vs(s,n.start_time),n.start_time);await vn(e,o);for(const l of o)e.preCart.addItem(rt(l,{time:n.start_time}))}}},K$={name:"events:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Qo(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Jo(await S.asyncFetch(()=>S.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime);for(const n of r){if(!n.event_id||!n.start_time)continue;const i=await S.asyncFetch(()=>S.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:s,quotas:a}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:n.start_time.slice(0,10)}));S.capacityManager.addQuotas(a);const o=Du(s,n.start_time);await vn(e,o);for(const l of o)e.preCart.addItem(rt(l,{time:l.selectedTime}))}}},Y$={name:"events:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Qo(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Jo(await S.asyncFetch(()=>S.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime);for(const n of r){if(!n.event_id||!n.start_time)continue;const i=await S.asyncFetch(()=>S.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:s,quotas:a}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:n.start_time.slice(0,10)}));S.capacityManager.addQuotas(a);const o=Bs(Vs(s,n.start_time),n.start_time);await vn(e,o);for(const l of o)e.preCart.addItem(rt(l,{time:n.start_time}))}}},J$={name:"events:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Qo(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Jo(await S.asyncFetch(()=>S.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime),n=e.query;for(const i of r){if(!i.prices?.length)continue;const s=n?i.prices.filter(a=>a.title?.includes(n)):i.prices;for(const a of s){const o=Pu(a,i.id,{event_title:i.event_title});e.preCart.addItem(rt(o,{time:i.start_time}))}i.seats&&S.capacityManager.addSeats(i.id,i.seats)}}},Q$={name:"coupon",calendarEndpoint:null,requires:[],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:()=>!0,loadTimeslots:async()=>{},async loadProducts(e){const t=await S.asyncFetch(()=>S.getCoupons());for(const r of t??[])e.preCart.addItem(rt(bp(r)))}},X$=["id","time","participants","languageId","totalPriceCents","title"],e2={name:"tour",calendarEndpoint:null,requires:[],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:()=>!0,async loadTimeslots(){},async loadProducts(){},async addToCart(e){const t=e;for(const s of X$)if(t[s]==null||t[s]==="")throw new Error(`(go.cart.addItem) tour '${s}' is required`);if(!(t.participants>0))throw new Error("(go.cart.addItem) tour 'participants' must be a positive number");if(t.quantities){const s=qr(Object.values(t.quantities));if(s!==t.participants)throw new Error(`(go.cart.addItem) tour 'quantities' must sum to 'participants' (${s} !== ${t.participants})`)}const{time:r,...n}=t,i=rt(gp(n),{quantity:1,time:r});return S.cart.addItem(i),i.uuid}},t2={"ticket:timeslot":U$,"ticket:day":B$,"ticket:annual":V$,"event:admission":j$,"event:admission:day":Z$,"event:admission:timeslot":W$,"event:price":H$,"events:admission":G$,"events:admission:day":K$,"events:admission:timeslot":Y$,"events:price":J$,coupon:Q$,tour:e2};function qn(e){const t=t2[e];return t||console.warn(`[ticket-selection] Unknown filter "${e}". Valid filters: ${Lg.join(", ")}`),t}var Bg=Lg,r2=0,n2=class{uid=r2++;#e=ae();get filters(){return d(this.#e)}set filters(e){$(this.#e,e,!0)}#t=ae();get eventIds(){return d(this.#t)}set eventIds(e){$(this.#t,e,!0)}#r=ae();get museumIds(){return d(this.#r)}set museumIds(e){$(this.#r,e,!0)}#n=ae();get exhibitionIds(){return d(this.#n)}set exhibitionIds(e){$(this.#n,e,!0)}#i=ae();get ticketIds(){return d(this.#i)}set ticketIds(e){$(this.#i,e,!0)}#s=ae();get ticketGroupIds(){return d(this.#s)}set ticketGroupIds(e){$(this.#s,e,!0)}#o=ae();get selectedDate(){return d(this.#o)}set selectedDate(e){$(this.#o,e,!0)}#a=ae();get selectedTimeslot(){return d(this.#a)}set selectedTimeslot(e){$(this.#a,e,!0)}timeslotTicketIds=[];#l=D(()=>this.selectedTimeslot);get selectedTime(){return d(this.#l)}set selectedTime(e){$(this.#l,e)}#u=ae(Me([]));get ticketSegments(){return d(this.#u)}set ticketSegments(e){$(this.#u,e,!0)}#c=D(()=>this.ticketSegments.map(e=>e.preCart));get preCarts(){return d(this.#c)}set preCarts(e){$(this.#c,e)}#d=ae();get timeslotDetails(){return d(this.#d)}set timeslotDetails(e){$(this.#d,e,!0)}addTicketSegment(e){this.ticketSegments.push(e)}get isCalendarVisible(){return!!this.filters?.some(e=>qn(e).isCalendarVisible(this))}get isTimeslotsVisible(){return!!this.filters?.some(e=>qn(e).isTimeslotsVisible(this))}get isTicketsVisible(){return!!this.filters?.some(e=>qn(e).isTicketsVisible(this))}},Vg="go-ticket-selection",i2=$i(Vg),gn=Fi(Vg);function s2(e,t){ne(t,!0);let r=_(t,"when",7),n=_(t,"then",7,"show");const i=gn(t.$$host),s=D(()=>i.value),a=PT(t.$$host),o=D(()=>a.value),l=Ni(t.$$host),c=D(()=>l.value),f=Ri(t.$$host),u=D(()=>f.value),p=S.auth;let h=D(()=>({ticketSelection:d(s),personalizationDetails:d(o),formData:d(c)?.formData,cart:S.cart,cartView:d(u),auth:{isAuthenticated:p.isAuthenticated(),isLoggedIn:p.isLoggedIn(),isGuest:p.isGuest()}}));const g=k=>{$(h,k)},v=()=>d(h);let m=D(()=>z$(r(),d(h))),y=null;ve(()=>{const k=t.$$host;if(d(m)&&n()==="show")y&&(k.appendChild(y),y=null);else if(!y&&k.childNodes.length>0)for(y=document.createDocumentFragment();k.firstChild;)y.appendChild(k.firstChild)});var E={_setData:g,_getData:v,get when(){return r()},set when(k){r(k),b()},get then(){return n()},set then(k="show"){n(k),b()}};return ie(E)}customElements.define("go-if",se(s2,{when:{attribute:"when",reflect:!0,type:"String"},then:{attribute:"then",reflect:!0,type:"String"}},[],["_setData","_getData"]));function jg(e,t){ne(t,!0);let r=_(t,"apiUrl",7),n=_(t,"shopDomain",7),i=_(t,"locale",7);return i(i()||localStorage.getItem("lang")||"en"),ve(()=>{(n()!==S.shopDomain||r()!==S.apiUrl||i()!==S.locale)&&(S.load(r(),n(),i()),console.warn("shop loaded due to prop change"))}),ie({get apiUrl(){return r()},set apiUrl(s){r(s),b()},get shopDomain(){return n()},set shopDomain(s){n(s),b()},get locale(){return i()},set locale(s){i(s),b()}})}customElements.define("gomus-init",se(jg,{apiUrl:{attribute:"api-url",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function a2(e,t){ne(t,!0);let r=_(t,"apiDomain",7),n=_(t,"shopDomain",7),i=_(t,"locale",7),s=`https://${r()}`;var a={get apiDomain(){return r()},set apiDomain(o){r(o),b()},get shopDomain(){return n()},set shopDomain(o){n(o),b()},get locale(){return i()},set locale(o){i(o),b()}};return jg(e,{get apiUrl(){return s},get shopDomain(){return n()},get locale(){return i()}}),ie(a)}customElements.define("go-init",se(a2,{apiDomain:{attribute:"api-domain",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function o2(e,t){ne(t,!0);const r=_(t,"to",7),n=D(()=>Qe.config.urls[r()]),i=Hr(t.$$host,"a");return ve(()=>{if(!d(n)){console.warn(`[go-link] No URL found for route "${r()}".`),i.removeAttribute("href");return}i.setAttribute("href",d(n)())}),i.addEventListener("click",s=>{if(s.preventDefault(),!Qe.config.urls[r()]){console.warn(`[go-link] No URL found for route "${r()}". You can define it with go.config.urls.${r()} = () => 'https://example.com/my-route'`);return}Qe.config.navigateTo(Qe.config.urls[r()]())}),ie({get to(){return r()},set to(s){r(s),b()}})}customElements.define("go-link",se(o2,{to:{attribute:"to",reflect:!0,type:"String"}},[],[]));function l2(e,t){ne(t,!0);let r=_(t,"custom",7,!1);Pt.defineForm({id:"membershipActivation",submitLabel:"membership.activation.actions.submit",fields:[{key:"email",required:!0}]});async function n(i){const s=i.target.details;(await S.activateMembership(s.formData)).response?.ok?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=[S.t("membership.activation.form.errors.requestFailed")]}return Hr(t.$$host,"go-form",{"form-id":"membershipActivation",custom:r()}),t.$$host.addEventListener("submit",n),ie({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-membership-activation",se(l2,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));var u2=class{#e=ae();get token(){return d(this.#e)}set token(e){$(this.#e,e,!0)}constructor(e){this.token=e}get order(){if(this.token)return hl(S.order(this.token))}downloadLink(e,t){if(this.order?.is_valid)switch(e.type){case"Event":return`${S.apiUrl}/api/v4/orders/${this.order.id}/events/${e.attributes.id}.pdf?locale=${S.locale}&token=${this.token}`;case"Ticket":return e.attributes.ticket_type==="annual"&&!e.attributes.is_voucher?Qe.config.urls.annualTicketPersonalizationList?.()?Qe.config.urls.annualTicketPersonalizationList(this.token):S.urls?.annualTicketPersonalizationList(this.token):`${S.apiUrl}/api/v4/orders/${this.order.id}/tickets/${e.attributes.id}.pdf?locale=${S.locale}&token=${this.token}&barcode_id=${t}`;default:break}}},Zg="go-order-details",c2=$i(Zg),Wg=Fi(Zg);function d2(e,t){ne(t,!0);let r=_(t,"token",7);const n=new u2(r());c2(t.$$host,n);let i;ve(()=>{n.token=r();const a=S.cart;!a||i===r()||(i=r(),Re(()=>{a.clearItems(),S.auth.isGuest()&&S.auth.signOut()}))});var s={orderDetails:n,get token(){return r()},set token(a){r(a),b()}};return ie(s)}customElements.define("go-order",se(d2,{token:{attribute:"token",reflect:!0,type:"String"}},[],["orderDetails"]));var f2=B('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <span class="go-cart-item-time" data-testid="cart-item-time"> </span>',1),h2=B('<br/> <span class="go-order-item-quantities"> </span>',1),p2=B('<a aria-label="iCal link"> </a>'),m2=B('<li><article><ul><li class="go-order-breakdown-count">1</li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!> <!> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li> <li class="go-order-breakdown-ical"><!></li></ul></article></li>');function Hg(e,t){ne(t,!0);let r=_(t,"item",7),n=_(t,"orderDetails",7);var i={get item(){return r()},set item(A){r(A),b()},get orderDetails(){return n()},set orderDetails(A){n(A),b()}},s=m2(),a=M(s),o=M(a),l=V(M(o),2),c=M(l),f=M(c,!0);I(c);var u=V(c,2),p=A=>{var O=f2(),F=U(O),R=M(F,!0);I(F);var Y=V(F,2),N=M(Y,!0);I(Y),J((X,q)=>{H(R,X),H(N,q)},[()=>S.formatDate(r().attributes.start_time,"dayMonth"),()=>S.formatTime(r().attributes.start_time)]),x(A,O)};ue(u,A=>{r().attributes.start_time&&A(p)});var h=V(u,2);Ne(h,17,()=>r().attributes.quantities,A=>A.id,(A,O)=>{var F=h2(),R=V(U(F),2),Y=M(R);I(R),J(()=>H(Y,`${d(O).quantity??""} x ${d(O).title??""}`)),x(A,F)});var g=V(h,2),v=M(g,!0);I(g),I(l);var m=V(l,2),y=M(m,!0);I(m);var E=V(m,4),k=M(E),T=A=>{var O=p2(),F=M(O,!0);I(O),J(R=>{me(O,"href",S.apiUrl+r().attributes.ical_url),H(F,R)},[()=>S.t("common.calendar")]),x(A,O)};return ue(k,A=>{r().attributes.ical_url&&A(T)}),I(E),I(o),I(a),I(s),J((A,O,F)=>{H(f,r().attributes.title),me(g,"href",A),H(v,O),H(y,F)},[()=>n().downloadLink(r()),()=>S.t("common.download"),()=>yt(r().price_cents)]),x(e,s),ie(i)}se(Hg,{item:{},orderDetails:{}},[],[],{mode:"open"});var Gg=B('<span class="go-order-item-subtitle" data-testid="order-item-subtitle"> </span>'),v2=B('<br/> <span class="go-order-item-quantities" data-testid="order-sub-ticket"> </span>',1),g2=B('<span class="go-cart-item-date"> </span> <span class="go-cart-item-time"> </span>',1),y2=B('<span class="go-cart-item-date"> </span>'),b2=B('<!> <br/> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>',1),_2=B('<br/> <a class="go-ticket-personalization"> </a>',1),w2=B('<a aria-label="passbook link"><img alt="apple wallet icon"/></a>'),k2=B('<a aria-label="iCal link"> </a>'),S2=B('<li><article><ul><li class="go-order-breakdown-count"></li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!> <!> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"><!></li> <li class="go-order-breakdown-ical"><!></li></ul></article></li>'),E2=B('<a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>'),T2=B('<a class="go-ticket-personalization"> </a>'),x2=B('<li><article><ul><li class="go-order-breakdown-count"> </li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li></ul></article></li>');function Kg(e,t){ne(t,!0);const r=`https://cdn.shop.platform.gomus.de/apple_wallet_${S.locale}.svg`;let n=_(t,"item",7),i=_(t,"orderDetails",7);const s=D(()=>(n().attributes.sub_ticket_sales??[]).filter(u=>u.quantity>0));var a={get item(){return n()},set item(u){n(u),b()},get orderDetails(){return i()},set orderDetails(u){i(u),b()}},o=re(),l=U(o),c=u=>{var p=re(),h=U(p);Ne(h,17,()=>({length:n().attributes.quantity}),sn,(g,v,m)=>{var y=S2(),E=M(y),k=M(E),T=M(k);T.textContent="1";var A=V(T,2),O=M(A),F=M(O,!0);I(O);var R=V(O,2),Y=Q=>{var P=Gg(),te=M(P,!0);I(P),J(()=>H(te,n().attributes.sub_title)),x(Q,P)};ue(R,Q=>{n().attributes.sub_title&&Q(Y)});var N=V(R,2);Ne(N,17,()=>d(s),Q=>Q.id,(Q,P)=>{var te=v2(),L=V(U(te),2),be=M(L);I(L),J(()=>H(be,`${d(P).quantity??""} x ${d(P).title??""}`)),x(Q,te)});var X=V(N,2),q=Q=>{const P=D(()=>n().attributes.barcodes[m]?.id);var te=b2(),L=U(te),be=we=>{var De=g2(),Le=U(De),je=M(Le,!0);I(Le);var bt=V(Le,2),at=M(bt,!0);I(bt),J((Nt,_t)=>{H(je,Nt),H(at,_t)},[()=>S.formatDate(n().attributes.start_time,"dayMonth"),()=>S.formatTime(n().attributes.start_time)]),x(we,De)},Z=we=>{var De=y2(),Le=M(De,!0);I(De),J(je=>H(Le,je),[()=>S.formatDate(n().attributes.start_time,"dayMonth")]),x(we,De)};ue(L,we=>{n().attributes.ticket_type==="time_slot"?we(be):n().attributes.ticket_type==="normal"&&we(Z,1)});var w=V(L,4),_e=M(w,!0);I(w),J((we,De)=>{me(w,"href",we),H(_e,De)},[()=>i().downloadLink(n(),d(P)),()=>S.t("common.download")]),x(Q,te)},le=Q=>{var P=_2(),te=V(U(P),2),L=M(te,!0);I(te),J((be,Z)=>{me(te,"href",be),H(L,Z)},[()=>i().downloadLink(n()),()=>S.t("common.personalize")]),x(Q,P)};ue(X,Q=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?Q(q):Q(le,-1)}),I(A);var he=V(A,2),j=M(he,!0);I(he);var oe=V(he,2),ee=M(oe),fe=Q=>{var P=w2(),te=M(P);I(P),J(()=>{me(P,"href",S.apiUrl+n().attributes.barcodes[m]?.passbook_url),me(te,"src",r)}),x(Q,P)};ue(ee,Q=>{n().attributes.barcodes[m]&&n().attributes.barcodes[m]?.passbook_url&&Q(fe)}),I(oe);var ce=V(oe,2),de=M(ce),G=Q=>{var P=k2(),te=M(P,!0);I(P),J(L=>{me(P,"href",S.apiUrl+n().attributes.ical_url),H(te,L)},[()=>S.t("common.calendar")]),x(Q,P)};ue(de,Q=>{n().attributes.ical_url&&Q(G)}),I(ce),I(k),I(E),I(y),J(Q=>{H(F,n().attributes.title),H(j,Q)},[()=>yt(n().price_cents)]),x(g,y)}),x(u,p)},f=u=>{var p=x2(),h=M(p),g=M(h),v=M(g),m=M(v,!0);I(v);var y=V(v,2),E=M(y),k=M(E,!0);I(E);var T=V(E,2),A=X=>{var q=Gg(),le=M(q,!0);I(q),J(()=>H(le,n().attributes.sub_title)),x(X,q)};ue(T,X=>{n().attributes.sub_title&&X(A)});var O=V(T,2),F=X=>{var q=E2(),le=M(q,!0);I(q),J((he,j)=>{me(q,"href",he),H(le,j)},[()=>i().downloadLink(n()),()=>S.t("common.download")]),x(X,q)},R=X=>{var q=T2(),le=M(q,!0);I(q),J((he,j)=>{me(q,"href",he),H(le,j)},[()=>i().downloadLink(n()),()=>S.t("common.personalize")]),x(X,q)};ue(O,X=>{n().attributes.is_voucher?X(F):X(R,-1)}),I(y);var Y=V(y,2),N=M(Y,!0);I(Y),Ot(2),I(g),I(h),I(p),J(X=>{H(m,n().attributes.quantity),H(k,n().attributes.title),H(N,X)},[()=>yt(n().price_cents)]),x(u,p)};return ue(l,u=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?u(c):u(f,-1)}),x(e,o),ie(a)}se(Kg,{item:{},orderDetails:{}},[],[],{mode:"open"});var A2=B('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <span class="go-cart-item-time" data-testid="cart-item-time"> </span>',1),C2=B('<br/> <span class="go-order-item-quantities"> </span>',1),O2=B('<a aria-label="iCal link"> </a>'),D2=B('<li><article><ul><li class="go-order-breakdown-count">1</li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <span class="go-order-item-participants" data-testid="order-item-participants"> </span> <!> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li> <li class="go-order-breakdown-ical"><!></li></ul></article></li>');function Yg(e,t){ne(t,!0);let r=_(t,"item",7);const n=D(()=>(r().attributes.prices??[]).filter(A=>A.title&&A.quantity!=null));var i={get item(){return r()},set item(A){r(A),b()}},s=D2(),a=M(s),o=M(a),l=V(M(o),2),c=M(l),f=M(c,!0);I(c);var u=V(c,2),p=M(u,!0);I(u);var h=V(u,2),g=A=>{var O=A2(),F=U(O),R=M(F,!0);I(F);var Y=V(F,2),N=M(Y,!0);I(Y),J((X,q)=>{H(R,X),H(N,q)},[()=>S.formatDate(r().attributes.start_time,"dayMonth"),()=>S.formatTime(r().attributes.start_time)]),x(A,O)};ue(h,A=>{r().attributes.start_time&&A(g)});var v=V(h,2);Ne(v,17,()=>d(n),A=>A.title,(A,O)=>{var F=C2(),R=V(U(F),2),Y=M(R);I(R),J(()=>H(Y,`${d(O).quantity??""} x ${d(O).title??""}`)),x(A,F)}),I(l);var m=V(l,2),y=M(m,!0);I(m);var E=V(m,4),k=M(E),T=A=>{var O=O2(),F=M(O,!0);I(O),J(R=>{me(O,"href",S.apiUrl+r().attributes.ical_url),H(F,R)},[()=>S.t("common.calendar")]),x(A,O)};return ue(k,A=>{r().attributes.ical_url&&A(T)}),I(E),I(o),I(a),I(s),J((A,O)=>{H(f,r().attributes.title),H(p,A),H(y,O)},[()=>S.t("cart.item.participants",{count:r().attributes.participants}),()=>yt(r().price_cents)]),x(e,s),ie(i)}se(Yg,{item:{}},[],[],{mode:"open"});var I2=B('<ol><li class="data-go-order-breakdown-header"><ul><li class="go-order-breakdown-header-count"> </li> <li class="go-order-breakdown-header-product"> </li> <li class="go-order-breakdown-header-price"> </li> <li class="go-order-breakdown-header-passbook"></li></ul></li> <!> <li class="go-order-breakdown-footer"><ul><li class="go-cart-footer-title"></li> <li class="go-cart-footer-count"></li> <li class="go-cart-footer-price"> </li> <li class="go-cart-footer-passbook"></li></ul></li></ol>');function P2(e,t){ne(t,!0);const r=Wg(t.$$host),n=D(()=>r.value);let i=D(()=>d(n)?.order);var s=re(),a=U(s),o=l=>{var c=I2(),f=M(c),u=M(f),p=M(u),h=M(p,!0);I(p);var g=V(p,2),v=M(g,!0);I(g);var m=V(g,2),y=M(m,!0);I(m),Ot(2),I(u),I(f);var E=V(f,2);Ne(E,17,()=>d(i).items,F=>F.id,(F,R)=>{var Y=re(),N=U(Y),X=he=>{Kg(he,{get item(){return d(R)},get orderDetails(){return d(n)}})},q=he=>{Hg(he,{get item(){return d(R)},get orderDetails(){return d(n)}})},le=he=>{Yg(he,{get item(){return d(R)}})};ue(N,he=>{d(R).type==="Ticket"?he(X):d(R).type==="Event"?he(q,1):d(R).type==="Tour"&&he(le,2)}),x(F,Y)});var k=V(E,2),T=M(k),A=V(M(T),4),O=M(A,!0);I(A),Ot(2),I(T),I(k),I(c),J((F,R,Y,N)=>{H(h,F),H(v,R),H(y,Y),H(O,N)},[()=>S.t("common.table.count"),()=>S.t("common.table.product"),()=>S.t("common.table.price"),()=>S.t("common.table.total",{value:yt(d(i).total_price_cents)})]),x(l,c)};ue(a,l=>{d(i)&&d(n)&&l(o)}),x(e,s),ie()}customElements.define("go-order-breakdown",se(P2,{},[],[]));function M2(e,t){ne(t,!0);const r=Wg(t.$$host),n=D(()=>r.value);let i=D(()=>d(n)?.order);Ot();var s=Bt();J(()=>H(s,d(i)?.id)),x(e,s),ie()}customElements.define("go-order-invoice-id",se(M2,{},[],[]));var $2=B("<go-form></go-form>",2);function F2(e,t){ne(t,!1),Pt.defineForm({id:"passwordResetForm",fields:[{key:"currentPassword",required:!0},{key:"password",required:!0},{key:"confirmPassword",required:!0}]});async function r(i){const s=i.target.details,a=await S.updatePassword(s.formData);a.data?(s.successMessage=S.t("user.passwordSuccess.desc.title"),s.apiErrors=[]):s.apiErrors=a.error?.errors||a.error||a.errors}Jl();var n=$2();xn(n,"formId","passwordResetForm"),Ts("submit",n,r),x(e,n),ie()}customElements.define("go-profile-password",se(F2,{},[],[]));var N2=B("<go-form></go-form>",2);function R2(e,t){ne(t,!0),Pt.defineForm({id:"accountDetailsForm",fields:[{key:"salutation",required:!1},{key:"firstName",required:!0},{key:"lastName",required:!0},{key:"email",required:!0},{key:"confirmEmail",required:!0},{key:"language",required:!0}]});let r=ae(void 0);const n=D(()=>S.getCustomer()),i=D(()=>d(n)&&"data"in d(n)?d(n).data:void 0);En(async()=>{await S.waitForAllFetches(),await Ql(()=>d(r).details),await Ql(()=>d(i)),d(r).details.fill(d(i))});var s=N2();xn(s,"formId","accountDetailsForm"),Yl(s,a=>$(r,a),()=>d(r)),x(e,s),ie()}customElements.define("go-profile-details",se(R2,{},[],[]));var L2=B('<div class="go-profile-fullname"> </div> <div class="go-profile-email"> </div>',1);function z2(e,t){ne(t,!0);const r=D(()=>S.getCustomer()),n=D(()=>d(r)&&"data"in d(r)?d(r).data:void 0);var i=re(),s=U(i),a=l=>{var c=L2(),f=U(c),u=M(f);I(f);var p=V(f,2),h=M(p,!0);I(p),J(()=>{H(u,`${d(n).name??""}
84
+ `,r+1);while(r>=0&&r<this.pos);return{line:e,column:t}},st.prototype.parseError=function(e){var t=this.getCoordinates();throw new Error("parse error ["+t.line+":"+t.column+"]: "+e)};function Ye(e,t,r){this.parser=e,this.tokens=t,this.current=null,this.nextToken=null,this.next(),this.savedCurrent=null,this.savedNextToken=null,this.allowMemberAccess=r.allowMemberAccess!==!1}Ye.prototype.next=function(){return this.current=this.nextToken,this.nextToken=this.tokens.next()},Ye.prototype.tokenMatches=function(e,t){return typeof t>"u"?!0:Array.isArray(t)?es(t,e.value):typeof t=="function"?t(e):e.value===t},Ye.prototype.save=function(){this.savedCurrent=this.current,this.savedNextToken=this.nextToken,this.tokens.save()},Ye.prototype.restore=function(){this.tokens.restore(),this.current=this.savedCurrent,this.nextToken=this.savedNextToken},Ye.prototype.accept=function(e,t){return this.nextToken.type===e&&this.tokenMatches(this.nextToken,t)?(this.next(),!0):!1},Ye.prototype.expect=function(e,t){if(!this.accept(e,t)){var r=this.tokens.getCoordinates();throw new Error("parse error ["+r.line+":"+r.column+"]: Expected "+(t||e))}},Ye.prototype.parseAtom=function(e){var t=this.tokens.unaryOps;function r(i){return i.value in t}if(this.accept(Kc)||this.accept(Ge,r))e.push(new Fe(fn,this.current.value));else if(this.accept(Go))e.push(new Fe(mr,this.current.value));else if(this.accept(Cg))e.push(new Fe(mr,this.current.value));else if(this.accept(mn,"("))this.parseExpression(e),this.expect(mn,")");else if(this.accept(ts,"["))if(this.accept(ts,"]"))e.push(new Fe(Xi,0));else{var n=this.parseArrayList(e);e.push(new Fe(Xi,n))}else throw new Error("unexpected "+this.nextToken)},Ye.prototype.parseExpression=function(e){var t=[];this.parseUntilEndStatement(e,t)||(this.parseVariableAssignmentExpression(t),!this.parseUntilEndStatement(e,t)&&this.pushExpression(e,t))},Ye.prototype.pushExpression=function(e,t){for(var r=0,n=t.length;r<n;r++)e.push(t[r])},Ye.prototype.parseUntilEndStatement=function(e,t){return this.accept(Yc)?(this.nextToken&&this.nextToken.type!==ua&&!(this.nextToken.type===mn&&this.nextToken.value===")")&&t.push(new Fe(Wo)),this.nextToken.type!==ua&&this.parseExpression(t),e.push(new Fe(Wt,t)),!0):!1},Ye.prototype.parseArrayList=function(e){for(var t=0;!this.accept(ts,"]");)for(this.parseExpression(e),++t;this.accept(Ko);)this.parseExpression(e),++t;return t},Ye.prototype.parseVariableAssignmentExpression=function(e){for(this.parseConditionalExpression(e);this.accept(Ge,"=");){var t=e.pop(),r=[],n=e.length-1;if(t.type===Qi){if(!this.tokens.isOperatorEnabled("()="))throw new Error("function definition is not permitted");for(var i=0,s=t.value+1;i<s;i++){var a=n-i;e[a].type===fn&&(e[a]=new Fe(di,e[a].value))}this.parseVariableAssignmentExpression(r),e.push(new Fe(Wt,r)),e.push(new Fe(Zo,t.value));continue}if(t.type!==fn&&t.type!==fi)throw new Error("expected variable for assignment");this.parseVariableAssignmentExpression(r),e.push(new Fe(di,t.value)),e.push(new Fe(Wt,r)),e.push(hn("="))}},Ye.prototype.parseConditionalExpression=function(e){for(this.parseOrExpression(e);this.accept(Ge,"?");){var t=[],r=[];this.parseConditionalExpression(t),this.expect(Ge,":"),this.parseConditionalExpression(r),e.push(new Fe(Wt,t)),e.push(new Fe(Wt,r)),e.push(Tg("?"))}},Ye.prototype.parseOrExpression=function(e){for(this.parseAndExpression(e);this.accept(Ge,"or");){var t=[];this.parseAndExpression(t),e.push(new Fe(Wt,t)),e.push(hn("or"))}},Ye.prototype.parseAndExpression=function(e){for(this.parseComparison(e);this.accept(Ge,"and");){var t=[];this.parseComparison(t),e.push(new Fe(Wt,t)),e.push(hn("and"))}};var qM=["==","!=","<","<=",">=",">","in"];Ye.prototype.parseComparison=function(e){for(this.parseAddSub(e);this.accept(Ge,qM);){var t=this.current;this.parseAddSub(e),e.push(hn(t.value))}};var UM=["+","-","||"];Ye.prototype.parseAddSub=function(e){for(this.parseTerm(e);this.accept(Ge,UM);){var t=this.current;this.parseTerm(e),e.push(hn(t.value))}};var BM=["*","/","%"];Ye.prototype.parseTerm=function(e){for(this.parseFactor(e);this.accept(Ge,BM);){var t=this.current;this.parseFactor(e),e.push(hn(t.value))}},Ye.prototype.parseFactor=function(e){var t=this.tokens.unaryOps;function r(i){return i.value in t}if(this.save(),this.accept(Ge,r)){if(this.current.value!=="-"&&this.current.value!=="+"){if(this.nextToken.type===mn&&this.nextToken.value==="("){this.restore(),this.parseExponential(e);return}else if(this.nextToken.type===Yc||this.nextToken.type===Ko||this.nextToken.type===ua||this.nextToken.type===mn&&this.nextToken.value===")"){this.restore(),this.parseAtom(e);return}}var n=this.current;this.parseFactor(e),e.push(Ho(n.value))}else this.parseExponential(e)},Ye.prototype.parseExponential=function(e){for(this.parsePostfixExpression(e);this.accept(Ge,"^");)this.parseFactor(e),e.push(hn("^"))},Ye.prototype.parsePostfixExpression=function(e){for(this.parseFunctionCall(e);this.accept(Ge,"!");)e.push(Ho("!"))},Ye.prototype.parseFunctionCall=function(e){var t=this.tokens.unaryOps;function r(s){return s.value in t}if(this.accept(Ge,r)){var n=this.current;this.parseAtom(e),e.push(Ho(n.value))}else for(this.parseMemberExpression(e);this.accept(mn,"(");)if(this.accept(mn,")"))e.push(new Fe(Qi,0));else{var i=this.parseArgumentList(e);e.push(new Fe(Qi,i))}},Ye.prototype.parseArgumentList=function(e){for(var t=0;!this.accept(mn,")");)for(this.parseExpression(e),++t;this.accept(Ko);)this.parseExpression(e),++t;return t},Ye.prototype.parseMemberExpression=function(e){for(this.parseAtom(e);this.accept(Ge,".")||this.accept(ts,"[");){var t=this.current;if(t.value==="."){if(!this.allowMemberAccess)throw new Error('unexpected ".", member access is not permitted');this.expect(Kc),e.push(new Fe(fi,this.current.value))}else if(t.value==="["){if(!this.tokens.isOperatorEnabled("["))throw new Error('unexpected "[]", arrays are disabled');this.parseExpression(e),this.expect(ts,"]"),e.push(hn("["))}else throw new Error("unexpected symbol: "+t.value)}};function VM(e,t){return Number(e)+Number(t)}function jM(e,t){return e-t}function ZM(e,t){return e*t}function WM(e,t){return e/t}function HM(e,t){return e%t}function GM(e,t){return Array.isArray(e)&&Array.isArray(t)?e.concat(t):""+e+t}function KM(e,t){return e===t}function YM(e,t){return e!==t}function JM(e,t){return e>t}function QM(e,t){return e<t}function XM(e,t){return e>=t}function e$(e,t){return e<=t}function t$(e,t){return!!(e&&t)}function r$(e,t){return!!(e||t)}function n$(e,t){return es(t,e)}function i$(e){return(Math.exp(e)-Math.exp(-e))/2}function s$(e){return(Math.exp(e)+Math.exp(-e))/2}function a$(e){return e===1/0?1:e===-1/0?-1:(Math.exp(e)-Math.exp(-e))/(Math.exp(e)+Math.exp(-e))}function o$(e){return e===-1/0?e:Math.log(e+Math.sqrt(e*e+1))}function l$(e){return Math.log(e+Math.sqrt(e*e-1))}function u$(e){return Math.log((1+e)/(1-e))/2}function Dg(e){return Math.log(e)*Math.LOG10E}function c$(e){return-e}function d$(e){return!e}function f$(e){return e<0?Math.ceil(e):Math.floor(e)}function h$(e){return Math.random()*(e||1)}function Ig(e){return Qc(e+1)}function p$(e){return isFinite(e)&&e===Math.round(e)}var m$=4.7421875,Jc=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];function Qc(e){var t,r;if(p$(e)){if(e<=0)return isFinite(e)?1/0:NaN;if(e>171)return 1/0;for(var n=e-2,i=e-1;n>1;)i*=n,n--;return i===0&&(i=1),i}if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*Qc(1-e));if(e>=171.35)return 1/0;if(e>85){var s=e*e,a=s*e,o=a*e,l=o*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*s)-139/(51840*a)-571/(2488320*o)+163879/(209018880*l)+5246819/(75246796800*l*e))}--e,r=Jc[0];for(var c=1;c<Jc.length;++c)r+=Jc[c]/(e+c);return t=e+m$+.5,Math.sqrt(2*Math.PI)*Math.pow(t,e+.5)*Math.exp(-t)*r}function v$(e){return Array.isArray(e)?e.length:String(e).length}function Pg(){for(var e=0,t=0,r=0;r<arguments.length;r++){var n=Math.abs(arguments[r]),i;t<n?(i=t/n,e=e*i*i+1,t=n):n>0?(i=n/t,e+=i*i):e+=n}return t===1/0?1/0:t*Math.sqrt(e)}function Mg(e,t,r){return e?t:r}function g$(e,t){return typeof t>"u"||+t==0?Math.round(e):(e=+e,t=-+t,isNaN(e)||!(typeof t=="number"&&t%1===0)?NaN:(e=e.toString().split("e"),e=Math.round(+(e[0]+"e"+(e[1]?+e[1]-t:-t))),e=e.toString().split("e"),+(e[0]+"e"+(e[1]?+e[1]+t:t))))}function y$(e,t,r){return r&&(r[e]=t),t}function b$(e,t){return e[t|0]}function _$(e){return arguments.length===1&&Array.isArray(e)?Math.max.apply(Math,e):Math.max.apply(Math,arguments)}function w$(e){return arguments.length===1&&Array.isArray(e)?Math.min.apply(Math,e):Math.min.apply(Math,arguments)}function k$(e,t){if(typeof e!="function")throw new Error("First argument to map is not a function");if(!Array.isArray(t))throw new Error("Second argument to map is not an array");return t.map(function(r,n){return e(r,n)})}function S$(e,t,r){if(typeof e!="function")throw new Error("First argument to fold is not a function");if(!Array.isArray(r))throw new Error("Second argument to fold is not an array");return r.reduce(function(n,i,s){return e(n,i,s)},t)}function E$(e,t){if(typeof e!="function")throw new Error("First argument to filter is not a function");if(!Array.isArray(t))throw new Error("Second argument to filter is not an array");return t.filter(function(r,n){return e(r,n)})}function T$(e,t){if(!(Array.isArray(t)||typeof t=="string"))throw new Error("Second argument to indexOf is not a string or array");return t.indexOf(e)}function x$(e,t){if(!Array.isArray(t))throw new Error("Second argument to join is not an array");return t.join(e)}function A$(e){return(e>0)-(e<0)||+e}var $g=1/3;function C$(e){return e<0?-Math.pow(-e,$g):Math.pow(e,$g)}function O$(e){return Math.exp(e)-1}function D$(e){return Math.log(1+e)}function I$(e){return Math.log(e)/Math.LN2}function pi(e){this.options=e||{},this.unaryOps={sin:Math.sin,cos:Math.cos,tan:Math.tan,asin:Math.asin,acos:Math.acos,atan:Math.atan,sinh:Math.sinh||i$,cosh:Math.cosh||s$,tanh:Math.tanh||a$,asinh:Math.asinh||o$,acosh:Math.acosh||l$,atanh:Math.atanh||u$,sqrt:Math.sqrt,cbrt:Math.cbrt||C$,log:Math.log,log2:Math.log2||I$,ln:Math.log,lg:Math.log10||Dg,log10:Math.log10||Dg,expm1:Math.expm1||O$,log1p:Math.log1p||D$,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,trunc:Math.trunc||f$,"-":c$,"+":Number,exp:Math.exp,not:d$,length:v$,"!":Ig,sign:Math.sign||A$},this.binaryOps={"+":VM,"-":jM,"*":ZM,"/":WM,"%":HM,"^":Math.pow,"||":GM,"==":KM,"!=":YM,">":JM,"<":QM,">=":XM,"<=":e$,and:t$,or:r$,in:n$,"=":y$,"[":b$},this.ternaryOps={"?":Mg},this.functions={random:h$,fac:Ig,min:w$,max:_$,hypot:Math.hypot||Pg,pyt:Math.hypot||Pg,pow:Math.pow,atan2:Math.atan2,if:Mg,gamma:Qc,roundTo:g$,map:k$,fold:S$,filter:E$,indexOf:T$,join:x$},this.consts={E:Math.E,PI:Math.PI,true:!0,false:!1}}pi.prototype.parse=function(e){var t=[],r=new Ye(this,new st(this,e),{allowMemberAccess:this.options.allowMemberAccess});return r.parseExpression(t),r.expect(ua,"EOF"),new Dr(t,this)},pi.prototype.evaluate=function(e,t){return this.parse(e).evaluate(t)};var Fg=new pi;pi.parse=function(e){return Fg.parse(e)},pi.evaluate=function(e,t){return Fg.parse(e).evaluate(t)};var Ng={"+":"add","-":"subtract","*":"multiply","/":"divide","%":"remainder","^":"power","!":"factorial","<":"comparison",">":"comparison","<=":"comparison",">=":"comparison","==":"comparison","!=":"comparison","||":"concatenate",and:"logical",or:"logical",not:"logical","?":"conditional",":":"conditional","=":"assignment","[":"array","()=":"fndef"};function P$(e){return Ng.hasOwnProperty(e)?Ng[e]:e}pi.prototype.isOperatorEnabled=function(e){var t=P$(e),r=this.options.operators||{};return!(t in r)||!!r[t]};var M$=/\b[$A-Za-z_][$\w]*(?:(?:\?\.)|\.)[$A-Za-z_][$\w]*(?:(?:\?\.)[$A-Za-z_][$\w]*|(?:\.)[$A-Za-z_][$\w]*)*/g,$$=/\b([$A-Za-z_][$\w]*(?:\.[$A-Za-z_][$\w]*)*)\.length\b/g,F$=/(__optional\("[^"]+"\))\.length\b/g,N$=new pi({allowMemberAccess:!0,operators:{assignment:!1,fndef:!1}}),Rg=new Map;function R$(e){return e.replace(M$,t=>t.includes("?.")?`__optional("${t.replace(/\?\./g,".")}")`:t).replace($$,(t,r)=>`__length(${r})`).replace(F$,(t,r)=>`__length(${r})`).replaceAll("!==","!=").replaceAll("===","==").replaceAll("&&"," and ").replaceAll("||"," or ").replace(/!\s*(?!=)/g,"not ")}function L$(e){const t=Rg.get(e);if(t)return t;const r=N$.parse(R$(e));return Rg.set(e,r),r}function z$(e,t){if(e==null||typeof e!="string")return e;const r={data:t,undefined:void 0,null:null};r.__optional=n=>n.split(".").reduce((i,s)=>{if(i!=null)return i[s]},r),r.__length=n=>{if(n!=null){if(typeof n=="string"||Array.isArray(n))return n.length;if(typeof n=="object"&&"length"in n){const i=n.length;return typeof i=="number"?i:void 0}}};try{const n=L$(e);for(const i of n.symbols()){if(r[i]!==void 0)continue;const s=globalThis[i];typeof s=="function"&&(r[i]=s)}return n.evaluate(r)}catch(n){console.error(`Error while evaluating when (${e}) in go-if: ${n.message}`)}}var Lg=["ticket:timeslot","ticket:day","ticket:annual","event:admission","event:admission:day","event:admission:timeslot","event:price","events:admission","events:admission:day","events:admission:timeslot","events:price","coupon","tour"],q$=7200*1e3;function Xc(e,{id:t,quantity:r,time:n}){if(!(r>0))throw new Error("(go.cart.addItem) 'quantity' must be a positive number");if(!e)throw new Error(`(go.cart.addItem) ticket ${t} not available (sold out or unknown)`);const i=rt(e,{quantity:r,time:n??e.selectedTime}),{max:s}=S.capacityManager.capacity(S.cart,i,ei());if(r>s)throw new Error(`(go.cart.addItem) only ${s} left for ticket ${t}`);return S.cart.addItem(i),i.uuid}async function vn(e,t){if(!e.withContent)return;const r=t.map(n=>n.id).filter(n=>typeof n=="number");if(r.length)try{const n=await S.asyncFetch(()=>S.ticketsContent(r))??[],i=new Map(n.map(s=>[s.id,s.content]));for(const s of t){if(typeof s.id!="number")continue;const a=i.get(s.id);a&&(s.content=a)}}catch{}}function Yo(e,t){S.capacityManager.addQuotas(t),e.timeslotTicketIds=[...e.timeslotTicketIds,...Object.values(t).flatMap(r=>r.ticket_ids)]}function Jo(e,t,r){const n=Date.parse(r);return e.filter(i=>{const s=i.start_time.slice(0,10),a=Date.parse(i.start_time);return s===t&&a>=n&&a<=n+q$&&(i.seats?.available??0)>0})}async function Qo(e){if(!e?.selectedDate)return;const{quotas:t}=await S.asyncFetch(()=>S.ticketsAndQuotas({by_bookable:!0,valid_at:e.selectedDate.toString(),"by_ticket_types[]":["time_slot"],"by_museum_ids[]":e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_ticket_ids[]":e.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds}));Yo(e,t)}async function zg(e,t){const{tickets:r,quotas:n}=await S.asyncFetch(()=>S.ticketsAndQuotas({by_bookable:!0,by_ticket_type:"time_slot",...e}));return S.capacityManager.addQuotas(n),Bs(Vs(r,t),t)}var U$={name:"ticket:timeslot",calendarEndpoint:"tickets",apiToken:"time_slot",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:e=>!!e.selectedDate,isTicketsVisible:e=>!!(e.selectedDate&&e.selectedTimeslot),async addToCart(e){const{id:t,quantity:r,time:n}=e;if(!n)throw new Error("(go.cart.addItem) ticket:timeslot requires a 'time'");const i=(await zg({valid_at:n.slice(0,10),"by_ticket_ids[]":[t]},n))[0];return Xc(i,{id:t,quantity:r,time:n})},async loadTimeslots(e){if(!e?.selectedDate)return;const{quotas:t}=await S.asyncFetch(()=>S.ticketsAndQuotas({by_bookable:!0,valid_at:e.selectedDate.toString(),by_ticket_type:"time_slot","by_museum_ids[]":e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_ticket_ids[]":e.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds}));Yo(e,t)},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTimeslot)return;const r=await zg({valid_at:t.selectedDate.toString(),"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds??t.ticketGroupIds},t.selectedTimeslot);await vn(e,r);for(const n of r)e.preCart.addItem(rt(n,{time:t.selectedTime}))}};async function qg(e){const{tickets:t,quotas:r}=await S.asyncFetch(()=>S.ticketsAndQuotas({by_bookable:!0,"by_ticket_types[]":["normal"],...e}));return S.capacityManager.addQuotas(r),Du(t)}var B$={name:"ticket:day",calendarEndpoint:"tickets",apiToken:"normal",requires:[{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:e=>!!e.selectedDate,async loadTimeslots(){},async addToCart(e){const{id:t,quantity:r,date:n}=e;if(!n)throw new Error("(go.cart.addItem) ticket:day requires a 'date'");const i=(await qg({valid_at:n,"by_ticket_ids[]":[t]}))[0];return Xc(i,{id:t,quantity:r})},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate)return;const r=await qg({valid_at:t.selectedDate.toString(),"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds??t.ticketGroupIds});await vn(e,r);for(const n of r)e.preCart.addItem(rt(n,{time:n.selectedTime}))}};async function Ug(e){const t=await S.asyncFetch(()=>S.tickets({by_bookable:!0,"by_ticket_types[]":["annual"],...e}));return Object.values(t).map(r=>Us(r))}var V$={name:"ticket:annual",calendarEndpoint:null,apiToken:"annual",requires:[],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:()=>!0,async loadTimeslots(){},async addToCart(e){const{id:t,quantity:r}=e,n=(await Ug({"by_ticket_ids[]":[t]}))[0];return Xc(n,{id:t,quantity:r})},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t)return;const r=await Ug({"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds??t.ticketGroupIds});await vn(e,r);for(const n of r)e.preCart.addItem(rt(n))}},j$={name:"event:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:e=>!!e.selectedDate,isTicketsVisible:e=>!!(e.selectedDate&&e.selectedTimeslot),async loadTimeslots(e){if(!e?.eventIds?.length||!e.selectedDate)return;const t=await S.asyncFetch(()=>S.getEvent(e.eventIds[0]));if(!t.tickets?.length)return;const{quotas:r}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":t.tickets,by_bookable:!0,valid_at:e.selectedDate.toString()}));Yo(e,r)},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||!t.selectedDate)return;const r=await S.asyncFetch(()=>S.getEvent(t.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,by_bookable:!0,valid_at:t.selectedDate.toString()}));S.capacityManager.addQuotas(i);const s=Bs(Vs(n,t.selectedTime),t.selectedTime);await vn(e,s);for(const a of s)e.preCart.addItem(rt(a,{time:t.selectedTime}))}},Z$={name:"event:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:e=>!!e.selectedDate,async loadTimeslots(){},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||!t.selectedDate)return;const r=await S.asyncFetch(()=>S.getEvent(t.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:t.selectedDate.toString()}));S.capacityManager.addQuotas(i);const s=Du(n);await vn(e,s);for(const a of s)e.preCart.addItem(rt(a,{time:a.selectedTime}))}},W$={name:"event:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:e=>!!e.selectedDate,isTicketsVisible:e=>!!(e.selectedDate&&e.selectedTimeslot),async loadTimeslots(e){if(!e?.eventIds?.length||!e.selectedDate)return;const t=await S.asyncFetch(()=>S.getEvent(e.eventIds[0]));if(!t.tickets?.length)return;const{quotas:r}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":t.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:e.selectedDate.toString()}));Yo(e,r)},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||!t.selectedDate||!t.selectedTimeslot)return;const r=await S.asyncFetch(()=>S.getEvent(t.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:t.selectedDate.toString()}));S.capacityManager.addQuotas(i);const s=Bs(Vs(n,t.selectedTime),t.selectedTime);await vn(e,s);for(const a of s)e.preCart.addItem(rt(a,{time:t.selectedTime}))}},H$={name:"event:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"segment",field:"dateId"}],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:e=>!!e.eventIds?.length,loadTimeslots:async()=>{},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||e.dateId===void 0)return;const r=await S.asyncFetch(()=>S.getEventDetailsOnDate(t.eventIds[0],e.dateId));if(r.prices?.length){for(const n of r.prices){const i=Pu(n,r.id,{event_title:r.event_title});e.preCart.addItem(rt(i,{time:r.start_time}))}r.seats&&S.capacityManager.addSeats(r.id,r.seats)}}},G$={name:"events:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Qo(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Jo(await S.asyncFetch(()=>S.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime);for(const n of r){if(!n.event_id||!n.start_time)continue;const i=await S.asyncFetch(()=>S.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:s,quotas:a}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,by_bookable:!0,valid_at:n.start_time.slice(0,10)}));S.capacityManager.addQuotas(a);const o=Bs(Vs(s,n.start_time),n.start_time);await vn(e,o);for(const l of o)e.preCart.addItem(rt(l,{time:n.start_time}))}}},K$={name:"events:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Qo(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Jo(await S.asyncFetch(()=>S.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime);for(const n of r){if(!n.event_id||!n.start_time)continue;const i=await S.asyncFetch(()=>S.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:s,quotas:a}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:n.start_time.slice(0,10)}));S.capacityManager.addQuotas(a);const o=Du(s,n.start_time);await vn(e,o);for(const l of o)e.preCart.addItem(rt(l,{time:l.selectedTime}))}}},Y$={name:"events:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Qo(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Jo(await S.asyncFetch(()=>S.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime);for(const n of r){if(!n.event_id||!n.start_time)continue;const i=await S.asyncFetch(()=>S.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:s,quotas:a}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:n.start_time.slice(0,10)}));S.capacityManager.addQuotas(a);const o=Bs(Vs(s,n.start_time),n.start_time);await vn(e,o);for(const l of o)e.preCart.addItem(rt(l,{time:n.start_time}))}}},J$={name:"events:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Qo(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Jo(await S.asyncFetch(()=>S.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime),n=e.query;for(const i of r){if(!i.prices?.length)continue;const s=n?i.prices.filter(a=>a.title?.includes(n)):i.prices;for(const a of s){const o=Pu(a,i.id,{event_title:i.event_title});e.preCart.addItem(rt(o,{time:i.start_time}))}i.seats&&S.capacityManager.addSeats(i.id,i.seats)}}},Q$={name:"coupon",calendarEndpoint:null,requires:[],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:()=>!0,loadTimeslots:async()=>{},async loadProducts(e){const t=await S.asyncFetch(()=>S.getCoupons());for(const r of t??[])e.preCart.addItem(rt(bp(r)))}},X$=["id","time","participants","languageId","totalPriceCents","title"],e2={name:"tour",calendarEndpoint:null,requires:[],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:()=>!0,async loadTimeslots(){},async loadProducts(){},async addToCart(e){const t=e;for(const s of X$)if(t[s]==null||t[s]==="")throw new Error(`(go.cart.addItem) tour '${s}' is required`);if(!(t.participants>0))throw new Error("(go.cart.addItem) tour 'participants' must be a positive number");if(t.quantities){const s=qr(Object.values(t.quantities));if(s!==t.participants)throw new Error(`(go.cart.addItem) tour 'quantities' must sum to 'participants' (${s} !== ${t.participants})`)}const{time:r,...n}=t,i=rt(gp(n),{quantity:1,time:r});return S.cart.addItem(i),i.uuid}},t2={"ticket:timeslot":U$,"ticket:day":B$,"ticket:annual":V$,"event:admission":j$,"event:admission:day":Z$,"event:admission:timeslot":W$,"event:price":H$,"events:admission":G$,"events:admission:day":K$,"events:admission:timeslot":Y$,"events:price":J$,coupon:Q$,tour:e2};function qn(e){const t=t2[e];return t||console.warn(`[ticket-selection] Unknown filter "${e}". Valid filters: ${Lg.join(", ")}`),t}var Bg=Lg,r2=0,n2=class{uid=r2++;#e=ae();get filters(){return d(this.#e)}set filters(e){$(this.#e,e,!0)}#t=ae();get eventIds(){return d(this.#t)}set eventIds(e){$(this.#t,e,!0)}#r=ae();get museumIds(){return d(this.#r)}set museumIds(e){$(this.#r,e,!0)}#n=ae();get exhibitionIds(){return d(this.#n)}set exhibitionIds(e){$(this.#n,e,!0)}#i=ae();get ticketIds(){return d(this.#i)}set ticketIds(e){$(this.#i,e,!0)}#s=ae();get ticketGroupIds(){return d(this.#s)}set ticketGroupIds(e){$(this.#s,e,!0)}#o=ae();get selectedDate(){return d(this.#o)}set selectedDate(e){$(this.#o,e,!0)}#a=ae();get selectedTimeslot(){return d(this.#a)}set selectedTimeslot(e){$(this.#a,e,!0)}timeslotTicketIds=[];#l=D(()=>this.selectedTimeslot);get selectedTime(){return d(this.#l)}set selectedTime(e){$(this.#l,e)}#u=ae(Me([]));get ticketSegments(){return d(this.#u)}set ticketSegments(e){$(this.#u,e,!0)}#c=D(()=>this.ticketSegments.map(e=>e.preCart));get preCarts(){return d(this.#c)}set preCarts(e){$(this.#c,e)}#d=ae();get timeslotDetails(){return d(this.#d)}set timeslotDetails(e){$(this.#d,e,!0)}addTicketSegment(e){this.ticketSegments.push(e)}get isCalendarVisible(){return!!this.filters?.some(e=>qn(e).isCalendarVisible(this))}get isTimeslotsVisible(){return!!this.filters?.some(e=>qn(e).isTimeslotsVisible(this))}get isTicketsVisible(){return!!this.filters?.some(e=>qn(e).isTicketsVisible(this))}},Vg="go-ticket-selection",i2=$i(Vg),gn=Fi(Vg);function s2(e,t){ne(t,!0);let r=_(t,"when",7),n=_(t,"then",7,"show");const i=gn(t.$$host),s=D(()=>i.value),a=PT(t.$$host),o=D(()=>a.value),l=Ni(t.$$host),c=D(()=>l.value),f=Ri(t.$$host),u=D(()=>f.value),p=S.auth;let h=D(()=>({ticketSelection:d(s),personalizationDetails:d(o),formData:d(c)?.formData,cart:S.cart,cartView:d(u),auth:{isAuthenticated:p.isAuthenticated(),isLoggedIn:p.isLoggedIn(),isGuest:p.isGuest()}}));const g=k=>{$(h,k)},v=()=>d(h);let m=D(()=>z$(r(),d(h))),y=null;ve(()=>{const k=t.$$host;if(d(m)&&n()==="show")y&&(k.appendChild(y),y=null);else if(!y&&k.childNodes.length>0)for(y=document.createDocumentFragment();k.firstChild;)y.appendChild(k.firstChild)});var E={_setData:g,_getData:v,get when(){return r()},set when(k){r(k),b()},get then(){return n()},set then(k="show"){n(k),b()}};return ie(E)}customElements.define("go-if",se(s2,{when:{attribute:"when",reflect:!0,type:"String"},then:{attribute:"then",reflect:!0,type:"String"}},[],["_setData","_getData"]));function jg(e,t){ne(t,!0);let r=_(t,"apiUrl",7),n=_(t,"shopDomain",7),i=_(t,"locale",7);return i(i()||localStorage.getItem("lang")||"en"),ve(()=>{(n()!==S.shopDomain||r()!==S.apiUrl||i()!==S.locale)&&(S.load(r(),n(),i()),console.warn("shop loaded due to prop change"))}),ie({get apiUrl(){return r()},set apiUrl(s){r(s),b()},get shopDomain(){return n()},set shopDomain(s){n(s),b()},get locale(){return i()},set locale(s){i(s),b()}})}customElements.define("gomus-init",se(jg,{apiUrl:{attribute:"api-url",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function a2(e,t){ne(t,!0);let r=_(t,"apiDomain",7),n=_(t,"shopDomain",7),i=_(t,"locale",7),s=`https://${r()}`;var a={get apiDomain(){return r()},set apiDomain(o){r(o),b()},get shopDomain(){return n()},set shopDomain(o){n(o),b()},get locale(){return i()},set locale(o){i(o),b()}};return jg(e,{get apiUrl(){return s},get shopDomain(){return n()},get locale(){return i()}}),ie(a)}customElements.define("go-init",se(a2,{apiDomain:{attribute:"api-domain",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function o2(e,t){ne(t,!0);const r=_(t,"to",7),n=D(()=>Qe.config.urls[r()]),i=Hr(t.$$host,"a");return ve(()=>{if(!d(n)){console.warn(`[go-link] No URL found for route "${r()}".`),i.removeAttribute("href");return}i.setAttribute("href",d(n)())}),i.addEventListener("click",s=>{if(s.preventDefault(),!Qe.config.urls[r()]){console.warn(`[go-link] No URL found for route "${r()}". You can define it with go.config.urls.${r()} = () => 'https://example.com/my-route'`);return}Qe.config.navigateTo(Qe.config.urls[r()]())}),ie({get to(){return r()},set to(s){r(s),b()}})}customElements.define("go-link",se(o2,{to:{attribute:"to",reflect:!0,type:"String"}},[],[]));function l2(e,t){ne(t,!0);let r=_(t,"custom",7,!1);Pt.defineForm({id:"membershipActivation",submitLabel:"membership.activation.actions.submit",fields:[{key:"email",required:!0}]});async function n(i){const s=i.target.details;(await S.activateMembership(s.formData)).response?.ok?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=[S.t("membership.activation.form.errors.requestFailed")]}return Hr(t.$$host,"go-form",{"form-id":"membershipActivation",custom:r()}),t.$$host.addEventListener("submit",n),ie({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-membership-activation",se(l2,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));var u2=class{#e=ae();get token(){return d(this.#e)}set token(e){$(this.#e,e,!0)}constructor(e){this.token=e}get order(){if(this.token)return hl(S.order(this.token))}downloadLink(e,t){if(this.order?.is_valid)switch(e.type){case"Event":return`${S.apiUrl}/api/v4/orders/${this.order.id}/events/${e.attributes.id}.pdf?locale=${S.locale}&token=${this.token}`;case"Ticket":return e.attributes.ticket_type==="annual"&&!e.attributes.is_voucher?Qe.config.urls.annualTicketPersonalizationList?.()?Qe.config.urls.annualTicketPersonalizationList(this.token):S.urls?.annualTicketPersonalizationList(this.token):`${S.apiUrl}/api/v4/orders/${this.order.id}/tickets/${e.attributes.id}.pdf?locale=${S.locale}&token=${this.token}&barcode_id=${t}`;default:break}}},Zg="go-order-details",c2=$i(Zg),Wg=Fi(Zg);function d2(e,t){ne(t,!0);let r=_(t,"token",7);const n=new u2(r());c2(t.$$host,n);let i;ve(()=>{n.token=r();const a=S.cart;!a||i===r()||(i=r(),Re(()=>{a.clearItems(),a.clearCoupons(),S.auth.isGuest()&&S.auth.signOut()}))});var s={orderDetails:n,get token(){return r()},set token(a){r(a),b()}};return ie(s)}customElements.define("go-order",se(d2,{token:{attribute:"token",reflect:!0,type:"String"}},[],["orderDetails"]));var f2=B('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <span class="go-cart-item-time" data-testid="cart-item-time"> </span>',1),h2=B('<br/> <span class="go-order-item-quantities"> </span>',1),p2=B('<a aria-label="iCal link"> </a>'),m2=B('<li><article><ul><li class="go-order-breakdown-count">1</li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!> <!> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li> <li class="go-order-breakdown-ical"><!></li></ul></article></li>');function Hg(e,t){ne(t,!0);let r=_(t,"item",7),n=_(t,"orderDetails",7);var i={get item(){return r()},set item(A){r(A),b()},get orderDetails(){return n()},set orderDetails(A){n(A),b()}},s=m2(),a=M(s),o=M(a),l=V(M(o),2),c=M(l),f=M(c,!0);I(c);var u=V(c,2),p=A=>{var O=f2(),F=U(O),R=M(F,!0);I(F);var Y=V(F,2),N=M(Y,!0);I(Y),J((X,q)=>{H(R,X),H(N,q)},[()=>S.formatDate(r().attributes.start_time,"dayMonth"),()=>S.formatTime(r().attributes.start_time)]),x(A,O)};ue(u,A=>{r().attributes.start_time&&A(p)});var h=V(u,2);Ne(h,17,()=>r().attributes.quantities,A=>A.id,(A,O)=>{var F=h2(),R=V(U(F),2),Y=M(R);I(R),J(()=>H(Y,`${d(O).quantity??""} x ${d(O).title??""}`)),x(A,F)});var g=V(h,2),v=M(g,!0);I(g),I(l);var m=V(l,2),y=M(m,!0);I(m);var E=V(m,4),k=M(E),T=A=>{var O=p2(),F=M(O,!0);I(O),J(R=>{me(O,"href",S.apiUrl+r().attributes.ical_url),H(F,R)},[()=>S.t("common.calendar")]),x(A,O)};return ue(k,A=>{r().attributes.ical_url&&A(T)}),I(E),I(o),I(a),I(s),J((A,O,F)=>{H(f,r().attributes.title),me(g,"href",A),H(v,O),H(y,F)},[()=>n().downloadLink(r()),()=>S.t("common.download"),()=>yt(r().price_cents)]),x(e,s),ie(i)}se(Hg,{item:{},orderDetails:{}},[],[],{mode:"open"});var Gg=B('<span class="go-order-item-subtitle" data-testid="order-item-subtitle"> </span>'),v2=B('<br/> <span class="go-order-item-quantities" data-testid="order-sub-ticket"> </span>',1),g2=B('<span class="go-cart-item-date"> </span> <span class="go-cart-item-time"> </span>',1),y2=B('<span class="go-cart-item-date"> </span>'),b2=B('<!> <br/> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>',1),_2=B('<br/> <a class="go-ticket-personalization"> </a>',1),w2=B('<a aria-label="passbook link"><img alt="apple wallet icon"/></a>'),k2=B('<a aria-label="iCal link"> </a>'),S2=B('<li><article><ul><li class="go-order-breakdown-count"></li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!> <!> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"><!></li> <li class="go-order-breakdown-ical"><!></li></ul></article></li>'),E2=B('<a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>'),T2=B('<a class="go-ticket-personalization"> </a>'),x2=B('<li><article><ul><li class="go-order-breakdown-count"> </li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li></ul></article></li>');function Kg(e,t){ne(t,!0);const r=`https://cdn.shop.platform.gomus.de/apple_wallet_${S.locale}.svg`;let n=_(t,"item",7),i=_(t,"orderDetails",7);const s=D(()=>(n().attributes.sub_ticket_sales??[]).filter(u=>u.quantity>0));var a={get item(){return n()},set item(u){n(u),b()},get orderDetails(){return i()},set orderDetails(u){i(u),b()}},o=re(),l=U(o),c=u=>{var p=re(),h=U(p);Ne(h,17,()=>({length:n().attributes.quantity}),sn,(g,v,m)=>{var y=S2(),E=M(y),k=M(E),T=M(k);T.textContent="1";var A=V(T,2),O=M(A),F=M(O,!0);I(O);var R=V(O,2),Y=Q=>{var P=Gg(),te=M(P,!0);I(P),J(()=>H(te,n().attributes.sub_title)),x(Q,P)};ue(R,Q=>{n().attributes.sub_title&&Q(Y)});var N=V(R,2);Ne(N,17,()=>d(s),Q=>Q.id,(Q,P)=>{var te=v2(),L=V(U(te),2),be=M(L);I(L),J(()=>H(be,`${d(P).quantity??""} x ${d(P).title??""}`)),x(Q,te)});var X=V(N,2),q=Q=>{const P=D(()=>n().attributes.barcodes[m]?.id);var te=b2(),L=U(te),be=we=>{var De=g2(),Le=U(De),je=M(Le,!0);I(Le);var bt=V(Le,2),at=M(bt,!0);I(bt),J((Nt,_t)=>{H(je,Nt),H(at,_t)},[()=>S.formatDate(n().attributes.start_time,"dayMonth"),()=>S.formatTime(n().attributes.start_time)]),x(we,De)},Z=we=>{var De=y2(),Le=M(De,!0);I(De),J(je=>H(Le,je),[()=>S.formatDate(n().attributes.start_time,"dayMonth")]),x(we,De)};ue(L,we=>{n().attributes.ticket_type==="time_slot"?we(be):n().attributes.ticket_type==="normal"&&we(Z,1)});var w=V(L,4),_e=M(w,!0);I(w),J((we,De)=>{me(w,"href",we),H(_e,De)},[()=>i().downloadLink(n(),d(P)),()=>S.t("common.download")]),x(Q,te)},le=Q=>{var P=_2(),te=V(U(P),2),L=M(te,!0);I(te),J((be,Z)=>{me(te,"href",be),H(L,Z)},[()=>i().downloadLink(n()),()=>S.t("common.personalize")]),x(Q,P)};ue(X,Q=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?Q(q):Q(le,-1)}),I(A);var he=V(A,2),j=M(he,!0);I(he);var oe=V(he,2),ee=M(oe),fe=Q=>{var P=w2(),te=M(P);I(P),J(()=>{me(P,"href",S.apiUrl+n().attributes.barcodes[m]?.passbook_url),me(te,"src",r)}),x(Q,P)};ue(ee,Q=>{n().attributes.barcodes[m]&&n().attributes.barcodes[m]?.passbook_url&&Q(fe)}),I(oe);var ce=V(oe,2),de=M(ce),G=Q=>{var P=k2(),te=M(P,!0);I(P),J(L=>{me(P,"href",S.apiUrl+n().attributes.ical_url),H(te,L)},[()=>S.t("common.calendar")]),x(Q,P)};ue(de,Q=>{n().attributes.ical_url&&Q(G)}),I(ce),I(k),I(E),I(y),J(Q=>{H(F,n().attributes.title),H(j,Q)},[()=>yt(n().price_cents)]),x(g,y)}),x(u,p)},f=u=>{var p=x2(),h=M(p),g=M(h),v=M(g),m=M(v,!0);I(v);var y=V(v,2),E=M(y),k=M(E,!0);I(E);var T=V(E,2),A=X=>{var q=Gg(),le=M(q,!0);I(q),J(()=>H(le,n().attributes.sub_title)),x(X,q)};ue(T,X=>{n().attributes.sub_title&&X(A)});var O=V(T,2),F=X=>{var q=E2(),le=M(q,!0);I(q),J((he,j)=>{me(q,"href",he),H(le,j)},[()=>i().downloadLink(n()),()=>S.t("common.download")]),x(X,q)},R=X=>{var q=T2(),le=M(q,!0);I(q),J((he,j)=>{me(q,"href",he),H(le,j)},[()=>i().downloadLink(n()),()=>S.t("common.personalize")]),x(X,q)};ue(O,X=>{n().attributes.is_voucher?X(F):X(R,-1)}),I(y);var Y=V(y,2),N=M(Y,!0);I(Y),Ot(2),I(g),I(h),I(p),J(X=>{H(m,n().attributes.quantity),H(k,n().attributes.title),H(N,X)},[()=>yt(n().price_cents)]),x(u,p)};return ue(l,u=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?u(c):u(f,-1)}),x(e,o),ie(a)}se(Kg,{item:{},orderDetails:{}},[],[],{mode:"open"});var A2=B('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <span class="go-cart-item-time" data-testid="cart-item-time"> </span>',1),C2=B('<br/> <span class="go-order-item-quantities"> </span>',1),O2=B('<a aria-label="iCal link"> </a>'),D2=B('<li><article><ul><li class="go-order-breakdown-count">1</li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <span class="go-order-item-participants" data-testid="order-item-participants"> </span> <!> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li> <li class="go-order-breakdown-ical"><!></li></ul></article></li>');function Yg(e,t){ne(t,!0);let r=_(t,"item",7);const n=D(()=>(r().attributes.prices??[]).filter(A=>A.title&&A.quantity!=null));var i={get item(){return r()},set item(A){r(A),b()}},s=D2(),a=M(s),o=M(a),l=V(M(o),2),c=M(l),f=M(c,!0);I(c);var u=V(c,2),p=M(u,!0);I(u);var h=V(u,2),g=A=>{var O=A2(),F=U(O),R=M(F,!0);I(F);var Y=V(F,2),N=M(Y,!0);I(Y),J((X,q)=>{H(R,X),H(N,q)},[()=>S.formatDate(r().attributes.start_time,"dayMonth"),()=>S.formatTime(r().attributes.start_time)]),x(A,O)};ue(h,A=>{r().attributes.start_time&&A(g)});var v=V(h,2);Ne(v,17,()=>d(n),A=>A.title,(A,O)=>{var F=C2(),R=V(U(F),2),Y=M(R);I(R),J(()=>H(Y,`${d(O).quantity??""} x ${d(O).title??""}`)),x(A,F)}),I(l);var m=V(l,2),y=M(m,!0);I(m);var E=V(m,4),k=M(E),T=A=>{var O=O2(),F=M(O,!0);I(O),J(R=>{me(O,"href",S.apiUrl+r().attributes.ical_url),H(F,R)},[()=>S.t("common.calendar")]),x(A,O)};return ue(k,A=>{r().attributes.ical_url&&A(T)}),I(E),I(o),I(a),I(s),J((A,O)=>{H(f,r().attributes.title),H(p,A),H(y,O)},[()=>S.t("cart.item.participants",{count:r().attributes.participants}),()=>yt(r().price_cents)]),x(e,s),ie(i)}se(Yg,{item:{}},[],[],{mode:"open"});var I2=B('<ol><li class="data-go-order-breakdown-header"><ul><li class="go-order-breakdown-header-count"> </li> <li class="go-order-breakdown-header-product"> </li> <li class="go-order-breakdown-header-price"> </li> <li class="go-order-breakdown-header-passbook"></li></ul></li> <!> <li class="go-order-breakdown-footer"><ul><li class="go-cart-footer-title"></li> <li class="go-cart-footer-count"></li> <li class="go-cart-footer-price"> </li> <li class="go-cart-footer-passbook"></li></ul></li></ol>');function P2(e,t){ne(t,!0);const r=Wg(t.$$host),n=D(()=>r.value);let i=D(()=>d(n)?.order);var s=re(),a=U(s),o=l=>{var c=I2(),f=M(c),u=M(f),p=M(u),h=M(p,!0);I(p);var g=V(p,2),v=M(g,!0);I(g);var m=V(g,2),y=M(m,!0);I(m),Ot(2),I(u),I(f);var E=V(f,2);Ne(E,17,()=>d(i).items,F=>F.id,(F,R)=>{var Y=re(),N=U(Y),X=he=>{Kg(he,{get item(){return d(R)},get orderDetails(){return d(n)}})},q=he=>{Hg(he,{get item(){return d(R)},get orderDetails(){return d(n)}})},le=he=>{Yg(he,{get item(){return d(R)}})};ue(N,he=>{d(R).type==="Ticket"?he(X):d(R).type==="Event"?he(q,1):d(R).type==="Tour"&&he(le,2)}),x(F,Y)});var k=V(E,2),T=M(k),A=V(M(T),4),O=M(A,!0);I(A),Ot(2),I(T),I(k),I(c),J((F,R,Y,N)=>{H(h,F),H(v,R),H(y,Y),H(O,N)},[()=>S.t("common.table.count"),()=>S.t("common.table.product"),()=>S.t("common.table.price"),()=>S.t("common.table.total",{value:yt(d(i).total_price_cents)})]),x(l,c)};ue(a,l=>{d(i)&&d(n)&&l(o)}),x(e,s),ie()}customElements.define("go-order-breakdown",se(P2,{},[],[]));function M2(e,t){ne(t,!0);const r=Wg(t.$$host),n=D(()=>r.value);let i=D(()=>d(n)?.order);Ot();var s=Bt();J(()=>H(s,d(i)?.id)),x(e,s),ie()}customElements.define("go-order-invoice-id",se(M2,{},[],[]));var $2=B("<go-form></go-form>",2);function F2(e,t){ne(t,!1),Pt.defineForm({id:"passwordResetForm",fields:[{key:"currentPassword",required:!0},{key:"password",required:!0},{key:"confirmPassword",required:!0}]});async function r(i){const s=i.target.details,a=await S.updatePassword(s.formData);a.data?(s.successMessage=S.t("user.passwordSuccess.desc.title"),s.apiErrors=[]):s.apiErrors=a.error?.errors||a.error||a.errors}Jl();var n=$2();xn(n,"formId","passwordResetForm"),Ts("submit",n,r),x(e,n),ie()}customElements.define("go-profile-password",se(F2,{},[],[]));var N2=B("<go-form></go-form>",2);function R2(e,t){ne(t,!0),Pt.defineForm({id:"accountDetailsForm",fields:[{key:"salutation",required:!1},{key:"firstName",required:!0},{key:"lastName",required:!0},{key:"email",required:!0},{key:"confirmEmail",required:!0},{key:"language",required:!0}]});let r=ae(void 0);const n=D(()=>S.getCustomer()),i=D(()=>d(n)&&"data"in d(n)?d(n).data:void 0);En(async()=>{await S.waitForAllFetches(),await Ql(()=>d(r).details),await Ql(()=>d(i)),d(r).details.fill(d(i))});var s=N2();xn(s,"formId","accountDetailsForm"),Yl(s,a=>$(r,a),()=>d(r)),x(e,s),ie()}customElements.define("go-profile-details",se(R2,{},[],[]));var L2=B('<div class="go-profile-fullname"> </div> <div class="go-profile-email"> </div>',1);function z2(e,t){ne(t,!0);const r=D(()=>S.getCustomer()),n=D(()=>d(r)&&"data"in d(r)?d(r).data:void 0);var i=re(),s=U(i),a=l=>{var c=L2(),f=U(c),u=M(f);I(f);var p=V(f,2),h=M(p,!0);I(p),J(()=>{H(u,`${d(n).name??""}
85
85
  ${d(n).surname??""}`),H(h,d(n).email)}),x(l,c)},o=l=>{var c=Bt();J(f=>H(c,f),[()=>S.t("user.login.desc.text")]),x(l,c)};ue(s,l=>{d(n)?l(a):l(o,-1)}),x(e,i),ie()}customElements.define("go-profile-overview",se(z2,{},[],[]));function q2(e,t){ne(t,!0);function r(h){if(!h)return;const g=[];for(const v of h.split(",")){const m=v.trim();m&&(Bg.includes(m)?g.push(m):console.warn(`[go-ticket-selection] Unknown filter "${m}". Valid filters: ${Bg.join(", ")}`))}return g.length?g:void 0}let n=_(t,"filters",7),i=_(t,"eventIds",7),s=_(t,"museumIds",7),a=_(t,"exhibitionIds",7),o=_(t,"selectedDate",7),l=_(t,"selectedTimeslot",7),c=_(t,"ticketIds",7),f=_(t,"ticketGroupIds",7);const u=new n2;ve(()=>{t.$$host.hasAttribute("mode")&&console.warn('[go-ticket-selection] `mode` attribute is deprecated and ignored. Use `filters` instead, e.g. filters="ticket:timeslot".')}),ve(()=>{u.filters=r(n()),u.eventIds=on(i()),u.museumIds=on(s()),u.exhibitionIds=on(a()),u.ticketIds=on(c()),u.ticketGroupIds=on(f()),u.selectedTimeslot=l(),o()&&(u.selectedDate=ao(o()))}),ve(()=>{u.selectedDate&&Re(()=>{o(u.selectedDate.toString())})}),ve(()=>{u.selectedTimeslot,Re(()=>{l(u.selectedTimeslot)})}),i2(t.$$host,u);var p={details:u,get filters(){return n()},set filters(h){n(h),b()},get eventIds(){return i()},set eventIds(h){i(h),b()},get museumIds(){return s()},set museumIds(h){s(h),b()},get exhibitionIds(){return a()},set exhibitionIds(h){a(h),b()},get selectedDate(){return o()},set selectedDate(h){o(h),b()},get selectedTimeslot(){return l()},set selectedTimeslot(h){l(h),b()},get ticketIds(){return c()},set ticketIds(h){c(h),b()},get ticketGroupIds(){return f()},set ticketGroupIds(h){f(h),b()}};return ie(p)}customElements.define("go-ticket-selection",se(q2,{filters:{attribute:"filters",reflect:!0,type:"String"},eventIds:{attribute:"event-ids",reflect:!0,type:"String"},ticketIds:{attribute:"ticket-ids",reflect:!0,type:"String"},ticketGroupIds:{attribute:"ticket-group-ids",reflect:!0,type:"String"},museumIds:{attribute:"museum-ids",reflect:!0,type:"String"},exhibitionIds:{attribute:"exhibition-ids",reflect:!0,type:"String"},selectedDate:{attribute:"selected-date",reflect:!0,type:"String"},selectedTimeslot:{attribute:"selected-timeslot",reflect:!0,type:"String"}},[],["details"]));function U2(e,t){ne(t,!0);const r=gn(t.$$host),n=D(()=>r.value);ve(()=>{t.$$host.style.display=d(n)?.isTicketsVisible?"block":"none",t.$$host.classList.toggle("is-hidden",!d(n)?.isTicketsVisible),t.$$host.classList.toggle("is-visible",d(n)?.isTicketsVisible)}),ie()}customElements.define("go-tickets",se(U2,{},[],[]));function B2(e,t){ne(t,!0);const r=gn(t.$$host),n=D(()=>r.value),i=D(()=>qr(d(n)?.preCarts||[],a=>a.items.length)),s=D(()=>!d(n)?.isTicketsVisible||d(n)?.isTicketsVisible&&d(i)===0);ve(()=>{t.$$host.style.display=d(s)?"block":"none",t.$$host.classList.toggle("is-hidden",!d(s)),t.$$host.classList.toggle("is-visible",d(s))}),ie()}customElements.define("go-tickets-empty",se(B2,{},[],[]));function V2(e,t){ne(t,!0);const r=gn(t.$$host),n=D(()=>r.value);let i=D(()=>qr(d(n)?.preCarts||[],a=>a.totalPriceCents));Ot();var s=Bt();J(a=>H(s,a),[()=>yt(d(i))]),x(e,s),ie()}customElements.define("go-tickets-sum",se(V2,{},[],[]));var j2=class{#e;get ticketSelectionDetails(){return d(this.#e)}set ticketSelectionDetails(e){$(this.#e,e)}#t=ae(Me(ei()));get preCart(){return d(this.#t)}set preCart(e){$(this.#t,e,!0)}#r=ae();get filters(){return d(this.#r)}set filters(e){$(this.#r,e,!0)}#n=ae();get dateId(){return d(this.#n)}set dateId(e){$(this.#n,e,!0)}#i=ae();get limit(){return d(this.#i)}set limit(e){$(this.#i,e,!0)}#s=ae();get query(){return d(this.#s)}set query(e){$(this.#s,e,!0)}#o=ae(Me([]));get ticketGroupIds(){return d(this.#o)}set ticketGroupIds(e){$(this.#o,e,!0)}#a=ae(Me([]));get languageIds(){return d(this.#a)}set languageIds(e){$(this.#a,e,!0)}#l=ae(Me([]));get catchWordIds(){return d(this.#l)}set catchWordIds(e){$(this.#l,e,!0)}#u=ae(Me([]));get museumIds(){return d(this.#u)}set museumIds(e){$(this.#u,e,!0)}#c=ae(!1);get withContent(){return d(this.#c)}set withContent(e){$(this.#c,e,!0)}constructor(e,t){this.filters=e===void 0?void 0:Array.isArray(e)?e:[e],this.#e=D(()=>t.value)}get effectiveFilters(){return this.filters?.length?this.filters:this.ticketSelectionDetails?.filters??[]}clear(){this.preCart=ei([])}toString(){return JSON.stringify({filters:this.effectiveFilters,preCart:this.preCart.toString()})}async loadTickets(){this.preCart=ei();const e=this.effectiveFilters.filter(t=>t!=="custom");await Promise.all(e.map(t=>qn(t).loadProducts(this)))}},Jg="go-ticket-segment",Z2=$i(Jg),ed=Fi(Jg);function W2(e,t){ne(t,!0);const r=_(t,"filters",7),n=_(t,"dateId",7),i=_(t,"query",7),s=_(t,"limit",7),a=_(t,"ticketGroupIds",7),o=_(t,"languageIds",7),l=_(t,"catchWordIds",7),c=_(t,"museumIds",7),f=_(t,"withContent",7);function u(y){if(!y)return;const E=y.split(",").map(k=>k.trim()).filter(Boolean);return E.length?E:void 0}const p=gn(t.$$host),h=p.value,g=new j2(u(r()),p);Z2(t.$$host,g),ve(()=>{g.filters=u(r()),g.dateId=n(),g.query=i(),g.limit=s(),g.ticketGroupIds=on(a()),g.languageIds=on(o()),g.catchWordIds=on(l()),g.museumIds=on(c()),g.withContent=!!f()}),ve(()=>{g.dateId,g.filters,g.ticketGroupIds,g.museumIds,g.languageIds,g.catchWordIds,g.query,g.limit,g.withContent,h?.filters,h?.selectedTimeslot,h?.selectedTime,h?.selectedDate,h?.museumIds,Re(()=>{g.loadTickets()})}),ve(()=>{h&&Re(()=>h?.addTicketSegment(g))});const v=D(()=>g.preCart.items.length);ve(()=>{t.$$host.classList.toggle("is-empty",d(v)===0)});var m={details:g,get filters(){return r()},set filters(y){r(y),b()},get dateId(){return n()},set dateId(y){n(y),b()},get query(){return i()},set query(y){i(y),b()},get limit(){return s()},set limit(y){s(y),b()},get ticketGroupIds(){return a()},set ticketGroupIds(y){a(y),b()},get languageIds(){return o()},set languageIds(y){o(y),b()},get catchWordIds(){return l()},set catchWordIds(y){l(y),b()},get museumIds(){return c()},set museumIds(y){c(y),b()},get withContent(){return f()},set withContent(y){f(y),b()}};return ie(m)}customElements.define("go-ticket-segment",se(W2,{catchWordIds:{attribute:"catch-word-ids",reflect:!0,type:"String"},dateId:{attribute:"date-id",reflect:!0,type:"Number"},filters:{attribute:"filters",reflect:!0,type:"String"},languageIds:{attribute:"language-ids",reflect:!0,type:"String"},limit:{attribute:"limit",reflect:!0,type:"Number"},query:{attribute:"query",reflect:!0,type:"String"},ticketGroupIds:{attribute:"ticket-group-ids",reflect:!0,type:"String"},museumIds:{attribute:"museum-ids",reflect:!0,type:"String"},withContent:{attribute:"with-content",reflect:!0,type:"Boolean"}},[],["details"]));function H2(e,t){ne(t,!0);const r=gn(t.$$host).value,n=ed(t.$$host).value,i=D(()=>n?.preCart.items.length),s=D(()=>!r?.isTicketsVisible||r?.isTicketsVisible&&d(i)===0);ve(()=>{t.$$host.style.display=d(s)?"block":"none",t.$$host.classList.toggle("is-hidden",!d(s)),t.$$host.classList.toggle("is-visible",d(s))}),ie()}customElements.define("go-ticket-segment-empty",se(H2,{},[],[]));var G2=B('<span class="go-tickets-item-title-event-title"> </span> <span class="go-tickets-item-title-product-title"> </span>',1),K2=B('<span class="go-tickets-item-subtitle" data-testid="ticket-subtitle"> </span>'),Y2=B('<li class="go-tickets-item-info"><button type="button" data-testid="ticket-info-toggle"></button></li>'),J2=B('<li class="go-ticket-additional-info" data-testid="ticket-additional-info"> </li>'),Q2=B('<ul class="go-sub-tickets" role="list"></ul>'),X2=B('<li><article><ul><li class="go-tickets-item-title"><!> <!></li> <!> <li class="go-tickets-item-description" data-go-tickets-description=""></li> <!> <li class="go-tickets-item-price" data-go-tickets-price=""> </li> <li class="go-tickets-item-quality" data-go-tickets-quality=""><!></li></ul></article> <!></li>');function Qg(e,t){const r=mt();ne(t,!0);const n=k=>{var T=G2(),A=U(T),O=M(A);I(A);var F=V(A,2),R=M(F,!0);I(F),J(Y=>{H(O,`${s().product.event_title??""} - ${Y??""}`),H(R,s().product.title)},[()=>S.formatTime(s().time)]),x(k,T)},i=k=>{Ot();var T=Bt();J(()=>H(T,s().product.title)),x(k,T)};let s=_(t,"item",7),a=_(t,"details",7),o=ae(void 0),l=ae(Me({}));const c=D(()=>Vr(s().product)?s().product:null);let f=ae(!1);const u=D(()=>s().product?.content?.reduction_reason),p=`go-ticket-info-${r}`;ve(()=>{a().preCart.items.map(k=>k.quantity),a().preCart.items.forEach(k=>k.mantle&&Object.values(k.mantle.composition)),S.cart?.items.map(k=>k.quantity),S.cart?.items.forEach(k=>k.mantle&&Object.values(k.mantle.composition)),Re(()=>{$(o,S.capacityManager.capacity(S.cart,s(),a().preCart),!0),$(l,S.capacityManager.subTicketMaxes(S.cart,s(),a().preCart),!0)})});function h(k,T){s().mantle&&(s().mantle.composition[k]=T)}let g=i;js(s().product)&&(g=n);var v={get item(){return s()},set item(k){s(k),b()},get details(){return a()},set details(k){a(k),b()}},m=re(),y=U(m),E=k=>{var T=X2(),A=M(T),O=M(A),F=M(O),R=M(F);g(R);var Y=V(R,2),N=Q=>{var P=K2(),te=M(P,!0);I(P),J(()=>H(te,s().product.sub_title)),x(Q,P)};ue(Y,Q=>{s().product.sub_title&&Q(N)}),I(F);var X=V(F,2),q=Q=>{var P=Y2(),te=M(P);I(P),J(L=>{St(te,1,dr(["go-ticket-info-icon",d(f)&&"is-active"])),me(te,"aria-expanded",d(f)),me(te,"aria-controls",p),me(te,"aria-label",L)},[()=>S.t("ticket.list.additionalInfo")]),pt("click",te,()=>$(f,!d(f))),x(Q,P)};ue(X,Q=>{d(u)&&Q(q)});var le=V(X,2);Ef(le,()=>hm.sanitize(s().product.description),!0),I(le);var he=V(le,2),j=Q=>{var P=J2(),te=M(P,!0);I(P),J(L=>{me(P,"id",p),me(P,"hidden",!d(f)),H(te,L)},[()=>S.t(d(u))]),x(Q,P)};ue(he,Q=>{d(u)&&Q(j)});var oe=V(he,2),ee=M(oe,!0);I(oe);var fe=V(oe,2),ce=M(fe);{let Q=D(()=>pm(s(),S.locale));mo(ce,{get value(){return s().quantity},get min(){return d(o).min},get max(){return d(o).max},get label(){return d(Q)},onChange:P=>s().quantity=P})}I(fe),I(O),I(A);var de=V(A,2),G=Q=>{var P=Q2();Ne(P,21,()=>qs(d(c)),te=>te.id,(te,L)=>{{let be=D(()=>s().mantle?.composition?.[d(L).id]??0);ju(te,{get sub(){return d(L)},get quantity(){return d(be)},get max(){return d(l)[d(L).id]},onChange:Z=>h(d(L).id,Z)})}}),I(P),J(()=>me(P,"aria-label",d(c).title)),x(Q,P)};ue(de,Q=>{d(c)&&s().quantity>0&&Q(G)}),I(T),J(()=>{St(A,1,dr(["go-tickets-item",d(o).bookedOut&&"is-booked-out"])),me(A,"data-testid",s().uuid),H(ee,s().price_formatted)}),x(k,T)};return ue(y,k=>{d(o)&&!d(o).unavailable&&k(E)}),x(e,m),ie(v)}cr(["click"]),se(Qg,{item:{},details:{}},[],[],{mode:"open"});var eF=B('<ol class="go-tickets" data-testid="tickets"><li class="go-tickets-header" data-go-tickets-header="" data-testid="tickets-header"><ul><li class="go-tickets-header-title" data-go-tickets-title=""> </li> <li class="go-tickets-header-description" data-go-tickets-description=""> </li> <li class="go-tickets-header-price" data-go-tickets-price=""> </li> <li class="go-tickets-header-quality" data-go-tickets-quality=""> </li></ul></li> <!></ol>');function tF(e,t){ne(t,!0);const r=ed(t.$$host),n=D(()=>r.value),i=D(()=>d(n)?.preCart?.items.length&&d(n)?.preCart?.items.length>0);var s=re(),a=U(s),o=l=>{var c=eF(),f=M(c),u=M(f),p=M(u),h=M(p,!0);I(p);var g=V(p,2),v=M(g,!0);I(g);var m=V(g,2),y=M(m,!0);I(m);var E=V(m,2),k=M(E,!0);I(E),I(u),I(f);var T=V(f,2);Ne(T,17,()=>d(n).preCart.items,A=>A.uuid,(A,O)=>{Qg(A,{get item(){return d(O)},get details(){return d(n)}})}),I(c),J((A,O,F,R)=>{H(h,A),H(v,O),H(y,F),H(k,R)},[()=>S.t("product.detail.table.title"),()=>S.t("product.detail.table.desc"),()=>S.t("product.detail.table.price"),()=>S.t("product.detail.table.quantity")]),x(l,c)};ue(a,l=>{d(i)&&d(n)&&l(o)}),x(e,s),ie()}customElements.define("go-ticket-segment-body",se(tF,{},[],[]));function rF(e,t){ne(t,!0);const r=ed(t.$$host),n=D(()=>r.value);Ot();var i=Bt();J(()=>H(i,d(n)?.preCart.totalFormatted)),x(e,i),ie()}customElements.define("go-ticket-segment-sum",se(rF,{},[],[]));var nF=class{#e;get tsd(){return d(this.#e)}set tsd(e){$(this.#e,e)}#t=ae(Me([]));get timeslots(){return d(this.#t)}set timeslots(e){$(this.#t,e,!0)}constructor(e){e&&(this.#e=D(()=>e.value),this.tsd&&(this.tsd.timeslotDetails=this))}get boockedOutCount(){return this.timeslots.filter(e=>e.capacity==0).length}recalculateCapacities(){const e=this.tsd?.selectedDate;if(!e){this.timeslots=[];return}const t=S.capacityManager.quotaManager;t.clearPrecart();for(const r of S.cart?.items??[]){const n=r.product;oo(n)&&t.setPrecartItemQuantity(n.id,r.quantity??0)}this.timeslots=t.timeslotsOn(e,this.tsd?.timeslotTicketIds).map(r=>({...r,startAt:r.timeSlot,timeFormatted:S.formatTime(r.timeSlot),available:r.capacity>0}))}},iF=B('<li><label> <input type="radio" name="timeslot"/></label></li>'),sF=B('<ul data-testid="timeslots"></ul>');function aF(e,t){ne(t,!0);const r=[],n=new nF(gn(t.$$host));ve(()=>{const f=n.tsd;if(!f)return;const u=f.filters,p=f.selectedDate;Re(async()=>{f.timeslotTicketIds=[],u?.length&&p&&await Promise.all(u.map(h=>qn(h).loadTimeslots(f))),n.recalculateCapacities()})}),ve(()=>{S.cart?.items.map(f=>f.quantity),Re(()=>n.recalculateCapacities())});const i=(f,u)=>{!f||!("dispatchEvent"in f)||f.dispatchEvent(new CustomEvent("go-timeslot-select",{detail:{selected:u},bubbles:!0,composed:!0}))},s=f=>{i(f.target,n.tsd?.selectedTimeslot)};ve(()=>{const f=n.tsd;if(!f)return;const u=n.timeslots;if(u.length!==1)return;const p=u[0];p.available&&f.selectedTimeslot!==p.startAt&&(f.selectedTimeslot=p.startAt,i(t.$$host,p.startAt))});var a={details:n},o=re(),l=U(o),c=f=>{var u=sF();Ne(u,20,()=>n.timeslots,p=>p,(p,h)=>{const g=D(()=>h.totalCapacity===0),v=D(()=>!d(g)&&h.capacity===0),m=D(()=>d(g)||d(v)||!h.available),y=D(()=>n.tsd?.selectedTimeslot===h.startAt);var E=iF(),k=M(E),T=M(k),A=V(T);Is(A);var O;I(k),I(E),J(()=>{St(E,1,dr({"go-timeslot":!0,"is-unavailable":d(g),"is-sold-out":d(v),"is-disabled":d(m),"is-selected":d(y)})),H(T,`${h.timeFormatted??""} `),A.disabled=d(m),me(A,"aria-disabled",d(m)),O!==(O=h.startAt)&&(A.value=(A.__value=h.startAt)??"")}),pt("change",A,s),V_(r,[],A,()=>(h.startAt,n.tsd.selectedTimeslot),F=>n.tsd.selectedTimeslot=F),x(p,E)}),I(u),x(f,u)};return ue(l,f=>{n.tsd?.isTimeslotsVisible&&f(c)}),x(e,o),ie(a)}cr(["change"]),customElements.define("go-timeslots",se(aF,{},[],["details"]));function oF(e){return typeof e=="string"?`'${e}'`:e==null?String(e):uw(e)?"a Promise — the callback must be synchronous":`a ${typeof e}`}var lF=class{#e=ae();get details(){return d(this.#e)}set details(e){$(this.#e,e,!0)}#t=ae(Me(Ii(Xt())));get startAt(){return d(this.#t)}set startAt(e){$(this.#t,e,!0)}#r=ae(void 0);get selected(){return d(this.#r)}set selected(e){$(this.#r,e,!0)}#n=ae();get availabilityOverride(){return d(this.#n)}set availabilityOverride(e){$(this.#n,e,!0)}#i=[];get endpoint(){return(this.details?.filters?.map(e=>qn(e).calendarEndpoint).filter(Boolean)??[])[0]??null}get dates(){if(this.details)switch(this.endpoint){case"tickets":return this.ticketsDates();case"events":return this.eventsDates();default:return}}defaultAvailability(e){switch(this.dates?.[e.toString()]){case"unavailable":return"unavailable";case"fully_booked":return"sold_out";default:return"available"}}availability(e){const t=this.defaultAvailability(e),r=this.#s();if(!r)return t;let n;try{n=r(e.toString(),t)}catch(i){return this.#o("threw",`[go-calendar] the availability-override callback threw (${String(i)}) — using the gomus default instead.`),t}return n==="pass_through"?t:n==="available"||n==="sold_out"||n==="unavailable"?n:(this.#o("returned",`[go-calendar] the availability-override callback must return 'available', 'sold_out', 'unavailable' or 'pass_through', got ${oF(n)} — using the gomus default instead.`),t)}#s(){const e=this.availabilityOverride;if(typeof e=="function")return e;if(!e)return;const t=globalThis[e];if(typeof t=="function")return t;this.#o(`unresolved:${e}`,`[go-calendar] availability-override="${e}" does not resolve to a function on window — using the gomus defaults.`,console.warn)}#o(e,t,r=console.error){this.#i.includes(e)||(this.#i.push(e),r(t))}isDateDisabled(e){return e.compare(Ii(Xt()))<0||this.availability(e)==="unavailable"}isDateUnavailable(e){return this.availability(e)==="sold_out"}get apiFilters(){return this.details?.filters?.map(e=>qn(e).apiToken).filter(Boolean)}params(e){return this.details?{by_bookable:!0,"by_ticket_types[]":this.apiFilters,"by_ticket_ids[]":this.details.ticketIds,"by_ticket_group_ids[]":this.details.ticketGroupIds,"by_museum_ids[]":this.details.museumIds,"by_exhibition_ids[]":this.details.exhibitionIds,"by_event_ids[]":this.details.eventIds,depth:"availability_status",start_at:e.toString(),end_at:e.add({months:1}).toString()}:{}}fetchPeriod(){const e=this.startAt.set({day:1});return[e.subtract({months:1}),e,e.add({months:1}),e.add({months:2})]}#a(e){return this.fetchPeriod().reduce((t,r)=>Object.assign(t,e(this.params(r))),{})}eventsDates(){return this.#a(e=>S.calendar(e))}ticketsDates(){return this.#a(e=>S.ticketsCalendar(e))}},uF=B("<!> <!> <!>",1),cF=B("<div> </div>"),Xg=B("<!> <!>",1),dF=B('<div data-calendar-wrapper=""><!></div>');function ey(e,t){ne(t,!0);let r=_(t,"calendarClass",7),n=ae(void 0);const i=r();ve(()=>{d(n)?.dispatchEvent(new CustomEvent("go-date-select",{detail:{selected:r().selected},bubbles:!0}))});var s={details:i,get calendarClass(){return r()},set calendarClass(l){r(l),b()}},a=dF(),o=M(a);{const l=(c,f)=>{let u=()=>f?.().months,p=()=>f?.().weekdays;var h=Xg(),g=U(h);$e(g,()=>gc,(m,y)=>{y(m,{children:(E,k)=>{var T=uF(),A=U(T);$e(A,()=>_c,(R,Y)=>{Y(R,{class:"go-calendar-prev-button",children:(N,X)=>{Ot();var q=Bt("Prev");x(N,q)},$$slots:{default:!0}})});var O=V(A,2);$e(O,()=>yc,(R,Y)=>{Y(R,{class:"go-calendar-heading"})});var F=V(O,2);$e(F,()=>bc,(R,Y)=>{Y(R,{class:"go-calendar-next-button",children:(N,X)=>{Ot();var q=Bt("Next");x(N,q)},$$slots:{default:!0}})}),x(E,T)},$$slots:{default:!0}})});var v=V(g,2);Ne(v,17,u,sn,(m,y)=>{var E=re(),k=U(E);$e(k,()=>fc,(T,A)=>{A(T,{class:"go-calendar-grid",children:(O,F)=>{var R=Xg(),Y=U(R);$e(Y,()=>mc,(X,q)=>{q(X,{class:"go-calendar-grid-head",children:(le,he)=>{var j=re(),oe=U(j);$e(oe,()=>aa,(ee,fe)=>{fe(ee,{class:"go-calendar-grid-row",children:(ce,de)=>{var G=re(),Q=U(G);Ne(Q,17,p,sn,(P,te,L,be)=>{var Z=re(),w=U(Z);$e(w,()=>vc,(_e,we)=>{we(_e,{children:(De,Le)=>{var je=cF(),bt=M(je,!0);I(je),J(at=>H(bt,at),[()=>d(te).slice(0,2)]),x(De,je)},$$slots:{default:!0}})}),x(P,Z)}),x(ce,G)},$$slots:{default:!0}})}),x(le,j)},$$slots:{default:!0}})});var N=V(Y,2);$e(N,()=>hc,(X,q)=>{q(X,{class:"go-calendar-grid-body",children:(le,he)=>{var j=re(),oe=U(j);Ne(oe,17,()=>d(y).weeks,sn,(ee,fe,ce,de)=>{var G=re(),Q=U(G);$e(Q,()=>aa,(P,te)=>{te(P,{class:"go-calendar-grid-row",children:(L,be)=>{var Z=re(),w=U(Z);Ne(w,17,()=>d(fe),sn,(_e,we,De,Le)=>{var je=re(),bt=U(je);$e(bt,()=>pc,(at,Nt)=>{Nt(at,{get date(){return d(we)},get month(){return d(y).value},class:"go-calendar-cell",children:(_t,Rt)=>{var nr=re(),Ht=U(nr);{let vr=D(()=>({"go-calendar-day":!0,"is-unavailable":r().isDateUnavailable(d(we)),"is-disabled":r().isDateDisabled(d(we)),"is-selected":r().selected?.compare(d(we))===0}));$e(Ht,()=>dc,(Ir,Pr)=>{Pr(Ir,{get class(){return d(vr)},children:(yn,Mr)=>{Ot();var gr=Bt();J(()=>H(gr,d(we).day)),x(yn,gr)},$$slots:{default:!0}})})}x(_t,nr)},$$slots:{default:!0}})}),x(_e,je)}),x(L,Z)},$$slots:{default:!0}})}),x(ee,G)}),x(le,j)},$$slots:{default:!0}})}),x(O,R)},$$slots:{default:!0}})}),x(m,E)}),x(c,h)};$e(o,()=>Ov,(c,f)=>{f(c,{weekdayFormat:"long",fixedWeeks:!0,preventDeselect:!0,type:"single",get locale(){return S.locale},isDateDisabled:u=>r().isDateDisabled(u),isDateUnavailable:u=>r().isDateUnavailable(u),disableDaysOutsideMonth:!1,class:"go-calendar-root",get value(){return r().selected},set value(u){r().selected=u},get placeholder(){return r().startAt},set placeholder(u){r().startAt=u},children:l,$$slots:{default:!0}})})}return I(a),Yl(a,l=>$(n,l),()=>d(n)),x(e,a),ie(s)}se(ey,{calendarClass:{}},[],["details"],{mode:"open"});function fF(e,t){ne(t,!0);let r=_(t,"availabilityOverride",7);const n=new lF,i=n,s=gn(t.$$host),a=D(()=>s.value);ve(()=>{n.details=d(a),n.availabilityOverride=r()}),t.$$host.addEventListener("go-date-select",u=>{d(a)&&(d(a).selectedDate=u.detail.selected,d(a).selectedTimeslot=void 0)});var o={details:i,get availabilityOverride(){return r()},set availabilityOverride(u){r(u),b()}},l=re(),c=U(l),f=u=>{ey(u,{get calendarClass(){return n}})};return ue(c,u=>{d(a)?.isCalendarVisible&&u(f)}),x(e,l),ie(o)}customElements.define("go-calendar",se(fF,{availabilityOverride:{attribute:"availability-override",type:"String"}},[],["details"]));var hF=class{#e;get ticketSelectionDetails(){return d(this.#e)}set ticketSelectionDetails(e){$(this.#e,e)}constructor(e){e&&(this.#e=D(()=>e.value))}addToCart(){if(!S.cart){console.error("cart not found");return}if(!this.ticketSelectionDetails){console.error("ticket selection details not found");return}const e=this.ticketSelectionDetails.preCarts,t=e.flatMap(r=>r.nonEmptyItems.map(n=>{const i=n.product.ticket_type!="annual"?n.time:void 0;return rt(n.product,{quantity:n.quantity,time:i,mantle:n.mantle&&{composition:{...n.mantle.composition}}})}));S.cart.addItems(t),e.forEach(r=>r.items.forEach(n=>n.quantity=0)),Qe.config.urls.cart&&Qe.config.navigateTo(Qe.config.urls.cart())}anyTicketsSelected(){return this.ticketSelectionDetails?this.ticketSelectionDetails.preCarts.some(e=>e.items.some(t=>t.quantity>0)):!1}},pF=B('<button data-add-to-cart-button="" data-testid="go-add-to-cart-button__button"> </button>');function mF(e,t){ne(t,!0);const r=new hF(gn(t.$$host));var n={details:r},i=pF(),s=M(i,!0);return I(i),J((a,o,l)=>{i.disabled=a,me(i,"data-x",o),H(s,l)},[()=>!r.anyTicketsSelected(),()=>!r.anyTicketsSelected(),()=>S.t("common.actions.cart")]),pt("click",i,()=>r.addToCart()),x(e,i),ie(n)}cr(["click"]),customElements.define("go-add-to-cart-button",se(mF,{},[],["details"]));function vF(e,t){ne(t,!0);let r=_(t,"custom",7,!1);Pt.defineForm({id:"withdrawal",submitLabel:"withdrawal.actions.submit",fields:[{key:"withdrawalFirstName",required:!0},{key:"withdrawalLastName",required:!0},{key:"email",required:!0},{key:"orderNumber",required:!0},{key:"withdrawalNote",required:!1}]});async function n(i){const s=i.target.details,a=await S.withdrawal(s.formData);a.response?.ok?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=a.error?.errors??[S.t("withdrawal.form.errors.requestFailed")]}return Hr(t.$$host,"go-form",{"form-id":"withdrawal",custom:r()}),t.$$host.addEventListener("submit",n),ie({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-withdrawal-form",se(vF,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));async function gF({filter:e,...t}){if(!S.cart)throw new Error("(go.cart.addItem) shop not initialized — call go.init first");const r=qn(e);if(!r?.addToCart)throw new Error(`(go.cart.addItem) filter '${e}' cannot add to the cart`);return r.addToCart(t)}var ca=null;async function da(){if(ca)return ca;if(!S.client)throw new Error("[go] Shop not initialized — call go.init({ shop, api, locale }) first.")}var yF=e=>e.split(".").reduce((t,r)=>t?.[r],ty);async function bF(e){const t=e.go;let r=t&&t._queue||[];t&&t._queue&&!t.cart&&console.warn("(go) the pasted go snippet predates go.cart — cart calls cannot be queued before load. Update the snippet or gate on window.go.loaded.");for(const n of r)if(n.method!=="load")try{const i=yF(n.method);if(typeof i!="function")throw new Error(`(go) unknown command: ${n.method}`);await i(n.options)}catch(i){console.error(i)}e.go=ty,t&&(t._queue=null)}var ty={loaded:!0,config:e=>{Qe.define(e)},init:async e=>{try{ca=S.load("https://"+e.api,e.shop,e.locale),await ca}catch(t){throw ca=null,t}},api:{getCustomer:async()=>(await da(),S.asyncFetch(()=>S.getCustomer())),getOrders:async e=>(await da(),S.asyncFetch(()=>S.getOrders(e))),getCustomerAddresses:async()=>(await da(),S.asyncFetch(()=>S.getCustomerAddresses())),getCustomerMemberships:async()=>(await da(),S.asyncFetch(()=>S.getCustomerMemberships()))},cart:{addItem:async e=>(await da(),gF(e))}};(async()=>await bF(window))()})();
@@ -25871,7 +25871,7 @@ function e2(e, t) {
25871
25871
  n.token = r();
25872
25872
  const a = S.cart;
25873
25873
  !a || i === r() || (i = r(), ze(() => {
25874
- a.clearItems(), S.auth.isGuest() && S.auth.signOut();
25874
+ a.clearItems(), a.clearCoupons(), S.auth.isGuest() && S.auth.signOut();
25875
25875
  }));
25876
25876
  });
25877
25877
  var s = {
@@ -1,4 +1,7 @@
1
+ import { CouponItem } from '../../lib/models/cart/types.ts';
1
2
  import { CouponIndex } from '@gomus/types';
2
3
  export declare class CouponFactories {
3
4
  static value(overrides?: Partial<CouponIndex>): CouponIndex;
5
+ static valueVoucher(overrides?: Partial<CouponItem>): CouponItem;
6
+ static actionToken(overrides?: Partial<CouponItem>): CouponItem;
4
7
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "Giantmonkey GmbH"
5
5
  },
6
6
  "license": "MIT",
7
- "version": "4.14.3",
7
+ "version": "4.14.4",
8
8
  "type": "module",
9
9
  "main": "./dist-js/gomus-webcomponents.iife.js",
10
10
  "module": "./dist-js/gomus-webcomponents.iife.js",