@telia-ace/widget-conversation-flamingo 1.1.20-rc.0 → 1.1.20
Sign up to get free protection for your applications and to get access to all the features.
- package/{conversation-8e0ad5eb.js → conversation-2edf20fc.js} +6 -6
- package/{conversation-e5cbfa02.mjs → conversation-4cb978ba.mjs} +65 -65
- package/{index-f74815a8.js → index-533b68a4.js} +1 -1
- package/{index-536e1cef.mjs → index-a04efb7a.mjs} +2 -2
- package/{index-9a0c787a.mjs → index-c1ee1af2.mjs} +1 -1
- package/{index-8f4273fd.js → index-f2738e72.js} +1 -1
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/package.json +2 -2
@@ -1,4 +1,4 @@
|
|
1
|
-
"use strict";const xt=require("./index-
|
1
|
+
"use strict";const xt=require("./index-533b68a4.js");/**
|
2
2
|
* @license
|
3
3
|
* Copyright 2019 Google LLC
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
@@ -12,11 +12,11 @@
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
13
13
|
*/const G=globalThis,ot=G.trustedTypes,Vt=ot?ot.createPolicy("lit-html",{createHTML:e=>e}):void 0,Ce="$lit$",S=`lit$${(Math.random()+"").slice(9)}$`,Te="?"+S,gs=`<${Te}>`,P=document,Y=()=>P.createComment(""),K=e=>e===null||typeof e!="object"&&typeof e!="function",ke=Array.isArray,ms=e=>ke(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",St=`[
|
14
14
|
\f\r]`,F=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,te=/-->/g,ee=/>/g,T=RegExp(`>|${St}(?:([^\\s"'>=/]+)(${St}*=${St}*(?:[^
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),se=/'/g,ie=/"/g,Oe=/^(?:script|style|textarea|title)$/i,vs=e=>(t,...s)=>({_$litType$:e,strings:t,values:s}),$=vs(1),C=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),ne=new WeakMap,O=P.createTreeWalker(P,129);function Pe(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Vt!==void 0?Vt.createHTML(t):t}const ys=(e,t)=>{const s=e.length-1,i=[];let n,r=t===2?"<svg>":"",o=F;for(let a=0;a<s;a++){const l=e[a];let c,h
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),se=/'/g,ie=/"/g,Oe=/^(?:script|style|textarea|title)$/i,vs=e=>(t,...s)=>({_$litType$:e,strings:t,values:s}),$=vs(1),C=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),ne=new WeakMap,O=P.createTreeWalker(P,129);function Pe(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Vt!==void 0?Vt.createHTML(t):t}const ys=(e,t)=>{const s=e.length-1,i=[];let n,r=t===2?"<svg>":"",o=F;for(let a=0;a<s;a++){const l=e[a];let c,d,h=-1,p=0;for(;p<l.length&&(o.lastIndex=p,d=o.exec(l),d!==null);)p=o.lastIndex,o===F?d[1]==="!--"?o=te:d[1]!==void 0?o=ee:d[2]!==void 0?(Oe.test(d[2])&&(n=RegExp("</"+d[2],"g")),o=T):d[3]!==void 0&&(o=T):o===T?d[0]===">"?(o=n??F,h=-1):d[1]===void 0?h=-2:(h=o.lastIndex-d[2].length,c=d[1],o=d[3]===void 0?T:d[3]==='"'?ie:se):o===ie||o===se?o=T:o===te||o===ee?o=F:(o=T,n=void 0);const f=o===T&&e[a+1].startsWith("/>")?" ":"";r+=o===F?l+gs:h>=0?(i.push(c),l.slice(0,h)+Ce+l.slice(h)+S+f):l+S+(h===-2?a:f)}return[Pe(e,r+(e[s]||"<?>")+(t===2?"</svg>":"")),i]};class Q{constructor({strings:t,_$litType$:s},i){let n;this.parts=[];let r=0,o=0;const a=t.length-1,l=this.parts,[c,d]=ys(t,s);if(this.el=Q.createElement(c,i),O.currentNode=this.el.content,s===2){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(n=O.nextNode())!==null&&l.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(const h of n.getAttributeNames())if(h.endsWith(Ce)){const p=d[o++],f=n.getAttribute(h).split(S),w=/([.?@])?(.*)/.exec(p);l.push({type:1,index:r,name:w[2],strings:f,ctor:w[1]==="."?_s:w[1]==="?"?ws:w[1]==="@"?xs:$t}),n.removeAttribute(h)}else h.startsWith(S)&&(l.push({type:6,index:r}),n.removeAttribute(h));if(Oe.test(n.tagName)){const h=n.textContent.split(S),p=h.length-1;if(p>0){n.textContent=ot?ot.emptyScript:"";for(let f=0;f<p;f++)n.append(h[f],Y()),O.nextNode(),l.push({type:2,index:++r});n.append(h[p],Y())}}}else if(n.nodeType===8)if(n.data===Te)l.push({type:2,index:r});else{let h=-1;for(;(h=n.data.indexOf(S,h+1))!==-1;)l.push({type:7,index:r}),h+=S.length-1}r++}}static createElement(t,s){const i=P.createElement("template");return i.innerHTML=t,i}}function I(e,t,s=e,i){var o,a;if(t===C)return t;let n=i!==void 0?(o=s._$Co)==null?void 0:o[i]:s._$Cl;const r=K(t)?void 0:t._$litDirective$;return(n==null?void 0:n.constructor)!==r&&((a=n==null?void 0:n._$AO)==null||a.call(n,!1),r===void 0?n=void 0:(n=new r(e),n._$AT(e,s,i)),i!==void 0?(s._$Co??(s._$Co=[]))[i]=n:s._$Cl=n),n!==void 0&&(t=I(e,n._$AS(e,t.values),n,i)),t}class bs{constructor(t,s){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:s},parts:i}=this._$AD,n=((t==null?void 0:t.creationScope)??P).importNode(s,!0);O.currentNode=n;let r=O.nextNode(),o=0,a=0,l=i[0];for(;l!==void 0;){if(o===l.index){let c;l.type===2?c=new X(r,r.nextSibling,this,t):l.type===1?c=new l.ctor(r,l.name,l.strings,this,t):l.type===6&&(c=new As(r,this,t)),this._$AV.push(c),l=i[++a]}o!==(l==null?void 0:l.index)&&(r=O.nextNode(),o++)}return O.currentNode=P,n}p(t){let s=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,s),s+=i.strings.length-2):i._$AI(t[s])),s++}}class X{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,s,i,n){this.type=2,this._$AH=u,this._$AN=void 0,this._$AA=t,this._$AB=s,this._$AM=i,this.options=n,this._$Cv=(n==null?void 0:n.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const s=this._$AM;return s!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=s.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,s=this){t=I(this,t,s),K(t)?t===u||t==null||t===""?(this._$AH!==u&&this._$AR(),this._$AH=u):t!==this._$AH&&t!==C&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):ms(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==u&&K(this._$AH)?this._$AA.nextSibling.data=t:this.$(P.createTextNode(t)),this._$AH=t}g(t){var r;const{values:s,_$litType$:i}=t,n=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=Q.createElement(Pe(i.h,i.h[0]),this.options)),i);if(((r=this._$AH)==null?void 0:r._$AD)===n)this._$AH.p(s);else{const o=new bs(n,this),a=o.u(this.options);o.p(s),this.$(a),this._$AH=o}}_$AC(t){let s=ne.get(t.strings);return s===void 0&&ne.set(t.strings,s=new Q(t)),s}T(t){ke(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let i,n=0;for(const r of t)n===s.length?s.push(i=new X(this.k(Y()),this.k(Y()),this,this.options)):i=s[n],i._$AI(r),n++;n<s.length&&(this._$AR(i&&i._$AB.nextSibling,n),s.length=n)}_$AR(t=this._$AA.nextSibling,s){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,s);t&&t!==this._$AB;){const n=t.nextSibling;t.remove(),t=n}}setConnected(t){var s;this._$AM===void 0&&(this._$Cv=t,(s=this._$AP)==null||s.call(this,t))}}class $t{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,s,i,n,r){this.type=1,this._$AH=u,this._$AN=void 0,this.element=t,this.name=s,this._$AM=n,this.options=r,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=u}_$AI(t,s=this,i,n){const r=this.strings;let o=!1;if(r===void 0)t=I(this,t,s,0),o=!K(t)||t!==this._$AH&&t!==C,o&&(this._$AH=t);else{const a=t;let l,c;for(t=r[0],l=0;l<r.length-1;l++)c=I(this,a[i+l],s,l),c===C&&(c=this._$AH[l]),o||(o=!K(c)||c!==this._$AH[l]),c===u?t=u:t!==u&&(t+=(c??"")+r[l+1]),this._$AH[l]=c}o&&!n&&this.O(t)}O(t){t===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class _s extends $t{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===u?void 0:t}}let ws=class extends $t{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==u)}};class xs extends $t{constructor(t,s,i,n,r){super(t,s,i,n,r),this.type=5}_$AI(t,s=this){if((t=I(this,t,s,0)??u)===C)return;const i=this._$AH,n=t===u&&i!==u||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,r=t!==u&&(i===u||n);n&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var s;typeof this._$AH=="function"?this._$AH.call(((s=this.options)==null?void 0:s.host)??this.element,t):this._$AH.handleEvent(t)}}class As{constructor(t,s,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=s,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){I(this,t)}}const Et=G.litHtmlPolyfillSupport;Et==null||Et(Q,X),(G.litHtmlVersions??(G.litHtmlVersions=[])).push("3.0.2");const Ss=(e,t,s)=>{const i=(s==null?void 0:s.renderBefore)??t;let n=i._$litPart$;if(n===void 0){const r=(s==null?void 0:s.renderBefore)??null;i._$litPart$=n=new X(t.insertBefore(Y(),r),r,void 0,s??{})}return n._$AI(e),n};/**
|
16
16
|
* @license
|
17
17
|
* Copyright 2017 Google LLC
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
19
|
-
*/let v=class extends N{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var s;const t=super.createRenderRoot();return(s=this.renderOptions).renderBefore??(s.renderBefore=t.firstChild),t}update(t){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ss(s,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return C}};var Se;v._$litElement$=!0,v.finalized=!0,(Se=globalThis.litElementHydrateSupport)==null||Se.call(globalThis,{LitElement:v});const Ct=globalThis.litElementPolyfillSupport;Ct==null||Ct({LitElement:v});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.1");const Le={name:"send",svg:'<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.41642 6.29292C5.99705 5.18016 3.38612 7.41823 4.12858 9.96847L10.5427 32L4.12858 54.0315C3.38612 56.5818 5.99704 58.8198 8.41642 57.7071L58.1942 34.8125C60.6019 33.7051 60.6019 30.2949 58.1942 29.1875L8.41642 6.29292ZM14.2569 29.9351L8.74174 10.9913L49.9295 29.9351H14.2569ZM14.2568 34.0651L8.74174 53.0087L49.9291 34.0651H14.2568Z"/></svg>'},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 M,Ue,gt,Ne=!1,at=!1,Dt=!1,y=!1,re=null,Pt=!1;const mt=typeof window<"u"?window:{},x=mt.document||{head:{}},He=mt.HTMLElement||class{},m={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,s,i)=>e.addEventListener(t,s,i),rel:(e,t,s,i)=>e.removeEventListener(t,s,i),ce:(e,t)=>new CustomEvent(e,t)},Es=(()=>{let e=!1;try{x.addEventListener("e",null,Object.defineProperty({},"passive",{get(){e=!0}}))}catch{}return e})(),Cs=e=>Promise.resolve(e),Ts=(()=>{try{return new CSSStyleSheet,typeof new CSSStyleSheet().replace=="function"}catch{}return!1})(),Me=(e,t,s,i)=>{s&&s.map(([n,r,o])=>{const a=Os(e,n),l=ks(t,o),c=Ps(n);m.ael(a,r,l,c),(t.$rmListeners$=t.$rmListeners$||[]).push(()=>m.rel(a,r,l,c))})},ks=(e,t)=>s=>{try{H.lazyLoad||e.$hostElement$[t](s)}catch(i){J(i)}},Os=(e,t)=>t&4?x:t&8?mt:t&16?x.body:e,Ps=e=>Es?{passive:(e&1)!==0,capture:(e&2)!==0}:(e&2)!==0,oe="http://www.w3.org/1999/xlink",L=(e,t="")=>()=>{},ae=new WeakMap,Ls=(e,t,s)=>{let i=dt.get(e);Ts&&s?(i=i||new CSSStyleSheet,i.replace(t)):i=t,dt.set(e,i)},Us=(e,t,s,i)=>{let n=Re(t,s),r=dt.get(n);if(e=e.nodeType===11?e:x,r)if(typeof r=="string"){e=e.head||e;let o=ae.get(e),a;o||ae.set(e,o=new Set),o.has(n)||(a=x.createElement("style"),a.innerHTML=r,e.insertBefore(a,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]);return n},Ns=e=>{const t=e.$cmpMeta$,s=e.$hostElement$,i=t.$flags$,n=L("attachStyles",t.$tagName$),r=Us(s.shadowRoot?s.shadowRoot:s.getRootNode(),t,e.$modeName$);i&10&&(s["s-sc"]=r,s.classList.add(r+"-h"),i&2&&s.classList.add(r+"-s")),n()},Re=(e,t)=>"sc-"+(t&&e.$flags$&32?e.$tagName$+"-"+t:e.$tagName$),Hs=e=>ci.map(t=>t(e)).find(t=>!!t),le={},Ms="http://www.w3.org/2000/svg",Rs="http://www.w3.org/1999/xhtml",js=e=>e!=null,It=e=>(e=typeof e,e==="object"||e==="function"),j=(e,t,...s)=>{let i=null,n=null,r=null,o=!1,a=!1,l=[];const c=d=>{for(let p=0;p<d.length;p++)i=d[p],Array.isArray(i)?c(i):i!=null&&typeof i!="boolean"&&((o=typeof e!="function"&&!It(i))&&(i=String(i)),o&&a?l[l.length-1].$text$+=i:l.push(o?lt(null,i):i),a=o)};if(c(s),t){t.key&&(n=t.key),t.name&&(r=t.name);{const d=t.className||t.class;d&&(t.class=typeof d!="object"?d:Object.keys(d).filter(p=>d[p]).join(" "))}}if(typeof e=="function")return e(t===null?{}:t,l,Is);const h=lt(e,null);return h.$attrs$=t,l.length>0&&(h.$children$=l),h.$key$=n,h.$name$=r,h},lt=(e,t)=>{const s={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};return s.$attrs$=null,s.$key$=null,s.$name$=null,s},Bt={},Ds=e=>e&&e.$tag$===Bt,Is={forEach:(e,t)=>e.map(ce).forEach(t),map:(e,t)=>e.map(ce).map(t).map(Bs)},ce=e=>({vattrs:e.$attrs$,vchildren:e.$children$,vkey:e.$key$,vname:e.$name$,vtag:e.$tag$,vtext:e.$text$}),Bs=e=>{if(typeof e.vtag=="function"){const s=Object.assign({},e.vattrs);return e.vkey&&(s.key=e.vkey),e.vname&&(s.name=e.vname),j(e.vtag,s,...e.vchildren||[])}const t=lt(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,s,i,n,r)=>{if(s!==i){let o=fe(e,t),a=t.toLowerCase();if(t==="class"){const l=e.classList,c=he(s),h=he(i);l.remove(...c.filter(d=>d&&!h.includes(d))),l.add(...h.filter(d=>d&&!c.includes(d)))}else if(t==="style"){for(const l in s)(!i||i[l]==null)&&(l.includes("-")?e.style.removeProperty(l):e.style[l]="");for(const l in i)(!s||i[l]!==s[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):fe(mt,a)?t=a.slice(2):t=a[2]+t.slice(3),s&&m.rel(e,t,s,!1),i&&m.ael(e,t,i,!1);else{const l=It(i);if((o||l&&i!==null)&&!n)try{if(e.tagName.includes("-"))e[t]=i;else{let h=i??"";t==="list"?o=!1:(s==null||e[t]!=h)&&(e[t]=h)}}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(oe,t):e.removeAttribute(t)):(!o||r&4||n)&&!l&&(i=i===!0?"":i,c?e.setAttributeNS(oe,t,i):e.setAttribute(t,i))}}},zs=/\s/,he=e=>e?e.split(zs):[],je=(e,t,s,i)=>{const n=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,r=e&&e.$attrs$||le,o=t.$attrs$||le;for(i in r)i in o||de(n,i,r[i],void 0,s,t.$flags$);for(i in o)de(n,i,r[i],o[i],s,t.$flags$)},ct=(e,t,s,i)=>{let n=t.$children$[s],r=0,o,a,l;if(Ne||(Dt=!0,n.$tag$==="slot"&&(M&&i.classList.add(M+"-s"),n.$flags$|=n.$children$?2:1)),n.$text$!==null)o=n.$elm$=x.createTextNode(n.$text$);else if(n.$flags$&1)o=n.$elm$=x.createTextNode("");else{if(y||(y=n.$tag$==="svg"),o=n.$elm$=x.createElementNS(y?Ms:Rs,n.$flags$&2?"slot-fb":n.$tag$),y&&n.$tag$==="foreignObject"&&(y=!1),je(null,n,y),js(M)&&o["s-si"]!==M&&o.classList.add(o["s-si"]=M),n.$children$)for(r=0;r<n.$children$.length;++r)a=ct(e,n,r,o),a&&o.appendChild(a);n.$tag$==="svg"?y=!1:o.tagName==="foreignObject"&&(y=!0)}return o["s-hn"]=gt,n.$flags$&3&&(o["s-sr"]=!0,o["s-cr"]=Ue,o["s-sn"]=n.$name$||"",l=e&&e.$children$&&e.$children$[s],l&&l.$tag$===n.$tag$&&e.$elm$&&Z(e.$elm$,!1)),o},Z=(e,t)=>{m.$flags$|=1;const s=e.childNodes;for(let i=s.length-1;i>=0;i--){const n=s[i];n["s-hn"]!==gt&&n["s-ol"]&&(Be(n).insertBefore(n,zt(n)),n["s-ol"].remove(),n["s-ol"]=void 0,Dt=!0),t&&Z(n,t)}m.$flags$&=-2},De=(e,t,s,i,n,r)=>{let o=e["s-cr"]&&e["s-cr"].parentNode||e,a;for(o.shadowRoot&&o.tagName===gt&&(o=o.shadowRoot);n<=r;++n)i[n]&&(a=ct(null,s,n,e),a&&(i[n].$elm$=a,o.insertBefore(a,zt(t))))},Ie=(e,t,s,i,n)=>{for(;t<=s;++t)(i=e[t])&&(n=i.$elm$,We(i),at=!0,n["s-ol"]?n["s-ol"].remove():Z(n,!0),n.remove())},Fs=(e,t,s,i)=>{let n=0,r=0,o=0,a=0,l=t.length-1,c=t[0],h=t[l],d=i.length-1,p=i[0],f=i[d],w,et;for(;n<=l&&r<=d;)if(c==null)c=t[++n];else if(h==null)h=t[--l];else if(p==null)p=i[++r];else if(f==null)f=i[--d];else if(st(c,p))R(c,p),c=t[++n],p=i[++r];else if(st(h,f))R(h,f),h=t[--l],f=i[--d];else if(st(c,f))(c.$tag$==="slot"||f.$tag$==="slot")&&Z(c.$elm$.parentNode,!1),R(c,f),e.insertBefore(c.$elm$,h.$elm$.nextSibling),c=t[++n],f=i[--d];else if(st(h,p))(c.$tag$==="slot"||f.$tag$==="slot")&&Z(h.$elm$.parentNode,!1),R(h,p),e.insertBefore(h.$elm$,c.$elm$),h=t[--l],p=i[++r];else{for(o=-1,a=n;a<=l;++a)if(t[a]&&t[a].$key$!==null&&t[a].$key$===p.$key$){o=a;break}o>=0?(et=t[o],et.$tag$!==p.$tag$?w=ct(t&&t[r],s,o,e):(R(et,p),t[o]=void 0,w=et.$elm$),p=i[++r]):(w=ct(t&&t[r],s,r,e),p=i[++r]),w&&Be(c.$elm$).insertBefore(w,zt(c.$elm$))}n>l?De(e,i[d+1]==null?null:i[d+1].$elm$,s,i,r,d):r>d&&Ie(t,n,l)},st=(e,t)=>e.$tag$===t.$tag$?e.$tag$==="slot"?e.$name$===t.$name$:e.$key$===t.$key$:!1,zt=e=>e&&e["s-ol"]||e,Be=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,R=(e,t)=>{const s=t.$elm$=e.$elm$,i=e.$children$,n=t.$children$,r=t.$tag$,o=t.$text$;let a;o===null?(y=r==="svg"?!0:r==="foreignObject"?!1:y,r==="slot"||je(e,t,y),i!==null&&n!==null?Fs(s,i,t,n):n!==null?(e.$text$!==null&&(s.textContent=""),De(s,null,t,n,0,n.length-1)):i!==null&&Ie(i,0,i.length-1),y&&r==="svg"&&(y=!1)):(a=s["s-cr"])?a.parentNode.textContent=o:e.$text$!==o&&(s.data=o)},ze=e=>{let t=e.childNodes,s,i,n,r,o,a;for(i=0,n=t.length;i<n;i++)if(s=t[i],s.nodeType===1){if(s["s-sr"]){for(o=s["s-sn"],s.hidden=!1,r=0;r<n;r++)if(a=t[r].nodeType,t[r]["s-hn"]!==s["s-hn"]||o!==""){if(a===1&&o===t[r].getAttribute("slot")){s.hidden=!0;break}}else if(a===1||a===3&&t[r].textContent.trim()!==""){s.hidden=!0;break}}ze(s)}},b=[],Fe=e=>{let t,s,i,n,r,o,a=0,l=e.childNodes,c=l.length;for(;a<c;a++){if(t=l[a],t["s-sr"]&&(s=t["s-cr"])&&s.parentNode)for(i=s.parentNode.childNodes,n=t["s-sn"],o=i.length-1;o>=0;o--)s=i[o],!s["s-cn"]&&!s["s-nr"]&&s["s-hn"]!==t["s-hn"]&&(pe(s,n)?(r=b.find(h=>h.$nodeToRelocate$===s),at=!0,s["s-sn"]=s["s-sn"]||n,r?r.$slotRefNode$=t:b.push({$slotRefNode$:t,$nodeToRelocate$:s}),s["s-sr"]&&b.map(h=>{pe(h.$nodeToRelocate$,s["s-sn"])&&(r=b.find(d=>d.$nodeToRelocate$===s),r&&!h.$slotRefNode$&&(h.$slotRefNode$=r.$slotRefNode$))})):b.some(h=>h.$nodeToRelocate$===s)||b.push({$nodeToRelocate$:s}));t.nodeType===1&&Fe(t)}},pe=(e,t)=>e.nodeType===1?e.getAttribute("slot")===null&&t===""||e.getAttribute("slot")===t:e["s-sn"]===t?!0:t==="",We=e=>{e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(We)},Ws=(e,t)=>{const s=e.$hostElement$,i=e.$cmpMeta$,n=e.$vnode$||lt(null,null),r=Ds(t)?t:j(null,null,t);gt=s.tagName,i.$attrsToReflect$&&(r.$attrs$=r.$attrs$||{},i.$attrsToReflect$.map(([o,a])=>r.$attrs$[a]=s[o])),r.$tag$=null,r.$flags$|=4,e.$vnode$=r,r.$elm$=n.$elm$=s.shadowRoot||s,M=s["s-sc"],Ue=s["s-cr"],Ne=(i.$flags$&1)!==0,at=!1,R(n,r);{if(m.$flags$|=1,Dt){Fe(r.$elm$);let o,a,l,c,h,d,p=0;for(;p<b.length;p++)o=b[p],a=o.$nodeToRelocate$,a["s-ol"]||(l=x.createTextNode(""),l["s-nr"]=a,a.parentNode.insertBefore(a["s-ol"]=l,a));for(p=0;p<b.length;p++)if(o=b[p],a=o.$nodeToRelocate$,o.$slotRefNode$){for(c=o.$slotRefNode$.parentNode,h=o.$slotRefNode$.nextSibling,l=a["s-ol"];l=l.previousSibling;)if(d=l["s-nr"],d&&d["s-sn"]===a["s-sn"]&&c===d.parentNode&&(d=d.nextSibling,!d||!d["s-nr"])){h=d;break}(!h&&c!==a.parentNode||a.nextSibling!==h)&&a!==h&&(!a["s-hn"]&&a["s-ol"]&&(a["s-hn"]=a["s-ol"].parentNode.nodeName),c.insertBefore(a,h))}else a.nodeType===1&&(a.hidden=!0)}at&&ze(r.$elm$),m.$flags$&=-2,b.length=0}},Gs=e=>e,qs=(e,t,s)=>{const i=Gs(e);return{emit:n=>Ys(i,t,{bubbles:!!(s&4),composed:!!(s&2),cancelable:!!(s&1),detail:n})}},Ys=(e,t,s)=>{const i=m.ce(t,s);return e.dispatchEvent(i),i},Ks=(e,t)=>{},Ge=(e,t)=>(e.$flags$|=16,Ks(e,e.$ancestorComponent$),pi(()=>Qs(e,t))),Qs=(e,t)=>{const s=e.$hostElement$,i=L("scheduleUpdate",e.$cmpMeta$.$tagName$),n=s;let r;return t?r=D(n,"componentWillLoad"):r=D(n,"componentWillUpdate"),r=ue(r,()=>D(n,"componentWillRender")),i(),ue(r,()=>Zs(e,n,t))},Zs=async(e,t,s)=>{const i=e.$hostElement$,n=L("update",e.$cmpMeta$.$tagName$);i["s-rc"],s&&Ns(e);const r=L("render",e.$cmpMeta$.$tagName$);Xs(e,t,i),r(),n(),Js(e)},Xs=(e,t,s)=>{try{re=t,t=t.render&&t.render(),e.$flags$&=-17,e.$flags$|=2,(H.hasRenderFn||H.reflect)&&(H.vdomRender||H.reflect)&&(H.hydrateServerSide||Ws(e,t))}catch(a){J(a,e.$hostElement$)}return re=null,null},Js=e=>{const t=e.$cmpMeta$.$tagName$,s=e.$hostElement$,i=L("postUpdate",t),n=s;e.$ancestorComponent$,D(n,"componentDidRender"),e.$flags$&64?(D(n,"componentDidUpdate"),i()):(e.$flags$|=64,D(n,"componentDidLoad"),i())},D=(e,t,s)=>{if(e&&e[t])try{return e[t](s)}catch(i){J(i)}},ue=(e,t)=>e&&e.then?e.then(t):t(),Vs=(e,t)=>e!=null&&!It(e)?t&4?e==="false"?!1:e===""||!!e:t&2?parseFloat(e):t&1?String(e):e:e,ti=(e,t)=>vt(e).$instanceValues$.get(t),ei=(e,t,s,i)=>{const n=vt(e),r=e,o=n.$instanceValues$.get(t),a=n.$flags$,l=r;s=Vs(s,i.$members$[t][0]);const c=Number.isNaN(o)&&Number.isNaN(s);if(s!==o&&!c){n.$instanceValues$.set(t,s);{if(i.$watchers$&&a&128){const d=i.$watchers$[t];d&&d.map(p=>{try{l[p](s,o,t)}catch(f){J(f,r)}})}if((a&18)===2){if(l.componentShouldUpdate&&l.componentShouldUpdate(s,o,t)===!1)return;Ge(n,!1)}}}},si=(e,t,s)=>{if(t.$members$){e.watchers&&(t.$watchers$=e.watchers);const i=Object.entries(t.$members$),n=e.prototype;i.map(([r,[o]])=>{(o&31||o&32)&&Object.defineProperty(n,r,{get(){return ti(this,r)},set(a){ei(this,r,a,t)},configurable:!0,enumerable:!0})});{const r=new Map;n.attributeChangedCallback=function(o,a,l){m.jmp(()=>{const c=r.get(o);if(this.hasOwnProperty(c))l=this[c],delete this[c];else if(n.hasOwnProperty(c)&&typeof this[c]=="number"&&this[c]==l)return;this[c]=l===null&&typeof this[c]=="boolean"?!1:l})},e.observedAttributes=i.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 e},ii=async(e,t,s,i,n)=>{if(!(t.$flags$&32)&&(n=e.constructor,t.$flags$|=32,customElements.whenDefined(s.$tagName$).then(()=>t.$flags$|=128),n.style)){let o=n.style;typeof o!="string"&&(o=o[t.$modeName$=Hs(e)]);const a=Re(s,t.$modeName$);if(!dt.has(a)){const l=L("registerStyles",s.$tagName$);Ls(a,o,!!(s.$flags$&1)),l()}}t.$ancestorComponent$,(()=>Ge(t,!0))()},ni=e=>{},ri=e=>{if(!(m.$flags$&1)){const t=vt(e),s=t.$cmpMeta$,i=L("connectedCallback",s.$tagName$);t.$flags$&1?(Me(e,t,s.$listeners$),ni(t.$lazyInstance$)):(t.$flags$|=1,s.$flags$&12&&oi(e),s.$members$&&Object.entries(s.$members$).map(([n,[r]])=>{if(r&31&&e.hasOwnProperty(n)){const o=e[n];delete e[n],e[n]=o}}),ii(e,t,s)),i()}},oi=e=>{const t=e["s-cr"]=x.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)},ai=e=>{if(!(m.$flags$&1)){const t=vt(e);t.$rmListeners$&&(t.$rmListeners$.map(s=>s()),t.$rmListeners$=void 0)}},qe=(e,t)=>{const s={$flags$:t[0],$tagName$:t[1]};s.$members$=t[2],s.$listeners$=t[3],s.$watchers$=e.$watchers$,s.$attrsToReflect$=[];const i=e.prototype.connectedCallback,n=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__registerHost(){li(this,s)},connectedCallback(){ri(this),i&&i.call(this)},disconnectedCallback(){ai(this),n&&n.call(this)},__attachShadow(){this.attachShadow({mode:"open",delegatesFocus:!!(s.$flags$&16)})}}),e.is=s.$tagName$,si(e,s)},Ye=new WeakMap,vt=e=>Ye.get(e),li=(e,t)=>{const s={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};return Me(e,s,t.$listeners$),Ye.set(e,s)},fe=(e,t)=>t in e,J=(e,t)=>(0,console.error)(e,t),dt=new Map,ci=[],$e=[],Ke=[],di=(e,t)=>s=>{e.push(s),Pt||(Pt=!0,t&&m.$flags$&4?hi(Lt):m.raf(Lt))},ge=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(s){J(s)}e.length=0},Lt=()=>{ge($e),ge(Ke),(Pt=$e.length>0)&&m.raf(Lt)},hi=e=>Cs().then(e),pi=di(Ke,!0),ui=(e={})=>{const{content:t="",title:s,attributes:i=[]}=e;let n="",r=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},...i];return s&&(n=`<title>${s}</title>`),`<svg ${r.map(a=>`${a.name}="${a.value}"`).join(" ")}>${n}${t}</svg>`},fi=e=>e.replace(/<(\/?)svg([^>]*)>/g,"").trim();function $i(e){return`${e.getFullYear()}.${e.getMonth()+1}`}class gi{constructor(t){this.voca_component=t,this.voca_added=$i(new Date)}}const mi="telia-vst{display:none}",vi=qe(class extends He{constructor(){super(),this.__registerHost(),this.vocaInternalUStats=qs(this,"vocaInternalUStats",7)}connectedCallback(){this.vocaInternalUStats.emit(new gi(this.dataTrackingId))}render(){return j(Bt,null)}static get style(){return mi}},[0,"telia-vst",{dataTrackingId:[1,"data-tracking-id"]}]);function Qe(){if(typeof customElements>"u")return;["telia-vst"].forEach(t=>{switch(t){case"telia-vst":customElements.get(t)||customElements.define(t,vi);break}})}Qe();function Ut(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{vocadsIcons:void 0,vocadsIconsRegistered:!1}}function yi(){if(typeof Ut().vocadsIcons!==void 0)return Ut().vocadsIcons}function bi(){return Ut().vocadsIconsRegistered}const _i=".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))}",wi=qe(class extends He{constructor(){super(),this.__registerHost(),this.size="md",this.allyTitle=null,this.dataTrackingId="telia-icon"}getSvgString(){if(this.svg)return this.svg;if(bi()&&this.name){const e=yi();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 s=ui({content:fi(e),attributes:t,title:this.allyTitle});return j(Bt,{class:`telia-icon telia-icon--${this.size}`},j("span",{"aria-label":this.allyTitle,class:"telia-icon__container",innerHTML:s}),j("telia-vst",{dataTrackingId:this.dataTrackingId}))}static get style(){return _i}},[0,"telia-icon",{name:[1],svg:[1],size:[1],allyTitle:[1,"ally-title"],dataTestid:[1,"data-testid"]}]);function xi(){if(typeof customElements>"u")return;["telia-icon","telia-vst"].forEach(t=>{switch(t){case"telia-icon":customElements.get(t)||customElements.define(t,wi);break;case"telia-vst":customElements.get(t)||Qe();break}})}xi();/**
|
19
|
+
*/let v=class extends N{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var s;const t=super.createRenderRoot();return(s=this.renderOptions).renderBefore??(s.renderBefore=t.firstChild),t}update(t){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ss(s,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return C}};var Se;v._$litElement$=!0,v.finalized=!0,(Se=globalThis.litElementHydrateSupport)==null||Se.call(globalThis,{LitElement:v});const Ct=globalThis.litElementPolyfillSupport;Ct==null||Ct({LitElement:v});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.1");const Le={name:"send",svg:'<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.41642 6.29292C5.99705 5.18016 3.38612 7.41823 4.12858 9.96847L10.5427 32L4.12858 54.0315C3.38612 56.5818 5.99704 58.8198 8.41642 57.7071L58.1942 34.8125C60.6019 33.7051 60.6019 30.2949 58.1942 29.1875L8.41642 6.29292ZM14.2569 29.9351L8.74174 10.9913L49.9295 29.9351H14.2569ZM14.2568 34.0651L8.74174 53.0087L49.9291 34.0651H14.2568Z"/></svg>'},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 M,Ue,gt,Ne=!1,at=!1,Dt=!1,y=!1,re=null,Pt=!1;const mt=typeof window<"u"?window:{},x=mt.document||{head:{}},He=mt.HTMLElement||class{},m={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,s,i)=>e.addEventListener(t,s,i),rel:(e,t,s,i)=>e.removeEventListener(t,s,i),ce:(e,t)=>new CustomEvent(e,t)},Es=(()=>{let e=!1;try{x.addEventListener("e",null,Object.defineProperty({},"passive",{get(){e=!0}}))}catch{}return e})(),Cs=e=>Promise.resolve(e),Ts=(()=>{try{return new CSSStyleSheet,typeof new CSSStyleSheet().replace=="function"}catch{}return!1})(),Me=(e,t,s,i)=>{s&&s.map(([n,r,o])=>{const a=Os(e,n),l=ks(t,o),c=Ps(n);m.ael(a,r,l,c),(t.$rmListeners$=t.$rmListeners$||[]).push(()=>m.rel(a,r,l,c))})},ks=(e,t)=>s=>{try{H.lazyLoad||e.$hostElement$[t](s)}catch(i){J(i)}},Os=(e,t)=>t&4?x:t&8?mt:t&16?x.body:e,Ps=e=>Es?{passive:(e&1)!==0,capture:(e&2)!==0}:(e&2)!==0,oe="http://www.w3.org/1999/xlink",L=(e,t="")=>()=>{},ae=new WeakMap,Ls=(e,t,s)=>{let i=dt.get(e);Ts&&s?(i=i||new CSSStyleSheet,i.replace(t)):i=t,dt.set(e,i)},Us=(e,t,s,i)=>{let n=Re(t,s),r=dt.get(n);if(e=e.nodeType===11?e:x,r)if(typeof r=="string"){e=e.head||e;let o=ae.get(e),a;o||ae.set(e,o=new Set),o.has(n)||(a=x.createElement("style"),a.innerHTML=r,e.insertBefore(a,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]);return n},Ns=e=>{const t=e.$cmpMeta$,s=e.$hostElement$,i=t.$flags$,n=L("attachStyles",t.$tagName$),r=Us(s.shadowRoot?s.shadowRoot:s.getRootNode(),t,e.$modeName$);i&10&&(s["s-sc"]=r,s.classList.add(r+"-h"),i&2&&s.classList.add(r+"-s")),n()},Re=(e,t)=>"sc-"+(t&&e.$flags$&32?e.$tagName$+"-"+t:e.$tagName$),Hs=e=>ci.map(t=>t(e)).find(t=>!!t),le={},Ms="http://www.w3.org/2000/svg",Rs="http://www.w3.org/1999/xhtml",js=e=>e!=null,It=e=>(e=typeof e,e==="object"||e==="function"),j=(e,t,...s)=>{let i=null,n=null,r=null,o=!1,a=!1,l=[];const c=h=>{for(let p=0;p<h.length;p++)i=h[p],Array.isArray(i)?c(i):i!=null&&typeof i!="boolean"&&((o=typeof e!="function"&&!It(i))&&(i=String(i)),o&&a?l[l.length-1].$text$+=i:l.push(o?lt(null,i):i),a=o)};if(c(s),t){t.key&&(n=t.key),t.name&&(r=t.name);{const h=t.className||t.class;h&&(t.class=typeof h!="object"?h:Object.keys(h).filter(p=>h[p]).join(" "))}}if(typeof e=="function")return e(t===null?{}:t,l,Is);const d=lt(e,null);return d.$attrs$=t,l.length>0&&(d.$children$=l),d.$key$=n,d.$name$=r,d},lt=(e,t)=>{const s={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};return s.$attrs$=null,s.$key$=null,s.$name$=null,s},Bt={},Ds=e=>e&&e.$tag$===Bt,Is={forEach:(e,t)=>e.map(ce).forEach(t),map:(e,t)=>e.map(ce).map(t).map(Bs)},ce=e=>({vattrs:e.$attrs$,vchildren:e.$children$,vkey:e.$key$,vname:e.$name$,vtag:e.$tag$,vtext:e.$text$}),Bs=e=>{if(typeof e.vtag=="function"){const s=Object.assign({},e.vattrs);return e.vkey&&(s.key=e.vkey),e.vname&&(s.name=e.vname),j(e.vtag,s,...e.vchildren||[])}const t=lt(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,s,i,n,r)=>{if(s!==i){let o=fe(e,t),a=t.toLowerCase();if(t==="class"){const l=e.classList,c=he(s),d=he(i);l.remove(...c.filter(h=>h&&!d.includes(h))),l.add(...d.filter(h=>h&&!c.includes(h)))}else if(t==="style"){for(const l in s)(!i||i[l]==null)&&(l.includes("-")?e.style.removeProperty(l):e.style[l]="");for(const l in i)(!s||i[l]!==s[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):fe(mt,a)?t=a.slice(2):t=a[2]+t.slice(3),s&&m.rel(e,t,s,!1),i&&m.ael(e,t,i,!1);else{const l=It(i);if((o||l&&i!==null)&&!n)try{if(e.tagName.includes("-"))e[t]=i;else{let d=i??"";t==="list"?o=!1:(s==null||e[t]!=d)&&(e[t]=d)}}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(oe,t):e.removeAttribute(t)):(!o||r&4||n)&&!l&&(i=i===!0?"":i,c?e.setAttributeNS(oe,t,i):e.setAttribute(t,i))}}},zs=/\s/,he=e=>e?e.split(zs):[],je=(e,t,s,i)=>{const n=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,r=e&&e.$attrs$||le,o=t.$attrs$||le;for(i in r)i in o||de(n,i,r[i],void 0,s,t.$flags$);for(i in o)de(n,i,r[i],o[i],s,t.$flags$)},ct=(e,t,s,i)=>{let n=t.$children$[s],r=0,o,a,l;if(Ne||(Dt=!0,n.$tag$==="slot"&&(M&&i.classList.add(M+"-s"),n.$flags$|=n.$children$?2:1)),n.$text$!==null)o=n.$elm$=x.createTextNode(n.$text$);else if(n.$flags$&1)o=n.$elm$=x.createTextNode("");else{if(y||(y=n.$tag$==="svg"),o=n.$elm$=x.createElementNS(y?Ms:Rs,n.$flags$&2?"slot-fb":n.$tag$),y&&n.$tag$==="foreignObject"&&(y=!1),je(null,n,y),js(M)&&o["s-si"]!==M&&o.classList.add(o["s-si"]=M),n.$children$)for(r=0;r<n.$children$.length;++r)a=ct(e,n,r,o),a&&o.appendChild(a);n.$tag$==="svg"?y=!1:o.tagName==="foreignObject"&&(y=!0)}return o["s-hn"]=gt,n.$flags$&3&&(o["s-sr"]=!0,o["s-cr"]=Ue,o["s-sn"]=n.$name$||"",l=e&&e.$children$&&e.$children$[s],l&&l.$tag$===n.$tag$&&e.$elm$&&Z(e.$elm$,!1)),o},Z=(e,t)=>{m.$flags$|=1;const s=e.childNodes;for(let i=s.length-1;i>=0;i--){const n=s[i];n["s-hn"]!==gt&&n["s-ol"]&&(Be(n).insertBefore(n,zt(n)),n["s-ol"].remove(),n["s-ol"]=void 0,Dt=!0),t&&Z(n,t)}m.$flags$&=-2},De=(e,t,s,i,n,r)=>{let o=e["s-cr"]&&e["s-cr"].parentNode||e,a;for(o.shadowRoot&&o.tagName===gt&&(o=o.shadowRoot);n<=r;++n)i[n]&&(a=ct(null,s,n,e),a&&(i[n].$elm$=a,o.insertBefore(a,zt(t))))},Ie=(e,t,s,i,n)=>{for(;t<=s;++t)(i=e[t])&&(n=i.$elm$,We(i),at=!0,n["s-ol"]?n["s-ol"].remove():Z(n,!0),n.remove())},Fs=(e,t,s,i)=>{let n=0,r=0,o=0,a=0,l=t.length-1,c=t[0],d=t[l],h=i.length-1,p=i[0],f=i[h],w,et;for(;n<=l&&r<=h;)if(c==null)c=t[++n];else if(d==null)d=t[--l];else if(p==null)p=i[++r];else if(f==null)f=i[--h];else if(st(c,p))R(c,p),c=t[++n],p=i[++r];else if(st(d,f))R(d,f),d=t[--l],f=i[--h];else if(st(c,f))(c.$tag$==="slot"||f.$tag$==="slot")&&Z(c.$elm$.parentNode,!1),R(c,f),e.insertBefore(c.$elm$,d.$elm$.nextSibling),c=t[++n],f=i[--h];else if(st(d,p))(c.$tag$==="slot"||f.$tag$==="slot")&&Z(d.$elm$.parentNode,!1),R(d,p),e.insertBefore(d.$elm$,c.$elm$),d=t[--l],p=i[++r];else{for(o=-1,a=n;a<=l;++a)if(t[a]&&t[a].$key$!==null&&t[a].$key$===p.$key$){o=a;break}o>=0?(et=t[o],et.$tag$!==p.$tag$?w=ct(t&&t[r],s,o,e):(R(et,p),t[o]=void 0,w=et.$elm$),p=i[++r]):(w=ct(t&&t[r],s,r,e),p=i[++r]),w&&Be(c.$elm$).insertBefore(w,zt(c.$elm$))}n>l?De(e,i[h+1]==null?null:i[h+1].$elm$,s,i,r,h):r>h&&Ie(t,n,l)},st=(e,t)=>e.$tag$===t.$tag$?e.$tag$==="slot"?e.$name$===t.$name$:e.$key$===t.$key$:!1,zt=e=>e&&e["s-ol"]||e,Be=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,R=(e,t)=>{const s=t.$elm$=e.$elm$,i=e.$children$,n=t.$children$,r=t.$tag$,o=t.$text$;let a;o===null?(y=r==="svg"?!0:r==="foreignObject"?!1:y,r==="slot"||je(e,t,y),i!==null&&n!==null?Fs(s,i,t,n):n!==null?(e.$text$!==null&&(s.textContent=""),De(s,null,t,n,0,n.length-1)):i!==null&&Ie(i,0,i.length-1),y&&r==="svg"&&(y=!1)):(a=s["s-cr"])?a.parentNode.textContent=o:e.$text$!==o&&(s.data=o)},ze=e=>{let t=e.childNodes,s,i,n,r,o,a;for(i=0,n=t.length;i<n;i++)if(s=t[i],s.nodeType===1){if(s["s-sr"]){for(o=s["s-sn"],s.hidden=!1,r=0;r<n;r++)if(a=t[r].nodeType,t[r]["s-hn"]!==s["s-hn"]||o!==""){if(a===1&&o===t[r].getAttribute("slot")){s.hidden=!0;break}}else if(a===1||a===3&&t[r].textContent.trim()!==""){s.hidden=!0;break}}ze(s)}},b=[],Fe=e=>{let t,s,i,n,r,o,a=0,l=e.childNodes,c=l.length;for(;a<c;a++){if(t=l[a],t["s-sr"]&&(s=t["s-cr"])&&s.parentNode)for(i=s.parentNode.childNodes,n=t["s-sn"],o=i.length-1;o>=0;o--)s=i[o],!s["s-cn"]&&!s["s-nr"]&&s["s-hn"]!==t["s-hn"]&&(pe(s,n)?(r=b.find(d=>d.$nodeToRelocate$===s),at=!0,s["s-sn"]=s["s-sn"]||n,r?r.$slotRefNode$=t:b.push({$slotRefNode$:t,$nodeToRelocate$:s}),s["s-sr"]&&b.map(d=>{pe(d.$nodeToRelocate$,s["s-sn"])&&(r=b.find(h=>h.$nodeToRelocate$===s),r&&!d.$slotRefNode$&&(d.$slotRefNode$=r.$slotRefNode$))})):b.some(d=>d.$nodeToRelocate$===s)||b.push({$nodeToRelocate$:s}));t.nodeType===1&&Fe(t)}},pe=(e,t)=>e.nodeType===1?e.getAttribute("slot")===null&&t===""||e.getAttribute("slot")===t:e["s-sn"]===t?!0:t==="",We=e=>{e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(We)},Ws=(e,t)=>{const s=e.$hostElement$,i=e.$cmpMeta$,n=e.$vnode$||lt(null,null),r=Ds(t)?t:j(null,null,t);gt=s.tagName,i.$attrsToReflect$&&(r.$attrs$=r.$attrs$||{},i.$attrsToReflect$.map(([o,a])=>r.$attrs$[a]=s[o])),r.$tag$=null,r.$flags$|=4,e.$vnode$=r,r.$elm$=n.$elm$=s.shadowRoot||s,M=s["s-sc"],Ue=s["s-cr"],Ne=(i.$flags$&1)!==0,at=!1,R(n,r);{if(m.$flags$|=1,Dt){Fe(r.$elm$);let o,a,l,c,d,h,p=0;for(;p<b.length;p++)o=b[p],a=o.$nodeToRelocate$,a["s-ol"]||(l=x.createTextNode(""),l["s-nr"]=a,a.parentNode.insertBefore(a["s-ol"]=l,a));for(p=0;p<b.length;p++)if(o=b[p],a=o.$nodeToRelocate$,o.$slotRefNode$){for(c=o.$slotRefNode$.parentNode,d=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"])){d=h;break}(!d&&c!==a.parentNode||a.nextSibling!==d)&&a!==d&&(!a["s-hn"]&&a["s-ol"]&&(a["s-hn"]=a["s-ol"].parentNode.nodeName),c.insertBefore(a,d))}else a.nodeType===1&&(a.hidden=!0)}at&&ze(r.$elm$),m.$flags$&=-2,b.length=0}},Gs=e=>e,qs=(e,t,s)=>{const i=Gs(e);return{emit:n=>Ys(i,t,{bubbles:!!(s&4),composed:!!(s&2),cancelable:!!(s&1),detail:n})}},Ys=(e,t,s)=>{const i=m.ce(t,s);return e.dispatchEvent(i),i},Ks=(e,t)=>{},Ge=(e,t)=>(e.$flags$|=16,Ks(e,e.$ancestorComponent$),pi(()=>Qs(e,t))),Qs=(e,t)=>{const s=e.$hostElement$,i=L("scheduleUpdate",e.$cmpMeta$.$tagName$),n=s;let r;return t?r=D(n,"componentWillLoad"):r=D(n,"componentWillUpdate"),r=ue(r,()=>D(n,"componentWillRender")),i(),ue(r,()=>Zs(e,n,t))},Zs=async(e,t,s)=>{const i=e.$hostElement$,n=L("update",e.$cmpMeta$.$tagName$);i["s-rc"],s&&Ns(e);const r=L("render",e.$cmpMeta$.$tagName$);Xs(e,t,i),r(),n(),Js(e)},Xs=(e,t,s)=>{try{re=t,t=t.render&&t.render(),e.$flags$&=-17,e.$flags$|=2,(H.hasRenderFn||H.reflect)&&(H.vdomRender||H.reflect)&&(H.hydrateServerSide||Ws(e,t))}catch(a){J(a,e.$hostElement$)}return re=null,null},Js=e=>{const t=e.$cmpMeta$.$tagName$,s=e.$hostElement$,i=L("postUpdate",t),n=s;e.$ancestorComponent$,D(n,"componentDidRender"),e.$flags$&64?(D(n,"componentDidUpdate"),i()):(e.$flags$|=64,D(n,"componentDidLoad"),i())},D=(e,t,s)=>{if(e&&e[t])try{return e[t](s)}catch(i){J(i)}},ue=(e,t)=>e&&e.then?e.then(t):t(),Vs=(e,t)=>e!=null&&!It(e)?t&4?e==="false"?!1:e===""||!!e:t&2?parseFloat(e):t&1?String(e):e:e,ti=(e,t)=>vt(e).$instanceValues$.get(t),ei=(e,t,s,i)=>{const n=vt(e),r=e,o=n.$instanceValues$.get(t),a=n.$flags$,l=r;s=Vs(s,i.$members$[t][0]);const c=Number.isNaN(o)&&Number.isNaN(s);if(s!==o&&!c){n.$instanceValues$.set(t,s);{if(i.$watchers$&&a&128){const h=i.$watchers$[t];h&&h.map(p=>{try{l[p](s,o,t)}catch(f){J(f,r)}})}if((a&18)===2){if(l.componentShouldUpdate&&l.componentShouldUpdate(s,o,t)===!1)return;Ge(n,!1)}}}},si=(e,t,s)=>{if(t.$members$){e.watchers&&(t.$watchers$=e.watchers);const i=Object.entries(t.$members$),n=e.prototype;i.map(([r,[o]])=>{(o&31||o&32)&&Object.defineProperty(n,r,{get(){return ti(this,r)},set(a){ei(this,r,a,t)},configurable:!0,enumerable:!0})});{const r=new Map;n.attributeChangedCallback=function(o,a,l){m.jmp(()=>{const c=r.get(o);if(this.hasOwnProperty(c))l=this[c],delete this[c];else if(n.hasOwnProperty(c)&&typeof this[c]=="number"&&this[c]==l)return;this[c]=l===null&&typeof this[c]=="boolean"?!1:l})},e.observedAttributes=i.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 e},ii=async(e,t,s,i,n)=>{if(!(t.$flags$&32)&&(n=e.constructor,t.$flags$|=32,customElements.whenDefined(s.$tagName$).then(()=>t.$flags$|=128),n.style)){let o=n.style;typeof o!="string"&&(o=o[t.$modeName$=Hs(e)]);const a=Re(s,t.$modeName$);if(!dt.has(a)){const l=L("registerStyles",s.$tagName$);Ls(a,o,!!(s.$flags$&1)),l()}}t.$ancestorComponent$,(()=>Ge(t,!0))()},ni=e=>{},ri=e=>{if(!(m.$flags$&1)){const t=vt(e),s=t.$cmpMeta$,i=L("connectedCallback",s.$tagName$);t.$flags$&1?(Me(e,t,s.$listeners$),ni(t.$lazyInstance$)):(t.$flags$|=1,s.$flags$&12&&oi(e),s.$members$&&Object.entries(s.$members$).map(([n,[r]])=>{if(r&31&&e.hasOwnProperty(n)){const o=e[n];delete e[n],e[n]=o}}),ii(e,t,s)),i()}},oi=e=>{const t=e["s-cr"]=x.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)},ai=e=>{if(!(m.$flags$&1)){const t=vt(e);t.$rmListeners$&&(t.$rmListeners$.map(s=>s()),t.$rmListeners$=void 0)}},qe=(e,t)=>{const s={$flags$:t[0],$tagName$:t[1]};s.$members$=t[2],s.$listeners$=t[3],s.$watchers$=e.$watchers$,s.$attrsToReflect$=[];const i=e.prototype.connectedCallback,n=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__registerHost(){li(this,s)},connectedCallback(){ri(this),i&&i.call(this)},disconnectedCallback(){ai(this),n&&n.call(this)},__attachShadow(){this.attachShadow({mode:"open",delegatesFocus:!!(s.$flags$&16)})}}),e.is=s.$tagName$,si(e,s)},Ye=new WeakMap,vt=e=>Ye.get(e),li=(e,t)=>{const s={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};return Me(e,s,t.$listeners$),Ye.set(e,s)},fe=(e,t)=>t in e,J=(e,t)=>(0,console.error)(e,t),dt=new Map,ci=[],$e=[],Ke=[],di=(e,t)=>s=>{e.push(s),Pt||(Pt=!0,t&&m.$flags$&4?hi(Lt):m.raf(Lt))},ge=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(s){J(s)}e.length=0},Lt=()=>{ge($e),ge(Ke),(Pt=$e.length>0)&&m.raf(Lt)},hi=e=>Cs().then(e),pi=di(Ke,!0),ui=(e={})=>{const{content:t="",title:s,attributes:i=[]}=e;let n="",r=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},...i];return s&&(n=`<title>${s}</title>`),`<svg ${r.map(a=>`${a.name}="${a.value}"`).join(" ")}>${n}${t}</svg>`},fi=e=>e.replace(/<(\/?)svg([^>]*)>/g,"").trim();function $i(e){return`${e.getFullYear()}.${e.getMonth()+1}`}class gi{constructor(t){this.voca_component=t,this.voca_added=$i(new Date)}}const mi="telia-vst{display:none}",vi=qe(class extends He{constructor(){super(),this.__registerHost(),this.vocaInternalUStats=qs(this,"vocaInternalUStats",7)}connectedCallback(){this.vocaInternalUStats.emit(new gi(this.dataTrackingId))}render(){return j(Bt,null)}static get style(){return mi}},[0,"telia-vst",{dataTrackingId:[1,"data-tracking-id"]}]);function Qe(){if(typeof customElements>"u")return;["telia-vst"].forEach(t=>{switch(t){case"telia-vst":customElements.get(t)||customElements.define(t,vi);break}})}Qe();function Ut(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{vocadsIcons:void 0,vocadsIconsRegistered:!1}}function yi(){if(typeof Ut().vocadsIcons!==void 0)return Ut().vocadsIcons}function bi(){return Ut().vocadsIconsRegistered}const _i=".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))}",wi=qe(class extends He{constructor(){super(),this.__registerHost(),this.size="md",this.allyTitle=null,this.dataTrackingId="telia-icon"}getSvgString(){if(this.svg)return this.svg;if(bi()&&this.name){const e=yi();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 s=ui({content:fi(e),attributes:t,title:this.allyTitle});return j(Bt,{class:`telia-icon telia-icon--${this.size}`},j("span",{"aria-label":this.allyTitle,class:"telia-icon__container",innerHTML:s}),j("telia-vst",{dataTrackingId:this.dataTrackingId}))}static get style(){return _i}},[0,"telia-icon",{name:[1],svg:[1],size:[1],allyTitle:[1,"ally-title"],dataTestid:[1,"data-testid"]}]);function xi(){if(typeof customElements>"u")return;["telia-icon","telia-vst"].forEach(t=>{switch(t){case"telia-icon":customElements.get(t)||customElements.define(t,wi);break;case"telia-vst":customElements.get(t)||Qe();break}})}xi();/**
|
20
20
|
* @license
|
21
21
|
* Copyright 2017 Google LLC
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
@@ -48,9 +48,9 @@
|
|
48
48
|
* @license
|
49
49
|
* Copyright 2018 Google LLC
|
50
50
|
* SPDX-License-Identifier: BSD-3-Clause
|
51
|
-
*/const Wt=bt(class extends Ft{constructor(e){var t;if(super(e),e.type!==yt.ATTRIBUTE||e.name!=="class"||((t=e.strings)==null?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){var i,n;if(this.it===void 0){this.it=new Set,e.strings!==void 0&&(this.st=new Set(e.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(const r in t)t[r]&&!((i=this.st)!=null&&i.has(r))&&this.it.add(r);return this.render(t)}const s=e.element.classList;for(const r of this.it)r in t||(s.remove(r),this.it.delete(r));for(const r in t){const o=!!t[r];o===this.it.has(r)||(n=this.st)!=null&&n.has(r)||(o?(s.add(r),this.it.add(r)):(s.remove(r),this.it.delete(r)))}return C}}),it=(e,t,s)=>{e&&s.style.setProperty(t,e)},ts=(e,t)=>{var s,i,n,r;it((s=e.colors)==null?void 0:s.primaryBackground,"--primary-background",t),it((i=e.colors)==null?void 0:i.textOnPrimaryBackground,"--text-on-primary-background",t),it((n=e.colors)==null?void 0:n.secondaryBackground,"--secondary-background",t),it((r=e.colors)==null?void 0:r.textOnSecondaryBackground,"--text-on-secondary-background",t)};var Pi=Object.defineProperty,Li=Object.getOwnPropertyDescriptor,_t=(e,t,s,i)=>{for(var n=i>1?void 0:i?Li(t,s):t,r=e.length-1,o;r>=0;r--)(o=e[r])&&(n=(i?o(t,s,n):o(n))||n);return i&&n&&Pi(t,s,n),n};class U extends v{constructor(){super(...arguments),this.active=!1,this.loaded=!1}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(),this.loaded=!0,this._applyBranding()}_toggleActive(){var t;if(!((t=this.application)!=null&&t.root)){console.warn("Could not activate widget. No root element assigned to widget.");return}this.active=!this.active,this.active?this.application.appendToDOM():this.application.hide()}_applyBranding(){var t;(t=this.application)!=null&&t.settings&&ts(this.application.settings.branding,this)}async _renderSymbol(){var a,l;const t=(a=this.application)==null?void 0:a.branding(),s=t==null?void 0:t.graphics.trigger;if(s)return $` <img src=${s} class="trigger-icon" alt="" /> `;const i=(
|
51
|
+
*/const Wt=bt(class extends Ft{constructor(e){var t;if(super(e),e.type!==yt.ATTRIBUTE||e.name!=="class"||((t=e.strings)==null?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){var i,n;if(this.it===void 0){this.it=new Set,e.strings!==void 0&&(this.st=new Set(e.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(const r in t)t[r]&&!((i=this.st)!=null&&i.has(r))&&this.it.add(r);return this.render(t)}const s=e.element.classList;for(const r of this.it)r in t||(s.remove(r),this.it.delete(r));for(const r in t){const o=!!t[r];o===this.it.has(r)||(n=this.st)!=null&&n.has(r)||(o?(s.add(r),this.it.add(r)):(s.remove(r),this.it.delete(r)))}return C}}),it=(e,t,s)=>{e&&s.style.setProperty(t,e)},ts=(e,t)=>{var s,i,n,r;it((s=e.colors)==null?void 0:s.primaryBackground,"--primary-background",t),it((i=e.colors)==null?void 0:i.textOnPrimaryBackground,"--text-on-primary-background",t),it((n=e.colors)==null?void 0:n.secondaryBackground,"--secondary-background",t),it((r=e.colors)==null?void 0:r.textOnSecondaryBackground,"--text-on-secondary-background",t)};var Pi=Object.defineProperty,Li=Object.getOwnPropertyDescriptor,_t=(e,t,s,i)=>{for(var n=i>1?void 0:i?Li(t,s):t,r=e.length-1,o;r>=0;r--)(o=e[r])&&(n=(i?o(t,s,n):o(n))||n);return i&&n&&Pi(t,s,n),n};class U extends v{constructor(){super(...arguments),this.active=!1,this.loaded=!1}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(),this.loaded=!0,this._applyBranding()}_toggleActive(){var t;if(!((t=this.application)!=null&&t.root)){console.warn("Could not activate widget. No root element assigned to widget.");return}this.active=!this.active,this.active?this.application.appendToDOM():this.application.hide()}_applyBranding(){var t;(t=this.application)!=null&&t.settings&&ts(this.application.settings.branding,this)}async _renderSymbol(){var a,l,c;const t=(a=this.application)==null?void 0:a.branding(),s=(l=t==null?void 0:t.graphics)==null?void 0:l.trigger;if(s)return $` <img src=${s} class="trigger-icon" alt="" /> `;const i=(c=this.application)==null?void 0:c.triggerIcon;if(!i)return u;const n=async d=>await Promise.resolve().then(()=>require("./index-f2738e72.js")).then(p=>p[d]),{type:r,content:o}=i;switch(r){case"Telia":{const d=await n(o);return d?$`<telia-icon
|
52
52
|
class="trigger-icon"
|
53
|
-
svg=${
|
53
|
+
svg=${d.svg}
|
54
54
|
size="lg"
|
55
55
|
></telia-icon>`:u}default:return u}}render(){return $`<button
|
56
56
|
class=${Wt({trigger:!0,active:this.active,rendered:this.loaded})}
|
@@ -260,7 +260,7 @@
|
|
260
260
|
:host {
|
261
261
|
display: block;
|
262
262
|
}
|
263
|
-
`];Yt([g({attribute:!0})],tt.prototype,"name",2);Yt([A()],tt.prototype,"widget",2);Yt([A()],tt.prototype,"status",2);customElements.get("ace-trigger")||customElements.define("ace-trigger",U);customElements.get("ace-unresolved-component")||customElements.define("ace-unresolved-component",ss);customElements.get("ace-wrapper")||customElements.define("ace-wrapper",qt);customElements.get("ace-widget")||customElements.define("ace-widget",tt);const Bi=new WeakMap;let me=0;const kt=new Map,ve=new WeakSet,ye=()=>new Promise(e=>requestAnimationFrame(e)),zi=[{opacity:0}],be=[{opacity:0},{opacity:1}],_e=(e,t)=>{const s=e-t;return s===0?void 0:s},we=(e,t)=>{const s=e/t;return s===1?void 0:s},Ot={left:(e,t)=>{const s=_e(e,t);return{value:s,transform:s==null||isNaN(s)?void 0:`translateX(${s}px)`}},top:(e,t)=>{const s=_e(e,t);return{value:s,transform:s==null||isNaN(s)?void 0:`translateY(${s}px)`}},width:(e,t)=>{let s;t===0&&(t=1,s={width:"1px"});const i=we(e,t);return{value:i,overrideFrom:s,transform:i==null||isNaN(i)?void 0:`scaleX(${i})`}},height:(e,t)=>{let s;t===0&&(t=1,s={height:"1px"});const i=we(e,t);return{value:i,overrideFrom:s,transform:i==null||isNaN(i)?void 0:`scaleY(${i})`}}},Fi={duration:333,easing:"ease-in-out"},Wi=["left","top","width","height","opacity","color","background"],xe=new WeakMap;class Gi extends Xe{constructor(t){if(super(t),this.t=null,this.i=null,this.o=!0,this.shouldLog=!1,t.type===yt.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var t;(t=this.resolveFinished)==null||t.call(this),this.finished=new Promise(s=>{this.h=s})}async resolveFinished(){var t;(t=this.h)==null||t.call(this),this.h=void 0}render(t){return u}getController(){return Bi.get(this.l)}isDisabled(){var t;return this.options.disabled||((t=this.getController())==null?void 0:t.disabled)}update(t,[s]){var n;const i=this.l===void 0;return i&&(this.l=(n=t.options)==null?void 0:n.host,this.l.addController(this),this.element=t.element,xe.set(this.element,this)),this.optionsOrCallback=s,(i||typeof s!="function")&&this.u(s),this.render(s)}u(t){t=t??{};const s=this.getController();s!==void 0&&((t={...s.defaultOptions,...t}).keyframeOptions={...s.defaultOptions.keyframeOptions,...t.keyframeOptions}),t.properties??(t.properties=Wi),this.options=t}p(){const t={},s=this.element.getBoundingClientRect(),i=getComputedStyle(this.element);return this.options.properties.forEach(n=>{const r=s[n]??(Ot[n]?void 0:i[n]),o=Number(r);t[n]=isNaN(o)?r+"":o}),t}m(){let t,s=!0;return this.options.guard&&(t=this.options.guard(),s=((i,n)=>{if(Array.isArray(i)){if(Array.isArray(n)&&n.length===i.length&&i.every((r,o)=>r===n[o]))return!1}else if(n===i)return!1;return!0})(t,this.v)),this.o=this.l.hasUpdated&&!this.isDisabled()&&!this.isAnimating()&&s&&this.element.isConnected,this.o&&(this.v=Array.isArray(t)?Array.from(t):t),this.o}hostUpdate(){typeof this.optionsOrCallback=="function"&&this.u(this.optionsOrCallback()),this.m()&&(this.g=this.p(),this.t=this.t??this.element.parentNode,this.i=this.element.nextSibling)}async hostUpdated(){if(!this.o||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let t;this.prepare(),await ye;const s=this._(),i=this.A(this.options.keyframeOptions,s),n=this.p();if(this.g!==void 0){const{from:r,to:o}=this.O(this.g,n,s);this.log("measured",[this.g,n,r,o]),t=this.calculateKeyframes(r,o)}else{const r=kt.get(this.options.inId);if(r){kt.delete(this.options.inId);const{from:o,to:a}=this.O(r,n,s);t=this.calculateKeyframes(o,a),t=this.options.in?[{...this.options.in[0],...t[0]},...this.options.in.slice(1),t[1]]:t,me++,t.forEach(l=>l.zIndex=me)}else this.options.in&&(t=[...this.options.in,{}])}this.animate(t,i)}resetStyles(){this.j!==void 0&&(this.element.setAttribute("style",this.j??""),this.j=void 0)}commitStyles(){var t,s;this.j=this.element.getAttribute("style"),(t=this.webAnimation)==null||t.commitStyles(),(s=this.webAnimation)==null||s.cancel()}reconnected(){}async disconnected(){var s;if(!this.o||(this.options.id!==void 0&&kt.set(this.options.id,this.g),this.options.out===void 0))return;if(this.prepare(),await ye(),(s=this.t)==null?void 0:s.isConnected){const i=this.i&&this.i.parentNode===this.t?this.i:null;if(this.t.insertBefore(this.element,i),this.options.stabilizeOut){const n=this.p();this.log("stabilizing out");const r=this.g.left-n.left,o=this.g.top-n.top;getComputedStyle(this.element).position!=="static"||r===0&&o===0||(this.element.style.position="relative"),r!==0&&(this.element.style.left=r+"px"),o!==0&&(this.element.style.top=o+"px")}}const t=this.A(this.options.keyframeOptions);await this.animate(this.options.out,t),this.element.remove()}prepare(){this.createFinished()}start(){var t,s;(s=(t=this.options).onStart)==null||s.call(t,this)}didFinish(t){var s,i;t&&((i=(s=this.options).onComplete)==null||i.call(s,this)),this.g=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}_(){const t=[];for(let s=this.element.parentNode;s;s=s==null?void 0:s.parentNode){const i=xe.get(s);i&&!i.isDisabled()&&i&&t.push(i)}return t}get isHostRendered(){const t=ve.has(this.l);return t||this.l.updateComplete.then(()=>{ve.add(this.l)}),t}A(t,s=this._()){const i={...Fi};return s.forEach(n=>Object.assign(i,n.options.keyframeOptions)),Object.assign(i,t),i}O(t,s,i){t={...t},s={...s};const n=i.map(a=>a.animatingProperties).filter(a=>a!==void 0);let r=1,o=1;return n!==void 0&&(n.forEach(a=>{a.width&&(r/=a.width),a.height&&(o/=a.height)}),t.left!==void 0&&s.left!==void 0&&(t.left=r*t.left,s.left=r*s.left),t.top!==void 0&&s.top!==void 0&&(t.top=o*t.top,s.top=o*s.top)),{from:t,to:s}}calculateKeyframes(t,s,i=!1){const n={},r={};let o=!1;const a={};for(const l in s){const c=t[l],
|
263
|
+
`];Yt([g({attribute:!0})],tt.prototype,"name",2);Yt([A()],tt.prototype,"widget",2);Yt([A()],tt.prototype,"status",2);customElements.get("ace-trigger")||customElements.define("ace-trigger",U);customElements.get("ace-unresolved-component")||customElements.define("ace-unresolved-component",ss);customElements.get("ace-wrapper")||customElements.define("ace-wrapper",qt);customElements.get("ace-widget")||customElements.define("ace-widget",tt);const Bi=new WeakMap;let me=0;const kt=new Map,ve=new WeakSet,ye=()=>new Promise(e=>requestAnimationFrame(e)),zi=[{opacity:0}],be=[{opacity:0},{opacity:1}],_e=(e,t)=>{const s=e-t;return s===0?void 0:s},we=(e,t)=>{const s=e/t;return s===1?void 0:s},Ot={left:(e,t)=>{const s=_e(e,t);return{value:s,transform:s==null||isNaN(s)?void 0:`translateX(${s}px)`}},top:(e,t)=>{const s=_e(e,t);return{value:s,transform:s==null||isNaN(s)?void 0:`translateY(${s}px)`}},width:(e,t)=>{let s;t===0&&(t=1,s={width:"1px"});const i=we(e,t);return{value:i,overrideFrom:s,transform:i==null||isNaN(i)?void 0:`scaleX(${i})`}},height:(e,t)=>{let s;t===0&&(t=1,s={height:"1px"});const i=we(e,t);return{value:i,overrideFrom:s,transform:i==null||isNaN(i)?void 0:`scaleY(${i})`}}},Fi={duration:333,easing:"ease-in-out"},Wi=["left","top","width","height","opacity","color","background"],xe=new WeakMap;class Gi extends Xe{constructor(t){if(super(t),this.t=null,this.i=null,this.o=!0,this.shouldLog=!1,t.type===yt.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var t;(t=this.resolveFinished)==null||t.call(this),this.finished=new Promise(s=>{this.h=s})}async resolveFinished(){var t;(t=this.h)==null||t.call(this),this.h=void 0}render(t){return u}getController(){return Bi.get(this.l)}isDisabled(){var t;return this.options.disabled||((t=this.getController())==null?void 0:t.disabled)}update(t,[s]){var n;const i=this.l===void 0;return i&&(this.l=(n=t.options)==null?void 0:n.host,this.l.addController(this),this.element=t.element,xe.set(this.element,this)),this.optionsOrCallback=s,(i||typeof s!="function")&&this.u(s),this.render(s)}u(t){t=t??{};const s=this.getController();s!==void 0&&((t={...s.defaultOptions,...t}).keyframeOptions={...s.defaultOptions.keyframeOptions,...t.keyframeOptions}),t.properties??(t.properties=Wi),this.options=t}p(){const t={},s=this.element.getBoundingClientRect(),i=getComputedStyle(this.element);return this.options.properties.forEach(n=>{const r=s[n]??(Ot[n]?void 0:i[n]),o=Number(r);t[n]=isNaN(o)?r+"":o}),t}m(){let t,s=!0;return this.options.guard&&(t=this.options.guard(),s=((i,n)=>{if(Array.isArray(i)){if(Array.isArray(n)&&n.length===i.length&&i.every((r,o)=>r===n[o]))return!1}else if(n===i)return!1;return!0})(t,this.v)),this.o=this.l.hasUpdated&&!this.isDisabled()&&!this.isAnimating()&&s&&this.element.isConnected,this.o&&(this.v=Array.isArray(t)?Array.from(t):t),this.o}hostUpdate(){typeof this.optionsOrCallback=="function"&&this.u(this.optionsOrCallback()),this.m()&&(this.g=this.p(),this.t=this.t??this.element.parentNode,this.i=this.element.nextSibling)}async hostUpdated(){if(!this.o||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let t;this.prepare(),await ye;const s=this._(),i=this.A(this.options.keyframeOptions,s),n=this.p();if(this.g!==void 0){const{from:r,to:o}=this.O(this.g,n,s);this.log("measured",[this.g,n,r,o]),t=this.calculateKeyframes(r,o)}else{const r=kt.get(this.options.inId);if(r){kt.delete(this.options.inId);const{from:o,to:a}=this.O(r,n,s);t=this.calculateKeyframes(o,a),t=this.options.in?[{...this.options.in[0],...t[0]},...this.options.in.slice(1),t[1]]:t,me++,t.forEach(l=>l.zIndex=me)}else this.options.in&&(t=[...this.options.in,{}])}this.animate(t,i)}resetStyles(){this.j!==void 0&&(this.element.setAttribute("style",this.j??""),this.j=void 0)}commitStyles(){var t,s;this.j=this.element.getAttribute("style"),(t=this.webAnimation)==null||t.commitStyles(),(s=this.webAnimation)==null||s.cancel()}reconnected(){}async disconnected(){var s;if(!this.o||(this.options.id!==void 0&&kt.set(this.options.id,this.g),this.options.out===void 0))return;if(this.prepare(),await ye(),(s=this.t)==null?void 0:s.isConnected){const i=this.i&&this.i.parentNode===this.t?this.i:null;if(this.t.insertBefore(this.element,i),this.options.stabilizeOut){const n=this.p();this.log("stabilizing out");const r=this.g.left-n.left,o=this.g.top-n.top;getComputedStyle(this.element).position!=="static"||r===0&&o===0||(this.element.style.position="relative"),r!==0&&(this.element.style.left=r+"px"),o!==0&&(this.element.style.top=o+"px")}}const t=this.A(this.options.keyframeOptions);await this.animate(this.options.out,t),this.element.remove()}prepare(){this.createFinished()}start(){var t,s;(s=(t=this.options).onStart)==null||s.call(t,this)}didFinish(t){var s,i;t&&((i=(s=this.options).onComplete)==null||i.call(s,this)),this.g=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}_(){const t=[];for(let s=this.element.parentNode;s;s=s==null?void 0:s.parentNode){const i=xe.get(s);i&&!i.isDisabled()&&i&&t.push(i)}return t}get isHostRendered(){const t=ve.has(this.l);return t||this.l.updateComplete.then(()=>{ve.add(this.l)}),t}A(t,s=this._()){const i={...Fi};return s.forEach(n=>Object.assign(i,n.options.keyframeOptions)),Object.assign(i,t),i}O(t,s,i){t={...t},s={...s};const n=i.map(a=>a.animatingProperties).filter(a=>a!==void 0);let r=1,o=1;return n!==void 0&&(n.forEach(a=>{a.width&&(r/=a.width),a.height&&(o/=a.height)}),t.left!==void 0&&s.left!==void 0&&(t.left=r*t.left,s.left=r*s.left),t.top!==void 0&&s.top!==void 0&&(t.top=o*t.top,s.top=o*s.top)),{from:t,to:s}}calculateKeyframes(t,s,i=!1){const n={},r={};let o=!1;const a={};for(const l in s){const c=t[l],d=s[l];if(l in Ot){const h=Ot[l];if(c===void 0||d===void 0)continue;const p=h(c,d);p.transform!==void 0&&(a[l]=p.value,o=!0,n.transform=`${n.transform??""} ${p.transform}`,p.overrideFrom!==void 0&&Object.assign(n,p.overrideFrom))}else c!==d&&c!==void 0&&d!==void 0&&(o=!0,n[l]=c,r[l]=d)}return n.transformOrigin=r.transformOrigin=i?"center center":"top left",this.animatingProperties=a,o?[n,r]:void 0}async animate(t,s=this.options.keyframeOptions){this.start(),this.frames=t;let i=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=t=this.options.onFrames(this),this.log("modified frames",t)),t!==void 0)){this.log("animate",[t,s]),i=!0,this.webAnimation=this.element.animate(t,s);const n=this.getController();n==null||n.add(this);try{await this.webAnimation.finished}catch{}n==null||n.remove(this)}return this.didFinish(i),i}isAnimating(){var t,s;return((t=this.webAnimation)==null?void 0:t.playState)==="running"||((s=this.webAnimation)==null?void 0:s.pending)}log(t,s){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,s)}}const Ae=bt(Gi);var qi=Object.defineProperty,Yi=Object.getOwnPropertyDescriptor,wt=(e,t,s,i)=>{for(var n=i>1?void 0:i?Yi(t,s):t,r=e.length-1,o;r>=0;r--)(o=e[r])&&(n=(i?o(t,s,n):o(n))||n);return i&&n&&qi(t,s,n),n};let B=class extends v{constructor(){super(...arguments),this.loading=!0,this.entries=[]}connectedCallback(){super.connectedCallback(),this.session.entries().subscribe(e=>{this.entries=e}),this.session.isTyping().subscribe(e=>{this.loading=e})}updated(e){const t=new CustomEvent("updated",{});this.dispatchEvent(t)}render(){return $`<div class="conversation-session">
|
264
264
|
${this.entries.map(e=>$`<div class="conversation-entry" tabindex="-1">
|
265
265
|
<conversation-entry
|
266
266
|
.entry=${e}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { C as xt } from "./index-
|
1
|
+
import { C as xt } from "./index-c1ee1af2.mjs";
|
2
2
|
/**
|
3
3
|
* @license
|
4
4
|
* Copyright 2019 Google LLC
|
@@ -312,11 +312,11 @@ const vs = (e, t) => {
|
|
312
312
|
let n, r = t === 2 ? "<svg>" : "", o = F;
|
313
313
|
for (let a = 0; a < s; a++) {
|
314
314
|
const l = e[a];
|
315
|
-
let c,
|
316
|
-
for (; p < l.length && (o.lastIndex = p,
|
317
|
-
p = o.lastIndex, o === F ?
|
315
|
+
let c, d, h = -1, p = 0;
|
316
|
+
for (; p < l.length && (o.lastIndex = p, d = o.exec(l), d !== null); )
|
317
|
+
p = o.lastIndex, o === F ? d[1] === "!--" ? o = te : d[1] !== void 0 ? o = ee : d[2] !== void 0 ? (Oe.test(d[2]) && (n = RegExp("</" + d[2], "g")), o = T) : d[3] !== void 0 && (o = T) : o === T ? d[0] === ">" ? (o = n ?? F, h = -1) : d[1] === void 0 ? h = -2 : (h = o.lastIndex - d[2].length, c = d[1], o = d[3] === void 0 ? T : d[3] === '"' ? ie : se) : o === ie || o === se ? o = T : o === te || o === ee ? o = F : (o = T, n = void 0);
|
318
318
|
const f = o === T && e[a + 1].startsWith("/>") ? " " : "";
|
319
|
-
r += o === F ? l + $s :
|
319
|
+
r += o === F ? l + $s : h >= 0 ? (i.push(c), l.slice(0, h) + Ce + l.slice(h) + S + f) : l + S + (h === -2 ? a : f);
|
320
320
|
}
|
321
321
|
return [Pe(e, r + (e[s] || "<?>") + (t === 2 ? "</svg>" : "")), i];
|
322
322
|
};
|
@@ -325,36 +325,36 @@ class Q {
|
|
325
325
|
let n;
|
326
326
|
this.parts = [];
|
327
327
|
let r = 0, o = 0;
|
328
|
-
const a = t.length - 1, l = this.parts, [c,
|
328
|
+
const a = t.length - 1, l = this.parts, [c, d] = vs(t, s);
|
329
329
|
if (this.el = Q.createElement(c, i), O.currentNode = this.el.content, s === 2) {
|
330
|
-
const
|
331
|
-
|
330
|
+
const h = this.el.content.firstChild;
|
331
|
+
h.replaceWith(...h.childNodes);
|
332
332
|
}
|
333
333
|
for (; (n = O.nextNode()) !== null && l.length < a; ) {
|
334
334
|
if (n.nodeType === 1) {
|
335
335
|
if (n.hasAttributes())
|
336
|
-
for (const
|
337
|
-
if (
|
338
|
-
const p =
|
339
|
-
l.push({ type: 1, index: r, name: w[2], strings: f, ctor: w[1] === "." ? bs : w[1] === "?" ? _s : w[1] === "@" ? ws : $t }), n.removeAttribute(
|
336
|
+
for (const h of n.getAttributeNames())
|
337
|
+
if (h.endsWith(Ce)) {
|
338
|
+
const p = d[o++], f = n.getAttribute(h).split(S), w = /([.?@])?(.*)/.exec(p);
|
339
|
+
l.push({ type: 1, index: r, name: w[2], strings: f, ctor: w[1] === "." ? bs : w[1] === "?" ? _s : w[1] === "@" ? ws : $t }), n.removeAttribute(h);
|
340
340
|
} else
|
341
|
-
|
341
|
+
h.startsWith(S) && (l.push({ type: 6, index: r }), n.removeAttribute(h));
|
342
342
|
if (Oe.test(n.tagName)) {
|
343
|
-
const
|
343
|
+
const h = n.textContent.split(S), p = h.length - 1;
|
344
344
|
if (p > 0) {
|
345
345
|
n.textContent = ot ? ot.emptyScript : "";
|
346
346
|
for (let f = 0; f < p; f++)
|
347
|
-
n.append(
|
348
|
-
n.append(
|
347
|
+
n.append(h[f], Y()), O.nextNode(), l.push({ type: 2, index: ++r });
|
348
|
+
n.append(h[p], Y());
|
349
349
|
}
|
350
350
|
}
|
351
351
|
} else if (n.nodeType === 8)
|
352
352
|
if (n.data === Te)
|
353
353
|
l.push({ type: 2, index: r });
|
354
354
|
else {
|
355
|
-
let
|
356
|
-
for (; (
|
357
|
-
l.push({ type: 7, index: r }),
|
355
|
+
let h = -1;
|
356
|
+
for (; (h = n.data.indexOf(S, h + 1)) !== -1; )
|
357
|
+
l.push({ type: 7, index: r }), h += S.length - 1;
|
358
358
|
}
|
359
359
|
r++;
|
360
360
|
}
|
@@ -725,21 +725,21 @@ const mt = typeof window < "u" ? window : {}, x = mt.document || { head: {} }, N
|
|
725
725
|
i & 10 && (s["s-sc"] = r, s.classList.add(r + "-h"), i & 2 && s.classList.add(r + "-s")), n();
|
726
726
|
}, Re = (e, t) => "sc-" + (t && e.$flags$ & 32 ? e.$tagName$ + "-" + t : e.$tagName$), Hs = (e) => ci.map((t) => t(e)).find((t) => !!t), le = {}, Rs = "http://www.w3.org/2000/svg", Ms = "http://www.w3.org/1999/xhtml", js = (e) => e != null, It = (e) => (e = typeof e, e === "object" || e === "function"), j = (e, t, ...s) => {
|
727
727
|
let i = null, n = null, r = null, o = !1, a = !1, l = [];
|
728
|
-
const c = (
|
729
|
-
for (let p = 0; p <
|
730
|
-
i =
|
728
|
+
const c = (h) => {
|
729
|
+
for (let p = 0; p < h.length; p++)
|
730
|
+
i = h[p], Array.isArray(i) ? c(i) : i != null && typeof i != "boolean" && ((o = typeof e != "function" && !It(i)) && (i = String(i)), o && a ? l[l.length - 1].$text$ += i : l.push(o ? lt(null, i) : i), a = o);
|
731
731
|
};
|
732
732
|
if (c(s), t) {
|
733
733
|
t.key && (n = t.key), t.name && (r = t.name);
|
734
734
|
{
|
735
|
-
const
|
736
|
-
|
735
|
+
const h = t.className || t.class;
|
736
|
+
h && (t.class = typeof h != "object" ? h : Object.keys(h).filter((p) => h[p]).join(" "));
|
737
737
|
}
|
738
738
|
}
|
739
739
|
if (typeof e == "function")
|
740
740
|
return e(t === null ? {} : t, l, Is);
|
741
|
-
const
|
742
|
-
return
|
741
|
+
const d = lt(e, null);
|
742
|
+
return d.$attrs$ = t, l.length > 0 && (d.$children$ = l), d.$key$ = n, d.$name$ = r, d;
|
743
743
|
}, lt = (e, t) => {
|
744
744
|
const s = {
|
745
745
|
$flags$: 0,
|
@@ -770,8 +770,8 @@ const mt = typeof window < "u" ? window : {}, x = mt.document || { head: {} }, N
|
|
770
770
|
if (s !== i) {
|
771
771
|
let o = fe(e, t), a = t.toLowerCase();
|
772
772
|
if (t === "class") {
|
773
|
-
const l = e.classList, c = he(s),
|
774
|
-
l.remove(...c.filter((
|
773
|
+
const l = e.classList, c = he(s), d = he(i);
|
774
|
+
l.remove(...c.filter((h) => h && !d.includes(h))), l.add(...d.filter((h) => h && !c.includes(h)));
|
775
775
|
} else if (t === "style") {
|
776
776
|
for (const l in s)
|
777
777
|
(!i || i[l] == null) && (l.includes("-") ? e.style.removeProperty(l) : e.style[l] = "");
|
@@ -789,8 +789,8 @@ const mt = typeof window < "u" ? window : {}, x = mt.document || { head: {} }, N
|
|
789
789
|
if (e.tagName.includes("-"))
|
790
790
|
e[t] = i;
|
791
791
|
else {
|
792
|
-
let
|
793
|
-
t === "list" ? o = !1 : (s == null || e[t] !=
|
792
|
+
let d = i ?? "";
|
793
|
+
t === "list" ? o = !1 : (s == null || e[t] != d) && (e[t] = d);
|
794
794
|
}
|
795
795
|
} catch {
|
796
796
|
}
|
@@ -839,24 +839,24 @@ const mt = typeof window < "u" ? window : {}, x = mt.document || { head: {} }, N
|
|
839
839
|
for (; t <= s; ++t)
|
840
840
|
(i = e[t]) && (n = i.$elm$, Fe(i), at = !0, n["s-ol"] ? n["s-ol"].remove() : Z(n, !0), n.remove());
|
841
841
|
}, Fs = (e, t, s, i) => {
|
842
|
-
let n = 0, r = 0, o = 0, a = 0, l = t.length - 1, c = t[0],
|
843
|
-
for (; n <= l && r <=
|
842
|
+
let n = 0, r = 0, o = 0, a = 0, l = t.length - 1, c = t[0], d = t[l], h = i.length - 1, p = i[0], f = i[h], w, et;
|
843
|
+
for (; n <= l && r <= h; )
|
844
844
|
if (c == null)
|
845
845
|
c = t[++n];
|
846
|
-
else if (
|
847
|
-
|
846
|
+
else if (d == null)
|
847
|
+
d = t[--l];
|
848
848
|
else if (p == null)
|
849
849
|
p = i[++r];
|
850
850
|
else if (f == null)
|
851
|
-
f = i[--
|
851
|
+
f = i[--h];
|
852
852
|
else if (st(c, p))
|
853
853
|
M(c, p), c = t[++n], p = i[++r];
|
854
|
-
else if (st(
|
855
|
-
M(
|
854
|
+
else if (st(d, f))
|
855
|
+
M(d, f), d = t[--l], f = i[--h];
|
856
856
|
else if (st(c, f))
|
857
|
-
(c.$tag$ === "slot" || f.$tag$ === "slot") && Z(c.$elm$.parentNode, !1), M(c, f), e.insertBefore(c.$elm$,
|
858
|
-
else if (st(
|
859
|
-
(c.$tag$ === "slot" || f.$tag$ === "slot") && Z(
|
857
|
+
(c.$tag$ === "slot" || f.$tag$ === "slot") && Z(c.$elm$.parentNode, !1), M(c, f), e.insertBefore(c.$elm$, d.$elm$.nextSibling), c = t[++n], f = i[--h];
|
858
|
+
else if (st(d, p))
|
859
|
+
(c.$tag$ === "slot" || f.$tag$ === "slot") && Z(d.$elm$.parentNode, !1), M(d, p), e.insertBefore(d.$elm$, c.$elm$), d = t[--l], p = i[++r];
|
860
860
|
else {
|
861
861
|
for (o = -1, a = n; a <= l; ++a)
|
862
862
|
if (t[a] && t[a].$key$ !== null && t[a].$key$ === p.$key$) {
|
@@ -865,7 +865,7 @@ const mt = typeof window < "u" ? window : {}, x = mt.document || { head: {} }, N
|
|
865
865
|
}
|
866
866
|
o >= 0 ? (et = t[o], et.$tag$ !== p.$tag$ ? w = ct(t && t[r], s, o, e) : (M(et, p), t[o] = void 0, w = et.$elm$), p = i[++r]) : (w = ct(t && t[r], s, r, e), p = i[++r]), w && Ie(c.$elm$).insertBefore(w, zt(c.$elm$));
|
867
867
|
}
|
868
|
-
n > l ? je(e, i[
|
868
|
+
n > l ? je(e, i[h + 1] == null ? null : i[h + 1].$elm$, s, i, r, h) : r > h && De(t, n, l);
|
869
869
|
}, st = (e, t) => e.$tag$ === t.$tag$ ? e.$tag$ === "slot" ? e.$name$ === t.$name$ : e.$key$ === t.$key$ : !1, zt = (e) => e && e["s-ol"] || e, Ie = (e) => (e["s-ol"] ? e["s-ol"] : e).parentNode, M = (e, t) => {
|
870
870
|
const s = t.$elm$ = e.$elm$, i = e.$children$, n = t.$children$, r = t.$tag$, o = t.$text$;
|
871
871
|
let a;
|
@@ -893,12 +893,12 @@ const mt = typeof window < "u" ? window : {}, x = mt.document || { head: {} }, N
|
|
893
893
|
for (; a < c; a++) {
|
894
894
|
if (t = l[a], t["s-sr"] && (s = t["s-cr"]) && s.parentNode)
|
895
895
|
for (i = s.parentNode.childNodes, n = t["s-sn"], o = i.length - 1; o >= 0; o--)
|
896
|
-
s = i[o], !s["s-cn"] && !s["s-nr"] && s["s-hn"] !== t["s-hn"] && (pe(s, n) ? (r = b.find((
|
896
|
+
s = i[o], !s["s-cn"] && !s["s-nr"] && s["s-hn"] !== t["s-hn"] && (pe(s, n) ? (r = b.find((d) => d.$nodeToRelocate$ === s), at = !0, s["s-sn"] = s["s-sn"] || n, r ? r.$slotRefNode$ = t : b.push({
|
897
897
|
$slotRefNode$: t,
|
898
898
|
$nodeToRelocate$: s
|
899
|
-
}), s["s-sr"] && b.map((
|
900
|
-
pe(
|
901
|
-
})) : b.some((
|
899
|
+
}), s["s-sr"] && b.map((d) => {
|
900
|
+
pe(d.$nodeToRelocate$, s["s-sn"]) && (r = b.find((h) => h.$nodeToRelocate$ === s), r && !d.$slotRefNode$ && (d.$slotRefNode$ = r.$slotRefNode$));
|
901
|
+
})) : b.some((d) => d.$nodeToRelocate$ === s) || b.push({
|
902
902
|
$nodeToRelocate$: s
|
903
903
|
}));
|
904
904
|
t.nodeType === 1 && ze(t);
|
@@ -911,17 +911,17 @@ const mt = typeof window < "u" ? window : {}, x = mt.document || { head: {} }, N
|
|
911
911
|
{
|
912
912
|
if (m.$flags$ |= 1, Dt) {
|
913
913
|
ze(r.$elm$);
|
914
|
-
let o, a, l, c,
|
914
|
+
let o, a, l, c, d, h, p = 0;
|
915
915
|
for (; p < b.length; p++)
|
916
916
|
o = b[p], a = o.$nodeToRelocate$, a["s-ol"] || (l = x.createTextNode(""), l["s-nr"] = a, a.parentNode.insertBefore(a["s-ol"] = l, a));
|
917
917
|
for (p = 0; p < b.length; p++)
|
918
918
|
if (o = b[p], a = o.$nodeToRelocate$, o.$slotRefNode$) {
|
919
|
-
for (c = o.$slotRefNode$.parentNode,
|
920
|
-
if (
|
921
|
-
|
919
|
+
for (c = o.$slotRefNode$.parentNode, d = o.$slotRefNode$.nextSibling, l = a["s-ol"]; l = l.previousSibling; )
|
920
|
+
if (h = l["s-nr"], h && h["s-sn"] === a["s-sn"] && c === h.parentNode && (h = h.nextSibling, !h || !h["s-nr"])) {
|
921
|
+
d = h;
|
922
922
|
break;
|
923
923
|
}
|
924
|
-
(!
|
924
|
+
(!d && c !== a.parentNode || a.nextSibling !== d) && a !== d && (!a["s-hn"] && a["s-ol"] && (a["s-hn"] = a["s-ol"].parentNode.nodeName), c.insertBefore(a, d));
|
925
925
|
} else
|
926
926
|
a.nodeType === 1 && (a.hidden = !0);
|
927
927
|
}
|
@@ -975,8 +975,8 @@ const mt = typeof window < "u" ? window : {}, x = mt.document || { head: {} }, N
|
|
975
975
|
n.$instanceValues$.set(t, s);
|
976
976
|
{
|
977
977
|
if (i.$watchers$ && a & 128) {
|
978
|
-
const
|
979
|
-
|
978
|
+
const h = i.$watchers$[t];
|
979
|
+
h && h.map((p) => {
|
980
980
|
try {
|
981
981
|
l[p](s, o, t);
|
982
982
|
} catch (f) {
|
@@ -1475,22 +1475,22 @@ class U extends v {
|
|
1475
1475
|
(t = this.application) != null && t.settings && Ve(this.application.settings.branding, this);
|
1476
1476
|
}
|
1477
1477
|
async _renderSymbol() {
|
1478
|
-
var a, l;
|
1479
|
-
const t = (a = this.application) == null ? void 0 : a.branding(), s = t == null ? void 0 : t.graphics.trigger;
|
1478
|
+
var a, l, c;
|
1479
|
+
const t = (a = this.application) == null ? void 0 : a.branding(), s = (l = t == null ? void 0 : t.graphics) == null ? void 0 : l.trigger;
|
1480
1480
|
if (s)
|
1481
1481
|
return $` <img src=${s} class="trigger-icon" alt="" /> `;
|
1482
|
-
const i = (
|
1482
|
+
const i = (c = this.application) == null ? void 0 : c.triggerIcon;
|
1483
1483
|
if (!i)
|
1484
1484
|
return u;
|
1485
|
-
const n = async (
|
1486
|
-
(
|
1485
|
+
const n = async (d) => await import("./index-a04efb7a.mjs").then(
|
1486
|
+
(p) => p[d]
|
1487
1487
|
), { type: r, content: o } = i;
|
1488
1488
|
switch (r) {
|
1489
1489
|
case "Telia": {
|
1490
|
-
const
|
1491
|
-
return
|
1490
|
+
const d = await n(o);
|
1491
|
+
return d ? $`<telia-icon
|
1492
1492
|
class="trigger-icon"
|
1493
|
-
svg=${
|
1493
|
+
svg=${d.svg}
|
1494
1494
|
size="lg"
|
1495
1495
|
></telia-icon>` : u;
|
1496
1496
|
}
|
@@ -2044,15 +2044,15 @@ class Gi extends Ze {
|
|
2044
2044
|
let o = !1;
|
2045
2045
|
const a = {};
|
2046
2046
|
for (const l in s) {
|
2047
|
-
const c = t[l],
|
2047
|
+
const c = t[l], d = s[l];
|
2048
2048
|
if (l in Ot) {
|
2049
|
-
const
|
2050
|
-
if (c === void 0 ||
|
2049
|
+
const h = Ot[l];
|
2050
|
+
if (c === void 0 || d === void 0)
|
2051
2051
|
continue;
|
2052
|
-
const p =
|
2052
|
+
const p = h(c, d);
|
2053
2053
|
p.transform !== void 0 && (a[l] = p.value, o = !0, n.transform = `${n.transform ?? ""} ${p.transform}`, p.overrideFrom !== void 0 && Object.assign(n, p.overrideFrom));
|
2054
2054
|
} else
|
2055
|
-
c !==
|
2055
|
+
c !== d && c !== void 0 && d !== void 0 && (o = !0, n[l] = c, r[l] = d);
|
2056
2056
|
}
|
2057
2057
|
return n.transformOrigin = r.transformOrigin = i ? "center center" : "top left", this.animatingProperties = a, o ? [n, r] : void 0;
|
2058
2058
|
}
|
@@ -1,3 +1,3 @@
|
|
1
1
|
"use strict";let P;const mt=new Uint8Array(16);function wt(){if(!P&&(P=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!P))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return P(mt)}const d=[];for(let e=0;e<256;++e)d.push((e+256).toString(16).slice(1));function St(e,r=0){return d[e[r+0]]+d[e[r+1]]+d[e[r+2]]+d[e[r+3]]+"-"+d[e[r+4]]+d[e[r+5]]+"-"+d[e[r+6]]+d[e[r+7]]+"-"+d[e[r+8]]+d[e[r+9]]+"-"+d[e[r+10]]+d[e[r+11]]+d[e[r+12]]+d[e[r+13]]+d[e[r+14]]+d[e[r+15]]}const gt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),H={randomUUID:gt};function Et(e,r,t){if(H.randomUUID&&!r&&!e)return H.randomUUID();e=e||{};const n=e.random||(e.rng||wt)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,r){t=t||0;for(let o=0;o<16;++o)r[t+o]=n[o];return r}return St(n)}var L=function(e,r){return L=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])},L(e,r)};function E(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");L(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}function xt(e,r,t,n){function o(i){return i instanceof t?i:new t(function(s){s(i)})}return new(t||(t=Promise))(function(i,s){function u(f){try{c(n.next(f))}catch(b){s(b)}}function a(f){try{c(n.throw(f))}catch(b){s(b)}}function c(f){f.done?i(f.value):o(f.value).then(u,a)}c((n=n.apply(e,r||[])).next())})}function Q(e,r){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(c){return function(f){return a([c,f])}}function a(c){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(t=0)),t;)try{if(n=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,o=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){t.label=c[1];break}if(c[0]===6&&t.label<i[1]){t.label=i[1],i=c;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(c);break}i[2]&&t.ops.pop(),t.trys.pop();continue}c=r.call(e,t)}catch(f){c=[6,f],o=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function g(e){var r=typeof Symbol=="function"&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function U(e,r){var t=typeof Symbol=="function"&&e[Symbol.iterator];if(!t)return e;var n=t.call(e),o,i=[],s;try{for(;(r===void 0||r-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(s)throw s.error}}return i}function A(e,r,t){if(t||arguments.length===2)for(var n=0,o=r.length,i;n<o;n++)(i||!(n in r))&&(i||(i=Array.prototype.slice.call(r,0,n)),i[n]=r[n]);return e.concat(i||Array.prototype.slice.call(r))}function S(e){return this instanceof S?(this.v=e,this):new S(e)}function _t(e,r,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t.apply(e,r||[]),o,i=[];return o={},s("next"),s("throw"),s("return"),o[Symbol.asyncIterator]=function(){return this},o;function s(l){n[l]&&(o[l]=function(v){return new Promise(function(x,p){i.push([l,v,x,p])>1||u(l,v)})})}function u(l,v){try{a(n[l](v))}catch(x){b(i[0][3],x)}}function a(l){l.value instanceof S?Promise.resolve(l.value.v).then(c,f):b(i[0][2],l)}function c(l){u("next",l)}function f(l){u("throw",l)}function b(l,v){l(v),i.shift(),i.length&&u(i[0][0],i[0][1])}}function Pt(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=e[Symbol.asyncIterator],t;return r?r.call(e):(e=typeof g=="function"?g(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(s){return new Promise(function(u,a){s=e[i](s),o(u,a,s.done,s.value)})}}function o(i,s,u,a){Promise.resolve(a).then(function(c){i({value:c,done:u})},s)}}function h(e){return typeof e=="function"}function W(e){var r=function(n){Error.call(n),n.stack=new Error().stack},t=e(r);return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var R=W(function(e){return function(t){e(this),this.message=t?t.length+` errors occurred during unsubscription:
|
2
2
|
`+t.map(function(n,o){return o+1+") "+n.toString()}).join(`
|
3
|
-
`):"",this.name="UnsubscriptionError",this.errors=t}});function D(e,r){if(e){var t=e.indexOf(r);0<=t&&e.splice(t,1)}}var T=function(){function e(r){this.initialTeardown=r,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var r,t,n,o,i;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var u=g(s),a=u.next();!a.done;a=u.next()){var c=a.value;c.remove(this)}}catch(p){r={error:p}}finally{try{a&&!a.done&&(t=u.return)&&t.call(u)}finally{if(r)throw r.error}}else s.remove(this);var f=this.initialTeardown;if(h(f))try{f()}catch(p){i=p instanceof R?p.errors:[p]}var b=this._finalizers;if(b){this._finalizers=null;try{for(var l=g(b),v=l.next();!v.done;v=l.next()){var x=v.value;try{z(x)}catch(p){i=i??[],p instanceof R?i=A(A([],U(i)),U(p.errors)):i.push(p)}}}catch(p){n={error:p}}finally{try{v&&!v.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}}if(i)throw new R(i)}},e.prototype.add=function(r){var t;if(r&&r!==this)if(this.closed)z(r);else{if(r instanceof e){if(r.closed||r._hasParent(this))return;r._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(r)}},e.prototype._hasParent=function(r){var t=this._parentage;return t===r||Array.isArray(t)&&t.includes(r)},e.prototype._addParent=function(r){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(r),t):t?[t,r]:r},e.prototype._removeParent=function(r){var t=this._parentage;t===r?this._parentage=null:Array.isArray(t)&&D(t,r)},e.prototype.remove=function(r){var t=this._finalizers;t&&D(t,r),r instanceof e&&r._removeParent(this)},e.EMPTY=function(){var r=new e;return r.closed=!0,r}(),e}(),X=T.EMPTY;function Z(e){return e instanceof T||e&&"closed"in e&&h(e.remove)&&h(e.add)&&h(e.unsubscribe)}function z(e){h(e)?e():e.unsubscribe()}var N={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},V={setTimeout:function(e,r){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];var o=V.delegate;return o!=null&&o.setTimeout?o.setTimeout.apply(o,A([e,r],U(t))):setTimeout.apply(void 0,A([e,r],U(t)))},clearTimeout:function(e){var r=V.delegate;return((r==null?void 0:r.clearTimeout)||clearTimeout)(e)},delegate:void 0};function tt(e){V.setTimeout(function(){throw e})}function Y(){}function O(e){e()}var B=function(e){E(r,e);function r(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,Z(t)&&t.add(n)):n.destination=At,n}return r.create=function(t,n,o){return new q(t,n,o)},r.prototype.next=function(t){this.isStopped||this._next(t)},r.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},r.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},r.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},r.prototype._next=function(t){this.destination.next(t)},r.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},r.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},r}(T),It=Function.prototype.bind;function F(e,r){return It.call(e,r)}var Ot=function(){function e(r){this.partialObserver=r}return e.prototype.next=function(r){var t=this.partialObserver;if(t.next)try{t.next(r)}catch(n){I(n)}},e.prototype.error=function(r){var t=this.partialObserver;if(t.error)try{t.error(r)}catch(n){I(n)}else I(r)},e.prototype.complete=function(){var r=this.partialObserver;if(r.complete)try{r.complete()}catch(t){I(t)}},e}(),q=function(e){E(r,e);function r(t,n,o){var i=e.call(this)||this,s;if(h(t)||!t)s={next:t??void 0,error:n??void 0,complete:o??void 0};else{var u;i&&N.useDeprecatedNextContext?(u=Object.create(t),u.unsubscribe=function(){return i.unsubscribe()},s={next:t.next&&F(t.next,u),error:t.error&&F(t.error,u),complete:t.complete&&F(t.complete,u)}):s=t}return i.destination=new Ot(s),i}return r}(B);function I(e){tt(e)}function Ut(e){throw e}var At={closed:!0,next:Y,error:Ut,complete:Y},M=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Tt(e){return e}function kt(e){return e.length===0?Tt:e.length===1?e[0]:function(t){return e.reduce(function(n,o){return o(n)},t)}}var y=function(){function e(r){r&&(this._subscribe=r)}return e.prototype.lift=function(r){var t=new e;return t.source=this,t.operator=r,t},e.prototype.subscribe=function(r,t,n){var o=this,i=jt(r)?r:new q(r,t,n);return O(function(){var s=o,u=s.operator,a=s.source;i.add(u?u.call(i,a):a?o._subscribe(i):o._trySubscribe(i))}),i},e.prototype._trySubscribe=function(r){try{return this._subscribe(r)}catch(t){r.error(t)}},e.prototype.forEach=function(r,t){var n=this;return t=K(t),new t(function(o,i){var s=new q({next:function(u){try{r(u)}catch(a){i(a),s.unsubscribe()}},error:i,complete:o});n.subscribe(s)})},e.prototype._subscribe=function(r){var t;return(t=this.source)===null||t===void 0?void 0:t.subscribe(r)},e.prototype[M]=function(){return this},e.prototype.pipe=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return kt(r)(this)},e.prototype.toPromise=function(r){var t=this;return r=K(r),new r(function(n,o){var i;t.subscribe(function(s){return i=s},function(s){return o(s)},function(){return n(i)})})},e.create=function(r){return new e(r)},e}();function K(e){var r;return(r=e??N.Promise)!==null&&r!==void 0?r:Promise}function Ct(e){return e&&h(e.next)&&h(e.error)&&h(e.complete)}function jt(e){return e&&e instanceof B||Ct(e)&&Z(e)}function $t(e){return h(e==null?void 0:e.lift)}function k(e){return function(r){if($t(r))return r.lift(function(t){try{return e(t,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function G(e,r,t,n,o){return new Rt(e,r,t,n,o)}var Rt=function(e){E(r,e);function r(t,n,o,i,s,u){var a=e.call(this,t)||this;return a.onFinalize=s,a.shouldUnsubscribe=u,a._next=n?function(c){try{n(c)}catch(f){t.error(f)}}:e.prototype._next,a._error=i?function(c){try{i(c)}catch(f){t.error(f)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=o?function(){try{o()}catch(c){t.error(c)}finally{this.unsubscribe()}}:e.prototype._complete,a}return r.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)===null||t===void 0||t.call(this))}},r}(B),Ft=W(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),w=function(e){E(r,e);function r(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return r.prototype.lift=function(t){var n=new J(this,this);return n.operator=t,n},r.prototype._throwIfClosed=function(){if(this.closed)throw new Ft},r.prototype.next=function(t){var n=this;O(function(){var o,i;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var s=g(n.currentObservers),u=s.next();!u.done;u=s.next()){var a=u.value;a.next(t)}}catch(c){o={error:c}}finally{try{u&&!u.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}}})},r.prototype.error=function(t){var n=this;O(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=t;for(var o=n.observers;o.length;)o.shift().error(t)}})},r.prototype.complete=function(){var t=this;O(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var n=t.observers;n.length;)n.shift().complete()}})},r.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(r.prototype,"observed",{get:function(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0},enumerable:!1,configurable:!0}),r.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},r.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},r.prototype._innerSubscribe=function(t){var n=this,o=this,i=o.hasError,s=o.isStopped,u=o.observers;return i||s?X:(this.currentObservers=null,u.push(t),new T(function(){n.currentObservers=null,D(u,t)}))},r.prototype._checkFinalizedStatuses=function(t){var n=this,o=n.hasError,i=n.thrownError,s=n.isStopped;o?t.error(i):s&&t.complete()},r.prototype.asObservable=function(){var t=new y;return t.source=this,t},r.create=function(t,n){return new J(t,n)},r}(y),J=function(e){E(r,e);function r(t,n){var o=e.call(this)||this;return o.destination=t,o.source=n,o}return r.prototype.next=function(t){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.next)===null||o===void 0||o.call(n,t)},r.prototype.error=function(t){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.error)===null||o===void 0||o.call(n,t)},r.prototype.complete=function(){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||n===void 0||n.call(t)},r.prototype._subscribe=function(t){var n,o;return(o=(n=this.source)===null||n===void 0?void 0:n.subscribe(t))!==null&&o!==void 0?o:X},r}(w),et=function(e){E(r,e);function r(t){var n=e.call(this)||this;return n._value=t,n}return Object.defineProperty(r.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),r.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},r.prototype.getValue=function(){var t=this,n=t.hasError,o=t.thrownError,i=t._value;if(n)throw o;return this._throwIfClosed(),i},r.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},r}(w),Lt=new y(function(e){return e.complete()});function Dt(e){return e&&h(e.schedule)}function Vt(e){return e[e.length-1]}function Yt(e){return Dt(Vt(e))?e.pop():void 0}var rt=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function nt(e){return h(e==null?void 0:e.then)}function ot(e){return h(e[M])}function it(e){return Symbol.asyncIterator&&h(e==null?void 0:e[Symbol.asyncIterator])}function st(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function qt(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var ut=qt();function ct(e){return h(e==null?void 0:e[ut])}function at(e){return _t(this,arguments,function(){var t,n,o,i;return Q(this,function(s){switch(s.label){case 0:t=e.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,S(t.read())];case 3:return n=s.sent(),o=n.value,i=n.done,i?[4,S(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,S(o)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function lt(e){return h(e==null?void 0:e.getReader)}function C(e){if(e instanceof y)return e;if(e!=null){if(ot(e))return Bt(e);if(rt(e))return Mt(e);if(nt(e))return Gt(e);if(it(e))return ft(e);if(ct(e))return Ht(e);if(lt(e))return zt(e)}throw st(e)}function Bt(e){return new y(function(r){var t=e[M]();if(h(t.subscribe))return t.subscribe(r);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Mt(e){return new y(function(r){for(var t=0;t<e.length&&!r.closed;t++)r.next(e[t]);r.complete()})}function Gt(e){return new y(function(r){e.then(function(t){r.closed||(r.next(t),r.complete())},function(t){return r.error(t)}).then(null,tt)})}function Ht(e){return new y(function(r){var t,n;try{for(var o=g(e),i=o.next();!i.done;i=o.next()){var s=i.value;if(r.next(s),r.closed)return}}catch(u){t={error:u}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}r.complete()})}function ft(e){return new y(function(r){Kt(e,r).catch(function(t){return r.error(t)})})}function zt(e){return ft(at(e))}function Kt(e,r){var t,n,o,i;return xt(this,void 0,void 0,function(){var s,u;return Q(this,function(a){switch(a.label){case 0:a.trys.push([0,5,6,11]),t=Pt(e),a.label=1;case 1:return[4,t.next()];case 2:if(n=a.sent(),!!n.done)return[3,4];if(s=n.value,r.next(s),r.closed)return[2];a.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return u=a.sent(),o={error:u},[3,11];case 6:return a.trys.push([6,,9,10]),n&&!n.done&&(i=t.return)?[4,i.call(t)]:[3,8];case 7:a.sent(),a.label=8;case 8:return[3,10];case 9:if(o)throw o.error;return[7];case 10:return[7];case 11:return r.complete(),[2]}})})}function m(e,r,t,n,o){n===void 0&&(n=0),o===void 0&&(o=!1);var i=r.schedule(function(){t(),o?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(i),!o)return i}function ht(e,r){return r===void 0&&(r=0),k(function(t,n){t.subscribe(G(n,function(o){return m(n,e,function(){return n.next(o)},r)},function(){return m(n,e,function(){return n.complete()},r)},function(o){return m(n,e,function(){return n.error(o)},r)}))})}function dt(e,r){return r===void 0&&(r=0),k(function(t,n){n.add(e.schedule(function(){return t.subscribe(n)},r))})}function Jt(e,r){return C(e).pipe(dt(r),ht(r))}function Qt(e,r){return C(e).pipe(dt(r),ht(r))}function Wt(e,r){return new y(function(t){var n=0;return r.schedule(function(){n===e.length?t.complete():(t.next(e[n++]),t.closed||this.schedule())})})}function Xt(e,r){return new y(function(t){var n;return m(t,r,function(){n=e[ut](),m(t,r,function(){var o,i,s;try{o=n.next(),i=o.value,s=o.done}catch(u){t.error(u);return}s?t.complete():t.next(i)},0,!0)}),function(){return h(n==null?void 0:n.return)&&n.return()}})}function pt(e,r){if(!e)throw new Error("Iterable cannot be null");return new y(function(t){m(t,r,function(){var n=e[Symbol.asyncIterator]();m(t,r,function(){n.next().then(function(o){o.done?t.complete():t.next(o.value)})},0,!0)})})}function Zt(e,r){return pt(at(e),r)}function Nt(e,r){if(e!=null){if(ot(e))return Jt(e,r);if(rt(e))return Wt(e,r);if(nt(e))return Qt(e,r);if(it(e))return pt(e,r);if(ct(e))return Xt(e,r);if(lt(e))return Zt(e,r)}throw st(e)}function te(e,r){return r?Nt(e,r):C(e)}function ee(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var t=Yt(e);return te(e,t)}function re(e){return e<=0?function(){return Lt}:k(function(r,t){var n=0;r.subscribe(G(t,function(o){++n<=e&&(t.next(o),e<=n&&t.complete())}))})}function ne(e){return k(function(r,t){C(e).subscribe(G(t,function(){return t.complete()},Y)),!t.closed&&r.subscribe(t)})}class vt{constructor(r,t,n){this.id=r,this.platform=n,this.entries$=new et([]),this.kill$=new w,this.queue=[],t.addEventListener("user-submit",o=>{if(!this.provider){console.warn("No provider activated, unable to print message to conversation.");return}this.provider.onUserSubmit(o.detail)})}write(r){this.entries$.pipe(re(1)).subscribe(t=>{this.entries$.next([...t,r])})}entries(){return this.entries$.asObservable()}setProvider(r){this.provider=r,this.provider.actions().pipe(ne(this.kill$)).subscribe(t=>{this.write(t)})}handover(r){const t=this.platform.registeredProviders.get(r);if(t){this.provider&&this.queue.unshift(this.provider),this.kill$.next();const n=t(this);this.setProvider(n)}}completeProvider(){const[r]=this.queue;r&&this.setProvider(r)}isTyping(){return this.provider?this.provider.isTyping():ee(!1)}}class j{constructor(){this.sessions=new Map,this.registeredProviders=new Map,this.activeSessionId=null}static async getInstance(r){let t=await r.get("conversation");return t||(t=new j,await r.register("conversation",t),t)}registerProvider(r,t){this.registeredProviders.set(r,t)}createSession(r){const t=new vt(Et(),r,this),n=this.getProviderByConfiguration(r);if(n){const o=n(t);t.setProvider(o)}return this.sessions.set(t.id,t),this.activeSessionId=t.id,t}getProviderByConfiguration(r){const[t]=r.properties.providers||[];if(!t){console.warn("No providers registered. You most likely forgot to add a provider to the conversation component properties.");return}return this.registeredProviders.get(t)}}const oe=async e=>{e.registerComponent("conversation",Promise.resolve().then(()=>require("./conversation-8e0ad5eb.js")).then(r=>r.conversation)),await j.getInstance(e.container)};var _=(e=>(e.User="user",e.Agent="agent",e.System="system",e))(_||{});class ${constructor(r,t,n){this.type=r,this.sender=t,this.messages=n,this.didUpdate=new w,this.timestamp=Date.now()}update(r){this.messages=[{items:r}],this.didUpdate.next(this)}}class yt{constructor(r){this.name=r,this.print$=new w}print(r){const t=new $(_.Agent,{name:this.name},[{items:[["html",{content:r}]]}]);return this.print$.next(t),t}subscribe(){return this.print$.asObservable()}}class bt{constructor(r){this.name=r,this.print$=new w}print(r){const t=new $(_.User,{name:this.name},[{items:[["html",{content:r}]]}]);return this.print$.next(t),t}subscribe(){return this.print$.asObservable()}}class ie{constructor(r,t){this.name=r,this.session=t,this.print$=new w,this.typingState$=new et(!1)}onUserSubmit(r){this.print(_.User,r.text)}print(r,t){const n=new $(r,{name:""},[{items:[["html",{content:t}]]}]);return this.printEntry(n)}printEntry(r){return this.print$.next(r),r}createAgent(r){const t=new yt(r);return t.subscribe().subscribe(n=>{this.printEntry(n)}),t}createUser(r){const t=new bt(r);return t.subscribe().subscribe(n=>{this.printEntry(n)}),t}setTypingState(r){this.typingState$.next(r)}isTyping(){return this.typingState$.asObservable()}actions(){return this.print$.asObservable()}complete(){this.session.completeProvider()}}exports.Agent=yt;exports.ConversationComponent=oe;exports.ConversationEntry=$;exports.ConversationMessageType=_;exports.ConversationPlatform=j;exports.ConversationProvider=ie;exports.ConversationSessionState=vt;exports.User=bt;
|
3
|
+
`):"",this.name="UnsubscriptionError",this.errors=t}});function D(e,r){if(e){var t=e.indexOf(r);0<=t&&e.splice(t,1)}}var T=function(){function e(r){this.initialTeardown=r,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var r,t,n,o,i;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var u=g(s),a=u.next();!a.done;a=u.next()){var c=a.value;c.remove(this)}}catch(p){r={error:p}}finally{try{a&&!a.done&&(t=u.return)&&t.call(u)}finally{if(r)throw r.error}}else s.remove(this);var f=this.initialTeardown;if(h(f))try{f()}catch(p){i=p instanceof R?p.errors:[p]}var b=this._finalizers;if(b){this._finalizers=null;try{for(var l=g(b),v=l.next();!v.done;v=l.next()){var x=v.value;try{z(x)}catch(p){i=i??[],p instanceof R?i=A(A([],U(i)),U(p.errors)):i.push(p)}}}catch(p){n={error:p}}finally{try{v&&!v.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}}if(i)throw new R(i)}},e.prototype.add=function(r){var t;if(r&&r!==this)if(this.closed)z(r);else{if(r instanceof e){if(r.closed||r._hasParent(this))return;r._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(r)}},e.prototype._hasParent=function(r){var t=this._parentage;return t===r||Array.isArray(t)&&t.includes(r)},e.prototype._addParent=function(r){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(r),t):t?[t,r]:r},e.prototype._removeParent=function(r){var t=this._parentage;t===r?this._parentage=null:Array.isArray(t)&&D(t,r)},e.prototype.remove=function(r){var t=this._finalizers;t&&D(t,r),r instanceof e&&r._removeParent(this)},e.EMPTY=function(){var r=new e;return r.closed=!0,r}(),e}(),X=T.EMPTY;function Z(e){return e instanceof T||e&&"closed"in e&&h(e.remove)&&h(e.add)&&h(e.unsubscribe)}function z(e){h(e)?e():e.unsubscribe()}var N={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},V={setTimeout:function(e,r){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];var o=V.delegate;return o!=null&&o.setTimeout?o.setTimeout.apply(o,A([e,r],U(t))):setTimeout.apply(void 0,A([e,r],U(t)))},clearTimeout:function(e){var r=V.delegate;return((r==null?void 0:r.clearTimeout)||clearTimeout)(e)},delegate:void 0};function tt(e){V.setTimeout(function(){throw e})}function Y(){}function O(e){e()}var B=function(e){E(r,e);function r(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,Z(t)&&t.add(n)):n.destination=At,n}return r.create=function(t,n,o){return new q(t,n,o)},r.prototype.next=function(t){this.isStopped||this._next(t)},r.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},r.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},r.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},r.prototype._next=function(t){this.destination.next(t)},r.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},r.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},r}(T),It=Function.prototype.bind;function F(e,r){return It.call(e,r)}var Ot=function(){function e(r){this.partialObserver=r}return e.prototype.next=function(r){var t=this.partialObserver;if(t.next)try{t.next(r)}catch(n){I(n)}},e.prototype.error=function(r){var t=this.partialObserver;if(t.error)try{t.error(r)}catch(n){I(n)}else I(r)},e.prototype.complete=function(){var r=this.partialObserver;if(r.complete)try{r.complete()}catch(t){I(t)}},e}(),q=function(e){E(r,e);function r(t,n,o){var i=e.call(this)||this,s;if(h(t)||!t)s={next:t??void 0,error:n??void 0,complete:o??void 0};else{var u;i&&N.useDeprecatedNextContext?(u=Object.create(t),u.unsubscribe=function(){return i.unsubscribe()},s={next:t.next&&F(t.next,u),error:t.error&&F(t.error,u),complete:t.complete&&F(t.complete,u)}):s=t}return i.destination=new Ot(s),i}return r}(B);function I(e){tt(e)}function Ut(e){throw e}var At={closed:!0,next:Y,error:Ut,complete:Y},M=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Tt(e){return e}function kt(e){return e.length===0?Tt:e.length===1?e[0]:function(t){return e.reduce(function(n,o){return o(n)},t)}}var y=function(){function e(r){r&&(this._subscribe=r)}return e.prototype.lift=function(r){var t=new e;return t.source=this,t.operator=r,t},e.prototype.subscribe=function(r,t,n){var o=this,i=jt(r)?r:new q(r,t,n);return O(function(){var s=o,u=s.operator,a=s.source;i.add(u?u.call(i,a):a?o._subscribe(i):o._trySubscribe(i))}),i},e.prototype._trySubscribe=function(r){try{return this._subscribe(r)}catch(t){r.error(t)}},e.prototype.forEach=function(r,t){var n=this;return t=K(t),new t(function(o,i){var s=new q({next:function(u){try{r(u)}catch(a){i(a),s.unsubscribe()}},error:i,complete:o});n.subscribe(s)})},e.prototype._subscribe=function(r){var t;return(t=this.source)===null||t===void 0?void 0:t.subscribe(r)},e.prototype[M]=function(){return this},e.prototype.pipe=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return kt(r)(this)},e.prototype.toPromise=function(r){var t=this;return r=K(r),new r(function(n,o){var i;t.subscribe(function(s){return i=s},function(s){return o(s)},function(){return n(i)})})},e.create=function(r){return new e(r)},e}();function K(e){var r;return(r=e??N.Promise)!==null&&r!==void 0?r:Promise}function Ct(e){return e&&h(e.next)&&h(e.error)&&h(e.complete)}function jt(e){return e&&e instanceof B||Ct(e)&&Z(e)}function $t(e){return h(e==null?void 0:e.lift)}function k(e){return function(r){if($t(r))return r.lift(function(t){try{return e(t,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function G(e,r,t,n,o){return new Rt(e,r,t,n,o)}var Rt=function(e){E(r,e);function r(t,n,o,i,s,u){var a=e.call(this,t)||this;return a.onFinalize=s,a.shouldUnsubscribe=u,a._next=n?function(c){try{n(c)}catch(f){t.error(f)}}:e.prototype._next,a._error=i?function(c){try{i(c)}catch(f){t.error(f)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=o?function(){try{o()}catch(c){t.error(c)}finally{this.unsubscribe()}}:e.prototype._complete,a}return r.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)===null||t===void 0||t.call(this))}},r}(B),Ft=W(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),w=function(e){E(r,e);function r(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return r.prototype.lift=function(t){var n=new J(this,this);return n.operator=t,n},r.prototype._throwIfClosed=function(){if(this.closed)throw new Ft},r.prototype.next=function(t){var n=this;O(function(){var o,i;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var s=g(n.currentObservers),u=s.next();!u.done;u=s.next()){var a=u.value;a.next(t)}}catch(c){o={error:c}}finally{try{u&&!u.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}}})},r.prototype.error=function(t){var n=this;O(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=t;for(var o=n.observers;o.length;)o.shift().error(t)}})},r.prototype.complete=function(){var t=this;O(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var n=t.observers;n.length;)n.shift().complete()}})},r.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(r.prototype,"observed",{get:function(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0},enumerable:!1,configurable:!0}),r.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},r.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},r.prototype._innerSubscribe=function(t){var n=this,o=this,i=o.hasError,s=o.isStopped,u=o.observers;return i||s?X:(this.currentObservers=null,u.push(t),new T(function(){n.currentObservers=null,D(u,t)}))},r.prototype._checkFinalizedStatuses=function(t){var n=this,o=n.hasError,i=n.thrownError,s=n.isStopped;o?t.error(i):s&&t.complete()},r.prototype.asObservable=function(){var t=new y;return t.source=this,t},r.create=function(t,n){return new J(t,n)},r}(y),J=function(e){E(r,e);function r(t,n){var o=e.call(this)||this;return o.destination=t,o.source=n,o}return r.prototype.next=function(t){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.next)===null||o===void 0||o.call(n,t)},r.prototype.error=function(t){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.error)===null||o===void 0||o.call(n,t)},r.prototype.complete=function(){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||n===void 0||n.call(t)},r.prototype._subscribe=function(t){var n,o;return(o=(n=this.source)===null||n===void 0?void 0:n.subscribe(t))!==null&&o!==void 0?o:X},r}(w),et=function(e){E(r,e);function r(t){var n=e.call(this)||this;return n._value=t,n}return Object.defineProperty(r.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),r.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},r.prototype.getValue=function(){var t=this,n=t.hasError,o=t.thrownError,i=t._value;if(n)throw o;return this._throwIfClosed(),i},r.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},r}(w),Lt=new y(function(e){return e.complete()});function Dt(e){return e&&h(e.schedule)}function Vt(e){return e[e.length-1]}function Yt(e){return Dt(Vt(e))?e.pop():void 0}var rt=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function nt(e){return h(e==null?void 0:e.then)}function ot(e){return h(e[M])}function it(e){return Symbol.asyncIterator&&h(e==null?void 0:e[Symbol.asyncIterator])}function st(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function qt(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var ut=qt();function ct(e){return h(e==null?void 0:e[ut])}function at(e){return _t(this,arguments,function(){var t,n,o,i;return Q(this,function(s){switch(s.label){case 0:t=e.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,S(t.read())];case 3:return n=s.sent(),o=n.value,i=n.done,i?[4,S(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,S(o)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function lt(e){return h(e==null?void 0:e.getReader)}function C(e){if(e instanceof y)return e;if(e!=null){if(ot(e))return Bt(e);if(rt(e))return Mt(e);if(nt(e))return Gt(e);if(it(e))return ft(e);if(ct(e))return Ht(e);if(lt(e))return zt(e)}throw st(e)}function Bt(e){return new y(function(r){var t=e[M]();if(h(t.subscribe))return t.subscribe(r);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Mt(e){return new y(function(r){for(var t=0;t<e.length&&!r.closed;t++)r.next(e[t]);r.complete()})}function Gt(e){return new y(function(r){e.then(function(t){r.closed||(r.next(t),r.complete())},function(t){return r.error(t)}).then(null,tt)})}function Ht(e){return new y(function(r){var t,n;try{for(var o=g(e),i=o.next();!i.done;i=o.next()){var s=i.value;if(r.next(s),r.closed)return}}catch(u){t={error:u}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}r.complete()})}function ft(e){return new y(function(r){Kt(e,r).catch(function(t){return r.error(t)})})}function zt(e){return ft(at(e))}function Kt(e,r){var t,n,o,i;return xt(this,void 0,void 0,function(){var s,u;return Q(this,function(a){switch(a.label){case 0:a.trys.push([0,5,6,11]),t=Pt(e),a.label=1;case 1:return[4,t.next()];case 2:if(n=a.sent(),!!n.done)return[3,4];if(s=n.value,r.next(s),r.closed)return[2];a.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return u=a.sent(),o={error:u},[3,11];case 6:return a.trys.push([6,,9,10]),n&&!n.done&&(i=t.return)?[4,i.call(t)]:[3,8];case 7:a.sent(),a.label=8;case 8:return[3,10];case 9:if(o)throw o.error;return[7];case 10:return[7];case 11:return r.complete(),[2]}})})}function m(e,r,t,n,o){n===void 0&&(n=0),o===void 0&&(o=!1);var i=r.schedule(function(){t(),o?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(i),!o)return i}function ht(e,r){return r===void 0&&(r=0),k(function(t,n){t.subscribe(G(n,function(o){return m(n,e,function(){return n.next(o)},r)},function(){return m(n,e,function(){return n.complete()},r)},function(o){return m(n,e,function(){return n.error(o)},r)}))})}function dt(e,r){return r===void 0&&(r=0),k(function(t,n){n.add(e.schedule(function(){return t.subscribe(n)},r))})}function Jt(e,r){return C(e).pipe(dt(r),ht(r))}function Qt(e,r){return C(e).pipe(dt(r),ht(r))}function Wt(e,r){return new y(function(t){var n=0;return r.schedule(function(){n===e.length?t.complete():(t.next(e[n++]),t.closed||this.schedule())})})}function Xt(e,r){return new y(function(t){var n;return m(t,r,function(){n=e[ut](),m(t,r,function(){var o,i,s;try{o=n.next(),i=o.value,s=o.done}catch(u){t.error(u);return}s?t.complete():t.next(i)},0,!0)}),function(){return h(n==null?void 0:n.return)&&n.return()}})}function pt(e,r){if(!e)throw new Error("Iterable cannot be null");return new y(function(t){m(t,r,function(){var n=e[Symbol.asyncIterator]();m(t,r,function(){n.next().then(function(o){o.done?t.complete():t.next(o.value)})},0,!0)})})}function Zt(e,r){return pt(at(e),r)}function Nt(e,r){if(e!=null){if(ot(e))return Jt(e,r);if(rt(e))return Wt(e,r);if(nt(e))return Qt(e,r);if(it(e))return pt(e,r);if(ct(e))return Xt(e,r);if(lt(e))return Zt(e,r)}throw st(e)}function te(e,r){return r?Nt(e,r):C(e)}function ee(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var t=Yt(e);return te(e,t)}function re(e){return e<=0?function(){return Lt}:k(function(r,t){var n=0;r.subscribe(G(t,function(o){++n<=e&&(t.next(o),e<=n&&t.complete())}))})}function ne(e){return k(function(r,t){C(e).subscribe(G(t,function(){return t.complete()},Y)),!t.closed&&r.subscribe(t)})}class vt{constructor(r,t,n){this.id=r,this.platform=n,this.entries$=new et([]),this.kill$=new w,this.queue=[],t.addEventListener("user-submit",o=>{if(!this.provider){console.warn("No provider activated, unable to print message to conversation.");return}this.provider.onUserSubmit(o.detail)})}write(r){this.entries$.pipe(re(1)).subscribe(t=>{this.entries$.next([...t,r])})}entries(){return this.entries$.asObservable()}setProvider(r){this.provider=r,this.provider.actions().pipe(ne(this.kill$)).subscribe(t=>{this.write(t)})}handover(r){const t=this.platform.registeredProviders.get(r);if(t){this.provider&&this.queue.unshift(this.provider),this.kill$.next();const n=t(this);this.setProvider(n)}}completeProvider(){const[r]=this.queue;r&&this.setProvider(r)}isTyping(){return this.provider?this.provider.isTyping():ee(!1)}}class j{constructor(){this.sessions=new Map,this.registeredProviders=new Map,this.activeSessionId=null}static async getInstance(r){let t=await r.get("conversation");return t||(t=new j,await r.register("conversation",t),t)}registerProvider(r,t){this.registeredProviders.set(r,t)}createSession(r){const t=new vt(Et(),r,this),n=this.getProviderByConfiguration(r);if(n){const o=n(t);t.setProvider(o)}return this.sessions.set(t.id,t),this.activeSessionId=t.id,t}getProviderByConfiguration(r){const[t]=r.properties.providers||[];if(!t){console.warn("No providers registered. You most likely forgot to add a provider to the conversation component properties.");return}return this.registeredProviders.get(t)}}const oe=async e=>{e.registerComponent("conversation",Promise.resolve().then(()=>require("./conversation-2edf20fc.js")).then(r=>r.conversation)),await j.getInstance(e.container)};var _=(e=>(e.User="user",e.Agent="agent",e.System="system",e))(_||{});class ${constructor(r,t,n){this.type=r,this.sender=t,this.messages=n,this.didUpdate=new w,this.timestamp=Date.now()}update(r){this.messages=[{items:r}],this.didUpdate.next(this)}}class yt{constructor(r){this.name=r,this.print$=new w}print(r){const t=new $(_.Agent,{name:this.name},[{items:[["html",{content:r}]]}]);return this.print$.next(t),t}subscribe(){return this.print$.asObservable()}}class bt{constructor(r){this.name=r,this.print$=new w}print(r){const t=new $(_.User,{name:this.name},[{items:[["html",{content:r}]]}]);return this.print$.next(t),t}subscribe(){return this.print$.asObservable()}}class ie{constructor(r,t){this.name=r,this.session=t,this.print$=new w,this.typingState$=new et(!1)}onUserSubmit(r){this.print(_.User,r.text)}print(r,t){const n=new $(r,{name:""},[{items:[["html",{content:t}]]}]);return this.printEntry(n)}printEntry(r){return this.print$.next(r),r}createAgent(r){const t=new yt(r);return t.subscribe().subscribe(n=>{this.printEntry(n)}),t}createUser(r){const t=new bt(r);return t.subscribe().subscribe(n=>{this.printEntry(n)}),t}setTypingState(r){this.typingState$.next(r)}isTyping(){return this.typingState$.asObservable()}actions(){return this.print$.asObservable()}complete(){this.session.completeProvider()}}exports.Agent=yt;exports.ConversationComponent=oe;exports.ConversationEntry=$;exports.ConversationMessageType=_;exports.ConversationPlatform=j;exports.ConversationProvider=ie;exports.ConversationSessionState=vt;exports.User=bt;
|