@telia-ace/widget-components-widget-header-flamingo 1.1.70-rc.21 → 1.1.70-rc.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";const r=async e=>{e.registerComponent("widget-header",Promise.resolve().then(()=>require("./widget-header-3277e45f.js")))};module.exports=r;
1
+ "use strict";const r=async e=>{e.registerComponent("widget-header",Promise.resolve().then(()=>require("./widget-header-5b847d39.js")))};module.exports=r;
package/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  const t = async (e) => {
2
- e.registerComponent("widget-header", import("./widget-header-9fddcf06.mjs"));
2
+ e.registerComponent("widget-header", import("./widget-header-788f3227.mjs"));
3
3
  };
4
4
  export {
5
5
  t as default
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-components-widget-header-flamingo",
3
- "version": "1.1.70-rc.21",
3
+ "version": "1.1.70-rc.23",
4
4
  "dependencies": {
5
5
  "lit": "^3.0.2",
6
- "@telia-ace/widget-core-flamingo": "1.1.70-rc.21",
6
+ "@telia-ace/widget-core-flamingo": "1.1.70-rc.23",
7
7
  "@teliads/components": "^22.1.1",
8
8
  "@teliads/icons": "^8.4.0",
9
9
  "@lit-labs/motion": "^1.0.6",
@@ -374,7 +374,7 @@
374
374
  :host {
375
375
  display: block;
376
376
  }
377
- `];oe([b({attribute:!0})],rt.prototype,"name",2);oe([Z()],rt.prototype,"widget",2);oe([Z()],rt.prototype,"status",2);customElements.get("ace-trigger-slot")||customElements.define("ace-trigger-slot",ee);customElements.get("ace-trigger")||customElements.define("ace-trigger",M);customElements.get("ace-unresolved-component")||customElements.define("ace-unresolved-component",Ei);customElements.get("ace-wrapper")||customElements.define("ace-wrapper",re);customElements.get("ace-widget")||customElements.define("ace-widget",rt);const ks=()=>crypto.randomUUID();class Os{constructor(t,e,n,s,r,o){this.label=t,this.icon=e,this.onClick=n,this.closeOnClick=s,this.key=r,this.update=new Et,this.id=ks(),this._controller=o}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 Ts{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 Os(t.label,t.icon,t.onClick,t.closeOnClick,t.key,this);return this._options.push(e),this.handleUpdate(),e}removeOption(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=kn(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}}const H={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 N,ki,Tt,Oi=!1,_t=!1,ae=!1,y=!1,Re=null,Gt=!1;const Pt=typeof window<"u"?window:{},A=Pt.document||{head:{}},Ti=Pt.HTMLElement||class{},m={$flags$:0,$resourcesUrl$:"",jmp:i=>i(),raf:i=>requestAnimationFrame(i),ael:(i,t,e,n)=>i.addEventListener(t,e,n),rel:(i,t,e,n)=>i.removeEventListener(t,e,n),ce:(i,t)=>new CustomEvent(i,t)},Ps=(()=>{let i=!1;try{A.addEventListener("e",null,Object.defineProperty({},"passive",{get(){i=!0}}))}catch{}return i})(),Ls=i=>Promise.resolve(i),Is=(()=>{try{return new CSSStyleSheet,typeof new CSSStyleSheet().replace=="function"}catch{}return!1})(),Pi=(i,t,e,n)=>{e&&e.map(([s,r,o])=>{const a=Us(i,s),l=Rs(t,o),c=Ms(s);m.ael(a,r,l,c),(t.$rmListeners$=t.$rmListeners$||[]).push(()=>m.rel(a,r,l,c))})},Rs=(i,t)=>e=>{try{H.lazyLoad||i.$hostElement$[t](e)}catch(n){ot(n)}},Us=(i,t)=>t&4?A:t&8?Pt:t&16?A.body:i,Ms=i=>Ps?{passive:(i&1)!==0,capture:(i&2)!==0}:(i&2)!==0,Ue="http://www.w3.org/1999/xlink",R=(i,t="")=>()=>{},Me=new WeakMap,js=(i,t,e)=>{let n=St.get(i);Is&&e?(n=n||new CSSStyleSheet,n.replace(t)):n=t,St.set(i,n)},Hs=(i,t,e,n)=>{let s=Li(t,e),r=St.get(s);if(i=i.nodeType===11?i:A,r)if(typeof r=="string"){i=i.head||i;let o=Me.get(i),a;o||Me.set(i,o=new Set),o.has(s)||(a=A.createElement("style"),a.innerHTML=r,i.insertBefore(a,i.querySelector("link")),o&&o.add(s))}else i.adoptedStyleSheets.includes(r)||(i.adoptedStyleSheets=[...i.adoptedStyleSheets,r]);return s},Ns=i=>{const t=i.$cmpMeta$,e=i.$hostElement$,n=t.$flags$,s=R("attachStyles",t.$tagName$),r=Hs(e.shadowRoot?e.shadowRoot:e.getRootNode(),t,i.$modeName$);n&10&&(e["s-sc"]=r,e.classList.add(r+"-h"),n&2&&e.classList.add(r+"-s")),s()},Li=(i,t)=>"sc-"+(t&&i.$flags$&32?i.$tagName$+"-"+t:i.$tagName$),Ds=i=>pr.map(t=>t(i)).find(t=>!!t),je={},Bs="http://www.w3.org/2000/svg",zs="http://www.w3.org/1999/xhtml",Fs=i=>i!=null,le=i=>(i=typeof i,i==="object"||i==="function"),z=(i,t,...e)=>{let n=null,s=null,r=null,o=!1,a=!1,l=[];const c=h=>{for(let d=0;d<h.length;d++)n=h[d],Array.isArray(n)?c(n):n!=null&&typeof n!="boolean"&&((o=typeof i!="function"&&!le(n))&&(n=String(n)),o&&a?l[l.length-1].$text$+=n:l.push(o?wt(null,n):n),a=o)};if(c(e),t){t.key&&(s=t.key),t.name&&(r=t.name);{const h=t.className||t.class;h&&(t.class=typeof h!="object"?h:Object.keys(h).filter(d=>h[d]).join(" "))}}if(typeof i=="function")return i(t===null?{}:t,l,Ys);const u=wt(i,null);return u.$attrs$=t,l.length>0&&(u.$children$=l),u.$key$=s,u.$name$=r,u},wt=(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},ce={},Ws=i=>i&&i.$tag$===ce,Ys={forEach:(i,t)=>i.map(He).forEach(t),map:(i,t)=>i.map(He).map(t).map(qs)},He=i=>({vattrs:i.$attrs$,vchildren:i.$children$,vkey:i.$key$,vname:i.$name$,vtag:i.$tag$,vtext:i.$text$}),qs=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),z(i.vtag,e,...i.vchildren||[])}const t=wt(i.vtag,i.vtext);return t.$attrs$=i.vattrs,t.$children$=i.vchildren,t.$key$=i.vkey,t.$name$=i.vname,t},Ne=(i,t,e,n,s,r)=>{if(e!==n){let o=Fe(i,t),a=t.toLowerCase();if(t==="class"){const l=i.classList,c=De(e),u=De(n);l.remove(...c.filter(h=>h&&!u.includes(h))),l.add(...u.filter(h=>h&&!c.includes(h)))}else if(t==="style"){for(const l in e)(!n||n[l]==null)&&(l.includes("-")?i.style.removeProperty(l):i.style[l]="");for(const l in n)(!e||n[l]!==e[l])&&(l.includes("-")?i.style.setProperty(l,n[l]):i.style[l]=n[l])}else if(t!=="key")if(t==="ref")n&&n(i);else if(!i.__lookupSetter__(t)&&t[0]==="o"&&t[1]==="n")t[2]==="-"?t=t.slice(3):Fe(Pt,a)?t=a.slice(2):t=a[2]+t.slice(3),e&&m.rel(i,t,e,!1),n&&m.ael(i,t,n,!1);else{const l=le(n);if((o||l&&n!==null)&&!s)try{if(i.tagName.includes("-"))i[t]=n;else{let u=n??"";t==="list"?o=!1:(e==null||i[t]!=u)&&(i[t]=u)}}catch{}let c=!1;a!==(a=a.replace(/^xlink\:?/,""))&&(t=a,c=!0),n==null||n===!1?(n!==!1||i.getAttribute(t)==="")&&(c?i.removeAttributeNS(Ue,t):i.removeAttribute(t)):(!o||r&4||s)&&!l&&(n=n===!0?"":n,c?i.setAttributeNS(Ue,t,n):i.setAttribute(t,n))}}},Gs=/\s/,De=i=>i?i.split(Gs):[],Ii=(i,t,e,n)=>{const s=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,r=i&&i.$attrs$||je,o=t.$attrs$||je;for(n in r)n in o||Ne(s,n,r[n],void 0,e,t.$flags$);for(n in o)Ne(s,n,r[n],o[n],e,t.$flags$)},xt=(i,t,e,n)=>{let s=t.$children$[e],r=0,o,a,l;if(Oi||(ae=!0,s.$tag$==="slot"&&(N&&n.classList.add(N+"-s"),s.$flags$|=s.$children$?2:1)),s.$text$!==null)o=s.$elm$=A.createTextNode(s.$text$);else if(s.$flags$&1)o=s.$elm$=A.createTextNode("");else{if(y||(y=s.$tag$==="svg"),o=s.$elm$=A.createElementNS(y?Bs:zs,s.$flags$&2?"slot-fb":s.$tag$),y&&s.$tag$==="foreignObject"&&(y=!1),Ii(null,s,y),Fs(N)&&o["s-si"]!==N&&o.classList.add(o["s-si"]=N),s.$children$)for(r=0;r<s.$children$.length;++r)a=xt(i,s,r,o),a&&o.appendChild(a);s.$tag$==="svg"?y=!1:o.tagName==="foreignObject"&&(y=!0)}return o["s-hn"]=Tt,s.$flags$&3&&(o["s-sr"]=!0,o["s-cr"]=ki,o["s-sn"]=s.$name$||"",l=i&&i.$children$&&i.$children$[e],l&&l.$tag$===s.$tag$&&i.$elm$&&nt(i.$elm$,!1)),o},nt=(i,t)=>{m.$flags$|=1;const e=i.childNodes;for(let n=e.length-1;n>=0;n--){const s=e[n];s["s-hn"]!==Tt&&s["s-ol"]&&(Mi(s).insertBefore(s,ue(s)),s["s-ol"].remove(),s["s-ol"]=void 0,ae=!0),t&&nt(s,t)}m.$flags$&=-2},Ri=(i,t,e,n,s,r)=>{let o=i["s-cr"]&&i["s-cr"].parentNode||i,a;for(o.shadowRoot&&o.tagName===Tt&&(o=o.shadowRoot);s<=r;++s)n[s]&&(a=xt(null,e,s,i),a&&(n[s].$elm$=a,o.insertBefore(a,ue(t))))},Ui=(i,t,e,n,s)=>{for(;t<=e;++t)(n=i[t])&&(s=n.$elm$,Ni(n),_t=!0,s["s-ol"]?s["s-ol"].remove():nt(s,!0),s.remove())},Zs=(i,t,e,n)=>{let s=0,r=0,o=0,a=0,l=t.length-1,c=t[0],u=t[l],h=n.length-1,d=n[0],f=n[h],$,g;for(;s<=l&&r<=h;)if(c==null)c=t[++s];else if(u==null)u=t[--l];else if(d==null)d=n[++r];else if(f==null)f=n[--h];else if(ut(c,d))D(c,d),c=t[++s],d=n[++r];else if(ut(u,f))D(u,f),u=t[--l],f=n[--h];else if(ut(c,f))(c.$tag$==="slot"||f.$tag$==="slot")&&nt(c.$elm$.parentNode,!1),D(c,f),i.insertBefore(c.$elm$,u.$elm$.nextSibling),c=t[++s],f=n[--h];else if(ut(u,d))(c.$tag$==="slot"||f.$tag$==="slot")&&nt(u.$elm$.parentNode,!1),D(u,d),i.insertBefore(u.$elm$,c.$elm$),u=t[--l],d=n[++r];else{for(o=-1,a=s;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$?$=xt(t&&t[r],e,o,i):(D(g,d),t[o]=void 0,$=g.$elm$),d=n[++r]):($=xt(t&&t[r],e,r,i),d=n[++r]),$&&Mi(c.$elm$).insertBefore($,ue(c.$elm$))}s>l?Ri(i,n[h+1]==null?null:n[h+1].$elm$,e,n,r,h):r>h&&Ui(t,s,l)},ut=(i,t)=>i.$tag$===t.$tag$?i.$tag$==="slot"?i.$name$===t.$name$:i.$key$===t.$key$:!1,ue=i=>i&&i["s-ol"]||i,Mi=i=>(i["s-ol"]?i["s-ol"]:i).parentNode,D=(i,t)=>{const e=t.$elm$=i.$elm$,n=i.$children$,s=t.$children$,r=t.$tag$,o=t.$text$;let a;o===null?(y=r==="svg"?!0:r==="foreignObject"?!1:y,r==="slot"||Ii(i,t,y),n!==null&&s!==null?Zs(e,n,t,s):s!==null?(i.$text$!==null&&(e.textContent=""),Ri(e,null,t,s,0,s.length-1)):n!==null&&Ui(n,0,n.length-1),y&&r==="svg"&&(y=!1)):(a=e["s-cr"])?a.parentNode.textContent=o:i.$text$!==o&&(e.data=o)},ji=i=>{let t=i.childNodes,e,n,s,r,o,a;for(n=0,s=t.length;n<s;n++)if(e=t[n],e.nodeType===1){if(e["s-sr"]){for(o=e["s-sn"],e.hidden=!1,r=0;r<s;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}}ji(e)}},x=[],Hi=i=>{let t,e,n,s,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(n=e.parentNode.childNodes,s=t["s-sn"],o=n.length-1;o>=0;o--)e=n[o],!e["s-cn"]&&!e["s-nr"]&&e["s-hn"]!==t["s-hn"]&&(Be(e,s)?(r=x.find(u=>u.$nodeToRelocate$===e),_t=!0,e["s-sn"]=e["s-sn"]||s,r?r.$slotRefNode$=t:x.push({$slotRefNode$:t,$nodeToRelocate$:e}),e["s-sr"]&&x.map(u=>{Be(u.$nodeToRelocate$,e["s-sn"])&&(r=x.find(h=>h.$nodeToRelocate$===e),r&&!u.$slotRefNode$&&(u.$slotRefNode$=r.$slotRefNode$))})):x.some(u=>u.$nodeToRelocate$===e)||x.push({$nodeToRelocate$:e}));t.nodeType===1&&Hi(t)}},Be=(i,t)=>i.nodeType===1?i.getAttribute("slot")===null&&t===""||i.getAttribute("slot")===t:i["s-sn"]===t?!0:t==="",Ni=i=>{i.$attrs$&&i.$attrs$.ref&&i.$attrs$.ref(null),i.$children$&&i.$children$.map(Ni)},Ks=(i,t)=>{const e=i.$hostElement$,n=i.$cmpMeta$,s=i.$vnode$||wt(null,null),r=Ws(t)?t:z(null,null,t);Tt=e.tagName,n.$attrsToReflect$&&(r.$attrs$=r.$attrs$||{},n.$attrsToReflect$.map(([o,a])=>r.$attrs$[a]=e[o])),r.$tag$=null,r.$flags$|=4,i.$vnode$=r,r.$elm$=s.$elm$=e.shadowRoot||e,N=e["s-sc"],ki=e["s-cr"],Oi=(n.$flags$&1)!==0,_t=!1,D(s,r);{if(m.$flags$|=1,ae){Hi(r.$elm$);let o,a,l,c,u,h,d=0;for(;d<x.length;d++)o=x[d],a=o.$nodeToRelocate$,a["s-ol"]||(l=A.createTextNode(""),l["s-nr"]=a,a.parentNode.insertBefore(a["s-ol"]=l,a));for(d=0;d<x.length;d++)if(o=x[d],a=o.$nodeToRelocate$,o.$slotRefNode$){for(c=o.$slotRefNode$.parentNode,u=o.$slotRefNode$.nextSibling,l=a["s-ol"];l=l.previousSibling;)if(h=l["s-nr"],h&&h["s-sn"]===a["s-sn"]&&c===h.parentNode&&(h=h.nextSibling,!h||!h["s-nr"])){u=h;break}(!u&&c!==a.parentNode||a.nextSibling!==u)&&a!==u&&(!a["s-hn"]&&a["s-ol"]&&(a["s-hn"]=a["s-ol"].parentNode.nodeName),c.insertBefore(a,u))}else a.nodeType===1&&(a.hidden=!0)}_t&&ji(r.$elm$),m.$flags$&=-2,x.length=0}},Qs=i=>i,Xs=(i,t,e)=>{const n=Qs(i);return{emit:s=>Js(n,t,{bubbles:!!(e&4),composed:!!(e&2),cancelable:!!(e&1),detail:s})}},Js=(i,t,e)=>{const n=m.ce(t,e);return i.dispatchEvent(n),n},Vs=(i,t)=>{},Di=(i,t)=>(i.$flags$|=16,Vs(i,i.$ancestorComponent$),vr(()=>tr(i,t))),tr=(i,t)=>{const e=i.$hostElement$,n=R("scheduleUpdate",i.$cmpMeta$.$tagName$),s=e;let r;return t?r=F(s,"componentWillLoad"):r=F(s,"componentWillUpdate"),r=ze(r,()=>F(s,"componentWillRender")),n(),ze(r,()=>er(i,s,t))},er=async(i,t,e)=>{const n=i.$hostElement$,s=R("update",i.$cmpMeta$.$tagName$);n["s-rc"],e&&Ns(i);const r=R("render",i.$cmpMeta$.$tagName$);ir(i,t,n),r(),s(),nr(i)},ir=(i,t,e)=>{try{Re=t,t=t.render&&t.render(),i.$flags$&=-17,i.$flags$|=2,(H.hasRenderFn||H.reflect)&&(H.vdomRender||H.reflect)&&(H.hydrateServerSide||Ks(i,t))}catch(a){ot(a,i.$hostElement$)}return Re=null,null},nr=i=>{const t=i.$cmpMeta$.$tagName$,e=i.$hostElement$,n=R("postUpdate",t),s=e;i.$ancestorComponent$,F(s,"componentDidRender"),i.$flags$&64?(F(s,"componentDidUpdate"),n()):(i.$flags$|=64,F(s,"componentDidLoad"),n())},F=(i,t,e)=>{if(i&&i[t])try{return i[t](e)}catch(n){ot(n)}},ze=(i,t)=>i&&i.then?i.then(t):t(),sr=(i,t)=>i!=null&&!le(i)?t&4?i==="false"?!1:i===""||!!i:t&2?parseFloat(i):t&1?String(i):i:i,rr=(i,t)=>Lt(i).$instanceValues$.get(t),or=(i,t,e,n)=>{const s=Lt(i),r=i,o=s.$instanceValues$.get(t),a=s.$flags$,l=r;e=sr(e,n.$members$[t][0]);const c=Number.isNaN(o)&&Number.isNaN(e);if(e!==o&&!c){s.$instanceValues$.set(t,e);{if(n.$watchers$&&a&128){const h=n.$watchers$[t];h&&h.map(d=>{try{l[d](e,o,t)}catch(f){ot(f,r)}})}if((a&18)===2){if(l.componentShouldUpdate&&l.componentShouldUpdate(e,o,t)===!1)return;Di(s,!1)}}}},ar=(i,t,e)=>{if(t.$members$){i.watchers&&(t.$watchers$=i.watchers);const n=Object.entries(t.$members$),s=i.prototype;n.map(([r,[o]])=>{(o&31||o&32)&&Object.defineProperty(s,r,{get(){return rr(this,r)},set(a){or(this,r,a,t)},configurable:!0,enumerable:!0})});{const r=new Map;s.attributeChangedCallback=function(o,a,l){m.jmp(()=>{const c=r.get(o);if(this.hasOwnProperty(c))l=this[c],delete this[c];else if(s.hasOwnProperty(c)&&typeof this[c]=="number"&&this[c]==l)return;this[c]=l===null&&typeof this[c]=="boolean"?!1:l})},i.observedAttributes=n.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},lr=async(i,t,e,n,s)=>{if(!(t.$flags$&32)&&(s=i.constructor,t.$flags$|=32,customElements.whenDefined(e.$tagName$).then(()=>t.$flags$|=128),s.style)){let o=s.style;typeof o!="string"&&(o=o[t.$modeName$=Ds(i)]);const a=Li(e,t.$modeName$);if(!St.has(a)){const l=R("registerStyles",e.$tagName$);js(a,o,!!(e.$flags$&1)),l()}}t.$ancestorComponent$,(()=>Di(t,!0))()},cr=i=>{},ur=i=>{if(!(m.$flags$&1)){const t=Lt(i),e=t.$cmpMeta$,n=R("connectedCallback",e.$tagName$);t.$flags$&1?(Pi(i,t,e.$listeners$),cr(t.$lazyInstance$)):(t.$flags$|=1,e.$flags$&12&&hr(i),e.$members$&&Object.entries(e.$members$).map(([s,[r]])=>{if(r&31&&i.hasOwnProperty(s)){const o=i[s];delete i[s],i[s]=o}}),lr(i,t,e)),n()}},hr=i=>{const t=i["s-cr"]=A.createComment("");t["s-cn"]=!0,i.insertBefore(t,i.firstChild)},dr=i=>{if(!(m.$flags$&1)){const t=Lt(i);t.$rmListeners$&&(t.$rmListeners$.map(e=>e()),t.$rmListeners$=void 0)}},Bi=(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 n=i.prototype.connectedCallback,s=i.prototype.disconnectedCallback;return Object.assign(i.prototype,{__registerHost(){fr(this,e)},connectedCallback(){ur(this),n&&n.call(this)},disconnectedCallback(){dr(this),s&&s.call(this)},__attachShadow(){this.attachShadow({mode:"open",delegatesFocus:!!(e.$flags$&16)})}}),i.is=e.$tagName$,ar(i,e)},zi=new WeakMap,Lt=i=>zi.get(i),fr=(i,t)=>{const e={$flags$:0,$hostElement$:i,$cmpMeta$:t,$instanceValues$:new Map};return Pi(i,e,t.$listeners$),zi.set(i,e)},Fe=(i,t)=>t in i,ot=(i,t)=>(0,console.error)(i,t),St=new Map,pr=[],We=[],Fi=[],gr=(i,t)=>e=>{i.push(e),Gt||(Gt=!0,t&&m.$flags$&4?$r(Zt):m.raf(Zt))},Ye=i=>{for(let t=0;t<i.length;t++)try{i[t](performance.now())}catch(e){ot(e)}i.length=0},Zt=()=>{Ye(We),Ye(Fi),(Gt=We.length>0)&&m.raf(Zt)},$r=i=>Ls().then(i),vr=gr(Fi,!0),mr=(i={})=>{const{content:t="",title:e,attributes:n=[]}=i;let s="",r=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},...n];return e&&(s=`<title>${e}</title>`),`<svg ${r.map(a=>`${a.name}="${a.value}"`).join(" ")}>${s}${t}</svg>`},yr=i=>i.replace(/<(\/?)svg([^>]*)>/g,"").trim();function br(i){return`${i.getFullYear()}.${i.getMonth()+1}`}class _r{constructor(t){this.voca_component=t,this.voca_added=br(new Date)}}const wr="telia-vst{display:none}",xr=Bi(class extends Ti{constructor(){super(),this.__registerHost(),this.vocaInternalUStats=Xs(this,"vocaInternalUStats",7)}connectedCallback(){this.vocaInternalUStats.emit(new _r(this.dataTrackingId))}render(){return z(ce,null)}static get style(){return wr}},[0,"telia-vst",{dataTrackingId:[1,"data-tracking-id"]}]);function Wi(){if(typeof customElements>"u")return;["telia-vst"].forEach(t=>{switch(t){case"telia-vst":customElements.get(t)||customElements.define(t,xr);break}})}Wi();function Kt(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{vocadsIcons:void 0,vocadsIconsRegistered:!1}}function Sr(){if(typeof Kt().vocadsIcons!==void 0)return Kt().vocadsIcons}function Ar(){return Kt().vocadsIconsRegistered}const Cr=".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))}",Er=Bi(class extends Ti{constructor(){super(),this.__registerHost(),this.size="md",this.allyTitle=null,this.dataTrackingId="telia-icon"}getSvgString(){if(this.svg)return this.svg;if(Ar()&&this.name){const i=Sr();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=mr({content:yr(i),attributes:t,title:this.allyTitle});return z(ce,{class:`telia-icon telia-icon--${this.size}`},z("span",{"aria-label":this.allyTitle,class:"telia-icon__container",innerHTML:e}),z("telia-vst",{dataTrackingId:this.dataTrackingId}))}static get style(){return Cr}},[0,"telia-icon",{name:[1],svg:[1],size:[1],allyTitle:[1,"ally-title"],dataTestid:[1,"data-testid"]}]);function kr(){if(typeof customElements>"u")return;["telia-icon","telia-vst"].forEach(t=>{switch(t){case"telia-icon":customElements.get(t)||customElements.define(t,Er);break;case"telia-vst":customElements.get(t)||Wi();break}})}kr();var Or=Object.defineProperty,Tr=Object.getOwnPropertyDescriptor,Pr=(i,t,e,n)=>{for(var s=n>1?void 0:n?Tr(t,e):t,r=i.length-1,o;r>=0;r--)(o=i[r])&&(s=(n?o(t,e,s):o(s))||s);return n&&s&&Or(t,e,s),s};const Yi=Ci(S);class It extends Yi{constructor(){super(...arguments),this.optionsIsVisible=!1,this.options=new Ts(this),this.optionsRef=yt(),this.optionsTriggerRef=yt(),this._onClickOutside=t=>{!this.optionsTriggerRef.value||!this.optionsRef.value||t.composedPath().includes(this.optionsTriggerRef.value)||t.composedPath().includes(this.optionsRef.value)||(this.optionsIsVisible=!1)}}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()}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._onClickOutside)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._onClickOutside)}render(){var r;const t=this.application.branding(),e=(r=t==null?void 0:t.graphics)==null?void 0:r.logotype,n=this.application.texts,s=n.get("widget-header.header","ACE Widget");return _` <div class="widget-header">
377
+ `];oe([b({attribute:!0})],rt.prototype,"name",2);oe([Z()],rt.prototype,"widget",2);oe([Z()],rt.prototype,"status",2);customElements.get("ace-trigger-slot")||customElements.define("ace-trigger-slot",ee);customElements.get("ace-trigger")||customElements.define("ace-trigger",M);customElements.get("ace-unresolved-component")||customElements.define("ace-unresolved-component",Ei);customElements.get("ace-wrapper")||customElements.define("ace-wrapper",re);customElements.get("ace-widget")||customElements.define("ace-widget",rt);const ks=()=>crypto.randomUUID();class Os{constructor(t,e,n,s,r,o,a=!0){this.label=t,this.icon=e,this.onClick=n,this.closeOnClick=s,this.key=r,this.update=new Et,this.id=ks(),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 Ts{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 Os(t.label,t.icon,t.onClick,t.closeOnClick,t.key,this);return this._options.push(e),this.handleUpdate(),e}removeOption(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=kn(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}}const H={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 N,ki,Tt,Oi=!1,_t=!1,ae=!1,y=!1,Re=null,Gt=!1;const Pt=typeof window<"u"?window:{},A=Pt.document||{head:{}},Ti=Pt.HTMLElement||class{},m={$flags$:0,$resourcesUrl$:"",jmp:i=>i(),raf:i=>requestAnimationFrame(i),ael:(i,t,e,n)=>i.addEventListener(t,e,n),rel:(i,t,e,n)=>i.removeEventListener(t,e,n),ce:(i,t)=>new CustomEvent(i,t)},Ps=(()=>{let i=!1;try{A.addEventListener("e",null,Object.defineProperty({},"passive",{get(){i=!0}}))}catch{}return i})(),Ls=i=>Promise.resolve(i),Is=(()=>{try{return new CSSStyleSheet,typeof new CSSStyleSheet().replace=="function"}catch{}return!1})(),Pi=(i,t,e,n)=>{e&&e.map(([s,r,o])=>{const a=Us(i,s),l=Rs(t,o),c=Ms(s);m.ael(a,r,l,c),(t.$rmListeners$=t.$rmListeners$||[]).push(()=>m.rel(a,r,l,c))})},Rs=(i,t)=>e=>{try{H.lazyLoad||i.$hostElement$[t](e)}catch(n){ot(n)}},Us=(i,t)=>t&4?A:t&8?Pt:t&16?A.body:i,Ms=i=>Ps?{passive:(i&1)!==0,capture:(i&2)!==0}:(i&2)!==0,Ue="http://www.w3.org/1999/xlink",R=(i,t="")=>()=>{},Me=new WeakMap,js=(i,t,e)=>{let n=St.get(i);Is&&e?(n=n||new CSSStyleSheet,n.replace(t)):n=t,St.set(i,n)},Hs=(i,t,e,n)=>{let s=Li(t,e),r=St.get(s);if(i=i.nodeType===11?i:A,r)if(typeof r=="string"){i=i.head||i;let o=Me.get(i),a;o||Me.set(i,o=new Set),o.has(s)||(a=A.createElement("style"),a.innerHTML=r,i.insertBefore(a,i.querySelector("link")),o&&o.add(s))}else i.adoptedStyleSheets.includes(r)||(i.adoptedStyleSheets=[...i.adoptedStyleSheets,r]);return s},Ns=i=>{const t=i.$cmpMeta$,e=i.$hostElement$,n=t.$flags$,s=R("attachStyles",t.$tagName$),r=Hs(e.shadowRoot?e.shadowRoot:e.getRootNode(),t,i.$modeName$);n&10&&(e["s-sc"]=r,e.classList.add(r+"-h"),n&2&&e.classList.add(r+"-s")),s()},Li=(i,t)=>"sc-"+(t&&i.$flags$&32?i.$tagName$+"-"+t:i.$tagName$),Ds=i=>pr.map(t=>t(i)).find(t=>!!t),je={},Bs="http://www.w3.org/2000/svg",zs="http://www.w3.org/1999/xhtml",Fs=i=>i!=null,le=i=>(i=typeof i,i==="object"||i==="function"),z=(i,t,...e)=>{let n=null,s=null,r=null,o=!1,a=!1,l=[];const c=h=>{for(let d=0;d<h.length;d++)n=h[d],Array.isArray(n)?c(n):n!=null&&typeof n!="boolean"&&((o=typeof i!="function"&&!le(n))&&(n=String(n)),o&&a?l[l.length-1].$text$+=n:l.push(o?wt(null,n):n),a=o)};if(c(e),t){t.key&&(s=t.key),t.name&&(r=t.name);{const h=t.className||t.class;h&&(t.class=typeof h!="object"?h:Object.keys(h).filter(d=>h[d]).join(" "))}}if(typeof i=="function")return i(t===null?{}:t,l,Ys);const u=wt(i,null);return u.$attrs$=t,l.length>0&&(u.$children$=l),u.$key$=s,u.$name$=r,u},wt=(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},ce={},Ws=i=>i&&i.$tag$===ce,Ys={forEach:(i,t)=>i.map(He).forEach(t),map:(i,t)=>i.map(He).map(t).map(qs)},He=i=>({vattrs:i.$attrs$,vchildren:i.$children$,vkey:i.$key$,vname:i.$name$,vtag:i.$tag$,vtext:i.$text$}),qs=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),z(i.vtag,e,...i.vchildren||[])}const t=wt(i.vtag,i.vtext);return t.$attrs$=i.vattrs,t.$children$=i.vchildren,t.$key$=i.vkey,t.$name$=i.vname,t},Ne=(i,t,e,n,s,r)=>{if(e!==n){let o=Fe(i,t),a=t.toLowerCase();if(t==="class"){const l=i.classList,c=De(e),u=De(n);l.remove(...c.filter(h=>h&&!u.includes(h))),l.add(...u.filter(h=>h&&!c.includes(h)))}else if(t==="style"){for(const l in e)(!n||n[l]==null)&&(l.includes("-")?i.style.removeProperty(l):i.style[l]="");for(const l in n)(!e||n[l]!==e[l])&&(l.includes("-")?i.style.setProperty(l,n[l]):i.style[l]=n[l])}else if(t!=="key")if(t==="ref")n&&n(i);else if(!i.__lookupSetter__(t)&&t[0]==="o"&&t[1]==="n")t[2]==="-"?t=t.slice(3):Fe(Pt,a)?t=a.slice(2):t=a[2]+t.slice(3),e&&m.rel(i,t,e,!1),n&&m.ael(i,t,n,!1);else{const l=le(n);if((o||l&&n!==null)&&!s)try{if(i.tagName.includes("-"))i[t]=n;else{let u=n??"";t==="list"?o=!1:(e==null||i[t]!=u)&&(i[t]=u)}}catch{}let c=!1;a!==(a=a.replace(/^xlink\:?/,""))&&(t=a,c=!0),n==null||n===!1?(n!==!1||i.getAttribute(t)==="")&&(c?i.removeAttributeNS(Ue,t):i.removeAttribute(t)):(!o||r&4||s)&&!l&&(n=n===!0?"":n,c?i.setAttributeNS(Ue,t,n):i.setAttribute(t,n))}}},Gs=/\s/,De=i=>i?i.split(Gs):[],Ii=(i,t,e,n)=>{const s=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,r=i&&i.$attrs$||je,o=t.$attrs$||je;for(n in r)n in o||Ne(s,n,r[n],void 0,e,t.$flags$);for(n in o)Ne(s,n,r[n],o[n],e,t.$flags$)},xt=(i,t,e,n)=>{let s=t.$children$[e],r=0,o,a,l;if(Oi||(ae=!0,s.$tag$==="slot"&&(N&&n.classList.add(N+"-s"),s.$flags$|=s.$children$?2:1)),s.$text$!==null)o=s.$elm$=A.createTextNode(s.$text$);else if(s.$flags$&1)o=s.$elm$=A.createTextNode("");else{if(y||(y=s.$tag$==="svg"),o=s.$elm$=A.createElementNS(y?Bs:zs,s.$flags$&2?"slot-fb":s.$tag$),y&&s.$tag$==="foreignObject"&&(y=!1),Ii(null,s,y),Fs(N)&&o["s-si"]!==N&&o.classList.add(o["s-si"]=N),s.$children$)for(r=0;r<s.$children$.length;++r)a=xt(i,s,r,o),a&&o.appendChild(a);s.$tag$==="svg"?y=!1:o.tagName==="foreignObject"&&(y=!0)}return o["s-hn"]=Tt,s.$flags$&3&&(o["s-sr"]=!0,o["s-cr"]=ki,o["s-sn"]=s.$name$||"",l=i&&i.$children$&&i.$children$[e],l&&l.$tag$===s.$tag$&&i.$elm$&&nt(i.$elm$,!1)),o},nt=(i,t)=>{m.$flags$|=1;const e=i.childNodes;for(let n=e.length-1;n>=0;n--){const s=e[n];s["s-hn"]!==Tt&&s["s-ol"]&&(Mi(s).insertBefore(s,ue(s)),s["s-ol"].remove(),s["s-ol"]=void 0,ae=!0),t&&nt(s,t)}m.$flags$&=-2},Ri=(i,t,e,n,s,r)=>{let o=i["s-cr"]&&i["s-cr"].parentNode||i,a;for(o.shadowRoot&&o.tagName===Tt&&(o=o.shadowRoot);s<=r;++s)n[s]&&(a=xt(null,e,s,i),a&&(n[s].$elm$=a,o.insertBefore(a,ue(t))))},Ui=(i,t,e,n,s)=>{for(;t<=e;++t)(n=i[t])&&(s=n.$elm$,Ni(n),_t=!0,s["s-ol"]?s["s-ol"].remove():nt(s,!0),s.remove())},Zs=(i,t,e,n)=>{let s=0,r=0,o=0,a=0,l=t.length-1,c=t[0],u=t[l],h=n.length-1,d=n[0],f=n[h],$,g;for(;s<=l&&r<=h;)if(c==null)c=t[++s];else if(u==null)u=t[--l];else if(d==null)d=n[++r];else if(f==null)f=n[--h];else if(ut(c,d))D(c,d),c=t[++s],d=n[++r];else if(ut(u,f))D(u,f),u=t[--l],f=n[--h];else if(ut(c,f))(c.$tag$==="slot"||f.$tag$==="slot")&&nt(c.$elm$.parentNode,!1),D(c,f),i.insertBefore(c.$elm$,u.$elm$.nextSibling),c=t[++s],f=n[--h];else if(ut(u,d))(c.$tag$==="slot"||f.$tag$==="slot")&&nt(u.$elm$.parentNode,!1),D(u,d),i.insertBefore(u.$elm$,c.$elm$),u=t[--l],d=n[++r];else{for(o=-1,a=s;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$?$=xt(t&&t[r],e,o,i):(D(g,d),t[o]=void 0,$=g.$elm$),d=n[++r]):($=xt(t&&t[r],e,r,i),d=n[++r]),$&&Mi(c.$elm$).insertBefore($,ue(c.$elm$))}s>l?Ri(i,n[h+1]==null?null:n[h+1].$elm$,e,n,r,h):r>h&&Ui(t,s,l)},ut=(i,t)=>i.$tag$===t.$tag$?i.$tag$==="slot"?i.$name$===t.$name$:i.$key$===t.$key$:!1,ue=i=>i&&i["s-ol"]||i,Mi=i=>(i["s-ol"]?i["s-ol"]:i).parentNode,D=(i,t)=>{const e=t.$elm$=i.$elm$,n=i.$children$,s=t.$children$,r=t.$tag$,o=t.$text$;let a;o===null?(y=r==="svg"?!0:r==="foreignObject"?!1:y,r==="slot"||Ii(i,t,y),n!==null&&s!==null?Zs(e,n,t,s):s!==null?(i.$text$!==null&&(e.textContent=""),Ri(e,null,t,s,0,s.length-1)):n!==null&&Ui(n,0,n.length-1),y&&r==="svg"&&(y=!1)):(a=e["s-cr"])?a.parentNode.textContent=o:i.$text$!==o&&(e.data=o)},ji=i=>{let t=i.childNodes,e,n,s,r,o,a;for(n=0,s=t.length;n<s;n++)if(e=t[n],e.nodeType===1){if(e["s-sr"]){for(o=e["s-sn"],e.hidden=!1,r=0;r<s;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}}ji(e)}},x=[],Hi=i=>{let t,e,n,s,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(n=e.parentNode.childNodes,s=t["s-sn"],o=n.length-1;o>=0;o--)e=n[o],!e["s-cn"]&&!e["s-nr"]&&e["s-hn"]!==t["s-hn"]&&(Be(e,s)?(r=x.find(u=>u.$nodeToRelocate$===e),_t=!0,e["s-sn"]=e["s-sn"]||s,r?r.$slotRefNode$=t:x.push({$slotRefNode$:t,$nodeToRelocate$:e}),e["s-sr"]&&x.map(u=>{Be(u.$nodeToRelocate$,e["s-sn"])&&(r=x.find(h=>h.$nodeToRelocate$===e),r&&!u.$slotRefNode$&&(u.$slotRefNode$=r.$slotRefNode$))})):x.some(u=>u.$nodeToRelocate$===e)||x.push({$nodeToRelocate$:e}));t.nodeType===1&&Hi(t)}},Be=(i,t)=>i.nodeType===1?i.getAttribute("slot")===null&&t===""||i.getAttribute("slot")===t:i["s-sn"]===t?!0:t==="",Ni=i=>{i.$attrs$&&i.$attrs$.ref&&i.$attrs$.ref(null),i.$children$&&i.$children$.map(Ni)},Ks=(i,t)=>{const e=i.$hostElement$,n=i.$cmpMeta$,s=i.$vnode$||wt(null,null),r=Ws(t)?t:z(null,null,t);Tt=e.tagName,n.$attrsToReflect$&&(r.$attrs$=r.$attrs$||{},n.$attrsToReflect$.map(([o,a])=>r.$attrs$[a]=e[o])),r.$tag$=null,r.$flags$|=4,i.$vnode$=r,r.$elm$=s.$elm$=e.shadowRoot||e,N=e["s-sc"],ki=e["s-cr"],Oi=(n.$flags$&1)!==0,_t=!1,D(s,r);{if(m.$flags$|=1,ae){Hi(r.$elm$);let o,a,l,c,u,h,d=0;for(;d<x.length;d++)o=x[d],a=o.$nodeToRelocate$,a["s-ol"]||(l=A.createTextNode(""),l["s-nr"]=a,a.parentNode.insertBefore(a["s-ol"]=l,a));for(d=0;d<x.length;d++)if(o=x[d],a=o.$nodeToRelocate$,o.$slotRefNode$){for(c=o.$slotRefNode$.parentNode,u=o.$slotRefNode$.nextSibling,l=a["s-ol"];l=l.previousSibling;)if(h=l["s-nr"],h&&h["s-sn"]===a["s-sn"]&&c===h.parentNode&&(h=h.nextSibling,!h||!h["s-nr"])){u=h;break}(!u&&c!==a.parentNode||a.nextSibling!==u)&&a!==u&&(!a["s-hn"]&&a["s-ol"]&&(a["s-hn"]=a["s-ol"].parentNode.nodeName),c.insertBefore(a,u))}else a.nodeType===1&&(a.hidden=!0)}_t&&ji(r.$elm$),m.$flags$&=-2,x.length=0}},Qs=i=>i,Xs=(i,t,e)=>{const n=Qs(i);return{emit:s=>Js(n,t,{bubbles:!!(e&4),composed:!!(e&2),cancelable:!!(e&1),detail:s})}},Js=(i,t,e)=>{const n=m.ce(t,e);return i.dispatchEvent(n),n},Vs=(i,t)=>{},Di=(i,t)=>(i.$flags$|=16,Vs(i,i.$ancestorComponent$),vr(()=>tr(i,t))),tr=(i,t)=>{const e=i.$hostElement$,n=R("scheduleUpdate",i.$cmpMeta$.$tagName$),s=e;let r;return t?r=F(s,"componentWillLoad"):r=F(s,"componentWillUpdate"),r=ze(r,()=>F(s,"componentWillRender")),n(),ze(r,()=>er(i,s,t))},er=async(i,t,e)=>{const n=i.$hostElement$,s=R("update",i.$cmpMeta$.$tagName$);n["s-rc"],e&&Ns(i);const r=R("render",i.$cmpMeta$.$tagName$);ir(i,t,n),r(),s(),nr(i)},ir=(i,t,e)=>{try{Re=t,t=t.render&&t.render(),i.$flags$&=-17,i.$flags$|=2,(H.hasRenderFn||H.reflect)&&(H.vdomRender||H.reflect)&&(H.hydrateServerSide||Ks(i,t))}catch(a){ot(a,i.$hostElement$)}return Re=null,null},nr=i=>{const t=i.$cmpMeta$.$tagName$,e=i.$hostElement$,n=R("postUpdate",t),s=e;i.$ancestorComponent$,F(s,"componentDidRender"),i.$flags$&64?(F(s,"componentDidUpdate"),n()):(i.$flags$|=64,F(s,"componentDidLoad"),n())},F=(i,t,e)=>{if(i&&i[t])try{return i[t](e)}catch(n){ot(n)}},ze=(i,t)=>i&&i.then?i.then(t):t(),sr=(i,t)=>i!=null&&!le(i)?t&4?i==="false"?!1:i===""||!!i:t&2?parseFloat(i):t&1?String(i):i:i,rr=(i,t)=>Lt(i).$instanceValues$.get(t),or=(i,t,e,n)=>{const s=Lt(i),r=i,o=s.$instanceValues$.get(t),a=s.$flags$,l=r;e=sr(e,n.$members$[t][0]);const c=Number.isNaN(o)&&Number.isNaN(e);if(e!==o&&!c){s.$instanceValues$.set(t,e);{if(n.$watchers$&&a&128){const h=n.$watchers$[t];h&&h.map(d=>{try{l[d](e,o,t)}catch(f){ot(f,r)}})}if((a&18)===2){if(l.componentShouldUpdate&&l.componentShouldUpdate(e,o,t)===!1)return;Di(s,!1)}}}},ar=(i,t,e)=>{if(t.$members$){i.watchers&&(t.$watchers$=i.watchers);const n=Object.entries(t.$members$),s=i.prototype;n.map(([r,[o]])=>{(o&31||o&32)&&Object.defineProperty(s,r,{get(){return rr(this,r)},set(a){or(this,r,a,t)},configurable:!0,enumerable:!0})});{const r=new Map;s.attributeChangedCallback=function(o,a,l){m.jmp(()=>{const c=r.get(o);if(this.hasOwnProperty(c))l=this[c],delete this[c];else if(s.hasOwnProperty(c)&&typeof this[c]=="number"&&this[c]==l)return;this[c]=l===null&&typeof this[c]=="boolean"?!1:l})},i.observedAttributes=n.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},lr=async(i,t,e,n,s)=>{if(!(t.$flags$&32)&&(s=i.constructor,t.$flags$|=32,customElements.whenDefined(e.$tagName$).then(()=>t.$flags$|=128),s.style)){let o=s.style;typeof o!="string"&&(o=o[t.$modeName$=Ds(i)]);const a=Li(e,t.$modeName$);if(!St.has(a)){const l=R("registerStyles",e.$tagName$);js(a,o,!!(e.$flags$&1)),l()}}t.$ancestorComponent$,(()=>Di(t,!0))()},cr=i=>{},ur=i=>{if(!(m.$flags$&1)){const t=Lt(i),e=t.$cmpMeta$,n=R("connectedCallback",e.$tagName$);t.$flags$&1?(Pi(i,t,e.$listeners$),cr(t.$lazyInstance$)):(t.$flags$|=1,e.$flags$&12&&hr(i),e.$members$&&Object.entries(e.$members$).map(([s,[r]])=>{if(r&31&&i.hasOwnProperty(s)){const o=i[s];delete i[s],i[s]=o}}),lr(i,t,e)),n()}},hr=i=>{const t=i["s-cr"]=A.createComment("");t["s-cn"]=!0,i.insertBefore(t,i.firstChild)},dr=i=>{if(!(m.$flags$&1)){const t=Lt(i);t.$rmListeners$&&(t.$rmListeners$.map(e=>e()),t.$rmListeners$=void 0)}},Bi=(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 n=i.prototype.connectedCallback,s=i.prototype.disconnectedCallback;return Object.assign(i.prototype,{__registerHost(){fr(this,e)},connectedCallback(){ur(this),n&&n.call(this)},disconnectedCallback(){dr(this),s&&s.call(this)},__attachShadow(){this.attachShadow({mode:"open",delegatesFocus:!!(e.$flags$&16)})}}),i.is=e.$tagName$,ar(i,e)},zi=new WeakMap,Lt=i=>zi.get(i),fr=(i,t)=>{const e={$flags$:0,$hostElement$:i,$cmpMeta$:t,$instanceValues$:new Map};return Pi(i,e,t.$listeners$),zi.set(i,e)},Fe=(i,t)=>t in i,ot=(i,t)=>(0,console.error)(i,t),St=new Map,pr=[],We=[],Fi=[],gr=(i,t)=>e=>{i.push(e),Gt||(Gt=!0,t&&m.$flags$&4?$r(Zt):m.raf(Zt))},Ye=i=>{for(let t=0;t<i.length;t++)try{i[t](performance.now())}catch(e){ot(e)}i.length=0},Zt=()=>{Ye(We),Ye(Fi),(Gt=We.length>0)&&m.raf(Zt)},$r=i=>Ls().then(i),vr=gr(Fi,!0),mr=(i={})=>{const{content:t="",title:e,attributes:n=[]}=i;let s="",r=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},...n];return e&&(s=`<title>${e}</title>`),`<svg ${r.map(a=>`${a.name}="${a.value}"`).join(" ")}>${s}${t}</svg>`},yr=i=>i.replace(/<(\/?)svg([^>]*)>/g,"").trim();function br(i){return`${i.getFullYear()}.${i.getMonth()+1}`}class _r{constructor(t){this.voca_component=t,this.voca_added=br(new Date)}}const wr="telia-vst{display:none}",xr=Bi(class extends Ti{constructor(){super(),this.__registerHost(),this.vocaInternalUStats=Xs(this,"vocaInternalUStats",7)}connectedCallback(){this.vocaInternalUStats.emit(new _r(this.dataTrackingId))}render(){return z(ce,null)}static get style(){return wr}},[0,"telia-vst",{dataTrackingId:[1,"data-tracking-id"]}]);function Wi(){if(typeof customElements>"u")return;["telia-vst"].forEach(t=>{switch(t){case"telia-vst":customElements.get(t)||customElements.define(t,xr);break}})}Wi();function Kt(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{vocadsIcons:void 0,vocadsIconsRegistered:!1}}function Sr(){if(typeof Kt().vocadsIcons!==void 0)return Kt().vocadsIcons}function Ar(){return Kt().vocadsIconsRegistered}const Cr=".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))}",Er=Bi(class extends Ti{constructor(){super(),this.__registerHost(),this.size="md",this.allyTitle=null,this.dataTrackingId="telia-icon"}getSvgString(){if(this.svg)return this.svg;if(Ar()&&this.name){const i=Sr();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=mr({content:yr(i),attributes:t,title:this.allyTitle});return z(ce,{class:`telia-icon telia-icon--${this.size}`},z("span",{"aria-label":this.allyTitle,class:"telia-icon__container",innerHTML:e}),z("telia-vst",{dataTrackingId:this.dataTrackingId}))}static get style(){return Cr}},[0,"telia-icon",{name:[1],svg:[1],size:[1],allyTitle:[1,"ally-title"],dataTestid:[1,"data-testid"]}]);function kr(){if(typeof customElements>"u")return;["telia-icon","telia-vst"].forEach(t=>{switch(t){case"telia-icon":customElements.get(t)||customElements.define(t,Er);break;case"telia-vst":customElements.get(t)||Wi();break}})}kr();var Or=Object.defineProperty,Tr=Object.getOwnPropertyDescriptor,Pr=(i,t,e,n)=>{for(var s=n>1?void 0:n?Tr(t,e):t,r=i.length-1,o;r>=0;r--)(o=i[r])&&(s=(n?o(t,e,s):o(s))||s);return n&&s&&Or(t,e,s),s};const Yi=Ci(S);class It extends Yi{constructor(){super(...arguments),this.optionsIsVisible=!1,this.options=new Ts(this),this.optionsRef=yt(),this.optionsTriggerRef=yt(),this._onClickOutside=t=>{!this.optionsTriggerRef.value||!this.optionsRef.value||t.composedPath().includes(this.optionsTriggerRef.value)||t.composedPath().includes(this.optionsRef.value)||(this.optionsIsVisible=!1)}}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()}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._onClickOutside)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._onClickOutside)}render(){var r;const t=this.application.branding(),e=(r=t==null?void 0:t.graphics)==null?void 0:r.logotype,n=this.application.texts,s=n.get("widget-header.header","ACE Widget");return _` <div class="widget-header">
378
378
  ${e?_` <img
379
379
  src=${e}
380
380
  class="logotype"
@@ -415,6 +415,7 @@
415
415
  class="options-menu__item"
416
416
  data-testid="${o.key}"
417
417
  @click=${()=>{o.closeOnClick&&this._onToggleOptionsMenuClick(),o.onClick(),this.requestUpdate()}}
418
+ ?disabled="${!o.enabled}"
418
419
  >
419
420
  ${o.icon?_`<telia-icon
420
421
  class="option-icon"
@@ -516,4 +517,9 @@
516
517
  background-color: var(--secondary-background);
517
518
  color: var(--text-on-secondary-background);
518
519
  }
520
+ .options-menu__item:disabled,
521
+ .options-menu__item[disabled] {
522
+ cursor: default;
523
+ pointer-events: none;
524
+ }
519
525
  `];Pr([Z()],It.prototype,"optionsIsVisible",2);exports.WidgetHeader=It;exports.default=It;
@@ -2770,8 +2770,8 @@ customElements.get("ace-wrapper") || customElements.define("ace-wrapper", se);
2770
2770
  customElements.get("ace-widget") || customElements.define("ace-widget", rt);
2771
2771
  const ks = () => crypto.randomUUID();
2772
2772
  class Os {
2773
- constructor(t, e, n, s, r, o) {
2774
- this.label = t, this.icon = e, this.onClick = n, this.closeOnClick = s, this.key = r, this.update = new Et(), this.id = ks(), this._controller = o;
2773
+ constructor(t, e, n, s, r, o, a = !0) {
2774
+ this.label = t, this.icon = e, this.onClick = n, this.closeOnClick = s, this.key = r, this.update = new Et(), this.id = ks(), this._controller = o, this.enabled = a;
2775
2775
  }
2776
2776
  updateLabel(t) {
2777
2777
  this.label = t, this.update.next();
@@ -3540,6 +3540,7 @@ class Yi extends Wi {
3540
3540
  @click=${() => {
3541
3541
  o.closeOnClick && this._onToggleOptionsMenuClick(), o.onClick(), this.requestUpdate();
3542
3542
  }}
3543
+ ?disabled="${!o.enabled}"
3543
3544
  >
3544
3545
  ${o.icon ? _`<telia-icon
3545
3546
  class="option-icon"
@@ -3646,6 +3647,11 @@ Yi.styles = [
3646
3647
  background-color: var(--secondary-background);
3647
3648
  color: var(--text-on-secondary-background);
3648
3649
  }
3650
+ .options-menu__item:disabled,
3651
+ .options-menu__item[disabled] {
3652
+ cursor: default;
3653
+ pointer-events: none;
3654
+ }
3649
3655
  `
3650
3656
  ];
3651
3657
  Pr([
@@ -8,7 +8,8 @@ export declare class WidgetHeaderOption {
8
8
  private update;
9
9
  private _controller;
10
10
  id: `${string}-${string}-${string}-${string}-${string}`;
11
- constructor(label: string, icon: string | null, onClick: () => void, closeOnClick: boolean, key: string, controller: OptionsController);
11
+ enabled: boolean;
12
+ constructor(label: string, icon: string | null, onClick: () => void, closeOnClick: boolean, key: string, controller: OptionsController, enabled?: boolean);
12
13
  updateLabel(value: string): void;
13
14
  updateIcon(value: string): void;
14
15
  remove(): void;