{"version":3,"file":"application-Cl_OP-2M.js","sources":["../../../node_modules/@lit/reactive-element/css-tag.js","../../../node_modules/@lit/reactive-element/reactive-element.js","../../../node_modules/lit-html/lit-html.js","../../../node_modules/lit-element/lit-element.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.TUVJKY7S.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.EACLXYYC.js","../../../node_modules/@shoelace-style/localize/dist/index.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MAS2SHYD.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.WLV3FVBR.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.IFDWM6P4.js","../../../node_modules/@lit/reactive-element/decorators/property.js","../../../node_modules/@lit/reactive-element/decorators/state.js","../../../node_modules/@lit/reactive-element/decorators/base.js","../../../node_modules/@lit/reactive-element/decorators/query.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.U5X52PUD.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.XYU7AT6Q.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.DL5222VR.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MGOBPGE5.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.NYIIDP5N.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.3Y6SB6QS.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.P7ZG6EMR.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.3TFKS637.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.ZL53POKZ.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.LMJPQPQT.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.2FB5TK5H.js","../../../node_modules/lit-html/directive-helpers.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.Y62EZWMI.js","../../../node_modules/lit-html/directive.js","../../../node_modules/lit-html/directives/class-map.js","../../../node_modules/lit-html/static.js","../../../node_modules/lit-html/directives/if-defined.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.H5IWQ6LD.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5IKI4445.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.DQI3IAOX.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.6TAW3KGE.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.O6IUBC6G.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.LXDTFLWU.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.FLAQ2JUH.js","../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","../../../node_modules/@floating-ui/core/dist/floating-ui.core.mjs","../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs","../../../node_modules/composed-offset-position/dist/composed-offset-position.browser.min.mjs","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.IL7MSTH2.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.DHU6MIVB.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.B4BZKR24.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.LHI6QEL2.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.KGOQDXKU.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.T777MG7M.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.UFXVBO2X.js","../../../node_modules/lit-html/async-directive.js","../../../node_modules/lit-html/directives/ref.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.GZKJ6PRL.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.XAMCA7DC.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.OY23NLVG.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.Z75LPS3C.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.IHZX6HZH.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.VTJHQTFJ.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.LTNP3XQR.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.KMHZYCWU.js","../../../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.YXUIOLC7.js","../../../app/javascript/plugins/shoelace.js","../../../node_modules/@vue/shared/dist/shared.esm-bundler.js","../../../node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js","../../../node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js","../../../node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js","../../../node_modules/pinia/node_modules/vue-demi/lib/index.mjs","../../../node_modules/pinia/dist/pinia.mjs","../../../app/javascript/directives/longpress.js","../../../app/javascript/App.vue","../../../node_modules/vue-router/dist/vue-router.mjs","../../../node_modules/@microsoft/fetch-event-source/lib/esm/parse.js","../../../node_modules/@microsoft/fetch-event-source/lib/esm/fetch.js","../../../node_modules/lodash/_listCacheClear.js","../../../node_modules/lodash/eq.js","../../../node_modules/lodash/_assocIndexOf.js","../../../node_modules/lodash/_listCacheDelete.js","../../../node_modules/lodash/_listCacheGet.js","../../../node_modules/lodash/_listCacheHas.js","../../../node_modules/lodash/_listCacheSet.js","../../../node_modules/lodash/_ListCache.js","../../../node_modules/lodash/_stackClear.js","../../../node_modules/lodash/_stackDelete.js","../../../node_modules/lodash/_stackGet.js","../../../node_modules/lodash/_stackHas.js","../../../node_modules/lodash/_freeGlobal.js","../../../node_modules/lodash/_root.js","../../../node_modules/lodash/_Symbol.js","../../../node_modules/lodash/_getRawTag.js","../../../node_modules/lodash/_objectToString.js","../../../node_modules/lodash/_baseGetTag.js","../../../node_modules/lodash/isObject.js","../../../node_modules/lodash/isFunction.js","../../../node_modules/lodash/_coreJsData.js","../../../node_modules/lodash/_isMasked.js","../../../node_modules/lodash/_toSource.js","../../../node_modules/lodash/_baseIsNative.js","../../../node_modules/lodash/_getValue.js","../../../node_modules/lodash/_getNative.js","../../../node_modules/lodash/_Map.js","../../../node_modules/lodash/_nativeCreate.js","../../../node_modules/lodash/_hashClear.js","../../../node_modules/lodash/_hashDelete.js","../../../node_modules/lodash/_hashGet.js","../../../node_modules/lodash/_hashHas.js","../../../node_modules/lodash/_hashSet.js","../../../node_modules/lodash/_Hash.js","../../../node_modules/lodash/_mapCacheClear.js","../../../node_modules/lodash/_isKeyable.js","../../../node_modules/lodash/_getMapData.js","../../../node_modules/lodash/_mapCacheDelete.js","../../../node_modules/lodash/_mapCacheGet.js","../../../node_modules/lodash/_mapCacheHas.js","../../../node_modules/lodash/_mapCacheSet.js","../../../node_modules/lodash/_MapCache.js","../../../node_modules/lodash/_stackSet.js","../../../node_modules/lodash/_Stack.js","../../../node_modules/lodash/_arrayEach.js","../../../node_modules/lodash/_defineProperty.js","../../../node_modules/lodash/_baseAssignValue.js","../../../node_modules/lodash/_assignValue.js","../../../node_modules/lodash/_copyObject.js","../../../node_modules/lodash/_baseTimes.js","../../../node_modules/lodash/isObjectLike.js","../../../node_modules/lodash/_baseIsArguments.js","../../../node_modules/lodash/isArguments.js","../../../node_modules/lodash/isArray.js","../../../node_modules/lodash/stubFalse.js","../../../node_modules/lodash/isBuffer.js","../../../node_modules/lodash/_isIndex.js","../../../node_modules/lodash/isLength.js","../../../node_modules/lodash/_baseIsTypedArray.js","../../../node_modules/lodash/_baseUnary.js","../../../node_modules/lodash/_nodeUtil.js","../../../node_modules/lodash/isTypedArray.js","../../../node_modules/lodash/_arrayLikeKeys.js","../../../node_modules/lodash/_isPrototype.js","../../../node_modules/lodash/_overArg.js","../../../node_modules/lodash/_nativeKeys.js","../../../node_modules/lodash/_baseKeys.js","../../../node_modules/lodash/isArrayLike.js","../../../node_modules/lodash/keys.js","../../../node_modules/lodash/_baseAssign.js","../../../node_modules/lodash/_nativeKeysIn.js","../../../node_modules/lodash/_baseKeysIn.js","../../../node_modules/lodash/keysIn.js","../../../node_modules/lodash/_baseAssignIn.js","../../../node_modules/lodash/_cloneBuffer.js","../../../node_modules/lodash/_copyArray.js","../../../node_modules/lodash/_arrayFilter.js","../../../node_modules/lodash/stubArray.js","../../../node_modules/lodash/_getSymbols.js","../../../node_modules/lodash/_copySymbols.js","../../../node_modules/lodash/_arrayPush.js","../../../node_modules/lodash/_getPrototype.js","../../../node_modules/lodash/_getSymbolsIn.js","../../../node_modules/lodash/_copySymbolsIn.js","../../../node_modules/lodash/_baseGetAllKeys.js","../../../node_modules/lodash/_getAllKeys.js","../../../node_modules/lodash/_getAllKeysIn.js","../../../node_modules/lodash/_DataView.js","../../../node_modules/lodash/_Promise.js","../../../node_modules/lodash/_Set.js","../../../node_modules/lodash/_WeakMap.js","../../../node_modules/lodash/_getTag.js","../../../node_modules/lodash/_initCloneArray.js","../../../node_modules/lodash/_Uint8Array.js","../../../node_modules/lodash/_cloneArrayBuffer.js","../../../node_modules/lodash/_cloneDataView.js","../../../node_modules/lodash/_cloneRegExp.js","../../../node_modules/lodash/_cloneSymbol.js","../../../node_modules/lodash/_cloneTypedArray.js","../../../node_modules/lodash/_initCloneByTag.js","../../../node_modules/lodash/_baseCreate.js","../../../node_modules/lodash/_initCloneObject.js","../../../node_modules/lodash/_baseIsMap.js","../../../node_modules/lodash/isMap.js","../../../node_modules/lodash/_baseIsSet.js","../../../node_modules/lodash/isSet.js","../../../node_modules/lodash/_baseClone.js","../../../node_modules/lodash/cloneDeep.js","../../../node_modules/uuid/dist/esm-browser/rng.js","../../../node_modules/uuid/dist/esm-browser/stringify.js","../../../node_modules/uuid/dist/esm-browser/native.js","../../../node_modules/uuid/dist/esm-browser/v4.js","../../../node_modules/mobile-device-detect/dist/index.js","../../../app/javascript/stores/chatStore.js","../../../node_modules/dompurify/dist/purify.es.mjs","../../../node_modules/highlight.js/lib/core.js","../../../node_modules/highlight.js/lib/languages/xml.js","../../../node_modules/highlight.js/lib/languages/bash.js","../../../node_modules/highlight.js/lib/languages/c.js","../../../node_modules/highlight.js/lib/languages/cpp.js","../../../node_modules/highlight.js/lib/languages/csharp.js","../../../node_modules/highlight.js/lib/languages/css.js","../../../node_modules/highlight.js/lib/languages/markdown.js","../../../node_modules/highlight.js/lib/languages/diff.js","../../../node_modules/highlight.js/lib/languages/ruby.js","../../../node_modules/highlight.js/lib/languages/go.js","../../../node_modules/highlight.js/lib/languages/graphql.js","../../../node_modules/highlight.js/lib/languages/ini.js","../../../node_modules/highlight.js/lib/languages/java.js","../../../node_modules/highlight.js/lib/languages/javascript.js","../../../node_modules/highlight.js/lib/languages/json.js","../../../node_modules/highlight.js/lib/languages/kotlin.js","../../../node_modules/highlight.js/lib/languages/less.js","../../../node_modules/highlight.js/lib/languages/lua.js","../../../node_modules/highlight.js/lib/languages/makefile.js","../../../node_modules/highlight.js/lib/languages/perl.js","../../../node_modules/highlight.js/lib/languages/objectivec.js","../../../node_modules/highlight.js/lib/languages/php.js","../../../node_modules/highlight.js/lib/languages/php-template.js","../../../node_modules/highlight.js/lib/languages/plaintext.js","../../../node_modules/highlight.js/lib/languages/python.js","../../../node_modules/highlight.js/lib/languages/python-repl.js","../../../node_modules/highlight.js/lib/languages/r.js","../../../node_modules/highlight.js/lib/languages/rust.js","../../../node_modules/highlight.js/lib/languages/scss.js","../../../node_modules/highlight.js/lib/languages/shell.js","../../../node_modules/highlight.js/lib/languages/sql.js","../../../node_modules/highlight.js/lib/languages/swift.js","../../../node_modules/highlight.js/lib/languages/yaml.js","../../../node_modules/highlight.js/lib/languages/typescript.js","../../../node_modules/highlight.js/lib/languages/vbnet.js","../../../node_modules/highlight.js/lib/languages/wasm.js","../../../node_modules/highlight.js/lib/common.js","../../../node_modules/marked/lib/marked.esm.js","../../../node_modules/marked-highlight/src/index.js","../../../node_modules/katex/dist/katex.mjs","../../../node_modules/marked-katex-extension/src/index.js","../../../app/javascript/utils/text.js","../../../app/javascript/utils/markdown.js","../../../app/javascript/utils/clipboard.js","../../../app/javascript/components/ChatActions.vue","../../../app/javascript/components/ChatBlankSlate.vue","../../../app/javascript/utils/date.js","../../../app/javascript/components/ChatHistory.vue","../../../app/javascript/components/ChatMessage.vue","../../../app/javascript/components/ChatPrompt.vue","../../../app/javascript/components/DarkThemeSwitch.vue","../../../app/javascript/constants/promptExamples.js","../../../app/javascript/services/ChatHistoryService.js","../../../app/javascript/utils/preventScroll.js","../../../app/javascript/views/Chat.vue","../../../node_modules/fuse.js/dist/fuse.mjs","../../../app/javascript/views/History.vue","../../../app/javascript/router/routes.js","../../../app/javascript/router/index.js","../../../app/javascript/entrypoints/application.js"],"sourcesContent":["/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[o+1]),t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,adoptStyles,css,getCompatibleStyle,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:r,getOwnPropertyNames:h,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),y={attribute:!0,type:String,converter:u,reflect:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=y){if(s.state&&(s.attribute=!1),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);void 0!==r&&e(this.prototype,t,r)}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get(){return e?.call(this)},set(s){const r=e?.call(this);h.call(this,s),this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...h(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$EC(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==r?this.removeAttribute(e):this.setAttribute(e,r),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),r=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null}}requestUpdate(t,s,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??f)(this[t],s))return;this.P(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t)!0!==i.wrapped||this._$AL.has(s)||void 0===this[s]||this.P(s,this[s],i)}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EU()}catch(s){throw t=!1,this._$EU(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}b.elementStyles=[],b.shadowRootOptions={mode:\"open\"},b[d(\"elementProperties\")]=new Map,b[d(\"finalized\")]=new Map,p?.({ReactiveElement:b}),(a.reactiveElementVersions??=[]).push(\"2.0.4\");export{b as ReactiveElement,u as defaultConverter,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,i=t.trustedTypes,s=i?i.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,e=\"$lit$\",h=`lit$${(Math.random()+\"\").slice(9)}$`,o=\"?\"+h,n=`<${o}>`,r=document,l=()=>r.createComment(\"\"),c=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,a=Array.isArray,u=t=>a(t)||\"function\"==typeof t?.[Symbol.iterator],d=\"[ \\t\\n\\f\\r]\",f=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\\\s\"'>=/]+)(${d}*=${d}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),p=/'/g,g=/\"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(1),b=y(2),w=Symbol.for(\"lit-noChange\"),T=Symbol.for(\"lit-nothing\"),A=new WeakMap,E=r.createTreeWalker(r,129);function C(t,i){if(!Array.isArray(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return void 0!==s?s.createHTML(i):i}const P=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?\"\":\"\",c=f;for(let i=0;i\"===u[0]?(c=r??f,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m:'\"'===u[3]?g:p):c===g||c===p?c=m:c===v||c===_?c=f:(c=m,r=void 0);const x=c===m&&t[i+1].startsWith(\"/>\")?\" \":\"\";l+=c===f?s+n:d>=0?(o.push(a),s.slice(0,d)+e+s.slice(d)+h+x):s+h+(-2===d?i:x)}return[C(t,l+(t[s]||\"\")+(2===i?\"\":\"\")),o]};class V{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=P(t,s);if(this.el=V.createElement(f,n),E.currentNode=this.el.content,2===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=E.nextNode())&&d.length0){r.textContent=i?i.emptyScript:\"\";for(let i=0;i2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=T}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=N(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==w,o&&(this._$AH=t);else{const e=t;let n,r;for(t=h[0],n=0;n{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new M(i.insertBefore(l(),t),t,void 0,s??{})}return h._$AI(t),h};export{z as _$LH,x as html,w as noChange,T as nothing,j as render,b as svg};\n//# sourceMappingURL=lit-html.js.map\n","import{ReactiveElement as t}from\"@lit/reactive-element\";export*from\"@lit/reactive-element\";import{render as e,noChange as i}from\"lit-html\";export*from\"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class s extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=e(i,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return i}}s._$litElement$=!0,s[(\"finalized\",\"finalized\")]=!0,globalThis.litElementHydrateSupport?.({LitElement:s});const r=globalThis.litElementPolyfillSupport;r?.({LitElement:s});const o={_$AK:(t,e,i)=>{t._$AK(e,i)},_$AL:t=>t._$AL};(globalThis.litElementVersions??=[]).push(\"4.0.4\");export{s as LitElement,o as _$LE};\n//# sourceMappingURL=lit-element.js.map\n","// src/styles/component.styles.ts\nimport { css } from \"lit\";\nvar component_styles_default = css`\n :host {\n box-sizing: border-box;\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n [hidden] {\n display: none !important;\n }\n`;\n\nexport {\n component_styles_default\n};\n","import {\n component_styles_default\n} from \"./chunk.TUVJKY7S.js\";\n\n// src/components/spinner/spinner.styles.ts\nimport { css } from \"lit\";\nvar spinner_styles_default = css`\n ${component_styles_default}\n\n :host {\n --track-width: 2px;\n --track-color: rgb(128 128 128 / 25%);\n --indicator-color: var(--sl-color-primary-600);\n --speed: 2s;\n\n display: inline-flex;\n width: 1em;\n height: 1em;\n flex: none;\n }\n\n .spinner {\n flex: 1 1 auto;\n height: 100%;\n width: 100%;\n }\n\n .spinner__track,\n .spinner__indicator {\n fill: none;\n stroke-width: var(--track-width);\n r: calc(0.5em - var(--track-width) / 2);\n cx: 0.5em;\n cy: 0.5em;\n transform-origin: 50% 50%;\n }\n\n .spinner__track {\n stroke: var(--track-color);\n transform-origin: 0% 0%;\n }\n\n .spinner__indicator {\n stroke: var(--indicator-color);\n stroke-linecap: round;\n stroke-dasharray: 150% 75%;\n animation: spin var(--speed) linear infinite;\n }\n\n @keyframes spin {\n 0% {\n transform: rotate(0deg);\n stroke-dasharray: 0.05em, 3em;\n }\n\n 50% {\n transform: rotate(450deg);\n stroke-dasharray: 1.375em, 1.375em;\n }\n\n 100% {\n transform: rotate(1080deg);\n stroke-dasharray: 0.05em, 3em;\n }\n }\n`;\n\nexport {\n spinner_styles_default\n};\n","const connectedElements = new Set();\nconst documentElementObserver = new MutationObserver(update);\nconst translations = new Map();\nlet documentDirection = document.documentElement.dir || 'ltr';\nlet documentLanguage = document.documentElement.lang || navigator.language;\nlet fallback;\ndocumentElementObserver.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['dir', 'lang']\n});\nexport function registerTranslation(...translation) {\n translation.map(t => {\n const code = t.$code.toLowerCase();\n if (translations.has(code)) {\n translations.set(code, Object.assign(Object.assign({}, translations.get(code)), t));\n }\n else {\n translations.set(code, t);\n }\n if (!fallback) {\n fallback = t;\n }\n });\n update();\n}\nexport function update() {\n documentDirection = document.documentElement.dir || 'ltr';\n documentLanguage = document.documentElement.lang || navigator.language;\n [...connectedElements.keys()].map((el) => {\n if (typeof el.requestUpdate === 'function') {\n el.requestUpdate();\n }\n });\n}\nexport class LocalizeController {\n constructor(host) {\n this.host = host;\n this.host.addController(this);\n }\n hostConnected() {\n connectedElements.add(this.host);\n }\n hostDisconnected() {\n connectedElements.delete(this.host);\n }\n dir() {\n return `${this.host.dir || documentDirection}`.toLowerCase();\n }\n lang() {\n return `${this.host.lang || documentLanguage}`.toLowerCase();\n }\n getTranslationData(lang) {\n var _a, _b;\n const locale = new Intl.Locale(lang.replace(/_/g, '-'));\n const language = locale === null || locale === void 0 ? void 0 : locale.language.toLowerCase();\n const region = (_b = (_a = locale === null || locale === void 0 ? void 0 : locale.region) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== null && _b !== void 0 ? _b : '';\n const primary = translations.get(`${language}-${region}`);\n const secondary = translations.get(language);\n return { locale, language, region, primary, secondary };\n }\n exists(key, options) {\n var _a;\n const { primary, secondary } = this.getTranslationData((_a = options.lang) !== null && _a !== void 0 ? _a : this.lang());\n options = Object.assign({ includeFallback: false }, options);\n if ((primary && primary[key]) ||\n (secondary && secondary[key]) ||\n (options.includeFallback && fallback && fallback[key])) {\n return true;\n }\n return false;\n }\n term(key, ...args) {\n const { primary, secondary } = this.getTranslationData(this.lang());\n let term;\n if (primary && primary[key]) {\n term = primary[key];\n }\n else if (secondary && secondary[key]) {\n term = secondary[key];\n }\n else if (fallback && fallback[key]) {\n term = fallback[key];\n }\n else {\n console.error(`No translation found for: ${String(key)}`);\n return String(key);\n }\n if (typeof term === 'function') {\n return term(...args);\n }\n return term;\n }\n date(dateToFormat, options) {\n dateToFormat = new Date(dateToFormat);\n return new Intl.DateTimeFormat(this.lang(), options).format(dateToFormat);\n }\n number(numberToFormat, options) {\n numberToFormat = Number(numberToFormat);\n return isNaN(numberToFormat) ? '' : new Intl.NumberFormat(this.lang(), options).format(numberToFormat);\n }\n relativeTime(value, unit, options) {\n return new Intl.RelativeTimeFormat(this.lang(), options).format(value, unit);\n }\n}\n","// src/translations/en.ts\nimport { registerTranslation } from \"@shoelace-style/localize\";\nvar translation = {\n $code: \"en\",\n $name: \"English\",\n $dir: \"ltr\",\n carousel: \"Carousel\",\n clearEntry: \"Clear entry\",\n close: \"Close\",\n copied: \"Copied\",\n copy: \"Copy\",\n currentValue: \"Current value\",\n error: \"Error\",\n goToSlide: (slide, count) => `Go to slide ${slide} of ${count}`,\n hidePassword: \"Hide password\",\n loading: \"Loading\",\n nextSlide: \"Next slide\",\n numOptionsSelected: (num) => {\n if (num === 0)\n return \"No options selected\";\n if (num === 1)\n return \"1 option selected\";\n return `${num} options selected`;\n },\n previousSlide: \"Previous slide\",\n progress: \"Progress\",\n remove: \"Remove\",\n resize: \"Resize\",\n scrollToEnd: \"Scroll to end\",\n scrollToStart: \"Scroll to start\",\n selectAColorFromTheScreen: \"Select a color from the screen\",\n showPassword: \"Show password\",\n slideNum: (slide) => `Slide ${slide}`,\n toggleColorFormat: \"Toggle color format\"\n};\nregisterTranslation(translation);\nvar en_default = translation;\n\nexport {\n en_default\n};\n","import {\n en_default\n} from \"./chunk.MAS2SHYD.js\";\n\n// src/utilities/localize.ts\nimport { LocalizeController as DefaultLocalizationController, registerTranslation } from \"@shoelace-style/localize\";\nimport { registerTranslation as registerTranslation2 } from \"@shoelace-style/localize\";\nvar LocalizeController = class extends DefaultLocalizationController {\n};\nregisterTranslation(en_default);\n\nexport {\n LocalizeController,\n registerTranslation2 as registerTranslation\n};\n","var __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __knownSymbol = (name, symbol) => {\n return (symbol = Symbol[name]) ? symbol : Symbol.for(\"Symbol.\" + name);\n};\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nvar __decorateClass = (decorators, target, key, kind) => {\n var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;\n for (var i = decorators.length - 1, decorator; i >= 0; i--)\n if (decorator = decorators[i])\n result = (kind ? decorator(target, key, result) : decorator(result)) || result;\n if (kind && result)\n __defProp(target, key, result);\n return result;\n};\nvar __await = function(promise, isYieldStar) {\n this[0] = promise;\n this[1] = isYieldStar;\n};\nvar __yieldStar = (value) => {\n var obj = value[__knownSymbol(\"asyncIterator\")];\n var isAwait = false;\n var method;\n var it = {};\n if (obj == null) {\n obj = value[__knownSymbol(\"iterator\")]();\n method = (k) => it[k] = (x) => obj[k](x);\n } else {\n obj = obj.call(value);\n method = (k) => it[k] = (v) => {\n if (isAwait) {\n isAwait = false;\n if (k === \"throw\")\n throw v;\n return v;\n }\n isAwait = true;\n return {\n done: false,\n value: new __await(new Promise((resolve) => {\n var x = obj[k](v);\n if (!(x instanceof Object))\n throw TypeError(\"Object expected\");\n resolve(x);\n }), 1)\n };\n };\n }\n return it[__knownSymbol(\"iterator\")] = () => it, method(\"next\"), \"throw\" in obj ? method(\"throw\") : it.throw = (x) => {\n throw x;\n }, \"return\" in obj && method(\"return\"), it;\n};\n\nexport {\n __spreadValues,\n __spreadProps,\n __decorateClass,\n __yieldStar\n};\n","import{defaultConverter as t,notEqual as e}from\"../reactive-element.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o={attribute:!0,type:String,converter:t,reflect:!1,hasChanged:e},r=(t=o,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),s.set(r.name,t),\"accessor\"===n){const{name:o}=r;return{set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t)},init(e){return void 0!==e&&this.P(o,void 0,t),e}}}if(\"setter\"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t)}}throw Error(\"Unsupported decorator location: \"+n)};function n(t){return(e,o)=>\"object\"==typeof o?r(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,r?{...t,wrapped:!0}:t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}export{n as property,r as standardProperty};\n//# sourceMappingURL=property.js.map\n","import{property as t}from\"./property.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function r(r){return t({...r,state:!0,attribute:!1})}export{r as state};\n//# sourceMappingURL=state.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst e=(e,t,c)=>(c.configurable=!0,c.enumerable=!0,Reflect.decorate&&\"object\"!=typeof t&&Object.defineProperty(e,t,c),c);export{e as desc};\n//# sourceMappingURL=base.js.map\n","import{desc as t}from\"./base.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function e(e,r){return(n,s,i)=>{const o=t=>t.renderRoot?.querySelector(e)??null;if(r){const{get:e,set:r}=\"object\"==typeof s?n:i??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return t(n,s,{get(){let t=e.call(this);return void 0===t&&(t=o(this),(null!==t||this.hasUpdated)&&r.call(this,t)),t}})}return t(n,s,{get(){return o(this)}})}}export{e as query};\n//# sourceMappingURL=query.js.map\n","import {\n __decorateClass,\n __spreadValues\n} from \"./chunk.IFDWM6P4.js\";\n\n// src/internal/shoelace-element.ts\nimport { LitElement } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nvar ShoelaceElement = class extends LitElement {\n constructor() {\n super();\n Object.entries(this.constructor.dependencies).forEach(([name, component]) => {\n this.constructor.define(name, component);\n });\n }\n emit(name, options) {\n const event = new CustomEvent(name, __spreadValues({\n bubbles: true,\n cancelable: false,\n composed: true,\n detail: {}\n }, options));\n this.dispatchEvent(event);\n return event;\n }\n /* eslint-enable */\n static define(name, elementConstructor = this, options = {}) {\n const currentlyRegisteredConstructor = customElements.get(name);\n if (!currentlyRegisteredConstructor) {\n customElements.define(name, class extends elementConstructor {\n }, options);\n return;\n }\n let newVersion = \" (unknown version)\";\n let existingVersion = newVersion;\n if (\"version\" in elementConstructor && elementConstructor.version) {\n newVersion = \" v\" + elementConstructor.version;\n }\n if (\"version\" in currentlyRegisteredConstructor && currentlyRegisteredConstructor.version) {\n existingVersion = \" v\" + currentlyRegisteredConstructor.version;\n }\n if (newVersion && existingVersion && newVersion === existingVersion) {\n return;\n }\n console.warn(\n `Attempted to register <${name}>${newVersion}, but <${name}>${existingVersion} has already been registered.`\n );\n }\n};\n/* eslint-disable */\n// @ts-expect-error This is auto-injected at build time.\nShoelaceElement.version = \"2.13.1\";\nShoelaceElement.dependencies = {};\n__decorateClass([\n property()\n], ShoelaceElement.prototype, \"dir\", 2);\n__decorateClass([\n property()\n], ShoelaceElement.prototype, \"lang\", 2);\n\nexport {\n ShoelaceElement\n};\n","import {\n spinner_styles_default\n} from \"./chunk.EACLXYYC.js\";\nimport {\n LocalizeController\n} from \"./chunk.WLV3FVBR.js\";\nimport {\n ShoelaceElement\n} from \"./chunk.U5X52PUD.js\";\n\n// src/components/spinner/spinner.component.ts\nimport { html } from \"lit\";\nvar SlSpinner = class extends ShoelaceElement {\n constructor() {\n super(...arguments);\n this.localize = new LocalizeController(this);\n }\n render() {\n return html`\n \n \n \n \n `;\n }\n};\nSlSpinner.styles = spinner_styles_default;\n\nexport {\n SlSpinner\n};\n","import {\n __spreadProps,\n __spreadValues\n} from \"./chunk.IFDWM6P4.js\";\n\n// src/internal/form.ts\nvar formCollections = /* @__PURE__ */ new WeakMap();\nvar reportValidityOverloads = /* @__PURE__ */ new WeakMap();\nvar checkValidityOverloads = /* @__PURE__ */ new WeakMap();\nvar userInteractedControls = /* @__PURE__ */ new WeakSet();\nvar interactions = /* @__PURE__ */ new WeakMap();\nvar FormControlController = class {\n constructor(host, options) {\n this.handleFormData = (event) => {\n const disabled = this.options.disabled(this.host);\n const name = this.options.name(this.host);\n const value = this.options.value(this.host);\n const isButton = this.host.tagName.toLowerCase() === \"sl-button\";\n if (this.host.isConnected && !disabled && !isButton && typeof name === \"string\" && name.length > 0 && typeof value !== \"undefined\") {\n if (Array.isArray(value)) {\n value.forEach((val) => {\n event.formData.append(name, val.toString());\n });\n } else {\n event.formData.append(name, value.toString());\n }\n }\n };\n this.handleFormSubmit = (event) => {\n var _a;\n const disabled = this.options.disabled(this.host);\n const reportValidity = this.options.reportValidity;\n if (this.form && !this.form.noValidate) {\n (_a = formCollections.get(this.form)) == null ? void 0 : _a.forEach((control) => {\n this.setUserInteracted(control, true);\n });\n }\n if (this.form && !this.form.noValidate && !disabled && !reportValidity(this.host)) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n };\n this.handleFormReset = () => {\n this.options.setValue(this.host, this.options.defaultValue(this.host));\n this.setUserInteracted(this.host, false);\n interactions.set(this.host, []);\n };\n this.handleInteraction = (event) => {\n const emittedEvents = interactions.get(this.host);\n if (!emittedEvents.includes(event.type)) {\n emittedEvents.push(event.type);\n }\n if (emittedEvents.length === this.options.assumeInteractionOn.length) {\n this.setUserInteracted(this.host, true);\n }\n };\n this.checkFormValidity = () => {\n if (this.form && !this.form.noValidate) {\n const elements = this.form.querySelectorAll(\"*\");\n for (const element of elements) {\n if (typeof element.checkValidity === \"function\") {\n if (!element.checkValidity()) {\n return false;\n }\n }\n }\n }\n return true;\n };\n this.reportFormValidity = () => {\n if (this.form && !this.form.noValidate) {\n const elements = this.form.querySelectorAll(\"*\");\n for (const element of elements) {\n if (typeof element.reportValidity === \"function\") {\n if (!element.reportValidity()) {\n return false;\n }\n }\n }\n }\n return true;\n };\n (this.host = host).addController(this);\n this.options = __spreadValues({\n form: (input) => {\n const formId = input.form;\n if (formId) {\n const root = input.getRootNode();\n const form = root.getElementById(formId);\n if (form) {\n return form;\n }\n }\n return input.closest(\"form\");\n },\n name: (input) => input.name,\n value: (input) => input.value,\n defaultValue: (input) => input.defaultValue,\n disabled: (input) => {\n var _a;\n return (_a = input.disabled) != null ? _a : false;\n },\n reportValidity: (input) => typeof input.reportValidity === \"function\" ? input.reportValidity() : true,\n checkValidity: (input) => typeof input.checkValidity === \"function\" ? input.checkValidity() : true,\n setValue: (input, value) => input.value = value,\n assumeInteractionOn: [\"sl-input\"]\n }, options);\n }\n hostConnected() {\n const form = this.options.form(this.host);\n if (form) {\n this.attachForm(form);\n }\n interactions.set(this.host, []);\n this.options.assumeInteractionOn.forEach((event) => {\n this.host.addEventListener(event, this.handleInteraction);\n });\n }\n hostDisconnected() {\n this.detachForm();\n interactions.delete(this.host);\n this.options.assumeInteractionOn.forEach((event) => {\n this.host.removeEventListener(event, this.handleInteraction);\n });\n }\n hostUpdated() {\n const form = this.options.form(this.host);\n if (!form) {\n this.detachForm();\n }\n if (form && this.form !== form) {\n this.detachForm();\n this.attachForm(form);\n }\n if (this.host.hasUpdated) {\n this.setValidity(this.host.validity.valid);\n }\n }\n attachForm(form) {\n if (form) {\n this.form = form;\n if (formCollections.has(this.form)) {\n formCollections.get(this.form).add(this.host);\n } else {\n formCollections.set(this.form, /* @__PURE__ */ new Set([this.host]));\n }\n this.form.addEventListener(\"formdata\", this.handleFormData);\n this.form.addEventListener(\"submit\", this.handleFormSubmit);\n this.form.addEventListener(\"reset\", this.handleFormReset);\n if (!reportValidityOverloads.has(this.form)) {\n reportValidityOverloads.set(this.form, this.form.reportValidity);\n this.form.reportValidity = () => this.reportFormValidity();\n }\n if (!checkValidityOverloads.has(this.form)) {\n checkValidityOverloads.set(this.form, this.form.checkValidity);\n this.form.checkValidity = () => this.checkFormValidity();\n }\n } else {\n this.form = void 0;\n }\n }\n detachForm() {\n if (!this.form)\n return;\n const formCollection = formCollections.get(this.form);\n if (!formCollection) {\n return;\n }\n formCollection.delete(this.host);\n if (formCollection.size <= 0) {\n this.form.removeEventListener(\"formdata\", this.handleFormData);\n this.form.removeEventListener(\"submit\", this.handleFormSubmit);\n this.form.removeEventListener(\"reset\", this.handleFormReset);\n if (reportValidityOverloads.has(this.form)) {\n this.form.reportValidity = reportValidityOverloads.get(this.form);\n reportValidityOverloads.delete(this.form);\n }\n if (checkValidityOverloads.has(this.form)) {\n this.form.checkValidity = checkValidityOverloads.get(this.form);\n checkValidityOverloads.delete(this.form);\n }\n this.form = void 0;\n }\n }\n setUserInteracted(el, hasInteracted) {\n if (hasInteracted) {\n userInteractedControls.add(el);\n } else {\n userInteractedControls.delete(el);\n }\n el.requestUpdate();\n }\n doAction(type, submitter) {\n if (this.form) {\n const button = document.createElement(\"button\");\n button.type = type;\n button.style.position = \"absolute\";\n button.style.width = \"0\";\n button.style.height = \"0\";\n button.style.clipPath = \"inset(50%)\";\n button.style.overflow = \"hidden\";\n button.style.whiteSpace = \"nowrap\";\n if (submitter) {\n button.name = submitter.name;\n button.value = submitter.value;\n [\"formaction\", \"formenctype\", \"formmethod\", \"formnovalidate\", \"formtarget\"].forEach((attr) => {\n if (submitter.hasAttribute(attr)) {\n button.setAttribute(attr, submitter.getAttribute(attr));\n }\n });\n }\n this.form.append(button);\n button.click();\n button.remove();\n }\n }\n /** Returns the associated `
` element, if one exists. */\n getForm() {\n var _a;\n return (_a = this.form) != null ? _a : null;\n }\n /** Resets the form, restoring all the control to their default value */\n reset(submitter) {\n this.doAction(\"reset\", submitter);\n }\n /** Submits the form, triggering validation and form data injection. */\n submit(submitter) {\n this.doAction(\"submit\", submitter);\n }\n /**\n * Synchronously sets the form control's validity. Call this when you know the future validity but need to update\n * the host element immediately, i.e. before Lit updates the component in the next update.\n */\n setValidity(isValid) {\n const host = this.host;\n const hasInteracted = Boolean(userInteractedControls.has(host));\n const required = Boolean(host.required);\n host.toggleAttribute(\"data-required\", required);\n host.toggleAttribute(\"data-optional\", !required);\n host.toggleAttribute(\"data-invalid\", !isValid);\n host.toggleAttribute(\"data-valid\", isValid);\n host.toggleAttribute(\"data-user-invalid\", !isValid && hasInteracted);\n host.toggleAttribute(\"data-user-valid\", isValid && hasInteracted);\n }\n /**\n * Updates the form control's validity based on the current value of `host.validity.valid`. Call this when anything\n * that affects constraint validation changes so the component receives the correct validity states.\n */\n updateValidity() {\n const host = this.host;\n this.setValidity(host.validity.valid);\n }\n /**\n * Dispatches a non-bubbling, cancelable custom event of type `sl-invalid`.\n * If the `sl-invalid` event will be cancelled then the original `invalid`\n * event (which may have been passed as argument) will also be cancelled.\n * If no original `invalid` event has been passed then the `sl-invalid`\n * event will be cancelled before being dispatched.\n */\n emitInvalidEvent(originalInvalidEvent) {\n const slInvalidEvent = new CustomEvent(\"sl-invalid\", {\n bubbles: false,\n composed: false,\n cancelable: true,\n detail: {}\n });\n if (!originalInvalidEvent) {\n slInvalidEvent.preventDefault();\n }\n if (!this.host.dispatchEvent(slInvalidEvent)) {\n originalInvalidEvent == null ? void 0 : originalInvalidEvent.preventDefault();\n }\n }\n};\nvar validValidityState = Object.freeze({\n badInput: false,\n customError: false,\n patternMismatch: false,\n rangeOverflow: false,\n rangeUnderflow: false,\n stepMismatch: false,\n tooLong: false,\n tooShort: false,\n typeMismatch: false,\n valid: true,\n valueMissing: false\n});\nvar valueMissingValidityState = Object.freeze(__spreadProps(__spreadValues({}, validValidityState), {\n valid: false,\n valueMissing: true\n}));\nvar customErrorValidityState = Object.freeze(__spreadProps(__spreadValues({}, validValidityState), {\n valid: false,\n customError: true\n}));\n\nexport {\n formCollections,\n FormControlController,\n validValidityState,\n valueMissingValidityState,\n customErrorValidityState\n};\n","import {\n component_styles_default\n} from \"./chunk.TUVJKY7S.js\";\n\n// src/components/button/button.styles.ts\nimport { css } from \"lit\";\nvar button_styles_default = css`\n ${component_styles_default}\n\n :host {\n display: inline-block;\n position: relative;\n width: auto;\n cursor: pointer;\n }\n\n .button {\n display: inline-flex;\n align-items: stretch;\n justify-content: center;\n width: 100%;\n border-style: solid;\n border-width: var(--sl-input-border-width);\n font-family: var(--sl-input-font-family);\n font-weight: var(--sl-font-weight-semibold);\n text-decoration: none;\n user-select: none;\n -webkit-user-select: none;\n white-space: nowrap;\n vertical-align: middle;\n padding: 0;\n transition:\n var(--sl-transition-x-fast) background-color,\n var(--sl-transition-x-fast) color,\n var(--sl-transition-x-fast) border,\n var(--sl-transition-x-fast) box-shadow;\n cursor: inherit;\n }\n\n .button::-moz-focus-inner {\n border: 0;\n }\n\n .button:focus {\n outline: none;\n }\n\n .button:focus-visible {\n outline: var(--sl-focus-ring);\n outline-offset: var(--sl-focus-ring-offset);\n }\n\n .button--disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n /* When disabled, prevent mouse events from bubbling up from children */\n .button--disabled * {\n pointer-events: none;\n }\n\n .button__prefix,\n .button__suffix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n pointer-events: none;\n }\n\n .button__label {\n display: inline-block;\n }\n\n .button__label::slotted(sl-icon) {\n vertical-align: -2px;\n }\n\n /*\n * Standard buttons\n */\n\n /* Default */\n .button--standard.button--default {\n background-color: var(--sl-color-neutral-0);\n border-color: var(--sl-color-neutral-300);\n color: var(--sl-color-neutral-700);\n }\n\n .button--standard.button--default:hover:not(.button--disabled) {\n background-color: var(--sl-color-primary-50);\n border-color: var(--sl-color-primary-300);\n color: var(--sl-color-primary-700);\n }\n\n .button--standard.button--default:active:not(.button--disabled) {\n background-color: var(--sl-color-primary-100);\n border-color: var(--sl-color-primary-400);\n color: var(--sl-color-primary-700);\n }\n\n /* Primary */\n .button--standard.button--primary {\n background-color: var(--sl-color-primary-600);\n border-color: var(--sl-color-primary-600);\n color: var(--sl-color-neutral-0);\n }\n\n .button--standard.button--primary:hover:not(.button--disabled) {\n background-color: var(--sl-color-primary-500);\n border-color: var(--sl-color-primary-500);\n color: var(--sl-color-neutral-0);\n }\n\n .button--standard.button--primary:active:not(.button--disabled) {\n background-color: var(--sl-color-primary-600);\n border-color: var(--sl-color-primary-600);\n color: var(--sl-color-neutral-0);\n }\n\n /* Success */\n .button--standard.button--success {\n background-color: var(--sl-color-success-600);\n border-color: var(--sl-color-success-600);\n color: var(--sl-color-neutral-0);\n }\n\n .button--standard.button--success:hover:not(.button--disabled) {\n background-color: var(--sl-color-success-500);\n border-color: var(--sl-color-success-500);\n color: var(--sl-color-neutral-0);\n }\n\n .button--standard.button--success:active:not(.button--disabled) {\n background-color: var(--sl-color-success-600);\n border-color: var(--sl-color-success-600);\n color: var(--sl-color-neutral-0);\n }\n\n /* Neutral */\n .button--standard.button--neutral {\n background-color: var(--sl-color-neutral-600);\n border-color: var(--sl-color-neutral-600);\n color: var(--sl-color-neutral-0);\n }\n\n .button--standard.button--neutral:hover:not(.button--disabled) {\n background-color: var(--sl-color-neutral-500);\n border-color: var(--sl-color-neutral-500);\n color: var(--sl-color-neutral-0);\n }\n\n .button--standard.button--neutral:active:not(.button--disabled) {\n background-color: var(--sl-color-neutral-600);\n border-color: var(--sl-color-neutral-600);\n color: var(--sl-color-neutral-0);\n }\n\n /* Warning */\n .button--standard.button--warning {\n background-color: var(--sl-color-warning-600);\n border-color: var(--sl-color-warning-600);\n color: var(--sl-color-neutral-0);\n }\n .button--standard.button--warning:hover:not(.button--disabled) {\n background-color: var(--sl-color-warning-500);\n border-color: var(--sl-color-warning-500);\n color: var(--sl-color-neutral-0);\n }\n\n .button--standard.button--warning:active:not(.button--disabled) {\n background-color: var(--sl-color-warning-600);\n border-color: var(--sl-color-warning-600);\n color: var(--sl-color-neutral-0);\n }\n\n /* Danger */\n .button--standard.button--danger {\n background-color: var(--sl-color-danger-600);\n border-color: var(--sl-color-danger-600);\n color: var(--sl-color-neutral-0);\n }\n\n .button--standard.button--danger:hover:not(.button--disabled) {\n background-color: var(--sl-color-danger-500);\n border-color: var(--sl-color-danger-500);\n color: var(--sl-color-neutral-0);\n }\n\n .button--standard.button--danger:active:not(.button--disabled) {\n background-color: var(--sl-color-danger-600);\n border-color: var(--sl-color-danger-600);\n color: var(--sl-color-neutral-0);\n }\n\n /*\n * Outline buttons\n */\n\n .button--outline {\n background: none;\n border: solid 1px;\n }\n\n /* Default */\n .button--outline.button--default {\n border-color: var(--sl-color-neutral-300);\n color: var(--sl-color-neutral-700);\n }\n\n .button--outline.button--default:hover:not(.button--disabled),\n .button--outline.button--default.button--checked:not(.button--disabled) {\n border-color: var(--sl-color-primary-600);\n background-color: var(--sl-color-primary-600);\n color: var(--sl-color-neutral-0);\n }\n\n .button--outline.button--default:active:not(.button--disabled) {\n border-color: var(--sl-color-primary-700);\n background-color: var(--sl-color-primary-700);\n color: var(--sl-color-neutral-0);\n }\n\n /* Primary */\n .button--outline.button--primary {\n border-color: var(--sl-color-primary-600);\n color: var(--sl-color-primary-600);\n }\n\n .button--outline.button--primary:hover:not(.button--disabled),\n .button--outline.button--primary.button--checked:not(.button--disabled) {\n background-color: var(--sl-color-primary-600);\n color: var(--sl-color-neutral-0);\n }\n\n .button--outline.button--primary:active:not(.button--disabled) {\n border-color: var(--sl-color-primary-700);\n background-color: var(--sl-color-primary-700);\n color: var(--sl-color-neutral-0);\n }\n\n /* Success */\n .button--outline.button--success {\n border-color: var(--sl-color-success-600);\n color: var(--sl-color-success-600);\n }\n\n .button--outline.button--success:hover:not(.button--disabled),\n .button--outline.button--success.button--checked:not(.button--disabled) {\n background-color: var(--sl-color-success-600);\n color: var(--sl-color-neutral-0);\n }\n\n .button--outline.button--success:active:not(.button--disabled) {\n border-color: var(--sl-color-success-700);\n background-color: var(--sl-color-success-700);\n color: var(--sl-color-neutral-0);\n }\n\n /* Neutral */\n .button--outline.button--neutral {\n border-color: var(--sl-color-neutral-600);\n color: var(--sl-color-neutral-600);\n }\n\n .button--outline.button--neutral:hover:not(.button--disabled),\n .button--outline.button--neutral.button--checked:not(.button--disabled) {\n background-color: var(--sl-color-neutral-600);\n color: var(--sl-color-neutral-0);\n }\n\n .button--outline.button--neutral:active:not(.button--disabled) {\n border-color: var(--sl-color-neutral-700);\n background-color: var(--sl-color-neutral-700);\n color: var(--sl-color-neutral-0);\n }\n\n /* Warning */\n .button--outline.button--warning {\n border-color: var(--sl-color-warning-600);\n color: var(--sl-color-warning-600);\n }\n\n .button--outline.button--warning:hover:not(.button--disabled),\n .button--outline.button--warning.button--checked:not(.button--disabled) {\n background-color: var(--sl-color-warning-600);\n color: var(--sl-color-neutral-0);\n }\n\n .button--outline.button--warning:active:not(.button--disabled) {\n border-color: var(--sl-color-warning-700);\n background-color: var(--sl-color-warning-700);\n color: var(--sl-color-neutral-0);\n }\n\n /* Danger */\n .button--outline.button--danger {\n border-color: var(--sl-color-danger-600);\n color: var(--sl-color-danger-600);\n }\n\n .button--outline.button--danger:hover:not(.button--disabled),\n .button--outline.button--danger.button--checked:not(.button--disabled) {\n background-color: var(--sl-color-danger-600);\n color: var(--sl-color-neutral-0);\n }\n\n .button--outline.button--danger:active:not(.button--disabled) {\n border-color: var(--sl-color-danger-700);\n background-color: var(--sl-color-danger-700);\n color: var(--sl-color-neutral-0);\n }\n\n @media (forced-colors: active) {\n .button.button--outline.button--checked:not(.button--disabled) {\n outline: solid 2px transparent;\n }\n }\n\n /*\n * Text buttons\n */\n\n .button--text {\n background-color: transparent;\n border-color: transparent;\n color: var(--sl-color-primary-600);\n }\n\n .button--text:hover:not(.button--disabled) {\n background-color: transparent;\n border-color: transparent;\n color: var(--sl-color-primary-500);\n }\n\n .button--text:focus-visible:not(.button--disabled) {\n background-color: transparent;\n border-color: transparent;\n color: var(--sl-color-primary-500);\n }\n\n .button--text:active:not(.button--disabled) {\n background-color: transparent;\n border-color: transparent;\n color: var(--sl-color-primary-700);\n }\n\n /*\n * Size modifiers\n */\n\n .button--small {\n height: auto;\n min-height: var(--sl-input-height-small);\n font-size: var(--sl-button-font-size-small);\n line-height: calc(var(--sl-input-height-small) - var(--sl-input-border-width) * 2);\n border-radius: var(--sl-input-border-radius-small);\n }\n\n .button--medium {\n height: auto;\n min-height: var(--sl-input-height-medium);\n font-size: var(--sl-button-font-size-medium);\n line-height: calc(var(--sl-input-height-medium) - var(--sl-input-border-width) * 2);\n border-radius: var(--sl-input-border-radius-medium);\n }\n\n .button--large {\n height: auto;\n min-height: var(--sl-input-height-large);\n font-size: var(--sl-button-font-size-large);\n line-height: calc(var(--sl-input-height-large) - var(--sl-input-border-width) * 2);\n border-radius: var(--sl-input-border-radius-large);\n }\n\n /*\n * Pill modifier\n */\n\n .button--pill.button--small {\n border-radius: var(--sl-input-height-small);\n }\n\n .button--pill.button--medium {\n border-radius: var(--sl-input-height-medium);\n }\n\n .button--pill.button--large {\n border-radius: var(--sl-input-height-large);\n }\n\n /*\n * Circle modifier\n */\n\n .button--circle {\n padding-left: 0;\n padding-right: 0;\n }\n\n .button--circle.button--small {\n width: var(--sl-input-height-small);\n border-radius: 50%;\n }\n\n .button--circle.button--medium {\n width: var(--sl-input-height-medium);\n border-radius: 50%;\n }\n\n .button--circle.button--large {\n width: var(--sl-input-height-large);\n border-radius: 50%;\n }\n\n .button--circle .button__prefix,\n .button--circle .button__suffix,\n .button--circle .button__caret {\n display: none;\n }\n\n /*\n * Caret modifier\n */\n\n .button--caret .button__suffix {\n display: none;\n }\n\n .button--caret .button__caret {\n height: auto;\n }\n\n /*\n * Loading modifier\n */\n\n .button--loading {\n position: relative;\n cursor: wait;\n }\n\n .button--loading .button__prefix,\n .button--loading .button__label,\n .button--loading .button__suffix,\n .button--loading .button__caret {\n visibility: hidden;\n }\n\n .button--loading sl-spinner {\n --indicator-color: currentColor;\n position: absolute;\n font-size: 1em;\n height: 1em;\n width: 1em;\n top: calc(50% - 0.5em);\n left: calc(50% - 0.5em);\n }\n\n /*\n * Badges\n */\n\n .button ::slotted(sl-badge) {\n position: absolute;\n top: 0;\n right: 0;\n translate: 50% -50%;\n pointer-events: none;\n }\n\n .button--rtl ::slotted(sl-badge) {\n right: auto;\n left: 0;\n translate: -50% -50%;\n }\n\n /*\n * Button spacing\n */\n\n .button--has-label.button--small .button__label {\n padding: 0 var(--sl-spacing-small);\n }\n\n .button--has-label.button--medium .button__label {\n padding: 0 var(--sl-spacing-medium);\n }\n\n .button--has-label.button--large .button__label {\n padding: 0 var(--sl-spacing-large);\n }\n\n .button--has-prefix.button--small {\n padding-inline-start: var(--sl-spacing-x-small);\n }\n\n .button--has-prefix.button--small .button__label {\n padding-inline-start: var(--sl-spacing-x-small);\n }\n\n .button--has-prefix.button--medium {\n padding-inline-start: var(--sl-spacing-small);\n }\n\n .button--has-prefix.button--medium .button__label {\n padding-inline-start: var(--sl-spacing-small);\n }\n\n .button--has-prefix.button--large {\n padding-inline-start: var(--sl-spacing-small);\n }\n\n .button--has-prefix.button--large .button__label {\n padding-inline-start: var(--sl-spacing-small);\n }\n\n .button--has-suffix.button--small,\n .button--caret.button--small {\n padding-inline-end: var(--sl-spacing-x-small);\n }\n\n .button--has-suffix.button--small .button__label,\n .button--caret.button--small .button__label {\n padding-inline-end: var(--sl-spacing-x-small);\n }\n\n .button--has-suffix.button--medium,\n .button--caret.button--medium {\n padding-inline-end: var(--sl-spacing-small);\n }\n\n .button--has-suffix.button--medium .button__label,\n .button--caret.button--medium .button__label {\n padding-inline-end: var(--sl-spacing-small);\n }\n\n .button--has-suffix.button--large,\n .button--caret.button--large {\n padding-inline-end: var(--sl-spacing-small);\n }\n\n .button--has-suffix.button--large .button__label,\n .button--caret.button--large .button__label {\n padding-inline-end: var(--sl-spacing-small);\n }\n\n /*\n * Button groups support a variety of button types (e.g. buttons with tooltips, buttons as dropdown triggers, etc.).\n * This means buttons aren't always direct descendants of the button group, thus we can't target them with the\n * ::slotted selector. To work around this, the button group component does some magic to add these special classes to\n * buttons and we style them here instead.\n */\n\n :host(.sl-button-group__button--first:not(.sl-button-group__button--last)) .button {\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n }\n\n :host(.sl-button-group__button--inner) .button {\n border-radius: 0;\n }\n\n :host(.sl-button-group__button--last:not(.sl-button-group__button--first)) .button {\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n }\n\n /* All except the first */\n :host(.sl-button-group__button:not(.sl-button-group__button--first)) {\n margin-inline-start: calc(-1 * var(--sl-input-border-width));\n }\n\n /* Add a visual separator between solid buttons */\n :host(\n .sl-button-group__button:not(\n .sl-button-group__button--first,\n .sl-button-group__button--radio,\n [variant='default']\n ):not(:hover)\n )\n .button:after {\n content: '';\n position: absolute;\n top: 0;\n inset-inline-start: 0;\n bottom: 0;\n border-left: solid 1px rgb(128 128 128 / 33%);\n mix-blend-mode: multiply;\n }\n\n /* Bump hovered, focused, and checked buttons up so their focus ring isn't clipped */\n :host(.sl-button-group__button--hover) {\n z-index: 1;\n }\n\n /* Focus and checked are always on top */\n :host(.sl-button-group__button--focus),\n :host(.sl-button-group__button[checked]) {\n z-index: 2;\n }\n`;\n\nexport {\n button_styles_default\n};\n","// src/internal/slot.ts\nvar HasSlotController = class {\n constructor(host, ...slotNames) {\n this.slotNames = [];\n this.handleSlotChange = (event) => {\n const slot = event.target;\n if (this.slotNames.includes(\"[default]\") && !slot.name || slot.name && this.slotNames.includes(slot.name)) {\n this.host.requestUpdate();\n }\n };\n (this.host = host).addController(this);\n this.slotNames = slotNames;\n }\n hasDefaultSlot() {\n return [...this.host.childNodes].some((node) => {\n if (node.nodeType === node.TEXT_NODE && node.textContent.trim() !== \"\") {\n return true;\n }\n if (node.nodeType === node.ELEMENT_NODE) {\n const el = node;\n const tagName = el.tagName.toLowerCase();\n if (tagName === \"sl-visually-hidden\") {\n return false;\n }\n if (!el.hasAttribute(\"slot\")) {\n return true;\n }\n }\n return false;\n });\n }\n hasNamedSlot(name) {\n return this.host.querySelector(`:scope > [slot=\"${name}\"]`) !== null;\n }\n test(slotName) {\n return slotName === \"[default]\" ? this.hasDefaultSlot() : this.hasNamedSlot(slotName);\n }\n hostConnected() {\n this.host.shadowRoot.addEventListener(\"slotchange\", this.handleSlotChange);\n }\n hostDisconnected() {\n this.host.shadowRoot.removeEventListener(\"slotchange\", this.handleSlotChange);\n }\n};\nfunction getTextContent(slot) {\n if (!slot) {\n return \"\";\n }\n const nodes = slot.assignedNodes({ flatten: true });\n let text = \"\";\n [...nodes].forEach((node) => {\n if (node.nodeType === Node.TEXT_NODE) {\n text += node.textContent;\n }\n });\n return text;\n}\n\nexport {\n HasSlotController,\n getTextContent\n};\n","// src/utilities/base-path.ts\nvar basePath = \"\";\nfunction setBasePath(path) {\n basePath = path;\n}\nfunction getBasePath(subpath = \"\") {\n if (!basePath) {\n const scripts = [...document.getElementsByTagName(\"script\")];\n const configScript = scripts.find((script) => script.hasAttribute(\"data-shoelace\"));\n if (configScript) {\n setBasePath(configScript.getAttribute(\"data-shoelace\"));\n } else {\n const fallbackScript = scripts.find((s) => {\n return /shoelace(\\.min)?\\.js($|\\?)/.test(s.src) || /shoelace-autoloader(\\.min)?\\.js($|\\?)/.test(s.src);\n });\n let path = \"\";\n if (fallbackScript) {\n path = fallbackScript.getAttribute(\"src\");\n }\n setBasePath(path.split(\"/\").slice(0, -1).join(\"/\"));\n }\n }\n return basePath.replace(/\\/$/, \"\") + (subpath ? `/${subpath.replace(/^\\//, \"\")}` : ``);\n}\n\nexport {\n setBasePath,\n getBasePath\n};\n","import {\n getBasePath\n} from \"./chunk.3Y6SB6QS.js\";\n\n// src/components/icon/library.default.ts\nvar library = {\n name: \"default\",\n resolver: (name) => getBasePath(`assets/icons/${name}.svg`)\n};\nvar library_default_default = library;\n\nexport {\n library_default_default\n};\n","// src/components/icon/library.system.ts\nvar icons = {\n caret: `\n \n \n \n `,\n check: `\n \n \n \n \n \n \n \n \n \n \n `,\n \"chevron-down\": `\n \n \n \n `,\n \"chevron-left\": `\n \n \n \n `,\n \"chevron-right\": `\n \n \n \n `,\n copy: `\n \n \n \n `,\n eye: `\n \n \n \n \n `,\n \"eye-slash\": `\n \n \n \n \n \n `,\n eyedropper: `\n \n \n \n `,\n \"grip-vertical\": `\n \n \n \n `,\n indeterminate: `\n \n \n \n \n \n \n \n \n \n `,\n \"person-fill\": `\n \n \n \n `,\n \"play-fill\": `\n \n \n \n `,\n \"pause-fill\": `\n \n \n \n `,\n radio: `\n \n \n \n \n \n \n \n `,\n \"star-fill\": `\n \n \n \n `,\n \"x-lg\": `\n \n \n \n `,\n \"x-circle-fill\": `\n \n \n \n `\n};\nvar systemLibrary = {\n name: \"system\",\n resolver: (name) => {\n if (name in icons) {\n return `data:image/svg+xml,${encodeURIComponent(icons[name])}`;\n }\n return \"\";\n }\n};\nvar library_system_default = systemLibrary;\n\nexport {\n library_system_default\n};\n","import {\n library_default_default\n} from \"./chunk.P7ZG6EMR.js\";\nimport {\n library_system_default\n} from \"./chunk.3TFKS637.js\";\n\n// src/components/icon/library.ts\nvar registry = [library_default_default, library_system_default];\nvar watchedIcons = [];\nfunction watchIcon(icon) {\n watchedIcons.push(icon);\n}\nfunction unwatchIcon(icon) {\n watchedIcons = watchedIcons.filter((el) => el !== icon);\n}\nfunction getIconLibrary(name) {\n return registry.find((lib) => lib.name === name);\n}\nfunction registerIconLibrary(name, options) {\n unregisterIconLibrary(name);\n registry.push({\n name,\n resolver: options.resolver,\n mutator: options.mutator,\n spriteSheet: options.spriteSheet\n });\n watchedIcons.forEach((icon) => {\n if (icon.library === name) {\n icon.setIcon();\n }\n });\n}\nfunction unregisterIconLibrary(name) {\n registry = registry.filter((lib) => lib.name !== name);\n}\n\nexport {\n watchIcon,\n unwatchIcon,\n getIconLibrary,\n registerIconLibrary,\n unregisterIconLibrary\n};\n","import {\n component_styles_default\n} from \"./chunk.TUVJKY7S.js\";\n\n// src/components/icon/icon.styles.ts\nimport { css } from \"lit\";\nvar icon_styles_default = css`\n ${component_styles_default}\n\n :host {\n display: inline-block;\n width: 1em;\n height: 1em;\n box-sizing: content-box !important;\n }\n\n svg {\n display: block;\n height: 100%;\n width: 100%;\n }\n`;\n\nexport {\n icon_styles_default\n};\n","import {\n __spreadValues\n} from \"./chunk.IFDWM6P4.js\";\n\n// src/internal/watch.ts\nfunction watch(propertyName, options) {\n const resolvedOptions = __spreadValues({\n waitUntilFirstUpdate: false\n }, options);\n return (proto, decoratedFnName) => {\n const { update } = proto;\n const watchedProperties = Array.isArray(propertyName) ? propertyName : [propertyName];\n proto.update = function(changedProps) {\n watchedProperties.forEach((property) => {\n const key = property;\n if (changedProps.has(key)) {\n const oldValue = changedProps.get(key);\n const newValue = this[key];\n if (oldValue !== newValue) {\n if (!resolvedOptions.waitUntilFirstUpdate || this.hasUpdated) {\n this[decoratedFnName](oldValue, newValue);\n }\n }\n }\n });\n update.call(this, changedProps);\n };\n };\n}\n\nexport {\n watch\n};\n","import{_$LH as o}from\"./lit-html.js\";\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{I:t}=o,i=o=>null===o||\"object\"!=typeof o&&\"function\"!=typeof o,n={HTML:1,SVG:2},e=(o,t)=>void 0===t?void 0!==o?._$litType$:o?._$litType$===t,l=o=>null!=o?._$litType$?.h,c=o=>void 0!==o?._$litDirective$,d=o=>o?._$litDirective$,f=o=>void 0===o.strings,s=()=>document.createComment(\"\"),r=(o,i,n)=>{const e=o._$AA.parentNode,l=void 0===i?o._$AB:i._$AA;if(void 0===n){const i=e.insertBefore(s(),l),c=e.insertBefore(s(),l);n=new t(i,c,o,o.options)}else{const t=n._$AB.nextSibling,i=n._$AM,c=i!==o;if(c){let t;n._$AQ?.(o),n._$AM=o,void 0!==n._$AP&&(t=o._$AU)!==i._$AU&&n._$AP(t)}if(t!==l||c){let o=n._$AA;for(;o!==t;){const t=o.nextSibling;e.insertBefore(o,l),o=t}}}return n},v=(o,t,i=o)=>(o._$AI(t,i),o),u={},m=(o,t=u)=>o._$AH=t,p=o=>o._$AH,h=o=>{o._$AP?.(!1,!0);let t=o._$AA;const i=o._$AB.nextSibling;for(;t!==i;){const o=t.nextSibling;t.remove(),t=o}},j=o=>{o._$AR()};export{n as TemplateResultType,j as clearPart,p as getCommittedValue,d as getDirectiveClass,r as insertPart,l as isCompiledTemplateResult,c as isDirectiveResult,i as isPrimitive,f as isSingleExpression,e as isTemplateResult,h as removePart,v as setChildPartValue,m as setCommittedValue};\n//# sourceMappingURL=directive-helpers.js.map\n","import {\n getIconLibrary,\n unwatchIcon,\n watchIcon\n} from \"./chunk.ZL53POKZ.js\";\nimport {\n icon_styles_default\n} from \"./chunk.LMJPQPQT.js\";\nimport {\n watch\n} from \"./chunk.2FB5TK5H.js\";\nimport {\n ShoelaceElement\n} from \"./chunk.U5X52PUD.js\";\nimport {\n __decorateClass\n} from \"./chunk.IFDWM6P4.js\";\n\n// src/components/icon/icon.component.ts\nimport { html } from \"lit\";\nimport { isTemplateResult } from \"lit/directive-helpers.js\";\nimport { property, state } from \"lit/decorators.js\";\nvar CACHEABLE_ERROR = Symbol();\nvar RETRYABLE_ERROR = Symbol();\nvar parser;\nvar iconCache = /* @__PURE__ */ new Map();\nvar SlIcon = class extends ShoelaceElement {\n constructor() {\n super(...arguments);\n this.initialRender = false;\n this.svg = null;\n this.label = \"\";\n this.library = \"default\";\n }\n /** Given a URL, this function returns the resulting SVG element or an appropriate error symbol. */\n async resolveIcon(url, library) {\n var _a;\n let fileData;\n if (library == null ? void 0 : library.spriteSheet) {\n return html`\n \n `;\n }\n try {\n fileData = await fetch(url, { mode: \"cors\" });\n if (!fileData.ok)\n return fileData.status === 410 ? CACHEABLE_ERROR : RETRYABLE_ERROR;\n } catch (e) {\n return RETRYABLE_ERROR;\n }\n try {\n const div = document.createElement(\"div\");\n div.innerHTML = await fileData.text();\n const svg = div.firstElementChild;\n if (((_a = svg == null ? void 0 : svg.tagName) == null ? void 0 : _a.toLowerCase()) !== \"svg\")\n return CACHEABLE_ERROR;\n if (!parser)\n parser = new DOMParser();\n const doc = parser.parseFromString(svg.outerHTML, \"text/html\");\n const svgEl = doc.body.querySelector(\"svg\");\n if (!svgEl)\n return CACHEABLE_ERROR;\n svgEl.part.add(\"svg\");\n return document.adoptNode(svgEl);\n } catch (e) {\n return CACHEABLE_ERROR;\n }\n }\n connectedCallback() {\n super.connectedCallback();\n watchIcon(this);\n }\n firstUpdated() {\n this.initialRender = true;\n this.setIcon();\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n unwatchIcon(this);\n }\n getIconSource() {\n const library = getIconLibrary(this.library);\n if (this.name && library) {\n return {\n url: library.resolver(this.name),\n fromLibrary: true\n };\n }\n return {\n url: this.src,\n fromLibrary: false\n };\n }\n handleLabelChange() {\n const hasLabel = typeof this.label === \"string\" && this.label.length > 0;\n if (hasLabel) {\n this.setAttribute(\"role\", \"img\");\n this.setAttribute(\"aria-label\", this.label);\n this.removeAttribute(\"aria-hidden\");\n } else {\n this.removeAttribute(\"role\");\n this.removeAttribute(\"aria-label\");\n this.setAttribute(\"aria-hidden\", \"true\");\n }\n }\n async setIcon() {\n var _a;\n const { url, fromLibrary } = this.getIconSource();\n const library = fromLibrary ? getIconLibrary(this.library) : void 0;\n if (!url) {\n this.svg = null;\n return;\n }\n let iconResolver = iconCache.get(url);\n if (!iconResolver) {\n iconResolver = this.resolveIcon(url, library);\n iconCache.set(url, iconResolver);\n }\n if (!this.initialRender) {\n return;\n }\n const svg = await iconResolver;\n if (svg === RETRYABLE_ERROR) {\n iconCache.delete(url);\n }\n if (url !== this.getIconSource().url) {\n return;\n }\n if (isTemplateResult(svg)) {\n this.svg = svg;\n return;\n }\n switch (svg) {\n case RETRYABLE_ERROR:\n case CACHEABLE_ERROR:\n this.svg = null;\n this.emit(\"sl-error\");\n break;\n default:\n this.svg = svg.cloneNode(true);\n (_a = library == null ? void 0 : library.mutator) == null ? void 0 : _a.call(library, this.svg);\n this.emit(\"sl-load\");\n }\n }\n render() {\n return this.svg;\n }\n};\nSlIcon.styles = icon_styles_default;\n__decorateClass([\n state()\n], SlIcon.prototype, \"svg\", 2);\n__decorateClass([\n property({ reflect: true })\n], SlIcon.prototype, \"name\", 2);\n__decorateClass([\n property()\n], SlIcon.prototype, \"src\", 2);\n__decorateClass([\n property()\n], SlIcon.prototype, \"label\", 2);\n__decorateClass([\n property({ reflect: true })\n], SlIcon.prototype, \"library\", 2);\n__decorateClass([\n watch(\"label\")\n], SlIcon.prototype, \"handleLabelChange\", 1);\n__decorateClass([\n watch([\"name\", \"src\", \"library\"])\n], SlIcon.prototype, \"setIcon\", 1);\n\nexport {\n SlIcon\n};\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}export{i as Directive,t as PartType,e as directive};\n//# sourceMappingURL=directive.js.map\n","import{noChange as t}from\"../lit-html.js\";import{directive as s,Directive as i,PartType as r}from\"../directive.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const e=s(class extends i{constructor(t){if(super(t),t.type!==r.ATTRIBUTE||\"class\"!==t.name||t.strings?.length>2)throw Error(\"`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.\")}render(t){return\" \"+Object.keys(t).filter((s=>t[s])).join(\" \")+\" \"}update(s,[i]){if(void 0===this.st){this.st=new Set,void 0!==s.strings&&(this.nt=new Set(s.strings.join(\" \").split(/\\s/).filter((t=>\"\"!==t))));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)))}return t}});export{e as classMap};\n//# sourceMappingURL=class-map.js.map\n","import{html as t,svg as r}from\"./lit-html.js\";\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const e=Symbol.for(\"\"),o=t=>{if(t?.r===e)return t?._$litStatic$},i=t=>({_$litStatic$:t,r:e}),s=(t,...r)=>({_$litStatic$:r.reduce(((r,e,o)=>r+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\\n take care to ensure page security.`)})(e)+t[o+1]),t[0]),r:e}),a=new Map,l=t=>(r,...e)=>{const i=e.length;let s,l;const n=[],u=[];let c,$=0,f=!1;for(;$o??t;export{o as ifDefined};\n//# sourceMappingURL=if-defined.js.map\n","import {\n SlSpinner\n} from \"./chunk.XYU7AT6Q.js\";\nimport {\n FormControlController,\n validValidityState\n} from \"./chunk.DL5222VR.js\";\nimport {\n button_styles_default\n} from \"./chunk.MGOBPGE5.js\";\nimport {\n LocalizeController\n} from \"./chunk.WLV3FVBR.js\";\nimport {\n HasSlotController\n} from \"./chunk.NYIIDP5N.js\";\nimport {\n SlIcon\n} from \"./chunk.Y62EZWMI.js\";\nimport {\n watch\n} from \"./chunk.2FB5TK5H.js\";\nimport {\n ShoelaceElement\n} from \"./chunk.U5X52PUD.js\";\nimport {\n __decorateClass\n} from \"./chunk.IFDWM6P4.js\";\n\n// src/components/button/button.component.ts\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { html, literal } from \"lit/static-html.js\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport { property, query, state } from \"lit/decorators.js\";\nvar SlButton = class extends ShoelaceElement {\n constructor() {\n super(...arguments);\n this.formControlController = new FormControlController(this, {\n assumeInteractionOn: [\"click\"]\n });\n this.hasSlotController = new HasSlotController(this, \"[default]\", \"prefix\", \"suffix\");\n this.localize = new LocalizeController(this);\n this.hasFocus = false;\n this.invalid = false;\n this.title = \"\";\n this.variant = \"default\";\n this.size = \"medium\";\n this.caret = false;\n this.disabled = false;\n this.loading = false;\n this.outline = false;\n this.pill = false;\n this.circle = false;\n this.type = \"button\";\n this.name = \"\";\n this.value = \"\";\n this.href = \"\";\n this.rel = \"noreferrer noopener\";\n }\n /** Gets the validity state object */\n get validity() {\n if (this.isButton()) {\n return this.button.validity;\n }\n return validValidityState;\n }\n /** Gets the validation message */\n get validationMessage() {\n if (this.isButton()) {\n return this.button.validationMessage;\n }\n return \"\";\n }\n firstUpdated() {\n if (this.isButton()) {\n this.formControlController.updateValidity();\n }\n }\n handleBlur() {\n this.hasFocus = false;\n this.emit(\"sl-blur\");\n }\n handleFocus() {\n this.hasFocus = true;\n this.emit(\"sl-focus\");\n }\n handleClick() {\n if (this.type === \"submit\") {\n this.formControlController.submit(this);\n }\n if (this.type === \"reset\") {\n this.formControlController.reset(this);\n }\n }\n handleInvalid(event) {\n this.formControlController.setValidity(false);\n this.formControlController.emitInvalidEvent(event);\n }\n isButton() {\n return this.href ? false : true;\n }\n isLink() {\n return this.href ? true : false;\n }\n handleDisabledChange() {\n if (this.isButton()) {\n this.formControlController.setValidity(this.disabled);\n }\n }\n /** Simulates a click on the button. */\n click() {\n this.button.click();\n }\n /** Sets focus on the button. */\n focus(options) {\n this.button.focus(options);\n }\n /** Removes focus from the button. */\n blur() {\n this.button.blur();\n }\n /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */\n checkValidity() {\n if (this.isButton()) {\n return this.button.checkValidity();\n }\n return true;\n }\n /** Gets the associated form, if one exists. */\n getForm() {\n return this.formControlController.getForm();\n }\n /** Checks for validity and shows the browser's validation message if the control is invalid. */\n reportValidity() {\n if (this.isButton()) {\n return this.button.reportValidity();\n }\n return true;\n }\n /** Sets a custom validation message. Pass an empty string to restore validity. */\n setCustomValidity(message) {\n if (this.isButton()) {\n this.button.setCustomValidity(message);\n this.formControlController.updateValidity();\n }\n }\n render() {\n const isLink = this.isLink();\n const tag = isLink ? literal`a` : literal`button`;\n return html`\n <${tag}\n part=\"base\"\n class=${classMap({\n button: true,\n \"button--default\": this.variant === \"default\",\n \"button--primary\": this.variant === \"primary\",\n \"button--success\": this.variant === \"success\",\n \"button--neutral\": this.variant === \"neutral\",\n \"button--warning\": this.variant === \"warning\",\n \"button--danger\": this.variant === \"danger\",\n \"button--text\": this.variant === \"text\",\n \"button--small\": this.size === \"small\",\n \"button--medium\": this.size === \"medium\",\n \"button--large\": this.size === \"large\",\n \"button--caret\": this.caret,\n \"button--circle\": this.circle,\n \"button--disabled\": this.disabled,\n \"button--focused\": this.hasFocus,\n \"button--loading\": this.loading,\n \"button--standard\": !this.outline,\n \"button--outline\": this.outline,\n \"button--pill\": this.pill,\n \"button--rtl\": this.localize.dir() === \"rtl\",\n \"button--has-label\": this.hasSlotController.test(\"[default]\"),\n \"button--has-prefix\": this.hasSlotController.test(\"prefix\"),\n \"button--has-suffix\": this.hasSlotController.test(\"suffix\")\n })}\n ?disabled=${ifDefined(isLink ? void 0 : this.disabled)}\n type=${ifDefined(isLink ? void 0 : this.type)}\n title=${this.title}\n name=${ifDefined(isLink ? void 0 : this.name)}\n value=${ifDefined(isLink ? void 0 : this.value)}\n href=${ifDefined(isLink ? this.href : void 0)}\n target=${ifDefined(isLink ? this.target : void 0)}\n download=${ifDefined(isLink ? this.download : void 0)}\n rel=${ifDefined(isLink ? this.rel : void 0)}\n role=${ifDefined(isLink ? void 0 : \"button\")}\n aria-disabled=${this.disabled ? \"true\" : \"false\"}\n tabindex=${this.disabled ? \"-1\" : \"0\"}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n @invalid=${this.isButton() ? this.handleInvalid : null}\n @click=${this.handleClick}\n >\n \n \n \n ${this.caret ? html` ` : \"\"}\n ${this.loading ? html`` : \"\"}\n \n `;\n }\n};\nSlButton.styles = button_styles_default;\nSlButton.dependencies = {\n \"sl-icon\": SlIcon,\n \"sl-spinner\": SlSpinner\n};\n__decorateClass([\n query(\".button\")\n], SlButton.prototype, \"button\", 2);\n__decorateClass([\n state()\n], SlButton.prototype, \"hasFocus\", 2);\n__decorateClass([\n state()\n], SlButton.prototype, \"invalid\", 2);\n__decorateClass([\n property()\n], SlButton.prototype, \"title\", 2);\n__decorateClass([\n property({ reflect: true })\n], SlButton.prototype, \"variant\", 2);\n__decorateClass([\n property({ reflect: true })\n], SlButton.prototype, \"size\", 2);\n__decorateClass([\n property({ type: Boolean, reflect: true })\n], SlButton.prototype, \"caret\", 2);\n__decorateClass([\n property({ type: Boolean, reflect: true })\n], SlButton.prototype, \"disabled\", 2);\n__decorateClass([\n property({ type: Boolean, reflect: true })\n], SlButton.prototype, \"loading\", 2);\n__decorateClass([\n property({ type: Boolean, reflect: true })\n], SlButton.prototype, \"outline\", 2);\n__decorateClass([\n property({ type: Boolean, reflect: true })\n], SlButton.prototype, \"pill\", 2);\n__decorateClass([\n property({ type: Boolean, reflect: true })\n], SlButton.prototype, \"circle\", 2);\n__decorateClass([\n property()\n], SlButton.prototype, \"type\", 2);\n__decorateClass([\n property()\n], SlButton.prototype, \"name\", 2);\n__decorateClass([\n property()\n], SlButton.prototype, \"value\", 2);\n__decorateClass([\n property()\n], SlButton.prototype, \"href\", 2);\n__decorateClass([\n property()\n], SlButton.prototype, \"target\", 2);\n__decorateClass([\n property()\n], SlButton.prototype, \"rel\", 2);\n__decorateClass([\n property()\n], SlButton.prototype, \"download\", 2);\n__decorateClass([\n property()\n], SlButton.prototype, \"form\", 2);\n__decorateClass([\n property({ attribute: \"formaction\" })\n], SlButton.prototype, \"formAction\", 2);\n__decorateClass([\n property({ attribute: \"formenctype\" })\n], SlButton.prototype, \"formEnctype\", 2);\n__decorateClass([\n property({ attribute: \"formmethod\" })\n], SlButton.prototype, \"formMethod\", 2);\n__decorateClass([\n property({ attribute: \"formnovalidate\", type: Boolean })\n], SlButton.prototype, \"formNoValidate\", 2);\n__decorateClass([\n property({ attribute: \"formtarget\" })\n], SlButton.prototype, \"formTarget\", 2);\n__decorateClass([\n watch(\"disabled\", { waitUntilFirstUpdate: true })\n], SlButton.prototype, \"handleDisabledChange\", 1);\n\nexport {\n SlButton\n};\n","import {\n SlButton\n} from \"./chunk.H5IWQ6LD.js\";\n\n// src/components/button/button.ts\nvar button_default = SlButton;\nSlButton.define(\"sl-button\");\n\nexport {\n button_default\n};\n","import {\n SlIcon\n} from \"./chunk.Y62EZWMI.js\";\n\n// src/components/icon/icon.ts\nvar icon_default = SlIcon;\nSlIcon.define(\"sl-icon\");\n\nexport {\n icon_default\n};\n","import {\n SlSpinner\n} from \"./chunk.XYU7AT6Q.js\";\n\n// src/components/spinner/spinner.ts\nvar spinner_default = SlSpinner;\nSlSpinner.define(\"sl-spinner\");\n\nexport {\n spinner_default\n};\n","import {\n component_styles_default\n} from \"./chunk.TUVJKY7S.js\";\n\n// src/components/dropdown/dropdown.styles.ts\nimport { css } from \"lit\";\nvar dropdown_styles_default = css`\n ${component_styles_default}\n\n :host {\n display: inline-block;\n }\n\n .dropdown::part(popup) {\n z-index: var(--sl-z-index-dropdown);\n }\n\n .dropdown[data-current-placement^='top']::part(popup) {\n transform-origin: bottom;\n }\n\n .dropdown[data-current-placement^='bottom']::part(popup) {\n transform-origin: top;\n }\n\n .dropdown[data-current-placement^='left']::part(popup) {\n transform-origin: right;\n }\n\n .dropdown[data-current-placement^='right']::part(popup) {\n transform-origin: left;\n }\n\n .dropdown__trigger {\n display: block;\n }\n\n .dropdown__panel {\n font-family: var(--sl-font-sans);\n font-size: var(--sl-font-size-medium);\n font-weight: var(--sl-font-weight-normal);\n box-shadow: var(--sl-shadow-large);\n border-radius: var(--sl-border-radius-medium);\n pointer-events: none;\n }\n\n .dropdown--open .dropdown__panel {\n display: block;\n pointer-events: all;\n }\n\n /* When users slot a menu, make sure it conforms to the popup's auto-size */\n ::slotted(sl-menu) {\n max-width: var(--auto-size-available-width) !important;\n max-height: var(--auto-size-available-height) !important;\n }\n`;\n\nexport {\n dropdown_styles_default\n};\n","// src/internal/tabbable.ts\nvar computedStyleMap = /* @__PURE__ */ new WeakMap();\nfunction getCachedComputedStyle(el) {\n let computedStyle = computedStyleMap.get(el);\n if (!computedStyle) {\n computedStyle = window.getComputedStyle(el, null);\n computedStyleMap.set(el, computedStyle);\n }\n return computedStyle;\n}\nfunction isVisible(el) {\n if (typeof el.checkVisibility === \"function\") {\n return el.checkVisibility({ checkOpacity: false, checkVisibilityCSS: true });\n }\n const computedStyle = getCachedComputedStyle(el);\n return computedStyle.visibility !== \"hidden\" && computedStyle.display !== \"none\";\n}\nfunction isOverflowingAndTabbable(el) {\n const computedStyle = getCachedComputedStyle(el);\n const { overflowY, overflowX } = computedStyle;\n if (overflowY === \"scroll\" || overflowX === \"scroll\") {\n return true;\n }\n if (overflowY !== \"auto\" || overflowX !== \"auto\") {\n return false;\n }\n const isOverflowingY = el.scrollHeight > el.clientHeight;\n if (isOverflowingY && overflowY === \"auto\") {\n return true;\n }\n const isOverflowingX = el.scrollWidth > el.clientWidth;\n if (isOverflowingX && overflowX === \"auto\") {\n return true;\n }\n return false;\n}\nfunction isTabbable(el) {\n const tag = el.tagName.toLowerCase();\n const tabindex = Number(el.getAttribute(\"tabindex\"));\n const hasTabindex = el.hasAttribute(\"tabindex\");\n if (hasTabindex && (isNaN(tabindex) || tabindex <= -1)) {\n return false;\n }\n if (el.hasAttribute(\"disabled\")) {\n return false;\n }\n if (el.closest(\"[inert]\")) {\n return false;\n }\n if (tag === \"input\" && el.getAttribute(\"type\") === \"radio\" && !el.hasAttribute(\"checked\")) {\n return false;\n }\n if (!isVisible(el)) {\n return false;\n }\n if ((tag === \"audio\" || tag === \"video\") && el.hasAttribute(\"controls\")) {\n return true;\n }\n if (el.hasAttribute(\"tabindex\")) {\n return true;\n }\n if (el.hasAttribute(\"contenteditable\") && el.getAttribute(\"contenteditable\") !== \"false\") {\n return true;\n }\n const isNativelyTabbable = [\n \"button\",\n \"input\",\n \"select\",\n \"textarea\",\n \"a\",\n \"audio\",\n \"video\",\n \"summary\",\n \"iframe\"\n ].includes(tag);\n if (isNativelyTabbable) {\n return true;\n }\n return isOverflowingAndTabbable(el);\n}\nfunction getTabbableBoundary(root) {\n var _a, _b;\n const tabbableElements = getTabbableElements(root);\n const start = (_a = tabbableElements[0]) != null ? _a : null;\n const end = (_b = tabbableElements[tabbableElements.length - 1]) != null ? _b : null;\n return { start, end };\n}\nfunction getSlottedChildrenOutsideRootElement(slotElement, root) {\n var _a;\n return ((_a = slotElement.getRootNode({ composed: true })) == null ? void 0 : _a.host) !== root;\n}\nfunction getTabbableElements(root) {\n const walkedEls = /* @__PURE__ */ new WeakMap();\n const tabbableElements = [];\n function walk(el) {\n if (el instanceof Element) {\n if (el.hasAttribute(\"inert\") || el.closest(\"[inert]\")) {\n return;\n }\n if (walkedEls.has(el)) {\n return;\n }\n walkedEls.set(el, true);\n if (!tabbableElements.includes(el) && isTabbable(el)) {\n tabbableElements.push(el);\n }\n if (el instanceof HTMLSlotElement && getSlottedChildrenOutsideRootElement(el, root)) {\n el.assignedElements({ flatten: true }).forEach((assignedEl) => {\n walk(assignedEl);\n });\n }\n if (el.shadowRoot !== null && el.shadowRoot.mode === \"open\") {\n walk(el.shadowRoot);\n }\n }\n for (const e of el.children) {\n walk(e);\n }\n }\n walk(root);\n return tabbableElements.sort((a, b) => {\n const aTabindex = Number(a.getAttribute(\"tabindex\")) || 0;\n const bTabindex = Number(b.getAttribute(\"tabindex\")) || 0;\n return bTabindex - aTabindex;\n });\n}\n\nexport {\n getTabbableBoundary,\n getTabbableElements\n};\n","import {\n component_styles_default\n} from \"./chunk.TUVJKY7S.js\";\n\n// src/components/popup/popup.styles.ts\nimport { css } from \"lit\";\nvar popup_styles_default = css`\n ${component_styles_default}\n\n :host {\n --arrow-color: var(--sl-color-neutral-1000);\n --arrow-size: 6px;\n\n /*\n * These properties are computed to account for the arrow's dimensions after being rotated 45º. The constant\n * 0.7071 is derived from sin(45), which is the diagonal size of the arrow's container after rotating.\n */\n --arrow-size-diagonal: calc(var(--arrow-size) * 0.7071);\n --arrow-padding-offset: calc(var(--arrow-size-diagonal) - var(--arrow-size));\n\n display: contents;\n }\n\n .popup {\n position: absolute;\n isolation: isolate;\n max-width: var(--auto-size-available-width, none);\n max-height: var(--auto-size-available-height, none);\n }\n\n .popup--fixed {\n position: fixed;\n }\n\n .popup:not(.popup--active) {\n display: none;\n }\n\n .popup__arrow {\n position: absolute;\n width: calc(var(--arrow-size-diagonal) * 2);\n height: calc(var(--arrow-size-diagonal) * 2);\n rotate: 45deg;\n background: var(--arrow-color);\n z-index: -1;\n }\n\n /* Hover bridge */\n .popup-hover-bridge:not(.popup-hover-bridge--visible) {\n display: none;\n }\n\n .popup-hover-bridge {\n position: fixed;\n z-index: calc(var(--sl-z-index-dropdown) - 1);\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n clip-path: polygon(\n var(--hover-bridge-top-left-x, 0) var(--hover-bridge-top-left-y, 0),\n var(--hover-bridge-top-right-x, 0) var(--hover-bridge-top-right-y, 0),\n var(--hover-bridge-bottom-right-x, 0) var(--hover-bridge-bottom-right-y, 0),\n var(--hover-bridge-bottom-left-x, 0) var(--hover-bridge-bottom-left-y, 0)\n );\n }\n`;\n\nexport {\n popup_styles_default\n};\n","/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nconst oppositeAlignmentMap = {\n start: 'end',\n end: 'start'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nfunction getSideAxis(placement) {\n return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);\n}\nfunction getSideList(side, isStart, rtl) {\n const lr = ['left', 'right'];\n const rl = ['right', 'left'];\n const tb = ['top', 'bottom'];\n const bt = ['bottom', 'top'];\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rl : lr;\n return isStart ? lr : rl;\n case 'left':\n case 'right':\n return isStart ? tb : bt;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n return {\n ...rect,\n top: rect.y,\n left: rect.x,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === 'y';\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n switch (getAlignment(placement)) {\n case 'start':\n coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n case 'end':\n coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n }\n return coords;\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n const validMiddleware = middleware.filter(Boolean);\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let middlewareData = {};\n let resetCount = 0;\n for (let i = 0; i < validMiddleware.length; i++) {\n const {\n name,\n fn\n } = validMiddleware[i];\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData = {\n ...middlewareData,\n [name]: {\n ...middlewareData[name],\n ...data\n }\n };\n if (reset && resetCount <= 50) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = 'clippingAncestors',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === 'floating' ? {\n ...rects.floating,\n x,\n y\n } : rects.reference;\n const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n x: 1,\n y: 1\n } : {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n elements,\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const min$1 = minPadding;\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(min$1, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options,\n async fn(state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const {\n rects,\n middlewareData,\n placement,\n platform,\n elements\n } = state;\n const {\n crossAxis = false,\n alignment,\n allowedPlacements = placements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) {\n return {};\n }\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) {\n return {\n reset: {\n placement: placements$1[0]\n }\n };\n }\n const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements$1[currentIndex + 1];\n\n // There are more placements to check.\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n const placementsSortedByMostSpace = allOverflows.map(d => {\n const alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort((a, b) => a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (resetPlacement !== placement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options,\n async fn(state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n fallbackAxisSideDirection = 'none',\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n\n // If a reset by the arrow was caused due to an alignment offset being\n // added, we should skip any logic now since `flip()` has already done its\n // work.\n // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n const side = getSide(placement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== 'none') {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n\n // One or more sides is overflowing.\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements[nextIndex];\n if (nextPlacement) {\n // Try next placement and re-run the lifecycle.\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n // Otherwise fallback.\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$map$so;\n const placement = (_overflowsData$map$so = overflowsData.map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0];\n if (placement) {\n resetPlacement = placement;\n }\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options,\n async fn(state) {\n const {\n rects\n } = state;\n const {\n strategy = 'referenceHidden',\n ...detectOverflowOptions\n } = evaluate(options, state);\n switch (strategy) {\n case 'referenceHidden':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const offsets = getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n };\n }\n case 'escaped':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n altBoundary: true\n });\n const offsets = getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n {\n return {};\n }\n }\n }\n };\n};\n\nfunction getBoundingRect(rects) {\n const minX = min(...rects.map(rect => rect.left));\n const minY = min(...rects.map(rect => rect.top));\n const maxX = max(...rects.map(rect => rect.right));\n const maxY = max(...rects.map(rect => rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n const groups = [];\n let prevRect = null;\n for (let i = 0; i < sortedRects.length; i++) {\n const rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options,\n async fn(state) {\n const {\n placement,\n elements,\n rects,\n platform,\n strategy\n } = state;\n // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n const {\n padding = 2,\n x,\n y\n } = evaluate(options, state);\n const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n const clientRects = getRectsByLine(nativeClientRects);\n const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n const paddingObject = getPaddingObject(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getSide(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n const isLeftSide = getSide(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n const left = minLeft;\n const right = maxRight;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n });\n if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n return {\n reset: {\n rects: resetRects\n }\n };\n }\n return {};\n }\n };\n};\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform,\n elements\n } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === 'y';\n const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: 0,\n crossAxis: 0,\n alignmentAxis: null,\n ...rawValue\n };\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options,\n async fn(state) {\n var _middlewareData$offse, _middlewareData$arrow;\n const {\n x,\n y,\n placement,\n middlewareData\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n\n // If the placement is the same and the arrow caused an alignment offset\n // then we don't need to change the positioning coordinates.\n if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: {\n ...diffCoords,\n placement\n }\n };\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(getSide(placement));\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n if (checkMainAxis) {\n const minSide = mainAxis === 'y' ? 'top' : 'left';\n const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n const min = mainAxisCoord + overflow[minSide];\n const max = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = clamp(min, mainAxisCoord, max);\n }\n if (checkCrossAxis) {\n const minSide = crossAxis === 'y' ? 'top' : 'left';\n const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n const min = crossAxisCoord + overflow[minSide];\n const max = crossAxisCoord - overflow[maxSide];\n crossAxisCoord = clamp(min, crossAxisCoord, max);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y\n }\n };\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options,\n fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = state;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = evaluate(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: 0,\n crossAxis: 0,\n ...rawOffset\n };\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = ['top', 'left'].includes(getSide(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options,\n async fn(state) {\n const {\n placement,\n rects,\n platform,\n elements\n } = state;\n const {\n apply = () => {},\n ...detectOverflowOptions\n } = evaluate(options, state);\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isYAxis = getSideAxis(placement) === 'y';\n const {\n width,\n height\n } = rects.floating;\n let heightSide;\n let widthSide;\n if (side === 'top' || side === 'bottom') {\n heightSide = side;\n widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n } else {\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n }\n const overflowAvailableHeight = height - overflow[heightSide];\n const overflowAvailableWidth = width - overflow[widthSide];\n const noShift = !state.middlewareData.shift;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if (isYAxis) {\n const maximumClippingWidth = width - overflow.left - overflow.right;\n availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;\n } else {\n const maximumClippingHeight = height - overflow.top - overflow.bottom;\n availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;\n }\n if (noShift && !alignment) {\n const xMin = max(overflow.left, 0);\n const xMax = max(overflow.right, 0);\n const yMin = max(overflow.top, 0);\n const yMax = max(overflow.bottom, 0);\n if (isYAxis) {\n availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n } else {\n availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n }\n }\n await apply({\n ...state,\n availableWidth,\n availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) {\n return {\n reset: {\n rects: true\n }\n };\n }\n return {};\n }\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n","function getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n // Browsers without `ShadowRoot` support.\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);\n}\nfunction isTableElement(element) {\n return ['table', 'td', 'th'].includes(getNodeName(element));\n}\nfunction isContainingBlock(element) {\n const webkit = isWebKit();\n const css = getComputedStyle(element);\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else {\n currentNode = getParentNode(currentNode);\n }\n }\n return null;\n}\nfunction isWebKit() {\n if (typeof CSS === 'undefined' || !CSS.supports) return false;\n return CSS.supports('-webkit-backdrop-filter', 'none');\n}\nfunction isLastTraversableNode(node) {\n return ['html', 'body', '#document'].includes(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.pageXOffset,\n scrollTop: element.pageYOffset\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []);\n }\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isWebKit };\n","import { rectToClientRect, autoPlacement as autoPlacement$1, shift as shift$1, flip as flip$1, size as size$1, hide as hide$1, arrow as arrow$1, inline as inline$1, limitShift as limitShift$1, computePosition as computePosition$1 } from '@floating-ui/core';\nexport { detectOverflow, offset } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle, isHTMLElement, isElement, getWindow, isWebKit, getDocumentElement, getNodeName, isOverflowElement, getNodeScroll, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n return false;\n }\n return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement) {\n const win = getWindow(domElement);\n const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentIFrame = win.frameElement;\n while (currentIFrame && offsetParent && offsetWin !== win) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentIFrame = getWindow(currentIFrame).frameElement;\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\nconst topLayerSelectors = [':popover-open', ':modal'];\nfunction isTopLayer(floating) {\n return topLayerSelectors.some(selector => {\n try {\n return floating.matches(selector);\n } catch (e) {\n return false;\n }\n });\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n elements,\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isFixed = strategy === 'fixed';\n const documentElement = getDocumentElement(offsetParent);\n const topLayer = elements ? isTopLayer(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isHTMLElement(offsetParent)) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y\n };\n}\n\nfunction getClientRects(element) {\n return Array.from(element.getClientRects());\n}\n\nfunction getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = element.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n if (getComputedStyle(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\nfunction getViewportRect(element, strategy) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n const visualViewportBased = isWebKit();\n if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport') {\n rect = getViewportRect(element, strategy);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n ...clippingAncestor,\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y\n };\n }\n return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n const parentNode = getParentNode(element);\n if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n return false;\n }\n return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let currentContainingBlockComputedStyle = null;\n const elementIsFixed = getComputedStyle(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n currentContainingBlockComputedStyle = null;\n }\n const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // Record last containing block for next iteration.\n currentContainingBlockComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstClippingAncestor = clippingAncestors[0];\n const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));\n return {\n width: clippingRect.right - clippingRect.left,\n height: clippingRect.bottom - clippingRect.top,\n x: clippingRect.left,\n y: clippingRect.top\n };\n}\n\nfunction getDimensions(element) {\n const {\n width,\n height\n } = getCssDimensions(element);\n return {\n width,\n height\n };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n const x = rect.left + scroll.scrollLeft - offsets.x;\n const y = rect.top + scroll.scrollTop - offsets.y;\n return {\n x,\n y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n return element.offsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const window = getWindow(element);\n if (!isHTMLElement(element) || isTopLayer(element)) {\n return window;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {\n return window;\n }\n return offsetParent || getContainingBlock(element) || window;\n}\n\nconst getElementRects = async function (data) {\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n return {\n reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n floating: {\n x: 0,\n y: 0,\n ...(await getDimensionsFn(data.floating))\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const {\n left,\n top,\n width,\n height\n } = element.getBoundingClientRect();\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 100);\n } else {\n refresh(false, ratio);\n }\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle