@vouchfor/embeds 0.0.0-experiment.d900f80 → 0.0.0-experiment.dce2e9b
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/es/components/Embed/index.d.ts +3 -1
- package/dist/es/embeds.js +928 -646
- package/dist/es/embeds.js.map +1 -1
- package/dist/es/utils/env.d.ts +5 -11
- package/dist/iife/embeds.iife.js +172 -184
- package/dist/iife/embeds.iife.js.map +1 -1
- package/package.json +4 -4
- package/src/components/Embed/Embed.stories.ts +3 -3
- package/src/components/Embed/controllers/fetcher.ts +32 -7
- package/src/components/Embed/controllers/tracking.ts +1 -1
- package/src/components/Embed/index.ts +2 -0
- package/src/utils/env.ts +18 -32
- package/dist/es/components/Embed/controllers/event-forwarder.d.ts +0 -14
package/dist/es/embeds.js
CHANGED
@@ -1,17 +1,18 @@
|
|
1
|
-
import { property as
|
2
|
-
import { ifDefined as
|
3
|
-
import { createRef as
|
4
|
-
import { Task as
|
1
|
+
import { property as v, state as zt, customElement as he } from "lit/decorators.js";
|
2
|
+
import { ifDefined as ft } from "lit/directives/if-defined.js";
|
3
|
+
import { createRef as jt, ref as Bt } from "lit/directives/ref.js";
|
4
|
+
import { Task as ae } from "@lit/task";
|
5
|
+
import { v4 as N } from "uuid";
|
5
6
|
import "@vouchfor/media-player";
|
6
7
|
/**
|
7
8
|
* @license
|
8
9
|
* Copyright 2019 Google LLC
|
9
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
10
11
|
*/
|
11
|
-
const
|
12
|
-
let
|
13
|
-
constructor(t, e,
|
14
|
-
if (this._$cssResult$ = !0,
|
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();
|
13
|
+
let le = class {
|
14
|
+
constructor(t, e, s) {
|
15
|
+
if (this._$cssResult$ = !0, s !== Wt)
|
15
16
|
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
16
17
|
this.cssText = t, this.t = e;
|
17
18
|
}
|
@@ -19,8 +20,8 @@ let ee = class {
|
|
19
20
|
let t = this.o;
|
20
21
|
const e = this.t;
|
21
22
|
if (_t && t === void 0) {
|
22
|
-
const
|
23
|
-
|
23
|
+
const s = e !== void 0 && e.length === 1;
|
24
|
+
s && (t = gt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && gt.set(e, t));
|
24
25
|
}
|
25
26
|
return t;
|
26
27
|
}
|
@@ -28,176 +29,201 @@ let ee = class {
|
|
28
29
|
return this.cssText;
|
29
30
|
}
|
30
31
|
};
|
31
|
-
const
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
32
|
+
const de = (r) => new le(typeof r == "string" ? r : r + "", void 0, Wt), ce = (r, t) => {
|
33
|
+
if (_t)
|
34
|
+
r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
35
|
+
else
|
36
|
+
for (const e of t) {
|
37
|
+
const s = document.createElement("style"), i = X.litNonce;
|
38
|
+
i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, r.appendChild(s);
|
39
|
+
}
|
40
|
+
}, vt = _t ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
|
37
41
|
let e = "";
|
38
|
-
for (const
|
39
|
-
e +=
|
40
|
-
return
|
41
|
-
})(
|
42
|
+
for (const s of t.cssRules)
|
43
|
+
e += s.cssText;
|
44
|
+
return de(e);
|
45
|
+
})(r) : r;
|
42
46
|
/**
|
43
47
|
* @license
|
44
48
|
* Copyright 2017 Google LLC
|
45
49
|
* SPDX-License-Identifier: BSD-3-Clause
|
46
50
|
*/
|
47
|
-
|
48
|
-
const K = window, At = K.trustedTypes, ne = At ? At.emptyScript : "", yt = K.reactiveElementPolyfillSupport, dt = { toAttribute(n, 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, ct = { toAttribute(r, t) {
|
49
52
|
switch (t) {
|
50
53
|
case Boolean:
|
51
|
-
|
54
|
+
r = r ? ge : null;
|
52
55
|
break;
|
53
56
|
case Object:
|
54
57
|
case Array:
|
55
|
-
|
58
|
+
r = r == null ? r : JSON.stringify(r);
|
56
59
|
}
|
57
|
-
return
|
58
|
-
}, fromAttribute(
|
59
|
-
let e =
|
60
|
+
return r;
|
61
|
+
}, fromAttribute(r, t) {
|
62
|
+
let e = r;
|
60
63
|
switch (t) {
|
61
64
|
case Boolean:
|
62
|
-
e =
|
65
|
+
e = r !== null;
|
63
66
|
break;
|
64
67
|
case Number:
|
65
|
-
e =
|
68
|
+
e = r === null ? null : Number(r);
|
66
69
|
break;
|
67
70
|
case Object:
|
68
71
|
case Array:
|
69
72
|
try {
|
70
|
-
e = JSON.parse(
|
73
|
+
e = JSON.parse(r);
|
71
74
|
} catch {
|
72
75
|
e = null;
|
73
76
|
}
|
74
77
|
}
|
75
78
|
return e;
|
76
|
-
} },
|
77
|
-
|
78
|
-
|
79
|
-
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u();
|
80
|
-
}
|
79
|
+
} }, qt = (r, t) => !pe(r, t), At = { attribute: !0, type: String, converter: ct, reflect: !1, hasChanged: qt };
|
80
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), E.litPropertyMetadata ?? (E.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
81
|
+
let M = class extends HTMLElement {
|
81
82
|
static addInitializer(t) {
|
82
|
-
|
83
|
-
this.finalize(), ((e = this.h) !== null && e !== void 0 ? e : this.h = []).push(t);
|
83
|
+
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
84
84
|
}
|
85
85
|
static get observedAttributes() {
|
86
|
-
this.finalize();
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
s
|
91
|
-
|
92
|
-
}
|
93
|
-
static createProperty(t, e = it) {
|
94
|
-
if (e.state && (e.attribute = !1), this.finalize(), this.elementProperties.set(t, e), !e.noAccessor && !this.prototype.hasOwnProperty(t)) {
|
95
|
-
const i = typeof t == "symbol" ? Symbol() : "__" + t, s = this.getPropertyDescriptor(t, i, e);
|
96
|
-
s !== void 0 && Object.defineProperty(this.prototype, t, s);
|
86
|
+
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
87
|
+
}
|
88
|
+
static createProperty(t, e = At) {
|
89
|
+
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
90
|
+
const s = Symbol(), i = this.getPropertyDescriptor(t, s, e);
|
91
|
+
i !== void 0 && ue(this.prototype, t, i);
|
97
92
|
}
|
98
93
|
}
|
99
|
-
static getPropertyDescriptor(t, e,
|
100
|
-
|
94
|
+
static getPropertyDescriptor(t, e, s) {
|
95
|
+
const { get: i, set: n } = _e(this.prototype, t) ?? { get() {
|
101
96
|
return this[e];
|
102
|
-
}, set(
|
103
|
-
|
104
|
-
|
97
|
+
}, set(o) {
|
98
|
+
this[e] = o;
|
99
|
+
} };
|
100
|
+
return { get() {
|
101
|
+
return i == null ? void 0 : i.call(this);
|
102
|
+
}, set(o) {
|
103
|
+
const l = i == null ? void 0 : i.call(this);
|
104
|
+
n.call(this, o), this.requestUpdate(t, l, s);
|
105
105
|
}, configurable: !0, enumerable: !0 };
|
106
106
|
}
|
107
107
|
static getPropertyOptions(t) {
|
108
|
-
return this.elementProperties.get(t)
|
108
|
+
return this.elementProperties.get(t) ?? At;
|
109
|
+
}
|
110
|
+
static _$Ei() {
|
111
|
+
if (this.hasOwnProperty(L("elementProperties")))
|
112
|
+
return;
|
113
|
+
const t = fe(this);
|
114
|
+
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
109
115
|
}
|
110
116
|
static finalize() {
|
111
|
-
if (this.hasOwnProperty(
|
112
|
-
return
|
113
|
-
this
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
117
|
+
if (this.hasOwnProperty(L("finalized")))
|
118
|
+
return;
|
119
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(L("properties"))) {
|
120
|
+
const e = this.properties, s = [...$e(e), ...me(e)];
|
121
|
+
for (const i of s)
|
122
|
+
this.createProperty(i, e[i]);
|
123
|
+
}
|
124
|
+
const t = this[Symbol.metadata];
|
125
|
+
if (t !== null) {
|
126
|
+
const e = litPropertyMetadata.get(t);
|
127
|
+
if (e !== void 0)
|
128
|
+
for (const [s, i] of e)
|
129
|
+
this.elementProperties.set(s, i);
|
119
130
|
}
|
120
|
-
|
131
|
+
this._$Eh = /* @__PURE__ */ new Map();
|
132
|
+
for (const [e, s] of this.elementProperties) {
|
133
|
+
const i = this._$Eu(e, s);
|
134
|
+
i !== void 0 && this._$Eh.set(i, e);
|
135
|
+
}
|
136
|
+
this.elementStyles = this.finalizeStyles(this.styles);
|
121
137
|
}
|
122
138
|
static finalizeStyles(t) {
|
123
139
|
const e = [];
|
124
140
|
if (Array.isArray(t)) {
|
125
|
-
const
|
126
|
-
for (const
|
127
|
-
e.unshift(
|
141
|
+
const s = new Set(t.flat(1 / 0).reverse());
|
142
|
+
for (const i of s)
|
143
|
+
e.unshift(vt(i));
|
128
144
|
} else
|
129
|
-
t !== void 0 && e.push(
|
145
|
+
t !== void 0 && e.push(vt(t));
|
130
146
|
return e;
|
131
147
|
}
|
132
|
-
static _$
|
133
|
-
const
|
134
|
-
return
|
148
|
+
static _$Eu(t, e) {
|
149
|
+
const s = e.attribute;
|
150
|
+
return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
|
151
|
+
}
|
152
|
+
constructor() {
|
153
|
+
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
135
154
|
}
|
136
|
-
|
155
|
+
_$Ev() {
|
137
156
|
var t;
|
138
|
-
this._$
|
157
|
+
this._$Eg = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$ES(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach((e) => e(this));
|
139
158
|
}
|
140
159
|
addController(t) {
|
141
|
-
var e
|
142
|
-
(
|
160
|
+
var e;
|
161
|
+
(this._$E_ ?? (this._$E_ = /* @__PURE__ */ new Set())).add(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
|
143
162
|
}
|
144
163
|
removeController(t) {
|
145
164
|
var e;
|
146
|
-
(e = this._$
|
165
|
+
(e = this._$E_) == null || e.delete(t);
|
147
166
|
}
|
148
|
-
_$
|
149
|
-
|
150
|
-
|
151
|
-
|
167
|
+
_$ES() {
|
168
|
+
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
169
|
+
for (const s of e.keys())
|
170
|
+
this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
|
171
|
+
t.size > 0 && (this._$Ep = t);
|
152
172
|
}
|
153
173
|
createRenderRoot() {
|
154
|
-
|
155
|
-
|
156
|
-
return se(e, this.constructor.elementStyles), e;
|
174
|
+
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
175
|
+
return ce(t, this.constructor.elementStyles), t;
|
157
176
|
}
|
158
177
|
connectedCallback() {
|
159
178
|
var t;
|
160
|
-
this.renderRoot
|
161
|
-
var
|
162
|
-
return (
|
179
|
+
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$E_) == null || t.forEach((e) => {
|
180
|
+
var s;
|
181
|
+
return (s = e.hostConnected) == null ? void 0 : s.call(e);
|
163
182
|
});
|
164
183
|
}
|
165
184
|
enableUpdating(t) {
|
166
185
|
}
|
167
186
|
disconnectedCallback() {
|
168
187
|
var t;
|
169
|
-
(t = this._$
|
170
|
-
var
|
171
|
-
return (
|
188
|
+
(t = this._$E_) == null || t.forEach((e) => {
|
189
|
+
var s;
|
190
|
+
return (s = e.hostDisconnected) == null ? void 0 : s.call(e);
|
172
191
|
});
|
173
192
|
}
|
174
|
-
attributeChangedCallback(t, e,
|
175
|
-
this._$AK(t,
|
193
|
+
attributeChangedCallback(t, e, s) {
|
194
|
+
this._$AK(t, s);
|
176
195
|
}
|
177
|
-
_$EO(t, e
|
178
|
-
var
|
179
|
-
const
|
180
|
-
if (
|
181
|
-
const o = (((
|
182
|
-
this._$
|
196
|
+
_$EO(t, e) {
|
197
|
+
var n;
|
198
|
+
const s = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, s);
|
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);
|
201
|
+
this._$Em = t, o == null ? this.removeAttribute(i) : this.setAttribute(i, o), this._$Em = null;
|
183
202
|
}
|
184
203
|
}
|
185
204
|
_$AK(t, e) {
|
186
|
-
var
|
187
|
-
const s = this.constructor,
|
188
|
-
if (
|
189
|
-
const o = s.getPropertyOptions(
|
190
|
-
this._$
|
205
|
+
var n;
|
206
|
+
const s = this.constructor, i = s._$Eh.get(t);
|
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;
|
210
|
+
}
|
211
|
+
}
|
212
|
+
requestUpdate(t, e, s, i = !1, n) {
|
213
|
+
if (t !== void 0) {
|
214
|
+
if (s ?? (s = this.constructor.getPropertyOptions(t)), !(s.hasChanged ?? qt)(i ? n : this[t], e))
|
215
|
+
return;
|
216
|
+
this.C(t, e, s);
|
191
217
|
}
|
218
|
+
this.isUpdatePending === !1 && (this._$Eg = this._$EP());
|
192
219
|
}
|
193
|
-
|
194
|
-
|
195
|
-
t !== void 0 && (((i = i || this.constructor.getPropertyOptions(t)).hasChanged || Bt)(this[t], e) ? (this._$AL.has(t) || this._$AL.set(t, e), i.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, i))) : s = !1), !this.isUpdatePending && s && (this._$E_ = this._$Ej());
|
220
|
+
C(t, e, s) {
|
221
|
+
this._$AL.has(t) || this._$AL.set(t, e), s.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
|
196
222
|
}
|
197
|
-
async _$
|
223
|
+
async _$EP() {
|
198
224
|
this.isUpdatePending = !0;
|
199
225
|
try {
|
200
|
-
await this._$
|
226
|
+
await this._$Eg;
|
201
227
|
} catch (e) {
|
202
228
|
Promise.reject(e);
|
203
229
|
}
|
@@ -208,139 +234,141 @@ let T = class extends HTMLElement {
|
|
208
234
|
return this.performUpdate();
|
209
235
|
}
|
210
236
|
performUpdate() {
|
211
|
-
var
|
237
|
+
var s;
|
212
238
|
if (!this.isUpdatePending)
|
213
239
|
return;
|
214
|
-
|
215
|
-
|
216
|
-
|
240
|
+
if (!this.hasUpdated) {
|
241
|
+
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
242
|
+
for (const [n, o] of this._$Ep)
|
243
|
+
this[n] = o;
|
244
|
+
this._$Ep = void 0;
|
245
|
+
}
|
246
|
+
const i = this.constructor.elementProperties;
|
247
|
+
if (i.size > 0)
|
248
|
+
for (const [n, o] of i)
|
249
|
+
o.wrapped !== !0 || this._$AL.has(n) || this[n] === void 0 || this.C(n, this[n], o);
|
250
|
+
}
|
251
|
+
let t = !1;
|
252
|
+
const e = this._$AL;
|
217
253
|
try {
|
218
|
-
|
219
|
-
var
|
220
|
-
return (
|
221
|
-
}), this.update(
|
222
|
-
} catch (
|
223
|
-
throw
|
254
|
+
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$E_) == null || s.forEach((i) => {
|
255
|
+
var n;
|
256
|
+
return (n = i.hostUpdate) == null ? void 0 : n.call(i);
|
257
|
+
}), this.update(e)) : this._$ET();
|
258
|
+
} catch (i) {
|
259
|
+
throw t = !1, this._$ET(), i;
|
224
260
|
}
|
225
|
-
|
261
|
+
t && this._$AE(e);
|
226
262
|
}
|
227
263
|
willUpdate(t) {
|
228
264
|
}
|
229
265
|
_$AE(t) {
|
230
266
|
var e;
|
231
|
-
(e = this._$
|
232
|
-
var
|
233
|
-
return (
|
267
|
+
(e = this._$E_) == null || e.forEach((s) => {
|
268
|
+
var i;
|
269
|
+
return (i = s.hostUpdated) == null ? void 0 : i.call(s);
|
234
270
|
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
235
271
|
}
|
236
|
-
_$
|
272
|
+
_$ET() {
|
237
273
|
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
238
274
|
}
|
239
275
|
get updateComplete() {
|
240
276
|
return this.getUpdateComplete();
|
241
277
|
}
|
242
278
|
getUpdateComplete() {
|
243
|
-
return this._$
|
279
|
+
return this._$Eg;
|
244
280
|
}
|
245
281
|
shouldUpdate(t) {
|
246
282
|
return !0;
|
247
283
|
}
|
248
284
|
update(t) {
|
249
|
-
this._$
|
285
|
+
this._$Ej && (this._$Ej = this._$Ej.forEach((e) => this._$EO(e, this[e]))), this._$ET();
|
250
286
|
}
|
251
287
|
updated(t) {
|
252
288
|
}
|
253
289
|
firstUpdated(t) {
|
254
290
|
}
|
255
291
|
};
|
256
|
-
|
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");
|
257
293
|
/**
|
258
294
|
* @license
|
259
295
|
* Copyright 2017 Google LLC
|
260
296
|
* SPDX-License-Identifier: BSD-3-Clause
|
261
297
|
*/
|
262
|
-
|
263
|
-
|
264
|
-
\f\r]
|
265
|
-
|
266
|
-
|
267
|
-
if (!Array.isArray(n) || !n.hasOwnProperty("raw"))
|
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) {
|
302
|
+
if (!Array.isArray(r) || !r.hasOwnProperty("raw"))
|
268
303
|
throw Error("invalid template strings array");
|
269
304
|
return Et !== void 0 ? Et.createHTML(t) : t;
|
270
305
|
}
|
271
|
-
const
|
272
|
-
const e =
|
273
|
-
let
|
274
|
-
for (let
|
275
|
-
const
|
276
|
-
let
|
277
|
-
for (;
|
278
|
-
|
279
|
-
const
|
280
|
-
|
281
|
-
}
|
282
|
-
return [
|
306
|
+
const Ae = (r, t) => {
|
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];
|
283
318
|
};
|
284
|
-
let pt = class
|
285
|
-
constructor({ strings: t, _$litType$: e },
|
286
|
-
let
|
319
|
+
let pt = class Zt {
|
320
|
+
constructor({ strings: t, _$litType$: e }, s) {
|
321
|
+
let i;
|
287
322
|
this.parts = [];
|
288
|
-
let
|
289
|
-
const
|
290
|
-
if (this.el =
|
291
|
-
const
|
292
|
-
|
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);
|
293
328
|
}
|
294
|
-
for (; (
|
295
|
-
if (
|
296
|
-
if (
|
297
|
-
const
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
if (Wt.test(s.tagName)) {
|
311
|
-
const h = s.textContent.split(E), c = h.length - 1;
|
312
|
-
if (c > 0) {
|
313
|
-
s.textContent = x ? x.emptyScript : "";
|
314
|
-
for (let p = 0; p < c; p++)
|
315
|
-
s.append(h[p], G()), P.nextNode(), l.push({ type: 2, index: ++r });
|
316
|
-
s.append(h[c], G());
|
329
|
+
for (; (i = P.nextNode()) !== null && h.length < l; ) {
|
330
|
+
if (i.nodeType === 1) {
|
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);
|
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;
|
340
|
+
if (p > 0) {
|
341
|
+
i.textContent = Y ? Y.emptyScript : "";
|
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());
|
317
345
|
}
|
318
346
|
}
|
319
|
-
} else if (
|
320
|
-
if (
|
321
|
-
|
347
|
+
} else if (i.nodeType === 8)
|
348
|
+
if (i.data === Jt)
|
349
|
+
h.push({ type: 2, index: n });
|
322
350
|
else {
|
323
|
-
let
|
324
|
-
for (; (
|
325
|
-
|
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;
|
326
354
|
}
|
327
|
-
|
355
|
+
n++;
|
328
356
|
}
|
329
357
|
}
|
330
358
|
static createElement(t, e) {
|
331
|
-
const
|
332
|
-
return
|
359
|
+
const s = U.createElement("template");
|
360
|
+
return s.innerHTML = t, s;
|
333
361
|
}
|
334
362
|
};
|
335
|
-
function
|
336
|
-
var
|
337
|
-
if (t ===
|
363
|
+
function x(r, t, e = r, s) {
|
364
|
+
var o, l;
|
365
|
+
if (t === W)
|
338
366
|
return t;
|
339
|
-
let
|
340
|
-
const
|
341
|
-
return (
|
367
|
+
let i = s !== void 0 ? (o = e._$Co) == null ? void 0 : o[s] : e._$Cl;
|
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;
|
342
370
|
}
|
343
|
-
let
|
371
|
+
let Ee = class {
|
344
372
|
constructor(t, e) {
|
345
373
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
346
374
|
}
|
@@ -351,32 +379,30 @@ let ae = class {
|
|
351
379
|
return this._$AM._$AU;
|
352
380
|
}
|
353
381
|
u(t) {
|
354
|
-
|
355
|
-
|
356
|
-
P.
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
a.type === 2 ? u = new Kt(o, o.nextSibling, this, t) : a.type === 1 ? u = new a.ctor(o, a.name, a.strings, this, t) : a.type === 6 && (u = new pe(o, this, t)), this._$AV.push(u), a = s[++l];
|
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];
|
385
|
+
for (; h !== void 0; ) {
|
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];
|
362
389
|
}
|
363
|
-
|
390
|
+
o !== (h == null ? void 0 : h.index) && (n = P.nextNode(), o++);
|
364
391
|
}
|
365
|
-
return P.currentNode =
|
392
|
+
return P.currentNode = U, i;
|
366
393
|
}
|
367
|
-
|
394
|
+
p(t) {
|
368
395
|
let e = 0;
|
369
|
-
for (const
|
370
|
-
|
371
|
-
}
|
372
|
-
}, Kt = class Jt {
|
373
|
-
constructor(t, e, i, s) {
|
374
|
-
var r;
|
375
|
-
this.type = 2, this._$AH = v, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = s, this._$Cp = (r = s == null ? void 0 : s.isConnected) === null || r === void 0 || r;
|
396
|
+
for (const s of this._$AV)
|
397
|
+
s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
|
376
398
|
}
|
399
|
+
}, Yt = class Qt {
|
377
400
|
get _$AU() {
|
378
|
-
var t
|
379
|
-
return (
|
401
|
+
var t;
|
402
|
+
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
403
|
+
}
|
404
|
+
constructor(t, e, s, i) {
|
405
|
+
this.type = 2, this._$AH = _, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = i, this._$Cv = (i == null ? void 0 : i.isConnected) ?? !0;
|
380
406
|
}
|
381
407
|
get parentNode() {
|
382
408
|
let t = this._$AA.parentNode;
|
@@ -390,7 +416,7 @@ let ae = class {
|
|
390
416
|
return this._$AB;
|
391
417
|
}
|
392
418
|
_$AI(t, e = this) {
|
393
|
-
t =
|
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);
|
394
420
|
}
|
395
421
|
k(t) {
|
396
422
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
@@ -399,196 +425,473 @@ let ae = class {
|
|
399
425
|
this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
|
400
426
|
}
|
401
427
|
_(t) {
|
402
|
-
this._$AH !==
|
428
|
+
this._$AH !== _ && B(this._$AH) ? this._$AA.nextSibling.data = t : this.$(U.createTextNode(t)), this._$AH = t;
|
403
429
|
}
|
404
430
|
g(t) {
|
405
|
-
var
|
406
|
-
const { values:
|
407
|
-
if (((
|
408
|
-
this._$AH.
|
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);
|
433
|
+
if (((n = this._$AH) == null ? void 0 : n._$AD) === i)
|
434
|
+
this._$AH.p(e);
|
409
435
|
else {
|
410
|
-
const o = new
|
411
|
-
o.
|
436
|
+
const o = new Ee(i, this), l = o.u(this.options);
|
437
|
+
o.p(e), this.$(l), this._$AH = o;
|
412
438
|
}
|
413
439
|
}
|
414
440
|
_$AC(t) {
|
415
|
-
let e =
|
416
|
-
return e === void 0 &&
|
441
|
+
let e = Ct.get(t.strings);
|
442
|
+
return e === void 0 && Ct.set(t.strings, e = new pt(t)), e;
|
417
443
|
}
|
418
444
|
T(t) {
|
419
|
-
|
445
|
+
Ft(this._$AH) || (this._$AH = [], this._$AR());
|
420
446
|
const e = this._$AH;
|
421
|
-
let
|
422
|
-
for (const
|
423
|
-
|
424
|
-
|
447
|
+
let s, i = 0;
|
448
|
+
for (const n of t)
|
449
|
+
i === e.length ? e.push(s = new Qt(this.k(Q()), this.k(Q()), this, this.options)) : s = e[i], s._$AI(n), i++;
|
450
|
+
i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);
|
425
451
|
}
|
426
452
|
_$AR(t = this._$AA.nextSibling, e) {
|
427
|
-
var
|
428
|
-
for ((
|
429
|
-
const
|
430
|
-
t.remove(), t =
|
453
|
+
var s;
|
454
|
+
for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0, e); t && t !== this._$AB; ) {
|
455
|
+
const i = t.nextSibling;
|
456
|
+
t.remove(), t = i;
|
431
457
|
}
|
432
458
|
}
|
433
459
|
setConnected(t) {
|
434
460
|
var e;
|
435
|
-
this._$AM === void 0 && (this._$
|
436
|
-
}
|
437
|
-
}, Q = class {
|
438
|
-
constructor(t, e, i, s, r) {
|
439
|
-
this.type = 1, this._$AH = v, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = r, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = v;
|
461
|
+
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
440
462
|
}
|
463
|
+
}, st = class {
|
441
464
|
get tagName() {
|
442
465
|
return this.element.tagName;
|
443
466
|
}
|
444
467
|
get _$AU() {
|
445
468
|
return this._$AM._$AU;
|
446
469
|
}
|
447
|
-
|
448
|
-
|
470
|
+
constructor(t, e, s, i, n) {
|
471
|
+
this.type = 1, this._$AH = _, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = n, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = _;
|
472
|
+
}
|
473
|
+
_$AI(t, e = this, s, i) {
|
474
|
+
const n = this.strings;
|
449
475
|
let o = !1;
|
450
|
-
if (
|
451
|
-
t =
|
476
|
+
if (n === void 0)
|
477
|
+
t = x(this, t, e, 0), o = !B(t) || t !== this._$AH && t !== W, o && (this._$AH = t);
|
452
478
|
else {
|
453
|
-
const
|
454
|
-
let
|
455
|
-
for (t =
|
456
|
-
|
479
|
+
const l = t;
|
480
|
+
let h, d;
|
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;
|
457
483
|
}
|
458
|
-
o && !
|
484
|
+
o && !i && this.O(t);
|
459
485
|
}
|
460
|
-
|
461
|
-
t ===
|
486
|
+
O(t) {
|
487
|
+
t === _ ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
462
488
|
}
|
463
|
-
},
|
489
|
+
}, Se = class extends st {
|
464
490
|
constructor() {
|
465
491
|
super(...arguments), this.type = 3;
|
466
492
|
}
|
467
|
-
|
468
|
-
this.element[this.name] = t ===
|
493
|
+
O(t) {
|
494
|
+
this.element[this.name] = t === _ ? void 0 : t;
|
469
495
|
}
|
470
|
-
}
|
471
|
-
const de = x ? x.emptyScript : "";
|
472
|
-
let ce = class extends Q {
|
496
|
+
}, be = class extends st {
|
473
497
|
constructor() {
|
474
498
|
super(...arguments), this.type = 4;
|
475
499
|
}
|
476
|
-
|
477
|
-
|
500
|
+
O(t) {
|
501
|
+
this.element.toggleAttribute(this.name, !!t && t !== _);
|
478
502
|
}
|
479
|
-
},
|
480
|
-
constructor(t, e,
|
481
|
-
super(t, e,
|
503
|
+
}, we = class extends st {
|
504
|
+
constructor(t, e, s, i, n) {
|
505
|
+
super(t, e, s, i, n), this.type = 5;
|
482
506
|
}
|
483
507
|
_$AI(t, e = this) {
|
484
|
-
|
485
|
-
if ((t = (i = H(this, t, e, 0)) !== null && i !== void 0 ? i : v) === j)
|
508
|
+
if ((t = x(this, t, e, 0) ?? _) === W)
|
486
509
|
return;
|
487
|
-
const s = this._$AH,
|
488
|
-
|
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
|
+
i && this.element.removeEventListener(this.name, this, s), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
489
512
|
}
|
490
513
|
handleEvent(t) {
|
491
|
-
var e
|
492
|
-
typeof this._$AH == "function" ? this._$AH.call((
|
514
|
+
var e;
|
515
|
+
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
493
516
|
}
|
494
|
-
}
|
495
|
-
|
496
|
-
|
497
|
-
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
|
517
|
+
}, Pe = class {
|
518
|
+
constructor(t, e, s) {
|
519
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
|
498
520
|
}
|
499
521
|
get _$AU() {
|
500
522
|
return this._$AM._$AU;
|
501
523
|
}
|
502
524
|
_$AI(t) {
|
503
|
-
|
525
|
+
x(this, t);
|
526
|
+
}
|
527
|
+
};
|
528
|
+
const ot = V.litHtmlPolyfillSupport;
|
529
|
+
ot == null || ot(pt, Yt), (V.litHtmlVersions ?? (V.litHtmlVersions = [])).push("3.1.0");
|
530
|
+
/**
|
531
|
+
* @license
|
532
|
+
* Copyright 2019 Google LLC
|
533
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
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();
|
536
|
+
let Ce = class {
|
537
|
+
constructor(t, e, s) {
|
538
|
+
if (this._$cssResult$ = !0, s !== te)
|
539
|
+
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
540
|
+
this.cssText = t, this.t = e;
|
541
|
+
}
|
542
|
+
get styleSheet() {
|
543
|
+
let t = this.o;
|
544
|
+
const e = this.t;
|
545
|
+
if ($t && t === void 0) {
|
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));
|
548
|
+
}
|
549
|
+
return t;
|
550
|
+
}
|
551
|
+
toString() {
|
552
|
+
return this.cssText;
|
553
|
+
}
|
554
|
+
};
|
555
|
+
const Ue = (r) => new Ce(typeof r == "string" ? r : r + "", void 0, te), Te = (r, t) => {
|
556
|
+
if ($t)
|
557
|
+
r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
558
|
+
else
|
559
|
+
for (const e of t) {
|
560
|
+
const s = document.createElement("style"), i = Z.litNonce;
|
561
|
+
i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, r.appendChild(s);
|
562
|
+
}
|
563
|
+
}, Tt = $t ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
|
564
|
+
let e = "";
|
565
|
+
for (const s of t.cssRules)
|
566
|
+
e += s.cssText;
|
567
|
+
return Ue(e);
|
568
|
+
})(r) : r;
|
569
|
+
/**
|
570
|
+
* @license
|
571
|
+
* Copyright 2017 Google LLC
|
572
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
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) {
|
575
|
+
switch (t) {
|
576
|
+
case Boolean:
|
577
|
+
r = r ? Ie : null;
|
578
|
+
break;
|
579
|
+
case Object:
|
580
|
+
case Array:
|
581
|
+
r = r == null ? r : JSON.stringify(r);
|
582
|
+
}
|
583
|
+
return r;
|
584
|
+
}, fromAttribute(r, t) {
|
585
|
+
let e = r;
|
586
|
+
switch (t) {
|
587
|
+
case Boolean:
|
588
|
+
e = r !== null;
|
589
|
+
break;
|
590
|
+
case Number:
|
591
|
+
e = r === null ? null : Number(r);
|
592
|
+
break;
|
593
|
+
case Object:
|
594
|
+
case Array:
|
595
|
+
try {
|
596
|
+
e = JSON.parse(r);
|
597
|
+
} catch {
|
598
|
+
e = null;
|
599
|
+
}
|
600
|
+
}
|
601
|
+
return e;
|
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 {
|
605
|
+
static addInitializer(t) {
|
606
|
+
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
607
|
+
}
|
608
|
+
static get observedAttributes() {
|
609
|
+
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
610
|
+
}
|
611
|
+
static createProperty(t, e = xt) {
|
612
|
+
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
613
|
+
const s = Symbol(), i = this.getPropertyDescriptor(t, s, e);
|
614
|
+
i !== void 0 && xe(this.prototype, t, i);
|
615
|
+
}
|
616
|
+
}
|
617
|
+
static getPropertyDescriptor(t, e, s) {
|
618
|
+
const { get: i, set: n } = He(this.prototype, t) ?? { get() {
|
619
|
+
return this[e];
|
620
|
+
}, set(o) {
|
621
|
+
this[e] = o;
|
622
|
+
} };
|
623
|
+
return { get() {
|
624
|
+
return i == null ? void 0 : i.call(this);
|
625
|
+
}, set(o) {
|
626
|
+
const l = i == null ? void 0 : i.call(this);
|
627
|
+
n.call(this, o), this.requestUpdate(t, l, s);
|
628
|
+
}, configurable: !0, enumerable: !0 };
|
629
|
+
}
|
630
|
+
static getPropertyOptions(t) {
|
631
|
+
return this.elementProperties.get(t) ?? xt;
|
632
|
+
}
|
633
|
+
static _$Ei() {
|
634
|
+
if (this.hasOwnProperty(D("elementProperties")))
|
635
|
+
return;
|
636
|
+
const t = Me(this);
|
637
|
+
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
638
|
+
}
|
639
|
+
static finalize() {
|
640
|
+
if (this.hasOwnProperty(D("finalized")))
|
641
|
+
return;
|
642
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(D("properties"))) {
|
643
|
+
const e = this.properties, s = [...Oe(e), ...Ne(e)];
|
644
|
+
for (const i of s)
|
645
|
+
this.createProperty(i, e[i]);
|
646
|
+
}
|
647
|
+
const t = this[Symbol.metadata];
|
648
|
+
if (t !== null) {
|
649
|
+
const e = litPropertyMetadata.get(t);
|
650
|
+
if (e !== void 0)
|
651
|
+
for (const [s, i] of e)
|
652
|
+
this.elementProperties.set(s, i);
|
653
|
+
}
|
654
|
+
this._$Eh = /* @__PURE__ */ new Map();
|
655
|
+
for (const [e, s] of this.elementProperties) {
|
656
|
+
const i = this._$Eu(e, s);
|
657
|
+
i !== void 0 && this._$Eh.set(i, e);
|
658
|
+
}
|
659
|
+
this.elementStyles = this.finalizeStyles(this.styles);
|
660
|
+
}
|
661
|
+
static finalizeStyles(t) {
|
662
|
+
const e = [];
|
663
|
+
if (Array.isArray(t)) {
|
664
|
+
const s = new Set(t.flat(1 / 0).reverse());
|
665
|
+
for (const i of s)
|
666
|
+
e.unshift(Tt(i));
|
667
|
+
} else
|
668
|
+
t !== void 0 && e.push(Tt(t));
|
669
|
+
return e;
|
670
|
+
}
|
671
|
+
static _$Eu(t, e) {
|
672
|
+
const s = e.attribute;
|
673
|
+
return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
|
674
|
+
}
|
675
|
+
constructor() {
|
676
|
+
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
677
|
+
}
|
678
|
+
_$Ev() {
|
679
|
+
var t;
|
680
|
+
this._$Eg = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$ES(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach((e) => e(this));
|
681
|
+
}
|
682
|
+
addController(t) {
|
683
|
+
var e;
|
684
|
+
(this._$E_ ?? (this._$E_ = /* @__PURE__ */ new Set())).add(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
|
685
|
+
}
|
686
|
+
removeController(t) {
|
687
|
+
var e;
|
688
|
+
(e = this._$E_) == null || e.delete(t);
|
689
|
+
}
|
690
|
+
_$ES() {
|
691
|
+
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
692
|
+
for (const s of e.keys())
|
693
|
+
this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
|
694
|
+
t.size > 0 && (this._$Ep = t);
|
695
|
+
}
|
696
|
+
createRenderRoot() {
|
697
|
+
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
698
|
+
return Te(t, this.constructor.elementStyles), t;
|
699
|
+
}
|
700
|
+
connectedCallback() {
|
701
|
+
var t;
|
702
|
+
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$E_) == null || t.forEach((e) => {
|
703
|
+
var s;
|
704
|
+
return (s = e.hostConnected) == null ? void 0 : s.call(e);
|
705
|
+
});
|
706
|
+
}
|
707
|
+
enableUpdating(t) {
|
708
|
+
}
|
709
|
+
disconnectedCallback() {
|
710
|
+
var t;
|
711
|
+
(t = this._$E_) == null || t.forEach((e) => {
|
712
|
+
var s;
|
713
|
+
return (s = e.hostDisconnected) == null ? void 0 : s.call(e);
|
714
|
+
});
|
715
|
+
}
|
716
|
+
attributeChangedCallback(t, e, s) {
|
717
|
+
this._$AK(t, s);
|
718
|
+
}
|
719
|
+
_$EO(t, e) {
|
720
|
+
var n;
|
721
|
+
const s = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, s);
|
722
|
+
if (i !== void 0 && s.reflect === !0) {
|
723
|
+
const o = (((n = s.converter) == null ? void 0 : n.toAttribute) !== void 0 ? s.converter : ut).toAttribute(e, s.type);
|
724
|
+
this._$Em = t, o == null ? this.removeAttribute(i) : this.setAttribute(i, o), this._$Em = null;
|
725
|
+
}
|
726
|
+
}
|
727
|
+
_$AK(t, e) {
|
728
|
+
var n;
|
729
|
+
const s = this.constructor, i = s._$Eh.get(t);
|
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;
|
733
|
+
}
|
734
|
+
}
|
735
|
+
requestUpdate(t, e, s, i = !1, n) {
|
736
|
+
if (t !== void 0) {
|
737
|
+
if (s ?? (s = this.constructor.getPropertyOptions(t)), !(s.hasChanged ?? ee)(i ? n : this[t], e))
|
738
|
+
return;
|
739
|
+
this.C(t, e, s);
|
740
|
+
}
|
741
|
+
this.isUpdatePending === !1 && (this._$Eg = this._$EP());
|
742
|
+
}
|
743
|
+
C(t, e, s) {
|
744
|
+
this._$AL.has(t) || this._$AL.set(t, e), s.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
|
745
|
+
}
|
746
|
+
async _$EP() {
|
747
|
+
this.isUpdatePending = !0;
|
748
|
+
try {
|
749
|
+
await this._$Eg;
|
750
|
+
} catch (e) {
|
751
|
+
Promise.reject(e);
|
752
|
+
}
|
753
|
+
const t = this.scheduleUpdate();
|
754
|
+
return t != null && await t, !this.isUpdatePending;
|
755
|
+
}
|
756
|
+
scheduleUpdate() {
|
757
|
+
return this.performUpdate();
|
758
|
+
}
|
759
|
+
performUpdate() {
|
760
|
+
var s;
|
761
|
+
if (!this.isUpdatePending)
|
762
|
+
return;
|
763
|
+
if (!this.hasUpdated) {
|
764
|
+
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
765
|
+
for (const [n, o] of this._$Ep)
|
766
|
+
this[n] = o;
|
767
|
+
this._$Ep = void 0;
|
768
|
+
}
|
769
|
+
const i = this.constructor.elementProperties;
|
770
|
+
if (i.size > 0)
|
771
|
+
for (const [n, o] of i)
|
772
|
+
o.wrapped !== !0 || this._$AL.has(n) || this[n] === void 0 || this.C(n, this[n], o);
|
773
|
+
}
|
774
|
+
let t = !1;
|
775
|
+
const e = this._$AL;
|
776
|
+
try {
|
777
|
+
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$E_) == null || s.forEach((i) => {
|
778
|
+
var n;
|
779
|
+
return (n = i.hostUpdate) == null ? void 0 : n.call(i);
|
780
|
+
}), this.update(e)) : this._$ET();
|
781
|
+
} catch (i) {
|
782
|
+
throw t = !1, this._$ET(), i;
|
783
|
+
}
|
784
|
+
t && this._$AE(e);
|
785
|
+
}
|
786
|
+
willUpdate(t) {
|
787
|
+
}
|
788
|
+
_$AE(t) {
|
789
|
+
var e;
|
790
|
+
(e = this._$E_) == null || e.forEach((s) => {
|
791
|
+
var i;
|
792
|
+
return (i = s.hostUpdated) == null ? void 0 : i.call(s);
|
793
|
+
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
794
|
+
}
|
795
|
+
_$ET() {
|
796
|
+
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
797
|
+
}
|
798
|
+
get updateComplete() {
|
799
|
+
return this.getUpdateComplete();
|
800
|
+
}
|
801
|
+
getUpdateComplete() {
|
802
|
+
return this._$Eg;
|
803
|
+
}
|
804
|
+
shouldUpdate(t) {
|
805
|
+
return !0;
|
806
|
+
}
|
807
|
+
update(t) {
|
808
|
+
this._$Ej && (this._$Ej = this._$Ej.forEach((e) => this._$EO(e, this[e]))), this._$ET();
|
809
|
+
}
|
810
|
+
updated(t) {
|
811
|
+
}
|
812
|
+
firstUpdated(t) {
|
504
813
|
}
|
505
814
|
}
|
506
|
-
|
507
|
-
Ct == null || Ct(pt, Kt), ((st = J.litHtmlVersions) !== null && st !== void 0 ? st : J.litHtmlVersions = []).push("2.8.0");
|
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");
|
508
816
|
/**
|
509
817
|
* @license
|
510
818
|
* Copyright 2017 Google LLC
|
511
819
|
* SPDX-License-Identifier: BSD-3-Clause
|
512
820
|
*/
|
513
|
-
|
514
|
-
|
515
|
-
\f\r]
|
516
|
-
|
517
|
-
|
518
|
-
let s, r = t === 2 ? "<svg>" : "", o = M;
|
519
|
-
for (let l = 0; l < e; l++) {
|
520
|
-
const a = n[l];
|
521
|
-
let u, h, c = -1, p = 0;
|
522
|
-
for (; p < a.length && (o.lastIndex = p, h = o.exec(a), h !== null); )
|
523
|
-
p = o.lastIndex, o === M ? h[1] === "!--" ? o = Tt : h[1] !== void 0 ? o = xt : h[2] !== void 0 ? (Yt.test(h[2]) && (s = RegExp("</" + h[2], "g")), o = S) : h[3] !== void 0 && (o = S) : o === S ? h[0] === ">" ? (o = s ?? M, c = -1) : h[1] === void 0 ? c = -2 : (c = o.lastIndex - h[2].length, u = h[1], o = h[3] === void 0 ? S : h[3] === '"' ? Nt : Ht) : o === Nt || o === Ht ? o = S : o === Tt || o === xt ? o = M : (o = S, s = void 0);
|
524
|
-
const A = o === S && n[l + 1].startsWith("/>") ? " " : "";
|
525
|
-
r += o === M ? a + ve : c >= 0 ? (i.push(u), a.slice(0, c) + vt + a.slice(c) + w + A) : a + w + (c === -2 ? (i.push(void 0), l) : A);
|
526
|
-
}
|
527
|
-
const d = r + (n[e] || "<?>") + (t === 2 ? "</svg>" : "");
|
528
|
-
if (!Array.isArray(n) || !n.hasOwnProperty("raw"))
|
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);
|
824
|
+
function oe(r, t) {
|
825
|
+
if (!Array.isArray(r) || !r.hasOwnProperty("raw"))
|
529
826
|
throw Error("invalid template strings array");
|
530
|
-
return
|
827
|
+
return Ht !== void 0 ? Ht.createHTML(t) : t;
|
828
|
+
}
|
829
|
+
const ze = (r, t) => {
|
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);
|
839
|
+
}
|
840
|
+
return [oe(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : "")), s];
|
531
841
|
};
|
532
|
-
class
|
533
|
-
constructor({ strings: t, _$litType$: e },
|
534
|
-
let
|
842
|
+
class J {
|
843
|
+
constructor({ strings: t, _$litType$: e }, s) {
|
844
|
+
let i;
|
535
845
|
this.parts = [];
|
536
|
-
let
|
537
|
-
const
|
538
|
-
if (this.el =
|
539
|
-
const
|
540
|
-
|
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);
|
541
851
|
}
|
542
|
-
for (; (
|
543
|
-
if (
|
544
|
-
if (
|
545
|
-
const
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
if (Yt.test(s.tagName)) {
|
559
|
-
const h = s.textContent.split(w), c = h.length - 1;
|
560
|
-
if (c > 0) {
|
561
|
-
s.textContent = N ? N.emptyScript : "";
|
562
|
-
for (let p = 0; p < c; p++)
|
563
|
-
s.append(h[p], B()), U.nextNode(), l.push({ type: 2, index: ++r });
|
564
|
-
s.append(h[c], B());
|
852
|
+
for (; (i = C.nextNode()) !== null && h.length < l; ) {
|
853
|
+
if (i.nodeType === 1) {
|
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);
|
859
|
+
} else
|
860
|
+
a.startsWith(A) && (h.push({ type: 6, index: n }), i.removeAttribute(a));
|
861
|
+
if (ne.test(i.tagName)) {
|
862
|
+
const a = i.textContent.split(A), p = a.length - 1;
|
863
|
+
if (p > 0) {
|
864
|
+
i.textContent = tt ? tt.emptyScript : "";
|
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());
|
565
868
|
}
|
566
869
|
}
|
567
|
-
} else if (
|
568
|
-
if (
|
569
|
-
|
870
|
+
} else if (i.nodeType === 8)
|
871
|
+
if (i.data === ie)
|
872
|
+
h.push({ type: 2, index: n });
|
570
873
|
else {
|
571
|
-
let
|
572
|
-
for (; (
|
573
|
-
|
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;
|
574
877
|
}
|
575
|
-
|
878
|
+
n++;
|
576
879
|
}
|
577
880
|
}
|
578
881
|
static createElement(t, e) {
|
579
|
-
const
|
580
|
-
return
|
882
|
+
const s = T.createElement("template");
|
883
|
+
return s.innerHTML = t, s;
|
581
884
|
}
|
582
885
|
}
|
583
|
-
function
|
584
|
-
var
|
585
|
-
if (t ===
|
886
|
+
function O(r, t, e = r, s) {
|
887
|
+
var o, l;
|
888
|
+
if (t === H)
|
586
889
|
return t;
|
587
|
-
let
|
588
|
-
const
|
589
|
-
return (
|
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;
|
590
893
|
}
|
591
|
-
class
|
894
|
+
class je {
|
592
895
|
constructor(t, e) {
|
593
896
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
594
897
|
}
|
@@ -599,33 +902,31 @@ class fe {
|
|
599
902
|
return this._$AM._$AU;
|
600
903
|
}
|
601
904
|
u(t) {
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
a.type === 2 ? u = new W(o, o.nextSibling, this, t) : a.type === 1 ? u = new a.ctor(o, a.name, a.strings, this, t) : a.type === 6 && (u = new be(o, this, t)), this._$AV.push(u), a = s[++l];
|
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];
|
908
|
+
for (; h !== void 0; ) {
|
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];
|
610
912
|
}
|
611
|
-
|
913
|
+
o !== (h == null ? void 0 : h.index) && (n = C.nextNode(), o++);
|
612
914
|
}
|
613
|
-
return
|
915
|
+
return C.currentNode = T, i;
|
614
916
|
}
|
615
|
-
|
917
|
+
p(t) {
|
616
918
|
let e = 0;
|
617
|
-
for (const
|
618
|
-
|
919
|
+
for (const s of this._$AV)
|
920
|
+
s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
|
619
921
|
}
|
620
922
|
}
|
621
|
-
class
|
622
|
-
constructor(t, e, i, s) {
|
623
|
-
var r;
|
624
|
-
this.type = 2, this._$AH = _, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = s, this._$Cp = (r = s == null ? void 0 : s.isConnected) === null || r === void 0 || r;
|
625
|
-
}
|
923
|
+
class F {
|
626
924
|
get _$AU() {
|
627
|
-
var t
|
628
|
-
return (
|
925
|
+
var t;
|
926
|
+
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
927
|
+
}
|
928
|
+
constructor(t, e, s, i) {
|
929
|
+
this.type = 2, this._$AH = $, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = i, this._$Cv = (i == null ? void 0 : i.isConnected) ?? !0;
|
629
930
|
}
|
630
931
|
get parentNode() {
|
631
932
|
let t = this._$AA.parentNode;
|
@@ -639,7 +940,7 @@ class W {
|
|
639
940
|
return this._$AB;
|
640
941
|
}
|
641
942
|
_$AI(t, e = this) {
|
642
|
-
t =
|
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);
|
643
944
|
}
|
644
945
|
k(t) {
|
645
946
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
@@ -648,179 +949,176 @@ class W {
|
|
648
949
|
this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
|
649
950
|
}
|
650
951
|
_(t) {
|
651
|
-
this._$AH !==
|
952
|
+
this._$AH !== $ && K(this._$AH) ? this._$AA.nextSibling.data = t : this.$(T.createTextNode(t)), this._$AH = t;
|
652
953
|
}
|
653
954
|
g(t) {
|
654
|
-
var
|
655
|
-
const { values:
|
656
|
-
if (((
|
657
|
-
this._$AH.
|
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);
|
957
|
+
if (((n = this._$AH) == null ? void 0 : n._$AD) === i)
|
958
|
+
this._$AH.p(e);
|
658
959
|
else {
|
659
|
-
const o = new
|
660
|
-
o.
|
960
|
+
const o = new je(i, this), l = o.u(this.options);
|
961
|
+
o.p(e), this.$(l), this._$AH = o;
|
661
962
|
}
|
662
963
|
}
|
663
964
|
_$AC(t) {
|
664
|
-
let e =
|
665
|
-
return e === void 0 &&
|
965
|
+
let e = kt.get(t.strings);
|
966
|
+
return e === void 0 && kt.set(t.strings, e = new J(t)), e;
|
666
967
|
}
|
667
968
|
T(t) {
|
668
|
-
|
969
|
+
re(this._$AH) || (this._$AH = [], this._$AR());
|
669
970
|
const e = this._$AH;
|
670
|
-
let
|
671
|
-
for (const
|
672
|
-
|
673
|
-
|
971
|
+
let s, i = 0;
|
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++;
|
974
|
+
i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);
|
674
975
|
}
|
675
976
|
_$AR(t = this._$AA.nextSibling, e) {
|
676
|
-
var
|
677
|
-
for ((
|
678
|
-
const
|
679
|
-
t.remove(), t =
|
977
|
+
var s;
|
978
|
+
for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0, e); t && t !== this._$AB; ) {
|
979
|
+
const i = t.nextSibling;
|
980
|
+
t.remove(), t = i;
|
680
981
|
}
|
681
982
|
}
|
682
983
|
setConnected(t) {
|
683
984
|
var e;
|
684
|
-
this._$AM === void 0 && (this._$
|
985
|
+
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
685
986
|
}
|
686
987
|
}
|
687
|
-
class
|
688
|
-
constructor(t, e, i, s, r) {
|
689
|
-
this.type = 1, this._$AH = _, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = r, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = _;
|
690
|
-
}
|
988
|
+
class it {
|
691
989
|
get tagName() {
|
692
990
|
return this.element.tagName;
|
693
991
|
}
|
694
992
|
get _$AU() {
|
695
993
|
return this._$AM._$AU;
|
696
994
|
}
|
697
|
-
|
698
|
-
|
995
|
+
constructor(t, e, s, i, n) {
|
996
|
+
this.type = 1, this._$AH = $, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = n, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = $;
|
997
|
+
}
|
998
|
+
_$AI(t, e = this, s, i) {
|
999
|
+
const n = this.strings;
|
699
1000
|
let o = !1;
|
700
|
-
if (
|
701
|
-
t =
|
1001
|
+
if (n === void 0)
|
1002
|
+
t = O(this, t, e, 0), o = !K(t) || t !== this._$AH && t !== H, o && (this._$AH = t);
|
702
1003
|
else {
|
703
|
-
const
|
704
|
-
let
|
705
|
-
for (t =
|
706
|
-
|
1004
|
+
const l = t;
|
1005
|
+
let h, d;
|
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;
|
707
1008
|
}
|
708
|
-
o && !
|
1009
|
+
o && !i && this.O(t);
|
709
1010
|
}
|
710
|
-
|
711
|
-
t ===
|
1011
|
+
O(t) {
|
1012
|
+
t === $ ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
712
1013
|
}
|
713
1014
|
}
|
714
|
-
class
|
1015
|
+
class Be extends it {
|
715
1016
|
constructor() {
|
716
1017
|
super(...arguments), this.type = 3;
|
717
1018
|
}
|
718
|
-
|
719
|
-
this.element[this.name] = t ===
|
1019
|
+
O(t) {
|
1020
|
+
this.element[this.name] = t === $ ? void 0 : t;
|
720
1021
|
}
|
721
1022
|
}
|
722
|
-
|
723
|
-
class Ee extends tt {
|
1023
|
+
class We extends it {
|
724
1024
|
constructor() {
|
725
1025
|
super(...arguments), this.type = 4;
|
726
1026
|
}
|
727
|
-
|
728
|
-
|
1027
|
+
O(t) {
|
1028
|
+
this.element.toggleAttribute(this.name, !!t && t !== $);
|
729
1029
|
}
|
730
1030
|
}
|
731
|
-
class
|
732
|
-
constructor(t, e,
|
733
|
-
super(t, e,
|
1031
|
+
class qe extends it {
|
1032
|
+
constructor(t, e, s, i, n) {
|
1033
|
+
super(t, e, s, i, n), this.type = 5;
|
734
1034
|
}
|
735
1035
|
_$AI(t, e = this) {
|
736
|
-
|
737
|
-
if ((t = (i = V(this, t, e, 0)) !== null && i !== void 0 ? i : _) === I)
|
1036
|
+
if ((t = O(this, t, e, 0) ?? $) === H)
|
738
1037
|
return;
|
739
|
-
const s = this._$AH,
|
740
|
-
|
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
|
+
i && this.element.removeEventListener(this.name, this, s), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
741
1040
|
}
|
742
1041
|
handleEvent(t) {
|
743
|
-
var e
|
744
|
-
typeof this._$AH == "function" ? this._$AH.call((
|
1042
|
+
var e;
|
1043
|
+
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
745
1044
|
}
|
746
1045
|
}
|
747
|
-
class
|
748
|
-
constructor(t, e,
|
749
|
-
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options =
|
1046
|
+
class Ke {
|
1047
|
+
constructor(t, e, s) {
|
1048
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
|
750
1049
|
}
|
751
1050
|
get _$AU() {
|
752
1051
|
return this._$AM._$AU;
|
753
1052
|
}
|
754
1053
|
_$AI(t) {
|
755
|
-
|
1054
|
+
O(this, t);
|
756
1055
|
}
|
757
1056
|
}
|
758
|
-
const
|
759
|
-
|
760
|
-
const
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
return o._$AI(n), o;
|
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) => {
|
1060
|
+
const s = (e == null ? void 0 : e.renderBefore) ?? t;
|
1061
|
+
let i = s._$litPart$;
|
1062
|
+
if (i === void 0) {
|
1063
|
+
const n = (e == null ? void 0 : e.renderBefore) ?? null;
|
1064
|
+
s._$litPart$ = i = new F(t.insertBefore(q(), n), n, void 0, e ?? {});
|
1065
|
+
}
|
1066
|
+
return i._$AI(r), i;
|
769
1067
|
};
|
770
1068
|
/**
|
771
1069
|
* @license
|
772
1070
|
* Copyright 2017 Google LLC
|
773
1071
|
* SPDX-License-Identifier: BSD-3-Clause
|
774
1072
|
*/
|
775
|
-
|
776
|
-
class k extends T {
|
1073
|
+
class j extends R {
|
777
1074
|
constructor() {
|
778
1075
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
779
1076
|
}
|
780
1077
|
createRenderRoot() {
|
781
|
-
var
|
782
|
-
const
|
783
|
-
return (
|
1078
|
+
var e;
|
1079
|
+
const t = super.createRenderRoot();
|
1080
|
+
return (e = this.renderOptions).renderBefore ?? (e.renderBefore = t.firstChild), t;
|
784
1081
|
}
|
785
1082
|
update(t) {
|
786
1083
|
const e = this.render();
|
787
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do =
|
1084
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Je(e, this.renderRoot, this.renderOptions);
|
788
1085
|
}
|
789
1086
|
connectedCallback() {
|
790
1087
|
var t;
|
791
|
-
super.connectedCallback(), (t = this._$Do)
|
1088
|
+
super.connectedCallback(), (t = this._$Do) == null || t.setConnected(!0);
|
792
1089
|
}
|
793
1090
|
disconnectedCallback() {
|
794
1091
|
var t;
|
795
|
-
super.disconnectedCallback(), (t = this._$Do)
|
1092
|
+
super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
|
796
1093
|
}
|
797
1094
|
render() {
|
798
|
-
return
|
1095
|
+
return H;
|
799
1096
|
}
|
800
1097
|
}
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
1098
|
+
var Dt;
|
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 });
|
1102
|
+
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.2");
|
1103
|
+
function Fe(r, t, e) {
|
1104
|
+
function s(i) {
|
1105
|
+
e.dispatchEvent(new CustomEvent(i.type, i));
|
1106
|
+
}
|
1107
|
+
return t.addEventListener(r, s), () => {
|
1108
|
+
t.removeEventListener(r, s);
|
811
1109
|
};
|
812
1110
|
}
|
813
|
-
class
|
1111
|
+
class Ge {
|
814
1112
|
constructor(t, e) {
|
815
|
-
this._events = [], this._cleanup = [], this._forwardElementRef =
|
1113
|
+
this._events = [], this._cleanup = [], this._forwardElementRef = jt(), this.host = t, this._events = e, t.addController(this);
|
816
1114
|
}
|
817
1115
|
register() {
|
818
|
-
return
|
1116
|
+
return Bt(this._forwardElementRef);
|
819
1117
|
}
|
820
1118
|
hostConnected() {
|
821
1119
|
requestAnimationFrame(() => {
|
822
1120
|
this._events.forEach((t) => {
|
823
|
-
this._forwardElementRef.value && this._cleanup.push(
|
1121
|
+
this._forwardElementRef.value && this._cleanup.push(Fe(t, this._forwardElementRef.value, this.host));
|
824
1122
|
});
|
825
1123
|
});
|
826
1124
|
}
|
@@ -830,52 +1128,76 @@ class Ue {
|
|
830
1128
|
}), this._cleanup = [];
|
831
1129
|
}
|
832
1130
|
}
|
833
|
-
const
|
834
|
-
function
|
835
|
-
if (!["dev", "staging", "prod"].includes(
|
836
|
-
throw new Error(`Unknown environment: ${
|
837
|
-
if (
|
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";
|
1132
|
+
function et(r) {
|
1133
|
+
if (!["local", "dev", "staging", "prod"].includes(r))
|
1134
|
+
throw new Error(`Unknown environment: ${r}`);
|
1135
|
+
if (r === "local")
|
1136
|
+
return {
|
1137
|
+
videoUrl: Lt,
|
1138
|
+
publicApiUrl: Vt,
|
1139
|
+
embedApiUrl: ts
|
1140
|
+
};
|
1141
|
+
if (r === "dev")
|
838
1142
|
return {
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
embedApiUrl: Ie,
|
843
|
-
publicRecorderUrl: Me
|
1143
|
+
videoUrl: Lt,
|
1144
|
+
publicApiUrl: Vt,
|
1145
|
+
embedApiUrl: es
|
844
1146
|
};
|
845
|
-
if (
|
1147
|
+
if (r === "staging")
|
846
1148
|
return {
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
embedApiUrl: Ve,
|
851
|
-
publicRecorderUrl: Le
|
1149
|
+
videoUrl: Xe,
|
1150
|
+
publicApiUrl: Ye,
|
1151
|
+
embedApiUrl: ss
|
852
1152
|
};
|
853
|
-
if (
|
1153
|
+
if (r === "prod")
|
854
1154
|
return {
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
embedApiUrl: Oe,
|
859
|
-
publicRecorderUrl: ke
|
1155
|
+
videoUrl: Ze,
|
1156
|
+
publicApiUrl: Qe,
|
1157
|
+
embedApiUrl: is
|
860
1158
|
};
|
861
1159
|
}
|
862
|
-
class
|
1160
|
+
class rs {
|
863
1161
|
constructor(t) {
|
864
|
-
this._fetching = !1, this.
|
1162
|
+
this._fetching = !1, this.getVouch = async (e, s, i) => {
|
1163
|
+
const { embedApiUrl: n } = et(e), o = await fetch(`${n}/vouches/${i}`, {
|
1164
|
+
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}`, {
|
1168
|
+
method: "GET",
|
1169
|
+
headers: [
|
1170
|
+
["X-Api-Key", s],
|
1171
|
+
["Cache-Control", "max-age=0"]
|
1172
|
+
]
|
1173
|
+
}), o;
|
1174
|
+
}, this.getTemplate = async (e, s, i) => {
|
1175
|
+
const { embedApiUrl: n } = et(e), o = await fetch(`${n}/templates/${i}`, {
|
1176
|
+
method: "GET",
|
1177
|
+
headers: [["X-Api-Key", s]]
|
1178
|
+
}).then((l) => l.json());
|
1179
|
+
return fetch(`${n}/templates/${i}`, {
|
1180
|
+
method: "GET",
|
1181
|
+
headers: [
|
1182
|
+
["X-Api-Key", s],
|
1183
|
+
["Cache-Control", "max-age=0"]
|
1184
|
+
]
|
1185
|
+
}), o;
|
1186
|
+
}, this.host = t, new ae(
|
865
1187
|
this.host,
|
866
|
-
async ([e,
|
867
|
-
var
|
1188
|
+
async ([e, s, i, n, o]) => {
|
1189
|
+
var l, h, d, c;
|
868
1190
|
try {
|
869
|
-
if (t.vouch = void 0, t.template = void 0,
|
870
|
-
let
|
871
|
-
o && (this.fetching = !0,
|
872
|
-
} else if (
|
1191
|
+
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);
|
1194
|
+
} else if (n) {
|
873
1195
|
this.fetching = !0;
|
874
|
-
const [
|
875
|
-
this.getVouch(e,
|
876
|
-
o ? this.getTemplate(e,
|
1196
|
+
const [a, p] = await Promise.all([
|
1197
|
+
this.getVouch(e, s, n),
|
1198
|
+
o ? this.getTemplate(e, s, o) : null
|
877
1199
|
]);
|
878
|
-
t.vouch =
|
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);
|
879
1201
|
}
|
880
1202
|
} finally {
|
881
1203
|
this.fetching = !1;
|
@@ -890,88 +1212,45 @@ class De {
|
|
890
1212
|
get fetching() {
|
891
1213
|
return this._fetching;
|
892
1214
|
}
|
893
|
-
async getVouch(t, e, i) {
|
894
|
-
const { embedApiUrl: s } = Y(t);
|
895
|
-
return fetch(`${s}/vouches/${i}`, {
|
896
|
-
method: "GET",
|
897
|
-
headers: [["X-Api-Key", e]]
|
898
|
-
}).then((r) => r.json());
|
899
|
-
}
|
900
|
-
async getTemplate(t, e, i) {
|
901
|
-
const { embedApiUrl: s } = Y(t);
|
902
|
-
return fetch(`${s}/templates/${i}`, {
|
903
|
-
method: "GET",
|
904
|
-
headers: [["X-Api-Key", e]]
|
905
|
-
}).then((r) => r.json());
|
906
|
-
}
|
907
|
-
}
|
908
|
-
let Z;
|
909
|
-
const je = new Uint8Array(16);
|
910
|
-
function Be() {
|
911
|
-
if (!Z && (Z = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Z))
|
912
|
-
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
913
|
-
return Z(je);
|
914
1215
|
}
|
915
|
-
const
|
916
|
-
|
917
|
-
$.push((n + 256).toString(16).slice(1));
|
918
|
-
function ze(n, t = 0) {
|
919
|
-
return $[n[t + 0]] + $[n[t + 1]] + $[n[t + 2]] + $[n[t + 3]] + "-" + $[n[t + 4]] + $[n[t + 5]] + "-" + $[n[t + 6]] + $[n[t + 7]] + "-" + $[n[t + 8]] + $[n[t + 9]] + "-" + $[n[t + 10]] + $[n[t + 11]] + $[n[t + 12]] + $[n[t + 13]] + $[n[t + 14]] + $[n[t + 15]];
|
920
|
-
}
|
921
|
-
const qe = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Mt = {
|
922
|
-
randomUUID: qe
|
923
|
-
};
|
924
|
-
function L(n, t, e) {
|
925
|
-
if (Mt.randomUUID && !t && !n)
|
926
|
-
return Mt.randomUUID();
|
927
|
-
n = n || {};
|
928
|
-
const i = n.random || (n.rng || Be)();
|
929
|
-
if (i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, t) {
|
930
|
-
e = e || 0;
|
931
|
-
for (let s = 0; s < 16; ++s)
|
932
|
-
t[e + s] = i[s];
|
933
|
-
return t;
|
934
|
-
}
|
935
|
-
return ze(i);
|
936
|
-
}
|
937
|
-
const We = 2e3;
|
938
|
-
class Ze {
|
1216
|
+
const ns = 2e3;
|
1217
|
+
class os {
|
939
1218
|
constructor(t) {
|
940
1219
|
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) => {
|
941
|
-
var
|
942
|
-
const { publicApiUrl:
|
943
|
-
return (
|
1220
|
+
var i, n;
|
1221
|
+
const { publicApiUrl: s } = et(this.host.env);
|
1222
|
+
return (n = (i = window.localStorage) == null ? void 0 : i.setItem) == null || n.call(i, "vouch-uid-visitor", e), navigator.sendBeacon(`${s}/api/visitor`, JSON.stringify({ visitorId: e })), e;
|
944
1223
|
}, this._getReportingMetadata = () => {
|
945
|
-
var
|
946
|
-
const [e,
|
947
|
-
return [...new URLSearchParams(location.search).entries()].forEach(([
|
948
|
-
if (/utm/.test(
|
949
|
-
const
|
950
|
-
|
1224
|
+
var n, o;
|
1225
|
+
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;
|
951
1230
|
}
|
952
1231
|
}), {
|
953
|
-
source:
|
1232
|
+
source: this.host.trackingSource,
|
954
1233
|
time: /* @__PURE__ */ new Date(),
|
955
|
-
region:
|
1234
|
+
region: s,
|
956
1235
|
country: e,
|
957
1236
|
screenHeight: window.screen.height,
|
958
1237
|
screenWidth: window.screen.width,
|
959
1238
|
referrer: document.referrer,
|
960
1239
|
currentUrl: location.href,
|
961
|
-
...
|
1240
|
+
...i
|
962
1241
|
};
|
963
|
-
}, this._sendTrackingEvent = (e,
|
964
|
-
const { publicApiUrl:
|
1242
|
+
}, this._sendTrackingEvent = (e, s) => {
|
1243
|
+
const { publicApiUrl: i } = et(this.host.env), { client: n, tab: o, request: l, visitor: h } = this._getUids();
|
965
1244
|
navigator.sendBeacon(
|
966
|
-
`${
|
1245
|
+
`${i}/api/events`,
|
967
1246
|
JSON.stringify({
|
968
1247
|
event: e,
|
969
|
-
payload:
|
1248
|
+
payload: s,
|
970
1249
|
context: {
|
971
|
-
"x-uid-client":
|
1250
|
+
"x-uid-client": n,
|
972
1251
|
"x-uid-tab": o,
|
973
|
-
"x-uid-request":
|
974
|
-
"x-uid-visitor":
|
1252
|
+
"x-uid-request": l,
|
1253
|
+
"x-uid-visitor": h,
|
975
1254
|
"x-reporting-metadata": this._getReportingMetadata()
|
976
1255
|
}
|
977
1256
|
})
|
@@ -986,33 +1265,33 @@ class Ze {
|
|
986
1265
|
vouchId: e,
|
987
1266
|
streamStart: this.host.currentTime
|
988
1267
|
}), this._hasPlayed = !0));
|
989
|
-
}, this._handleVideoPlay = ({ detail: { id: e, node:
|
990
|
-
const
|
991
|
-
|
992
|
-
vouchId:
|
1268
|
+
}, this._handleVideoPlay = ({ detail: { id: e, node: s } }) => {
|
1269
|
+
const i = this._findVouchId();
|
1270
|
+
i && (this._answersViewed[e] || (this._sendTrackingEvent("VOUCH_RESPONSE_VIEWED", {
|
1271
|
+
vouchId: i,
|
993
1272
|
answerId: e
|
994
|
-
}), this._answersViewed[e] = !0), this._streamedTime[e] =
|
995
|
-
}, this._handleVideoTimeUpdate = ({ detail: { id: e, node:
|
996
|
-
var o,
|
997
|
-
const
|
998
|
-
if (!
|
1273
|
+
}), this._answersViewed[e] = !0), this._streamedTime[e] = s.currentTime, this._streamedPrevTimestamp[e] = Date.now());
|
1274
|
+
}, this._handleVideoTimeUpdate = ({ detail: { id: e, node: s } }) => {
|
1275
|
+
var o, l;
|
1276
|
+
const i = this._findVouchId();
|
1277
|
+
if (!i)
|
999
1278
|
return;
|
1000
|
-
const
|
1279
|
+
const n = Date.now();
|
1001
1280
|
!this.host.paused && // Only fire the video seeked event when this video is the active one
|
1002
|
-
e === ((
|
1003
|
-
|
1004
|
-
vouchId:
|
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
|
1282
|
+
n - this._streamedPrevTimestamp[e] > ns && (this._sendTrackingEvent("VIDEO_STREAMED", {
|
1283
|
+
vouchId: i,
|
1005
1284
|
answerId: e,
|
1006
1285
|
streamStart: this._streamedTime[e],
|
1007
|
-
streamEnd:
|
1008
|
-
}), this._streamedTime[e] =
|
1009
|
-
}, this._handleVideoPause = ({ detail: { id: e, node:
|
1010
|
-
const
|
1011
|
-
|
1012
|
-
vouchId:
|
1286
|
+
streamEnd: s.currentTime
|
1287
|
+
}), this._streamedTime[e] = s.currentTime, this._streamedPrevTimestamp[e] = n);
|
1288
|
+
}, this._handleVideoPause = ({ detail: { id: e, node: s } }) => {
|
1289
|
+
const i = this._findVouchId();
|
1290
|
+
i && (this._sendTrackingEvent("VIDEO_STREAMED", {
|
1291
|
+
vouchId: i,
|
1013
1292
|
answerId: e,
|
1014
1293
|
streamStart: this._streamedTime[e],
|
1015
|
-
streamEnd:
|
1294
|
+
streamEnd: s.currentTime
|
1016
1295
|
}), delete this._streamedTime[e], delete this._streamedPrevTimestamp[e]);
|
1017
1296
|
}, this.host = t, t.addController(this);
|
1018
1297
|
}
|
@@ -1021,40 +1300,40 @@ class Ze {
|
|
1021
1300
|
return "uuid" in this.host.data ? this.host.data.uuid : this.host.data.id;
|
1022
1301
|
}
|
1023
1302
|
_getUids() {
|
1024
|
-
var
|
1303
|
+
var n, o, l, h, d, c, a, p, u, g, G, mt;
|
1025
1304
|
if (typeof window > "u")
|
1026
1305
|
return {
|
1027
1306
|
client: null,
|
1028
1307
|
tab: null,
|
1029
|
-
request:
|
1308
|
+
request: N()
|
1030
1309
|
};
|
1031
|
-
const t = this._visitorId || ((o = (
|
1032
|
-
return t !== this._visitorId && (this._visitorId = t, (
|
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)), {
|
1033
1312
|
client: e,
|
1034
|
-
tab:
|
1035
|
-
request:
|
1313
|
+
tab: s,
|
1314
|
+
request: i,
|
1036
1315
|
visitor: t
|
1037
1316
|
};
|
1038
1317
|
}
|
1039
1318
|
hostConnected() {
|
1040
1319
|
requestAnimationFrame(() => {
|
1041
|
-
var t, e,
|
1042
|
-
this.host.addEventListener("vouch:loaded", this._handleVouchLoaded), (t = this.host.mediaPlayer) == null || t.addEventListener("play", this._handlePlay), (e = this.host.mediaPlayer) == null || e.addEventListener("video:play", this._handleVideoPlay), (
|
1320
|
+
var t, e, s, i;
|
1321
|
+
this.host.addEventListener("vouch:loaded", this._handleVouchLoaded), (t = this.host.mediaPlayer) == null || t.addEventListener("play", this._handlePlay), (e = this.host.mediaPlayer) == null || e.addEventListener("video:play", this._handleVideoPlay), (s = this.host.mediaPlayer) == null || s.addEventListener("video:pause", this._handleVideoPause), (i = this.host.mediaPlayer) == null || i.addEventListener("video:timeupdate", this._handleVideoTimeUpdate);
|
1043
1322
|
});
|
1044
1323
|
}
|
1045
1324
|
hostDisconnected() {
|
1046
|
-
var t, e,
|
1047
|
-
this.host.removeEventListener("vouch:loaded", this._handleVouchLoaded), (t = this.host.mediaPlayer) == null || t.removeEventListener("play", this._handlePlay), (e = this.host.mediaPlayer) == null || e.removeEventListener("video:play", this._handleVideoPlay), (
|
1325
|
+
var t, e, s, i;
|
1326
|
+
this.host.removeEventListener("vouch:loaded", this._handleVouchLoaded), (t = this.host.mediaPlayer) == null || t.removeEventListener("play", this._handlePlay), (e = this.host.mediaPlayer) == null || e.removeEventListener("video:play", this._handleVideoPlay), (s = this.host.mediaPlayer) == null || s.removeEventListener("video:pause", this._handleVideoPause), (i = this.host.mediaPlayer) == null || i.removeEventListener("video:timeupdate", this._handleVideoTimeUpdate);
|
1048
1327
|
}
|
1049
1328
|
}
|
1050
|
-
var
|
1051
|
-
for (var
|
1052
|
-
(o = n
|
1053
|
-
return
|
1329
|
+
var hs = Object.defineProperty, as = Object.getOwnPropertyDescriptor, f = (r, t, e, s) => {
|
1330
|
+
for (var i = s > 1 ? void 0 : s ? as(t, e) : t, n = r.length - 1, o; n >= 0; n--)
|
1331
|
+
(o = r[n]) && (i = (s ? o(t, e, i) : o(i)) || i);
|
1332
|
+
return s && i && hs(t, e, i), i;
|
1054
1333
|
};
|
1055
|
-
let
|
1334
|
+
let m = class extends j {
|
1056
1335
|
constructor() {
|
1057
|
-
super(...arguments), this._mediaPlayerRef =
|
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, [
|
1058
1337
|
"durationchange",
|
1059
1338
|
"ended",
|
1060
1339
|
"error",
|
@@ -1079,143 +1358,146 @@ let g = class extends k {
|
|
1079
1358
|
"video:timeupdate",
|
1080
1359
|
"video:ended",
|
1081
1360
|
"video:error"
|
1082
|
-
]), this._fetcherController = new
|
1361
|
+
]), this._fetcherController = new rs(this), this._trackingController = new os(this);
|
1083
1362
|
}
|
1084
1363
|
get fetching() {
|
1085
1364
|
return this._fetcherController.fetching;
|
1086
1365
|
}
|
1087
1366
|
get waiting() {
|
1088
|
-
var
|
1089
|
-
return (
|
1367
|
+
var r;
|
1368
|
+
return (r = this._mediaPlayerRef.value) == null ? void 0 : r.waiting;
|
1090
1369
|
}
|
1091
1370
|
get seeking() {
|
1092
|
-
var
|
1093
|
-
return (
|
1371
|
+
var r;
|
1372
|
+
return (r = this._mediaPlayerRef.value) == null ? void 0 : r.seeking;
|
1094
1373
|
}
|
1095
1374
|
get paused() {
|
1096
|
-
var
|
1097
|
-
return (
|
1375
|
+
var r;
|
1376
|
+
return (r = this._mediaPlayerRef.value) == null ? void 0 : r.paused;
|
1098
1377
|
}
|
1099
1378
|
get captions() {
|
1100
|
-
var
|
1101
|
-
return (
|
1379
|
+
var r;
|
1380
|
+
return (r = this._mediaPlayerRef.value) == null ? void 0 : r.captions;
|
1102
1381
|
}
|
1103
1382
|
get fullscreen() {
|
1104
|
-
var
|
1105
|
-
return (
|
1383
|
+
var r;
|
1384
|
+
return (r = this._mediaPlayerRef.value) == null ? void 0 : r.fullscreen;
|
1106
1385
|
}
|
1107
1386
|
get duration() {
|
1108
|
-
var
|
1109
|
-
return (
|
1387
|
+
var r;
|
1388
|
+
return (r = this._mediaPlayerRef.value) == null ? void 0 : r.duration;
|
1110
1389
|
}
|
1111
|
-
set currentTime(
|
1112
|
-
this._mediaPlayerRef.value && (this._mediaPlayerRef.value.currentTime =
|
1390
|
+
set currentTime(r) {
|
1391
|
+
this._mediaPlayerRef.value && (this._mediaPlayerRef.value.currentTime = r);
|
1113
1392
|
}
|
1114
1393
|
get currentTime() {
|
1115
|
-
var
|
1116
|
-
return ((
|
1394
|
+
var r;
|
1395
|
+
return ((r = this._mediaPlayerRef.value) == null ? void 0 : r.currentTime) ?? 0;
|
1117
1396
|
}
|
1118
|
-
set playbackRate(
|
1119
|
-
this._mediaPlayerRef.value && (this._mediaPlayerRef.value.playbackRate =
|
1397
|
+
set playbackRate(r) {
|
1398
|
+
this._mediaPlayerRef.value && (this._mediaPlayerRef.value.playbackRate = r);
|
1120
1399
|
}
|
1121
1400
|
get playbackRate() {
|
1122
|
-
var
|
1123
|
-
return ((
|
1401
|
+
var r;
|
1402
|
+
return ((r = this._mediaPlayerRef.value) == null ? void 0 : r.playbackRate) ?? 1;
|
1124
1403
|
}
|
1125
|
-
set volume(
|
1126
|
-
this._mediaPlayerRef.value && (this._mediaPlayerRef.value.volume =
|
1404
|
+
set volume(r) {
|
1405
|
+
this._mediaPlayerRef.value && (this._mediaPlayerRef.value.volume = r);
|
1127
1406
|
}
|
1128
1407
|
get volume() {
|
1129
|
-
var
|
1130
|
-
return ((
|
1408
|
+
var r;
|
1409
|
+
return ((r = this._mediaPlayerRef.value) == null ? void 0 : r.volume) ?? 1;
|
1131
1410
|
}
|
1132
|
-
set muted(
|
1133
|
-
this._mediaPlayerRef.value && (this._mediaPlayerRef.value.muted =
|
1411
|
+
set muted(r) {
|
1412
|
+
this._mediaPlayerRef.value && (this._mediaPlayerRef.value.muted = r);
|
1134
1413
|
}
|
1135
1414
|
get muted() {
|
1136
|
-
var
|
1137
|
-
return ((
|
1415
|
+
var r;
|
1416
|
+
return ((r = this._mediaPlayerRef.value) == null ? void 0 : r.muted) ?? !1;
|
1138
1417
|
}
|
1139
1418
|
get scene() {
|
1140
|
-
var
|
1141
|
-
return ((
|
1419
|
+
var r;
|
1420
|
+
return ((r = this._mediaPlayerRef.value) == null ? void 0 : r.scene) ?? null;
|
1142
1421
|
}
|
1143
1422
|
get scenes() {
|
1144
|
-
var
|
1145
|
-
return ((
|
1423
|
+
var r;
|
1424
|
+
return ((r = this._mediaPlayerRef.value) == null ? void 0 : r.scenes) ?? [];
|
1146
1425
|
}
|
1147
1426
|
get videoState() {
|
1148
|
-
var
|
1149
|
-
return (
|
1427
|
+
var r;
|
1428
|
+
return (r = this._mediaPlayerRef.value) == null ? void 0 : r.videoState;
|
1150
1429
|
}
|
1151
1430
|
get mediaPlayer() {
|
1152
1431
|
return this._mediaPlayerRef.value;
|
1153
1432
|
}
|
1154
1433
|
play() {
|
1155
|
-
var
|
1156
|
-
(
|
1434
|
+
var r;
|
1435
|
+
(r = this._mediaPlayerRef.value) == null || r.play();
|
1157
1436
|
}
|
1158
1437
|
pause() {
|
1159
|
-
var
|
1160
|
-
(
|
1438
|
+
var r;
|
1439
|
+
(r = this._mediaPlayerRef.value) == null || r.pause();
|
1161
1440
|
}
|
1162
|
-
setScene(
|
1441
|
+
setScene(r) {
|
1163
1442
|
var t;
|
1164
|
-
(t = this._mediaPlayerRef.value) == null || t.setScene(
|
1443
|
+
(t = this._mediaPlayerRef.value) == null || t.setScene(r);
|
1165
1444
|
}
|
1166
1445
|
render() {
|
1167
|
-
return
|
1446
|
+
return De`
|
1168
1447
|
<vmp-new-media-player
|
1169
|
-
${
|
1448
|
+
${Bt(this._mediaPlayerRef)}
|
1170
1449
|
${this.eventController.register()}
|
1171
1450
|
?autoplay=${this.autoplay}
|
1172
1451
|
?loading=${this.fetching}
|
1173
1452
|
.data=${this.vouch}
|
1174
1453
|
.template=${this.template}
|
1175
|
-
aspectRatio=${
|
1176
|
-
preload=${
|
1454
|
+
aspectRatio=${ft(this.aspectRatio)}
|
1455
|
+
preload=${ft(this.preload)}
|
1177
1456
|
.controls=${this.controls}
|
1178
1457
|
></vmp-new-media-player>
|
1179
1458
|
`;
|
1180
1459
|
}
|
1181
1460
|
};
|
1182
1461
|
f([
|
1183
|
-
|
1184
|
-
],
|
1462
|
+
v({ type: Object, attribute: "data" })
|
1463
|
+
], m.prototype, "data", 2);
|
1464
|
+
f([
|
1465
|
+
v({ type: String })
|
1466
|
+
], m.prototype, "vouchId", 2);
|
1185
1467
|
f([
|
1186
|
-
|
1187
|
-
],
|
1468
|
+
v({ type: String })
|
1469
|
+
], m.prototype, "templateId", 2);
|
1188
1470
|
f([
|
1189
|
-
|
1190
|
-
],
|
1471
|
+
v({ type: String })
|
1472
|
+
], m.prototype, "env", 2);
|
1191
1473
|
f([
|
1192
|
-
|
1193
|
-
],
|
1474
|
+
v({ type: String })
|
1475
|
+
], m.prototype, "apiKey", 2);
|
1194
1476
|
f([
|
1195
|
-
|
1196
|
-
],
|
1477
|
+
v({ type: String })
|
1478
|
+
], m.prototype, "trackingSource", 2);
|
1197
1479
|
f([
|
1198
|
-
|
1199
|
-
],
|
1480
|
+
v({ type: Array })
|
1481
|
+
], m.prototype, "controls", 2);
|
1200
1482
|
f([
|
1201
|
-
|
1202
|
-
],
|
1483
|
+
v({ type: String })
|
1484
|
+
], m.prototype, "preload", 2);
|
1203
1485
|
f([
|
1204
|
-
|
1205
|
-
],
|
1486
|
+
v({ type: Boolean })
|
1487
|
+
], m.prototype, "autoplay", 2);
|
1206
1488
|
f([
|
1207
|
-
|
1208
|
-
],
|
1489
|
+
v({ type: Number })
|
1490
|
+
], m.prototype, "aspectRatio", 2);
|
1209
1491
|
f([
|
1210
|
-
|
1211
|
-
],
|
1492
|
+
zt()
|
1493
|
+
], m.prototype, "vouch", 2);
|
1212
1494
|
f([
|
1213
|
-
|
1214
|
-
],
|
1215
|
-
|
1216
|
-
|
1217
|
-
],
|
1495
|
+
zt()
|
1496
|
+
], m.prototype, "template", 2);
|
1497
|
+
m = f([
|
1498
|
+
he("vouch-embed")
|
1499
|
+
], m);
|
1218
1500
|
export {
|
1219
|
-
|
1501
|
+
m as Embed
|
1220
1502
|
};
|
1221
1503
|
//# sourceMappingURL=embeds.js.map
|