@jumio/websdk
Version:
Jumio WebSDK is a powerful, flexible software development kit that simplifies the integration of Jumio's services into your web applications.
1,553 lines • 2.65 MB
JavaScript
var o3 = (e) => {
throw TypeError(e);
};
var hk = (e, t, r) => t.has(e) || o3("Cannot " + r);
var Ie = (e, t, r) => (hk(e, t, "read from private field"), r ? r.call(e) : t.get(e)), st = (e, t, r) => t.has(e) ? o3("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), at = (e, t, r, n) => (hk(e, t, "write to private field"), n ? n.call(e, r) : t.set(e, r), r), gr = (e, t, r) => (hk(e, t, "access private method"), r);
const wE = globalThis, zM = wE.ShadowRoot && (wE.ShadyCSS === void 0 || wE.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, qM = /* @__PURE__ */ Symbol(), a3 = /* @__PURE__ */ new WeakMap();
let iO = class {
constructor(t, r, n) {
if (this._$cssResult$ = !0, n !== qM) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
this.cssText = t, this.t = r;
}
get styleSheet() {
let t = this.o;
const r = this.t;
if (zM && t === void 0) {
const n = r !== void 0 && r.length === 1;
n && (t = a3.get(r)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), n && a3.set(r, t));
}
return t;
}
toString() {
return this.cssText;
}
};
const Vr = (e) => new iO(typeof e == "string" ? e : e + "", void 0, qM), ne = (e, ...t) => {
const r = e.length === 1 ? e[0] : t.reduce(((n, i, o) => n + ((a) => {
if (a._$cssResult$ === !0) return a.cssText;
if (typeof a == "number") return a;
throw Error("Value passed to 'css' function must be a 'css' function result: " + a + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
})(i) + e[o + 1]), e[0]);
return new iO(r, e, qM);
}, Cde = (e, t) => {
if (zM) e.adoptedStyleSheets = t.map(((r) => r instanceof CSSStyleSheet ? r : r.styleSheet));
else for (const r of t) {
const n = document.createElement("style"), i = wE.litNonce;
i !== void 0 && n.setAttribute("nonce", i), n.textContent = r.cssText, e.appendChild(n);
}
}, s3 = zM ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
let r = "";
for (const n of t.cssRules) r += n.cssText;
return Vr(r);
})(e) : e;
const { is: fde, defineProperty: mde, getOwnPropertyDescriptor: Bde, getOwnPropertyNames: Qde, getOwnPropertySymbols: Sde, getPrototypeOf: Ede } = Object, Iw = globalThis, l3 = Iw.trustedTypes, bde = l3 ? l3.emptyScript : "", yde = Iw.reactiveElementPolyfillSupport, am = (e, t) => e, Ky = { toAttribute(e, t) {
switch (t) {
case Boolean:
e = e ? bde : null;
break;
case Object:
case Array:
e = e == null ? e : JSON.stringify(e);
}
return e;
}, fromAttribute(e, t) {
let r = e;
switch (t) {
case Boolean:
r = e !== null;
break;
case Number:
r = e === null ? null : Number(e);
break;
case Object:
case Array:
try {
r = JSON.parse(e);
} catch {
r = null;
}
}
return r;
} }, eT = (e, t) => !fde(e, t), c3 = { attribute: !0, type: String, converter: Ky, reflect: !1, useDefault: !1, hasChanged: eT };
Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), Iw.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
let gI = class extends HTMLElement {
static addInitializer(t) {
this._$Ei(), (this.l ??= []).push(t);
}
static get observedAttributes() {
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
}
static createProperty(t, r = c3) {
if (r.state && (r.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((r = Object.create(r)).wrapped = !0), this.elementProperties.set(t, r), !r.noAccessor) {
const n = /* @__PURE__ */ Symbol(), i = this.getPropertyDescriptor(t, n, r);
i !== void 0 && mde(this.prototype, t, i);
}
}
static getPropertyDescriptor(t, r, n) {
const { get: i, set: o } = Bde(this.prototype, t) ?? { get() {
return this[r];
}, set(a) {
this[r] = a;
} };
return { get: i, set(a) {
const s = i?.call(this);
o?.call(this, a), this.requestUpdate(t, s, n);
}, configurable: !0, enumerable: !0 };
}
static getPropertyOptions(t) {
return this.elementProperties.get(t) ?? c3;
}
static _$Ei() {
if (this.hasOwnProperty(am("elementProperties"))) return;
const t = Ede(this);
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
}
static finalize() {
if (this.hasOwnProperty(am("finalized"))) return;
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(am("properties"))) {
const r = this.properties, n = [...Qde(r), ...Sde(r)];
for (const i of n) this.createProperty(i, r[i]);
}
const t = this[Symbol.metadata];
if (t !== null) {
const r = litPropertyMetadata.get(t);
if (r !== void 0) for (const [n, i] of r) this.elementProperties.set(n, i);
}
this._$Eh = /* @__PURE__ */ new Map();
for (const [r, n] of this.elementProperties) {
const i = this._$Eu(r, n);
i !== void 0 && this._$Eh.set(i, r);
}
this.elementStyles = this.finalizeStyles(this.styles);
}
static finalizeStyles(t) {
const r = [];
if (Array.isArray(t)) {
const n = new Set(t.flat(1 / 0).reverse());
for (const i of n) r.unshift(s3(i));
} else t !== void 0 && r.push(s3(t));
return r;
}
static _$Eu(t, r) {
const n = r.attribute;
return n === !1 ? void 0 : typeof n == "string" ? n : typeof t == "string" ? t.toLowerCase() : void 0;
}
constructor() {
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
}
_$Ev() {
this._$ES = new Promise(((t) => this.enableUpdating = t)), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(((t) => t(this)));
}
addController(t) {
(this._$EO ??= /* @__PURE__ */ new Set()).add(t), this.renderRoot !== void 0 && this.isConnected && t.hostConnected?.();
}
removeController(t) {
this._$EO?.delete(t);
}
_$E_() {
const t = /* @__PURE__ */ new Map(), r = this.constructor.elementProperties;
for (const n of r.keys()) this.hasOwnProperty(n) && (t.set(n, this[n]), delete this[n]);
t.size > 0 && (this._$Ep = t);
}
createRenderRoot() {
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
return Cde(t, this.constructor.elementStyles), t;
}
connectedCallback() {
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(((t) => t.hostConnected?.()));
}
enableUpdating(t) {
}
disconnectedCallback() {
this._$EO?.forEach(((t) => t.hostDisconnected?.()));
}
attributeChangedCallback(t, r, n) {
this._$AK(t, n);
}
_$ET(t, r) {
const n = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, n);
if (i !== void 0 && n.reflect === !0) {
const o = (n.converter?.toAttribute !== void 0 ? n.converter : Ky).toAttribute(r, n.type);
this._$Em = t, o == null ? this.removeAttribute(i) : this.setAttribute(i, o), this._$Em = null;
}
}
_$AK(t, r) {
const n = this.constructor, i = n._$Eh.get(t);
if (i !== void 0 && this._$Em !== i) {
const o = n.getPropertyOptions(i), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : Ky;
this._$Em = i;
const s = a.fromAttribute(r, o.type);
this[i] = s ?? this._$Ej?.get(i) ?? s, this._$Em = null;
}
}
requestUpdate(t, r, n) {
if (t !== void 0) {
const i = this.constructor, o = this[t];
if (n ??= i.getPropertyOptions(t), !((n.hasChanged ?? eT)(o, r) || n.useDefault && n.reflect && o === this._$Ej?.get(t) && !this.hasAttribute(i._$Eu(t, n)))) return;
this.C(t, r, n);
}
this.isUpdatePending === !1 && (this._$ES = this._$EP());
}
C(t, r, { useDefault: n, reflect: i, wrapped: o }, a) {
n && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, a ?? r ?? this[t]), o !== !0 || a !== void 0) || (this._$AL.has(t) || (this.hasUpdated || n || (r = void 0), this._$AL.set(t, r)), i === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
}
async _$EP() {
this.isUpdatePending = !0;
try {
await this._$ES;
} catch (r) {
Promise.reject(r);
}
const t = this.scheduleUpdate();
return t != null && await t, !this.isUpdatePending;
}
scheduleUpdate() {
return this.performUpdate();
}
performUpdate() {
if (!this.isUpdatePending) return;
if (!this.hasUpdated) {
if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
for (const [i, o] of this._$Ep) this[i] = o;
this._$Ep = void 0;
}
const n = this.constructor.elementProperties;
if (n.size > 0) for (const [i, o] of n) {
const { wrapped: a } = o, s = this[i];
a !== !0 || this._$AL.has(i) || s === void 0 || this.C(i, void 0, o, s);
}
}
let t = !1;
const r = this._$AL;
try {
t = this.shouldUpdate(r), t ? (this.willUpdate(r), this._$EO?.forEach(((n) => n.hostUpdate?.())), this.update(r)) : this._$EM();
} catch (n) {
throw t = !1, this._$EM(), n;
}
t && this._$AE(r);
}
willUpdate(t) {
}
_$AE(t) {
this._$EO?.forEach(((r) => r.hostUpdated?.())), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
}
_$EM() {
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
}
get updateComplete() {
return this.getUpdateComplete();
}
getUpdateComplete() {
return this._$ES;
}
shouldUpdate(t) {
return !0;
}
update(t) {
this._$Eq &&= this._$Eq.forEach(((r) => this._$ET(r, this[r]))), this._$EM();
}
updated(t) {
}
firstUpdated(t) {
}
};
gI.elementStyles = [], gI.shadowRootOptions = { mode: "open" }, gI[am("elementProperties")] = /* @__PURE__ */ new Map(), gI[am("finalized")] = /* @__PURE__ */ new Map(), yde?.({ ReactiveElement: gI }), (Iw.reactiveElementVersions ??= []).push("2.1.1");
const tT = globalThis, Oy = tT.trustedTypes, A3 = Oy ? Oy.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, oO = "$lit$", ld = `lit$${Math.random().toFixed(9).slice(2)}$`, aO = "?" + ld, vde = `<${aO}>`, Zu = document, Dm = () => Zu.createComment(""), Rm = (e) => e === null || typeof e != "object" && typeof e != "function", rT = Array.isArray, wde = (e) => rT(e) || typeof e?.[Symbol.iterator] == "function", Ik = `[
\f\r]`, B0 = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, d3 = /-->/g, g3 = />/g, wg = RegExp(`>|${Ik}(?:([^\\s"'>=/]+)(${Ik}*=${Ik}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`, "g"), u3 = /'/g, h3 = /"/g, sO = /^(?:script|style|textarea|title)$/i, lO = (e) => (t, ...r) => ({ _$litType$: e, strings: t, values: r }), f = lO(1), iQ = lO(2), js = /* @__PURE__ */ Symbol.for("lit-noChange"), oe = /* @__PURE__ */ Symbol.for("lit-nothing"), I3 = /* @__PURE__ */ new WeakMap(), cu = Zu.createTreeWalker(Zu, 129);
function cO(e, t) {
if (!rT(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
return A3 !== void 0 ? A3.createHTML(t) : t;
}
const Ude = (e, t) => {
const r = e.length - 1, n = [];
let i, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", a = B0;
for (let s = 0; s < r; s++) {
const l = e[s];
let c, A, d = -1, g = 0;
for (; g < l.length && (a.lastIndex = g, A = a.exec(l), A !== null); ) g = a.lastIndex, a === B0 ? A[1] === "!--" ? a = d3 : A[1] !== void 0 ? a = g3 : A[2] !== void 0 ? (sO.test(A[2]) && (i = RegExp("</" + A[2], "g")), a = wg) : A[3] !== void 0 && (a = wg) : a === wg ? A[0] === ">" ? (a = i ?? B0, d = -1) : A[1] === void 0 ? d = -2 : (d = a.lastIndex - A[2].length, c = A[1], a = A[3] === void 0 ? wg : A[3] === '"' ? h3 : u3) : a === h3 || a === u3 ? a = wg : a === d3 || a === g3 ? a = B0 : (a = wg, i = void 0);
const u = a === wg && e[s + 1].startsWith("/>") ? " " : "";
o += a === B0 ? l + vde : d >= 0 ? (n.push(c), l.slice(0, d) + oO + l.slice(d) + ld + u) : l + ld + (d === -2 ? s : u);
}
return [cO(e, o + (e[r] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), n];
};
let HN = class AO {
constructor({ strings: t, _$litType$: r }, n) {
let i;
this.parts = [];
let o = 0, a = 0;
const s = t.length - 1, l = this.parts, [c, A] = Ude(t, r);
if (this.el = AO.createElement(c, n), cu.currentNode = this.el.content, r === 2 || r === 3) {
const d = this.el.content.firstChild;
d.replaceWith(...d.childNodes);
}
for (; (i = cu.nextNode()) !== null && l.length < s; ) {
if (i.nodeType === 1) {
if (i.hasAttributes()) for (const d of i.getAttributeNames()) if (d.endsWith(oO)) {
const g = A[a++], u = i.getAttribute(d).split(ld), C = /([.?@])?(.*)/.exec(g);
l.push({ type: 1, index: o, name: C[2], strings: u, ctor: C[1] === "." ? Fde : C[1] === "?" ? Nde : C[1] === "@" ? Dde : Cw }), i.removeAttribute(d);
} else d.startsWith(ld) && (l.push({ type: 6, index: o }), i.removeAttribute(d));
if (sO.test(i.tagName)) {
const d = i.textContent.split(ld), g = d.length - 1;
if (g > 0) {
i.textContent = Oy ? Oy.emptyScript : "";
for (let u = 0; u < g; u++) i.append(d[u], Dm()), cu.nextNode(), l.push({ type: 2, index: ++o });
i.append(d[g], Dm());
}
}
} else if (i.nodeType === 8) if (i.data === aO) l.push({ type: 2, index: o });
else {
let d = -1;
for (; (d = i.data.indexOf(ld, d + 1)) !== -1; ) l.push({ type: 7, index: o }), d += ld.length - 1;
}
o++;
}
}
static createElement(t, r) {
const n = Zu.createElement("template");
return n.innerHTML = t, n;
}
};
function Fp(e, t, r = e, n) {
if (t === js) return t;
let i = n !== void 0 ? r._$Co?.[n] : r._$Cl;
const o = Rm(t) ? void 0 : t._$litDirective$;
return i?.constructor !== o && (i?._$AO?.(!1), o === void 0 ? i = void 0 : (i = new o(e), i._$AT(e, r, n)), n !== void 0 ? (r._$Co ??= [])[n] = i : r._$Cl = i), i !== void 0 && (t = Fp(e, i._$AS(e, t.values), i, n)), t;
}
let kde = class {
constructor(t, r) {
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = r;
}
get parentNode() {
return this._$AM.parentNode;
}
get _$AU() {
return this._$AM._$AU;
}
u(t) {
const { el: { content: r }, parts: n } = this._$AD, i = (t?.creationScope ?? Zu).importNode(r, !0);
cu.currentNode = i;
let o = cu.nextNode(), a = 0, s = 0, l = n[0];
for (; l !== void 0; ) {
if (a === l.index) {
let c;
l.type === 2 ? c = new pw(o, o.nextSibling, this, t) : l.type === 1 ? c = new l.ctor(o, l.name, l.strings, this, t) : l.type === 6 && (c = new Rde(o, this, t)), this._$AV.push(c), l = n[++s];
}
a !== l?.index && (o = cu.nextNode(), a++);
}
return cu.currentNode = Zu, i;
}
p(t) {
let r = 0;
for (const n of this._$AV) n !== void 0 && (n.strings !== void 0 ? (n._$AI(t, n, r), r += n.strings.length - 2) : n._$AI(t[r])), r++;
}
}, pw = class dO {
get _$AU() {
return this._$AM?._$AU ?? this._$Cv;
}
constructor(t, r, n, i) {
this.type = 2, this._$AH = oe, this._$AN = void 0, this._$AA = t, this._$AB = r, this._$AM = n, this.options = i, this._$Cv = i?.isConnected ?? !0;
}
get parentNode() {
let t = this._$AA.parentNode;
const r = this._$AM;
return r !== void 0 && t?.nodeType === 11 && (t = r.parentNode), t;
}
get startNode() {
return this._$AA;
}
get endNode() {
return this._$AB;
}
_$AI(t, r = this) {
t = Fp(this, t, r), Rm(t) ? t === oe || t == null || t === "" ? (this._$AH !== oe && this._$AR(), this._$AH = oe) : t !== this._$AH && t !== js && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : wde(t) ? this.k(t) : this._(t);
}
O(t) {
return this._$AA.parentNode.insertBefore(t, this._$AB);
}
T(t) {
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
}
_(t) {
this._$AH !== oe && Rm(this._$AH) ? this._$AA.nextSibling.data = t : this.T(Zu.createTextNode(t)), this._$AH = t;
}
$(t) {
const { values: r, _$litType$: n } = t, i = typeof n == "number" ? this._$AC(t) : (n.el === void 0 && (n.el = HN.createElement(cO(n.h, n.h[0]), this.options)), n);
if (this._$AH?._$AD === i) this._$AH.p(r);
else {
const o = new kde(i, this), a = o.u(this.options);
o.p(r), this.T(a), this._$AH = o;
}
}
_$AC(t) {
let r = I3.get(t.strings);
return r === void 0 && I3.set(t.strings, r = new HN(t)), r;
}
k(t) {
rT(this._$AH) || (this._$AH = [], this._$AR());
const r = this._$AH;
let n, i = 0;
for (const o of t) i === r.length ? r.push(n = new dO(this.O(Dm()), this.O(Dm()), this, this.options)) : n = r[i], n._$AI(o), i++;
i < r.length && (this._$AR(n && n._$AB.nextSibling, i), r.length = i);
}
_$AR(t = this._$AA.nextSibling, r) {
for (this._$AP?.(!1, !0, r); t !== this._$AB; ) {
const n = t.nextSibling;
t.remove(), t = n;
}
}
setConnected(t) {
this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t));
}
}, Cw = class {
get tagName() {
return this.element.tagName;
}
get _$AU() {
return this._$AM._$AU;
}
constructor(t, r, n, i, o) {
this.type = 1, this._$AH = oe, this._$AN = void 0, this.element = t, this.name = r, this._$AM = i, this.options = o, n.length > 2 || n[0] !== "" || n[1] !== "" ? (this._$AH = Array(n.length - 1).fill(new String()), this.strings = n) : this._$AH = oe;
}
_$AI(t, r = this, n, i) {
const o = this.strings;
let a = !1;
if (o === void 0) t = Fp(this, t, r, 0), a = !Rm(t) || t !== this._$AH && t !== js, a && (this._$AH = t);
else {
const s = t;
let l, c;
for (t = o[0], l = 0; l < o.length - 1; l++) c = Fp(this, s[n + l], r, l), c === js && (c = this._$AH[l]), a ||= !Rm(c) || c !== this._$AH[l], c === oe ? t = oe : t !== oe && (t += (c ?? "") + o[l + 1]), this._$AH[l] = c;
}
a && !i && this.j(t);
}
j(t) {
t === oe ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
}
}, Fde = class extends Cw {
constructor() {
super(...arguments), this.type = 3;
}
j(t) {
this.element[this.name] = t === oe ? void 0 : t;
}
}, Nde = class extends Cw {
constructor() {
super(...arguments), this.type = 4;
}
j(t) {
this.element.toggleAttribute(this.name, !!t && t !== oe);
}
}, Dde = class extends Cw {
constructor(t, r, n, i, o) {
super(t, r, n, i, o), this.type = 5;
}
_$AI(t, r = this) {
if ((t = Fp(this, t, r, 0) ?? oe) === js) return;
const n = this._$AH, i = t === oe && n !== oe || t.capture !== n.capture || t.once !== n.once || t.passive !== n.passive, o = t !== oe && (n === oe || i);
i && this.element.removeEventListener(this.name, this, n), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
}
handleEvent(t) {
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
}
}, Rde = class {
constructor(t, r, n) {
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = r, this.options = n;
}
get _$AU() {
return this._$AM._$AU;
}
_$AI(t) {
Fp(this, t);
}
};
const Zde = { I: pw }, Wde = tT.litHtmlPolyfillSupport;
Wde?.(HN, pw), (tT.litHtmlVersions ??= []).push("3.3.1");
const Mde = (e, t, r) => {
const n = r?.renderBefore ?? t;
let i = n._$litPart$;
if (i === void 0) {
const o = r?.renderBefore ?? null;
n._$litPart$ = i = new pw(t.insertBefore(Dm(), o), o, void 0, r ?? {});
}
return i._$AI(e), i;
};
const nT = globalThis;
let ko = class extends gI {
constructor() {
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
}
createRenderRoot() {
const t = super.createRenderRoot();
return this.renderOptions.renderBefore ??= t.firstChild, t;
}
update(t) {
const r = this.render();
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Mde(r, this.renderRoot, this.renderOptions);
}
connectedCallback() {
super.connectedCallback(), this._$Do?.setConnected(!0);
}
disconnectedCallback() {
super.disconnectedCallback(), this._$Do?.setConnected(!1);
}
render() {
return js;
}
};
ko._$litElement$ = !0, ko.finalized = !0, nT.litElementHydrateSupport?.({ LitElement: ko });
const Tde = nT.litElementPolyfillSupport;
Tde?.({ LitElement: ko });
(nT.litElementVersions ??= []).push("4.2.1");
const K = (e) => (t, r) => {
r !== void 0 ? r.addInitializer((() => {
customElements.define(e, t);
})) : customElements.define(e, t);
};
const Jde = { attribute: !0, type: String, converter: Ky, reflect: !1, hasChanged: eT }, Gde = (e = Jde, t, r) => {
const { kind: n, metadata: i } = r;
let o = globalThis.litPropertyMetadata.get(i);
if (o === void 0 && globalThis.litPropertyMetadata.set(i, o = /* @__PURE__ */ new Map()), n === "setter" && ((e = Object.create(e)).wrapped = !0), o.set(r.name, e), n === "accessor") {
const { name: a } = r;
return { set(s) {
const l = t.get.call(this);
t.set.call(this, s), this.requestUpdate(a, l, e);
}, init(s) {
return s !== void 0 && this.C(a, void 0, e, s), s;
} };
}
if (n === "setter") {
const { name: a } = r;
return function(s) {
const l = this[a];
t.call(this, s), this.requestUpdate(a, l, e);
};
}
throw Error("Unsupported decorator location: " + n);
};
function J(e) {
return (t, r) => typeof r == "object" ? Gde(e, t, r) : ((n, i, o) => {
const a = i.hasOwnProperty(o);
return i.constructor.createProperty(o, n), a ? Object.getOwnPropertyDescriptor(i, o) : void 0;
})(e, t, r);
}
function Mr(e) {
return J({ ...e, state: !0, attribute: !1 });
}
const gO = (e, t, r) => (r.configurable = !0, r.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(e, t, r), r);
function iT(e, t) {
return (r, n, i) => {
const o = (a) => a.renderRoot?.querySelector(e) ?? null;
return gO(r, n, { get() {
return o(this);
} });
};
}
function pr(e) {
return (t, r) => {
const { slot: n, selector: i } = e ?? {}, o = "slot" + (n ? `[name=${n}]` : ":not([name])");
return gO(t, r, { get() {
const a = this.renderRoot?.querySelector(o), s = a?.assignedElements(e) ?? [];
return i === void 0 ? s : s.filter(((l) => l.matches(i)));
} });
};
}
const { I: Vde } = Zde, xde = (e) => e.strings === void 0, p3 = () => document.createComment(""), Q0 = (e, t, r) => {
const n = e._$AA.parentNode, i = t === void 0 ? e._$AB : t._$AA;
if (r === void 0) {
const o = n.insertBefore(p3(), i), a = n.insertBefore(p3(), i);
r = new Vde(o, a, e, e.options);
} else {
const o = r._$AB.nextSibling, a = r._$AM, s = a !== e;
if (s) {
let l;
r._$AQ?.(e), r._$AM = e, r._$AP !== void 0 && (l = e._$AU) !== a._$AU && r._$AP(l);
}
if (o !== i || s) {
let l = r._$AA;
for (; l !== o; ) {
const c = l.nextSibling;
n.insertBefore(l, i), l = c;
}
}
}
return r;
}, Ug = (e, t, r = e) => (e._$AI(t, r), e), _de = {}, Yde = (e, t = _de) => e._$AH = t, Lde = (e) => e._$AH, pk = (e) => {
e._$AR(), e._$AA.remove();
};
const kC = { ATTRIBUTE: 1, CHILD: 2 }, FC = (e) => (...t) => ({ _$litDirective$: e, values: t });
let NC = class {
constructor(t) {
}
get _$AU() {
return this._$AM._$AU;
}
_$AT(t, r, n) {
this._$Ct = t, this._$AM = r, this._$Ci = n;
}
_$AS(t, r) {
return this.update(t, r);
}
update(t, r) {
return this.render(...r);
}
};
const sm = (e, t) => {
const r = e._$AN;
if (r === void 0) return !1;
for (const n of r) n._$AO?.(t, !1), sm(n, t);
return !0;
}, jy = (e) => {
let t, r;
do {
if ((t = e._$AM) === void 0) break;
r = t._$AN, r.delete(e), e = t;
} while (r?.size === 0);
}, uO = (e) => {
for (let t; t = e._$AM; e = t) {
let r = t._$AN;
if (r === void 0) t._$AN = r = /* @__PURE__ */ new Set();
else if (r.has(e)) break;
r.add(e), Ode(t);
}
};
function Hde(e) {
this._$AN !== void 0 ? (jy(this), this._$AM = e, uO(this)) : this._$AM = e;
}
function Kde(e, t = !1, r = 0) {
const n = this._$AH, i = this._$AN;
if (i !== void 0 && i.size !== 0) if (t) if (Array.isArray(n)) for (let o = r; o < n.length; o++) sm(n[o], !1), jy(n[o]);
else n != null && (sm(n, !1), jy(n));
else sm(this, e);
}
const Ode = (e) => {
e.type == kC.CHILD && (e._$AP ??= Kde, e._$AQ ??= Hde);
};
let jde = class extends NC {
constructor() {
super(...arguments), this._$AN = void 0;
}
_$AT(t, r, n) {
super._$AT(t, r, n), uO(this), this.isConnected = t._$AU;
}
_$AO(t, r = !0) {
t !== this.isConnected && (this.isConnected = t, t ? this.reconnected?.() : this.disconnected?.()), r && (sm(this, t), jy(this));
}
setValue(t) {
if (xde(this._$Ct)) this._$Ct._$AI(t, this);
else {
const r = [...this._$Ct._$AH];
r[this._$Ci] = t, this._$Ct._$AI(r, this, 0);
}
}
disconnected() {
}
reconnected() {
}
};
const Kt = () => new Pde();
let Pde = class {
};
const Ck = /* @__PURE__ */ new WeakMap(), Ot = FC(class extends jde {
render(e) {
return oe;
}
update(e, [t]) {
const r = t !== this.G;
return r && this.G !== void 0 && this.rt(void 0), (r || this.lt !== this.ct) && (this.G = t, this.ht = e.options?.host, this.rt(this.ct = e.element)), oe;
}
rt(e) {
if (this.isConnected || (e = void 0), typeof this.G == "function") {
const t = this.ht ?? globalThis;
let r = Ck.get(t);
r === void 0 && (r = /* @__PURE__ */ new WeakMap(), Ck.set(t, r)), r.get(this.G) !== void 0 && this.G.call(this.ht, void 0), r.set(this.G, e), e !== void 0 && this.G.call(this.ht, e);
} else this.G.value = e;
}
get lt() {
return typeof this.G == "function" ? Ck.get(this.ht ?? globalThis)?.get(this.G) : this.G?.value;
}
disconnected() {
this.lt === this.ct && this.rt(void 0);
}
reconnected() {
this.rt(this.ct);
}
});
let hO = class extends Event {
constructor(t, r, n, i) {
super("context-request", { bubbles: !0, composed: !0 }), this.context = t, this.contextTarget = r, this.callback = n, this.subscribe = i ?? !1;
}
};
let C3 = class {
constructor(t, r, n, i) {
if (this.subscribe = !1, this.provided = !1, this.value = void 0, this.t = (o, a) => {
this.unsubscribe && (this.unsubscribe !== a && (this.provided = !1, this.unsubscribe()), this.subscribe || this.unsubscribe()), this.value = o, this.host.requestUpdate(), this.provided && !this.subscribe || (this.provided = !0, this.callback && this.callback(o, a)), this.unsubscribe = a;
}, this.host = t, r.context !== void 0) {
const o = r;
this.context = o.context, this.callback = o.callback, this.subscribe = o.subscribe ?? !1;
} else this.context = r, this.callback = n, this.subscribe = i ?? !1;
this.host.addController(this);
}
hostConnected() {
this.dispatchRequest();
}
hostDisconnected() {
this.unsubscribe && (this.unsubscribe(), this.unsubscribe = void 0);
}
dispatchRequest() {
this.host.dispatchEvent(new hO(this.context, this.host, this.t, this.subscribe));
}
};
class Xde {
get value() {
return this.o;
}
set value(t) {
this.setValue(t);
}
setValue(t, r = !1) {
const n = r || !Object.is(t, this.o);
this.o = t, n && this.updateObservers();
}
constructor(t) {
this.subscriptions = /* @__PURE__ */ new Map(), this.updateObservers = () => {
for (const [r, { disposer: n }] of this.subscriptions) r(this.o, n);
}, t !== void 0 && (this.value = t);
}
addCallback(t, r, n) {
if (!n) return void t(this.value);
this.subscriptions.has(t) || this.subscriptions.set(t, { disposer: () => {
this.subscriptions.delete(t);
}, consumerHost: r });
const { disposer: i } = this.subscriptions.get(t);
t(this.value, i);
}
clearCallbacks() {
this.subscriptions.clear();
}
}
let $de = class extends Event {
constructor(t, r) {
super("context-provider", { bubbles: !0, composed: !0 }), this.context = t, this.contextTarget = r;
}
}, f3 = class extends Xde {
constructor(t, r, n) {
super(r.context !== void 0 ? r.initialValue : n), this.onContextRequest = (i) => {
if (i.context !== this.context) return;
const o = i.contextTarget ?? i.composedPath()[0];
o !== this.host && (i.stopPropagation(), this.addCallback(i.callback, o, i.subscribe));
}, this.onProviderRequest = (i) => {
if (i.context !== this.context || (i.contextTarget ?? i.composedPath()[0]) === this.host) return;
const o = /* @__PURE__ */ new Set();
for (const [a, { consumerHost: s }] of this.subscriptions) o.has(a) || (o.add(a), s.dispatchEvent(new hO(this.context, s, a, !0)));
i.stopPropagation();
}, this.host = t, r.context !== void 0 ? this.context = r.context : this.context = r, this.attachListeners(), this.host.addController?.(this);
}
attachListeners() {
this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest);
}
hostConnected() {
this.host.dispatchEvent(new $de(this.context, this.host));
}
};
function xa({ context: e }) {
return (t, r) => {
const n = /* @__PURE__ */ new WeakMap();
if (typeof r == "object") return { get() {
return t.get.call(this);
}, set(i) {
return n.get(this).setValue(i), t.set.call(this, i);
}, init(i) {
return n.set(this, new f3(this, { context: e, initialValue: i })), i;
} };
{
t.constructor.addInitializer(((a) => {
n.set(a, new f3(a, { context: e }));
}));
const i = Object.getOwnPropertyDescriptor(t, r);
let o;
if (i === void 0) {
const a = /* @__PURE__ */ new WeakMap();
o = { get() {
return a.get(this);
}, set(s) {
n.get(this).setValue(s), a.set(this, s);
}, configurable: !0, enumerable: !0 };
} else {
const a = i.set;
o = { ...i, set(s) {
n.get(this).setValue(s), a?.call(this, s);
} };
}
return void Object.defineProperty(t, r, o);
}
};
}
function EA({ context: e, subscribe: t }) {
return (r, n) => {
typeof n == "object" ? n.addInitializer((function() {
new C3(this, { context: e, callback: (i) => {
r.set.call(this, i);
}, subscribe: t });
})) : r.constructor.addInitializer(((i) => {
new C3(i, { context: e, callback: (o) => {
i[n] = o;
}, subscribe: t });
}));
};
}
function zde(e) {
return qn(e) && !ga(e) && !aQ(e) && Symbol.asyncIterator in e;
}
function ga(e) {
return Array.isArray(e);
}
function IO(e) {
return typeof e == "bigint";
}
function oQ(e) {
return typeof e == "boolean";
}
function oT(e) {
return e instanceof globalThis.Date;
}
function qde(e) {
return typeof e == "function";
}
function ege(e) {
return qn(e) && !ga(e) && !aQ(e) && Symbol.iterator in e;
}
function tge(e) {
return e === null;
}
function zl(e) {
return typeof e == "number";
}
function qn(e) {
return typeof e == "object" && e !== null;
}
function pO(e) {
return e instanceof globalThis.RegExp;
}
function Wn(e) {
return typeof e == "string";
}
function rge(e) {
return typeof e == "symbol";
}
function aQ(e) {
return e instanceof globalThis.Uint8Array;
}
function Kn(e) {
return e === void 0;
}
function nge(e) {
return e.map((t) => Py(t));
}
function ige(e) {
return new Date(e.getTime());
}
function oge(e) {
return new Uint8Array(e);
}
function age(e) {
return new RegExp(e.source, e.flags);
}
function sge(e) {
const t = {};
for (const r of Object.getOwnPropertyNames(e))
t[r] = Py(e[r]);
for (const r of Object.getOwnPropertySymbols(e))
t[r] = Py(e[r]);
return t;
}
function Py(e) {
return ga(e) ? nge(e) : oT(e) ? ige(e) : aQ(e) ? oge(e) : pO(e) ? age(e) : qn(e) ? sge(e) : e;
}
function Da(e) {
return Py(e);
}
function aT(e, t) {
return Da(t === void 0 ? e : { ...t, ...e });
}
function CO(e) {
return Ra(e) && globalThis.Symbol.asyncIterator in e;
}
function fO(e) {
return Ra(e) && globalThis.Symbol.iterator in e;
}
function mO(e) {
return e instanceof globalThis.Promise;
}
function sQ(e) {
return e instanceof Date && globalThis.Number.isFinite(e.getTime());
}
function lge(e) {
return e instanceof globalThis.Map;
}
function cge(e) {
return e instanceof globalThis.Set;
}
function Age(e) {
return globalThis.ArrayBuffer.isView(e);
}
function sT(e) {
return e instanceof globalThis.Uint8Array;
}
function xt(e, t) {
return t in e;
}
function Ra(e) {
return e !== null && typeof e == "object";
}
function Za(e) {
return globalThis.Array.isArray(e) && !globalThis.ArrayBuffer.isView(e);
}
function oc(e) {
return e === void 0;
}
function fw(e) {
return e === null;
}
function mw(e) {
return typeof e == "boolean";
}
function Yc(e) {
return typeof e == "number";
}
function BO(e) {
return globalThis.Number.isInteger(e);
}
function Bw(e) {
return typeof e == "bigint";
}
function Yl(e) {
return typeof e == "string";
}
function Qw(e) {
return typeof e == "function";
}
function Sw(e) {
return typeof e == "symbol";
}
function QO(e) {
return Bw(e) || mw(e) || fw(e) || Yc(e) || Yl(e) || Sw(e) || oc(e);
}
var zo;
(function(e) {
e.InstanceMode = "default", e.ExactOptionalPropertyTypes = !1, e.AllowArrayObject = !1, e.AllowNaN = !1, e.AllowNullVoid = !1;
function t(a, s) {
return e.ExactOptionalPropertyTypes ? s in a : a[s] !== void 0;
}
e.IsExactOptionalProperty = t;
function r(a) {
const s = Ra(a);
return e.AllowArrayObject ? s : s && !Za(a);
}
e.IsObjectLike = r;
function n(a) {
return r(a) && !(a instanceof Date) && !(a instanceof Uint8Array);
}
e.IsRecordLike = n;
function i(a) {
return e.AllowNaN ? Yc(a) : Number.isFinite(a);
}
e.IsNumberLike = i;
function o(a) {
const s = oc(a);
return e.AllowNullVoid ? s || a === null : s;
}
e.IsVoidLike = o;
})(zo || (zo = {}));
function dge(e) {
return globalThis.Object.freeze(e).map((t) => Xy(t));
}
function gge(e) {
const t = {};
for (const r of Object.getOwnPropertyNames(e))
t[r] = Xy(e[r]);
for (const r of Object.getOwnPropertySymbols(e))
t[r] = Xy(e[r]);
return globalThis.Object.freeze(t);
}
function Xy(e) {
return ga(e) ? dge(e) : oT(e) ? e : aQ(e) ? e : pO(e) ? e : qn(e) ? gge(e) : e;
}
function Re(e, t) {
const r = t !== void 0 ? { ...t, ...e } : e;
switch (zo.InstanceMode) {
case "freeze":
return Xy(r);
case "clone":
return Da(r);
default:
return r;
}
}
class ua extends Error {
constructor(t) {
super(t);
}
}
const va = /* @__PURE__ */ Symbol.for("TypeBox.Transform"), lQ = /* @__PURE__ */ Symbol.for("TypeBox.Readonly"), bA = /* @__PURE__ */ Symbol.for("TypeBox.Optional"), Ew = /* @__PURE__ */ Symbol.for("TypeBox.Hint"), Ge = /* @__PURE__ */ Symbol.for("TypeBox.Kind");
function lT(e) {
return qn(e) && e[lQ] === "Readonly";
}
function Od(e) {
return qn(e) && e[bA] === "Optional";
}
function SO(e) {
return Yt(e, "Any");
}
function EO(e) {
return Yt(e, "Argument");
}
function DC(e) {
return Yt(e, "Array");
}
function bw(e) {
return Yt(e, "AsyncIterator");
}
function yw(e) {
return Yt(e, "BigInt");
}
function cQ(e) {
return Yt(e, "Boolean");
}
function RC(e) {
return Yt(e, "Computed");
}
function ZC(e) {
return Yt(e, "Constructor");
}
function uge(e) {
return Yt(e, "Date");
}
function WC(e) {
return Yt(e, "Function");
}
function MC(e) {
return Yt(e, "Integer");
}
function ps(e) {
return Yt(e, "Intersect");
}
function vw(e) {
return Yt(e, "Iterator");
}
function Yt(e, t) {
return qn(e) && Ge in e && e[Ge] === t;
}
function bO(e) {
return oQ(e) || zl(e) || Wn(e);
}
function rh(e) {
return Yt(e, "Literal");
}
function nh(e) {
return Yt(e, "MappedKey");
}
function _a(e) {
return Yt(e, "MappedResult");
}
function AQ(e) {
return Yt(e, "Never");
}
function hge(e) {
return Yt(e, "Not");
}
function cT(e) {
return Yt(e, "Null");
}
function TC(e) {
return Yt(e, "Number");
}
function il(e) {
return Yt(e, "Object");
}
function ww(e) {
return Yt(e, "Promise");
}
function Uw(e) {
return Yt(e, "Record");
}
function qo(e) {
return Yt(e, "Ref");
}
function yO(e) {
return Yt(e, "RegExp");
}
function dQ(e) {
return Yt(e, "String");
}
function AT(e) {
return Yt(e, "Symbol");
}
function ih(e) {
return Yt(e, "TemplateLiteral");
}
function Ige(e) {
return Yt(e, "This");
}
function qr(e) {
return qn(e) && va in e;
}
function oh(e) {
return Yt(e, "Tuple");
}
function kw(e) {
return Yt(e, "Undefined");
}
function Ri(e) {
return Yt(e, "Union");
}
function pge(e) {
return Yt(e, "Uint8Array");
}
function Cge(e) {
return Yt(e, "Unknown");
}
function fge(e) {
return Yt(e, "Unsafe");
}
function mge(e) {
return Yt(e, "Void");
}
function vO(e) {
return qn(e) && Ge in e && Wn(e[Ge]);
}
function ka(e) {
return SO(e) || EO(e) || DC(e) || cQ(e) || yw(e) || bw(e) || RC(e) || ZC(e) || uge(e) || WC(e) || MC(e) || ps(e) || vw(e) || rh(e) || nh(e) || _a(e) || AQ(e) || hge(e) || cT(e) || TC(e) || il(e) || ww(e) || Uw(e) || qo(e) || yO(e) || dQ(e) || AT(e) || ih(e) || Ige(e) || oh(e) || kw(e) || Ri(e) || pge(e) || Cge(e) || fge(e) || mge(e) || vO(e);
}
const Bge = [
"Argument",
"Any",
"Array",
"AsyncIterator",
"BigInt",
"Boolean",
"Computed",
"Constructor",
"Date",
"Enum",
"Function",
"Integer",
"Intersect",
"Iterator",
"Literal",
"MappedKey",
"MappedResult",
"Not",
"Null",
"Number",
"Object",
"Promise",
"Record",
"Ref",
"RegExp",
"String",
"Symbol",
"TemplateLiteral",
"This",
"Tuple",
"Undefined",
"Union",
"Uint8Array",
"Unknown",
"Void"
];
function wO(e) {
try {
return new RegExp(e), !0;
} catch {
return !1;
}
}
function dT(e) {
if (!Wn(e))
return !1;
for (let t = 0; t < e.length; t++) {
const r = e.charCodeAt(t);
if (r >= 7 && r <= 13 || r === 27 || r === 127)
return !1;
}
return !0;
}
function UO(e) {
return gT(e) || Pi(e);
}
function S0(e) {
return Kn(e) || IO(e);
}
function Rr(e) {
return Kn(e) || zl(e);
}
function gT(e) {
return Kn(e) || oQ(e);
}
function Qr(e) {
return Kn(e) || Wn(e);
}
function Qge(e) {
return Kn(e) || Wn(e) && dT(e) && wO(e);
}
function Sge(e) {
return Kn(e) || Wn(e) && dT(e);
}
function kO(e) {
return Kn(e) || Pi(e);
}
function $y(e) {
return qn(e) && e[bA] === "Optional";
}
function Ps(e) {
return Lt(e, "Any") && Qr(e.$id);
}
function Ege(e) {
return Lt(e, "Argument") && zl(e.index);
}
function ah(e) {
return Lt(e, "Array") && e.type === "array" && Qr(e.$id) && Pi(e.items) && Rr(e.minItems) && Rr(e.maxItems) && gT(e.uniqueItems) && kO(e.contains) && Rr(e.minContains) && Rr(e.maxContains);
}
function uT(e) {
return Lt(e, "AsyncIterator") && e.type === "AsyncIterator" && Qr(e.$id) && Pi(e.items);
}
function Fw(e) {
return Lt(e, "BigInt") && e.type === "bigint" && Qr(e.$id) && S0(e.exclusiveMaximum) && S0(e.exclusiveMinimum) && S0(e.maximum) && S0(e.minimum) && S0(e.multipleOf);
}
function sh(e) {
return Lt(e, "Boolean") && e.type === "boolean" && Qr(e.$id);
}
function bge(e) {
return Lt(e, "Computed") && Wn(e.target) && ga(e.parameters) && e.parameters.every((t) => Pi(t));
}
function Nw(e) {
return Lt(e, "Constructor") && e.type === "Constructor" && Qr(e.$id) && ga(e.parameters) && e.parameters.every((t) => Pi(t)) && Pi(e.returns);
}
function Dw(e) {
return Lt(e, "Date") && e.type === "Date" && Qr(e.$id) && Rr(e.exclusiveMaximumTimestamp) && Rr(e.exclusiveMinimumTimestamp) && Rr(e.maximumTimestamp) && Rr(e.minimumTimestamp) && Rr(e.multipleOfTimestamp);
}
function Rw(e) {
return Lt(e, "Function") && e.type === "Function" && Qr(e.$id) && ga(e.parameters) && e.parameters.every((t) => Pi(t)) && Pi(e.returns);
}
function yA(e) {
return Lt(e, "Integer") && e.type === "integer" && Qr(e.$id) && Rr(e.exclusiveMaximum) && Rr(e.exclusiveMinimum) && Rr(e.maximum) && Rr(e.minimum) && Rr(e.multipleOf);
}
function FO(e) {
return qn(e) && Object.entries(e).every(([t, r]) => dT(t) && Pi(r));
}
function lh(e) {
return Lt(e, "Intersect") && !(Wn(e.type) && e.type !== "object") && ga(e.allOf) && e.allOf.every((t) => Pi(t) && !Fge(t)) && Qr(e.type) && (gT(e.unevaluatedProperties) || kO(e.unevaluatedProperties)) && Qr(e.$id);
}
function hT(e) {
return Lt(e, "Iterator") && e.type === "Iterator" && Qr(e.$id) && Pi(e.items);
}
function Lt(e, t) {
return qn(e) && Ge in e && e[Ge] === t;
}
function NO(e) {
return jd(e) && Wn(e.const);
}
function DO(e) {
return jd(e) && zl(e.const);
}
function RO(e) {
return jd(e) && oQ(e.const);
}
function jd(e) {
return Lt(e, "Literal") && Qr(e.$id) && yge(e.const);
}
function yge(e) {
return oQ(e) || zl(e) || Wn(e);
}
function vge(e) {
return Lt(e, "MappedKey") && ga(e.keys) && e.keys.every((t) => zl(t) || Wn(t));
}
function wge(e) {
return Lt(e, "MappedResult") && FO(e.properties);
}
function Pd(e) {
return Lt(e, "Never") && qn(e.not) && Object.getOwnPropertyNames(e.not).length === 0;
}
function Np(e) {
return Lt(e, "Not") && Pi(e.not);
}
function IT(e) {
return Lt(e, "Null") && e.type === "null" && Qr(e.$id);
}
function Po(e) {
return Lt(e, "Number") && e.type === "number" && Qr(e.$id) && Rr(e.exclusiveMaximum) && Rr(e.exclusiveMinimum) && Rr(e.maximum) && Rr(e.minimum) && Rr(e.multipleOf);
}
function Cn(e) {
return Lt(e, "Object") && e.type === "object" && Qr(e.$id) && FO(e.properties) && UO(e.additionalProperties) && Rr(e.minProperties) && Rr(e.maxProperties);
}
function pT(e) {
return Lt(e, "Promise") && e.type === "Promise" && Qr(e.$id) && Pi(e.item);
}
function ji(e) {
return Lt(e, "Record") && e.type === "object" && Qr(e.$id) && UO(e.additionalProperties) && qn(e.patternProperties) && ((t) => {
const r = Object.getOwnPropertyNames(t.patternProperties);
return r.length === 1 && wO(r[0]) && qn(t.patternProperties) && Pi(t.patternProperties[r[0]]);
})(e);
}
function Uge(e) {
return Lt(e, "Ref") && Qr(e.$id) && Wn(e.$ref);
}
function Zm(e) {
return Lt(e, "RegExp") && Qr(e.$id) && Wn(e.source) && Wn(e.flags) && Rr(e.maxLength) && Rr(e.minLength);
}
function Xs(e) {
return Lt(e, "String") && e.type === "string" && Qr(e.$id) && Rr(e.minLength) && Rr(e.maxLength) && Qge(e.pattern) && Sge(e.format);
}
function Wm(e) {
return Lt(e, "Symbol") && e.type === "symbol" && Qr(e.$id);
}
function Mm(e) {
return Lt(e, "TemplateLiteral") && e.type === "string" && Wn(e.pattern) && e.pattern[0] === "^" && e.pattern[e.pattern.length - 1] === "$";
}
function kge(e) {
return Lt(e, "This") && Qr(e.$id) && Wn(e.$ref);
}
function Fge(e) {
return qn(e) && va in e;
}
function Zw(e) {
return Lt(e, "Tuple") && e.type === "array" && Qr(e.$id) && zl(e.minItems) && zl(e.maxItems) && e.minItems === e.maxItems && // empty
(Kn(e.items) && Kn(e.additionalItems) && e.minItems === 0 || ga(e.items) && e.items.every((t) => Pi(t)));
}
function Wu(e) {
return Lt(e, "Undefined") && e.type === "undefined" && Qr(e.$id);
}
function aA(e) {
return Lt(e, "Union") && Qr(e.$id) && qn(e) && ga(e.anyOf) && e.anyOf.every((t) => Pi(t));
}
function gQ(e) {
return Lt(e, "Uint8Array") && e.type === "Uint8Array" && Qr(e.$id) && Rr(e.minByteLength) && Rr(e.maxByteLength);
}
function $s(e) {
return Lt(e, "Unknown") && Qr(e.$id);
}
function Nge(e) {
return Lt(e, "Unsafe");
}
function Ww(e) {
return Lt(e, "Void") && e.type === "void" && Qr(e.$id);
}
function Dge(e) {
return qn(e) && Ge in e && Wn(e[Ge]) && !Bge.includes(e[Ge]);
}
function Pi(e) {
return qn(e) && (Ps(e) || Ege(e) || ah(e) || sh(e) || Fw(e) || uT(e) || bge(e) || Nw(e) || Dw(e) || Rw(e) || yA(e) || lh(e) || hT(e) || jd(e) || vge(e) || wge(e) || Pd(e) || Np(e) || IT(e) || Po(e) || Cn(e) || pT(e) || ji(e) || Uge(e) || Zm(e) || Xs(e) || Wm(e) || Mm(e) || kge(e) || Zw(e) || Wu(e) || aA(e) || gQ(e) || $s(e) || Nge(e) || Ww(e) || Dge(e));
}
const Rge = "(true|false)", UE = "(0|[1-9][0-9]*)", ZO = "(.*)", Zge = "(?!.*)", Dp = `^${UE}$`, Rp = `^${ZO}$`, Wge = `^${Zge}$`, WO = /* @__PURE__ */ new Map();
function MO(e) {
return WO.has(e);
}
function TO(e) {
return WO.get(e);
}
const CT = /* @__PURE__ */ new Map();
function Mw(e) {
return CT.has(e);
}
function Mge(e, t) {
CT.set(e, t);
}
function JO(e) {
return CT.get(e);
}
function Tge(e, t) {
return e.includes(t);
}
function Jge(e) {
return [...new Set(e)];
}
function Gge(e, t) {
return e.filter((r) => t.includes(r));
}
function Vge(e, t) {
return e.reduce((r, n) => Gge(r, n), t);
}
function xge(e) {
return e.length === 1 ? e[0] : e.length > 1 ? Vge(e.slice(1), e[0]) : [];
}
function _ge(e) {
const t = [];
for (const r of e)
t.push(...r);
return t;
}
function Tm(e) {
return Re({ [Ge]: "Any" }, e);
}
function fT(e, t) {
return Re({ [Ge]: "Array", type: "array", items: e }, t);
}
function Yge(e) {
return Re({ [Ge]: "Argument", index: e });
}
function mT(e, t) {
return Re({ [Ge]: "AsyncIterator", type: "AsyncIterator", items: e }, t);
}
function ui(e, t, r) {
return Re({ [Ge]: "Computed", target: e, parameters: t }, r);
}
function Lge(e, t) {
const { [t]: r, ...n } = e;
return n;
}
function Wa(e, t) {
return t.reduce((r, n) => Lge(r, n), e);
}
function Sn(e) {
return Re({ [Ge]: "Never", not: {} }, e);
}
function zi(e) {
return Re({
[Ge]: "MappedResult",
properties: e
});
}
function BT(e, t, r) {
return Re({ [Ge]: "Constructor", type: "Constructor", parameters: e, returns: t }, r);
}
function uQ(e, t, r) {
return Re({ [Ge]: "Function", type: "Function", parameters: e, returns: t }, r);
}
function KN(e, t) {
return Re({ [Ge]: "Union", anyOf: e }, t);
}
function Hge(e) {
return e.some((t) => Od(t));
}
function m3(e) {
return e.map((t) => Od(t) ? Kge(t) : t);
}
function Kge(e) {
return Wa(e, [bA]);
}
function Oge(e, t) {
return Hge(e) ? zd(KN(m3(e), t)) : KN(m3(e), t);
}
function JC(e, t) {
return e.length === 1 ? Re(e[0], t) : e.length === 0 ? Sn(t) : Oge(e, t);
}
function qi(e, t) {
return e.length === 0 ? Sn(t) : e.length === 1 ? Re(e[0], t) : KN(e, t);
}
class B3 extends ua {
}
function jge(e) {
return e.replace(/\\\$/g, "$").replace(/\\\*/g, "*").replace(/\\\^/g, "^").replace(/\\\|/g, "|").replace(/\\\(/g, "(").replace(/\\\)/g, ")");
}
function QT(e, t, r) {
return e[t] === r && e.charCodeAt(t - 1) !== 92;
}
function Lc(e, t) {
return QT(e, t, "(");
}
function Jm(e, t) {
return QT(e, t, ")");
}
function GO(e, t) {
return QT(e, t, "|");
}
function Pge(e) {
if (!(Lc(e, 0) && Jm(e, e.length - 1)))
return !1;
let t = 0;
for (let r = 0; r < e.length; r++)
if (Lc(e, r) && (t += 1), Jm(e, r) && (t -= 1), t === 0 && r !== e.length - 1)
return !1;
return !0;
}
function Xge(e) {
return e.slice(1, e.length - 1);
}
function $ge(e) {
let t = 0;
for (let r = 0; r < e.length; r++)
if (Lc(e, r) && (t += 1), Jm(e, r) && (t -= 1), GO(e, r) && t === 0)
return !0;
return !1;
}
function zge(e) {
for (let t = 0; t < e.length; t++)
if (Lc(e, t))
return !0;
return !1;
}
function qge(e) {
let [t, r] = [0, 0];
const n = [];
for (let o = 0; o < e.length; o++)
if (Lc(e, o) && (t += 1), Jm(e, o) && (t -= 1), GO(e, o) && t === 0) {
const a = e.slice(r, o);
a.length > 0 && n.push(Zp(a)), r = o + 1;
}
const i = e.slice(r);
return i.length > 0 && n.push(Zp(i)), n.length === 0 ? { type: "const", const: "" } : n.length === 1 ? n[0] : { type: "or", expr: n };
}
function eue(e) {
function t(i, o) {
if (!Lc(i, o))
throw new B3("TemplateLiteralParser: Index must point to open parens");
let a = 0;
for (let s = o; s < i.length; s++)
if (Lc(i, s) && (a += 1), Jm(i, s) && (a -= 1), a === 0)
return [o, s];
throw new B3("TemplateLiteralParser: Unclosed group parens in expression");
}
function r(i, o) {
for (let a = o; a < i.length; a++)
if (Lc(i, a))
return [o, a];
return [o, i.length];
}
const n = [];
for (let i = 0; i < e.length; i++)
if (Lc(e, i)) {
const [o, a] = t(e, i), s = e.slice(o, a + 1);
n.push(Zp(s)), i = a;
} else {
const [o, a] = r(e, i), s = e.slice(o, a);
s.length > 0 && n.push(Zp(s)), i = a - 1;
}
return n.length === 0 ? { type: "const", const: "" } : n.length === 1 ? n[0] : { type: "and", expr: n };
}
function Zp(e) {
return Pge(e) ? Zp(Xge(e)) : $ge(e) ? qge(e) : zge(e) ? eue(e) : { type: "const", const: jge(e) };
}
function ST(e) {
return Zp(e.slice(1, e.length - 1));
}
class tue extends ua {
}
function rue(e) {
return e.type === "or" && e.expr.length === 2 && e.expr[0].type === "const" && e.expr[0].const === "0" && e.expr[1].type === "const" && e.expr[1].const === "[1-9][0-9]*";
}
function nue(e) {
return e.type === "or" && e.expr.length === 2 && e.expr[0].type === "const" && e.expr[0].const === "true" && e.expr[1].type === "const" && e.expr[1].const === "false";
}
function iue(e) {
return e.type === "const" && e.const === ".*";
}
function Gm(e) {
return rue(e) || iue(e) ? !1 : nue(e) ? !0 : e.type === "and" ? e.expr.every((t) => Gm(t)) : e.type === "or" ? e.expr.every((t) => Gm(t)) : e.type === "const" ? !0 : (() => {
throw new tue("Unknown expression type");
})();
}
function VO(e) {
const t = ST(e.pattern);
return Gm(t);
}
class oue extends ua {
}
function* xO(e) {
if (e.length === 1)
return yield* e[0];
for (const t of e[0])
for (const r of xO(e.slice(1)))
yield `${t}${r}`;
}
function* aue(e) {
return yield* xO(e.expr.map((t) => [...Tw(