@telia-ace/widget-runtime-flamingo 1.1.120-rc.9 → 1.1.120

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.
@@ -1799,7 +1799,9 @@ let z = class extends HTMLElement {
1799
1799
  const s = this.constructor, n = s._$Eh.get(t);
1800
1800
  if (n !== void 0 && this._$Em !== n) {
1801
1801
  const a = s.getPropertyOptions(n), h = typeof a.converter == "function" ? { fromAttribute: a.converter } : ((r = a.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? a.converter : $t;
1802
- this._$Em = n, this[n] = h.fromAttribute(e, a.type) ?? ((o = this._$Ej) == null ? void 0 : o.get(n)) ?? null, this._$Em = null;
1802
+ this._$Em = n;
1803
+ const c = h.fromAttribute(e, a.type);
1804
+ this[n] = c ?? ((o = this._$Ej) == null ? void 0 : o.get(n)) ?? c, this._$Em = null;
1803
1805
  }
1804
1806
  }
1805
1807
  requestUpdate(t, e, s) {
@@ -1882,7 +1884,7 @@ let z = class extends HTMLElement {
1882
1884
  firstUpdated(t) {
1883
1885
  }
1884
1886
  };
1885
- z.elementStyles = [], z.shadowRootOptions = { mode: "open" }, z[Y("elementProperties")] = /* @__PURE__ */ new Map(), z[Y("finalized")] = /* @__PURE__ */ new Map(), jt == null || jt({ ReactiveElement: z }), (M.reactiveElementVersions ?? (M.reactiveElementVersions = [])).push("2.1.0");
1887
+ z.elementStyles = [], z.shadowRootOptions = { mode: "open" }, z[Y("elementProperties")] = /* @__PURE__ */ new Map(), z[Y("finalized")] = /* @__PURE__ */ new Map(), jt == null || jt({ ReactiveElement: z }), (M.reactiveElementVersions ?? (M.reactiveElementVersions = [])).push("2.1.1");
1886
1888
  /**
1887
1889
  * @license
1888
1890
  * Copyright 2017 Google LLC
@@ -2032,7 +2034,7 @@ class ot {
2032
2034
  }
2033
2035
  _$AR(t = this._$AA.nextSibling, e) {
2034
2036
  var s;
2035
- for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0, e); t && t !== this._$AB; ) {
2037
+ for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0, e); t !== this._$AB; ) {
2036
2038
  const n = t.nextSibling;
2037
2039
  t.remove(), t = n;
2038
2040
  }
@@ -2109,7 +2111,7 @@ class Ws {
2109
2111
  }
2110
2112
  }
2111
2113
  const Vt = Z.litHtmlPolyfillSupport;
2112
- Vt == null || Vt(st, ot), (Z.litHtmlVersions ?? (Z.litHtmlVersions = [])).push("3.3.0");
2114
+ Vt == null || Vt(st, ot), (Z.litHtmlVersions ?? (Z.litHtmlVersions = [])).push("3.3.1");
2113
2115
  const qs = (i, t, e) => {
2114
2116
  const s = (e == null ? void 0 : e.renderBefore) ?? t;
2115
2117
  let n = s._$litPart$;
@@ -2154,7 +2156,7 @@ var Ae;
2154
2156
  Q._$litElement$ = !0, Q.finalized = !0, (Ae = U.litElementHydrateSupport) == null || Ae.call(U, { LitElement: Q });
2155
2157
  const Ht = U.litElementPolyfillSupport;
2156
2158
  Ht == null || Ht({ LitElement: Q });
2157
- (U.litElementVersions ?? (U.litElementVersions = [])).push("4.2.0");
2159
+ (U.litElementVersions ?? (U.litElementVersions = [])).push("4.2.1");
2158
2160
  /**
2159
2161
  * @license
2160
2162
  * Copyright 2017 Google LLC
@@ -2508,7 +2510,7 @@ class ii {
2508
2510
  */
2509
2511
  render() {
2510
2512
  const { widgetDOMElement: t, triggerDOMElement: e } = this.options, s = this.container.get("$widget");
2511
- return t.getAttribute("data-rendered") === "true" ? Promise.resolve() : (e && this.options.triggerType === j.Badge && Cs(e), import("./render-hJFIawxF.mjs").then((n) => n.default(this.container, t)).then(() => {
2513
+ return t.getAttribute("data-rendered") === "true" ? Promise.resolve() : (e && this.options.triggerType === j.Badge && Cs(e), import("./render-B9bzicOP.mjs").then((n) => n.default(this.container, t)).then(() => {
2512
2514
  if (t.setAttribute("data-rendered", "true"), e && this.options.triggerType === j.Badge) {
2513
2515
  const r = this.options.triggerOptions.openTooltip;
2514
2516
  Le(e, r);
@@ -3163,8 +3165,8 @@ class _i extends $i {
3163
3165
  }
3164
3166
  }), this.addResource("items", {
3165
3167
  query: async (e, s) => {
3166
- const n = "", r = t.get("$widget").name, o = s.projection || "", d = await (await fetch(
3167
- `${o}/guides?client=${n}&funnel=${r}&site=&phrase=&skip=0&take=10&sorting.type=popularity&sorting.direction=descending`
3168
+ const r = t.get("$widget").name, o = s.projection || "", d = await (await fetch(
3169
+ `${o}/guides?client=&funnel=${r}&site=&phrase=&skip=0&take=10&sorting.type=popularity&sorting.direction=descending`
3168
3170
  )).json();
3169
3171
  return {
3170
3172
  items: (d.Matches || []).map((u) => _e(u)),
@@ -26,17 +26,17 @@
26
26
  * @license
27
27
  * Copyright 2017 Google LLC
28
28
  * SPDX-License-Identifier: BSD-3-Clause
29
- */const{is:zs,defineProperty:Bs,getOwnPropertyDescriptor:Ws,getOwnPropertyNames:qs,getOwnPropertySymbols:Js,getPrototypeOf:Fs}=Object,M=globalThis,pe=M.trustedTypes,Ks=pe?pe.emptyScript:"",jt=M.reactiveElementPolyfillSupport,tt=(i,t)=>i,$t={toAttribute(i,t){switch(t){case Boolean:i=i?Ks:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},se=(i,t)=>!zs(i,t),ge={attribute:!0,type:String,converter:$t,reflect:!1,useDefault:!1,hasChanged:se};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),M.litPropertyMetadata??(M.litPropertyMetadata=new WeakMap);let z=class 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=ge){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),n=this.getPropertyDescriptor(t,s,e);n!==void 0&&Bs(this.prototype,t,n)}}static getPropertyDescriptor(t,e,s){const{get:n,set:r}=Ws(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get:n,set(o){const a=n==null?void 0:n.call(this);r==null||r.call(this,o),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??ge}static _$Ei(){if(this.hasOwnProperty(tt("elementProperties")))return;const t=Fs(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(tt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(tt("properties"))){const e=this.properties,s=[...qs(e),...Js(e)];for(const n of s)this.createProperty(n,e[n])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,n]of e)this.elementProperties.set(s,n)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const n=this._$Eu(e,s);n!==void 0&&this._$Eh.set(n,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 n of s)e.unshift(ue(n))}else t!==void 0&&e.push(ue(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._$ES=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._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$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 Hs(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostConnected)==null?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){var r;const s=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,s);if(n!==void 0&&s.reflect===!0){const o=(((r=s.converter)==null?void 0:r.toAttribute)!==void 0?s.converter:$t).toAttribute(e,s.type);this._$Em=t,o==null?this.removeAttribute(n):this.setAttribute(n,o),this._$Em=null}}_$AK(t,e){var r,o;const s=this.constructor,n=s._$Eh.get(t);if(n!==void 0&&this._$Em!==n){const a=s.getPropertyOptions(n),h=typeof a.converter=="function"?{fromAttribute:a.converter}:((r=a.converter)==null?void 0:r.fromAttribute)!==void 0?a.converter:$t;this._$Em=n,this[n]=h.fromAttribute(e,a.type)??((o=this._$Ej)==null?void 0:o.get(n))??null,this._$Em=null}}requestUpdate(t,e,s){var n;if(t!==void 0){const r=this.constructor,o=this[t];if(s??(s=r.getPropertyOptions(t)),!((s.hasChanged??se)(o,e)||s.useDefault&&s.reflect&&o===((n=this._$Ej)==null?void 0:n.get(t))&&!this.hasAttribute(r._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:n,wrapped:r},o){s&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,o??e??this[t]),r!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),n===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}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.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[r,o]of this._$Ep)this[r]=o;this._$Ep=void 0}const n=this.constructor.elementProperties;if(n.size>0)for(const[r,o]of n){const{wrapped:a}=o,h=this[r];a!==!0||this._$AL.has(r)||h===void 0||this.C(r,void 0,o,h)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$EO)==null||s.forEach(n=>{var r;return(r=n.hostUpdate)==null?void 0:r.call(n)}),this.update(e)):this._$EM()}catch(n){throw t=!1,this._$EM(),n}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(s=>{var n;return(n=s.hostUpdated)==null?void 0:n.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}};z.elementStyles=[],z.shadowRootOptions={mode:"open"},z[tt("elementProperties")]=new Map,z[tt("finalized")]=new Map,jt==null||jt({ReactiveElement:z}),(M.reactiveElementVersions??(M.reactiveElementVersions=[])).push("2.1.0");/**
29
+ */const{is:zs,defineProperty:Bs,getOwnPropertyDescriptor:Ws,getOwnPropertyNames:qs,getOwnPropertySymbols:Js,getPrototypeOf:Fs}=Object,M=globalThis,pe=M.trustedTypes,Ks=pe?pe.emptyScript:"",jt=M.reactiveElementPolyfillSupport,tt=(i,t)=>i,$t={toAttribute(i,t){switch(t){case Boolean:i=i?Ks:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},se=(i,t)=>!zs(i,t),ge={attribute:!0,type:String,converter:$t,reflect:!1,useDefault:!1,hasChanged:se};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),M.litPropertyMetadata??(M.litPropertyMetadata=new WeakMap);let z=class 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=ge){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),n=this.getPropertyDescriptor(t,s,e);n!==void 0&&Bs(this.prototype,t,n)}}static getPropertyDescriptor(t,e,s){const{get:n,set:r}=Ws(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get:n,set(o){const a=n==null?void 0:n.call(this);r==null||r.call(this,o),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??ge}static _$Ei(){if(this.hasOwnProperty(tt("elementProperties")))return;const t=Fs(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(tt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(tt("properties"))){const e=this.properties,s=[...qs(e),...Js(e)];for(const n of s)this.createProperty(n,e[n])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,n]of e)this.elementProperties.set(s,n)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const n=this._$Eu(e,s);n!==void 0&&this._$Eh.set(n,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 n of s)e.unshift(ue(n))}else t!==void 0&&e.push(ue(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._$ES=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._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$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 Hs(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostConnected)==null?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){var r;const s=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,s);if(n!==void 0&&s.reflect===!0){const o=(((r=s.converter)==null?void 0:r.toAttribute)!==void 0?s.converter:$t).toAttribute(e,s.type);this._$Em=t,o==null?this.removeAttribute(n):this.setAttribute(n,o),this._$Em=null}}_$AK(t,e){var r,o;const s=this.constructor,n=s._$Eh.get(t);if(n!==void 0&&this._$Em!==n){const a=s.getPropertyOptions(n),h=typeof a.converter=="function"?{fromAttribute:a.converter}:((r=a.converter)==null?void 0:r.fromAttribute)!==void 0?a.converter:$t;this._$Em=n;const c=h.fromAttribute(e,a.type);this[n]=c??((o=this._$Ej)==null?void 0:o.get(n))??c,this._$Em=null}}requestUpdate(t,e,s){var n;if(t!==void 0){const r=this.constructor,o=this[t];if(s??(s=r.getPropertyOptions(t)),!((s.hasChanged??se)(o,e)||s.useDefault&&s.reflect&&o===((n=this._$Ej)==null?void 0:n.get(t))&&!this.hasAttribute(r._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:n,wrapped:r},o){s&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,o??e??this[t]),r!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),n===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}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.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[r,o]of this._$Ep)this[r]=o;this._$Ep=void 0}const n=this.constructor.elementProperties;if(n.size>0)for(const[r,o]of n){const{wrapped:a}=o,h=this[r];a!==!0||this._$AL.has(r)||h===void 0||this.C(r,void 0,o,h)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$EO)==null||s.forEach(n=>{var r;return(r=n.hostUpdate)==null?void 0:r.call(n)}),this.update(e)):this._$EM()}catch(n){throw t=!1,this._$EM(),n}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(s=>{var n;return(n=s.hostUpdated)==null?void 0:n.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}};z.elementStyles=[],z.shadowRootOptions={mode:"open"},z[tt("elementProperties")]=new Map,z[tt("finalized")]=new Map,jt==null||jt({ReactiveElement:z}),(M.reactiveElementVersions??(M.reactiveElementVersions=[])).push("2.1.1");/**
30
30
  * @license
31
31
  * Copyright 2017 Google LLC
32
32
  * SPDX-License-Identifier: BSD-3-Clause
33
33
  */const et=globalThis,_t=et.trustedTypes,me=_t?_t.createPolicy("lit-html",{createHTML:i=>i}):void 0,Te="$lit$",k=`lit$${Math.random().toFixed(9).slice(2)}$`,je="?"+k,Gs=`<${je}>`,H=document,it=()=>H.createComment(""),nt=i=>i===null||typeof i!="object"&&typeof i!="function",ie=Array.isArray,Ys=i=>ie(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",Ut=`[
34
34
  \f\r]`,Z=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,fe=/-->/g,ye=/>/g,I=RegExp(`>|${Ut}(?:([^\\s"'>=/]+)(${Ut}*=${Ut}*(?:[^
35
- \f\r"'\`<>=]|("|')|))|$)`,"g"),ve=/'/g,be=/"/g,Ue=/^(?:script|style|textarea|title)$/i,Zs=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),X=Zs(1),D=Symbol.for("lit-noChange"),y=Symbol.for("lit-nothing"),we=new WeakMap,j=H.createTreeWalker(H,129);function Ve(i,t){if(!ie(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return me!==void 0?me.createHTML(t):t}const Qs=(i,t)=>{const e=i.length-1,s=[];let n,r=t===2?"<svg>":t===3?"<math>":"",o=Z;for(let a=0;a<e;a++){const h=i[a];let c,l,d=-1,u=0;for(;u<h.length&&(o.lastIndex=u,l=o.exec(h),l!==null);)u=o.lastIndex,o===Z?l[1]==="!--"?o=fe:l[1]!==void 0?o=ye:l[2]!==void 0?(Ue.test(l[2])&&(n=RegExp("</"+l[2],"g")),o=I):l[3]!==void 0&&(o=I):o===I?l[0]===">"?(o=n??Z,d=-1):l[1]===void 0?d=-2:(d=o.lastIndex-l[2].length,c=l[1],o=l[3]===void 0?I:l[3]==='"'?be:ve):o===be||o===ve?o=I:o===fe||o===ye?o=Z:(o=I,n=void 0);const p=o===I&&i[a+1].startsWith("/>")?" ":"";r+=o===Z?h+Gs:d>=0?(s.push(c),h.slice(0,d)+Te+h.slice(d)+k+p):h+k+(d===-2?a:p)}return[Ve(i,r+(i[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class rt{constructor({strings:t,_$litType$:e},s){let n;this.parts=[];let r=0,o=0;const a=t.length-1,h=this.parts,[c,l]=Qs(t,e);if(this.el=rt.createElement(c,s),j.currentNode=this.el.content,e===2||e===3){const d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(n=j.nextNode())!==null&&h.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(const d of n.getAttributeNames())if(d.endsWith(Te)){const u=l[o++],p=n.getAttribute(d).split(k),g=/([.?@])?(.*)/.exec(u);h.push({type:1,index:r,name:g[2],strings:p,ctor:g[1]==="."?ti:g[1]==="?"?ei:g[1]==="@"?si:St}),n.removeAttribute(d)}else d.startsWith(k)&&(h.push({type:6,index:r}),n.removeAttribute(d));if(Ue.test(n.tagName)){const d=n.textContent.split(k),u=d.length-1;if(u>0){n.textContent=_t?_t.emptyScript:"";for(let p=0;p<u;p++)n.append(d[p],it()),j.nextNode(),h.push({type:2,index:++r});n.append(d[u],it())}}}else if(n.nodeType===8)if(n.data===je)h.push({type:2,index:r});else{let d=-1;for(;(d=n.data.indexOf(k,d+1))!==-1;)h.push({type:7,index:r}),d+=k.length-1}r++}}static createElement(t,e){const s=H.createElement("template");return s.innerHTML=t,s}}function J(i,t,e=i,s){var o,a;if(t===D)return t;let n=s!==void 0?(o=e._$Co)==null?void 0:o[s]:e._$Cl;const r=nt(t)?void 0:t._$litDirective$;return(n==null?void 0:n.constructor)!==r&&((a=n==null?void 0:n._$AO)==null||a.call(n,!1),r===void 0?n=void 0:(n=new r(i),n._$AT(i,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=n:e._$Cl=n),n!==void 0&&(t=J(i,n._$AS(i,t.values),n,s)),t}class Xs{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,n=((t==null?void 0:t.creationScope)??H).importNode(e,!0);j.currentNode=n;let r=j.nextNode(),o=0,a=0,h=s[0];for(;h!==void 0;){if(o===h.index){let c;h.type===2?c=new at(r,r.nextSibling,this,t):h.type===1?c=new h.ctor(r,h.name,h.strings,this,t):h.type===6&&(c=new ii(r,this,t)),this._$AV.push(c),h=s[++a]}o!==(h==null?void 0:h.index)&&(r=j.nextNode(),o++)}return j.currentNode=H,n}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 at{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,s,n){this.type=2,this._$AH=y,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=n,this._$Cv=(n==null?void 0:n.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=J(this,t,e),nt(t)?t===y||t==null||t===""?(this._$AH!==y&&this._$AR(),this._$AH=y):t!==this._$AH&&t!==D&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ys(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==y&&nt(this._$AH)?this._$AA.nextSibling.data=t:this.T(H.createTextNode(t)),this._$AH=t}$(t){var r;const{values:e,_$litType$:s}=t,n=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=rt.createElement(Ve(s.h,s.h[0]),this.options)),s);if(((r=this._$AH)==null?void 0:r._$AD)===n)this._$AH.p(e);else{const o=new Xs(n,this),a=o.u(this.options);o.p(e),this.T(a),this._$AH=o}}_$AC(t){let e=we.get(t.strings);return e===void 0&&we.set(t.strings,e=new rt(t)),e}k(t){ie(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,n=0;for(const r of t)n===e.length?e.push(s=new at(this.O(it()),this.O(it()),this,this.options)):s=e[n],s._$AI(r),n++;n<e.length&&(this._$AR(s&&s._$AB.nextSibling,n),e.length=n)}_$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 n=t.nextSibling;t.remove(),t=n}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class St{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,n,r){this.type=1,this._$AH=y,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=r,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=y}_$AI(t,e=this,s,n){const r=this.strings;let o=!1;if(r===void 0)t=J(this,t,e,0),o=!nt(t)||t!==this._$AH&&t!==D,o&&(this._$AH=t);else{const a=t;let h,c;for(t=r[0],h=0;h<r.length-1;h++)c=J(this,a[s+h],e,h),c===D&&(c=this._$AH[h]),o||(o=!nt(c)||c!==this._$AH[h]),c===y?t=y:t!==y&&(t+=(c??"")+r[h+1]),this._$AH[h]=c}o&&!n&&this.j(t)}j(t){t===y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class ti extends St{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===y?void 0:t}}class ei extends St{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==y)}}class si extends St{constructor(t,e,s,n,r){super(t,e,s,n,r),this.type=5}_$AI(t,e=this){if((t=J(this,t,e,0)??y)===D)return;const s=this._$AH,n=t===y&&s!==y||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==y&&(s===y||n);n&&this.element.removeEventListener(this.name,this,s),r&&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 ii{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){J(this,t)}}const Vt=et.litHtmlPolyfillSupport;Vt==null||Vt(rt,at),(et.litHtmlVersions??(et.litHtmlVersions=[])).push("3.3.0");const ni=(i,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let n=s._$litPart$;if(n===void 0){const r=(e==null?void 0:e.renderBefore)??null;s._$litPart$=n=new at(t.insertBefore(it(),r),r,void 0,e??{})}return n._$AI(i),n};/**
35
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),ve=/'/g,be=/"/g,Ue=/^(?:script|style|textarea|title)$/i,Zs=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),X=Zs(1),D=Symbol.for("lit-noChange"),y=Symbol.for("lit-nothing"),we=new WeakMap,j=H.createTreeWalker(H,129);function Ve(i,t){if(!ie(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return me!==void 0?me.createHTML(t):t}const Qs=(i,t)=>{const e=i.length-1,s=[];let n,r=t===2?"<svg>":t===3?"<math>":"",o=Z;for(let a=0;a<e;a++){const h=i[a];let c,l,d=-1,u=0;for(;u<h.length&&(o.lastIndex=u,l=o.exec(h),l!==null);)u=o.lastIndex,o===Z?l[1]==="!--"?o=fe:l[1]!==void 0?o=ye:l[2]!==void 0?(Ue.test(l[2])&&(n=RegExp("</"+l[2],"g")),o=I):l[3]!==void 0&&(o=I):o===I?l[0]===">"?(o=n??Z,d=-1):l[1]===void 0?d=-2:(d=o.lastIndex-l[2].length,c=l[1],o=l[3]===void 0?I:l[3]==='"'?be:ve):o===be||o===ve?o=I:o===fe||o===ye?o=Z:(o=I,n=void 0);const p=o===I&&i[a+1].startsWith("/>")?" ":"";r+=o===Z?h+Gs:d>=0?(s.push(c),h.slice(0,d)+Te+h.slice(d)+k+p):h+k+(d===-2?a:p)}return[Ve(i,r+(i[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class rt{constructor({strings:t,_$litType$:e},s){let n;this.parts=[];let r=0,o=0;const a=t.length-1,h=this.parts,[c,l]=Qs(t,e);if(this.el=rt.createElement(c,s),j.currentNode=this.el.content,e===2||e===3){const d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(n=j.nextNode())!==null&&h.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(const d of n.getAttributeNames())if(d.endsWith(Te)){const u=l[o++],p=n.getAttribute(d).split(k),g=/([.?@])?(.*)/.exec(u);h.push({type:1,index:r,name:g[2],strings:p,ctor:g[1]==="."?ti:g[1]==="?"?ei:g[1]==="@"?si:St}),n.removeAttribute(d)}else d.startsWith(k)&&(h.push({type:6,index:r}),n.removeAttribute(d));if(Ue.test(n.tagName)){const d=n.textContent.split(k),u=d.length-1;if(u>0){n.textContent=_t?_t.emptyScript:"";for(let p=0;p<u;p++)n.append(d[p],it()),j.nextNode(),h.push({type:2,index:++r});n.append(d[u],it())}}}else if(n.nodeType===8)if(n.data===je)h.push({type:2,index:r});else{let d=-1;for(;(d=n.data.indexOf(k,d+1))!==-1;)h.push({type:7,index:r}),d+=k.length-1}r++}}static createElement(t,e){const s=H.createElement("template");return s.innerHTML=t,s}}function J(i,t,e=i,s){var o,a;if(t===D)return t;let n=s!==void 0?(o=e._$Co)==null?void 0:o[s]:e._$Cl;const r=nt(t)?void 0:t._$litDirective$;return(n==null?void 0:n.constructor)!==r&&((a=n==null?void 0:n._$AO)==null||a.call(n,!1),r===void 0?n=void 0:(n=new r(i),n._$AT(i,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=n:e._$Cl=n),n!==void 0&&(t=J(i,n._$AS(i,t.values),n,s)),t}class Xs{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,n=((t==null?void 0:t.creationScope)??H).importNode(e,!0);j.currentNode=n;let r=j.nextNode(),o=0,a=0,h=s[0];for(;h!==void 0;){if(o===h.index){let c;h.type===2?c=new at(r,r.nextSibling,this,t):h.type===1?c=new h.ctor(r,h.name,h.strings,this,t):h.type===6&&(c=new ii(r,this,t)),this._$AV.push(c),h=s[++a]}o!==(h==null?void 0:h.index)&&(r=j.nextNode(),o++)}return j.currentNode=H,n}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 at{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,s,n){this.type=2,this._$AH=y,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=n,this._$Cv=(n==null?void 0:n.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=J(this,t,e),nt(t)?t===y||t==null||t===""?(this._$AH!==y&&this._$AR(),this._$AH=y):t!==this._$AH&&t!==D&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ys(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==y&&nt(this._$AH)?this._$AA.nextSibling.data=t:this.T(H.createTextNode(t)),this._$AH=t}$(t){var r;const{values:e,_$litType$:s}=t,n=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=rt.createElement(Ve(s.h,s.h[0]),this.options)),s);if(((r=this._$AH)==null?void 0:r._$AD)===n)this._$AH.p(e);else{const o=new Xs(n,this),a=o.u(this.options);o.p(e),this.T(a),this._$AH=o}}_$AC(t){let e=we.get(t.strings);return e===void 0&&we.set(t.strings,e=new rt(t)),e}k(t){ie(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,n=0;for(const r of t)n===e.length?e.push(s=new at(this.O(it()),this.O(it()),this,this.options)):s=e[n],s._$AI(r),n++;n<e.length&&(this._$AR(s&&s._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t!==this._$AB;){const n=t.nextSibling;t.remove(),t=n}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class St{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,n,r){this.type=1,this._$AH=y,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=r,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=y}_$AI(t,e=this,s,n){const r=this.strings;let o=!1;if(r===void 0)t=J(this,t,e,0),o=!nt(t)||t!==this._$AH&&t!==D,o&&(this._$AH=t);else{const a=t;let h,c;for(t=r[0],h=0;h<r.length-1;h++)c=J(this,a[s+h],e,h),c===D&&(c=this._$AH[h]),o||(o=!nt(c)||c!==this._$AH[h]),c===y?t=y:t!==y&&(t+=(c??"")+r[h+1]),this._$AH[h]=c}o&&!n&&this.j(t)}j(t){t===y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class ti extends St{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===y?void 0:t}}class ei extends St{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==y)}}class si extends St{constructor(t,e,s,n,r){super(t,e,s,n,r),this.type=5}_$AI(t,e=this){if((t=J(this,t,e,0)??y)===D)return;const s=this._$AH,n=t===y&&s!==y||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==y&&(s===y||n);n&&this.element.removeEventListener(this.name,this,s),r&&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 ii{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){J(this,t)}}const Vt=et.litHtmlPolyfillSupport;Vt==null||Vt(rt,at),(et.litHtmlVersions??(et.litHtmlVersions=[])).push("3.3.1");const ni=(i,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let n=s._$litPart$;if(n===void 0){const r=(e==null?void 0:e.renderBefore)??null;s._$litPart$=n=new at(t.insertBefore(it(),r),r,void 0,e??{})}return n._$AI(i),n};/**
36
36
  * @license
37
37
  * Copyright 2017 Google LLC
38
38
  * SPDX-License-Identifier: BSD-3-Clause
39
- */const V=globalThis;let q=class extends z{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=ni(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 D}};var Ae;q._$litElement$=!0,q.finalized=!0,(Ae=V.litElementHydrateSupport)==null||Ae.call(V,{LitElement:q});const Ht=V.litElementPolyfillSupport;Ht==null||Ht({LitElement:q});(V.litElementVersions??(V.litElementVersions=[])).push("4.2.0");/**
39
+ */const V=globalThis;let q=class extends z{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=ni(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 D}};var Ae;q._$litElement$=!0,q.finalized=!0,(Ae=V.litElementHydrateSupport)==null||Ae.call(V,{LitElement:q});const Ht=V.litElementPolyfillSupport;Ht==null||Ht({LitElement:q});(V.litElementVersions??(V.litElementVersions=[])).push("4.2.1");/**
40
40
  * @license
41
41
  * Copyright 2017 Google LLC
42
42
  * SPDX-License-Identifier: BSD-3-Clause
@@ -159,7 +159,7 @@
159
159
  align-items: center;
160
160
  fill: var(--trigger-text-color, var(--text-on-primary-background));
161
161
  }
162
- `];let L=re;ct([F({attribute:!1})],L.prototype,"symbol");ct([F({attribute:!1})],L.prototype,"container");ct([C()],L.prototype,"active");ct([C()],L.prototype,"loaded");ct([C()],L.prototype,"icon");var U=(i=>(i.Inline="inline",i.Link="link",i.Badge="badge",i.Unsupported="unsupported",i))(U||{});const hi=(i,t)=>i&&t?"both":i?"widgetDOM":t?"triggerDOM":"none",qe=i=>i?typeof i=="boolean"&&i?"link":typeof i=="object"&&!Array.isArray(i)?"badge":"unsupported":"inline",li=async(i,t,e,s,n,r=!1)=>{var l,d;const o=hi(e,s),a=qe(n),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",L);const p=document.createElement("ace-widget-trigger");p.symbol=n.symbol,p.container=i,document.body.appendChild(p),console.log("Created trigger"),c.triggerDOMElement=p}break}}return c},di="modals";class ui{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 n=t.get("widgetDOMElements")||[];t.register("widgetDOMElements",[...n,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===U.Badge&&Us(e),Promise.resolve().then(()=>require("./render-DI802BBI.js")).then(n=>n.default(this.container,t)).then(()=>{if(t.setAttribute("data-rendered","true"),e&&this.options.triggerType===U.Badge){const r=this.options.triggerOptions.openTooltip;Ie(e,r)}gs(this.container,t);const n=this.container.get("$environment").widgets.all();O(this.container,di,f.Session).then(r=>{r&&r.forEach(o=>{n.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:n,symbol:r,ariaLabel:o,closedTooltip:a,openTooltip:h}=t,c={closedTooltip:a,openTooltip:h};this.options.triggerOptions=c;const l=Ts(e,{label:n,ariaLabel:o,widgetName:s,tooltip:a});this.unsubscribe.push(l)}async dispose(){var s,n,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&&((n=t.parentNode)==null||n.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",pi=i=>{const t={tags:i.tags};return i.context&&typeof i.context!="function"&&(t.context=i.context),i.properties&&typeof i.properties!="function"&&(t.properties=i.properties),i.layout&&typeof i.layout!="function"&&(t.layout=i.layout),t};class ne{constructor(t,e){this.container=t,this.storageWriter=e}static create(t){return P(t,ut,m.Necessary,{medium:f.Local}).then(e=>new ne(t,e))}write(t,e,s,n){return A(this)(()=>O(this.container,ut,f.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:n,attributes:pi(s),rules:e.rules},this.storageWriter({keys:o,items:a})}))}remove(t){return A(this)(()=>O(this.container,ut,f.Local).then((e={})=>{const{keys:s=[],items:n={}}=e,r=s.indexOf(t);if(r>-1)return s.splice(r,1),delete n[t],this.storageWriter(e)}))}load(t){return A(this)(()=>O(this.container,ut,f.Local).then((e={})=>{const{keys:s=[],items:n={}}=e;s.forEach(r=>{const o=n[r];if(o){const{rules:a,attributes:h,options:c}=o;t.write({attributes:h,options:c,target:new K(t,a)})}})}))}}const gi=i=>{const{container:t}=i;return ne.create(t).then(e=>{const s=t.get("$settings"),n={localStorage:e},r=new G(i,n),o=Ne(r,s);return i.events.subscribe("widget:state-change",(a,h)=>{h.state===Ce.Deactivating&&o()}),r})},mi=i=>Promise.resolve().then(()=>Is).then(({StorageProvider:t})=>new t),fi=i=>Promise.resolve().then(()=>Gt).then(({ActionResolver:t})=>new t(i)),yi=i=>Promise.resolve().then(()=>Gt).then(({ComponentResolver:t})=>new t(i)),vi=i=>Promise.resolve().then(()=>Gt).then(()=>gi(i.get("$widget"))),zt="$settings",Bt="open",$e="activeStickyWidget";class bi extends ds{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(n=>{const{activate:r}=n;(typeof r>"u"||r===null||r===!0)&&(this.activated=(this.activated||this.widget.activate()).then(()=>this.attach(s)))})},this.container.registerAsync("storage",()=>mi(this.container)),this.container.registerFactory("settings",()=>O(this.container,zt,f.Local).then((e={})=>({...this.container.get("$settings"),...e}))),as(this,"load",this.handleBootstrapping),this.container.registerAsync("componentResolver",()=>yi(this.container)),this.container.registerAsync("actionResolver",()=>fi(this.container)),this.container.register("matchMedia",window.matchMedia),this.container.registerAsync("components",()=>vi(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:n},r])=>(s.subscribe(this.widget.name,(h,c,l)=>this.onAction(c,l)),(h=>{n.nodes.query({type:"view"}).forEach(c=>{n.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:n=ot(),triggerDOMElement:r,withRenderState:o}=t,h=qe(e)===U.Inline&&((r==null?void 0:r.childElementCount)||0)>0,c=await li(this.container,this.widget.name,s,r,e,h);this.outlets.size<1&&!o&&this.setRenderState("unset");const l=()=>{const g=()=>b.querySelectorAll("[data-loading=true]").length===0,[b]=this.widget.container.get("widgetDOMElements"),x=(kt,$)=>{g()&&(c.callback&&c.callback(),$.disconnect())},ht={attributes:!0,subtree:!0,childList:!0};g()&&c.callback&&c.callback(),new MutationObserver(x).observe(b,ht)};h&&this.widget.container.getAsync("dataClient").then(({events:g})=>{g.subscribe("data-client:fetched",(b,x)=>{x.unresolvedQueries===0&&l()})});const d=this.getOrCreateViewOutlet(n,c);if(this.outlets.set(n,d),this.widget.events.dispatch("widget:attached",{},{bubbles:!0}),c.triggerType===U.Badge&&e&&((u=c.triggerDOMElement)==null||u.setAttribute("aria-expanded","false"),d==null||d.renderBadge(e)),c.triggerType!==U.Inline&&((p=c.triggerDOMElement)==null||p.addEventListener("click",g=>{g.preventDefault(),this.container.get("settings").then(({trigger:b})=>{d.render().then(()=>this.renderState()).then(x=>b&&b.action&&b.action==="hide"?x===w.open?this.hide():this.open():x===w.open?this.close():this.open())})})),this.outlets.size>1)return this.renderState().then(g=>{this.triggerStateIfApplicable(g)});if(o)return o==="storage"?this.renderState().then(g=>{if(c.triggerType===U.Inline){this.triggerStateIfApplicable("open");return}this.triggerStateIfApplicable(g)}):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 ui(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"),P(this.container,zt,m.Necessary,{medium:f.Local})]).then(([e,s])=>Promise.resolve(t(e)).then(n=>s(n).then(()=>{const r={...e,...n};return this.widget.events.dispatch("widget:settings-updated",r),r})))}clearSettings(){return P(this.container,zt,m.Necessary,{medium:f.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 O(this.container,Bt,f.Session).then((e=w.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"?w.open:t==="close"?w.closed:w.hidden;return this.setRenderState(s).then(()=>{this.setTriggerState(s===w.open),s!==w.hidden?s===w.open?this.onOpen():this.onClose():this.outlets.forEach(n=>{var r;return(r=n.options.triggerDOMElement)==null?void 0:r.setAttribute("aria-expanded","false")})})}}setRenderState(t){const{invoke:e,events:s}=this.container.get("$widget");return Promise.all([P(this.container,Bt,m.Necessary,{medium:f.Session}),P(this.container,Bt,m.Necessary,{medium:f.Local,duration:{minutes:5}}),e("renderState")]).then(([n,r,o])=>{t==="unset"||!t?(r(),n()):n(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:n}=this.container.get("$settings");return s.activate!==n?this.setSettings(()=>Promise.resolve({activate:n})):Promise.resolve()}).then(()=>t).then(({components:s})=>{this.outlets.forEach(n=>{var r;return(r=n.options.triggerDOMElement)==null?void 0:r.setAttribute("aria-expanded","false")})})}setTriggerState(t){this.outlets.forEach(e=>{const{options:{triggerDOMElement:s,triggerOptions:n}}=e,{openTooltip:r,closedTooltip:o}=n||{};s&&(t?Ie(s,r):js(s,o))})}deactivate(){this.subs.forEach(e=>e());const t=[];return this.outlets.forEach(e=>t.push(e.dispose())),O(this.container,$e,f.Local).then(e=>e===this.widget.name?P(this.container,$e,m.Necessary,{medium:f.Local,scope:Y.Implementation}).then(s=>s()).then(()=>Promise.all(t)):Promise.all(t))}}/**
162
+ `];let L=re;ct([F({attribute:!1})],L.prototype,"symbol");ct([F({attribute:!1})],L.prototype,"container");ct([C()],L.prototype,"active");ct([C()],L.prototype,"loaded");ct([C()],L.prototype,"icon");var U=(i=>(i.Inline="inline",i.Link="link",i.Badge="badge",i.Unsupported="unsupported",i))(U||{});const hi=(i,t)=>i&&t?"both":i?"widgetDOM":t?"triggerDOM":"none",qe=i=>i?typeof i=="boolean"&&i?"link":typeof i=="object"&&!Array.isArray(i)?"badge":"unsupported":"inline",li=async(i,t,e,s,n,r=!1)=>{var l,d;const o=hi(e,s),a=qe(n),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",L);const p=document.createElement("ace-widget-trigger");p.symbol=n.symbol,p.container=i,document.body.appendChild(p),console.log("Created trigger"),c.triggerDOMElement=p}break}}return c},di="modals";class ui{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 n=t.get("widgetDOMElements")||[];t.register("widgetDOMElements",[...n,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===U.Badge&&Us(e),Promise.resolve().then(()=>require("./render-sTeOjtXZ.js")).then(n=>n.default(this.container,t)).then(()=>{if(t.setAttribute("data-rendered","true"),e&&this.options.triggerType===U.Badge){const r=this.options.triggerOptions.openTooltip;Ie(e,r)}gs(this.container,t);const n=this.container.get("$environment").widgets.all();O(this.container,di,f.Session).then(r=>{r&&r.forEach(o=>{n.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:n,symbol:r,ariaLabel:o,closedTooltip:a,openTooltip:h}=t,c={closedTooltip:a,openTooltip:h};this.options.triggerOptions=c;const l=Ts(e,{label:n,ariaLabel:o,widgetName:s,tooltip:a});this.unsubscribe.push(l)}async dispose(){var s,n,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&&((n=t.parentNode)==null||n.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",pi=i=>{const t={tags:i.tags};return i.context&&typeof i.context!="function"&&(t.context=i.context),i.properties&&typeof i.properties!="function"&&(t.properties=i.properties),i.layout&&typeof i.layout!="function"&&(t.layout=i.layout),t};class ne{constructor(t,e){this.container=t,this.storageWriter=e}static create(t){return P(t,ut,m.Necessary,{medium:f.Local}).then(e=>new ne(t,e))}write(t,e,s,n){return A(this)(()=>O(this.container,ut,f.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:n,attributes:pi(s),rules:e.rules},this.storageWriter({keys:o,items:a})}))}remove(t){return A(this)(()=>O(this.container,ut,f.Local).then((e={})=>{const{keys:s=[],items:n={}}=e,r=s.indexOf(t);if(r>-1)return s.splice(r,1),delete n[t],this.storageWriter(e)}))}load(t){return A(this)(()=>O(this.container,ut,f.Local).then((e={})=>{const{keys:s=[],items:n={}}=e;s.forEach(r=>{const o=n[r];if(o){const{rules:a,attributes:h,options:c}=o;t.write({attributes:h,options:c,target:new K(t,a)})}})}))}}const gi=i=>{const{container:t}=i;return ne.create(t).then(e=>{const s=t.get("$settings"),n={localStorage:e},r=new G(i,n),o=Ne(r,s);return i.events.subscribe("widget:state-change",(a,h)=>{h.state===Ce.Deactivating&&o()}),r})},mi=i=>Promise.resolve().then(()=>Is).then(({StorageProvider:t})=>new t),fi=i=>Promise.resolve().then(()=>Gt).then(({ActionResolver:t})=>new t(i)),yi=i=>Promise.resolve().then(()=>Gt).then(({ComponentResolver:t})=>new t(i)),vi=i=>Promise.resolve().then(()=>Gt).then(()=>gi(i.get("$widget"))),zt="$settings",Bt="open",$e="activeStickyWidget";class bi extends ds{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(n=>{const{activate:r}=n;(typeof r>"u"||r===null||r===!0)&&(this.activated=(this.activated||this.widget.activate()).then(()=>this.attach(s)))})},this.container.registerAsync("storage",()=>mi(this.container)),this.container.registerFactory("settings",()=>O(this.container,zt,f.Local).then((e={})=>({...this.container.get("$settings"),...e}))),as(this,"load",this.handleBootstrapping),this.container.registerAsync("componentResolver",()=>yi(this.container)),this.container.registerAsync("actionResolver",()=>fi(this.container)),this.container.register("matchMedia",window.matchMedia),this.container.registerAsync("components",()=>vi(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:n},r])=>(s.subscribe(this.widget.name,(h,c,l)=>this.onAction(c,l)),(h=>{n.nodes.query({type:"view"}).forEach(c=>{n.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:n=ot(),triggerDOMElement:r,withRenderState:o}=t,h=qe(e)===U.Inline&&((r==null?void 0:r.childElementCount)||0)>0,c=await li(this.container,this.widget.name,s,r,e,h);this.outlets.size<1&&!o&&this.setRenderState("unset");const l=()=>{const g=()=>b.querySelectorAll("[data-loading=true]").length===0,[b]=this.widget.container.get("widgetDOMElements"),x=(kt,$)=>{g()&&(c.callback&&c.callback(),$.disconnect())},ht={attributes:!0,subtree:!0,childList:!0};g()&&c.callback&&c.callback(),new MutationObserver(x).observe(b,ht)};h&&this.widget.container.getAsync("dataClient").then(({events:g})=>{g.subscribe("data-client:fetched",(b,x)=>{x.unresolvedQueries===0&&l()})});const d=this.getOrCreateViewOutlet(n,c);if(this.outlets.set(n,d),this.widget.events.dispatch("widget:attached",{},{bubbles:!0}),c.triggerType===U.Badge&&e&&((u=c.triggerDOMElement)==null||u.setAttribute("aria-expanded","false"),d==null||d.renderBadge(e)),c.triggerType!==U.Inline&&((p=c.triggerDOMElement)==null||p.addEventListener("click",g=>{g.preventDefault(),this.container.get("settings").then(({trigger:b})=>{d.render().then(()=>this.renderState()).then(x=>b&&b.action&&b.action==="hide"?x===w.open?this.hide():this.open():x===w.open?this.close():this.open())})})),this.outlets.size>1)return this.renderState().then(g=>{this.triggerStateIfApplicable(g)});if(o)return o==="storage"?this.renderState().then(g=>{if(c.triggerType===U.Inline){this.triggerStateIfApplicable("open");return}this.triggerStateIfApplicable(g)}):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 ui(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"),P(this.container,zt,m.Necessary,{medium:f.Local})]).then(([e,s])=>Promise.resolve(t(e)).then(n=>s(n).then(()=>{const r={...e,...n};return this.widget.events.dispatch("widget:settings-updated",r),r})))}clearSettings(){return P(this.container,zt,m.Necessary,{medium:f.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 O(this.container,Bt,f.Session).then((e=w.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"?w.open:t==="close"?w.closed:w.hidden;return this.setRenderState(s).then(()=>{this.setTriggerState(s===w.open),s!==w.hidden?s===w.open?this.onOpen():this.onClose():this.outlets.forEach(n=>{var r;return(r=n.options.triggerDOMElement)==null?void 0:r.setAttribute("aria-expanded","false")})})}}setRenderState(t){const{invoke:e,events:s}=this.container.get("$widget");return Promise.all([P(this.container,Bt,m.Necessary,{medium:f.Session}),P(this.container,Bt,m.Necessary,{medium:f.Local,duration:{minutes:5}}),e("renderState")]).then(([n,r,o])=>{t==="unset"||!t?(r(),n()):n(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:n}=this.container.get("$settings");return s.activate!==n?this.setSettings(()=>Promise.resolve({activate:n})):Promise.resolve()}).then(()=>t).then(({components:s})=>{this.outlets.forEach(n=>{var r;return(r=n.options.triggerDOMElement)==null?void 0:r.setAttribute("aria-expanded","false")})})}setTriggerState(t){this.outlets.forEach(e=>{const{options:{triggerDOMElement:s,triggerOptions:n}}=e,{openTooltip:r,closedTooltip:o}=n||{};s&&(t?Ie(s,r):js(s,o))})}deactivate(){this.subs.forEach(e=>e());const t=[];return this.outlets.forEach(e=>t.push(e.dispose())),O(this.container,$e,f.Local).then(e=>e===this.widget.name?P(this.container,$e,m.Necessary,{medium:f.Local,scope:Y.Implementation}).then(s=>s()).then(()=>Promise.all(t)):Promise.all(t))}}/**
163
163
  * @license
164
164
  * Copyright 2021 Google LLC
165
165
  * SPDX-License-Identifier: BSD-3-Clause
@@ -183,7 +183,7 @@
183
183
  * @license
184
184
  * Copyright 2022 Google LLC
185
185
  * SPDX-License-Identifier: BSD-3-Clause
186
- */function _i({context:i,subscribe:t}){return(e,s)=>{typeof s=="object"?s.addInitializer(function(){new _e(this,{context:i,callback:n=>{e.set.call(this,n)},subscribe:t})}):e.constructor.addInitializer(n=>{new _e(n,{context:i,callback:r=>{n[s]=r},subscribe:t})})}}const Fe="children",Ke="descriptor",Ge="container",Ye="context",Ze="layout",Qe="properties";class Xe{constructor(t){(this.host=t).addController(this)}hostConnected(){}hostDisconnected(){}setDescriptor(t){this._descriptor=t}setContainer(t){this._container=t}async dispatch(t,e){if(!this._container||!this._descriptor)return;const s=await G.getInstance(this._container),n=new K(s).withId(this._descriptor.id);await s.actions(n,this._descriptor.type||ot()).dispatch(t,e)}}const xi=async(i,t)=>{const e=i.properties().provider;let s={},n="";Array.isArray(e)?(n=e[0],s=e[1]):n=e||"";const r=await t.getAsync(n);if(!r)throw new Error("No provider defined in ListComponent");return r.applyComponentNodeSettings(i.node.id,s),{provider:r,settings:s}},Ai=async(i,t)=>{const{provider:e,settings:s={}}=await xi(i,t);return{addResource:(n,r)=>e.addResource(n,r),getData:(n,r)=>e.getData(n,r,s)}};class ts{constructor(t){this.container=t,this.resources=new Map,this.nodeConfiguration=new Map}async getData(t,e,s){const n=this.resources.get(t);if(!n)throw new Error(`Unable to get EntityProvider for "${t}"`);return await n.query(e,s)}addResource(t,e){this.resources.set(t,e)}applyComponentNodeSettings(t,e){this.nodeConfiguration.set(t,e)}}const xe=i=>({title:i.Title,id:i.Id.toString()});class Ei extends ts{constructor(t){super(t),this.addResource("item",{query:async(e,s)=>{const n=e.itemId,r="78aacc09-ae6f-5485-5ca3-9dacebb95825",o=t.get("$widget").name,a=s.projection||"",c=await(await fetch(`${a}/guides/${n}?client=${r}&funnel=${o}&site=%2F%2Fdemo.humany.cc%2Fadmin%2Finterfaces&phrase=&connectionId=&p.LastGuideId=2857`)).json();return c?xe(c):null}}),this.addResource("items",{query:async(e,s)=>{const n="",r=t.get("$widget").name,o=s.projection||"",d=await(await fetch(`${o}/guides?client=${n}&funnel=${r}&site=&phrase=&skip=0&take=10&sorting.type=popularity&sorting.direction=descending`)).json();return{items:(d.Matches||[]).map(u=>xe(u)),totalItems:(d==null?void 0:d.TotalMatches)||0}}})}}const Ci=async i=>{i.registerAsync("guideProvider",()=>new Ei(i))},Oi=(i,t,e,s,n)=>i.getAsync("componentResolver").then(r=>(r.registerComponent(t,e),Me(i,t,s||(()=>{}),t,n))),Si=i=>{const t={};return Object.keys(i).forEach(e=>{e.indexOf("css-")>-1&&(t[e]=i[e])}),t},es=(i,t)=>{const e=Si(t);Object.entries(e).forEach(([s,n])=>{i.style.setProperty(s.replace("css-",""),n)})};var Pi=Object.defineProperty,R=(i,t,e,s)=>{for(var n=void 0,r=i.length-1,o;r>=0;r--)(o=i[r])&&(n=o(t,e,n)||n);return n&&Pi(t,e,n),n};const ki=i=>{const e=class e extends i{constructor(){super(...arguments),this.entry="",this._descriptorProvider=new B(this,Ke,void 0),this._childrenProvider=new B(this,Fe,[]),this._propertiesProvider=new B(this,Qe,{}),this._contextProvider=new B(this,Ye,{}),this._layoutProvider=new B(this,Ze,{}),this.actions=new Xe(this),this.context={},this.layout={},this.properties={}}connectedCallback(){super.connectedCallback(),this.container&&(this.actions.setContainer(this.container),G.getInstance(this.container).then(async n=>{var o,a;const r=n.nodes.get(this.entry);if(r){this._propertyChangeListener=n.events.subscribe("components:properties-changed",(u,p)=>{r.id===p.node.id&&this._setProperties(p.node.attributes.properties)}),this._contextChangeListener=n.events.subscribe("components:context-changed",(u,p)=>{r.id===p.node.id&&this._setContext(p.node.attributes.context)}),this._layoutChangeListener=n.events.subscribe("components:layout-changed",(u,p)=>{r.id===p.node.id&&this._setLayout(p.node.attributes.layout)});const h="default";this._unmountNode=r.mount(this.container),this._setDescriptor(qt(r,h)),this._setProperties(r.attributes.properties),this._setContext(r.attributes.context),this._setLayout(this.layout);const c=r.getChildren(h).map(u=>qt(u));this._childrenProvider.setValue(c);const l=await this.container.getAsync("componentResolver");if(((o=this.descriptor)==null?void 0:o.type)==="area")return;const d=l.getComponent(((a=this.descriptor)==null?void 0:a.type)||"");d.then&&d.then(u=>{this.component=u.default})}}))}disconnectedCallback(){super.disconnectedCallback(),this._propertyChangeListener&&this._propertyChangeListener(),this._contextChangeListener&&this._contextChangeListener(),this._layoutChangeListener&&this._layoutChangeListener(),this._unmountNode&&this._unmountNode()}updated(){this.container&&this.actions.setContainer(this.container),this.renderRoot.host.style.setProperty("--width",this.layout.size==="full"?"var(--columns, 1)":`min(${this.layout.size||"var(--columns)"}, var(--columns))`),es(this.renderRoot.host,this.properties)}_setProperties(n){this._propertiesProvider.setValue(n),this.properties=n}_setContext(n){this._contextProvider.setValue(n),this.context=n}_setLayout(n){this._layoutProvider.setValue(n),this.layout=n}_setDescriptor(n){this.descriptor=n,this._descriptorProvider.setValue(n),this.actions.setDescriptor(n)}};e.styles=[i.styles??[],ee`
186
+ */function _i({context:i,subscribe:t}){return(e,s)=>{typeof s=="object"?s.addInitializer(function(){new _e(this,{context:i,callback:n=>{e.set.call(this,n)},subscribe:t})}):e.constructor.addInitializer(n=>{new _e(n,{context:i,callback:r=>{n[s]=r},subscribe:t})})}}const Fe="children",Ke="descriptor",Ge="container",Ye="context",Ze="layout",Qe="properties";class Xe{constructor(t){(this.host=t).addController(this)}hostConnected(){}hostDisconnected(){}setDescriptor(t){this._descriptor=t}setContainer(t){this._container=t}async dispatch(t,e){if(!this._container||!this._descriptor)return;const s=await G.getInstance(this._container),n=new K(s).withId(this._descriptor.id);await s.actions(n,this._descriptor.type||ot()).dispatch(t,e)}}const xi=async(i,t)=>{const e=i.properties().provider;let s={},n="";Array.isArray(e)?(n=e[0],s=e[1]):n=e||"";const r=await t.getAsync(n);if(!r)throw new Error("No provider defined in ListComponent");return r.applyComponentNodeSettings(i.node.id,s),{provider:r,settings:s}},Ai=async(i,t)=>{const{provider:e,settings:s={}}=await xi(i,t);return{addResource:(n,r)=>e.addResource(n,r),getData:(n,r)=>e.getData(n,r,s)}};class ts{constructor(t){this.container=t,this.resources=new Map,this.nodeConfiguration=new Map}async getData(t,e,s){const n=this.resources.get(t);if(!n)throw new Error(`Unable to get EntityProvider for "${t}"`);return await n.query(e,s)}addResource(t,e){this.resources.set(t,e)}applyComponentNodeSettings(t,e){this.nodeConfiguration.set(t,e)}}const xe=i=>({title:i.Title,id:i.Id.toString()});class Ei extends ts{constructor(t){super(t),this.addResource("item",{query:async(e,s)=>{const n=e.itemId,r="78aacc09-ae6f-5485-5ca3-9dacebb95825",o=t.get("$widget").name,a=s.projection||"",c=await(await fetch(`${a}/guides/${n}?client=${r}&funnel=${o}&site=%2F%2Fdemo.humany.cc%2Fadmin%2Finterfaces&phrase=&connectionId=&p.LastGuideId=2857`)).json();return c?xe(c):null}}),this.addResource("items",{query:async(e,s)=>{const r=t.get("$widget").name,o=s.projection||"",d=await(await fetch(`${o}/guides?client=&funnel=${r}&site=&phrase=&skip=0&take=10&sorting.type=popularity&sorting.direction=descending`)).json();return{items:(d.Matches||[]).map(u=>xe(u)),totalItems:(d==null?void 0:d.TotalMatches)||0}}})}}const Ci=async i=>{i.registerAsync("guideProvider",()=>new Ei(i))},Oi=(i,t,e,s,n)=>i.getAsync("componentResolver").then(r=>(r.registerComponent(t,e),Me(i,t,s||(()=>{}),t,n))),Si=i=>{const t={};return Object.keys(i).forEach(e=>{e.indexOf("css-")>-1&&(t[e]=i[e])}),t},es=(i,t)=>{const e=Si(t);Object.entries(e).forEach(([s,n])=>{i.style.setProperty(s.replace("css-",""),n)})};var Pi=Object.defineProperty,R=(i,t,e,s)=>{for(var n=void 0,r=i.length-1,o;r>=0;r--)(o=i[r])&&(n=o(t,e,n)||n);return n&&Pi(t,e,n),n};const ki=i=>{const e=class e extends i{constructor(){super(...arguments),this.entry="",this._descriptorProvider=new B(this,Ke,void 0),this._childrenProvider=new B(this,Fe,[]),this._propertiesProvider=new B(this,Qe,{}),this._contextProvider=new B(this,Ye,{}),this._layoutProvider=new B(this,Ze,{}),this.actions=new Xe(this),this.context={},this.layout={},this.properties={}}connectedCallback(){super.connectedCallback(),this.container&&(this.actions.setContainer(this.container),G.getInstance(this.container).then(async n=>{var o,a;const r=n.nodes.get(this.entry);if(r){this._propertyChangeListener=n.events.subscribe("components:properties-changed",(u,p)=>{r.id===p.node.id&&this._setProperties(p.node.attributes.properties)}),this._contextChangeListener=n.events.subscribe("components:context-changed",(u,p)=>{r.id===p.node.id&&this._setContext(p.node.attributes.context)}),this._layoutChangeListener=n.events.subscribe("components:layout-changed",(u,p)=>{r.id===p.node.id&&this._setLayout(p.node.attributes.layout)});const h="default";this._unmountNode=r.mount(this.container),this._setDescriptor(qt(r,h)),this._setProperties(r.attributes.properties),this._setContext(r.attributes.context),this._setLayout(this.layout);const c=r.getChildren(h).map(u=>qt(u));this._childrenProvider.setValue(c);const l=await this.container.getAsync("componentResolver");if(((o=this.descriptor)==null?void 0:o.type)==="area")return;const d=l.getComponent(((a=this.descriptor)==null?void 0:a.type)||"");d.then&&d.then(u=>{this.component=u.default})}}))}disconnectedCallback(){super.disconnectedCallback(),this._propertyChangeListener&&this._propertyChangeListener(),this._contextChangeListener&&this._contextChangeListener(),this._layoutChangeListener&&this._layoutChangeListener(),this._unmountNode&&this._unmountNode()}updated(){this.container&&this.actions.setContainer(this.container),this.renderRoot.host.style.setProperty("--width",this.layout.size==="full"?"var(--columns, 1)":`min(${this.layout.size||"var(--columns)"}, var(--columns))`),es(this.renderRoot.host,this.properties)}_setProperties(n){this._propertiesProvider.setValue(n),this.properties=n}_setContext(n){this._contextProvider.setValue(n),this.context=n}_setLayout(n){this._layoutProvider.setValue(n),this.layout=n}_setDescriptor(n){this.descriptor=n,this._descriptorProvider.setValue(n),this.actions.setDescriptor(n)}};e.styles=[i.styles??[],ee`
187
187
  :host {
188
188
  font-family: var(--font-family);
189
189
  grid-column: span var(--width);
package/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-BezgZo_3.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-bAHV8YrJ.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 { A 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, s as x, u as p, k as l, p as W, q as g } from "./index-Cw8NCTNJ.mjs";
1
+ import { A 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, s as x, u as p, k as l, p as W, q as g } from "./index-CQBgesa1.mjs";
2
2
  export {
3
3
  a as ActionsController,
4
4
  o as DataProvider,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-runtime-flamingo",
3
- "version": "1.1.120-rc.9",
3
+ "version": "1.1.120",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },
@@ -1,4 +1,4 @@
1
- import { i as L, t as D, e as A, E as b, a as P, b as z, c as E, d as M, m as Y, o as f, x as g, f as R, n as N, r as u, T as w, W as T, g as j } from "./index-Cw8NCTNJ.mjs";
1
+ import { i as L, t as D, e as A, E as b, a as P, b as z, c as E, d as M, m as Y, o as f, x as g, f as R, n as N, r as u, T as w, W as T, g as j } from "./index-CQBgesa1.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-BezgZo_3.js");/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-bAHV8YrJ.js");/**
2
2
  * @license
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause