@telia-ace/widget-core-flamingo 1.1.27 → 1.1.28-rc.1
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +89 -49
- package/index.mjs +153 -112
- package/package.json +1 -1
package/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var pt=function(i,t){return pt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])},pt(i,t)};function
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var pt=function(i,t){return pt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])},pt(i,t)};function D(i,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");pt(i,t);function e(){this.constructor=i}i.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function ut(i){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&i[t],r=0;if(e)return e.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&r>=i.length&&(i=void 0),{value:i&&i[r++],done:!i}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function J(i,t){var e=typeof Symbol=="function"&&i[Symbol.iterator];if(!e)return i;var r=e.call(i),s,n=[],o;try{for(;(t===void 0||t-- >0)&&!(s=r.next()).done;)n.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return n}function K(i,t,e){if(e||arguments.length===2)for(var r=0,s=t.length,n;r<s;r++)(n||!(r in t))&&(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return i.concat(n||Array.prototype.slice.call(t))}function b(i){return typeof i=="function"}function Nt(i){var t=function(r){Error.call(r),r.stack=new Error().stack},e=i(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var st=Nt(function(i){return function(e){i(this),this.message=e?e.length+` errors occurred during unsubscription:
|
2
2
|
`+e.map(function(r,s){return s+1+") "+r.toString()}).join(`
|
3
|
-
`):"",this.name="UnsubscriptionError",this.errors=e}});function dt(i,t){if(i){var e=i.indexOf(t);0<=e&&i.splice(e,1)}}var et=function(){function i(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return i.prototype.unsubscribe=function(){var t,e,r,s,n;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=ut(o),c=a.next();!c.done;c=a.next()){var h=c.value;h.remove(this)}}catch(v){t={error:v}}finally{try{c&&!c.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var p=this.initialTeardown;if(b(p))try{p()}catch(v){n=v instanceof st?v.errors:[v]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var f=ut(l),u=f.next();!u.done;u=f.next()){var g=u.value;try{wt(g)}catch(v){n=n??[],v instanceof st?n=K(K([],J(n)),J(v.errors)):n.push(v)}}}catch(v){r={error:v}}finally{try{u&&!u.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}}if(n)throw new st(n)}},i.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)wt(t);else{if(t instanceof i){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},i.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},i.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},i.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&dt(e,t)},i.prototype.remove=function(t){var e=this._finalizers;e&&dt(e,t),t instanceof i&&t._removeParent(this)},i.EMPTY=function(){var t=new i;return t.closed=!0,t}(),i}(),Lt=et.EMPTY;function
|
3
|
+
`):"",this.name="UnsubscriptionError",this.errors=e}});function dt(i,t){if(i){var e=i.indexOf(t);0<=e&&i.splice(e,1)}}var et=function(){function i(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return i.prototype.unsubscribe=function(){var t,e,r,s,n;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=ut(o),c=a.next();!c.done;c=a.next()){var h=c.value;h.remove(this)}}catch(v){t={error:v}}finally{try{c&&!c.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var p=this.initialTeardown;if(b(p))try{p()}catch(v){n=v instanceof st?v.errors:[v]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var f=ut(l),u=f.next();!u.done;u=f.next()){var g=u.value;try{wt(g)}catch(v){n=n??[],v instanceof st?n=K(K([],J(n)),J(v.errors)):n.push(v)}}}catch(v){r={error:v}}finally{try{u&&!u.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}}if(n)throw new st(n)}},i.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)wt(t);else{if(t instanceof i){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},i.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},i.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},i.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&dt(e,t)},i.prototype.remove=function(t){var e=this._finalizers;e&&dt(e,t),t instanceof i&&t._removeParent(this)},i.EMPTY=function(){var t=new i;return t.closed=!0,t}(),i}(),Lt=et.EMPTY;function Bt(i){return i instanceof et||i&&"closed"in i&&b(i.remove)&&b(i.add)&&b(i.unsubscribe)}function wt(i){b(i)?i():i.unsubscribe()}var Dt={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ft={setTimeout:function(i,t){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];var s=ft.delegate;return s!=null&&s.setTimeout?s.setTimeout.apply(s,K([i,t],J(e))):setTimeout.apply(void 0,K([i,t],J(e)))},clearTimeout:function(i){var t=ft.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(i)},delegate:void 0};function pe(i){ft.setTimeout(function(){throw i})}function At(){}function Y(i){i()}var zt=function(i){D(t,i);function t(e){var r=i.call(this)||this;return r.isStopped=!1,e?(r.destination=e,Bt(e)&&e.add(r)):r.destination=ge,r}return t.create=function(e,r,s){return new gt(e,r,s)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,i.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(et),ue=Function.prototype.bind;function nt(i,t){return ue.call(i,t)}var de=function(){function i(t){this.partialObserver=t}return i.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(r){V(r)}},i.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(r){V(r)}else V(t)},i.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){V(e)}},i}(),gt=function(i){D(t,i);function t(e,r,s){var n=i.call(this)||this,o;if(b(e)||!e)o={next:e??void 0,error:r??void 0,complete:s??void 0};else{var a;n&&Dt.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return n.unsubscribe()},o={next:e.next&&nt(e.next,a),error:e.error&&nt(e.error,a),complete:e.complete&&nt(e.complete,a)}):o=e}return n.destination=new de(o),n}return t}(zt);function V(i){pe(i)}function fe(i){throw i}var ge={closed:!0,next:At,error:fe,complete:At},ve=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function ye(i){return i}function me(i){return i.length===0?ye:i.length===1?i[0]:function(e){return i.reduce(function(r,s){return s(r)},e)}}var St=function(){function i(t){t&&(this._subscribe=t)}return i.prototype.lift=function(t){var e=new i;return e.source=this,e.operator=t,e},i.prototype.subscribe=function(t,e,r){var s=this,n=_e(t)?t:new gt(t,e,r);return Y(function(){var o=s,a=o.operator,c=o.source;n.add(a?a.call(n,c):c?s._subscribe(n):s._trySubscribe(n))}),n},i.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},i.prototype.forEach=function(t,e){var r=this;return e=xt(e),new e(function(s,n){var o=new gt({next:function(a){try{t(a)}catch(c){n(c),o.unsubscribe()}},error:n,complete:s});r.subscribe(o)})},i.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},i.prototype[ve]=function(){return this},i.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return me(t)(this)},i.prototype.toPromise=function(t){var e=this;return t=xt(t),new t(function(r,s){var n;e.subscribe(function(o){return n=o},function(o){return s(o)},function(){return r(n)})})},i.create=function(t){return new i(t)},i}();function xt(i){var t;return(t=i??Dt.Promise)!==null&&t!==void 0?t:Promise}function be(i){return i&&b(i.next)&&b(i.error)&&b(i.complete)}function _e(i){return i&&i instanceof zt||be(i)&&Bt(i)}var $e=Nt(function(i){return function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Wt=function(i){D(t,i);function t(){var e=i.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return t.prototype.lift=function(e){var r=new Et(this,this);return r.operator=e,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new $e},t.prototype.next=function(e){var r=this;Y(function(){var s,n;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var o=ut(r.currentObservers),a=o.next();!a.done;a=o.next()){var c=a.value;c.next(e)}}catch(h){s={error:h}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(s)throw s.error}}}})},t.prototype.error=function(e){var r=this;Y(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=e;for(var s=r.observers;s.length;)s.shift().error(e)}})},t.prototype.complete=function(){var e=this;Y(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var r=e.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(e){return this._throwIfClosed(),i.prototype._trySubscribe.call(this,e)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var r=this,s=this,n=s.hasError,o=s.isStopped,a=s.observers;return n||o?Lt:(this.currentObservers=null,a.push(e),new et(function(){r.currentObservers=null,dt(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var r=this,s=r.hasError,n=r.thrownError,o=r.isStopped;s?e.error(n):o&&e.complete()},t.prototype.asObservable=function(){var e=new St;return e.source=this,e},t.create=function(e,r){return new Et(e,r)},t}(St),Et=function(i){D(t,i);function t(e,r){var s=i.call(this)||this;return s.destination=e,s.source=r,s}return t.prototype.next=function(e){var r,s;(s=(r=this.destination)===null||r===void 0?void 0:r.next)===null||s===void 0||s.call(r,e)},t.prototype.error=function(e){var r,s;(s=(r=this.destination)===null||r===void 0?void 0:r.error)===null||s===void 0||s.call(r,e)},t.prototype.complete=function(){var e,r;(r=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||r===void 0||r.call(e)},t.prototype._subscribe=function(e){var r,s;return(s=(r=this.source)===null||r===void 0?void 0:r.subscribe(e))!==null&&s!==void 0?s:Lt},t}(Wt),we=function(i){D(t,i);function t(e){var r=i.call(this)||this;return r._value=e,r}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(e){var r=i.prototype._subscribe.call(this,e);return!r.closed&&e.next(this._value),r},t.prototype.getValue=function(){var e=this,r=e.hasError,s=e.thrownError,n=e._value;if(r)throw s;return this._throwIfClosed(),n},t.prototype.next=function(e){i.prototype.next.call(this,this._value=e)},t}(Wt),Gt=(i=>(i.Loading="loading",i.Ready="ready",i))(Gt||{});class vt{constructor(t,e){this.state=new we("loading"),this.resolvers=new Map,this.name=t,this.environment=e,this.state.next("ready")}setState(t){this.state.next(t)}async register(t,e){this.resolvers.set(t,e)}async get(t){return this.resolvers.get(t)}}/**
|
4
4
|
* @license
|
5
5
|
* Copyright 2019 Google LLC
|
6
6
|
* SPDX-License-Identifier: BSD-3-Clause
|
@@ -8,17 +8,17 @@
|
|
8
8
|
* @license
|
9
9
|
* Copyright 2017 Google LLC
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
11
|
-
*/const{is:
|
11
|
+
*/const{is:xe,defineProperty:Ee,getOwnPropertyDescriptor:Ce,getOwnPropertyNames:Pe,getOwnPropertySymbols:Te,getPrototypeOf:Oe}=Object,$=globalThis,Tt=$.trustedTypes,Ue=Tt?Tt.emptyScript:"",ot=$.reactiveElementPolyfillSupport,k=(i,t)=>i,Z={toAttribute(i,t){switch(t){case Boolean:i=i?Ue: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}},bt=(i,t)=>!xe(i,t),Ot={attribute:!0,type:String,converter:Z,reflect:!1,hasChanged:bt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),$.litPropertyMetadata??($.litPropertyMetadata=new WeakMap);class T 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=Ot){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const r=Symbol(),s=this.getPropertyDescriptor(t,r,e);s!==void 0&&Ee(this.prototype,t,s)}}static getPropertyDescriptor(t,e,r){const{get:s,set:n}=Ce(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get(){return s==null?void 0:s.call(this)},set(o){const a=s==null?void 0:s.call(this);n.call(this,o),this.requestUpdate(t,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Ot}static _$Ei(){if(this.hasOwnProperty(k("elementProperties")))return;const t=Oe(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(k("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(k("properties"))){const e=this.properties,r=[...Pe(e),...Te(e)];for(const s of r)this.createProperty(s,e[s])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[r,s]of e)this.elementProperties.set(r,s)}this._$Eh=new Map;for(const[e,r]of this.elementProperties){const s=this._$Eu(e,r);s!==void 0&&this._$Eh.set(s,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const s of r)e.unshift(Pt(s))}else t!==void 0&&e.push(Pt(t));return e}static _$Eu(t,e){const r=e.attribute;return r===!1?void 0:typeof r=="string"?r: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 r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Se(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 r;return(r=e.hostConnected)==null?void 0:r.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)==null||t.forEach(e=>{var r;return(r=e.hostDisconnected)==null?void 0:r.call(e)})}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$EO(t,e){var n;const r=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,r);if(s!==void 0&&r.reflect===!0){const o=(((n=r.converter)==null?void 0:n.toAttribute)!==void 0?r.converter:Z).toAttribute(e,r.type);this._$Em=t,o==null?this.removeAttribute(s):this.setAttribute(s,o),this._$Em=null}}_$AK(t,e){var n;const r=this.constructor,s=r._$Eh.get(t);if(s!==void 0&&this._$Em!==s){const o=r.getPropertyOptions(s),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((n=o.converter)==null?void 0:n.fromAttribute)!==void 0?o.converter:Z;this._$Em=s,this[s]=a.fromAttribute(e,o.type),this._$Em=null}}requestUpdate(t,e,r,s=!1,n){if(t!==void 0){if(r??(r=this.constructor.getPropertyOptions(t)),!(r.hasChanged??bt)(s?n:this[t],e))return;this.C(t,e,r)}this.isUpdatePending===!1&&(this._$Eg=this._$EP())}C(t,e,r){this._$AL.has(t)||this._$AL.set(t,e),r.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 r;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 s=this.constructor.elementProperties;if(s.size>0)for(const[n,o]of s)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),(r=this._$ES)==null||r.forEach(s=>{var n;return(n=s.hostUpdate)==null?void 0:n.call(s)}),this.update(e)):this._$ET()}catch(s){throw t=!1,this._$ET(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)==null||e.forEach(r=>{var s;return(s=r.hostUpdated)==null?void 0:s.call(r)}),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){}}T.elementStyles=[],T.shadowRootOptions={mode:"open"},T[k("elementProperties")]=new Map,T[k("finalized")]=new Map,ot==null||ot({ReactiveElement:T}),($.reactiveElementVersions??($.reactiveElementVersions=[])).push("2.0.1");/**
|
12
12
|
* @license
|
13
13
|
* Copyright 2017 Google LLC
|
14
14
|
* SPDX-License-Identifier: BSD-3-Clause
|
15
15
|
*/const j=globalThis,Q=j.trustedTypes,Ut=Q?Q.createPolicy("lit-html",{createHTML:i=>i}):void 0,qt="$lit$",_=`lit$${(Math.random()+"").slice(9)}$`,Yt="?"+_,Re=`<${Yt}>`,C=document,N=()=>C.createComment(""),L=i=>i===null||typeof i!="object"&&typeof i!="function",Ft=Array.isArray,Ie=i=>Ft(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",at=`[
|
16
|
-
\f\r]`,
|
17
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Mt=/'/g,
|
16
|
+
\f\r]`,M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Rt=/-->/g,It=/>/g,S=RegExp(`>|${at}(?:([^\\s"'>=/]+)(${at}*=${at}*(?:[^
|
17
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Mt=/'/g,kt=/"/g,Jt=/^(?:script|style|textarea|title)$/i,Me=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),O=Me(1),P=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),jt=new WeakMap,E=C.createTreeWalker(C,129);function Kt(i,t){if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ut!==void 0?Ut.createHTML(t):t}const ke=(i,t)=>{const e=i.length-1,r=[];let s,n=t===2?"<svg>":"",o=M;for(let a=0;a<e;a++){const c=i[a];let h,p,l=-1,f=0;for(;f<c.length&&(o.lastIndex=f,p=o.exec(c),p!==null);)f=o.lastIndex,o===M?p[1]==="!--"?o=Rt:p[1]!==void 0?o=It:p[2]!==void 0?(Jt.test(p[2])&&(s=RegExp("</"+p[2],"g")),o=S):p[3]!==void 0&&(o=S):o===S?p[0]===">"?(o=s??M,l=-1):p[1]===void 0?l=-2:(l=o.lastIndex-p[2].length,h=p[1],o=p[3]===void 0?S:p[3]==='"'?kt:Mt):o===kt||o===Mt?o=S:o===Rt||o===It?o=M:(o=S,s=void 0);const u=o===S&&i[a+1].startsWith("/>")?" ":"";n+=o===M?c+Re:l>=0?(r.push(h),c.slice(0,l)+qt+c.slice(l)+_+u):c+_+(l===-2?a:u)}return[Kt(i,n+(i[e]||"<?>")+(t===2?"</svg>":"")),r]};class B{constructor({strings:t,_$litType$:e},r){let s;this.parts=[];let n=0,o=0;const a=t.length-1,c=this.parts,[h,p]=ke(t,e);if(this.el=B.createElement(h,r),E.currentNode=this.el.content,e===2){const l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(s=E.nextNode())!==null&&c.length<a;){if(s.nodeType===1){if(s.hasAttributes())for(const l of s.getAttributeNames())if(l.endsWith(qt)){const f=p[o++],u=s.getAttribute(l).split(_),g=/([.?@])?(.*)/.exec(f);c.push({type:1,index:n,name:g[2],strings:u,ctor:g[1]==="."?He:g[1]==="?"?Ne:g[1]==="@"?Le:rt}),s.removeAttribute(l)}else l.startsWith(_)&&(c.push({type:6,index:n}),s.removeAttribute(l));if(Jt.test(s.tagName)){const l=s.textContent.split(_),f=l.length-1;if(f>0){s.textContent=Q?Q.emptyScript:"";for(let u=0;u<f;u++)s.append(l[u],N()),E.nextNode(),c.push({type:2,index:++n});s.append(l[f],N())}}}else if(s.nodeType===8)if(s.data===Yt)c.push({type:2,index:n});else{let l=-1;for(;(l=s.data.indexOf(_,l+1))!==-1;)c.push({type:7,index:n}),l+=_.length-1}n++}}static createElement(t,e){const r=C.createElement("template");return r.innerHTML=t,r}}function U(i,t,e=i,r){var o,a;if(t===P)return t;let s=r!==void 0?(o=e._$Co)==null?void 0:o[r]:e._$Cl;const n=L(t)?void 0:t._$litDirective$;return(s==null?void 0:s.constructor)!==n&&((a=s==null?void 0:s._$AO)==null||a.call(s,!1),n===void 0?s=void 0:(s=new n(i),s._$AT(i,e,r)),r!==void 0?(e._$Co??(e._$Co=[]))[r]=s:e._$Cl=s),s!==void 0&&(t=U(i,s._$AS(i,t.values),s,r)),t}class je{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:r}=this._$AD,s=((t==null?void 0:t.creationScope)??C).importNode(e,!0);E.currentNode=s;let n=E.nextNode(),o=0,a=0,c=r[0];for(;c!==void 0;){if(o===c.index){let h;c.type===2?h=new W(n,n.nextSibling,this,t):c.type===1?h=new c.ctor(n,c.name,c.strings,this,t):c.type===6&&(h=new Be(n,this,t)),this._$AV.push(h),c=r[++a]}o!==(c==null?void 0:c.index)&&(n=E.nextNode(),o++)}return E.currentNode=C,s}p(t){let e=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}}class W{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,r,s){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=s,this._$Cv=(s==null?void 0:s.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=U(this,t,e),L(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==P&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):Ie(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!==d&&L(this._$AH)?this._$AA.nextSibling.data=t:this.$(C.createTextNode(t)),this._$AH=t}g(t){var n;const{values:e,_$litType$:r}=t,s=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=B.createElement(Kt(r.h,r.h[0]),this.options)),r);if(((n=this._$AH)==null?void 0:n._$AD)===s)this._$AH.p(e);else{const o=new je(s,this),a=o.u(this.options);o.p(e),this.$(a),this._$AH=o}}_$AC(t){let e=jt.get(t.strings);return e===void 0&&jt.set(t.strings,e=new B(t)),e}T(t){Ft(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let r,s=0;for(const n of t)s===e.length?e.push(r=new W(this.k(N()),this.k(N()),this,this.options)):r=e[s],r._$AI(n),s++;s<e.length&&(this._$AR(r&&r._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var r;for((r=this._$AP)==null?void 0:r.call(this,!1,!0,e);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class rt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,s,n){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=n,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=d}_$AI(t,e=this,r,s){const n=this.strings;let o=!1;if(n===void 0)t=U(this,t,e,0),o=!L(t)||t!==this._$AH&&t!==P,o&&(this._$AH=t);else{const a=t;let c,h;for(t=n[0],c=0;c<n.length-1;c++)h=U(this,a[r+c],e,c),h===P&&(h=this._$AH[c]),o||(o=!L(h)||h!==this._$AH[c]),h===d?t=d:t!==d&&(t+=(h??"")+n[c+1]),this._$AH[c]=h}o&&!s&&this.O(t)}O(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class He extends rt{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===d?void 0:t}}class Ne extends rt{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}}class Le extends rt{constructor(t,e,r,s,n){super(t,e,r,s,n),this.type=5}_$AI(t,e=this){if((t=U(this,t,e,0)??d)===P)return;const r=this._$AH,s=t===d&&r!==d||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,n=t!==d&&(r===d||s);s&&this.element.removeEventListener(this.name,this,r),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 Be{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){U(this,t)}}const ct=j.litHtmlPolyfillSupport;ct==null||ct(B,W),(j.litHtmlVersions??(j.litHtmlVersions=[])).push("3.0.2");const De=(i,t,e)=>{const r=(e==null?void 0:e.renderBefore)??t;let s=r._$litPart$;if(s===void 0){const n=(e==null?void 0:e.renderBefore)??null;r._$litPart$=s=new W(t.insertBefore(N(),n),n,void 0,e??{})}return s._$AI(i),s};/**
|
18
18
|
* @license
|
19
19
|
* Copyright 2017 Google LLC
|
20
20
|
* SPDX-License-Identifier: BSD-3-Clause
|
21
|
-
*/let w=class extends T{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=
|
21
|
+
*/let w=class extends T{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=De(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 P}};var Ht;w._$litElement$=!0,w.finalized=!0,(Ht=globalThis.litElementHydrateSupport)==null||Ht.call(globalThis,{LitElement:w});const lt=globalThis.litElementPolyfillSupport;lt==null||lt({LitElement:w});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.1");/**
|
22
22
|
* @license
|
23
23
|
* Copyright 2017 Google LLC
|
24
24
|
* SPDX-License-Identifier: BSD-3-Clause
|
@@ -26,7 +26,7 @@
|
|
26
26
|
* @license
|
27
27
|
* Copyright 2017 Google LLC
|
28
28
|
* SPDX-License-Identifier: BSD-3-Clause
|
29
|
-
*/function
|
29
|
+
*/function R(i){return y({...i,state:!0,attribute:!1})}/**
|
30
30
|
* @license
|
31
31
|
* Copyright 2017 Google LLC
|
32
32
|
* SPDX-License-Identifier: BSD-3-Clause
|
@@ -46,56 +46,74 @@
|
|
46
46
|
* @license
|
47
47
|
* Copyright 2020 Google LLC
|
48
48
|
* SPDX-License-Identifier: BSD-3-Clause
|
49
|
-
*/const re=()=>new Ke;class Ke{}const ht=new WeakMap,ie=Qt(class extends Je{render(i){return d}update(i,[t]){var r;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=(r=i.options)==null?void 0:r.host,this.ot(this.lt=i.element)),d}ot(i){if(typeof this.G=="function"){const t=this.ct??globalThis;let e=ht.get(t);e===void 0&&(e=new WeakMap,ht.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=ht.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 Ze=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,G=(i,t,e,r)=>{for(var s=r>1?void 0:r?Qe(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(s=(r?o(t,e,s):o(s))||s);return r&&s&&Ze(t,e,s),s};class m extends w{constructor(){super(...arguments),this.active=!1,this.loaded=!1,this.offset=0,this.buttonRef=re()}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(),this.loaded=!0,this._applyBranding(),this.offset>0&&this.buttonRef.value&&(this.buttonRef.value.style.right=`calc(${this.offset}px + 20px)`)}_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&&te(this.application.settings.branding,this)}async _renderSymbol(){var a,c,h;const t=(a=this.application)==null?void 0:a.branding(),e=(c=t==null?void 0:t.graphics)==null?void 0:c.trigger;if(e)return
|
49
|
+
*/const re=()=>new Ke;class Ke{}const ht=new WeakMap,ie=Qt(class extends Je{render(i){return d}update(i,[t]){var r;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=(r=i.options)==null?void 0:r.host,this.ot(this.lt=i.element)),d}ot(i){if(typeof this.G=="function"){const t=this.ct??globalThis;let e=ht.get(t);e===void 0&&(e=new WeakMap,ht.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=ht.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 Ze=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,G=(i,t,e,r)=>{for(var s=r>1?void 0:r?Qe(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(s=(r?o(t,e,s):o(s))||s);return r&&s&&Ze(t,e,s),s};class m extends w{constructor(){super(...arguments),this.active=!1,this.loaded=!1,this.offset=0,this.buttonRef=re()}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(),this.loaded=!0,this._applyBranding(),this.offset>0&&this.buttonRef.value&&(this.buttonRef.value.style.right=`calc(${this.offset}px + 20px)`)}_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&&te(this.application.settings.branding,this)}async _renderSymbol(){var a,c,h;const t=(a=this.application)==null?void 0:a.branding(),e=(c=t==null?void 0:t.graphics)==null?void 0:c.trigger;if(e)return O` <img src=${e} class="trigger-icon" alt="" /> `;const r=(h=this.application)==null?void 0:h.triggerIcon;if(!r)return d;const s=async p=>await Promise.resolve().then(()=>require("./index-6dd00f59.js")).then(f=>f[p]),{type:n,content:o}=r;switch(n){case"Telia":{const p=await s(o);return p?O`<telia-icon
|
50
50
|
class="trigger-icon"
|
51
51
|
svg=${p.svg}
|
52
52
|
size="lg"
|
53
|
-
></telia-icon>`:d}default:return d}}setOffset(t){this.offset=t}render(){return
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
>
|
67
|
-
<
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
</svg>
|
72
|
-
</span>
|
73
|
-
<span class="trigger-loader">
|
74
|
-
<svg viewBox="25 25 50 50">
|
75
|
-
<circle
|
76
|
-
cx="50"
|
77
|
-
cy="50"
|
78
|
-
r="20"
|
53
|
+
></telia-icon>`:d}default:return d}}setOffset(t){this.offset=t}render(){var t,e,r,s;return O`<div class="trigger-container">
|
54
|
+
${(s=(r=(e=(t=this.application)==null?void 0:t.settings)==null?void 0:e.branding)==null?void 0:r.other)!=null&&s.showButtonLabel?O`
|
55
|
+
<button class="trigger-label" @click=${this._toggleActive}>
|
56
|
+
${this.application.settings.branding.other.buttonLabelText}
|
57
|
+
</button>
|
58
|
+
`:d}
|
59
|
+
|
60
|
+
<button
|
61
|
+
class=${Ge({trigger:!0,active:this.active,rendered:this.loaded})}
|
62
|
+
@click=${this._toggleActive}
|
63
|
+
${ie(this.buttonRef)}
|
64
|
+
>
|
65
|
+
${this.icon}
|
66
|
+
<span class="trigger-close">
|
67
|
+
<svg
|
68
|
+
width="18"
|
69
|
+
height="9"
|
70
|
+
viewBox="0 0 18 9"
|
79
71
|
fill="none"
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
72
|
+
xmlns="http://www.w3.org/2000/svg"
|
73
|
+
>
|
74
|
+
<path
|
75
|
+
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"
|
76
|
+
fill="white"
|
77
|
+
/>
|
78
|
+
</svg>
|
79
|
+
</span>
|
80
|
+
<span class="trigger-loader">
|
81
|
+
<svg viewBox="25 25 50 50">
|
82
|
+
<circle
|
83
|
+
cx="50"
|
84
|
+
cy="50"
|
85
|
+
r="20"
|
86
|
+
fill="none"
|
87
|
+
stroke="#000"
|
88
|
+
stroke-width="2"
|
89
|
+
stroke-miterlimit="10"
|
90
|
+
/>
|
91
|
+
</svg>
|
92
|
+
</span>
|
93
|
+
</button>
|
94
|
+
</div>`}}m.styles=[z`
|
87
95
|
:host {
|
88
96
|
--voca-rem-multiplier: 0.625;
|
97
|
+
--trigger-label-bg: #f5e0ff;
|
98
|
+
--trigger-label-text-color: rgba(0, 0, 0, 0.8);
|
89
99
|
display: block;
|
90
100
|
box-sizing: border-box;
|
101
|
+
/* font-family: var(--font-family); */
|
102
|
+
font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
|
91
103
|
}
|
92
104
|
|
93
|
-
.trigger {
|
105
|
+
.trigger-container {
|
94
106
|
position: fixed;
|
95
|
-
transform: scale(0);
|
96
|
-
box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
|
97
107
|
bottom: 20px;
|
98
108
|
right: 20px;
|
109
|
+
display: flex;
|
110
|
+
align-items: center;
|
111
|
+
gap: 1rem;
|
112
|
+
}
|
113
|
+
|
114
|
+
.trigger {
|
115
|
+
transform: scale(0);
|
116
|
+
box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
|
99
117
|
z-index: 5;
|
100
118
|
display: flex;
|
101
119
|
align-items: center;
|
@@ -155,7 +173,29 @@
|
|
155
173
|
img {
|
156
174
|
max-width: 100%;
|
157
175
|
}
|
158
|
-
|
176
|
+
|
177
|
+
.trigger-label {
|
178
|
+
box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.1);
|
179
|
+
background-color: var(--trigger-label-bg);
|
180
|
+
color: var(--trigger-label-text-color);
|
181
|
+
white-space: nowrap;
|
182
|
+
padding: 0.7rem 1rem;
|
183
|
+
border-radius: 0.3rem;
|
184
|
+
font-weight: 500;
|
185
|
+
display: flex;
|
186
|
+
justify-content: center;
|
187
|
+
align-items: center;
|
188
|
+
cursor: pointer;
|
189
|
+
border: none;
|
190
|
+
font-size: 1rem;
|
191
|
+
font-family: inherit;
|
192
|
+
transition: all 300ms ease-in-out;
|
193
|
+
}
|
194
|
+
|
195
|
+
.trigger-label:hover {
|
196
|
+
opacity: 0.8;
|
197
|
+
}
|
198
|
+
`];G([y({attribute:!1})],m.prototype,"application",2);G([R()],m.prototype,"active",2);G([R()],m.prototype,"loaded",2);G([R()],m.prototype,"icon",2);G([R()],m.prototype,"offset",2);var Xe=Object.defineProperty,tr=Object.getOwnPropertyDescriptor,x=(i,t,e,r)=>{for(var s=r>1?void 0:r?tr(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(s=(r?o(t,e,s):o(s))||s);return r&&s&&Xe(t,e,s),s};const se=i=>{class t extends i{constructor(){super(...arguments),this.properties={},this.context={},this.layout={},this.nodes=[]}writeProperties(r){this.properties=r}writeLayout(r){this.layout=r}writeContext(r){this.context=r}addChild(r){r.parent=this,this.nodes.push(r)}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=[z`
|
159
199
|
:host {
|
160
200
|
font-family: var(--font-family);
|
161
201
|
grid-column: span var(--width);
|
@@ -167,7 +207,7 @@
|
|
167
207
|
* {
|
168
208
|
box-sizing: border-box;
|
169
209
|
}
|
170
|
-
`],
|
210
|
+
`],x([y()],t.prototype,"properties",2),x([y()],t.prototype,"context",2),x([y()],t.prototype,"layout",2),x([y()],t.prototype,"name",2),x([y()],t.prototype,"type",2),x([y({attribute:!1})],t.prototype,"application",2),x([y({attribute:!1})],t.prototype,"parent",2),t};class _t extends se(w){render(){return O`Non resolved component`}}_t.styles=[z`
|
171
211
|
:host {
|
172
212
|
display: block;
|
173
213
|
}
|
@@ -175,7 +215,7 @@
|
|
175
215
|
* @license
|
176
216
|
* Copyright 2021 Google LLC
|
177
217
|
* SPDX-License-Identifier: BSD-3-Clause
|
178
|
-
*/function*er(i,t){if(i!==void 0){let e=0;for(const r of i)yield t(r,e++)}}var A=(i=>(i.Inline="inline",i.Trigger="trigger",i))(A||{}),rr=Object.defineProperty,ir=Object.getOwnPropertyDescriptor,sr=(i,t,e,r)=>{for(var s=r>1?void 0:r?ir(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(s=(r?o(t,e,s):o(s))||s);return r&&s&&rr(t,e,s),s};class it extends w{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=re()}addChild(t){t.parent=this,this.nodes.push(t)}applyBranding(){if(!this.wrapperRef.value)return;const t=this.application.settings;t!=null&&t.branding&&te(t.branding,this.wrapperRef.value)}applyStyles(){if(!this.wrapperRef.value)return;const t=this.application.styles(),e=this.wrapperRef.value;Object.entries(t).forEach(([r,s])=>{e.style.setProperty(`--${r}`,s)})}firstUpdated(t){this.applyBranding(),this.applyStyles()}render(){return this.application.renderStrategy===A.Trigger&&this.renderRoot.host.classList.add("floating"),
|
218
|
+
*/function*er(i,t){if(i!==void 0){let e=0;for(const r of i)yield t(r,e++)}}var A=(i=>(i.Inline="inline",i.Trigger="trigger",i))(A||{}),rr=Object.defineProperty,ir=Object.getOwnPropertyDescriptor,sr=(i,t,e,r)=>{for(var s=r>1?void 0:r?ir(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(s=(r?o(t,e,s):o(s))||s);return r&&s&&rr(t,e,s),s};class it extends w{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=re()}addChild(t){t.parent=this,this.nodes.push(t)}applyBranding(){if(!this.wrapperRef.value)return;const t=this.application.settings;t!=null&&t.branding&&te(t.branding,this.wrapperRef.value)}applyStyles(){if(!this.wrapperRef.value)return;const t=this.application.styles(),e=this.wrapperRef.value;Object.entries(t).forEach(([r,s])=>{e.style.setProperty(`--${r}`,s)})}firstUpdated(t){this.applyBranding(),this.applyStyles()}render(){return this.application.renderStrategy===A.Trigger&&this.renderRoot.host.classList.add("floating"),O`<div class="widget-container" ${ie(this.wrapperRef)}>
|
179
219
|
${er(this.nodes,t=>t)}
|
180
220
|
</div>`}}it.styles=z`
|
181
221
|
:host {
|
@@ -268,8 +308,8 @@
|
|
268
308
|
opacity: 0;
|
269
309
|
animation: slideDown 0.3s linear;
|
270
310
|
}
|
271
|
-
`;sr([y({attribute:!1})],it.prototype,"application",2);class nr{constructor(){this.root=this.createRoot()}createComponentModel(t,e){this.root.application=e;const r=a=>{if(Array.isArray(a)){const[c,...h]=a;return{definitionId:c,overrides:h}}return{definitionId:a,overrides:[]}},s=(a,c,h,p)=>{h.forEach(l=>{const f=r(l),u=p[f.definitionId];if(!u){console.error(`No definition found for component type '${f.definitionId}'.`);return}const g=a.createNode(u.type,u.type);g&&(g.name=f.definitionId,g.application=e,u.properties&&g.writeProperties(u.properties),u.context&&g.writeContext(u.context),u.layout&&g.writeLayout(u.layout),c.addChild(g),u.children&&s(a,g,u.children,p))})},{entry:n,components:o}=t;return s(this,this.root,[n],o),this.root}createRoot(){return new it}createNode(t,e){const r=this.resolveComponent(e);if(!r)return console.warn(`Unable to resolve component: ${e}`),new _t;const s=new r;return s.type=e,s.name=t,s}resolveComponent(t){return customElements.get(`ace-${t}`)}getRoot(){return this.root}}const ne=class{constructor(){this.components=new Map}getComponent(i){const t=this.components.get(i);return t||console.warn(`Unable to resolve component: ${i}. You most likely forgot to register the required plugin.`),t}registerComponent(i,t){this.components.set(i,t)}async loadComponents(){const i=[...this.components.entries()].map(([t,e])=>e.then(r=>{this.defineAsWebComponent(t,r.default)}));await Promise.all(i)}defineAsWebComponent(i,t){const e=ne.ResolveWebComponentName(i);customElements.get(e)||customElements.define(e,t)}};let oe=ne;oe.ResolveWebComponentName=i=>`ace-${i}`;class or{constructor(){this.texts=new Map}loadTexts(t){this.texts=new Map(Object.entries(t))}get(t,e){const r=this.texts.get(t);return r||e||null}}class ae{constructor(t,e,r,s){this.name=t,this.container=e,this.settings=r,this.options=s,this.platform=new nr,this.texts=new or,this.renderStrategy=A.Inline,this.autoActivate=!1,this.plugins=[],this.componentResolver=new oe,this.renderStrategy=this.options.renderStrategy||A.Inline,this.triggerIcon=this.options.triggerIcon,typeof s.autoActivate=="boolean"&&(this.autoActivate=s.autoActivate),this.container.register("$settings",r),this.texts.loadTexts(r.texts||{})}async activate(){if(await this.loadPlugins(),await this.componentResolver.loadComponents(),this.root=this.platform.createComponentModel(this.settings,this),this.container.setState(Gt.Ready),this.autoActivate){const t=this.render();t&&document.body.appendChild(t)}}async loadPlugins(){for await(const t of this.plugins)await t(this)}styles(){return this.settings.styles||{}}branding(){return this.settings.branding||{}}plugin(t){return this.plugins.push(t),this}appendToDOM(){this.root&&(this.root.classList.add("expanded"),this.root.classList.remove("hidden"),document.body.appendChild(this.root))}hide(){this.root&&(this.root.classList.add("hidden"),this.root.classList.remove("expanded"))}registerComponent(t,e){this.componentResolver.registerComponent(t,e)}resolveComponent(t){return this.componentResolver.getComponent(t)}render(){if(this.renderStrategy===A.Trigger){const t=[...Array.from(document.querySelectorAll("ace-trigger"))].length,e=new m;return e.application=this,e.setOffset(t*80),e}return this.root}}const ce=class{async getSite(i){const e=await(await fetch(i)).json();return e?{id:e.id,apps:e.widgets.map(r=>{let s=A.Inline;return r.renderStrategy==="Trigger"&&(s=A.Trigger),{id:r.id,widgetId:r.widgetId,renderStrategy:s,autoActivate:r.autoActivate,triggerIcon:{type:"Telia",content:r.triggerIcon}}})}:null}async getWidget(i){const e=await(await fetch(`${ce.endpoint}/widget/${i}`)).json();return e?{name:e.name,config:JSON.parse(e.configuration)}:null}};let tt=ce;tt.endpoint="https://widgets.ace.teliacompany.net/api";class le{constructor(){this.applications=[],this.container=new vt("environment",this),setTimeout(()=>{this.notifyWidgetsOfCreation()},1e3)}async bootstrap(){await this.activate()}async activate(){const t=this.applications.filter(e=>e.autoActivate);for await(const e of t)await e.activate()}notifyWidgetsOfCreation(){document.querySelectorAll("ace-widget").forEach(e=>{const r=this.applications.find(s=>s.name===e.name);r&&e.dispatchEvent(new CustomEvent("environment-created",{detail:{widget:r}}))})}registerApp(t,e,r){const s=new vt(t,this),n=new ae(t,s,e,r);this.applications.push(n)}plugin(t){return this.applications.forEach(e=>{e.plugin(t)}),this}}class he{constructor(t){this.configurations=[],this.httpClient=new tt,this.httpClient=new tt,typeof t=="string"?this.url=t:(t.httpClient&&(this.httpClient=t.httpClient),this.loadFromConfig(t))}async load(t){const e=await this.httpClient.getSite(t);if(!e){console.warn(`Unable to load site from the url provided: ${t}`);return}this.configurations=e.apps}loadFromConfig(t){this.configurations=t.apps.map(e=>({id:"",renderStrategy:e.renderStrategy,widgetId:e.widgetId,autoActivate:e.autoActivate,triggerIcon:{type:"Telia",content:e.triggerIcon||"question"}}))}async bootstrap(t){var e;this.url&&await this.load(this.url),this.environment=new le,this.addGlobal(this.environment);for await(const r of this.configurations){const s=await this.httpClient.getWidget(r.widgetId);s&&((e=this.environment)==null||e.registerApp(s.name,s.config,{renderStrategy:r.renderStrategy,triggerIcon:r.triggerIcon,autoActivate:r.autoActivate}))}t(this.environment),await this.environment.bootstrap()}addGlobal(t){globalThis.widgets=t}}var ar=Object.defineProperty,cr=Object.getOwnPropertyDescriptor,$t=(i,t,e,r)=>{for(var s=r>1?void 0:r?cr(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(s=(r?o(t,e,s):o(s))||s);return r&&s&&ar(t,e,s),s};class
|
311
|
+
`;sr([y({attribute:!1})],it.prototype,"application",2);class nr{constructor(){this.root=this.createRoot()}createComponentModel(t,e){this.root.application=e;const r=a=>{if(Array.isArray(a)){const[c,...h]=a;return{definitionId:c,overrides:h}}return{definitionId:a,overrides:[]}},s=(a,c,h,p)=>{h.forEach(l=>{const f=r(l),u=p[f.definitionId];if(!u){console.error(`No definition found for component type '${f.definitionId}'.`);return}const g=a.createNode(u.type,u.type);g&&(g.name=f.definitionId,g.application=e,u.properties&&g.writeProperties(u.properties),u.context&&g.writeContext(u.context),u.layout&&g.writeLayout(u.layout),c.addChild(g),u.children&&s(a,g,u.children,p))})},{entry:n,components:o}=t;return s(this,this.root,[n],o),this.root}createRoot(){return new it}createNode(t,e){const r=this.resolveComponent(e);if(!r)return console.warn(`Unable to resolve component: ${e}`),new _t;const s=new r;return s.type=e,s.name=t,s}resolveComponent(t){return customElements.get(`ace-${t}`)}getRoot(){return this.root}}const ne=class{constructor(){this.components=new Map}getComponent(i){const t=this.components.get(i);return t||console.warn(`Unable to resolve component: ${i}. You most likely forgot to register the required plugin.`),t}registerComponent(i,t){this.components.set(i,t)}async loadComponents(){const i=[...this.components.entries()].map(([t,e])=>e.then(r=>{this.defineAsWebComponent(t,r.default)}));await Promise.all(i)}defineAsWebComponent(i,t){const e=ne.ResolveWebComponentName(i);customElements.get(e)||customElements.define(e,t)}};let oe=ne;oe.ResolveWebComponentName=i=>`ace-${i}`;class or{constructor(){this.texts=new Map}loadTexts(t){this.texts=new Map(Object.entries(t))}get(t,e){const r=this.texts.get(t);return r||e||null}}class ae{constructor(t,e,r,s){this.name=t,this.container=e,this.settings=r,this.options=s,this.platform=new nr,this.texts=new or,this.renderStrategy=A.Inline,this.autoActivate=!1,this.plugins=[],this.componentResolver=new oe,this.renderStrategy=this.options.renderStrategy||A.Inline,this.triggerIcon=this.options.triggerIcon,typeof s.autoActivate=="boolean"&&(this.autoActivate=s.autoActivate),this.container.register("$settings",r),this.texts.loadTexts(r.texts||{})}async activate(){if(await this.loadPlugins(),await this.componentResolver.loadComponents(),this.root=this.platform.createComponentModel(this.settings,this),this.container.setState(Gt.Ready),this.autoActivate){const t=this.render();t&&document.body.appendChild(t)}}async loadPlugins(){for await(const t of this.plugins)await t(this)}styles(){return this.settings.styles||{}}branding(){return this.settings.branding||{}}plugin(t){return this.plugins.push(t),this}appendToDOM(){this.root&&(this.root.classList.add("expanded"),this.root.classList.remove("hidden"),document.body.appendChild(this.root))}hide(){this.root&&(this.root.classList.add("hidden"),this.root.classList.remove("expanded"))}registerComponent(t,e){this.componentResolver.registerComponent(t,e)}resolveComponent(t){return this.componentResolver.getComponent(t)}render(){if(this.renderStrategy===A.Trigger){const t=[...Array.from(document.querySelectorAll("ace-trigger"))].length,e=new m;return e.application=this,e.setOffset(t*80),e}return this.root}}const ce=class{async getSite(i){const e=await(await fetch(i)).json();return e?{id:e.id,apps:e.widgets.map(r=>{let s=A.Inline;return r.renderStrategy==="Trigger"&&(s=A.Trigger),{id:r.id,widgetId:r.widgetId,renderStrategy:s,autoActivate:r.autoActivate,triggerIcon:{type:"Telia",content:r.triggerIcon}}})}:null}async getWidget(i){const e=await(await fetch(`${ce.endpoint}/widget/${i}`)).json();return e?{name:e.name,config:JSON.parse(e.configuration)}:null}};let tt=ce;tt.endpoint="https://widgets.ace.teliacompany.net/api";class le{constructor(){this.applications=[],this.container=new vt("environment",this),setTimeout(()=>{this.notifyWidgetsOfCreation()},1e3)}async bootstrap(){await this.activate()}async activate(){const t=this.applications.filter(e=>e.autoActivate);for await(const e of t)await e.activate()}notifyWidgetsOfCreation(){document.querySelectorAll("ace-widget").forEach(e=>{const r=this.applications.find(s=>s.name===e.name);r&&e.dispatchEvent(new CustomEvent("environment-created",{detail:{widget:r}}))})}registerApp(t,e,r){const s=new vt(t,this),n=new ae(t,s,e,r);this.applications.push(n)}plugin(t){return this.applications.forEach(e=>{e.plugin(t)}),this}}class he{constructor(t){this.configurations=[],this.httpClient=new tt,this.httpClient=new tt,typeof t=="string"?this.url=t:(t.httpClient&&(this.httpClient=t.httpClient),this.loadFromConfig(t))}async load(t){const e=await this.httpClient.getSite(t);if(!e){console.warn(`Unable to load site from the url provided: ${t}`);return}this.configurations=e.apps}loadFromConfig(t){this.configurations=t.apps.map(e=>({id:"",renderStrategy:e.renderStrategy,widgetId:e.widgetId,autoActivate:e.autoActivate,triggerIcon:{type:"Telia",content:e.triggerIcon||"question"}}))}async bootstrap(t){var e;this.url&&await this.load(this.url),this.environment=new le,this.addGlobal(this.environment);for await(const r of this.configurations){const s=await this.httpClient.getWidget(r.widgetId);s&&((e=this.environment)==null||e.registerApp(s.name,s.config,{renderStrategy:r.renderStrategy,triggerIcon:r.triggerIcon,autoActivate:r.autoActivate}))}t(this.environment),await this.environment.bootstrap()}addGlobal(t){globalThis.widgets=t}}var ar=Object.defineProperty,cr=Object.getOwnPropertyDescriptor,$t=(i,t,e,r)=>{for(var s=r>1?void 0:r?cr(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(s=(r?o(t,e,s):o(s))||s);return r&&s&&ar(t,e,s),s};class I extends w{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 d;if(this.widget.renderStrategy===A.Trigger){const t=new m;return t.application=this.widget,t}return this.widget.render()}}I.styles=[z`
|
272
312
|
:host {
|
273
313
|
display: block;
|
274
314
|
}
|
275
|
-
`];$t([y({attribute:!0})],
|
315
|
+
`];$t([y({attribute:!0})],I.prototype,"name",2);$t([R()],I.prototype,"widget",2);$t([R()],I.prototype,"status",2);customElements.get("ace-trigger")||customElements.define("ace-trigger",m);customElements.get("ace-unresolved-component")||customElements.define("ace-unresolved-component",_t);customElements.get("ace-wrapper")||customElements.define("ace-wrapper",it);customElements.get("ace-widget")||customElements.define("ace-widget",I);const lr=async(i,t)=>{await new he(i).bootstrap(t)};exports.AceWidget=I;exports.Application=ae;exports.Container=vt;exports.Environment=le;exports.HttpClient=tt;exports.Site=he;exports.Trigger=m;exports.WidgetComponent=se;exports.bootstrap=lr;
|
package/index.mjs
CHANGED
@@ -6,7 +6,7 @@ var ht = function(i, t) {
|
|
6
6
|
Object.prototype.hasOwnProperty.call(r, s) && (e[s] = r[s]);
|
7
7
|
}, ht(i, t);
|
8
8
|
};
|
9
|
-
function
|
9
|
+
function B(i, t) {
|
10
10
|
if (typeof t != "function" && t !== null)
|
11
11
|
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
12
12
|
ht(i, t);
|
@@ -168,13 +168,13 @@ var tt = function() {
|
|
168
168
|
return t.closed = !0, t;
|
169
169
|
}(), i;
|
170
170
|
}(), Lt = tt.EMPTY;
|
171
|
-
function
|
171
|
+
function Bt(i) {
|
172
172
|
return i instanceof tt || i && "closed" in i && m(i.remove) && m(i.add) && m(i.unsubscribe);
|
173
173
|
}
|
174
174
|
function $t(i) {
|
175
175
|
m(i) ? i() : i.unsubscribe();
|
176
176
|
}
|
177
|
-
var
|
177
|
+
var Dt = {
|
178
178
|
onUnhandledError: null,
|
179
179
|
onStoppedNotification: null,
|
180
180
|
Promise: void 0,
|
@@ -204,10 +204,10 @@ function Y(i) {
|
|
204
204
|
i();
|
205
205
|
}
|
206
206
|
var zt = function(i) {
|
207
|
-
|
207
|
+
B(t, i);
|
208
208
|
function t(e) {
|
209
209
|
var r = i.call(this) || this;
|
210
|
-
return r.isStopped = !1, e ? (r.destination = e,
|
210
|
+
return r.isStopped = !1, e ? (r.destination = e, Bt(e) && e.add(r)) : r.destination = pe, r;
|
211
211
|
}
|
212
212
|
return t.create = function(e, r, s) {
|
213
213
|
return new ft(e, r, s);
|
@@ -270,7 +270,7 @@ var le = function() {
|
|
270
270
|
}
|
271
271
|
}, i;
|
272
272
|
}(), ft = function(i) {
|
273
|
-
|
273
|
+
B(t, i);
|
274
274
|
function t(e, r, s) {
|
275
275
|
var n = i.call(this) || this, o;
|
276
276
|
if (m(e) || !e)
|
@@ -281,7 +281,7 @@ var le = function() {
|
|
281
281
|
};
|
282
282
|
else {
|
283
283
|
var a;
|
284
|
-
n &&
|
284
|
+
n && Dt.useDeprecatedNextContext ? (a = Object.create(e), a.unsubscribe = function() {
|
285
285
|
return n.unsubscribe();
|
286
286
|
}, o = {
|
287
287
|
next: e.next && st(e.next, a),
|
@@ -379,26 +379,26 @@ var At = function() {
|
|
379
379
|
}();
|
380
380
|
function St(i) {
|
381
381
|
var t;
|
382
|
-
return (t = i ??
|
382
|
+
return (t = i ?? Dt.Promise) !== null && t !== void 0 ? t : Promise;
|
383
383
|
}
|
384
384
|
function ge(i) {
|
385
385
|
return i && m(i.next) && m(i.error) && m(i.complete);
|
386
386
|
}
|
387
387
|
function ve(i) {
|
388
|
-
return i && i instanceof zt || ge(i) &&
|
388
|
+
return i && i instanceof zt || ge(i) && Bt(i);
|
389
389
|
}
|
390
390
|
var ye = Nt(function(i) {
|
391
391
|
return function() {
|
392
392
|
i(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
393
393
|
};
|
394
394
|
}), Wt = function(i) {
|
395
|
-
|
395
|
+
B(t, i);
|
396
396
|
function t() {
|
397
397
|
var e = i.call(this) || this;
|
398
398
|
return e.closed = !1, e.currentObservers = null, e.observers = [], e.isStopped = !1, e.hasError = !1, e.thrownError = null, e;
|
399
399
|
}
|
400
400
|
return t.prototype.lift = function(e) {
|
401
|
-
var r = new
|
401
|
+
var r = new xt(this, this);
|
402
402
|
return r.operator = e, r;
|
403
403
|
}, t.prototype._throwIfClosed = function() {
|
404
404
|
if (this.closed)
|
@@ -469,10 +469,10 @@ var ye = Nt(function(i) {
|
|
469
469
|
var e = new At();
|
470
470
|
return e.source = this, e;
|
471
471
|
}, t.create = function(e, r) {
|
472
|
-
return new
|
472
|
+
return new xt(e, r);
|
473
473
|
}, t;
|
474
|
-
}(At),
|
475
|
-
|
474
|
+
}(At), xt = function(i) {
|
475
|
+
B(t, i);
|
476
476
|
function t(e, r) {
|
477
477
|
var s = i.call(this) || this;
|
478
478
|
return s.destination = e, s.source = r, s;
|
@@ -491,7 +491,7 @@ var ye = Nt(function(i) {
|
|
491
491
|
return (s = (r = this.source) === null || r === void 0 ? void 0 : r.subscribe(e)) !== null && s !== void 0 ? s : Lt;
|
492
492
|
}, t;
|
493
493
|
}(Wt), me = function(i) {
|
494
|
-
|
494
|
+
B(t, i);
|
495
495
|
function t(e) {
|
496
496
|
var r = i.call(this) || this;
|
497
497
|
return r._value = e, r;
|
@@ -514,7 +514,7 @@ var ye = Nt(function(i) {
|
|
514
514
|
i.prototype.next.call(this, this._value = e);
|
515
515
|
}, t;
|
516
516
|
}(Wt), Gt = /* @__PURE__ */ ((i) => (i.Loading = "loading", i.Ready = "ready", i))(Gt || {});
|
517
|
-
class
|
517
|
+
class Et {
|
518
518
|
constructor(t, e) {
|
519
519
|
this.state = new me(
|
520
520
|
"loading"
|
@@ -559,7 +559,7 @@ let Vt = class {
|
|
559
559
|
return this.cssText;
|
560
560
|
}
|
561
561
|
};
|
562
|
-
const be = (i) => new Vt(typeof i == "string" ? i : i + "", void 0, yt),
|
562
|
+
const be = (i) => new Vt(typeof i == "string" ? i : i + "", void 0, yt), D = (i, ...t) => {
|
563
563
|
const e = i.length === 1 ? i[0] : t.reduce((r, s, n) => r + ((o) => {
|
564
564
|
if (o._$cssResult$ === !0)
|
565
565
|
return o.cssText;
|
@@ -587,7 +587,7 @@ const be = (i) => new Vt(typeof i == "string" ? i : i + "", void 0, yt), B = (i,
|
|
587
587
|
* Copyright 2017 Google LLC
|
588
588
|
* SPDX-License-Identifier: BSD-3-Clause
|
589
589
|
*/
|
590
|
-
const { is: $e, defineProperty: we, getOwnPropertyDescriptor: Ae, getOwnPropertyNames: Se, getOwnPropertySymbols:
|
590
|
+
const { is: $e, defineProperty: we, getOwnPropertyDescriptor: Ae, getOwnPropertyNames: Se, getOwnPropertySymbols: xe, getPrototypeOf: Ee } = Object, $ = globalThis, Tt = $.trustedTypes, Ce = Tt ? Tt.emptyScript : "", nt = $.reactiveElementPolyfillSupport, M = (i, t) => i, Z = { toAttribute(i, t) {
|
591
591
|
switch (t) {
|
592
592
|
case Boolean:
|
593
593
|
i = i ? Ce : null;
|
@@ -647,16 +647,16 @@ class T extends HTMLElement {
|
|
647
647
|
return this.elementProperties.get(t) ?? Ot;
|
648
648
|
}
|
649
649
|
static _$Ei() {
|
650
|
-
if (this.hasOwnProperty(
|
650
|
+
if (this.hasOwnProperty(M("elementProperties")))
|
651
651
|
return;
|
652
|
-
const t =
|
652
|
+
const t = Ee(this);
|
653
653
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
654
654
|
}
|
655
655
|
static finalize() {
|
656
|
-
if (this.hasOwnProperty(
|
656
|
+
if (this.hasOwnProperty(M("finalized")))
|
657
657
|
return;
|
658
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
659
|
-
const e = this.properties, r = [...Se(e), ...
|
658
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(M("properties"))) {
|
659
|
+
const e = this.properties, r = [...Se(e), ...xe(e)];
|
660
660
|
for (const s of r)
|
661
661
|
this.createProperty(s, e[s]);
|
662
662
|
}
|
@@ -828,15 +828,15 @@ class T extends HTMLElement {
|
|
828
828
|
firstUpdated(t) {
|
829
829
|
}
|
830
830
|
}
|
831
|
-
T.elementStyles = [], T.shadowRootOptions = { mode: "open" }, T[
|
831
|
+
T.elementStyles = [], T.shadowRootOptions = { mode: "open" }, T[M("elementProperties")] = /* @__PURE__ */ new Map(), T[M("finalized")] = /* @__PURE__ */ new Map(), nt == null || nt({ ReactiveElement: T }), ($.reactiveElementVersions ?? ($.reactiveElementVersions = [])).push("2.0.1");
|
832
832
|
/**
|
833
833
|
* @license
|
834
834
|
* Copyright 2017 Google LLC
|
835
835
|
* SPDX-License-Identifier: BSD-3-Clause
|
836
836
|
*/
|
837
|
-
const
|
838
|
-
\f\r]`,
|
839
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), Mt = /'/g, kt = /"/g, Jt = /^(?:script|style|textarea|title)$/i, Oe = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }),
|
837
|
+
const k = globalThis, Q = k.trustedTypes, Ut = Q ? Q.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, qt = "$lit$", _ = `lit$${(Math.random() + "").slice(9)}$`, Yt = "?" + _, Pe = `<${Yt}>`, C = document, H = () => C.createComment(""), N = (i) => i === null || typeof i != "object" && typeof i != "function", Ft = Array.isArray, Te = (i) => Ft(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", ot = `[
|
838
|
+
\f\r]`, I = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Rt = /-->/g, It = />/g, S = RegExp(`>|${ot}(?:([^\\s"'>=/]+)(${ot}*=${ot}*(?:[^
|
839
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Mt = /'/g, kt = /"/g, Jt = /^(?:script|style|textarea|title)$/i, Oe = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), O = Oe(1), P = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), jt = /* @__PURE__ */ new WeakMap(), E = C.createTreeWalker(C, 129);
|
840
840
|
function Kt(i, t) {
|
841
841
|
if (!Array.isArray(i) || !i.hasOwnProperty("raw"))
|
842
842
|
throw Error("invalid template strings array");
|
@@ -844,14 +844,14 @@ function Kt(i, t) {
|
|
844
844
|
}
|
845
845
|
const Ue = (i, t) => {
|
846
846
|
const e = i.length - 1, r = [];
|
847
|
-
let s, n = t === 2 ? "<svg>" : "", o =
|
847
|
+
let s, n = t === 2 ? "<svg>" : "", o = I;
|
848
848
|
for (let a = 0; a < e; a++) {
|
849
849
|
const c = i[a];
|
850
850
|
let h, p, l = -1, f = 0;
|
851
851
|
for (; f < c.length && (o.lastIndex = f, p = o.exec(c), p !== null); )
|
852
|
-
f = o.lastIndex, o ===
|
852
|
+
f = o.lastIndex, o === I ? p[1] === "!--" ? o = Rt : p[1] !== void 0 ? o = It : p[2] !== void 0 ? (Jt.test(p[2]) && (s = RegExp("</" + p[2], "g")), o = S) : p[3] !== void 0 && (o = S) : o === S ? p[0] === ">" ? (o = s ?? I, l = -1) : p[1] === void 0 ? l = -2 : (l = o.lastIndex - p[2].length, h = p[1], o = p[3] === void 0 ? S : p[3] === '"' ? kt : Mt) : o === kt || o === Mt ? o = S : o === Rt || o === It ? o = I : (o = S, s = void 0);
|
853
853
|
const u = o === S && i[a + 1].startsWith("/>") ? " " : "";
|
854
|
-
n += o ===
|
854
|
+
n += o === I ? c + Pe : l >= 0 ? (r.push(h), c.slice(0, l) + qt + c.slice(l) + _ + u) : c + _ + (l === -2 ? a : u);
|
855
855
|
}
|
856
856
|
return [Kt(i, n + (i[e] || "<?>") + (t === 2 ? "</svg>" : "")), r];
|
857
857
|
};
|
@@ -861,11 +861,11 @@ class L {
|
|
861
861
|
this.parts = [];
|
862
862
|
let n = 0, o = 0;
|
863
863
|
const a = t.length - 1, c = this.parts, [h, p] = Ue(t, e);
|
864
|
-
if (this.el = L.createElement(h, r),
|
864
|
+
if (this.el = L.createElement(h, r), E.currentNode = this.el.content, e === 2) {
|
865
865
|
const l = this.el.content.firstChild;
|
866
866
|
l.replaceWith(...l.childNodes);
|
867
867
|
}
|
868
|
-
for (; (s =
|
868
|
+
for (; (s = E.nextNode()) !== null && c.length < a; ) {
|
869
869
|
if (s.nodeType === 1) {
|
870
870
|
if (s.hasAttributes())
|
871
871
|
for (const l of s.getAttributeNames())
|
@@ -879,7 +879,7 @@ class L {
|
|
879
879
|
if (f > 0) {
|
880
880
|
s.textContent = Q ? Q.emptyScript : "";
|
881
881
|
for (let u = 0; u < f; u++)
|
882
|
-
s.append(l[u], H()),
|
882
|
+
s.append(l[u], H()), E.nextNode(), c.push({ type: 2, index: ++n });
|
883
883
|
s.append(l[f], H());
|
884
884
|
}
|
885
885
|
}
|
@@ -899,13 +899,13 @@ class L {
|
|
899
899
|
return r.innerHTML = t, r;
|
900
900
|
}
|
901
901
|
}
|
902
|
-
function
|
902
|
+
function U(i, t, e = i, r) {
|
903
903
|
var o, a;
|
904
904
|
if (t === P)
|
905
905
|
return t;
|
906
906
|
let s = r !== void 0 ? (o = e._$Co) == null ? void 0 : o[r] : e._$Cl;
|
907
907
|
const n = N(t) ? void 0 : t._$litDirective$;
|
908
|
-
return (s == null ? void 0 : s.constructor) !== n && ((a = s == null ? void 0 : s._$AO) == null || a.call(s, !1), n === void 0 ? s = void 0 : (s = new n(i), s._$AT(i, e, r)), r !== void 0 ? (e._$Co ?? (e._$Co = []))[r] = s : e._$Cl = s), s !== void 0 && (t =
|
908
|
+
return (s == null ? void 0 : s.constructor) !== n && ((a = s == null ? void 0 : s._$AO) == null || a.call(s, !1), n === void 0 ? s = void 0 : (s = new n(i), s._$AT(i, e, r)), r !== void 0 ? (e._$Co ?? (e._$Co = []))[r] = s : e._$Cl = s), s !== void 0 && (t = U(i, s._$AS(i, t.values), s, r)), t;
|
909
909
|
}
|
910
910
|
class Re {
|
911
911
|
constructor(t, e) {
|
@@ -919,16 +919,16 @@ class Re {
|
|
919
919
|
}
|
920
920
|
u(t) {
|
921
921
|
const { el: { content: e }, parts: r } = this._$AD, s = ((t == null ? void 0 : t.creationScope) ?? C).importNode(e, !0);
|
922
|
-
|
923
|
-
let n =
|
922
|
+
E.currentNode = s;
|
923
|
+
let n = E.nextNode(), o = 0, a = 0, c = r[0];
|
924
924
|
for (; c !== void 0; ) {
|
925
925
|
if (o === c.index) {
|
926
926
|
let h;
|
927
927
|
c.type === 2 ? h = new z(n, n.nextSibling, this, t) : c.type === 1 ? h = new c.ctor(n, c.name, c.strings, this, t) : c.type === 6 && (h = new je(n, this, t)), this._$AV.push(h), c = r[++a];
|
928
928
|
}
|
929
|
-
o !== (c == null ? void 0 : c.index) && (n =
|
929
|
+
o !== (c == null ? void 0 : c.index) && (n = E.nextNode(), o++);
|
930
930
|
}
|
931
|
-
return
|
931
|
+
return E.currentNode = C, s;
|
932
932
|
}
|
933
933
|
p(t) {
|
934
934
|
let e = 0;
|
@@ -956,7 +956,7 @@ class z {
|
|
956
956
|
return this._$AB;
|
957
957
|
}
|
958
958
|
_$AI(t, e = this) {
|
959
|
-
t =
|
959
|
+
t = U(this, t, e), N(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== P && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : Te(t) ? this.T(t) : this._(t);
|
960
960
|
}
|
961
961
|
k(t) {
|
962
962
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
@@ -1015,12 +1015,12 @@ class et {
|
|
1015
1015
|
const n = this.strings;
|
1016
1016
|
let o = !1;
|
1017
1017
|
if (n === void 0)
|
1018
|
-
t =
|
1018
|
+
t = U(this, t, e, 0), o = !N(t) || t !== this._$AH && t !== P, o && (this._$AH = t);
|
1019
1019
|
else {
|
1020
1020
|
const a = t;
|
1021
1021
|
let c, h;
|
1022
1022
|
for (t = n[0], c = 0; c < n.length - 1; c++)
|
1023
|
-
h =
|
1023
|
+
h = U(this, a[r + c], e, c), h === P && (h = this._$AH[c]), o || (o = !N(h) || h !== this._$AH[c]), h === d ? t = d : t !== d && (t += (h ?? "") + n[c + 1]), this._$AH[c] = h;
|
1024
1024
|
}
|
1025
1025
|
o && !s && this.O(t);
|
1026
1026
|
}
|
@@ -1049,7 +1049,7 @@ class ke extends et {
|
|
1049
1049
|
super(t, e, r, s, n), this.type = 5;
|
1050
1050
|
}
|
1051
1051
|
_$AI(t, e = this) {
|
1052
|
-
if ((t =
|
1052
|
+
if ((t = U(this, t, e, 0) ?? d) === P)
|
1053
1053
|
return;
|
1054
1054
|
const r = this._$AH, s = t === d && r !== d || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, n = t !== d && (r === d || s);
|
1055
1055
|
s && this.element.removeEventListener(this.name, this, r), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
@@ -1067,11 +1067,11 @@ class je {
|
|
1067
1067
|
return this._$AM._$AU;
|
1068
1068
|
}
|
1069
1069
|
_$AI(t) {
|
1070
|
-
|
1070
|
+
U(this, t);
|
1071
1071
|
}
|
1072
1072
|
}
|
1073
|
-
const at =
|
1074
|
-
at == null || at(L, z), (
|
1073
|
+
const at = k.litHtmlPolyfillSupport;
|
1074
|
+
at == null || at(L, z), (k.litHtmlVersions ?? (k.litHtmlVersions = [])).push("3.0.2");
|
1075
1075
|
const He = (i, t, e) => {
|
1076
1076
|
const r = (e == null ? void 0 : e.renderBefore) ?? t;
|
1077
1077
|
let s = r._$litPart$;
|
@@ -1153,7 +1153,7 @@ function y(i) {
|
|
1153
1153
|
* Copyright 2017 Google LLC
|
1154
1154
|
* SPDX-License-Identifier: BSD-3-Clause
|
1155
1155
|
*/
|
1156
|
-
function
|
1156
|
+
function R(i) {
|
1157
1157
|
return y({ ...i, state: !0, attribute: !1 });
|
1158
1158
|
}
|
1159
1159
|
/**
|
@@ -1183,7 +1183,7 @@ class Xt {
|
|
1183
1183
|
* Copyright 2018 Google LLC
|
1184
1184
|
* SPDX-License-Identifier: BSD-3-Clause
|
1185
1185
|
*/
|
1186
|
-
const
|
1186
|
+
const Be = Qt(class extends Xt {
|
1187
1187
|
constructor(i) {
|
1188
1188
|
var t;
|
1189
1189
|
if (super(i), i.type !== Zt.ATTRIBUTE || i.name !== "class" || ((t = i.strings) == null ? void 0 : t.length) > 2)
|
@@ -1232,7 +1232,7 @@ const De = Qt(class extends Xt {
|
|
1232
1232
|
* Copyright 2020 Google LLC
|
1233
1233
|
* SPDX-License-Identifier: BSD-3-Clause
|
1234
1234
|
*/
|
1235
|
-
const
|
1235
|
+
const De = (i) => i.strings === void 0;
|
1236
1236
|
/**
|
1237
1237
|
* @license
|
1238
1238
|
* Copyright 2017 Google LLC
|
@@ -1293,7 +1293,7 @@ class Ve extends Xt {
|
|
1293
1293
|
t !== this.isConnected && (this.isConnected = t, t ? (r = this.reconnected) == null || r.call(this) : (s = this.disconnected) == null || s.call(this)), e && (j(this, t), X(this));
|
1294
1294
|
}
|
1295
1295
|
setValue(t) {
|
1296
|
-
if (
|
1296
|
+
if (De(this._$Ct))
|
1297
1297
|
this._$Ct._$AI(t, this);
|
1298
1298
|
else {
|
1299
1299
|
const e = [...this._$Ct._$AH];
|
@@ -1371,7 +1371,7 @@ class b extends w {
|
|
1371
1371
|
var a, c, h;
|
1372
1372
|
const t = (a = this.application) == null ? void 0 : a.branding(), e = (c = t == null ? void 0 : t.graphics) == null ? void 0 : c.trigger;
|
1373
1373
|
if (e)
|
1374
|
-
return
|
1374
|
+
return O` <img src=${e} class="trigger-icon" alt="" /> `;
|
1375
1375
|
const r = (h = this.application) == null ? void 0 : h.triggerIcon;
|
1376
1376
|
if (!r)
|
1377
1377
|
return d;
|
@@ -1381,7 +1381,7 @@ class b extends w {
|
|
1381
1381
|
switch (n) {
|
1382
1382
|
case "Telia": {
|
1383
1383
|
const p = await s(o);
|
1384
|
-
return p ?
|
1384
|
+
return p ? O`<telia-icon
|
1385
1385
|
class="trigger-icon"
|
1386
1386
|
svg=${p.svg}
|
1387
1387
|
size="lg"
|
@@ -1395,60 +1395,79 @@ class b extends w {
|
|
1395
1395
|
this.offset = t;
|
1396
1396
|
}
|
1397
1397
|
render() {
|
1398
|
-
|
1399
|
-
|
1398
|
+
var t, e, r, s;
|
1399
|
+
return O`<div class="trigger-container">
|
1400
|
+
${(s = (r = (e = (t = this.application) == null ? void 0 : t.settings) == null ? void 0 : e.branding) == null ? void 0 : r.other) != null && s.showButtonLabel ? O`
|
1401
|
+
<button class="trigger-label" @click=${this._toggleActive}>
|
1402
|
+
${this.application.settings.branding.other.buttonLabelText}
|
1403
|
+
</button>
|
1404
|
+
` : d}
|
1405
|
+
|
1406
|
+
<button
|
1407
|
+
class=${Be({
|
1400
1408
|
trigger: !0,
|
1401
1409
|
active: this.active,
|
1402
1410
|
rendered: this.loaded
|
1403
1411
|
})}
|
1404
|
-
|
1405
|
-
|
1406
|
-
|
1407
|
-
|
1408
|
-
|
1409
|
-
|
1410
|
-
|
1411
|
-
|
1412
|
-
|
1413
|
-
fill="none"
|
1414
|
-
xmlns="http://www.w3.org/2000/svg"
|
1415
|
-
>
|
1416
|
-
<path
|
1417
|
-
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"
|
1418
|
-
fill="white"
|
1419
|
-
/>
|
1420
|
-
</svg>
|
1421
|
-
</span>
|
1422
|
-
<span class="trigger-loader">
|
1423
|
-
<svg viewBox="25 25 50 50">
|
1424
|
-
<circle
|
1425
|
-
cx="50"
|
1426
|
-
cy="50"
|
1427
|
-
r="20"
|
1412
|
+
@click=${this._toggleActive}
|
1413
|
+
${ie(this.buttonRef)}
|
1414
|
+
>
|
1415
|
+
${this.icon}
|
1416
|
+
<span class="trigger-close">
|
1417
|
+
<svg
|
1418
|
+
width="18"
|
1419
|
+
height="9"
|
1420
|
+
viewBox="0 0 18 9"
|
1428
1421
|
fill="none"
|
1429
|
-
|
1430
|
-
|
1431
|
-
|
1432
|
-
|
1433
|
-
|
1434
|
-
|
1435
|
-
|
1422
|
+
xmlns="http://www.w3.org/2000/svg"
|
1423
|
+
>
|
1424
|
+
<path
|
1425
|
+
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"
|
1426
|
+
fill="white"
|
1427
|
+
/>
|
1428
|
+
</svg>
|
1429
|
+
</span>
|
1430
|
+
<span class="trigger-loader">
|
1431
|
+
<svg viewBox="25 25 50 50">
|
1432
|
+
<circle
|
1433
|
+
cx="50"
|
1434
|
+
cy="50"
|
1435
|
+
r="20"
|
1436
|
+
fill="none"
|
1437
|
+
stroke="#000"
|
1438
|
+
stroke-width="2"
|
1439
|
+
stroke-miterlimit="10"
|
1440
|
+
/>
|
1441
|
+
</svg>
|
1442
|
+
</span>
|
1443
|
+
</button>
|
1444
|
+
</div>`;
|
1436
1445
|
}
|
1437
1446
|
}
|
1438
1447
|
b.styles = [
|
1439
|
-
|
1448
|
+
D`
|
1440
1449
|
:host {
|
1441
1450
|
--voca-rem-multiplier: 0.625;
|
1451
|
+
--trigger-label-bg: #f5e0ff;
|
1452
|
+
--trigger-label-text-color: rgba(0, 0, 0, 0.8);
|
1442
1453
|
display: block;
|
1443
1454
|
box-sizing: border-box;
|
1455
|
+
/* font-family: var(--font-family); */
|
1456
|
+
font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
|
1444
1457
|
}
|
1445
1458
|
|
1446
|
-
.trigger {
|
1459
|
+
.trigger-container {
|
1447
1460
|
position: fixed;
|
1448
|
-
transform: scale(0);
|
1449
|
-
box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
|
1450
1461
|
bottom: 20px;
|
1451
1462
|
right: 20px;
|
1463
|
+
display: flex;
|
1464
|
+
align-items: center;
|
1465
|
+
gap: 1rem;
|
1466
|
+
}
|
1467
|
+
|
1468
|
+
.trigger {
|
1469
|
+
transform: scale(0);
|
1470
|
+
box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
|
1452
1471
|
z-index: 5;
|
1453
1472
|
display: flex;
|
1454
1473
|
align-items: center;
|
@@ -1508,24 +1527,46 @@ b.styles = [
|
|
1508
1527
|
img {
|
1509
1528
|
max-width: 100%;
|
1510
1529
|
}
|
1530
|
+
|
1531
|
+
.trigger-label {
|
1532
|
+
box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.1);
|
1533
|
+
background-color: var(--trigger-label-bg);
|
1534
|
+
color: var(--trigger-label-text-color);
|
1535
|
+
white-space: nowrap;
|
1536
|
+
padding: 0.7rem 1rem;
|
1537
|
+
border-radius: 0.3rem;
|
1538
|
+
font-weight: 500;
|
1539
|
+
display: flex;
|
1540
|
+
justify-content: center;
|
1541
|
+
align-items: center;
|
1542
|
+
cursor: pointer;
|
1543
|
+
border: none;
|
1544
|
+
font-size: 1rem;
|
1545
|
+
font-family: inherit;
|
1546
|
+
transition: all 300ms ease-in-out;
|
1547
|
+
}
|
1548
|
+
|
1549
|
+
.trigger-label:hover {
|
1550
|
+
opacity: 0.8;
|
1551
|
+
}
|
1511
1552
|
`
|
1512
1553
|
];
|
1513
1554
|
W([
|
1514
1555
|
y({ attribute: !1 })
|
1515
1556
|
], b.prototype, "application", 2);
|
1516
1557
|
W([
|
1517
|
-
|
1558
|
+
R()
|
1518
1559
|
], b.prototype, "active", 2);
|
1519
1560
|
W([
|
1520
|
-
|
1561
|
+
R()
|
1521
1562
|
], b.prototype, "loaded", 2);
|
1522
1563
|
W([
|
1523
|
-
|
1564
|
+
R()
|
1524
1565
|
], b.prototype, "icon", 2);
|
1525
1566
|
W([
|
1526
|
-
|
1567
|
+
R()
|
1527
1568
|
], b.prototype, "offset", 2);
|
1528
|
-
var Je = Object.defineProperty, Ke = Object.getOwnPropertyDescriptor,
|
1569
|
+
var Je = Object.defineProperty, Ke = Object.getOwnPropertyDescriptor, x = (i, t, e, r) => {
|
1529
1570
|
for (var s = r > 1 ? void 0 : r ? Ke(t, e) : t, n = i.length - 1, o; n >= 0; n--)
|
1530
1571
|
(o = i[n]) && (s = (r ? o(t, e, s) : o(s)) || s);
|
1531
1572
|
return r && s && Je(t, e, s), s;
|
@@ -1556,7 +1597,7 @@ const Ze = (i) => {
|
|
1556
1597
|
}
|
1557
1598
|
return t.styles = [
|
1558
1599
|
// (superClass as unknown as typeof LitElement).styles ?? [],
|
1559
|
-
|
1600
|
+
D`
|
1560
1601
|
:host {
|
1561
1602
|
font-family: var(--font-family);
|
1562
1603
|
grid-column: span var(--width);
|
@@ -1569,29 +1610,29 @@ const Ze = (i) => {
|
|
1569
1610
|
box-sizing: border-box;
|
1570
1611
|
}
|
1571
1612
|
`
|
1572
|
-
],
|
1613
|
+
], x([
|
1573
1614
|
y()
|
1574
|
-
], t.prototype, "properties", 2),
|
1615
|
+
], t.prototype, "properties", 2), x([
|
1575
1616
|
y()
|
1576
|
-
], t.prototype, "context", 2),
|
1617
|
+
], t.prototype, "context", 2), x([
|
1577
1618
|
y()
|
1578
|
-
], t.prototype, "layout", 2),
|
1619
|
+
], t.prototype, "layout", 2), x([
|
1579
1620
|
y()
|
1580
|
-
], t.prototype, "name", 2),
|
1621
|
+
], t.prototype, "name", 2), x([
|
1581
1622
|
y()
|
1582
|
-
], t.prototype, "type", 2),
|
1623
|
+
], t.prototype, "type", 2), x([
|
1583
1624
|
y({ attribute: !1 })
|
1584
|
-
], t.prototype, "application", 2),
|
1625
|
+
], t.prototype, "application", 2), x([
|
1585
1626
|
y({ attribute: !1 })
|
1586
1627
|
], t.prototype, "parent", 2), t;
|
1587
1628
|
};
|
1588
1629
|
class bt extends Ze(w) {
|
1589
1630
|
render() {
|
1590
|
-
return
|
1631
|
+
return O`Non resolved component`;
|
1591
1632
|
}
|
1592
1633
|
}
|
1593
1634
|
bt.styles = [
|
1594
|
-
|
1635
|
+
D`
|
1595
1636
|
:host {
|
1596
1637
|
display: block;
|
1597
1638
|
}
|
@@ -1639,12 +1680,12 @@ class rt extends w {
|
|
1639
1680
|
this.applyBranding(), this.applyStyles();
|
1640
1681
|
}
|
1641
1682
|
render() {
|
1642
|
-
return this.application.renderStrategy === A.Trigger && this.renderRoot.host.classList.add("floating"),
|
1683
|
+
return this.application.renderStrategy === A.Trigger && this.renderRoot.host.classList.add("floating"), O`<div class="widget-container" ${ie(this.wrapperRef)}>
|
1643
1684
|
${Qe(this.nodes, (t) => t)}
|
1644
1685
|
</div>`;
|
1645
1686
|
}
|
1646
1687
|
}
|
1647
|
-
rt.styles =
|
1688
|
+
rt.styles = D`
|
1648
1689
|
:host {
|
1649
1690
|
--font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
|
1650
1691
|
--spacing-xs: 0.2rem;
|
@@ -1910,7 +1951,7 @@ let gt = oe;
|
|
1910
1951
|
gt.endpoint = "https://widgets.ace.teliacompany.net/api";
|
1911
1952
|
class nr {
|
1912
1953
|
constructor() {
|
1913
|
-
this.applications = [], this.container = new
|
1954
|
+
this.applications = [], this.container = new Et("environment", this), setTimeout(() => {
|
1914
1955
|
this.notifyWidgetsOfCreation();
|
1915
1956
|
}, 1e3);
|
1916
1957
|
}
|
@@ -1935,7 +1976,7 @@ class nr {
|
|
1935
1976
|
});
|
1936
1977
|
}
|
1937
1978
|
registerApp(t, e, r) {
|
1938
|
-
const s = new
|
1979
|
+
const s = new Et(t, this), n = new sr(t, s, e, r);
|
1939
1980
|
this.applications.push(n);
|
1940
1981
|
}
|
1941
1982
|
plugin(t) {
|
@@ -2023,7 +2064,7 @@ class G extends w {
|
|
2023
2064
|
}
|
2024
2065
|
}
|
2025
2066
|
G.styles = [
|
2026
|
-
|
2067
|
+
D`
|
2027
2068
|
:host {
|
2028
2069
|
display: block;
|
2029
2070
|
}
|
@@ -2033,10 +2074,10 @@ _t([
|
|
2033
2074
|
y({ attribute: !0 })
|
2034
2075
|
], G.prototype, "name", 2);
|
2035
2076
|
_t([
|
2036
|
-
|
2077
|
+
R()
|
2037
2078
|
], G.prototype, "widget", 2);
|
2038
2079
|
_t([
|
2039
|
-
|
2080
|
+
R()
|
2040
2081
|
], G.prototype, "status", 2);
|
2041
2082
|
customElements.get("ace-trigger") || customElements.define("ace-trigger", b);
|
2042
2083
|
customElements.get("ace-unresolved-component") || customElements.define("ace-unresolved-component", bt);
|
@@ -2048,7 +2089,7 @@ const pr = async (i, t) => {
|
|
2048
2089
|
export {
|
2049
2090
|
G as AceWidget,
|
2050
2091
|
sr as Application,
|
2051
|
-
|
2092
|
+
Et as Container,
|
2052
2093
|
nr as Environment,
|
2053
2094
|
gt as HttpClient,
|
2054
2095
|
or as Site,
|