From b8b3b1bb2ce92269e1006f6f44616eecc870079f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ilyas=20T=C3=BCrkben?= Date: Thu, 11 Jul 2024 18:34:01 +0200 Subject: [PATCH] rte integration in progress --- mas.css | 0 package-lock.json | 17 +- package.json | 1 + studio/libs/studio.js | 5696 --------------- studio/libs/swc.js | 9010 ------------------------ studio/package.json | 6 +- studio/src/rte-editor.js | 16 + studio/src/store/Store.js | 2 +- studio/src/studio.js | 121 +- studio/src/swc.js | 19 +- studio/style.css | 21 +- studio/test/studio.test.html | 47 +- studio/test/studio.test.html.js | 21 + web-components/src/merch-datasource.js | 24 +- 14 files changed, 239 insertions(+), 14762 deletions(-) create mode 100644 mas.css delete mode 100644 studio/libs/studio.js delete mode 100644 studio/libs/swc.js create mode 100644 studio/src/rte-editor.js diff --git a/mas.css b/mas.css new file mode 100644 index 00000000..e69de29b diff --git a/package-lock.json b/package-lock.json index 0adbe955..36d18bc6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,6 +22,7 @@ "@spectrum-web-components/button-group": "^0.43.0", "@spectrum-web-components/checkbox": "^0.43.0", "@spectrum-web-components/dialog": "^0.43.0", + "@spectrum-web-components/divider": "^0.43.0", "@spectrum-web-components/help-text": "^0.43.0", "@spectrum-web-components/icon": "^0.43.0", "@spectrum-web-components/icons": "^0.43.0", @@ -1537,6 +1538,12 @@ "@spectrum-web-components/base": "^0.43.0" } }, + "node_modules/@tinymce/tinymce-webcomponent": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@tinymce/tinymce-webcomponent/-/tinymce-webcomponent-2.1.0.tgz", + "integrity": "sha512-71pMNHqk2iDEagrrBH+zuUAtgrHaDGDIlgnJsLfA3nHlk8FyhM6eCtPAEwUQtFh0sgPRrx1VNuz/JRawQUdL/g==", + "license": "MIT" + }, "node_modules/@types/accepts": { "version": "1.3.7", "resolved": "https://registry.npmjs.org/@types/accepts/-/accepts-1.3.7.tgz", @@ -7046,6 +7053,12 @@ "dev": true, "license": "MIT" }, + "node_modules/tinymce": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/tinymce/-/tinymce-7.2.1.tgz", + "integrity": "sha512-ADd1cvdIuq6NWyii0ZOZRuu+9sHIdQfcRNWBcBps2K8vy7OjlRkX6iw7zz1WlL9kY4z4L1DvIP+xOrVX/46aHA==", + "license": "GPL-2.0-or-later" + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -7412,7 +7425,9 @@ "@adobe/mas": "^0.0.1", "@adobe/mas-commons": "^0.0.1", "@adobe/mas-web-components": "^0.0.1", - "mobx": "^6.12.4" + "@tinymce/tinymce-webcomponent": "^2.1.0", + "mobx": "^6.12.4", + "tinymce": "^7.2.1" }, "devDependencies": { "@web/dev-server-import-maps": "^0.2.1", diff --git a/package.json b/package.json index f8dec8db..10809005 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "@spectrum-web-components/button": "^0.43.0", "@spectrum-web-components/checkbox": "^0.43.0", "@spectrum-web-components/dialog": "^0.43.0", + "@spectrum-web-components/divider": "^0.43.0", "@spectrum-web-components/help-text": "^0.43.0", "@spectrum-web-components/icon": "^0.43.0", "@spectrum-web-components/icons-workflow": "^0.43.0", diff --git a/studio/libs/studio.js b/studio/libs/studio.js deleted file mode 100644 index 66ca0661..00000000 --- a/studio/libs/studio.js +++ /dev/null @@ -1,5696 +0,0 @@ -// ../node_modules/lit/node_modules/@lit/reactive-element/css-tag.js -var t = window; -var e = t.ShadowRoot && (void 0 === t.ShadyCSS || t.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype; -var s = Symbol(); -var n = /* @__PURE__ */ new WeakMap(); -var o = class { - constructor(t5, e7, n7) { - if (this._$cssResult$ = true, n7 !== s) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); - this.cssText = t5, this.t = e7; - } - get styleSheet() { - let t5 = this.o; - const s8 = this.t; - if (e && void 0 === t5) { - const e7 = void 0 !== s8 && 1 === s8.length; - e7 && (t5 = n.get(s8)), void 0 === t5 && ((this.o = t5 = new CSSStyleSheet()).replaceSync(this.cssText), e7 && n.set(s8, t5)); - } - return t5; - } - toString() { - return this.cssText; - } -}; -var r = (t5) => new o("string" == typeof t5 ? t5 : t5 + "", void 0, s); -var S = (s8, n7) => { - e ? s8.adoptedStyleSheets = n7.map((t5) => t5 instanceof CSSStyleSheet ? t5 : t5.styleSheet) : n7.forEach((e7) => { - const n8 = document.createElement("style"), o7 = t.litNonce; - void 0 !== o7 && n8.setAttribute("nonce", o7), n8.textContent = e7.cssText, s8.appendChild(n8); - }); -}; -var c = e ? (t5) => t5 : (t5) => t5 instanceof CSSStyleSheet ? ((t6) => { - let e7 = ""; - for (const s8 of t6.cssRules) e7 += s8.cssText; - return r(e7); -})(t5) : t5; - -// ../node_modules/lit/node_modules/@lit/reactive-element/reactive-element.js -var s2; -var e2 = window; -var r2 = e2.trustedTypes; -var h = r2 ? r2.emptyScript : ""; -var o2 = e2.reactiveElementPolyfillSupport; -var n2 = { toAttribute(t5, i5) { - switch (i5) { - case Boolean: - t5 = t5 ? h : null; - break; - case Object: - case Array: - t5 = null == t5 ? t5 : JSON.stringify(t5); - } - return t5; -}, fromAttribute(t5, i5) { - let s8 = t5; - switch (i5) { - case Boolean: - s8 = null !== t5; - break; - case Number: - s8 = null === t5 ? null : Number(t5); - break; - case Object: - case Array: - try { - s8 = JSON.parse(t5); - } catch (t6) { - s8 = null; - } - } - return s8; -} }; -var a = (t5, i5) => i5 !== t5 && (i5 == i5 || t5 == t5); -var l = { attribute: true, type: String, converter: n2, reflect: false, hasChanged: a }; -var d = "finalized"; -var u = class extends HTMLElement { - constructor() { - super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = false, this.hasUpdated = false, this._$El = null, this._$Eu(); - } - static addInitializer(t5) { - var i5; - this.finalize(), (null !== (i5 = this.h) && void 0 !== i5 ? i5 : this.h = []).push(t5); - } - static get observedAttributes() { - this.finalize(); - const t5 = []; - return this.elementProperties.forEach((i5, s8) => { - const e7 = this._$Ep(s8, i5); - void 0 !== e7 && (this._$Ev.set(e7, s8), t5.push(e7)); - }), t5; - } - static createProperty(t5, i5 = l) { - if (i5.state && (i5.attribute = false), this.finalize(), this.elementProperties.set(t5, i5), !i5.noAccessor && !this.prototype.hasOwnProperty(t5)) { - const s8 = "symbol" == typeof t5 ? Symbol() : "__" + t5, e7 = this.getPropertyDescriptor(t5, s8, i5); - void 0 !== e7 && Object.defineProperty(this.prototype, t5, e7); - } - } - static getPropertyDescriptor(t5, i5, s8) { - return { get() { - return this[i5]; - }, set(e7) { - const r7 = this[t5]; - this[i5] = e7, this.requestUpdate(t5, r7, s8); - }, configurable: true, enumerable: true }; - } - static getPropertyOptions(t5) { - return this.elementProperties.get(t5) || l; - } - static finalize() { - if (this.hasOwnProperty(d)) return false; - this[d] = true; - const t5 = Object.getPrototypeOf(this); - if (t5.finalize(), void 0 !== t5.h && (this.h = [...t5.h]), this.elementProperties = new Map(t5.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) { - const t6 = this.properties, i5 = [...Object.getOwnPropertyNames(t6), ...Object.getOwnPropertySymbols(t6)]; - for (const s8 of i5) this.createProperty(s8, t6[s8]); - } - return this.elementStyles = this.finalizeStyles(this.styles), true; - } - static finalizeStyles(i5) { - const s8 = []; - if (Array.isArray(i5)) { - const e7 = new Set(i5.flat(1 / 0).reverse()); - for (const i6 of e7) s8.unshift(c(i6)); - } else void 0 !== i5 && s8.push(c(i5)); - return s8; - } - static _$Ep(t5, i5) { - const s8 = i5.attribute; - return false === s8 ? void 0 : "string" == typeof s8 ? s8 : "string" == typeof t5 ? t5.toLowerCase() : void 0; - } - _$Eu() { - var t5; - this._$E_ = new Promise((t6) => this.enableUpdating = t6), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), null === (t5 = this.constructor.h) || void 0 === t5 || t5.forEach((t6) => t6(this)); - } - addController(t5) { - var i5, s8; - (null !== (i5 = this._$ES) && void 0 !== i5 ? i5 : this._$ES = []).push(t5), void 0 !== this.renderRoot && this.isConnected && (null === (s8 = t5.hostConnected) || void 0 === s8 || s8.call(t5)); - } - removeController(t5) { - var i5; - null === (i5 = this._$ES) || void 0 === i5 || i5.splice(this._$ES.indexOf(t5) >>> 0, 1); - } - _$Eg() { - this.constructor.elementProperties.forEach((t5, i5) => { - this.hasOwnProperty(i5) && (this._$Ei.set(i5, this[i5]), delete this[i5]); - }); - } - createRenderRoot() { - var t5; - const s8 = null !== (t5 = this.shadowRoot) && void 0 !== t5 ? t5 : this.attachShadow(this.constructor.shadowRootOptions); - return S(s8, this.constructor.elementStyles), s8; - } - connectedCallback() { - var t5; - void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(true), null === (t5 = this._$ES) || void 0 === t5 || t5.forEach((t6) => { - var i5; - return null === (i5 = t6.hostConnected) || void 0 === i5 ? void 0 : i5.call(t6); - }); - } - enableUpdating(t5) { - } - disconnectedCallback() { - var t5; - null === (t5 = this._$ES) || void 0 === t5 || t5.forEach((t6) => { - var i5; - return null === (i5 = t6.hostDisconnected) || void 0 === i5 ? void 0 : i5.call(t6); - }); - } - attributeChangedCallback(t5, i5, s8) { - this._$AK(t5, s8); - } - _$EO(t5, i5, s8 = l) { - var e7; - const r7 = this.constructor._$Ep(t5, s8); - if (void 0 !== r7 && true === s8.reflect) { - const h4 = (void 0 !== (null === (e7 = s8.converter) || void 0 === e7 ? void 0 : e7.toAttribute) ? s8.converter : n2).toAttribute(i5, s8.type); - this._$El = t5, null == h4 ? this.removeAttribute(r7) : this.setAttribute(r7, h4), this._$El = null; - } - } - _$AK(t5, i5) { - var s8; - const e7 = this.constructor, r7 = e7._$Ev.get(t5); - if (void 0 !== r7 && this._$El !== r7) { - const t6 = e7.getPropertyOptions(r7), h4 = "function" == typeof t6.converter ? { fromAttribute: t6.converter } : void 0 !== (null === (s8 = t6.converter) || void 0 === s8 ? void 0 : s8.fromAttribute) ? t6.converter : n2; - this._$El = r7, this[r7] = h4.fromAttribute(i5, t6.type), this._$El = null; - } - } - requestUpdate(t5, i5, s8) { - let e7 = true; - void 0 !== t5 && (((s8 = s8 || this.constructor.getPropertyOptions(t5)).hasChanged || a)(this[t5], i5) ? (this._$AL.has(t5) || this._$AL.set(t5, i5), true === s8.reflect && this._$El !== t5 && (void 0 === this._$EC && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t5, s8))) : e7 = false), !this.isUpdatePending && e7 && (this._$E_ = this._$Ej()); - } - async _$Ej() { - this.isUpdatePending = true; - try { - await this._$E_; - } catch (t6) { - Promise.reject(t6); - } - const t5 = this.scheduleUpdate(); - return null != t5 && await t5, !this.isUpdatePending; - } - scheduleUpdate() { - return this.performUpdate(); - } - performUpdate() { - var t5; - if (!this.isUpdatePending) return; - this.hasUpdated, this._$Ei && (this._$Ei.forEach((t6, i6) => this[i6] = t6), this._$Ei = void 0); - let i5 = false; - const s8 = this._$AL; - try { - i5 = this.shouldUpdate(s8), i5 ? (this.willUpdate(s8), null === (t5 = this._$ES) || void 0 === t5 || t5.forEach((t6) => { - var i6; - return null === (i6 = t6.hostUpdate) || void 0 === i6 ? void 0 : i6.call(t6); - }), this.update(s8)) : this._$Ek(); - } catch (t6) { - throw i5 = false, this._$Ek(), t6; - } - i5 && this._$AE(s8); - } - willUpdate(t5) { - } - _$AE(t5) { - var i5; - null === (i5 = this._$ES) || void 0 === i5 || i5.forEach((t6) => { - var i6; - return null === (i6 = t6.hostUpdated) || void 0 === i6 ? void 0 : i6.call(t6); - }), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t5)), this.updated(t5); - } - _$Ek() { - this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = false; - } - get updateComplete() { - return this.getUpdateComplete(); - } - getUpdateComplete() { - return this._$E_; - } - shouldUpdate(t5) { - return true; - } - update(t5) { - void 0 !== this._$EC && (this._$EC.forEach((t6, i5) => this._$EO(i5, this[i5], t6)), this._$EC = void 0), this._$Ek(); - } - updated(t5) { - } - firstUpdated(t5) { - } -}; -u[d] = true, u.elementProperties = /* @__PURE__ */ new Map(), u.elementStyles = [], u.shadowRootOptions = { mode: "open" }, null == o2 || o2({ ReactiveElement: u }), (null !== (s2 = e2.reactiveElementVersions) && void 0 !== s2 ? s2 : e2.reactiveElementVersions = []).push("1.6.3"); - -// ../node_modules/lit-html/lit-html.js -var t2; -var i2 = window; -var s3 = i2.trustedTypes; -var e3 = s3 ? s3.createPolicy("lit-html", { createHTML: (t5) => t5 }) : void 0; -var o3 = "$lit$"; -var n3 = `lit$${(Math.random() + "").slice(9)}$`; -var l2 = "?" + n3; -var h2 = `<${l2}>`; -var r3 = document; -var u2 = () => r3.createComment(""); -var d2 = (t5) => null === t5 || "object" != typeof t5 && "function" != typeof t5; -var c2 = Array.isArray; -var v = (t5) => c2(t5) || "function" == typeof (null == t5 ? void 0 : t5[Symbol.iterator]); -var a2 = "[ \n\f\r]"; -var f = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g; -var _ = /-->/g; -var m = />/g; -var p = RegExp(`>|${a2}(?:([^\\s"'>=/]+)(${a2}*=${a2}*(?:[^ -\f\r"'\`<>=]|("|')|))|$)`, "g"); -var g = /'/g; -var $ = /"/g; -var y = /^(?:script|style|textarea|title)$/i; -var w = (t5) => (i5, ...s8) => ({ _$litType$: t5, strings: i5, values: s8 }); -var x = w(1); -var b = w(2); -var T = Symbol.for("lit-noChange"); -var A = Symbol.for("lit-nothing"); -var E = /* @__PURE__ */ new WeakMap(); -var C = r3.createTreeWalker(r3, 129, null, false); -function P(t5, i5) { - if (!Array.isArray(t5) || !t5.hasOwnProperty("raw")) throw Error("invalid template strings array"); - return void 0 !== e3 ? e3.createHTML(i5) : i5; -} -var V = (t5, i5) => { - const s8 = t5.length - 1, e7 = []; - let l6, r7 = 2 === i5 ? "" : "", u5 = f; - for (let i6 = 0; i6 < s8; i6++) { - const s9 = t5[i6]; - let d4, c6, v2 = -1, a5 = 0; - for (; a5 < s9.length && (u5.lastIndex = a5, c6 = u5.exec(s9), null !== c6); ) a5 = u5.lastIndex, u5 === f ? "!--" === c6[1] ? u5 = _ : void 0 !== c6[1] ? u5 = m : void 0 !== c6[2] ? (y.test(c6[2]) && (l6 = RegExp("" === c6[0] ? (u5 = null != l6 ? l6 : f, v2 = -1) : void 0 === c6[1] ? v2 = -2 : (v2 = u5.lastIndex - c6[2].length, d4 = c6[1], u5 = void 0 === c6[3] ? p : '"' === c6[3] ? $ : g) : u5 === $ || u5 === g ? u5 = p : u5 === _ || u5 === m ? u5 = f : (u5 = p, l6 = void 0); - const w2 = u5 === p && t5[i6 + 1].startsWith("/>") ? " " : ""; - r7 += u5 === f ? s9 + h2 : v2 >= 0 ? (e7.push(d4), s9.slice(0, v2) + o3 + s9.slice(v2) + n3 + w2) : s9 + n3 + (-2 === v2 ? (e7.push(void 0), i6) : w2); - } - return [P(t5, r7 + (t5[s8] || "") + (2 === i5 ? "" : "")), e7]; -}; -var N = class _N { - constructor({ strings: t5, _$litType$: i5 }, e7) { - let h4; - this.parts = []; - let r7 = 0, d4 = 0; - const c6 = t5.length - 1, v2 = this.parts, [a5, f3] = V(t5, i5); - if (this.el = _N.createElement(a5, e7), C.currentNode = this.el.content, 2 === i5) { - const t6 = this.el.content, i6 = t6.firstChild; - i6.remove(), t6.append(...i6.childNodes); - } - for (; null !== (h4 = C.nextNode()) && v2.length < c6; ) { - if (1 === h4.nodeType) { - if (h4.hasAttributes()) { - const t6 = []; - for (const i6 of h4.getAttributeNames()) if (i6.endsWith(o3) || i6.startsWith(n3)) { - const s8 = f3[d4++]; - if (t6.push(i6), void 0 !== s8) { - const t7 = h4.getAttribute(s8.toLowerCase() + o3).split(n3), i7 = /([.?@])?(.*)/.exec(s8); - v2.push({ type: 1, index: r7, name: i7[2], strings: t7, ctor: "." === i7[1] ? H : "?" === i7[1] ? L : "@" === i7[1] ? z : k }); - } else v2.push({ type: 6, index: r7 }); - } - for (const i6 of t6) h4.removeAttribute(i6); - } - if (y.test(h4.tagName)) { - const t6 = h4.textContent.split(n3), i6 = t6.length - 1; - if (i6 > 0) { - h4.textContent = s3 ? s3.emptyScript : ""; - for (let s8 = 0; s8 < i6; s8++) h4.append(t6[s8], u2()), C.nextNode(), v2.push({ type: 2, index: ++r7 }); - h4.append(t6[i6], u2()); - } - } - } else if (8 === h4.nodeType) if (h4.data === l2) v2.push({ type: 2, index: r7 }); - else { - let t6 = -1; - for (; -1 !== (t6 = h4.data.indexOf(n3, t6 + 1)); ) v2.push({ type: 7, index: r7 }), t6 += n3.length - 1; - } - r7++; - } - } - static createElement(t5, i5) { - const s8 = r3.createElement("template"); - return s8.innerHTML = t5, s8; - } -}; -function S2(t5, i5, s8 = t5, e7) { - var o7, n7, l6, h4; - if (i5 === T) return i5; - let r7 = void 0 !== e7 ? null === (o7 = s8._$Co) || void 0 === o7 ? void 0 : o7[e7] : s8._$Cl; - const u5 = d2(i5) ? void 0 : i5._$litDirective$; - return (null == r7 ? void 0 : r7.constructor) !== u5 && (null === (n7 = null == r7 ? void 0 : r7._$AO) || void 0 === n7 || n7.call(r7, false), void 0 === u5 ? r7 = void 0 : (r7 = new u5(t5), r7._$AT(t5, s8, e7)), void 0 !== e7 ? (null !== (l6 = (h4 = s8)._$Co) && void 0 !== l6 ? l6 : h4._$Co = [])[e7] = r7 : s8._$Cl = r7), void 0 !== r7 && (i5 = S2(t5, r7._$AS(t5, i5.values), r7, e7)), i5; -} -var M = class { - constructor(t5, i5) { - this._$AV = [], this._$AN = void 0, this._$AD = t5, this._$AM = i5; - } - get parentNode() { - return this._$AM.parentNode; - } - get _$AU() { - return this._$AM._$AU; - } - u(t5) { - var i5; - const { el: { content: s8 }, parts: e7 } = this._$AD, o7 = (null !== (i5 = null == t5 ? void 0 : t5.creationScope) && void 0 !== i5 ? i5 : r3).importNode(s8, true); - C.currentNode = o7; - let n7 = C.nextNode(), l6 = 0, h4 = 0, u5 = e7[0]; - for (; void 0 !== u5; ) { - if (l6 === u5.index) { - let i6; - 2 === u5.type ? i6 = new R(n7, n7.nextSibling, this, t5) : 1 === u5.type ? i6 = new u5.ctor(n7, u5.name, u5.strings, this, t5) : 6 === u5.type && (i6 = new Z(n7, this, t5)), this._$AV.push(i6), u5 = e7[++h4]; - } - l6 !== (null == u5 ? void 0 : u5.index) && (n7 = C.nextNode(), l6++); - } - return C.currentNode = r3, o7; - } - v(t5) { - let i5 = 0; - for (const s8 of this._$AV) void 0 !== s8 && (void 0 !== s8.strings ? (s8._$AI(t5, s8, i5), i5 += s8.strings.length - 2) : s8._$AI(t5[i5])), i5++; - } -}; -var R = class _R { - constructor(t5, i5, s8, e7) { - var o7; - this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t5, this._$AB = i5, this._$AM = s8, this.options = e7, this._$Cp = null === (o7 = null == e7 ? void 0 : e7.isConnected) || void 0 === o7 || o7; - } - get _$AU() { - var t5, i5; - return null !== (i5 = null === (t5 = this._$AM) || void 0 === t5 ? void 0 : t5._$AU) && void 0 !== i5 ? i5 : this._$Cp; - } - get parentNode() { - let t5 = this._$AA.parentNode; - const i5 = this._$AM; - return void 0 !== i5 && 11 === (null == t5 ? void 0 : t5.nodeType) && (t5 = i5.parentNode), t5; - } - get startNode() { - return this._$AA; - } - get endNode() { - return this._$AB; - } - _$AI(t5, i5 = this) { - t5 = S2(this, t5, i5), d2(t5) ? t5 === A || null == t5 || "" === t5 ? (this._$AH !== A && this._$AR(), this._$AH = A) : t5 !== this._$AH && t5 !== T && this._(t5) : void 0 !== t5._$litType$ ? this.g(t5) : void 0 !== t5.nodeType ? this.$(t5) : v(t5) ? this.T(t5) : this._(t5); - } - k(t5) { - return this._$AA.parentNode.insertBefore(t5, this._$AB); - } - $(t5) { - this._$AH !== t5 && (this._$AR(), this._$AH = this.k(t5)); - } - _(t5) { - this._$AH !== A && d2(this._$AH) ? this._$AA.nextSibling.data = t5 : this.$(r3.createTextNode(t5)), this._$AH = t5; - } - g(t5) { - var i5; - const { values: s8, _$litType$: e7 } = t5, o7 = "number" == typeof e7 ? this._$AC(t5) : (void 0 === e7.el && (e7.el = N.createElement(P(e7.h, e7.h[0]), this.options)), e7); - if ((null === (i5 = this._$AH) || void 0 === i5 ? void 0 : i5._$AD) === o7) this._$AH.v(s8); - else { - const t6 = new M(o7, this), i6 = t6.u(this.options); - t6.v(s8), this.$(i6), this._$AH = t6; - } - } - _$AC(t5) { - let i5 = E.get(t5.strings); - return void 0 === i5 && E.set(t5.strings, i5 = new N(t5)), i5; - } - T(t5) { - c2(this._$AH) || (this._$AH = [], this._$AR()); - const i5 = this._$AH; - let s8, e7 = 0; - for (const o7 of t5) e7 === i5.length ? i5.push(s8 = new _R(this.k(u2()), this.k(u2()), this, this.options)) : s8 = i5[e7], s8._$AI(o7), e7++; - e7 < i5.length && (this._$AR(s8 && s8._$AB.nextSibling, e7), i5.length = e7); - } - _$AR(t5 = this._$AA.nextSibling, i5) { - var s8; - for (null === (s8 = this._$AP) || void 0 === s8 || s8.call(this, false, true, i5); t5 && t5 !== this._$AB; ) { - const i6 = t5.nextSibling; - t5.remove(), t5 = i6; - } - } - setConnected(t5) { - var i5; - void 0 === this._$AM && (this._$Cp = t5, null === (i5 = this._$AP) || void 0 === i5 || i5.call(this, t5)); - } -}; -var k = class { - constructor(t5, i5, s8, e7, o7) { - this.type = 1, this._$AH = A, this._$AN = void 0, this.element = t5, this.name = i5, this._$AM = e7, this.options = o7, s8.length > 2 || "" !== s8[0] || "" !== s8[1] ? (this._$AH = Array(s8.length - 1).fill(new String()), this.strings = s8) : this._$AH = A; - } - get tagName() { - return this.element.tagName; - } - get _$AU() { - return this._$AM._$AU; - } - _$AI(t5, i5 = this, s8, e7) { - const o7 = this.strings; - let n7 = false; - if (void 0 === o7) t5 = S2(this, t5, i5, 0), n7 = !d2(t5) || t5 !== this._$AH && t5 !== T, n7 && (this._$AH = t5); - else { - const e8 = t5; - let l6, h4; - for (t5 = o7[0], l6 = 0; l6 < o7.length - 1; l6++) h4 = S2(this, e8[s8 + l6], i5, l6), h4 === T && (h4 = this._$AH[l6]), n7 || (n7 = !d2(h4) || h4 !== this._$AH[l6]), h4 === A ? t5 = A : t5 !== A && (t5 += (null != h4 ? h4 : "") + o7[l6 + 1]), this._$AH[l6] = h4; - } - n7 && !e7 && this.j(t5); - } - j(t5) { - t5 === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t5 ? t5 : ""); - } -}; -var H = class extends k { - constructor() { - super(...arguments), this.type = 3; - } - j(t5) { - this.element[this.name] = t5 === A ? void 0 : t5; - } -}; -var I = s3 ? s3.emptyScript : ""; -var L = class extends k { - constructor() { - super(...arguments), this.type = 4; - } - j(t5) { - t5 && t5 !== A ? this.element.setAttribute(this.name, I) : this.element.removeAttribute(this.name); - } -}; -var z = class extends k { - constructor(t5, i5, s8, e7, o7) { - super(t5, i5, s8, e7, o7), this.type = 5; - } - _$AI(t5, i5 = this) { - var s8; - if ((t5 = null !== (s8 = S2(this, t5, i5, 0)) && void 0 !== s8 ? s8 : A) === T) return; - const e7 = this._$AH, o7 = t5 === A && e7 !== A || t5.capture !== e7.capture || t5.once !== e7.once || t5.passive !== e7.passive, n7 = t5 !== A && (e7 === A || o7); - o7 && this.element.removeEventListener(this.name, this, e7), n7 && this.element.addEventListener(this.name, this, t5), this._$AH = t5; - } - handleEvent(t5) { - var i5, s8; - "function" == typeof this._$AH ? this._$AH.call(null !== (s8 = null === (i5 = this.options) || void 0 === i5 ? void 0 : i5.host) && void 0 !== s8 ? s8 : this.element, t5) : this._$AH.handleEvent(t5); - } -}; -var Z = class { - constructor(t5, i5, s8) { - this.element = t5, this.type = 6, this._$AN = void 0, this._$AM = i5, this.options = s8; - } - get _$AU() { - return this._$AM._$AU; - } - _$AI(t5) { - S2(this, t5); - } -}; -var j = { O: o3, P: n3, A: l2, C: 1, M: V, L: M, R: v, D: S2, I: R, V: k, H: L, N: z, U: H, F: Z }; -var B = i2.litHtmlPolyfillSupport; -null == B || B(N, R), (null !== (t2 = i2.litHtmlVersions) && void 0 !== t2 ? t2 : i2.litHtmlVersions = []).push("2.8.0"); -var D = (t5, i5, s8) => { - var e7, o7; - const n7 = null !== (e7 = null == s8 ? void 0 : s8.renderBefore) && void 0 !== e7 ? e7 : i5; - let l6 = n7._$litPart$; - if (void 0 === l6) { - const t6 = null !== (o7 = null == s8 ? void 0 : s8.renderBefore) && void 0 !== o7 ? o7 : null; - n7._$litPart$ = l6 = new R(i5.insertBefore(u2(), t6), t6, void 0, null != s8 ? s8 : {}); - } - return l6._$AI(t5), l6; -}; - -// ../node_modules/lit-element/node_modules/@lit/reactive-element/css-tag.js -var t3 = window; -var e4 = t3.ShadowRoot && (void 0 === t3.ShadyCSS || t3.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype; -var s4 = Symbol(); -var n4 = /* @__PURE__ */ new WeakMap(); -var o4 = class { - constructor(t5, e7, n7) { - if (this._$cssResult$ = true, n7 !== s4) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); - this.cssText = t5, this.t = e7; - } - get styleSheet() { - let t5 = this.o; - const s8 = this.t; - if (e4 && void 0 === t5) { - const e7 = void 0 !== s8 && 1 === s8.length; - e7 && (t5 = n4.get(s8)), void 0 === t5 && ((this.o = t5 = new CSSStyleSheet()).replaceSync(this.cssText), e7 && n4.set(s8, t5)); - } - return t5; - } - toString() { - return this.cssText; - } -}; -var r4 = (t5) => new o4("string" == typeof t5 ? t5 : t5 + "", void 0, s4); -var S3 = (s8, n7) => { - e4 ? s8.adoptedStyleSheets = n7.map((t5) => t5 instanceof CSSStyleSheet ? t5 : t5.styleSheet) : n7.forEach((e7) => { - const n8 = document.createElement("style"), o7 = t3.litNonce; - void 0 !== o7 && n8.setAttribute("nonce", o7), n8.textContent = e7.cssText, s8.appendChild(n8); - }); -}; -var c3 = e4 ? (t5) => t5 : (t5) => t5 instanceof CSSStyleSheet ? ((t6) => { - let e7 = ""; - for (const s8 of t6.cssRules) e7 += s8.cssText; - return r4(e7); -})(t5) : t5; - -// ../node_modules/lit-element/node_modules/@lit/reactive-element/reactive-element.js -var s5; -var e5 = window; -var r5 = e5.trustedTypes; -var h3 = r5 ? r5.emptyScript : ""; -var o5 = e5.reactiveElementPolyfillSupport; -var n5 = { toAttribute(t5, i5) { - switch (i5) { - case Boolean: - t5 = t5 ? h3 : null; - break; - case Object: - case Array: - t5 = null == t5 ? t5 : JSON.stringify(t5); - } - return t5; -}, fromAttribute(t5, i5) { - let s8 = t5; - switch (i5) { - case Boolean: - s8 = null !== t5; - break; - case Number: - s8 = null === t5 ? null : Number(t5); - break; - case Object: - case Array: - try { - s8 = JSON.parse(t5); - } catch (t6) { - s8 = null; - } - } - return s8; -} }; -var a3 = (t5, i5) => i5 !== t5 && (i5 == i5 || t5 == t5); -var l3 = { attribute: true, type: String, converter: n5, reflect: false, hasChanged: a3 }; -var d3 = "finalized"; -var u3 = class extends HTMLElement { - constructor() { - super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = false, this.hasUpdated = false, this._$El = null, this._$Eu(); - } - static addInitializer(t5) { - var i5; - this.finalize(), (null !== (i5 = this.h) && void 0 !== i5 ? i5 : this.h = []).push(t5); - } - static get observedAttributes() { - this.finalize(); - const t5 = []; - return this.elementProperties.forEach((i5, s8) => { - const e7 = this._$Ep(s8, i5); - void 0 !== e7 && (this._$Ev.set(e7, s8), t5.push(e7)); - }), t5; - } - static createProperty(t5, i5 = l3) { - if (i5.state && (i5.attribute = false), this.finalize(), this.elementProperties.set(t5, i5), !i5.noAccessor && !this.prototype.hasOwnProperty(t5)) { - const s8 = "symbol" == typeof t5 ? Symbol() : "__" + t5, e7 = this.getPropertyDescriptor(t5, s8, i5); - void 0 !== e7 && Object.defineProperty(this.prototype, t5, e7); - } - } - static getPropertyDescriptor(t5, i5, s8) { - return { get() { - return this[i5]; - }, set(e7) { - const r7 = this[t5]; - this[i5] = e7, this.requestUpdate(t5, r7, s8); - }, configurable: true, enumerable: true }; - } - static getPropertyOptions(t5) { - return this.elementProperties.get(t5) || l3; - } - static finalize() { - if (this.hasOwnProperty(d3)) return false; - this[d3] = true; - const t5 = Object.getPrototypeOf(this); - if (t5.finalize(), void 0 !== t5.h && (this.h = [...t5.h]), this.elementProperties = new Map(t5.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) { - const t6 = this.properties, i5 = [...Object.getOwnPropertyNames(t6), ...Object.getOwnPropertySymbols(t6)]; - for (const s8 of i5) this.createProperty(s8, t6[s8]); - } - return this.elementStyles = this.finalizeStyles(this.styles), true; - } - static finalizeStyles(i5) { - const s8 = []; - if (Array.isArray(i5)) { - const e7 = new Set(i5.flat(1 / 0).reverse()); - for (const i6 of e7) s8.unshift(c3(i6)); - } else void 0 !== i5 && s8.push(c3(i5)); - return s8; - } - static _$Ep(t5, i5) { - const s8 = i5.attribute; - return false === s8 ? void 0 : "string" == typeof s8 ? s8 : "string" == typeof t5 ? t5.toLowerCase() : void 0; - } - _$Eu() { - var t5; - this._$E_ = new Promise((t6) => this.enableUpdating = t6), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), null === (t5 = this.constructor.h) || void 0 === t5 || t5.forEach((t6) => t6(this)); - } - addController(t5) { - var i5, s8; - (null !== (i5 = this._$ES) && void 0 !== i5 ? i5 : this._$ES = []).push(t5), void 0 !== this.renderRoot && this.isConnected && (null === (s8 = t5.hostConnected) || void 0 === s8 || s8.call(t5)); - } - removeController(t5) { - var i5; - null === (i5 = this._$ES) || void 0 === i5 || i5.splice(this._$ES.indexOf(t5) >>> 0, 1); - } - _$Eg() { - this.constructor.elementProperties.forEach((t5, i5) => { - this.hasOwnProperty(i5) && (this._$Ei.set(i5, this[i5]), delete this[i5]); - }); - } - createRenderRoot() { - var t5; - const s8 = null !== (t5 = this.shadowRoot) && void 0 !== t5 ? t5 : this.attachShadow(this.constructor.shadowRootOptions); - return S3(s8, this.constructor.elementStyles), s8; - } - connectedCallback() { - var t5; - void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(true), null === (t5 = this._$ES) || void 0 === t5 || t5.forEach((t6) => { - var i5; - return null === (i5 = t6.hostConnected) || void 0 === i5 ? void 0 : i5.call(t6); - }); - } - enableUpdating(t5) { - } - disconnectedCallback() { - var t5; - null === (t5 = this._$ES) || void 0 === t5 || t5.forEach((t6) => { - var i5; - return null === (i5 = t6.hostDisconnected) || void 0 === i5 ? void 0 : i5.call(t6); - }); - } - attributeChangedCallback(t5, i5, s8) { - this._$AK(t5, s8); - } - _$EO(t5, i5, s8 = l3) { - var e7; - const r7 = this.constructor._$Ep(t5, s8); - if (void 0 !== r7 && true === s8.reflect) { - const h4 = (void 0 !== (null === (e7 = s8.converter) || void 0 === e7 ? void 0 : e7.toAttribute) ? s8.converter : n5).toAttribute(i5, s8.type); - this._$El = t5, null == h4 ? this.removeAttribute(r7) : this.setAttribute(r7, h4), this._$El = null; - } - } - _$AK(t5, i5) { - var s8; - const e7 = this.constructor, r7 = e7._$Ev.get(t5); - if (void 0 !== r7 && this._$El !== r7) { - const t6 = e7.getPropertyOptions(r7), h4 = "function" == typeof t6.converter ? { fromAttribute: t6.converter } : void 0 !== (null === (s8 = t6.converter) || void 0 === s8 ? void 0 : s8.fromAttribute) ? t6.converter : n5; - this._$El = r7, this[r7] = h4.fromAttribute(i5, t6.type), this._$El = null; - } - } - requestUpdate(t5, i5, s8) { - let e7 = true; - void 0 !== t5 && (((s8 = s8 || this.constructor.getPropertyOptions(t5)).hasChanged || a3)(this[t5], i5) ? (this._$AL.has(t5) || this._$AL.set(t5, i5), true === s8.reflect && this._$El !== t5 && (void 0 === this._$EC && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t5, s8))) : e7 = false), !this.isUpdatePending && e7 && (this._$E_ = this._$Ej()); - } - async _$Ej() { - this.isUpdatePending = true; - try { - await this._$E_; - } catch (t6) { - Promise.reject(t6); - } - const t5 = this.scheduleUpdate(); - return null != t5 && await t5, !this.isUpdatePending; - } - scheduleUpdate() { - return this.performUpdate(); - } - performUpdate() { - var t5; - if (!this.isUpdatePending) return; - this.hasUpdated, this._$Ei && (this._$Ei.forEach((t6, i6) => this[i6] = t6), this._$Ei = void 0); - let i5 = false; - const s8 = this._$AL; - try { - i5 = this.shouldUpdate(s8), i5 ? (this.willUpdate(s8), null === (t5 = this._$ES) || void 0 === t5 || t5.forEach((t6) => { - var i6; - return null === (i6 = t6.hostUpdate) || void 0 === i6 ? void 0 : i6.call(t6); - }), this.update(s8)) : this._$Ek(); - } catch (t6) { - throw i5 = false, this._$Ek(), t6; - } - i5 && this._$AE(s8); - } - willUpdate(t5) { - } - _$AE(t5) { - var i5; - null === (i5 = this._$ES) || void 0 === i5 || i5.forEach((t6) => { - var i6; - return null === (i6 = t6.hostUpdated) || void 0 === i6 ? void 0 : i6.call(t6); - }), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t5)), this.updated(t5); - } - _$Ek() { - this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = false; - } - get updateComplete() { - return this.getUpdateComplete(); - } - getUpdateComplete() { - return this._$E_; - } - shouldUpdate(t5) { - return true; - } - update(t5) { - void 0 !== this._$EC && (this._$EC.forEach((t6, i5) => this._$EO(i5, this[i5], t6)), this._$EC = void 0), this._$Ek(); - } - updated(t5) { - } - firstUpdated(t5) { - } -}; -u3[d3] = true, u3.elementProperties = /* @__PURE__ */ new Map(), u3.elementStyles = [], u3.shadowRootOptions = { mode: "open" }, null == o5 || o5({ ReactiveElement: u3 }), (null !== (s5 = e5.reactiveElementVersions) && void 0 !== s5 ? s5 : e5.reactiveElementVersions = []).push("1.6.3"); - -// ../node_modules/lit-element/lit-element.js -var l4; -var o6; -var s6 = class extends u3 { - constructor() { - super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0; - } - createRenderRoot() { - var t5, e7; - const i5 = super.createRenderRoot(); - return null !== (t5 = (e7 = this.renderOptions).renderBefore) && void 0 !== t5 || (e7.renderBefore = i5.firstChild), i5; - } - update(t5) { - const i5 = this.render(); - this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t5), this._$Do = D(i5, this.renderRoot, this.renderOptions); - } - connectedCallback() { - var t5; - super.connectedCallback(), null === (t5 = this._$Do) || void 0 === t5 || t5.setConnected(true); - } - disconnectedCallback() { - var t5; - super.disconnectedCallback(), null === (t5 = this._$Do) || void 0 === t5 || t5.setConnected(false); - } - render() { - return T; - } -}; -s6.finalized = true, s6._$litElement$ = true, null === (l4 = globalThis.litElementHydrateSupport) || void 0 === l4 || l4.call(globalThis, { LitElement: s6 }); -var n6 = globalThis.litElementPolyfillSupport; -null == n6 || n6({ LitElement: s6 }); -(null !== (o6 = globalThis.litElementVersions) && void 0 !== o6 ? o6 : globalThis.litElementVersions = []).push("3.3.3"); - -// ../node_modules/mobx/dist/mobx.esm.js -function die(error) { - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - if (false) { - var e7 = typeof error === "string" ? error : errors[error]; - if (typeof e7 === "function") e7 = e7.apply(null, args); - throw new Error("[MobX] " + e7); - } - throw new Error(typeof error === "number" ? "[MobX] minified error nr: " + error + (args.length ? " " + args.map(String).join(",") : "") + ". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts" : "[MobX] " + error); -} -var mockGlobal = {}; -function getGlobal() { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - if (typeof self !== "undefined") { - return self; - } - return mockGlobal; -} -var assign = Object.assign; -var getDescriptor = Object.getOwnPropertyDescriptor; -var defineProperty = Object.defineProperty; -var objectPrototype = Object.prototype; -var EMPTY_ARRAY = []; -Object.freeze(EMPTY_ARRAY); -var EMPTY_OBJECT = {}; -Object.freeze(EMPTY_OBJECT); -var hasProxy = typeof Proxy !== "undefined"; -var plainObjectString = /* @__PURE__ */ Object.toString(); -function assertProxies() { - if (!hasProxy) { - die(false ? "`Proxy` objects are not available in the current environment. Please configure MobX to enable a fallback implementation.`" : "Proxy not available"); - } -} -function once(func) { - var invoked = false; - return function() { - if (invoked) { - return; - } - invoked = true; - return func.apply(this, arguments); - }; -} -var noop = function noop2() { -}; -function isFunction(fn) { - return typeof fn === "function"; -} -function isStringish(value) { - var t5 = typeof value; - switch (t5) { - case "string": - case "symbol": - case "number": - return true; - } - return false; -} -function isObject(value) { - return value !== null && typeof value === "object"; -} -function isPlainObject(value) { - if (!isObject(value)) { - return false; - } - var proto = Object.getPrototypeOf(value); - if (proto == null) { - return true; - } - var protoConstructor = Object.hasOwnProperty.call(proto, "constructor") && proto.constructor; - return typeof protoConstructor === "function" && protoConstructor.toString() === plainObjectString; -} -function isGenerator(obj) { - var constructor = obj == null ? void 0 : obj.constructor; - if (!constructor) { - return false; - } - if ("GeneratorFunction" === constructor.name || "GeneratorFunction" === constructor.displayName) { - return true; - } - return false; -} -function addHiddenProp(object2, propName, value) { - defineProperty(object2, propName, { - enumerable: false, - writable: true, - configurable: true, - value - }); -} -function addHiddenFinalProp(object2, propName, value) { - defineProperty(object2, propName, { - enumerable: false, - writable: false, - configurable: true, - value - }); -} -function createInstanceofPredicate(name, theClass) { - var propName = "isMobX" + name; - theClass.prototype[propName] = true; - return function(x2) { - return isObject(x2) && x2[propName] === true; - }; -} -function isES6Map(thing) { - return thing != null && Object.prototype.toString.call(thing) === "[object Map]"; -} -function isPlainES6Map(thing) { - var mapProto = Object.getPrototypeOf(thing); - var objectProto = Object.getPrototypeOf(mapProto); - var nullProto = Object.getPrototypeOf(objectProto); - return nullProto === null; -} -function isES6Set(thing) { - return thing != null && Object.prototype.toString.call(thing) === "[object Set]"; -} -var hasGetOwnPropertySymbols = typeof Object.getOwnPropertySymbols !== "undefined"; -function getPlainObjectKeys(object2) { - var keys = Object.keys(object2); - if (!hasGetOwnPropertySymbols) { - return keys; - } - var symbols = Object.getOwnPropertySymbols(object2); - if (!symbols.length) { - return keys; - } - return [].concat(keys, symbols.filter(function(s8) { - return objectPrototype.propertyIsEnumerable.call(object2, s8); - })); -} -var ownKeys = typeof Reflect !== "undefined" && Reflect.ownKeys ? Reflect.ownKeys : hasGetOwnPropertySymbols ? function(obj) { - return Object.getOwnPropertyNames(obj).concat(Object.getOwnPropertySymbols(obj)); -} : ( - /* istanbul ignore next */ - Object.getOwnPropertyNames -); -function toPrimitive(value) { - return value === null ? null : typeof value === "object" ? "" + value : value; -} -function hasProp(target, prop) { - return objectPrototype.hasOwnProperty.call(target, prop); -} -var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors || function getOwnPropertyDescriptors2(target) { - var res = {}; - ownKeys(target).forEach(function(key) { - res[key] = getDescriptor(target, key); - }); - return res; -}; -function _defineProperties(target, props) { - for (var i5 = 0; i5 < props.length; i5++) { - var descriptor = props[i5]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); - } -} -function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - Object.defineProperty(Constructor, "prototype", { - writable: false - }); - return Constructor; -} -function _extends() { - _extends = Object.assign ? Object.assign.bind() : function(target) { - for (var i5 = 1; i5 < arguments.length; i5++) { - var source = arguments[i5]; - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } - return target; - }; - return _extends.apply(this, arguments); -} -function _inheritsLoose(subClass, superClass) { - subClass.prototype = Object.create(superClass.prototype); - subClass.prototype.constructor = subClass; - _setPrototypeOf(subClass, superClass); -} -function _setPrototypeOf(o7, p3) { - _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o8, p4) { - o8.__proto__ = p4; - return o8; - }; - return _setPrototypeOf(o7, p3); -} -function _assertThisInitialized(self2) { - if (self2 === void 0) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return self2; -} -function _unsupportedIterableToArray(o7, minLen) { - if (!o7) return; - if (typeof o7 === "string") return _arrayLikeToArray(o7, minLen); - var n7 = Object.prototype.toString.call(o7).slice(8, -1); - if (n7 === "Object" && o7.constructor) n7 = o7.constructor.name; - if (n7 === "Map" || n7 === "Set") return Array.from(o7); - if (n7 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n7)) return _arrayLikeToArray(o7, minLen); -} -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - for (var i5 = 0, arr2 = new Array(len); i5 < len; i5++) arr2[i5] = arr[i5]; - return arr2; -} -function _createForOfIteratorHelperLoose(o7, allowArrayLike) { - var it = typeof Symbol !== "undefined" && o7[Symbol.iterator] || o7["@@iterator"]; - if (it) return (it = it.call(o7)).next.bind(it); - if (Array.isArray(o7) || (it = _unsupportedIterableToArray(o7)) || allowArrayLike && o7 && typeof o7.length === "number") { - if (it) o7 = it; - var i5 = 0; - return function() { - if (i5 >= o7.length) return { - done: true - }; - return { - done: false, - value: o7[i5++] - }; - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} -function _toPrimitive(input, hint) { - if (typeof input !== "object" || input === null) return input; - var prim = input[Symbol.toPrimitive]; - if (prim !== void 0) { - var res = prim.call(input, hint || "default"); - if (typeof res !== "object") return res; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return (hint === "string" ? String : Number)(input); -} -function _toPropertyKey(arg) { - var key = _toPrimitive(arg, "string"); - return typeof key === "symbol" ? key : String(key); -} -var storedAnnotationsSymbol = /* @__PURE__ */ Symbol("mobx-stored-annotations"); -function createDecoratorAnnotation(annotation) { - function decorator(target, property) { - if (is20223Decorator(property)) { - return annotation.decorate_20223_(target, property); - } else { - storeAnnotation(target, property, annotation); - } - } - return Object.assign(decorator, annotation); -} -function storeAnnotation(prototype, key, annotation) { - if (!hasProp(prototype, storedAnnotationsSymbol)) { - addHiddenProp(prototype, storedAnnotationsSymbol, _extends({}, prototype[storedAnnotationsSymbol])); - } - if (false) { - var fieldName = prototype.constructor.name + ".prototype." + key.toString(); - die("'" + fieldName + "' is decorated with 'override', but no such decorated member was found on prototype."); - } - assertNotDecorated(prototype, annotation, key); - if (!isOverride(annotation)) { - prototype[storedAnnotationsSymbol][key] = annotation; - } -} -function assertNotDecorated(prototype, annotation, key) { - if (false) { - var fieldName = prototype.constructor.name + ".prototype." + key.toString(); - var currentAnnotationType = prototype[storedAnnotationsSymbol][key].annotationType_; - var requestedAnnotationType = annotation.annotationType_; - die("Cannot apply '@" + requestedAnnotationType + "' to '" + fieldName + "':" + ("\nThe field is already decorated with '@" + currentAnnotationType + "'.") + "\nRe-decorating fields is not allowed.\nUse '@override' decorator for methods overridden by subclass."); - } -} -function is20223Decorator(context) { - return typeof context == "object" && typeof context["kind"] == "string"; -} -var $mobx = /* @__PURE__ */ Symbol("mobx administration"); -var Atom = /* @__PURE__ */ function() { - function Atom2(name_) { - if (name_ === void 0) { - name_ = false ? "Atom@" + getNextId() : "Atom"; - } - this.name_ = void 0; - this.isPendingUnobservation = false; - this.isBeingObserved = false; - this.observers_ = /* @__PURE__ */ new Set(); - this.diffValue_ = 0; - this.lastAccessedBy_ = 0; - this.lowestObserverState_ = IDerivationState_.NOT_TRACKING_; - this.onBOL = void 0; - this.onBUOL = void 0; - this.name_ = name_; - } - var _proto = Atom2.prototype; - _proto.onBO = function onBO() { - if (this.onBOL) { - this.onBOL.forEach(function(listener) { - return listener(); - }); - } - }; - _proto.onBUO = function onBUO() { - if (this.onBUOL) { - this.onBUOL.forEach(function(listener) { - return listener(); - }); - } - }; - _proto.reportObserved = function reportObserved$1() { - return reportObserved(this); - }; - _proto.reportChanged = function reportChanged() { - startBatch(); - propagateChanged(this); - endBatch(); - }; - _proto.toString = function toString2() { - return this.name_; - }; - return Atom2; -}(); -var isAtom = /* @__PURE__ */ createInstanceofPredicate("Atom", Atom); -function createAtom(name, onBecomeObservedHandler, onBecomeUnobservedHandler) { - if (onBecomeObservedHandler === void 0) { - onBecomeObservedHandler = noop; - } - if (onBecomeUnobservedHandler === void 0) { - onBecomeUnobservedHandler = noop; - } - var atom = new Atom(name); - if (onBecomeObservedHandler !== noop) { - onBecomeObserved(atom, onBecomeObservedHandler); - } - if (onBecomeUnobservedHandler !== noop) { - onBecomeUnobserved(atom, onBecomeUnobservedHandler); - } - return atom; -} -function identityComparer(a5, b2) { - return a5 === b2; -} -function structuralComparer(a5, b2) { - return deepEqual(a5, b2); -} -function shallowComparer(a5, b2) { - return deepEqual(a5, b2, 1); -} -function defaultComparer(a5, b2) { - if (Object.is) { - return Object.is(a5, b2); - } - return a5 === b2 ? a5 !== 0 || 1 / a5 === 1 / b2 : a5 !== a5 && b2 !== b2; -} -var comparer = { - identity: identityComparer, - structural: structuralComparer, - "default": defaultComparer, - shallow: shallowComparer -}; -function deepEnhancer(v2, _2, name) { - if (isObservable(v2)) { - return v2; - } - if (Array.isArray(v2)) { - return observable.array(v2, { - name - }); - } - if (isPlainObject(v2)) { - return observable.object(v2, void 0, { - name - }); - } - if (isES6Map(v2)) { - return observable.map(v2, { - name - }); - } - if (isES6Set(v2)) { - return observable.set(v2, { - name - }); - } - if (typeof v2 === "function" && !isAction(v2) && !isFlow(v2)) { - if (isGenerator(v2)) { - return flow(v2); - } else { - return autoAction(name, v2); - } - } - return v2; -} -function shallowEnhancer(v2, _2, name) { - if (v2 === void 0 || v2 === null) { - return v2; - } - if (isObservableObject(v2) || isObservableArray(v2) || isObservableMap(v2) || isObservableSet(v2)) { - return v2; - } - if (Array.isArray(v2)) { - return observable.array(v2, { - name, - deep: false - }); - } - if (isPlainObject(v2)) { - return observable.object(v2, void 0, { - name, - deep: false - }); - } - if (isES6Map(v2)) { - return observable.map(v2, { - name, - deep: false - }); - } - if (isES6Set(v2)) { - return observable.set(v2, { - name, - deep: false - }); - } - if (false) { - die("The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets"); - } -} -function referenceEnhancer(newValue) { - return newValue; -} -function refStructEnhancer(v2, oldValue) { - if (false) { - die("observable.struct should not be used with observable values"); - } - if (deepEqual(v2, oldValue)) { - return oldValue; - } - return v2; -} -var OVERRIDE = "override"; -function isOverride(annotation) { - return annotation.annotationType_ === OVERRIDE; -} -function createActionAnnotation(name, options) { - return { - annotationType_: name, - options_: options, - make_: make_$1, - extend_: extend_$1, - decorate_20223_: decorate_20223_$1 - }; -} -function make_$1(adm, key, descriptor, source) { - var _this$options_; - if ((_this$options_ = this.options_) != null && _this$options_.bound) { - return this.extend_(adm, key, descriptor, false) === null ? 0 : 1; - } - if (source === adm.target_) { - return this.extend_(adm, key, descriptor, false) === null ? 0 : 2; - } - if (isAction(descriptor.value)) { - return 1; - } - var actionDescriptor = createActionDescriptor(adm, this, key, descriptor, false); - defineProperty(source, key, actionDescriptor); - return 2; -} -function extend_$1(adm, key, descriptor, proxyTrap) { - var actionDescriptor = createActionDescriptor(adm, this, key, descriptor); - return adm.defineProperty_(key, actionDescriptor, proxyTrap); -} -function decorate_20223_$1(mthd, context) { - if (false) { - assert20223DecoratorType(context, ["method", "field"]); - } - var kind = context.kind, name = context.name, addInitializer = context.addInitializer; - var ann = this; - var _createAction = function _createAction2(m3) { - var _ann$options_$name, _ann$options_, _ann$options_$autoAct, _ann$options_2; - return createAction((_ann$options_$name = (_ann$options_ = ann.options_) == null ? void 0 : _ann$options_.name) != null ? _ann$options_$name : name.toString(), m3, (_ann$options_$autoAct = (_ann$options_2 = ann.options_) == null ? void 0 : _ann$options_2.autoAction) != null ? _ann$options_$autoAct : false); - }; - if (kind == "field") { - addInitializer(function() { - storeAnnotation(this, name, ann); - }); - return; - } - if (kind == "method") { - var _this$options_2; - if (!isAction(mthd)) { - mthd = _createAction(mthd); - } - if ((_this$options_2 = this.options_) != null && _this$options_2.bound) { - addInitializer(function() { - var self2 = this; - var bound = self2[name].bind(self2); - bound.isMobxAction = true; - self2[name] = bound; - }); - } - return mthd; - } - die("Cannot apply '" + ann.annotationType_ + "' to '" + String(name) + "' (kind: " + kind + "):" + ("\n'" + ann.annotationType_ + "' can only be used on properties with a function value.")); -} -function assertActionDescriptor(adm, _ref, key, _ref2) { - var annotationType_ = _ref.annotationType_; - var value = _ref2.value; - if (false) { - die("Cannot apply '" + annotationType_ + "' to '" + adm.name_ + "." + key.toString() + "':" + ("\n'" + annotationType_ + "' can only be used on properties with a function value.")); - } -} -function createActionDescriptor(adm, annotation, key, descriptor, safeDescriptors) { - var _annotation$options_, _annotation$options_$, _annotation$options_2, _annotation$options_$2, _annotation$options_3, _annotation$options_4, _adm$proxy_2; - if (safeDescriptors === void 0) { - safeDescriptors = globalState.safeDescriptors; - } - assertActionDescriptor(adm, annotation, key, descriptor); - var value = descriptor.value; - if ((_annotation$options_ = annotation.options_) != null && _annotation$options_.bound) { - var _adm$proxy_; - value = value.bind((_adm$proxy_ = adm.proxy_) != null ? _adm$proxy_ : adm.target_); - } - return { - value: createAction( - (_annotation$options_$ = (_annotation$options_2 = annotation.options_) == null ? void 0 : _annotation$options_2.name) != null ? _annotation$options_$ : key.toString(), - value, - (_annotation$options_$2 = (_annotation$options_3 = annotation.options_) == null ? void 0 : _annotation$options_3.autoAction) != null ? _annotation$options_$2 : false, - // https://github.com/mobxjs/mobx/discussions/3140 - (_annotation$options_4 = annotation.options_) != null && _annotation$options_4.bound ? (_adm$proxy_2 = adm.proxy_) != null ? _adm$proxy_2 : adm.target_ : void 0 - ), - // Non-configurable for classes - // prevents accidental field redefinition in subclass - configurable: safeDescriptors ? adm.isPlainObject_ : true, - // https://github.com/mobxjs/mobx/pull/2641#issuecomment-737292058 - enumerable: false, - // Non-obsevable, therefore non-writable - // Also prevents rewriting in subclass constructor - writable: safeDescriptors ? false : true - }; -} -function createFlowAnnotation(name, options) { - return { - annotationType_: name, - options_: options, - make_: make_$2, - extend_: extend_$2, - decorate_20223_: decorate_20223_$2 - }; -} -function make_$2(adm, key, descriptor, source) { - var _this$options_; - if (source === adm.target_) { - return this.extend_(adm, key, descriptor, false) === null ? 0 : 2; - } - if ((_this$options_ = this.options_) != null && _this$options_.bound && (!hasProp(adm.target_, key) || !isFlow(adm.target_[key]))) { - if (this.extend_(adm, key, descriptor, false) === null) { - return 0; - } - } - if (isFlow(descriptor.value)) { - return 1; - } - var flowDescriptor = createFlowDescriptor(adm, this, key, descriptor, false, false); - defineProperty(source, key, flowDescriptor); - return 2; -} -function extend_$2(adm, key, descriptor, proxyTrap) { - var _this$options_2; - var flowDescriptor = createFlowDescriptor(adm, this, key, descriptor, (_this$options_2 = this.options_) == null ? void 0 : _this$options_2.bound); - return adm.defineProperty_(key, flowDescriptor, proxyTrap); -} -function decorate_20223_$2(mthd, context) { - var _this$options_3; - if (false) { - assert20223DecoratorType(context, ["method"]); - } - var name = context.name, addInitializer = context.addInitializer; - if (!isFlow(mthd)) { - mthd = flow(mthd); - } - if ((_this$options_3 = this.options_) != null && _this$options_3.bound) { - addInitializer(function() { - var self2 = this; - var bound = self2[name].bind(self2); - bound.isMobXFlow = true; - self2[name] = bound; - }); - } - return mthd; -} -function assertFlowDescriptor(adm, _ref, key, _ref2) { - var annotationType_ = _ref.annotationType_; - var value = _ref2.value; - if (false) { - die("Cannot apply '" + annotationType_ + "' to '" + adm.name_ + "." + key.toString() + "':" + ("\n'" + annotationType_ + "' can only be used on properties with a generator function value.")); - } -} -function createFlowDescriptor(adm, annotation, key, descriptor, bound, safeDescriptors) { - if (safeDescriptors === void 0) { - safeDescriptors = globalState.safeDescriptors; - } - assertFlowDescriptor(adm, annotation, key, descriptor); - var value = descriptor.value; - if (!isFlow(value)) { - value = flow(value); - } - if (bound) { - var _adm$proxy_; - value = value.bind((_adm$proxy_ = adm.proxy_) != null ? _adm$proxy_ : adm.target_); - value.isMobXFlow = true; - } - return { - value, - // Non-configurable for classes - // prevents accidental field redefinition in subclass - configurable: safeDescriptors ? adm.isPlainObject_ : true, - // https://github.com/mobxjs/mobx/pull/2641#issuecomment-737292058 - enumerable: false, - // Non-obsevable, therefore non-writable - // Also prevents rewriting in subclass constructor - writable: safeDescriptors ? false : true - }; -} -function createComputedAnnotation(name, options) { - return { - annotationType_: name, - options_: options, - make_: make_$3, - extend_: extend_$3, - decorate_20223_: decorate_20223_$3 - }; -} -function make_$3(adm, key, descriptor) { - return this.extend_(adm, key, descriptor, false) === null ? 0 : 1; -} -function extend_$3(adm, key, descriptor, proxyTrap) { - assertComputedDescriptor(adm, this, key, descriptor); - return adm.defineComputedProperty_(key, _extends({}, this.options_, { - get: descriptor.get, - set: descriptor.set - }), proxyTrap); -} -function decorate_20223_$3(get3, context) { - if (false) { - assert20223DecoratorType(context, ["getter"]); - } - var ann = this; - var key = context.name, addInitializer = context.addInitializer; - addInitializer(function() { - var adm = asObservableObject(this)[$mobx]; - var options = _extends({}, ann.options_, { - get: get3, - context: this - }); - options.name || (options.name = false ? adm.name_ + "." + key.toString() : "ObservableObject." + key.toString()); - adm.values_.set(key, new ComputedValue(options)); - }); - return function() { - return this[$mobx].getObservablePropValue_(key); - }; -} -function assertComputedDescriptor(adm, _ref, key, _ref2) { - var annotationType_ = _ref.annotationType_; - var get3 = _ref2.get; - if (false) { - die("Cannot apply '" + annotationType_ + "' to '" + adm.name_ + "." + key.toString() + "':" + ("\n'" + annotationType_ + "' can only be used on getter(+setter) properties.")); - } -} -function createObservableAnnotation(name, options) { - return { - annotationType_: name, - options_: options, - make_: make_$4, - extend_: extend_$4, - decorate_20223_: decorate_20223_$4 - }; -} -function make_$4(adm, key, descriptor) { - return this.extend_(adm, key, descriptor, false) === null ? 0 : 1; -} -function extend_$4(adm, key, descriptor, proxyTrap) { - var _this$options_$enhanc, _this$options_; - assertObservableDescriptor(adm, this, key, descriptor); - return adm.defineObservableProperty_(key, descriptor.value, (_this$options_$enhanc = (_this$options_ = this.options_) == null ? void 0 : _this$options_.enhancer) != null ? _this$options_$enhanc : deepEnhancer, proxyTrap); -} -function decorate_20223_$4(desc, context) { - if (false) { - if (context.kind === "field") { - throw die("Please use `@observable accessor " + String(context.name) + "` instead of `@observable " + String(context.name) + "`"); - } - assert20223DecoratorType(context, ["accessor"]); - } - var ann = this; - var kind = context.kind, name = context.name; - var initializedObjects = /* @__PURE__ */ new WeakSet(); - function initializeObservable(target, value) { - var _ann$options_$enhance, _ann$options_; - var adm = asObservableObject(target)[$mobx]; - var observable2 = new ObservableValue(value, (_ann$options_$enhance = (_ann$options_ = ann.options_) == null ? void 0 : _ann$options_.enhancer) != null ? _ann$options_$enhance : deepEnhancer, false ? adm.name_ + "." + name.toString() : "ObservableObject." + name.toString(), false); - adm.values_.set(name, observable2); - initializedObjects.add(target); - } - if (kind == "accessor") { - return { - get: function get3() { - if (!initializedObjects.has(this)) { - initializeObservable(this, desc.get.call(this)); - } - return this[$mobx].getObservablePropValue_(name); - }, - set: function set4(value) { - if (!initializedObjects.has(this)) { - initializeObservable(this, value); - } - return this[$mobx].setObservablePropValue_(name, value); - }, - init: function init(value) { - if (!initializedObjects.has(this)) { - initializeObservable(this, value); - } - return value; - } - }; - } - return; -} -function assertObservableDescriptor(adm, _ref, key, descriptor) { - var annotationType_ = _ref.annotationType_; - if (false) { - die("Cannot apply '" + annotationType_ + "' to '" + adm.name_ + "." + key.toString() + "':" + ("\n'" + annotationType_ + "' cannot be used on getter/setter properties")); - } -} -var AUTO = "true"; -var autoAnnotation = /* @__PURE__ */ createAutoAnnotation(); -function createAutoAnnotation(options) { - return { - annotationType_: AUTO, - options_: options, - make_: make_$5, - extend_: extend_$5, - decorate_20223_: decorate_20223_$5 - }; -} -function make_$5(adm, key, descriptor, source) { - var _this$options_3, _this$options_4; - if (descriptor.get) { - return computed.make_(adm, key, descriptor, source); - } - if (descriptor.set) { - var set4 = createAction(key.toString(), descriptor.set); - if (source === adm.target_) { - return adm.defineProperty_(key, { - configurable: globalState.safeDescriptors ? adm.isPlainObject_ : true, - set: set4 - }) === null ? 0 : 2; - } - defineProperty(source, key, { - configurable: true, - set: set4 - }); - return 2; - } - if (source !== adm.target_ && typeof descriptor.value === "function") { - var _this$options_2; - if (isGenerator(descriptor.value)) { - var _this$options_; - var flowAnnotation2 = (_this$options_ = this.options_) != null && _this$options_.autoBind ? flow.bound : flow; - return flowAnnotation2.make_(adm, key, descriptor, source); - } - var actionAnnotation2 = (_this$options_2 = this.options_) != null && _this$options_2.autoBind ? autoAction.bound : autoAction; - return actionAnnotation2.make_(adm, key, descriptor, source); - } - var observableAnnotation2 = ((_this$options_3 = this.options_) == null ? void 0 : _this$options_3.deep) === false ? observable.ref : observable; - if (typeof descriptor.value === "function" && (_this$options_4 = this.options_) != null && _this$options_4.autoBind) { - var _adm$proxy_; - descriptor.value = descriptor.value.bind((_adm$proxy_ = adm.proxy_) != null ? _adm$proxy_ : adm.target_); - } - return observableAnnotation2.make_(adm, key, descriptor, source); -} -function extend_$5(adm, key, descriptor, proxyTrap) { - var _this$options_5, _this$options_6; - if (descriptor.get) { - return computed.extend_(adm, key, descriptor, proxyTrap); - } - if (descriptor.set) { - return adm.defineProperty_(key, { - configurable: globalState.safeDescriptors ? adm.isPlainObject_ : true, - set: createAction(key.toString(), descriptor.set) - }, proxyTrap); - } - if (typeof descriptor.value === "function" && (_this$options_5 = this.options_) != null && _this$options_5.autoBind) { - var _adm$proxy_2; - descriptor.value = descriptor.value.bind((_adm$proxy_2 = adm.proxy_) != null ? _adm$proxy_2 : adm.target_); - } - var observableAnnotation2 = ((_this$options_6 = this.options_) == null ? void 0 : _this$options_6.deep) === false ? observable.ref : observable; - return observableAnnotation2.extend_(adm, key, descriptor, proxyTrap); -} -function decorate_20223_$5(desc, context) { - die("'" + this.annotationType_ + "' cannot be used as a decorator"); -} -var OBSERVABLE = "observable"; -var OBSERVABLE_REF = "observable.ref"; -var OBSERVABLE_SHALLOW = "observable.shallow"; -var OBSERVABLE_STRUCT = "observable.struct"; -var defaultCreateObservableOptions = { - deep: true, - name: void 0, - defaultDecorator: void 0, - proxy: true -}; -Object.freeze(defaultCreateObservableOptions); -function asCreateObservableOptions(thing) { - return thing || defaultCreateObservableOptions; -} -var observableAnnotation = /* @__PURE__ */ createObservableAnnotation(OBSERVABLE); -var observableRefAnnotation = /* @__PURE__ */ createObservableAnnotation(OBSERVABLE_REF, { - enhancer: referenceEnhancer -}); -var observableShallowAnnotation = /* @__PURE__ */ createObservableAnnotation(OBSERVABLE_SHALLOW, { - enhancer: shallowEnhancer -}); -var observableStructAnnotation = /* @__PURE__ */ createObservableAnnotation(OBSERVABLE_STRUCT, { - enhancer: refStructEnhancer -}); -var observableDecoratorAnnotation = /* @__PURE__ */ createDecoratorAnnotation(observableAnnotation); -function getEnhancerFromOptions(options) { - return options.deep === true ? deepEnhancer : options.deep === false ? referenceEnhancer : getEnhancerFromAnnotation(options.defaultDecorator); -} -function getAnnotationFromOptions(options) { - var _options$defaultDecor; - return options ? (_options$defaultDecor = options.defaultDecorator) != null ? _options$defaultDecor : createAutoAnnotation(options) : void 0; -} -function getEnhancerFromAnnotation(annotation) { - var _annotation$options_$, _annotation$options_; - return !annotation ? deepEnhancer : (_annotation$options_$ = (_annotation$options_ = annotation.options_) == null ? void 0 : _annotation$options_.enhancer) != null ? _annotation$options_$ : deepEnhancer; -} -function createObservable(v2, arg2, arg3) { - if (is20223Decorator(arg2)) { - return observableAnnotation.decorate_20223_(v2, arg2); - } - if (isStringish(arg2)) { - storeAnnotation(v2, arg2, observableAnnotation); - return; - } - if (isObservable(v2)) { - return v2; - } - if (isPlainObject(v2)) { - return observable.object(v2, arg2, arg3); - } - if (Array.isArray(v2)) { - return observable.array(v2, arg2); - } - if (isES6Map(v2)) { - return observable.map(v2, arg2); - } - if (isES6Set(v2)) { - return observable.set(v2, arg2); - } - if (typeof v2 === "object" && v2 !== null) { - return v2; - } - return observable.box(v2, arg2); -} -assign(createObservable, observableDecoratorAnnotation); -var observableFactories = { - box: function box(value, options) { - var o7 = asCreateObservableOptions(options); - return new ObservableValue(value, getEnhancerFromOptions(o7), o7.name, true, o7.equals); - }, - array: function array(initialValues, options) { - var o7 = asCreateObservableOptions(options); - return (globalState.useProxies === false || o7.proxy === false ? createLegacyArray : createObservableArray)(initialValues, getEnhancerFromOptions(o7), o7.name); - }, - map: function map(initialValues, options) { - var o7 = asCreateObservableOptions(options); - return new ObservableMap(initialValues, getEnhancerFromOptions(o7), o7.name); - }, - set: function set(initialValues, options) { - var o7 = asCreateObservableOptions(options); - return new ObservableSet(initialValues, getEnhancerFromOptions(o7), o7.name); - }, - object: function object(props, decorators, options) { - return initObservable(function() { - return extendObservable(globalState.useProxies === false || (options == null ? void 0 : options.proxy) === false ? asObservableObject({}, options) : asDynamicObservableObject({}, options), props, decorators); - }); - }, - ref: /* @__PURE__ */ createDecoratorAnnotation(observableRefAnnotation), - shallow: /* @__PURE__ */ createDecoratorAnnotation(observableShallowAnnotation), - deep: observableDecoratorAnnotation, - struct: /* @__PURE__ */ createDecoratorAnnotation(observableStructAnnotation) -}; -var observable = /* @__PURE__ */ assign(createObservable, observableFactories); -var COMPUTED = "computed"; -var COMPUTED_STRUCT = "computed.struct"; -var computedAnnotation = /* @__PURE__ */ createComputedAnnotation(COMPUTED); -var computedStructAnnotation = /* @__PURE__ */ createComputedAnnotation(COMPUTED_STRUCT, { - equals: comparer.structural -}); -var computed = function computed2(arg1, arg2) { - if (is20223Decorator(arg2)) { - return computedAnnotation.decorate_20223_(arg1, arg2); - } - if (isStringish(arg2)) { - return storeAnnotation(arg1, arg2, computedAnnotation); - } - if (isPlainObject(arg1)) { - return createDecoratorAnnotation(createComputedAnnotation(COMPUTED, arg1)); - } - if (false) { - if (!isFunction(arg1)) { - die("First argument to `computed` should be an expression."); - } - if (isFunction(arg2)) { - die("A setter as second argument is no longer supported, use `{ set: fn }` option instead"); - } - } - var opts = isPlainObject(arg2) ? arg2 : {}; - opts.get = arg1; - opts.name || (opts.name = arg1.name || ""); - return new ComputedValue(opts); -}; -Object.assign(computed, computedAnnotation); -computed.struct = /* @__PURE__ */ createDecoratorAnnotation(computedStructAnnotation); -var _getDescriptor$config; -var _getDescriptor; -var currentActionId = 0; -var nextActionId = 1; -var isFunctionNameConfigurable = (_getDescriptor$config = (_getDescriptor = /* @__PURE__ */ getDescriptor(function() { -}, "name")) == null ? void 0 : _getDescriptor.configurable) != null ? _getDescriptor$config : false; -var tmpNameDescriptor = { - value: "action", - configurable: true, - writable: false, - enumerable: false -}; -function createAction(actionName, fn, autoAction2, ref) { - if (autoAction2 === void 0) { - autoAction2 = false; - } - if (false) { - if (!isFunction(fn)) { - die("`action` can only be invoked on functions"); - } - if (typeof actionName !== "string" || !actionName) { - die("actions should have valid names, got: '" + actionName + "'"); - } - } - function res() { - return executeAction(actionName, autoAction2, fn, ref || this, arguments); - } - res.isMobxAction = true; - res.toString = function() { - return fn.toString(); - }; - if (isFunctionNameConfigurable) { - tmpNameDescriptor.value = actionName; - defineProperty(res, "name", tmpNameDescriptor); - } - return res; -} -function executeAction(actionName, canRunAsDerivation, fn, scope, args) { - var runInfo = _startAction(actionName, canRunAsDerivation, scope, args); - try { - return fn.apply(scope, args); - } catch (err) { - runInfo.error_ = err; - throw err; - } finally { - _endAction(runInfo); - } -} -function _startAction(actionName, canRunAsDerivation, scope, args) { - var notifySpy_ = false; - var startTime_ = 0; - if (false) { - startTime_ = Date.now(); - var flattenedArgs = args ? Array.from(args) : EMPTY_ARRAY; - spyReportStart({ - type: ACTION, - name: actionName, - object: scope, - arguments: flattenedArgs - }); - } - var prevDerivation_ = globalState.trackingDerivation; - var runAsAction = !canRunAsDerivation || !prevDerivation_; - startBatch(); - var prevAllowStateChanges_ = globalState.allowStateChanges; - if (runAsAction) { - untrackedStart(); - prevAllowStateChanges_ = allowStateChangesStart(true); - } - var prevAllowStateReads_ = allowStateReadsStart(true); - var runInfo = { - runAsAction_: runAsAction, - prevDerivation_, - prevAllowStateChanges_, - prevAllowStateReads_, - notifySpy_, - startTime_, - actionId_: nextActionId++, - parentActionId_: currentActionId - }; - currentActionId = runInfo.actionId_; - return runInfo; -} -function _endAction(runInfo) { - if (currentActionId !== runInfo.actionId_) { - die(30); - } - currentActionId = runInfo.parentActionId_; - if (runInfo.error_ !== void 0) { - globalState.suppressReactionErrors = true; - } - allowStateChangesEnd(runInfo.prevAllowStateChanges_); - allowStateReadsEnd(runInfo.prevAllowStateReads_); - endBatch(); - if (runInfo.runAsAction_) { - untrackedEnd(runInfo.prevDerivation_); - } - if (false) { - spyReportEnd({ - time: Date.now() - runInfo.startTime_ - }); - } - globalState.suppressReactionErrors = false; -} -function allowStateChangesStart(allowStateChanges) { - var prev = globalState.allowStateChanges; - globalState.allowStateChanges = allowStateChanges; - return prev; -} -function allowStateChangesEnd(prev) { - globalState.allowStateChanges = prev; -} -var _Symbol$toPrimitive; -_Symbol$toPrimitive = Symbol.toPrimitive; -var ObservableValue = /* @__PURE__ */ function(_Atom) { - _inheritsLoose(ObservableValue2, _Atom); - function ObservableValue2(value, enhancer, name_, notifySpy, equals) { - var _this; - if (name_ === void 0) { - name_ = false ? "ObservableValue@" + getNextId() : "ObservableValue"; - } - if (notifySpy === void 0) { - notifySpy = true; - } - if (equals === void 0) { - equals = comparer["default"]; - } - _this = _Atom.call(this, name_) || this; - _this.enhancer = void 0; - _this.name_ = void 0; - _this.equals = void 0; - _this.hasUnreportedChange_ = false; - _this.interceptors_ = void 0; - _this.changeListeners_ = void 0; - _this.value_ = void 0; - _this.dehancer = void 0; - _this.enhancer = enhancer; - _this.name_ = name_; - _this.equals = equals; - _this.value_ = enhancer(value, void 0, name_); - if (false) { - spyReport({ - type: CREATE, - object: _assertThisInitialized(_this), - observableKind: "value", - debugObjectName: _this.name_, - newValue: "" + _this.value_ - }); - } - return _this; - } - var _proto = ObservableValue2.prototype; - _proto.dehanceValue = function dehanceValue(value) { - if (this.dehancer !== void 0) { - return this.dehancer(value); - } - return value; - }; - _proto.set = function set4(newValue) { - var oldValue = this.value_; - newValue = this.prepareNewValue_(newValue); - if (newValue !== globalState.UNCHANGED) { - var notifySpy = isSpyEnabled(); - if (false) { - spyReportStart({ - type: UPDATE, - object: this, - observableKind: "value", - debugObjectName: this.name_, - newValue, - oldValue - }); - } - this.setNewValue_(newValue); - if (false) { - spyReportEnd(); - } - } - }; - _proto.prepareNewValue_ = function prepareNewValue_(newValue) { - checkIfStateModificationsAreAllowed(this); - if (hasInterceptors(this)) { - var change = interceptChange(this, { - object: this, - type: UPDATE, - newValue - }); - if (!change) { - return globalState.UNCHANGED; - } - newValue = change.newValue; - } - newValue = this.enhancer(newValue, this.value_, this.name_); - return this.equals(this.value_, newValue) ? globalState.UNCHANGED : newValue; - }; - _proto.setNewValue_ = function setNewValue_(newValue) { - var oldValue = this.value_; - this.value_ = newValue; - this.reportChanged(); - if (hasListeners(this)) { - notifyListeners(this, { - type: UPDATE, - object: this, - newValue, - oldValue - }); - } - }; - _proto.get = function get3() { - this.reportObserved(); - return this.dehanceValue(this.value_); - }; - _proto.intercept_ = function intercept_(handler) { - return registerInterceptor(this, handler); - }; - _proto.observe_ = function observe_(listener, fireImmediately) { - if (fireImmediately) { - listener({ - observableKind: "value", - debugObjectName: this.name_, - object: this, - type: UPDATE, - newValue: this.value_, - oldValue: void 0 - }); - } - return registerListener(this, listener); - }; - _proto.raw = function raw() { - return this.value_; - }; - _proto.toJSON = function toJSON2() { - return this.get(); - }; - _proto.toString = function toString2() { - return this.name_ + "[" + this.value_ + "]"; - }; - _proto.valueOf = function valueOf() { - return toPrimitive(this.get()); - }; - _proto[_Symbol$toPrimitive] = function() { - return this.valueOf(); - }; - return ObservableValue2; -}(Atom); -var _Symbol$toPrimitive$1; -function getFlag(flags, mask) { - return !!(flags & mask); -} -function setFlag(flags, mask, newValue) { - if (newValue) { - flags |= mask; - } else { - flags &= ~mask; - } - return flags; -} -_Symbol$toPrimitive$1 = Symbol.toPrimitive; -var ComputedValue = /* @__PURE__ */ function() { - function ComputedValue2(options) { - this.dependenciesState_ = IDerivationState_.NOT_TRACKING_; - this.observing_ = []; - this.newObserving_ = null; - this.observers_ = /* @__PURE__ */ new Set(); - this.diffValue_ = 0; - this.runId_ = 0; - this.lastAccessedBy_ = 0; - this.lowestObserverState_ = IDerivationState_.UP_TO_DATE_; - this.unboundDepsCount_ = 0; - this.value_ = new CaughtException(null); - this.name_ = void 0; - this.triggeredBy_ = void 0; - this.flags_ = 0; - this.derivation = void 0; - this.setter_ = void 0; - this.isTracing_ = TraceMode.NONE; - this.scope_ = void 0; - this.equals_ = void 0; - this.requiresReaction_ = void 0; - this.keepAlive_ = void 0; - this.onBOL = void 0; - this.onBUOL = void 0; - if (!options.get) { - die(31); - } - this.derivation = options.get; - this.name_ = options.name || (false ? "ComputedValue@" + getNextId() : "ComputedValue"); - if (options.set) { - this.setter_ = createAction(false ? this.name_ + "-setter" : "ComputedValue-setter", options.set); - } - this.equals_ = options.equals || (options.compareStructural || options.struct ? comparer.structural : comparer["default"]); - this.scope_ = options.context; - this.requiresReaction_ = options.requiresReaction; - this.keepAlive_ = !!options.keepAlive; - } - var _proto = ComputedValue2.prototype; - _proto.onBecomeStale_ = function onBecomeStale_() { - propagateMaybeChanged(this); - }; - _proto.onBO = function onBO() { - if (this.onBOL) { - this.onBOL.forEach(function(listener) { - return listener(); - }); - } - }; - _proto.onBUO = function onBUO() { - if (this.onBUOL) { - this.onBUOL.forEach(function(listener) { - return listener(); - }); - } - }; - _proto.get = function get3() { - if (this.isComputing) { - die(32, this.name_, this.derivation); - } - if (globalState.inBatch === 0 && // !globalState.trackingDerivatpion && - this.observers_.size === 0 && !this.keepAlive_) { - if (shouldCompute(this)) { - this.warnAboutUntrackedRead_(); - startBatch(); - this.value_ = this.computeValue_(false); - endBatch(); - } - } else { - reportObserved(this); - if (shouldCompute(this)) { - var prevTrackingContext = globalState.trackingContext; - if (this.keepAlive_ && !prevTrackingContext) { - globalState.trackingContext = this; - } - if (this.trackAndCompute()) { - propagateChangeConfirmed(this); - } - globalState.trackingContext = prevTrackingContext; - } - } - var result = this.value_; - if (isCaughtException(result)) { - throw result.cause; - } - return result; - }; - _proto.set = function set4(value) { - if (this.setter_) { - if (this.isRunningSetter) { - die(33, this.name_); - } - this.isRunningSetter = true; - try { - this.setter_.call(this.scope_, value); - } finally { - this.isRunningSetter = false; - } - } else { - die(34, this.name_); - } - }; - _proto.trackAndCompute = function trackAndCompute() { - var oldValue = this.value_; - var wasSuspended = ( - /* see #1208 */ - this.dependenciesState_ === IDerivationState_.NOT_TRACKING_ - ); - var newValue = this.computeValue_(true); - var changed = wasSuspended || isCaughtException(oldValue) || isCaughtException(newValue) || !this.equals_(oldValue, newValue); - if (changed) { - this.value_ = newValue; - if (false) { - spyReport({ - observableKind: "computed", - debugObjectName: this.name_, - object: this.scope_, - type: "update", - oldValue, - newValue - }); - } - } - return changed; - }; - _proto.computeValue_ = function computeValue_(track) { - this.isComputing = true; - var prev = allowStateChangesStart(false); - var res; - if (track) { - res = trackDerivedFunction(this, this.derivation, this.scope_); - } else { - if (globalState.disableErrorBoundaries === true) { - res = this.derivation.call(this.scope_); - } else { - try { - res = this.derivation.call(this.scope_); - } catch (e7) { - res = new CaughtException(e7); - } - } - } - allowStateChangesEnd(prev); - this.isComputing = false; - return res; - }; - _proto.suspend_ = function suspend_() { - if (!this.keepAlive_) { - clearObserving(this); - this.value_ = void 0; - if (false) { - console.log("[mobx.trace] Computed value '" + this.name_ + "' was suspended and it will recompute on the next access."); - } - } - }; - _proto.observe_ = function observe_(listener, fireImmediately) { - var _this = this; - var firstTime = true; - var prevValue = void 0; - return autorun(function() { - var newValue = _this.get(); - if (!firstTime || fireImmediately) { - var prevU = untrackedStart(); - listener({ - observableKind: "computed", - debugObjectName: _this.name_, - type: UPDATE, - object: _this, - newValue, - oldValue: prevValue - }); - untrackedEnd(prevU); - } - firstTime = false; - prevValue = newValue; - }); - }; - _proto.warnAboutUntrackedRead_ = function warnAboutUntrackedRead_() { - if (true) { - return; - } - if (this.isTracing_ !== TraceMode.NONE) { - console.log("[mobx.trace] Computed value '" + this.name_ + "' is being read outside a reactive context. Doing a full recompute."); - } - if (typeof this.requiresReaction_ === "boolean" ? this.requiresReaction_ : globalState.computedRequiresReaction) { - console.warn("[mobx] Computed value '" + this.name_ + "' is being read outside a reactive context. Doing a full recompute."); - } - }; - _proto.toString = function toString2() { - return this.name_ + "[" + this.derivation.toString() + "]"; - }; - _proto.valueOf = function valueOf() { - return toPrimitive(this.get()); - }; - _proto[_Symbol$toPrimitive$1] = function() { - return this.valueOf(); - }; - _createClass(ComputedValue2, [{ - key: "isComputing", - get: function get3() { - return getFlag(this.flags_, ComputedValue2.isComputingMask_); - }, - set: function set4(newValue) { - this.flags_ = setFlag(this.flags_, ComputedValue2.isComputingMask_, newValue); - } - }, { - key: "isRunningSetter", - get: function get3() { - return getFlag(this.flags_, ComputedValue2.isRunningSetterMask_); - }, - set: function set4(newValue) { - this.flags_ = setFlag(this.flags_, ComputedValue2.isRunningSetterMask_, newValue); - } - }, { - key: "isBeingObserved", - get: function get3() { - return getFlag(this.flags_, ComputedValue2.isBeingObservedMask_); - }, - set: function set4(newValue) { - this.flags_ = setFlag(this.flags_, ComputedValue2.isBeingObservedMask_, newValue); - } - }, { - key: "isPendingUnobservation", - get: function get3() { - return getFlag(this.flags_, ComputedValue2.isPendingUnobservationMask_); - }, - set: function set4(newValue) { - this.flags_ = setFlag(this.flags_, ComputedValue2.isPendingUnobservationMask_, newValue); - } - }]); - return ComputedValue2; -}(); -ComputedValue.isComputingMask_ = 1; -ComputedValue.isRunningSetterMask_ = 2; -ComputedValue.isBeingObservedMask_ = 4; -ComputedValue.isPendingUnobservationMask_ = 8; -var isComputedValue = /* @__PURE__ */ createInstanceofPredicate("ComputedValue", ComputedValue); -var IDerivationState_; -(function(IDerivationState_2) { - IDerivationState_2[IDerivationState_2["NOT_TRACKING_"] = -1] = "NOT_TRACKING_"; - IDerivationState_2[IDerivationState_2["UP_TO_DATE_"] = 0] = "UP_TO_DATE_"; - IDerivationState_2[IDerivationState_2["POSSIBLY_STALE_"] = 1] = "POSSIBLY_STALE_"; - IDerivationState_2[IDerivationState_2["STALE_"] = 2] = "STALE_"; -})(IDerivationState_ || (IDerivationState_ = {})); -var TraceMode; -(function(TraceMode2) { - TraceMode2[TraceMode2["NONE"] = 0] = "NONE"; - TraceMode2[TraceMode2["LOG"] = 1] = "LOG"; - TraceMode2[TraceMode2["BREAK"] = 2] = "BREAK"; -})(TraceMode || (TraceMode = {})); -var CaughtException = function CaughtException2(cause) { - this.cause = void 0; - this.cause = cause; -}; -function isCaughtException(e7) { - return e7 instanceof CaughtException; -} -function shouldCompute(derivation) { - switch (derivation.dependenciesState_) { - case IDerivationState_.UP_TO_DATE_: - return false; - case IDerivationState_.NOT_TRACKING_: - case IDerivationState_.STALE_: - return true; - case IDerivationState_.POSSIBLY_STALE_: { - var prevAllowStateReads = allowStateReadsStart(true); - var prevUntracked = untrackedStart(); - var obs = derivation.observing_, l6 = obs.length; - for (var i5 = 0; i5 < l6; i5++) { - var obj = obs[i5]; - if (isComputedValue(obj)) { - if (globalState.disableErrorBoundaries) { - obj.get(); - } else { - try { - obj.get(); - } catch (e7) { - untrackedEnd(prevUntracked); - allowStateReadsEnd(prevAllowStateReads); - return true; - } - } - if (derivation.dependenciesState_ === IDerivationState_.STALE_) { - untrackedEnd(prevUntracked); - allowStateReadsEnd(prevAllowStateReads); - return true; - } - } - } - changeDependenciesStateTo0(derivation); - untrackedEnd(prevUntracked); - allowStateReadsEnd(prevAllowStateReads); - return false; - } - } -} -function checkIfStateModificationsAreAllowed(atom) { - if (true) { - return; - } - var hasObservers = atom.observers_.size > 0; - if (!globalState.allowStateChanges && (hasObservers || globalState.enforceActions === "always")) { - console.warn("[MobX] " + (globalState.enforceActions ? "Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: " : "Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, a computed value or the render function of a React component? You can wrap side effects in 'runInAction' (or decorate functions with 'action') if needed. Tried to modify: ") + atom.name_); - } -} -function checkIfStateReadsAreAllowed(observable2) { - if (false) { - console.warn("[mobx] Observable '" + observable2.name_ + "' being read outside a reactive context."); - } -} -function trackDerivedFunction(derivation, f3, context) { - var prevAllowStateReads = allowStateReadsStart(true); - changeDependenciesStateTo0(derivation); - derivation.newObserving_ = new Array( - // Reserve constant space for initial dependencies, dynamic space otherwise. - // See https://github.com/mobxjs/mobx/pull/3833 - derivation.runId_ === 0 ? 100 : derivation.observing_.length - ); - derivation.unboundDepsCount_ = 0; - derivation.runId_ = ++globalState.runId; - var prevTracking = globalState.trackingDerivation; - globalState.trackingDerivation = derivation; - globalState.inBatch++; - var result; - if (globalState.disableErrorBoundaries === true) { - result = f3.call(context); - } else { - try { - result = f3.call(context); - } catch (e7) { - result = new CaughtException(e7); - } - } - globalState.inBatch--; - globalState.trackingDerivation = prevTracking; - bindDependencies(derivation); - warnAboutDerivationWithoutDependencies(derivation); - allowStateReadsEnd(prevAllowStateReads); - return result; -} -function warnAboutDerivationWithoutDependencies(derivation) { - if (true) { - return; - } - if (derivation.observing_.length !== 0) { - return; - } - if (typeof derivation.requiresObservable_ === "boolean" ? derivation.requiresObservable_ : globalState.reactionRequiresObservable) { - console.warn("[mobx] Derivation '" + derivation.name_ + "' is created/updated without reading any observable value."); - } -} -function bindDependencies(derivation) { - var prevObserving = derivation.observing_; - var observing = derivation.observing_ = derivation.newObserving_; - var lowestNewObservingDerivationState = IDerivationState_.UP_TO_DATE_; - var i0 = 0, l6 = derivation.unboundDepsCount_; - for (var i5 = 0; i5 < l6; i5++) { - var dep = observing[i5]; - if (dep.diffValue_ === 0) { - dep.diffValue_ = 1; - if (i0 !== i5) { - observing[i0] = dep; - } - i0++; - } - if (dep.dependenciesState_ > lowestNewObservingDerivationState) { - lowestNewObservingDerivationState = dep.dependenciesState_; - } - } - observing.length = i0; - derivation.newObserving_ = null; - l6 = prevObserving.length; - while (l6--) { - var _dep = prevObserving[l6]; - if (_dep.diffValue_ === 0) { - removeObserver(_dep, derivation); - } - _dep.diffValue_ = 0; - } - while (i0--) { - var _dep2 = observing[i0]; - if (_dep2.diffValue_ === 1) { - _dep2.diffValue_ = 0; - addObserver(_dep2, derivation); - } - } - if (lowestNewObservingDerivationState !== IDerivationState_.UP_TO_DATE_) { - derivation.dependenciesState_ = lowestNewObservingDerivationState; - derivation.onBecomeStale_(); - } -} -function clearObserving(derivation) { - var obs = derivation.observing_; - derivation.observing_ = []; - var i5 = obs.length; - while (i5--) { - removeObserver(obs[i5], derivation); - } - derivation.dependenciesState_ = IDerivationState_.NOT_TRACKING_; -} -function untracked(action2) { - var prev = untrackedStart(); - try { - return action2(); - } finally { - untrackedEnd(prev); - } -} -function untrackedStart() { - var prev = globalState.trackingDerivation; - globalState.trackingDerivation = null; - return prev; -} -function untrackedEnd(prev) { - globalState.trackingDerivation = prev; -} -function allowStateReadsStart(allowStateReads) { - var prev = globalState.allowStateReads; - globalState.allowStateReads = allowStateReads; - return prev; -} -function allowStateReadsEnd(prev) { - globalState.allowStateReads = prev; -} -function changeDependenciesStateTo0(derivation) { - if (derivation.dependenciesState_ === IDerivationState_.UP_TO_DATE_) { - return; - } - derivation.dependenciesState_ = IDerivationState_.UP_TO_DATE_; - var obs = derivation.observing_; - var i5 = obs.length; - while (i5--) { - obs[i5].lowestObserverState_ = IDerivationState_.UP_TO_DATE_; - } -} -var MobXGlobals = function MobXGlobals2() { - this.version = 6; - this.UNCHANGED = {}; - this.trackingDerivation = null; - this.trackingContext = null; - this.runId = 0; - this.mobxGuid = 0; - this.inBatch = 0; - this.pendingUnobservations = []; - this.pendingReactions = []; - this.isRunningReactions = false; - this.allowStateChanges = false; - this.allowStateReads = true; - this.enforceActions = true; - this.spyListeners = []; - this.globalReactionErrorHandlers = []; - this.computedRequiresReaction = false; - this.reactionRequiresObservable = false; - this.observableRequiresReaction = false; - this.disableErrorBoundaries = false; - this.suppressReactionErrors = false; - this.useProxies = true; - this.verifyProxies = false; - this.safeDescriptors = true; -}; -var canMergeGlobalState = true; -var isolateCalled = false; -var globalState = /* @__PURE__ */ function() { - var global2 = /* @__PURE__ */ getGlobal(); - if (global2.__mobxInstanceCount > 0 && !global2.__mobxGlobals) { - canMergeGlobalState = false; - } - if (global2.__mobxGlobals && global2.__mobxGlobals.version !== new MobXGlobals().version) { - canMergeGlobalState = false; - } - if (!canMergeGlobalState) { - setTimeout(function() { - if (!isolateCalled) { - die(35); - } - }, 1); - return new MobXGlobals(); - } else if (global2.__mobxGlobals) { - global2.__mobxInstanceCount += 1; - if (!global2.__mobxGlobals.UNCHANGED) { - global2.__mobxGlobals.UNCHANGED = {}; - } - return global2.__mobxGlobals; - } else { - global2.__mobxInstanceCount = 1; - return global2.__mobxGlobals = /* @__PURE__ */ new MobXGlobals(); - } -}(); -function addObserver(observable2, node) { - observable2.observers_.add(node); - if (observable2.lowestObserverState_ > node.dependenciesState_) { - observable2.lowestObserverState_ = node.dependenciesState_; - } -} -function removeObserver(observable2, node) { - observable2.observers_["delete"](node); - if (observable2.observers_.size === 0) { - queueForUnobservation(observable2); - } -} -function queueForUnobservation(observable2) { - if (observable2.isPendingUnobservation === false) { - observable2.isPendingUnobservation = true; - globalState.pendingUnobservations.push(observable2); - } -} -function startBatch() { - globalState.inBatch++; -} -function endBatch() { - if (--globalState.inBatch === 0) { - runReactions(); - var list = globalState.pendingUnobservations; - for (var i5 = 0; i5 < list.length; i5++) { - var observable2 = list[i5]; - observable2.isPendingUnobservation = false; - if (observable2.observers_.size === 0) { - if (observable2.isBeingObserved) { - observable2.isBeingObserved = false; - observable2.onBUO(); - } - if (observable2 instanceof ComputedValue) { - observable2.suspend_(); - } - } - } - globalState.pendingUnobservations = []; - } -} -function reportObserved(observable2) { - checkIfStateReadsAreAllowed(observable2); - var derivation = globalState.trackingDerivation; - if (derivation !== null) { - if (derivation.runId_ !== observable2.lastAccessedBy_) { - observable2.lastAccessedBy_ = derivation.runId_; - derivation.newObserving_[derivation.unboundDepsCount_++] = observable2; - if (!observable2.isBeingObserved && globalState.trackingContext) { - observable2.isBeingObserved = true; - observable2.onBO(); - } - } - return observable2.isBeingObserved; - } else if (observable2.observers_.size === 0 && globalState.inBatch > 0) { - queueForUnobservation(observable2); - } - return false; -} -function propagateChanged(observable2) { - if (observable2.lowestObserverState_ === IDerivationState_.STALE_) { - return; - } - observable2.lowestObserverState_ = IDerivationState_.STALE_; - observable2.observers_.forEach(function(d4) { - if (d4.dependenciesState_ === IDerivationState_.UP_TO_DATE_) { - if (false) { - logTraceInfo(d4, observable2); - } - d4.onBecomeStale_(); - } - d4.dependenciesState_ = IDerivationState_.STALE_; - }); -} -function propagateChangeConfirmed(observable2) { - if (observable2.lowestObserverState_ === IDerivationState_.STALE_) { - return; - } - observable2.lowestObserverState_ = IDerivationState_.STALE_; - observable2.observers_.forEach(function(d4) { - if (d4.dependenciesState_ === IDerivationState_.POSSIBLY_STALE_) { - d4.dependenciesState_ = IDerivationState_.STALE_; - if (false) { - logTraceInfo(d4, observable2); - } - } else if (d4.dependenciesState_ === IDerivationState_.UP_TO_DATE_) { - observable2.lowestObserverState_ = IDerivationState_.UP_TO_DATE_; - } - }); -} -function propagateMaybeChanged(observable2) { - if (observable2.lowestObserverState_ !== IDerivationState_.UP_TO_DATE_) { - return; - } - observable2.lowestObserverState_ = IDerivationState_.POSSIBLY_STALE_; - observable2.observers_.forEach(function(d4) { - if (d4.dependenciesState_ === IDerivationState_.UP_TO_DATE_) { - d4.dependenciesState_ = IDerivationState_.POSSIBLY_STALE_; - d4.onBecomeStale_(); - } - }); -} -var Reaction = /* @__PURE__ */ function() { - function Reaction2(name_, onInvalidate_, errorHandler_, requiresObservable_) { - if (name_ === void 0) { - name_ = false ? "Reaction@" + getNextId() : "Reaction"; - } - this.name_ = void 0; - this.onInvalidate_ = void 0; - this.errorHandler_ = void 0; - this.requiresObservable_ = void 0; - this.observing_ = []; - this.newObserving_ = []; - this.dependenciesState_ = IDerivationState_.NOT_TRACKING_; - this.diffValue_ = 0; - this.runId_ = 0; - this.unboundDepsCount_ = 0; - this.isDisposed_ = false; - this.isScheduled_ = false; - this.isTrackPending_ = false; - this.isRunning_ = false; - this.isTracing_ = TraceMode.NONE; - this.name_ = name_; - this.onInvalidate_ = onInvalidate_; - this.errorHandler_ = errorHandler_; - this.requiresObservable_ = requiresObservable_; - } - var _proto = Reaction2.prototype; - _proto.onBecomeStale_ = function onBecomeStale_() { - this.schedule_(); - }; - _proto.schedule_ = function schedule_() { - if (!this.isScheduled_) { - this.isScheduled_ = true; - globalState.pendingReactions.push(this); - runReactions(); - } - }; - _proto.isScheduled = function isScheduled() { - return this.isScheduled_; - }; - _proto.runReaction_ = function runReaction_() { - if (!this.isDisposed_) { - startBatch(); - this.isScheduled_ = false; - var prev = globalState.trackingContext; - globalState.trackingContext = this; - if (shouldCompute(this)) { - this.isTrackPending_ = true; - try { - this.onInvalidate_(); - if (false) { - spyReport({ - name: this.name_, - type: "scheduled-reaction" - }); - } - } catch (e7) { - this.reportExceptionInDerivation_(e7); - } - } - globalState.trackingContext = prev; - endBatch(); - } - }; - _proto.track = function track(fn) { - if (this.isDisposed_) { - return; - } - startBatch(); - var notify = isSpyEnabled(); - var startTime; - if (false) { - startTime = Date.now(); - spyReportStart({ - name: this.name_, - type: "reaction" - }); - } - this.isRunning_ = true; - var prevReaction = globalState.trackingContext; - globalState.trackingContext = this; - var result = trackDerivedFunction(this, fn, void 0); - globalState.trackingContext = prevReaction; - this.isRunning_ = false; - this.isTrackPending_ = false; - if (this.isDisposed_) { - clearObserving(this); - } - if (isCaughtException(result)) { - this.reportExceptionInDerivation_(result.cause); - } - if (false) { - spyReportEnd({ - time: Date.now() - startTime - }); - } - endBatch(); - }; - _proto.reportExceptionInDerivation_ = function reportExceptionInDerivation_(error) { - var _this = this; - if (this.errorHandler_) { - this.errorHandler_(error, this); - return; - } - if (globalState.disableErrorBoundaries) { - throw error; - } - var message = false ? "[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '" + this + "'" : "[mobx] uncaught error in '" + this + "'"; - if (!globalState.suppressReactionErrors) { - console.error(message, error); - } else if (false) { - console.warn("[mobx] (error in reaction '" + this.name_ + "' suppressed, fix error of causing action below)"); - } - if (false) { - spyReport({ - type: "error", - name: this.name_, - message, - error: "" + error - }); - } - globalState.globalReactionErrorHandlers.forEach(function(f3) { - return f3(error, _this); - }); - }; - _proto.dispose = function dispose() { - if (!this.isDisposed_) { - this.isDisposed_ = true; - if (!this.isRunning_) { - startBatch(); - clearObserving(this); - endBatch(); - } - } - }; - _proto.getDisposer_ = function getDisposer_(abortSignal) { - var _this2 = this; - var dispose = function dispose2() { - _this2.dispose(); - abortSignal == null ? void 0 : abortSignal.removeEventListener == null ? void 0 : abortSignal.removeEventListener("abort", dispose2); - }; - abortSignal == null ? void 0 : abortSignal.addEventListener == null ? void 0 : abortSignal.addEventListener("abort", dispose); - dispose[$mobx] = this; - return dispose; - }; - _proto.toString = function toString2() { - return "Reaction[" + this.name_ + "]"; - }; - _proto.trace = function trace$1(enterBreakPoint) { - if (enterBreakPoint === void 0) { - enterBreakPoint = false; - } - trace(this, enterBreakPoint); - }; - return Reaction2; -}(); -var MAX_REACTION_ITERATIONS = 100; -var reactionScheduler = function reactionScheduler2(f3) { - return f3(); -}; -function runReactions() { - if (globalState.inBatch > 0 || globalState.isRunningReactions) { - return; - } - reactionScheduler(runReactionsHelper); -} -function runReactionsHelper() { - globalState.isRunningReactions = true; - var allReactions = globalState.pendingReactions; - var iterations = 0; - while (allReactions.length > 0) { - if (++iterations === MAX_REACTION_ITERATIONS) { - console.error(false ? "Reaction doesn't converge to a stable state after " + MAX_REACTION_ITERATIONS + " iterations." + (" Probably there is a cycle in the reactive function: " + allReactions[0]) : "[mobx] cycle in reaction: " + allReactions[0]); - allReactions.splice(0); - } - var remainingReactions = allReactions.splice(0); - for (var i5 = 0, l6 = remainingReactions.length; i5 < l6; i5++) { - remainingReactions[i5].runReaction_(); - } - } - globalState.isRunningReactions = false; -} -var isReaction = /* @__PURE__ */ createInstanceofPredicate("Reaction", Reaction); -function isSpyEnabled() { - return false; -} -function spy(listener) { - if (true) { - console.warn("[mobx.spy] Is a no-op in production builds"); - return function() { - }; - } else { - globalState.spyListeners.push(listener); - return once(function() { - globalState.spyListeners = globalState.spyListeners.filter(function(l6) { - return l6 !== listener; - }); - }); - } -} -var ACTION = "action"; -var ACTION_BOUND = "action.bound"; -var AUTOACTION = "autoAction"; -var AUTOACTION_BOUND = "autoAction.bound"; -var DEFAULT_ACTION_NAME = ""; -var actionAnnotation = /* @__PURE__ */ createActionAnnotation(ACTION); -var actionBoundAnnotation = /* @__PURE__ */ createActionAnnotation(ACTION_BOUND, { - bound: true -}); -var autoActionAnnotation = /* @__PURE__ */ createActionAnnotation(AUTOACTION, { - autoAction: true -}); -var autoActionBoundAnnotation = /* @__PURE__ */ createActionAnnotation(AUTOACTION_BOUND, { - autoAction: true, - bound: true -}); -function createActionFactory(autoAction2) { - var res = function action2(arg1, arg2) { - if (isFunction(arg1)) { - return createAction(arg1.name || DEFAULT_ACTION_NAME, arg1, autoAction2); - } - if (isFunction(arg2)) { - return createAction(arg1, arg2, autoAction2); - } - if (is20223Decorator(arg2)) { - return (autoAction2 ? autoActionAnnotation : actionAnnotation).decorate_20223_(arg1, arg2); - } - if (isStringish(arg2)) { - return storeAnnotation(arg1, arg2, autoAction2 ? autoActionAnnotation : actionAnnotation); - } - if (isStringish(arg1)) { - return createDecoratorAnnotation(createActionAnnotation(autoAction2 ? AUTOACTION : ACTION, { - name: arg1, - autoAction: autoAction2 - })); - } - if (false) { - die("Invalid arguments for `action`"); - } - }; - return res; -} -var action = /* @__PURE__ */ createActionFactory(false); -Object.assign(action, actionAnnotation); -var autoAction = /* @__PURE__ */ createActionFactory(true); -Object.assign(autoAction, autoActionAnnotation); -action.bound = /* @__PURE__ */ createDecoratorAnnotation(actionBoundAnnotation); -autoAction.bound = /* @__PURE__ */ createDecoratorAnnotation(autoActionBoundAnnotation); -function isAction(thing) { - return isFunction(thing) && thing.isMobxAction === true; -} -function autorun(view, opts) { - var _opts$name, _opts, _opts2, _opts2$signal, _opts3; - if (opts === void 0) { - opts = EMPTY_OBJECT; - } - if (false) { - if (!isFunction(view)) { - die("Autorun expects a function as first argument"); - } - if (isAction(view)) { - die("Autorun does not accept actions since actions are untrackable"); - } - } - var name = (_opts$name = (_opts = opts) == null ? void 0 : _opts.name) != null ? _opts$name : false ? view.name || "Autorun@" + getNextId() : "Autorun"; - var runSync = !opts.scheduler && !opts.delay; - var reaction2; - if (runSync) { - reaction2 = new Reaction(name, function() { - this.track(reactionRunner); - }, opts.onError, opts.requiresObservable); - } else { - var scheduler = createSchedulerFromOptions(opts); - var isScheduled = false; - reaction2 = new Reaction(name, function() { - if (!isScheduled) { - isScheduled = true; - scheduler(function() { - isScheduled = false; - if (!reaction2.isDisposed_) { - reaction2.track(reactionRunner); - } - }); - } - }, opts.onError, opts.requiresObservable); - } - function reactionRunner() { - view(reaction2); - } - if (!((_opts2 = opts) != null && (_opts2$signal = _opts2.signal) != null && _opts2$signal.aborted)) { - reaction2.schedule_(); - } - return reaction2.getDisposer_((_opts3 = opts) == null ? void 0 : _opts3.signal); -} -var run = function run2(f3) { - return f3(); -}; -function createSchedulerFromOptions(opts) { - return opts.scheduler ? opts.scheduler : opts.delay ? function(f3) { - return setTimeout(f3, opts.delay); - } : run; -} -var ON_BECOME_OBSERVED = "onBO"; -var ON_BECOME_UNOBSERVED = "onBUO"; -function onBecomeObserved(thing, arg2, arg3) { - return interceptHook(ON_BECOME_OBSERVED, thing, arg2, arg3); -} -function onBecomeUnobserved(thing, arg2, arg3) { - return interceptHook(ON_BECOME_UNOBSERVED, thing, arg2, arg3); -} -function interceptHook(hook, thing, arg2, arg3) { - var atom = typeof arg3 === "function" ? getAtom(thing, arg2) : getAtom(thing); - var cb = isFunction(arg3) ? arg3 : arg2; - var listenersKey = hook + "L"; - if (atom[listenersKey]) { - atom[listenersKey].add(cb); - } else { - atom[listenersKey] = /* @__PURE__ */ new Set([cb]); - } - return function() { - var hookListeners = atom[listenersKey]; - if (hookListeners) { - hookListeners["delete"](cb); - if (hookListeners.size === 0) { - delete atom[listenersKey]; - } - } - }; -} -function extendObservable(target, properties, annotations, options) { - if (false) { - if (arguments.length > 4) { - die("'extendObservable' expected 2-4 arguments"); - } - if (typeof target !== "object") { - die("'extendObservable' expects an object as first argument"); - } - if (isObservableMap(target)) { - die("'extendObservable' should not be used on maps, use map.merge instead"); - } - if (!isPlainObject(properties)) { - die("'extendObservable' only accepts plain objects as second argument"); - } - if (isObservable(properties) || isObservable(annotations)) { - die("Extending an object with another observable (object) is not supported"); - } - } - var descriptors = getOwnPropertyDescriptors(properties); - initObservable(function() { - var adm = asObservableObject(target, options)[$mobx]; - ownKeys(descriptors).forEach(function(key) { - adm.extend_( - key, - descriptors[key], - // must pass "undefined" for { key: undefined } - !annotations ? true : key in annotations ? annotations[key] : true - ); - }); - }); - return target; -} -var generatorId = 0; -function FlowCancellationError() { - this.message = "FLOW_CANCELLED"; -} -FlowCancellationError.prototype = /* @__PURE__ */ Object.create(Error.prototype); -var flowAnnotation = /* @__PURE__ */ createFlowAnnotation("flow"); -var flowBoundAnnotation = /* @__PURE__ */ createFlowAnnotation("flow.bound", { - bound: true -}); -var flow = /* @__PURE__ */ Object.assign(function flow2(arg1, arg2) { - if (is20223Decorator(arg2)) { - return flowAnnotation.decorate_20223_(arg1, arg2); - } - if (isStringish(arg2)) { - return storeAnnotation(arg1, arg2, flowAnnotation); - } - if (false) { - die("Flow expects single argument with generator function"); - } - var generator = arg1; - var name = generator.name || ""; - var res = function res2() { - var ctx = this; - var args = arguments; - var runId = ++generatorId; - var gen = action(name + " - runid: " + runId + " - init", generator).apply(ctx, args); - var rejector; - var pendingPromise = void 0; - var promise = new Promise(function(resolve, reject) { - var stepId = 0; - rejector = reject; - function onFulfilled(res3) { - pendingPromise = void 0; - var ret; - try { - ret = action(name + " - runid: " + runId + " - yield " + stepId++, gen.next).call(gen, res3); - } catch (e7) { - return reject(e7); - } - next(ret); - } - function onRejected(err) { - pendingPromise = void 0; - var ret; - try { - ret = action(name + " - runid: " + runId + " - yield " + stepId++, gen["throw"]).call(gen, err); - } catch (e7) { - return reject(e7); - } - next(ret); - } - function next(ret) { - if (isFunction(ret == null ? void 0 : ret.then)) { - ret.then(next, reject); - return; - } - if (ret.done) { - return resolve(ret.value); - } - pendingPromise = Promise.resolve(ret.value); - return pendingPromise.then(onFulfilled, onRejected); - } - onFulfilled(void 0); - }); - promise.cancel = action(name + " - runid: " + runId + " - cancel", function() { - try { - if (pendingPromise) { - cancelPromise(pendingPromise); - } - var _res = gen["return"](void 0); - var yieldedPromise = Promise.resolve(_res.value); - yieldedPromise.then(noop, noop); - cancelPromise(yieldedPromise); - rejector(new FlowCancellationError()); - } catch (e7) { - rejector(e7); - } - }); - return promise; - }; - res.isMobXFlow = true; - return res; -}, flowAnnotation); -flow.bound = /* @__PURE__ */ createDecoratorAnnotation(flowBoundAnnotation); -function cancelPromise(promise) { - if (isFunction(promise.cancel)) { - promise.cancel(); - } -} -function isFlow(fn) { - return (fn == null ? void 0 : fn.isMobXFlow) === true; -} -function _isObservable(value, property) { - if (!value) { - return false; - } - if (property !== void 0) { - if (false) { - return die("isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead."); - } - if (isObservableObject(value)) { - return value[$mobx].values_.has(property); - } - return false; - } - return isObservableObject(value) || !!value[$mobx] || isAtom(value) || isReaction(value) || isComputedValue(value); -} -function isObservable(value) { - if (false) { - die("isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property"); - } - return _isObservable(value); -} -function trace() { - if (true) { - return; - } - var enterBreakPoint = false; - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - if (typeof args[args.length - 1] === "boolean") { - enterBreakPoint = args.pop(); - } - var derivation = getAtomFromArgs(args); - if (!derivation) { - return die("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly"); - } - if (derivation.isTracing_ === TraceMode.NONE) { - console.log("[mobx.trace] '" + derivation.name_ + "' tracing enabled"); - } - derivation.isTracing_ = enterBreakPoint ? TraceMode.BREAK : TraceMode.LOG; -} -function getAtomFromArgs(args) { - switch (args.length) { - case 0: - return globalState.trackingDerivation; - case 1: - return getAtom(args[0]); - case 2: - return getAtom(args[0], args[1]); - } -} -function transaction(action2, thisArg) { - if (thisArg === void 0) { - thisArg = void 0; - } - startBatch(); - try { - return action2.apply(thisArg); - } finally { - endBatch(); - } -} -function getAdm(target) { - return target[$mobx]; -} -var objectProxyTraps = { - has: function has(target, name) { - if (false) { - warnAboutProxyRequirement("detect new properties using the 'in' operator. Use 'has' from 'mobx' instead."); - } - return getAdm(target).has_(name); - }, - get: function get(target, name) { - return getAdm(target).get_(name); - }, - set: function set2(target, name, value) { - var _getAdm$set_; - if (!isStringish(name)) { - return false; - } - if (false) { - warnAboutProxyRequirement("add a new observable property through direct assignment. Use 'set' from 'mobx' instead."); - } - return (_getAdm$set_ = getAdm(target).set_(name, value, true)) != null ? _getAdm$set_ : true; - }, - deleteProperty: function deleteProperty(target, name) { - var _getAdm$delete_; - if (false) { - warnAboutProxyRequirement("delete properties from an observable object. Use 'remove' from 'mobx' instead."); - } - if (!isStringish(name)) { - return false; - } - return (_getAdm$delete_ = getAdm(target).delete_(name, true)) != null ? _getAdm$delete_ : true; - }, - defineProperty: function defineProperty2(target, name, descriptor) { - var _getAdm$definePropert; - if (false) { - warnAboutProxyRequirement("define property on an observable object. Use 'defineProperty' from 'mobx' instead."); - } - return (_getAdm$definePropert = getAdm(target).defineProperty_(name, descriptor)) != null ? _getAdm$definePropert : true; - }, - ownKeys: function ownKeys2(target) { - if (false) { - warnAboutProxyRequirement("iterate keys to detect added / removed properties. Use 'keys' from 'mobx' instead."); - } - return getAdm(target).ownKeys_(); - }, - preventExtensions: function preventExtensions(target) { - die(13); - } -}; -function asDynamicObservableObject(target, options) { - var _target$$mobx, _target$$mobx$proxy_; - assertProxies(); - target = asObservableObject(target, options); - return (_target$$mobx$proxy_ = (_target$$mobx = target[$mobx]).proxy_) != null ? _target$$mobx$proxy_ : _target$$mobx.proxy_ = new Proxy(target, objectProxyTraps); -} -function hasInterceptors(interceptable) { - return interceptable.interceptors_ !== void 0 && interceptable.interceptors_.length > 0; -} -function registerInterceptor(interceptable, handler) { - var interceptors = interceptable.interceptors_ || (interceptable.interceptors_ = []); - interceptors.push(handler); - return once(function() { - var idx = interceptors.indexOf(handler); - if (idx !== -1) { - interceptors.splice(idx, 1); - } - }); -} -function interceptChange(interceptable, change) { - var prevU = untrackedStart(); - try { - var interceptors = [].concat(interceptable.interceptors_ || []); - for (var i5 = 0, l6 = interceptors.length; i5 < l6; i5++) { - change = interceptors[i5](change); - if (change && !change.type) { - die(14); - } - if (!change) { - break; - } - } - return change; - } finally { - untrackedEnd(prevU); - } -} -function hasListeners(listenable) { - return listenable.changeListeners_ !== void 0 && listenable.changeListeners_.length > 0; -} -function registerListener(listenable, handler) { - var listeners = listenable.changeListeners_ || (listenable.changeListeners_ = []); - listeners.push(handler); - return once(function() { - var idx = listeners.indexOf(handler); - if (idx !== -1) { - listeners.splice(idx, 1); - } - }); -} -function notifyListeners(listenable, change) { - var prevU = untrackedStart(); - var listeners = listenable.changeListeners_; - if (!listeners) { - return; - } - listeners = listeners.slice(); - for (var i5 = 0, l6 = listeners.length; i5 < l6; i5++) { - listeners[i5](change); - } - untrackedEnd(prevU); -} -var keysSymbol = /* @__PURE__ */ Symbol("mobx-keys"); -function makeAutoObservable(target, overrides, options) { - if (false) { - if (!isPlainObject(target) && !isPlainObject(Object.getPrototypeOf(target))) { - die("'makeAutoObservable' can only be used for classes that don't have a superclass"); - } - if (isObservableObject(target)) { - die("makeAutoObservable can only be used on objects not already made observable"); - } - } - if (isPlainObject(target)) { - return extendObservable(target, target, overrides, options); - } - initObservable(function() { - var adm = asObservableObject(target, options)[$mobx]; - if (!target[keysSymbol]) { - var proto = Object.getPrototypeOf(target); - var keys = new Set([].concat(ownKeys(target), ownKeys(proto))); - keys["delete"]("constructor"); - keys["delete"]($mobx); - addHiddenProp(proto, keysSymbol, keys); - } - target[keysSymbol].forEach(function(key) { - return adm.make_( - key, - // must pass "undefined" for { key: undefined } - !overrides ? true : key in overrides ? overrides[key] : true - ); - }); - }); - return target; -} -var SPLICE = "splice"; -var UPDATE = "update"; -var MAX_SPLICE_SIZE = 1e4; -var arrayTraps = { - get: function get2(target, name) { - var adm = target[$mobx]; - if (name === $mobx) { - return adm; - } - if (name === "length") { - return adm.getArrayLength_(); - } - if (typeof name === "string" && !isNaN(name)) { - return adm.get_(parseInt(name)); - } - if (hasProp(arrayExtensions, name)) { - return arrayExtensions[name]; - } - return target[name]; - }, - set: function set3(target, name, value) { - var adm = target[$mobx]; - if (name === "length") { - adm.setArrayLength_(value); - } - if (typeof name === "symbol" || isNaN(name)) { - target[name] = value; - } else { - adm.set_(parseInt(name), value); - } - return true; - }, - preventExtensions: function preventExtensions2() { - die(15); - } -}; -var ObservableArrayAdministration = /* @__PURE__ */ function() { - function ObservableArrayAdministration2(name, enhancer, owned_, legacyMode_) { - if (name === void 0) { - name = false ? "ObservableArray@" + getNextId() : "ObservableArray"; - } - this.owned_ = void 0; - this.legacyMode_ = void 0; - this.atom_ = void 0; - this.values_ = []; - this.interceptors_ = void 0; - this.changeListeners_ = void 0; - this.enhancer_ = void 0; - this.dehancer = void 0; - this.proxy_ = void 0; - this.lastKnownLength_ = 0; - this.owned_ = owned_; - this.legacyMode_ = legacyMode_; - this.atom_ = new Atom(name); - this.enhancer_ = function(newV, oldV) { - return enhancer(newV, oldV, false ? name + "[..]" : "ObservableArray[..]"); - }; - } - var _proto = ObservableArrayAdministration2.prototype; - _proto.dehanceValue_ = function dehanceValue_(value) { - if (this.dehancer !== void 0) { - return this.dehancer(value); - } - return value; - }; - _proto.dehanceValues_ = function dehanceValues_(values) { - if (this.dehancer !== void 0 && values.length > 0) { - return values.map(this.dehancer); - } - return values; - }; - _proto.intercept_ = function intercept_(handler) { - return registerInterceptor(this, handler); - }; - _proto.observe_ = function observe_(listener, fireImmediately) { - if (fireImmediately === void 0) { - fireImmediately = false; - } - if (fireImmediately) { - listener({ - observableKind: "array", - object: this.proxy_, - debugObjectName: this.atom_.name_, - type: "splice", - index: 0, - added: this.values_.slice(), - addedCount: this.values_.length, - removed: [], - removedCount: 0 - }); - } - return registerListener(this, listener); - }; - _proto.getArrayLength_ = function getArrayLength_() { - this.atom_.reportObserved(); - return this.values_.length; - }; - _proto.setArrayLength_ = function setArrayLength_(newLength) { - if (typeof newLength !== "number" || isNaN(newLength) || newLength < 0) { - die("Out of range: " + newLength); - } - var currentLength = this.values_.length; - if (newLength === currentLength) { - return; - } else if (newLength > currentLength) { - var newItems = new Array(newLength - currentLength); - for (var i5 = 0; i5 < newLength - currentLength; i5++) { - newItems[i5] = void 0; - } - this.spliceWithArray_(currentLength, 0, newItems); - } else { - this.spliceWithArray_(newLength, currentLength - newLength); - } - }; - _proto.updateArrayLength_ = function updateArrayLength_(oldLength, delta) { - if (oldLength !== this.lastKnownLength_) { - die(16); - } - this.lastKnownLength_ += delta; - if (this.legacyMode_ && delta > 0) { - reserveArrayBuffer(oldLength + delta + 1); - } - }; - _proto.spliceWithArray_ = function spliceWithArray_(index, deleteCount, newItems) { - var _this = this; - checkIfStateModificationsAreAllowed(this.atom_); - var length = this.values_.length; - if (index === void 0) { - index = 0; - } else if (index > length) { - index = length; - } else if (index < 0) { - index = Math.max(0, length + index); - } - if (arguments.length === 1) { - deleteCount = length - index; - } else if (deleteCount === void 0 || deleteCount === null) { - deleteCount = 0; - } else { - deleteCount = Math.max(0, Math.min(deleteCount, length - index)); - } - if (newItems === void 0) { - newItems = EMPTY_ARRAY; - } - if (hasInterceptors(this)) { - var change = interceptChange(this, { - object: this.proxy_, - type: SPLICE, - index, - removedCount: deleteCount, - added: newItems - }); - if (!change) { - return EMPTY_ARRAY; - } - deleteCount = change.removedCount; - newItems = change.added; - } - newItems = newItems.length === 0 ? newItems : newItems.map(function(v2) { - return _this.enhancer_(v2, void 0); - }); - if (this.legacyMode_ || false) { - var lengthDelta = newItems.length - deleteCount; - this.updateArrayLength_(length, lengthDelta); - } - var res = this.spliceItemsIntoValues_(index, deleteCount, newItems); - if (deleteCount !== 0 || newItems.length !== 0) { - this.notifyArraySplice_(index, newItems, res); - } - return this.dehanceValues_(res); - }; - _proto.spliceItemsIntoValues_ = function spliceItemsIntoValues_(index, deleteCount, newItems) { - if (newItems.length < MAX_SPLICE_SIZE) { - var _this$values_; - return (_this$values_ = this.values_).splice.apply(_this$values_, [index, deleteCount].concat(newItems)); - } else { - var res = this.values_.slice(index, index + deleteCount); - var oldItems = this.values_.slice(index + deleteCount); - this.values_.length += newItems.length - deleteCount; - for (var i5 = 0; i5 < newItems.length; i5++) { - this.values_[index + i5] = newItems[i5]; - } - for (var _i = 0; _i < oldItems.length; _i++) { - this.values_[index + newItems.length + _i] = oldItems[_i]; - } - return res; - } - }; - _proto.notifyArrayChildUpdate_ = function notifyArrayChildUpdate_(index, newValue, oldValue) { - var notifySpy = !this.owned_ && isSpyEnabled(); - var notify = hasListeners(this); - var change = notify || notifySpy ? { - observableKind: "array", - object: this.proxy_, - type: UPDATE, - debugObjectName: this.atom_.name_, - index, - newValue, - oldValue - } : null; - if (false) { - spyReportStart(change); - } - this.atom_.reportChanged(); - if (notify) { - notifyListeners(this, change); - } - if (false) { - spyReportEnd(); - } - }; - _proto.notifyArraySplice_ = function notifyArraySplice_(index, added, removed) { - var notifySpy = !this.owned_ && isSpyEnabled(); - var notify = hasListeners(this); - var change = notify || notifySpy ? { - observableKind: "array", - object: this.proxy_, - debugObjectName: this.atom_.name_, - type: SPLICE, - index, - removed, - added, - removedCount: removed.length, - addedCount: added.length - } : null; - if (false) { - spyReportStart(change); - } - this.atom_.reportChanged(); - if (notify) { - notifyListeners(this, change); - } - if (false) { - spyReportEnd(); - } - }; - _proto.get_ = function get_(index) { - if (this.legacyMode_ && index >= this.values_.length) { - console.warn(false ? "[mobx.array] Attempt to read an array index (" + index + ") that is out of bounds (" + this.values_.length + "). Please check length first. Out of bound indices will not be tracked by MobX" : "[mobx] Out of bounds read: " + index); - return void 0; - } - this.atom_.reportObserved(); - return this.dehanceValue_(this.values_[index]); - }; - _proto.set_ = function set_(index, newValue) { - var values = this.values_; - if (this.legacyMode_ && index > values.length) { - die(17, index, values.length); - } - if (index < values.length) { - checkIfStateModificationsAreAllowed(this.atom_); - var oldValue = values[index]; - if (hasInterceptors(this)) { - var change = interceptChange(this, { - type: UPDATE, - object: this.proxy_, - index, - newValue - }); - if (!change) { - return; - } - newValue = change.newValue; - } - newValue = this.enhancer_(newValue, oldValue); - var changed = newValue !== oldValue; - if (changed) { - values[index] = newValue; - this.notifyArrayChildUpdate_(index, newValue, oldValue); - } - } else { - var newItems = new Array(index + 1 - values.length); - for (var i5 = 0; i5 < newItems.length - 1; i5++) { - newItems[i5] = void 0; - } - newItems[newItems.length - 1] = newValue; - this.spliceWithArray_(values.length, 0, newItems); - } - }; - return ObservableArrayAdministration2; -}(); -function createObservableArray(initialValues, enhancer, name, owned) { - if (name === void 0) { - name = false ? "ObservableArray@" + getNextId() : "ObservableArray"; - } - if (owned === void 0) { - owned = false; - } - assertProxies(); - return initObservable(function() { - var adm = new ObservableArrayAdministration(name, enhancer, owned, false); - addHiddenFinalProp(adm.values_, $mobx, adm); - var proxy = new Proxy(adm.values_, arrayTraps); - adm.proxy_ = proxy; - if (initialValues && initialValues.length) { - adm.spliceWithArray_(0, 0, initialValues); - } - return proxy; - }); -} -var arrayExtensions = { - clear: function clear() { - return this.splice(0); - }, - replace: function replace(newItems) { - var adm = this[$mobx]; - return adm.spliceWithArray_(0, adm.values_.length, newItems); - }, - // Used by JSON.stringify - toJSON: function toJSON() { - return this.slice(); - }, - /* - * functions that do alter the internal structure of the array, (based on lib.es6.d.ts) - * since these functions alter the inner structure of the array, the have side effects. - * Because the have side effects, they should not be used in computed function, - * and for that reason the do not call dependencyState.notifyObserved - */ - splice: function splice(index, deleteCount) { - for (var _len = arguments.length, newItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { - newItems[_key - 2] = arguments[_key]; - } - var adm = this[$mobx]; - switch (arguments.length) { - case 0: - return []; - case 1: - return adm.spliceWithArray_(index); - case 2: - return adm.spliceWithArray_(index, deleteCount); - } - return adm.spliceWithArray_(index, deleteCount, newItems); - }, - spliceWithArray: function spliceWithArray(index, deleteCount, newItems) { - return this[$mobx].spliceWithArray_(index, deleteCount, newItems); - }, - push: function push() { - var adm = this[$mobx]; - for (var _len2 = arguments.length, items = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - items[_key2] = arguments[_key2]; - } - adm.spliceWithArray_(adm.values_.length, 0, items); - return adm.values_.length; - }, - pop: function pop() { - return this.splice(Math.max(this[$mobx].values_.length - 1, 0), 1)[0]; - }, - shift: function shift() { - return this.splice(0, 1)[0]; - }, - unshift: function unshift() { - var adm = this[$mobx]; - for (var _len3 = arguments.length, items = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { - items[_key3] = arguments[_key3]; - } - adm.spliceWithArray_(0, 0, items); - return adm.values_.length; - }, - reverse: function reverse() { - if (globalState.trackingDerivation) { - die(37, "reverse"); - } - this.replace(this.slice().reverse()); - return this; - }, - sort: function sort() { - if (globalState.trackingDerivation) { - die(37, "sort"); - } - var copy = this.slice(); - copy.sort.apply(copy, arguments); - this.replace(copy); - return this; - }, - remove: function remove(value) { - var adm = this[$mobx]; - var idx = adm.dehanceValues_(adm.values_).indexOf(value); - if (idx > -1) { - this.splice(idx, 1); - return true; - } - return false; - } -}; -addArrayExtension("at", simpleFunc); -addArrayExtension("concat", simpleFunc); -addArrayExtension("flat", simpleFunc); -addArrayExtension("includes", simpleFunc); -addArrayExtension("indexOf", simpleFunc); -addArrayExtension("join", simpleFunc); -addArrayExtension("lastIndexOf", simpleFunc); -addArrayExtension("slice", simpleFunc); -addArrayExtension("toString", simpleFunc); -addArrayExtension("toLocaleString", simpleFunc); -addArrayExtension("toSorted", simpleFunc); -addArrayExtension("toSpliced", simpleFunc); -addArrayExtension("with", simpleFunc); -addArrayExtension("every", mapLikeFunc); -addArrayExtension("filter", mapLikeFunc); -addArrayExtension("find", mapLikeFunc); -addArrayExtension("findIndex", mapLikeFunc); -addArrayExtension("findLast", mapLikeFunc); -addArrayExtension("findLastIndex", mapLikeFunc); -addArrayExtension("flatMap", mapLikeFunc); -addArrayExtension("forEach", mapLikeFunc); -addArrayExtension("map", mapLikeFunc); -addArrayExtension("some", mapLikeFunc); -addArrayExtension("toReversed", mapLikeFunc); -addArrayExtension("reduce", reduceLikeFunc); -addArrayExtension("reduceRight", reduceLikeFunc); -function addArrayExtension(funcName, funcFactory) { - if (typeof Array.prototype[funcName] === "function") { - arrayExtensions[funcName] = funcFactory(funcName); - } -} -function simpleFunc(funcName) { - return function() { - var adm = this[$mobx]; - adm.atom_.reportObserved(); - var dehancedValues = adm.dehanceValues_(adm.values_); - return dehancedValues[funcName].apply(dehancedValues, arguments); - }; -} -function mapLikeFunc(funcName) { - return function(callback, thisArg) { - var _this2 = this; - var adm = this[$mobx]; - adm.atom_.reportObserved(); - var dehancedValues = adm.dehanceValues_(adm.values_); - return dehancedValues[funcName](function(element, index) { - return callback.call(thisArg, element, index, _this2); - }); - }; -} -function reduceLikeFunc(funcName) { - return function() { - var _this3 = this; - var adm = this[$mobx]; - adm.atom_.reportObserved(); - var dehancedValues = adm.dehanceValues_(adm.values_); - var callback = arguments[0]; - arguments[0] = function(accumulator, currentValue, index) { - return callback(accumulator, currentValue, index, _this3); - }; - return dehancedValues[funcName].apply(dehancedValues, arguments); - }; -} -var isObservableArrayAdministration = /* @__PURE__ */ createInstanceofPredicate("ObservableArrayAdministration", ObservableArrayAdministration); -function isObservableArray(thing) { - return isObject(thing) && isObservableArrayAdministration(thing[$mobx]); -} -var _Symbol$iterator; -var _Symbol$toStringTag; -var ObservableMapMarker = {}; -var ADD = "add"; -var DELETE = "delete"; -_Symbol$iterator = Symbol.iterator; -_Symbol$toStringTag = Symbol.toStringTag; -var ObservableMap = /* @__PURE__ */ function() { - function ObservableMap2(initialData, enhancer_, name_) { - var _this = this; - if (enhancer_ === void 0) { - enhancer_ = deepEnhancer; - } - if (name_ === void 0) { - name_ = false ? "ObservableMap@" + getNextId() : "ObservableMap"; - } - this.enhancer_ = void 0; - this.name_ = void 0; - this[$mobx] = ObservableMapMarker; - this.data_ = void 0; - this.hasMap_ = void 0; - this.keysAtom_ = void 0; - this.interceptors_ = void 0; - this.changeListeners_ = void 0; - this.dehancer = void 0; - this.enhancer_ = enhancer_; - this.name_ = name_; - if (!isFunction(Map)) { - die(18); - } - initObservable(function() { - _this.keysAtom_ = createAtom(false ? _this.name_ + ".keys()" : "ObservableMap.keys()"); - _this.data_ = /* @__PURE__ */ new Map(); - _this.hasMap_ = /* @__PURE__ */ new Map(); - if (initialData) { - _this.merge(initialData); - } - }); - } - var _proto = ObservableMap2.prototype; - _proto.has_ = function has_(key) { - return this.data_.has(key); - }; - _proto.has = function has2(key) { - var _this2 = this; - if (!globalState.trackingDerivation) { - return this.has_(key); - } - var entry = this.hasMap_.get(key); - if (!entry) { - var newEntry = entry = new ObservableValue(this.has_(key), referenceEnhancer, false ? this.name_ + "." + stringifyKey(key) + "?" : "ObservableMap.key?", false); - this.hasMap_.set(key, newEntry); - onBecomeUnobserved(newEntry, function() { - return _this2.hasMap_["delete"](key); - }); - } - return entry.get(); - }; - _proto.set = function set4(key, value) { - var hasKey = this.has_(key); - if (hasInterceptors(this)) { - var change = interceptChange(this, { - type: hasKey ? UPDATE : ADD, - object: this, - newValue: value, - name: key - }); - if (!change) { - return this; - } - value = change.newValue; - } - if (hasKey) { - this.updateValue_(key, value); - } else { - this.addValue_(key, value); - } - return this; - }; - _proto["delete"] = function _delete(key) { - var _this3 = this; - checkIfStateModificationsAreAllowed(this.keysAtom_); - if (hasInterceptors(this)) { - var change = interceptChange(this, { - type: DELETE, - object: this, - name: key - }); - if (!change) { - return false; - } - } - if (this.has_(key)) { - var notifySpy = isSpyEnabled(); - var notify = hasListeners(this); - var _change = notify || notifySpy ? { - observableKind: "map", - debugObjectName: this.name_, - type: DELETE, - object: this, - oldValue: this.data_.get(key).value_, - name: key - } : null; - if (false) { - spyReportStart(_change); - } - transaction(function() { - var _this3$hasMap_$get; - _this3.keysAtom_.reportChanged(); - (_this3$hasMap_$get = _this3.hasMap_.get(key)) == null ? void 0 : _this3$hasMap_$get.setNewValue_(false); - var observable2 = _this3.data_.get(key); - observable2.setNewValue_(void 0); - _this3.data_["delete"](key); - }); - if (notify) { - notifyListeners(this, _change); - } - if (false) { - spyReportEnd(); - } - return true; - } - return false; - }; - _proto.updateValue_ = function updateValue_(key, newValue) { - var observable2 = this.data_.get(key); - newValue = observable2.prepareNewValue_(newValue); - if (newValue !== globalState.UNCHANGED) { - var notifySpy = isSpyEnabled(); - var notify = hasListeners(this); - var change = notify || notifySpy ? { - observableKind: "map", - debugObjectName: this.name_, - type: UPDATE, - object: this, - oldValue: observable2.value_, - name: key, - newValue - } : null; - if (false) { - spyReportStart(change); - } - observable2.setNewValue_(newValue); - if (notify) { - notifyListeners(this, change); - } - if (false) { - spyReportEnd(); - } - } - }; - _proto.addValue_ = function addValue_(key, newValue) { - var _this4 = this; - checkIfStateModificationsAreAllowed(this.keysAtom_); - transaction(function() { - var _this4$hasMap_$get; - var observable2 = new ObservableValue(newValue, _this4.enhancer_, false ? _this4.name_ + "." + stringifyKey(key) : "ObservableMap.key", false); - _this4.data_.set(key, observable2); - newValue = observable2.value_; - (_this4$hasMap_$get = _this4.hasMap_.get(key)) == null ? void 0 : _this4$hasMap_$get.setNewValue_(true); - _this4.keysAtom_.reportChanged(); - }); - var notifySpy = isSpyEnabled(); - var notify = hasListeners(this); - var change = notify || notifySpy ? { - observableKind: "map", - debugObjectName: this.name_, - type: ADD, - object: this, - name: key, - newValue - } : null; - if (false) { - spyReportStart(change); - } - if (notify) { - notifyListeners(this, change); - } - if (false) { - spyReportEnd(); - } - }; - _proto.get = function get3(key) { - if (this.has(key)) { - return this.dehanceValue_(this.data_.get(key).get()); - } - return this.dehanceValue_(void 0); - }; - _proto.dehanceValue_ = function dehanceValue_(value) { - if (this.dehancer !== void 0) { - return this.dehancer(value); - } - return value; - }; - _proto.keys = function keys() { - this.keysAtom_.reportObserved(); - return this.data_.keys(); - }; - _proto.values = function values() { - var self2 = this; - var keys = this.keys(); - return makeIterable({ - next: function next() { - var _keys$next = keys.next(), done = _keys$next.done, value = _keys$next.value; - return { - done, - value: done ? void 0 : self2.get(value) - }; - } - }); - }; - _proto.entries = function entries() { - var self2 = this; - var keys = this.keys(); - return makeIterable({ - next: function next() { - var _keys$next2 = keys.next(), done = _keys$next2.done, value = _keys$next2.value; - return { - done, - value: done ? void 0 : [value, self2.get(value)] - }; - } - }); - }; - _proto[_Symbol$iterator] = function() { - return this.entries(); - }; - _proto.forEach = function forEach(callback, thisArg) { - for (var _iterator = _createForOfIteratorHelperLoose(this), _step; !(_step = _iterator()).done; ) { - var _step$value = _step.value, key = _step$value[0], value = _step$value[1]; - callback.call(thisArg, value, key, this); - } - }; - _proto.merge = function merge(other) { - var _this5 = this; - if (isObservableMap(other)) { - other = new Map(other); - } - transaction(function() { - if (isPlainObject(other)) { - getPlainObjectKeys(other).forEach(function(key) { - return _this5.set(key, other[key]); - }); - } else if (Array.isArray(other)) { - other.forEach(function(_ref) { - var key = _ref[0], value = _ref[1]; - return _this5.set(key, value); - }); - } else if (isES6Map(other)) { - if (!isPlainES6Map(other)) { - die(19, other); - } - other.forEach(function(value, key) { - return _this5.set(key, value); - }); - } else if (other !== null && other !== void 0) { - die(20, other); - } - }); - return this; - }; - _proto.clear = function clear2() { - var _this6 = this; - transaction(function() { - untracked(function() { - for (var _iterator2 = _createForOfIteratorHelperLoose(_this6.keys()), _step2; !(_step2 = _iterator2()).done; ) { - var key = _step2.value; - _this6["delete"](key); - } - }); - }); - }; - _proto.replace = function replace2(values) { - var _this7 = this; - transaction(function() { - var replacementMap = convertToMap(values); - var orderedData = /* @__PURE__ */ new Map(); - var keysReportChangedCalled = false; - for (var _iterator3 = _createForOfIteratorHelperLoose(_this7.data_.keys()), _step3; !(_step3 = _iterator3()).done; ) { - var key = _step3.value; - if (!replacementMap.has(key)) { - var deleted = _this7["delete"](key); - if (deleted) { - keysReportChangedCalled = true; - } else { - var value = _this7.data_.get(key); - orderedData.set(key, value); - } - } - } - for (var _iterator4 = _createForOfIteratorHelperLoose(replacementMap.entries()), _step4; !(_step4 = _iterator4()).done; ) { - var _step4$value = _step4.value, _key = _step4$value[0], _value = _step4$value[1]; - var keyExisted = _this7.data_.has(_key); - _this7.set(_key, _value); - if (_this7.data_.has(_key)) { - var _value2 = _this7.data_.get(_key); - orderedData.set(_key, _value2); - if (!keyExisted) { - keysReportChangedCalled = true; - } - } - } - if (!keysReportChangedCalled) { - if (_this7.data_.size !== orderedData.size) { - _this7.keysAtom_.reportChanged(); - } else { - var iter1 = _this7.data_.keys(); - var iter2 = orderedData.keys(); - var next1 = iter1.next(); - var next2 = iter2.next(); - while (!next1.done) { - if (next1.value !== next2.value) { - _this7.keysAtom_.reportChanged(); - break; - } - next1 = iter1.next(); - next2 = iter2.next(); - } - } - } - _this7.data_ = orderedData; - }); - return this; - }; - _proto.toString = function toString2() { - return "[object ObservableMap]"; - }; - _proto.toJSON = function toJSON2() { - return Array.from(this); - }; - _proto.observe_ = function observe_(listener, fireImmediately) { - if (false) { - die("`observe` doesn't support fireImmediately=true in combination with maps."); - } - return registerListener(this, listener); - }; - _proto.intercept_ = function intercept_(handler) { - return registerInterceptor(this, handler); - }; - _createClass(ObservableMap2, [{ - key: "size", - get: function get3() { - this.keysAtom_.reportObserved(); - return this.data_.size; - } - }, { - key: _Symbol$toStringTag, - get: function get3() { - return "Map"; - } - }]); - return ObservableMap2; -}(); -var isObservableMap = /* @__PURE__ */ createInstanceofPredicate("ObservableMap", ObservableMap); -function convertToMap(dataStructure) { - if (isES6Map(dataStructure) || isObservableMap(dataStructure)) { - return dataStructure; - } else if (Array.isArray(dataStructure)) { - return new Map(dataStructure); - } else if (isPlainObject(dataStructure)) { - var map2 = /* @__PURE__ */ new Map(); - for (var key in dataStructure) { - map2.set(key, dataStructure[key]); - } - return map2; - } else { - return die(21, dataStructure); - } -} -var _Symbol$iterator$1; -var _Symbol$toStringTag$1; -var ObservableSetMarker = {}; -_Symbol$iterator$1 = Symbol.iterator; -_Symbol$toStringTag$1 = Symbol.toStringTag; -var ObservableSet = /* @__PURE__ */ function() { - function ObservableSet2(initialData, enhancer, name_) { - var _this = this; - if (enhancer === void 0) { - enhancer = deepEnhancer; - } - if (name_ === void 0) { - name_ = false ? "ObservableSet@" + getNextId() : "ObservableSet"; - } - this.name_ = void 0; - this[$mobx] = ObservableSetMarker; - this.data_ = /* @__PURE__ */ new Set(); - this.atom_ = void 0; - this.changeListeners_ = void 0; - this.interceptors_ = void 0; - this.dehancer = void 0; - this.enhancer_ = void 0; - this.name_ = name_; - if (!isFunction(Set)) { - die(22); - } - this.enhancer_ = function(newV, oldV) { - return enhancer(newV, oldV, name_); - }; - initObservable(function() { - _this.atom_ = createAtom(_this.name_); - if (initialData) { - _this.replace(initialData); - } - }); - } - var _proto = ObservableSet2.prototype; - _proto.dehanceValue_ = function dehanceValue_(value) { - if (this.dehancer !== void 0) { - return this.dehancer(value); - } - return value; - }; - _proto.clear = function clear2() { - var _this2 = this; - transaction(function() { - untracked(function() { - for (var _iterator = _createForOfIteratorHelperLoose(_this2.data_.values()), _step; !(_step = _iterator()).done; ) { - var value = _step.value; - _this2["delete"](value); - } - }); - }); - }; - _proto.forEach = function forEach(callbackFn, thisArg) { - for (var _iterator2 = _createForOfIteratorHelperLoose(this), _step2; !(_step2 = _iterator2()).done; ) { - var value = _step2.value; - callbackFn.call(thisArg, value, value, this); - } - }; - _proto.add = function add(value) { - var _this3 = this; - checkIfStateModificationsAreAllowed(this.atom_); - if (hasInterceptors(this)) { - var change = interceptChange(this, { - type: ADD, - object: this, - newValue: value - }); - if (!change) { - return this; - } - } - if (!this.has(value)) { - transaction(function() { - _this3.data_.add(_this3.enhancer_(value, void 0)); - _this3.atom_.reportChanged(); - }); - var notifySpy = false; - var notify = hasListeners(this); - var _change = notify || notifySpy ? { - observableKind: "set", - debugObjectName: this.name_, - type: ADD, - object: this, - newValue: value - } : null; - if (notifySpy && false) { - spyReportStart(_change); - } - if (notify) { - notifyListeners(this, _change); - } - if (notifySpy && false) { - spyReportEnd(); - } - } - return this; - }; - _proto["delete"] = function _delete(value) { - var _this4 = this; - if (hasInterceptors(this)) { - var change = interceptChange(this, { - type: DELETE, - object: this, - oldValue: value - }); - if (!change) { - return false; - } - } - if (this.has(value)) { - var notifySpy = false; - var notify = hasListeners(this); - var _change2 = notify || notifySpy ? { - observableKind: "set", - debugObjectName: this.name_, - type: DELETE, - object: this, - oldValue: value - } : null; - if (notifySpy && false) { - spyReportStart(_change2); - } - transaction(function() { - _this4.atom_.reportChanged(); - _this4.data_["delete"](value); - }); - if (notify) { - notifyListeners(this, _change2); - } - if (notifySpy && false) { - spyReportEnd(); - } - return true; - } - return false; - }; - _proto.has = function has2(value) { - this.atom_.reportObserved(); - return this.data_.has(this.dehanceValue_(value)); - }; - _proto.entries = function entries() { - var nextIndex = 0; - var keys = Array.from(this.keys()); - var values = Array.from(this.values()); - return makeIterable({ - next: function next() { - var index = nextIndex; - nextIndex += 1; - return index < values.length ? { - value: [keys[index], values[index]], - done: false - } : { - done: true - }; - } - }); - }; - _proto.keys = function keys() { - return this.values(); - }; - _proto.values = function values() { - this.atom_.reportObserved(); - var self2 = this; - var nextIndex = 0; - var observableValues = Array.from(this.data_.values()); - return makeIterable({ - next: function next() { - return nextIndex < observableValues.length ? { - value: self2.dehanceValue_(observableValues[nextIndex++]), - done: false - } : { - done: true - }; - } - }); - }; - _proto.replace = function replace2(other) { - var _this5 = this; - if (isObservableSet(other)) { - other = new Set(other); - } - transaction(function() { - if (Array.isArray(other)) { - _this5.clear(); - other.forEach(function(value) { - return _this5.add(value); - }); - } else if (isES6Set(other)) { - _this5.clear(); - other.forEach(function(value) { - return _this5.add(value); - }); - } else if (other !== null && other !== void 0) { - die("Cannot initialize set from " + other); - } - }); - return this; - }; - _proto.observe_ = function observe_(listener, fireImmediately) { - if (false) { - die("`observe` doesn't support fireImmediately=true in combination with sets."); - } - return registerListener(this, listener); - }; - _proto.intercept_ = function intercept_(handler) { - return registerInterceptor(this, handler); - }; - _proto.toJSON = function toJSON2() { - return Array.from(this); - }; - _proto.toString = function toString2() { - return "[object ObservableSet]"; - }; - _proto[_Symbol$iterator$1] = function() { - return this.values(); - }; - _createClass(ObservableSet2, [{ - key: "size", - get: function get3() { - this.atom_.reportObserved(); - return this.data_.size; - } - }, { - key: _Symbol$toStringTag$1, - get: function get3() { - return "Set"; - } - }]); - return ObservableSet2; -}(); -var isObservableSet = /* @__PURE__ */ createInstanceofPredicate("ObservableSet", ObservableSet); -var descriptorCache = /* @__PURE__ */ Object.create(null); -var REMOVE = "remove"; -var ObservableObjectAdministration = /* @__PURE__ */ function() { - function ObservableObjectAdministration2(target_, values_, name_, defaultAnnotation_) { - if (values_ === void 0) { - values_ = /* @__PURE__ */ new Map(); - } - if (defaultAnnotation_ === void 0) { - defaultAnnotation_ = autoAnnotation; - } - this.target_ = void 0; - this.values_ = void 0; - this.name_ = void 0; - this.defaultAnnotation_ = void 0; - this.keysAtom_ = void 0; - this.changeListeners_ = void 0; - this.interceptors_ = void 0; - this.proxy_ = void 0; - this.isPlainObject_ = void 0; - this.appliedAnnotations_ = void 0; - this.pendingKeys_ = void 0; - this.target_ = target_; - this.values_ = values_; - this.name_ = name_; - this.defaultAnnotation_ = defaultAnnotation_; - this.keysAtom_ = new Atom(false ? this.name_ + ".keys" : "ObservableObject.keys"); - this.isPlainObject_ = isPlainObject(this.target_); - if (false) { - die("defaultAnnotation must be valid annotation"); - } - if (false) { - this.appliedAnnotations_ = {}; - } - } - var _proto = ObservableObjectAdministration2.prototype; - _proto.getObservablePropValue_ = function getObservablePropValue_(key) { - return this.values_.get(key).get(); - }; - _proto.setObservablePropValue_ = function setObservablePropValue_(key, newValue) { - var observable2 = this.values_.get(key); - if (observable2 instanceof ComputedValue) { - observable2.set(newValue); - return true; - } - if (hasInterceptors(this)) { - var change = interceptChange(this, { - type: UPDATE, - object: this.proxy_ || this.target_, - name: key, - newValue - }); - if (!change) { - return null; - } - newValue = change.newValue; - } - newValue = observable2.prepareNewValue_(newValue); - if (newValue !== globalState.UNCHANGED) { - var notify = hasListeners(this); - var notifySpy = false; - var _change = notify || notifySpy ? { - type: UPDATE, - observableKind: "object", - debugObjectName: this.name_, - object: this.proxy_ || this.target_, - oldValue: observable2.value_, - name: key, - newValue - } : null; - if (false) { - spyReportStart(_change); - } - observable2.setNewValue_(newValue); - if (notify) { - notifyListeners(this, _change); - } - if (false) { - spyReportEnd(); - } - } - return true; - }; - _proto.get_ = function get_(key) { - if (globalState.trackingDerivation && !hasProp(this.target_, key)) { - this.has_(key); - } - return this.target_[key]; - }; - _proto.set_ = function set_(key, value, proxyTrap) { - if (proxyTrap === void 0) { - proxyTrap = false; - } - if (hasProp(this.target_, key)) { - if (this.values_.has(key)) { - return this.setObservablePropValue_(key, value); - } else if (proxyTrap) { - return Reflect.set(this.target_, key, value); - } else { - this.target_[key] = value; - return true; - } - } else { - return this.extend_(key, { - value, - enumerable: true, - writable: true, - configurable: true - }, this.defaultAnnotation_, proxyTrap); - } - }; - _proto.has_ = function has_(key) { - if (!globalState.trackingDerivation) { - return key in this.target_; - } - this.pendingKeys_ || (this.pendingKeys_ = /* @__PURE__ */ new Map()); - var entry = this.pendingKeys_.get(key); - if (!entry) { - entry = new ObservableValue(key in this.target_, referenceEnhancer, false ? this.name_ + "." + stringifyKey(key) + "?" : "ObservableObject.key?", false); - this.pendingKeys_.set(key, entry); - } - return entry.get(); - }; - _proto.make_ = function make_(key, annotation) { - if (annotation === true) { - annotation = this.defaultAnnotation_; - } - if (annotation === false) { - return; - } - assertAnnotable(this, annotation, key); - if (!(key in this.target_)) { - var _this$target_$storedA; - if ((_this$target_$storedA = this.target_[storedAnnotationsSymbol]) != null && _this$target_$storedA[key]) { - return; - } else { - die(1, annotation.annotationType_, this.name_ + "." + key.toString()); - } - } - var source = this.target_; - while (source && source !== objectPrototype) { - var descriptor = getDescriptor(source, key); - if (descriptor) { - var outcome = annotation.make_(this, key, descriptor, source); - if (outcome === 0) { - return; - } - if (outcome === 1) { - break; - } - } - source = Object.getPrototypeOf(source); - } - recordAnnotationApplied(this, annotation, key); - }; - _proto.extend_ = function extend_(key, descriptor, annotation, proxyTrap) { - if (proxyTrap === void 0) { - proxyTrap = false; - } - if (annotation === true) { - annotation = this.defaultAnnotation_; - } - if (annotation === false) { - return this.defineProperty_(key, descriptor, proxyTrap); - } - assertAnnotable(this, annotation, key); - var outcome = annotation.extend_(this, key, descriptor, proxyTrap); - if (outcome) { - recordAnnotationApplied(this, annotation, key); - } - return outcome; - }; - _proto.defineProperty_ = function defineProperty_(key, descriptor, proxyTrap) { - if (proxyTrap === void 0) { - proxyTrap = false; - } - checkIfStateModificationsAreAllowed(this.keysAtom_); - try { - startBatch(); - var deleteOutcome = this.delete_(key); - if (!deleteOutcome) { - return deleteOutcome; - } - if (hasInterceptors(this)) { - var change = interceptChange(this, { - object: this.proxy_ || this.target_, - name: key, - type: ADD, - newValue: descriptor.value - }); - if (!change) { - return null; - } - var newValue = change.newValue; - if (descriptor.value !== newValue) { - descriptor = _extends({}, descriptor, { - value: newValue - }); - } - } - if (proxyTrap) { - if (!Reflect.defineProperty(this.target_, key, descriptor)) { - return false; - } - } else { - defineProperty(this.target_, key, descriptor); - } - this.notifyPropertyAddition_(key, descriptor.value); - } finally { - endBatch(); - } - return true; - }; - _proto.defineObservableProperty_ = function defineObservableProperty_(key, value, enhancer, proxyTrap) { - if (proxyTrap === void 0) { - proxyTrap = false; - } - checkIfStateModificationsAreAllowed(this.keysAtom_); - try { - startBatch(); - var deleteOutcome = this.delete_(key); - if (!deleteOutcome) { - return deleteOutcome; - } - if (hasInterceptors(this)) { - var change = interceptChange(this, { - object: this.proxy_ || this.target_, - name: key, - type: ADD, - newValue: value - }); - if (!change) { - return null; - } - value = change.newValue; - } - var cachedDescriptor = getCachedObservablePropDescriptor(key); - var descriptor = { - configurable: globalState.safeDescriptors ? this.isPlainObject_ : true, - enumerable: true, - get: cachedDescriptor.get, - set: cachedDescriptor.set - }; - if (proxyTrap) { - if (!Reflect.defineProperty(this.target_, key, descriptor)) { - return false; - } - } else { - defineProperty(this.target_, key, descriptor); - } - var observable2 = new ObservableValue(value, enhancer, false ? this.name_ + "." + key.toString() : "ObservableObject.key", false); - this.values_.set(key, observable2); - this.notifyPropertyAddition_(key, observable2.value_); - } finally { - endBatch(); - } - return true; - }; - _proto.defineComputedProperty_ = function defineComputedProperty_(key, options, proxyTrap) { - if (proxyTrap === void 0) { - proxyTrap = false; - } - checkIfStateModificationsAreAllowed(this.keysAtom_); - try { - startBatch(); - var deleteOutcome = this.delete_(key); - if (!deleteOutcome) { - return deleteOutcome; - } - if (hasInterceptors(this)) { - var change = interceptChange(this, { - object: this.proxy_ || this.target_, - name: key, - type: ADD, - newValue: void 0 - }); - if (!change) { - return null; - } - } - options.name || (options.name = false ? this.name_ + "." + key.toString() : "ObservableObject.key"); - options.context = this.proxy_ || this.target_; - var cachedDescriptor = getCachedObservablePropDescriptor(key); - var descriptor = { - configurable: globalState.safeDescriptors ? this.isPlainObject_ : true, - enumerable: false, - get: cachedDescriptor.get, - set: cachedDescriptor.set - }; - if (proxyTrap) { - if (!Reflect.defineProperty(this.target_, key, descriptor)) { - return false; - } - } else { - defineProperty(this.target_, key, descriptor); - } - this.values_.set(key, new ComputedValue(options)); - this.notifyPropertyAddition_(key, void 0); - } finally { - endBatch(); - } - return true; - }; - _proto.delete_ = function delete_(key, proxyTrap) { - if (proxyTrap === void 0) { - proxyTrap = false; - } - checkIfStateModificationsAreAllowed(this.keysAtom_); - if (!hasProp(this.target_, key)) { - return true; - } - if (hasInterceptors(this)) { - var change = interceptChange(this, { - object: this.proxy_ || this.target_, - name: key, - type: REMOVE - }); - if (!change) { - return null; - } - } - try { - var _this$pendingKeys_, _this$pendingKeys_$ge; - startBatch(); - var notify = hasListeners(this); - var notifySpy = false; - var observable2 = this.values_.get(key); - var value = void 0; - if (!observable2 && (notify || notifySpy)) { - var _getDescriptor2; - value = (_getDescriptor2 = getDescriptor(this.target_, key)) == null ? void 0 : _getDescriptor2.value; - } - if (proxyTrap) { - if (!Reflect.deleteProperty(this.target_, key)) { - return false; - } - } else { - delete this.target_[key]; - } - if (false) { - delete this.appliedAnnotations_[key]; - } - if (observable2) { - this.values_["delete"](key); - if (observable2 instanceof ObservableValue) { - value = observable2.value_; - } - propagateChanged(observable2); - } - this.keysAtom_.reportChanged(); - (_this$pendingKeys_ = this.pendingKeys_) == null ? void 0 : (_this$pendingKeys_$ge = _this$pendingKeys_.get(key)) == null ? void 0 : _this$pendingKeys_$ge.set(key in this.target_); - if (notify || notifySpy) { - var _change2 = { - type: REMOVE, - observableKind: "object", - object: this.proxy_ || this.target_, - debugObjectName: this.name_, - oldValue: value, - name: key - }; - if (false) { - spyReportStart(_change2); - } - if (notify) { - notifyListeners(this, _change2); - } - if (false) { - spyReportEnd(); - } - } - } finally { - endBatch(); - } - return true; - }; - _proto.observe_ = function observe_(callback, fireImmediately) { - if (false) { - die("`observe` doesn't support the fire immediately property for observable objects."); - } - return registerListener(this, callback); - }; - _proto.intercept_ = function intercept_(handler) { - return registerInterceptor(this, handler); - }; - _proto.notifyPropertyAddition_ = function notifyPropertyAddition_(key, value) { - var _this$pendingKeys_2, _this$pendingKeys_2$g; - var notify = hasListeners(this); - var notifySpy = false; - if (notify || notifySpy) { - var change = notify || notifySpy ? { - type: ADD, - observableKind: "object", - debugObjectName: this.name_, - object: this.proxy_ || this.target_, - name: key, - newValue: value - } : null; - if (false) { - spyReportStart(change); - } - if (notify) { - notifyListeners(this, change); - } - if (false) { - spyReportEnd(); - } - } - (_this$pendingKeys_2 = this.pendingKeys_) == null ? void 0 : (_this$pendingKeys_2$g = _this$pendingKeys_2.get(key)) == null ? void 0 : _this$pendingKeys_2$g.set(true); - this.keysAtom_.reportChanged(); - }; - _proto.ownKeys_ = function ownKeys_() { - this.keysAtom_.reportObserved(); - return ownKeys(this.target_); - }; - _proto.keys_ = function keys_() { - this.keysAtom_.reportObserved(); - return Object.keys(this.target_); - }; - return ObservableObjectAdministration2; -}(); -function asObservableObject(target, options) { - var _options$name; - if (false) { - die("Options can't be provided for already observable objects."); - } - if (hasProp(target, $mobx)) { - if (false) { - die("Cannot convert '" + getDebugName(target) + "' into observable object:\nThe target is already observable of different type.\nExtending builtins is not supported."); - } - return target; - } - if (false) { - die("Cannot make the designated object observable; it is not extensible"); - } - var name = (_options$name = options == null ? void 0 : options.name) != null ? _options$name : false ? (isPlainObject(target) ? "ObservableObject" : target.constructor.name) + "@" + getNextId() : "ObservableObject"; - var adm = new ObservableObjectAdministration(target, /* @__PURE__ */ new Map(), String(name), getAnnotationFromOptions(options)); - addHiddenProp(target, $mobx, adm); - return target; -} -var isObservableObjectAdministration = /* @__PURE__ */ createInstanceofPredicate("ObservableObjectAdministration", ObservableObjectAdministration); -function getCachedObservablePropDescriptor(key) { - return descriptorCache[key] || (descriptorCache[key] = { - get: function get3() { - return this[$mobx].getObservablePropValue_(key); - }, - set: function set4(value) { - return this[$mobx].setObservablePropValue_(key, value); - } - }); -} -function isObservableObject(thing) { - if (isObject(thing)) { - return isObservableObjectAdministration(thing[$mobx]); - } - return false; -} -function recordAnnotationApplied(adm, annotation, key) { - var _adm$target_$storedAn; - if (false) { - adm.appliedAnnotations_[key] = annotation; - } - (_adm$target_$storedAn = adm.target_[storedAnnotationsSymbol]) == null ? true : delete _adm$target_$storedAn[key]; -} -function assertAnnotable(adm, annotation, key) { - if (false) { - die("Cannot annotate '" + adm.name_ + "." + key.toString() + "': Invalid annotation."); - } - if (false) { - var fieldName = adm.name_ + "." + key.toString(); - var currentAnnotationType = adm.appliedAnnotations_[key].annotationType_; - var requestedAnnotationType = annotation.annotationType_; - die("Cannot apply '" + requestedAnnotationType + "' to '" + fieldName + "':" + ("\nThe field is already annotated with '" + currentAnnotationType + "'.") + "\nRe-annotating fields is not allowed.\nUse 'override' annotation for methods overridden by subclass."); - } -} -var ENTRY_0 = /* @__PURE__ */ createArrayEntryDescriptor(0); -var safariPrototypeSetterInheritanceBug = /* @__PURE__ */ function() { - var v2 = false; - var p3 = {}; - Object.defineProperty(p3, "0", { - set: function set4() { - v2 = true; - } - }); - Object.create(p3)["0"] = 1; - return v2 === false; -}(); -var OBSERVABLE_ARRAY_BUFFER_SIZE = 0; -var StubArray = function StubArray2() { -}; -function inherit(ctor, proto) { - if (Object.setPrototypeOf) { - Object.setPrototypeOf(ctor.prototype, proto); - } else if (ctor.prototype.__proto__ !== void 0) { - ctor.prototype.__proto__ = proto; - } else { - ctor.prototype = proto; - } -} -inherit(StubArray, Array.prototype); -var LegacyObservableArray = /* @__PURE__ */ function(_StubArray, _Symbol$toStringTag2, _Symbol$iterator2) { - _inheritsLoose(LegacyObservableArray2, _StubArray); - function LegacyObservableArray2(initialValues, enhancer, name, owned) { - var _this; - if (name === void 0) { - name = false ? "ObservableArray@" + getNextId() : "ObservableArray"; - } - if (owned === void 0) { - owned = false; - } - _this = _StubArray.call(this) || this; - initObservable(function() { - var adm = new ObservableArrayAdministration(name, enhancer, owned, true); - adm.proxy_ = _assertThisInitialized(_this); - addHiddenFinalProp(_assertThisInitialized(_this), $mobx, adm); - if (initialValues && initialValues.length) { - _this.spliceWithArray(0, 0, initialValues); - } - if (safariPrototypeSetterInheritanceBug) { - Object.defineProperty(_assertThisInitialized(_this), "0", ENTRY_0); - } - }); - return _this; - } - var _proto = LegacyObservableArray2.prototype; - _proto.concat = function concat() { - this[$mobx].atom_.reportObserved(); - for (var _len = arguments.length, arrays = new Array(_len), _key = 0; _key < _len; _key++) { - arrays[_key] = arguments[_key]; - } - return Array.prototype.concat.apply( - this.slice(), - //@ts-ignore - arrays.map(function(a5) { - return isObservableArray(a5) ? a5.slice() : a5; - }) - ); - }; - _proto[_Symbol$iterator2] = function() { - var self2 = this; - var nextIndex = 0; - return makeIterable({ - next: function next() { - return nextIndex < self2.length ? { - value: self2[nextIndex++], - done: false - } : { - done: true, - value: void 0 - }; - } - }); - }; - _createClass(LegacyObservableArray2, [{ - key: "length", - get: function get3() { - return this[$mobx].getArrayLength_(); - }, - set: function set4(newLength) { - this[$mobx].setArrayLength_(newLength); - } - }, { - key: _Symbol$toStringTag2, - get: function get3() { - return "Array"; - } - }]); - return LegacyObservableArray2; -}(StubArray, Symbol.toStringTag, Symbol.iterator); -Object.entries(arrayExtensions).forEach(function(_ref) { - var prop = _ref[0], fn = _ref[1]; - if (prop !== "concat") { - addHiddenProp(LegacyObservableArray.prototype, prop, fn); - } -}); -function createArrayEntryDescriptor(index) { - return { - enumerable: false, - configurable: true, - get: function get3() { - return this[$mobx].get_(index); - }, - set: function set4(value) { - this[$mobx].set_(index, value); - } - }; -} -function createArrayBufferItem(index) { - defineProperty(LegacyObservableArray.prototype, "" + index, createArrayEntryDescriptor(index)); -} -function reserveArrayBuffer(max) { - if (max > OBSERVABLE_ARRAY_BUFFER_SIZE) { - for (var index = OBSERVABLE_ARRAY_BUFFER_SIZE; index < max + 100; index++) { - createArrayBufferItem(index); - } - OBSERVABLE_ARRAY_BUFFER_SIZE = max; - } -} -reserveArrayBuffer(1e3); -function createLegacyArray(initialValues, enhancer, name) { - return new LegacyObservableArray(initialValues, enhancer, name); -} -function getAtom(thing, property) { - if (typeof thing === "object" && thing !== null) { - if (isObservableArray(thing)) { - if (property !== void 0) { - die(23); - } - return thing[$mobx].atom_; - } - if (isObservableSet(thing)) { - return thing.atom_; - } - if (isObservableMap(thing)) { - if (property === void 0) { - return thing.keysAtom_; - } - var observable2 = thing.data_.get(property) || thing.hasMap_.get(property); - if (!observable2) { - die(25, property, getDebugName(thing)); - } - return observable2; - } - if (isObservableObject(thing)) { - if (!property) { - return die(26); - } - var _observable = thing[$mobx].values_.get(property); - if (!_observable) { - die(27, property, getDebugName(thing)); - } - return _observable; - } - if (isAtom(thing) || isComputedValue(thing) || isReaction(thing)) { - return thing; - } - } else if (isFunction(thing)) { - if (isReaction(thing[$mobx])) { - return thing[$mobx]; - } - } - die(28); -} -function getAdministration(thing, property) { - if (!thing) { - die(29); - } - if (property !== void 0) { - return getAdministration(getAtom(thing, property)); - } - if (isAtom(thing) || isComputedValue(thing) || isReaction(thing)) { - return thing; - } - if (isObservableMap(thing) || isObservableSet(thing)) { - return thing; - } - if (thing[$mobx]) { - return thing[$mobx]; - } - die(24, thing); -} -function getDebugName(thing, property) { - var named; - if (property !== void 0) { - named = getAtom(thing, property); - } else if (isAction(thing)) { - return thing.name; - } else if (isObservableObject(thing) || isObservableMap(thing) || isObservableSet(thing)) { - named = getAdministration(thing); - } else { - named = getAtom(thing); - } - return named.name_; -} -function initObservable(cb) { - var derivation = untrackedStart(); - var allowStateChanges = allowStateChangesStart(true); - startBatch(); - try { - return cb(); - } finally { - endBatch(); - allowStateChangesEnd(allowStateChanges); - untrackedEnd(derivation); - } -} -var toString = objectPrototype.toString; -function deepEqual(a5, b2, depth) { - if (depth === void 0) { - depth = -1; - } - return eq(a5, b2, depth); -} -function eq(a5, b2, depth, aStack, bStack) { - if (a5 === b2) { - return a5 !== 0 || 1 / a5 === 1 / b2; - } - if (a5 == null || b2 == null) { - return false; - } - if (a5 !== a5) { - return b2 !== b2; - } - var type = typeof a5; - if (type !== "function" && type !== "object" && typeof b2 != "object") { - return false; - } - var className = toString.call(a5); - if (className !== toString.call(b2)) { - return false; - } - switch (className) { - case "[object RegExp]": - case "[object String]": - return "" + a5 === "" + b2; - case "[object Number]": - if (+a5 !== +a5) { - return +b2 !== +b2; - } - return +a5 === 0 ? 1 / +a5 === 1 / b2 : +a5 === +b2; - case "[object Date]": - case "[object Boolean]": - return +a5 === +b2; - case "[object Symbol]": - return typeof Symbol !== "undefined" && Symbol.valueOf.call(a5) === Symbol.valueOf.call(b2); - case "[object Map]": - case "[object Set]": - if (depth >= 0) { - depth++; - } - break; - } - a5 = unwrap(a5); - b2 = unwrap(b2); - var areArrays = className === "[object Array]"; - if (!areArrays) { - if (typeof a5 != "object" || typeof b2 != "object") { - return false; - } - var aCtor = a5.constructor, bCtor = b2.constructor; - if (aCtor !== bCtor && !(isFunction(aCtor) && aCtor instanceof aCtor && isFunction(bCtor) && bCtor instanceof bCtor) && "constructor" in a5 && "constructor" in b2) { - return false; - } - } - if (depth === 0) { - return false; - } else if (depth < 0) { - depth = -1; - } - aStack = aStack || []; - bStack = bStack || []; - var length = aStack.length; - while (length--) { - if (aStack[length] === a5) { - return bStack[length] === b2; - } - } - aStack.push(a5); - bStack.push(b2); - if (areArrays) { - length = a5.length; - if (length !== b2.length) { - return false; - } - while (length--) { - if (!eq(a5[length], b2[length], depth - 1, aStack, bStack)) { - return false; - } - } - } else { - var keys = Object.keys(a5); - var key; - length = keys.length; - if (Object.keys(b2).length !== length) { - return false; - } - while (length--) { - key = keys[length]; - if (!(hasProp(b2, key) && eq(a5[key], b2[key], depth - 1, aStack, bStack))) { - return false; - } - } - } - aStack.pop(); - bStack.pop(); - return true; -} -function unwrap(a5) { - if (isObservableArray(a5)) { - return a5.slice(); - } - if (isES6Map(a5) || isObservableMap(a5)) { - return Array.from(a5.entries()); - } - if (isES6Set(a5) || isObservableSet(a5)) { - return Array.from(a5.entries()); - } - return a5; -} -function makeIterable(iterator) { - iterator[Symbol.iterator] = getSelf; - return iterator; -} -function getSelf() { - return this; -} -["Symbol", "Map", "Set"].forEach(function(m3) { - var g2 = getGlobal(); - if (typeof g2[m3] === "undefined") { - die("MobX requires global '" + m3 + "' to be available or polyfilled"); - } -}); -if (typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ === "object") { - __MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({ - spy, - extras: { - getDebugName - }, - $mobx - }); -} - -// src/store/Fragment.js -var Fragment = class { - path = ""; - type = ""; - model = { - id: "", - path: "" - }; - /** - * @param {Object} props - common properties of a fragment as a search result - * @param {string} props.path - cf path - * @param {string} props.type - merch web component type (e.g: merch-card) - * @param {Object} props.model - cf model - * @param {string} props.model.id - cf model id - * @param {string} props.model.path - cf model path - */ - constructor(props) { - Object.assign(this, props); - } - get hasChanges() { - return true; - } -}; - -// src/store/Search.js -var Search = class { - /** @type {string|undefined} Search query (the text the user entered) */ - query; - /** @type {string|undefined} Path of the request (e.g., the URL on a website) */ - path; - /** @type {string|undefined} Locale */ - locale; - /** @type {string|undefined} Content Fragment variant, e.g: merch-card */ - variant; - /** @type {string|undefined} Content Fragment Model ID */ - modelId; - /** @type {boolean|undefined} Whether the Content Fragment is published */ - published; - /** - * @type {Array} - */ - result = []; - constructor() { - makeAutoObservable(this); - } - /** - * - * @param {Array} result - */ - setResult(result) { - this.result = result; - } - update(props) { - Object.assign(this, props); - } -}; - -// ../commons/src/deeplink.js -var EVENT_HASHCHANGE = "hashchange"; -function parseState(hash = window.location.hash) { - const result = []; - const keyValuePairs = hash.replace(/^#/, "").split("&"); - for (const pair of keyValuePairs) { - const [key, value = ""] = pair.split("="); - if (key) { - result.push([key, decodeURIComponent(value.replace(/\+/g, " "))]); - } - } - return Object.fromEntries(result); -} -function pushState(state) { - const hash = new URLSearchParams(window.location.hash.slice(1)); - Object.entries(state).forEach(([key, value2]) => { - if (value2) { - hash.set(key, value2); - } else { - hash.delete(key); - } - }); - hash.sort(); - const value = hash.toString(); - if (value === window.location.hash) return; - let lastScrollTop = window.scrollY || document.documentElement.scrollTop; - window.location.hash = value; - window.scrollTo(0, lastScrollTop); -} -function deeplink(callback) { - const handler = () => { - if (!window.location.hash.includes("=")) return; - const state = parseState(window.location.hash); - callback(state); - }; - handler(); - window.addEventListener(EVENT_HASHCHANGE, handler); - return () => { - window.removeEventListener(EVENT_HASHCHANGE, handler); - }; -} - -// ../commons/src/aem.js -var accessToken = localStorage.getItem("masAccessToken"); -var headers = { - Authorization: `Bearer ${accessToken}`, - pragma: "no-cache", - "cache-control": "no-cache" -}; -async function searchFragment({ path, query }) { - const filter = {}; - if (path) { - filter.path = path; - } - if (query) { - filter.fullText = { - text: encodeURIComponent(query), - queryMode: "EXACT_WORDS" - }; - } - const searchParams = new URLSearchParams({ - query: JSON.stringify({ filter }) - }).toString(); - return fetch(`${this.cfSearchUrl}?${searchParams}`, { - headers - }).then((res) => res.json()).then(({ items }) => items); -} -async function getFragmentByPath(path) { - return fetch(`${this.cfFragmentsUrl}?path=${path}`, { - headers - }).then((res) => res.json()).then(({ items: [item] }) => item); -} -async function saveFragment(fragment) { -} -var AEM = class { - sites = { - cf: { - fragments: { - search: searchFragment.bind(this), - getCfByPath: getFragmentByPath.bind(this), - save: saveFragment.bind(this) - } - } - }; - constructor(bucket) { - const baseUrl = `https://${bucket}.adobeaemcloud.com`; - const sitesUrl = `${baseUrl}/adobe/sites`; - this.cfFragmentsUrl = `${sitesUrl}/cf/fragments`; - this.cfSearchUrl = `${this.cfFragmentsUrl}/search`; - } -}; - -// src/store/Store.js -var merchDataSourceCache; -var Store = class { - /** - * @type {Search} - */ - search = new Search(); - /** - * @type {import('@adobe/mas-commons').AEM} - */ - aem; - /** - * Selected fragment - * @type {Fragment} - */ - fragment; - /** - * @param {string} bucket - */ - constructor(bucket) { - if (!bucket) throw new Error("bucket is required"); - makeAutoObservable(this, { - aem: false - }); - this.aem = new AEM(bucket); - ({ cache: merchDataSourceCache } = document.createElement("merch-datasource")); - } - async doSearch(props) { - this.search.update(props); - const fragments = await this.aem.sites.cf.fragments.search(this.search).then((items) => { - merchDataSourceCache?.add(...items); - return items.map((item) => new Fragment(item)); - }); - this.search.setResult(fragments); - } - /** - * @param {FocusEvent} fragment - */ - selectFragment(fragment) { - this.fragment = fragment; - } -}; - -// src/events.js -var EVENT_SUBMIT = "submit"; - -// ../node_modules/lit-html/directive.js -var t4 = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }; -var e6 = (t5) => (...e7) => ({ _$litDirective$: t5, values: e7 }); -var i4 = class { - constructor(t5) { - } - get _$AU() { - return this._$AM._$AU; - } - _$AT(t5, e7, i5) { - this._$Ct = t5, this._$AM = e7, this._$Ci = i5; - } - _$AS(t5, e7) { - return this.update(t5, e7); - } - update(t5, e7) { - return this.render(...e7); - } -}; - -// ../node_modules/lit-html/directive-helpers.js -var { I: l5 } = j; -var r6 = () => document.createComment(""); -var c4 = (o7, i5, n7) => { - var t5; - const v2 = o7._$AA.parentNode, d4 = void 0 === i5 ? o7._$AB : i5._$AA; - if (void 0 === n7) { - const i6 = v2.insertBefore(r6(), d4), t6 = v2.insertBefore(r6(), d4); - n7 = new l5(i6, t6, o7, o7.options); - } else { - const l6 = n7._$AB.nextSibling, i6 = n7._$AM, u5 = i6 !== o7; - if (u5) { - let l7; - null === (t5 = n7._$AQ) || void 0 === t5 || t5.call(n7, o7), n7._$AM = o7, void 0 !== n7._$AP && (l7 = o7._$AU) !== i6._$AU && n7._$AP(l7); - } - if (l6 !== d4 || u5) { - let o8 = n7._$AA; - for (; o8 !== l6; ) { - const l7 = o8.nextSibling; - v2.insertBefore(o8, d4), o8 = l7; - } - } - } - return n7; -}; -var f2 = (o7, l6, i5 = o7) => (o7._$AI(l6, i5), o7); -var s7 = {}; -var a4 = (o7, l6 = s7) => o7._$AH = l6; -var m2 = (o7) => o7._$AH; -var p2 = (o7) => { - var l6; - null === (l6 = o7._$AP) || void 0 === l6 || l6.call(o7, false, true); - let i5 = o7._$AA; - const n7 = o7._$AB.nextSibling; - for (; i5 !== n7; ) { - const o8 = i5.nextSibling; - i5.remove(), i5 = o8; - } -}; - -// ../node_modules/lit-html/directives/repeat.js -var u4 = (e7, s8, t5) => { - const r7 = /* @__PURE__ */ new Map(); - for (let l6 = s8; l6 <= t5; l6++) r7.set(e7[l6], l6); - return r7; -}; -var c5 = e6(class extends i4 { - constructor(e7) { - if (super(e7), e7.type !== t4.CHILD) throw Error("repeat() can only be used in text expressions"); - } - ct(e7, s8, t5) { - let r7; - void 0 === t5 ? t5 = s8 : void 0 !== s8 && (r7 = s8); - const l6 = [], o7 = []; - let i5 = 0; - for (const s9 of e7) l6[i5] = r7 ? r7(s9, i5) : i5, o7[i5] = t5(s9, i5), i5++; - return { values: o7, keys: l6 }; - } - render(e7, s8, t5) { - return this.ct(e7, s8, t5).values; - } - update(s8, [t5, r7, c6]) { - var d4; - const a5 = m2(s8), { values: p3, keys: v2 } = this.ct(t5, r7, c6); - if (!Array.isArray(a5)) return this.ut = v2, p3; - const h4 = null !== (d4 = this.ut) && void 0 !== d4 ? d4 : this.ut = [], m3 = []; - let y2, x2, j2 = 0, k2 = a5.length - 1, w2 = 0, A2 = p3.length - 1; - for (; j2 <= k2 && w2 <= A2; ) if (null === a5[j2]) j2++; - else if (null === a5[k2]) k2--; - else if (h4[j2] === v2[w2]) m3[w2] = f2(a5[j2], p3[w2]), j2++, w2++; - else if (h4[k2] === v2[A2]) m3[A2] = f2(a5[k2], p3[A2]), k2--, A2--; - else if (h4[j2] === v2[A2]) m3[A2] = f2(a5[j2], p3[A2]), c4(s8, m3[A2 + 1], a5[j2]), j2++, A2--; - else if (h4[k2] === v2[w2]) m3[w2] = f2(a5[k2], p3[w2]), c4(s8, a5[j2], a5[k2]), k2--, w2++; - else if (void 0 === y2 && (y2 = u4(v2, w2, A2), x2 = u4(h4, j2, k2)), y2.has(h4[j2])) if (y2.has(h4[k2])) { - const e7 = x2.get(v2[w2]), t6 = void 0 !== e7 ? a5[e7] : null; - if (null === t6) { - const e8 = c4(s8, a5[j2]); - f2(e8, p3[w2]), m3[w2] = e8; - } else m3[w2] = f2(t6, p3[w2]), c4(s8, a5[j2], t6), a5[e7] = null; - w2++; - } else p2(a5[k2]), k2--; - else p2(a5[j2]), j2++; - for (; w2 <= A2; ) { - const e7 = c4(s8, m3[A2 + 1]); - f2(e7, p3[w2]), m3[w2++] = e7; - } - for (; j2 <= k2; ) { - const e7 = a5[j2++]; - null !== e7 && p2(e7); - } - return this.ut = v2, a4(s8, m3), T; - } -}); - -// ../node_modules/@adobe/lit-mobx/lib/mixin-custom.js -var reaction = Symbol("LitMobxRenderReaction"); -var cachedRequestUpdate = Symbol("LitMobxRequestUpdate"); -function MobxReactionUpdateCustom(constructor, ReactionConstructor) { - var _a, _b; - return _b = class MobxReactingElement extends constructor { - constructor() { - super(...arguments); - this[_a] = () => { - this.requestUpdate(); - }; - } - connectedCallback() { - super.connectedCallback(); - const name = this.constructor.name || this.nodeName; - this[reaction] = new ReactionConstructor(`${name}.update()`, this[cachedRequestUpdate]); - if (this.hasUpdated) - this.requestUpdate(); - } - disconnectedCallback() { - super.disconnectedCallback(); - if (this[reaction]) { - this[reaction].dispose(); - this[reaction] = void 0; - } - } - update(changedProperties) { - if (this[reaction]) { - this[reaction].track(super.update.bind(this, changedProperties)); - } else { - super.update(changedProperties); - } - } - }, _a = cachedRequestUpdate, _b; -} - -// src/studio.js -var models = { - merchCard: { - path: "/conf/sandbox/settings/dam/cfm/models/merch-card", - name: "Merch Card" - } -}; -var MasStudio = class extends MobxReactionUpdateCustom(s6, Reaction) { - static properties = { - store: { type: Object, state: true }, - bucket: { type: String, attribute: "aem-bucket" }, - searchText: { type: String, state: true }, - confirmSelect: { - type: Boolean, - state: true - }, - fragment: { - type: Object, - state: true - } - }; - constructor() { - super(); - this.confirmSelect = false; - } - connectedCallback() { - super.connectedCallback(); - this.store = new Store(this.bucket); - this.startDeeplink(); - } - disconnectedCallback() { - super.disconnectedCallback(); - this.deeplinkDisposer(); - } - get search() { - return this.querySelector("sp-search"); - } - get picker() { - return this.querySelector("sp-picker"); - } - createRenderRoot() { - return this; - } - get selectFragmentDialog() { - if (!this.confirmSelect) return A; - return x` - - -

You have unsaved changes!

-

- Do you want to save your changes before selecting another - merch card? -

- - Close - -
- `; - } - get result() { - if (this.store.search.result.length === 0) return A; - return x`
    - ${c5( - this.store.search.result, - (item) => item.path, - (item) => { - switch (item.model.path) { - case models.merchCard.path: - return x` - - `; - default: - return A; - } - } - )} -
`; - } - render() { - return x` -

Merch at Scale Studio

-
- - - All - Merch Card - - Search -
- ${this.selectFragmentDialog} ${this.result} - `; - } - async startDeeplink() { - this.deeplinkDisposer = deeplink(({ path, modelId, query }) => { - this.searchText = query; - this.store.search.update({ path, modelId }); - }); - if (this.searchText) { - await this.updateComplete; - this.doSearch(); - } - } - /** - * @param {Fragment} fragment - */ - editFragment(fragment, force = false) { - if (fragment === this.store.fragment) return; - if (this.store.fragment?.hasChanges && !force) { - this.confirmSelect = true; - } - this.store.selectFragment(fragment); - } - /** - * @param {Event} e; - */ - handleSearch(e7) { - this.searchText = this.search.value; - if (e7.type === EVENT_SUBMIT) { - e7.preventDefault(); - this.doSearch(); - } - } - async doSearch() { - const query = this.searchText; - const modelId = this.picker.value.replace("all", ""); - const path = "/content/dam/sandbox/mas"; - const search = { query, path, modelId }; - pushState(search); - this.store.doSearch(search); - } -}; -customElements.define("mas-studio", MasStudio); -/*! Bundled license information: - -@lit/reactive-element/css-tag.js: - (** - * @license - * Copyright 2019 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) - -@lit/reactive-element/reactive-element.js: - (** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) - -lit-html/lit-html.js: - (** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) - -@lit/reactive-element/css-tag.js: - (** - * @license - * Copyright 2019 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) - -@lit/reactive-element/reactive-element.js: - (** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) - -lit-element/lit-element.js: - (** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) - -lit-html/is-server.js: - (** - * @license - * Copyright 2022 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) - -lit-html/directive.js: - (** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) - -lit-html/directive-helpers.js: - (** - * @license - * Copyright 2020 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) - -lit-html/directives/repeat.js: - (** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) -*/ -//# sourceMappingURL=studio.js.map diff --git a/studio/libs/swc.js b/studio/libs/swc.js deleted file mode 100644 index ec5ff44d..00000000 --- a/studio/libs/swc.js +++ /dev/null @@ -1,9010 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __esm = (fn, res) => function __init() { - return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; -}; -var __commonJS = (cb, mod) => function __require() { - return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; -}; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); - -// ../node_modules/lit/node_modules/@lit/reactive-element/css-tag.js -var t, e, s, n, o, r, S, c; -var init_css_tag = __esm({ - "../node_modules/lit/node_modules/@lit/reactive-element/css-tag.js"() { - t = window; - e = t.ShadowRoot && (void 0 === t.ShadyCSS || t.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype; - s = Symbol(); - n = /* @__PURE__ */ new WeakMap(); - o = class { - constructor(t17, e23, n18) { - if (this._$cssResult$ = true, n18 !== s) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); - this.cssText = t17, this.t = e23; - } - get styleSheet() { - let t17 = this.o; - const s14 = this.t; - if (e && void 0 === t17) { - const e23 = void 0 !== s14 && 1 === s14.length; - e23 && (t17 = n.get(s14)), void 0 === t17 && ((this.o = t17 = new CSSStyleSheet()).replaceSync(this.cssText), e23 && n.set(s14, t17)); - } - return t17; - } - toString() { - return this.cssText; - } - }; - r = (t17) => new o("string" == typeof t17 ? t17 : t17 + "", void 0, s); - S = (s14, n18) => { - e ? s14.adoptedStyleSheets = n18.map((t17) => t17 instanceof CSSStyleSheet ? t17 : t17.styleSheet) : n18.forEach((e23) => { - const n19 = document.createElement("style"), o29 = t.litNonce; - void 0 !== o29 && n19.setAttribute("nonce", o29), n19.textContent = e23.cssText, s14.appendChild(n19); - }); - }; - c = e ? (t17) => t17 : (t17) => t17 instanceof CSSStyleSheet ? ((t18) => { - let e23 = ""; - for (const s14 of t18.cssRules) e23 += s14.cssText; - return r(e23); - })(t17) : t17; - } -}); - -// ../node_modules/lit/node_modules/@lit/reactive-element/reactive-element.js -var s2, e2, r2, h, o2, n2, a, l, d, u; -var init_reactive_element = __esm({ - "../node_modules/lit/node_modules/@lit/reactive-element/reactive-element.js"() { - init_css_tag(); - init_css_tag(); - e2 = window; - r2 = e2.trustedTypes; - h = r2 ? r2.emptyScript : ""; - o2 = e2.reactiveElementPolyfillSupport; - n2 = { toAttribute(t17, i20) { - switch (i20) { - case Boolean: - t17 = t17 ? h : null; - break; - case Object: - case Array: - t17 = null == t17 ? t17 : JSON.stringify(t17); - } - return t17; - }, fromAttribute(t17, i20) { - let s14 = t17; - switch (i20) { - case Boolean: - s14 = null !== t17; - break; - case Number: - s14 = null === t17 ? null : Number(t17); - break; - case Object: - case Array: - try { - s14 = JSON.parse(t17); - } catch (t18) { - s14 = null; - } - } - return s14; - } }; - a = (t17, i20) => i20 !== t17 && (i20 == i20 || t17 == t17); - l = { attribute: true, type: String, converter: n2, reflect: false, hasChanged: a }; - d = "finalized"; - u = class extends HTMLElement { - constructor() { - super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = false, this.hasUpdated = false, this._$El = null, this._$Eu(); - } - static addInitializer(t17) { - var i20; - this.finalize(), (null !== (i20 = this.h) && void 0 !== i20 ? i20 : this.h = []).push(t17); - } - static get observedAttributes() { - this.finalize(); - const t17 = []; - return this.elementProperties.forEach((i20, s14) => { - const e23 = this._$Ep(s14, i20); - void 0 !== e23 && (this._$Ev.set(e23, s14), t17.push(e23)); - }), t17; - } - static createProperty(t17, i20 = l) { - if (i20.state && (i20.attribute = false), this.finalize(), this.elementProperties.set(t17, i20), !i20.noAccessor && !this.prototype.hasOwnProperty(t17)) { - const s14 = "symbol" == typeof t17 ? Symbol() : "__" + t17, e23 = this.getPropertyDescriptor(t17, s14, i20); - void 0 !== e23 && Object.defineProperty(this.prototype, t17, e23); - } - } - static getPropertyDescriptor(t17, i20, s14) { - return { get() { - return this[i20]; - }, set(e23) { - const r18 = this[t17]; - this[i20] = e23, this.requestUpdate(t17, r18, s14); - }, configurable: true, enumerable: true }; - } - static getPropertyOptions(t17) { - return this.elementProperties.get(t17) || l; - } - static finalize() { - if (this.hasOwnProperty(d)) return false; - this[d] = true; - const t17 = Object.getPrototypeOf(this); - if (t17.finalize(), void 0 !== t17.h && (this.h = [...t17.h]), this.elementProperties = new Map(t17.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) { - const t18 = this.properties, i20 = [...Object.getOwnPropertyNames(t18), ...Object.getOwnPropertySymbols(t18)]; - for (const s14 of i20) this.createProperty(s14, t18[s14]); - } - return this.elementStyles = this.finalizeStyles(this.styles), true; - } - static finalizeStyles(i20) { - const s14 = []; - if (Array.isArray(i20)) { - const e23 = new Set(i20.flat(1 / 0).reverse()); - for (const i21 of e23) s14.unshift(c(i21)); - } else void 0 !== i20 && s14.push(c(i20)); - return s14; - } - static _$Ep(t17, i20) { - const s14 = i20.attribute; - return false === s14 ? void 0 : "string" == typeof s14 ? s14 : "string" == typeof t17 ? t17.toLowerCase() : void 0; - } - _$Eu() { - var t17; - this._$E_ = new Promise((t18) => this.enableUpdating = t18), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), null === (t17 = this.constructor.h) || void 0 === t17 || t17.forEach((t18) => t18(this)); - } - addController(t17) { - var i20, s14; - (null !== (i20 = this._$ES) && void 0 !== i20 ? i20 : this._$ES = []).push(t17), void 0 !== this.renderRoot && this.isConnected && (null === (s14 = t17.hostConnected) || void 0 === s14 || s14.call(t17)); - } - removeController(t17) { - var i20; - null === (i20 = this._$ES) || void 0 === i20 || i20.splice(this._$ES.indexOf(t17) >>> 0, 1); - } - _$Eg() { - this.constructor.elementProperties.forEach((t17, i20) => { - this.hasOwnProperty(i20) && (this._$Ei.set(i20, this[i20]), delete this[i20]); - }); - } - createRenderRoot() { - var t17; - const s14 = null !== (t17 = this.shadowRoot) && void 0 !== t17 ? t17 : this.attachShadow(this.constructor.shadowRootOptions); - return S(s14, this.constructor.elementStyles), s14; - } - connectedCallback() { - var t17; - void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(true), null === (t17 = this._$ES) || void 0 === t17 || t17.forEach((t18) => { - var i20; - return null === (i20 = t18.hostConnected) || void 0 === i20 ? void 0 : i20.call(t18); - }); - } - enableUpdating(t17) { - } - disconnectedCallback() { - var t17; - null === (t17 = this._$ES) || void 0 === t17 || t17.forEach((t18) => { - var i20; - return null === (i20 = t18.hostDisconnected) || void 0 === i20 ? void 0 : i20.call(t18); - }); - } - attributeChangedCallback(t17, i20, s14) { - this._$AK(t17, s14); - } - _$EO(t17, i20, s14 = l) { - var e23; - const r18 = this.constructor._$Ep(t17, s14); - if (void 0 !== r18 && true === s14.reflect) { - const h12 = (void 0 !== (null === (e23 = s14.converter) || void 0 === e23 ? void 0 : e23.toAttribute) ? s14.converter : n2).toAttribute(i20, s14.type); - this._$El = t17, null == h12 ? this.removeAttribute(r18) : this.setAttribute(r18, h12), this._$El = null; - } - } - _$AK(t17, i20) { - var s14; - const e23 = this.constructor, r18 = e23._$Ev.get(t17); - if (void 0 !== r18 && this._$El !== r18) { - const t18 = e23.getPropertyOptions(r18), h12 = "function" == typeof t18.converter ? { fromAttribute: t18.converter } : void 0 !== (null === (s14 = t18.converter) || void 0 === s14 ? void 0 : s14.fromAttribute) ? t18.converter : n2; - this._$El = r18, this[r18] = h12.fromAttribute(i20, t18.type), this._$El = null; - } - } - requestUpdate(t17, i20, s14) { - let e23 = true; - void 0 !== t17 && (((s14 = s14 || this.constructor.getPropertyOptions(t17)).hasChanged || a)(this[t17], i20) ? (this._$AL.has(t17) || this._$AL.set(t17, i20), true === s14.reflect && this._$El !== t17 && (void 0 === this._$EC && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t17, s14))) : e23 = false), !this.isUpdatePending && e23 && (this._$E_ = this._$Ej()); - } - async _$Ej() { - this.isUpdatePending = true; - try { - await this._$E_; - } catch (t18) { - Promise.reject(t18); - } - const t17 = this.scheduleUpdate(); - return null != t17 && await t17, !this.isUpdatePending; - } - scheduleUpdate() { - return this.performUpdate(); - } - performUpdate() { - var t17; - if (!this.isUpdatePending) return; - this.hasUpdated, this._$Ei && (this._$Ei.forEach((t18, i21) => this[i21] = t18), this._$Ei = void 0); - let i20 = false; - const s14 = this._$AL; - try { - i20 = this.shouldUpdate(s14), i20 ? (this.willUpdate(s14), null === (t17 = this._$ES) || void 0 === t17 || t17.forEach((t18) => { - var i21; - return null === (i21 = t18.hostUpdate) || void 0 === i21 ? void 0 : i21.call(t18); - }), this.update(s14)) : this._$Ek(); - } catch (t18) { - throw i20 = false, this._$Ek(), t18; - } - i20 && this._$AE(s14); - } - willUpdate(t17) { - } - _$AE(t17) { - var i20; - null === (i20 = this._$ES) || void 0 === i20 || i20.forEach((t18) => { - var i21; - return null === (i21 = t18.hostUpdated) || void 0 === i21 ? void 0 : i21.call(t18); - }), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t17)), this.updated(t17); - } - _$Ek() { - this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = false; - } - get updateComplete() { - return this.getUpdateComplete(); - } - getUpdateComplete() { - return this._$E_; - } - shouldUpdate(t17) { - return true; - } - update(t17) { - void 0 !== this._$EC && (this._$EC.forEach((t18, i20) => this._$EO(i20, this[i20], t18)), this._$EC = void 0), this._$Ek(); - } - updated(t17) { - } - firstUpdated(t17) { - } - }; - u[d] = true, u.elementProperties = /* @__PURE__ */ new Map(), u.elementStyles = [], u.shadowRootOptions = { mode: "open" }, null == o2 || o2({ ReactiveElement: u }), (null !== (s2 = e2.reactiveElementVersions) && void 0 !== s2 ? s2 : e2.reactiveElementVersions = []).push("1.6.3"); - } -}); - -// ../node_modules/lit-html/lit-html.js -function P(t17, i20) { - if (!Array.isArray(t17) || !t17.hasOwnProperty("raw")) throw Error("invalid template strings array"); - return void 0 !== e3 ? e3.createHTML(i20) : i20; -} -function S2(t17, i20, s14 = t17, e23) { - var o29, n18, l15, h12; - if (i20 === T) return i20; - let r18 = void 0 !== e23 ? null === (o29 = s14._$Co) || void 0 === o29 ? void 0 : o29[e23] : s14._$Cl; - const u15 = d2(i20) ? void 0 : i20._$litDirective$; - return (null == r18 ? void 0 : r18.constructor) !== u15 && (null === (n18 = null == r18 ? void 0 : r18._$AO) || void 0 === n18 || n18.call(r18, false), void 0 === u15 ? r18 = void 0 : (r18 = new u15(t17), r18._$AT(t17, s14, e23)), void 0 !== e23 ? (null !== (l15 = (h12 = s14)._$Co) && void 0 !== l15 ? l15 : h12._$Co = [])[e23] = r18 : s14._$Cl = r18), void 0 !== r18 && (i20 = S2(t17, r18._$AS(t17, i20.values), r18, e23)), i20; -} -var t2, i2, s3, e3, o3, n3, l2, h2, r3, u2, d2, c2, v, a2, f, _, m, p, g, $, y, w, x, b, T, A, E, C, V, N, M, R, k, H, I, L, z, Z, j, B, D; -var init_lit_html = __esm({ - "../node_modules/lit-html/lit-html.js"() { - i2 = window; - s3 = i2.trustedTypes; - e3 = s3 ? s3.createPolicy("lit-html", { createHTML: (t17) => t17 }) : void 0; - o3 = "$lit$"; - n3 = `lit$${(Math.random() + "").slice(9)}$`; - l2 = "?" + n3; - h2 = `<${l2}>`; - r3 = document; - u2 = () => r3.createComment(""); - d2 = (t17) => null === t17 || "object" != typeof t17 && "function" != typeof t17; - c2 = Array.isArray; - v = (t17) => c2(t17) || "function" == typeof (null == t17 ? void 0 : t17[Symbol.iterator]); - a2 = "[ \n\f\r]"; - f = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g; - _ = /-->/g; - m = />/g; - p = RegExp(`>|${a2}(?:([^\\s"'>=/]+)(${a2}*=${a2}*(?:[^ -\f\r"'\`<>=]|("|')|))|$)`, "g"); - g = /'/g; - $ = /"/g; - y = /^(?:script|style|textarea|title)$/i; - w = (t17) => (i20, ...s14) => ({ _$litType$: t17, strings: i20, values: s14 }); - x = w(1); - b = w(2); - T = Symbol.for("lit-noChange"); - A = Symbol.for("lit-nothing"); - E = /* @__PURE__ */ new WeakMap(); - C = r3.createTreeWalker(r3, 129, null, false); - V = (t17, i20) => { - const s14 = t17.length - 1, e23 = []; - let l15, r18 = 2 === i20 ? "" : "", u15 = f; - for (let i21 = 0; i21 < s14; i21++) { - const s15 = t17[i21]; - let d15, c21, v3 = -1, a10 = 0; - for (; a10 < s15.length && (u15.lastIndex = a10, c21 = u15.exec(s15), null !== c21); ) a10 = u15.lastIndex, u15 === f ? "!--" === c21[1] ? u15 = _ : void 0 !== c21[1] ? u15 = m : void 0 !== c21[2] ? (y.test(c21[2]) && (l15 = RegExp("" === c21[0] ? (u15 = null != l15 ? l15 : f, v3 = -1) : void 0 === c21[1] ? v3 = -2 : (v3 = u15.lastIndex - c21[2].length, d15 = c21[1], u15 = void 0 === c21[3] ? p : '"' === c21[3] ? $ : g) : u15 === $ || u15 === g ? u15 = p : u15 === _ || u15 === m ? u15 = f : (u15 = p, l15 = void 0); - const w3 = u15 === p && t17[i21 + 1].startsWith("/>") ? " " : ""; - r18 += u15 === f ? s15 + h2 : v3 >= 0 ? (e23.push(d15), s15.slice(0, v3) + o3 + s15.slice(v3) + n3 + w3) : s15 + n3 + (-2 === v3 ? (e23.push(void 0), i21) : w3); - } - return [P(t17, r18 + (t17[s14] || "") + (2 === i20 ? "" : "")), e23]; - }; - N = class _N { - constructor({ strings: t17, _$litType$: i20 }, e23) { - let h12; - this.parts = []; - let r18 = 0, d15 = 0; - const c21 = t17.length - 1, v3 = this.parts, [a10, f8] = V(t17, i20); - if (this.el = _N.createElement(a10, e23), C.currentNode = this.el.content, 2 === i20) { - const t18 = this.el.content, i21 = t18.firstChild; - i21.remove(), t18.append(...i21.childNodes); - } - for (; null !== (h12 = C.nextNode()) && v3.length < c21; ) { - if (1 === h12.nodeType) { - if (h12.hasAttributes()) { - const t18 = []; - for (const i21 of h12.getAttributeNames()) if (i21.endsWith(o3) || i21.startsWith(n3)) { - const s14 = f8[d15++]; - if (t18.push(i21), void 0 !== s14) { - const t19 = h12.getAttribute(s14.toLowerCase() + o3).split(n3), i22 = /([.?@])?(.*)/.exec(s14); - v3.push({ type: 1, index: r18, name: i22[2], strings: t19, ctor: "." === i22[1] ? H : "?" === i22[1] ? L : "@" === i22[1] ? z : k }); - } else v3.push({ type: 6, index: r18 }); - } - for (const i21 of t18) h12.removeAttribute(i21); - } - if (y.test(h12.tagName)) { - const t18 = h12.textContent.split(n3), i21 = t18.length - 1; - if (i21 > 0) { - h12.textContent = s3 ? s3.emptyScript : ""; - for (let s14 = 0; s14 < i21; s14++) h12.append(t18[s14], u2()), C.nextNode(), v3.push({ type: 2, index: ++r18 }); - h12.append(t18[i21], u2()); - } - } - } else if (8 === h12.nodeType) if (h12.data === l2) v3.push({ type: 2, index: r18 }); - else { - let t18 = -1; - for (; -1 !== (t18 = h12.data.indexOf(n3, t18 + 1)); ) v3.push({ type: 7, index: r18 }), t18 += n3.length - 1; - } - r18++; - } - } - static createElement(t17, i20) { - const s14 = r3.createElement("template"); - return s14.innerHTML = t17, s14; - } - }; - M = class { - constructor(t17, i20) { - this._$AV = [], this._$AN = void 0, this._$AD = t17, this._$AM = i20; - } - get parentNode() { - return this._$AM.parentNode; - } - get _$AU() { - return this._$AM._$AU; - } - u(t17) { - var i20; - const { el: { content: s14 }, parts: e23 } = this._$AD, o29 = (null !== (i20 = null == t17 ? void 0 : t17.creationScope) && void 0 !== i20 ? i20 : r3).importNode(s14, true); - C.currentNode = o29; - let n18 = C.nextNode(), l15 = 0, h12 = 0, u15 = e23[0]; - for (; void 0 !== u15; ) { - if (l15 === u15.index) { - let i21; - 2 === u15.type ? i21 = new R(n18, n18.nextSibling, this, t17) : 1 === u15.type ? i21 = new u15.ctor(n18, u15.name, u15.strings, this, t17) : 6 === u15.type && (i21 = new Z(n18, this, t17)), this._$AV.push(i21), u15 = e23[++h12]; - } - l15 !== (null == u15 ? void 0 : u15.index) && (n18 = C.nextNode(), l15++); - } - return C.currentNode = r3, o29; - } - v(t17) { - let i20 = 0; - for (const s14 of this._$AV) void 0 !== s14 && (void 0 !== s14.strings ? (s14._$AI(t17, s14, i20), i20 += s14.strings.length - 2) : s14._$AI(t17[i20])), i20++; - } - }; - R = class _R { - constructor(t17, i20, s14, e23) { - var o29; - this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t17, this._$AB = i20, this._$AM = s14, this.options = e23, this._$Cp = null === (o29 = null == e23 ? void 0 : e23.isConnected) || void 0 === o29 || o29; - } - get _$AU() { - var t17, i20; - return null !== (i20 = null === (t17 = this._$AM) || void 0 === t17 ? void 0 : t17._$AU) && void 0 !== i20 ? i20 : this._$Cp; - } - get parentNode() { - let t17 = this._$AA.parentNode; - const i20 = this._$AM; - return void 0 !== i20 && 11 === (null == t17 ? void 0 : t17.nodeType) && (t17 = i20.parentNode), t17; - } - get startNode() { - return this._$AA; - } - get endNode() { - return this._$AB; - } - _$AI(t17, i20 = this) { - t17 = S2(this, t17, i20), d2(t17) ? t17 === A || null == t17 || "" === t17 ? (this._$AH !== A && this._$AR(), this._$AH = A) : t17 !== this._$AH && t17 !== T && this._(t17) : void 0 !== t17._$litType$ ? this.g(t17) : void 0 !== t17.nodeType ? this.$(t17) : v(t17) ? this.T(t17) : this._(t17); - } - k(t17) { - return this._$AA.parentNode.insertBefore(t17, this._$AB); - } - $(t17) { - this._$AH !== t17 && (this._$AR(), this._$AH = this.k(t17)); - } - _(t17) { - this._$AH !== A && d2(this._$AH) ? this._$AA.nextSibling.data = t17 : this.$(r3.createTextNode(t17)), this._$AH = t17; - } - g(t17) { - var i20; - const { values: s14, _$litType$: e23 } = t17, o29 = "number" == typeof e23 ? this._$AC(t17) : (void 0 === e23.el && (e23.el = N.createElement(P(e23.h, e23.h[0]), this.options)), e23); - if ((null === (i20 = this._$AH) || void 0 === i20 ? void 0 : i20._$AD) === o29) this._$AH.v(s14); - else { - const t18 = new M(o29, this), i21 = t18.u(this.options); - t18.v(s14), this.$(i21), this._$AH = t18; - } - } - _$AC(t17) { - let i20 = E.get(t17.strings); - return void 0 === i20 && E.set(t17.strings, i20 = new N(t17)), i20; - } - T(t17) { - c2(this._$AH) || (this._$AH = [], this._$AR()); - const i20 = this._$AH; - let s14, e23 = 0; - for (const o29 of t17) e23 === i20.length ? i20.push(s14 = new _R(this.k(u2()), this.k(u2()), this, this.options)) : s14 = i20[e23], s14._$AI(o29), e23++; - e23 < i20.length && (this._$AR(s14 && s14._$AB.nextSibling, e23), i20.length = e23); - } - _$AR(t17 = this._$AA.nextSibling, i20) { - var s14; - for (null === (s14 = this._$AP) || void 0 === s14 || s14.call(this, false, true, i20); t17 && t17 !== this._$AB; ) { - const i21 = t17.nextSibling; - t17.remove(), t17 = i21; - } - } - setConnected(t17) { - var i20; - void 0 === this._$AM && (this._$Cp = t17, null === (i20 = this._$AP) || void 0 === i20 || i20.call(this, t17)); - } - }; - k = class { - constructor(t17, i20, s14, e23, o29) { - this.type = 1, this._$AH = A, this._$AN = void 0, this.element = t17, this.name = i20, this._$AM = e23, this.options = o29, s14.length > 2 || "" !== s14[0] || "" !== s14[1] ? (this._$AH = Array(s14.length - 1).fill(new String()), this.strings = s14) : this._$AH = A; - } - get tagName() { - return this.element.tagName; - } - get _$AU() { - return this._$AM._$AU; - } - _$AI(t17, i20 = this, s14, e23) { - const o29 = this.strings; - let n18 = false; - if (void 0 === o29) t17 = S2(this, t17, i20, 0), n18 = !d2(t17) || t17 !== this._$AH && t17 !== T, n18 && (this._$AH = t17); - else { - const e24 = t17; - let l15, h12; - for (t17 = o29[0], l15 = 0; l15 < o29.length - 1; l15++) h12 = S2(this, e24[s14 + l15], i20, l15), h12 === T && (h12 = this._$AH[l15]), n18 || (n18 = !d2(h12) || h12 !== this._$AH[l15]), h12 === A ? t17 = A : t17 !== A && (t17 += (null != h12 ? h12 : "") + o29[l15 + 1]), this._$AH[l15] = h12; - } - n18 && !e23 && this.j(t17); - } - j(t17) { - t17 === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t17 ? t17 : ""); - } - }; - H = class extends k { - constructor() { - super(...arguments), this.type = 3; - } - j(t17) { - this.element[this.name] = t17 === A ? void 0 : t17; - } - }; - I = s3 ? s3.emptyScript : ""; - L = class extends k { - constructor() { - super(...arguments), this.type = 4; - } - j(t17) { - t17 && t17 !== A ? this.element.setAttribute(this.name, I) : this.element.removeAttribute(this.name); - } - }; - z = class extends k { - constructor(t17, i20, s14, e23, o29) { - super(t17, i20, s14, e23, o29), this.type = 5; - } - _$AI(t17, i20 = this) { - var s14; - if ((t17 = null !== (s14 = S2(this, t17, i20, 0)) && void 0 !== s14 ? s14 : A) === T) return; - const e23 = this._$AH, o29 = t17 === A && e23 !== A || t17.capture !== e23.capture || t17.once !== e23.once || t17.passive !== e23.passive, n18 = t17 !== A && (e23 === A || o29); - o29 && this.element.removeEventListener(this.name, this, e23), n18 && this.element.addEventListener(this.name, this, t17), this._$AH = t17; - } - handleEvent(t17) { - var i20, s14; - "function" == typeof this._$AH ? this._$AH.call(null !== (s14 = null === (i20 = this.options) || void 0 === i20 ? void 0 : i20.host) && void 0 !== s14 ? s14 : this.element, t17) : this._$AH.handleEvent(t17); - } - }; - Z = class { - constructor(t17, i20, s14) { - this.element = t17, this.type = 6, this._$AN = void 0, this._$AM = i20, this.options = s14; - } - get _$AU() { - return this._$AM._$AU; - } - _$AI(t17) { - S2(this, t17); - } - }; - j = { O: o3, P: n3, A: l2, C: 1, M: V, L: M, R: v, D: S2, I: R, V: k, H: L, N: z, U: H, F: Z }; - B = i2.litHtmlPolyfillSupport; - null == B || B(N, R), (null !== (t2 = i2.litHtmlVersions) && void 0 !== t2 ? t2 : i2.litHtmlVersions = []).push("2.8.0"); - D = (t17, i20, s14) => { - var e23, o29; - const n18 = null !== (e23 = null == s14 ? void 0 : s14.renderBefore) && void 0 !== e23 ? e23 : i20; - let l15 = n18._$litPart$; - if (void 0 === l15) { - const t18 = null !== (o29 = null == s14 ? void 0 : s14.renderBefore) && void 0 !== o29 ? o29 : null; - n18._$litPart$ = l15 = new R(i20.insertBefore(u2(), t18), t18, void 0, null != s14 ? s14 : {}); - } - return l15._$AI(t17), l15; - }; - } -}); - -// ../node_modules/lit-element/node_modules/@lit/reactive-element/css-tag.js -var t3, e4, s4, n4, o4, r4, i3, S3, c3; -var init_css_tag2 = __esm({ - "../node_modules/lit-element/node_modules/@lit/reactive-element/css-tag.js"() { - t3 = window; - e4 = t3.ShadowRoot && (void 0 === t3.ShadyCSS || t3.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype; - s4 = Symbol(); - n4 = /* @__PURE__ */ new WeakMap(); - o4 = class { - constructor(t17, e23, n18) { - if (this._$cssResult$ = true, n18 !== s4) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); - this.cssText = t17, this.t = e23; - } - get styleSheet() { - let t17 = this.o; - const s14 = this.t; - if (e4 && void 0 === t17) { - const e23 = void 0 !== s14 && 1 === s14.length; - e23 && (t17 = n4.get(s14)), void 0 === t17 && ((this.o = t17 = new CSSStyleSheet()).replaceSync(this.cssText), e23 && n4.set(s14, t17)); - } - return t17; - } - toString() { - return this.cssText; - } - }; - r4 = (t17) => new o4("string" == typeof t17 ? t17 : t17 + "", void 0, s4); - i3 = (t17, ...e23) => { - const n18 = 1 === t17.length ? t17[0] : e23.reduce((e24, s14, n19) => e24 + ((t18) => { - if (true === t18._$cssResult$) return t18.cssText; - if ("number" == typeof t18) return t18; - throw Error("Value passed to 'css' function must be a 'css' function result: " + t18 + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security."); - })(s14) + t17[n19 + 1], t17[0]); - return new o4(n18, t17, s4); - }; - S3 = (s14, n18) => { - e4 ? s14.adoptedStyleSheets = n18.map((t17) => t17 instanceof CSSStyleSheet ? t17 : t17.styleSheet) : n18.forEach((e23) => { - const n19 = document.createElement("style"), o29 = t3.litNonce; - void 0 !== o29 && n19.setAttribute("nonce", o29), n19.textContent = e23.cssText, s14.appendChild(n19); - }); - }; - c3 = e4 ? (t17) => t17 : (t17) => t17 instanceof CSSStyleSheet ? ((t18) => { - let e23 = ""; - for (const s14 of t18.cssRules) e23 += s14.cssText; - return r4(e23); - })(t17) : t17; - } -}); - -// ../node_modules/lit-element/node_modules/@lit/reactive-element/reactive-element.js -var s5, e5, r5, h3, o5, n5, a3, l3, d3, u3; -var init_reactive_element2 = __esm({ - "../node_modules/lit-element/node_modules/@lit/reactive-element/reactive-element.js"() { - init_css_tag2(); - init_css_tag2(); - e5 = window; - r5 = e5.trustedTypes; - h3 = r5 ? r5.emptyScript : ""; - o5 = e5.reactiveElementPolyfillSupport; - n5 = { toAttribute(t17, i20) { - switch (i20) { - case Boolean: - t17 = t17 ? h3 : null; - break; - case Object: - case Array: - t17 = null == t17 ? t17 : JSON.stringify(t17); - } - return t17; - }, fromAttribute(t17, i20) { - let s14 = t17; - switch (i20) { - case Boolean: - s14 = null !== t17; - break; - case Number: - s14 = null === t17 ? null : Number(t17); - break; - case Object: - case Array: - try { - s14 = JSON.parse(t17); - } catch (t18) { - s14 = null; - } - } - return s14; - } }; - a3 = (t17, i20) => i20 !== t17 && (i20 == i20 || t17 == t17); - l3 = { attribute: true, type: String, converter: n5, reflect: false, hasChanged: a3 }; - d3 = "finalized"; - u3 = class extends HTMLElement { - constructor() { - super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = false, this.hasUpdated = false, this._$El = null, this._$Eu(); - } - static addInitializer(t17) { - var i20; - this.finalize(), (null !== (i20 = this.h) && void 0 !== i20 ? i20 : this.h = []).push(t17); - } - static get observedAttributes() { - this.finalize(); - const t17 = []; - return this.elementProperties.forEach((i20, s14) => { - const e23 = this._$Ep(s14, i20); - void 0 !== e23 && (this._$Ev.set(e23, s14), t17.push(e23)); - }), t17; - } - static createProperty(t17, i20 = l3) { - if (i20.state && (i20.attribute = false), this.finalize(), this.elementProperties.set(t17, i20), !i20.noAccessor && !this.prototype.hasOwnProperty(t17)) { - const s14 = "symbol" == typeof t17 ? Symbol() : "__" + t17, e23 = this.getPropertyDescriptor(t17, s14, i20); - void 0 !== e23 && Object.defineProperty(this.prototype, t17, e23); - } - } - static getPropertyDescriptor(t17, i20, s14) { - return { get() { - return this[i20]; - }, set(e23) { - const r18 = this[t17]; - this[i20] = e23, this.requestUpdate(t17, r18, s14); - }, configurable: true, enumerable: true }; - } - static getPropertyOptions(t17) { - return this.elementProperties.get(t17) || l3; - } - static finalize() { - if (this.hasOwnProperty(d3)) return false; - this[d3] = true; - const t17 = Object.getPrototypeOf(this); - if (t17.finalize(), void 0 !== t17.h && (this.h = [...t17.h]), this.elementProperties = new Map(t17.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) { - const t18 = this.properties, i20 = [...Object.getOwnPropertyNames(t18), ...Object.getOwnPropertySymbols(t18)]; - for (const s14 of i20) this.createProperty(s14, t18[s14]); - } - return this.elementStyles = this.finalizeStyles(this.styles), true; - } - static finalizeStyles(i20) { - const s14 = []; - if (Array.isArray(i20)) { - const e23 = new Set(i20.flat(1 / 0).reverse()); - for (const i21 of e23) s14.unshift(c3(i21)); - } else void 0 !== i20 && s14.push(c3(i20)); - return s14; - } - static _$Ep(t17, i20) { - const s14 = i20.attribute; - return false === s14 ? void 0 : "string" == typeof s14 ? s14 : "string" == typeof t17 ? t17.toLowerCase() : void 0; - } - _$Eu() { - var t17; - this._$E_ = new Promise((t18) => this.enableUpdating = t18), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), null === (t17 = this.constructor.h) || void 0 === t17 || t17.forEach((t18) => t18(this)); - } - addController(t17) { - var i20, s14; - (null !== (i20 = this._$ES) && void 0 !== i20 ? i20 : this._$ES = []).push(t17), void 0 !== this.renderRoot && this.isConnected && (null === (s14 = t17.hostConnected) || void 0 === s14 || s14.call(t17)); - } - removeController(t17) { - var i20; - null === (i20 = this._$ES) || void 0 === i20 || i20.splice(this._$ES.indexOf(t17) >>> 0, 1); - } - _$Eg() { - this.constructor.elementProperties.forEach((t17, i20) => { - this.hasOwnProperty(i20) && (this._$Ei.set(i20, this[i20]), delete this[i20]); - }); - } - createRenderRoot() { - var t17; - const s14 = null !== (t17 = this.shadowRoot) && void 0 !== t17 ? t17 : this.attachShadow(this.constructor.shadowRootOptions); - return S3(s14, this.constructor.elementStyles), s14; - } - connectedCallback() { - var t17; - void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(true), null === (t17 = this._$ES) || void 0 === t17 || t17.forEach((t18) => { - var i20; - return null === (i20 = t18.hostConnected) || void 0 === i20 ? void 0 : i20.call(t18); - }); - } - enableUpdating(t17) { - } - disconnectedCallback() { - var t17; - null === (t17 = this._$ES) || void 0 === t17 || t17.forEach((t18) => { - var i20; - return null === (i20 = t18.hostDisconnected) || void 0 === i20 ? void 0 : i20.call(t18); - }); - } - attributeChangedCallback(t17, i20, s14) { - this._$AK(t17, s14); - } - _$EO(t17, i20, s14 = l3) { - var e23; - const r18 = this.constructor._$Ep(t17, s14); - if (void 0 !== r18 && true === s14.reflect) { - const h12 = (void 0 !== (null === (e23 = s14.converter) || void 0 === e23 ? void 0 : e23.toAttribute) ? s14.converter : n5).toAttribute(i20, s14.type); - this._$El = t17, null == h12 ? this.removeAttribute(r18) : this.setAttribute(r18, h12), this._$El = null; - } - } - _$AK(t17, i20) { - var s14; - const e23 = this.constructor, r18 = e23._$Ev.get(t17); - if (void 0 !== r18 && this._$El !== r18) { - const t18 = e23.getPropertyOptions(r18), h12 = "function" == typeof t18.converter ? { fromAttribute: t18.converter } : void 0 !== (null === (s14 = t18.converter) || void 0 === s14 ? void 0 : s14.fromAttribute) ? t18.converter : n5; - this._$El = r18, this[r18] = h12.fromAttribute(i20, t18.type), this._$El = null; - } - } - requestUpdate(t17, i20, s14) { - let e23 = true; - void 0 !== t17 && (((s14 = s14 || this.constructor.getPropertyOptions(t17)).hasChanged || a3)(this[t17], i20) ? (this._$AL.has(t17) || this._$AL.set(t17, i20), true === s14.reflect && this._$El !== t17 && (void 0 === this._$EC && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t17, s14))) : e23 = false), !this.isUpdatePending && e23 && (this._$E_ = this._$Ej()); - } - async _$Ej() { - this.isUpdatePending = true; - try { - await this._$E_; - } catch (t18) { - Promise.reject(t18); - } - const t17 = this.scheduleUpdate(); - return null != t17 && await t17, !this.isUpdatePending; - } - scheduleUpdate() { - return this.performUpdate(); - } - performUpdate() { - var t17; - if (!this.isUpdatePending) return; - this.hasUpdated, this._$Ei && (this._$Ei.forEach((t18, i21) => this[i21] = t18), this._$Ei = void 0); - let i20 = false; - const s14 = this._$AL; - try { - i20 = this.shouldUpdate(s14), i20 ? (this.willUpdate(s14), null === (t17 = this._$ES) || void 0 === t17 || t17.forEach((t18) => { - var i21; - return null === (i21 = t18.hostUpdate) || void 0 === i21 ? void 0 : i21.call(t18); - }), this.update(s14)) : this._$Ek(); - } catch (t18) { - throw i20 = false, this._$Ek(), t18; - } - i20 && this._$AE(s14); - } - willUpdate(t17) { - } - _$AE(t17) { - var i20; - null === (i20 = this._$ES) || void 0 === i20 || i20.forEach((t18) => { - var i21; - return null === (i21 = t18.hostUpdated) || void 0 === i21 ? void 0 : i21.call(t18); - }), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t17)), this.updated(t17); - } - _$Ek() { - this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = false; - } - get updateComplete() { - return this.getUpdateComplete(); - } - getUpdateComplete() { - return this._$E_; - } - shouldUpdate(t17) { - return true; - } - update(t17) { - void 0 !== this._$EC && (this._$EC.forEach((t18, i20) => this._$EO(i20, this[i20], t18)), this._$EC = void 0), this._$Ek(); - } - updated(t17) { - } - firstUpdated(t17) { - } - }; - u3[d3] = true, u3.elementProperties = /* @__PURE__ */ new Map(), u3.elementStyles = [], u3.shadowRootOptions = { mode: "open" }, null == o5 || o5({ ReactiveElement: u3 }), (null !== (s5 = e5.reactiveElementVersions) && void 0 !== s5 ? s5 : e5.reactiveElementVersions = []).push("1.6.3"); - } -}); - -// ../node_modules/lit-element/lit-element.js -var l4, o6, s6, n6; -var init_lit_element = __esm({ - "../node_modules/lit-element/lit-element.js"() { - init_reactive_element2(); - init_reactive_element2(); - init_lit_html(); - init_lit_html(); - s6 = class extends u3 { - constructor() { - super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0; - } - createRenderRoot() { - var t17, e23; - const i20 = super.createRenderRoot(); - return null !== (t17 = (e23 = this.renderOptions).renderBefore) && void 0 !== t17 || (e23.renderBefore = i20.firstChild), i20; - } - update(t17) { - const i20 = this.render(); - this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t17), this._$Do = D(i20, this.renderRoot, this.renderOptions); - } - connectedCallback() { - var t17; - super.connectedCallback(), null === (t17 = this._$Do) || void 0 === t17 || t17.setConnected(true); - } - disconnectedCallback() { - var t17; - super.disconnectedCallback(), null === (t17 = this._$Do) || void 0 === t17 || t17.setConnected(false); - } - render() { - return T; - } - }; - s6.finalized = true, s6._$litElement$ = true, null === (l4 = globalThis.litElementHydrateSupport) || void 0 === l4 || l4.call(globalThis, { LitElement: s6 }); - n6 = globalThis.litElementPolyfillSupport; - null == n6 || n6({ LitElement: s6 }); - (null !== (o6 = globalThis.litElementVersions) && void 0 !== o6 ? o6 : globalThis.litElementVersions = []).push("3.3.3"); - } -}); - -// ../node_modules/lit-html/is-server.js -var init_is_server = __esm({ - "../node_modules/lit-html/is-server.js"() { - } -}); - -// ../node_modules/lit/index.js -var init_lit = __esm({ - "../node_modules/lit/index.js"() { - init_reactive_element(); - init_lit_html(); - init_lit_element(); - init_is_server(); - } -}); - -// ../node_modules/@spectrum-web-components/base/src/version.js -var version; -var init_version = __esm({ - "../node_modules/@spectrum-web-components/base/src/version.js"() { - version = "0.43.0"; - } -}); - -// ../node_modules/@spectrum-web-components/base/src/Base.js -function SpectrumMixin(s14) { - class o29 extends s14 { - get isLTR() { - return this.dir === "ltr"; - } - hasVisibleFocusInTree() { - const n18 = ((r18 = document) => { - var l15; - let t17 = r18.activeElement; - for (; t17 != null && t17.shadowRoot && t17.shadowRoot.activeElement; ) t17 = t17.shadowRoot.activeElement; - const a10 = t17 ? [t17] : []; - for (; t17; ) { - const i20 = t17.assignedSlot || t17.parentElement || ((l15 = t17.getRootNode()) == null ? void 0 : l15.host); - i20 && a10.push(i20), t17 = i20; - } - return a10; - })(this.getRootNode())[0]; - if (!n18) return false; - try { - return n18.matches(":focus-visible") || n18.matches(".focus-visible"); - } catch (r18) { - return n18.matches(".focus-visible"); - } - } - connectedCallback() { - if (!this.hasAttribute("dir")) { - let e23 = this.assignedSlot || this.parentNode; - for (; e23 !== document.documentElement && !p2(e23); ) e23 = e23.assignedSlot || e23.parentNode || e23.host; - if (this.dir = e23.dir === "rtl" ? e23.dir : this.dir || "ltr", e23 === document.documentElement) c4.add(this); - else { - const { localName: n18 } = e23; - n18.search("-") > -1 && !customElements.get(n18) ? customElements.whenDefined(n18).then(() => { - e23.startManagingContentDirection(this); - }) : e23.startManagingContentDirection(this); - } - this._dirParent = e23; - } - super.connectedCallback(); - } - disconnectedCallback() { - super.disconnectedCallback(), this._dirParent && (this._dirParent === document.documentElement ? c4.delete(this) : this._dirParent.stopManagingContentDirection(this), this.removeAttribute("dir")); - } - } - return o29; -} -var c4, g2, w2, p2, SpectrumElement; -var init_Base = __esm({ - "../node_modules/@spectrum-web-components/base/src/Base.js"() { - "use strict"; - init_lit(); - init_version(); - c4 = /* @__PURE__ */ new Set(); - g2 = () => { - const s14 = document.documentElement.dir === "rtl" ? document.documentElement.dir : "ltr"; - c4.forEach((o29) => { - o29.setAttribute("dir", s14); - }); - }; - w2 = new MutationObserver(g2); - w2.observe(document.documentElement, { attributes: true, attributeFilter: ["dir"] }); - p2 = (s14) => typeof s14.startManagingContentDirection != "undefined" || s14.tagName === "SP-THEME"; - SpectrumElement = class extends SpectrumMixin(s6) { - }; - SpectrumElement.VERSION = version; - } -}); - -// ../node_modules/lit/node_modules/@lit/reactive-element/decorators/custom-element.js -var init_custom_element = __esm({ - "../node_modules/lit/node_modules/@lit/reactive-element/decorators/custom-element.js"() { - } -}); - -// ../node_modules/lit/node_modules/@lit/reactive-element/decorators/property.js -function n7(n18) { - return (t17, o29) => void 0 !== o29 ? e6(n18, t17, o29) : i4(n18, t17); -} -var i4, e6; -var init_property = __esm({ - "../node_modules/lit/node_modules/@lit/reactive-element/decorators/property.js"() { - i4 = (i20, e23) => "method" === e23.kind && e23.descriptor && !("value" in e23.descriptor) ? { ...e23, finisher(n18) { - n18.createProperty(e23.key, i20); - } } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: e23.key, initializer() { - "function" == typeof e23.initializer && (this[e23.key] = e23.initializer.call(this)); - }, finisher(n18) { - n18.createProperty(e23.key, i20); - } }; - e6 = (i20, e23, n18) => { - e23.constructor.createProperty(n18, i20); - }; - } -}); - -// ../node_modules/lit/node_modules/@lit/reactive-element/decorators/state.js -function t4(t17) { - return n7({ ...t17, state: true }); -} -var init_state = __esm({ - "../node_modules/lit/node_modules/@lit/reactive-element/decorators/state.js"() { - init_property(); - } -}); - -// ../node_modules/lit/node_modules/@lit/reactive-element/decorators/base.js -var o7; -var init_base = __esm({ - "../node_modules/lit/node_modules/@lit/reactive-element/decorators/base.js"() { - o7 = ({ finisher: e23, descriptor: t17 }) => (o29, n18) => { - var r18; - if (void 0 === n18) { - const n19 = null !== (r18 = o29.originalKey) && void 0 !== r18 ? r18 : o29.key, i20 = null != t17 ? { kind: "method", placement: "prototype", key: n19, descriptor: t17(o29.key) } : { ...o29, key: n19 }; - return null != e23 && (i20.finisher = function(t18) { - e23(t18, n19); - }), i20; - } - { - const r19 = o29.constructor; - void 0 !== t17 && Object.defineProperty(o29, n18, t17(n18)), null == e23 || e23(r19, n18); - } - }; - } -}); - -// ../node_modules/lit/node_modules/@lit/reactive-element/decorators/event-options.js -var init_event_options = __esm({ - "../node_modules/lit/node_modules/@lit/reactive-element/decorators/event-options.js"() { - init_base(); - } -}); - -// ../node_modules/lit/node_modules/@lit/reactive-element/decorators/query.js -function i5(i20, n18) { - return o7({ descriptor: (o29) => { - const t17 = { get() { - var o30, n19; - return null !== (n19 = null === (o30 = this.renderRoot) || void 0 === o30 ? void 0 : o30.querySelector(i20)) && void 0 !== n19 ? n19 : null; - }, enumerable: true, configurable: true }; - if (n18) { - const n19 = "symbol" == typeof o29 ? Symbol() : "__" + o29; - t17.get = function() { - var o30, t18; - return void 0 === this[n19] && (this[n19] = null !== (t18 = null === (o30 = this.renderRoot) || void 0 === o30 ? void 0 : o30.querySelector(i20)) && void 0 !== t18 ? t18 : null), this[n19]; - }; - } - return t17; - } }); -} -var init_query = __esm({ - "../node_modules/lit/node_modules/@lit/reactive-element/decorators/query.js"() { - init_base(); - } -}); - -// ../node_modules/lit/node_modules/@lit/reactive-element/decorators/query-all.js -var init_query_all = __esm({ - "../node_modules/lit/node_modules/@lit/reactive-element/decorators/query-all.js"() { - init_base(); - } -}); - -// ../node_modules/lit/node_modules/@lit/reactive-element/decorators/query-async.js -var init_query_async = __esm({ - "../node_modules/lit/node_modules/@lit/reactive-element/decorators/query-async.js"() { - init_base(); - } -}); - -// ../node_modules/lit/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js -function l5(n18) { - const { slot: l15, selector: t17 } = null != n18 ? n18 : {}; - return o7({ descriptor: (o29) => ({ get() { - var o30; - const r18 = "slot" + (l15 ? `[name=${l15}]` : ":not([name])"), i20 = null === (o30 = this.renderRoot) || void 0 === o30 ? void 0 : o30.querySelector(r18), s14 = null != i20 ? e7(i20, n18) : []; - return t17 ? s14.filter((o31) => o31.matches(t17)) : s14; - }, enumerable: true, configurable: true }) }); -} -var n8, e7; -var init_query_assigned_elements = __esm({ - "../node_modules/lit/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js"() { - init_base(); - e7 = null != (null === (n8 = window.HTMLSlotElement) || void 0 === n8 ? void 0 : n8.prototype.assignedElements) ? (o29, n18) => o29.assignedElements(n18) : (o29, n18) => o29.assignedNodes(n18).filter((o30) => o30.nodeType === Node.ELEMENT_NODE); - } -}); - -// ../node_modules/lit/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js -function o8(o29, n18, r18) { - let l15, s14 = o29; - return "object" == typeof o29 ? (s14 = o29.slot, l15 = o29) : l15 = { flatten: n18 }, r18 ? l5({ slot: s14, flatten: n18, selector: r18 }) : o7({ descriptor: (e23) => ({ get() { - var e24, t17; - const o30 = "slot" + (s14 ? `[name=${s14}]` : ":not([name])"), n19 = null === (e24 = this.renderRoot) || void 0 === e24 ? void 0 : e24.querySelector(o30); - return null !== (t17 = null == n19 ? void 0 : n19.assignedNodes(l15)) && void 0 !== t17 ? t17 : []; - }, enumerable: true, configurable: true }) }); -} -var init_query_assigned_nodes = __esm({ - "../node_modules/lit/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js"() { - init_base(); - init_query_assigned_elements(); - } -}); - -// ../node_modules/lit/decorators.js -var init_decorators = __esm({ - "../node_modules/lit/decorators.js"() { - init_custom_element(); - init_property(); - init_state(); - init_event_options(); - init_query(); - init_query_all(); - init_query_async(); - init_query_assigned_elements(); - init_query_assigned_nodes(); - } -}); - -// ../node_modules/@spectrum-web-components/base/src/sizedMixin.js -function SizedMixin(r18, { validSizes: i20 = ["s", "m", "l", "xl"], noDefaultSize: s14, defaultSize: t17 = "m" } = {}) { - class e23 extends r18 { - constructor() { - super(...arguments); - this._size = t17; - } - get size() { - return this._size || t17; - } - set size(n18) { - const p19 = s14 ? null : t17, z2 = n18 && n18.toLocaleLowerCase(), x4 = i20.includes(z2) ? z2 : p19; - if (x4 && this.setAttribute("size", x4), this._size === x4) return; - const c21 = this._size; - this._size = x4, this.requestUpdate("size", c21); - } - update(n18) { - !this.hasAttribute("size") && !s14 && this.setAttribute("size", this.size), super.update(n18); - } - } - return m2([n7({ type: String })], e23.prototype, "size", 1), e23; -} -var a4, u4, m2; -var init_sizedMixin = __esm({ - "../node_modules/@spectrum-web-components/base/src/sizedMixin.js"() { - "use strict"; - init_decorators(); - a4 = Object.defineProperty; - u4 = Object.getOwnPropertyDescriptor; - m2 = (r18, i20, s14, t17) => { - for (var e23 = t17 > 1 ? void 0 : t17 ? u4(i20, s14) : i20, l15 = r18.length - 1, o29; l15 >= 0; l15--) (o29 = r18[l15]) && (e23 = (t17 ? o29(i20, s14, e23) : o29(e23)) || e23); - return t17 && e23 && a4(i20, s14, e23), e23; - }; - } -}); - -// ../node_modules/@spectrum-web-components/base/src/index.js -var init_src = __esm({ - "../node_modules/@spectrum-web-components/base/src/index.js"() { - "use strict"; - init_Base(); - init_sizedMixin(); - init_lit(); - } -}); - -// ../node_modules/@spectrum-web-components/base/src/decorators.js -var init_decorators2 = __esm({ - "../node_modules/@spectrum-web-components/base/src/decorators.js"() { - "use strict"; - init_decorators(); - } -}); - -// ../node_modules/@spectrum-web-components/popover/src/popover.css.js -var o9, popover_css_default; -var init_popover_css = __esm({ - "../node_modules/@spectrum-web-components/popover/src/popover.css.js"() { - "use strict"; - init_src(); - o9 = i3` - :host{pointer-events:none;visibility:hidden;opacity:0;transition:transform var(--mod-overlay-animation-duration,var(--spectrum-animation-duration-100,.13s))ease-in-out,opacity var(--mod-overlay-animation-duration,var(--spectrum-animation-duration-100,.13s))ease-in-out,visibility 0s linear var(--mod-overlay-animation-duration,var(--spectrum-animation-duration-100,.13s))}:host([open]){pointer-events:auto;visibility:visible;opacity:1;transition-delay:var(--mod-overlay-animation-duration-opened,var(--spectrum-animation-duration-0,0s))}:host{--flow-direction:1;--spectrum-popover-animation-distance:var(--spectrum-spacing-100);--spectrum-popover-background-color:var(--spectrum-background-layer-2-color);--spectrum-popover-border-color:var(--spectrum-gray-400);--spectrum-popover-content-area-spacing-vertical:var(--spectrum-popover-top-to-content-area);--spectrum-popover-shadow-horizontal:var(--spectrum-drop-shadow-x);--spectrum-popover-shadow-vertical:var(--spectrum-drop-shadow-y);--spectrum-popover-shadow-blur:var(--spectrum-drop-shadow-blur);--spectrum-popover-shadow-color:var(--spectrum-drop-shadow-color);--spectrum-popover-corner-radius:var(--spectrum-corner-radius-100);--spectrum-popover-pointer-width:var(--spectrum-popover-tip-width);--spectrum-popover-pointer-height:var(--spectrum-popover-tip-height);--spectrum-popover-pointer-edge-offset:calc(var(--spectrum-corner-radius-100) + var(--spectrum-popover-tip-width)/2);--spectrum-popover-pointer-edge-spacing:calc(var(--spectrum-popover-pointer-edge-offset) - var(--spectrum-popover-tip-width)/2)}:host:dir(rtl),:host([dir=rtl]){--flow-direction:-1}@media (forced-colors:active){:host{--highcontrast-popover-border-color:CanvasText}}:host{--spectrum-popover-filter:drop-shadow(var(--mod-popover-shadow-horizontal,var(--spectrum-popover-shadow-horizontal))var(--mod-popover-shadow-vertical,var(--spectrum-popover-shadow-vertical))var(--mod-popover-shadow-blur,var(--spectrum-popover-shadow-blur))var(--mod-popover-shadow-color,var(--spectrum-popover-shadow-color)));box-sizing:border-box;padding:var(--mod-popover-content-area-spacing-vertical,var(--spectrum-popover-content-area-spacing-vertical))0;border-radius:var(--mod-popover-corner-radius,var(--spectrum-popover-corner-radius));border-style:solid;border-color:var(--highcontrast-popover-border-color,var(--mod-popover-border-color,var(--spectrum-popover-border-color)));border-width:var(--mod-popover-border-width,var(--spectrum-popover-border-width));background-color:var(--mod-popover-background-color,var(--spectrum-popover-background-color));filter:var(--mod-popover-filter,var(--spectrum-popover-filter));outline:none;flex-direction:column;display:inline-flex;position:absolute}:host([tip]) #tip .triangle{stroke-linecap:square;stroke-linejoin:miter;fill:var(--highcontrast-popover-background-color,var(--mod-popover-background-color,var(--spectrum-popover-background-color)));stroke:var(--highcontrast-popover-border-color,var(--mod-popover-border-color,var(--spectrum-popover-border-color)));stroke-width:var(--mod-popover-border-width,var(--spectrum-popover-border-width))}*{--mod-popover-filter:none}:host([tip]) .spectrum-Popover--top-end,:host([tip]) .spectrum-Popover--top-left,:host([tip]) .spectrum-Popover--top-right,:host([tip]) .spectrum-Popover--top-start,:host([placement*=top][tip]){margin-block-end:calc(var(--mod-popover-pointer-height,var(--spectrum-popover-pointer-height)) - var(--mod-popover-border-width,var(--spectrum-popover-border-width)))}:host([open]) .spectrum-Popover--top-end,:host([open]) .spectrum-Popover--top-left,:host([open]) .spectrum-Popover--top-right,:host([open]) .spectrum-Popover--top-start,:host([placement*=top][open]){transform:translateY(calc(var(--mod-popover-animation-distance,var(--spectrum-popover-animation-distance))*-1))}:host([tip]) .spectrum-Popover--bottom-end,:host([tip]) .spectrum-Popover--bottom-left,:host([tip]) .spectrum-Popover--bottom-right,:host([tip]) .spectrum-Popover--bottom-start,:host([placement*=bottom][tip]){margin-block-start:calc(var(--mod-popover-pointer-height,var(--spectrum-popover-pointer-height)) - var(--mod-popover-border-width,var(--spectrum-popover-border-width)))}:host([open]) .spectrum-Popover--bottom-end,:host([open]) .spectrum-Popover--bottom-left,:host([open]) .spectrum-Popover--bottom-right,:host([open]) .spectrum-Popover--bottom-start,:host([placement*=bottom][open]){transform:translateY(var(--mod-popover-animation-distance,var(--spectrum-popover-animation-distance)))}:host([tip]) .spectrum-Popover--right-bottom,:host([tip]) .spectrum-Popover--right-top,:host([placement*=right][tip]){margin-inline-start:calc(var(--mod-popover-pointer-width,var(--spectrum-popover-pointer-width)) - var(--mod-popover-border-width,var(--spectrum-popover-border-width)))}:host([open]) .spectrum-Popover--right-bottom,:host([open]) .spectrum-Popover--right-top,:host([placement*=right][open]){transform:translateX(var(--mod-popover-animation-distance,var(--spectrum-popover-animation-distance)))}:host([tip]) .spectrum-Popover--left-bottom,:host([tip]) .spectrum-Popover--left-top,:host([placement*=left][tip]){margin-inline-end:calc(var(--mod-popover-pointer-width,var(--spectrum-popover-pointer-width)) - var(--mod-popover-border-width,var(--spectrum-popover-border-width)))}:host([open]) .spectrum-Popover--left-bottom,:host([open]) .spectrum-Popover--left-top,:host([placement*=left][open]){transform:translateX(calc(var(--mod-popover-animation-distance,var(--spectrum-popover-animation-distance))*-1))}:host([tip]) .spectrum-Popover--start-bottom,:host([tip]) .spectrum-Popover--start-top,:host([tip]) .spectrum-Popover--start{margin-inline-end:calc(var(--mod-popover-pointer-width,var(--spectrum-popover-pointer-width)) - var(--mod-popover-border-width,var(--spectrum-popover-border-width)))}:host([open]) .spectrum-Popover--start-bottom,:host([open]) .spectrum-Popover--start-top,:host([open]) .spectrum-Popover--start{transform:translateX(calc(var(--mod-popover-animation-distance,var(--spectrum-popover-animation-distance))*-1))}:host([open]) .spectrum-Popover--start-bottom:dir(rtl),:host([open]) .spectrum-Popover--start-top:dir(rtl),:host([open]) .spectrum-Popover--start:dir(rtl),:host([dir=rtl][open]) .spectrum-Popover--start-bottom,:host([dir=rtl][open]) .spectrum-Popover--start-top,:host([dir=rtl][open]) .spectrum-Popover--start{transform:translateX(var(--mod-popover-animation-distance,var(--spectrum-popover-animation-distance)))}:host([tip]) .spectrum-Popover--end-bottom,:host([tip]) .spectrum-Popover--end-top,:host([tip]) .spectrum-Popover--end{margin-inline-start:calc(var(--mod-popover-pointer-width,var(--spectrum-popover-pointer-width)) - var(--mod-popover-border-width,var(--spectrum-popover-border-width)))}:host([open]) .spectrum-Popover--end-bottom,:host([open]) .spectrum-Popover--end-top,:host([open]) .spectrum-Popover--end{transform:translateX(var(--mod-popover-animation-distance,var(--spectrum-popover-animation-distance)))}:host([open]) .spectrum-Popover--end-bottom:dir(rtl),:host([open]) .spectrum-Popover--end-top:dir(rtl),:host([open]) .spectrum-Popover--end:dir(rtl),:host([dir=rtl][open]) .spectrum-Popover--end-bottom,:host([dir=rtl][open]) .spectrum-Popover--end-top,:host([dir=rtl][open]) .spectrum-Popover--end{transform:translateX(calc(var(--mod-popover-animation-distance,var(--spectrum-popover-animation-distance))*-1))}:host([tip]) #tip,:host([tip][placement*=bottom]) #tip,:host([tip]) .spectrum-Popover--bottom-end #tip,:host([tip]) .spectrum-Popover--bottom-left #tip,:host([tip]) .spectrum-Popover--bottom-right #tip,:host([tip]) .spectrum-Popover--bottom-start #tip,:host([tip][placement*=top]) #tip,:host([tip]) .spectrum-Popover--top-end #tip,:host([tip]) .spectrum-Popover--top-left #tip,:host([tip]) .spectrum-Popover--top-right #tip,:host([tip]) .spectrum-Popover--top-start #tip{inline-size:var(--mod-popover-pointer-width,var(--spectrum-popover-pointer-width));block-size:var(--mod-popover-pointer-height,var(--spectrum-popover-pointer-height));margin:auto;position:absolute;inset-block-start:100%;inset-inline:0;transform:translate(0)}:host([tip]) .spectrum-Popover--top-left #tip{inset-inline:var(--mod-popover-pointer-edge-spacing,var(--spectrum-popover-pointer-edge-spacing))auto}:host([tip]) .spectrum-Popover--top-right #tip{inset-inline:auto var(--mod-popover-pointer-edge-spacing,var(--spectrum-popover-pointer-edge-spacing))}:host([tip]) .spectrum-Popover--top-start #tip{margin-inline-start:var(--mod-popover-pointer-edge-spacing,var(--spectrum-popover-pointer-edge-spacing))}:host([tip]) .spectrum-Popover--top-end #tip{margin-inline-end:var(--mod-popover-pointer-edge-spacing,var(--spectrum-popover-pointer-edge-spacing))}:host([tip][placement*=bottom]) #tip,:host([tip]) .spectrum-Popover--bottom-end #tip,:host([tip]) .spectrum-Popover--bottom-left #tip,:host([tip]) .spectrum-Popover--bottom-right #tip,:host([tip]) .spectrum-Popover--bottom-start #tip{inset-block:auto 100%;transform:scaleY(-1)}:host([tip]) .spectrum-Popover--bottom-left #tip{inset-inline:var(--mod-popover-pointer-edge-spacing,var(--spectrum-popover-pointer-edge-spacing))auto}:host([tip]) .spectrum-Popover--bottom-right #tip{inset-inline:auto var(--mod-popover-pointer-edge-spacing,var(--spectrum-popover-pointer-edge-spacing))}:host([tip]) .spectrum-Popover--bottom-start #tip{margin-inline-start:var(--mod-popover-pointer-edge-spacing,var(--spectrum-popover-pointer-edge-spacing))}:host([tip]) .spectrum-Popover--bottom-end #tip{margin-inline-end:var(--mod-popover-pointer-edge-spacing,var(--spectrum-popover-pointer-edge-spacing))}:host([tip]) .spectrum-Popover--end #tip,:host([tip]) .spectrum-Popover--end-bottom #tip,:host([tip]) .spectrum-Popover--end-top #tip,:host([tip][placement*=left]) #tip,:host([tip]) .spectrum-Popover--left-bottom #tip,:host([tip]) .spectrum-Popover--left-top #tip,:host([tip][placement*=right]) #tip,:host([tip]) .spectrum-Popover--right-bottom #tip,:host([tip]) .spectrum-Popover--right-top #tip,:host([tip]) .spectrum-Popover--start #tip,:host([tip]) .spectrum-Popover--start-bottom #tip,:host([tip]) .spectrum-Popover--start-top #tip{inline-size:var(--mod-popover-pointer-height,var(--spectrum-popover-pointer-height));block-size:var(--mod-popover-pointer-width,var(--spectrum-popover-pointer-width));inset-block:0}:host([tip][placement*=left]) .spectrum-Popover--end-bottom #tip,:host([tip]) .spectrum-Popover--end-bottom.spectrum-Popover--left-bottom #tip,:host([tip]) .spectrum-Popover--end-bottom.spectrum-Popover--left-top #tip,:host([tip][placement*=left]) .spectrum-Popover--end-top #tip,:host([tip]) .spectrum-Popover--end-top.spectrum-Popover--left-bottom #tip,:host([tip]) .spectrum-Popover--end-top.spectrum-Popover--left-top #tip,:host([tip][placement*=left]) .spectrum-Popover--end #tip,:host([tip]) .spectrum-Popover--end.spectrum-Popover--left-bottom #tip,:host([tip]) .spectrum-Popover--end.spectrum-Popover--left-top #tip,:host([tip][placement*=left]) .spectrum-Popover--left-bottom #tip,:host([tip]) .spectrum-Popover--left-bottom.spectrum-Popover--left-bottom #tip,:host([tip]) .spectrum-Popover--left-bottom.spectrum-Popover--left-top #tip,:host([tip][placement*=left]) .spectrum-Popover--left-top #tip,:host([tip]) .spectrum-Popover--left-top.spectrum-Popover--left-bottom #tip,:host([tip]) .spectrum-Popover--left-top.spectrum-Popover--left-top #tip,:host([tip][placement*=left][placement*=left]) #tip,:host([tip][placement*=left]) .spectrum-Popover--left-bottom #tip,:host([tip][placement*=left]) .spectrum-Popover--left-top #tip,:host([tip][placement*=left]) .spectrum-Popover--right-bottom #tip,:host([tip]) .spectrum-Popover--right-bottom.spectrum-Popover--left-bottom #tip,:host([tip]) .spectrum-Popover--right-bottom.spectrum-Popover--left-top #tip,:host([tip][placement*=left]) .spectrum-Popover--right-top #tip,:host([tip]) .spectrum-Popover--right-top.spectrum-Popover--left-bottom #tip,:host([tip]) .spectrum-Popover--right-top.spectrum-Popover--left-top #tip,:host([tip][placement*=right][placement*=left]) #tip,:host([tip][placement*=right]) .spectrum-Popover--left-bottom #tip,:host([tip][placement*=right]) .spectrum-Popover--left-top #tip,:host([tip][placement*=left]) .spectrum-Popover--start-bottom #tip,:host([tip]) .spectrum-Popover--start-bottom.spectrum-Popover--left-bottom #tip,:host([tip]) .spectrum-Popover--start-bottom.spectrum-Popover--left-top #tip,:host([tip][placement*=left]) .spectrum-Popover--start-top #tip,:host([tip]) .spectrum-Popover--start-top.spectrum-Popover--left-bottom #tip,:host([tip]) .spectrum-Popover--start-top.spectrum-Popover--left-top #tip,:host([tip][placement*=left]) .spectrum-Popover--start #tip,:host([tip]) .spectrum-Popover--start.spectrum-Popover--left-bottom #tip,:host([tip]) .spectrum-Popover--start.spectrum-Popover--left-top #tip{inset-inline:100% auto}:host([tip][placement*=right]) .spectrum-Popover--end-bottom #tip,:host([tip]) .spectrum-Popover--end-bottom.spectrum-Popover--right-bottom #tip,:host([tip]) .spectrum-Popover--end-bottom.spectrum-Popover--right-top #tip,:host([tip][placement*=right]) .spectrum-Popover--end-top #tip,:host([tip]) .spectrum-Popover--end-top.spectrum-Popover--right-bottom #tip,:host([tip]) .spectrum-Popover--end-top.spectrum-Popover--right-top #tip,:host([tip][placement*=right]) .spectrum-Popover--end #tip,:host([tip]) .spectrum-Popover--end.spectrum-Popover--right-bottom #tip,:host([tip]) .spectrum-Popover--end.spectrum-Popover--right-top #tip,:host([tip][placement*=right]) .spectrum-Popover--left-bottom #tip,:host([tip]) .spectrum-Popover--left-bottom.spectrum-Popover--right-bottom #tip,:host([tip]) .spectrum-Popover--left-bottom.spectrum-Popover--right-top #tip,:host([tip][placement*=right]) .spectrum-Popover--left-top #tip,:host([tip]) .spectrum-Popover--left-top.spectrum-Popover--right-bottom #tip,:host([tip]) .spectrum-Popover--left-top.spectrum-Popover--right-top #tip,:host([tip][placement*=left][placement*=right]) #tip,:host([tip][placement*=left]) .spectrum-Popover--right-bottom #tip,:host([tip][placement*=left]) .spectrum-Popover--right-top #tip,:host([tip][placement*=right]) .spectrum-Popover--right-bottom #tip,:host([tip]) .spectrum-Popover--right-bottom.spectrum-Popover--right-bottom #tip,:host([tip]) .spectrum-Popover--right-bottom.spectrum-Popover--right-top #tip,:host([tip][placement*=right]) .spectrum-Popover--right-top #tip,:host([tip]) .spectrum-Popover--right-top.spectrum-Popover--right-bottom #tip,:host([tip]) .spectrum-Popover--right-top.spectrum-Popover--right-top #tip,:host([tip][placement*=right][placement*=right]) #tip,:host([tip][placement*=right]) .spectrum-Popover--right-bottom #tip,:host([tip][placement*=right]) .spectrum-Popover--right-top #tip,:host([tip][placement*=right]) .spectrum-Popover--start-bottom #tip,:host([tip]) .spectrum-Popover--start-bottom.spectrum-Popover--right-bottom #tip,:host([tip]) .spectrum-Popover--start-bottom.spectrum-Popover--right-top #tip,:host([tip][placement*=right]) .spectrum-Popover--start-top #tip,:host([tip]) .spectrum-Popover--start-top.spectrum-Popover--right-bottom #tip,:host([tip]) .spectrum-Popover--start-top.spectrum-Popover--right-top #tip,:host([tip][placement*=right]) .spectrum-Popover--start #tip,:host([tip]) .spectrum-Popover--start.spectrum-Popover--right-bottom #tip,:host([tip]) .spectrum-Popover--start.spectrum-Popover--right-top #tip{inset-inline:auto 100%;transform:scaleX(-1)}:host([tip]) .spectrum-Popover--end-bottom.spectrum-Popover--end-top #tip,:host([tip]) .spectrum-Popover--end-bottom.spectrum-Popover--left-top #tip,:host([tip]) .spectrum-Popover--end-bottom.spectrum-Popover--right-top #tip,:host([tip]) .spectrum-Popover--end-bottom.spectrum-Popover--start-top #tip,:host([tip]) .spectrum-Popover--end-top.spectrum-Popover--end-top #tip,:host([tip]) .spectrum-Popover--end-top.spectrum-Popover--left-top #tip,:host([tip]) .spectrum-Popover--end-top.spectrum-Popover--right-top #tip,:host([tip]) .spectrum-Popover--end-top.spectrum-Popover--start-top #tip,:host([tip]) .spectrum-Popover--end.spectrum-Popover--end-top #tip,:host([tip]) .spectrum-Popover--end.spectrum-Popover--left-top #tip,:host([tip]) .spectrum-Popover--end.spectrum-Popover--right-top #tip,:host([tip]) .spectrum-Popover--end.spectrum-Popover--start-top #tip,:host([tip]) .spectrum-Popover--left-bottom.spectrum-Popover--end-top #tip,:host([tip]) .spectrum-Popover--left-bottom.spectrum-Popover--left-top #tip,:host([tip]) .spectrum-Popover--left-bottom.spectrum-Popover--right-top #tip,:host([tip]) .spectrum-Popover--left-bottom.spectrum-Popover--start-top #tip,:host([tip]) .spectrum-Popover--left-top.spectrum-Popover--end-top #tip,:host([tip]) .spectrum-Popover--left-top.spectrum-Popover--left-top #tip,:host([tip]) .spectrum-Popover--left-top.spectrum-Popover--right-top #tip,:host([tip]) .spectrum-Popover--left-top.spectrum-Popover--start-top #tip,:host([tip][placement*=left]) .spectrum-Popover--end-top #tip,:host([tip][placement*=left]) .spectrum-Popover--left-top #tip,:host([tip][placement*=left]) .spectrum-Popover--right-top #tip,:host([tip][placement*=left]) .spectrum-Popover--start-top #tip,:host([tip]) .spectrum-Popover--right-bottom.spectrum-Popover--end-top #tip,:host([tip]) .spectrum-Popover--right-bottom.spectrum-Popover--left-top #tip,:host([tip]) .spectrum-Popover--right-bottom.spectrum-Popover--right-top #tip,:host([tip]) .spectrum-Popover--right-bottom.spectrum-Popover--start-top #tip,:host([tip]) .spectrum-Popover--right-top.spectrum-Popover--end-top #tip,:host([tip]) .spectrum-Popover--right-top.spectrum-Popover--left-top #tip,:host([tip]) .spectrum-Popover--right-top.spectrum-Popover--right-top #tip,:host([tip]) .spectrum-Popover--right-top.spectrum-Popover--start-top #tip,:host([tip][placement*=right]) .spectrum-Popover--end-top #tip,:host([tip][placement*=right]) .spectrum-Popover--left-top #tip,:host([tip][placement*=right]) .spectrum-Popover--right-top #tip,:host([tip][placement*=right]) .spectrum-Popover--start-top #tip,:host([tip]) .spectrum-Popover--start-bottom.spectrum-Popover--end-top #tip,:host([tip]) .spectrum-Popover--start-bottom.spectrum-Popover--left-top #tip,:host([tip]) .spectrum-Popover--start-bottom.spectrum-Popover--right-top #tip,:host([tip]) .spectrum-Popover--start-bottom.spectrum-Popover--start-top #tip,:host([tip]) .spectrum-Popover--start-top.spectrum-Popover--end-top #tip,:host([tip]) .spectrum-Popover--start-top.spectrum-Popover--left-top #tip,:host([tip]) .spectrum-Popover--start-top.spectrum-Popover--right-top #tip,:host([tip]) .spectrum-Popover--start-top.spectrum-Popover--start-top #tip,:host([tip]) .spectrum-Popover--start.spectrum-Popover--end-top #tip,:host([tip]) .spectrum-Popover--start.spectrum-Popover--left-top #tip,:host([tip]) .spectrum-Popover--start.spectrum-Popover--right-top #tip,:host([tip]) .spectrum-Popover--start.spectrum-Popover--start-top #tip{inset-block:var(--mod-popover-pointer-edge-spacing,var(--spectrum-popover-pointer-edge-spacing))auto}:host([tip]) .spectrum-Popover--end-bottom.spectrum-Popover--end-bottom #tip,:host([tip]) .spectrum-Popover--end-bottom.spectrum-Popover--left-bottom #tip,:host([tip]) .spectrum-Popover--end-bottom.spectrum-Popover--right-bottom #tip,:host([tip]) .spectrum-Popover--end-bottom.spectrum-Popover--start-bottom #tip,:host([tip]) .spectrum-Popover--end-top.spectrum-Popover--end-bottom #tip,:host([tip]) .spectrum-Popover--end-top.spectrum-Popover--left-bottom #tip,:host([tip]) .spectrum-Popover--end-top.spectrum-Popover--right-bottom #tip,:host([tip]) .spectrum-Popover--end-top.spectrum-Popover--start-bottom #tip,:host([tip]) .spectrum-Popover--end.spectrum-Popover--end-bottom #tip,:host([tip]) .spectrum-Popover--end.spectrum-Popover--left-bottom #tip,:host([tip]) .spectrum-Popover--end.spectrum-Popover--right-bottom #tip,:host([tip]) .spectrum-Popover--end.spectrum-Popover--start-bottom #tip,:host([tip]) .spectrum-Popover--left-bottom.spectrum-Popover--end-bottom #tip,:host([tip]) .spectrum-Popover--left-bottom.spectrum-Popover--left-bottom #tip,:host([tip]) .spectrum-Popover--left-bottom.spectrum-Popover--right-bottom #tip,:host([tip]) .spectrum-Popover--left-bottom.spectrum-Popover--start-bottom #tip,:host([tip]) .spectrum-Popover--left-top.spectrum-Popover--end-bottom #tip,:host([tip]) .spectrum-Popover--left-top.spectrum-Popover--left-bottom #tip,:host([tip]) .spectrum-Popover--left-top.spectrum-Popover--right-bottom #tip,:host([tip]) .spectrum-Popover--left-top.spectrum-Popover--start-bottom #tip,:host([tip][placement*=left]) .spectrum-Popover--end-bottom #tip,:host([tip][placement*=left]) .spectrum-Popover--left-bottom #tip,:host([tip][placement*=left]) .spectrum-Popover--right-bottom #tip,:host([tip][placement*=left]) .spectrum-Popover--start-bottom #tip,:host([tip]) .spectrum-Popover--right-bottom.spectrum-Popover--end-bottom #tip,:host([tip]) .spectrum-Popover--right-bottom.spectrum-Popover--left-bottom #tip,:host([tip]) .spectrum-Popover--right-bottom.spectrum-Popover--right-bottom #tip,:host([tip]) .spectrum-Popover--right-bottom.spectrum-Popover--start-bottom #tip,:host([tip]) .spectrum-Popover--right-top.spectrum-Popover--end-bottom #tip,:host([tip]) .spectrum-Popover--right-top.spectrum-Popover--left-bottom #tip,:host([tip]) .spectrum-Popover--right-top.spectrum-Popover--right-bottom #tip,:host([tip]) .spectrum-Popover--right-top.spectrum-Popover--start-bottom #tip,:host([tip][placement*=right]) .spectrum-Popover--end-bottom #tip,:host([tip][placement*=right]) .spectrum-Popover--left-bottom #tip,:host([tip][placement*=right]) .spectrum-Popover--right-bottom #tip,:host([tip][placement*=right]) .spectrum-Popover--start-bottom #tip,:host([tip]) .spectrum-Popover--start-bottom.spectrum-Popover--end-bottom #tip,:host([tip]) .spectrum-Popover--start-bottom.spectrum-Popover--left-bottom #tip,:host([tip]) .spectrum-Popover--start-bottom.spectrum-Popover--right-bottom #tip,:host([tip]) .spectrum-Popover--start-bottom.spectrum-Popover--start-bottom #tip,:host([tip]) .spectrum-Popover--start-top.spectrum-Popover--end-bottom #tip,:host([tip]) .spectrum-Popover--start-top.spectrum-Popover--left-bottom #tip,:host([tip]) .spectrum-Popover--start-top.spectrum-Popover--right-bottom #tip,:host([tip]) .spectrum-Popover--start-top.spectrum-Popover--start-bottom #tip,:host([tip]) .spectrum-Popover--start.spectrum-Popover--end-bottom #tip,:host([tip]) .spectrum-Popover--start.spectrum-Popover--left-bottom #tip,:host([tip]) .spectrum-Popover--start.spectrum-Popover--right-bottom #tip,:host([tip]) .spectrum-Popover--start.spectrum-Popover--start-bottom #tip{inset-block:auto var(--mod-popover-pointer-edge-spacing,var(--spectrum-popover-pointer-edge-spacing))}:host([tip]) .spectrum-Popover--start #tip,:host([tip]) .spectrum-Popover--start-bottom #tip,:host([tip]) .spectrum-Popover--start-top #tip{margin-inline-start:100%}:host([tip]) .spectrum-Popover--start #tip:dir(rtl),:host([tip]) .spectrum-Popover--start-bottom #tip:dir(rtl),:host([tip]) .spectrum-Popover--start-top #tip:dir(rtl),:host([dir=rtl][tip]) .spectrum-Popover--start #tip,:host([dir=rtl][tip]) .spectrum-Popover--start-bottom #tip,:host([dir=rtl][tip]) .spectrum-Popover--start-top #tip{transform:scaleX(-1)}:host([tip]) .spectrum-Popover--end #tip,:host([tip]) .spectrum-Popover--end-bottom #tip,:host([tip]) .spectrum-Popover--end-top #tip{margin-inline-end:100%;transform:scaleX(-1)}:host([tip]) .spectrum-Popover--end #tip:dir(rtl),:host([tip]) .spectrum-Popover--end-bottom #tip:dir(rtl),:host([tip]) .spectrum-Popover--end-top #tip:dir(rtl),:host([dir=rtl][tip]) .spectrum-Popover--end #tip,:host([dir=rtl][tip]) .spectrum-Popover--end-bottom #tip,:host([dir=rtl][tip]) .spectrum-Popover--end-top #tip{transform:scaleX(1)}:host{--spectrum-popover-border-width:var(--system-spectrum-popover-border-width)}:host{clip-path:none;min-width:min-content;max-width:100%;max-height:100%}::slotted(*){overscroll-behavior:contain}:host([placement*=left]) #tip[style],:host([placement*=right]) #tip[style]{inset-block-end:auto}:host([placement*=top]) #tip[style],:host([placement*=bottom]) #tip[style]{inset-inline-end:auto}.block,.inline{width:100%;height:100%;display:block}:host([placement*=left]) .block,:host([placement*=right]) .block,:host([placement*=top]) .inline,:host([placement*=bottom]) .inline{display:none}::slotted(.visually-hidden){clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:0 -1px -1px 0;padding:0;position:absolute;overflow:hidden}::slotted(sp-menu){margin:0}:host([dialog]){min-width:var(--mod-popover-dialog-min-width,var(--spectrum-popover-dialog-min-width,270px));padding:var(--mod-popover-dialog-padding,var(--spectrum-popover-dialog-padding,30px 29px))}:host([tip][placement]) #tip{height:auto} -`; - popover_css_default = o9; - } -}); - -// ../node_modules/@spectrum-web-components/popover/src/Popover.js -var c5, d4, t5, Popover; -var init_Popover = __esm({ - "../node_modules/@spectrum-web-components/popover/src/Popover.js"() { - "use strict"; - init_src(); - init_decorators2(); - init_popover_css(); - c5 = Object.defineProperty; - d4 = Object.getOwnPropertyDescriptor; - t5 = (o29, r18, l15, p19) => { - for (var e23 = p19 > 1 ? void 0 : p19 ? d4(r18, l15) : r18, i20 = o29.length - 1, a10; i20 >= 0; i20--) (a10 = o29[i20]) && (e23 = (p19 ? a10(r18, l15, e23) : a10(e23)) || e23); - return p19 && e23 && c5(r18, l15, e23), e23; - }; - Popover = class extends SpectrumElement { - constructor() { - super(...arguments); - this.dialog = false; - this.open = false; - this.tip = false; - } - static get styles() { - return [popover_css_default]; - } - renderTip() { - return x` - - `; - } - update(l15) { - super.update(l15); - } - render() { - return x` - - ${this.tip ? this.renderTip() : A} - `; - } - }; - t5([n7({ type: Boolean, reflect: true })], Popover.prototype, "dialog", 2), t5([n7({ type: Boolean, reflect: true })], Popover.prototype, "open", 2), t5([n7({ reflect: true })], Popover.prototype, "placement", 2), t5([n7({ type: Boolean, reflect: true })], Popover.prototype, "tip", 2), t5([i5("#tip")], Popover.prototype, "tipElement", 2); - } -}); - -// ../node_modules/@spectrum-web-components/base/src/define-element.js -function defineElement(e23, n18) { - window.__swc, customElements.define(e23, n18); -} -var init_define_element = __esm({ - "../node_modules/@spectrum-web-components/base/src/define-element.js"() { - "use strict"; - } -}); - -// ../node_modules/@spectrum-web-components/popover/sp-popover.js -var sp_popover_exports = {}; -var init_sp_popover = __esm({ - "../node_modules/@spectrum-web-components/popover/sp-popover.js"() { - "use strict"; - init_Popover(); - init_define_element(); - defineElement("sp-popover", Popover); - } -}); - -// ../node_modules/@lit-labs/observers/mutation-controller.js -var t6; -var init_mutation_controller = __esm({ - "../node_modules/@lit-labs/observers/mutation-controller.js"() { - t6 = class { - constructor(t17, { target: s14, config: i20, callback: h12, skipInitial: o29 }) { - this.t = /* @__PURE__ */ new Set(), this.o = false, this.i = false, this.h = t17, null !== s14 && this.t.add(s14 ?? t17), this.l = i20, this.o = o29 ?? this.o, this.callback = h12, window.MutationObserver ? (this.u = new MutationObserver((t18) => { - this.handleChanges(t18), this.h.requestUpdate(); - }), t17.addController(this)) : console.warn("MutationController error: browser does not support MutationObserver."); - } - handleChanges(t17) { - this.value = this.callback?.(t17, this.u); - } - hostConnected() { - for (const t17 of this.t) this.observe(t17); - } - hostDisconnected() { - this.disconnect(); - } - async hostUpdated() { - const t17 = this.u.takeRecords(); - (t17.length || !this.o && this.i) && this.handleChanges(t17), this.i = false; - } - observe(t17) { - this.t.add(t17), this.u.observe(t17, this.l), this.i = true, this.h.requestUpdate(); - } - disconnect() { - this.u.disconnect(); - } - }; - } -}); - -// ../node_modules/lit-html/directives/if-defined.js -var l6; -var init_if_defined = __esm({ - "../node_modules/lit-html/directives/if-defined.js"() { - init_lit_html(); - l6 = (l15) => null != l15 ? l15 : A; - } -}); - -// ../node_modules/lit/directives/if-defined.js -var init_if_defined2 = __esm({ - "../node_modules/lit/directives/if-defined.js"() { - init_if_defined(); - } -}); - -// ../node_modules/lit-html/directive.js -var t7, e8, i6; -var init_directive = __esm({ - "../node_modules/lit-html/directive.js"() { - t7 = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }; - e8 = (t17) => (...e23) => ({ _$litDirective$: t17, values: e23 }); - i6 = class { - constructor(t17) { - } - get _$AU() { - return this._$AM._$AU; - } - _$AT(t17, e23, i20) { - this._$Ct = t17, this._$AM = e23, this._$Ci = i20; - } - _$AS(t17, e23) { - return this.update(t17, e23); - } - update(t17, e23) { - return this.render(...e23); - } - }; - } -}); - -// ../node_modules/lit-html/directive-helpers.js -var l7, i7, e9, r8, c6, f2, s7, a5, m3, p4; -var init_directive_helpers = __esm({ - "../node_modules/lit-html/directive-helpers.js"() { - init_lit_html(); - ({ I: l7 } = j); - i7 = (o29) => null === o29 || "object" != typeof o29 && "function" != typeof o29; - e9 = (o29) => void 0 === o29.strings; - r8 = () => document.createComment(""); - c6 = (o29, i20, n18) => { - var t17; - const v3 = o29._$AA.parentNode, d15 = void 0 === i20 ? o29._$AB : i20._$AA; - if (void 0 === n18) { - const i21 = v3.insertBefore(r8(), d15), t18 = v3.insertBefore(r8(), d15); - n18 = new l7(i21, t18, o29, o29.options); - } else { - const l15 = n18._$AB.nextSibling, i21 = n18._$AM, u15 = i21 !== o29; - if (u15) { - let l16; - null === (t17 = n18._$AQ) || void 0 === t17 || t17.call(n18, o29), n18._$AM = o29, void 0 !== n18._$AP && (l16 = o29._$AU) !== i21._$AU && n18._$AP(l16); - } - if (l15 !== d15 || u15) { - let o30 = n18._$AA; - for (; o30 !== l15; ) { - const l16 = o30.nextSibling; - v3.insertBefore(o30, d15), o30 = l16; - } - } - } - return n18; - }; - f2 = (o29, l15, i20 = o29) => (o29._$AI(l15, i20), o29); - s7 = {}; - a5 = (o29, l15 = s7) => o29._$AH = l15; - m3 = (o29) => o29._$AH; - p4 = (o29) => { - var l15; - null === (l15 = o29._$AP) || void 0 === l15 || l15.call(o29, false, true); - let i20 = o29._$AA; - const n18 = o29._$AB.nextSibling; - for (; i20 !== n18; ) { - const o30 = i20.nextSibling; - i20.remove(), i20 = o30; - } - }; - } -}); - -// ../node_modules/lit-html/directives/repeat.js -var u5, c7; -var init_repeat = __esm({ - "../node_modules/lit-html/directives/repeat.js"() { - init_lit_html(); - init_directive(); - init_directive_helpers(); - u5 = (e23, s14, t17) => { - const r18 = /* @__PURE__ */ new Map(); - for (let l15 = s14; l15 <= t17; l15++) r18.set(e23[l15], l15); - return r18; - }; - c7 = e8(class extends i6 { - constructor(e23) { - if (super(e23), e23.type !== t7.CHILD) throw Error("repeat() can only be used in text expressions"); - } - ct(e23, s14, t17) { - let r18; - void 0 === t17 ? t17 = s14 : void 0 !== s14 && (r18 = s14); - const l15 = [], o29 = []; - let i20 = 0; - for (const s15 of e23) l15[i20] = r18 ? r18(s15, i20) : i20, o29[i20] = t17(s15, i20), i20++; - return { values: o29, keys: l15 }; - } - render(e23, s14, t17) { - return this.ct(e23, s14, t17).values; - } - update(s14, [t17, r18, c21]) { - var d15; - const a10 = m3(s14), { values: p19, keys: v3 } = this.ct(t17, r18, c21); - if (!Array.isArray(a10)) return this.ut = v3, p19; - const h12 = null !== (d15 = this.ut) && void 0 !== d15 ? d15 : this.ut = [], m10 = []; - let y3, x4, j2 = 0, k2 = a10.length - 1, w3 = 0, A2 = p19.length - 1; - for (; j2 <= k2 && w3 <= A2; ) if (null === a10[j2]) j2++; - else if (null === a10[k2]) k2--; - else if (h12[j2] === v3[w3]) m10[w3] = f2(a10[j2], p19[w3]), j2++, w3++; - else if (h12[k2] === v3[A2]) m10[A2] = f2(a10[k2], p19[A2]), k2--, A2--; - else if (h12[j2] === v3[A2]) m10[A2] = f2(a10[j2], p19[A2]), c6(s14, m10[A2 + 1], a10[j2]), j2++, A2--; - else if (h12[k2] === v3[w3]) m10[w3] = f2(a10[k2], p19[w3]), c6(s14, a10[j2], a10[k2]), k2--, w3++; - else if (void 0 === y3 && (y3 = u5(v3, w3, A2), x4 = u5(h12, j2, k2)), y3.has(h12[j2])) if (y3.has(h12[k2])) { - const e23 = x4.get(v3[w3]), t18 = void 0 !== e23 ? a10[e23] : null; - if (null === t18) { - const e24 = c6(s14, a10[j2]); - f2(e24, p19[w3]), m10[w3] = e24; - } else m10[w3] = f2(t18, p19[w3]), c6(s14, a10[j2], t18), a10[e23] = null; - w3++; - } else p4(a10[k2]), k2--; - else p4(a10[j2]), j2++; - for (; w3 <= A2; ) { - const e23 = c6(s14, m10[A2 + 1]); - f2(e23, p19[w3]), m10[w3++] = e23; - } - for (; j2 <= k2; ) { - const e23 = a10[j2++]; - null !== e23 && p4(e23); - } - return this.ut = v3, a5(s14, m10), T; - } - }); - } -}); - -// ../node_modules/lit/directives/repeat.js -var init_repeat2 = __esm({ - "../node_modules/lit/directives/repeat.js"() { - init_repeat(); - } -}); - -// ../node_modules/lit-html/directives/class-map.js -var o11; -var init_class_map = __esm({ - "../node_modules/lit-html/directives/class-map.js"() { - init_lit_html(); - init_directive(); - o11 = e8(class extends i6 { - constructor(t17) { - var i20; - if (super(t17), t17.type !== t7.ATTRIBUTE || "class" !== t17.name || (null === (i20 = t17.strings) || void 0 === i20 ? void 0 : i20.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute."); - } - render(t17) { - return " " + Object.keys(t17).filter((i20) => t17[i20]).join(" ") + " "; - } - update(i20, [s14]) { - var r18, o29; - if (void 0 === this.it) { - this.it = /* @__PURE__ */ new Set(), void 0 !== i20.strings && (this.nt = new Set(i20.strings.join(" ").split(/\s/).filter((t17) => "" !== t17))); - for (const t17 in s14) s14[t17] && !(null === (r18 = this.nt) || void 0 === r18 ? void 0 : r18.has(t17)) && this.it.add(t17); - return this.render(s14); - } - const e23 = i20.element.classList; - this.it.forEach((t17) => { - t17 in s14 || (e23.remove(t17), this.it.delete(t17)); - }); - for (const t17 in s14) { - const i21 = !!s14[t17]; - i21 === this.it.has(t17) || (null === (o29 = this.nt) || void 0 === o29 ? void 0 : o29.has(t17)) || (i21 ? (e23.add(t17), this.it.add(t17)) : (e23.remove(t17), this.it.delete(t17))); - } - return T; - } - }); - } -}); - -// ../node_modules/lit/directives/class-map.js -var init_class_map2 = __esm({ - "../node_modules/lit/directives/class-map.js"() { - init_class_map(); - } -}); - -// ../node_modules/lit-html/directives/style-map.js -var i8, n9, o12; -var init_style_map = __esm({ - "../node_modules/lit-html/directives/style-map.js"() { - init_lit_html(); - init_directive(); - i8 = "important"; - n9 = " !" + i8; - o12 = e8(class extends i6 { - constructor(t17) { - var e23; - if (super(t17), t17.type !== t7.ATTRIBUTE || "style" !== t17.name || (null === (e23 = t17.strings) || void 0 === e23 ? void 0 : e23.length) > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute."); - } - render(t17) { - return Object.keys(t17).reduce((e23, r18) => { - const s14 = t17[r18]; - return null == s14 ? e23 : e23 + `${r18 = r18.includes("-") ? r18 : r18.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, "-$&").toLowerCase()}:${s14};`; - }, ""); - } - update(e23, [r18]) { - const { style: s14 } = e23.element; - if (void 0 === this.ht) { - this.ht = /* @__PURE__ */ new Set(); - for (const t17 in r18) this.ht.add(t17); - return this.render(r18); - } - this.ht.forEach((t17) => { - null == r18[t17] && (this.ht.delete(t17), t17.includes("-") ? s14.removeProperty(t17) : s14[t17] = ""); - }); - for (const t17 in r18) { - const e24 = r18[t17]; - if (null != e24) { - this.ht.add(t17); - const r19 = "string" == typeof e24 && e24.endsWith(n9); - t17.includes("-") || r19 ? s14.setProperty(t17, r19 ? e24.slice(0, -11) : e24, r19 ? i8 : "") : s14[t17] = e24; - } - } - return T; - } - }); - } -}); - -// ../node_modules/lit/directives/style-map.js -var init_style_map2 = __esm({ - "../node_modules/lit/directives/style-map.js"() { - init_style_map(); - } -}); - -// ../node_modules/lit-html/async-directive.js -function n10(i20) { - void 0 !== this._$AN ? (o13(this), this._$AM = i20, r9(this)) : this._$AM = i20; -} -function h5(i20, t17 = false, e23 = 0) { - const r18 = this._$AH, n18 = this._$AN; - if (void 0 !== n18 && 0 !== n18.size) if (t17) if (Array.isArray(r18)) for (let i21 = e23; i21 < r18.length; i21++) s8(r18[i21], false), o13(r18[i21]); - else null != r18 && (s8(r18, false), o13(r18)); - else s8(this, i20); -} -var s8, o13, r9, l8, c8; -var init_async_directive = __esm({ - "../node_modules/lit-html/async-directive.js"() { - init_directive_helpers(); - init_directive(); - init_directive(); - s8 = (i20, t17) => { - var e23, o29; - const r18 = i20._$AN; - if (void 0 === r18) return false; - for (const i21 of r18) null === (o29 = (e23 = i21)._$AO) || void 0 === o29 || o29.call(e23, t17, false), s8(i21, t17); - return true; - }; - o13 = (i20) => { - let t17, e23; - do { - if (void 0 === (t17 = i20._$AM)) break; - e23 = t17._$AN, e23.delete(i20), i20 = t17; - } while (0 === (null == e23 ? void 0 : e23.size)); - }; - r9 = (i20) => { - for (let t17; t17 = i20._$AM; i20 = t17) { - let e23 = t17._$AN; - if (void 0 === e23) t17._$AN = e23 = /* @__PURE__ */ new Set(); - else if (e23.has(i20)) break; - e23.add(i20), l8(t17); - } - }; - l8 = (i20) => { - var t17, s14, o29, r18; - i20.type == t7.CHILD && (null !== (t17 = (o29 = i20)._$AP) && void 0 !== t17 || (o29._$AP = h5), null !== (s14 = (r18 = i20)._$AQ) && void 0 !== s14 || (r18._$AQ = n10)); - }; - c8 = class extends i6 { - constructor() { - super(...arguments), this._$AN = void 0; - } - _$AT(i20, t17, e23) { - super._$AT(i20, t17, e23), r9(this), this.isConnected = i20._$AU; - } - _$AO(i20, t17 = true) { - var e23, r18; - i20 !== this.isConnected && (this.isConnected = i20, i20 ? null === (e23 = this.reconnected) || void 0 === e23 || e23.call(this) : null === (r18 = this.disconnected) || void 0 === r18 || r18.call(this)), t17 && (s8(this, i20), o13(this)); - } - setValue(t17) { - if (e9(this._$Ct)) this._$Ct._$AI(t17, this); - else { - const i20 = [...this._$Ct._$AH]; - i20[this._$Ci] = t17, this._$Ct._$AI(i20, this, 0); - } - } - disconnected() { - } - reconnected() { - } - }; - } -}); - -// ../node_modules/lit-html/directives/private-async-helpers.js -var s9, i9; -var init_private_async_helpers = __esm({ - "../node_modules/lit-html/directives/private-async-helpers.js"() { - s9 = class { - constructor(t17) { - this.G = t17; - } - disconnect() { - this.G = void 0; - } - reconnect(t17) { - this.G = t17; - } - deref() { - return this.G; - } - }; - i9 = class { - constructor() { - this.Y = void 0, this.Z = void 0; - } - get() { - return this.Y; - } - pause() { - var t17; - null !== (t17 = this.Y) && void 0 !== t17 || (this.Y = new Promise((t18) => this.Z = t18)); - } - resume() { - var t17; - null === (t17 = this.Z) || void 0 === t17 || t17.call(this), this.Y = this.Z = void 0; - } - }; - } -}); - -// ../node_modules/lit-html/directives/until.js -var n11, h6, c9, m4; -var init_until = __esm({ - "../node_modules/lit-html/directives/until.js"() { - init_lit_html(); - init_directive_helpers(); - init_async_directive(); - init_private_async_helpers(); - init_directive(); - n11 = (t17) => !i7(t17) && "function" == typeof t17.then; - h6 = 1073741823; - c9 = class extends c8 { - constructor() { - super(...arguments), this._$C_t = h6, this._$Cwt = [], this._$Cq = new s9(this), this._$CK = new i9(); - } - render(...s14) { - var i20; - return null !== (i20 = s14.find((t17) => !n11(t17))) && void 0 !== i20 ? i20 : T; - } - update(s14, i20) { - const r18 = this._$Cwt; - let e23 = r18.length; - this._$Cwt = i20; - const o29 = this._$Cq, c21 = this._$CK; - this.isConnected || this.disconnected(); - for (let t17 = 0; t17 < i20.length && !(t17 > this._$C_t); t17++) { - const s15 = i20[t17]; - if (!n11(s15)) return this._$C_t = t17, s15; - t17 < e23 && s15 === r18[t17] || (this._$C_t = h6, e23 = 0, Promise.resolve(s15).then(async (t18) => { - for (; c21.get(); ) await c21.get(); - const i21 = o29.deref(); - if (void 0 !== i21) { - const r19 = i21._$Cwt.indexOf(s15); - r19 > -1 && r19 < i21._$C_t && (i21._$C_t = r19, i21.setValue(t18)); - } - })); - } - return T; - } - disconnected() { - this._$Cq.disconnect(), this._$CK.pause(); - } - reconnected() { - this._$Cq.reconnect(this), this._$CK.resume(); - } - }; - m4 = e8(c9); - } -}); - -// ../node_modules/lit/directives/until.js -var init_until2 = __esm({ - "../node_modules/lit/directives/until.js"() { - init_until(); - } -}); - -// ../node_modules/lit-html/directives/live.js -var l9; -var init_live = __esm({ - "../node_modules/lit-html/directives/live.js"() { - init_lit_html(); - init_directive(); - init_directive_helpers(); - l9 = e8(class extends i6 { - constructor(r18) { - if (super(r18), r18.type !== t7.PROPERTY && r18.type !== t7.ATTRIBUTE && r18.type !== t7.BOOLEAN_ATTRIBUTE) throw Error("The `live` directive is not allowed on child or event bindings"); - if (!e9(r18)) throw Error("`live` bindings can only contain a single expression"); - } - render(r18) { - return r18; - } - update(i20, [t17]) { - if (t17 === T || t17 === A) return t17; - const o29 = i20.element, l15 = i20.name; - if (i20.type === t7.PROPERTY) { - if (t17 === o29[l15]) return T; - } else if (i20.type === t7.BOOLEAN_ATTRIBUTE) { - if (!!t17 === o29.hasAttribute(l15)) return T; - } else if (i20.type === t7.ATTRIBUTE && o29.getAttribute(l15) === t17 + "") return T; - return a5(i20), t17; - } - }); - } -}); - -// ../node_modules/lit/directives/live.js -var init_live2 = __esm({ - "../node_modules/lit/directives/live.js"() { - init_live(); - } -}); - -// ../node_modules/lit-html/directives/when.js -function n12(n18, o29, r18) { - return n18 ? o29() : null == r18 ? void 0 : r18(); -} -var init_when = __esm({ - "../node_modules/lit-html/directives/when.js"() { - } -}); - -// ../node_modules/lit/directives/when.js -var init_when2 = __esm({ - "../node_modules/lit/directives/when.js"() { - init_when(); - } -}); - -// ../node_modules/lit-html/directives/join.js -var init_join = __esm({ - "../node_modules/lit-html/directives/join.js"() { - } -}); - -// ../node_modules/lit/directives/join.js -var init_join2 = __esm({ - "../node_modules/lit/directives/join.js"() { - init_join(); - } -}); - -// ../node_modules/lit-html/directives/unsafe-html.js -var e10, o14; -var init_unsafe_html = __esm({ - "../node_modules/lit-html/directives/unsafe-html.js"() { - init_lit_html(); - init_directive(); - e10 = class extends i6 { - constructor(i20) { - if (super(i20), this.et = A, i20.type !== t7.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings"); - } - render(r18) { - if (r18 === A || null == r18) return this.ft = void 0, this.et = r18; - if (r18 === T) return r18; - if ("string" != typeof r18) throw Error(this.constructor.directiveName + "() called with a non-string value"); - if (r18 === this.et) return this.ft; - this.et = r18; - const s14 = [r18]; - return s14.raw = s14, this.ft = { _$litType$: this.constructor.resultType, strings: s14, values: [] }; - } - }; - e10.directiveName = "unsafeHTML", e10.resultType = 1; - o14 = e8(e10); - } -}); - -// ../node_modules/lit/directives/unsafe-html.js -var init_unsafe_html2 = __esm({ - "../node_modules/lit/directives/unsafe-html.js"() { - init_unsafe_html(); - } -}); - -// ../node_modules/@spectrum-web-components/base/src/directives.js -var init_directives = __esm({ - "../node_modules/@spectrum-web-components/base/src/directives.js"() { - "use strict"; - init_if_defined2(); - init_repeat2(); - init_class_map2(); - init_style_map2(); - init_until2(); - init_live2(); - init_when2(); - init_join2(); - init_unsafe_html2(); - } -}); - -// ../node_modules/@spectrum-web-components/shared/src/like-anchor.js -function LikeAnchor(s14) { - class r18 extends s14 { - renderAnchor({ id: i20, className: t17, ariaHidden: a10, labelledby: l15, tabindex: d15, anchorContent: g4 = x`` }) { - return x`${g4}`; - } - } - return n13([n7()], r18.prototype, "download", 2), n13([n7()], r18.prototype, "label", 2), n13([n7()], r18.prototype, "href", 2), n13([n7()], r18.prototype, "target", 2), n13([n7()], r18.prototype, "referrerpolicy", 2), n13([n7()], r18.prototype, "rel", 2), r18; -} -var u6, f3, n13; -var init_like_anchor = __esm({ - "../node_modules/@spectrum-web-components/shared/src/like-anchor.js"() { - "use strict"; - init_src(); - init_decorators2(); - init_directives(); - u6 = Object.defineProperty; - f3 = Object.getOwnPropertyDescriptor; - n13 = (s14, r18, p19, i20) => { - for (var t17 = i20 > 1 ? void 0 : i20 ? f3(r18, p19) : r18, a10 = s14.length - 1, l15; a10 >= 0; a10--) (l15 = s14[a10]) && (t17 = (i20 ? l15(r18, p19, t17) : l15(t17)) || t17); - return i20 && t17 && u6(r18, p19, t17), t17; - }; - } -}); - -// ../node_modules/focus-visible/dist/focus-visible.js -var require_focus_visible = __commonJS({ - "../node_modules/focus-visible/dist/focus-visible.js"(exports, module) { - (function(global, factory) { - typeof exports === "object" && typeof module !== "undefined" ? factory() : typeof define === "function" && define.amd ? define(factory) : factory(); - })(exports, function() { - "use strict"; - function applyFocusVisiblePolyfill(scope) { - var hadKeyboardEvent = true; - var hadFocusVisibleRecently = false; - var hadFocusVisibleRecentlyTimeout = null; - var inputTypesAllowlist = { - text: true, - search: true, - url: true, - tel: true, - email: true, - password: true, - number: true, - date: true, - month: true, - week: true, - time: true, - datetime: true, - "datetime-local": true - }; - function isValidFocusTarget(el) { - if (el && el !== document && el.nodeName !== "HTML" && el.nodeName !== "BODY" && "classList" in el && "contains" in el.classList) { - return true; - } - return false; - } - function focusTriggersKeyboardModality(el) { - var type = el.type; - var tagName = el.tagName; - if (tagName === "INPUT" && inputTypesAllowlist[type] && !el.readOnly) { - return true; - } - if (tagName === "TEXTAREA" && !el.readOnly) { - return true; - } - if (el.isContentEditable) { - return true; - } - return false; - } - function addFocusVisibleClass(el) { - if (el.classList.contains("focus-visible")) { - return; - } - el.classList.add("focus-visible"); - el.setAttribute("data-focus-visible-added", ""); - } - function removeFocusVisibleClass(el) { - if (!el.hasAttribute("data-focus-visible-added")) { - return; - } - el.classList.remove("focus-visible"); - el.removeAttribute("data-focus-visible-added"); - } - function onKeyDown(e23) { - if (e23.metaKey || e23.altKey || e23.ctrlKey) { - return; - } - if (isValidFocusTarget(scope.activeElement)) { - addFocusVisibleClass(scope.activeElement); - } - hadKeyboardEvent = true; - } - function onPointerDown(e23) { - hadKeyboardEvent = false; - } - function onFocus(e23) { - if (!isValidFocusTarget(e23.target)) { - return; - } - if (hadKeyboardEvent || focusTriggersKeyboardModality(e23.target)) { - addFocusVisibleClass(e23.target); - } - } - function onBlur(e23) { - if (!isValidFocusTarget(e23.target)) { - return; - } - if (e23.target.classList.contains("focus-visible") || e23.target.hasAttribute("data-focus-visible-added")) { - hadFocusVisibleRecently = true; - window.clearTimeout(hadFocusVisibleRecentlyTimeout); - hadFocusVisibleRecentlyTimeout = window.setTimeout(function() { - hadFocusVisibleRecently = false; - }, 100); - removeFocusVisibleClass(e23.target); - } - } - function onVisibilityChange(e23) { - if (document.visibilityState === "hidden") { - if (hadFocusVisibleRecently) { - hadKeyboardEvent = true; - } - addInitialPointerMoveListeners(); - } - } - function addInitialPointerMoveListeners() { - document.addEventListener("mousemove", onInitialPointerMove); - document.addEventListener("mousedown", onInitialPointerMove); - document.addEventListener("mouseup", onInitialPointerMove); - document.addEventListener("pointermove", onInitialPointerMove); - document.addEventListener("pointerdown", onInitialPointerMove); - document.addEventListener("pointerup", onInitialPointerMove); - document.addEventListener("touchmove", onInitialPointerMove); - document.addEventListener("touchstart", onInitialPointerMove); - document.addEventListener("touchend", onInitialPointerMove); - } - function removeInitialPointerMoveListeners() { - document.removeEventListener("mousemove", onInitialPointerMove); - document.removeEventListener("mousedown", onInitialPointerMove); - document.removeEventListener("mouseup", onInitialPointerMove); - document.removeEventListener("pointermove", onInitialPointerMove); - document.removeEventListener("pointerdown", onInitialPointerMove); - document.removeEventListener("pointerup", onInitialPointerMove); - document.removeEventListener("touchmove", onInitialPointerMove); - document.removeEventListener("touchstart", onInitialPointerMove); - document.removeEventListener("touchend", onInitialPointerMove); - } - function onInitialPointerMove(e23) { - if (e23.target.nodeName && e23.target.nodeName.toLowerCase() === "html") { - return; - } - hadKeyboardEvent = false; - removeInitialPointerMoveListeners(); - } - document.addEventListener("keydown", onKeyDown, true); - document.addEventListener("mousedown", onPointerDown, true); - document.addEventListener("pointerdown", onPointerDown, true); - document.addEventListener("touchstart", onPointerDown, true); - document.addEventListener("visibilitychange", onVisibilityChange, true); - addInitialPointerMoveListeners(); - scope.addEventListener("focus", onFocus, true); - scope.addEventListener("blur", onBlur, true); - if (scope.nodeType === Node.DOCUMENT_FRAGMENT_NODE && scope.host) { - scope.host.setAttribute("data-js-focus-visible", ""); - } else if (scope.nodeType === Node.DOCUMENT_NODE) { - document.documentElement.classList.add("js-focus-visible"); - document.documentElement.setAttribute("data-js-focus-visible", ""); - } - } - if (typeof window !== "undefined" && typeof document !== "undefined") { - window.applyFocusVisiblePolyfill = applyFocusVisiblePolyfill; - var event; - try { - event = new CustomEvent("focus-visible-polyfill-ready"); - } catch (error) { - event = document.createEvent("CustomEvent"); - event.initCustomEvent("focus-visible-polyfill-ready", false, false, {}); - } - window.dispatchEvent(event); - } - if (typeof document !== "undefined") { - applyFocusVisiblePolyfill(document); - } - }); - } -}); - -// ../node_modules/@spectrum-web-components/shared/src/focus-visible.js -var i10, FocusVisiblePolyfillMixin; -var init_focus_visible = __esm({ - "../node_modules/@spectrum-web-components/shared/src/focus-visible.js"() { - "use strict"; - i10 = true; - try { - document.body.querySelector(":focus-visible"); - } catch (a10) { - i10 = false, Promise.resolve().then(() => __toESM(require_focus_visible(), 1)); - } - FocusVisiblePolyfillMixin = (a10) => { - var s14, t17; - const n18 = (l15) => { - if (l15.shadowRoot == null || l15.hasAttribute("data-js-focus-visible")) return () => { - }; - if (self.applyFocusVisiblePolyfill) self.applyFocusVisiblePolyfill(l15.shadowRoot), l15.manageAutoFocus && l15.manageAutoFocus(); - else { - const e23 = () => { - self.applyFocusVisiblePolyfill && l15.shadowRoot && self.applyFocusVisiblePolyfill(l15.shadowRoot), l15.manageAutoFocus && l15.manageAutoFocus(); - }; - return self.addEventListener("focus-visible-polyfill-ready", e23, { once: true }), () => { - self.removeEventListener("focus-visible-polyfill-ready", e23); - }; - } - return () => { - }; - }, o29 = Symbol("endPolyfillCoordination"); - class c21 extends (t17 = a10, s14 = o29, t17) { - constructor() { - super(...arguments); - this[s14] = null; - } - connectedCallback() { - super.connectedCallback && super.connectedCallback(), i10 || requestAnimationFrame(() => { - this[o29] == null && (this[o29] = n18(this)); - }); - } - disconnectedCallback() { - super.disconnectedCallback && super.disconnectedCallback(), i10 || requestAnimationFrame(() => { - this[o29] != null && (this[o29](), this[o29] = null); - }); - } - } - return c21; - }; - } -}); - -// ../node_modules/@spectrum-web-components/shared/src/focusable.js -function u7() { - return new Promise((s14) => requestAnimationFrame(() => s14())); -} -var d6, b2, n14, Focusable; -var init_focusable = __esm({ - "../node_modules/@spectrum-web-components/shared/src/focusable.js"() { - "use strict"; - init_src(); - init_decorators2(); - init_focus_visible(); - d6 = Object.defineProperty; - b2 = Object.getOwnPropertyDescriptor; - n14 = (s14, a10, e23, t17) => { - for (var i20 = t17 > 1 ? void 0 : t17 ? b2(a10, e23) : a10, o29 = s14.length - 1, r18; o29 >= 0; o29--) (r18 = s14[o29]) && (i20 = (t17 ? r18(a10, e23, i20) : r18(i20)) || i20); - return t17 && i20 && d6(a10, e23, i20), i20; - }; - Focusable = class extends FocusVisiblePolyfillMixin(SpectrumElement) { - constructor() { - super(...arguments); - this.disabled = false; - this.autofocus = false; - this._tabIndex = 0; - this.manipulatingTabindex = false; - this.autofocusReady = Promise.resolve(); - } - get tabIndex() { - if (this.focusElement === this) { - const t17 = this.hasAttribute("tabindex") ? Number(this.getAttribute("tabindex")) : NaN; - return isNaN(t17) ? -1 : t17; - } - const e23 = parseFloat(this.hasAttribute("tabindex") && this.getAttribute("tabindex") || "0"); - return this.disabled || e23 < 0 ? -1 : this.focusElement ? this.focusElement.tabIndex : e23; - } - set tabIndex(e23) { - if (this.manipulatingTabindex) { - this.manipulatingTabindex = false; - return; - } - if (this.focusElement === this) { - if (e23 !== this._tabIndex) { - this._tabIndex = e23; - const t17 = this.disabled ? "-1" : "" + e23; - this.manipulatingTabindex = true, this.setAttribute("tabindex", t17); - } - return; - } - if (e23 === -1 ? this.addEventListener("pointerdown", this.onPointerdownManagementOfTabIndex) : (this.manipulatingTabindex = true, this.removeEventListener("pointerdown", this.onPointerdownManagementOfTabIndex)), e23 === -1 || this.disabled) { - this.setAttribute("tabindex", "-1"), this.removeAttribute("focusable"), e23 !== -1 && this.manageFocusElementTabindex(e23); - return; - } - this.setAttribute("focusable", ""), this.hasAttribute("tabindex") ? this.removeAttribute("tabindex") : this.manipulatingTabindex = false, this.manageFocusElementTabindex(e23); - } - onPointerdownManagementOfTabIndex() { - this.tabIndex === -1 && setTimeout(() => { - this.tabIndex = 0, this.focus({ preventScroll: true }), this.tabIndex = -1; - }); - } - async manageFocusElementTabindex(e23) { - this.focusElement || await this.updateComplete, e23 === null ? this.focusElement.removeAttribute("tabindex") : this.focusElement.tabIndex = e23; - } - get focusElement() { - throw new Error("Must implement focusElement getter!"); - } - focus(e23) { - this.disabled || !this.focusElement || (this.focusElement !== this ? this.focusElement.focus(e23) : HTMLElement.prototype.focus.apply(this, [e23])); - } - blur() { - const e23 = this.focusElement || this; - e23 !== this ? e23.blur() : HTMLElement.prototype.blur.apply(this); - } - click() { - if (this.disabled) return; - const e23 = this.focusElement || this; - e23 !== this ? e23.click() : HTMLElement.prototype.click.apply(this); - } - manageAutoFocus() { - this.autofocus && (this.dispatchEvent(new KeyboardEvent("keydown", { code: "Tab" })), this.focusElement.focus()); - } - firstUpdated(e23) { - super.firstUpdated(e23), (!this.hasAttribute("tabindex") || this.getAttribute("tabindex") !== "-1") && this.setAttribute("focusable", ""); - } - update(e23) { - e23.has("disabled") && this.handleDisabledChanged(this.disabled, e23.get("disabled")), super.update(e23); - } - updated(e23) { - super.updated(e23), e23.has("disabled") && this.disabled && this.blur(); - } - async handleDisabledChanged(e23, t17) { - const i20 = () => this.focusElement !== this && typeof this.focusElement.disabled != "undefined"; - e23 ? (this.manipulatingTabindex = true, this.setAttribute("tabindex", "-1"), await this.updateComplete, i20() ? this.focusElement.disabled = true : this.setAttribute("aria-disabled", "true")) : t17 && (this.manipulatingTabindex = true, this.focusElement === this ? this.setAttribute("tabindex", "" + this._tabIndex) : this.removeAttribute("tabindex"), await this.updateComplete, i20() ? this.focusElement.disabled = false : this.removeAttribute("aria-disabled")); - } - async getUpdateComplete() { - const e23 = await super.getUpdateComplete(); - return await this.autofocusReady, e23; - } - connectedCallback() { - super.connectedCallback(), this.autofocus && (this.autofocusReady = new Promise(async (e23) => { - await u7(), await u7(), e23(); - }), this.updateComplete.then(() => { - this.manageAutoFocus(); - })); - } - }; - n14([n7({ type: Boolean, reflect: true })], Focusable.prototype, "disabled", 2), n14([n7({ type: Boolean })], Focusable.prototype, "autofocus", 2), n14([n7({ type: Number })], Focusable.prototype, "tabIndex", 1); - } -}); - -// ../node_modules/@spectrum-web-components/shared/src/observe-slot-text.js -function ObserveSlotText(c21, e23, s14 = []) { - var a10, i20; - const o29 = (f8) => (m10) => f8.matches(m10); - class t17 extends (i20 = c21, a10 = p5, i20) { - constructor(...n18) { - super(n18); - this.slotHasContent = false; - new t6(this, { config: { characterData: true, subtree: true }, callback: (d15) => { - for (const r18 of d15) if (r18.type === "characterData") { - this.manageTextObservedSlot(); - return; - } - } }); - } - manageTextObservedSlot() { - if (!this[p5]) return; - const n18 = [...this[p5]].filter((d15) => { - const r18 = d15; - return r18.tagName ? !s14.some(o29(r18)) : r18.textContent ? r18.textContent.trim() : false; - }); - this.slotHasContent = n18.length > 0; - } - update(n18) { - if (!this.hasUpdated) { - const { childNodes: d15 } = this, r18 = [...d15].filter((g4) => { - const l15 = g4; - return l15.tagName ? s14.some(o29(l15)) ? false : e23 ? l15.getAttribute("slot") === e23 : !l15.hasAttribute("slot") : l15.textContent ? l15.textContent.trim() : false; - }); - this.slotHasContent = r18.length > 0; - } - super.update(n18); - } - firstUpdated(n18) { - super.firstUpdated(n18), this.updateComplete.then(() => { - this.manageTextObservedSlot(); - }); - } - } - return u8([n7({ type: Boolean, attribute: false })], t17.prototype, "slotHasContent", 2), u8([o8({ slot: e23, flatten: true })], t17.prototype, a10, 2), t17; -} -var h7, x2, u8, p5; -var init_observe_slot_text = __esm({ - "../node_modules/@spectrum-web-components/shared/src/observe-slot-text.js"() { - "use strict"; - init_decorators2(); - init_mutation_controller(); - h7 = Object.defineProperty; - x2 = Object.getOwnPropertyDescriptor; - u8 = (c21, e23, s14, o29) => { - for (var t17 = o29 > 1 ? void 0 : o29 ? x2(e23, s14) : e23, a10 = c21.length - 1, i20; a10 >= 0; a10--) (i20 = c21[a10]) && (t17 = (o29 ? i20(e23, s14, t17) : i20(t17)) || t17); - return o29 && t17 && h7(e23, s14, t17), t17; - }; - p5 = Symbol("assignedNodes"); - } -}); - -// ../node_modules/@spectrum-web-components/shared/src/random-id.js -function randomID() { - return Array.from(crypto.getRandomValues(new Uint8Array(4)), (r18) => `0${(r18 & 255).toString(16)}`.slice(-2)).join(""); -} -var init_random_id = __esm({ - "../node_modules/@spectrum-web-components/shared/src/random-id.js"() { - "use strict"; - } -}); - -// ../node_modules/@spectrum-web-components/base/src/condition-attribute-with-id.js -function conditionAttributeWithoutId(t17, i20, n18) { - const e23 = t17.getAttribute(i20); - let r18 = e23 ? e23.split(/\s+/) : []; - r18 = r18.filter((s14) => !n18.find((o29) => s14 === o29)), r18.length ? t17.setAttribute(i20, r18.join(" ")) : t17.removeAttribute(i20); -} -function conditionAttributeWithId(t17, i20, n18) { - const e23 = Array.isArray(n18) ? n18 : [n18], r18 = t17.getAttribute(i20), s14 = r18 ? r18.split(/\s+/) : []; - return e23.every((d15) => s14.indexOf(d15) > -1) ? () => { - } : (s14.push(...e23), t17.setAttribute(i20, s14.join(" ")), () => conditionAttributeWithoutId(t17, i20, e23)); -} -var init_condition_attribute_with_id = __esm({ - "../node_modules/@spectrum-web-components/base/src/condition-attribute-with-id.js"() { - "use strict"; - } -}); - -// ../node_modules/@spectrum-web-components/reactive-controllers/src/ElementResolution.js -var elementResolverUpdatedSymbol, ElementResolutionController; -var init_ElementResolution = __esm({ - "../node_modules/@spectrum-web-components/reactive-controllers/src/ElementResolution.js"() { - "use strict"; - elementResolverUpdatedSymbol = Symbol("element resolver updated"); - ElementResolutionController = class { - constructor(e23, { selector: t17 } = { selector: "" }) { - this._element = null; - this._selector = ""; - this.mutationCallback = (e24) => { - let t18 = false; - e24.forEach((s14) => { - if (!t18) { - if (s14.type === "childList") { - const r18 = this.element && [...s14.removedNodes].includes(this.element), l15 = !!this.selector && [...s14.addedNodes].some(this.elementIsSelected); - t18 = t18 || r18 || l15; - } - if (s14.type === "attributes") { - const r18 = s14.target === this.element, l15 = !!this.selector && this.elementIsSelected(s14.target); - t18 = t18 || r18 || l15; - } - } - }), t18 && this.resolveElement(); - }; - this.elementIsSelected = (e24) => { - var t18; - return this.selectorIsId ? (e24 == null ? void 0 : e24.id) === this.selectorAsId : (t18 = e24 == null ? void 0 : e24.matches) == null ? void 0 : t18.call(e24, this.selector); - }; - this.host = e23, this.selector = t17, this.observer = new MutationObserver(this.mutationCallback), this.host.addController(this); - } - get element() { - return this._element; - } - set element(e23) { - if (e23 === this.element) return; - const t17 = this.element; - this._element = e23, this.host.requestUpdate(elementResolverUpdatedSymbol, t17); - } - get selector() { - return this._selector; - } - set selector(e23) { - e23 !== this.selector && (this.releaseElement(), this._selector = e23, this.resolveElement()); - } - get selectorAsId() { - return this.selector.slice(1); - } - get selectorIsId() { - return !!this.selector && this.selector.startsWith("#"); - } - hostConnected() { - this.resolveElement(), this.observer.observe(this.host.getRootNode(), { subtree: true, childList: true, attributes: true }); - } - hostDisconnected() { - this.releaseElement(), this.observer.disconnect(); - } - resolveElement() { - if (!this.selector) { - this.releaseElement(); - return; - } - const e23 = this.host.getRootNode(); - this.element = this.selectorIsId ? e23.getElementById(this.selectorAsId) : e23.querySelector(this.selector); - } - releaseElement() { - this.element = null; - } - }; - } -}); - -// ../node_modules/@spectrum-web-components/shared/src/get-label-from-slot.js -var getLabelFromSlot; -var init_get_label_from_slot = __esm({ - "../node_modules/@spectrum-web-components/shared/src/get-label-from-slot.js"() { - "use strict"; - getLabelFromSlot = (r18, l15) => { - if (r18) return null; - const t17 = l15.assignedNodes().reduce((e23, n18) => n18.textContent ? e23 + n18.textContent : e23, ""); - return t17 ? t17.trim() : null; - }; - } -}); - -// ../node_modules/@spectrum-web-components/progress-circle/src/progress-circle.css.js -var e13, progress_circle_css_default; -var init_progress_circle_css = __esm({ - "../node_modules/@spectrum-web-components/progress-circle/src/progress-circle.css.js"() { - "use strict"; - init_src(); - e13 = i3` - .fill-submask-2{animation:1s linear infinite b}@keyframes a{0%{transform:rotate(90deg)}1.69%{transform:rotate(72.3deg)}3.39%{transform:rotate(55.5deg)}5.08%{transform:rotate(40.3deg)}6.78%{transform:rotate(25deg)}8.47%{transform:rotate(10.6deg)}10.17%{transform:rotate(0)}11.86%{transform:rotate(0)}13.56%{transform:rotate(0)}15.25%{transform:rotate(0)}16.95%{transform:rotate(0)}18.64%{transform:rotate(0)}20.34%{transform:rotate(0)}22.03%{transform:rotate(0)}23.73%{transform:rotate(0)}25.42%{transform:rotate(0)}27.12%{transform:rotate(0)}28.81%{transform:rotate(0)}30.51%{transform:rotate(0)}32.2%{transform:rotate(0)}33.9%{transform:rotate(0)}35.59%{transform:rotate(0)}37.29%{transform:rotate(0)}38.98%{transform:rotate(0)}40.68%{transform:rotate(0)}42.37%{transform:rotate(5.3deg)}44.07%{transform:rotate(13.4deg)}45.76%{transform:rotate(20.6deg)}47.46%{transform:rotate(29deg)}49.15%{transform:rotate(36.5deg)}50.85%{transform:rotate(42.6deg)}52.54%{transform:rotate(48.8deg)}54.24%{transform:rotate(54.2deg)}55.93%{transform:rotate(59.4deg)}57.63%{transform:rotate(63.2deg)}59.32%{transform:rotate(67.2deg)}61.02%{transform:rotate(70.8deg)}62.71%{transform:rotate(73.8deg)}64.41%{transform:rotate(76.2deg)}66.1%{transform:rotate(78.7deg)}67.8%{transform:rotate(80.6deg)}69.49%{transform:rotate(82.6deg)}71.19%{transform:rotate(83.7deg)}72.88%{transform:rotate(85deg)}74.58%{transform:rotate(86.3deg)}76.27%{transform:rotate(87deg)}77.97%{transform:rotate(87.7deg)}79.66%{transform:rotate(88.3deg)}81.36%{transform:rotate(88.6deg)}83.05%{transform:rotate(89.2deg)}84.75%{transform:rotate(89.2deg)}86.44%{transform:rotate(89.5deg)}88.14%{transform:rotate(89.9deg)}89.83%{transform:rotate(89.7deg)}91.53%{transform:rotate(90.1deg)}93.22%{transform:rotate(90.2deg)}94.92%{transform:rotate(90.1deg)}96.61%{transform:rotate(90deg)}98.31%{transform:rotate(89.8deg)}to{transform:rotate(90deg)}}@keyframes b{0%{transform:rotate(180deg)}1.69%{transform:rotate(180deg)}3.39%{transform:rotate(180deg)}5.08%{transform:rotate(180deg)}6.78%{transform:rotate(180deg)}8.47%{transform:rotate(180deg)}10.17%{transform:rotate(179.2deg)}11.86%{transform:rotate(164deg)}13.56%{transform:rotate(151.8deg)}15.25%{transform:rotate(140.8deg)}16.95%{transform:rotate(130.3deg)}18.64%{transform:rotate(120.4deg)}20.34%{transform:rotate(110.8deg)}22.03%{transform:rotate(101.6deg)}23.73%{transform:rotate(93.5deg)}25.42%{transform:rotate(85.4deg)}27.12%{transform:rotate(78.1deg)}28.81%{transform:rotate(71.2deg)}30.51%{transform:rotate(89.1deg)}32.2%{transform:rotate(105.5deg)}33.9%{transform:rotate(121.3deg)}35.59%{transform:rotate(135.5deg)}37.29%{transform:rotate(148.4deg)}38.98%{transform:rotate(161deg)}40.68%{transform:rotate(173.5deg)}42.37%{transform:rotate(180deg)}44.07%{transform:rotate(180deg)}45.76%{transform:rotate(180deg)}47.46%{transform:rotate(180deg)}49.15%{transform:rotate(180deg)}50.85%{transform:rotate(180deg)}52.54%{transform:rotate(180deg)}54.24%{transform:rotate(180deg)}55.93%{transform:rotate(180deg)}57.63%{transform:rotate(180deg)}59.32%{transform:rotate(180deg)}61.02%{transform:rotate(180deg)}62.71%{transform:rotate(180deg)}64.41%{transform:rotate(180deg)}66.1%{transform:rotate(180deg)}67.8%{transform:rotate(180deg)}69.49%{transform:rotate(180deg)}71.19%{transform:rotate(180deg)}72.88%{transform:rotate(180deg)}74.58%{transform:rotate(180deg)}76.27%{transform:rotate(180deg)}77.97%{transform:rotate(180deg)}79.66%{transform:rotate(180deg)}81.36%{transform:rotate(180deg)}83.05%{transform:rotate(180deg)}84.75%{transform:rotate(180deg)}86.44%{transform:rotate(180deg)}88.14%{transform:rotate(180deg)}89.83%{transform:rotate(180deg)}91.53%{transform:rotate(180deg)}93.22%{transform:rotate(180deg)}94.92%{transform:rotate(180deg)}96.61%{transform:rotate(180deg)}98.31%{transform:rotate(180deg)}to{transform:rotate(180deg)}}@keyframes c{0%{transform:rotate(-90deg)}to{transform:rotate(270deg)}}:host{--spectrum-progress-circle-track-border-color:var(--spectrum-gray-300);--spectrum-progress-circle-fill-border-color:var(--spectrum-accent-content-color-default);--spectrum-progress-circle-track-border-color-over-background:var(--spectrum-transparent-white-300);--spectrum-progress-circle-fill-border-color-over-background:var(--spectrum-transparent-white-900);--spectrum-progress-circle-size:var(--spectrum-progress-circle-size-medium);--spectrum-progress-circle-thickness:var(--spectrum-progress-circle-thickness-medium);--spectrum-progress-circle-track-border-style:solid}:host([size=s]){--spectrum-progress-circle-size:var(--spectrum-progress-circle-size-small);--spectrum-progress-circle-thickness:var(--spectrum-progress-circle-thickness-small)}:host([size=l]){--spectrum-progress-circle-size:var(--spectrum-progress-circle-size-large);--spectrum-progress-circle-thickness:var(--spectrum-progress-circle-thickness-large)}@media (forced-colors:active){:host{--highcontrast-progress-circle-fill-border-color:Highlight;--highcontrast-progress-circle-fill-border-color-over-background:Highlight}.track{--spectrum-progress-circle-track-border-style:double}}:host{position:var(--mod-progress-circle-position,relative);direction:ltr;display:inline-block;transform:translateZ(0)}:host,.track{inline-size:var(--mod-progress-circle-size,var(--spectrum-progress-circle-size));block-size:var(--mod-progress-circle-size,var(--spectrum-progress-circle-size))}.track{box-sizing:border-box;border-style:var(--highcontrast-progress-circle-track-border-style,var(--mod-progress-circle-track-border-style,var(--spectrum-progress-circle-track-border-style)));border-width:var(--mod-progress-circle-thickness,var(--spectrum-progress-circle-thickness));border-radius:var(--mod-progress-circle-size,var(--spectrum-progress-circle-size));border-color:var(--mod-progress-circle-track-border-color,var(--spectrum-progress-circle-track-border-color))}.fills{block-size:100%;inline-size:100%;position:absolute;inset-block-start:0;inset-inline-start:0}.fill{box-sizing:border-box;inline-size:var(--mod-progress-circle-size,var(--spectrum-progress-circle-size));block-size:var(--mod-progress-circle-size,var(--spectrum-progress-circle-size));border-style:solid;border-width:var(--mod-progress-circle-thickness,var(--spectrum-progress-circle-thickness));border-radius:var(--mod-progress-circle-size,var(--spectrum-progress-circle-size));border-color:var(--highcontrast-progress-circle-fill-border-color,var(--mod-progress-circle-fill-border-color,var(--spectrum-progress-circle-fill-border-color)))}:host([static=white]) .track{border-color:var(--mod-progress-circle-track-border-color-over-background,var(--spectrum-progress-circle-track-border-color-over-background))}:host([static=white]) .fill{border-color:var(--highcontrast-progress-circle-fill-border-color-over-background,var(--mod-progress-circle-fill-border-color-over-background,var(--spectrum-progress-circle-fill-border-color-over-background)))}.fillMask1,.fillMask2{transform-origin:100%;block-size:100%;inline-size:50%;position:absolute;overflow:hidden;transform:rotate(180deg)}.fillSubMask1,.fillSubMask2{transform-origin:100%;block-size:100%;inline-size:100%;overflow:hidden;transform:rotate(-180deg)}.fillMask2{transform:rotate(0)}:host([indeterminate]) .fills{will-change:transform;transform-origin:50%;animation:1s cubic-bezier(.25,.78,.48,.89) infinite c;transform:translateZ(0)}:host([indeterminate]) .fillSubMask1{will-change:transform;animation:1s linear infinite a;transform:translateZ(0)}:host([indeterminate]) .fillSubMask2{will-change:transform;animation:1s linear infinite b;transform:translateZ(0)}:host{block-size:var(--mod-progress-circle-size,var(--_spectrum-progress-circle-size));inline-size:var(--mod-progress-circle-size,var(--_spectrum-progress-circle-size));--spectrum-progress-circle-size:inherit;--spectrum-progresscircle-m-over-background-track-fill-color:var(--spectrum-alias-track-fill-color-overbackground);--_spectrum-progress-circle-size:var(--spectrum-progress-circle-size,var(--spectrum-progress-circle-size-medium))}:host([size=s]){--_spectrum-progress-circle-size:var(--spectrum-progress-circle-size,var(--spectrum-progress-circle-size-small))}:host([size=l]){--_spectrum-progress-circle-size:var(--spectrum-progress-circle-size,var(--spectrum-progress-circle-size-large))}slot{display:none}.track,.fill{block-size:var(--mod-progress-circle-size,var(--_spectrum-progress-circle-size));border-radius:var(--mod-progress-circle-size,var(--_spectrum-progress-circle-size));inline-size:var(--mod-progress-circle-size,var(--_spectrum-progress-circle-size))}:host([indeterminate]) .fills,:host([indeterminate]) .fillSubMask1,:host([indeterminate]) .fillSubMask2{animation-duration:var(--spectrum-animation-duration-2000)} -`; - progress_circle_css_default = e13; - } -}); - -// ../node_modules/@spectrum-web-components/progress-circle/src/ProgressCircle.js -var p8, c14, i11, ProgressCircle; -var init_ProgressCircle = __esm({ - "../node_modules/@spectrum-web-components/progress-circle/src/ProgressCircle.js"() { - "use strict"; - init_src(); - init_decorators2(); - init_get_label_from_slot(); - init_directives(); - init_progress_circle_css(); - p8 = Object.defineProperty; - c14 = Object.getOwnPropertyDescriptor; - i11 = (o29, s14, e23, r18) => { - for (var t17 = r18 > 1 ? void 0 : r18 ? c14(s14, e23) : s14, l15 = o29.length - 1, n18; l15 >= 0; l15--) (n18 = o29[l15]) && (t17 = (r18 ? n18(s14, e23, t17) : n18(t17)) || t17); - return r18 && t17 && p8(s14, e23, t17), t17; - }; - ProgressCircle = class extends SizedMixin(SpectrumElement, { validSizes: ["s", "m", "l"] }) { - constructor() { - super(...arguments); - this.indeterminate = false; - this.label = ""; - this.overBackground = false; - this.progress = 0; - } - static get styles() { - return [progress_circle_css_default]; - } - makeRotation(e23) { - return this.indeterminate ? void 0 : `transform: rotate(${e23}deg);`; - } - willUpdate(e23) { - e23.has("overBackground") && (this.static = this.overBackground ? "white" : this.static || void 0); - } - render() { - const e23 = [this.makeRotation(-180 + 3.6 * Math.min(this.progress, 50)), this.makeRotation(-180 + 3.6 * Math.max(this.progress - 50, 0))], r18 = ["Mask1", "Mask2"]; - return x` - -
-
- ${r18.map((t17, l15) => x` -
-
-
-
-
- `)} -
- `; - } - handleSlotchange() { - const e23 = getLabelFromSlot(this.label, this.slotEl); - e23 && (this.label = e23); - } - firstUpdated(e23) { - super.firstUpdated(e23), this.hasAttribute("role") || this.setAttribute("role", "progressbar"); - } - updated(e23) { - super.updated(e23), !this.indeterminate && e23.has("progress") ? this.setAttribute("aria-valuenow", "" + this.progress) : this.hasAttribute("aria-valuenow") && this.removeAttribute("aria-valuenow"), e23.has("label") && (this.label.length ? this.setAttribute("aria-label", this.label) : e23.get("label") === this.getAttribute("aria-label") && this.removeAttribute("aria-label")); - } - }; - i11([n7({ type: Boolean, reflect: true })], ProgressCircle.prototype, "indeterminate", 2), i11([n7({ type: String })], ProgressCircle.prototype, "label", 2), i11([n7({ type: Boolean, reflect: true, attribute: "over-background" })], ProgressCircle.prototype, "overBackground", 2), i11([n7({ reflect: true })], ProgressCircle.prototype, "static", 2), i11([n7({ type: Number })], ProgressCircle.prototype, "progress", 2), i11([i5("slot")], ProgressCircle.prototype, "slotEl", 2); - } -}); - -// ../node_modules/@spectrum-web-components/progress-circle/sp-progress-circle.js -var sp_progress_circle_exports = {}; -var init_sp_progress_circle = __esm({ - "../node_modules/@spectrum-web-components/progress-circle/sp-progress-circle.js"() { - "use strict"; - init_ProgressCircle(); - init_define_element(); - defineElement("sp-progress-circle", ProgressCircle); - } -}); - -// ../node_modules/@spectrum-web-components/shared/src/focusable-selectors.js -var e15, o21, userFocusableSelector, focusableSelector; -var init_focusable_selectors = __esm({ - "../node_modules/@spectrum-web-components/shared/src/focusable-selectors.js"() { - "use strict"; - e15 = ["button", "[focusable]", "[href]", "input", "label", "select", "textarea", "[tabindex]"]; - o21 = ':not([tabindex="-1"])'; - userFocusableSelector = e15.join(`${o21}, `) + o21; - focusableSelector = e15.join(", "); - } -}); - -// ../node_modules/@spectrum-web-components/shared/src/first-focusable-in.js -var firstFocusableIn, firstFocusableSlottedIn; -var init_first_focusable_in = __esm({ - "../node_modules/@spectrum-web-components/shared/src/first-focusable-in.js"() { - "use strict"; - init_focusable_selectors(); - firstFocusableIn = (e23) => e23.querySelector(userFocusableSelector); - firstFocusableSlottedIn = (e23) => e23.assignedElements().find((o29) => o29.matches(userFocusableSelector)); - } -}); - -// ../node_modules/@spectrum-web-components/shared/src/get-active-element.js -var init_get_active_element = __esm({ - "../node_modules/@spectrum-web-components/shared/src/get-active-element.js"() { - "use strict"; - } -}); - -// ../node_modules/@spectrum-web-components/shared/src/observe-slot-presence.js -function ObserveSlotPresence(l15, s14) { - var o29, i20; - const r18 = Array.isArray(s14) ? s14 : [s14]; - class a10 extends (i20 = l15, o29 = t12, i20) { - constructor(...e23) { - super(e23); - this[o29] = /* @__PURE__ */ new Map(); - this.managePresenceObservedSlot = () => { - let e24 = false; - r18.forEach((n18) => { - const c21 = !!this.querySelector(`:scope > ${n18}`), g4 = this[t12].get(n18) || false; - e24 = e24 || g4 !== c21, this[t12].set(n18, !!this.querySelector(`:scope > ${n18}`)); - }), e24 && this.updateComplete.then(() => { - this.requestUpdate(); - }); - }; - new t6(this, { config: { childList: true, subtree: true }, callback: () => { - this.managePresenceObservedSlot(); - } }), this.managePresenceObservedSlot(); - } - get slotContentIsPresent() { - if (r18.length === 1) return this[t12].get(r18[0]) || false; - throw new Error("Multiple selectors provided to `ObserveSlotPresence` use `getSlotContentPresence(selector: string)` instead."); - } - getSlotContentPresence(e23) { - if (this[t12].has(e23)) return this[t12].get(e23) || false; - throw new Error(`The provided selector \`${e23}\` is not being observed.`); - } - } - return a10; -} -var t12; -var init_observe_slot_presence = __esm({ - "../node_modules/@spectrum-web-components/shared/src/observe-slot-presence.js"() { - "use strict"; - init_mutation_controller(); - t12 = Symbol("slotContentIsPresent"); - } -}); - -// ../node_modules/@spectrum-web-components/shared/src/platform.js -function n15(o29) { - return typeof window != "undefined" && window.navigator != null ? o29.test(window.navigator.userAgent) : false; -} -function e16(o29) { - return typeof window != "undefined" && window.navigator != null ? o29.test(window.navigator.platform) : false; -} -function isMac() { - return e16(/^Mac/); -} -function isIPhone() { - return e16(/^iPhone/); -} -function isIPad() { - return e16(/^iPad/) || isMac() && navigator.maxTouchPoints > 1; -} -function isIOS() { - return isIPhone() || isIPad(); -} -function isAndroid() { - return n15(/Android/); -} -var init_platform = __esm({ - "../node_modules/@spectrum-web-components/shared/src/platform.js"() { - "use strict"; - } -}); - -// ../node_modules/@spectrum-web-components/shared/src/reparent-children.js -function T2(o29, i20, l15 = []) { - for (let e23 = 0; e23 < i20.length; ++e23) { - const n18 = i20[e23], r18 = o29[e23], t17 = r18.parentElement || r18.getRootNode(); - l15[e23] && l15[e23](n18), t17 && t17 !== r18 && t17.replaceChild(n18, r18), delete o29[e23]; - } - return i20; -} -var reparentChildren; -var init_reparent_children = __esm({ - "../node_modules/@spectrum-web-components/shared/src/reparent-children.js"() { - "use strict"; - reparentChildren = (o29, i20, { position: l15, prepareCallback: e23 } = { position: "beforeend" }) => { - let { length: n18 } = o29; - if (n18 === 0) return () => o29; - let r18 = 1, t17 = 0; - (l15 === "afterbegin" || l15 === "afterend") && (r18 = -1, t17 = n18 - 1); - const a10 = new Array(n18), c21 = new Array(n18), p19 = document.createComment("placeholder for reparented element"); - do { - const d15 = o29[t17]; - e23 && (c21[t17] = e23(d15)), a10[t17] = p19.cloneNode(); - const m10 = d15.parentElement || d15.getRootNode(); - m10 && m10 !== d15 && m10.replaceChild(a10[t17], d15), i20.insertAdjacentElement(l15, d15), t17 += r18; - } while (--n18 > 0); - return function() { - return T2(a10, o29, c21); - }; - }; - } -}); - -// ../node_modules/@spectrum-web-components/shared/src/index.js -var init_src2 = __esm({ - "../node_modules/@spectrum-web-components/shared/src/index.js"() { - "use strict"; - init_first_focusable_in(); - init_focus_visible(); - init_focusable(); - init_focusable_selectors(); - init_get_active_element(); - init_like_anchor(); - init_observe_slot_presence(); - init_observe_slot_text(); - init_platform(); - init_reparent_children(); - init_get_label_from_slot(); - init_random_id(); - } -}); - -// ../node_modules/@spectrum-web-components/overlay/src/slottable-request-event.js -var SlottableRequestEvent, removeSlottableRequest; -var init_slottable_request_event = __esm({ - "../node_modules/@spectrum-web-components/overlay/src/slottable-request-event.js"() { - "use strict"; - SlottableRequestEvent = class extends Event { - constructor(e23, n18, t17) { - super("slottable-request", { bubbles: false, cancelable: true, composed: false }), this.name = e23, this.data = n18, this.slotName = t17 !== void 0 ? `${e23}.${t17}` : e23; - } - }; - removeSlottableRequest = Symbol("remove-slottable-request"); - } -}); - -// ../node_modules/@spectrum-web-components/overlay/src/overlay-timer.js -var OverlayTimer; -var init_overlay_timer = __esm({ - "../node_modules/@spectrum-web-components/overlay/src/overlay-timer.js"() { - "use strict"; - OverlayTimer = class { - constructor(e23 = {}) { - this.warmUpDelay = 1e3; - this.coolDownDelay = 1e3; - this.isWarm = false; - this.timeout = 0; - Object.assign(this, e23); - } - async openTimer(e23) { - if (this.cancelCooldownTimer(), !this.component || e23 !== this.component) return this.component && (this.close(this.component), this.cancelCooldownTimer()), this.component = e23, this.isWarm ? false : (this.promise = new Promise((o29) => { - this.resolve = o29, this.timeout = window.setTimeout(() => { - this.resolve && (this.resolve(false), this.isWarm = true); - }, this.warmUpDelay); - }), this.promise); - if (this.promise) return this.promise; - throw new Error("Inconsistent state"); - } - close(e23) { - this.component && this.component === e23 && (this.resetCooldownTimer(), this.timeout > 0 && (clearTimeout(this.timeout), this.timeout = 0), this.resolve && (this.resolve(true), delete this.resolve), delete this.promise, delete this.component); - } - resetCooldownTimer() { - this.isWarm && (this.cooldownTimeout && window.clearTimeout(this.cooldownTimeout), this.cooldownTimeout = window.setTimeout(() => { - this.isWarm = false, delete this.cooldownTimeout; - }, this.coolDownDelay)); - } - cancelCooldownTimer() { - this.cooldownTimeout && window.clearTimeout(this.cooldownTimeout), delete this.cooldownTimeout; - } - }; - } -}); - -// ../node_modules/@spectrum-web-components/overlay/src/AbstractOverlay.js -function nextFrame() { - return new Promise((i20) => requestAnimationFrame(() => i20())); -} -var overlayTimer, noop, guaranteedAllTransitionend, AbstractOverlay; -var init_AbstractOverlay = __esm({ - "../node_modules/@spectrum-web-components/overlay/src/AbstractOverlay.js"() { - "use strict"; - init_src(); - init_reparent_children(); - init_overlay_timer(); - overlayTimer = new OverlayTimer(); - noop = () => { - }; - guaranteedAllTransitionend = (i20, v3, e23) => { - const r18 = new AbortController(), n18 = /* @__PURE__ */ new Map(), a10 = () => { - r18.abort(), e23(); - }; - let m10, l15; - const t17 = requestAnimationFrame(() => { - m10 = requestAnimationFrame(() => { - l15 = requestAnimationFrame(() => { - a10(); - }); - }); - }), p19 = (o29) => { - o29.target === i20 && (n18.set(o29.propertyName, n18.get(o29.propertyName) - 1), n18.get(o29.propertyName) || n18.delete(o29.propertyName), n18.size === 0 && a10()); - }, d15 = (o29) => { - o29.target === i20 && (n18.has(o29.propertyName) || n18.set(o29.propertyName, 0), n18.set(o29.propertyName, n18.get(o29.propertyName) + 1), cancelAnimationFrame(t17), cancelAnimationFrame(m10), cancelAnimationFrame(l15)); - }; - i20.addEventListener("transitionrun", d15, { signal: r18.signal }), i20.addEventListener("transitionend", p19, { signal: r18.signal }), i20.addEventListener("transitioncancel", p19, { signal: r18.signal }), v3(); - }; - AbstractOverlay = class _AbstractOverlay extends SpectrumElement { - constructor() { - super(...arguments); - this.dispose = noop; - this.offset = 0; - this.willPreventClose = false; - } - async applyFocus(e23, r18) { - } - get delayed() { - return false; - } - set delayed(e23) { - } - get disabled() { - return false; - } - set disabled(e23) { - } - get elementResolver() { - return this._elementResolver; - } - set elementResolver(e23) { - this._elementResolver = e23; - } - async ensureOnDOM(e23) { - } - async makeTransition(e23) { - return null; - } - async manageDelay(e23) { - } - async manageDialogOpen() { - } - async managePopoverOpen() { - } - managePosition() { - } - get open() { - return false; - } - set open(e23) { - } - get placementController() { - return this._placementController; - } - set placementController(e23) { - this._placementController = e23; - } - requestSlottable() { - } - returnFocus() { - } - get state() { - return "closed"; - } - set state(e23) { - } - manuallyKeepOpen() { - } - static update() { - const e23 = new CustomEvent("sp-update-overlays", { bubbles: true, composed: true, cancelable: true }); - document.dispatchEvent(e23); - } - static async open(e23, r18, n18, a10) { - await Promise.resolve().then(() => (init_sp_overlay(), sp_overlay_exports)); - const m10 = arguments.length === 2, l15 = n18 || e23, t17 = new this(); - let p19 = false; - t17.dispose = () => { - t17.addEventListener("sp-closed", () => { - p19 || (d15(), p19 = true), requestAnimationFrame(() => { - t17.remove(); - }); - }), t17.open = false, t17.dispose = noop; - }; - const d15 = reparentChildren([l15], t17, { position: "beforeend", prepareCallback: (s14) => { - const c21 = s14.slot; - return s14.removeAttribute("slot"), () => { - s14.slot = c21; - }; - } }); - if (!m10 && l15 && a10) { - const s14 = e23, c21 = r18, u15 = a10; - return _AbstractOverlay.applyOptions(t17, { ...u15, delayed: u15.delayed || l15.hasAttribute("delayed"), trigger: u15.virtualTrigger || s14, type: c21 === "modal" ? "modal" : c21 === "hover" ? "hint" : "auto" }), s14.insertAdjacentElement("afterend", t17), await t17.updateComplete, t17.open = true, t17.dispose; - } - const y3 = r18; - return t17.append(l15), _AbstractOverlay.applyOptions(t17, { ...y3, delayed: y3.delayed || l15.hasAttribute("delayed") }), t17.updateComplete.then(() => { - t17.open = true; - }), t17; - } - static applyOptions(e23, r18) { - var n18, a10; - e23.delayed = !!r18.delayed, e23.receivesFocus = (n18 = r18.receivesFocus) != null ? n18 : "auto", e23.triggerElement = r18.trigger || null, e23.type = r18.type || "modal", e23.offset = (a10 = r18.offset) != null ? a10 : 0, e23.placement = r18.placement, e23.willPreventClose = !!r18.notImmediatelyClosable; - } - }; - } -}); - -// ../node_modules/@spectrum-web-components/overlay/src/VirtualTrigger.js -var VirtualTrigger; -var init_VirtualTrigger = __esm({ - "../node_modules/@spectrum-web-components/overlay/src/VirtualTrigger.js"() { - "use strict"; - init_AbstractOverlay(); - VirtualTrigger = class { - constructor(t17, i20) { - this.x = 0; - this.y = 0; - this.x = t17, this.y = i20; - } - updateBoundingClientRect(t17, i20) { - this.x = t17, this.y = i20, AbstractOverlay.update(); - } - getBoundingClientRect() { - return { width: 0, height: 0, top: this.y, right: this.x, y: this.y, x: this.x, bottom: this.y, left: this.x, toJSON() { - } }; - } - }; - } -}); - -// ../node_modules/@spectrum-web-components/overlay/src/events.js -var BeforetoggleClosedEvent, BeforetoggleOpenEvent, OverlayStateEvent; -var init_events = __esm({ - "../node_modules/@spectrum-web-components/overlay/src/events.js"() { - "use strict"; - BeforetoggleClosedEvent = class extends Event { - constructor() { - super("beforetoggle", { bubbles: false, composed: false }); - this.currentState = "open"; - this.newState = "closed"; - } - }; - BeforetoggleOpenEvent = class extends Event { - constructor() { - super("beforetoggle", { bubbles: false, composed: false }); - this.currentState = "closed"; - this.newState = "open"; - } - }; - OverlayStateEvent = class extends Event { - constructor(r18, l15, { publish: o29, interaction: s14, reason: n18 }) { - super(r18, { bubbles: o29, composed: o29 }); - this.overlay = l15; - this.detail = { interaction: s14, reason: n18 }; - } - }; - } -}); - -// ../node_modules/@spectrum-web-components/overlay/src/OverlayDialog.js -function OverlayDialog(h12) { - class p19 extends h12 { - async manageDialogOpen() { - const e23 = this.open; - if (await this.managePosition(), this.open !== e23) return; - const i20 = await this.dialogMakeTransition(e23); - this.open === e23 && await this.dialogApplyFocus(e23, i20); - } - async dialogMakeTransition(e23) { - let i20 = null; - const m10 = (t17, s14) => async () => { - if (t17.open = e23, !e23) { - const n18 = () => { - t17.removeEventListener("close", n18), a10(t17, s14); - }; - t17.addEventListener("close", n18); - } - if (s14 > 0) return; - const o29 = e23 ? BeforetoggleOpenEvent : BeforetoggleClosedEvent; - this.dispatchEvent(new o29()), e23 && (t17.matches(userFocusableSelector) && (i20 = t17), i20 = i20 || firstFocusableIn(t17), i20 || t17.querySelectorAll("slot").forEach((r18) => { - i20 || (i20 = firstFocusableSlottedIn(r18)); - }), !(!this.isConnected || this.dialogEl.open) && this.dialogEl.showModal()); - }, a10 = (t17, s14) => () => { - if (this.open !== e23) return; - const o29 = e23 ? "sp-opened" : "sp-closed"; - if (s14 > 0) { - t17.dispatchEvent(new OverlayStateEvent(o29, this, { interaction: this.type, publish: false })); - return; - } - if (!this.isConnected || e23 !== this.open) return; - const n18 = async () => { - const r18 = this.triggerElement instanceof VirtualTrigger; - this.dispatchEvent(new OverlayStateEvent(o29, this, { interaction: this.type, publish: r18 })), t17.dispatchEvent(new OverlayStateEvent(o29, this, { interaction: this.type, publish: false })), this.triggerElement && !r18 && this.triggerElement.dispatchEvent(new OverlayStateEvent(o29, this, { interaction: this.type, publish: true })), this.state = e23 ? "opened" : "closed", this.returnFocus(), await nextFrame(), await nextFrame(), e23 === this.open && e23 === false && this.requestSlottable(); - }; - !e23 && this.dialogEl.open ? (this.dialogEl.addEventListener("close", () => { - n18(); - }, { once: true }), this.dialogEl.close()) : n18(); - }; - return this.elements.forEach((t17, s14) => { - guaranteedAllTransitionend(t17, m10(t17, s14), a10(t17, s14)); - }), i20; - } - async dialogApplyFocus(e23, i20) { - this.applyFocus(e23, i20); - } - } - return p19; -} -var init_OverlayDialog = __esm({ - "../node_modules/@spectrum-web-components/overlay/src/OverlayDialog.js"() { - "use strict"; - init_first_focusable_in(); - init_VirtualTrigger(); - init_AbstractOverlay(); - init_events(); - init_src2(); - } -}); - -// ../node_modules/@spectrum-web-components/overlay/src/OverlayPopover.js -function f5(a10) { - let c21 = false; - try { - c21 = a10.matches(":popover-open"); - } catch (e23) { - } - let p19 = false; - try { - p19 = a10.matches(":open"); - } catch (e23) { - } - return c21 || p19; -} -function OverlayPopover(a10) { - class c21 extends a10 { - async manageDelay(e23) { - if (e23 === false || e23 !== this.open) { - overlayTimer.close(this); - return; - } - this.delayed && await overlayTimer.openTimer(this) && (this.open = !e23); - } - async shouldHidePopover(e23) { - if (e23 && this.open !== e23) return; - const o29 = async ({ newState: i20 } = {}) => { - i20 !== "open" && await this.placementController.resetOverlayPosition(); - }; - if (!f5(this.dialogEl)) { - o29(); - return; - } - this.dialogEl.addEventListener("toggle", o29, { once: true }); - } - async shouldShowPopover(e23) { - let o29 = false; - try { - o29 = this.dialogEl.matches(":popover-open"); - } catch (u15) { - } - let i20 = false; - try { - i20 = this.dialogEl.matches(":open"); - } catch (u15) { - } - e23 && this.open === e23 && !o29 && !i20 && this.isConnected && (this.dialogEl.showPopover(), await this.managePosition()); - } - async ensureOnDOM(e23) { - await nextFrame(), C2 || await this.shouldHidePopover(e23), await this.shouldShowPopover(e23), await nextFrame(); - } - async makeTransition(e23) { - if (this.open !== e23) return null; - let o29 = null; - const i20 = (t17, s14) => () => { - if (t17.open = e23, s14 === 0) { - const r18 = e23 ? BeforetoggleOpenEvent : BeforetoggleClosedEvent; - this.dispatchEvent(new r18()); - } - if (!e23 || (t17.matches(userFocusableSelector) && (o29 = t17), o29 = o29 || firstFocusableIn(t17), o29)) return; - t17.querySelectorAll("slot").forEach((r18) => { - o29 || (o29 = firstFocusableSlottedIn(r18)); - }); - }, u15 = (t17, s14) => async () => { - if (this.open !== e23) return; - const n18 = e23 ? "sp-opened" : "sp-closed"; - if (s14 > 0) { - t17.dispatchEvent(new OverlayStateEvent(n18, this, { interaction: this.type, publish: false })); - return; - } - const r18 = async () => { - if (this.open !== e23) return; - await nextFrame(); - const d15 = this.triggerElement instanceof VirtualTrigger; - this.dispatchEvent(new OverlayStateEvent(n18, this, { interaction: this.type, publish: d15 })), t17.dispatchEvent(new OverlayStateEvent(n18, this, { interaction: this.type, publish: false })), this.triggerElement && !d15 && this.triggerElement.dispatchEvent(new OverlayStateEvent(n18, this, { interaction: this.type, publish: true })), this.state = e23 ? "opened" : "closed", this.returnFocus(), await nextFrame(), await nextFrame(), e23 === this.open && e23 === false && this.requestSlottable(); - }; - if (this.open !== e23) return; - const v3 = f5(this.dialogEl); - e23 !== true && v3 && this.isConnected ? (this.dialogEl.addEventListener("beforetoggle", () => { - r18(); - }, { once: true }), this.dialogEl.hidePopover()) : r18(); - }; - return this.elements.forEach((t17, s14) => { - guaranteedAllTransitionend(t17, i20(t17, s14), u15(t17, s14)); - }), o29; - } - } - return c21; -} -var C2; -var init_OverlayPopover = __esm({ - "../node_modules/@spectrum-web-components/overlay/src/OverlayPopover.js"() { - "use strict"; - init_first_focusable_in(); - init_VirtualTrigger(); - init_AbstractOverlay(); - init_events(); - init_src2(); - C2 = CSS.supports("(overlay: auto)"); - } -}); - -// ../node_modules/@spectrum-web-components/overlay/src/OverlayNoPopover.js -function OverlayNoPopover(a10) { - class m10 extends a10 { - async managePopoverOpen() { - await this.managePosition(); - } - async manageDelay(e23) { - if (e23 === false || e23 !== this.open) { - overlayTimer.close(this); - return; - } - this.delayed && await overlayTimer.openTimer(this) && (this.open = !e23); - } - async ensureOnDOM(e23) { - document.body.offsetHeight; - } - async makeTransition(e23) { - if (this.open !== e23) return null; - let o29 = null; - const h12 = (t17, r18) => () => { - if (e23 !== this.open) return; - if (t17.open = e23, r18 === 0) { - const i20 = e23 ? BeforetoggleOpenEvent : BeforetoggleClosedEvent; - this.dispatchEvent(new i20()); - } - if (e23 !== true || (t17.matches(userFocusableSelector) && (o29 = t17), o29 = o29 || firstFocusableIn(t17), o29)) return; - t17.querySelectorAll("slot").forEach((i20) => { - o29 || (o29 = firstFocusableSlottedIn(i20)); - }); - }, u15 = (t17, r18) => async () => { - if (this.open !== e23) return; - const n18 = e23 ? "sp-opened" : "sp-closed"; - if (t17.dispatchEvent(new OverlayStateEvent(n18, this, { interaction: this.type })), r18 > 0) return; - const i20 = this.triggerElement instanceof VirtualTrigger; - this.dispatchEvent(new OverlayStateEvent(n18, this, { interaction: this.type, publish: i20 })), this.triggerElement && !i20 && this.triggerElement.dispatchEvent(new OverlayStateEvent(n18, this, { interaction: this.type, publish: true })), this.state = e23 ? "opened" : "closed", this.returnFocus(), await nextFrame(), await nextFrame(), e23 === this.open && e23 === false && this.requestSlottable(); - }; - return this.elements.forEach((t17, r18) => { - guaranteedAllTransitionend(t17, h12(t17, r18), u15(t17, r18)); - }), o29; - } - } - return m10; -} -var init_OverlayNoPopover = __esm({ - "../node_modules/@spectrum-web-components/overlay/src/OverlayNoPopover.js"() { - "use strict"; - init_first_focusable_in(); - init_VirtualTrigger(); - init_AbstractOverlay(); - init_events(); - init_src2(); - } -}); - -// ../node_modules/@spectrum-web-components/overlay/src/OverlayStack.js -var c16, h10, overlayStack; -var init_OverlayStack = __esm({ - "../node_modules/@spectrum-web-components/overlay/src/OverlayStack.js"() { - "use strict"; - c16 = "showPopover" in document.createElement("div"); - h10 = class { - constructor() { - this.root = document.body; - this.stack = []; - this.handlePointerdown = (t17) => { - this.pointerdownPath = t17.composedPath(), this.lastOverlay = this.stack.at(-1); - }; - this.handlePointerup = () => { - const t17 = this.pointerdownPath; - if (this.pointerdownPath = void 0, !this.stack.length || !(t17 != null && t17.length)) return; - const e23 = this.stack.length - 1, s14 = this.stack.filter((n18, i20) => !t17.find((a10) => a10 === n18 || a10 === (n18 == null ? void 0 : n18.triggerElement) && (n18 == null ? void 0 : n18.type) === "hint" || i20 === e23 && n18 !== this.lastOverlay && n18.triggerInteraction === "longpress") && !n18.shouldPreventClose() && n18.type !== "manual"); - s14.reverse(), s14.forEach((n18) => { - this.closeOverlay(n18); - let i20 = n18.parentOverlayToForceClose; - for (; i20; ) this.closeOverlay(i20), i20 = i20.parentOverlayToForceClose; - }); - }; - this.handleBeforetoggle = (t17) => { - const { target: e23, newState: s14 } = t17; - s14 !== "open" && this.closeOverlay(e23); - }; - this.handleKeydown = (t17) => { - if (t17.code !== "Escape" || !this.stack.length) return; - const e23 = this.stack.at(-1); - if ((e23 == null ? void 0 : e23.type) === "page") { - t17.preventDefault(); - return; - } - c16 || (e23 == null ? void 0 : e23.type) !== "manual" && e23 && this.closeOverlay(e23); - }; - this.bindEvents(); - } - get document() { - return this.root.ownerDocument || document; - } - bindEvents() { - this.document.addEventListener("pointerdown", this.handlePointerdown), this.document.addEventListener("pointerup", this.handlePointerup), this.document.addEventListener("keydown", this.handleKeydown); - } - closeOverlay(t17) { - const e23 = this.stack.indexOf(t17); - e23 > -1 && this.stack.splice(e23, 1), t17.open = false; - } - overlaysByTriggerElement(t17) { - return this.stack.filter((e23) => e23.triggerElement === t17); - } - add(t17) { - if (this.stack.includes(t17)) { - const e23 = this.stack.indexOf(t17); - e23 > -1 && (this.stack.splice(e23, 1), this.stack.push(t17)); - return; - } - if (t17.type === "auto" || t17.type === "modal" || t17.type === "page") { - const e23 = "sp-overlay-query-path", s14 = new Event(e23, { composed: true, bubbles: true }); - t17.addEventListener(e23, (n18) => { - const i20 = n18.composedPath(); - this.stack.forEach((r18) => { - !i20.find((o29) => o29 === r18) && r18.type !== "manual" && this.closeOverlay(r18); - }); - }, { once: true }), t17.dispatchEvent(s14); - } else if (t17.type === "hint") { - if (this.stack.some((s14) => s14.type !== "manual" && s14.triggerElement && s14.triggerElement === t17.triggerElement)) { - t17.open = false; - return; - } - this.stack.forEach((s14) => { - s14.type === "hint" && this.closeOverlay(s14); - }); - } - requestAnimationFrame(() => { - this.stack.push(t17), t17.addEventListener("beforetoggle", this.handleBeforetoggle, { once: true }); - }); - } - remove(t17) { - this.closeOverlay(t17); - } - }; - overlayStack = new h10(); - } -}); - -// ../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs -function clamp(start, value, end) { - return max(start, min(value, end)); -} -function evaluate(value, param) { - return typeof value === "function" ? value(param) : value; -} -function getSide(placement) { - return placement.split("-")[0]; -} -function getAlignment(placement) { - return placement.split("-")[1]; -} -function getOppositeAxis(axis) { - return axis === "x" ? "y" : "x"; -} -function getAxisLength(axis) { - return axis === "y" ? "height" : "width"; -} -function getSideAxis(placement) { - return ["top", "bottom"].includes(getSide(placement)) ? "y" : "x"; -} -function getAlignmentAxis(placement) { - return getOppositeAxis(getSideAxis(placement)); -} -function getAlignmentSides(placement, rects, rtl) { - if (rtl === void 0) { - rtl = false; - } - const alignment = getAlignment(placement); - const alignmentAxis = getAlignmentAxis(placement); - const length = getAxisLength(alignmentAxis); - let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top"; - if (rects.reference[length] > rects.floating[length]) { - mainAlignmentSide = getOppositePlacement(mainAlignmentSide); - } - return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)]; -} -function getExpandedPlacements(placement) { - const oppositePlacement = getOppositePlacement(placement); - return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)]; -} -function getOppositeAlignmentPlacement(placement) { - return placement.replace(/start|end/g, (alignment) => oppositeAlignmentMap[alignment]); -} -function getSideList(side, isStart, rtl) { - const lr = ["left", "right"]; - const rl = ["right", "left"]; - const tb = ["top", "bottom"]; - const bt = ["bottom", "top"]; - switch (side) { - case "top": - case "bottom": - if (rtl) return isStart ? rl : lr; - return isStart ? lr : rl; - case "left": - case "right": - return isStart ? tb : bt; - default: - return []; - } -} -function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) { - const alignment = getAlignment(placement); - let list = getSideList(getSide(placement), direction === "start", rtl); - if (alignment) { - list = list.map((side) => side + "-" + alignment); - if (flipAlignment) { - list = list.concat(list.map(getOppositeAlignmentPlacement)); - } - } - return list; -} -function getOppositePlacement(placement) { - return placement.replace(/left|right|bottom|top/g, (side) => oppositeSideMap[side]); -} -function expandPaddingObject(padding) { - return { - top: 0, - right: 0, - bottom: 0, - left: 0, - ...padding - }; -} -function getPaddingObject(padding) { - return typeof padding !== "number" ? expandPaddingObject(padding) : { - top: padding, - right: padding, - bottom: padding, - left: padding - }; -} -function rectToClientRect(rect) { - const { - x: x4, - y: y3, - width, - height - } = rect; - return { - width, - height, - top: y3, - left: x4, - right: x4 + width, - bottom: y3 + height, - x: x4, - y: y3 - }; -} -var min, max, round, floor, createCoords, oppositeSideMap, oppositeAlignmentMap; -var init_floating_ui_utils = __esm({ - "../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs"() { - min = Math.min; - max = Math.max; - round = Math.round; - floor = Math.floor; - createCoords = (v3) => ({ - x: v3, - y: v3 - }); - oppositeSideMap = { - left: "right", - right: "left", - bottom: "top", - top: "bottom" - }; - oppositeAlignmentMap = { - start: "end", - end: "start" - }; - } -}); - -// ../node_modules/@floating-ui/core/dist/floating-ui.core.mjs -function computeCoordsFromPlacement(_ref, placement, rtl) { - let { - reference, - floating - } = _ref; - const sideAxis = getSideAxis(placement); - const alignmentAxis = getAlignmentAxis(placement); - const alignLength = getAxisLength(alignmentAxis); - const side = getSide(placement); - const isVertical = sideAxis === "y"; - const commonX = reference.x + reference.width / 2 - floating.width / 2; - const commonY = reference.y + reference.height / 2 - floating.height / 2; - const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2; - let coords; - switch (side) { - case "top": - coords = { - x: commonX, - y: reference.y - floating.height - }; - break; - case "bottom": - coords = { - x: commonX, - y: reference.y + reference.height - }; - break; - case "right": - coords = { - x: reference.x + reference.width, - y: commonY - }; - break; - case "left": - coords = { - x: reference.x - floating.width, - y: commonY - }; - break; - default: - coords = { - x: reference.x, - y: reference.y - }; - } - switch (getAlignment(placement)) { - case "start": - coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1); - break; - case "end": - coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1); - break; - } - return coords; -} -async function detectOverflow(state, options) { - var _await$platform$isEle; - if (options === void 0) { - options = {}; - } - const { - x: x4, - y: y3, - platform: platform2, - rects, - elements, - strategy - } = state; - const { - boundary = "clippingAncestors", - rootBoundary = "viewport", - elementContext = "floating", - altBoundary = false, - padding = 0 - } = evaluate(options, state); - const paddingObject = getPaddingObject(padding); - const altContext = elementContext === "floating" ? "reference" : "floating"; - const element = elements[altBoundary ? altContext : elementContext]; - const clippingClientRect = rectToClientRect(await platform2.getClippingRect({ - element: ((_await$platform$isEle = await (platform2.isElement == null ? void 0 : platform2.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform2.getDocumentElement == null ? void 0 : platform2.getDocumentElement(elements.floating)), - boundary, - rootBoundary, - strategy - })); - const rect = elementContext === "floating" ? { - x: x4, - y: y3, - width: rects.floating.width, - height: rects.floating.height - } : rects.reference; - const offsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(elements.floating)); - const offsetScale = await (platform2.isElement == null ? void 0 : platform2.isElement(offsetParent)) ? await (platform2.getScale == null ? void 0 : platform2.getScale(offsetParent)) || { - x: 1, - y: 1 - } : { - x: 1, - y: 1 - }; - const elementClientRect = rectToClientRect(platform2.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform2.convertOffsetParentRelativeRectToViewportRelativeRect({ - elements, - rect, - offsetParent, - strategy - }) : rect); - return { - top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y, - bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y, - left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x, - right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x - }; -} -async function convertValueToCoords(state, options) { - const { - placement, - platform: platform2, - elements - } = state; - const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating)); - const side = getSide(placement); - const alignment = getAlignment(placement); - const isVertical = getSideAxis(placement) === "y"; - const mainAxisMulti = ["left", "top"].includes(side) ? -1 : 1; - const crossAxisMulti = rtl && isVertical ? -1 : 1; - const rawValue = evaluate(options, state); - let { - mainAxis, - crossAxis, - alignmentAxis - } = typeof rawValue === "number" ? { - mainAxis: rawValue, - crossAxis: 0, - alignmentAxis: null - } : { - mainAxis: 0, - crossAxis: 0, - alignmentAxis: null, - ...rawValue - }; - if (alignment && typeof alignmentAxis === "number") { - crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis; - } - return isVertical ? { - x: crossAxis * crossAxisMulti, - y: mainAxis * mainAxisMulti - } : { - x: mainAxis * mainAxisMulti, - y: crossAxis * crossAxisMulti - }; -} -var computePosition, arrow, flip, offset, shift, size; -var init_floating_ui_core = __esm({ - "../node_modules/@floating-ui/core/dist/floating-ui.core.mjs"() { - init_floating_ui_utils(); - init_floating_ui_utils(); - computePosition = async (reference, floating, config) => { - const { - placement = "bottom", - strategy = "absolute", - middleware = [], - platform: platform2 - } = config; - const validMiddleware = middleware.filter(Boolean); - const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(floating)); - let rects = await platform2.getElementRects({ - reference, - floating, - strategy - }); - let { - x: x4, - y: y3 - } = computeCoordsFromPlacement(rects, placement, rtl); - let statefulPlacement = placement; - let middlewareData = {}; - let resetCount = 0; - for (let i20 = 0; i20 < validMiddleware.length; i20++) { - const { - name, - fn - } = validMiddleware[i20]; - const { - x: nextX, - y: nextY, - data, - reset - } = await fn({ - x: x4, - y: y3, - initialPlacement: placement, - placement: statefulPlacement, - strategy, - middlewareData, - rects, - platform: platform2, - elements: { - reference, - floating - } - }); - x4 = nextX != null ? nextX : x4; - y3 = nextY != null ? nextY : y3; - middlewareData = { - ...middlewareData, - [name]: { - ...middlewareData[name], - ...data - } - }; - if (reset && resetCount <= 50) { - resetCount++; - if (typeof reset === "object") { - if (reset.placement) { - statefulPlacement = reset.placement; - } - if (reset.rects) { - rects = reset.rects === true ? await platform2.getElementRects({ - reference, - floating, - strategy - }) : reset.rects; - } - ({ - x: x4, - y: y3 - } = computeCoordsFromPlacement(rects, statefulPlacement, rtl)); - } - i20 = -1; - } - } - return { - x: x4, - y: y3, - placement: statefulPlacement, - strategy, - middlewareData - }; - }; - arrow = (options) => ({ - name: "arrow", - options, - async fn(state) { - const { - x: x4, - y: y3, - placement, - rects, - platform: platform2, - elements, - middlewareData - } = state; - const { - element, - padding = 0 - } = evaluate(options, state) || {}; - if (element == null) { - return {}; - } - const paddingObject = getPaddingObject(padding); - const coords = { - x: x4, - y: y3 - }; - const axis = getAlignmentAxis(placement); - const length = getAxisLength(axis); - const arrowDimensions = await platform2.getDimensions(element); - const isYAxis = axis === "y"; - const minProp = isYAxis ? "top" : "left"; - const maxProp = isYAxis ? "bottom" : "right"; - const clientProp = isYAxis ? "clientHeight" : "clientWidth"; - const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length]; - const startDiff = coords[axis] - rects.reference[axis]; - const arrowOffsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(element)); - let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0; - if (!clientSize || !await (platform2.isElement == null ? void 0 : platform2.isElement(arrowOffsetParent))) { - clientSize = elements.floating[clientProp] || rects.floating[length]; - } - const centerToReference = endDiff / 2 - startDiff / 2; - const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1; - const minPadding = min(paddingObject[minProp], largestPossiblePadding); - const maxPadding = min(paddingObject[maxProp], largestPossiblePadding); - const min$1 = minPadding; - const max2 = clientSize - arrowDimensions[length] - maxPadding; - const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference; - const offset3 = clamp(min$1, center, max2); - const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset3 && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0; - const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max2 : 0; - return { - [axis]: coords[axis] + alignmentOffset, - data: { - [axis]: offset3, - centerOffset: center - offset3 - alignmentOffset, - ...shouldAddOffset && { - alignmentOffset - } - }, - reset: shouldAddOffset - }; - } - }); - flip = function(options) { - if (options === void 0) { - options = {}; - } - return { - name: "flip", - options, - async fn(state) { - var _middlewareData$arrow, _middlewareData$flip; - const { - placement, - middlewareData, - rects, - initialPlacement, - platform: platform2, - elements - } = state; - const { - mainAxis: checkMainAxis = true, - crossAxis: checkCrossAxis = true, - fallbackPlacements: specifiedFallbackPlacements, - fallbackStrategy = "bestFit", - fallbackAxisSideDirection = "none", - flipAlignment = true, - ...detectOverflowOptions - } = evaluate(options, state); - if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) { - return {}; - } - const side = getSide(placement); - const initialSideAxis = getSideAxis(initialPlacement); - const isBasePlacement = getSide(initialPlacement) === initialPlacement; - const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating)); - const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement)); - const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none"; - if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) { - fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl)); - } - const placements2 = [initialPlacement, ...fallbackPlacements]; - const overflow = await detectOverflow(state, detectOverflowOptions); - const overflows = []; - let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || []; - if (checkMainAxis) { - overflows.push(overflow[side]); - } - if (checkCrossAxis) { - const sides2 = getAlignmentSides(placement, rects, rtl); - overflows.push(overflow[sides2[0]], overflow[sides2[1]]); - } - overflowsData = [...overflowsData, { - placement, - overflows - }]; - if (!overflows.every((side2) => side2 <= 0)) { - var _middlewareData$flip2, _overflowsData$filter; - const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1; - const nextPlacement = placements2[nextIndex]; - if (nextPlacement) { - return { - data: { - index: nextIndex, - overflows: overflowsData - }, - reset: { - placement: nextPlacement - } - }; - } - let resetPlacement = (_overflowsData$filter = overflowsData.filter((d15) => d15.overflows[0] <= 0).sort((a10, b6) => a10.overflows[1] - b6.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement; - if (!resetPlacement) { - switch (fallbackStrategy) { - case "bestFit": { - var _overflowsData$filter2; - const placement2 = (_overflowsData$filter2 = overflowsData.filter((d15) => { - if (hasFallbackAxisSideDirection) { - const currentSideAxis = getSideAxis(d15.placement); - return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal - // reading directions favoring greater width. - currentSideAxis === "y"; - } - return true; - }).map((d15) => [d15.placement, d15.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a10, b6) => a10[1] - b6[1])[0]) == null ? void 0 : _overflowsData$filter2[0]; - if (placement2) { - resetPlacement = placement2; - } - break; - } - case "initialPlacement": - resetPlacement = initialPlacement; - break; - } - } - if (placement !== resetPlacement) { - return { - reset: { - placement: resetPlacement - } - }; - } - } - return {}; - } - }; - }; - offset = function(options) { - if (options === void 0) { - options = 0; - } - return { - name: "offset", - options, - async fn(state) { - var _middlewareData$offse, _middlewareData$arrow; - const { - x: x4, - y: y3, - placement, - middlewareData - } = state; - const diffCoords = await convertValueToCoords(state, options); - if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) { - return {}; - } - return { - x: x4 + diffCoords.x, - y: y3 + diffCoords.y, - data: { - ...diffCoords, - placement - } - }; - } - }; - }; - shift = function(options) { - if (options === void 0) { - options = {}; - } - return { - name: "shift", - options, - async fn(state) { - const { - x: x4, - y: y3, - placement - } = state; - const { - mainAxis: checkMainAxis = true, - crossAxis: checkCrossAxis = false, - limiter = { - fn: (_ref) => { - let { - x: x5, - y: y4 - } = _ref; - return { - x: x5, - y: y4 - }; - } - }, - ...detectOverflowOptions - } = evaluate(options, state); - const coords = { - x: x4, - y: y3 - }; - const overflow = await detectOverflow(state, detectOverflowOptions); - const crossAxis = getSideAxis(getSide(placement)); - const mainAxis = getOppositeAxis(crossAxis); - let mainAxisCoord = coords[mainAxis]; - let crossAxisCoord = coords[crossAxis]; - if (checkMainAxis) { - const minSide = mainAxis === "y" ? "top" : "left"; - const maxSide = mainAxis === "y" ? "bottom" : "right"; - const min2 = mainAxisCoord + overflow[minSide]; - const max2 = mainAxisCoord - overflow[maxSide]; - mainAxisCoord = clamp(min2, mainAxisCoord, max2); - } - if (checkCrossAxis) { - const minSide = crossAxis === "y" ? "top" : "left"; - const maxSide = crossAxis === "y" ? "bottom" : "right"; - const min2 = crossAxisCoord + overflow[minSide]; - const max2 = crossAxisCoord - overflow[maxSide]; - crossAxisCoord = clamp(min2, crossAxisCoord, max2); - } - const limitedCoords = limiter.fn({ - ...state, - [mainAxis]: mainAxisCoord, - [crossAxis]: crossAxisCoord - }); - return { - ...limitedCoords, - data: { - x: limitedCoords.x - x4, - y: limitedCoords.y - y3 - } - }; - } - }; - }; - size = function(options) { - if (options === void 0) { - options = {}; - } - return { - name: "size", - options, - async fn(state) { - const { - placement, - rects, - platform: platform2, - elements - } = state; - const { - apply = () => { - }, - ...detectOverflowOptions - } = evaluate(options, state); - const overflow = await detectOverflow(state, detectOverflowOptions); - const side = getSide(placement); - const alignment = getAlignment(placement); - const isYAxis = getSideAxis(placement) === "y"; - const { - width, - height - } = rects.floating; - let heightSide; - let widthSide; - if (side === "top" || side === "bottom") { - heightSide = side; - widthSide = alignment === (await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating)) ? "start" : "end") ? "left" : "right"; - } else { - widthSide = side; - heightSide = alignment === "end" ? "top" : "bottom"; - } - const maximumClippingHeight = height - overflow.top - overflow.bottom; - const maximumClippingWidth = width - overflow.left - overflow.right; - const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight); - const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth); - const noShift = !state.middlewareData.shift; - let availableHeight = overflowAvailableHeight; - let availableWidth = overflowAvailableWidth; - if (isYAxis) { - availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth; - } else { - availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight; - } - if (noShift && !alignment) { - const xMin = max(overflow.left, 0); - const xMax = max(overflow.right, 0); - const yMin = max(overflow.top, 0); - const yMax = max(overflow.bottom, 0); - if (isYAxis) { - availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right)); - } else { - availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom)); - } - } - await apply({ - ...state, - availableWidth, - availableHeight - }); - const nextDimensions = await platform2.getDimensions(elements.floating); - if (width !== nextDimensions.width || height !== nextDimensions.height) { - return { - reset: { - rects: true - } - }; - } - return {}; - } - }; - }; - } -}); - -// ../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs -function getNodeName(node) { - if (isNode(node)) { - return (node.nodeName || "").toLowerCase(); - } - return "#document"; -} -function getWindow(node) { - var _node$ownerDocument; - return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window; -} -function getDocumentElement(node) { - var _ref; - return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement; -} -function isNode(value) { - return value instanceof Node || value instanceof getWindow(value).Node; -} -function isElement(value) { - return value instanceof Element || value instanceof getWindow(value).Element; -} -function isHTMLElement(value) { - return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement; -} -function isShadowRoot(value) { - if (typeof ShadowRoot === "undefined") { - return false; - } - return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot; -} -function isOverflowElement(element) { - const { - overflow, - overflowX, - overflowY, - display - } = getComputedStyle(element); - return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !["inline", "contents"].includes(display); -} -function isTableElement(element) { - return ["table", "td", "th"].includes(getNodeName(element)); -} -function isTopLayer(element) { - return [":popover-open", ":modal"].some((selector) => { - try { - return element.matches(selector); - } catch (e23) { - return false; - } - }); -} -function isContainingBlock(element) { - const webkit = isWebKit(); - const css = getComputedStyle(element); - 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)); -} -function getContainingBlock(element) { - let currentNode = getParentNode(element); - while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) { - if (isTopLayer(currentNode)) { - return null; - } - if (isContainingBlock(currentNode)) { - return currentNode; - } - currentNode = getParentNode(currentNode); - } - return null; -} -function isWebKit() { - if (typeof CSS === "undefined" || !CSS.supports) return false; - return CSS.supports("-webkit-backdrop-filter", "none"); -} -function isLastTraversableNode(node) { - return ["html", "body", "#document"].includes(getNodeName(node)); -} -function getComputedStyle(element) { - return getWindow(element).getComputedStyle(element); -} -function getNodeScroll(element) { - if (isElement(element)) { - return { - scrollLeft: element.scrollLeft, - scrollTop: element.scrollTop - }; - } - return { - scrollLeft: element.scrollX, - scrollTop: element.scrollY - }; -} -function getParentNode(node) { - if (getNodeName(node) === "html") { - return node; - } - const result = ( - // Step into the shadow DOM of the parent of a slotted node. - node.assignedSlot || // DOM Element detected. - node.parentNode || // ShadowRoot detected. - isShadowRoot(node) && node.host || // Fallback. - getDocumentElement(node) - ); - return isShadowRoot(result) ? result.host : result; -} -function getNearestOverflowAncestor(node) { - const parentNode = getParentNode(node); - if (isLastTraversableNode(parentNode)) { - return node.ownerDocument ? node.ownerDocument.body : node.body; - } - if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) { - return parentNode; - } - return getNearestOverflowAncestor(parentNode); -} -function getOverflowAncestors(node, list, traverseIframes) { - var _node$ownerDocument2; - if (list === void 0) { - list = []; - } - if (traverseIframes === void 0) { - traverseIframes = true; - } - const scrollableAncestor = getNearestOverflowAncestor(node); - const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body); - const win = getWindow(scrollableAncestor); - if (isBody) { - return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []); - } - return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes)); -} -var init_floating_ui_utils_dom = __esm({ - "../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs"() { - } -}); - -// ../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs -function getCssDimensions(element) { - const css = getComputedStyle(element); - let width = parseFloat(css.width) || 0; - let height = parseFloat(css.height) || 0; - const hasOffset = isHTMLElement(element); - const offsetWidth = hasOffset ? element.offsetWidth : width; - const offsetHeight = hasOffset ? element.offsetHeight : height; - const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight; - if (shouldFallback) { - width = offsetWidth; - height = offsetHeight; - } - return { - width, - height, - $: shouldFallback - }; -} -function unwrapElement(element) { - return !isElement(element) ? element.contextElement : element; -} -function getScale(element) { - const domElement = unwrapElement(element); - if (!isHTMLElement(domElement)) { - return createCoords(1); - } - const rect = domElement.getBoundingClientRect(); - const { - width, - height, - $: $2 - } = getCssDimensions(domElement); - let x4 = ($2 ? round(rect.width) : rect.width) / width; - let y3 = ($2 ? round(rect.height) : rect.height) / height; - if (!x4 || !Number.isFinite(x4)) { - x4 = 1; - } - if (!y3 || !Number.isFinite(y3)) { - y3 = 1; - } - return { - x: x4, - y: y3 - }; -} -function getVisualOffsets(element) { - const win = getWindow(element); - if (!isWebKit() || !win.visualViewport) { - return noOffsets; - } - return { - x: win.visualViewport.offsetLeft, - y: win.visualViewport.offsetTop - }; -} -function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) { - if (isFixed === void 0) { - isFixed = false; - } - if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) { - return false; - } - return isFixed; -} -function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) { - if (includeScale === void 0) { - includeScale = false; - } - if (isFixedStrategy === void 0) { - isFixedStrategy = false; - } - const clientRect = element.getBoundingClientRect(); - const domElement = unwrapElement(element); - let scale = createCoords(1); - if (includeScale) { - if (offsetParent) { - if (isElement(offsetParent)) { - scale = getScale(offsetParent); - } - } else { - scale = getScale(element); - } - } - const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0); - let x4 = (clientRect.left + visualOffsets.x) / scale.x; - let y3 = (clientRect.top + visualOffsets.y) / scale.y; - let width = clientRect.width / scale.x; - let height = clientRect.height / scale.y; - if (domElement) { - const win = getWindow(domElement); - const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent; - let currentWin = win; - let currentIFrame = currentWin.frameElement; - while (currentIFrame && offsetParent && offsetWin !== currentWin) { - const iframeScale = getScale(currentIFrame); - const iframeRect = currentIFrame.getBoundingClientRect(); - const css = getComputedStyle(currentIFrame); - const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x; - const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y; - x4 *= iframeScale.x; - y3 *= iframeScale.y; - width *= iframeScale.x; - height *= iframeScale.y; - x4 += left; - y3 += top; - currentWin = getWindow(currentIFrame); - currentIFrame = currentWin.frameElement; - } - } - return rectToClientRect({ - width, - height, - x: x4, - y: y3 - }); -} -function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) { - let { - elements, - rect, - offsetParent, - strategy - } = _ref; - const isFixed = strategy === "fixed"; - const documentElement = getDocumentElement(offsetParent); - const topLayer = elements ? isTopLayer(elements.floating) : false; - if (offsetParent === documentElement || topLayer && isFixed) { - return rect; - } - let scroll = { - scrollLeft: 0, - scrollTop: 0 - }; - let scale = createCoords(1); - const offsets = createCoords(0); - const isOffsetParentAnElement = isHTMLElement(offsetParent); - if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { - if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) { - scroll = getNodeScroll(offsetParent); - } - if (isHTMLElement(offsetParent)) { - const offsetRect = getBoundingClientRect(offsetParent); - scale = getScale(offsetParent); - offsets.x = offsetRect.x + offsetParent.clientLeft; - offsets.y = offsetRect.y + offsetParent.clientTop; - } - } - return { - width: rect.width * scale.x, - height: rect.height * scale.y, - x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x, - y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y - }; -} -function getClientRects(element) { - return Array.from(element.getClientRects()); -} -function getWindowScrollBarX(element) { - return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft; -} -function getDocumentRect(element) { - const html = getDocumentElement(element); - const scroll = getNodeScroll(element); - const body = element.ownerDocument.body; - const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth); - const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight); - let x4 = -scroll.scrollLeft + getWindowScrollBarX(element); - const y3 = -scroll.scrollTop; - if (getComputedStyle(body).direction === "rtl") { - x4 += max(html.clientWidth, body.clientWidth) - width; - } - return { - width, - height, - x: x4, - y: y3 - }; -} -function getViewportRect(element, strategy) { - const win = getWindow(element); - const html = getDocumentElement(element); - const visualViewport = win.visualViewport; - let width = html.clientWidth; - let height = html.clientHeight; - let x4 = 0; - let y3 = 0; - if (visualViewport) { - width = visualViewport.width; - height = visualViewport.height; - const visualViewportBased = isWebKit(); - if (!visualViewportBased || visualViewportBased && strategy === "fixed") { - x4 = visualViewport.offsetLeft; - y3 = visualViewport.offsetTop; - } - } - return { - width, - height, - x: x4, - y: y3 - }; -} -function getInnerBoundingClientRect(element, strategy) { - const clientRect = getBoundingClientRect(element, true, strategy === "fixed"); - const top = clientRect.top + element.clientTop; - const left = clientRect.left + element.clientLeft; - const scale = isHTMLElement(element) ? getScale(element) : createCoords(1); - const width = element.clientWidth * scale.x; - const height = element.clientHeight * scale.y; - const x4 = left * scale.x; - const y3 = top * scale.y; - return { - width, - height, - x: x4, - y: y3 - }; -} -function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) { - let rect; - if (clippingAncestor === "viewport") { - rect = getViewportRect(element, strategy); - } else if (clippingAncestor === "document") { - rect = getDocumentRect(getDocumentElement(element)); - } else if (isElement(clippingAncestor)) { - rect = getInnerBoundingClientRect(clippingAncestor, strategy); - } else { - const visualOffsets = getVisualOffsets(element); - rect = { - ...clippingAncestor, - x: clippingAncestor.x - visualOffsets.x, - y: clippingAncestor.y - visualOffsets.y - }; - } - return rectToClientRect(rect); -} -function hasFixedPositionAncestor(element, stopNode) { - const parentNode = getParentNode(element); - if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) { - return false; - } - return getComputedStyle(parentNode).position === "fixed" || hasFixedPositionAncestor(parentNode, stopNode); -} -function getClippingElementAncestors(element, cache) { - const cachedResult = cache.get(element); - if (cachedResult) { - return cachedResult; - } - let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body"); - let currentContainingBlockComputedStyle = null; - const elementIsFixed = getComputedStyle(element).position === "fixed"; - let currentNode = elementIsFixed ? getParentNode(element) : element; - while (isElement(currentNode) && !isLastTraversableNode(currentNode)) { - const computedStyle = getComputedStyle(currentNode); - const currentNodeIsContaining = isContainingBlock(currentNode); - if (!currentNodeIsContaining && computedStyle.position === "fixed") { - currentContainingBlockComputedStyle = null; - } - const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && ["absolute", "fixed"].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode); - if (shouldDropCurrentNode) { - result = result.filter((ancestor) => ancestor !== currentNode); - } else { - currentContainingBlockComputedStyle = computedStyle; - } - currentNode = getParentNode(currentNode); - } - cache.set(element, result); - return result; -} -function getClippingRect(_ref) { - let { - element, - boundary, - rootBoundary, - strategy - } = _ref; - const elementClippingAncestors = boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary); - const clippingAncestors = [...elementClippingAncestors, rootBoundary]; - const firstClippingAncestor = clippingAncestors[0]; - const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => { - const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy); - accRect.top = max(rect.top, accRect.top); - accRect.right = min(rect.right, accRect.right); - accRect.bottom = min(rect.bottom, accRect.bottom); - accRect.left = max(rect.left, accRect.left); - return accRect; - }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy)); - return { - width: clippingRect.right - clippingRect.left, - height: clippingRect.bottom - clippingRect.top, - x: clippingRect.left, - y: clippingRect.top - }; -} -function getDimensions(element) { - const { - width, - height - } = getCssDimensions(element); - return { - width, - height - }; -} -function getRectRelativeToOffsetParent(element, offsetParent, strategy) { - const isOffsetParentAnElement = isHTMLElement(offsetParent); - const documentElement = getDocumentElement(offsetParent); - const isFixed = strategy === "fixed"; - const rect = getBoundingClientRect(element, true, isFixed, offsetParent); - let scroll = { - scrollLeft: 0, - scrollTop: 0 - }; - const offsets = createCoords(0); - if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { - if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) { - scroll = getNodeScroll(offsetParent); - } - if (isOffsetParentAnElement) { - const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent); - offsets.x = offsetRect.x + offsetParent.clientLeft; - offsets.y = offsetRect.y + offsetParent.clientTop; - } else if (documentElement) { - offsets.x = getWindowScrollBarX(documentElement); - } - } - const x4 = rect.left + scroll.scrollLeft - offsets.x; - const y3 = rect.top + scroll.scrollTop - offsets.y; - return { - x: x4, - y: y3, - width: rect.width, - height: rect.height - }; -} -function isStaticPositioned(element) { - return getComputedStyle(element).position === "static"; -} -function getTrueOffsetParent(element, polyfill) { - if (!isHTMLElement(element) || getComputedStyle(element).position === "fixed") { - return null; - } - if (polyfill) { - return polyfill(element); - } - return element.offsetParent; -} -function getOffsetParent(element, polyfill) { - const win = getWindow(element); - if (isTopLayer(element)) { - return win; - } - if (!isHTMLElement(element)) { - let svgOffsetParent = getParentNode(element); - while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) { - if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) { - return svgOffsetParent; - } - svgOffsetParent = getParentNode(svgOffsetParent); - } - return win; - } - let offsetParent = getTrueOffsetParent(element, polyfill); - while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) { - offsetParent = getTrueOffsetParent(offsetParent, polyfill); - } - if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) { - return win; - } - return offsetParent || getContainingBlock(element) || win; -} -function isRTL(element) { - return getComputedStyle(element).direction === "rtl"; -} -function observeMove(element, onMove) { - let io = null; - let timeoutId; - const root = getDocumentElement(element); - function cleanup() { - var _io; - clearTimeout(timeoutId); - (_io = io) == null || _io.disconnect(); - io = null; - } - function refresh(skip, threshold) { - if (skip === void 0) { - skip = false; - } - if (threshold === void 0) { - threshold = 1; - } - cleanup(); - const { - left, - top, - width, - height - } = element.getBoundingClientRect(); - if (!skip) { - onMove(); - } - if (!width || !height) { - return; - } - const insetTop = floor(top); - const insetRight = floor(root.clientWidth - (left + width)); - const insetBottom = floor(root.clientHeight - (top + height)); - const insetLeft = floor(left); - const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px"; - const options = { - rootMargin, - threshold: max(0, min(1, threshold)) || 1 - }; - let isFirstUpdate = true; - function handleObserve(entries) { - const ratio = entries[0].intersectionRatio; - if (ratio !== threshold) { - if (!isFirstUpdate) { - return refresh(); - } - if (!ratio) { - timeoutId = setTimeout(() => { - refresh(false, 1e-7); - }, 1e3); - } else { - refresh(false, ratio); - } - } - isFirstUpdate = false; - } - try { - io = new IntersectionObserver(handleObserve, { - ...options, - // Handle