@telia-ace/widget-core-flamingo 1.1.120-rc.3 → 1.1.120-rc.30
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.
- package/index.d.ts +1 -0
- package/index.js +31 -29
- package/index.mjs +322 -319
- package/models/application.d.ts +0 -1
- package/package.json +1 -1
- package/types.d.ts +6 -0
package/index.mjs
CHANGED
@@ -27,24 +27,24 @@ function mt(r) {
|
|
27
27
|
function vt(r, t) {
|
28
28
|
var e = typeof Symbol == "function" && r[Symbol.iterator];
|
29
29
|
if (!e) return r;
|
30
|
-
var i = e.call(r), s,
|
30
|
+
var i = e.call(r), s, n = [], o;
|
31
31
|
try {
|
32
|
-
for (; (t === void 0 || t-- > 0) && !(s = i.next()).done; )
|
32
|
+
for (; (t === void 0 || t-- > 0) && !(s = i.next()).done; ) n.push(s.value);
|
33
33
|
} catch (a) {
|
34
|
-
|
34
|
+
o = { error: a };
|
35
35
|
} finally {
|
36
36
|
try {
|
37
37
|
s && !s.done && (e = i.return) && e.call(i);
|
38
38
|
} finally {
|
39
|
-
if (
|
39
|
+
if (o) throw o.error;
|
40
40
|
}
|
41
41
|
}
|
42
|
-
return
|
42
|
+
return n;
|
43
43
|
}
|
44
44
|
function yt(r, t, e) {
|
45
|
-
if (e || arguments.length === 2) for (var i = 0, s = t.length,
|
46
|
-
(
|
47
|
-
return r.concat(
|
45
|
+
if (e || arguments.length === 2) for (var i = 0, s = t.length, n; i < s; i++)
|
46
|
+
(n || !(i in t)) && (n || (n = Array.prototype.slice.call(t, 0, i)), n[i] = t[i]);
|
47
|
+
return r.concat(n || Array.prototype.slice.call(t));
|
48
48
|
}
|
49
49
|
function _(r) {
|
50
50
|
return typeof r == "function";
|
@@ -70,19 +70,19 @@ function bt(r, t) {
|
|
70
70
|
0 <= e && r.splice(e, 1);
|
71
71
|
}
|
72
72
|
}
|
73
|
-
var
|
73
|
+
var nt = function() {
|
74
74
|
function r(t) {
|
75
75
|
this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
|
76
76
|
}
|
77
77
|
return r.prototype.unsubscribe = function() {
|
78
|
-
var t, e, i, s,
|
78
|
+
var t, e, i, s, n;
|
79
79
|
if (!this.closed) {
|
80
80
|
this.closed = !0;
|
81
|
-
var
|
82
|
-
if (
|
83
|
-
if (this._parentage = null, Array.isArray(
|
81
|
+
var o = this._parentage;
|
82
|
+
if (o)
|
83
|
+
if (this._parentage = null, Array.isArray(o))
|
84
84
|
try {
|
85
|
-
for (var a = mt(
|
85
|
+
for (var a = mt(o), c = a.next(); !c.done; c = a.next()) {
|
86
86
|
var l = c.value;
|
87
87
|
l.remove(this);
|
88
88
|
}
|
@@ -96,13 +96,13 @@ var ot = function() {
|
|
96
96
|
}
|
97
97
|
}
|
98
98
|
else
|
99
|
-
|
99
|
+
o.remove(this);
|
100
100
|
var h = this.initialTeardown;
|
101
101
|
if (_(h))
|
102
102
|
try {
|
103
103
|
h();
|
104
104
|
} catch (v) {
|
105
|
-
|
105
|
+
n = v instanceof at ? v.errors : [v];
|
106
106
|
}
|
107
107
|
var d = this._finalizers;
|
108
108
|
if (d) {
|
@@ -111,9 +111,9 @@ var ot = function() {
|
|
111
111
|
for (var u = mt(d), f = u.next(); !f.done; f = u.next()) {
|
112
112
|
var g = f.value;
|
113
113
|
try {
|
114
|
-
|
114
|
+
Ut(g);
|
115
115
|
} catch (v) {
|
116
|
-
|
116
|
+
n = n ?? [], v instanceof at ? n = yt(yt([], vt(n)), vt(v.errors)) : n.push(v);
|
117
117
|
}
|
118
118
|
}
|
119
119
|
} catch (v) {
|
@@ -126,14 +126,14 @@ var ot = function() {
|
|
126
126
|
}
|
127
127
|
}
|
128
128
|
}
|
129
|
-
if (
|
130
|
-
throw new at(
|
129
|
+
if (n)
|
130
|
+
throw new at(n);
|
131
131
|
}
|
132
132
|
}, r.prototype.add = function(t) {
|
133
133
|
var e;
|
134
134
|
if (t && t !== this)
|
135
135
|
if (this.closed)
|
136
|
-
|
136
|
+
Ut(t);
|
137
137
|
else {
|
138
138
|
if (t instanceof r) {
|
139
139
|
if (t.closed || t._hasParent(this))
|
@@ -158,16 +158,16 @@ var ot = function() {
|
|
158
158
|
var t = new r();
|
159
159
|
return t.closed = !0, t;
|
160
160
|
}(), r;
|
161
|
-
}(), he =
|
161
|
+
}(), he = nt.EMPTY;
|
162
162
|
function le(r) {
|
163
|
-
return r instanceof
|
163
|
+
return r instanceof nt || r && "closed" in r && _(r.remove) && _(r.add) && _(r.unsubscribe);
|
164
164
|
}
|
165
|
-
function
|
165
|
+
function Ut(r) {
|
166
166
|
_(r) ? r() : r.unsubscribe();
|
167
167
|
}
|
168
|
-
var
|
168
|
+
var Ee = {
|
169
169
|
Promise: void 0
|
170
|
-
},
|
170
|
+
}, Se = {
|
171
171
|
setTimeout: function(r, t) {
|
172
172
|
for (var e = [], i = 2; i < arguments.length; i++)
|
173
173
|
e[i - 2] = arguments[i];
|
@@ -179,7 +179,7 @@ var Se = {
|
|
179
179
|
delegate: void 0
|
180
180
|
};
|
181
181
|
function Pe(r) {
|
182
|
-
|
182
|
+
Se.setTimeout(function() {
|
183
183
|
throw r;
|
184
184
|
});
|
185
185
|
}
|
@@ -219,7 +219,7 @@ var de = function(r) {
|
|
219
219
|
this.unsubscribe();
|
220
220
|
}
|
221
221
|
}, t;
|
222
|
-
}(
|
222
|
+
}(nt), Oe = function() {
|
223
223
|
function r(t) {
|
224
224
|
this.partialObserver = t;
|
225
225
|
}
|
@@ -253,12 +253,12 @@ var de = function(r) {
|
|
253
253
|
}(), wt = function(r) {
|
254
254
|
G(t, r);
|
255
255
|
function t(e, i, s) {
|
256
|
-
var
|
257
|
-
return _(e) || !e ?
|
256
|
+
var n = r.call(this) || this, o;
|
257
|
+
return _(e) || !e ? o = {
|
258
258
|
next: e ?? void 0,
|
259
259
|
error: i ?? void 0,
|
260
260
|
complete: s ?? void 0
|
261
|
-
} :
|
261
|
+
} : o = e, n.destination = new Oe(o), n;
|
262
262
|
}
|
263
263
|
return t;
|
264
264
|
}(de);
|
@@ -294,11 +294,11 @@ var Ht = function() {
|
|
294
294
|
var e = new r();
|
295
295
|
return e.source = this, e.operator = t, e;
|
296
296
|
}, r.prototype.subscribe = function(t, e, i) {
|
297
|
-
var s = this,
|
297
|
+
var s = this, n = Le(t) ? t : new wt(t, e, i);
|
298
298
|
return J(function() {
|
299
|
-
var
|
300
|
-
|
301
|
-
}),
|
299
|
+
var o = s, a = o.operator, c = o.source;
|
300
|
+
n.add(a ? a.call(n, c) : c ? s._subscribe(n) : s._trySubscribe(n));
|
301
|
+
}), n;
|
302
302
|
}, r.prototype._trySubscribe = function(t) {
|
303
303
|
try {
|
304
304
|
return this._subscribe(t);
|
@@ -307,19 +307,19 @@ var Ht = function() {
|
|
307
307
|
}
|
308
308
|
}, r.prototype.forEach = function(t, e) {
|
309
309
|
var i = this;
|
310
|
-
return e = Ft(e), new e(function(s,
|
311
|
-
var
|
310
|
+
return e = Ft(e), new e(function(s, n) {
|
311
|
+
var o = new wt({
|
312
312
|
next: function(a) {
|
313
313
|
try {
|
314
314
|
t(a);
|
315
315
|
} catch (c) {
|
316
|
-
|
316
|
+
n(c), o.unsubscribe();
|
317
317
|
}
|
318
318
|
},
|
319
|
-
error:
|
319
|
+
error: n,
|
320
320
|
complete: s
|
321
321
|
});
|
322
|
-
i.subscribe(
|
322
|
+
i.subscribe(o);
|
323
323
|
});
|
324
324
|
}, r.prototype._subscribe = function(t) {
|
325
325
|
var e;
|
@@ -333,13 +333,13 @@ var Ht = function() {
|
|
333
333
|
}, r.prototype.toPromise = function(t) {
|
334
334
|
var e = this;
|
335
335
|
return t = Ft(t), new t(function(i, s) {
|
336
|
-
var
|
337
|
-
e.subscribe(function(
|
338
|
-
return
|
339
|
-
}, function(
|
340
|
-
return s(
|
336
|
+
var n;
|
337
|
+
e.subscribe(function(o) {
|
338
|
+
return n = o;
|
339
|
+
}, function(o) {
|
340
|
+
return s(o);
|
341
341
|
}, function() {
|
342
|
-
return i(
|
342
|
+
return i(n);
|
343
343
|
});
|
344
344
|
});
|
345
345
|
}, r.create = function(t) {
|
@@ -348,19 +348,19 @@ var Ht = function() {
|
|
348
348
|
}();
|
349
349
|
function Ft(r) {
|
350
350
|
var t;
|
351
|
-
return (t = r ??
|
351
|
+
return (t = r ?? Ee.Promise) !== null && t !== void 0 ? t : Promise;
|
352
352
|
}
|
353
353
|
function Ne(r) {
|
354
354
|
return r && _(r.next) && _(r.error) && _(r.complete);
|
355
355
|
}
|
356
|
-
function
|
356
|
+
function Le(r) {
|
357
357
|
return r && r instanceof de || Ne(r) && le(r);
|
358
358
|
}
|
359
|
-
var
|
359
|
+
var Ue = ce(function(r) {
|
360
360
|
return function() {
|
361
361
|
r(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
362
362
|
};
|
363
|
-
}),
|
363
|
+
}), At = function(r) {
|
364
364
|
G(t, r);
|
365
365
|
function t() {
|
366
366
|
var e = r.call(this) || this;
|
@@ -371,15 +371,15 @@ var Le = ce(function(r) {
|
|
371
371
|
return i.operator = e, i;
|
372
372
|
}, t.prototype._throwIfClosed = function() {
|
373
373
|
if (this.closed)
|
374
|
-
throw new
|
374
|
+
throw new Ue();
|
375
375
|
}, t.prototype.next = function(e) {
|
376
376
|
var i = this;
|
377
377
|
J(function() {
|
378
|
-
var s,
|
378
|
+
var s, n;
|
379
379
|
if (i._throwIfClosed(), !i.isStopped) {
|
380
380
|
i.currentObservers || (i.currentObservers = Array.from(i.observers));
|
381
381
|
try {
|
382
|
-
for (var
|
382
|
+
for (var o = mt(i.currentObservers), a = o.next(); !a.done; a = o.next()) {
|
383
383
|
var c = a.value;
|
384
384
|
c.next(e);
|
385
385
|
}
|
@@ -387,7 +387,7 @@ var Le = ce(function(r) {
|
|
387
387
|
s = { error: l };
|
388
388
|
} finally {
|
389
389
|
try {
|
390
|
-
a && !a.done && (
|
390
|
+
a && !a.done && (n = o.return) && n.call(o);
|
391
391
|
} finally {
|
392
392
|
if (s) throw s.error;
|
393
393
|
}
|
@@ -426,13 +426,13 @@ var Le = ce(function(r) {
|
|
426
426
|
}, t.prototype._subscribe = function(e) {
|
427
427
|
return this._throwIfClosed(), this._checkFinalizedStatuses(e), this._innerSubscribe(e);
|
428
428
|
}, t.prototype._innerSubscribe = function(e) {
|
429
|
-
var i = this, s = this,
|
430
|
-
return
|
429
|
+
var i = this, s = this, n = s.hasError, o = s.isStopped, a = s.observers;
|
430
|
+
return n || o ? he : (this.currentObservers = null, a.push(e), new nt(function() {
|
431
431
|
i.currentObservers = null, bt(a, e);
|
432
432
|
}));
|
433
433
|
}, t.prototype._checkFinalizedStatuses = function(e) {
|
434
|
-
var i = this, s = i.hasError,
|
435
|
-
s ? e.error(
|
434
|
+
var i = this, s = i.hasError, n = i.thrownError, o = i.isStopped;
|
435
|
+
s ? e.error(n) : o && e.complete();
|
436
436
|
}, t.prototype.asObservable = function() {
|
437
437
|
var e = new Ht();
|
438
438
|
return e.source = this, e;
|
@@ -458,7 +458,7 @@ var Le = ce(function(r) {
|
|
458
458
|
var i, s;
|
459
459
|
return (s = (i = this.source) === null || i === void 0 ? void 0 : i.subscribe(e)) !== null && s !== void 0 ? s : he;
|
460
460
|
}, t;
|
461
|
-
}(
|
461
|
+
}(At), xt = function(r) {
|
462
462
|
G(t, r);
|
463
463
|
function t(e) {
|
464
464
|
var i = r.call(this) || this;
|
@@ -474,17 +474,17 @@ var Le = ce(function(r) {
|
|
474
474
|
var i = r.prototype._subscribe.call(this, e);
|
475
475
|
return !i.closed && e.next(this._value), i;
|
476
476
|
}, t.prototype.getValue = function() {
|
477
|
-
var e = this, i = e.hasError, s = e.thrownError,
|
477
|
+
var e = this, i = e.hasError, s = e.thrownError, n = e._value;
|
478
478
|
if (i)
|
479
479
|
throw s;
|
480
|
-
return this._throwIfClosed(),
|
480
|
+
return this._throwIfClosed(), n;
|
481
481
|
}, t.prototype.next = function(e) {
|
482
482
|
r.prototype.next.call(this, this._value = e);
|
483
483
|
}, t;
|
484
|
-
}(
|
484
|
+
}(At), ue = /* @__PURE__ */ ((r) => (r.Loading = "loading", r.Ready = "ready", r))(ue || {});
|
485
485
|
class Dt {
|
486
486
|
constructor(t, e) {
|
487
|
-
this.state = new
|
487
|
+
this.state = new xt(
|
488
488
|
"loading"
|
489
489
|
/* Loading */
|
490
490
|
), this.resolvers = /* @__PURE__ */ new Map(), this.name = t, this.environment = e, this.state.next(
|
@@ -507,10 +507,10 @@ class Dt {
|
|
507
507
|
* Copyright 2019 Google LLC
|
508
508
|
* SPDX-License-Identifier: BSD-3-Clause
|
509
509
|
*/
|
510
|
-
const X = globalThis, Ct = X.ShadowRoot && (X.ShadyCSS === void 0 || X.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
|
510
|
+
const X = globalThis, Ct = X.ShadowRoot && (X.ShadyCSS === void 0 || X.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Et = Symbol(), zt = /* @__PURE__ */ new WeakMap();
|
511
511
|
let pe = class {
|
512
512
|
constructor(t, e, i) {
|
513
|
-
if (this._$cssResult$ = !0, i !==
|
513
|
+
if (this._$cssResult$ = !0, i !== Et) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
514
514
|
this.cssText = t, this.t = e;
|
515
515
|
}
|
516
516
|
get styleSheet() {
|
@@ -526,13 +526,13 @@ let pe = class {
|
|
526
526
|
return this.cssText;
|
527
527
|
}
|
528
528
|
};
|
529
|
-
const je = (r) => new pe(typeof r == "string" ? r : r + "", void 0,
|
530
|
-
const e = r.length === 1 ? r[0] : t.reduce((i, s,
|
531
|
-
if (
|
532
|
-
if (typeof
|
533
|
-
throw Error("Value passed to 'css' function must be a 'css' function result: " +
|
534
|
-
})(s) + r[
|
535
|
-
return new pe(e, r,
|
529
|
+
const je = (r) => new pe(typeof r == "string" ? r : r + "", void 0, Et), U = (r, ...t) => {
|
530
|
+
const e = r.length === 1 ? r[0] : t.reduce((i, s, n) => i + ((o) => {
|
531
|
+
if (o._$cssResult$ === !0) return o.cssText;
|
532
|
+
if (typeof o == "number") return o;
|
533
|
+
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.");
|
534
|
+
})(s) + r[n + 1], r[0]);
|
535
|
+
return new pe(e, r, Et);
|
536
536
|
}, He = (r, t) => {
|
537
537
|
if (Ct) r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
538
538
|
else for (const e of t) {
|
@@ -577,7 +577,7 @@ const { is: Fe, defineProperty: Be, getOwnPropertyDescriptor: De, getOwnProperty
|
|
577
577
|
}
|
578
578
|
}
|
579
579
|
return e;
|
580
|
-
} },
|
580
|
+
} }, St = (r, t) => !Fe(r, t), qt = { attribute: !0, type: String, converter: Q, reflect: !1, useDefault: !1, hasChanged: St };
|
581
581
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), C.litPropertyMetadata ?? (C.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
582
582
|
let T = class extends HTMLElement {
|
583
583
|
static addInitializer(t) {
|
@@ -593,14 +593,14 @@ let T = class extends HTMLElement {
|
|
593
593
|
}
|
594
594
|
}
|
595
595
|
static getPropertyDescriptor(t, e, i) {
|
596
|
-
const { get: s, set:
|
596
|
+
const { get: s, set: n } = De(this.prototype, t) ?? { get() {
|
597
597
|
return this[e];
|
598
|
-
}, set(
|
599
|
-
this[e] =
|
598
|
+
}, set(o) {
|
599
|
+
this[e] = o;
|
600
600
|
} };
|
601
|
-
return { get: s, set(
|
601
|
+
return { get: s, set(o) {
|
602
602
|
const a = s == null ? void 0 : s.call(this);
|
603
|
-
|
603
|
+
n == null || n.call(this, o), this.requestUpdate(t, a, i);
|
604
604
|
}, configurable: !0, enumerable: !0 };
|
605
605
|
}
|
606
606
|
static getPropertyOptions(t) {
|
@@ -685,32 +685,32 @@ let T = class extends HTMLElement {
|
|
685
685
|
this._$AK(t, i);
|
686
686
|
}
|
687
687
|
_$ET(t, e) {
|
688
|
-
var
|
688
|
+
var n;
|
689
689
|
const i = this.constructor.elementProperties.get(t), s = this.constructor._$Eu(t, i);
|
690
690
|
if (s !== void 0 && i.reflect === !0) {
|
691
|
-
const
|
692
|
-
this._$Em = t,
|
691
|
+
const o = (((n = i.converter) == null ? void 0 : n.toAttribute) !== void 0 ? i.converter : Q).toAttribute(e, i.type);
|
692
|
+
this._$Em = t, o == null ? this.removeAttribute(s) : this.setAttribute(s, o), this._$Em = null;
|
693
693
|
}
|
694
694
|
}
|
695
695
|
_$AK(t, e) {
|
696
|
-
var
|
696
|
+
var n, o;
|
697
697
|
const i = this.constructor, s = i._$Eh.get(t);
|
698
698
|
if (s !== void 0 && this._$Em !== s) {
|
699
|
-
const a = i.getPropertyOptions(s), c = typeof a.converter == "function" ? { fromAttribute: a.converter } : ((
|
700
|
-
this._$Em = s, this[s] = c.fromAttribute(e, a.type) ?? ((
|
699
|
+
const a = i.getPropertyOptions(s), c = typeof a.converter == "function" ? { fromAttribute: a.converter } : ((n = a.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? a.converter : Q;
|
700
|
+
this._$Em = s, this[s] = c.fromAttribute(e, a.type) ?? ((o = this._$Ej) == null ? void 0 : o.get(s)) ?? null, this._$Em = null;
|
701
701
|
}
|
702
702
|
}
|
703
703
|
requestUpdate(t, e, i) {
|
704
704
|
var s;
|
705
705
|
if (t !== void 0) {
|
706
|
-
const
|
707
|
-
if (i ?? (i =
|
706
|
+
const n = this.constructor, o = this[t];
|
707
|
+
if (i ?? (i = n.getPropertyOptions(t)), !((i.hasChanged ?? St)(o, e) || i.useDefault && i.reflect && o === ((s = this._$Ej) == null ? void 0 : s.get(t)) && !this.hasAttribute(n._$Eu(t, i)))) return;
|
708
708
|
this.C(t, e, i);
|
709
709
|
}
|
710
710
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
711
711
|
}
|
712
|
-
C(t, e, { useDefault: i, reflect: s, wrapped:
|
713
|
-
i && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(t) && (this._$Ej.set(t,
|
712
|
+
C(t, e, { useDefault: i, reflect: s, wrapped: n }, o) {
|
713
|
+
i && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(t) && (this._$Ej.set(t, o ?? e ?? this[t]), n !== !0 || o !== void 0) || (this._$AL.has(t) || (this.hasUpdated || i || (e = void 0), this._$AL.set(t, e)), s === !0 && this._$Em !== t && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(t));
|
714
714
|
}
|
715
715
|
async _$EP() {
|
716
716
|
this.isUpdatePending = !0;
|
@@ -730,21 +730,21 @@ let T = class extends HTMLElement {
|
|
730
730
|
if (!this.isUpdatePending) return;
|
731
731
|
if (!this.hasUpdated) {
|
732
732
|
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
733
|
-
for (const [
|
733
|
+
for (const [n, o] of this._$Ep) this[n] = o;
|
734
734
|
this._$Ep = void 0;
|
735
735
|
}
|
736
736
|
const s = this.constructor.elementProperties;
|
737
|
-
if (s.size > 0) for (const [
|
738
|
-
const { wrapped: a } =
|
739
|
-
a !== !0 || this._$AL.has(
|
737
|
+
if (s.size > 0) for (const [n, o] of s) {
|
738
|
+
const { wrapped: a } = o, c = this[n];
|
739
|
+
a !== !0 || this._$AL.has(n) || c === void 0 || this.C(n, void 0, o, c);
|
740
740
|
}
|
741
741
|
}
|
742
742
|
let t = !1;
|
743
743
|
const e = this._$AL;
|
744
744
|
try {
|
745
745
|
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (i = this._$EO) == null || i.forEach((s) => {
|
746
|
-
var
|
747
|
-
return (
|
746
|
+
var n;
|
747
|
+
return (n = s.hostUpdate) == null ? void 0 : n.call(s);
|
748
748
|
}), this.update(e)) : this._$EM();
|
749
749
|
} catch (s) {
|
750
750
|
throw t = !1, this._$EM(), s;
|
@@ -786,8 +786,8 @@ T.elementStyles = [], T.shadowRootOptions = { mode: "open" }, T[F("elementProper
|
|
786
786
|
* Copyright 2017 Google LLC
|
787
787
|
* SPDX-License-Identifier: BSD-3-Clause
|
788
788
|
*/
|
789
|
-
const B = globalThis, tt = B.trustedTypes, Gt = tt ? tt.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, fe = "$lit$",
|
790
|
-
\f\r]`, H = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Kt = /-->/g, Yt = />/g,
|
789
|
+
const B = globalThis, tt = B.trustedTypes, Gt = tt ? tt.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, fe = "$lit$", x = `lit$${Math.random().toFixed(9).slice(2)}$`, ge = "?" + x, Ge = `<${ge}>`, I = document, z = () => I.createComment(""), V = (r) => r === null || typeof r != "object" && typeof r != "function", Pt = Array.isArray, Ke = (r) => Pt(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", ht = `[
|
790
|
+
\f\r]`, H = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Kt = /-->/g, Yt = />/g, E = RegExp(`>|${ht}(?:([^\\s"'>=/]+)(${ht}*=${ht}*(?:[^
|
791
791
|
\f\r"'\`<>=]|("|')|))|$)`, "g"), Zt = /'/g, Jt = /"/g, me = /^(?:script|style|textarea|title)$/i, Ye = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), R = Ye(1), k = Symbol.for("lit-noChange"), p = Symbol.for("lit-nothing"), Xt = /* @__PURE__ */ new WeakMap(), P = I.createTreeWalker(I, 129);
|
792
792
|
function ve(r, t) {
|
793
793
|
if (!Pt(r) || !r.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
@@ -795,21 +795,21 @@ function ve(r, t) {
|
|
795
795
|
}
|
796
796
|
const Ze = (r, t) => {
|
797
797
|
const e = r.length - 1, i = [];
|
798
|
-
let s,
|
798
|
+
let s, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = H;
|
799
799
|
for (let a = 0; a < e; a++) {
|
800
800
|
const c = r[a];
|
801
801
|
let l, h, d = -1, u = 0;
|
802
|
-
for (; u < c.length && (
|
803
|
-
const f =
|
804
|
-
|
802
|
+
for (; u < c.length && (o.lastIndex = u, h = o.exec(c), h !== null); ) u = o.lastIndex, o === H ? h[1] === "!--" ? o = Kt : h[1] !== void 0 ? o = Yt : h[2] !== void 0 ? (me.test(h[2]) && (s = RegExp("</" + h[2], "g")), o = E) : h[3] !== void 0 && (o = E) : o === E ? h[0] === ">" ? (o = s ?? H, d = -1) : h[1] === void 0 ? d = -2 : (d = o.lastIndex - h[2].length, l = h[1], o = h[3] === void 0 ? E : h[3] === '"' ? Jt : Zt) : o === Jt || o === Zt ? o = E : o === Kt || o === Yt ? o = H : (o = E, s = void 0);
|
803
|
+
const f = o === E && r[a + 1].startsWith("/>") ? " " : "";
|
804
|
+
n += o === H ? c + Ge : d >= 0 ? (i.push(l), c.slice(0, d) + fe + c.slice(d) + x + f) : c + x + (d === -2 ? a : f);
|
805
805
|
}
|
806
|
-
return [ve(r,
|
806
|
+
return [ve(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
|
807
807
|
};
|
808
808
|
let $t = class ye {
|
809
809
|
constructor({ strings: t, _$litType$: e }, i) {
|
810
810
|
let s;
|
811
811
|
this.parts = [];
|
812
|
-
let
|
812
|
+
let n = 0, o = 0;
|
813
813
|
const a = t.length - 1, c = this.parts, [l, h] = Ze(t, e);
|
814
814
|
if (this.el = ye.createElement(l, i), P.currentNode = this.el.content, e === 2 || e === 3) {
|
815
815
|
const d = this.el.content.firstChild;
|
@@ -818,23 +818,23 @@ let $t = class ye {
|
|
818
818
|
for (; (s = P.nextNode()) !== null && c.length < a; ) {
|
819
819
|
if (s.nodeType === 1) {
|
820
820
|
if (s.hasAttributes()) for (const d of s.getAttributeNames()) if (d.endsWith(fe)) {
|
821
|
-
const u = h[
|
822
|
-
c.push({ type: 1, index:
|
823
|
-
} else d.startsWith(
|
821
|
+
const u = h[o++], f = s.getAttribute(d).split(x), g = /([.?@])?(.*)/.exec(u);
|
822
|
+
c.push({ type: 1, index: n, name: g[2], strings: f, ctor: g[1] === "." ? Xe : g[1] === "?" ? Qe : g[1] === "@" ? ti : ot }), s.removeAttribute(d);
|
823
|
+
} else d.startsWith(x) && (c.push({ type: 6, index: n }), s.removeAttribute(d));
|
824
824
|
if (me.test(s.tagName)) {
|
825
|
-
const d = s.textContent.split(
|
825
|
+
const d = s.textContent.split(x), u = d.length - 1;
|
826
826
|
if (u > 0) {
|
827
827
|
s.textContent = tt ? tt.emptyScript : "";
|
828
|
-
for (let f = 0; f < u; f++) s.append(d[f], z()), P.nextNode(), c.push({ type: 2, index: ++
|
828
|
+
for (let f = 0; f < u; f++) s.append(d[f], z()), P.nextNode(), c.push({ type: 2, index: ++n });
|
829
829
|
s.append(d[u], z());
|
830
830
|
}
|
831
831
|
}
|
832
|
-
} else if (s.nodeType === 8) if (s.data === ge) c.push({ type: 2, index:
|
832
|
+
} else if (s.nodeType === 8) if (s.data === ge) c.push({ type: 2, index: n });
|
833
833
|
else {
|
834
834
|
let d = -1;
|
835
|
-
for (; (d = s.data.indexOf(
|
835
|
+
for (; (d = s.data.indexOf(x, d + 1)) !== -1; ) c.push({ type: 7, index: n }), d += x.length - 1;
|
836
836
|
}
|
837
|
-
|
837
|
+
n++;
|
838
838
|
}
|
839
839
|
}
|
840
840
|
static createElement(t, e) {
|
@@ -843,11 +843,11 @@ let $t = class ye {
|
|
843
843
|
}
|
844
844
|
};
|
845
845
|
function M(r, t, e = r, i) {
|
846
|
-
var
|
846
|
+
var o, a;
|
847
847
|
if (t === k) return t;
|
848
|
-
let s = i !== void 0 ? (
|
849
|
-
const
|
850
|
-
return (s == null ? void 0 : s.constructor) !==
|
848
|
+
let s = i !== void 0 ? (o = e._$Co) == null ? void 0 : o[i] : e._$Cl;
|
849
|
+
const n = V(t) ? void 0 : t._$litDirective$;
|
850
|
+
return (s == null ? void 0 : s.constructor) !== n && ((a = s == null ? void 0 : s._$AO) == null || a.call(s, !1), n === void 0 ? s = void 0 : (s = new n(r), s._$AT(r, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = s : e._$Cl = s), s !== void 0 && (t = M(r, s._$AS(r, t.values), s, i)), t;
|
851
851
|
}
|
852
852
|
class Je {
|
853
853
|
constructor(t, e) {
|
@@ -862,13 +862,13 @@ class Je {
|
|
862
862
|
u(t) {
|
863
863
|
const { el: { content: e }, parts: i } = this._$AD, s = ((t == null ? void 0 : t.creationScope) ?? I).importNode(e, !0);
|
864
864
|
P.currentNode = s;
|
865
|
-
let
|
865
|
+
let n = P.nextNode(), o = 0, a = 0, c = i[0];
|
866
866
|
for (; c !== void 0; ) {
|
867
|
-
if (
|
867
|
+
if (o === c.index) {
|
868
868
|
let l;
|
869
|
-
c.type === 2 ? l = new K(
|
869
|
+
c.type === 2 ? l = new K(n, n.nextSibling, this, t) : c.type === 1 ? l = new c.ctor(n, c.name, c.strings, this, t) : c.type === 6 && (l = new ei(n, this, t)), this._$AV.push(l), c = i[++a];
|
870
870
|
}
|
871
|
-
|
871
|
+
o !== (c == null ? void 0 : c.index) && (n = P.nextNode(), o++);
|
872
872
|
}
|
873
873
|
return P.currentNode = I, s;
|
874
874
|
}
|
@@ -909,12 +909,12 @@ class K {
|
|
909
909
|
this._$AH !== p && V(this._$AH) ? this._$AA.nextSibling.data = t : this.T(I.createTextNode(t)), this._$AH = t;
|
910
910
|
}
|
911
911
|
$(t) {
|
912
|
-
var
|
912
|
+
var n;
|
913
913
|
const { values: e, _$litType$: i } = t, s = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = $t.createElement(ve(i.h, i.h[0]), this.options)), i);
|
914
|
-
if (((
|
914
|
+
if (((n = this._$AH) == null ? void 0 : n._$AD) === s) this._$AH.p(e);
|
915
915
|
else {
|
916
|
-
const
|
917
|
-
|
916
|
+
const o = new Je(s, this), a = o.u(this.options);
|
917
|
+
o.p(e), this.T(a), this._$AH = o;
|
918
918
|
}
|
919
919
|
}
|
920
920
|
_$AC(t) {
|
@@ -925,7 +925,7 @@ class K {
|
|
925
925
|
Pt(this._$AH) || (this._$AH = [], this._$AR());
|
926
926
|
const e = this._$AH;
|
927
927
|
let i, s = 0;
|
928
|
-
for (const
|
928
|
+
for (const n of t) s === e.length ? e.push(i = new K(this.O(z()), this.O(z()), this, this.options)) : i = e[s], i._$AI(n), s++;
|
929
929
|
s < e.length && (this._$AR(i && i._$AB.nextSibling, s), e.length = s);
|
930
930
|
}
|
931
931
|
_$AR(t = this._$AA.nextSibling, e) {
|
@@ -940,32 +940,32 @@ class K {
|
|
940
940
|
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
941
941
|
}
|
942
942
|
}
|
943
|
-
class
|
943
|
+
class ot {
|
944
944
|
get tagName() {
|
945
945
|
return this.element.tagName;
|
946
946
|
}
|
947
947
|
get _$AU() {
|
948
948
|
return this._$AM._$AU;
|
949
949
|
}
|
950
|
-
constructor(t, e, i, s,
|
951
|
-
this.type = 1, this._$AH = p, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options =
|
950
|
+
constructor(t, e, i, s, n) {
|
951
|
+
this.type = 1, this._$AH = p, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = n, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = p;
|
952
952
|
}
|
953
953
|
_$AI(t, e = this, i, s) {
|
954
|
-
const
|
955
|
-
let
|
956
|
-
if (
|
954
|
+
const n = this.strings;
|
955
|
+
let o = !1;
|
956
|
+
if (n === void 0) t = M(this, t, e, 0), o = !V(t) || t !== this._$AH && t !== k, o && (this._$AH = t);
|
957
957
|
else {
|
958
958
|
const a = t;
|
959
959
|
let c, l;
|
960
|
-
for (t =
|
960
|
+
for (t = n[0], c = 0; c < n.length - 1; c++) l = M(this, a[i + c], e, c), l === k && (l = this._$AH[c]), o || (o = !V(l) || l !== this._$AH[c]), l === p ? t = p : t !== p && (t += (l ?? "") + n[c + 1]), this._$AH[c] = l;
|
961
961
|
}
|
962
|
-
|
962
|
+
o && !s && this.j(t);
|
963
963
|
}
|
964
964
|
j(t) {
|
965
965
|
t === p ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
966
966
|
}
|
967
967
|
}
|
968
|
-
class Xe extends
|
968
|
+
class Xe extends ot {
|
969
969
|
constructor() {
|
970
970
|
super(...arguments), this.type = 3;
|
971
971
|
}
|
@@ -973,7 +973,7 @@ class Xe extends nt {
|
|
973
973
|
this.element[this.name] = t === p ? void 0 : t;
|
974
974
|
}
|
975
975
|
}
|
976
|
-
class Qe extends
|
976
|
+
class Qe extends ot {
|
977
977
|
constructor() {
|
978
978
|
super(...arguments), this.type = 4;
|
979
979
|
}
|
@@ -981,14 +981,14 @@ class Qe extends nt {
|
|
981
981
|
this.element.toggleAttribute(this.name, !!t && t !== p);
|
982
982
|
}
|
983
983
|
}
|
984
|
-
class ti extends
|
985
|
-
constructor(t, e, i, s,
|
986
|
-
super(t, e, i, s,
|
984
|
+
class ti extends ot {
|
985
|
+
constructor(t, e, i, s, n) {
|
986
|
+
super(t, e, i, s, n), this.type = 5;
|
987
987
|
}
|
988
988
|
_$AI(t, e = this) {
|
989
989
|
if ((t = M(this, t, e, 0) ?? p) === k) return;
|
990
|
-
const i = this._$AH, s = t === p && i !== p || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive,
|
991
|
-
s && this.element.removeEventListener(this.name, this, i),
|
990
|
+
const i = this._$AH, s = t === p && i !== p || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, n = t !== p && (i === p || s);
|
991
|
+
s && this.element.removeEventListener(this.name, this, i), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
992
992
|
}
|
993
993
|
handleEvent(t) {
|
994
994
|
var e;
|
@@ -1012,8 +1012,8 @@ const ii = (r, t, e) => {
|
|
1012
1012
|
const i = (e == null ? void 0 : e.renderBefore) ?? t;
|
1013
1013
|
let s = i._$litPart$;
|
1014
1014
|
if (s === void 0) {
|
1015
|
-
const
|
1016
|
-
i._$litPart$ = s = new K(t.insertBefore(z(),
|
1015
|
+
const n = (e == null ? void 0 : e.renderBefore) ?? null;
|
1016
|
+
i._$litPart$ = s = new K(t.insertBefore(z(), n), n, void 0, e ?? {});
|
1017
1017
|
}
|
1018
1018
|
return s._$AI(r), s;
|
1019
1019
|
};
|
@@ -1023,7 +1023,7 @@ const ii = (r, t, e) => {
|
|
1023
1023
|
* SPDX-License-Identifier: BSD-3-Clause
|
1024
1024
|
*/
|
1025
1025
|
const O = globalThis;
|
1026
|
-
let
|
1026
|
+
let A = class extends T {
|
1027
1027
|
constructor() {
|
1028
1028
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
1029
1029
|
}
|
@@ -1049,40 +1049,40 @@ let x = class extends T {
|
|
1049
1049
|
}
|
1050
1050
|
};
|
1051
1051
|
var ae;
|
1052
|
-
|
1052
|
+
A._$litElement$ = !0, A.finalized = !0, (ae = O.litElementHydrateSupport) == null || ae.call(O, { LitElement: A });
|
1053
1053
|
const dt = O.litElementPolyfillSupport;
|
1054
|
-
dt == null || dt({ LitElement:
|
1054
|
+
dt == null || dt({ LitElement: A });
|
1055
1055
|
(O.litElementVersions ?? (O.litElementVersions = [])).push("4.2.0");
|
1056
1056
|
/**
|
1057
1057
|
* @license
|
1058
1058
|
* Copyright 2017 Google LLC
|
1059
1059
|
* SPDX-License-Identifier: BSD-3-Clause
|
1060
1060
|
*/
|
1061
|
-
const si = { attribute: !0, type: String, converter: Q, reflect: !1, hasChanged:
|
1061
|
+
const si = { attribute: !0, type: String, converter: Q, reflect: !1, hasChanged: St }, ri = (r = si, t, e) => {
|
1062
1062
|
const { kind: i, metadata: s } = e;
|
1063
|
-
let
|
1064
|
-
if (
|
1065
|
-
const { name:
|
1063
|
+
let n = globalThis.litPropertyMetadata.get(s);
|
1064
|
+
if (n === void 0 && globalThis.litPropertyMetadata.set(s, n = /* @__PURE__ */ new Map()), i === "setter" && ((r = Object.create(r)).wrapped = !0), n.set(e.name, r), i === "accessor") {
|
1065
|
+
const { name: o } = e;
|
1066
1066
|
return { set(a) {
|
1067
1067
|
const c = t.get.call(this);
|
1068
|
-
t.set.call(this, a), this.requestUpdate(
|
1068
|
+
t.set.call(this, a), this.requestUpdate(o, c, r);
|
1069
1069
|
}, init(a) {
|
1070
|
-
return a !== void 0 && this.C(
|
1070
|
+
return a !== void 0 && this.C(o, void 0, r, a), a;
|
1071
1071
|
} };
|
1072
1072
|
}
|
1073
1073
|
if (i === "setter") {
|
1074
|
-
const { name:
|
1074
|
+
const { name: o } = e;
|
1075
1075
|
return function(a) {
|
1076
|
-
const c = this[
|
1077
|
-
t.call(this, a), this.requestUpdate(
|
1076
|
+
const c = this[o];
|
1077
|
+
t.call(this, a), this.requestUpdate(o, c, r);
|
1078
1078
|
};
|
1079
1079
|
}
|
1080
1080
|
throw Error("Unsupported decorator location: " + i);
|
1081
1081
|
};
|
1082
1082
|
function m(r) {
|
1083
|
-
return (t, e) => typeof e == "object" ? ri(r, t, e) : ((i, s,
|
1084
|
-
const
|
1085
|
-
return s.constructor.createProperty(
|
1083
|
+
return (t, e) => typeof e == "object" ? ri(r, t, e) : ((i, s, n) => {
|
1084
|
+
const o = s.hasOwnProperty(n);
|
1085
|
+
return s.constructor.createProperty(n, i), o ? Object.getOwnPropertyDescriptor(s, n) : void 0;
|
1086
1086
|
})(r, t, e);
|
1087
1087
|
}
|
1088
1088
|
/**
|
@@ -1093,12 +1093,12 @@ function m(r) {
|
|
1093
1093
|
function j(r) {
|
1094
1094
|
return m({ ...r, state: !0, attribute: !1 });
|
1095
1095
|
}
|
1096
|
-
var
|
1097
|
-
for (var s = void 0,
|
1098
|
-
(
|
1099
|
-
return s &&
|
1096
|
+
var ni = Object.defineProperty, oi = (r, t, e, i) => {
|
1097
|
+
for (var s = void 0, n = r.length - 1, o; n >= 0; n--)
|
1098
|
+
(o = r[n]) && (s = o(t, e, s) || s);
|
1099
|
+
return s && ni(t, e, s), s;
|
1100
1100
|
};
|
1101
|
-
const Tt = class Tt extends
|
1101
|
+
const Tt = class Tt extends A {
|
1102
1102
|
constructor() {
|
1103
1103
|
super(...arguments), this.anchor = "BottomRight";
|
1104
1104
|
}
|
@@ -1111,7 +1111,7 @@ const Tt = class Tt extends x {
|
|
1111
1111
|
}
|
1112
1112
|
};
|
1113
1113
|
Tt.styles = [
|
1114
|
-
|
1114
|
+
U`
|
1115
1115
|
:host {
|
1116
1116
|
position: fixed;
|
1117
1117
|
display: flex;
|
@@ -1130,7 +1130,7 @@ Tt.styles = [
|
|
1130
1130
|
`
|
1131
1131
|
];
|
1132
1132
|
let W = Tt;
|
1133
|
-
|
1133
|
+
oi([
|
1134
1134
|
m({ attribute: !0 })
|
1135
1135
|
], W.prototype, "anchor");
|
1136
1136
|
/**
|
@@ -1191,7 +1191,7 @@ function ci(r) {
|
|
1191
1191
|
}
|
1192
1192
|
function hi(r, t = !1, e = 0) {
|
1193
1193
|
const i = this._$AH, s = this._$AN;
|
1194
|
-
if (s !== void 0 && s.size !== 0) if (t) if (Array.isArray(i)) for (let
|
1194
|
+
if (s !== void 0 && s.size !== 0) if (t) if (Array.isArray(i)) for (let n = e; n < i.length; n++) D(i[n], !1), et(i[n]);
|
1195
1195
|
else i != null && (D(i, !1), et(i));
|
1196
1196
|
else D(this, r);
|
1197
1197
|
}
|
@@ -1274,7 +1274,7 @@ class gi extends $e {
|
|
1274
1274
|
update(t, [e]) {
|
1275
1275
|
var s;
|
1276
1276
|
const i = this.u === void 0;
|
1277
|
-
return i && (this.u = (s = t.options) == null ? void 0 : s.host, this.u.addController(this), this.u.updateComplete.then((
|
1277
|
+
return i && (this.u = (s = t.options) == null ? void 0 : s.host, this.u.addController(this), this.u.updateComplete.then((n) => this.t = !0), this.element = t.element, re.set(this.element, this)), this.optionsOrCallback = e, (i || typeof e != "function") && this.p(e), this.render(e);
|
1278
1278
|
}
|
1279
1279
|
p(t) {
|
1280
1280
|
t = t ?? {};
|
@@ -1284,15 +1284,15 @@ class gi extends $e {
|
|
1284
1284
|
m() {
|
1285
1285
|
const t = {}, e = this.element.getBoundingClientRect(), i = getComputedStyle(this.element);
|
1286
1286
|
return this.options.properties.forEach((s) => {
|
1287
|
-
const
|
1288
|
-
t[s] = isNaN(
|
1287
|
+
const n = e[s] ?? (pt[s] ? void 0 : i[s]), o = Number(n);
|
1288
|
+
t[s] = isNaN(o) ? n + "" : o;
|
1289
1289
|
}), t;
|
1290
1290
|
}
|
1291
1291
|
v() {
|
1292
1292
|
let t, e = !0;
|
1293
1293
|
return this.options.guard && (t = this.options.guard(), e = ((i, s) => {
|
1294
1294
|
if (Array.isArray(i)) {
|
1295
|
-
if (Array.isArray(s) && s.length === i.length && i.every((
|
1295
|
+
if (Array.isArray(s) && s.length === i.length && i.every((n, o) => n === s[o])) return !1;
|
1296
1296
|
} else if (s === i) return !1;
|
1297
1297
|
return !0;
|
1298
1298
|
})(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;
|
@@ -1306,14 +1306,14 @@ class gi extends $e {
|
|
1306
1306
|
this.prepare(), await ee;
|
1307
1307
|
const e = this.O(), i = this.j(this.options.keyframeOptions, e), s = this.m();
|
1308
1308
|
if (this.A !== void 0) {
|
1309
|
-
const { from:
|
1310
|
-
this.log("measured", [this.A, s,
|
1309
|
+
const { from: n, to: o } = this.N(this.A, s, e);
|
1310
|
+
this.log("measured", [this.A, s, n, o]), t = this.calculateKeyframes(n, o);
|
1311
1311
|
} else {
|
1312
|
-
const
|
1313
|
-
if (
|
1312
|
+
const n = ut.get(this.options.inId);
|
1313
|
+
if (n) {
|
1314
1314
|
ut.delete(this.options.inId);
|
1315
|
-
const { from:
|
1316
|
-
t = this.calculateKeyframes(
|
1315
|
+
const { from: o, to: a } = this.N(n, s, e);
|
1316
|
+
t = this.calculateKeyframes(o, a), t = this.options.in ? [{ ...this.options.in[0], ...t[0] }, ...this.options.in.slice(1), t[1]] : t, Qt++, t.forEach((c) => c.zIndex = Qt);
|
1317
1317
|
} else this.options.in && (t = [...this.options.in, {}]);
|
1318
1318
|
}
|
1319
1319
|
this.animate(t, i);
|
@@ -1335,8 +1335,8 @@ class gi extends $e {
|
|
1335
1335
|
if (this.i.insertBefore(this.element, i), this.options.stabilizeOut) {
|
1336
1336
|
const s = this.m();
|
1337
1337
|
this.log("stabilizing out");
|
1338
|
-
const
|
1339
|
-
getComputedStyle(this.element).position !== "static" ||
|
1338
|
+
const n = this.A.left - s.left, o = this.A.top - s.top;
|
1339
|
+
getComputedStyle(this.element).position !== "static" || n === 0 && o === 0 || (this.element.style.position = "relative"), n !== 0 && (this.element.style.left = n + "px"), o !== 0 && (this.element.style.top = o + "px");
|
1340
1340
|
}
|
1341
1341
|
}
|
1342
1342
|
const t = this.j(this.options.keyframeOptions);
|
@@ -1374,14 +1374,14 @@ class gi extends $e {
|
|
1374
1374
|
N(t, e, i) {
|
1375
1375
|
t = { ...t }, e = { ...e };
|
1376
1376
|
const s = i.map((a) => a.animatingProperties).filter((a) => a !== void 0);
|
1377
|
-
let
|
1377
|
+
let n = 1, o = 1;
|
1378
1378
|
return s.length > 0 && (s.forEach((a) => {
|
1379
|
-
a.width && (
|
1380
|
-
}), t.left !== void 0 && e.left !== void 0 && (t.left =
|
1379
|
+
a.width && (n /= a.width), a.height && (o /= a.height);
|
1380
|
+
}), t.left !== void 0 && e.left !== void 0 && (t.left = n * t.left, e.left = n * e.left), t.top !== void 0 && e.top !== void 0 && (t.top = o * t.top, e.top = o * e.top)), { from: t, to: e };
|
1381
1381
|
}
|
1382
1382
|
calculateKeyframes(t, e, i = !1) {
|
1383
|
-
const s = {},
|
1384
|
-
let
|
1383
|
+
const s = {}, n = {};
|
1384
|
+
let o = !1;
|
1385
1385
|
const a = {};
|
1386
1386
|
for (const c in e) {
|
1387
1387
|
const l = t[c], h = e[c];
|
@@ -1389,10 +1389,10 @@ class gi extends $e {
|
|
1389
1389
|
const d = pt[c];
|
1390
1390
|
if (l === void 0 || h === void 0) continue;
|
1391
1391
|
const u = d(l, h);
|
1392
|
-
u.transform !== void 0 && (a[c] = u.value,
|
1393
|
-
} else l !== h && l !== void 0 && h !== void 0 && (
|
1392
|
+
u.transform !== void 0 && (a[c] = u.value, o = !0, s.transform = `${s.transform ?? ""} ${u.transform}`, u.overrideFrom !== void 0 && Object.assign(s, u.overrideFrom));
|
1393
|
+
} else l !== h && l !== void 0 && h !== void 0 && (o = !0, s[c] = l, n[c] = h);
|
1394
1394
|
}
|
1395
|
-
return s.transformOrigin =
|
1395
|
+
return s.transformOrigin = n.transformOrigin = i ? "center center" : "top left", this.animatingProperties = a, o ? [s, n] : void 0;
|
1396
1396
|
}
|
1397
1397
|
async animate(t, e = this.options.keyframeOptions) {
|
1398
1398
|
this.start(), this.frames = t;
|
@@ -1423,7 +1423,7 @@ const mi = It(gi), vi = { name: "question", svg: '<svg viewBox="0 0 64 64" xmlns
|
|
1423
1423
|
* Copyright 2018 Google LLC
|
1424
1424
|
* SPDX-License-Identifier: BSD-3-Clause
|
1425
1425
|
*/
|
1426
|
-
const
|
1426
|
+
const ne = It(class extends be {
|
1427
1427
|
constructor(r) {
|
1428
1428
|
var t;
|
1429
1429
|
if (super(r), r.type !== Ot.ATTRIBUTE || r.name !== "class" || ((t = r.strings) == null ? void 0 : t.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
@@ -1434,22 +1434,22 @@ const oe = It(class extends be {
|
|
1434
1434
|
update(r, [t]) {
|
1435
1435
|
var i, s;
|
1436
1436
|
if (this.st === void 0) {
|
1437
|
-
this.st = /* @__PURE__ */ new Set(), r.strings !== void 0 && (this.nt = new Set(r.strings.join(" ").split(/\s/).filter((
|
1438
|
-
for (const
|
1437
|
+
this.st = /* @__PURE__ */ new Set(), r.strings !== void 0 && (this.nt = new Set(r.strings.join(" ").split(/\s/).filter((n) => n !== "")));
|
1438
|
+
for (const n in t) t[n] && !((i = this.nt) != null && i.has(n)) && this.st.add(n);
|
1439
1439
|
return this.render(t);
|
1440
1440
|
}
|
1441
1441
|
const e = r.element.classList;
|
1442
|
-
for (const
|
1443
|
-
for (const
|
1444
|
-
const
|
1445
|
-
|
1442
|
+
for (const n of this.st) n in t || (e.remove(n), this.st.delete(n));
|
1443
|
+
for (const n in t) {
|
1444
|
+
const o = !!t[n];
|
1445
|
+
o === this.st.has(n) || (s = this.nt) != null && s.has(n) || (o ? (e.add(n), this.st.add(n)) : (e.remove(n), this.st.delete(n)));
|
1446
1446
|
}
|
1447
1447
|
return k;
|
1448
1448
|
}
|
1449
1449
|
}), w = (r, t, e) => {
|
1450
1450
|
r && e.style.setProperty(t, r);
|
1451
1451
|
}, _e = (r, t) => {
|
1452
|
-
var e, i, s,
|
1452
|
+
var e, i, s, n, o, a, c, l, h;
|
1453
1453
|
w((e = r.colors) == null ? void 0 : e.primaryBackground, "--primary-background", t), w(
|
1454
1454
|
(i = r.colors) == null ? void 0 : i.textOnPrimaryBackground,
|
1455
1455
|
"--text-on-primary-background",
|
@@ -1459,11 +1459,11 @@ const oe = It(class extends be {
|
|
1459
1459
|
"--secondary-background",
|
1460
1460
|
t
|
1461
1461
|
), w(
|
1462
|
-
(
|
1462
|
+
(n = r.colors) == null ? void 0 : n.textOnSecondaryBackground,
|
1463
1463
|
"--text-on-secondary-background",
|
1464
1464
|
t
|
1465
1465
|
), w(
|
1466
|
-
(
|
1466
|
+
(o = r.colors) == null ? void 0 : o.interactiveDestructiveBackground,
|
1467
1467
|
"--destructive-color",
|
1468
1468
|
t
|
1469
1469
|
), w(
|
@@ -1485,10 +1485,10 @@ const oe = It(class extends be {
|
|
1485
1485
|
* Copyright 2020 Google LLC
|
1486
1486
|
* SPDX-License-Identifier: BSD-3-Clause
|
1487
1487
|
*/
|
1488
|
-
const
|
1488
|
+
const Ae = () => new yi();
|
1489
1489
|
class yi {
|
1490
1490
|
}
|
1491
|
-
const ft = /* @__PURE__ */ new WeakMap(),
|
1491
|
+
const ft = /* @__PURE__ */ new WeakMap(), xe = It(class extends $e {
|
1492
1492
|
render(r) {
|
1493
1493
|
return p;
|
1494
1494
|
}
|
@@ -1516,13 +1516,13 @@ const ft = /* @__PURE__ */ new WeakMap(), Ae = It(class extends $e {
|
|
1516
1516
|
}
|
1517
1517
|
});
|
1518
1518
|
var bi = Object.defineProperty, Y = (r, t, e, i) => {
|
1519
|
-
for (var s = void 0,
|
1520
|
-
(
|
1519
|
+
for (var s = void 0, n = r.length - 1, o; n >= 0; n--)
|
1520
|
+
(o = r[n]) && (s = o(t, e, s) || s);
|
1521
1521
|
return s && bi(t, e, s), s;
|
1522
1522
|
};
|
1523
|
-
const Rt = class Rt extends
|
1523
|
+
const Rt = class Rt extends A {
|
1524
1524
|
constructor() {
|
1525
|
-
super(...arguments), this.active = !1, this.triggerVisible = !0, this.loaded = !1, this.containerRef =
|
1525
|
+
super(...arguments), this.active = !1, this.triggerVisible = !0, this.loaded = !1, this.containerRef = Ae(), this.widgetActive$ = new xt(!1), this.componentIsDestroyed$ = new At();
|
1526
1526
|
}
|
1527
1527
|
async connectedCallback() {
|
1528
1528
|
super.connectedCallback(), this.icon = await this._renderSymbol(), this.loaded = !0, this._applyBranding();
|
@@ -1567,8 +1567,8 @@ const Rt = class Rt extends x {
|
|
1567
1567
|
const i = (l = this.application) == null ? void 0 : l.triggerIcon;
|
1568
1568
|
if (!i)
|
1569
1569
|
return p;
|
1570
|
-
const s = async (h) => vi, { type:
|
1571
|
-
switch (
|
1570
|
+
const s = async (h) => vi, { type: n, content: o } = i;
|
1571
|
+
switch (n) {
|
1572
1572
|
case "Telia": {
|
1573
1573
|
const h = await s();
|
1574
1574
|
return h ? R`<telia-icon
|
@@ -1595,17 +1595,18 @@ const Rt = class Rt extends x {
|
|
1595
1595
|
this.triggerVisible = !0;
|
1596
1596
|
}
|
1597
1597
|
render() {
|
1598
|
-
var t, e, i, s;
|
1598
|
+
var t, e, i, s, n, o, a;
|
1599
1599
|
return R`<div
|
1600
|
-
class=${
|
1600
|
+
class=${ne({
|
1601
1601
|
"trigger-container": !0,
|
1602
1602
|
hidden: !this.triggerVisible
|
1603
1603
|
})}
|
1604
|
-
${
|
1604
|
+
${xe(this.containerRef)}
|
1605
1605
|
>
|
1606
1606
|
${!this.active && ((s = (i = (e = (t = this.application) == null ? void 0 : t.settings) == null ? void 0 : e.branding) == null ? void 0 : i.other) != null && s.showButtonLabel) ? R`
|
1607
1607
|
<button
|
1608
|
-
|
1608
|
+
type="button"
|
1609
|
+
aria-label="${this.application.settings.branding.other.buttonLabelText ?? "Widget trigger"}"
|
1609
1610
|
class="trigger-label"
|
1610
1611
|
@click=${this.toggleActive}
|
1611
1612
|
${mi({
|
@@ -1615,13 +1616,14 @@ const Rt = class Rt extends x {
|
|
1615
1616
|
skipInitial: !1
|
1616
1617
|
})}
|
1617
1618
|
>
|
1618
|
-
${this.application.settings.branding.other.buttonLabelText}
|
1619
|
+
${this.application.settings.branding.other.buttonLabelText ?? "Widget trigger"}
|
1619
1620
|
</button>
|
1620
1621
|
` : p}
|
1621
1622
|
|
1622
1623
|
<button
|
1623
|
-
|
1624
|
-
|
1624
|
+
type="button"
|
1625
|
+
aria-label="${((a = (o = (n = this.application) == null ? void 0 : n.settings) == null ? void 0 : o.branding.other) == null ? void 0 : a.buttonLabelText) ?? "Widget trigger"}"
|
1626
|
+
class=${ne({
|
1625
1627
|
trigger: !0,
|
1626
1628
|
active: this.active,
|
1627
1629
|
rendered: this.loaded
|
@@ -1661,7 +1663,7 @@ const Rt = class Rt extends x {
|
|
1661
1663
|
}
|
1662
1664
|
};
|
1663
1665
|
Rt.styles = [
|
1664
|
-
|
1666
|
+
U`
|
1665
1667
|
:host {
|
1666
1668
|
--voca-rem-multiplier: 0.625;
|
1667
1669
|
--trigger-label-bg: #f5e0ff;
|
@@ -1808,9 +1810,9 @@ Y([
|
|
1808
1810
|
Y([
|
1809
1811
|
j()
|
1810
1812
|
], b.prototype, "icon");
|
1811
|
-
var wi = Object.defineProperty,
|
1812
|
-
for (var s = void 0,
|
1813
|
-
(
|
1813
|
+
var wi = Object.defineProperty, S = (r, t, e, i) => {
|
1814
|
+
for (var s = void 0, n = r.length - 1, o; n >= 0; n--)
|
1815
|
+
(o = r[n]) && (s = o(t, e, s) || s);
|
1814
1816
|
return s && wi(t, e, s), s;
|
1815
1817
|
};
|
1816
1818
|
const $i = (r) => {
|
@@ -1839,7 +1841,7 @@ const $i = (r) => {
|
|
1839
1841
|
};
|
1840
1842
|
e.styles = [
|
1841
1843
|
// (superClass as unknown as typeof LitElement).styles ?? [],
|
1842
|
-
|
1844
|
+
U`
|
1843
1845
|
:host {
|
1844
1846
|
font-family: var(--font-family);
|
1845
1847
|
grid-column: span var(--width);
|
@@ -1854,28 +1856,28 @@ const $i = (r) => {
|
|
1854
1856
|
`
|
1855
1857
|
];
|
1856
1858
|
let t = e;
|
1857
|
-
return
|
1859
|
+
return S([
|
1858
1860
|
m()
|
1859
|
-
], t.prototype, "properties"),
|
1861
|
+
], t.prototype, "properties"), S([
|
1860
1862
|
m()
|
1861
|
-
], t.prototype, "context"),
|
1863
|
+
], t.prototype, "context"), S([
|
1862
1864
|
m()
|
1863
|
-
], t.prototype, "layout"),
|
1865
|
+
], t.prototype, "layout"), S([
|
1864
1866
|
m()
|
1865
|
-
], t.prototype, "name"),
|
1867
|
+
], t.prototype, "name"), S([
|
1866
1868
|
m()
|
1867
|
-
], t.prototype, "type"),
|
1869
|
+
], t.prototype, "type"), S([
|
1868
1870
|
m({ attribute: !1 })
|
1869
|
-
], t.prototype, "application"),
|
1871
|
+
], t.prototype, "application"), S([
|
1870
1872
|
m({ attribute: !1 })
|
1871
1873
|
], t.prototype, "parent"), t;
|
1872
|
-
}, Mt = class Mt extends $i(
|
1874
|
+
}, Mt = class Mt extends $i(A) {
|
1873
1875
|
render() {
|
1874
1876
|
return R`Non resolved component`;
|
1875
1877
|
}
|
1876
1878
|
};
|
1877
1879
|
Mt.styles = [
|
1878
|
-
|
1880
|
+
U`
|
1879
1881
|
:host {
|
1880
1882
|
display: block;
|
1881
1883
|
}
|
@@ -1893,7 +1895,7 @@ function* _i(r, t) {
|
|
1893
1895
|
for (const i of r) yield t(i, e++);
|
1894
1896
|
}
|
1895
1897
|
}
|
1896
|
-
var $ = /* @__PURE__ */ ((r) => (r.Inline = "inline", r.Trigger = "trigger", r))($ || {});
|
1898
|
+
var $ = /* @__PURE__ */ ((r) => (r.Inline = "inline", r.Trigger = "trigger", r))($ || {}), Ai = /* @__PURE__ */ ((r) => (r.NonAuthenticated = "non-authenticated", r.Authenticating = "authenticating", r.Authenticated = "authenticated", r.ChatEnded = "chat-ended", r))(Ai || {});
|
1897
1899
|
/**
|
1898
1900
|
* @license
|
1899
1901
|
* Copyright 2021 Google LLC
|
@@ -1914,7 +1916,7 @@ let xi = class extends Event {
|
|
1914
1916
|
* Copyright 2021 Google LLC
|
1915
1917
|
* SPDX-License-Identifier: BSD-3-Clause
|
1916
1918
|
*/
|
1917
|
-
class
|
1919
|
+
class Ci {
|
1918
1920
|
get value() {
|
1919
1921
|
return this.o;
|
1920
1922
|
}
|
@@ -1947,30 +1949,30 @@ class Ai {
|
|
1947
1949
|
* Copyright 2021 Google LLC
|
1948
1950
|
* SPDX-License-Identifier: BSD-3-Clause
|
1949
1951
|
*/
|
1950
|
-
let
|
1952
|
+
let Ei = class extends Event {
|
1951
1953
|
constructor(t, e) {
|
1952
1954
|
super("context-provider", { bubbles: !0, composed: !0 }), this.context = t, this.contextTarget = e;
|
1953
1955
|
}
|
1954
1956
|
};
|
1955
|
-
class
|
1957
|
+
class oe extends Ci {
|
1956
1958
|
constructor(t, e, i) {
|
1957
|
-
var s,
|
1958
|
-
super(e.context !== void 0 ? e.initialValue : i), this.onContextRequest = (
|
1959
|
-
if (
|
1960
|
-
const a =
|
1961
|
-
a !== this.host && (
|
1962
|
-
}, this.onProviderRequest = (
|
1963
|
-
if (
|
1959
|
+
var s, n;
|
1960
|
+
super(e.context !== void 0 ? e.initialValue : i), this.onContextRequest = (o) => {
|
1961
|
+
if (o.context !== this.context) return;
|
1962
|
+
const a = o.contextTarget ?? o.composedPath()[0];
|
1963
|
+
a !== this.host && (o.stopPropagation(), this.addCallback(o.callback, a, o.subscribe));
|
1964
|
+
}, this.onProviderRequest = (o) => {
|
1965
|
+
if (o.context !== this.context || (o.contextTarget ?? o.composedPath()[0]) === this.host) return;
|
1964
1966
|
const a = /* @__PURE__ */ new Set();
|
1965
1967
|
for (const [c, { consumerHost: l }] of this.subscriptions) a.has(c) || (a.add(c), l.dispatchEvent(new xi(this.context, l, c, !0)));
|
1966
|
-
|
1967
|
-
}, this.host = t, e.context !== void 0 ? this.context = e.context : this.context = e, this.attachListeners(), (
|
1968
|
+
o.stopPropagation();
|
1969
|
+
}, this.host = t, e.context !== void 0 ? this.context = e.context : this.context = e, this.attachListeners(), (n = (s = this.host).addController) == null || n.call(s, this);
|
1968
1970
|
}
|
1969
1971
|
attachListeners() {
|
1970
1972
|
this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest);
|
1971
1973
|
}
|
1972
1974
|
hostConnected() {
|
1973
|
-
this.host.dispatchEvent(new
|
1975
|
+
this.host.dispatchEvent(new Ei(this.context, this.host));
|
1974
1976
|
}
|
1975
1977
|
}
|
1976
1978
|
/**
|
@@ -1986,39 +1988,39 @@ function Si({ context: r }) {
|
|
1986
1988
|
}, set(s) {
|
1987
1989
|
return i.get(this).setValue(s), t.set.call(this, s);
|
1988
1990
|
}, init(s) {
|
1989
|
-
return i.set(this, new
|
1991
|
+
return i.set(this, new oe(this, { context: r, initialValue: s })), s;
|
1990
1992
|
} };
|
1991
1993
|
{
|
1992
|
-
t.constructor.addInitializer((
|
1993
|
-
i.set(
|
1994
|
+
t.constructor.addInitializer((o) => {
|
1995
|
+
i.set(o, new oe(o, { context: r }));
|
1994
1996
|
});
|
1995
1997
|
const s = Object.getOwnPropertyDescriptor(t, e);
|
1996
|
-
let
|
1998
|
+
let n;
|
1997
1999
|
if (s === void 0) {
|
1998
|
-
const
|
1999
|
-
|
2000
|
-
return
|
2000
|
+
const o = /* @__PURE__ */ new WeakMap();
|
2001
|
+
n = { get() {
|
2002
|
+
return o.get(this);
|
2001
2003
|
}, set(a) {
|
2002
|
-
i.get(this).setValue(a),
|
2004
|
+
i.get(this).setValue(a), o.set(this, a);
|
2003
2005
|
}, configurable: !0, enumerable: !0 };
|
2004
2006
|
} else {
|
2005
|
-
const
|
2006
|
-
|
2007
|
-
i.get(this).setValue(a),
|
2007
|
+
const o = s.set;
|
2008
|
+
n = { ...s, set(a) {
|
2009
|
+
i.get(this).setValue(a), o == null || o.call(this, a);
|
2008
2010
|
} };
|
2009
2011
|
}
|
2010
|
-
return void Object.defineProperty(t, e,
|
2012
|
+
return void Object.defineProperty(t, e, n);
|
2011
2013
|
}
|
2012
2014
|
};
|
2013
2015
|
}
|
2014
|
-
var
|
2015
|
-
for (var s = void 0,
|
2016
|
-
(
|
2017
|
-
return s &&
|
2016
|
+
var Pi = Object.defineProperty, Ce = (r, t, e, i) => {
|
2017
|
+
for (var s = void 0, n = r.length - 1, o; n >= 0; n--)
|
2018
|
+
(o = r[n]) && (s = o(t, e, s) || s);
|
2019
|
+
return s && Pi(t, e, s), s;
|
2018
2020
|
};
|
2019
|
-
const
|
2021
|
+
const Oi = "application", Nt = class Nt extends A {
|
2020
2022
|
constructor() {
|
2021
|
-
super(...arguments), this.nodes = [], this.wrapperRef =
|
2023
|
+
super(...arguments), this.nodes = [], this.wrapperRef = Ae(), this.fullscreen = !1, this.isReady = new xt(!1);
|
2022
2024
|
}
|
2023
2025
|
addChild(t) {
|
2024
2026
|
t.parent = this, this.nodes.push(t);
|
@@ -2043,12 +2045,12 @@ const Pi = "application", Nt = class Nt extends x {
|
|
2043
2045
|
render() {
|
2044
2046
|
var i, s;
|
2045
2047
|
const t = this.application.settings.components.conversation;
|
2046
|
-
return ((s = (i = t == null ? void 0 : t.properties) == null ? void 0 : i.chat) == null ? void 0 : s.isThirdPartyWidget) ? this.renderRoot.host.classList.add("third-party") : this.application.renderStrategy === $.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")), this.application.fullscreen && this.renderRoot.host.classList.add("fullscreen"), window.self !== window.top && this.renderRoot.host.classList.add("embedded"), R`<div class="widget-container" ${
|
2047
|
-
${_i(this.nodes, (
|
2048
|
+
return ((s = (i = t == null ? void 0 : t.properties) == null ? void 0 : i.chat) == null ? void 0 : s.isThirdPartyWidget) ? this.renderRoot.host.classList.add("third-party") : this.application.renderStrategy === $.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")), this.application.fullscreen && this.renderRoot.host.classList.add("fullscreen"), window.self !== window.top && this.renderRoot.host.classList.add("embedded"), R`<div class="widget-container" ${xe(this.wrapperRef)}>
|
2049
|
+
${_i(this.nodes, (n) => n)}
|
2048
2050
|
</div>`;
|
2049
2051
|
}
|
2050
2052
|
};
|
2051
|
-
Nt.styles =
|
2053
|
+
Nt.styles = U`
|
2052
2054
|
:host {
|
2053
2055
|
--font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
|
2054
2056
|
--spacing-xs: 0.2rem;
|
@@ -2220,9 +2222,9 @@ Ce([
|
|
2220
2222
|
], N.prototype, "fullscreen");
|
2221
2223
|
Ce([
|
2222
2224
|
m({ attribute: !1 }),
|
2223
|
-
Si({ context:
|
2225
|
+
Si({ context: Oi })
|
2224
2226
|
], N.prototype, "application");
|
2225
|
-
class
|
2227
|
+
class Ii {
|
2226
2228
|
constructor() {
|
2227
2229
|
this.root = this.createRoot();
|
2228
2230
|
}
|
@@ -2258,8 +2260,8 @@ class Oi {
|
|
2258
2260
|
// views
|
2259
2261
|
));
|
2260
2262
|
});
|
2261
|
-
}, { entry:
|
2262
|
-
return s(this, this.root, [
|
2263
|
+
}, { entry: n, components: o } = t;
|
2264
|
+
return s(this, this.root, [n], o), this.root;
|
2263
2265
|
}
|
2264
2266
|
createRoot() {
|
2265
2267
|
return typeof window < "u" && (window.customElements.get("ace-wrapper") || window.customElements.define("ace-wrapper", N)), document.createElement("ace-wrapper");
|
@@ -2306,7 +2308,7 @@ const st = class st {
|
|
2306
2308
|
st.ResolveWebComponentName = (t) => `ace-${t}`;
|
2307
2309
|
let _t = st;
|
2308
2310
|
var y = /* @__PURE__ */ ((r) => (r.Necessary = "necessary", r.Functional = "functional", r.Analytics = "analytics", r))(y || {});
|
2309
|
-
class
|
2311
|
+
class ki {
|
2310
2312
|
constructor(t, e, i, s) {
|
2311
2313
|
this.disallowedKeys = [], this.widgetId = t, this.storage = e === "localStorage" ? window.localStorage : window.sessionStorage, this.policy = i, this.storageEntries = s;
|
2312
2314
|
}
|
@@ -2320,8 +2322,8 @@ class Ii {
|
|
2320
2322
|
}
|
2321
2323
|
const s = i.category;
|
2322
2324
|
if (this.policy[s]) {
|
2323
|
-
const
|
2324
|
-
this.storage.setItem(this._prefixKey(t), JSON.stringify(
|
2325
|
+
const n = { value: e, category: s };
|
2326
|
+
this.storage.setItem(this._prefixKey(t), JSON.stringify(n));
|
2325
2327
|
} else
|
2326
2328
|
console.warn(
|
2327
2329
|
`Storage policy does not allow storing items in category: ${s}`
|
@@ -2363,7 +2365,7 @@ class Ii {
|
|
2363
2365
|
return `ace_${this.widgetId.substring(0, 7)}-${t}`;
|
2364
2366
|
}
|
2365
2367
|
}
|
2366
|
-
class
|
2368
|
+
class Ti {
|
2367
2369
|
constructor() {
|
2368
2370
|
this.texts = /* @__PURE__ */ new Map();
|
2369
2371
|
}
|
@@ -2378,8 +2380,8 @@ class ki {
|
|
2378
2380
|
return this.texts.get(t) || e;
|
2379
2381
|
}
|
2380
2382
|
}
|
2381
|
-
const
|
2382
|
-
class
|
2383
|
+
const Ri = "1.1.120-rc.30";
|
2384
|
+
class Mi {
|
2383
2385
|
constructor(t) {
|
2384
2386
|
this.widget = t, this.name = t.name;
|
2385
2387
|
}
|
@@ -2397,13 +2399,13 @@ class Ri {
|
|
2397
2399
|
}
|
2398
2400
|
version() {
|
2399
2401
|
return {
|
2400
|
-
version:
|
2402
|
+
version: Ri
|
2401
2403
|
};
|
2402
2404
|
}
|
2403
2405
|
}
|
2404
|
-
class
|
2405
|
-
constructor(t, e, i, s,
|
2406
|
-
this.id = t, this.name = e, this.container = i, this.settings = s, this.options =
|
2406
|
+
class Ni {
|
2407
|
+
constructor(t, e, i, s, n) {
|
2408
|
+
this.id = t, this.name = e, this.container = i, this.settings = s, this.options = n, this.platform = new Ii(), this.texts = new Ti(), this.renderStrategy = $.Inline, this.fullscreen = !1, this.anchor = "BottomRight", this.autoActivate = !1, this.plugins = [], this.componentResolver = new _t(), this.components = [], this.trigger = null, this.api = new Mi(this), this.onMessageReceived = async (a) => {
|
2407
2409
|
var l;
|
2408
2410
|
const c = a.data;
|
2409
2411
|
switch (c.type) {
|
@@ -2452,17 +2454,17 @@ class Mi {
|
|
2452
2454
|
return;
|
2453
2455
|
}
|
2454
2456
|
}, this.renderStrategy = this.options.renderStrategy || $.Inline, this.triggerIcon = this.options.triggerIcon;
|
2455
|
-
const
|
2457
|
+
const o = {
|
2456
2458
|
[y.Necessary]: !0,
|
2457
2459
|
[y.Functional]: !0,
|
2458
2460
|
[y.Analytics]: !0
|
2459
2461
|
};
|
2460
|
-
this.storage = new
|
2462
|
+
this.storage = new ki(
|
2461
2463
|
this.id,
|
2462
2464
|
"sessionStorage",
|
2463
|
-
|
2465
|
+
o,
|
2464
2466
|
this.settings.storage
|
2465
|
-
), typeof
|
2467
|
+
), typeof n.autoActivate == "boolean" && (this.autoActivate = n.autoActivate), n.anchor && (this.anchor = n.anchor), this.container.register("$settings", s), this.texts.loadTexts(s.texts || {}), window.addEventListener("message", this.onMessageReceived);
|
2466
2468
|
}
|
2467
2469
|
async activate() {
|
2468
2470
|
if (await this.loadPlugins(), await this.componentResolver.loadComponents(), this.root = this.platform.createComponentModel(this.settings, this), this.container.setState(ue.Ready), this.autoActivate) {
|
@@ -2498,10 +2500,10 @@ class Mi {
|
|
2498
2500
|
return this.plugins.push(t), this;
|
2499
2501
|
}
|
2500
2502
|
appendToDOM(t = {}) {
|
2501
|
-
this.root && (this.root.classList.add("expanded"), this.root.classList.remove("hidden"), document.body.appendChild(this.root)), t.ignoreStorage || this.storage.set("open", !0);
|
2503
|
+
this.root && (this.root.classList.add("expanded"), this.root.classList.remove("hidden"), this.root.removeAttribute("inert"), document.body.appendChild(this.root)), t.ignoreStorage || this.storage.set("open", !0);
|
2502
2504
|
}
|
2503
2505
|
hide() {
|
2504
|
-
this.root && (this.root.classList.add("hidden"), this.root.classList.remove("expanded")), this.storage.set("open", !1);
|
2506
|
+
this.root && (this.root.contains(document.activeElement) && (this.trigger && typeof this.trigger.focus == "function" ? this.trigger.focus() : (document.activeElement instanceof HTMLElement && typeof document.activeElement.blur == "function" && document.activeElement.blur(), document.body.focus())), this.root.classList.add("hidden"), this.root.classList.remove("expanded"), this.root.setAttribute("inert", "")), this.storage.set("open", !1);
|
2505
2507
|
}
|
2506
2508
|
setZIndex(t) {
|
2507
2509
|
this.root && (this.root.style.zIndex = t.toString());
|
@@ -2551,7 +2553,7 @@ class Mi {
|
|
2551
2553
|
return this.root;
|
2552
2554
|
}
|
2553
2555
|
}
|
2554
|
-
const
|
2556
|
+
const qi = (r) => new q(r), rt = class rt {
|
2555
2557
|
// TODO:
|
2556
2558
|
// private static endpoint = 'http://localhost:5299/api'; // TODO:
|
2557
2559
|
constructor(t = rt.endpoint) {
|
@@ -2563,13 +2565,13 @@ const Wi = (r) => new q(r), rt = class rt {
|
|
2563
2565
|
id: i.id,
|
2564
2566
|
triggers: i.triggers || [],
|
2565
2567
|
apps: (i.widgets || []).map((s) => {
|
2566
|
-
let
|
2567
|
-
s.renderStrategy.toLowerCase() === "inline" && (
|
2568
|
-
const
|
2568
|
+
let n = $.Trigger;
|
2569
|
+
s.renderStrategy.toLowerCase() === "inline" && (n = $.Inline);
|
2570
|
+
const o = s.widgetId ? s.widgetId : s.id, a = typeof s.autoActivate == "boolean" ? s.autoActivate : !1, c = typeof s.anchor == "string" ? s.anchor : "BottomRight", l = typeof s.triggerIcon == "string" ? s.triggerIcon : "question";
|
2569
2571
|
return {
|
2570
|
-
id:
|
2571
|
-
widgetId:
|
2572
|
-
renderStrategy:
|
2572
|
+
id: o,
|
2573
|
+
widgetId: o,
|
2574
|
+
renderStrategy: n,
|
2573
2575
|
autoActivate: a,
|
2574
2576
|
anchor: c,
|
2575
2577
|
triggerIcon: {
|
@@ -2590,7 +2592,7 @@ const Wi = (r) => new q(r), rt = class rt {
|
|
2590
2592
|
};
|
2591
2593
|
rt.endpoint = "https://widgets.ace.teliacompany.net/api";
|
2592
2594
|
let q = rt;
|
2593
|
-
class
|
2595
|
+
class Li {
|
2594
2596
|
constructor(t) {
|
2595
2597
|
this.site = t;
|
2596
2598
|
}
|
@@ -2598,12 +2600,12 @@ class Ni {
|
|
2598
2600
|
var i;
|
2599
2601
|
(((i = this.site.environment) == null ? void 0 : i.applications) || []).forEach((s) => {
|
2600
2602
|
if (s.storage) {
|
2601
|
-
const
|
2603
|
+
const n = {
|
2602
2604
|
[y.Analytics]: t.includes("analytics"),
|
2603
2605
|
[y.Necessary]: t.includes("necessary"),
|
2604
2606
|
[y.Functional]: t.includes("functional")
|
2605
2607
|
};
|
2606
|
-
s.storage.updatePolicy(
|
2608
|
+
s.storage.updatePolicy(n);
|
2607
2609
|
}
|
2608
2610
|
});
|
2609
2611
|
}
|
@@ -2636,13 +2638,13 @@ class Ui {
|
|
2636
2638
|
(i) => i.autoActivate
|
2637
2639
|
);
|
2638
2640
|
(((e = this.site) == null ? void 0 : e.triggers) || []).filter((i) => i.triggerType === "visit").forEach((i) => {
|
2639
|
-
const s = window.location.pathname,
|
2640
|
-
i.condition.type === "url" &&
|
2641
|
-
const a =
|
2642
|
-
if ((
|
2641
|
+
const s = window.location.pathname, n = i.condition.outputs || [];
|
2642
|
+
i.condition.type === "url" && n.forEach((o) => {
|
2643
|
+
const a = o.action.type === "render_widget";
|
2644
|
+
if ((o.value === s || o.value === "*") && a) {
|
2643
2645
|
let l = { widgetId: "" };
|
2644
2646
|
try {
|
2645
|
-
l = JSON.parse(
|
2647
|
+
l = JSON.parse(o.action.data);
|
2646
2648
|
} catch {
|
2647
2649
|
l = {
|
2648
2650
|
widgetId: ""
|
@@ -2682,16 +2684,16 @@ class Ui {
|
|
2682
2684
|
if (!i) {
|
2683
2685
|
const s = this.widgetAPIHandlers.get(t) || [];
|
2684
2686
|
s.push(() => {
|
2685
|
-
const
|
2686
|
-
e(
|
2687
|
+
const n = this.applications.find((o) => o.name === t);
|
2688
|
+
e(n == null ? void 0 : n.api);
|
2687
2689
|
}), this.widgetAPIHandlers.set(t, s);
|
2688
2690
|
return;
|
2689
2691
|
}
|
2690
2692
|
e(i == null ? void 0 : i.api);
|
2691
2693
|
}
|
2692
2694
|
registerApp(t, e, i, s) {
|
2693
|
-
const
|
2694
|
-
this.applications.push(
|
2695
|
+
const n = new Dt(e, this), o = new Ni(t, e, n, i, s);
|
2696
|
+
this.applications.push(o);
|
2695
2697
|
}
|
2696
2698
|
registerSite(t) {
|
2697
2699
|
this.site = t;
|
@@ -2702,9 +2704,9 @@ class Ui {
|
|
2702
2704
|
}), this;
|
2703
2705
|
}
|
2704
2706
|
}
|
2705
|
-
class
|
2707
|
+
class ji {
|
2706
2708
|
constructor(t) {
|
2707
|
-
this.configurations = [], this.httpClient = new q(), this.api = new
|
2709
|
+
this.configurations = [], this.httpClient = new q(), this.api = new Li(this), this.triggers = [], this.httpClient = new q(), typeof t == "string" ? this.url = t : (t.httpClient && (this.httpClient = t.httpClient), this.loadFromConfig(t));
|
2708
2710
|
}
|
2709
2711
|
async load(t) {
|
2710
2712
|
const e = await this.httpClient.getSite(t);
|
@@ -2758,12 +2760,12 @@ class Li {
|
|
2758
2760
|
}), globalThis.ace = t;
|
2759
2761
|
}
|
2760
2762
|
}
|
2761
|
-
var
|
2762
|
-
for (var s = void 0,
|
2763
|
-
(
|
2764
|
-
return s &&
|
2763
|
+
var Hi = Object.defineProperty, kt = (r, t, e, i) => {
|
2764
|
+
for (var s = void 0, n = r.length - 1, o; n >= 0; n--)
|
2765
|
+
(o = r[n]) && (s = o(t, e, s) || s);
|
2766
|
+
return s && Hi(t, e, s), s;
|
2765
2767
|
};
|
2766
|
-
const
|
2768
|
+
const Lt = class Lt extends A {
|
2767
2769
|
constructor() {
|
2768
2770
|
super(), this.status = "deactivated", this.addEventListener("environment-created", this.onEnvironmentCreated);
|
2769
2771
|
}
|
@@ -2795,44 +2797,45 @@ const Ut = class Ut extends x {
|
|
2795
2797
|
return this.widget.render();
|
2796
2798
|
}
|
2797
2799
|
};
|
2798
|
-
|
2799
|
-
|
2800
|
+
Lt.styles = [
|
2801
|
+
U`
|
2800
2802
|
:host {
|
2801
2803
|
display: block;
|
2802
2804
|
}
|
2803
2805
|
`
|
2804
2806
|
];
|
2805
|
-
let
|
2807
|
+
let L = Lt;
|
2806
2808
|
kt([
|
2807
2809
|
m({ attribute: !0 })
|
2808
|
-
],
|
2810
|
+
], L.prototype, "name");
|
2809
2811
|
kt([
|
2810
2812
|
j()
|
2811
|
-
],
|
2813
|
+
], L.prototype, "widget");
|
2812
2814
|
kt([
|
2813
2815
|
j()
|
2814
|
-
],
|
2816
|
+
], L.prototype, "status");
|
2815
2817
|
customElements.get("ace-trigger-slot") || customElements.define("ace-trigger-slot", W);
|
2816
2818
|
customElements.get("ace-trigger") || customElements.define("ace-trigger", b);
|
2817
2819
|
customElements.get("ace-unresolved-component") || customElements.define("ace-unresolved-component", it);
|
2818
2820
|
customElements.get("ace-wrapper") || customElements.define("ace-wrapper", N);
|
2819
|
-
customElements.get("ace-widget") || customElements.define("ace-widget",
|
2820
|
-
const
|
2821
|
-
const i = new
|
2821
|
+
customElements.get("ace-widget") || customElements.define("ace-widget", L);
|
2822
|
+
const Gi = async (r, t, e = {}) => {
|
2823
|
+
const i = new ji(r);
|
2822
2824
|
e.httpClient && i.setHttpClient(e.httpClient), await i.bootstrap(t);
|
2823
2825
|
};
|
2824
2826
|
export {
|
2825
|
-
|
2826
|
-
|
2827
|
+
L as AceWidget,
|
2828
|
+
Ni as Application,
|
2829
|
+
Ai as AuthState,
|
2827
2830
|
Dt as Container,
|
2828
2831
|
Ui as Environment,
|
2829
2832
|
q as HttpClient,
|
2830
|
-
|
2833
|
+
ji as Site,
|
2831
2834
|
y as StorageCategory,
|
2832
|
-
|
2835
|
+
ki as StorageService,
|
2833
2836
|
b as Trigger,
|
2834
2837
|
$i as WidgetComponent,
|
2835
|
-
|
2836
|
-
|
2837
|
-
|
2838
|
+
Oi as applicationContext,
|
2839
|
+
Gi as bootstrap,
|
2840
|
+
qi as createHttpClient
|
2838
2841
|
};
|