@telia-ace/widget-core-flamingo 1.1.113 → 1.1.114-rc.1
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.js +26 -13
- package/index.mjs +284 -271
- package/package.json +1 -1
package/index.mjs
CHANGED
@@ -27,24 +27,24 @@ function gt(r) {
|
|
27
27
|
function mt(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, o = [], n;
|
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; ) o.push(s.value);
|
33
33
|
} catch (a) {
|
34
|
-
|
34
|
+
n = { 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 (n) throw n.error;
|
40
40
|
}
|
41
41
|
}
|
42
|
-
return
|
42
|
+
return o;
|
43
43
|
}
|
44
44
|
function vt(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, o; i < s; i++)
|
46
|
+
(o || !(i in t)) && (o || (o = Array.prototype.slice.call(t, 0, i)), o[i] = t[i]);
|
47
|
+
return r.concat(o || Array.prototype.slice.call(t));
|
48
48
|
}
|
49
49
|
function _(r) {
|
50
50
|
return typeof r == "function";
|
@@ -55,7 +55,7 @@ function ae(r) {
|
|
55
55
|
}, e = r(t);
|
56
56
|
return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
|
57
57
|
}
|
58
|
-
var
|
58
|
+
var nt = ae(function(r) {
|
59
59
|
return function(e) {
|
60
60
|
r(this), this.message = e ? e.length + ` errors occurred during unsubscription:
|
61
61
|
` + e.map(function(i, s) {
|
@@ -75,14 +75,14 @@ var rt = function() {
|
|
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, o;
|
79
79
|
if (!this.closed) {
|
80
80
|
this.closed = !0;
|
81
|
-
var
|
82
|
-
if (
|
83
|
-
if (this._parentage = null, Array.isArray(
|
81
|
+
var n = this._parentage;
|
82
|
+
if (n)
|
83
|
+
if (this._parentage = null, Array.isArray(n))
|
84
84
|
try {
|
85
|
-
for (var a = gt(
|
85
|
+
for (var a = gt(n), 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 rt = function() {
|
|
96
96
|
}
|
97
97
|
}
|
98
98
|
else
|
99
|
-
|
99
|
+
n.remove(this);
|
100
100
|
var h = this.initialTeardown;
|
101
101
|
if (_(h))
|
102
102
|
try {
|
103
103
|
h();
|
104
104
|
} catch (v) {
|
105
|
-
|
105
|
+
o = v instanceof nt ? v.errors : [v];
|
106
106
|
}
|
107
107
|
var d = this._finalizers;
|
108
108
|
if (d) {
|
@@ -113,7 +113,7 @@ var rt = function() {
|
|
113
113
|
try {
|
114
114
|
Ut(g);
|
115
115
|
} catch (v) {
|
116
|
-
|
116
|
+
o = o ?? [], v instanceof nt ? o = vt(vt([], mt(o)), mt(v.errors)) : o.push(v);
|
117
117
|
}
|
118
118
|
}
|
119
119
|
} catch (v) {
|
@@ -126,8 +126,8 @@ var rt = function() {
|
|
126
126
|
}
|
127
127
|
}
|
128
128
|
}
|
129
|
-
if (
|
130
|
-
throw new
|
129
|
+
if (o)
|
130
|
+
throw new nt(o);
|
131
131
|
}
|
132
132
|
}, r.prototype.add = function(t) {
|
133
133
|
var e;
|
@@ -253,12 +253,12 @@ var le = function(r) {
|
|
253
253
|
}(), bt = function(r) {
|
254
254
|
Y(t, r);
|
255
255
|
function t(e, i, s) {
|
256
|
-
var
|
257
|
-
return _(e) || !e ?
|
256
|
+
var o = r.call(this) || this, n;
|
257
|
+
return _(e) || !e ? n = {
|
258
258
|
next: e ?? void 0,
|
259
259
|
error: i ?? void 0,
|
260
260
|
complete: s ?? void 0
|
261
|
-
} :
|
261
|
+
} : n = e, o.destination = new Pe(n), o;
|
262
262
|
}
|
263
263
|
return t;
|
264
264
|
}(le);
|
@@ -294,11 +294,11 @@ var jt = 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, o = Me(t) ? t : new bt(t, e, i);
|
298
298
|
return G(function() {
|
299
|
-
var
|
300
|
-
|
301
|
-
}),
|
299
|
+
var n = s, a = n.operator, c = n.source;
|
300
|
+
o.add(a ? a.call(o, c) : c ? s._subscribe(o) : s._trySubscribe(o));
|
301
|
+
}), o;
|
302
302
|
}, r.prototype._trySubscribe = function(t) {
|
303
303
|
try {
|
304
304
|
return this._subscribe(t);
|
@@ -307,19 +307,19 @@ var jt = function() {
|
|
307
307
|
}
|
308
308
|
}, r.prototype.forEach = function(t, e) {
|
309
309
|
var i = this;
|
310
|
-
return e = Ht(e), new e(function(s,
|
311
|
-
var
|
310
|
+
return e = Ht(e), new e(function(s, o) {
|
311
|
+
var n = new bt({
|
312
312
|
next: function(a) {
|
313
313
|
try {
|
314
314
|
t(a);
|
315
315
|
} catch (c) {
|
316
|
-
|
316
|
+
o(c), n.unsubscribe();
|
317
317
|
}
|
318
318
|
},
|
319
|
-
error:
|
319
|
+
error: o,
|
320
320
|
complete: s
|
321
321
|
});
|
322
|
-
i.subscribe(
|
322
|
+
i.subscribe(n);
|
323
323
|
});
|
324
324
|
}, r.prototype._subscribe = function(t) {
|
325
325
|
var e;
|
@@ -333,13 +333,13 @@ var jt = function() {
|
|
333
333
|
}, r.prototype.toPromise = function(t) {
|
334
334
|
var e = this;
|
335
335
|
return t = Ht(t), new t(function(i, s) {
|
336
|
-
var
|
337
|
-
e.subscribe(function(
|
338
|
-
return
|
339
|
-
}, function(
|
340
|
-
return s(
|
336
|
+
var o;
|
337
|
+
e.subscribe(function(n) {
|
338
|
+
return o = n;
|
339
|
+
}, function(n) {
|
340
|
+
return s(n);
|
341
341
|
}, function() {
|
342
|
-
return i(
|
342
|
+
return i(o);
|
343
343
|
});
|
344
344
|
});
|
345
345
|
}, r.create = function(t) {
|
@@ -367,7 +367,7 @@ var Ue = ae(function(r) {
|
|
367
367
|
return e.closed = !1, e.currentObservers = null, e.observers = [], e.isStopped = !1, e.hasError = !1, e.thrownError = null, e;
|
368
368
|
}
|
369
369
|
return t.prototype.lift = function(e) {
|
370
|
-
var i = new
|
370
|
+
var i = new Ft(this, this);
|
371
371
|
return i.operator = e, i;
|
372
372
|
}, t.prototype._throwIfClosed = function() {
|
373
373
|
if (this.closed)
|
@@ -375,11 +375,11 @@ var Ue = ae(function(r) {
|
|
375
375
|
}, t.prototype.next = function(e) {
|
376
376
|
var i = this;
|
377
377
|
G(function() {
|
378
|
-
var s,
|
378
|
+
var s, o;
|
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 n = gt(i.currentObservers), a = n.next(); !a.done; a = n.next()) {
|
383
383
|
var c = a.value;
|
384
384
|
c.next(e);
|
385
385
|
}
|
@@ -387,7 +387,7 @@ var Ue = ae(function(r) {
|
|
387
387
|
s = { error: l };
|
388
388
|
} finally {
|
389
389
|
try {
|
390
|
-
a && !a.done && (
|
390
|
+
a && !a.done && (o = n.return) && o.call(n);
|
391
391
|
} finally {
|
392
392
|
if (s) throw s.error;
|
393
393
|
}
|
@@ -426,20 +426,20 @@ var Ue = ae(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, o = s.hasError, n = s.isStopped, a = s.observers;
|
430
|
+
return o || n ? ce : (this.currentObservers = null, a.push(e), new rt(function() {
|
431
431
|
i.currentObservers = null, yt(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, o = i.thrownError, n = i.isStopped;
|
435
|
+
s ? e.error(o) : n && e.complete();
|
436
436
|
}, t.prototype.asObservable = function() {
|
437
437
|
var e = new jt();
|
438
438
|
return e.source = this, e;
|
439
439
|
}, t.create = function(e, i) {
|
440
|
-
return new
|
440
|
+
return new Ft(e, i);
|
441
441
|
}, t;
|
442
|
-
}(jt),
|
442
|
+
}(jt), Ft = function(r) {
|
443
443
|
Y(t, r);
|
444
444
|
function t(e, i) {
|
445
445
|
var s = r.call(this) || this;
|
@@ -458,7 +458,7 @@ var Ue = ae(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 : ce;
|
460
460
|
}, t;
|
461
|
-
}(_t),
|
461
|
+
}(_t), xt = function(r) {
|
462
462
|
Y(t, r);
|
463
463
|
function t(e) {
|
464
464
|
var i = r.call(this) || this;
|
@@ -474,17 +474,17 @@ var Ue = ae(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, o = e._value;
|
478
478
|
if (i)
|
479
479
|
throw s;
|
480
|
-
return this._throwIfClosed(),
|
480
|
+
return this._throwIfClosed(), o;
|
481
481
|
}, t.prototype.next = function(e) {
|
482
482
|
r.prototype.next.call(this, this._value = e);
|
483
483
|
}, t;
|
484
484
|
}(_t), de = /* @__PURE__ */ ((r) => (r.Loading = "loading", r.Ready = "ready", r))(de || {});
|
485
|
-
class
|
485
|
+
class Bt {
|
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,7 +507,7 @@ class Dt {
|
|
507
507
|
* Copyright 2019 Google LLC
|
508
508
|
* SPDX-License-Identifier: BSD-3-Clause
|
509
509
|
*/
|
510
|
-
const J = globalThis,
|
510
|
+
const J = globalThis, At = J.ShadowRoot && (J.ShadyCSS === void 0 || J.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ct = Symbol(), Dt = /* @__PURE__ */ new WeakMap();
|
511
511
|
let ue = class {
|
512
512
|
constructor(t, e, i) {
|
513
513
|
if (this._$cssResult$ = !0, i !== Ct) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
@@ -516,9 +516,9 @@ let ue = class {
|
|
516
516
|
get styleSheet() {
|
517
517
|
let t = this.o;
|
518
518
|
const e = this.t;
|
519
|
-
if (
|
519
|
+
if (At && t === void 0) {
|
520
520
|
const i = e !== void 0 && e.length === 1;
|
521
|
-
i && (t =
|
521
|
+
i && (t = Dt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Dt.set(e, t));
|
522
522
|
}
|
523
523
|
return t;
|
524
524
|
}
|
@@ -527,19 +527,19 @@ let ue = class {
|
|
527
527
|
}
|
528
528
|
};
|
529
529
|
const Le = (r) => new ue(typeof r == "string" ? r : r + "", void 0, Ct), U = (r, ...t) => {
|
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[
|
530
|
+
const e = r.length === 1 ? r[0] : t.reduce((i, s, o) => i + ((n) => {
|
531
|
+
if (n._$cssResult$ === !0) return n.cssText;
|
532
|
+
if (typeof n == "number") return n;
|
533
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
534
|
+
})(s) + r[o + 1], r[0]);
|
535
535
|
return new ue(e, r, Ct);
|
536
536
|
}, je = (r, t) => {
|
537
|
-
if (
|
537
|
+
if (At) r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
538
538
|
else for (const e of t) {
|
539
539
|
const i = document.createElement("style"), s = J.litNonce;
|
540
540
|
s !== void 0 && i.setAttribute("nonce", s), i.textContent = e.cssText, r.appendChild(i);
|
541
541
|
}
|
542
|
-
},
|
542
|
+
}, zt = At ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
|
543
543
|
let e = "";
|
544
544
|
for (const i of t.cssRules) e += i.cssText;
|
545
545
|
return Le(e);
|
@@ -549,7 +549,7 @@ const Le = (r) => new ue(typeof r == "string" ? r : r + "", void 0, Ct), U = (r,
|
|
549
549
|
* Copyright 2017 Google LLC
|
550
550
|
* SPDX-License-Identifier: BSD-3-Clause
|
551
551
|
*/
|
552
|
-
const { is: He, defineProperty:
|
552
|
+
const { is: He, defineProperty: Fe, getOwnPropertyDescriptor: Be, getOwnPropertyNames: De, getOwnPropertySymbols: ze, getPrototypeOf: Ve } = Object, C = globalThis, Vt = C.trustedTypes, We = Vt ? Vt.emptyScript : "", at = C.reactiveElementPolyfillSupport, H = (r, t) => r, X = { toAttribute(r, t) {
|
553
553
|
switch (t) {
|
554
554
|
case Boolean:
|
555
555
|
r = r ? We : null;
|
@@ -589,20 +589,20 @@ let k = class extends HTMLElement {
|
|
589
589
|
static createProperty(t, e = Wt) {
|
590
590
|
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
591
591
|
const i = Symbol(), s = this.getPropertyDescriptor(t, i, e);
|
592
|
-
s !== void 0 &&
|
592
|
+
s !== void 0 && Fe(this.prototype, t, s);
|
593
593
|
}
|
594
594
|
}
|
595
595
|
static getPropertyDescriptor(t, e, i) {
|
596
|
-
const { get: s, set:
|
596
|
+
const { get: s, set: o } = Be(this.prototype, t) ?? { get() {
|
597
597
|
return this[e];
|
598
|
-
}, set(
|
599
|
-
this[e] =
|
598
|
+
}, set(n) {
|
599
|
+
this[e] = n;
|
600
600
|
} };
|
601
601
|
return { get() {
|
602
602
|
return s == null ? void 0 : s.call(this);
|
603
|
-
}, set(
|
603
|
+
}, set(n) {
|
604
604
|
const a = s == null ? void 0 : s.call(this);
|
605
|
-
|
605
|
+
o.call(this, n), this.requestUpdate(t, a, i);
|
606
606
|
}, configurable: !0, enumerable: !0 };
|
607
607
|
}
|
608
608
|
static getPropertyOptions(t) {
|
@@ -616,7 +616,7 @@ let k = class extends HTMLElement {
|
|
616
616
|
static finalize() {
|
617
617
|
if (this.hasOwnProperty(H("finalized"))) return;
|
618
618
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(H("properties"))) {
|
619
|
-
const e = this.properties, i = [...
|
619
|
+
const e = this.properties, i = [...De(e), ...ze(e)];
|
620
620
|
for (const s of i) this.createProperty(s, e[s]);
|
621
621
|
}
|
622
622
|
const t = this[Symbol.metadata];
|
@@ -635,8 +635,8 @@ let k = class extends HTMLElement {
|
|
635
635
|
const e = [];
|
636
636
|
if (Array.isArray(t)) {
|
637
637
|
const i = new Set(t.flat(1 / 0).reverse());
|
638
|
-
for (const s of i) e.unshift(
|
639
|
-
} else t !== void 0 && e.push(
|
638
|
+
for (const s of i) e.unshift(zt(s));
|
639
|
+
} else t !== void 0 && e.push(zt(t));
|
640
640
|
return e;
|
641
641
|
}
|
642
642
|
static _$Eu(t, e) {
|
@@ -687,19 +687,19 @@ let k = class extends HTMLElement {
|
|
687
687
|
this._$AK(t, i);
|
688
688
|
}
|
689
689
|
_$EC(t, e) {
|
690
|
-
var
|
690
|
+
var o;
|
691
691
|
const i = this.constructor.elementProperties.get(t), s = this.constructor._$Eu(t, i);
|
692
692
|
if (s !== void 0 && i.reflect === !0) {
|
693
|
-
const
|
694
|
-
this._$Em = t,
|
693
|
+
const n = (((o = i.converter) == null ? void 0 : o.toAttribute) !== void 0 ? i.converter : X).toAttribute(e, i.type);
|
694
|
+
this._$Em = t, n == null ? this.removeAttribute(s) : this.setAttribute(s, n), this._$Em = null;
|
695
695
|
}
|
696
696
|
}
|
697
697
|
_$AK(t, e) {
|
698
|
-
var
|
698
|
+
var o;
|
699
699
|
const i = this.constructor, s = i._$Eh.get(t);
|
700
700
|
if (s !== void 0 && this._$Em !== s) {
|
701
|
-
const
|
702
|
-
this._$Em = s, this[s] = a.fromAttribute(e,
|
701
|
+
const n = i.getPropertyOptions(s), a = typeof n.converter == "function" ? { fromAttribute: n.converter } : ((o = n.converter) == null ? void 0 : o.fromAttribute) !== void 0 ? n.converter : X;
|
702
|
+
this._$Em = s, this[s] = a.fromAttribute(e, n.type), this._$Em = null;
|
703
703
|
}
|
704
704
|
}
|
705
705
|
requestUpdate(t, e, i) {
|
@@ -730,18 +730,18 @@ let k = 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 [o, n] of this._$Ep) this[o] = n;
|
734
734
|
this._$Ep = void 0;
|
735
735
|
}
|
736
736
|
const s = this.constructor.elementProperties;
|
737
|
-
if (s.size > 0) for (const [
|
737
|
+
if (s.size > 0) for (const [o, n] of s) n.wrapped !== !0 || this._$AL.has(o) || this[o] === void 0 || this.P(o, this[o], n);
|
738
738
|
}
|
739
739
|
let t = !1;
|
740
740
|
const e = this._$AL;
|
741
741
|
try {
|
742
742
|
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (i = this._$EO) == null || i.forEach((s) => {
|
743
|
-
var
|
744
|
-
return (
|
743
|
+
var o;
|
744
|
+
return (o = s.hostUpdate) == null ? void 0 : o.call(s);
|
745
745
|
}), this.update(e)) : this._$EU();
|
746
746
|
} catch (s) {
|
747
747
|
throw t = !1, this._$EU(), s;
|
@@ -783,7 +783,7 @@ k.elementStyles = [], k.shadowRootOptions = { mode: "open" }, k[H("elementProper
|
|
783
783
|
* Copyright 2017 Google LLC
|
784
784
|
* SPDX-License-Identifier: BSD-3-Clause
|
785
785
|
*/
|
786
|
-
const
|
786
|
+
const F = globalThis, Q = F.trustedTypes, Yt = Q ? Q.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, pe = "$lit$", A = `lit$${Math.random().toFixed(9).slice(2)}$`, fe = "?" + A, Ye = `<${fe}>`, O = document, D = () => O.createComment(""), z = (r) => r === null || typeof r != "object" && typeof r != "function", Et = Array.isArray, qe = (r) => Et(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", ct = `[
|
787
787
|
\f\r]`, j = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, qt = /-->/g, Kt = />/g, S = RegExp(`>|${ct}(?:([^\\s"'>=/]+)(${ct}*=${ct}*(?:[^
|
788
788
|
\f\r"'\`<>=]|("|')|))|$)`, "g"), Zt = /'/g, Gt = /"/g, ge = /^(?:script|style|textarea|title)$/i, Ke = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), T = Ke(1), I = Symbol.for("lit-noChange"), p = Symbol.for("lit-nothing"), Jt = /* @__PURE__ */ new WeakMap(), P = O.createTreeWalker(O, 129);
|
789
789
|
function me(r, t) {
|
@@ -792,21 +792,21 @@ function me(r, t) {
|
|
792
792
|
}
|
793
793
|
const Ze = (r, t) => {
|
794
794
|
const e = r.length - 1, i = [];
|
795
|
-
let s,
|
795
|
+
let s, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = j;
|
796
796
|
for (let a = 0; a < e; a++) {
|
797
797
|
const c = r[a];
|
798
798
|
let l, h, d = -1, u = 0;
|
799
|
-
for (; u < c.length && (
|
800
|
-
const f =
|
801
|
-
|
799
|
+
for (; u < c.length && (n.lastIndex = u, h = n.exec(c), h !== null); ) u = n.lastIndex, n === j ? h[1] === "!--" ? n = qt : h[1] !== void 0 ? n = Kt : h[2] !== void 0 ? (ge.test(h[2]) && (s = RegExp("</" + h[2], "g")), n = S) : h[3] !== void 0 && (n = S) : n === S ? h[0] === ">" ? (n = s ?? j, d = -1) : h[1] === void 0 ? d = -2 : (d = n.lastIndex - h[2].length, l = h[1], n = h[3] === void 0 ? S : h[3] === '"' ? Gt : Zt) : n === Gt || n === Zt ? n = S : n === qt || n === Kt ? n = j : (n = S, s = void 0);
|
800
|
+
const f = n === S && r[a + 1].startsWith("/>") ? " " : "";
|
801
|
+
o += n === j ? c + Ye : d >= 0 ? (i.push(l), c.slice(0, d) + pe + c.slice(d) + A + f) : c + A + (d === -2 ? a : f);
|
802
802
|
}
|
803
|
-
return [me(r,
|
803
|
+
return [me(r, o + (r[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
|
804
804
|
};
|
805
805
|
let wt = class ve {
|
806
806
|
constructor({ strings: t, _$litType$: e }, i) {
|
807
807
|
let s;
|
808
808
|
this.parts = [];
|
809
|
-
let
|
809
|
+
let o = 0, n = 0;
|
810
810
|
const a = t.length - 1, c = this.parts, [l, h] = Ze(t, e);
|
811
811
|
if (this.el = ve.createElement(l, i), P.currentNode = this.el.content, e === 2 || e === 3) {
|
812
812
|
const d = this.el.content.firstChild;
|
@@ -815,23 +815,23 @@ let wt = class ve {
|
|
815
815
|
for (; (s = P.nextNode()) !== null && c.length < a; ) {
|
816
816
|
if (s.nodeType === 1) {
|
817
817
|
if (s.hasAttributes()) for (const d of s.getAttributeNames()) if (d.endsWith(pe)) {
|
818
|
-
const u = h[
|
819
|
-
c.push({ type: 1, index:
|
820
|
-
} else d.startsWith(
|
818
|
+
const u = h[n++], f = s.getAttribute(d).split(A), g = /([.?@])?(.*)/.exec(u);
|
819
|
+
c.push({ type: 1, index: o, name: g[2], strings: f, ctor: g[1] === "." ? Je : g[1] === "?" ? Xe : g[1] === "@" ? Qe : ot }), s.removeAttribute(d);
|
820
|
+
} else d.startsWith(A) && (c.push({ type: 6, index: o }), s.removeAttribute(d));
|
821
821
|
if (ge.test(s.tagName)) {
|
822
|
-
const d = s.textContent.split(
|
822
|
+
const d = s.textContent.split(A), u = d.length - 1;
|
823
823
|
if (u > 0) {
|
824
824
|
s.textContent = Q ? Q.emptyScript : "";
|
825
|
-
for (let f = 0; f < u; f++) s.append(d[f],
|
826
|
-
s.append(d[u],
|
825
|
+
for (let f = 0; f < u; f++) s.append(d[f], D()), P.nextNode(), c.push({ type: 2, index: ++o });
|
826
|
+
s.append(d[u], D());
|
827
827
|
}
|
828
828
|
}
|
829
|
-
} else if (s.nodeType === 8) if (s.data === fe) c.push({ type: 2, index:
|
829
|
+
} else if (s.nodeType === 8) if (s.data === fe) c.push({ type: 2, index: o });
|
830
830
|
else {
|
831
831
|
let d = -1;
|
832
|
-
for (; (d = s.data.indexOf(
|
832
|
+
for (; (d = s.data.indexOf(A, d + 1)) !== -1; ) c.push({ type: 7, index: o }), d += A.length - 1;
|
833
833
|
}
|
834
|
-
|
834
|
+
o++;
|
835
835
|
}
|
836
836
|
}
|
837
837
|
static createElement(t, e) {
|
@@ -840,11 +840,11 @@ let wt = class ve {
|
|
840
840
|
}
|
841
841
|
};
|
842
842
|
function R(r, t, e = r, i) {
|
843
|
-
var
|
843
|
+
var n, a;
|
844
844
|
if (t === I) return t;
|
845
|
-
let s = i !== void 0 ? (
|
846
|
-
const
|
847
|
-
return (s == null ? void 0 : s.constructor) !==
|
845
|
+
let s = i !== void 0 ? (n = e._$Co) == null ? void 0 : n[i] : e._$Cl;
|
846
|
+
const o = z(t) ? void 0 : t._$litDirective$;
|
847
|
+
return (s == null ? void 0 : s.constructor) !== o && ((a = s == null ? void 0 : s._$AO) == null || a.call(s, !1), o === void 0 ? s = void 0 : (s = new o(r), s._$AT(r, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = s : e._$Cl = s), s !== void 0 && (t = R(r, s._$AS(r, t.values), s, i)), t;
|
848
848
|
}
|
849
849
|
class Ge {
|
850
850
|
constructor(t, e) {
|
@@ -859,13 +859,13 @@ class Ge {
|
|
859
859
|
u(t) {
|
860
860
|
const { el: { content: e }, parts: i } = this._$AD, s = ((t == null ? void 0 : t.creationScope) ?? O).importNode(e, !0);
|
861
861
|
P.currentNode = s;
|
862
|
-
let
|
862
|
+
let o = P.nextNode(), n = 0, a = 0, c = i[0];
|
863
863
|
for (; c !== void 0; ) {
|
864
|
-
if (
|
864
|
+
if (n === c.index) {
|
865
865
|
let l;
|
866
|
-
c.type === 2 ? l = new q(
|
866
|
+
c.type === 2 ? l = new q(o, o.nextSibling, this, t) : c.type === 1 ? l = new c.ctor(o, c.name, c.strings, this, t) : c.type === 6 && (l = new ti(o, this, t)), this._$AV.push(l), c = i[++a];
|
867
867
|
}
|
868
|
-
|
868
|
+
n !== (c == null ? void 0 : c.index) && (o = P.nextNode(), n++);
|
869
869
|
}
|
870
870
|
return P.currentNode = O, s;
|
871
871
|
}
|
@@ -894,7 +894,7 @@ class q {
|
|
894
894
|
return this._$AB;
|
895
895
|
}
|
896
896
|
_$AI(t, e = this) {
|
897
|
-
t = R(this, t, e),
|
897
|
+
t = R(this, t, e), z(t) ? t === p || t == null || t === "" ? (this._$AH !== p && this._$AR(), this._$AH = p) : t !== this._$AH && t !== I && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : qe(t) ? this.k(t) : this._(t);
|
898
898
|
}
|
899
899
|
O(t) {
|
900
900
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
@@ -903,15 +903,15 @@ class q {
|
|
903
903
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
904
904
|
}
|
905
905
|
_(t) {
|
906
|
-
this._$AH !== p &&
|
906
|
+
this._$AH !== p && z(this._$AH) ? this._$AA.nextSibling.data = t : this.T(O.createTextNode(t)), this._$AH = t;
|
907
907
|
}
|
908
908
|
$(t) {
|
909
|
-
var
|
909
|
+
var o;
|
910
910
|
const { values: e, _$litType$: i } = t, s = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = wt.createElement(me(i.h, i.h[0]), this.options)), i);
|
911
|
-
if (((
|
911
|
+
if (((o = this._$AH) == null ? void 0 : o._$AD) === s) this._$AH.p(e);
|
912
912
|
else {
|
913
|
-
const
|
914
|
-
|
913
|
+
const n = new Ge(s, this), a = n.u(this.options);
|
914
|
+
n.p(e), this.T(a), this._$AH = n;
|
915
915
|
}
|
916
916
|
}
|
917
917
|
_$AC(t) {
|
@@ -922,7 +922,7 @@ class q {
|
|
922
922
|
Et(this._$AH) || (this._$AH = [], this._$AR());
|
923
923
|
const e = this._$AH;
|
924
924
|
let i, s = 0;
|
925
|
-
for (const
|
925
|
+
for (const o of t) s === e.length ? e.push(i = new q(this.O(D()), this.O(D()), this, this.options)) : i = e[s], i._$AI(o), s++;
|
926
926
|
s < e.length && (this._$AR(i && i._$AB.nextSibling, s), e.length = s);
|
927
927
|
}
|
928
928
|
_$AR(t = this._$AA.nextSibling, e) {
|
@@ -937,32 +937,32 @@ class q {
|
|
937
937
|
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
938
938
|
}
|
939
939
|
}
|
940
|
-
class
|
940
|
+
class ot {
|
941
941
|
get tagName() {
|
942
942
|
return this.element.tagName;
|
943
943
|
}
|
944
944
|
get _$AU() {
|
945
945
|
return this._$AM._$AU;
|
946
946
|
}
|
947
|
-
constructor(t, e, i, s,
|
948
|
-
this.type = 1, this._$AH = p, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options =
|
947
|
+
constructor(t, e, i, s, o) {
|
948
|
+
this.type = 1, this._$AH = p, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = o, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = p;
|
949
949
|
}
|
950
950
|
_$AI(t, e = this, i, s) {
|
951
|
-
const
|
952
|
-
let
|
953
|
-
if (
|
951
|
+
const o = this.strings;
|
952
|
+
let n = !1;
|
953
|
+
if (o === void 0) t = R(this, t, e, 0), n = !z(t) || t !== this._$AH && t !== I, n && (this._$AH = t);
|
954
954
|
else {
|
955
955
|
const a = t;
|
956
956
|
let c, l;
|
957
|
-
for (t =
|
957
|
+
for (t = o[0], c = 0; c < o.length - 1; c++) l = R(this, a[i + c], e, c), l === I && (l = this._$AH[c]), n || (n = !z(l) || l !== this._$AH[c]), l === p ? t = p : t !== p && (t += (l ?? "") + o[c + 1]), this._$AH[c] = l;
|
958
958
|
}
|
959
|
-
|
959
|
+
n && !s && this.j(t);
|
960
960
|
}
|
961
961
|
j(t) {
|
962
962
|
t === p ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
963
963
|
}
|
964
964
|
}
|
965
|
-
class Je extends
|
965
|
+
class Je extends ot {
|
966
966
|
constructor() {
|
967
967
|
super(...arguments), this.type = 3;
|
968
968
|
}
|
@@ -970,7 +970,7 @@ class Je extends nt {
|
|
970
970
|
this.element[this.name] = t === p ? void 0 : t;
|
971
971
|
}
|
972
972
|
}
|
973
|
-
class Xe extends
|
973
|
+
class Xe extends ot {
|
974
974
|
constructor() {
|
975
975
|
super(...arguments), this.type = 4;
|
976
976
|
}
|
@@ -978,14 +978,14 @@ class Xe extends nt {
|
|
978
978
|
this.element.toggleAttribute(this.name, !!t && t !== p);
|
979
979
|
}
|
980
980
|
}
|
981
|
-
class Qe extends
|
982
|
-
constructor(t, e, i, s,
|
983
|
-
super(t, e, i, s,
|
981
|
+
class Qe extends ot {
|
982
|
+
constructor(t, e, i, s, o) {
|
983
|
+
super(t, e, i, s, o), this.type = 5;
|
984
984
|
}
|
985
985
|
_$AI(t, e = this) {
|
986
986
|
if ((t = R(this, t, e, 0) ?? p) === I) return;
|
987
|
-
const i = this._$AH, s = t === p && i !== p || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive,
|
988
|
-
s && this.element.removeEventListener(this.name, this, i),
|
987
|
+
const i = this._$AH, s = t === p && i !== p || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, o = t !== p && (i === p || s);
|
988
|
+
s && this.element.removeEventListener(this.name, this, i), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
989
989
|
}
|
990
990
|
handleEvent(t) {
|
991
991
|
var e;
|
@@ -1003,14 +1003,14 @@ class ti {
|
|
1003
1003
|
R(this, t);
|
1004
1004
|
}
|
1005
1005
|
}
|
1006
|
-
const ht =
|
1007
|
-
ht == null || ht(wt, q), (
|
1006
|
+
const ht = F.litHtmlPolyfillSupport;
|
1007
|
+
ht == null || ht(wt, q), (F.litHtmlVersions ?? (F.litHtmlVersions = [])).push("3.2.1");
|
1008
1008
|
const ei = (r, t, e) => {
|
1009
1009
|
const i = (e == null ? void 0 : e.renderBefore) ?? t;
|
1010
1010
|
let s = i._$litPart$;
|
1011
1011
|
if (s === void 0) {
|
1012
|
-
const
|
1013
|
-
i._$litPart$ = s = new q(t.insertBefore(
|
1012
|
+
const o = (e == null ? void 0 : e.renderBefore) ?? null;
|
1013
|
+
i._$litPart$ = s = new q(t.insertBefore(D(), o), o, void 0, e ?? {});
|
1014
1014
|
}
|
1015
1015
|
return s._$AI(r), s;
|
1016
1016
|
};
|
@@ -1019,7 +1019,7 @@ const ei = (r, t, e) => {
|
|
1019
1019
|
* Copyright 2017 Google LLC
|
1020
1020
|
* SPDX-License-Identifier: BSD-3-Clause
|
1021
1021
|
*/
|
1022
|
-
let
|
1022
|
+
let x = class extends k {
|
1023
1023
|
constructor() {
|
1024
1024
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
1025
1025
|
}
|
@@ -1044,10 +1044,10 @@ let A = class extends k {
|
|
1044
1044
|
return I;
|
1045
1045
|
}
|
1046
1046
|
};
|
1047
|
-
var
|
1048
|
-
|
1047
|
+
var ne;
|
1048
|
+
x._$litElement$ = !0, x.finalized = !0, (ne = globalThis.litElementHydrateSupport) == null || ne.call(globalThis, { LitElement: x });
|
1049
1049
|
const lt = globalThis.litElementPolyfillSupport;
|
1050
|
-
lt == null || lt({ LitElement:
|
1050
|
+
lt == null || lt({ LitElement: x });
|
1051
1051
|
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.1.1");
|
1052
1052
|
/**
|
1053
1053
|
* @license
|
@@ -1056,29 +1056,29 @@ lt == null || lt({ LitElement: A });
|
|
1056
1056
|
*/
|
1057
1057
|
const ii = { attribute: !0, type: String, converter: X, reflect: !1, hasChanged: St }, si = (r = ii, t, e) => {
|
1058
1058
|
const { kind: i, metadata: s } = e;
|
1059
|
-
let
|
1060
|
-
if (
|
1061
|
-
const { name:
|
1059
|
+
let o = globalThis.litPropertyMetadata.get(s);
|
1060
|
+
if (o === void 0 && globalThis.litPropertyMetadata.set(s, o = /* @__PURE__ */ new Map()), o.set(e.name, r), i === "accessor") {
|
1061
|
+
const { name: n } = e;
|
1062
1062
|
return { set(a) {
|
1063
1063
|
const c = t.get.call(this);
|
1064
|
-
t.set.call(this, a), this.requestUpdate(
|
1064
|
+
t.set.call(this, a), this.requestUpdate(n, c, r);
|
1065
1065
|
}, init(a) {
|
1066
|
-
return a !== void 0 && this.P(
|
1066
|
+
return a !== void 0 && this.P(n, void 0, r), a;
|
1067
1067
|
} };
|
1068
1068
|
}
|
1069
1069
|
if (i === "setter") {
|
1070
|
-
const { name:
|
1070
|
+
const { name: n } = e;
|
1071
1071
|
return function(a) {
|
1072
|
-
const c = this[
|
1073
|
-
t.call(this, a), this.requestUpdate(
|
1072
|
+
const c = this[n];
|
1073
|
+
t.call(this, a), this.requestUpdate(n, c, r);
|
1074
1074
|
};
|
1075
1075
|
}
|
1076
1076
|
throw Error("Unsupported decorator location: " + i);
|
1077
1077
|
};
|
1078
1078
|
function m(r) {
|
1079
|
-
return (t, e) => typeof e == "object" ? si(r, t, e) : ((i, s,
|
1080
|
-
const
|
1081
|
-
return s.constructor.createProperty(
|
1079
|
+
return (t, e) => typeof e == "object" ? si(r, t, e) : ((i, s, o) => {
|
1080
|
+
const n = s.hasOwnProperty(o);
|
1081
|
+
return s.constructor.createProperty(o, n ? { ...i, wrapped: !0 } : i), n ? Object.getOwnPropertyDescriptor(s, o) : void 0;
|
1082
1082
|
})(r, t, e);
|
1083
1083
|
}
|
1084
1084
|
/**
|
@@ -1089,12 +1089,12 @@ function m(r) {
|
|
1089
1089
|
function L(r) {
|
1090
1090
|
return m({ ...r, state: !0, attribute: !1 });
|
1091
1091
|
}
|
1092
|
-
var ri = Object.defineProperty,
|
1093
|
-
for (var s = void 0,
|
1094
|
-
(
|
1092
|
+
var ri = Object.defineProperty, oi = (r, t, e, i) => {
|
1093
|
+
for (var s = void 0, o = r.length - 1, n; o >= 0; o--)
|
1094
|
+
(n = r[o]) && (s = n(t, e, s) || s);
|
1095
1095
|
return s && ri(t, e, s), s;
|
1096
1096
|
};
|
1097
|
-
const kt = class kt extends
|
1097
|
+
const kt = class kt extends x {
|
1098
1098
|
constructor() {
|
1099
1099
|
super(...arguments), this.anchor = "BottomRight";
|
1100
1100
|
}
|
@@ -1126,7 +1126,7 @@ kt.styles = [
|
|
1126
1126
|
`
|
1127
1127
|
];
|
1128
1128
|
let V = kt;
|
1129
|
-
|
1129
|
+
oi([
|
1130
1130
|
m({ attribute: !0 })
|
1131
1131
|
], V.prototype, "anchor");
|
1132
1132
|
/**
|
@@ -1156,17 +1156,17 @@ let ye = class {
|
|
1156
1156
|
* Copyright 2020 Google LLC
|
1157
1157
|
* SPDX-License-Identifier: BSD-3-Clause
|
1158
1158
|
*/
|
1159
|
-
const
|
1159
|
+
const ni = (r) => r.strings === void 0;
|
1160
1160
|
/**
|
1161
1161
|
* @license
|
1162
1162
|
* Copyright 2017 Google LLC
|
1163
1163
|
* SPDX-License-Identifier: BSD-3-Clause
|
1164
1164
|
*/
|
1165
|
-
const
|
1165
|
+
const B = (r, t) => {
|
1166
1166
|
var i;
|
1167
1167
|
const e = r._$AN;
|
1168
1168
|
if (e === void 0) return !1;
|
1169
|
-
for (const s of e) (i = s._$AO) == null || i.call(s, t, !1),
|
1169
|
+
for (const s of e) (i = s._$AO) == null || i.call(s, t, !1), B(s, t);
|
1170
1170
|
return !0;
|
1171
1171
|
}, tt = (r) => {
|
1172
1172
|
let t, e;
|
@@ -1187,9 +1187,9 @@ function ai(r) {
|
|
1187
1187
|
}
|
1188
1188
|
function ci(r, t = !1, e = 0) {
|
1189
1189
|
const i = this._$AH, s = this._$AN;
|
1190
|
-
if (s !== void 0 && s.size !== 0) if (t) if (Array.isArray(i)) for (let
|
1191
|
-
else i != null && (
|
1192
|
-
else
|
1190
|
+
if (s !== void 0 && s.size !== 0) if (t) if (Array.isArray(i)) for (let o = e; o < i.length; o++) B(i[o], !1), tt(i[o]);
|
1191
|
+
else i != null && (B(i, !1), tt(i));
|
1192
|
+
else B(this, r);
|
1193
1193
|
}
|
1194
1194
|
const hi = (r) => {
|
1195
1195
|
r.type == Pt.CHILD && (r._$AP ?? (r._$AP = ci), r._$AQ ?? (r._$AQ = ai));
|
@@ -1203,10 +1203,10 @@ class we extends ye {
|
|
1203
1203
|
}
|
1204
1204
|
_$AO(t, e = !0) {
|
1205
1205
|
var i, s;
|
1206
|
-
t !== this.isConnected && (this.isConnected = t, t ? (i = this.reconnected) == null || i.call(this) : (s = this.disconnected) == null || s.call(this)), e && (
|
1206
|
+
t !== this.isConnected && (this.isConnected = t, t ? (i = this.reconnected) == null || i.call(this) : (s = this.disconnected) == null || s.call(this)), e && (B(this, t), tt(this));
|
1207
1207
|
}
|
1208
1208
|
setValue(t) {
|
1209
|
-
if (
|
1209
|
+
if (ni(this._$Ct)) this._$Ct._$AI(t, this);
|
1210
1210
|
else {
|
1211
1211
|
const e = [...this._$Ct._$AH];
|
1212
1212
|
e[this._$Ci] = t, this._$Ct._$AI(e, this, 0);
|
@@ -1270,7 +1270,7 @@ class fi extends we {
|
|
1270
1270
|
update(t, [e]) {
|
1271
1271
|
var s;
|
1272
1272
|
const i = this.u === void 0;
|
1273
|
-
return i && (this.u = (s = t.options) == null ? void 0 : s.host, this.u.addController(this), this.u.updateComplete.then((
|
1273
|
+
return i && (this.u = (s = t.options) == null ? void 0 : s.host, this.u.addController(this), this.u.updateComplete.then((o) => this.t = !0), this.element = t.element, se.set(this.element, this)), this.optionsOrCallback = e, (i || typeof e != "function") && this.p(e), this.render(e);
|
1274
1274
|
}
|
1275
1275
|
p(t) {
|
1276
1276
|
t = t ?? {};
|
@@ -1280,15 +1280,15 @@ class fi extends we {
|
|
1280
1280
|
m() {
|
1281
1281
|
const t = {}, e = this.element.getBoundingClientRect(), i = getComputedStyle(this.element);
|
1282
1282
|
return this.options.properties.forEach((s) => {
|
1283
|
-
const
|
1284
|
-
t[s] = isNaN(
|
1283
|
+
const o = e[s] ?? (ut[s] ? void 0 : i[s]), n = Number(o);
|
1284
|
+
t[s] = isNaN(n) ? o + "" : n;
|
1285
1285
|
}), t;
|
1286
1286
|
}
|
1287
1287
|
v() {
|
1288
1288
|
let t, e = !0;
|
1289
1289
|
return this.options.guard && (t = this.options.guard(), e = ((i, s) => {
|
1290
1290
|
if (Array.isArray(i)) {
|
1291
|
-
if (Array.isArray(s) && s.length === i.length && i.every((
|
1291
|
+
if (Array.isArray(s) && s.length === i.length && i.every((o, n) => o === s[n])) return !1;
|
1292
1292
|
} else if (s === i) return !1;
|
1293
1293
|
return !0;
|
1294
1294
|
})(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;
|
@@ -1302,14 +1302,14 @@ class fi extends we {
|
|
1302
1302
|
this.prepare(), await te;
|
1303
1303
|
const e = this.O(), i = this.j(this.options.keyframeOptions, e), s = this.m();
|
1304
1304
|
if (this.A !== void 0) {
|
1305
|
-
const { from:
|
1306
|
-
this.log("measured", [this.A, s,
|
1305
|
+
const { from: o, to: n } = this.N(this.A, s, e);
|
1306
|
+
this.log("measured", [this.A, s, o, n]), t = this.calculateKeyframes(o, n);
|
1307
1307
|
} else {
|
1308
|
-
const
|
1309
|
-
if (
|
1308
|
+
const o = dt.get(this.options.inId);
|
1309
|
+
if (o) {
|
1310
1310
|
dt.delete(this.options.inId);
|
1311
|
-
const { from:
|
1312
|
-
t = this.calculateKeyframes(
|
1311
|
+
const { from: n, to: a } = this.N(o, s, e);
|
1312
|
+
t = this.calculateKeyframes(n, a), t = this.options.in ? [{ ...this.options.in[0], ...t[0] }, ...this.options.in.slice(1), t[1]] : t, Xt++, t.forEach((c) => c.zIndex = Xt);
|
1313
1313
|
} else this.options.in && (t = [...this.options.in, {}]);
|
1314
1314
|
}
|
1315
1315
|
this.animate(t, i);
|
@@ -1331,8 +1331,8 @@ class fi extends we {
|
|
1331
1331
|
if (this.i.insertBefore(this.element, i), this.options.stabilizeOut) {
|
1332
1332
|
const s = this.m();
|
1333
1333
|
this.log("stabilizing out");
|
1334
|
-
const
|
1335
|
-
getComputedStyle(this.element).position !== "static" ||
|
1334
|
+
const o = this.A.left - s.left, n = this.A.top - s.top;
|
1335
|
+
getComputedStyle(this.element).position !== "static" || o === 0 && n === 0 || (this.element.style.position = "relative"), o !== 0 && (this.element.style.left = o + "px"), n !== 0 && (this.element.style.top = n + "px");
|
1336
1336
|
}
|
1337
1337
|
}
|
1338
1338
|
const t = this.j(this.options.keyframeOptions);
|
@@ -1370,14 +1370,14 @@ class fi extends we {
|
|
1370
1370
|
N(t, e, i) {
|
1371
1371
|
t = { ...t }, e = { ...e };
|
1372
1372
|
const s = i.map((a) => a.animatingProperties).filter((a) => a !== void 0);
|
1373
|
-
let
|
1373
|
+
let o = 1, n = 1;
|
1374
1374
|
return s.length > 0 && (s.forEach((a) => {
|
1375
|
-
a.width && (
|
1376
|
-
}), t.left !== void 0 && e.left !== void 0 && (t.left =
|
1375
|
+
a.width && (o /= a.width), a.height && (n /= a.height);
|
1376
|
+
}), t.left !== void 0 && e.left !== void 0 && (t.left = o * t.left, e.left = o * e.left), t.top !== void 0 && e.top !== void 0 && (t.top = n * t.top, e.top = n * e.top)), { from: t, to: e };
|
1377
1377
|
}
|
1378
1378
|
calculateKeyframes(t, e, i = !1) {
|
1379
|
-
const s = {},
|
1380
|
-
let
|
1379
|
+
const s = {}, o = {};
|
1380
|
+
let n = !1;
|
1381
1381
|
const a = {};
|
1382
1382
|
for (const c in e) {
|
1383
1383
|
const l = t[c], h = e[c];
|
@@ -1385,10 +1385,10 @@ class fi extends we {
|
|
1385
1385
|
const d = ut[c];
|
1386
1386
|
if (l === void 0 || h === void 0) continue;
|
1387
1387
|
const u = d(l, h);
|
1388
|
-
u.transform !== void 0 && (a[c] = u.value,
|
1389
|
-
} else l !== h && l !== void 0 && h !== void 0 && (
|
1388
|
+
u.transform !== void 0 && (a[c] = u.value, n = !0, s.transform = `${s.transform ?? ""} ${u.transform}`, u.overrideFrom !== void 0 && Object.assign(s, u.overrideFrom));
|
1389
|
+
} else l !== h && l !== void 0 && h !== void 0 && (n = !0, s[c] = l, o[c] = h);
|
1390
1390
|
}
|
1391
|
-
return s.transformOrigin =
|
1391
|
+
return s.transformOrigin = o.transformOrigin = i ? "center center" : "top left", this.animatingProperties = a, n ? [s, o] : void 0;
|
1392
1392
|
}
|
1393
1393
|
async animate(t, e = this.options.keyframeOptions) {
|
1394
1394
|
this.start(), this.frames = t;
|
@@ -1430,22 +1430,22 @@ const re = Ot(class extends ye {
|
|
1430
1430
|
update(r, [t]) {
|
1431
1431
|
var i, s;
|
1432
1432
|
if (this.st === void 0) {
|
1433
|
-
this.st = /* @__PURE__ */ new Set(), r.strings !== void 0 && (this.nt = new Set(r.strings.join(" ").split(/\s/).filter((
|
1434
|
-
for (const
|
1433
|
+
this.st = /* @__PURE__ */ new Set(), r.strings !== void 0 && (this.nt = new Set(r.strings.join(" ").split(/\s/).filter((o) => o !== "")));
|
1434
|
+
for (const o in t) t[o] && !((i = this.nt) != null && i.has(o)) && this.st.add(o);
|
1435
1435
|
return this.render(t);
|
1436
1436
|
}
|
1437
1437
|
const e = r.element.classList;
|
1438
|
-
for (const
|
1439
|
-
for (const
|
1440
|
-
const
|
1441
|
-
|
1438
|
+
for (const o of this.st) o in t || (e.remove(o), this.st.delete(o));
|
1439
|
+
for (const o in t) {
|
1440
|
+
const n = !!t[o];
|
1441
|
+
n === this.st.has(o) || (s = this.nt) != null && s.has(o) || (n ? (e.add(o), this.st.add(o)) : (e.remove(o), this.st.delete(o)));
|
1442
1442
|
}
|
1443
1443
|
return I;
|
1444
1444
|
}
|
1445
1445
|
}), w = (r, t, e) => {
|
1446
1446
|
r && e.style.setProperty(t, r);
|
1447
1447
|
}, $e = (r, t) => {
|
1448
|
-
var e, i, s,
|
1448
|
+
var e, i, s, o, n, a, c, l, h;
|
1449
1449
|
w((e = r.colors) == null ? void 0 : e.primaryBackground, "--primary-background", t), w(
|
1450
1450
|
(i = r.colors) == null ? void 0 : i.textOnPrimaryBackground,
|
1451
1451
|
"--text-on-primary-background",
|
@@ -1455,11 +1455,11 @@ const re = Ot(class extends ye {
|
|
1455
1455
|
"--secondary-background",
|
1456
1456
|
t
|
1457
1457
|
), w(
|
1458
|
-
(
|
1458
|
+
(o = r.colors) == null ? void 0 : o.textOnSecondaryBackground,
|
1459
1459
|
"--text-on-secondary-background",
|
1460
1460
|
t
|
1461
1461
|
), w(
|
1462
|
-
(
|
1462
|
+
(n = r.colors) == null ? void 0 : n.interactiveDestructiveBackground,
|
1463
1463
|
"--destructive-color",
|
1464
1464
|
t
|
1465
1465
|
), w(
|
@@ -1484,7 +1484,7 @@ const re = Ot(class extends ye {
|
|
1484
1484
|
const _e = () => new vi();
|
1485
1485
|
class vi {
|
1486
1486
|
}
|
1487
|
-
const pt = /* @__PURE__ */ new WeakMap(),
|
1487
|
+
const pt = /* @__PURE__ */ new WeakMap(), xe = Ot(class extends we {
|
1488
1488
|
render(r) {
|
1489
1489
|
return p;
|
1490
1490
|
}
|
@@ -1512,13 +1512,13 @@ const pt = /* @__PURE__ */ new WeakMap(), Ae = Ot(class extends we {
|
|
1512
1512
|
}
|
1513
1513
|
});
|
1514
1514
|
var yi = Object.defineProperty, K = (r, t, e, i) => {
|
1515
|
-
for (var s = void 0,
|
1516
|
-
(
|
1515
|
+
for (var s = void 0, o = r.length - 1, n; o >= 0; o--)
|
1516
|
+
(n = r[o]) && (s = n(t, e, s) || s);
|
1517
1517
|
return s && yi(t, e, s), s;
|
1518
1518
|
};
|
1519
|
-
const Tt = class Tt extends
|
1519
|
+
const Tt = class Tt extends x {
|
1520
1520
|
constructor() {
|
1521
|
-
super(...arguments), this.active = !1, this.triggerVisible = !0, this.loaded = !1, this.containerRef = _e(), this.widgetActive$ = new
|
1521
|
+
super(...arguments), this.active = !1, this.triggerVisible = !0, this.loaded = !1, this.containerRef = _e(), this.widgetActive$ = new xt(!1), this.componentIsDestroyed$ = new _t();
|
1522
1522
|
}
|
1523
1523
|
async connectedCallback() {
|
1524
1524
|
super.connectedCallback(), this.icon = await this._renderSymbol(), this.loaded = !0, this._applyBranding();
|
@@ -1563,8 +1563,8 @@ const Tt = class Tt extends A {
|
|
1563
1563
|
const i = (l = this.application) == null ? void 0 : l.triggerIcon;
|
1564
1564
|
if (!i)
|
1565
1565
|
return p;
|
1566
|
-
const s = async (h) => mi, { type:
|
1567
|
-
switch (
|
1566
|
+
const s = async (h) => mi, { type: o, content: n } = i;
|
1567
|
+
switch (o) {
|
1568
1568
|
case "Telia": {
|
1569
1569
|
const h = await s();
|
1570
1570
|
return h ? T`<telia-icon
|
@@ -1590,7 +1590,7 @@ const Tt = class Tt extends A {
|
|
1590
1590
|
"trigger-container": !0,
|
1591
1591
|
hidden: !this.triggerVisible
|
1592
1592
|
})}
|
1593
|
-
${
|
1593
|
+
${xe(this.containerRef)}
|
1594
1594
|
>
|
1595
1595
|
${!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) ? T`
|
1596
1596
|
<button
|
@@ -1798,8 +1798,8 @@ K([
|
|
1798
1798
|
L()
|
1799
1799
|
], b.prototype, "icon");
|
1800
1800
|
var bi = Object.defineProperty, E = (r, t, e, i) => {
|
1801
|
-
for (var s = void 0,
|
1802
|
-
(
|
1801
|
+
for (var s = void 0, o = r.length - 1, n; o >= 0; o--)
|
1802
|
+
(n = r[o]) && (s = n(t, e, s) || s);
|
1803
1803
|
return s && bi(t, e, s), s;
|
1804
1804
|
};
|
1805
1805
|
const wi = (r) => {
|
@@ -1858,7 +1858,7 @@ const wi = (r) => {
|
|
1858
1858
|
], t.prototype, "application"), E([
|
1859
1859
|
m({ attribute: !1 })
|
1860
1860
|
], t.prototype, "parent"), t;
|
1861
|
-
}, Rt = class Rt extends wi(
|
1861
|
+
}, Rt = class Rt extends wi(x) {
|
1862
1862
|
render() {
|
1863
1863
|
return T`Non resolved component`;
|
1864
1864
|
}
|
@@ -1903,7 +1903,7 @@ let _i = class extends Event {
|
|
1903
1903
|
* Copyright 2021 Google LLC
|
1904
1904
|
* SPDX-License-Identifier: BSD-3-Clause
|
1905
1905
|
*/
|
1906
|
-
class
|
1906
|
+
class xi {
|
1907
1907
|
get value() {
|
1908
1908
|
return this.o;
|
1909
1909
|
}
|
@@ -1936,30 +1936,30 @@ class Ai {
|
|
1936
1936
|
* Copyright 2021 Google LLC
|
1937
1937
|
* SPDX-License-Identifier: BSD-3-Clause
|
1938
1938
|
*/
|
1939
|
-
let
|
1939
|
+
let Ai = class extends Event {
|
1940
1940
|
constructor(t, e) {
|
1941
1941
|
super("context-provider", { bubbles: !0, composed: !0 }), this.context = t, this.contextTarget = e;
|
1942
1942
|
}
|
1943
1943
|
};
|
1944
|
-
class
|
1944
|
+
class oe extends xi {
|
1945
1945
|
constructor(t, e, i) {
|
1946
|
-
var s,
|
1947
|
-
super(e.context !== void 0 ? e.initialValue : i), this.onContextRequest = (
|
1948
|
-
if (
|
1949
|
-
const a =
|
1950
|
-
a !== this.host && (
|
1951
|
-
}, this.onProviderRequest = (
|
1952
|
-
if (
|
1946
|
+
var s, o;
|
1947
|
+
super(e.context !== void 0 ? e.initialValue : i), this.onContextRequest = (n) => {
|
1948
|
+
if (n.context !== this.context) return;
|
1949
|
+
const a = n.contextTarget ?? n.composedPath()[0];
|
1950
|
+
a !== this.host && (n.stopPropagation(), this.addCallback(n.callback, a, n.subscribe));
|
1951
|
+
}, this.onProviderRequest = (n) => {
|
1952
|
+
if (n.context !== this.context || (n.contextTarget ?? n.composedPath()[0]) === this.host) return;
|
1953
1953
|
const a = /* @__PURE__ */ new Set();
|
1954
1954
|
for (const [c, { consumerHost: l }] of this.subscriptions) a.has(c) || (a.add(c), l.dispatchEvent(new _i(this.context, l, c, !0)));
|
1955
|
-
|
1956
|
-
}, this.host = t, e.context !== void 0 ? this.context = e.context : this.context = e, this.attachListeners(), (
|
1955
|
+
n.stopPropagation();
|
1956
|
+
}, this.host = t, e.context !== void 0 ? this.context = e.context : this.context = e, this.attachListeners(), (o = (s = this.host).addController) == null || o.call(s, this);
|
1957
1957
|
}
|
1958
1958
|
attachListeners() {
|
1959
1959
|
this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest);
|
1960
1960
|
}
|
1961
1961
|
hostConnected() {
|
1962
|
-
this.host.dispatchEvent(new
|
1962
|
+
this.host.dispatchEvent(new Ai(this.context, this.host));
|
1963
1963
|
}
|
1964
1964
|
}
|
1965
1965
|
/**
|
@@ -1971,47 +1971,47 @@ function Ci({ context: r }) {
|
|
1971
1971
|
return (t, e) => {
|
1972
1972
|
const i = /* @__PURE__ */ new WeakMap();
|
1973
1973
|
if (typeof e == "object") return e.addInitializer(function() {
|
1974
|
-
i.set(this, new
|
1974
|
+
i.set(this, new oe(this, { context: r }));
|
1975
1975
|
}), { get() {
|
1976
1976
|
return t.get.call(this);
|
1977
1977
|
}, set(s) {
|
1978
|
-
var
|
1979
|
-
return (
|
1978
|
+
var o;
|
1979
|
+
return (o = i.get(this)) == null || o.setValue(s), t.set.call(this, s);
|
1980
1980
|
}, init(s) {
|
1981
|
-
var
|
1982
|
-
return (
|
1981
|
+
var o;
|
1982
|
+
return (o = i.get(this)) == null || o.setValue(s), s;
|
1983
1983
|
} };
|
1984
1984
|
{
|
1985
|
-
t.constructor.addInitializer((
|
1986
|
-
i.set(
|
1985
|
+
t.constructor.addInitializer((n) => {
|
1986
|
+
i.set(n, new oe(n, { context: r }));
|
1987
1987
|
});
|
1988
1988
|
const s = Object.getOwnPropertyDescriptor(t, e);
|
1989
|
-
let
|
1989
|
+
let o;
|
1990
1990
|
if (s === void 0) {
|
1991
|
-
const
|
1992
|
-
|
1993
|
-
return
|
1991
|
+
const n = /* @__PURE__ */ new WeakMap();
|
1992
|
+
o = { get() {
|
1993
|
+
return n.get(this);
|
1994
1994
|
}, set(a) {
|
1995
|
-
i.get(this).setValue(a),
|
1995
|
+
i.get(this).setValue(a), n.set(this, a);
|
1996
1996
|
}, configurable: !0, enumerable: !0 };
|
1997
1997
|
} else {
|
1998
|
-
const
|
1999
|
-
|
2000
|
-
i.get(this).setValue(a),
|
1998
|
+
const n = s.set;
|
1999
|
+
o = { ...s, set(a) {
|
2000
|
+
i.get(this).setValue(a), n == null || n.call(this, a);
|
2001
2001
|
} };
|
2002
2002
|
}
|
2003
|
-
return void Object.defineProperty(t, e,
|
2003
|
+
return void Object.defineProperty(t, e, o);
|
2004
2004
|
}
|
2005
2005
|
};
|
2006
2006
|
}
|
2007
|
-
var Si = Object.defineProperty,
|
2008
|
-
for (var s = void 0,
|
2009
|
-
(
|
2007
|
+
var Si = Object.defineProperty, Ae = (r, t, e, i) => {
|
2008
|
+
for (var s = void 0, o = r.length - 1, n; o >= 0; o--)
|
2009
|
+
(n = r[o]) && (s = n(t, e, s) || s);
|
2010
2010
|
return s && Si(t, e, s), s;
|
2011
2011
|
};
|
2012
|
-
const Ei = "application", Nt = class Nt extends
|
2012
|
+
const Ei = "application", Nt = class Nt extends x {
|
2013
2013
|
constructor() {
|
2014
|
-
super(...arguments), this.nodes = [], this.wrapperRef = _e(), this.fullscreen = !1, this.isReady = new
|
2014
|
+
super(...arguments), this.nodes = [], this.wrapperRef = _e(), this.fullscreen = !1, this.isReady = new xt(!1);
|
2015
2015
|
}
|
2016
2016
|
addChild(t) {
|
2017
2017
|
t.parent = this, this.nodes.push(t);
|
@@ -2036,8 +2036,8 @@ const Ei = "application", Nt = class Nt extends A {
|
|
2036
2036
|
render() {
|
2037
2037
|
var i, s;
|
2038
2038
|
const t = this.application.settings.components.conversation;
|
2039
|
-
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"), T`<div class="widget-container" ${
|
2040
|
-
${$i(this.nodes, (
|
2039
|
+
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"), T`<div class="widget-container" ${xe(this.wrapperRef)}>
|
2040
|
+
${$i(this.nodes, (o) => o)}
|
2041
2041
|
</div>`;
|
2042
2042
|
}
|
2043
2043
|
};
|
@@ -2057,7 +2057,20 @@ Nt.styles = U`
|
|
2057
2057
|
--gray-color: #f3f3f8;
|
2058
2058
|
--white-color: #fff;
|
2059
2059
|
--gray-dark-color: #a6a6a6;
|
2060
|
-
|
2060
|
+
|
2061
|
+
--text-weak: #00000070;
|
2062
|
+
--text-medium: #0000009E;
|
2063
|
+
--text-default: #000000CC
|
2064
|
+
--text-weak-negative: #FFFFFF5E;
|
2065
|
+
--text-medium-negative: #FFFFFFA8;
|
2066
|
+
--text-default-negative: #FFFFFFF2;
|
2067
|
+
|
2068
|
+
--border-color-weak: #00000029;
|
2069
|
+
--border-color-medium: #00000054;
|
2070
|
+
--border-color-strong: #0000008a;
|
2071
|
+
--border-color-weak-negative: #ffffff29;
|
2072
|
+
--border-color-medium-negative: #ffffff54;
|
2073
|
+
--border-color-strong-negative: #ffffff8a;
|
2061
2074
|
|
2062
2075
|
--box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
|
2063
2076
|
--border-radius: var(--spacing-sm);
|
@@ -2195,10 +2208,10 @@ Nt.styles = U`
|
|
2195
2208
|
}
|
2196
2209
|
`;
|
2197
2210
|
let N = Nt;
|
2198
|
-
|
2211
|
+
Ae([
|
2199
2212
|
m({ attribute: !0 })
|
2200
2213
|
], N.prototype, "fullscreen");
|
2201
|
-
|
2214
|
+
Ae([
|
2202
2215
|
m({ attribute: !1 }),
|
2203
2216
|
Ci({ context: Ei })
|
2204
2217
|
], N.prototype, "application");
|
@@ -2238,8 +2251,8 @@ class Pi {
|
|
2238
2251
|
// views
|
2239
2252
|
));
|
2240
2253
|
});
|
2241
|
-
}, { entry:
|
2242
|
-
return s(this, this.root, [
|
2254
|
+
}, { entry: o, components: n } = t;
|
2255
|
+
return s(this, this.root, [o], n), this.root;
|
2243
2256
|
}
|
2244
2257
|
createRoot() {
|
2245
2258
|
return typeof window < "u" && (window.customElements.get("ace-wrapper") || window.customElements.define("ace-wrapper", N)), document.createElement("ace-wrapper");
|
@@ -2300,8 +2313,8 @@ class Oi {
|
|
2300
2313
|
}
|
2301
2314
|
const s = i.category;
|
2302
2315
|
if (this.policy[s]) {
|
2303
|
-
const
|
2304
|
-
this.storage.setItem(this._prefixKey(t), JSON.stringify(
|
2316
|
+
const o = { value: e, category: s };
|
2317
|
+
this.storage.setItem(this._prefixKey(t), JSON.stringify(o));
|
2305
2318
|
} else
|
2306
2319
|
console.warn(
|
2307
2320
|
`Storage policy does not allow storing items in category: ${s}`
|
@@ -2358,7 +2371,7 @@ class Ii {
|
|
2358
2371
|
return this.texts.get(t) || e;
|
2359
2372
|
}
|
2360
2373
|
}
|
2361
|
-
const ki = "
|
2374
|
+
const ki = "1.1.114-rc.1";
|
2362
2375
|
class Ti {
|
2363
2376
|
constructor(t) {
|
2364
2377
|
this.widget = t, this.name = t.name;
|
@@ -2382,8 +2395,8 @@ class Ti {
|
|
2382
2395
|
}
|
2383
2396
|
}
|
2384
2397
|
class Ri {
|
2385
|
-
constructor(t, e, i, s,
|
2386
|
-
this.id = t, this.name = e, this.container = i, this.settings = s, this.options =
|
2398
|
+
constructor(t, e, i, s, o) {
|
2399
|
+
this.id = t, this.name = e, this.container = i, this.settings = s, this.options = o, this.platform = new Pi(), this.texts = new Ii(), 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 Ti(this), this.onMessageReceived = async (a) => {
|
2387
2400
|
var l;
|
2388
2401
|
const c = a.data;
|
2389
2402
|
switch (c.type) {
|
@@ -2432,7 +2445,7 @@ class Ri {
|
|
2432
2445
|
return;
|
2433
2446
|
}
|
2434
2447
|
}, this.renderStrategy = this.options.renderStrategy || $.Inline, this.triggerIcon = this.options.triggerIcon;
|
2435
|
-
const
|
2448
|
+
const n = {
|
2436
2449
|
[y.Necessary]: !0,
|
2437
2450
|
[y.Functional]: !0,
|
2438
2451
|
[y.Analytics]: !0
|
@@ -2440,9 +2453,9 @@ class Ri {
|
|
2440
2453
|
this.storage = new Oi(
|
2441
2454
|
this.id,
|
2442
2455
|
"sessionStorage",
|
2443
|
-
|
2456
|
+
n,
|
2444
2457
|
this.settings.storage
|
2445
|
-
), typeof
|
2458
|
+
), typeof o.autoActivate == "boolean" && (this.autoActivate = o.autoActivate), o.anchor && (this.anchor = o.anchor), this.container.register("$settings", s), this.texts.loadTexts(s.texts || {}), window.addEventListener("message", this.onMessageReceived);
|
2446
2459
|
}
|
2447
2460
|
async activate() {
|
2448
2461
|
if (await this.loadPlugins(), await this.componentResolver.loadComponents(), this.root = this.platform.createComponentModel(this.settings, this), this.container.setState(de.Ready), this.autoActivate) {
|
@@ -2543,13 +2556,13 @@ const Vi = (r) => new W(r), st = class st {
|
|
2543
2556
|
id: i.id,
|
2544
2557
|
triggers: i.triggers || [],
|
2545
2558
|
apps: (i.widgets || []).map((s) => {
|
2546
|
-
let
|
2547
|
-
s.renderStrategy.toLowerCase() === "inline" && (
|
2548
|
-
const
|
2559
|
+
let o = $.Trigger;
|
2560
|
+
s.renderStrategy.toLowerCase() === "inline" && (o = $.Inline);
|
2561
|
+
const n = 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";
|
2549
2562
|
return {
|
2550
|
-
id:
|
2551
|
-
widgetId:
|
2552
|
-
renderStrategy:
|
2563
|
+
id: n,
|
2564
|
+
widgetId: n,
|
2565
|
+
renderStrategy: o,
|
2553
2566
|
autoActivate: a,
|
2554
2567
|
anchor: c,
|
2555
2568
|
triggerIcon: {
|
@@ -2578,12 +2591,12 @@ class Ni {
|
|
2578
2591
|
var i;
|
2579
2592
|
(((i = this.site.environment) == null ? void 0 : i.applications) || []).forEach((s) => {
|
2580
2593
|
if (s.storage) {
|
2581
|
-
const
|
2594
|
+
const o = {
|
2582
2595
|
[y.Analytics]: t.includes("analytics"),
|
2583
2596
|
[y.Necessary]: t.includes("necessary"),
|
2584
2597
|
[y.Functional]: t.includes("functional")
|
2585
2598
|
};
|
2586
|
-
s.storage.updatePolicy(
|
2599
|
+
s.storage.updatePolicy(o);
|
2587
2600
|
}
|
2588
2601
|
});
|
2589
2602
|
}
|
@@ -2596,7 +2609,7 @@ class Ni {
|
|
2596
2609
|
}
|
2597
2610
|
class Mi {
|
2598
2611
|
constructor() {
|
2599
|
-
this.applications = [], this.container = new
|
2612
|
+
this.applications = [], this.container = new Bt("environment", this), this.bootstrapped = !1, this.site = null, this.widgetAPIHandlers = /* @__PURE__ */ new Map(), this.siteConfigurationHandlers = [], setTimeout(() => {
|
2600
2613
|
this.notifyWidgetsOfCreation();
|
2601
2614
|
}, 1e3);
|
2602
2615
|
}
|
@@ -2616,13 +2629,13 @@ class Mi {
|
|
2616
2629
|
(i) => i.autoActivate
|
2617
2630
|
);
|
2618
2631
|
(((e = this.site) == null ? void 0 : e.triggers) || []).filter((i) => i.triggerType === "visit").forEach((i) => {
|
2619
|
-
const s = window.location.pathname,
|
2620
|
-
i.condition.type === "url" &&
|
2621
|
-
const a =
|
2622
|
-
if ((
|
2632
|
+
const s = window.location.pathname, o = i.condition.outputs || [];
|
2633
|
+
i.condition.type === "url" && o.forEach((n) => {
|
2634
|
+
const a = n.action.type === "render_widget";
|
2635
|
+
if ((n.value === s || n.value === "*") && a) {
|
2623
2636
|
let l = { widgetId: "" };
|
2624
2637
|
try {
|
2625
|
-
l = JSON.parse(
|
2638
|
+
l = JSON.parse(n.action.data);
|
2626
2639
|
} catch {
|
2627
2640
|
l = {
|
2628
2641
|
widgetId: ""
|
@@ -2662,16 +2675,16 @@ class Mi {
|
|
2662
2675
|
if (!i) {
|
2663
2676
|
const s = this.widgetAPIHandlers.get(t) || [];
|
2664
2677
|
s.push(() => {
|
2665
|
-
const
|
2666
|
-
e(
|
2678
|
+
const o = this.applications.find((n) => n.name === t);
|
2679
|
+
e(o == null ? void 0 : o.api);
|
2667
2680
|
}), this.widgetAPIHandlers.set(t, s);
|
2668
2681
|
return;
|
2669
2682
|
}
|
2670
2683
|
e(i == null ? void 0 : i.api);
|
2671
2684
|
}
|
2672
2685
|
registerApp(t, e, i, s) {
|
2673
|
-
const
|
2674
|
-
this.applications.push(
|
2686
|
+
const o = new Bt(e, this), n = new Ri(t, e, o, i, s);
|
2687
|
+
this.applications.push(n);
|
2675
2688
|
}
|
2676
2689
|
registerSite(t) {
|
2677
2690
|
this.site = t;
|
@@ -2739,11 +2752,11 @@ class Ui {
|
|
2739
2752
|
}
|
2740
2753
|
}
|
2741
2754
|
var Li = Object.defineProperty, It = (r, t, e, i) => {
|
2742
|
-
for (var s = void 0,
|
2743
|
-
(
|
2755
|
+
for (var s = void 0, o = r.length - 1, n; o >= 0; o--)
|
2756
|
+
(n = r[o]) && (s = n(t, e, s) || s);
|
2744
2757
|
return s && Li(t, e, s), s;
|
2745
2758
|
};
|
2746
|
-
const Mt = class Mt extends
|
2759
|
+
const Mt = class Mt extends x {
|
2747
2760
|
constructor() {
|
2748
2761
|
super(), this.status = "deactivated", this.addEventListener("environment-created", this.onEnvironmentCreated);
|
2749
2762
|
}
|
@@ -2804,7 +2817,7 @@ const Wi = async (r, t, e = {}) => {
|
|
2804
2817
|
export {
|
2805
2818
|
M as AceWidget,
|
2806
2819
|
Ri as Application,
|
2807
|
-
|
2820
|
+
Bt as Container,
|
2808
2821
|
Mi as Environment,
|
2809
2822
|
W as HttpClient,
|
2810
2823
|
Ui as Site,
|