@telia-ace/widget-core-flamingo 1.1.33-rc.1 → 1.1.33

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. package/index.js +12 -12
  2. package/index.mjs +59 -58
  3. package/package.json +1 -1
  4. package/types.d.ts +1 -1
package/index.js CHANGED
@@ -1,20 +1,20 @@
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 B(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 K(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 Kt(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=Kt(function(r){return function(e){r(this),this.message=e?e.length+` errors occurred during unsubscription:
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 K(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 Kt(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=Kt(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 u=gt(p),f=u.next();!f.done;f=u.next()){var g=f.value;try{Et(g)}catch(v){n=n??[],v instanceof nt?n=K(K([],Y(n)),Y(v.errors)):n.push(v)}}}catch(v){i={error:v}}finally{try{f&&!f.done&&(s=u.return)&&s.call(u)}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}(),Jt=tt.EMPTY;function Xt(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 Zt={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,K([r,t],Y(e))):setTimeout.apply(void 0,K([r,t],Y(e)))},clearTimeout:function(r){var t=vt.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(r)},delegate:void 0};function _e(r){vt.setTimeout(function(){throw r})}function Pt(){}function V(r){r()}var Qt=function(r){B(t,r);function t(e){var i=r.call(this)||this;return i.isStopped=!1,e?(i.destination=e,Xt(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),we=Function.prototype.bind;function ot(r,t){return we.call(r,t)}var Ae=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){B(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&&Zt.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 Ae(o),n}return t}(Qt);function F(r){_e(r)}function Se(r){throw r}var xe={closed:!0,next:Pt,error:Se,complete:Pt},Ce=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Ee(r){return r}function Pe(r){return r.length===0?Ee:r.length===1?r[0]:function(e){return r.reduce(function(i,s){return s(i)},e)}}var Ot=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=Te(t)?t:new yt(t,e,i);return V(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[Ce]=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??Zt.Promise)!==null&&t!==void 0?t:Promise}function Oe(r){return r&&b(r.next)&&b(r.error)&&b(r.complete)}function Te(r){return r&&r instanceof Qt||Oe(r)&&Xt(r)}var Ue=Kt(function(r){return function(){r(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),te=function(r){B(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 Ut(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;V(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;V(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;V(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?Jt:(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 Ot;return e.source=this,e},t.create=function(e,i){return new Ut(e,i)},t}(Ot),Ut=function(r){B(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:Jt},t}(te),Re=function(r){B(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 Re("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)}}/**
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 u=gt(p),f=u.next();!f.done;f=u.next()){var g=f.value;try{Et(g)}catch(v){n=n??[],v instanceof nt?n=K(K([],Y(n)),Y(v.errors)):n.push(v)}}}catch(v){i={error:v}}finally{try{f&&!f.done&&(s=u.return)&&s.call(u)}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}(),Jt=tt.EMPTY;function Xt(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 Zt={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,K([r,t],Y(e))):setTimeout.apply(void 0,K([r,t],Y(e)))},clearTimeout:function(r){var t=vt.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(r)},delegate:void 0};function _e(r){vt.setTimeout(function(){throw r})}function Pt(){}function V(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,Xt(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),we=Function.prototype.bind;function ot(r,t){return we.call(r,t)}var Ae=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&&Zt.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 Ae(o),n}return t}(Qt);function F(r){_e(r)}function Se(r){throw r}var xe={closed:!0,next:Pt,error:Se,complete:Pt},Ce=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Ee(r){return r}function Pe(r){return r.length===0?Ee:r.length===1?r[0]:function(e){return r.reduce(function(i,s){return s(i)},e)}}var Ot=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=Te(t)?t:new yt(t,e,i);return V(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[Ce]=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??Zt.Promise)!==null&&t!==void 0?t:Promise}function Oe(r){return r&&b(r.next)&&b(r.error)&&b(r.complete)}function Te(r){return r&&r instanceof Qt||Oe(r)&&Xt(r)}var Re=Kt(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 Re},t.prototype.next=function(e){var i=this;V(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;V(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;V(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?Jt:(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 Ot;return e.source=this,e},t.create=function(e,i){return new Rt(e,i)},t}(Ot),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:Jt},t}(te),Ue=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 Ue("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 q=globalThis,$t=q.ShadowRoot&&(q.ShadyCSS===void 0||q.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,_t=Symbol(),Rt=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=Rt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&Rt.set(e,t))}return t}toString(){return this.cssText}};const ke=r=>new ie(typeof r=="string"?r:r+"",void 0,_t),R=(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)},Ie=(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=q.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=e.cssText,r.appendChild(i)}},kt=$t?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return ke(e)})(r):r;/**
7
+ */const q=globalThis,$t=q.ShadowRoot&&(q.ShadyCSS===void 0||q.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)},Ie=(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=q.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=e.cssText,r.appendChild(i)}},kt=$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:je,defineProperty:Ne,getOwnPropertyDescriptor:Me,getOwnPropertyNames:He,getOwnPropertySymbols:Le,getPrototypeOf:De}=Object,A=globalThis,It=A.trustedTypes,Be=It?It.emptyScript:"",at=A.reactiveElementPolyfillSupport,j=(r,t)=>r,J={toAttribute(r,t){switch(t){case Boolean:r=r?Be: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)=>!je(r,t),jt={attribute:!0,type:String,converter:J,reflect:!1,hasChanged:wt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),A.litPropertyMetadata??(A.litPropertyMetadata=new WeakMap);let O=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=jt){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&&Ne(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:n}=Me(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)??jt}static _$Ei(){if(this.hasOwnProperty(j("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(j("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(j("properties"))){const e=this.properties,i=[...He(e),...Le(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(kt(s))}else t!==void 0&&e.push(kt(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 Ie(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:J).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:J;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){}};O.elementStyles=[],O.shadowRootOptions={mode:"open"},O[j("elementProperties")]=new Map,O[j("finalized")]=new Map,at==null||at({ReactiveElement:O}),(A.reactiveElementVersions??(A.reactiveElementVersions=[])).push("2.0.1");/**
11
+ */const{is:je,defineProperty:Ne,getOwnPropertyDescriptor:Me,getOwnPropertyNames:He,getOwnPropertySymbols:Le,getPrototypeOf:Be}=Object,A=globalThis,It=A.trustedTypes,De=It?It.emptyScript:"",at=A.reactiveElementPolyfillSupport,j=(r,t)=>r,J={toAttribute(r,t){switch(t){case Boolean:r=r?De: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)=>!je(r,t),jt={attribute:!0,type:String,converter:J,reflect:!1,hasChanged:wt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),A.litPropertyMetadata??(A.litPropertyMetadata=new WeakMap);let O=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=jt){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&&Ne(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:n}=Me(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)??jt}static _$Ei(){if(this.hasOwnProperty(j("elementProperties")))return;const t=Be(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(j("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(j("properties"))){const e=this.properties,i=[...He(e),...Le(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(kt(s))}else t!==void 0&&e.push(kt(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 Ie(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:J).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:J;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){}};O.elementStyles=[],O.shadowRootOptions={mode:"open"},O[j("elementProperties")]=new Map,O[j("finalized")]=new Map,at==null||at({ReactiveElement:O}),(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
15
  */const N=globalThis,X=N.trustedTypes,Nt=X?X.createPolicy("lit-html",{createHTML:r=>r}):void 0,re="$lit$",w=`lit$${(Math.random()+"").slice(9)}$`,se="?"+w,ze=`<${se}>`,E=document,H=()=>E.createComment(""),L=r=>r===null||typeof r!="object"&&typeof r!="function",ne=Array.isArray,We=r=>ne(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",ct=`[
16
16
  \f\r]`,I=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Mt=/-->/g,Ht=/>/g,S=RegExp(`>|${ct}(?:([^\\s"'>=/]+)(${ct}*=${ct}*(?:[^
17
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Lt=/'/g,Dt=/"/g,oe=/^(?:script|style|textarea|title)$/i,Fe=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),T=Fe(1),P=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Bt=new WeakMap,C=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 Ge=(r,t)=>{const e=r.length-1,i=[];let s,n=t===2?"<svg>":"",o=I;for(let a=0;a<e;a++){const c=r[a];let l,h,p=-1,u=0;for(;u<c.length&&(o.lastIndex=u,h=o.exec(c),h!==null);)u=o.lastIndex,o===I?h[1]==="!--"?o=Mt:h[1]!==void 0?o=Ht:h[2]!==void 0?(oe.test(h[2])&&(s=RegExp("</"+h[2],"g")),o=S):h[3]!==void 0&&(o=S):o===S?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?S:h[3]==='"'?Dt:Lt):o===Dt||o===Lt?o=S:o===Mt||o===Ht?o=I:(o=S,s=void 0);const f=o===S&&r[a+1].startsWith("/>")?" ":"";n+=o===I?c+ze:p>=0?(i.push(l),c.slice(0,p)+re+c.slice(p)+w+f):c+w+(p===-2?a:f)}return[ae(r,n+(r[e]||"<?>")+(t===2?"</svg>":"")),i]};class D{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]=Ge(t,e);if(this.el=D.createElement(l,i),C.currentNode=this.el.content,e===2){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(s=C.nextNode())!==null&&c.length<a;){if(s.nodeType===1){if(s.hasAttributes())for(const p of s.getAttributeNames())if(p.endsWith(re)){const u=h[o++],f=s.getAttribute(p).split(w),g=/([.?@])?(.*)/.exec(u);c.push({type:1,index:n,name:g[2],strings:f,ctor:g[1]==="."?qe:g[1]==="?"?Ye: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),u=p.length-1;if(u>0){s.textContent=X?X.emptyScript:"";for(let f=0;f<u;f++)s.append(p[f],H()),C.nextNode(),c.push({type:2,index:++n});s.append(p[u],H())}}}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 U(r,t,e=r,i){var o,a;if(t===P)return t;let s=i!==void 0?(o=e._$Co)==null?void 0:o[i]: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(r),s._$AT(r,e,i)),i!==void 0?(e._$Co??(e._$Co=[]))[i]=s:e._$Cl=s),s!==void 0&&(t=U(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);C.currentNode=s;let n=C.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=C.nextNode(),o++)}return C.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=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):We(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.$(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=D.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=Bt.get(t.strings);return e===void 0&&Bt.set(t.strings,e=new D(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(H()),this.k(H()),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=U(this,t,e,0),o=!L(t)||t!==this._$AH&&t!==P,o&&(this._$AH=t);else{const a=t;let c,l;for(t=n[0],c=0;c<n.length-1;c++)l=U(this,a[i+c],e,c),l===P&&(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}o&&!s&&this.O(t)}O(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class qe extends et{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===d?void 0:t}}class Ye 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=U(this,t,e,0)??d)===P)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){U(this,t)}}const lt=N.litHtmlPolyfillSupport;lt==null||lt(D,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(H(),n),n,void 0,e??{})}return s._$AI(r),s};/**
17
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Lt=/'/g,Bt=/"/g,oe=/^(?:script|style|textarea|title)$/i,Fe=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),T=Fe(1),P=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Dt=new WeakMap,C=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 Ge=(r,t)=>{const e=r.length-1,i=[];let s,n=t===2?"<svg>":"",o=I;for(let a=0;a<e;a++){const c=r[a];let l,h,p=-1,u=0;for(;u<c.length&&(o.lastIndex=u,h=o.exec(c),h!==null);)u=o.lastIndex,o===I?h[1]==="!--"?o=Mt:h[1]!==void 0?o=Ht:h[2]!==void 0?(oe.test(h[2])&&(s=RegExp("</"+h[2],"g")),o=S):h[3]!==void 0&&(o=S):o===S?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?S:h[3]==='"'?Bt:Lt):o===Bt||o===Lt?o=S:o===Mt||o===Ht?o=I:(o=S,s=void 0);const f=o===S&&r[a+1].startsWith("/>")?" ":"";n+=o===I?c+ze:p>=0?(i.push(l),c.slice(0,p)+re+c.slice(p)+w+f):c+w+(p===-2?a:f)}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]=Ge(t,e);if(this.el=B.createElement(l,i),C.currentNode=this.el.content,e===2){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(s=C.nextNode())!==null&&c.length<a;){if(s.nodeType===1){if(s.hasAttributes())for(const p of s.getAttributeNames())if(p.endsWith(re)){const u=h[o++],f=s.getAttribute(p).split(w),g=/([.?@])?(.*)/.exec(u);c.push({type:1,index:n,name:g[2],strings:f,ctor:g[1]==="."?qe:g[1]==="?"?Ye: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),u=p.length-1;if(u>0){s.textContent=X?X.emptyScript:"";for(let f=0;f<u;f++)s.append(p[f],H()),C.nextNode(),c.push({type:2,index:++n});s.append(p[u],H())}}}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===P)return t;let s=i!==void 0?(o=e._$Co)==null?void 0:o[i]: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(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);C.currentNode=s;let n=C.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=C.nextNode(),o++)}return C.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),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):We(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.$(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(H()),this.k(H()),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=!L(t)||t!==this._$AH&&t!==P,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===P&&(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}o&&!s&&this.O(t)}O(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class qe extends et{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===d?void 0:t}}class Ye 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)===P)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(H(),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
@@ -26,7 +26,7 @@
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 ti=Object.defineProperty,ei=Object.getOwnPropertyDescriptor,ii=(r,t,e,i)=>{for(var s=i>1?void 0:i?ei(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&&ti(t,e,s),s};class it extends ${constructor(){super(...arguments),this.anchor="bottom-right"}appendChild(t){var e;return(e=this.shadowRoot)==null||e.appendChild(t),t}render(){return this.renderRoot.host.classList.add(this.anchor),d}}it.styles=[R`
29
+ */function W(r){return m({...r,state:!0,attribute:!1})}var ti=Object.defineProperty,ei=Object.getOwnPropertyDescriptor,ii=(r,t,e,i)=>{for(var s=i>1?void 0:i?ei(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&&ti(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;
@@ -110,7 +110,7 @@
110
110
  </svg>
111
111
  </span>
112
112
  </button>
113
- </div>`}}_.styles=[R`
113
+ </div>`}}_.styles=[U`
114
114
  :host {
115
115
  --voca-rem-multiplier: 0.625;
116
116
  --trigger-label-bg: #f5e0ff;
@@ -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 vi=Object.defineProperty,yi=Object.getOwnPropertyDescriptor,x=(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};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=[R`
217
+ `];rt([m({attribute:!1})],_.prototype,"application",2);rt([W()],_.prototype,"active",2);rt([W()],_.prototype,"loaded",2);rt([W()],_.prototype,"icon",2);var vi=Object.defineProperty,yi=Object.getOwnPropertyDescriptor,x=(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};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);
@@ -226,7 +226,7 @@
226
226
  * {
227
227
  box-sizing: border-box;
228
228
  }
229
- `],x([m()],t.prototype,"properties",2),x([m()],t.prototype,"context",2),x([m()],t.prototype,"layout",2),x([m()],t.prototype,"name",2),x([m()],t.prototype,"type",2),x([m({attribute:!1})],t.prototype,"application",2),x([m({attribute:!1})],t.prototype,"parent",2),t};class xt extends fe($){render(){return T`Non resolved component`}}xt.styles=[R`
229
+ `],x([m()],t.prototype,"properties",2),x([m()],t.prototype,"context",2),x([m()],t.prototype,"layout",2),x([m()],t.prototype,"name",2),x([m()],t.prototype,"type",2),x([m({attribute:!1})],t.prototype,"application",2),x([m({attribute:!1})],t.prototype,"parent",2),t};class xt extends fe($){render(){return T`Non resolved component`}}xt.styles=[U`
230
230
  :host {
231
231
  display: block;
232
232
  }
@@ -234,9 +234,9 @@
234
234
  * @license
235
235
  * Copyright 2021 Google LLC
236
236
  * SPDX-License-Identifier: BSD-3-Clause
237
- */function*bi(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||{}),$i=Object.defineProperty,_i=Object.getOwnPropertyDescriptor,wi=(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&&$i(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.renderRoot.host.classList.add(this.application.anchor)),T`<div class="widget-container" ${ue(this.wrapperRef)}>
237
+ */function*bi(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||{}),$i=Object.defineProperty,_i=Object.getOwnPropertyDescriptor,wi=(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&&$i(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
238
  ${bi(this.nodes,t=>t)}
239
- </div>`}}st.styles=R`
239
+ </div>`}}st.styles=U`
240
240
  :host {
241
241
  --font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
242
242
  --spacing-xs: 0.2rem;
@@ -333,7 +333,7 @@
333
333
  opacity: 0;
334
334
  animation: slideDown 0.3s linear;
335
335
  }
336
- `;wi([m({attribute:!1})],st.prototype,"application",2);class Ai{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 u=i(p),f=h[u.definitionId];if(!f){console.error(`No definition found for component type '${u.definitionId}'.`);return}const g=a.createNode(f.type,f.type);g&&(g.name=u.definitionId,g.application=e,f.properties&&g.writeProperties(f.properties),f.context&&g.writeContext(f.context),f.layout&&g.writeLayout(f.layout),c.addChild(g),f.children&&s(a,g,f.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 xt;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 Si{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}}class ve{constructor(t,e,i,s){this.name=t,this.container=e,this.settings=i,this.options=s,this.platform=new Ai,this.texts=new Si,this.renderStrategy=y.Inline,this.anchor="bottom-right",this.autoActivate=!1,this.plugins=[],this.componentResolver=new me,this.components=[],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))}hide(){this.root&&(this.root.classList.add("hidden"),this.root.classList.remove("expanded"))}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(){if(this.renderStrategy===y.Trigger){let t=document.querySelector(`ace-trigger-slot.${this.anchor}`);return t||(t=new it,t.anchor=this.anchor,document.body.appendChild(t)),t}return document.body}render(){if(this.renderStrategy===y.Trigger){const t=new _;return t.application=this,t}return this.root}}const ye=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,triggerIcon:{type:"Telia",content:i.triggerIcon}}})}:null}async getWidget(r){const e=await(await fetch(`${ye.endpoint}/widget/${r}`)).json();return e?{name:e.name,config:JSON.parse(e.configuration)}:null}};let Q=ye;Q.endpoint="https://widgets.ace.teliacompany.net/api";class be{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 ve(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 be,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 xi=Object.defineProperty,Ci=Object.getOwnPropertyDescriptor,Ct=(r,t,e,i)=>{for(var s=i>1?void 0:i?Ci(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&&xi(t,e,s),s};class k 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()}}k.styles=[R`
336
+ `;wi([m({attribute:!1})],st.prototype,"application",2);class Ai{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 u=i(p),f=h[u.definitionId];if(!f){console.error(`No definition found for component type '${u.definitionId}'.`);return}const g=a.createNode(f.type,f.type);g&&(g.name=u.definitionId,g.application=e,f.properties&&g.writeProperties(f.properties),f.context&&g.writeContext(f.context),f.layout&&g.writeLayout(f.layout),c.addChild(g),f.children&&s(a,g,f.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 xt;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 Si{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}}class ve{constructor(t,e,i,s){this.name=t,this.container=e,this.settings=i,this.options=s,this.platform=new Ai,this.texts=new Si,this.renderStrategy=y.Inline,this.anchor="BottomRight",this.autoActivate=!1,this.plugins=[],this.componentResolver=new me,this.components=[],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))}hide(){this.root&&(this.root.classList.add("hidden"),this.root.classList.remove("expanded"))}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,t}return this.root}}const ye=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,triggerIcon:{type:"Telia",content:i.triggerIcon}}})}:null}async getWidget(r){const e=await(await fetch(`${ye.endpoint}/widget/${r}`)).json();return e?{name:e.name,config:JSON.parse(e.configuration)}:null}};let Q=ye;Q.endpoint="https://widgets.ace.teliacompany.net/api";class be{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 ve(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 be,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 xi=Object.defineProperty,Ci=Object.getOwnPropertyDescriptor,Ct=(r,t,e,i)=>{for(var s=i>1?void 0:i?Ci(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&&xi(t,e,s),s};class k 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()}}k.styles=[U`
337
337
  :host {
338
338
  display: block;
339
339
  }
package/index.mjs CHANGED
@@ -6,7 +6,7 @@ var ut = function(r, t) {
6
6
  Object.prototype.hasOwnProperty.call(i, s) && (e[s] = i[s]);
7
7
  }, ut(r, t);
8
8
  };
9
- function D(r, t) {
9
+ function B(r, 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
  ut(r, t);
@@ -204,7 +204,7 @@ function V(r) {
204
204
  r();
205
205
  }
206
206
  var Qt = function(r) {
207
- D(t, r);
207
+ B(t, r);
208
208
  function t(e) {
209
209
  var i = r.call(this) || this;
210
210
  return i.isStopped = !1, e ? (i.destination = e, Xt(e) && e.add(i)) : i.destination = _e, i;
@@ -270,7 +270,7 @@ var be = function() {
270
270
  }
271
271
  }, r;
272
272
  }(), vt = function(r) {
273
- D(t, r);
273
+ B(t, r);
274
274
  function t(e, i, s) {
275
275
  var n = r.call(this) || this, o;
276
276
  if (b(e) || !e)
@@ -392,7 +392,7 @@ var Ee = Kt(function(r) {
392
392
  r(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
393
393
  };
394
394
  }), te = function(r) {
395
- D(t, r);
395
+ B(t, r);
396
396
  function t() {
397
397
  var e = r.call(this) || this;
398
398
  return e.closed = !1, e.currentObservers = null, e.observers = [], e.isStopped = !1, e.hasError = !1, e.thrownError = null, e;
@@ -472,7 +472,7 @@ var Ee = Kt(function(r) {
472
472
  return new Tt(e, i);
473
473
  }, t;
474
474
  }(Pt), Tt = function(r) {
475
- D(t, r);
475
+ B(t, r);
476
476
  function t(e, i) {
477
477
  var s = r.call(this) || this;
478
478
  return s.destination = e, s.source = i, s;
@@ -491,7 +491,7 @@ var Ee = Kt(function(r) {
491
491
  return (s = (i = this.source) === null || i === void 0 ? void 0 : i.subscribe(e)) !== null && s !== void 0 ? s : Jt;
492
492
  }, t;
493
493
  }(te), Pe = function(r) {
494
- D(t, r);
494
+ B(t, r);
495
495
  function t(e) {
496
496
  var i = r.call(this) || this;
497
497
  return i._value = e, i;
@@ -514,7 +514,7 @@ var Ee = Kt(function(r) {
514
514
  r.prototype.next.call(this, this._value = e);
515
515
  }, t;
516
516
  }(te), ee = /* @__PURE__ */ ((r) => (r.Loading = "loading", r.Ready = "ready", r))(ee || {});
517
- class Ut {
517
+ class Rt {
518
518
  constructor(t, e) {
519
519
  this.state = new Pe(
520
520
  "loading"
@@ -539,7 +539,7 @@ class Ut {
539
539
  * Copyright 2019 Google LLC
540
540
  * SPDX-License-Identifier: BSD-3-Clause
541
541
  */
542
- const Y = globalThis, bt = Y.ShadowRoot && (Y.ShadyCSS === void 0 || Y.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, $t = Symbol(), Rt = /* @__PURE__ */ new WeakMap();
542
+ const Y = globalThis, bt = Y.ShadowRoot && (Y.ShadyCSS === void 0 || Y.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, $t = Symbol(), Ut = /* @__PURE__ */ new WeakMap();
543
543
  let ie = class {
544
544
  constructor(t, e, i) {
545
545
  if (this._$cssResult$ = !0, i !== $t)
@@ -551,7 +551,7 @@ let ie = class {
551
551
  const e = this.t;
552
552
  if (bt && t === void 0) {
553
553
  const i = e !== void 0 && e.length === 1;
554
- i && (t = Rt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Rt.set(e, t));
554
+ i && (t = Ut.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Ut.set(e, t));
555
555
  }
556
556
  return t;
557
557
  }
@@ -559,7 +559,7 @@ let ie = class {
559
559
  return this.cssText;
560
560
  }
561
561
  };
562
- const Oe = (r) => new ie(typeof r == "string" ? r : r + "", void 0, $t), R = (r, ...t) => {
562
+ const Oe = (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;
@@ -587,7 +587,7 @@ const Oe = (r) => new ie(typeof r == "string" ? r : r + "", void 0, $t), R = (r,
587
587
  * Copyright 2017 Google LLC
588
588
  * SPDX-License-Identifier: BSD-3-Clause
589
589
  */
590
- const { is: Ue, defineProperty: Re, getOwnPropertyDescriptor: ke, getOwnPropertyNames: Ie, getOwnPropertySymbols: Ne, getPrototypeOf: je } = Object, w = globalThis, It = w.trustedTypes, Me = It ? It.emptyScript : "", ot = w.reactiveElementPolyfillSupport, I = (r, t) => r, J = { toAttribute(r, t) {
590
+ const { is: Re, defineProperty: Ue, getOwnPropertyDescriptor: ke, getOwnPropertyNames: Ie, getOwnPropertySymbols: Ne, getPrototypeOf: je } = Object, w = globalThis, It = w.trustedTypes, Me = It ? It.emptyScript : "", ot = w.reactiveElementPolyfillSupport, I = (r, t) => r, J = { toAttribute(r, t) {
591
591
  switch (t) {
592
592
  case Boolean:
593
593
  r = r ? Me : null;
@@ -615,7 +615,7 @@ const { is: Ue, defineProperty: Re, getOwnPropertyDescriptor: ke, getOwnProperty
615
615
  }
616
616
  }
617
617
  return e;
618
- } }, _t = (r, t) => !Ue(r, t), Nt = { attribute: !0, type: String, converter: J, reflect: !1, hasChanged: _t };
618
+ } }, _t = (r, t) => !Re(r, t), Nt = { attribute: !0, type: String, converter: J, reflect: !1, hasChanged: _t };
619
619
  Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), w.litPropertyMetadata ?? (w.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
620
620
  let O = class extends HTMLElement {
621
621
  static addInitializer(t) {
@@ -627,7 +627,7 @@ let O = class extends HTMLElement {
627
627
  static createProperty(t, e = Nt) {
628
628
  if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
629
629
  const i = Symbol(), s = this.getPropertyDescriptor(t, i, e);
630
- s !== void 0 && Re(this.prototype, t, s);
630
+ s !== void 0 && Ue(this.prototype, t, s);
631
631
  }
632
632
  }
633
633
  static getPropertyDescriptor(t, e, i) {
@@ -834,34 +834,34 @@ O.elementStyles = [], O.shadowRootOptions = { mode: "open" }, O[I("elementProper
834
834
  * Copyright 2017 Google LLC
835
835
  * SPDX-License-Identifier: BSD-3-Clause
836
836
  */
837
- const N = globalThis, X = N.trustedTypes, jt = X ? X.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, re = "$lit$", _ = `lit$${(Math.random() + "").slice(9)}$`, se = "?" + _, He = `<${se}>`, E = document, M = () => E.createComment(""), H = (r) => r === null || typeof r != "object" && typeof r != "function", ne = Array.isArray, Le = (r) => ne(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", at = `[
838
- \f\r]`, k = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Mt = /-->/g, Ht = />/g, S = RegExp(`>|${at}(?:([^\\s"'>=/]+)(${at}*=${at}*(?:[^
839
- \f\r"'\`<>=]|("|')|))|$)`, "g"), Lt = /'/g, Dt = /"/g, oe = /^(?:script|style|textarea|title)$/i, De = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), T = De(1), P = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), Bt = /* @__PURE__ */ new WeakMap(), C = E.createTreeWalker(E, 129);
837
+ const N = globalThis, X = N.trustedTypes, jt = X ? X.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, re = "$lit$", _ = `lit$${(Math.random() + "").slice(9)}$`, se = "?" + _, Le = `<${se}>`, E = document, M = () => 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]`, k = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Mt = /-->/g, Lt = />/g, S = 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), P = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), Dt = /* @__PURE__ */ new WeakMap(), C = 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");
843
843
  return jt !== void 0 ? jt.createHTML(t) : t;
844
844
  }
845
- const Be = (r, t) => {
845
+ const De = (r, t) => {
846
846
  const e = r.length - 1, i = [];
847
847
  let s, n = t === 2 ? "<svg>" : "", o = k;
848
848
  for (let a = 0; a < e; a++) {
849
849
  const c = r[a];
850
850
  let l, h, p = -1, u = 0;
851
851
  for (; u < c.length && (o.lastIndex = u, h = o.exec(c), h !== null); )
852
- u = o.lastIndex, o === k ? h[1] === "!--" ? o = Mt : h[1] !== void 0 ? o = Ht : h[2] !== void 0 ? (oe.test(h[2]) && (s = RegExp("</" + h[2], "g")), o = S) : h[3] !== void 0 && (o = S) : o === S ? 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 ? S : h[3] === '"' ? Dt : Lt) : o === Dt || o === Lt ? o = S : o === Mt || o === Ht ? o = k : (o = S, s = void 0);
852
+ u = o.lastIndex, o === k ? h[1] === "!--" ? o = Mt : h[1] !== void 0 ? o = Lt : h[2] !== void 0 ? (oe.test(h[2]) && (s = RegExp("</" + h[2], "g")), o = S) : h[3] !== void 0 && (o = S) : o === S ? 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 ? S : h[3] === '"' ? Bt : Ht) : o === Bt || o === Ht ? o = S : o === Mt || o === Lt ? o = k : (o = S, s = void 0);
853
853
  const f = o === S && r[a + 1].startsWith("/>") ? " " : "";
854
- n += o === k ? c + He : p >= 0 ? (i.push(l), c.slice(0, p) + re + c.slice(p) + _ + f) : c + _ + (p === -2 ? a : f);
854
+ n += o === k ? c + Le : p >= 0 ? (i.push(l), c.slice(0, p) + re + c.slice(p) + _ + f) : c + _ + (p === -2 ? a : f);
855
855
  }
856
856
  return [ae(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
857
857
  };
858
- class L {
858
+ class H {
859
859
  constructor({ strings: t, _$litType$: e }, i) {
860
860
  let s;
861
861
  this.parts = [];
862
862
  let n = 0, o = 0;
863
- const a = t.length - 1, c = this.parts, [l, h] = Be(t, e);
864
- if (this.el = L.createElement(l, i), C.currentNode = this.el.content, e === 2) {
863
+ const a = t.length - 1, c = this.parts, [l, h] = De(t, e);
864
+ if (this.el = H.createElement(l, i), C.currentNode = this.el.content, e === 2) {
865
865
  const p = this.el.content.firstChild;
866
866
  p.replaceWith(...p.childNodes);
867
867
  }
@@ -899,13 +899,13 @@ class L {
899
899
  return i.innerHTML = t, i;
900
900
  }
901
901
  }
902
- function U(r, t, e = r, i) {
902
+ function R(r, t, e = r, i) {
903
903
  var o, a;
904
904
  if (t === P)
905
905
  return t;
906
906
  let s = i !== void 0 ? (o = e._$Co) == null ? void 0 : o[i] : e._$Cl;
907
- const n = H(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(r), s._$AT(r, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = s : e._$Cl = s), s !== void 0 && (t = U(r, s._$AS(r, t.values), s, i)), t;
907
+ const n = L(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(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;
909
909
  }
910
910
  class ze {
911
911
  constructor(t, e) {
@@ -924,7 +924,7 @@ class ze {
924
924
  for (; c !== void 0; ) {
925
925
  if (o === c.index) {
926
926
  let l;
927
- c.type === 2 ? l = new B(n, n.nextSibling, this, t) : c.type === 1 ? l = new c.ctor(n, c.name, c.strings, this, t) : c.type === 6 && (l = new Ve(n, this, t)), this._$AV.push(l), c = i[++a];
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 Ve(n, this, t)), this._$AV.push(l), c = i[++a];
928
928
  }
929
929
  o !== (c == null ? void 0 : c.index) && (n = C.nextNode(), o++);
930
930
  }
@@ -936,7 +936,7 @@ class ze {
936
936
  i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
937
937
  }
938
938
  }
939
- class B {
939
+ class D {
940
940
  get _$AU() {
941
941
  var t;
942
942
  return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
@@ -956,7 +956,7 @@ class B {
956
956
  return this._$AB;
957
957
  }
958
958
  _$AI(t, e = this) {
959
- t = U(this, t, e), H(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) : Le(t) ? this.T(t) : this._(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 !== P && 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);
@@ -965,11 +965,11 @@ class B {
965
965
  this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
966
966
  }
967
967
  _(t) {
968
- this._$AH !== d && H(this._$AH) ? this._$AA.nextSibling.data = t : this.$(E.createTextNode(t)), this._$AH = t;
968
+ this._$AH !== d && L(this._$AH) ? this._$AA.nextSibling.data = t : this.$(E.createTextNode(t)), this._$AH = t;
969
969
  }
970
970
  g(t) {
971
971
  var n;
972
- const { values: e, _$litType$: i } = t, s = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = L.createElement(ae(i.h, i.h[0]), this.options)), i);
972
+ const { values: e, _$litType$: i } = t, s = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = H.createElement(ae(i.h, i.h[0]), this.options)), i);
973
973
  if (((n = this._$AH) == null ? void 0 : n._$AD) === s)
974
974
  this._$AH.p(e);
975
975
  else {
@@ -978,15 +978,15 @@ class B {
978
978
  }
979
979
  }
980
980
  _$AC(t) {
981
- let e = Bt.get(t.strings);
982
- return e === void 0 && Bt.set(t.strings, e = new L(t)), e;
981
+ let e = Dt.get(t.strings);
982
+ return e === void 0 && Dt.set(t.strings, e = new H(t)), e;
983
983
  }
984
984
  T(t) {
985
985
  ne(this._$AH) || (this._$AH = [], this._$AR());
986
986
  const e = this._$AH;
987
987
  let i, s = 0;
988
988
  for (const n of t)
989
- s === e.length ? e.push(i = new B(this.k(M()), this.k(M()), this, this.options)) : i = e[s], i._$AI(n), s++;
989
+ s === e.length ? e.push(i = new D(this.k(M()), this.k(M()), this, this.options)) : i = e[s], i._$AI(n), s++;
990
990
  s < e.length && (this._$AR(i && i._$AB.nextSibling, s), e.length = s);
991
991
  }
992
992
  _$AR(t = this._$AA.nextSibling, e) {
@@ -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 = U(this, t, e, 0), o = !H(t) || t !== this._$AH && t !== P, o && (this._$AH = t);
1018
+ t = R(this, t, e, 0), o = !L(t) || t !== this._$AH && t !== P, 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 = U(this, a[i + c], e, c), l === P && (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;
1023
+ l = R(this, a[i + c], e, c), l === P && (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 = U(this, t, e, 0) ?? d) === P)
1052
+ if ((t = R(this, t, e, 0) ?? d) === P)
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;
@@ -1067,17 +1067,17 @@ class Ve {
1067
1067
  return this._$AM._$AU;
1068
1068
  }
1069
1069
  _$AI(t) {
1070
- U(this, t);
1070
+ R(this, t);
1071
1071
  }
1072
1072
  }
1073
1073
  const ct = N.litHtmlPolyfillSupport;
1074
- ct == null || ct(L, B), (N.litHtmlVersions ?? (N.litHtmlVersions = [])).push("3.0.2");
1074
+ ct == null || ct(H, D), (N.litHtmlVersions ?? (N.litHtmlVersions = [])).push("3.0.2");
1075
1075
  const Ye = (r, t, e) => {
1076
1076
  const i = (e == null ? void 0 : e.renderBefore) ?? t;
1077
1077
  let s = i._$litPart$;
1078
1078
  if (s === void 0) {
1079
1079
  const n = (e == null ? void 0 : e.renderBefore) ?? null;
1080
- i._$litPart$ = s = new B(t.insertBefore(M(), n), n, void 0, e ?? {});
1080
+ i._$litPart$ = s = new D(t.insertBefore(M(), n), n, void 0, e ?? {});
1081
1081
  }
1082
1082
  return s._$AI(r), s;
1083
1083
  };
@@ -1163,18 +1163,18 @@ var Je = Object.defineProperty, Xe = Object.getOwnPropertyDescriptor, Ze = (r, t
1163
1163
  };
1164
1164
  class et extends $ {
1165
1165
  constructor() {
1166
- super(...arguments), this.anchor = "bottom-right";
1166
+ super(...arguments), this.anchor = "BottomRight";
1167
1167
  }
1168
1168
  appendChild(t) {
1169
1169
  var e;
1170
1170
  return (e = this.shadowRoot) == null || e.appendChild(t), t;
1171
1171
  }
1172
1172
  render() {
1173
- return this.renderRoot.host.classList.add(this.anchor), d;
1173
+ return this.anchor === "BottomLeft" ? this.renderRoot.host.classList.add("bottom-left") : this.anchor === "BottomRight" && this.renderRoot.host.classList.add("bottom-right"), d;
1174
1174
  }
1175
1175
  }
1176
1176
  et.styles = [
1177
- R`
1177
+ U`
1178
1178
  :host {
1179
1179
  position: fixed;
1180
1180
  display: flex;
@@ -1694,7 +1694,7 @@ class A extends $ {
1694
1694
  }
1695
1695
  }
1696
1696
  A.styles = [
1697
- R`
1697
+ U`
1698
1698
  :host {
1699
1699
  --voca-rem-multiplier: 0.625;
1700
1700
  --trigger-label-bg: #f5e0ff;
@@ -1843,7 +1843,7 @@ const gi = (r) => {
1843
1843
  }
1844
1844
  return t.styles = [
1845
1845
  // (superClass as unknown as typeof LitElement).styles ?? [],
1846
- R`
1846
+ U`
1847
1847
  :host {
1848
1848
  font-family: var(--font-family);
1849
1849
  grid-column: span var(--width);
@@ -1878,7 +1878,7 @@ class St extends gi($) {
1878
1878
  }
1879
1879
  }
1880
1880
  St.styles = [
1881
- R`
1881
+ U`
1882
1882
  :host {
1883
1883
  display: block;
1884
1884
  }
@@ -1926,12 +1926,12 @@ class rt extends $ {
1926
1926
  this.applyBranding(), this.applyStyles();
1927
1927
  }
1928
1928
  render() {
1929
- return this.application.renderStrategy === y.Trigger && (this.renderRoot.host.classList.add("floating"), this.renderRoot.host.classList.add(this.application.anchor)), T`<div class="widget-container" ${ue(this.wrapperRef)}>
1929
+ 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)}>
1930
1930
  ${mi(this.nodes, (t) => t)}
1931
1931
  </div>`;
1932
1932
  }
1933
1933
  }
1934
- rt.styles = R`
1934
+ rt.styles = U`
1935
1935
  :host {
1936
1936
  --font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
1937
1937
  --spacing-xs: 0.2rem;
@@ -2128,7 +2128,7 @@ class _i {
2128
2128
  }
2129
2129
  class wi {
2130
2130
  constructor(t, e, i, s) {
2131
- this.name = t, this.container = e, this.settings = i, this.options = s, this.platform = new $i(), this.texts = new _i(), this.renderStrategy = y.Inline, this.anchor = "bottom-right", this.autoActivate = !1, this.plugins = [], this.componentResolver = new ge(), this.components = [], 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 || {});
2131
+ this.name = t, this.container = e, this.settings = i, this.options = s, this.platform = new $i(), this.texts = new _i(), this.renderStrategy = y.Inline, this.anchor = "BottomRight", this.autoActivate = !1, this.plugins = [], this.componentResolver = new ge(), this.components = [], 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 || {});
2132
2132
  }
2133
2133
  async activate() {
2134
2134
  if (await this.loadPlugins(), await this.componentResolver.loadComponents(), this.root = this.platform.createComponentModel(this.settings, this), this.container.setState(ee.Ready), this.autoActivate) {
@@ -2175,11 +2175,12 @@ class wi {
2175
2175
  return e || null;
2176
2176
  }
2177
2177
  _getTargetElement() {
2178
- if (this.renderStrategy === y.Trigger) {
2179
- let t = document.querySelector(
2180
- `ace-trigger-slot.${this.anchor}`
2178
+ let t = "bottom-right";
2179
+ if (this.anchor === "BottomRight" ? t = "bottom-right" : this.anchor === "BottomLeft" && (t = "bottom-left"), this.renderStrategy === y.Trigger) {
2180
+ let e = document.querySelector(
2181
+ `ace-trigger-slot.${t}`
2181
2182
  );
2182
- return t || (t = new et(), t.anchor = this.anchor, document.body.appendChild(t)), t;
2183
+ return e || (e = new et(), e.anchor = this.anchor, document.body.appendChild(e)), e;
2183
2184
  }
2184
2185
  return document.body;
2185
2186
  }
@@ -2225,7 +2226,7 @@ let yt = me;
2225
2226
  yt.endpoint = "https://widgets.ace.teliacompany.net/api";
2226
2227
  class Ai {
2227
2228
  constructor() {
2228
- this.applications = [], this.container = new Ut("environment", this), setTimeout(() => {
2229
+ this.applications = [], this.container = new Rt("environment", this), setTimeout(() => {
2229
2230
  this.notifyWidgetsOfCreation();
2230
2231
  }, 1e3);
2231
2232
  }
@@ -2250,7 +2251,7 @@ class Ai {
2250
2251
  });
2251
2252
  }
2252
2253
  registerApp(t, e, i) {
2253
- const s = new Ut(t, this), n = new wi(t, s, e, i);
2254
+ const s = new Rt(t, this), n = new wi(t, s, e, i);
2254
2255
  this.applications.push(n);
2255
2256
  }
2256
2257
  plugin(t) {
@@ -2340,7 +2341,7 @@ class W extends $ {
2340
2341
  }
2341
2342
  }
2342
2343
  W.styles = [
2343
- R`
2344
+ U`
2344
2345
  :host {
2345
2346
  display: block;
2346
2347
  }
@@ -2360,17 +2361,17 @@ customElements.get("ace-trigger") || customElements.define("ace-trigger", A);
2360
2361
  customElements.get("ace-unresolved-component") || customElements.define("ace-unresolved-component", St);
2361
2362
  customElements.get("ace-wrapper") || customElements.define("ace-wrapper", rt);
2362
2363
  customElements.get("ace-widget") || customElements.define("ace-widget", W);
2363
- const Ui = async (r, t) => {
2364
+ const Ri = async (r, t) => {
2364
2365
  await new Si(r).bootstrap(t);
2365
2366
  };
2366
2367
  export {
2367
2368
  W as AceWidget,
2368
2369
  wi as Application,
2369
- Ut as Container,
2370
+ Rt as Container,
2370
2371
  Ai as Environment,
2371
2372
  yt as HttpClient,
2372
2373
  Si as Site,
2373
2374
  A as Trigger,
2374
2375
  gi as WidgetComponent,
2375
- Ui as bootstrap
2376
+ Ri as bootstrap
2376
2377
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-core-flamingo",
3
- "version": "1.1.33-rc.1",
3
+ "version": "1.1.33",
4
4
  "dependencies": {
5
5
  "lit": "^3.0.2",
6
6
  "@teliads/icons": "^8.4.0",
package/types.d.ts CHANGED
@@ -52,4 +52,4 @@ export type InitConfig = {
52
52
  httpClient?: IHttpClient;
53
53
  };
54
54
  export type PluginType = (app: Application) => Promise<void>;
55
- export type WidgetAnchor = 'bottom-right' | 'bottom-left';
55
+ export type WidgetAnchor = 'BottomRight' | 'BottomLeft';