@telia-ace/widget-core-flamingo 1.1.72-rc.22 → 1.1.72-rc.24
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +21 -21
- package/index.mjs +311 -287
- package/models/site.d.ts +2 -1
- package/package.json +1 -1
- package/types.d.ts +16 -0
package/index.mjs
CHANGED
@@ -27,31 +27,31 @@ function mt(s) {
|
|
27
27
|
};
|
28
28
|
throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
29
29
|
}
|
30
|
-
function
|
30
|
+
function J(s, t) {
|
31
31
|
var e = typeof Symbol == "function" && s[Symbol.iterator];
|
32
32
|
if (!e)
|
33
33
|
return s;
|
34
|
-
var i = e.call(s), r,
|
34
|
+
var i = e.call(s), r, n = [], o;
|
35
35
|
try {
|
36
36
|
for (; (t === void 0 || t-- > 0) && !(r = i.next()).done; )
|
37
|
-
|
37
|
+
n.push(r.value);
|
38
38
|
} catch (a) {
|
39
|
-
|
39
|
+
o = { error: a };
|
40
40
|
} finally {
|
41
41
|
try {
|
42
42
|
r && !r.done && (e = i.return) && e.call(i);
|
43
43
|
} finally {
|
44
|
-
if (
|
45
|
-
throw
|
44
|
+
if (o)
|
45
|
+
throw o.error;
|
46
46
|
}
|
47
47
|
}
|
48
|
-
return
|
48
|
+
return n;
|
49
49
|
}
|
50
|
-
function
|
50
|
+
function G(s, t, e) {
|
51
51
|
if (e || arguments.length === 2)
|
52
|
-
for (var i = 0, r = t.length,
|
53
|
-
(
|
54
|
-
return s.concat(
|
52
|
+
for (var i = 0, r = t.length, n; i < r; i++)
|
53
|
+
(n || !(i in t)) && (n || (n = Array.prototype.slice.call(t, 0, i)), n[i] = t[i]);
|
54
|
+
return s.concat(n || Array.prototype.slice.call(t));
|
55
55
|
}
|
56
56
|
function w(s) {
|
57
57
|
return typeof s == "function";
|
@@ -62,7 +62,7 @@ function Qt(s) {
|
|
62
62
|
}, e = s(t);
|
63
63
|
return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
|
64
64
|
}
|
65
|
-
var
|
65
|
+
var ot = Qt(function(s) {
|
66
66
|
return function(e) {
|
67
67
|
s(this), this.message = e ? e.length + ` errors occurred during unsubscription:
|
68
68
|
` + e.map(function(i, r) {
|
@@ -82,14 +82,14 @@ var it = function() {
|
|
82
82
|
this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
|
83
83
|
}
|
84
84
|
return s.prototype.unsubscribe = function() {
|
85
|
-
var t, e, i, r,
|
85
|
+
var t, e, i, r, n;
|
86
86
|
if (!this.closed) {
|
87
87
|
this.closed = !0;
|
88
|
-
var
|
89
|
-
if (
|
90
|
-
if (this._parentage = null, Array.isArray(
|
88
|
+
var o = this._parentage;
|
89
|
+
if (o)
|
90
|
+
if (this._parentage = null, Array.isArray(o))
|
91
91
|
try {
|
92
|
-
for (var a = mt(
|
92
|
+
for (var a = mt(o), c = a.next(); !c.done; c = a.next()) {
|
93
93
|
var h = c.value;
|
94
94
|
h.remove(this);
|
95
95
|
}
|
@@ -104,39 +104,39 @@ var it = function() {
|
|
104
104
|
}
|
105
105
|
}
|
106
106
|
else
|
107
|
-
|
107
|
+
o.remove(this);
|
108
108
|
var l = this.initialTeardown;
|
109
109
|
if (w(l))
|
110
110
|
try {
|
111
111
|
l();
|
112
112
|
} catch (v) {
|
113
|
-
|
113
|
+
n = v instanceof ot ? v.errors : [v];
|
114
114
|
}
|
115
115
|
var d = this._finalizers;
|
116
116
|
if (d) {
|
117
117
|
this._finalizers = null;
|
118
118
|
try {
|
119
|
-
for (var
|
120
|
-
var g =
|
119
|
+
for (var p = mt(d), f = p.next(); !f.done; f = p.next()) {
|
120
|
+
var g = f.value;
|
121
121
|
try {
|
122
122
|
Pt(g);
|
123
123
|
} catch (v) {
|
124
|
-
|
124
|
+
n = n ?? [], v instanceof ot ? n = G(G([], J(n)), J(v.errors)) : n.push(v);
|
125
125
|
}
|
126
126
|
}
|
127
127
|
} catch (v) {
|
128
128
|
i = { error: v };
|
129
129
|
} finally {
|
130
130
|
try {
|
131
|
-
|
131
|
+
f && !f.done && (r = p.return) && r.call(p);
|
132
132
|
} finally {
|
133
133
|
if (i)
|
134
134
|
throw i.error;
|
135
135
|
}
|
136
136
|
}
|
137
137
|
}
|
138
|
-
if (
|
139
|
-
throw new
|
138
|
+
if (n)
|
139
|
+
throw new ot(n);
|
140
140
|
}
|
141
141
|
}, s.prototype.add = function(t) {
|
142
142
|
var e;
|
@@ -185,7 +185,7 @@ var ie = {
|
|
185
185
|
for (var e = [], i = 2; i < arguments.length; i++)
|
186
186
|
e[i - 2] = arguments[i];
|
187
187
|
var r = yt.delegate;
|
188
|
-
return r != null && r.setTimeout ? r.setTimeout.apply(r,
|
188
|
+
return r != null && r.setTimeout ? r.setTimeout.apply(r, G([s, t], J(e))) : setTimeout.apply(void 0, G([s, t], J(e)));
|
189
189
|
},
|
190
190
|
clearTimeout: function(s) {
|
191
191
|
var t = yt.delegate;
|
@@ -272,24 +272,24 @@ var Ae = function() {
|
|
272
272
|
}(), bt = function(s) {
|
273
273
|
W(t, s);
|
274
274
|
function t(e, i, r) {
|
275
|
-
var
|
275
|
+
var n = s.call(this) || this, o;
|
276
276
|
if (w(e) || !e)
|
277
|
-
|
277
|
+
o = {
|
278
278
|
next: e ?? void 0,
|
279
279
|
error: i ?? void 0,
|
280
280
|
complete: r ?? void 0
|
281
281
|
};
|
282
282
|
else {
|
283
283
|
var a;
|
284
|
-
|
285
|
-
return
|
286
|
-
},
|
284
|
+
n && ie.useDeprecatedNextContext ? (a = Object.create(e), a.unsubscribe = function() {
|
285
|
+
return n.unsubscribe();
|
286
|
+
}, o = {
|
287
287
|
next: e.next && at(e.next, a),
|
288
288
|
error: e.error && at(e.error, a),
|
289
289
|
complete: e.complete && at(e.complete, a)
|
290
|
-
}) :
|
290
|
+
}) : o = e;
|
291
291
|
}
|
292
|
-
return
|
292
|
+
return n.destination = new Ae(o), n;
|
293
293
|
}
|
294
294
|
return t;
|
295
295
|
}(se);
|
@@ -325,11 +325,11 @@ var Tt = function() {
|
|
325
325
|
var e = new s();
|
326
326
|
return e.source = this, e.operator = t, e;
|
327
327
|
}, s.prototype.subscribe = function(t, e, i) {
|
328
|
-
var r = this,
|
328
|
+
var r = this, n = Te(t) ? t : new bt(t, e, i);
|
329
329
|
return K(function() {
|
330
|
-
var
|
331
|
-
|
332
|
-
}),
|
330
|
+
var o = r, a = o.operator, c = o.source;
|
331
|
+
n.add(a ? a.call(n, c) : c ? r._subscribe(n) : r._trySubscribe(n));
|
332
|
+
}), n;
|
333
333
|
}, s.prototype._trySubscribe = function(t) {
|
334
334
|
try {
|
335
335
|
return this._subscribe(t);
|
@@ -338,19 +338,19 @@ var Tt = function() {
|
|
338
338
|
}
|
339
339
|
}, s.prototype.forEach = function(t, e) {
|
340
340
|
var i = this;
|
341
|
-
return e = It(e), new e(function(r,
|
342
|
-
var
|
341
|
+
return e = It(e), new e(function(r, n) {
|
342
|
+
var o = new bt({
|
343
343
|
next: function(a) {
|
344
344
|
try {
|
345
345
|
t(a);
|
346
346
|
} catch (c) {
|
347
|
-
|
347
|
+
n(c), o.unsubscribe();
|
348
348
|
}
|
349
349
|
},
|
350
|
-
error:
|
350
|
+
error: n,
|
351
351
|
complete: r
|
352
352
|
});
|
353
|
-
i.subscribe(
|
353
|
+
i.subscribe(o);
|
354
354
|
});
|
355
355
|
}, s.prototype._subscribe = function(t) {
|
356
356
|
var e;
|
@@ -364,13 +364,13 @@ var Tt = function() {
|
|
364
364
|
}, s.prototype.toPromise = function(t) {
|
365
365
|
var e = this;
|
366
366
|
return t = It(t), new t(function(i, r) {
|
367
|
-
var
|
368
|
-
e.subscribe(function(
|
369
|
-
return
|
370
|
-
}, function(
|
371
|
-
return r(
|
367
|
+
var n;
|
368
|
+
e.subscribe(function(o) {
|
369
|
+
return n = o;
|
370
|
+
}, function(o) {
|
371
|
+
return r(o);
|
372
372
|
}, function() {
|
373
|
-
return i(
|
373
|
+
return i(n);
|
374
374
|
});
|
375
375
|
});
|
376
376
|
}, s.create = function(t) {
|
@@ -406,11 +406,11 @@ var Ie = Qt(function(s) {
|
|
406
406
|
}, t.prototype.next = function(e) {
|
407
407
|
var i = this;
|
408
408
|
K(function() {
|
409
|
-
var r,
|
409
|
+
var r, n;
|
410
410
|
if (i._throwIfClosed(), !i.isStopped) {
|
411
411
|
i.currentObservers || (i.currentObservers = Array.from(i.observers));
|
412
412
|
try {
|
413
|
-
for (var
|
413
|
+
for (var o = mt(i.currentObservers), a = o.next(); !a.done; a = o.next()) {
|
414
414
|
var c = a.value;
|
415
415
|
c.next(e);
|
416
416
|
}
|
@@ -418,7 +418,7 @@ var Ie = Qt(function(s) {
|
|
418
418
|
r = { error: h };
|
419
419
|
} finally {
|
420
420
|
try {
|
421
|
-
a && !a.done && (
|
421
|
+
a && !a.done && (n = o.return) && n.call(o);
|
422
422
|
} finally {
|
423
423
|
if (r)
|
424
424
|
throw r.error;
|
@@ -458,13 +458,13 @@ var Ie = Qt(function(s) {
|
|
458
458
|
}, t.prototype._subscribe = function(e) {
|
459
459
|
return this._throwIfClosed(), this._checkFinalizedStatuses(e), this._innerSubscribe(e);
|
460
460
|
}, t.prototype._innerSubscribe = function(e) {
|
461
|
-
var i = this, r = this,
|
462
|
-
return
|
461
|
+
var i = this, r = this, n = r.hasError, o = r.isStopped, a = r.observers;
|
462
|
+
return n || o ? te : (this.currentObservers = null, a.push(e), new it(function() {
|
463
463
|
i.currentObservers = null, vt(a, e);
|
464
464
|
}));
|
465
465
|
}, t.prototype._checkFinalizedStatuses = function(e) {
|
466
|
-
var i = this, r = i.hasError,
|
467
|
-
r ? e.error(
|
466
|
+
var i = this, r = i.hasError, n = i.thrownError, o = i.isStopped;
|
467
|
+
r ? e.error(n) : o && e.complete();
|
468
468
|
}, t.prototype.asObservable = function() {
|
469
469
|
var e = new Tt();
|
470
470
|
return e.source = this, e;
|
@@ -506,14 +506,14 @@ var Ie = Qt(function(s) {
|
|
506
506
|
var i = s.prototype._subscribe.call(this, e);
|
507
507
|
return !i.closed && e.next(this._value), i;
|
508
508
|
}, t.prototype.getValue = function() {
|
509
|
-
var e = this, i = e.hasError, r = e.thrownError,
|
509
|
+
var e = this, i = e.hasError, r = e.thrownError, n = e._value;
|
510
510
|
if (i)
|
511
511
|
throw r;
|
512
|
-
return this._throwIfClosed(),
|
512
|
+
return this._throwIfClosed(), n;
|
513
513
|
}, t.prototype.next = function(e) {
|
514
514
|
s.prototype.next.call(this, this._value = e);
|
515
515
|
}, t;
|
516
|
-
}($t),
|
516
|
+
}($t), ne = /* @__PURE__ */ ((s) => (s.Loading = "loading", s.Ready = "ready", s))(ne || {});
|
517
517
|
class kt {
|
518
518
|
constructor(t, e) {
|
519
519
|
this.state = new re(
|
@@ -540,7 +540,7 @@ class kt {
|
|
540
540
|
* SPDX-License-Identifier: BSD-3-Clause
|
541
541
|
*/
|
542
542
|
const Z = globalThis, wt = Z.ShadowRoot && (Z.ShadyCSS === void 0 || Z.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, _t = Symbol(), Nt = /* @__PURE__ */ new WeakMap();
|
543
|
-
let
|
543
|
+
let oe = class {
|
544
544
|
constructor(t, e, i) {
|
545
545
|
if (this._$cssResult$ = !0, i !== _t)
|
546
546
|
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
@@ -559,15 +559,15 @@ let ne = class {
|
|
559
559
|
return this.cssText;
|
560
560
|
}
|
561
561
|
};
|
562
|
-
const Re = (s) => new
|
563
|
-
const e = s.length === 1 ? s[0] : t.reduce((i, r,
|
564
|
-
if (
|
565
|
-
return
|
566
|
-
if (typeof
|
567
|
-
return
|
568
|
-
throw Error("Value passed to 'css' function must be a 'css' function result: " +
|
569
|
-
})(r) + s[
|
570
|
-
return new
|
562
|
+
const Re = (s) => new oe(typeof s == "string" ? s : s + "", void 0, _t), N = (s, ...t) => {
|
563
|
+
const e = s.length === 1 ? s[0] : t.reduce((i, r, n) => i + ((o) => {
|
564
|
+
if (o._$cssResult$ === !0)
|
565
|
+
return o.cssText;
|
566
|
+
if (typeof o == "number")
|
567
|
+
return o;
|
568
|
+
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.");
|
569
|
+
})(r) + s[n + 1], s[0]);
|
570
|
+
return new oe(e, s, _t);
|
571
571
|
}, ke = (s, t) => {
|
572
572
|
if (wt)
|
573
573
|
s.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
@@ -587,10 +587,10 @@ const Re = (s) => new ne(typeof s == "string" ? s : s + "", void 0, _t), N = (s,
|
|
587
587
|
* Copyright 2017 Google LLC
|
588
588
|
* SPDX-License-Identifier: BSD-3-Clause
|
589
589
|
*/
|
590
|
-
const { is: Ne, defineProperty: Ue, getOwnPropertyDescriptor:
|
590
|
+
const { is: Ne, defineProperty: Ue, getOwnPropertyDescriptor: Me, getOwnPropertyNames: je, getOwnPropertySymbols: He, getPrototypeOf: Le } = Object, C = globalThis, Mt = C.trustedTypes, De = Mt ? Mt.emptyScript : "", ct = C.reactiveElementPolyfillSupport, j = (s, t) => s, X = { toAttribute(s, t) {
|
591
591
|
switch (t) {
|
592
592
|
case Boolean:
|
593
|
-
s = s ?
|
593
|
+
s = s ? De : null;
|
594
594
|
break;
|
595
595
|
case Object:
|
596
596
|
case Array:
|
@@ -615,7 +615,7 @@ const { is: Ne, defineProperty: Ue, getOwnPropertyDescriptor: je, getOwnProperty
|
|
615
615
|
}
|
616
616
|
}
|
617
617
|
return e;
|
618
|
-
} }, At = (s, t) => !Ne(s, t),
|
618
|
+
} }, At = (s, t) => !Ne(s, t), jt = { attribute: !0, type: String, converter: X, reflect: !1, hasChanged: At };
|
619
619
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), C.litPropertyMetadata ?? (C.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
620
620
|
let I = class extends HTMLElement {
|
621
621
|
static addInitializer(t) {
|
@@ -624,39 +624,39 @@ let I = class extends HTMLElement {
|
|
624
624
|
static get observedAttributes() {
|
625
625
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
626
626
|
}
|
627
|
-
static createProperty(t, e =
|
627
|
+
static createProperty(t, e = jt) {
|
628
628
|
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
629
629
|
const i = Symbol(), r = this.getPropertyDescriptor(t, i, e);
|
630
630
|
r !== void 0 && Ue(this.prototype, t, r);
|
631
631
|
}
|
632
632
|
}
|
633
633
|
static getPropertyDescriptor(t, e, i) {
|
634
|
-
const { get: r, set:
|
634
|
+
const { get: r, set: n } = Me(this.prototype, t) ?? { get() {
|
635
635
|
return this[e];
|
636
|
-
}, set(
|
637
|
-
this[e] =
|
636
|
+
}, set(o) {
|
637
|
+
this[e] = o;
|
638
638
|
} };
|
639
639
|
return { get() {
|
640
640
|
return r == null ? void 0 : r.call(this);
|
641
|
-
}, set(
|
641
|
+
}, set(o) {
|
642
642
|
const a = r == null ? void 0 : r.call(this);
|
643
|
-
|
643
|
+
n.call(this, o), this.requestUpdate(t, a, i);
|
644
644
|
}, configurable: !0, enumerable: !0 };
|
645
645
|
}
|
646
646
|
static getPropertyOptions(t) {
|
647
|
-
return this.elementProperties.get(t) ??
|
647
|
+
return this.elementProperties.get(t) ?? jt;
|
648
648
|
}
|
649
649
|
static _$Ei() {
|
650
|
-
if (this.hasOwnProperty(
|
650
|
+
if (this.hasOwnProperty(j("elementProperties")))
|
651
651
|
return;
|
652
652
|
const t = Le(this);
|
653
653
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
654
654
|
}
|
655
655
|
static finalize() {
|
656
|
-
if (this.hasOwnProperty(
|
656
|
+
if (this.hasOwnProperty(j("finalized")))
|
657
657
|
return;
|
658
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
659
|
-
const e = this.properties, i = [...
|
658
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(j("properties"))) {
|
659
|
+
const e = this.properties, i = [...je(e), ...He(e)];
|
660
660
|
for (const r of i)
|
661
661
|
this.createProperty(r, e[r]);
|
662
662
|
}
|
@@ -733,19 +733,19 @@ let I = class extends HTMLElement {
|
|
733
733
|
this._$AK(t, i);
|
734
734
|
}
|
735
735
|
_$EC(t, e) {
|
736
|
-
var
|
736
|
+
var n;
|
737
737
|
const i = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, i);
|
738
738
|
if (r !== void 0 && i.reflect === !0) {
|
739
|
-
const
|
740
|
-
this._$Em = t,
|
739
|
+
const o = (((n = i.converter) == null ? void 0 : n.toAttribute) !== void 0 ? i.converter : X).toAttribute(e, i.type);
|
740
|
+
this._$Em = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$Em = null;
|
741
741
|
}
|
742
742
|
}
|
743
743
|
_$AK(t, e) {
|
744
|
-
var
|
744
|
+
var n;
|
745
745
|
const i = this.constructor, r = i._$Eh.get(t);
|
746
746
|
if (r !== void 0 && this._$Em !== r) {
|
747
|
-
const
|
748
|
-
this._$Em = r, this[r] = a.fromAttribute(e,
|
747
|
+
const o = i.getPropertyOptions(r), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? o.converter : X;
|
748
|
+
this._$Em = r, this[r] = a.fromAttribute(e, o.type), this._$Em = null;
|
749
749
|
}
|
750
750
|
}
|
751
751
|
requestUpdate(t, e, i) {
|
@@ -778,21 +778,21 @@ let I = class extends HTMLElement {
|
|
778
778
|
return;
|
779
779
|
if (!this.hasUpdated) {
|
780
780
|
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
781
|
-
for (const [
|
782
|
-
this[
|
781
|
+
for (const [n, o] of this._$Ep)
|
782
|
+
this[n] = o;
|
783
783
|
this._$Ep = void 0;
|
784
784
|
}
|
785
785
|
const r = this.constructor.elementProperties;
|
786
786
|
if (r.size > 0)
|
787
|
-
for (const [
|
788
|
-
|
787
|
+
for (const [n, o] of r)
|
788
|
+
o.wrapped !== !0 || this._$AL.has(n) || this[n] === void 0 || this.P(n, this[n], o);
|
789
789
|
}
|
790
790
|
let t = !1;
|
791
791
|
const e = this._$AL;
|
792
792
|
try {
|
793
793
|
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (i = this._$EO) == null || i.forEach((r) => {
|
794
|
-
var
|
795
|
-
return (
|
794
|
+
var n;
|
795
|
+
return (n = r.hostUpdate) == null ? void 0 : n.call(r);
|
796
796
|
}), this.update(e)) : this._$EU();
|
797
797
|
} catch (r) {
|
798
798
|
throw t = !1, this._$EU(), r;
|
@@ -828,15 +828,15 @@ let I = class extends HTMLElement {
|
|
828
828
|
firstUpdated(t) {
|
829
829
|
}
|
830
830
|
};
|
831
|
-
I.elementStyles = [], I.shadowRootOptions = { mode: "open" }, I[
|
831
|
+
I.elementStyles = [], I.shadowRootOptions = { mode: "open" }, I[j("elementProperties")] = /* @__PURE__ */ new Map(), I[j("finalized")] = /* @__PURE__ */ new Map(), ct == null || ct({ ReactiveElement: I }), (C.reactiveElementVersions ?? (C.reactiveElementVersions = [])).push("2.0.4");
|
832
832
|
/**
|
833
833
|
* @license
|
834
834
|
* Copyright 2017 Google LLC
|
835
835
|
* SPDX-License-Identifier: BSD-3-Clause
|
836
836
|
*/
|
837
|
-
const H = globalThis, Q = H.trustedTypes, Ht = Q ? Q.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, ae = "$lit$", x = `lit$${(Math.random() + "").slice(9)}$`, ce = "?" + x,
|
838
|
-
\f\r]`,
|
839
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
837
|
+
const H = globalThis, Q = H.trustedTypes, Ht = Q ? Q.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, ae = "$lit$", x = `lit$${(Math.random() + "").slice(9)}$`, ce = "?" + x, Be = `<${ce}>`, O = document, D = () => O.createComment(""), B = (s) => s === null || typeof s != "object" && typeof s != "function", he = Array.isArray, ze = (s) => he(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", ht = `[
|
838
|
+
\f\r]`, M = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Lt = /-->/g, Dt = />/g, S = RegExp(`>|${ht}(?:([^\\s"'>=/]+)(${ht}*=${ht}*(?:[^
|
839
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Bt = /'/g, zt = /"/g, le = /^(?:script|style|textarea|title)$/i, We = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), R = We(1), T = Symbol.for("lit-noChange"), u = Symbol.for("lit-nothing"), Wt = /* @__PURE__ */ new WeakMap(), P = O.createTreeWalker(O, 129);
|
840
840
|
function de(s, t) {
|
841
841
|
if (!Array.isArray(s) || !s.hasOwnProperty("raw"))
|
842
842
|
throw Error("invalid template strings array");
|
@@ -844,22 +844,22 @@ function de(s, t) {
|
|
844
844
|
}
|
845
845
|
const Fe = (s, t) => {
|
846
846
|
const e = s.length - 1, i = [];
|
847
|
-
let r,
|
847
|
+
let r, n = t === 2 ? "<svg>" : "", o = M;
|
848
848
|
for (let a = 0; a < e; a++) {
|
849
849
|
const c = s[a];
|
850
|
-
let h, l, d = -1,
|
851
|
-
for (;
|
852
|
-
|
853
|
-
const
|
854
|
-
|
850
|
+
let h, l, d = -1, p = 0;
|
851
|
+
for (; p < c.length && (o.lastIndex = p, l = o.exec(c), l !== null); )
|
852
|
+
p = o.lastIndex, o === M ? l[1] === "!--" ? o = Lt : l[1] !== void 0 ? o = Dt : l[2] !== void 0 ? (le.test(l[2]) && (r = RegExp("</" + l[2], "g")), o = S) : l[3] !== void 0 && (o = S) : o === S ? l[0] === ">" ? (o = r ?? M, d = -1) : l[1] === void 0 ? d = -2 : (d = o.lastIndex - l[2].length, h = l[1], o = l[3] === void 0 ? S : l[3] === '"' ? zt : Bt) : o === zt || o === Bt ? o = S : o === Lt || o === Dt ? o = M : (o = S, r = void 0);
|
853
|
+
const f = o === S && s[a + 1].startsWith("/>") ? " " : "";
|
854
|
+
n += o === M ? c + Be : d >= 0 ? (i.push(h), c.slice(0, d) + ae + c.slice(d) + x + f) : c + x + (d === -2 ? a : f);
|
855
855
|
}
|
856
|
-
return [de(s,
|
856
|
+
return [de(s, n + (s[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
|
857
857
|
};
|
858
858
|
class z {
|
859
859
|
constructor({ strings: t, _$litType$: e }, i) {
|
860
860
|
let r;
|
861
861
|
this.parts = [];
|
862
|
-
let
|
862
|
+
let n = 0, o = 0;
|
863
863
|
const a = t.length - 1, c = this.parts, [h, l] = Fe(t, e);
|
864
864
|
if (this.el = z.createElement(h, i), P.currentNode = this.el.content, e === 2) {
|
865
865
|
const d = this.el.content.firstChild;
|
@@ -870,28 +870,28 @@ class z {
|
|
870
870
|
if (r.hasAttributes())
|
871
871
|
for (const d of r.getAttributeNames())
|
872
872
|
if (d.endsWith(ae)) {
|
873
|
-
const
|
874
|
-
c.push({ type: 1, index:
|
873
|
+
const p = l[o++], f = r.getAttribute(d).split(x), g = /([.?@])?(.*)/.exec(p);
|
874
|
+
c.push({ type: 1, index: n, name: g[2], strings: f, ctor: g[1] === "." ? Ye : g[1] === "?" ? qe : g[1] === "@" ? Ke : st }), r.removeAttribute(d);
|
875
875
|
} else
|
876
|
-
d.startsWith(x) && (c.push({ type: 6, index:
|
876
|
+
d.startsWith(x) && (c.push({ type: 6, index: n }), r.removeAttribute(d));
|
877
877
|
if (le.test(r.tagName)) {
|
878
|
-
const d = r.textContent.split(x),
|
879
|
-
if (
|
878
|
+
const d = r.textContent.split(x), p = d.length - 1;
|
879
|
+
if (p > 0) {
|
880
880
|
r.textContent = Q ? Q.emptyScript : "";
|
881
|
-
for (let
|
882
|
-
r.append(d[
|
883
|
-
r.append(d[
|
881
|
+
for (let f = 0; f < p; f++)
|
882
|
+
r.append(d[f], D()), P.nextNode(), c.push({ type: 2, index: ++n });
|
883
|
+
r.append(d[p], D());
|
884
884
|
}
|
885
885
|
}
|
886
886
|
} else if (r.nodeType === 8)
|
887
887
|
if (r.data === ce)
|
888
|
-
c.push({ type: 2, index:
|
888
|
+
c.push({ type: 2, index: n });
|
889
889
|
else {
|
890
890
|
let d = -1;
|
891
891
|
for (; (d = r.data.indexOf(x, d + 1)) !== -1; )
|
892
|
-
c.push({ type: 7, index:
|
892
|
+
c.push({ type: 7, index: n }), d += x.length - 1;
|
893
893
|
}
|
894
|
-
|
894
|
+
n++;
|
895
895
|
}
|
896
896
|
}
|
897
897
|
static createElement(t, e) {
|
@@ -900,12 +900,12 @@ class z {
|
|
900
900
|
}
|
901
901
|
}
|
902
902
|
function k(s, t, e = s, i) {
|
903
|
-
var
|
903
|
+
var o, a;
|
904
904
|
if (t === T)
|
905
905
|
return t;
|
906
|
-
let r = i !== void 0 ? (
|
907
|
-
const
|
908
|
-
return (r == null ? void 0 : r.constructor) !==
|
906
|
+
let r = i !== void 0 ? (o = e._$Co) == null ? void 0 : o[i] : e._$Cl;
|
907
|
+
const n = B(t) ? void 0 : t._$litDirective$;
|
908
|
+
return (r == null ? void 0 : r.constructor) !== n && ((a = r == null ? void 0 : r._$AO) == null || a.call(r, !1), n === void 0 ? r = void 0 : (r = new n(s), r._$AT(s, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = r : e._$Cl = r), r !== void 0 && (t = k(s, r._$AS(s, t.values), r, i)), t;
|
909
909
|
}
|
910
910
|
class Ve {
|
911
911
|
constructor(t, e) {
|
@@ -920,13 +920,13 @@ class Ve {
|
|
920
920
|
u(t) {
|
921
921
|
const { el: { content: e }, parts: i } = this._$AD, r = ((t == null ? void 0 : t.creationScope) ?? O).importNode(e, !0);
|
922
922
|
P.currentNode = r;
|
923
|
-
let
|
923
|
+
let n = P.nextNode(), o = 0, a = 0, c = i[0];
|
924
924
|
for (; c !== void 0; ) {
|
925
|
-
if (
|
925
|
+
if (o === c.index) {
|
926
926
|
let h;
|
927
|
-
c.type === 2 ? h = new F(
|
927
|
+
c.type === 2 ? h = new F(n, n.nextSibling, this, t) : c.type === 1 ? h = new c.ctor(n, c.name, c.strings, this, t) : c.type === 6 && (h = new Ze(n, this, t)), this._$AV.push(h), c = i[++a];
|
928
928
|
}
|
929
|
-
|
929
|
+
o !== (c == null ? void 0 : c.index) && (n = P.nextNode(), o++);
|
930
930
|
}
|
931
931
|
return P.currentNode = O, r;
|
932
932
|
}
|
@@ -942,7 +942,7 @@ class F {
|
|
942
942
|
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
943
943
|
}
|
944
944
|
constructor(t, e, i, r) {
|
945
|
-
this.type = 2, this._$AH =
|
945
|
+
this.type = 2, this._$AH = u, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = r, this._$Cv = (r == null ? void 0 : r.isConnected) ?? !0;
|
946
946
|
}
|
947
947
|
get parentNode() {
|
948
948
|
let t = this._$AA.parentNode;
|
@@ -956,7 +956,7 @@ class F {
|
|
956
956
|
return this._$AB;
|
957
957
|
}
|
958
958
|
_$AI(t, e = this) {
|
959
|
-
t = k(this, t, e),
|
959
|
+
t = k(this, t, e), B(t) ? t === u || t == null || t === "" ? (this._$AH !== u && this._$AR(), this._$AH = u) : t !== this._$AH && t !== T && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : ze(t) ? this.k(t) : this._(t);
|
960
960
|
}
|
961
961
|
S(t) {
|
962
962
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
@@ -965,16 +965,16 @@ class F {
|
|
965
965
|
this._$AH !== t && (this._$AR(), this._$AH = this.S(t));
|
966
966
|
}
|
967
967
|
_(t) {
|
968
|
-
this._$AH !==
|
968
|
+
this._$AH !== u && B(this._$AH) ? this._$AA.nextSibling.data = t : this.T(O.createTextNode(t)), this._$AH = t;
|
969
969
|
}
|
970
970
|
$(t) {
|
971
|
-
var
|
971
|
+
var n;
|
972
972
|
const { values: e, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = z.createElement(de(i.h, i.h[0]), this.options)), i);
|
973
|
-
if (((
|
973
|
+
if (((n = this._$AH) == null ? void 0 : n._$AD) === r)
|
974
974
|
this._$AH.p(e);
|
975
975
|
else {
|
976
|
-
const
|
977
|
-
|
976
|
+
const o = new Ve(r, this), a = o.u(this.options);
|
977
|
+
o.p(e), this.T(a), this._$AH = o;
|
978
978
|
}
|
979
979
|
}
|
980
980
|
_$AC(t) {
|
@@ -985,8 +985,8 @@ class F {
|
|
985
985
|
he(this._$AH) || (this._$AH = [], this._$AR());
|
986
986
|
const e = this._$AH;
|
987
987
|
let i, r = 0;
|
988
|
-
for (const
|
989
|
-
r === e.length ? e.push(i = new F(this.S(
|
988
|
+
for (const n of t)
|
989
|
+
r === e.length ? e.push(i = new F(this.S(D()), this.S(D()), this, this.options)) : i = e[r], i._$AI(n), r++;
|
990
990
|
r < e.length && (this._$AR(i && i._$AB.nextSibling, r), e.length = r);
|
991
991
|
}
|
992
992
|
_$AR(t = this._$AA.nextSibling, e) {
|
@@ -1008,24 +1008,24 @@ class st {
|
|
1008
1008
|
get _$AU() {
|
1009
1009
|
return this._$AM._$AU;
|
1010
1010
|
}
|
1011
|
-
constructor(t, e, i, r,
|
1012
|
-
this.type = 1, this._$AH =
|
1011
|
+
constructor(t, e, i, r, n) {
|
1012
|
+
this.type = 1, this._$AH = u, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = n, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = u;
|
1013
1013
|
}
|
1014
1014
|
_$AI(t, e = this, i, r) {
|
1015
|
-
const
|
1016
|
-
let
|
1017
|
-
if (
|
1018
|
-
t = k(this, t, e, 0),
|
1015
|
+
const n = this.strings;
|
1016
|
+
let o = !1;
|
1017
|
+
if (n === void 0)
|
1018
|
+
t = k(this, t, e, 0), o = !B(t) || t !== this._$AH && t !== T, o && (this._$AH = t);
|
1019
1019
|
else {
|
1020
1020
|
const a = t;
|
1021
1021
|
let c, h;
|
1022
|
-
for (t =
|
1023
|
-
h = k(this, a[i + c], e, c), h === T && (h = this._$AH[c]),
|
1022
|
+
for (t = n[0], c = 0; c < n.length - 1; c++)
|
1023
|
+
h = k(this, a[i + c], e, c), h === T && (h = this._$AH[c]), o || (o = !B(h) || h !== this._$AH[c]), h === u ? t = u : t !== u && (t += (h ?? "") + n[c + 1]), this._$AH[c] = h;
|
1024
1024
|
}
|
1025
|
-
|
1025
|
+
o && !r && this.j(t);
|
1026
1026
|
}
|
1027
1027
|
j(t) {
|
1028
|
-
t ===
|
1028
|
+
t === u ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
1029
1029
|
}
|
1030
1030
|
}
|
1031
1031
|
class Ye extends st {
|
@@ -1033,7 +1033,7 @@ class Ye extends st {
|
|
1033
1033
|
super(...arguments), this.type = 3;
|
1034
1034
|
}
|
1035
1035
|
j(t) {
|
1036
|
-
this.element[this.name] = t ===
|
1036
|
+
this.element[this.name] = t === u ? void 0 : t;
|
1037
1037
|
}
|
1038
1038
|
}
|
1039
1039
|
class qe extends st {
|
@@ -1041,18 +1041,18 @@ class qe extends st {
|
|
1041
1041
|
super(...arguments), this.type = 4;
|
1042
1042
|
}
|
1043
1043
|
j(t) {
|
1044
|
-
this.element.toggleAttribute(this.name, !!t && t !==
|
1044
|
+
this.element.toggleAttribute(this.name, !!t && t !== u);
|
1045
1045
|
}
|
1046
1046
|
}
|
1047
1047
|
class Ke extends st {
|
1048
|
-
constructor(t, e, i, r,
|
1049
|
-
super(t, e, i, r,
|
1048
|
+
constructor(t, e, i, r, n) {
|
1049
|
+
super(t, e, i, r, n), this.type = 5;
|
1050
1050
|
}
|
1051
1051
|
_$AI(t, e = this) {
|
1052
|
-
if ((t = k(this, t, e, 0) ??
|
1052
|
+
if ((t = k(this, t, e, 0) ?? u) === T)
|
1053
1053
|
return;
|
1054
|
-
const i = this._$AH, r = t ===
|
1055
|
-
r && this.element.removeEventListener(this.name, this, i),
|
1054
|
+
const i = this._$AH, r = t === u && i !== u || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, n = t !== u && (i === u || r);
|
1055
|
+
r && this.element.removeEventListener(this.name, this, i), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
1056
1056
|
}
|
1057
1057
|
handleEvent(t) {
|
1058
1058
|
var e;
|
@@ -1072,12 +1072,12 @@ class Ze {
|
|
1072
1072
|
}
|
1073
1073
|
const lt = H.litHtmlPolyfillSupport;
|
1074
1074
|
lt == null || lt(z, F), (H.litHtmlVersions ?? (H.litHtmlVersions = [])).push("3.1.2");
|
1075
|
-
const
|
1075
|
+
const Je = (s, t, e) => {
|
1076
1076
|
const i = (e == null ? void 0 : e.renderBefore) ?? t;
|
1077
1077
|
let r = i._$litPart$;
|
1078
1078
|
if (r === void 0) {
|
1079
|
-
const
|
1080
|
-
i._$litPart$ = r = new F(t.insertBefore(
|
1079
|
+
const n = (e == null ? void 0 : e.renderBefore) ?? null;
|
1080
|
+
i._$litPart$ = r = new F(t.insertBefore(D(), n), n, void 0, e ?? {});
|
1081
1081
|
}
|
1082
1082
|
return r._$AI(s), r;
|
1083
1083
|
};
|
@@ -1097,7 +1097,7 @@ let _ = class extends I {
|
|
1097
1097
|
}
|
1098
1098
|
update(t) {
|
1099
1099
|
const e = this.render();
|
1100
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do =
|
1100
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Je(e, this.renderRoot, this.renderOptions);
|
1101
1101
|
}
|
1102
1102
|
connectedCallback() {
|
1103
1103
|
var t;
|
@@ -1121,31 +1121,31 @@ dt == null || dt({ LitElement: _ });
|
|
1121
1121
|
* Copyright 2017 Google LLC
|
1122
1122
|
* SPDX-License-Identifier: BSD-3-Clause
|
1123
1123
|
*/
|
1124
|
-
const
|
1124
|
+
const Ge = { attribute: !0, type: String, converter: X, reflect: !1, hasChanged: At }, Xe = (s = Ge, t, e) => {
|
1125
1125
|
const { kind: i, metadata: r } = e;
|
1126
|
-
let
|
1127
|
-
if (
|
1128
|
-
const { name:
|
1126
|
+
let n = globalThis.litPropertyMetadata.get(r);
|
1127
|
+
if (n === void 0 && globalThis.litPropertyMetadata.set(r, n = /* @__PURE__ */ new Map()), n.set(e.name, s), i === "accessor") {
|
1128
|
+
const { name: o } = e;
|
1129
1129
|
return { set(a) {
|
1130
1130
|
const c = t.get.call(this);
|
1131
|
-
t.set.call(this, a), this.requestUpdate(
|
1131
|
+
t.set.call(this, a), this.requestUpdate(o, c, s);
|
1132
1132
|
}, init(a) {
|
1133
|
-
return a !== void 0 && this.P(
|
1133
|
+
return a !== void 0 && this.P(o, void 0, s), a;
|
1134
1134
|
} };
|
1135
1135
|
}
|
1136
1136
|
if (i === "setter") {
|
1137
|
-
const { name:
|
1137
|
+
const { name: o } = e;
|
1138
1138
|
return function(a) {
|
1139
|
-
const c = this[
|
1140
|
-
t.call(this, a), this.requestUpdate(
|
1139
|
+
const c = this[o];
|
1140
|
+
t.call(this, a), this.requestUpdate(o, c, s);
|
1141
1141
|
};
|
1142
1142
|
}
|
1143
1143
|
throw Error("Unsupported decorator location: " + i);
|
1144
1144
|
};
|
1145
1145
|
function m(s) {
|
1146
|
-
return (t, e) => typeof e == "object" ? Xe(s, t, e) : ((i, r,
|
1147
|
-
const
|
1148
|
-
return r.constructor.createProperty(
|
1146
|
+
return (t, e) => typeof e == "object" ? Xe(s, t, e) : ((i, r, n) => {
|
1147
|
+
const o = r.hasOwnProperty(n);
|
1148
|
+
return r.constructor.createProperty(n, o ? { ...i, wrapped: !0 } : i), o ? Object.getOwnPropertyDescriptor(r, n) : void 0;
|
1149
1149
|
})(s, t, e);
|
1150
1150
|
}
|
1151
1151
|
/**
|
@@ -1157,8 +1157,8 @@ function U(s) {
|
|
1157
1157
|
return m({ ...s, state: !0, attribute: !1 });
|
1158
1158
|
}
|
1159
1159
|
var Qe = Object.defineProperty, ti = Object.getOwnPropertyDescriptor, ei = (s, t, e, i) => {
|
1160
|
-
for (var r = i > 1 ? void 0 : i ? ti(t, e) : t,
|
1161
|
-
(
|
1160
|
+
for (var r = i > 1 ? void 0 : i ? ti(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
1161
|
+
(o = s[n]) && (r = (i ? o(t, e, r) : o(r)) || r);
|
1162
1162
|
return i && r && Qe(t, e, r), r;
|
1163
1163
|
};
|
1164
1164
|
class rt extends _ {
|
@@ -1170,7 +1170,7 @@ class rt extends _ {
|
|
1170
1170
|
return (e = this.shadowRoot) == null || e.appendChild(t), t;
|
1171
1171
|
}
|
1172
1172
|
render() {
|
1173
|
-
return this.anchor === "BottomLeft" ? this.renderRoot.host.classList.add("bottom-left") : this.anchor === "BottomRight" && this.renderRoot.host.classList.add("bottom-right"),
|
1173
|
+
return this.anchor === "BottomLeft" ? this.renderRoot.host.classList.add("bottom-left") : this.anchor === "BottomRight" && this.renderRoot.host.classList.add("bottom-right"), u;
|
1174
1174
|
}
|
1175
1175
|
}
|
1176
1176
|
rt.styles = [
|
@@ -1250,7 +1250,7 @@ const L = (s, t) => {
|
|
1250
1250
|
t._$AN = e = /* @__PURE__ */ new Set();
|
1251
1251
|
else if (e.has(s))
|
1252
1252
|
break;
|
1253
|
-
e.add(s),
|
1253
|
+
e.add(s), ni(t);
|
1254
1254
|
}
|
1255
1255
|
};
|
1256
1256
|
function si(s) {
|
@@ -1261,14 +1261,14 @@ function ri(s, t = !1, e = 0) {
|
|
1261
1261
|
if (r !== void 0 && r.size !== 0)
|
1262
1262
|
if (t)
|
1263
1263
|
if (Array.isArray(i))
|
1264
|
-
for (let
|
1265
|
-
L(i[
|
1264
|
+
for (let n = e; n < i.length; n++)
|
1265
|
+
L(i[n], !1), tt(i[n]);
|
1266
1266
|
else
|
1267
1267
|
i != null && (L(i, !1), tt(i));
|
1268
1268
|
else
|
1269
1269
|
L(this, s);
|
1270
1270
|
}
|
1271
|
-
const
|
1271
|
+
const ni = (s) => {
|
1272
1272
|
s.type == xt.CHILD && (s._$AP ?? (s._$AP = ri), s._$AQ ?? (s._$AQ = si));
|
1273
1273
|
};
|
1274
1274
|
class fe extends pe {
|
@@ -1295,7 +1295,7 @@ class fe extends pe {
|
|
1295
1295
|
reconnected() {
|
1296
1296
|
}
|
1297
1297
|
}
|
1298
|
-
const
|
1298
|
+
const oi = /* @__PURE__ */ new WeakMap();
|
1299
1299
|
let Ft = 0;
|
1300
1300
|
const pt = /* @__PURE__ */ new Map(), Vt = /* @__PURE__ */ new WeakSet(), Yt = () => new Promise((s) => requestAnimationFrame(s)), ai = [{ transform: "translateX(100%) scale(0)", opacity: 0 }], qt = (s, t) => {
|
1301
1301
|
const e = s - t;
|
@@ -1337,10 +1337,10 @@ class li extends fe {
|
|
1337
1337
|
(t = this.l) == null || t.call(this), this.l = void 0;
|
1338
1338
|
}
|
1339
1339
|
render(t) {
|
1340
|
-
return
|
1340
|
+
return u;
|
1341
1341
|
}
|
1342
1342
|
getController() {
|
1343
|
-
return
|
1343
|
+
return oi.get(this.u);
|
1344
1344
|
}
|
1345
1345
|
isDisabled() {
|
1346
1346
|
var t;
|
@@ -1349,7 +1349,7 @@ class li extends fe {
|
|
1349
1349
|
update(t, [e]) {
|
1350
1350
|
var r;
|
1351
1351
|
const i = this.u === void 0;
|
1352
|
-
return i && (this.u = (r = t.options) == null ? void 0 : r.host, this.u.addController(this), this.u.updateComplete.then((
|
1352
|
+
return i && (this.u = (r = t.options) == null ? void 0 : r.host, this.u.addController(this), this.u.updateComplete.then((n) => this.t = !0), this.element = t.element, Zt.set(this.element, this)), this.optionsOrCallback = e, (i || typeof e != "function") && this.p(e), this.render(e);
|
1353
1353
|
}
|
1354
1354
|
p(t) {
|
1355
1355
|
t = t ?? {};
|
@@ -1359,15 +1359,15 @@ class li extends fe {
|
|
1359
1359
|
m() {
|
1360
1360
|
const t = {}, e = this.element.getBoundingClientRect(), i = getComputedStyle(this.element);
|
1361
1361
|
return this.options.properties.forEach((r) => {
|
1362
|
-
const
|
1363
|
-
t[r] = isNaN(
|
1362
|
+
const n = e[r] ?? (ut[r] ? void 0 : i[r]), o = Number(n);
|
1363
|
+
t[r] = isNaN(o) ? n + "" : o;
|
1364
1364
|
}), t;
|
1365
1365
|
}
|
1366
1366
|
v() {
|
1367
1367
|
let t, e = !0;
|
1368
1368
|
return this.options.guard && (t = this.options.guard(), e = ((i, r) => {
|
1369
1369
|
if (Array.isArray(i)) {
|
1370
|
-
if (Array.isArray(r) && r.length === i.length && i.every((
|
1370
|
+
if (Array.isArray(r) && r.length === i.length && i.every((n, o) => n === r[o]))
|
1371
1371
|
return !1;
|
1372
1372
|
} else if (r === i)
|
1373
1373
|
return !1;
|
@@ -1384,14 +1384,14 @@ class li extends fe {
|
|
1384
1384
|
this.prepare(), await Yt;
|
1385
1385
|
const e = this.O(), i = this.j(this.options.keyframeOptions, e), r = this.m();
|
1386
1386
|
if (this.A !== void 0) {
|
1387
|
-
const { from:
|
1388
|
-
this.log("measured", [this.A, r,
|
1387
|
+
const { from: n, to: o } = this.N(this.A, r, e);
|
1388
|
+
this.log("measured", [this.A, r, n, o]), t = this.calculateKeyframes(n, o);
|
1389
1389
|
} else {
|
1390
|
-
const
|
1391
|
-
if (
|
1390
|
+
const n = pt.get(this.options.inId);
|
1391
|
+
if (n) {
|
1392
1392
|
pt.delete(this.options.inId);
|
1393
|
-
const { from:
|
1394
|
-
t = this.calculateKeyframes(
|
1393
|
+
const { from: o, to: a } = this.N(n, r, e);
|
1394
|
+
t = this.calculateKeyframes(o, a), t = this.options.in ? [{ ...this.options.in[0], ...t[0] }, ...this.options.in.slice(1), t[1]] : t, Ft++, t.forEach((c) => c.zIndex = Ft);
|
1395
1395
|
} else
|
1396
1396
|
this.options.in && (t = [...this.options.in, {}]);
|
1397
1397
|
}
|
@@ -1415,8 +1415,8 @@ class li extends fe {
|
|
1415
1415
|
if (this.i.insertBefore(this.element, i), this.options.stabilizeOut) {
|
1416
1416
|
const r = this.m();
|
1417
1417
|
this.log("stabilizing out");
|
1418
|
-
const
|
1419
|
-
getComputedStyle(this.element).position !== "static" ||
|
1418
|
+
const n = this.A.left - r.left, o = this.A.top - r.top;
|
1419
|
+
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");
|
1420
1420
|
}
|
1421
1421
|
}
|
1422
1422
|
const t = this.j(this.options.keyframeOptions);
|
@@ -1454,14 +1454,14 @@ class li extends fe {
|
|
1454
1454
|
N(t, e, i) {
|
1455
1455
|
t = { ...t }, e = { ...e };
|
1456
1456
|
const r = i.map((a) => a.animatingProperties).filter((a) => a !== void 0);
|
1457
|
-
let
|
1457
|
+
let n = 1, o = 1;
|
1458
1458
|
return r.length > 0 && (r.forEach((a) => {
|
1459
|
-
a.width && (
|
1460
|
-
}), t.left !== void 0 && e.left !== void 0 && (t.left =
|
1459
|
+
a.width && (n /= a.width), a.height && (o /= a.height);
|
1460
|
+
}), 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 };
|
1461
1461
|
}
|
1462
1462
|
calculateKeyframes(t, e, i = !1) {
|
1463
|
-
const r = {},
|
1464
|
-
let
|
1463
|
+
const r = {}, n = {};
|
1464
|
+
let o = !1;
|
1465
1465
|
const a = {};
|
1466
1466
|
for (const c in e) {
|
1467
1467
|
const h = t[c], l = e[c];
|
@@ -1469,12 +1469,12 @@ class li extends fe {
|
|
1469
1469
|
const d = ut[c];
|
1470
1470
|
if (h === void 0 || l === void 0)
|
1471
1471
|
continue;
|
1472
|
-
const
|
1473
|
-
|
1472
|
+
const p = d(h, l);
|
1473
|
+
p.transform !== void 0 && (a[c] = p.value, o = !0, r.transform = `${r.transform ?? ""} ${p.transform}`, p.overrideFrom !== void 0 && Object.assign(r, p.overrideFrom));
|
1474
1474
|
} else
|
1475
|
-
h !== l && h !== void 0 && l !== void 0 && (
|
1475
|
+
h !== l && h !== void 0 && l !== void 0 && (o = !0, r[c] = h, n[c] = l);
|
1476
1476
|
}
|
1477
|
-
return r.transformOrigin =
|
1477
|
+
return r.transformOrigin = n.transformOrigin = i ? "center center" : "top left", this.animatingProperties = a, o ? [r, n] : void 0;
|
1478
1478
|
}
|
1479
1479
|
async animate(t, e = this.options.keyframeOptions) {
|
1480
1480
|
this.start(), this.frames = t;
|
@@ -1505,7 +1505,7 @@ const di = Ct(li), pi = { name: "question", svg: '<svg viewBox="0 0 64 64" xmlns
|
|
1505
1505
|
* Copyright 2018 Google LLC
|
1506
1506
|
* SPDX-License-Identifier: BSD-3-Clause
|
1507
1507
|
*/
|
1508
|
-
const
|
1508
|
+
const Jt = Ct(class extends pe {
|
1509
1509
|
constructor(s) {
|
1510
1510
|
var t;
|
1511
1511
|
if (super(s), s.type !== xt.ATTRIBUTE || s.name !== "class" || ((t = s.strings) == null ? void 0 : t.length) > 2)
|
@@ -1517,24 +1517,24 @@ const Gt = Ct(class extends pe {
|
|
1517
1517
|
update(s, [t]) {
|
1518
1518
|
var i, r;
|
1519
1519
|
if (this.st === void 0) {
|
1520
|
-
this.st = /* @__PURE__ */ new Set(), s.strings !== void 0 && (this.nt = new Set(s.strings.join(" ").split(/\s/).filter((
|
1521
|
-
for (const
|
1522
|
-
t[
|
1520
|
+
this.st = /* @__PURE__ */ new Set(), s.strings !== void 0 && (this.nt = new Set(s.strings.join(" ").split(/\s/).filter((n) => n !== "")));
|
1521
|
+
for (const n in t)
|
1522
|
+
t[n] && !((i = this.nt) != null && i.has(n)) && this.st.add(n);
|
1523
1523
|
return this.render(t);
|
1524
1524
|
}
|
1525
1525
|
const e = s.element.classList;
|
1526
|
-
for (const
|
1527
|
-
|
1528
|
-
for (const
|
1529
|
-
const
|
1530
|
-
|
1526
|
+
for (const n of this.st)
|
1527
|
+
n in t || (e.remove(n), this.st.delete(n));
|
1528
|
+
for (const n in t) {
|
1529
|
+
const o = !!t[n];
|
1530
|
+
o === this.st.has(n) || (r = this.nt) != null && r.has(n) || (o ? (e.add(n), this.st.add(n)) : (e.remove(n), this.st.delete(n)));
|
1531
1531
|
}
|
1532
1532
|
return T;
|
1533
1533
|
}
|
1534
1534
|
}), b = (s, t, e) => {
|
1535
1535
|
s && e.style.setProperty(t, s);
|
1536
1536
|
}, ge = (s, t) => {
|
1537
|
-
var e, i, r,
|
1537
|
+
var e, i, r, n, o, a, c, h, l;
|
1538
1538
|
b((e = s.colors) == null ? void 0 : e.primaryBackground, "--primary-background", t), b(
|
1539
1539
|
(i = s.colors) == null ? void 0 : i.textOnPrimaryBackground,
|
1540
1540
|
"--text-on-primary-background",
|
@@ -1544,11 +1544,11 @@ const Gt = Ct(class extends pe {
|
|
1544
1544
|
"--secondary-background",
|
1545
1545
|
t
|
1546
1546
|
), b(
|
1547
|
-
(
|
1547
|
+
(n = s.colors) == null ? void 0 : n.textOnSecondaryBackground,
|
1548
1548
|
"--text-on-secondary-background",
|
1549
1549
|
t
|
1550
1550
|
), b(
|
1551
|
-
(
|
1551
|
+
(o = s.colors) == null ? void 0 : o.interactiveDestructiveBackground,
|
1552
1552
|
"--destructive-color",
|
1553
1553
|
t
|
1554
1554
|
), b(
|
@@ -1575,12 +1575,12 @@ class ui {
|
|
1575
1575
|
}
|
1576
1576
|
const ft = /* @__PURE__ */ new WeakMap(), ve = Ct(class extends fe {
|
1577
1577
|
render(s) {
|
1578
|
-
return
|
1578
|
+
return u;
|
1579
1579
|
}
|
1580
1580
|
update(s, [t]) {
|
1581
1581
|
var i;
|
1582
1582
|
const e = t !== this.Y;
|
1583
|
-
return e && this.Y !== void 0 && this.rt(void 0), (e || this.lt !== this.ct) && (this.Y = t, this.ht = (i = s.options) == null ? void 0 : i.host, this.rt(this.ct = s.element)),
|
1583
|
+
return e && this.Y !== void 0 && this.rt(void 0), (e || this.lt !== this.ct) && (this.Y = t, this.ht = (i = s.options) == null ? void 0 : i.host, this.rt(this.ct = s.element)), u;
|
1584
1584
|
}
|
1585
1585
|
rt(s) {
|
1586
1586
|
if (typeof this.Y == "function") {
|
@@ -1602,8 +1602,8 @@ const ft = /* @__PURE__ */ new WeakMap(), ve = Ct(class extends fe {
|
|
1602
1602
|
}
|
1603
1603
|
});
|
1604
1604
|
var fi = Object.defineProperty, gi = Object.getOwnPropertyDescriptor, V = (s, t, e, i) => {
|
1605
|
-
for (var r = i > 1 ? void 0 : i ? gi(t, e) : t,
|
1606
|
-
(
|
1605
|
+
for (var r = i > 1 ? void 0 : i ? gi(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
1606
|
+
(o = s[n]) && (r = (i ? o(t, e, r) : o(r)) || r);
|
1607
1607
|
return i && r && fi(t, e, r), r;
|
1608
1608
|
};
|
1609
1609
|
class A extends _ {
|
@@ -1637,19 +1637,19 @@ class A extends _ {
|
|
1637
1637
|
return R` <img src=${e} class="trigger-icon" alt="" /> `;
|
1638
1638
|
const i = (h = this.application) == null ? void 0 : h.triggerIcon;
|
1639
1639
|
if (!i)
|
1640
|
-
return
|
1641
|
-
const r = async (l) => pi, { type:
|
1642
|
-
switch (
|
1640
|
+
return u;
|
1641
|
+
const r = async (l) => pi, { type: n, content: o } = i;
|
1642
|
+
switch (n) {
|
1643
1643
|
case "Telia": {
|
1644
1644
|
const l = await r();
|
1645
1645
|
return l ? R`<telia-icon
|
1646
1646
|
class="trigger-icon"
|
1647
1647
|
svg=${l.svg}
|
1648
1648
|
size="lg"
|
1649
|
-
></telia-icon>` :
|
1649
|
+
></telia-icon>` : u;
|
1650
1650
|
}
|
1651
1651
|
default:
|
1652
|
-
return
|
1652
|
+
return u;
|
1653
1653
|
}
|
1654
1654
|
}
|
1655
1655
|
hideTrigger() {
|
@@ -1661,7 +1661,7 @@ class A extends _ {
|
|
1661
1661
|
render() {
|
1662
1662
|
var t, e, i, r;
|
1663
1663
|
return R`<div
|
1664
|
-
class=${
|
1664
|
+
class=${Jt({
|
1665
1665
|
"trigger-container": !0,
|
1666
1666
|
hidden: !this.triggerVisible
|
1667
1667
|
})}
|
@@ -1681,11 +1681,11 @@ class A extends _ {
|
|
1681
1681
|
>
|
1682
1682
|
${this.application.settings.branding.other.buttonLabelText}
|
1683
1683
|
</button>
|
1684
|
-
` :
|
1684
|
+
` : u}
|
1685
1685
|
|
1686
1686
|
<button
|
1687
1687
|
label="Widget trigger"
|
1688
|
-
class=${
|
1688
|
+
class=${Jt({
|
1689
1689
|
trigger: !0,
|
1690
1690
|
active: this.active,
|
1691
1691
|
rendered: this.loaded
|
@@ -1872,8 +1872,8 @@ V([
|
|
1872
1872
|
U()
|
1873
1873
|
], A.prototype, "icon", 2);
|
1874
1874
|
var mi = Object.defineProperty, vi = Object.getOwnPropertyDescriptor, E = (s, t, e, i) => {
|
1875
|
-
for (var r = i > 1 ? void 0 : i ? vi(t, e) : t,
|
1876
|
-
(
|
1875
|
+
for (var r = i > 1 ? void 0 : i ? vi(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
1876
|
+
(o = s[n]) && (r = (i ? o(t, e, r) : o(r)) || r);
|
1877
1877
|
return i && r && mi(t, e, r), r;
|
1878
1878
|
};
|
1879
1879
|
const yi = (s) => {
|
@@ -2016,21 +2016,21 @@ let _i = class extends Event {
|
|
2016
2016
|
super("context-provider", { bubbles: !0, composed: !0 }), this.context = t;
|
2017
2017
|
}
|
2018
2018
|
};
|
2019
|
-
class
|
2019
|
+
class Gt extends wi {
|
2020
2020
|
constructor(t, e, i) {
|
2021
|
-
var r,
|
2022
|
-
super(e.context !== void 0 ? e.initialValue : i), this.onContextRequest = (
|
2023
|
-
const a =
|
2024
|
-
|
2025
|
-
}, this.onProviderRequest = (
|
2026
|
-
const a =
|
2027
|
-
if (
|
2021
|
+
var r, n;
|
2022
|
+
super(e.context !== void 0 ? e.initialValue : i), this.onContextRequest = (o) => {
|
2023
|
+
const a = o.composedPath()[0];
|
2024
|
+
o.context === this.context && a !== this.host && (o.stopPropagation(), this.addCallback(o.callback, a, o.subscribe));
|
2025
|
+
}, this.onProviderRequest = (o) => {
|
2026
|
+
const a = o.composedPath()[0];
|
2027
|
+
if (o.context !== this.context || a === this.host)
|
2028
2028
|
return;
|
2029
2029
|
const c = /* @__PURE__ */ new Set();
|
2030
2030
|
for (const [h, { consumerHost: l }] of this.subscriptions)
|
2031
2031
|
c.has(h) || (c.add(h), l.dispatchEvent(new $i(this.context, h, !0)));
|
2032
|
-
|
2033
|
-
}, this.host = t, e.context !== void 0 ? this.context = e.context : this.context = e, this.attachListeners(), (
|
2032
|
+
o.stopPropagation();
|
2033
|
+
}, this.host = t, e.context !== void 0 ? this.context = e.context : this.context = e, this.attachListeners(), (n = (r = this.host).addController) == null || n.call(r, this);
|
2034
2034
|
}
|
2035
2035
|
attachListeners() {
|
2036
2036
|
this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest);
|
@@ -2049,46 +2049,46 @@ function Ai({ context: s }) {
|
|
2049
2049
|
const i = /* @__PURE__ */ new WeakMap();
|
2050
2050
|
if (typeof e == "object")
|
2051
2051
|
return e.addInitializer(function() {
|
2052
|
-
i.set(this, new
|
2052
|
+
i.set(this, new Gt(this, { context: s }));
|
2053
2053
|
}), { get() {
|
2054
2054
|
return t.get.call(this);
|
2055
2055
|
}, set(r) {
|
2056
|
-
var
|
2057
|
-
return (
|
2056
|
+
var n;
|
2057
|
+
return (n = i.get(this)) == null || n.setValue(r), t.set.call(this, r);
|
2058
2058
|
}, init(r) {
|
2059
|
-
var
|
2060
|
-
return (
|
2059
|
+
var n;
|
2060
|
+
return (n = i.get(this)) == null || n.setValue(r), r;
|
2061
2061
|
} };
|
2062
2062
|
{
|
2063
|
-
t.constructor.addInitializer((
|
2064
|
-
i.set(
|
2063
|
+
t.constructor.addInitializer((o) => {
|
2064
|
+
i.set(o, new Gt(o, { context: s }));
|
2065
2065
|
});
|
2066
2066
|
const r = Object.getOwnPropertyDescriptor(t, e);
|
2067
|
-
let
|
2067
|
+
let n;
|
2068
2068
|
if (r === void 0) {
|
2069
|
-
const
|
2070
|
-
|
2071
|
-
return
|
2069
|
+
const o = /* @__PURE__ */ new WeakMap();
|
2070
|
+
n = { get: function() {
|
2071
|
+
return o.get(this);
|
2072
2072
|
}, set: function(a) {
|
2073
|
-
i.get(this).setValue(a),
|
2073
|
+
i.get(this).setValue(a), o.set(this, a);
|
2074
2074
|
}, configurable: !0, enumerable: !0 };
|
2075
2075
|
} else {
|
2076
|
-
const
|
2077
|
-
|
2078
|
-
i.get(this).setValue(a),
|
2076
|
+
const o = r.set;
|
2077
|
+
n = { ...r, set: function(a) {
|
2078
|
+
i.get(this).setValue(a), o == null || o.call(this, a);
|
2079
2079
|
} };
|
2080
2080
|
}
|
2081
|
-
return void Object.defineProperty(t, e,
|
2081
|
+
return void Object.defineProperty(t, e, n);
|
2082
2082
|
}
|
2083
2083
|
};
|
2084
2084
|
}
|
2085
2085
|
var xi = Object.defineProperty, Ci = Object.getOwnPropertyDescriptor, Si = (s, t, e, i) => {
|
2086
|
-
for (var r = i > 1 ? void 0 : i ? Ci(t, e) : t,
|
2087
|
-
(
|
2086
|
+
for (var r = i > 1 ? void 0 : i ? Ci(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
2087
|
+
(o = s[n]) && (r = (i ? o(t, e, r) : o(r)) || r);
|
2088
2088
|
return i && r && xi(t, e, r), r;
|
2089
2089
|
};
|
2090
2090
|
const Ei = "application";
|
2091
|
-
class
|
2091
|
+
class nt extends _ {
|
2092
2092
|
constructor() {
|
2093
2093
|
super(...arguments), this.nodes = [], this.wrapperRef = me();
|
2094
2094
|
}
|
@@ -2116,11 +2116,11 @@ class ot extends _ {
|
|
2116
2116
|
var i, r;
|
2117
2117
|
const t = this.application.settings.components.conversation;
|
2118
2118
|
return ((r = (i = t == null ? void 0 : t.properties) == null ? void 0 : i.chat) == null ? void 0 : r.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")), R`<div class="widget-container" ${ve(this.wrapperRef)}>
|
2119
|
-
${bi(this.nodes, (
|
2119
|
+
${bi(this.nodes, (n) => n)}
|
2120
2120
|
</div>`;
|
2121
2121
|
}
|
2122
2122
|
}
|
2123
|
-
|
2123
|
+
nt.styles = N`
|
2124
2124
|
:host {
|
2125
2125
|
--font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
|
2126
2126
|
--spacing-xs: 0.2rem;
|
@@ -2247,7 +2247,7 @@ ot.styles = N`
|
|
2247
2247
|
Si([
|
2248
2248
|
m({ attribute: !1 }),
|
2249
2249
|
Ai({ context: Ei })
|
2250
|
-
],
|
2250
|
+
], nt.prototype, "application", 2);
|
2251
2251
|
class Pi {
|
2252
2252
|
constructor() {
|
2253
2253
|
this.root = this.createRoot();
|
@@ -2268,27 +2268,27 @@ class Pi {
|
|
2268
2268
|
};
|
2269
2269
|
}, r = (a, c, h, l) => {
|
2270
2270
|
h.forEach((d) => {
|
2271
|
-
const
|
2272
|
-
if (!
|
2271
|
+
const p = i(d), f = l[p.definitionId];
|
2272
|
+
if (!f) {
|
2273
2273
|
console.error(
|
2274
|
-
`No definition found for component type '${
|
2274
|
+
`No definition found for component type '${p.definitionId}'.`
|
2275
2275
|
);
|
2276
2276
|
return;
|
2277
2277
|
}
|
2278
|
-
const g = a.createNode(
|
2279
|
-
g && (g.name =
|
2278
|
+
const g = a.createNode(f.type, f.type);
|
2279
|
+
g && (g.name = p.definitionId, g.application = e, f.properties && g.writeProperties(f.properties), f.context && g.writeContext(f.context), f.layout && g.writeLayout(f.layout), c.addChild(g), f.children && r(
|
2280
2280
|
a,
|
2281
2281
|
g,
|
2282
|
-
|
2282
|
+
f.children,
|
2283
2283
|
l
|
2284
2284
|
// views
|
2285
2285
|
));
|
2286
2286
|
});
|
2287
|
-
}, { entry:
|
2288
|
-
return r(this, this.root, [
|
2287
|
+
}, { entry: n, components: o } = t;
|
2288
|
+
return r(this, this.root, [n], o), this.root;
|
2289
2289
|
}
|
2290
2290
|
createRoot() {
|
2291
|
-
return new
|
2291
|
+
return new nt();
|
2292
2292
|
}
|
2293
2293
|
createNode(t, e) {
|
2294
2294
|
const i = this.resolveComponent(e);
|
@@ -2408,17 +2408,17 @@ class Ii {
|
|
2408
2408
|
}
|
2409
2409
|
}
|
2410
2410
|
class Ri {
|
2411
|
-
constructor(t, e, i, r,
|
2412
|
-
this.id = t, this.name = e, this.container = i, this.settings = r, this.options =
|
2413
|
-
const
|
2411
|
+
constructor(t, e, i, r, n) {
|
2412
|
+
this.id = t, this.name = e, this.container = i, this.settings = r, this.options = n, this.platform = new Pi(), this.texts = new Ti(), this.renderStrategy = $.Inline, this.anchor = "BottomRight", this.autoActivate = !1, this.plugins = [], this.componentResolver = new be(), this.components = [], this.trigger = null, this.api = new Ii(this), this.renderStrategy = this.options.renderStrategy || $.Inline, this.triggerIcon = this.options.triggerIcon;
|
2413
|
+
const o = {
|
2414
2414
|
[y.Necessary]: !0,
|
2415
2415
|
[y.Functional]: !0,
|
2416
2416
|
[y.Analytics]: !0
|
2417
2417
|
};
|
2418
|
-
this.storage = new Oi(this.id, "sessionStorage",
|
2418
|
+
this.storage = new Oi(this.id, "sessionStorage", o), typeof n.autoActivate == "boolean" && (this.autoActivate = n.autoActivate), n.anchor && (this.anchor = n.anchor), this.container.register("$settings", r), this.texts.loadTexts(r.texts || {});
|
2419
2419
|
}
|
2420
2420
|
async activate() {
|
2421
|
-
if (await this.loadPlugins(), await this.componentResolver.loadComponents(), this.root = this.platform.createComponentModel(this.settings, this), this.container.setState(
|
2421
|
+
if (await this.loadPlugins(), await this.componentResolver.loadComponents(), this.root = this.platform.createComponentModel(this.settings, this), this.container.setState(ne.Ready), this.autoActivate) {
|
2422
2422
|
const t = this.render();
|
2423
2423
|
t && this._getTargetElement().appendChild(t);
|
2424
2424
|
}
|
@@ -2496,6 +2496,7 @@ const Fi = (s) => new et(s), $e = class {
|
|
2496
2496
|
const e = await (await fetch(s)).json();
|
2497
2497
|
return e ? {
|
2498
2498
|
id: e.id,
|
2499
|
+
triggers: e.triggers || [],
|
2499
2500
|
apps: e.widgets.map((i) => {
|
2500
2501
|
let r = $.Inline;
|
2501
2502
|
return i.renderStrategy === "Trigger" && (r = $.Trigger), {
|
@@ -2530,12 +2531,12 @@ class ki {
|
|
2530
2531
|
var i;
|
2531
2532
|
(((i = this.site.environment) == null ? void 0 : i.applications) || []).forEach((r) => {
|
2532
2533
|
if (r.storage) {
|
2533
|
-
const
|
2534
|
+
const n = {
|
2534
2535
|
[y.Analytics]: t.includes("analytics"),
|
2535
2536
|
[y.Necessary]: t.includes("necessary"),
|
2536
2537
|
[y.Functional]: t.includes("functional")
|
2537
2538
|
};
|
2538
|
-
r.storage.updatePolicy(
|
2539
|
+
r.storage.updatePolicy(n);
|
2539
2540
|
}
|
2540
2541
|
});
|
2541
2542
|
}
|
@@ -2563,11 +2564,34 @@ class Ni {
|
|
2563
2564
|
this.bootstrapped = !0;
|
2564
2565
|
}
|
2565
2566
|
async activate() {
|
2567
|
+
var e;
|
2566
2568
|
const t = this.applications.filter(
|
2567
|
-
(
|
2569
|
+
(i) => i.autoActivate
|
2568
2570
|
);
|
2569
|
-
|
2570
|
-
|
2571
|
+
(((e = this.site) == null ? void 0 : e.triggers) || []).filter((i) => i.triggerType === "visit").forEach((i) => {
|
2572
|
+
const r = window.location.pathname, n = i.condition.outputs || [];
|
2573
|
+
i.condition.type === "url" && n.forEach((o) => {
|
2574
|
+
const a = o.action.type === "render_widget";
|
2575
|
+
if ((o.value === r || o.value === "*") && a) {
|
2576
|
+
let h = { widgetId: "" };
|
2577
|
+
try {
|
2578
|
+
h = JSON.parse(o.action.data);
|
2579
|
+
} catch {
|
2580
|
+
h = {
|
2581
|
+
widgetId: ""
|
2582
|
+
};
|
2583
|
+
}
|
2584
|
+
const l = t.findIndex(
|
2585
|
+
(p) => p.id === h.widgetId
|
2586
|
+
) > -1, d = this.applications.find(
|
2587
|
+
(p) => p.id === h.widgetId
|
2588
|
+
);
|
2589
|
+
d && !l && (d.autoActivate = !0, t.push(d));
|
2590
|
+
}
|
2591
|
+
});
|
2592
|
+
});
|
2593
|
+
for await (const i of t)
|
2594
|
+
await i.activate();
|
2571
2595
|
}
|
2572
2596
|
notifyWidgetsOfCreation() {
|
2573
2597
|
document.querySelectorAll("ace-widget").forEach((e) => {
|
@@ -2591,16 +2615,16 @@ class Ni {
|
|
2591
2615
|
if (!i) {
|
2592
2616
|
const r = this.widgetAPIHandlers.get(t) || [];
|
2593
2617
|
r.push(() => {
|
2594
|
-
const
|
2595
|
-
e(
|
2618
|
+
const n = this.applications.find((o) => o.name === t);
|
2619
|
+
e(n == null ? void 0 : n.api);
|
2596
2620
|
}), this.widgetAPIHandlers.set(t, r);
|
2597
2621
|
return;
|
2598
2622
|
}
|
2599
2623
|
e(i == null ? void 0 : i.api);
|
2600
2624
|
}
|
2601
2625
|
registerApp(t, e, i, r) {
|
2602
|
-
const
|
2603
|
-
this.applications.push(
|
2626
|
+
const n = new kt(e, this), o = new Ri(t, e, n, i, r);
|
2627
|
+
this.applications.push(o);
|
2604
2628
|
}
|
2605
2629
|
registerSite(t) {
|
2606
2630
|
this.site = t;
|
@@ -2613,7 +2637,7 @@ class Ni {
|
|
2613
2637
|
}
|
2614
2638
|
class Ui {
|
2615
2639
|
constructor(t) {
|
2616
|
-
this.configurations = [], this.httpClient = new et(), this.api = new ki(this), this.httpClient = new et(), typeof t == "string" ? this.url = t : (t.httpClient && (this.httpClient = t.httpClient), this.loadFromConfig(t));
|
2640
|
+
this.configurations = [], this.httpClient = new et(), this.api = new ki(this), this.triggers = [], this.httpClient = new et(), typeof t == "string" ? this.url = t : (t.httpClient && (this.httpClient = t.httpClient), this.loadFromConfig(t));
|
2617
2641
|
}
|
2618
2642
|
async load(t) {
|
2619
2643
|
const e = await this.httpClient.getSite(t);
|
@@ -2621,7 +2645,7 @@ class Ui {
|
|
2621
2645
|
console.warn(`Unable to load site from the url provided: ${t}`);
|
2622
2646
|
return;
|
2623
2647
|
}
|
2624
|
-
this.configurations = e.apps;
|
2648
|
+
this.configurations = e.apps, this.triggers = e.triggers || [];
|
2625
2649
|
}
|
2626
2650
|
loadFromConfig(t) {
|
2627
2651
|
this.configurations = t.apps.map((e) => ({
|
@@ -2667,10 +2691,10 @@ class Ui {
|
|
2667
2691
|
}), globalThis.ace = t;
|
2668
2692
|
}
|
2669
2693
|
}
|
2670
|
-
var
|
2671
|
-
for (var r = i > 1 ? void 0 : i ?
|
2672
|
-
(
|
2673
|
-
return i && r &&
|
2694
|
+
var Mi = Object.defineProperty, ji = Object.getOwnPropertyDescriptor, Et = (s, t, e, i) => {
|
2695
|
+
for (var r = i > 1 ? void 0 : i ? ji(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
2696
|
+
(o = s[n]) && (r = (i ? o(t, e, r) : o(r)) || r);
|
2697
|
+
return i && r && Mi(t, e, r), r;
|
2674
2698
|
};
|
2675
2699
|
class Y extends _ {
|
2676
2700
|
constructor() {
|
@@ -2696,7 +2720,7 @@ class Y extends _ {
|
|
2696
2720
|
}
|
2697
2721
|
render() {
|
2698
2722
|
if (!this.widget || this.status !== "activated")
|
2699
|
-
return
|
2723
|
+
return u;
|
2700
2724
|
if (this.widget.renderStrategy === $.Trigger) {
|
2701
2725
|
const t = new A();
|
2702
2726
|
return t.application = this.widget, t;
|
@@ -2723,7 +2747,7 @@ Et([
|
|
2723
2747
|
customElements.get("ace-trigger-slot") || customElements.define("ace-trigger-slot", rt);
|
2724
2748
|
customElements.get("ace-trigger") || customElements.define("ace-trigger", A);
|
2725
2749
|
customElements.get("ace-unresolved-component") || customElements.define("ace-unresolved-component", St);
|
2726
|
-
customElements.get("ace-wrapper") || customElements.define("ace-wrapper",
|
2750
|
+
customElements.get("ace-wrapper") || customElements.define("ace-wrapper", nt);
|
2727
2751
|
customElements.get("ace-widget") || customElements.define("ace-widget", Y);
|
2728
2752
|
const Vi = async (s, t, e = {}) => {
|
2729
2753
|
const i = new Ui(s);
|