@telia-ace/widget-runtime-flamingo 1.0.37 → 1.0.43

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.
@@ -678,9 +678,9 @@ let Ct = class {
678
678
  this.ns
679
679
  );
680
680
  return Os(h, e, l).then((d) => {
681
- const { data: u = {}, options: p, cancelled: v } = d;
681
+ const { data: u = {}, options: p, cancelled: f } = d;
682
682
  return Promise.resolve(
683
- v ? {} : o.fn(u, p, l)
683
+ f ? {} : o.fn(u, p, l)
684
684
  ).then((y) => {
685
685
  i[c.id] = y;
686
686
  });
@@ -878,27 +878,27 @@ const Ps = (n) => {
878
878
  process.env.NODE_ENV !== "production" && console.time("state-processor.flush");
879
879
  const a = /* @__PURE__ */ new Map(), h = ks(e.map((l, d) => [l, s[d]])), c = (l, d) => {
880
880
  var u;
881
- const p = a.get(l) || {}, v = d.context && !p.context, y = d.properties && !p.properties, A = d.layout && !p.layout;
881
+ const p = a.get(l) || {}, f = d.context && !p.context, y = d.properties && !p.properties, A = d.layout && !p.layout;
882
882
  a.set(l, {
883
- context: p.context || v,
883
+ context: p.context || f,
884
884
  properties: p.properties || y,
885
885
  layout: p.layout || A
886
- }), y && (l.attributes.properties = {}), A && (l.attributes.layout = {}), v && (l.attributes.context = O({}, (u = l.parent) == null ? void 0 : u.attributes.context));
886
+ }), y && (l.attributes.properties = {}), A && (l.attributes.layout = {}), f && (l.attributes.context = O({}, (u = l.parent) == null ? void 0 : u.attributes.context));
887
887
  const ct = [], kt = [], Nt = [];
888
888
  if (l.changesets.forEach(($) => {
889
889
  const [_, Dt] = $;
890
890
  Ns(Dt.breakpoints, n.breakpoints) && (y && (typeof _.properties == "function" ? ct.push(
891
891
  _.properties
892
- ) : O(l.attributes.properties, _.properties)), A && (typeof _.layout == "function" ? kt.push(_.layout) : O(l.attributes.layout, _.layout)), v && (typeof _.context == "function" ? Nt.push(_.context) : O(l.attributes.context, _.context)));
892
+ ) : O(l.attributes.properties, _.properties)), A && (typeof _.layout == "function" ? kt.push(_.layout) : O(l.attributes.layout, _.layout)), f && (typeof _.context == "function" ? Nt.push(_.context) : O(l.attributes.context, _.context)));
893
893
  }), ct.forEach(($) => {
894
894
  O(l.attributes.properties, $(l.attributes.properties));
895
895
  }), kt.forEach(($) => {
896
896
  O(l.attributes.layout, $(l.attributes.layout));
897
897
  }), Nt.forEach(($) => {
898
898
  O(l.attributes.context, $(l.attributes.context));
899
- }), v || d.recursive) {
899
+ }), f || d.recursive) {
900
900
  const $ = n.getBranch(l), _ = d.recursive ? d : {
901
- context: !!v
901
+ context: !!f
902
902
  };
903
903
  l.getChildren($).forEach((Dt) => {
904
904
  c(Dt, _);
@@ -1938,7 +1938,7 @@ B[Xt] = !0, B.elementProperties = /* @__PURE__ */ new Map(), B.elementStyles = [
1938
1938
  var zt;
1939
1939
  const Et = window, q = Et.trustedTypes, Ae = q ? q.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, te = "$lit$", k = `lit$${(Math.random() + "").slice(9)}$`, Ye = "?" + k, rn = `<${Ye}>`, V = document, tt = () => V.createComment(""), et = (n) => n === null || typeof n != "object" && typeof n != "function", Ze = Array.isArray, on = (n) => Ze(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", Bt = `[
1940
1940
  \f\r]`, G = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ce = /-->/g, Oe = />/g, L = RegExp(`>|${Bt}(?:([^\\s"'>=/]+)(${Bt}*=${Bt}*(?:[^
1941
- \f\r"'\`<>=]|("|')|))|$)`, "g"), xe = /'/g, Se = /"/g, Qe = /^(?:script|style|textarea|title)$/i, an = (n) => (t, ...e) => ({ _$litType$: n, strings: t, values: e }), dt = an(1), U = Symbol.for("lit-noChange"), f = Symbol.for("lit-nothing"), Pe = /* @__PURE__ */ new WeakMap(), T = V.createTreeWalker(V, 129, null, !1);
1941
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), xe = /'/g, Se = /"/g, Qe = /^(?:script|style|textarea|title)$/i, an = (n) => (t, ...e) => ({ _$litType$: n, strings: t, values: e }), dt = an(1), U = Symbol.for("lit-noChange"), v = Symbol.for("lit-nothing"), Pe = /* @__PURE__ */ new WeakMap(), T = V.createTreeWalker(V, 129, null, !1);
1942
1942
  function Xe(n, t) {
1943
1943
  if (!Array.isArray(n) || !n.hasOwnProperty("raw"))
1944
1944
  throw Error("invalid template strings array");
@@ -1975,8 +1975,8 @@ class st {
1975
1975
  if (u.endsWith(te) || u.startsWith(k)) {
1976
1976
  const p = l[o++];
1977
1977
  if (d.push(u), p !== void 0) {
1978
- const v = i.getAttribute(p.toLowerCase() + te).split(k), y = /([.?@])?(.*)/.exec(p);
1979
- h.push({ type: 1, index: r, name: y[2], strings: v, ctor: y[1] === "." ? ln : y[1] === "?" ? un : y[1] === "@" ? pn : Pt });
1978
+ const f = i.getAttribute(p.toLowerCase() + te).split(k), y = /([.?@])?(.*)/.exec(p);
1979
+ h.push({ type: 1, index: r, name: y[2], strings: f, ctor: y[1] === "." ? ln : y[1] === "?" ? un : y[1] === "@" ? pn : Pt });
1980
1980
  } else
1981
1981
  h.push({ type: 6, index: r });
1982
1982
  }
@@ -2049,7 +2049,7 @@ class hn {
2049
2049
  class ot {
2050
2050
  constructor(t, e, s, i) {
2051
2051
  var r;
2052
- this.type = 2, this._$AH = f, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = i, this._$Cp = (r = i == null ? void 0 : i.isConnected) === null || r === void 0 || r;
2052
+ this.type = 2, this._$AH = v, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = i, this._$Cp = (r = i == null ? void 0 : i.isConnected) === null || r === void 0 || r;
2053
2053
  }
2054
2054
  get _$AU() {
2055
2055
  var t, e;
@@ -2067,7 +2067,7 @@ class ot {
2067
2067
  return this._$AB;
2068
2068
  }
2069
2069
  _$AI(t, e = this) {
2070
- t = J(this, t, e), et(t) ? t === f || t == null || t === "" ? (this._$AH !== f && this._$AR(), this._$AH = f) : t !== this._$AH && t !== U && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : on(t) ? this.T(t) : this._(t);
2070
+ t = J(this, t, e), et(t) ? t === v || t == null || t === "" ? (this._$AH !== v && this._$AR(), this._$AH = v) : t !== this._$AH && t !== U && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : on(t) ? this.T(t) : this._(t);
2071
2071
  }
2072
2072
  k(t) {
2073
2073
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -2076,7 +2076,7 @@ class ot {
2076
2076
  this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
2077
2077
  }
2078
2078
  _(t) {
2079
- this._$AH !== f && et(this._$AH) ? this._$AA.nextSibling.data = t : this.$(V.createTextNode(t)), this._$AH = t;
2079
+ this._$AH !== v && et(this._$AH) ? this._$AA.nextSibling.data = t : this.$(V.createTextNode(t)), this._$AH = t;
2080
2080
  }
2081
2081
  g(t) {
2082
2082
  var e;
@@ -2114,7 +2114,7 @@ class ot {
2114
2114
  }
2115
2115
  class Pt {
2116
2116
  constructor(t, e, s, i, r) {
2117
- this.type = 1, this._$AH = f, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = r, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = f;
2117
+ this.type = 1, this._$AH = v, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = r, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = v;
2118
2118
  }
2119
2119
  get tagName() {
2120
2120
  return this.element.tagName;
@@ -2131,12 +2131,12 @@ class Pt {
2131
2131
  const a = t;
2132
2132
  let h, c;
2133
2133
  for (t = r[0], h = 0; h < r.length - 1; h++)
2134
- c = J(this, a[s + h], e, h), c === U && (c = this._$AH[h]), o || (o = !et(c) || c !== this._$AH[h]), c === f ? t = f : t !== f && (t += (c ?? "") + r[h + 1]), this._$AH[h] = c;
2134
+ c = J(this, a[s + h], e, h), c === U && (c = this._$AH[h]), o || (o = !et(c) || c !== this._$AH[h]), c === v ? t = v : t !== v && (t += (c ?? "") + r[h + 1]), this._$AH[h] = c;
2135
2135
  }
2136
2136
  o && !i && this.j(t);
2137
2137
  }
2138
2138
  j(t) {
2139
- t === f ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
2139
+ t === v ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
2140
2140
  }
2141
2141
  }
2142
2142
  class ln extends Pt {
@@ -2144,7 +2144,7 @@ class ln extends Pt {
2144
2144
  super(...arguments), this.type = 3;
2145
2145
  }
2146
2146
  j(t) {
2147
- this.element[this.name] = t === f ? void 0 : t;
2147
+ this.element[this.name] = t === v ? void 0 : t;
2148
2148
  }
2149
2149
  }
2150
2150
  const dn = q ? q.emptyScript : "";
@@ -2153,7 +2153,7 @@ class un extends Pt {
2153
2153
  super(...arguments), this.type = 4;
2154
2154
  }
2155
2155
  j(t) {
2156
- t && t !== f ? this.element.setAttribute(this.name, dn) : this.element.removeAttribute(this.name);
2156
+ t && t !== v ? this.element.setAttribute(this.name, dn) : this.element.removeAttribute(this.name);
2157
2157
  }
2158
2158
  }
2159
2159
  class pn extends Pt {
@@ -2162,9 +2162,9 @@ class pn extends Pt {
2162
2162
  }
2163
2163
  _$AI(t, e = this) {
2164
2164
  var s;
2165
- if ((t = (s = J(this, t, e, 0)) !== null && s !== void 0 ? s : f) === U)
2165
+ if ((t = (s = J(this, t, e, 0)) !== null && s !== void 0 ? s : v) === U)
2166
2166
  return;
2167
- const i = this._$AH, r = t === f && i !== f || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, o = t !== f && (i === f || r);
2167
+ const i = this._$AH, r = t === v && i !== v || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, o = t !== v && (i === v || r);
2168
2168
  r && this.element.removeEventListener(this.name, this, i), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
2169
2169
  }
2170
2170
  handleEvent(t) {
@@ -2361,28 +2361,28 @@ class H extends Q {
2361
2361
  e && ts(e.context, this);
2362
2362
  }
2363
2363
  async _renderSymbol(t) {
2364
- const e = async (r) => await import("./index-5087564d.mjs").then((a) => a[r]);
2365
- if (!t)
2366
- return f;
2367
- const { type: s, content: i } = t;
2368
- switch (s) {
2369
- case "Telia": {
2370
- const r = await e(i);
2371
- return r ? dt`<telia-icon
2372
- class="trigger-icon"
2373
- svg=${r.svg}
2374
- size="lg"
2375
- ></telia-icon>` : f;
2364
+ const e = async (s) => await import("./index-5087564d.mjs").then((r) => r[s]);
2365
+ if (t) {
2366
+ const { type: s, content: i } = t;
2367
+ switch (s) {
2368
+ case "Telia": {
2369
+ const r = await e(i);
2370
+ return r ? dt`<telia-icon
2371
+ class="trigger-icon"
2372
+ svg=${r.svg}
2373
+ size="lg"
2374
+ ></telia-icon>` : v;
2375
+ }
2376
+ case "FontAwesome":
2377
+ return dt`<i class="trigger-fa-icon fa fa-${i}"></i>`;
2378
+ case "Uri":
2379
+ return dt`<i
2380
+ class="trigger-custom-icon"
2381
+ style="background: url(${i}) no-repeat center center;background-size: contain;"
2382
+ ></i>`;
2383
+ default:
2384
+ return v;
2376
2385
  }
2377
- case "FontAwesome":
2378
- return dt`<i class="trigger-fa-icon fa fa-${i}"></i>`;
2379
- case "Uri":
2380
- return dt`<i
2381
- class="trigger-custom-icon"
2382
- style="background: url(${i}) no-repeat center center;background-size: contain;"
2383
- ></i>`;
2384
- default:
2385
- return f;
2386
2386
  }
2387
2387
  }
2388
2388
  render() {
@@ -2586,7 +2586,7 @@ class Sn {
2586
2586
  */
2587
2587
  render() {
2588
2588
  const { widgetDOMElement: t, triggerDOMElement: e } = this.options, s = this.container.get("$widget");
2589
- return t.getAttribute("data-rendered") === "true" ? Promise.resolve() : (e && this.options.triggerType === j.Badge && tn(e), import("./render-8ecc38bd.mjs").then((i) => i.default(this.container, t)).then(() => {
2589
+ return t.getAttribute("data-rendered") === "true" ? Promise.resolve() : (e && this.options.triggerType === j.Badge && tn(e), import("./render-97531710.mjs").then((i) => i.default(this.container, t)).then(() => {
2590
2590
  if (t.setAttribute("data-rendered", "true"), e && this.options.triggerType === j.Badge) {
2591
2591
  const r = this.options.triggerOptions.openTooltip;
2592
2592
  Je(e, r);
@@ -2789,17 +2789,17 @@ class ui extends ds {
2789
2789
  );
2790
2790
  this.outlets.size < 1 && !o && this.setRenderState("unset");
2791
2791
  const l = () => {
2792
- const v = () => y.querySelectorAll("[data-loading=true]").length === 0, [y] = this.widget.container.get("widgetDOMElements"), A = (Nt, $) => {
2793
- v() && (c.callback && c.callback(), $.disconnect());
2792
+ const f = () => y.querySelectorAll("[data-loading=true]").length === 0, [y] = this.widget.container.get("widgetDOMElements"), A = (Nt, $) => {
2793
+ f() && (c.callback && c.callback(), $.disconnect());
2794
2794
  }, ct = {
2795
2795
  attributes: !0,
2796
2796
  subtree: !0,
2797
2797
  childList: !0
2798
2798
  };
2799
- v() && c.callback && c.callback(), new MutationObserver(A).observe(y, ct);
2799
+ f() && c.callback && c.callback(), new MutationObserver(A).observe(y, ct);
2800
2800
  };
2801
- h && this.widget.container.getAsync("dataClient").then(({ events: v }) => {
2802
- v.subscribe(
2801
+ h && this.widget.container.getAsync("dataClient").then(({ events: f }) => {
2802
+ f.subscribe(
2803
2803
  "data-client:fetched",
2804
2804
  (y, A) => {
2805
2805
  A.unresolvedQueries === 0 && l();
@@ -2812,22 +2812,22 @@ class ui extends ds {
2812
2812
  "false"
2813
2813
  ), d == null || d.renderBadge(e)), c.triggerType !== j.Inline && ((p = c.triggerDOMElement) == null || p.addEventListener(
2814
2814
  "click",
2815
- (v) => {
2816
- v.preventDefault(), this.container.get("settings").then(({ trigger: y }) => {
2815
+ (f) => {
2816
+ f.preventDefault(), this.container.get("settings").then(({ trigger: y }) => {
2817
2817
  d.render().then(() => this.renderState()).then((A) => y && y.action && y.action === "hide" ? A === E.open ? this.hide() : this.open() : A === E.open ? this.close() : this.open());
2818
2818
  });
2819
2819
  }
2820
2820
  )), this.outlets.size > 1)
2821
- return this.renderState().then((v) => {
2822
- this.triggerStateIfApplicable(v);
2821
+ return this.renderState().then((f) => {
2822
+ this.triggerStateIfApplicable(f);
2823
2823
  });
2824
2824
  if (o)
2825
- return o === "storage" ? this.renderState().then((v) => {
2825
+ return o === "storage" ? this.renderState().then((f) => {
2826
2826
  if (c.triggerType === j.Inline) {
2827
2827
  this.triggerStateIfApplicable("open");
2828
2828
  return;
2829
2829
  }
2830
- this.triggerStateIfApplicable(v);
2830
+ this.triggerStateIfApplicable(f);
2831
2831
  }) : this.triggerStateIfApplicable(o);
2832
2832
  });
2833
2833
  }
@@ -3372,9 +3372,8 @@ const yi = (n) => {
3372
3372
  N()
3373
3373
  ], t.prototype, "properties", 2), t;
3374
3374
  };
3375
- console.log("test12323425324222");
3376
3375
  export {
3377
- f as A,
3376
+ v as A,
3378
3377
  Fn as D,
3379
3378
  fi as G,
3380
3379
  U as T,
@@ -60,14 +60,14 @@ ${o.map(a=>`${a.name||"<no name>"} (${a.id})
60
60
  * @license
61
61
  * Copyright 2018 Google LLC
62
62
  * SPDX-License-Identifier: BSD-3-Clause
63
- */const Nn=ss(class extends ns{constructor(n){var t;if(super(n),n.type!==es.ATTRIBUTE||n.name!=="class"||((t=n.strings)===null||t===void 0?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(n){return" "+Object.keys(n).filter(t=>n[t]).join(" ")+" "}update(n,[t]){var e,s;if(this.it===void 0){this.it=new Set,n.strings!==void 0&&(this.nt=new Set(n.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(const r in t)t[r]&&!(!((e=this.nt)===null||e===void 0)&&e.has(r))&&this.it.add(r);return this.render(t)}const i=n.element.classList;this.it.forEach(r=>{r in t||(i.remove(r),this.it.delete(r))});for(const r in t){const o=!!t[r];o===this.it.has(r)||!((s=this.nt)===null||s===void 0)&&s.has(r)||(o?(i.add(r),this.it.add(r)):(i.remove(r),this.it.delete(r)))}return L}}),w=(n,t,e)=>{n&&e.style.setProperty(t,n)},he=(n,t)=>{var e,s,i,r,o,a,h,c,l,d,u;w((e=n.colors)==null?void 0:e.primary,"--primary-color",t),w((s=n.colors)==null?void 0:s.secondary,"--secondary-color",t),w((i=n.colors)==null?void 0:i.text,"--text-color",t),w((r=n.colors)==null?void 0:r.link,"--link-color",t),w((o=n.colors)==null?void 0:o.gray,"--gray-color",t),w((a=n.colors)==null?void 0:a.grayDark,"--gray-dark-color",t),w((h=n.spacing)==null?void 0:h.xs,"--spacing-xs",t),w((c=n.spacing)==null?void 0:c.sm,"--spacing-sm",t),w((l=n.spacing)==null?void 0:l.md,"--spacing-md",t),w((d=n.spacing)==null?void 0:d.lg,"--spacing-lg",t),w((u=n.spacing)==null?void 0:u.xl,"--spacing-xl",t),w(n.boxShadow,"--box-shadow",t),w(n.borderRadius,"--border-radius",t),w(n.borderRadiusSm,"--border-radius-sm",t),w(n.fontFamily,"--font-family",t)};var Dn=Object.defineProperty,Ln=Object.getOwnPropertyDescriptor,ct=(n,t,e,s)=>{for(var i=s>1?void 0:s?Ln(t,e):t,r=n.length-1,o;r>=0;r--)(o=n[r])&&(i=(s?o(t,e,i):o(i))||i);return s&&i&&Dn(t,e,i),i};class H extends J{constructor(){super(...arguments),this.active=!1,this.loaded=!1}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(this.symbol),this.loaded=!0,this._applyBranding()}_toggleActive(){this.active=!this.active}_applyBranding(){var s;const t=((s=this.container)==null?void 0:s.get("$settings"))??{},e=t==null?void 0:t.components[t==null?void 0:t.entry];e&&he(e.context,this)}async _renderSymbol(t){const e=async r=>await Promise.resolve().then(()=>require("./index-6dd00f59.js")).then(a=>a[r]);if(!t)return f;const{type:s,content:i}=t;switch(s){case"Telia":{const r=await e(i);return r?et`<telia-icon
64
- class="trigger-icon"
65
- svg=${r.svg}
66
- size="lg"
67
- ></telia-icon>`:f}case"FontAwesome":return et`<i class="trigger-fa-icon fa fa-${i}"></i>`;case"Uri":return et`<i
68
- class="trigger-custom-icon"
69
- style="background: url(${i}) no-repeat center center;background-size: contain;"
70
- ></i>`;default:return f}}render(){return et`<button
63
+ */const Nn=ss(class extends ns{constructor(n){var t;if(super(n),n.type!==es.ATTRIBUTE||n.name!=="class"||((t=n.strings)===null||t===void 0?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(n){return" "+Object.keys(n).filter(t=>n[t]).join(" ")+" "}update(n,[t]){var e,s;if(this.it===void 0){this.it=new Set,n.strings!==void 0&&(this.nt=new Set(n.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(const r in t)t[r]&&!(!((e=this.nt)===null||e===void 0)&&e.has(r))&&this.it.add(r);return this.render(t)}const i=n.element.classList;this.it.forEach(r=>{r in t||(i.remove(r),this.it.delete(r))});for(const r in t){const o=!!t[r];o===this.it.has(r)||!((s=this.nt)===null||s===void 0)&&s.has(r)||(o?(i.add(r),this.it.add(r)):(i.remove(r),this.it.delete(r)))}return L}}),w=(n,t,e)=>{n&&e.style.setProperty(t,n)},he=(n,t)=>{var e,s,i,r,o,a,h,c,l,d,u;w((e=n.colors)==null?void 0:e.primary,"--primary-color",t),w((s=n.colors)==null?void 0:s.secondary,"--secondary-color",t),w((i=n.colors)==null?void 0:i.text,"--text-color",t),w((r=n.colors)==null?void 0:r.link,"--link-color",t),w((o=n.colors)==null?void 0:o.gray,"--gray-color",t),w((a=n.colors)==null?void 0:a.grayDark,"--gray-dark-color",t),w((h=n.spacing)==null?void 0:h.xs,"--spacing-xs",t),w((c=n.spacing)==null?void 0:c.sm,"--spacing-sm",t),w((l=n.spacing)==null?void 0:l.md,"--spacing-md",t),w((d=n.spacing)==null?void 0:d.lg,"--spacing-lg",t),w((u=n.spacing)==null?void 0:u.xl,"--spacing-xl",t),w(n.boxShadow,"--box-shadow",t),w(n.borderRadius,"--border-radius",t),w(n.borderRadiusSm,"--border-radius-sm",t),w(n.fontFamily,"--font-family",t)};var Dn=Object.defineProperty,Ln=Object.getOwnPropertyDescriptor,ct=(n,t,e,s)=>{for(var i=s>1?void 0:s?Ln(t,e):t,r=n.length-1,o;r>=0;r--)(o=n[r])&&(i=(s?o(t,e,i):o(i))||i);return s&&i&&Dn(t,e,i),i};class H extends J{constructor(){super(...arguments),this.active=!1,this.loaded=!1}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(this.symbol),this.loaded=!0,this._applyBranding()}_toggleActive(){this.active=!this.active}_applyBranding(){var s;const t=((s=this.container)==null?void 0:s.get("$settings"))??{},e=t==null?void 0:t.components[t==null?void 0:t.entry];e&&he(e.context,this)}async _renderSymbol(t){const e=async s=>await Promise.resolve().then(()=>require("./index-6dd00f59.js")).then(r=>r[s]);if(t){const{type:s,content:i}=t;switch(s){case"Telia":{const r=await e(i);return r?et`<telia-icon
64
+ class="trigger-icon"
65
+ svg=${r.svg}
66
+ size="lg"
67
+ ></telia-icon>`:f}case"FontAwesome":return et`<i class="trigger-fa-icon fa fa-${i}"></i>`;case"Uri":return et`<i
68
+ class="trigger-custom-icon"
69
+ style="background: url(${i}) no-repeat center center;background-size: contain;"
70
+ ></i>`;default:return f}}}render(){return et`<button
71
71
  class=${Nn({trigger:!0,active:this.active,rendered:this.loaded})}
72
72
  @click=${this._toggleActive}
73
73
  >
@@ -167,7 +167,7 @@ ${o.map(a=>`${a.name||"<no name>"} (${a.id})
167
167
  align-items: center;
168
168
  fill: var(--trigger-text-color, #fff);
169
169
  }
170
- `];ct([G({attribute:!1})],H.prototype,"symbol",2);ct([G({attribute:!1})],H.prototype,"container",2);ct([O()],H.prototype,"active",2);ct([O()],H.prototype,"loaded",2);ct([O()],H.prototype,"icon",2);var V=(n=>(n.Inline="inline",n.Link="link",n.Badge="badge",n.Unsupported="unsupported",n))(V||{});const Mn=(n,t)=>n&&t?"both":n?"widgetDOM":t?"triggerDOM":"none",is=n=>n?typeof n=="boolean"&&n?"link":typeof n=="object"&&!Array.isArray(n)?"badge":"unsupported":"inline",In=async(n,t,e,s,i,r=!1)=>{var l,d;const o=Mn(e,s),a=is(i),h={widgetDOMElement:e?e.cloneNode(!0):void 0,triggerDOMElement:s?s.cloneNode(!0):void 0},c={triggerType:a,cachedOriginals:h,widgetDOMElement:document.createElement("div")};switch(o){case"both":{c.widgetDOMElement=e||document.createElement("div"),a!=="inline"&&(c.triggerDOMElement=s);break}case"widgetDOM":{if(c.widgetDOMElement=e||document.createElement("div"),a!=="inline"){const u=document.body.appendChild(document.createElement("a"));a==="link"&&(u.innerText=t),c.triggerDOMElement=u}break}case"triggerDOM":{const u=document.createElement("div");c.widgetDOMElement=u,a==="inline"?(u.id=(s==null?void 0:s.id)||"",r?(u.style.display="none",(l=s==null?void 0:s.parentNode)==null||l.appendChild(u),c.callback=()=>{var p;(p=s==null?void 0:s.parentNode)==null||p.replaceChild(u,s),u.style.display=(s==null?void 0:s.style.display)||"block"}):(d=s==null?void 0:s.parentNode)==null||d.replaceChild(u,s),c.cachedOriginals.widgetDOMElement=s,c.cachedOriginals.triggerDOMElement=void 0):(c.widgetDOMElement=document.body.appendChild(u),c.triggerDOMElement=s);break}case"none":{const u=document.body.appendChild(document.createElement("div"));if(c.widgetDOMElement=u,a!=="inline"){customElements.get("ace-widget-trigger")||customElements.define("ace-widget-trigger",H);const p=document.createElement("ace-widget-trigger");p.symbol=i.symbol,p.container=n,document.body.appendChild(p),console.log("Created trigger"),c.triggerDOMElement=p}break}}return c},Rn="modals";class Tn{constructor(t,e){this.options=e,this.unsubscribe=[],this.container=t.createChild(this),this.container.register("widgetDOMElement",this.options.widgetDOMElement),this.container.register("triggerDOMElement",this.options.triggerDOMElement);const s=this.container.get("$widget");this.options.widgetDOMElement.classList.add("ace-widget"),this.options.widgetDOMElement.classList.add(`ace-widget_${s.name}`);const i=t.get("widgetDOMElements")||[];t.register("widgetDOMElements",[...i,this.options.widgetDOMElement])}render(){const{widgetDOMElement:t,triggerDOMElement:e}=this.options,s=this.container.get("$widget");return t.getAttribute("data-rendered")==="true"?Promise.resolve():(e&&this.options.triggerType===V.Badge&&pn(e),Promise.resolve().then(()=>require("./render-938224a8.js")).then(i=>i.default(this.container,t)).then(()=>{if(t.setAttribute("data-rendered","true"),e&&this.options.triggerType===V.Badge){const r=this.options.triggerOptions.openTooltip;Ke(e,r)}Ss(this.container,t);const i=this.container.get("$environment").widgets.all();S(this.container,Rn,m.Session).then(r=>{r&&r.forEach(o=>{i.find(a=>a.name===o.name&&a.state==="activated")&&s.events.dispatch("widget:modal-opened",o)})})}))}renderBadge(t){const{triggerDOMElement:e}=this.options;if(!e)return;e.getAttribute("role")||e.setAttribute("role","button");const{name:s}=this.container.get("$widget"),{label:i,symbol:r,ariaLabel:o,closedTooltip:a,openTooltip:h}=t,c={closedTooltip:a,openTooltip:h};this.options.triggerOptions=c;const l=dn(e,{label:i,symbol:r,ariaLabel:o,widgetName:s,tooltip:a});this.unsubscribe.push(l)}async dispose(){var s,i,r,o;const{triggerDOMElement:t,widgetDOMElement:e}=this.options;this.options.cachedOriginals.widgetDOMElement&&e&&((s=e.parentNode)==null||s.replaceChild(this.options.cachedOriginals.widgetDOMElement,e)),this.options.cachedOriginals.triggerDOMElement&&t&&((i=t.parentNode)==null||i.replaceChild(this.options.cachedOriginals.triggerDOMElement,t)),this.unsubscribe.forEach(a=>{a()}),(r=e.parentNode)==null||r.removeChild(e),(o=t==null?void 0:t.parentNode)==null||o.removeChild(t)}}const ut="changesets",jn=n=>{const t={tags:n.tags};return n.context&&typeof n.context!="function"&&(t.context=n.context),n.properties&&typeof n.properties!="function"&&(t.properties=n.properties),n.layout&&typeof n.layout!="function"&&(t.layout=n.layout),t};class le{constructor(t,e){this.container=t,this.storageWriter=e}static create(t){return k(t,ut,g.Necessary,{medium:m.Local}).then(e=>new le(t,e))}write(t,e,s,i){return A(this)(()=>S(this.container,ut,m.Local).then((r={})=>{const{keys:o=[],items:a={}}=r,h=o.indexOf(t);return h>-1&&o.splice(h,1),o.push(t),a[t]={options:i,attributes:jn(s),rules:e.rules},this.storageWriter({keys:o,items:a})}))}remove(t){return A(this)(()=>S(this.container,ut,m.Local).then((e={})=>{const{keys:s=[],items:i={}}=e,r=s.indexOf(t);if(r>-1)return s.splice(r,1),delete i[t],this.storageWriter(e)}))}load(t){return A(this)(()=>S(this.container,ut,m.Local).then((e={})=>{const{keys:s=[],items:i={}}=e;s.forEach(r=>{const o=i[r];if(o){const{rules:a,attributes:h,options:c}=o;t.write({attributes:h,options:c,target:new Y(t,a)})}})}))}}const Vn=n=>{const{container:t}=n;return le.create(t).then(e=>{const s=t.get("$settings"),i={localStorage:e},r=new Z(n,i),o=Be(r,s);return n.events.subscribe("widget:state-change",(a,h)=>{h.state===je.Deactivating&&o()}),r})},Un=n=>Promise.resolve().then(()=>hn).then(({StorageProvider:t})=>new t),Hn=n=>Promise.resolve().then(()=>se).then(({ActionResolver:t})=>new t(n)),zn=n=>Promise.resolve().then(()=>se).then(({ComponentResolver:t})=>new t(n)),Bn=n=>Promise.resolve().then(()=>se).then(()=>Vn(n.get("$widget"))),Ft="$settings",Kt="open",Me="activeStickyWidget";class Wn extends Es{constructor(t){super(t),this.outlets=new Map,this.activated=void 0,this.subs=[],this.handleBootstrapping=e=>{const s={triggerDOMElement:e.sourceDOMElement,withRenderState:"storage"};this.container.get("settings").then(i=>{const{activate:r}=i;(typeof r>"u"||r===null||r===!0)&&(this.activated=(this.activated||this.widget.activate()).then(()=>this.attach(s)))})},this.container.registerAsync("storage",()=>Un(this.container)),this.container.registerFactory("settings",()=>S(this.container,Ft,m.Local).then((e={})=>({...this.container.get("$settings"),...e}))),bs(this,"load",this.handleBootstrapping),this.container.registerAsync("componentResolver",()=>zn(this.container)),this.container.registerAsync("actionResolver",()=>Hn(this.container)),this.container.register("matchMedia",window.matchMedia),this.container.registerAsync("components",()=>Bn(this.container))}initialize(){const t=this.container.getManyAsync("actionResolver","components"),e=this.container.get("csp");return e&&(window.webprovisionsEnvironmentVariables||(window.webprovisionsEnvironmentVariables={}),window.webprovisionsEnvironmentVariables.cspNonce=e.nonce),Promise.all([t,this.container.get("settings")]).then(([{actionResolver:s,components:i},r])=>(s.subscribe(this.widget.name,(h,c,l)=>this.onAction(c,l)),(h=>{i.nodes.query({type:"view"}).forEach(c=>{i.setSwitch(c,h)})})("index"),this.events.subscribe("widget:data-loaded",(h,{element:c})=>{this.widget.container.get("seoConfiguration")&&this.events.dispatch("widget:preloaded-replaced",{element:c})}),Promise.resolve()))}attach(t={}){return this.container.get("settings").then(async({trigger:e})=>{var u,p;const{widgetDOMElement:s,key:i=ot(),triggerDOMElement:r,withRenderState:o}=t,h=is(e)===V.Inline&&((r==null?void 0:r.childElementCount)||0)>0,c=await In(this.container,this.widget.name,s,r,e,h);this.outlets.size<1&&!o&&this.setRenderState("unset");const l=()=>{const v=()=>y.querySelectorAll("[data-loading=true]").length===0,[y]=this.widget.container.get("widgetDOMElements"),C=(Nt,_)=>{v()&&(c.callback&&c.callback(),_.disconnect())},ht={attributes:!0,subtree:!0,childList:!0};v()&&c.callback&&c.callback(),new MutationObserver(C).observe(y,ht)};h&&this.widget.container.getAsync("dataClient").then(({events:v})=>{v.subscribe("data-client:fetched",(y,C)=>{C.unresolvedQueries===0&&l()})});const d=this.getOrCreateViewOutlet(i,c);if(this.outlets.set(i,d),this.widget.events.dispatch("widget:attached",{},{bubbles:!0}),c.triggerType===V.Badge&&e&&((u=c.triggerDOMElement)==null||u.setAttribute("aria-expanded","false"),d==null||d.renderBadge(e)),c.triggerType!==V.Inline&&((p=c.triggerDOMElement)==null||p.addEventListener("click",v=>{v.preventDefault(),this.container.get("settings").then(({trigger:y})=>{d.render().then(()=>this.renderState()).then(C=>y&&y.action&&y.action==="hide"?C===$.open?this.hide():this.open():C===$.open?this.close():this.open())})})),this.outlets.size>1)return this.renderState().then(v=>{this.triggerStateIfApplicable(v)});if(o)return o==="storage"?this.renderState().then(v=>{if(c.triggerType===V.Inline){this.triggerStateIfApplicable("open");return}this.triggerStateIfApplicable(v)}):this.triggerStateIfApplicable(o)})}detach(t){if(t){if(this.outlets.has(t)){const e=this.outlets.get(t);e==null||e.dispose(),this.outlets.delete(t);return}process.env.NODE_ENV!=="production"&&console.warn(`detach(): Could not find View Outlet with key ${t}`);return}this.outlets.forEach(e=>{e.dispose()}),this.outlets.clear()}triggerStateIfApplicable(t){switch(t){case"closed":this.close();break;case"open":this.open();break;case"hidden":this.hide();break;default:return}}getOrCreateViewOutlet(t,e){return this.outlets.has(t)?this.outlets.get(t):new Tn(this.container,e)}render(t={}){if(process.env.NODE_ENV!=="production"&&console.warn("widget.render() is deprecated. Use widget.attach() instead."),t.open){const e={...t,withRenderState:"open"};return this.attach(e)}return this.attach(t)}activate(t){t!=null&&t.override&&this.setSettings(()=>t.override),t!=null&&t.apiNotificationPriorityBy&&this.container.register("apiNotificationPriorityBy",t.apiNotificationPriorityBy)}setSettings(t){return Promise.all([this.container.get("settings"),k(this.container,Ft,g.Necessary,{medium:m.Local})]).then(([e,s])=>Promise.resolve(t(e)).then(i=>s(i).then(()=>{const r={...e,...i};return this.widget.events.dispatch("widget:settings-updated",r),r})))}clearSettings(){return k(this.container,Ft,g.Necessary,{medium:m.Local}).then(t=>t()).then(()=>this.container.get("settings")).then(t=>{this.widget.events.dispatch("widget:settings-updated",t)})}action({action:t,value:e}){return this.container.getAsync("actionResolver").then(s=>{s.action(this.widget.name,t,e)})}renderState(){return(()=>S(this.container,Kt,m.Session).then((e=$.closed)=>e))()}hide(){return this.outlets.size<1?(process.env.NODE_ENV!=="production"&&console.warn("hide(): No-op as no view outlets are registered. Invoke the attach() command first."),Promise.resolve()):(this.outlets.forEach(t=>t.render()),this.action({action:"hide"}).then(()=>{this.setTriggerState(!1)}))}open(){return this.outlets.size<1?(process.env.NODE_ENV!=="production"&&console.warn("open(): No-op as no view outlets are registered. Invoke the attach() command first."),Promise.resolve()):(this.outlets.forEach(t=>t.render()),this.action({action:"open"}).then(()=>(this.widget.events.dispatch("tracking:widget-rendered",{}),this.onOpen())))}close(){return this.outlets.size<1?(process.env.NODE_ENV!=="production"&&console.warn("close(): No-op as no view outlets are registered. Invoke the attach() command first."),Promise.resolve()):this.action({action:"close"}).then(()=>this.onClose())}show(){return process.env.NODE_ENV!=="production"&&console.warn("show(): Command is deprecated and will be removed in the future. Use open() instead."),this.open()}onAction(t,e){switch(t){case"close":case"open":case"hide":const s=t==="open"?$.open:t==="close"?$.closed:$.hidden;return this.setRenderState(s).then(()=>{this.setTriggerState(s===$.open),s!==$.hidden?s===$.open?this.onOpen():this.onClose():this.outlets.forEach(i=>{var r;return(r=i.options.triggerDOMElement)==null?void 0:r.setAttribute("aria-expanded","false")})})}}setRenderState(t){const{invoke:e,events:s}=this.container.get("$widget");return Promise.all([k(this.container,Kt,g.Necessary,{medium:m.Session}),k(this.container,Kt,g.Necessary,{medium:m.Local,duration:{minutes:5}}),e("renderState")]).then(([i,r,o])=>{t==="unset"||!t?(r(),i()):i(t),s.dispatch("widget:render-state-changed",{previous:o,next:t})})}onOpen(){return this.outlets.forEach(t=>{var e;return(e=t.options.triggerDOMElement)==null?void 0:e.setAttribute("aria-expanded","true")}),Promise.resolve()}onClose(){const t=this.container.getManyAsync("components");return(()=>this.container.get("settings").then(s=>{const{activate:i}=this.container.get("$settings");return s.activate!==i?this.setSettings(()=>Promise.resolve({activate:i})):Promise.resolve()}))().then(()=>t).then(({components:s})=>{this.outlets.forEach(i=>{var r;return(r=i.options.triggerDOMElement)==null?void 0:r.setAttribute("aria-expanded","false")})})}setTriggerState(t){this.outlets.forEach(e=>{const{options:{triggerDOMElement:s,triggerOptions:i}}=e,{openTooltip:r,closedTooltip:o}=i||{};s&&(t?Ke(s,r):un(s,o))})}deactivate(){this.subs.forEach(e=>e());const t=[];return this.outlets.forEach(e=>t.push(e.dispose())),S(this.container,Me,m.Local).then(e=>e===this.widget.name?k(this.container,Me,g.Necessary,{medium:m.Local,scope:Q.Implementation}).then(s=>s()).then(()=>Promise.all(t)):Promise.all(t))}}/**
170
+ `];ct([G({attribute:!1})],H.prototype,"symbol",2);ct([G({attribute:!1})],H.prototype,"container",2);ct([O()],H.prototype,"active",2);ct([O()],H.prototype,"loaded",2);ct([O()],H.prototype,"icon",2);var V=(n=>(n.Inline="inline",n.Link="link",n.Badge="badge",n.Unsupported="unsupported",n))(V||{});const Mn=(n,t)=>n&&t?"both":n?"widgetDOM":t?"triggerDOM":"none",is=n=>n?typeof n=="boolean"&&n?"link":typeof n=="object"&&!Array.isArray(n)?"badge":"unsupported":"inline",In=async(n,t,e,s,i,r=!1)=>{var l,d;const o=Mn(e,s),a=is(i),h={widgetDOMElement:e?e.cloneNode(!0):void 0,triggerDOMElement:s?s.cloneNode(!0):void 0},c={triggerType:a,cachedOriginals:h,widgetDOMElement:document.createElement("div")};switch(o){case"both":{c.widgetDOMElement=e||document.createElement("div"),a!=="inline"&&(c.triggerDOMElement=s);break}case"widgetDOM":{if(c.widgetDOMElement=e||document.createElement("div"),a!=="inline"){const u=document.body.appendChild(document.createElement("a"));a==="link"&&(u.innerText=t),c.triggerDOMElement=u}break}case"triggerDOM":{const u=document.createElement("div");c.widgetDOMElement=u,a==="inline"?(u.id=(s==null?void 0:s.id)||"",r?(u.style.display="none",(l=s==null?void 0:s.parentNode)==null||l.appendChild(u),c.callback=()=>{var p;(p=s==null?void 0:s.parentNode)==null||p.replaceChild(u,s),u.style.display=(s==null?void 0:s.style.display)||"block"}):(d=s==null?void 0:s.parentNode)==null||d.replaceChild(u,s),c.cachedOriginals.widgetDOMElement=s,c.cachedOriginals.triggerDOMElement=void 0):(c.widgetDOMElement=document.body.appendChild(u),c.triggerDOMElement=s);break}case"none":{const u=document.body.appendChild(document.createElement("div"));if(c.widgetDOMElement=u,a!=="inline"){customElements.get("ace-widget-trigger")||customElements.define("ace-widget-trigger",H);const p=document.createElement("ace-widget-trigger");p.symbol=i.symbol,p.container=n,document.body.appendChild(p),console.log("Created trigger"),c.triggerDOMElement=p}break}}return c},Rn="modals";class Tn{constructor(t,e){this.options=e,this.unsubscribe=[],this.container=t.createChild(this),this.container.register("widgetDOMElement",this.options.widgetDOMElement),this.container.register("triggerDOMElement",this.options.triggerDOMElement);const s=this.container.get("$widget");this.options.widgetDOMElement.classList.add("ace-widget"),this.options.widgetDOMElement.classList.add(`ace-widget_${s.name}`);const i=t.get("widgetDOMElements")||[];t.register("widgetDOMElements",[...i,this.options.widgetDOMElement])}render(){const{widgetDOMElement:t,triggerDOMElement:e}=this.options,s=this.container.get("$widget");return t.getAttribute("data-rendered")==="true"?Promise.resolve():(e&&this.options.triggerType===V.Badge&&pn(e),Promise.resolve().then(()=>require("./render-9a5af472.js")).then(i=>i.default(this.container,t)).then(()=>{if(t.setAttribute("data-rendered","true"),e&&this.options.triggerType===V.Badge){const r=this.options.triggerOptions.openTooltip;Ke(e,r)}Ss(this.container,t);const i=this.container.get("$environment").widgets.all();S(this.container,Rn,m.Session).then(r=>{r&&r.forEach(o=>{i.find(a=>a.name===o.name&&a.state==="activated")&&s.events.dispatch("widget:modal-opened",o)})})}))}renderBadge(t){const{triggerDOMElement:e}=this.options;if(!e)return;e.getAttribute("role")||e.setAttribute("role","button");const{name:s}=this.container.get("$widget"),{label:i,symbol:r,ariaLabel:o,closedTooltip:a,openTooltip:h}=t,c={closedTooltip:a,openTooltip:h};this.options.triggerOptions=c;const l=dn(e,{label:i,symbol:r,ariaLabel:o,widgetName:s,tooltip:a});this.unsubscribe.push(l)}async dispose(){var s,i,r,o;const{triggerDOMElement:t,widgetDOMElement:e}=this.options;this.options.cachedOriginals.widgetDOMElement&&e&&((s=e.parentNode)==null||s.replaceChild(this.options.cachedOriginals.widgetDOMElement,e)),this.options.cachedOriginals.triggerDOMElement&&t&&((i=t.parentNode)==null||i.replaceChild(this.options.cachedOriginals.triggerDOMElement,t)),this.unsubscribe.forEach(a=>{a()}),(r=e.parentNode)==null||r.removeChild(e),(o=t==null?void 0:t.parentNode)==null||o.removeChild(t)}}const ut="changesets",jn=n=>{const t={tags:n.tags};return n.context&&typeof n.context!="function"&&(t.context=n.context),n.properties&&typeof n.properties!="function"&&(t.properties=n.properties),n.layout&&typeof n.layout!="function"&&(t.layout=n.layout),t};class le{constructor(t,e){this.container=t,this.storageWriter=e}static create(t){return k(t,ut,g.Necessary,{medium:m.Local}).then(e=>new le(t,e))}write(t,e,s,i){return A(this)(()=>S(this.container,ut,m.Local).then((r={})=>{const{keys:o=[],items:a={}}=r,h=o.indexOf(t);return h>-1&&o.splice(h,1),o.push(t),a[t]={options:i,attributes:jn(s),rules:e.rules},this.storageWriter({keys:o,items:a})}))}remove(t){return A(this)(()=>S(this.container,ut,m.Local).then((e={})=>{const{keys:s=[],items:i={}}=e,r=s.indexOf(t);if(r>-1)return s.splice(r,1),delete i[t],this.storageWriter(e)}))}load(t){return A(this)(()=>S(this.container,ut,m.Local).then((e={})=>{const{keys:s=[],items:i={}}=e;s.forEach(r=>{const o=i[r];if(o){const{rules:a,attributes:h,options:c}=o;t.write({attributes:h,options:c,target:new Y(t,a)})}})}))}}const Vn=n=>{const{container:t}=n;return le.create(t).then(e=>{const s=t.get("$settings"),i={localStorage:e},r=new Z(n,i),o=Be(r,s);return n.events.subscribe("widget:state-change",(a,h)=>{h.state===je.Deactivating&&o()}),r})},Un=n=>Promise.resolve().then(()=>hn).then(({StorageProvider:t})=>new t),Hn=n=>Promise.resolve().then(()=>se).then(({ActionResolver:t})=>new t(n)),zn=n=>Promise.resolve().then(()=>se).then(({ComponentResolver:t})=>new t(n)),Bn=n=>Promise.resolve().then(()=>se).then(()=>Vn(n.get("$widget"))),Ft="$settings",Kt="open",Me="activeStickyWidget";class Wn extends Es{constructor(t){super(t),this.outlets=new Map,this.activated=void 0,this.subs=[],this.handleBootstrapping=e=>{const s={triggerDOMElement:e.sourceDOMElement,withRenderState:"storage"};this.container.get("settings").then(i=>{const{activate:r}=i;(typeof r>"u"||r===null||r===!0)&&(this.activated=(this.activated||this.widget.activate()).then(()=>this.attach(s)))})},this.container.registerAsync("storage",()=>Un(this.container)),this.container.registerFactory("settings",()=>S(this.container,Ft,m.Local).then((e={})=>({...this.container.get("$settings"),...e}))),bs(this,"load",this.handleBootstrapping),this.container.registerAsync("componentResolver",()=>zn(this.container)),this.container.registerAsync("actionResolver",()=>Hn(this.container)),this.container.register("matchMedia",window.matchMedia),this.container.registerAsync("components",()=>Bn(this.container))}initialize(){const t=this.container.getManyAsync("actionResolver","components"),e=this.container.get("csp");return e&&(window.webprovisionsEnvironmentVariables||(window.webprovisionsEnvironmentVariables={}),window.webprovisionsEnvironmentVariables.cspNonce=e.nonce),Promise.all([t,this.container.get("settings")]).then(([{actionResolver:s,components:i},r])=>(s.subscribe(this.widget.name,(h,c,l)=>this.onAction(c,l)),(h=>{i.nodes.query({type:"view"}).forEach(c=>{i.setSwitch(c,h)})})("index"),this.events.subscribe("widget:data-loaded",(h,{element:c})=>{this.widget.container.get("seoConfiguration")&&this.events.dispatch("widget:preloaded-replaced",{element:c})}),Promise.resolve()))}attach(t={}){return this.container.get("settings").then(async({trigger:e})=>{var u,p;const{widgetDOMElement:s,key:i=ot(),triggerDOMElement:r,withRenderState:o}=t,h=is(e)===V.Inline&&((r==null?void 0:r.childElementCount)||0)>0,c=await In(this.container,this.widget.name,s,r,e,h);this.outlets.size<1&&!o&&this.setRenderState("unset");const l=()=>{const v=()=>y.querySelectorAll("[data-loading=true]").length===0,[y]=this.widget.container.get("widgetDOMElements"),C=(Nt,_)=>{v()&&(c.callback&&c.callback(),_.disconnect())},ht={attributes:!0,subtree:!0,childList:!0};v()&&c.callback&&c.callback(),new MutationObserver(C).observe(y,ht)};h&&this.widget.container.getAsync("dataClient").then(({events:v})=>{v.subscribe("data-client:fetched",(y,C)=>{C.unresolvedQueries===0&&l()})});const d=this.getOrCreateViewOutlet(i,c);if(this.outlets.set(i,d),this.widget.events.dispatch("widget:attached",{},{bubbles:!0}),c.triggerType===V.Badge&&e&&((u=c.triggerDOMElement)==null||u.setAttribute("aria-expanded","false"),d==null||d.renderBadge(e)),c.triggerType!==V.Inline&&((p=c.triggerDOMElement)==null||p.addEventListener("click",v=>{v.preventDefault(),this.container.get("settings").then(({trigger:y})=>{d.render().then(()=>this.renderState()).then(C=>y&&y.action&&y.action==="hide"?C===$.open?this.hide():this.open():C===$.open?this.close():this.open())})})),this.outlets.size>1)return this.renderState().then(v=>{this.triggerStateIfApplicable(v)});if(o)return o==="storage"?this.renderState().then(v=>{if(c.triggerType===V.Inline){this.triggerStateIfApplicable("open");return}this.triggerStateIfApplicable(v)}):this.triggerStateIfApplicable(o)})}detach(t){if(t){if(this.outlets.has(t)){const e=this.outlets.get(t);e==null||e.dispose(),this.outlets.delete(t);return}process.env.NODE_ENV!=="production"&&console.warn(`detach(): Could not find View Outlet with key ${t}`);return}this.outlets.forEach(e=>{e.dispose()}),this.outlets.clear()}triggerStateIfApplicable(t){switch(t){case"closed":this.close();break;case"open":this.open();break;case"hidden":this.hide();break;default:return}}getOrCreateViewOutlet(t,e){return this.outlets.has(t)?this.outlets.get(t):new Tn(this.container,e)}render(t={}){if(process.env.NODE_ENV!=="production"&&console.warn("widget.render() is deprecated. Use widget.attach() instead."),t.open){const e={...t,withRenderState:"open"};return this.attach(e)}return this.attach(t)}activate(t){t!=null&&t.override&&this.setSettings(()=>t.override),t!=null&&t.apiNotificationPriorityBy&&this.container.register("apiNotificationPriorityBy",t.apiNotificationPriorityBy)}setSettings(t){return Promise.all([this.container.get("settings"),k(this.container,Ft,g.Necessary,{medium:m.Local})]).then(([e,s])=>Promise.resolve(t(e)).then(i=>s(i).then(()=>{const r={...e,...i};return this.widget.events.dispatch("widget:settings-updated",r),r})))}clearSettings(){return k(this.container,Ft,g.Necessary,{medium:m.Local}).then(t=>t()).then(()=>this.container.get("settings")).then(t=>{this.widget.events.dispatch("widget:settings-updated",t)})}action({action:t,value:e}){return this.container.getAsync("actionResolver").then(s=>{s.action(this.widget.name,t,e)})}renderState(){return(()=>S(this.container,Kt,m.Session).then((e=$.closed)=>e))()}hide(){return this.outlets.size<1?(process.env.NODE_ENV!=="production"&&console.warn("hide(): No-op as no view outlets are registered. Invoke the attach() command first."),Promise.resolve()):(this.outlets.forEach(t=>t.render()),this.action({action:"hide"}).then(()=>{this.setTriggerState(!1)}))}open(){return this.outlets.size<1?(process.env.NODE_ENV!=="production"&&console.warn("open(): No-op as no view outlets are registered. Invoke the attach() command first."),Promise.resolve()):(this.outlets.forEach(t=>t.render()),this.action({action:"open"}).then(()=>(this.widget.events.dispatch("tracking:widget-rendered",{}),this.onOpen())))}close(){return this.outlets.size<1?(process.env.NODE_ENV!=="production"&&console.warn("close(): No-op as no view outlets are registered. Invoke the attach() command first."),Promise.resolve()):this.action({action:"close"}).then(()=>this.onClose())}show(){return process.env.NODE_ENV!=="production"&&console.warn("show(): Command is deprecated and will be removed in the future. Use open() instead."),this.open()}onAction(t,e){switch(t){case"close":case"open":case"hide":const s=t==="open"?$.open:t==="close"?$.closed:$.hidden;return this.setRenderState(s).then(()=>{this.setTriggerState(s===$.open),s!==$.hidden?s===$.open?this.onOpen():this.onClose():this.outlets.forEach(i=>{var r;return(r=i.options.triggerDOMElement)==null?void 0:r.setAttribute("aria-expanded","false")})})}}setRenderState(t){const{invoke:e,events:s}=this.container.get("$widget");return Promise.all([k(this.container,Kt,g.Necessary,{medium:m.Session}),k(this.container,Kt,g.Necessary,{medium:m.Local,duration:{minutes:5}}),e("renderState")]).then(([i,r,o])=>{t==="unset"||!t?(r(),i()):i(t),s.dispatch("widget:render-state-changed",{previous:o,next:t})})}onOpen(){return this.outlets.forEach(t=>{var e;return(e=t.options.triggerDOMElement)==null?void 0:e.setAttribute("aria-expanded","true")}),Promise.resolve()}onClose(){const t=this.container.getManyAsync("components");return(()=>this.container.get("settings").then(s=>{const{activate:i}=this.container.get("$settings");return s.activate!==i?this.setSettings(()=>Promise.resolve({activate:i})):Promise.resolve()}))().then(()=>t).then(({components:s})=>{this.outlets.forEach(i=>{var r;return(r=i.options.triggerDOMElement)==null?void 0:r.setAttribute("aria-expanded","false")})})}setTriggerState(t){this.outlets.forEach(e=>{const{options:{triggerDOMElement:s,triggerOptions:i}}=e,{openTooltip:r,closedTooltip:o}=i||{};s&&(t?Ke(s,r):un(s,o))})}deactivate(){this.subs.forEach(e=>e());const t=[];return this.outlets.forEach(e=>t.push(e.dispose())),S(this.container,Me,m.Local).then(e=>e===this.widget.name?k(this.container,Me,g.Necessary,{medium:m.Local,scope:Q.Implementation}).then(s=>s()).then(()=>Promise.all(t)):Promise.all(t))}}/**
171
171
  * @license
172
172
  * Copyright 2021 Google LLC
173
173
  * SPDX-License-Identifier: BSD-3-Clause
@@ -203,4 +203,4 @@ ${o.map(a=>`${a.name||"<no name>"} (${a.id})
203
203
  * {
204
204
  box-sizing: border-box;
205
205
  }
206
- `],I([Kn({context:cs}),G({attribute:!1})],t.prototype,"container",2),I([G()],t.prototype,"entry",2),I([O()],t.prototype,"descriptor",2),I([O()],t.prototype,"component",2),I([O()],t.prototype,"context",2),I([O()],t.prototype,"layout",2),I([O()],t.prototype,"properties",2),t};console.log("test12323425324222");exports.A=f;exports.ActionsController=us;exports.DataProvider=ps;exports.GuideProviderPlugin=Qn;exports.T=L;exports.Widget=Wn;exports.WidgetComponent=ni;exports.appendStyleFromProperties=gs;exports.childrenContext=os;exports.containerContext=cs;exports.contextCtx=hs;exports.createDataProvider=Yn;exports.createLitComponent=Xn;exports.descriptorContext=as;exports.e=ss;exports.i=ns;exports.i$1=W;exports.i$2=ce;exports.layoutCtx=ls;exports.mapBranding=he;exports.mt=$;exports.n=G;exports.propertiesCtx=ds;exports.pt=Z;exports.s=J;exports.t=es;exports.t$1=O;exports.x=et;
206
+ `],I([Kn({context:cs}),G({attribute:!1})],t.prototype,"container",2),I([G()],t.prototype,"entry",2),I([O()],t.prototype,"descriptor",2),I([O()],t.prototype,"component",2),I([O()],t.prototype,"context",2),I([O()],t.prototype,"layout",2),I([O()],t.prototype,"properties",2),t};exports.A=f;exports.ActionsController=us;exports.DataProvider=ps;exports.GuideProviderPlugin=Qn;exports.T=L;exports.Widget=Wn;exports.WidgetComponent=ni;exports.appendStyleFromProperties=gs;exports.childrenContext=os;exports.containerContext=cs;exports.contextCtx=hs;exports.createDataProvider=Yn;exports.createLitComponent=Xn;exports.descriptorContext=as;exports.e=ss;exports.i=ns;exports.i$1=W;exports.i$2=ce;exports.layoutCtx=ls;exports.mapBranding=he;exports.mt=$;exports.n=G;exports.propertiesCtx=ds;exports.pt=Z;exports.s=J;exports.t=es;exports.t$1=O;exports.x=et;
package/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-0d792c3e.js");exports.ActionsController=t.ActionsController;exports.DataProvider=t.DataProvider;exports.GridWidget=t.Widget;exports.GuideProviderPlugin=t.GuideProviderPlugin;exports.Widget=t.Widget;exports.WidgetComponent=t.WidgetComponent;exports.childrenContext=t.childrenContext;exports.containerContext=t.containerContext;exports.contextCtx=t.contextCtx;exports.createDataProvider=t.createDataProvider;exports.createWebComponent=t.createLitComponent;exports.descriptorContext=t.descriptorContext;exports.layoutCtx=t.layoutCtx;exports.propertiesCtx=t.propertiesCtx;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-5315aa1b.js");exports.ActionsController=t.ActionsController;exports.DataProvider=t.DataProvider;exports.GridWidget=t.Widget;exports.GuideProviderPlugin=t.GuideProviderPlugin;exports.Widget=t.Widget;exports.WidgetComponent=t.WidgetComponent;exports.childrenContext=t.childrenContext;exports.containerContext=t.containerContext;exports.contextCtx=t.contextCtx;exports.createDataProvider=t.createDataProvider;exports.createWebComponent=t.createLitComponent;exports.descriptorContext=t.descriptorContext;exports.layoutCtx=t.layoutCtx;exports.propertiesCtx=t.propertiesCtx;
package/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { r as a, D as o, h as r, G as s, h as i, W as n, j as d, c as C, l as c, u as x, v as l, k as p, o as W, q as g } from "./index-19a13f23.mjs";
1
+ import { r as a, D as o, h as r, G as s, h as i, W as n, j as d, c as C, l as c, u as x, v as l, k as p, o as W, q as g } from "./index-2bcfc969.mjs";
2
2
  export {
3
3
  a as ActionsController,
4
4
  o as DataProvider,
package/package.json CHANGED
@@ -1,23 +1,20 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-runtime-flamingo",
3
- "version": "1.0.37",
4
- "scripts": {
5
- "release": "release-it"
6
- },
7
- "release-it": {
8
- "git": false
3
+ "version": "1.0.43",
4
+ "publishConfig": {
5
+ "registry": "https://registry.npmjs.org"
9
6
  },
10
7
  "dependencies": {
11
- "@telia-ace/widget-core": "^1.0.27",
12
8
  "@telia-ace/widget-services": "^1.0.27",
13
9
  "@telia-ace/widget-utilities": "^1.0.16",
14
10
  "@webprovisions/platform": "^1.1.3",
15
11
  "@lit-labs/context": "^0.4.0",
16
12
  "lit": "^2.8.0",
17
13
  "@teliads/icons": "^8.4.0",
14
+ "@telia-ace/widget-core": "^1.0.27",
18
15
  "@webprovisions/bootstrapping": "^1.0.13"
19
16
  },
20
17
  "main": "./index.js",
21
18
  "module": "./index.mjs",
22
19
  "typings": "./index.d.ts"
23
- }
20
+ }
@@ -1,4 +1,4 @@
1
- import { i as L, t as D, e as A, A as y, s as P, a as Y, c as M, p as T, m as f, x as v, b as R, n as j, d as u, T as w, W as z, f as E, g as N } from "./index-19a13f23.mjs";
1
+ import { i as L, t as D, e as A, A as y, s as P, a as Y, c as M, p as T, m as f, x as v, b as R, n as j, d as u, T as w, W as z, f as E, g as N } from "./index-2bcfc969.mjs";
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2017 Google LLC
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-0d792c3e.js");/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-5315aa1b.js");/**
2
2
  * @license
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -14,7 +14,7 @@ export declare class TriggerComponent extends LitElement {
14
14
  connectedCallback(): Promise<void>;
15
15
  _toggleActive(): void;
16
16
  _applyBranding(): void;
17
- _renderSymbol(symbol?: SymbolType): Promise<import("lit").TemplateResult<1> | typeof nothing>;
17
+ _renderSymbol(symbol?: SymbolType): Promise<import("lit").TemplateResult<1> | typeof nothing | undefined>;
18
18
  render(): import("lit").TemplateResult<1>;
19
19
  }
20
20
  export {};