@telia-ace/widget-components-widget-header-flamingo 1.1.150-rc.6 → 1.1.150
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +26 -40
- package/index.mjs +165 -191
- package/package.json +2 -2
- package/widget-header.d.ts +0 -4
package/index.js
CHANGED
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const yt=globalThis,se=yt.ShadowRoot&&(yt.ShadyCSS===void 0||yt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ne=Symbol(),xe=new WeakMap;let oi=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==ne)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(se&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=xe.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&xe.set(e,t))}return t}toString(){return this.cssText}};const is=i=>new oi(typeof i=="string"?i:i+"",void 0,ne),
|
|
5
|
+
*/const yt=globalThis,se=yt.ShadowRoot&&(yt.ShadyCSS===void 0||yt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ne=Symbol(),xe=new WeakMap;let oi=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==ne)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(se&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=xe.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&xe.set(e,t))}return t}toString(){return this.cssText}};const is=i=>new oi(typeof i=="string"?i:i+"",void 0,ne),D=(i,...t)=>{const e=i.length===1?i[0]:t.reduce((s,n,r)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+i[r+1],i[0]);return new oi(e,i,ne)},ss=(i,t)=>{if(se)i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const s=document.createElement("style"),n=yt.litNonce;n!==void 0&&s.setAttribute("nonce",n),s.textContent=e.cssText,i.appendChild(s)}},Se=se?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return is(e)})(i):i;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:ns,defineProperty:rs,getOwnPropertyDescriptor:os,getOwnPropertyNames:as,getOwnPropertySymbols:ls,getPrototypeOf:cs}=Object,
|
|
9
|
+
*/const{is:ns,defineProperty:rs,getOwnPropertyDescriptor:os,getOwnPropertyNames:as,getOwnPropertySymbols:ls,getPrototypeOf:cs}=Object,P=globalThis,Ae=P.trustedTypes,hs=Ae?Ae.emptyScript:"",Ht=P.reactiveElementPolyfillSupport,rt=(i,t)=>i,wt={toAttribute(i,t){switch(t){case Boolean:i=i?hs: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}},re=(i,t)=>!ns(i,t),Ce={attribute:!0,type:String,converter:wt,reflect:!1,useDefault:!1,hasChanged:re};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),P.litPropertyMetadata??(P.litPropertyMetadata=new WeakMap);let F=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=Ce){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&&rs(this.prototype,t,n)}}static getPropertyDescriptor(t,e,s){const{get:n,set:r}=os(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)??Ce}static _$Ei(){if(this.hasOwnProperty(rt("elementProperties")))return;const t=cs(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(rt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(rt("properties"))){const e=this.properties,s=[...as(e),...ls(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(Se(n))}else t!==void 0&&e.push(Se(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 ss(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:wt).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),l=typeof a.converter=="function"?{fromAttribute:a.converter}:((r=a.converter)==null?void 0:r.fromAttribute)!==void 0?a.converter:wt;this._$Em=n;const c=l.fromAttribute(e,a.type);this[n]=c??((o=this._$Ej)==null?void 0:o.get(n))??c,this._$Em=null}}requestUpdate(t,e,s,n=!1,r){var o;if(t!==void 0){const a=this.constructor;if(n===!1&&(r=this[t]),s??(s=a.getPropertyOptions(t)),!((s.hasChanged??re)(r,e)||s.useDefault&&s.reflect&&r===((o=this._$Ej)==null?void 0:o.get(t))&&!this.hasAttribute(a._$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,l=this[r];a!==!0||this._$AL.has(r)||l===void 0||this.C(r,void 0,o,l)}}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){}};F.elementStyles=[],F.shadowRootOptions={mode:"open"},F[rt("elementProperties")]=new Map,F[rt("finalized")]=new Map,Ht==null||Ht({ReactiveElement:F}),(P.reactiveElementVersions??(P.reactiveElementVersions=[])).push("2.1.2");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const ot=globalThis,ke=i=>i,_t=ot.trustedTypes,Ee=_t?_t.createPolicy("lit-html",{createHTML:i=>i}):void 0,ai="$lit$",
|
|
14
|
-
\f\r]`,nt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Oe=/-->/g,Te=/>/g,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Le=/'/g,Pe=/"/g,ci=/^(?:script|style|textarea|title)$/i,fs=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),$=fs(1),
|
|
13
|
+
*/const ot=globalThis,ke=i=>i,_t=ot.trustedTypes,Ee=_t?_t.createPolicy("lit-html",{createHTML:i=>i}):void 0,ai="$lit$",L=`lit$${Math.random().toFixed(9).slice(2)}$`,li="?"+L,us=`<${li}>`,H=document,lt=()=>H.createComment(""),ct=i=>i===null||typeof i!="object"&&typeof i!="function",oe=Array.isArray,ds=i=>oe(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",Nt=`[
|
|
14
|
+
\f\r]`,nt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Oe=/-->/g,Te=/>/g,M=RegExp(`>|${Nt}(?:([^\\s"'>=/]+)(${Nt}*=${Nt}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Le=/'/g,Pe=/"/g,ci=/^(?:script|style|textarea|title)$/i,fs=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),$=fs(1),N=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),Ie=new WeakMap,z=H.createTreeWalker(H,129);function hi(i,t){if(!oe(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ee!==void 0?Ee.createHTML(t):t}const ps=(i,t)=>{const e=i.length-1,s=[];let n,r=t===2?"<svg>":t===3?"<math>":"",o=nt;for(let a=0;a<e;a++){const l=i[a];let c,h,u=-1,d=0;for(;d<l.length&&(o.lastIndex=d,h=o.exec(l),h!==null);)d=o.lastIndex,o===nt?h[1]==="!--"?o=Oe:h[1]!==void 0?o=Te:h[2]!==void 0?(ci.test(h[2])&&(n=RegExp("</"+h[2],"g")),o=M):h[3]!==void 0&&(o=M):o===M?h[0]===">"?(o=n??nt,u=-1):h[1]===void 0?u=-2:(u=o.lastIndex-h[2].length,c=h[1],o=h[3]===void 0?M:h[3]==='"'?Pe:Le):o===Pe||o===Le?o=M:o===Oe||o===Te?o=nt:(o=M,n=void 0);const f=o===M&&i[a+1].startsWith("/>")?" ":"";r+=o===nt?l+us:u>=0?(s.push(c),l.slice(0,u)+ai+l.slice(u)+L+f):l+L+(u===-2?a:f)}return[hi(i,r+(i[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class ht{constructor({strings:t,_$litType$:e},s){let n;this.parts=[];let r=0,o=0;const a=t.length-1,l=this.parts,[c,h]=ps(t,e);if(this.el=ht.createElement(c,s),z.currentNode=this.el.content,e===2||e===3){const u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(n=z.nextNode())!==null&&l.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(const u of n.getAttributeNames())if(u.endsWith(ai)){const d=h[o++],f=n.getAttribute(u).split(L),m=/([.?@])?(.*)/.exec(d);l.push({type:1,index:r,name:m[2],strings:f,ctor:m[1]==="."?ms:m[1]==="?"?vs:m[1]==="@"?$s:Pt}),n.removeAttribute(u)}else u.startsWith(L)&&(l.push({type:6,index:r}),n.removeAttribute(u));if(ci.test(n.tagName)){const u=n.textContent.split(L),d=u.length-1;if(d>0){n.textContent=_t?_t.emptyScript:"";for(let f=0;f<d;f++)n.append(u[f],lt()),z.nextNode(),l.push({type:2,index:++r});n.append(u[d],lt())}}}else if(n.nodeType===8)if(n.data===li)l.push({type:2,index:r});else{let u=-1;for(;(u=n.data.indexOf(L,u+1))!==-1;)l.push({type:7,index:r}),u+=L.length-1}r++}}static createElement(t,e){const s=H.createElement("template");return s.innerHTML=t,s}}function V(i,t,e=i,s){var o,a;if(t===N)return t;let n=s!==void 0?(o=e._$Co)==null?void 0:o[s]:e._$Cl;const r=ct(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=V(i,n._$AS(i,t.values),n,s)),t}class gs{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);z.currentNode=n;let r=z.nextNode(),o=0,a=0,l=s[0];for(;l!==void 0;){if(o===l.index){let c;l.type===2?c=new dt(r,r.nextSibling,this,t):l.type===1?c=new l.ctor(r,l.name,l.strings,this,t):l.type===6&&(c=new ys(r,this,t)),this._$AV.push(c),l=s[++a]}o!==(l==null?void 0:l.index)&&(r=z.nextNode(),o++)}return z.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 dt{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=p,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=V(this,t,e),ct(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==N&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):ds(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!==p&&ct(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=ht.createElement(hi(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 gs(n,this),a=o.u(this.options);o.p(e),this.T(a),this._$AH=o}}_$AC(t){let e=Ie.get(t.strings);return e===void 0&&Ie.set(t.strings,e=new ht(t)),e}k(t){oe(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 dt(this.O(lt()),this.O(lt()),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=ke(t).nextSibling;ke(t).remove(),t=n}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}let Pt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,n,r){this.type=1,this._$AH=p,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=p}_$AI(t,e=this,s,n){const r=this.strings;let o=!1;if(r===void 0)t=V(this,t,e,0),o=!ct(t)||t!==this._$AH&&t!==N,o&&(this._$AH=t);else{const a=t;let l,c;for(t=r[0],l=0;l<r.length-1;l++)c=V(this,a[s+l],e,l),c===N&&(c=this._$AH[l]),o||(o=!ct(c)||c!==this._$AH[l]),c===p?t=p:t!==p&&(t+=(c??"")+r[l+1]),this._$AH[l]=c}o&&!n&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}};class ms extends Pt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}}class vs extends Pt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==p)}}class $s extends Pt{constructor(t,e,s,n,r){super(t,e,s,n,r),this.type=5}_$AI(t,e=this){if((t=V(this,t,e,0)??p)===N)return;const s=this._$AH,n=t===p&&s!==p||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==p&&(s===p||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 ys{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){V(this,t)}}const Bt=ot.litHtmlPolyfillSupport;Bt==null||Bt(ht,dt),(ot.litHtmlVersions??(ot.litHtmlVersions=[])).push("3.3.3");const bs=(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 dt(t.insertBefore(lt(),r),r,void 0,e??{})}return n._$AI(i),n};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/const
|
|
19
|
+
*/const U=globalThis;let C=class extends F{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=bs(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 N}};var ri;C._$litElement$=!0,C.finalized=!0,(ri=U.litElementHydrateSupport)==null||ri.call(U,{LitElement:C});const Dt=U.litElementPolyfillSupport;Dt==null||Dt({LitElement:C});(U.litElementVersions??(U.litElementVersions=[])).push("4.2.2");/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
43
43
|
*/const St=()=>new ks;let ks=class{};const Ft=new WeakMap,At=le(class extends fi{render(i){return p}update(i,[t]){var s;const e=t!==this.G;return e&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=t,this.ht=(s=i.options)==null?void 0:s.host,this.rt(this.ct=i.element)),p}rt(i){if(this.G!==void 0)if(this.isConnected||(i=void 0),typeof this.G=="function"){const t=this.ht??globalThis;let e=Ft.get(t);e===void 0&&(e=new WeakMap,Ft.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,i),i!==void 0&&this.G.call(this.ht,i)}else this.G.value=i}get lt(){var i,t;return typeof this.G=="function"?(i=Ft.get(this.ht??globalThis))==null?void 0:i.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var Zt=function(i,t){return Zt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,s){e.__proto__=s}||function(e,s){for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n])},Zt(i,t)};function et(i,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Zt(i,t);function e(){this.constructor=i}i.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function Es(i,t,e,s){function n(r){return r instanceof e?r:new e(function(o){o(r)})}return new(e||(e=Promise))(function(r,o){function a(h){try{c(s.next(h))}catch(u){o(u)}}function l(h){try{c(s.throw(h))}catch(u){o(u)}}function c(h){h.done?r(h.value):n(h.value).then(a,l)}c((s=s.apply(i,t||[])).next())})}function pi(i,t){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},s,n,r,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(h){return l([c,h])}}function l(c){if(s)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(e=0)),e;)try{if(s=1,n&&(r=c[0]&2?n.return:c[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,c[1])).done)return r;switch(n=0,r&&(c=[c[0]&2,r.value]),c[0]){case 0:case 1:r=c;break;case 4:return e.label++,{value:c[1],done:!1};case 5:e.label++,n=c[1],c=[0];continue;case 7:c=e.ops.pop(),e.trys.pop();continue;default:if(r=e.trys,!(r=r.length>0&&r[r.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!r||c[1]>r[0]&&c[1]<r[3])){e.label=c[1];break}if(c[0]===6&&e.label<r[1]){e.label=r[1],r=c;break}if(r&&e.label<r[2]){e.label=r[2],e.ops.push(c);break}r[2]&&e.ops.pop(),e.trys.pop();continue}c=t.call(i,e)}catch(h){c=[6,h],n=0}finally{s=r=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Q(i){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&i[t],s=0;if(e)return e.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&s>=i.length&&(i=void 0),{value:i&&i[s++],done:!i}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Yt(i,t){var e=typeof Symbol=="function"&&i[Symbol.iterator];if(!e)return i;var s=e.call(i),n,r=[],o;try{for(;(t===void 0||t-- >0)&&!(n=s.next()).done;)r.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(e=s.return)&&e.call(s)}finally{if(o)throw o.error}}return r}function Kt(i,t,e){if(e||arguments.length===2)for(var s=0,n=t.length,r;s<n;s++)(r||!(s in t))&&(r||(r=Array.prototype.slice.call(t,0,s)),r[s]=t[s]);return i.concat(r||Array.prototype.slice.call(t))}function Y(i){return this instanceof Y?(this.v=i,this):new Y(i)}function Os(i,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=e.apply(i,t||[]),n,r=[];return n=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),n[Symbol.asyncIterator]=function(){return this},n;function o(f){return function(m){return Promise.resolve(m).then(f,u)}}function a(f,m){s[f]&&(n[f]=function(g){return new Promise(function(mt,st){r.push([f,g,mt,st])>1||l(f,g)})},m&&(n[f]=m(n[f])))}function l(f,m){try{c(s[f](m))}catch(g){d(r[0][3],g)}}function c(f){f.value instanceof Y?Promise.resolve(f.value.v).then(h,u):d(r[0][2],f)}function h(f){l("next",f)}function u(f){l("throw",f)}function d(f,m){f(m),r.shift(),r.length&&l(r[0][0],r[0][1])}}function Ts(i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=i[Symbol.asyncIterator],e;return t?t.call(i):(i=typeof Q=="function"?Q(i):i[Symbol.iterator](),e={},s("next"),s("throw"),s("return"),e[Symbol.asyncIterator]=function(){return this},e);function s(r){e[r]=i[r]&&function(o){return new Promise(function(a,l){o=i[r](o),n(a,l,o.done,o.value)})}}function n(r,o,a,l){Promise.resolve(l).then(function(c){r({value:c,done:a})},o)}}function v(i){return typeof i=="function"}function gi(i){var t=function(s){Error.call(s),s.stack=new Error().stack},e=i(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var Wt=gi(function(i){return function(e){i(this),this.message=e?e.length+` errors occurred during unsubscription:
|
|
44
44
|
`+e.map(function(s,n){return n+1+") "+s.toString()}).join(`
|
|
45
|
-
`):"",this.name="UnsubscriptionError",this.errors=e}});function Xt(i,t){if(i){var e=i.indexOf(t);0<=e&&i.splice(e,1)}}var It=(function(){function i(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return i.prototype.unsubscribe=function(){var t,e,s,n,r;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=Q(o),l=a.next();!l.done;l=a.next()){var c=l.value;c.remove(this)}}catch(g){t={error:g}}finally{try{l&&!l.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var h=this.initialTeardown;if(v(h))try{h()}catch(g){r=g instanceof Wt?g.errors:[g]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var d=Q(u),f=d.next();!f.done;f=d.next()){var m=f.value;try{Me(m)}catch(g){r=r??[],g instanceof Wt?r=Kt(Kt([],Yt(r)),Yt(g.errors)):r.push(g)}}}catch(g){s={error:g}}finally{try{f&&!f.done&&(n=d.return)&&n.call(d)}finally{if(s)throw s.error}}}if(r)throw new Wt(r)}},i.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)Me(t);else{if(t instanceof i){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},i.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},i.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},i.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Xt(e,t)},i.prototype.remove=function(t){var e=this._finalizers;e&&Xt(e,t),t instanceof i&&t._removeParent(this)},i.EMPTY=(function(){var t=new i;return t.closed=!0,t})(),i})(),mi=It.EMPTY;function vi(i){return i instanceof It||i&&"closed"in i&&v(i.remove)&&v(i.add)&&v(i.unsubscribe)}function Me(i){v(i)?i():i.unsubscribe()}var Ls={Promise:void 0},Ps={setTimeout:function(i,t){for(var e=[],s=2;s<arguments.length;s++)e[s-2]=arguments[s];return setTimeout.apply(void 0,Kt([i,t],Yt(e)))},clearTimeout:function(i){return clearTimeout(i)},delegate:void 0};function $i(i){Ps.setTimeout(function(){throw i})}function Re(){}function bt(i){i()}var ce=(function(i){et(t,i);function t(e){var s=i.call(this)||this;return s.isStopped=!1,e?(s.destination=e,vi(e)&&e.add(s)):s.destination=Rs,s}return t.create=function(e,s,n){return new Vt(e,s,n)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,i.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(It),Is=(function(){function i(t){this.partialObserver=t}return i.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(s){vt(s)}},i.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(s){vt(s)}else vt(t)},i.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){vt(e)}},i})(),Vt=(function(i){et(t,i);function t(e,s,n){var r=i.call(this)||this,o;return v(e)||!e?o={next:e??void 0,error:s??void 0,complete:n??void 0}:o=e,r.destination=new Is(o),r}return t})(ce);function vt(i){$i(i)}function Ms(i){throw i}var Rs={closed:!0,next:Re,error:Ms,complete:Re},he=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function yi(i){return i}function Us(i){return i.length===0?yi:i.length===1?i[0]:function(e){return i.reduce(function(s,n){return n(s)},e)}}var x=(function(){function i(t){t&&(this._subscribe=t)}return i.prototype.lift=function(t){var e=new i;return e.source=this,e.operator=t,e},i.prototype.subscribe=function(t,e,s){var n=this,r=js(t)?t:new Vt(t,e,s);return bt(function(){var o=n,a=o.operator,l=o.source;r.add(a?a.call(r,l):l?n._subscribe(r):n._trySubscribe(r))}),r},i.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},i.prototype.forEach=function(t,e){var s=this;return e=Ue(e),new e(function(n,r){var o=new Vt({next:function(a){try{t(a)}catch(l){r(l),o.unsubscribe()}},error:r,complete:n});s.subscribe(o)})},i.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},i.prototype[he]=function(){return this},i.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Us(t)(this)},i.prototype.toPromise=function(t){var e=this;return t=Ue(t),new t(function(s,n){var r;e.subscribe(function(o){return r=o},function(o){return n(o)},function(){return s(r)})})},i.create=function(t){return new i(t)},i})();function Ue(i){var t;return(t=i??Ls.Promise)!==null&&t!==void 0?t:Promise}function zs(i){return i&&v(i.next)&&v(i.error)&&v(i.complete)}function js(i){return i&&i instanceof ce||zs(i)&&vi(i)}function Hs(i){return v(i==null?void 0:i.lift)}function Mt(i){return function(t){if(Hs(t))return t.lift(function(e){try{return i(e,this)}catch(s){this.error(s)}});throw new TypeError("Unable to lift unknown Observable type")}}function Ct(i,t,e,s,n){return new Ns(i,t,e,s,n)}var Ns=(function(i){et(t,i);function t(e,s,n,r,o,a){var l=i.call(this,e)||this;return l.onFinalize=o,l.shouldUnsubscribe=a,l._next=s?function(c){try{s(c)}catch(h){e.error(h)}}:i.prototype._next,l._error=r?function(c){try{r(c)}catch(h){e.error(h)}finally{this.unsubscribe()}}:i.prototype._error,l._complete=n?function(){try{n()}catch(c){e.error(c)}finally{this.unsubscribe()}}:i.prototype._complete,l}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var s=this.closed;i.prototype.unsubscribe.call(this),!s&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t})(ce),Bs=gi(function(i){return function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),ft=(function(i){et(t,i);function t(){var e=i.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return t.prototype.lift=function(e){var s=new ze(this,this);return s.operator=e,s},t.prototype._throwIfClosed=function(){if(this.closed)throw new Bs},t.prototype.next=function(e){var s=this;bt(function(){var n,r;if(s._throwIfClosed(),!s.isStopped){s.currentObservers||(s.currentObservers=Array.from(s.observers));try{for(var o=Q(s.currentObservers),a=o.next();!a.done;a=o.next()){var l=a.value;l.next(e)}}catch(c){n={error:c}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var s=this;bt(function(){if(s._throwIfClosed(),!s.isStopped){s.hasError=s.isStopped=!0,s.thrownError=e;for(var n=s.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;bt(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var s=e.observers;s.length;)s.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(e){return this._throwIfClosed(),i.prototype._trySubscribe.call(this,e)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var s=this,n=this,r=n.hasError,o=n.isStopped,a=n.observers;return r||o?mi:(this.currentObservers=null,a.push(e),new It(function(){s.currentObservers=null,Xt(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var s=this,n=s.hasError,r=s.thrownError,o=s.isStopped;n?e.error(r):o&&e.complete()},t.prototype.asObservable=function(){var e=new x;return e.source=this,e},t.create=function(e,s){return new ze(e,s)},t})(x),ze=(function(i){et(t,i);function t(e,s){var n=i.call(this)||this;return n.destination=e,n.source=s,n}return t.prototype.next=function(e){var s,n;(n=(s=this.destination)===null||s===void 0?void 0:s.next)===null||n===void 0||n.call(s,e)},t.prototype.error=function(e){var s,n;(n=(s=this.destination)===null||s===void 0?void 0:s.error)===null||n===void 0||n.call(s,e)},t.prototype.complete=function(){var e,s;(s=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||s===void 0||s.call(e)},t.prototype._subscribe=function(e){var s,n;return(n=(s=this.source)===null||s===void 0?void 0:s.subscribe(e))!==null&&n!==void 0?n:mi},t})(ft),bi=(function(i){et(t,i);function t(e){var s=i.call(this)||this;return s._value=e,s}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(e){var s=i.prototype._subscribe.call(this,e);return!s.closed&&e.next(this._value),s},t.prototype.getValue=function(){var e=this,s=e.hasError,n=e.thrownError,r=e._value;if(s)throw n;return this._throwIfClosed(),r},t.prototype.next=function(e){i.prototype.next.call(this,this._value=e)},t})(ft),Ds=new x(function(i){return i.complete()});function Fs(i){return i&&v(i.schedule)}function wi(i){return i[i.length-1]}function Ws(i){return Fs(wi(i))?i.pop():void 0}function Gs(i,t){return typeof wi(i)=="number"?i.pop():t}var _i=(function(i){return i&&typeof i.length=="number"&&typeof i!="function"});function xi(i){return v(i==null?void 0:i.then)}function Si(i){return v(i[he])}function Ai(i){return Symbol.asyncIterator&&v(i==null?void 0:i[Symbol.asyncIterator])}function Ci(i){return new TypeError("You provided "+(i!==null&&typeof i=="object"?"an invalid object":"'"+i+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function qs(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var ki=qs();function Ei(i){return v(i==null?void 0:i[ki])}function Oi(i){return Os(this,arguments,function(){var e,s,n,r;return pi(this,function(o){switch(o.label){case 0:e=i.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,Y(e.read())];case 3:return s=o.sent(),n=s.value,r=s.done,r?[4,Y(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,Y(n)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function Ti(i){return v(i==null?void 0:i.getReader)}function it(i){if(i instanceof x)return i;if(i!=null){if(Si(i))return Zs(i);if(_i(i))return Ys(i);if(xi(i))return Ks(i);if(Ai(i))return Li(i);if(Ei(i))return Xs(i);if(Ti(i))return Vs(i)}throw Ci(i)}function Zs(i){return new x(function(t){var e=i[he]();if(v(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Ys(i){return new x(function(t){for(var e=0;e<i.length&&!t.closed;e++)t.next(i[e]);t.complete()})}function Ks(i){return new x(function(t){i.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,$i)})}function Xs(i){return new x(function(t){var e,s;try{for(var n=Q(i),r=n.next();!r.done;r=n.next()){var o=r.value;if(t.next(o),t.closed)return}}catch(a){e={error:a}}finally{try{r&&!r.done&&(s=n.return)&&s.call(n)}finally{if(e)throw e.error}}t.complete()})}function Li(i){return new x(function(t){Qs(i,t).catch(function(e){return t.error(e)})})}function Vs(i){return Li(Oi(i))}function Qs(i,t){var e,s,n,r;return Es(this,void 0,void 0,function(){var o,a;return pi(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),e=Ts(i),l.label=1;case 1:return[4,e.next()];case 2:if(s=l.sent(),!!s.done)return[3,4];if(o=s.value,t.next(o),t.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=l.sent(),n={error:a},[3,11];case 6:return l.trys.push([6,,9,10]),s&&!s.done&&(r=e.return)?[4,r.call(e)]:[3,8];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(n)throw n.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function H(i,t,e,s,n){s===void 0&&(s=0),n===void 0&&(n=!1);var r=t.schedule(function(){e(),n?i.add(this.schedule(null,s)):this.unsubscribe()},s);if(i.add(r),!n)return r}function Pi(i,t){return t===void 0&&(t=0),Mt(function(e,s){e.subscribe(Ct(s,function(n){return H(s,i,function(){return s.next(n)},t)},function(){return H(s,i,function(){return s.complete()},t)},function(n){return H(s,i,function(){return s.error(n)},t)}))})}function Ii(i,t){return t===void 0&&(t=0),Mt(function(e,s){s.add(i.schedule(function(){return e.subscribe(s)},t))})}function Js(i,t){return it(i).pipe(Ii(t),Pi(t))}function tn(i,t){return it(i).pipe(Ii(t),Pi(t))}function en(i,t){return new x(function(e){var s=0;return t.schedule(function(){s===i.length?e.complete():(e.next(i[s++]),e.closed||this.schedule())})})}function sn(i,t){return new x(function(e){var s;return H(e,t,function(){s=i[ki](),H(e,t,function(){var n,r,o;try{n=s.next(),r=n.value,o=n.done}catch(a){e.error(a);return}o?e.complete():e.next(r)},0,!0)}),function(){return v(s==null?void 0:s.return)&&s.return()}})}function Mi(i,t){if(!i)throw new Error("Iterable cannot be null");return new x(function(e){H(e,t,function(){var s=i[Symbol.asyncIterator]();H(e,t,function(){s.next().then(function(n){n.done?e.complete():e.next(n.value)})},0,!0)})})}function nn(i,t){return Mi(Oi(i),t)}function rn(i,t){if(i!=null){if(Si(i))return Js(i,t);if(_i(i))return en(i,t);if(xi(i))return tn(i,t);if(Ai(i))return Mi(i,t);if(Ei(i))return sn(i,t);if(Ti(i))return nn(i,t)}throw Ci(i)}function on(i,t){return t?rn(i,t):it(i)}function an(i,t){return Mt(function(e,s){var n=0;e.subscribe(Ct(s,function(r){s.next(i.call(t,r,n++))}))})}function ln(i,t,e,s,n,r,o,a){var l=[],c=0,h=0,u=!1,d=function(){u&&!l.length&&!c&&t.complete()},f=function(g){return c<s?m(g):l.push(g)},m=function(g){c++;var mt=!1;it(e(g,h++)).subscribe(Ct(t,function(st){t.next(st)},function(){mt=!0},void 0,function(){if(mt)try{c--;for(var st=function(){var jt=l.shift();o||m(jt)};l.length&&c<s;)st();d()}catch(jt){t.error(jt)}}))};return i.subscribe(Ct(t,f,function(){u=!0,d()})),function(){}}function Ri(i,t,e){return e===void 0&&(e=1/0),v(t)?Ri(function(s,n){return an(function(r,o){return t(s,r,n,o)})(it(i(s,n)))},e):(typeof t=="number"&&(e=t),Mt(function(s,n){return ln(s,n,i,e)}))}function cn(i){return i===void 0&&(i=1/0),Ri(yi,i)}function hn(){for(var i=[],t=0;t<arguments.length;t++)i[t]=arguments[t];var e=Ws(i),s=Gs(i,1/0),n=i;return n.length?n.length===1?it(n[0]):cn(s)(on(n,e)):Ds}var un=Object.defineProperty,dn=(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&&un(t,e,n),n};const $e=class $e extends C{constructor(){super(...arguments),this.anchor="BottomRight"}appendChild(t){var e;return(e=this.shadowRoot)==null||e.appendChild(t),t}render(){return this.anchor==="BottomLeft"?this.renderRoot.host.classList.add("bottom-left"):this.anchor==="BottomRight"&&this.renderRoot.host.classList.add("bottom-right"),p}};$e.styles=[F`
|
|
45
|
+
`):"",this.name="UnsubscriptionError",this.errors=e}});function Xt(i,t){if(i){var e=i.indexOf(t);0<=e&&i.splice(e,1)}}var It=(function(){function i(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return i.prototype.unsubscribe=function(){var t,e,s,n,r;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=Q(o),l=a.next();!l.done;l=a.next()){var c=l.value;c.remove(this)}}catch(g){t={error:g}}finally{try{l&&!l.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var h=this.initialTeardown;if(v(h))try{h()}catch(g){r=g instanceof Wt?g.errors:[g]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var d=Q(u),f=d.next();!f.done;f=d.next()){var m=f.value;try{Me(m)}catch(g){r=r??[],g instanceof Wt?r=Kt(Kt([],Yt(r)),Yt(g.errors)):r.push(g)}}}catch(g){s={error:g}}finally{try{f&&!f.done&&(n=d.return)&&n.call(d)}finally{if(s)throw s.error}}}if(r)throw new Wt(r)}},i.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)Me(t);else{if(t instanceof i){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},i.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},i.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},i.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Xt(e,t)},i.prototype.remove=function(t){var e=this._finalizers;e&&Xt(e,t),t instanceof i&&t._removeParent(this)},i.EMPTY=(function(){var t=new i;return t.closed=!0,t})(),i})(),mi=It.EMPTY;function vi(i){return i instanceof It||i&&"closed"in i&&v(i.remove)&&v(i.add)&&v(i.unsubscribe)}function Me(i){v(i)?i():i.unsubscribe()}var Ls={Promise:void 0},Ps={setTimeout:function(i,t){for(var e=[],s=2;s<arguments.length;s++)e[s-2]=arguments[s];return setTimeout.apply(void 0,Kt([i,t],Yt(e)))},clearTimeout:function(i){return clearTimeout(i)},delegate:void 0};function $i(i){Ps.setTimeout(function(){throw i})}function Re(){}function bt(i){i()}var ce=(function(i){et(t,i);function t(e){var s=i.call(this)||this;return s.isStopped=!1,e?(s.destination=e,vi(e)&&e.add(s)):s.destination=Rs,s}return t.create=function(e,s,n){return new Vt(e,s,n)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,i.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(It),Is=(function(){function i(t){this.partialObserver=t}return i.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(s){vt(s)}},i.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(s){vt(s)}else vt(t)},i.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){vt(e)}},i})(),Vt=(function(i){et(t,i);function t(e,s,n){var r=i.call(this)||this,o;return v(e)||!e?o={next:e??void 0,error:s??void 0,complete:n??void 0}:o=e,r.destination=new Is(o),r}return t})(ce);function vt(i){$i(i)}function Ms(i){throw i}var Rs={closed:!0,next:Re,error:Ms,complete:Re},he=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function yi(i){return i}function zs(i){return i.length===0?yi:i.length===1?i[0]:function(e){return i.reduce(function(s,n){return n(s)},e)}}var x=(function(){function i(t){t&&(this._subscribe=t)}return i.prototype.lift=function(t){var e=new i;return e.source=this,e.operator=t,e},i.prototype.subscribe=function(t,e,s){var n=this,r=js(t)?t:new Vt(t,e,s);return bt(function(){var o=n,a=o.operator,l=o.source;r.add(a?a.call(r,l):l?n._subscribe(r):n._trySubscribe(r))}),r},i.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},i.prototype.forEach=function(t,e){var s=this;return e=ze(e),new e(function(n,r){var o=new Vt({next:function(a){try{t(a)}catch(l){r(l),o.unsubscribe()}},error:r,complete:n});s.subscribe(o)})},i.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},i.prototype[he]=function(){return this},i.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return zs(t)(this)},i.prototype.toPromise=function(t){var e=this;return t=ze(t),new t(function(s,n){var r;e.subscribe(function(o){return r=o},function(o){return n(o)},function(){return s(r)})})},i.create=function(t){return new i(t)},i})();function ze(i){var t;return(t=i??Ls.Promise)!==null&&t!==void 0?t:Promise}function Us(i){return i&&v(i.next)&&v(i.error)&&v(i.complete)}function js(i){return i&&i instanceof ce||Us(i)&&vi(i)}function Hs(i){return v(i==null?void 0:i.lift)}function Mt(i){return function(t){if(Hs(t))return t.lift(function(e){try{return i(e,this)}catch(s){this.error(s)}});throw new TypeError("Unable to lift unknown Observable type")}}function Ct(i,t,e,s,n){return new Ns(i,t,e,s,n)}var Ns=(function(i){et(t,i);function t(e,s,n,r,o,a){var l=i.call(this,e)||this;return l.onFinalize=o,l.shouldUnsubscribe=a,l._next=s?function(c){try{s(c)}catch(h){e.error(h)}}:i.prototype._next,l._error=r?function(c){try{r(c)}catch(h){e.error(h)}finally{this.unsubscribe()}}:i.prototype._error,l._complete=n?function(){try{n()}catch(c){e.error(c)}finally{this.unsubscribe()}}:i.prototype._complete,l}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var s=this.closed;i.prototype.unsubscribe.call(this),!s&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t})(ce),Bs=gi(function(i){return function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),ft=(function(i){et(t,i);function t(){var e=i.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return t.prototype.lift=function(e){var s=new Ue(this,this);return s.operator=e,s},t.prototype._throwIfClosed=function(){if(this.closed)throw new Bs},t.prototype.next=function(e){var s=this;bt(function(){var n,r;if(s._throwIfClosed(),!s.isStopped){s.currentObservers||(s.currentObservers=Array.from(s.observers));try{for(var o=Q(s.currentObservers),a=o.next();!a.done;a=o.next()){var l=a.value;l.next(e)}}catch(c){n={error:c}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var s=this;bt(function(){if(s._throwIfClosed(),!s.isStopped){s.hasError=s.isStopped=!0,s.thrownError=e;for(var n=s.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;bt(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var s=e.observers;s.length;)s.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(e){return this._throwIfClosed(),i.prototype._trySubscribe.call(this,e)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var s=this,n=this,r=n.hasError,o=n.isStopped,a=n.observers;return r||o?mi:(this.currentObservers=null,a.push(e),new It(function(){s.currentObservers=null,Xt(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var s=this,n=s.hasError,r=s.thrownError,o=s.isStopped;n?e.error(r):o&&e.complete()},t.prototype.asObservable=function(){var e=new x;return e.source=this,e},t.create=function(e,s){return new Ue(e,s)},t})(x),Ue=(function(i){et(t,i);function t(e,s){var n=i.call(this)||this;return n.destination=e,n.source=s,n}return t.prototype.next=function(e){var s,n;(n=(s=this.destination)===null||s===void 0?void 0:s.next)===null||n===void 0||n.call(s,e)},t.prototype.error=function(e){var s,n;(n=(s=this.destination)===null||s===void 0?void 0:s.error)===null||n===void 0||n.call(s,e)},t.prototype.complete=function(){var e,s;(s=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||s===void 0||s.call(e)},t.prototype._subscribe=function(e){var s,n;return(n=(s=this.source)===null||s===void 0?void 0:s.subscribe(e))!==null&&n!==void 0?n:mi},t})(ft),bi=(function(i){et(t,i);function t(e){var s=i.call(this)||this;return s._value=e,s}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(e){var s=i.prototype._subscribe.call(this,e);return!s.closed&&e.next(this._value),s},t.prototype.getValue=function(){var e=this,s=e.hasError,n=e.thrownError,r=e._value;if(s)throw n;return this._throwIfClosed(),r},t.prototype.next=function(e){i.prototype.next.call(this,this._value=e)},t})(ft),Ds=new x(function(i){return i.complete()});function Fs(i){return i&&v(i.schedule)}function wi(i){return i[i.length-1]}function Ws(i){return Fs(wi(i))?i.pop():void 0}function Gs(i,t){return typeof wi(i)=="number"?i.pop():t}var _i=(function(i){return i&&typeof i.length=="number"&&typeof i!="function"});function xi(i){return v(i==null?void 0:i.then)}function Si(i){return v(i[he])}function Ai(i){return Symbol.asyncIterator&&v(i==null?void 0:i[Symbol.asyncIterator])}function Ci(i){return new TypeError("You provided "+(i!==null&&typeof i=="object"?"an invalid object":"'"+i+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function qs(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var ki=qs();function Ei(i){return v(i==null?void 0:i[ki])}function Oi(i){return Os(this,arguments,function(){var e,s,n,r;return pi(this,function(o){switch(o.label){case 0:e=i.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,Y(e.read())];case 3:return s=o.sent(),n=s.value,r=s.done,r?[4,Y(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,Y(n)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function Ti(i){return v(i==null?void 0:i.getReader)}function it(i){if(i instanceof x)return i;if(i!=null){if(Si(i))return Zs(i);if(_i(i))return Ys(i);if(xi(i))return Ks(i);if(Ai(i))return Li(i);if(Ei(i))return Xs(i);if(Ti(i))return Vs(i)}throw Ci(i)}function Zs(i){return new x(function(t){var e=i[he]();if(v(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Ys(i){return new x(function(t){for(var e=0;e<i.length&&!t.closed;e++)t.next(i[e]);t.complete()})}function Ks(i){return new x(function(t){i.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,$i)})}function Xs(i){return new x(function(t){var e,s;try{for(var n=Q(i),r=n.next();!r.done;r=n.next()){var o=r.value;if(t.next(o),t.closed)return}}catch(a){e={error:a}}finally{try{r&&!r.done&&(s=n.return)&&s.call(n)}finally{if(e)throw e.error}}t.complete()})}function Li(i){return new x(function(t){Qs(i,t).catch(function(e){return t.error(e)})})}function Vs(i){return Li(Oi(i))}function Qs(i,t){var e,s,n,r;return Es(this,void 0,void 0,function(){var o,a;return pi(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),e=Ts(i),l.label=1;case 1:return[4,e.next()];case 2:if(s=l.sent(),!!s.done)return[3,4];if(o=s.value,t.next(o),t.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=l.sent(),n={error:a},[3,11];case 6:return l.trys.push([6,,9,10]),s&&!s.done&&(r=e.return)?[4,r.call(e)]:[3,8];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(n)throw n.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function j(i,t,e,s,n){s===void 0&&(s=0),n===void 0&&(n=!1);var r=t.schedule(function(){e(),n?i.add(this.schedule(null,s)):this.unsubscribe()},s);if(i.add(r),!n)return r}function Pi(i,t){return t===void 0&&(t=0),Mt(function(e,s){e.subscribe(Ct(s,function(n){return j(s,i,function(){return s.next(n)},t)},function(){return j(s,i,function(){return s.complete()},t)},function(n){return j(s,i,function(){return s.error(n)},t)}))})}function Ii(i,t){return t===void 0&&(t=0),Mt(function(e,s){s.add(i.schedule(function(){return e.subscribe(s)},t))})}function Js(i,t){return it(i).pipe(Ii(t),Pi(t))}function tn(i,t){return it(i).pipe(Ii(t),Pi(t))}function en(i,t){return new x(function(e){var s=0;return t.schedule(function(){s===i.length?e.complete():(e.next(i[s++]),e.closed||this.schedule())})})}function sn(i,t){return new x(function(e){var s;return j(e,t,function(){s=i[ki](),j(e,t,function(){var n,r,o;try{n=s.next(),r=n.value,o=n.done}catch(a){e.error(a);return}o?e.complete():e.next(r)},0,!0)}),function(){return v(s==null?void 0:s.return)&&s.return()}})}function Mi(i,t){if(!i)throw new Error("Iterable cannot be null");return new x(function(e){j(e,t,function(){var s=i[Symbol.asyncIterator]();j(e,t,function(){s.next().then(function(n){n.done?e.complete():e.next(n.value)})},0,!0)})})}function nn(i,t){return Mi(Oi(i),t)}function rn(i,t){if(i!=null){if(Si(i))return Js(i,t);if(_i(i))return en(i,t);if(xi(i))return tn(i,t);if(Ai(i))return Mi(i,t);if(Ei(i))return sn(i,t);if(Ti(i))return nn(i,t)}throw Ci(i)}function on(i,t){return t?rn(i,t):it(i)}function an(i,t){return Mt(function(e,s){var n=0;e.subscribe(Ct(s,function(r){s.next(i.call(t,r,n++))}))})}function ln(i,t,e,s,n,r,o,a){var l=[],c=0,h=0,u=!1,d=function(){u&&!l.length&&!c&&t.complete()},f=function(g){return c<s?m(g):l.push(g)},m=function(g){c++;var mt=!1;it(e(g,h++)).subscribe(Ct(t,function(st){t.next(st)},function(){mt=!0},void 0,function(){if(mt)try{c--;for(var st=function(){var jt=l.shift();o||m(jt)};l.length&&c<s;)st();d()}catch(jt){t.error(jt)}}))};return i.subscribe(Ct(t,f,function(){u=!0,d()})),function(){}}function Ri(i,t,e){return e===void 0&&(e=1/0),v(t)?Ri(function(s,n){return an(function(r,o){return t(s,r,n,o)})(it(i(s,n)))},e):(typeof t=="number"&&(e=t),Mt(function(s,n){return ln(s,n,i,e)}))}function cn(i){return i===void 0&&(i=1/0),Ri(yi,i)}function hn(){for(var i=[],t=0;t<arguments.length;t++)i[t]=arguments[t];var e=Ws(i),s=Gs(i,1/0),n=i;return n.length?n.length===1?it(n[0]):cn(s)(on(n,e)):Ds}var un=Object.defineProperty,dn=(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&&un(t,e,n),n};const $e=class $e extends C{constructor(){super(...arguments),this.anchor="BottomRight"}appendChild(t){var e;return(e=this.shadowRoot)==null||e.appendChild(t),t}render(){return this.anchor==="BottomLeft"?this.renderRoot.host.classList.add("bottom-left"):this.anchor==="BottomRight"&&this.renderRoot.host.classList.add("bottom-right"),p}};$e.styles=[D`
|
|
46
46
|
:host {
|
|
47
47
|
position: fixed;
|
|
48
48
|
display: flex;
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
* @license
|
|
63
63
|
* Copyright 2018 Google LLC
|
|
64
64
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
65
|
-
*/const We=le(class extends ui{constructor(i){var t;if(super(i),i.type!==ae.ATTRIBUTE||i.name!=="class"||((t=i.strings)==null?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(i){return" "+Object.keys(i).filter(t=>i[t]).join(" ")+" "}update(i,[t]){var s,n;if(this.st===void 0){this.st=new Set,i.strings!==void 0&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(const r in t)t[r]&&!((s=this.nt)!=null&&s.has(r))&&this.st.add(r);return this.render(t)}const e=i.element.classList;for(const r of this.st)r in t||(e.remove(r),this.st.delete(r));for(const r in t){const o=!!t[r];o===this.st.has(r)||(n=this.nt)!=null&&n.has(r)||(o?(e.add(r),this.st.add(r)):(e.remove(r),this.st.delete(r)))}return
|
|
65
|
+
*/const We=le(class extends ui{constructor(i){var t;if(super(i),i.type!==ae.ATTRIBUTE||i.name!=="class"||((t=i.strings)==null?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(i){return" "+Object.keys(i).filter(t=>i[t]).join(" ")+" "}update(i,[t]){var s,n;if(this.st===void 0){this.st=new Set,i.strings!==void 0&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(const r in t)t[r]&&!((s=this.nt)!=null&&s.has(r))&&this.st.add(r);return this.render(t)}const e=i.element.classList;for(const r of this.st)r in t||(e.remove(r),this.st.delete(r));for(const r in t){const o=!!t[r];o===this.st.has(r)||(n=this.nt)!=null&&n.has(r)||(o?(e.add(r),this.st.add(r)):(e.remove(r),this.st.delete(r)))}return N}}),E=(i,t,e)=>{i&&e.style.setProperty(t,i)},zi=(i,t)=>{var e,s,n,r,o,a,l,c,h;E((e=i.colors)==null?void 0:e.primaryBackground,"--primary-background",t),E((s=i.colors)==null?void 0:s.textOnPrimaryBackground,"--text-on-primary-background",t),E((n=i.colors)==null?void 0:n.secondaryBackground,"--secondary-background",t),E((r=i.colors)==null?void 0:r.textOnSecondaryBackground,"--text-on-secondary-background",t),E((o=i.colors)==null?void 0:o.interactiveDestructiveBackground,"--destructive-color",t),E((a=i.colors)==null?void 0:a.interactiveTextOnDestructiveBackground,"--text-on-destructive-color",t),E((l=i.colors)==null?void 0:l.interactivePrimaryBackground,"--interactive-primary-background",t),E((c=i.colors)==null?void 0:c.interactiveTextOnPrimaryBackground,"--interactive-text-on-primary-background",t),E((h=i.colors)==null?void 0:h.focusColor,"--focus-color",t)};var xn=Object.defineProperty,pt=(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&&xn(t,e,n),n};const ye=class ye extends C{constructor(){super(...arguments),this.active=!1,this.triggerVisible=!0,this.loaded=!1,this.containerRef=St(),this.widgetActive$=new bi(!1),this.componentIsDestroyed$=new ft}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(),this.loaded=!0,this._applyBranding()}disconnectedCallback(){super.disconnectedCallback(),this.componentIsDestroyed$.next(),this.componentIsDestroyed$.complete()}toggleActive(){var t;if(!((t=this.application)!=null&&t.root)){console.warn("Could not activate widget. No root element assigned to widget.");return}this.active=!this.active,this.active?(this.application.appendToDOM(),this.notify("widget-set-active",{widgetId:this.application.id,active:!0}),this.widgetActive$.next(!0),this.hideTrigger()):(this.application.hide(),this.notify("widget-set-active",{widgetId:this.application.id,active:!1}),this.widgetActive$.next(!1),this.showTrigger())}notify(t,e={}){window!=null&&window.parent&&window.parent.postMessage({type:t,data:e},"*")}_applyBranding(){var t;(t=this.application)!=null&&t.settings&&zi(this.application.settings.branding,this)}async _renderSymbol(){var a,l,c;const t=(a=this.application)==null?void 0:a.branding(),e=(l=t==null?void 0:t.graphics)==null?void 0:l.trigger;if(e)return $` <img src=${e} class="trigger-icon" alt="" /> `;const s=(c=this.application)==null?void 0:c.triggerIcon;if(!s)return p;const n=async h=>_n,{type:r,content:o}=s;switch(r){case"Telia":{const h=await n();return h?$`<telia-icon
|
|
66
66
|
class="trigger-icon"
|
|
67
67
|
svg=${h.svg}
|
|
68
68
|
size="lg"
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
</svg>
|
|
118
118
|
</span>
|
|
119
119
|
</button>
|
|
120
|
-
</div>`}};ye.styles=[
|
|
120
|
+
</div>`}};ye.styles=[D`
|
|
121
121
|
:host {
|
|
122
122
|
--voca-rem-multiplier: 0.625;
|
|
123
123
|
--trigger-label-bg: #f5e0ff;
|
|
@@ -253,7 +253,7 @@
|
|
|
253
253
|
.trigger-label:hover {
|
|
254
254
|
opacity: 0.8;
|
|
255
255
|
}
|
|
256
|
-
`];let O=ye;pt([b({attribute:!1})],O.prototype,"application");pt([w()],O.prototype,"active");pt([w()],O.prototype,"triggerVisible");pt([w()],O.prototype,"loaded");pt([w()],O.prototype,"icon");var Sn=Object.defineProperty,
|
|
256
|
+
`];let O=ye;pt([b({attribute:!1})],O.prototype,"application");pt([w()],O.prototype,"active");pt([w()],O.prototype,"triggerVisible");pt([w()],O.prototype,"loaded");pt([w()],O.prototype,"icon");var Sn=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&&Sn(t,e,n),n};const Ui=i=>{const e=class e extends i{constructor(){super(...arguments),this.properties={},this.context={},this.layout={},this.nodes=[]}writeProperties(n){this.properties=n}writeLayout(n){this.layout=n}writeContext(n){this.context=n}addChild(n){n.parent=this,this.nodes.push(n)}connectedCallback(){super.connectedCallback(),this.renderRoot.host.style.setProperty("--width",this.layout.size==="full"?"var(--columns, 1)":`min(${this.layout.size||"var(--columns)"}, var(--columns))`),this.application.mountComponent(this)}};e.styles=[D`
|
|
257
257
|
:host {
|
|
258
258
|
font-family: var(--font-family);
|
|
259
259
|
grid-column: span var(--width);
|
|
@@ -265,7 +265,7 @@
|
|
|
265
265
|
* {
|
|
266
266
|
box-sizing: border-box;
|
|
267
267
|
}
|
|
268
|
-
`];let t=e;return
|
|
268
|
+
`];let t=e;return R([b()],t.prototype,"properties"),R([b()],t.prototype,"context"),R([b()],t.prototype,"layout"),R([b()],t.prototype,"name"),R([b()],t.prototype,"type"),R([b({attribute:!1})],t.prototype,"application"),R([b({attribute:!1})],t.prototype,"parent"),t},be=class be extends Ui(C){render(){return $`Non resolved component`}};be.styles=[D`
|
|
269
269
|
:host {
|
|
270
270
|
display: block;
|
|
271
271
|
}
|
|
@@ -273,7 +273,7 @@
|
|
|
273
273
|
* @license
|
|
274
274
|
* Copyright 2021 Google LLC
|
|
275
275
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
276
|
-
*/function*An(i,t){if(i!==void 0){let e=0;for(const s of i)yield t(s,e++)}}var ue=(i=>(i.Inline="inline",i.Trigger="trigger",i))(ue||{}),
|
|
276
|
+
*/function*An(i,t){if(i!==void 0){let e=0;for(const s of i)yield t(s,e++)}}var ue=(i=>(i.Inline="inline",i.Trigger="trigger",i))(ue||{}),W=(i=>(i.NonAuthenticated="non-authenticated",i.Authenticating="authenticating",i.Authenticated="authenticated",i.ChatEnded="chat-ended",i))(W||{});/**
|
|
277
277
|
* @license
|
|
278
278
|
* Copyright 2021 Google LLC
|
|
279
279
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -293,9 +293,9 @@
|
|
|
293
293
|
* @license
|
|
294
294
|
* Copyright 2017 Google LLC
|
|
295
295
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
296
|
-
*/function On({context:i}){return(t,e)=>{const s=new WeakMap;if(typeof e=="object")return{get(){return t.get.call(this)},set(n){return s.get(this).setValue(n),t.set.call(this,n)},init(n){return s.set(this,new Ge(this,{context:i,initialValue:n})),n}};{t.constructor.addInitializer((o=>{s.set(o,new Ge(o,{context:i}))}));const n=Object.getOwnPropertyDescriptor(t,e);let r;if(n===void 0){const o=new WeakMap;r={get(){return o.get(this)},set(a){s.get(this).setValue(a),o.set(this,a)},configurable:!0,enumerable:!0}}else{const o=n.set;r={...n,set(a){s.get(this).setValue(a),o==null||o.call(this,a)}}}return void Object.defineProperty(t,e,r)}}}var Tn=Object.defineProperty,de=(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&&Tn(t,e,n),n};const Ln="application",we=class we extends C{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=St(),this.fullscreen=!1,this.maximized=!1,this.isReady=new bi(!1)}addChild(t){t.parent=this,this.nodes.push(t)}applyBranding(){if(!this.wrapperRef.value)return;const t=this.application.settings;t!=null&&t.branding&&
|
|
296
|
+
*/function On({context:i}){return(t,e)=>{const s=new WeakMap;if(typeof e=="object")return{get(){return t.get.call(this)},set(n){return s.get(this).setValue(n),t.set.call(this,n)},init(n){return s.set(this,new Ge(this,{context:i,initialValue:n})),n}};{t.constructor.addInitializer((o=>{s.set(o,new Ge(o,{context:i}))}));const n=Object.getOwnPropertyDescriptor(t,e);let r;if(n===void 0){const o=new WeakMap;r={get(){return o.get(this)},set(a){s.get(this).setValue(a),o.set(this,a)},configurable:!0,enumerable:!0}}else{const o=n.set;r={...n,set(a){s.get(this).setValue(a),o==null||o.call(this,a)}}}return void Object.defineProperty(t,e,r)}}}var Tn=Object.defineProperty,de=(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&&Tn(t,e,n),n};const Ln="application",we=class we extends C{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=St(),this.fullscreen=!1,this.maximized=!1,this.isReady=new bi(!1)}addChild(t){t.parent=this,this.nodes.push(t)}applyBranding(){if(!this.wrapperRef.value)return;const t=this.application.settings;t!=null&&t.branding&&zi(t.branding,this.wrapperRef.value)}applyStyles(){if(!this.wrapperRef.value)return;const t=this.application.styles(),e=this.wrapperRef.value;Object.entries(t).forEach(([s,n])=>{e.style.setProperty(`--${s}`,n)})}firstUpdated(t){this.applyBranding(),this.applyStyles()}render(){var e,s,n;return((n=(s=(e=this.application.settings)==null?void 0:e.agentConfig)==null?void 0:s.live)==null?void 0:n.isThirdPartyWidget)??!1?this.renderRoot.host.classList.add("third-party"):this.application.renderStrategy===ue.Trigger&&(this.renderRoot.host.classList.add("floating"),this.application.anchor==="BottomLeft"?this.renderRoot.host.classList.add("bottom-left"):this.application.anchor==="BottomRight"&&this.renderRoot.host.classList.add("bottom-right")),this.application.fullscreen&&this.renderRoot.host.classList.add("fullscreen"),this.renderRoot.host.classList.toggle("maximized",this.maximized),window.self!==window.top&&this.renderRoot.host.classList.add("embedded"),$`<div class="widget-container" ${At(this.wrapperRef)}>
|
|
297
297
|
${An(this.nodes,r=>r)}
|
|
298
|
-
</div>`}};we.styles=
|
|
298
|
+
</div>`}};we.styles=D`
|
|
299
299
|
:host {
|
|
300
300
|
--font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
|
|
301
301
|
--spacing-xs: 0.2rem;
|
|
@@ -467,16 +467,20 @@
|
|
|
467
467
|
:host(.ace-expanded.embedded) {
|
|
468
468
|
animation: none;
|
|
469
469
|
}
|
|
470
|
-
`;let J=we;de([b({attribute:!0})],J.prototype,"fullscreen");de([b({type:Boolean})],J.prototype,"maximized");de([b({attribute:!1}),On({context:Ln})],J.prototype,"application");var Pn=Object.defineProperty,fe=(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&&Pn(t,e,n),n};const _e=class _e extends C{constructor(){super(),this.status="deactivated",this.addEventListener("environment-created",this.onEnvironmentCreated)}async connectedCallback(){super.connectedCallback(),await this.getGlobalEnvironment()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("environment-created",this.onEnvironmentCreated)}async onEnvironmentCreated(t){this.widget=t.detail.widget,await this.activate(),this.requestUpdate()}async activate(){this.widget&&(await this.widget.activate(),this.status="activated")}async getGlobalEnvironment(){const t=globalThis.widgets;t&&(this.widget=t.applications.find(e=>e.name===this.name),await this.activate())}render(){if(!this.widget||this.status!=="activated")return p;if(this.widget.renderStrategy===ue.Trigger){const t=new O;return t.application=this.widget,t}return this.widget.render()}};_e.styles=[
|
|
470
|
+
`;let J=we;de([b({attribute:!0})],J.prototype,"fullscreen");de([b({type:Boolean})],J.prototype,"maximized");de([b({attribute:!1}),On({context:Ln})],J.prototype,"application");var Pn=Object.defineProperty,fe=(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&&Pn(t,e,n),n};const _e=class _e extends C{constructor(){super(),this.status="deactivated",this.addEventListener("environment-created",this.onEnvironmentCreated)}async connectedCallback(){super.connectedCallback(),await this.getGlobalEnvironment()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("environment-created",this.onEnvironmentCreated)}async onEnvironmentCreated(t){this.widget=t.detail.widget,await this.activate(),this.requestUpdate()}async activate(){this.widget&&(await this.widget.activate(),this.status="activated")}async getGlobalEnvironment(){const t=globalThis.widgets;t&&(this.widget=t.applications.find(e=>e.name===this.name),await this.activate())}render(){if(!this.widget||this.status!=="activated")return p;if(this.widget.renderStrategy===ue.Trigger){const t=new O;return t.application=this.widget,t}return this.widget.render()}};_e.styles=[D`
|
|
471
471
|
:host {
|
|
472
472
|
display: block;
|
|
473
473
|
}
|
|
474
|
-
`];let tt=_e;fe([b({attribute:!0})],tt.prototype,"name");fe([w()],tt.prototype,"widget");fe([w()],tt.prototype,"status");customElements.get("ace-trigger-slot")||customElements.define("ace-trigger-slot",kt);customElements.get("ace-trigger")||customElements.define("ace-trigger",O);customElements.get("ace-unresolved-component")||customElements.define("ace-unresolved-component",Qt);customElements.get("ace-wrapper")||customElements.define("ace-wrapper",J);customElements.get("ace-widget")||customElements.define("ace-widget",tt);const G={allRenderFn:!1,cmpDidLoad:!0,cmpDidUnload:!1,cmpDidUpdate:!0,cmpDidRender:!0,cmpWillLoad:!0,cmpWillUpdate:!0,cmpWillRender:!0,connectedCallback:!0,disconnectedCallback:!0,element:!0,event:!0,hasRenderFn:!0,lifecycle:!0,hostListener:!0,hostListenerTargetWindow:!0,hostListenerTargetDocument:!0,hostListenerTargetBody:!0,hostListenerTargetParent:!1,hostListenerTarget:!0,member:!0,method:!0,mode:!0,observeAttribute:!0,prop:!0,propMutable:!0,reflect:!0,scoped:!0,shadowDom:!0,slot:!0,cssAnnotations:!0,state:!0,style:!0,svg:!0,updatable:!0,vdomAttribute:!0,vdomXlink:!0,vdomClass:!0,vdomFunctional:!0,vdomKey:!0,vdomListener:!0,vdomRef:!0,vdomPropOrAttr:!0,vdomRender:!0,vdomStyle:!0,vdomText:!0,watchCallback:!0,taskQueue:!0,hotModuleReplacement:!1,isDebug:!1,isDev:!1,isTesting:!1,hydrateServerSide:!1,hydrateClientSide:!1,lifecycleDOMEvents:!1,lazyLoad:!1,profile:!1,slotRelocation:!0,appendChildSlotFix:!1,cloneNodeFix:!1,hydratedAttribute:!1,hydratedClass:!0,safari10:!1,scriptDataOpts:!1,scopedSlotTextContentFix:!1,shadowDomShim:!1,slotChildNodesFix:!1,invisiblePrehydration:!0,propBoolean:!0,propNumber:!0,propString:!0,cssVarShim:!1,constructableCSS:!0,cmpShouldUpdate:!0,devTools:!1,dynamicImportShim:!1,shadowDelegatesFocus:!0,initializeNextTick:!1,asyncLoading:!1,asyncQueue:!1,transformTagName:!1,attachStyles:!0};let q,ji,Rt,Hi=!1,Et=!1,pe=!1,_=!1,qe=null,Jt=!1;const Ut=typeof window<"u"?window:{},k=Ut.document||{head:{}},Ni=Ut.HTMLElement||class{},y={$flags$:0,$resourcesUrl$:"",jmp:i=>i(),raf:i=>requestAnimationFrame(i),ael:(i,t,e,s)=>i.addEventListener(t,e,s),rel:(i,t,e,s)=>i.removeEventListener(t,e,s),ce:(i,t)=>new CustomEvent(i,t)},In=(()=>{let i=!1;try{k.addEventListener("e",null,Object.defineProperty({},"passive",{get(){i=!0}}))}catch{}return i})(),Mn=i=>Promise.resolve(i),Rn=(()=>{try{return new CSSStyleSheet,typeof new CSSStyleSheet().replace=="function"}catch{}return!1})(),Bi=(i,t,e,s)=>{e&&e.map(([n,r,o])=>{const a=zn(i,n),l=Un(t,o),c=jn(n);y.ael(a,r,l,c),(t.$rmListeners$=t.$rmListeners$||[]).push(()=>y.rel(a,r,l,c))})},Un=(i,t)=>e=>{try{G.lazyLoad||i.$hostElement$[t](e)}catch(s){gt(s)}},zn=(i,t)=>t&4?k:t&8?Ut:t&16?k.body:i,jn=i=>In?{passive:(i&1)!==0,capture:(i&2)!==0}:(i&2)!==0,Ze="http://www.w3.org/1999/xlink",D=(i,t="")=>()=>{},Ye=new WeakMap,Hn=(i,t,e)=>{let s=Lt.get(i);Rn&&e?(s=s||new CSSStyleSheet,s.replace(t)):s=t,Lt.set(i,s)},Nn=(i,t,e,s)=>{let n=Di(t,e),r=Lt.get(n);if(i=i.nodeType===11?i:k,r)if(typeof r=="string"){i=i.head||i;let o=Ye.get(i),a;o||Ye.set(i,o=new Set),o.has(n)||(a=k.createElement("style"),a.innerHTML=r,i.insertBefore(a,i.querySelector("link")),o&&o.add(n))}else i.adoptedStyleSheets.includes(r)||(i.adoptedStyleSheets=[...i.adoptedStyleSheets,r]);return n},Bn=i=>{const t=i.$cmpMeta$,e=i.$hostElement$,s=t.$flags$,n=D("attachStyles",t.$tagName$),r=Nn(e.shadowRoot?e.shadowRoot:e.getRootNode(),t,i.$modeName$);s&10&&(e["s-sc"]=r,e.classList.add(r+"-h"),s&2&&e.classList.add(r+"-s")),n()},Di=(i,t)=>"sc-"+(t&&i.$flags$&32?i.$tagName$+"-"+t:i.$tagName$),Dn=i=>mr.map(t=>t(i)).find(t=>!!t),Ke={},Fn="http://www.w3.org/2000/svg",Wn="http://www.w3.org/1999/xhtml",Gn=i=>i!=null,ge=i=>(i=typeof i,i==="object"||i==="function"),K=(i,t,...e)=>{let s=null,n=null,r=null,o=!1,a=!1,l=[];const c=u=>{for(let d=0;d<u.length;d++)s=u[d],Array.isArray(s)?c(s):s!=null&&typeof s!="boolean"&&((o=typeof i!="function"&&!ge(s))&&(s=String(s)),o&&a?l[l.length-1].$text$+=s:l.push(o?Ot(null,s):s),a=o)};if(c(e),t){t.key&&(n=t.key),t.name&&(r=t.name);{const u=t.className||t.class;u&&(t.class=typeof u!="object"?u:Object.keys(u).filter(d=>u[d]).join(" "))}}if(typeof i=="function")return i(t===null?{}:t,l,Zn);const h=Ot(i,null);return h.$attrs$=t,l.length>0&&(h.$children$=l),h.$key$=n,h.$name$=r,h},Ot=(i,t)=>{const e={$flags$:0,$tag$:i,$text$:t,$elm$:null,$children$:null};return e.$attrs$=null,e.$key$=null,e.$name$=null,e},me={},qn=i=>i&&i.$tag$===me,Zn={forEach:(i,t)=>i.map(Xe).forEach(t),map:(i,t)=>i.map(Xe).map(t).map(Yn)},Xe=i=>({vattrs:i.$attrs$,vchildren:i.$children$,vkey:i.$key$,vname:i.$name$,vtag:i.$tag$,vtext:i.$text$}),Yn=i=>{if(typeof i.vtag=="function"){const e=Object.assign({},i.vattrs);return i.vkey&&(e.key=i.vkey),i.vname&&(e.name=i.vname),K(i.vtag,e,...i.vchildren||[])}const t=Ot(i.vtag,i.vtext);return t.$attrs$=i.vattrs,t.$children$=i.vchildren,t.$key$=i.vkey,t.$name$=i.vname,t},Ve=(i,t,e,s,n,r)=>{if(e!==s){let o=ei(i,t),a=t.toLowerCase();if(t==="class"){const l=i.classList,c=Qe(e),h=Qe(s);l.remove(...c.filter(u=>u&&!h.includes(u))),l.add(...h.filter(u=>u&&!c.includes(u)))}else if(t==="style"){for(const l in e)(!s||s[l]==null)&&(l.includes("-")?i.style.removeProperty(l):i.style[l]="");for(const l in s)(!e||s[l]!==e[l])&&(l.includes("-")?i.style.setProperty(l,s[l]):i.style[l]=s[l])}else if(t!=="key")if(t==="ref")s&&s(i);else if(!i.__lookupSetter__(t)&&t[0]==="o"&&t[1]==="n")t[2]==="-"?t=t.slice(3):ei(Ut,a)?t=a.slice(2):t=a[2]+t.slice(3),e&&y.rel(i,t,e,!1),s&&y.ael(i,t,s,!1);else{const l=ge(s);if((o||l&&s!==null)&&!n)try{if(i.tagName.includes("-"))i[t]=s;else{let h=s??"";t==="list"?o=!1:(e==null||i[t]!=h)&&(i[t]=h)}}catch{}let c=!1;a!==(a=a.replace(/^xlink\:?/,""))&&(t=a,c=!0),s==null||s===!1?(s!==!1||i.getAttribute(t)==="")&&(c?i.removeAttributeNS(Ze,t):i.removeAttribute(t)):(!o||r&4||n)&&!l&&(s=s===!0?"":s,c?i.setAttributeNS(Ze,t,s):i.setAttribute(t,s))}}},Kn=/\s/,Qe=i=>i?i.split(Kn):[],Fi=(i,t,e,s)=>{const n=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,r=i&&i.$attrs$||Ke,o=t.$attrs$||Ke;for(s in r)s in o||Ve(n,s,r[s],void 0,e,t.$flags$);for(s in o)Ve(n,s,r[s],o[s],e,t.$flags$)},Tt=(i,t,e,s)=>{let n=t.$children$[e],r=0,o,a,l;if(Hi||(pe=!0,n.$tag$==="slot"&&(q&&s.classList.add(q+"-s"),n.$flags$|=n.$children$?2:1)),n.$text$!==null)o=n.$elm$=k.createTextNode(n.$text$);else if(n.$flags$&1)o=n.$elm$=k.createTextNode("");else{if(_||(_=n.$tag$==="svg"),o=n.$elm$=k.createElementNS(_?Fn:Wn,n.$flags$&2?"slot-fb":n.$tag$),_&&n.$tag$==="foreignObject"&&(_=!1),Fi(null,n,_),Gn(q)&&o["s-si"]!==q&&o.classList.add(o["s-si"]=q),n.$children$)for(r=0;r<n.$children$.length;++r)a=Tt(i,n,r,o),a&&o.appendChild(a);n.$tag$==="svg"?_=!1:o.tagName==="foreignObject"&&(_=!0)}return o["s-hn"]=Rt,n.$flags$&3&&(o["s-sr"]=!0,o["s-cr"]=ji,o["s-sn"]=n.$name$||"",l=i&&i.$children$&&i.$children$[e],l&&l.$tag$===n.$tag$&&i.$elm$&&ut(i.$elm$,!1)),o},ut=(i,t)=>{y.$flags$|=1;const e=i.childNodes;for(let s=e.length-1;s>=0;s--){const n=e[s];n["s-hn"]!==Rt&&n["s-ol"]&&(qi(n).insertBefore(n,ve(n)),n["s-ol"].remove(),n["s-ol"]=void 0,pe=!0),t&&ut(n,t)}y.$flags$&=-2},Wi=(i,t,e,s,n,r)=>{let o=i["s-cr"]&&i["s-cr"].parentNode||i,a;for(o.shadowRoot&&o.tagName===Rt&&(o=o.shadowRoot);n<=r;++n)s[n]&&(a=Tt(null,e,n,i),a&&(s[n].$elm$=a,o.insertBefore(a,ve(t))))},Gi=(i,t,e,s,n)=>{for(;t<=e;++t)(s=i[t])&&(n=s.$elm$,Ki(s),Et=!0,n["s-ol"]?n["s-ol"].remove():ut(n,!0),n.remove())},Xn=(i,t,e,s)=>{let n=0,r=0,o=0,a=0,l=t.length-1,c=t[0],h=t[l],u=s.length-1,d=s[0],f=s[u],m,g;for(;n<=l&&r<=u;)if(c==null)c=t[++n];else if(h==null)h=t[--l];else if(d==null)d=s[++r];else if(f==null)f=s[--u];else if($t(c,d))Z(c,d),c=t[++n],d=s[++r];else if($t(h,f))Z(h,f),h=t[--l],f=s[--u];else if($t(c,f))(c.$tag$==="slot"||f.$tag$==="slot")&&ut(c.$elm$.parentNode,!1),Z(c,f),i.insertBefore(c.$elm$,h.$elm$.nextSibling),c=t[++n],f=s[--u];else if($t(h,d))(c.$tag$==="slot"||f.$tag$==="slot")&&ut(h.$elm$.parentNode,!1),Z(h,d),i.insertBefore(h.$elm$,c.$elm$),h=t[--l],d=s[++r];else{for(o=-1,a=n;a<=l;++a)if(t[a]&&t[a].$key$!==null&&t[a].$key$===d.$key$){o=a;break}o>=0?(g=t[o],g.$tag$!==d.$tag$?m=Tt(t&&t[r],e,o,i):(Z(g,d),t[o]=void 0,m=g.$elm$),d=s[++r]):(m=Tt(t&&t[r],e,r,i),d=s[++r]),m&&qi(c.$elm$).insertBefore(m,ve(c.$elm$))}n>l?Wi(i,s[u+1]==null?null:s[u+1].$elm$,e,s,r,u):r>u&&Gi(t,n,l)},$t=(i,t)=>i.$tag$===t.$tag$?i.$tag$==="slot"?i.$name$===t.$name$:i.$key$===t.$key$:!1,ve=i=>i&&i["s-ol"]||i,qi=i=>(i["s-ol"]?i["s-ol"]:i).parentNode,Z=(i,t)=>{const e=t.$elm$=i.$elm$,s=i.$children$,n=t.$children$,r=t.$tag$,o=t.$text$;let a;o===null?(_=r==="svg"?!0:r==="foreignObject"?!1:_,r==="slot"||Fi(i,t,_),s!==null&&n!==null?Xn(e,s,t,n):n!==null?(i.$text$!==null&&(e.textContent=""),Wi(e,null,t,n,0,n.length-1)):s!==null&&Gi(s,0,s.length-1),_&&r==="svg"&&(_=!1)):(a=e["s-cr"])?a.parentNode.textContent=o:i.$text$!==o&&(e.data=o)},Zi=i=>{let t=i.childNodes,e,s,n,r,o,a;for(s=0,n=t.length;s<n;s++)if(e=t[s],e.nodeType===1){if(e["s-sr"]){for(o=e["s-sn"],e.hidden=!1,r=0;r<n;r++)if(a=t[r].nodeType,t[r]["s-hn"]!==e["s-hn"]||o!==""){if(a===1&&o===t[r].getAttribute("slot")){e.hidden=!0;break}}else if(a===1||a===3&&t[r].textContent.trim()!==""){e.hidden=!0;break}}Zi(e)}},S=[],Yi=i=>{let t,e,s,n,r,o,a=0,l=i.childNodes,c=l.length;for(;a<c;a++){if(t=l[a],t["s-sr"]&&(e=t["s-cr"])&&e.parentNode)for(s=e.parentNode.childNodes,n=t["s-sn"],o=s.length-1;o>=0;o--)e=s[o],!e["s-cn"]&&!e["s-nr"]&&e["s-hn"]!==t["s-hn"]&&(Je(e,n)?(r=S.find(h=>h.$nodeToRelocate$===e),Et=!0,e["s-sn"]=e["s-sn"]||n,r?r.$slotRefNode$=t:S.push({$slotRefNode$:t,$nodeToRelocate$:e}),e["s-sr"]&&S.map(h=>{Je(h.$nodeToRelocate$,e["s-sn"])&&(r=S.find(u=>u.$nodeToRelocate$===e),r&&!h.$slotRefNode$&&(h.$slotRefNode$=r.$slotRefNode$))})):S.some(h=>h.$nodeToRelocate$===e)||S.push({$nodeToRelocate$:e}));t.nodeType===1&&Yi(t)}},Je=(i,t)=>i.nodeType===1?i.getAttribute("slot")===null&&t===""||i.getAttribute("slot")===t:i["s-sn"]===t?!0:t==="",Ki=i=>{i.$attrs$&&i.$attrs$.ref&&i.$attrs$.ref(null),i.$children$&&i.$children$.map(Ki)},Vn=(i,t)=>{const e=i.$hostElement$,s=i.$cmpMeta$,n=i.$vnode$||Ot(null,null),r=qn(t)?t:K(null,null,t);Rt=e.tagName,s.$attrsToReflect$&&(r.$attrs$=r.$attrs$||{},s.$attrsToReflect$.map(([o,a])=>r.$attrs$[a]=e[o])),r.$tag$=null,r.$flags$|=4,i.$vnode$=r,r.$elm$=n.$elm$=e.shadowRoot||e,q=e["s-sc"],ji=e["s-cr"],Hi=(s.$flags$&1)!==0,Et=!1,Z(n,r);{if(y.$flags$|=1,pe){Yi(r.$elm$);let o,a,l,c,h,u,d=0;for(;d<S.length;d++)o=S[d],a=o.$nodeToRelocate$,a["s-ol"]||(l=k.createTextNode(""),l["s-nr"]=a,a.parentNode.insertBefore(a["s-ol"]=l,a));for(d=0;d<S.length;d++)if(o=S[d],a=o.$nodeToRelocate$,o.$slotRefNode$){for(c=o.$slotRefNode$.parentNode,h=o.$slotRefNode$.nextSibling,l=a["s-ol"];l=l.previousSibling;)if(u=l["s-nr"],u&&u["s-sn"]===a["s-sn"]&&c===u.parentNode&&(u=u.nextSibling,!u||!u["s-nr"])){h=u;break}(!h&&c!==a.parentNode||a.nextSibling!==h)&&a!==h&&(!a["s-hn"]&&a["s-ol"]&&(a["s-hn"]=a["s-ol"].parentNode.nodeName),c.insertBefore(a,h))}else a.nodeType===1&&(a.hidden=!0)}Et&&Zi(r.$elm$),y.$flags$&=-2,S.length=0}},Qn=i=>i,Jn=(i,t,e)=>{const s=Qn(i);return{emit:n=>tr(s,t,{bubbles:!0,composed:!0,cancelable:!0,detail:n})}},tr=(i,t,e)=>{const s=y.ce(t,e);return i.dispatchEvent(s),s},er=(i,t)=>{},Xi=(i,t)=>(i.$flags$|=16,er(i,i.$ancestorComponent$),yr(()=>ir(i,t))),ir=(i,t)=>{const e=i.$hostElement$,s=D("scheduleUpdate",i.$cmpMeta$.$tagName$),n=e;let r;return t?r=X(n,"componentWillLoad"):r=X(n,"componentWillUpdate"),r=ti(r,()=>X(n,"componentWillRender")),s(),ti(r,()=>sr(i,n,t))},sr=async(i,t,e)=>{const s=i.$hostElement$,n=D("update",i.$cmpMeta$.$tagName$);s["s-rc"],e&&Bn(i);const r=D("render",i.$cmpMeta$.$tagName$);nr(i,t,s),r(),n(),rr(i)},nr=(i,t,e)=>{try{qe=t,t=t.render&&t.render(),i.$flags$&=-17,i.$flags$|=2,(G.hasRenderFn||G.reflect)&&(G.vdomRender||G.reflect)&&(G.hydrateServerSide||Vn(i,t))}catch(a){gt(a,i.$hostElement$)}return qe=null,null},rr=i=>{const t=i.$cmpMeta$.$tagName$,e=i.$hostElement$,s=D("postUpdate",t),n=e;i.$ancestorComponent$,X(n,"componentDidRender"),i.$flags$&64?(X(n,"componentDidUpdate"),s()):(i.$flags$|=64,X(n,"componentDidLoad"),s())},X=(i,t,e)=>{if(i&&i[t])try{return i[t](e)}catch(s){gt(s)}},ti=(i,t)=>i&&i.then?i.then(t):t(),or=(i,t)=>i!=null&&!ge(i)?t&4?i==="false"?!1:i===""||!!i:t&2?parseFloat(i):t&1?String(i):i:i,ar=(i,t)=>zt(i).$instanceValues$.get(t),lr=(i,t,e,s)=>{const n=zt(i),r=i,o=n.$instanceValues$.get(t),a=n.$flags$,l=r;e=or(e,s.$members$[t][0]);const c=Number.isNaN(o)&&Number.isNaN(e);if(e!==o&&!c){n.$instanceValues$.set(t,e);{if(s.$watchers$&&a&128){const u=s.$watchers$[t];u&&u.map(d=>{try{l[d](e,o,t)}catch(f){gt(f,r)}})}if((a&18)===2){if(l.componentShouldUpdate&&l.componentShouldUpdate(e,o,t)===!1)return;Xi(n,!1)}}}},cr=(i,t,e)=>{if(t.$members$){i.watchers&&(t.$watchers$=i.watchers);const s=Object.entries(t.$members$),n=i.prototype;s.map(([r,[o]])=>{(o&31||o&32)&&Object.defineProperty(n,r,{get(){return ar(this,r)},set(a){lr(this,r,a,t)},configurable:!0,enumerable:!0})});{const r=new Map;n.attributeChangedCallback=function(o,a,l){y.jmp(()=>{const c=r.get(o);if(this.hasOwnProperty(c))l=this[c],delete this[c];else if(n.hasOwnProperty(c)&&typeof this[c]=="number"&&this[c]==l)return;this[c]=l===null&&typeof this[c]=="boolean"?!1:l})},i.observedAttributes=s.filter(([o,a])=>a[0]&15).map(([o,a])=>{const l=a[1]||o;return r.set(l,o),a[0]&512&&t.$attrsToReflect$.push([o,l]),l})}}return i},hr=async(i,t,e,s,n)=>{if((t.$flags$&32)===0&&(n=i.constructor,t.$flags$|=32,customElements.whenDefined(e.$tagName$).then(()=>t.$flags$|=128),n.style)){let o=n.style;typeof o!="string"&&(o=o[t.$modeName$=Dn(i)]);const a=Di(e,t.$modeName$);if(!Lt.has(a)){const l=D("registerStyles",e.$tagName$);Hn(a,o,!!(e.$flags$&1)),l()}}t.$ancestorComponent$,Xi(t,!0)},ur=i=>{},dr=i=>{if((y.$flags$&1)===0){const t=zt(i),e=t.$cmpMeta$,s=D("connectedCallback",e.$tagName$);t.$flags$&1?(Bi(i,t,e.$listeners$),ur(t.$lazyInstance$)):(t.$flags$|=1,e.$flags$&12&&fr(i),e.$members$&&Object.entries(e.$members$).map(([n,[r]])=>{if(r&31&&i.hasOwnProperty(n)){const o=i[n];delete i[n],i[n]=o}}),hr(i,t,e)),s()}},fr=i=>{const t=i["s-cr"]=k.createComment("");t["s-cn"]=!0,i.insertBefore(t,i.firstChild)},pr=i=>{if((y.$flags$&1)===0){const t=zt(i);t.$rmListeners$&&(t.$rmListeners$.map(e=>e()),t.$rmListeners$=void 0)}},Vi=(i,t)=>{const e={$flags$:t[0],$tagName$:t[1]};e.$members$=t[2],e.$listeners$=t[3],e.$watchers$=i.$watchers$,e.$attrsToReflect$=[];const s=i.prototype.connectedCallback,n=i.prototype.disconnectedCallback;return Object.assign(i.prototype,{__registerHost(){gr(this,e)},connectedCallback(){dr(this),s&&s.call(this)},disconnectedCallback(){pr(this),n&&n.call(this)},__attachShadow(){this.attachShadow({mode:"open",delegatesFocus:!!(e.$flags$&16)})}}),i.is=e.$tagName$,cr(i,e)},Qi=new WeakMap,zt=i=>Qi.get(i),gr=(i,t)=>{const e={$flags$:0,$hostElement$:i,$cmpMeta$:t,$instanceValues$:new Map};return Bi(i,e,t.$listeners$),Qi.set(i,e)},ei=(i,t)=>t in i,gt=(i,t)=>(0,console.error)(i,t),Lt=new Map,mr=[],ii=[],Ji=[],vr=(i,t)=>e=>{i.push(e),Jt||(Jt=!0,t&&y.$flags$&4?$r(te):y.raf(te))},si=i=>{for(let t=0;t<i.length;t++)try{i[t](performance.now())}catch(e){gt(e)}i.length=0},te=()=>{si(ii),si(Ji),(Jt=ii.length>0)&&y.raf(te)},$r=i=>Mn().then(i),yr=vr(Ji,!0),br=(i={})=>{const{content:t="",title:e,attributes:s=[]}=i;let n="",r=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},...s];return e&&(n=`<title>${e}</title>`),`<svg ${r.map(a=>`${a.name}="${a.value}"`).join(" ")}>${n}${t}</svg>`},wr=i=>i.replace(/<(\/?)svg([^>]*)>/g,"").trim();function _r(i){return`${i.getFullYear()}.${i.getMonth()+1}`}class xr{constructor(t){this.voca_component=t,this.voca_added=_r(new Date)}}const Sr="telia-vst{display:none}",Ar=Vi(class extends Ni{constructor(){super(),this.__registerHost(),this.vocaInternalUStats=Jn(this,"vocaInternalUStats")}connectedCallback(){this.vocaInternalUStats.emit(new xr(this.dataTrackingId))}render(){return K(me,null)}static get style(){return Sr}},[0,"telia-vst",{dataTrackingId:[1,"data-tracking-id"]}]);function ts(){if(typeof customElements>"u")return;["telia-vst"].forEach(t=>{switch(t){case"telia-vst":customElements.get(t)||customElements.define(t,Ar);break}})}ts();function ee(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{vocadsIcons:void 0,vocadsIconsRegistered:!1}}function Cr(){if(typeof ee().vocadsIcons!==void 0)return ee().vocadsIcons}function kr(){return ee().vocadsIconsRegistered}const Er=".telia-icon{display:inline-block}.telia-icon__container{display:block;height:inherit}.telia-icon svg{display:block}.telia-icon--sm{height:calc(1.6rem * var(--voca-rem-multiplier));min-width:calc(1.6rem * var(--voca-rem-multiplier));width:calc(1.6rem * var(--voca-rem-multiplier))}.telia-icon--md{height:calc(2.4rem * var(--voca-rem-multiplier));min-width:calc(2.4rem * var(--voca-rem-multiplier));width:calc(2.4rem * var(--voca-rem-multiplier))}.telia-icon--lg{height:calc(3.2rem * var(--voca-rem-multiplier));min-width:calc(3.2rem * var(--voca-rem-multiplier));width:calc(3.2rem * var(--voca-rem-multiplier))}",Or=Vi(class extends Ni{constructor(){super(),this.__registerHost(),this.size="md",this.allyTitle=null,this.dataTrackingId="telia-icon"}getSvgString(){if(this.svg)return this.svg;if(kr()&&this.name){const i=Cr();return i[this.name]?i[this.name].svg:""}return this.name&&console.warn(this.name,"Icons bundle is not registered and will not be rendered. Check if you have registered icons bundle or use svg property"),""}render(){let i=this.getSvgString(),t=[{name:"viewBox",value:"0 0 64 64"}];this.allyTitle?t=[...t,{name:"role",value:"img"}]:t=[...t,{name:"aria-hidden",value:"true"}];const e=br({content:wr(i),attributes:t,title:this.allyTitle});return K(me,{class:`telia-icon telia-icon--${this.size}`},K("span",{"aria-label":this.allyTitle,class:"telia-icon__container",innerHTML:e}),K("telia-vst",{dataTrackingId:this.dataTrackingId}))}static get style(){return Er}},[0,"telia-icon",{name:[1],svg:[1],size:[1],allyTitle:[1,"ally-title"],dataTestid:[1,"data-testid"]}]);function Tr(){if(typeof customElements>"u")return;["telia-icon","telia-vst"].forEach(t=>{switch(t){case"telia-icon":customElements.get(t)||customElements.define(t,Or);break;case"telia-vst":customElements.get(t)||ts();break}})}Tr();const Lr=()=>"10000000-1000-4000-8000-100000000000".replace(/[018]/g,i=>(+i^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+i/4).toString(16)),Pr=()=>typeof crypto.randomUUID=="function"?crypto.randomUUID():Lr();class Ir{constructor(t,e,s,n,r,o,a=!0){this.label=t,this.icon=e,this.onClick=s,this.closeOnClick=n,this.key=r,this.update=new ft,this.id=Pr(),this._controller=o,this.enabled=a}updateLabel(t){this.label=t,this.update.next()}updateIcon(t){this.icon=t,this.update.next()}remove(){this._controller.removeOption(this)}subscribe(){return this.update.asObservable()}}class Mr{constructor(t){this._options=[],this._subscription=null,this._host=t,t.addController(this)}hostConnected(){}hostDisconnected(){this._subscription&&this._subscription.unsubscribe(),this._options=[]}addOption(t){const e=new Ir(t.label,t.icon,t.onClick,t.closeOnClick,t.key,this,t.enabled);return this._options.push(e),this.handleUpdate(),e}removeOption(t){t&&(this._options=this._options.filter(e=>e.id!==t.id))}handleUpdate(){this._subscription&&this._subscription.unsubscribe();const t=this._options.map(e=>e.subscribe());this._subscription=hn(t).subscribe(()=>{this._host.requestUpdate()})}set options(t){this._options=t,this._host.requestUpdate()}get options(){return this._options}hasOptions(){return this._options.length>0}}var Rr=Object.defineProperty,M=(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&&Rr(t,e,n),n};const Ur={svg:'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor"><g transform="scale(2.66667)"><path fill-rule="evenodd" clip-rule="evenodd" d="M13.6354 3.82843C13.6354 3.34518 14.0272 2.95343 14.5104 2.95343L20.2923 2.95343C20.7065 2.95343 21.0423 3.28922 21.0423 3.70343L21.0423 9.48528C21.0423 9.96853 20.6505 10.3603 20.1673 10.3603C19.684 10.3603 19.2923 9.96853 19.2923 9.48529L19.2923 5.94087L14.6187 10.6144C14.277 10.9561 13.723 10.9561 13.3813 10.6144C13.0396 10.2727 13.0396 9.71868 13.3813 9.37697L18.0548 4.70343L14.5104 4.70343C14.0272 4.70343 13.6354 4.31168 13.6354 3.82843Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M10.3603 20.1688C10.3603 20.6521 9.96853 21.0438 9.48528 21.0438L3.70343 21.0438C3.28922 21.0438 2.95343 20.708 2.95343 20.2938L2.95343 14.512C2.95343 14.0287 3.34518 13.637 3.82843 13.637C4.31168 13.637 4.70343 14.0287 4.70343 14.512L4.70343 18.0564L9.37697 13.3829C9.71868 13.0411 10.2727 13.0411 10.6144 13.3829C10.9561 13.7246 10.9561 14.2786 10.6144 14.6203L5.94087 19.2938L9.48529 19.2938C9.96853 19.2938 10.3603 19.6856 10.3603 20.1688Z"/></g></svg>'},zr={svg:'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor"><g transform="scale(2.66667)"><path fill-rule="evenodd" clip-rule="evenodd" d="M20.7881 9.73941C20.7881 10.2227 20.3964 10.6144 19.9131 10.6144L14.1313 10.6144C13.7171 10.6144 13.3813 10.2786 13.3813 9.8644L13.3813 4.08255C13.3813 3.5993 13.773 3.20755 14.2563 3.20755C14.7395 3.20755 15.1313 3.5993 15.1313 4.08255L15.1313 7.62697L19.8048 2.95343C20.1465 2.61172 20.7006 2.61172 21.0423 2.95343C21.384 3.29513 21.384 3.84915 21.0423 4.19086L16.3687 8.8644L19.9131 8.86441C20.3964 8.86441 20.7881 9.25616 20.7881 9.73941Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M3.20755 14.2578C3.20755 13.7746 3.5993 13.3828 4.08255 13.3828L9.8644 13.3828C10.2786 13.3828 10.6144 13.7186 10.6144 14.1328L10.6144 19.9147C10.6144 20.3979 10.2227 20.7897 9.73941 20.7897C9.25616 20.7897 8.86441 20.3979 8.86441 19.9147L8.8644 16.3703L4.19086 21.0438C3.84915 21.3855 3.29513 21.3855 2.95343 21.0438C2.61172 20.7021 2.61172 20.1481 2.95343 19.8064L7.62697 15.1328L4.08255 15.1328C3.5993 15.1328 3.20755 14.7411 3.20755 14.2578Z"/></g></svg>'},ni=zi(C);var A;const T=(A=class extends ni{constructor(){super(...arguments),this.optionsIsVisible=!1,this.authState=L.NonAuthenticated,this.userName="",this.authUrl="",this.showAuthOptions=!1,this.isMaximized=!1,this.showMaximizeOption=!1,this.showAuthenticateOption=!1,this.shouldUseAuth=!1,this.options=new Mr(this),this.optionsRef=St(),this.optionsTriggerRef=St(),this.actions$=new ft,this.onClickOutside=t=>{!this.optionsTriggerRef.value||!this.optionsRef.value||t.composedPath().includes(this.optionsTriggerRef.value)||t.composedPath().includes(this.optionsRef.value)||(this.optionsIsVisible=!1)},this.onGlobalKeyDown=t=>{var e,s;if(t.key==="Escape"){if(this.optionsIsVisible&&this.optionsRef.value){this.optionsIsVisible=!1,(e=this.optionsTriggerRef.value)==null||e.focus();return}if((s=this.application.trigger)!=null&&s.active){this.onMinimizeClick();return}return}t.key==="Tab"&&this.optionsIsVisible&&this.optionsRef.value&&this.handleFocusTrap(t)}}addOption(t){return this.options.addOption(t)}removeOption(t){return this.options.removeOption(t)}onToggleOptionsMenuClick(){this.optionsIsVisible=!this.optionsIsVisible}onMinimizeClick(){this.application.trigger?this.application.trigger.toggleActive():(this.notify("widget-minimize",{widgetId:this.application.id}),this.application.storage.set("open",!1))}get canMaximize(){var t;return(((t=window.screen)==null?void 0:t.availWidth)??0)>800}setMaximized(t){this.isMaximized=t,this.notify("widget-maximize",{widgetId:this.application.id,value:t}),this.application.setMaximized(t),this.application.storage.set(A.MAXIMIZED_STORAGE_KEY,t),this.actions$.next({key:"maximize-changed",data:{value:t}})}restoreMaximizedFromStorage(){this.application.storage.get(A.MAXIMIZED_STORAGE_KEY)===!0&&this.canMaximize&&this.setMaximized(!0)}clearMaximizedState(){this.application.storage.removeItem(A.MAXIMIZED_STORAGE_KEY)}toggleMaximized(){this.setMaximized(!this.isMaximized)}maximizeLabel(t){return this.isMaximized?t.getOrFallback("widget-header.restore","Restore window size"):t.getOrFallback("widget-header.maximize","Maximize window")}notify(t,e={}){window!=null&&window.parent&&window.parent.postMessage({type:t,data:e},"*")}onStartAuth(t){this.authUrl||t==null||t.preventDefault(),this.actions$.next({key:"start-auth"}),this.optionsIsVisible=!1}onStartAuthFlow(){this.actions$.next({key:"start-auth-flow"}),this.optionsIsVisible=!1}handleFocusTrap(t){var o,a;const e=(o=this.optionsRef.value)==null?void 0:o.querySelectorAll('button:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])');if(!e||e.length===0)return;const s=e[0],n=e[e.length-1],r=(a=this.shadowRoot)==null?void 0:a.activeElement;t.shiftKey?r===s&&(t.preventDefault(),n.focus()):r===n&&(t.preventDefault(),s.focus())}renderAuthSection(t){return!this.showAuthOptions||!(this.shouldUseAuth&&this.authState!==L.ChatEnded)?p:$`<div class="options-menu__auth-container">
|
|
474
|
+
`];let tt=_e;fe([b({attribute:!0})],tt.prototype,"name");fe([w()],tt.prototype,"widget");fe([w()],tt.prototype,"status");customElements.get("ace-trigger-slot")||customElements.define("ace-trigger-slot",kt);customElements.get("ace-trigger")||customElements.define("ace-trigger",O);customElements.get("ace-unresolved-component")||customElements.define("ace-unresolved-component",Qt);customElements.get("ace-wrapper")||customElements.define("ace-wrapper",J);customElements.get("ace-widget")||customElements.define("ace-widget",tt);const G={allRenderFn:!1,cmpDidLoad:!0,cmpDidUnload:!1,cmpDidUpdate:!0,cmpDidRender:!0,cmpWillLoad:!0,cmpWillUpdate:!0,cmpWillRender:!0,connectedCallback:!0,disconnectedCallback:!0,element:!0,event:!0,hasRenderFn:!0,lifecycle:!0,hostListener:!0,hostListenerTargetWindow:!0,hostListenerTargetDocument:!0,hostListenerTargetBody:!0,hostListenerTargetParent:!1,hostListenerTarget:!0,member:!0,method:!0,mode:!0,observeAttribute:!0,prop:!0,propMutable:!0,reflect:!0,scoped:!0,shadowDom:!0,slot:!0,cssAnnotations:!0,state:!0,style:!0,svg:!0,updatable:!0,vdomAttribute:!0,vdomXlink:!0,vdomClass:!0,vdomFunctional:!0,vdomKey:!0,vdomListener:!0,vdomRef:!0,vdomPropOrAttr:!0,vdomRender:!0,vdomStyle:!0,vdomText:!0,watchCallback:!0,taskQueue:!0,hotModuleReplacement:!1,isDebug:!1,isDev:!1,isTesting:!1,hydrateServerSide:!1,hydrateClientSide:!1,lifecycleDOMEvents:!1,lazyLoad:!1,profile:!1,slotRelocation:!0,appendChildSlotFix:!1,cloneNodeFix:!1,hydratedAttribute:!1,hydratedClass:!0,safari10:!1,scriptDataOpts:!1,scopedSlotTextContentFix:!1,shadowDomShim:!1,slotChildNodesFix:!1,invisiblePrehydration:!0,propBoolean:!0,propNumber:!0,propString:!0,cssVarShim:!1,constructableCSS:!0,cmpShouldUpdate:!0,devTools:!1,dynamicImportShim:!1,shadowDelegatesFocus:!0,initializeNextTick:!1,asyncLoading:!1,asyncQueue:!1,transformTagName:!1,attachStyles:!0};let q,ji,Rt,Hi=!1,Et=!1,pe=!1,_=!1,qe=null,Jt=!1;const zt=typeof window<"u"?window:{},k=zt.document||{head:{}},Ni=zt.HTMLElement||class{},y={$flags$:0,$resourcesUrl$:"",jmp:i=>i(),raf:i=>requestAnimationFrame(i),ael:(i,t,e,s)=>i.addEventListener(t,e,s),rel:(i,t,e,s)=>i.removeEventListener(t,e,s),ce:(i,t)=>new CustomEvent(i,t)},In=(()=>{let i=!1;try{k.addEventListener("e",null,Object.defineProperty({},"passive",{get(){i=!0}}))}catch{}return i})(),Mn=i=>Promise.resolve(i),Rn=(()=>{try{return new CSSStyleSheet,typeof new CSSStyleSheet().replace=="function"}catch{}return!1})(),Bi=(i,t,e,s)=>{e&&e.map(([n,r,o])=>{const a=Un(i,n),l=zn(t,o),c=jn(n);y.ael(a,r,l,c),(t.$rmListeners$=t.$rmListeners$||[]).push(()=>y.rel(a,r,l,c))})},zn=(i,t)=>e=>{try{G.lazyLoad||i.$hostElement$[t](e)}catch(s){gt(s)}},Un=(i,t)=>t&4?k:t&8?zt:t&16?k.body:i,jn=i=>In?{passive:(i&1)!==0,capture:(i&2)!==0}:(i&2)!==0,Ze="http://www.w3.org/1999/xlink",B=(i,t="")=>()=>{},Ye=new WeakMap,Hn=(i,t,e)=>{let s=Lt.get(i);Rn&&e?(s=s||new CSSStyleSheet,s.replace(t)):s=t,Lt.set(i,s)},Nn=(i,t,e,s)=>{let n=Di(t,e),r=Lt.get(n);if(i=i.nodeType===11?i:k,r)if(typeof r=="string"){i=i.head||i;let o=Ye.get(i),a;o||Ye.set(i,o=new Set),o.has(n)||(a=k.createElement("style"),a.innerHTML=r,i.insertBefore(a,i.querySelector("link")),o&&o.add(n))}else i.adoptedStyleSheets.includes(r)||(i.adoptedStyleSheets=[...i.adoptedStyleSheets,r]);return n},Bn=i=>{const t=i.$cmpMeta$,e=i.$hostElement$,s=t.$flags$,n=B("attachStyles",t.$tagName$),r=Nn(e.shadowRoot?e.shadowRoot:e.getRootNode(),t,i.$modeName$);s&10&&(e["s-sc"]=r,e.classList.add(r+"-h"),s&2&&e.classList.add(r+"-s")),n()},Di=(i,t)=>"sc-"+(t&&i.$flags$&32?i.$tagName$+"-"+t:i.$tagName$),Dn=i=>mr.map(t=>t(i)).find(t=>!!t),Ke={},Fn="http://www.w3.org/2000/svg",Wn="http://www.w3.org/1999/xhtml",Gn=i=>i!=null,ge=i=>(i=typeof i,i==="object"||i==="function"),K=(i,t,...e)=>{let s=null,n=null,r=null,o=!1,a=!1,l=[];const c=u=>{for(let d=0;d<u.length;d++)s=u[d],Array.isArray(s)?c(s):s!=null&&typeof s!="boolean"&&((o=typeof i!="function"&&!ge(s))&&(s=String(s)),o&&a?l[l.length-1].$text$+=s:l.push(o?Ot(null,s):s),a=o)};if(c(e),t){t.key&&(n=t.key),t.name&&(r=t.name);{const u=t.className||t.class;u&&(t.class=typeof u!="object"?u:Object.keys(u).filter(d=>u[d]).join(" "))}}if(typeof i=="function")return i(t===null?{}:t,l,Zn);const h=Ot(i,null);return h.$attrs$=t,l.length>0&&(h.$children$=l),h.$key$=n,h.$name$=r,h},Ot=(i,t)=>{const e={$flags$:0,$tag$:i,$text$:t,$elm$:null,$children$:null};return e.$attrs$=null,e.$key$=null,e.$name$=null,e},me={},qn=i=>i&&i.$tag$===me,Zn={forEach:(i,t)=>i.map(Xe).forEach(t),map:(i,t)=>i.map(Xe).map(t).map(Yn)},Xe=i=>({vattrs:i.$attrs$,vchildren:i.$children$,vkey:i.$key$,vname:i.$name$,vtag:i.$tag$,vtext:i.$text$}),Yn=i=>{if(typeof i.vtag=="function"){const e=Object.assign({},i.vattrs);return i.vkey&&(e.key=i.vkey),i.vname&&(e.name=i.vname),K(i.vtag,e,...i.vchildren||[])}const t=Ot(i.vtag,i.vtext);return t.$attrs$=i.vattrs,t.$children$=i.vchildren,t.$key$=i.vkey,t.$name$=i.vname,t},Ve=(i,t,e,s,n,r)=>{if(e!==s){let o=ei(i,t),a=t.toLowerCase();if(t==="class"){const l=i.classList,c=Qe(e),h=Qe(s);l.remove(...c.filter(u=>u&&!h.includes(u))),l.add(...h.filter(u=>u&&!c.includes(u)))}else if(t==="style"){for(const l in e)(!s||s[l]==null)&&(l.includes("-")?i.style.removeProperty(l):i.style[l]="");for(const l in s)(!e||s[l]!==e[l])&&(l.includes("-")?i.style.setProperty(l,s[l]):i.style[l]=s[l])}else if(t!=="key")if(t==="ref")s&&s(i);else if(!i.__lookupSetter__(t)&&t[0]==="o"&&t[1]==="n")t[2]==="-"?t=t.slice(3):ei(zt,a)?t=a.slice(2):t=a[2]+t.slice(3),e&&y.rel(i,t,e,!1),s&&y.ael(i,t,s,!1);else{const l=ge(s);if((o||l&&s!==null)&&!n)try{if(i.tagName.includes("-"))i[t]=s;else{let h=s??"";t==="list"?o=!1:(e==null||i[t]!=h)&&(i[t]=h)}}catch{}let c=!1;a!==(a=a.replace(/^xlink\:?/,""))&&(t=a,c=!0),s==null||s===!1?(s!==!1||i.getAttribute(t)==="")&&(c?i.removeAttributeNS(Ze,t):i.removeAttribute(t)):(!o||r&4||n)&&!l&&(s=s===!0?"":s,c?i.setAttributeNS(Ze,t,s):i.setAttribute(t,s))}}},Kn=/\s/,Qe=i=>i?i.split(Kn):[],Fi=(i,t,e,s)=>{const n=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,r=i&&i.$attrs$||Ke,o=t.$attrs$||Ke;for(s in r)s in o||Ve(n,s,r[s],void 0,e,t.$flags$);for(s in o)Ve(n,s,r[s],o[s],e,t.$flags$)},Tt=(i,t,e,s)=>{let n=t.$children$[e],r=0,o,a,l;if(Hi||(pe=!0,n.$tag$==="slot"&&(q&&s.classList.add(q+"-s"),n.$flags$|=n.$children$?2:1)),n.$text$!==null)o=n.$elm$=k.createTextNode(n.$text$);else if(n.$flags$&1)o=n.$elm$=k.createTextNode("");else{if(_||(_=n.$tag$==="svg"),o=n.$elm$=k.createElementNS(_?Fn:Wn,n.$flags$&2?"slot-fb":n.$tag$),_&&n.$tag$==="foreignObject"&&(_=!1),Fi(null,n,_),Gn(q)&&o["s-si"]!==q&&o.classList.add(o["s-si"]=q),n.$children$)for(r=0;r<n.$children$.length;++r)a=Tt(i,n,r,o),a&&o.appendChild(a);n.$tag$==="svg"?_=!1:o.tagName==="foreignObject"&&(_=!0)}return o["s-hn"]=Rt,n.$flags$&3&&(o["s-sr"]=!0,o["s-cr"]=ji,o["s-sn"]=n.$name$||"",l=i&&i.$children$&&i.$children$[e],l&&l.$tag$===n.$tag$&&i.$elm$&&ut(i.$elm$,!1)),o},ut=(i,t)=>{y.$flags$|=1;const e=i.childNodes;for(let s=e.length-1;s>=0;s--){const n=e[s];n["s-hn"]!==Rt&&n["s-ol"]&&(qi(n).insertBefore(n,ve(n)),n["s-ol"].remove(),n["s-ol"]=void 0,pe=!0),t&&ut(n,t)}y.$flags$&=-2},Wi=(i,t,e,s,n,r)=>{let o=i["s-cr"]&&i["s-cr"].parentNode||i,a;for(o.shadowRoot&&o.tagName===Rt&&(o=o.shadowRoot);n<=r;++n)s[n]&&(a=Tt(null,e,n,i),a&&(s[n].$elm$=a,o.insertBefore(a,ve(t))))},Gi=(i,t,e,s,n)=>{for(;t<=e;++t)(s=i[t])&&(n=s.$elm$,Ki(s),Et=!0,n["s-ol"]?n["s-ol"].remove():ut(n,!0),n.remove())},Xn=(i,t,e,s)=>{let n=0,r=0,o=0,a=0,l=t.length-1,c=t[0],h=t[l],u=s.length-1,d=s[0],f=s[u],m,g;for(;n<=l&&r<=u;)if(c==null)c=t[++n];else if(h==null)h=t[--l];else if(d==null)d=s[++r];else if(f==null)f=s[--u];else if($t(c,d))Z(c,d),c=t[++n],d=s[++r];else if($t(h,f))Z(h,f),h=t[--l],f=s[--u];else if($t(c,f))(c.$tag$==="slot"||f.$tag$==="slot")&&ut(c.$elm$.parentNode,!1),Z(c,f),i.insertBefore(c.$elm$,h.$elm$.nextSibling),c=t[++n],f=s[--u];else if($t(h,d))(c.$tag$==="slot"||f.$tag$==="slot")&&ut(h.$elm$.parentNode,!1),Z(h,d),i.insertBefore(h.$elm$,c.$elm$),h=t[--l],d=s[++r];else{for(o=-1,a=n;a<=l;++a)if(t[a]&&t[a].$key$!==null&&t[a].$key$===d.$key$){o=a;break}o>=0?(g=t[o],g.$tag$!==d.$tag$?m=Tt(t&&t[r],e,o,i):(Z(g,d),t[o]=void 0,m=g.$elm$),d=s[++r]):(m=Tt(t&&t[r],e,r,i),d=s[++r]),m&&qi(c.$elm$).insertBefore(m,ve(c.$elm$))}n>l?Wi(i,s[u+1]==null?null:s[u+1].$elm$,e,s,r,u):r>u&&Gi(t,n,l)},$t=(i,t)=>i.$tag$===t.$tag$?i.$tag$==="slot"?i.$name$===t.$name$:i.$key$===t.$key$:!1,ve=i=>i&&i["s-ol"]||i,qi=i=>(i["s-ol"]?i["s-ol"]:i).parentNode,Z=(i,t)=>{const e=t.$elm$=i.$elm$,s=i.$children$,n=t.$children$,r=t.$tag$,o=t.$text$;let a;o===null?(_=r==="svg"?!0:r==="foreignObject"?!1:_,r==="slot"||Fi(i,t,_),s!==null&&n!==null?Xn(e,s,t,n):n!==null?(i.$text$!==null&&(e.textContent=""),Wi(e,null,t,n,0,n.length-1)):s!==null&&Gi(s,0,s.length-1),_&&r==="svg"&&(_=!1)):(a=e["s-cr"])?a.parentNode.textContent=o:i.$text$!==o&&(e.data=o)},Zi=i=>{let t=i.childNodes,e,s,n,r,o,a;for(s=0,n=t.length;s<n;s++)if(e=t[s],e.nodeType===1){if(e["s-sr"]){for(o=e["s-sn"],e.hidden=!1,r=0;r<n;r++)if(a=t[r].nodeType,t[r]["s-hn"]!==e["s-hn"]||o!==""){if(a===1&&o===t[r].getAttribute("slot")){e.hidden=!0;break}}else if(a===1||a===3&&t[r].textContent.trim()!==""){e.hidden=!0;break}}Zi(e)}},S=[],Yi=i=>{let t,e,s,n,r,o,a=0,l=i.childNodes,c=l.length;for(;a<c;a++){if(t=l[a],t["s-sr"]&&(e=t["s-cr"])&&e.parentNode)for(s=e.parentNode.childNodes,n=t["s-sn"],o=s.length-1;o>=0;o--)e=s[o],!e["s-cn"]&&!e["s-nr"]&&e["s-hn"]!==t["s-hn"]&&(Je(e,n)?(r=S.find(h=>h.$nodeToRelocate$===e),Et=!0,e["s-sn"]=e["s-sn"]||n,r?r.$slotRefNode$=t:S.push({$slotRefNode$:t,$nodeToRelocate$:e}),e["s-sr"]&&S.map(h=>{Je(h.$nodeToRelocate$,e["s-sn"])&&(r=S.find(u=>u.$nodeToRelocate$===e),r&&!h.$slotRefNode$&&(h.$slotRefNode$=r.$slotRefNode$))})):S.some(h=>h.$nodeToRelocate$===e)||S.push({$nodeToRelocate$:e}));t.nodeType===1&&Yi(t)}},Je=(i,t)=>i.nodeType===1?i.getAttribute("slot")===null&&t===""||i.getAttribute("slot")===t:i["s-sn"]===t?!0:t==="",Ki=i=>{i.$attrs$&&i.$attrs$.ref&&i.$attrs$.ref(null),i.$children$&&i.$children$.map(Ki)},Vn=(i,t)=>{const e=i.$hostElement$,s=i.$cmpMeta$,n=i.$vnode$||Ot(null,null),r=qn(t)?t:K(null,null,t);Rt=e.tagName,s.$attrsToReflect$&&(r.$attrs$=r.$attrs$||{},s.$attrsToReflect$.map(([o,a])=>r.$attrs$[a]=e[o])),r.$tag$=null,r.$flags$|=4,i.$vnode$=r,r.$elm$=n.$elm$=e.shadowRoot||e,q=e["s-sc"],ji=e["s-cr"],Hi=(s.$flags$&1)!==0,Et=!1,Z(n,r);{if(y.$flags$|=1,pe){Yi(r.$elm$);let o,a,l,c,h,u,d=0;for(;d<S.length;d++)o=S[d],a=o.$nodeToRelocate$,a["s-ol"]||(l=k.createTextNode(""),l["s-nr"]=a,a.parentNode.insertBefore(a["s-ol"]=l,a));for(d=0;d<S.length;d++)if(o=S[d],a=o.$nodeToRelocate$,o.$slotRefNode$){for(c=o.$slotRefNode$.parentNode,h=o.$slotRefNode$.nextSibling,l=a["s-ol"];l=l.previousSibling;)if(u=l["s-nr"],u&&u["s-sn"]===a["s-sn"]&&c===u.parentNode&&(u=u.nextSibling,!u||!u["s-nr"])){h=u;break}(!h&&c!==a.parentNode||a.nextSibling!==h)&&a!==h&&(!a["s-hn"]&&a["s-ol"]&&(a["s-hn"]=a["s-ol"].parentNode.nodeName),c.insertBefore(a,h))}else a.nodeType===1&&(a.hidden=!0)}Et&&Zi(r.$elm$),y.$flags$&=-2,S.length=0}},Qn=i=>i,Jn=(i,t,e)=>{const s=Qn(i);return{emit:n=>tr(s,t,{bubbles:!0,composed:!0,cancelable:!0,detail:n})}},tr=(i,t,e)=>{const s=y.ce(t,e);return i.dispatchEvent(s),s},er=(i,t)=>{},Xi=(i,t)=>(i.$flags$|=16,er(i,i.$ancestorComponent$),yr(()=>ir(i,t))),ir=(i,t)=>{const e=i.$hostElement$,s=B("scheduleUpdate",i.$cmpMeta$.$tagName$),n=e;let r;return t?r=X(n,"componentWillLoad"):r=X(n,"componentWillUpdate"),r=ti(r,()=>X(n,"componentWillRender")),s(),ti(r,()=>sr(i,n,t))},sr=async(i,t,e)=>{const s=i.$hostElement$,n=B("update",i.$cmpMeta$.$tagName$);s["s-rc"],e&&Bn(i);const r=B("render",i.$cmpMeta$.$tagName$);nr(i,t,s),r(),n(),rr(i)},nr=(i,t,e)=>{try{qe=t,t=t.render&&t.render(),i.$flags$&=-17,i.$flags$|=2,(G.hasRenderFn||G.reflect)&&(G.vdomRender||G.reflect)&&(G.hydrateServerSide||Vn(i,t))}catch(a){gt(a,i.$hostElement$)}return qe=null,null},rr=i=>{const t=i.$cmpMeta$.$tagName$,e=i.$hostElement$,s=B("postUpdate",t),n=e;i.$ancestorComponent$,X(n,"componentDidRender"),i.$flags$&64?(X(n,"componentDidUpdate"),s()):(i.$flags$|=64,X(n,"componentDidLoad"),s())},X=(i,t,e)=>{if(i&&i[t])try{return i[t](e)}catch(s){gt(s)}},ti=(i,t)=>i&&i.then?i.then(t):t(),or=(i,t)=>i!=null&&!ge(i)?t&4?i==="false"?!1:i===""||!!i:t&2?parseFloat(i):t&1?String(i):i:i,ar=(i,t)=>Ut(i).$instanceValues$.get(t),lr=(i,t,e,s)=>{const n=Ut(i),r=i,o=n.$instanceValues$.get(t),a=n.$flags$,l=r;e=or(e,s.$members$[t][0]);const c=Number.isNaN(o)&&Number.isNaN(e);if(e!==o&&!c){n.$instanceValues$.set(t,e);{if(s.$watchers$&&a&128){const u=s.$watchers$[t];u&&u.map(d=>{try{l[d](e,o,t)}catch(f){gt(f,r)}})}if((a&18)===2){if(l.componentShouldUpdate&&l.componentShouldUpdate(e,o,t)===!1)return;Xi(n,!1)}}}},cr=(i,t,e)=>{if(t.$members$){i.watchers&&(t.$watchers$=i.watchers);const s=Object.entries(t.$members$),n=i.prototype;s.map(([r,[o]])=>{(o&31||o&32)&&Object.defineProperty(n,r,{get(){return ar(this,r)},set(a){lr(this,r,a,t)},configurable:!0,enumerable:!0})});{const r=new Map;n.attributeChangedCallback=function(o,a,l){y.jmp(()=>{const c=r.get(o);if(this.hasOwnProperty(c))l=this[c],delete this[c];else if(n.hasOwnProperty(c)&&typeof this[c]=="number"&&this[c]==l)return;this[c]=l===null&&typeof this[c]=="boolean"?!1:l})},i.observedAttributes=s.filter(([o,a])=>a[0]&15).map(([o,a])=>{const l=a[1]||o;return r.set(l,o),a[0]&512&&t.$attrsToReflect$.push([o,l]),l})}}return i},hr=async(i,t,e,s,n)=>{if((t.$flags$&32)===0&&(n=i.constructor,t.$flags$|=32,customElements.whenDefined(e.$tagName$).then(()=>t.$flags$|=128),n.style)){let o=n.style;typeof o!="string"&&(o=o[t.$modeName$=Dn(i)]);const a=Di(e,t.$modeName$);if(!Lt.has(a)){const l=B("registerStyles",e.$tagName$);Hn(a,o,!!(e.$flags$&1)),l()}}t.$ancestorComponent$,Xi(t,!0)},ur=i=>{},dr=i=>{if((y.$flags$&1)===0){const t=Ut(i),e=t.$cmpMeta$,s=B("connectedCallback",e.$tagName$);t.$flags$&1?(Bi(i,t,e.$listeners$),ur(t.$lazyInstance$)):(t.$flags$|=1,e.$flags$&12&&fr(i),e.$members$&&Object.entries(e.$members$).map(([n,[r]])=>{if(r&31&&i.hasOwnProperty(n)){const o=i[n];delete i[n],i[n]=o}}),hr(i,t,e)),s()}},fr=i=>{const t=i["s-cr"]=k.createComment("");t["s-cn"]=!0,i.insertBefore(t,i.firstChild)},pr=i=>{if((y.$flags$&1)===0){const t=Ut(i);t.$rmListeners$&&(t.$rmListeners$.map(e=>e()),t.$rmListeners$=void 0)}},Vi=(i,t)=>{const e={$flags$:t[0],$tagName$:t[1]};e.$members$=t[2],e.$listeners$=t[3],e.$watchers$=i.$watchers$,e.$attrsToReflect$=[];const s=i.prototype.connectedCallback,n=i.prototype.disconnectedCallback;return Object.assign(i.prototype,{__registerHost(){gr(this,e)},connectedCallback(){dr(this),s&&s.call(this)},disconnectedCallback(){pr(this),n&&n.call(this)},__attachShadow(){this.attachShadow({mode:"open",delegatesFocus:!!(e.$flags$&16)})}}),i.is=e.$tagName$,cr(i,e)},Qi=new WeakMap,Ut=i=>Qi.get(i),gr=(i,t)=>{const e={$flags$:0,$hostElement$:i,$cmpMeta$:t,$instanceValues$:new Map};return Bi(i,e,t.$listeners$),Qi.set(i,e)},ei=(i,t)=>t in i,gt=(i,t)=>(0,console.error)(i,t),Lt=new Map,mr=[],ii=[],Ji=[],vr=(i,t)=>e=>{i.push(e),Jt||(Jt=!0,t&&y.$flags$&4?$r(te):y.raf(te))},si=i=>{for(let t=0;t<i.length;t++)try{i[t](performance.now())}catch(e){gt(e)}i.length=0},te=()=>{si(ii),si(Ji),(Jt=ii.length>0)&&y.raf(te)},$r=i=>Mn().then(i),yr=vr(Ji,!0),br=(i={})=>{const{content:t="",title:e,attributes:s=[]}=i;let n="",r=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},...s];return e&&(n=`<title>${e}</title>`),`<svg ${r.map(a=>`${a.name}="${a.value}"`).join(" ")}>${n}${t}</svg>`},wr=i=>i.replace(/<(\/?)svg([^>]*)>/g,"").trim();function _r(i){return`${i.getFullYear()}.${i.getMonth()+1}`}class xr{constructor(t){this.voca_component=t,this.voca_added=_r(new Date)}}const Sr="telia-vst{display:none}",Ar=Vi(class extends Ni{constructor(){super(),this.__registerHost(),this.vocaInternalUStats=Jn(this,"vocaInternalUStats")}connectedCallback(){this.vocaInternalUStats.emit(new xr(this.dataTrackingId))}render(){return K(me,null)}static get style(){return Sr}},[0,"telia-vst",{dataTrackingId:[1,"data-tracking-id"]}]);function ts(){if(typeof customElements>"u")return;["telia-vst"].forEach(t=>{switch(t){case"telia-vst":customElements.get(t)||customElements.define(t,Ar);break}})}ts();function ee(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{vocadsIcons:void 0,vocadsIconsRegistered:!1}}function Cr(){if(typeof ee().vocadsIcons!==void 0)return ee().vocadsIcons}function kr(){return ee().vocadsIconsRegistered}const Er=".telia-icon{display:inline-block}.telia-icon__container{display:block;height:inherit}.telia-icon svg{display:block}.telia-icon--sm{height:calc(1.6rem * var(--voca-rem-multiplier));min-width:calc(1.6rem * var(--voca-rem-multiplier));width:calc(1.6rem * var(--voca-rem-multiplier))}.telia-icon--md{height:calc(2.4rem * var(--voca-rem-multiplier));min-width:calc(2.4rem * var(--voca-rem-multiplier));width:calc(2.4rem * var(--voca-rem-multiplier))}.telia-icon--lg{height:calc(3.2rem * var(--voca-rem-multiplier));min-width:calc(3.2rem * var(--voca-rem-multiplier));width:calc(3.2rem * var(--voca-rem-multiplier))}",Or=Vi(class extends Ni{constructor(){super(),this.__registerHost(),this.size="md",this.allyTitle=null,this.dataTrackingId="telia-icon"}getSvgString(){if(this.svg)return this.svg;if(kr()&&this.name){const i=Cr();return i[this.name]?i[this.name].svg:""}return this.name&&console.warn(this.name,"Icons bundle is not registered and will not be rendered. Check if you have registered icons bundle or use svg property"),""}render(){let i=this.getSvgString(),t=[{name:"viewBox",value:"0 0 64 64"}];this.allyTitle?t=[...t,{name:"role",value:"img"}]:t=[...t,{name:"aria-hidden",value:"true"}];const e=br({content:wr(i),attributes:t,title:this.allyTitle});return K(me,{class:`telia-icon telia-icon--${this.size}`},K("span",{"aria-label":this.allyTitle,class:"telia-icon__container",innerHTML:e}),K("telia-vst",{dataTrackingId:this.dataTrackingId}))}static get style(){return Er}},[0,"telia-icon",{name:[1],svg:[1],size:[1],allyTitle:[1,"ally-title"],dataTestid:[1,"data-testid"]}]);function Tr(){if(typeof customElements>"u")return;["telia-icon","telia-vst"].forEach(t=>{switch(t){case"telia-icon":customElements.get(t)||customElements.define(t,Or);break;case"telia-vst":customElements.get(t)||ts();break}})}Tr();const Lr=()=>"10000000-1000-4000-8000-100000000000".replace(/[018]/g,i=>(+i^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+i/4).toString(16)),Pr=()=>typeof crypto.randomUUID=="function"?crypto.randomUUID():Lr();class Ir{constructor(t,e,s,n,r,o,a=!0){this.label=t,this.icon=e,this.onClick=s,this.closeOnClick=n,this.key=r,this.update=new ft,this.id=Pr(),this._controller=o,this.enabled=a}updateLabel(t){this.label=t,this.update.next()}updateIcon(t){this.icon=t,this.update.next()}remove(){this._controller.removeOption(this)}subscribe(){return this.update.asObservable()}}class Mr{constructor(t){this._options=[],this._subscription=null,this._host=t,t.addController(this)}hostConnected(){}hostDisconnected(){this._subscription&&this._subscription.unsubscribe(),this._options=[]}addOption(t){const e=new Ir(t.label,t.icon,t.onClick,t.closeOnClick,t.key,this,t.enabled);return this._options.push(e),this.handleUpdate(),e}removeOption(t){t&&(this._options=this._options.filter(e=>e.id!==t.id))}handleUpdate(){this._subscription&&this._subscription.unsubscribe();const t=this._options.map(e=>e.subscribe());this._subscription=hn(t).subscribe(()=>{this._host.requestUpdate()})}set options(t){this._options=t,this._host.requestUpdate()}get options(){return this._options}hasOptions(){return this._options.length>0}}var Rr=Object.defineProperty,I=(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&&Rr(t,e,n),n};const zr={svg:'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor"><g transform="scale(2.66667)"><path fill-rule="evenodd" clip-rule="evenodd" d="M13.6354 3.82843C13.6354 3.34518 14.0272 2.95343 14.5104 2.95343L20.2923 2.95343C20.7065 2.95343 21.0423 3.28922 21.0423 3.70343L21.0423 9.48528C21.0423 9.96853 20.6505 10.3603 20.1673 10.3603C19.684 10.3603 19.2923 9.96853 19.2923 9.48529L19.2923 5.94087L14.6187 10.6144C14.277 10.9561 13.723 10.9561 13.3813 10.6144C13.0396 10.2727 13.0396 9.71868 13.3813 9.37697L18.0548 4.70343L14.5104 4.70343C14.0272 4.70343 13.6354 4.31168 13.6354 3.82843Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M10.3603 20.1688C10.3603 20.6521 9.96853 21.0438 9.48528 21.0438L3.70343 21.0438C3.28922 21.0438 2.95343 20.708 2.95343 20.2938L2.95343 14.512C2.95343 14.0287 3.34518 13.637 3.82843 13.637C4.31168 13.637 4.70343 14.0287 4.70343 14.512L4.70343 18.0564L9.37697 13.3829C9.71868 13.0411 10.2727 13.0411 10.6144 13.3829C10.9561 13.7246 10.9561 14.2786 10.6144 14.6203L5.94087 19.2938L9.48529 19.2938C9.96853 19.2938 10.3603 19.6856 10.3603 20.1688Z"/></g></svg>'},Ur={svg:'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor"><g transform="scale(2.66667)"><path fill-rule="evenodd" clip-rule="evenodd" d="M20.7881 9.73941C20.7881 10.2227 20.3964 10.6144 19.9131 10.6144L14.1313 10.6144C13.7171 10.6144 13.3813 10.2786 13.3813 9.8644L13.3813 4.08255C13.3813 3.5993 13.773 3.20755 14.2563 3.20755C14.7395 3.20755 15.1313 3.5993 15.1313 4.08255L15.1313 7.62697L19.8048 2.95343C20.1465 2.61172 20.7006 2.61172 21.0423 2.95343C21.384 3.29513 21.384 3.84915 21.0423 4.19086L16.3687 8.8644L19.9131 8.86441C20.3964 8.86441 20.7881 9.25616 20.7881 9.73941Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M3.20755 14.2578C3.20755 13.7746 3.5993 13.3828 4.08255 13.3828L9.8644 13.3828C10.2786 13.3828 10.6144 13.7186 10.6144 14.1328L10.6144 19.9147C10.6144 20.3979 10.2227 20.7897 9.73941 20.7897C9.25616 20.7897 8.86441 20.3979 8.86441 19.9147L8.8644 16.3703L4.19086 21.0438C3.84915 21.3855 3.29513 21.3855 2.95343 21.0438C2.61172 20.7021 2.61172 20.1481 2.95343 19.8064L7.62697 15.1328L4.08255 15.1328C3.5993 15.1328 3.20755 14.7411 3.20755 14.2578Z"/></g></svg>'},ni=Ui(C);var A;const T=(A=class extends ni{constructor(){super(...arguments),this.optionsIsVisible=!1,this.authState=W.NonAuthenticated,this.userName="",this.authUrl="",this.showAuthOptions=!1,this.isMaximized=!1,this.showMaximizeOption=!1,this.showAuthenticateOption=!1,this.options=new Mr(this),this.optionsRef=St(),this.optionsTriggerRef=St(),this.actions$=new ft,this.onClickOutside=t=>{!this.optionsTriggerRef.value||!this.optionsRef.value||t.composedPath().includes(this.optionsTriggerRef.value)||t.composedPath().includes(this.optionsRef.value)||(this.optionsIsVisible=!1)},this.onGlobalKeyDown=t=>{var e,s;if(t.key==="Escape"){if(this.optionsIsVisible&&this.optionsRef.value){this.optionsIsVisible=!1,(e=this.optionsTriggerRef.value)==null||e.focus();return}if((s=this.application.trigger)!=null&&s.active){this.onMinimizeClick();return}return}t.key==="Tab"&&this.optionsIsVisible&&this.optionsRef.value&&this.handleFocusTrap(t)}}addOption(t){return this.options.addOption(t)}removeOption(t){return this.options.removeOption(t)}onToggleOptionsMenuClick(){this.optionsIsVisible=!this.optionsIsVisible}onMinimizeClick(){this.application.trigger?this.application.trigger.toggleActive():(this.notify("widget-minimize",{widgetId:this.application.id}),this.application.storage.set("open",!1))}get canMaximize(){var t;return(((t=window.screen)==null?void 0:t.availWidth)??0)>800}setMaximized(t){this.isMaximized=t,this.notify("widget-maximize",{widgetId:this.application.id,value:t}),this.application.setMaximized(t),this.application.storage.set(A.MAXIMIZED_STORAGE_KEY,t),this.actions$.next({key:"maximize-changed",data:{value:t}})}restoreMaximizedFromStorage(){this.application.storage.get(A.MAXIMIZED_STORAGE_KEY)===!0&&this.canMaximize&&this.setMaximized(!0)}clearMaximizedState(){this.application.storage.removeItem(A.MAXIMIZED_STORAGE_KEY)}toggleMaximized(){this.setMaximized(!this.isMaximized)}maximizeLabel(t){return this.isMaximized?t.getOrFallback("widget-header.restore","Restore window size"):t.getOrFallback("widget-header.maximize","Maximize window")}notify(t,e={}){window!=null&&window.parent&&window.parent.postMessage({type:t,data:e},"*")}onStartAuthFlow(){this.actions$.next({key:"start-auth-flow"}),this.optionsIsVisible=!1}handleFocusTrap(t){var o,a;const e=(o=this.optionsRef.value)==null?void 0:o.querySelectorAll('button:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])');if(!e||e.length===0)return;const s=e[0],n=e[e.length-1],r=(a=this.shadowRoot)==null?void 0:a.activeElement;t.shiftKey?r===s&&(t.preventDefault(),n.focus()):r===n&&(t.preventDefault(),s.focus())}renderAuthSection(t){return!this.showAuthOptions||this.authState!==W.Authenticated?p:$`<div class="options-menu__auth-container">
|
|
475
475
|
<p class="options-menu__auth-helper-text" data-testid="auth-helper-text">
|
|
476
476
|
${t.getOrFallback("widget-header.authentication-text","AUTHENTICATED AS")}
|
|
477
477
|
</p>
|
|
478
|
-
|
|
479
|
-
|
|
478
|
+
<div class="options-menu__auth">
|
|
479
|
+
<p class="options-menu__auth-status" data-testid="auth-status">
|
|
480
|
+
${this.userName}
|
|
481
|
+
</p>
|
|
482
|
+
</div>
|
|
483
|
+
</div>`}renderAuthenticateOption(t){return!this.showAuthenticateOption||this.showAuthOptions||this.authState===W.Authenticating||this.authState===W.Authenticated?p:$`<button
|
|
480
484
|
type="button"
|
|
481
485
|
class="options-menu__item"
|
|
482
486
|
data-testid="authenticate-button"
|
|
@@ -484,25 +488,7 @@
|
|
|
484
488
|
>
|
|
485
489
|
<telia-icon class="option-icon" svg=${bn.svg} size="sm"></telia-icon>
|
|
486
490
|
${t.getOrFallback("widget-header.identify","Authenticate")}
|
|
487
|
-
</button>`}
|
|
488
|
-
<p class="options-menu__auth-status" data-testid="auth-status">
|
|
489
|
-
${t.getOrFallback("widget-header.not-authenticated","Not authenticated")}
|
|
490
|
-
</p>
|
|
491
|
-
<a
|
|
492
|
-
href="${this.authUrl}"
|
|
493
|
-
@click=${this.onStartAuth}
|
|
494
|
-
target="_blank"
|
|
495
|
-
rel="noopener noreferrer"
|
|
496
|
-
class="options-menu__auth-link"
|
|
497
|
-
data-testid="auth-link"
|
|
498
|
-
>
|
|
499
|
-
${t.getOrFallback("widget-header.identify","Identify")}
|
|
500
|
-
</a>
|
|
501
|
-
</div>`:$` <div class="options-menu__auth">
|
|
502
|
-
<p class="options-menu__auth-status" data-testid="auth-status">
|
|
503
|
-
${this.userName}
|
|
504
|
-
</p>
|
|
505
|
-
</div>`}setFocusToOptionsTitle(){var e;const t=(e=this.optionsRef.value)==null?void 0:e.querySelector("#options-menu-title");t&&setTimeout(()=>t.focus(),0)}connectedCallback(){super.connectedCallback(),this.application.storage.get("authenticated")&&(this.userName=this.application.storage.get("user-name")??"",this.authState=L.Authenticated,this.showAuthOptions=!0),document.addEventListener("click",this.onClickOutside),window.addEventListener("keydown",this.onGlobalKeyDown)}updated(t){super.updated(t),this.optionsIsVisible&&this.optionsRef.value&&this.setFocusToOptionsTitle()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.onClickOutside),window.removeEventListener("keydown",this.onGlobalKeyDown)}shouldShowAuthSection(){var e,s,n,r,o;return((n=(s=(e=this.application.settings)==null?void 0:e.agentConfig)==null?void 0:s.virtual)==null?void 0:n.shouldUseBotAgent)??!1?this.authState===L.Authenticated:((o=(r=this.application.settings)==null?void 0:r.auth)==null?void 0:o.shouldUseAuth)??!1}render(){var o,a,l,c;const t=this.application.branding(),e=(o=t==null?void 0:t.graphics)==null?void 0:o.logotype,s=this.application.texts,n=s.get("widget-header.header","ACE Widget"),r=((c=(l=(a=this.application.settings)==null?void 0:a.agentConfig)==null?void 0:l.live)==null?void 0:c.isThirdPartyWidget)??!1;return this.shouldUseAuth=this.shouldShowAuthSection(),$` <div class="widget-header">
|
|
491
|
+
</button>`}setFocusToOptionsTitle(){var e;const t=(e=this.optionsRef.value)==null?void 0:e.querySelector("#options-menu-title");t&&setTimeout(()=>t.focus(),0)}connectedCallback(){super.connectedCallback(),this.application.storage.get("authenticated")&&(this.userName=this.application.storage.get("user-name")??"",this.authState=W.Authenticated,this.showAuthOptions=!0),document.addEventListener("click",this.onClickOutside),window.addEventListener("keydown",this.onGlobalKeyDown)}updated(t){super.updated(t),this.optionsIsVisible&&this.optionsRef.value&&this.setFocusToOptionsTitle()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.onClickOutside),window.removeEventListener("keydown",this.onGlobalKeyDown)}render(){var o,a,l,c;const t=this.application.branding(),e=(o=t==null?void 0:t.graphics)==null?void 0:o.logotype,s=this.application.texts,n=s.get("widget-header.header","ACE Widget"),r=((c=(l=(a=this.application.settings)==null?void 0:a.agentConfig)==null?void 0:l.live)==null?void 0:c.isThirdPartyWidget)??!1;return $` <div class="widget-header">
|
|
506
492
|
${e?$` <img
|
|
507
493
|
src=${e}
|
|
508
494
|
class="logotype"
|
|
@@ -525,7 +511,7 @@
|
|
|
525
511
|
data-testid="maximize-button"
|
|
526
512
|
>
|
|
527
513
|
<telia-icon
|
|
528
|
-
svg=${this.isMaximized?
|
|
514
|
+
svg=${this.isMaximized?Ur.svg:zr.svg}
|
|
529
515
|
></telia-icon>
|
|
530
516
|
</button>`:p}
|
|
531
517
|
<button
|
|
@@ -581,7 +567,7 @@
|
|
|
581
567
|
<telia-icon svg=${yn.svg}></telia-icon>
|
|
582
568
|
</button>`}
|
|
583
569
|
</div>
|
|
584
|
-
</div>`}},A.MAXIMIZED_STORAGE_KEY="widget-maximized",A.styles=[ni.styles||[],
|
|
570
|
+
</div>`}},A.MAXIMIZED_STORAGE_KEY="widget-maximized",A.styles=[ni.styles||[],D`
|
|
585
571
|
:host {
|
|
586
572
|
--header-text-color: var(--text-on-primary-background);
|
|
587
573
|
}
|
|
@@ -725,4 +711,4 @@
|
|
|
725
711
|
cursor: not-allowed;
|
|
726
712
|
opacity: 0.5;
|
|
727
713
|
}
|
|
728
|
-
`],A);
|
|
714
|
+
`],A);I([w()],T.prototype,"optionsIsVisible");I([w()],T.prototype,"authState");I([w()],T.prototype,"userName");I([w()],T.prototype,"authUrl");I([w()],T.prototype,"showAuthOptions");I([w()],T.prototype,"isMaximized");I([w()],T.prototype,"showMaximizeOption");I([w()],T.prototype,"showAuthenticateOption");let ie=T;const jr=Object.freeze(Object.defineProperty({__proto__:null,WidgetHeader:ie,default:ie},Symbol.toStringTag,{value:"Module"}));exports.WidgetHeader=ie;exports.default=es;
|