@telia-ace/widget-components-area-flamingo 1.1.12-rc.10 → 1.1.12-rc.5
Sign up to get free protection for your applications and to get access to all the features.
- package/{area-24a6c0a9.mjs → area-27c914b6.mjs} +399 -376
- package/area-6186125e.js +268 -0
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/package.json +2 -2
- package/area-f6373f40.js +0 -264
package/area-6186125e.js
ADDED
@@ -0,0 +1,268 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});/**
|
2
|
+
* @license
|
3
|
+
* Copyright 2019 Google LLC
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
5
|
+
*/const I=globalThis,st=I.ShadowRoot&&(I.ShadyCSS===void 0||I.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,it=Symbol(),at=new WeakMap;let mt=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==it)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(st&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=at.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&at.set(e,t))}return t}toString(){return this.cssText}};const Mt=s=>new mt(typeof s=="string"?s:s+"",void 0,it),P=(s,...t)=>{const e=s.length===1?s[0]:t.reduce((i,r,n)=>i+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+s[n+1],s[0]);return new mt(e,s,it)},Nt=(s,t)=>{if(st)s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const i=document.createElement("style"),r=I.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=e.cssText,s.appendChild(i)}},ct=st?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return Mt(e)})(s):s;/**
|
6
|
+
* @license
|
7
|
+
* Copyright 2017 Google LLC
|
8
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
9
|
+
*/const{is:Ht,defineProperty:Rt,getOwnPropertyDescriptor:kt,getOwnPropertyNames:Dt,getOwnPropertySymbols:Lt,getPrototypeOf:jt}=Object,m=globalThis,ht=m.trustedTypes,zt=ht?ht.emptyScript:"",K=m.reactiveElementPolyfillSupport,T=(s,t)=>s,G={toAttribute(s,t){switch(t){case Boolean:s=s?zt:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch{e=null}}return e}},rt=(s,t)=>!Ht(s,t),lt={attribute:!0,type:String,converter:G,reflect:!1,hasChanged:rt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),m.litPropertyMetadata??(m.litPropertyMetadata=new WeakMap);class C extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=lt){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,e);r!==void 0&&Rt(this.prototype,t,r)}}static getPropertyDescriptor(t,e,i){const{get:r,set:n}=kt(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get(){return r==null?void 0:r.call(this)},set(o){const c=r==null?void 0:r.call(this);n.call(this,o),this.requestUpdate(t,c,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??lt}static _$Ei(){if(this.hasOwnProperty(T("elementProperties")))return;const t=jt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(T("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(T("properties"))){const e=this.properties,i=[...Dt(e),...Lt(e)];for(const r of i)this.createProperty(r,e[r])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,r]of e)this.elementProperties.set(i,r)}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const r=this._$Eu(e,i);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const r of i)e.unshift(ct(r))}else t!==void 0&&e.push(ct(t));return e}static _$Eu(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$Eg=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$ES??(this._$ES=[])).push(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$ES)==null||e.splice(this._$ES.indexOf(t)>>>0,1)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Nt(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)==null||t.forEach(e=>{var i;return(i=e.hostConnected)==null?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)==null||t.forEach(e=>{var i;return(i=e.hostDisconnected)==null?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e){var n;const i=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,i);if(r!==void 0&&i.reflect===!0){const o=(((n=i.converter)==null?void 0:n.toAttribute)!==void 0?i.converter:G).toAttribute(e,i.type);this._$Em=t,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(t,e){var n;const i=this.constructor,r=i._$Eh.get(t);if(r!==void 0&&this._$Em!==r){const o=i.getPropertyOptions(r),c=typeof o.converter=="function"?{fromAttribute:o.converter}:((n=o.converter)==null?void 0:n.fromAttribute)!==void 0?o.converter:G;this._$Em=r,this[r]=c.fromAttribute(e,o.type),this._$Em=null}}requestUpdate(t,e,i,r=!1,n){if(t!==void 0){if(i??(i=this.constructor.getPropertyOptions(t)),!(i.hasChanged??rt)(r?n:this[t],e))return;this.C(t,e,i)}this.isUpdatePending===!1&&(this._$Eg=this._$EP())}C(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this._$Ep){for(const[n,o]of this._$Ep)this[n]=o;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[n,o]of r)o.wrapped!==!0||this._$AL.has(n)||this[n]===void 0||this.C(n,this[n],o)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$ES)==null||i.forEach(r=>{var n;return(n=r.hostUpdate)==null?void 0:n.call(r)}),this.update(e)):this._$ET()}catch(r){throw t=!1,this._$ET(),r}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)==null||e.forEach(i=>{var r;return(r=i.hostUpdated)==null?void 0:r.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EO(e,this[e]))),this._$ET()}updated(t){}firstUpdated(t){}}C.elementStyles=[],C.shadowRootOptions={mode:"open"},C[T("elementProperties")]=new Map,C[T("finalized")]=new Map,K==null||K({ReactiveElement:C}),(m.reactiveElementVersions??(m.reactiveElementVersions=[])).push("2.0.1");/**
|
10
|
+
* @license
|
11
|
+
* Copyright 2017 Google LLC
|
12
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
13
|
+
*/const U=globalThis,W=U.trustedTypes,dt=W?W.createPolicy("lit-html",{createHTML:s=>s}):void 0,yt="$lit$",_=`lit$${(Math.random()+"").slice(9)}$`,vt="?"+_,Bt=`<${vt}>`,w=document,N=()=>w.createComment(""),H=s=>s===null||typeof s!="object"&&typeof s!="function",At=Array.isArray,It=s=>At(s)||typeof(s==null?void 0:s[Symbol.iterator])=="function",Z=`[
|
14
|
+
\f\r]`,O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,pt=/-->/g,ut=/>/g,v=RegExp(`>|${Z}(?:([^\\s"'>=/]+)(${Z}*=${Z}*(?:[^
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),gt=/'/g,ft=/"/g,bt=/^(?:script|style|textarea|title)$/i,Gt=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),R=Gt(1),x=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),$t=new WeakMap,b=w.createTreeWalker(w,129);function wt(s,t){if(!Array.isArray(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return dt!==void 0?dt.createHTML(t):t}const Wt=(s,t)=>{const e=s.length-1,i=[];let r,n=t===2?"<svg>":"",o=O;for(let c=0;c<e;c++){const a=s[c];let d,p,h=-1,g=0;for(;g<a.length&&(o.lastIndex=g,p=o.exec(a),p!==null);)g=o.lastIndex,o===O?p[1]==="!--"?o=pt:p[1]!==void 0?o=ut:p[2]!==void 0?(bt.test(p[2])&&(r=RegExp("</"+p[2],"g")),o=v):p[3]!==void 0&&(o=v):o===v?p[0]===">"?(o=r??O,h=-1):p[1]===void 0?h=-2:(h=o.lastIndex-p[2].length,d=p[1],o=p[3]===void 0?v:p[3]==='"'?ft:gt):o===ft||o===gt?o=v:o===pt||o===ut?o=O:(o=v,r=void 0);const $=o===v&&s[c+1].startsWith("/>")?" ":"";n+=o===O?a+Bt:h>=0?(i.push(d),a.slice(0,h)+yt+a.slice(h)+_+$):a+_+(h===-2?c:$)}return[wt(s,n+(s[e]||"<?>")+(t===2?"</svg>":"")),i]};class k{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let n=0,o=0;const c=t.length-1,a=this.parts,[d,p]=Wt(t,e);if(this.el=k.createElement(d,i),b.currentNode=this.el.content,e===2){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(r=b.nextNode())!==null&&a.length<c;){if(r.nodeType===1){if(r.hasAttributes())for(const h of r.getAttributeNames())if(h.endsWith(yt)){const g=p[o++],$=r.getAttribute(h).split(_),z=/([.?@])?(.*)/.exec(g);a.push({type:1,index:n,name:z[2],strings:$,ctor:z[1]==="."?qt:z[1]==="?"?Yt:z[1]==="@"?Ft:Y}),r.removeAttribute(h)}else h.startsWith(_)&&(a.push({type:6,index:n}),r.removeAttribute(h));if(bt.test(r.tagName)){const h=r.textContent.split(_),g=h.length-1;if(g>0){r.textContent=W?W.emptyScript:"";for(let $=0;$<g;$++)r.append(h[$],N()),b.nextNode(),a.push({type:2,index:++n});r.append(h[g],N())}}}else if(r.nodeType===8)if(r.data===vt)a.push({type:2,index:n});else{let h=-1;for(;(h=r.data.indexOf(_,h+1))!==-1;)a.push({type:7,index:n}),h+=_.length-1}n++}}static createElement(t,e){const i=w.createElement("template");return i.innerHTML=t,i}}function E(s,t,e=s,i){var o,c;if(t===x)return t;let r=i!==void 0?(o=e._$Co)==null?void 0:o[i]:e._$Cl;const n=H(t)?void 0:t._$litDirective$;return(r==null?void 0:r.constructor)!==n&&((c=r==null?void 0:r._$AO)==null||c.call(r,!1),n===void 0?r=void 0:(r=new n(s),r._$AT(s,e,i)),i!==void 0?(e._$Co??(e._$Co=[]))[i]=r:e._$Cl=r),r!==void 0&&(t=E(s,r._$AS(s,t.values),r,i)),t}class Vt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,r=((t==null?void 0:t.creationScope)??w).importNode(e,!0);b.currentNode=r;let n=b.nextNode(),o=0,c=0,a=i[0];for(;a!==void 0;){if(o===a.index){let d;a.type===2?d=new D(n,n.nextSibling,this,t):a.type===1?d=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(d=new Jt(n,this,t)),this._$AV.push(d),a=i[++c]}o!==(a==null?void 0:a.index)&&(n=b.nextNode(),o++)}return b.currentNode=w,r}p(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class D{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,i,r){this.type=2,this._$AH=l,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this._$Cv=(r==null?void 0:r.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=E(this,t,e),H(t)?t===l||t==null||t===""?(this._$AH!==l&&this._$AR(),this._$AH=l):t!==this._$AH&&t!==x&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):It(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!==l&&H(this._$AH)?this._$AA.nextSibling.data=t:this.$(w.createTextNode(t)),this._$AH=t}g(t){var n;const{values:e,_$litType$:i}=t,r=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=k.createElement(wt(i.h,i.h[0]),this.options)),i);if(((n=this._$AH)==null?void 0:n._$AD)===r)this._$AH.p(e);else{const o=new Vt(r,this),c=o.u(this.options);o.p(e),this.$(c),this._$AH=o}}_$AC(t){let e=$t.get(t.strings);return e===void 0&&$t.set(t.strings,e=new k(t)),e}T(t){At(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,r=0;for(const n of t)r===e.length?e.push(i=new D(this.k(N()),this.k(N()),this,this.options)):i=e[r],i._$AI(n),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,e);t&&t!==this._$AB;){const r=t.nextSibling;t.remove(),t=r}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class Y{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,r,n){this.type=1,this._$AH=l,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=n,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=l}_$AI(t,e=this,i,r){const n=this.strings;let o=!1;if(n===void 0)t=E(this,t,e,0),o=!H(t)||t!==this._$AH&&t!==x,o&&(this._$AH=t);else{const c=t;let a,d;for(t=n[0],a=0;a<n.length-1;a++)d=E(this,c[i+a],e,a),d===x&&(d=this._$AH[a]),o||(o=!H(d)||d!==this._$AH[a]),d===l?t=l:t!==l&&(t+=(d??"")+n[a+1]),this._$AH[a]=d}o&&!r&&this.O(t)}O(t){t===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class qt extends Y{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===l?void 0:t}}class Yt extends Y{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==l)}}class Ft extends Y{constructor(t,e,i,r,n){super(t,e,i,r,n),this.type=5}_$AI(t,e=this){if((t=E(this,t,e,0)??l)===x)return;const i=this._$AH,r=t===l&&i!==l||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==l&&(i===l||r);r&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class Jt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){E(this,t)}}const Q=U.litHtmlPolyfillSupport;Q==null||Q(k,D),(U.litHtmlVersions??(U.litHtmlVersions=[])).push("3.0.2");const Kt=(s,t,e)=>{const i=(e==null?void 0:e.renderBefore)??t;let r=i._$litPart$;if(r===void 0){const n=(e==null?void 0:e.renderBefore)??null;i._$litPart$=r=new D(t.insertBefore(N(),n),n,void 0,e??{})}return r._$AI(s),r};/**
|
16
|
+
* @license
|
17
|
+
* Copyright 2017 Google LLC
|
18
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
19
|
+
*/let f=class extends C{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Kt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return x}};var _t;f._$litElement$=!0,f.finalized=!0,(_t=globalThis.litElementHydrateSupport)==null||_t.call(globalThis,{LitElement:f});const X=globalThis.litElementPolyfillSupport;X==null||X({LitElement:f});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.1");/**
|
20
|
+
* @license
|
21
|
+
* Copyright 2021 Google LLC
|
22
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
23
|
+
*/function*xt(s,t){if(s!==void 0){let e=0;for(const i of s)yield t(i,e++)}}/**
|
24
|
+
* @license
|
25
|
+
* Copyright 2017 Google LLC
|
26
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
27
|
+
*/const F=s=>(t,e)=>{e!==void 0?e.addInitializer(()=>{customElements.define(s,t)}):customElements.define(s,t)};/**
|
28
|
+
* @license
|
29
|
+
* Copyright 2017 Google LLC
|
30
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
31
|
+
*/const Zt={attribute:!0,type:String,converter:G,reflect:!1,hasChanged:rt},Qt=(s=Zt,t,e)=>{const{kind:i,metadata:r}=e;let n=globalThis.litPropertyMetadata.get(r);if(n===void 0&&globalThis.litPropertyMetadata.set(r,n=new Map),n.set(e.name,s),i==="accessor"){const{name:o}=e;return{set(c){const a=t.get.call(this);t.set.call(this,c),this.requestUpdate(o,a,s)},init(c){return c!==void 0&&this.C(o,void 0,s),c}}}if(i==="setter"){const{name:o}=e;return function(c){const a=this[o];t.call(this,c),this.requestUpdate(o,a,s)}}throw Error("Unsupported decorator location: "+i)};function u(s){return(t,e)=>typeof e=="object"?Qt(s,t,e):((i,r,n)=>{const o=r.hasOwnProperty(n);return r.constructor.createProperty(n,o?{...i,wrapped:!0}:i),o?Object.getOwnPropertyDescriptor(r,n):void 0})(s,t,e)}/**
|
32
|
+
* @license
|
33
|
+
* Copyright 2017 Google LLC
|
34
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
35
|
+
*/function L(s){return u({...s,state:!0,attribute:!1})}/**
|
36
|
+
* @license
|
37
|
+
* Copyright 2017 Google LLC
|
38
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
39
|
+
*/const Ct={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Et=s=>(...t)=>({_$litDirective$:s,values:t});class St{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}/**
|
40
|
+
* @license
|
41
|
+
* Copyright 2018 Google LLC
|
42
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
43
|
+
*/const Xt=Et(class extends St{constructor(s){var t;if(super(s),s.type!==Ct.ATTRIBUTE||s.name!=="class"||((t=s.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(s){return" "+Object.keys(s).filter(t=>s[t]).join(" ")+" "}update(s,[t]){var i,r;if(this.it===void 0){this.it=new Set,s.strings!==void 0&&(this.st=new Set(s.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(const n in t)t[n]&&!((i=this.st)!=null&&i.has(n))&&this.it.add(n);return this.render(t)}const e=s.element.classList;for(const n of this.it)n in t||(e.remove(n),this.it.delete(n));for(const n in t){const o=!!t[n];o===this.it.has(n)||(r=this.st)!=null&&r.has(n)||(o?(e.add(n),this.it.add(n)):(e.remove(n),this.it.delete(n)))}return x}}),B=(s,t,e)=>{s&&e.style.setProperty(t,s)},Pt=(s,t)=>{var e,i,r,n;B((e=s.colors)==null?void 0:e.primaryBackground,"--primary-background",t),B((i=s.colors)==null?void 0:i.textOnPrimaryBackground,"--text-on-primary-background",t),B((r=s.colors)==null?void 0:r.secondaryBackground,"--secondary-background",t),B((n=s.colors)==null?void 0:n.textOnSecondaryBackground,"--text-on-secondary-background",t)};var te=Object.defineProperty,ee=Object.getOwnPropertyDescriptor,j=(s,t,e,i)=>{for(var r=i>1?void 0:i?ee(t,e):t,n=s.length-1,o;n>=0;n--)(o=s[n])&&(r=(i?o(t,e,r):o(r))||r);return i&&r&&te(t,e,r),r};let y=class extends f{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 s;if(!((s=this.application)!=null&&s.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.removeFromDOM()}_applyBranding(){var s;(s=this.application)!=null&&s.settings&&Pt(this.application.settings.branding,this)}async _renderSymbol(){var r;const s=(r=this.application)==null?void 0:r.triggerIcon;if(!s)return l;const t=async n=>await Promise.resolve().then(()=>require("./index-6dd00f59.js")).then(c=>c[n]),{type:e,content:i}=s;switch(e){case"Telia":{const n=await t(i);return n?R`<telia-icon
|
44
|
+
class="trigger-icon"
|
45
|
+
svg=${n.svg}
|
46
|
+
size="lg"
|
47
|
+
></telia-icon>`:l}default:return l}}render(){return R`<button
|
48
|
+
class=${Xt({trigger:!0,active:this.active,rendered:this.loaded})}
|
49
|
+
@click=${this._toggleActive}
|
50
|
+
>
|
51
|
+
${this.icon}
|
52
|
+
<span class="trigger-close">
|
53
|
+
<svg
|
54
|
+
width="18"
|
55
|
+
height="9"
|
56
|
+
viewBox="0 0 18 9"
|
57
|
+
fill="none"
|
58
|
+
xmlns="http://www.w3.org/2000/svg"
|
59
|
+
>
|
60
|
+
<path
|
61
|
+
d="M9 9C8.81794 9.00045 8.63759 8.96634 8.46939 8.89965C8.3012 8.83295 8.14851 8.735 8.02015 8.61145L0.194523 1.12367C0.068294 0.99862 -0.00155266 0.831133 2.61958e-05 0.657285C0.00160506 0.483436 0.0744832 0.317136 0.202964 0.194202C0.331445 0.0712675 0.505249 0.00153576 0.686941 2.50649e-05C0.868634 -0.00148563 1.04368 0.0653456 1.17437 0.186125L9 7.6739L16.8256 0.186125C16.9563 0.0653456 17.1314 -0.00148563 17.3131 2.50649e-05C17.4948 0.00153576 17.6686 0.0712675 17.797 0.194202C17.9255 0.317136 17.9984 0.483436 18 0.657285C18.0016 0.831133 17.9317 0.99862 17.8055 1.12367L9.97985 8.61145C9.85149 8.735 9.6988 8.83295 9.53061 8.89965C9.36241 8.96634 9.18206 9.00045 9 9Z"
|
62
|
+
fill="white"
|
63
|
+
/>
|
64
|
+
</svg>
|
65
|
+
</span>
|
66
|
+
<span class="trigger-loader">
|
67
|
+
<svg viewBox="25 25 50 50">
|
68
|
+
<circle
|
69
|
+
cx="50"
|
70
|
+
cy="50"
|
71
|
+
r="20"
|
72
|
+
fill="none"
|
73
|
+
stroke="#000"
|
74
|
+
stroke-width="2"
|
75
|
+
stroke-miterlimit="10"
|
76
|
+
/>
|
77
|
+
</svg>
|
78
|
+
</span>
|
79
|
+
</button>`}};y.styles=[P`
|
80
|
+
:host {
|
81
|
+
--voca-rem-multiplier: 0.625;
|
82
|
+
display: block;
|
83
|
+
box-sizing: border-box;
|
84
|
+
}
|
85
|
+
|
86
|
+
.trigger {
|
87
|
+
position: fixed;
|
88
|
+
transform: scale(0);
|
89
|
+
box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
|
90
|
+
bottom: 20px;
|
91
|
+
right: 20px;
|
92
|
+
z-index: 5;
|
93
|
+
display: flex;
|
94
|
+
align-items: center;
|
95
|
+
justify-content: center;
|
96
|
+
border: none;
|
97
|
+
line-height: 55px;
|
98
|
+
height: 55px;
|
99
|
+
width: 55px;
|
100
|
+
border-radius: 55px;
|
101
|
+
cursor: pointer;
|
102
|
+
background-color: var(--trigger-bg, var(--primary-background));
|
103
|
+
font-family: Lato;
|
104
|
+
text-decoration: none;
|
105
|
+
border: 3px dashed transparent;
|
106
|
+
box-sizing: border-box;
|
107
|
+
transition: transform 200ms ease-out;
|
108
|
+
}
|
109
|
+
.trigger:hover {
|
110
|
+
transform: scale(1.1) !important;
|
111
|
+
}
|
112
|
+
.trigger.rendered {
|
113
|
+
transform: scale(1);
|
114
|
+
}
|
115
|
+
.trigger.active .trigger-icon {
|
116
|
+
opacity: 0;
|
117
|
+
transform: rotate(-180deg) scale(0);
|
118
|
+
}
|
119
|
+
.trigger.active .trigger-close {
|
120
|
+
opacity: 1;
|
121
|
+
transform: rotate(0deg) scale(1);
|
122
|
+
}
|
123
|
+
|
124
|
+
.trigger-icon {
|
125
|
+
display: inline-block;
|
126
|
+
line-height: inherit;
|
127
|
+
text-align: center;
|
128
|
+
opacity: 1;
|
129
|
+
transform: rotate(0deg) scale(1);
|
130
|
+
transition: opacity 200ms ease-out, transform 200ms ease-out;
|
131
|
+
color: var(--trigger-text-color, var(--text-on-primary-background));
|
132
|
+
}
|
133
|
+
.trigger-close {
|
134
|
+
opacity: 0;
|
135
|
+
transition: transform 200ms ease-out;
|
136
|
+
transform: rotate(180deg) scale(0);
|
137
|
+
position: absolute;
|
138
|
+
top: 0;
|
139
|
+
bottom: 0;
|
140
|
+
left: 0;
|
141
|
+
right: 0;
|
142
|
+
display: flex;
|
143
|
+
justify-content: center;
|
144
|
+
align-items: center;
|
145
|
+
fill: var(--trigger-text-color, var(--text-on-primary-background));
|
146
|
+
}
|
147
|
+
`];j([u({attribute:!1})],y.prototype,"application",2);j([L()],y.prototype,"active",2);j([L()],y.prototype,"loaded",2);j([L()],y.prototype,"icon",2);y=j([F("ace-trigger")],y);var se=Object.defineProperty,ie=Object.getOwnPropertyDescriptor,A=(s,t,e,i)=>{for(var r=i>1?void 0:i?ie(t,e):t,n=s.length-1,o;n>=0;n--)(o=s[n])&&(r=(i?o(t,e,r):o(r))||r);return i&&r&&se(t,e,r),r};const Ot=s=>{class t extends s{constructor(){super(...arguments),this.properties={},this.context={},this.layout={},this.nodes=[]}writeProperties(i){this.properties=i}writeLayout(i){this.layout=i}writeContext(i){this.context=i}addChild(i){i.parent=this,this.nodes.push(i)}connectedCallback(){super.connectedCallback(),this.renderRoot.host.style.setProperty("--width",this.layout.size==="full"?"var(--columns, 1)":`min(${this.layout.size||"var(--columns)"}, var(--columns))`)}}return t.styles=[P`
|
148
|
+
:host {
|
149
|
+
font-family: var(--font-family);
|
150
|
+
grid-column: span var(--width);
|
151
|
+
max-width: 100%;
|
152
|
+
overflow: hidden;
|
153
|
+
box-sizing: border-box;
|
154
|
+
display: block;
|
155
|
+
}
|
156
|
+
* {
|
157
|
+
box-sizing: border-box;
|
158
|
+
}
|
159
|
+
`],A([u()],t.prototype,"properties",2),A([u()],t.prototype,"context",2),A([u()],t.prototype,"layout",2),A([u()],t.prototype,"name",2),A([u()],t.prototype,"type",2),A([u({attribute:!1})],t.prototype,"application",2),A([u({attribute:!1})],t.prototype,"parent",2),t};var re=Object.defineProperty,ne=Object.getOwnPropertyDescriptor,oe=(s,t,e,i)=>{for(var r=i>1?void 0:i?ne(t,e):t,n=s.length-1,o;n>=0;n--)(o=s[n])&&(r=(i?o(t,e,r):o(r))||r);return i&&r&&re(t,e,r),r};let et=class extends Ot(f){render(){return R`Non resolved component`}};et.styles=[P`
|
160
|
+
:host {
|
161
|
+
display: block;
|
162
|
+
}
|
163
|
+
`];et=oe([F("ace-unresolved-component")],et);/**
|
164
|
+
* @license
|
165
|
+
* Copyright 2020 Google LLC
|
166
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
167
|
+
*/const ae=s=>s.strings===void 0;/**
|
168
|
+
* @license
|
169
|
+
* Copyright 2017 Google LLC
|
170
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
171
|
+
*/const M=(s,t)=>{var i;const e=s._$AN;if(e===void 0)return!1;for(const r of e)(i=r._$AO)==null||i.call(r,t,!1),M(r,t);return!0},V=s=>{let t,e;do{if((t=s._$AM)===void 0)break;e=t._$AN,e.delete(s),s=t}while((e==null?void 0:e.size)===0)},Tt=s=>{for(let t;t=s._$AM;s=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(s))break;e.add(s),le(t)}};function ce(s){this._$AN!==void 0?(V(this),this._$AM=s,Tt(this)):this._$AM=s}function he(s,t=!1,e=0){const i=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(t)if(Array.isArray(i))for(let n=e;n<i.length;n++)M(i[n],!1),V(i[n]);else i!=null&&(M(i,!1),V(i));else M(this,s)}const le=s=>{s.type==Ct.CHILD&&(s._$AP??(s._$AP=he),s._$AQ??(s._$AQ=ce))};class de extends St{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),Tt(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,r;t!==this.isConnected&&(this.isConnected=t,t?(i=this.reconnected)==null||i.call(this):(r=this.disconnected)==null||r.call(this)),e&&(M(this,t),V(this))}setValue(t){if(ae(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}/**
|
172
|
+
* @license
|
173
|
+
* Copyright 2020 Google LLC
|
174
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
175
|
+
*/const pe=()=>new ue;class ue{}const tt=new WeakMap,ge=Et(class extends de{render(s){return l}update(s,[t]){var i;const e=t!==this.G;return e&&this.G!==void 0&&this.ot(void 0),(e||this.rt!==this.lt)&&(this.G=t,this.ct=(i=s.options)==null?void 0:i.host,this.ot(this.lt=s.element)),l}ot(s){if(typeof this.G=="function"){const t=this.ct??globalThis;let e=tt.get(t);e===void 0&&(e=new WeakMap,tt.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ct,void 0),e.set(this.G,s),s!==void 0&&this.G.call(this.ct,s)}else this.G.value=s}get rt(){var s,t;return typeof this.G=="function"?(s=tt.get(this.ct??globalThis))==null?void 0:s.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}});var nt=(s=>(s.Inline="inline",s.Trigger="trigger",s))(nt||{}),fe=Object.defineProperty,$e=Object.getOwnPropertyDescriptor,Ut=(s,t,e,i)=>{for(var r=i>1?void 0:i?$e(t,e):t,n=s.length-1,o;n>=0;n--)(o=s[n])&&(r=(i?o(t,e,r):o(r))||r);return i&&r&&fe(t,e,r),r};let q=class extends f{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=pe()}addChild(s){s.parent=this,this.nodes.push(s)}applyBranding(){if(this.wrapperRef.value){const s=this.application.settings;s!=null&&s.branding&&Pt(s.branding,this.wrapperRef.value)}}firstUpdated(s){this.applyBranding()}render(){return this.application.renderStrategy===nt.Trigger&&this.renderRoot.host.classList.add("floating"),R`<div class="widget-container" ${ge(this.wrapperRef)}>
|
176
|
+
${xt(this.nodes,s=>s)}
|
177
|
+
</div>`}};q.styles=P`
|
178
|
+
:host {
|
179
|
+
--font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
|
180
|
+
--spacing-xs: 0.2rem;
|
181
|
+
--spacing-sm: 0.5rem;
|
182
|
+
--spacing-md: 1rem;
|
183
|
+
--spacing-lg: 1.2rem;
|
184
|
+
--spacing-xl: 1.8rem;
|
185
|
+
|
186
|
+
--text-color: #222222;
|
187
|
+
--link-color: #990ae3;
|
188
|
+
--gray-color: #f3f3f8;
|
189
|
+
--gray-dark-color: #a6a6a6;
|
190
|
+
|
191
|
+
--box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
|
192
|
+
--border-radius: var(--spacing-sm);
|
193
|
+
--border-radius-sm: var(--spacing-sm);
|
194
|
+
}
|
195
|
+
:host {
|
196
|
+
--voca-rem-multiplier: 0.625;
|
197
|
+
box-sizing: border-box;
|
198
|
+
display: block;
|
199
|
+
}
|
200
|
+
|
201
|
+
:host(.floating) {
|
202
|
+
position: fixed;
|
203
|
+
z-index: 6;
|
204
|
+
inset: auto 20px 95px auto;
|
205
|
+
max-height: calc(100vh - 120px);
|
206
|
+
width: 400px;
|
207
|
+
height: 700px;
|
208
|
+
}
|
209
|
+
:host(.floating) .widget-container {
|
210
|
+
box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
|
211
|
+
border-radius: 0.7rem;
|
212
|
+
}
|
213
|
+
:host(.inline) {
|
214
|
+
height: 100%;
|
215
|
+
position: fixed;
|
216
|
+
inset: 0 0 0 0;
|
217
|
+
}
|
218
|
+
|
219
|
+
* {
|
220
|
+
box-sizing: border-box;
|
221
|
+
}
|
222
|
+
.widget-container {
|
223
|
+
height: 100%;
|
224
|
+
background-color: var(--primary-background);
|
225
|
+
padding: 0 var(--spacing-sm);
|
226
|
+
}
|
227
|
+
.widget-container.expanded {
|
228
|
+
opacity: 1;
|
229
|
+
animation: slideUp 0.5s;
|
230
|
+
}
|
231
|
+
.widget-container.hidden {
|
232
|
+
opacity: 0;
|
233
|
+
animation: slideDown 0.5s;
|
234
|
+
}
|
235
|
+
@keyframes slideDown {
|
236
|
+
from {
|
237
|
+
transform: translateY(0);
|
238
|
+
opacity: 1;
|
239
|
+
}
|
240
|
+
to {
|
241
|
+
transform: translateY(100%);
|
242
|
+
opacity: 0;
|
243
|
+
}
|
244
|
+
}
|
245
|
+
@keyframes slideUp {
|
246
|
+
from {
|
247
|
+
transform: translateY(100%);
|
248
|
+
opacity: 0;
|
249
|
+
}
|
250
|
+
to {
|
251
|
+
transform: translateY(0);
|
252
|
+
opacity: 1;
|
253
|
+
}
|
254
|
+
}
|
255
|
+
`;Ut([u({attribute:!1})],q.prototype,"application",2);q=Ut([F("ace-wrapper")],q);var _e=Object.defineProperty,me=Object.getOwnPropertyDescriptor,J=(s,t,e,i)=>{for(var r=i>1?void 0:i?me(t,e):t,n=s.length-1,o;n>=0;n--)(o=s[n])&&(r=(i?o(t,e,r):o(r))||r);return i&&r&&_e(t,e,r),r};let S=class extends f{constructor(){super(),this.status="deactivated",this.addEventListener("environment-created",this.onEnvironmentCreated)}async connectedCallback(){super.connectedCallback(),await this.getGlobalEnvironment()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("environment-created",this.onEnvironmentCreated)}async onEnvironmentCreated(s){this.widget=s.detail.widget,await this.activate(),this.requestUpdate()}async activate(){this.widget&&(await this.widget.activate(),this.status="activated")}async getGlobalEnvironment(){const s=globalThis.widgets;s&&(this.widget=s.applications.find(t=>t.name===this.name),await this.activate())}render(){if(!this.widget||this.status!=="activated")return l;if(this.widget.renderStrategy===nt.Trigger){const s=new y;return s.application=this.widget,s}return this.widget.render()}};S.styles=[P`
|
256
|
+
:host {
|
257
|
+
display: block;
|
258
|
+
}
|
259
|
+
`];J([u({attribute:!0})],S.prototype,"name",2);J([L()],S.prototype,"widget",2);J([L()],S.prototype,"status",2);S=J([F("ace-widget")],S);const ye=s=>{const t={};return Object.keys(s).forEach(e=>{e.indexOf("css-")>-1&&(t[e]=s[e])}),t},ve=(s,t)=>{const e=ye(t);Object.entries(e).forEach(([i,r])=>{s.style.setProperty(i.replace("css-",""),r)})};class ot extends Ot(f){constructor(){super(...arguments),this.nodes=[]}render(){var t;return ve(this.renderRoot.host,this.properties),this.renderRoot.host.style.setProperty("--columns",((t=this.properties.columns)==null?void 0:t.toString())||"1"),R`${xt(this.nodes,e=>e)}`}}ot.styles=[P`
|
260
|
+
:host {
|
261
|
+
height: 100%;
|
262
|
+
display: grid;
|
263
|
+
justify-content: center;
|
264
|
+
grid-auto-rows: max-content;
|
265
|
+
grid-template-rows: auto;
|
266
|
+
grid-template-columns: repeat(var(--columns), 1fr);
|
267
|
+
}
|
268
|
+
`];exports.Area=ot;exports.default=ot;
|
package/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";const r=async e=>{e.registerComponent("area",Promise.resolve().then(()=>require("./area-
|
1
|
+
"use strict";const r=async e=>{e.registerComponent("area",Promise.resolve().then(()=>require("./area-6186125e.js")))};module.exports=r;
|
package/index.mjs
CHANGED
package/package.json
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
{
|
2
2
|
"name": "@telia-ace/widget-components-area-flamingo",
|
3
|
-
"version": "1.1.12-rc.
|
3
|
+
"version": "1.1.12-rc.5",
|
4
4
|
"dependencies": {
|
5
|
-
"@telia-ace/widget-core-flamingo": "1.1.12-rc.
|
5
|
+
"@telia-ace/widget-core-flamingo": "1.1.12-rc.5",
|
6
6
|
"lit": "^3.0.2"
|
7
7
|
},
|
8
8
|
"main": "./index.js",
|
package/area-f6373f40.js
DELETED
@@ -1,264 +0,0 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});/**
|
2
|
-
* @license
|
3
|
-
* Copyright 2019 Google LLC
|
4
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
5
|
-
*/const B=globalThis,Q=B.ShadowRoot&&(B.ShadyCSS===void 0||B.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,X=Symbol(),nt=new WeakMap;let $t=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==X)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(Q&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=nt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&nt.set(e,t))}return t}toString(){return this.cssText}};const Tt=i=>new $t(typeof i=="string"?i:i+"",void 0,X),S=(i,...t)=>{const e=i.length===1?i[0]:t.reduce((s,r,n)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+i[n+1],i[0]);return new $t(e,i,X)},Ut=(i,t)=>{if(Q)i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const s=document.createElement("style"),r=B.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=e.cssText,i.appendChild(s)}},ot=Q?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return Tt(e)})(i):i;/**
|
6
|
-
* @license
|
7
|
-
* Copyright 2017 Google LLC
|
8
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
9
|
-
*/const{is:Mt,defineProperty:Nt,getOwnPropertyDescriptor:kt,getOwnPropertyNames:Ht,getOwnPropertySymbols:Rt,getPrototypeOf:Lt}=Object,_=globalThis,at=_.trustedTypes,Dt=at?at.emptyScript:"",Y=_.reactiveElementPolyfillSupport,O=(i,t)=>i,I={toAttribute(i,t){switch(t){case Boolean:i=i?Dt:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},tt=(i,t)=>!Mt(i,t),ct={attribute:!0,type:String,converter:I,reflect:!1,hasChanged:tt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),_.litPropertyMetadata??(_.litPropertyMetadata=new WeakMap);class E extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=ct){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),r=this.getPropertyDescriptor(t,s,e);r!==void 0&&Nt(this.prototype,t,r)}}static getPropertyDescriptor(t,e,s){const{get:r,set:n}=kt(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get(){return r==null?void 0:r.call(this)},set(o){const c=r==null?void 0:r.call(this);n.call(this,o),this.requestUpdate(t,c,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??ct}static _$Ei(){if(this.hasOwnProperty(O("elementProperties")))return;const t=Lt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(O("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(O("properties"))){const e=this.properties,s=[...Ht(e),...Rt(e)];for(const r of s)this.createProperty(r,e[r])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,r]of e)this.elementProperties.set(s,r)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const r=this._$Eu(e,s);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const r of s)e.unshift(ot(r))}else t!==void 0&&e.push(ot(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$Eg=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$ES??(this._$ES=[])).push(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$ES)==null||e.splice(this._$ES.indexOf(t)>>>0,1)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ut(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)==null||t.forEach(e=>{var s;return(s=e.hostConnected)==null?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)==null||t.forEach(e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EO(t,e){var n;const s=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,s);if(r!==void 0&&s.reflect===!0){const o=(((n=s.converter)==null?void 0:n.toAttribute)!==void 0?s.converter:I).toAttribute(e,s.type);this._$Em=t,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(t,e){var n;const s=this.constructor,r=s._$Eh.get(t);if(r!==void 0&&this._$Em!==r){const o=s.getPropertyOptions(r),c=typeof o.converter=="function"?{fromAttribute:o.converter}:((n=o.converter)==null?void 0:n.fromAttribute)!==void 0?o.converter:I;this._$Em=r,this[r]=c.fromAttribute(e,o.type),this._$Em=null}}requestUpdate(t,e,s,r=!1,n){if(t!==void 0){if(s??(s=this.constructor.getPropertyOptions(t)),!(s.hasChanged??tt)(r?n:this[t],e))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$Eg=this._$EP())}C(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this._$Ep){for(const[n,o]of this._$Ep)this[n]=o;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[n,o]of r)o.wrapped!==!0||this._$AL.has(n)||this[n]===void 0||this.C(n,this[n],o)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$ES)==null||s.forEach(r=>{var n;return(n=r.hostUpdate)==null?void 0:n.call(r)}),this.update(e)):this._$ET()}catch(r){throw t=!1,this._$ET(),r}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)==null||e.forEach(s=>{var r;return(r=s.hostUpdated)==null?void 0:r.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EO(e,this[e]))),this._$ET()}updated(t){}firstUpdated(t){}}E.elementStyles=[],E.shadowRootOptions={mode:"open"},E[O("elementProperties")]=new Map,E[O("finalized")]=new Map,Y==null||Y({ReactiveElement:E}),(_.reactiveElementVersions??(_.reactiveElementVersions=[])).push("2.0.1");/**
|
10
|
-
* @license
|
11
|
-
* Copyright 2017 Google LLC
|
12
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
13
|
-
*/const T=globalThis,G=T.trustedTypes,ht=G?G.createPolicy("lit-html",{createHTML:i=>i}):void 0,mt="$lit$",m=`lit$${(Math.random()+"").slice(9)}$`,_t="?"+m,jt=`<${_t}>`,b=document,M=()=>b.createComment(""),N=i=>i===null||typeof i!="object"&&typeof i!="function",yt=Array.isArray,zt=i=>yt(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",F=`[
|
14
|
-
\f\r]`,P=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,lt=/-->/g,dt=/>/g,y=RegExp(`>|${F}(?:([^\\s"'>=/]+)(${F}*=${F}*(?:[^
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),pt=/'/g,ut=/"/g,vt=/^(?:script|style|textarea|title)$/i,Bt=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),k=Bt(1),w=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),gt=new WeakMap,A=b.createTreeWalker(b,129);function At(i,t){if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return ht!==void 0?ht.createHTML(t):t}const It=(i,t)=>{const e=i.length-1,s=[];let r,n=t===2?"<svg>":"",o=P;for(let c=0;c<e;c++){const a=i[c];let d,p,h=-1,g=0;for(;g<a.length&&(o.lastIndex=g,p=o.exec(a),p!==null);)g=o.lastIndex,o===P?p[1]==="!--"?o=lt:p[1]!==void 0?o=dt:p[2]!==void 0?(vt.test(p[2])&&(r=RegExp("</"+p[2],"g")),o=y):p[3]!==void 0&&(o=y):o===y?p[0]===">"?(o=r??P,h=-1):p[1]===void 0?h=-2:(h=o.lastIndex-p[2].length,d=p[1],o=p[3]===void 0?y:p[3]==='"'?ut:pt):o===ut||o===pt?o=y:o===lt||o===dt?o=P:(o=y,r=void 0);const $=o===y&&i[c+1].startsWith("/>")?" ":"";n+=o===P?a+jt:h>=0?(s.push(d),a.slice(0,h)+mt+a.slice(h)+m+$):a+m+(h===-2?c:$)}return[At(i,n+(i[e]||"<?>")+(t===2?"</svg>":"")),s]};class H{constructor({strings:t,_$litType$:e},s){let r;this.parts=[];let n=0,o=0;const c=t.length-1,a=this.parts,[d,p]=It(t,e);if(this.el=H.createElement(d,s),A.currentNode=this.el.content,e===2){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(r=A.nextNode())!==null&&a.length<c;){if(r.nodeType===1){if(r.hasAttributes())for(const h of r.getAttributeNames())if(h.endsWith(mt)){const g=p[o++],$=r.getAttribute(h).split(m),j=/([.?@])?(.*)/.exec(g);a.push({type:1,index:n,name:j[2],strings:$,ctor:j[1]==="."?Wt:j[1]==="?"?Vt:j[1]==="@"?qt:V}),r.removeAttribute(h)}else h.startsWith(m)&&(a.push({type:6,index:n}),r.removeAttribute(h));if(vt.test(r.tagName)){const h=r.textContent.split(m),g=h.length-1;if(g>0){r.textContent=G?G.emptyScript:"";for(let $=0;$<g;$++)r.append(h[$],M()),A.nextNode(),a.push({type:2,index:++n});r.append(h[g],M())}}}else if(r.nodeType===8)if(r.data===_t)a.push({type:2,index:n});else{let h=-1;for(;(h=r.data.indexOf(m,h+1))!==-1;)a.push({type:7,index:n}),h+=m.length-1}n++}}static createElement(t,e){const s=b.createElement("template");return s.innerHTML=t,s}}function C(i,t,e=i,s){var o,c;if(t===w)return t;let r=s!==void 0?(o=e._$Co)==null?void 0:o[s]:e._$Cl;const n=N(t)?void 0:t._$litDirective$;return(r==null?void 0:r.constructor)!==n&&((c=r==null?void 0:r._$AO)==null||c.call(r,!1),n===void 0?r=void 0:(r=new n(i),r._$AT(i,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=r:e._$Cl=r),r!==void 0&&(t=C(i,r._$AS(i,t.values),r,s)),t}class Gt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,r=((t==null?void 0:t.creationScope)??b).importNode(e,!0);A.currentNode=r;let n=A.nextNode(),o=0,c=0,a=s[0];for(;a!==void 0;){if(o===a.index){let d;a.type===2?d=new R(n,n.nextSibling,this,t):a.type===1?d=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(d=new Yt(n,this,t)),this._$AV.push(d),a=s[++c]}o!==(a==null?void 0:a.index)&&(n=A.nextNode(),o++)}return A.currentNode=b,r}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class R{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,s,r){this.type=2,this._$AH=l,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=r,this._$Cv=(r==null?void 0:r.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=C(this,t,e),N(t)?t===l||t==null||t===""?(this._$AH!==l&&this._$AR(),this._$AH=l):t!==this._$AH&&t!==w&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):zt(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!==l&&N(this._$AH)?this._$AA.nextSibling.data=t:this.$(b.createTextNode(t)),this._$AH=t}g(t){var n;const{values:e,_$litType$:s}=t,r=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=H.createElement(At(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)==null?void 0:n._$AD)===r)this._$AH.p(e);else{const o=new Gt(r,this),c=o.u(this.options);o.p(e),this.$(c),this._$AH=o}}_$AC(t){let e=gt.get(t.strings);return e===void 0&>.set(t.strings,e=new H(t)),e}T(t){yt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,r=0;for(const n of t)r===e.length?e.push(s=new R(this.k(M()),this.k(M()),this,this.options)):s=e[r],s._$AI(n),r++;r<e.length&&(this._$AR(s&&s._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t&&t!==this._$AB;){const r=t.nextSibling;t.remove(),t=r}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class V{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,r,n){this.type=1,this._$AH=l,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=l}_$AI(t,e=this,s,r){const n=this.strings;let o=!1;if(n===void 0)t=C(this,t,e,0),o=!N(t)||t!==this._$AH&&t!==w,o&&(this._$AH=t);else{const c=t;let a,d;for(t=n[0],a=0;a<n.length-1;a++)d=C(this,c[s+a],e,a),d===w&&(d=this._$AH[a]),o||(o=!N(d)||d!==this._$AH[a]),d===l?t=l:t!==l&&(t+=(d??"")+n[a+1]),this._$AH[a]=d}o&&!r&&this.O(t)}O(t){t===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Wt extends V{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===l?void 0:t}}class Vt extends V{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==l)}}class qt extends V{constructor(t,e,s,r,n){super(t,e,s,r,n),this.type=5}_$AI(t,e=this){if((t=C(this,t,e,0)??l)===w)return;const s=this._$AH,r=t===l&&s!==l||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==l&&(s===l||r);r&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class Yt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){C(this,t)}}const J=T.litHtmlPolyfillSupport;J==null||J(H,R),(T.litHtmlVersions??(T.litHtmlVersions=[])).push("3.0.2");const Ft=(i,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let r=s._$litPart$;if(r===void 0){const n=(e==null?void 0:e.renderBefore)??null;s._$litPart$=r=new R(t.insertBefore(M(),n),n,void 0,e??{})}return r._$AI(i),r};/**
|
16
|
-
* @license
|
17
|
-
* Copyright 2017 Google LLC
|
18
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
19
|
-
*/let f=class extends E{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ft(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return w}};var ft;f._$litElement$=!0,f.finalized=!0,(ft=globalThis.litElementHydrateSupport)==null||ft.call(globalThis,{LitElement:f});const K=globalThis.litElementPolyfillSupport;K==null||K({LitElement:f});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.1");/**
|
20
|
-
* @license
|
21
|
-
* Copyright 2021 Google LLC
|
22
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
23
|
-
*/function*bt(i,t){if(i!==void 0){let e=0;for(const s of i)yield t(s,e++)}}/**
|
24
|
-
* @license
|
25
|
-
* Copyright 2017 Google LLC
|
26
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
27
|
-
*/const Jt={attribute:!0,type:String,converter:I,reflect:!1,hasChanged:tt},Kt=(i=Jt,t,e)=>{const{kind:s,metadata:r}=e;let n=globalThis.litPropertyMetadata.get(r);if(n===void 0&&globalThis.litPropertyMetadata.set(r,n=new Map),n.set(e.name,i),s==="accessor"){const{name:o}=e;return{set(c){const a=t.get.call(this);t.set.call(this,c),this.requestUpdate(o,a,i)},init(c){return c!==void 0&&this.C(o,void 0,i),c}}}if(s==="setter"){const{name:o}=e;return function(c){const a=this[o];t.call(this,c),this.requestUpdate(o,a,i)}}throw Error("Unsupported decorator location: "+s)};function u(i){return(t,e)=>typeof e=="object"?Kt(i,t,e):((s,r,n)=>{const o=r.hasOwnProperty(n);return r.constructor.createProperty(n,o?{...s,wrapped:!0}:s),o?Object.getOwnPropertyDescriptor(r,n):void 0})(i,t,e)}/**
|
28
|
-
* @license
|
29
|
-
* Copyright 2017 Google LLC
|
30
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
31
|
-
*/function L(i){return u({...i,state:!0,attribute:!1})}/**
|
32
|
-
* @license
|
33
|
-
* Copyright 2017 Google LLC
|
34
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
35
|
-
*/const wt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},xt=i=>(...t)=>({_$litDirective$:i,values:t});class Et{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}/**
|
36
|
-
* @license
|
37
|
-
* Copyright 2018 Google LLC
|
38
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
39
|
-
*/const Zt=xt(class extends Et{constructor(i){var t;if(super(i),i.type!==wt.ATTRIBUTE||i.name!=="class"||((t=i.strings)==null?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(i){return" "+Object.keys(i).filter(t=>i[t]).join(" ")+" "}update(i,[t]){var s,r;if(this.it===void 0){this.it=new Set,i.strings!==void 0&&(this.st=new Set(i.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(const n in t)t[n]&&!((s=this.st)!=null&&s.has(n))&&this.it.add(n);return this.render(t)}const e=i.element.classList;for(const n of this.it)n in t||(e.remove(n),this.it.delete(n));for(const n in t){const o=!!t[n];o===this.it.has(n)||(r=this.st)!=null&&r.has(n)||(o?(e.add(n),this.it.add(n)):(e.remove(n),this.it.delete(n)))}return w}}),z=(i,t,e)=>{i&&e.style.setProperty(t,i)},Ct=(i,t)=>{var e,s,r,n;z((e=i.colors)==null?void 0:e.primaryBackground,"--primary-background",t),z((s=i.colors)==null?void 0:s.textOnPrimaryBackground,"--text-on-primary-background",t),z((r=i.colors)==null?void 0:r.secondaryBackground,"--secondary-background",t),z((n=i.colors)==null?void 0:n.textOnSecondaryBackground,"--text-on-secondary-background",t)};var Qt=Object.defineProperty,Xt=Object.getOwnPropertyDescriptor,q=(i,t,e,s)=>{for(var r=s>1?void 0:s?Xt(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(r=(s?o(t,e,r):o(r))||r);return s&&r&&Qt(t,e,r),r};class x extends f{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.removeFromDOM()}_applyBranding(){var t;(t=this.application)!=null&&t.settings&&Ct(this.application.settings.branding,this)}async _renderSymbol(){var n;const t=(n=this.application)==null?void 0:n.triggerIcon;if(!t)return l;const e=async o=>await Promise.resolve().then(()=>require("./index-6dd00f59.js")).then(a=>a[o]),{type:s,content:r}=t;switch(s){case"Telia":{const o=await e(r);return o?k`<telia-icon
|
40
|
-
class="trigger-icon"
|
41
|
-
svg=${o.svg}
|
42
|
-
size="lg"
|
43
|
-
></telia-icon>`:l}default:return l}}render(){return k`<button
|
44
|
-
class=${Zt({trigger:!0,active:this.active,rendered:this.loaded})}
|
45
|
-
@click=${this._toggleActive}
|
46
|
-
>
|
47
|
-
${this.icon}
|
48
|
-
<span class="trigger-close">
|
49
|
-
<svg
|
50
|
-
width="18"
|
51
|
-
height="9"
|
52
|
-
viewBox="0 0 18 9"
|
53
|
-
fill="none"
|
54
|
-
xmlns="http://www.w3.org/2000/svg"
|
55
|
-
>
|
56
|
-
<path
|
57
|
-
d="M9 9C8.81794 9.00045 8.63759 8.96634 8.46939 8.89965C8.3012 8.83295 8.14851 8.735 8.02015 8.61145L0.194523 1.12367C0.068294 0.99862 -0.00155266 0.831133 2.61958e-05 0.657285C0.00160506 0.483436 0.0744832 0.317136 0.202964 0.194202C0.331445 0.0712675 0.505249 0.00153576 0.686941 2.50649e-05C0.868634 -0.00148563 1.04368 0.0653456 1.17437 0.186125L9 7.6739L16.8256 0.186125C16.9563 0.0653456 17.1314 -0.00148563 17.3131 2.50649e-05C17.4948 0.00153576 17.6686 0.0712675 17.797 0.194202C17.9255 0.317136 17.9984 0.483436 18 0.657285C18.0016 0.831133 17.9317 0.99862 17.8055 1.12367L9.97985 8.61145C9.85149 8.735 9.6988 8.83295 9.53061 8.89965C9.36241 8.96634 9.18206 9.00045 9 9Z"
|
58
|
-
fill="white"
|
59
|
-
/>
|
60
|
-
</svg>
|
61
|
-
</span>
|
62
|
-
<span class="trigger-loader">
|
63
|
-
<svg viewBox="25 25 50 50">
|
64
|
-
<circle
|
65
|
-
cx="50"
|
66
|
-
cy="50"
|
67
|
-
r="20"
|
68
|
-
fill="none"
|
69
|
-
stroke="#000"
|
70
|
-
stroke-width="2"
|
71
|
-
stroke-miterlimit="10"
|
72
|
-
/>
|
73
|
-
</svg>
|
74
|
-
</span>
|
75
|
-
</button>`}}x.styles=[S`
|
76
|
-
:host {
|
77
|
-
--voca-rem-multiplier: 0.625;
|
78
|
-
display: block;
|
79
|
-
box-sizing: border-box;
|
80
|
-
}
|
81
|
-
|
82
|
-
.trigger {
|
83
|
-
position: fixed;
|
84
|
-
transform: scale(0);
|
85
|
-
box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
|
86
|
-
bottom: 20px;
|
87
|
-
right: 20px;
|
88
|
-
z-index: 5;
|
89
|
-
display: flex;
|
90
|
-
align-items: center;
|
91
|
-
justify-content: center;
|
92
|
-
border: none;
|
93
|
-
line-height: 55px;
|
94
|
-
height: 55px;
|
95
|
-
width: 55px;
|
96
|
-
border-radius: 55px;
|
97
|
-
cursor: pointer;
|
98
|
-
background-color: var(--trigger-bg, var(--primary-background));
|
99
|
-
font-family: Lato;
|
100
|
-
text-decoration: none;
|
101
|
-
border: 3px dashed transparent;
|
102
|
-
box-sizing: border-box;
|
103
|
-
transition: transform 200ms ease-out;
|
104
|
-
}
|
105
|
-
.trigger:hover {
|
106
|
-
transform: scale(1.1) !important;
|
107
|
-
}
|
108
|
-
.trigger.rendered {
|
109
|
-
transform: scale(1);
|
110
|
-
}
|
111
|
-
.trigger.active .trigger-icon {
|
112
|
-
opacity: 0;
|
113
|
-
transform: rotate(-180deg) scale(0);
|
114
|
-
}
|
115
|
-
.trigger.active .trigger-close {
|
116
|
-
opacity: 1;
|
117
|
-
transform: rotate(0deg) scale(1);
|
118
|
-
}
|
119
|
-
|
120
|
-
.trigger-icon {
|
121
|
-
display: inline-block;
|
122
|
-
line-height: inherit;
|
123
|
-
text-align: center;
|
124
|
-
opacity: 1;
|
125
|
-
transform: rotate(0deg) scale(1);
|
126
|
-
transition: opacity 200ms ease-out, transform 200ms ease-out;
|
127
|
-
color: var(--trigger-text-color, var(--text-on-primary-background));
|
128
|
-
}
|
129
|
-
.trigger-close {
|
130
|
-
opacity: 0;
|
131
|
-
transition: transform 200ms ease-out;
|
132
|
-
transform: rotate(180deg) scale(0);
|
133
|
-
position: absolute;
|
134
|
-
top: 0;
|
135
|
-
bottom: 0;
|
136
|
-
left: 0;
|
137
|
-
right: 0;
|
138
|
-
display: flex;
|
139
|
-
justify-content: center;
|
140
|
-
align-items: center;
|
141
|
-
fill: var(--trigger-text-color, var(--text-on-primary-background));
|
142
|
-
}
|
143
|
-
`];q([u({attribute:!1})],x.prototype,"application",2);q([L()],x.prototype,"active",2);q([L()],x.prototype,"loaded",2);q([L()],x.prototype,"icon",2);var te=Object.defineProperty,ee=Object.getOwnPropertyDescriptor,v=(i,t,e,s)=>{for(var r=s>1?void 0:s?ee(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(r=(s?o(t,e,r):o(r))||r);return s&&r&&te(t,e,r),r};const St=i=>{class t extends i{constructor(){super(...arguments),this.properties={},this.context={},this.layout={},this.nodes=[]}writeProperties(s){this.properties=s}writeLayout(s){this.layout=s}writeContext(s){this.context=s}addChild(s){s.parent=this,this.nodes.push(s)}connectedCallback(){super.connectedCallback(),this.renderRoot.host.style.setProperty("--width",this.layout.size==="full"?"var(--columns, 1)":`min(${this.layout.size||"var(--columns)"}, var(--columns))`)}}return t.styles=[S`
|
144
|
-
:host {
|
145
|
-
font-family: var(--font-family);
|
146
|
-
grid-column: span var(--width);
|
147
|
-
max-width: 100%;
|
148
|
-
overflow: hidden;
|
149
|
-
box-sizing: border-box;
|
150
|
-
display: block;
|
151
|
-
}
|
152
|
-
* {
|
153
|
-
box-sizing: border-box;
|
154
|
-
}
|
155
|
-
`],v([u()],t.prototype,"properties",2),v([u()],t.prototype,"context",2),v([u()],t.prototype,"layout",2),v([u()],t.prototype,"name",2),v([u()],t.prototype,"type",2),v([u({attribute:!1})],t.prototype,"application",2),v([u({attribute:!1})],t.prototype,"parent",2),t};class Pt extends St(f){render(){return k`Non resolved component`}}Pt.styles=[S`
|
156
|
-
:host {
|
157
|
-
display: block;
|
158
|
-
}
|
159
|
-
`];/**
|
160
|
-
* @license
|
161
|
-
* Copyright 2020 Google LLC
|
162
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
163
|
-
*/const se=i=>i.strings===void 0;/**
|
164
|
-
* @license
|
165
|
-
* Copyright 2017 Google LLC
|
166
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
167
|
-
*/const U=(i,t)=>{var s;const e=i._$AN;if(e===void 0)return!1;for(const r of e)(s=r._$AO)==null||s.call(r,t,!1),U(r,t);return!0},W=i=>{let t,e;do{if((t=i._$AM)===void 0)break;e=t._$AN,e.delete(i),i=t}while((e==null?void 0:e.size)===0)},Ot=i=>{for(let t;t=i._$AM;i=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(i))break;e.add(i),ne(t)}};function ie(i){this._$AN!==void 0?(W(this),this._$AM=i,Ot(this)):this._$AM=i}function re(i,t=!1,e=0){const s=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(t)if(Array.isArray(s))for(let n=e;n<s.length;n++)U(s[n],!1),W(s[n]);else s!=null&&(U(s,!1),W(s));else U(this,i)}const ne=i=>{i.type==wt.CHILD&&(i._$AP??(i._$AP=re),i._$AQ??(i._$AQ=ie))};class oe extends Et{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),Ot(this),this.isConnected=t._$AU}_$AO(t,e=!0){var s,r;t!==this.isConnected&&(this.isConnected=t,t?(s=this.reconnected)==null||s.call(this):(r=this.disconnected)==null||r.call(this)),e&&(U(this,t),W(this))}setValue(t){if(se(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}/**
|
168
|
-
* @license
|
169
|
-
* Copyright 2020 Google LLC
|
170
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
171
|
-
*/const ae=()=>new ce;class ce{}const Z=new WeakMap,he=xt(class extends oe{render(i){return l}update(i,[t]){var s;const e=t!==this.G;return e&&this.G!==void 0&&this.ot(void 0),(e||this.rt!==this.lt)&&(this.G=t,this.ct=(s=i.options)==null?void 0:s.host,this.ot(this.lt=i.element)),l}ot(i){if(typeof this.G=="function"){const t=this.ct??globalThis;let e=Z.get(t);e===void 0&&(e=new WeakMap,Z.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ct,void 0),e.set(this.G,i),i!==void 0&&this.G.call(this.ct,i)}else this.G.value=i}get rt(){var i,t;return typeof this.G=="function"?(i=Z.get(this.ct??globalThis))==null?void 0:i.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}});var et=(i=>(i.Inline="inline",i.Trigger="trigger",i))(et||{}),le=Object.defineProperty,de=Object.getOwnPropertyDescriptor,pe=(i,t,e,s)=>{for(var r=s>1?void 0:s?de(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(r=(s?o(t,e,r):o(r))||r);return s&&r&&le(t,e,r),r};class st extends f{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=ae()}addChild(t){t.parent=this,this.nodes.push(t)}applyBranding(){if(this.wrapperRef.value){const t=this.application.settings;t!=null&&t.branding&&Ct(t.branding,this.wrapperRef.value)}}firstUpdated(t){this.applyBranding()}render(){return this.application.renderStrategy===et.Trigger&&this.renderRoot.host.classList.add("floating"),k`<div class="widget-container" ${he(this.wrapperRef)}>
|
172
|
-
${bt(this.nodes,t=>t)}
|
173
|
-
</div>`}}st.styles=S`
|
174
|
-
:host {
|
175
|
-
--font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
|
176
|
-
--spacing-xs: 0.2rem;
|
177
|
-
--spacing-sm: 0.5rem;
|
178
|
-
--spacing-md: 1rem;
|
179
|
-
--spacing-lg: 1.2rem;
|
180
|
-
--spacing-xl: 1.8rem;
|
181
|
-
|
182
|
-
--text-color: #222222;
|
183
|
-
--link-color: #990ae3;
|
184
|
-
--gray-color: #f3f3f8;
|
185
|
-
--gray-dark-color: #a6a6a6;
|
186
|
-
|
187
|
-
--box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
|
188
|
-
--border-radius: var(--spacing-sm);
|
189
|
-
--border-radius-sm: var(--spacing-sm);
|
190
|
-
}
|
191
|
-
:host {
|
192
|
-
--voca-rem-multiplier: 0.625;
|
193
|
-
box-sizing: border-box;
|
194
|
-
display: block;
|
195
|
-
}
|
196
|
-
|
197
|
-
:host(.floating) {
|
198
|
-
position: fixed;
|
199
|
-
z-index: 6;
|
200
|
-
inset: auto 20px 95px auto;
|
201
|
-
max-height: calc(100vh - 120px);
|
202
|
-
width: 400px;
|
203
|
-
height: 700px;
|
204
|
-
}
|
205
|
-
:host(.floating) .widget-container {
|
206
|
-
box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
|
207
|
-
border-radius: 0.7rem;
|
208
|
-
}
|
209
|
-
:host(.inline) {
|
210
|
-
height: 100%;
|
211
|
-
position: fixed;
|
212
|
-
inset: 0 0 0 0;
|
213
|
-
}
|
214
|
-
|
215
|
-
* {
|
216
|
-
box-sizing: border-box;
|
217
|
-
}
|
218
|
-
.widget-container {
|
219
|
-
height: 100%;
|
220
|
-
background-color: var(--primary-background);
|
221
|
-
padding: 0 var(--spacing-sm);
|
222
|
-
}
|
223
|
-
.widget-container.expanded {
|
224
|
-
opacity: 1;
|
225
|
-
animation: slideUp 0.5s;
|
226
|
-
}
|
227
|
-
.widget-container.hidden {
|
228
|
-
opacity: 0;
|
229
|
-
animation: slideDown 0.5s;
|
230
|
-
}
|
231
|
-
@keyframes slideDown {
|
232
|
-
from {
|
233
|
-
transform: translateY(0);
|
234
|
-
opacity: 1;
|
235
|
-
}
|
236
|
-
to {
|
237
|
-
transform: translateY(100%);
|
238
|
-
opacity: 0;
|
239
|
-
}
|
240
|
-
}
|
241
|
-
@keyframes slideUp {
|
242
|
-
from {
|
243
|
-
transform: translateY(100%);
|
244
|
-
opacity: 0;
|
245
|
-
}
|
246
|
-
to {
|
247
|
-
transform: translateY(0);
|
248
|
-
opacity: 1;
|
249
|
-
}
|
250
|
-
}
|
251
|
-
`;pe([u({attribute:!1})],st.prototype,"application",2);var ue=Object.defineProperty,ge=Object.getOwnPropertyDescriptor,it=(i,t,e,s)=>{for(var r=s>1?void 0:s?ge(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(r=(s?o(t,e,r):o(r))||r);return s&&r&&ue(t,e,r),r};class D extends f{constructor(){super(),this.status="deactivated",this.addEventListener("environment-created",this.onEnvironmentCreated)}async connectedCallback(){super.connectedCallback(),await this.getGlobalEnvironment()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("environment-created",this.onEnvironmentCreated)}async onEnvironmentCreated(t){this.widget=t.detail.widget,await this.activate(),this.requestUpdate()}async activate(){this.widget&&(await this.widget.activate(),this.status="activated")}async getGlobalEnvironment(){const t=globalThis.widgets;t&&(this.widget=t.applications.find(e=>e.name===this.name),await this.activate())}render(){if(!this.widget||this.status!=="activated")return l;if(this.widget.renderStrategy===et.Trigger){const t=new x;return t.application=this.widget,t}return this.widget.render()}}D.styles=[S`
|
252
|
-
:host {
|
253
|
-
display: block;
|
254
|
-
}
|
255
|
-
`];it([u({attribute:!0})],D.prototype,"name",2);it([L()],D.prototype,"widget",2);it([L()],D.prototype,"status",2);customElements.get("ace-trigger")||customElements.define("ace-trigger",x);customElements.get("ace-unresolved-component")||customElements.define("ace-unresolved-component",Pt);customElements.get("ace-wrapper")||customElements.define("ace-wrapper",st);customElements.get("ace-widget")||customElements.define("ace-widget",D);const fe=i=>{const t={};return Object.keys(i).forEach(e=>{e.indexOf("css-")>-1&&(t[e]=i[e])}),t},$e=(i,t)=>{const e=fe(t);Object.entries(e).forEach(([s,r])=>{i.style.setProperty(s.replace("css-",""),r)})};class rt extends St(f){constructor(){super(...arguments),this.nodes=[]}render(){var t;return $e(this.renderRoot.host,this.properties),this.renderRoot.host.style.setProperty("--columns",((t=this.properties.columns)==null?void 0:t.toString())||"1"),k`${bt(this.nodes,e=>e)}`}}rt.styles=[S`
|
256
|
-
:host {
|
257
|
-
height: 100%;
|
258
|
-
display: grid;
|
259
|
-
justify-content: center;
|
260
|
-
grid-auto-rows: max-content;
|
261
|
-
grid-template-rows: auto;
|
262
|
-
grid-template-columns: repeat(var(--columns), 1fr);
|
263
|
-
}
|
264
|
-
`];exports.Area=rt;exports.default=rt;
|