@telia-ace/widget-core-flamingo 1.1.52-rc.0 → 1.1.52-rc.2
Sign up to get free protection for your applications and to get access to all the features.
- package/index.d.ts +1 -0
- package/index.js +21 -21
- package/index.mjs +90 -74
- package/models/application.d.ts +2 -0
- package/package.json +1 -1
- package/services/storage.service.d.ts +4 -0
package/index.d.ts
CHANGED
@@ -7,5 +7,6 @@ export { Trigger } from './components/trigger.component';
|
|
7
7
|
export { WidgetComponent } from './components/widget.component';
|
8
8
|
export { AceWidget } from './components/ace-widget.component';
|
9
9
|
export { HttpClient } from './services/http-client.service';
|
10
|
+
export { StorageService } from './services/storage.service';
|
10
11
|
export type { IHttpClient } from './services/http-client.service';
|
11
12
|
export type { WidgetComponentType } from './components/widget.component';
|
package/index.js
CHANGED
@@ -1,32 +1,32 @@
|
|
1
1
|
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var ft=function(r,t){return ft=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])},ft(r,t)};function D(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ft(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function gt(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],i=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Y(r,t){var e=typeof Symbol=="function"&&r[Symbol.iterator];if(!e)return r;var i=e.call(r),s,n=[],o;try{for(;(t===void 0||t-- >0)&&!(s=i.next()).done;)n.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(e=i.return)&&e.call(i)}finally{if(o)throw o.error}}return n}function Z(r,t,e){if(e||arguments.length===2)for(var i=0,s=t.length,n;i<s;i++)(n||!(i in t))&&(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return r.concat(n||Array.prototype.slice.call(t))}function b(r){return typeof r=="function"}function Zt(r){var t=function(i){Error.call(i),i.stack=new Error().stack},e=r(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var nt=Zt(function(r){return function(e){r(this),this.message=e?e.length+` errors occurred during unsubscription:
|
2
2
|
`+e.map(function(i,s){return s+1+") "+i.toString()}).join(`
|
3
|
-
`):"",this.name="UnsubscriptionError",this.errors=e}});function mt(r,t){if(r){var e=r.indexOf(t);0<=e&&r.splice(e,1)}}var tt=function(){function r(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return r.prototype.unsubscribe=function(){var t,e,i,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=gt(o),c=a.next();!c.done;c=a.next()){var l=c.value;l.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 h=this.initialTeardown;if(b(h))try{h()}catch(v){n=v instanceof nt?v.errors:[v]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var f=gt(p),u=f.next();!u.done;u=f.next()){var g=u.value;try{Et(g)}catch(v){n=n??[],v instanceof nt?n=Z(Z([],Y(n)),Y(v.errors)):n.push(v)}}}catch(v){i={error:v}}finally{try{u&&!u.done&&(s=f.return)&&s.call(f)}finally{if(i)throw i.error}}}if(n)throw new nt(n)}},r.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)Et(t);else{if(t instanceof r){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},r.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},r.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},r.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&mt(e,t)},r.prototype.remove=function(t){var e=this._finalizers;e&&mt(e,t),t instanceof r&&t._removeParent(this)},r.EMPTY=function(){var t=new r;return t.closed=!0,t}(),r}(),Kt=tt.EMPTY;function Jt(r){return r instanceof tt||r&&"closed"in r&&b(r.remove)&&b(r.add)&&b(r.unsubscribe)}function Et(r){b(r)?r():r.unsubscribe()}var Xt={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},vt={setTimeout:function(r,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];var s=vt.delegate;return s!=null&&s.setTimeout?s.setTimeout.apply(s,Z([r,t],Y(e))):setTimeout.apply(void 0,Z([r,t],Y(e)))},clearTimeout:function(r){var t=vt.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(r)},delegate:void 0};function
|
3
|
+
`):"",this.name="UnsubscriptionError",this.errors=e}});function mt(r,t){if(r){var e=r.indexOf(t);0<=e&&r.splice(e,1)}}var tt=function(){function r(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return r.prototype.unsubscribe=function(){var t,e,i,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=gt(o),c=a.next();!c.done;c=a.next()){var l=c.value;l.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 h=this.initialTeardown;if(b(h))try{h()}catch(v){n=v instanceof nt?v.errors:[v]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var f=gt(p),u=f.next();!u.done;u=f.next()){var g=u.value;try{Et(g)}catch(v){n=n??[],v instanceof nt?n=Z(Z([],Y(n)),Y(v.errors)):n.push(v)}}}catch(v){i={error:v}}finally{try{u&&!u.done&&(s=f.return)&&s.call(f)}finally{if(i)throw i.error}}}if(n)throw new nt(n)}},r.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)Et(t);else{if(t instanceof r){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},r.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},r.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},r.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&mt(e,t)},r.prototype.remove=function(t){var e=this._finalizers;e&&mt(e,t),t instanceof r&&t._removeParent(this)},r.EMPTY=function(){var t=new r;return t.closed=!0,t}(),r}(),Kt=tt.EMPTY;function Jt(r){return r instanceof tt||r&&"closed"in r&&b(r.remove)&&b(r.add)&&b(r.unsubscribe)}function Et(r){b(r)?r():r.unsubscribe()}var Xt={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},vt={setTimeout:function(r,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];var s=vt.delegate;return s!=null&&s.setTimeout?s.setTimeout.apply(s,Z([r,t],Y(e))):setTimeout.apply(void 0,Z([r,t],Y(e)))},clearTimeout:function(r){var t=vt.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(r)},delegate:void 0};function we(r){vt.setTimeout(function(){throw r})}function Ot(){}function q(r){r()}var Qt=function(r){D(t,r);function t(e){var i=r.call(this)||this;return i.isStopped=!1,e?(i.destination=e,Jt(e)&&e.add(i)):i.destination=xe,i}return t.create=function(e,i,s){return new yt(e,i,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,r.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}(tt),Ae=Function.prototype.bind;function ot(r,t){return Ae.call(r,t)}var Ce=function(){function r(t){this.partialObserver=t}return r.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(i){F(i)}},r.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(i){F(i)}else F(t)},r.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){F(e)}},r}(),yt=function(r){D(t,r);function t(e,i,s){var n=r.call(this)||this,o;if(b(e)||!e)o={next:e??void 0,error:i??void 0,complete:s??void 0};else{var a;n&&Xt.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return n.unsubscribe()},o={next:e.next&&ot(e.next,a),error:e.error&&ot(e.error,a),complete:e.complete&&ot(e.complete,a)}):o=e}return n.destination=new Ce(o),n}return t}(Qt);function F(r){we(r)}function Se(r){throw r}var xe={closed:!0,next:Ot,error:Se,complete:Ot},Ee=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Oe(r){return r}function Pe(r){return r.length===0?Oe:r.length===1?r[0]:function(e){return r.reduce(function(i,s){return s(i)},e)}}var Pt=function(){function r(t){t&&(this._subscribe=t)}return r.prototype.lift=function(t){var e=new r;return e.source=this,e.operator=t,e},r.prototype.subscribe=function(t,e,i){var s=this,n=Re(t)?t:new yt(t,e,i);return q(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},r.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},r.prototype.forEach=function(t,e){var i=this;return e=Tt(e),new e(function(s,n){var o=new yt({next:function(a){try{t(a)}catch(c){n(c),o.unsubscribe()}},error:n,complete:s});i.subscribe(o)})},r.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},r.prototype[Ee]=function(){return this},r.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Pe(t)(this)},r.prototype.toPromise=function(t){var e=this;return t=Tt(t),new t(function(i,s){var n;e.subscribe(function(o){return n=o},function(o){return s(o)},function(){return i(n)})})},r.create=function(t){return new r(t)},r}();function Tt(r){var t;return(t=r??Xt.Promise)!==null&&t!==void 0?t:Promise}function Te(r){return r&&b(r.next)&&b(r.error)&&b(r.complete)}function Re(r){return r&&r instanceof Qt||Te(r)&&Jt(r)}var Ue=Zt(function(r){return function(){r(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),te=function(r){D(t,r);function t(){var e=r.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 i=new Rt(this,this);return i.operator=e,i},t.prototype._throwIfClosed=function(){if(this.closed)throw new Ue},t.prototype.next=function(e){var i=this;q(function(){var s,n;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var o=gt(i.currentObservers),a=o.next();!a.done;a=o.next()){var c=a.value;c.next(e)}}catch(l){s={error:l}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(s)throw s.error}}}})},t.prototype.error=function(e){var i=this;q(function(){if(i._throwIfClosed(),!i.isStopped){i.hasError=i.isStopped=!0,i.thrownError=e;for(var s=i.observers;s.length;)s.shift().error(e)}})},t.prototype.complete=function(){var e=this;q(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var i=e.observers;i.length;)i.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(),r.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 i=this,s=this,n=s.hasError,o=s.isStopped,a=s.observers;return n||o?Kt:(this.currentObservers=null,a.push(e),new tt(function(){i.currentObservers=null,mt(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var i=this,s=i.hasError,n=i.thrownError,o=i.isStopped;s?e.error(n):o&&e.complete()},t.prototype.asObservable=function(){var e=new Pt;return e.source=this,e},t.create=function(e,i){return new Rt(e,i)},t}(Pt),Rt=function(r){D(t,r);function t(e,i){var s=r.call(this)||this;return s.destination=e,s.source=i,s}return t.prototype.next=function(e){var i,s;(s=(i=this.destination)===null||i===void 0?void 0:i.next)===null||s===void 0||s.call(i,e)},t.prototype.error=function(e){var i,s;(s=(i=this.destination)===null||i===void 0?void 0:i.error)===null||s===void 0||s.call(i,e)},t.prototype.complete=function(){var e,i;(i=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||i===void 0||i.call(e)},t.prototype._subscribe=function(e){var i,s;return(s=(i=this.source)===null||i===void 0?void 0:i.subscribe(e))!==null&&s!==void 0?s:Kt},t}(te),Ie=function(r){D(t,r);function t(e){var i=r.call(this)||this;return i._value=e,i}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(e){var i=r.prototype._subscribe.call(this,e);return!i.closed&&e.next(this._value),i},t.prototype.getValue=function(){var e=this,i=e.hasError,s=e.thrownError,n=e._value;if(i)throw s;return this._throwIfClosed(),n},t.prototype.next=function(e){r.prototype.next.call(this,this._value=e)},t}(te),ee=(r=>(r.Loading="loading",r.Ready="ready",r))(ee||{});class bt{constructor(t,e){this.state=new Ie("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
|
7
|
-
*/const V=globalThis,$t=V.ShadowRoot&&(V.ShadyCSS===void 0||V.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,_t=Symbol(),Ut=new WeakMap;let ie=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==_t)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($t&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=Ut.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&Ut.set(e,t))}return t}toString(){return this.cssText}};const ke=r=>new ie(typeof r=="string"?r:r+"",void 0,_t),U=(r,...t)=>{const e=r.length===1?r[0]:t.reduce((i,s,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.")})(s)+r[n+1],r[0]);return new ie(e,r,_t)},
|
7
|
+
*/const V=globalThis,$t=V.ShadowRoot&&(V.ShadyCSS===void 0||V.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,_t=Symbol(),Ut=new WeakMap;let ie=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==_t)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($t&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=Ut.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&Ut.set(e,t))}return t}toString(){return this.cssText}};const ke=r=>new ie(typeof r=="string"?r:r+"",void 0,_t),U=(r,...t)=>{const e=r.length===1?r[0]:t.reduce((i,s,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.")})(s)+r[n+1],r[0]);return new ie(e,r,_t)},Me=(r,t)=>{if($t)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const i=document.createElement("style"),s=V.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=e.cssText,r.appendChild(i)}},It=$t?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return ke(e)})(r):r;/**
|
8
8
|
* @license
|
9
9
|
* Copyright 2017 Google LLC
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
11
|
-
*/const{is:
|
11
|
+
*/const{is:Ne,defineProperty:je,getOwnPropertyDescriptor:Le,getOwnPropertyNames:He,getOwnPropertySymbols:Be,getPrototypeOf:De}=Object,A=globalThis,kt=A.trustedTypes,ze=kt?kt.emptyScript:"",at=A.reactiveElementPolyfillSupport,M=(r,t)=>r,K={toAttribute(r,t){switch(t){case Boolean:r=r?ze:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},wt=(r,t)=>!Ne(r,t),Mt={attribute:!0,type:String,converter:K,reflect:!1,hasChanged:wt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),A.litPropertyMetadata??(A.litPropertyMetadata=new WeakMap);let P=class 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=Mt){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);s!==void 0&&je(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:n}=Le(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,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Mt}static _$Ei(){if(this.hasOwnProperty(M("elementProperties")))return;const t=De(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(M("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(M("properties"))){const e=this.properties,i=[...He(e),...Be(e)];for(const s of i)this.createProperty(s,e[s])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,s]of e)this.elementProperties.set(i,s)}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const s=this._$Eu(e,i);s!==void 0&&this._$Eh.set(s,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 s of i)e.unshift(It(s))}else t!==void 0&&e.push(It(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 Me(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),s=this.constructor._$Eu(t,i);if(s!==void 0&&i.reflect===!0){const o=(((n=i.converter)==null?void 0:n.toAttribute)!==void 0?i.converter:K).toAttribute(e,i.type);this._$Em=t,o==null?this.removeAttribute(s):this.setAttribute(s,o),this._$Em=null}}_$AK(t,e){var n;const i=this.constructor,s=i._$Eh.get(t);if(s!==void 0&&this._$Em!==s){const o=i.getPropertyOptions(s),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((n=o.converter)==null?void 0:n.fromAttribute)!==void 0?o.converter:K;this._$Em=s,this[s]=a.fromAttribute(e,o.type),this._$Em=null}}requestUpdate(t,e,i,s=!1,n){if(t!==void 0){if(i??(i=this.constructor.getPropertyOptions(t)),!(i.hasChanged??wt)(s?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 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),(i=this._$ES)==null||i.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(i=>{var s;return(s=i.hostUpdated)==null?void 0:s.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){}};P.elementStyles=[],P.shadowRootOptions={mode:"open"},P[M("elementProperties")]=new Map,P[M("finalized")]=new Map,at==null||at({ReactiveElement:P}),(A.reactiveElementVersions??(A.reactiveElementVersions=[])).push("2.0.1");/**
|
12
12
|
* @license
|
13
13
|
* Copyright 2017 Google LLC
|
14
14
|
* SPDX-License-Identifier: BSD-3-Clause
|
15
|
-
*/const N=globalThis,J=N.trustedTypes,Nt=J?J.createPolicy("lit-html",{createHTML:r=>r}):void 0,re="$lit$",w=`lit$${(Math.random()+"").slice(9)}$`,se="?"+w,
|
16
|
-
\f\r]`,
|
17
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ht=/'/g,Bt=/"/g,oe=/^(?:script|style|textarea|title)$/i,
|
15
|
+
*/const N=globalThis,J=N.trustedTypes,Nt=J?J.createPolicy("lit-html",{createHTML:r=>r}):void 0,re="$lit$",w=`lit$${(Math.random()+"").slice(9)}$`,se="?"+w,We=`<${se}>`,E=document,L=()=>E.createComment(""),H=r=>r===null||typeof r!="object"&&typeof r!="function",ne=Array.isArray,Fe=r=>ne(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",ct=`[
|
16
|
+
\f\r]`,k=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,jt=/-->/g,Lt=/>/g,C=RegExp(`>|${ct}(?:([^\\s"'>=/]+)(${ct}*=${ct}*(?:[^
|
17
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ht=/'/g,Bt=/"/g,oe=/^(?:script|style|textarea|title)$/i,Ge=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),T=Ge(1),O=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Dt=new WeakMap,x=E.createTreeWalker(E,129);function ae(r,t){if(!Array.isArray(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Nt!==void 0?Nt.createHTML(t):t}const qe=(r,t)=>{const e=r.length-1,i=[];let s,n=t===2?"<svg>":"",o=k;for(let a=0;a<e;a++){const c=r[a];let l,h,p=-1,f=0;for(;f<c.length&&(o.lastIndex=f,h=o.exec(c),h!==null);)f=o.lastIndex,o===k?h[1]==="!--"?o=jt:h[1]!==void 0?o=Lt:h[2]!==void 0?(oe.test(h[2])&&(s=RegExp("</"+h[2],"g")),o=C):h[3]!==void 0&&(o=C):o===C?h[0]===">"?(o=s??k,p=-1):h[1]===void 0?p=-2:(p=o.lastIndex-h[2].length,l=h[1],o=h[3]===void 0?C:h[3]==='"'?Bt:Ht):o===Bt||o===Ht?o=C:o===jt||o===Lt?o=k:(o=C,s=void 0);const u=o===C&&r[a+1].startsWith("/>")?" ":"";n+=o===k?c+We:p>=0?(i.push(l),c.slice(0,p)+re+c.slice(p)+w+u):c+w+(p===-2?a:u)}return[ae(r,n+(r[e]||"<?>")+(t===2?"</svg>":"")),i]};class B{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let n=0,o=0;const a=t.length-1,c=this.parts,[l,h]=qe(t,e);if(this.el=B.createElement(l,i),x.currentNode=this.el.content,e===2){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(s=x.nextNode())!==null&&c.length<a;){if(s.nodeType===1){if(s.hasAttributes())for(const p of s.getAttributeNames())if(p.endsWith(re)){const f=h[o++],u=s.getAttribute(p).split(w),g=/([.?@])?(.*)/.exec(f);c.push({type:1,index:n,name:g[2],strings:u,ctor:g[1]==="."?Ye:g[1]==="?"?Ze:g[1]==="@"?Ke:et}),s.removeAttribute(p)}else p.startsWith(w)&&(c.push({type:6,index:n}),s.removeAttribute(p));if(oe.test(s.tagName)){const p=s.textContent.split(w),f=p.length-1;if(f>0){s.textContent=J?J.emptyScript:"";for(let u=0;u<f;u++)s.append(p[u],L()),x.nextNode(),c.push({type:2,index:++n});s.append(p[f],L())}}}else if(s.nodeType===8)if(s.data===se)c.push({type:2,index:n});else{let p=-1;for(;(p=s.data.indexOf(w,p+1))!==-1;)c.push({type:7,index:n}),p+=w.length-1}n++}}static createElement(t,e){const i=E.createElement("template");return i.innerHTML=t,i}}function R(r,t,e=r,i){var o,a;if(t===O)return t;let s=i!==void 0?(o=e._$Co)==null?void 0:o[i]:e._$Cl;const n=H(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(r),s._$AT(r,e,i)),i!==void 0?(e._$Co??(e._$Co=[]))[i]=s:e._$Cl=s),s!==void 0&&(t=R(r,s._$AS(r,t.values),s,i)),t}class Ve{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,s=((t==null?void 0:t.creationScope)??E).importNode(e,!0);x.currentNode=s;let n=x.nextNode(),o=0,a=0,c=i[0];for(;c!==void 0;){if(o===c.index){let l;c.type===2?l=new z(n,n.nextSibling,this,t):c.type===1?l=new c.ctor(n,c.name,c.strings,this,t):c.type===6&&(l=new Je(n,this,t)),this._$AV.push(l),c=i[++a]}o!==(c==null?void 0:c.index)&&(n=x.nextNode(),o++)}return x.currentNode=E,s}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 z{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,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=R(this,t,e),H(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==O&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):Fe(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&&H(this._$AH)?this._$AA.nextSibling.data=t:this.$(E.createTextNode(t)),this._$AH=t}g(t){var n;const{values:e,_$litType$:i}=t,s=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=B.createElement(ae(i.h,i.h[0]),this.options)),i);if(((n=this._$AH)==null?void 0:n._$AD)===s)this._$AH.p(e);else{const o=new Ve(s,this),a=o.u(this.options);o.p(e),this.$(a),this._$AH=o}}_$AC(t){let e=Dt.get(t.strings);return e===void 0&&Dt.set(t.strings,e=new B(t)),e}T(t){ne(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const n of t)s===e.length?e.push(i=new z(this.k(L()),this.k(L()),this,this.options)):i=e[s],i._$AI(n),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$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 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 et{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,n){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=n,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=d}_$AI(t,e=this,i,s){const n=this.strings;let o=!1;if(n===void 0)t=R(this,t,e,0),o=!H(t)||t!==this._$AH&&t!==O,o&&(this._$AH=t);else{const a=t;let c,l;for(t=n[0],c=0;c<n.length-1;c++)l=R(this,a[i+c],e,c),l===O&&(l=this._$AH[c]),o||(o=!H(l)||l!==this._$AH[c]),l===d?t=d:t!==d&&(t+=(l??"")+n[c+1]),this._$AH[c]=l}o&&!s&&this.O(t)}O(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Ye extends et{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===d?void 0:t}}class Ze extends et{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}}class Ke extends et{constructor(t,e,i,s,n){super(t,e,i,s,n),this.type=5}_$AI(t,e=this){if((t=R(this,t,e,0)??d)===O)return;const i=this._$AH,s=t===d&&i!==d||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==d&&(i===d||s);s&&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 Je{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){R(this,t)}}const lt=N.litHtmlPolyfillSupport;lt==null||lt(B,z),(N.litHtmlVersions??(N.litHtmlVersions=[])).push("3.0.2");const Xe=(r,t,e)=>{const i=(e==null?void 0:e.renderBefore)??t;let s=i._$litPart$;if(s===void 0){const n=(e==null?void 0:e.renderBefore)??null;i._$litPart$=s=new z(t.insertBefore(L(),n),n,void 0,e??{})}return s._$AI(r),s};/**
|
18
18
|
* @license
|
19
19
|
* Copyright 2017 Google LLC
|
20
20
|
* SPDX-License-Identifier: BSD-3-Clause
|
21
|
-
*/let $=class extends
|
21
|
+
*/let $=class extends P{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=Xe(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 O}};var Yt;$._$litElement$=!0,$.finalized=!0,(Yt=globalThis.litElementHydrateSupport)==null||Yt.call(globalThis,{LitElement:$});const ht=globalThis.litElementPolyfillSupport;ht==null||ht({LitElement:$});(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
|
25
|
-
*/const
|
25
|
+
*/const Qe={attribute:!0,type:String,converter:K,reflect:!1,hasChanged:wt},ti=(r=Qe,t,e)=>{const{kind:i,metadata:s}=e;let n=globalThis.litPropertyMetadata.get(s);if(n===void 0&&globalThis.litPropertyMetadata.set(s,n=new Map),n.set(e.name,r),i==="accessor"){const{name:o}=e;return{set(a){const c=t.get.call(this);t.set.call(this,a),this.requestUpdate(o,c,r)},init(a){return a!==void 0&&this.C(o,void 0,r),a}}}if(i==="setter"){const{name:o}=e;return function(a){const c=this[o];t.call(this,a),this.requestUpdate(o,c,r)}}throw Error("Unsupported decorator location: "+i)};function m(r){return(t,e)=>typeof e=="object"?ti(r,t,e):((i,s,n)=>{const o=s.hasOwnProperty(n);return s.constructor.createProperty(n,o?{...i,wrapped:!0}:i),o?Object.getOwnPropertyDescriptor(s,n):void 0})(r,t,e)}/**
|
26
26
|
* @license
|
27
27
|
* Copyright 2017 Google LLC
|
28
28
|
* SPDX-License-Identifier: BSD-3-Clause
|
29
|
-
*/function W(r){return m({...r,state:!0,attribute:!1})}var
|
29
|
+
*/function W(r){return m({...r,state:!0,attribute:!1})}var ei=Object.defineProperty,ii=Object.getOwnPropertyDescriptor,ri=(r,t,e,i)=>{for(var s=i>1?void 0:i?ii(t,e):t,n=r.length-1,o;n>=0;n--)(o=r[n])&&(s=(i?o(t,e,s):o(s))||s);return i&&s&&ei(t,e,s),s};class it extends ${constructor(){super(...arguments),this.anchor="BottomRight"}appendChild(t){var e;return(e=this.shadowRoot)==null||e.appendChild(t),t}render(){return this.anchor==="BottomLeft"?this.renderRoot.host.classList.add("bottom-left"):this.anchor==="BottomRight"&&this.renderRoot.host.classList.add("bottom-right"),d}}it.styles=[U`
|
30
30
|
:host {
|
31
31
|
position: fixed;
|
32
32
|
display: flex;
|
@@ -42,7 +42,7 @@
|
|
42
42
|
bottom: 20px;
|
43
43
|
left: 20px;
|
44
44
|
}
|
45
|
-
`];
|
45
|
+
`];ri([m({attribute:!0})],it.prototype,"anchor",2);/**
|
46
46
|
* @license
|
47
47
|
* Copyright 2017 Google LLC
|
48
48
|
* SPDX-License-Identifier: BSD-3-Clause
|
@@ -50,19 +50,19 @@
|
|
50
50
|
* @license
|
51
51
|
* Copyright 2020 Google LLC
|
52
52
|
* SPDX-License-Identifier: BSD-3-Clause
|
53
|
-
*/const
|
53
|
+
*/const si=r=>r.strings===void 0;/**
|
54
54
|
* @license
|
55
55
|
* Copyright 2017 Google LLC
|
56
56
|
* SPDX-License-Identifier: BSD-3-Clause
|
57
|
-
*/const j=(r,t)=>{var i;const e=r._$AN;if(e===void 0)return!1;for(const s of e)(i=s._$AO)==null||i.call(s,t,!1),j(s,t);return!0},X=r=>{let t,e;do{if((t=r._$AM)===void 0)break;e=t._$AN,e.delete(r),r=t}while((e==null?void 0:e.size)===0)},le=r=>{for(let t;t=r._$AM;r=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(r))break;e.add(r),
|
57
|
+
*/const j=(r,t)=>{var i;const e=r._$AN;if(e===void 0)return!1;for(const s of e)(i=s._$AO)==null||i.call(s,t,!1),j(s,t);return!0},X=r=>{let t,e;do{if((t=r._$AM)===void 0)break;e=t._$AN,e.delete(r),r=t}while((e==null?void 0:e.size)===0)},le=r=>{for(let t;t=r._$AM;r=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(r))break;e.add(r),ai(t)}};function ni(r){this._$AN!==void 0?(X(this),this._$AM=r,le(this)):this._$AM=r}function oi(r,t=!1,e=0){const i=this._$AH,s=this._$AN;if(s!==void 0&&s.size!==0)if(t)if(Array.isArray(i))for(let n=e;n<i.length;n++)j(i[n],!1),X(i[n]);else i!=null&&(j(i,!1),X(i));else j(this,r)}const ai=r=>{r.type==At.CHILD&&(r._$AP??(r._$AP=oi),r._$AQ??(r._$AQ=ni))};class he extends ce{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),le(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,s;t!==this.isConnected&&(this.isConnected=t,t?(i=this.reconnected)==null||i.call(this):(s=this.disconnected)==null||s.call(this)),e&&(j(this,t),X(this))}setValue(t){if(si(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(){}}const ci=new WeakMap;let zt=0;const pt=new Map,Wt=new WeakSet,Ft=()=>new Promise(r=>requestAnimationFrame(r)),li=[{transform:"translateX(100%) scale(0)",opacity:0}],Gt=(r,t)=>{const e=r-t;return e===0?void 0:e},qt=(r,t)=>{const e=r/t;return e===1?void 0:e},dt={left:(r,t)=>{const e=Gt(r,t);return{value:e,transform:e==null||isNaN(e)?void 0:`translateX(${e}px)`}},top:(r,t)=>{const e=Gt(r,t);return{value:e,transform:e==null||isNaN(e)?void 0:`translateY(${e}px)`}},width:(r,t)=>{let e;t===0&&(t=1,e={width:"1px"});const i=qt(r,t);return{value:i,overrideFrom:e,transform:i==null||isNaN(i)?void 0:`scaleX(${i})`}},height:(r,t)=>{let e;t===0&&(t=1,e={height:"1px"});const i=qt(r,t);return{value:i,overrideFrom:e,transform:i==null||isNaN(i)?void 0:`scaleY(${i})`}}},hi={duration:333,easing:"ease-in-out"},pi=["left","top","width","height","opacity","color","background"],Vt=new WeakMap;class di extends he{constructor(t){if(super(t),this.t=null,this.i=null,this.o=!0,this.shouldLog=!1,t.type===At.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var t;(t=this.resolveFinished)==null||t.call(this),this.finished=new Promise(e=>{this.h=e})}async resolveFinished(){var t;(t=this.h)==null||t.call(this),this.h=void 0}render(t){return d}getController(){return ci.get(this.l)}isDisabled(){var t;return this.options.disabled||((t=this.getController())==null?void 0:t.disabled)}update(t,[e]){var s;const i=this.l===void 0;return i&&(this.l=(s=t.options)==null?void 0:s.host,this.l.addController(this),this.element=t.element,Vt.set(this.element,this)),this.optionsOrCallback=e,(i||typeof e!="function")&&this.u(e),this.render(e)}u(t){t=t??{};const e=this.getController();e!==void 0&&((t={...e.defaultOptions,...t}).keyframeOptions={...e.defaultOptions.keyframeOptions,...t.keyframeOptions}),t.properties??(t.properties=pi),this.options=t}p(){const t={},e=this.element.getBoundingClientRect(),i=getComputedStyle(this.element);return this.options.properties.forEach(s=>{const n=e[s]??(dt[s]?void 0:i[s]),o=Number(n);t[s]=isNaN(o)?n+"":o}),t}m(){let t,e=!0;return this.options.guard&&(t=this.options.guard(),e=((i,s)=>{if(Array.isArray(i)){if(Array.isArray(s)&&s.length===i.length&&i.every((n,o)=>n===s[o]))return!1}else if(s===i)return!1;return!0})(t,this.v)),this.o=this.l.hasUpdated&&!this.isDisabled()&&!this.isAnimating()&&e&&this.element.isConnected,this.o&&(this.v=Array.isArray(t)?Array.from(t):t),this.o}hostUpdate(){typeof this.optionsOrCallback=="function"&&this.u(this.optionsOrCallback()),this.m()&&(this.g=this.p(),this.t=this.t??this.element.parentNode,this.i=this.element.nextSibling)}async hostUpdated(){if(!this.o||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let t;this.prepare(),await Ft;const e=this._(),i=this.A(this.options.keyframeOptions,e),s=this.p();if(this.g!==void 0){const{from:n,to:o}=this.O(this.g,s,e);this.log("measured",[this.g,s,n,o]),t=this.calculateKeyframes(n,o)}else{const n=pt.get(this.options.inId);if(n){pt.delete(this.options.inId);const{from:o,to:a}=this.O(n,s,e);t=this.calculateKeyframes(o,a),t=this.options.in?[{...this.options.in[0],...t[0]},...this.options.in.slice(1),t[1]]:t,zt++,t.forEach(c=>c.zIndex=zt)}else this.options.in&&(t=[...this.options.in,{}])}this.animate(t,i)}resetStyles(){this.j!==void 0&&(this.element.setAttribute("style",this.j??""),this.j=void 0)}commitStyles(){var t,e;this.j=this.element.getAttribute("style"),(t=this.webAnimation)==null||t.commitStyles(),(e=this.webAnimation)==null||e.cancel()}reconnected(){}async disconnected(){var e;if(!this.o||(this.options.id!==void 0&&pt.set(this.options.id,this.g),this.options.out===void 0))return;if(this.prepare(),await Ft(),(e=this.t)==null?void 0:e.isConnected){const i=this.i&&this.i.parentNode===this.t?this.i:null;if(this.t.insertBefore(this.element,i),this.options.stabilizeOut){const s=this.p();this.log("stabilizing out");const n=this.g.left-s.left,o=this.g.top-s.top;getComputedStyle(this.element).position!=="static"||n===0&&o===0||(this.element.style.position="relative"),n!==0&&(this.element.style.left=n+"px"),o!==0&&(this.element.style.top=o+"px")}}const t=this.A(this.options.keyframeOptions);await this.animate(this.options.out,t),this.element.remove()}prepare(){this.createFinished()}start(){var t,e;(e=(t=this.options).onStart)==null||e.call(t,this)}didFinish(t){var e,i;t&&((i=(e=this.options).onComplete)==null||i.call(e,this)),this.g=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}_(){const t=[];for(let e=this.element.parentNode;e;e=e==null?void 0:e.parentNode){const i=Vt.get(e);i&&!i.isDisabled()&&i&&t.push(i)}return t}get isHostRendered(){const t=Wt.has(this.l);return t||this.l.updateComplete.then(()=>{Wt.add(this.l)}),t}A(t,e=this._()){const i={...hi};return e.forEach(s=>Object.assign(i,s.options.keyframeOptions)),Object.assign(i,t),i}O(t,e,i){t={...t},e={...e};const s=i.map(a=>a.animatingProperties).filter(a=>a!==void 0);let n=1,o=1;return s!==void 0&&(s.forEach(a=>{a.width&&(n/=a.width),a.height&&(o/=a.height)}),t.left!==void 0&&e.left!==void 0&&(t.left=n*t.left,e.left=n*e.left),t.top!==void 0&&e.top!==void 0&&(t.top=o*t.top,e.top=o*e.top)),{from:t,to:e}}calculateKeyframes(t,e,i=!1){const s={},n={};let o=!1;const a={};for(const c in e){const l=t[c],h=e[c];if(c in dt){const p=dt[c];if(l===void 0||h===void 0)continue;const f=p(l,h);f.transform!==void 0&&(a[c]=f.value,o=!0,s.transform=`${s.transform??""} ${f.transform}`,f.overrideFrom!==void 0&&Object.assign(s,f.overrideFrom))}else l!==h&&l!==void 0&&h!==void 0&&(o=!0,s[c]=l,n[c]=h)}return s.transformOrigin=n.transformOrigin=i?"center center":"top left",this.animatingProperties=a,o?[s,n]:void 0}async animate(t,e=this.options.keyframeOptions){this.start(),this.frames=t;let i=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=t=this.options.onFrames(this),this.log("modified frames",t)),t!==void 0)){this.log("animate",[t,e]),i=!0,this.webAnimation=this.element.animate(t,e);const s=this.getController();s==null||s.add(this);try{await this.webAnimation.finished}catch{}s==null||s.remove(this)}return this.didFinish(i),i}isAnimating(){var t,e;return((t=this.webAnimation)==null?void 0:t.playState)==="running"||((e=this.webAnimation)==null?void 0:e.pending)}log(t,e){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,e)}}const ui=Ct(di),fi={name:"question",svg:'<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M32 4C16.536 4 4 16.536 4 32C4 47.464 16.536 60 32 60C47.464 60 60 47.464 60 32C59.9827 16.5432 47.4568 4.01731 32 4ZM32 55.6923C18.9151 55.6923 8.30769 45.0849 8.30769 32C8.30769 18.9151 18.9151 8.30769 32 8.30769C45.0849 8.30769 55.6923 18.9151 55.6923 32C55.6775 45.0788 45.0788 55.6775 32 55.6923Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M31.9423 37.5723L36.311 32.9068L36.7354 32.4448C39.7555 29.1161 40.7645 27.0647 40.7645 24.5087C40.7645 23.1091 40.4251 21.7942 39.7041 20.6491C38.3044 18.3587 35.6323 16.9166 32.2816 16.9166C28.7565 16.9166 25.3125 18.7414 23.2581 21.6772L23.1201 21.8791C22.8232 22.3032 22.696 22.6849 22.696 22.9818C22.696 23.7029 23.926 25.9932 25.2833 25.9932C25.5378 25.9932 25.7922 25.9084 26.0467 25.7388C26.2588 25.5691 26.5981 25.2298 27.0647 24.7208C28.8885 22.6849 30.1185 21.9215 31.7726 21.9215C33.6813 21.9215 35.081 23.1939 35.081 24.8905C35.081 26.375 34.2751 27.7746 32.3664 29.8529L28.2523 34.2216C27.9554 34.6033 27.7857 34.9426 27.7857 35.282C27.7857 35.6213 27.9978 36.1726 28.4219 36.8937C29.0581 37.8692 29.7368 38.3782 30.4578 38.3782C30.9244 38.3782 31.3909 38.1237 31.9423 37.5723ZM30.882 47.4972C29.2278 47.4972 27.6585 44.7403 27.6585 43.6799C27.6585 42.1954 30.0761 40.6261 32.4089 40.6261C33.6389 40.6261 34.2751 41.1775 34.2751 42.3227C34.2751 44.0616 33.4692 45.843 32.4513 46.7761C31.9423 47.2427 31.4334 47.4972 30.882 47.4972Z"/></svg>'};/**
|
58
58
|
* @license
|
59
59
|
* Copyright 2018 Google LLC
|
60
60
|
* SPDX-License-Identifier: BSD-3-Clause
|
61
|
-
*/const
|
61
|
+
*/const gi=Ct(class extends ce{constructor(r){var t;if(super(r),r.type!==At.ATTRIBUTE||r.name!=="class"||((t=r.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(r){return" "+Object.keys(r).filter(t=>r[t]).join(" ")+" "}update(r,[t]){var i,s;if(this.it===void 0){this.it=new Set,r.strings!==void 0&&(this.st=new Set(r.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=r.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)||(s=this.st)!=null&&s.has(n)||(o?(e.add(n),this.it.add(n)):(e.remove(n),this.it.delete(n)))}return O}}),G=(r,t,e)=>{r&&e.style.setProperty(t,r)},pe=(r,t)=>{var e,i,s,n;G((e=r.colors)==null?void 0:e.primaryBackground,"--primary-background",t),G((i=r.colors)==null?void 0:i.textOnPrimaryBackground,"--text-on-primary-background",t),G((s=r.colors)==null?void 0:s.secondaryBackground,"--secondary-background",t),G((n=r.colors)==null?void 0:n.textOnSecondaryBackground,"--text-on-secondary-background",t)};/**
|
62
62
|
* @license
|
63
63
|
* Copyright 2020 Google LLC
|
64
64
|
* SPDX-License-Identifier: BSD-3-Clause
|
65
|
-
*/const de=()=>new
|
65
|
+
*/const de=()=>new mi;class mi{}const ut=new WeakMap,ue=Ct(class extends he{render(r){return d}update(r,[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=r.options)==null?void 0:i.host,this.ot(this.lt=r.element)),d}ot(r){if(typeof this.G=="function"){const t=this.ct??globalThis;let e=ut.get(t);e===void 0&&(e=new WeakMap,ut.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ct,void 0),e.set(this.G,r),r!==void 0&&this.G.call(this.ct,r)}else this.G.value=r}get rt(){var r,t;return typeof this.G=="function"?(r=ut.get(this.ct??globalThis))==null?void 0:r.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 vi=Object.defineProperty,yi=Object.getOwnPropertyDescriptor,rt=(r,t,e,i)=>{for(var s=i>1?void 0:i?yi(t,e):t,n=r.length-1,o;n>=0;n--)(o=r[n])&&(s=(i?o(t,e,s):o(s))||s);return i&&s&&vi(t,e,s),s};class _ extends ${constructor(){super(...arguments),this.active=!1,this.loaded=!1,this.containerRef=de()}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(),this.loaded=!0,this._applyBranding()}toggleActive(){var t;if(!((t=this.application)!=null&&t.root)){console.warn("Could not activate widget. No root element assigned to widget.");return}this.active=!this.active,this.active?this.application.appendToDOM():this.application.hide()}_applyBranding(){var t;(t=this.application)!=null&&t.settings&&pe(this.application.settings.branding,this)}async _renderSymbol(){var a,c,l;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 T` <img src=${e} class="trigger-icon" alt="" /> `;const i=(l=this.application)==null?void 0:l.triggerIcon;if(!i)return d;const s=async h=>fi,{type:n,content:o}=i;switch(n){case"Telia":{const h=await s();return h?T`<telia-icon
|
66
66
|
class="trigger-icon"
|
67
67
|
svg=${h.svg}
|
68
68
|
size="lg"
|
@@ -71,14 +71,14 @@
|
|
71
71
|
<button
|
72
72
|
class="trigger-label"
|
73
73
|
@click=${this.toggleActive}
|
74
|
-
${
|
74
|
+
${ui({keyframeOptions:{},in:li,stabilizeOut:!0,skipInitial:!1})}
|
75
75
|
>
|
76
76
|
${this.application.settings.branding.other.buttonLabelText}
|
77
77
|
</button>
|
78
78
|
`:d}
|
79
79
|
|
80
80
|
<button
|
81
|
-
class=${
|
81
|
+
class=${gi({trigger:!0,active:this.active,rendered:this.loaded})}
|
82
82
|
@click=${this.toggleActive}
|
83
83
|
>
|
84
84
|
${this.icon}
|
@@ -214,7 +214,7 @@
|
|
214
214
|
.trigger-label:hover {
|
215
215
|
opacity: 0.8;
|
216
216
|
}
|
217
|
-
`];rt([m({attribute:!1})],_.prototype,"application",2);rt([W()],_.prototype,"active",2);rt([W()],_.prototype,"loaded",2);rt([W()],_.prototype,"icon",2);var
|
217
|
+
`];rt([m({attribute:!1})],_.prototype,"application",2);rt([W()],_.prototype,"active",2);rt([W()],_.prototype,"loaded",2);rt([W()],_.prototype,"icon",2);var bi=Object.defineProperty,$i=Object.getOwnPropertyDescriptor,S=(r,t,e,i)=>{for(var s=i>1?void 0:i?$i(t,e):t,n=r.length-1,o;n>=0;n--)(o=r[n])&&(s=(i?o(t,e,s):o(s))||s);return i&&s&&bi(t,e,s),s};const fe=r=>{class t extends r{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))`),this.application.mountComponent(this)}}return t.styles=[U`
|
218
218
|
:host {
|
219
219
|
font-family: var(--font-family);
|
220
220
|
grid-column: span var(--width);
|
@@ -234,8 +234,8 @@
|
|
234
234
|
* @license
|
235
235
|
* Copyright 2021 Google LLC
|
236
236
|
* SPDX-License-Identifier: BSD-3-Clause
|
237
|
-
*/function
|
238
|
-
${
|
237
|
+
*/function*_i(r,t){if(r!==void 0){let e=0;for(const i of r)yield t(i,e++)}}var y=(r=>(r.Inline="inline",r.Trigger="trigger",r))(y||{}),wi=Object.defineProperty,Ai=Object.getOwnPropertyDescriptor,Ci=(r,t,e,i)=>{for(var s=i>1?void 0:i?Ai(t,e):t,n=r.length-1,o;n>=0;n--)(o=r[n])&&(s=(i?o(t,e,s):o(s))||s);return i&&s&&wi(t,e,s),s};class st extends ${constructor(){super(...arguments),this.nodes=[],this.wrapperRef=de()}addChild(t){t.parent=this,this.nodes.push(t)}applyBranding(){if(!this.wrapperRef.value)return;const t=this.application.settings;t!=null&&t.branding&&pe(t.branding,this.wrapperRef.value)}applyStyles(){if(!this.wrapperRef.value)return;const t=this.application.styles(),e=this.wrapperRef.value;Object.entries(t).forEach(([i,s])=>{e.style.setProperty(`--${i}`,s)})}firstUpdated(t){this.applyBranding(),this.applyStyles()}render(){return this.application.renderStrategy===y.Trigger&&(this.renderRoot.host.classList.add("floating"),this.application.anchor==="BottomLeft"?this.renderRoot.host.classList.add("bottom-left"):this.application.anchor==="BottomRight"&&this.renderRoot.host.classList.add("bottom-right")),T`<div class="widget-container" ${ue(this.wrapperRef)}>
|
238
|
+
${_i(this.nodes,t=>t)}
|
239
239
|
</div>`}}st.styles=U`
|
240
240
|
:host {
|
241
241
|
--font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
|
@@ -333,8 +333,8 @@
|
|
333
333
|
opacity: 0;
|
334
334
|
animation: slideDown 0.3s linear;
|
335
335
|
}
|
336
|
-
`;
|
336
|
+
`;Ci([m({attribute:!1})],st.prototype,"application",2);class Si{constructor(){this.root=this.createRoot()}createComponentModel(t,e){this.root.application=e;const i=a=>{if(Array.isArray(a)){const[c,...l]=a;return{definitionId:c,overrides:l}}return{definitionId:a,overrides:[]}},s=(a,c,l,h)=>{l.forEach(p=>{const f=i(p),u=h[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,h))})},{entry:n,components:o}=t;return s(this,this.root,[n],o),this.root}createRoot(){return new st}createNode(t,e){const i=this.resolveComponent(e);if(!i)return console.warn(`Unable to resolve component: ${e}`),new St;const s=new i;return s.type=e,s.name=t,s}resolveComponent(t){return customElements.get(`ace-${t}`)}getRoot(){return this.root}}const ge=class{constructor(){this.components=new Map}getComponent(r){const t=this.components.get(r);return t||console.warn(`Unable to resolve component: ${r}. You most likely forgot to register the required plugin.`),t}registerComponent(r,t){this.components.set(r,t)}async loadComponents(){const r=[...this.components.entries()].map(([t,e])=>e.then(i=>{this.defineAsWebComponent(t,i.default)}));await Promise.all(r)}defineAsWebComponent(r,t){const e=ge.ResolveWebComponentName(r);customElements.get(e)||customElements.define(e,t)}};let me=ge;me.ResolveWebComponentName=r=>`ace-${r}`;class ve{set(t,e){sessionStorage.setItem(t,e)}get(t){const e=sessionStorage.getItem(t);if(!e)return null;try{return JSON.parse(e)}catch{return e}}}class xi{constructor(){this.texts=new Map}loadTexts(t){this.texts=new Map(Object.entries(t))}get(t,e){const i=this.texts.get(t);return i||e||null}getOrFallback(t,e){return this.texts.get(t)||e}}class ye{constructor(t,e,i,s){this.name=t,this.container=e,this.settings=i,this.options=s,this.platform=new Si,this.texts=new xi,this.storage=new ve,this.renderStrategy=y.Inline,this.anchor="BottomRight",this.autoActivate=!1,this.plugins=[],this.componentResolver=new me,this.components=[],this.trigger=null,this.renderStrategy=this.options.renderStrategy||y.Inline,this.triggerIcon=this.options.triggerIcon,typeof s.autoActivate=="boolean"&&(this.autoActivate=s.autoActivate),s.anchor&&(this.anchor=s.anchor),this.container.register("$settings",i),this.texts.loadTexts(i.texts||{})}async activate(){if(await this.loadPlugins(),await this.componentResolver.loadComponents(),this.root=this.platform.createComponentModel(this.settings,this),this.container.setState(ee.Ready),this.autoActivate){const t=this.render();t&&this._getTargetElement().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)),this.storage.set("open","true")}hide(){this.root&&(this.root.classList.add("hidden"),this.root.classList.remove("expanded")),this.storage.set("open","false")}mute(){this.settings.branding.other.disableSound=!0}unmute(){this.settings.branding.other.disableSound=!1}registerComponent(t,e){this.componentResolver.registerComponent(t,e)}resolveComponent(t){return this.componentResolver.getComponent(t)}mountComponent(t){this.components.push(t)}getComponent(t){const e=this.components.find(i=>i.type===t);return e||null}_getTargetElement(){let t="bottom-right";if(this.anchor==="BottomRight"?t="bottom-right":this.anchor==="BottomLeft"&&(t="bottom-left"),this.renderStrategy===y.Trigger){let e=document.querySelector(`ace-trigger-slot.${t}`);return e||(e=new it,e.anchor=this.anchor,document.body.appendChild(e)),e}return document.body}render(){if(this.renderStrategy===y.Trigger){const t=new _;return t.application=this,this.trigger=t,this.storage.get("open")&&this.trigger.toggleActive(),t}return this.root}}const be=class{async getSite(r){const e=await(await fetch(r)).json();return e?{id:e.id,apps:e.widgets.map(i=>{let s=y.Inline;return i.renderStrategy==="Trigger"&&(s=y.Trigger),{id:i.id,widgetId:i.widgetId,renderStrategy:s,autoActivate:i.autoActivate,anchor:i.anchor,triggerIcon:{type:"Telia",content:i.triggerIcon}}})}:null}async getWidget(r){const e=await(await fetch(`${be.endpoint}/widget/${r}`)).json();return e?{name:e.name,config:JSON.parse(e.configuration)}:null}};let Q=be;Q.endpoint="https://widgets.ace.teliacompany.net/api";class $e{constructor(){this.applications=[],this.container=new bt("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 i=this.applications.find(s=>s.name===e.name);i&&e.dispatchEvent(new CustomEvent("environment-created",{detail:{widget:i}}))})}registerApp(t,e,i){const s=new bt(t,this),n=new ye(t,s,e,i);this.applications.push(n)}plugin(t){return this.applications.forEach(e=>{e.plugin(t)}),this}}class _e{constructor(t){this.configurations=[],this.httpClient=new Q,this.httpClient=new Q,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,anchor:e.anchor,triggerIcon:{type:"Telia",content:e.triggerIcon||"question"}}))}async bootstrap(t){var e;this.url&&await this.load(this.url),this.environment=new $e,this.addGlobal(this.environment);for await(const i of this.configurations){const s=await this.httpClient.getWidget(i.widgetId);s&&((e=this.environment)==null||e.registerApp(s.name,s.config,{renderStrategy:i.renderStrategy,triggerIcon:i.triggerIcon,autoActivate:i.autoActivate,anchor:i.anchor}))}t(this.environment),await this.environment.bootstrap()}addGlobal(t){globalThis.widgets=t}}var Ei=Object.defineProperty,Oi=Object.getOwnPropertyDescriptor,xt=(r,t,e,i)=>{for(var s=i>1?void 0:i?Oi(t,e):t,n=r.length-1,o;n>=0;n--)(o=r[n])&&(s=(i?o(t,e,s):o(s))||s);return i&&s&&Ei(t,e,s),s};class I extends ${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===y.Trigger){const t=new _;return t.application=this.widget,t}return this.widget.render()}}I.styles=[U`
|
337
337
|
:host {
|
338
338
|
display: block;
|
339
339
|
}
|
340
|
-
`];xt([m({attribute:!0})],
|
340
|
+
`];xt([m({attribute:!0})],I.prototype,"name",2);xt([W()],I.prototype,"widget",2);xt([W()],I.prototype,"status",2);customElements.get("ace-trigger-slot")||customElements.define("ace-trigger-slot",it);customElements.get("ace-trigger")||customElements.define("ace-trigger",_);customElements.get("ace-unresolved-component")||customElements.define("ace-unresolved-component",St);customElements.get("ace-wrapper")||customElements.define("ace-wrapper",st);customElements.get("ace-widget")||customElements.define("ace-widget",I);const Pi=async(r,t)=>{await new _e(r).bootstrap(t)};exports.AceWidget=I;exports.Application=ye;exports.Container=bt;exports.Environment=$e;exports.HttpClient=Q;exports.Site=_e;exports.StorageService=ve;exports.Trigger=_;exports.WidgetComponent=fe;exports.bootstrap=Pi;
|
package/index.mjs
CHANGED
@@ -119,7 +119,7 @@ var Q = function() {
|
|
119
119
|
for (var f = ft(p), u = f.next(); !u.done; u = f.next()) {
|
120
120
|
var g = u.value;
|
121
121
|
try {
|
122
|
-
|
122
|
+
xt(g);
|
123
123
|
} catch (v) {
|
124
124
|
n = n ?? [], v instanceof st ? n = Z(Z([], Y(n)), Y(v.errors)) : n.push(v);
|
125
125
|
}
|
@@ -142,7 +142,7 @@ var Q = function() {
|
|
142
142
|
var e;
|
143
143
|
if (t && t !== this)
|
144
144
|
if (this.closed)
|
145
|
-
|
145
|
+
xt(t);
|
146
146
|
else {
|
147
147
|
if (t instanceof r) {
|
148
148
|
if (t.closed || t._hasParent(this))
|
@@ -171,7 +171,7 @@ var Q = function() {
|
|
171
171
|
function Jt(r) {
|
172
172
|
return r instanceof Q || r && "closed" in r && b(r.remove) && b(r.add) && b(r.unsubscribe);
|
173
173
|
}
|
174
|
-
function
|
174
|
+
function xt(r) {
|
175
175
|
b(r) ? r() : r.unsubscribe();
|
176
176
|
}
|
177
177
|
var Xt = {
|
@@ -317,7 +317,7 @@ function Ce(r) {
|
|
317
317
|
}, e);
|
318
318
|
};
|
319
319
|
}
|
320
|
-
var
|
320
|
+
var Ot = function() {
|
321
321
|
function r(t) {
|
322
322
|
t && (this._subscribe = t);
|
323
323
|
}
|
@@ -325,7 +325,7 @@ var Pt = function() {
|
|
325
325
|
var e = new r();
|
326
326
|
return e.source = this, e.operator = t, e;
|
327
327
|
}, r.prototype.subscribe = function(t, e, i) {
|
328
|
-
var s = this, n =
|
328
|
+
var s = this, n = xe(t) ? t : new vt(t, e, i);
|
329
329
|
return q(function() {
|
330
330
|
var o = s, a = o.operator, c = o.source;
|
331
331
|
n.add(a ? a.call(n, c) : c ? s._subscribe(n) : s._trySubscribe(n));
|
@@ -338,7 +338,7 @@ var Pt = function() {
|
|
338
338
|
}
|
339
339
|
}, r.prototype.forEach = function(t, e) {
|
340
340
|
var i = this;
|
341
|
-
return e =
|
341
|
+
return e = Pt(e), new e(function(s, n) {
|
342
342
|
var o = new vt({
|
343
343
|
next: function(a) {
|
344
344
|
try {
|
@@ -363,7 +363,7 @@ var Pt = function() {
|
|
363
363
|
return Ce(t)(this);
|
364
364
|
}, r.prototype.toPromise = function(t) {
|
365
365
|
var e = this;
|
366
|
-
return t =
|
366
|
+
return t = Pt(t), new t(function(i, s) {
|
367
367
|
var n;
|
368
368
|
e.subscribe(function(o) {
|
369
369
|
return n = o;
|
@@ -377,15 +377,15 @@ var Pt = function() {
|
|
377
377
|
return new r(t);
|
378
378
|
}, r;
|
379
379
|
}();
|
380
|
-
function
|
380
|
+
function Pt(r) {
|
381
381
|
var t;
|
382
382
|
return (t = r ?? Xt.Promise) !== null && t !== void 0 ? t : Promise;
|
383
383
|
}
|
384
|
-
function
|
384
|
+
function Se(r) {
|
385
385
|
return r && b(r.next) && b(r.error) && b(r.complete);
|
386
386
|
}
|
387
|
-
function
|
388
|
-
return r && r instanceof Qt ||
|
387
|
+
function xe(r) {
|
388
|
+
return r && r instanceof Qt || Se(r) && Jt(r);
|
389
389
|
}
|
390
390
|
var Ee = Zt(function(r) {
|
391
391
|
return function() {
|
@@ -466,12 +466,12 @@ var Ee = Zt(function(r) {
|
|
466
466
|
var i = this, s = i.hasError, n = i.thrownError, o = i.isStopped;
|
467
467
|
s ? e.error(n) : o && e.complete();
|
468
468
|
}, t.prototype.asObservable = function() {
|
469
|
-
var e = new
|
469
|
+
var e = new Ot();
|
470
470
|
return e.source = this, e;
|
471
471
|
}, t.create = function(e, i) {
|
472
472
|
return new Tt(e, i);
|
473
473
|
}, t;
|
474
|
-
}(
|
474
|
+
}(Ot), Tt = function(r) {
|
475
475
|
B(t, r);
|
476
476
|
function t(e, i) {
|
477
477
|
var s = r.call(this) || this;
|
@@ -490,7 +490,7 @@ var Ee = Zt(function(r) {
|
|
490
490
|
var i, s;
|
491
491
|
return (s = (i = this.source) === null || i === void 0 ? void 0 : i.subscribe(e)) !== null && s !== void 0 ? s : Kt;
|
492
492
|
}, t;
|
493
|
-
}(te),
|
493
|
+
}(te), Oe = function(r) {
|
494
494
|
B(t, r);
|
495
495
|
function t(e) {
|
496
496
|
var i = r.call(this) || this;
|
@@ -516,7 +516,7 @@ var Ee = Zt(function(r) {
|
|
516
516
|
}(te), ee = /* @__PURE__ */ ((r) => (r.Loading = "loading", r.Ready = "ready", r))(ee || {});
|
517
517
|
class Rt {
|
518
518
|
constructor(t, e) {
|
519
|
-
this.state = new
|
519
|
+
this.state = new Oe(
|
520
520
|
"loading"
|
521
521
|
/* Loading */
|
522
522
|
), this.resolvers = /* @__PURE__ */ new Map(), this.name = t, this.environment = e, this.state.next(
|
@@ -559,7 +559,7 @@ let ie = class {
|
|
559
559
|
return this.cssText;
|
560
560
|
}
|
561
561
|
};
|
562
|
-
const
|
562
|
+
const Pe = (r) => new ie(typeof r == "string" ? r : r + "", void 0, $t), U = (r, ...t) => {
|
563
563
|
const e = r.length === 1 ? r[0] : t.reduce((i, s, n) => i + ((o) => {
|
564
564
|
if (o._$cssResult$ === !0)
|
565
565
|
return o.cssText;
|
@@ -576,18 +576,18 @@ const Oe = (r) => new ie(typeof r == "string" ? r : r + "", void 0, $t), U = (r,
|
|
576
576
|
const i = document.createElement("style"), s = V.litNonce;
|
577
577
|
s !== void 0 && i.setAttribute("nonce", s), i.textContent = e.cssText, r.appendChild(i);
|
578
578
|
}
|
579
|
-
},
|
579
|
+
}, It = bt ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
|
580
580
|
let e = "";
|
581
581
|
for (const i of t.cssRules)
|
582
582
|
e += i.cssText;
|
583
|
-
return
|
583
|
+
return Pe(e);
|
584
584
|
})(r) : r;
|
585
585
|
/**
|
586
586
|
* @license
|
587
587
|
* Copyright 2017 Google LLC
|
588
588
|
* SPDX-License-Identifier: BSD-3-Clause
|
589
589
|
*/
|
590
|
-
const { is: Re, defineProperty: Ue, getOwnPropertyDescriptor:
|
590
|
+
const { is: Re, defineProperty: Ue, getOwnPropertyDescriptor: Ie, getOwnPropertyNames: ke, getOwnPropertySymbols: Me, getPrototypeOf: Ne } = Object, w = globalThis, kt = w.trustedTypes, je = kt ? kt.emptyScript : "", ot = w.reactiveElementPolyfillSupport, k = (r, t) => r, K = { toAttribute(r, t) {
|
591
591
|
switch (t) {
|
592
592
|
case Boolean:
|
593
593
|
r = r ? je : null;
|
@@ -617,7 +617,7 @@ const { is: Re, defineProperty: Ue, getOwnPropertyDescriptor: ke, getOwnProperty
|
|
617
617
|
return e;
|
618
618
|
} }, _t = (r, t) => !Re(r, t), Mt = { attribute: !0, type: String, converter: K, reflect: !1, hasChanged: _t };
|
619
619
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), w.litPropertyMetadata ?? (w.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
620
|
-
let
|
620
|
+
let P = class extends HTMLElement {
|
621
621
|
static addInitializer(t) {
|
622
622
|
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
623
623
|
}
|
@@ -631,7 +631,7 @@ let O = class extends HTMLElement {
|
|
631
631
|
}
|
632
632
|
}
|
633
633
|
static getPropertyDescriptor(t, e, i) {
|
634
|
-
const { get: s, set: n } =
|
634
|
+
const { get: s, set: n } = Ie(this.prototype, t) ?? { get() {
|
635
635
|
return this[e];
|
636
636
|
}, set(o) {
|
637
637
|
this[e] = o;
|
@@ -647,16 +647,16 @@ let O = class extends HTMLElement {
|
|
647
647
|
return this.elementProperties.get(t) ?? Mt;
|
648
648
|
}
|
649
649
|
static _$Ei() {
|
650
|
-
if (this.hasOwnProperty(
|
650
|
+
if (this.hasOwnProperty(k("elementProperties")))
|
651
651
|
return;
|
652
652
|
const t = Ne(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(k("finalized")))
|
657
657
|
return;
|
658
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
659
|
-
const e = this.properties, i = [...
|
658
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(k("properties"))) {
|
659
|
+
const e = this.properties, i = [...ke(e), ...Me(e)];
|
660
660
|
for (const s of i)
|
661
661
|
this.createProperty(s, e[s]);
|
662
662
|
}
|
@@ -679,9 +679,9 @@ let O = class extends HTMLElement {
|
|
679
679
|
if (Array.isArray(t)) {
|
680
680
|
const i = new Set(t.flat(1 / 0).reverse());
|
681
681
|
for (const s of i)
|
682
|
-
e.unshift(
|
682
|
+
e.unshift(It(s));
|
683
683
|
} else
|
684
|
-
t !== void 0 && e.push(
|
684
|
+
t !== void 0 && e.push(It(t));
|
685
685
|
return e;
|
686
686
|
}
|
687
687
|
static _$Eu(t, e) {
|
@@ -828,15 +828,15 @@ let O = class extends HTMLElement {
|
|
828
828
|
firstUpdated(t) {
|
829
829
|
}
|
830
830
|
};
|
831
|
-
|
831
|
+
P.elementStyles = [], P.shadowRootOptions = { mode: "open" }, P[k("elementProperties")] = /* @__PURE__ */ new Map(), P[k("finalized")] = /* @__PURE__ */ new Map(), ot == null || ot({ ReactiveElement: P }), (w.reactiveElementVersions ?? (w.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
837
|
const M = globalThis, J = M.trustedTypes, Nt = J ? J.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, re = "$lit$", _ = `lit$${(Math.random() + "").slice(9)}$`, se = "?" + _, Le = `<${se}>`, E = document, j = () => E.createComment(""), L = (r) => r === null || typeof r != "object" && typeof r != "function", ne = Array.isArray, He = (r) => ne(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", at = `[
|
838
|
-
\f\r]`,
|
839
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), Ht = /'/g, Bt = /"/g, oe = /^(?:script|style|textarea|title)$/i, Be = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), T = Be(1),
|
838
|
+
\f\r]`, I = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, jt = /-->/g, Lt = />/g, C = RegExp(`>|${at}(?:([^\\s"'>=/]+)(${at}*=${at}*(?:[^
|
839
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Ht = /'/g, Bt = /"/g, oe = /^(?:script|style|textarea|title)$/i, Be = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), T = Be(1), O = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), Dt = /* @__PURE__ */ new WeakMap(), x = E.createTreeWalker(E, 129);
|
840
840
|
function ae(r, t) {
|
841
841
|
if (!Array.isArray(r) || !r.hasOwnProperty("raw"))
|
842
842
|
throw Error("invalid template strings array");
|
@@ -844,14 +844,14 @@ function ae(r, t) {
|
|
844
844
|
}
|
845
845
|
const De = (r, t) => {
|
846
846
|
const e = r.length - 1, i = [];
|
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 = r[a];
|
850
850
|
let l, h, p = -1, f = 0;
|
851
851
|
for (; f < c.length && (o.lastIndex = f, h = o.exec(c), h !== null); )
|
852
|
-
f = o.lastIndex, o ===
|
852
|
+
f = o.lastIndex, o === I ? h[1] === "!--" ? o = jt : h[1] !== void 0 ? o = Lt : h[2] !== void 0 ? (oe.test(h[2]) && (s = RegExp("</" + h[2], "g")), o = C) : h[3] !== void 0 && (o = C) : o === C ? h[0] === ">" ? (o = s ?? I, p = -1) : h[1] === void 0 ? p = -2 : (p = o.lastIndex - h[2].length, l = h[1], o = h[3] === void 0 ? C : h[3] === '"' ? Bt : Ht) : o === Bt || o === Ht ? o = C : o === jt || o === Lt ? o = I : (o = C, s = void 0);
|
853
853
|
const u = o === C && r[a + 1].startsWith("/>") ? " " : "";
|
854
|
-
n += o ===
|
854
|
+
n += o === I ? c + Le : p >= 0 ? (i.push(l), c.slice(0, p) + re + c.slice(p) + _ + u) : c + _ + (p === -2 ? a : u);
|
855
855
|
}
|
856
856
|
return [ae(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
|
857
857
|
};
|
@@ -861,11 +861,11 @@ class H {
|
|
861
861
|
this.parts = [];
|
862
862
|
let n = 0, o = 0;
|
863
863
|
const a = t.length - 1, c = this.parts, [l, h] = De(t, e);
|
864
|
-
if (this.el = H.createElement(l, i),
|
864
|
+
if (this.el = H.createElement(l, i), x.currentNode = this.el.content, e === 2) {
|
865
865
|
const p = this.el.content.firstChild;
|
866
866
|
p.replaceWith(...p.childNodes);
|
867
867
|
}
|
868
|
-
for (; (s =
|
868
|
+
for (; (s = x.nextNode()) !== null && c.length < a; ) {
|
869
869
|
if (s.nodeType === 1) {
|
870
870
|
if (s.hasAttributes())
|
871
871
|
for (const p of s.getAttributeNames())
|
@@ -879,7 +879,7 @@ class H {
|
|
879
879
|
if (f > 0) {
|
880
880
|
s.textContent = J ? J.emptyScript : "";
|
881
881
|
for (let u = 0; u < f; u++)
|
882
|
-
s.append(p[u], j()),
|
882
|
+
s.append(p[u], j()), x.nextNode(), c.push({ type: 2, index: ++n });
|
883
883
|
s.append(p[f], j());
|
884
884
|
}
|
885
885
|
}
|
@@ -901,7 +901,7 @@ class H {
|
|
901
901
|
}
|
902
902
|
function R(r, t, e = r, i) {
|
903
903
|
var o, a;
|
904
|
-
if (t ===
|
904
|
+
if (t === O)
|
905
905
|
return t;
|
906
906
|
let s = i !== void 0 ? (o = e._$Co) == null ? void 0 : o[i] : e._$Cl;
|
907
907
|
const n = L(t) ? void 0 : t._$litDirective$;
|
@@ -919,16 +919,16 @@ class ze {
|
|
919
919
|
}
|
920
920
|
u(t) {
|
921
921
|
const { el: { content: e }, parts: i } = this._$AD, s = ((t == null ? void 0 : t.creationScope) ?? E).importNode(e, !0);
|
922
|
-
|
923
|
-
let n =
|
922
|
+
x.currentNode = s;
|
923
|
+
let n = x.nextNode(), o = 0, a = 0, c = i[0];
|
924
924
|
for (; c !== void 0; ) {
|
925
925
|
if (o === c.index) {
|
926
926
|
let l;
|
927
927
|
c.type === 2 ? l = new D(n, n.nextSibling, this, t) : c.type === 1 ? l = new c.ctor(n, c.name, c.strings, this, t) : c.type === 6 && (l = new qe(n, this, t)), this._$AV.push(l), c = i[++a];
|
928
928
|
}
|
929
|
-
o !== (c == null ? void 0 : c.index) && (n =
|
929
|
+
o !== (c == null ? void 0 : c.index) && (n = x.nextNode(), o++);
|
930
930
|
}
|
931
|
-
return
|
931
|
+
return x.currentNode = E, s;
|
932
932
|
}
|
933
933
|
p(t) {
|
934
934
|
let e = 0;
|
@@ -956,7 +956,7 @@ class D {
|
|
956
956
|
return this._$AB;
|
957
957
|
}
|
958
958
|
_$AI(t, e = this) {
|
959
|
-
t = R(this, t, e), L(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !==
|
959
|
+
t = R(this, t, e), L(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== O && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : He(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 tt {
|
|
1015
1015
|
const n = this.strings;
|
1016
1016
|
let o = !1;
|
1017
1017
|
if (n === void 0)
|
1018
|
-
t = R(this, t, e, 0), o = !L(t) || t !== this._$AH && t !==
|
1018
|
+
t = R(this, t, e, 0), o = !L(t) || t !== this._$AH && t !== O, o && (this._$AH = t);
|
1019
1019
|
else {
|
1020
1020
|
const a = t;
|
1021
1021
|
let c, l;
|
1022
1022
|
for (t = n[0], c = 0; c < n.length - 1; c++)
|
1023
|
-
l = R(this, a[i + c], e, c), l ===
|
1023
|
+
l = R(this, a[i + c], e, c), l === O && (l = this._$AH[c]), o || (o = !L(l) || l !== this._$AH[c]), l === d ? t = d : t !== d && (t += (l ?? "") + n[c + 1]), this._$AH[c] = l;
|
1024
1024
|
}
|
1025
1025
|
o && !s && this.O(t);
|
1026
1026
|
}
|
@@ -1049,7 +1049,7 @@ class Ge extends tt {
|
|
1049
1049
|
super(t, e, i, s, n), this.type = 5;
|
1050
1050
|
}
|
1051
1051
|
_$AI(t, e = this) {
|
1052
|
-
if ((t = R(this, t, e, 0) ?? d) ===
|
1052
|
+
if ((t = R(this, t, e, 0) ?? d) === O)
|
1053
1053
|
return;
|
1054
1054
|
const i = this._$AH, s = t === d && i !== d || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, n = t !== d && (i === d || s);
|
1055
1055
|
s && this.element.removeEventListener(this.name, this, i), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
@@ -1086,7 +1086,7 @@ const Ve = (r, t, e) => {
|
|
1086
1086
|
* Copyright 2017 Google LLC
|
1087
1087
|
* SPDX-License-Identifier: BSD-3-Clause
|
1088
1088
|
*/
|
1089
|
-
let $ = class extends
|
1089
|
+
let $ = class extends P {
|
1090
1090
|
constructor() {
|
1091
1091
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
1092
1092
|
}
|
@@ -1108,7 +1108,7 @@ let $ = class extends O {
|
|
1108
1108
|
super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
|
1109
1109
|
}
|
1110
1110
|
render() {
|
1111
|
-
return
|
1111
|
+
return O;
|
1112
1112
|
}
|
1113
1113
|
};
|
1114
1114
|
var Yt;
|
@@ -1529,7 +1529,7 @@ const hi = At(class extends ce {
|
|
1529
1529
|
const o = !!t[n];
|
1530
1530
|
o === this.it.has(n) || (s = this.st) != null && s.has(n) || (o ? (e.add(n), this.it.add(n)) : (e.remove(n), this.it.delete(n)));
|
1531
1531
|
}
|
1532
|
-
return
|
1532
|
+
return O;
|
1533
1533
|
}
|
1534
1534
|
}), G = (r, t, e) => {
|
1535
1535
|
r && e.style.setProperty(t, r);
|
@@ -1810,7 +1810,7 @@ it([
|
|
1810
1810
|
it([
|
1811
1811
|
z()
|
1812
1812
|
], A.prototype, "icon", 2);
|
1813
|
-
var fi = Object.defineProperty, gi = Object.getOwnPropertyDescriptor,
|
1813
|
+
var fi = Object.defineProperty, gi = Object.getOwnPropertyDescriptor, S = (r, t, e, i) => {
|
1814
1814
|
for (var s = i > 1 ? void 0 : i ? gi(t, e) : t, n = r.length - 1, o; n >= 0; n--)
|
1815
1815
|
(o = r[n]) && (s = (i ? o(t, e, s) : o(s)) || s);
|
1816
1816
|
return i && s && fi(t, e, s), s;
|
@@ -1854,19 +1854,19 @@ const mi = (r) => {
|
|
1854
1854
|
box-sizing: border-box;
|
1855
1855
|
}
|
1856
1856
|
`
|
1857
|
-
],
|
1857
|
+
], S([
|
1858
1858
|
m()
|
1859
|
-
], t.prototype, "properties", 2),
|
1859
|
+
], t.prototype, "properties", 2), S([
|
1860
1860
|
m()
|
1861
|
-
], t.prototype, "context", 2),
|
1861
|
+
], t.prototype, "context", 2), S([
|
1862
1862
|
m()
|
1863
|
-
], t.prototype, "layout", 2),
|
1863
|
+
], t.prototype, "layout", 2), S([
|
1864
1864
|
m()
|
1865
|
-
], t.prototype, "name", 2),
|
1865
|
+
], t.prototype, "name", 2), S([
|
1866
1866
|
m()
|
1867
|
-
], t.prototype, "type", 2),
|
1867
|
+
], t.prototype, "type", 2), S([
|
1868
1868
|
m({ attribute: !1 })
|
1869
|
-
], t.prototype, "application", 2),
|
1869
|
+
], t.prototype, "application", 2), S([
|
1870
1870
|
m({ attribute: !1 })
|
1871
1871
|
], t.prototype, "parent", 2), t;
|
1872
1872
|
};
|
@@ -2113,6 +2113,21 @@ const fe = class {
|
|
2113
2113
|
let ge = fe;
|
2114
2114
|
ge.ResolveWebComponentName = (r) => `ace-${r}`;
|
2115
2115
|
class wi {
|
2116
|
+
set(t, e) {
|
2117
|
+
sessionStorage.setItem(t, e);
|
2118
|
+
}
|
2119
|
+
get(t) {
|
2120
|
+
const e = sessionStorage.getItem(t);
|
2121
|
+
if (!e)
|
2122
|
+
return null;
|
2123
|
+
try {
|
2124
|
+
return JSON.parse(e);
|
2125
|
+
} catch {
|
2126
|
+
return e;
|
2127
|
+
}
|
2128
|
+
}
|
2129
|
+
}
|
2130
|
+
class Ai {
|
2116
2131
|
constructor() {
|
2117
2132
|
this.texts = /* @__PURE__ */ new Map();
|
2118
2133
|
}
|
@@ -2127,9 +2142,9 @@ class wi {
|
|
2127
2142
|
return this.texts.get(t) || e;
|
2128
2143
|
}
|
2129
2144
|
}
|
2130
|
-
class
|
2145
|
+
class Ci {
|
2131
2146
|
constructor(t, e, i, s) {
|
2132
|
-
this.name = t, this.container = e, this.settings = i, this.options = s, this.platform = new _i(), this.texts = new wi(), this.renderStrategy = y.Inline, this.anchor = "BottomRight", this.autoActivate = !1, this.plugins = [], this.componentResolver = new ge(), this.components = [], this.trigger = null, this.renderStrategy = this.options.renderStrategy || y.Inline, this.triggerIcon = this.options.triggerIcon, typeof s.autoActivate == "boolean" && (this.autoActivate = s.autoActivate), s.anchor && (this.anchor = s.anchor), this.container.register("$settings", i), this.texts.loadTexts(i.texts || {});
|
2147
|
+
this.name = t, this.container = e, this.settings = i, this.options = s, this.platform = new _i(), this.texts = new Ai(), this.storage = new wi(), this.renderStrategy = y.Inline, this.anchor = "BottomRight", this.autoActivate = !1, this.plugins = [], this.componentResolver = new ge(), this.components = [], this.trigger = null, this.renderStrategy = this.options.renderStrategy || y.Inline, this.triggerIcon = this.options.triggerIcon, typeof s.autoActivate == "boolean" && (this.autoActivate = s.autoActivate), s.anchor && (this.anchor = s.anchor), this.container.register("$settings", i), this.texts.loadTexts(i.texts || {});
|
2133
2148
|
}
|
2134
2149
|
async activate() {
|
2135
2150
|
if (await this.loadPlugins(), await this.componentResolver.loadComponents(), this.root = this.platform.createComponentModel(this.settings, this), this.container.setState(ee.Ready), this.autoActivate) {
|
@@ -2151,10 +2166,10 @@ class Ai {
|
|
2151
2166
|
return this.plugins.push(t), this;
|
2152
2167
|
}
|
2153
2168
|
appendToDOM() {
|
2154
|
-
this.root && (this.root.classList.add("expanded"), this.root.classList.remove("hidden"), document.body.appendChild(this.root));
|
2169
|
+
this.root && (this.root.classList.add("expanded"), this.root.classList.remove("hidden"), document.body.appendChild(this.root)), this.storage.set("open", "true");
|
2155
2170
|
}
|
2156
2171
|
hide() {
|
2157
|
-
this.root && (this.root.classList.add("hidden"), this.root.classList.remove("expanded"));
|
2172
|
+
this.root && (this.root.classList.add("hidden"), this.root.classList.remove("expanded")), this.storage.set("open", "false");
|
2158
2173
|
}
|
2159
2174
|
mute() {
|
2160
2175
|
this.settings.branding.other.disableSound = !0;
|
@@ -2188,7 +2203,7 @@ class Ai {
|
|
2188
2203
|
render() {
|
2189
2204
|
if (this.renderStrategy === y.Trigger) {
|
2190
2205
|
const t = new A();
|
2191
|
-
return t.application = this, this.trigger = t, t;
|
2206
|
+
return t.application = this, this.trigger = t, this.storage.get("open") && this.trigger.toggleActive(), t;
|
2192
2207
|
}
|
2193
2208
|
return this.root;
|
2194
2209
|
}
|
@@ -2226,7 +2241,7 @@ const me = class {
|
|
2226
2241
|
};
|
2227
2242
|
let yt = me;
|
2228
2243
|
yt.endpoint = "https://widgets.ace.teliacompany.net/api";
|
2229
|
-
class
|
2244
|
+
class Si {
|
2230
2245
|
constructor() {
|
2231
2246
|
this.applications = [], this.container = new Rt("environment", this), setTimeout(() => {
|
2232
2247
|
this.notifyWidgetsOfCreation();
|
@@ -2253,7 +2268,7 @@ class Ci {
|
|
2253
2268
|
});
|
2254
2269
|
}
|
2255
2270
|
registerApp(t, e, i) {
|
2256
|
-
const s = new Rt(t, this), n = new
|
2271
|
+
const s = new Rt(t, this), n = new Ci(t, s, e, i);
|
2257
2272
|
this.applications.push(n);
|
2258
2273
|
}
|
2259
2274
|
plugin(t) {
|
@@ -2289,7 +2304,7 @@ class xi {
|
|
2289
2304
|
}
|
2290
2305
|
async bootstrap(t) {
|
2291
2306
|
var e;
|
2292
|
-
this.url && await this.load(this.url), this.environment = new
|
2307
|
+
this.url && await this.load(this.url), this.environment = new Si(), this.addGlobal(this.environment);
|
2293
2308
|
for await (const i of this.configurations) {
|
2294
2309
|
const s = await this.httpClient.getWidget(i.widgetId);
|
2295
2310
|
s && ((e = this.environment) == null || e.registerApp(s.name, s.config, {
|
@@ -2305,10 +2320,10 @@ class xi {
|
|
2305
2320
|
globalThis.widgets = t;
|
2306
2321
|
}
|
2307
2322
|
}
|
2308
|
-
var
|
2309
|
-
for (var s = i > 1 ? void 0 : i ?
|
2323
|
+
var Ei = Object.defineProperty, Oi = Object.getOwnPropertyDescriptor, St = (r, t, e, i) => {
|
2324
|
+
for (var s = i > 1 ? void 0 : i ? Oi(t, e) : t, n = r.length - 1, o; n >= 0; n--)
|
2310
2325
|
(o = r[n]) && (s = (i ? o(t, e, s) : o(s)) || s);
|
2311
|
-
return i && s &&
|
2326
|
+
return i && s && Ei(t, e, s), s;
|
2312
2327
|
};
|
2313
2328
|
class F extends $ {
|
2314
2329
|
constructor() {
|
@@ -2349,13 +2364,13 @@ F.styles = [
|
|
2349
2364
|
}
|
2350
2365
|
`
|
2351
2366
|
];
|
2352
|
-
|
2367
|
+
St([
|
2353
2368
|
m({ attribute: !0 })
|
2354
2369
|
], F.prototype, "name", 2);
|
2355
|
-
|
2370
|
+
St([
|
2356
2371
|
z()
|
2357
2372
|
], F.prototype, "widget", 2);
|
2358
|
-
|
2373
|
+
St([
|
2359
2374
|
z()
|
2360
2375
|
], F.prototype, "status", 2);
|
2361
2376
|
customElements.get("ace-trigger-slot") || customElements.define("ace-trigger-slot", et);
|
@@ -2363,17 +2378,18 @@ customElements.get("ace-trigger") || customElements.define("ace-trigger", A);
|
|
2363
2378
|
customElements.get("ace-unresolved-component") || customElements.define("ace-unresolved-component", Ct);
|
2364
2379
|
customElements.get("ace-wrapper") || customElements.define("ace-wrapper", rt);
|
2365
2380
|
customElements.get("ace-widget") || customElements.define("ace-widget", F);
|
2366
|
-
const
|
2381
|
+
const Ii = async (r, t) => {
|
2367
2382
|
await new xi(r).bootstrap(t);
|
2368
2383
|
};
|
2369
2384
|
export {
|
2370
2385
|
F as AceWidget,
|
2371
|
-
|
2386
|
+
Ci as Application,
|
2372
2387
|
Rt as Container,
|
2373
|
-
|
2388
|
+
Si as Environment,
|
2374
2389
|
yt as HttpClient,
|
2375
2390
|
xi as Site,
|
2391
|
+
wi as StorageService,
|
2376
2392
|
A as Trigger,
|
2377
2393
|
mi as WidgetComponent,
|
2378
|
-
|
2394
|
+
Ii as bootstrap
|
2379
2395
|
};
|
package/models/application.d.ts
CHANGED
@@ -2,6 +2,7 @@ import { Trigger } from '../components/trigger.component';
|
|
2
2
|
import { WidgetComponentType } from '../components/widget.component';
|
3
3
|
import { Wrapper } from '../components/wrapper.component';
|
4
4
|
import { ComponentPlatform } from '../services/component-platform';
|
5
|
+
import { StorageService } from '../services/storage.service';
|
5
6
|
import { TextsService } from '../services/texts.service';
|
6
7
|
import { ApplicationOptions, PluginType, RenderStrategy, TriggerIcon, WidgetAnchor, WidgetConfig } from '../types';
|
7
8
|
import { Container } from './container';
|
@@ -12,6 +13,7 @@ export declare class Application {
|
|
12
13
|
private options;
|
13
14
|
platform: ComponentPlatform;
|
14
15
|
texts: TextsService;
|
16
|
+
storage: StorageService;
|
15
17
|
root?: Wrapper;
|
16
18
|
renderStrategy: RenderStrategy;
|
17
19
|
triggerIcon?: TriggerIcon;
|
package/package.json
CHANGED