@telia-ace/widget-conversation-flamingo 1.0.0

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.
Files changed (57) hide show
  1. package/LICENSE.txt +6 -0
  2. package/README.md +490 -0
  3. package/dist/agent.d.ts +21 -0
  4. package/dist/agent.d.ts.map +1 -0
  5. package/dist/components/conversation/conversation.d.ts +29 -0
  6. package/dist/components/conversation/conversation.d.ts.map +1 -0
  7. package/dist/components/conversation/plugin.d.ts +46 -0
  8. package/dist/components/conversation/plugin.d.ts.map +1 -0
  9. package/dist/components/conversation/ui/message-list.d.ts +10 -0
  10. package/dist/components/conversation/ui/message-list.d.ts.map +1 -0
  11. package/dist/components/conversation/ui/message-types/message-type-html.d.ts +8 -0
  12. package/dist/components/conversation/ui/message-types/message-type-html.d.ts.map +1 -0
  13. package/dist/components/conversation/ui/message-types/message-type-link-list.d.ts +9 -0
  14. package/dist/components/conversation/ui/message-types/message-type-link-list.d.ts.map +1 -0
  15. package/dist/components/conversation/ui/message-types/message-type-separator.d.ts +8 -0
  16. package/dist/components/conversation/ui/message-types/message-type-separator.d.ts.map +1 -0
  17. package/dist/components/conversation/ui/message.d.ts +9 -0
  18. package/dist/components/conversation/ui/message.d.ts.map +1 -0
  19. package/dist/components/conversation/utils.d.ts +2 -0
  20. package/dist/components/conversation/utils.d.ts.map +1 -0
  21. package/dist/conversation-31b48ff2.js +2312 -0
  22. package/dist/conversation-31b48ff2.js.map +1 -0
  23. package/dist/conversation-controller.d.ts +122 -0
  24. package/dist/conversation-controller.d.ts.map +1 -0
  25. package/dist/conversation-form-adapter.d.ts +7 -0
  26. package/dist/conversation-form-adapter.d.ts.map +1 -0
  27. package/dist/conversation-history.d.ts +27 -0
  28. package/dist/conversation-history.d.ts.map +1 -0
  29. package/dist/conversation-platform.d.ts +55 -0
  30. package/dist/conversation-platform.d.ts.map +1 -0
  31. package/dist/conversation-provider.d.ts +33 -0
  32. package/dist/conversation-provider.d.ts.map +1 -0
  33. package/dist/index-d8edc7b3.js +4615 -0
  34. package/dist/index-d8edc7b3.js.map +1 -0
  35. package/dist/index.d.ts +10 -0
  36. package/dist/index.d.ts.map +1 -0
  37. package/dist/index.js +12 -0
  38. package/dist/index.js.map +1 -0
  39. package/dist/resolve-entity-value.d.ts +11 -0
  40. package/dist/resolve-entity-value.d.ts.map +1 -0
  41. package/dist/store.d.ts +32 -0
  42. package/dist/store.d.ts.map +1 -0
  43. package/dist/types.d.ts +131 -0
  44. package/dist/types.d.ts.map +1 -0
  45. package/dist/user.d.ts +10 -0
  46. package/dist/user.d.ts.map +1 -0
  47. package/dist/utils/custom-message.d.ts +3 -0
  48. package/dist/utils/custom-message.d.ts.map +1 -0
  49. package/dist/utils/index.d.ts +2 -0
  50. package/dist/utils/index.d.ts.map +1 -0
  51. package/dist/utils/map-actions.d.ts +2 -0
  52. package/dist/utils/map-actions.d.ts.map +1 -0
  53. package/dist/utils/open-chat-widget.d.ts +5 -0
  54. package/dist/utils/open-chat-widget.d.ts.map +1 -0
  55. package/dist/utils/swap-provider.d.ts +9 -0
  56. package/dist/utils/swap-provider.d.ts.map +1 -0
  57. package/package.json +50 -0
@@ -0,0 +1,2312 @@
1
+ var ns = Object.defineProperty, os = Object.defineProperties;
2
+ var rs = Object.getOwnPropertyDescriptors;
3
+ var Wt = Object.getOwnPropertySymbols;
4
+ var ls = Object.prototype.hasOwnProperty, as = Object.prototype.propertyIsEnumerable;
5
+ var Gt = (s, t, e) => t in s ? ns(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, g = (s, t) => {
6
+ for (var e in t || (t = {}))
7
+ ls.call(t, e) && Gt(s, e, t[e]);
8
+ if (Wt)
9
+ for (var e of Wt(t))
10
+ as.call(t, e) && Gt(s, e, t[e]);
11
+ return s;
12
+ }, Y = (s, t) => os(s, rs(t));
13
+ var b = (s, t, e) => new Promise((i, n) => {
14
+ var o = (a) => {
15
+ try {
16
+ l(e.next(a));
17
+ } catch (c) {
18
+ n(c);
19
+ }
20
+ }, r = (a) => {
21
+ try {
22
+ l(e.throw(a));
23
+ } catch (c) {
24
+ n(c);
25
+ }
26
+ }, l = (a) => a.done ? i(a.value) : Promise.resolve(a.value).then(o, r);
27
+ l((e = e.apply(s, t)).next());
28
+ });
29
+ import { C as mt, W as cs, y as ds, V as hs } from "./index-d8edc7b3.js";
30
+ /**
31
+ * @license
32
+ * Copyright 2019 Google LLC
33
+ * SPDX-License-Identifier: BSD-3-Clause
34
+ */
35
+ const J = window, Ut = J.ShadowRoot && (J.ShadyCSS === void 0 || J.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, jt = Symbol(), Zt = /* @__PURE__ */ new WeakMap();
36
+ let xe = class {
37
+ constructor(t, e, i) {
38
+ if (this._$cssResult$ = !0, i !== jt)
39
+ throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
40
+ this.cssText = t, this.t = e;
41
+ }
42
+ get styleSheet() {
43
+ let t = this.o;
44
+ const e = this.t;
45
+ if (Ut && t === void 0) {
46
+ const i = e !== void 0 && e.length === 1;
47
+ i && (t = Zt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Zt.set(e, t));
48
+ }
49
+ return t;
50
+ }
51
+ toString() {
52
+ return this.cssText;
53
+ }
54
+ };
55
+ const us = (s) => new xe(typeof s == "string" ? s : s + "", void 0, jt), B = (s, ...t) => {
56
+ const e = s.length === 1 ? s[0] : t.reduce((i, n, o) => i + ((r) => {
57
+ if (r._$cssResult$ === !0)
58
+ return r.cssText;
59
+ if (typeof r == "number")
60
+ return r;
61
+ throw Error("Value passed to 'css' function must be a 'css' function result: " + r + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
62
+ })(n) + s[o + 1], s[0]);
63
+ return new xe(e, s, jt);
64
+ }, ps = (s, t) => {
65
+ Ut ? s.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => {
66
+ const i = document.createElement("style"), n = J.litNonce;
67
+ n !== void 0 && i.setAttribute("nonce", n), i.textContent = e.cssText, s.appendChild(i);
68
+ });
69
+ }, qt = Ut ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
70
+ let e = "";
71
+ for (const i of t.cssRules)
72
+ e += i.cssText;
73
+ return us(e);
74
+ })(s) : s;
75
+ /**
76
+ * @license
77
+ * Copyright 2017 Google LLC
78
+ * SPDX-License-Identifier: BSD-3-Clause
79
+ */
80
+ var yt;
81
+ const V = window, Kt = V.trustedTypes, $s = Kt ? Kt.emptyScript : "", Qt = V.reactiveElementPolyfillSupport, Tt = { toAttribute(s, t) {
82
+ switch (t) {
83
+ case Boolean:
84
+ s = s ? $s : null;
85
+ break;
86
+ case Object:
87
+ case Array:
88
+ s = s == null ? s : JSON.stringify(s);
89
+ }
90
+ return s;
91
+ }, fromAttribute(s, t) {
92
+ let e = s;
93
+ switch (t) {
94
+ case Boolean:
95
+ e = s !== null;
96
+ break;
97
+ case Number:
98
+ e = s === null ? null : Number(s);
99
+ break;
100
+ case Object:
101
+ case Array:
102
+ try {
103
+ e = JSON.parse(s);
104
+ } catch (i) {
105
+ e = null;
106
+ }
107
+ }
108
+ return e;
109
+ } }, Ee = (s, t) => t !== s && (t == t || s == s), bt = { attribute: !0, type: String, converter: Tt, reflect: !1, hasChanged: Ee }, Ot = "finalized";
110
+ let L = class extends HTMLElement {
111
+ constructor() {
112
+ super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this._$Eu();
113
+ }
114
+ static addInitializer(t) {
115
+ var e;
116
+ this.finalize(), ((e = this.h) !== null && e !== void 0 ? e : this.h = []).push(t);
117
+ }
118
+ static get observedAttributes() {
119
+ this.finalize();
120
+ const t = [];
121
+ return this.elementProperties.forEach((e, i) => {
122
+ const n = this._$Ep(i, e);
123
+ n !== void 0 && (this._$Ev.set(n, i), t.push(n));
124
+ }), t;
125
+ }
126
+ static createProperty(t, e = bt) {
127
+ if (e.state && (e.attribute = !1), this.finalize(), this.elementProperties.set(t, e), !e.noAccessor && !this.prototype.hasOwnProperty(t)) {
128
+ const i = typeof t == "symbol" ? Symbol() : "__" + t, n = this.getPropertyDescriptor(t, i, e);
129
+ n !== void 0 && Object.defineProperty(this.prototype, t, n);
130
+ }
131
+ }
132
+ static getPropertyDescriptor(t, e, i) {
133
+ return { get() {
134
+ return this[e];
135
+ }, set(n) {
136
+ const o = this[t];
137
+ this[e] = n, this.requestUpdate(t, o, i);
138
+ }, configurable: !0, enumerable: !0 };
139
+ }
140
+ static getPropertyOptions(t) {
141
+ return this.elementProperties.get(t) || bt;
142
+ }
143
+ static finalize() {
144
+ if (this.hasOwnProperty(Ot))
145
+ return !1;
146
+ this[Ot] = !0;
147
+ const t = Object.getPrototypeOf(this);
148
+ if (t.finalize(), t.h !== void 0 && (this.h = [...t.h]), this.elementProperties = new Map(t.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
149
+ const e = this.properties, i = [...Object.getOwnPropertyNames(e), ...Object.getOwnPropertySymbols(e)];
150
+ for (const n of i)
151
+ this.createProperty(n, e[n]);
152
+ }
153
+ return this.elementStyles = this.finalizeStyles(this.styles), !0;
154
+ }
155
+ static finalizeStyles(t) {
156
+ const e = [];
157
+ if (Array.isArray(t)) {
158
+ const i = new Set(t.flat(1 / 0).reverse());
159
+ for (const n of i)
160
+ e.unshift(qt(n));
161
+ } else
162
+ t !== void 0 && e.push(qt(t));
163
+ return e;
164
+ }
165
+ static _$Ep(t, e) {
166
+ const i = e.attribute;
167
+ return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
168
+ }
169
+ _$Eu() {
170
+ var t;
171
+ this._$E_ = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), (t = this.constructor.h) === null || t === void 0 || t.forEach((e) => e(this));
172
+ }
173
+ addController(t) {
174
+ var e, i;
175
+ ((e = this._$ES) !== null && e !== void 0 ? e : this._$ES = []).push(t), this.renderRoot !== void 0 && this.isConnected && ((i = t.hostConnected) === null || i === void 0 || i.call(t));
176
+ }
177
+ removeController(t) {
178
+ var e;
179
+ (e = this._$ES) === null || e === void 0 || e.splice(this._$ES.indexOf(t) >>> 0, 1);
180
+ }
181
+ _$Eg() {
182
+ this.constructor.elementProperties.forEach((t, e) => {
183
+ this.hasOwnProperty(e) && (this._$Ei.set(e, this[e]), delete this[e]);
184
+ });
185
+ }
186
+ createRenderRoot() {
187
+ var t;
188
+ const e = (t = this.shadowRoot) !== null && t !== void 0 ? t : this.attachShadow(this.constructor.shadowRootOptions);
189
+ return ps(e, this.constructor.elementStyles), e;
190
+ }
191
+ connectedCallback() {
192
+ var t;
193
+ this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$ES) === null || t === void 0 || t.forEach((e) => {
194
+ var i;
195
+ return (i = e.hostConnected) === null || i === void 0 ? void 0 : i.call(e);
196
+ });
197
+ }
198
+ enableUpdating(t) {
199
+ }
200
+ disconnectedCallback() {
201
+ var t;
202
+ (t = this._$ES) === null || t === void 0 || t.forEach((e) => {
203
+ var i;
204
+ return (i = e.hostDisconnected) === null || i === void 0 ? void 0 : i.call(e);
205
+ });
206
+ }
207
+ attributeChangedCallback(t, e, i) {
208
+ this._$AK(t, i);
209
+ }
210
+ _$EO(t, e, i = bt) {
211
+ var n;
212
+ const o = this.constructor._$Ep(t, i);
213
+ if (o !== void 0 && i.reflect === !0) {
214
+ const r = (((n = i.converter) === null || n === void 0 ? void 0 : n.toAttribute) !== void 0 ? i.converter : Tt).toAttribute(e, i.type);
215
+ this._$El = t, r == null ? this.removeAttribute(o) : this.setAttribute(o, r), this._$El = null;
216
+ }
217
+ }
218
+ _$AK(t, e) {
219
+ var i;
220
+ const n = this.constructor, o = n._$Ev.get(t);
221
+ if (o !== void 0 && this._$El !== o) {
222
+ const r = n.getPropertyOptions(o), l = typeof r.converter == "function" ? { fromAttribute: r.converter } : ((i = r.converter) === null || i === void 0 ? void 0 : i.fromAttribute) !== void 0 ? r.converter : Tt;
223
+ this._$El = o, this[o] = l.fromAttribute(e, r.type), this._$El = null;
224
+ }
225
+ }
226
+ requestUpdate(t, e, i) {
227
+ let n = !0;
228
+ t !== void 0 && (((i = i || this.constructor.getPropertyOptions(t)).hasChanged || Ee)(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))) : n = !1), !this.isUpdatePending && n && (this._$E_ = this._$Ej());
229
+ }
230
+ _$Ej() {
231
+ return b(this, null, function* () {
232
+ this.isUpdatePending = !0;
233
+ try {
234
+ yield this._$E_;
235
+ } catch (e) {
236
+ Promise.reject(e);
237
+ }
238
+ const t = this.scheduleUpdate();
239
+ return t != null && (yield t), !this.isUpdatePending;
240
+ });
241
+ }
242
+ scheduleUpdate() {
243
+ return this.performUpdate();
244
+ }
245
+ performUpdate() {
246
+ var t;
247
+ if (!this.isUpdatePending)
248
+ return;
249
+ this.hasUpdated, this._$Ei && (this._$Ei.forEach((n, o) => this[o] = n), this._$Ei = void 0);
250
+ let e = !1;
251
+ const i = this._$AL;
252
+ try {
253
+ e = this.shouldUpdate(i), e ? (this.willUpdate(i), (t = this._$ES) === null || t === void 0 || t.forEach((n) => {
254
+ var o;
255
+ return (o = n.hostUpdate) === null || o === void 0 ? void 0 : o.call(n);
256
+ }), this.update(i)) : this._$Ek();
257
+ } catch (n) {
258
+ throw e = !1, this._$Ek(), n;
259
+ }
260
+ e && this._$AE(i);
261
+ }
262
+ willUpdate(t) {
263
+ }
264
+ _$AE(t) {
265
+ var e;
266
+ (e = this._$ES) === null || e === void 0 || e.forEach((i) => {
267
+ var n;
268
+ return (n = i.hostUpdated) === null || n === void 0 ? void 0 : n.call(i);
269
+ }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
270
+ }
271
+ _$Ek() {
272
+ this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
273
+ }
274
+ get updateComplete() {
275
+ return this.getUpdateComplete();
276
+ }
277
+ getUpdateComplete() {
278
+ return this._$E_;
279
+ }
280
+ shouldUpdate(t) {
281
+ return !0;
282
+ }
283
+ update(t) {
284
+ this._$EC !== void 0 && (this._$EC.forEach((e, i) => this._$EO(i, this[i], e)), this._$EC = void 0), this._$Ek();
285
+ }
286
+ updated(t) {
287
+ }
288
+ firstUpdated(t) {
289
+ }
290
+ };
291
+ L[Ot] = !0, L.elementProperties = /* @__PURE__ */ new Map(), L.elementStyles = [], L.shadowRootOptions = { mode: "open" }, Qt == null || Qt({ ReactiveElement: L }), ((yt = V.reactiveElementVersions) !== null && yt !== void 0 ? yt : V.reactiveElementVersions = []).push("1.6.3");
292
+ /**
293
+ * @license
294
+ * Copyright 2017 Google LLC
295
+ * SPDX-License-Identifier: BSD-3-Clause
296
+ */
297
+ var _t;
298
+ const tt = window, I = tt.trustedTypes, Yt = I ? I.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, Pt = "$lit$", w = `lit$${(Math.random() + "").slice(9)}$`, Ce = "?" + w, fs = `<${Ce}>`, O = document, G = () => O.createComment(""), Z = (s) => s === null || typeof s != "object" && typeof s != "function", ke = Array.isArray, vs = (s) => ke(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", At = `[
299
+ \f\r]`, F = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Xt = /-->/g, Jt = />/g, k = RegExp(`>|${At}(?:([^\\s"'>=/]+)(${At}*=${At}*(?:[^
300
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Vt = /'/g, te = /"/g, Te = /^(?:script|style|textarea|title)$/i, gs = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), f = gs(1), x = Symbol.for("lit-noChange"), p = Symbol.for("lit-nothing"), ee = /* @__PURE__ */ new WeakMap(), T = O.createTreeWalker(O, 129, null, !1);
301
+ function Oe(s, t) {
302
+ if (!Array.isArray(s) || !s.hasOwnProperty("raw"))
303
+ throw Error("invalid template strings array");
304
+ return Yt !== void 0 ? Yt.createHTML(t) : t;
305
+ }
306
+ const ms = (s, t) => {
307
+ const e = s.length - 1, i = [];
308
+ let n, o = t === 2 ? "<svg>" : "", r = F;
309
+ for (let l = 0; l < e; l++) {
310
+ const a = s[l];
311
+ let c, d, h = -1, u = 0;
312
+ for (; u < a.length && (r.lastIndex = u, d = r.exec(a), d !== null); )
313
+ u = r.lastIndex, r === F ? d[1] === "!--" ? r = Xt : d[1] !== void 0 ? r = Jt : d[2] !== void 0 ? (Te.test(d[2]) && (n = RegExp("</" + d[2], "g")), r = k) : d[3] !== void 0 && (r = k) : r === k ? d[0] === ">" ? (r = n != null ? n : F, h = -1) : d[1] === void 0 ? h = -2 : (h = r.lastIndex - d[2].length, c = d[1], r = d[3] === void 0 ? k : d[3] === '"' ? te : Vt) : r === te || r === Vt ? r = k : r === Xt || r === Jt ? r = F : (r = k, n = void 0);
314
+ const $ = r === k && s[l + 1].startsWith("/>") ? " " : "";
315
+ o += r === F ? a + fs : h >= 0 ? (i.push(c), a.slice(0, h) + Pt + a.slice(h) + w + $) : a + w + (h === -2 ? (i.push(void 0), l) : $);
316
+ }
317
+ return [Oe(s, o + (s[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
318
+ };
319
+ let Ht = class Pe {
320
+ constructor({ strings: t, _$litType$: e }, i) {
321
+ let n;
322
+ this.parts = [];
323
+ let o = 0, r = 0;
324
+ const l = t.length - 1, a = this.parts, [c, d] = ms(t, e);
325
+ if (this.el = Pe.createElement(c, i), T.currentNode = this.el.content, e === 2) {
326
+ const h = this.el.content, u = h.firstChild;
327
+ u.remove(), h.append(...u.childNodes);
328
+ }
329
+ for (; (n = T.nextNode()) !== null && a.length < l; ) {
330
+ if (n.nodeType === 1) {
331
+ if (n.hasAttributes()) {
332
+ const h = [];
333
+ for (const u of n.getAttributeNames())
334
+ if (u.endsWith(Pt) || u.startsWith(w)) {
335
+ const $ = d[r++];
336
+ if (h.push(u), $ !== void 0) {
337
+ const C = n.getAttribute($.toLowerCase() + Pt).split(w), S = /([.?@])?(.*)/.exec($);
338
+ a.push({ type: 1, index: o, name: S[2], strings: C, ctor: S[1] === "." ? bs : S[1] === "?" ? As : S[1] === "@" ? Ss : ht });
339
+ } else
340
+ a.push({ type: 6, index: o });
341
+ }
342
+ for (const u of h)
343
+ n.removeAttribute(u);
344
+ }
345
+ if (Te.test(n.tagName)) {
346
+ const h = n.textContent.split(w), u = h.length - 1;
347
+ if (u > 0) {
348
+ n.textContent = I ? I.emptyScript : "";
349
+ for (let $ = 0; $ < u; $++)
350
+ n.append(h[$], G()), T.nextNode(), a.push({ type: 2, index: ++o });
351
+ n.append(h[u], G());
352
+ }
353
+ }
354
+ } else if (n.nodeType === 8)
355
+ if (n.data === Ce)
356
+ a.push({ type: 2, index: o });
357
+ else {
358
+ let h = -1;
359
+ for (; (h = n.data.indexOf(w, h + 1)) !== -1; )
360
+ a.push({ type: 7, index: o }), h += w.length - 1;
361
+ }
362
+ o++;
363
+ }
364
+ }
365
+ static createElement(t, e) {
366
+ const i = O.createElement("template");
367
+ return i.innerHTML = t, i;
368
+ }
369
+ };
370
+ function D(s, t, e = s, i) {
371
+ var n, o, r, l;
372
+ if (t === x)
373
+ return t;
374
+ let a = i !== void 0 ? (n = e._$Co) === null || n === void 0 ? void 0 : n[i] : e._$Cl;
375
+ const c = Z(t) ? void 0 : t._$litDirective$;
376
+ return (a == null ? void 0 : a.constructor) !== c && ((o = a == null ? void 0 : a._$AO) === null || o === void 0 || o.call(a, !1), c === void 0 ? a = void 0 : (a = new c(s), a._$AT(s, e, i)), i !== void 0 ? ((r = (l = e)._$Co) !== null && r !== void 0 ? r : l._$Co = [])[i] = a : e._$Cl = a), a !== void 0 && (t = D(s, a._$AS(s, t.values), a, i)), t;
377
+ }
378
+ class ys {
379
+ constructor(t, e) {
380
+ this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
381
+ }
382
+ get parentNode() {
383
+ return this._$AM.parentNode;
384
+ }
385
+ get _$AU() {
386
+ return this._$AM._$AU;
387
+ }
388
+ u(t) {
389
+ var e;
390
+ const { el: { content: i }, parts: n } = this._$AD, o = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : O).importNode(i, !0);
391
+ T.currentNode = o;
392
+ let r = T.nextNode(), l = 0, a = 0, c = n[0];
393
+ for (; c !== void 0; ) {
394
+ if (l === c.index) {
395
+ let d;
396
+ c.type === 2 ? d = new K(r, r.nextSibling, this, t) : c.type === 1 ? d = new c.ctor(r, c.name, c.strings, this, t) : c.type === 6 && (d = new ws(r, this, t)), this._$AV.push(d), c = n[++a];
397
+ }
398
+ l !== (c == null ? void 0 : c.index) && (r = T.nextNode(), l++);
399
+ }
400
+ return T.currentNode = O, o;
401
+ }
402
+ v(t) {
403
+ let e = 0;
404
+ for (const i of this._$AV)
405
+ i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
406
+ }
407
+ }
408
+ class K {
409
+ constructor(t, e, i, n) {
410
+ var o;
411
+ this.type = 2, this._$AH = p, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = n, this._$Cp = (o = n == null ? void 0 : n.isConnected) === null || o === void 0 || o;
412
+ }
413
+ get _$AU() {
414
+ var t, e;
415
+ return (e = (t = this._$AM) === null || t === void 0 ? void 0 : t._$AU) !== null && e !== void 0 ? e : this._$Cp;
416
+ }
417
+ get parentNode() {
418
+ let t = this._$AA.parentNode;
419
+ const e = this._$AM;
420
+ return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t;
421
+ }
422
+ get startNode() {
423
+ return this._$AA;
424
+ }
425
+ get endNode() {
426
+ return this._$AB;
427
+ }
428
+ _$AI(t, e = this) {
429
+ t = D(this, t, e), Z(t) ? t === p || t == null || t === "" ? (this._$AH !== p && this._$AR(), this._$AH = p) : t !== this._$AH && t !== x && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : vs(t) ? this.T(t) : this._(t);
430
+ }
431
+ k(t) {
432
+ return this._$AA.parentNode.insertBefore(t, this._$AB);
433
+ }
434
+ $(t) {
435
+ this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
436
+ }
437
+ _(t) {
438
+ this._$AH !== p && Z(this._$AH) ? this._$AA.nextSibling.data = t : this.$(O.createTextNode(t)), this._$AH = t;
439
+ }
440
+ g(t) {
441
+ var e;
442
+ const { values: i, _$litType$: n } = t, o = typeof n == "number" ? this._$AC(t) : (n.el === void 0 && (n.el = Ht.createElement(Oe(n.h, n.h[0]), this.options)), n);
443
+ if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === o)
444
+ this._$AH.v(i);
445
+ else {
446
+ const r = new ys(o, this), l = r.u(this.options);
447
+ r.v(i), this.$(l), this._$AH = r;
448
+ }
449
+ }
450
+ _$AC(t) {
451
+ let e = ee.get(t.strings);
452
+ return e === void 0 && ee.set(t.strings, e = new Ht(t)), e;
453
+ }
454
+ T(t) {
455
+ ke(this._$AH) || (this._$AH = [], this._$AR());
456
+ const e = this._$AH;
457
+ let i, n = 0;
458
+ for (const o of t)
459
+ n === e.length ? e.push(i = new K(this.k(G()), this.k(G()), this, this.options)) : i = e[n], i._$AI(o), n++;
460
+ n < e.length && (this._$AR(i && i._$AB.nextSibling, n), e.length = n);
461
+ }
462
+ _$AR(t = this._$AA.nextSibling, e) {
463
+ var i;
464
+ for ((i = this._$AP) === null || i === void 0 || i.call(this, !1, !0, e); t && t !== this._$AB; ) {
465
+ const n = t.nextSibling;
466
+ t.remove(), t = n;
467
+ }
468
+ }
469
+ setConnected(t) {
470
+ var e;
471
+ this._$AM === void 0 && (this._$Cp = t, (e = this._$AP) === null || e === void 0 || e.call(this, t));
472
+ }
473
+ }
474
+ class ht {
475
+ constructor(t, e, i, n, o) {
476
+ this.type = 1, this._$AH = p, this._$AN = void 0, this.element = t, this.name = e, this._$AM = n, this.options = o, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = p;
477
+ }
478
+ get tagName() {
479
+ return this.element.tagName;
480
+ }
481
+ get _$AU() {
482
+ return this._$AM._$AU;
483
+ }
484
+ _$AI(t, e = this, i, n) {
485
+ const o = this.strings;
486
+ let r = !1;
487
+ if (o === void 0)
488
+ t = D(this, t, e, 0), r = !Z(t) || t !== this._$AH && t !== x, r && (this._$AH = t);
489
+ else {
490
+ const l = t;
491
+ let a, c;
492
+ for (t = o[0], a = 0; a < o.length - 1; a++)
493
+ c = D(this, l[i + a], e, a), c === x && (c = this._$AH[a]), r || (r = !Z(c) || c !== this._$AH[a]), c === p ? t = p : t !== p && (t += (c != null ? c : "") + o[a + 1]), this._$AH[a] = c;
494
+ }
495
+ r && !n && this.j(t);
496
+ }
497
+ j(t) {
498
+ t === p ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t != null ? t : "");
499
+ }
500
+ }
501
+ let bs = class extends ht {
502
+ constructor() {
503
+ super(...arguments), this.type = 3;
504
+ }
505
+ j(t) {
506
+ this.element[this.name] = t === p ? void 0 : t;
507
+ }
508
+ };
509
+ const _s = I ? I.emptyScript : "";
510
+ class As extends ht {
511
+ constructor() {
512
+ super(...arguments), this.type = 4;
513
+ }
514
+ j(t) {
515
+ t && t !== p ? this.element.setAttribute(this.name, _s) : this.element.removeAttribute(this.name);
516
+ }
517
+ }
518
+ class Ss extends ht {
519
+ constructor(t, e, i, n, o) {
520
+ super(t, e, i, n, o), this.type = 5;
521
+ }
522
+ _$AI(t, e = this) {
523
+ var i;
524
+ if ((t = (i = D(this, t, e, 0)) !== null && i !== void 0 ? i : p) === x)
525
+ return;
526
+ const n = this._$AH, o = t === p && n !== p || t.capture !== n.capture || t.once !== n.once || t.passive !== n.passive, r = t !== p && (n === p || o);
527
+ o && this.element.removeEventListener(this.name, this, n), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
528
+ }
529
+ handleEvent(t) {
530
+ var e, i;
531
+ typeof this._$AH == "function" ? this._$AH.call((i = (e = this.options) === null || e === void 0 ? void 0 : e.host) !== null && i !== void 0 ? i : this.element, t) : this._$AH.handleEvent(t);
532
+ }
533
+ }
534
+ class ws {
535
+ constructor(t, e, i) {
536
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
537
+ }
538
+ get _$AU() {
539
+ return this._$AM._$AU;
540
+ }
541
+ _$AI(t) {
542
+ D(this, t);
543
+ }
544
+ }
545
+ const se = tt.litHtmlPolyfillSupport;
546
+ se == null || se(Ht, K), ((_t = tt.litHtmlVersions) !== null && _t !== void 0 ? _t : tt.litHtmlVersions = []).push("2.8.0");
547
+ const xs = (s, t, e) => {
548
+ var i, n;
549
+ const o = (i = e == null ? void 0 : e.renderBefore) !== null && i !== void 0 ? i : t;
550
+ let r = o._$litPart$;
551
+ if (r === void 0) {
552
+ const l = (n = e == null ? void 0 : e.renderBefore) !== null && n !== void 0 ? n : null;
553
+ o._$litPart$ = r = new K(t.insertBefore(G(), l), l, void 0, e != null ? e : {});
554
+ }
555
+ return r._$AI(s), r;
556
+ };
557
+ /**
558
+ * @license
559
+ * Copyright 2017 Google LLC
560
+ * SPDX-License-Identifier: BSD-3-Clause
561
+ */
562
+ var St, wt;
563
+ let _ = class extends L {
564
+ constructor() {
565
+ super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
566
+ }
567
+ createRenderRoot() {
568
+ var t, e;
569
+ const i = super.createRenderRoot();
570
+ return (t = (e = this.renderOptions).renderBefore) !== null && t !== void 0 || (e.renderBefore = i.firstChild), i;
571
+ }
572
+ update(t) {
573
+ const e = this.render();
574
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = xs(e, this.renderRoot, this.renderOptions);
575
+ }
576
+ connectedCallback() {
577
+ var t;
578
+ super.connectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!0);
579
+ }
580
+ disconnectedCallback() {
581
+ var t;
582
+ super.disconnectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!1);
583
+ }
584
+ render() {
585
+ return x;
586
+ }
587
+ };
588
+ _.finalized = !0, _._$litElement$ = !0, (St = globalThis.litElementHydrateSupport) === null || St === void 0 || St.call(globalThis, { LitElement: _ });
589
+ const ie = globalThis.litElementPolyfillSupport;
590
+ ie == null || ie({ LitElement: _ });
591
+ ((wt = globalThis.litElementVersions) !== null && wt !== void 0 ? wt : globalThis.litElementVersions = []).push("3.3.3");
592
+ /**
593
+ * @license
594
+ * Copyright 2017 Google LLC
595
+ * SPDX-License-Identifier: BSD-3-Clause
596
+ */
597
+ const z = (s) => (t) => typeof t == "function" ? ((e, i) => (customElements.define(e, i), i))(s, t) : ((e, i) => {
598
+ const { kind: n, elements: o } = i;
599
+ return { kind: n, elements: o, finisher(r) {
600
+ customElements.define(e, r);
601
+ } };
602
+ })(s, t);
603
+ /**
604
+ * @license
605
+ * Copyright 2017 Google LLC
606
+ * SPDX-License-Identifier: BSD-3-Clause
607
+ */
608
+ const Es = (s, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? Y(g({}, t), { finisher(e) {
609
+ e.createProperty(t.key, s);
610
+ } }) : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: t.key, initializer() {
611
+ typeof t.initializer == "function" && (this[t.key] = t.initializer.call(this));
612
+ }, finisher(e) {
613
+ e.createProperty(t.key, s);
614
+ } }, Cs = (s, t, e) => {
615
+ t.constructor.createProperty(e, s);
616
+ };
617
+ function E(s) {
618
+ return (t, e) => e !== void 0 ? Cs(s, t, e) : Es(s, t);
619
+ }
620
+ /**
621
+ * @license
622
+ * Copyright 2017 Google LLC
623
+ * SPDX-License-Identifier: BSD-3-Clause
624
+ */
625
+ function ks(s) {
626
+ return E(Y(g({}, s), { state: !0 }));
627
+ }
628
+ /**
629
+ * @license
630
+ * Copyright 2017 Google LLC
631
+ * SPDX-License-Identifier: BSD-3-Clause
632
+ */
633
+ const Ts = ({ finisher: s, descriptor: t }) => (e, i) => {
634
+ var n;
635
+ if (i === void 0) {
636
+ const o = (n = e.originalKey) !== null && n !== void 0 ? n : e.key, r = t != null ? { kind: "method", placement: "prototype", key: o, descriptor: t(e.key) } : Y(g({}, e), { key: o });
637
+ return s != null && (r.finisher = function(l) {
638
+ s(l, o);
639
+ }), r;
640
+ }
641
+ {
642
+ const o = e.constructor;
643
+ t !== void 0 && Object.defineProperty(e, i, t(i)), s == null || s(o, i);
644
+ }
645
+ };
646
+ /**
647
+ * @license
648
+ * Copyright 2021 Google LLC
649
+ * SPDX-License-Identifier: BSD-3-Clause
650
+ */
651
+ var xt;
652
+ ((xt = window.HTMLSlotElement) === null || xt === void 0 ? void 0 : xt.prototype.assignedElements) != null;
653
+ /**
654
+ * @license
655
+ * Copyright 2020 Google LLC
656
+ * SPDX-License-Identifier: BSD-3-Clause
657
+ */
658
+ const Os = (s) => s.strings === void 0;
659
+ /**
660
+ * @license
661
+ * Copyright 2017 Google LLC
662
+ * SPDX-License-Identifier: BSD-3-Clause
663
+ */
664
+ const ut = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, pt = (s) => (...t) => ({ _$litDirective$: s, values: t });
665
+ let It = class {
666
+ constructor(t) {
667
+ }
668
+ get _$AU() {
669
+ return this._$AM._$AU;
670
+ }
671
+ _$AT(t, e, i) {
672
+ this._$Ct = t, this._$AM = e, this._$Ci = i;
673
+ }
674
+ _$AS(t, e) {
675
+ return this.update(t, e);
676
+ }
677
+ update(t, e) {
678
+ return this.render(...e);
679
+ }
680
+ };
681
+ /**
682
+ * @license
683
+ * Copyright 2017 Google LLC
684
+ * SPDX-License-Identifier: BSD-3-Clause
685
+ */
686
+ const W = (s, t) => {
687
+ var e, i;
688
+ const n = s._$AN;
689
+ if (n === void 0)
690
+ return !1;
691
+ for (const o of n)
692
+ (i = (e = o)._$AO) === null || i === void 0 || i.call(e, t, !1), W(o, t);
693
+ return !0;
694
+ }, et = (s) => {
695
+ let t, e;
696
+ do {
697
+ if ((t = s._$AM) === void 0)
698
+ break;
699
+ e = t._$AN, e.delete(s), s = t;
700
+ } while ((e == null ? void 0 : e.size) === 0);
701
+ }, He = (s) => {
702
+ for (let t; t = s._$AM; s = t) {
703
+ let e = t._$AN;
704
+ if (e === void 0)
705
+ t._$AN = e = /* @__PURE__ */ new Set();
706
+ else if (e.has(s))
707
+ break;
708
+ e.add(s), Ls(t);
709
+ }
710
+ };
711
+ function Ps(s) {
712
+ this._$AN !== void 0 ? (et(this), this._$AM = s, He(this)) : this._$AM = s;
713
+ }
714
+ function Hs(s, t = !1, e = 0) {
715
+ const i = this._$AH, n = this._$AN;
716
+ if (n !== void 0 && n.size !== 0)
717
+ if (t)
718
+ if (Array.isArray(i))
719
+ for (let o = e; o < i.length; o++)
720
+ W(i[o], !1), et(i[o]);
721
+ else
722
+ i != null && (W(i, !1), et(i));
723
+ else
724
+ W(this, s);
725
+ }
726
+ const Ls = (s) => {
727
+ var t, e, i, n;
728
+ s.type == ut.CHILD && ((t = (i = s)._$AP) !== null && t !== void 0 || (i._$AP = Hs), (e = (n = s)._$AQ) !== null && e !== void 0 || (n._$AQ = Ps));
729
+ };
730
+ class Le extends It {
731
+ constructor() {
732
+ super(...arguments), this._$AN = void 0;
733
+ }
734
+ _$AT(t, e, i) {
735
+ super._$AT(t, e, i), He(this), this.isConnected = t._$AU;
736
+ }
737
+ _$AO(t, e = !0) {
738
+ var i, n;
739
+ t !== this.isConnected && (this.isConnected = t, t ? (i = this.reconnected) === null || i === void 0 || i.call(this) : (n = this.disconnected) === null || n === void 0 || n.call(this)), e && (W(this, t), et(this));
740
+ }
741
+ setValue(t) {
742
+ if (Os(this._$Ct))
743
+ this._$Ct._$AI(t, this);
744
+ else {
745
+ const e = [...this._$Ct._$AH];
746
+ e[this._$Ci] = t, this._$Ct._$AI(e, this, 0);
747
+ }
748
+ }
749
+ disconnected() {
750
+ }
751
+ reconnected() {
752
+ }
753
+ }
754
+ /**
755
+ * @license
756
+ * Copyright 2020 Google LLC
757
+ * SPDX-License-Identifier: BSD-3-Clause
758
+ */
759
+ const Ns = () => new Ms();
760
+ let Ms = class {
761
+ };
762
+ const Et = /* @__PURE__ */ new WeakMap(), Rs = pt(class extends Le {
763
+ render(s) {
764
+ return p;
765
+ }
766
+ update(s, [t]) {
767
+ var e;
768
+ const i = t !== this.G;
769
+ return i && this.G !== void 0 && this.ot(void 0), (i || this.rt !== this.lt) && (this.G = t, this.dt = (e = s.options) === null || e === void 0 ? void 0 : e.host, this.ot(this.lt = s.element)), p;
770
+ }
771
+ ot(s) {
772
+ var t;
773
+ if (typeof this.G == "function") {
774
+ const e = (t = this.dt) !== null && t !== void 0 ? t : globalThis;
775
+ let i = Et.get(e);
776
+ i === void 0 && (i = /* @__PURE__ */ new WeakMap(), Et.set(e, i)), i.get(this.G) !== void 0 && this.G.call(this.dt, void 0), i.set(this.G, s), s !== void 0 && this.G.call(this.dt, s);
777
+ } else
778
+ this.G.value = s;
779
+ }
780
+ get rt() {
781
+ var s, t, e;
782
+ return typeof this.G == "function" ? (t = Et.get((s = this.dt) !== null && s !== void 0 ? s : globalThis)) === null || t === void 0 ? void 0 : t.get(this.G) : (e = this.G) === null || e === void 0 ? void 0 : e.value;
783
+ }
784
+ disconnected() {
785
+ this.rt === this.lt && this.ot(void 0);
786
+ }
787
+ reconnected() {
788
+ this.ot(this.lt);
789
+ }
790
+ }), Us = /* @__PURE__ */ new WeakMap();
791
+ let ne = 0;
792
+ const Ct = /* @__PURE__ */ new Map(), oe = /* @__PURE__ */ new WeakSet(), re = () => new Promise((s) => requestAnimationFrame(s)), le = [{ opacity: 0 }], ae = [{ opacity: 0 }, { opacity: 1 }], ce = (s, t) => {
793
+ const e = s - t;
794
+ return e === 0 ? void 0 : e;
795
+ }, de = (s, t) => {
796
+ const e = s / t;
797
+ return e === 1 ? void 0 : e;
798
+ }, kt = { left: (s, t) => {
799
+ const e = ce(s, t);
800
+ return { value: e, transform: e == null || isNaN(e) ? void 0 : `translateX(${e}px)` };
801
+ }, top: (s, t) => {
802
+ const e = ce(s, t);
803
+ return { value: e, transform: e == null || isNaN(e) ? void 0 : `translateY(${e}px)` };
804
+ }, width: (s, t) => {
805
+ let e;
806
+ t === 0 && (t = 1, e = { width: "1px" });
807
+ const i = de(s, t);
808
+ return { value: i, overrideFrom: e, transform: i == null || isNaN(i) ? void 0 : `scaleX(${i})` };
809
+ }, height: (s, t) => {
810
+ let e;
811
+ t === 0 && (t = 1, e = { height: "1px" });
812
+ const i = de(s, t);
813
+ return { value: i, overrideFrom: e, transform: i == null || isNaN(i) ? void 0 : `scaleY(${i})` };
814
+ } }, js = { duration: 333, easing: "ease-in-out" }, Is = ["left", "top", "width", "height", "opacity", "color", "background"], he = /* @__PURE__ */ new WeakMap();
815
+ class Ds extends Le {
816
+ constructor(t) {
817
+ if (super(t), this.t = null, this.i = null, this.o = !0, this.shouldLog = !1, t.type === ut.CHILD)
818
+ throw Error("The `animate` directive must be used in attribute position.");
819
+ this.createFinished();
820
+ }
821
+ createFinished() {
822
+ var t;
823
+ (t = this.resolveFinished) === null || t === void 0 || t.call(this), this.finished = new Promise((e) => {
824
+ this.h = e;
825
+ });
826
+ }
827
+ resolveFinished() {
828
+ return b(this, null, function* () {
829
+ var t;
830
+ (t = this.h) === null || t === void 0 || t.call(this), this.h = void 0;
831
+ });
832
+ }
833
+ render(t) {
834
+ return p;
835
+ }
836
+ getController() {
837
+ return Us.get(this.l);
838
+ }
839
+ isDisabled() {
840
+ var t;
841
+ return this.options.disabled || ((t = this.getController()) === null || t === void 0 ? void 0 : t.disabled);
842
+ }
843
+ update(t, [e]) {
844
+ var i;
845
+ const n = this.l === void 0;
846
+ return n && (this.l = (i = t.options) === null || i === void 0 ? void 0 : i.host, this.l.addController(this), this.element = t.element, he.set(this.element, this)), this.optionsOrCallback = e, (n || typeof e != "function") && this.u(e), this.render(e);
847
+ }
848
+ u(t) {
849
+ var e, i;
850
+ t = t != null ? t : {};
851
+ const n = this.getController();
852
+ n !== void 0 && ((t = g(g({}, n.defaultOptions), t)).keyframeOptions = g(g({}, n.defaultOptions.keyframeOptions), t.keyframeOptions)), (e = (i = t).properties) !== null && e !== void 0 || (i.properties = Is), this.options = t;
853
+ }
854
+ v() {
855
+ const t = {}, e = this.element.getBoundingClientRect(), i = getComputedStyle(this.element);
856
+ return this.options.properties.forEach((n) => {
857
+ var o;
858
+ const r = (o = e[n]) !== null && o !== void 0 ? o : kt[n] ? void 0 : i[n], l = Number(r);
859
+ t[n] = isNaN(l) ? r + "" : l;
860
+ }), t;
861
+ }
862
+ p() {
863
+ let t, e = !0;
864
+ return this.options.guard && (t = this.options.guard(), e = ((i, n) => {
865
+ if (Array.isArray(i)) {
866
+ if (Array.isArray(n) && n.length === i.length && i.every((o, r) => o === n[r]))
867
+ return !1;
868
+ } else if (n === i)
869
+ return !1;
870
+ return !0;
871
+ })(t, this.m)), this.o = this.l.hasUpdated && !this.isDisabled() && !this.isAnimating() && e && this.element.isConnected, this.o && (this.m = Array.isArray(t) ? Array.from(t) : t), this.o;
872
+ }
873
+ hostUpdate() {
874
+ var t;
875
+ typeof this.optionsOrCallback == "function" && this.u(this.optionsOrCallback()), this.p() && (this.g = this.v(), this.t = (t = this.t) !== null && t !== void 0 ? t : this.element.parentNode, this.i = this.element.nextSibling);
876
+ }
877
+ hostUpdated() {
878
+ return b(this, null, function* () {
879
+ if (!this.o || !this.element.isConnected || this.options.skipInitial && !this.isHostRendered)
880
+ return;
881
+ let t;
882
+ this.prepare(), yield re;
883
+ const e = this._(), i = this.A(this.options.keyframeOptions, e), n = this.v();
884
+ if (this.g !== void 0) {
885
+ const { from: o, to: r } = this.O(this.g, n, e);
886
+ this.log("measured", [this.g, n, o, r]), t = this.calculateKeyframes(o, r);
887
+ } else {
888
+ const o = Ct.get(this.options.inId);
889
+ if (o) {
890
+ Ct.delete(this.options.inId);
891
+ const { from: r, to: l } = this.O(o, n, e);
892
+ t = this.calculateKeyframes(r, l), t = this.options.in ? [g(g({}, this.options.in[0]), t[0]), ...this.options.in.slice(1), t[1]] : t, ne++, t.forEach((a) => a.zIndex = ne);
893
+ } else
894
+ this.options.in && (t = [...this.options.in, {}]);
895
+ }
896
+ this.animate(t, i);
897
+ });
898
+ }
899
+ resetStyles() {
900
+ var t;
901
+ this.j !== void 0 && (this.element.setAttribute("style", (t = this.j) !== null && t !== void 0 ? t : ""), this.j = void 0);
902
+ }
903
+ commitStyles() {
904
+ var t, e;
905
+ this.j = this.element.getAttribute("style"), (t = this.webAnimation) === null || t === void 0 || t.commitStyles(), (e = this.webAnimation) === null || e === void 0 || e.cancel();
906
+ }
907
+ reconnected() {
908
+ }
909
+ disconnected() {
910
+ return b(this, null, function* () {
911
+ var t;
912
+ if (!this.o || (this.options.id !== void 0 && Ct.set(this.options.id, this.g), this.options.out === void 0))
913
+ return;
914
+ if (this.prepare(), yield re(), (t = this.t) === null || t === void 0 ? void 0 : t.isConnected) {
915
+ const i = this.i && this.i.parentNode === this.t ? this.i : null;
916
+ if (this.t.insertBefore(this.element, i), this.options.stabilizeOut) {
917
+ const n = this.v();
918
+ this.log("stabilizing out");
919
+ const o = this.g.left - n.left, r = this.g.top - n.top;
920
+ getComputedStyle(this.element).position !== "static" || o === 0 && r === 0 || (this.element.style.position = "relative"), o !== 0 && (this.element.style.left = o + "px"), r !== 0 && (this.element.style.top = r + "px");
921
+ }
922
+ }
923
+ const e = this.A(this.options.keyframeOptions);
924
+ yield this.animate(this.options.out, e), this.element.remove();
925
+ });
926
+ }
927
+ prepare() {
928
+ this.createFinished();
929
+ }
930
+ start() {
931
+ var t, e;
932
+ (e = (t = this.options).onStart) === null || e === void 0 || e.call(t, this);
933
+ }
934
+ didFinish(t) {
935
+ var e, i;
936
+ t && ((i = (e = this.options).onComplete) === null || i === void 0 || i.call(e, this)), this.g = void 0, this.animatingProperties = void 0, this.frames = void 0, this.resolveFinished();
937
+ }
938
+ _() {
939
+ const t = [];
940
+ for (let e = this.element.parentNode; e; e = e == null ? void 0 : e.parentNode) {
941
+ const i = he.get(e);
942
+ i && !i.isDisabled() && i && t.push(i);
943
+ }
944
+ return t;
945
+ }
946
+ get isHostRendered() {
947
+ const t = oe.has(this.l);
948
+ return t || this.l.updateComplete.then(() => {
949
+ oe.add(this.l);
950
+ }), t;
951
+ }
952
+ A(t, e = this._()) {
953
+ const i = g({}, js);
954
+ return e.forEach((n) => Object.assign(i, n.options.keyframeOptions)), Object.assign(i, t), i;
955
+ }
956
+ O(t, e, i) {
957
+ t = g({}, t), e = g({}, e);
958
+ const n = i.map((l) => l.animatingProperties).filter((l) => l !== void 0);
959
+ let o = 1, r = 1;
960
+ return n !== void 0 && (n.forEach((l) => {
961
+ l.width && (o /= l.width), l.height && (r /= l.height);
962
+ }), t.left !== void 0 && e.left !== void 0 && (t.left = o * t.left, e.left = o * e.left), t.top !== void 0 && e.top !== void 0 && (t.top = r * t.top, e.top = r * e.top)), { from: t, to: e };
963
+ }
964
+ calculateKeyframes(t, e, i = !1) {
965
+ var n;
966
+ const o = {}, r = {};
967
+ let l = !1;
968
+ const a = {};
969
+ for (const c in e) {
970
+ const d = t[c], h = e[c];
971
+ if (c in kt) {
972
+ const u = kt[c];
973
+ if (d === void 0 || h === void 0)
974
+ continue;
975
+ const $ = u(d, h);
976
+ $.transform !== void 0 && (a[c] = $.value, l = !0, o.transform = `${(n = o.transform) !== null && n !== void 0 ? n : ""} ${$.transform}`, $.overrideFrom !== void 0 && Object.assign(o, $.overrideFrom));
977
+ } else
978
+ d !== h && d !== void 0 && h !== void 0 && (l = !0, o[c] = d, r[c] = h);
979
+ }
980
+ return o.transformOrigin = r.transformOrigin = i ? "center center" : "top left", this.animatingProperties = a, l ? [o, r] : void 0;
981
+ }
982
+ animate(i) {
983
+ return b(this, arguments, function* (t, e = this.options.keyframeOptions) {
984
+ this.start(), this.frames = t;
985
+ let n = !1;
986
+ if (!this.isAnimating() && !this.isDisabled() && (this.options.onFrames && (this.frames = t = this.options.onFrames(this), this.log("modified frames", t)), t !== void 0)) {
987
+ this.log("animate", [t, e]), n = !0, this.webAnimation = this.element.animate(t, e);
988
+ const o = this.getController();
989
+ o == null || o.add(this);
990
+ try {
991
+ yield this.webAnimation.finished;
992
+ } catch (r) {
993
+ }
994
+ o == null || o.remove(this);
995
+ }
996
+ return this.didFinish(n), n;
997
+ });
998
+ }
999
+ isAnimating() {
1000
+ var t, e;
1001
+ return ((t = this.webAnimation) === null || t === void 0 ? void 0 : t.playState) === "running" || ((e = this.webAnimation) === null || e === void 0 ? void 0 : e.pending);
1002
+ }
1003
+ log(t, e) {
1004
+ this.shouldLog && !this.isDisabled() && console.log(t, this.options.id, e);
1005
+ }
1006
+ }
1007
+ const ue = pt(Ds), Bs = { name: "grid-view", svg: '<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M10 8H28C29.1046 8 30 8.89543 30 10V28C30 29.1046 29.1046 30 28 30H10C8.89543 30 8 29.1046 8 28V10C8 8.89543 8.89543 8 10 8ZM12 12V26H26V12H12Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M10 34H28C29.1046 34 30 34.8954 30 36V54C30 55.1046 29.1046 56 28 56H10C8.89543 56 8 55.1046 8 54V36C8 34.8954 8.89543 34 10 34ZM12 38V52H26V38H12Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M54 8H36C34.8954 8 34 8.89543 34 10V28C34 29.1046 34.8954 30 36 30H54C55.1046 30 56 29.1046 56 28V10C56 8.89543 55.1046 8 54 8ZM38 26V12H52V26H38Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M36 34H54C55.1046 34 56 34.8954 56 36V54C56 55.1046 55.1046 56 54 56H36C34.8954 56 34 55.1046 34 54V36C34 34.8954 34.8954 34 36 34ZM38 38V52H52V38H38Z"/></svg>' }, zs = { name: "send", svg: '<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.41642 6.29292C5.99705 5.18016 3.38612 7.41823 4.12858 9.96847L10.5427 32L4.12858 54.0315C3.38612 56.5818 5.99704 58.8198 8.41642 57.7071L58.1942 34.8125C60.6019 33.7051 60.6019 30.2949 58.1942 29.1875L8.41642 6.29292ZM14.2569 29.9351L8.74174 10.9913L49.9295 29.9351H14.2569ZM14.2568 34.0651L8.74174 53.0087L49.9291 34.0651H14.2568Z"/></svg>' };
1008
+ /**
1009
+ * @license
1010
+ * Copyright 2018 Google LLC
1011
+ * SPDX-License-Identifier: BSD-3-Clause
1012
+ */
1013
+ const Ne = pt(class extends It {
1014
+ constructor(s) {
1015
+ var t;
1016
+ if (super(s), s.type !== ut.ATTRIBUTE || s.name !== "class" || ((t = s.strings) === null || t === void 0 ? void 0 : t.length) > 2)
1017
+ throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
1018
+ }
1019
+ render(s) {
1020
+ return " " + Object.keys(s).filter((t) => s[t]).join(" ") + " ";
1021
+ }
1022
+ update(s, [t]) {
1023
+ var e, i;
1024
+ if (this.it === void 0) {
1025
+ this.it = /* @__PURE__ */ new Set(), s.strings !== void 0 && (this.nt = new Set(s.strings.join(" ").split(/\s/).filter((o) => o !== "")));
1026
+ for (const o in t)
1027
+ t[o] && !(!((e = this.nt) === null || e === void 0) && e.has(o)) && this.it.add(o);
1028
+ return this.render(t);
1029
+ }
1030
+ const n = s.element.classList;
1031
+ this.it.forEach((o) => {
1032
+ o in t || (n.remove(o), this.it.delete(o));
1033
+ });
1034
+ for (const o in t) {
1035
+ const r = !!t[o];
1036
+ r === this.it.has(o) || !((i = this.nt) === null || i === void 0) && i.has(o) || (r ? (n.add(o), this.it.add(o)) : (n.remove(o), this.it.delete(o)));
1037
+ }
1038
+ return x;
1039
+ }
1040
+ }), N = {
1041
+ allRenderFn: !1,
1042
+ cmpDidLoad: !0,
1043
+ cmpDidUnload: !1,
1044
+ cmpDidUpdate: !0,
1045
+ cmpDidRender: !0,
1046
+ cmpWillLoad: !0,
1047
+ cmpWillUpdate: !0,
1048
+ cmpWillRender: !0,
1049
+ connectedCallback: !0,
1050
+ disconnectedCallback: !0,
1051
+ element: !0,
1052
+ event: !0,
1053
+ hasRenderFn: !0,
1054
+ lifecycle: !0,
1055
+ hostListener: !0,
1056
+ hostListenerTargetWindow: !0,
1057
+ hostListenerTargetDocument: !0,
1058
+ hostListenerTargetBody: !0,
1059
+ hostListenerTargetParent: !1,
1060
+ hostListenerTarget: !0,
1061
+ member: !0,
1062
+ method: !0,
1063
+ mode: !0,
1064
+ observeAttribute: !0,
1065
+ prop: !0,
1066
+ propMutable: !0,
1067
+ reflect: !0,
1068
+ scoped: !0,
1069
+ shadowDom: !0,
1070
+ slot: !0,
1071
+ cssAnnotations: !0,
1072
+ state: !0,
1073
+ style: !0,
1074
+ svg: !0,
1075
+ updatable: !0,
1076
+ vdomAttribute: !0,
1077
+ vdomXlink: !0,
1078
+ vdomClass: !0,
1079
+ vdomFunctional: !0,
1080
+ vdomKey: !0,
1081
+ vdomListener: !0,
1082
+ vdomRef: !0,
1083
+ vdomPropOrAttr: !0,
1084
+ vdomRender: !0,
1085
+ vdomStyle: !0,
1086
+ vdomText: !0,
1087
+ watchCallback: !0,
1088
+ taskQueue: !0,
1089
+ hotModuleReplacement: !1,
1090
+ isDebug: !1,
1091
+ isDev: !1,
1092
+ isTesting: !1,
1093
+ hydrateServerSide: !1,
1094
+ hydrateClientSide: !1,
1095
+ lifecycleDOMEvents: !1,
1096
+ lazyLoad: !1,
1097
+ profile: !1,
1098
+ slotRelocation: !0,
1099
+ appendChildSlotFix: !1,
1100
+ cloneNodeFix: !1,
1101
+ hydratedAttribute: !1,
1102
+ hydratedClass: !0,
1103
+ safari10: !1,
1104
+ scriptDataOpts: !1,
1105
+ scopedSlotTextContentFix: !1,
1106
+ shadowDomShim: !1,
1107
+ slotChildNodesFix: !1,
1108
+ invisiblePrehydration: !0,
1109
+ propBoolean: !0,
1110
+ propNumber: !0,
1111
+ propString: !0,
1112
+ cssVarShim: !1,
1113
+ constructableCSS: !0,
1114
+ cmpShouldUpdate: !0,
1115
+ devTools: !1,
1116
+ dynamicImportShim: !1,
1117
+ shadowDelegatesFocus: !0,
1118
+ initializeNextTick: !1,
1119
+ asyncLoading: !1,
1120
+ asyncQueue: !1,
1121
+ transformTagName: !1,
1122
+ attachStyles: !0
1123
+ };
1124
+ let M, Me, $t, Re = !1, st = !1, Dt = !1, m = !1, pe = null, Lt = !1;
1125
+ const ft = typeof window != "undefined" ? window : {}, A = ft.document || { head: {} }, Ue = ft.HTMLElement || class {
1126
+ }, v = {
1127
+ $flags$: 0,
1128
+ $resourcesUrl$: "",
1129
+ jmp: (s) => s(),
1130
+ raf: (s) => requestAnimationFrame(s),
1131
+ ael: (s, t, e, i) => s.addEventListener(t, e, i),
1132
+ rel: (s, t, e, i) => s.removeEventListener(t, e, i),
1133
+ ce: (s, t) => new CustomEvent(s, t)
1134
+ }, Fs = /* @__PURE__ */ (() => {
1135
+ let s = !1;
1136
+ try {
1137
+ A.addEventListener("e", null, Object.defineProperty({}, "passive", {
1138
+ get() {
1139
+ s = !0;
1140
+ }
1141
+ }));
1142
+ } catch (t) {
1143
+ }
1144
+ return s;
1145
+ })(), Ws = (s) => Promise.resolve(s), Gs = /* @__PURE__ */ (() => {
1146
+ try {
1147
+ return new CSSStyleSheet(), typeof new CSSStyleSheet().replace == "function";
1148
+ } catch (s) {
1149
+ }
1150
+ return !1;
1151
+ })(), je = (s, t, e, i) => {
1152
+ e && e.map(([n, o, r]) => {
1153
+ const l = qs(s, n), a = Zs(t, r), c = Ks(n);
1154
+ v.ael(l, o, a, c), (t.$rmListeners$ = t.$rmListeners$ || []).push(() => v.rel(l, o, a, c));
1155
+ });
1156
+ }, Zs = (s, t) => (e) => {
1157
+ try {
1158
+ N.lazyLoad || s.$hostElement$[t](e);
1159
+ } catch (i) {
1160
+ Q(i);
1161
+ }
1162
+ }, qs = (s, t) => t & 4 ? A : t & 8 ? ft : t & 16 ? A.body : s, Ks = (s) => Fs ? {
1163
+ passive: (s & 1) !== 0,
1164
+ capture: (s & 2) !== 0
1165
+ } : (s & 2) !== 0, $e = "http://www.w3.org/1999/xlink", P = (s, t = "") => () => {
1166
+ }, fe = /* @__PURE__ */ new WeakMap(), Qs = (s, t, e) => {
1167
+ let i = ot.get(s);
1168
+ Gs && e ? (i = i || new CSSStyleSheet(), i.replace(t)) : i = t, ot.set(s, i);
1169
+ }, Ys = (s, t, e, i) => {
1170
+ let n = Ie(t, e), o = ot.get(n);
1171
+ if (s = s.nodeType === 11 ? s : A, o)
1172
+ if (typeof o == "string") {
1173
+ s = s.head || s;
1174
+ let r = fe.get(s), l;
1175
+ r || fe.set(s, r = /* @__PURE__ */ new Set()), r.has(n) || (l = A.createElement("style"), l.innerHTML = o, s.insertBefore(l, s.querySelector("link")), r && r.add(n));
1176
+ } else
1177
+ s.adoptedStyleSheets.includes(o) || (s.adoptedStyleSheets = [...s.adoptedStyleSheets, o]);
1178
+ return n;
1179
+ }, Xs = (s) => {
1180
+ const t = s.$cmpMeta$, e = s.$hostElement$, i = t.$flags$, n = P("attachStyles", t.$tagName$), o = Ys(e.shadowRoot ? e.shadowRoot : e.getRootNode(), t, s.$modeName$);
1181
+ i & 10 && (e["s-sc"] = o, e.classList.add(o + "-h"), i & 2 && e.classList.add(o + "-s")), n();
1182
+ }, Ie = (s, t) => "sc-" + (t && s.$flags$ & 32 ? s.$tagName$ + "-" + t : s.$tagName$), Js = (s) => Ei.map((t) => t(s)).find((t) => !!t), ve = {}, Vs = "http://www.w3.org/2000/svg", ti = "http://www.w3.org/1999/xhtml", ei = (s) => s != null, Bt = (s) => (s = typeof s, s === "object" || s === "function"), U = (s, t, ...e) => {
1183
+ let i = null, n = null, o = null, r = !1, l = !1, a = [];
1184
+ const c = (h) => {
1185
+ for (let u = 0; u < h.length; u++)
1186
+ i = h[u], Array.isArray(i) ? c(i) : i != null && typeof i != "boolean" && ((r = typeof s != "function" && !Bt(i)) && (i = String(i)), r && l ? a[a.length - 1].$text$ += i : a.push(r ? it(null, i) : i), l = r);
1187
+ };
1188
+ if (c(e), t) {
1189
+ t.key && (n = t.key), t.name && (o = t.name);
1190
+ {
1191
+ const h = t.className || t.class;
1192
+ h && (t.class = typeof h != "object" ? h : Object.keys(h).filter((u) => h[u]).join(" "));
1193
+ }
1194
+ }
1195
+ if (typeof s == "function")
1196
+ return s(t === null ? {} : t, a, ii);
1197
+ const d = it(s, null);
1198
+ return d.$attrs$ = t, a.length > 0 && (d.$children$ = a), d.$key$ = n, d.$name$ = o, d;
1199
+ }, it = (s, t) => {
1200
+ const e = {
1201
+ $flags$: 0,
1202
+ $tag$: s,
1203
+ $text$: t,
1204
+ $elm$: null,
1205
+ $children$: null
1206
+ };
1207
+ return e.$attrs$ = null, e.$key$ = null, e.$name$ = null, e;
1208
+ }, zt = {}, si = (s) => s && s.$tag$ === zt, ii = {
1209
+ forEach: (s, t) => s.map(ge).forEach(t),
1210
+ map: (s, t) => s.map(ge).map(t).map(ni)
1211
+ }, ge = (s) => ({
1212
+ vattrs: s.$attrs$,
1213
+ vchildren: s.$children$,
1214
+ vkey: s.$key$,
1215
+ vname: s.$name$,
1216
+ vtag: s.$tag$,
1217
+ vtext: s.$text$
1218
+ }), ni = (s) => {
1219
+ if (typeof s.vtag == "function") {
1220
+ const e = Object.assign({}, s.vattrs);
1221
+ return s.vkey && (e.key = s.vkey), s.vname && (e.name = s.vname), U(s.vtag, e, ...s.vchildren || []);
1222
+ }
1223
+ const t = it(s.vtag, s.vtext);
1224
+ return t.$attrs$ = s.vattrs, t.$children$ = s.vchildren, t.$key$ = s.vkey, t.$name$ = s.vname, t;
1225
+ }, me = (s, t, e, i, n, o) => {
1226
+ if (e !== i) {
1227
+ let r = Ae(s, t), l = t.toLowerCase();
1228
+ if (t === "class") {
1229
+ const a = s.classList, c = ye(e), d = ye(i);
1230
+ a.remove(...c.filter((h) => h && !d.includes(h))), a.add(...d.filter((h) => h && !c.includes(h)));
1231
+ } else if (t === "style") {
1232
+ for (const a in e)
1233
+ (!i || i[a] == null) && (a.includes("-") ? s.style.removeProperty(a) : s.style[a] = "");
1234
+ for (const a in i)
1235
+ (!e || i[a] !== e[a]) && (a.includes("-") ? s.style.setProperty(a, i[a]) : s.style[a] = i[a]);
1236
+ } else if (t !== "key")
1237
+ if (t === "ref")
1238
+ i && i(s);
1239
+ else if (!s.__lookupSetter__(t) && t[0] === "o" && t[1] === "n")
1240
+ t[2] === "-" ? t = t.slice(3) : Ae(ft, l) ? t = l.slice(2) : t = l[2] + t.slice(3), e && v.rel(s, t, e, !1), i && v.ael(s, t, i, !1);
1241
+ else {
1242
+ const a = Bt(i);
1243
+ if ((r || a && i !== null) && !n)
1244
+ try {
1245
+ if (s.tagName.includes("-"))
1246
+ s[t] = i;
1247
+ else {
1248
+ let d = i == null ? "" : i;
1249
+ t === "list" ? r = !1 : (e == null || s[t] != d) && (s[t] = d);
1250
+ }
1251
+ } catch (d) {
1252
+ }
1253
+ let c = !1;
1254
+ l !== (l = l.replace(/^xlink\:?/, "")) && (t = l, c = !0), i == null || i === !1 ? (i !== !1 || s.getAttribute(t) === "") && (c ? s.removeAttributeNS($e, t) : s.removeAttribute(t)) : (!r || o & 4 || n) && !a && (i = i === !0 ? "" : i, c ? s.setAttributeNS($e, t, i) : s.setAttribute(t, i));
1255
+ }
1256
+ }
1257
+ }, oi = /\s/, ye = (s) => s ? s.split(oi) : [], De = (s, t, e, i) => {
1258
+ const n = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, o = s && s.$attrs$ || ve, r = t.$attrs$ || ve;
1259
+ for (i in o)
1260
+ i in r || me(n, i, o[i], void 0, e, t.$flags$);
1261
+ for (i in r)
1262
+ me(n, i, o[i], r[i], e, t.$flags$);
1263
+ }, nt = (s, t, e, i) => {
1264
+ let n = t.$children$[e], o = 0, r, l, a;
1265
+ if (Re || (Dt = !0, n.$tag$ === "slot" && (M && i.classList.add(M + "-s"), n.$flags$ |= n.$children$ ? (
1266
+ // slot element has fallback content
1267
+ 2
1268
+ ) : (
1269
+ // slot element does not have fallback content
1270
+ 1
1271
+ ))), n.$text$ !== null)
1272
+ r = n.$elm$ = A.createTextNode(n.$text$);
1273
+ else if (n.$flags$ & 1)
1274
+ r = n.$elm$ = A.createTextNode("");
1275
+ else {
1276
+ if (m || (m = n.$tag$ === "svg"), r = n.$elm$ = A.createElementNS(m ? Vs : ti, n.$flags$ & 2 ? "slot-fb" : n.$tag$), m && n.$tag$ === "foreignObject" && (m = !1), De(null, n, m), ei(M) && r["s-si"] !== M && r.classList.add(r["s-si"] = M), n.$children$)
1277
+ for (o = 0; o < n.$children$.length; ++o)
1278
+ l = nt(s, n, o, r), l && r.appendChild(l);
1279
+ n.$tag$ === "svg" ? m = !1 : r.tagName === "foreignObject" && (m = !0);
1280
+ }
1281
+ return r["s-hn"] = $t, n.$flags$ & 3 && (r["s-sr"] = !0, r["s-cr"] = Me, r["s-sn"] = n.$name$ || "", a = s && s.$children$ && s.$children$[e], a && a.$tag$ === n.$tag$ && s.$elm$ && q(s.$elm$, !1)), r;
1282
+ }, q = (s, t) => {
1283
+ v.$flags$ |= 1;
1284
+ const e = s.childNodes;
1285
+ for (let i = e.length - 1; i >= 0; i--) {
1286
+ const n = e[i];
1287
+ n["s-hn"] !== $t && n["s-ol"] && (Fe(n).insertBefore(n, Ft(n)), n["s-ol"].remove(), n["s-ol"] = void 0, Dt = !0), t && q(n, t);
1288
+ }
1289
+ v.$flags$ &= -2;
1290
+ }, Be = (s, t, e, i, n, o) => {
1291
+ let r = s["s-cr"] && s["s-cr"].parentNode || s, l;
1292
+ for (r.shadowRoot && r.tagName === $t && (r = r.shadowRoot); n <= o; ++n)
1293
+ i[n] && (l = nt(null, e, n, s), l && (i[n].$elm$ = l, r.insertBefore(l, Ft(t))));
1294
+ }, ze = (s, t, e, i, n) => {
1295
+ for (; t <= e; ++t)
1296
+ (i = s[t]) && (n = i.$elm$, Ze(i), st = !0, n["s-ol"] ? n["s-ol"].remove() : q(n, !0), n.remove());
1297
+ }, ri = (s, t, e, i) => {
1298
+ let n = 0, o = 0, r = 0, l = 0, a = t.length - 1, c = t[0], d = t[a], h = i.length - 1, u = i[0], $ = i[h], C, S;
1299
+ for (; n <= a && o <= h; )
1300
+ if (c == null)
1301
+ c = t[++n];
1302
+ else if (d == null)
1303
+ d = t[--a];
1304
+ else if (u == null)
1305
+ u = i[++o];
1306
+ else if ($ == null)
1307
+ $ = i[--h];
1308
+ else if (X(c, u))
1309
+ R(c, u), c = t[++n], u = i[++o];
1310
+ else if (X(d, $))
1311
+ R(d, $), d = t[--a], $ = i[--h];
1312
+ else if (X(c, $))
1313
+ (c.$tag$ === "slot" || $.$tag$ === "slot") && q(c.$elm$.parentNode, !1), R(c, $), s.insertBefore(c.$elm$, d.$elm$.nextSibling), c = t[++n], $ = i[--h];
1314
+ else if (X(d, u))
1315
+ (c.$tag$ === "slot" || $.$tag$ === "slot") && q(d.$elm$.parentNode, !1), R(d, u), s.insertBefore(d.$elm$, c.$elm$), d = t[--a], u = i[++o];
1316
+ else {
1317
+ for (r = -1, l = n; l <= a; ++l)
1318
+ if (t[l] && t[l].$key$ !== null && t[l].$key$ === u.$key$) {
1319
+ r = l;
1320
+ break;
1321
+ }
1322
+ r >= 0 ? (S = t[r], S.$tag$ !== u.$tag$ ? C = nt(t && t[o], e, r, s) : (R(S, u), t[r] = void 0, C = S.$elm$), u = i[++o]) : (C = nt(t && t[o], e, o, s), u = i[++o]), C && Fe(c.$elm$).insertBefore(C, Ft(c.$elm$));
1323
+ }
1324
+ n > a ? Be(s, i[h + 1] == null ? null : i[h + 1].$elm$, e, i, o, h) : o > h && ze(t, n, a);
1325
+ }, X = (s, t) => s.$tag$ === t.$tag$ ? s.$tag$ === "slot" ? s.$name$ === t.$name$ : s.$key$ === t.$key$ : !1, Ft = (s) => s && s["s-ol"] || s, Fe = (s) => (s["s-ol"] ? s["s-ol"] : s).parentNode, R = (s, t) => {
1326
+ const e = t.$elm$ = s.$elm$, i = s.$children$, n = t.$children$, o = t.$tag$, r = t.$text$;
1327
+ let l;
1328
+ r === null ? (m = o === "svg" ? !0 : o === "foreignObject" ? !1 : m, o === "slot" || De(s, t, m), i !== null && n !== null ? ri(e, i, t, n) : n !== null ? (s.$text$ !== null && (e.textContent = ""), Be(e, null, t, n, 0, n.length - 1)) : i !== null && ze(i, 0, i.length - 1), m && o === "svg" && (m = !1)) : (l = e["s-cr"]) ? l.parentNode.textContent = r : s.$text$ !== r && (e.data = r);
1329
+ }, We = (s) => {
1330
+ let t = s.childNodes, e, i, n, o, r, l;
1331
+ for (i = 0, n = t.length; i < n; i++)
1332
+ if (e = t[i], e.nodeType === 1) {
1333
+ if (e["s-sr"]) {
1334
+ for (r = e["s-sn"], e.hidden = !1, o = 0; o < n; o++)
1335
+ if (l = t[o].nodeType, t[o]["s-hn"] !== e["s-hn"] || r !== "") {
1336
+ if (l === 1 && r === t[o].getAttribute("slot")) {
1337
+ e.hidden = !0;
1338
+ break;
1339
+ }
1340
+ } else if (l === 1 || l === 3 && t[o].textContent.trim() !== "") {
1341
+ e.hidden = !0;
1342
+ break;
1343
+ }
1344
+ }
1345
+ We(e);
1346
+ }
1347
+ }, y = [], Ge = (s) => {
1348
+ let t, e, i, n, o, r, l = 0, a = s.childNodes, c = a.length;
1349
+ for (; l < c; l++) {
1350
+ if (t = a[l], t["s-sr"] && (e = t["s-cr"]) && e.parentNode)
1351
+ for (i = e.parentNode.childNodes, n = t["s-sn"], r = i.length - 1; r >= 0; r--)
1352
+ e = i[r], !e["s-cn"] && !e["s-nr"] && e["s-hn"] !== t["s-hn"] && (be(e, n) ? (o = y.find((d) => d.$nodeToRelocate$ === e), st = !0, e["s-sn"] = e["s-sn"] || n, o ? o.$slotRefNode$ = t : y.push({
1353
+ $slotRefNode$: t,
1354
+ $nodeToRelocate$: e
1355
+ }), e["s-sr"] && y.map((d) => {
1356
+ be(d.$nodeToRelocate$, e["s-sn"]) && (o = y.find((h) => h.$nodeToRelocate$ === e), o && !d.$slotRefNode$ && (d.$slotRefNode$ = o.$slotRefNode$));
1357
+ })) : y.some((d) => d.$nodeToRelocate$ === e) || y.push({
1358
+ $nodeToRelocate$: e
1359
+ }));
1360
+ t.nodeType === 1 && Ge(t);
1361
+ }
1362
+ }, be = (s, t) => s.nodeType === 1 ? s.getAttribute("slot") === null && t === "" || s.getAttribute("slot") === t : s["s-sn"] === t ? !0 : t === "", Ze = (s) => {
1363
+ s.$attrs$ && s.$attrs$.ref && s.$attrs$.ref(null), s.$children$ && s.$children$.map(Ze);
1364
+ }, li = (s, t) => {
1365
+ const e = s.$hostElement$, i = s.$cmpMeta$, n = s.$vnode$ || it(null, null), o = si(t) ? t : U(null, null, t);
1366
+ $t = e.tagName, i.$attrsToReflect$ && (o.$attrs$ = o.$attrs$ || {}, i.$attrsToReflect$.map(([r, l]) => o.$attrs$[l] = e[r])), o.$tag$ = null, o.$flags$ |= 4, s.$vnode$ = o, o.$elm$ = n.$elm$ = e.shadowRoot || e, M = e["s-sc"], Me = e["s-cr"], Re = (i.$flags$ & 1) !== 0, st = !1, R(n, o);
1367
+ {
1368
+ if (v.$flags$ |= 1, Dt) {
1369
+ Ge(o.$elm$);
1370
+ let r, l, a, c, d, h, u = 0;
1371
+ for (; u < y.length; u++)
1372
+ r = y[u], l = r.$nodeToRelocate$, l["s-ol"] || (a = A.createTextNode(""), a["s-nr"] = l, l.parentNode.insertBefore(l["s-ol"] = a, l));
1373
+ for (u = 0; u < y.length; u++)
1374
+ if (r = y[u], l = r.$nodeToRelocate$, r.$slotRefNode$) {
1375
+ for (c = r.$slotRefNode$.parentNode, d = r.$slotRefNode$.nextSibling, a = l["s-ol"]; a = a.previousSibling; )
1376
+ if (h = a["s-nr"], h && h["s-sn"] === l["s-sn"] && c === h.parentNode && (h = h.nextSibling, !h || !h["s-nr"])) {
1377
+ d = h;
1378
+ break;
1379
+ }
1380
+ (!d && c !== l.parentNode || l.nextSibling !== d) && l !== d && (!l["s-hn"] && l["s-ol"] && (l["s-hn"] = l["s-ol"].parentNode.nodeName), c.insertBefore(l, d));
1381
+ } else
1382
+ l.nodeType === 1 && (l.hidden = !0);
1383
+ }
1384
+ st && We(o.$elm$), v.$flags$ &= -2, y.length = 0;
1385
+ }
1386
+ }, ai = (s) => s, ci = (s, t, e) => {
1387
+ const i = ai(s);
1388
+ return {
1389
+ emit: (n) => di(i, t, {
1390
+ bubbles: !!(e & 4),
1391
+ composed: !!(e & 2),
1392
+ cancelable: !!(e & 1),
1393
+ detail: n
1394
+ })
1395
+ };
1396
+ }, di = (s, t, e) => {
1397
+ const i = v.ce(t, e);
1398
+ return s.dispatchEvent(i), i;
1399
+ }, hi = (s, t) => {
1400
+ }, qe = (s, t) => (s.$flags$ |= 16, hi(s, s.$ancestorComponent$), Ti(() => ui(s, t))), ui = (s, t) => {
1401
+ const e = s.$hostElement$, i = P("scheduleUpdate", s.$cmpMeta$.$tagName$), n = e;
1402
+ let o;
1403
+ return t ? o = j(n, "componentWillLoad") : o = j(n, "componentWillUpdate"), o = _e(o, () => j(n, "componentWillRender")), i(), _e(o, () => pi(s, n, t));
1404
+ }, pi = (s, t, e) => b(void 0, null, function* () {
1405
+ const i = s.$hostElement$, n = P("update", s.$cmpMeta$.$tagName$);
1406
+ i["s-rc"], e && Xs(s);
1407
+ const o = P("render", s.$cmpMeta$.$tagName$);
1408
+ $i(s, t, i), o(), n(), fi(s);
1409
+ }), $i = (s, t, e) => {
1410
+ try {
1411
+ pe = t, t = t.render && t.render(), s.$flags$ &= -17, s.$flags$ |= 2, (N.hasRenderFn || N.reflect) && (N.vdomRender || N.reflect) && (N.hydrateServerSide || li(s, t));
1412
+ } catch (l) {
1413
+ Q(l, s.$hostElement$);
1414
+ }
1415
+ return pe = null, null;
1416
+ }, fi = (s) => {
1417
+ const t = s.$cmpMeta$.$tagName$, e = s.$hostElement$, i = P("postUpdate", t), n = e;
1418
+ s.$ancestorComponent$, j(n, "componentDidRender"), s.$flags$ & 64 ? (j(n, "componentDidUpdate"), i()) : (s.$flags$ |= 64, j(n, "componentDidLoad"), i());
1419
+ }, j = (s, t, e) => {
1420
+ if (s && s[t])
1421
+ try {
1422
+ return s[t](e);
1423
+ } catch (i) {
1424
+ Q(i);
1425
+ }
1426
+ }, _e = (s, t) => s && s.then ? s.then(t) : t(), vi = (s, t) => s != null && !Bt(s) ? t & 4 ? s === "false" ? !1 : s === "" || !!s : t & 2 ? parseFloat(s) : t & 1 ? String(s) : s : s, gi = (s, t) => vt(s).$instanceValues$.get(t), mi = (s, t, e, i) => {
1427
+ const n = vt(s), o = s, r = n.$instanceValues$.get(t), l = n.$flags$, a = o;
1428
+ e = vi(e, i.$members$[t][0]);
1429
+ const c = Number.isNaN(r) && Number.isNaN(e);
1430
+ if (e !== r && !c) {
1431
+ n.$instanceValues$.set(t, e);
1432
+ {
1433
+ if (i.$watchers$ && l & 128) {
1434
+ const h = i.$watchers$[t];
1435
+ h && h.map((u) => {
1436
+ try {
1437
+ a[u](e, r, t);
1438
+ } catch ($) {
1439
+ Q($, o);
1440
+ }
1441
+ });
1442
+ }
1443
+ if ((l & 18) === 2) {
1444
+ if (a.componentShouldUpdate && a.componentShouldUpdate(e, r, t) === !1)
1445
+ return;
1446
+ qe(n, !1);
1447
+ }
1448
+ }
1449
+ }
1450
+ }, yi = (s, t, e) => {
1451
+ if (t.$members$) {
1452
+ s.watchers && (t.$watchers$ = s.watchers);
1453
+ const i = Object.entries(t.$members$), n = s.prototype;
1454
+ i.map(([o, [r]]) => {
1455
+ (r & 31 || r & 32) && Object.defineProperty(n, o, {
1456
+ get() {
1457
+ return gi(this, o);
1458
+ },
1459
+ set(l) {
1460
+ mi(this, o, l, t);
1461
+ },
1462
+ configurable: !0,
1463
+ enumerable: !0
1464
+ });
1465
+ });
1466
+ {
1467
+ const o = /* @__PURE__ */ new Map();
1468
+ n.attributeChangedCallback = function(r, l, a) {
1469
+ v.jmp(() => {
1470
+ const c = o.get(r);
1471
+ if (this.hasOwnProperty(c))
1472
+ a = this[c], delete this[c];
1473
+ else if (n.hasOwnProperty(c) && typeof this[c] == "number" && this[c] == a)
1474
+ return;
1475
+ this[c] = a === null && typeof this[c] == "boolean" ? !1 : a;
1476
+ });
1477
+ }, s.observedAttributes = i.filter(
1478
+ ([r, l]) => l[0] & 15
1479
+ /* HasAttribute */
1480
+ ).map(([r, l]) => {
1481
+ const a = l[1] || r;
1482
+ return o.set(a, r), l[0] & 512 && t.$attrsToReflect$.push([r, a]), a;
1483
+ });
1484
+ }
1485
+ }
1486
+ return s;
1487
+ }, bi = (s, t, e, i, n) => b(void 0, null, function* () {
1488
+ if (!(t.$flags$ & 32) && (n = s.constructor, t.$flags$ |= 32, customElements.whenDefined(e.$tagName$).then(() => t.$flags$ |= 128), n.style)) {
1489
+ let r = n.style;
1490
+ typeof r != "string" && (r = r[t.$modeName$ = Js(s)]);
1491
+ const l = Ie(e, t.$modeName$);
1492
+ if (!ot.has(l)) {
1493
+ const a = P("registerStyles", e.$tagName$);
1494
+ Qs(l, r, !!(e.$flags$ & 1)), a();
1495
+ }
1496
+ }
1497
+ t.$ancestorComponent$, (() => qe(t, !0))();
1498
+ }), _i = (s) => {
1499
+ }, Ai = (s) => {
1500
+ if (!(v.$flags$ & 1)) {
1501
+ const t = vt(s), e = t.$cmpMeta$, i = P("connectedCallback", e.$tagName$);
1502
+ t.$flags$ & 1 ? (je(s, t, e.$listeners$), _i(t.$lazyInstance$)) : (t.$flags$ |= 1, e.$flags$ & 12 && Si(s), e.$members$ && Object.entries(e.$members$).map(([n, [o]]) => {
1503
+ if (o & 31 && s.hasOwnProperty(n)) {
1504
+ const r = s[n];
1505
+ delete s[n], s[n] = r;
1506
+ }
1507
+ }), bi(s, t, e)), i();
1508
+ }
1509
+ }, Si = (s) => {
1510
+ const t = s["s-cr"] = A.createComment("");
1511
+ t["s-cn"] = !0, s.insertBefore(t, s.firstChild);
1512
+ }, wi = (s) => {
1513
+ if (!(v.$flags$ & 1)) {
1514
+ const t = vt(s);
1515
+ t.$rmListeners$ && (t.$rmListeners$.map((e) => e()), t.$rmListeners$ = void 0);
1516
+ }
1517
+ }, Ke = (s, t) => {
1518
+ const e = {
1519
+ $flags$: t[0],
1520
+ $tagName$: t[1]
1521
+ };
1522
+ e.$members$ = t[2], e.$listeners$ = t[3], e.$watchers$ = s.$watchers$, e.$attrsToReflect$ = [];
1523
+ const i = s.prototype.connectedCallback, n = s.prototype.disconnectedCallback;
1524
+ return Object.assign(s.prototype, {
1525
+ __registerHost() {
1526
+ xi(this, e);
1527
+ },
1528
+ connectedCallback() {
1529
+ Ai(this), i && i.call(this);
1530
+ },
1531
+ disconnectedCallback() {
1532
+ wi(this), n && n.call(this);
1533
+ },
1534
+ __attachShadow() {
1535
+ this.attachShadow({
1536
+ mode: "open",
1537
+ delegatesFocus: !!(e.$flags$ & 16)
1538
+ });
1539
+ }
1540
+ }), s.is = e.$tagName$, yi(s, e);
1541
+ }, Qe = /* @__PURE__ */ new WeakMap(), vt = (s) => Qe.get(s), xi = (s, t) => {
1542
+ const e = {
1543
+ $flags$: 0,
1544
+ $hostElement$: s,
1545
+ $cmpMeta$: t,
1546
+ $instanceValues$: /* @__PURE__ */ new Map()
1547
+ };
1548
+ return je(s, e, t.$listeners$), Qe.set(s, e);
1549
+ }, Ae = (s, t) => t in s, Q = (s, t) => (0, console.error)(s, t), ot = /* @__PURE__ */ new Map(), Ei = [], Se = [], Ye = [], Ci = (s, t) => (e) => {
1550
+ s.push(e), Lt || (Lt = !0, t && v.$flags$ & 4 ? ki(Nt) : v.raf(Nt));
1551
+ }, we = (s) => {
1552
+ for (let t = 0; t < s.length; t++)
1553
+ try {
1554
+ s[t](performance.now());
1555
+ } catch (e) {
1556
+ Q(e);
1557
+ }
1558
+ s.length = 0;
1559
+ }, Nt = () => {
1560
+ we(Se), we(Ye), (Lt = Se.length > 0) && v.raf(Nt);
1561
+ }, ki = (s) => Ws().then(s), Ti = /* @__PURE__ */ Ci(Ye, !0), Oi = (s = {}) => {
1562
+ const { content: t = "", title: e, attributes: i = [] } = s;
1563
+ let n = "", o = [
1564
+ { name: "xmlns", value: "http://www.w3.org/2000/svg" },
1565
+ { name: "fill", value: "currentColor" },
1566
+ ...i
1567
+ ];
1568
+ return e && (n = `<title>${e}</title>`), `<svg ${o.map((l) => `${l.name}="${l.value}"`).join(" ")}>${n}${t}</svg>`;
1569
+ }, Pi = (s) => s.replace(/<(\/?)svg([^>]*)>/g, "").trim();
1570
+ function Hi(s) {
1571
+ return `${s.getFullYear()}.${s.getMonth() + 1}`;
1572
+ }
1573
+ class Li {
1574
+ constructor(t) {
1575
+ this.voca_component = t, this.voca_added = Hi(/* @__PURE__ */ new Date());
1576
+ }
1577
+ }
1578
+ const Ni = "telia-vst{display:none}", Mi = /* @__PURE__ */ Ke(class extends Ue {
1579
+ constructor() {
1580
+ super(), this.__registerHost(), this.vocaInternalUStats = ci(this, "vocaInternalUStats", 7);
1581
+ }
1582
+ connectedCallback() {
1583
+ this.vocaInternalUStats.emit(new Li(this.dataTrackingId));
1584
+ }
1585
+ render() {
1586
+ return U(zt, null);
1587
+ }
1588
+ static get style() {
1589
+ return Ni;
1590
+ }
1591
+ }, [0, "telia-vst", {
1592
+ dataTrackingId: [1, "data-tracking-id"]
1593
+ }]);
1594
+ function Xe() {
1595
+ if (typeof customElements == "undefined")
1596
+ return;
1597
+ ["telia-vst"].forEach((t) => {
1598
+ switch (t) {
1599
+ case "telia-vst":
1600
+ customElements.get(t) || customElements.define(t, Mi);
1601
+ break;
1602
+ }
1603
+ });
1604
+ }
1605
+ Xe();
1606
+ function Mt() {
1607
+ return typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : { vocadsIcons: void 0, vocadsIconsRegistered: !1 };
1608
+ }
1609
+ function Ri() {
1610
+ if (typeof Mt().vocadsIcons !== void 0)
1611
+ return Mt().vocadsIcons;
1612
+ }
1613
+ function Ui() {
1614
+ return Mt().vocadsIconsRegistered;
1615
+ }
1616
+ const ji = ".telia-icon{display:inline-block}.telia-icon__container{display:block;height:inherit}.telia-icon svg{display:block}.telia-icon--sm{height:calc(1.6rem * var(--voca-rem-multiplier));min-width:calc(1.6rem * var(--voca-rem-multiplier));width:calc(1.6rem * var(--voca-rem-multiplier))}.telia-icon--md{height:calc(2.4rem * var(--voca-rem-multiplier));min-width:calc(2.4rem * var(--voca-rem-multiplier));width:calc(2.4rem * var(--voca-rem-multiplier))}.telia-icon--lg{height:calc(3.2rem * var(--voca-rem-multiplier));min-width:calc(3.2rem * var(--voca-rem-multiplier));width:calc(3.2rem * var(--voca-rem-multiplier))}", Ii = /* @__PURE__ */ Ke(class extends Ue {
1617
+ constructor() {
1618
+ super(), this.__registerHost(), this.size = "md", this.allyTitle = null, this.dataTrackingId = "telia-icon";
1619
+ }
1620
+ /**
1621
+ * Returns svg string from svg property or svg string from icons bundle if icons bundle is registered
1622
+ * @private
1623
+ * @returns string
1624
+ */
1625
+ getSvgString() {
1626
+ if (this.svg)
1627
+ return this.svg;
1628
+ if (Ui() && this.name) {
1629
+ const s = Ri();
1630
+ return s[this.name] ? s[this.name].svg : "";
1631
+ }
1632
+ return this.name && console.warn(this.name, "Icons bundle is not registered and will not be rendered. Check if you have registered icons bundle or use svg property"), "";
1633
+ }
1634
+ render() {
1635
+ let s = this.getSvgString(), t = [{ name: "viewBox", value: "0 0 64 64" }];
1636
+ this.allyTitle ? t = [...t, { name: "role", value: "img" }] : t = [
1637
+ ...t,
1638
+ { name: "aria-hidden", value: "true" }
1639
+ ];
1640
+ const e = Oi({
1641
+ content: Pi(s),
1642
+ attributes: t,
1643
+ title: this.allyTitle
1644
+ });
1645
+ return U(zt, { class: `telia-icon telia-icon--${this.size}` }, U("span", { "aria-label": this.allyTitle, class: "telia-icon__container", innerHTML: e }), U("telia-vst", { dataTrackingId: this.dataTrackingId }));
1646
+ }
1647
+ static get style() {
1648
+ return ji;
1649
+ }
1650
+ }, [0, "telia-icon", {
1651
+ name: [1],
1652
+ svg: [1],
1653
+ size: [1],
1654
+ allyTitle: [1, "ally-title"],
1655
+ dataTestid: [1, "data-testid"]
1656
+ }]);
1657
+ function Di() {
1658
+ if (typeof customElements == "undefined")
1659
+ return;
1660
+ ["telia-icon", "telia-vst"].forEach((t) => {
1661
+ switch (t) {
1662
+ case "telia-icon":
1663
+ customElements.get(t) || customElements.define(t, Ii);
1664
+ break;
1665
+ case "telia-vst":
1666
+ customElements.get(t) || Xe();
1667
+ break;
1668
+ }
1669
+ });
1670
+ }
1671
+ Di();
1672
+ /**
1673
+ * @license
1674
+ * Copyright 2021 Google LLC
1675
+ * SPDX-License-Identifier: BSD-3-Clause
1676
+ */
1677
+ let Bi = class extends Event {
1678
+ constructor(t, e, i) {
1679
+ super("context-request", { bubbles: !0, composed: !0 }), this.context = t, this.callback = e, this.subscribe = i != null && i;
1680
+ }
1681
+ };
1682
+ /**
1683
+ * @license
1684
+ * Copyright 2021 Google LLC
1685
+ * SPDX-License-Identifier: BSD-3-Clause
1686
+ */
1687
+ class zi {
1688
+ constructor(t, e, i, n) {
1689
+ var o;
1690
+ if (this.subscribe = !1, this.provided = !1, this.value = void 0, this.t = (r, l) => {
1691
+ this.unsubscribe && (this.unsubscribe !== l && (this.provided = !1, this.unsubscribe()), this.subscribe || this.unsubscribe()), this.value = r, this.host.requestUpdate(), this.provided && !this.subscribe || (this.provided = !0, this.callback && this.callback(r, l)), this.unsubscribe = l;
1692
+ }, this.host = t, e.context !== void 0) {
1693
+ const r = e;
1694
+ this.context = r.context, this.callback = r.callback, this.subscribe = (o = r.subscribe) !== null && o !== void 0 && o;
1695
+ } else
1696
+ this.context = e, this.callback = i, this.subscribe = n != null && n;
1697
+ this.host.addController(this);
1698
+ }
1699
+ hostConnected() {
1700
+ this.dispatchRequest();
1701
+ }
1702
+ hostDisconnected() {
1703
+ this.unsubscribe && (this.unsubscribe(), this.unsubscribe = void 0);
1704
+ }
1705
+ dispatchRequest() {
1706
+ this.host.dispatchEvent(new Bi(this.context, this.t, this.subscribe));
1707
+ }
1708
+ }
1709
+ /**
1710
+ * @license
1711
+ * Copyright 2022 Google LLC
1712
+ * SPDX-License-Identifier: BSD-3-Clause
1713
+ */
1714
+ function Je({ context: s, subscribe: t }) {
1715
+ return Ts({ finisher: (e, i) => {
1716
+ e.addInitializer((n) => {
1717
+ new zi(n, { context: s, callback: (o) => {
1718
+ n[i] = o;
1719
+ }, subscribe: t });
1720
+ });
1721
+ } });
1722
+ }
1723
+ var Fi = Object.defineProperty, Wi = Object.getOwnPropertyDescriptor, Ve = (s, t, e, i) => {
1724
+ for (var n = i > 1 ? void 0 : i ? Wi(t, e) : t, o = s.length - 1, r; o >= 0; o--)
1725
+ (r = s[o]) && (n = (i ? r(t, e, n) : r(n)) || n);
1726
+ return i && n && Fi(t, e, n), n;
1727
+ };
1728
+ let rt = class extends _ {
1729
+ _renderTimestamp(s, t) {
1730
+ if (!s && !t)
1731
+ return p;
1732
+ const e = (n) => new Date(n).toLocaleTimeString([], {
1733
+ hour: "2-digit",
1734
+ minute: "2-digit"
1735
+ });
1736
+ let i = "";
1737
+ return s ? t ? i = `${s}: ${e(t)}` : i = s : t && (i = e(t)), f`<p class="conversation-timestamp">${i}</p>`;
1738
+ }
1739
+ render() {
1740
+ var s, t;
1741
+ switch (this.message.type) {
1742
+ case mt.System:
1743
+ return "";
1744
+ case mt.Agent:
1745
+ return f`<div
1746
+ class=${Ne({
1747
+ "conversation-agent-message": !0,
1748
+ "has-avatar": !!((s = this.message.sender) != null && s.avatar)
1749
+ })}
1750
+ >
1751
+ ${(t = this.message.sender) != null && t.avatar ? f`<div class="avatar">
1752
+ <img src=${this.message.sender.avatar} />
1753
+ </div>` : p}
1754
+
1755
+ <div class="content-bundle">
1756
+ ${this.message.content.map(
1757
+ (e) => f`
1758
+ <div class="message-container">
1759
+ <div class="message-content">
1760
+ <conversation-component-message-list
1761
+ .items=${e.items || []}
1762
+ ></conversation-component-message-list>
1763
+ </div>
1764
+ </div>
1765
+ `
1766
+ )}
1767
+ </div>
1768
+ ${this._renderTimestamp(
1769
+ this.message.sender.name || "",
1770
+ this.message.timestamp
1771
+ )}
1772
+ </div>`;
1773
+ case mt.User:
1774
+ return f`<div class="conversation-user-message">
1775
+ <div class="content-bundle">
1776
+ ${this.message.content.map(
1777
+ (e) => f`
1778
+ <div class="message-container">
1779
+ <div class="message-content">
1780
+ <conversation-component-message-list
1781
+ .items=${e.items || []}
1782
+ ></conversation-component-message-list>
1783
+ </div>
1784
+ </div>
1785
+ `
1786
+ )}
1787
+ </div>
1788
+ ${this._renderTimestamp(
1789
+ "",
1790
+ // TODO: properties.userLabel || ''
1791
+ this.message.timestamp
1792
+ )}
1793
+ </div>`;
1794
+ default:
1795
+ return p;
1796
+ }
1797
+ }
1798
+ };
1799
+ rt.styles = B`
1800
+ :host {
1801
+ display: block;
1802
+ }
1803
+ .message-content {
1804
+ padding: var(--spacing-md);
1805
+ display: inline-block;
1806
+ margin-top: var(--spacing-md);
1807
+ max-width: 100%;
1808
+ border: 1px solid var(--gray-color);
1809
+ border-top-right-radius: var(--border-radius);
1810
+ border-bottom-right-radius: var(--border-radius);
1811
+ border-top-left-radius: var(--border-radius);
1812
+ }
1813
+
1814
+ .conversation-user-message {
1815
+ margin-left: 10%;
1816
+ width: 90%;
1817
+ display: flex;
1818
+ flex-direction: column;
1819
+ align-items: flex-end;
1820
+ }
1821
+
1822
+ .conversation-agent-message {
1823
+ display: grid;
1824
+ margin-right: 10%;
1825
+ width: 90%;
1826
+
1827
+ grid-template-columns: 1fr;
1828
+ grid-template-rows: 1fr auto;
1829
+ grid-template-areas:
1830
+ 'content'
1831
+ 'info';
1832
+ }
1833
+ .conversation-agent-message.has-avatar {
1834
+ grid-template-columns: auto 1fr;
1835
+ grid-template-rows: 1fr auto;
1836
+ grid-template-areas:
1837
+ 'avatar content'
1838
+ '. info';
1839
+ }
1840
+
1841
+ .avatar {
1842
+ grid-area: avatar;
1843
+ place-self: flex-end;
1844
+ width: 32px;
1845
+ height: 32px;
1846
+ border-radius: 50%;
1847
+ background-color: var(--accent-color);
1848
+ align-self: flex-end;
1849
+ justify-self: center;
1850
+ overflow: hidden;
1851
+ margin-right: var(--spacing-md);
1852
+ justify-content: center;
1853
+ align-items: center;
1854
+ padding: var(--spacing-xs);
1855
+ }
1856
+ .avatar img {
1857
+ height: 100%;
1858
+ width: 100%;
1859
+ object-fit: cover;
1860
+ }
1861
+
1862
+ .conversation-timestamp {
1863
+ grid-area: info;
1864
+ margin: 0;
1865
+ line-height: 1.5em;
1866
+ grid-area: info;
1867
+ color: var(--text-color);
1868
+ font-size: 0.8rem;
1869
+ font-weight: 300;
1870
+ }
1871
+
1872
+ .content-bundle {
1873
+ grid-area: content;
1874
+ }
1875
+ `;
1876
+ Ve([
1877
+ E()
1878
+ ], rt.prototype, "message", 2);
1879
+ rt = Ve([
1880
+ z("conversation-component-message")
1881
+ ], rt);
1882
+ var Gi = Object.defineProperty, Zi = Object.getOwnPropertyDescriptor, ts = (s, t, e, i) => {
1883
+ for (var n = i > 1 ? void 0 : i ? Zi(t, e) : t, o = s.length - 1, r; o >= 0; o--)
1884
+ (r = s[o]) && (n = (i ? r(t, e, n) : r(n)) || n);
1885
+ return i && n && Gi(t, e, n), n;
1886
+ };
1887
+ let lt = class extends _ {
1888
+ constructor() {
1889
+ super(...arguments), this.items = [];
1890
+ }
1891
+ _isCustomComponent(s) {
1892
+ return !["html", "link-list"].includes(s);
1893
+ }
1894
+ _createCustomComponent(s, t) {
1895
+ const e = customElements.get(s);
1896
+ if (e) {
1897
+ const i = new e();
1898
+ return i.message = t, i;
1899
+ }
1900
+ return p;
1901
+ }
1902
+ render() {
1903
+ return f` <div class="message-list">
1904
+ ${this.items.map(
1905
+ ([s, t]) => f`
1906
+ ${s === "html" ? f`
1907
+ <message-type-html .message=${t}> </message-type-html>
1908
+ ` : p}
1909
+ ${s === "link-list" ? f`
1910
+ <message-type-link-list .message=${t}>
1911
+ </message-type-link-list>
1912
+ ` : p}
1913
+ ${s === "separator" ? f`
1914
+ <message-type-separator .message=${t}>
1915
+ </message-type-separator>
1916
+ ` : p}
1917
+ ${this._isCustomComponent(s) ? this._createCustomComponent(s, t) : p}
1918
+ `
1919
+ )}
1920
+ </div>`;
1921
+ }
1922
+ };
1923
+ lt.styles = B`
1924
+ :host {
1925
+ display: block;
1926
+ color: var(--text-color);
1927
+ }
1928
+ .message-list {
1929
+ display: flex;
1930
+ flex-direction: column;
1931
+ gap: var(--spacing-md);
1932
+ }
1933
+ `;
1934
+ ts([
1935
+ E()
1936
+ ], lt.prototype, "items", 2);
1937
+ lt = ts([
1938
+ z("conversation-component-message-list")
1939
+ ], lt);
1940
+ /**
1941
+ * @license
1942
+ * Copyright 2017 Google LLC
1943
+ * SPDX-License-Identifier: BSD-3-Clause
1944
+ */
1945
+ class Rt extends It {
1946
+ constructor(t) {
1947
+ if (super(t), this.et = p, t.type !== ut.CHILD)
1948
+ throw Error(this.constructor.directiveName + "() can only be used in child bindings");
1949
+ }
1950
+ render(t) {
1951
+ if (t === p || t == null)
1952
+ return this.ft = void 0, this.et = t;
1953
+ if (t === x)
1954
+ return t;
1955
+ if (typeof t != "string")
1956
+ throw Error(this.constructor.directiveName + "() called with a non-string value");
1957
+ if (t === this.et)
1958
+ return this.ft;
1959
+ this.et = t;
1960
+ const e = [t];
1961
+ return e.raw = e, this.ft = { _$litType$: this.constructor.resultType, strings: e, values: [] };
1962
+ }
1963
+ }
1964
+ Rt.directiveName = "unsafeHTML", Rt.resultType = 1;
1965
+ const qi = pt(Rt);
1966
+ var Ki = Object.defineProperty, Qi = Object.getOwnPropertyDescriptor, es = (s, t, e, i) => {
1967
+ for (var n = i > 1 ? void 0 : i ? Qi(t, e) : t, o = s.length - 1, r; o >= 0; o--)
1968
+ (r = s[o]) && (n = (i ? r(t, e, n) : r(n)) || n);
1969
+ return i && n && Ki(t, e, n), n;
1970
+ };
1971
+ let at = class extends _ {
1972
+ render() {
1973
+ return f`<div class="message-type-html">
1974
+ ${qi(this.message.body)}
1975
+ </div>`;
1976
+ }
1977
+ };
1978
+ at.styles = [
1979
+ B`
1980
+ p {
1981
+ margin: 0;
1982
+ padding: 0;
1983
+ }
1984
+ `
1985
+ ];
1986
+ es([
1987
+ E()
1988
+ ], at.prototype, "message", 2);
1989
+ at = es([
1990
+ z("message-type-html")
1991
+ ], at);
1992
+ var Yi = Object.defineProperty, Xi = Object.getOwnPropertyDescriptor, ss = (s, t, e, i) => {
1993
+ for (var n = i > 1 ? void 0 : i ? Xi(t, e) : t, o = s.length - 1, r; o >= 0; o--)
1994
+ (r = s[o]) && (n = (i ? r(t, e, n) : r(n)) || n);
1995
+ return i && n && Yi(t, e, n), n;
1996
+ };
1997
+ let ct = class extends _ {
1998
+ _onItemClick(s) {
1999
+ const t = new CustomEvent("action", {
2000
+ bubbles: !0,
2001
+ composed: !0,
2002
+ detail: {
2003
+ actionKey: "action",
2004
+ payload: s
2005
+ }
2006
+ });
2007
+ this.dispatchEvent(t);
2008
+ }
2009
+ render() {
2010
+ return f`
2011
+ <div class="message-type-link-list">
2012
+ ${this.message.header ? f`<h1>${this.message.header}</h1>` : p}
2013
+ <ul>
2014
+ ${this.message.actions.map(
2015
+ (s) => f`
2016
+ <li>
2017
+ <button @click=${() => this._onItemClick(s)}>
2018
+ ${s.label}
2019
+ </button>
2020
+ </li>
2021
+ `
2022
+ )}
2023
+ </ul>
2024
+ </div>
2025
+ `;
2026
+ }
2027
+ };
2028
+ ct.styles = [
2029
+ B`
2030
+ h1 {
2031
+ font-size: 1.1rem;
2032
+ margin: 0 0 var(--spacing-sm);
2033
+ font-weight: normal;
2034
+ line-height: 1.8rem;
2035
+ color: var(--text-color);
2036
+ white-space: normal;
2037
+ }
2038
+ ul {
2039
+ list-style: none;
2040
+ margin: 0;
2041
+ padding: 0;
2042
+ }
2043
+ .message-type-link-list button {
2044
+ color: var(--primary-color);
2045
+ background-color: transparent;
2046
+ max-width: 100%;
2047
+ border: none;
2048
+ cursor: pointer;
2049
+ text-transform: none;
2050
+ font-weight: 300;
2051
+ font-size: inherit;
2052
+ text-align: left;
2053
+ display: block;
2054
+ margin: 0;
2055
+ padding: 0;
2056
+ }
2057
+ .message-type-link-list ul {
2058
+ display: flex;
2059
+ flex-direction: column;
2060
+ gap: var(--spacing-sm);
2061
+ }
2062
+ `
2063
+ ];
2064
+ ss([
2065
+ E()
2066
+ ], ct.prototype, "message", 2);
2067
+ ct = ss([
2068
+ z("message-type-link-list")
2069
+ ], ct);
2070
+ var Ji = Object.defineProperty, Vi = Object.getOwnPropertyDescriptor, is = (s, t, e, i) => {
2071
+ for (var n = i > 1 ? void 0 : i ? Vi(t, e) : t, o = s.length - 1, r; o >= 0; o--)
2072
+ (r = s[o]) && (n = (i ? r(t, e, n) : r(n)) || n);
2073
+ return i && n && Ji(t, e, n), n;
2074
+ };
2075
+ let dt = class extends _ {
2076
+ render() {
2077
+ return f`<div class="message-type-separator"></div>`;
2078
+ }
2079
+ };
2080
+ dt.styles = [
2081
+ B`
2082
+ .message-type-separator {
2083
+ border-bottom: 1px solid var(--gray-color);
2084
+ width: 100%;
2085
+ }
2086
+ `
2087
+ ];
2088
+ is([
2089
+ E()
2090
+ ], dt.prototype, "message", 2);
2091
+ dt = is([
2092
+ z("message-type-separator")
2093
+ ], dt);
2094
+ const tn = (s) => {
2095
+ setTimeout(() => {
2096
+ s.scrollTop = s.scrollHeight;
2097
+ }, 1e3);
2098
+ };
2099
+ var en = Object.defineProperty, sn = Object.getOwnPropertyDescriptor, gt = (s, t, e, i) => {
2100
+ for (var n = i > 1 ? void 0 : i ? sn(t, e) : t, o = s.length - 1, r; o >= 0; o--)
2101
+ (r = s[o]) && (n = (i ? r(t, e, n) : r(n)) || n);
2102
+ return i && n && en(t, e, n), n;
2103
+ };
2104
+ let H = class extends _ {
2105
+ constructor() {
2106
+ super(...arguments), this.properties = {}, this._actions = new cs(this), this.message = "", this.conversationContentRef = Ns();
2107
+ }
2108
+ _onClick(s) {
2109
+ return b(this, null, function* () {
2110
+ s.preventDefault(), console.log("Todo", this.message);
2111
+ });
2112
+ }
2113
+ _onSendMessage(s) {
2114
+ return b(this, null, function* () {
2115
+ s.preventDefault(), yield this._actions.dispatch("user-submit", { text: this.message }), this.message = "";
2116
+ });
2117
+ }
2118
+ _inputHandler(s) {
2119
+ this.message = s.target.value;
2120
+ }
2121
+ _actionHandler(s) {
2122
+ this._actions.dispatch(s.detail.actionKey, s.detail.payload);
2123
+ }
2124
+ updated(s) {
2125
+ s.has("properties") && this.conversationContentRef.value && ((s.get("properties") || {}).messages || []).length < (this.properties.messages || []).length && tn(this.conversationContentRef.value);
2126
+ }
2127
+ render() {
2128
+ return f` <div
2129
+ @action=${this._actionHandler}
2130
+ class=${Ne({
2131
+ conversation: !0,
2132
+ "input-has-text": this.message.length > 0
2133
+ })}
2134
+ >
2135
+ <div class="conversation-content" ${Rs(this.conversationContentRef)}>
2136
+ ${(this.properties.messages || []).map(
2137
+ (s) => f`<div class="conversation-entry" tabindex="-1">
2138
+ <conversation-component-message
2139
+ .message=${s}
2140
+ ${ue({
2141
+ keyframeOptions: {},
2142
+ in: ae,
2143
+ out: le,
2144
+ stabilizeOut: !0,
2145
+ skipInitial: !1
2146
+ })}
2147
+ >
2148
+ </conversation-component-message>
2149
+ </div>`
2150
+ )}
2151
+ ${this.properties.loading ? f`<div
2152
+ class="loader"
2153
+ ${ue({
2154
+ in: ae,
2155
+ out: le,
2156
+ skipInitial: !1
2157
+ })}
2158
+ >
2159
+ <div></div>
2160
+ <div></div>
2161
+ <div></div>
2162
+ </div>` : p}
2163
+ </div>
2164
+ <form class="conversation-bottom" @submit=${this._onSendMessage}>
2165
+ <div class="conversation-bottom-left">
2166
+ <button class="circle" @click=${this._onClick} type="button">
2167
+ <telia-icon svg=${Bs.svg} size="sm"></telia-icon>
2168
+ </button>
2169
+ </div>
2170
+ <input
2171
+ placeholder="Type your message here..."
2172
+ .value=${this.message}
2173
+ @input=${this._inputHandler}
2174
+ />
2175
+ <div class="conversation-actions">
2176
+ <button class="conversation-send-button" type="submit">
2177
+ <telia-icon svg=${zs.svg}></telia-icon>
2178
+ </button>
2179
+ </div>
2180
+ </form>
2181
+ </div>`;
2182
+ }
2183
+ };
2184
+ H.styles = B`
2185
+ :host {
2186
+ font-family: var(--font-family);
2187
+ --send-icon-color: var(--gray-dark-color, #a6a6a6);
2188
+
2189
+ scrollbar-width: thin; /* Firefox */
2190
+ scrollbar-color: #7f7f7f transparent; /* Firefox */
2191
+ }
2192
+ ::-webkit-scrollbar {
2193
+ width: 3px !important;
2194
+ background-color: transparent;
2195
+ border-left: none;
2196
+ }
2197
+ ::-webkit-scrollbar-thumb {
2198
+ background-color: #7f7f7f;
2199
+ }
2200
+ ::-webkit-scrollbar-track {
2201
+ -webkit-box-shadow: none !important;
2202
+ background-color: transparent;
2203
+ }
2204
+
2205
+ .conversation {
2206
+ display: flex;
2207
+ flex-direction: column;
2208
+ }
2209
+
2210
+ .conversation.input-has-text {
2211
+ --send-icon-color: var(--primary-color);
2212
+ }
2213
+
2214
+ .conversation-content {
2215
+ height: 400px;
2216
+ display: flex;
2217
+ flex-direction: column;
2218
+ padding: var(--spacing-md);
2219
+ overflow-y: auto;
2220
+ overflow-x: hidden;
2221
+ }
2222
+ .conversation-bottom {
2223
+ border-top: 1px solid var(--gray-color);
2224
+ background-color: #fff;
2225
+ min-height: 50px;
2226
+ max-height: 150px;
2227
+ display: flex;
2228
+ align-items: center;
2229
+ padding: 0 var(--spacing-md);
2230
+ }
2231
+ .conversation-bottom-left {
2232
+ border-right: 1px solid var(--gray-color);
2233
+ }
2234
+ .circle {
2235
+ background-color: var(--gray-dark-color, #a6a6a6);
2236
+ border-radius: 50%;
2237
+ color: #fff;
2238
+ padding: var(--spacing-sm, 5px);
2239
+ border: none;
2240
+ }
2241
+ .conversation-send-button {
2242
+ border: none;
2243
+ background: transparent;
2244
+ cursor: pointer;
2245
+ color: var(--send-icon-color);
2246
+ }
2247
+ input {
2248
+ border: none;
2249
+ font-family: inherit;
2250
+ font-size: inherit;
2251
+ flex: 1;
2252
+ padding: 0 var(--spacing-md);
2253
+ height: 2.5rem;
2254
+ outline: none;
2255
+ }
2256
+
2257
+ @keyframes loaderanim {
2258
+ 0% {
2259
+ opacity: 0;
2260
+ }
2261
+ 75% {
2262
+ opacity: 1;
2263
+ }
2264
+ 100% {
2265
+ opacity: 0;
2266
+ }
2267
+ }
2268
+
2269
+ .loader {
2270
+ display: flex;
2271
+ justify-content: center;
2272
+ }
2273
+
2274
+ .loader > div {
2275
+ height: 10px;
2276
+ width: 10px;
2277
+ border-radius: 50%;
2278
+ margin: 5px;
2279
+ background-color: var(--text-color);
2280
+ animation-name: loaderanim;
2281
+ animation-duration: 1s;
2282
+ animation-iteration-count: infinite;
2283
+ }
2284
+
2285
+ .loader > div:nth-of-type(2) {
2286
+ animation-delay: 100ms;
2287
+ }
2288
+
2289
+ .loader > div:nth-of-type(3) {
2290
+ animation-delay: 200ms;
2291
+ }
2292
+ `;
2293
+ gt([
2294
+ Je({ context: ds, subscribe: !0 }),
2295
+ E({ attribute: !1 })
2296
+ ], H.prototype, "container", 2);
2297
+ gt([
2298
+ Je({ context: hs, subscribe: !0 }),
2299
+ E({ attribute: !1 })
2300
+ ], H.prototype, "properties", 2);
2301
+ gt([
2302
+ ks()
2303
+ ], H.prototype, "message", 2);
2304
+ H = gt([
2305
+ z("conversation-component")
2306
+ ], H);
2307
+ const pn = H;
2308
+ export {
2309
+ H as ConversationComponent,
2310
+ pn as default
2311
+ };
2312
+ //# sourceMappingURL=conversation-31b48ff2.js.map