@telia-ace/ace-chat-flamingo 1.1.121-rc.1 → 1.1.121
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +8 -8
- package/index.mjs +62 -62
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";var pl=Object.defineProperty;var fl=(n,e,t)=>e in n?pl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var T=(n,e,t)=>fl(n,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Ri=function(n,e){return Ri=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s])},Ri(n,e)};function Le(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Ri(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function gl(n,e,t,i){function s(r){return r instanceof t?r:new t(function(o){o(r)})}return new(t||(t=Promise))(function(r,o){function a(u){try{c(i.next(u))}catch(p){o(p)}}function l(u){try{c(i.throw(u))}catch(p){o(p)}}function c(u){u.done?r(u.value):s(u.value).then(a,l)}c((i=i.apply(n,e||[])).next())})}function Oo(n,e){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,s,r,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(u){return l([c,u])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(t=0)),t;)try{if(i=1,s&&(r=c[0]&2?s.return:c[0]?s.throw||((r=s.return)&&r.call(s),0):s.next)&&!(r=r.call(s,c[1])).done)return r;switch(s=0,r&&(c=[c[0]&2,r.value]),c[0]){case 0:case 1:r=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,s=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(r=t.trys,!(r=r.length>0&&r[r.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!r||c[1]>r[0]&&c[1]<r[3])){t.label=c[1];break}if(c[0]===6&&t.label<r[1]){t.label=r[1],r=c;break}if(r&&t.label<r[2]){t.label=r[2],t.ops.push(c);break}r[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(n,t)}catch(u){c=[6,u],s=0}finally{i=r=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function yt(n){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&n[e],i=0;if(t)return t.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&i>=n.length&&(n=void 0),{value:n&&n[i++],done:!n}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ze(n,e){var t=typeof Symbol=="function"&&n[Symbol.iterator];if(!t)return n;var i=t.call(n),s,r=[],o;try{for(;(e===void 0||e-- >0)&&!(s=i.next()).done;)r.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return r}function Xe(n,e,t){if(t||arguments.length===2)for(var i=0,s=e.length,r;i<s;i++)(r||!(i in e))&&(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return n.concat(r||Array.prototype.slice.call(e))}function gt(n){return this instanceof gt?(this.v=n,this):new gt(n)}function ml(n,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=t.apply(n,e||[]),s,r=[];return s=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),s[Symbol.asyncIterator]=function(){return this},s;function o(g){return function(m){return Promise.resolve(m).then(g,p)}}function a(g,m){i[g]&&(s[g]=function($){return new Promise(function(be,oe){r.push([g,$,be,oe])>1||l(g,$)})},m&&(s[g]=m(s[g])))}function l(g,m){try{c(i[g](m))}catch($){d(r[0][3],$)}}function c(g){g.value instanceof gt?Promise.resolve(g.value.v).then(u,p):d(r[0][2],g)}function u(g){l("next",g)}function p(g){l("throw",g)}function d(g,m){g(m),r.shift(),r.length&&l(r[0][0],r[0][1])}}function vl(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=n[Symbol.asyncIterator],t;return e?e.call(n):(n=typeof yt=="function"?yt(n):n[Symbol.iterator](),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(r){t[r]=n[r]&&function(o){return new Promise(function(a,l){o=n[r](o),s(a,l,o.done,o.value)})}}function s(r,o,a,l){Promise.resolve(l).then(function(c){r({value:c,done:a})},o)}}function E(n){return typeof n=="function"}function Lo(n){var e=function(i){Error.call(i),i.stack=new Error().stack},t=n(e);return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var mi=Lo(function(n){return function(t){n(this),this.message=t?t.length+` errors occurred during unsubscription:
|
|
2
2
|
`+t.map(function(i,s){return s+1+") "+i.toString()}).join(`
|
|
3
|
-
`):"",this.name="UnsubscriptionError",this.errors=t}});function Sn(n,e){if(n){var t=n.indexOf(e);0<=t&&n.splice(t,1)}}var en=function(){function n(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return n.prototype.unsubscribe=function(){var e,t,i,s,r;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=yt(o),l=a.next();!l.done;l=a.next()){var c=l.value;c.remove(this)}}catch($){e={error:$}}finally{try{l&&!l.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}else o.remove(this);var u=this.initialTeardown;if(E(u))try{u()}catch($){r=$ instanceof mi?$.errors:[$]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var d=yt(p),g=d.next();!g.done;g=d.next()){var m=g.value;try{Cr(m)}catch($){r=r??[],$ instanceof mi?r=Xe(Xe([],ze(r)),ze($.errors)):r.push($)}}}catch($){i={error:$}}finally{try{g&&!g.done&&(s=d.return)&&s.call(d)}finally{if(i)throw i.error}}}if(r)throw new mi(r)}},n.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)Cr(e);else{if(e instanceof n){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(e)}},n.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},n.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},n.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&Sn(t,e)},n.prototype.remove=function(e){var t=this._finalizers;t&&Sn(t,e),e instanceof n&&e._removeParent(this)},n.EMPTY=function(){var e=new n;return e.closed=!0,e}(),n}(),Ro=en.EMPTY;function Io(n){return n instanceof en||n&&"closed"in n&&E(n.remove)&&E(n.add)&&E(n.unsubscribe)}function Cr(n){E(n)?n():n.unsubscribe()}var bl={Promise:void 0},yl={setTimeout:function(n,e){for(var t=[],i=2;i<arguments.length;i++)t[i-2]=arguments[i];return setTimeout.apply(void 0,Xe([n,e],ze(t)))},clearTimeout:function(n){return clearTimeout(n)},delegate:void 0};function Po(n){yl.setTimeout(function(){throw n})}function Cn(){}function $n(n){n()}var ts=function(n){Le(e,n);function e(t){var i=n.call(this)||this;return i.isStopped=!1,t?(i.destination=t,Io(t)&&t.add(i)):i.destination=xl,i}return e.create=function(t,i,s){return new Ii(t,i,s)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,n.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(en),$l=function(){function n(e){this.partialObserver=e}return n.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(i){gn(i)}},n.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(i){gn(i)}else gn(e)},n.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(t){gn(t)}},n}(),Ii=function(n){Le(e,n);function e(t,i,s){var r=n.call(this)||this,o;return E(t)||!t?o={next:t??void 0,error:i??void 0,complete:s??void 0}:o=t,r.destination=new $l(o),r}return e}(ts);function gn(n){Po(n)}function wl(n){throw n}var xl={closed:!0,next:Cn,error:wl,complete:Cn},ns=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Ct(n){return n}function kl(n){return n.length===0?Ct:n.length===1?n[0]:function(t){return n.reduce(function(i,s){return s(i)},t)}}var F=function(){function n(e){e&&(this._subscribe=e)}return n.prototype.lift=function(e){var t=new n;return t.source=this,t.operator=e,t},n.prototype.subscribe=function(e,t,i){var s=this,r=Cl(e)?e:new Ii(e,t,i);return $n(function(){var o=s,a=o.operator,l=o.source;r.add(a?a.call(r,l):l?s._subscribe(r):s._trySubscribe(r))}),r},n.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},n.prototype.forEach=function(e,t){var i=this;return t=Er(t),new t(function(s,r){var o=new Ii({next:function(a){try{e(a)}catch(l){r(l),o.unsubscribe()}},error:r,complete:s});i.subscribe(o)})},n.prototype._subscribe=function(e){var t;return(t=this.source)===null||t===void 0?void 0:t.subscribe(e)},n.prototype[ns]=function(){return this},n.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return kl(e)(this)},n.prototype.toPromise=function(e){var t=this;return e=Er(e),new e(function(i,s){var r;t.subscribe(function(o){return r=o},function(o){return s(o)},function(){return i(r)})})},n.create=function(e){return new n(e)},n}();function Er(n){var e;return(e=n??bl.Promise)!==null&&e!==void 0?e:Promise}function Sl(n){return n&&E(n.next)&&E(n.error)&&E(n.complete)}function Cl(n){return n&&n instanceof ts||Sl(n)&&Io(n)}function El(n){return E(n==null?void 0:n.lift)}function ie(n){return function(e){if(El(e))return e.lift(function(t){try{return n(t,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function Y(n,e,t,i,s){return new _l(n,e,t,i,s)}var _l=function(n){Le(e,n);function e(t,i,s,r,o,a){var l=n.call(this,t)||this;return l.onFinalize=o,l.shouldUnsubscribe=a,l._next=i?function(c){try{i(c)}catch(u){t.error(u)}}:n.prototype._next,l._error=r?function(c){try{r(c)}catch(u){t.error(u)}finally{this.unsubscribe()}}:n.prototype._error,l._complete=s?function(){try{s()}catch(c){t.error(c)}finally{this.unsubscribe()}}:n.prototype._complete,l}return e.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var i=this.closed;n.prototype.unsubscribe.call(this),!i&&((t=this.onFinalize)===null||t===void 0||t.call(this))}},e}(ts),Tl=Lo(function(n){return function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),P=function(n){Le(e,n);function e(){var t=n.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return e.prototype.lift=function(t){var i=new _r(this,this);return i.operator=t,i},e.prototype._throwIfClosed=function(){if(this.closed)throw new Tl},e.prototype.next=function(t){var i=this;$n(function(){var s,r;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var o=yt(i.currentObservers),a=o.next();!a.done;a=o.next()){var l=a.value;l.next(t)}}catch(c){s={error:c}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(s)throw s.error}}}})},e.prototype.error=function(t){var i=this;$n(function(){if(i._throwIfClosed(),!i.isStopped){i.hasError=i.isStopped=!0,i.thrownError=t;for(var s=i.observers;s.length;)s.shift().error(t)}})},e.prototype.complete=function(){var t=this;$n(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var i=t.observers;i.length;)i.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(t){return this._throwIfClosed(),n.prototype._trySubscribe.call(this,t)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var i=this,s=this,r=s.hasError,o=s.isStopped,a=s.observers;return r||o?Ro:(this.currentObservers=null,a.push(t),new en(function(){i.currentObservers=null,Sn(a,t)}))},e.prototype._checkFinalizedStatuses=function(t){var i=this,s=i.hasError,r=i.thrownError,o=i.isStopped;s?t.error(r):o&&t.complete()},e.prototype.asObservable=function(){var t=new F;return t.source=this,t},e.create=function(t,i){return new _r(t,i)},e}(F),_r=function(n){Le(e,n);function e(t,i){var s=n.call(this)||this;return s.destination=t,s.source=i,s}return e.prototype.next=function(t){var i,s;(s=(i=this.destination)===null||i===void 0?void 0:i.next)===null||s===void 0||s.call(i,t)},e.prototype.error=function(t){var i,s;(s=(i=this.destination)===null||i===void 0?void 0:i.error)===null||s===void 0||s.call(i,t)},e.prototype.complete=function(){var t,i;(i=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||i===void 0||i.call(t)},e.prototype._subscribe=function(t){var i,s;return(s=(i=this.source)===null||i===void 0?void 0:i.subscribe(t))!==null&&s!==void 0?s:Ro},e}(P),ce=function(n){Le(e,n);function e(t){var i=n.call(this)||this;return i._value=t,i}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(t){var i=n.prototype._subscribe.call(this,t);return!i.closed&&t.next(this._value),i},e.prototype.getValue=function(){var t=this,i=t.hasError,s=t.thrownError,r=t._value;if(i)throw s;return this._throwIfClosed(),r},e.prototype.next=function(t){n.prototype.next.call(this,this._value=t)},e}(P),Al={now:function(){return Date.now()}},Ol=function(n){Le(e,n);function e(t,i){return n.call(this)||this}return e.prototype.schedule=function(t,i){return this},e}(en),Tr={setInterval:function(n,e){for(var t=[],i=2;i<arguments.length;i++)t[i-2]=arguments[i];return setInterval.apply(void 0,Xe([n,e],ze(t)))},clearInterval:function(n){return clearInterval(n)},delegate:void 0},Ll=function(n){Le(e,n);function e(t,i){var s=n.call(this,t,i)||this;return s.scheduler=t,s.work=i,s.pending=!1,s}return e.prototype.schedule=function(t,i){var s;if(i===void 0&&(i=0),this.closed)return this;this.state=t;var r=this.id,o=this.scheduler;return r!=null&&(this.id=this.recycleAsyncId(o,r,i)),this.pending=!0,this.delay=i,this.id=(s=this.id)!==null&&s!==void 0?s:this.requestAsyncId(o,this.id,i),this},e.prototype.requestAsyncId=function(t,i,s){return s===void 0&&(s=0),Tr.setInterval(t.flush.bind(t,this),s)},e.prototype.recycleAsyncId=function(t,i,s){if(s===void 0&&(s=0),s!=null&&this.delay===s&&this.pending===!1)return i;i!=null&&Tr.clearInterval(i)},e.prototype.execute=function(t,i){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var s=this._execute(t,i);if(s)return s;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,i){var s=!1,r;try{this.work(t)}catch(o){s=!0,r=o||new Error("Scheduled action threw falsy error")}if(s)return this.unsubscribe(),r},e.prototype.unsubscribe=function(){if(!this.closed){var t=this,i=t.id,s=t.scheduler,r=s.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Sn(r,this),i!=null&&(this.id=this.recycleAsyncId(s,i,null)),this.delay=null,n.prototype.unsubscribe.call(this)}},e}(Ol),Ar=function(){function n(e,t){t===void 0&&(t=n.now),this.schedulerActionCtor=e,this.now=t}return n.prototype.schedule=function(e,t,i){return t===void 0&&(t=0),new this.schedulerActionCtor(this,e).schedule(i,t)},n.now=Al.now,n}(),Rl=function(n){Le(e,n);function e(t,i){i===void 0&&(i=Ar.now);var s=n.call(this,t,i)||this;return s.actions=[],s._active=!1,s}return e.prototype.flush=function(t){var i=this.actions;if(this._active){i.push(t);return}var s;this._active=!0;do if(s=t.execute(t.state,t.delay))break;while(t=i.shift());if(this._active=!1,s){for(;t=i.shift();)t.unsubscribe();throw s}},e}(Ar),bp=new Rl(Ll);var tt=new F(function(n){return n.complete()});function Il(n){return n&&E(n.schedule)}function is(n){return n[n.length-1]}function Mo(n){return E(is(n))?n.pop():void 0}function ss(n){return Il(is(n))?n.pop():void 0}function Pl(n,e){return typeof is(n)=="number"?n.pop():e}var rs=function(n){return n&&typeof n.length=="number"&&typeof n!="function"};function Uo(n){return E(n==null?void 0:n.then)}function No(n){return E(n[ns])}function Do(n){return Symbol.asyncIterator&&E(n==null?void 0:n[Symbol.asyncIterator])}function zo(n){return new TypeError("You provided "+(n!==null&&typeof n=="object"?"an invalid object":"'"+n+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Ml(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Ho=Ml();function jo(n){return E(n==null?void 0:n[Ho])}function Fo(n){return ml(this,arguments,function(){var t,i,s,r;return Oo(this,function(o){switch(o.label){case 0:t=n.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,gt(t.read())];case 3:return i=o.sent(),s=i.value,r=i.done,r?[4,gt(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,gt(s)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function Bo(n){return E(n==null?void 0:n.getReader)}function se(n){if(n instanceof F)return n;if(n!=null){if(No(n))return Ul(n);if(rs(n))return Nl(n);if(Uo(n))return Dl(n);if(Do(n))return qo(n);if(jo(n))return zl(n);if(Bo(n))return Hl(n)}throw zo(n)}function Ul(n){return new F(function(e){var t=n[ns]();if(E(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Nl(n){return new F(function(e){for(var t=0;t<n.length&&!e.closed;t++)e.next(n[t]);e.complete()})}function Dl(n){return new F(function(e){n.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,Po)})}function zl(n){return new F(function(e){var t,i;try{for(var s=yt(n),r=s.next();!r.done;r=s.next()){var o=r.value;if(e.next(o),e.closed)return}}catch(a){t={error:a}}finally{try{r&&!r.done&&(i=s.return)&&i.call(s)}finally{if(t)throw t.error}}e.complete()})}function qo(n){return new F(function(e){jl(n,e).catch(function(t){return e.error(t)})})}function Hl(n){return qo(Fo(n))}function jl(n,e){var t,i,s,r;return gl(this,void 0,void 0,function(){var o,a;return Oo(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),t=vl(n),l.label=1;case 1:return[4,t.next()];case 2:if(i=l.sent(),!!i.done)return[3,4];if(o=i.value,e.next(o),e.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=l.sent(),s={error:a},[3,11];case 6:return l.trys.push([6,,9,10]),i&&!i.done&&(r=t.return)?[4,r.call(t)]:[3,8];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(s)throw s.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function Ne(n,e,t,i,s){i===void 0&&(i=0),s===void 0&&(s=!1);var r=e.schedule(function(){t(),s?n.add(this.schedule(null,i)):this.unsubscribe()},i);if(n.add(r),!s)return r}function Vo(n,e){return e===void 0&&(e=0),ie(function(t,i){t.subscribe(Y(i,function(s){return Ne(i,n,function(){return i.next(s)},e)},function(){return Ne(i,n,function(){return i.complete()},e)},function(s){return Ne(i,n,function(){return i.error(s)},e)}))})}function Wo(n,e){return e===void 0&&(e=0),ie(function(t,i){i.add(n.schedule(function(){return t.subscribe(i)},e))})}function Fl(n,e){return se(n).pipe(Wo(e),Vo(e))}function Bl(n,e){return se(n).pipe(Wo(e),Vo(e))}function ql(n,e){return new F(function(t){var i=0;return e.schedule(function(){i===n.length?t.complete():(t.next(n[i++]),t.closed||this.schedule())})})}function Vl(n,e){return new F(function(t){var i;return Ne(t,e,function(){i=n[Ho](),Ne(t,e,function(){var s,r,o;try{s=i.next(),r=s.value,o=s.done}catch(a){t.error(a);return}o?t.complete():t.next(r)},0,!0)}),function(){return E(i==null?void 0:i.return)&&i.return()}})}function Go(n,e){if(!n)throw new Error("Iterable cannot be null");return new F(function(t){Ne(t,e,function(){var i=n[Symbol.asyncIterator]();Ne(t,e,function(){i.next().then(function(s){s.done?t.complete():t.next(s.value)})},0,!0)})})}function Wl(n,e){return Go(Fo(n),e)}function Gl(n,e){if(n!=null){if(No(n))return Fl(n,e);if(rs(n))return ql(n,e);if(Uo(n))return Bl(n,e);if(Do(n))return Go(n,e);if(jo(n))return Vl(n,e);if(Bo(n))return Wl(n,e)}throw zo(n)}function Ye(n,e){return e?Gl(n,e):se(n)}function Pi(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=ss(n);return Ye(n,t)}function En(n,e){return ie(function(t,i){var s=0;t.subscribe(Y(i,function(r){i.next(n.call(e,r,s++))}))})}var Zl=Array.isArray;function Yl(n,e){return Zl(e)?n.apply(void 0,Xe([],ze(e))):n(e)}function Zo(n){return En(function(e){return Yl(n,e)})}var Ql=Array.isArray,Xl=Object.getPrototypeOf,Kl=Object.prototype,Jl=Object.keys;function ec(n){if(n.length===1){var e=n[0];if(Ql(e))return{args:e,keys:null};if(tc(e)){var t=Jl(e);return{args:t.map(function(i){return e[i]}),keys:t}}}return{args:n,keys:null}}function tc(n){return n&&typeof n=="object"&&Xl(n)===Kl}function nc(n,e){return n.reduce(function(t,i,s){return t[i]=e[s],t},{})}function ic(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=ss(n),i=Mo(n),s=ec(n),r=s.args,o=s.keys;if(r.length===0)return Ye([],t);var a=new F(sc(r,t,o?function(l){return nc(o,l)}:Ct));return i?a.pipe(Zo(i)):a}function sc(n,e,t){return t===void 0&&(t=Ct),function(i){Or(e,function(){for(var s=n.length,r=new Array(s),o=s,a=s,l=function(u){Or(e,function(){var p=Ye(n[u],e),d=!1;p.subscribe(Y(i,function(g){r[u]=g,d||(d=!0,a--),a||i.next(t(r.slice()))},function(){--o||i.complete()}))},i)},c=0;c<s;c++)l(c)},i)}}function Or(n,e,t){n?Ne(t,n,e):e()}function rc(n,e,t,i,s,r,o,a){var l=[],c=0,u=0,p=!1,d=function(){p&&!l.length&&!c&&e.complete()},g=function($){return c<i?m($):l.push($)},m=function($){c++;var be=!1;se(t($,u++)).subscribe(Y(e,function(oe){e.next(oe)},function(){be=!0},void 0,function(){if(be)try{c--;for(var oe=function(){var Ie=l.shift();o||m(Ie)};l.length&&c<i;)oe();d()}catch(Ie){e.error(Ie)}}))};return n.subscribe(Y(e,g,function(){p=!0,d()})),function(){}}function qt(n,e,t){return t===void 0&&(t=1/0),E(e)?qt(function(i,s){return En(function(r,o){return e(i,r,s,o)})(se(n(i,s)))},t):(typeof e=="number"&&(t=e),ie(function(i,s){return rc(i,s,n,t)}))}function oc(n){return n===void 0&&(n=1/0),qt(Ct,n)}function ac(n){return new F(function(e){se(n()).subscribe(e)})}var lc=["addListener","removeListener"],cc=["addEventListener","removeEventListener"],uc=["on","off"];function _n(n,e,t,i){if(E(t)&&(i=t,t=void 0),i)return _n(n,e,t).pipe(Zo(i));var s=ze(pc(n)?cc.map(function(a){return function(l){return n[a](e,l,t)}}):hc(n)?lc.map(Lr(n,e)):dc(n)?uc.map(Lr(n,e)):[],2),r=s[0],o=s[1];if(!r&&rs(n))return qt(function(a){return _n(a,e,t)})(se(n));if(!r)throw new TypeError("Invalid event target");return new F(function(a){var l=function(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];return a.next(1<c.length?c:c[0])};return r(l),function(){return o(l)}})}function Lr(n,e){return function(t){return function(i){return n[t](e,i)}}}function hc(n){return E(n.addListener)&&E(n.removeListener)}function dc(n){return E(n.on)&&E(n.off)}function pc(n){return E(n.addEventListener)&&E(n.removeEventListener)}function fc(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=ss(n),i=Pl(n,1/0),s=n;return s.length?s.length===1?se(s[0]):oc(i)(Ye(s,t)):tt}function W(n,e){return ie(function(t,i){var s=0;t.subscribe(Y(i,function(r){return n.call(e,r,s++)&&i.next(r)}))})}function Mi(n){return ie(function(e,t){var i=null,s=!1,r;i=e.subscribe(Y(t,void 0,void 0,function(o){r=se(n(o,Mi(n)(e))),i?(i.unsubscribe(),i=null,r.subscribe(t)):s=!0})),s&&(i.unsubscribe(),i=null,r.subscribe(t))})}function vi(n,e){return E(e)?qt(n,e,1):qt(n,1)}function fe(n){return n<=0?function(){return tt}:ie(function(e,t){var i=0;e.subscribe(Y(t,function(s){++i<=n&&(t.next(s),n<=i&&t.complete())}))})}function bi(n){var e=1/0,t;return e<=0?function(){return tt}:ie(function(i,s){var r=0,o,a=function(){o==null||o.unsubscribe(),o=null;var c,u;t!=null||l()},l=function(){var c=!1;o=i.subscribe(Y(s,void 0,function(){++r<e?o?a():c=!0:s.complete()})),c&&a()};l()})}function Te(n,e){return ie(function(t,i){var s=null,r=0,o=!1,a=function(){return o&&!s&&i.complete()};t.subscribe(Y(i,function(l){s==null||s.unsubscribe();var c=0,u=r++;se(n(l,u)).subscribe(s=Y(i,function(p){return i.next(e?e(l,p,u,c++):p)},function(){s=null,a()}))},function(){o=!0,a()}))})}function z(n){return ie(function(e,t){se(n).subscribe(Y(t,function(){return t.complete()},Cn)),!t.closed&&e.subscribe(t)})}function gc(n,e,t){var i=E(n)||e||t?{next:n,error:e,complete:t}:n;return i?ie(function(s,r){var o;(o=i.subscribe)===null||o===void 0||o.call(i);var a=!0;s.subscribe(Y(r,function(l){var c;(c=i.next)===null||c===void 0||c.call(i,l),r.next(l)},function(){var l;a=!1,(l=i.complete)===null||l===void 0||l.call(i),r.complete()},function(l){var c;a=!1,(c=i.error)===null||c===void 0||c.call(i,l),r.error(l)},function(){var l,c;a&&((l=i.unsubscribe)===null||l===void 0||l.call(i)),(c=i.finalize)===null||c===void 0||c.call(i)}))}):Ct}function Ui(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=Mo(n);return ie(function(i,s){for(var r=n.length,o=new Array(r),a=n.map(function(){return!1}),l=!1,c=function(p){se(n[p]).subscribe(Y(s,function(d){o[p]=d,!l&&!a[p]&&(a[p]=!0,(l=a.every(Ct))&&(a=null))},Cn))},u=0;u<r;u++)c(u);i.subscribe(Y(s,function(p){if(l){var d=Xe([p],ze(o));s.next(t?t.apply(void 0,Xe([],ze(d))):d)}}))})}class os{constructor(){this.registeredProviders=new Map}static async getInstance(e){let t=await e.get("conversation");return t||(t=new os,await e.register("conversation",t),t)}registerProvider(e,t){this.registeredProviders.set(e,t)}}var j=(n=>(n.User="user",n.Agent="agent",n.System="system",n))(j||{});const mc=()=>"10000000-1000-4000-8000-100000000000".replace(/[018]/g,n=>(+n^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+n/4).toString(16)),Yo=()=>typeof crypto.randomUUID=="function"?crypto.randomUUID():mc();function Rr(n){let e=n;const t=/https?:\/\/[^\s<]+/gi,i=/<a [^>]*href="([^"]*)"[^>]*>[^<]*<\/a>/g,s=n.match(t)||[],r=[];let o;for(;(o=i.exec(n))!==null;)r.push(o[1]);return s.filter(l=>!r.includes(l)).forEach(l=>{const c=l.endsWith(".")?l.slice(0,-1):l,u=new RegExp(`(?<!<a[^>]*>)${c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?![^<]*</a>)`,"gi");e=e.replace(u,`<a title='${c}' target='_blank' href='${c}'>${c}</a>`)}),e}function Ni(n){if(n.includes("aceChatGuideTitle"))return vc(n);const e=/<a [^>]*>https?:\/\/[^<]*<\/a>/gim;return n.replace(e,t=>{const i=Qo(t);if(!i)return t;const s=50;if(i.length>s){const r=/^(https?:\/\/[^/]+)(\/.*)?$/i,o=i.match(r);if(!o)return t;const a=o[1],c=(o[2]||"/").split("?")[0],u=c.split("/").pop(),p=s-a.length;let d=c;u&&u.length<p&&c.length>p?d=c.substring(0,p-u.length-4)+".../"+u:d=c.substring(0,p-3)+"...";const g=`${a}${d}`;return Di(t,g)}return Di(t,i)})}function Qo(n){const e=n.match(/href=["']([^'"]*)["']/);if(e&&e.length>1){let t=e[1];return t.endsWith(".")&&(t=t.slice(0,-1)),t}return null}function Di(n,e){return n.replace(/>[^<]*<\/a>/,`>${e}</a>`)}function vc(n){const e=/<a [^>]*aceChatGuideTitle[^>]*>[^<]*<\/a>/gm;return n.replace(e,t=>{const i=Qo(t);if(!i)return t;const s=i.split("?").pop(),o=new URLSearchParams(s).get("aceChatGuideTitle");return o?Di(t,o):t})}class ee{constructor(e,t,i){this.type=e,this.sender=t,this.messages=i,this.status="delivered",this.didUpdate=new P,this.actions$=new P,this.remove$=new P,this.timestamp=Date.now(),this.id=Yo()}update(e){this.messages=[{items:e}],this.didUpdate.next(this)}setStatus(e){this.status=e,this.didUpdate.next(this)}remove(){this.remove$.next()}}class bc{constructor(e){this.name=e,this.print$=new P}print(e,t="html",i=this.name){const s=new ee(j.Agent,{name:i},[{items:[[t,{content:e}]]}]);return this.print$.next(s),s}subscribe(){return this.print$.asObservable()}}class yc{constructor(e){this.name=e,this.print$=new P}print(e){const t=new ee(j.User,{name:this.name},[{items:[["html",{content:e}]]}]);return this.print$.next(t),t}subscribe(){return this.print$.asObservable()}}class $c{constructor(){this.print$=new P,this.name="system"}print(e){const t=new ee(j.System,{name:this.name},[{items:[["html",{content:e}]]}]);return this.print$.next(t),t}subscribe(){return this.print$.asObservable()}}class wc{constructor(e,t){this.name=e,this.component=t,this.print$=new P,this.typingState$=new ce(!1),this.complete$=new P,this.system=this.createSystem(),this.rehydrate$=new P,this.saveToCurrentSession$=new P,this.showChatOverlay$=new ce(!1),this.onComplete=()=>this.complete$.asObservable()}connect(e={}){this.complete$.pipe(fe(1)).subscribe(()=>{this.disconnected()})}disconnected(){}onUserSubmit(e){this.print(j.User,e.text)}print(e,t){const i=new ee(e,{name:""},[{items:[["html",{content:t}]]}]);return this.printEntry(i)}printEntry(e){return this.print$.next(e),e}createAgent(e){const t=new bc(e);return t.subscribe().subscribe(i=>{this.playNotification(),this.printEntry(i)}),t}createUser(e){const t=new yc(e);return t.subscribe().subscribe(i=>{this.printEntry(i)}),t}createSystem(){const e=new $c;return e.subscribe().subscribe(t=>{this.printEntry(t)}),e}setTypingState(e){this.typingState$.next(e)}setToastMessage(e){this.component.setToastMessage(e)}isTyping(){return this.typingState$.asObservable()}actions(){return this.print$.asObservable()}playNotification(){const e=!document.hidden&&this.component.application.storage.get("open"),t="https://publicpoc.blob.core.windows.net/widget-assets/notification.mp3";!this.component.application.storage.get("muteAudioNotifications")&&!e&&new Audio(t).play().catch(s=>{})}complete(){this.complete$.next()}save(e){this.saveToCurrentSession$.next(e)}async rehydrate(e){}}/**
|
|
3
|
+
`):"",this.name="UnsubscriptionError",this.errors=t}});function Sn(n,e){if(n){var t=n.indexOf(e);0<=t&&n.splice(t,1)}}var en=(function(){function n(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return n.prototype.unsubscribe=function(){var e,t,i,s,r;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=yt(o),l=a.next();!l.done;l=a.next()){var c=l.value;c.remove(this)}}catch($){e={error:$}}finally{try{l&&!l.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}else o.remove(this);var u=this.initialTeardown;if(E(u))try{u()}catch($){r=$ instanceof mi?$.errors:[$]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var d=yt(p),g=d.next();!g.done;g=d.next()){var m=g.value;try{Cr(m)}catch($){r=r??[],$ instanceof mi?r=Xe(Xe([],ze(r)),ze($.errors)):r.push($)}}}catch($){i={error:$}}finally{try{g&&!g.done&&(s=d.return)&&s.call(d)}finally{if(i)throw i.error}}}if(r)throw new mi(r)}},n.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)Cr(e);else{if(e instanceof n){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(e)}},n.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},n.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},n.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&Sn(t,e)},n.prototype.remove=function(e){var t=this._finalizers;t&&Sn(t,e),e instanceof n&&e._removeParent(this)},n.EMPTY=(function(){var e=new n;return e.closed=!0,e})(),n})(),Ro=en.EMPTY;function Io(n){return n instanceof en||n&&"closed"in n&&E(n.remove)&&E(n.add)&&E(n.unsubscribe)}function Cr(n){E(n)?n():n.unsubscribe()}var bl={Promise:void 0},yl={setTimeout:function(n,e){for(var t=[],i=2;i<arguments.length;i++)t[i-2]=arguments[i];return setTimeout.apply(void 0,Xe([n,e],ze(t)))},clearTimeout:function(n){return clearTimeout(n)},delegate:void 0};function Po(n){yl.setTimeout(function(){throw n})}function Cn(){}function $n(n){n()}var ts=(function(n){Le(e,n);function e(t){var i=n.call(this)||this;return i.isStopped=!1,t?(i.destination=t,Io(t)&&t.add(i)):i.destination=xl,i}return e.create=function(t,i,s){return new Ii(t,i,s)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,n.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e})(en),$l=(function(){function n(e){this.partialObserver=e}return n.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(i){gn(i)}},n.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(i){gn(i)}else gn(e)},n.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(t){gn(t)}},n})(),Ii=(function(n){Le(e,n);function e(t,i,s){var r=n.call(this)||this,o;return E(t)||!t?o={next:t??void 0,error:i??void 0,complete:s??void 0}:o=t,r.destination=new $l(o),r}return e})(ts);function gn(n){Po(n)}function wl(n){throw n}var xl={closed:!0,next:Cn,error:wl,complete:Cn},ns=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function Ct(n){return n}function kl(n){return n.length===0?Ct:n.length===1?n[0]:function(t){return n.reduce(function(i,s){return s(i)},t)}}var F=(function(){function n(e){e&&(this._subscribe=e)}return n.prototype.lift=function(e){var t=new n;return t.source=this,t.operator=e,t},n.prototype.subscribe=function(e,t,i){var s=this,r=Cl(e)?e:new Ii(e,t,i);return $n(function(){var o=s,a=o.operator,l=o.source;r.add(a?a.call(r,l):l?s._subscribe(r):s._trySubscribe(r))}),r},n.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},n.prototype.forEach=function(e,t){var i=this;return t=Er(t),new t(function(s,r){var o=new Ii({next:function(a){try{e(a)}catch(l){r(l),o.unsubscribe()}},error:r,complete:s});i.subscribe(o)})},n.prototype._subscribe=function(e){var t;return(t=this.source)===null||t===void 0?void 0:t.subscribe(e)},n.prototype[ns]=function(){return this},n.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return kl(e)(this)},n.prototype.toPromise=function(e){var t=this;return e=Er(e),new e(function(i,s){var r;t.subscribe(function(o){return r=o},function(o){return s(o)},function(){return i(r)})})},n.create=function(e){return new n(e)},n})();function Er(n){var e;return(e=n??bl.Promise)!==null&&e!==void 0?e:Promise}function Sl(n){return n&&E(n.next)&&E(n.error)&&E(n.complete)}function Cl(n){return n&&n instanceof ts||Sl(n)&&Io(n)}function El(n){return E(n==null?void 0:n.lift)}function ie(n){return function(e){if(El(e))return e.lift(function(t){try{return n(t,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function Y(n,e,t,i,s){return new _l(n,e,t,i,s)}var _l=(function(n){Le(e,n);function e(t,i,s,r,o,a){var l=n.call(this,t)||this;return l.onFinalize=o,l.shouldUnsubscribe=a,l._next=i?function(c){try{i(c)}catch(u){t.error(u)}}:n.prototype._next,l._error=r?function(c){try{r(c)}catch(u){t.error(u)}finally{this.unsubscribe()}}:n.prototype._error,l._complete=s?function(){try{s()}catch(c){t.error(c)}finally{this.unsubscribe()}}:n.prototype._complete,l}return e.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var i=this.closed;n.prototype.unsubscribe.call(this),!i&&((t=this.onFinalize)===null||t===void 0||t.call(this))}},e})(ts),Tl=Lo(function(n){return function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),P=(function(n){Le(e,n);function e(){var t=n.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return e.prototype.lift=function(t){var i=new _r(this,this);return i.operator=t,i},e.prototype._throwIfClosed=function(){if(this.closed)throw new Tl},e.prototype.next=function(t){var i=this;$n(function(){var s,r;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var o=yt(i.currentObservers),a=o.next();!a.done;a=o.next()){var l=a.value;l.next(t)}}catch(c){s={error:c}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(s)throw s.error}}}})},e.prototype.error=function(t){var i=this;$n(function(){if(i._throwIfClosed(),!i.isStopped){i.hasError=i.isStopped=!0,i.thrownError=t;for(var s=i.observers;s.length;)s.shift().error(t)}})},e.prototype.complete=function(){var t=this;$n(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var i=t.observers;i.length;)i.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(t){return this._throwIfClosed(),n.prototype._trySubscribe.call(this,t)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var i=this,s=this,r=s.hasError,o=s.isStopped,a=s.observers;return r||o?Ro:(this.currentObservers=null,a.push(t),new en(function(){i.currentObservers=null,Sn(a,t)}))},e.prototype._checkFinalizedStatuses=function(t){var i=this,s=i.hasError,r=i.thrownError,o=i.isStopped;s?t.error(r):o&&t.complete()},e.prototype.asObservable=function(){var t=new F;return t.source=this,t},e.create=function(t,i){return new _r(t,i)},e})(F),_r=(function(n){Le(e,n);function e(t,i){var s=n.call(this)||this;return s.destination=t,s.source=i,s}return e.prototype.next=function(t){var i,s;(s=(i=this.destination)===null||i===void 0?void 0:i.next)===null||s===void 0||s.call(i,t)},e.prototype.error=function(t){var i,s;(s=(i=this.destination)===null||i===void 0?void 0:i.error)===null||s===void 0||s.call(i,t)},e.prototype.complete=function(){var t,i;(i=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||i===void 0||i.call(t)},e.prototype._subscribe=function(t){var i,s;return(s=(i=this.source)===null||i===void 0?void 0:i.subscribe(t))!==null&&s!==void 0?s:Ro},e})(P),ce=(function(n){Le(e,n);function e(t){var i=n.call(this)||this;return i._value=t,i}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(t){var i=n.prototype._subscribe.call(this,t);return!i.closed&&t.next(this._value),i},e.prototype.getValue=function(){var t=this,i=t.hasError,s=t.thrownError,r=t._value;if(i)throw s;return this._throwIfClosed(),r},e.prototype.next=function(t){n.prototype.next.call(this,this._value=t)},e})(P),Al={now:function(){return Date.now()}},Ol=(function(n){Le(e,n);function e(t,i){return n.call(this)||this}return e.prototype.schedule=function(t,i){return this},e})(en),Tr={setInterval:function(n,e){for(var t=[],i=2;i<arguments.length;i++)t[i-2]=arguments[i];return setInterval.apply(void 0,Xe([n,e],ze(t)))},clearInterval:function(n){return clearInterval(n)},delegate:void 0},Ll=(function(n){Le(e,n);function e(t,i){var s=n.call(this,t,i)||this;return s.scheduler=t,s.work=i,s.pending=!1,s}return e.prototype.schedule=function(t,i){var s;if(i===void 0&&(i=0),this.closed)return this;this.state=t;var r=this.id,o=this.scheduler;return r!=null&&(this.id=this.recycleAsyncId(o,r,i)),this.pending=!0,this.delay=i,this.id=(s=this.id)!==null&&s!==void 0?s:this.requestAsyncId(o,this.id,i),this},e.prototype.requestAsyncId=function(t,i,s){return s===void 0&&(s=0),Tr.setInterval(t.flush.bind(t,this),s)},e.prototype.recycleAsyncId=function(t,i,s){if(s===void 0&&(s=0),s!=null&&this.delay===s&&this.pending===!1)return i;i!=null&&Tr.clearInterval(i)},e.prototype.execute=function(t,i){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var s=this._execute(t,i);if(s)return s;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,i){var s=!1,r;try{this.work(t)}catch(o){s=!0,r=o||new Error("Scheduled action threw falsy error")}if(s)return this.unsubscribe(),r},e.prototype.unsubscribe=function(){if(!this.closed){var t=this,i=t.id,s=t.scheduler,r=s.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Sn(r,this),i!=null&&(this.id=this.recycleAsyncId(s,i,null)),this.delay=null,n.prototype.unsubscribe.call(this)}},e})(Ol),Ar=(function(){function n(e,t){t===void 0&&(t=n.now),this.schedulerActionCtor=e,this.now=t}return n.prototype.schedule=function(e,t,i){return t===void 0&&(t=0),new this.schedulerActionCtor(this,e).schedule(i,t)},n.now=Al.now,n})(),Rl=(function(n){Le(e,n);function e(t,i){i===void 0&&(i=Ar.now);var s=n.call(this,t,i)||this;return s.actions=[],s._active=!1,s}return e.prototype.flush=function(t){var i=this.actions;if(this._active){i.push(t);return}var s;this._active=!0;do if(s=t.execute(t.state,t.delay))break;while(t=i.shift());if(this._active=!1,s){for(;t=i.shift();)t.unsubscribe();throw s}},e})(Ar),bp=new Rl(Ll);var tt=new F(function(n){return n.complete()});function Il(n){return n&&E(n.schedule)}function is(n){return n[n.length-1]}function Mo(n){return E(is(n))?n.pop():void 0}function ss(n){return Il(is(n))?n.pop():void 0}function Pl(n,e){return typeof is(n)=="number"?n.pop():e}var rs=(function(n){return n&&typeof n.length=="number"&&typeof n!="function"});function Uo(n){return E(n==null?void 0:n.then)}function No(n){return E(n[ns])}function Do(n){return Symbol.asyncIterator&&E(n==null?void 0:n[Symbol.asyncIterator])}function zo(n){return new TypeError("You provided "+(n!==null&&typeof n=="object"?"an invalid object":"'"+n+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Ml(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Ho=Ml();function jo(n){return E(n==null?void 0:n[Ho])}function Fo(n){return ml(this,arguments,function(){var t,i,s,r;return Oo(this,function(o){switch(o.label){case 0:t=n.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,gt(t.read())];case 3:return i=o.sent(),s=i.value,r=i.done,r?[4,gt(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,gt(s)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function Bo(n){return E(n==null?void 0:n.getReader)}function se(n){if(n instanceof F)return n;if(n!=null){if(No(n))return Ul(n);if(rs(n))return Nl(n);if(Uo(n))return Dl(n);if(Do(n))return qo(n);if(jo(n))return zl(n);if(Bo(n))return Hl(n)}throw zo(n)}function Ul(n){return new F(function(e){var t=n[ns]();if(E(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Nl(n){return new F(function(e){for(var t=0;t<n.length&&!e.closed;t++)e.next(n[t]);e.complete()})}function Dl(n){return new F(function(e){n.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,Po)})}function zl(n){return new F(function(e){var t,i;try{for(var s=yt(n),r=s.next();!r.done;r=s.next()){var o=r.value;if(e.next(o),e.closed)return}}catch(a){t={error:a}}finally{try{r&&!r.done&&(i=s.return)&&i.call(s)}finally{if(t)throw t.error}}e.complete()})}function qo(n){return new F(function(e){jl(n,e).catch(function(t){return e.error(t)})})}function Hl(n){return qo(Fo(n))}function jl(n,e){var t,i,s,r;return gl(this,void 0,void 0,function(){var o,a;return Oo(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),t=vl(n),l.label=1;case 1:return[4,t.next()];case 2:if(i=l.sent(),!!i.done)return[3,4];if(o=i.value,e.next(o),e.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=l.sent(),s={error:a},[3,11];case 6:return l.trys.push([6,,9,10]),i&&!i.done&&(r=t.return)?[4,r.call(t)]:[3,8];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(s)throw s.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function Ne(n,e,t,i,s){i===void 0&&(i=0),s===void 0&&(s=!1);var r=e.schedule(function(){t(),s?n.add(this.schedule(null,i)):this.unsubscribe()},i);if(n.add(r),!s)return r}function Vo(n,e){return e===void 0&&(e=0),ie(function(t,i){t.subscribe(Y(i,function(s){return Ne(i,n,function(){return i.next(s)},e)},function(){return Ne(i,n,function(){return i.complete()},e)},function(s){return Ne(i,n,function(){return i.error(s)},e)}))})}function Wo(n,e){return e===void 0&&(e=0),ie(function(t,i){i.add(n.schedule(function(){return t.subscribe(i)},e))})}function Fl(n,e){return se(n).pipe(Wo(e),Vo(e))}function Bl(n,e){return se(n).pipe(Wo(e),Vo(e))}function ql(n,e){return new F(function(t){var i=0;return e.schedule(function(){i===n.length?t.complete():(t.next(n[i++]),t.closed||this.schedule())})})}function Vl(n,e){return new F(function(t){var i;return Ne(t,e,function(){i=n[Ho](),Ne(t,e,function(){var s,r,o;try{s=i.next(),r=s.value,o=s.done}catch(a){t.error(a);return}o?t.complete():t.next(r)},0,!0)}),function(){return E(i==null?void 0:i.return)&&i.return()}})}function Go(n,e){if(!n)throw new Error("Iterable cannot be null");return new F(function(t){Ne(t,e,function(){var i=n[Symbol.asyncIterator]();Ne(t,e,function(){i.next().then(function(s){s.done?t.complete():t.next(s.value)})},0,!0)})})}function Wl(n,e){return Go(Fo(n),e)}function Gl(n,e){if(n!=null){if(No(n))return Fl(n,e);if(rs(n))return ql(n,e);if(Uo(n))return Bl(n,e);if(Do(n))return Go(n,e);if(jo(n))return Vl(n,e);if(Bo(n))return Wl(n,e)}throw zo(n)}function Ye(n,e){return e?Gl(n,e):se(n)}function Pi(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=ss(n);return Ye(n,t)}function En(n,e){return ie(function(t,i){var s=0;t.subscribe(Y(i,function(r){i.next(n.call(e,r,s++))}))})}var Zl=Array.isArray;function Yl(n,e){return Zl(e)?n.apply(void 0,Xe([],ze(e))):n(e)}function Zo(n){return En(function(e){return Yl(n,e)})}var Ql=Array.isArray,Xl=Object.getPrototypeOf,Kl=Object.prototype,Jl=Object.keys;function ec(n){if(n.length===1){var e=n[0];if(Ql(e))return{args:e,keys:null};if(tc(e)){var t=Jl(e);return{args:t.map(function(i){return e[i]}),keys:t}}}return{args:n,keys:null}}function tc(n){return n&&typeof n=="object"&&Xl(n)===Kl}function nc(n,e){return n.reduce(function(t,i,s){return t[i]=e[s],t},{})}function ic(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=ss(n),i=Mo(n),s=ec(n),r=s.args,o=s.keys;if(r.length===0)return Ye([],t);var a=new F(sc(r,t,o?function(l){return nc(o,l)}:Ct));return i?a.pipe(Zo(i)):a}function sc(n,e,t){return t===void 0&&(t=Ct),function(i){Or(e,function(){for(var s=n.length,r=new Array(s),o=s,a=s,l=function(u){Or(e,function(){var p=Ye(n[u],e),d=!1;p.subscribe(Y(i,function(g){r[u]=g,d||(d=!0,a--),a||i.next(t(r.slice()))},function(){--o||i.complete()}))},i)},c=0;c<s;c++)l(c)},i)}}function Or(n,e,t){n?Ne(t,n,e):e()}function rc(n,e,t,i,s,r,o,a){var l=[],c=0,u=0,p=!1,d=function(){p&&!l.length&&!c&&e.complete()},g=function($){return c<i?m($):l.push($)},m=function($){c++;var be=!1;se(t($,u++)).subscribe(Y(e,function(oe){e.next(oe)},function(){be=!0},void 0,function(){if(be)try{c--;for(var oe=function(){var Ie=l.shift();o||m(Ie)};l.length&&c<i;)oe();d()}catch(Ie){e.error(Ie)}}))};return n.subscribe(Y(e,g,function(){p=!0,d()})),function(){}}function qt(n,e,t){return t===void 0&&(t=1/0),E(e)?qt(function(i,s){return En(function(r,o){return e(i,r,s,o)})(se(n(i,s)))},t):(typeof e=="number"&&(t=e),ie(function(i,s){return rc(i,s,n,t)}))}function oc(n){return n===void 0&&(n=1/0),qt(Ct,n)}function ac(n){return new F(function(e){se(n()).subscribe(e)})}var lc=["addListener","removeListener"],cc=["addEventListener","removeEventListener"],uc=["on","off"];function _n(n,e,t,i){if(E(t)&&(i=t,t=void 0),i)return _n(n,e,t).pipe(Zo(i));var s=ze(pc(n)?cc.map(function(a){return function(l){return n[a](e,l,t)}}):hc(n)?lc.map(Lr(n,e)):dc(n)?uc.map(Lr(n,e)):[],2),r=s[0],o=s[1];if(!r&&rs(n))return qt(function(a){return _n(a,e,t)})(se(n));if(!r)throw new TypeError("Invalid event target");return new F(function(a){var l=function(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];return a.next(1<c.length?c:c[0])};return r(l),function(){return o(l)}})}function Lr(n,e){return function(t){return function(i){return n[t](e,i)}}}function hc(n){return E(n.addListener)&&E(n.removeListener)}function dc(n){return E(n.on)&&E(n.off)}function pc(n){return E(n.addEventListener)&&E(n.removeEventListener)}function fc(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=ss(n),i=Pl(n,1/0),s=n;return s.length?s.length===1?se(s[0]):oc(i)(Ye(s,t)):tt}function W(n,e){return ie(function(t,i){var s=0;t.subscribe(Y(i,function(r){return n.call(e,r,s++)&&i.next(r)}))})}function Mi(n){return ie(function(e,t){var i=null,s=!1,r;i=e.subscribe(Y(t,void 0,void 0,function(o){r=se(n(o,Mi(n)(e))),i?(i.unsubscribe(),i=null,r.subscribe(t)):s=!0})),s&&(i.unsubscribe(),i=null,r.subscribe(t))})}function vi(n,e){return E(e)?qt(n,e,1):qt(n,1)}function fe(n){return n<=0?function(){return tt}:ie(function(e,t){var i=0;e.subscribe(Y(t,function(s){++i<=n&&(t.next(s),n<=i&&t.complete())}))})}function bi(n){var e=1/0,t;return e<=0?function(){return tt}:ie(function(i,s){var r=0,o,a=function(){o==null||o.unsubscribe(),o=null;var c,u;t!=null||l()},l=function(){var c=!1;o=i.subscribe(Y(s,void 0,function(){++r<e?o?a():c=!0:s.complete()})),c&&a()};l()})}function Te(n,e){return ie(function(t,i){var s=null,r=0,o=!1,a=function(){return o&&!s&&i.complete()};t.subscribe(Y(i,function(l){s==null||s.unsubscribe();var c=0,u=r++;se(n(l,u)).subscribe(s=Y(i,function(p){return i.next(e?e(l,p,u,c++):p)},function(){s=null,a()}))},function(){o=!0,a()}))})}function z(n){return ie(function(e,t){se(n).subscribe(Y(t,function(){return t.complete()},Cn)),!t.closed&&e.subscribe(t)})}function gc(n,e,t){var i=E(n)||e||t?{next:n,error:e,complete:t}:n;return i?ie(function(s,r){var o;(o=i.subscribe)===null||o===void 0||o.call(i);var a=!0;s.subscribe(Y(r,function(l){var c;(c=i.next)===null||c===void 0||c.call(i,l),r.next(l)},function(){var l;a=!1,(l=i.complete)===null||l===void 0||l.call(i),r.complete()},function(l){var c;a=!1,(c=i.error)===null||c===void 0||c.call(i,l),r.error(l)},function(){var l,c;a&&((l=i.unsubscribe)===null||l===void 0||l.call(i)),(c=i.finalize)===null||c===void 0||c.call(i)}))}):Ct}function Ui(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=Mo(n);return ie(function(i,s){for(var r=n.length,o=new Array(r),a=n.map(function(){return!1}),l=!1,c=function(p){se(n[p]).subscribe(Y(s,function(d){o[p]=d,!l&&!a[p]&&(a[p]=!0,(l=a.every(Ct))&&(a=null))},Cn))},u=0;u<r;u++)c(u);i.subscribe(Y(s,function(p){if(l){var d=Xe([p],ze(o));s.next(t?t.apply(void 0,Xe([],ze(d))):d)}}))})}class os{constructor(){this.registeredProviders=new Map}static async getInstance(e){let t=await e.get("conversation");return t||(t=new os,await e.register("conversation",t),t)}registerProvider(e,t){this.registeredProviders.set(e,t)}}var j=(n=>(n.User="user",n.Agent="agent",n.System="system",n))(j||{});const mc=()=>"10000000-1000-4000-8000-100000000000".replace(/[018]/g,n=>(+n^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+n/4).toString(16)),Yo=()=>typeof crypto.randomUUID=="function"?crypto.randomUUID():mc();function Rr(n){let e=n;const t=/https?:\/\/[^\s<]+/gi,i=/<a [^>]*href="([^"]*)"[^>]*>[^<]*<\/a>/g,s=n.match(t)||[],r=[];let o;for(;(o=i.exec(n))!==null;)r.push(o[1]);return s.filter(l=>!r.includes(l)).forEach(l=>{const c=l.endsWith(".")?l.slice(0,-1):l,u=new RegExp(`(?<!<a[^>]*>)${c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?![^<]*</a>)`,"gi");e=e.replace(u,`<a title='${c}' target='_blank' href='${c}'>${c}</a>`)}),e}function Ni(n){if(n.includes("aceChatGuideTitle"))return vc(n);const e=/<a [^>]*>https?:\/\/[^<]*<\/a>/gim;return n.replace(e,t=>{const i=Qo(t);if(!i)return t;const s=50;if(i.length>s){const r=/^(https?:\/\/[^/]+)(\/.*)?$/i,o=i.match(r);if(!o)return t;const a=o[1],c=(o[2]||"/").split("?")[0],u=c.split("/").pop(),p=s-a.length;let d=c;u&&u.length<p&&c.length>p?d=c.substring(0,p-u.length-4)+".../"+u:d=c.substring(0,p-3)+"...";const g=`${a}${d}`;return Di(t,g)}return Di(t,i)})}function Qo(n){const e=n.match(/href=["']([^'"]*)["']/);if(e&&e.length>1){let t=e[1];return t.endsWith(".")&&(t=t.slice(0,-1)),t}return null}function Di(n,e){return n.replace(/>[^<]*<\/a>/,`>${e}</a>`)}function vc(n){const e=/<a [^>]*aceChatGuideTitle[^>]*>[^<]*<\/a>/gm;return n.replace(e,t=>{const i=Qo(t);if(!i)return t;const s=i.split("?").pop(),o=new URLSearchParams(s).get("aceChatGuideTitle");return o?Di(t,o):t})}class ee{constructor(e,t,i){this.type=e,this.sender=t,this.messages=i,this.status="delivered",this.didUpdate=new P,this.actions$=new P,this.remove$=new P,this.timestamp=Date.now(),this.id=Yo()}update(e){this.messages=[{items:e}],this.didUpdate.next(this)}setStatus(e){this.status=e,this.didUpdate.next(this)}remove(){this.remove$.next()}}class bc{constructor(e){this.name=e,this.print$=new P}print(e,t="html",i=this.name){const s=new ee(j.Agent,{name:i},[{items:[[t,{content:e}]]}]);return this.print$.next(s),s}subscribe(){return this.print$.asObservable()}}class yc{constructor(e){this.name=e,this.print$=new P}print(e){const t=new ee(j.User,{name:this.name},[{items:[["html",{content:e}]]}]);return this.print$.next(t),t}subscribe(){return this.print$.asObservable()}}class $c{constructor(){this.print$=new P,this.name="system"}print(e){const t=new ee(j.System,{name:this.name},[{items:[["html",{content:e}]]}]);return this.print$.next(t),t}subscribe(){return this.print$.asObservable()}}class wc{constructor(e,t){this.name=e,this.component=t,this.print$=new P,this.typingState$=new ce(!1),this.complete$=new P,this.system=this.createSystem(),this.rehydrate$=new P,this.saveToCurrentSession$=new P,this.showChatOverlay$=new ce(!1),this.onComplete=()=>this.complete$.asObservable()}connect(e={}){this.complete$.pipe(fe(1)).subscribe(()=>{this.disconnected()})}disconnected(){}onUserSubmit(e){this.print(j.User,e.text)}print(e,t){const i=new ee(e,{name:""},[{items:[["html",{content:t}]]}]);return this.printEntry(i)}printEntry(e){return this.print$.next(e),e}createAgent(e){const t=new bc(e);return t.subscribe().subscribe(i=>{this.playNotification(),this.printEntry(i)}),t}createUser(e){const t=new yc(e);return t.subscribe().subscribe(i=>{this.printEntry(i)}),t}createSystem(){const e=new $c;return e.subscribe().subscribe(t=>{this.printEntry(t)}),e}setTypingState(e){this.typingState$.next(e)}setToastMessage(e){this.component.setToastMessage(e)}isTyping(){return this.typingState$.asObservable()}actions(){return this.print$.asObservable()}playNotification(){const e=!document.hidden&&this.component.application.storage.get("open"),t="https://publicpoc.blob.core.windows.net/widget-assets/notification.mp3";!this.component.application.storage.get("muteAudioNotifications")&&!e&&new Audio(t).play().catch(s=>{})}complete(){this.complete$.next()}save(e){this.saveToCurrentSession$.next(e)}async rehydrate(e){}}/**
|
|
4
4
|
* @license
|
|
5
5
|
* Copyright 2019 Google LLC
|
|
6
6
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
7
|
-
*/const wn=globalThis,as=wn.ShadowRoot&&(wn.ShadyCSS===void 0||wn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ls=Symbol(),Ir=new WeakMap;let Xo=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==ls)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(as&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=Ir.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Ir.set(t,e))}return e}toString(){return this.cssText}};const xc=n=>new Xo(typeof n=="string"?n:n+"",void 0,ls),A=(n,...e)=>{const t=n.length===1?n[0]:e.reduce((i,s,r)=>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)+n[r+1],n[0]);return new Xo(t,n,ls)},kc=(n,e)=>{if(as)n.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const i=document.createElement("style"),s=wn.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=t.cssText,n.appendChild(i)}},Pr=as?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return xc(t)})(n):n;/**
|
|
7
|
+
*/const wn=globalThis,as=wn.ShadowRoot&&(wn.ShadyCSS===void 0||wn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ls=Symbol(),Ir=new WeakMap;let Xo=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==ls)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(as&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=Ir.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Ir.set(t,e))}return e}toString(){return this.cssText}};const xc=n=>new Xo(typeof n=="string"?n:n+"",void 0,ls),A=(n,...e)=>{const t=n.length===1?n[0]:e.reduce(((i,s,r)=>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)+n[r+1]),n[0]);return new Xo(t,n,ls)},kc=(n,e)=>{if(as)n.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const t of e){const i=document.createElement("style"),s=wn.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=t.cssText,n.appendChild(i)}},Pr=as?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return xc(t)})(n):n;/**
|
|
8
8
|
* @license
|
|
9
9
|
* Copyright 2017 Google LLC
|
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
-
*/const{is:Sc,defineProperty:Cc,getOwnPropertyDescriptor:Ec,getOwnPropertyNames:_c,getOwnPropertySymbols:Tc,getPrototypeOf:Ac}=Object,De=globalThis,Mr=De.trustedTypes,Oc=Mr?Mr.emptyScript:"",yi=De.reactiveElementPolyfillSupport,zt=(n,e)=>n,Tn={toAttribute(n,e){switch(e){case Boolean:n=n?Oc:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch{t=null}}return t}},cs=(n,e)=>!Sc(n,e),Ur={attribute:!0,type:String,converter:Tn,reflect:!1,useDefault:!1,hasChanged:cs};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),De.litPropertyMetadata??(De.litPropertyMetadata=new WeakMap);let ht=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Ur){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(e,i,t);s!==void 0&&Cc(this.prototype,e,s)}}static getPropertyDescriptor(e,t,i){const{get:s,set:r}=Ec(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};return{get:s,set(o){const a=s==null?void 0:s.call(this);r==null||r.call(this,o),this.requestUpdate(e,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Ur}static _$Ei(){if(this.hasOwnProperty(zt("elementProperties")))return;const e=Ac(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(zt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(zt("properties"))){const t=this.properties,i=[..._c(t),...Tc(t)];for(const s of i)this.createProperty(s,t[s])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[i,s]of t)this.elementProperties.set(i,s)}this._$Eh=new Map;for(const[t,i]of this.elementProperties){const s=this._$Eu(t,i);s!==void 0&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const s of i)t.unshift(Pr(s))}else e!==void 0&&t.push(Pr(e));return t}static _$Eu(e,t){const i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return kc(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostConnected)==null?void 0:i.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostDisconnected)==null?void 0:i.call(t)})}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$ET(e,t){var r;const i=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,i);if(s!==void 0&&i.reflect===!0){const o=(((r=i.converter)==null?void 0:r.toAttribute)!==void 0?i.converter:Tn).toAttribute(t,i.type);this._$Em=e,o==null?this.removeAttribute(s):this.setAttribute(s,o),this._$Em=null}}_$AK(e,t){var r,o;const i=this.constructor,s=i._$Eh.get(e);if(s!==void 0&&this._$Em!==s){const a=i.getPropertyOptions(s),l=typeof a.converter=="function"?{fromAttribute:a.converter}:((r=a.converter)==null?void 0:r.fromAttribute)!==void 0?a.converter:Tn;this._$Em=s;const c=l.fromAttribute(t,a.type);this[s]=c??((o=this._$Ej)==null?void 0:o.get(s))??c,this._$Em=null}}requestUpdate(e,t,i){var s;if(e!==void 0){const r=this.constructor,o=this[e];if(i??(i=r.getPropertyOptions(e)),!((i.hasChanged??cs)(o,t)||i.useDefault&&i.reflect&&o===((s=this._$Ej)==null?void 0:s.get(e))&&!this.hasAttribute(r._$Eu(e,i))))return;this.C(e,t,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:i,reflect:s,wrapped:r},o){i&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,o??t??this[e]),r!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||i||(t=void 0),this._$AL.set(e,t)),s===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[r,o]of this._$Ep)this[r]=o;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[r,o]of s){const{wrapped:a}=o,l=this[r];a!==!0||this._$AL.has(r)||l===void 0||this.C(r,void 0,o,l)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(i=this._$EO)==null||i.forEach(s=>{var r;return(r=s.hostUpdate)==null?void 0:r.call(s)}),this.update(t)):this._$EM()}catch(s){throw e=!1,this._$EM(),s}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(i=>{var s;return(s=i.hostUpdated)==null?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};ht.elementStyles=[],ht.shadowRootOptions={mode:"open"},ht[zt("elementProperties")]=new Map,ht[zt("finalized")]=new Map,yi==null||yi({ReactiveElement:ht}),(De.reactiveElementVersions??(De.reactiveElementVersions=[])).push("2.1.1");/**
|
|
11
|
+
*/const{is:Sc,defineProperty:Cc,getOwnPropertyDescriptor:Ec,getOwnPropertyNames:_c,getOwnPropertySymbols:Tc,getPrototypeOf:Ac}=Object,De=globalThis,Mr=De.trustedTypes,Oc=Mr?Mr.emptyScript:"",yi=De.reactiveElementPolyfillSupport,zt=(n,e)=>n,Tn={toAttribute(n,e){switch(e){case Boolean:n=n?Oc:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch{t=null}}return t}},cs=(n,e)=>!Sc(n,e),Ur={attribute:!0,type:String,converter:Tn,reflect:!1,useDefault:!1,hasChanged:cs};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),De.litPropertyMetadata??(De.litPropertyMetadata=new WeakMap);let ht=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Ur){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(e,i,t);s!==void 0&&Cc(this.prototype,e,s)}}static getPropertyDescriptor(e,t,i){const{get:s,set:r}=Ec(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};return{get:s,set(o){const a=s==null?void 0:s.call(this);r==null||r.call(this,o),this.requestUpdate(e,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Ur}static _$Ei(){if(this.hasOwnProperty(zt("elementProperties")))return;const e=Ac(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(zt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(zt("properties"))){const t=this.properties,i=[..._c(t),...Tc(t)];for(const s of i)this.createProperty(s,t[s])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[i,s]of t)this.elementProperties.set(i,s)}this._$Eh=new Map;for(const[t,i]of this.elementProperties){const s=this._$Eu(t,i);s!==void 0&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const s of i)t.unshift(Pr(s))}else e!==void 0&&t.push(Pr(e));return t}static _$Eu(e,t){const i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach((t=>t(this)))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return kc(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach((t=>{var i;return(i=t.hostConnected)==null?void 0:i.call(t)}))}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach((t=>{var i;return(i=t.hostDisconnected)==null?void 0:i.call(t)}))}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$ET(e,t){var r;const i=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,i);if(s!==void 0&&i.reflect===!0){const o=(((r=i.converter)==null?void 0:r.toAttribute)!==void 0?i.converter:Tn).toAttribute(t,i.type);this._$Em=e,o==null?this.removeAttribute(s):this.setAttribute(s,o),this._$Em=null}}_$AK(e,t){var r,o;const i=this.constructor,s=i._$Eh.get(e);if(s!==void 0&&this._$Em!==s){const a=i.getPropertyOptions(s),l=typeof a.converter=="function"?{fromAttribute:a.converter}:((r=a.converter)==null?void 0:r.fromAttribute)!==void 0?a.converter:Tn;this._$Em=s;const c=l.fromAttribute(t,a.type);this[s]=c??((o=this._$Ej)==null?void 0:o.get(s))??c,this._$Em=null}}requestUpdate(e,t,i){var s;if(e!==void 0){const r=this.constructor,o=this[e];if(i??(i=r.getPropertyOptions(e)),!((i.hasChanged??cs)(o,t)||i.useDefault&&i.reflect&&o===((s=this._$Ej)==null?void 0:s.get(e))&&!this.hasAttribute(r._$Eu(e,i))))return;this.C(e,t,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:i,reflect:s,wrapped:r},o){i&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,o??t??this[e]),r!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||i||(t=void 0),this._$AL.set(e,t)),s===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[r,o]of this._$Ep)this[r]=o;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[r,o]of s){const{wrapped:a}=o,l=this[r];a!==!0||this._$AL.has(r)||l===void 0||this.C(r,void 0,o,l)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(i=this._$EO)==null||i.forEach((s=>{var r;return(r=s.hostUpdate)==null?void 0:r.call(s)})),this.update(t)):this._$EM()}catch(s){throw e=!1,this._$EM(),s}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach((i=>{var s;return(s=i.hostUpdated)==null?void 0:s.call(i)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach((t=>this._$ET(t,this[t])))),this._$EM()}updated(e){}firstUpdated(e){}};ht.elementStyles=[],ht.shadowRootOptions={mode:"open"},ht[zt("elementProperties")]=new Map,ht[zt("finalized")]=new Map,yi==null||yi({ReactiveElement:ht}),(De.reactiveElementVersions??(De.reactiveElementVersions=[])).push("2.1.1");/**
|
|
12
12
|
* @license
|
|
13
13
|
* Copyright 2017 Google LLC
|
|
14
14
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
* @license
|
|
47
47
|
* Copyright 2018 Google LLC
|
|
48
48
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
49
|
-
*/const wt=rn(class extends Jn{constructor(n){var e;if(super(n),n.type!==sn.ATTRIBUTE||n.name!=="class"||((e=n.strings)==null?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(n){return" "+Object.keys(n).filter(e=>n[e]).join(" ")+" "}update(n,[e]){var i,s;if(this.st===void 0){this.st=new Set,n.strings!==void 0&&(this.nt=new Set(n.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(const r in e)e[r]&&!((i=this.nt)!=null&&i.has(r))&&this.st.add(r);return this.render(e)}const t=n.element.classList;for(const r of this.st)r in e||(t.remove(r),this.st.delete(r));for(const r in e){const o=!!e[r];o===this.st.has(r)||(s=this.nt)!=null&&s.has(r)||(o?(t.add(r),this.st.add(r)):(t.remove(r),this.st.delete(r)))}return Ae}});var eh=Object.defineProperty,th=(n,e,t,i)=>{for(var s=void 0,r=n.length-1,o;r>=0;r--)(o=n[r])&&(s=o(e,t,s)||s);return s&&eh(e,t,s),s};const Ls=class Ls extends _{constructor(){super(...arguments),this.anchor="BottomRight"}appendChild(e){var t;return(t=this.shadowRoot)==null||t.appendChild(e),e}render(){return this.anchor==="BottomLeft"?this.renderRoot.host.classList.add("bottom-left"):this.anchor==="BottomRight"&&this.renderRoot.host.classList.add("bottom-right"),w}};Ls.styles=[A`
|
|
49
|
+
*/const wt=rn(class extends Jn{constructor(n){var e;if(super(n),n.type!==sn.ATTRIBUTE||n.name!=="class"||((e=n.strings)==null?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(n){return" "+Object.keys(n).filter((e=>n[e])).join(" ")+" "}update(n,[e]){var i,s;if(this.st===void 0){this.st=new Set,n.strings!==void 0&&(this.nt=new Set(n.strings.join(" ").split(/\s/).filter((r=>r!==""))));for(const r in e)e[r]&&!((i=this.nt)!=null&&i.has(r))&&this.st.add(r);return this.render(e)}const t=n.element.classList;for(const r of this.st)r in e||(t.remove(r),this.st.delete(r));for(const r in e){const o=!!e[r];o===this.st.has(r)||(s=this.nt)!=null&&s.has(r)||(o?(t.add(r),this.st.add(r)):(t.remove(r),this.st.delete(r)))}return Ae}});var eh=Object.defineProperty,th=(n,e,t,i)=>{for(var s=void 0,r=n.length-1,o;r>=0;r--)(o=n[r])&&(s=o(e,t,s)||s);return s&&eh(e,t,s),s};const Ls=class Ls extends _{constructor(){super(...arguments),this.anchor="BottomRight"}appendChild(e){var t;return(t=this.shadowRoot)==null||t.appendChild(e),e}render(){return this.anchor==="BottomLeft"?this.renderRoot.host.classList.add("bottom-left"):this.anchor==="BottomRight"&&this.renderRoot.host.classList.add("bottom-right"),w}};Ls.styles=[A`
|
|
50
50
|
:host {
|
|
51
51
|
position: fixed;
|
|
52
52
|
display: flex;
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
bottom: 20px;
|
|
63
63
|
left: 20px;
|
|
64
64
|
}
|
|
65
|
-
`];let Mn=Ls;th([k({attribute:!0})],Mn.prototype,"anchor");const nh=new WeakMap;let io=0;const Si=new Map,so=new WeakSet,ro=()=>new Promise(n=>requestAnimationFrame(n)),ih=[{transform:"translateX(100%) scale(0)",opacity:0}],sh=[{opacity:0}],oo=[{opacity:0},{opacity:1}],ao=(n,e)=>{const t=n-e;return t===0?void 0:t},lo=(n,e)=>{const t=n/e;return t===1?void 0:t},Ci={left:(n,e)=>{const t=ao(n,e);return{value:t,transform:t==null||isNaN(t)?void 0:`translateX(${t}px)`}},top:(n,e)=>{const t=ao(n,e);return{value:t,transform:t==null||isNaN(t)?void 0:`translateY(${t}px)`}},width:(n,e)=>{let t;e===0&&(e=1,t={width:"1px"});const i=lo(n,e);return{value:i,overrideFrom:t,transform:i==null||isNaN(i)?void 0:`scaleX(${i})`}},height:(n,e)=>{let t;e===0&&(e=1,t={height:"1px"});const i=lo(n,e);return{value:i,overrideFrom:t,transform:i==null||isNaN(i)?void 0:`scaleY(${i})`}}},rh={duration:333,easing:"ease-in-out"},oh=["left","top","width","height","opacity","color","background"],co=new WeakMap;class ah extends Sa{constructor(e){if(super(e),this.t=!1,this.i=null,this.o=null,this.h=!0,this.shouldLog=!1,e.type===sn.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var e;(e=this.resolveFinished)==null||e.call(this),this.finished=new Promise(t=>{this.l=t})}async resolveFinished(){var e;(e=this.l)==null||e.call(this),this.l=void 0}render(e){return w}getController(){return nh.get(this.u)}isDisabled(){var e;return this.options.disabled||((e=this.getController())==null?void 0:e.disabled)}update(e,[t]){var s;const i=this.u===void 0;return i&&(this.u=(s=e.options)==null?void 0:s.host,this.u.addController(this),this.u.updateComplete.then(r=>this.t=!0),this.element=e.element,co.set(this.element,this)),this.optionsOrCallback=t,(i||typeof t!="function")&&this.p(t),this.render(t)}p(e){e=e??{};const t=this.getController();t!==void 0&&((e={...t.defaultOptions,...e}).keyframeOptions={...t.defaultOptions.keyframeOptions,...e.keyframeOptions}),e.properties??(e.properties=oh),this.options=e}m(){const e={},t=this.element.getBoundingClientRect(),i=getComputedStyle(this.element);return this.options.properties.forEach(s=>{const r=t[s]??(Ci[s]?void 0:i[s]),o=Number(r);e[s]=isNaN(o)?r+"":o}),e}v(){let e,t=!0;return this.options.guard&&(e=this.options.guard(),t=((i,s)=>{if(Array.isArray(i)){if(Array.isArray(s)&&s.length===i.length&&i.every((r,o)=>r===s[o]))return!1}else if(s===i)return!1;return!0})(e,this._)),this.h=this.t&&!this.isDisabled()&&!this.isAnimating()&&t&&this.element.isConnected,this.h&&(this._=Array.isArray(e)?Array.from(e):e),this.h}hostUpdate(){typeof this.optionsOrCallback=="function"&&this.p(this.optionsOrCallback()),this.v()&&(this.A=this.m(),this.i=this.i??this.element.parentNode,this.o=this.element.nextSibling)}async hostUpdated(){if(!this.h||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let e;this.prepare(),await ro;const t=this.O(),i=this.j(this.options.keyframeOptions,t),s=this.m();if(this.A!==void 0){const{from:r,to:o}=this.N(this.A,s,t);this.log("measured",[this.A,s,r,o]),e=this.calculateKeyframes(r,o)}else{const r=Si.get(this.options.inId);if(r){Si.delete(this.options.inId);const{from:o,to:a}=this.N(r,s,t);e=this.calculateKeyframes(o,a),e=this.options.in?[{...this.options.in[0],...e[0]},...this.options.in.slice(1),e[1]]:e,io++,e.forEach(l=>l.zIndex=io)}else this.options.in&&(e=[...this.options.in,{}])}this.animate(e,i)}resetStyles(){this.P!==void 0&&(this.element.setAttribute("style",this.P??""),this.P=void 0)}commitStyles(){var e,t;this.P=this.element.getAttribute("style"),(e=this.webAnimation)==null||e.commitStyles(),(t=this.webAnimation)==null||t.cancel()}reconnected(){}async disconnected(){var t;if(!this.h||(this.options.id!==void 0&&Si.set(this.options.id,this.A),this.options.out===void 0))return;if(this.prepare(),await ro(),(t=this.i)==null?void 0:t.isConnected){const i=this.o&&this.o.parentNode===this.i?this.o:null;if(this.i.insertBefore(this.element,i),this.options.stabilizeOut){const s=this.m();this.log("stabilizing out");const r=this.A.left-s.left,o=this.A.top-s.top;getComputedStyle(this.element).position!=="static"||r===0&&o===0||(this.element.style.position="relative"),r!==0&&(this.element.style.left=r+"px"),o!==0&&(this.element.style.top=o+"px")}}const e=this.j(this.options.keyframeOptions);await this.animate(this.options.out,e),this.element.remove()}prepare(){this.createFinished()}start(){var e,t;(t=(e=this.options).onStart)==null||t.call(e,this)}didFinish(e){var t,i;e&&((i=(t=this.options).onComplete)==null||i.call(t,this)),this.A=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}O(){const e=[];for(let t=this.element.parentNode;t;t=t==null?void 0:t.parentNode){const i=co.get(t);i&&!i.isDisabled()&&i&&e.push(i)}return e}get isHostRendered(){const e=so.has(this.u);return e||this.u.updateComplete.then(()=>{so.add(this.u)}),e}j(e,t=this.O()){const i={...rh};return t.forEach(s=>Object.assign(i,s.options.keyframeOptions)),Object.assign(i,e),i}N(e,t,i){e={...e},t={...t};const s=i.map(a=>a.animatingProperties).filter(a=>a!==void 0);let r=1,o=1;return s.length>0&&(s.forEach(a=>{a.width&&(r/=a.width),a.height&&(o/=a.height)}),e.left!==void 0&&t.left!==void 0&&(e.left=r*e.left,t.left=r*t.left),e.top!==void 0&&t.top!==void 0&&(e.top=o*e.top,t.top=o*t.top)),{from:e,to:t}}calculateKeyframes(e,t,i=!1){const s={},r={};let o=!1;const a={};for(const l in t){const c=e[l],u=t[l];if(l in Ci){const p=Ci[l];if(c===void 0||u===void 0)continue;const d=p(c,u);d.transform!==void 0&&(a[l]=d.value,o=!0,s.transform=`${s.transform??""} ${d.transform}`,d.overrideFrom!==void 0&&Object.assign(s,d.overrideFrom))}else c!==u&&c!==void 0&&u!==void 0&&(o=!0,s[l]=c,r[l]=u)}return s.transformOrigin=r.transformOrigin=i?"center center":"top left",this.animatingProperties=a,o?[s,r]:void 0}async animate(e,t=this.options.keyframeOptions){this.start(),this.frames=e;let i=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=e=this.options.onFrames(this),this.log("modified frames",e)),e!==void 0)){this.log("animate",[e,t]),i=!0,this.webAnimation=this.element.animate(e,t);const s=this.getController();s==null||s.add(this);try{await this.webAnimation.finished}catch{}s==null||s.remove(this)}return this.didFinish(i),i}isAnimating(){var e,t;return((e=this.webAnimation)==null?void 0:e.playState)==="running"||((t=this.webAnimation)==null?void 0:t.pending)}log(e,t){this.shouldLog&&!this.isDisabled()&&console.log(e,this.options.id,t)}}const qi=rn(ah),xe=(n,e,t)=>{n&&t.style.setProperty(e,n)},Ca=(n,e)=>{var t,i,s,r,o,a,l,c,u;xe((t=n.colors)==null?void 0:t.primaryBackground,"--primary-background",e),xe((i=n.colors)==null?void 0:i.textOnPrimaryBackground,"--text-on-primary-background",e),xe((s=n.colors)==null?void 0:s.secondaryBackground,"--secondary-background",e),xe((r=n.colors)==null?void 0:r.textOnSecondaryBackground,"--text-on-secondary-background",e),xe((o=n.colors)==null?void 0:o.interactiveDestructiveBackground,"--destructive-color",e),xe((a=n.colors)==null?void 0:a.interactiveTextOnDestructiveBackground,"--text-on-destructive-color",e),xe((l=n.colors)==null?void 0:l.interactivePrimaryBackground,"--interactive-primary-background",e),xe((c=n.colors)==null?void 0:c.interactiveTextOnPrimaryBackground,"--interactive-text-on-primary-background",e),xe((u=n.colors)==null?void 0:u.focusColor,"--focus-color",e)};var lh=Object.defineProperty,on=(n,e,t,i)=>{for(var s=void 0,r=n.length-1,o;r>=0;r--)(o=n[r])&&(s=o(e,t,s)||s);return s&&lh(e,t,s),s};const Rs=class Rs extends _{constructor(){super(...arguments),this.active=!1,this.triggerVisible=!0,this.loaded=!1,this.containerRef=ge(),this.widgetActive$=new ce(!1),this.componentIsDestroyed$=new P}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(),this.loaded=!0,this._applyBranding()}disconnectedCallback(){super.disconnectedCallback(),this.componentIsDestroyed$.next(),this.componentIsDestroyed$.complete()}toggleActive(){var e;if(!((e=this.application)!=null&&e.root)){console.warn("Could not activate widget. No root element assigned to widget.");return}this.active=!this.active,this.active?(this.application.appendToDOM(),this.notify("widget-set-active",{widgetId:this.application.id,active:!0}),this.widgetActive$.next(!0),this.hideTrigger()):(this.application.hide(),this.notify("widget-set-active",{widgetId:this.application.id,active:!1}),this.widgetActive$.next(!1),this.showTrigger())}notify(e,t={}){window!=null&&window.parent&&window.parent.postMessage({type:e,data:t},"*")}_applyBranding(){var e;(e=this.application)!=null&&e.settings&&Ca(this.application.settings.branding,this)}async _renderSymbol(){var a,l,c;const e=(a=this.application)==null?void 0:a.branding(),t=(l=e==null?void 0:e.graphics)==null?void 0:l.trigger;if(t)return y` <img src=${t} class="trigger-icon" alt="" /> `;const i=(c=this.application)==null?void 0:c.triggerIcon;if(!i)return w;const s=async u=>Gc,{type:r,content:o}=i;switch(r){case"Telia":{const u=await s();return u?y`<telia-icon
|
|
65
|
+
`];let Mn=Ls;th([k({attribute:!0})],Mn.prototype,"anchor");const nh=new WeakMap;let io=0;const Si=new Map,so=new WeakSet,ro=()=>new Promise((n=>requestAnimationFrame(n))),ih=[{transform:"translateX(100%) scale(0)",opacity:0}],sh=[{opacity:0}],oo=[{opacity:0},{opacity:1}],ao=(n,e)=>{const t=n-e;return t===0?void 0:t},lo=(n,e)=>{const t=n/e;return t===1?void 0:t},Ci={left:(n,e)=>{const t=ao(n,e);return{value:t,transform:t==null||isNaN(t)?void 0:`translateX(${t}px)`}},top:(n,e)=>{const t=ao(n,e);return{value:t,transform:t==null||isNaN(t)?void 0:`translateY(${t}px)`}},width:(n,e)=>{let t;e===0&&(e=1,t={width:"1px"});const i=lo(n,e);return{value:i,overrideFrom:t,transform:i==null||isNaN(i)?void 0:`scaleX(${i})`}},height:(n,e)=>{let t;e===0&&(e=1,t={height:"1px"});const i=lo(n,e);return{value:i,overrideFrom:t,transform:i==null||isNaN(i)?void 0:`scaleY(${i})`}}},rh={duration:333,easing:"ease-in-out"},oh=["left","top","width","height","opacity","color","background"],co=new WeakMap;class ah extends Sa{constructor(e){if(super(e),this.t=!1,this.i=null,this.o=null,this.h=!0,this.shouldLog=!1,e.type===sn.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var e;(e=this.resolveFinished)==null||e.call(this),this.finished=new Promise((t=>{this.l=t}))}async resolveFinished(){var e;(e=this.l)==null||e.call(this),this.l=void 0}render(e){return w}getController(){return nh.get(this.u)}isDisabled(){var e;return this.options.disabled||((e=this.getController())==null?void 0:e.disabled)}update(e,[t]){var s;const i=this.u===void 0;return i&&(this.u=(s=e.options)==null?void 0:s.host,this.u.addController(this),this.u.updateComplete.then((r=>this.t=!0)),this.element=e.element,co.set(this.element,this)),this.optionsOrCallback=t,(i||typeof t!="function")&&this.p(t),this.render(t)}p(e){e=e??{};const t=this.getController();t!==void 0&&((e={...t.defaultOptions,...e}).keyframeOptions={...t.defaultOptions.keyframeOptions,...e.keyframeOptions}),e.properties??(e.properties=oh),this.options=e}m(){const e={},t=this.element.getBoundingClientRect(),i=getComputedStyle(this.element);return this.options.properties.forEach((s=>{const r=t[s]??(Ci[s]?void 0:i[s]),o=Number(r);e[s]=isNaN(o)?r+"":o})),e}v(){let e,t=!0;return this.options.guard&&(e=this.options.guard(),t=((i,s)=>{if(Array.isArray(i)){if(Array.isArray(s)&&s.length===i.length&&i.every(((r,o)=>r===s[o])))return!1}else if(s===i)return!1;return!0})(e,this._)),this.h=this.t&&!this.isDisabled()&&!this.isAnimating()&&t&&this.element.isConnected,this.h&&(this._=Array.isArray(e)?Array.from(e):e),this.h}hostUpdate(){typeof this.optionsOrCallback=="function"&&this.p(this.optionsOrCallback()),this.v()&&(this.A=this.m(),this.i=this.i??this.element.parentNode,this.o=this.element.nextSibling)}async hostUpdated(){if(!this.h||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let e;this.prepare(),await ro;const t=this.O(),i=this.j(this.options.keyframeOptions,t),s=this.m();if(this.A!==void 0){const{from:r,to:o}=this.N(this.A,s,t);this.log("measured",[this.A,s,r,o]),e=this.calculateKeyframes(r,o)}else{const r=Si.get(this.options.inId);if(r){Si.delete(this.options.inId);const{from:o,to:a}=this.N(r,s,t);e=this.calculateKeyframes(o,a),e=this.options.in?[{...this.options.in[0],...e[0]},...this.options.in.slice(1),e[1]]:e,io++,e.forEach((l=>l.zIndex=io))}else this.options.in&&(e=[...this.options.in,{}])}this.animate(e,i)}resetStyles(){this.P!==void 0&&(this.element.setAttribute("style",this.P??""),this.P=void 0)}commitStyles(){var e,t;this.P=this.element.getAttribute("style"),(e=this.webAnimation)==null||e.commitStyles(),(t=this.webAnimation)==null||t.cancel()}reconnected(){}async disconnected(){var t;if(!this.h||(this.options.id!==void 0&&Si.set(this.options.id,this.A),this.options.out===void 0))return;if(this.prepare(),await ro(),(t=this.i)==null?void 0:t.isConnected){const i=this.o&&this.o.parentNode===this.i?this.o:null;if(this.i.insertBefore(this.element,i),this.options.stabilizeOut){const s=this.m();this.log("stabilizing out");const r=this.A.left-s.left,o=this.A.top-s.top;getComputedStyle(this.element).position!=="static"||r===0&&o===0||(this.element.style.position="relative"),r!==0&&(this.element.style.left=r+"px"),o!==0&&(this.element.style.top=o+"px")}}const e=this.j(this.options.keyframeOptions);await this.animate(this.options.out,e),this.element.remove()}prepare(){this.createFinished()}start(){var e,t;(t=(e=this.options).onStart)==null||t.call(e,this)}didFinish(e){var t,i;e&&((i=(t=this.options).onComplete)==null||i.call(t,this)),this.A=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}O(){const e=[];for(let t=this.element.parentNode;t;t=t==null?void 0:t.parentNode){const i=co.get(t);i&&!i.isDisabled()&&i&&e.push(i)}return e}get isHostRendered(){const e=so.has(this.u);return e||this.u.updateComplete.then((()=>{so.add(this.u)})),e}j(e,t=this.O()){const i={...rh};return t.forEach((s=>Object.assign(i,s.options.keyframeOptions))),Object.assign(i,e),i}N(e,t,i){e={...e},t={...t};const s=i.map((a=>a.animatingProperties)).filter((a=>a!==void 0));let r=1,o=1;return s.length>0&&(s.forEach((a=>{a.width&&(r/=a.width),a.height&&(o/=a.height)})),e.left!==void 0&&t.left!==void 0&&(e.left=r*e.left,t.left=r*t.left),e.top!==void 0&&t.top!==void 0&&(e.top=o*e.top,t.top=o*t.top)),{from:e,to:t}}calculateKeyframes(e,t,i=!1){const s={},r={};let o=!1;const a={};for(const l in t){const c=e[l],u=t[l];if(l in Ci){const p=Ci[l];if(c===void 0||u===void 0)continue;const d=p(c,u);d.transform!==void 0&&(a[l]=d.value,o=!0,s.transform=`${s.transform??""} ${d.transform}`,d.overrideFrom!==void 0&&Object.assign(s,d.overrideFrom))}else c!==u&&c!==void 0&&u!==void 0&&(o=!0,s[l]=c,r[l]=u)}return s.transformOrigin=r.transformOrigin=i?"center center":"top left",this.animatingProperties=a,o?[s,r]:void 0}async animate(e,t=this.options.keyframeOptions){this.start(),this.frames=e;let i=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=e=this.options.onFrames(this),this.log("modified frames",e)),e!==void 0)){this.log("animate",[e,t]),i=!0,this.webAnimation=this.element.animate(e,t);const s=this.getController();s==null||s.add(this);try{await this.webAnimation.finished}catch{}s==null||s.remove(this)}return this.didFinish(i),i}isAnimating(){var e,t;return((e=this.webAnimation)==null?void 0:e.playState)==="running"||((t=this.webAnimation)==null?void 0:t.pending)}log(e,t){this.shouldLog&&!this.isDisabled()&&console.log(e,this.options.id,t)}}const qi=rn(ah),xe=(n,e,t)=>{n&&t.style.setProperty(e,n)},Ca=(n,e)=>{var t,i,s,r,o,a,l,c,u;xe((t=n.colors)==null?void 0:t.primaryBackground,"--primary-background",e),xe((i=n.colors)==null?void 0:i.textOnPrimaryBackground,"--text-on-primary-background",e),xe((s=n.colors)==null?void 0:s.secondaryBackground,"--secondary-background",e),xe((r=n.colors)==null?void 0:r.textOnSecondaryBackground,"--text-on-secondary-background",e),xe((o=n.colors)==null?void 0:o.interactiveDestructiveBackground,"--destructive-color",e),xe((a=n.colors)==null?void 0:a.interactiveTextOnDestructiveBackground,"--text-on-destructive-color",e),xe((l=n.colors)==null?void 0:l.interactivePrimaryBackground,"--interactive-primary-background",e),xe((c=n.colors)==null?void 0:c.interactiveTextOnPrimaryBackground,"--interactive-text-on-primary-background",e),xe((u=n.colors)==null?void 0:u.focusColor,"--focus-color",e)};var lh=Object.defineProperty,on=(n,e,t,i)=>{for(var s=void 0,r=n.length-1,o;r>=0;r--)(o=n[r])&&(s=o(e,t,s)||s);return s&&lh(e,t,s),s};const Rs=class Rs extends _{constructor(){super(...arguments),this.active=!1,this.triggerVisible=!0,this.loaded=!1,this.containerRef=ge(),this.widgetActive$=new ce(!1),this.componentIsDestroyed$=new P}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(),this.loaded=!0,this._applyBranding()}disconnectedCallback(){super.disconnectedCallback(),this.componentIsDestroyed$.next(),this.componentIsDestroyed$.complete()}toggleActive(){var e;if(!((e=this.application)!=null&&e.root)){console.warn("Could not activate widget. No root element assigned to widget.");return}this.active=!this.active,this.active?(this.application.appendToDOM(),this.notify("widget-set-active",{widgetId:this.application.id,active:!0}),this.widgetActive$.next(!0),this.hideTrigger()):(this.application.hide(),this.notify("widget-set-active",{widgetId:this.application.id,active:!1}),this.widgetActive$.next(!1),this.showTrigger())}notify(e,t={}){window!=null&&window.parent&&window.parent.postMessage({type:e,data:t},"*")}_applyBranding(){var e;(e=this.application)!=null&&e.settings&&Ca(this.application.settings.branding,this)}async _renderSymbol(){var a,l,c;const e=(a=this.application)==null?void 0:a.branding(),t=(l=e==null?void 0:e.graphics)==null?void 0:l.trigger;if(t)return y` <img src=${t} class="trigger-icon" alt="" /> `;const i=(c=this.application)==null?void 0:c.triggerIcon;if(!i)return w;const s=async u=>Gc,{type:r,content:o}=i;switch(r){case"Telia":{const u=await s();return u?y`<telia-icon
|
|
66
66
|
class="trigger-icon"
|
|
67
67
|
svg=${u.svg}
|
|
68
68
|
size="lg"
|
|
@@ -290,11 +290,11 @@
|
|
|
290
290
|
* @license
|
|
291
291
|
* Copyright 2017 Google LLC
|
|
292
292
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
293
|
-
*/function ph({context:n}){return(e,t)=>{const i=new WeakMap;if(typeof t=="object")return{get(){return e.get.call(this)},set(s){return i.get(this).setValue(s),e.set.call(this,s)},init(s){return i.set(this,new ho(this,{context:n,initialValue:s})),s}};{e.constructor.addInitializer(o=>{i.set(o,new ho(o,{context:n}))});const s=Object.getOwnPropertyDescriptor(e,t);let r;if(s===void 0){const o=new WeakMap;r={get(){return o.get(this)},set(a){i.get(this).setValue(a),o.set(this,a)},configurable:!0,enumerable:!0}}else{const o=s.set;r={...s,set(a){i.get(this).setValue(a),o==null||o.call(this,a)}}}return void Object.defineProperty(e,t,r)}}}/**
|
|
293
|
+
*/function ph({context:n}){return(e,t)=>{const i=new WeakMap;if(typeof t=="object")return{get(){return e.get.call(this)},set(s){return i.get(this).setValue(s),e.set.call(this,s)},init(s){return i.set(this,new ho(this,{context:n,initialValue:s})),s}};{e.constructor.addInitializer((o=>{i.set(o,new ho(o,{context:n}))}));const s=Object.getOwnPropertyDescriptor(e,t);let r;if(s===void 0){const o=new WeakMap;r={get(){return o.get(this)},set(a){i.get(this).setValue(a),o.set(this,a)},configurable:!0,enumerable:!0}}else{const o=s.set;r={...s,set(a){i.get(this).setValue(a),o==null||o.call(this,a)}}}return void Object.defineProperty(e,t,r)}}}/**
|
|
294
294
|
* @license
|
|
295
295
|
* Copyright 2022 Google LLC
|
|
296
296
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
297
|
-
*/function he({context:n,subscribe:e}){return(t,i)=>{typeof i=="object"?i.addInitializer(function(){new uo(this,{context:n,callback:s=>{t.set.call(this,s)},subscribe:e})}):t.constructor.addInitializer(s=>{new uo(s,{context:n,callback:r=>{s[i]=r},subscribe:e})})}}var fh=Object.defineProperty,Ta=(n,e,t,i)=>{for(var s=void 0,r=n.length-1,o;r>=0;r--)(o=n[r])&&(s=o(e,t,s)||s);return s&&fh(e,t,s),s};const re="application",Ps=class Ps extends _{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=ge(),this.fullscreen=!1,this.isReady=new ce(!1)}addChild(e){e.parent=this,this.nodes.push(e)}applyBranding(){if(!this.wrapperRef.value)return;const e=this.application.settings;e!=null&&e.branding&&Ca(e.branding,this.wrapperRef.value)}applyStyles(){if(!this.wrapperRef.value)return;const e=this.application.styles(),t=this.wrapperRef.value;Object.entries(e).forEach(([i,s])=>{t.style.setProperty(`--${i}`,s)})}firstUpdated(e){this.applyBranding(),this.applyStyles()}render(){var i,s;const e=this.application.settings.components.conversation;return((s=(i=e==null?void 0:e.properties)==null?void 0:i.chat)==null?void 0:s.isThirdPartyWidget)?this.renderRoot.host.classList.add("third-party"):this.application.renderStrategy===ms.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")),this.application.fullscreen&&this.renderRoot.host.classList.add("fullscreen"),window.self!==window.top&&this.renderRoot.host.classList.add("embedded"),y`<div class="widget-container" ${me(this.wrapperRef)}>
|
|
297
|
+
*/function he({context:n,subscribe:e}){return(t,i)=>{typeof i=="object"?i.addInitializer((function(){new uo(this,{context:n,callback:s=>{t.set.call(this,s)},subscribe:e})})):t.constructor.addInitializer((s=>{new uo(s,{context:n,callback:r=>{s[i]=r},subscribe:e})}))}}var fh=Object.defineProperty,Ta=(n,e,t,i)=>{for(var s=void 0,r=n.length-1,o;r>=0;r--)(o=n[r])&&(s=o(e,t,s)||s);return s&&fh(e,t,s),s};const re="application",Ps=class Ps extends _{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=ge(),this.fullscreen=!1,this.isReady=new ce(!1)}addChild(e){e.parent=this,this.nodes.push(e)}applyBranding(){if(!this.wrapperRef.value)return;const e=this.application.settings;e!=null&&e.branding&&Ca(e.branding,this.wrapperRef.value)}applyStyles(){if(!this.wrapperRef.value)return;const e=this.application.styles(),t=this.wrapperRef.value;Object.entries(e).forEach(([i,s])=>{t.style.setProperty(`--${i}`,s)})}firstUpdated(e){this.applyBranding(),this.applyStyles()}render(){var i,s;const e=this.application.settings.components.conversation;return((s=(i=e==null?void 0:e.properties)==null?void 0:i.chat)==null?void 0:s.isThirdPartyWidget)?this.renderRoot.host.classList.add("third-party"):this.application.renderStrategy===ms.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")),this.application.fullscreen&&this.renderRoot.host.classList.add("fullscreen"),window.self!==window.top&&this.renderRoot.host.classList.add("embedded"),y`<div class="widget-container" ${me(this.wrapperRef)}>
|
|
298
298
|
${uh(this.nodes,r=>r)}
|
|
299
299
|
</div>`}};Ps.styles=A`
|
|
300
300
|
:host {
|
|
@@ -2208,7 +2208,7 @@ Please report this to https://github.com/markedjs/marked.`,n){const i="<p>An err
|
|
|
2208
2208
|
* @license
|
|
2209
2209
|
* Copyright 2018 Google LLC
|
|
2210
2210
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2211
|
-
*/const Xa="important",dp=" !"+Xa,pp=rn(class extends Jn{constructor(n){var e;if(super(n),n.type!==sn.ATTRIBUTE||n.name!=="style"||((e=n.strings)==null?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(n){return Object.keys(n).reduce((e,t)=>{const i=n[t];return i==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(n,[e]){const{style:t}=n.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const i of this.ft)e[i]==null&&(this.ft.delete(i),i.includes("-")?t.removeProperty(i):t[i]=null);for(const i in e){const s=e[i];if(s!=null){this.ft.add(i);const r=typeof s=="string"&&s.endsWith(dp);i.includes("-")||r?t.setProperty(i,r?s.slice(0,-11):s,r?Xa:""):t[i]=s}}return Ae}});var fp=Object.defineProperty,gp=(n,e,t,i)=>{for(var s=void 0,r=n.length-1,o;r>=0;r--)(o=n[r])&&(s=o(e,t,s)||s);return s&&fp(e,t,s),s};const Js=class Js extends _{constructor(e,t){super(),this.primaryColor="",this.secondaryColor="",this.tertiaryColor="",this.headerHeight=0,this.copyrightHeight=0,this.userUrl=new URL(e),this.userUrl.searchParams.set("lang","en"),this.userUrl.searchParams.set("guestId",t)}connectedCallback(){var s;super.connectedCallback();const e=this.application.getComponent("widget-header");e&&(this.headerHeight=e.getBoundingClientRect().height);const t=this.application.getComponent("copyright");t&&(this.copyrightHeight=t.getBoundingClientRect().height);const i=(s=this.application.settings)==null?void 0:s.branding.colors;this.primaryColor=i.interactivePrimaryBackground,this.secondaryColor=i.interactiveTextOnPrimaryBackground,this.tertiaryColor=i.interactiveDestructiveBackground,this.primaryColor&&this.userUrl.searchParams.set("primaryColor",this.primaryColor),this.secondaryColor&&this.userUrl.searchParams.set("secondaryColor",this.secondaryColor),this.tertiaryColor&&this.userUrl.searchParams.set("tertiaryColor",this.tertiaryColor)}getSpacingMd(){const t=getComputedStyle(this).getPropertyValue("--spacing-md").trim();if(t.endsWith("rem")){const s=parseFloat(getComputedStyle(this).fontSize);return parseFloat(t)*s}const i=parseFloat(t);return isNaN(i)?0:i}render(){const e=this.getSpacingMd(),t={top:this.headerHeight+e+"px",bottom:this.copyrightHeight+e+"px"};return y` <div class="container" style=${pp(t)}>
|
|
2211
|
+
*/const Xa="important",dp=" !"+Xa,pp=rn(class extends Jn{constructor(n){var e;if(super(n),n.type!==sn.ATTRIBUTE||n.name!=="style"||((e=n.strings)==null?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(n){return Object.keys(n).reduce(((e,t)=>{const i=n[t];return i==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(n,[e]){const{style:t}=n.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const i of this.ft)e[i]==null&&(this.ft.delete(i),i.includes("-")?t.removeProperty(i):t[i]=null);for(const i in e){const s=e[i];if(s!=null){this.ft.add(i);const r=typeof s=="string"&&s.endsWith(dp);i.includes("-")||r?t.setProperty(i,r?s.slice(0,-11):s,r?Xa:""):t[i]=s}}return Ae}});var fp=Object.defineProperty,gp=(n,e,t,i)=>{for(var s=void 0,r=n.length-1,o;r>=0;r--)(o=n[r])&&(s=o(e,t,s)||s);return s&&fp(e,t,s),s};const Js=class Js extends _{constructor(e,t){super(),this.primaryColor="",this.secondaryColor="",this.tertiaryColor="",this.headerHeight=0,this.copyrightHeight=0,this.userUrl=new URL(e),this.userUrl.searchParams.set("lang","en"),this.userUrl.searchParams.set("guestId",t)}connectedCallback(){var s;super.connectedCallback();const e=this.application.getComponent("widget-header");e&&(this.headerHeight=e.getBoundingClientRect().height);const t=this.application.getComponent("copyright");t&&(this.copyrightHeight=t.getBoundingClientRect().height);const i=(s=this.application.settings)==null?void 0:s.branding.colors;this.primaryColor=i.interactivePrimaryBackground,this.secondaryColor=i.interactiveTextOnPrimaryBackground,this.tertiaryColor=i.interactiveDestructiveBackground,this.primaryColor&&this.userUrl.searchParams.set("primaryColor",this.primaryColor),this.secondaryColor&&this.userUrl.searchParams.set("secondaryColor",this.secondaryColor),this.tertiaryColor&&this.userUrl.searchParams.set("tertiaryColor",this.tertiaryColor)}getSpacingMd(){const t=getComputedStyle(this).getPropertyValue("--spacing-md").trim();if(t.endsWith("rem")){const s=parseFloat(getComputedStyle(this).fontSize);return parseFloat(t)*s}const i=parseFloat(t);return isNaN(i)?0:i}render(){const e=this.getSpacingMd(),t={top:this.headerHeight+e+"px",bottom:this.copyrightHeight+e+"px"};return y` <div class="container" style=${pp(t)}>
|
|
2212
2212
|
<iframe
|
|
2213
2213
|
class="video-iframe"
|
|
2214
2214
|
src=${this.userUrl.href}
|
package/index.mjs
CHANGED
|
@@ -220,7 +220,7 @@ function Sn(n, e) {
|
|
|
220
220
|
0 <= t && n.splice(t, 1);
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
|
-
var en = function() {
|
|
223
|
+
var en = (function() {
|
|
224
224
|
function n(e) {
|
|
225
225
|
this.initialTeardown = e, this.closed = !1, this._parentage = null, this._finalizers = null;
|
|
226
226
|
}
|
|
@@ -304,11 +304,11 @@ var en = function() {
|
|
|
304
304
|
}, n.prototype.remove = function(e) {
|
|
305
305
|
var t = this._finalizers;
|
|
306
306
|
t && Sn(t, e), e instanceof n && e._removeParent(this);
|
|
307
|
-
}, n.EMPTY = function() {
|
|
307
|
+
}, n.EMPTY = (function() {
|
|
308
308
|
var e = new n();
|
|
309
309
|
return e.closed = !0, e;
|
|
310
|
-
}(), n;
|
|
311
|
-
}(), Ro = en.EMPTY;
|
|
310
|
+
})(), n;
|
|
311
|
+
})(), Ro = en.EMPTY;
|
|
312
312
|
function Io(n) {
|
|
313
313
|
return n instanceof en || n && "closed" in n && E(n.remove) && E(n.add) && E(n.unsubscribe);
|
|
314
314
|
}
|
|
@@ -338,7 +338,7 @@ function Cn() {
|
|
|
338
338
|
function $n(n) {
|
|
339
339
|
n();
|
|
340
340
|
}
|
|
341
|
-
var ts = function(n) {
|
|
341
|
+
var ts = (function(n) {
|
|
342
342
|
Le(e, n);
|
|
343
343
|
function e(t) {
|
|
344
344
|
var i = n.call(this) || this;
|
|
@@ -369,7 +369,7 @@ var ts = function(n) {
|
|
|
369
369
|
this.unsubscribe();
|
|
370
370
|
}
|
|
371
371
|
}, e;
|
|
372
|
-
}(en), $l = function() {
|
|
372
|
+
})(en), $l = (function() {
|
|
373
373
|
function n(e) {
|
|
374
374
|
this.partialObserver = e;
|
|
375
375
|
}
|
|
@@ -400,7 +400,7 @@ var ts = function(n) {
|
|
|
400
400
|
gn(t);
|
|
401
401
|
}
|
|
402
402
|
}, n;
|
|
403
|
-
}(), Ii = function(n) {
|
|
403
|
+
})(), Ii = (function(n) {
|
|
404
404
|
Le(e, n);
|
|
405
405
|
function e(t, i, s) {
|
|
406
406
|
var r = n.call(this) || this, o;
|
|
@@ -411,7 +411,7 @@ var ts = function(n) {
|
|
|
411
411
|
} : o = t, r.destination = new $l(o), r;
|
|
412
412
|
}
|
|
413
413
|
return e;
|
|
414
|
-
}(ts);
|
|
414
|
+
})(ts);
|
|
415
415
|
function gn(n) {
|
|
416
416
|
Po(n);
|
|
417
417
|
}
|
|
@@ -423,9 +423,9 @@ var xl = {
|
|
|
423
423
|
next: Cn,
|
|
424
424
|
error: wl,
|
|
425
425
|
complete: Cn
|
|
426
|
-
}, ns = function() {
|
|
426
|
+
}, ns = (function() {
|
|
427
427
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
428
|
-
}();
|
|
428
|
+
})();
|
|
429
429
|
function Ct(n) {
|
|
430
430
|
return n;
|
|
431
431
|
}
|
|
@@ -436,7 +436,7 @@ function kl(n) {
|
|
|
436
436
|
}, t);
|
|
437
437
|
};
|
|
438
438
|
}
|
|
439
|
-
var j = function() {
|
|
439
|
+
var j = (function() {
|
|
440
440
|
function n(e) {
|
|
441
441
|
e && (this._subscribe = e);
|
|
442
442
|
}
|
|
@@ -495,7 +495,7 @@ var j = function() {
|
|
|
495
495
|
}, n.create = function(e) {
|
|
496
496
|
return new n(e);
|
|
497
497
|
}, n;
|
|
498
|
-
}();
|
|
498
|
+
})();
|
|
499
499
|
function Er(n) {
|
|
500
500
|
var e;
|
|
501
501
|
return (e = n ?? bl.Promise) !== null && e !== void 0 ? e : Promise;
|
|
@@ -525,7 +525,7 @@ function ie(n) {
|
|
|
525
525
|
function Y(n, e, t, i, s) {
|
|
526
526
|
return new _l(n, e, t, i, s);
|
|
527
527
|
}
|
|
528
|
-
var _l = function(n) {
|
|
528
|
+
var _l = (function(n) {
|
|
529
529
|
Le(e, n);
|
|
530
530
|
function e(t, i, s, r, o, a) {
|
|
531
531
|
var l = n.call(this, t) || this;
|
|
@@ -560,11 +560,11 @@ var _l = function(n) {
|
|
|
560
560
|
n.prototype.unsubscribe.call(this), !i && ((t = this.onFinalize) === null || t === void 0 || t.call(this));
|
|
561
561
|
}
|
|
562
562
|
}, e;
|
|
563
|
-
}(ts), Tl = Lo(function(n) {
|
|
563
|
+
})(ts), Tl = Lo(function(n) {
|
|
564
564
|
return function() {
|
|
565
565
|
n(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
|
566
566
|
};
|
|
567
|
-
}), P = function(n) {
|
|
567
|
+
}), P = (function(n) {
|
|
568
568
|
Le(e, n);
|
|
569
569
|
function e() {
|
|
570
570
|
var t = n.call(this) || this;
|
|
@@ -643,7 +643,7 @@ var _l = function(n) {
|
|
|
643
643
|
}, e.create = function(t, i) {
|
|
644
644
|
return new _r(t, i);
|
|
645
645
|
}, e;
|
|
646
|
-
}(j), _r = function(n) {
|
|
646
|
+
})(j), _r = (function(n) {
|
|
647
647
|
Le(e, n);
|
|
648
648
|
function e(t, i) {
|
|
649
649
|
var s = n.call(this) || this;
|
|
@@ -662,7 +662,7 @@ var _l = function(n) {
|
|
|
662
662
|
var i, s;
|
|
663
663
|
return (s = (i = this.source) === null || i === void 0 ? void 0 : i.subscribe(t)) !== null && s !== void 0 ? s : Ro;
|
|
664
664
|
}, e;
|
|
665
|
-
}(P), ce = function(n) {
|
|
665
|
+
})(P), ce = (function(n) {
|
|
666
666
|
Le(e, n);
|
|
667
667
|
function e(t) {
|
|
668
668
|
var i = n.call(this) || this;
|
|
@@ -685,11 +685,11 @@ var _l = function(n) {
|
|
|
685
685
|
}, e.prototype.next = function(t) {
|
|
686
686
|
n.prototype.next.call(this, this._value = t);
|
|
687
687
|
}, e;
|
|
688
|
-
}(P), Al = {
|
|
688
|
+
})(P), Al = {
|
|
689
689
|
now: function() {
|
|
690
690
|
return Date.now();
|
|
691
691
|
}
|
|
692
|
-
}, Ol = function(n) {
|
|
692
|
+
}, Ol = (function(n) {
|
|
693
693
|
Le(e, n);
|
|
694
694
|
function e(t, i) {
|
|
695
695
|
return n.call(this) || this;
|
|
@@ -697,7 +697,7 @@ var _l = function(n) {
|
|
|
697
697
|
return e.prototype.schedule = function(t, i) {
|
|
698
698
|
return this;
|
|
699
699
|
}, e;
|
|
700
|
-
}(en), Tr = {
|
|
700
|
+
})(en), Tr = {
|
|
701
701
|
setInterval: function(n, e) {
|
|
702
702
|
for (var t = [], i = 2; i < arguments.length; i++)
|
|
703
703
|
t[i - 2] = arguments[i];
|
|
@@ -707,7 +707,7 @@ var _l = function(n) {
|
|
|
707
707
|
return clearInterval(n);
|
|
708
708
|
},
|
|
709
709
|
delegate: void 0
|
|
710
|
-
}, Ll = function(n) {
|
|
710
|
+
}, Ll = (function(n) {
|
|
711
711
|
Le(e, n);
|
|
712
712
|
function e(t, i) {
|
|
713
713
|
var s = n.call(this, t, i) || this;
|
|
@@ -749,14 +749,14 @@ var _l = function(n) {
|
|
|
749
749
|
this.work = this.state = this.scheduler = null, this.pending = !1, Sn(r, this), i != null && (this.id = this.recycleAsyncId(s, i, null)), this.delay = null, n.prototype.unsubscribe.call(this);
|
|
750
750
|
}
|
|
751
751
|
}, e;
|
|
752
|
-
}(Ol), Ar = function() {
|
|
752
|
+
})(Ol), Ar = (function() {
|
|
753
753
|
function n(e, t) {
|
|
754
754
|
t === void 0 && (t = n.now), this.schedulerActionCtor = e, this.now = t;
|
|
755
755
|
}
|
|
756
756
|
return n.prototype.schedule = function(e, t, i) {
|
|
757
757
|
return t === void 0 && (t = 0), new this.schedulerActionCtor(this, e).schedule(i, t);
|
|
758
758
|
}, n.now = Al.now, n;
|
|
759
|
-
}(), Rl = function(n) {
|
|
759
|
+
})(), Rl = (function(n) {
|
|
760
760
|
Le(e, n);
|
|
761
761
|
function e(t, i) {
|
|
762
762
|
i === void 0 && (i = Ar.now);
|
|
@@ -781,7 +781,7 @@ var _l = function(n) {
|
|
|
781
781
|
throw s;
|
|
782
782
|
}
|
|
783
783
|
}, e;
|
|
784
|
-
}(Ar), vp = new Rl(Ll);
|
|
784
|
+
})(Ar), vp = new Rl(Ll);
|
|
785
785
|
var tt = new j(function(n) {
|
|
786
786
|
return n.complete();
|
|
787
787
|
});
|
|
@@ -800,9 +800,9 @@ function ss(n) {
|
|
|
800
800
|
function Pl(n, e) {
|
|
801
801
|
return typeof is(n) == "number" ? n.pop() : e;
|
|
802
802
|
}
|
|
803
|
-
var rs = function(n) {
|
|
803
|
+
var rs = (function(n) {
|
|
804
804
|
return n && typeof n.length == "number" && typeof n != "function";
|
|
805
|
-
};
|
|
805
|
+
});
|
|
806
806
|
function Uo(n) {
|
|
807
807
|
return E(n == null ? void 0 : n.then);
|
|
808
808
|
}
|
|
@@ -1636,14 +1636,14 @@ let Xo = class {
|
|
|
1636
1636
|
}
|
|
1637
1637
|
};
|
|
1638
1638
|
const xc = (n) => new Xo(typeof n == "string" ? n : n + "", void 0, ls), A = (n, ...e) => {
|
|
1639
|
-
const t = n.length === 1 ? n[0] : e.reduce((i, s, r) => i + ((o) => {
|
|
1639
|
+
const t = n.length === 1 ? n[0] : e.reduce(((i, s, r) => i + ((o) => {
|
|
1640
1640
|
if (o._$cssResult$ === !0) return o.cssText;
|
|
1641
1641
|
if (typeof o == "number") return o;
|
|
1642
1642
|
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.");
|
|
1643
|
-
})(s) + n[r + 1], n[0]);
|
|
1643
|
+
})(s) + n[r + 1]), n[0]);
|
|
1644
1644
|
return new Xo(t, n, ls);
|
|
1645
1645
|
}, kc = (n, e) => {
|
|
1646
|
-
if (as) n.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
|
|
1646
|
+
if (as) n.adoptedStyleSheets = e.map(((t) => t instanceof CSSStyleSheet ? t : t.styleSheet));
|
|
1647
1647
|
else for (const t of e) {
|
|
1648
1648
|
const i = document.createElement("style"), s = wn.litNonce;
|
|
1649
1649
|
s !== void 0 && i.setAttribute("nonce", s), i.textContent = t.cssText, n.appendChild(i);
|
|
@@ -1755,7 +1755,7 @@ let ht = class extends HTMLElement {
|
|
|
1755
1755
|
}
|
|
1756
1756
|
_$Ev() {
|
|
1757
1757
|
var e;
|
|
1758
|
-
this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (e = this.constructor.l) == null || e.forEach((t) => t(this));
|
|
1758
|
+
this._$ES = new Promise(((t) => this.enableUpdating = t)), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (e = this.constructor.l) == null || e.forEach(((t) => t(this)));
|
|
1759
1759
|
}
|
|
1760
1760
|
addController(e) {
|
|
1761
1761
|
var t;
|
|
@@ -1776,19 +1776,19 @@ let ht = class extends HTMLElement {
|
|
|
1776
1776
|
}
|
|
1777
1777
|
connectedCallback() {
|
|
1778
1778
|
var e;
|
|
1779
|
-
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (e = this._$EO) == null || e.forEach((t) => {
|
|
1779
|
+
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (e = this._$EO) == null || e.forEach(((t) => {
|
|
1780
1780
|
var i;
|
|
1781
1781
|
return (i = t.hostConnected) == null ? void 0 : i.call(t);
|
|
1782
|
-
});
|
|
1782
|
+
}));
|
|
1783
1783
|
}
|
|
1784
1784
|
enableUpdating(e) {
|
|
1785
1785
|
}
|
|
1786
1786
|
disconnectedCallback() {
|
|
1787
1787
|
var e;
|
|
1788
|
-
(e = this._$EO) == null || e.forEach((t) => {
|
|
1788
|
+
(e = this._$EO) == null || e.forEach(((t) => {
|
|
1789
1789
|
var i;
|
|
1790
1790
|
return (i = t.hostDisconnected) == null ? void 0 : i.call(t);
|
|
1791
|
-
});
|
|
1791
|
+
}));
|
|
1792
1792
|
}
|
|
1793
1793
|
attributeChangedCallback(e, t, i) {
|
|
1794
1794
|
this._$AK(e, i);
|
|
@@ -1853,10 +1853,10 @@ let ht = class extends HTMLElement {
|
|
|
1853
1853
|
let e = !1;
|
|
1854
1854
|
const t = this._$AL;
|
|
1855
1855
|
try {
|
|
1856
|
-
e = this.shouldUpdate(t), e ? (this.willUpdate(t), (i = this._$EO) == null || i.forEach((s) => {
|
|
1856
|
+
e = this.shouldUpdate(t), e ? (this.willUpdate(t), (i = this._$EO) == null || i.forEach(((s) => {
|
|
1857
1857
|
var r;
|
|
1858
1858
|
return (r = s.hostUpdate) == null ? void 0 : r.call(s);
|
|
1859
|
-
}), this.update(t)) : this._$EM();
|
|
1859
|
+
})), this.update(t)) : this._$EM();
|
|
1860
1860
|
} catch (s) {
|
|
1861
1861
|
throw e = !1, this._$EM(), s;
|
|
1862
1862
|
}
|
|
@@ -1866,10 +1866,10 @@ let ht = class extends HTMLElement {
|
|
|
1866
1866
|
}
|
|
1867
1867
|
_$AE(e) {
|
|
1868
1868
|
var t;
|
|
1869
|
-
(t = this._$EO) == null || t.forEach((i) => {
|
|
1869
|
+
(t = this._$EO) == null || t.forEach(((i) => {
|
|
1870
1870
|
var s;
|
|
1871
1871
|
return (s = i.hostUpdated) == null ? void 0 : s.call(i);
|
|
1872
|
-
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
|
|
1872
|
+
})), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
|
|
1873
1873
|
}
|
|
1874
1874
|
_$EM() {
|
|
1875
1875
|
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
@@ -1884,7 +1884,7 @@ let ht = class extends HTMLElement {
|
|
|
1884
1884
|
return !0;
|
|
1885
1885
|
}
|
|
1886
1886
|
update(e) {
|
|
1887
|
-
this._$Eq && (this._$Eq = this._$Eq.forEach((t) => this._$ET(t, this[t]))), this._$EM();
|
|
1887
|
+
this._$Eq && (this._$Eq = this._$Eq.forEach(((t) => this._$ET(t, this[t])))), this._$EM();
|
|
1888
1888
|
}
|
|
1889
1889
|
updated(e) {
|
|
1890
1890
|
}
|
|
@@ -2969,12 +2969,12 @@ const wt = rn(class extends Jn {
|
|
|
2969
2969
|
if (super(n), n.type !== sn.ATTRIBUTE || n.name !== "class" || ((e = n.strings) == null ? void 0 : e.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
2970
2970
|
}
|
|
2971
2971
|
render(n) {
|
|
2972
|
-
return " " + Object.keys(n).filter((e) => n[e]).join(" ") + " ";
|
|
2972
|
+
return " " + Object.keys(n).filter(((e) => n[e])).join(" ") + " ";
|
|
2973
2973
|
}
|
|
2974
2974
|
update(n, [e]) {
|
|
2975
2975
|
var i, s;
|
|
2976
2976
|
if (this.st === void 0) {
|
|
2977
|
-
this.st = /* @__PURE__ */ new Set(), n.strings !== void 0 && (this.nt = new Set(n.strings.join(" ").split(/\s/).filter((r) => r !== "")));
|
|
2977
|
+
this.st = /* @__PURE__ */ new Set(), n.strings !== void 0 && (this.nt = new Set(n.strings.join(" ").split(/\s/).filter(((r) => r !== ""))));
|
|
2978
2978
|
for (const r in e) e[r] && !((i = this.nt) != null && i.has(r)) && this.st.add(r);
|
|
2979
2979
|
return this.render(e);
|
|
2980
2980
|
}
|
|
@@ -3029,7 +3029,7 @@ th([
|
|
|
3029
3029
|
], Mn.prototype, "anchor");
|
|
3030
3030
|
const nh = /* @__PURE__ */ new WeakMap();
|
|
3031
3031
|
let io = 0;
|
|
3032
|
-
const Si = /* @__PURE__ */ new Map(), so = /* @__PURE__ */ new WeakSet(), ro = () => new Promise((n) => requestAnimationFrame(n)), ih = [{ transform: "translateX(100%) scale(0)", opacity: 0 }], sh = [{ opacity: 0 }], oo = [{ opacity: 0 }, { opacity: 1 }], ao = (n, e) => {
|
|
3032
|
+
const Si = /* @__PURE__ */ new Map(), so = /* @__PURE__ */ new WeakSet(), ro = () => new Promise(((n) => requestAnimationFrame(n))), ih = [{ transform: "translateX(100%) scale(0)", opacity: 0 }], sh = [{ opacity: 0 }], oo = [{ opacity: 0 }, { opacity: 1 }], ao = (n, e) => {
|
|
3033
3033
|
const t = n - e;
|
|
3034
3034
|
return t === 0 ? void 0 : t;
|
|
3035
3035
|
}, lo = (n, e) => {
|
|
@@ -3059,9 +3059,9 @@ class ah extends Sa {
|
|
|
3059
3059
|
}
|
|
3060
3060
|
createFinished() {
|
|
3061
3061
|
var e;
|
|
3062
|
-
(e = this.resolveFinished) == null || e.call(this), this.finished = new Promise((t) => {
|
|
3062
|
+
(e = this.resolveFinished) == null || e.call(this), this.finished = new Promise(((t) => {
|
|
3063
3063
|
this.l = t;
|
|
3064
|
-
});
|
|
3064
|
+
}));
|
|
3065
3065
|
}
|
|
3066
3066
|
async resolveFinished() {
|
|
3067
3067
|
var e;
|
|
@@ -3080,7 +3080,7 @@ class ah extends Sa {
|
|
|
3080
3080
|
update(e, [t]) {
|
|
3081
3081
|
var s;
|
|
3082
3082
|
const i = this.u === void 0;
|
|
3083
|
-
return i && (this.u = (s = e.options) == null ? void 0 : s.host, this.u.addController(this), this.u.updateComplete.then((r) => this.t = !0), this.element = e.element, co.set(this.element, this)), this.optionsOrCallback = t, (i || typeof t != "function") && this.p(t), this.render(t);
|
|
3083
|
+
return i && (this.u = (s = e.options) == null ? void 0 : s.host, this.u.addController(this), this.u.updateComplete.then(((r) => this.t = !0)), this.element = e.element, co.set(this.element, this)), this.optionsOrCallback = t, (i || typeof t != "function") && this.p(t), this.render(t);
|
|
3084
3084
|
}
|
|
3085
3085
|
p(e) {
|
|
3086
3086
|
e = e ?? {};
|
|
@@ -3089,16 +3089,16 @@ class ah extends Sa {
|
|
|
3089
3089
|
}
|
|
3090
3090
|
m() {
|
|
3091
3091
|
const e = {}, t = this.element.getBoundingClientRect(), i = getComputedStyle(this.element);
|
|
3092
|
-
return this.options.properties.forEach((s) => {
|
|
3092
|
+
return this.options.properties.forEach(((s) => {
|
|
3093
3093
|
const r = t[s] ?? (Ci[s] ? void 0 : i[s]), o = Number(r);
|
|
3094
3094
|
e[s] = isNaN(o) ? r + "" : o;
|
|
3095
|
-
}), e;
|
|
3095
|
+
})), e;
|
|
3096
3096
|
}
|
|
3097
3097
|
v() {
|
|
3098
3098
|
let e, t = !0;
|
|
3099
3099
|
return this.options.guard && (e = this.options.guard(), t = ((i, s) => {
|
|
3100
3100
|
if (Array.isArray(i)) {
|
|
3101
|
-
if (Array.isArray(s) && s.length === i.length && i.every((r, o) => r === s[o])) return !1;
|
|
3101
|
+
if (Array.isArray(s) && s.length === i.length && i.every(((r, o) => r === s[o]))) return !1;
|
|
3102
3102
|
} else if (s === i) return !1;
|
|
3103
3103
|
return !0;
|
|
3104
3104
|
})(e, this._)), this.h = this.t && !this.isDisabled() && !this.isAnimating() && t && this.element.isConnected, this.h && (this._ = Array.isArray(e) ? Array.from(e) : e), this.h;
|
|
@@ -3119,7 +3119,7 @@ class ah extends Sa {
|
|
|
3119
3119
|
if (r) {
|
|
3120
3120
|
Si.delete(this.options.inId);
|
|
3121
3121
|
const { from: o, to: a } = this.N(r, s, t);
|
|
3122
|
-
e = this.calculateKeyframes(o, a), e = this.options.in ? [{ ...this.options.in[0], ...e[0] }, ...this.options.in.slice(1), e[1]] : e, io++, e.forEach((l) => l.zIndex = io);
|
|
3122
|
+
e = this.calculateKeyframes(o, a), e = this.options.in ? [{ ...this.options.in[0], ...e[0] }, ...this.options.in.slice(1), e[1]] : e, io++, e.forEach(((l) => l.zIndex = io));
|
|
3123
3123
|
} else this.options.in && (e = [...this.options.in, {}]);
|
|
3124
3124
|
}
|
|
3125
3125
|
this.animate(e, i);
|
|
@@ -3169,21 +3169,21 @@ class ah extends Sa {
|
|
|
3169
3169
|
}
|
|
3170
3170
|
get isHostRendered() {
|
|
3171
3171
|
const e = so.has(this.u);
|
|
3172
|
-
return e || this.u.updateComplete.then(() => {
|
|
3172
|
+
return e || this.u.updateComplete.then((() => {
|
|
3173
3173
|
so.add(this.u);
|
|
3174
|
-
}), e;
|
|
3174
|
+
})), e;
|
|
3175
3175
|
}
|
|
3176
3176
|
j(e, t = this.O()) {
|
|
3177
3177
|
const i = { ...rh };
|
|
3178
|
-
return t.forEach((s) => Object.assign(i, s.options.keyframeOptions)), Object.assign(i, e), i;
|
|
3178
|
+
return t.forEach(((s) => Object.assign(i, s.options.keyframeOptions))), Object.assign(i, e), i;
|
|
3179
3179
|
}
|
|
3180
3180
|
N(e, t, i) {
|
|
3181
3181
|
e = { ...e }, t = { ...t };
|
|
3182
|
-
const s = i.map((a) => a.animatingProperties).filter((a) => a !== void 0);
|
|
3182
|
+
const s = i.map(((a) => a.animatingProperties)).filter(((a) => a !== void 0));
|
|
3183
3183
|
let r = 1, o = 1;
|
|
3184
|
-
return s.length > 0 && (s.forEach((a) => {
|
|
3184
|
+
return s.length > 0 && (s.forEach(((a) => {
|
|
3185
3185
|
a.width && (r /= a.width), a.height && (o /= a.height);
|
|
3186
|
-
}), e.left !== void 0 && t.left !== void 0 && (e.left = r * e.left, t.left = r * t.left), e.top !== void 0 && t.top !== void 0 && (e.top = o * e.top, t.top = o * t.top)), { from: e, to: t };
|
|
3186
|
+
})), e.left !== void 0 && t.left !== void 0 && (e.left = r * e.left, t.left = r * t.left), e.top !== void 0 && t.top !== void 0 && (e.top = o * e.top, t.top = o * t.top)), { from: e, to: t };
|
|
3187
3187
|
}
|
|
3188
3188
|
calculateKeyframes(e, t, i = !1) {
|
|
3189
3189
|
const s = {}, r = {};
|
|
@@ -3757,9 +3757,9 @@ function ph({ context: n }) {
|
|
|
3757
3757
|
return i.set(this, new ho(this, { context: n, initialValue: s })), s;
|
|
3758
3758
|
} };
|
|
3759
3759
|
{
|
|
3760
|
-
e.constructor.addInitializer((o) => {
|
|
3760
|
+
e.constructor.addInitializer(((o) => {
|
|
3761
3761
|
i.set(o, new ho(o, { context: n }));
|
|
3762
|
-
});
|
|
3762
|
+
}));
|
|
3763
3763
|
const s = Object.getOwnPropertyDescriptor(e, t);
|
|
3764
3764
|
let r;
|
|
3765
3765
|
if (s === void 0) {
|
|
@@ -3786,15 +3786,15 @@ function ph({ context: n }) {
|
|
|
3786
3786
|
*/
|
|
3787
3787
|
function he({ context: n, subscribe: e }) {
|
|
3788
3788
|
return (t, i) => {
|
|
3789
|
-
typeof i == "object" ? i.addInitializer(function() {
|
|
3789
|
+
typeof i == "object" ? i.addInitializer((function() {
|
|
3790
3790
|
new uo(this, { context: n, callback: (s) => {
|
|
3791
3791
|
t.set.call(this, s);
|
|
3792
3792
|
}, subscribe: e });
|
|
3793
|
-
}) : t.constructor.addInitializer((s) => {
|
|
3793
|
+
})) : t.constructor.addInitializer(((s) => {
|
|
3794
3794
|
new uo(s, { context: n, callback: (r) => {
|
|
3795
3795
|
s[i] = r;
|
|
3796
3796
|
}, subscribe: e });
|
|
3797
|
-
});
|
|
3797
|
+
}));
|
|
3798
3798
|
};
|
|
3799
3799
|
}
|
|
3800
3800
|
var fh = Object.defineProperty, Ta = (n, e, t, i) => {
|
|
@@ -9711,10 +9711,10 @@ const Xa = "important", dp = " !" + Xa, pp = rn(class extends Jn {
|
|
|
9711
9711
|
if (super(n), n.type !== sn.ATTRIBUTE || n.name !== "style" || ((e = n.strings) == null ? void 0 : e.length) > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
|
|
9712
9712
|
}
|
|
9713
9713
|
render(n) {
|
|
9714
|
-
return Object.keys(n).reduce((e, t) => {
|
|
9714
|
+
return Object.keys(n).reduce(((e, t) => {
|
|
9715
9715
|
const i = n[t];
|
|
9716
9716
|
return i == null ? e : e + `${t = t.includes("-") ? t : t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, "-$&").toLowerCase()}:${i};`;
|
|
9717
|
-
}, "");
|
|
9717
|
+
}), "");
|
|
9718
9718
|
}
|
|
9719
9719
|
update(n, [e]) {
|
|
9720
9720
|
const { style: t } = n.element;
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/ace-chat-flamingo",
|
|
3
|
-
"version": "1.1.121
|
|
3
|
+
"version": "1.1.121",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@telia-ace/widget-core-flamingo": "1.1.121
|
|
6
|
-
"@telia-ace/widget-conversation-flamingo": "1.1.121
|
|
5
|
+
"@telia-ace/widget-core-flamingo": "1.1.121",
|
|
6
|
+
"@telia-ace/widget-conversation-flamingo": "1.1.121",
|
|
7
7
|
"rxjs": "^7.8.2",
|
|
8
8
|
"lit": "^3.0.2",
|
|
9
9
|
"@teliads/icons": "^8.4.0",
|