@telia-ace/widget-conversation-flamingo 1.1.52-rc.1 → 1.1.52

Sign up to get free protection for your applications and to get access to all the features.
package/index.mjs CHANGED
@@ -1,11 +1,4683 @@
1
- import { A as a, a as e, d as n, C as r, b as t, c as i, e as C, U as v } from "./index-eaede34b.mjs";
1
+ const Do = async (n) => {
2
+ n.registerComponent("conversation", Promise.resolve().then(() => Ho));
3
+ };
4
+ class An {
5
+ constructor() {
6
+ this.registeredProviders = /* @__PURE__ */ new Map();
7
+ }
8
+ static async getInstance(t) {
9
+ let e = await t.get("conversation");
10
+ return e || (e = new An(), await t.register("conversation", e), e);
11
+ }
12
+ registerProvider(t, e) {
13
+ this.registeredProviders.set(t, e);
14
+ }
15
+ // private getProviderByConfiguration(
16
+ // component: Conversation
17
+ // ): ProviderFactory | undefined {
18
+ // const [providerKey] = (component.properties['providers'] || []) as string[];
19
+ // if (!providerKey) {
20
+ // console.warn(
21
+ // `No providers registered. You most likely forgot to add a provider to the conversation component properties.`
22
+ // );
23
+ // return;
24
+ // }
25
+ // return this.registeredProviders.get(providerKey);
26
+ // }
27
+ }
28
+ var le = function(n, t) {
29
+ return le = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, s) {
30
+ e.__proto__ = s;
31
+ } || function(e, s) {
32
+ for (var r in s)
33
+ Object.prototype.hasOwnProperty.call(s, r) && (e[r] = s[r]);
34
+ }, le(n, t);
35
+ };
36
+ function st(n, t) {
37
+ if (typeof t != "function" && t !== null)
38
+ throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
39
+ le(n, t);
40
+ function e() {
41
+ this.constructor = n;
42
+ }
43
+ n.prototype = t === null ? Object.create(t) : (e.prototype = t.prototype, new e());
44
+ }
45
+ function Es(n, t, e, s) {
46
+ function r(i) {
47
+ return i instanceof e ? i : new e(function(o) {
48
+ o(i);
49
+ });
50
+ }
51
+ return new (e || (e = Promise))(function(i, o) {
52
+ function a(u) {
53
+ try {
54
+ c(s.next(u));
55
+ } catch (h) {
56
+ o(h);
57
+ }
58
+ }
59
+ function l(u) {
60
+ try {
61
+ c(s.throw(u));
62
+ } catch (h) {
63
+ o(h);
64
+ }
65
+ }
66
+ function c(u) {
67
+ u.done ? i(u.value) : r(u.value).then(a, l);
68
+ }
69
+ c((s = s.apply(n, t || [])).next());
70
+ });
71
+ }
72
+ function En(n, t) {
73
+ var e = { label: 0, sent: function() {
74
+ if (i[0] & 1)
75
+ throw i[1];
76
+ return i[1];
77
+ }, trys: [], ops: [] }, s, r, i, o;
78
+ return o = { next: a(0), throw: a(1), return: a(2) }, typeof Symbol == "function" && (o[Symbol.iterator] = function() {
79
+ return this;
80
+ }), o;
81
+ function a(c) {
82
+ return function(u) {
83
+ return l([c, u]);
84
+ };
85
+ }
86
+ function l(c) {
87
+ if (s)
88
+ throw new TypeError("Generator is already executing.");
89
+ for (; o && (o = 0, c[0] && (e = 0)), e; )
90
+ try {
91
+ if (s = 1, r && (i = c[0] & 2 ? r.return : c[0] ? r.throw || ((i = r.return) && i.call(r), 0) : r.next) && !(i = i.call(r, c[1])).done)
92
+ return i;
93
+ switch (r = 0, i && (c = [c[0] & 2, i.value]), c[0]) {
94
+ case 0:
95
+ case 1:
96
+ i = c;
97
+ break;
98
+ case 4:
99
+ return e.label++, { value: c[1], done: !1 };
100
+ case 5:
101
+ e.label++, r = c[1], c = [0];
102
+ continue;
103
+ case 7:
104
+ c = e.ops.pop(), e.trys.pop();
105
+ continue;
106
+ default:
107
+ if (i = e.trys, !(i = i.length > 0 && i[i.length - 1]) && (c[0] === 6 || c[0] === 2)) {
108
+ e = 0;
109
+ continue;
110
+ }
111
+ if (c[0] === 3 && (!i || c[1] > i[0] && c[1] < i[3])) {
112
+ e.label = c[1];
113
+ break;
114
+ }
115
+ if (c[0] === 6 && e.label < i[1]) {
116
+ e.label = i[1], i = c;
117
+ break;
118
+ }
119
+ if (i && e.label < i[2]) {
120
+ e.label = i[2], e.ops.push(c);
121
+ break;
122
+ }
123
+ i[2] && e.ops.pop(), e.trys.pop();
124
+ continue;
125
+ }
126
+ c = t.call(n, e);
127
+ } catch (u) {
128
+ c = [6, u], r = 0;
129
+ } finally {
130
+ s = i = 0;
131
+ }
132
+ if (c[0] & 5)
133
+ throw c[1];
134
+ return { value: c[0] ? c[1] : void 0, done: !0 };
135
+ }
136
+ }
137
+ function et(n) {
138
+ var t = typeof Symbol == "function" && Symbol.iterator, e = t && n[t], s = 0;
139
+ if (e)
140
+ return e.call(n);
141
+ if (n && typeof n.length == "number")
142
+ return {
143
+ next: function() {
144
+ return n && s >= n.length && (n = void 0), { value: n && n[s++], done: !n };
145
+ }
146
+ };
147
+ throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
148
+ }
149
+ function R(n, t) {
150
+ var e = typeof Symbol == "function" && n[Symbol.iterator];
151
+ if (!e)
152
+ return n;
153
+ var s = e.call(n), r, i = [], o;
154
+ try {
155
+ for (; (t === void 0 || t-- > 0) && !(r = s.next()).done; )
156
+ i.push(r.value);
157
+ } catch (a) {
158
+ o = { error: a };
159
+ } finally {
160
+ try {
161
+ r && !r.done && (e = s.return) && e.call(s);
162
+ } finally {
163
+ if (o)
164
+ throw o.error;
165
+ }
166
+ }
167
+ return i;
168
+ }
169
+ function F(n, t, e) {
170
+ if (e || arguments.length === 2)
171
+ for (var s = 0, r = t.length, i; s < r; s++)
172
+ (i || !(s in t)) && (i || (i = Array.prototype.slice.call(t, 0, s)), i[s] = t[s]);
173
+ return n.concat(i || Array.prototype.slice.call(t));
174
+ }
175
+ function J(n) {
176
+ return this instanceof J ? (this.v = n, this) : new J(n);
177
+ }
178
+ function Os(n, t, e) {
179
+ if (!Symbol.asyncIterator)
180
+ throw new TypeError("Symbol.asyncIterator is not defined.");
181
+ var s = e.apply(n, t || []), r, i = [];
182
+ return r = {}, o("next"), o("throw"), o("return"), r[Symbol.asyncIterator] = function() {
183
+ return this;
184
+ }, r;
185
+ function o(d) {
186
+ s[d] && (r[d] = function(p) {
187
+ return new Promise(function($, m) {
188
+ i.push([d, p, $, m]) > 1 || a(d, p);
189
+ });
190
+ });
191
+ }
192
+ function a(d, p) {
193
+ try {
194
+ l(s[d](p));
195
+ } catch ($) {
196
+ h(i[0][3], $);
197
+ }
198
+ }
199
+ function l(d) {
200
+ d.value instanceof J ? Promise.resolve(d.value.v).then(c, u) : h(i[0][2], d);
201
+ }
202
+ function c(d) {
203
+ a("next", d);
204
+ }
205
+ function u(d) {
206
+ a("throw", d);
207
+ }
208
+ function h(d, p) {
209
+ d(p), i.shift(), i.length && a(i[0][0], i[0][1]);
210
+ }
211
+ }
212
+ function ks(n) {
213
+ if (!Symbol.asyncIterator)
214
+ throw new TypeError("Symbol.asyncIterator is not defined.");
215
+ var t = n[Symbol.asyncIterator], e;
216
+ return t ? t.call(n) : (n = typeof et == "function" ? et(n) : n[Symbol.iterator](), e = {}, s("next"), s("throw"), s("return"), e[Symbol.asyncIterator] = function() {
217
+ return this;
218
+ }, e);
219
+ function s(i) {
220
+ e[i] = n[i] && function(o) {
221
+ return new Promise(function(a, l) {
222
+ o = n[i](o), r(a, l, o.done, o.value);
223
+ });
224
+ };
225
+ }
226
+ function r(i, o, a, l) {
227
+ Promise.resolve(l).then(function(c) {
228
+ i({ value: c, done: a });
229
+ }, o);
230
+ }
231
+ }
232
+ function g(n) {
233
+ return typeof n == "function";
234
+ }
235
+ function On(n) {
236
+ var t = function(s) {
237
+ Error.call(s), s.stack = new Error().stack;
238
+ }, e = n(t);
239
+ return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
240
+ }
241
+ var Vt = On(function(n) {
242
+ return function(e) {
243
+ n(this), this.message = e ? e.length + ` errors occurred during unsubscription:
244
+ ` + e.map(function(s, r) {
245
+ return r + 1 + ") " + s.toString();
246
+ }).join(`
247
+ `) : "", this.name = "UnsubscriptionError", this.errors = e;
248
+ };
249
+ });
250
+ function ce(n, t) {
251
+ if (n) {
252
+ var e = n.indexOf(t);
253
+ 0 <= e && n.splice(e, 1);
254
+ }
255
+ }
256
+ var Ft = function() {
257
+ function n(t) {
258
+ this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
259
+ }
260
+ return n.prototype.unsubscribe = function() {
261
+ var t, e, s, r, i;
262
+ if (!this.closed) {
263
+ this.closed = !0;
264
+ var o = this._parentage;
265
+ if (o)
266
+ if (this._parentage = null, Array.isArray(o))
267
+ try {
268
+ for (var a = et(o), l = a.next(); !l.done; l = a.next()) {
269
+ var c = l.value;
270
+ c.remove(this);
271
+ }
272
+ } catch (m) {
273
+ t = { error: m };
274
+ } finally {
275
+ try {
276
+ l && !l.done && (e = a.return) && e.call(a);
277
+ } finally {
278
+ if (t)
279
+ throw t.error;
280
+ }
281
+ }
282
+ else
283
+ o.remove(this);
284
+ var u = this.initialTeardown;
285
+ if (g(u))
286
+ try {
287
+ u();
288
+ } catch (m) {
289
+ i = m instanceof Vt ? m.errors : [m];
290
+ }
291
+ var h = this._finalizers;
292
+ if (h) {
293
+ this._finalizers = null;
294
+ try {
295
+ for (var d = et(h), p = d.next(); !p.done; p = d.next()) {
296
+ var $ = p.value;
297
+ try {
298
+ Ne($);
299
+ } catch (m) {
300
+ i = i ?? [], m instanceof Vt ? i = F(F([], R(i)), R(m.errors)) : i.push(m);
301
+ }
302
+ }
303
+ } catch (m) {
304
+ s = { error: m };
305
+ } finally {
306
+ try {
307
+ p && !p.done && (r = d.return) && r.call(d);
308
+ } finally {
309
+ if (s)
310
+ throw s.error;
311
+ }
312
+ }
313
+ }
314
+ if (i)
315
+ throw new Vt(i);
316
+ }
317
+ }, n.prototype.add = function(t) {
318
+ var e;
319
+ if (t && t !== this)
320
+ if (this.closed)
321
+ Ne(t);
322
+ else {
323
+ if (t instanceof n) {
324
+ if (t.closed || t._hasParent(this))
325
+ return;
326
+ t._addParent(this);
327
+ }
328
+ (this._finalizers = (e = this._finalizers) !== null && e !== void 0 ? e : []).push(t);
329
+ }
330
+ }, n.prototype._hasParent = function(t) {
331
+ var e = this._parentage;
332
+ return e === t || Array.isArray(e) && e.includes(t);
333
+ }, n.prototype._addParent = function(t) {
334
+ var e = this._parentage;
335
+ this._parentage = Array.isArray(e) ? (e.push(t), e) : e ? [e, t] : t;
336
+ }, n.prototype._removeParent = function(t) {
337
+ var e = this._parentage;
338
+ e === t ? this._parentage = null : Array.isArray(e) && ce(e, t);
339
+ }, n.prototype.remove = function(t) {
340
+ var e = this._finalizers;
341
+ e && ce(e, t), t instanceof n && t._removeParent(this);
342
+ }, n.EMPTY = function() {
343
+ var t = new n();
344
+ return t.closed = !0, t;
345
+ }(), n;
346
+ }(), kn = Ft.EMPTY;
347
+ function Tn(n) {
348
+ return n instanceof Ft || n && "closed" in n && g(n.remove) && g(n.add) && g(n.unsubscribe);
349
+ }
350
+ function Ne(n) {
351
+ g(n) ? n() : n.unsubscribe();
352
+ }
353
+ var Pn = {
354
+ onUnhandledError: null,
355
+ onStoppedNotification: null,
356
+ Promise: void 0,
357
+ useDeprecatedSynchronousErrorHandling: !1,
358
+ useDeprecatedNextContext: !1
359
+ }, ue = {
360
+ setTimeout: function(n, t) {
361
+ for (var e = [], s = 2; s < arguments.length; s++)
362
+ e[s - 2] = arguments[s];
363
+ var r = ue.delegate;
364
+ return r != null && r.setTimeout ? r.setTimeout.apply(r, F([n, t], R(e))) : setTimeout.apply(void 0, F([n, t], R(e)));
365
+ },
366
+ clearTimeout: function(n) {
367
+ var t = ue.delegate;
368
+ return ((t == null ? void 0 : t.clearTimeout) || clearTimeout)(n);
369
+ },
370
+ delegate: void 0
371
+ };
372
+ function Ln(n) {
373
+ ue.setTimeout(function() {
374
+ throw n;
375
+ });
376
+ }
377
+ function Et() {
378
+ }
379
+ function Ct(n) {
380
+ n();
381
+ }
382
+ var be = function(n) {
383
+ st(t, n);
384
+ function t(e) {
385
+ var s = n.call(this) || this;
386
+ return s.isStopped = !1, e ? (s.destination = e, Tn(e) && e.add(s)) : s.destination = Ms, s;
387
+ }
388
+ return t.create = function(e, s, r) {
389
+ return new he(e, s, r);
390
+ }, t.prototype.next = function(e) {
391
+ this.isStopped || this._next(e);
392
+ }, t.prototype.error = function(e) {
393
+ this.isStopped || (this.isStopped = !0, this._error(e));
394
+ }, t.prototype.complete = function() {
395
+ this.isStopped || (this.isStopped = !0, this._complete());
396
+ }, t.prototype.unsubscribe = function() {
397
+ this.closed || (this.isStopped = !0, n.prototype.unsubscribe.call(this), this.destination = null);
398
+ }, t.prototype._next = function(e) {
399
+ this.destination.next(e);
400
+ }, t.prototype._error = function(e) {
401
+ try {
402
+ this.destination.error(e);
403
+ } finally {
404
+ this.unsubscribe();
405
+ }
406
+ }, t.prototype._complete = function() {
407
+ try {
408
+ this.destination.complete();
409
+ } finally {
410
+ this.unsubscribe();
411
+ }
412
+ }, t;
413
+ }(Ft), Ts = Function.prototype.bind;
414
+ function te(n, t) {
415
+ return Ts.call(n, t);
416
+ }
417
+ var Ps = function() {
418
+ function n(t) {
419
+ this.partialObserver = t;
420
+ }
421
+ return n.prototype.next = function(t) {
422
+ var e = this.partialObserver;
423
+ if (e.next)
424
+ try {
425
+ e.next(t);
426
+ } catch (s) {
427
+ _t(s);
428
+ }
429
+ }, n.prototype.error = function(t) {
430
+ var e = this.partialObserver;
431
+ if (e.error)
432
+ try {
433
+ e.error(t);
434
+ } catch (s) {
435
+ _t(s);
436
+ }
437
+ else
438
+ _t(t);
439
+ }, n.prototype.complete = function() {
440
+ var t = this.partialObserver;
441
+ if (t.complete)
442
+ try {
443
+ t.complete();
444
+ } catch (e) {
445
+ _t(e);
446
+ }
447
+ }, n;
448
+ }(), he = function(n) {
449
+ st(t, n);
450
+ function t(e, s, r) {
451
+ var i = n.call(this) || this, o;
452
+ if (g(e) || !e)
453
+ o = {
454
+ next: e ?? void 0,
455
+ error: s ?? void 0,
456
+ complete: r ?? void 0
457
+ };
458
+ else {
459
+ var a;
460
+ i && Pn.useDeprecatedNextContext ? (a = Object.create(e), a.unsubscribe = function() {
461
+ return i.unsubscribe();
462
+ }, o = {
463
+ next: e.next && te(e.next, a),
464
+ error: e.error && te(e.error, a),
465
+ complete: e.complete && te(e.complete, a)
466
+ }) : o = e;
467
+ }
468
+ return i.destination = new Ps(o), i;
469
+ }
470
+ return t;
471
+ }(be);
472
+ function _t(n) {
473
+ Ln(n);
474
+ }
475
+ function Ls(n) {
476
+ throw n;
477
+ }
478
+ var Ms = {
479
+ closed: !0,
480
+ next: Et,
481
+ error: Ls,
482
+ complete: Et
483
+ }, we = function() {
484
+ return typeof Symbol == "function" && Symbol.observable || "@@observable";
485
+ }();
486
+ function ft(n) {
487
+ return n;
488
+ }
489
+ function Is(n) {
490
+ return n.length === 0 ? ft : n.length === 1 ? n[0] : function(e) {
491
+ return n.reduce(function(s, r) {
492
+ return r(s);
493
+ }, e);
494
+ };
495
+ }
496
+ var S = function() {
497
+ function n(t) {
498
+ t && (this._subscribe = t);
499
+ }
500
+ return n.prototype.lift = function(t) {
501
+ var e = new n();
502
+ return e.source = this, e.operator = t, e;
503
+ }, n.prototype.subscribe = function(t, e, s) {
504
+ var r = this, i = Rs(t) ? t : new he(t, e, s);
505
+ return Ct(function() {
506
+ var o = r, a = o.operator, l = o.source;
507
+ i.add(a ? a.call(i, l) : l ? r._subscribe(i) : r._trySubscribe(i));
508
+ }), i;
509
+ }, n.prototype._trySubscribe = function(t) {
510
+ try {
511
+ return this._subscribe(t);
512
+ } catch (e) {
513
+ t.error(e);
514
+ }
515
+ }, n.prototype.forEach = function(t, e) {
516
+ var s = this;
517
+ return e = Be(e), new e(function(r, i) {
518
+ var o = new he({
519
+ next: function(a) {
520
+ try {
521
+ t(a);
522
+ } catch (l) {
523
+ i(l), o.unsubscribe();
524
+ }
525
+ },
526
+ error: i,
527
+ complete: r
528
+ });
529
+ s.subscribe(o);
530
+ });
531
+ }, n.prototype._subscribe = function(t) {
532
+ var e;
533
+ return (e = this.source) === null || e === void 0 ? void 0 : e.subscribe(t);
534
+ }, n.prototype[we] = function() {
535
+ return this;
536
+ }, n.prototype.pipe = function() {
537
+ for (var t = [], e = 0; e < arguments.length; e++)
538
+ t[e] = arguments[e];
539
+ return Is(t)(this);
540
+ }, n.prototype.toPromise = function(t) {
541
+ var e = this;
542
+ return t = Be(t), new t(function(s, r) {
543
+ var i;
544
+ e.subscribe(function(o) {
545
+ return i = o;
546
+ }, function(o) {
547
+ return r(o);
548
+ }, function() {
549
+ return s(i);
550
+ });
551
+ });
552
+ }, n.create = function(t) {
553
+ return new n(t);
554
+ }, n;
555
+ }();
556
+ function Be(n) {
557
+ var t;
558
+ return (t = n ?? Pn.Promise) !== null && t !== void 0 ? t : Promise;
559
+ }
560
+ function Us(n) {
561
+ return n && g(n.next) && g(n.error) && g(n.complete);
562
+ }
563
+ function Rs(n) {
564
+ return n && n instanceof be || Us(n) && Tn(n);
565
+ }
566
+ function js(n) {
567
+ return g(n == null ? void 0 : n.lift);
568
+ }
569
+ function D(n) {
570
+ return function(t) {
571
+ if (js(t))
572
+ return t.lift(function(e) {
573
+ try {
574
+ return n(e, this);
575
+ } catch (s) {
576
+ this.error(s);
577
+ }
578
+ });
579
+ throw new TypeError("Unable to lift unknown Observable type");
580
+ };
581
+ }
582
+ function E(n, t, e, s, r) {
583
+ return new Hs(n, t, e, s, r);
584
+ }
585
+ var Hs = function(n) {
586
+ st(t, n);
587
+ function t(e, s, r, i, o, a) {
588
+ var l = n.call(this, e) || this;
589
+ return l.onFinalize = o, l.shouldUnsubscribe = a, l._next = s ? function(c) {
590
+ try {
591
+ s(c);
592
+ } catch (u) {
593
+ e.error(u);
594
+ }
595
+ } : n.prototype._next, l._error = i ? function(c) {
596
+ try {
597
+ i(c);
598
+ } catch (u) {
599
+ e.error(u);
600
+ } finally {
601
+ this.unsubscribe();
602
+ }
603
+ } : n.prototype._error, l._complete = r ? function() {
604
+ try {
605
+ r();
606
+ } catch (c) {
607
+ e.error(c);
608
+ } finally {
609
+ this.unsubscribe();
610
+ }
611
+ } : n.prototype._complete, l;
612
+ }
613
+ return t.prototype.unsubscribe = function() {
614
+ var e;
615
+ if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
616
+ var s = this.closed;
617
+ n.prototype.unsubscribe.call(this), !s && ((e = this.onFinalize) === null || e === void 0 || e.call(this));
618
+ }
619
+ }, t;
620
+ }(be), Ds = On(function(n) {
621
+ return function() {
622
+ n(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
623
+ };
624
+ }), _ = function(n) {
625
+ st(t, n);
626
+ function t() {
627
+ var e = n.call(this) || this;
628
+ return e.closed = !1, e.currentObservers = null, e.observers = [], e.isStopped = !1, e.hasError = !1, e.thrownError = null, e;
629
+ }
630
+ return t.prototype.lift = function(e) {
631
+ var s = new ze(this, this);
632
+ return s.operator = e, s;
633
+ }, t.prototype._throwIfClosed = function() {
634
+ if (this.closed)
635
+ throw new Ds();
636
+ }, t.prototype.next = function(e) {
637
+ var s = this;
638
+ Ct(function() {
639
+ var r, i;
640
+ if (s._throwIfClosed(), !s.isStopped) {
641
+ s.currentObservers || (s.currentObservers = Array.from(s.observers));
642
+ try {
643
+ for (var o = et(s.currentObservers), a = o.next(); !a.done; a = o.next()) {
644
+ var l = a.value;
645
+ l.next(e);
646
+ }
647
+ } catch (c) {
648
+ r = { error: c };
649
+ } finally {
650
+ try {
651
+ a && !a.done && (i = o.return) && i.call(o);
652
+ } finally {
653
+ if (r)
654
+ throw r.error;
655
+ }
656
+ }
657
+ }
658
+ });
659
+ }, t.prototype.error = function(e) {
660
+ var s = this;
661
+ Ct(function() {
662
+ if (s._throwIfClosed(), !s.isStopped) {
663
+ s.hasError = s.isStopped = !0, s.thrownError = e;
664
+ for (var r = s.observers; r.length; )
665
+ r.shift().error(e);
666
+ }
667
+ });
668
+ }, t.prototype.complete = function() {
669
+ var e = this;
670
+ Ct(function() {
671
+ if (e._throwIfClosed(), !e.isStopped) {
672
+ e.isStopped = !0;
673
+ for (var s = e.observers; s.length; )
674
+ s.shift().complete();
675
+ }
676
+ });
677
+ }, t.prototype.unsubscribe = function() {
678
+ this.isStopped = this.closed = !0, this.observers = this.currentObservers = null;
679
+ }, Object.defineProperty(t.prototype, "observed", {
680
+ get: function() {
681
+ var e;
682
+ return ((e = this.observers) === null || e === void 0 ? void 0 : e.length) > 0;
683
+ },
684
+ enumerable: !1,
685
+ configurable: !0
686
+ }), t.prototype._trySubscribe = function(e) {
687
+ return this._throwIfClosed(), n.prototype._trySubscribe.call(this, e);
688
+ }, t.prototype._subscribe = function(e) {
689
+ return this._throwIfClosed(), this._checkFinalizedStatuses(e), this._innerSubscribe(e);
690
+ }, t.prototype._innerSubscribe = function(e) {
691
+ var s = this, r = this, i = r.hasError, o = r.isStopped, a = r.observers;
692
+ return i || o ? kn : (this.currentObservers = null, a.push(e), new Ft(function() {
693
+ s.currentObservers = null, ce(a, e);
694
+ }));
695
+ }, t.prototype._checkFinalizedStatuses = function(e) {
696
+ var s = this, r = s.hasError, i = s.thrownError, o = s.isStopped;
697
+ r ? e.error(i) : o && e.complete();
698
+ }, t.prototype.asObservable = function() {
699
+ var e = new S();
700
+ return e.source = this, e;
701
+ }, t.create = function(e, s) {
702
+ return new ze(e, s);
703
+ }, t;
704
+ }(S), ze = function(n) {
705
+ st(t, n);
706
+ function t(e, s) {
707
+ var r = n.call(this) || this;
708
+ return r.destination = e, r.source = s, r;
709
+ }
710
+ return t.prototype.next = function(e) {
711
+ var s, r;
712
+ (r = (s = this.destination) === null || s === void 0 ? void 0 : s.next) === null || r === void 0 || r.call(s, e);
713
+ }, t.prototype.error = function(e) {
714
+ var s, r;
715
+ (r = (s = this.destination) === null || s === void 0 ? void 0 : s.error) === null || r === void 0 || r.call(s, e);
716
+ }, t.prototype.complete = function() {
717
+ var e, s;
718
+ (s = (e = this.destination) === null || e === void 0 ? void 0 : e.complete) === null || s === void 0 || s.call(e);
719
+ }, t.prototype._subscribe = function(e) {
720
+ var s, r;
721
+ return (r = (s = this.source) === null || s === void 0 ? void 0 : s.subscribe(e)) !== null && r !== void 0 ? r : kn;
722
+ }, t;
723
+ }(_), M = function(n) {
724
+ st(t, n);
725
+ function t(e) {
726
+ var s = n.call(this) || this;
727
+ return s._value = e, s;
728
+ }
729
+ return Object.defineProperty(t.prototype, "value", {
730
+ get: function() {
731
+ return this.getValue();
732
+ },
733
+ enumerable: !1,
734
+ configurable: !0
735
+ }), t.prototype._subscribe = function(e) {
736
+ var s = n.prototype._subscribe.call(this, e);
737
+ return !s.closed && e.next(this._value), s;
738
+ }, t.prototype.getValue = function() {
739
+ var e = this, s = e.hasError, r = e.thrownError, i = e._value;
740
+ if (s)
741
+ throw r;
742
+ return this._throwIfClosed(), i;
743
+ }, t.prototype.next = function(e) {
744
+ n.prototype.next.call(this, this._value = e);
745
+ }, t;
746
+ }(_), vt = new S(function(n) {
747
+ return n.complete();
748
+ });
749
+ function Ns(n) {
750
+ return n && g(n.schedule);
751
+ }
752
+ function _e(n) {
753
+ return n[n.length - 1];
754
+ }
755
+ function Mn(n) {
756
+ return g(_e(n)) ? n.pop() : void 0;
757
+ }
758
+ function Se(n) {
759
+ return Ns(_e(n)) ? n.pop() : void 0;
760
+ }
761
+ function Bs(n, t) {
762
+ return typeof _e(n) == "number" ? n.pop() : t;
763
+ }
764
+ var xe = function(n) {
765
+ return n && typeof n.length == "number" && typeof n != "function";
766
+ };
767
+ function In(n) {
768
+ return g(n == null ? void 0 : n.then);
769
+ }
770
+ function Un(n) {
771
+ return g(n[we]);
772
+ }
773
+ function Rn(n) {
774
+ return Symbol.asyncIterator && g(n == null ? void 0 : n[Symbol.asyncIterator]);
775
+ }
776
+ function jn(n) {
777
+ return new TypeError("You provided " + (n !== null && typeof n == "object" ? "an invalid object" : "'" + n + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
778
+ }
779
+ function zs() {
780
+ return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
781
+ }
782
+ var Hn = zs();
783
+ function Dn(n) {
784
+ return g(n == null ? void 0 : n[Hn]);
785
+ }
786
+ function Nn(n) {
787
+ return Os(this, arguments, function() {
788
+ var e, s, r, i;
789
+ return En(this, function(o) {
790
+ switch (o.label) {
791
+ case 0:
792
+ e = n.getReader(), o.label = 1;
793
+ case 1:
794
+ o.trys.push([1, , 9, 10]), o.label = 2;
795
+ case 2:
796
+ return [4, J(e.read())];
797
+ case 3:
798
+ return s = o.sent(), r = s.value, i = s.done, i ? [4, J(void 0)] : [3, 5];
799
+ case 4:
800
+ return [2, o.sent()];
801
+ case 5:
802
+ return [4, J(r)];
803
+ case 6:
804
+ return [4, o.sent()];
805
+ case 7:
806
+ return o.sent(), [3, 2];
807
+ case 8:
808
+ return [3, 10];
809
+ case 9:
810
+ return e.releaseLock(), [7];
811
+ case 10:
812
+ return [2];
813
+ }
814
+ });
815
+ });
816
+ }
817
+ function Bn(n) {
818
+ return g(n == null ? void 0 : n.getReader);
819
+ }
820
+ function k(n) {
821
+ if (n instanceof S)
822
+ return n;
823
+ if (n != null) {
824
+ if (Un(n))
825
+ return Fs(n);
826
+ if (xe(n))
827
+ return Ws(n);
828
+ if (In(n))
829
+ return Zs(n);
830
+ if (Rn(n))
831
+ return zn(n);
832
+ if (Dn(n))
833
+ return Gs(n);
834
+ if (Bn(n))
835
+ return qs(n);
836
+ }
837
+ throw jn(n);
838
+ }
839
+ function Fs(n) {
840
+ return new S(function(t) {
841
+ var e = n[we]();
842
+ if (g(e.subscribe))
843
+ return e.subscribe(t);
844
+ throw new TypeError("Provided object does not correctly implement Symbol.observable");
845
+ });
846
+ }
847
+ function Ws(n) {
848
+ return new S(function(t) {
849
+ for (var e = 0; e < n.length && !t.closed; e++)
850
+ t.next(n[e]);
851
+ t.complete();
852
+ });
853
+ }
854
+ function Zs(n) {
855
+ return new S(function(t) {
856
+ n.then(function(e) {
857
+ t.closed || (t.next(e), t.complete());
858
+ }, function(e) {
859
+ return t.error(e);
860
+ }).then(null, Ln);
861
+ });
862
+ }
863
+ function Gs(n) {
864
+ return new S(function(t) {
865
+ var e, s;
866
+ try {
867
+ for (var r = et(n), i = r.next(); !i.done; i = r.next()) {
868
+ var o = i.value;
869
+ if (t.next(o), t.closed)
870
+ return;
871
+ }
872
+ } catch (a) {
873
+ e = { error: a };
874
+ } finally {
875
+ try {
876
+ i && !i.done && (s = r.return) && s.call(r);
877
+ } finally {
878
+ if (e)
879
+ throw e.error;
880
+ }
881
+ }
882
+ t.complete();
883
+ });
884
+ }
885
+ function zn(n) {
886
+ return new S(function(t) {
887
+ Ys(n, t).catch(function(e) {
888
+ return t.error(e);
889
+ });
890
+ });
891
+ }
892
+ function qs(n) {
893
+ return zn(Nn(n));
894
+ }
895
+ function Ys(n, t) {
896
+ var e, s, r, i;
897
+ return Es(this, void 0, void 0, function() {
898
+ var o, a;
899
+ return En(this, function(l) {
900
+ switch (l.label) {
901
+ case 0:
902
+ l.trys.push([0, 5, 6, 11]), e = ks(n), l.label = 1;
903
+ case 1:
904
+ return [4, e.next()];
905
+ case 2:
906
+ if (s = l.sent(), !!s.done)
907
+ return [3, 4];
908
+ if (o = s.value, t.next(o), t.closed)
909
+ return [2];
910
+ l.label = 3;
911
+ case 3:
912
+ return [3, 1];
913
+ case 4:
914
+ return [3, 11];
915
+ case 5:
916
+ return a = l.sent(), r = { error: a }, [3, 11];
917
+ case 6:
918
+ return l.trys.push([6, , 9, 10]), s && !s.done && (i = e.return) ? [4, i.call(e)] : [3, 8];
919
+ case 7:
920
+ l.sent(), l.label = 8;
921
+ case 8:
922
+ return [3, 10];
923
+ case 9:
924
+ if (r)
925
+ throw r.error;
926
+ return [7];
927
+ case 10:
928
+ return [7];
929
+ case 11:
930
+ return t.complete(), [2];
931
+ }
932
+ });
933
+ });
934
+ }
935
+ function P(n, t, e, s, r) {
936
+ s === void 0 && (s = 0), r === void 0 && (r = !1);
937
+ var i = t.schedule(function() {
938
+ e(), r ? n.add(this.schedule(null, s)) : this.unsubscribe();
939
+ }, s);
940
+ if (n.add(i), !r)
941
+ return i;
942
+ }
943
+ function Fn(n, t) {
944
+ return t === void 0 && (t = 0), D(function(e, s) {
945
+ e.subscribe(E(s, function(r) {
946
+ return P(s, n, function() {
947
+ return s.next(r);
948
+ }, t);
949
+ }, function() {
950
+ return P(s, n, function() {
951
+ return s.complete();
952
+ }, t);
953
+ }, function(r) {
954
+ return P(s, n, function() {
955
+ return s.error(r);
956
+ }, t);
957
+ }));
958
+ });
959
+ }
960
+ function Wn(n, t) {
961
+ return t === void 0 && (t = 0), D(function(e, s) {
962
+ s.add(n.schedule(function() {
963
+ return e.subscribe(s);
964
+ }, t));
965
+ });
966
+ }
967
+ function Ks(n, t) {
968
+ return k(n).pipe(Wn(t), Fn(t));
969
+ }
970
+ function Xs(n, t) {
971
+ return k(n).pipe(Wn(t), Fn(t));
972
+ }
973
+ function Js(n, t) {
974
+ return new S(function(e) {
975
+ var s = 0;
976
+ return t.schedule(function() {
977
+ s === n.length ? e.complete() : (e.next(n[s++]), e.closed || this.schedule());
978
+ });
979
+ });
980
+ }
981
+ function Qs(n, t) {
982
+ return new S(function(e) {
983
+ var s;
984
+ return P(e, t, function() {
985
+ s = n[Hn](), P(e, t, function() {
986
+ var r, i, o;
987
+ try {
988
+ r = s.next(), i = r.value, o = r.done;
989
+ } catch (a) {
990
+ e.error(a);
991
+ return;
992
+ }
993
+ o ? e.complete() : e.next(i);
994
+ }, 0, !0);
995
+ }), function() {
996
+ return g(s == null ? void 0 : s.return) && s.return();
997
+ };
998
+ });
999
+ }
1000
+ function Zn(n, t) {
1001
+ if (!n)
1002
+ throw new Error("Iterable cannot be null");
1003
+ return new S(function(e) {
1004
+ P(e, t, function() {
1005
+ var s = n[Symbol.asyncIterator]();
1006
+ P(e, t, function() {
1007
+ s.next().then(function(r) {
1008
+ r.done ? e.complete() : e.next(r.value);
1009
+ });
1010
+ }, 0, !0);
1011
+ });
1012
+ });
1013
+ }
1014
+ function Vs(n, t) {
1015
+ return Zn(Nn(n), t);
1016
+ }
1017
+ function tr(n, t) {
1018
+ if (n != null) {
1019
+ if (Un(n))
1020
+ return Ks(n, t);
1021
+ if (xe(n))
1022
+ return Js(n, t);
1023
+ if (In(n))
1024
+ return Xs(n, t);
1025
+ if (Rn(n))
1026
+ return Zn(n, t);
1027
+ if (Dn(n))
1028
+ return Qs(n, t);
1029
+ if (Bn(n))
1030
+ return Vs(n, t);
1031
+ }
1032
+ throw jn(n);
1033
+ }
1034
+ function Wt(n, t) {
1035
+ return t ? tr(n, t) : k(n);
1036
+ }
1037
+ function de() {
1038
+ for (var n = [], t = 0; t < arguments.length; t++)
1039
+ n[t] = arguments[t];
1040
+ var e = Se(n);
1041
+ return Wt(n, e);
1042
+ }
1043
+ function Ot(n, t) {
1044
+ return D(function(e, s) {
1045
+ var r = 0;
1046
+ e.subscribe(E(s, function(i) {
1047
+ s.next(n.call(t, i, r++));
1048
+ }));
1049
+ });
1050
+ }
1051
+ var er = Array.isArray;
1052
+ function nr(n, t) {
1053
+ return er(t) ? n.apply(void 0, F([], R(t))) : n(t);
1054
+ }
1055
+ function Gn(n) {
1056
+ return Ot(function(t) {
1057
+ return nr(n, t);
1058
+ });
1059
+ }
1060
+ var sr = Array.isArray, rr = Object.getPrototypeOf, ir = Object.prototype, or = Object.keys;
1061
+ function ar(n) {
1062
+ if (n.length === 1) {
1063
+ var t = n[0];
1064
+ if (sr(t))
1065
+ return { args: t, keys: null };
1066
+ if (lr(t)) {
1067
+ var e = or(t);
1068
+ return {
1069
+ args: e.map(function(s) {
1070
+ return t[s];
1071
+ }),
1072
+ keys: e
1073
+ };
1074
+ }
1075
+ }
1076
+ return { args: n, keys: null };
1077
+ }
1078
+ function lr(n) {
1079
+ return n && typeof n == "object" && rr(n) === ir;
1080
+ }
1081
+ function cr(n, t) {
1082
+ return n.reduce(function(e, s, r) {
1083
+ return e[s] = t[r], e;
1084
+ }, {});
1085
+ }
1086
+ function ur() {
1087
+ for (var n = [], t = 0; t < arguments.length; t++)
1088
+ n[t] = arguments[t];
1089
+ var e = Se(n), s = Mn(n), r = ar(n), i = r.args, o = r.keys;
1090
+ if (i.length === 0)
1091
+ return Wt([], e);
1092
+ var a = new S(hr(i, e, o ? function(l) {
1093
+ return cr(o, l);
1094
+ } : ft));
1095
+ return s ? a.pipe(Gn(s)) : a;
1096
+ }
1097
+ function hr(n, t, e) {
1098
+ return e === void 0 && (e = ft), function(s) {
1099
+ Fe(t, function() {
1100
+ for (var r = n.length, i = new Array(r), o = r, a = r, l = function(u) {
1101
+ Fe(t, function() {
1102
+ var h = Wt(n[u], t), d = !1;
1103
+ h.subscribe(E(s, function(p) {
1104
+ i[u] = p, d || (d = !0, a--), a || s.next(e(i.slice()));
1105
+ }, function() {
1106
+ --o || s.complete();
1107
+ }));
1108
+ }, s);
1109
+ }, c = 0; c < r; c++)
1110
+ l(c);
1111
+ }, s);
1112
+ };
1113
+ }
1114
+ function Fe(n, t, e) {
1115
+ n ? P(e, n, t) : t();
1116
+ }
1117
+ function dr(n, t, e, s, r, i, o, a) {
1118
+ var l = [], c = 0, u = 0, h = !1, d = function() {
1119
+ h && !l.length && !c && t.complete();
1120
+ }, p = function(m) {
1121
+ return c < s ? $(m) : l.push(m);
1122
+ }, $ = function(m) {
1123
+ i && t.next(m), c++;
1124
+ var De = !1;
1125
+ k(e(m, u++)).subscribe(E(t, function(rt) {
1126
+ r == null || r(rt), i ? p(rt) : t.next(rt);
1127
+ }, function() {
1128
+ De = !0;
1129
+ }, void 0, function() {
1130
+ if (De)
1131
+ try {
1132
+ c--;
1133
+ for (var rt = function() {
1134
+ var wt = l.shift();
1135
+ o ? P(t, o, function() {
1136
+ return $(wt);
1137
+ }) : $(wt);
1138
+ }; l.length && c < s; )
1139
+ rt();
1140
+ d();
1141
+ } catch (wt) {
1142
+ t.error(wt);
1143
+ }
1144
+ }));
1145
+ };
1146
+ return n.subscribe(E(t, p, function() {
1147
+ h = !0, d();
1148
+ })), function() {
1149
+ a == null || a();
1150
+ };
1151
+ }
1152
+ function Ce(n, t, e) {
1153
+ return e === void 0 && (e = 1 / 0), g(t) ? Ce(function(s, r) {
1154
+ return Ot(function(i, o) {
1155
+ return t(s, i, r, o);
1156
+ })(k(n(s, r)));
1157
+ }, e) : (typeof t == "number" && (e = t), D(function(s, r) {
1158
+ return dr(s, r, n, e);
1159
+ }));
1160
+ }
1161
+ function pr(n) {
1162
+ return n === void 0 && (n = 1 / 0), Ce(ft, n);
1163
+ }
1164
+ var fr = ["addListener", "removeListener"], vr = ["addEventListener", "removeEventListener"], gr = ["on", "off"];
1165
+ function kt(n, t, e, s) {
1166
+ if (g(e) && (s = e, e = void 0), s)
1167
+ return kt(n, t, e).pipe(Gn(s));
1168
+ var r = R(yr(n) ? vr.map(function(a) {
1169
+ return function(l) {
1170
+ return n[a](t, l, e);
1171
+ };
1172
+ }) : mr(n) ? fr.map(We(n, t)) : $r(n) ? gr.map(We(n, t)) : [], 2), i = r[0], o = r[1];
1173
+ if (!i && xe(n))
1174
+ return Ce(function(a) {
1175
+ return kt(a, t, e);
1176
+ })(k(n));
1177
+ if (!i)
1178
+ throw new TypeError("Invalid event target");
1179
+ return new S(function(a) {
1180
+ var l = function() {
1181
+ for (var c = [], u = 0; u < arguments.length; u++)
1182
+ c[u] = arguments[u];
1183
+ return a.next(1 < c.length ? c : c[0]);
1184
+ };
1185
+ return i(l), function() {
1186
+ return o(l);
1187
+ };
1188
+ });
1189
+ }
1190
+ function We(n, t) {
1191
+ return function(e) {
1192
+ return function(s) {
1193
+ return n[e](t, s);
1194
+ };
1195
+ };
1196
+ }
1197
+ function mr(n) {
1198
+ return g(n.addListener) && g(n.removeListener);
1199
+ }
1200
+ function $r(n) {
1201
+ return g(n.on) && g(n.off);
1202
+ }
1203
+ function yr(n) {
1204
+ return g(n.addEventListener) && g(n.removeEventListener);
1205
+ }
1206
+ function br() {
1207
+ for (var n = [], t = 0; t < arguments.length; t++)
1208
+ n[t] = arguments[t];
1209
+ var e = Se(n), s = Bs(n, 1 / 0), r = n;
1210
+ return r.length ? r.length === 1 ? k(r[0]) : pr(s)(Wt(r, e)) : vt;
1211
+ }
1212
+ function pe(n) {
1213
+ return n <= 0 ? function() {
1214
+ return vt;
1215
+ } : D(function(t, e) {
1216
+ var s = 0;
1217
+ t.subscribe(E(e, function(r) {
1218
+ ++s <= n && (e.next(r), n <= s && e.complete());
1219
+ }));
1220
+ });
1221
+ }
1222
+ function Q(n, t) {
1223
+ return D(function(e, s) {
1224
+ var r = null, i = 0, o = !1, a = function() {
1225
+ return o && !r && s.complete();
1226
+ };
1227
+ e.subscribe(E(s, function(l) {
1228
+ r == null || r.unsubscribe();
1229
+ var c = 0, u = i++;
1230
+ k(n(l, u)).subscribe(r = E(s, function(h) {
1231
+ return s.next(t ? t(l, h, u, c++) : h);
1232
+ }, function() {
1233
+ r = null, a();
1234
+ }));
1235
+ }, function() {
1236
+ o = !0, a();
1237
+ }));
1238
+ });
1239
+ }
1240
+ function Ze(n) {
1241
+ return D(function(t, e) {
1242
+ k(n).subscribe(E(e, function() {
1243
+ return e.complete();
1244
+ }, Et)), !e.closed && t.subscribe(e);
1245
+ });
1246
+ }
1247
+ function qn() {
1248
+ for (var n = [], t = 0; t < arguments.length; t++)
1249
+ n[t] = arguments[t];
1250
+ var e = Mn(n);
1251
+ return D(function(s, r) {
1252
+ for (var i = n.length, o = new Array(i), a = n.map(function() {
1253
+ return !1;
1254
+ }), l = !1, c = function(h) {
1255
+ k(n[h]).subscribe(E(r, function(d) {
1256
+ o[h] = d, !l && !a[h] && (a[h] = !0, (l = a.every(ft)) && (a = null));
1257
+ }, Et));
1258
+ }, u = 0; u < i; u++)
1259
+ c(u);
1260
+ s.subscribe(E(r, function(h) {
1261
+ if (l) {
1262
+ var d = F([h], R(o));
1263
+ r.next(e ? e.apply(void 0, F([], R(d))) : d);
1264
+ }
1265
+ }));
1266
+ });
1267
+ }
1268
+ var I = /* @__PURE__ */ ((n) => (n.User = "user", n.Agent = "agent", n.System = "system", n))(I || {});
1269
+ const Yn = () => crypto.randomUUID();
1270
+ class Zt {
1271
+ constructor(t, e, s) {
1272
+ this.type = t, this.sender = e, this.messages = s, this.status = "delivered", this.didUpdate = new _(), this.actions$ = new _(), this.remove$ = new _(), this.timestamp = Date.now(), this.id = Yn();
1273
+ }
1274
+ update(t) {
1275
+ this.messages = [
1276
+ {
1277
+ items: t
1278
+ }
1279
+ ], this.didUpdate.next(this);
1280
+ }
1281
+ setStatus(t) {
1282
+ this.status = t, this.didUpdate.next(this);
1283
+ }
1284
+ remove() {
1285
+ this.remove$.next();
1286
+ }
1287
+ }
1288
+ class wr {
1289
+ constructor(t) {
1290
+ this.name = t, this.print$ = new _();
1291
+ }
1292
+ print(t) {
1293
+ const e = new Zt(
1294
+ I.Agent,
1295
+ { name: this.name },
1296
+ [
1297
+ {
1298
+ items: [["html", { content: t }]]
1299
+ }
1300
+ ]
1301
+ );
1302
+ return this.print$.next(e), e;
1303
+ }
1304
+ subscribe() {
1305
+ return this.print$.asObservable();
1306
+ }
1307
+ }
1308
+ class _r {
1309
+ constructor(t) {
1310
+ this.name = t, this.print$ = new _();
1311
+ }
1312
+ print(t) {
1313
+ const e = new Zt(
1314
+ I.User,
1315
+ { name: this.name },
1316
+ [
1317
+ {
1318
+ items: [["html", { content: t }]]
1319
+ }
1320
+ ]
1321
+ );
1322
+ return this.print$.next(e), e;
1323
+ }
1324
+ subscribe() {
1325
+ return this.print$.asObservable();
1326
+ }
1327
+ }
1328
+ class Sr {
1329
+ constructor() {
1330
+ this.print$ = new _(), this.name = "system";
1331
+ }
1332
+ print(t) {
1333
+ const e = new Zt(
1334
+ I.System,
1335
+ { name: this.name },
1336
+ [
1337
+ {
1338
+ items: [["html", { content: t }]]
1339
+ }
1340
+ ]
1341
+ );
1342
+ return this.print$.next(e), e;
1343
+ }
1344
+ subscribe() {
1345
+ return this.print$.asObservable();
1346
+ }
1347
+ }
1348
+ class No {
1349
+ constructor(t, e) {
1350
+ this.name = t, this.component = e, this.print$ = new _(), this.typingState$ = new M(!1), this.complete$ = new _(), this.system = this.createSystem(), this.rehydrate$ = new _(), this.saveToCurrentSession$ = new _(), this.onComplete = () => this.complete$.asObservable();
1351
+ }
1352
+ connect(t = {}) {
1353
+ this.complete$.pipe(pe(1)).subscribe(() => {
1354
+ this.disconnected();
1355
+ });
1356
+ }
1357
+ // this is always executed when a provider is complete
1358
+ // overide this method to handle specific cases
1359
+ disconnected() {
1360
+ }
1361
+ onUserSubmit(t) {
1362
+ this.print(I.User, t.text);
1363
+ }
1364
+ print(t, e) {
1365
+ const s = new Zt(
1366
+ t,
1367
+ {
1368
+ name: ""
1369
+ },
1370
+ [
1371
+ {
1372
+ items: [["html", { content: e }]]
1373
+ }
1374
+ ]
1375
+ );
1376
+ return this.printEntry(s);
1377
+ }
1378
+ printEntry(t) {
1379
+ return this.print$.next(t), t;
1380
+ }
1381
+ createAgent(t) {
1382
+ const e = new wr(t);
1383
+ return e.subscribe().subscribe((s) => {
1384
+ this.playNotification(), this.printEntry(s);
1385
+ }), e;
1386
+ }
1387
+ createUser(t) {
1388
+ const e = new _r(t);
1389
+ return e.subscribe().subscribe((s) => {
1390
+ this.printEntry(s);
1391
+ }), e;
1392
+ }
1393
+ createSystem() {
1394
+ const t = new Sr();
1395
+ return t.subscribe().subscribe((e) => {
1396
+ this.printEntry(e);
1397
+ }), t;
1398
+ }
1399
+ setTypingState(t) {
1400
+ this.typingState$.next(t);
1401
+ }
1402
+ setToastMessage(t) {
1403
+ this.component.setToastMessage(t);
1404
+ }
1405
+ isTyping() {
1406
+ return this.typingState$.asObservable();
1407
+ }
1408
+ actions() {
1409
+ return this.print$.asObservable();
1410
+ }
1411
+ playNotification() {
1412
+ const t = "https://publicpoc.blob.core.windows.net/widget-assets/notification.mp3";
1413
+ this.component.application.branding().other.disableSound || new Audio(t).play().catch((r) => {
1414
+ });
1415
+ }
1416
+ complete() {
1417
+ this.complete$.next();
1418
+ }
1419
+ save(t) {
1420
+ this.saveToCurrentSession$.next(t);
1421
+ }
1422
+ async rehydrate(t) {
1423
+ }
1424
+ }
1425
+ /**
1426
+ * @license
1427
+ * Copyright 2019 Google LLC
1428
+ * SPDX-License-Identifier: BSD-3-Clause
1429
+ */
1430
+ const At = globalThis, Ae = At.ShadowRoot && (At.ShadyCSS === void 0 || At.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ee = Symbol(), Ge = /* @__PURE__ */ new WeakMap();
1431
+ let Kn = class {
1432
+ constructor(t, e, s) {
1433
+ if (this._$cssResult$ = !0, s !== Ee)
1434
+ throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
1435
+ this.cssText = t, this.t = e;
1436
+ }
1437
+ get styleSheet() {
1438
+ let t = this.o;
1439
+ const e = this.t;
1440
+ if (Ae && t === void 0) {
1441
+ const s = e !== void 0 && e.length === 1;
1442
+ s && (t = Ge.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && Ge.set(e, t));
1443
+ }
1444
+ return t;
1445
+ }
1446
+ toString() {
1447
+ return this.cssText;
1448
+ }
1449
+ };
1450
+ const xr = (n) => new Kn(typeof n == "string" ? n : n + "", void 0, Ee), C = (n, ...t) => {
1451
+ const e = n.length === 1 ? n[0] : t.reduce((s, r, i) => s + ((o) => {
1452
+ if (o._$cssResult$ === !0)
1453
+ return o.cssText;
1454
+ if (typeof o == "number")
1455
+ return o;
1456
+ throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
1457
+ })(r) + n[i + 1], n[0]);
1458
+ return new Kn(e, n, Ee);
1459
+ }, Cr = (n, t) => {
1460
+ if (Ae)
1461
+ n.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
1462
+ else
1463
+ for (const e of t) {
1464
+ const s = document.createElement("style"), r = At.litNonce;
1465
+ r !== void 0 && s.setAttribute("nonce", r), s.textContent = e.cssText, n.appendChild(s);
1466
+ }
1467
+ }, qe = Ae ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((t) => {
1468
+ let e = "";
1469
+ for (const s of t.cssRules)
1470
+ e += s.cssText;
1471
+ return xr(e);
1472
+ })(n) : n;
1473
+ /**
1474
+ * @license
1475
+ * Copyright 2017 Google LLC
1476
+ * SPDX-License-Identifier: BSD-3-Clause
1477
+ */
1478
+ const { is: Ar, defineProperty: Er, getOwnPropertyDescriptor: Or, getOwnPropertyNames: kr, getOwnPropertySymbols: Tr, getPrototypeOf: Pr } = Object, U = globalThis, Ye = U.trustedTypes, Lr = Ye ? Ye.emptyScript : "", ee = U.reactiveElementPolyfillSupport, ot = (n, t) => n, Tt = { toAttribute(n, t) {
1479
+ switch (t) {
1480
+ case Boolean:
1481
+ n = n ? Lr : null;
1482
+ break;
1483
+ case Object:
1484
+ case Array:
1485
+ n = n == null ? n : JSON.stringify(n);
1486
+ }
1487
+ return n;
1488
+ }, fromAttribute(n, t) {
1489
+ let e = n;
1490
+ switch (t) {
1491
+ case Boolean:
1492
+ e = n !== null;
1493
+ break;
1494
+ case Number:
1495
+ e = n === null ? null : Number(n);
1496
+ break;
1497
+ case Object:
1498
+ case Array:
1499
+ try {
1500
+ e = JSON.parse(n);
1501
+ } catch {
1502
+ e = null;
1503
+ }
1504
+ }
1505
+ return e;
1506
+ } }, Oe = (n, t) => !Ar(n, t), Ke = { attribute: !0, type: String, converter: Tt, reflect: !1, hasChanged: Oe };
1507
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), U.litPropertyMetadata ?? (U.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
1508
+ let q = class extends HTMLElement {
1509
+ static addInitializer(t) {
1510
+ this._$Ei(), (this.l ?? (this.l = [])).push(t);
1511
+ }
1512
+ static get observedAttributes() {
1513
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
1514
+ }
1515
+ static createProperty(t, e = Ke) {
1516
+ if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
1517
+ const s = Symbol(), r = this.getPropertyDescriptor(t, s, e);
1518
+ r !== void 0 && Er(this.prototype, t, r);
1519
+ }
1520
+ }
1521
+ static getPropertyDescriptor(t, e, s) {
1522
+ const { get: r, set: i } = Or(this.prototype, t) ?? { get() {
1523
+ return this[e];
1524
+ }, set(o) {
1525
+ this[e] = o;
1526
+ } };
1527
+ return { get() {
1528
+ return r == null ? void 0 : r.call(this);
1529
+ }, set(o) {
1530
+ const a = r == null ? void 0 : r.call(this);
1531
+ i.call(this, o), this.requestUpdate(t, a, s);
1532
+ }, configurable: !0, enumerable: !0 };
1533
+ }
1534
+ static getPropertyOptions(t) {
1535
+ return this.elementProperties.get(t) ?? Ke;
1536
+ }
1537
+ static _$Ei() {
1538
+ if (this.hasOwnProperty(ot("elementProperties")))
1539
+ return;
1540
+ const t = Pr(this);
1541
+ t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
1542
+ }
1543
+ static finalize() {
1544
+ if (this.hasOwnProperty(ot("finalized")))
1545
+ return;
1546
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(ot("properties"))) {
1547
+ const e = this.properties, s = [...kr(e), ...Tr(e)];
1548
+ for (const r of s)
1549
+ this.createProperty(r, e[r]);
1550
+ }
1551
+ const t = this[Symbol.metadata];
1552
+ if (t !== null) {
1553
+ const e = litPropertyMetadata.get(t);
1554
+ if (e !== void 0)
1555
+ for (const [s, r] of e)
1556
+ this.elementProperties.set(s, r);
1557
+ }
1558
+ this._$Eh = /* @__PURE__ */ new Map();
1559
+ for (const [e, s] of this.elementProperties) {
1560
+ const r = this._$Eu(e, s);
1561
+ r !== void 0 && this._$Eh.set(r, e);
1562
+ }
1563
+ this.elementStyles = this.finalizeStyles(this.styles);
1564
+ }
1565
+ static finalizeStyles(t) {
1566
+ const e = [];
1567
+ if (Array.isArray(t)) {
1568
+ const s = new Set(t.flat(1 / 0).reverse());
1569
+ for (const r of s)
1570
+ e.unshift(qe(r));
1571
+ } else
1572
+ t !== void 0 && e.push(qe(t));
1573
+ return e;
1574
+ }
1575
+ static _$Eu(t, e) {
1576
+ const s = e.attribute;
1577
+ return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
1578
+ }
1579
+ constructor() {
1580
+ super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
1581
+ }
1582
+ _$Ev() {
1583
+ var t;
1584
+ this._$Eg = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach((e) => e(this));
1585
+ }
1586
+ addController(t) {
1587
+ var e;
1588
+ (this._$ES ?? (this._$ES = [])).push(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
1589
+ }
1590
+ removeController(t) {
1591
+ var e;
1592
+ (e = this._$ES) == null || e.splice(this._$ES.indexOf(t) >>> 0, 1);
1593
+ }
1594
+ _$E_() {
1595
+ const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
1596
+ for (const s of e.keys())
1597
+ this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
1598
+ t.size > 0 && (this._$Ep = t);
1599
+ }
1600
+ createRenderRoot() {
1601
+ const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
1602
+ return Cr(t, this.constructor.elementStyles), t;
1603
+ }
1604
+ connectedCallback() {
1605
+ var t;
1606
+ this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$ES) == null || t.forEach((e) => {
1607
+ var s;
1608
+ return (s = e.hostConnected) == null ? void 0 : s.call(e);
1609
+ });
1610
+ }
1611
+ enableUpdating(t) {
1612
+ }
1613
+ disconnectedCallback() {
1614
+ var t;
1615
+ (t = this._$ES) == null || t.forEach((e) => {
1616
+ var s;
1617
+ return (s = e.hostDisconnected) == null ? void 0 : s.call(e);
1618
+ });
1619
+ }
1620
+ attributeChangedCallback(t, e, s) {
1621
+ this._$AK(t, s);
1622
+ }
1623
+ _$EO(t, e) {
1624
+ var i;
1625
+ const s = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, s);
1626
+ if (r !== void 0 && s.reflect === !0) {
1627
+ const o = (((i = s.converter) == null ? void 0 : i.toAttribute) !== void 0 ? s.converter : Tt).toAttribute(e, s.type);
1628
+ this._$Em = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$Em = null;
1629
+ }
1630
+ }
1631
+ _$AK(t, e) {
1632
+ var i;
1633
+ const s = this.constructor, r = s._$Eh.get(t);
1634
+ if (r !== void 0 && this._$Em !== r) {
1635
+ const o = s.getPropertyOptions(r), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((i = o.converter) == null ? void 0 : i.fromAttribute) !== void 0 ? o.converter : Tt;
1636
+ this._$Em = r, this[r] = a.fromAttribute(e, o.type), this._$Em = null;
1637
+ }
1638
+ }
1639
+ requestUpdate(t, e, s, r = !1, i) {
1640
+ if (t !== void 0) {
1641
+ if (s ?? (s = this.constructor.getPropertyOptions(t)), !(s.hasChanged ?? Oe)(r ? i : this[t], e))
1642
+ return;
1643
+ this.C(t, e, s);
1644
+ }
1645
+ this.isUpdatePending === !1 && (this._$Eg = this._$EP());
1646
+ }
1647
+ C(t, e, s) {
1648
+ this._$AL.has(t) || this._$AL.set(t, e), s.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
1649
+ }
1650
+ async _$EP() {
1651
+ this.isUpdatePending = !0;
1652
+ try {
1653
+ await this._$Eg;
1654
+ } catch (e) {
1655
+ Promise.reject(e);
1656
+ }
1657
+ const t = this.scheduleUpdate();
1658
+ return t != null && await t, !this.isUpdatePending;
1659
+ }
1660
+ scheduleUpdate() {
1661
+ return this.performUpdate();
1662
+ }
1663
+ performUpdate() {
1664
+ var s;
1665
+ if (!this.isUpdatePending)
1666
+ return;
1667
+ if (!this.hasUpdated) {
1668
+ if (this._$Ep) {
1669
+ for (const [i, o] of this._$Ep)
1670
+ this[i] = o;
1671
+ this._$Ep = void 0;
1672
+ }
1673
+ const r = this.constructor.elementProperties;
1674
+ if (r.size > 0)
1675
+ for (const [i, o] of r)
1676
+ o.wrapped !== !0 || this._$AL.has(i) || this[i] === void 0 || this.C(i, this[i], o);
1677
+ }
1678
+ let t = !1;
1679
+ const e = this._$AL;
1680
+ try {
1681
+ t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$ES) == null || s.forEach((r) => {
1682
+ var i;
1683
+ return (i = r.hostUpdate) == null ? void 0 : i.call(r);
1684
+ }), this.update(e)) : this._$ET();
1685
+ } catch (r) {
1686
+ throw t = !1, this._$ET(), r;
1687
+ }
1688
+ t && this._$AE(e);
1689
+ }
1690
+ willUpdate(t) {
1691
+ }
1692
+ _$AE(t) {
1693
+ var e;
1694
+ (e = this._$ES) == null || e.forEach((s) => {
1695
+ var r;
1696
+ return (r = s.hostUpdated) == null ? void 0 : r.call(s);
1697
+ }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
1698
+ }
1699
+ _$ET() {
1700
+ this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
1701
+ }
1702
+ get updateComplete() {
1703
+ return this.getUpdateComplete();
1704
+ }
1705
+ getUpdateComplete() {
1706
+ return this._$Eg;
1707
+ }
1708
+ shouldUpdate(t) {
1709
+ return !0;
1710
+ }
1711
+ update(t) {
1712
+ this._$Ej && (this._$Ej = this._$Ej.forEach((e) => this._$EO(e, this[e]))), this._$ET();
1713
+ }
1714
+ updated(t) {
1715
+ }
1716
+ firstUpdated(t) {
1717
+ }
1718
+ };
1719
+ q.elementStyles = [], q.shadowRootOptions = { mode: "open" }, q[ot("elementProperties")] = /* @__PURE__ */ new Map(), q[ot("finalized")] = /* @__PURE__ */ new Map(), ee == null || ee({ ReactiveElement: q }), (U.reactiveElementVersions ?? (U.reactiveElementVersions = [])).push("2.0.1");
1720
+ /**
1721
+ * @license
1722
+ * Copyright 2017 Google LLC
1723
+ * SPDX-License-Identifier: BSD-3-Clause
1724
+ */
1725
+ const at = globalThis, Pt = at.trustedTypes, Xe = Pt ? Pt.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, Xn = "$lit$", L = `lit$${(Math.random() + "").slice(9)}$`, Jn = "?" + L, Mr = `<${Jn}>`, W = document, ct = () => W.createComment(""), ut = (n) => n === null || typeof n != "object" && typeof n != "function", Qn = Array.isArray, Ir = (n) => Qn(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", ne = `[
1726
+ \f\r]`, it = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Je = /-->/g, Qe = />/g, N = RegExp(`>|${ne}(?:([^\\s"'>=/]+)(${ne}*=${ne}*(?:[^
1727
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Ve = /'/g, tn = /"/g, Vn = /^(?:script|style|textarea|title)$/i, Ur = (n) => (t, ...e) => ({ _$litType$: n, strings: t, values: e }), v = Ur(1), j = Symbol.for("lit-noChange"), f = Symbol.for("lit-nothing"), en = /* @__PURE__ */ new WeakMap(), z = W.createTreeWalker(W, 129);
1728
+ function ts(n, t) {
1729
+ if (!Array.isArray(n) || !n.hasOwnProperty("raw"))
1730
+ throw Error("invalid template strings array");
1731
+ return Xe !== void 0 ? Xe.createHTML(t) : t;
1732
+ }
1733
+ const Rr = (n, t) => {
1734
+ const e = n.length - 1, s = [];
1735
+ let r, i = t === 2 ? "<svg>" : "", o = it;
1736
+ for (let a = 0; a < e; a++) {
1737
+ const l = n[a];
1738
+ let c, u, h = -1, d = 0;
1739
+ for (; d < l.length && (o.lastIndex = d, u = o.exec(l), u !== null); )
1740
+ d = o.lastIndex, o === it ? u[1] === "!--" ? o = Je : u[1] !== void 0 ? o = Qe : u[2] !== void 0 ? (Vn.test(u[2]) && (r = RegExp("</" + u[2], "g")), o = N) : u[3] !== void 0 && (o = N) : o === N ? u[0] === ">" ? (o = r ?? it, h = -1) : u[1] === void 0 ? h = -2 : (h = o.lastIndex - u[2].length, c = u[1], o = u[3] === void 0 ? N : u[3] === '"' ? tn : Ve) : o === tn || o === Ve ? o = N : o === Je || o === Qe ? o = it : (o = N, r = void 0);
1741
+ const p = o === N && n[a + 1].startsWith("/>") ? " " : "";
1742
+ i += o === it ? l + Mr : h >= 0 ? (s.push(c), l.slice(0, h) + Xn + l.slice(h) + L + p) : l + L + (h === -2 ? a : p);
1743
+ }
1744
+ return [ts(n, i + (n[e] || "<?>") + (t === 2 ? "</svg>" : "")), s];
1745
+ };
1746
+ class ht {
1747
+ constructor({ strings: t, _$litType$: e }, s) {
1748
+ let r;
1749
+ this.parts = [];
1750
+ let i = 0, o = 0;
1751
+ const a = t.length - 1, l = this.parts, [c, u] = Rr(t, e);
1752
+ if (this.el = ht.createElement(c, s), z.currentNode = this.el.content, e === 2) {
1753
+ const h = this.el.content.firstChild;
1754
+ h.replaceWith(...h.childNodes);
1755
+ }
1756
+ for (; (r = z.nextNode()) !== null && l.length < a; ) {
1757
+ if (r.nodeType === 1) {
1758
+ if (r.hasAttributes())
1759
+ for (const h of r.getAttributeNames())
1760
+ if (h.endsWith(Xn)) {
1761
+ const d = u[o++], p = r.getAttribute(h).split(L), $ = /([.?@])?(.*)/.exec(d);
1762
+ l.push({ type: 1, index: i, name: $[2], strings: p, ctor: $[1] === "." ? Hr : $[1] === "?" ? Dr : $[1] === "@" ? Nr : Gt }), r.removeAttribute(h);
1763
+ } else
1764
+ h.startsWith(L) && (l.push({ type: 6, index: i }), r.removeAttribute(h));
1765
+ if (Vn.test(r.tagName)) {
1766
+ const h = r.textContent.split(L), d = h.length - 1;
1767
+ if (d > 0) {
1768
+ r.textContent = Pt ? Pt.emptyScript : "";
1769
+ for (let p = 0; p < d; p++)
1770
+ r.append(h[p], ct()), z.nextNode(), l.push({ type: 2, index: ++i });
1771
+ r.append(h[d], ct());
1772
+ }
1773
+ }
1774
+ } else if (r.nodeType === 8)
1775
+ if (r.data === Jn)
1776
+ l.push({ type: 2, index: i });
1777
+ else {
1778
+ let h = -1;
1779
+ for (; (h = r.data.indexOf(L, h + 1)) !== -1; )
1780
+ l.push({ type: 7, index: i }), h += L.length - 1;
1781
+ }
1782
+ i++;
1783
+ }
1784
+ }
1785
+ static createElement(t, e) {
1786
+ const s = W.createElement("template");
1787
+ return s.innerHTML = t, s;
1788
+ }
1789
+ }
1790
+ function nt(n, t, e = n, s) {
1791
+ var o, a;
1792
+ if (t === j)
1793
+ return t;
1794
+ let r = s !== void 0 ? (o = e._$Co) == null ? void 0 : o[s] : e._$Cl;
1795
+ const i = ut(t) ? void 0 : t._$litDirective$;
1796
+ return (r == null ? void 0 : r.constructor) !== i && ((a = r == null ? void 0 : r._$AO) == null || a.call(r, !1), i === void 0 ? r = void 0 : (r = new i(n), r._$AT(n, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = r : e._$Cl = r), r !== void 0 && (t = nt(n, r._$AS(n, t.values), r, s)), t;
1797
+ }
1798
+ class jr {
1799
+ constructor(t, e) {
1800
+ this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
1801
+ }
1802
+ get parentNode() {
1803
+ return this._$AM.parentNode;
1804
+ }
1805
+ get _$AU() {
1806
+ return this._$AM._$AU;
1807
+ }
1808
+ u(t) {
1809
+ const { el: { content: e }, parts: s } = this._$AD, r = ((t == null ? void 0 : t.creationScope) ?? W).importNode(e, !0);
1810
+ z.currentNode = r;
1811
+ let i = z.nextNode(), o = 0, a = 0, l = s[0];
1812
+ for (; l !== void 0; ) {
1813
+ if (o === l.index) {
1814
+ let c;
1815
+ l.type === 2 ? c = new gt(i, i.nextSibling, this, t) : l.type === 1 ? c = new l.ctor(i, l.name, l.strings, this, t) : l.type === 6 && (c = new Br(i, this, t)), this._$AV.push(c), l = s[++a];
1816
+ }
1817
+ o !== (l == null ? void 0 : l.index) && (i = z.nextNode(), o++);
1818
+ }
1819
+ return z.currentNode = W, r;
1820
+ }
1821
+ p(t) {
1822
+ let e = 0;
1823
+ for (const s of this._$AV)
1824
+ s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
1825
+ }
1826
+ }
1827
+ class gt {
1828
+ get _$AU() {
1829
+ var t;
1830
+ return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
1831
+ }
1832
+ constructor(t, e, s, r) {
1833
+ this.type = 2, this._$AH = f, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = r, this._$Cv = (r == null ? void 0 : r.isConnected) ?? !0;
1834
+ }
1835
+ get parentNode() {
1836
+ let t = this._$AA.parentNode;
1837
+ const e = this._$AM;
1838
+ return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t;
1839
+ }
1840
+ get startNode() {
1841
+ return this._$AA;
1842
+ }
1843
+ get endNode() {
1844
+ return this._$AB;
1845
+ }
1846
+ _$AI(t, e = this) {
1847
+ t = nt(this, t, e), ut(t) ? t === f || t == null || t === "" ? (this._$AH !== f && this._$AR(), this._$AH = f) : t !== this._$AH && t !== j && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : Ir(t) ? this.T(t) : this._(t);
1848
+ }
1849
+ k(t) {
1850
+ return this._$AA.parentNode.insertBefore(t, this._$AB);
1851
+ }
1852
+ $(t) {
1853
+ this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
1854
+ }
1855
+ _(t) {
1856
+ this._$AH !== f && ut(this._$AH) ? this._$AA.nextSibling.data = t : this.$(W.createTextNode(t)), this._$AH = t;
1857
+ }
1858
+ g(t) {
1859
+ var i;
1860
+ const { values: e, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = ht.createElement(ts(s.h, s.h[0]), this.options)), s);
1861
+ if (((i = this._$AH) == null ? void 0 : i._$AD) === r)
1862
+ this._$AH.p(e);
1863
+ else {
1864
+ const o = new jr(r, this), a = o.u(this.options);
1865
+ o.p(e), this.$(a), this._$AH = o;
1866
+ }
1867
+ }
1868
+ _$AC(t) {
1869
+ let e = en.get(t.strings);
1870
+ return e === void 0 && en.set(t.strings, e = new ht(t)), e;
1871
+ }
1872
+ T(t) {
1873
+ Qn(this._$AH) || (this._$AH = [], this._$AR());
1874
+ const e = this._$AH;
1875
+ let s, r = 0;
1876
+ for (const i of t)
1877
+ r === e.length ? e.push(s = new gt(this.k(ct()), this.k(ct()), this, this.options)) : s = e[r], s._$AI(i), r++;
1878
+ r < e.length && (this._$AR(s && s._$AB.nextSibling, r), e.length = r);
1879
+ }
1880
+ _$AR(t = this._$AA.nextSibling, e) {
1881
+ var s;
1882
+ for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0, e); t && t !== this._$AB; ) {
1883
+ const r = t.nextSibling;
1884
+ t.remove(), t = r;
1885
+ }
1886
+ }
1887
+ setConnected(t) {
1888
+ var e;
1889
+ this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
1890
+ }
1891
+ }
1892
+ class Gt {
1893
+ get tagName() {
1894
+ return this.element.tagName;
1895
+ }
1896
+ get _$AU() {
1897
+ return this._$AM._$AU;
1898
+ }
1899
+ constructor(t, e, s, r, i) {
1900
+ this.type = 1, this._$AH = f, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = i, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = f;
1901
+ }
1902
+ _$AI(t, e = this, s, r) {
1903
+ const i = this.strings;
1904
+ let o = !1;
1905
+ if (i === void 0)
1906
+ t = nt(this, t, e, 0), o = !ut(t) || t !== this._$AH && t !== j, o && (this._$AH = t);
1907
+ else {
1908
+ const a = t;
1909
+ let l, c;
1910
+ for (t = i[0], l = 0; l < i.length - 1; l++)
1911
+ c = nt(this, a[s + l], e, l), c === j && (c = this._$AH[l]), o || (o = !ut(c) || c !== this._$AH[l]), c === f ? t = f : t !== f && (t += (c ?? "") + i[l + 1]), this._$AH[l] = c;
1912
+ }
1913
+ o && !r && this.O(t);
1914
+ }
1915
+ O(t) {
1916
+ t === f ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
1917
+ }
1918
+ }
1919
+ class Hr extends Gt {
1920
+ constructor() {
1921
+ super(...arguments), this.type = 3;
1922
+ }
1923
+ O(t) {
1924
+ this.element[this.name] = t === f ? void 0 : t;
1925
+ }
1926
+ }
1927
+ let Dr = class extends Gt {
1928
+ constructor() {
1929
+ super(...arguments), this.type = 4;
1930
+ }
1931
+ O(t) {
1932
+ this.element.toggleAttribute(this.name, !!t && t !== f);
1933
+ }
1934
+ };
1935
+ class Nr extends Gt {
1936
+ constructor(t, e, s, r, i) {
1937
+ super(t, e, s, r, i), this.type = 5;
1938
+ }
1939
+ _$AI(t, e = this) {
1940
+ if ((t = nt(this, t, e, 0) ?? f) === j)
1941
+ return;
1942
+ const s = this._$AH, r = t === f && s !== f || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, i = t !== f && (s === f || r);
1943
+ r && this.element.removeEventListener(this.name, this, s), i && this.element.addEventListener(this.name, this, t), this._$AH = t;
1944
+ }
1945
+ handleEvent(t) {
1946
+ var e;
1947
+ typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
1948
+ }
1949
+ }
1950
+ class Br {
1951
+ constructor(t, e, s) {
1952
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
1953
+ }
1954
+ get _$AU() {
1955
+ return this._$AM._$AU;
1956
+ }
1957
+ _$AI(t) {
1958
+ nt(this, t);
1959
+ }
1960
+ }
1961
+ const se = at.litHtmlPolyfillSupport;
1962
+ se == null || se(ht, gt), (at.litHtmlVersions ?? (at.litHtmlVersions = [])).push("3.0.2");
1963
+ const zr = (n, t, e) => {
1964
+ const s = (e == null ? void 0 : e.renderBefore) ?? t;
1965
+ let r = s._$litPart$;
1966
+ if (r === void 0) {
1967
+ const i = (e == null ? void 0 : e.renderBefore) ?? null;
1968
+ s._$litPart$ = r = new gt(t.insertBefore(ct(), i), i, void 0, e ?? {});
1969
+ }
1970
+ return r._$AI(n), r;
1971
+ };
1972
+ /**
1973
+ * @license
1974
+ * Copyright 2017 Google LLC
1975
+ * SPDX-License-Identifier: BSD-3-Clause
1976
+ */
1977
+ let b = class extends q {
1978
+ constructor() {
1979
+ super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
1980
+ }
1981
+ createRenderRoot() {
1982
+ var e;
1983
+ const t = super.createRenderRoot();
1984
+ return (e = this.renderOptions).renderBefore ?? (e.renderBefore = t.firstChild), t;
1985
+ }
1986
+ update(t) {
1987
+ const e = this.render();
1988
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = zr(e, this.renderRoot, this.renderOptions);
1989
+ }
1990
+ connectedCallback() {
1991
+ var t;
1992
+ super.connectedCallback(), (t = this._$Do) == null || t.setConnected(!0);
1993
+ }
1994
+ disconnectedCallback() {
1995
+ var t;
1996
+ super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
1997
+ }
1998
+ render() {
1999
+ return j;
2000
+ }
2001
+ };
2002
+ var Cn;
2003
+ b._$litElement$ = !0, b.finalized = !0, (Cn = globalThis.litElementHydrateSupport) == null || Cn.call(globalThis, { LitElement: b });
2004
+ const re = globalThis.litElementPolyfillSupport;
2005
+ re == null || re({ LitElement: b });
2006
+ (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.1");
2007
+ const Fr = { name: "alert", svg: '<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M32 60C47.464 60 60 47.464 60 32C60 16.536 47.464 4 32 4C16.536 4 4 16.536 4 32C4.01731 47.4568 16.5432 59.9827 32 60ZM32 8.30769C45.0849 8.30769 55.6923 18.9151 55.6923 32C55.6923 45.0849 45.0849 55.6923 32 55.6923C18.9151 55.6923 8.30769 45.0849 8.30769 32C8.32247 18.9212 18.9212 8.32247 32 8.30769Z"/><path d="M29.3491 38.6031V20.6807C29.348 19.8662 29.4903 19.0598 29.7675 18.3096C29.9945 17.6371 30.3484 17.0302 30.804 16.5322C31.1251 16.1524 31.5593 15.9246 32.0204 15.894C32.6852 15.894 33.3496 16.471 34.0134 17.625C34.3738 18.1337 34.5955 18.7525 34.6509 19.4042V37.3267C34.6509 37.9947 34.2454 38.6329 33.4345 39.2414C32.6632 39.835 31.7547 40.1521 30.825 40.1523C29.8423 40.1524 29.3503 39.636 29.3491 38.6031Z"/><path d="M33.66 44.6959C33.9649 45.0866 34.161 45.551 34.2284 46.0419C34.2284 46.5397 33.8893 47.0083 33.2109 47.4476C32.5638 47.8771 31.8043 48.1062 31.0275 48.1061C30.1902 48.1061 29.7716 47.7271 29.7716 46.9693C29.7703 46.3788 29.8874 45.7941 30.116 45.2496C30.3064 44.7579 30.6022 44.3138 30.9826 43.9487C31.2626 43.6591 31.6427 43.4875 32.045 43.4692C32.5635 43.4692 33.1019 43.8781 33.66 44.6959Z"/></svg>' }, Wr = { name: "check-circle-filled", svg: '<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M32 4C16.536 4 4 16.536 4 32C4 47.464 16.536 60 32 60C47.464 60 60 47.464 60 32C59.9829 16.5431 47.4569 4.01712 32 4ZM44.5613 24.5793L31.6382 43.9639C31.2806 44.5011 30.7008 44.8493 30.0586 44.9126C29.988 44.9197 29.9171 44.9232 29.8462 44.9231C29.275 44.9229 28.7272 44.696 28.3233 44.2921L19.7079 35.6767C19.1639 35.1326 18.9514 34.3396 19.1505 33.5964C19.3497 32.8533 19.9302 32.2728 20.6734 32.0736C21.4166 31.8745 22.2095 32.087 22.7536 32.631L29.5117 39.3881L40.9772 22.1899C41.4016 21.5439 42.1396 21.1749 42.9111 21.2229C43.6825 21.2709 44.3691 21.7286 44.7101 22.4223C45.0511 23.1159 44.9944 23.9391 44.5613 24.5793Z"/></svg>' }, Zr = { name: "check-circle", svg: '<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M31.9998 4C16.5358 4 3.99976 16.536 3.99976 32C3.99976 47.464 16.5358 60 31.9998 60C47.4637 60 59.9998 47.464 59.9998 32C59.9826 16.5431 47.4566 4.01712 31.9998 4ZM31.9998 55.6923C18.9149 55.6923 8.30745 45.0849 8.30745 32C8.30745 18.9151 18.9149 8.30769 31.9998 8.30769C45.0847 8.30769 55.6921 18.9151 55.6921 32C55.6773 45.0788 45.0785 55.6775 31.9998 55.6923ZM44.5611 24.5793L31.638 43.9639C31.2804 44.5011 30.7005 44.8493 30.0584 44.9126C29.9878 44.9197 29.9169 44.9232 29.8459 44.9231C29.2747 44.9229 28.727 44.696 28.3231 44.2921L19.7077 35.6767C19.1636 35.1326 18.9512 34.3396 19.1503 33.5964C19.3494 32.8533 19.9299 32.2728 20.6731 32.0736C21.4163 31.8745 22.2093 32.087 22.7534 32.631L29.5115 39.3881L40.9769 22.1899C41.4013 21.5439 42.1394 21.1749 42.9108 21.2229C43.6823 21.2709 44.3688 21.7286 44.7099 22.4223C45.0509 23.1159 44.9941 23.9391 44.5611 24.5793Z"/></svg>' }, nn = { name: "mute", svg: '<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M51.4283 11.6761L53.1768 9.53891C53.9347 8.61282 53.7982 7.24774 52.8722 6.48993C51.9461 5.73211 50.581 5.86852 49.8232 6.79461L36.3333 23.2822V13.3972C36.3332 11.6447 35.2774 10.0648 33.6583 9.39418C32.0391 8.72356 30.1755 9.09425 28.9362 10.3334L18.1029 21.1668H14.6667C9.88247 21.1722 6.00547 25.0492 6 29.8334V34.1668C6.00547 38.951 9.88247 42.828 14.6667 42.8334H18.1029L19.3315 44.0621L10.8232 54.4613C10.0653 55.3874 10.2018 56.7525 11.1279 57.5103C12.0539 58.2681 13.419 58.1317 14.1768 57.2056L22.411 47.1416L28.9362 53.6668C30.1755 54.9059 32.0391 55.2766 33.6583 54.606C35.2774 53.9354 36.3332 52.3555 36.3333 50.603V30.1254L42.6092 22.4549C44.2201 25.3756 45.044 28.6649 45 32.0001C45.1184 36.1899 43.7698 40.2896 41.1872 43.5909C40.409 44.5001 40.5152 45.8679 41.4243 46.6461C42.3334 47.4243 43.7012 47.3183 44.4795 46.4093C47.7313 42.3208 49.4486 37.2227 49.3333 32.0001C49.403 27.3538 48.067 22.7949 45.5005 18.9211L48.6119 15.1182C52.019 20.0793 53.7867 25.9829 53.6667 32.0001C53.6667 39.0587 51.4873 45.6518 47.6872 50.0909C46.909 51.0001 47.0152 52.3679 47.9243 53.1461C48.8334 53.9243 50.2012 53.8183 50.9795 52.9093C55.4408 47.6968 58 40.0764 58 32.0001C58 24.21 55.6006 16.8662 51.4283 11.6761ZM19.8971 38.5H14.6667C12.2744 38.4977 10.3357 36.559 10.3333 34.1667V29.8334C10.3357 27.4411 12.2744 25.5024 14.6667 25.5H19.8971L32 13.3972V28.5784L22.089 40.6919L19.8971 38.5ZM31.9997 50.603L25.1682 43.7715L31.9997 35.4218V50.603Z"/></svg>' }, Gr = { name: "question", svg: '<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M32 4C16.536 4 4 16.536 4 32C4 47.464 16.536 60 32 60C47.464 60 60 47.464 60 32C59.9827 16.5432 47.4568 4.01731 32 4ZM32 55.6923C18.9151 55.6923 8.30769 45.0849 8.30769 32C8.30769 18.9151 18.9151 8.30769 32 8.30769C45.0849 8.30769 55.6923 18.9151 55.6923 32C55.6775 45.0788 45.0788 55.6775 32 55.6923Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M31.9423 37.5723L36.311 32.9068L36.7354 32.4448C39.7555 29.1161 40.7645 27.0647 40.7645 24.5087C40.7645 23.1091 40.4251 21.7942 39.7041 20.6491C38.3044 18.3587 35.6323 16.9166 32.2816 16.9166C28.7565 16.9166 25.3125 18.7414 23.2581 21.6772L23.1201 21.8791C22.8232 22.3032 22.696 22.6849 22.696 22.9818C22.696 23.7029 23.926 25.9932 25.2833 25.9932C25.5378 25.9932 25.7922 25.9084 26.0467 25.7388C26.2588 25.5691 26.5981 25.2298 27.0647 24.7208C28.8885 22.6849 30.1185 21.9215 31.7726 21.9215C33.6813 21.9215 35.081 23.1939 35.081 24.8905C35.081 26.375 34.2751 27.7746 32.3664 29.8529L28.2523 34.2216C27.9554 34.6033 27.7857 34.9426 27.7857 35.282C27.7857 35.6213 27.9978 36.1726 28.4219 36.8937C29.0581 37.8692 29.7368 38.3782 30.4578 38.3782C30.9244 38.3782 31.3909 38.1237 31.9423 37.5723ZM30.882 47.4972C29.2278 47.4972 27.6585 44.7403 27.6585 43.6799C27.6585 42.1954 30.0761 40.6261 32.4089 40.6261C33.6389 40.6261 34.2751 41.1775 34.2751 42.3227C34.2751 44.0616 33.4692 45.843 32.4513 46.7761C31.9423 47.2427 31.4334 47.4972 30.882 47.4972Z"/></svg>' }, qr = { 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>' }, sn = { name: "volume", svg: '<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M33.6578 9.3322C32.0391 8.65799 30.1735 9.02919 28.9362 10.2717L18.1029 21.105H14.6667C9.88247 21.1105 6.00547 24.9875 6 29.7717V34.105C6.00547 38.8892 9.88247 42.7662 14.6667 42.7717H18.1029L28.9362 53.605C30.1755 54.8442 32.0391 55.2149 33.6583 54.5442C35.2774 53.8736 36.3332 52.2937 36.3333 50.5412V13.3355C36.3365 11.5817 35.2794 10.0001 33.6578 9.3322ZM32 50.5411L19.8971 38.4382H14.6667C12.2744 38.4358 10.3357 36.4971 10.3333 34.1049V29.7716C10.3357 27.3793 12.2744 25.4406 14.6667 25.4382H19.8971L32 13.3353V50.5411ZM49.3334 31.9383C49.4487 37.161 47.7314 42.2591 44.4796 46.3475C43.7013 47.2565 42.3335 47.3625 41.4244 46.5843C40.5153 45.8061 40.4092 44.4383 41.1873 43.5291C43.7699 40.2278 45.1185 36.1282 45.0001 31.9383C45.1185 27.7485 43.7699 23.6488 41.1873 20.3475C40.4092 19.4383 40.5153 18.0705 41.4244 17.2923C42.3335 16.5141 43.7013 16.6201 44.4796 17.5291C47.7314 21.6176 49.4487 26.7157 49.3334 31.9383ZM58.0001 31.9383C58.0001 40.0147 55.441 47.635 50.9796 52.8475C50.2013 53.7565 48.8335 53.8625 47.9244 53.0843C47.0153 52.3061 46.9092 50.9383 47.6873 50.0291C51.4874 45.59 53.6668 38.9969 53.6668 31.9383C53.6668 24.8797 51.4874 18.2866 47.6873 13.8475C46.9092 12.9383 47.0153 11.5705 47.9244 10.7923C48.8335 10.0141 50.2013 10.1201 50.9796 11.0291C55.441 16.2416 58.0001 23.862 58.0001 31.9383Z"/></svg>' }, Y = {
2008
+ allRenderFn: !1,
2009
+ cmpDidLoad: !0,
2010
+ cmpDidUnload: !1,
2011
+ cmpDidUpdate: !0,
2012
+ cmpDidRender: !0,
2013
+ cmpWillLoad: !0,
2014
+ cmpWillUpdate: !0,
2015
+ cmpWillRender: !0,
2016
+ connectedCallback: !0,
2017
+ disconnectedCallback: !0,
2018
+ element: !0,
2019
+ event: !0,
2020
+ hasRenderFn: !0,
2021
+ lifecycle: !0,
2022
+ hostListener: !0,
2023
+ hostListenerTargetWindow: !0,
2024
+ hostListenerTargetDocument: !0,
2025
+ hostListenerTargetBody: !0,
2026
+ hostListenerTargetParent: !1,
2027
+ hostListenerTarget: !0,
2028
+ member: !0,
2029
+ method: !0,
2030
+ mode: !0,
2031
+ observeAttribute: !0,
2032
+ prop: !0,
2033
+ propMutable: !0,
2034
+ reflect: !0,
2035
+ scoped: !0,
2036
+ shadowDom: !0,
2037
+ slot: !0,
2038
+ cssAnnotations: !0,
2039
+ state: !0,
2040
+ style: !0,
2041
+ svg: !0,
2042
+ updatable: !0,
2043
+ vdomAttribute: !0,
2044
+ vdomXlink: !0,
2045
+ vdomClass: !0,
2046
+ vdomFunctional: !0,
2047
+ vdomKey: !0,
2048
+ vdomListener: !0,
2049
+ vdomRef: !0,
2050
+ vdomPropOrAttr: !0,
2051
+ vdomRender: !0,
2052
+ vdomStyle: !0,
2053
+ vdomText: !0,
2054
+ watchCallback: !0,
2055
+ taskQueue: !0,
2056
+ hotModuleReplacement: !1,
2057
+ isDebug: !1,
2058
+ isDev: !1,
2059
+ isTesting: !1,
2060
+ hydrateServerSide: !1,
2061
+ hydrateClientSide: !1,
2062
+ lifecycleDOMEvents: !1,
2063
+ lazyLoad: !1,
2064
+ profile: !1,
2065
+ slotRelocation: !0,
2066
+ appendChildSlotFix: !1,
2067
+ cloneNodeFix: !1,
2068
+ hydratedAttribute: !1,
2069
+ hydratedClass: !0,
2070
+ safari10: !1,
2071
+ scriptDataOpts: !1,
2072
+ scopedSlotTextContentFix: !1,
2073
+ shadowDomShim: !1,
2074
+ slotChildNodesFix: !1,
2075
+ invisiblePrehydration: !0,
2076
+ propBoolean: !0,
2077
+ propNumber: !0,
2078
+ propString: !0,
2079
+ cssVarShim: !1,
2080
+ constructableCSS: !0,
2081
+ cmpShouldUpdate: !0,
2082
+ devTools: !1,
2083
+ dynamicImportShim: !1,
2084
+ shadowDelegatesFocus: !0,
2085
+ initializeNextTick: !1,
2086
+ asyncLoading: !1,
2087
+ asyncQueue: !1,
2088
+ transformTagName: !1,
2089
+ attachStyles: !0
2090
+ };
2091
+ let K, es, qt, ns = !1, Lt = !1, ke = !1, x = !1, rn = null, fe = !1;
2092
+ const Yt = typeof window < "u" ? window : {}, O = Yt.document || { head: {} }, ss = Yt.HTMLElement || class {
2093
+ }, w = {
2094
+ $flags$: 0,
2095
+ $resourcesUrl$: "",
2096
+ jmp: (n) => n(),
2097
+ raf: (n) => requestAnimationFrame(n),
2098
+ ael: (n, t, e, s) => n.addEventListener(t, e, s),
2099
+ rel: (n, t, e, s) => n.removeEventListener(t, e, s),
2100
+ ce: (n, t) => new CustomEvent(n, t)
2101
+ }, Yr = /* @__PURE__ */ (() => {
2102
+ let n = !1;
2103
+ try {
2104
+ O.addEventListener("e", null, Object.defineProperty({}, "passive", {
2105
+ get() {
2106
+ n = !0;
2107
+ }
2108
+ }));
2109
+ } catch {
2110
+ }
2111
+ return n;
2112
+ })(), Kr = (n) => Promise.resolve(n), Xr = /* @__PURE__ */ (() => {
2113
+ try {
2114
+ return new CSSStyleSheet(), typeof new CSSStyleSheet().replace == "function";
2115
+ } catch {
2116
+ }
2117
+ return !1;
2118
+ })(), rs = (n, t, e, s) => {
2119
+ e && e.map(([r, i, o]) => {
2120
+ const a = Qr(n, r), l = Jr(t, o), c = Vr(r);
2121
+ w.ael(a, i, l, c), (t.$rmListeners$ = t.$rmListeners$ || []).push(() => w.rel(a, i, l, c));
2122
+ });
2123
+ }, Jr = (n, t) => (e) => {
2124
+ try {
2125
+ Y.lazyLoad || n.$hostElement$[t](e);
2126
+ } catch (s) {
2127
+ mt(s);
2128
+ }
2129
+ }, Qr = (n, t) => t & 4 ? O : t & 8 ? Yt : t & 16 ? O.body : n, Vr = (n) => Yr ? {
2130
+ passive: (n & 1) !== 0,
2131
+ capture: (n & 2) !== 0
2132
+ } : (n & 2) !== 0, on = "http://www.w3.org/1999/xlink", Z = (n, t = "") => () => {
2133
+ }, an = /* @__PURE__ */ new WeakMap(), ti = (n, t, e) => {
2134
+ let s = Ut.get(n);
2135
+ Xr && e ? (s = s || new CSSStyleSheet(), s.replace(t)) : s = t, Ut.set(n, s);
2136
+ }, ei = (n, t, e, s) => {
2137
+ let r = is(t, e), i = Ut.get(r);
2138
+ if (n = n.nodeType === 11 ? n : O, i)
2139
+ if (typeof i == "string") {
2140
+ n = n.head || n;
2141
+ let o = an.get(n), a;
2142
+ o || an.set(n, o = /* @__PURE__ */ new Set()), o.has(r) || (a = O.createElement("style"), a.innerHTML = i, n.insertBefore(a, n.querySelector("link")), o && o.add(r));
2143
+ } else
2144
+ n.adoptedStyleSheets.includes(i) || (n.adoptedStyleSheets = [...n.adoptedStyleSheets, i]);
2145
+ return r;
2146
+ }, ni = (n) => {
2147
+ const t = n.$cmpMeta$, e = n.$hostElement$, s = t.$flags$, r = Z("attachStyles", t.$tagName$), i = ei(e.shadowRoot ? e.shadowRoot : e.getRootNode(), t, n.$modeName$);
2148
+ s & 10 && (e["s-sc"] = i, e.classList.add(i + "-h"), s & 2 && e.classList.add(i + "-s")), r();
2149
+ }, is = (n, t) => "sc-" + (t && n.$flags$ & 32 ? n.$tagName$ + "-" + t : n.$tagName$), si = (n) => Pi.map((t) => t(n)).find((t) => !!t), ln = {}, ri = "http://www.w3.org/2000/svg", ii = "http://www.w3.org/1999/xhtml", oi = (n) => n != null, Te = (n) => (n = typeof n, n === "object" || n === "function"), V = (n, t, ...e) => {
2150
+ let s = null, r = null, i = null, o = !1, a = !1, l = [];
2151
+ const c = (h) => {
2152
+ for (let d = 0; d < h.length; d++)
2153
+ s = h[d], Array.isArray(s) ? c(s) : s != null && typeof s != "boolean" && ((o = typeof n != "function" && !Te(s)) && (s = String(s)), o && a ? l[l.length - 1].$text$ += s : l.push(o ? Mt(null, s) : s), a = o);
2154
+ };
2155
+ if (c(e), t) {
2156
+ t.key && (r = t.key), t.name && (i = t.name);
2157
+ {
2158
+ const h = t.className || t.class;
2159
+ h && (t.class = typeof h != "object" ? h : Object.keys(h).filter((d) => h[d]).join(" "));
2160
+ }
2161
+ }
2162
+ if (typeof n == "function")
2163
+ return n(t === null ? {} : t, l, li);
2164
+ const u = Mt(n, null);
2165
+ return u.$attrs$ = t, l.length > 0 && (u.$children$ = l), u.$key$ = r, u.$name$ = i, u;
2166
+ }, Mt = (n, t) => {
2167
+ const e = {
2168
+ $flags$: 0,
2169
+ $tag$: n,
2170
+ $text$: t,
2171
+ $elm$: null,
2172
+ $children$: null
2173
+ };
2174
+ return e.$attrs$ = null, e.$key$ = null, e.$name$ = null, e;
2175
+ }, Pe = {}, ai = (n) => n && n.$tag$ === Pe, li = {
2176
+ forEach: (n, t) => n.map(cn).forEach(t),
2177
+ map: (n, t) => n.map(cn).map(t).map(ci)
2178
+ }, cn = (n) => ({
2179
+ vattrs: n.$attrs$,
2180
+ vchildren: n.$children$,
2181
+ vkey: n.$key$,
2182
+ vname: n.$name$,
2183
+ vtag: n.$tag$,
2184
+ vtext: n.$text$
2185
+ }), ci = (n) => {
2186
+ if (typeof n.vtag == "function") {
2187
+ const e = Object.assign({}, n.vattrs);
2188
+ return n.vkey && (e.key = n.vkey), n.vname && (e.name = n.vname), V(n.vtag, e, ...n.vchildren || []);
2189
+ }
2190
+ const t = Mt(n.vtag, n.vtext);
2191
+ return t.$attrs$ = n.vattrs, t.$children$ = n.vchildren, t.$key$ = n.vkey, t.$name$ = n.vname, t;
2192
+ }, un = (n, t, e, s, r, i) => {
2193
+ if (e !== s) {
2194
+ let o = fn(n, t), a = t.toLowerCase();
2195
+ if (t === "class") {
2196
+ const l = n.classList, c = hn(e), u = hn(s);
2197
+ l.remove(...c.filter((h) => h && !u.includes(h))), l.add(...u.filter((h) => h && !c.includes(h)));
2198
+ } else if (t === "style") {
2199
+ for (const l in e)
2200
+ (!s || s[l] == null) && (l.includes("-") ? n.style.removeProperty(l) : n.style[l] = "");
2201
+ for (const l in s)
2202
+ (!e || s[l] !== e[l]) && (l.includes("-") ? n.style.setProperty(l, s[l]) : n.style[l] = s[l]);
2203
+ } else if (t !== "key")
2204
+ if (t === "ref")
2205
+ s && s(n);
2206
+ else if (!n.__lookupSetter__(t) && t[0] === "o" && t[1] === "n")
2207
+ t[2] === "-" ? t = t.slice(3) : fn(Yt, a) ? t = a.slice(2) : t = a[2] + t.slice(3), e && w.rel(n, t, e, !1), s && w.ael(n, t, s, !1);
2208
+ else {
2209
+ const l = Te(s);
2210
+ if ((o || l && s !== null) && !r)
2211
+ try {
2212
+ if (n.tagName.includes("-"))
2213
+ n[t] = s;
2214
+ else {
2215
+ let u = s ?? "";
2216
+ t === "list" ? o = !1 : (e == null || n[t] != u) && (n[t] = u);
2217
+ }
2218
+ } catch {
2219
+ }
2220
+ let c = !1;
2221
+ a !== (a = a.replace(/^xlink\:?/, "")) && (t = a, c = !0), s == null || s === !1 ? (s !== !1 || n.getAttribute(t) === "") && (c ? n.removeAttributeNS(on, t) : n.removeAttribute(t)) : (!o || i & 4 || r) && !l && (s = s === !0 ? "" : s, c ? n.setAttributeNS(on, t, s) : n.setAttribute(t, s));
2222
+ }
2223
+ }
2224
+ }, ui = /\s/, hn = (n) => n ? n.split(ui) : [], os = (n, t, e, s) => {
2225
+ const r = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, i = n && n.$attrs$ || ln, o = t.$attrs$ || ln;
2226
+ for (s in i)
2227
+ s in o || un(r, s, i[s], void 0, e, t.$flags$);
2228
+ for (s in o)
2229
+ un(r, s, i[s], o[s], e, t.$flags$);
2230
+ }, It = (n, t, e, s) => {
2231
+ let r = t.$children$[e], i = 0, o, a, l;
2232
+ if (ns || (ke = !0, r.$tag$ === "slot" && (K && s.classList.add(K + "-s"), r.$flags$ |= r.$children$ ? (
2233
+ // slot element has fallback content
2234
+ 2
2235
+ ) : (
2236
+ // slot element does not have fallback content
2237
+ 1
2238
+ ))), r.$text$ !== null)
2239
+ o = r.$elm$ = O.createTextNode(r.$text$);
2240
+ else if (r.$flags$ & 1)
2241
+ o = r.$elm$ = O.createTextNode("");
2242
+ else {
2243
+ if (x || (x = r.$tag$ === "svg"), o = r.$elm$ = O.createElementNS(x ? ri : ii, r.$flags$ & 2 ? "slot-fb" : r.$tag$), x && r.$tag$ === "foreignObject" && (x = !1), os(null, r, x), oi(K) && o["s-si"] !== K && o.classList.add(o["s-si"] = K), r.$children$)
2244
+ for (i = 0; i < r.$children$.length; ++i)
2245
+ a = It(n, r, i, o), a && o.appendChild(a);
2246
+ r.$tag$ === "svg" ? x = !1 : o.tagName === "foreignObject" && (x = !0);
2247
+ }
2248
+ return o["s-hn"] = qt, r.$flags$ & 3 && (o["s-sr"] = !0, o["s-cr"] = es, o["s-sn"] = r.$name$ || "", l = n && n.$children$ && n.$children$[e], l && l.$tag$ === r.$tag$ && n.$elm$ && dt(n.$elm$, !1)), o;
2249
+ }, dt = (n, t) => {
2250
+ w.$flags$ |= 1;
2251
+ const e = n.childNodes;
2252
+ for (let s = e.length - 1; s >= 0; s--) {
2253
+ const r = e[s];
2254
+ r["s-hn"] !== qt && r["s-ol"] && (cs(r).insertBefore(r, Le(r)), r["s-ol"].remove(), r["s-ol"] = void 0, ke = !0), t && dt(r, t);
2255
+ }
2256
+ w.$flags$ &= -2;
2257
+ }, as = (n, t, e, s, r, i) => {
2258
+ let o = n["s-cr"] && n["s-cr"].parentNode || n, a;
2259
+ for (o.shadowRoot && o.tagName === qt && (o = o.shadowRoot); r <= i; ++r)
2260
+ s[r] && (a = It(null, e, r, n), a && (s[r].$elm$ = a, o.insertBefore(a, Le(t))));
2261
+ }, ls = (n, t, e, s, r) => {
2262
+ for (; t <= e; ++t)
2263
+ (s = n[t]) && (r = s.$elm$, ds(s), Lt = !0, r["s-ol"] ? r["s-ol"].remove() : dt(r, !0), r.remove());
2264
+ }, hi = (n, t, e, s) => {
2265
+ let r = 0, i = 0, o = 0, a = 0, l = t.length - 1, c = t[0], u = t[l], h = s.length - 1, d = s[0], p = s[h], $, m;
2266
+ for (; r <= l && i <= h; )
2267
+ if (c == null)
2268
+ c = t[++r];
2269
+ else if (u == null)
2270
+ u = t[--l];
2271
+ else if (d == null)
2272
+ d = s[++i];
2273
+ else if (p == null)
2274
+ p = s[--h];
2275
+ else if (St(c, d))
2276
+ X(c, d), c = t[++r], d = s[++i];
2277
+ else if (St(u, p))
2278
+ X(u, p), u = t[--l], p = s[--h];
2279
+ else if (St(c, p))
2280
+ (c.$tag$ === "slot" || p.$tag$ === "slot") && dt(c.$elm$.parentNode, !1), X(c, p), n.insertBefore(c.$elm$, u.$elm$.nextSibling), c = t[++r], p = s[--h];
2281
+ else if (St(u, d))
2282
+ (c.$tag$ === "slot" || p.$tag$ === "slot") && dt(u.$elm$.parentNode, !1), X(u, d), n.insertBefore(u.$elm$, c.$elm$), u = t[--l], d = s[++i];
2283
+ else {
2284
+ for (o = -1, a = r; a <= l; ++a)
2285
+ if (t[a] && t[a].$key$ !== null && t[a].$key$ === d.$key$) {
2286
+ o = a;
2287
+ break;
2288
+ }
2289
+ o >= 0 ? (m = t[o], m.$tag$ !== d.$tag$ ? $ = It(t && t[i], e, o, n) : (X(m, d), t[o] = void 0, $ = m.$elm$), d = s[++i]) : ($ = It(t && t[i], e, i, n), d = s[++i]), $ && cs(c.$elm$).insertBefore($, Le(c.$elm$));
2290
+ }
2291
+ r > l ? as(n, s[h + 1] == null ? null : s[h + 1].$elm$, e, s, i, h) : i > h && ls(t, r, l);
2292
+ }, St = (n, t) => n.$tag$ === t.$tag$ ? n.$tag$ === "slot" ? n.$name$ === t.$name$ : n.$key$ === t.$key$ : !1, Le = (n) => n && n["s-ol"] || n, cs = (n) => (n["s-ol"] ? n["s-ol"] : n).parentNode, X = (n, t) => {
2293
+ const e = t.$elm$ = n.$elm$, s = n.$children$, r = t.$children$, i = t.$tag$, o = t.$text$;
2294
+ let a;
2295
+ o === null ? (x = i === "svg" ? !0 : i === "foreignObject" ? !1 : x, i === "slot" || os(n, t, x), s !== null && r !== null ? hi(e, s, t, r) : r !== null ? (n.$text$ !== null && (e.textContent = ""), as(e, null, t, r, 0, r.length - 1)) : s !== null && ls(s, 0, s.length - 1), x && i === "svg" && (x = !1)) : (a = e["s-cr"]) ? a.parentNode.textContent = o : n.$text$ !== o && (e.data = o);
2296
+ }, us = (n) => {
2297
+ let t = n.childNodes, e, s, r, i, o, a;
2298
+ for (s = 0, r = t.length; s < r; s++)
2299
+ if (e = t[s], e.nodeType === 1) {
2300
+ if (e["s-sr"]) {
2301
+ for (o = e["s-sn"], e.hidden = !1, i = 0; i < r; i++)
2302
+ if (a = t[i].nodeType, t[i]["s-hn"] !== e["s-hn"] || o !== "") {
2303
+ if (a === 1 && o === t[i].getAttribute("slot")) {
2304
+ e.hidden = !0;
2305
+ break;
2306
+ }
2307
+ } else if (a === 1 || a === 3 && t[i].textContent.trim() !== "") {
2308
+ e.hidden = !0;
2309
+ break;
2310
+ }
2311
+ }
2312
+ us(e);
2313
+ }
2314
+ }, A = [], hs = (n) => {
2315
+ let t, e, s, r, i, o, a = 0, l = n.childNodes, c = l.length;
2316
+ for (; a < c; a++) {
2317
+ if (t = l[a], t["s-sr"] && (e = t["s-cr"]) && e.parentNode)
2318
+ for (s = e.parentNode.childNodes, r = t["s-sn"], o = s.length - 1; o >= 0; o--)
2319
+ e = s[o], !e["s-cn"] && !e["s-nr"] && e["s-hn"] !== t["s-hn"] && (dn(e, r) ? (i = A.find((u) => u.$nodeToRelocate$ === e), Lt = !0, e["s-sn"] = e["s-sn"] || r, i ? i.$slotRefNode$ = t : A.push({
2320
+ $slotRefNode$: t,
2321
+ $nodeToRelocate$: e
2322
+ }), e["s-sr"] && A.map((u) => {
2323
+ dn(u.$nodeToRelocate$, e["s-sn"]) && (i = A.find((h) => h.$nodeToRelocate$ === e), i && !u.$slotRefNode$ && (u.$slotRefNode$ = i.$slotRefNode$));
2324
+ })) : A.some((u) => u.$nodeToRelocate$ === e) || A.push({
2325
+ $nodeToRelocate$: e
2326
+ }));
2327
+ t.nodeType === 1 && hs(t);
2328
+ }
2329
+ }, dn = (n, t) => n.nodeType === 1 ? n.getAttribute("slot") === null && t === "" || n.getAttribute("slot") === t : n["s-sn"] === t ? !0 : t === "", ds = (n) => {
2330
+ n.$attrs$ && n.$attrs$.ref && n.$attrs$.ref(null), n.$children$ && n.$children$.map(ds);
2331
+ }, di = (n, t) => {
2332
+ const e = n.$hostElement$, s = n.$cmpMeta$, r = n.$vnode$ || Mt(null, null), i = ai(t) ? t : V(null, null, t);
2333
+ qt = e.tagName, s.$attrsToReflect$ && (i.$attrs$ = i.$attrs$ || {}, s.$attrsToReflect$.map(([o, a]) => i.$attrs$[a] = e[o])), i.$tag$ = null, i.$flags$ |= 4, n.$vnode$ = i, i.$elm$ = r.$elm$ = e.shadowRoot || e, K = e["s-sc"], es = e["s-cr"], ns = (s.$flags$ & 1) !== 0, Lt = !1, X(r, i);
2334
+ {
2335
+ if (w.$flags$ |= 1, ke) {
2336
+ hs(i.$elm$);
2337
+ let o, a, l, c, u, h, d = 0;
2338
+ for (; d < A.length; d++)
2339
+ o = A[d], a = o.$nodeToRelocate$, a["s-ol"] || (l = O.createTextNode(""), l["s-nr"] = a, a.parentNode.insertBefore(a["s-ol"] = l, a));
2340
+ for (d = 0; d < A.length; d++)
2341
+ if (o = A[d], a = o.$nodeToRelocate$, o.$slotRefNode$) {
2342
+ for (c = o.$slotRefNode$.parentNode, u = o.$slotRefNode$.nextSibling, l = a["s-ol"]; l = l.previousSibling; )
2343
+ if (h = l["s-nr"], h && h["s-sn"] === a["s-sn"] && c === h.parentNode && (h = h.nextSibling, !h || !h["s-nr"])) {
2344
+ u = h;
2345
+ break;
2346
+ }
2347
+ (!u && c !== a.parentNode || a.nextSibling !== u) && a !== u && (!a["s-hn"] && a["s-ol"] && (a["s-hn"] = a["s-ol"].parentNode.nodeName), c.insertBefore(a, u));
2348
+ } else
2349
+ a.nodeType === 1 && (a.hidden = !0);
2350
+ }
2351
+ Lt && us(i.$elm$), w.$flags$ &= -2, A.length = 0;
2352
+ }
2353
+ }, pi = (n) => n, fi = (n, t, e) => {
2354
+ const s = pi(n);
2355
+ return {
2356
+ emit: (r) => vi(s, t, {
2357
+ bubbles: !!(e & 4),
2358
+ composed: !!(e & 2),
2359
+ cancelable: !!(e & 1),
2360
+ detail: r
2361
+ })
2362
+ };
2363
+ }, vi = (n, t, e) => {
2364
+ const s = w.ce(t, e);
2365
+ return n.dispatchEvent(s), s;
2366
+ }, gi = (n, t) => {
2367
+ }, ps = (n, t) => (n.$flags$ |= 16, gi(n, n.$ancestorComponent$), Ii(() => mi(n, t))), mi = (n, t) => {
2368
+ const e = n.$hostElement$, s = Z("scheduleUpdate", n.$cmpMeta$.$tagName$), r = e;
2369
+ let i;
2370
+ return t ? i = tt(r, "componentWillLoad") : i = tt(r, "componentWillUpdate"), i = pn(i, () => tt(r, "componentWillRender")), s(), pn(i, () => $i(n, r, t));
2371
+ }, $i = async (n, t, e) => {
2372
+ const s = n.$hostElement$, r = Z("update", n.$cmpMeta$.$tagName$);
2373
+ s["s-rc"], e && ni(n);
2374
+ const i = Z("render", n.$cmpMeta$.$tagName$);
2375
+ yi(n, t, s), i(), r(), bi(n);
2376
+ }, yi = (n, t, e) => {
2377
+ try {
2378
+ rn = t, t = t.render && t.render(), n.$flags$ &= -17, n.$flags$ |= 2, (Y.hasRenderFn || Y.reflect) && (Y.vdomRender || Y.reflect) && (Y.hydrateServerSide || di(n, t));
2379
+ } catch (a) {
2380
+ mt(a, n.$hostElement$);
2381
+ }
2382
+ return rn = null, null;
2383
+ }, bi = (n) => {
2384
+ const t = n.$cmpMeta$.$tagName$, e = n.$hostElement$, s = Z("postUpdate", t), r = e;
2385
+ n.$ancestorComponent$, tt(r, "componentDidRender"), n.$flags$ & 64 ? (tt(r, "componentDidUpdate"), s()) : (n.$flags$ |= 64, tt(r, "componentDidLoad"), s());
2386
+ }, tt = (n, t, e) => {
2387
+ if (n && n[t])
2388
+ try {
2389
+ return n[t](e);
2390
+ } catch (s) {
2391
+ mt(s);
2392
+ }
2393
+ }, pn = (n, t) => n && n.then ? n.then(t) : t(), wi = (n, t) => n != null && !Te(n) ? t & 4 ? n === "false" ? !1 : n === "" || !!n : t & 2 ? parseFloat(n) : t & 1 ? String(n) : n : n, _i = (n, t) => Kt(n).$instanceValues$.get(t), Si = (n, t, e, s) => {
2394
+ const r = Kt(n), i = n, o = r.$instanceValues$.get(t), a = r.$flags$, l = i;
2395
+ e = wi(e, s.$members$[t][0]);
2396
+ const c = Number.isNaN(o) && Number.isNaN(e);
2397
+ if (e !== o && !c) {
2398
+ r.$instanceValues$.set(t, e);
2399
+ {
2400
+ if (s.$watchers$ && a & 128) {
2401
+ const h = s.$watchers$[t];
2402
+ h && h.map((d) => {
2403
+ try {
2404
+ l[d](e, o, t);
2405
+ } catch (p) {
2406
+ mt(p, i);
2407
+ }
2408
+ });
2409
+ }
2410
+ if ((a & 18) === 2) {
2411
+ if (l.componentShouldUpdate && l.componentShouldUpdate(e, o, t) === !1)
2412
+ return;
2413
+ ps(r, !1);
2414
+ }
2415
+ }
2416
+ }
2417
+ }, xi = (n, t, e) => {
2418
+ if (t.$members$) {
2419
+ n.watchers && (t.$watchers$ = n.watchers);
2420
+ const s = Object.entries(t.$members$), r = n.prototype;
2421
+ s.map(([i, [o]]) => {
2422
+ (o & 31 || o & 32) && Object.defineProperty(r, i, {
2423
+ get() {
2424
+ return _i(this, i);
2425
+ },
2426
+ set(a) {
2427
+ Si(this, i, a, t);
2428
+ },
2429
+ configurable: !0,
2430
+ enumerable: !0
2431
+ });
2432
+ });
2433
+ {
2434
+ const i = /* @__PURE__ */ new Map();
2435
+ r.attributeChangedCallback = function(o, a, l) {
2436
+ w.jmp(() => {
2437
+ const c = i.get(o);
2438
+ if (this.hasOwnProperty(c))
2439
+ l = this[c], delete this[c];
2440
+ else if (r.hasOwnProperty(c) && typeof this[c] == "number" && this[c] == l)
2441
+ return;
2442
+ this[c] = l === null && typeof this[c] == "boolean" ? !1 : l;
2443
+ });
2444
+ }, n.observedAttributes = s.filter(
2445
+ ([o, a]) => a[0] & 15
2446
+ /* HasAttribute */
2447
+ ).map(([o, a]) => {
2448
+ const l = a[1] || o;
2449
+ return i.set(l, o), a[0] & 512 && t.$attrsToReflect$.push([o, l]), l;
2450
+ });
2451
+ }
2452
+ }
2453
+ return n;
2454
+ }, Ci = async (n, t, e, s, r) => {
2455
+ if (!(t.$flags$ & 32) && (r = n.constructor, t.$flags$ |= 32, customElements.whenDefined(e.$tagName$).then(() => t.$flags$ |= 128), r.style)) {
2456
+ let o = r.style;
2457
+ typeof o != "string" && (o = o[t.$modeName$ = si(n)]);
2458
+ const a = is(e, t.$modeName$);
2459
+ if (!Ut.has(a)) {
2460
+ const l = Z("registerStyles", e.$tagName$);
2461
+ ti(a, o, !!(e.$flags$ & 1)), l();
2462
+ }
2463
+ }
2464
+ t.$ancestorComponent$, (() => ps(t, !0))();
2465
+ }, Ai = (n) => {
2466
+ }, Ei = (n) => {
2467
+ if (!(w.$flags$ & 1)) {
2468
+ const t = Kt(n), e = t.$cmpMeta$, s = Z("connectedCallback", e.$tagName$);
2469
+ t.$flags$ & 1 ? (rs(n, t, e.$listeners$), Ai(t.$lazyInstance$)) : (t.$flags$ |= 1, e.$flags$ & 12 && Oi(n), e.$members$ && Object.entries(e.$members$).map(([r, [i]]) => {
2470
+ if (i & 31 && n.hasOwnProperty(r)) {
2471
+ const o = n[r];
2472
+ delete n[r], n[r] = o;
2473
+ }
2474
+ }), Ci(n, t, e)), s();
2475
+ }
2476
+ }, Oi = (n) => {
2477
+ const t = n["s-cr"] = O.createComment("");
2478
+ t["s-cn"] = !0, n.insertBefore(t, n.firstChild);
2479
+ }, ki = (n) => {
2480
+ if (!(w.$flags$ & 1)) {
2481
+ const t = Kt(n);
2482
+ t.$rmListeners$ && (t.$rmListeners$.map((e) => e()), t.$rmListeners$ = void 0);
2483
+ }
2484
+ }, fs = (n, t) => {
2485
+ const e = {
2486
+ $flags$: t[0],
2487
+ $tagName$: t[1]
2488
+ };
2489
+ e.$members$ = t[2], e.$listeners$ = t[3], e.$watchers$ = n.$watchers$, e.$attrsToReflect$ = [];
2490
+ const s = n.prototype.connectedCallback, r = n.prototype.disconnectedCallback;
2491
+ return Object.assign(n.prototype, {
2492
+ __registerHost() {
2493
+ Ti(this, e);
2494
+ },
2495
+ connectedCallback() {
2496
+ Ei(this), s && s.call(this);
2497
+ },
2498
+ disconnectedCallback() {
2499
+ ki(this), r && r.call(this);
2500
+ },
2501
+ __attachShadow() {
2502
+ this.attachShadow({
2503
+ mode: "open",
2504
+ delegatesFocus: !!(e.$flags$ & 16)
2505
+ });
2506
+ }
2507
+ }), n.is = e.$tagName$, xi(n, e);
2508
+ }, vs = /* @__PURE__ */ new WeakMap(), Kt = (n) => vs.get(n), Ti = (n, t) => {
2509
+ const e = {
2510
+ $flags$: 0,
2511
+ $hostElement$: n,
2512
+ $cmpMeta$: t,
2513
+ $instanceValues$: /* @__PURE__ */ new Map()
2514
+ };
2515
+ return rs(n, e, t.$listeners$), vs.set(n, e);
2516
+ }, fn = (n, t) => t in n, mt = (n, t) => (0, console.error)(n, t), Ut = /* @__PURE__ */ new Map(), Pi = [], vn = [], gs = [], Li = (n, t) => (e) => {
2517
+ n.push(e), fe || (fe = !0, t && w.$flags$ & 4 ? Mi(ve) : w.raf(ve));
2518
+ }, gn = (n) => {
2519
+ for (let t = 0; t < n.length; t++)
2520
+ try {
2521
+ n[t](performance.now());
2522
+ } catch (e) {
2523
+ mt(e);
2524
+ }
2525
+ n.length = 0;
2526
+ }, ve = () => {
2527
+ gn(vn), gn(gs), (fe = vn.length > 0) && w.raf(ve);
2528
+ }, Mi = (n) => Kr().then(n), Ii = /* @__PURE__ */ Li(gs, !0), Ui = (n = {}) => {
2529
+ const { content: t = "", title: e, attributes: s = [] } = n;
2530
+ let r = "", i = [
2531
+ { name: "xmlns", value: "http://www.w3.org/2000/svg" },
2532
+ { name: "fill", value: "currentColor" },
2533
+ ...s
2534
+ ];
2535
+ return e && (r = `<title>${e}</title>`), `<svg ${i.map((a) => `${a.name}="${a.value}"`).join(" ")}>${r}${t}</svg>`;
2536
+ }, Ri = (n) => n.replace(/<(\/?)svg([^>]*)>/g, "").trim();
2537
+ function ji(n) {
2538
+ return `${n.getFullYear()}.${n.getMonth() + 1}`;
2539
+ }
2540
+ class Hi {
2541
+ constructor(t) {
2542
+ this.voca_component = t, this.voca_added = ji(/* @__PURE__ */ new Date());
2543
+ }
2544
+ }
2545
+ const Di = "telia-vst{display:none}", Ni = /* @__PURE__ */ fs(class extends ss {
2546
+ constructor() {
2547
+ super(), this.__registerHost(), this.vocaInternalUStats = fi(this, "vocaInternalUStats", 7);
2548
+ }
2549
+ connectedCallback() {
2550
+ this.vocaInternalUStats.emit(new Hi(this.dataTrackingId));
2551
+ }
2552
+ render() {
2553
+ return V(Pe, null);
2554
+ }
2555
+ static get style() {
2556
+ return Di;
2557
+ }
2558
+ }, [0, "telia-vst", {
2559
+ dataTrackingId: [1, "data-tracking-id"]
2560
+ }]);
2561
+ function ms() {
2562
+ if (typeof customElements > "u")
2563
+ return;
2564
+ ["telia-vst"].forEach((t) => {
2565
+ switch (t) {
2566
+ case "telia-vst":
2567
+ customElements.get(t) || customElements.define(t, Ni);
2568
+ break;
2569
+ }
2570
+ });
2571
+ }
2572
+ ms();
2573
+ function ge() {
2574
+ return typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : { vocadsIcons: void 0, vocadsIconsRegistered: !1 };
2575
+ }
2576
+ function Bi() {
2577
+ if (typeof ge().vocadsIcons !== void 0)
2578
+ return ge().vocadsIcons;
2579
+ }
2580
+ function zi() {
2581
+ return ge().vocadsIconsRegistered;
2582
+ }
2583
+ const Fi = ".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))}", Wi = /* @__PURE__ */ fs(class extends ss {
2584
+ constructor() {
2585
+ super(), this.__registerHost(), this.size = "md", this.allyTitle = null, this.dataTrackingId = "telia-icon";
2586
+ }
2587
+ /**
2588
+ * Returns svg string from svg property or svg string from icons bundle if icons bundle is registered
2589
+ * @private
2590
+ * @returns string
2591
+ */
2592
+ getSvgString() {
2593
+ if (this.svg)
2594
+ return this.svg;
2595
+ if (zi() && this.name) {
2596
+ const n = Bi();
2597
+ return n[this.name] ? n[this.name].svg : "";
2598
+ }
2599
+ 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"), "";
2600
+ }
2601
+ render() {
2602
+ let n = this.getSvgString(), t = [{ name: "viewBox", value: "0 0 64 64" }];
2603
+ this.allyTitle ? t = [...t, { name: "role", value: "img" }] : t = [
2604
+ ...t,
2605
+ { name: "aria-hidden", value: "true" }
2606
+ ];
2607
+ const e = Ui({
2608
+ content: Ri(n),
2609
+ attributes: t,
2610
+ title: this.allyTitle
2611
+ });
2612
+ return V(Pe, { class: `telia-icon telia-icon--${this.size}` }, V("span", { "aria-label": this.allyTitle, class: "telia-icon__container", innerHTML: e }), V("telia-vst", { dataTrackingId: this.dataTrackingId }));
2613
+ }
2614
+ static get style() {
2615
+ return Fi;
2616
+ }
2617
+ }, [0, "telia-icon", {
2618
+ name: [1],
2619
+ svg: [1],
2620
+ size: [1],
2621
+ allyTitle: [1, "ally-title"],
2622
+ dataTestid: [1, "data-testid"]
2623
+ }]);
2624
+ function Zi() {
2625
+ if (typeof customElements > "u")
2626
+ return;
2627
+ ["telia-icon", "telia-vst"].forEach((t) => {
2628
+ switch (t) {
2629
+ case "telia-icon":
2630
+ customElements.get(t) || customElements.define(t, Wi);
2631
+ break;
2632
+ case "telia-vst":
2633
+ customElements.get(t) || ms();
2634
+ break;
2635
+ }
2636
+ });
2637
+ }
2638
+ Zi();
2639
+ /**
2640
+ * @license
2641
+ * Copyright 2017 Google LLC
2642
+ * SPDX-License-Identifier: BSD-3-Clause
2643
+ */
2644
+ const $t = (n) => (t, e) => {
2645
+ e !== void 0 ? e.addInitializer(() => {
2646
+ customElements.define(n, t);
2647
+ }) : customElements.define(n, t);
2648
+ };
2649
+ /**
2650
+ * @license
2651
+ * Copyright 2017 Google LLC
2652
+ * SPDX-License-Identifier: BSD-3-Clause
2653
+ */
2654
+ const Gi = { attribute: !0, type: String, converter: Tt, reflect: !1, hasChanged: Oe }, qi = (n = Gi, t, e) => {
2655
+ const { kind: s, metadata: r } = e;
2656
+ let i = globalThis.litPropertyMetadata.get(r);
2657
+ if (i === void 0 && globalThis.litPropertyMetadata.set(r, i = /* @__PURE__ */ new Map()), i.set(e.name, n), s === "accessor") {
2658
+ const { name: o } = e;
2659
+ return { set(a) {
2660
+ const l = t.get.call(this);
2661
+ t.set.call(this, a), this.requestUpdate(o, l, n);
2662
+ }, init(a) {
2663
+ return a !== void 0 && this.C(o, void 0, n), a;
2664
+ } };
2665
+ }
2666
+ if (s === "setter") {
2667
+ const { name: o } = e;
2668
+ return function(a) {
2669
+ const l = this[o];
2670
+ t.call(this, a), this.requestUpdate(o, l, n);
2671
+ };
2672
+ }
2673
+ throw Error("Unsupported decorator location: " + s);
2674
+ };
2675
+ function y(n) {
2676
+ return (t, e) => typeof e == "object" ? qi(n, t, e) : ((s, r, i) => {
2677
+ const o = r.hasOwnProperty(i);
2678
+ return r.constructor.createProperty(i, o ? { ...s, wrapped: !0 } : s), o ? Object.getOwnPropertyDescriptor(r, i) : void 0;
2679
+ })(n, t, e);
2680
+ }
2681
+ /**
2682
+ * @license
2683
+ * Copyright 2017 Google LLC
2684
+ * SPDX-License-Identifier: BSD-3-Clause
2685
+ */
2686
+ function T(n) {
2687
+ return y({ ...n, state: !0, attribute: !1 });
2688
+ }
2689
+ /**
2690
+ * @license
2691
+ * Copyright 2020 Google LLC
2692
+ * SPDX-License-Identifier: BSD-3-Clause
2693
+ */
2694
+ const Yi = (n) => n.strings === void 0;
2695
+ /**
2696
+ * @license
2697
+ * Copyright 2017 Google LLC
2698
+ * SPDX-License-Identifier: BSD-3-Clause
2699
+ */
2700
+ const Xt = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Jt = (n) => (...t) => ({ _$litDirective$: n, values: t });
2701
+ let Me = class {
2702
+ constructor(t) {
2703
+ }
2704
+ get _$AU() {
2705
+ return this._$AM._$AU;
2706
+ }
2707
+ _$AT(t, e, s) {
2708
+ this._$Ct = t, this._$AM = e, this._$Ci = s;
2709
+ }
2710
+ _$AS(t, e) {
2711
+ return this.update(t, e);
2712
+ }
2713
+ update(t, e) {
2714
+ return this.render(...e);
2715
+ }
2716
+ };
2717
+ /**
2718
+ * @license
2719
+ * Copyright 2017 Google LLC
2720
+ * SPDX-License-Identifier: BSD-3-Clause
2721
+ */
2722
+ const lt = (n, t) => {
2723
+ var s;
2724
+ const e = n._$AN;
2725
+ if (e === void 0)
2726
+ return !1;
2727
+ for (const r of e)
2728
+ (s = r._$AO) == null || s.call(r, t, !1), lt(r, t);
2729
+ return !0;
2730
+ }, Rt = (n) => {
2731
+ let t, e;
2732
+ do {
2733
+ if ((t = n._$AM) === void 0)
2734
+ break;
2735
+ e = t._$AN, e.delete(n), n = t;
2736
+ } while ((e == null ? void 0 : e.size) === 0);
2737
+ }, $s = (n) => {
2738
+ for (let t; t = n._$AM; n = t) {
2739
+ let e = t._$AN;
2740
+ if (e === void 0)
2741
+ t._$AN = e = /* @__PURE__ */ new Set();
2742
+ else if (e.has(n))
2743
+ break;
2744
+ e.add(n), Ji(t);
2745
+ }
2746
+ };
2747
+ function Ki(n) {
2748
+ this._$AN !== void 0 ? (Rt(this), this._$AM = n, $s(this)) : this._$AM = n;
2749
+ }
2750
+ function Xi(n, t = !1, e = 0) {
2751
+ const s = this._$AH, r = this._$AN;
2752
+ if (r !== void 0 && r.size !== 0)
2753
+ if (t)
2754
+ if (Array.isArray(s))
2755
+ for (let i = e; i < s.length; i++)
2756
+ lt(s[i], !1), Rt(s[i]);
2757
+ else
2758
+ s != null && (lt(s, !1), Rt(s));
2759
+ else
2760
+ lt(this, n);
2761
+ }
2762
+ const Ji = (n) => {
2763
+ n.type == Xt.CHILD && (n._$AP ?? (n._$AP = Xi), n._$AQ ?? (n._$AQ = Ki));
2764
+ };
2765
+ let ys = class extends Me {
2766
+ constructor() {
2767
+ super(...arguments), this._$AN = void 0;
2768
+ }
2769
+ _$AT(t, e, s) {
2770
+ super._$AT(t, e, s), $s(this), this.isConnected = t._$AU;
2771
+ }
2772
+ _$AO(t, e = !0) {
2773
+ var s, r;
2774
+ t !== this.isConnected && (this.isConnected = t, t ? (s = this.reconnected) == null || s.call(this) : (r = this.disconnected) == null || r.call(this)), e && (lt(this, t), Rt(this));
2775
+ }
2776
+ setValue(t) {
2777
+ if (Yi(this._$Ct))
2778
+ this._$Ct._$AI(t, this);
2779
+ else {
2780
+ const e = [...this._$Ct._$AH];
2781
+ e[this._$Ci] = t, this._$Ct._$AI(e, this, 0);
2782
+ }
2783
+ }
2784
+ disconnected() {
2785
+ }
2786
+ reconnected() {
2787
+ }
2788
+ };
2789
+ /**
2790
+ * @license
2791
+ * Copyright 2020 Google LLC
2792
+ * SPDX-License-Identifier: BSD-3-Clause
2793
+ */
2794
+ const jt = () => new Qi();
2795
+ class Qi {
2796
+ }
2797
+ const ie = /* @__PURE__ */ new WeakMap(), Ht = Jt(class extends ys {
2798
+ render(n) {
2799
+ return f;
2800
+ }
2801
+ update(n, [t]) {
2802
+ var s;
2803
+ const e = t !== this.G;
2804
+ return e && this.G !== void 0 && this.ot(void 0), (e || this.rt !== this.lt) && (this.G = t, this.ct = (s = n.options) == null ? void 0 : s.host, this.ot(this.lt = n.element)), f;
2805
+ }
2806
+ ot(n) {
2807
+ if (typeof this.G == "function") {
2808
+ const t = this.ct ?? globalThis;
2809
+ let e = ie.get(t);
2810
+ e === void 0 && (e = /* @__PURE__ */ new WeakMap(), ie.set(t, e)), e.get(this.G) !== void 0 && this.G.call(this.ct, void 0), e.set(this.G, n), n !== void 0 && this.G.call(this.ct, n);
2811
+ } else
2812
+ this.G.value = n;
2813
+ }
2814
+ get rt() {
2815
+ var n, t;
2816
+ return typeof this.G == "function" ? (n = ie.get(this.ct ?? globalThis)) == null ? void 0 : n.get(this.G) : (t = this.G) == null ? void 0 : t.value;
2817
+ }
2818
+ disconnected() {
2819
+ this.rt === this.lt && this.ot(void 0);
2820
+ }
2821
+ reconnected() {
2822
+ this.ot(this.lt);
2823
+ }
2824
+ });
2825
+ /**
2826
+ * @license
2827
+ * Copyright 2018 Google LLC
2828
+ * SPDX-License-Identifier: BSD-3-Clause
2829
+ */
2830
+ const Dt = Jt(class extends Me {
2831
+ constructor(n) {
2832
+ var t;
2833
+ if (super(n), n.type !== Xt.ATTRIBUTE || n.name !== "class" || ((t = n.strings) == null ? void 0 : t.length) > 2)
2834
+ throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
2835
+ }
2836
+ render(n) {
2837
+ return " " + Object.keys(n).filter((t) => n[t]).join(" ") + " ";
2838
+ }
2839
+ update(n, [t]) {
2840
+ var s, r;
2841
+ if (this.it === void 0) {
2842
+ this.it = /* @__PURE__ */ new Set(), n.strings !== void 0 && (this.st = new Set(n.strings.join(" ").split(/\s/).filter((i) => i !== "")));
2843
+ for (const i in t)
2844
+ t[i] && !((s = this.st) != null && s.has(i)) && this.it.add(i);
2845
+ return this.render(t);
2846
+ }
2847
+ const e = n.element.classList;
2848
+ for (const i of this.it)
2849
+ i in t || (e.remove(i), this.it.delete(i));
2850
+ for (const i in t) {
2851
+ const o = !!t[i];
2852
+ o === this.it.has(i) || (r = this.st) != null && r.has(i) || (o ? (e.add(i), this.it.add(i)) : (e.remove(i), this.it.delete(i)));
2853
+ }
2854
+ return j;
2855
+ }
2856
+ });
2857
+ var Vi = Object.defineProperty, to = Object.getOwnPropertyDescriptor, eo = (n, t, e, s) => {
2858
+ for (var r = s > 1 ? void 0 : s ? to(t, e) : t, i = n.length - 1, o; i >= 0; i--)
2859
+ (o = n[i]) && (r = (s ? o(t, e, r) : o(r)) || r);
2860
+ return s && r && Vi(t, e, r), r;
2861
+ };
2862
+ class Ie extends b {
2863
+ constructor() {
2864
+ super(...arguments), this.anchor = "BottomRight";
2865
+ }
2866
+ appendChild(t) {
2867
+ var e;
2868
+ return (e = this.shadowRoot) == null || e.appendChild(t), t;
2869
+ }
2870
+ render() {
2871
+ return this.anchor === "BottomLeft" ? this.renderRoot.host.classList.add("bottom-left") : this.anchor === "BottomRight" && this.renderRoot.host.classList.add("bottom-right"), f;
2872
+ }
2873
+ }
2874
+ Ie.styles = [
2875
+ C`
2876
+ :host {
2877
+ position: fixed;
2878
+ display: flex;
2879
+ align-items: center;
2880
+ gap: 1rem;
2881
+ }
2882
+
2883
+ :host(.bottom-right) {
2884
+ bottom: 20px;
2885
+ right: 20px;
2886
+ }
2887
+ :host(.bottom-left) {
2888
+ bottom: 20px;
2889
+ left: 20px;
2890
+ }
2891
+ `
2892
+ ];
2893
+ eo([
2894
+ y({ attribute: !0 })
2895
+ ], Ie.prototype, "anchor", 2);
2896
+ const no = /* @__PURE__ */ new WeakMap();
2897
+ let mn = 0;
2898
+ const oe = /* @__PURE__ */ new Map(), $n = /* @__PURE__ */ new WeakSet(), yn = () => new Promise((n) => requestAnimationFrame(n)), so = [{ transform: "translateX(100%) scale(0)", opacity: 0 }], ro = [{ opacity: 0 }], bn = [{ opacity: 0 }, { opacity: 1 }], wn = (n, t) => {
2899
+ const e = n - t;
2900
+ return e === 0 ? void 0 : e;
2901
+ }, _n = (n, t) => {
2902
+ const e = n / t;
2903
+ return e === 1 ? void 0 : e;
2904
+ }, ae = { left: (n, t) => {
2905
+ const e = wn(n, t);
2906
+ return { value: e, transform: e == null || isNaN(e) ? void 0 : `translateX(${e}px)` };
2907
+ }, top: (n, t) => {
2908
+ const e = wn(n, t);
2909
+ return { value: e, transform: e == null || isNaN(e) ? void 0 : `translateY(${e}px)` };
2910
+ }, width: (n, t) => {
2911
+ let e;
2912
+ t === 0 && (t = 1, e = { width: "1px" });
2913
+ const s = _n(n, t);
2914
+ return { value: s, overrideFrom: e, transform: s == null || isNaN(s) ? void 0 : `scaleX(${s})` };
2915
+ }, height: (n, t) => {
2916
+ let e;
2917
+ t === 0 && (t = 1, e = { height: "1px" });
2918
+ const s = _n(n, t);
2919
+ return { value: s, overrideFrom: e, transform: s == null || isNaN(s) ? void 0 : `scaleY(${s})` };
2920
+ } }, io = { duration: 333, easing: "ease-in-out" }, oo = ["left", "top", "width", "height", "opacity", "color", "background"], Sn = /* @__PURE__ */ new WeakMap();
2921
+ class ao extends ys {
2922
+ constructor(t) {
2923
+ if (super(t), this.t = null, this.i = null, this.o = !0, this.shouldLog = !1, t.type === Xt.CHILD)
2924
+ throw Error("The `animate` directive must be used in attribute position.");
2925
+ this.createFinished();
2926
+ }
2927
+ createFinished() {
2928
+ var t;
2929
+ (t = this.resolveFinished) == null || t.call(this), this.finished = new Promise((e) => {
2930
+ this.h = e;
2931
+ });
2932
+ }
2933
+ async resolveFinished() {
2934
+ var t;
2935
+ (t = this.h) == null || t.call(this), this.h = void 0;
2936
+ }
2937
+ render(t) {
2938
+ return f;
2939
+ }
2940
+ getController() {
2941
+ return no.get(this.l);
2942
+ }
2943
+ isDisabled() {
2944
+ var t;
2945
+ return this.options.disabled || ((t = this.getController()) == null ? void 0 : t.disabled);
2946
+ }
2947
+ update(t, [e]) {
2948
+ var r;
2949
+ const s = this.l === void 0;
2950
+ return s && (this.l = (r = t.options) == null ? void 0 : r.host, this.l.addController(this), this.element = t.element, Sn.set(this.element, this)), this.optionsOrCallback = e, (s || typeof e != "function") && this.u(e), this.render(e);
2951
+ }
2952
+ u(t) {
2953
+ t = t ?? {};
2954
+ const e = this.getController();
2955
+ e !== void 0 && ((t = { ...e.defaultOptions, ...t }).keyframeOptions = { ...e.defaultOptions.keyframeOptions, ...t.keyframeOptions }), t.properties ?? (t.properties = oo), this.options = t;
2956
+ }
2957
+ p() {
2958
+ const t = {}, e = this.element.getBoundingClientRect(), s = getComputedStyle(this.element);
2959
+ return this.options.properties.forEach((r) => {
2960
+ const i = e[r] ?? (ae[r] ? void 0 : s[r]), o = Number(i);
2961
+ t[r] = isNaN(o) ? i + "" : o;
2962
+ }), t;
2963
+ }
2964
+ m() {
2965
+ let t, e = !0;
2966
+ return this.options.guard && (t = this.options.guard(), e = ((s, r) => {
2967
+ if (Array.isArray(s)) {
2968
+ if (Array.isArray(r) && r.length === s.length && s.every((i, o) => i === r[o]))
2969
+ return !1;
2970
+ } else if (r === s)
2971
+ return !1;
2972
+ return !0;
2973
+ })(t, this.v)), this.o = this.l.hasUpdated && !this.isDisabled() && !this.isAnimating() && e && this.element.isConnected, this.o && (this.v = Array.isArray(t) ? Array.from(t) : t), this.o;
2974
+ }
2975
+ hostUpdate() {
2976
+ typeof this.optionsOrCallback == "function" && this.u(this.optionsOrCallback()), this.m() && (this.g = this.p(), this.t = this.t ?? this.element.parentNode, this.i = this.element.nextSibling);
2977
+ }
2978
+ async hostUpdated() {
2979
+ if (!this.o || !this.element.isConnected || this.options.skipInitial && !this.isHostRendered)
2980
+ return;
2981
+ let t;
2982
+ this.prepare(), await yn;
2983
+ const e = this._(), s = this.A(this.options.keyframeOptions, e), r = this.p();
2984
+ if (this.g !== void 0) {
2985
+ const { from: i, to: o } = this.O(this.g, r, e);
2986
+ this.log("measured", [this.g, r, i, o]), t = this.calculateKeyframes(i, o);
2987
+ } else {
2988
+ const i = oe.get(this.options.inId);
2989
+ if (i) {
2990
+ oe.delete(this.options.inId);
2991
+ const { from: o, to: a } = this.O(i, r, e);
2992
+ t = this.calculateKeyframes(o, a), t = this.options.in ? [{ ...this.options.in[0], ...t[0] }, ...this.options.in.slice(1), t[1]] : t, mn++, t.forEach((l) => l.zIndex = mn);
2993
+ } else
2994
+ this.options.in && (t = [...this.options.in, {}]);
2995
+ }
2996
+ this.animate(t, s);
2997
+ }
2998
+ resetStyles() {
2999
+ this.j !== void 0 && (this.element.setAttribute("style", this.j ?? ""), this.j = void 0);
3000
+ }
3001
+ commitStyles() {
3002
+ var t, e;
3003
+ this.j = this.element.getAttribute("style"), (t = this.webAnimation) == null || t.commitStyles(), (e = this.webAnimation) == null || e.cancel();
3004
+ }
3005
+ reconnected() {
3006
+ }
3007
+ async disconnected() {
3008
+ var e;
3009
+ if (!this.o || (this.options.id !== void 0 && oe.set(this.options.id, this.g), this.options.out === void 0))
3010
+ return;
3011
+ if (this.prepare(), await yn(), (e = this.t) == null ? void 0 : e.isConnected) {
3012
+ const s = this.i && this.i.parentNode === this.t ? this.i : null;
3013
+ if (this.t.insertBefore(this.element, s), this.options.stabilizeOut) {
3014
+ const r = this.p();
3015
+ this.log("stabilizing out");
3016
+ const i = this.g.left - r.left, o = this.g.top - r.top;
3017
+ getComputedStyle(this.element).position !== "static" || i === 0 && o === 0 || (this.element.style.position = "relative"), i !== 0 && (this.element.style.left = i + "px"), o !== 0 && (this.element.style.top = o + "px");
3018
+ }
3019
+ }
3020
+ const t = this.A(this.options.keyframeOptions);
3021
+ await this.animate(this.options.out, t), this.element.remove();
3022
+ }
3023
+ prepare() {
3024
+ this.createFinished();
3025
+ }
3026
+ start() {
3027
+ var t, e;
3028
+ (e = (t = this.options).onStart) == null || e.call(t, this);
3029
+ }
3030
+ didFinish(t) {
3031
+ var e, s;
3032
+ t && ((s = (e = this.options).onComplete) == null || s.call(e, this)), this.g = void 0, this.animatingProperties = void 0, this.frames = void 0, this.resolveFinished();
3033
+ }
3034
+ _() {
3035
+ const t = [];
3036
+ for (let e = this.element.parentNode; e; e = e == null ? void 0 : e.parentNode) {
3037
+ const s = Sn.get(e);
3038
+ s && !s.isDisabled() && s && t.push(s);
3039
+ }
3040
+ return t;
3041
+ }
3042
+ get isHostRendered() {
3043
+ const t = $n.has(this.l);
3044
+ return t || this.l.updateComplete.then(() => {
3045
+ $n.add(this.l);
3046
+ }), t;
3047
+ }
3048
+ A(t, e = this._()) {
3049
+ const s = { ...io };
3050
+ return e.forEach((r) => Object.assign(s, r.options.keyframeOptions)), Object.assign(s, t), s;
3051
+ }
3052
+ O(t, e, s) {
3053
+ t = { ...t }, e = { ...e };
3054
+ const r = s.map((a) => a.animatingProperties).filter((a) => a !== void 0);
3055
+ let i = 1, o = 1;
3056
+ return r !== void 0 && (r.forEach((a) => {
3057
+ a.width && (i /= a.width), a.height && (o /= a.height);
3058
+ }), t.left !== void 0 && e.left !== void 0 && (t.left = i * t.left, e.left = i * e.left), t.top !== void 0 && e.top !== void 0 && (t.top = o * t.top, e.top = o * e.top)), { from: t, to: e };
3059
+ }
3060
+ calculateKeyframes(t, e, s = !1) {
3061
+ const r = {}, i = {};
3062
+ let o = !1;
3063
+ const a = {};
3064
+ for (const l in e) {
3065
+ const c = t[l], u = e[l];
3066
+ if (l in ae) {
3067
+ const h = ae[l];
3068
+ if (c === void 0 || u === void 0)
3069
+ continue;
3070
+ const d = h(c, u);
3071
+ d.transform !== void 0 && (a[l] = d.value, o = !0, r.transform = `${r.transform ?? ""} ${d.transform}`, d.overrideFrom !== void 0 && Object.assign(r, d.overrideFrom));
3072
+ } else
3073
+ c !== u && c !== void 0 && u !== void 0 && (o = !0, r[l] = c, i[l] = u);
3074
+ }
3075
+ return r.transformOrigin = i.transformOrigin = s ? "center center" : "top left", this.animatingProperties = a, o ? [r, i] : void 0;
3076
+ }
3077
+ async animate(t, e = this.options.keyframeOptions) {
3078
+ this.start(), this.frames = t;
3079
+ let s = !1;
3080
+ if (!this.isAnimating() && !this.isDisabled() && (this.options.onFrames && (this.frames = t = this.options.onFrames(this), this.log("modified frames", t)), t !== void 0)) {
3081
+ this.log("animate", [t, e]), s = !0, this.webAnimation = this.element.animate(t, e);
3082
+ const r = this.getController();
3083
+ r == null || r.add(this);
3084
+ try {
3085
+ await this.webAnimation.finished;
3086
+ } catch {
3087
+ }
3088
+ r == null || r.remove(this);
3089
+ }
3090
+ return this.didFinish(s), s;
3091
+ }
3092
+ isAnimating() {
3093
+ var t, e;
3094
+ return ((t = this.webAnimation) == null ? void 0 : t.playState) === "running" || ((e = this.webAnimation) == null ? void 0 : e.pending);
3095
+ }
3096
+ log(t, e) {
3097
+ this.shouldLog && !this.isDisabled() && console.log(t, this.options.id, e);
3098
+ }
3099
+ }
3100
+ const me = Jt(ao), xt = (n, t, e) => {
3101
+ n && e.style.setProperty(t, n);
3102
+ }, bs = (n, t) => {
3103
+ var e, s, r, i;
3104
+ xt((e = n.colors) == null ? void 0 : e.primaryBackground, "--primary-background", t), xt(
3105
+ (s = n.colors) == null ? void 0 : s.textOnPrimaryBackground,
3106
+ "--text-on-primary-background",
3107
+ t
3108
+ ), xt(
3109
+ (r = n.colors) == null ? void 0 : r.secondaryBackground,
3110
+ "--secondary-background",
3111
+ t
3112
+ ), xt(
3113
+ (i = n.colors) == null ? void 0 : i.textOnSecondaryBackground,
3114
+ "--text-on-secondary-background",
3115
+ t
3116
+ );
3117
+ };
3118
+ var lo = Object.defineProperty, co = Object.getOwnPropertyDescriptor, Qt = (n, t, e, s) => {
3119
+ for (var r = s > 1 ? void 0 : s ? co(t, e) : t, i = n.length - 1, o; i >= 0; i--)
3120
+ (o = n[i]) && (r = (s ? o(t, e, r) : o(r)) || r);
3121
+ return s && r && lo(t, e, r), r;
3122
+ };
3123
+ class G extends b {
3124
+ constructor() {
3125
+ super(...arguments), this.active = !1, this.loaded = !1, this.containerRef = jt();
3126
+ }
3127
+ async connectedCallback() {
3128
+ super.connectedCallback(), this.icon = await this._renderSymbol(), this.loaded = !0, this._applyBranding();
3129
+ }
3130
+ toggleActive() {
3131
+ var t;
3132
+ if (!((t = this.application) != null && t.root)) {
3133
+ console.warn(
3134
+ "Could not activate widget. No root element assigned to widget."
3135
+ );
3136
+ return;
3137
+ }
3138
+ this.active = !this.active, this.active ? this.application.appendToDOM() : this.application.hide();
3139
+ }
3140
+ _applyBranding() {
3141
+ var t;
3142
+ (t = this.application) != null && t.settings && bs(this.application.settings.branding, this);
3143
+ }
3144
+ async _renderSymbol() {
3145
+ var a, l, c;
3146
+ const t = (a = this.application) == null ? void 0 : a.branding(), e = (l = t == null ? void 0 : t.graphics) == null ? void 0 : l.trigger;
3147
+ if (e)
3148
+ return v` <img src=${e} class="trigger-icon" alt="" /> `;
3149
+ const s = (c = this.application) == null ? void 0 : c.triggerIcon;
3150
+ if (!s)
3151
+ return f;
3152
+ const r = async (u) => Gr, { type: i, content: o } = s;
3153
+ switch (i) {
3154
+ case "Telia": {
3155
+ const u = await r();
3156
+ return u ? v`<telia-icon
3157
+ class="trigger-icon"
3158
+ svg=${u.svg}
3159
+ size="lg"
3160
+ ></telia-icon>` : f;
3161
+ }
3162
+ default:
3163
+ return f;
3164
+ }
3165
+ }
3166
+ render() {
3167
+ var t, e, s, r;
3168
+ return v`<div class="trigger-container" ${Ht(this.containerRef)}>
3169
+ ${!this.active && ((r = (s = (e = (t = this.application) == null ? void 0 : t.settings) == null ? void 0 : e.branding) == null ? void 0 : s.other) != null && r.showButtonLabel) ? v`
3170
+ <button
3171
+ class="trigger-label"
3172
+ @click=${this.toggleActive}
3173
+ ${me({
3174
+ keyframeOptions: {},
3175
+ in: so,
3176
+ stabilizeOut: !0,
3177
+ skipInitial: !1
3178
+ })}
3179
+ >
3180
+ ${this.application.settings.branding.other.buttonLabelText}
3181
+ </button>
3182
+ ` : f}
3183
+
3184
+ <button
3185
+ class=${Dt({
3186
+ trigger: !0,
3187
+ active: this.active,
3188
+ rendered: this.loaded
3189
+ })}
3190
+ @click=${this.toggleActive}
3191
+ >
3192
+ ${this.icon}
3193
+ <span class="trigger-close">
3194
+ <svg
3195
+ width="18"
3196
+ height="9"
3197
+ viewBox="0 0 18 9"
3198
+ fill="none"
3199
+ xmlns="http://www.w3.org/2000/svg"
3200
+ >
3201
+ <path
3202
+ d="M9 9C8.81794 9.00045 8.63759 8.96634 8.46939 8.89965C8.3012 8.83295 8.14851 8.735 8.02015 8.61145L0.194523 1.12367C0.068294 0.99862 -0.00155266 0.831133 2.61958e-05 0.657285C0.00160506 0.483436 0.0744832 0.317136 0.202964 0.194202C0.331445 0.0712675 0.505249 0.00153576 0.686941 2.50649e-05C0.868634 -0.00148563 1.04368 0.0653456 1.17437 0.186125L9 7.6739L16.8256 0.186125C16.9563 0.0653456 17.1314 -0.00148563 17.3131 2.50649e-05C17.4948 0.00153576 17.6686 0.0712675 17.797 0.194202C17.9255 0.317136 17.9984 0.483436 18 0.657285C18.0016 0.831133 17.9317 0.99862 17.8055 1.12367L9.97985 8.61145C9.85149 8.735 9.6988 8.83295 9.53061 8.89965C9.36241 8.96634 9.18206 9.00045 9 9Z"
3203
+ fill="white"
3204
+ />
3205
+ </svg>
3206
+ </span>
3207
+ <span class="trigger-loader">
3208
+ <svg viewBox="25 25 50 50">
3209
+ <circle
3210
+ cx="50"
3211
+ cy="50"
3212
+ r="20"
3213
+ fill="none"
3214
+ stroke="#000"
3215
+ stroke-width="2"
3216
+ stroke-miterlimit="10"
3217
+ />
3218
+ </svg>
3219
+ </span>
3220
+ </button>
3221
+ </div>`;
3222
+ }
3223
+ }
3224
+ G.styles = [
3225
+ C`
3226
+ :host {
3227
+ --voca-rem-multiplier: 0.625;
3228
+ --trigger-label-bg: #f5e0ff;
3229
+ --trigger-label-text-color: rgba(0, 0, 0, 0.8);
3230
+ display: block;
3231
+ box-sizing: border-box;
3232
+ /* font-family: var(--font-family); */
3233
+ font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
3234
+ }
3235
+
3236
+ .trigger-container {
3237
+ display: flex;
3238
+ align-items: center;
3239
+ gap: 1rem;
3240
+ }
3241
+
3242
+ .trigger {
3243
+ transform: scale(0);
3244
+ box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
3245
+ z-index: 5;
3246
+ display: flex;
3247
+ align-items: center;
3248
+ justify-content: center;
3249
+ border: none;
3250
+ line-height: 55px;
3251
+ height: 55px;
3252
+ width: 55px;
3253
+ border-radius: 55px;
3254
+ cursor: pointer;
3255
+ background-color: var(--trigger-bg, var(--primary-background));
3256
+ font-family: Lato;
3257
+ text-decoration: none;
3258
+ border: 3px dashed transparent;
3259
+ box-sizing: border-box;
3260
+ transition: transform 200ms ease-out;
3261
+ }
3262
+ .trigger:active {
3263
+ transform: scale(0.8) !important;
3264
+ }
3265
+ .trigger:hover:not(:active) {
3266
+ transform: scale(1.1) !important;
3267
+ }
3268
+ .trigger.rendered {
3269
+ transform: scale(1);
3270
+ }
3271
+ .trigger.active .trigger-icon {
3272
+ opacity: 0;
3273
+ transform: rotate(-180deg) scale(0);
3274
+ }
3275
+ .trigger.active .trigger-close {
3276
+ opacity: 1;
3277
+ transform: rotate(0deg) scale(1);
3278
+ }
3279
+
3280
+ .trigger-icon {
3281
+ display: inline-block;
3282
+ line-height: inherit;
3283
+ text-align: center;
3284
+ opacity: 1;
3285
+ transform: rotate(0deg) scale(1);
3286
+ transition: opacity 200ms ease-out, transform 200ms ease-out;
3287
+ color: var(--trigger-text-color, var(--text-on-primary-background));
3288
+ }
3289
+ .trigger-close {
3290
+ opacity: 0;
3291
+ transition: transform 200ms ease-out;
3292
+ transform: rotate(180deg) scale(0);
3293
+ position: absolute;
3294
+ top: 0;
3295
+ bottom: 0;
3296
+ left: 0;
3297
+ right: 0;
3298
+ display: flex;
3299
+ justify-content: center;
3300
+ align-items: center;
3301
+ fill: var(--trigger-text-color, var(--text-on-primary-background));
3302
+ }
3303
+
3304
+ img {
3305
+ max-width: 100%;
3306
+ }
3307
+
3308
+ .trigger-label {
3309
+ box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.1);
3310
+ background-color: var(--trigger-label-bg);
3311
+ color: var(--trigger-label-text-color);
3312
+ white-space: nowrap;
3313
+ padding: 0.7rem 1rem;
3314
+ border-radius: 0.3rem;
3315
+ font-weight: 500;
3316
+ display: flex;
3317
+ justify-content: center;
3318
+ align-items: center;
3319
+ cursor: pointer;
3320
+ border: none;
3321
+ font-size: 1rem;
3322
+ font-family: inherit;
3323
+ transition: all 300ms ease-in-out;
3324
+ }
3325
+
3326
+ .trigger-label:hover {
3327
+ opacity: 0.8;
3328
+ }
3329
+ `
3330
+ ];
3331
+ Qt([
3332
+ y({ attribute: !1 })
3333
+ ], G.prototype, "application", 2);
3334
+ Qt([
3335
+ T()
3336
+ ], G.prototype, "active", 2);
3337
+ Qt([
3338
+ T()
3339
+ ], G.prototype, "loaded", 2);
3340
+ Qt([
3341
+ T()
3342
+ ], G.prototype, "icon", 2);
3343
+ var uo = Object.defineProperty, ho = Object.getOwnPropertyDescriptor, B = (n, t, e, s) => {
3344
+ for (var r = s > 1 ? void 0 : s ? ho(t, e) : t, i = n.length - 1, o; i >= 0; i--)
3345
+ (o = n[i]) && (r = (s ? o(t, e, r) : o(r)) || r);
3346
+ return s && r && uo(t, e, r), r;
3347
+ };
3348
+ const ws = (n) => {
3349
+ class t extends n {
3350
+ constructor() {
3351
+ super(...arguments), this.properties = {}, this.context = {}, this.layout = {}, this.nodes = [];
3352
+ }
3353
+ writeProperties(s) {
3354
+ this.properties = s;
3355
+ }
3356
+ writeLayout(s) {
3357
+ this.layout = s;
3358
+ }
3359
+ writeContext(s) {
3360
+ this.context = s;
3361
+ }
3362
+ addChild(s) {
3363
+ s.parent = this, this.nodes.push(s);
3364
+ }
3365
+ connectedCallback() {
3366
+ super.connectedCallback(), this.renderRoot.host.style.setProperty(
3367
+ "--width",
3368
+ this.layout.size === "full" ? "var(--columns, 1)" : `min(${this.layout.size || "var(--columns)"}, var(--columns))`
3369
+ ), this.application.mountComponent(this);
3370
+ }
3371
+ }
3372
+ return t.styles = [
3373
+ // (superClass as unknown as typeof LitElement).styles ?? [],
3374
+ C`
3375
+ :host {
3376
+ font-family: var(--font-family);
3377
+ grid-column: span var(--width);
3378
+ max-width: 100%;
3379
+ overflow: hidden;
3380
+ box-sizing: border-box;
3381
+ display: block;
3382
+ }
3383
+ * {
3384
+ box-sizing: border-box;
3385
+ }
3386
+ `
3387
+ ], B([
3388
+ y()
3389
+ ], t.prototype, "properties", 2), B([
3390
+ y()
3391
+ ], t.prototype, "context", 2), B([
3392
+ y()
3393
+ ], t.prototype, "layout", 2), B([
3394
+ y()
3395
+ ], t.prototype, "name", 2), B([
3396
+ y()
3397
+ ], t.prototype, "type", 2), B([
3398
+ y({ attribute: !1 })
3399
+ ], t.prototype, "application", 2), B([
3400
+ y({ attribute: !1 })
3401
+ ], t.prototype, "parent", 2), t;
3402
+ };
3403
+ class _s extends ws(b) {
3404
+ render() {
3405
+ return v`Non resolved component`;
3406
+ }
3407
+ }
3408
+ _s.styles = [
3409
+ C`
3410
+ :host {
3411
+ display: block;
3412
+ }
3413
+ `
3414
+ ];
3415
+ /**
3416
+ * @license
3417
+ * Copyright 2021 Google LLC
3418
+ * SPDX-License-Identifier: BSD-3-Clause
3419
+ */
3420
+ function* po(n, t) {
3421
+ if (n !== void 0) {
3422
+ let e = 0;
3423
+ for (const s of n)
3424
+ yield t(s, e++);
3425
+ }
3426
+ }
3427
+ var Ue = /* @__PURE__ */ ((n) => (n.Inline = "inline", n.Trigger = "trigger", n))(Ue || {}), fo = Object.defineProperty, vo = Object.getOwnPropertyDescriptor, go = (n, t, e, s) => {
3428
+ for (var r = s > 1 ? void 0 : s ? vo(t, e) : t, i = n.length - 1, o; i >= 0; i--)
3429
+ (o = n[i]) && (r = (s ? o(t, e, r) : o(r)) || r);
3430
+ return s && r && fo(t, e, r), r;
3431
+ };
3432
+ class Re extends b {
3433
+ constructor() {
3434
+ super(...arguments), this.nodes = [], this.wrapperRef = jt();
3435
+ }
3436
+ addChild(t) {
3437
+ t.parent = this, this.nodes.push(t);
3438
+ }
3439
+ applyBranding() {
3440
+ if (!this.wrapperRef.value)
3441
+ return;
3442
+ const t = this.application.settings;
3443
+ t != null && t.branding && bs(t.branding, this.wrapperRef.value);
3444
+ }
3445
+ applyStyles() {
3446
+ if (!this.wrapperRef.value)
3447
+ return;
3448
+ const t = this.application.styles(), e = this.wrapperRef.value;
3449
+ Object.entries(t).forEach(([s, r]) => {
3450
+ e.style.setProperty(`--${s}`, r);
3451
+ });
3452
+ }
3453
+ firstUpdated(t) {
3454
+ this.applyBranding(), this.applyStyles();
3455
+ }
3456
+ render() {
3457
+ return this.application.renderStrategy === Ue.Trigger && (this.renderRoot.host.classList.add("floating"), this.application.anchor === "BottomLeft" ? this.renderRoot.host.classList.add("bottom-left") : this.application.anchor === "BottomRight" && this.renderRoot.host.classList.add("bottom-right")), v`<div class="widget-container" ${Ht(this.wrapperRef)}>
3458
+ ${po(this.nodes, (t) => t)}
3459
+ </div>`;
3460
+ }
3461
+ }
3462
+ Re.styles = C`
3463
+ :host {
3464
+ --font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
3465
+ --spacing-xs: 0.2rem;
3466
+ --spacing-sm: 0.5rem;
3467
+ --spacing-md: 1rem;
3468
+ --spacing-lg: 1.2rem;
3469
+ --spacing-xl: 1.8rem;
3470
+
3471
+ --text-color: #222222;
3472
+ --link-color: #990ae3;
3473
+ --gray-color: #f3f3f8;
3474
+ --gray-dark-color: #a6a6a6;
3475
+
3476
+ --box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
3477
+ --border-radius: var(--spacing-sm);
3478
+ --border-radius-sm: var(--spacing-sm);
3479
+ --gap: var(--spacing-sm);
3480
+ }
3481
+ :host {
3482
+ --voca-rem-multiplier: 0.625;
3483
+ box-sizing: border-box;
3484
+ display: block;
3485
+ }
3486
+
3487
+ :host(.inline) {
3488
+ height: 100%;
3489
+ position: fixed;
3490
+ inset: 0 0 0 0;
3491
+ }
3492
+
3493
+ :host(.floating) {
3494
+ z-index: 6;
3495
+ position: fixed;
3496
+ }
3497
+ @media screen and (max-width: 800px) {
3498
+ :host(.floating) {
3499
+ inset: 0 0 95px 0;
3500
+ }
3501
+ }
3502
+ @media screen and (min-width: 801px) {
3503
+ :host(.floating) {
3504
+ inset: auto 20px 95px auto;
3505
+ max-height: calc(100vh - 120px);
3506
+ width: 400px;
3507
+ height: 700px;
3508
+ }
3509
+ :host(.floating.bottom-right) {
3510
+ inset: auto 20px 95px auto;
3511
+ }
3512
+ :host(.floating.bottom-left) {
3513
+ inset: auto auto 95px 20px;
3514
+ }
3515
+ }
3516
+
3517
+ :host(.floating) .widget-container {
3518
+ box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
3519
+ border-radius: 0.7rem;
3520
+ }
3521
+
3522
+ * {
3523
+ box-sizing: border-box;
3524
+ }
3525
+ .widget-container {
3526
+ height: 100%;
3527
+ background-color: var(--primary-background);
3528
+ padding: var(--spacing-sm);
3529
+ border: var(--widget-border, none);
3530
+ }
3531
+ @keyframes slideDown {
3532
+ from {
3533
+ transform: translateY(0);
3534
+ opacity: 1;
3535
+ }
3536
+ to {
3537
+ transform: translateY(100%);
3538
+ opacity: 0;
3539
+ }
3540
+ }
3541
+ @keyframes slideUp {
3542
+ from {
3543
+ transform: translateY(100%);
3544
+ opacity: 0;
3545
+ }
3546
+ to {
3547
+ transform: translateY(0);
3548
+ opacity: 1;
3549
+ }
3550
+ }
3551
+ :host(.expanded) {
3552
+ opacity: 1;
3553
+ animation: slideUp 0.3s linear;
3554
+ }
3555
+ :host(.hidden) {
3556
+ opacity: 0;
3557
+ animation: slideDown 0.3s linear;
3558
+ }
3559
+ `;
3560
+ go([
3561
+ y({ attribute: !1 })
3562
+ ], Re.prototype, "application", 2);
3563
+ var mo = Object.defineProperty, $o = Object.getOwnPropertyDescriptor, je = (n, t, e, s) => {
3564
+ for (var r = s > 1 ? void 0 : s ? $o(t, e) : t, i = n.length - 1, o; i >= 0; i--)
3565
+ (o = n[i]) && (r = (s ? o(t, e, r) : o(r)) || r);
3566
+ return s && r && mo(t, e, r), r;
3567
+ };
3568
+ class yt extends b {
3569
+ constructor() {
3570
+ super(), this.status = "deactivated", this.addEventListener("environment-created", this.onEnvironmentCreated);
3571
+ }
3572
+ async connectedCallback() {
3573
+ super.connectedCallback(), await this.getGlobalEnvironment();
3574
+ }
3575
+ disconnectedCallback() {
3576
+ super.disconnectedCallback(), this.removeEventListener("environment-created", this.onEnvironmentCreated);
3577
+ }
3578
+ async onEnvironmentCreated(t) {
3579
+ this.widget = t.detail.widget, await this.activate(), this.requestUpdate();
3580
+ }
3581
+ async activate() {
3582
+ this.widget && (await this.widget.activate(), this.status = "activated");
3583
+ }
3584
+ async getGlobalEnvironment() {
3585
+ const t = globalThis.widgets;
3586
+ t && (this.widget = t.applications.find(
3587
+ (e) => e.name === this.name
3588
+ ), await this.activate());
3589
+ }
3590
+ render() {
3591
+ if (!this.widget || this.status !== "activated")
3592
+ return f;
3593
+ if (this.widget.renderStrategy === Ue.Trigger) {
3594
+ const t = new G();
3595
+ return t.application = this.widget, t;
3596
+ }
3597
+ return this.widget.render();
3598
+ }
3599
+ }
3600
+ yt.styles = [
3601
+ C`
3602
+ :host {
3603
+ display: block;
3604
+ }
3605
+ `
3606
+ ];
3607
+ je([
3608
+ y({ attribute: !0 })
3609
+ ], yt.prototype, "name", 2);
3610
+ je([
3611
+ T()
3612
+ ], yt.prototype, "widget", 2);
3613
+ je([
3614
+ T()
3615
+ ], yt.prototype, "status", 2);
3616
+ customElements.get("ace-trigger-slot") || customElements.define("ace-trigger-slot", Ie);
3617
+ customElements.get("ace-trigger") || customElements.define("ace-trigger", G);
3618
+ customElements.get("ace-unresolved-component") || customElements.define("ace-unresolved-component", _s);
3619
+ customElements.get("ace-wrapper") || customElements.define("ace-wrapper", Re);
3620
+ customElements.get("ace-widget") || customElements.define("ace-widget", yt);
3621
+ var yo = Object.defineProperty, bo = Object.getOwnPropertyDescriptor, Ss = (n, t, e, s) => {
3622
+ for (var r = s > 1 ? void 0 : s ? bo(t, e) : t, i = n.length - 1, o; i >= 0; i--)
3623
+ (o = n[i]) && (r = (s ? o(t, e, r) : o(r)) || r);
3624
+ return s && r && yo(t, e, r), r;
3625
+ };
3626
+ let Nt = class extends b {
3627
+ connectedCallback() {
3628
+ var n;
3629
+ super.connectedCallback(), (n = this.entry.didUpdate) == null || n.subscribe(() => {
3630
+ this.requestUpdate();
3631
+ });
3632
+ }
3633
+ _getTimestamp(n) {
3634
+ return new Date(n).toLocaleTimeString([], {
3635
+ hour: "numeric",
3636
+ minute: "2-digit",
3637
+ hourCycle: "h23"
3638
+ });
3639
+ }
3640
+ _renderTimestamp(n, t) {
3641
+ if (!n && !t)
3642
+ return f;
3643
+ let e = "";
3644
+ return n ? t ? e = `${n}: ${this._getTimestamp(t)}` : e = n : t && (e = this._getTimestamp(t)), v`<p class="conversation-timestamp">${e}</p>`;
3645
+ }
3646
+ _renderDeliveryStatus(n) {
3647
+ return n === "delivered" ? v`<telia-icon
3648
+ svg=${Wr.svg}
3649
+ size="sm"
3650
+ ></telia-icon>` : n === "failed" ? v`<telia-icon
3651
+ svg=${Fr.svg}
3652
+ size="sm"
3653
+ title="Message could not be delivered"
3654
+ ></telia-icon>` : v`<telia-icon svg=${Zr.svg} size="sm"></telia-icon>`;
3655
+ }
3656
+ _dispatchEntryAction(n) {
3657
+ this.entry.actions$.next(n.detail);
3658
+ }
3659
+ render() {
3660
+ var n, t;
3661
+ switch (this.entry.type) {
3662
+ case I.System:
3663
+ return v`
3664
+ <div class="conversation-system-message">
3665
+ ${this.entry.messages.map(
3666
+ (e) => v`
3667
+ <div class="message-container">
3668
+ <div class="message-content">
3669
+ <conversation-group
3670
+ .group=${e}
3671
+ @action=${this._dispatchEntryAction}
3672
+ ></conversation-group>
3673
+ </div>
3674
+ </div>
3675
+ `
3676
+ )}
3677
+ <span>${this._getTimestamp(this.entry.timestamp)}</span>
3678
+ </div>
3679
+ `;
3680
+ case I.Agent:
3681
+ return v`<div
3682
+ class=${Dt({
3683
+ "conversation-agent-message": !0,
3684
+ "has-avatar": !!((n = this.entry.sender) != null && n.avatar)
3685
+ })}
3686
+ >
3687
+ ${typeof ((t = this.entry.sender) == null ? void 0 : t.avatar) == "string" ? v`<div class="avatar">
3688
+ <img src=${this.entry.sender.avatar} />
3689
+ </div>` : f}
3690
+
3691
+ <div class="entry-content">
3692
+ ${this.entry.messages.map(
3693
+ (e) => v`
3694
+ <div class="message-container">
3695
+ <div class="message-content">
3696
+ <conversation-group .group=${e}></conversation-group>
3697
+ </div>
3698
+ </div>
3699
+ `
3700
+ )}
3701
+ </div>
3702
+ <div class="message-details">
3703
+ ${this._renderTimestamp(
3704
+ this.entry.sender.name || "",
3705
+ this.entry.timestamp
3706
+ )}
3707
+ </div>
3708
+ </div>`;
3709
+ case I.User:
3710
+ return v`<div
3711
+ class=${Dt({
3712
+ "conversation-user-message": !0,
3713
+ "has-error": this.entry.status === "failed"
3714
+ })}
3715
+ >
3716
+ <div class="entry-content">
3717
+ ${this.entry.messages.map(
3718
+ (e) => v`
3719
+ <div class="message-container">
3720
+ <div class="message-content">
3721
+ <conversation-group .group=${e}></conversation-group>
3722
+ </div>
3723
+ </div>
3724
+ `
3725
+ )}
3726
+ </div>
3727
+ <div class="message-details">
3728
+ ${this._renderTimestamp(
3729
+ this.entry.sender.name || "",
3730
+ this.entry.timestamp
3731
+ )}
3732
+ ${this._renderDeliveryStatus(this.entry.status)}
3733
+ </div>
3734
+ </div>`;
3735
+ default:
3736
+ return f;
3737
+ }
3738
+ }
3739
+ };
3740
+ Nt.styles = [
3741
+ C`
3742
+ :host {
3743
+ box-sizing: border-box;
3744
+ display: block;
3745
+ }
3746
+ * {
3747
+ box-sizing: border-box;
3748
+ }
3749
+ .message-content {
3750
+ padding: var(--spacing-md);
3751
+ display: inline-block;
3752
+ margin-top: var(--spacing-md);
3753
+ max-width: 100%;
3754
+ border: 1px solid rgba(255, 255, 255, 0.22);
3755
+ border-radius: var(--border-radius);
3756
+ background-color: var(--bubble-bg-color);
3757
+ color: var(--bubble-text-color);
3758
+ }
3759
+
3760
+ .message-details {
3761
+ display: flex;
3762
+ gap: var(--spacing-sm);
3763
+ align-items: center;
3764
+ }
3765
+
3766
+ .conversation-system-message {
3767
+ display: flex;
3768
+ flex-direction: column;
3769
+ justify-content: center;
3770
+ align-items: center;
3771
+ }
3772
+
3773
+ .conversation-system-message .message-content {
3774
+ padding: 0;
3775
+ }
3776
+
3777
+ .conversation-system-message span {
3778
+ color: var(--message-info-color, var(--text-color));
3779
+ font-size: 0.8rem;
3780
+ }
3781
+
3782
+ .conversation-user-message {
3783
+ --bubble-bg-color: var(--user-bg-color);
3784
+ --bubble-text-color: var(--user-text-color);
3785
+ margin-left: 10%;
3786
+ width: 90%;
3787
+ display: flex;
3788
+ flex-direction: column;
3789
+ align-items: flex-end;
3790
+ gap: var(--spacing-sm);
3791
+ }
3792
+
3793
+ .conversation-user-message.has-error {
3794
+ opacity: 0.7;
3795
+ }
3796
+
3797
+ .conversation-user-message.has-error .message-details {
3798
+ color: var(--error-text-color);
3799
+ }
3800
+
3801
+ .conversation-agent-message {
3802
+ --bubble-bg-color: var(--agent-bg-color);
3803
+ --bubble-text-color: var(--agent-text-color);
3804
+ display: grid;
3805
+ margin-right: 10%;
3806
+ width: 90%;
3807
+ gap: var(--spacing-sm);
3808
+
3809
+ grid-template-columns: 1fr;
3810
+ grid-template-rows: 1fr auto;
3811
+ grid-template-areas:
3812
+ 'content'
3813
+ 'info';
3814
+ }
3815
+ .conversation-agent-message.has-avatar {
3816
+ grid-template-columns: auto 1fr;
3817
+ grid-template-rows: 1fr auto;
3818
+ grid-template-areas:
3819
+ 'avatar content'
3820
+ '. info';
3821
+ }
3822
+
3823
+ .avatar {
3824
+ grid-area: avatar;
3825
+ place-self: flex-end;
3826
+ width: 32px;
3827
+ height: 32px;
3828
+ border-radius: 50%;
3829
+ align-self: flex-end;
3830
+ justify-self: center;
3831
+ overflow: hidden;
3832
+ margin-right: var(--spacing-md);
3833
+ justify-content: center;
3834
+ align-items: center;
3835
+ }
3836
+ .avatar img {
3837
+ height: 100%;
3838
+ width: 100%;
3839
+ object-fit: cover;
3840
+ }
3841
+
3842
+ .conversation-timestamp {
3843
+ grid-area: info;
3844
+ margin: 0;
3845
+ line-height: 1.5em;
3846
+ grid-area: info;
3847
+ color: var(--message-info-color, var(--text-color));
3848
+ font-size: 0.8rem;
3849
+ font-weight: 300;
3850
+ }
3851
+
3852
+ .entry-content {
3853
+ grid-area: content;
3854
+ }
3855
+ `
3856
+ ];
3857
+ Ss([
3858
+ y({ attribute: !1 })
3859
+ ], Nt.prototype, "entry", 2);
3860
+ Nt = Ss([
3861
+ $t("conversation-entry")
3862
+ ], Nt);
3863
+ var wo = Object.defineProperty, _o = Object.getOwnPropertyDescriptor, He = (n, t, e, s) => {
3864
+ for (var r = s > 1 ? void 0 : s ? _o(t, e) : t, i = n.length - 1, o; i >= 0; i--)
3865
+ (o = n[i]) && (r = (s ? o(t, e, r) : o(r)) || r);
3866
+ return s && r && wo(t, e, r), r;
3867
+ };
3868
+ let pt = class extends b {
3869
+ constructor() {
3870
+ super(...arguments), this.entries = [], this.loading = !0;
3871
+ }
3872
+ updated(n) {
3873
+ const t = new CustomEvent("updated", {});
3874
+ this.dispatchEvent(t);
3875
+ }
3876
+ render() {
3877
+ return v`<div class="conversation-feed">
3878
+ ${this.entries.map(
3879
+ (n) => v`<div class="conversation-entry" tabindex="-1">
3880
+ <conversation-entry
3881
+ .entry=${n}
3882
+ ${me({
3883
+ keyframeOptions: {},
3884
+ in: bn,
3885
+ stabilizeOut: !0,
3886
+ skipInitial: !1
3887
+ })}
3888
+ >
3889
+ </conversation-entry>
3890
+ </div>`
3891
+ )}
3892
+ ${this.loading ? v`<ace-typing-state
3893
+ ${me({
3894
+ keyframeOptions: {},
3895
+ in: bn,
3896
+ out: ro,
3897
+ stabilizeOut: !0,
3898
+ skipInitial: !1
3899
+ })}
3900
+ ></ace-typing-state>` : f}
3901
+ </div>`;
3902
+ }
3903
+ };
3904
+ pt.styles = [
3905
+ C`
3906
+ :host {
3907
+ display: block;
3908
+ }
3909
+ .conversation-feed {
3910
+ display: flex;
3911
+ flex-direction: column;
3912
+ justify-content: end;
3913
+ min-height: 100%;
3914
+ padding: var(--spacing-md);
3915
+ }
3916
+ `
3917
+ ];
3918
+ He([
3919
+ y({ attribute: !1 })
3920
+ ], pt.prototype, "entries", 2);
3921
+ He([
3922
+ y({ type: Boolean })
3923
+ ], pt.prototype, "loading", 2);
3924
+ pt = He([
3925
+ $t("ace-conversation-feed")
3926
+ ], pt);
3927
+ /**
3928
+ * @license
3929
+ * Copyright 2021 Google LLC
3930
+ * SPDX-License-Identifier: BSD-3-Clause
3931
+ */
3932
+ const So = (n, t, e) => {
3933
+ for (const s of t)
3934
+ if (s[0] === n)
3935
+ return (0, s[1])();
3936
+ return e == null ? void 0 : e();
3937
+ };
3938
+ var xo = Object.defineProperty, Co = Object.getOwnPropertyDescriptor, xs = (n, t, e, s) => {
3939
+ for (var r = s > 1 ? void 0 : s ? Co(t, e) : t, i = n.length - 1, o; i >= 0; i--)
3940
+ (o = n[i]) && (r = (s ? o(t, e, r) : o(r)) || r);
3941
+ return s && r && xo(t, e, r), r;
3942
+ };
3943
+ let Bt = class extends b {
3944
+ render() {
3945
+ return v`
3946
+ <div class="message-group">
3947
+ ${this.group.items.map(
3948
+ ([n, t]) => v`
3949
+ ${So(
3950
+ n,
3951
+ [["html", () => v`<message-type-html .message=${t} />`]],
3952
+ () => {
3953
+ const e = customElements.get(n);
3954
+ if (!e)
3955
+ return f;
3956
+ const s = new e();
3957
+ return v`${s}`;
3958
+ }
3959
+ )}
3960
+ `
3961
+ )}
3962
+ </div>
3963
+ `;
3964
+ }
3965
+ };
3966
+ Bt.styles = [
3967
+ C`
3968
+ :host {
3969
+ box-sizing: border-box;
3970
+ display: block;
3971
+ }
3972
+ * {
3973
+ box-sizing: border-box;
3974
+ }
3975
+ .message-group {
3976
+ display: flex;
3977
+ flex-direction: column;
3978
+ gap: var(--spacing-md);
3979
+ }
3980
+ `
3981
+ ];
3982
+ xs([
3983
+ y({ attribute: !1 })
3984
+ ], Bt.prototype, "group", 2);
3985
+ Bt = xs([
3986
+ $t("conversation-group")
3987
+ ], Bt);
3988
+ var Ao = Object.defineProperty, Eo = Object.getOwnPropertyDescriptor, Oo = (n, t, e, s) => {
3989
+ for (var r = s > 1 ? void 0 : s ? Eo(t, e) : t, i = n.length - 1, o; i >= 0; i--)
3990
+ (o = n[i]) && (r = (s ? o(t, e, r) : o(r)) || r);
3991
+ return s && r && Ao(t, e, r), r;
3992
+ };
3993
+ let $e = class extends b {
3994
+ render() {
3995
+ return v`<div class="container">
3996
+ <div class="dot"></div>
3997
+ <div class="dot"></div>
3998
+ <div class="dot"></div>
3999
+ </div>`;
4000
+ }
4001
+ };
4002
+ $e.styles = [
4003
+ C`
4004
+ :host {
4005
+ display: block;
4006
+ }
4007
+ .container {
4008
+ align-items: center;
4009
+ display: flex;
4010
+ justify-content: center;
4011
+ gap: var(--spacing-sm);
4012
+ padding: var(--spacing-md);
4013
+ }
4014
+ .dot {
4015
+ border-radius: 9999px;
4016
+ height: var(--spacing-sm);
4017
+ width: var(--spacing-sm);
4018
+ background: var(--primary-background);
4019
+ opacity: 0;
4020
+ animation: blink 1s infinite;
4021
+ }
4022
+ .dot:nth-child(1) {
4023
+ animation-delay: 0.3333s;
4024
+ }
4025
+ .dot:nth-child(2) {
4026
+ animation-delay: 0.6666s;
4027
+ }
4028
+ .dot:nth-child(3) {
4029
+ animation-delay: 0.9999s;
4030
+ }
4031
+
4032
+ @keyframes blink {
4033
+ 50% {
4034
+ opacity: 1;
4035
+ }
4036
+ }
4037
+ `
4038
+ ];
4039
+ $e = Oo([
4040
+ $t("ace-typing-state")
4041
+ ], $e);
4042
+ /**
4043
+ * @license
4044
+ * Copyright 2017 Google LLC
4045
+ * SPDX-License-Identifier: BSD-3-Clause
4046
+ */
4047
+ class ye extends Me {
4048
+ constructor(t) {
4049
+ if (super(t), this.et = f, t.type !== Xt.CHILD)
4050
+ throw Error(this.constructor.directiveName + "() can only be used in child bindings");
4051
+ }
4052
+ render(t) {
4053
+ if (t === f || t == null)
4054
+ return this.vt = void 0, this.et = t;
4055
+ if (t === j)
4056
+ return t;
4057
+ if (typeof t != "string")
4058
+ throw Error(this.constructor.directiveName + "() called with a non-string value");
4059
+ if (t === this.et)
4060
+ return this.vt;
4061
+ this.et = t;
4062
+ const e = [t];
4063
+ return e.raw = e, this.vt = { _$litType$: this.constructor.resultType, strings: e, values: [] };
4064
+ }
4065
+ }
4066
+ ye.directiveName = "unsafeHTML", ye.resultType = 1;
4067
+ const ko = Jt(ye);
4068
+ var To = Object.defineProperty, Po = Object.getOwnPropertyDescriptor, Cs = (n, t, e, s) => {
4069
+ for (var r = s > 1 ? void 0 : s ? Po(t, e) : t, i = n.length - 1, o; i >= 0; i--)
4070
+ (o = n[i]) && (r = (s ? o(t, e, r) : o(r)) || r);
4071
+ return s && r && To(t, e, r), r;
4072
+ };
4073
+ let zt = class extends b {
4074
+ render() {
4075
+ return v`<div class="message-type-html">
4076
+ ${ko(this.message.content)}
4077
+ </div>`;
4078
+ }
4079
+ };
4080
+ zt.styles = [
4081
+ C`
4082
+ :host {
4083
+ box-sizing: border-box;
4084
+ }
4085
+ * {
4086
+ box-sizing: border-box;
4087
+ }
4088
+ p {
4089
+ margin: 0;
4090
+ padding: 0;
4091
+ word-break: break-word;
4092
+ }
4093
+ a {
4094
+ word-break: break-all;
4095
+ }
4096
+ `
4097
+ ];
4098
+ Cs([
4099
+ y({ attribute: !1 })
4100
+ ], zt.prototype, "message", 2);
4101
+ zt = Cs([
4102
+ $t("message-type-html")
4103
+ ], zt);
4104
+ class Lo {
4105
+ constructor(t) {
4106
+ this._message = null, this._host = t, t.addController(this);
4107
+ }
4108
+ hostConnected() {
4109
+ }
4110
+ set message(t) {
4111
+ this._message = t, this._host.requestUpdate();
4112
+ }
4113
+ get message() {
4114
+ return this._message;
4115
+ }
4116
+ hasMessage() {
4117
+ return !!this.message;
4118
+ }
4119
+ }
4120
+ class xn {
4121
+ constructor(t, e, s, r, i) {
4122
+ this.id = t, this.providerKey = e, this.providerOptions = s, this.component = i, this.provider$ = new M(null), this.entries$ = new M([]), this.removeEntryAction$ = new _(), this.kill$ = new _(), this.isTyping$ = new M(!1), this.data$ = new M({}), this.complete$ = this.provider$.pipe(
4123
+ Q((l) => l ? l.onComplete() : vt)
4124
+ );
4125
+ const o = this._getProviderFactory(e);
4126
+ if (!o)
4127
+ throw new Error(`No provider with key "${e}" was found.`);
4128
+ this.data$.next(r);
4129
+ const a = o(this.component);
4130
+ this.provider$.next(a), a.actions().pipe(Ze(this.kill$)).subscribe((l) => {
4131
+ this.write(l);
4132
+ }), a.isTyping().pipe(Ze(this.kill$)).subscribe((l) => {
4133
+ this.isTyping$.next(l);
4134
+ });
4135
+ }
4136
+ start() {
4137
+ const t = this.provider$.value;
4138
+ if (!t)
4139
+ throw new Error("No provider bound to session.");
4140
+ t.saveToCurrentSession$.subscribe((e) => {
4141
+ this.data$.next(e);
4142
+ }), t.connect(this.providerOptions);
4143
+ }
4144
+ entries() {
4145
+ return this.entries$.asObservable();
4146
+ }
4147
+ rehydrate() {
4148
+ var t;
4149
+ (t = this.provider$.value) == null || t.rehydrate(this.data$.value);
4150
+ }
4151
+ toStore() {
4152
+ return {
4153
+ id: this.id,
4154
+ providerKey: this.providerKey,
4155
+ providerOptions: this.providerOptions,
4156
+ data: this.data$.value
4157
+ };
4158
+ }
4159
+ write(t) {
4160
+ this._addEntryRemoveHandler(t), this.entries$.pipe(pe(1)).subscribe((e) => {
4161
+ this.entries$.next([...e, t]);
4162
+ });
4163
+ }
4164
+ _addEntryRemoveHandler(t) {
4165
+ t.remove$.pipe(
4166
+ Q(() => this.entries$),
4167
+ pe(1)
4168
+ ).subscribe((e) => {
4169
+ this.removeEntryAction$.next(t), this.entries$.next(e.filter((s) => s !== t));
4170
+ });
4171
+ }
4172
+ _getProviderFactory(t) {
4173
+ return this.component.platform.registeredProviders.get(t);
4174
+ }
4175
+ }
4176
+ class Mo {
4177
+ constructor(t) {
4178
+ this.component = t, this.currentSession$ = new M(null), this.sessions = [], this.storage = null, kt(t, "handover").subscribe((e) => {
4179
+ const s = this._createNewSession(
4180
+ e.detail.providerKey,
4181
+ e.detail.providerOptions
4182
+ );
4183
+ this._setSession(s), e.detail.complete = s.complete$, s.start();
4184
+ });
4185
+ }
4186
+ loadFromStorage() {
4187
+ const t = this._getStoredSessions();
4188
+ this.sessions = t.sessions, this.sessions.forEach((e) => {
4189
+ this._setSession(e), e.rehydrate();
4190
+ }), this.save(t);
4191
+ }
4192
+ startSession() {
4193
+ const t = this._getStoredSessions();
4194
+ let e = null;
4195
+ if (t.sessions.length)
4196
+ e = t.sessions[t.sessions.length - 1];
4197
+ else {
4198
+ const s = this._getInitialProviderKey(), r = {};
4199
+ e = this._createNewSession(s, r);
4200
+ }
4201
+ this._setSession(e), e.start();
4202
+ }
4203
+ setStorageService(t) {
4204
+ this.storage = t;
4205
+ }
4206
+ currentSession() {
4207
+ return this.currentSession$.asObservable();
4208
+ }
4209
+ _getStoredSessions() {
4210
+ if (!this.storage)
4211
+ throw new Error("Could not locate StorageService in SessionService.");
4212
+ if (this.sessions.length)
4213
+ return {
4214
+ sessions: this.sessions
4215
+ };
4216
+ const t = this.storage.get(
4217
+ "conversation"
4218
+ );
4219
+ return t ? {
4220
+ sessions: t.sessions.map(
4221
+ (e) => new xn(
4222
+ e.id,
4223
+ e.providerKey,
4224
+ e.providerOptions,
4225
+ e.data,
4226
+ this.component
4227
+ )
4228
+ )
4229
+ } : {
4230
+ sessions: []
4231
+ };
4232
+ }
4233
+ _setSession(t) {
4234
+ this.currentSession$.next(t), t.data$.subscribe(() => {
4235
+ this._saveSession(t);
4236
+ });
4237
+ }
4238
+ _saveSession(t) {
4239
+ let e = this._getStoredSessions();
4240
+ const s = e.sessions.findIndex((r) => r.id === t.id);
4241
+ s > -1 ? e = {
4242
+ sessions: [
4243
+ ...e.sessions.slice(0, s),
4244
+ t,
4245
+ ...e.sessions.slice(s + 1)
4246
+ ]
4247
+ } : e.sessions.push(t), this.save(e);
4248
+ }
4249
+ save(t) {
4250
+ if (!this.storage)
4251
+ throw new Error("Could not locate StorageService in SessionService.");
4252
+ const e = {
4253
+ sessions: t.sessions.map((s) => s.toStore())
4254
+ };
4255
+ this.storage.set("conversation", JSON.stringify(e));
4256
+ }
4257
+ _createNewSession(t, e = {}) {
4258
+ const s = this._getStoredSessions(), r = new xn(
4259
+ Yn(),
4260
+ t,
4261
+ e,
4262
+ {},
4263
+ this.component
4264
+ );
4265
+ return s.sessions.push(r), this.save(s), r;
4266
+ }
4267
+ _getInitialProviderKey() {
4268
+ var t;
4269
+ if (!((t = this.component.properties.providers) != null && t.length))
4270
+ throw new Error("No providers registered on conversation component.");
4271
+ return this.component.properties.providers[0];
4272
+ }
4273
+ }
4274
+ class Io {
4275
+ constructor(t, e) {
4276
+ this.state$ = t, this.component = e, this.entries$ = new M([]), this.session = () => this.session$, this.isTyping = () => this.isTyping$, this.entries = () => this.entries$.asObservable(), this.sessionService = new Mo(this.component), this.session$ = this.sessionService.currentSession(), this.isTyping$ = this.session$.pipe(
4277
+ Q((s) => s ? s.provider$.pipe(
4278
+ Q((r) => r ? r.isTyping() : de(!1))
4279
+ ) : de(!1))
4280
+ ), t.subscribe((s) => {
4281
+ switch (s) {
4282
+ case "init":
4283
+ this.initialize();
4284
+ break;
4285
+ case "rehydrating":
4286
+ this.rehydrate();
4287
+ break;
4288
+ case "connected":
4289
+ this.connected();
4290
+ break;
4291
+ }
4292
+ });
4293
+ }
4294
+ setStorage(t) {
4295
+ var e;
4296
+ (e = this.sessionService) == null || e.setStorageService(t);
4297
+ }
4298
+ initialize() {
4299
+ this.state$.next("rehydrating");
4300
+ }
4301
+ rehydrate() {
4302
+ this.session$.pipe(
4303
+ Q((t) => {
4304
+ if (!t)
4305
+ return vt;
4306
+ const e = t.removeEntryAction$.pipe(qn(this.entries$)).pipe(
4307
+ Ot(([r, i]) => i.filter((o) => o.id !== r.id))
4308
+ ), s = t.entries().pipe(
4309
+ Ot((r) => {
4310
+ const i = this.entries$.value, o = r.filter((a) => i.findIndex((l) => l.id === a.id) === -1);
4311
+ return [...i, ...o];
4312
+ })
4313
+ );
4314
+ return br(e, s);
4315
+ })
4316
+ ).subscribe((t) => {
4317
+ this.entries$.next(t);
4318
+ }), this.sessionService.loadFromStorage(), this.state$.next("connected");
4319
+ }
4320
+ connected() {
4321
+ var t;
4322
+ (t = this.sessionService) == null || t.startSession();
4323
+ }
4324
+ }
4325
+ var Uo = Object.defineProperty, Ro = Object.getOwnPropertyDescriptor, bt = (n, t, e, s) => {
4326
+ for (var r = s > 1 ? void 0 : s ? Ro(t, e) : t, i = n.length - 1, o; i >= 0; i--)
4327
+ (o = n[i]) && (r = (s ? o(t, e, r) : o(r)) || r);
4328
+ return s && r && Uo(t, e, r), r;
4329
+ };
4330
+ const jo = (n) => {
4331
+ n.scrollTo ? n.scrollTo({ top: n.scrollHeight, behavior: "smooth" }) : n.scrollTop = n.scrollHeight;
4332
+ }, As = ws(b);
4333
+ class H extends As {
4334
+ constructor() {
4335
+ super(...arguments), this.message = "", this.disabled = !1, this.conversationContentRef = jt(), this.formRef = jt(), this.chatScrollHeight = 0, this.toast = new Lo(this), this.messageMaxLength = 1e3, this.platform = null, this.entries = [], this.typing = !1, this.conversationState$ = new M("waiting"), this.stateMachine = new Io(this.conversationState$, this), this.provider$ = this.stateMachine.session().pipe(
4336
+ Q((t) => t ? t == null ? void 0 : t.provider$ : de(null))
4337
+ );
4338
+ }
4339
+ async connectedCallback() {
4340
+ super.connectedCallback(), this.messageMaxLength = this.properties.messageMaxLength ?? this.messageMaxLength;
4341
+ const t = await this.application.container.get(
4342
+ "conversation"
4343
+ );
4344
+ this.platform = t || null, this.stateSubscription = ur([
4345
+ this.stateMachine.entries(),
4346
+ this.stateMachine.isTyping()
4347
+ ]).subscribe(([e, s]) => {
4348
+ this.entries = e, this.typing = s;
4349
+ }), this.userSubmitSubscription = kt(
4350
+ this,
4351
+ "user-submit"
4352
+ ).pipe(qn(this.provider$)).subscribe(([e, s]) => {
4353
+ s && s.onUserSubmit(e.detail);
4354
+ }), this._addHeaderOptions();
4355
+ }
4356
+ disconnectedCallback() {
4357
+ var t, e;
4358
+ super.disconnectedCallback(), (t = this.userSubmitSubscription) == null || t.unsubscribe(), (e = this.stateSubscription) == null || e.unsubscribe();
4359
+ }
4360
+ _actionHandler(t) {
4361
+ }
4362
+ onSessionUpdated() {
4363
+ const t = this.conversationContentRef.value;
4364
+ t && setTimeout(() => {
4365
+ const e = t.scrollHeight;
4366
+ e > this.chatScrollHeight && (jo(t), this.chatScrollHeight = e);
4367
+ }, 1e3);
4368
+ }
4369
+ disableInput() {
4370
+ this.disabled = !0;
4371
+ }
4372
+ enableInput() {
4373
+ this.disabled = !1;
4374
+ }
4375
+ setToastMessage(t) {
4376
+ this.toast.message = t;
4377
+ }
4378
+ async _onSendMessage(t) {
4379
+ var s;
4380
+ if (t.preventDefault(), this.message.length <= 0) {
4381
+ (s = this.formRef.value) == null || s.classList.add("shake"), setTimeout(() => {
4382
+ var r;
4383
+ (r = this.formRef.value) == null || r.classList.remove("shake");
4384
+ }, 500);
4385
+ return;
4386
+ }
4387
+ this.message = this.message.slice(0, this.messageMaxLength);
4388
+ const e = new CustomEvent("user-submit", {
4389
+ detail: { text: this.message }
4390
+ });
4391
+ this.dispatchEvent(e), this.message = "";
4392
+ }
4393
+ _addHeaderOptions() {
4394
+ const t = this.application.getComponent("widget-header");
4395
+ if (!t)
4396
+ return;
4397
+ const e = this.application.texts, s = e.getOrFallback("conversation.mute", "Mute"), r = e.getOrFallback("conversation.unmute", "Unmute"), o = !!this.application.branding().other.disableSound, a = t.addOption({
4398
+ label: o ? r : s,
4399
+ icon: o ? sn.svg : nn.svg,
4400
+ closeOnClick: !1,
4401
+ datatestid: "options-mute-button",
4402
+ onClick: () => {
4403
+ !!this.application.branding().other.disableSound ? (this.application.unmute(), a.updateLabel(s), a.updateIcon(sn.svg)) : (this.application.mute(), a.updateLabel(r), a.updateIcon(nn.svg));
4404
+ }
4405
+ });
4406
+ }
4407
+ _inputHandler(t) {
4408
+ this.message = t.target.value;
4409
+ }
4410
+ handover(t, e) {
4411
+ this.enableInput(), this.setToastMessage(null);
4412
+ const s = new CustomEvent("handover", {
4413
+ detail: {
4414
+ providerKey: t,
4415
+ providerOptions: e
4416
+ }
4417
+ });
4418
+ return this.dispatchEvent(s), s.detail.complete || vt;
4419
+ }
4420
+ render() {
4421
+ var e;
4422
+ const t = this.application.texts;
4423
+ return this.conversationState$.value === "waiting" && ((e = this.application) != null && e.storage) && this.platform && (this.stateMachine.setStorage(this.application.storage), this.conversationState$.next("init")), v` <div
4424
+ @action=${this._actionHandler}
4425
+ class=${Dt({
4426
+ conversation: !0,
4427
+ disabled: this.disabled,
4428
+ "conversation--has-toast": this.toast.hasMessage(),
4429
+ "conversation--input-has-text": this.message.length > 0
4430
+ })}
4431
+ >
4432
+ <div
4433
+ class="conversation-content"
4434
+ part="scroll-container"
4435
+ aria-live="polite"
4436
+ ${Ht(this.conversationContentRef)}
4437
+ >
4438
+ ${this.toast.hasMessage() ? v`<div class="conversation__toast">${this.toast.message}</div>` : f}
4439
+ <ace-conversation-feed
4440
+ .entries=${this.entries}
4441
+ .loading=${this.typing}
4442
+ @updated=${this.onSessionUpdated}
4443
+ ></ace-conversation-feed>
4444
+ </div>
4445
+ <form
4446
+ class="conversation-bottom"
4447
+ @submit=${this._onSendMessage}
4448
+ ${Ht(this.formRef)}
4449
+ >
4450
+ <input
4451
+ maxlength=${this.messageMaxLength}
4452
+ placeholder=${t.getOrFallback(
4453
+ "conversation.input-placeholder",
4454
+ "Aa"
4455
+ )}
4456
+ data-testid="message-input"
4457
+ .value=${this.message}
4458
+ ?disabled=${this.disabled}
4459
+ @input=${this._inputHandler}
4460
+ />
4461
+ <div class="conversation-actions">
4462
+ <button
4463
+ class="conversation-send-button"
4464
+ type="submit"
4465
+ data-testid="send-message-button"
4466
+ title=${t.getOrFallback("conversation.send-alt", "Send")}
4467
+ ?disabled=${this.disabled}
4468
+ >
4469
+ <telia-icon svg=${qr.svg}></telia-icon>
4470
+ </button>
4471
+ </div>
4472
+ </form>
4473
+ </div>`;
4474
+ }
4475
+ }
4476
+ H.styles = [
4477
+ As.styles || [],
4478
+ C`
4479
+ :host {
4480
+ font-family: var(--font-family);
4481
+ /* --send-icon-color: var(--gray-dark-color, #a6a6a6); */
4482
+ --send-icon-opacity: 0.4;
4483
+ --send-icon-color: var(--text-color);
4484
+ --conversation-bg: var(--conversation-bg-color, #fafafa);
4485
+ --agent-bg-color: var(
4486
+ --conversation-agent-bg-color,
4487
+ var(--secondary-background)
4488
+ );
4489
+ --agent-text-color: var(
4490
+ --conversation-agent-text-color,
4491
+ var(--text-on-secondary-background)
4492
+ );
4493
+ --user-bg-color: var(
4494
+ --conversation-user-bg-color,
4495
+ var(--primary-background)
4496
+ );
4497
+ --user-text-color: var(
4498
+ --conversation-user-text-color,
4499
+ var(--text-on-primary-background)
4500
+ );
4501
+
4502
+ --content-border: var(--conversation-content-border, none);
4503
+ --input-border: var(--conversation-input-border, none);
4504
+ --input-text-color: var(--conversation-input-text-color, inherit);
4505
+ --conversation-input-bg: var(--conversation-input-bg-color, #fff);
4506
+
4507
+ --toast-bg: #eb5185;
4508
+ --toast-text-color: white;
4509
+
4510
+ --error-text-color: #eb5185;
4511
+
4512
+ --message-info-color: var(
4513
+ --conversation-message-info-color,
4514
+ var(--text-color)
4515
+ );
4516
+
4517
+ scrollbar-width: thin; /* Firefox */
4518
+ scrollbar-color: #7f7f7f transparent; /* Firefox */
4519
+ }
4520
+ ::-webkit-scrollbar {
4521
+ width: 3px !important;
4522
+ background-color: transparent;
4523
+ border-left: none;
4524
+ }
4525
+ ::-webkit-scrollbar-thumb {
4526
+ background-color: #7f7f7f;
4527
+ }
4528
+ ::-webkit-scrollbar-track {
4529
+ -webkit-box-shadow: none !important;
4530
+ background-color: transparent;
4531
+ }
4532
+
4533
+ @keyframes shake {
4534
+ 10%,
4535
+ 90% {
4536
+ transform: translateX(1px);
4537
+ }
4538
+ 20%,
4539
+ 80% {
4540
+ transform: translateX(-1px);
4541
+ }
4542
+ 30%,
4543
+ 50%,
4544
+ 70% {
4545
+ transform: translateX(2px);
4546
+ }
4547
+ 40%,
4548
+ 60% {
4549
+ transform: translateX(-2px);
4550
+ }
4551
+ }
4552
+
4553
+ .conversation {
4554
+ display: grid;
4555
+ grid-template-rows: 1fr auto;
4556
+ gap: var(--spacing-lg);
4557
+ height: 100%;
4558
+ background-color: transparent;
4559
+ }
4560
+ .conversation.conversation--input-has-text {
4561
+ /* --send-icon-color: var(--primary-color); */
4562
+ --send-icon-opacity: 1;
4563
+ }
4564
+ .conversation.conversation--has-toast .conversation-content {
4565
+ border-top-right-radius: 0;
4566
+ border-top-left-radius: 0;
4567
+ }
4568
+ .conversation.disabled .conversation-bottom {
4569
+ --conversation-input-bg: rgba(255, 255, 255, 0.4);
4570
+ }
4571
+ .conversation-content {
4572
+ flex: 1;
4573
+ background-color: var(--conversation-bg);
4574
+ overflow-y: auto;
4575
+ overflow-x: hidden;
4576
+ border-radius: var(--border-radius-sm);
4577
+ border: var(--content-border);
4578
+ position: relative;
4579
+ }
4580
+ .conversation-bottom {
4581
+ border: var(--input-border);
4582
+ border-radius: var(--border-radius-sm);
4583
+ background-color: var(--conversation-input-bg);
4584
+ min-height: 50px;
4585
+ max-height: 150px;
4586
+ display: flex;
4587
+ align-items: center;
4588
+ padding: 0 var(--spacing-md);
4589
+ margin: 0;
4590
+ transition: background-color 500ms ease-in-out;
4591
+ }
4592
+ .conversation-bottom.shake {
4593
+ animation: 0.82s cubic-bezier(0.36, 0.07, 0.19, 0.97) 0s 1 normal both
4594
+ running shake;
4595
+ }
4596
+ .conversation-bottom-left {
4597
+ border-right: 1px solid var(--gray-color);
4598
+ padding-right: var(--spacing-md);
4599
+ }
4600
+ .conversation-send-button {
4601
+ border: none;
4602
+ background: transparent;
4603
+ color: var(--send-icon-color);
4604
+ opacity: var(--send-icon-opacity);
4605
+ transition: opacity 200ms ease-in-out;
4606
+ }
4607
+ .conversation-send-button:not(:disabled):hover {
4608
+ --send-icon-opacity: 1;
4609
+ cursor: pointer;
4610
+ }
4611
+ .conversation__toast {
4612
+ background-color: var(--toast-bg);
4613
+ color: var(--toast-text-color);
4614
+ padding: var(--spacing-md);
4615
+ position: sticky;
4616
+ top: 0;
4617
+ left: 0;
4618
+ right: 0;
4619
+ font-size: 0.8rem;
4620
+ text-align: center;
4621
+ font-weight: 500;
4622
+ }
4623
+ input {
4624
+ border: none;
4625
+ font-family: inherit;
4626
+ font-size: inherit;
4627
+ flex: 1;
4628
+ height: 2.5rem;
4629
+ outline: none;
4630
+ background-color: transparent;
4631
+ color: var(--input-text-color);
4632
+ }
4633
+
4634
+ [part='scroll-container'] {
4635
+ scrollbar-width: thin;
4636
+ scrollbar-color: #7f7f7f transparent !important;
4637
+ }
4638
+
4639
+ [part='scroll-container']::-webkit-scrollbar {
4640
+ width: 3px !important;
4641
+ background-color: transparent;
4642
+ border-left: none;
4643
+ }
4644
+ [part='scroll-container']::-webkit-scrollbar-thumb {
4645
+ background-color: #7f7f7f;
4646
+ }
4647
+ [part='scroll-container']::-webkit-scrollbar-track {
4648
+ -webkit-box-shadow: none !important;
4649
+ box-shadow: none !important;
4650
+ background-color: transparent;
4651
+ }
4652
+ `
4653
+ ];
4654
+ bt([
4655
+ T()
4656
+ ], H.prototype, "message", 2);
4657
+ bt([
4658
+ T()
4659
+ ], H.prototype, "disabled", 2);
4660
+ bt([
4661
+ T()
4662
+ ], H.prototype, "platform", 2);
4663
+ bt([
4664
+ T()
4665
+ ], H.prototype, "entries", 2);
4666
+ bt([
4667
+ T()
4668
+ ], H.prototype, "typing", 2);
4669
+ const Ho = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4670
+ __proto__: null,
4671
+ Conversation: H,
4672
+ default: H
4673
+ }, Symbol.toStringTag, { value: "Module" }));
2
4674
  export {
3
- a as Agent,
4
- e as ConversationComponent,
5
- n as ConversationEntry,
6
- r as ConversationMessageType,
7
- t as ConversationPlatform,
8
- i as ConversationProvider,
9
- C as ConversationSessionState,
10
- v as User
4675
+ wr as Agent,
4676
+ H as Conversation,
4677
+ Do as ConversationComponent,
4678
+ Zt as ConversationEntry,
4679
+ I as ConversationMessageType,
4680
+ An as ConversationPlatform,
4681
+ No as ConversationProvider,
4682
+ _r as User
11
4683
  };