@telia-ace/widget-components-widget-header-flamingo 1.1.49-rc.1 → 1.1.49

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-001912e0.js")))};module.exports=r;
1
+ "use strict";const r=async e=>{e.registerComponent("widget-header",Promise.resolve().then(()=>require("./widget-header-a67e5cd7.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-486680fc.mjs"));
2
+ e.registerComponent("widget-header", import("./widget-header-969a198e.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.49-rc.1",
3
+ "version": "1.1.49",
4
4
  "dependencies": {
5
5
  "lit": "^3.0.2",
6
- "@telia-ace/widget-core-flamingo": "1.1.49-rc.1",
6
+ "@telia-ace/widget-core-flamingo": "1.1.49",
7
7
  "@teliads/components": "^22.1.1",
8
8
  "@teliads/icons": "^8.4.0",
9
9
  "@lit-labs/motion": "^1.0.6",
package/types.d.ts CHANGED
@@ -3,4 +3,5 @@ export type CreateWidgetHeaderOption = {
3
3
  onClick: () => void;
4
4
  icon: string | null;
5
5
  closeOnClick: boolean;
6
+ key: string;
6
7
  };
@@ -2626,8 +2626,8 @@ function kr(e, t, n) {
2626
2626
  return Cr(i);
2627
2627
  }
2628
2628
  class Or {
2629
- constructor(t, n, i, r, s) {
2630
- this.label = t, this.icon = n, this.onClick = i, this.closeOnClick = r, this.update = new tn(), this.id = kr(), this._controller = s;
2629
+ constructor(t, n, i, r, s, o) {
2630
+ this.label = t, this.icon = n, this.onClick = i, this.closeOnClick = r, this.key = s, this.update = new tn(), this.id = kr(), this._controller = o;
2631
2631
  }
2632
2632
  updateLabel(t) {
2633
2633
  this.label = t, this.update.next();
@@ -2657,6 +2657,7 @@ class Tr {
2657
2657
  t.icon,
2658
2658
  t.onClick,
2659
2659
  t.closeOnClick,
2660
+ t.key,
2660
2661
  this
2661
2662
  );
2662
2663
  return this._options.push(n), this.handleUpdate(), n;
@@ -3361,6 +3362,7 @@ class Zn extends Yn {
3361
3362
  class="widget-header__action-button"
3362
3363
  ${wt(this.optionsTriggerRef)}
3363
3364
  title=${i.getOrFallback("widget-header.ellipses", "Options")}
3365
+ data-testid="options-button"
3364
3366
  >
3365
3367
  <telia-icon svg=${ur.svg}></telia-icon>
3366
3368
  </button>
@@ -3368,6 +3370,7 @@ class Zn extends Yn {
3368
3370
  @click=${this._onMinimizeClick}
3369
3371
  class="widget-header__action-button"
3370
3372
  title=${i.getOrFallback("widget-header.minimize", "Minimize")}
3373
+ data-testid="minimize-button"
3371
3374
  >
3372
3375
  <telia-icon svg=${cr.svg}></telia-icon>
3373
3376
  </button>
@@ -3386,6 +3389,7 @@ class Zn extends Yn {
3386
3389
  >
3387
3390
  ${this.options.options.map((o) => w`<button
3388
3391
  class="options-menu__item"
3392
+ data-testid="${o.key}"
3389
3393
  @click=${() => {
3390
3394
  o.closeOnClick && this._onToggleOptionsMenuClick(), o.onClick(), this.requestUpdate();
3391
3395
  }}
@@ -337,7 +337,7 @@
337
337
  :host {
338
338
  display: block;
339
339
  }
340
- `];ae([_({attribute:!0})],ot.prototype,"name",2);ae([Z()],ot.prototype,"widget",2);ae([Z()],ot.prototype,"status",2);customElements.get("ace-trigger-slot")||customElements.define("ace-trigger-slot",ne);customElements.get("ace-trigger")||customElements.define("ace-trigger",j);customElements.get("ace-unresolved-component")||customElements.define("ace-unresolved-component",Tn);customElements.get("ace-wrapper")||customElements.define("ace-wrapper",oe);customElements.get("ace-widget")||customElements.define("ace-widget",ot);let ht;const xr=new Uint8Array(16);function Ar(){if(!ht&&(ht=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ht))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ht(xr)}const m=[];for(let e=0;e<256;++e)m.push((e+256).toString(16).slice(1));function Cr(e,t=0){return m[e[t+0]]+m[e[t+1]]+m[e[t+2]]+m[e[t+3]]+"-"+m[e[t+4]]+m[e[t+5]]+"-"+m[e[t+6]]+m[e[t+7]]+"-"+m[e[t+8]]+m[e[t+9]]+"-"+m[e[t+10]]+m[e[t+11]]+m[e[t+12]]+m[e[t+13]]+m[e[t+14]]+m[e[t+15]]}const Er=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ue={randomUUID:Er};function kr(e,t,n){if(Ue.randomUUID&&!t&&!e)return Ue.randomUUID();e=e||{};const i=e.random||(e.rng||Ar)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t){n=n||0;for(let r=0;r<16;++r)t[n+r]=i[r];return t}return Cr(i)}class Or{constructor(t,n,i,r,s){this.label=t,this.icon=n,this.onClick=i,this.closeOnClick=r,this.update=new en,this.id=kr(),this._controller=s}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 Tr{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 n=new Or(t.label,t.icon,t.onClick,t.closeOnClick,this);return this._options.push(n),this.handleUpdate(),n}removeOption(t){this._options=this._options.filter(n=>n.id!==t.id)}handleUpdate(){this._subscription&&this._subscription.unsubscribe();const t=this._options.map(n=>n.subscribe());this._subscription=Oi(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 N={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 D,Pn,Pt,Ln=!1,St=!1,le=!1,b=!1,Re=null,Zt=!1;const Lt=typeof window<"u"?window:{},C=Lt.document||{head:{}},In=Lt.HTMLElement||class{},y={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,i)=>e.addEventListener(t,n,i),rel:(e,t,n,i)=>e.removeEventListener(t,n,i),ce:(e,t)=>new CustomEvent(e,t)},Pr=(()=>{let e=!1;try{C.addEventListener("e",null,Object.defineProperty({},"passive",{get(){e=!0}}))}catch{}return e})(),Lr=e=>Promise.resolve(e),Ir=(()=>{try{return new CSSStyleSheet,typeof new CSSStyleSheet().replace=="function"}catch{}return!1})(),Un=(e,t,n,i)=>{n&&n.map(([r,s,o])=>{const a=Rr(e,r),l=Ur(t,o),c=Mr(r);y.ael(a,s,l,c),(t.$rmListeners$=t.$rmListeners$||[]).push(()=>y.rel(a,s,l,c))})},Ur=(e,t)=>n=>{try{N.lazyLoad||e.$hostElement$[t](n)}catch(i){at(i)}},Rr=(e,t)=>t&4?C:t&8?Lt:t&16?C.body:e,Mr=e=>Pr?{passive:(e&1)!==0,capture:(e&2)!==0}:(e&2)!==0,Me="http://www.w3.org/1999/xlink",R=(e,t="")=>()=>{},je=new WeakMap,jr=(e,t,n)=>{let i=Ct.get(e);Ir&&n?(i=i||new CSSStyleSheet,i.replace(t)):i=t,Ct.set(e,i)},Hr=(e,t,n,i)=>{let r=Rn(t,n),s=Ct.get(r);if(e=e.nodeType===11?e:C,s)if(typeof s=="string"){e=e.head||e;let o=je.get(e),a;o||je.set(e,o=new Set),o.has(r)||(a=C.createElement("style"),a.innerHTML=s,e.insertBefore(a,e.querySelector("link")),o&&o.add(r))}else e.adoptedStyleSheets.includes(s)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,s]);return r},Nr=e=>{const t=e.$cmpMeta$,n=e.$hostElement$,i=t.$flags$,r=R("attachStyles",t.$tagName$),s=Hr(n.shadowRoot?n.shadowRoot:n.getRootNode(),t,e.$modeName$);i&10&&(n["s-sc"]=s,n.classList.add(s+"-h"),i&2&&n.classList.add(s+"-s")),r()},Rn=(e,t)=>"sc-"+(t&&e.$flags$&32?e.$tagName$+"-"+t:e.$tagName$),Dr=e=>ps.map(t=>t(e)).find(t=>!!t),He={},Br="http://www.w3.org/2000/svg",zr="http://www.w3.org/1999/xhtml",Fr=e=>e!=null,ce=e=>(e=typeof e,e==="object"||e==="function"),F=(e,t,...n)=>{let i=null,r=null,s=null,o=!1,a=!1,l=[];const c=h=>{for(let d=0;d<h.length;d++)i=h[d],Array.isArray(i)?c(i):i!=null&&typeof i!="boolean"&&((o=typeof e!="function"&&!ce(i))&&(i=String(i)),o&&a?l[l.length-1].$text$+=i:l.push(o?xt(null,i):i),a=o)};if(c(n),t){t.key&&(r=t.key),t.name&&(s=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 e=="function")return e(t===null?{}:t,l,Gr);const u=xt(e,null);return u.$attrs$=t,l.length>0&&(u.$children$=l),u.$key$=r,u.$name$=s,u},xt=(e,t)=>{const n={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};return n.$attrs$=null,n.$key$=null,n.$name$=null,n},ue={},Wr=e=>e&&e.$tag$===ue,Gr={forEach:(e,t)=>e.map(Ne).forEach(t),map:(e,t)=>e.map(Ne).map(t).map(qr)},Ne=e=>({vattrs:e.$attrs$,vchildren:e.$children$,vkey:e.$key$,vname:e.$name$,vtag:e.$tag$,vtext:e.$text$}),qr=e=>{if(typeof e.vtag=="function"){const n=Object.assign({},e.vattrs);return e.vkey&&(n.key=e.vkey),e.vname&&(n.name=e.vname),F(e.vtag,n,...e.vchildren||[])}const t=xt(e.vtag,e.vtext);return t.$attrs$=e.vattrs,t.$children$=e.vchildren,t.$key$=e.vkey,t.$name$=e.vname,t},De=(e,t,n,i,r,s)=>{if(n!==i){let o=We(e,t),a=t.toLowerCase();if(t==="class"){const l=e.classList,c=Be(n),u=Be(i);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 n)(!i||i[l]==null)&&(l.includes("-")?e.style.removeProperty(l):e.style[l]="");for(const l in i)(!n||i[l]!==n[l])&&(l.includes("-")?e.style.setProperty(l,i[l]):e.style[l]=i[l])}else if(t!=="key")if(t==="ref")i&&i(e);else if(!e.__lookupSetter__(t)&&t[0]==="o"&&t[1]==="n")t[2]==="-"?t=t.slice(3):We(Lt,a)?t=a.slice(2):t=a[2]+t.slice(3),n&&y.rel(e,t,n,!1),i&&y.ael(e,t,i,!1);else{const l=ce(i);if((o||l&&i!==null)&&!r)try{if(e.tagName.includes("-"))e[t]=i;else{let u=i??"";t==="list"?o=!1:(n==null||e[t]!=u)&&(e[t]=u)}}catch{}let c=!1;a!==(a=a.replace(/^xlink\:?/,""))&&(t=a,c=!0),i==null||i===!1?(i!==!1||e.getAttribute(t)==="")&&(c?e.removeAttributeNS(Me,t):e.removeAttribute(t)):(!o||s&4||r)&&!l&&(i=i===!0?"":i,c?e.setAttributeNS(Me,t,i):e.setAttribute(t,i))}}},Yr=/\s/,Be=e=>e?e.split(Yr):[],Mn=(e,t,n,i)=>{const r=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,s=e&&e.$attrs$||He,o=t.$attrs$||He;for(i in s)i in o||De(r,i,s[i],void 0,n,t.$flags$);for(i in o)De(r,i,s[i],o[i],n,t.$flags$)},At=(e,t,n,i)=>{let r=t.$children$[n],s=0,o,a,l;if(Ln||(le=!0,r.$tag$==="slot"&&(D&&i.classList.add(D+"-s"),r.$flags$|=r.$children$?2:1)),r.$text$!==null)o=r.$elm$=C.createTextNode(r.$text$);else if(r.$flags$&1)o=r.$elm$=C.createTextNode("");else{if(b||(b=r.$tag$==="svg"),o=r.$elm$=C.createElementNS(b?Br:zr,r.$flags$&2?"slot-fb":r.$tag$),b&&r.$tag$==="foreignObject"&&(b=!1),Mn(null,r,b),Fr(D)&&o["s-si"]!==D&&o.classList.add(o["s-si"]=D),r.$children$)for(s=0;s<r.$children$.length;++s)a=At(e,r,s,o),a&&o.appendChild(a);r.$tag$==="svg"?b=!1:o.tagName==="foreignObject"&&(b=!0)}return o["s-hn"]=Pt,r.$flags$&3&&(o["s-sr"]=!0,o["s-cr"]=Pn,o["s-sn"]=r.$name$||"",l=e&&e.$children$&&e.$children$[n],l&&l.$tag$===r.$tag$&&e.$elm$&&it(e.$elm$,!1)),o},it=(e,t)=>{y.$flags$|=1;const n=e.childNodes;for(let i=n.length-1;i>=0;i--){const r=n[i];r["s-hn"]!==Pt&&r["s-ol"]&&(Nn(r).insertBefore(r,he(r)),r["s-ol"].remove(),r["s-ol"]=void 0,le=!0),t&&it(r,t)}y.$flags$&=-2},jn=(e,t,n,i,r,s)=>{let o=e["s-cr"]&&e["s-cr"].parentNode||e,a;for(o.shadowRoot&&o.tagName===Pt&&(o=o.shadowRoot);r<=s;++r)i[r]&&(a=At(null,n,r,e),a&&(i[r].$elm$=a,o.insertBefore(a,he(t))))},Hn=(e,t,n,i,r)=>{for(;t<=n;++t)(i=e[t])&&(r=i.$elm$,zn(i),St=!0,r["s-ol"]?r["s-ol"].remove():it(r,!0),r.remove())},Zr=(e,t,n,i)=>{let r=0,s=0,o=0,a=0,l=t.length-1,c=t[0],u=t[l],h=i.length-1,d=i[0],f=i[h],$,g;for(;r<=l&&s<=h;)if(c==null)c=t[++r];else if(u==null)u=t[--l];else if(d==null)d=i[++s];else if(f==null)f=i[--h];else if(dt(c,d))B(c,d),c=t[++r],d=i[++s];else if(dt(u,f))B(u,f),u=t[--l],f=i[--h];else if(dt(c,f))(c.$tag$==="slot"||f.$tag$==="slot")&&it(c.$elm$.parentNode,!1),B(c,f),e.insertBefore(c.$elm$,u.$elm$.nextSibling),c=t[++r],f=i[--h];else if(dt(u,d))(c.$tag$==="slot"||f.$tag$==="slot")&&it(u.$elm$.parentNode,!1),B(u,d),e.insertBefore(u.$elm$,c.$elm$),u=t[--l],d=i[++s];else{for(o=-1,a=r;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$?$=At(t&&t[s],n,o,e):(B(g,d),t[o]=void 0,$=g.$elm$),d=i[++s]):($=At(t&&t[s],n,s,e),d=i[++s]),$&&Nn(c.$elm$).insertBefore($,he(c.$elm$))}r>l?jn(e,i[h+1]==null?null:i[h+1].$elm$,n,i,s,h):s>h&&Hn(t,r,l)},dt=(e,t)=>e.$tag$===t.$tag$?e.$tag$==="slot"?e.$name$===t.$name$:e.$key$===t.$key$:!1,he=e=>e&&e["s-ol"]||e,Nn=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,B=(e,t)=>{const n=t.$elm$=e.$elm$,i=e.$children$,r=t.$children$,s=t.$tag$,o=t.$text$;let a;o===null?(b=s==="svg"?!0:s==="foreignObject"?!1:b,s==="slot"||Mn(e,t,b),i!==null&&r!==null?Zr(n,i,t,r):r!==null?(e.$text$!==null&&(n.textContent=""),jn(n,null,t,r,0,r.length-1)):i!==null&&Hn(i,0,i.length-1),b&&s==="svg"&&(b=!1)):(a=n["s-cr"])?a.parentNode.textContent=o:e.$text$!==o&&(n.data=o)},Dn=e=>{let t=e.childNodes,n,i,r,s,o,a;for(i=0,r=t.length;i<r;i++)if(n=t[i],n.nodeType===1){if(n["s-sr"]){for(o=n["s-sn"],n.hidden=!1,s=0;s<r;s++)if(a=t[s].nodeType,t[s]["s-hn"]!==n["s-hn"]||o!==""){if(a===1&&o===t[s].getAttribute("slot")){n.hidden=!0;break}}else if(a===1||a===3&&t[s].textContent.trim()!==""){n.hidden=!0;break}}Dn(n)}},x=[],Bn=e=>{let t,n,i,r,s,o,a=0,l=e.childNodes,c=l.length;for(;a<c;a++){if(t=l[a],t["s-sr"]&&(n=t["s-cr"])&&n.parentNode)for(i=n.parentNode.childNodes,r=t["s-sn"],o=i.length-1;o>=0;o--)n=i[o],!n["s-cn"]&&!n["s-nr"]&&n["s-hn"]!==t["s-hn"]&&(ze(n,r)?(s=x.find(u=>u.$nodeToRelocate$===n),St=!0,n["s-sn"]=n["s-sn"]||r,s?s.$slotRefNode$=t:x.push({$slotRefNode$:t,$nodeToRelocate$:n}),n["s-sr"]&&x.map(u=>{ze(u.$nodeToRelocate$,n["s-sn"])&&(s=x.find(h=>h.$nodeToRelocate$===n),s&&!u.$slotRefNode$&&(u.$slotRefNode$=s.$slotRefNode$))})):x.some(u=>u.$nodeToRelocate$===n)||x.push({$nodeToRelocate$:n}));t.nodeType===1&&Bn(t)}},ze=(e,t)=>e.nodeType===1?e.getAttribute("slot")===null&&t===""||e.getAttribute("slot")===t:e["s-sn"]===t?!0:t==="",zn=e=>{e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(zn)},Kr=(e,t)=>{const n=e.$hostElement$,i=e.$cmpMeta$,r=e.$vnode$||xt(null,null),s=Wr(t)?t:F(null,null,t);Pt=n.tagName,i.$attrsToReflect$&&(s.$attrs$=s.$attrs$||{},i.$attrsToReflect$.map(([o,a])=>s.$attrs$[a]=n[o])),s.$tag$=null,s.$flags$|=4,e.$vnode$=s,s.$elm$=r.$elm$=n.shadowRoot||n,D=n["s-sc"],Pn=n["s-cr"],Ln=(i.$flags$&1)!==0,St=!1,B(r,s);{if(y.$flags$|=1,le){Bn(s.$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=C.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)}St&&Dn(s.$elm$),y.$flags$&=-2,x.length=0}},Qr=e=>e,Xr=(e,t,n)=>{const i=Qr(e);return{emit:r=>Jr(i,t,{bubbles:!!(n&4),composed:!!(n&2),cancelable:!!(n&1),detail:r})}},Jr=(e,t,n)=>{const i=y.ce(t,n);return e.dispatchEvent(i),i},Vr=(e,t)=>{},Fn=(e,t)=>(e.$flags$|=16,Vr(e,e.$ancestorComponent$),vs(()=>ts(e,t))),ts=(e,t)=>{const n=e.$hostElement$,i=R("scheduleUpdate",e.$cmpMeta$.$tagName$),r=n;let s;return t?s=W(r,"componentWillLoad"):s=W(r,"componentWillUpdate"),s=Fe(s,()=>W(r,"componentWillRender")),i(),Fe(s,()=>es(e,r,t))},es=async(e,t,n)=>{const i=e.$hostElement$,r=R("update",e.$cmpMeta$.$tagName$);i["s-rc"],n&&Nr(e);const s=R("render",e.$cmpMeta$.$tagName$);ns(e,t,i),s(),r(),is(e)},ns=(e,t,n)=>{try{Re=t,t=t.render&&t.render(),e.$flags$&=-17,e.$flags$|=2,(N.hasRenderFn||N.reflect)&&(N.vdomRender||N.reflect)&&(N.hydrateServerSide||Kr(e,t))}catch(a){at(a,e.$hostElement$)}return Re=null,null},is=e=>{const t=e.$cmpMeta$.$tagName$,n=e.$hostElement$,i=R("postUpdate",t),r=n;e.$ancestorComponent$,W(r,"componentDidRender"),e.$flags$&64?(W(r,"componentDidUpdate"),i()):(e.$flags$|=64,W(r,"componentDidLoad"),i())},W=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(i){at(i)}},Fe=(e,t)=>e&&e.then?e.then(t):t(),rs=(e,t)=>e!=null&&!ce(e)?t&4?e==="false"?!1:e===""||!!e:t&2?parseFloat(e):t&1?String(e):e:e,ss=(e,t)=>It(e).$instanceValues$.get(t),os=(e,t,n,i)=>{const r=It(e),s=e,o=r.$instanceValues$.get(t),a=r.$flags$,l=s;n=rs(n,i.$members$[t][0]);const c=Number.isNaN(o)&&Number.isNaN(n);if(n!==o&&!c){r.$instanceValues$.set(t,n);{if(i.$watchers$&&a&128){const h=i.$watchers$[t];h&&h.map(d=>{try{l[d](n,o,t)}catch(f){at(f,s)}})}if((a&18)===2){if(l.componentShouldUpdate&&l.componentShouldUpdate(n,o,t)===!1)return;Fn(r,!1)}}}},as=(e,t,n)=>{if(t.$members$){e.watchers&&(t.$watchers$=e.watchers);const i=Object.entries(t.$members$),r=e.prototype;i.map(([s,[o]])=>{(o&31||o&32)&&Object.defineProperty(r,s,{get(){return ss(this,s)},set(a){os(this,s,a,t)},configurable:!0,enumerable:!0})});{const s=new Map;r.attributeChangedCallback=function(o,a,l){y.jmp(()=>{const c=s.get(o);if(this.hasOwnProperty(c))l=this[c],delete this[c];else if(r.hasOwnProperty(c)&&typeof this[c]=="number"&&this[c]==l)return;this[c]=l===null&&typeof this[c]=="boolean"?!1:l})},e.observedAttributes=i.filter(([o,a])=>a[0]&15).map(([o,a])=>{const l=a[1]||o;return s.set(l,o),a[0]&512&&t.$attrsToReflect$.push([o,l]),l})}}return e},ls=async(e,t,n,i,r)=>{if(!(t.$flags$&32)&&(r=e.constructor,t.$flags$|=32,customElements.whenDefined(n.$tagName$).then(()=>t.$flags$|=128),r.style)){let o=r.style;typeof o!="string"&&(o=o[t.$modeName$=Dr(e)]);const a=Rn(n,t.$modeName$);if(!Ct.has(a)){const l=R("registerStyles",n.$tagName$);jr(a,o,!!(n.$flags$&1)),l()}}t.$ancestorComponent$,(()=>Fn(t,!0))()},cs=e=>{},us=e=>{if(!(y.$flags$&1)){const t=It(e),n=t.$cmpMeta$,i=R("connectedCallback",n.$tagName$);t.$flags$&1?(Un(e,t,n.$listeners$),cs(t.$lazyInstance$)):(t.$flags$|=1,n.$flags$&12&&hs(e),n.$members$&&Object.entries(n.$members$).map(([r,[s]])=>{if(s&31&&e.hasOwnProperty(r)){const o=e[r];delete e[r],e[r]=o}}),ls(e,t,n)),i()}},hs=e=>{const t=e["s-cr"]=C.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)},ds=e=>{if(!(y.$flags$&1)){const t=It(e);t.$rmListeners$&&(t.$rmListeners$.map(n=>n()),t.$rmListeners$=void 0)}},Wn=(e,t)=>{const n={$flags$:t[0],$tagName$:t[1]};n.$members$=t[2],n.$listeners$=t[3],n.$watchers$=e.$watchers$,n.$attrsToReflect$=[];const i=e.prototype.connectedCallback,r=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__registerHost(){fs(this,n)},connectedCallback(){us(this),i&&i.call(this)},disconnectedCallback(){ds(this),r&&r.call(this)},__attachShadow(){this.attachShadow({mode:"open",delegatesFocus:!!(n.$flags$&16)})}}),e.is=n.$tagName$,as(e,n)},Gn=new WeakMap,It=e=>Gn.get(e),fs=(e,t)=>{const n={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};return Un(e,n,t.$listeners$),Gn.set(e,n)},We=(e,t)=>t in e,at=(e,t)=>(0,console.error)(e,t),Ct=new Map,ps=[],Ge=[],qn=[],gs=(e,t)=>n=>{e.push(n),Zt||(Zt=!0,t&&y.$flags$&4?$s(Kt):y.raf(Kt))},qe=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(n){at(n)}e.length=0},Kt=()=>{qe(Ge),qe(qn),(Zt=Ge.length>0)&&y.raf(Kt)},$s=e=>Lr().then(e),vs=gs(qn,!0),ms=(e={})=>{const{content:t="",title:n,attributes:i=[]}=e;let r="",s=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},...i];return n&&(r=`<title>${n}</title>`),`<svg ${s.map(a=>`${a.name}="${a.value}"`).join(" ")}>${r}${t}</svg>`},ys=e=>e.replace(/<(\/?)svg([^>]*)>/g,"").trim();function bs(e){return`${e.getFullYear()}.${e.getMonth()+1}`}class _s{constructor(t){this.voca_component=t,this.voca_added=bs(new Date)}}const ws="telia-vst{display:none}",Ss=Wn(class extends In{constructor(){super(),this.__registerHost(),this.vocaInternalUStats=Xr(this,"vocaInternalUStats",7)}connectedCallback(){this.vocaInternalUStats.emit(new _s(this.dataTrackingId))}render(){return F(ue,null)}static get style(){return ws}},[0,"telia-vst",{dataTrackingId:[1,"data-tracking-id"]}]);function Yn(){if(typeof customElements>"u")return;["telia-vst"].forEach(t=>{switch(t){case"telia-vst":customElements.get(t)||customElements.define(t,Ss);break}})}Yn();function Qt(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{vocadsIcons:void 0,vocadsIconsRegistered:!1}}function xs(){if(typeof Qt().vocadsIcons!==void 0)return Qt().vocadsIcons}function As(){return Qt().vocadsIconsRegistered}const Cs=".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))}",Es=Wn(class extends In{constructor(){super(),this.__registerHost(),this.size="md",this.allyTitle=null,this.dataTrackingId="telia-icon"}getSvgString(){if(this.svg)return this.svg;if(As()&&this.name){const e=xs();return e[this.name]?e[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 e=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 n=ms({content:ys(e),attributes:t,title:this.allyTitle});return F(ue,{class:`telia-icon telia-icon--${this.size}`},F("span",{"aria-label":this.allyTitle,class:"telia-icon__container",innerHTML:n}),F("telia-vst",{dataTrackingId:this.dataTrackingId}))}static get style(){return Cs}},[0,"telia-icon",{name:[1],svg:[1],size:[1],allyTitle:[1,"ally-title"],dataTestid:[1,"data-testid"]}]);function ks(){if(typeof customElements>"u")return;["telia-icon","telia-vst"].forEach(t=>{switch(t){case"telia-icon":customElements.get(t)||customElements.define(t,Es);break;case"telia-vst":customElements.get(t)||Yn();break}})}ks();var Os=Object.defineProperty,Ts=Object.getOwnPropertyDescriptor,Ps=(e,t,n,i)=>{for(var r=i>1?void 0:i?Ts(t,n):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(i?o(t,n,r):o(r))||r);return i&&r&&Os(t,n,r),r};const Zn=On(A);class Ut extends Zn{constructor(){super(...arguments),this.optionsIsVisible=!1,this.options=new Tr(this),this.optionsRef=_t(),this.optionsTriggerRef=_t(),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)}_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 s;const t=this.application.branding(),n=(s=t==null?void 0:t.graphics)==null?void 0:s.logotype,i=this.application.texts,r=i.get("widget-header.header","ACE Widget");return w` <div class="widget-header">
340
+ `];ae([_({attribute:!0})],ot.prototype,"name",2);ae([Z()],ot.prototype,"widget",2);ae([Z()],ot.prototype,"status",2);customElements.get("ace-trigger-slot")||customElements.define("ace-trigger-slot",ne);customElements.get("ace-trigger")||customElements.define("ace-trigger",j);customElements.get("ace-unresolved-component")||customElements.define("ace-unresolved-component",Tn);customElements.get("ace-wrapper")||customElements.define("ace-wrapper",oe);customElements.get("ace-widget")||customElements.define("ace-widget",ot);let ht;const xr=new Uint8Array(16);function Ar(){if(!ht&&(ht=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ht))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ht(xr)}const m=[];for(let e=0;e<256;++e)m.push((e+256).toString(16).slice(1));function Cr(e,t=0){return m[e[t+0]]+m[e[t+1]]+m[e[t+2]]+m[e[t+3]]+"-"+m[e[t+4]]+m[e[t+5]]+"-"+m[e[t+6]]+m[e[t+7]]+"-"+m[e[t+8]]+m[e[t+9]]+"-"+m[e[t+10]]+m[e[t+11]]+m[e[t+12]]+m[e[t+13]]+m[e[t+14]]+m[e[t+15]]}const Er=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ue={randomUUID:Er};function kr(e,t,n){if(Ue.randomUUID&&!t&&!e)return Ue.randomUUID();e=e||{};const i=e.random||(e.rng||Ar)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t){n=n||0;for(let r=0;r<16;++r)t[n+r]=i[r];return t}return Cr(i)}class Or{constructor(t,n,i,r,s,o){this.label=t,this.icon=n,this.onClick=i,this.closeOnClick=r,this.key=s,this.update=new en,this.id=kr(),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 Tr{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 n=new Or(t.label,t.icon,t.onClick,t.closeOnClick,t.key,this);return this._options.push(n),this.handleUpdate(),n}removeOption(t){this._options=this._options.filter(n=>n.id!==t.id)}handleUpdate(){this._subscription&&this._subscription.unsubscribe();const t=this._options.map(n=>n.subscribe());this._subscription=Oi(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 N={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 D,Pn,Pt,Ln=!1,St=!1,le=!1,b=!1,Re=null,Zt=!1;const Lt=typeof window<"u"?window:{},C=Lt.document||{head:{}},In=Lt.HTMLElement||class{},y={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,i)=>e.addEventListener(t,n,i),rel:(e,t,n,i)=>e.removeEventListener(t,n,i),ce:(e,t)=>new CustomEvent(e,t)},Pr=(()=>{let e=!1;try{C.addEventListener("e",null,Object.defineProperty({},"passive",{get(){e=!0}}))}catch{}return e})(),Lr=e=>Promise.resolve(e),Ir=(()=>{try{return new CSSStyleSheet,typeof new CSSStyleSheet().replace=="function"}catch{}return!1})(),Un=(e,t,n,i)=>{n&&n.map(([r,s,o])=>{const a=Rr(e,r),l=Ur(t,o),c=Mr(r);y.ael(a,s,l,c),(t.$rmListeners$=t.$rmListeners$||[]).push(()=>y.rel(a,s,l,c))})},Ur=(e,t)=>n=>{try{N.lazyLoad||e.$hostElement$[t](n)}catch(i){at(i)}},Rr=(e,t)=>t&4?C:t&8?Lt:t&16?C.body:e,Mr=e=>Pr?{passive:(e&1)!==0,capture:(e&2)!==0}:(e&2)!==0,Me="http://www.w3.org/1999/xlink",R=(e,t="")=>()=>{},je=new WeakMap,jr=(e,t,n)=>{let i=Ct.get(e);Ir&&n?(i=i||new CSSStyleSheet,i.replace(t)):i=t,Ct.set(e,i)},Hr=(e,t,n,i)=>{let r=Rn(t,n),s=Ct.get(r);if(e=e.nodeType===11?e:C,s)if(typeof s=="string"){e=e.head||e;let o=je.get(e),a;o||je.set(e,o=new Set),o.has(r)||(a=C.createElement("style"),a.innerHTML=s,e.insertBefore(a,e.querySelector("link")),o&&o.add(r))}else e.adoptedStyleSheets.includes(s)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,s]);return r},Nr=e=>{const t=e.$cmpMeta$,n=e.$hostElement$,i=t.$flags$,r=R("attachStyles",t.$tagName$),s=Hr(n.shadowRoot?n.shadowRoot:n.getRootNode(),t,e.$modeName$);i&10&&(n["s-sc"]=s,n.classList.add(s+"-h"),i&2&&n.classList.add(s+"-s")),r()},Rn=(e,t)=>"sc-"+(t&&e.$flags$&32?e.$tagName$+"-"+t:e.$tagName$),Dr=e=>ps.map(t=>t(e)).find(t=>!!t),He={},Br="http://www.w3.org/2000/svg",zr="http://www.w3.org/1999/xhtml",Fr=e=>e!=null,ce=e=>(e=typeof e,e==="object"||e==="function"),F=(e,t,...n)=>{let i=null,r=null,s=null,o=!1,a=!1,l=[];const c=h=>{for(let d=0;d<h.length;d++)i=h[d],Array.isArray(i)?c(i):i!=null&&typeof i!="boolean"&&((o=typeof e!="function"&&!ce(i))&&(i=String(i)),o&&a?l[l.length-1].$text$+=i:l.push(o?xt(null,i):i),a=o)};if(c(n),t){t.key&&(r=t.key),t.name&&(s=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 e=="function")return e(t===null?{}:t,l,Gr);const u=xt(e,null);return u.$attrs$=t,l.length>0&&(u.$children$=l),u.$key$=r,u.$name$=s,u},xt=(e,t)=>{const n={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};return n.$attrs$=null,n.$key$=null,n.$name$=null,n},ue={},Wr=e=>e&&e.$tag$===ue,Gr={forEach:(e,t)=>e.map(Ne).forEach(t),map:(e,t)=>e.map(Ne).map(t).map(qr)},Ne=e=>({vattrs:e.$attrs$,vchildren:e.$children$,vkey:e.$key$,vname:e.$name$,vtag:e.$tag$,vtext:e.$text$}),qr=e=>{if(typeof e.vtag=="function"){const n=Object.assign({},e.vattrs);return e.vkey&&(n.key=e.vkey),e.vname&&(n.name=e.vname),F(e.vtag,n,...e.vchildren||[])}const t=xt(e.vtag,e.vtext);return t.$attrs$=e.vattrs,t.$children$=e.vchildren,t.$key$=e.vkey,t.$name$=e.vname,t},De=(e,t,n,i,r,s)=>{if(n!==i){let o=We(e,t),a=t.toLowerCase();if(t==="class"){const l=e.classList,c=Be(n),u=Be(i);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 n)(!i||i[l]==null)&&(l.includes("-")?e.style.removeProperty(l):e.style[l]="");for(const l in i)(!n||i[l]!==n[l])&&(l.includes("-")?e.style.setProperty(l,i[l]):e.style[l]=i[l])}else if(t!=="key")if(t==="ref")i&&i(e);else if(!e.__lookupSetter__(t)&&t[0]==="o"&&t[1]==="n")t[2]==="-"?t=t.slice(3):We(Lt,a)?t=a.slice(2):t=a[2]+t.slice(3),n&&y.rel(e,t,n,!1),i&&y.ael(e,t,i,!1);else{const l=ce(i);if((o||l&&i!==null)&&!r)try{if(e.tagName.includes("-"))e[t]=i;else{let u=i??"";t==="list"?o=!1:(n==null||e[t]!=u)&&(e[t]=u)}}catch{}let c=!1;a!==(a=a.replace(/^xlink\:?/,""))&&(t=a,c=!0),i==null||i===!1?(i!==!1||e.getAttribute(t)==="")&&(c?e.removeAttributeNS(Me,t):e.removeAttribute(t)):(!o||s&4||r)&&!l&&(i=i===!0?"":i,c?e.setAttributeNS(Me,t,i):e.setAttribute(t,i))}}},Yr=/\s/,Be=e=>e?e.split(Yr):[],Mn=(e,t,n,i)=>{const r=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,s=e&&e.$attrs$||He,o=t.$attrs$||He;for(i in s)i in o||De(r,i,s[i],void 0,n,t.$flags$);for(i in o)De(r,i,s[i],o[i],n,t.$flags$)},At=(e,t,n,i)=>{let r=t.$children$[n],s=0,o,a,l;if(Ln||(le=!0,r.$tag$==="slot"&&(D&&i.classList.add(D+"-s"),r.$flags$|=r.$children$?2:1)),r.$text$!==null)o=r.$elm$=C.createTextNode(r.$text$);else if(r.$flags$&1)o=r.$elm$=C.createTextNode("");else{if(b||(b=r.$tag$==="svg"),o=r.$elm$=C.createElementNS(b?Br:zr,r.$flags$&2?"slot-fb":r.$tag$),b&&r.$tag$==="foreignObject"&&(b=!1),Mn(null,r,b),Fr(D)&&o["s-si"]!==D&&o.classList.add(o["s-si"]=D),r.$children$)for(s=0;s<r.$children$.length;++s)a=At(e,r,s,o),a&&o.appendChild(a);r.$tag$==="svg"?b=!1:o.tagName==="foreignObject"&&(b=!0)}return o["s-hn"]=Pt,r.$flags$&3&&(o["s-sr"]=!0,o["s-cr"]=Pn,o["s-sn"]=r.$name$||"",l=e&&e.$children$&&e.$children$[n],l&&l.$tag$===r.$tag$&&e.$elm$&&it(e.$elm$,!1)),o},it=(e,t)=>{y.$flags$|=1;const n=e.childNodes;for(let i=n.length-1;i>=0;i--){const r=n[i];r["s-hn"]!==Pt&&r["s-ol"]&&(Nn(r).insertBefore(r,he(r)),r["s-ol"].remove(),r["s-ol"]=void 0,le=!0),t&&it(r,t)}y.$flags$&=-2},jn=(e,t,n,i,r,s)=>{let o=e["s-cr"]&&e["s-cr"].parentNode||e,a;for(o.shadowRoot&&o.tagName===Pt&&(o=o.shadowRoot);r<=s;++r)i[r]&&(a=At(null,n,r,e),a&&(i[r].$elm$=a,o.insertBefore(a,he(t))))},Hn=(e,t,n,i,r)=>{for(;t<=n;++t)(i=e[t])&&(r=i.$elm$,zn(i),St=!0,r["s-ol"]?r["s-ol"].remove():it(r,!0),r.remove())},Zr=(e,t,n,i)=>{let r=0,s=0,o=0,a=0,l=t.length-1,c=t[0],u=t[l],h=i.length-1,d=i[0],f=i[h],$,g;for(;r<=l&&s<=h;)if(c==null)c=t[++r];else if(u==null)u=t[--l];else if(d==null)d=i[++s];else if(f==null)f=i[--h];else if(dt(c,d))B(c,d),c=t[++r],d=i[++s];else if(dt(u,f))B(u,f),u=t[--l],f=i[--h];else if(dt(c,f))(c.$tag$==="slot"||f.$tag$==="slot")&&it(c.$elm$.parentNode,!1),B(c,f),e.insertBefore(c.$elm$,u.$elm$.nextSibling),c=t[++r],f=i[--h];else if(dt(u,d))(c.$tag$==="slot"||f.$tag$==="slot")&&it(u.$elm$.parentNode,!1),B(u,d),e.insertBefore(u.$elm$,c.$elm$),u=t[--l],d=i[++s];else{for(o=-1,a=r;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$?$=At(t&&t[s],n,o,e):(B(g,d),t[o]=void 0,$=g.$elm$),d=i[++s]):($=At(t&&t[s],n,s,e),d=i[++s]),$&&Nn(c.$elm$).insertBefore($,he(c.$elm$))}r>l?jn(e,i[h+1]==null?null:i[h+1].$elm$,n,i,s,h):s>h&&Hn(t,r,l)},dt=(e,t)=>e.$tag$===t.$tag$?e.$tag$==="slot"?e.$name$===t.$name$:e.$key$===t.$key$:!1,he=e=>e&&e["s-ol"]||e,Nn=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,B=(e,t)=>{const n=t.$elm$=e.$elm$,i=e.$children$,r=t.$children$,s=t.$tag$,o=t.$text$;let a;o===null?(b=s==="svg"?!0:s==="foreignObject"?!1:b,s==="slot"||Mn(e,t,b),i!==null&&r!==null?Zr(n,i,t,r):r!==null?(e.$text$!==null&&(n.textContent=""),jn(n,null,t,r,0,r.length-1)):i!==null&&Hn(i,0,i.length-1),b&&s==="svg"&&(b=!1)):(a=n["s-cr"])?a.parentNode.textContent=o:e.$text$!==o&&(n.data=o)},Dn=e=>{let t=e.childNodes,n,i,r,s,o,a;for(i=0,r=t.length;i<r;i++)if(n=t[i],n.nodeType===1){if(n["s-sr"]){for(o=n["s-sn"],n.hidden=!1,s=0;s<r;s++)if(a=t[s].nodeType,t[s]["s-hn"]!==n["s-hn"]||o!==""){if(a===1&&o===t[s].getAttribute("slot")){n.hidden=!0;break}}else if(a===1||a===3&&t[s].textContent.trim()!==""){n.hidden=!0;break}}Dn(n)}},x=[],Bn=e=>{let t,n,i,r,s,o,a=0,l=e.childNodes,c=l.length;for(;a<c;a++){if(t=l[a],t["s-sr"]&&(n=t["s-cr"])&&n.parentNode)for(i=n.parentNode.childNodes,r=t["s-sn"],o=i.length-1;o>=0;o--)n=i[o],!n["s-cn"]&&!n["s-nr"]&&n["s-hn"]!==t["s-hn"]&&(ze(n,r)?(s=x.find(u=>u.$nodeToRelocate$===n),St=!0,n["s-sn"]=n["s-sn"]||r,s?s.$slotRefNode$=t:x.push({$slotRefNode$:t,$nodeToRelocate$:n}),n["s-sr"]&&x.map(u=>{ze(u.$nodeToRelocate$,n["s-sn"])&&(s=x.find(h=>h.$nodeToRelocate$===n),s&&!u.$slotRefNode$&&(u.$slotRefNode$=s.$slotRefNode$))})):x.some(u=>u.$nodeToRelocate$===n)||x.push({$nodeToRelocate$:n}));t.nodeType===1&&Bn(t)}},ze=(e,t)=>e.nodeType===1?e.getAttribute("slot")===null&&t===""||e.getAttribute("slot")===t:e["s-sn"]===t?!0:t==="",zn=e=>{e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(zn)},Kr=(e,t)=>{const n=e.$hostElement$,i=e.$cmpMeta$,r=e.$vnode$||xt(null,null),s=Wr(t)?t:F(null,null,t);Pt=n.tagName,i.$attrsToReflect$&&(s.$attrs$=s.$attrs$||{},i.$attrsToReflect$.map(([o,a])=>s.$attrs$[a]=n[o])),s.$tag$=null,s.$flags$|=4,e.$vnode$=s,s.$elm$=r.$elm$=n.shadowRoot||n,D=n["s-sc"],Pn=n["s-cr"],Ln=(i.$flags$&1)!==0,St=!1,B(r,s);{if(y.$flags$|=1,le){Bn(s.$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=C.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)}St&&Dn(s.$elm$),y.$flags$&=-2,x.length=0}},Qr=e=>e,Xr=(e,t,n)=>{const i=Qr(e);return{emit:r=>Jr(i,t,{bubbles:!!(n&4),composed:!!(n&2),cancelable:!!(n&1),detail:r})}},Jr=(e,t,n)=>{const i=y.ce(t,n);return e.dispatchEvent(i),i},Vr=(e,t)=>{},Fn=(e,t)=>(e.$flags$|=16,Vr(e,e.$ancestorComponent$),vs(()=>ts(e,t))),ts=(e,t)=>{const n=e.$hostElement$,i=R("scheduleUpdate",e.$cmpMeta$.$tagName$),r=n;let s;return t?s=W(r,"componentWillLoad"):s=W(r,"componentWillUpdate"),s=Fe(s,()=>W(r,"componentWillRender")),i(),Fe(s,()=>es(e,r,t))},es=async(e,t,n)=>{const i=e.$hostElement$,r=R("update",e.$cmpMeta$.$tagName$);i["s-rc"],n&&Nr(e);const s=R("render",e.$cmpMeta$.$tagName$);ns(e,t,i),s(),r(),is(e)},ns=(e,t,n)=>{try{Re=t,t=t.render&&t.render(),e.$flags$&=-17,e.$flags$|=2,(N.hasRenderFn||N.reflect)&&(N.vdomRender||N.reflect)&&(N.hydrateServerSide||Kr(e,t))}catch(a){at(a,e.$hostElement$)}return Re=null,null},is=e=>{const t=e.$cmpMeta$.$tagName$,n=e.$hostElement$,i=R("postUpdate",t),r=n;e.$ancestorComponent$,W(r,"componentDidRender"),e.$flags$&64?(W(r,"componentDidUpdate"),i()):(e.$flags$|=64,W(r,"componentDidLoad"),i())},W=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(i){at(i)}},Fe=(e,t)=>e&&e.then?e.then(t):t(),rs=(e,t)=>e!=null&&!ce(e)?t&4?e==="false"?!1:e===""||!!e:t&2?parseFloat(e):t&1?String(e):e:e,ss=(e,t)=>It(e).$instanceValues$.get(t),os=(e,t,n,i)=>{const r=It(e),s=e,o=r.$instanceValues$.get(t),a=r.$flags$,l=s;n=rs(n,i.$members$[t][0]);const c=Number.isNaN(o)&&Number.isNaN(n);if(n!==o&&!c){r.$instanceValues$.set(t,n);{if(i.$watchers$&&a&128){const h=i.$watchers$[t];h&&h.map(d=>{try{l[d](n,o,t)}catch(f){at(f,s)}})}if((a&18)===2){if(l.componentShouldUpdate&&l.componentShouldUpdate(n,o,t)===!1)return;Fn(r,!1)}}}},as=(e,t,n)=>{if(t.$members$){e.watchers&&(t.$watchers$=e.watchers);const i=Object.entries(t.$members$),r=e.prototype;i.map(([s,[o]])=>{(o&31||o&32)&&Object.defineProperty(r,s,{get(){return ss(this,s)},set(a){os(this,s,a,t)},configurable:!0,enumerable:!0})});{const s=new Map;r.attributeChangedCallback=function(o,a,l){y.jmp(()=>{const c=s.get(o);if(this.hasOwnProperty(c))l=this[c],delete this[c];else if(r.hasOwnProperty(c)&&typeof this[c]=="number"&&this[c]==l)return;this[c]=l===null&&typeof this[c]=="boolean"?!1:l})},e.observedAttributes=i.filter(([o,a])=>a[0]&15).map(([o,a])=>{const l=a[1]||o;return s.set(l,o),a[0]&512&&t.$attrsToReflect$.push([o,l]),l})}}return e},ls=async(e,t,n,i,r)=>{if(!(t.$flags$&32)&&(r=e.constructor,t.$flags$|=32,customElements.whenDefined(n.$tagName$).then(()=>t.$flags$|=128),r.style)){let o=r.style;typeof o!="string"&&(o=o[t.$modeName$=Dr(e)]);const a=Rn(n,t.$modeName$);if(!Ct.has(a)){const l=R("registerStyles",n.$tagName$);jr(a,o,!!(n.$flags$&1)),l()}}t.$ancestorComponent$,(()=>Fn(t,!0))()},cs=e=>{},us=e=>{if(!(y.$flags$&1)){const t=It(e),n=t.$cmpMeta$,i=R("connectedCallback",n.$tagName$);t.$flags$&1?(Un(e,t,n.$listeners$),cs(t.$lazyInstance$)):(t.$flags$|=1,n.$flags$&12&&hs(e),n.$members$&&Object.entries(n.$members$).map(([r,[s]])=>{if(s&31&&e.hasOwnProperty(r)){const o=e[r];delete e[r],e[r]=o}}),ls(e,t,n)),i()}},hs=e=>{const t=e["s-cr"]=C.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)},ds=e=>{if(!(y.$flags$&1)){const t=It(e);t.$rmListeners$&&(t.$rmListeners$.map(n=>n()),t.$rmListeners$=void 0)}},Wn=(e,t)=>{const n={$flags$:t[0],$tagName$:t[1]};n.$members$=t[2],n.$listeners$=t[3],n.$watchers$=e.$watchers$,n.$attrsToReflect$=[];const i=e.prototype.connectedCallback,r=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__registerHost(){fs(this,n)},connectedCallback(){us(this),i&&i.call(this)},disconnectedCallback(){ds(this),r&&r.call(this)},__attachShadow(){this.attachShadow({mode:"open",delegatesFocus:!!(n.$flags$&16)})}}),e.is=n.$tagName$,as(e,n)},Gn=new WeakMap,It=e=>Gn.get(e),fs=(e,t)=>{const n={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};return Un(e,n,t.$listeners$),Gn.set(e,n)},We=(e,t)=>t in e,at=(e,t)=>(0,console.error)(e,t),Ct=new Map,ps=[],Ge=[],qn=[],gs=(e,t)=>n=>{e.push(n),Zt||(Zt=!0,t&&y.$flags$&4?$s(Kt):y.raf(Kt))},qe=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(n){at(n)}e.length=0},Kt=()=>{qe(Ge),qe(qn),(Zt=Ge.length>0)&&y.raf(Kt)},$s=e=>Lr().then(e),vs=gs(qn,!0),ms=(e={})=>{const{content:t="",title:n,attributes:i=[]}=e;let r="",s=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},...i];return n&&(r=`<title>${n}</title>`),`<svg ${s.map(a=>`${a.name}="${a.value}"`).join(" ")}>${r}${t}</svg>`},ys=e=>e.replace(/<(\/?)svg([^>]*)>/g,"").trim();function bs(e){return`${e.getFullYear()}.${e.getMonth()+1}`}class _s{constructor(t){this.voca_component=t,this.voca_added=bs(new Date)}}const ws="telia-vst{display:none}",Ss=Wn(class extends In{constructor(){super(),this.__registerHost(),this.vocaInternalUStats=Xr(this,"vocaInternalUStats",7)}connectedCallback(){this.vocaInternalUStats.emit(new _s(this.dataTrackingId))}render(){return F(ue,null)}static get style(){return ws}},[0,"telia-vst",{dataTrackingId:[1,"data-tracking-id"]}]);function Yn(){if(typeof customElements>"u")return;["telia-vst"].forEach(t=>{switch(t){case"telia-vst":customElements.get(t)||customElements.define(t,Ss);break}})}Yn();function Qt(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{vocadsIcons:void 0,vocadsIconsRegistered:!1}}function xs(){if(typeof Qt().vocadsIcons!==void 0)return Qt().vocadsIcons}function As(){return Qt().vocadsIconsRegistered}const Cs=".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))}",Es=Wn(class extends In{constructor(){super(),this.__registerHost(),this.size="md",this.allyTitle=null,this.dataTrackingId="telia-icon"}getSvgString(){if(this.svg)return this.svg;if(As()&&this.name){const e=xs();return e[this.name]?e[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 e=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 n=ms({content:ys(e),attributes:t,title:this.allyTitle});return F(ue,{class:`telia-icon telia-icon--${this.size}`},F("span",{"aria-label":this.allyTitle,class:"telia-icon__container",innerHTML:n}),F("telia-vst",{dataTrackingId:this.dataTrackingId}))}static get style(){return Cs}},[0,"telia-icon",{name:[1],svg:[1],size:[1],allyTitle:[1,"ally-title"],dataTestid:[1,"data-testid"]}]);function ks(){if(typeof customElements>"u")return;["telia-icon","telia-vst"].forEach(t=>{switch(t){case"telia-icon":customElements.get(t)||customElements.define(t,Es);break;case"telia-vst":customElements.get(t)||Yn();break}})}ks();var Os=Object.defineProperty,Ts=Object.getOwnPropertyDescriptor,Ps=(e,t,n,i)=>{for(var r=i>1?void 0:i?Ts(t,n):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(i?o(t,n,r):o(r))||r);return i&&r&&Os(t,n,r),r};const Zn=On(A);class Ut extends Zn{constructor(){super(...arguments),this.optionsIsVisible=!1,this.options=new Tr(this),this.optionsRef=_t(),this.optionsTriggerRef=_t(),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)}_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 s;const t=this.application.branding(),n=(s=t==null?void 0:t.graphics)==null?void 0:s.logotype,i=this.application.texts,r=i.get("widget-header.header","ACE Widget");return w` <div class="widget-header">
341
341
  ${n?w` <img
342
342
  src=${n}
343
343
  class="logotype"
@@ -355,6 +355,7 @@
355
355
  class="widget-header__action-button"
356
356
  ${wt(this.optionsTriggerRef)}
357
357
  title=${i.getOrFallback("widget-header.ellipses","Options")}
358
+ data-testid="options-button"
358
359
  >
359
360
  <telia-icon svg=${ur.svg}></telia-icon>
360
361
  </button>
@@ -362,6 +363,7 @@
362
363
  @click=${this._onMinimizeClick}
363
364
  class="widget-header__action-button"
364
365
  title=${i.getOrFallback("widget-header.minimize","Minimize")}
366
+ data-testid="minimize-button"
365
367
  >
366
368
  <telia-icon svg=${cr.svg}></telia-icon>
367
369
  </button>
@@ -374,6 +376,7 @@
374
376
  >
375
377
  ${this.options.options.map(o=>w`<button
376
378
  class="options-menu__item"
379
+ data-testid="${o.key}"
377
380
  @click=${()=>{o.closeOnClick&&this._onToggleOptionsMenuClick(),o.onClick(),this.requestUpdate()}}
378
381
  >
379
382
  ${o.label}
@@ -4,10 +4,11 @@ export declare class WidgetHeaderOption {
4
4
  icon: string | null;
5
5
  onClick: () => void;
6
6
  closeOnClick: boolean;
7
+ key: string;
7
8
  private update;
8
9
  private _controller;
9
10
  id: string;
10
- constructor(label: string, icon: string | null, onClick: () => void, closeOnClick: boolean, controller: OptionsController);
11
+ constructor(label: string, icon: string | null, onClick: () => void, closeOnClick: boolean, key: string, controller: OptionsController);
11
12
  updateLabel(value: string): void;
12
13
  updateIcon(value: string): void;
13
14
  remove(): void;