@vouchfor/embeds 0.0.0-experiment.dce2e9b → 0.0.0-experiment.de7febc

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/es/embeds.js CHANGED
@@ -2,14 +2,14 @@ import { property as v, state as zt, customElement as he } from "lit/decorators.
2
2
  import { ifDefined as ft } from "lit/directives/if-defined.js";
3
3
  import { createRef as jt, ref as Bt } from "lit/directives/ref.js";
4
4
  import { Task as ae } from "@lit/task";
5
- import { v4 as N } from "uuid";
5
+ import { v4 as P } from "uuid";
6
6
  import "@vouchfor/media-player";
7
7
  /**
8
8
  * @license
9
9
  * Copyright 2019 Google LLC
10
10
  * SPDX-License-Identifier: BSD-3-Clause
11
11
  */
12
- const X = globalThis, _t = X.ShadowRoot && (X.ShadyCSS === void 0 || X.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Wt = Symbol(), gt = /* @__PURE__ */ new WeakMap();
12
+ const G = globalThis, _t = G.ShadowRoot && (G.ShadyCSS === void 0 || G.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Wt = Symbol(), gt = /* @__PURE__ */ new WeakMap();
13
13
  let le = class {
14
14
  constructor(t, e, s) {
15
15
  if (this._$cssResult$ = !0, s !== Wt)
@@ -29,26 +29,26 @@ let le = class {
29
29
  return this.cssText;
30
30
  }
31
31
  };
32
- const de = (r) => new le(typeof r == "string" ? r : r + "", void 0, Wt), ce = (r, t) => {
32
+ const ce = (r) => new le(typeof r == "string" ? r : r + "", void 0, Wt), de = (r, t) => {
33
33
  if (_t)
34
34
  r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
35
35
  else
36
36
  for (const e of t) {
37
- const s = document.createElement("style"), i = X.litNonce;
37
+ const s = document.createElement("style"), i = G.litNonce;
38
38
  i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, r.appendChild(s);
39
39
  }
40
40
  }, vt = _t ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
41
41
  let e = "";
42
42
  for (const s of t.cssRules)
43
43
  e += s.cssText;
44
- return de(e);
44
+ return ce(e);
45
45
  })(r) : r;
46
46
  /**
47
47
  * @license
48
48
  * Copyright 2017 Google LLC
49
49
  * SPDX-License-Identifier: BSD-3-Clause
50
50
  */
51
- const { is: pe, defineProperty: ue, getOwnPropertyDescriptor: _e, getOwnPropertyNames: $e, getOwnPropertySymbols: me, getPrototypeOf: fe } = Object, E = globalThis, yt = E.trustedTypes, ge = yt ? yt.emptyScript : "", rt = E.reactiveElementPolyfillSupport, L = (r, t) => r, ct = { toAttribute(r, t) {
51
+ const { is: pe, defineProperty: ue, getOwnPropertyDescriptor: _e, getOwnPropertyNames: $e, getOwnPropertySymbols: me, getPrototypeOf: fe } = Object, E = globalThis, yt = E.trustedTypes, ge = yt ? yt.emptyScript : "", rt = E.reactiveElementPolyfillSupport, L = (r, t) => r, dt = { toAttribute(r, t) {
52
52
  switch (t) {
53
53
  case Boolean:
54
54
  r = r ? ge : null;
@@ -76,9 +76,9 @@ const { is: pe, defineProperty: ue, getOwnPropertyDescriptor: _e, getOwnProperty
76
76
  }
77
77
  }
78
78
  return e;
79
- } }, qt = (r, t) => !pe(r, t), At = { attribute: !0, type: String, converter: ct, reflect: !1, hasChanged: qt };
79
+ } }, qt = (r, t) => !pe(r, t), At = { attribute: !0, type: String, converter: dt, reflect: !1, hasChanged: qt };
80
80
  Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), E.litPropertyMetadata ?? (E.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
81
- let M = class extends HTMLElement {
81
+ let k = class extends HTMLElement {
82
82
  static addInitializer(t) {
83
83
  this._$Ei(), (this.l ?? (this.l = [])).push(t);
84
84
  }
@@ -100,8 +100,8 @@ let M = class extends HTMLElement {
100
100
  return { get() {
101
101
  return i == null ? void 0 : i.call(this);
102
102
  }, set(o) {
103
- const l = i == null ? void 0 : i.call(this);
104
- n.call(this, o), this.requestUpdate(t, l, s);
103
+ const a = i == null ? void 0 : i.call(this);
104
+ n.call(this, o), this.requestUpdate(t, a, s);
105
105
  }, configurable: !0, enumerable: !0 };
106
106
  }
107
107
  static getPropertyOptions(t) {
@@ -172,7 +172,7 @@ let M = class extends HTMLElement {
172
172
  }
173
173
  createRenderRoot() {
174
174
  const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
175
- return ce(t, this.constructor.elementStyles), t;
175
+ return de(t, this.constructor.elementStyles), t;
176
176
  }
177
177
  connectedCallback() {
178
178
  var t;
@@ -197,7 +197,7 @@ let M = class extends HTMLElement {
197
197
  var n;
198
198
  const s = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, s);
199
199
  if (i !== void 0 && s.reflect === !0) {
200
- const o = (((n = s.converter) == null ? void 0 : n.toAttribute) !== void 0 ? s.converter : ct).toAttribute(e, s.type);
200
+ const o = (((n = s.converter) == null ? void 0 : n.toAttribute) !== void 0 ? s.converter : dt).toAttribute(e, s.type);
201
201
  this._$Em = t, o == null ? this.removeAttribute(i) : this.setAttribute(i, o), this._$Em = null;
202
202
  }
203
203
  }
@@ -205,8 +205,8 @@ let M = class extends HTMLElement {
205
205
  var n;
206
206
  const s = this.constructor, i = s._$Eh.get(t);
207
207
  if (i !== void 0 && this._$Em !== i) {
208
- const o = s.getPropertyOptions(i), l = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? o.converter : ct;
209
- this._$Em = i, this[i] = l.fromAttribute(e, o.type), this._$Em = null;
208
+ const o = s.getPropertyOptions(i), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? o.converter : dt;
209
+ this._$Em = i, this[i] = a.fromAttribute(e, o.type), this._$Em = null;
210
210
  }
211
211
  }
212
212
  requestUpdate(t, e, s, i = !1, n) {
@@ -289,68 +289,68 @@ let M = class extends HTMLElement {
289
289
  firstUpdated(t) {
290
290
  }
291
291
  };
292
- M.elementStyles = [], M.shadowRootOptions = { mode: "open" }, M[L("elementProperties")] = /* @__PURE__ */ new Map(), M[L("finalized")] = /* @__PURE__ */ new Map(), rt == null || rt({ ReactiveElement: M }), (E.reactiveElementVersions ?? (E.reactiveElementVersions = [])).push("2.0.2");
292
+ k.elementStyles = [], k.shadowRootOptions = { mode: "open" }, k[L("elementProperties")] = /* @__PURE__ */ new Map(), k[L("finalized")] = /* @__PURE__ */ new Map(), rt == null || rt({ ReactiveElement: k }), (E.reactiveElementVersions ?? (E.reactiveElementVersions = [])).push("2.0.2");
293
293
  /**
294
294
  * @license
295
295
  * Copyright 2017 Google LLC
296
296
  * SPDX-License-Identifier: BSD-3-Clause
297
297
  */
298
- const V = globalThis, Y = V.trustedTypes, Et = Y ? Y.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, Kt = "$lit$", y = `lit$${(Math.random() + "").slice(9)}$`, Jt = "?" + y, ve = `<${Jt}>`, U = document, Q = () => U.createComment(""), B = (r) => r === null || typeof r != "object" && typeof r != "function", Ft = Array.isArray, ye = (r) => Ft(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", nt = `[
299
- \f\r]`, I = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, St = /-->/g, bt = />/g, b = RegExp(`>|${nt}(?:([^\\s"'>=/]+)(${nt}*=${nt}*(?:[^
300
- \f\r"'\`<>=]|("|')|))|$)`, "g"), wt = /'/g, Pt = /"/g, Gt = /^(?:script|style|textarea|title)$/i, W = Symbol.for("lit-noChange"), _ = Symbol.for("lit-nothing"), Ct = /* @__PURE__ */ new WeakMap(), P = U.createTreeWalker(U, 129);
301
- function Xt(r, t) {
298
+ const V = globalThis, Y = V.trustedTypes, Et = Y ? Y.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, Xt = "$lit$", y = `lit$${(Math.random() + "").slice(9)}$`, Kt = "?" + y, ve = `<${Kt}>`, U = document, Q = () => U.createComment(""), B = (r) => r === null || typeof r != "object" && typeof r != "function", Jt = Array.isArray, ye = (r) => Jt(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", nt = `[
299
+ \f\r]`, M = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, bt = /-->/g, St = />/g, S = RegExp(`>|${nt}(?:([^\\s"'>=/]+)(${nt}*=${nt}*(?:[^
300
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), wt = /'/g, Pt = /"/g, Ft = /^(?:script|style|textarea|title)$/i, W = Symbol.for("lit-noChange"), _ = Symbol.for("lit-nothing"), Ct = /* @__PURE__ */ new WeakMap(), C = U.createTreeWalker(U, 129);
301
+ function Gt(r, t) {
302
302
  if (!Array.isArray(r) || !r.hasOwnProperty("raw"))
303
303
  throw Error("invalid template strings array");
304
304
  return Et !== void 0 ? Et.createHTML(t) : t;
305
305
  }
306
306
  const Ae = (r, t) => {
307
307
  const e = r.length - 1, s = [];
308
- let i, n = t === 2 ? "<svg>" : "", o = I;
309
- for (let l = 0; l < e; l++) {
310
- const h = r[l];
311
- let d, c, a = -1, p = 0;
312
- for (; p < h.length && (o.lastIndex = p, c = o.exec(h), c !== null); )
313
- p = o.lastIndex, o === I ? c[1] === "!--" ? o = St : c[1] !== void 0 ? o = bt : c[2] !== void 0 ? (Gt.test(c[2]) && (i = RegExp("</" + c[2], "g")), o = b) : c[3] !== void 0 && (o = b) : o === b ? c[0] === ">" ? (o = i ?? I, a = -1) : c[1] === void 0 ? a = -2 : (a = o.lastIndex - c[2].length, d = c[1], o = c[3] === void 0 ? b : c[3] === '"' ? Pt : wt) : o === Pt || o === wt ? o = b : o === St || o === bt ? o = I : (o = b, i = void 0);
314
- const u = o === b && r[l + 1].startsWith("/>") ? " " : "";
315
- n += o === I ? h + ve : a >= 0 ? (s.push(d), h.slice(0, a) + Kt + h.slice(a) + y + u) : h + y + (a === -2 ? l : u);
316
- }
317
- return [Xt(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : "")), s];
308
+ let i, n = t === 2 ? "<svg>" : "", o = M;
309
+ for (let a = 0; a < e; a++) {
310
+ const h = r[a];
311
+ let c, d, l = -1, p = 0;
312
+ for (; p < h.length && (o.lastIndex = p, d = o.exec(h), d !== null); )
313
+ p = o.lastIndex, o === M ? d[1] === "!--" ? o = bt : d[1] !== void 0 ? o = St : d[2] !== void 0 ? (Ft.test(d[2]) && (i = RegExp("</" + d[2], "g")), o = S) : d[3] !== void 0 && (o = S) : o === S ? d[0] === ">" ? (o = i ?? M, l = -1) : d[1] === void 0 ? l = -2 : (l = o.lastIndex - d[2].length, c = d[1], o = d[3] === void 0 ? S : d[3] === '"' ? Pt : wt) : o === Pt || o === wt ? o = S : o === bt || o === St ? o = M : (o = S, i = void 0);
314
+ const u = o === S && r[a + 1].startsWith("/>") ? " " : "";
315
+ n += o === M ? h + ve : l >= 0 ? (s.push(c), h.slice(0, l) + Xt + h.slice(l) + y + u) : h + y + (l === -2 ? a : u);
316
+ }
317
+ return [Gt(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : "")), s];
318
318
  };
319
319
  let pt = class Zt {
320
320
  constructor({ strings: t, _$litType$: e }, s) {
321
321
  let i;
322
322
  this.parts = [];
323
323
  let n = 0, o = 0;
324
- const l = t.length - 1, h = this.parts, [d, c] = Ae(t, e);
325
- if (this.el = Zt.createElement(d, s), P.currentNode = this.el.content, e === 2) {
326
- const a = this.el.content.firstChild;
327
- a.replaceWith(...a.childNodes);
324
+ const a = t.length - 1, h = this.parts, [c, d] = Ae(t, e);
325
+ if (this.el = Zt.createElement(c, s), C.currentNode = this.el.content, e === 2) {
326
+ const l = this.el.content.firstChild;
327
+ l.replaceWith(...l.childNodes);
328
328
  }
329
- for (; (i = P.nextNode()) !== null && h.length < l; ) {
329
+ for (; (i = C.nextNode()) !== null && h.length < a; ) {
330
330
  if (i.nodeType === 1) {
331
331
  if (i.hasAttributes())
332
- for (const a of i.getAttributeNames())
333
- if (a.endsWith(Kt)) {
334
- const p = c[o++], u = i.getAttribute(a).split(y), g = /([.?@])?(.*)/.exec(p);
335
- h.push({ type: 1, index: n, name: g[2], strings: u, ctor: g[1] === "." ? Se : g[1] === "?" ? be : g[1] === "@" ? we : st }), i.removeAttribute(a);
332
+ for (const l of i.getAttributeNames())
333
+ if (l.endsWith(Xt)) {
334
+ const p = d[o++], u = i.getAttribute(l).split(y), g = /([.?@])?(.*)/.exec(p);
335
+ h.push({ type: 1, index: n, name: g[2], strings: u, ctor: g[1] === "." ? be : g[1] === "?" ? Se : g[1] === "@" ? we : st }), i.removeAttribute(l);
336
336
  } else
337
- a.startsWith(y) && (h.push({ type: 6, index: n }), i.removeAttribute(a));
338
- if (Gt.test(i.tagName)) {
339
- const a = i.textContent.split(y), p = a.length - 1;
337
+ l.startsWith(y) && (h.push({ type: 6, index: n }), i.removeAttribute(l));
338
+ if (Ft.test(i.tagName)) {
339
+ const l = i.textContent.split(y), p = l.length - 1;
340
340
  if (p > 0) {
341
341
  i.textContent = Y ? Y.emptyScript : "";
342
342
  for (let u = 0; u < p; u++)
343
- i.append(a[u], Q()), P.nextNode(), h.push({ type: 2, index: ++n });
344
- i.append(a[p], Q());
343
+ i.append(l[u], Q()), C.nextNode(), h.push({ type: 2, index: ++n });
344
+ i.append(l[p], Q());
345
345
  }
346
346
  }
347
347
  } else if (i.nodeType === 8)
348
- if (i.data === Jt)
348
+ if (i.data === Kt)
349
349
  h.push({ type: 2, index: n });
350
350
  else {
351
- let a = -1;
352
- for (; (a = i.data.indexOf(y, a + 1)) !== -1; )
353
- h.push({ type: 7, index: n }), a += y.length - 1;
351
+ let l = -1;
352
+ for (; (l = i.data.indexOf(y, l + 1)) !== -1; )
353
+ h.push({ type: 7, index: n }), l += y.length - 1;
354
354
  }
355
355
  n++;
356
356
  }
@@ -360,13 +360,13 @@ let pt = class Zt {
360
360
  return s.innerHTML = t, s;
361
361
  }
362
362
  };
363
- function x(r, t, e = r, s) {
364
- var o, l;
363
+ function H(r, t, e = r, s) {
364
+ var o, a;
365
365
  if (t === W)
366
366
  return t;
367
367
  let i = s !== void 0 ? (o = e._$Co) == null ? void 0 : o[s] : e._$Cl;
368
368
  const n = B(t) ? void 0 : t._$litDirective$;
369
- return (i == null ? void 0 : i.constructor) !== n && ((l = i == null ? void 0 : i._$AO) == null || l.call(i, !1), n === void 0 ? i = void 0 : (i = new n(r), i._$AT(r, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = i : e._$Cl = i), i !== void 0 && (t = x(r, i._$AS(r, t.values), i, s)), t;
369
+ return (i == null ? void 0 : i.constructor) !== n && ((a = i == null ? void 0 : i._$AO) == null || a.call(i, !1), n === void 0 ? i = void 0 : (i = new n(r), i._$AT(r, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = i : e._$Cl = i), i !== void 0 && (t = H(r, i._$AS(r, t.values), i, s)), t;
370
370
  }
371
371
  let Ee = class {
372
372
  constructor(t, e) {
@@ -380,16 +380,16 @@ let Ee = class {
380
380
  }
381
381
  u(t) {
382
382
  const { el: { content: e }, parts: s } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? U).importNode(e, !0);
383
- P.currentNode = i;
384
- let n = P.nextNode(), o = 0, l = 0, h = s[0];
383
+ C.currentNode = i;
384
+ let n = C.nextNode(), o = 0, a = 0, h = s[0];
385
385
  for (; h !== void 0; ) {
386
386
  if (o === h.index) {
387
- let d;
388
- h.type === 2 ? d = new Yt(n, n.nextSibling, this, t) : h.type === 1 ? d = new h.ctor(n, h.name, h.strings, this, t) : h.type === 6 && (d = new Pe(n, this, t)), this._$AV.push(d), h = s[++l];
387
+ let c;
388
+ h.type === 2 ? c = new Yt(n, n.nextSibling, this, t) : h.type === 1 ? c = new h.ctor(n, h.name, h.strings, this, t) : h.type === 6 && (c = new Pe(n, this, t)), this._$AV.push(c), h = s[++a];
389
389
  }
390
- o !== (h == null ? void 0 : h.index) && (n = P.nextNode(), o++);
390
+ o !== (h == null ? void 0 : h.index) && (n = C.nextNode(), o++);
391
391
  }
392
- return P.currentNode = U, i;
392
+ return C.currentNode = U, i;
393
393
  }
394
394
  p(t) {
395
395
  let e = 0;
@@ -416,7 +416,7 @@ let Ee = class {
416
416
  return this._$AB;
417
417
  }
418
418
  _$AI(t, e = this) {
419
- t = x(this, t, e), B(t) ? t === _ || t == null || t === "" ? (this._$AH !== _ && this._$AR(), this._$AH = _) : t !== this._$AH && t !== W && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : ye(t) ? this.T(t) : this._(t);
419
+ t = H(this, t, e), B(t) ? t === _ || t == null || t === "" ? (this._$AH !== _ && this._$AR(), this._$AH = _) : t !== this._$AH && t !== W && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : ye(t) ? this.T(t) : this._(t);
420
420
  }
421
421
  k(t) {
422
422
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -429,12 +429,12 @@ let Ee = class {
429
429
  }
430
430
  g(t) {
431
431
  var n;
432
- const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = pt.createElement(Xt(s.h, s.h[0]), this.options)), s);
432
+ const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = pt.createElement(Gt(s.h, s.h[0]), this.options)), s);
433
433
  if (((n = this._$AH) == null ? void 0 : n._$AD) === i)
434
434
  this._$AH.p(e);
435
435
  else {
436
- const o = new Ee(i, this), l = o.u(this.options);
437
- o.p(e), this.$(l), this._$AH = o;
436
+ const o = new Ee(i, this), a = o.u(this.options);
437
+ o.p(e), this.$(a), this._$AH = o;
438
438
  }
439
439
  }
440
440
  _$AC(t) {
@@ -442,7 +442,7 @@ let Ee = class {
442
442
  return e === void 0 && Ct.set(t.strings, e = new pt(t)), e;
443
443
  }
444
444
  T(t) {
445
- Ft(this._$AH) || (this._$AH = [], this._$AR());
445
+ Jt(this._$AH) || (this._$AH = [], this._$AR());
446
446
  const e = this._$AH;
447
447
  let s, i = 0;
448
448
  for (const n of t)
@@ -474,26 +474,26 @@ let Ee = class {
474
474
  const n = this.strings;
475
475
  let o = !1;
476
476
  if (n === void 0)
477
- t = x(this, t, e, 0), o = !B(t) || t !== this._$AH && t !== W, o && (this._$AH = t);
477
+ t = H(this, t, e, 0), o = !B(t) || t !== this._$AH && t !== W, o && (this._$AH = t);
478
478
  else {
479
- const l = t;
480
- let h, d;
479
+ const a = t;
480
+ let h, c;
481
481
  for (t = n[0], h = 0; h < n.length - 1; h++)
482
- d = x(this, l[s + h], e, h), d === W && (d = this._$AH[h]), o || (o = !B(d) || d !== this._$AH[h]), d === _ ? t = _ : t !== _ && (t += (d ?? "") + n[h + 1]), this._$AH[h] = d;
482
+ c = H(this, a[s + h], e, h), c === W && (c = this._$AH[h]), o || (o = !B(c) || c !== this._$AH[h]), c === _ ? t = _ : t !== _ && (t += (c ?? "") + n[h + 1]), this._$AH[h] = c;
483
483
  }
484
484
  o && !i && this.O(t);
485
485
  }
486
486
  O(t) {
487
487
  t === _ ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
488
488
  }
489
- }, Se = class extends st {
489
+ }, be = class extends st {
490
490
  constructor() {
491
491
  super(...arguments), this.type = 3;
492
492
  }
493
493
  O(t) {
494
494
  this.element[this.name] = t === _ ? void 0 : t;
495
495
  }
496
- }, be = class extends st {
496
+ }, Se = class extends st {
497
497
  constructor() {
498
498
  super(...arguments), this.type = 4;
499
499
  }
@@ -505,7 +505,7 @@ let Ee = class {
505
505
  super(t, e, s, i, n), this.type = 5;
506
506
  }
507
507
  _$AI(t, e = this) {
508
- if ((t = x(this, t, e, 0) ?? _) === W)
508
+ if ((t = H(this, t, e, 0) ?? _) === W)
509
509
  return;
510
510
  const s = this._$AH, i = t === _ && s !== _ || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, n = t !== _ && (s === _ || i);
511
511
  i && this.element.removeEventListener(this.name, this, s), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
@@ -522,7 +522,7 @@ let Ee = class {
522
522
  return this._$AM._$AU;
523
523
  }
524
524
  _$AI(t) {
525
- x(this, t);
525
+ H(this, t);
526
526
  }
527
527
  };
528
528
  const ot = V.litHtmlPolyfillSupport;
@@ -532,7 +532,7 @@ ot == null || ot(pt, Yt), (V.litHtmlVersions ?? (V.litHtmlVersions = [])).push("
532
532
  * Copyright 2019 Google LLC
533
533
  * SPDX-License-Identifier: BSD-3-Clause
534
534
  */
535
- const Z = globalThis, $t = Z.ShadowRoot && (Z.ShadyCSS === void 0 || Z.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, te = Symbol(), Ut = /* @__PURE__ */ new WeakMap();
535
+ const Z = globalThis, $t = Z.ShadowRoot && (Z.ShadyCSS === void 0 || Z.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, te = Symbol(), Tt = /* @__PURE__ */ new WeakMap();
536
536
  let Ce = class {
537
537
  constructor(t, e, s) {
538
538
  if (this._$cssResult$ = !0, s !== te)
@@ -544,7 +544,7 @@ let Ce = class {
544
544
  const e = this.t;
545
545
  if ($t && t === void 0) {
546
546
  const s = e !== void 0 && e.length === 1;
547
- s && (t = Ut.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && Ut.set(e, t));
547
+ s && (t = Tt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && Tt.set(e, t));
548
548
  }
549
549
  return t;
550
550
  }
@@ -552,7 +552,7 @@ let Ce = class {
552
552
  return this.cssText;
553
553
  }
554
554
  };
555
- const Ue = (r) => new Ce(typeof r == "string" ? r : r + "", void 0, te), Te = (r, t) => {
555
+ const Te = (r) => new Ce(typeof r == "string" ? r : r + "", void 0, te), Ue = (r, t) => {
556
556
  if ($t)
557
557
  r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
558
558
  else
@@ -560,21 +560,21 @@ const Ue = (r) => new Ce(typeof r == "string" ? r : r + "", void 0, te), Te = (r
560
560
  const s = document.createElement("style"), i = Z.litNonce;
561
561
  i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, r.appendChild(s);
562
562
  }
563
- }, Tt = $t ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
563
+ }, Ut = $t ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
564
564
  let e = "";
565
565
  for (const s of t.cssRules)
566
566
  e += s.cssText;
567
- return Ue(e);
567
+ return Te(e);
568
568
  })(r) : r;
569
569
  /**
570
570
  * @license
571
571
  * Copyright 2017 Google LLC
572
572
  * SPDX-License-Identifier: BSD-3-Clause
573
573
  */
574
- const { is: Re, defineProperty: xe, getOwnPropertyDescriptor: He, getOwnPropertyNames: Oe, getOwnPropertySymbols: Ne, getPrototypeOf: Me } = Object, S = globalThis, Rt = S.trustedTypes, Ie = Rt ? Rt.emptyScript : "", ht = S.reactiveElementPolyfillSupport, D = (r, t) => r, ut = { toAttribute(r, t) {
574
+ const { is: Re, defineProperty: xe, getOwnPropertyDescriptor: He, getOwnPropertyNames: Oe, getOwnPropertySymbols: Ne, getPrototypeOf: ke } = Object, b = globalThis, Rt = b.trustedTypes, Me = Rt ? Rt.emptyScript : "", ht = b.reactiveElementPolyfillSupport, D = (r, t) => r, ut = { toAttribute(r, t) {
575
575
  switch (t) {
576
576
  case Boolean:
577
- r = r ? Ie : null;
577
+ r = r ? Me : null;
578
578
  break;
579
579
  case Object:
580
580
  case Array:
@@ -600,8 +600,8 @@ const { is: Re, defineProperty: xe, getOwnPropertyDescriptor: He, getOwnProperty
600
600
  }
601
601
  return e;
602
602
  } }, ee = (r, t) => !Re(r, t), xt = { attribute: !0, type: String, converter: ut, reflect: !1, hasChanged: ee };
603
- Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), S.litPropertyMetadata ?? (S.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
604
- class R extends HTMLElement {
603
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), b.litPropertyMetadata ?? (b.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
604
+ class x extends HTMLElement {
605
605
  static addInitializer(t) {
606
606
  this._$Ei(), (this.l ?? (this.l = [])).push(t);
607
607
  }
@@ -623,8 +623,8 @@ class R extends HTMLElement {
623
623
  return { get() {
624
624
  return i == null ? void 0 : i.call(this);
625
625
  }, set(o) {
626
- const l = i == null ? void 0 : i.call(this);
627
- n.call(this, o), this.requestUpdate(t, l, s);
626
+ const a = i == null ? void 0 : i.call(this);
627
+ n.call(this, o), this.requestUpdate(t, a, s);
628
628
  }, configurable: !0, enumerable: !0 };
629
629
  }
630
630
  static getPropertyOptions(t) {
@@ -633,7 +633,7 @@ class R extends HTMLElement {
633
633
  static _$Ei() {
634
634
  if (this.hasOwnProperty(D("elementProperties")))
635
635
  return;
636
- const t = Me(this);
636
+ const t = ke(this);
637
637
  t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
638
638
  }
639
639
  static finalize() {
@@ -663,9 +663,9 @@ class R extends HTMLElement {
663
663
  if (Array.isArray(t)) {
664
664
  const s = new Set(t.flat(1 / 0).reverse());
665
665
  for (const i of s)
666
- e.unshift(Tt(i));
666
+ e.unshift(Ut(i));
667
667
  } else
668
- t !== void 0 && e.push(Tt(t));
668
+ t !== void 0 && e.push(Ut(t));
669
669
  return e;
670
670
  }
671
671
  static _$Eu(t, e) {
@@ -695,7 +695,7 @@ class R extends HTMLElement {
695
695
  }
696
696
  createRenderRoot() {
697
697
  const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
698
- return Te(t, this.constructor.elementStyles), t;
698
+ return Ue(t, this.constructor.elementStyles), t;
699
699
  }
700
700
  connectedCallback() {
701
701
  var t;
@@ -728,8 +728,8 @@ class R extends HTMLElement {
728
728
  var n;
729
729
  const s = this.constructor, i = s._$Eh.get(t);
730
730
  if (i !== void 0 && this._$Em !== i) {
731
- const o = s.getPropertyOptions(i), l = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? o.converter : ut;
732
- this._$Em = i, this[i] = l.fromAttribute(e, o.type), this._$Em = null;
731
+ const o = s.getPropertyOptions(i), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? o.converter : ut;
732
+ this._$Em = i, this[i] = a.fromAttribute(e, o.type), this._$Em = null;
733
733
  }
734
734
  }
735
735
  requestUpdate(t, e, s, i = !1, n) {
@@ -812,15 +812,15 @@ class R extends HTMLElement {
812
812
  firstUpdated(t) {
813
813
  }
814
814
  }
815
- R.elementStyles = [], R.shadowRootOptions = { mode: "open" }, R[D("elementProperties")] = /* @__PURE__ */ new Map(), R[D("finalized")] = /* @__PURE__ */ new Map(), ht == null || ht({ ReactiveElement: R }), (S.reactiveElementVersions ?? (S.reactiveElementVersions = [])).push("2.0.2");
815
+ x.elementStyles = [], x.shadowRootOptions = { mode: "open" }, x[D("elementProperties")] = /* @__PURE__ */ new Map(), x[D("finalized")] = /* @__PURE__ */ new Map(), ht == null || ht({ ReactiveElement: x }), (b.reactiveElementVersions ?? (b.reactiveElementVersions = [])).push("2.0.2");
816
816
  /**
817
817
  * @license
818
818
  * Copyright 2017 Google LLC
819
819
  * SPDX-License-Identifier: BSD-3-Clause
820
820
  */
821
- const z = globalThis, tt = z.trustedTypes, Ht = tt ? tt.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, se = "$lit$", A = `lit$${(Math.random() + "").slice(9)}$`, ie = "?" + A, ke = `<${ie}>`, T = document, q = () => T.createComment(""), K = (r) => r === null || typeof r != "object" && typeof r != "function", re = Array.isArray, Le = (r) => re(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", at = `[
822
- \f\r]`, k = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ot = /-->/g, Nt = />/g, w = RegExp(`>|${at}(?:([^\\s"'>=/]+)(${at}*=${at}*(?:[^
823
- \f\r"'\`<>=]|("|')|))|$)`, "g"), Mt = /'/g, It = /"/g, ne = /^(?:script|style|textarea|title)$/i, Ve = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), De = Ve(1), H = Symbol.for("lit-noChange"), $ = Symbol.for("lit-nothing"), kt = /* @__PURE__ */ new WeakMap(), C = T.createTreeWalker(T, 129);
821
+ const z = globalThis, tt = z.trustedTypes, Ht = tt ? tt.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, se = "$lit$", A = `lit$${(Math.random() + "").slice(9)}$`, ie = "?" + A, Ie = `<${ie}>`, R = document, q = () => R.createComment(""), X = (r) => r === null || typeof r != "object" && typeof r != "function", re = Array.isArray, Le = (r) => re(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", at = `[
822
+ \f\r]`, I = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ot = /-->/g, Nt = />/g, w = RegExp(`>|${at}(?:([^\\s"'>=/]+)(${at}*=${at}*(?:[^
823
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), kt = /'/g, Mt = /"/g, ne = /^(?:script|style|textarea|title)$/i, Ve = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), De = Ve(1), O = Symbol.for("lit-noChange"), $ = Symbol.for("lit-nothing"), It = /* @__PURE__ */ new WeakMap(), T = R.createTreeWalker(R, 129);
824
824
  function oe(r, t) {
825
825
  if (!Array.isArray(r) || !r.hasOwnProperty("raw"))
826
826
  throw Error("invalid template strings array");
@@ -828,68 +828,68 @@ function oe(r, t) {
828
828
  }
829
829
  const ze = (r, t) => {
830
830
  const e = r.length - 1, s = [];
831
- let i, n = t === 2 ? "<svg>" : "", o = k;
832
- for (let l = 0; l < e; l++) {
833
- const h = r[l];
834
- let d, c, a = -1, p = 0;
835
- for (; p < h.length && (o.lastIndex = p, c = o.exec(h), c !== null); )
836
- p = o.lastIndex, o === k ? c[1] === "!--" ? o = Ot : c[1] !== void 0 ? o = Nt : c[2] !== void 0 ? (ne.test(c[2]) && (i = RegExp("</" + c[2], "g")), o = w) : c[3] !== void 0 && (o = w) : o === w ? c[0] === ">" ? (o = i ?? k, a = -1) : c[1] === void 0 ? a = -2 : (a = o.lastIndex - c[2].length, d = c[1], o = c[3] === void 0 ? w : c[3] === '"' ? It : Mt) : o === It || o === Mt ? o = w : o === Ot || o === Nt ? o = k : (o = w, i = void 0);
837
- const u = o === w && r[l + 1].startsWith("/>") ? " " : "";
838
- n += o === k ? h + ke : a >= 0 ? (s.push(d), h.slice(0, a) + se + h.slice(a) + A + u) : h + A + (a === -2 ? l : u);
831
+ let i, n = t === 2 ? "<svg>" : "", o = I;
832
+ for (let a = 0; a < e; a++) {
833
+ const h = r[a];
834
+ let c, d, l = -1, p = 0;
835
+ for (; p < h.length && (o.lastIndex = p, d = o.exec(h), d !== null); )
836
+ p = o.lastIndex, o === I ? d[1] === "!--" ? o = Ot : d[1] !== void 0 ? o = Nt : d[2] !== void 0 ? (ne.test(d[2]) && (i = RegExp("</" + d[2], "g")), o = w) : d[3] !== void 0 && (o = w) : o === w ? d[0] === ">" ? (o = i ?? I, l = -1) : d[1] === void 0 ? l = -2 : (l = o.lastIndex - d[2].length, c = d[1], o = d[3] === void 0 ? w : d[3] === '"' ? Mt : kt) : o === Mt || o === kt ? o = w : o === Ot || o === Nt ? o = I : (o = w, i = void 0);
837
+ const u = o === w && r[a + 1].startsWith("/>") ? " " : "";
838
+ n += o === I ? h + Ie : l >= 0 ? (s.push(c), h.slice(0, l) + se + h.slice(l) + A + u) : h + A + (l === -2 ? a : u);
839
839
  }
840
840
  return [oe(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : "")), s];
841
841
  };
842
- class J {
842
+ class K {
843
843
  constructor({ strings: t, _$litType$: e }, s) {
844
844
  let i;
845
845
  this.parts = [];
846
846
  let n = 0, o = 0;
847
- const l = t.length - 1, h = this.parts, [d, c] = ze(t, e);
848
- if (this.el = J.createElement(d, s), C.currentNode = this.el.content, e === 2) {
849
- const a = this.el.content.firstChild;
850
- a.replaceWith(...a.childNodes);
847
+ const a = t.length - 1, h = this.parts, [c, d] = ze(t, e);
848
+ if (this.el = K.createElement(c, s), T.currentNode = this.el.content, e === 2) {
849
+ const l = this.el.content.firstChild;
850
+ l.replaceWith(...l.childNodes);
851
851
  }
852
- for (; (i = C.nextNode()) !== null && h.length < l; ) {
852
+ for (; (i = T.nextNode()) !== null && h.length < a; ) {
853
853
  if (i.nodeType === 1) {
854
854
  if (i.hasAttributes())
855
- for (const a of i.getAttributeNames())
856
- if (a.endsWith(se)) {
857
- const p = c[o++], u = i.getAttribute(a).split(A), g = /([.?@])?(.*)/.exec(p);
858
- h.push({ type: 1, index: n, name: g[2], strings: u, ctor: g[1] === "." ? Be : g[1] === "?" ? We : g[1] === "@" ? qe : it }), i.removeAttribute(a);
855
+ for (const l of i.getAttributeNames())
856
+ if (l.endsWith(se)) {
857
+ const p = d[o++], u = i.getAttribute(l).split(A), g = /([.?@])?(.*)/.exec(p);
858
+ h.push({ type: 1, index: n, name: g[2], strings: u, ctor: g[1] === "." ? Be : g[1] === "?" ? We : g[1] === "@" ? qe : it }), i.removeAttribute(l);
859
859
  } else
860
- a.startsWith(A) && (h.push({ type: 6, index: n }), i.removeAttribute(a));
860
+ l.startsWith(A) && (h.push({ type: 6, index: n }), i.removeAttribute(l));
861
861
  if (ne.test(i.tagName)) {
862
- const a = i.textContent.split(A), p = a.length - 1;
862
+ const l = i.textContent.split(A), p = l.length - 1;
863
863
  if (p > 0) {
864
864
  i.textContent = tt ? tt.emptyScript : "";
865
865
  for (let u = 0; u < p; u++)
866
- i.append(a[u], q()), C.nextNode(), h.push({ type: 2, index: ++n });
867
- i.append(a[p], q());
866
+ i.append(l[u], q()), T.nextNode(), h.push({ type: 2, index: ++n });
867
+ i.append(l[p], q());
868
868
  }
869
869
  }
870
870
  } else if (i.nodeType === 8)
871
871
  if (i.data === ie)
872
872
  h.push({ type: 2, index: n });
873
873
  else {
874
- let a = -1;
875
- for (; (a = i.data.indexOf(A, a + 1)) !== -1; )
876
- h.push({ type: 7, index: n }), a += A.length - 1;
874
+ let l = -1;
875
+ for (; (l = i.data.indexOf(A, l + 1)) !== -1; )
876
+ h.push({ type: 7, index: n }), l += A.length - 1;
877
877
  }
878
878
  n++;
879
879
  }
880
880
  }
881
881
  static createElement(t, e) {
882
- const s = T.createElement("template");
882
+ const s = R.createElement("template");
883
883
  return s.innerHTML = t, s;
884
884
  }
885
885
  }
886
- function O(r, t, e = r, s) {
887
- var o, l;
888
- if (t === H)
886
+ function N(r, t, e = r, s) {
887
+ var o, a;
888
+ if (t === O)
889
889
  return t;
890
890
  let i = s !== void 0 ? (o = e._$Co) == null ? void 0 : o[s] : e._$Cl;
891
- const n = K(t) ? void 0 : t._$litDirective$;
892
- return (i == null ? void 0 : i.constructor) !== n && ((l = i == null ? void 0 : i._$AO) == null || l.call(i, !1), n === void 0 ? i = void 0 : (i = new n(r), i._$AT(r, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = i : e._$Cl = i), i !== void 0 && (t = O(r, i._$AS(r, t.values), i, s)), t;
891
+ const n = X(t) ? void 0 : t._$litDirective$;
892
+ return (i == null ? void 0 : i.constructor) !== n && ((a = i == null ? void 0 : i._$AO) == null || a.call(i, !1), n === void 0 ? i = void 0 : (i = new n(r), i._$AT(r, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = i : e._$Cl = i), i !== void 0 && (t = N(r, i._$AS(r, t.values), i, s)), t;
893
893
  }
894
894
  class je {
895
895
  constructor(t, e) {
@@ -902,17 +902,17 @@ class je {
902
902
  return this._$AM._$AU;
903
903
  }
904
904
  u(t) {
905
- const { el: { content: e }, parts: s } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? T).importNode(e, !0);
906
- C.currentNode = i;
907
- let n = C.nextNode(), o = 0, l = 0, h = s[0];
905
+ const { el: { content: e }, parts: s } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? R).importNode(e, !0);
906
+ T.currentNode = i;
907
+ let n = T.nextNode(), o = 0, a = 0, h = s[0];
908
908
  for (; h !== void 0; ) {
909
909
  if (o === h.index) {
910
- let d;
911
- h.type === 2 ? d = new F(n, n.nextSibling, this, t) : h.type === 1 ? d = new h.ctor(n, h.name, h.strings, this, t) : h.type === 6 && (d = new Ke(n, this, t)), this._$AV.push(d), h = s[++l];
910
+ let c;
911
+ h.type === 2 ? c = new J(n, n.nextSibling, this, t) : h.type === 1 ? c = new h.ctor(n, h.name, h.strings, this, t) : h.type === 6 && (c = new Xe(n, this, t)), this._$AV.push(c), h = s[++a];
912
912
  }
913
- o !== (h == null ? void 0 : h.index) && (n = C.nextNode(), o++);
913
+ o !== (h == null ? void 0 : h.index) && (n = T.nextNode(), o++);
914
914
  }
915
- return C.currentNode = T, i;
915
+ return T.currentNode = R, i;
916
916
  }
917
917
  p(t) {
918
918
  let e = 0;
@@ -920,7 +920,7 @@ class je {
920
920
  s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
921
921
  }
922
922
  }
923
- class F {
923
+ class J {
924
924
  get _$AU() {
925
925
  var t;
926
926
  return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
@@ -940,7 +940,7 @@ class F {
940
940
  return this._$AB;
941
941
  }
942
942
  _$AI(t, e = this) {
943
- t = O(this, t, e), K(t) ? t === $ || t == null || t === "" ? (this._$AH !== $ && this._$AR(), this._$AH = $) : t !== this._$AH && t !== H && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : Le(t) ? this.T(t) : this._(t);
943
+ t = N(this, t, e), X(t) ? t === $ || t == null || t === "" ? (this._$AH !== $ && this._$AR(), this._$AH = $) : t !== this._$AH && t !== O && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : Le(t) ? this.T(t) : this._(t);
944
944
  }
945
945
  k(t) {
946
946
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -949,28 +949,28 @@ class F {
949
949
  this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
950
950
  }
951
951
  _(t) {
952
- this._$AH !== $ && K(this._$AH) ? this._$AA.nextSibling.data = t : this.$(T.createTextNode(t)), this._$AH = t;
952
+ this._$AH !== $ && X(this._$AH) ? this._$AA.nextSibling.data = t : this.$(R.createTextNode(t)), this._$AH = t;
953
953
  }
954
954
  g(t) {
955
955
  var n;
956
- const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = J.createElement(oe(s.h, s.h[0]), this.options)), s);
956
+ const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = K.createElement(oe(s.h, s.h[0]), this.options)), s);
957
957
  if (((n = this._$AH) == null ? void 0 : n._$AD) === i)
958
958
  this._$AH.p(e);
959
959
  else {
960
- const o = new je(i, this), l = o.u(this.options);
961
- o.p(e), this.$(l), this._$AH = o;
960
+ const o = new je(i, this), a = o.u(this.options);
961
+ o.p(e), this.$(a), this._$AH = o;
962
962
  }
963
963
  }
964
964
  _$AC(t) {
965
- let e = kt.get(t.strings);
966
- return e === void 0 && kt.set(t.strings, e = new J(t)), e;
965
+ let e = It.get(t.strings);
966
+ return e === void 0 && It.set(t.strings, e = new K(t)), e;
967
967
  }
968
968
  T(t) {
969
969
  re(this._$AH) || (this._$AH = [], this._$AR());
970
970
  const e = this._$AH;
971
971
  let s, i = 0;
972
972
  for (const n of t)
973
- i === e.length ? e.push(s = new F(this.k(q()), this.k(q()), this, this.options)) : s = e[i], s._$AI(n), i++;
973
+ i === e.length ? e.push(s = new J(this.k(q()), this.k(q()), this, this.options)) : s = e[i], s._$AI(n), i++;
974
974
  i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);
975
975
  }
976
976
  _$AR(t = this._$AA.nextSibling, e) {
@@ -999,12 +999,12 @@ class it {
999
999
  const n = this.strings;
1000
1000
  let o = !1;
1001
1001
  if (n === void 0)
1002
- t = O(this, t, e, 0), o = !K(t) || t !== this._$AH && t !== H, o && (this._$AH = t);
1002
+ t = N(this, t, e, 0), o = !X(t) || t !== this._$AH && t !== O, o && (this._$AH = t);
1003
1003
  else {
1004
- const l = t;
1005
- let h, d;
1004
+ const a = t;
1005
+ let h, c;
1006
1006
  for (t = n[0], h = 0; h < n.length - 1; h++)
1007
- d = O(this, l[s + h], e, h), d === H && (d = this._$AH[h]), o || (o = !K(d) || d !== this._$AH[h]), d === $ ? t = $ : t !== $ && (t += (d ?? "") + n[h + 1]), this._$AH[h] = d;
1007
+ c = N(this, a[s + h], e, h), c === O && (c = this._$AH[h]), o || (o = !X(c) || c !== this._$AH[h]), c === $ ? t = $ : t !== $ && (t += (c ?? "") + n[h + 1]), this._$AH[h] = c;
1008
1008
  }
1009
1009
  o && !i && this.O(t);
1010
1010
  }
@@ -1033,7 +1033,7 @@ class qe extends it {
1033
1033
  super(t, e, s, i, n), this.type = 5;
1034
1034
  }
1035
1035
  _$AI(t, e = this) {
1036
- if ((t = O(this, t, e, 0) ?? $) === H)
1036
+ if ((t = N(this, t, e, 0) ?? $) === O)
1037
1037
  return;
1038
1038
  const s = this._$AH, i = t === $ && s !== $ || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, n = t !== $ && (s === $ || i);
1039
1039
  i && this.element.removeEventListener(this.name, this, s), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
@@ -1043,7 +1043,7 @@ class qe extends it {
1043
1043
  typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
1044
1044
  }
1045
1045
  }
1046
- class Ke {
1046
+ class Xe {
1047
1047
  constructor(t, e, s) {
1048
1048
  this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
1049
1049
  }
@@ -1051,17 +1051,17 @@ class Ke {
1051
1051
  return this._$AM._$AU;
1052
1052
  }
1053
1053
  _$AI(t) {
1054
- O(this, t);
1054
+ N(this, t);
1055
1055
  }
1056
1056
  }
1057
1057
  const lt = z.litHtmlPolyfillSupport;
1058
- lt == null || lt(J, F), (z.litHtmlVersions ?? (z.litHtmlVersions = [])).push("3.1.0");
1059
- const Je = (r, t, e) => {
1058
+ lt == null || lt(K, J), (z.litHtmlVersions ?? (z.litHtmlVersions = [])).push("3.1.0");
1059
+ const Ke = (r, t, e) => {
1060
1060
  const s = (e == null ? void 0 : e.renderBefore) ?? t;
1061
1061
  let i = s._$litPart$;
1062
1062
  if (i === void 0) {
1063
1063
  const n = (e == null ? void 0 : e.renderBefore) ?? null;
1064
- s._$litPart$ = i = new F(t.insertBefore(q(), n), n, void 0, e ?? {});
1064
+ s._$litPart$ = i = new J(t.insertBefore(q(), n), n, void 0, e ?? {});
1065
1065
  }
1066
1066
  return i._$AI(r), i;
1067
1067
  };
@@ -1070,7 +1070,7 @@ const Je = (r, t, e) => {
1070
1070
  * Copyright 2017 Google LLC
1071
1071
  * SPDX-License-Identifier: BSD-3-Clause
1072
1072
  */
1073
- class j extends R {
1073
+ class j extends x {
1074
1074
  constructor() {
1075
1075
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
1076
1076
  }
@@ -1081,7 +1081,7 @@ class j extends R {
1081
1081
  }
1082
1082
  update(t) {
1083
1083
  const e = this.render();
1084
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Je(e, this.renderRoot, this.renderOptions);
1084
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Ke(e, this.renderRoot, this.renderOptions);
1085
1085
  }
1086
1086
  connectedCallback() {
1087
1087
  var t;
@@ -1092,15 +1092,15 @@ class j extends R {
1092
1092
  super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
1093
1093
  }
1094
1094
  render() {
1095
- return H;
1095
+ return O;
1096
1096
  }
1097
1097
  }
1098
1098
  var Dt;
1099
1099
  j._$litElement$ = !0, j.finalized = !0, (Dt = globalThis.litElementHydrateSupport) == null || Dt.call(globalThis, { LitElement: j });
1100
- const dt = globalThis.litElementPolyfillSupport;
1101
- dt == null || dt({ LitElement: j });
1100
+ const ct = globalThis.litElementPolyfillSupport;
1101
+ ct == null || ct({ LitElement: j });
1102
1102
  (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.2");
1103
- function Fe(r, t, e) {
1103
+ function Je(r, t, e) {
1104
1104
  function s(i) {
1105
1105
  e.dispatchEvent(new CustomEvent(i.type, i));
1106
1106
  }
@@ -1108,7 +1108,7 @@ function Fe(r, t, e) {
1108
1108
  t.removeEventListener(r, s);
1109
1109
  };
1110
1110
  }
1111
- class Ge {
1111
+ class Fe {
1112
1112
  constructor(t, e) {
1113
1113
  this._events = [], this._cleanup = [], this._forwardElementRef = jt(), this.host = t, this._events = e, t.addController(this);
1114
1114
  }
@@ -1118,7 +1118,7 @@ class Ge {
1118
1118
  hostConnected() {
1119
1119
  requestAnimationFrame(() => {
1120
1120
  this._events.forEach((t) => {
1121
- this._forwardElementRef.value && this._cleanup.push(Fe(t, this._forwardElementRef.value, this.host));
1121
+ this._forwardElementRef.value && this._cleanup.push(Je(t, this._forwardElementRef.value, this.host));
1122
1122
  });
1123
1123
  });
1124
1124
  }
@@ -1128,7 +1128,7 @@ class Ge {
1128
1128
  }), this._cleanup = [];
1129
1129
  }
1130
1130
  }
1131
- const Lt = "https://d2rxhdlm2q91uk.cloudfront.net", Xe = "https://d1ix11aj5kfygl.cloudfront.net", Ze = "https://d157jlwnudd93d.cloudfront.net", Vt = "https://bshyfw4h5a.execute-api.ap-southeast-2.amazonaws.com/dev", Ye = "https://gyzw7rpbq3.execute-api.ap-southeast-2.amazonaws.com/staging", Qe = "https://vfcjuim1l3.execute-api.ap-southeast-2.amazonaws.com/prod", ts = "http://localhost:6060/v2", es = "https://embed-dev.vouchfor.com/v2", ss = "https://embed-staging.vouchfor.com/v2", is = "https://embed.vouchfor.com/v2";
1131
+ const Lt = "https://d2rxhdlm2q91uk.cloudfront.net", Ge = "https://d1ix11aj5kfygl.cloudfront.net", Ze = "https://d157jlwnudd93d.cloudfront.net", Vt = "https://bshyfw4h5a.execute-api.ap-southeast-2.amazonaws.com/dev", Ye = "https://gyzw7rpbq3.execute-api.ap-southeast-2.amazonaws.com/staging", Qe = "https://vfcjuim1l3.execute-api.ap-southeast-2.amazonaws.com/prod", ts = "http://localhost:6060/v2", es = "https://embed-dev.vouchfor.com/v2", ss = "https://embed-staging.vouchfor.com/v2", is = "https://embed.vouchfor.com/v2";
1132
1132
  function et(r) {
1133
1133
  if (!["local", "dev", "staging", "prod"].includes(r))
1134
1134
  throw new Error(`Unknown environment: ${r}`);
@@ -1146,7 +1146,7 @@ function et(r) {
1146
1146
  };
1147
1147
  if (r === "staging")
1148
1148
  return {
1149
- videoUrl: Xe,
1149
+ videoUrl: Ge,
1150
1150
  publicApiUrl: Ye,
1151
1151
  embedApiUrl: ss
1152
1152
  };
@@ -1160,44 +1160,54 @@ function et(r) {
1160
1160
  class rs {
1161
1161
  constructor(t) {
1162
1162
  this._fetching = !1, this.getVouch = async (e, s, i) => {
1163
- const { embedApiUrl: n } = et(e), o = await fetch(`${n}/vouches/${i}`, {
1163
+ var d;
1164
+ const { embedApiUrl: n } = et(e), o = P(), a = await fetch(`${n}/vouches/${i}`, {
1164
1165
  method: "GET",
1165
- headers: [["X-Api-Key", s]]
1166
- }).then((l) => (this.host.dispatchEvent(new CustomEvent("vouch:loaded", { detail: i })), l.json()));
1167
- return fetch(`${n}/vouches/${i}`, {
1166
+ headers: [
1167
+ ["X-Api-Key", s],
1168
+ ["X-Cache-Check", o]
1169
+ ]
1170
+ }), h = await a.json();
1171
+ this.host.dispatchEvent(new CustomEvent("vouch:loaded", { detail: i }));
1172
+ const c = (d = a == null ? void 0 : a.headers) == null ? void 0 : d.get("X-Cache-Check");
1173
+ return c && c !== o && fetch(`${n}/vouches/${i}`, {
1168
1174
  method: "GET",
1169
1175
  headers: [
1170
1176
  ["X-Api-Key", s],
1171
1177
  ["Cache-Control", "max-age=0"]
1172
1178
  ]
1173
- }), o;
1179
+ }), h;
1174
1180
  }, this.getTemplate = async (e, s, i) => {
1175
- const { embedApiUrl: n } = et(e), o = await fetch(`${n}/templates/${i}`, {
1181
+ var d;
1182
+ const { embedApiUrl: n } = et(e), o = P(), a = await fetch(`${n}/templates/${i}`, {
1176
1183
  method: "GET",
1177
- headers: [["X-Api-Key", s]]
1178
- }).then((l) => l.json());
1179
- return fetch(`${n}/templates/${i}`, {
1184
+ headers: [
1185
+ ["X-Api-Key", s],
1186
+ ["X-Cache-Check", o]
1187
+ ]
1188
+ }), h = await a.json(), c = (d = a == null ? void 0 : a.headers) == null ? void 0 : d.get("X-Cache-Check");
1189
+ return c && c !== o && fetch(`${n}/templates/${i}`, {
1180
1190
  method: "GET",
1181
1191
  headers: [
1182
1192
  ["X-Api-Key", s],
1183
1193
  ["Cache-Control", "max-age=0"]
1184
1194
  ]
1185
- }), o;
1195
+ }), h;
1186
1196
  }, this.host = t, new ae(
1187
1197
  this.host,
1188
1198
  async ([e, s, i, n, o]) => {
1189
- var l, h, d, c;
1199
+ var a, h, c, d;
1190
1200
  try {
1191
1201
  if (t.vouch = void 0, t.template = void 0, i) {
1192
- let a;
1193
- o && (this.fetching = !0, a = await this.getTemplate(e, s, o)), t.vouch = i, t.template = a ?? ((h = (l = i == null ? void 0 : i.settings) == null ? void 0 : l.template) == null ? void 0 : h.instance);
1202
+ let l;
1203
+ o && (this.fetching = !0, l = await this.getTemplate(e, s, o)), t.vouch = i, t.template = l ?? ((h = (a = i == null ? void 0 : i.settings) == null ? void 0 : a.template) == null ? void 0 : h.instance);
1194
1204
  } else if (n) {
1195
1205
  this.fetching = !0;
1196
- const [a, p] = await Promise.all([
1206
+ const [l, p] = await Promise.all([
1197
1207
  this.getVouch(e, s, n),
1198
1208
  o ? this.getTemplate(e, s, o) : null
1199
1209
  ]);
1200
- t.vouch = a, t.template = p ?? ((c = (d = a == null ? void 0 : a.settings) == null ? void 0 : d.template) == null ? void 0 : c.instance);
1210
+ t.vouch = l, t.template = p ?? ((d = (c = l == null ? void 0 : l.settings) == null ? void 0 : c.template) == null ? void 0 : d.instance);
1201
1211
  }
1202
1212
  } finally {
1203
1213
  this.fetching = !1;
@@ -1213,7 +1223,7 @@ class rs {
1213
1223
  return this._fetching;
1214
1224
  }
1215
1225
  }
1216
- const ns = 2e3;
1226
+ const ns = 1e4;
1217
1227
  class os {
1218
1228
  constructor(t) {
1219
1229
  this._tabId = void 0, this._clientId = void 0, this._visitorId = void 0, this._hasPlayed = !1, this._hasLoaded = {}, this._answersViewed = {}, this._streamedTime = {}, this._streamedPrevTimestamp = {}, this._createVisitor = (e) => {
@@ -1223,10 +1233,10 @@ class os {
1223
1233
  }, this._getReportingMetadata = () => {
1224
1234
  var n, o;
1225
1235
  const [e, s] = ((o = (n = Intl.DateTimeFormat().resolvedOptions().timeZone) == null ? void 0 : n.split) == null ? void 0 : o.call(n, "/")) ?? [], i = {};
1226
- return [...new URLSearchParams(location.search).entries()].forEach(([l, h]) => {
1227
- if (/utm/.test(l)) {
1228
- const d = l.toLowerCase().replace(/[-_][a-z0-9]/g, (c) => c.slice(-1).toUpperCase());
1229
- i[d] = h;
1236
+ return [...new URLSearchParams(location.search).entries()].forEach(([a, h]) => {
1237
+ if (/utm/.test(a)) {
1238
+ const c = a.toLowerCase().replace(/[-_][a-z0-9]/g, (d) => d.slice(-1).toUpperCase());
1239
+ i[c] = h;
1230
1240
  }
1231
1241
  }), {
1232
1242
  source: this.host.trackingSource,
@@ -1240,8 +1250,8 @@ class os {
1240
1250
  ...i
1241
1251
  };
1242
1252
  }, this._sendTrackingEvent = (e, s) => {
1243
- const { publicApiUrl: i } = et(this.host.env), { client: n, tab: o, request: l, visitor: h } = this._getUids();
1244
- navigator.sendBeacon(
1253
+ const { publicApiUrl: i } = et(this.host.env), { client: n, tab: o, request: a, visitor: h } = this._getUids();
1254
+ this.host.enableTracking && navigator.sendBeacon(
1245
1255
  `${i}/api/events`,
1246
1256
  JSON.stringify({
1247
1257
  event: e,
@@ -1249,7 +1259,7 @@ class os {
1249
1259
  context: {
1250
1260
  "x-uid-client": n,
1251
1261
  "x-uid-tab": o,
1252
- "x-uid-request": l,
1262
+ "x-uid-request": a,
1253
1263
  "x-uid-visitor": h,
1254
1264
  "x-reporting-metadata": this._getReportingMetadata()
1255
1265
  }
@@ -1272,13 +1282,13 @@ class os {
1272
1282
  answerId: e
1273
1283
  }), this._answersViewed[e] = !0), this._streamedTime[e] = s.currentTime, this._streamedPrevTimestamp[e] = Date.now());
1274
1284
  }, this._handleVideoTimeUpdate = ({ detail: { id: e, node: s } }) => {
1275
- var o, l;
1285
+ var o, a;
1276
1286
  const i = this._findVouchId();
1277
1287
  if (!i)
1278
1288
  return;
1279
1289
  const n = Date.now();
1280
- !this.host.paused && // Only fire the video seeked event when this video is the active one
1281
- e === ((l = (o = this.host.scene) == null ? void 0 : o.video) == null ? void 0 : l.id) && // Throttle the frequency that we send streamed events while playing
1290
+ s.currentTime && !s.paused && !this.host.paused && // Only fire the video seeked event when this video is the active one
1291
+ e === ((a = (o = this.host.scene) == null ? void 0 : o.video) == null ? void 0 : a.id) && // Throttle the frequency that we send streamed events while playing
1282
1292
  n - this._streamedPrevTimestamp[e] > ns && (this._sendTrackingEvent("VIDEO_STREAMED", {
1283
1293
  vouchId: i,
1284
1294
  answerId: e,
@@ -1287,7 +1297,7 @@ class os {
1287
1297
  }), this._streamedTime[e] = s.currentTime, this._streamedPrevTimestamp[e] = n);
1288
1298
  }, this._handleVideoPause = ({ detail: { id: e, node: s } }) => {
1289
1299
  const i = this._findVouchId();
1290
- i && (this._sendTrackingEvent("VIDEO_STREAMED", {
1300
+ i && (s.currentTime > this._streamedTime[e] && this._sendTrackingEvent("VIDEO_STREAMED", {
1291
1301
  vouchId: i,
1292
1302
  answerId: e,
1293
1303
  streamStart: this._streamedTime[e],
@@ -1296,19 +1306,19 @@ class os {
1296
1306
  }, this.host = t, t.addController(this);
1297
1307
  }
1298
1308
  _findVouchId() {
1299
- if (this.host.data)
1300
- return "uuid" in this.host.data ? this.host.data.uuid : this.host.data.id;
1309
+ if (this.host.vouch)
1310
+ return "uuid" in this.host.vouch ? this.host.vouch.uuid : this.host.vouch.id;
1301
1311
  }
1302
1312
  _getUids() {
1303
- var n, o, l, h, d, c, a, p, u, g, G, mt;
1313
+ var n, o, a, h, c, d, l, p, u, g, F, mt;
1304
1314
  if (typeof window > "u")
1305
1315
  return {
1306
1316
  client: null,
1307
1317
  tab: null,
1308
- request: N()
1318
+ request: P()
1309
1319
  };
1310
- const t = this._visitorId || ((o = (n = window.localStorage) == null ? void 0 : n.getItem) == null ? void 0 : o.call(n, "vouch-uid-visitor")) || this._createVisitor(N()), e = this._clientId || ((h = (l = window.localStorage) == null ? void 0 : l.getItem) == null ? void 0 : h.call(l, "vouch-uid-client")) || N(), s = this._tabId || ((c = (d = window.sessionStorage) == null ? void 0 : d.getItem) == null ? void 0 : c.call(d, "vouch-uid-tab")) || N(), i = N();
1311
- return t !== this._visitorId && (this._visitorId = t, (p = (a = window.localStorage) == null ? void 0 : a.setItem) == null || p.call(a, "vouch-uid-visitor", t)), e !== this._clientId && (this._clientId = e, (g = (u = window.localStorage) == null ? void 0 : u.setItem) == null || g.call(u, "vouch-uid-client", e)), s !== this._tabId && (this._tabId = s, (mt = (G = window.sessionStorage) == null ? void 0 : G.setItem) == null || mt.call(G, "vouch-uid-tab", s)), {
1320
+ const t = this._visitorId || ((o = (n = window.localStorage) == null ? void 0 : n.getItem) == null ? void 0 : o.call(n, "vouch-uid-visitor")) || this._createVisitor(P()), e = this._clientId || ((h = (a = window.localStorage) == null ? void 0 : a.getItem) == null ? void 0 : h.call(a, "vouch-uid-client")) || P(), s = this._tabId || ((d = (c = window.sessionStorage) == null ? void 0 : c.getItem) == null ? void 0 : d.call(c, "vouch-uid-tab")) || P(), i = P();
1321
+ return t !== this._visitorId && (this._visitorId = t, (p = (l = window.localStorage) == null ? void 0 : l.setItem) == null || p.call(l, "vouch-uid-visitor", t)), e !== this._clientId && (this._clientId = e, (g = (u = window.localStorage) == null ? void 0 : u.setItem) == null || g.call(u, "vouch-uid-client", e)), s !== this._tabId && (this._tabId = s, (mt = (F = window.sessionStorage) == null ? void 0 : F.setItem) == null || mt.call(F, "vouch-uid-tab", s)), {
1312
1322
  client: e,
1313
1323
  tab: s,
1314
1324
  request: i,
@@ -1333,7 +1343,7 @@ var hs = Object.defineProperty, as = Object.getOwnPropertyDescriptor, f = (r, t,
1333
1343
  };
1334
1344
  let m = class extends j {
1335
1345
  constructor() {
1336
- super(...arguments), this._mediaPlayerRef = jt(), this.env = "prod", this.apiKey = "", this.trackingSource = "embed", this.preload = "auto", this.autoplay = !1, this.aspectRatio = 0, this.eventController = new Ge(this, [
1346
+ super(...arguments), this._mediaPlayerRef = jt(), this.env = "prod", this.apiKey = "", this.enableTracking = !0, this.trackingSource = "embed", this.preload = "auto", this.autoplay = !1, this.aspectRatio = 0, this.eventController = new Fe(this, [
1337
1347
  "durationchange",
1338
1348
  "ended",
1339
1349
  "error",
@@ -1473,6 +1483,9 @@ f([
1473
1483
  f([
1474
1484
  v({ type: String })
1475
1485
  ], m.prototype, "apiKey", 2);
1486
+ f([
1487
+ v({ type: Boolean })
1488
+ ], m.prototype, "enableTracking", 2);
1476
1489
  f([
1477
1490
  v({ type: String })
1478
1491
  ], m.prototype, "trackingSource", 2);