@telia-ace/widget-core-flamingo 1.1.72-rc.10 → 1.1.72-rc.12
Sign up to get free protection for your applications and to get access to all the features.
- package/bootstrap.d.ts +4 -1
- package/index.js +33 -26
- package/index.mjs +185 -158
- package/models/site.d.ts +2 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
@@ -6,7 +6,7 @@ var gt = function(s, t) {
|
|
6
6
|
Object.prototype.hasOwnProperty.call(i, r) && (e[r] = i[r]);
|
7
7
|
}, gt(s, t);
|
8
8
|
};
|
9
|
-
function
|
9
|
+
function W(s, t) {
|
10
10
|
if (typeof t != "function" && t !== null)
|
11
11
|
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
12
12
|
gt(s, t);
|
@@ -53,7 +53,7 @@ function J(s, t, e) {
|
|
53
53
|
(n || !(i in t)) && (n || (n = Array.prototype.slice.call(t, 0, i)), n[i] = t[i]);
|
54
54
|
return s.concat(n || Array.prototype.slice.call(t));
|
55
55
|
}
|
56
|
-
function
|
56
|
+
function w(s) {
|
57
57
|
return typeof s == "function";
|
58
58
|
}
|
59
59
|
function Qt(s) {
|
@@ -106,7 +106,7 @@ var it = function() {
|
|
106
106
|
else
|
107
107
|
o.remove(this);
|
108
108
|
var l = this.initialTeardown;
|
109
|
-
if (
|
109
|
+
if (w(l))
|
110
110
|
try {
|
111
111
|
l();
|
112
112
|
} catch (v) {
|
@@ -169,10 +169,10 @@ var it = function() {
|
|
169
169
|
}(), s;
|
170
170
|
}(), te = it.EMPTY;
|
171
171
|
function ee(s) {
|
172
|
-
return s instanceof it || s && "closed" in s &&
|
172
|
+
return s instanceof it || s && "closed" in s && w(s.remove) && w(s.add) && w(s.unsubscribe);
|
173
173
|
}
|
174
174
|
function Pt(s) {
|
175
|
-
|
175
|
+
w(s) ? s() : s.unsubscribe();
|
176
176
|
}
|
177
177
|
var ie = {
|
178
178
|
onUnhandledError: null,
|
@@ -204,7 +204,7 @@ function K(s) {
|
|
204
204
|
s();
|
205
205
|
}
|
206
206
|
var se = function(s) {
|
207
|
-
|
207
|
+
W(t, s);
|
208
208
|
function t(e) {
|
209
209
|
var i = s.call(this) || this;
|
210
210
|
return i.isStopped = !1, e ? (i.destination = e, ee(e) && e.add(i)) : i.destination = Ce, i;
|
@@ -248,7 +248,7 @@ var Ae = function() {
|
|
248
248
|
try {
|
249
249
|
e.next(t);
|
250
250
|
} catch (i) {
|
251
|
-
|
251
|
+
q(i);
|
252
252
|
}
|
253
253
|
}, s.prototype.error = function(t) {
|
254
254
|
var e = this.partialObserver;
|
@@ -256,24 +256,24 @@ var Ae = function() {
|
|
256
256
|
try {
|
257
257
|
e.error(t);
|
258
258
|
} catch (i) {
|
259
|
-
|
259
|
+
q(i);
|
260
260
|
}
|
261
261
|
else
|
262
|
-
|
262
|
+
q(t);
|
263
263
|
}, s.prototype.complete = function() {
|
264
264
|
var t = this.partialObserver;
|
265
265
|
if (t.complete)
|
266
266
|
try {
|
267
267
|
t.complete();
|
268
268
|
} catch (e) {
|
269
|
-
|
269
|
+
q(e);
|
270
270
|
}
|
271
271
|
}, s;
|
272
272
|
}(), bt = function(s) {
|
273
|
-
|
273
|
+
W(t, s);
|
274
274
|
function t(e, i, r) {
|
275
275
|
var n = s.call(this) || this, o;
|
276
|
-
if (
|
276
|
+
if (w(e) || !e)
|
277
277
|
o = {
|
278
278
|
next: e ?? void 0,
|
279
279
|
error: i ?? void 0,
|
@@ -293,7 +293,7 @@ var Ae = function() {
|
|
293
293
|
}
|
294
294
|
return t;
|
295
295
|
}(se);
|
296
|
-
function
|
296
|
+
function q(s) {
|
297
297
|
we(s);
|
298
298
|
}
|
299
299
|
function xe(s) {
|
@@ -382,7 +382,7 @@ function It(s) {
|
|
382
382
|
return (t = s ?? ie.Promise) !== null && t !== void 0 ? t : Promise;
|
383
383
|
}
|
384
384
|
function Oe(s) {
|
385
|
-
return s &&
|
385
|
+
return s && w(s.next) && w(s.error) && w(s.complete);
|
386
386
|
}
|
387
387
|
function Te(s) {
|
388
388
|
return s && s instanceof se || Oe(s) && ee(s);
|
@@ -392,7 +392,7 @@ var Ie = Qt(function(s) {
|
|
392
392
|
s(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
393
393
|
};
|
394
394
|
}), $t = function(s) {
|
395
|
-
|
395
|
+
W(t, s);
|
396
396
|
function t() {
|
397
397
|
var e = s.call(this) || this;
|
398
398
|
return e.closed = !1, e.currentObservers = null, e.observers = [], e.isStopped = !1, e.hasError = !1, e.thrownError = null, e;
|
@@ -472,7 +472,7 @@ var Ie = Qt(function(s) {
|
|
472
472
|
return new Rt(e, i);
|
473
473
|
}, t;
|
474
474
|
}(Tt), Rt = function(s) {
|
475
|
-
|
475
|
+
W(t, s);
|
476
476
|
function t(e, i) {
|
477
477
|
var r = s.call(this) || this;
|
478
478
|
return r.destination = e, r.source = i, r;
|
@@ -491,7 +491,7 @@ var Ie = Qt(function(s) {
|
|
491
491
|
return (r = (i = this.source) === null || i === void 0 ? void 0 : i.subscribe(e)) !== null && r !== void 0 ? r : te;
|
492
492
|
}, t;
|
493
493
|
}($t), re = function(s) {
|
494
|
-
|
494
|
+
W(t, s);
|
495
495
|
function t(e) {
|
496
496
|
var i = s.call(this) || this;
|
497
497
|
return i._value = e, i;
|
@@ -514,7 +514,7 @@ var Ie = Qt(function(s) {
|
|
514
514
|
s.prototype.next.call(this, this._value = e);
|
515
515
|
}, t;
|
516
516
|
}($t), ne = /* @__PURE__ */ ((s) => (s.Loading = "loading", s.Ready = "ready", s))(ne || {});
|
517
|
-
class
|
517
|
+
class kt {
|
518
518
|
constructor(t, e) {
|
519
519
|
this.state = new re(
|
520
520
|
"loading"
|
@@ -539,7 +539,7 @@ class Nt {
|
|
539
539
|
* Copyright 2019 Google LLC
|
540
540
|
* SPDX-License-Identifier: BSD-3-Clause
|
541
541
|
*/
|
542
|
-
const Z = globalThis, wt = Z.ShadowRoot && (Z.ShadyCSS === void 0 || Z.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, _t = Symbol(),
|
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
543
|
let oe = class {
|
544
544
|
constructor(t, e, i) {
|
545
545
|
if (this._$cssResult$ = !0, i !== _t)
|
@@ -551,7 +551,7 @@ let oe = class {
|
|
551
551
|
const e = this.t;
|
552
552
|
if (wt && t === void 0) {
|
553
553
|
const i = e !== void 0 && e.length === 1;
|
554
|
-
i && (t =
|
554
|
+
i && (t = Nt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Nt.set(e, t));
|
555
555
|
}
|
556
556
|
return t;
|
557
557
|
}
|
@@ -568,7 +568,7 @@ const Re = (s) => new oe(typeof s == "string" ? s : s + "", void 0, _t), N = (s,
|
|
568
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
569
|
})(r) + s[n + 1], s[0]);
|
570
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);
|
574
574
|
else
|
@@ -576,7 +576,7 @@ const Re = (s) => new oe(typeof s == "string" ? s : s + "", void 0, _t), N = (s,
|
|
576
576
|
const i = document.createElement("style"), r = Z.litNonce;
|
577
577
|
r !== void 0 && i.setAttribute("nonce", r), i.textContent = e.cssText, s.appendChild(i);
|
578
578
|
}
|
579
|
-
},
|
579
|
+
}, Ut = wt ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
|
580
580
|
let e = "";
|
581
581
|
for (const i of t.cssRules)
|
582
582
|
e += i.cssText;
|
@@ -587,10 +587,10 @@ const Re = (s) => new oe(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:
|
590
|
+
const { is: Ne, defineProperty: Ue, getOwnPropertyDescriptor: je, getOwnPropertyNames: Me, getOwnPropertySymbols: He, getPrototypeOf: Le } = Object, C = globalThis, jt = C.trustedTypes, Be = jt ? jt.emptyScript : "", ct = C.reactiveElementPolyfillSupport, M = (s, t) => s, X = { toAttribute(s, t) {
|
591
591
|
switch (t) {
|
592
592
|
case Boolean:
|
593
|
-
s = s ?
|
593
|
+
s = s ? Be : null;
|
594
594
|
break;
|
595
595
|
case Object:
|
596
596
|
case Array:
|
@@ -615,9 +615,9 @@ const { is: Ue, defineProperty: ke, getOwnPropertyDescriptor: je, getOwnProperty
|
|
615
615
|
}
|
616
616
|
}
|
617
617
|
return e;
|
618
|
-
} }, At = (s, t) => !
|
619
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")),
|
620
|
-
let
|
618
|
+
} }, At = (s, t) => !Ne(s, t), Mt = { attribute: !0, type: String, converter: X, reflect: !1, hasChanged: At };
|
619
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), C.litPropertyMetadata ?? (C.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
620
|
+
let I = class extends HTMLElement {
|
621
621
|
static addInitializer(t) {
|
622
622
|
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
623
623
|
}
|
@@ -627,7 +627,7 @@ let T = class extends HTMLElement {
|
|
627
627
|
static createProperty(t, e = Mt) {
|
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
|
-
r !== void 0 &&
|
630
|
+
r !== void 0 && Ue(this.prototype, t, r);
|
631
631
|
}
|
632
632
|
}
|
633
633
|
static getPropertyDescriptor(t, e, i) {
|
@@ -647,15 +647,15 @@ let T = class extends HTMLElement {
|
|
647
647
|
return this.elementProperties.get(t) ?? Mt;
|
648
648
|
}
|
649
649
|
static _$Ei() {
|
650
|
-
if (this.hasOwnProperty(
|
650
|
+
if (this.hasOwnProperty(M("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(M("finalized")))
|
657
657
|
return;
|
658
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
658
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(M("properties"))) {
|
659
659
|
const e = this.properties, i = [...Me(e), ...He(e)];
|
660
660
|
for (const r of i)
|
661
661
|
this.createProperty(r, e[r]);
|
@@ -679,9 +679,9 @@ let T = class extends HTMLElement {
|
|
679
679
|
if (Array.isArray(t)) {
|
680
680
|
const i = new Set(t.flat(1 / 0).reverse());
|
681
681
|
for (const r of i)
|
682
|
-
e.unshift(
|
682
|
+
e.unshift(Ut(r));
|
683
683
|
} else
|
684
|
-
t !== void 0 && e.push(
|
684
|
+
t !== void 0 && e.push(Ut(t));
|
685
685
|
return e;
|
686
686
|
}
|
687
687
|
static _$Eu(t, e) {
|
@@ -711,7 +711,7 @@ let T = class extends HTMLElement {
|
|
711
711
|
}
|
712
712
|
createRenderRoot() {
|
713
713
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
714
|
-
return
|
714
|
+
return ke(t, this.constructor.elementStyles), t;
|
715
715
|
}
|
716
716
|
connectedCallback() {
|
717
717
|
var t;
|
@@ -828,15 +828,15 @@ let T = class extends HTMLElement {
|
|
828
828
|
firstUpdated(t) {
|
829
829
|
}
|
830
830
|
};
|
831
|
-
|
831
|
+
I.elementStyles = [], I.shadowRootOptions = { mode: "open" }, I[M("elementProperties")] = /* @__PURE__ */ new Map(), I[M("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
|
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, De = `<${ce}>`, O = document, B = () => O.createComment(""), D = (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]`, j = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Lt = /-->/g, Bt = />/g, S = RegExp(`>|${ht}(?:([^\\s"'>=/]+)(${ht}*=${ht}*(?:[^
|
839
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Dt = /'/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"), d = Symbol.for("lit-nothing"), Wt = /* @__PURE__ */ new WeakMap(), P = O.createTreeWalker(O, 129);
|
840
840
|
function pe(s, t) {
|
841
841
|
if (!Array.isArray(s) || !s.hasOwnProperty("raw"))
|
842
842
|
throw Error("invalid template strings array");
|
@@ -844,43 +844,43 @@ function pe(s, t) {
|
|
844
844
|
}
|
845
845
|
const Fe = (s, t) => {
|
846
846
|
const e = s.length - 1, i = [];
|
847
|
-
let r, n = t === 2 ? "<svg>" : "", o =
|
847
|
+
let r, n = t === 2 ? "<svg>" : "", o = j;
|
848
848
|
for (let a = 0; a < e; a++) {
|
849
849
|
const c = s[a];
|
850
850
|
let h, l, p = -1, f = 0;
|
851
851
|
for (; f < c.length && (o.lastIndex = f, l = o.exec(c), l !== null); )
|
852
|
-
f = o.lastIndex, o ===
|
853
|
-
const u = o ===
|
854
|
-
n += o ===
|
852
|
+
f = o.lastIndex, o === j ? l[1] === "!--" ? o = Lt : l[1] !== void 0 ? o = Bt : 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 ?? j, p = -1) : l[1] === void 0 ? p = -2 : (p = o.lastIndex - l[2].length, h = l[1], o = l[3] === void 0 ? S : l[3] === '"' ? zt : Dt) : o === zt || o === Dt ? o = S : o === Lt || o === Bt ? o = j : (o = S, r = void 0);
|
853
|
+
const u = o === S && s[a + 1].startsWith("/>") ? " " : "";
|
854
|
+
n += o === j ? c + De : p >= 0 ? (i.push(h), c.slice(0, p) + ae + c.slice(p) + x + u) : c + x + (p === -2 ? a : u);
|
855
855
|
}
|
856
856
|
return [pe(s, n + (s[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
|
857
857
|
};
|
858
|
-
class
|
858
|
+
class z {
|
859
859
|
constructor({ strings: t, _$litType$: e }, i) {
|
860
860
|
let r;
|
861
861
|
this.parts = [];
|
862
862
|
let n = 0, o = 0;
|
863
863
|
const a = t.length - 1, c = this.parts, [h, l] = Fe(t, e);
|
864
|
-
if (this.el =
|
864
|
+
if (this.el = z.createElement(h, i), P.currentNode = this.el.content, e === 2) {
|
865
865
|
const p = this.el.content.firstChild;
|
866
866
|
p.replaceWith(...p.childNodes);
|
867
867
|
}
|
868
|
-
for (; (r =
|
868
|
+
for (; (r = P.nextNode()) !== null && c.length < a; ) {
|
869
869
|
if (r.nodeType === 1) {
|
870
870
|
if (r.hasAttributes())
|
871
871
|
for (const p of r.getAttributeNames())
|
872
872
|
if (p.endsWith(ae)) {
|
873
|
-
const f = l[o++], u = r.getAttribute(p).split(
|
873
|
+
const f = l[o++], u = r.getAttribute(p).split(x), g = /([.?@])?(.*)/.exec(f);
|
874
874
|
c.push({ type: 1, index: n, name: g[2], strings: u, ctor: g[1] === "." ? Ye : g[1] === "?" ? qe : g[1] === "@" ? Ke : st }), r.removeAttribute(p);
|
875
875
|
} else
|
876
|
-
p.startsWith(
|
876
|
+
p.startsWith(x) && (c.push({ type: 6, index: n }), r.removeAttribute(p));
|
877
877
|
if (le.test(r.tagName)) {
|
878
|
-
const p = r.textContent.split(
|
878
|
+
const p = r.textContent.split(x), f = p.length - 1;
|
879
879
|
if (f > 0) {
|
880
880
|
r.textContent = Q ? Q.emptyScript : "";
|
881
881
|
for (let u = 0; u < f; u++)
|
882
|
-
r.append(p[u],
|
883
|
-
r.append(p[f],
|
882
|
+
r.append(p[u], B()), P.nextNode(), c.push({ type: 2, index: ++n });
|
883
|
+
r.append(p[f], B());
|
884
884
|
}
|
885
885
|
}
|
886
886
|
} else if (r.nodeType === 8)
|
@@ -888,24 +888,24 @@ class B {
|
|
888
888
|
c.push({ type: 2, index: n });
|
889
889
|
else {
|
890
890
|
let p = -1;
|
891
|
-
for (; (p = r.data.indexOf(
|
892
|
-
c.push({ type: 7, index: n }), p +=
|
891
|
+
for (; (p = r.data.indexOf(x, p + 1)) !== -1; )
|
892
|
+
c.push({ type: 7, index: n }), p += x.length - 1;
|
893
893
|
}
|
894
894
|
n++;
|
895
895
|
}
|
896
896
|
}
|
897
897
|
static createElement(t, e) {
|
898
|
-
const i =
|
898
|
+
const i = O.createElement("template");
|
899
899
|
return i.innerHTML = t, i;
|
900
900
|
}
|
901
901
|
}
|
902
|
-
function
|
902
|
+
function k(s, t, e = s, i) {
|
903
903
|
var o, a;
|
904
|
-
if (t ===
|
904
|
+
if (t === T)
|
905
905
|
return t;
|
906
906
|
let r = i !== void 0 ? (o = e._$Co) == null ? void 0 : o[i] : e._$Cl;
|
907
907
|
const n = D(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 =
|
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) {
|
@@ -918,17 +918,17 @@ class Ve {
|
|
918
918
|
return this._$AM._$AU;
|
919
919
|
}
|
920
920
|
u(t) {
|
921
|
-
const { el: { content: e }, parts: i } = this._$AD, r = ((t == null ? void 0 : t.creationScope) ??
|
922
|
-
|
923
|
-
let n =
|
921
|
+
const { el: { content: e }, parts: i } = this._$AD, r = ((t == null ? void 0 : t.creationScope) ?? O).importNode(e, !0);
|
922
|
+
P.currentNode = r;
|
923
|
+
let n = P.nextNode(), o = 0, a = 0, c = i[0];
|
924
924
|
for (; c !== void 0; ) {
|
925
925
|
if (o === c.index) {
|
926
926
|
let h;
|
927
|
-
c.type === 2 ? h = new
|
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
|
-
o !== (c == null ? void 0 : c.index) && (n =
|
929
|
+
o !== (c == null ? void 0 : c.index) && (n = P.nextNode(), o++);
|
930
930
|
}
|
931
|
-
return
|
931
|
+
return P.currentNode = O, r;
|
932
932
|
}
|
933
933
|
p(t) {
|
934
934
|
let e = 0;
|
@@ -936,7 +936,7 @@ class Ve {
|
|
936
936
|
i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
|
937
937
|
}
|
938
938
|
}
|
939
|
-
class
|
939
|
+
class F {
|
940
940
|
get _$AU() {
|
941
941
|
var t;
|
942
942
|
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
@@ -956,7 +956,7 @@ class W {
|
|
956
956
|
return this._$AB;
|
957
957
|
}
|
958
958
|
_$AI(t, e = this) {
|
959
|
-
t =
|
959
|
+
t = k(this, t, e), D(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : 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,11 +965,11 @@ class W {
|
|
965
965
|
this._$AH !== t && (this._$AR(), this._$AH = this.S(t));
|
966
966
|
}
|
967
967
|
_(t) {
|
968
|
-
this._$AH !== d && D(this._$AH) ? this._$AA.nextSibling.data = t : this.T(
|
968
|
+
this._$AH !== d && D(this._$AH) ? this._$AA.nextSibling.data = t : this.T(O.createTextNode(t)), this._$AH = t;
|
969
969
|
}
|
970
970
|
$(t) {
|
971
971
|
var n;
|
972
|
-
const { values: e, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el =
|
972
|
+
const { values: e, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = z.createElement(pe(i.h, i.h[0]), this.options)), i);
|
973
973
|
if (((n = this._$AH) == null ? void 0 : n._$AD) === r)
|
974
974
|
this._$AH.p(e);
|
975
975
|
else {
|
@@ -979,14 +979,14 @@ class W {
|
|
979
979
|
}
|
980
980
|
_$AC(t) {
|
981
981
|
let e = Wt.get(t.strings);
|
982
|
-
return e === void 0 && Wt.set(t.strings, e = new
|
982
|
+
return e === void 0 && Wt.set(t.strings, e = new z(t)), e;
|
983
983
|
}
|
984
984
|
k(t) {
|
985
985
|
he(this._$AH) || (this._$AH = [], this._$AR());
|
986
986
|
const e = this._$AH;
|
987
987
|
let i, r = 0;
|
988
988
|
for (const n of t)
|
989
|
-
r === e.length ? e.push(i = new
|
989
|
+
r === e.length ? e.push(i = new F(this.S(B()), this.S(B()), 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) {
|
@@ -1015,12 +1015,12 @@ class st {
|
|
1015
1015
|
const n = this.strings;
|
1016
1016
|
let o = !1;
|
1017
1017
|
if (n === void 0)
|
1018
|
-
t =
|
1018
|
+
t = k(this, t, e, 0), o = !D(t) || t !== this._$AH && t !== T, o && (this._$AH = t);
|
1019
1019
|
else {
|
1020
1020
|
const a = t;
|
1021
1021
|
let c, h;
|
1022
1022
|
for (t = n[0], c = 0; c < n.length - 1; c++)
|
1023
|
-
h =
|
1023
|
+
h = k(this, a[i + c], e, c), h === T && (h = this._$AH[c]), o || (o = !D(h) || h !== this._$AH[c]), h === d ? t = d : t !== d && (t += (h ?? "") + n[c + 1]), this._$AH[c] = h;
|
1024
1024
|
}
|
1025
1025
|
o && !r && this.j(t);
|
1026
1026
|
}
|
@@ -1049,7 +1049,7 @@ class Ke extends st {
|
|
1049
1049
|
super(t, e, i, r, n), this.type = 5;
|
1050
1050
|
}
|
1051
1051
|
_$AI(t, e = this) {
|
1052
|
-
if ((t =
|
1052
|
+
if ((t = k(this, t, e, 0) ?? d) === T)
|
1053
1053
|
return;
|
1054
1054
|
const i = this._$AH, r = t === d && i !== d || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, n = t !== d && (i === d || r);
|
1055
1055
|
r && this.element.removeEventListener(this.name, this, i), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
@@ -1067,17 +1067,17 @@ class Ze {
|
|
1067
1067
|
return this._$AM._$AU;
|
1068
1068
|
}
|
1069
1069
|
_$AI(t) {
|
1070
|
-
|
1070
|
+
k(this, t);
|
1071
1071
|
}
|
1072
1072
|
}
|
1073
|
-
const lt =
|
1074
|
-
lt == null || lt(
|
1073
|
+
const lt = H.litHtmlPolyfillSupport;
|
1074
|
+
lt == null || lt(z, F), (H.litHtmlVersions ?? (H.litHtmlVersions = [])).push("3.1.2");
|
1075
1075
|
const Ge = (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
1079
|
const n = (e == null ? void 0 : e.renderBefore) ?? null;
|
1080
|
-
i._$litPart$ = r = new
|
1080
|
+
i._$litPart$ = r = new F(t.insertBefore(B(), n), n, void 0, e ?? {});
|
1081
1081
|
}
|
1082
1082
|
return r._$AI(s), r;
|
1083
1083
|
};
|
@@ -1086,7 +1086,7 @@ const Ge = (s, t, e) => {
|
|
1086
1086
|
* Copyright 2017 Google LLC
|
1087
1087
|
* SPDX-License-Identifier: BSD-3-Clause
|
1088
1088
|
*/
|
1089
|
-
let
|
1089
|
+
let _ = class extends I {
|
1090
1090
|
constructor() {
|
1091
1091
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
1092
1092
|
}
|
@@ -1108,13 +1108,13 @@ let w = class extends T {
|
|
1108
1108
|
super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
|
1109
1109
|
}
|
1110
1110
|
render() {
|
1111
|
-
return
|
1111
|
+
return T;
|
1112
1112
|
}
|
1113
1113
|
};
|
1114
1114
|
var Xt;
|
1115
|
-
|
1115
|
+
_._$litElement$ = !0, _.finalized = !0, (Xt = globalThis.litElementHydrateSupport) == null || Xt.call(globalThis, { LitElement: _ });
|
1116
1116
|
const pt = globalThis.litElementPolyfillSupport;
|
1117
|
-
pt == null || pt({ LitElement:
|
1117
|
+
pt == null || pt({ LitElement: _ });
|
1118
1118
|
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.4");
|
1119
1119
|
/**
|
1120
1120
|
* @license
|
@@ -1161,7 +1161,7 @@ var Qe = Object.defineProperty, ti = Object.getOwnPropertyDescriptor, ei = (s, t
|
|
1161
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
|
-
class rt extends
|
1164
|
+
class rt extends _ {
|
1165
1165
|
constructor() {
|
1166
1166
|
super(...arguments), this.anchor = "BottomRight";
|
1167
1167
|
}
|
@@ -1228,13 +1228,13 @@ const ii = (s) => s.strings === void 0;
|
|
1228
1228
|
* Copyright 2017 Google LLC
|
1229
1229
|
* SPDX-License-Identifier: BSD-3-Clause
|
1230
1230
|
*/
|
1231
|
-
const
|
1231
|
+
const L = (s, t) => {
|
1232
1232
|
var i;
|
1233
1233
|
const e = s._$AN;
|
1234
1234
|
if (e === void 0)
|
1235
1235
|
return !1;
|
1236
1236
|
for (const r of e)
|
1237
|
-
(i = r._$AO) == null || i.call(r, t, !1),
|
1237
|
+
(i = r._$AO) == null || i.call(r, t, !1), L(r, t);
|
1238
1238
|
return !0;
|
1239
1239
|
}, tt = (s) => {
|
1240
1240
|
let t, e;
|
@@ -1262,11 +1262,11 @@ function ri(s, t = !1, e = 0) {
|
|
1262
1262
|
if (t)
|
1263
1263
|
if (Array.isArray(i))
|
1264
1264
|
for (let n = e; n < i.length; n++)
|
1265
|
-
|
1265
|
+
L(i[n], !1), tt(i[n]);
|
1266
1266
|
else
|
1267
|
-
i != null && (
|
1267
|
+
i != null && (L(i, !1), tt(i));
|
1268
1268
|
else
|
1269
|
-
|
1269
|
+
L(this, s);
|
1270
1270
|
}
|
1271
1271
|
const ni = (s) => {
|
1272
1272
|
s.type == xt.CHILD && (s._$AP ?? (s._$AP = ri), s._$AQ ?? (s._$AQ = si));
|
@@ -1280,7 +1280,7 @@ class fe extends de {
|
|
1280
1280
|
}
|
1281
1281
|
_$AO(t, e = !0) {
|
1282
1282
|
var i, r;
|
1283
|
-
t !== this.isConnected && (this.isConnected = t, t ? (i = this.reconnected) == null || i.call(this) : (r = this.disconnected) == null || r.call(this)), e && (
|
1283
|
+
t !== this.isConnected && (this.isConnected = t, t ? (i = this.reconnected) == null || i.call(this) : (r = this.disconnected) == null || r.call(this)), e && (L(this, t), tt(this));
|
1284
1284
|
}
|
1285
1285
|
setValue(t) {
|
1286
1286
|
if (ii(this._$Ct))
|
@@ -1529,25 +1529,41 @@ const Gt = Ct(class extends de {
|
|
1529
1529
|
const o = !!t[n];
|
1530
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
|
-
return
|
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, n;
|
1538
|
-
|
1537
|
+
var e, i, r, n, o, a, c, h, l;
|
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",
|
1541
1541
|
t
|
1542
|
-
),
|
1542
|
+
), b(
|
1543
1543
|
(r = s.colors) == null ? void 0 : r.secondaryBackground,
|
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
|
+
(o = s.colors) == null ? void 0 : o.interactiveDestructiveBackground,
|
1552
|
+
"--destructive-color",
|
1553
|
+
t
|
1554
|
+
), b(
|
1555
|
+
(a = s.colors) == null ? void 0 : a.interactiveTextOnDestructiveBackground,
|
1556
|
+
"--text-on-destructive-color",
|
1557
|
+
t
|
1558
|
+
), b(
|
1559
|
+
(c = s.colors) == null ? void 0 : c.interactivePrimaryBackground,
|
1560
|
+
"--interactive-primary-background",
|
1561
|
+
t
|
1562
|
+
), b(
|
1563
|
+
(h = s.colors) == null ? void 0 : h.interactiveTextOnPrimaryBackground,
|
1564
|
+
"--interactive-text-on-primary-background",
|
1565
|
+
t
|
1566
|
+
), b((l = s.colors) == null ? void 0 : l.focusColor, "--focus-color", t);
|
1551
1567
|
};
|
1552
1568
|
/**
|
1553
1569
|
* @license
|
@@ -1585,12 +1601,12 @@ const ft = /* @__PURE__ */ new WeakMap(), ve = Ct(class extends fe {
|
|
1585
1601
|
this.rt(this.ct);
|
1586
1602
|
}
|
1587
1603
|
});
|
1588
|
-
var fi = Object.defineProperty, gi = Object.getOwnPropertyDescriptor,
|
1604
|
+
var fi = Object.defineProperty, gi = Object.getOwnPropertyDescriptor, V = (s, t, e, i) => {
|
1589
1605
|
for (var r = i > 1 ? void 0 : i ? gi(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
1590
1606
|
(o = s[n]) && (r = (i ? o(t, e, r) : o(r)) || r);
|
1591
1607
|
return i && r && fi(t, e, r), r;
|
1592
1608
|
};
|
1593
|
-
class
|
1609
|
+
class A extends _ {
|
1594
1610
|
constructor() {
|
1595
1611
|
super(...arguments), this.active = !1, this.triggerVisible = !0, this.loaded = !1, this.containerRef = me(), this.widgetActive$ = new re(!1), this.componentIsDestroyed$ = new $t();
|
1596
1612
|
}
|
@@ -1618,7 +1634,7 @@ class _ extends w {
|
|
1618
1634
|
var a, c, h;
|
1619
1635
|
const t = (a = this.application) == null ? void 0 : a.branding(), e = (c = t == null ? void 0 : t.graphics) == null ? void 0 : c.trigger;
|
1620
1636
|
if (e)
|
1621
|
-
return
|
1637
|
+
return R` <img src=${e} class="trigger-icon" alt="" /> `;
|
1622
1638
|
const i = (h = this.application) == null ? void 0 : h.triggerIcon;
|
1623
1639
|
if (!i)
|
1624
1640
|
return d;
|
@@ -1626,7 +1642,7 @@ class _ extends w {
|
|
1626
1642
|
switch (n) {
|
1627
1643
|
case "Telia": {
|
1628
1644
|
const l = await r();
|
1629
|
-
return l ?
|
1645
|
+
return l ? R`<telia-icon
|
1630
1646
|
class="trigger-icon"
|
1631
1647
|
svg=${l.svg}
|
1632
1648
|
size="lg"
|
@@ -1644,14 +1660,14 @@ class _ extends w {
|
|
1644
1660
|
}
|
1645
1661
|
render() {
|
1646
1662
|
var t, e, i, r;
|
1647
|
-
return
|
1663
|
+
return R`<div
|
1648
1664
|
class=${Gt({
|
1649
1665
|
"trigger-container": !0,
|
1650
1666
|
hidden: !this.triggerVisible
|
1651
1667
|
})}
|
1652
1668
|
${ve(this.containerRef)}
|
1653
1669
|
>
|
1654
|
-
${!this.active && ((r = (i = (e = (t = this.application) == null ? void 0 : t.settings) == null ? void 0 : e.branding) == null ? void 0 : i.other) != null && r.showButtonLabel) ?
|
1670
|
+
${!this.active && ((r = (i = (e = (t = this.application) == null ? void 0 : t.settings) == null ? void 0 : e.branding) == null ? void 0 : i.other) != null && r.showButtonLabel) ? R`
|
1655
1671
|
<button
|
1656
1672
|
label="${this.application.settings.branding.other.buttonLabelText ?? "Widget trigger"}"
|
1657
1673
|
class="trigger-label"
|
@@ -1708,7 +1724,7 @@ class _ extends w {
|
|
1708
1724
|
</div>`;
|
1709
1725
|
}
|
1710
1726
|
}
|
1711
|
-
|
1727
|
+
A.styles = [
|
1712
1728
|
N`
|
1713
1729
|
:host {
|
1714
1730
|
--voca-rem-multiplier: 0.625;
|
@@ -1716,7 +1732,6 @@ _.styles = [
|
|
1716
1732
|
--trigger-label-text-color: rgba(0, 0, 0, 0.8);
|
1717
1733
|
display: block;
|
1718
1734
|
box-sizing: border-box;
|
1719
|
-
/* font-family: var(--font-family); */
|
1720
1735
|
font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
|
1721
1736
|
}
|
1722
1737
|
|
@@ -1742,7 +1757,10 @@ _.styles = [
|
|
1742
1757
|
width: 55px;
|
1743
1758
|
border-radius: 55px;
|
1744
1759
|
cursor: pointer;
|
1745
|
-
background-color: var(
|
1760
|
+
background-color: var(
|
1761
|
+
--interactive-primary-background,
|
1762
|
+
var(--primary-background)
|
1763
|
+
);
|
1746
1764
|
font-family: Lato;
|
1747
1765
|
text-decoration: none;
|
1748
1766
|
border: 3px dashed transparent;
|
@@ -1774,7 +1792,10 @@ _.styles = [
|
|
1774
1792
|
opacity: 1;
|
1775
1793
|
transform: rotate(0deg) scale(1);
|
1776
1794
|
transition: opacity 200ms ease-out, transform 200ms ease-out;
|
1777
|
-
color: var(
|
1795
|
+
color: var(
|
1796
|
+
--interactive-text-on-primary-background,
|
1797
|
+
var(--text-on-primary-background)
|
1798
|
+
);
|
1778
1799
|
}
|
1779
1800
|
.trigger-close {
|
1780
1801
|
opacity: 0;
|
@@ -1790,7 +1811,10 @@ _.styles = [
|
|
1790
1811
|
align-items: center;
|
1791
1812
|
}
|
1792
1813
|
.trigger-close svg path {
|
1793
|
-
fill: var(
|
1814
|
+
fill: var(
|
1815
|
+
--interactive-text-on-primary-background,
|
1816
|
+
var(--text-on-primary-background)
|
1817
|
+
);
|
1794
1818
|
}
|
1795
1819
|
|
1796
1820
|
img {
|
@@ -1820,22 +1844,22 @@ _.styles = [
|
|
1820
1844
|
}
|
1821
1845
|
`
|
1822
1846
|
];
|
1823
|
-
|
1847
|
+
V([
|
1824
1848
|
m({ attribute: !1 })
|
1825
|
-
],
|
1826
|
-
|
1849
|
+
], A.prototype, "application", 2);
|
1850
|
+
V([
|
1827
1851
|
U()
|
1828
|
-
],
|
1829
|
-
|
1852
|
+
], A.prototype, "active", 2);
|
1853
|
+
V([
|
1830
1854
|
U()
|
1831
|
-
],
|
1832
|
-
|
1855
|
+
], A.prototype, "triggerVisible", 2);
|
1856
|
+
V([
|
1833
1857
|
U()
|
1834
|
-
],
|
1835
|
-
|
1858
|
+
], A.prototype, "loaded", 2);
|
1859
|
+
V([
|
1836
1860
|
U()
|
1837
|
-
],
|
1838
|
-
var mi = Object.defineProperty, vi = Object.getOwnPropertyDescriptor,
|
1861
|
+
], A.prototype, "icon", 2);
|
1862
|
+
var mi = Object.defineProperty, vi = Object.getOwnPropertyDescriptor, E = (s, t, e, i) => {
|
1839
1863
|
for (var r = i > 1 ? void 0 : i ? vi(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
1840
1864
|
(o = s[n]) && (r = (i ? o(t, e, r) : o(r)) || r);
|
1841
1865
|
return i && r && mi(t, e, r), r;
|
@@ -1879,25 +1903,25 @@ const yi = (s) => {
|
|
1879
1903
|
box-sizing: border-box;
|
1880
1904
|
}
|
1881
1905
|
`
|
1882
|
-
],
|
1906
|
+
], E([
|
1883
1907
|
m()
|
1884
|
-
], t.prototype, "properties", 2),
|
1908
|
+
], t.prototype, "properties", 2), E([
|
1885
1909
|
m()
|
1886
|
-
], t.prototype, "context", 2),
|
1910
|
+
], t.prototype, "context", 2), E([
|
1887
1911
|
m()
|
1888
|
-
], t.prototype, "layout", 2),
|
1912
|
+
], t.prototype, "layout", 2), E([
|
1889
1913
|
m()
|
1890
|
-
], t.prototype, "name", 2),
|
1914
|
+
], t.prototype, "name", 2), E([
|
1891
1915
|
m()
|
1892
|
-
], t.prototype, "type", 2),
|
1916
|
+
], t.prototype, "type", 2), E([
|
1893
1917
|
m({ attribute: !1 })
|
1894
|
-
], t.prototype, "application", 2),
|
1918
|
+
], t.prototype, "application", 2), E([
|
1895
1919
|
m({ attribute: !1 })
|
1896
1920
|
], t.prototype, "parent", 2), t;
|
1897
1921
|
};
|
1898
|
-
class St extends yi(
|
1922
|
+
class St extends yi(_) {
|
1899
1923
|
render() {
|
1900
|
-
return
|
1924
|
+
return R`Non resolved component`;
|
1901
1925
|
}
|
1902
1926
|
}
|
1903
1927
|
St.styles = [
|
@@ -1919,7 +1943,7 @@ function* bi(s, t) {
|
|
1919
1943
|
yield t(i, e++);
|
1920
1944
|
}
|
1921
1945
|
}
|
1922
|
-
var
|
1946
|
+
var $ = /* @__PURE__ */ ((s) => (s.Inline = "inline", s.Trigger = "trigger", s))($ || {});
|
1923
1947
|
/**
|
1924
1948
|
* @license
|
1925
1949
|
* Copyright 2021 Google LLC
|
@@ -2052,7 +2076,7 @@ var xi = Object.defineProperty, Ci = Object.getOwnPropertyDescriptor, Si = (s, t
|
|
2052
2076
|
return i && r && xi(t, e, r), r;
|
2053
2077
|
};
|
2054
2078
|
const Ei = "application";
|
2055
|
-
class nt extends
|
2079
|
+
class nt extends _ {
|
2056
2080
|
constructor() {
|
2057
2081
|
super(...arguments), this.nodes = [], this.wrapperRef = me();
|
2058
2082
|
}
|
@@ -2079,7 +2103,7 @@ class nt extends w {
|
|
2079
2103
|
render() {
|
2080
2104
|
var i, r;
|
2081
2105
|
const t = this.application.settings.components.conversation;
|
2082
|
-
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 ===
|
2106
|
+
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)}>
|
2083
2107
|
${bi(this.nodes, (n) => n)}
|
2084
2108
|
</div>`;
|
2085
2109
|
}
|
@@ -2100,6 +2124,7 @@ nt.styles = N`
|
|
2100
2124
|
--gray-color: #f3f3f8;
|
2101
2125
|
--white-color: #fff;
|
2102
2126
|
--gray-dark-color: #a6a6a6;
|
2127
|
+
--black-border-color: #00000054;
|
2103
2128
|
|
2104
2129
|
--box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
|
2105
2130
|
--border-radius: var(--spacing-sm);
|
@@ -2176,8 +2201,6 @@ nt.styles = N`
|
|
2176
2201
|
background-color: var(--primary-background);
|
2177
2202
|
padding: var(--spacing-sm);
|
2178
2203
|
border: var(--widget-border, none);
|
2179
|
-
border-left: 1px solid #00000054;
|
2180
|
-
border-right: 1px solid #00000054;
|
2181
2204
|
}
|
2182
2205
|
@keyframes slideDown {
|
2183
2206
|
from {
|
@@ -2374,7 +2397,7 @@ class Ii {
|
|
2374
2397
|
}
|
2375
2398
|
class Ri {
|
2376
2399
|
constructor(t, e, i, r, n) {
|
2377
|
-
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 =
|
2400
|
+
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;
|
2378
2401
|
const o = {
|
2379
2402
|
[y.Necessary]: !0,
|
2380
2403
|
[y.Functional]: !0,
|
@@ -2435,7 +2458,7 @@ class Ri {
|
|
2435
2458
|
}
|
2436
2459
|
_getTargetElement() {
|
2437
2460
|
let t = "bottom-right";
|
2438
|
-
if (this.anchor === "BottomRight" ? t = "bottom-right" : this.anchor === "BottomLeft" && (t = "bottom-left"), this.renderStrategy ===
|
2461
|
+
if (this.anchor === "BottomRight" ? t = "bottom-right" : this.anchor === "BottomLeft" && (t = "bottom-left"), this.renderStrategy === $.Trigger) {
|
2439
2462
|
let e = document.querySelector(
|
2440
2463
|
`ace-trigger-slot.${t}`
|
2441
2464
|
);
|
@@ -2444,8 +2467,8 @@ class Ri {
|
|
2444
2467
|
return document.body;
|
2445
2468
|
}
|
2446
2469
|
render() {
|
2447
|
-
if (this.renderStrategy ===
|
2448
|
-
const t = new
|
2470
|
+
if (this.renderStrategy === $.Trigger) {
|
2471
|
+
const t = new A();
|
2449
2472
|
return t.application = this, this.trigger = t, this.storage.get("open") && this.trigger.toggleActive(), t;
|
2450
2473
|
}
|
2451
2474
|
return this.root;
|
@@ -2462,8 +2485,8 @@ const Fi = (s) => new et(s), $e = class {
|
|
2462
2485
|
return e ? {
|
2463
2486
|
id: e.id,
|
2464
2487
|
apps: e.widgets.map((i) => {
|
2465
|
-
let r =
|
2466
|
-
return i.renderStrategy === "Trigger" && (r =
|
2488
|
+
let r = $.Inline;
|
2489
|
+
return i.renderStrategy === "Trigger" && (r = $.Trigger), {
|
2467
2490
|
id: i.id,
|
2468
2491
|
widgetId: i.widgetId,
|
2469
2492
|
renderStrategy: r,
|
@@ -2487,7 +2510,7 @@ const Fi = (s) => new et(s), $e = class {
|
|
2487
2510
|
};
|
2488
2511
|
let et = $e;
|
2489
2512
|
et.endpoint = "https://widgets.ace.teliacompany.net/api";
|
2490
|
-
class
|
2513
|
+
class ki {
|
2491
2514
|
constructor(t) {
|
2492
2515
|
this.site = t;
|
2493
2516
|
}
|
@@ -2511,9 +2534,9 @@ class Ni {
|
|
2511
2534
|
});
|
2512
2535
|
}
|
2513
2536
|
}
|
2514
|
-
class
|
2537
|
+
class Ni {
|
2515
2538
|
constructor() {
|
2516
|
-
this.applications = [], this.container = new
|
2539
|
+
this.applications = [], this.container = new kt("environment", this), this.bootstrapped = !1, this.site = null, this.widgetAPIHandlers = /* @__PURE__ */ new Map(), this.siteConfigurationHandlers = [], setTimeout(() => {
|
2517
2540
|
this.notifyWidgetsOfCreation();
|
2518
2541
|
}, 1e3);
|
2519
2542
|
}
|
@@ -2564,7 +2587,7 @@ class Ui {
|
|
2564
2587
|
e(i == null ? void 0 : i.api);
|
2565
2588
|
}
|
2566
2589
|
registerApp(t, e, i, r) {
|
2567
|
-
const n = new
|
2590
|
+
const n = new kt(e, this), o = new Ri(t, e, n, i, r);
|
2568
2591
|
this.applications.push(o);
|
2569
2592
|
}
|
2570
2593
|
registerSite(t) {
|
@@ -2576,9 +2599,9 @@ class Ui {
|
|
2576
2599
|
}), this;
|
2577
2600
|
}
|
2578
2601
|
}
|
2579
|
-
class
|
2602
|
+
class Ui {
|
2580
2603
|
constructor(t) {
|
2581
|
-
this.configurations = [], this.httpClient = new et(), this.api = new
|
2604
|
+
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));
|
2582
2605
|
}
|
2583
2606
|
async load(t) {
|
2584
2607
|
const e = await this.httpClient.getSite(t);
|
@@ -2601,9 +2624,12 @@ class ki {
|
|
2601
2624
|
}
|
2602
2625
|
}));
|
2603
2626
|
}
|
2627
|
+
setHttpClient(t) {
|
2628
|
+
this.httpClient = t;
|
2629
|
+
}
|
2604
2630
|
async bootstrap(t) {
|
2605
2631
|
var e;
|
2606
|
-
this.url && await this.load(this.url), this.environment = new
|
2632
|
+
this.url && await this.load(this.url), this.environment = new Ni(), this.addGlobal(this.environment);
|
2607
2633
|
for await (const i of this.configurations) {
|
2608
2634
|
const r = await this.httpClient.getWidget(i.widgetId);
|
2609
2635
|
r && ((e = this.environment) == null || e.registerApp(
|
@@ -2634,7 +2660,7 @@ var ji = Object.defineProperty, Mi = Object.getOwnPropertyDescriptor, Et = (s, t
|
|
2634
2660
|
(o = s[n]) && (r = (i ? o(t, e, r) : o(r)) || r);
|
2635
2661
|
return i && r && ji(t, e, r), r;
|
2636
2662
|
};
|
2637
|
-
class
|
2663
|
+
class Y extends _ {
|
2638
2664
|
constructor() {
|
2639
2665
|
super(), this.status = "deactivated", this.addEventListener("environment-created", this.onEnvironmentCreated);
|
2640
2666
|
}
|
@@ -2659,14 +2685,14 @@ class V extends w {
|
|
2659
2685
|
render() {
|
2660
2686
|
if (!this.widget || this.status !== "activated")
|
2661
2687
|
return d;
|
2662
|
-
if (this.widget.renderStrategy ===
|
2663
|
-
const t = new
|
2688
|
+
if (this.widget.renderStrategy === $.Trigger) {
|
2689
|
+
const t = new A();
|
2664
2690
|
return t.application = this.widget, t;
|
2665
2691
|
}
|
2666
2692
|
return this.widget.render();
|
2667
2693
|
}
|
2668
2694
|
}
|
2669
|
-
|
2695
|
+
Y.styles = [
|
2670
2696
|
N`
|
2671
2697
|
:host {
|
2672
2698
|
display: block;
|
@@ -2675,31 +2701,32 @@ V.styles = [
|
|
2675
2701
|
];
|
2676
2702
|
Et([
|
2677
2703
|
m({ attribute: !0 })
|
2678
|
-
],
|
2704
|
+
], Y.prototype, "name", 2);
|
2679
2705
|
Et([
|
2680
2706
|
U()
|
2681
|
-
],
|
2707
|
+
], Y.prototype, "widget", 2);
|
2682
2708
|
Et([
|
2683
2709
|
U()
|
2684
|
-
],
|
2710
|
+
], Y.prototype, "status", 2);
|
2685
2711
|
customElements.get("ace-trigger-slot") || customElements.define("ace-trigger-slot", rt);
|
2686
|
-
customElements.get("ace-trigger") || customElements.define("ace-trigger",
|
2712
|
+
customElements.get("ace-trigger") || customElements.define("ace-trigger", A);
|
2687
2713
|
customElements.get("ace-unresolved-component") || customElements.define("ace-unresolved-component", St);
|
2688
2714
|
customElements.get("ace-wrapper") || customElements.define("ace-wrapper", nt);
|
2689
|
-
customElements.get("ace-widget") || customElements.define("ace-widget",
|
2690
|
-
const Vi = async (s, t) => {
|
2691
|
-
|
2715
|
+
customElements.get("ace-widget") || customElements.define("ace-widget", Y);
|
2716
|
+
const Vi = async (s, t, e = {}) => {
|
2717
|
+
const i = new Ui(s);
|
2718
|
+
e.httpClient && i.setHttpClient(e.httpClient), await i.bootstrap(t);
|
2692
2719
|
};
|
2693
2720
|
export {
|
2694
|
-
|
2721
|
+
Y as AceWidget,
|
2695
2722
|
Ri as Application,
|
2696
|
-
|
2697
|
-
|
2723
|
+
kt as Container,
|
2724
|
+
Ni as Environment,
|
2698
2725
|
et as HttpClient,
|
2699
|
-
|
2726
|
+
Ui as Site,
|
2700
2727
|
y as StorageCategory,
|
2701
2728
|
Oi as StorageService,
|
2702
|
-
|
2729
|
+
A as Trigger,
|
2703
2730
|
yi as WidgetComponent,
|
2704
2731
|
Ei as applicationContext,
|
2705
2732
|
Vi as bootstrap,
|