@telia-ace/widget-side-menu 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3668 @@
1
+ var Bt = function(s, t) {
2
+ return Bt = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, i) {
3
+ e.__proto__ = i;
4
+ } || function(e, i) {
5
+ for (var n in i)
6
+ Object.prototype.hasOwnProperty.call(i, n) && (e[n] = i[n]);
7
+ }, Bt(s, t);
8
+ };
9
+ function K(s, t) {
10
+ if (typeof t != "function" && t !== null)
11
+ throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
12
+ Bt(s, t);
13
+ function e() {
14
+ this.constructor = s;
15
+ }
16
+ s.prototype = t === null ? Object.create(t) : (e.prototype = t.prototype, new e());
17
+ }
18
+ function Gs(s, t, e, i) {
19
+ function n(r) {
20
+ return r instanceof e ? r : new e(function(o) {
21
+ o(r);
22
+ });
23
+ }
24
+ return new (e || (e = Promise))(function(r, o) {
25
+ function a(u) {
26
+ try {
27
+ c(i.next(u));
28
+ } catch (h) {
29
+ o(h);
30
+ }
31
+ }
32
+ function l(u) {
33
+ try {
34
+ c(i.throw(u));
35
+ } catch (h) {
36
+ o(h);
37
+ }
38
+ }
39
+ function c(u) {
40
+ u.done ? r(u.value) : n(u.value).then(a, l);
41
+ }
42
+ c((i = i.apply(s, t || [])).next());
43
+ });
44
+ }
45
+ function Ge(s, t) {
46
+ var e = { label: 0, sent: function() {
47
+ if (r[0] & 1)
48
+ throw r[1];
49
+ return r[1];
50
+ }, trys: [], ops: [] }, i, n, r, o;
51
+ return o = { next: a(0), throw: a(1), return: a(2) }, typeof Symbol == "function" && (o[Symbol.iterator] = function() {
52
+ return this;
53
+ }), o;
54
+ function a(c) {
55
+ return function(u) {
56
+ return l([c, u]);
57
+ };
58
+ }
59
+ function l(c) {
60
+ if (i)
61
+ throw new TypeError("Generator is already executing.");
62
+ for (; o && (o = 0, c[0] && (e = 0)), e; )
63
+ try {
64
+ if (i = 1, n && (r = c[0] & 2 ? n.return : c[0] ? n.throw || ((r = n.return) && r.call(n), 0) : n.next) && !(r = r.call(n, c[1])).done)
65
+ return r;
66
+ switch (n = 0, r && (c = [c[0] & 2, r.value]), c[0]) {
67
+ case 0:
68
+ case 1:
69
+ r = c;
70
+ break;
71
+ case 4:
72
+ return e.label++, { value: c[1], done: !1 };
73
+ case 5:
74
+ e.label++, n = c[1], c = [0];
75
+ continue;
76
+ case 7:
77
+ c = e.ops.pop(), e.trys.pop();
78
+ continue;
79
+ default:
80
+ if (r = e.trys, !(r = r.length > 0 && r[r.length - 1]) && (c[0] === 6 || c[0] === 2)) {
81
+ e = 0;
82
+ continue;
83
+ }
84
+ if (c[0] === 3 && (!r || c[1] > r[0] && c[1] < r[3])) {
85
+ e.label = c[1];
86
+ break;
87
+ }
88
+ if (c[0] === 6 && e.label < r[1]) {
89
+ e.label = r[1], r = c;
90
+ break;
91
+ }
92
+ if (r && e.label < r[2]) {
93
+ e.label = r[2], e.ops.push(c);
94
+ break;
95
+ }
96
+ r[2] && e.ops.pop(), e.trys.pop();
97
+ continue;
98
+ }
99
+ c = t.call(s, e);
100
+ } catch (u) {
101
+ c = [6, u], n = 0;
102
+ } finally {
103
+ i = r = 0;
104
+ }
105
+ if (c[0] & 5)
106
+ throw c[1];
107
+ return { value: c[0] ? c[1] : void 0, done: !0 };
108
+ }
109
+ }
110
+ function q(s) {
111
+ var t = typeof Symbol == "function" && Symbol.iterator, e = t && s[t], i = 0;
112
+ if (e)
113
+ return e.call(s);
114
+ if (s && typeof s.length == "number")
115
+ return {
116
+ next: function() {
117
+ return s && i >= s.length && (s = void 0), { value: s && s[i++], done: !s };
118
+ }
119
+ };
120
+ throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
121
+ }
122
+ function pt(s, t) {
123
+ var e = typeof Symbol == "function" && s[Symbol.iterator];
124
+ if (!e)
125
+ return s;
126
+ var i = e.call(s), n, r = [], o;
127
+ try {
128
+ for (; (t === void 0 || t-- > 0) && !(n = i.next()).done; )
129
+ r.push(n.value);
130
+ } catch (a) {
131
+ o = { error: a };
132
+ } finally {
133
+ try {
134
+ n && !n.done && (e = i.return) && e.call(i);
135
+ } finally {
136
+ if (o)
137
+ throw o.error;
138
+ }
139
+ }
140
+ return r;
141
+ }
142
+ function gt(s, t, e) {
143
+ if (e || arguments.length === 2)
144
+ for (var i = 0, n = t.length, r; i < n; i++)
145
+ (r || !(i in t)) && (r || (r = Array.prototype.slice.call(t, 0, i)), r[i] = t[i]);
146
+ return s.concat(r || Array.prototype.slice.call(t));
147
+ }
148
+ function F(s) {
149
+ return this instanceof F ? (this.v = s, this) : new F(s);
150
+ }
151
+ function Ks(s, t, e) {
152
+ if (!Symbol.asyncIterator)
153
+ throw new TypeError("Symbol.asyncIterator is not defined.");
154
+ var i = e.apply(s, t || []), n, r = [];
155
+ return n = {}, o("next"), o("throw"), o("return"), n[Symbol.asyncIterator] = function() {
156
+ return this;
157
+ }, n;
158
+ function o(d) {
159
+ i[d] && (n[d] = function(f) {
160
+ return new Promise(function($, g) {
161
+ r.push([d, f, $, g]) > 1 || a(d, f);
162
+ });
163
+ });
164
+ }
165
+ function a(d, f) {
166
+ try {
167
+ l(i[d](f));
168
+ } catch ($) {
169
+ h(r[0][3], $);
170
+ }
171
+ }
172
+ function l(d) {
173
+ d.value instanceof F ? Promise.resolve(d.value.v).then(c, u) : h(r[0][2], d);
174
+ }
175
+ function c(d) {
176
+ a("next", d);
177
+ }
178
+ function u(d) {
179
+ a("throw", d);
180
+ }
181
+ function h(d, f) {
182
+ d(f), r.shift(), r.length && a(r[0][0], r[0][1]);
183
+ }
184
+ }
185
+ function Xs(s) {
186
+ if (!Symbol.asyncIterator)
187
+ throw new TypeError("Symbol.asyncIterator is not defined.");
188
+ var t = s[Symbol.asyncIterator], e;
189
+ return t ? t.call(s) : (s = typeof q == "function" ? q(s) : s[Symbol.iterator](), e = {}, i("next"), i("throw"), i("return"), e[Symbol.asyncIterator] = function() {
190
+ return this;
191
+ }, e);
192
+ function i(r) {
193
+ e[r] = s[r] && function(o) {
194
+ return new Promise(function(a, l) {
195
+ o = s[r](o), n(a, l, o.done, o.value);
196
+ });
197
+ };
198
+ }
199
+ function n(r, o, a, l) {
200
+ Promise.resolve(l).then(function(c) {
201
+ r({ value: c, done: a });
202
+ }, o);
203
+ }
204
+ }
205
+ function v(s) {
206
+ return typeof s == "function";
207
+ }
208
+ function Ke(s) {
209
+ var t = function(i) {
210
+ Error.call(i), i.stack = new Error().stack;
211
+ }, e = s(t);
212
+ return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
213
+ }
214
+ var Lt = Ke(function(s) {
215
+ return function(e) {
216
+ s(this), this.message = e ? e.length + ` errors occurred during unsubscription:
217
+ ` + e.map(function(i, n) {
218
+ return n + 1 + ") " + i.toString();
219
+ }).join(`
220
+ `) : "", this.name = "UnsubscriptionError", this.errors = e;
221
+ };
222
+ });
223
+ function zt(s, t) {
224
+ if (s) {
225
+ var e = s.indexOf(t);
226
+ 0 <= e && s.splice(e, 1);
227
+ }
228
+ }
229
+ var At = function() {
230
+ function s(t) {
231
+ this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
232
+ }
233
+ return s.prototype.unsubscribe = function() {
234
+ var t, e, i, n, r;
235
+ if (!this.closed) {
236
+ this.closed = !0;
237
+ var o = this._parentage;
238
+ if (o)
239
+ if (this._parentage = null, Array.isArray(o))
240
+ try {
241
+ for (var a = q(o), l = a.next(); !l.done; l = a.next()) {
242
+ var c = l.value;
243
+ c.remove(this);
244
+ }
245
+ } catch (g) {
246
+ t = { error: g };
247
+ } finally {
248
+ try {
249
+ l && !l.done && (e = a.return) && e.call(a);
250
+ } finally {
251
+ if (t)
252
+ throw t.error;
253
+ }
254
+ }
255
+ else
256
+ o.remove(this);
257
+ var u = this.initialTeardown;
258
+ if (v(u))
259
+ try {
260
+ u();
261
+ } catch (g) {
262
+ r = g instanceof Lt ? g.errors : [g];
263
+ }
264
+ var h = this._finalizers;
265
+ if (h) {
266
+ this._finalizers = null;
267
+ try {
268
+ for (var d = q(h), f = d.next(); !f.done; f = d.next()) {
269
+ var $ = f.value;
270
+ try {
271
+ he($);
272
+ } catch (g) {
273
+ r = r ?? [], g instanceof Lt ? r = gt(gt([], pt(r)), pt(g.errors)) : r.push(g);
274
+ }
275
+ }
276
+ } catch (g) {
277
+ i = { error: g };
278
+ } finally {
279
+ try {
280
+ f && !f.done && (n = d.return) && n.call(d);
281
+ } finally {
282
+ if (i)
283
+ throw i.error;
284
+ }
285
+ }
286
+ }
287
+ if (r)
288
+ throw new Lt(r);
289
+ }
290
+ }, s.prototype.add = function(t) {
291
+ var e;
292
+ if (t && t !== this)
293
+ if (this.closed)
294
+ he(t);
295
+ else {
296
+ if (t instanceof s) {
297
+ if (t.closed || t._hasParent(this))
298
+ return;
299
+ t._addParent(this);
300
+ }
301
+ (this._finalizers = (e = this._finalizers) !== null && e !== void 0 ? e : []).push(t);
302
+ }
303
+ }, s.prototype._hasParent = function(t) {
304
+ var e = this._parentage;
305
+ return e === t || Array.isArray(e) && e.includes(t);
306
+ }, s.prototype._addParent = function(t) {
307
+ var e = this._parentage;
308
+ this._parentage = Array.isArray(e) ? (e.push(t), e) : e ? [e, t] : t;
309
+ }, s.prototype._removeParent = function(t) {
310
+ var e = this._parentage;
311
+ e === t ? this._parentage = null : Array.isArray(e) && zt(e, t);
312
+ }, s.prototype.remove = function(t) {
313
+ var e = this._finalizers;
314
+ e && zt(e, t), t instanceof s && t._removeParent(this);
315
+ }, s.EMPTY = function() {
316
+ var t = new s();
317
+ return t.closed = !0, t;
318
+ }(), s;
319
+ }(), Xe = At.EMPTY;
320
+ function Ze(s) {
321
+ return s instanceof At || s && "closed" in s && v(s.remove) && v(s.add) && v(s.unsubscribe);
322
+ }
323
+ function he(s) {
324
+ v(s) ? s() : s.unsubscribe();
325
+ }
326
+ var Qe = {
327
+ onUnhandledError: null,
328
+ onStoppedNotification: null,
329
+ Promise: void 0,
330
+ useDeprecatedSynchronousErrorHandling: !1,
331
+ useDeprecatedNextContext: !1
332
+ }, Ft = {
333
+ setTimeout: function(s, t) {
334
+ for (var e = [], i = 2; i < arguments.length; i++)
335
+ e[i - 2] = arguments[i];
336
+ var n = Ft.delegate;
337
+ return n != null && n.setTimeout ? n.setTimeout.apply(n, gt([s, t], pt(e))) : setTimeout.apply(void 0, gt([s, t], pt(e)));
338
+ },
339
+ clearTimeout: function(s) {
340
+ var t = Ft.delegate;
341
+ return ((t == null ? void 0 : t.clearTimeout) || clearTimeout)(s);
342
+ },
343
+ delegate: void 0
344
+ };
345
+ function Je(s) {
346
+ Ft.setTimeout(function() {
347
+ throw s;
348
+ });
349
+ }
350
+ function de() {
351
+ }
352
+ function dt(s) {
353
+ s();
354
+ }
355
+ var Kt = function(s) {
356
+ K(t, s);
357
+ function t(e) {
358
+ var i = s.call(this) || this;
359
+ return i.isStopped = !1, e ? (i.destination = e, Ze(e) && e.add(i)) : i.destination = Vs, i;
360
+ }
361
+ return t.create = function(e, i, n) {
362
+ return new Wt(e, i, n);
363
+ }, t.prototype.next = function(e) {
364
+ this.isStopped || this._next(e);
365
+ }, t.prototype.error = function(e) {
366
+ this.isStopped || (this.isStopped = !0, this._error(e));
367
+ }, t.prototype.complete = function() {
368
+ this.isStopped || (this.isStopped = !0, this._complete());
369
+ }, t.prototype.unsubscribe = function() {
370
+ this.closed || (this.isStopped = !0, s.prototype.unsubscribe.call(this), this.destination = null);
371
+ }, t.prototype._next = function(e) {
372
+ this.destination.next(e);
373
+ }, t.prototype._error = function(e) {
374
+ try {
375
+ this.destination.error(e);
376
+ } finally {
377
+ this.unsubscribe();
378
+ }
379
+ }, t.prototype._complete = function() {
380
+ try {
381
+ this.destination.complete();
382
+ } finally {
383
+ this.unsubscribe();
384
+ }
385
+ }, t;
386
+ }(At), Zs = Function.prototype.bind;
387
+ function It(s, t) {
388
+ return Zs.call(s, t);
389
+ }
390
+ var Qs = function() {
391
+ function s(t) {
392
+ this.partialObserver = t;
393
+ }
394
+ return s.prototype.next = function(t) {
395
+ var e = this.partialObserver;
396
+ if (e.next)
397
+ try {
398
+ e.next(t);
399
+ } catch (i) {
400
+ ut(i);
401
+ }
402
+ }, s.prototype.error = function(t) {
403
+ var e = this.partialObserver;
404
+ if (e.error)
405
+ try {
406
+ e.error(t);
407
+ } catch (i) {
408
+ ut(i);
409
+ }
410
+ else
411
+ ut(t);
412
+ }, s.prototype.complete = function() {
413
+ var t = this.partialObserver;
414
+ if (t.complete)
415
+ try {
416
+ t.complete();
417
+ } catch (e) {
418
+ ut(e);
419
+ }
420
+ }, s;
421
+ }(), Wt = function(s) {
422
+ K(t, s);
423
+ function t(e, i, n) {
424
+ var r = s.call(this) || this, o;
425
+ if (v(e) || !e)
426
+ o = {
427
+ next: e ?? void 0,
428
+ error: i ?? void 0,
429
+ complete: n ?? void 0
430
+ };
431
+ else {
432
+ var a;
433
+ r && Qe.useDeprecatedNextContext ? (a = Object.create(e), a.unsubscribe = function() {
434
+ return r.unsubscribe();
435
+ }, o = {
436
+ next: e.next && It(e.next, a),
437
+ error: e.error && It(e.error, a),
438
+ complete: e.complete && It(e.complete, a)
439
+ }) : o = e;
440
+ }
441
+ return r.destination = new Qs(o), r;
442
+ }
443
+ return t;
444
+ }(Kt);
445
+ function ut(s) {
446
+ Je(s);
447
+ }
448
+ function Js(s) {
449
+ throw s;
450
+ }
451
+ var Vs = {
452
+ closed: !0,
453
+ next: de,
454
+ error: Js,
455
+ complete: de
456
+ }, Xt = function() {
457
+ return typeof Symbol == "function" && Symbol.observable || "@@observable";
458
+ }();
459
+ function Ve(s) {
460
+ return s;
461
+ }
462
+ function ti(s) {
463
+ return s.length === 0 ? Ve : s.length === 1 ? s[0] : function(e) {
464
+ return s.reduce(function(i, n) {
465
+ return n(i);
466
+ }, e);
467
+ };
468
+ }
469
+ var _ = function() {
470
+ function s(t) {
471
+ t && (this._subscribe = t);
472
+ }
473
+ return s.prototype.lift = function(t) {
474
+ var e = new s();
475
+ return e.source = this, e.operator = t, e;
476
+ }, s.prototype.subscribe = function(t, e, i) {
477
+ var n = this, r = si(t) ? t : new Wt(t, e, i);
478
+ return dt(function() {
479
+ var o = n, a = o.operator, l = o.source;
480
+ r.add(a ? a.call(r, l) : l ? n._subscribe(r) : n._trySubscribe(r));
481
+ }), r;
482
+ }, s.prototype._trySubscribe = function(t) {
483
+ try {
484
+ return this._subscribe(t);
485
+ } catch (e) {
486
+ t.error(e);
487
+ }
488
+ }, s.prototype.forEach = function(t, e) {
489
+ var i = this;
490
+ return e = fe(e), new e(function(n, r) {
491
+ var o = new Wt({
492
+ next: function(a) {
493
+ try {
494
+ t(a);
495
+ } catch (l) {
496
+ r(l), o.unsubscribe();
497
+ }
498
+ },
499
+ error: r,
500
+ complete: n
501
+ });
502
+ i.subscribe(o);
503
+ });
504
+ }, s.prototype._subscribe = function(t) {
505
+ var e;
506
+ return (e = this.source) === null || e === void 0 ? void 0 : e.subscribe(t);
507
+ }, s.prototype[Xt] = function() {
508
+ return this;
509
+ }, s.prototype.pipe = function() {
510
+ for (var t = [], e = 0; e < arguments.length; e++)
511
+ t[e] = arguments[e];
512
+ return ti(t)(this);
513
+ }, s.prototype.toPromise = function(t) {
514
+ var e = this;
515
+ return t = fe(t), new t(function(i, n) {
516
+ var r;
517
+ e.subscribe(function(o) {
518
+ return r = o;
519
+ }, function(o) {
520
+ return n(o);
521
+ }, function() {
522
+ return i(r);
523
+ });
524
+ });
525
+ }, s.create = function(t) {
526
+ return new s(t);
527
+ }, s;
528
+ }();
529
+ function fe(s) {
530
+ var t;
531
+ return (t = s ?? Qe.Promise) !== null && t !== void 0 ? t : Promise;
532
+ }
533
+ function ei(s) {
534
+ return s && v(s.next) && v(s.error) && v(s.complete);
535
+ }
536
+ function si(s) {
537
+ return s && s instanceof Kt || ei(s) && Ze(s);
538
+ }
539
+ function ii(s) {
540
+ return v(s == null ? void 0 : s.lift);
541
+ }
542
+ function Et(s) {
543
+ return function(t) {
544
+ if (ii(t))
545
+ return t.lift(function(e) {
546
+ try {
547
+ return s(e, this);
548
+ } catch (i) {
549
+ this.error(i);
550
+ }
551
+ });
552
+ throw new TypeError("Unable to lift unknown Observable type");
553
+ };
554
+ }
555
+ function $t(s, t, e, i, n) {
556
+ return new ni(s, t, e, i, n);
557
+ }
558
+ var ni = function(s) {
559
+ K(t, s);
560
+ function t(e, i, n, r, o, a) {
561
+ var l = s.call(this, e) || this;
562
+ return l.onFinalize = o, l.shouldUnsubscribe = a, l._next = i ? function(c) {
563
+ try {
564
+ i(c);
565
+ } catch (u) {
566
+ e.error(u);
567
+ }
568
+ } : s.prototype._next, l._error = r ? function(c) {
569
+ try {
570
+ r(c);
571
+ } catch (u) {
572
+ e.error(u);
573
+ } finally {
574
+ this.unsubscribe();
575
+ }
576
+ } : s.prototype._error, l._complete = n ? function() {
577
+ try {
578
+ n();
579
+ } catch (c) {
580
+ e.error(c);
581
+ } finally {
582
+ this.unsubscribe();
583
+ }
584
+ } : s.prototype._complete, l;
585
+ }
586
+ return t.prototype.unsubscribe = function() {
587
+ var e;
588
+ if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
589
+ var i = this.closed;
590
+ s.prototype.unsubscribe.call(this), !i && ((e = this.onFinalize) === null || e === void 0 || e.call(this));
591
+ }
592
+ }, t;
593
+ }(Kt), ri = Ke(function(s) {
594
+ return function() {
595
+ s(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
596
+ };
597
+ }), Ct = function(s) {
598
+ K(t, s);
599
+ function t() {
600
+ var e = s.call(this) || this;
601
+ return e.closed = !1, e.currentObservers = null, e.observers = [], e.isStopped = !1, e.hasError = !1, e.thrownError = null, e;
602
+ }
603
+ return t.prototype.lift = function(e) {
604
+ var i = new pe(this, this);
605
+ return i.operator = e, i;
606
+ }, t.prototype._throwIfClosed = function() {
607
+ if (this.closed)
608
+ throw new ri();
609
+ }, t.prototype.next = function(e) {
610
+ var i = this;
611
+ dt(function() {
612
+ var n, r;
613
+ if (i._throwIfClosed(), !i.isStopped) {
614
+ i.currentObservers || (i.currentObservers = Array.from(i.observers));
615
+ try {
616
+ for (var o = q(i.currentObservers), a = o.next(); !a.done; a = o.next()) {
617
+ var l = a.value;
618
+ l.next(e);
619
+ }
620
+ } catch (c) {
621
+ n = { error: c };
622
+ } finally {
623
+ try {
624
+ a && !a.done && (r = o.return) && r.call(o);
625
+ } finally {
626
+ if (n)
627
+ throw n.error;
628
+ }
629
+ }
630
+ }
631
+ });
632
+ }, t.prototype.error = function(e) {
633
+ var i = this;
634
+ dt(function() {
635
+ if (i._throwIfClosed(), !i.isStopped) {
636
+ i.hasError = i.isStopped = !0, i.thrownError = e;
637
+ for (var n = i.observers; n.length; )
638
+ n.shift().error(e);
639
+ }
640
+ });
641
+ }, t.prototype.complete = function() {
642
+ var e = this;
643
+ dt(function() {
644
+ if (e._throwIfClosed(), !e.isStopped) {
645
+ e.isStopped = !0;
646
+ for (var i = e.observers; i.length; )
647
+ i.shift().complete();
648
+ }
649
+ });
650
+ }, t.prototype.unsubscribe = function() {
651
+ this.isStopped = this.closed = !0, this.observers = this.currentObservers = null;
652
+ }, Object.defineProperty(t.prototype, "observed", {
653
+ get: function() {
654
+ var e;
655
+ return ((e = this.observers) === null || e === void 0 ? void 0 : e.length) > 0;
656
+ },
657
+ enumerable: !1,
658
+ configurable: !0
659
+ }), t.prototype._trySubscribe = function(e) {
660
+ return this._throwIfClosed(), s.prototype._trySubscribe.call(this, e);
661
+ }, t.prototype._subscribe = function(e) {
662
+ return this._throwIfClosed(), this._checkFinalizedStatuses(e), this._innerSubscribe(e);
663
+ }, t.prototype._innerSubscribe = function(e) {
664
+ var i = this, n = this, r = n.hasError, o = n.isStopped, a = n.observers;
665
+ return r || o ? Xe : (this.currentObservers = null, a.push(e), new At(function() {
666
+ i.currentObservers = null, zt(a, e);
667
+ }));
668
+ }, t.prototype._checkFinalizedStatuses = function(e) {
669
+ var i = this, n = i.hasError, r = i.thrownError, o = i.isStopped;
670
+ n ? e.error(r) : o && e.complete();
671
+ }, t.prototype.asObservable = function() {
672
+ var e = new _();
673
+ return e.source = this, e;
674
+ }, t.create = function(e, i) {
675
+ return new pe(e, i);
676
+ }, t;
677
+ }(_), pe = function(s) {
678
+ K(t, s);
679
+ function t(e, i) {
680
+ var n = s.call(this) || this;
681
+ return n.destination = e, n.source = i, n;
682
+ }
683
+ return t.prototype.next = function(e) {
684
+ var i, n;
685
+ (n = (i = this.destination) === null || i === void 0 ? void 0 : i.next) === null || n === void 0 || n.call(i, e);
686
+ }, t.prototype.error = function(e) {
687
+ var i, n;
688
+ (n = (i = this.destination) === null || i === void 0 ? void 0 : i.error) === null || n === void 0 || n.call(i, e);
689
+ }, t.prototype.complete = function() {
690
+ var e, i;
691
+ (i = (e = this.destination) === null || e === void 0 ? void 0 : e.complete) === null || i === void 0 || i.call(e);
692
+ }, t.prototype._subscribe = function(e) {
693
+ var i, n;
694
+ return (n = (i = this.source) === null || i === void 0 ? void 0 : i.subscribe(e)) !== null && n !== void 0 ? n : Xe;
695
+ }, t;
696
+ }(Ct), oi = function(s) {
697
+ K(t, s);
698
+ function t(e) {
699
+ var i = s.call(this) || this;
700
+ return i._value = e, i;
701
+ }
702
+ return Object.defineProperty(t.prototype, "value", {
703
+ get: function() {
704
+ return this.getValue();
705
+ },
706
+ enumerable: !1,
707
+ configurable: !0
708
+ }), t.prototype._subscribe = function(e) {
709
+ var i = s.prototype._subscribe.call(this, e);
710
+ return !i.closed && e.next(this._value), i;
711
+ }, t.prototype.getValue = function() {
712
+ var e = this, i = e.hasError, n = e.thrownError, r = e._value;
713
+ if (i)
714
+ throw n;
715
+ return this._throwIfClosed(), r;
716
+ }, t.prototype.next = function(e) {
717
+ s.prototype.next.call(this, this._value = e);
718
+ }, t;
719
+ }(Ct), ai = new _(function(s) {
720
+ return s.complete();
721
+ });
722
+ function li(s) {
723
+ return s && v(s.schedule);
724
+ }
725
+ function ts(s) {
726
+ return s[s.length - 1];
727
+ }
728
+ function ci(s) {
729
+ return li(ts(s)) ? s.pop() : void 0;
730
+ }
731
+ function ui(s, t) {
732
+ return typeof ts(s) == "number" ? s.pop() : t;
733
+ }
734
+ var es = function(s) {
735
+ return s && typeof s.length == "number" && typeof s != "function";
736
+ };
737
+ function ss(s) {
738
+ return v(s == null ? void 0 : s.then);
739
+ }
740
+ function is(s) {
741
+ return v(s[Xt]);
742
+ }
743
+ function ns(s) {
744
+ return Symbol.asyncIterator && v(s == null ? void 0 : s[Symbol.asyncIterator]);
745
+ }
746
+ function rs(s) {
747
+ return new TypeError("You provided " + (s !== null && typeof s == "object" ? "an invalid object" : "'" + s + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
748
+ }
749
+ function hi() {
750
+ return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
751
+ }
752
+ var os = hi();
753
+ function as(s) {
754
+ return v(s == null ? void 0 : s[os]);
755
+ }
756
+ function ls(s) {
757
+ return Ks(this, arguments, function() {
758
+ var e, i, n, r;
759
+ return Ge(this, function(o) {
760
+ switch (o.label) {
761
+ case 0:
762
+ e = s.getReader(), o.label = 1;
763
+ case 1:
764
+ o.trys.push([1, , 9, 10]), o.label = 2;
765
+ case 2:
766
+ return [4, F(e.read())];
767
+ case 3:
768
+ return i = o.sent(), n = i.value, r = i.done, r ? [4, F(void 0)] : [3, 5];
769
+ case 4:
770
+ return [2, o.sent()];
771
+ case 5:
772
+ return [4, F(n)];
773
+ case 6:
774
+ return [4, o.sent()];
775
+ case 7:
776
+ return o.sent(), [3, 2];
777
+ case 8:
778
+ return [3, 10];
779
+ case 9:
780
+ return e.releaseLock(), [7];
781
+ case 10:
782
+ return [2];
783
+ }
784
+ });
785
+ });
786
+ }
787
+ function cs(s) {
788
+ return v(s == null ? void 0 : s.getReader);
789
+ }
790
+ function X(s) {
791
+ if (s instanceof _)
792
+ return s;
793
+ if (s != null) {
794
+ if (is(s))
795
+ return di(s);
796
+ if (es(s))
797
+ return fi(s);
798
+ if (ss(s))
799
+ return pi(s);
800
+ if (ns(s))
801
+ return us(s);
802
+ if (as(s))
803
+ return gi(s);
804
+ if (cs(s))
805
+ return $i(s);
806
+ }
807
+ throw rs(s);
808
+ }
809
+ function di(s) {
810
+ return new _(function(t) {
811
+ var e = s[Xt]();
812
+ if (v(e.subscribe))
813
+ return e.subscribe(t);
814
+ throw new TypeError("Provided object does not correctly implement Symbol.observable");
815
+ });
816
+ }
817
+ function fi(s) {
818
+ return new _(function(t) {
819
+ for (var e = 0; e < s.length && !t.closed; e++)
820
+ t.next(s[e]);
821
+ t.complete();
822
+ });
823
+ }
824
+ function pi(s) {
825
+ return new _(function(t) {
826
+ s.then(function(e) {
827
+ t.closed || (t.next(e), t.complete());
828
+ }, function(e) {
829
+ return t.error(e);
830
+ }).then(null, Je);
831
+ });
832
+ }
833
+ function gi(s) {
834
+ return new _(function(t) {
835
+ var e, i;
836
+ try {
837
+ for (var n = q(s), r = n.next(); !r.done; r = n.next()) {
838
+ var o = r.value;
839
+ if (t.next(o), t.closed)
840
+ return;
841
+ }
842
+ } catch (a) {
843
+ e = { error: a };
844
+ } finally {
845
+ try {
846
+ r && !r.done && (i = n.return) && i.call(n);
847
+ } finally {
848
+ if (e)
849
+ throw e.error;
850
+ }
851
+ }
852
+ t.complete();
853
+ });
854
+ }
855
+ function us(s) {
856
+ return new _(function(t) {
857
+ vi(s, t).catch(function(e) {
858
+ return t.error(e);
859
+ });
860
+ });
861
+ }
862
+ function $i(s) {
863
+ return us(ls(s));
864
+ }
865
+ function vi(s, t) {
866
+ var e, i, n, r;
867
+ return Gs(this, void 0, void 0, function() {
868
+ var o, a;
869
+ return Ge(this, function(l) {
870
+ switch (l.label) {
871
+ case 0:
872
+ l.trys.push([0, 5, 6, 11]), e = Xs(s), l.label = 1;
873
+ case 1:
874
+ return [4, e.next()];
875
+ case 2:
876
+ if (i = l.sent(), !!i.done)
877
+ return [3, 4];
878
+ if (o = i.value, t.next(o), t.closed)
879
+ return [2];
880
+ l.label = 3;
881
+ case 3:
882
+ return [3, 1];
883
+ case 4:
884
+ return [3, 11];
885
+ case 5:
886
+ return a = l.sent(), n = { error: a }, [3, 11];
887
+ case 6:
888
+ return l.trys.push([6, , 9, 10]), i && !i.done && (r = e.return) ? [4, r.call(e)] : [3, 8];
889
+ case 7:
890
+ l.sent(), l.label = 8;
891
+ case 8:
892
+ return [3, 10];
893
+ case 9:
894
+ if (n)
895
+ throw n.error;
896
+ return [7];
897
+ case 10:
898
+ return [7];
899
+ case 11:
900
+ return t.complete(), [2];
901
+ }
902
+ });
903
+ });
904
+ }
905
+ function k(s, t, e, i, n) {
906
+ i === void 0 && (i = 0), n === void 0 && (n = !1);
907
+ var r = t.schedule(function() {
908
+ e(), n ? s.add(this.schedule(null, i)) : this.unsubscribe();
909
+ }, i);
910
+ if (s.add(r), !n)
911
+ return r;
912
+ }
913
+ function hs(s, t) {
914
+ return t === void 0 && (t = 0), Et(function(e, i) {
915
+ e.subscribe($t(i, function(n) {
916
+ return k(i, s, function() {
917
+ return i.next(n);
918
+ }, t);
919
+ }, function() {
920
+ return k(i, s, function() {
921
+ return i.complete();
922
+ }, t);
923
+ }, function(n) {
924
+ return k(i, s, function() {
925
+ return i.error(n);
926
+ }, t);
927
+ }));
928
+ });
929
+ }
930
+ function ds(s, t) {
931
+ return t === void 0 && (t = 0), Et(function(e, i) {
932
+ i.add(s.schedule(function() {
933
+ return e.subscribe(i);
934
+ }, t));
935
+ });
936
+ }
937
+ function mi(s, t) {
938
+ return X(s).pipe(ds(t), hs(t));
939
+ }
940
+ function yi(s, t) {
941
+ return X(s).pipe(ds(t), hs(t));
942
+ }
943
+ function bi(s, t) {
944
+ return new _(function(e) {
945
+ var i = 0;
946
+ return t.schedule(function() {
947
+ i === s.length ? e.complete() : (e.next(s[i++]), e.closed || this.schedule());
948
+ });
949
+ });
950
+ }
951
+ function _i(s, t) {
952
+ return new _(function(e) {
953
+ var i;
954
+ return k(e, t, function() {
955
+ i = s[os](), k(e, t, function() {
956
+ var n, r, o;
957
+ try {
958
+ n = i.next(), r = n.value, o = n.done;
959
+ } catch (a) {
960
+ e.error(a);
961
+ return;
962
+ }
963
+ o ? e.complete() : e.next(r);
964
+ }, 0, !0);
965
+ }), function() {
966
+ return v(i == null ? void 0 : i.return) && i.return();
967
+ };
968
+ });
969
+ }
970
+ function fs(s, t) {
971
+ if (!s)
972
+ throw new Error("Iterable cannot be null");
973
+ return new _(function(e) {
974
+ k(e, t, function() {
975
+ var i = s[Symbol.asyncIterator]();
976
+ k(e, t, function() {
977
+ i.next().then(function(n) {
978
+ n.done ? e.complete() : e.next(n.value);
979
+ });
980
+ }, 0, !0);
981
+ });
982
+ });
983
+ }
984
+ function wi(s, t) {
985
+ return fs(ls(s), t);
986
+ }
987
+ function xi(s, t) {
988
+ if (s != null) {
989
+ if (is(s))
990
+ return mi(s, t);
991
+ if (es(s))
992
+ return bi(s, t);
993
+ if (ss(s))
994
+ return yi(s, t);
995
+ if (ns(s))
996
+ return fs(s, t);
997
+ if (as(s))
998
+ return _i(s, t);
999
+ if (cs(s))
1000
+ return wi(s, t);
1001
+ }
1002
+ throw rs(s);
1003
+ }
1004
+ function Si(s, t) {
1005
+ return t ? xi(s, t) : X(s);
1006
+ }
1007
+ function Ai(s, t) {
1008
+ return Et(function(e, i) {
1009
+ var n = 0;
1010
+ e.subscribe($t(i, function(r) {
1011
+ i.next(s.call(t, r, n++));
1012
+ }));
1013
+ });
1014
+ }
1015
+ function Ei(s, t, e, i, n, r, o, a) {
1016
+ var l = [], c = 0, u = 0, h = !1, d = function() {
1017
+ h && !l.length && !c && t.complete();
1018
+ }, f = function(g) {
1019
+ return c < i ? $(g) : l.push(g);
1020
+ }, $ = function(g) {
1021
+ r && t.next(g), c++;
1022
+ var ue = !1;
1023
+ X(e(g, u++)).subscribe($t(t, function(Z) {
1024
+ n == null || n(Z), r ? f(Z) : t.next(Z);
1025
+ }, function() {
1026
+ ue = !0;
1027
+ }, void 0, function() {
1028
+ if (ue)
1029
+ try {
1030
+ c--;
1031
+ for (var Z = function() {
1032
+ var ct = l.shift();
1033
+ o ? k(t, o, function() {
1034
+ return $(ct);
1035
+ }) : $(ct);
1036
+ }; l.length && c < i; )
1037
+ Z();
1038
+ d();
1039
+ } catch (ct) {
1040
+ t.error(ct);
1041
+ }
1042
+ }));
1043
+ };
1044
+ return s.subscribe($t(t, f, function() {
1045
+ h = !0, d();
1046
+ })), function() {
1047
+ a == null || a();
1048
+ };
1049
+ }
1050
+ function ps(s, t, e) {
1051
+ return e === void 0 && (e = 1 / 0), v(t) ? ps(function(i, n) {
1052
+ return Ai(function(r, o) {
1053
+ return t(i, r, n, o);
1054
+ })(X(s(i, n)));
1055
+ }, e) : (typeof t == "number" && (e = t), Et(function(i, n) {
1056
+ return Ei(i, n, s, e);
1057
+ }));
1058
+ }
1059
+ function Ci(s) {
1060
+ return s === void 0 && (s = 1 / 0), ps(Ve, s);
1061
+ }
1062
+ function ki() {
1063
+ for (var s = [], t = 0; t < arguments.length; t++)
1064
+ s[t] = arguments[t];
1065
+ var e = ci(s), i = ui(s, 1 / 0), n = s;
1066
+ return n.length ? n.length === 1 ? X(n[0]) : Ci(i)(Si(n, e)) : ai;
1067
+ }
1068
+ /**
1069
+ * @license
1070
+ * Copyright 2019 Google LLC
1071
+ * SPDX-License-Identifier: BSD-3-Clause
1072
+ */
1073
+ const ft = globalThis, Zt = ft.ShadowRoot && (ft.ShadyCSS === void 0 || ft.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Qt = Symbol(), ge = /* @__PURE__ */ new WeakMap();
1074
+ let gs = class {
1075
+ constructor(t, e, i) {
1076
+ if (this._$cssResult$ = !0, i !== Qt)
1077
+ throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
1078
+ this.cssText = t, this.t = e;
1079
+ }
1080
+ get styleSheet() {
1081
+ let t = this.o;
1082
+ const e = this.t;
1083
+ if (Zt && t === void 0) {
1084
+ const i = e !== void 0 && e.length === 1;
1085
+ i && (t = ge.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && ge.set(e, t));
1086
+ }
1087
+ return t;
1088
+ }
1089
+ toString() {
1090
+ return this.cssText;
1091
+ }
1092
+ };
1093
+ const Oi = (s) => new gs(typeof s == "string" ? s : s + "", void 0, Qt), M = (s, ...t) => {
1094
+ const e = s.length === 1 ? s[0] : t.reduce((i, n, r) => i + ((o) => {
1095
+ if (o._$cssResult$ === !0)
1096
+ return o.cssText;
1097
+ if (typeof o == "number")
1098
+ return o;
1099
+ 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.");
1100
+ })(n) + s[r + 1], s[0]);
1101
+ return new gs(e, s, Qt);
1102
+ }, Ti = (s, t) => {
1103
+ if (Zt)
1104
+ s.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
1105
+ else
1106
+ for (const e of t) {
1107
+ const i = document.createElement("style"), n = ft.litNonce;
1108
+ n !== void 0 && i.setAttribute("nonce", n), i.textContent = e.cssText, s.appendChild(i);
1109
+ }
1110
+ }, $e = Zt ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
1111
+ let e = "";
1112
+ for (const i of t.cssRules)
1113
+ e += i.cssText;
1114
+ return Oi(e);
1115
+ })(s) : s;
1116
+ /**
1117
+ * @license
1118
+ * Copyright 2017 Google LLC
1119
+ * SPDX-License-Identifier: BSD-3-Clause
1120
+ */
1121
+ const { is: Pi, defineProperty: Li, getOwnPropertyDescriptor: Ii, getOwnPropertyNames: Ri, getOwnPropertySymbols: Ui, getPrototypeOf: ji } = Object, O = globalThis, ve = O.trustedTypes, Mi = ve ? ve.emptyScript : "", Rt = O.reactiveElementPolyfillSupport, J = (s, t) => s, vt = { toAttribute(s, t) {
1122
+ switch (t) {
1123
+ case Boolean:
1124
+ s = s ? Mi : null;
1125
+ break;
1126
+ case Object:
1127
+ case Array:
1128
+ s = s == null ? s : JSON.stringify(s);
1129
+ }
1130
+ return s;
1131
+ }, fromAttribute(s, t) {
1132
+ let e = s;
1133
+ switch (t) {
1134
+ case Boolean:
1135
+ e = s !== null;
1136
+ break;
1137
+ case Number:
1138
+ e = s === null ? null : Number(s);
1139
+ break;
1140
+ case Object:
1141
+ case Array:
1142
+ try {
1143
+ e = JSON.parse(s);
1144
+ } catch {
1145
+ e = null;
1146
+ }
1147
+ }
1148
+ return e;
1149
+ } }, Jt = (s, t) => !Pi(s, t), me = { attribute: !0, type: String, converter: vt, reflect: !1, hasChanged: Jt };
1150
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), O.litPropertyMetadata ?? (O.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
1151
+ let D = class extends HTMLElement {
1152
+ static addInitializer(t) {
1153
+ this._$Ei(), (this.l ?? (this.l = [])).push(t);
1154
+ }
1155
+ static get observedAttributes() {
1156
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
1157
+ }
1158
+ static createProperty(t, e = me) {
1159
+ if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
1160
+ const i = Symbol(), n = this.getPropertyDescriptor(t, i, e);
1161
+ n !== void 0 && Li(this.prototype, t, n);
1162
+ }
1163
+ }
1164
+ static getPropertyDescriptor(t, e, i) {
1165
+ const { get: n, set: r } = Ii(this.prototype, t) ?? { get() {
1166
+ return this[e];
1167
+ }, set(o) {
1168
+ this[e] = o;
1169
+ } };
1170
+ return { get() {
1171
+ return n == null ? void 0 : n.call(this);
1172
+ }, set(o) {
1173
+ const a = n == null ? void 0 : n.call(this);
1174
+ r.call(this, o), this.requestUpdate(t, a, i);
1175
+ }, configurable: !0, enumerable: !0 };
1176
+ }
1177
+ static getPropertyOptions(t) {
1178
+ return this.elementProperties.get(t) ?? me;
1179
+ }
1180
+ static _$Ei() {
1181
+ if (this.hasOwnProperty(J("elementProperties")))
1182
+ return;
1183
+ const t = ji(this);
1184
+ t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
1185
+ }
1186
+ static finalize() {
1187
+ if (this.hasOwnProperty(J("finalized")))
1188
+ return;
1189
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(J("properties"))) {
1190
+ const e = this.properties, i = [...Ri(e), ...Ui(e)];
1191
+ for (const n of i)
1192
+ this.createProperty(n, e[n]);
1193
+ }
1194
+ const t = this[Symbol.metadata];
1195
+ if (t !== null) {
1196
+ const e = litPropertyMetadata.get(t);
1197
+ if (e !== void 0)
1198
+ for (const [i, n] of e)
1199
+ this.elementProperties.set(i, n);
1200
+ }
1201
+ this._$Eh = /* @__PURE__ */ new Map();
1202
+ for (const [e, i] of this.elementProperties) {
1203
+ const n = this._$Eu(e, i);
1204
+ n !== void 0 && this._$Eh.set(n, e);
1205
+ }
1206
+ this.elementStyles = this.finalizeStyles(this.styles);
1207
+ }
1208
+ static finalizeStyles(t) {
1209
+ const e = [];
1210
+ if (Array.isArray(t)) {
1211
+ const i = new Set(t.flat(1 / 0).reverse());
1212
+ for (const n of i)
1213
+ e.unshift($e(n));
1214
+ } else
1215
+ t !== void 0 && e.push($e(t));
1216
+ return e;
1217
+ }
1218
+ static _$Eu(t, e) {
1219
+ const i = e.attribute;
1220
+ return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
1221
+ }
1222
+ constructor() {
1223
+ super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
1224
+ }
1225
+ _$Ev() {
1226
+ var t;
1227
+ this._$ES = 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));
1228
+ }
1229
+ addController(t) {
1230
+ var e;
1231
+ (this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
1232
+ }
1233
+ removeController(t) {
1234
+ var e;
1235
+ (e = this._$EO) == null || e.delete(t);
1236
+ }
1237
+ _$E_() {
1238
+ const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
1239
+ for (const i of e.keys())
1240
+ this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
1241
+ t.size > 0 && (this._$Ep = t);
1242
+ }
1243
+ createRenderRoot() {
1244
+ const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
1245
+ return Ti(t, this.constructor.elementStyles), t;
1246
+ }
1247
+ connectedCallback() {
1248
+ var t;
1249
+ this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((e) => {
1250
+ var i;
1251
+ return (i = e.hostConnected) == null ? void 0 : i.call(e);
1252
+ });
1253
+ }
1254
+ enableUpdating(t) {
1255
+ }
1256
+ disconnectedCallback() {
1257
+ var t;
1258
+ (t = this._$EO) == null || t.forEach((e) => {
1259
+ var i;
1260
+ return (i = e.hostDisconnected) == null ? void 0 : i.call(e);
1261
+ });
1262
+ }
1263
+ attributeChangedCallback(t, e, i) {
1264
+ this._$AK(t, i);
1265
+ }
1266
+ _$EC(t, e) {
1267
+ var r;
1268
+ const i = this.constructor.elementProperties.get(t), n = this.constructor._$Eu(t, i);
1269
+ if (n !== void 0 && i.reflect === !0) {
1270
+ const o = (((r = i.converter) == null ? void 0 : r.toAttribute) !== void 0 ? i.converter : vt).toAttribute(e, i.type);
1271
+ this._$Em = t, o == null ? this.removeAttribute(n) : this.setAttribute(n, o), this._$Em = null;
1272
+ }
1273
+ }
1274
+ _$AK(t, e) {
1275
+ var r;
1276
+ const i = this.constructor, n = i._$Eh.get(t);
1277
+ if (n !== void 0 && this._$Em !== n) {
1278
+ const o = i.getPropertyOptions(n), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((r = o.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? o.converter : vt;
1279
+ this._$Em = n, this[n] = a.fromAttribute(e, o.type), this._$Em = null;
1280
+ }
1281
+ }
1282
+ requestUpdate(t, e, i) {
1283
+ if (t !== void 0) {
1284
+ if (i ?? (i = this.constructor.getPropertyOptions(t)), !(i.hasChanged ?? Jt)(this[t], e))
1285
+ return;
1286
+ this.P(t, e, i);
1287
+ }
1288
+ this.isUpdatePending === !1 && (this._$ES = this._$ET());
1289
+ }
1290
+ P(t, e, i) {
1291
+ this._$AL.has(t) || this._$AL.set(t, e), i.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
1292
+ }
1293
+ async _$ET() {
1294
+ this.isUpdatePending = !0;
1295
+ try {
1296
+ await this._$ES;
1297
+ } catch (e) {
1298
+ Promise.reject(e);
1299
+ }
1300
+ const t = this.scheduleUpdate();
1301
+ return t != null && await t, !this.isUpdatePending;
1302
+ }
1303
+ scheduleUpdate() {
1304
+ return this.performUpdate();
1305
+ }
1306
+ performUpdate() {
1307
+ var i;
1308
+ if (!this.isUpdatePending)
1309
+ return;
1310
+ if (!this.hasUpdated) {
1311
+ if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
1312
+ for (const [r, o] of this._$Ep)
1313
+ this[r] = o;
1314
+ this._$Ep = void 0;
1315
+ }
1316
+ const n = this.constructor.elementProperties;
1317
+ if (n.size > 0)
1318
+ for (const [r, o] of n)
1319
+ o.wrapped !== !0 || this._$AL.has(r) || this[r] === void 0 || this.P(r, this[r], o);
1320
+ }
1321
+ let t = !1;
1322
+ const e = this._$AL;
1323
+ try {
1324
+ t = this.shouldUpdate(e), t ? (this.willUpdate(e), (i = this._$EO) == null || i.forEach((n) => {
1325
+ var r;
1326
+ return (r = n.hostUpdate) == null ? void 0 : r.call(n);
1327
+ }), this.update(e)) : this._$EU();
1328
+ } catch (n) {
1329
+ throw t = !1, this._$EU(), n;
1330
+ }
1331
+ t && this._$AE(e);
1332
+ }
1333
+ willUpdate(t) {
1334
+ }
1335
+ _$AE(t) {
1336
+ var e;
1337
+ (e = this._$EO) == null || e.forEach((i) => {
1338
+ var n;
1339
+ return (n = i.hostUpdated) == null ? void 0 : n.call(i);
1340
+ }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
1341
+ }
1342
+ _$EU() {
1343
+ this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
1344
+ }
1345
+ get updateComplete() {
1346
+ return this.getUpdateComplete();
1347
+ }
1348
+ getUpdateComplete() {
1349
+ return this._$ES;
1350
+ }
1351
+ shouldUpdate(t) {
1352
+ return !0;
1353
+ }
1354
+ update(t) {
1355
+ this._$Ej && (this._$Ej = this._$Ej.forEach((e) => this._$EC(e, this[e]))), this._$EU();
1356
+ }
1357
+ updated(t) {
1358
+ }
1359
+ firstUpdated(t) {
1360
+ }
1361
+ };
1362
+ D.elementStyles = [], D.shadowRootOptions = { mode: "open" }, D[J("elementProperties")] = /* @__PURE__ */ new Map(), D[J("finalized")] = /* @__PURE__ */ new Map(), Rt == null || Rt({ ReactiveElement: D }), (O.reactiveElementVersions ?? (O.reactiveElementVersions = [])).push("2.0.4");
1363
+ /**
1364
+ * @license
1365
+ * Copyright 2017 Google LLC
1366
+ * SPDX-License-Identifier: BSD-3-Clause
1367
+ */
1368
+ const V = globalThis, mt = V.trustedTypes, ye = mt ? mt.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, $s = "$lit$", C = `lit$${(Math.random() + "").slice(9)}$`, vs = "?" + C, Ni = `<${vs}>`, R = document, et = () => R.createComment(""), st = (s) => s === null || typeof s != "object" && typeof s != "function", ms = Array.isArray, Di = (s) => ms(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", Ut = `[
1369
+ \f\r]`, Q = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, be = /-->/g, _e = />/g, P = RegExp(`>|${Ut}(?:([^\\s"'>=/]+)(${Ut}*=${Ut}*(?:[^
1370
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), we = /'/g, xe = /"/g, ys = /^(?:script|style|textarea|title)$/i, Hi = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), E = Hi(1), U = Symbol.for("lit-noChange"), p = Symbol.for("lit-nothing"), Se = /* @__PURE__ */ new WeakMap(), I = R.createTreeWalker(R, 129);
1371
+ function bs(s, t) {
1372
+ if (!Array.isArray(s) || !s.hasOwnProperty("raw"))
1373
+ throw Error("invalid template strings array");
1374
+ return ye !== void 0 ? ye.createHTML(t) : t;
1375
+ }
1376
+ const Bi = (s, t) => {
1377
+ const e = s.length - 1, i = [];
1378
+ let n, r = t === 2 ? "<svg>" : "", o = Q;
1379
+ for (let a = 0; a < e; a++) {
1380
+ const l = s[a];
1381
+ let c, u, h = -1, d = 0;
1382
+ for (; d < l.length && (o.lastIndex = d, u = o.exec(l), u !== null); )
1383
+ d = o.lastIndex, o === Q ? u[1] === "!--" ? o = be : u[1] !== void 0 ? o = _e : u[2] !== void 0 ? (ys.test(u[2]) && (n = RegExp("</" + u[2], "g")), o = P) : u[3] !== void 0 && (o = P) : o === P ? u[0] === ">" ? (o = n ?? Q, h = -1) : u[1] === void 0 ? h = -2 : (h = o.lastIndex - u[2].length, c = u[1], o = u[3] === void 0 ? P : u[3] === '"' ? xe : we) : o === xe || o === we ? o = P : o === be || o === _e ? o = Q : (o = P, n = void 0);
1384
+ const f = o === P && s[a + 1].startsWith("/>") ? " " : "";
1385
+ r += o === Q ? l + Ni : h >= 0 ? (i.push(c), l.slice(0, h) + $s + l.slice(h) + C + f) : l + C + (h === -2 ? a : f);
1386
+ }
1387
+ return [bs(s, r + (s[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
1388
+ };
1389
+ class it {
1390
+ constructor({ strings: t, _$litType$: e }, i) {
1391
+ let n;
1392
+ this.parts = [];
1393
+ let r = 0, o = 0;
1394
+ const a = t.length - 1, l = this.parts, [c, u] = Bi(t, e);
1395
+ if (this.el = it.createElement(c, i), I.currentNode = this.el.content, e === 2) {
1396
+ const h = this.el.content.firstChild;
1397
+ h.replaceWith(...h.childNodes);
1398
+ }
1399
+ for (; (n = I.nextNode()) !== null && l.length < a; ) {
1400
+ if (n.nodeType === 1) {
1401
+ if (n.hasAttributes())
1402
+ for (const h of n.getAttributeNames())
1403
+ if (h.endsWith($s)) {
1404
+ const d = u[o++], f = n.getAttribute(h).split(C), $ = /([.?@])?(.*)/.exec(d);
1405
+ l.push({ type: 1, index: r, name: $[2], strings: f, ctor: $[1] === "." ? Fi : $[1] === "?" ? Wi : $[1] === "@" ? Yi : kt }), n.removeAttribute(h);
1406
+ } else
1407
+ h.startsWith(C) && (l.push({ type: 6, index: r }), n.removeAttribute(h));
1408
+ if (ys.test(n.tagName)) {
1409
+ const h = n.textContent.split(C), d = h.length - 1;
1410
+ if (d > 0) {
1411
+ n.textContent = mt ? mt.emptyScript : "";
1412
+ for (let f = 0; f < d; f++)
1413
+ n.append(h[f], et()), I.nextNode(), l.push({ type: 2, index: ++r });
1414
+ n.append(h[d], et());
1415
+ }
1416
+ }
1417
+ } else if (n.nodeType === 8)
1418
+ if (n.data === vs)
1419
+ l.push({ type: 2, index: r });
1420
+ else {
1421
+ let h = -1;
1422
+ for (; (h = n.data.indexOf(C, h + 1)) !== -1; )
1423
+ l.push({ type: 7, index: r }), h += C.length - 1;
1424
+ }
1425
+ r++;
1426
+ }
1427
+ }
1428
+ static createElement(t, e) {
1429
+ const i = R.createElement("template");
1430
+ return i.innerHTML = t, i;
1431
+ }
1432
+ }
1433
+ function G(s, t, e = s, i) {
1434
+ var o, a;
1435
+ if (t === U)
1436
+ return t;
1437
+ let n = i !== void 0 ? (o = e._$Co) == null ? void 0 : o[i] : e._$Cl;
1438
+ const r = st(t) ? void 0 : t._$litDirective$;
1439
+ return (n == null ? void 0 : n.constructor) !== r && ((a = n == null ? void 0 : n._$AO) == null || a.call(n, !1), r === void 0 ? n = void 0 : (n = new r(s), n._$AT(s, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = n : e._$Cl = n), n !== void 0 && (t = G(s, n._$AS(s, t.values), n, i)), t;
1440
+ }
1441
+ class zi {
1442
+ constructor(t, e) {
1443
+ this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
1444
+ }
1445
+ get parentNode() {
1446
+ return this._$AM.parentNode;
1447
+ }
1448
+ get _$AU() {
1449
+ return this._$AM._$AU;
1450
+ }
1451
+ u(t) {
1452
+ const { el: { content: e }, parts: i } = this._$AD, n = ((t == null ? void 0 : t.creationScope) ?? R).importNode(e, !0);
1453
+ I.currentNode = n;
1454
+ let r = I.nextNode(), o = 0, a = 0, l = i[0];
1455
+ for (; l !== void 0; ) {
1456
+ if (o === l.index) {
1457
+ let c;
1458
+ l.type === 2 ? c = new rt(r, r.nextSibling, this, t) : l.type === 1 ? c = new l.ctor(r, l.name, l.strings, this, t) : l.type === 6 && (c = new qi(r, this, t)), this._$AV.push(c), l = i[++a];
1459
+ }
1460
+ o !== (l == null ? void 0 : l.index) && (r = I.nextNode(), o++);
1461
+ }
1462
+ return I.currentNode = R, n;
1463
+ }
1464
+ p(t) {
1465
+ let e = 0;
1466
+ for (const i of this._$AV)
1467
+ i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
1468
+ }
1469
+ }
1470
+ class rt {
1471
+ get _$AU() {
1472
+ var t;
1473
+ return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
1474
+ }
1475
+ constructor(t, e, i, n) {
1476
+ this.type = 2, this._$AH = p, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = n, this._$Cv = (n == null ? void 0 : n.isConnected) ?? !0;
1477
+ }
1478
+ get parentNode() {
1479
+ let t = this._$AA.parentNode;
1480
+ const e = this._$AM;
1481
+ return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t;
1482
+ }
1483
+ get startNode() {
1484
+ return this._$AA;
1485
+ }
1486
+ get endNode() {
1487
+ return this._$AB;
1488
+ }
1489
+ _$AI(t, e = this) {
1490
+ t = G(this, t, e), st(t) ? t === p || t == null || t === "" ? (this._$AH !== p && this._$AR(), this._$AH = p) : t !== this._$AH && t !== U && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Di(t) ? this.k(t) : this._(t);
1491
+ }
1492
+ S(t) {
1493
+ return this._$AA.parentNode.insertBefore(t, this._$AB);
1494
+ }
1495
+ T(t) {
1496
+ this._$AH !== t && (this._$AR(), this._$AH = this.S(t));
1497
+ }
1498
+ _(t) {
1499
+ this._$AH !== p && st(this._$AH) ? this._$AA.nextSibling.data = t : this.T(R.createTextNode(t)), this._$AH = t;
1500
+ }
1501
+ $(t) {
1502
+ var r;
1503
+ const { values: e, _$litType$: i } = t, n = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = it.createElement(bs(i.h, i.h[0]), this.options)), i);
1504
+ if (((r = this._$AH) == null ? void 0 : r._$AD) === n)
1505
+ this._$AH.p(e);
1506
+ else {
1507
+ const o = new zi(n, this), a = o.u(this.options);
1508
+ o.p(e), this.T(a), this._$AH = o;
1509
+ }
1510
+ }
1511
+ _$AC(t) {
1512
+ let e = Se.get(t.strings);
1513
+ return e === void 0 && Se.set(t.strings, e = new it(t)), e;
1514
+ }
1515
+ k(t) {
1516
+ ms(this._$AH) || (this._$AH = [], this._$AR());
1517
+ const e = this._$AH;
1518
+ let i, n = 0;
1519
+ for (const r of t)
1520
+ n === e.length ? e.push(i = new rt(this.S(et()), this.S(et()), this, this.options)) : i = e[n], i._$AI(r), n++;
1521
+ n < e.length && (this._$AR(i && i._$AB.nextSibling, n), e.length = n);
1522
+ }
1523
+ _$AR(t = this._$AA.nextSibling, e) {
1524
+ var i;
1525
+ for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0, e); t && t !== this._$AB; ) {
1526
+ const n = t.nextSibling;
1527
+ t.remove(), t = n;
1528
+ }
1529
+ }
1530
+ setConnected(t) {
1531
+ var e;
1532
+ this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
1533
+ }
1534
+ }
1535
+ class kt {
1536
+ get tagName() {
1537
+ return this.element.tagName;
1538
+ }
1539
+ get _$AU() {
1540
+ return this._$AM._$AU;
1541
+ }
1542
+ constructor(t, e, i, n, r) {
1543
+ this.type = 1, this._$AH = p, this._$AN = void 0, this.element = t, this.name = e, this._$AM = n, this.options = r, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = p;
1544
+ }
1545
+ _$AI(t, e = this, i, n) {
1546
+ const r = this.strings;
1547
+ let o = !1;
1548
+ if (r === void 0)
1549
+ t = G(this, t, e, 0), o = !st(t) || t !== this._$AH && t !== U, o && (this._$AH = t);
1550
+ else {
1551
+ const a = t;
1552
+ let l, c;
1553
+ for (t = r[0], l = 0; l < r.length - 1; l++)
1554
+ c = G(this, a[i + l], e, l), c === U && (c = this._$AH[l]), o || (o = !st(c) || c !== this._$AH[l]), c === p ? t = p : t !== p && (t += (c ?? "") + r[l + 1]), this._$AH[l] = c;
1555
+ }
1556
+ o && !n && this.j(t);
1557
+ }
1558
+ j(t) {
1559
+ t === p ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
1560
+ }
1561
+ }
1562
+ class Fi extends kt {
1563
+ constructor() {
1564
+ super(...arguments), this.type = 3;
1565
+ }
1566
+ j(t) {
1567
+ this.element[this.name] = t === p ? void 0 : t;
1568
+ }
1569
+ }
1570
+ let Wi = class extends kt {
1571
+ constructor() {
1572
+ super(...arguments), this.type = 4;
1573
+ }
1574
+ j(t) {
1575
+ this.element.toggleAttribute(this.name, !!t && t !== p);
1576
+ }
1577
+ };
1578
+ class Yi extends kt {
1579
+ constructor(t, e, i, n, r) {
1580
+ super(t, e, i, n, r), this.type = 5;
1581
+ }
1582
+ _$AI(t, e = this) {
1583
+ if ((t = G(this, t, e, 0) ?? p) === U)
1584
+ return;
1585
+ const i = this._$AH, n = t === p && i !== p || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, r = t !== p && (i === p || n);
1586
+ n && this.element.removeEventListener(this.name, this, i), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
1587
+ }
1588
+ handleEvent(t) {
1589
+ var e;
1590
+ typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
1591
+ }
1592
+ }
1593
+ class qi {
1594
+ constructor(t, e, i) {
1595
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
1596
+ }
1597
+ get _$AU() {
1598
+ return this._$AM._$AU;
1599
+ }
1600
+ _$AI(t) {
1601
+ G(this, t);
1602
+ }
1603
+ }
1604
+ const jt = V.litHtmlPolyfillSupport;
1605
+ jt == null || jt(it, rt), (V.litHtmlVersions ?? (V.litHtmlVersions = [])).push("3.1.2");
1606
+ const Gi = (s, t, e) => {
1607
+ const i = (e == null ? void 0 : e.renderBefore) ?? t;
1608
+ let n = i._$litPart$;
1609
+ if (n === void 0) {
1610
+ const r = (e == null ? void 0 : e.renderBefore) ?? null;
1611
+ i._$litPart$ = n = new rt(t.insertBefore(et(), r), r, void 0, e ?? {});
1612
+ }
1613
+ return n._$AI(s), n;
1614
+ };
1615
+ /**
1616
+ * @license
1617
+ * Copyright 2017 Google LLC
1618
+ * SPDX-License-Identifier: BSD-3-Clause
1619
+ */
1620
+ let x = class extends D {
1621
+ constructor() {
1622
+ super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
1623
+ }
1624
+ createRenderRoot() {
1625
+ var e;
1626
+ const t = super.createRenderRoot();
1627
+ return (e = this.renderOptions).renderBefore ?? (e.renderBefore = t.firstChild), t;
1628
+ }
1629
+ update(t) {
1630
+ const e = this.render();
1631
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Gi(e, this.renderRoot, this.renderOptions);
1632
+ }
1633
+ connectedCallback() {
1634
+ var t;
1635
+ super.connectedCallback(), (t = this._$Do) == null || t.setConnected(!0);
1636
+ }
1637
+ disconnectedCallback() {
1638
+ var t;
1639
+ super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
1640
+ }
1641
+ render() {
1642
+ return U;
1643
+ }
1644
+ };
1645
+ var qe;
1646
+ x._$litElement$ = !0, x.finalized = !0, (qe = globalThis.litElementHydrateSupport) == null || qe.call(globalThis, { LitElement: x });
1647
+ const Mt = globalThis.litElementPolyfillSupport;
1648
+ Mt == null || Mt({ LitElement: x });
1649
+ (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.4");
1650
+ /**
1651
+ * @license
1652
+ * Copyright 2017 Google LLC
1653
+ * SPDX-License-Identifier: BSD-3-Clause
1654
+ */
1655
+ const Ki = { attribute: !0, type: String, converter: vt, reflect: !1, hasChanged: Jt }, Xi = (s = Ki, t, e) => {
1656
+ const { kind: i, metadata: n } = e;
1657
+ let r = globalThis.litPropertyMetadata.get(n);
1658
+ if (r === void 0 && globalThis.litPropertyMetadata.set(n, r = /* @__PURE__ */ new Map()), r.set(e.name, s), i === "accessor") {
1659
+ const { name: o } = e;
1660
+ return { set(a) {
1661
+ const l = t.get.call(this);
1662
+ t.set.call(this, a), this.requestUpdate(o, l, s);
1663
+ }, init(a) {
1664
+ return a !== void 0 && this.P(o, void 0, s), a;
1665
+ } };
1666
+ }
1667
+ if (i === "setter") {
1668
+ const { name: o } = e;
1669
+ return function(a) {
1670
+ const l = this[o];
1671
+ t.call(this, a), this.requestUpdate(o, l, s);
1672
+ };
1673
+ }
1674
+ throw Error("Unsupported decorator location: " + i);
1675
+ };
1676
+ function b(s) {
1677
+ return (t, e) => typeof e == "object" ? Xi(s, t, e) : ((i, n, r) => {
1678
+ const o = n.hasOwnProperty(r);
1679
+ return n.constructor.createProperty(r, o ? { ...i, wrapped: !0 } : i), o ? Object.getOwnPropertyDescriptor(n, r) : void 0;
1680
+ })(s, t, e);
1681
+ }
1682
+ /**
1683
+ * @license
1684
+ * Copyright 2017 Google LLC
1685
+ * SPDX-License-Identifier: BSD-3-Clause
1686
+ */
1687
+ function N(s) {
1688
+ return b({ ...s, state: !0, attribute: !1 });
1689
+ }
1690
+ var Zi = Object.defineProperty, Qi = Object.getOwnPropertyDescriptor, Ji = (s, t, e, i) => {
1691
+ for (var n = i > 1 ? void 0 : i ? Qi(t, e) : t, r = s.length - 1, o; r >= 0; r--)
1692
+ (o = s[r]) && (n = (i ? o(t, e, n) : o(n)) || n);
1693
+ return i && n && Zi(t, e, n), n;
1694
+ };
1695
+ class Vt extends x {
1696
+ constructor() {
1697
+ super(...arguments), this.anchor = "BottomRight";
1698
+ }
1699
+ appendChild(t) {
1700
+ var e;
1701
+ return (e = this.shadowRoot) == null || e.appendChild(t), t;
1702
+ }
1703
+ render() {
1704
+ return this.anchor === "BottomLeft" ? this.renderRoot.host.classList.add("bottom-left") : this.anchor === "BottomRight" && this.renderRoot.host.classList.add("bottom-right"), p;
1705
+ }
1706
+ }
1707
+ Vt.styles = [
1708
+ M`
1709
+ :host {
1710
+ position: fixed;
1711
+ display: flex;
1712
+ align-items: center;
1713
+ gap: 1rem;
1714
+ }
1715
+
1716
+ :host(.bottom-right) {
1717
+ bottom: 20px;
1718
+ right: 20px;
1719
+ }
1720
+ :host(.bottom-left) {
1721
+ bottom: 20px;
1722
+ left: 20px;
1723
+ }
1724
+ `
1725
+ ];
1726
+ Ji([
1727
+ b({ attribute: !0 })
1728
+ ], Vt.prototype, "anchor", 2);
1729
+ /**
1730
+ * @license
1731
+ * Copyright 2017 Google LLC
1732
+ * SPDX-License-Identifier: BSD-3-Clause
1733
+ */
1734
+ const te = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, ee = (s) => (...t) => ({ _$litDirective$: s, values: t });
1735
+ let _s = class {
1736
+ constructor(t) {
1737
+ }
1738
+ get _$AU() {
1739
+ return this._$AM._$AU;
1740
+ }
1741
+ _$AT(t, e, i) {
1742
+ this._$Ct = t, this._$AM = e, this._$Ci = i;
1743
+ }
1744
+ _$AS(t, e) {
1745
+ return this.update(t, e);
1746
+ }
1747
+ update(t, e) {
1748
+ return this.render(...e);
1749
+ }
1750
+ };
1751
+ /**
1752
+ * @license
1753
+ * Copyright 2020 Google LLC
1754
+ * SPDX-License-Identifier: BSD-3-Clause
1755
+ */
1756
+ const Vi = (s) => s.strings === void 0;
1757
+ /**
1758
+ * @license
1759
+ * Copyright 2017 Google LLC
1760
+ * SPDX-License-Identifier: BSD-3-Clause
1761
+ */
1762
+ const tt = (s, t) => {
1763
+ var i;
1764
+ const e = s._$AN;
1765
+ if (e === void 0)
1766
+ return !1;
1767
+ for (const n of e)
1768
+ (i = n._$AO) == null || i.call(n, t, !1), tt(n, t);
1769
+ return !0;
1770
+ }, yt = (s) => {
1771
+ let t, e;
1772
+ do {
1773
+ if ((t = s._$AM) === void 0)
1774
+ break;
1775
+ e = t._$AN, e.delete(s), s = t;
1776
+ } while ((e == null ? void 0 : e.size) === 0);
1777
+ }, ws = (s) => {
1778
+ for (let t; t = s._$AM; s = t) {
1779
+ let e = t._$AN;
1780
+ if (e === void 0)
1781
+ t._$AN = e = /* @__PURE__ */ new Set();
1782
+ else if (e.has(s))
1783
+ break;
1784
+ e.add(s), sn(t);
1785
+ }
1786
+ };
1787
+ function tn(s) {
1788
+ this._$AN !== void 0 ? (yt(this), this._$AM = s, ws(this)) : this._$AM = s;
1789
+ }
1790
+ function en(s, t = !1, e = 0) {
1791
+ const i = this._$AH, n = this._$AN;
1792
+ if (n !== void 0 && n.size !== 0)
1793
+ if (t)
1794
+ if (Array.isArray(i))
1795
+ for (let r = e; r < i.length; r++)
1796
+ tt(i[r], !1), yt(i[r]);
1797
+ else
1798
+ i != null && (tt(i, !1), yt(i));
1799
+ else
1800
+ tt(this, s);
1801
+ }
1802
+ const sn = (s) => {
1803
+ s.type == te.CHILD && (s._$AP ?? (s._$AP = en), s._$AQ ?? (s._$AQ = tn));
1804
+ };
1805
+ class xs extends _s {
1806
+ constructor() {
1807
+ super(...arguments), this._$AN = void 0;
1808
+ }
1809
+ _$AT(t, e, i) {
1810
+ super._$AT(t, e, i), ws(this), this.isConnected = t._$AU;
1811
+ }
1812
+ _$AO(t, e = !0) {
1813
+ var i, n;
1814
+ t !== this.isConnected && (this.isConnected = t, t ? (i = this.reconnected) == null || i.call(this) : (n = this.disconnected) == null || n.call(this)), e && (tt(this, t), yt(this));
1815
+ }
1816
+ setValue(t) {
1817
+ if (Vi(this._$Ct))
1818
+ this._$Ct._$AI(t, this);
1819
+ else {
1820
+ const e = [...this._$Ct._$AH];
1821
+ e[this._$Ci] = t, this._$Ct._$AI(e, this, 0);
1822
+ }
1823
+ }
1824
+ disconnected() {
1825
+ }
1826
+ reconnected() {
1827
+ }
1828
+ }
1829
+ const nn = /* @__PURE__ */ new WeakMap();
1830
+ let Ae = 0;
1831
+ const Nt = /* @__PURE__ */ new Map(), Ee = /* @__PURE__ */ new WeakSet(), Ce = () => new Promise((s) => requestAnimationFrame(s)), ke = [{ transform: "translateY(-100%) scale(0)", opacity: 0 }], rn = [{ transform: "translateX(100%) scale(0)", opacity: 0 }], Oe = (s, t) => {
1832
+ const e = s - t;
1833
+ return e === 0 ? void 0 : e;
1834
+ }, Te = (s, t) => {
1835
+ const e = s / t;
1836
+ return e === 1 ? void 0 : e;
1837
+ }, Dt = { left: (s, t) => {
1838
+ const e = Oe(s, t);
1839
+ return { value: e, transform: e == null || isNaN(e) ? void 0 : `translateX(${e}px)` };
1840
+ }, top: (s, t) => {
1841
+ const e = Oe(s, t);
1842
+ return { value: e, transform: e == null || isNaN(e) ? void 0 : `translateY(${e}px)` };
1843
+ }, width: (s, t) => {
1844
+ let e;
1845
+ t === 0 && (t = 1, e = { width: "1px" });
1846
+ const i = Te(s, t);
1847
+ return { value: i, overrideFrom: e, transform: i == null || isNaN(i) ? void 0 : `scaleX(${i})` };
1848
+ }, height: (s, t) => {
1849
+ let e;
1850
+ t === 0 && (t = 1, e = { height: "1px" });
1851
+ const i = Te(s, t);
1852
+ return { value: i, overrideFrom: e, transform: i == null || isNaN(i) ? void 0 : `scaleY(${i})` };
1853
+ } }, on = { duration: 333, easing: "ease-in-out" }, an = ["left", "top", "width", "height", "opacity", "color", "background"], Pe = /* @__PURE__ */ new WeakMap();
1854
+ class ln extends xs {
1855
+ constructor(t) {
1856
+ if (super(t), this.t = !1, this.i = null, this.o = null, this.h = !0, this.shouldLog = !1, t.type === te.CHILD)
1857
+ throw Error("The `animate` directive must be used in attribute position.");
1858
+ this.createFinished();
1859
+ }
1860
+ createFinished() {
1861
+ var t;
1862
+ (t = this.resolveFinished) == null || t.call(this), this.finished = new Promise((e) => {
1863
+ this.l = e;
1864
+ });
1865
+ }
1866
+ async resolveFinished() {
1867
+ var t;
1868
+ (t = this.l) == null || t.call(this), this.l = void 0;
1869
+ }
1870
+ render(t) {
1871
+ return p;
1872
+ }
1873
+ getController() {
1874
+ return nn.get(this.u);
1875
+ }
1876
+ isDisabled() {
1877
+ var t;
1878
+ return this.options.disabled || ((t = this.getController()) == null ? void 0 : t.disabled);
1879
+ }
1880
+ update(t, [e]) {
1881
+ var n;
1882
+ const i = this.u === void 0;
1883
+ return i && (this.u = (n = t.options) == null ? void 0 : n.host, this.u.addController(this), this.u.updateComplete.then((r) => this.t = !0), this.element = t.element, Pe.set(this.element, this)), this.optionsOrCallback = e, (i || typeof e != "function") && this.p(e), this.render(e);
1884
+ }
1885
+ p(t) {
1886
+ t = t ?? {};
1887
+ const e = this.getController();
1888
+ e !== void 0 && ((t = { ...e.defaultOptions, ...t }).keyframeOptions = { ...e.defaultOptions.keyframeOptions, ...t.keyframeOptions }), t.properties ?? (t.properties = an), this.options = t;
1889
+ }
1890
+ m() {
1891
+ const t = {}, e = this.element.getBoundingClientRect(), i = getComputedStyle(this.element);
1892
+ return this.options.properties.forEach((n) => {
1893
+ const r = e[n] ?? (Dt[n] ? void 0 : i[n]), o = Number(r);
1894
+ t[n] = isNaN(o) ? r + "" : o;
1895
+ }), t;
1896
+ }
1897
+ v() {
1898
+ let t, e = !0;
1899
+ return this.options.guard && (t = this.options.guard(), e = ((i, n) => {
1900
+ if (Array.isArray(i)) {
1901
+ if (Array.isArray(n) && n.length === i.length && i.every((r, o) => r === n[o]))
1902
+ return !1;
1903
+ } else if (n === i)
1904
+ return !1;
1905
+ return !0;
1906
+ })(t, this._)), this.h = this.t && !this.isDisabled() && !this.isAnimating() && e && this.element.isConnected, this.h && (this._ = Array.isArray(t) ? Array.from(t) : t), this.h;
1907
+ }
1908
+ hostUpdate() {
1909
+ typeof this.optionsOrCallback == "function" && this.p(this.optionsOrCallback()), this.v() && (this.A = this.m(), this.i = this.i ?? this.element.parentNode, this.o = this.element.nextSibling);
1910
+ }
1911
+ async hostUpdated() {
1912
+ if (!this.h || !this.element.isConnected || this.options.skipInitial && !this.isHostRendered)
1913
+ return;
1914
+ let t;
1915
+ this.prepare(), await Ce;
1916
+ const e = this.O(), i = this.j(this.options.keyframeOptions, e), n = this.m();
1917
+ if (this.A !== void 0) {
1918
+ const { from: r, to: o } = this.N(this.A, n, e);
1919
+ this.log("measured", [this.A, n, r, o]), t = this.calculateKeyframes(r, o);
1920
+ } else {
1921
+ const r = Nt.get(this.options.inId);
1922
+ if (r) {
1923
+ Nt.delete(this.options.inId);
1924
+ const { from: o, to: a } = this.N(r, n, e);
1925
+ t = this.calculateKeyframes(o, a), t = this.options.in ? [{ ...this.options.in[0], ...t[0] }, ...this.options.in.slice(1), t[1]] : t, Ae++, t.forEach((l) => l.zIndex = Ae);
1926
+ } else
1927
+ this.options.in && (t = [...this.options.in, {}]);
1928
+ }
1929
+ this.animate(t, i);
1930
+ }
1931
+ resetStyles() {
1932
+ this.P !== void 0 && (this.element.setAttribute("style", this.P ?? ""), this.P = void 0);
1933
+ }
1934
+ commitStyles() {
1935
+ var t, e;
1936
+ this.P = this.element.getAttribute("style"), (t = this.webAnimation) == null || t.commitStyles(), (e = this.webAnimation) == null || e.cancel();
1937
+ }
1938
+ reconnected() {
1939
+ }
1940
+ async disconnected() {
1941
+ var e;
1942
+ if (!this.h || (this.options.id !== void 0 && Nt.set(this.options.id, this.A), this.options.out === void 0))
1943
+ return;
1944
+ if (this.prepare(), await Ce(), (e = this.i) == null ? void 0 : e.isConnected) {
1945
+ const i = this.o && this.o.parentNode === this.i ? this.o : null;
1946
+ if (this.i.insertBefore(this.element, i), this.options.stabilizeOut) {
1947
+ const n = this.m();
1948
+ this.log("stabilizing out");
1949
+ const r = this.A.left - n.left, o = this.A.top - n.top;
1950
+ getComputedStyle(this.element).position !== "static" || r === 0 && o === 0 || (this.element.style.position = "relative"), r !== 0 && (this.element.style.left = r + "px"), o !== 0 && (this.element.style.top = o + "px");
1951
+ }
1952
+ }
1953
+ const t = this.j(this.options.keyframeOptions);
1954
+ await this.animate(this.options.out, t), this.element.remove();
1955
+ }
1956
+ prepare() {
1957
+ this.createFinished();
1958
+ }
1959
+ start() {
1960
+ var t, e;
1961
+ (e = (t = this.options).onStart) == null || e.call(t, this);
1962
+ }
1963
+ didFinish(t) {
1964
+ var e, i;
1965
+ t && ((i = (e = this.options).onComplete) == null || i.call(e, this)), this.A = void 0, this.animatingProperties = void 0, this.frames = void 0, this.resolveFinished();
1966
+ }
1967
+ O() {
1968
+ const t = [];
1969
+ for (let e = this.element.parentNode; e; e = e == null ? void 0 : e.parentNode) {
1970
+ const i = Pe.get(e);
1971
+ i && !i.isDisabled() && i && t.push(i);
1972
+ }
1973
+ return t;
1974
+ }
1975
+ get isHostRendered() {
1976
+ const t = Ee.has(this.u);
1977
+ return t || this.u.updateComplete.then(() => {
1978
+ Ee.add(this.u);
1979
+ }), t;
1980
+ }
1981
+ j(t, e = this.O()) {
1982
+ const i = { ...on };
1983
+ return e.forEach((n) => Object.assign(i, n.options.keyframeOptions)), Object.assign(i, t), i;
1984
+ }
1985
+ N(t, e, i) {
1986
+ t = { ...t }, e = { ...e };
1987
+ const n = i.map((a) => a.animatingProperties).filter((a) => a !== void 0);
1988
+ let r = 1, o = 1;
1989
+ return n.length > 0 && (n.forEach((a) => {
1990
+ a.width && (r /= a.width), a.height && (o /= a.height);
1991
+ }), t.left !== void 0 && e.left !== void 0 && (t.left = r * t.left, e.left = r * e.left), t.top !== void 0 && e.top !== void 0 && (t.top = o * t.top, e.top = o * e.top)), { from: t, to: e };
1992
+ }
1993
+ calculateKeyframes(t, e, i = !1) {
1994
+ const n = {}, r = {};
1995
+ let o = !1;
1996
+ const a = {};
1997
+ for (const l in e) {
1998
+ const c = t[l], u = e[l];
1999
+ if (l in Dt) {
2000
+ const h = Dt[l];
2001
+ if (c === void 0 || u === void 0)
2002
+ continue;
2003
+ const d = h(c, u);
2004
+ d.transform !== void 0 && (a[l] = d.value, o = !0, n.transform = `${n.transform ?? ""} ${d.transform}`, d.overrideFrom !== void 0 && Object.assign(n, d.overrideFrom));
2005
+ } else
2006
+ c !== u && c !== void 0 && u !== void 0 && (o = !0, n[l] = c, r[l] = u);
2007
+ }
2008
+ return n.transformOrigin = r.transformOrigin = i ? "center center" : "top left", this.animatingProperties = a, o ? [n, r] : void 0;
2009
+ }
2010
+ async animate(t, e = this.options.keyframeOptions) {
2011
+ this.start(), this.frames = t;
2012
+ let i = !1;
2013
+ if (!this.isAnimating() && !this.isDisabled() && (this.options.onFrames && (this.frames = t = this.options.onFrames(this), this.log("modified frames", t)), t !== void 0)) {
2014
+ this.log("animate", [t, e]), i = !0, this.webAnimation = this.element.animate(t, e);
2015
+ const n = this.getController();
2016
+ n == null || n.add(this);
2017
+ try {
2018
+ await this.webAnimation.finished;
2019
+ } catch {
2020
+ }
2021
+ n == null || n.remove(this);
2022
+ }
2023
+ return this.didFinish(i), i;
2024
+ }
2025
+ isAnimating() {
2026
+ var t, e;
2027
+ return ((t = this.webAnimation) == null ? void 0 : t.playState) === "running" || ((e = this.webAnimation) == null ? void 0 : e.pending);
2028
+ }
2029
+ log(t, e) {
2030
+ this.shouldLog && !this.isDisabled() && console.log(t, this.options.id, e);
2031
+ }
2032
+ }
2033
+ const Ss = ee(ln), cn = { 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>' };
2034
+ /**
2035
+ * @license
2036
+ * Copyright 2018 Google LLC
2037
+ * SPDX-License-Identifier: BSD-3-Clause
2038
+ */
2039
+ const Le = ee(class extends _s {
2040
+ constructor(s) {
2041
+ var t;
2042
+ if (super(s), s.type !== te.ATTRIBUTE || s.name !== "class" || ((t = s.strings) == null ? void 0 : t.length) > 2)
2043
+ throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
2044
+ }
2045
+ render(s) {
2046
+ return " " + Object.keys(s).filter((t) => s[t]).join(" ") + " ";
2047
+ }
2048
+ update(s, [t]) {
2049
+ var i, n;
2050
+ if (this.st === void 0) {
2051
+ this.st = /* @__PURE__ */ new Set(), s.strings !== void 0 && (this.nt = new Set(s.strings.join(" ").split(/\s/).filter((r) => r !== "")));
2052
+ for (const r in t)
2053
+ t[r] && !((i = this.nt) != null && i.has(r)) && this.st.add(r);
2054
+ return this.render(t);
2055
+ }
2056
+ const e = s.element.classList;
2057
+ for (const r of this.st)
2058
+ r in t || (e.remove(r), this.st.delete(r));
2059
+ for (const r in t) {
2060
+ const o = !!t[r];
2061
+ o === this.st.has(r) || (n = this.nt) != null && n.has(r) || (o ? (e.add(r), this.st.add(r)) : (e.remove(r), this.st.delete(r)));
2062
+ }
2063
+ return U;
2064
+ }
2065
+ }), A = (s, t, e) => {
2066
+ s && e.style.setProperty(t, s);
2067
+ }, As = (s, t) => {
2068
+ var e, i, n, r, o, a, l, c, u;
2069
+ A((e = s.colors) == null ? void 0 : e.primaryBackground, "--primary-background", t), A(
2070
+ (i = s.colors) == null ? void 0 : i.textOnPrimaryBackground,
2071
+ "--text-on-primary-background",
2072
+ t
2073
+ ), A(
2074
+ (n = s.colors) == null ? void 0 : n.secondaryBackground,
2075
+ "--secondary-background",
2076
+ t
2077
+ ), A(
2078
+ (r = s.colors) == null ? void 0 : r.textOnSecondaryBackground,
2079
+ "--text-on-secondary-background",
2080
+ t
2081
+ ), A(
2082
+ (o = s.colors) == null ? void 0 : o.interactiveDestructiveBackground,
2083
+ "--destructive-color",
2084
+ t
2085
+ ), A(
2086
+ (a = s.colors) == null ? void 0 : a.interactiveTextOnDestructiveBackground,
2087
+ "--text-on-destructive-color",
2088
+ t
2089
+ ), A(
2090
+ (l = s.colors) == null ? void 0 : l.interactivePrimaryBackground,
2091
+ "--interactive-primary-background",
2092
+ t
2093
+ ), A(
2094
+ (c = s.colors) == null ? void 0 : c.interactiveTextOnPrimaryBackground,
2095
+ "--interactive-text-on-primary-background",
2096
+ t
2097
+ ), A((u = s.colors) == null ? void 0 : u.focusColor, "--focus-color", t);
2098
+ };
2099
+ /**
2100
+ * @license
2101
+ * Copyright 2020 Google LLC
2102
+ * SPDX-License-Identifier: BSD-3-Clause
2103
+ */
2104
+ const bt = () => new un();
2105
+ let un = class {
2106
+ };
2107
+ const Ht = /* @__PURE__ */ new WeakMap(), se = ee(class extends xs {
2108
+ render(s) {
2109
+ return p;
2110
+ }
2111
+ update(s, [t]) {
2112
+ var i;
2113
+ const e = t !== this.Y;
2114
+ return e && this.Y !== void 0 && this.rt(void 0), (e || this.lt !== this.ct) && (this.Y = t, this.ht = (i = s.options) == null ? void 0 : i.host, this.rt(this.ct = s.element)), p;
2115
+ }
2116
+ rt(s) {
2117
+ if (typeof this.Y == "function") {
2118
+ const t = this.ht ?? globalThis;
2119
+ let e = Ht.get(t);
2120
+ e === void 0 && (e = /* @__PURE__ */ new WeakMap(), Ht.set(t, e)), e.get(this.Y) !== void 0 && this.Y.call(this.ht, void 0), e.set(this.Y, s), s !== void 0 && this.Y.call(this.ht, s);
2121
+ } else
2122
+ this.Y.value = s;
2123
+ }
2124
+ get lt() {
2125
+ var s, t;
2126
+ return typeof this.Y == "function" ? (s = Ht.get(this.ht ?? globalThis)) == null ? void 0 : s.get(this.Y) : (t = this.Y) == null ? void 0 : t.value;
2127
+ }
2128
+ disconnected() {
2129
+ this.lt === this.ct && this.rt(void 0);
2130
+ }
2131
+ reconnected() {
2132
+ this.rt(this.ct);
2133
+ }
2134
+ });
2135
+ var hn = Object.defineProperty, dn = Object.getOwnPropertyDescriptor, ot = (s, t, e, i) => {
2136
+ for (var n = i > 1 ? void 0 : i ? dn(t, e) : t, r = s.length - 1, o; r >= 0; r--)
2137
+ (o = s[r]) && (n = (i ? o(t, e, n) : o(n)) || n);
2138
+ return i && n && hn(t, e, n), n;
2139
+ };
2140
+ class T extends x {
2141
+ constructor() {
2142
+ super(...arguments), this.active = !1, this.triggerVisible = !0, this.loaded = !1, this.containerRef = bt(), this.widgetActive$ = new oi(!1), this.componentIsDestroyed$ = new Ct();
2143
+ }
2144
+ async connectedCallback() {
2145
+ super.connectedCallback(), this.icon = await this._renderSymbol(), this.loaded = !0, this._applyBranding();
2146
+ }
2147
+ disconnectedCallback() {
2148
+ super.disconnectedCallback(), this.componentIsDestroyed$.next(), this.componentIsDestroyed$.complete();
2149
+ }
2150
+ toggleActive() {
2151
+ var t;
2152
+ if (!((t = this.application) != null && t.root)) {
2153
+ console.warn(
2154
+ "Could not activate widget. No root element assigned to widget."
2155
+ );
2156
+ return;
2157
+ }
2158
+ this.active = !this.active, this.active ? (this.application.appendToDOM(), this.widgetActive$.next(!0)) : (this.application.hide(), this.widgetActive$.next(!1));
2159
+ }
2160
+ _applyBranding() {
2161
+ var t;
2162
+ (t = this.application) != null && t.settings && As(this.application.settings.branding, this);
2163
+ }
2164
+ async _renderSymbol() {
2165
+ var a, l, c;
2166
+ const t = (a = this.application) == null ? void 0 : a.branding(), e = (l = t == null ? void 0 : t.graphics) == null ? void 0 : l.trigger;
2167
+ if (e)
2168
+ return E` <img src=${e} class="trigger-icon" alt="" /> `;
2169
+ const i = (c = this.application) == null ? void 0 : c.triggerIcon;
2170
+ if (!i)
2171
+ return p;
2172
+ const n = async (u) => cn, { type: r, content: o } = i;
2173
+ switch (r) {
2174
+ case "Telia": {
2175
+ const u = await n();
2176
+ return u ? E`<telia-icon
2177
+ class="trigger-icon"
2178
+ svg=${u.svg}
2179
+ size="lg"
2180
+ ></telia-icon>` : p;
2181
+ }
2182
+ default:
2183
+ return p;
2184
+ }
2185
+ }
2186
+ hideTrigger() {
2187
+ this.triggerVisible = !1;
2188
+ }
2189
+ showTrigger() {
2190
+ this.triggerVisible = !0;
2191
+ }
2192
+ render() {
2193
+ var t, e, i, n;
2194
+ return E`<div
2195
+ class=${Le({
2196
+ "trigger-container": !0,
2197
+ hidden: !this.triggerVisible
2198
+ })}
2199
+ ${se(this.containerRef)}
2200
+ >
2201
+ ${!this.active && ((n = (i = (e = (t = this.application) == null ? void 0 : t.settings) == null ? void 0 : e.branding) == null ? void 0 : i.other) != null && n.showButtonLabel) ? E`
2202
+ <button
2203
+ label="${this.application.settings.branding.other.buttonLabelText ?? "Widget trigger"}"
2204
+ class="trigger-label"
2205
+ @click=${this.toggleActive}
2206
+ ${Ss({
2207
+ keyframeOptions: {},
2208
+ in: rn,
2209
+ stabilizeOut: !0,
2210
+ skipInitial: !1
2211
+ })}
2212
+ >
2213
+ ${this.application.settings.branding.other.buttonLabelText}
2214
+ </button>
2215
+ ` : p}
2216
+
2217
+ <button
2218
+ label="Widget trigger"
2219
+ class=${Le({
2220
+ trigger: !0,
2221
+ active: this.active,
2222
+ rendered: this.loaded
2223
+ })}
2224
+ @click=${this.toggleActive}
2225
+ >
2226
+ ${this.icon}
2227
+ <span class="trigger-close">
2228
+ <svg
2229
+ width="18"
2230
+ height="9"
2231
+ viewBox="0 0 18 9"
2232
+ fill="none"
2233
+ xmlns="http://www.w3.org/2000/svg"
2234
+ >
2235
+ <path
2236
+ 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"
2237
+ fill="white"
2238
+ />
2239
+ </svg>
2240
+ </span>
2241
+ <span class="trigger-loader">
2242
+ <svg viewBox="25 25 50 50">
2243
+ <circle
2244
+ cx="50"
2245
+ cy="50"
2246
+ r="20"
2247
+ fill="none"
2248
+ stroke="#000"
2249
+ stroke-width="2"
2250
+ stroke-miterlimit="10"
2251
+ />
2252
+ </svg>
2253
+ </span>
2254
+ </button>
2255
+ </div>`;
2256
+ }
2257
+ }
2258
+ T.styles = [
2259
+ M`
2260
+ :host {
2261
+ --voca-rem-multiplier: 0.625;
2262
+ --trigger-label-bg: #f5e0ff;
2263
+ --trigger-label-text-color: rgba(0, 0, 0, 0.8);
2264
+ display: block;
2265
+ box-sizing: border-box;
2266
+ font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
2267
+ }
2268
+
2269
+ .trigger-container {
2270
+ display: flex;
2271
+ align-items: center;
2272
+ gap: 1rem;
2273
+ }
2274
+ .trigger-container.hidden {
2275
+ display: none;
2276
+ }
2277
+
2278
+ .trigger {
2279
+ transform: scale(0);
2280
+ box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
2281
+ z-index: 5;
2282
+ display: flex;
2283
+ align-items: center;
2284
+ justify-content: center;
2285
+ border: none;
2286
+ line-height: 55px;
2287
+ height: 55px;
2288
+ width: 55px;
2289
+ border-radius: 55px;
2290
+ cursor: pointer;
2291
+ background-color: var(
2292
+ --interactive-primary-background,
2293
+ var(--primary-background)
2294
+ );
2295
+ font-family: Lato;
2296
+ text-decoration: none;
2297
+ border: 3px dashed transparent;
2298
+ box-sizing: border-box;
2299
+ transition: transform 200ms ease-out;
2300
+ }
2301
+ .trigger:active {
2302
+ transform: scale(0.8) !important;
2303
+ }
2304
+ .trigger:hover:not(:active) {
2305
+ transform: scale(1.1) !important;
2306
+ }
2307
+ .trigger.rendered {
2308
+ transform: scale(1);
2309
+ }
2310
+ .trigger.active .trigger-icon {
2311
+ opacity: 0;
2312
+ transform: rotate(-180deg) scale(0);
2313
+ }
2314
+ .trigger.active .trigger-close {
2315
+ opacity: 1;
2316
+ transform: rotate(0deg) scale(1);
2317
+ }
2318
+
2319
+ .trigger-icon {
2320
+ display: inline-block;
2321
+ line-height: inherit;
2322
+ text-align: center;
2323
+ opacity: 1;
2324
+ transform: rotate(0deg) scale(1);
2325
+ transition: opacity 200ms ease-out, transform 200ms ease-out;
2326
+ color: var(
2327
+ --interactive-text-on-primary-background,
2328
+ var(--text-on-primary-background)
2329
+ );
2330
+ }
2331
+ .trigger-close {
2332
+ opacity: 0;
2333
+ transition: transform 200ms ease-out;
2334
+ transform: rotate(180deg) scale(0);
2335
+ position: absolute;
2336
+ top: 0;
2337
+ bottom: 0;
2338
+ left: 0;
2339
+ right: 0;
2340
+ display: flex;
2341
+ justify-content: center;
2342
+ align-items: center;
2343
+ }
2344
+ .trigger-close svg path {
2345
+ fill: var(
2346
+ --interactive-text-on-primary-background,
2347
+ var(--text-on-primary-background)
2348
+ );
2349
+ }
2350
+
2351
+ img {
2352
+ max-width: 100%;
2353
+ }
2354
+
2355
+ .trigger-label {
2356
+ box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.1);
2357
+ background-color: var(--trigger-label-bg);
2358
+ color: var(--trigger-label-text-color);
2359
+ white-space: nowrap;
2360
+ padding: 0.7rem 1rem;
2361
+ border-radius: 0.3rem;
2362
+ font-weight: 500;
2363
+ display: flex;
2364
+ justify-content: center;
2365
+ align-items: center;
2366
+ cursor: pointer;
2367
+ border: none;
2368
+ font-size: 1rem;
2369
+ font-family: inherit;
2370
+ transition: all 300ms ease-in-out;
2371
+ }
2372
+
2373
+ .trigger-label:hover {
2374
+ opacity: 0.8;
2375
+ }
2376
+ `
2377
+ ];
2378
+ ot([
2379
+ b({ attribute: !1 })
2380
+ ], T.prototype, "application", 2);
2381
+ ot([
2382
+ N()
2383
+ ], T.prototype, "active", 2);
2384
+ ot([
2385
+ N()
2386
+ ], T.prototype, "triggerVisible", 2);
2387
+ ot([
2388
+ N()
2389
+ ], T.prototype, "loaded", 2);
2390
+ ot([
2391
+ N()
2392
+ ], T.prototype, "icon", 2);
2393
+ var fn = Object.defineProperty, pn = Object.getOwnPropertyDescriptor, L = (s, t, e, i) => {
2394
+ for (var n = i > 1 ? void 0 : i ? pn(t, e) : t, r = s.length - 1, o; r >= 0; r--)
2395
+ (o = s[r]) && (n = (i ? o(t, e, n) : o(n)) || n);
2396
+ return i && n && fn(t, e, n), n;
2397
+ };
2398
+ const Es = (s) => {
2399
+ class t extends s {
2400
+ constructor() {
2401
+ super(...arguments), this.properties = {}, this.context = {}, this.layout = {}, this.nodes = [];
2402
+ }
2403
+ writeProperties(i) {
2404
+ this.properties = i;
2405
+ }
2406
+ writeLayout(i) {
2407
+ this.layout = i;
2408
+ }
2409
+ writeContext(i) {
2410
+ this.context = i;
2411
+ }
2412
+ addChild(i) {
2413
+ i.parent = this, this.nodes.push(i);
2414
+ }
2415
+ connectedCallback() {
2416
+ super.connectedCallback(), this.renderRoot.host.style.setProperty(
2417
+ "--width",
2418
+ this.layout.size === "full" ? "var(--columns, 1)" : `min(${this.layout.size || "var(--columns)"}, var(--columns))`
2419
+ ), this.application.mountComponent(this);
2420
+ }
2421
+ }
2422
+ return t.styles = [
2423
+ // (superClass as unknown as typeof LitElement).styles ?? [],
2424
+ M`
2425
+ :host {
2426
+ font-family: var(--font-family);
2427
+ grid-column: span var(--width);
2428
+ max-width: 100%;
2429
+ overflow: hidden;
2430
+ box-sizing: border-box;
2431
+ display: block;
2432
+ }
2433
+ * {
2434
+ box-sizing: border-box;
2435
+ }
2436
+ `
2437
+ ], L([
2438
+ b()
2439
+ ], t.prototype, "properties", 2), L([
2440
+ b()
2441
+ ], t.prototype, "context", 2), L([
2442
+ b()
2443
+ ], t.prototype, "layout", 2), L([
2444
+ b()
2445
+ ], t.prototype, "name", 2), L([
2446
+ b()
2447
+ ], t.prototype, "type", 2), L([
2448
+ b({ attribute: !1 })
2449
+ ], t.prototype, "application", 2), L([
2450
+ b({ attribute: !1 })
2451
+ ], t.prototype, "parent", 2), t;
2452
+ };
2453
+ class Cs extends Es(x) {
2454
+ render() {
2455
+ return E`Non resolved component`;
2456
+ }
2457
+ }
2458
+ Cs.styles = [
2459
+ M`
2460
+ :host {
2461
+ display: block;
2462
+ }
2463
+ `
2464
+ ];
2465
+ /**
2466
+ * @license
2467
+ * Copyright 2021 Google LLC
2468
+ * SPDX-License-Identifier: BSD-3-Clause
2469
+ */
2470
+ function* gn(s, t) {
2471
+ if (s !== void 0) {
2472
+ let e = 0;
2473
+ for (const i of s)
2474
+ yield t(i, e++);
2475
+ }
2476
+ }
2477
+ var ie = /* @__PURE__ */ ((s) => (s.Inline = "inline", s.Trigger = "trigger", s))(ie || {});
2478
+ /**
2479
+ * @license
2480
+ * Copyright 2021 Google LLC
2481
+ * SPDX-License-Identifier: BSD-3-Clause
2482
+ */
2483
+ let $n = class extends Event {
2484
+ constructor(t, e, i) {
2485
+ super("context-request", { bubbles: !0, composed: !0 }), this.context = t, this.callback = e, this.subscribe = i ?? !1;
2486
+ }
2487
+ };
2488
+ /**
2489
+ * @license
2490
+ * Copyright 2021 Google LLC
2491
+ * SPDX-License-Identifier: BSD-3-Clause
2492
+ */
2493
+ /**
2494
+ * @license
2495
+ * Copyright 2021 Google LLC
2496
+ * SPDX-License-Identifier: BSD-3-Clause
2497
+ */
2498
+ class vn {
2499
+ get value() {
2500
+ return this.o;
2501
+ }
2502
+ set value(t) {
2503
+ this.setValue(t);
2504
+ }
2505
+ setValue(t, e = !1) {
2506
+ const i = e || !Object.is(t, this.o);
2507
+ this.o = t, i && this.updateObservers();
2508
+ }
2509
+ constructor(t) {
2510
+ this.subscriptions = /* @__PURE__ */ new Map(), this.updateObservers = () => {
2511
+ for (const [e, { disposer: i }] of this.subscriptions)
2512
+ e(this.o, i);
2513
+ }, t !== void 0 && (this.value = t);
2514
+ }
2515
+ addCallback(t, e, i) {
2516
+ if (!i)
2517
+ return void t(this.value);
2518
+ this.subscriptions.has(t) || this.subscriptions.set(t, { disposer: () => {
2519
+ this.subscriptions.delete(t);
2520
+ }, consumerHost: e });
2521
+ const { disposer: n } = this.subscriptions.get(t);
2522
+ t(this.value, n);
2523
+ }
2524
+ clearCallbacks() {
2525
+ this.subscriptions.clear();
2526
+ }
2527
+ }
2528
+ /**
2529
+ * @license
2530
+ * Copyright 2021 Google LLC
2531
+ * SPDX-License-Identifier: BSD-3-Clause
2532
+ */
2533
+ let mn = class extends Event {
2534
+ constructor(t) {
2535
+ super("context-provider", { bubbles: !0, composed: !0 }), this.context = t;
2536
+ }
2537
+ };
2538
+ class Ie extends vn {
2539
+ constructor(t, e, i) {
2540
+ var n, r;
2541
+ super(e.context !== void 0 ? e.initialValue : i), this.onContextRequest = (o) => {
2542
+ const a = o.composedPath()[0];
2543
+ o.context === this.context && a !== this.host && (o.stopPropagation(), this.addCallback(o.callback, a, o.subscribe));
2544
+ }, this.onProviderRequest = (o) => {
2545
+ const a = o.composedPath()[0];
2546
+ if (o.context !== this.context || a === this.host)
2547
+ return;
2548
+ const l = /* @__PURE__ */ new Set();
2549
+ for (const [c, { consumerHost: u }] of this.subscriptions)
2550
+ l.has(c) || (l.add(c), u.dispatchEvent(new $n(this.context, c, !0)));
2551
+ o.stopPropagation();
2552
+ }, this.host = t, e.context !== void 0 ? this.context = e.context : this.context = e, this.attachListeners(), (r = (n = this.host).addController) == null || r.call(n, this);
2553
+ }
2554
+ attachListeners() {
2555
+ this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest);
2556
+ }
2557
+ hostConnected() {
2558
+ this.host.dispatchEvent(new mn(this.context));
2559
+ }
2560
+ }
2561
+ /**
2562
+ * @license
2563
+ * Copyright 2017 Google LLC
2564
+ * SPDX-License-Identifier: BSD-3-Clause
2565
+ */
2566
+ function yn({ context: s }) {
2567
+ return (t, e) => {
2568
+ const i = /* @__PURE__ */ new WeakMap();
2569
+ if (typeof e == "object")
2570
+ return e.addInitializer(function() {
2571
+ i.set(this, new Ie(this, { context: s }));
2572
+ }), { get() {
2573
+ return t.get.call(this);
2574
+ }, set(n) {
2575
+ var r;
2576
+ return (r = i.get(this)) == null || r.setValue(n), t.set.call(this, n);
2577
+ }, init(n) {
2578
+ var r;
2579
+ return (r = i.get(this)) == null || r.setValue(n), n;
2580
+ } };
2581
+ {
2582
+ t.constructor.addInitializer((o) => {
2583
+ i.set(o, new Ie(o, { context: s }));
2584
+ });
2585
+ const n = Object.getOwnPropertyDescriptor(t, e);
2586
+ let r;
2587
+ if (n === void 0) {
2588
+ const o = /* @__PURE__ */ new WeakMap();
2589
+ r = { get: function() {
2590
+ return o.get(this);
2591
+ }, set: function(a) {
2592
+ i.get(this).setValue(a), o.set(this, a);
2593
+ }, configurable: !0, enumerable: !0 };
2594
+ } else {
2595
+ const o = n.set;
2596
+ r = { ...n, set: function(a) {
2597
+ i.get(this).setValue(a), o == null || o.call(this, a);
2598
+ } };
2599
+ }
2600
+ return void Object.defineProperty(t, e, r);
2601
+ }
2602
+ };
2603
+ }
2604
+ var bn = Object.defineProperty, _n = Object.getOwnPropertyDescriptor, wn = (s, t, e, i) => {
2605
+ for (var n = i > 1 ? void 0 : i ? _n(t, e) : t, r = s.length - 1, o; r >= 0; r--)
2606
+ (o = s[r]) && (n = (i ? o(t, e, n) : o(n)) || n);
2607
+ return i && n && bn(t, e, n), n;
2608
+ };
2609
+ const xn = "application";
2610
+ class ne extends x {
2611
+ constructor() {
2612
+ super(...arguments), this.nodes = [], this.wrapperRef = bt();
2613
+ }
2614
+ addChild(t) {
2615
+ t.parent = this, this.nodes.push(t);
2616
+ }
2617
+ applyBranding() {
2618
+ if (!this.wrapperRef.value)
2619
+ return;
2620
+ const t = this.application.settings;
2621
+ t != null && t.branding && As(t.branding, this.wrapperRef.value);
2622
+ }
2623
+ applyStyles() {
2624
+ if (!this.wrapperRef.value)
2625
+ return;
2626
+ const t = this.application.styles(), e = this.wrapperRef.value;
2627
+ Object.entries(t).forEach(([i, n]) => {
2628
+ e.style.setProperty(`--${i}`, n);
2629
+ });
2630
+ }
2631
+ firstUpdated(t) {
2632
+ this.applyBranding(), this.applyStyles();
2633
+ }
2634
+ render() {
2635
+ var i, n;
2636
+ const t = this.application.settings.components.conversation;
2637
+ return ((n = (i = t == null ? void 0 : t.properties) == null ? void 0 : i.chat) == null ? void 0 : n.isThirdPartyWidget) ? this.renderRoot.host.classList.add("third-party") : this.application.renderStrategy === ie.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")), E`<div class="widget-container" ${se(this.wrapperRef)}>
2638
+ ${gn(this.nodes, (r) => r)}
2639
+ </div>`;
2640
+ }
2641
+ }
2642
+ ne.styles = M`
2643
+ :host {
2644
+ --font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
2645
+ --spacing-xs: 0.2rem;
2646
+ --spacing-sm: 0.5rem;
2647
+ --spacing-md: 1rem;
2648
+ --spacing-lg: 1.2rem;
2649
+ --spacing-xl: 1.8rem;
2650
+
2651
+ --inverted-spacing-lg: -1.2rem;
2652
+
2653
+ --text-color: #222222;
2654
+ --link-color: #990ae3;
2655
+ --gray-color: #f3f3f8;
2656
+ --white-color: #fff;
2657
+ --gray-dark-color: #a6a6a6;
2658
+ --black-border-color: #00000054;
2659
+
2660
+ --box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
2661
+ --border-radius: var(--spacing-sm);
2662
+ --border-radius-sm: var(--spacing-sm);
2663
+ --border-radius-lg: var(--spacing-lg);
2664
+ --border-radius-xl: var(--spacing-xl);
2665
+ --gap: var(--spacing-sm);
2666
+
2667
+ --header-height: 69px;
2668
+ }
2669
+ :host {
2670
+ --voca-rem-multiplier: 0.625;
2671
+ box-sizing: border-box;
2672
+ display: block;
2673
+ }
2674
+
2675
+ :host(.inline) {
2676
+ height: 100%;
2677
+ position: fixed;
2678
+ inset: 0 0 0 0;
2679
+ }
2680
+
2681
+ :host(.floating) {
2682
+ z-index: 6;
2683
+ position: fixed;
2684
+ }
2685
+ @media screen and (max-width: 800px) {
2686
+ :host(.floating) {
2687
+ inset: 0 0 95px 0;
2688
+ height: 100%;
2689
+ }
2690
+ :host(.third-party) {
2691
+ inset: 0 0 95px 0;
2692
+ height: 100vh;
2693
+ }
2694
+ }
2695
+ @media screen and (min-width: 801px) {
2696
+ :host(.floating) {
2697
+ inset: auto 20px 95px auto;
2698
+ max-height: calc(100vh - 120px);
2699
+ width: 400px;
2700
+ height: 700px;
2701
+ }
2702
+ :host(.third-party) {
2703
+ max-width: 1000px;
2704
+ height: 100vh;
2705
+ position: relative;
2706
+ left: 50%;
2707
+ transform: translateX(-50%);
2708
+ margin: -10px 0;
2709
+ }
2710
+ :host(.floating.bottom-right) {
2711
+ inset: auto 20px 95px auto;
2712
+ }
2713
+ :host(.floating.bottom-left) {
2714
+ inset: auto auto 95px 20px;
2715
+ }
2716
+ }
2717
+
2718
+ :host(.floating) .widget-container {
2719
+ box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
2720
+ border-radius: 0.7rem;
2721
+
2722
+ @media screen and (max-width: 800px) {
2723
+ border-radius: 0;
2724
+ }
2725
+ }
2726
+
2727
+ * {
2728
+ box-sizing: border-box;
2729
+ }
2730
+ .widget-container {
2731
+ height: 100%;
2732
+ background-color: var(--primary-background);
2733
+ padding: var(--spacing-sm);
2734
+ border: var(--widget-border, none);
2735
+ }
2736
+ @keyframes slideDown {
2737
+ from {
2738
+ transform: translateY(0);
2739
+ opacity: 1;
2740
+ }
2741
+ to {
2742
+ transform: translateY(100%);
2743
+ opacity: 0;
2744
+ }
2745
+ }
2746
+ @keyframes slideUp {
2747
+ from {
2748
+ transform: translateY(100%);
2749
+ opacity: 0;
2750
+ }
2751
+ to {
2752
+ transform: translateY(0);
2753
+ opacity: 1;
2754
+ }
2755
+ }
2756
+ :host(.expanded) {
2757
+ opacity: 1;
2758
+ animation: slideUp 0.3s linear;
2759
+ }
2760
+ :host(.hidden) {
2761
+ opacity: 0;
2762
+ animation: slideDown 0.3s linear;
2763
+ pointer-events: none;
2764
+ }
2765
+ `;
2766
+ wn([
2767
+ b({ attribute: !1 }),
2768
+ yn({ context: xn })
2769
+ ], ne.prototype, "application", 2);
2770
+ var Sn = Object.defineProperty, An = Object.getOwnPropertyDescriptor, re = (s, t, e, i) => {
2771
+ for (var n = i > 1 ? void 0 : i ? An(t, e) : t, r = s.length - 1, o; r >= 0; r--)
2772
+ (o = s[r]) && (n = (i ? o(t, e, n) : o(n)) || n);
2773
+ return i && n && Sn(t, e, n), n;
2774
+ };
2775
+ class at extends x {
2776
+ constructor() {
2777
+ super(), this.status = "deactivated", this.addEventListener("environment-created", this.onEnvironmentCreated);
2778
+ }
2779
+ async connectedCallback() {
2780
+ super.connectedCallback(), await this.getGlobalEnvironment();
2781
+ }
2782
+ disconnectedCallback() {
2783
+ super.disconnectedCallback(), this.removeEventListener("environment-created", this.onEnvironmentCreated);
2784
+ }
2785
+ async onEnvironmentCreated(t) {
2786
+ this.widget = t.detail.widget, await this.activate(), this.requestUpdate();
2787
+ }
2788
+ async activate() {
2789
+ this.widget && (await this.widget.activate(), this.status = "activated");
2790
+ }
2791
+ async getGlobalEnvironment() {
2792
+ const t = globalThis.widgets;
2793
+ t && (this.widget = t.applications.find(
2794
+ (e) => e.name === this.name
2795
+ ), await this.activate());
2796
+ }
2797
+ render() {
2798
+ if (!this.widget || this.status !== "activated")
2799
+ return p;
2800
+ if (this.widget.renderStrategy === ie.Trigger) {
2801
+ const t = new T();
2802
+ return t.application = this.widget, t;
2803
+ }
2804
+ return this.widget.render();
2805
+ }
2806
+ }
2807
+ at.styles = [
2808
+ M`
2809
+ :host {
2810
+ display: block;
2811
+ }
2812
+ `
2813
+ ];
2814
+ re([
2815
+ b({ attribute: !0 })
2816
+ ], at.prototype, "name", 2);
2817
+ re([
2818
+ N()
2819
+ ], at.prototype, "widget", 2);
2820
+ re([
2821
+ N()
2822
+ ], at.prototype, "status", 2);
2823
+ customElements.get("ace-trigger-slot") || customElements.define("ace-trigger-slot", Vt);
2824
+ customElements.get("ace-trigger") || customElements.define("ace-trigger", T);
2825
+ customElements.get("ace-unresolved-component") || customElements.define("ace-unresolved-component", Cs);
2826
+ customElements.get("ace-wrapper") || customElements.define("ace-wrapper", ne);
2827
+ customElements.get("ace-widget") || customElements.define("ace-widget", at);
2828
+ const En = () => crypto.randomUUID();
2829
+ class Cn {
2830
+ constructor(t, e, i, n, r, o, a = !0) {
2831
+ this.label = t, this.icon = e, this.onClick = i, this.closeOnClick = n, this.key = r, this.update = new Ct(), this.id = En(), this._controller = o, this.enabled = a;
2832
+ }
2833
+ updateLabel(t) {
2834
+ this.label = t, this.update.next();
2835
+ }
2836
+ updateIcon(t) {
2837
+ this.icon = t, this.update.next();
2838
+ }
2839
+ remove() {
2840
+ this._controller.removeOption(this);
2841
+ }
2842
+ subscribe() {
2843
+ return this.update.asObservable();
2844
+ }
2845
+ }
2846
+ class kn {
2847
+ constructor(t) {
2848
+ this._options = [], this._subscription = null, this._host = t, t.addController(this);
2849
+ }
2850
+ hostConnected() {
2851
+ }
2852
+ hostDisconnected() {
2853
+ this._subscription && this._subscription.unsubscribe(), this._options = [];
2854
+ }
2855
+ addOption(t) {
2856
+ const e = new Cn(
2857
+ t.label,
2858
+ t.icon,
2859
+ t.onClick,
2860
+ t.closeOnClick,
2861
+ t.key,
2862
+ this
2863
+ );
2864
+ return this._options.push(e), this.handleUpdate(), e;
2865
+ }
2866
+ removeOption(t) {
2867
+ this._options = this._options.filter((e) => e.id !== t.id);
2868
+ }
2869
+ handleUpdate() {
2870
+ this._subscription && this._subscription.unsubscribe();
2871
+ const t = this._options.map((e) => e.subscribe());
2872
+ this._subscription = ki(t).subscribe(() => {
2873
+ this._host.requestUpdate();
2874
+ });
2875
+ }
2876
+ set options(t) {
2877
+ this._options = t, this._host.requestUpdate();
2878
+ }
2879
+ get options() {
2880
+ return this._options;
2881
+ }
2882
+ hasOptions() {
2883
+ return this._options.length > 0;
2884
+ }
2885
+ }
2886
+ const H = {
2887
+ allRenderFn: !1,
2888
+ cmpDidLoad: !0,
2889
+ cmpDidUnload: !1,
2890
+ cmpDidUpdate: !0,
2891
+ cmpDidRender: !0,
2892
+ cmpWillLoad: !0,
2893
+ cmpWillUpdate: !0,
2894
+ cmpWillRender: !0,
2895
+ connectedCallback: !0,
2896
+ disconnectedCallback: !0,
2897
+ element: !0,
2898
+ event: !0,
2899
+ hasRenderFn: !0,
2900
+ lifecycle: !0,
2901
+ hostListener: !0,
2902
+ hostListenerTargetWindow: !0,
2903
+ hostListenerTargetDocument: !0,
2904
+ hostListenerTargetBody: !0,
2905
+ hostListenerTargetParent: !1,
2906
+ hostListenerTarget: !0,
2907
+ member: !0,
2908
+ method: !0,
2909
+ mode: !0,
2910
+ observeAttribute: !0,
2911
+ prop: !0,
2912
+ propMutable: !0,
2913
+ reflect: !0,
2914
+ scoped: !0,
2915
+ shadowDom: !0,
2916
+ slot: !0,
2917
+ cssAnnotations: !0,
2918
+ state: !0,
2919
+ style: !0,
2920
+ svg: !0,
2921
+ updatable: !0,
2922
+ vdomAttribute: !0,
2923
+ vdomXlink: !0,
2924
+ vdomClass: !0,
2925
+ vdomFunctional: !0,
2926
+ vdomKey: !0,
2927
+ vdomListener: !0,
2928
+ vdomRef: !0,
2929
+ vdomPropOrAttr: !0,
2930
+ vdomRender: !0,
2931
+ vdomStyle: !0,
2932
+ vdomText: !0,
2933
+ watchCallback: !0,
2934
+ taskQueue: !0,
2935
+ hotModuleReplacement: !1,
2936
+ isDebug: !1,
2937
+ isDev: !1,
2938
+ isTesting: !1,
2939
+ hydrateServerSide: !1,
2940
+ hydrateClientSide: !1,
2941
+ lifecycleDOMEvents: !1,
2942
+ lazyLoad: !1,
2943
+ profile: !1,
2944
+ slotRelocation: !0,
2945
+ appendChildSlotFix: !1,
2946
+ cloneNodeFix: !1,
2947
+ hydratedAttribute: !1,
2948
+ hydratedClass: !0,
2949
+ safari10: !1,
2950
+ scriptDataOpts: !1,
2951
+ scopedSlotTextContentFix: !1,
2952
+ shadowDomShim: !1,
2953
+ slotChildNodesFix: !1,
2954
+ invisiblePrehydration: !0,
2955
+ propBoolean: !0,
2956
+ propNumber: !0,
2957
+ propString: !0,
2958
+ cssVarShim: !1,
2959
+ constructableCSS: !0,
2960
+ cmpShouldUpdate: !0,
2961
+ devTools: !1,
2962
+ dynamicImportShim: !1,
2963
+ shadowDelegatesFocus: !0,
2964
+ initializeNextTick: !1,
2965
+ asyncLoading: !1,
2966
+ asyncQueue: !1,
2967
+ transformTagName: !1,
2968
+ attachStyles: !0
2969
+ };
2970
+ let B, ks, Ot, Os = !1, _t = !1, oe = !1, y = !1, Re = null, Yt = !1;
2971
+ const Tt = typeof window < "u" ? window : {}, S = Tt.document || { head: {} }, Ts = Tt.HTMLElement || class {
2972
+ }, m = {
2973
+ $flags$: 0,
2974
+ $resourcesUrl$: "",
2975
+ jmp: (s) => s(),
2976
+ raf: (s) => requestAnimationFrame(s),
2977
+ ael: (s, t, e, i) => s.addEventListener(t, e, i),
2978
+ rel: (s, t, e, i) => s.removeEventListener(t, e, i),
2979
+ ce: (s, t) => new CustomEvent(s, t)
2980
+ }, On = /* @__PURE__ */ (() => {
2981
+ let s = !1;
2982
+ try {
2983
+ S.addEventListener("e", null, Object.defineProperty({}, "passive", {
2984
+ get() {
2985
+ s = !0;
2986
+ }
2987
+ }));
2988
+ } catch {
2989
+ }
2990
+ return s;
2991
+ })(), Tn = (s) => Promise.resolve(s), Pn = /* @__PURE__ */ (() => {
2992
+ try {
2993
+ return new CSSStyleSheet(), typeof new CSSStyleSheet().replace == "function";
2994
+ } catch {
2995
+ }
2996
+ return !1;
2997
+ })(), Ps = (s, t, e, i) => {
2998
+ e && e.map(([n, r, o]) => {
2999
+ const a = In(s, n), l = Ln(t, o), c = Rn(n);
3000
+ m.ael(a, r, l, c), (t.$rmListeners$ = t.$rmListeners$ || []).push(() => m.rel(a, r, l, c));
3001
+ });
3002
+ }, Ln = (s, t) => (e) => {
3003
+ try {
3004
+ H.lazyLoad || s.$hostElement$[t](e);
3005
+ } catch (i) {
3006
+ lt(i);
3007
+ }
3008
+ }, In = (s, t) => t & 4 ? S : t & 8 ? Tt : t & 16 ? S.body : s, Rn = (s) => On ? {
3009
+ passive: (s & 1) !== 0,
3010
+ capture: (s & 2) !== 0
3011
+ } : (s & 2) !== 0, Ue = "http://www.w3.org/1999/xlink", j = (s, t = "") => () => {
3012
+ }, je = /* @__PURE__ */ new WeakMap(), Un = (s, t, e) => {
3013
+ let i = St.get(s);
3014
+ Pn && e ? (i = i || new CSSStyleSheet(), i.replace(t)) : i = t, St.set(s, i);
3015
+ }, jn = (s, t, e, i) => {
3016
+ let n = Ls(t, e), r = St.get(n);
3017
+ if (s = s.nodeType === 11 ? s : S, r)
3018
+ if (typeof r == "string") {
3019
+ s = s.head || s;
3020
+ let o = je.get(s), a;
3021
+ o || je.set(s, o = /* @__PURE__ */ new Set()), o.has(n) || (a = S.createElement("style"), a.innerHTML = r, s.insertBefore(a, s.querySelector("link")), o && o.add(n));
3022
+ } else
3023
+ s.adoptedStyleSheets.includes(r) || (s.adoptedStyleSheets = [...s.adoptedStyleSheets, r]);
3024
+ return n;
3025
+ }, Mn = (s) => {
3026
+ const t = s.$cmpMeta$, e = s.$hostElement$, i = t.$flags$, n = j("attachStyles", t.$tagName$), r = jn(e.shadowRoot ? e.shadowRoot : e.getRootNode(), t, s.$modeName$);
3027
+ i & 10 && (e["s-sc"] = r, e.classList.add(r + "-h"), i & 2 && e.classList.add(r + "-s")), n();
3028
+ }, Ls = (s, t) => "sc-" + (t && s.$flags$ & 32 ? s.$tagName$ + "-" + t : s.$tagName$), Nn = (s) => dr.map((t) => t(s)).find((t) => !!t), Me = {}, Dn = "http://www.w3.org/2000/svg", Hn = "http://www.w3.org/1999/xhtml", Bn = (s) => s != null, ae = (s) => (s = typeof s, s === "object" || s === "function"), W = (s, t, ...e) => {
3029
+ let i = null, n = null, r = null, o = !1, a = !1, l = [];
3030
+ const c = (h) => {
3031
+ for (let d = 0; d < h.length; d++)
3032
+ i = h[d], Array.isArray(i) ? c(i) : i != null && typeof i != "boolean" && ((o = typeof s != "function" && !ae(i)) && (i = String(i)), o && a ? l[l.length - 1].$text$ += i : l.push(o ? wt(null, i) : i), a = o);
3033
+ };
3034
+ if (c(e), t) {
3035
+ t.key && (n = t.key), t.name && (r = t.name);
3036
+ {
3037
+ const h = t.className || t.class;
3038
+ h && (t.class = typeof h != "object" ? h : Object.keys(h).filter((d) => h[d]).join(" "));
3039
+ }
3040
+ }
3041
+ if (typeof s == "function")
3042
+ return s(t === null ? {} : t, l, Fn);
3043
+ const u = wt(s, null);
3044
+ return u.$attrs$ = t, l.length > 0 && (u.$children$ = l), u.$key$ = n, u.$name$ = r, u;
3045
+ }, wt = (s, t) => {
3046
+ const e = {
3047
+ $flags$: 0,
3048
+ $tag$: s,
3049
+ $text$: t,
3050
+ $elm$: null,
3051
+ $children$: null
3052
+ };
3053
+ return e.$attrs$ = null, e.$key$ = null, e.$name$ = null, e;
3054
+ }, le = {}, zn = (s) => s && s.$tag$ === le, Fn = {
3055
+ forEach: (s, t) => s.map(Ne).forEach(t),
3056
+ map: (s, t) => s.map(Ne).map(t).map(Wn)
3057
+ }, Ne = (s) => ({
3058
+ vattrs: s.$attrs$,
3059
+ vchildren: s.$children$,
3060
+ vkey: s.$key$,
3061
+ vname: s.$name$,
3062
+ vtag: s.$tag$,
3063
+ vtext: s.$text$
3064
+ }), Wn = (s) => {
3065
+ if (typeof s.vtag == "function") {
3066
+ const e = Object.assign({}, s.vattrs);
3067
+ return s.vkey && (e.key = s.vkey), s.vname && (e.name = s.vname), W(s.vtag, e, ...s.vchildren || []);
3068
+ }
3069
+ const t = wt(s.vtag, s.vtext);
3070
+ return t.$attrs$ = s.vattrs, t.$children$ = s.vchildren, t.$key$ = s.vkey, t.$name$ = s.vname, t;
3071
+ }, De = (s, t, e, i, n, r) => {
3072
+ if (e !== i) {
3073
+ let o = Fe(s, t), a = t.toLowerCase();
3074
+ if (t === "class") {
3075
+ const l = s.classList, c = He(e), u = He(i);
3076
+ l.remove(...c.filter((h) => h && !u.includes(h))), l.add(...u.filter((h) => h && !c.includes(h)));
3077
+ } else if (t === "style") {
3078
+ for (const l in e)
3079
+ (!i || i[l] == null) && (l.includes("-") ? s.style.removeProperty(l) : s.style[l] = "");
3080
+ for (const l in i)
3081
+ (!e || i[l] !== e[l]) && (l.includes("-") ? s.style.setProperty(l, i[l]) : s.style[l] = i[l]);
3082
+ } else if (t !== "key")
3083
+ if (t === "ref")
3084
+ i && i(s);
3085
+ else if (!s.__lookupSetter__(t) && t[0] === "o" && t[1] === "n")
3086
+ t[2] === "-" ? t = t.slice(3) : Fe(Tt, a) ? t = a.slice(2) : t = a[2] + t.slice(3), e && m.rel(s, t, e, !1), i && m.ael(s, t, i, !1);
3087
+ else {
3088
+ const l = ae(i);
3089
+ if ((o || l && i !== null) && !n)
3090
+ try {
3091
+ if (s.tagName.includes("-"))
3092
+ s[t] = i;
3093
+ else {
3094
+ let u = i ?? "";
3095
+ t === "list" ? o = !1 : (e == null || s[t] != u) && (s[t] = u);
3096
+ }
3097
+ } catch {
3098
+ }
3099
+ let c = !1;
3100
+ a !== (a = a.replace(/^xlink\:?/, "")) && (t = a, c = !0), i == null || i === !1 ? (i !== !1 || s.getAttribute(t) === "") && (c ? s.removeAttributeNS(Ue, t) : s.removeAttribute(t)) : (!o || r & 4 || n) && !l && (i = i === !0 ? "" : i, c ? s.setAttributeNS(Ue, t, i) : s.setAttribute(t, i));
3101
+ }
3102
+ }
3103
+ }, Yn = /\s/, He = (s) => s ? s.split(Yn) : [], Is = (s, t, e, i) => {
3104
+ const n = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, r = s && s.$attrs$ || Me, o = t.$attrs$ || Me;
3105
+ for (i in r)
3106
+ i in o || De(n, i, r[i], void 0, e, t.$flags$);
3107
+ for (i in o)
3108
+ De(n, i, r[i], o[i], e, t.$flags$);
3109
+ }, xt = (s, t, e, i) => {
3110
+ let n = t.$children$[e], r = 0, o, a, l;
3111
+ if (Os || (oe = !0, n.$tag$ === "slot" && (B && i.classList.add(B + "-s"), n.$flags$ |= n.$children$ ? (
3112
+ // slot element has fallback content
3113
+ 2
3114
+ ) : (
3115
+ // slot element does not have fallback content
3116
+ 1
3117
+ ))), n.$text$ !== null)
3118
+ o = n.$elm$ = S.createTextNode(n.$text$);
3119
+ else if (n.$flags$ & 1)
3120
+ o = n.$elm$ = S.createTextNode("");
3121
+ else {
3122
+ if (y || (y = n.$tag$ === "svg"), o = n.$elm$ = S.createElementNS(y ? Dn : Hn, n.$flags$ & 2 ? "slot-fb" : n.$tag$), y && n.$tag$ === "foreignObject" && (y = !1), Is(null, n, y), Bn(B) && o["s-si"] !== B && o.classList.add(o["s-si"] = B), n.$children$)
3123
+ for (r = 0; r < n.$children$.length; ++r)
3124
+ a = xt(s, n, r, o), a && o.appendChild(a);
3125
+ n.$tag$ === "svg" ? y = !1 : o.tagName === "foreignObject" && (y = !0);
3126
+ }
3127
+ return o["s-hn"] = Ot, n.$flags$ & 3 && (o["s-sr"] = !0, o["s-cr"] = ks, o["s-sn"] = n.$name$ || "", l = s && s.$children$ && s.$children$[e], l && l.$tag$ === n.$tag$ && s.$elm$ && nt(s.$elm$, !1)), o;
3128
+ }, nt = (s, t) => {
3129
+ m.$flags$ |= 1;
3130
+ const e = s.childNodes;
3131
+ for (let i = e.length - 1; i >= 0; i--) {
3132
+ const n = e[i];
3133
+ n["s-hn"] !== Ot && n["s-ol"] && (js(n).insertBefore(n, ce(n)), n["s-ol"].remove(), n["s-ol"] = void 0, oe = !0), t && nt(n, t);
3134
+ }
3135
+ m.$flags$ &= -2;
3136
+ }, Rs = (s, t, e, i, n, r) => {
3137
+ let o = s["s-cr"] && s["s-cr"].parentNode || s, a;
3138
+ for (o.shadowRoot && o.tagName === Ot && (o = o.shadowRoot); n <= r; ++n)
3139
+ i[n] && (a = xt(null, e, n, s), a && (i[n].$elm$ = a, o.insertBefore(a, ce(t))));
3140
+ }, Us = (s, t, e, i, n) => {
3141
+ for (; t <= e; ++t)
3142
+ (i = s[t]) && (n = i.$elm$, Ds(i), _t = !0, n["s-ol"] ? n["s-ol"].remove() : nt(n, !0), n.remove());
3143
+ }, qn = (s, t, e, i) => {
3144
+ let n = 0, r = 0, o = 0, a = 0, l = t.length - 1, c = t[0], u = t[l], h = i.length - 1, d = i[0], f = i[h], $, g;
3145
+ for (; n <= l && r <= h; )
3146
+ if (c == null)
3147
+ c = t[++n];
3148
+ else if (u == null)
3149
+ u = t[--l];
3150
+ else if (d == null)
3151
+ d = i[++r];
3152
+ else if (f == null)
3153
+ f = i[--h];
3154
+ else if (ht(c, d))
3155
+ z(c, d), c = t[++n], d = i[++r];
3156
+ else if (ht(u, f))
3157
+ z(u, f), u = t[--l], f = i[--h];
3158
+ else if (ht(c, f))
3159
+ (c.$tag$ === "slot" || f.$tag$ === "slot") && nt(c.$elm$.parentNode, !1), z(c, f), s.insertBefore(c.$elm$, u.$elm$.nextSibling), c = t[++n], f = i[--h];
3160
+ else if (ht(u, d))
3161
+ (c.$tag$ === "slot" || f.$tag$ === "slot") && nt(u.$elm$.parentNode, !1), z(u, d), s.insertBefore(u.$elm$, c.$elm$), u = t[--l], d = i[++r];
3162
+ else {
3163
+ for (o = -1, a = n; a <= l; ++a)
3164
+ if (t[a] && t[a].$key$ !== null && t[a].$key$ === d.$key$) {
3165
+ o = a;
3166
+ break;
3167
+ }
3168
+ o >= 0 ? (g = t[o], g.$tag$ !== d.$tag$ ? $ = xt(t && t[r], e, o, s) : (z(g, d), t[o] = void 0, $ = g.$elm$), d = i[++r]) : ($ = xt(t && t[r], e, r, s), d = i[++r]), $ && js(c.$elm$).insertBefore($, ce(c.$elm$));
3169
+ }
3170
+ n > l ? Rs(s, i[h + 1] == null ? null : i[h + 1].$elm$, e, i, r, h) : r > h && Us(t, n, l);
3171
+ }, ht = (s, t) => s.$tag$ === t.$tag$ ? s.$tag$ === "slot" ? s.$name$ === t.$name$ : s.$key$ === t.$key$ : !1, ce = (s) => s && s["s-ol"] || s, js = (s) => (s["s-ol"] ? s["s-ol"] : s).parentNode, z = (s, t) => {
3172
+ const e = t.$elm$ = s.$elm$, i = s.$children$, n = t.$children$, r = t.$tag$, o = t.$text$;
3173
+ let a;
3174
+ o === null ? (y = r === "svg" ? !0 : r === "foreignObject" ? !1 : y, r === "slot" || Is(s, t, y), i !== null && n !== null ? qn(e, i, t, n) : n !== null ? (s.$text$ !== null && (e.textContent = ""), Rs(e, null, t, n, 0, n.length - 1)) : i !== null && Us(i, 0, i.length - 1), y && r === "svg" && (y = !1)) : (a = e["s-cr"]) ? a.parentNode.textContent = o : s.$text$ !== o && (e.data = o);
3175
+ }, Ms = (s) => {
3176
+ let t = s.childNodes, e, i, n, r, o, a;
3177
+ for (i = 0, n = t.length; i < n; i++)
3178
+ if (e = t[i], e.nodeType === 1) {
3179
+ if (e["s-sr"]) {
3180
+ for (o = e["s-sn"], e.hidden = !1, r = 0; r < n; r++)
3181
+ if (a = t[r].nodeType, t[r]["s-hn"] !== e["s-hn"] || o !== "") {
3182
+ if (a === 1 && o === t[r].getAttribute("slot")) {
3183
+ e.hidden = !0;
3184
+ break;
3185
+ }
3186
+ } else if (a === 1 || a === 3 && t[r].textContent.trim() !== "") {
3187
+ e.hidden = !0;
3188
+ break;
3189
+ }
3190
+ }
3191
+ Ms(e);
3192
+ }
3193
+ }, w = [], Ns = (s) => {
3194
+ let t, e, i, n, r, o, a = 0, l = s.childNodes, c = l.length;
3195
+ for (; a < c; a++) {
3196
+ if (t = l[a], t["s-sr"] && (e = t["s-cr"]) && e.parentNode)
3197
+ for (i = e.parentNode.childNodes, n = t["s-sn"], o = i.length - 1; o >= 0; o--)
3198
+ e = i[o], !e["s-cn"] && !e["s-nr"] && e["s-hn"] !== t["s-hn"] && (Be(e, n) ? (r = w.find((u) => u.$nodeToRelocate$ === e), _t = !0, e["s-sn"] = e["s-sn"] || n, r ? r.$slotRefNode$ = t : w.push({
3199
+ $slotRefNode$: t,
3200
+ $nodeToRelocate$: e
3201
+ }), e["s-sr"] && w.map((u) => {
3202
+ Be(u.$nodeToRelocate$, e["s-sn"]) && (r = w.find((h) => h.$nodeToRelocate$ === e), r && !u.$slotRefNode$ && (u.$slotRefNode$ = r.$slotRefNode$));
3203
+ })) : w.some((u) => u.$nodeToRelocate$ === e) || w.push({
3204
+ $nodeToRelocate$: e
3205
+ }));
3206
+ t.nodeType === 1 && Ns(t);
3207
+ }
3208
+ }, Be = (s, t) => s.nodeType === 1 ? s.getAttribute("slot") === null && t === "" || s.getAttribute("slot") === t : s["s-sn"] === t ? !0 : t === "", Ds = (s) => {
3209
+ s.$attrs$ && s.$attrs$.ref && s.$attrs$.ref(null), s.$children$ && s.$children$.map(Ds);
3210
+ }, Gn = (s, t) => {
3211
+ const e = s.$hostElement$, i = s.$cmpMeta$, n = s.$vnode$ || wt(null, null), r = zn(t) ? t : W(null, null, t);
3212
+ Ot = e.tagName, i.$attrsToReflect$ && (r.$attrs$ = r.$attrs$ || {}, i.$attrsToReflect$.map(([o, a]) => r.$attrs$[a] = e[o])), r.$tag$ = null, r.$flags$ |= 4, s.$vnode$ = r, r.$elm$ = n.$elm$ = e.shadowRoot || e, B = e["s-sc"], ks = e["s-cr"], Os = (i.$flags$ & 1) !== 0, _t = !1, z(n, r);
3213
+ {
3214
+ if (m.$flags$ |= 1, oe) {
3215
+ Ns(r.$elm$);
3216
+ let o, a, l, c, u, h, d = 0;
3217
+ for (; d < w.length; d++)
3218
+ o = w[d], a = o.$nodeToRelocate$, a["s-ol"] || (l = S.createTextNode(""), l["s-nr"] = a, a.parentNode.insertBefore(a["s-ol"] = l, a));
3219
+ for (d = 0; d < w.length; d++)
3220
+ if (o = w[d], a = o.$nodeToRelocate$, o.$slotRefNode$) {
3221
+ for (c = o.$slotRefNode$.parentNode, u = o.$slotRefNode$.nextSibling, l = a["s-ol"]; l = l.previousSibling; )
3222
+ if (h = l["s-nr"], h && h["s-sn"] === a["s-sn"] && c === h.parentNode && (h = h.nextSibling, !h || !h["s-nr"])) {
3223
+ u = h;
3224
+ break;
3225
+ }
3226
+ (!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));
3227
+ } else
3228
+ a.nodeType === 1 && (a.hidden = !0);
3229
+ }
3230
+ _t && Ms(r.$elm$), m.$flags$ &= -2, w.length = 0;
3231
+ }
3232
+ }, Kn = (s) => s, Xn = (s, t, e) => {
3233
+ const i = Kn(s);
3234
+ return {
3235
+ emit: (n) => Zn(i, t, {
3236
+ bubbles: !!(e & 4),
3237
+ composed: !!(e & 2),
3238
+ cancelable: !!(e & 1),
3239
+ detail: n
3240
+ })
3241
+ };
3242
+ }, Zn = (s, t, e) => {
3243
+ const i = m.ce(t, e);
3244
+ return s.dispatchEvent(i), i;
3245
+ }, Qn = (s, t) => {
3246
+ }, Hs = (s, t) => (s.$flags$ |= 16, Qn(s, s.$ancestorComponent$), gr(() => Jn(s, t))), Jn = (s, t) => {
3247
+ const e = s.$hostElement$, i = j("scheduleUpdate", s.$cmpMeta$.$tagName$), n = e;
3248
+ let r;
3249
+ return t ? r = Y(n, "componentWillLoad") : r = Y(n, "componentWillUpdate"), r = ze(r, () => Y(n, "componentWillRender")), i(), ze(r, () => Vn(s, n, t));
3250
+ }, Vn = async (s, t, e) => {
3251
+ const i = s.$hostElement$, n = j("update", s.$cmpMeta$.$tagName$);
3252
+ i["s-rc"], e && Mn(s);
3253
+ const r = j("render", s.$cmpMeta$.$tagName$);
3254
+ tr(s, t, i), r(), n(), er(s);
3255
+ }, tr = (s, t, e) => {
3256
+ try {
3257
+ Re = t, t = t.render && t.render(), s.$flags$ &= -17, s.$flags$ |= 2, (H.hasRenderFn || H.reflect) && (H.vdomRender || H.reflect) && (H.hydrateServerSide || Gn(s, t));
3258
+ } catch (a) {
3259
+ lt(a, s.$hostElement$);
3260
+ }
3261
+ return Re = null, null;
3262
+ }, er = (s) => {
3263
+ const t = s.$cmpMeta$.$tagName$, e = s.$hostElement$, i = j("postUpdate", t), n = e;
3264
+ s.$ancestorComponent$, Y(n, "componentDidRender"), s.$flags$ & 64 ? (Y(n, "componentDidUpdate"), i()) : (s.$flags$ |= 64, Y(n, "componentDidLoad"), i());
3265
+ }, Y = (s, t, e) => {
3266
+ if (s && s[t])
3267
+ try {
3268
+ return s[t](e);
3269
+ } catch (i) {
3270
+ lt(i);
3271
+ }
3272
+ }, ze = (s, t) => s && s.then ? s.then(t) : t(), sr = (s, t) => s != null && !ae(s) ? t & 4 ? s === "false" ? !1 : s === "" || !!s : t & 2 ? parseFloat(s) : t & 1 ? String(s) : s : s, ir = (s, t) => Pt(s).$instanceValues$.get(t), nr = (s, t, e, i) => {
3273
+ const n = Pt(s), r = s, o = n.$instanceValues$.get(t), a = n.$flags$, l = r;
3274
+ e = sr(e, i.$members$[t][0]);
3275
+ const c = Number.isNaN(o) && Number.isNaN(e);
3276
+ if (e !== o && !c) {
3277
+ n.$instanceValues$.set(t, e);
3278
+ {
3279
+ if (i.$watchers$ && a & 128) {
3280
+ const h = i.$watchers$[t];
3281
+ h && h.map((d) => {
3282
+ try {
3283
+ l[d](e, o, t);
3284
+ } catch (f) {
3285
+ lt(f, r);
3286
+ }
3287
+ });
3288
+ }
3289
+ if ((a & 18) === 2) {
3290
+ if (l.componentShouldUpdate && l.componentShouldUpdate(e, o, t) === !1)
3291
+ return;
3292
+ Hs(n, !1);
3293
+ }
3294
+ }
3295
+ }
3296
+ }, rr = (s, t, e) => {
3297
+ if (t.$members$) {
3298
+ s.watchers && (t.$watchers$ = s.watchers);
3299
+ const i = Object.entries(t.$members$), n = s.prototype;
3300
+ i.map(([r, [o]]) => {
3301
+ (o & 31 || o & 32) && Object.defineProperty(n, r, {
3302
+ get() {
3303
+ return ir(this, r);
3304
+ },
3305
+ set(a) {
3306
+ nr(this, r, a, t);
3307
+ },
3308
+ configurable: !0,
3309
+ enumerable: !0
3310
+ });
3311
+ });
3312
+ {
3313
+ const r = /* @__PURE__ */ new Map();
3314
+ n.attributeChangedCallback = function(o, a, l) {
3315
+ m.jmp(() => {
3316
+ const c = r.get(o);
3317
+ if (this.hasOwnProperty(c))
3318
+ l = this[c], delete this[c];
3319
+ else if (n.hasOwnProperty(c) && typeof this[c] == "number" && this[c] == l)
3320
+ return;
3321
+ this[c] = l === null && typeof this[c] == "boolean" ? !1 : l;
3322
+ });
3323
+ }, s.observedAttributes = i.filter(
3324
+ ([o, a]) => a[0] & 15
3325
+ /* HasAttribute */
3326
+ ).map(([o, a]) => {
3327
+ const l = a[1] || o;
3328
+ return r.set(l, o), a[0] & 512 && t.$attrsToReflect$.push([o, l]), l;
3329
+ });
3330
+ }
3331
+ }
3332
+ return s;
3333
+ }, or = async (s, t, e, i, n) => {
3334
+ if (!(t.$flags$ & 32) && (n = s.constructor, t.$flags$ |= 32, customElements.whenDefined(e.$tagName$).then(() => t.$flags$ |= 128), n.style)) {
3335
+ let o = n.style;
3336
+ typeof o != "string" && (o = o[t.$modeName$ = Nn(s)]);
3337
+ const a = Ls(e, t.$modeName$);
3338
+ if (!St.has(a)) {
3339
+ const l = j("registerStyles", e.$tagName$);
3340
+ Un(a, o, !!(e.$flags$ & 1)), l();
3341
+ }
3342
+ }
3343
+ t.$ancestorComponent$, (() => Hs(t, !0))();
3344
+ }, ar = (s) => {
3345
+ }, lr = (s) => {
3346
+ if (!(m.$flags$ & 1)) {
3347
+ const t = Pt(s), e = t.$cmpMeta$, i = j("connectedCallback", e.$tagName$);
3348
+ t.$flags$ & 1 ? (Ps(s, t, e.$listeners$), ar(t.$lazyInstance$)) : (t.$flags$ |= 1, e.$flags$ & 12 && cr(s), e.$members$ && Object.entries(e.$members$).map(([n, [r]]) => {
3349
+ if (r & 31 && s.hasOwnProperty(n)) {
3350
+ const o = s[n];
3351
+ delete s[n], s[n] = o;
3352
+ }
3353
+ }), or(s, t, e)), i();
3354
+ }
3355
+ }, cr = (s) => {
3356
+ const t = s["s-cr"] = S.createComment("");
3357
+ t["s-cn"] = !0, s.insertBefore(t, s.firstChild);
3358
+ }, ur = (s) => {
3359
+ if (!(m.$flags$ & 1)) {
3360
+ const t = Pt(s);
3361
+ t.$rmListeners$ && (t.$rmListeners$.map((e) => e()), t.$rmListeners$ = void 0);
3362
+ }
3363
+ }, Bs = (s, t) => {
3364
+ const e = {
3365
+ $flags$: t[0],
3366
+ $tagName$: t[1]
3367
+ };
3368
+ e.$members$ = t[2], e.$listeners$ = t[3], e.$watchers$ = s.$watchers$, e.$attrsToReflect$ = [];
3369
+ const i = s.prototype.connectedCallback, n = s.prototype.disconnectedCallback;
3370
+ return Object.assign(s.prototype, {
3371
+ __registerHost() {
3372
+ hr(this, e);
3373
+ },
3374
+ connectedCallback() {
3375
+ lr(this), i && i.call(this);
3376
+ },
3377
+ disconnectedCallback() {
3378
+ ur(this), n && n.call(this);
3379
+ },
3380
+ __attachShadow() {
3381
+ this.attachShadow({
3382
+ mode: "open",
3383
+ delegatesFocus: !!(e.$flags$ & 16)
3384
+ });
3385
+ }
3386
+ }), s.is = e.$tagName$, rr(s, e);
3387
+ }, zs = /* @__PURE__ */ new WeakMap(), Pt = (s) => zs.get(s), hr = (s, t) => {
3388
+ const e = {
3389
+ $flags$: 0,
3390
+ $hostElement$: s,
3391
+ $cmpMeta$: t,
3392
+ $instanceValues$: /* @__PURE__ */ new Map()
3393
+ };
3394
+ return Ps(s, e, t.$listeners$), zs.set(s, e);
3395
+ }, Fe = (s, t) => t in s, lt = (s, t) => (0, console.error)(s, t), St = /* @__PURE__ */ new Map(), dr = [], We = [], Fs = [], fr = (s, t) => (e) => {
3396
+ s.push(e), Yt || (Yt = !0, t && m.$flags$ & 4 ? pr(qt) : m.raf(qt));
3397
+ }, Ye = (s) => {
3398
+ for (let t = 0; t < s.length; t++)
3399
+ try {
3400
+ s[t](performance.now());
3401
+ } catch (e) {
3402
+ lt(e);
3403
+ }
3404
+ s.length = 0;
3405
+ }, qt = () => {
3406
+ Ye(We), Ye(Fs), (Yt = We.length > 0) && m.raf(qt);
3407
+ }, pr = (s) => Tn().then(s), gr = /* @__PURE__ */ fr(Fs, !0), $r = (s = {}) => {
3408
+ const { content: t = "", title: e, attributes: i = [] } = s;
3409
+ let n = "", r = [
3410
+ { name: "xmlns", value: "http://www.w3.org/2000/svg" },
3411
+ { name: "fill", value: "currentColor" },
3412
+ ...i
3413
+ ];
3414
+ return e && (n = `<title>${e}</title>`), `<svg ${r.map((a) => `${a.name}="${a.value}"`).join(" ")}>${n}${t}</svg>`;
3415
+ }, vr = (s) => s.replace(/<(\/?)svg([^>]*)>/g, "").trim();
3416
+ function mr(s) {
3417
+ return `${s.getFullYear()}.${s.getMonth() + 1}`;
3418
+ }
3419
+ class yr {
3420
+ constructor(t) {
3421
+ this.voca_component = t, this.voca_added = mr(/* @__PURE__ */ new Date());
3422
+ }
3423
+ }
3424
+ const br = "telia-vst{display:none}", _r = /* @__PURE__ */ Bs(class extends Ts {
3425
+ constructor() {
3426
+ super(), this.__registerHost(), this.vocaInternalUStats = Xn(this, "vocaInternalUStats", 7);
3427
+ }
3428
+ connectedCallback() {
3429
+ this.vocaInternalUStats.emit(new yr(this.dataTrackingId));
3430
+ }
3431
+ render() {
3432
+ return W(le, null);
3433
+ }
3434
+ static get style() {
3435
+ return br;
3436
+ }
3437
+ }, [0, "telia-vst", {
3438
+ dataTrackingId: [1, "data-tracking-id"]
3439
+ }]);
3440
+ function Ws() {
3441
+ if (typeof customElements > "u")
3442
+ return;
3443
+ ["telia-vst"].forEach((t) => {
3444
+ switch (t) {
3445
+ case "telia-vst":
3446
+ customElements.get(t) || customElements.define(t, _r);
3447
+ break;
3448
+ }
3449
+ });
3450
+ }
3451
+ Ws();
3452
+ function Gt() {
3453
+ return typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : { vocadsIcons: void 0, vocadsIconsRegistered: !1 };
3454
+ }
3455
+ function wr() {
3456
+ if (typeof Gt().vocadsIcons !== void 0)
3457
+ return Gt().vocadsIcons;
3458
+ }
3459
+ function xr() {
3460
+ return Gt().vocadsIconsRegistered;
3461
+ }
3462
+ const Sr = ".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))}", Ar = /* @__PURE__ */ Bs(class extends Ts {
3463
+ constructor() {
3464
+ super(), this.__registerHost(), this.size = "md", this.allyTitle = null, this.dataTrackingId = "telia-icon";
3465
+ }
3466
+ /**
3467
+ * Returns svg string from svg property or svg string from icons bundle if icons bundle is registered
3468
+ * @private
3469
+ * @returns string
3470
+ */
3471
+ getSvgString() {
3472
+ if (this.svg)
3473
+ return this.svg;
3474
+ if (xr() && this.name) {
3475
+ const s = wr();
3476
+ return s[this.name] ? s[this.name].svg : "";
3477
+ }
3478
+ 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"), "";
3479
+ }
3480
+ render() {
3481
+ let s = this.getSvgString(), t = [{ name: "viewBox", value: "0 0 64 64" }];
3482
+ this.allyTitle ? t = [...t, { name: "role", value: "img" }] : t = [
3483
+ ...t,
3484
+ { name: "aria-hidden", value: "true" }
3485
+ ];
3486
+ const e = $r({
3487
+ content: vr(s),
3488
+ attributes: t,
3489
+ title: this.allyTitle
3490
+ });
3491
+ return W(le, { class: `telia-icon telia-icon--${this.size}` }, W("span", { "aria-label": this.allyTitle, class: "telia-icon__container", innerHTML: e }), W("telia-vst", { dataTrackingId: this.dataTrackingId }));
3492
+ }
3493
+ static get style() {
3494
+ return Sr;
3495
+ }
3496
+ }, [0, "telia-icon", {
3497
+ name: [1],
3498
+ svg: [1],
3499
+ size: [1],
3500
+ allyTitle: [1, "ally-title"],
3501
+ dataTestid: [1, "data-testid"]
3502
+ }]);
3503
+ function Er() {
3504
+ if (typeof customElements > "u")
3505
+ return;
3506
+ ["telia-icon", "telia-vst"].forEach((t) => {
3507
+ switch (t) {
3508
+ case "telia-icon":
3509
+ customElements.get(t) || customElements.define(t, Ar);
3510
+ break;
3511
+ case "telia-vst":
3512
+ customElements.get(t) || Ws();
3513
+ break;
3514
+ }
3515
+ });
3516
+ }
3517
+ Er();
3518
+ var Cr = Object.defineProperty, kr = Object.getOwnPropertyDescriptor, Or = (s, t, e, i) => {
3519
+ for (var n = i > 1 ? void 0 : i ? kr(t, e) : t, r = s.length - 1, o; r >= 0; r--)
3520
+ (o = s[r]) && (n = (i ? o(t, e, n) : o(n)) || n);
3521
+ return i && n && Cr(t, e, n), n;
3522
+ };
3523
+ const Ys = Es(x);
3524
+ class qs extends Ys {
3525
+ constructor() {
3526
+ super(...arguments), this.optionsIsVisible = !1, this.options = new kn(this), this.optionsRef = bt(), this.optionsTriggerRef = bt(), this._onClickOutside = (t) => {
3527
+ !this.optionsTriggerRef.value || !this.optionsRef.value || t.composedPath().includes(this.optionsTriggerRef.value) || t.composedPath().includes(this.optionsRef.value) || (this.optionsIsVisible = !1);
3528
+ };
3529
+ }
3530
+ addOption(t) {
3531
+ return this.options.addOption(t);
3532
+ }
3533
+ removeOption(t) {
3534
+ const e = this.options.removeOption(t);
3535
+ return this.requestUpdate(), e;
3536
+ }
3537
+ _onToggleOptionsMenuClick() {
3538
+ this.optionsIsVisible = !this.optionsIsVisible;
3539
+ }
3540
+ connectedCallback() {
3541
+ super.connectedCallback(), document.addEventListener("click", this._onClickOutside);
3542
+ }
3543
+ disconnectedCallback() {
3544
+ super.disconnectedCallback(), document.removeEventListener("click", this._onClickOutside);
3545
+ }
3546
+ render() {
3547
+ return this.options.options.length ? E` <div class="side-menu">
3548
+ <div
3549
+ class="options-menu"
3550
+ ${se(this.optionsRef)}
3551
+ ${Ss({
3552
+ keyframeOptions: { duration: 120 },
3553
+ in: ke,
3554
+ out: ke,
3555
+ stabilizeOut: !0,
3556
+ skipInitial: !1
3557
+ })}
3558
+ >
3559
+ ${this.options.options.map((t) => E`<button
3560
+ class="options-menu__item"
3561
+ data-testid="${t.key}"
3562
+ @click=${() => {
3563
+ t.closeOnClick && this._onToggleOptionsMenuClick(), t.onClick(), this.requestUpdate();
3564
+ }}
3565
+ ?disabled="${!t.enabled}"
3566
+ >
3567
+ ${t.icon ? E`<telia-icon
3568
+ class="option-icon"
3569
+ svg=${t.icon}
3570
+ size="sm"
3571
+ ></telia-icon>` : p}
3572
+ </button>`)}
3573
+ </div>
3574
+ </div>` : p;
3575
+ }
3576
+ }
3577
+ qs.styles = [
3578
+ Ys.styles || [],
3579
+ M`
3580
+ :host {
3581
+ --header-text-color: var(--text-on-primary-background);
3582
+ overflow: revert;
3583
+ }
3584
+
3585
+ .side-menu {
3586
+ padding-left: var(--spacing-sm);
3587
+
3588
+ background-color: transparent;
3589
+ color: var(--header-text-color);
3590
+ display: flex;
3591
+ gap: var(--spacing-md);
3592
+ flex-direction: row;
3593
+ justify-content: space-between;
3594
+ align-items: center;
3595
+ border-radius: var(--spacing-sm) var(--spacing-sm) 0px 0px;
3596
+ /* padding: 0 var(--spacing-xs); */
3597
+ }
3598
+
3599
+ button {
3600
+ background-color: transparent;
3601
+ //TODO: Add border color
3602
+ border: 1px solid var(--header-text-color);
3603
+ font-family: inherit;
3604
+ font-size: inherit;
3605
+ cursor: pointer;
3606
+
3607
+ transition: all 300ms ease-in-out;
3608
+ padding: var(--spacing-sm);
3609
+ }
3610
+
3611
+ .side-menu__action-buttons {
3612
+ display: flex;
3613
+ flex-direction: column;
3614
+ gap: var(--spacing-md);
3615
+ }
3616
+
3617
+ .side-menu__action-button {
3618
+ border-radius: var(--border-radius-xl);
3619
+ color: var(--header-text-color);
3620
+ display: flex;
3621
+ align-items: center;
3622
+ justify-content: center;
3623
+ }
3624
+
3625
+ .side-menu__action-button:hover {
3626
+ background-color: rgba(255, 255, 255, 0.1);
3627
+ }
3628
+ .side-menu__action-button:active {
3629
+ transform: scale(0.8);
3630
+ }
3631
+
3632
+ .options-menu {
3633
+ background-color: white;
3634
+ color: #222;
3635
+ overflow: visible;
3636
+ padding: var(--spacing-sm);
3637
+ border-radius: var(--border-radius-xl);
3638
+ z-index: 1;
3639
+ }
3640
+
3641
+ .options-menu__item {
3642
+ padding: var(--border-radius);
3643
+ transition: all 300ms ease-in-out;
3644
+ cursor: pointer;
3645
+ border-radius: var(--border-radius-xl);
3646
+ display: flex;
3647
+ gap: var(--spacing-sm);
3648
+ align-items: center;
3649
+ }
3650
+ .options-menu__item:hover {
3651
+ background-color: var(--secondary-background);
3652
+ color: var(--text-on-secondary-background);
3653
+ box-shadow: rgba(0, 18, 46, 0.16) 0px 6px 32px 0px;
3654
+ }
3655
+ .options-menu__item:disabled,
3656
+ .options-menu__item[disabled] {
3657
+ cursor: default;
3658
+ pointer-events: none;
3659
+ }
3660
+ `
3661
+ ];
3662
+ Or([
3663
+ N()
3664
+ ], qs.prototype, "optionsIsVisible", 2);
3665
+ export {
3666
+ qs as SideMenu,
3667
+ qs as default
3668
+ };