@telia-ace/widget-components-area-flamingo 1.1.76 → 1.1.77

Sign up to get free protection for your applications and to get access to all the features.
@@ -300,7 +300,7 @@ k.elementStyles = [], k.shadowRootOptions = { mode: "open" }, k[M("elementProper
300
300
  */
301
301
  const N = globalThis, K = N.trustedTypes, Ot = K ? K.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, Gt = "$lit$", $ = `lit$${(Math.random() + "").slice(9)}$`, Xt = "?" + $, xe = `<${Xt}>`, E = document, H = () => E.createComment(""), I = (s) => s === null || typeof s != "object" && typeof s != "function", Jt = Array.isArray, Ce = (s) => Jt(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", it = `[
302
302
  \f\r]`, j = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Tt = /-->/g, kt = />/g, A = RegExp(`>|${it}(?:([^\\s"'>=/]+)(${it}*=${it}*(?:[^
303
- \f\r"'\`<>=]|("|')|))|$)`, "g"), Ut = /'/g, Rt = /"/g, Qt = /^(?:script|style|textarea|title)$/i, Se = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), C = Se(1), P = Symbol.for("lit-noChange"), u = Symbol.for("lit-nothing"), jt = /* @__PURE__ */ new WeakMap(), S = E.createTreeWalker(E, 129);
303
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Ut = /'/g, Rt = /"/g, Qt = /^(?:script|style|textarea|title)$/i, Se = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), C = Se(1), P = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), jt = /* @__PURE__ */ new WeakMap(), S = E.createTreeWalker(E, 129);
304
304
  function te(s, t) {
305
305
  if (!Array.isArray(s) || !s.hasOwnProperty("raw"))
306
306
  throw Error("invalid template strings array");
@@ -311,9 +311,9 @@ const Ee = (s, t) => {
311
311
  let r, o = t === 2 ? "<svg>" : "", n = j;
312
312
  for (let a = 0; a < e; a++) {
313
313
  const c = s[a];
314
- let h, l, p = -1, d = 0;
315
- for (; d < c.length && (n.lastIndex = d, l = n.exec(c), l !== null); )
316
- d = n.lastIndex, n === j ? l[1] === "!--" ? n = Tt : l[1] !== void 0 ? n = kt : l[2] !== void 0 ? (Qt.test(l[2]) && (r = RegExp("</" + l[2], "g")), n = A) : l[3] !== void 0 && (n = A) : n === A ? l[0] === ">" ? (n = r ?? j, p = -1) : l[1] === void 0 ? p = -2 : (p = n.lastIndex - l[2].length, h = l[1], n = l[3] === void 0 ? A : l[3] === '"' ? Rt : Ut) : n === Rt || n === Ut ? n = A : n === Tt || n === kt ? n = j : (n = A, r = void 0);
314
+ let h, l, p = -1, u = 0;
315
+ for (; u < c.length && (n.lastIndex = u, l = n.exec(c), l !== null); )
316
+ u = n.lastIndex, n === j ? l[1] === "!--" ? n = Tt : l[1] !== void 0 ? n = kt : l[2] !== void 0 ? (Qt.test(l[2]) && (r = RegExp("</" + l[2], "g")), n = A) : l[3] !== void 0 && (n = A) : n === A ? l[0] === ">" ? (n = r ?? j, p = -1) : l[1] === void 0 ? p = -2 : (p = n.lastIndex - l[2].length, h = l[1], n = l[3] === void 0 ? A : l[3] === '"' ? Rt : Ut) : n === Rt || n === Ut ? n = A : n === Tt || n === kt ? n = j : (n = A, r = void 0);
317
317
  const f = n === A && s[a + 1].startsWith("/>") ? " " : "";
318
318
  o += n === j ? c + xe : p >= 0 ? (i.push(h), c.slice(0, p) + Gt + c.slice(p) + $ + f) : c + $ + (p === -2 ? a : f);
319
319
  }
@@ -334,17 +334,17 @@ class D {
334
334
  if (r.hasAttributes())
335
335
  for (const p of r.getAttributeNames())
336
336
  if (p.endsWith(Gt)) {
337
- const d = l[n++], f = r.getAttribute(p).split($), T = /([.?@])?(.*)/.exec(d);
337
+ const u = l[n++], f = r.getAttribute(p).split($), T = /([.?@])?(.*)/.exec(u);
338
338
  c.push({ type: 1, index: o, name: T[2], strings: f, ctor: T[1] === "." ? Oe : T[1] === "?" ? Te : T[1] === "@" ? ke : Q }), r.removeAttribute(p);
339
339
  } else
340
340
  p.startsWith($) && (c.push({ type: 6, index: o }), r.removeAttribute(p));
341
341
  if (Qt.test(r.tagName)) {
342
- const p = r.textContent.split($), d = p.length - 1;
343
- if (d > 0) {
342
+ const p = r.textContent.split($), u = p.length - 1;
343
+ if (u > 0) {
344
344
  r.textContent = K ? K.emptyScript : "";
345
- for (let f = 0; f < d; f++)
345
+ for (let f = 0; f < u; f++)
346
346
  r.append(p[f], H()), S.nextNode(), c.push({ type: 2, index: ++o });
347
- r.append(p[d], H());
347
+ r.append(p[u], H());
348
348
  }
349
349
  }
350
350
  } else if (r.nodeType === 8)
@@ -406,7 +406,7 @@ class B {
406
406
  return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
407
407
  }
408
408
  constructor(t, e, i, r) {
409
- this.type = 2, this._$AH = u, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = r, this._$Cv = (r == null ? void 0 : r.isConnected) ?? !0;
409
+ this.type = 2, this._$AH = d, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = r, this._$Cv = (r == null ? void 0 : r.isConnected) ?? !0;
410
410
  }
411
411
  get parentNode() {
412
412
  let t = this._$AA.parentNode;
@@ -420,7 +420,7 @@ class B {
420
420
  return this._$AB;
421
421
  }
422
422
  _$AI(t, e = this) {
423
- t = U(this, t, e), I(t) ? t === u || t == null || t === "" ? (this._$AH !== u && this._$AR(), this._$AH = u) : t !== this._$AH && t !== P && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Ce(t) ? this.k(t) : this._(t);
423
+ t = U(this, t, e), I(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== P && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Ce(t) ? this.k(t) : this._(t);
424
424
  }
425
425
  S(t) {
426
426
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -429,7 +429,7 @@ class B {
429
429
  this._$AH !== t && (this._$AR(), this._$AH = this.S(t));
430
430
  }
431
431
  _(t) {
432
- this._$AH !== u && I(this._$AH) ? this._$AA.nextSibling.data = t : this.T(E.createTextNode(t)), this._$AH = t;
432
+ this._$AH !== d && I(this._$AH) ? this._$AA.nextSibling.data = t : this.T(E.createTextNode(t)), this._$AH = t;
433
433
  }
434
434
  $(t) {
435
435
  var o;
@@ -473,7 +473,7 @@ class Q {
473
473
  return this._$AM._$AU;
474
474
  }
475
475
  constructor(t, e, i, r, o) {
476
- this.type = 1, this._$AH = u, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = o, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = u;
476
+ this.type = 1, this._$AH = d, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = o, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = d;
477
477
  }
478
478
  _$AI(t, e = this, i, r) {
479
479
  const o = this.strings;
@@ -484,12 +484,12 @@ class Q {
484
484
  const a = t;
485
485
  let c, h;
486
486
  for (t = o[0], c = 0; c < o.length - 1; c++)
487
- h = U(this, a[i + c], e, c), h === P && (h = this._$AH[c]), n || (n = !I(h) || h !== this._$AH[c]), h === u ? t = u : t !== u && (t += (h ?? "") + o[c + 1]), this._$AH[c] = h;
487
+ h = U(this, a[i + c], e, c), h === P && (h = this._$AH[c]), n || (n = !I(h) || h !== this._$AH[c]), h === d ? t = d : t !== d && (t += (h ?? "") + o[c + 1]), this._$AH[c] = h;
488
488
  }
489
489
  n && !r && this.j(t);
490
490
  }
491
491
  j(t) {
492
- t === u ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
492
+ t === d ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
493
493
  }
494
494
  }
495
495
  class Oe extends Q {
@@ -497,7 +497,7 @@ class Oe extends Q {
497
497
  super(...arguments), this.type = 3;
498
498
  }
499
499
  j(t) {
500
- this.element[this.name] = t === u ? void 0 : t;
500
+ this.element[this.name] = t === d ? void 0 : t;
501
501
  }
502
502
  }
503
503
  class Te extends Q {
@@ -505,7 +505,7 @@ class Te extends Q {
505
505
  super(...arguments), this.type = 4;
506
506
  }
507
507
  j(t) {
508
- this.element.toggleAttribute(this.name, !!t && t !== u);
508
+ this.element.toggleAttribute(this.name, !!t && t !== d);
509
509
  }
510
510
  }
511
511
  class ke extends Q {
@@ -513,9 +513,9 @@ class ke extends Q {
513
513
  super(t, e, i, r, o), this.type = 5;
514
514
  }
515
515
  _$AI(t, e = this) {
516
- if ((t = U(this, t, e, 0) ?? u) === P)
516
+ if ((t = U(this, t, e, 0) ?? d) === P)
517
517
  return;
518
- const i = this._$AH, r = t === u && i !== u || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, o = t !== u && (i === u || r);
518
+ const i = this._$AH, r = t === d && i !== d || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, o = t !== d && (i === d || r);
519
519
  r && this.element.removeEventListener(this.name, this, i), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
520
520
  }
521
521
  handleEvent(t) {
@@ -665,7 +665,7 @@ var ot = ie(function(s) {
665
665
  `) : "", this.name = "UnsubscriptionError", this.errors = e;
666
666
  };
667
667
  });
668
- function ut(s, t) {
668
+ function dt(s, t) {
669
669
  if (s) {
670
670
  var e = s.indexOf(t);
671
671
  0 <= e && s.splice(e, 1);
@@ -710,7 +710,7 @@ var tt = function() {
710
710
  if (p) {
711
711
  this._finalizers = null;
712
712
  try {
713
- for (var d = pt(p), f = d.next(); !f.done; f = d.next()) {
713
+ for (var u = pt(p), f = u.next(); !f.done; f = u.next()) {
714
714
  var T = f.value;
715
715
  try {
716
716
  Mt(T);
@@ -722,7 +722,7 @@ var tt = function() {
722
722
  i = { error: v };
723
723
  } finally {
724
724
  try {
725
- f && !f.done && (r = d.return) && r.call(d);
725
+ f && !f.done && (r = u.return) && r.call(u);
726
726
  } finally {
727
727
  if (i)
728
728
  throw i.error;
@@ -753,10 +753,10 @@ var tt = function() {
753
753
  this._parentage = Array.isArray(e) ? (e.push(t), e) : e ? [e, t] : t;
754
754
  }, s.prototype._removeParent = function(t) {
755
755
  var e = this._parentage;
756
- e === t ? this._parentage = null : Array.isArray(e) && ut(e, t);
756
+ e === t ? this._parentage = null : Array.isArray(e) && dt(e, t);
757
757
  }, s.prototype.remove = function(t) {
758
758
  var e = this._finalizers;
759
- e && ut(e, t), t instanceof s && t._removeParent(this);
759
+ e && dt(e, t), t instanceof s && t._removeParent(this);
760
760
  }, s.EMPTY = function() {
761
761
  var t = new s();
762
762
  return t.closed = !0, t;
@@ -774,21 +774,21 @@ var oe = {
774
774
  Promise: void 0,
775
775
  useDeprecatedSynchronousErrorHandling: !1,
776
776
  useDeprecatedNextContext: !1
777
- }, dt = {
777
+ }, ut = {
778
778
  setTimeout: function(s, t) {
779
779
  for (var e = [], i = 2; i < arguments.length; i++)
780
780
  e[i - 2] = arguments[i];
781
- var r = dt.delegate;
781
+ var r = ut.delegate;
782
782
  return r != null && r.setTimeout ? r.setTimeout.apply(r, X([s, t], G(e))) : setTimeout.apply(void 0, X([s, t], G(e)));
783
783
  },
784
784
  clearTimeout: function(s) {
785
- var t = dt.delegate;
785
+ var t = ut.delegate;
786
786
  return ((t == null ? void 0 : t.clearTimeout) || clearTimeout)(s);
787
787
  },
788
788
  delegate: void 0
789
789
  };
790
790
  function je(s) {
791
- dt.setTimeout(function() {
791
+ ut.setTimeout(function() {
792
792
  throw s;
793
793
  });
794
794
  }
@@ -1054,7 +1054,7 @@ var We = ie(function(s) {
1054
1054
  }, t.prototype._innerSubscribe = function(e) {
1055
1055
  var i = this, r = this, o = r.hasError, n = r.isStopped, a = r.observers;
1056
1056
  return o || n ? se : (this.currentObservers = null, a.push(e), new tt(function() {
1057
- i.currentObservers = null, ut(a, e);
1057
+ i.currentObservers = null, dt(a, e);
1058
1058
  }));
1059
1059
  }, t.prototype._checkFinalizedStatuses = function(e) {
1060
1060
  var i = this, r = i.hasError, o = i.thrownError, n = i.isStopped;
@@ -1162,7 +1162,7 @@ class bt extends m {
1162
1162
  return (e = this.shadowRoot) == null || e.appendChild(t), t;
1163
1163
  }
1164
1164
  render() {
1165
- return this.anchor === "BottomLeft" ? this.renderRoot.host.classList.add("bottom-left") : this.anchor === "BottomRight" && this.renderRoot.host.classList.add("bottom-right"), u;
1165
+ return this.anchor === "BottomLeft" ? this.renderRoot.host.classList.add("bottom-left") : this.anchor === "BottomRight" && this.renderRoot.host.classList.add("bottom-right"), d;
1166
1166
  }
1167
1167
  }
1168
1168
  bt.styles = [
@@ -1329,7 +1329,7 @@ class oi extends he {
1329
1329
  (t = this.l) == null || t.call(this), this.l = void 0;
1330
1330
  }
1331
1331
  render(t) {
1332
- return u;
1332
+ return d;
1333
1333
  }
1334
1334
  getController() {
1335
1335
  return ei.get(this.u);
@@ -1461,8 +1461,8 @@ class oi extends he {
1461
1461
  const p = ct[c];
1462
1462
  if (h === void 0 || l === void 0)
1463
1463
  continue;
1464
- const d = p(h, l);
1465
- d.transform !== void 0 && (a[c] = d.value, n = !0, r.transform = `${r.transform ?? ""} ${d.transform}`, d.overrideFrom !== void 0 && Object.assign(r, d.overrideFrom));
1464
+ const u = p(h, l);
1465
+ u.transform !== void 0 && (a[c] = u.value, n = !0, r.transform = `${r.transform ?? ""} ${u.transform}`, u.overrideFrom !== void 0 && Object.assign(r, u.overrideFrom));
1466
1466
  } else
1467
1467
  h !== l && h !== void 0 && l !== void 0 && (n = !0, r[c] = h, o[c] = l);
1468
1468
  }
@@ -1565,14 +1565,14 @@ const Yt = _t(class extends ae {
1565
1565
  const pe = () => new ci();
1566
1566
  class ci {
1567
1567
  }
1568
- const ht = /* @__PURE__ */ new WeakMap(), ue = _t(class extends he {
1568
+ const ht = /* @__PURE__ */ new WeakMap(), de = _t(class extends he {
1569
1569
  render(s) {
1570
- return u;
1570
+ return d;
1571
1571
  }
1572
1572
  update(s, [t]) {
1573
1573
  var i;
1574
1574
  const e = t !== this.Y;
1575
- return e && this.Y !== void 0 && this.rt(void 0), (e || this.lt !== this.ct) && (this.Y = t, this.ht = (i = s.options) == null ? void 0 : i.host, this.rt(this.ct = s.element)), u;
1575
+ return e && this.Y !== void 0 && this.rt(void 0), (e || this.lt !== this.ct) && (this.Y = t, this.ht = (i = s.options) == null ? void 0 : i.host, this.rt(this.ct = s.element)), d;
1576
1576
  }
1577
1577
  rt(s) {
1578
1578
  if (typeof this.Y == "function") {
@@ -1616,7 +1616,22 @@ class w extends m {
1616
1616
  );
1617
1617
  return;
1618
1618
  }
1619
- this.active = !this.active, this.active ? (this.application.appendToDOM(), this.widgetActive$.next(!0), this.hideTrigger()) : (this.application.hide(), this.widgetActive$.next(!1), this.showTrigger());
1619
+ this.active = !this.active, this.active ? (this.application.appendToDOM(), this.notify("widget-set-active", {
1620
+ widgetId: this.application.id,
1621
+ active: !0
1622
+ }), this.widgetActive$.next(!0), this.hideTrigger()) : (this.application.hide(), this.notify("widget-set-active", {
1623
+ widgetId: this.application.id,
1624
+ active: !1
1625
+ }), this.widgetActive$.next(!1), this.showTrigger());
1626
+ }
1627
+ notify(t, e = {}) {
1628
+ window != null && window.parent && window.parent.postMessage(
1629
+ {
1630
+ type: t,
1631
+ data: e
1632
+ },
1633
+ "*"
1634
+ );
1620
1635
  }
1621
1636
  _applyBranding() {
1622
1637
  var t;
@@ -1629,7 +1644,7 @@ class w extends m {
1629
1644
  return C` <img src=${e} class="trigger-icon" alt="" /> `;
1630
1645
  const i = (h = this.application) == null ? void 0 : h.triggerIcon;
1631
1646
  if (!i)
1632
- return u;
1647
+ return d;
1633
1648
  const r = async (l) => ai, { type: o, content: n } = i;
1634
1649
  switch (o) {
1635
1650
  case "Telia": {
@@ -1638,10 +1653,10 @@ class w extends m {
1638
1653
  class="trigger-icon"
1639
1654
  svg=${l.svg}
1640
1655
  size="lg"
1641
- ></telia-icon>` : u;
1656
+ ></telia-icon>` : d;
1642
1657
  }
1643
1658
  default:
1644
- return u;
1659
+ return d;
1645
1660
  }
1646
1661
  }
1647
1662
  hideTrigger() {
@@ -1657,7 +1672,7 @@ class w extends m {
1657
1672
  "trigger-container": !0,
1658
1673
  hidden: !this.triggerVisible
1659
1674
  })}
1660
- ${ue(this.containerRef)}
1675
+ ${de(this.containerRef)}
1661
1676
  >
1662
1677
  ${!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) ? C`
1663
1678
  <button
@@ -1673,7 +1688,7 @@ class w extends m {
1673
1688
  >
1674
1689
  ${this.application.settings.branding.other.buttonLabelText}
1675
1690
  </button>
1676
- ` : u}
1691
+ ` : d}
1677
1692
 
1678
1693
  <button
1679
1694
  label="Widget trigger"
@@ -1863,12 +1878,12 @@ V([
1863
1878
  V([
1864
1879
  R()
1865
1880
  ], w.prototype, "icon", 2);
1866
- var pi = Object.defineProperty, ui = Object.getOwnPropertyDescriptor, x = (s, t, e, i) => {
1867
- for (var r = i > 1 ? void 0 : i ? ui(t, e) : t, o = s.length - 1, n; o >= 0; o--)
1881
+ var pi = Object.defineProperty, di = Object.getOwnPropertyDescriptor, x = (s, t, e, i) => {
1882
+ for (var r = i > 1 ? void 0 : i ? di(t, e) : t, o = s.length - 1, n; o >= 0; o--)
1868
1883
  (n = s[o]) && (r = (i ? n(t, e, r) : n(r)) || r);
1869
1884
  return i && r && pi(t, e, r), r;
1870
1885
  };
1871
- const de = (s) => {
1886
+ const ue = (s) => {
1872
1887
  class t extends s {
1873
1888
  constructor() {
1874
1889
  super(...arguments), this.properties = {}, this.context = {}, this.layout = {}, this.nodes = [];
@@ -1923,7 +1938,7 @@ const de = (s) => {
1923
1938
  g({ attribute: !1 })
1924
1939
  ], t.prototype, "parent", 2), t;
1925
1940
  };
1926
- class fe extends de(m) {
1941
+ class fe extends ue(m) {
1927
1942
  render() {
1928
1943
  return C`Non resolved component`;
1929
1944
  }
@@ -1941,7 +1956,7 @@ var wt = /* @__PURE__ */ ((s) => (s.Inline = "inline", s.Trigger = "trigger", s)
1941
1956
  * Copyright 2021 Google LLC
1942
1957
  * SPDX-License-Identifier: BSD-3-Clause
1943
1958
  */
1944
- let di = class extends Event {
1959
+ let ui = class extends Event {
1945
1960
  constructor(t, e, i) {
1946
1961
  super("context-request", { bubbles: !0, composed: !0 }), this.context = t, this.callback = e, this.subscribe = i ?? !1;
1947
1962
  }
@@ -2008,7 +2023,7 @@ class qt extends fi {
2008
2023
  return;
2009
2024
  const c = /* @__PURE__ */ new Set();
2010
2025
  for (const [h, { consumerHost: l }] of this.subscriptions)
2011
- c.has(h) || (c.add(h), l.dispatchEvent(new di(this.context, h, !0)));
2026
+ c.has(h) || (c.add(h), l.dispatchEvent(new ui(this.context, h, !0)));
2012
2027
  n.stopPropagation();
2013
2028
  }, this.host = t, e.context !== void 0 ? this.context = e.context : this.context = e, this.attachListeners(), (o = (r = this.host).addController) == null || o.call(r, this);
2014
2029
  }
@@ -2095,7 +2110,7 @@ class At extends m {
2095
2110
  render() {
2096
2111
  var i, r;
2097
2112
  const t = this.application.settings.components.conversation;
2098
- 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 === wt.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")), C`<div class="widget-container" ${ue(this.wrapperRef)}>
2113
+ 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 === wt.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")), window.self !== window.top && this.renderRoot.host.classList.add("embedded"), C`<div class="widget-container" ${de(this.wrapperRef)}>
2099
2114
  ${ee(this.nodes, (o) => o)}
2100
2115
  </div>`;
2101
2116
  }
@@ -2269,7 +2284,7 @@ class W extends m {
2269
2284
  }
2270
2285
  render() {
2271
2286
  if (!this.widget || this.status !== "activated")
2272
- return u;
2287
+ return d;
2273
2288
  if (this.widget.renderStrategy === wt.Trigger) {
2274
2289
  const t = new w();
2275
2290
  return t.application = this.widget, t;
@@ -2309,7 +2324,7 @@ const Ai = (s) => {
2309
2324
  s.style.setProperty(i.replace("css-", ""), r);
2310
2325
  });
2311
2326
  };
2312
- class Ci extends de(m) {
2327
+ class Ci extends ue(m) {
2313
2328
  constructor() {
2314
2329
  super(...arguments), this.nodes = [];
2315
2330
  }
@@ -66,7 +66,7 @@
66
66
  * @license
67
67
  * Copyright 2020 Google LLC
68
68
  * SPDX-License-Identifier: BSD-3-Clause
69
- */const ue=()=>new hi;class hi{}const ht=new WeakMap,de=_t(class extends le{render(s){return u}update(s,[t]){var i;const e=t!==this.Y;return e&&this.Y!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.Y=t,this.ht=(i=s.options)==null?void 0:i.host,this.rt(this.ct=s.element)),u}rt(s){if(typeof this.Y=="function"){const t=this.ht??globalThis;let e=ht.get(t);e===void 0&&(e=new WeakMap,ht.set(t,e)),e.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),e.set(this.Y,s),s!==void 0&&this.Y.call(this.ht,s)}else this.Y.value=s}get lt(){var s,t;return typeof this.Y=="function"?(s=ht.get(this.ht??globalThis))==null?void 0:s.get(this.Y):(t=this.Y)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var li=Object.defineProperty,pi=Object.getOwnPropertyDescriptor,V=(s,t,e,i)=>{for(var r=i>1?void 0:i?pi(t,e):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(r=(i?n(t,e,r):n(r))||r);return i&&r&&li(t,e,r),r};class w extends m{constructor(){super(...arguments),this.active=!1,this.triggerVisible=!0,this.loaded=!1,this.containerRef=ue(),this.widgetActive$=new Ye(!1),this.componentIsDestroyed$=new yt}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(),this.loaded=!0,this._applyBranding()}disconnectedCallback(){super.disconnectedCallback(),this.componentIsDestroyed$.next(),this.componentIsDestroyed$.complete()}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.widgetActive$.next(!0),this.hideTrigger()):(this.application.hide(),this.widgetActive$.next(!1),this.showTrigger())}_applyBranding(){var t;(t=this.application)!=null&&t.settings&&pe(this.application.settings.branding,this)}async _renderSymbol(){var a,c,h;const t=(a=this.application)==null?void 0:a.branding(),e=(c=t==null?void 0:t.graphics)==null?void 0:c.trigger;if(e)return C` <img src=${e} class="trigger-icon" alt="" /> `;const i=(h=this.application)==null?void 0:h.triggerIcon;if(!i)return u;const r=async l=>ci,{type:o,content:n}=i;switch(o){case"Telia":{const l=await r();return l?C`<telia-icon
69
+ */const ue=()=>new hi;class hi{}const ht=new WeakMap,de=_t(class extends le{render(s){return u}update(s,[t]){var i;const e=t!==this.Y;return e&&this.Y!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.Y=t,this.ht=(i=s.options)==null?void 0:i.host,this.rt(this.ct=s.element)),u}rt(s){if(typeof this.Y=="function"){const t=this.ht??globalThis;let e=ht.get(t);e===void 0&&(e=new WeakMap,ht.set(t,e)),e.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),e.set(this.Y,s),s!==void 0&&this.Y.call(this.ht,s)}else this.Y.value=s}get lt(){var s,t;return typeof this.Y=="function"?(s=ht.get(this.ht??globalThis))==null?void 0:s.get(this.Y):(t=this.Y)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var li=Object.defineProperty,pi=Object.getOwnPropertyDescriptor,V=(s,t,e,i)=>{for(var r=i>1?void 0:i?pi(t,e):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(r=(i?n(t,e,r):n(r))||r);return i&&r&&li(t,e,r),r};class w extends m{constructor(){super(...arguments),this.active=!1,this.triggerVisible=!0,this.loaded=!1,this.containerRef=ue(),this.widgetActive$=new Ye(!1),this.componentIsDestroyed$=new yt}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(),this.loaded=!0,this._applyBranding()}disconnectedCallback(){super.disconnectedCallback(),this.componentIsDestroyed$.next(),this.componentIsDestroyed$.complete()}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.notify("widget-set-active",{widgetId:this.application.id,active:!0}),this.widgetActive$.next(!0),this.hideTrigger()):(this.application.hide(),this.notify("widget-set-active",{widgetId:this.application.id,active:!1}),this.widgetActive$.next(!1),this.showTrigger())}notify(t,e={}){window!=null&&window.parent&&window.parent.postMessage({type:t,data:e},"*")}_applyBranding(){var t;(t=this.application)!=null&&t.settings&&pe(this.application.settings.branding,this)}async _renderSymbol(){var a,c,h;const t=(a=this.application)==null?void 0:a.branding(),e=(c=t==null?void 0:t.graphics)==null?void 0:c.trigger;if(e)return C` <img src=${e} class="trigger-icon" alt="" /> `;const i=(h=this.application)==null?void 0:h.triggerIcon;if(!i)return u;const r=async l=>ci,{type:o,content:n}=i;switch(o){case"Telia":{const l=await r();return l?C`<telia-icon
70
70
  class="trigger-icon"
71
71
  svg=${l.svg}
72
72
  size="lg"
@@ -284,7 +284,7 @@
284
284
  * @license
285
285
  * Copyright 2017 Google LLC
286
286
  * SPDX-License-Identifier: BSD-3-Clause
287
- */function mi({context:s}){return(t,e)=>{const i=new WeakMap;if(typeof e=="object")return e.addInitializer(function(){i.set(this,new Zt(this,{context:s}))}),{get(){return t.get.call(this)},set(r){var o;return(o=i.get(this))==null||o.setValue(r),t.set.call(this,r)},init(r){var o;return(o=i.get(this))==null||o.setValue(r),r}};{t.constructor.addInitializer(n=>{i.set(n,new Zt(n,{context:s}))});const r=Object.getOwnPropertyDescriptor(t,e);let o;if(r===void 0){const n=new WeakMap;o={get:function(){return n.get(this)},set:function(a){i.get(this).setValue(a),n.set(this,a)},configurable:!0,enumerable:!0}}else{const n=r.set;o={...r,set:function(a){i.get(this).setValue(a),n==null||n.call(this,a)}}}return void Object.defineProperty(t,e,o)}}}var yi=Object.defineProperty,bi=Object.getOwnPropertyDescriptor,$i=(s,t,e,i)=>{for(var r=i>1?void 0:i?bi(t,e):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(r=(i?n(t,e,r):n(r))||r);return i&&r&&yi(t,e,r),r};const _i="application";class At extends m{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=ue()}addChild(t){t.parent=this,this.nodes.push(t)}applyBranding(){if(!this.wrapperRef.value)return;const t=this.application.settings;t!=null&&t.branding&&pe(t.branding,this.wrapperRef.value)}applyStyles(){if(!this.wrapperRef.value)return;const t=this.application.styles(),e=this.wrapperRef.value;Object.entries(t).forEach(([i,r])=>{e.style.setProperty(`--${i}`,r)})}firstUpdated(t){this.applyBranding(),this.applyStyles()}render(){var i,r;const t=this.application.settings.components.conversation;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===wt.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")),C`<div class="widget-container" ${de(this.wrapperRef)}>
287
+ */function mi({context:s}){return(t,e)=>{const i=new WeakMap;if(typeof e=="object")return e.addInitializer(function(){i.set(this,new Zt(this,{context:s}))}),{get(){return t.get.call(this)},set(r){var o;return(o=i.get(this))==null||o.setValue(r),t.set.call(this,r)},init(r){var o;return(o=i.get(this))==null||o.setValue(r),r}};{t.constructor.addInitializer(n=>{i.set(n,new Zt(n,{context:s}))});const r=Object.getOwnPropertyDescriptor(t,e);let o;if(r===void 0){const n=new WeakMap;o={get:function(){return n.get(this)},set:function(a){i.get(this).setValue(a),n.set(this,a)},configurable:!0,enumerable:!0}}else{const n=r.set;o={...r,set:function(a){i.get(this).setValue(a),n==null||n.call(this,a)}}}return void Object.defineProperty(t,e,o)}}}var yi=Object.defineProperty,bi=Object.getOwnPropertyDescriptor,$i=(s,t,e,i)=>{for(var r=i>1?void 0:i?bi(t,e):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(r=(i?n(t,e,r):n(r))||r);return i&&r&&yi(t,e,r),r};const _i="application";class At extends m{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=ue()}addChild(t){t.parent=this,this.nodes.push(t)}applyBranding(){if(!this.wrapperRef.value)return;const t=this.application.settings;t!=null&&t.branding&&pe(t.branding,this.wrapperRef.value)}applyStyles(){if(!this.wrapperRef.value)return;const t=this.application.styles(),e=this.wrapperRef.value;Object.entries(t).forEach(([i,r])=>{e.style.setProperty(`--${i}`,r)})}firstUpdated(t){this.applyBranding(),this.applyStyles()}render(){var i,r;const t=this.application.settings.components.conversation;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===wt.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")),window.self!==window.top&&this.renderRoot.host.classList.add("embedded"),C`<div class="widget-container" ${de(this.wrapperRef)}>
288
288
  ${ie(this.nodes,o=>o)}
289
289
  </div>`}}At.styles=O`
290
290
  :host {
package/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";const r=async e=>{e.registerComponent("area",Promise.resolve().then(()=>require("./area-929c9764.js")))};module.exports=r;
1
+ "use strict";const r=async e=>{e.registerComponent("area",Promise.resolve().then(()=>require("./area-a4eeb7c8.js")))};module.exports=r;
package/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  const o = async (e) => {
2
- e.registerComponent("area", import("./area-3b36f4f8.mjs"));
2
+ e.registerComponent("area", import("./area-15ee7b15.mjs"));
3
3
  };
4
4
  export {
5
5
  o as default
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-components-area-flamingo",
3
- "version": "1.1.76",
3
+ "version": "1.1.77",
4
4
  "dependencies": {
5
- "@telia-ace/widget-core-flamingo": "1.1.76",
5
+ "@telia-ace/widget-core-flamingo": "1.1.77",
6
6
  "lit": "^3.0.2"
7
7
  },
8
8
  "main": "./index.js",
@@ -0,0 +1,7 @@
1
+ {
2
+ "components": [
3
+ {
4
+ "export": "AreaComponent"
5
+ }
6
+ ]
7
+ }