@telia-ace/widget-components-widget-header-flamingo 1.1.27 → 1.1.28-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r=async e=>{e.registerComponent("widget-header",Promise.resolve().then(()=>require("./widget-header-
|
|
1
|
+
"use strict";const r=async e=>{e.registerComponent("widget-header",Promise.resolve().then(()=>require("./widget-header-c8615da3.js")))};module.exports=r;
|
package/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/widget-components-widget-header-flamingo",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.28-rc.1",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"lit": "^3.0.2",
|
|
6
|
-
"@telia-ace/widget-core-flamingo": "1.1.
|
|
6
|
+
"@telia-ace/widget-core-flamingo": "1.1.28-rc.1"
|
|
7
7
|
},
|
|
8
8
|
"main": "./index.js",
|
|
9
9
|
"module": "./index.mjs",
|
|
@@ -51,10 +51,10 @@ const Ut = (r) => new ft(typeof r == "string" ? r : r + "", void 0, X), P = (r,
|
|
|
51
51
|
* Copyright 2017 Google LLC
|
|
52
52
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
53
53
|
*/
|
|
54
|
-
const { is: Nt, defineProperty: Rt, getOwnPropertyDescriptor:
|
|
54
|
+
const { is: Nt, defineProperty: Rt, getOwnPropertyDescriptor: Ht, getOwnPropertyNames: Mt, getOwnPropertySymbols: Lt, getPrototypeOf: zt } = Object, _ = globalThis, ot = _.trustedTypes, Bt = ot ? ot.emptyScript : "", Y = _.reactiveElementPolyfillSupport, U = (r, t) => r, W = { toAttribute(r, t) {
|
|
55
55
|
switch (t) {
|
|
56
56
|
case Boolean:
|
|
57
|
-
r = r ?
|
|
57
|
+
r = r ? Bt : null;
|
|
58
58
|
break;
|
|
59
59
|
case Object:
|
|
60
60
|
case Array:
|
|
@@ -95,7 +95,7 @@ class C extends HTMLElement {
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
static getPropertyDescriptor(t, e, s) {
|
|
98
|
-
const { get: i, set: n } =
|
|
98
|
+
const { get: i, set: n } = Ht(this.prototype, t) ?? { get() {
|
|
99
99
|
return this[e];
|
|
100
100
|
}, set(o) {
|
|
101
101
|
this[e] = o;
|
|
@@ -103,8 +103,8 @@ class C extends HTMLElement {
|
|
|
103
103
|
return { get() {
|
|
104
104
|
return i == null ? void 0 : i.call(this);
|
|
105
105
|
}, set(o) {
|
|
106
|
-
const
|
|
107
|
-
n.call(this, o), this.requestUpdate(t,
|
|
106
|
+
const c = i == null ? void 0 : i.call(this);
|
|
107
|
+
n.call(this, o), this.requestUpdate(t, c, s);
|
|
108
108
|
}, configurable: !0, enumerable: !0 };
|
|
109
109
|
}
|
|
110
110
|
static getPropertyOptions(t) {
|
|
@@ -120,7 +120,7 @@ class C extends HTMLElement {
|
|
|
120
120
|
if (this.hasOwnProperty(U("finalized")))
|
|
121
121
|
return;
|
|
122
122
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(U("properties"))) {
|
|
123
|
-
const e = this.properties, s = [...
|
|
123
|
+
const e = this.properties, s = [...Mt(e), ...Lt(e)];
|
|
124
124
|
for (const i of s)
|
|
125
125
|
this.createProperty(i, e[i]);
|
|
126
126
|
}
|
|
@@ -208,8 +208,8 @@ class C extends HTMLElement {
|
|
|
208
208
|
var n;
|
|
209
209
|
const s = this.constructor, i = s._$Eh.get(t);
|
|
210
210
|
if (i !== void 0 && this._$Em !== i) {
|
|
211
|
-
const o = s.getPropertyOptions(i),
|
|
212
|
-
this._$Em = i, this[i] =
|
|
211
|
+
const o = s.getPropertyOptions(i), c = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? o.converter : W;
|
|
212
|
+
this._$Em = i, this[i] = c.fromAttribute(e, o.type), this._$Em = null;
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
requestUpdate(t, e, s, i = !1, n) {
|
|
@@ -298,78 +298,78 @@ C.elementStyles = [], C.shadowRootOptions = { mode: "open" }, C[U("elementProper
|
|
|
298
298
|
* Copyright 2017 Google LLC
|
|
299
299
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
300
300
|
*/
|
|
301
|
-
const k = globalThis, G = k.trustedTypes,
|
|
302
|
-
\f\r]`, O = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
303
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), dt = /'/g, pt = /"/g,
|
|
301
|
+
const k = globalThis, G = k.trustedTypes, ct = G ? G.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, $t = "$lit$", y = `lit$${(Math.random() + "").slice(9)}$`, mt = "?" + y, Dt = `<${mt}>`, w = document, R = () => w.createComment(""), H = (r) => r === null || typeof r != "object" && typeof r != "function", yt = Array.isArray, jt = (r) => yt(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", J = `[
|
|
302
|
+
\f\r]`, O = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, lt = /-->/g, ht = />/g, b = RegExp(`>|${J}(?:([^\\s"'>=/]+)(${J}*=${J}*(?:[^
|
|
303
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), dt = /'/g, pt = /"/g, _t = /^(?:script|style|textarea|title)$/i, It = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), f = It(1), E = Symbol.for("lit-noChange"), l = Symbol.for("lit-nothing"), ut = /* @__PURE__ */ new WeakMap(), x = w.createTreeWalker(w, 129);
|
|
304
304
|
function vt(r, t) {
|
|
305
305
|
if (!Array.isArray(r) || !r.hasOwnProperty("raw"))
|
|
306
306
|
throw Error("invalid template strings array");
|
|
307
|
-
return
|
|
307
|
+
return ct !== void 0 ? ct.createHTML(t) : t;
|
|
308
308
|
}
|
|
309
309
|
const Wt = (r, t) => {
|
|
310
310
|
const e = r.length - 1, s = [];
|
|
311
311
|
let i, n = t === 2 ? "<svg>" : "", o = O;
|
|
312
|
-
for (let
|
|
313
|
-
const a = r[
|
|
314
|
-
let d, p,
|
|
312
|
+
for (let c = 0; c < e; c++) {
|
|
313
|
+
const a = r[c];
|
|
314
|
+
let d, p, h = -1, u = 0;
|
|
315
315
|
for (; u < a.length && (o.lastIndex = u, p = o.exec(a), p !== null); )
|
|
316
|
-
u = o.lastIndex, o === O ? p[1] === "!--" ? o =
|
|
317
|
-
const
|
|
318
|
-
n += o === O ? a +
|
|
316
|
+
u = o.lastIndex, o === O ? p[1] === "!--" ? o = lt : p[1] !== void 0 ? o = ht : p[2] !== void 0 ? (_t.test(p[2]) && (i = RegExp("</" + p[2], "g")), o = b) : p[3] !== void 0 && (o = b) : o === b ? p[0] === ">" ? (o = i ?? O, h = -1) : p[1] === void 0 ? h = -2 : (h = o.lastIndex - p[2].length, d = p[1], o = p[3] === void 0 ? b : p[3] === '"' ? pt : dt) : o === pt || o === dt ? o = b : o === lt || o === ht ? o = O : (o = b, i = void 0);
|
|
317
|
+
const m = o === b && r[c + 1].startsWith("/>") ? " " : "";
|
|
318
|
+
n += o === O ? a + Dt : h >= 0 ? (s.push(d), a.slice(0, h) + $t + a.slice(h) + y + m) : a + y + (h === -2 ? c : m);
|
|
319
319
|
}
|
|
320
320
|
return [vt(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : "")), s];
|
|
321
321
|
};
|
|
322
|
-
class
|
|
322
|
+
class M {
|
|
323
323
|
constructor({ strings: t, _$litType$: e }, s) {
|
|
324
324
|
let i;
|
|
325
325
|
this.parts = [];
|
|
326
326
|
let n = 0, o = 0;
|
|
327
|
-
const
|
|
328
|
-
if (this.el =
|
|
329
|
-
const
|
|
330
|
-
|
|
327
|
+
const c = t.length - 1, a = this.parts, [d, p] = Wt(t, e);
|
|
328
|
+
if (this.el = M.createElement(d, s), x.currentNode = this.el.content, e === 2) {
|
|
329
|
+
const h = this.el.content.firstChild;
|
|
330
|
+
h.replaceWith(...h.childNodes);
|
|
331
331
|
}
|
|
332
|
-
for (; (i =
|
|
332
|
+
for (; (i = x.nextNode()) !== null && a.length < c; ) {
|
|
333
333
|
if (i.nodeType === 1) {
|
|
334
334
|
if (i.hasAttributes())
|
|
335
|
-
for (const
|
|
336
|
-
if (
|
|
337
|
-
const u = p[o++],
|
|
338
|
-
a.push({ type: 1, index: n, name:
|
|
335
|
+
for (const h of i.getAttributeNames())
|
|
336
|
+
if (h.endsWith($t)) {
|
|
337
|
+
const u = p[o++], m = i.getAttribute(h).split(y), D = /([.?@])?(.*)/.exec(u);
|
|
338
|
+
a.push({ type: 1, index: n, name: D[2], strings: m, ctor: D[1] === "." ? Vt : D[1] === "?" ? qt : D[1] === "@" ? Yt : q }), i.removeAttribute(h);
|
|
339
339
|
} else
|
|
340
|
-
|
|
341
|
-
if (
|
|
342
|
-
const
|
|
340
|
+
h.startsWith(y) && (a.push({ type: 6, index: n }), i.removeAttribute(h));
|
|
341
|
+
if (_t.test(i.tagName)) {
|
|
342
|
+
const h = i.textContent.split(y), u = h.length - 1;
|
|
343
343
|
if (u > 0) {
|
|
344
344
|
i.textContent = G ? G.emptyScript : "";
|
|
345
|
-
for (let
|
|
346
|
-
i.append(
|
|
347
|
-
i.append(
|
|
345
|
+
for (let m = 0; m < u; m++)
|
|
346
|
+
i.append(h[m], R()), x.nextNode(), a.push({ type: 2, index: ++n });
|
|
347
|
+
i.append(h[u], R());
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
} else if (i.nodeType === 8)
|
|
351
351
|
if (i.data === mt)
|
|
352
352
|
a.push({ type: 2, index: n });
|
|
353
353
|
else {
|
|
354
|
-
let
|
|
355
|
-
for (; (
|
|
356
|
-
a.push({ type: 7, index: n }),
|
|
354
|
+
let h = -1;
|
|
355
|
+
for (; (h = i.data.indexOf(y, h + 1)) !== -1; )
|
|
356
|
+
a.push({ type: 7, index: n }), h += y.length - 1;
|
|
357
357
|
}
|
|
358
358
|
n++;
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
361
|
static createElement(t, e) {
|
|
362
|
-
const s =
|
|
362
|
+
const s = w.createElement("template");
|
|
363
363
|
return s.innerHTML = t, s;
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
366
|
function S(r, t, e = r, s) {
|
|
367
|
-
var o,
|
|
367
|
+
var o, c;
|
|
368
368
|
if (t === E)
|
|
369
369
|
return t;
|
|
370
370
|
let i = s !== void 0 ? (o = e._$Co) == null ? void 0 : o[s] : e._$Cl;
|
|
371
|
-
const n =
|
|
372
|
-
return (i == null ? void 0 : i.constructor) !== n && ((
|
|
371
|
+
const n = H(t) ? void 0 : t._$litDirective$;
|
|
372
|
+
return (i == null ? void 0 : i.constructor) !== n && ((c = i == null ? void 0 : i._$AO) == null || c.call(i, !1), n === void 0 ? i = void 0 : (i = new n(r), i._$AT(r, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = i : e._$Cl = i), i !== void 0 && (t = S(r, i._$AS(r, t.values), i, s)), t;
|
|
373
373
|
}
|
|
374
374
|
class Gt {
|
|
375
375
|
constructor(t, e) {
|
|
@@ -382,17 +382,17 @@ class Gt {
|
|
|
382
382
|
return this._$AM._$AU;
|
|
383
383
|
}
|
|
384
384
|
u(t) {
|
|
385
|
-
const { el: { content: e }, parts: s } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ??
|
|
386
|
-
|
|
387
|
-
let n =
|
|
385
|
+
const { el: { content: e }, parts: s } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? w).importNode(e, !0);
|
|
386
|
+
x.currentNode = i;
|
|
387
|
+
let n = x.nextNode(), o = 0, c = 0, a = s[0];
|
|
388
388
|
for (; a !== void 0; ) {
|
|
389
389
|
if (o === a.index) {
|
|
390
390
|
let d;
|
|
391
|
-
a.type === 2 ? d = new L(n, n.nextSibling, this, t) : a.type === 1 ? d = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (d = new Jt(n, this, t)), this._$AV.push(d), a = s[++
|
|
391
|
+
a.type === 2 ? d = new L(n, n.nextSibling, this, t) : a.type === 1 ? d = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (d = new Jt(n, this, t)), this._$AV.push(d), a = s[++c];
|
|
392
392
|
}
|
|
393
|
-
o !== (a == null ? void 0 : a.index) && (n =
|
|
393
|
+
o !== (a == null ? void 0 : a.index) && (n = x.nextNode(), o++);
|
|
394
394
|
}
|
|
395
|
-
return
|
|
395
|
+
return x.currentNode = w, i;
|
|
396
396
|
}
|
|
397
397
|
p(t) {
|
|
398
398
|
let e = 0;
|
|
@@ -406,7 +406,7 @@ class L {
|
|
|
406
406
|
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
407
407
|
}
|
|
408
408
|
constructor(t, e, s, i) {
|
|
409
|
-
this.type = 2, this._$AH =
|
|
409
|
+
this.type = 2, this._$AH = l, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = i, this._$Cv = (i == null ? void 0 : i.isConnected) ?? !0;
|
|
410
410
|
}
|
|
411
411
|
get parentNode() {
|
|
412
412
|
let t = this._$AA.parentNode;
|
|
@@ -420,7 +420,7 @@ class L {
|
|
|
420
420
|
return this._$AB;
|
|
421
421
|
}
|
|
422
422
|
_$AI(t, e = this) {
|
|
423
|
-
t = S(this, t, e),
|
|
423
|
+
t = S(this, t, e), H(t) ? t === l || t == null || t === "" ? (this._$AH !== l && this._$AR(), this._$AH = l) : t !== this._$AH && t !== E && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : jt(t) ? this.T(t) : this._(t);
|
|
424
424
|
}
|
|
425
425
|
k(t) {
|
|
426
426
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -429,24 +429,24 @@ class L {
|
|
|
429
429
|
this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
|
|
430
430
|
}
|
|
431
431
|
_(t) {
|
|
432
|
-
this._$AH !==
|
|
432
|
+
this._$AH !== l && H(this._$AH) ? this._$AA.nextSibling.data = t : this.$(w.createTextNode(t)), this._$AH = t;
|
|
433
433
|
}
|
|
434
434
|
g(t) {
|
|
435
435
|
var n;
|
|
436
|
-
const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el =
|
|
436
|
+
const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = M.createElement(vt(s.h, s.h[0]), this.options)), s);
|
|
437
437
|
if (((n = this._$AH) == null ? void 0 : n._$AD) === i)
|
|
438
438
|
this._$AH.p(e);
|
|
439
439
|
else {
|
|
440
|
-
const o = new Gt(i, this),
|
|
441
|
-
o.p(e), this.$(
|
|
440
|
+
const o = new Gt(i, this), c = o.u(this.options);
|
|
441
|
+
o.p(e), this.$(c), this._$AH = o;
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
444
|
_$AC(t) {
|
|
445
445
|
let e = ut.get(t.strings);
|
|
446
|
-
return e === void 0 && ut.set(t.strings, e = new
|
|
446
|
+
return e === void 0 && ut.set(t.strings, e = new M(t)), e;
|
|
447
447
|
}
|
|
448
448
|
T(t) {
|
|
449
|
-
|
|
449
|
+
yt(this._$AH) || (this._$AH = [], this._$AR());
|
|
450
450
|
const e = this._$AH;
|
|
451
451
|
let s, i = 0;
|
|
452
452
|
for (const n of t)
|
|
@@ -473,23 +473,23 @@ class q {
|
|
|
473
473
|
return this._$AM._$AU;
|
|
474
474
|
}
|
|
475
475
|
constructor(t, e, s, i, n) {
|
|
476
|
-
this.type = 1, this._$AH =
|
|
476
|
+
this.type = 1, this._$AH = l, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = n, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = l;
|
|
477
477
|
}
|
|
478
478
|
_$AI(t, e = this, s, i) {
|
|
479
479
|
const n = this.strings;
|
|
480
480
|
let o = !1;
|
|
481
481
|
if (n === void 0)
|
|
482
|
-
t = S(this, t, e, 0), o = !
|
|
482
|
+
t = S(this, t, e, 0), o = !H(t) || t !== this._$AH && t !== E, o && (this._$AH = t);
|
|
483
483
|
else {
|
|
484
|
-
const
|
|
484
|
+
const c = t;
|
|
485
485
|
let a, d;
|
|
486
486
|
for (t = n[0], a = 0; a < n.length - 1; a++)
|
|
487
|
-
d = S(this,
|
|
487
|
+
d = S(this, c[s + a], e, a), d === E && (d = this._$AH[a]), o || (o = !H(d) || d !== this._$AH[a]), d === l ? t = l : t !== l && (t += (d ?? "") + n[a + 1]), this._$AH[a] = d;
|
|
488
488
|
}
|
|
489
489
|
o && !i && this.O(t);
|
|
490
490
|
}
|
|
491
491
|
O(t) {
|
|
492
|
-
t ===
|
|
492
|
+
t === l ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
495
|
class Vt extends q {
|
|
@@ -497,7 +497,7 @@ class Vt extends q {
|
|
|
497
497
|
super(...arguments), this.type = 3;
|
|
498
498
|
}
|
|
499
499
|
O(t) {
|
|
500
|
-
this.element[this.name] = t ===
|
|
500
|
+
this.element[this.name] = t === l ? void 0 : t;
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
503
|
class qt extends q {
|
|
@@ -505,7 +505,7 @@ class qt extends q {
|
|
|
505
505
|
super(...arguments), this.type = 4;
|
|
506
506
|
}
|
|
507
507
|
O(t) {
|
|
508
|
-
this.element.toggleAttribute(this.name, !!t && t !==
|
|
508
|
+
this.element.toggleAttribute(this.name, !!t && t !== l);
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
511
|
class Yt extends q {
|
|
@@ -513,9 +513,9 @@ class Yt extends q {
|
|
|
513
513
|
super(t, e, s, i, n), this.type = 5;
|
|
514
514
|
}
|
|
515
515
|
_$AI(t, e = this) {
|
|
516
|
-
if ((t = S(this, t, e, 0) ??
|
|
516
|
+
if ((t = S(this, t, e, 0) ?? l) === E)
|
|
517
517
|
return;
|
|
518
|
-
const s = this._$AH, i = t ===
|
|
518
|
+
const s = this._$AH, i = t === l && s !== l || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, n = t !== l && (s === l || i);
|
|
519
519
|
i && this.element.removeEventListener(this.name, this, s), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
520
520
|
}
|
|
521
521
|
handleEvent(t) {
|
|
@@ -535,7 +535,7 @@ class Jt {
|
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
537
|
const K = k.litHtmlPolyfillSupport;
|
|
538
|
-
K == null || K(
|
|
538
|
+
K == null || K(M, L), (k.litHtmlVersions ?? (k.litHtmlVersions = [])).push("3.0.2");
|
|
539
539
|
const Kt = (r, t, e) => {
|
|
540
540
|
const s = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
541
541
|
let i = s._$litPart$;
|
|
@@ -550,7 +550,7 @@ const Kt = (r, t, e) => {
|
|
|
550
550
|
* Copyright 2017 Google LLC
|
|
551
551
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
552
552
|
*/
|
|
553
|
-
let
|
|
553
|
+
let $ = class extends C {
|
|
554
554
|
constructor() {
|
|
555
555
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
556
556
|
}
|
|
@@ -576,9 +576,9 @@ let f = class extends C {
|
|
|
576
576
|
}
|
|
577
577
|
};
|
|
578
578
|
var gt;
|
|
579
|
-
|
|
579
|
+
$._$litElement$ = !0, $.finalized = !0, (gt = globalThis.litElementHydrateSupport) == null || gt.call(globalThis, { LitElement: $ });
|
|
580
580
|
const Z = globalThis.litElementPolyfillSupport;
|
|
581
|
-
Z == null || Z({ LitElement:
|
|
581
|
+
Z == null || Z({ LitElement: $ });
|
|
582
582
|
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.1");
|
|
583
583
|
/**
|
|
584
584
|
* @license
|
|
@@ -590,18 +590,18 @@ const Zt = { attribute: !0, type: String, converter: W, reflect: !1, hasChanged:
|
|
|
590
590
|
let n = globalThis.litPropertyMetadata.get(i);
|
|
591
591
|
if (n === void 0 && globalThis.litPropertyMetadata.set(i, n = /* @__PURE__ */ new Map()), n.set(e.name, r), s === "accessor") {
|
|
592
592
|
const { name: o } = e;
|
|
593
|
-
return { set(
|
|
593
|
+
return { set(c) {
|
|
594
594
|
const a = t.get.call(this);
|
|
595
|
-
t.set.call(this,
|
|
596
|
-
}, init(
|
|
597
|
-
return
|
|
595
|
+
t.set.call(this, c), this.requestUpdate(o, a, r);
|
|
596
|
+
}, init(c) {
|
|
597
|
+
return c !== void 0 && this.C(o, void 0, r), c;
|
|
598
598
|
} };
|
|
599
599
|
}
|
|
600
600
|
if (s === "setter") {
|
|
601
601
|
const { name: o } = e;
|
|
602
|
-
return function(
|
|
602
|
+
return function(c) {
|
|
603
603
|
const a = this[o];
|
|
604
|
-
t.call(this,
|
|
604
|
+
t.call(this, c), this.requestUpdate(o, a, r);
|
|
605
605
|
};
|
|
606
606
|
}
|
|
607
607
|
throw Error("Unsupported decorator location: " + s);
|
|
@@ -626,7 +626,7 @@ function T(r) {
|
|
|
626
626
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
627
627
|
*/
|
|
628
628
|
const bt = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, At = (r) => (...t) => ({ _$litDirective$: r, values: t });
|
|
629
|
-
class
|
|
629
|
+
class xt {
|
|
630
630
|
constructor(t) {
|
|
631
631
|
}
|
|
632
632
|
get _$AU() {
|
|
@@ -647,7 +647,7 @@ class wt {
|
|
|
647
647
|
* Copyright 2018 Google LLC
|
|
648
648
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
649
649
|
*/
|
|
650
|
-
const Ft = At(class extends
|
|
650
|
+
const Ft = At(class extends xt {
|
|
651
651
|
constructor(r) {
|
|
652
652
|
var t;
|
|
653
653
|
if (super(r), r.type !== bt.ATTRIBUTE || r.name !== "class" || ((t = r.strings) == null ? void 0 : t.length) > 2)
|
|
@@ -675,7 +675,7 @@ const Ft = At(class extends wt {
|
|
|
675
675
|
}
|
|
676
676
|
}), j = (r, t, e) => {
|
|
677
677
|
r && e.style.setProperty(t, r);
|
|
678
|
-
},
|
|
678
|
+
}, wt = (r, t) => {
|
|
679
679
|
var e, s, i, n;
|
|
680
680
|
j((e = r.colors) == null ? void 0 : e.primaryBackground, "--primary-background", t), j(
|
|
681
681
|
(s = r.colors) == null ? void 0 : s.textOnPrimaryBackground,
|
|
@@ -745,7 +745,7 @@ function ee(r, t = !1, e = 0) {
|
|
|
745
745
|
const se = (r) => {
|
|
746
746
|
r.type == bt.CHILD && (r._$AP ?? (r._$AP = ee), r._$AQ ?? (r._$AQ = te));
|
|
747
747
|
};
|
|
748
|
-
class ie extends
|
|
748
|
+
class ie extends xt {
|
|
749
749
|
constructor() {
|
|
750
750
|
super(...arguments), this._$AN = void 0;
|
|
751
751
|
}
|
|
@@ -779,12 +779,12 @@ class re {
|
|
|
779
779
|
}
|
|
780
780
|
const Q = /* @__PURE__ */ new WeakMap(), St = At(class extends ie {
|
|
781
781
|
render(r) {
|
|
782
|
-
return
|
|
782
|
+
return l;
|
|
783
783
|
}
|
|
784
784
|
update(r, [t]) {
|
|
785
785
|
var s;
|
|
786
786
|
const e = t !== this.G;
|
|
787
|
-
return e && this.G !== void 0 && this.ot(void 0), (e || this.rt !== this.lt) && (this.G = t, this.ct = (s = r.options) == null ? void 0 : s.host, this.ot(this.lt = r.element)),
|
|
787
|
+
return e && this.G !== void 0 && this.ot(void 0), (e || this.rt !== this.lt) && (this.G = t, this.ct = (s = r.options) == null ? void 0 : s.host, this.ot(this.lt = r.element)), l;
|
|
788
788
|
}
|
|
789
789
|
ot(r) {
|
|
790
790
|
if (typeof this.G == "function") {
|
|
@@ -810,7 +810,7 @@ var ne = Object.defineProperty, oe = Object.getOwnPropertyDescriptor, z = (r, t,
|
|
|
810
810
|
(o = r[n]) && (i = (s ? o(t, e, i) : o(i)) || i);
|
|
811
811
|
return s && i && ne(t, e, i), i;
|
|
812
812
|
};
|
|
813
|
-
class v extends
|
|
813
|
+
class v extends $ {
|
|
814
814
|
constructor() {
|
|
815
815
|
super(...arguments), this.active = !1, this.loaded = !1, this.offset = 0, this.buttonRef = Ct();
|
|
816
816
|
}
|
|
@@ -829,90 +829,109 @@ class v extends f {
|
|
|
829
829
|
}
|
|
830
830
|
_applyBranding() {
|
|
831
831
|
var t;
|
|
832
|
-
(t = this.application) != null && t.settings &&
|
|
832
|
+
(t = this.application) != null && t.settings && wt(this.application.settings.branding, this);
|
|
833
833
|
}
|
|
834
834
|
async _renderSymbol() {
|
|
835
|
-
var
|
|
836
|
-
const t = (
|
|
835
|
+
var c, a, d;
|
|
836
|
+
const t = (c = this.application) == null ? void 0 : c.branding(), e = (a = t == null ? void 0 : t.graphics) == null ? void 0 : a.trigger;
|
|
837
837
|
if (e)
|
|
838
|
-
return
|
|
838
|
+
return f` <img src=${e} class="trigger-icon" alt="" /> `;
|
|
839
839
|
const s = (d = this.application) == null ? void 0 : d.triggerIcon;
|
|
840
840
|
if (!s)
|
|
841
|
-
return
|
|
841
|
+
return l;
|
|
842
842
|
const i = async (p) => await import("./index-5087564d.mjs").then(
|
|
843
843
|
(u) => u[p]
|
|
844
844
|
), { type: n, content: o } = s;
|
|
845
845
|
switch (n) {
|
|
846
846
|
case "Telia": {
|
|
847
847
|
const p = await i(o);
|
|
848
|
-
return p ?
|
|
848
|
+
return p ? f`<telia-icon
|
|
849
849
|
class="trigger-icon"
|
|
850
850
|
svg=${p.svg}
|
|
851
851
|
size="lg"
|
|
852
|
-
></telia-icon>` :
|
|
852
|
+
></telia-icon>` : l;
|
|
853
853
|
}
|
|
854
854
|
default:
|
|
855
|
-
return
|
|
855
|
+
return l;
|
|
856
856
|
}
|
|
857
857
|
}
|
|
858
858
|
setOffset(t) {
|
|
859
859
|
this.offset = t;
|
|
860
860
|
}
|
|
861
861
|
render() {
|
|
862
|
-
|
|
863
|
-
|
|
862
|
+
var t, e, s, i;
|
|
863
|
+
return f`<div class="trigger-container">
|
|
864
|
+
${(i = (s = (e = (t = this.application) == null ? void 0 : t.settings) == null ? void 0 : e.branding) == null ? void 0 : s.other) != null && i.showButtonLabel ? f`
|
|
865
|
+
<button class="trigger-label" @click=${this._toggleActive}>
|
|
866
|
+
${this.application.settings.branding.other.buttonLabelText}
|
|
867
|
+
</button>
|
|
868
|
+
` : l}
|
|
869
|
+
|
|
870
|
+
<button
|
|
871
|
+
class=${Ft({
|
|
864
872
|
trigger: !0,
|
|
865
873
|
active: this.active,
|
|
866
874
|
rendered: this.loaded
|
|
867
875
|
})}
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
fill="none"
|
|
878
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
879
|
-
>
|
|
880
|
-
<path
|
|
881
|
-
d="M9 9C8.81794 9.00045 8.63759 8.96634 8.46939 8.89965C8.3012 8.83295 8.14851 8.735 8.02015 8.61145L0.194523 1.12367C0.068294 0.99862 -0.00155266 0.831133 2.61958e-05 0.657285C0.00160506 0.483436 0.0744832 0.317136 0.202964 0.194202C0.331445 0.0712675 0.505249 0.00153576 0.686941 2.50649e-05C0.868634 -0.00148563 1.04368 0.0653456 1.17437 0.186125L9 7.6739L16.8256 0.186125C16.9563 0.0653456 17.1314 -0.00148563 17.3131 2.50649e-05C17.4948 0.00153576 17.6686 0.0712675 17.797 0.194202C17.9255 0.317136 17.9984 0.483436 18 0.657285C18.0016 0.831133 17.9317 0.99862 17.8055 1.12367L9.97985 8.61145C9.85149 8.735 9.6988 8.83295 9.53061 8.89965C9.36241 8.96634 9.18206 9.00045 9 9Z"
|
|
882
|
-
fill="white"
|
|
883
|
-
/>
|
|
884
|
-
</svg>
|
|
885
|
-
</span>
|
|
886
|
-
<span class="trigger-loader">
|
|
887
|
-
<svg viewBox="25 25 50 50">
|
|
888
|
-
<circle
|
|
889
|
-
cx="50"
|
|
890
|
-
cy="50"
|
|
891
|
-
r="20"
|
|
876
|
+
@click=${this._toggleActive}
|
|
877
|
+
${St(this.buttonRef)}
|
|
878
|
+
>
|
|
879
|
+
${this.icon}
|
|
880
|
+
<span class="trigger-close">
|
|
881
|
+
<svg
|
|
882
|
+
width="18"
|
|
883
|
+
height="9"
|
|
884
|
+
viewBox="0 0 18 9"
|
|
892
885
|
fill="none"
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
886
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
887
|
+
>
|
|
888
|
+
<path
|
|
889
|
+
d="M9 9C8.81794 9.00045 8.63759 8.96634 8.46939 8.89965C8.3012 8.83295 8.14851 8.735 8.02015 8.61145L0.194523 1.12367C0.068294 0.99862 -0.00155266 0.831133 2.61958e-05 0.657285C0.00160506 0.483436 0.0744832 0.317136 0.202964 0.194202C0.331445 0.0712675 0.505249 0.00153576 0.686941 2.50649e-05C0.868634 -0.00148563 1.04368 0.0653456 1.17437 0.186125L9 7.6739L16.8256 0.186125C16.9563 0.0653456 17.1314 -0.00148563 17.3131 2.50649e-05C17.4948 0.00153576 17.6686 0.0712675 17.797 0.194202C17.9255 0.317136 17.9984 0.483436 18 0.657285C18.0016 0.831133 17.9317 0.99862 17.8055 1.12367L9.97985 8.61145C9.85149 8.735 9.6988 8.83295 9.53061 8.89965C9.36241 8.96634 9.18206 9.00045 9 9Z"
|
|
890
|
+
fill="white"
|
|
891
|
+
/>
|
|
892
|
+
</svg>
|
|
893
|
+
</span>
|
|
894
|
+
<span class="trigger-loader">
|
|
895
|
+
<svg viewBox="25 25 50 50">
|
|
896
|
+
<circle
|
|
897
|
+
cx="50"
|
|
898
|
+
cy="50"
|
|
899
|
+
r="20"
|
|
900
|
+
fill="none"
|
|
901
|
+
stroke="#000"
|
|
902
|
+
stroke-width="2"
|
|
903
|
+
stroke-miterlimit="10"
|
|
904
|
+
/>
|
|
905
|
+
</svg>
|
|
906
|
+
</span>
|
|
907
|
+
</button>
|
|
908
|
+
</div>`;
|
|
900
909
|
}
|
|
901
910
|
}
|
|
902
911
|
v.styles = [
|
|
903
912
|
P`
|
|
904
913
|
:host {
|
|
905
914
|
--voca-rem-multiplier: 0.625;
|
|
915
|
+
--trigger-label-bg: #f5e0ff;
|
|
916
|
+
--trigger-label-text-color: rgba(0, 0, 0, 0.8);
|
|
906
917
|
display: block;
|
|
907
918
|
box-sizing: border-box;
|
|
919
|
+
/* font-family: var(--font-family); */
|
|
920
|
+
font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
|
|
908
921
|
}
|
|
909
922
|
|
|
910
|
-
.trigger {
|
|
923
|
+
.trigger-container {
|
|
911
924
|
position: fixed;
|
|
912
|
-
transform: scale(0);
|
|
913
|
-
box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
|
|
914
925
|
bottom: 20px;
|
|
915
926
|
right: 20px;
|
|
927
|
+
display: flex;
|
|
928
|
+
align-items: center;
|
|
929
|
+
gap: 1rem;
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
.trigger {
|
|
933
|
+
transform: scale(0);
|
|
934
|
+
box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
|
|
916
935
|
z-index: 5;
|
|
917
936
|
display: flex;
|
|
918
937
|
align-items: center;
|
|
@@ -972,6 +991,28 @@ v.styles = [
|
|
|
972
991
|
img {
|
|
973
992
|
max-width: 100%;
|
|
974
993
|
}
|
|
994
|
+
|
|
995
|
+
.trigger-label {
|
|
996
|
+
box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.1);
|
|
997
|
+
background-color: var(--trigger-label-bg);
|
|
998
|
+
color: var(--trigger-label-text-color);
|
|
999
|
+
white-space: nowrap;
|
|
1000
|
+
padding: 0.7rem 1rem;
|
|
1001
|
+
border-radius: 0.3rem;
|
|
1002
|
+
font-weight: 500;
|
|
1003
|
+
display: flex;
|
|
1004
|
+
justify-content: center;
|
|
1005
|
+
align-items: center;
|
|
1006
|
+
cursor: pointer;
|
|
1007
|
+
border: none;
|
|
1008
|
+
font-size: 1rem;
|
|
1009
|
+
font-family: inherit;
|
|
1010
|
+
transition: all 300ms ease-in-out;
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
.trigger-label:hover {
|
|
1014
|
+
opacity: 0.8;
|
|
1015
|
+
}
|
|
975
1016
|
`
|
|
976
1017
|
];
|
|
977
1018
|
z([
|
|
@@ -989,8 +1030,8 @@ z([
|
|
|
989
1030
|
z([
|
|
990
1031
|
T()
|
|
991
1032
|
], v.prototype, "offset", 2);
|
|
992
|
-
var ae = Object.defineProperty,
|
|
993
|
-
for (var i = s > 1 ? void 0 : s ?
|
|
1033
|
+
var ae = Object.defineProperty, ce = Object.getOwnPropertyDescriptor, A = (r, t, e, s) => {
|
|
1034
|
+
for (var i = s > 1 ? void 0 : s ? ce(t, e) : t, n = r.length - 1, o; n >= 0; n--)
|
|
994
1035
|
(o = r[n]) && (i = (s ? o(t, e, i) : o(i)) || i);
|
|
995
1036
|
return s && i && ae(t, e, i), i;
|
|
996
1037
|
};
|
|
@@ -1049,9 +1090,9 @@ const Pt = (r) => {
|
|
|
1049
1090
|
g({ attribute: !1 })
|
|
1050
1091
|
], t.prototype, "parent", 2), t;
|
|
1051
1092
|
};
|
|
1052
|
-
class Tt extends Pt(
|
|
1093
|
+
class Tt extends Pt($) {
|
|
1053
1094
|
render() {
|
|
1054
|
-
return
|
|
1095
|
+
return f`Non resolved component`;
|
|
1055
1096
|
}
|
|
1056
1097
|
}
|
|
1057
1098
|
Tt.styles = [
|
|
@@ -1066,19 +1107,19 @@ Tt.styles = [
|
|
|
1066
1107
|
* Copyright 2021 Google LLC
|
|
1067
1108
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1068
1109
|
*/
|
|
1069
|
-
function*
|
|
1110
|
+
function* le(r, t) {
|
|
1070
1111
|
if (r !== void 0) {
|
|
1071
1112
|
let e = 0;
|
|
1072
1113
|
for (const s of r)
|
|
1073
1114
|
yield t(s, e++);
|
|
1074
1115
|
}
|
|
1075
1116
|
}
|
|
1076
|
-
var et = /* @__PURE__ */ ((r) => (r.Inline = "inline", r.Trigger = "trigger", r))(et || {}),
|
|
1117
|
+
var et = /* @__PURE__ */ ((r) => (r.Inline = "inline", r.Trigger = "trigger", r))(et || {}), he = Object.defineProperty, de = Object.getOwnPropertyDescriptor, pe = (r, t, e, s) => {
|
|
1077
1118
|
for (var i = s > 1 ? void 0 : s ? de(t, e) : t, n = r.length - 1, o; n >= 0; n--)
|
|
1078
1119
|
(o = r[n]) && (i = (s ? o(t, e, i) : o(i)) || i);
|
|
1079
|
-
return s && i &&
|
|
1120
|
+
return s && i && he(t, e, i), i;
|
|
1080
1121
|
};
|
|
1081
|
-
class st extends
|
|
1122
|
+
class st extends $ {
|
|
1082
1123
|
constructor() {
|
|
1083
1124
|
super(...arguments), this.nodes = [], this.wrapperRef = Ct();
|
|
1084
1125
|
}
|
|
@@ -1089,7 +1130,7 @@ class st extends f {
|
|
|
1089
1130
|
if (!this.wrapperRef.value)
|
|
1090
1131
|
return;
|
|
1091
1132
|
const t = this.application.settings;
|
|
1092
|
-
t != null && t.branding &&
|
|
1133
|
+
t != null && t.branding && wt(t.branding, this.wrapperRef.value);
|
|
1093
1134
|
}
|
|
1094
1135
|
applyStyles() {
|
|
1095
1136
|
if (!this.wrapperRef.value)
|
|
@@ -1103,8 +1144,8 @@ class st extends f {
|
|
|
1103
1144
|
this.applyBranding(), this.applyStyles();
|
|
1104
1145
|
}
|
|
1105
1146
|
render() {
|
|
1106
|
-
return this.application.renderStrategy === et.Trigger && this.renderRoot.host.classList.add("floating"),
|
|
1107
|
-
${
|
|
1147
|
+
return this.application.renderStrategy === et.Trigger && this.renderRoot.host.classList.add("floating"), f`<div class="widget-container" ${St(this.wrapperRef)}>
|
|
1148
|
+
${le(this.nodes, (t) => t)}
|
|
1108
1149
|
</div>`;
|
|
1109
1150
|
}
|
|
1110
1151
|
}
|
|
@@ -1208,7 +1249,7 @@ var ue = Object.defineProperty, ge = Object.getOwnPropertyDescriptor, it = (r, t
|
|
|
1208
1249
|
(o = r[n]) && (i = (s ? o(t, e, i) : o(i)) || i);
|
|
1209
1250
|
return s && i && ue(t, e, i), i;
|
|
1210
1251
|
};
|
|
1211
|
-
class
|
|
1252
|
+
class B extends $ {
|
|
1212
1253
|
constructor() {
|
|
1213
1254
|
super(), this.status = "deactivated", this.addEventListener("environment-created", this.onEnvironmentCreated);
|
|
1214
1255
|
}
|
|
@@ -1232,7 +1273,7 @@ class D extends f {
|
|
|
1232
1273
|
}
|
|
1233
1274
|
render() {
|
|
1234
1275
|
if (!this.widget || this.status !== "activated")
|
|
1235
|
-
return
|
|
1276
|
+
return l;
|
|
1236
1277
|
if (this.widget.renderStrategy === et.Trigger) {
|
|
1237
1278
|
const t = new v();
|
|
1238
1279
|
return t.application = this.widget, t;
|
|
@@ -1240,7 +1281,7 @@ class D extends f {
|
|
|
1240
1281
|
return this.widget.render();
|
|
1241
1282
|
}
|
|
1242
1283
|
}
|
|
1243
|
-
|
|
1284
|
+
B.styles = [
|
|
1244
1285
|
P`
|
|
1245
1286
|
:host {
|
|
1246
1287
|
display: block;
|
|
@@ -1249,30 +1290,30 @@ D.styles = [
|
|
|
1249
1290
|
];
|
|
1250
1291
|
it([
|
|
1251
1292
|
g({ attribute: !0 })
|
|
1252
|
-
],
|
|
1293
|
+
], B.prototype, "name", 2);
|
|
1253
1294
|
it([
|
|
1254
1295
|
T()
|
|
1255
|
-
],
|
|
1296
|
+
], B.prototype, "widget", 2);
|
|
1256
1297
|
it([
|
|
1257
1298
|
T()
|
|
1258
|
-
],
|
|
1299
|
+
], B.prototype, "status", 2);
|
|
1259
1300
|
customElements.get("ace-trigger") || customElements.define("ace-trigger", v);
|
|
1260
1301
|
customElements.get("ace-unresolved-component") || customElements.define("ace-unresolved-component", Tt);
|
|
1261
1302
|
customElements.get("ace-wrapper") || customElements.define("ace-wrapper", st);
|
|
1262
|
-
customElements.get("ace-widget") || customElements.define("ace-widget",
|
|
1263
|
-
const Ot = Pt(
|
|
1303
|
+
customElements.get("ace-widget") || customElements.define("ace-widget", B);
|
|
1304
|
+
const Ot = Pt($);
|
|
1264
1305
|
class fe extends Ot {
|
|
1265
1306
|
render() {
|
|
1266
1307
|
var n;
|
|
1267
1308
|
const t = this.application.branding(), e = (n = t == null ? void 0 : t.graphics) == null ? void 0 : n.logotype, i = this.application.texts.get("widget-header.header", "ACE Widget");
|
|
1268
|
-
return
|
|
1309
|
+
return f` <div class="widget-header">
|
|
1269
1310
|
<!-- <telia-icon svg={aiRobot.svg} size="lg"></telia-icon> -->
|
|
1270
|
-
${e ?
|
|
1311
|
+
${e ? f` <img src=${e} class="logotype" alt="" />` : l}
|
|
1271
1312
|
|
|
1272
1313
|
<div>
|
|
1273
1314
|
<h1>${i}</h1>
|
|
1274
1315
|
|
|
1275
|
-
${this.properties.tagline ?
|
|
1316
|
+
${this.properties.tagline ? f`<p>${this.properties.tagline}</p>` : l}
|
|
1276
1317
|
</div>
|
|
1277
1318
|
</div>`;
|
|
1278
1319
|
}
|
|
@@ -6,21 +6,21 @@
|
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:Rt,defineProperty:
|
|
9
|
+
*/const{is:Rt,defineProperty:Ht,getOwnPropertyDescriptor:Mt,getOwnPropertyNames:Lt,getOwnPropertySymbols:zt,getPrototypeOf:Bt}=Object,v=globalThis,at=v.trustedTypes,Dt=at?at.emptyScript:"",Y=v.reactiveElementPolyfillSupport,U=(r,t)=>r,W={toAttribute(r,t){switch(t){case Boolean:r=r?Dt:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},tt=(r,t)=>!Rt(r,t),ct={attribute:!0,type:String,converter:W,reflect:!1,hasChanged:tt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),v.litPropertyMetadata??(v.litPropertyMetadata=new WeakMap);class C extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=ct){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Ht(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:n}=Mt(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get(){return i==null?void 0:i.call(this)},set(o){const c=i==null?void 0:i.call(this);n.call(this,o),this.requestUpdate(t,c,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??ct}static _$Ei(){if(this.hasOwnProperty(U("elementProperties")))return;const t=Bt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(U("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(U("properties"))){const e=this.properties,s=[...Lt(e),...zt(e)];for(const i of s)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(ot(i))}else t!==void 0&&e.push(ot(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$Eg=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$ES??(this._$ES=[])).push(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$ES)==null||e.splice(this._$ES.indexOf(t)>>>0,1)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Nt(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)==null||t.forEach(e=>{var s;return(s=e.hostConnected)==null?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)==null||t.forEach(e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EO(t,e){var n;const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){const o=(((n=s.converter)==null?void 0:n.toAttribute)!==void 0?s.converter:W).toAttribute(e,s.type);this._$Em=t,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,e){var n;const s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const o=s.getPropertyOptions(i),c=typeof o.converter=="function"?{fromAttribute:o.converter}:((n=o.converter)==null?void 0:n.fromAttribute)!==void 0?o.converter:W;this._$Em=i,this[i]=c.fromAttribute(e,o.type),this._$Em=null}}requestUpdate(t,e,s,i=!1,n){if(t!==void 0){if(s??(s=this.constructor.getPropertyOptions(t)),!(s.hasChanged??tt)(i?n:this[t],e))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$Eg=this._$EP())}C(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this._$Ep){for(const[n,o]of this._$Ep)this[n]=o;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[n,o]of i)o.wrapped!==!0||this._$AL.has(n)||this[n]===void 0||this.C(n,this[n],o)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$ES)==null||s.forEach(i=>{var n;return(n=i.hostUpdate)==null?void 0:n.call(i)}),this.update(e)):this._$ET()}catch(i){throw t=!1,this._$ET(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)==null||e.forEach(s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EO(e,this[e]))),this._$ET()}updated(t){}firstUpdated(t){}}C.elementStyles=[],C.shadowRootOptions={mode:"open"},C[U("elementProperties")]=new Map,C[U("finalized")]=new Map,Y==null||Y({ReactiveElement:C}),(v.reactiveElementVersions??(v.reactiveElementVersions=[])).push("2.0.1");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const k=globalThis,G=k.trustedTypes,
|
|
14
|
-
\f\r]`,O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),pt=/'/g,ut=/"/g,
|
|
13
|
+
*/const k=globalThis,G=k.trustedTypes,lt=G?G.createPolicy("lit-html",{createHTML:r=>r}):void 0,mt="$lit$",y=`lit$${(Math.random()+"").slice(9)}$`,yt="?"+y,jt=`<${yt}>`,x=document,R=()=>x.createComment(""),H=r=>r===null||typeof r!="object"&&typeof r!="function",vt=Array.isArray,It=r=>vt(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",J=`[
|
|
14
|
+
\f\r]`,O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ht=/-->/g,dt=/>/g,b=RegExp(`>|${J}(?:([^\\s"'>=/]+)(${J}*=${J}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),pt=/'/g,ut=/"/g,_t=/^(?:script|style|textarea|title)$/i,Wt=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),f=Wt(1),E=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),gt=new WeakMap,w=x.createTreeWalker(x,129);function bt(r,t){if(!Array.isArray(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return lt!==void 0?lt.createHTML(t):t}const Gt=(r,t)=>{const e=r.length-1,s=[];let i,n=t===2?"<svg>":"",o=O;for(let c=0;c<e;c++){const a=r[c];let d,p,h=-1,u=0;for(;u<a.length&&(o.lastIndex=u,p=o.exec(a),p!==null);)u=o.lastIndex,o===O?p[1]==="!--"?o=ht:p[1]!==void 0?o=dt:p[2]!==void 0?(_t.test(p[2])&&(i=RegExp("</"+p[2],"g")),o=b):p[3]!==void 0&&(o=b):o===b?p[0]===">"?(o=i??O,h=-1):p[1]===void 0?h=-2:(h=o.lastIndex-p[2].length,d=p[1],o=p[3]===void 0?b:p[3]==='"'?ut:pt):o===ut||o===pt?o=b:o===ht||o===dt?o=O:(o=b,i=void 0);const m=o===b&&r[c+1].startsWith("/>")?" ":"";n+=o===O?a+jt:h>=0?(s.push(d),a.slice(0,h)+mt+a.slice(h)+y+m):a+y+(h===-2?c:m)}return[bt(r,n+(r[e]||"<?>")+(t===2?"</svg>":"")),s]};class M{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,o=0;const c=t.length-1,a=this.parts,[d,p]=Gt(t,e);if(this.el=M.createElement(d,s),w.currentNode=this.el.content,e===2){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(i=w.nextNode())!==null&&a.length<c;){if(i.nodeType===1){if(i.hasAttributes())for(const h of i.getAttributeNames())if(h.endsWith(mt)){const u=p[o++],m=i.getAttribute(h).split(y),D=/([.?@])?(.*)/.exec(u);a.push({type:1,index:n,name:D[2],strings:m,ctor:D[1]==="."?qt:D[1]==="?"?Yt:D[1]==="@"?Jt:q}),i.removeAttribute(h)}else h.startsWith(y)&&(a.push({type:6,index:n}),i.removeAttribute(h));if(_t.test(i.tagName)){const h=i.textContent.split(y),u=h.length-1;if(u>0){i.textContent=G?G.emptyScript:"";for(let m=0;m<u;m++)i.append(h[m],R()),w.nextNode(),a.push({type:2,index:++n});i.append(h[u],R())}}}else if(i.nodeType===8)if(i.data===yt)a.push({type:2,index:n});else{let h=-1;for(;(h=i.data.indexOf(y,h+1))!==-1;)a.push({type:7,index:n}),h+=y.length-1}n++}}static createElement(t,e){const s=x.createElement("template");return s.innerHTML=t,s}}function S(r,t,e=r,s){var o,c;if(t===E)return t;let i=s!==void 0?(o=e._$Co)==null?void 0:o[s]:e._$Cl;const n=H(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==n&&((c=i==null?void 0:i._$AO)==null||c.call(i,!1),n===void 0?i=void 0:(i=new n(r),i._$AT(r,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=i:e._$Cl=i),i!==void 0&&(t=S(r,i._$AS(r,t.values),i,s)),t}class Vt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=((t==null?void 0:t.creationScope)??x).importNode(e,!0);w.currentNode=i;let n=w.nextNode(),o=0,c=0,a=s[0];for(;a!==void 0;){if(o===a.index){let d;a.type===2?d=new L(n,n.nextSibling,this,t):a.type===1?d=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(d=new Kt(n,this,t)),this._$AV.push(d),a=s[++c]}o!==(a==null?void 0:a.index)&&(n=w.nextNode(),o++)}return w.currentNode=x,i}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class L{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=l,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=(i==null?void 0:i.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=S(this,t,e),H(t)?t===l||t==null||t===""?(this._$AH!==l&&this._$AR(),this._$AH=l):t!==this._$AH&&t!==E&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):It(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==l&&H(this._$AH)?this._$AA.nextSibling.data=t:this.$(x.createTextNode(t)),this._$AH=t}g(t){var n;const{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=M.createElement(bt(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)==null?void 0:n._$AD)===i)this._$AH.p(e);else{const o=new Vt(i,this),c=o.u(this.options);o.p(e),this.$(c),this._$AH=o}}_$AC(t){let e=gt.get(t.strings);return e===void 0&>.set(t.strings,e=new M(t)),e}T(t){vt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new L(this.k(R()),this.k(R()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class q{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=l,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=l}_$AI(t,e=this,s,i){const n=this.strings;let o=!1;if(n===void 0)t=S(this,t,e,0),o=!H(t)||t!==this._$AH&&t!==E,o&&(this._$AH=t);else{const c=t;let a,d;for(t=n[0],a=0;a<n.length-1;a++)d=S(this,c[s+a],e,a),d===E&&(d=this._$AH[a]),o||(o=!H(d)||d!==this._$AH[a]),d===l?t=l:t!==l&&(t+=(d??"")+n[a+1]),this._$AH[a]=d}o&&!i&&this.O(t)}O(t){t===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class qt extends q{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===l?void 0:t}}class Yt extends q{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==l)}}class Jt extends q{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=S(this,t,e,0)??l)===E)return;const s=this._$AH,i=t===l&&s!==l||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==l&&(s===l||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class Kt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}}const K=k.litHtmlPolyfillSupport;K==null||K(M,L),(k.litHtmlVersions??(k.litHtmlVersions=[])).push("3.0.2");const Zt=(r,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let i=s._$litPart$;if(i===void 0){const n=(e==null?void 0:e.renderBefore)??null;s._$litPart$=i=new L(t.insertBefore(R(),n),n,void 0,e??{})}return i._$AI(r),i};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/let
|
|
19
|
+
*/let $=class extends C{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Zt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return E}};var ft;$._$litElement$=!0,$.finalized=!0,(ft=globalThis.litElementHydrateSupport)==null||ft.call(globalThis,{LitElement:$});const Z=globalThis.litElementPolyfillSupport;Z==null||Z({LitElement:$});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.1");/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/const Qt={attribute:!0,type:String,converter:W,reflect:!1,hasChanged:tt},Ft=(r=Qt,t,e)=>{const{kind:s,metadata:i}=e;let n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),n.set(e.name,r),s==="accessor"){const{name:o}=e;return{set(
|
|
23
|
+
*/const Qt={attribute:!0,type:String,converter:W,reflect:!1,hasChanged:tt},Ft=(r=Qt,t,e)=>{const{kind:s,metadata:i}=e;let n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),n.set(e.name,r),s==="accessor"){const{name:o}=e;return{set(c){const a=t.get.call(this);t.set.call(this,c),this.requestUpdate(o,a,r)},init(c){return c!==void 0&&this.C(o,void 0,r),c}}}if(s==="setter"){const{name:o}=e;return function(c){const a=this[o];t.call(this,c),this.requestUpdate(o,a,r)}}throw Error("Unsupported decorator location: "+s)};function g(r){return(t,e)=>typeof e=="object"?Ft(r,t,e):((s,i,n)=>{const o=i.hasOwnProperty(n);return i.constructor.createProperty(n,o?{...s,wrapped:!0}:s),o?Object.getOwnPropertyDescriptor(i,n):void 0})(r,t,e)}/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -44,56 +44,74 @@
|
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2020 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
|
-
*/const St=()=>new ne;class ne{}const Q=new WeakMap,Pt=wt(class extends re{render(r){return
|
|
47
|
+
*/const St=()=>new ne;class ne{}const Q=new WeakMap,Pt=wt(class extends re{render(r){return l}update(r,[t]){var s;const e=t!==this.G;return e&&this.G!==void 0&&this.ot(void 0),(e||this.rt!==this.lt)&&(this.G=t,this.ct=(s=r.options)==null?void 0:s.host,this.ot(this.lt=r.element)),l}ot(r){if(typeof this.G=="function"){const t=this.ct??globalThis;let e=Q.get(t);e===void 0&&(e=new WeakMap,Q.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ct,void 0),e.set(this.G,r),r!==void 0&&this.G.call(this.ct,r)}else this.G.value=r}get rt(){var r,t;return typeof this.G=="function"?(r=Q.get(this.ct??globalThis))==null?void 0:r.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}});var oe=Object.defineProperty,ae=Object.getOwnPropertyDescriptor,z=(r,t,e,s)=>{for(var i=s>1?void 0:s?ae(t,e):t,n=r.length-1,o;n>=0;n--)(o=r[n])&&(i=(s?o(t,e,i):o(i))||i);return s&&i&&oe(t,e,i),i};class _ extends ${constructor(){super(...arguments),this.active=!1,this.loaded=!1,this.offset=0,this.buttonRef=St()}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(),this.loaded=!0,this._applyBranding(),this.offset>0&&this.buttonRef.value&&(this.buttonRef.value.style.right=`calc(${this.offset}px + 20px)`)}_toggleActive(){var t;if(!((t=this.application)!=null&&t.root)){console.warn("Could not activate widget. No root element assigned to widget.");return}this.active=!this.active,this.active?this.application.appendToDOM():this.application.hide()}_applyBranding(){var t;(t=this.application)!=null&&t.settings&&Et(this.application.settings.branding,this)}async _renderSymbol(){var c,a,d;const t=(c=this.application)==null?void 0:c.branding(),e=(a=t==null?void 0:t.graphics)==null?void 0:a.trigger;if(e)return f` <img src=${e} class="trigger-icon" alt="" /> `;const s=(d=this.application)==null?void 0:d.triggerIcon;if(!s)return l;const i=async p=>await Promise.resolve().then(()=>require("./index-6dd00f59.js")).then(u=>u[p]),{type:n,content:o}=s;switch(n){case"Telia":{const p=await i(o);return p?f`<telia-icon
|
|
48
48
|
class="trigger-icon"
|
|
49
49
|
svg=${p.svg}
|
|
50
50
|
size="lg"
|
|
51
|
-
></telia-icon>`:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
>
|
|
65
|
-
<
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
</svg>
|
|
70
|
-
</span>
|
|
71
|
-
<span class="trigger-loader">
|
|
72
|
-
<svg viewBox="25 25 50 50">
|
|
73
|
-
<circle
|
|
74
|
-
cx="50"
|
|
75
|
-
cy="50"
|
|
76
|
-
r="20"
|
|
51
|
+
></telia-icon>`:l}default:return l}}setOffset(t){this.offset=t}render(){var t,e,s,i;return f`<div class="trigger-container">
|
|
52
|
+
${(i=(s=(e=(t=this.application)==null?void 0:t.settings)==null?void 0:e.branding)==null?void 0:s.other)!=null&&i.showButtonLabel?f`
|
|
53
|
+
<button class="trigger-label" @click=${this._toggleActive}>
|
|
54
|
+
${this.application.settings.branding.other.buttonLabelText}
|
|
55
|
+
</button>
|
|
56
|
+
`:l}
|
|
57
|
+
|
|
58
|
+
<button
|
|
59
|
+
class=${Xt({trigger:!0,active:this.active,rendered:this.loaded})}
|
|
60
|
+
@click=${this._toggleActive}
|
|
61
|
+
${Pt(this.buttonRef)}
|
|
62
|
+
>
|
|
63
|
+
${this.icon}
|
|
64
|
+
<span class="trigger-close">
|
|
65
|
+
<svg
|
|
66
|
+
width="18"
|
|
67
|
+
height="9"
|
|
68
|
+
viewBox="0 0 18 9"
|
|
77
69
|
fill="none"
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
70
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
71
|
+
>
|
|
72
|
+
<path
|
|
73
|
+
d="M9 9C8.81794 9.00045 8.63759 8.96634 8.46939 8.89965C8.3012 8.83295 8.14851 8.735 8.02015 8.61145L0.194523 1.12367C0.068294 0.99862 -0.00155266 0.831133 2.61958e-05 0.657285C0.00160506 0.483436 0.0744832 0.317136 0.202964 0.194202C0.331445 0.0712675 0.505249 0.00153576 0.686941 2.50649e-05C0.868634 -0.00148563 1.04368 0.0653456 1.17437 0.186125L9 7.6739L16.8256 0.186125C16.9563 0.0653456 17.1314 -0.00148563 17.3131 2.50649e-05C17.4948 0.00153576 17.6686 0.0712675 17.797 0.194202C17.9255 0.317136 17.9984 0.483436 18 0.657285C18.0016 0.831133 17.9317 0.99862 17.8055 1.12367L9.97985 8.61145C9.85149 8.735 9.6988 8.83295 9.53061 8.89965C9.36241 8.96634 9.18206 9.00045 9 9Z"
|
|
74
|
+
fill="white"
|
|
75
|
+
/>
|
|
76
|
+
</svg>
|
|
77
|
+
</span>
|
|
78
|
+
<span class="trigger-loader">
|
|
79
|
+
<svg viewBox="25 25 50 50">
|
|
80
|
+
<circle
|
|
81
|
+
cx="50"
|
|
82
|
+
cy="50"
|
|
83
|
+
r="20"
|
|
84
|
+
fill="none"
|
|
85
|
+
stroke="#000"
|
|
86
|
+
stroke-width="2"
|
|
87
|
+
stroke-miterlimit="10"
|
|
88
|
+
/>
|
|
89
|
+
</svg>
|
|
90
|
+
</span>
|
|
91
|
+
</button>
|
|
92
|
+
</div>`}}_.styles=[P`
|
|
85
93
|
:host {
|
|
86
94
|
--voca-rem-multiplier: 0.625;
|
|
95
|
+
--trigger-label-bg: #f5e0ff;
|
|
96
|
+
--trigger-label-text-color: rgba(0, 0, 0, 0.8);
|
|
87
97
|
display: block;
|
|
88
98
|
box-sizing: border-box;
|
|
99
|
+
/* font-family: var(--font-family); */
|
|
100
|
+
font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
|
|
89
101
|
}
|
|
90
102
|
|
|
91
|
-
.trigger {
|
|
103
|
+
.trigger-container {
|
|
92
104
|
position: fixed;
|
|
93
|
-
transform: scale(0);
|
|
94
|
-
box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
|
|
95
105
|
bottom: 20px;
|
|
96
106
|
right: 20px;
|
|
107
|
+
display: flex;
|
|
108
|
+
align-items: center;
|
|
109
|
+
gap: 1rem;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.trigger {
|
|
113
|
+
transform: scale(0);
|
|
114
|
+
box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
|
|
97
115
|
z-index: 5;
|
|
98
116
|
display: flex;
|
|
99
117
|
align-items: center;
|
|
@@ -153,7 +171,29 @@
|
|
|
153
171
|
img {
|
|
154
172
|
max-width: 100%;
|
|
155
173
|
}
|
|
156
|
-
|
|
174
|
+
|
|
175
|
+
.trigger-label {
|
|
176
|
+
box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.1);
|
|
177
|
+
background-color: var(--trigger-label-bg);
|
|
178
|
+
color: var(--trigger-label-text-color);
|
|
179
|
+
white-space: nowrap;
|
|
180
|
+
padding: 0.7rem 1rem;
|
|
181
|
+
border-radius: 0.3rem;
|
|
182
|
+
font-weight: 500;
|
|
183
|
+
display: flex;
|
|
184
|
+
justify-content: center;
|
|
185
|
+
align-items: center;
|
|
186
|
+
cursor: pointer;
|
|
187
|
+
border: none;
|
|
188
|
+
font-size: 1rem;
|
|
189
|
+
font-family: inherit;
|
|
190
|
+
transition: all 300ms ease-in-out;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.trigger-label:hover {
|
|
194
|
+
opacity: 0.8;
|
|
195
|
+
}
|
|
196
|
+
`];z([g({attribute:!1})],_.prototype,"application",2);z([T()],_.prototype,"active",2);z([T()],_.prototype,"loaded",2);z([T()],_.prototype,"icon",2);z([T()],_.prototype,"offset",2);var ce=Object.defineProperty,le=Object.getOwnPropertyDescriptor,A=(r,t,e,s)=>{for(var i=s>1?void 0:s?le(t,e):t,n=r.length-1,o;n>=0;n--)(o=r[n])&&(i=(s?o(t,e,i):o(i))||i);return s&&i&&ce(t,e,i),i};const Tt=r=>{class t extends r{constructor(){super(...arguments),this.properties={},this.context={},this.layout={},this.nodes=[]}writeProperties(s){this.properties=s}writeLayout(s){this.layout=s}writeContext(s){this.context=s}addChild(s){s.parent=this,this.nodes.push(s)}connectedCallback(){super.connectedCallback(),this.renderRoot.host.style.setProperty("--width",this.layout.size==="full"?"var(--columns, 1)":`min(${this.layout.size||"var(--columns)"}, var(--columns))`)}}return t.styles=[P`
|
|
157
197
|
:host {
|
|
158
198
|
font-family: var(--font-family);
|
|
159
199
|
grid-column: span var(--width);
|
|
@@ -165,7 +205,7 @@
|
|
|
165
205
|
* {
|
|
166
206
|
box-sizing: border-box;
|
|
167
207
|
}
|
|
168
|
-
`],A([g()],t.prototype,"properties",2),A([g()],t.prototype,"context",2),A([g()],t.prototype,"layout",2),A([g()],t.prototype,"name",2),A([g()],t.prototype,"type",2),A([g({attribute:!1})],t.prototype,"application",2),A([g({attribute:!1})],t.prototype,"parent",2),t};class Ot extends Tt(
|
|
208
|
+
`],A([g()],t.prototype,"properties",2),A([g()],t.prototype,"context",2),A([g()],t.prototype,"layout",2),A([g()],t.prototype,"name",2),A([g()],t.prototype,"type",2),A([g({attribute:!1})],t.prototype,"application",2),A([g({attribute:!1})],t.prototype,"parent",2),t};class Ot extends Tt($){render(){return f`Non resolved component`}}Ot.styles=[P`
|
|
169
209
|
:host {
|
|
170
210
|
display: block;
|
|
171
211
|
}
|
|
@@ -173,8 +213,8 @@
|
|
|
173
213
|
* @license
|
|
174
214
|
* Copyright 2021 Google LLC
|
|
175
215
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
176
|
-
*/function*
|
|
177
|
-
${
|
|
216
|
+
*/function*he(r,t){if(r!==void 0){let e=0;for(const s of r)yield t(s,e++)}}var et=(r=>(r.Inline="inline",r.Trigger="trigger",r))(et||{}),de=Object.defineProperty,pe=Object.getOwnPropertyDescriptor,ue=(r,t,e,s)=>{for(var i=s>1?void 0:s?pe(t,e):t,n=r.length-1,o;n>=0;n--)(o=r[n])&&(i=(s?o(t,e,i):o(i))||i);return s&&i&&de(t,e,i),i};class st extends ${constructor(){super(...arguments),this.nodes=[],this.wrapperRef=St()}addChild(t){t.parent=this,this.nodes.push(t)}applyBranding(){if(!this.wrapperRef.value)return;const t=this.application.settings;t!=null&&t.branding&&Et(t.branding,this.wrapperRef.value)}applyStyles(){if(!this.wrapperRef.value)return;const t=this.application.styles(),e=this.wrapperRef.value;Object.entries(t).forEach(([s,i])=>{e.style.setProperty(`--${s}`,i)})}firstUpdated(t){this.applyBranding(),this.applyStyles()}render(){return this.application.renderStrategy===et.Trigger&&this.renderRoot.host.classList.add("floating"),f`<div class="widget-container" ${Pt(this.wrapperRef)}>
|
|
217
|
+
${he(this.nodes,t=>t)}
|
|
178
218
|
</div>`}}st.styles=P`
|
|
179
219
|
:host {
|
|
180
220
|
--font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
|
|
@@ -266,18 +306,18 @@
|
|
|
266
306
|
opacity: 0;
|
|
267
307
|
animation: slideDown 0.3s linear;
|
|
268
308
|
}
|
|
269
|
-
`;ue([g({attribute:!1})],st.prototype,"application",2);var ge=Object.defineProperty,fe=Object.getOwnPropertyDescriptor,it=(r,t,e,s)=>{for(var i=s>1?void 0:s?fe(t,e):t,n=r.length-1,o;n>=0;n--)(o=r[n])&&(i=(s?o(t,e,i):o(i))||i);return s&&i&&ge(t,e,i),i};class
|
|
309
|
+
`;ue([g({attribute:!1})],st.prototype,"application",2);var ge=Object.defineProperty,fe=Object.getOwnPropertyDescriptor,it=(r,t,e,s)=>{for(var i=s>1?void 0:s?fe(t,e):t,n=r.length-1,o;n>=0;n--)(o=r[n])&&(i=(s?o(t,e,i):o(i))||i);return s&&i&&ge(t,e,i),i};class B extends ${constructor(){super(),this.status="deactivated",this.addEventListener("environment-created",this.onEnvironmentCreated)}async connectedCallback(){super.connectedCallback(),await this.getGlobalEnvironment()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("environment-created",this.onEnvironmentCreated)}async onEnvironmentCreated(t){this.widget=t.detail.widget,await this.activate(),this.requestUpdate()}async activate(){this.widget&&(await this.widget.activate(),this.status="activated")}async getGlobalEnvironment(){const t=globalThis.widgets;t&&(this.widget=t.applications.find(e=>e.name===this.name),await this.activate())}render(){if(!this.widget||this.status!=="activated")return l;if(this.widget.renderStrategy===et.Trigger){const t=new _;return t.application=this.widget,t}return this.widget.render()}}B.styles=[P`
|
|
270
310
|
:host {
|
|
271
311
|
display: block;
|
|
272
312
|
}
|
|
273
|
-
`];it([g({attribute:!0})],
|
|
313
|
+
`];it([g({attribute:!0})],B.prototype,"name",2);it([T()],B.prototype,"widget",2);it([T()],B.prototype,"status",2);customElements.get("ace-trigger")||customElements.define("ace-trigger",_);customElements.get("ace-unresolved-component")||customElements.define("ace-unresolved-component",Ot);customElements.get("ace-wrapper")||customElements.define("ace-wrapper",st);customElements.get("ace-widget")||customElements.define("ace-widget",B);const Ut=Tt($);class rt extends Ut{render(){var n;const t=this.application.branding(),e=(n=t==null?void 0:t.graphics)==null?void 0:n.logotype,i=this.application.texts.get("widget-header.header","ACE Widget");return f` <div class="widget-header">
|
|
274
314
|
<!-- <telia-icon svg={aiRobot.svg} size="lg"></telia-icon> -->
|
|
275
|
-
${e?
|
|
315
|
+
${e?f` <img src=${e} class="logotype" alt="" />`:l}
|
|
276
316
|
|
|
277
317
|
<div>
|
|
278
318
|
<h1>${i}</h1>
|
|
279
319
|
|
|
280
|
-
${this.properties.tagline?
|
|
320
|
+
${this.properties.tagline?f`<p>${this.properties.tagline}</p>`:l}
|
|
281
321
|
</div>
|
|
282
322
|
</div>`}}rt.styles=[Ut.styles||[],P`
|
|
283
323
|
:host {
|