@telia-ace/widget-conversation-flamingo 1.0.7 → 1.0.9

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.
@@ -1,2358 +0,0 @@
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, m as cs, V as ds, f as hs } from "./index-7f99bf14.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 we = 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 we(typeof s == "string" ? s : s + "", void 0, jt), z = (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 we(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$", x = `lit$${(Math.random() + "").slice(9)}$`, Ce = "?" + x, 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), w = 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) + x + $) : a + x + (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(x)) {
335
- const $ = d[r++];
336
- if (h.push(u), $ !== void 0) {
337
- const C = n.getAttribute($.toLowerCase() + Pt).split(x), 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(x), 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(x, h + 1)) !== -1; )
360
- a.push({ type: 7, index: o }), h += x.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 === w)
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 xs(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 !== w && 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 !== w, 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 === w && (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) === w)
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 xs {
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 ws = (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, xt;
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 = ws(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 w;
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
- ((xt = globalThis.litElementVersions) !== null && xt !== void 0 ? xt : globalThis.litElementVersions = []).push("3.3.3");
592
- /**
593
- * @license
594
- * Copyright 2017 Google LLC
595
- * SPDX-License-Identifier: BSD-3-Clause
596
- */
597
- const B = (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 wt;
652
- ((wt = window.HTMLSlotElement) === null || wt === void 0 ? void 0 : wt.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), zs = { 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>' }, Bs = { 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 w;
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, zt = (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" && !zt(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
- }, Bt = {}, si = (s) => s && s.$tag$ === Bt, 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 = zt(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
- }, ze = (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
- }, Be = (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 ? ze(s, i[h + 1] == null ? null : i[h + 1].$elm$, e, i, o, h) : o > h && Be(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 = ""), ze(e, null, t, n, 0, n.length - 1)) : i !== null && Be(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 && !zt(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
- }, xi = (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
- wi(this, e);
1527
- },
1528
- connectedCallback() {
1529
- Ai(this), i && i.call(this);
1530
- },
1531
- disconnectedCallback() {
1532
- xi(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), wi = (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
- }, xe = (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
- xe(Se), xe(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(Bt, 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(Bt, { 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 zi = 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 Bi {
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 zi(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 Bi(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 = z`
1800
- :host {
1801
- box-sizing: border-box;
1802
- display: block;
1803
- }
1804
- * {
1805
- box-sizing: border-box;
1806
- }
1807
- .message-content {
1808
- padding: var(--spacing-md);
1809
- display: inline-block;
1810
- margin-top: var(--spacing-md);
1811
- max-width: 100%;
1812
- border: 1px solid var(--gray-color);
1813
- border-top-right-radius: var(--border-radius);
1814
- border-bottom-right-radius: var(--border-radius);
1815
- border-top-left-radius: var(--border-radius);
1816
- }
1817
-
1818
- .conversation-user-message {
1819
- margin-left: 10%;
1820
- width: 90%;
1821
- display: flex;
1822
- flex-direction: column;
1823
- align-items: flex-end;
1824
- }
1825
-
1826
- .conversation-agent-message {
1827
- display: grid;
1828
- margin-right: 10%;
1829
- width: 90%;
1830
-
1831
- grid-template-columns: 1fr;
1832
- grid-template-rows: 1fr auto;
1833
- grid-template-areas:
1834
- 'content'
1835
- 'info';
1836
- }
1837
- .conversation-agent-message.has-avatar {
1838
- grid-template-columns: auto 1fr;
1839
- grid-template-rows: 1fr auto;
1840
- grid-template-areas:
1841
- 'avatar content'
1842
- '. info';
1843
- }
1844
-
1845
- .avatar {
1846
- grid-area: avatar;
1847
- place-self: flex-end;
1848
- width: 32px;
1849
- height: 32px;
1850
- border-radius: 50%;
1851
- background-color: var(--accent-color);
1852
- align-self: flex-end;
1853
- justify-self: center;
1854
- overflow: hidden;
1855
- margin-right: var(--spacing-md);
1856
- justify-content: center;
1857
- align-items: center;
1858
- padding: var(--spacing-xs);
1859
- }
1860
- .avatar img {
1861
- height: 100%;
1862
- width: 100%;
1863
- object-fit: cover;
1864
- }
1865
-
1866
- .conversation-timestamp {
1867
- grid-area: info;
1868
- margin: 0;
1869
- line-height: 1.5em;
1870
- grid-area: info;
1871
- color: var(--text-color);
1872
- font-size: 0.8rem;
1873
- font-weight: 300;
1874
- }
1875
-
1876
- .content-bundle {
1877
- grid-area: content;
1878
- }
1879
- `;
1880
- Ve([
1881
- E()
1882
- ], rt.prototype, "message", 2);
1883
- rt = Ve([
1884
- B("conversation-component-message")
1885
- ], rt);
1886
- var Gi = Object.defineProperty, Zi = Object.getOwnPropertyDescriptor, ts = (s, t, e, i) => {
1887
- for (var n = i > 1 ? void 0 : i ? Zi(t, e) : t, o = s.length - 1, r; o >= 0; o--)
1888
- (r = s[o]) && (n = (i ? r(t, e, n) : r(n)) || n);
1889
- return i && n && Gi(t, e, n), n;
1890
- };
1891
- let lt = class extends _ {
1892
- constructor() {
1893
- super(...arguments), this.items = [];
1894
- }
1895
- _isCustomComponent(s) {
1896
- return !["html", "link-list"].includes(s);
1897
- }
1898
- _createCustomComponent(s, t) {
1899
- const e = customElements.get(s);
1900
- if (e) {
1901
- const i = new e();
1902
- return i.message = t, i;
1903
- }
1904
- return p;
1905
- }
1906
- render() {
1907
- return f` <div class="message-list">
1908
- ${this.items.map(
1909
- ([s, t]) => f`
1910
- ${s === "html" ? f`
1911
- <message-type-html .message=${t}> </message-type-html>
1912
- ` : p}
1913
- ${s === "link-list" ? f`
1914
- <message-type-link-list .message=${t}>
1915
- </message-type-link-list>
1916
- ` : p}
1917
- ${s === "separator" ? f`
1918
- <message-type-separator .message=${t}>
1919
- </message-type-separator>
1920
- ` : p}
1921
- ${this._isCustomComponent(s) ? this._createCustomComponent(s, t) : p}
1922
- `
1923
- )}
1924
- </div>`;
1925
- }
1926
- };
1927
- lt.styles = z`
1928
- :host {
1929
- box-sizing: border-box;
1930
- display: block;
1931
- color: var(--text-color);
1932
- }
1933
- * {
1934
- box-sizing: border-box;
1935
- }
1936
- .message-list {
1937
- display: flex;
1938
- flex-direction: column;
1939
- gap: var(--spacing-md);
1940
- }
1941
- `;
1942
- ts([
1943
- E()
1944
- ], lt.prototype, "items", 2);
1945
- lt = ts([
1946
- B("conversation-component-message-list")
1947
- ], lt);
1948
- /**
1949
- * @license
1950
- * Copyright 2017 Google LLC
1951
- * SPDX-License-Identifier: BSD-3-Clause
1952
- */
1953
- class Rt extends It {
1954
- constructor(t) {
1955
- if (super(t), this.et = p, t.type !== ut.CHILD)
1956
- throw Error(this.constructor.directiveName + "() can only be used in child bindings");
1957
- }
1958
- render(t) {
1959
- if (t === p || t == null)
1960
- return this.ft = void 0, this.et = t;
1961
- if (t === w)
1962
- return t;
1963
- if (typeof t != "string")
1964
- throw Error(this.constructor.directiveName + "() called with a non-string value");
1965
- if (t === this.et)
1966
- return this.ft;
1967
- this.et = t;
1968
- const e = [t];
1969
- return e.raw = e, this.ft = { _$litType$: this.constructor.resultType, strings: e, values: [] };
1970
- }
1971
- }
1972
- Rt.directiveName = "unsafeHTML", Rt.resultType = 1;
1973
- const qi = pt(Rt);
1974
- var Ki = Object.defineProperty, Qi = Object.getOwnPropertyDescriptor, es = (s, t, e, i) => {
1975
- for (var n = i > 1 ? void 0 : i ? Qi(t, e) : t, o = s.length - 1, r; o >= 0; o--)
1976
- (r = s[o]) && (n = (i ? r(t, e, n) : r(n)) || n);
1977
- return i && n && Ki(t, e, n), n;
1978
- };
1979
- let at = class extends _ {
1980
- render() {
1981
- return f`<div class="message-type-html">
1982
- ${qi(this.message.body)}
1983
- </div>`;
1984
- }
1985
- };
1986
- at.styles = [
1987
- z`
1988
- :host {
1989
- box-sizing: border-box;
1990
- }
1991
- * {
1992
- box-sizing: border-box;
1993
- }
1994
- p {
1995
- margin: 0;
1996
- padding: 0;
1997
- word-break: break-word;
1998
- }
1999
- `
2000
- ];
2001
- es([
2002
- E()
2003
- ], at.prototype, "message", 2);
2004
- at = es([
2005
- B("message-type-html")
2006
- ], at);
2007
- var Yi = Object.defineProperty, Xi = Object.getOwnPropertyDescriptor, ss = (s, t, e, i) => {
2008
- for (var n = i > 1 ? void 0 : i ? Xi(t, e) : t, o = s.length - 1, r; o >= 0; o--)
2009
- (r = s[o]) && (n = (i ? r(t, e, n) : r(n)) || n);
2010
- return i && n && Yi(t, e, n), n;
2011
- };
2012
- let ct = class extends _ {
2013
- _onItemClick(s) {
2014
- const t = new CustomEvent("action", {
2015
- bubbles: !0,
2016
- composed: !0,
2017
- detail: {
2018
- actionKey: "action",
2019
- payload: s
2020
- }
2021
- });
2022
- this.dispatchEvent(t);
2023
- }
2024
- render() {
2025
- return f`
2026
- <div class="message-type-link-list">
2027
- ${this.message.header ? f`<h1>${this.message.header}</h1>` : p}
2028
- <ul>
2029
- ${this.message.actions.map(
2030
- (s) => f`
2031
- <li>
2032
- <button @click=${() => this._onItemClick(s)}>
2033
- ${s.label}
2034
- </button>
2035
- </li>
2036
- `
2037
- )}
2038
- </ul>
2039
- </div>
2040
- `;
2041
- }
2042
- };
2043
- ct.styles = [
2044
- z`
2045
- :host {
2046
- box-sizing: border-box;
2047
- }
2048
- * {
2049
- box-sizing: border-box;
2050
- }
2051
- h1 {
2052
- font-size: 1.1rem;
2053
- margin: 0 0 var(--spacing-sm);
2054
- font-weight: normal;
2055
- line-height: 1.8rem;
2056
- color: var(--text-color);
2057
- white-space: normal;
2058
- }
2059
- ul {
2060
- list-style: none;
2061
- margin: 0;
2062
- padding: 0;
2063
- }
2064
- .message-type-link-list button {
2065
- color: var(--primary-color);
2066
- background-color: transparent;
2067
- max-width: 100%;
2068
- border: none;
2069
- cursor: pointer;
2070
- text-transform: none;
2071
- font-weight: 300;
2072
- font-size: inherit;
2073
- text-align: left;
2074
- display: block;
2075
- margin: 0;
2076
- padding: 0;
2077
- }
2078
- .message-type-link-list ul {
2079
- display: flex;
2080
- flex-direction: column;
2081
- gap: var(--spacing-sm);
2082
- }
2083
- `
2084
- ];
2085
- ss([
2086
- E()
2087
- ], ct.prototype, "message", 2);
2088
- ct = ss([
2089
- B("message-type-link-list")
2090
- ], ct);
2091
- var Ji = Object.defineProperty, Vi = Object.getOwnPropertyDescriptor, is = (s, t, e, i) => {
2092
- for (var n = i > 1 ? void 0 : i ? Vi(t, e) : t, o = s.length - 1, r; o >= 0; o--)
2093
- (r = s[o]) && (n = (i ? r(t, e, n) : r(n)) || n);
2094
- return i && n && Ji(t, e, n), n;
2095
- };
2096
- let dt = class extends _ {
2097
- render() {
2098
- return f`<div class="message-type-separator"></div>`;
2099
- }
2100
- };
2101
- dt.styles = [
2102
- z`
2103
- :host {
2104
- box-sizing: border-box;
2105
- }
2106
- * {
2107
- box-sizing: border-box;
2108
- }
2109
- .message-type-separator {
2110
- border-bottom: 1px solid var(--gray-color);
2111
- width: 100%;
2112
- }
2113
- `
2114
- ];
2115
- is([
2116
- E({ attribute: !1 })
2117
- ], dt.prototype, "message", 2);
2118
- dt = is([
2119
- B("message-type-separator")
2120
- ], dt);
2121
- const tn = (s) => {
2122
- setTimeout(() => {
2123
- s.scrollTo ? s.scrollTo({ top: s.scrollHeight, behavior: "smooth" }) : s.scrollTop = s.scrollHeight;
2124
- }, 1e3);
2125
- };
2126
- var en = Object.defineProperty, sn = Object.getOwnPropertyDescriptor, gt = (s, t, e, i) => {
2127
- for (var n = i > 1 ? void 0 : i ? sn(t, e) : t, o = s.length - 1, r; o >= 0; o--)
2128
- (r = s[o]) && (n = (i ? r(t, e, n) : r(n)) || n);
2129
- return i && n && en(t, e, n), n;
2130
- };
2131
- let H = class extends _ {
2132
- constructor() {
2133
- super(...arguments), this.properties = {}, this._actions = new cs(this), this.message = "", this.conversationContentRef = Ns();
2134
- }
2135
- _onClick(s) {
2136
- return b(this, null, function* () {
2137
- s.preventDefault(), console.log("Todo", this.message);
2138
- });
2139
- }
2140
- _onSendMessage(s) {
2141
- return b(this, null, function* () {
2142
- s.preventDefault(), yield this._actions.dispatch("user-submit", { text: this.message }), this.message = "";
2143
- });
2144
- }
2145
- _inputHandler(s) {
2146
- this.message = s.target.value;
2147
- }
2148
- _actionHandler(s) {
2149
- this._actions.dispatch(s.detail.actionKey, s.detail.payload);
2150
- }
2151
- updated(s) {
2152
- s.has("properties") && this.conversationContentRef.value && ((s.get("properties") || {}).messages || []).length < (this.properties.messages || []).length && tn(this.conversationContentRef.value);
2153
- }
2154
- render() {
2155
- return f` <div
2156
- @action=${this._actionHandler}
2157
- class=${Ne({
2158
- conversation: !0,
2159
- "input-has-text": this.message.length > 0
2160
- })}
2161
- >
2162
- <div class="conversation-content" ${Rs(this.conversationContentRef)}>
2163
- <div class="conversation-content-inner">
2164
- ${(this.properties.messages || []).map(
2165
- (s) => f`<div class="conversation-entry" tabindex="-1">
2166
- <conversation-component-message
2167
- .message=${s}
2168
- ${ue({
2169
- keyframeOptions: {},
2170
- in: ae,
2171
- out: le,
2172
- stabilizeOut: !0,
2173
- skipInitial: !1
2174
- })}
2175
- >
2176
- </conversation-component-message>
2177
- </div>`
2178
- )}
2179
- ${this.properties.loading ? f`<div
2180
- class="loader"
2181
- ${ue({
2182
- in: ae,
2183
- out: le,
2184
- skipInitial: !1
2185
- })}
2186
- >
2187
- <div></div>
2188
- <div></div>
2189
- <div></div>
2190
- </div>` : p}
2191
- </div>
2192
- </div>
2193
- <form class="conversation-bottom" @submit=${this._onSendMessage}>
2194
- <div class="conversation-bottom-left">
2195
- <button class="circle" @click=${this._onClick} type="button">
2196
- <telia-icon svg=${zs.svg} size="sm"></telia-icon>
2197
- </button>
2198
- </div>
2199
- <input
2200
- placeholder="Type your message here..."
2201
- .value=${this.message}
2202
- @input=${this._inputHandler}
2203
- />
2204
- <div class="conversation-actions">
2205
- <button class="conversation-send-button" type="submit">
2206
- <telia-icon svg=${Bs.svg}></telia-icon>
2207
- </button>
2208
- </div>
2209
- </form>
2210
- </div>`;
2211
- }
2212
- };
2213
- H.styles = z`
2214
- :host {
2215
- box-sizing: border-box;
2216
- font-family: var(--font-family);
2217
- --send-icon-color: var(--gray-dark-color, #a6a6a6);
2218
- --conversation-bg: #fafafa;
2219
-
2220
- scrollbar-width: thin; /* Firefox */
2221
- scrollbar-color: #7f7f7f transparent; /* Firefox */
2222
- }
2223
- * {
2224
- box-sizing: border-box;
2225
- }
2226
- ::-webkit-scrollbar {
2227
- width: 3px !important;
2228
- background-color: transparent;
2229
- border-left: none;
2230
- }
2231
- ::-webkit-scrollbar-thumb {
2232
- background-color: #7f7f7f;
2233
- }
2234
- ::-webkit-scrollbar-track {
2235
- -webkit-box-shadow: none !important;
2236
- background-color: transparent;
2237
- }
2238
-
2239
- .conversation {
2240
- display: grid;
2241
- grid-template-rows: 1fr auto;
2242
- height: 100%;
2243
- background-color: var(--conversation-bg);
2244
- }
2245
-
2246
- .conversation.input-has-text {
2247
- --send-icon-color: var(--primary-color);
2248
- }
2249
-
2250
- .conversation-content {
2251
- flex: 1;
2252
-
2253
- padding: var(--spacing-md);
2254
- overflow-y: auto;
2255
- overflow-x: hidden;
2256
- }
2257
- .conversation-content-inner {
2258
- display: flex;
2259
- flex-direction: column;
2260
- justify-content: end;
2261
- min-height: 100%;
2262
- }
2263
- .conversation-bottom {
2264
- border-top: 1px solid var(--gray-color);
2265
- background-color: #fff;
2266
- min-height: 50px;
2267
- max-height: 150px;
2268
- display: flex;
2269
- align-items: center;
2270
- padding: 0 var(--spacing-md);
2271
- margin: 0;
2272
- }
2273
- .conversation-bottom-left {
2274
- border-right: 1px solid var(--gray-color);
2275
- padding-right: var(--spacing-md);
2276
- }
2277
- .circle {
2278
- background-color: var(--gray-dark-color, #a6a6a6);
2279
- border-radius: 50%;
2280
- color: #fff;
2281
- padding: var(--spacing-sm, 5px);
2282
- border: none;
2283
- display: flex;
2284
- justify-content: center;
2285
- align-items: center;
2286
- }
2287
- .conversation-send-button {
2288
- border: none;
2289
- background: transparent;
2290
- cursor: pointer;
2291
- color: var(--send-icon-color);
2292
- }
2293
- input {
2294
- border: none;
2295
- font-family: inherit;
2296
- font-size: inherit;
2297
- flex: 1;
2298
- padding: 0 var(--spacing-md);
2299
- height: 2.5rem;
2300
- outline: none;
2301
- }
2302
-
2303
- @keyframes loaderanim {
2304
- 0% {
2305
- opacity: 0;
2306
- }
2307
- 75% {
2308
- opacity: 1;
2309
- }
2310
- 100% {
2311
- opacity: 0;
2312
- }
2313
- }
2314
-
2315
- .loader {
2316
- display: flex;
2317
- justify-content: center;
2318
- }
2319
-
2320
- .loader > div {
2321
- height: 10px;
2322
- width: 10px;
2323
- border-radius: 50%;
2324
- margin: 5px;
2325
- background-color: var(--text-color);
2326
- animation-name: loaderanim;
2327
- animation-duration: 1s;
2328
- animation-iteration-count: infinite;
2329
- }
2330
-
2331
- .loader > div:nth-of-type(2) {
2332
- animation-delay: 100ms;
2333
- }
2334
-
2335
- .loader > div:nth-of-type(3) {
2336
- animation-delay: 200ms;
2337
- }
2338
- `;
2339
- gt([
2340
- Je({ context: ds, subscribe: !0 }),
2341
- E({ attribute: !1 })
2342
- ], H.prototype, "container", 2);
2343
- gt([
2344
- Je({ context: hs, subscribe: !0 }),
2345
- E({ attribute: !1 })
2346
- ], H.prototype, "properties", 2);
2347
- gt([
2348
- ks()
2349
- ], H.prototype, "message", 2);
2350
- H = gt([
2351
- B("conversation-component")
2352
- ], H);
2353
- const pn = H;
2354
- export {
2355
- H as ConversationComponent,
2356
- pn as default
2357
- };
2358
- //# sourceMappingURL=conversation-cb14062a.js.map